diff --git a/tgui/public/tgui.bundle.js b/tgui/public/tgui.bundle.js index 65f730e982e..cee1a9a1485 100644 --- a/tgui/public/tgui.bundle.js +++ b/tgui/public/tgui.bundle.js @@ -238,7 +238,7 @@ * @file * @copyright 2020 Aleksej Komarov * @license MIT - */var y=(0,t.createLogger)("hotkeys"),V={},k=[e.KEY_ESCAPE,e.KEY_ENTER,e.KEY_SPACE,e.KEY_TAB,e.KEY_CTRL,e.KEY_SHIFT,e.KEY_UP,e.KEY_DOWN,e.KEY_LEFT,e.KEY_RIGHT],S={},p=function(c){if(c===16)return"Shift";if(c===17)return"Ctrl";if(c===18)return"Alt";if(c===33)return"Northeast";if(c===34)return"Southeast";if(c===35)return"Southwest";if(c===36)return"Northwest";if(c===37)return"West";if(c===38)return"North";if(c===39)return"East";if(c===40)return"South";if(c===45)return"Insert";if(c===46)return"Delete";if(c>=48&&c<=57||c>=65&&c<=90)return String.fromCharCode(c);if(c>=96&&c<=105)return"Numpad"+(c-96);if(c>=112&&c<=123)return"F"+(c-111);if(c===188)return",";if(c===189)return"-";if(c===190)return"."},i=function(c){var v=String(c);if(v==="Ctrl+F5"||v==="Ctrl+R"){location.reload();return}if(v!=="Ctrl+F"&&!(c.event.defaultPrevented||c.isModifierKey()||k.includes(c.code))){v==="F5"&&(c.event.preventDefault(),c.event.returnValue=!1);var b=p(c.code);if(b){var g=V[b];if(g)return y.debug("macro",g),Byond.command(g);if(c.isDown()&&!S[b]){S[b]=!0;var h='KeyDown "'+b+'"';return y.debug(h),Byond.command(h)}if(c.isUp()&&S[b]){S[b]=!1;var C='KeyUp "'+b+'"';return y.debug(C),Byond.command(C)}}}},l=r.acquireHotKey=function(){function m(c){k.push(c)}return m}(),f=r.releaseHotKey=function(){function m(c){var v=k.indexOf(c);v>=0&&k.splice(v,1)}return m}(),u=r.releaseHeldKeys=function(){function m(){for(var c=0,v=Object.keys(S);c=75?l="green":i.integrity>=25?l="yellow":l="red",(0,e.createComponentVNode)(2,o.Window,{width:600,height:420,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:i.name,children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:l,value:i.integrity/100})})}),(0,e.createComponentVNode)(2,t.Box,{color:"red",children:(0,e.createVNode)(1,"h2",null,i.flushing===1?"Wipe of AI in progress...":"",0)})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Laws",children:!!i.has_laws&&(0,e.createComponentVNode)(2,t.Box,{children:i.laws.map(function(f,u){return(0,e.createComponentVNode)(2,t.Box,{children:f},u)})})||(0,e.createComponentVNode)(2,t.Box,{color:"red",children:(0,e.createVNode)(1,"h3",null,"No laws detected.",16)})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Wireless Activity",children:(0,e.createComponentVNode)(2,t.Button,{width:10,icon:i.wireless?"check":"times",content:i.wireless?"Enabled":"Disabled",color:i.wireless?"green":"red",onClick:function(){function f(){return p("wireless")}return f}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subspace Transceiver",children:(0,e.createComponentVNode)(2,t.Button,{width:10,icon:i.radio?"check":"times",content:i.radio?"Enabled":"Disabled",color:i.radio?"green":"red",onClick:function(){function f(){return p("radio")}return f}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Wipe",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{width:10,icon:"trash-alt",confirmIcon:"trash-alt",disabled:i.flushing||i.integrity===0,confirmColor:"red",content:"Wipe AI",onClick:function(){function f(){return p("wipe")}return f}()})})]})})})]})})})}return y}()},39454:function(I,r,n){"use strict";r.__esModule=!0,r.AIFixer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.AIFixer=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data;if(i.occupant===null)return(0,e.createComponentVNode)(2,o.Window,{width:550,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Stored AI",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"robot",size:5,color:"silver"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"h3",null,"No Artificial Intelligence detected.",16)]})})})})});var l=!0;(i.stat===2||i.stat===null)&&(l=!1);var f=null;i.integrity>=75?f="green":i.integrity>=25?f="yellow":f="red";var u=!0;return i.integrity>=100&&i.stat!==2&&(u=!1),(0,e.createComponentVNode)(2,o.Window,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:i.occupant,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:f,value:i.integrity/100})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:l?"green":"red",children:l?"Functional":"Non-Functional"})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Laws",children:!!i.has_laws&&(0,e.createComponentVNode)(2,t.Box,{children:i.laws.map(function(s,m){return(0,e.createComponentVNode)(2,t.Box,{inline:!0,children:s},m)})})||(0,e.createComponentVNode)(2,t.Box,{color:"red",children:(0,e.createVNode)(1,"h3",null,"No laws detected.",16)})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Actions",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Wireless Activity",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.wireless?"times":"check",content:i.wireless?"Disabled":"Enabled",color:i.wireless?"red":"green",onClick:function(){function s(){return p("wireless")}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subspace Transceiver",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.radio?"times":"check",content:i.radio?"Disabled":"Enabled",color:i.radio?"red":"green",onClick:function(){function s(){return p("radio")}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Start Repairs",children:(0,e.createComponentVNode)(2,t.Button,{icon:"wrench",disabled:!u||i.active,content:!u||i.active?"Already Repaired":"Repair",onClick:function(){function s(){return p("fix")}return s}()})})]}),(0,e.createComponentVNode)(2,t.Box,{color:"green",lineHeight:2,children:i.active?"Reconstruction in progress.":""})]})})]})})})}return y}()},88422:function(I,r,n){"use strict";r.__esModule=!0,r.APC=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=n(195),y=r.APC=function(){function p(i,l){return(0,e.createComponentVNode)(2,o.Window,{width:510,height:435,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,S)})})}return p}(),V={2:{color:"good",externalPowerText:"External Power",chargingText:"Fully Charged"},1:{color:"average",externalPowerText:"Low External Power",chargingText:"Charging"},0:{color:"bad",externalPowerText:"No External Power",chargingText:"Not Charging"}},k={1:{icon:"terminal",content:"Override Programming",action:"hack"},2:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"},3:{icon:"caret-square-left",content:"Return to Main Core",action:"deoccupy"},4:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"}},S=function(i,l){var f=(0,a.useBackend)(l),u=f.act,s=f.data,m=s.locked&&!s.siliconUser,c=s.normallyLocked,v=V[s.externalPower]||V[0],b=V[s.chargingStatus]||V[0],g=s.powerChannels||[],h=k[s.malfStatus]||k[0],C=s.powerCellStatus/100;return(0,e.createFragment)([(0,e.createComponentVNode)(2,d.InterfaceLockNoticeBox),(0,e.createComponentVNode)(2,t.Section,{title:"Power Status",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Main Breaker",color:v.color,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:s.isOperating?"power-off":"times",content:s.isOperating?"On":"Off",selected:s.isOperating&&!m,color:s.isOperating?"":"bad",disabled:m,onClick:function(){function N(){return u("breaker")}return N}()}),children:["[ ",v.externalPowerText," ]"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power Cell",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:"good",value:C})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Charge Mode",color:b.color,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:s.chargeMode?"sync":"times",content:s.chargeMode?"Auto":"Off",selected:s.chargeMode,disabled:m,onClick:function(){function N(){return u("charge")}return N}()}),children:["[ ",b.chargingText," ]"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Power Channels",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[g.map(function(N){var x=N.topicParams;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:N.title,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{inline:!0,mx:2,color:N.status>=2?"good":"bad",children:N.status>=2?"On":"Off"}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Auto",selected:!m&&(N.status===1||N.status===3),disabled:m,onClick:function(){function B(){return u("channel",x.auto)}return B}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:"On",selected:!m&&N.status===2,disabled:m,onClick:function(){function B(){return u("channel",x.on)}return B}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Off",selected:!m&&N.status===0,disabled:m,onClick:function(){function B(){return u("channel",x.off)}return B}()})],4),children:[N.powerLoad," W"]},N.title)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Load",children:(0,e.createVNode)(1,"b",null,[s.totalLoad,(0,e.createTextVNode)(" W")],0)})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Misc",buttons:!!s.siliconUser&&(0,e.createFragment)([!!s.malfStatus&&(0,e.createComponentVNode)(2,t.Button,{icon:h.icon,content:h.content,color:"bad",onClick:function(){function N(){return u(h.action)}return N}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"lightbulb-o",content:"Overload",onClick:function(){function N(){return u("overload")}return N}()})],0),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cover Lock",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.4,icon:s.coverLocked?"lock":"unlock",content:s.coverLocked?"Engaged":"Disengaged",disabled:m,onClick:function(){function N(){return u("cover")}return N}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Night Shift Lighting",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"lightbulb-o",content:s.nightshiftLights?"Enabled":"Disabled",onClick:function(){function N(){return u("toggle_nightshift")}return N}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Lighting Fallback",buttons:(0,e.createComponentVNode)(2,t.Button,{mt:.4,icon:"lightbulb-o",content:s.emergencyLights?"Engaged":"Disengaged",disabled:m,onClick:function(){function N(){return u("emergency_lighting")}return N}()})})]})})],4)}},99660:function(I,r,n){"use strict";r.__esModule=!0,r.ATM=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.ATM=function(){function u(s,m){var c=(0,a.useBackend)(m),v=c.act,b=c.data,g=b.view_screen,h=b.authenticated_account,C=b.ticks_left_locked_down,N=b.linked_db,x;if(C>0)x=(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-triangle"}),"Maximum number of pin attempts exceeded! Access to this ATM has been temporarily disabled."]});else if(!N)x=(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-triangle"}),"Unable to connect to accounts database, please retry and if the issue persists contact Nanotrasen IT support."]});else if(h)switch(g){case 1:x=(0,e.createComponentVNode)(2,V);break;case 2:x=(0,e.createComponentVNode)(2,k);break;case 3:x=(0,e.createComponentVNode)(2,l);break;case 4:x=(0,e.createComponentVNode)(2,S);break;default:x=(0,e.createComponentVNode)(2,p)}else x=(0,e.createComponentVNode)(2,i);return(0,e.createComponentVNode)(2,o.Window,{width:550,height:650,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,t.Section,{children:x})]})})}return u}(),y=function(s,m){var c=(0,a.useBackend)(m),v=c.act,b=c.data,g=b.machine_id,h=b.held_card_name;return(0,e.createComponentVNode)(2,t.Section,{title:"Nanotrasen Automatic Teller Machine",children:[(0,e.createComponentVNode)(2,t.Box,{children:"For all your monetary needs!"}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Card",children:(0,e.createComponentVNode)(2,t.Button,{content:h,icon:"eject",onClick:function(){function C(){return v("insert_card")}return C}()})})})]})},V=function(s,m){var c=(0,a.useBackend)(m),v=c.act,b=c.data,g=b.security_level;return(0,e.createComponentVNode)(2,t.Section,{title:"Select a new security level for this account",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Level",children:(0,e.createComponentVNode)(2,t.Button,{content:"Account Number",icon:"unlock",selected:g===0,onClick:function(){function h(){return v("change_security_level",{new_security_level:0})}return h}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:"Either the account number or card is required to access this account. EFTPOS transactions will require a card."}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Level",children:(0,e.createComponentVNode)(2,t.Button,{content:"Account Pin",icon:"unlock",selected:g===1,onClick:function(){function h(){return v("change_security_level",{new_security_level:1})}return h}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:"An account number and pin must be manually entered to access this account and process transactions."}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Level",children:(0,e.createComponentVNode)(2,t.Button,{content:"Card and Account Pin",icon:"unlock",selected:g===2,onClick:function(){function h(){return v("change_security_level",{new_security_level:2})}return h}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:"An account number, pin and card are required to access this account and process transactions."})]}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,f)]})},k=function(s,m){var c=(0,a.useBackend)(m),v=c.act,b=c.data,g=(0,a.useLocalState)(m,"targetAccNumber",0),h=g[0],C=g[1],N=(0,a.useLocalState)(m,"fundsAmount",0),x=N[0],B=N[1],L=(0,a.useLocalState)(m,"purpose",0),w=L[0],A=L[1],T=b.money;return(0,e.createComponentVNode)(2,t.Section,{title:"Transfer Fund",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Account Balance",children:["$",T]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target Account Number",children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"7 Digit Number",onInput:function(){function E(O,P){return C(P)}return E}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Funds to Transfer",children:(0,e.createComponentVNode)(2,t.Input,{onInput:function(){function E(O,P){return B(P)}return E}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transaction Purpose",children:(0,e.createComponentVNode)(2,t.Input,{fluid:!0,onInput:function(){function E(O,P){return A(P)}return E}()})})]}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.Button,{content:"Transfer",icon:"sign-out-alt",onClick:function(){function E(){return v("transfer",{target_acc_number:h,funds_amount:x,purpose:w})}return E}()}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,f)]})},S=function(s,m){var c=(0,a.useBackend)(m),v=c.act,b=c.data,g=b.insurance_type;return(0,e.createComponentVNode)(2,t.Section,{title:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u0442\u0438\u043F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u043A\u0438",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0422\u0438\u043F",children:[(0,e.createComponentVNode)(2,t.Button,{content:"\u041D\u0435\u0442 (0)",icon:"unlock",selected:g==="None",onClick:function(){function h(){return v("change_insurance_type",{new_insurance_type:"None"})}return h}()}),(0,e.createComponentVNode)(2,t.Button,{content:"\u0411\u044E\u0434\u0436\u0435\u0442\u043D\u0430\u044F (0)",icon:"unlock",selected:g==="Bugetary",onClick:function(){function h(){return v("change_insurance_type",{new_insurance_type:"Bugetary"})}return h}()}),(0,e.createComponentVNode)(2,t.Button,{content:"\u0421\u0442\u0430\u043D\u0434\u0430\u0440\u0442\u043D\u0430\u044F (500)",icon:"unlock",selected:g==="Standart",onClick:function(){function h(){return v("change_insurance_type",{new_insurance_type:"Standart"})}return h}()}),(0,e.createComponentVNode)(2,t.Button,{content:"\u0414\u0435\u043B\u044E\u043A\u0441 (2000)",icon:"unlock",selected:g==="Deluxe",onClick:function(){function h(){return v("change_insurance_type",{new_insurance_type:"Deluxe"})}return h}()})]})}),(0,e.createComponentVNode)(2,f)]})},p=function(s,m){var c=(0,a.useBackend)(m),v=c.act,b=c.data,g=(0,a.useLocalState)(m,"fundsAmount",0),h=g[0],C=g[1],N=(0,a.useLocalState)(m,"insuranceAmount",0),x=N[0],B=N[1],L=b.owner_name,w=b.money,A=b.insurance;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Welcome, "+L,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Logout",icon:"sign-out-alt",onClick:function(){function T(){return v("logout")}return T}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Account Balance",children:["$",w]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Withdrawal Amount",children:(0,e.createComponentVNode)(2,t.Input,{onInput:function(){function T(E,O){return C(O)}return T}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Withdraw Funds",icon:"sign-out-alt",onClick:function(){function T(){return v("withdrawal",{funds_amount:h})}return T}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Insurance Points",children:["$",A]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Adding Insurance",children:(0,e.createComponentVNode)(2,t.Input,{onInput:function(){function T(E,O){return B(O)}return T}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Add insurance points",icon:"sign-out-alt",onClick:function(){function T(){return v("insurance",{insurance_amount:x})}return T}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Toggle auto-replenishment of insurance",icon:"sign-out-alt",onClick:function(){function T(){return v("insurance_replenishment",{})}return T}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Menu",children:[(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Change account security level",icon:"lock",onClick:function(){function T(){return v("view_screen",{view_screen:1})}return T}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Make transfer",icon:"exchange-alt",onClick:function(){function T(){return v("view_screen",{view_screen:2})}return T}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"View transaction log",icon:"list",onClick:function(){function T(){return v("view_screen",{view_screen:3})}return T}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Change type of insurance",icon:"lock",onClick:function(){function T(){return v("view_screen",{view_screen:4})}return T}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Print balance statement",icon:"print",onClick:function(){function T(){return v("balance_statement")}return T}()})})]})],4)},i=function(s,m){var c=(0,a.useBackend)(m),v=c.act,b=c.data,g=(0,a.useLocalState)(m,"accountID",null),h=g[0],C=g[1],N=(0,a.useLocalState)(m,"accountPin",null),x=N[0],B=N[1],L=b.machine_id,w=b.held_card_name;return(0,e.createComponentVNode)(2,t.Section,{title:"Insert card or enter ID and pin to login",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Account ID",children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"6 Digit Number",onInput:function(){function A(T,E){return C(E)}return A}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pin",children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"6 Digit Number",onInput:function(){function A(T,E){return B(E)}return A}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Login",icon:"sign-in-alt",onClick:function(){function A(){return v("attempt_auth",{account_num:h,account_pin:x})}return A}()})})]})})},l=function(s,m){var c=(0,a.useBackend)(m),v=c.act,b=c.data,g=b.transaction_log;return(0,e.createComponentVNode)(2,t.Section,{title:"Transactions",children:[(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Timestamp"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Reason"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Value"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Terminal"})]}),g.map(function(h){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.time}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.purpose}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:h.is_deposit?"green":"red",children:["$",h.amount]}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.target_name})]},h)})]}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,f)]})},f=function(s,m){var c=(0,a.useBackend)(m),v=c.act,b=c.data;return(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"sign-out-alt",onClick:function(){function g(){return v("view_screen",{view_screen:0})}return g}()})}},86423:function(I,r,n){"use strict";r.__esModule=!0,r.AccountsUplinkTerminal=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),d=n(36352),y=n(98595),V=n(321),k=n(5485),S=r.AccountsUplinkTerminal=function(){function s(m,c){var v=(0,t.useBackend)(c),b=v.act,g=v.data,h=g.loginState,C=g.currentPage,N;if(h.logged_in)C===1?N=(0,e.createComponentVNode)(2,p):C===2?N=(0,e.createComponentVNode)(2,f):C===3&&(N=(0,e.createComponentVNode)(2,u));else return(0,e.createComponentVNode)(2,y.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,y.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,k.LoginScreen)})})});return(0,e.createComponentVNode)(2,y.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,y.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,V.LoginInfo),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:N})]})})})}return s}(),p=function(m,c){var v=(0,t.useBackend)(c),b=v.act,g=v.data,h=g.accounts,C=(0,t.useLocalState)(c,"searchText",""),N=C[0],x=C[1],B=(0,t.useLocalState)(c,"sortId","owner_name"),L=B[0],w=B[1],A=(0,t.useLocalState)(c,"sortOrder",!0),T=A[0],E=A[1];return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"AccountsUplinkTerminal__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,i,{id:"owner_name",children:"Account Holder"}),(0,e.createComponentVNode)(2,i,{id:"account_number",children:"Account Number"}),(0,e.createComponentVNode)(2,i,{id:"suspended",children:"Account Status"}),(0,e.createComponentVNode)(2,i,{id:"money",children:"Account Balance"})]}),h.filter((0,a.createSearch)(N,function(O){return O.owner_name+"|"+O.account_number+"|"+O.suspended+"|"+O.money})).sort(function(O,P){var R=T?1:-1;return O[L].localeCompare(P[L])*R}).map(function(O){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"AccountsUplinkTerminal__listRow--"+O.suspended,onClick:function(){function P(){return b("view_account_detail",{index:O.account_index})}return P}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",O.owner_name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:["#",O.account_number]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:O.suspended}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:O.money})]},O.account_number)})]})})})]})},i=function(m,c){var v=(0,t.useLocalState)(c,"sortId","name"),b=v[0],g=v[1],h=(0,t.useLocalState)(c,"sortOrder",!0),C=h[0],N=h[1],x=m.id,B=m.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{color:b!==x&&"transparent",width:"100%",onClick:function(){function L(){b===x?N(!C):(g(x),N(!0))}return L}(),children:[B,b===x&&(0,e.createComponentVNode)(2,o.Icon,{name:C?"sort-up":"sort-down",ml:"0.25rem;"})]})})},l=function(m,c){var v=(0,t.useBackend)(c),b=v.act,g=v.data,h=g.is_printing,C=(0,t.useLocalState)(c,"searchText",""),N=C[0],x=C[1];return(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Button,{content:"New Account",icon:"plus",onClick:function(){function B(){return b("create_new_account")}return B}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"print",content:"Print Account List",disabled:h,ml:"0.25rem",onClick:function(){function B(){return b("print_records")}return B}()})]}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Search by account holder, number, status",width:"100%",onInput:function(){function B(L,w){return x(w)}return B}()})})]})},f=function(m,c){var v=(0,t.useBackend)(c),b=v.act,g=v.data,h=g.account_number,C=g.owner_name,N=g.money,x=g.suspended,B=g.transactions;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:"#"+h+" / "+C,buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"arrow-left",content:"Back",onClick:function(){function L(){return b("back")}return L}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Number",children:["#",h]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Holder",children:C}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Balance",children:N}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Status",color:x?"red":"green",children:[x?"Suspended":"Active",(0,e.createComponentVNode)(2,o.Button,{ml:1,content:x?"Unsuspend":"Suspend",icon:x?"unlock":"lock",onClick:function(){function L(){return b("toggle_suspension")}return L}()})]})]})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Transactions",children:(0,e.createComponentVNode)(2,o.Table,{children:[(0,e.createComponentVNode)(2,o.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Timestamp"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Reason"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Value"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Terminal"})]}),B.map(function(L){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:L.time}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:L.purpose}),(0,e.createComponentVNode)(2,o.Table.Cell,{color:L.is_deposit?"green":"red",children:["$",L.amount]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:L.target_name})]},L)})]})})})]})},u=function(m,c){var v=(0,t.useBackend)(c),b=v.act,g=v.data,h=(0,t.useLocalState)(c,"accName",""),C=h[0],N=h[1],x=(0,t.useLocalState)(c,"accDeposit",""),B=x[0],L=x[1];return(0,e.createComponentVNode)(2,o.Section,{title:"Create Account",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"arrow-left",content:"Back",onClick:function(){function w(){return b("back")}return w}()}),children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Holder",children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Name Here",onChange:function(){function w(A,T){return N(T)}return w}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Initial Deposit",children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"0",onChange:function(){function w(A,T){return L(T)}return w}()})})]}),(0,e.createComponentVNode)(2,o.Button,{mt:1,fluid:!0,content:"Create Account",onClick:function(){function w(){return b("finalise_create_account",{holder_name:C,starting_funds:B})}return w}()})]})}},79571:function(I,r,n){"use strict";r.__esModule=!0,r.AgentCardSLSlots=r.AgentCardInfo=r.AgentCardAppearances=r.AgentCard=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),d=n(98595),y=r.AgentCard=function(){function p(i,l){var f=(0,t.useLocalState)(l,"tabIndex",0),u=f[0],s=f[1],m=function(){function c(v){switch(v){case 0:return(0,e.createComponentVNode)(2,V);case 1:return(0,e.createComponentVNode)(2,k);case 2:return(0,e.createComponentVNode)(2,S);default:return(0,e.createComponentVNode)(2,V)}}return c}();return(0,e.createComponentVNode)(2,d.Window,{width:500,height:475,theme:"syndicate",children:(0,e.createComponentVNode)(2,d.Window.Content,{children:(0,e.createComponentVNode)(2,o.Box,{fillPositionedParent:!0,overflow:"hidden",children:[(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:u===0,onClick:function(){function c(){return s(0)}return c}(),children:[(0,e.createComponentVNode)(2,o.Icon,{name:"table"})," Card Info"]},"Card Info"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:u===1,onClick:function(){function c(){return s(1)}return c}(),children:[(0,e.createComponentVNode)(2,o.Icon,{name:"id-card"})," Appearance"]},"Appearance"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:u===2,onClick:function(){function c(){return s(2)}return c}(),children:[(0,e.createComponentVNode)(2,o.Icon,{name:"arrow-down"})," Save/Load Card Info"]},"Save/Load Card Info")]}),m(u)]})})})}return p}(),V=r.AgentCardInfo=function(){function p(i,l){var f=(0,t.useBackend)(l),u=f.act,s=f.data,m=s.registered_name,c=s.sex,v=s.age,b=s.assignment,g=s.associated_account_number,h=s.blood_type,C=s.dna_hash,N=s.fingerprint_hash,x=s.photo,B=s.ai_tracking;return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Section,{title:"Card Info",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:(0,e.createComponentVNode)(2,o.Button,{content:m||"[UNSET]",onClick:function(){function L(){return u("change_name")}return L}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Sex",children:(0,e.createComponentVNode)(2,o.Button,{iconRight:!1,content:c||"[UNSET]",onClick:function(){function L(){return u("change_sex")}return L}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Age",children:(0,e.createComponentVNode)(2,o.Button,{content:v||"[UNSET]",onClick:function(){function L(){return u("change_age")}return L}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Rank",children:(0,e.createComponentVNode)(2,o.Button,{content:b||"[UNSET]",onClick:function(){function L(){return u("change_occupation")}return L}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Fingerprints",children:(0,e.createComponentVNode)(2,o.Button,{content:N||"[UNSET]",onClick:function(){function L(){return u("change_fingerprints")}return L}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Blood Type",children:(0,e.createComponentVNode)(2,o.Button,{content:h||"[UNSET]",onClick:function(){function L(){return u("change_blood_type")}return L}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"DNA Hash",children:(0,e.createComponentVNode)(2,o.Button,{content:C||"[UNSET]",onClick:function(){function L(){return u("change_dna_hash")}return L}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Money Account",children:(0,e.createComponentVNode)(2,o.Button,{content:g||"[UNSET]",onClick:function(){function L(){return u("change_money_account")}return L}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Photo",children:(0,e.createComponentVNode)(2,o.Button,{content:x?"Update":"[UNSET]",onClick:function(){function L(){return u("change_photo")}return L}()})})]})}),(0,e.createComponentVNode)(2,o.Section,{title:"Card Settings",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Card Info",children:(0,e.createComponentVNode)(2,o.Button,{content:"Delete Card Info",onClick:function(){function L(){return u("delete_info")}return L}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Access",children:(0,e.createComponentVNode)(2,o.Button,{content:"Reset Access",onClick:function(){function L(){return u("clear_access")}return L}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"AI Tracking",children:(0,e.createComponentVNode)(2,o.Button,{content:B?"Untrackable":"Trackable",onClick:function(){function L(){return u("change_ai_tracking")}return L}()})})]})})],4)}return p}(),k=r.AgentCardAppearances=function(){function p(i,l){var f=(0,t.useBackend)(l),u=f.act,s=f.data,m=s.appearances;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Card Appearance",children:m.map(function(c){return(0,e.createComponentVNode)(2,o.ImageButton,{tooltip:c,vertical:!0,asset:!0,style:{margin:"1px"},image:c,imageAsset:"id_card64x64",onclick:function(){function v(){return u("change_appearance_new",{new_appearance:c})}return v}()},c)})})}return p}(),S=r.AgentCardSLSlots=function(){function p(i,l){var f=(0,t.useBackend)(l),u=f.act,s=f.data,m=s.saved_info;return(0,e.createComponentVNode)(2,o.Section,{title:"Save/Load Manager",style:{"line-height":"25px"},children:(0,e.createComponentVNode)(2,o.LabeledList,{children:m.map(function(c){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:c.registered_name?c.registered_name+", "+c.assignment:"Slot "+c.id,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{content:"Clear",onClick:function(){function v(){return u("clear_slot",{slot:c.id})}return v}()}),(0,e.createComponentVNode)(2,o.Button,{content:"Save",onClick:function(){function v(){return u("save_slot",{slot:c.id})}return v}()}),(0,e.createComponentVNode)(2,o.Button,{content:"Load",disabled:!c.registered_name,onClick:function(){function v(){return u("load_slot",{slot:c.id})}return v}()})],4)},c.id)})})})}return p}()},56793:function(I,r,n){"use strict";r.__esModule=!0,r.AiAirlock=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d={2:{color:"good",localStatusText:"Offline"},1:{color:"average",localStatusText:"Caution"},0:{color:"bad",localStatusText:"Optimal"}},y=r.AiAirlock=function(){function V(k,S){var p=(0,a.useBackend)(S),i=p.act,l=p.data,f=d[l.power.main]||d[0],u=d[l.power.backup]||d[0],s=d[l.shock]||d[0];return(0,e.createComponentVNode)(2,o.Window,{width:500,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Power Status",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Main",color:f.color,buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,icon:"lightbulb-o",disabled:!l.power.main,content:"Disrupt",onClick:function(){function m(){return i("disrupt-main")}return m}()}),children:[l.power.main?"Online":"Offline"," ",!l.wires.main_power&&"[Wires have been cut!]"||l.power.main_timeleft>0&&"["+l.power.main_timeleft+"s]"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Backup",color:u.color,buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,icon:"lightbulb-o",disabled:!l.power.backup,content:"Disrupt",onClick:function(){function m(){return i("disrupt-backup")}return m}()}),children:[l.power.backup?"Online":"Offline"," ",!l.wires.backup_power&&"[Wires have been cut!]"||l.power.backup_timeleft>0&&"["+l.power.backup_timeleft+"s]"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Electrify",color:s.color,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{mr:.5,icon:"wrench",disabled:!(l.wires.shock&&l.shock!==2),content:"Restore",onClick:function(){function m(){return i("shock-restore")}return m}()}),(0,e.createComponentVNode)(2,t.Button,{mr:.5,icon:"bolt",disabled:!l.wires.shock,content:"Temporary",onClick:function(){function m(){return i("shock-temp")}return m}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"bolt",disabled:!l.wires.shock||l.shock===0,content:"Permanent",onClick:function(){function m(){return i("shock-perm")}return m}()})],4),children:[l.shock===2?"Safe":"Electrified"," ",!l.wires.shock&&"[Wires have been cut!]"||l.shock_timeleft>0&&"["+l.shock_timeleft+"s]"||l.shock_timeleft===-1&&"[Permanent]"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Access and Door Control",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Scan",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:l.id_scanner?"power-off":"times",content:l.id_scanner?"Enabled":"Disabled",selected:l.id_scanner,disabled:!l.wires.id_scanner,onClick:function(){function m(){return i("idscan-toggle")}return m}()}),children:!l.wires.id_scanner&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Access",buttons:(0,e.createComponentVNode)(2,t.Button,{width:6.5,icon:l.emergency?"power-off":"times",content:l.emergency?"Enabled":"Disabled",selected:l.emergency,onClick:function(){function m(){return i("emergency-toggle")}return m}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Bolts",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,icon:l.locked?"lock":"unlock",content:l.locked?"Lowered":"Raised",selected:l.locked,disabled:!l.wires.bolts,onClick:function(){function m(){return i("bolt-toggle")}return m}()}),children:!l.wires.bolts&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Bolt Lights",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:l.lights?"power-off":"times",content:l.lights?"Enabled":"Disabled",selected:l.lights,disabled:!l.wires.lights,onClick:function(){function m(){return i("light-toggle")}return m}()}),children:!l.wires.lights&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Force Sensors",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:l.safe?"power-off":"times",content:l.safe?"Enabled":"Disabled",selected:l.safe,disabled:!l.wires.safe,onClick:function(){function m(){return i("safe-toggle")}return m}()}),children:!l.wires.safe&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Timing Safety",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:l.speed?"power-off":"times",content:l.speed?"Enabled":"Disabled",selected:l.speed,disabled:!l.wires.timing,onClick:function(){function m(){return i("speed-toggle")}return m}()}),children:!l.wires.timing&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Control",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:l.opened?"sign-out-alt":"sign-in-alt",content:l.opened?"Open":"Closed",selected:l.opened,disabled:l.locked||l.welded,onClick:function(){function m(){return i("open-close")}return m}()}),children:!!(l.locked||l.welded)&&(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)("[Door is "),l.locked?"bolted":"",l.locked&&l.welded?" and ":"",l.welded?"welded":"",(0,e.createTextVNode)("!]")],0)})]})})]})})}return V}()},72475:function(I,r,n){"use strict";r.__esModule=!0,r.AirAlarm=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=n(195),y=r.AirAlarm=function(){function s(m,c){var v=(0,a.useBackend)(c),b=v.act,g=v.data,h=g.locked;return(0,e.createComponentVNode)(2,o.Window,{width:570,height:h?310:755,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,d.InterfaceLockNoticeBox),(0,e.createComponentVNode)(2,k),!h&&(0,e.createFragment)([(0,e.createComponentVNode)(2,S),(0,e.createComponentVNode)(2,p)],4)]})})}return s}(),V=function(m){return m===0?"green":m===1?"orange":"red"},k=function(m,c){var v=(0,a.useBackend)(c),b=v.act,g=v.data,h=g.air,C=g.mode,N=g.atmos_alarm,x=g.locked,B=g.alarmActivated,L=g.rcon,w=g.target_temp,A;return h.danger.overall===0?N===0?A="Optimal":A="Caution: Atmos alert in area":h.danger.overall===1?A="Caution":A="DANGER: Internals Required",(0,e.createComponentVNode)(2,t.Section,{title:"Air Status",children:h?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure",children:(0,e.createComponentVNode)(2,t.Box,{color:V(h.danger.pressure),children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:h.pressure})," kPa",!x&&(0,e.createFragment)([(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,t.Button,{content:C===3?"Deactivate Panic Siphon":"Activate Panic Siphon",selected:C===3,icon:"exclamation-triangle",onClick:function(){function T(){return b("mode",{mode:C===3?1:3})}return T}()})],4)]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Oxygen",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:h.contents.oxygen/100,fractionDigits:"1",color:V(h.danger.oxygen)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nitrogen",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:h.contents.nitrogen/100,fractionDigits:"1",color:V(h.danger.nitrogen)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Carbon Dioxide",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:h.contents.co2/100,fractionDigits:"1",color:V(h.danger.co2)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Toxins",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:h.contents.plasma/100,fractionDigits:"1",color:V(h.danger.plasma)})}),h.contents.n2o>.1&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nitrous Oxide",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:h.contents.n2o/100,fractionDigits:"1",color:V(h.danger.n2o)})}),h.contents.other>.1&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Other",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:h.contents.other/100,fractionDigits:"1",color:V(h.danger.other)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,t.Box,{color:V(h.danger.temperature),children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:h.temperature})," K /"," ",(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:h.temperature_c})," C\xA0",(0,e.createComponentVNode)(2,t.Button,{icon:"thermometer-full",content:w+" C",onClick:function(){function T(){return b("temperature")}return T}()}),(0,e.createComponentVNode)(2,t.Button,{content:h.thermostat_state?"On":"Off",selected:h.thermostat_state,icon:"power-off",onClick:function(){function T(){return b("thermostat_state")}return T}()})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Local Status",children:(0,e.createComponentVNode)(2,t.Box,{color:V(h.danger.overall),children:[A,!x&&(0,e.createFragment)([(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,t.Button,{content:B?"Reset Alarm":"Activate Alarm",selected:B,onClick:function(){function T(){return b(B?"atmos_reset":"atmos_alarm")}return T}()})],4)]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Remote Control Settings",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Off",selected:L===1,onClick:function(){function T(){return b("set_rcon",{rcon:1})}return T}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Auto",selected:L===2,onClick:function(){function T(){return b("set_rcon",{rcon:2})}return T}()}),(0,e.createComponentVNode)(2,t.Button,{content:"On",selected:L===3,onClick:function(){function T(){return b("set_rcon",{rcon:3})}return T}()})]})]}):(0,e.createComponentVNode)(2,t.Box,{children:"Unable to acquire air sample!"})})},S=function(m,c){var v=(0,a.useLocalState)(c,"tabIndex",0),b=v[0],g=v[1];return(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:b===0,onClick:function(){function h(){return g(0)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"sign-out-alt"})," Vent Control"]},"Vents"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:b===1,onClick:function(){function h(){return g(1)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"sign-in-alt"})," Scrubber Control"]},"Scrubbers"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:b===2,onClick:function(){function h(){return g(2)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"cog"})," Mode"]},"Mode"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:b===3,onClick:function(){function h(){return g(3)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"tachometer-alt"})," Thresholds"]},"Thresholds")]})},p=function(m,c){var v=(0,a.useLocalState)(c,"tabIndex",0),b=v[0],g=v[1];switch(b){case 0:return(0,e.createComponentVNode)(2,i);case 1:return(0,e.createComponentVNode)(2,l);case 2:return(0,e.createComponentVNode)(2,f);case 3:return(0,e.createComponentVNode)(2,u);default:return"WE SHOULDN'T BE HERE!"}},i=function(m,c){var v=(0,a.useBackend)(c),b=v.act,g=v.data,h=g.vents;return h.map(function(C){return(0,e.createComponentVNode)(2,t.Section,{title:C.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:[(0,e.createComponentVNode)(2,t.Button,{content:C.power?"On":"Off",selected:C.power,icon:"power-off",onClick:function(){function N(){return b("command",{cmd:"power",val:C.power===1?0:1,id_tag:C.id_tag})}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:C.direction==="release"?"Blowing":"Siphoning",icon:C.direction==="release"?"sign-out-alt":"sign-in-alt",onClick:function(){function N(){return b("command",{cmd:"direction",val:C.direction==="release"?0:1,id_tag:C.id_tag})}return N}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure Checks",children:[(0,e.createComponentVNode)(2,t.Button,{content:"External",selected:C.checks===1,onClick:function(){function N(){return b("command",{cmd:"checks",val:1,id_tag:C.id_tag})}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Internal",selected:C.checks===2,onClick:function(){function N(){return b("command",{cmd:"checks",val:2,id_tag:C.id_tag})}return N}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"External Pressure Target",children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:C.external})," kPa\xA0",(0,e.createComponentVNode)(2,t.Button,{content:"Set",icon:"cog",onClick:function(){function N(){return b("command",{cmd:"set_external_pressure",id_tag:C.id_tag})}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Reset",icon:"redo-alt",onClick:function(){function N(){return b("command",{cmd:"set_external_pressure",val:101.325,id_tag:C.id_tag})}return N}()})]})]})},C.name)})},l=function(m,c){var v=(0,a.useBackend)(c),b=v.act,g=v.data,h=g.scrubbers;return h.map(function(C){return(0,e.createComponentVNode)(2,t.Section,{title:C.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:[(0,e.createComponentVNode)(2,t.Button,{content:C.power?"On":"Off",selected:C.power,icon:"power-off",onClick:function(){function N(){return b("command",{cmd:"power",val:C.power===1?0:1,id_tag:C.id_tag})}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:C.scrubbing?"Scrubbing":"Siphoning",icon:C.scrubbing?"filter":"sign-in-alt",onClick:function(){function N(){return b("command",{cmd:"scrubbing",val:C.scrubbing===0?1:0,id_tag:C.id_tag})}return N}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Range",children:(0,e.createComponentVNode)(2,t.Button,{content:C.widenet?"Extended":"Normal",selected:C.widenet,icon:"expand-arrows-alt",onClick:function(){function N(){return b("command",{cmd:"widenet",val:C.widenet===0?1:0,id_tag:C.id_tag})}return N}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Filtering",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Carbon Dioxide",selected:C.filter_co2,onClick:function(){function N(){return b("command",{cmd:"co2_scrub",val:C.filter_co2===0?1:0,id_tag:C.id_tag})}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Plasma",selected:C.filter_toxins,onClick:function(){function N(){return b("command",{cmd:"tox_scrub",val:C.filter_toxins===0?1:0,id_tag:C.id_tag})}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Nitrous Oxide",selected:C.filter_n2o,onClick:function(){function N(){return b("command",{cmd:"n2o_scrub",val:C.filter_n2o===0?1:0,id_tag:C.id_tag})}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Oxygen",selected:C.filter_o2,onClick:function(){function N(){return b("command",{cmd:"o2_scrub",val:C.filter_o2===0?1:0,id_tag:C.id_tag})}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Nitrogen",selected:C.filter_n2,onClick:function(){function N(){return b("command",{cmd:"n2_scrub",val:C.filter_n2===0?1:0,id_tag:C.id_tag})}return N}()})]})]})},C.name)})},f=function(m,c){var v=(0,a.useBackend)(c),b=v.act,g=v.data,h=g.modes,C=g.presets,N=g.emagged,x=g.mode,B=g.preset;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"System Mode",children:(0,e.createComponentVNode)(2,t.Table,{children:h.map(function(L){return(!L.emagonly||L.emagonly&&!!N)&&(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",width:1,children:(0,e.createComponentVNode)(2,t.Button,{content:L.name,icon:"cog",selected:L.id===x,onClick:function(){function w(){return b("mode",{mode:L.id})}return w}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:L.desc})]},L.name)})})}),(0,e.createComponentVNode)(2,t.Section,{title:"System Presets",children:[(0,e.createComponentVNode)(2,t.Box,{italic:!0,children:"After making a selection, the system will automatically cycle in order to remove contaminants."}),(0,e.createComponentVNode)(2,t.Table,{mt:1,children:C.map(function(L){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",width:1,children:(0,e.createComponentVNode)(2,t.Button,{content:L.name,icon:"cog",selected:L.id===B,onClick:function(){function w(){return b("preset",{preset:L.id})}return w}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:L.desc})]},L.name)})})]})],4)},u=function(m,c){var v=(0,a.useBackend)(c),b=v.act,g=v.data,h=g.thresholds;return(0,e.createComponentVNode)(2,t.Section,{title:"Alarm Thresholds",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"20%",children:"Value"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"red",width:"20%",children:"Danger Min"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"orange",width:"20%",children:"Warning Min"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"orange",width:"20%",children:"Warning Max"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"red",width:"20%",children:"Danger Max"})]}),h.map(function(C){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:C.name}),C.settings.map(function(N){return(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:N.selected===-1?"Off":N.selected,onClick:function(){function x(){return b("command",{cmd:"set_threshold",env:N.env,var:N.val})}return x}()})},N.val)})]},C.name)})]})})}},12333:function(I,r,n){"use strict";r.__esModule=!0,r.AirlockAccessController=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.AirlockAccessController=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.exterior_status,f=i.interior_status,u=i.processing,s,m;return l==="open"?s=(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Lock Exterior Door",icon:"exclamation-triangle",disabled:u,onClick:function(){function c(){return p("force_ext")}return c}()}):s=(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:u,onClick:function(){function c(){return p("cycle_ext_door")}return c}()}),f==="open"?m=(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Lock Interior Door",icon:"exclamation-triangle",disabled:u,color:f==="open"?"red":u?"yellow":null,onClick:function(){function c(){return p("force_int")}return c}()}):m=(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Cycle to Interior",icon:"arrow-circle-right",disabled:u,onClick:function(){function c(){return p("cycle_int_door")}return c}()}),(0,e.createComponentVNode)(2,o.Window,{width:330,height:200,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Information",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"External Door Status",children:l==="closed"?"Locked":"Open"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Internal Door Status",children:f==="closed"?"Locked":"Open"})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Actions",children:(0,e.createComponentVNode)(2,t.Box,{children:[s,m]})})]})})}return y}()},28736:function(I,r,n){"use strict";r.__esModule=!0,r.AirlockElectronics=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=n(49148),y=1,V=2,k=4,S=8,p=r.AirlockElectronics=function(){function f(u,s){return(0,e.createComponentVNode)(2,o.Window,{width:450,height:565,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,i),(0,e.createComponentVNode)(2,l)]})})})}return f}(),i=function(u,s){var m=(0,a.useBackend)(s),c=m.act,v=m.data,b=v.unrestricted_dir;return(0,e.createComponentVNode)(2,t.Section,{title:"Access Control",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,mb:1,children:"Unrestricted Access From:"}),(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-left",content:"East",selected:b&k?"selected":null,onClick:function(){function g(){return c("unrestricted_access",{unres_dir:k})}return g}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-up",content:"South",selected:b&V?"selected":null,onClick:function(){function g(){return c("unrestricted_access",{unres_dir:V})}return g}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-right",content:"West",selected:b&S?"selected":null,onClick:function(){function g(){return c("unrestricted_access",{unres_dir:S})}return g}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-down",content:"North",selected:b&y?"selected":null,onClick:function(){function g(){return c("unrestricted_access",{unres_dir:y})}return g}()})})]})]})})},l=function(u,s){var m=(0,a.useBackend)(s),c=m.act,v=m.data,b=v.selected_accesses,g=v.one_access,h=v.regions;return(0,e.createComponentVNode)(2,d.AccessList,{usedByRcd:1,rcdButtons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:g,content:"One",onClick:function(){function C(){return c("set_one_access",{access:"one"})}return C}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!g,content:"All",onClick:function(){function C(){return c("set_one_access",{access:"all"})}return C}()})],4),accesses:h,selectedList:b,accessMod:function(){function C(N){return c("set",{access:N})}return C}(),grantAll:function(){function C(){return c("grant_all")}return C}(),denyAll:function(){function C(){return c("clear_all")}return C}(),grantDep:function(){function C(N){return c("grant_region",{region:N})}return C}(),denyDep:function(){function C(N){return c("deny_region",{region:N})}return C}()})}},47365:function(I,r,n){"use strict";r.__esModule=!0,r.AlertModal=void 0;var e=n(89005),a=n(51057),t=n(72253),o=n(92986),d=n(36036),y=n(98595),V=-1,k=1,S=r.AlertModal=function(){function l(f,u){var s=(0,t.useBackend)(u),m=s.act,c=s.data,v=c.autofocus,b=c.buttons,g=b===void 0?[]:b,h=c.large_buttons,C=c.message,N=C===void 0?"":C,x=c.timeout,B=c.title,L=(0,t.useLocalState)(u,"selected",0),w=L[0],A=L[1],T=110+(N.length>30?Math.ceil(N.length/4):0)+(N.length&&h?5:0),E=325+(g.length>2?100:0),O=function(){function P(R){w===0&&R===V?A(g.length-1):w===g.length-1&&R===k?A(0):A(w+R)}return P}();return(0,e.createComponentVNode)(2,y.Window,{title:B,height:T,width:E,children:[!!x&&(0,e.createComponentVNode)(2,a.Loader,{value:x}),(0,e.createComponentVNode)(2,y.Window.Content,{onKeyDown:function(){function P(R){var F=window.event?R.which:R.keyCode;F===o.KEY_SPACE||F===o.KEY_ENTER?m("choose",{choice:g[w]}):F===o.KEY_ESCAPE?m("cancel"):F===o.KEY_LEFT?(R.preventDefault(),O(V)):(F===o.KEY_TAB||F===o.KEY_RIGHT)&&(R.preventDefault(),O(k))}return P}(),children:(0,e.createComponentVNode)(2,d.Section,{fill:!0,children:(0,e.createComponentVNode)(2,d.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,d.Stack.Item,{grow:!0,m:1,children:(0,e.createComponentVNode)(2,d.Box,{color:"label",overflow:"hidden",children:N})}),(0,e.createComponentVNode)(2,d.Stack.Item,{children:[!!v&&(0,e.createComponentVNode)(2,d.Autofocus),(0,e.createComponentVNode)(2,p,{selected:w})]})]})})})]})}return l}(),p=function(f,u){var s=(0,t.useBackend)(u),m=s.data,c=m.buttons,v=c===void 0?[]:c,b=m.large_buttons,g=m.swapped_buttons,h=f.selected;return(0,e.createComponentVNode)(2,d.Flex,{fill:!0,align:"center",direction:g?"row":"row-reverse",justify:"space-around",wrap:!0,children:v==null?void 0:v.map(function(C,N){return b&&v.length<3?(0,e.createComponentVNode)(2,d.Flex.Item,{grow:!0,children:(0,e.createComponentVNode)(2,i,{button:C,id:N.toString(),selected:h===N})},N):(0,e.createComponentVNode)(2,d.Flex.Item,{grow:b?1:0,children:(0,e.createComponentVNode)(2,i,{button:C,id:N.toString(),selected:h===N})},N)})})},i=function(f,u){var s=(0,t.useBackend)(u),m=s.act,c=s.data,v=c.large_buttons,b=f.button,g=f.selected,h=b.length>7?"100%":7;return(0,e.createComponentVNode)(2,d.Button,{mx:v?1:0,pt:v?.33:0,content:b,fluid:!!v,onClick:function(){function C(){return m("choose",{choice:b})}return C}(),selected:g,textAlign:"center",height:!!v&&2,width:!v&&h})}},71824:function(I,r,n){"use strict";r.__esModule=!0,r.AppearanceChanger=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.AppearanceChanger=function(){function V(k,S){var p=(0,a.useBackend)(S),i=p.act,l=p.data,f=l.change_race,u=l.species,s=l.specimen,m=l.change_gender,c=l.gender,v=l.has_gender,b=l.change_eye_color,g=l.change_skin_tone,h=l.change_skin_color,C=l.change_head_accessory_color,N=l.change_hair_color,x=l.change_secondary_hair_color,B=l.change_facial_hair_color,L=l.change_secondary_facial_hair_color,w=l.change_head_marking_color,A=l.change_body_marking_color,T=l.change_tail_marking_color,E=l.change_head_accessory,O=l.head_accessory_styles,P=l.head_accessory_style,R=l.change_hair,F=l.hair_styles,j=l.hair_style,W=l.change_hair_gradient,z=l.change_facial_hair,H=l.facial_hair_styles,$=l.facial_hair_style,G=l.change_head_markings,ne=l.head_marking_styles,Q=l.head_marking_style,he=l.change_body_markings,Ve=l.body_marking_styles,Ne=l.body_marking_style,Be=l.change_tail_markings,Le=l.tail_marking_styles,Ae=l.tail_marking_style,fe=l.change_body_accessory,Z=l.body_accessory_styles,J=l.body_accessory_style,te=l.change_alt_head,ee=l.alt_head_styles,le=l.alt_head_style,ye=!1;return(b||g||h||C||N||x||B||L||w||A||T)&&(ye=!0),(0,e.createComponentVNode)(2,o.Window,{width:800,height:450,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[!!f&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Species",children:u.map(function(me){return(0,e.createComponentVNode)(2,t.Button,{content:me.specimen,selected:me.specimen===s,onClick:function(){function Te(){return i("race",{race:me.specimen})}return Te}()},me.specimen)})}),!!m&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gender",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Male",selected:c==="male",onClick:function(){function me(){return i("gender",{gender:"male"})}return me}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Female",selected:c==="female",onClick:function(){function me(){return i("gender",{gender:"female"})}return me}()}),!v&&(0,e.createComponentVNode)(2,t.Button,{content:"Genderless",selected:c==="plural",onClick:function(){function me(){return i("gender",{gender:"plural"})}return me}()})]}),!!ye&&(0,e.createComponentVNode)(2,y),!!E&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Head accessory",children:O.map(function(me){return(0,e.createComponentVNode)(2,t.Button,{content:me.headaccessorystyle,selected:me.headaccessorystyle===P,onClick:function(){function Te(){return i("head_accessory",{head_accessory:me.headaccessorystyle})}return Te}()},me.headaccessorystyle)})}),!!R&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hair",children:F.map(function(me){return(0,e.createComponentVNode)(2,t.Button,{content:me.hairstyle,selected:me.hairstyle===j,onClick:function(){function Te(){return i("hair",{hair:me.hairstyle})}return Te}()},me.hairstyle)})}),!!W&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hair Gradient",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Change Style",onClick:function(){function me(){return i("hair_gradient")}return me}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Offset",onClick:function(){function me(){return i("hair_gradient_offset")}return me}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Color",onClick:function(){function me(){return i("hair_gradient_colour")}return me}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Alpha",onClick:function(){function me(){return i("hair_gradient_alpha")}return me}()})]}),!!z&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Facial hair",children:H.map(function(me){return(0,e.createComponentVNode)(2,t.Button,{content:me.facialhairstyle,selected:me.facialhairstyle===$,onClick:function(){function Te(){return i("facial_hair",{facial_hair:me.facialhairstyle})}return Te}()},me.facialhairstyle)})}),!!G&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Head markings",children:ne.map(function(me){return(0,e.createComponentVNode)(2,t.Button,{content:me.headmarkingstyle,selected:me.headmarkingstyle===Q,onClick:function(){function Te(){return i("head_marking",{head_marking:me.headmarkingstyle})}return Te}()},me.headmarkingstyle)})}),!!he&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Body markings",children:Ve.map(function(me){return(0,e.createComponentVNode)(2,t.Button,{content:me.bodymarkingstyle,selected:me.bodymarkingstyle===Ne,onClick:function(){function Te(){return i("body_marking",{body_marking:me.bodymarkingstyle})}return Te}()},me.bodymarkingstyle)})}),!!Be&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tail markings",children:Le.map(function(me){return(0,e.createComponentVNode)(2,t.Button,{content:me.tailmarkingstyle,selected:me.tailmarkingstyle===Ae,onClick:function(){function Te(){return i("tail_marking",{tail_marking:me.tailmarkingstyle})}return Te}()},me.tailmarkingstyle)})}),!!fe&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Body accessory",children:Z.map(function(me){return(0,e.createComponentVNode)(2,t.Button,{content:me.bodyaccessorystyle,selected:me.bodyaccessorystyle===J,onClick:function(){function Te(){return i("body_accessory",{body_accessory:me.bodyaccessorystyle})}return Te}()},me.bodyaccessorystyle)})}),!!te&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Alternate head",children:ee.map(function(me){return(0,e.createComponentVNode)(2,t.Button,{content:me.altheadstyle,selected:me.altheadstyle===le,onClick:function(){function Te(){return i("alt_head",{alt_head:me.altheadstyle})}return Te}()},me.altheadstyle)})})]})})})}return V}(),y=function(k,S){var p=(0,a.useBackend)(S),i=p.act,l=p.data,f=[{key:"change_eye_color",text:"Change eye color",action:"eye_color"},{key:"change_skin_tone",text:"Change skin tone",action:"skin_tone"},{key:"change_skin_color",text:"Change skin color",action:"skin_color"},{key:"change_head_accessory_color",text:"Change head accessory color",action:"head_accessory_color"},{key:"change_hair_color",text:"Change hair color",action:"hair_color"},{key:"change_secondary_hair_color",text:"Change secondary hair color",action:"secondary_hair_color"},{key:"change_facial_hair_color",text:"Change facial hair color",action:"facial_hair_color"},{key:"change_secondary_facial_hair_color",text:"Change secondary facial hair color",action:"secondary_facial_hair_color"},{key:"change_head_marking_color",text:"Change head marking color",action:"head_marking_color"},{key:"change_body_marking_color",text:"Change body marking color",action:"body_marking_color"},{key:"change_tail_marking_color",text:"Change tail marking color",action:"tail_marking_color"}];return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Colors",children:f.map(function(u){return!!l[u.key]&&(0,e.createComponentVNode)(2,t.Button,{content:u.text,onClick:function(){function s(){return i(u.action)}return s}()},u.key)})})}},72285:function(I,r,n){"use strict";r.__esModule=!0,r.AtmosAlertConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.AtmosAlertConsole=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.priority||[],f=i.minor||[];return(0,e.createComponentVNode)(2,o.Window,{width:350,height:300,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Alarms",children:(0,e.createVNode)(1,"ul",null,[l.length===0&&(0,e.createVNode)(1,"li","color-good","No Priority Alerts",16),l.map(function(u){return(0,e.createVNode)(1,"li",null,(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:u,color:"bad",onClick:function(){function s(){return p("clear",{zone:u})}return s}()}),2,null,u)}),f.length===0&&(0,e.createVNode)(1,"li","color-good","No Minor Alerts",16),f.map(function(u){return(0,e.createVNode)(1,"li",null,(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:u,color:"average",onClick:function(){function s(){return p("clear",{zone:u})}return s}()}),2,null,u)})],0)})})})}return y}()},65805:function(I,r,n){"use strict";r.__esModule=!0,r.AtmosControl=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(36352),d=n(98595),y=function(l){if(l===0)return(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Good"});if(l===1)return(0,e.createComponentVNode)(2,t.Box,{color:"orange",bold:!0,children:"Warning"});if(l===2)return(0,e.createComponentVNode)(2,t.Box,{color:"red",bold:!0,children:"DANGER"})},V=function(l){if(l===0)return"green";if(l===1)return"orange";if(l===2)return"red"},k=r.AtmosControl=function(){function i(l,f){var u=(0,a.useBackend)(f),s=u.act,m=u.data,c=(0,a.useLocalState)(f,"tabIndex",0),v=c[0],b=c[1],g=function(){function h(C){switch(C){case 0:return(0,e.createComponentVNode)(2,S);case 1:return(0,e.createComponentVNode)(2,p);default:return"WE SHOULDN'T BE HERE!"}}return h}();return(0,e.createComponentVNode)(2,d.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,d.Window.Content,{scrollable:v===0,children:(0,e.createComponentVNode)(2,t.Box,{fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:v===0,onClick:function(){function h(){return b(0)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"table"})," Data View"]},"DataView"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:v===1,onClick:function(){function h(){return b(1)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),g(v)]})})})}return i}(),S=function(l,f){var u=(0,a.useBackend)(f),s=u.act,m=u.data,c=m.alarms;return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Access"})]}),c.map(function(v){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,o.TableCell,{children:v.name}),(0,e.createComponentVNode)(2,o.TableCell,{children:y(v.danger)}),(0,e.createComponentVNode)(2,o.TableCell,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"cog",content:"Access",onClick:function(){function b(){return s("open_alarm",{aref:v.ref})}return b}()})})]},v.name)})]})})},p=function(l,f){var u=(0,a.useBackend)(f),s=u.act,m=u.data,c=m.alarms,v=m.stationLevelNum,b=m.stationLevelName,g=(0,a.useLocalState)(f,"zoom",1),h=g[0],C=g[1],N=(0,a.useLocalState)(f,"z_current",v[0]),x=N[0],B=N[1];return(0,e.createComponentVNode)(2,t.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,e.createComponentVNode)(2,t.NanoMap,{onZoom:function(){function L(w){return C(w)}return L}(),zLevels:v,zNames:b,z_current:x,setZCurrent:B,children:c.map(function(L){return(0,e.createComponentVNode)(2,t.NanoMap.Marker,{x:L.x,y:L.y,z:L.z,z_current:x,zoom:h,icon:"circle",tooltip:L.name,color:V(L.danger),onClick:function(){function w(){return s("open_alarm",{aref:L.ref})}return w}()},L.ref)})})})}},87816:function(I,r,n){"use strict";r.__esModule=!0,r.AtmosFilter=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.AtmosFilter=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.on,f=i.pressure,u=i.max_pressure,s=i.filter_type,m=i.filter_type_list;return(0,e.createComponentVNode)(2,o.Window,{width:380,height:140,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:l?"On":"Off",color:l?null:"red",selected:l,onClick:function(){function c(){return p("power")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:f===0,width:2.2,onClick:function(){function c(){return p("min_pressure")}return c}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:u,value:f,onDrag:function(){function c(v,b){return p("custom_pressure",{pressure:b})}return c}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:f===u,width:2.2,onClick:function(){function c(){return p("max_pressure")}return c}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Filter",children:m.map(function(c){return(0,e.createComponentVNode)(2,t.Button,{selected:c.gas_type===s,content:c.label,onClick:function(){function v(){return p("set_filter",{filter:c.gas_type})}return v}()},c.label)})})]})})})})}return y}()},52977:function(I,r,n){"use strict";r.__esModule=!0,r.AtmosMixer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.AtmosMixer=function(){function V(k,S){var p=(0,a.useBackend)(S),i=p.act,l=p.data,f=l.on,u=l.pressure,s=l.max_pressure,m=l.node1_concentration,c=l.node2_concentration;return(0,e.createComponentVNode)(2,o.Window,{width:330,height:165,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:f?"On":"Off",color:f?null:"red",selected:f,onClick:function(){function v(){return i("power")}return v}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:u===0,width:2.2,onClick:function(){function v(){return i("min_pressure")}return v}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:s,value:u,onDrag:function(){function v(b,g){return i("custom_pressure",{pressure:g})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:u===s,width:2.2,onClick:function(){function v(){return i("max_pressure")}return v}()})]}),(0,e.createComponentVNode)(2,y,{node_name:"Node 1",node_ref:m}),(0,e.createComponentVNode)(2,y,{node_name:"Node 2",node_ref:c})]})})})})}return V}(),y=function(k,S){var p=(0,a.useBackend)(S),i=p.act,l=p.data,f=k.node_name,u=k.node_ref;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:f,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",width:2.2,disabled:u===0,onClick:function(){function s(){return i("set_node",{node_name:f,concentration:(u-10)/100})}return s}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"%",width:6.1,lineHeight:1.5,stepPixelSize:10,minValue:0,maxValue:100,value:u,onChange:function(){function s(m,c){return i("set_node",{node_name:f,concentration:c/100})}return s}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",width:2.2,disabled:u===100,onClick:function(){function s(){return i("set_node",{node_name:f,concentration:(u+10)/100})}return s}()})]})}},11748:function(I,r,n){"use strict";r.__esModule=!0,r.AtmosPump=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.AtmosPump=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.on,f=i.rate,u=i.max_rate,s=i.gas_unit,m=i.step;return(0,e.createComponentVNode)(2,o.Window,{width:330,height:110,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:l?"On":"Off",color:l?null:"red",selected:l,onClick:function(){function c(){return p("power")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:f===0,width:2.2,onClick:function(){function c(){return p("min_rate")}return c}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:s,width:6.1,lineHeight:1.5,step:m,minValue:0,maxValue:u,value:f,onDrag:function(){function c(v,b){return p("custom_rate",{rate:b})}return c}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:f===u,width:2.2,onClick:function(){function c(){return p("max_rate")}return c}()})]})]})})})})}return y}()},76511:function(I,r,n){"use strict";r.__esModule=!0,r.AutoDoc=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=n(39473),y=r.AutoDoc=function(){function V(k,S){var p=(0,a.useBackend)(S),i=p.act,l=p.data,f=l.HasTray,u=l.TguiIcons,s=l.occupant,m=l.isHealing,c=l.fixtimer,v=l.healtimer,b=(0,a.useLocalState)(S,"ChoosePart","chest"),g=b[0],h=b[1];return(0,e.createComponentVNode)(2,o.Window,{theme:"ntOS95",resizable:!0,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Flex,{width:"100%",children:[(0,e.createComponentVNode)(2,d.FlexItem,{basis:"30%",children:[(0,e.createVNode)(1,"img",null,null,1,{height:"256px",width:"256px",src:"data:image/jpeg;base64,"+u.human,style:{position:"absolute","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}}),(0,e.createVNode)(1,"img",null,null,1,{height:"256px",width:"256px",src:"data:image/jpeg;base64,"+u[g],style:{position:"absolute","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}})]}),(0,e.createComponentVNode)(2,d.FlexItem,{basis:"70%",children:(0,e.createComponentVNode)(2,t.Section,{title:"Info",buttons:(0,e.createFragment)([Object.keys(u).map(function(C){return C!=="human"&&(0,e.createComponentVNode)(2,t.Button,{content:C,selected:C===g,onClick:function(){function N(){return h(C)}return N}(),z:!0},C)}),(0,e.createComponentVNode)(2,t.Button,{style:{"margin-left":"30px"},content:f?"Eject Tray":"Reject Tray",locked:m,onClick:function(){function C(){return i("ChangeTrayState")}return C}()})],0),children:(0,e.createComponentVNode)(2,t.Box,{children:[!!(s[g]&&s[g].extOrgan)&&s[g].extOrgan.map(function(C){return(0,e.createFragment)([(0,e.createVNode)(1,"b",null,C.name,0),(0,e.createVNode)(1,"br"),C.open?"opened":"",C.broken?"broken":"",!!C.broken&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Fix",style:{"margin-left":"30px"},locked:m,onClick:function(){function N(){return i("FixOrgan",{organ:C.name,type:"fracture"})}return N}()}),(0,e.createVNode)(1,"br")],4),C.internalBleeding?"bleeding":"",!!C.internalBleeding&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Fix",style:{"margin-left":"30px"},locked:m,onClick:function(){function N(){return i("FixOrgan",{organ:C.name,type:"bleeding"})}return N}()}),(0,e.createVNode)(1,"br")],4),(0,e.createTextVNode)("Internals:"),(0,e.createComponentVNode)(2,t.Button,{content:"Complete",style:{"margin-left":"10px"},locked:m,onClick:function(){function N(){return i("FixOrgan",{organ:C.name,type:"completeInternal"})}return N}()}),(0,e.createVNode)(1,"br"),C.dead?"dead":"",!!C.dead&&(0,e.createVNode)(1,"br"),C.germ_level?"Germ level is "+C.germ_level:"",!!C.germ_level&&(0,e.createVNode)(1,"br"),C.totalLoss?"Total damage is "+C.totalLoss:"",(0,e.createVNode)(1,"br")],0,C.name)}),!!(s[g]&&s[g].intOrgan)&&s[g].intOrgan.map(function(C){return(0,e.createFragment)([(0,e.createVNode)(1,"b",null,C.name,0),(0,e.createComponentVNode)(2,t.Button,{content:"Remove",style:{"margin-left":"1.5rem"},locked:m,onClick:function(){function N(){return i("FixOrgan",{organ:C.name,type:"remove"})}return N}()}),(0,e.createVNode)(1,"br"),C.dead?"dead":"",!!C.dead&&(0,e.createVNode)(1,"br"),C.germ_level?"Germ level is "+C.germ_level:"",!!C.germ_level&&(0,e.createVNode)(1,"br"),C.totalLoss?"Total damage is "+C.damage:"",!!C.totalLoss&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Heal",style:{"margin-left":"30px"},locked:m,onClick:function(){function N(){return i("FixOrgan",{organ:C.name,type:"damage"})}return N}()}),(0,e.createVNode)(1,"br")],4)],0,C.name)}),!!s.TotalBruteBurn&&(0,e.createFragment)([(0,e.createTextVNode)("Total external damage is "),s.TotalBruteBurn,(0,e.createComponentVNode)(2,t.Button,{style:{"margin-left":"30px"},content:"Start Healing",onClick:function(){function C(){return i("HealBruteBurn")}return C}()}),(0,e.createComponentVNode)(2,t.Button,{style:{"margin-left":"30px"},content:"Reattach externals",onClick:function(){function C(){return i("CompleteExternal")}return C}()})],0),(0,e.createVNode)(1,"br"),!!c&&(0,e.createVNode)(1,"b",null,[(0,e.createTextVNode)("Fixing organ: "),c],0),!!v&&(0,e.createVNode)(1,"b",null,[(0,e.createTextVNode)("Healing external damage: "),v],0)]})})})]})})})}return V}()},59179:function(I,r,n){"use strict";r.__esModule=!0,r.Autolathe=void 0;var e=n(89005),a=n(64795),t=n(88510),o=n(72253),d=n(36036),y=n(98595),V=n(25328),k=function(i,l,f,u){return i.requirements===null?!0:!(i.requirements.metal*u>l||i.requirements.glass*u>f)},S=r.Autolathe=function(){function p(i,l){var f=(0,o.useBackend)(l),u=f.act,s=f.data,m=s.total_amount,c=s.max_amount,v=s.metal_amount,b=s.glass_amount,g=s.busyname,h=s.busyamt,C=s.showhacked,N=s.buildQueue,x=s.buildQueueLen,B=s.recipes,L=s.categories,w=(0,o.useSharedState)(l,"category",0),A=w[0],T=w[1];A===0&&(A="Tools");var E=v.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),O=b.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),P=m.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),R=(0,o.useSharedState)(l,"search_text",""),F=R[0],j=R[1],W=(0,V.createSearch)(F,function(G){return G.name}),z="";x>0&&(z=N.map(function(G,ne){return(0,e.createComponentVNode)(2,d.Box,{children:(0,e.createComponentVNode)(2,d.Button,{fluid:!0,icon:"times",color:"transparent",content:N[ne][0],onClick:function(){function Q(){return u("remove_from_queue",{remove_from_queue:N.indexOf(G)+1})}return Q}()},G)},ne)}));var H=(0,a.flow)([(0,t.filter)(function(G){return(G.category.indexOf(A)>-1||F)&&(s.showhacked||!G.hacked)}),F&&(0,t.filter)(W),(0,t.sortBy)(function(G){return G.name.toLowerCase()})])(B),$="Build";return F?$="Results for: '"+F+"':":A&&($="Build ("+A+")"),(0,e.createComponentVNode)(2,y.Window,{width:750,height:525,children:(0,e.createComponentVNode)(2,y.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,d.Stack,{fill:!0,horizontal:!0,children:[(0,e.createComponentVNode)(2,d.Stack.Item,{width:"70%",children:(0,e.createComponentVNode)(2,d.Section,{fill:!0,scrollable:!0,title:$,buttons:(0,e.createComponentVNode)(2,d.Dropdown,{width:"150px",options:L,selected:A,onSelected:function(){function G(ne){return T(ne)}return G}()}),children:[(0,e.createComponentVNode)(2,d.Input,{fluid:!0,placeholder:"Search for...",onInput:function(){function G(ne,Q){return j(Q)}return G}(),mb:1}),H.map(function(G){return(0,e.createComponentVNode)(2,d.Stack.Item,{grow:!0,children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+G.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),(0,e.createComponentVNode)(2,d.Button,{mr:1,icon:"hammer",selected:s.busyname===G.name&&s.busyamt===1,disabled:!k(G,s.metal_amount,s.glass_amount,1),onClick:function(){function ne(){return u("make",{make:G.uid,multiplier:1})}return ne}(),children:(0,V.toTitleCase)(G.name)}),G.max_multiplier>=10&&(0,e.createComponentVNode)(2,d.Button,{mr:1,icon:"hammer",selected:s.busyname===G.name&&s.busyamt===10,disabled:!k(G,s.metal_amount,s.glass_amount,10),onClick:function(){function ne(){return u("make",{make:G.uid,multiplier:10})}return ne}(),children:"10x"}),G.max_multiplier>=25&&(0,e.createComponentVNode)(2,d.Button,{mr:1,icon:"hammer",selected:s.busyname===G.name&&s.busyamt===25,disabled:!k(G,s.metal_amount,s.glass_amount,25),onClick:function(){function ne(){return u("make",{make:G.uid,multiplier:25})}return ne}(),children:"25x"}),G.max_multiplier>25&&(0,e.createComponentVNode)(2,d.Button,{mr:1,icon:"hammer",selected:s.busyname===G.name&&s.busyamt===G.max_multiplier,disabled:!k(G,s.metal_amount,s.glass_amount,G.max_multiplier),onClick:function(){function ne(){return u("make",{make:G.uid,multiplier:G.max_multiplier})}return ne}(),children:[G.max_multiplier,"x"]}),G.requirements&&Object.keys(G.requirements).map(function(ne){return(0,V.toTitleCase)(ne)+": "+G.requirements[ne]}).join(", ")||(0,e.createComponentVNode)(2,d.Box,{children:"No resources required."})]},G.ref)})]})}),(0,e.createComponentVNode)(2,d.Stack.Item,{width:"30%",children:[(0,e.createComponentVNode)(2,d.Section,{title:"Materials",children:(0,e.createComponentVNode)(2,d.LabeledList,{children:[(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Metal",children:E}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Glass",children:O}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Total",children:P}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Storage",children:[s.fill_percent,"% Full"]})]})}),(0,e.createComponentVNode)(2,d.Section,{title:"Building",children:(0,e.createComponentVNode)(2,d.Box,{color:g?"green":"",children:g||"Nothing"})}),(0,e.createComponentVNode)(2,d.Section,{title:"Build Queue",height:23.7,children:[z,(0,e.createComponentVNode)(2,d.Button,{mt:.5,fluid:!0,icon:"times",content:"Clear All",color:"red",disabled:!s.buildQueueLen,onClick:function(){function G(){return u("clear_queue")}return G}()})]})]})]})})})}return p}()},64273:function(I,r,n){"use strict";r.__esModule=!0,r.Biogenerator=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=n(62411),y=r.Biogenerator=function(){function p(i,l){var f=(0,a.useBackend)(l),u=f.data,s=f.config,m=u.container,c=u.processing,v=s.title;return(0,e.createComponentVNode)(2,o.Window,{width:390,height:595,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,d.Operating,{operating:c,name:v}),(0,e.createComponentVNode)(2,V),(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,S)]})})})}return p}(),V=function(i,l){var f=(0,a.useBackend)(l),u=f.act,s=f.data,m=s.biomass,c=s.container,v=s.container_curr_reagents,b=s.container_max_reagents;return(0,e.createComponentVNode)(2,t.Section,{title:"Storage",children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{mr:"20px",color:"silver",children:"Biomass:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{mr:"5px",children:m}),(0,e.createComponentVNode)(2,t.Icon,{name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,e.createComponentVNode)(2,t.Stack,{height:"21px",mt:"8px",align:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{mr:"10px",color:"silver",children:"Container:"}),c?(0,e.createComponentVNode)(2,t.ProgressBar,{value:v,maxValue:b,children:(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",children:v+" / "+b+" units"})}):(0,e.createComponentVNode)(2,t.Stack.Item,{children:"None"})]})]})},k=function(i,l){var f=(0,a.useBackend)(l),u=f.act,s=f.data,m=s.has_plants,c=s.container;return(0,e.createComponentVNode)(2,t.Section,{title:"Controls",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"power-off",disabled:!m,tooltip:m?"":"There are no plants in the biogenerator.",tooltipPosition:"top-start",content:"Activate",onClick:function(){function v(){return u("activate")}return v}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"40%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"flask",disabled:!c,tooltip:c?"":"The biogenerator does not have a container.",tooltipPosition:"top",content:"Detach Container",onClick:function(){function v(){return u("detach_container")}return v}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:!m,tooltip:m?"":"There are no stored plants to eject.",tooltipPosition:"top-end",content:"Eject Plants",onClick:function(){function v(){return u("eject_plants")}return v}()})})]})})},S=function(i,l){var f=(0,a.useBackend)(l),u=f.act,s=f.data,m=s.biomass,c=s.product_list,v=s.container,b=(0,a.useSharedState)(l,"vendAmount",1),g=b[0],h=b[1],C=Object.entries(c).map(function(N,x){var B=Object.entries(N[1]).map(function(L){return L[1]});return(0,e.createComponentVNode)(2,t.Collapsible,{title:N[0],open:!0,children:B.map(function(L){return(0,e.createComponentVNode)(2,t.Stack,{py:"2px",className:"candystripe",align:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",ml:"2px",children:L.name}),(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"right",width:"20%",children:[L.cost*g,(0,e.createComponentVNode)(2,t.Icon,{ml:"5px",name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"right",width:"40%",children:L.needs_container&&!v?(0,e.createComponentVNode)(2,t.Button,{content:"No container",disabled:!0,icon:"flask",tooltip:"\u0412\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u043B\u044E\u0431\u043E\u0439 \u043A\u043E\u043D\u0442\u0435\u0439\u043D\u0435\u0440 \u0434\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u044D\u0442\u043E\u0439 \u043E\u043F\u0446\u0438\u0438"}):(0,e.createComponentVNode)(2,t.Button,{content:"Vend",disabled:m0?Math.floor(A/u):0,P=f?"@?%%!\u2116@"+u:u,R=A>=u,F=s-s%5+(s%5>0?5:0);return(0,e.createComponentVNode)(2,t.Section,{title:"\u0418\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u0438\u0435 \u0420\u0430\u0437\u043B\u043E\u043C\u0430",children:[(0,e.createComponentVNode)(2,t.Box,{color:"silver",bold:!0,children:B}),(0,e.createComponentVNode)(2,t.ProgressBar,{color:E===0?"bad":E<100?"average":"good",value:w,maxValue:L,mt:1,mb:2,children:[E<=100?E:100," %"]}),(0,e.createComponentVNode)(2,t.Box,{children:["\u0414\u0430\u043D\u043D\u044B\u0435 \u0434\u043B\u044F \u0437\u043E\u043D\u0434\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F: ",(0,e.createComponentVNode)(2,t.Box,{color:A?R?"good":"average":"bad",as:"span",children:Math.floor(A)}),(0,e.createComponentVNode)(2,t.Button,{icon:"atom",tooltip:"\u0414\u043B\u044F \u0433\u0435\u043D\u0435\u0440\u0430\u0446\u0438\u0438 \u043E\u0434\u043D\u043E\u0433\u043E \u0437\u043E\u043D\u0434\u0438\u0440\u0443\u044E\u0449\u0435\u0433\u043E \u0438\u043C\u043F\u0443\u043B\u044C\u0441\u0430 \u043D\u0443\u0436\u043D\u043E \u0441\u043E\u0431\u0440\u0430\u0442\u044C "+P+" \u0434\u0430\u043D\u043D\u044B\u0445.",content:s>0?"\u041F\u043E\u0434\u0433\u043E\u0442\u043E\u0432\u043A\u0430 "+F+" \u0441\u0435\u043A\u0443\u043D\u0434":"\u0417\u043E\u043D\u0434\u0438\u0440\u043E\u0432\u0430\u0442\u044C ("+O+")",disabled:!R||s>0,onClick:function(){function j(){return i("probe",{rift_id:x})}return j}(),mx:2}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",content:T?"\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 \u043F\u043E\u043B\u0443\u0447\u0435\u043D":"\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 \u0438\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u0438\u0439",disabled:T||E<100,onClick:function(){function j(){return i("reward",{rift_id:x})}return j}(),mt:1.4})]})]})}return C}(),g=function(){function C(N){var x=N.servName,B=N.servData;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:x,children:B.length?B.map(function(L,w){return(0,e.createComponentVNode)(2,t.Box,{children:[L.riftName," \u2014 ",Math.floor(L.probePoints)," ","\u0434\u0430\u043D\u043D\u044B\u0445."]},w)}):(0,e.createComponentVNode)(2,t.Box,{children:"\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445"})})}return C}(),h=function(){function C(N){var x=N.scannerId,B=N.scannerName,L=N.scanStatus,w=N.canSwitch,A=N.switching,T=d[L],E=function(){function P(){if(T==="OFF")return[" ","silver"];if(T==="NO_RIFTS")return["\u041D\u0435\u0442 \u0440\u0430\u0437\u043B\u043E\u043C\u043E\u0432","silver"];if(T==="SOME_RIFTS")return["\u0421\u043A\u0430\u043D\u0438\u0440\u0443\u0435\u0442","good"];if(T==="DANGER")return["\u041E\u043F\u0430\u0441\u043D\u043E\u0441\u0442\u044C! \u0412\u044B\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u0441\u043A\u0430\u043D\u0435\u0440!","bad"]}return P}(),O=E();return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:B,py:0,children:[A?(0,e.createComponentVNode)(2,t.Icon,{name:"circle-notch",color:"silver",spin:!0,ml:1.85,mr:1.79,my:.84}):w?(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",color:T==="OFF"?"bad":"good",onClick:function(){function P(){return i("toggle_scanner",{scanner_id:x})}return P}(),ml:1,mr:1}):(0,e.createComponentVNode)(2,t.Icon,{name:"power-off",color:T==="OFF"?"bad":"good",ml:1.85,mr:1.79,my:.84}),T!=="OFF"&&(0,e.createComponentVNode)(2,t.Box,{as:"span",color:O[1],children:O[0]})]})}return C}();return(0,e.createComponentVNode)(2,o.Window,{width:570,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[m&&m.map(function(C){return b(C)}),(0,e.createComponentVNode)(2,t.Section,{title:"\u0421\u043A\u0430\u043D\u0435\u0440\u044B \u0432 \u0441\u0435\u0442\u0438",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:v&&v.map(function(C){return h(C)})})}),(0,e.createComponentVNode)(2,t.Section,{title:"\u0421\u0435\u0440\u0432\u0435\u0440\u044B \u0432 \u0441\u0435\u0442\u0438",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:c&&c.map(function(C){return g(C)})})})]})})}return V}()},27629:function(I,r,n){"use strict";r.__esModule=!0,r.BluespaceTap=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=n(49968),y=r.BluespaceTap=function(){function V(k,S){var p=(0,a.useBackend)(S),i=p.act,l=p.data,f=l.product||[],u=l.desiredLevel,s=l.inputLevel,m=l.points,c=l.totalPoints,v=l.powerUse,b=l.availablePower,g=l.maxLevel,h=l.emagged,C=l.safeLevels,N=l.nextLevelPower,x=u>s&&"bad"||"good";return(0,e.createComponentVNode)(2,o.Window,{width:650,height:450,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[!!h&&(0,e.createComponentVNode)(2,t.NoticeBox,{danger:1,children:"Safety Protocols disabled"}),s>C&&(0,e.createComponentVNode)(2,t.NoticeBox,{danger:1,children:"High Power, Instability likely"}),(0,e.createComponentVNode)(2,t.Collapsible,{title:"Input Management",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Input",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Input Level",children:s}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Desired Level",children:(0,e.createComponentVNode)(2,t.Stack,{inline:!0,width:"100%",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",disabled:u===0,tooltip:"Set to 0",onClick:function(){function B(){return i("set",{set_level:0})}return B}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"step-backward",tooltip:"Decrease to actual input level",disabled:u===0,onClick:function(){function B(){return i("set",{set_level:s})}return B}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:u===0,tooltip:"Decrease one step",onClick:function(){function B(){return i("decrease")}return B}()})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1,mx:1,children:(0,e.createComponentVNode)(2,t.Slider,{value:u,fillValue:s,minValue:0,color:x,maxValue:g,stepPixelSize:20,step:1,onChange:function(){function B(L,w){return i("set",{set_level:w})}return B}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:u===g,tooltip:"Increase one step",tooltipPosition:"left",onClick:function(){function B(){return i("increase")}return B}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:u===g,tooltip:"Set to max",tooltipPosition:"left",onClick:function(){function B(){return i("set",{set_level:g})}return B}()})]})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Power Use",children:(0,d.formatPower)(v)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power for next level",children:(0,d.formatPower)(N)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Surplus Power",children:(0,d.formatPower)(b)})]})})}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Output",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Available Points",children:m}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Points",children:c})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{align:"end",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:f.map(function(B){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:B.name,children:(0,e.createComponentVNode)(2,t.Button,{disabled:B.price>=m,onClick:function(){function L(){return i("vend",{target:B.key})}return L}(),content:B.price})},B.key)})})})})]})})]})})})}return V}()},33758:function(I,r,n){"use strict";r.__esModule=!0,r.BodyScanner=void 0;var e=n(89005),a=n(44879),t=n(25328),o=n(72253),d=n(36036),y=n(98595),V=[["good","Alive"],["average","Critical"],["bad","DEAD"]],k=[["hasBorer","bad","Large growth detected in frontal lobe, possibly cancerous. Surgical removal is recommended."],["hasVirus","bad","Viral pathogen detected in blood stream."],["blind","average","Cataracts detected."],["colourblind","average","Photoreceptor abnormalities detected."],["nearsighted","average","Retinal misalignment detected."]],S=[["Respiratory","oxyLoss"],["Brain","brainLoss"],["Toxin","toxLoss"],["Radioactive","radLoss"],["Brute","bruteLoss"],["Genetic","cloneLoss"],["Burn","fireLoss"],["Paralysis","paralysis"]],p={average:[.25,.5],bad:[.5,1/0]},i=function(x,B){for(var L=[],w=0;w0?x.filter(function(B){return!!B}).reduce(function(B,L){return(0,e.createFragment)([B,(0,e.createComponentVNode)(2,d.Box,{children:L},L)],0)},null):null},f=function(x){if(x>100){if(x<300)return"mild infection";if(x<400)return"mild infection+";if(x<500)return"mild infection++";if(x<700)return"acute infection";if(x<800)return"acute infection+";if(x<900)return"acute infection++";if(x>=900)return"septic"}return""},u=r.BodyScanner=function(){function N(x,B){var L=(0,o.useBackend)(B),w=L.data,A=w.occupied,T=w.occupant,E=T===void 0?{}:T,O=A?(0,e.createComponentVNode)(2,s,{occupant:E}):(0,e.createComponentVNode)(2,C);return(0,e.createComponentVNode)(2,y.Window,{width:700,height:600,title:"Body Scanner",children:(0,e.createComponentVNode)(2,y.Window.Content,{scrollable:!0,children:O})})}return N}(),s=function(x){var B=x.occupant;return(0,e.createComponentVNode)(2,d.Box,{children:[(0,e.createComponentVNode)(2,m,{occupant:B}),(0,e.createComponentVNode)(2,c,{occupant:B}),(0,e.createComponentVNode)(2,v,{occupant:B}),(0,e.createComponentVNode)(2,g,{organs:B.extOrgan}),(0,e.createComponentVNode)(2,h,{organs:B.intOrgan})]})},m=function(x,B){var L=(0,o.useBackend)(B),w=L.act,A=L.data,T=A.occupant;return(0,e.createComponentVNode)(2,d.Section,{title:"Occupant",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,d.Button,{icon:"print",onClick:function(){function E(){return w("print_p")}return E}(),children:"\u0420\u0430\u0441\u043F\u0435\u0447\u0430\u0442\u0430\u0442\u044C \u043E\u0442\u0447\u0435\u0442"}),(0,e.createComponentVNode)(2,d.Button,{icon:"print",onClick:function(){function E(){return w("insurance")}return E}(),children:"\u0421\u043F\u0438\u0441\u0430\u0442\u044C \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u043A\u0443"}),(0,e.createComponentVNode)(2,d.Button,{icon:"user-slash",onClick:function(){function E(){return w("eject_id")}return E}(),children:"\u0418\u0437\u0432\u043B\u0435\u0447\u044C \u043A\u0430\u0440\u0442\u0443"}),(0,e.createComponentVNode)(2,d.Button,{icon:"user-slash",onClick:function(){function E(){return w("ejectify")}return E}(),children:"\u0418\u0437\u0432\u043B\u0435\u0447\u044C \u043F\u0430\u0446\u0438\u0435\u043D\u0442\u0430"})],4),children:(0,e.createComponentVNode)(2,d.LabeledList,{children:[(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Name",children:T.name}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,d.ProgressBar,{min:"0",max:T.maxHealth,value:T.health/T.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Status",color:V[T.stat][0],children:V[T.stat][1]}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Temperature",children:[(0,e.createComponentVNode)(2,d.AnimatedNumber,{value:(0,a.round)(T.bodyTempC)}),"\xB0C,\xA0",(0,e.createComponentVNode)(2,d.AnimatedNumber,{value:(0,a.round)(T.bodyTempF)}),"\xB0F"]}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Implants",children:T.implant_len?(0,e.createComponentVNode)(2,d.Box,{children:T.implant.map(function(E){return E.name}).join(", ")}):(0,e.createComponentVNode)(2,d.Box,{color:"label",children:"None"})})]})})},c=function(x){var B=x.occupant;return B.hasBorer||B.blind||B.colourblind||B.nearsighted||B.hasVirus?(0,e.createComponentVNode)(2,d.Section,{title:"Abnormalities",children:k.map(function(L,w){if(B[L[0]])return(0,e.createComponentVNode)(2,d.Box,{color:L[1],bold:L[1]==="bad",children:L[2]},L[2])})}):(0,e.createComponentVNode)(2,d.Section,{title:"Abnormalities",children:(0,e.createComponentVNode)(2,d.Box,{color:"label",children:"No abnormalities found."})})},v=function(x){var B=x.occupant;return(0,e.createComponentVNode)(2,d.Section,{title:"Damage",children:(0,e.createComponentVNode)(2,d.Table,{children:i(S,function(L,w,A){return(0,e.createFragment)([(0,e.createComponentVNode)(2,d.Table.Row,{color:"label",children:[(0,e.createComponentVNode)(2,d.Table.Cell,{children:[L[0],":"]}),(0,e.createComponentVNode)(2,d.Table.Cell,{children:!!w&&w[0]+":"})]}),(0,e.createComponentVNode)(2,d.Table.Row,{children:[(0,e.createComponentVNode)(2,d.Table.Cell,{children:(0,e.createComponentVNode)(2,b,{value:B[L[1]],marginBottom:A100)&&"average"||!!B.status.robotic&&"label",width:"33%",children:(0,t.capitalize)(B.name)}),(0,e.createComponentVNode)(2,d.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,d.ProgressBar,{m:-.5,min:"0",max:B.maxHealth,mt:L>0&&"0.5rem",value:B.totalLoss/B.maxHealth,ranges:p,children:(0,e.createComponentVNode)(2,d.Stack,{children:[(0,e.createComponentVNode)(2,d.Tooltip,{content:"Total damage",children:(0,e.createComponentVNode)(2,d.Stack.Item,{children:[(0,e.createComponentVNode)(2,d.Icon,{name:"heartbeat",mr:.5}),(0,a.round)(B.totalLoss)]})}),!!B.bruteLoss&&(0,e.createComponentVNode)(2,d.Tooltip,{content:"Brute damage",children:(0,e.createComponentVNode)(2,d.Stack.Item,{grow:!0,children:[(0,e.createComponentVNode)(2,d.Icon,{name:"bone",mr:.5}),(0,a.round)(B.bruteLoss)]})}),!!B.fireLoss&&(0,e.createComponentVNode)(2,d.Tooltip,{content:"Burn damage",children:(0,e.createComponentVNode)(2,d.Stack.Item,{children:[(0,e.createComponentVNode)(2,d.Icon,{name:"fire",mr:.5}),(0,a.round)(B.fireLoss)]})})]})})}),(0,e.createComponentVNode)(2,d.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:L>0&&"calc(0.5rem + 2px)",children:[(0,e.createComponentVNode)(2,d.Box,{color:"average",inline:!0,children:l([!!B.internalBleeding&&"Internal bleeding",!!B.burnWound&&"Critical tissue burns",!!B.lungRuptured&&"Ruptured lung",!!B.status.broken&&B.status.broken,f(B.germ_level),!!B.open&&"Open incision"])}),(0,e.createComponentVNode)(2,d.Box,{inline:!0,children:[l([!!B.status.splinted&&(0,e.createComponentVNode)(2,d.Box,{color:"good",children:"Splinted"}),!!B.status.robotic&&(0,e.createComponentVNode)(2,d.Box,{color:"label",children:"Robotic"}),!!B.status.dead&&(0,e.createComponentVNode)(2,d.Box,{color:"bad",bold:!0,children:"DEAD"})]),l(B.shrapnel.map(function(w){return w.known?w.name:"Unknown object"}))]})]})]},L)})]})})},h=function(x){return x.organs.length===0?(0,e.createComponentVNode)(2,d.Section,{title:"Internal Organs",children:(0,e.createComponentVNode)(2,d.Box,{color:"label",children:"N/A"})}):(0,e.createComponentVNode)(2,d.Section,{title:"Internal Organs",children:(0,e.createComponentVNode)(2,d.Table,{children:[(0,e.createComponentVNode)(2,d.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,d.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,d.Table.Cell,{textAlign:"center",children:"Damage"}),(0,e.createComponentVNode)(2,d.Table.Cell,{textAlign:"right",children:"Injuries"})]}),x.organs.map(function(B,L){return(0,e.createComponentVNode)(2,d.Table.Row,{children:[(0,e.createComponentVNode)(2,d.Table.Cell,{color:!!B.dead&&"bad"||B.germ_level>100&&"average"||B.robotic>0&&"label",width:"33%",children:(0,t.capitalize)(B.name)}),(0,e.createComponentVNode)(2,d.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,d.ProgressBar,{min:"0",max:B.maxHealth,value:B.damage/B.maxHealth,mt:L>0&&"0.5rem",ranges:p,children:(0,a.round)(B.damage)})}),(0,e.createComponentVNode)(2,d.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:L>0&&"calc(0.5rem + 2px)",children:[(0,e.createComponentVNode)(2,d.Box,{color:"average",inline:!0,children:l([f(B.germ_level)])}),(0,e.createComponentVNode)(2,d.Box,{inline:!0,children:l([B.robotic===1&&(0,e.createComponentVNode)(2,d.Box,{color:"label",children:"Robotic"}),B.robotic===2&&(0,e.createComponentVNode)(2,d.Box,{color:"label",children:"Assisted"}),!!B.dead&&(0,e.createComponentVNode)(2,d.Box,{color:"bad",bold:!0,children:"DEAD"})])})]})]},L)})]})})},C=function(){return(0,e.createComponentVNode)(2,d.Section,{fill:!0,children:(0,e.createComponentVNode)(2,d.Stack,{fill:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,d.Stack.Item,{grow:!0,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,d.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No occupant detected."]})})})}},42570:function(I,r,n){"use strict";r.__esModule=!0,r.BorgPanel=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.BorgPanel=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.borg||{},f=i.cell||{},u=f.charge/f.maxcharge,s=i.channels||[],m=i.modules||[],c=i.upgrades||[],v=i.ais||[],b=i.laws||[];return(0,e.createComponentVNode)(2,o.Window,{title:"Borg Panel",width:700,height:700,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:l.name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:"Rename",onClick:function(){function g(){return p("rename")}return g}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:[(0,e.createComponentVNode)(2,t.Button,{icon:l.emagged?"check-square-o":"square-o",content:"Emagged",selected:l.emagged,onClick:function(){function g(){return p("toggle_emagged")}return g}()}),(0,e.createComponentVNode)(2,t.Button,{icon:l.lockdown?"check-square-o":"square-o",content:"Locked Down",selected:l.lockdown,onClick:function(){function g(){return p("toggle_lockdown")}return g}()}),(0,e.createComponentVNode)(2,t.Button,{icon:l.scrambledcodes?"check-square-o":"square-o",content:"Scrambled Codes",selected:l.scrambledcodes,onClick:function(){function g(){return p("toggle_scrambledcodes")}return g}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Reset Module",onClick:function(){function g(){return p("reset_module")}return g}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Charge",children:[f.missing?(0,e.createVNode)(1,"span","color-bad","No cell installed",16):(0,e.createComponentVNode)(2,t.ProgressBar,{value:u,children:f.charge+" / "+f.maxcharge}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:"Set",onClick:function(){function g(){return p("set_charge")}return g}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Change",onClick:function(){function g(){return p("change_cell")}return g}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"trash",content:"Remove",color:"bad",onClick:function(){function g(){return p("remove_cell")}return g}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Radio Channels",children:s.map(function(g){return(0,e.createComponentVNode)(2,t.Button,{icon:g.installed?"check-square-o":"square-o",content:g.name,selected:g.installed,onClick:function(){function h(){return p("toggle_radio",{channel:g.name})}return h}()},g.name)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Model",children:m.map(function(g){return(0,e.createComponentVNode)(2,t.Button,{icon:l.active_module===g.name?"check-square-o":"square-o",content:g.name+" module",selected:l.active_module===g.name,onClick:function(){function h(){return p("setmodule",{module:g.name})}return h}()},g.type)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Upgrades",children:c.map(function(g){return(0,e.createComponentVNode)(2,t.Button,{icon:g.installed?"check-square-o":"square-o",content:g.name,selected:g.installed,onClick:function(){function h(){return p("toggle_upgrade",{upgrade:g.type})}return h}()},g.type)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Master AI",children:v.map(function(g){return(0,e.createComponentVNode)(2,t.Button,{icon:g.connected?"check-square-o":"square-o",content:g.name,selected:g.connected,onClick:function(){function h(){return p("slavetoai",{slavetoai:g.ref})}return h}()},g.ref)})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Laws",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Law Manager",selected:l.lawmanager,onClick:function(){function g(){return p("lawmanager")}return g}()}),(0,e.createComponentVNode)(2,t.Button,{icon:l.lawupdate?"check-square-o":"square-o",content:"Lawsync",selected:l.lawupdate,onClick:function(){function g(){return p("toggle_lawupdate")}return g}()})],4),children:b.map(function(g){return(0,e.createComponentVNode)(2,t.Box,{children:g},g)})})]})})}return y}()},20464:function(I,r,n){"use strict";r.__esModule=!0,r.BotClean=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.BotClean=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.locked,f=i.noaccess,u=i.maintpanel,s=i.on,m=i.autopatrol,c=i.canhack,v=i.emagged,b=i.remote_disabled,g=i.painame,h=i.cleanblood;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.NoticeBox,{children:["\u041F\u0440\u043E\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u0432\u043E\u0435\u0439 ID-\u043A\u0430\u0440\u0442\u043E\u0439, \u0447\u0442\u043E\u0431\u044B"," ",l?"\u0440\u0430\u0437\u0431\u043B\u043E\u043A\u0438\u0440\u043E\u0432\u0430\u0442\u044C":"\u0437\u0430\u0431\u043B\u043E\u043A\u0438\u0440\u043E\u0432\u0430\u0442\u044C"," \u044D\u0442\u043E\u0442 \u0438\u043D\u0442\u0435\u0440\u0444\u0435\u0439\u0441."]}),(0,e.createComponentVNode)(2,t.Section,{title:"\u041E\u0441\u043D\u043E\u0432\u043D\u044B\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0421\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435",children:(0,e.createComponentVNode)(2,t.Button,{icon:s?"power-off":"times",content:s?"\u0412\u043A\u043B\u044E\u0447\u0451\u043D":"\u0412\u044B\u043A\u043B\u044E\u0447\u0435\u043D",selected:s,disabled:f,onClick:function(){function C(){return p("power")}return C}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0420\u0435\u0436\u0438\u043C \u043F\u0430\u0442\u0440\u0443\u043B\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:m,content:"\u0410\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u043F\u0430\u0442\u0440\u0443\u043B\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435",disabled:f,onClick:function(){function C(){return p("autopatrol")}return C}()})}),!!u&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u0430\u043D\u0435\u043B\u044C \u0442\u0435\u0445\u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u044F",children:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"\u041F\u0430\u043D\u0435\u043B\u044C \u043E\u0442\u043A\u0440\u044B\u0442\u0430"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u0440\u043E\u0442\u043E\u043A\u043E\u043B\u044B \u0431\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u043E\u0441\u0442\u0438",children:(0,e.createComponentVNode)(2,t.Box,{color:v?"bad":"good",children:v?"\u041E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u044B":"\u0412\u043A\u043B\u044E\u0447\u0435\u043D\u044B"})}),!!c&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0412\u0437\u043B\u043E\u043C",children:(0,e.createComponentVNode)(2,t.Button,{icon:"terminal",content:v?"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043F\u0440\u043E\u0442\u043E\u043A\u043E\u043B\u044B \u0431\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u043E\u0441\u0442\u0438":"\u0412\u0437\u043B\u043E\u043C\u0430\u0442\u044C",disabled:f,color:"bad",onClick:function(){function C(){return p("hack")}return C}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0423\u0434\u0430\u043B\u0451\u043D\u043D\u044B\u0439 \u0434\u043E\u0441\u0442\u0443\u043F",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:!b,content:"\u0423\u0434\u0430\u043B\u0451\u043D\u043D\u044B\u0439 \u0434\u043E\u0441\u0442\u0443\u043F \u0441\u043E \u0441\u0442\u043E\u0440\u043E\u043D\u044B \u0418\u0418",disabled:f,onClick:function(){function C(){return p("disableremote")}return C}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043F\u0440\u043E\u0446\u0435\u0441\u0441\u0430 \u0443\u0431\u043E\u0440\u043A\u0438",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:h,content:"\u0423\u0431\u0438\u0440\u0430\u0442\u044C \u043A\u0440\u043E\u0432\u044C",disabled:f,onClick:function(){function C(){return p("blood")}return C}()})}),g&&(0,e.createComponentVNode)(2,t.Section,{title:"\u041F\u0418\u0418",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:g,disabled:f,onClick:function(){function C(){return p("ejectpai")}return C}()})})]})})}return y}()},74439:function(I,r,n){"use strict";r.__esModule=!0,r.BotSecurity=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.BotSecurity=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.locked,f=i.noaccess,u=i.maintpanel,s=i.on,m=i.autopatrol,c=i.canhack,v=i.emagged,b=i.remote_disabled,g=i.painame,h=i.check_id,C=i.check_weapons,N=i.check_warrant,x=i.arrest_mode,B=i.arrest_declare;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.NoticeBox,{children:["\u041F\u0440\u043E\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u0432\u043E\u0435\u0439 ID-\u043A\u0430\u0440\u0442\u043E\u0439, \u0447\u0442\u043E\u0431\u044B"," ",l?"\u0440\u0430\u0437\u0431\u043B\u043E\u043A\u0438\u0440\u043E\u0432\u0430\u0442\u044C":"\u0437\u0430\u0431\u043B\u043E\u043A\u0438\u0440\u043E\u0432\u0430\u0442\u044C"," \u044D\u0442\u043E\u0442 \u0438\u043D\u0442\u0435\u0440\u0444\u0435\u0439\u0441."]}),(0,e.createComponentVNode)(2,t.Section,{title:"\u041E\u0441\u043D\u043E\u0432\u043D\u044B\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0421\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435",children:(0,e.createComponentVNode)(2,t.Button,{icon:s?"power-off":"times",content:s?"\u0412\u043A\u043B\u044E\u0447\u0451\u043D":"\u0412\u044B\u043A\u043B\u044E\u0447\u0435\u043D",selected:s,disabled:f,onClick:function(){function L(){return p("power")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0420\u0435\u0436\u0438\u043C \u043F\u0430\u0442\u0440\u0443\u043B\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:m,content:"\u0410\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u043F\u0430\u0442\u0440\u0443\u043B\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435",disabled:f,onClick:function(){function L(){return p("autopatrol")}return L}()})}),!!u&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u0430\u043D\u0435\u043B\u044C \u0442\u0435\u0445\u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u044F",children:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"\u041F\u0430\u043D\u0435\u043B\u044C \u043E\u0442\u043A\u0440\u044B\u0442\u0430"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u0440\u043E\u0442\u043E\u043A\u043E\u043B\u044B \u0431\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u043E\u0441\u0442\u0438",children:(0,e.createComponentVNode)(2,t.Box,{color:v?"bad":"good",children:v?"\u041E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u044B":"\u0412\u043A\u043B\u044E\u0447\u0435\u043D\u044B"})}),!!c&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0412\u0437\u043B\u043E\u043C",children:(0,e.createComponentVNode)(2,t.Button,{icon:"terminal",content:v?"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043F\u0440\u043E\u0442\u043E\u043A\u043E\u043B\u044B \u0431\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u043E\u0441\u0442\u0438":"\u0412\u0437\u043B\u043E\u043C\u0430\u0442\u044C",disabled:f,color:"bad",onClick:function(){function L(){return p("hack")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0423\u0434\u0430\u043B\u0451\u043D\u043D\u044B\u0439 \u0434\u043E\u0441\u0442\u0443\u043F",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:!b,content:"\u0423\u0434\u0430\u043B\u0451\u043D\u043D\u044B\u0439 \u0434\u043E\u0441\u0442\u0443\u043F \u0441\u043E \u0441\u0442\u043E\u0440\u043E\u043D\u044B \u0418\u0418",disabled:f,onClick:function(){function L(){return p("disableremote")}return L}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"\u0417\u0430\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043C\u044B\u0435 \u0446\u0435\u043B\u0438",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:h,content:"\u041D\u0435\u043E\u043F\u043E\u0437\u043D\u0430\u043D\u043D\u044B\u0435 \u043B\u0438\u0447\u043D\u043E\u0441\u0442\u0438",disabled:f,onClick:function(){function L(){return p("authid")}return L}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:C,content:"\u0418\u043C\u0435\u044E\u0449\u0438\u0435 \u043D\u0435\u0430\u0432\u0442\u043E\u0440\u0438\u0437\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u043E\u0435 \u043E\u0440\u0443\u0436\u0438\u0435",disabled:f,onClick:function(){function L(){return p("authweapon")}return L}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:N,content:"\u0420\u0430\u0437\u044B\u0441\u043A\u0438\u0432\u0430\u0435\u043C\u044B\u0435 \u043F\u0440\u0435\u0441\u0442\u0443\u043F\u043D\u0438\u043A\u0438",disabled:f,onClick:function(){function L(){return p("authwarrant")}return L}()})]}),(0,e.createComponentVNode)(2,t.Section,{title:"\u041F\u0440\u043E\u0446\u0435\u0434\u0443\u0440\u0430 \u0437\u0430\u0434\u0435\u0440\u0436\u0430\u043D\u0438\u044F",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:x,content:"\u0411\u0435\u0441\u0441\u0440\u043E\u0447\u043D\u043E\u0435 \u043E\u0433\u043B\u0443\u0448\u0435\u043D\u0438\u0435 \u0446\u0435\u043B\u0435\u0439 \u0432\u043C\u0435\u0441\u0442\u043E \u0437\u0430\u0434\u0435\u0440\u0436\u0430\u043D\u0438\u044F",disabled:f,onClick:function(){function L(){return p("arrtype")}return L}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:B,content:"\u0421\u043E\u043E\u0431\u0449\u0430\u0442\u044C \u043E \u0437\u0430\u0434\u0435\u0440\u0436\u0430\u043D\u0438\u0438 \u043F\u043E \u0440\u0430\u0434\u0438\u043E\u0441\u0432\u044F\u0437\u0438",disabled:f,onClick:function(){function L(){return p("arrdeclare")}return L}()})]}),g&&(0,e.createComponentVNode)(2,t.Section,{title:"\u041F\u0418\u0418",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:g,disabled:f,onClick:function(){function L(){return p("ejectpai")}return L}()})})]})})}return y}()},10833:function(I,r,n){"use strict";r.__esModule=!0,r.BrigCells=void 0;var e=n(89005),a=n(98595),t=n(36036),o=n(72253),d=function(S,p){var i=S.cell,l=(0,o.useBackend)(p),f=l.act,u=i.cell_id,s=i.occupant,m=i.crimes,c=i.brigged_by,v=i.time_left_seconds,b=i.time_set_seconds,g=i.ref,h="";v>0&&(h+=" BrigCells__listRow--active");var C=function(){f("release",{ref:g})};return(0,e.createComponentVNode)(2,t.Table.Row,{className:h,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:u}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:s}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:m}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:c}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.TimeDisplay,{totalSeconds:b})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.TimeDisplay,{totalSeconds:v})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{type:"button",onClick:C,children:"Release"})})]})},y=function(S){var p=S.cells;return(0,e.createComponentVNode)(2,t.Table,{className:"BrigCells__list",children:[(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Cell"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Occupant"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Crimes"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Brigged By"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Time Brigged For"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Time Left"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Release"})]}),p.map(function(i){return(0,e.createComponentVNode)(2,d,{cell:i},i.ref)})]})},V=r.BrigCells=function(){function k(S,p){var i=(0,o.useBackend)(p),l=i.act,f=i.data,u=f.cells;return(0,e.createComponentVNode)(2,a.Window,{theme:"security",width:800,height:400,children:(0,e.createComponentVNode)(2,a.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,y,{cells:u})})})})})}return k}()},45761:function(I,r,n){"use strict";r.__esModule=!0,r.BrigTimer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.BrigTimer=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data;i.nameText=i.occupant,i.timing&&(i.prisoner_hasrec?i.nameText=(0,e.createComponentVNode)(2,t.Box,{color:"green",children:i.occupant}):i.nameText=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:i.occupant}));var l="pencil-alt";i.prisoner_name&&(i.prisoner_hasrec||(l="exclamation-triangle"));var f=[],u=0;for(u=0;u60||!i.isAllowed,onClick:function(){function s(){return p("start")}return s}()})})]})})]})})}return y}()},26300:function(I,r,n){"use strict";r.__esModule=!0,r.CameraConsoleOldContent=r.CameraConsoleMapContent=r.CameraConsoleListContent=r.CameraConsole=void 0;var e=n(89005),a=n(88510),t=n(64795),o=n(35840),d=n(25328),y=n(72253),V=n(36036),k=n(98595);String.prototype.trimLongStr=function(s){return this.length>s?this.substring(0,s)+"...":this};var S=function(m,c){var v,b;if(!c)return[];var g=m.findIndex(function(h){return h.name===c.name});return[(v=m[g-1])==null?void 0:v.name,(b=m[g+1])==null?void 0:b.name]},p=function(m,c){c===void 0&&(c="");var v=(0,d.createSearch)(c,function(b){return b.name});return(0,t.flow)([(0,a.filter)(function(b){return b==null?void 0:b.name}),c&&(0,a.filter)(v),(0,a.sortBy)(function(b){return b.name})])(m)},i=r.CameraConsole=function(){function s(m,c){var v=(0,y.useLocalState)(c,"tabIndex",0),b=v[0],g=v[1],h=function(){function C(N){switch(N){case 0:return(0,e.createComponentVNode)(2,l);case 1:return(0,e.createComponentVNode)(2,f);default:return"WE SHOULDN'T BE HERE!"}}return C}();return(0,e.createComponentVNode)(2,k.Window,{width:1250,height:600,children:(0,e.createComponentVNode)(2,k.Window.Content,{children:(0,e.createComponentVNode)(2,V.Box,{fillPositionedParent:!0,overflow:"hidden",children:[(0,e.createComponentVNode)(2,V.Tabs,{children:[(0,e.createComponentVNode)(2,V.Tabs.Tab,{selected:b===0,onClick:function(){function C(){return g(0)}return C}(),children:[(0,e.createComponentVNode)(2,V.Icon,{name:"map-marked-alt"})," Map"]},"Map"),(0,e.createComponentVNode)(2,V.Tabs.Tab,{selected:b===1,onClick:function(){function C(){return g(1)}return C}(),children:[(0,e.createComponentVNode)(2,V.Icon,{name:"table"})," List"]},"List")]}),h(b)]})})})}return s}(),l=r.CameraConsoleMapContent=function(){function s(m,c){var v=(0,y.useBackend)(c),b=v.act,g=v.data,h=p(g.cameras),C=(0,y.useLocalState)(c,"zoom",1),N=C[0],x=C[1],B=g.mapRef,L=g.activeCamera,w=g.stationLevelNum,A=g.stationLevelName,T=(0,y.useLocalState)(c,"z_current",w[0]),E=T[0],O=T[1],P=S(h,L),R=P[0],F=P[1];return(0,e.createComponentVNode)(2,V.Box,{height:"100%",display:"flex",children:[(0,e.createVNode)(1,"div","CameraConsole__left",(0,e.createComponentVNode)(2,V.Box,{height:"100%",display:"flex",children:(0,e.createComponentVNode)(2,V.NanoMap,{onZoom:function(){function j(W){return x(W)}return j}(),zLevels:w,zNames:A,z_current:E,setZCurrent:O,children:h.map(function(j){return(0,e.createComponentVNode)(2,V.NanoMap.Marker,{x:j.x,y:j.y,z:j.z,z_current:E,zoom:N,icon:"box",tooltip:j.name,color:j.status?"blue":"red",bordered:!0,onClick:function(){function W(){return b("switch_camera",{name:j.name})}return W}()},j.ref)})})}),2),(0,e.createVNode)(1,"div","CameraConsole__right",[(0,e.createVNode)(1,"div","CameraConsole__toolbar",[(0,e.createVNode)(1,"b",null,"Camera: ",16),L&&L.name||"\u2014"],0),(0,e.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,e.createComponentVNode)(2,V.Button,{icon:"chevron-left",disabled:!R,onClick:function(){function j(){return b("switch_camera",{name:R})}return j}()}),(0,e.createComponentVNode)(2,V.Button,{icon:"chevron-right",disabled:!F,onClick:function(){function j(){return b("switch_camera",{name:F})}return j}()})],4),(0,e.createComponentVNode)(2,V.ByondUi,{className:"CameraConsole__map",params:{id:B,type:"map"}})],4)]})}return s}(),f=r.CameraConsoleOldContent=function(){function s(m,c){var v=(0,y.useBackend)(c),b=v.act,g=v.data,h=v.config,C=g.mapRef,N=g.activeCamera,x=(0,y.useLocalState)(c,"searchText",""),B=x[0],L=p(g.cameras,B),w=S(L,N),A=w[0],T=w[1];return(0,e.createComponentVNode)(2,V.Box,{children:[(0,e.createVNode)(1,"div","CameraConsole__left",(0,e.createComponentVNode)(2,k.Window.Content,{children:(0,e.createComponentVNode)(2,V.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,u)})}),2),(0,e.createVNode)(1,"div","CameraConsole__right",[(0,e.createVNode)(1,"div","CameraConsole__toolbar",[(0,e.createVNode)(1,"b",null,"Camera: ",16),N&&N.name||"\u2014"],0),(0,e.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,e.createComponentVNode)(2,V.Button,{icon:"chevron-left",disabled:!A,onClick:function(){function E(){return b("switch_camera",{name:A})}return E}()}),(0,e.createComponentVNode)(2,V.Button,{icon:"chevron-right",disabled:!T,onClick:function(){function E(){return b("switch_camera",{name:T})}return E}()})],4),(0,e.createComponentVNode)(2,V.ByondUi,{className:"CameraConsole__map",params:{id:C,type:"map"}})],4)]})}return s}(),u=r.CameraConsoleListContent=function(){function s(m,c){var v=(0,y.useBackend)(c),b=v.act,g=v.data,h=(0,y.useLocalState)(c,"searchText",""),C=h[0],N=h[1],x=g.activeCamera,B=p(g.cameras,C);return(0,e.createComponentVNode)(2,V.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,V.Stack.Item,{children:(0,e.createComponentVNode)(2,V.Input,{fluid:!0,placeholder:"Search for a camera",onInput:function(){function L(w,A){return N(A)}return L}()})}),(0,e.createComponentVNode)(2,V.Stack.Item,{grow:!0,m:0,children:(0,e.createComponentVNode)(2,V.Section,{fill:!0,scrollable:!0,children:B.map(function(L){return(0,e.createVNode)(1,"div",(0,o.classes)(["Button","Button--fluid","Button--color--transparent",x&&L.name===x.name&&"Button--selected"]),L.name,0,{title:L.name,onClick:function(){function w(){return b("switch_camera",{name:L.name})}return w}()},L.name)})})})]})}return s}()},52927:function(I,r,n){"use strict";r.__esModule=!0,r.Canister=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),d=n(49968),y=n(98595),V=r.Canister=function(){function k(S,p){var i=(0,t.useBackend)(p),l=i.act,f=i.data,u=f.portConnected,s=f.tankPressure,m=f.releasePressure,c=f.defaultReleasePressure,v=f.minReleasePressure,b=f.maxReleasePressure,g=f.valveOpen,h=f.name,C=f.canLabel,N=f.colorContainer,x=f.color_index,B=f.hasHoldingTank,L=f.holdingTank,w="";x.prim&&(w=N.prim.options[x.prim].name);var A="";x.sec&&(A=N.sec.options[x.sec].name);var T="";x.ter&&(T=N.ter.options[x.ter].name);var E="";x.quart&&(E=N.quart.options[x.quart].name);var O=[],P=[],R=[],F=[],j=0;for(j=0;jh.current_positions&&(0,e.createComponentVNode)(2,t.Box,{color:"green",children:h.total_positions-h.current_positions})||(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"0"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{content:"-",disabled:c.cooldown_time||!h.can_close,onClick:function(){function C(){return m("make_job_unavailable",{job:h.title})}return C}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{content:"+",disabled:c.cooldown_time||!h.can_open,onClick:function(){function C(){return m("make_job_available",{job:h.title})}return C}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:c.target_dept&&(0,e.createComponentVNode)(2,t.Box,{color:"green",children:c.priority_jobs.indexOf(h.title)>-1?"Yes":""})||(0,e.createComponentVNode)(2,t.Button,{content:h.is_priority?"Yes":"No",selected:h.is_priority,disabled:c.cooldown_time||!h.can_prioritize,onClick:function(){function C(){return m("prioritize_job",{job:h.title})}return C}()})})]},h.title)})]})})]}):g=(0,e.createComponentVNode)(2,k);break;case 2:!c.authenticated||!c.scan_name?g=(0,e.createComponentVNode)(2,k):c.modify_name?g=(0,e.createComponentVNode)(2,d.AccessList,{accesses:c.regions,selectedList:c.selectedAccess,accessMod:function(){function h(C){return m("set",{access:C})}return h}(),grantAll:function(){function h(){return m("grant_all")}return h}(),denyAll:function(){function h(){return m("clear_all")}return h}(),grantDep:function(){function h(C){return m("grant_region",{region:C})}return h}(),denyDep:function(){function h(C){return m("deny_region",{region:C})}return h}()}):g=(0,e.createComponentVNode)(2,S);break;case 3:c.authenticated?c.records.length?g=(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Records",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Delete All Records",disabled:!c.authenticated||c.records.length===0||c.target_dept,onClick:function(){function h(){return m("wipe_all_logs")}return h}()}),children:[(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Crewman"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Old Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"New Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Authorized By"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Time"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Reason"}),!!c.iscentcom&&(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Deleted By"})]}),c.records.map(function(h){return(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.transferee}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.oldvalue}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.newvalue}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.whodidit}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.timestamp}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.reason}),!!c.iscentcom&&(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.deletedby})]},h.timestamp)})]}),!!c.iscentcom&&(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:"Delete MY Records",color:"purple",disabled:!c.authenticated||c.records.length===0,onClick:function(){function h(){return m("wipe_my_logs")}return h}()})})]}):g=(0,e.createComponentVNode)(2,p):g=(0,e.createComponentVNode)(2,k);break;case 4:!c.authenticated||!c.scan_name?g=(0,e.createComponentVNode)(2,k):g=(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Your Team",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Sec Status"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Actions"})]}),c.people_dept.map(function(h){return(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.title}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.crimstat}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:h.buttontext,disabled:!h.demotable,onClick:function(){function C(){return m("remote_demote",{remote_demote:h.name})}return C}()})})]},h.title)})]})});break;default:g=(0,e.createComponentVNode)(2,t.Section,{title:"Warning",color:"red",children:"ERROR: Unknown Mode."})}return(0,e.createComponentVNode)(2,o.Window,{width:800,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:b}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:v}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:g})]})})})}return l}()},64083:function(I,r,n){"use strict";r.__esModule=!0,r.CargoConsole=void 0;var e=n(89005),a=n(64795),t=n(88510),o=n(72253),d=n(36036),y=n(98595),V=n(25328),k=r.CargoConsole=function(){function f(u,s){return(0,e.createComponentVNode)(2,y.Window,{width:900,height:800,children:(0,e.createComponentVNode)(2,y.Window.Content,{children:(0,e.createComponentVNode)(2,d.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,S),(0,e.createComponentVNode)(2,p),(0,e.createComponentVNode)(2,i),(0,e.createComponentVNode)(2,l)]})})})}return f}(),S=function(u,s){var m=(0,o.useLocalState)(s,"contentsModal",null),c=m[0],v=m[1],b=(0,o.useLocalState)(s,"contentsModalTitle",null),g=b[0],h=b[1];if(c!==null&&g!==null)return(0,e.createComponentVNode)(2,d.Modal,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:window.innerHeight*.75+"px",mx:"auto",children:[(0,e.createComponentVNode)(2,d.Box,{width:"100%",bold:!0,children:(0,e.createVNode)(1,"h1",null,[g,(0,e.createTextVNode)(" contents:")],0)}),(0,e.createComponentVNode)(2,d.Box,{children:c.map(function(C){return(0,e.createComponentVNode)(2,d.Box,{children:["- ",C]},C)})}),(0,e.createComponentVNode)(2,d.Box,{m:2,children:(0,e.createComponentVNode)(2,d.Button,{content:"Close",onClick:function(){function C(){v(null),h(null)}return C}()})})]})},p=function(u,s){var m=(0,o.useBackend)(s),c=m.act,v=m.data,b=v.is_public,g=v.points,h=v.credits,C=v.timeleft,N=v.moving,x=v.at_station,B,L;return!N&&!x?(B="Docked off-station",L="Call Shuttle"):!N&&x?(B="Docked at the station",L="Return Shuttle"):N&&(L="In Transit...",C!==1?B="Shuttle is en route (ETA: "+C+" minutes)":B="Shuttle is en route (ETA: "+C+" minute)"),(0,e.createComponentVNode)(2,d.Stack.Item,{children:(0,e.createComponentVNode)(2,d.Section,{title:"Status",children:(0,e.createComponentVNode)(2,d.LabeledList,{children:[(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Points Available",children:g}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Credits Available",children:h}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Shuttle Status",children:B}),b===0&&(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Controls",children:[(0,e.createComponentVNode)(2,d.Button,{content:L,disabled:N,onClick:function(){function w(){return c("moveShuttle")}return w}()}),(0,e.createComponentVNode)(2,d.Button,{content:"View Central Command Messages",onClick:function(){function w(){return c("showMessages")}return w}()})]})]})})})},i=function(u,s){var m=(0,o.useBackend)(s),c=m.act,v=m.data,b=v.categories,g=v.supply_packs,h=(0,o.useSharedState)(s,"category","Emergency"),C=h[0],N=h[1],x=(0,o.useSharedState)(s,"search_text",""),B=x[0],L=x[1],w=(0,o.useLocalState)(s,"contentsModal",null),A=w[0],T=w[1],E=(0,o.useLocalState)(s,"contentsModalTitle",null),O=E[0],P=E[1],R=(0,V.createSearch)(B,function(W){return W.name}),F=(0,a.flow)([(0,t.filter)(function(W){return W.cat===b.filter(function(z){return z.name===C})[0].category||B}),B&&(0,t.filter)(R),(0,t.sortBy)(function(W){return W.name.toLowerCase()})])(g),j="Crate Catalogue";return B?j="Results for '"+B+"':":C&&(j="Browsing "+C),(0,e.createComponentVNode)(2,d.Stack.Item,{children:(0,e.createComponentVNode)(2,d.Section,{title:j,buttons:(0,e.createComponentVNode)(2,d.Dropdown,{width:"190px",options:b.map(function(W){return W.name}),selected:C,onSelected:function(){function W(z){return N(z)}return W}()}),children:[(0,e.createComponentVNode)(2,d.Input,{fluid:!0,placeholder:"Search for...",onInput:function(){function W(z,H){return L(H)}return W}(),mb:1}),(0,e.createComponentVNode)(2,d.Box,{maxHeight:25,overflowY:"auto",overflowX:"hidden",children:(0,e.createComponentVNode)(2,d.Table,{m:"0.5rem",children:F.map(function(W){return(0,e.createComponentVNode)(2,d.Table.Row,{children:[(0,e.createComponentVNode)(2,d.Table.Cell,{bold:!0,children:(0,e.createComponentVNode)(2,d.Box,{color:W.has_sale?"good":"default",children:[W.name," (",W.cost?W.cost+" Points":"",W.creditsCost&&W.cost?" ":"",W.creditsCost?W.creditsCost+" Credits":"",")"]})}),(0,e.createComponentVNode)(2,d.Table.Cell,{textAlign:"right",pr:1,children:[(0,e.createComponentVNode)(2,d.Button,{content:"Order 1",icon:"shopping-cart",onClick:function(){function z(){return c("order",{crate:W.ref,multiple:0})}return z}()}),(0,e.createComponentVNode)(2,d.Button,{content:"Order Multiple",icon:"cart-plus",onClick:function(){function z(){return c("order",{crate:W.ref,multiple:1})}return z}()}),(0,e.createComponentVNode)(2,d.Button,{content:"View Contents",icon:"search",onClick:function(){function z(){T(W.contents),P(W.name)}return z}()})]})]},W.name)})})})]})})},l=function(u,s){var m=(0,o.useBackend)(s),c=m.act,v=m.data,b=v.requests,g=v.canapprove,h=v.orders;return(0,e.createComponentVNode)(2,d.Section,{fill:!0,scrollable:!0,title:"Details",children:[(0,e.createComponentVNode)(2,d.Box,{bold:!0,children:"Requests"}),(0,e.createComponentVNode)(2,d.Table,{m:"0.5rem",children:b.map(function(C){return(0,e.createComponentVNode)(2,d.Table.Row,{children:[(0,e.createComponentVNode)(2,d.Table.Cell,{children:[(0,e.createComponentVNode)(2,d.Box,{children:["- #",C.ordernum,": ",C.supply_type," for ",(0,e.createVNode)(1,"b",null,C.orderedby,0)]}),(0,e.createComponentVNode)(2,d.Box,{italic:!0,children:["Reason: ",C.comment]}),(0,e.createComponentVNode)(2,d.Box,{italic:!0,children:["Required Techs: ",C.pack_techs]})]}),(0,e.createComponentVNode)(2,d.Stack.Item,{textAlign:"right",children:[(0,e.createComponentVNode)(2,d.Button,{content:"Approve",color:"green",disabled:!g,onClick:function(){function N(){return c("approve",{ordernum:C.ordernum})}return N}()}),(0,e.createComponentVNode)(2,d.Button,{content:"Deny",color:"red",onClick:function(){function N(){return c("deny",{ordernum:C.ordernum})}return N}()})]})]},C.ordernum)})}),(0,e.createComponentVNode)(2,d.Box,{bold:!0,children:"Confirmed Orders"}),(0,e.createComponentVNode)(2,d.Table,{m:"0.5rem",children:h.map(function(C){return(0,e.createComponentVNode)(2,d.Table.Row,{children:(0,e.createComponentVNode)(2,d.Table.Cell,{children:[(0,e.createComponentVNode)(2,d.Box,{children:["- #",C.ordernum,": ",C.supply_type," for ",(0,e.createVNode)(1,"b",null,C.orderedby,0)]}),(0,e.createComponentVNode)(2,d.Box,{italic:!0,children:["Reason: ",C.comment]})]})},C.ordernum)})})]})}},12226:function(I,r,n){"use strict";r.__esModule=!0,r.Changelog=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),d=n(98595),y=n(79140),V=S(n(83331)),k=S(n(52754));function S(c){return c&&c.__esModule?c:{default:c}}function p(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */p=function(){return v};var c,v={},b=Object.prototype,g=b.hasOwnProperty,h=Object.defineProperty||function(fe,Z,J){fe[Z]=J.value},C=typeof Symbol=="function"?Symbol:{},N=C.iterator||"@@iterator",x=C.asyncIterator||"@@asyncIterator",B=C.toStringTag||"@@toStringTag";function L(fe,Z,J){return Object.defineProperty(fe,Z,{value:J,enumerable:!0,configurable:!0,writable:!0}),fe[Z]}try{L({},"")}catch(fe){L=function(J,te,ee){return J[te]=ee}}function w(fe,Z,J,te){var ee=Z&&Z.prototype instanceof F?Z:F,le=Object.create(ee.prototype),ye=new Le(te||[]);return h(le,"_invoke",{value:he(fe,J,ye)}),le}function A(fe,Z,J){try{return{type:"normal",arg:fe.call(Z,J)}}catch(te){return{type:"throw",arg:te}}}v.wrap=w;var T="suspendedStart",E="suspendedYield",O="executing",P="completed",R={};function F(){}function j(){}function W(){}var z={};L(z,N,function(){return this});var H=Object.getPrototypeOf,$=H&&H(H(Ae([])));$&&$!==b&&g.call($,N)&&(z=$);var G=W.prototype=F.prototype=Object.create(z);function ne(fe){["next","throw","return"].forEach(function(Z){L(fe,Z,function(J){return this._invoke(Z,J)})})}function Q(fe,Z){function J(ee,le,ye,me){var Te=A(fe[ee],fe,le);if(Te.type!=="throw"){var M=Te.arg,X=M.value;return X&&typeof X=="object"&&g.call(X,"__await")?Z.resolve(X.__await).then(function(ae){J("next",ae,ye,me)},function(ae){J("throw",ae,ye,me)}):Z.resolve(X).then(function(ae){M.value=ae,ye(M)},function(ae){return J("throw",ae,ye,me)})}me(Te.arg)}var te;h(this,"_invoke",{value:function(){function ee(le,ye){function me(){return new Z(function(Te,M){J(le,ye,Te,M)})}return te=te?te.then(me,me):me()}return ee}()})}function he(fe,Z,J){var te=T;return function(ee,le){if(te===O)throw Error("Generator is already running");if(te===P){if(ee==="throw")throw le;return{value:c,done:!0}}for(J.method=ee,J.arg=le;;){var ye=J.delegate;if(ye){var me=Ve(ye,J);if(me){if(me===R)continue;return me}}if(J.method==="next")J.sent=J._sent=J.arg;else if(J.method==="throw"){if(te===T)throw te=P,J.arg;J.dispatchException(J.arg)}else J.method==="return"&&J.abrupt("return",J.arg);te=O;var Te=A(fe,Z,J);if(Te.type==="normal"){if(te=J.done?P:E,Te.arg===R)continue;return{value:Te.arg,done:J.done}}Te.type==="throw"&&(te=P,J.method="throw",J.arg=Te.arg)}}}function Ve(fe,Z){var J=Z.method,te=fe.iterator[J];if(te===c)return Z.delegate=null,J==="throw"&&fe.iterator.return&&(Z.method="return",Z.arg=c,Ve(fe,Z),Z.method==="throw")||J!=="return"&&(Z.method="throw",Z.arg=new TypeError("The iterator does not provide a '"+J+"' method")),R;var ee=A(te,fe.iterator,Z.arg);if(ee.type==="throw")return Z.method="throw",Z.arg=ee.arg,Z.delegate=null,R;var le=ee.arg;return le?le.done?(Z[fe.resultName]=le.value,Z.next=fe.nextLoc,Z.method!=="return"&&(Z.method="next",Z.arg=c),Z.delegate=null,R):le:(Z.method="throw",Z.arg=new TypeError("iterator result is not an object"),Z.delegate=null,R)}function Ne(fe){var Z={tryLoc:fe[0]};1 in fe&&(Z.catchLoc=fe[1]),2 in fe&&(Z.finallyLoc=fe[2],Z.afterLoc=fe[3]),this.tryEntries.push(Z)}function Be(fe){var Z=fe.completion||{};Z.type="normal",delete Z.arg,fe.completion=Z}function Le(fe){this.tryEntries=[{tryLoc:"root"}],fe.forEach(Ne,this),this.reset(!0)}function Ae(fe){if(fe||fe===""){var Z=fe[N];if(Z)return Z.call(fe);if(typeof fe.next=="function")return fe;if(!isNaN(fe.length)){var J=-1,te=function(){function ee(){for(;++J=0;--ee){var le=this.tryEntries[ee],ye=le.completion;if(le.tryLoc==="root")return te("end");if(le.tryLoc<=this.prev){var me=g.call(le,"catchLoc"),Te=g.call(le,"finallyLoc");if(me&&Te){if(this.prev=0;--te){var ee=this.tryEntries[te];if(ee.tryLoc<=this.prev&&g.call(ee,"finallyLoc")&&this.prev=0;--J){var te=this.tryEntries[J];if(te.finallyLoc===Z)return this.complete(te.completion,te.afterLoc),Be(te),R}}return fe}(),catch:function(){function fe(Z){for(var J=this.tryEntries.length-1;J>=0;--J){var te=this.tryEntries[J];if(te.tryLoc===Z){var ee=te.completion;if(ee.type==="throw"){var le=ee.arg;Be(te)}return le}}throw Error("illegal catch attempt")}return fe}(),delegateYield:function(){function fe(Z,J,te){return this.delegate={iterator:Ae(Z),resultName:J,nextLoc:te},this.method==="next"&&(this.arg=c),R}return fe}()},v}function i(c,v,b,g,h,C,N){try{var x=c[C](N),B=x.value}catch(L){return void b(L)}x.done?v(B):Promise.resolve(B).then(g,h)}function l(c){return function(){var v=this,b=arguments;return new Promise(function(g,h){var C=c.apply(v,b);function N(B){i(C,g,h,N,x,"next",B)}function x(B){i(C,g,h,N,x,"throw",B)}N(void 0)})}}function f(c,v){c.prototype=Object.create(v.prototype),c.prototype.constructor=c,u(c,v)}function u(c,v){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,g){return b.__proto__=g,b},u(c,v)}var s={add:{icon:"check-circle",color:"green"},admin:{icon:"user-shield",color:"purple"},balance:{icon:"balance-scale-right",color:"yellow"},bugfix:{icon:"bug",color:"green"},code_imp:{icon:"code",color:"green"},config:{icon:"cogs",color:"purple"},del:{icon:"minus",color:"red"},expansion:{icon:"check-circle",color:"green"},experiment:{icon:"radiation",color:"yellow"},image:{icon:"image",color:"green"},imageadd:{icon:"tg-image-plus",color:"green"},imagedel:{icon:"tg-image-minus",color:"red"},qol:{icon:"hand-holding-heart",color:"green"},refactor:{icon:"tools",color:"green"},rscadd:{icon:"check-circle",color:"green"},rscdel:{icon:"times-circle",color:"red"},server:{icon:"server",color:"purple"},sound:{icon:"volume-high",color:"green"},soundadd:{icon:"tg-sound-plus",color:"green"},sounddel:{icon:"tg-sound-minus",color:"red"},spellcheck:{icon:"spell-check",color:"green"},tgs:{icon:"toolbox",color:"purple"},tweak:{icon:"wrench",color:"green"},unknown:{icon:"info-circle",color:"label"},wip:{icon:"hammer",color:"orange"}},m=r.Changelog=function(c){function v(){var g;return g=c.call(this)||this,g.getData=function(h,C){C===void 0&&(C=1);var N=(0,t.useBackend)(g.context),x=N.act,B=g,L=6;if(C>L)return g.setData("Failed to load data after "+L+" attempts");x("get_month",{date:h}),fetch((0,y.resolveAsset)(h+".yml")).then(function(){var w=l(p().mark(function(){function A(T){var E,O,P;return p().wrap(function(){function R(F){for(;;)switch(F.prev=F.next){case 0:return F.next=2,T.text();case 2:E=F.sent,O=/^Cannot find/,O.test(E)?(P=50+C*50,B.setData("Loading changelog data"+".".repeat(C+3)),setTimeout(function(){B.getData(h,C+1)},P)):B.setData(k.default.load(E,{schema:k.default.CORE_SCHEMA}));case 5:case"end":return F.stop()}}return R}(),A)}return A}()));return function(A){return w.apply(this,arguments)}}())},g.state={data:"Loading changelog data...",selectedDate:"",selectedIndex:0},g.dateChoices=[],g}f(v,c);var b=v.prototype;return b.setData=function(){function g(h){this.setState({data:h})}return g}(),b.setSelectedDate=function(){function g(h){this.setState({selectedDate:h})}return g}(),b.setSelectedIndex=function(){function g(h){this.setState({selectedIndex:h})}return g}(),b.componentDidMount=function(){function g(){var h=this,C=(0,t.useBackend)(this.context),N=C.data.dates,x=N===void 0?[]:N;x&&(x.forEach(function(B){return h.dateChoices.push((0,V.default)(B,"mmmm yyyy",!0))}),this.setSelectedDate(this.dateChoices[0]),this.getData(x[0]))}return g}(),b.render=function(){function g(){var h=this,C=this.state,N=C.data,x=C.selectedDate,B=C.selectedIndex,L=(0,t.useBackend)(this.context),w=L.data.dates,A=this.dateChoices,T=A.length>0&&(0,e.createComponentVNode)(2,o.Stack,{mb:1,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{className:"Changelog__Button",disabled:B===0,icon:"chevron-left",onClick:function(){function F(){var j=B-1;return h.setData("Loading changelog data..."),h.setSelectedIndex(j),h.setSelectedDate(A[j]),window.scrollTo(0,document.body.scrollHeight||document.documentElement.scrollHeight),h.getData(w[j])}return F}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Dropdown,{displayText:x,options:A,onSelected:function(){function F(j){var W=A.indexOf(j);return h.setData("Loading changelog data..."),h.setSelectedIndex(W),h.setSelectedDate(j),window.scrollTo(0,document.body.scrollHeight||document.documentElement.scrollHeight),h.getData(w[W])}return F}(),selected:x,width:"150px"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{className:"Changelog__Button",disabled:B===A.length-1,icon:"chevron-right",onClick:function(){function F(){var j=B+1;return h.setData("Loading changelog data..."),h.setSelectedIndex(j),h.setSelectedDate(A[j]),window.scrollTo(0,document.body.scrollHeight||document.documentElement.scrollHeight),h.getData(w[j])}return F}()})})]}),E=(0,e.createComponentVNode)(2,o.Section,{children:[(0,e.createVNode)(1,"h1",null,"Paradise Station",16),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Thanks to: ",16),(0,e.createTextVNode)("Baystation 12, /tg/station, /vg/station, NTstation, CDK Station devs, FacepunchStation, GoonStation devs, the original SpaceStation developers and Radithor for the title image. Also a thanks to anybody who has contributed who is not listed here :( Ask to be added here on irc.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Recent GitHub contributors can be found "),(0,e.createVNode)(1,"a",null,"here",16,{href:"https://github.com/ss220-space/Paradise/pulse/monthly"}),(0,e.createTextVNode)(".")],0),T]}),O=(0,e.createComponentVNode)(2,o.Section,{children:[T,(0,e.createVNode)(1,"h3",null,"GoonStation 13 Development Team",16),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Coders: ",16),(0,e.createTextVNode)("Stuntwaffle, Showtime, Pantaloons, Nannek, Keelin, Exadv1, hobnob, Justicefries, 0staf, sniperchance, AngriestIBM, BrianOBlivion")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Spriters: ",16),(0,e.createTextVNode)("Supernorn, Haruhi, Stuntwaffle, Pantaloons, Rho, SynthOrange, I Said No")],4),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Traditional Games Space Station 13 is thankful to the GoonStation 13 Development Team for its work on the game up to the"),(0,e.createTextVNode)(" r4407 release. The changelog for changes up to r4407 can be seen "),(0,e.createVNode)(1,"a",null,"here",16,{href:"https://wiki.ss13.co/Pre-2016_Changelog#April_2010"}),(0,e.createTextVNode)(".")],0),(0,e.createVNode)(1,"p",null,["Except where otherwise noted, Goon Station 13 is licensed under a ",(0,e.createVNode)(1,"a",null,"Creative Commons Attribution-Noncommercial-Share Alike 3.0 License",16,{href:"https://creativecommons.org/licenses/by-nc-sa/3.0/"}),". Rights are currently extended to ",(0,e.createVNode)(1,"a",null,"SomethingAwful Goons",16,{href:"http://forums.somethingawful.com/"})," only."],0),(0,e.createVNode)(1,"h3",null,"Traditional Games Space Station 13 License",16),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Some icons by"),(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"a",null,"Yusuke Kamiyamane",16,{href:"http://p.yusukekamiyamane.com/"}),(0,e.createTextVNode)(". All rights reserved. Licensed under a"),(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"a",null,"Creative Commons Attribution 3.0 License",16,{href:"http://creativecommons.org/licenses/by/3.0/"}),(0,e.createTextVNode)(".")],0)]}),P=/#\d+/,R=typeof N=="object"&&Object.keys(N).length>0&&Object.entries(N).reverse().map(function(F){var j=F[0],W=F[1];return(0,e.createComponentVNode)(2,o.Section,{title:(0,V.default)(j,"d mmmm yyyy",!0),children:(0,e.createComponentVNode)(2,o.Box,{ml:3,children:Object.entries(W).map(function(z){var H=z[0],$=z[1];return(0,e.createFragment)([(0,e.createVNode)(1,"h4",null,[H,(0,e.createTextVNode)(" changed:")],0),(0,e.createComponentVNode)(2,o.Box,{ml:3,children:(0,e.createComponentVNode)(2,o.Table,{children:$.map(function(G){var ne=Object.keys(G)[0],Q=G[ne],he=Q.match(P),Ve=(0,e.createComponentVNode)(2,o.Table.Cell,{className:(0,a.classes)(["Changelog__Cell","Changelog__Cell--Icon"]),children:(0,e.createComponentVNode)(2,o.Icon,{color:s[ne]?s[ne].color:s.unknown.color,name:s[ne]?s[ne].icon:s.unknown.icon})});return he!==null&&(0,e.createComponentVNode)(2,o.Table.Row,{children:[Ve,(0,e.createComponentVNode)(2,o.Table.Cell,{className:"Changelog__Cell",children:(0,e.createVNode)(1,"a",null,[" ",Q.charAt(0).toUpperCase()+Q.slice(1)," "],0,{href:"https://github.com/ss220-space/Paradise/pull/"+he[0].substring(1)})})]},ne+Q)||(0,e.createComponentVNode)(2,o.Table.Row,{children:[Ve,(0,e.createComponentVNode)(2,o.Table.Cell,{className:"Changelog__Cell",children:Q})]},ne+Q)})})})],4,H)})})},j)});return(0,e.createComponentVNode)(2,d.Window,{title:"Changelog",width:675,height:650,children:(0,e.createComponentVNode)(2,d.Window.Content,{scrollable:!0,children:[E,R,typeof N=="string"&&(0,e.createVNode)(1,"p",null,N,0),O]})})}return g}(),v}(e.Component)},36108:function(I,r,n){"use strict";r.__esModule=!0,r.ChemDispenser=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(85870),d=n(98595),y=[1,5,10,20,30,50,100],V=[1,5,10],k=r.ChemDispenser=function(){function l(f,u){var s=(0,a.useBackend)(u),m=s.act,c=s.data,v=c.chemicals;return(0,e.createComponentVNode)(2,d.Window,{width:460,height:400+v.length*8,children:(0,e.createComponentVNode)(2,d.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,S),(0,e.createComponentVNode)(2,p),(0,e.createComponentVNode)(2,i)]})})})}return l}(),S=function(f,u){var s=(0,a.useBackend)(u),m=s.act,c=s.data,v=c.amount,b=c.energy,g=c.maxEnergy;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Energy",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:b,minValue:0,maxValue:g,ranges:{good:[g*.5,1/0],average:[g*.25,g*.5],bad:[-1/0,g*.25]},children:[b," / ",g," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Dispense",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{children:y.map(function(h,C){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"15%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"cog",selected:v===h,content:h,onClick:function(){function N(){return m("amount",{amount:h})}return N}()})},C)})})})]})})})},p=function(f,u){for(var s=(0,a.useBackend)(u),m=s.act,c=s.data,v=c.chemicals,b=v===void 0?[]:v,g=[],h=0;h<(b.length+1)%3;h++)g.push(!0);return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:c.glass?"Drink Dispenser":"Chemical Dispenser",children:[b.map(function(C,N){return(0,e.createComponentVNode)(2,t.Button,{m:.1,width:"32.5%",icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",content:C.title,style:{"margin-left":"2px"},onClick:function(){function x(){return m("dispense",{reagent:C.id})}return x}()},N)}),g.map(function(C,N){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%"},N)})]})})},i=function(f,u){var s=(0,a.useBackend)(u),m=s.act,c=s.data,v=c.isBeakerLoaded,b=c.beakerCurrentVolume,g=c.beakerMaxVolume,h=c.beakerContents,C=h===void 0?[]:h;return(0,e.createComponentVNode)(2,t.Stack.Item,{height:16,children:(0,e.createComponentVNode)(2,t.Section,{title:c.glass?"Glass":"Beaker",fill:!0,scrollable:!0,buttons:(0,e.createComponentVNode)(2,t.Box,{children:[!!v&&(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"label",mr:2,children:[b," / ",g," units"]}),(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject",disabled:!v,onClick:function(){function N(){return m("ejectBeaker")}return N}()})]}),children:(0,e.createComponentVNode)(2,o.BeakerContents,{beakerLoaded:v,beakerContents:C,buttons:function(){function N(x){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Isolate",icon:"compress-arrows-alt",onClick:function(){function B(){return m("remove",{reagent:x.id,amount:-1})}return B}()}),V.map(function(B,L){return(0,e.createComponentVNode)(2,t.Button,{content:B,onClick:function(){function w(){return m("remove",{reagent:x.id,amount:B})}return w}()},L)}),(0,e.createComponentVNode)(2,t.Button,{content:"ALL",onClick:function(){function B(){return m("remove",{reagent:x.id,amount:x.volume})}return B}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Floor",tooltip:"Set to "+Math.trunc(x.volume),icon:"arrow-circle-down",onClick:function(){function B(){return m("remove",{reagent:x.id,amount:-2})}return B}()})],0)}return N}()})})})}},13146:function(I,r,n){"use strict";r.__esModule=!0,r.ChemHeater=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),d=n(85870),y=n(98595),V=r.ChemHeater=function(){function p(i,l){return(0,e.createComponentVNode)(2,y.Window,{width:350,height:275,children:(0,e.createComponentVNode)(2,y.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,S)]})})})}return p}(),k=function(i,l){var f=(0,t.useBackend)(l),u=f.act,s=f.data,m=s.targetTemp,c=s.targetTempReached,v=s.autoEject,b=s.isActive,g=s.currentTemp,h=s.isBeakerLoaded;return(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Settings",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{content:"Auto-eject",icon:v?"toggle-on":"toggle-off",selected:v,onClick:function(){function C(){return u("toggle_autoeject")}return C}()}),(0,e.createComponentVNode)(2,o.Button,{content:b?"On":"Off",icon:"power-off",selected:b,disabled:!h,onClick:function(){function C(){return u("toggle_on")}return C}()})],4),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Target",children:(0,e.createComponentVNode)(2,o.NumberInput,{width:"65px",unit:"K",step:10,stepPixelSize:3,value:(0,a.round)(m,0),minValue:0,maxValue:1e3,onDrag:function(){function C(N,x){return u("adjust_temperature",{target:x})}return C}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Reading",color:c?"good":"average",children:h&&(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:g,format:function(){function C(N){return(0,a.toFixed)(N)+" K"}return C}()})||"\u2014"})]})})})},S=function(i,l){var f=(0,t.useBackend)(l),u=f.act,s=f.data,m=s.isBeakerLoaded,c=s.beakerCurrentVolume,v=s.beakerMaxVolume,b=s.beakerContents;return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{title:"Beaker",fill:!0,scrollable:!0,buttons:!!m&&(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{inline:!0,color:"label",mr:2,children:[c," / ",v," units"]}),(0,e.createComponentVNode)(2,o.Button,{icon:"eject",content:"Eject",onClick:function(){function g(){return u("eject_beaker")}return g}()})]}),children:(0,e.createComponentVNode)(2,d.BeakerContents,{beakerLoaded:m,beakerContents:b})})})}},56541:function(I,r,n){"use strict";r.__esModule=!0,r.ChemMaster=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=n(85870),y=n(3939),V=n(35840),k=["icon"];function S(B,L){if(B==null)return{};var w={};for(var A in B)if({}.hasOwnProperty.call(B,A)){if(L.includes(A))continue;w[A]=B[A]}return w}function p(B,L){B.prototype=Object.create(L.prototype),B.prototype.constructor=B,i(B,L)}function i(B,L){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(w,A){return w.__proto__=A,w},i(B,L)}var l=[1,5,10],f=function(L,w){var A=(0,a.useBackend)(w),T=A.act,E=A.data,O=L.args.analysis;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:E.condi?"Condiment Analysis":"Reagent Analysis",children:(0,e.createComponentVNode)(2,t.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:O.name}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:(O.desc||"").length>0?O.desc:"N/A"}),O.blood_type&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood type",children:O.blood_type}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood DNA",className:"LabeledList__breakContents",children:O.blood_dna})],4),!E.condi&&(0,e.createComponentVNode)(2,t.Button,{icon:E.printing?"spinner":"print",disabled:E.printing,iconSpin:!!E.printing,ml:"0.5rem",content:"Print",onClick:function(){function P(){return T("print",{idx:O.idx,beaker:L.args.beaker})}return P}()})]})})})})},u=function(B){return B[B.ToDisposals=0]="ToDisposals",B[B.ToBeaker=1]="ToBeaker",B}(u||{}),s=r.ChemMaster=function(){function B(L,w){return(0,e.createComponentVNode)(2,o.Window,{width:575,height:650,children:[(0,e.createComponentVNode)(2,y.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,m),(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,v),(0,e.createComponentVNode)(2,x)]})})]})}return B}(),m=function(L,w){var A=(0,a.useBackend)(w),T=A.act,E=A.data,O=E.beaker,P=E.beaker_reagents,R=E.buffer_reagents,F=R.length>0;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Beaker",fill:!0,scrollable:!0,buttons:F?(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"eject",disabled:!O,content:"Eject and Clear Buffer",onClick:function(){function j(){return T("eject")}return j}()}):(0,e.createComponentVNode)(2,t.Button,{icon:"eject",disabled:!O,content:"Eject and Clear Buffer",onClick:function(){function j(){return T("eject")}return j}()}),children:O?(0,e.createComponentVNode)(2,d.BeakerContents,{beakerLoaded:!0,beakerContents:P,buttons:function(){function j(W,z){return(0,e.createComponentVNode)(2,t.Box,{mb:z0?(0,e.createComponentVNode)(2,d.BeakerContents,{beakerLoaded:!0,beakerContents:P,buttons:function(){function R(F,j){return(0,e.createComponentVNode)(2,t.Box,{mb:j0&&(F=R.map(function(j){var W=j.id,z=j.sprite;return(0,e.createComponentVNode)(2,C,{icon:z,color:"translucent",onClick:function(){function H(){return T("set_sprite_style",{production_mode:O,style:W})}return H}(),selected:P===W},W)})),(0,e.createComponentVNode)(2,h,{productionData:L.productionData,children:F&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Style",children:F})})},x=function(L,w){var A=(0,a.useBackend)(w),T=A.act,E=A.data,O=E.loaded_pill_bottle_style,P=E.containerstyles,R=E.loaded_pill_bottle,F={width:"20px",height:"20px"},j=P.map(function(W){var z=W.color,H=W.name,$=O===z;return(0,e.createComponentVNode)(2,t.Button,{style:{position:"relative",width:F.width,height:F.height},onClick:function(){function G(){return T("set_container_style",{style:z})}return G}(),icon:$&&"check",iconStyle:{position:"relative","z-index":1},tooltip:H,tooltipPosition:"top",children:[!$&&(0,e.createVNode)(1,"div",null,null,1,{style:{display:"inline-block"}}),(0,e.createVNode)(1,"span","Button",null,1,{style:{display:"inline-block",position:"absolute",top:0,left:0,margin:0,padding:0,width:F.width,height:F.height,"background-color":z,opacity:.6,filter:"alpha(opacity=60)"}})]},z)});return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Container Customization",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"eject",disabled:!R,content:"Eject Container",onClick:function(){function W(){return T("ejectp")}return W}()}),children:R?(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Style",children:[(0,e.createComponentVNode)(2,t.Button,{style:{width:F.width,height:F.height},icon:"tint-slash",onClick:function(){function W(){return T("clear_container_style")}return W}(),selected:!O,tooltip:"Default",tooltipPosition:"top"}),j]})}):(0,e.createComponentVNode)(2,t.Box,{color:"label",children:"No pill bottle or patch pack loaded."})})})};(0,y.modalRegisterBodyOverride)("analyze",f)},37173:function(I,r,n){"use strict";r.__esModule=!0,r.CloningConsole=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),d=n(76910),y=n(3939),V=n(98595),k=n(79140),S=function(v,b){var g=(0,t.useBackend)(b),h=g.act,C=g.data,N=v.args,x=N.activerecord,B=N.realname,L=N.health,w=N.unidentity,A=N.strucenzymes,T=L.split(" - ");return(0,e.createComponentVNode)(2,o.Section,{level:2,m:"-1rem",pb:"1rem",title:"Records of "+B,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:B}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Damage",children:T.length>1?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{color:d.COLORS.damageType.oxy,inline:!0,children:T[0]}),(0,e.createTextVNode)("\xA0|\xA0"),(0,e.createComponentVNode)(2,o.Box,{color:d.COLORS.damageType.toxin,inline:!0,children:T[2]}),(0,e.createTextVNode)("\xA0|\xA0"),(0,e.createComponentVNode)(2,o.Box,{color:d.COLORS.damageType.brute,inline:!0,children:T[3]}),(0,e.createTextVNode)("\xA0|\xA0"),(0,e.createComponentVNode)(2,o.Box,{color:d.COLORS.damageType.burn,inline:!0,children:T[1]})],4):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"Unknown"})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"UI",className:"LabeledList__breakContents",children:w}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"SE",className:"LabeledList__breakContents",children:A}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Disk",children:[(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:!C.disk,icon:"arrow-circle-down",content:"Import",onClick:function(){function E(){return h("disk",{option:"load"})}return E}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!C.disk,icon:"arrow-circle-up",content:"Export UI",onClick:function(){function E(){return h("disk",{option:"save",savetype:"ui"})}return E}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!C.disk,icon:"arrow-circle-up",content:"Export UI and UE",onClick:function(){function E(){return h("disk",{option:"save",savetype:"ue"})}return E}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!C.disk,icon:"arrow-circle-up",content:"Export SE",onClick:function(){function E(){return h("disk",{option:"save",savetype:"se"})}return E}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Actions",children:[(0,e.createComponentVNode)(2,o.Button,{disabled:!C.podready,icon:"user-plus",content:"Clone",onClick:function(){function E(){return h("clone",{ref:x})}return E}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"trash",content:"Delete",onClick:function(){function E(){return h("del_rec")}return E}()})]})]})})},p=r.CloningConsole=function(){function c(v,b){var g=(0,t.useBackend)(b),h=g.act,C=g.data,N=C.menu;return(0,y.modalRegisterBodyOverride)("view_rec",S),(0,e.createComponentVNode)(2,V.Window,{width:640,height:520,children:[(0,e.createComponentVNode)(2,y.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),(0,e.createComponentVNode)(2,V.Window.Content,{className:"Layout__content--flexColumn",children:[(0,e.createComponentVNode)(2,s),(0,e.createComponentVNode)(2,m),(0,e.createComponentVNode)(2,i),(0,e.createComponentVNode)(2,o.Section,{noTopPadding:!0,flexGrow:"1",children:(0,e.createComponentVNode)(2,l)})]})]})}return c}(),i=function(v,b){var g=(0,t.useBackend)(b),h=g.act,C=g.data,N=C.menu;return(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:N===1,icon:"home",onClick:function(){function x(){return h("menu",{num:1})}return x}(),children:"Main"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:N===2,icon:"folder",onClick:function(){function x(){return h("menu",{num:2})}return x}(),children:"Records"})]})},l=function(v,b){var g=(0,t.useBackend)(b),h=g.data,C=h.menu,N;return C===1?N=(0,e.createComponentVNode)(2,f):C===2&&(N=(0,e.createComponentVNode)(2,u)),N},f=function(v,b){var g=(0,t.useBackend)(b),h=g.act,C=g.data,N=C.loading,x=C.scantemp,B=C.occupant,L=C.locked,w=C.can_brainscan,A=C.scan_mode,T=C.numberofpods,E=C.pods,O=C.selected_pod,P=L&&!!B;return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Section,{title:"Scanner",level:"2",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{inline:!0,color:"label",children:"Scanner Lock:\xA0"}),(0,e.createComponentVNode)(2,o.Button,{disabled:!B,selected:P,icon:P?"toggle-on":"toggle-off",content:P?"Engaged":"Disengaged",onClick:function(){function R(){return h("lock")}return R}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:P||!B,icon:"user-slash",content:"Eject Occupant",onClick:function(){function R(){return h("eject")}return R}()})],4),children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Status",children:N?(0,e.createComponentVNode)(2,o.Box,{color:"average",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"spinner",spin:!0}),"\xA0 Scanning..."]}):(0,e.createComponentVNode)(2,o.Box,{color:x.color,children:x.text})}),!!w&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Scan Mode",children:(0,e.createComponentVNode)(2,o.Button,{icon:A?"brain":"male",content:A?"Brain":"Body",onClick:function(){function R(){return h("toggle_mode")}return R}()})})]}),(0,e.createComponentVNode)(2,o.Button,{disabled:!B||N,icon:"user",content:"Scan Occupant",mt:"0.5rem",mb:"0",onClick:function(){function R(){return h("scan")}return R}()})]}),(0,e.createComponentVNode)(2,o.Section,{title:"Pods",level:"2",children:T?E.map(function(R,F){var j;return R.status==="cloning"?j=(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:"100",value:R.progress/100,ranges:{good:[.75,1/0],average:[.25,.75],bad:[-1/0,.25]},mt:"0.5rem",children:(0,e.createComponentVNode)(2,o.Box,{textAlign:"center",children:(0,a.round)(R.progress,0)+"%"})}):R.status==="mess"?j=(0,e.createComponentVNode)(2,o.Box,{bold:!0,color:"bad",mt:"0.5rem",children:"ERROR"}):j=(0,e.createComponentVNode)(2,o.Button,{selected:O===R.pod,icon:O===R.pod&&"check",content:"Select",mt:"0.5rem",onClick:function(){function W(){return h("selectpod",{ref:R.pod})}return W}()}),(0,e.createComponentVNode)(2,o.Box,{width:"64px",textAlign:"center",display:"inline-block",mr:"0.5rem",children:[(0,e.createVNode)(1,"img",null,null,1,{src:(0,k.resolveAsset)("pod_"+R.status+".gif"),style:{width:"100%","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}}),(0,e.createComponentVNode)(2,o.Box,{color:"label",children:["Pod #",F+1]}),(0,e.createComponentVNode)(2,o.Box,{bold:!0,color:R.biomass>=150?"good":"bad",inline:!0,children:[(0,e.createComponentVNode)(2,o.Icon,{name:R.biomass>=150?"circle":"circle-o"}),"\xA0",R.biomass]}),j]},F)}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"No pods detected. Unable to clone."})})],4)},u=function(v,b){var g=(0,t.useBackend)(b),h=g.act,C=g.data,N=C.records;return N.length?(0,e.createComponentVNode)(2,o.Box,{mt:"0.5rem",children:N.map(function(x,B){return(0,e.createComponentVNode)(2,o.Button,{icon:"user",mb:"0.5rem",content:x.realname,onClick:function(){function L(){return h("view_rec",{ref:x.record})}return L}()},B)})}):(0,e.createComponentVNode)(2,o.Flex,{height:"100%",children:(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No records found."]})})},s=function(v,b){var g,h=(0,t.useBackend)(b),C=h.act,N=h.data,x=N.temp;if(!(!x||!x.text||x.text.length<=0)){var B=(g={},g[x.style]=!0,g);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.NoticeBox,Object.assign({},B,{children:[(0,e.createComponentVNode)(2,o.Box,{display:"inline-block",verticalAlign:"middle",children:x.text}),(0,e.createComponentVNode)(2,o.Button,{icon:"times-circle",float:"right",onClick:function(){function L(){return C("cleartemp")}return L}()}),(0,e.createComponentVNode)(2,o.Box,{clear:"both"})]})))}},m=function(v,b){var g=(0,t.useBackend)(b),h=g.act,C=g.data,N=C.scanner,x=C.numberofpods,B=C.autoallowed,L=C.autoprocess,w=C.disk;return(0,e.createComponentVNode)(2,o.Section,{title:"Status",buttons:(0,e.createFragment)([!!B&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{inline:!0,color:"label",children:"Auto-processing:\xA0"}),(0,e.createComponentVNode)(2,o.Button,{selected:L,icon:L?"toggle-on":"toggle-off",content:L?"Enabled":"Disabled",onClick:function(){function A(){return h("autoprocess",{on:L?0:1})}return A}()})],4),(0,e.createComponentVNode)(2,o.Button,{disabled:!w,icon:"eject",content:"Eject Disk",onClick:function(){function A(){return h("disk",{option:"eject"})}return A}()})],0),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Scanner",children:N?(0,e.createComponentVNode)(2,o.Box,{color:"good",children:"Connected"}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"Not connected!"})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Pods",children:x?(0,e.createComponentVNode)(2,o.Box,{color:"good",children:[x," connected"]}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"None connected!"})})]})})}},63818:function(I,r,n){"use strict";r.__esModule=!0,r.CommunicationsComputer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.CommunicationsComputer=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l;i.authenticated?i.is_ai?l="AI":i.authenticated===1?l="Command":i.authenticated===2?l="Captain":l="ERROR: Report This Bug!":l="Not Logged In";var f="View ("+i.messages.length+")",u=(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Authentication",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:i.is_ai&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Access Level",children:"AI"})||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.authenticated?"sign-out-alt":"id-card",selected:i.authenticated,content:i.authenticated?"Log Out ("+l+")":"Log In",onClick:function(){function x(){return p("auth")}return x}()})})})}),!!i.esc_section&&(0,e.createComponentVNode)(2,t.Section,{title:"Escape Shuttle",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[!!i.esc_status&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:i.esc_status}),!!i.esc_callable&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Options",children:(0,e.createComponentVNode)(2,t.Button,{icon:"rocket",content:"Call Shuttle",disabled:!i.authenticated,onClick:function(){function x(){return p("callshuttle")}return x}()})}),!!i.esc_recallable&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Options",children:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Recall Shuttle",disabled:!i.authenticated||i.is_ai,onClick:function(){function x(){return p("cancelshuttle")}return x}()})}),!!i.lastCallLoc&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Last Call/Recall From",children:i.lastCallLoc})]})})],0),s="Make Priority Announcement";i.msg_cooldown>0&&(s+=" ("+i.msg_cooldown+"s)");var m=i.emagged?"Message [UNKNOWN]":"Message CentComm",c="Request Authentication Codes";i.cc_cooldown>0&&(m+=" ("+i.cc_cooldown+"s)",c+=" ("+i.cc_cooldown+"s)");var v=i.str_security_level,b=i.levels.map(function(x){return(0,e.createComponentVNode)(2,t.Button,{icon:x.icon,content:x.name,disabled:!i.authmax||x.id===i.security_level,onClick:function(){function B(){return p("newalertlevel",{level:x.id})}return B}()},x.name)}),g=i.stat_display.presets.map(function(x){return(0,e.createComponentVNode)(2,t.Button,{content:x.label,selected:x.name===i.stat_display.type,disabled:!i.authenticated,onClick:function(){function B(){return p("setstat",{statdisp:x.name})}return B}()},x.name)}),h=i.stat_display.alerts.map(function(x){return(0,e.createComponentVNode)(2,t.Button,{content:x.label,selected:x.alert===i.stat_display.icon,disabled:!i.authenticated,onClick:function(){function B(){return p("setstat",{statdisp:"alert",alert:x.alert})}return B}()},x.alert)}),C;if(i.current_message_title)C=(0,e.createComponentVNode)(2,t.Section,{title:i.current_message_title,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Return To Message List",disabled:!i.authenticated,onClick:function(){function x(){return p("messagelist")}return x}()}),children:(0,e.createComponentVNode)(2,t.Box,{children:i.current_message})});else{var N=i.messages.map(function(x){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:x.title,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"eye",content:"View",disabled:!i.authenticated||i.current_message_title===x.title,onClick:function(){function B(){return p("messagelist",{msgid:x.id})}return B}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Delete",disabled:!i.authenticated,onClick:function(){function B(){return p("delmessage",{msgid:x.id})}return B}()})]},x.id)});C=(0,e.createComponentVNode)(2,t.Section,{title:"Messages Received",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){function x(){return p("main")}return x}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:N})})}switch(i.menu_state){case 1:return(0,e.createComponentVNode)(2,o.Window,{width:500,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[u,(0,e.createComponentVNode)(2,t.Section,{title:"Captain-Only Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Alert",color:i.security_level_color,children:v}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Change Alert",children:b}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Announcement",children:(0,e.createComponentVNode)(2,t.Button,{icon:"bullhorn",content:s,disabled:!i.authmax||i.msg_cooldown>0,onClick:function(){function x(){return p("announce")}return x}()})}),!!i.emagged&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transmit",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"broadcast-tower",color:"red",content:m,disabled:!i.authmax||i.cc_cooldown>0,onClick:function(){function x(){return p("MessageSyndicate")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync-alt",content:"Reset Relays",disabled:!i.authmax,onClick:function(){function x(){return p("RestoreBackup")}return x}()})]})||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transmit",children:(0,e.createComponentVNode)(2,t.Button,{icon:"broadcast-tower",content:m,disabled:!i.authmax||i.cc_cooldown>0,onClick:function(){function x(){return p("MessageCentcomm")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nuclear Device",children:(0,e.createComponentVNode)(2,t.Button,{icon:"bomb",content:c,disabled:!i.authmax||i.cc_cooldown>0,onClick:function(){function x(){return p("nukerequest")}return x}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Command Staff Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Displays",children:(0,e.createComponentVNode)(2,t.Button,{icon:"tv",content:"Change Status Displays",disabled:!i.authenticated,onClick:function(){function x(){return p("status")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Incoming Messages",children:(0,e.createComponentVNode)(2,t.Button,{icon:"folder-open",content:f,disabled:!i.authenticated,onClick:function(){function x(){return p("messagelist")}return x}()})})]})})]})});case 2:return(0,e.createComponentVNode)(2,o.Window,{width:500,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[u,(0,e.createComponentVNode)(2,t.Section,{title:"Modify Status Screens",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){function x(){return p("main")}return x}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Presets",children:g}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Alerts",children:h}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Message Line 1",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:i.stat_display.line_1,disabled:!i.authenticated,onClick:function(){function x(){return p("setmsg1")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Message Line 2",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:i.stat_display.line_2,disabled:!i.authenticated,onClick:function(){function x(){return p("setmsg2")}return x}()})})]})})]})});case 3:return(0,e.createComponentVNode)(2,o.Window,{width:500,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[u,C]})});default:return(0,e.createComponentVNode)(2,o.Window,{width:500,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[u,"ERRROR. Unknown menu_state: ",i.menu_state,"Please report this to NT Technical Support."]})})}}return y}()},21813:function(I,r,n){"use strict";r.__esModule=!0,r.Contractor=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),d=n(73379),y=n(98595);function V(b,g){b.prototype=Object.create(g.prototype),b.prototype.constructor=b,k(b,g)}function k(b,g){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(h,C){return h.__proto__=C,h},k(b,g)}var S={1:["ACTIVE","good"],2:["COMPLETED","good"],3:["FAILED","bad"]},p=["Recording biometric data...","Analyzing embedded syndicate info...","STATUS CONFIRMED","Contacting Syndicate database...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Response received, ack 4851234...","CONFIRM ACC "+Math.round(Math.random()*2e4),"Setting up private accounts...","CONTRACTOR ACCOUNT CREATED","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","CONTRACTS FOUND","WELCOME, AGENT"],i=r.Contractor=function(){function b(g,h){var C=(0,t.useBackend)(h),N=C.act,x=C.data,B;x.unauthorized?B=(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,e.createComponentVNode)(2,c,{height:"100%",allMessages:["ERROR: UNAUTHORIZED USER"],finishedTimeout:100,onFinished:function(){function T(){}return T}()})}):x.load_animation_completed?B=(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Flex.Item,{basis:"content",children:(0,e.createComponentVNode)(2,l)}),(0,e.createComponentVNode)(2,o.Flex.Item,{basis:"content",mt:"0.5rem",children:(0,e.createComponentVNode)(2,f)}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",overflow:"hidden",children:x.page===1?(0,e.createComponentVNode)(2,u,{height:"100%"}):(0,e.createComponentVNode)(2,m,{height:"100%"})})],4):B=(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,e.createComponentVNode)(2,c,{height:"100%",allMessages:p,finishedTimeout:3e3,onFinished:function(){function T(){return N("complete_load_animation")}return T}()})});var L=(0,t.useLocalState)(h,"viewingPhoto",""),w=L[0],A=L[1];return(0,e.createComponentVNode)(2,y.Window,{width:500,height:600,theme:"syndicate",children:[w&&(0,e.createComponentVNode)(2,v),(0,e.createComponentVNode)(2,y.Window.Content,{className:"Contractor",children:(0,e.createComponentVNode)(2,o.Flex,{direction:"column",height:"100%",children:B})})]})}return b}(),l=function(g,h){var C=(0,t.useBackend)(h),N=C.act,x=C.data,B=x.tc_available,L=x.tc_paid_out,w=x.completed_contracts,A=x.rep;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Summary",buttons:(0,e.createComponentVNode)(2,o.Box,{verticalAlign:"middle",mt:"0.25rem",children:[A," Rep"]})},g,{children:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Box,{flexBasis:"50%",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"TC Available",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,o.Flex,{align:"center",children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",children:[B," TC"]}),(0,e.createComponentVNode)(2,o.Button,{disabled:B<=0,content:"Claim",mx:"0.75rem",mb:"0",flexBasis:"content",onClick:function(){function T(){return N("claim")}return T}()})]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"TC Earned",children:[L," TC"]})]})}),(0,e.createComponentVNode)(2,o.Box,{flexBasis:"50%",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Contracts Completed",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,o.Box,{height:"20px",lineHeight:"20px",display:"inline-block",children:w})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Contractor Status",verticalAlign:"middle",children:"ACTIVE"})]})})]})})))},f=function(g,h){var C=(0,t.useBackend)(h),N=C.act,x=C.data,B=x.page;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Tabs,Object.assign({},g,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:B===1,onClick:function(){function L(){return N("page",{page:1})}return L}(),children:[(0,e.createComponentVNode)(2,o.Icon,{name:"suitcase"}),"Contracts"]}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:B===2,onClick:function(){function L(){return N("page",{page:2})}return L}(),children:[(0,e.createComponentVNode)(2,o.Icon,{name:"shopping-cart"}),"Hub"]})]})))},u=function(g,h){var C=(0,t.useBackend)(h),N=C.act,x=C.data,B=x.contracts,L=x.contract_active,w=x.can_extract,A=!!L&&B.filter(function(R){return R.status===1})[0],T=A&&A.time_left>0,E=(0,t.useLocalState)(h,"viewingPhoto",""),O=E[0],P=E[1];return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Available Contracts",overflow:"auto",buttons:(0,e.createComponentVNode)(2,o.Button,{disabled:!w||T,icon:"parachute-box",content:["Call Extraction",T&&(0,e.createComponentVNode)(2,d.Countdown,{timeLeft:A.time_left,format:function(){function R(F,j){return" ("+j.substr(3)+")"}return R}()})],onClick:function(){function R(){return N("extract")}return R}()})},g,{children:B.slice().sort(function(R,F){return R.status===1?-1:F.status===1?1:R.status-F.status}).map(function(R){var F;return(0,e.createComponentVNode)(2,o.Section,{title:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",color:R.status===1&&"good",children:R.target_name}),(0,e.createComponentVNode)(2,o.Flex.Item,{basis:"content",children:R.has_photo&&(0,e.createComponentVNode)(2,o.Button,{icon:"camera",mb:"-0.5rem",ml:"0.5rem",onClick:function(){function j(){return P("target_photo_"+R.uid+".png")}return j}()})})]}),className:"Contractor__Contract",buttons:(0,e.createComponentVNode)(2,o.Box,{width:"100%",children:[!!S[R.status]&&(0,e.createComponentVNode)(2,o.Box,{color:S[R.status][1],display:"inline-block",mt:R.status!==1&&"0.125rem",mr:"0.25rem",lineHeight:"20px",children:S[R.status][0]}),R.status===1&&(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"ban",color:"bad",content:"Abort",ml:"0.5rem",onClick:function(){function j(){return N("abort")}return j}()})]}),children:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"2",mr:"0.5rem",children:[R.fluff_message,!!R.completed_time&&(0,e.createComponentVNode)(2,o.Box,{color:"good",children:[(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Icon,{name:"check",mr:"0.5rem"}),"Contract completed at ",R.completed_time]}),!!R.dead_extraction&&(0,e.createComponentVNode)(2,o.Box,{color:"bad",mt:"0.5rem",bold:!0,children:[(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"Telecrystals reward reduced drastically as the target was dead during extraction."]}),!!R.fail_reason&&(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:[(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Icon,{name:"times",mr:"0.5rem"}),"Contract failed: ",R.fail_reason]})]}),(0,e.createComponentVNode)(2,o.Flex.Item,{flexBasis:"100%",children:[(0,e.createComponentVNode)(2,o.Flex,{mb:"0.5rem",color:"label",children:["Extraction Zone:\xA0",s(R)]}),(F=R.difficulties)==null?void 0:F.map(function(j,W){return(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:!!L,content:j.name+" ("+j.reward+" TC)",onClick:function(){function z(){return N("activate",{uid:R.uid,difficulty:W+1})}return z}()},W)}),!!R.objective&&(0,e.createComponentVNode)(2,o.Box,{color:"white",bold:!0,children:[R.objective.extraction_name,(0,e.createVNode)(1,"br"),"(",(R.objective.rewards.tc||0)+" TC",",\xA0",(R.objective.rewards.credits||0)+" Credits",")"]})]})]})},R.uid)})})))},s=function(g){if(!(!g.objective||g.status>1)){var h=g.objective.locs.user_area_id,C=g.objective.locs.user_coords,N=g.objective.locs.target_area_id,x=g.objective.locs.target_coords,B=h===N;return(0,e.createComponentVNode)(2,o.Flex.Item,{children:(0,e.createComponentVNode)(2,o.Icon,{name:B?"dot-circle-o":"arrow-alt-circle-right-o",color:B?"green":"yellow",rotation:B?null:-(0,a.rad2deg)(Math.atan2(x[1]-C[1],x[0]-C[0])),lineHeight:B?null:"0.85",size:"1.5"})})}},m=function(g,h){var C=(0,t.useBackend)(h),N=C.act,x=C.data,B=x.rep,L=x.buyables;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Available Purchases",overflow:"auto"},g,{children:L.map(function(w){return(0,e.createComponentVNode)(2,o.Section,{title:w.name,buttons:w.refundable&&(0,e.createComponentVNode)(2,o.Button.Confirm,{content:"Refund ("+w.cost+" Rep)",onClick:function(){function A(){return N("refund",{uid:w.uid})}return A}()}),children:[w.description,(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:B-1&&(0,e.createComponentVNode)(2,o.Box,{as:"span",color:w.stock===0?"bad":"good",ml:"0.5rem",children:[w.stock," in stock"]})]},w.uid)})})))},c=function(b){function g(C){var N;return N=b.call(this,C)||this,N.timer=null,N.state={currentIndex:0,currentDisplay:[]},N}V(g,b);var h=g.prototype;return h.tick=function(){function C(){var N=this.props,x=this.state;if(x.currentIndex<=N.allMessages.length){this.setState(function(L){return{currentIndex:L.currentIndex+1}});var B=x.currentDisplay;B.push(N.allMessages[x.currentIndex])}else clearTimeout(this.timer),setTimeout(N.onFinished,N.finishedTimeout)}return C}(),h.componentDidMount=function(){function C(){var N=this,x=this.props.linesPerSecond,B=x===void 0?2.5:x;this.timer=setInterval(function(){return N.tick()},1e3/B)}return C}(),h.componentWillUnmount=function(){function C(){clearTimeout(this.timer)}return C}(),h.render=function(){function C(){return(0,e.createComponentVNode)(2,o.Box,{m:1,children:this.state.currentDisplay.map(function(N){return(0,e.createFragment)([N,(0,e.createVNode)(1,"br")],0,N)})})}return C}(),g}(e.Component),v=function(g,h){var C=(0,t.useLocalState)(h,"viewingPhoto",""),N=C[0],x=C[1];return(0,e.createComponentVNode)(2,o.Modal,{className:"Contractor__photoZoom",children:[(0,e.createComponentVNode)(2,o.Box,{as:"img",src:N}),(0,e.createComponentVNode)(2,o.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){function B(){return x("")}return B}()})]})}},54151:function(I,r,n){"use strict";r.__esModule=!0,r.ConveyorSwitch=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.ConveyorSwitch=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.slowFactor,f=i.minSpeed,u=i.maxSpeed,s=i.oneWay,m=i.position;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:150,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Lever position",children:m>0?"forward":m<0?"reverse":"neutral"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Allow reverse",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!s,onClick:function(){function c(){return p("toggleOneWay")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Slowdown factor",children:(0,e.createComponentVNode)(2,t.Flex,{children:[(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-left",onClick:function(){function c(){return p("slowFactor",{value:l-.5})}return c}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-left",onClick:function(){function c(){return p("slowFactor",{value:l-.1})}return c}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Slider,{width:"100px",mx:"1px",value:l,fillValue:l,minValue:f,maxValue:u,step:.1,format:function(){function c(v){return v+"s."}return c}(),onChange:function(){function c(v,b){return p("slowFactor",{value:b})}return c}()})}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-right",onClick:function(){function c(){return p("slowFactor",{value:l+.1})}return c}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-right",onClick:function(){function c(){return p("slowFactor",{value:l+.5})}return c}()})," "]})]})})]})})})})}return y}()},73169:function(I,r,n){"use strict";r.__esModule=!0,r.CrewMonitor=void 0;var e=n(89005),a=n(88510),t=n(25328),o=n(72253),d=n(36036),y=n(36352),V=n(76910),k=n(98595),S=function(v,b){return v.dead?"Deceased":parseInt(v.health,10)<=b?"Critical":parseInt(v.stat,10)===1?"Unconscious":"Living"},p=function(v,b){return v.dead?"red":parseInt(v.health,10)<=b?"orange":parseInt(v.stat,10)===1?"blue":"green"},i=r.CrewMonitor=function(){function c(v,b){var g=(0,o.useBackend)(b),h=g.act,C=g.data,N=(0,o.useLocalState)(b,"tabIndex",C.IndexToggler),x=N[0],B=N[1],L=function(){function w(A){switch(A){case 0:return(0,e.createComponentVNode)(2,u);case 1:return(0,e.createComponentVNode)(2,s);case 2:return(0,e.createComponentVNode)(2,f);case 3:return(0,e.createComponentVNode)(2,m);default:return"WE SHOULDN'T BE HERE!"}}return w}();return(0,e.createComponentVNode)(2,k.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,k.Window.Content,{children:(0,e.createComponentVNode)(2,d.Box,{fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,d.Tabs,{children:[C.isBS?(0,e.createComponentVNode)(2,d.Tabs.Tab,{selected:x===0,onClick:function(){function w(){return B(0)}return w}(),children:[(0,e.createComponentVNode)(2,d.Icon,{name:"table"})," Command Data View"]},"ComDataView"):null,C.isBP?(0,e.createComponentVNode)(2,d.Tabs.Tab,{selected:x===1,onClick:function(){function w(){return B(1)}return w}(),children:[(0,e.createComponentVNode)(2,d.Icon,{name:"table"})," Security Data View"]},"SecDataView"):null,(0,e.createComponentVNode)(2,d.Tabs.Tab,{selected:x===2,onClick:function(){function w(){return B(2)}return w}(),children:[(0,e.createComponentVNode)(2,d.Icon,{name:"table"})," Data View"]},"DataView"),(0,e.createComponentVNode)(2,d.Tabs.Tab,{selected:x===3,onClick:function(){function w(){return B(3)}return w}(),children:[(0,e.createComponentVNode)(2,d.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),L(x)]})})})}return c}(),l=function(v){var b=v.crewData,g=v.context,h=(0,o.useBackend)(g),C=h.act,N=h.data,x=(0,a.sortBy)(function(T){return T.name})(b||[]),B=(0,o.useLocalState)(g,"search",""),L=B[0],w=B[1],A=(0,t.createSearch)(L,function(T){return T.name+"|"+T.assignment+"|"+T.area});return(0,e.createComponentVNode)(2,d.Box,{children:[(0,e.createComponentVNode)(2,d.Input,{placeholder:"Search by name, assignment or location..",width:"100%",onInput:function(){function T(E,O){return w(O)}return T}()}),(0,e.createComponentVNode)(2,d.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,d.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,d.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,d.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,d.Table.Cell,{children:"Location"})]}),x.filter(A).map(function(T){return(0,e.createComponentVNode)(2,d.Table.Row,{bold:!!T.is_command,children:[(0,e.createComponentVNode)(2,y.TableCell,{children:[T.name," (",T.assignment,")"]}),(0,e.createComponentVNode)(2,y.TableCell,{children:[(0,e.createComponentVNode)(2,d.Box,{inline:!0,color:p(T,N.critThreshold),children:S(T,N.critThreshold)}),T.sensor_type>=2?(0,e.createComponentVNode)(2,d.Box,{inline:!0,children:["(",(0,e.createComponentVNode)(2,d.Box,{inline:!0,color:V.COLORS.damageType.oxy,children:T.oxy}),"|",(0,e.createComponentVNode)(2,d.Box,{inline:!0,color:V.COLORS.damageType.toxin,children:T.tox}),"|",(0,e.createComponentVNode)(2,d.Box,{inline:!0,color:V.COLORS.damageType.burn,children:T.fire}),"|",(0,e.createComponentVNode)(2,d.Box,{inline:!0,color:V.COLORS.damageType.brute,children:T.brute}),")"]}):null]}),(0,e.createComponentVNode)(2,y.TableCell,{children:T.sensor_type===3?N.isAI?(0,e.createComponentVNode)(2,d.Button,{fluid:!0,icon:"location-arrow",content:T.area+" ("+T.x+", "+T.y+")",onClick:function(){function E(){return C("track",{track:T.ref})}return E}()}):T.area+" ("+T.x+", "+T.y+")":"Not Available"})]},T.ref)})]})]})},f=function(v,b){var g=(0,o.useBackend)(b),h=g.act,C=g.data,N=C.crewmembers||[];return(0,e.createComponentVNode)(2,l,{crewData:N,context:b})},u=function(v,b){var g=(0,o.useBackend)(b),h=g.act,C=g.data,N=C.crewmembers.filter(function(x){return x.is_command})||[];return(0,e.createComponentVNode)(2,l,{crewData:N,context:b})},s=function(v,b){var g=(0,o.useBackend)(b),h=g.act,C=g.data,N=C.crewmembers.filter(function(x){return x.is_security})||[];return(0,e.createComponentVNode)(2,l,{crewData:N,context:b})},m=function(v,b){var g=(0,o.useBackend)(b),h=g.act,C=g.data,N=C.stationLevelNum,x=C.stationLevelName,B=(0,o.useLocalState)(b,"zoom",1),L=B[0],w=B[1],A=(0,o.useLocalState)(b,"z_current",N[0]),T=A[0],E=A[1],O=function(j){return j.is_command&&C.isBS||j.is_security&&C.isBP?"square":"circle"},P=function(j){return j.is_command&&C.isBS||j.is_security&&C.isBP?10:6},R=function(j,W){return j.is_command&&C.isBS||j.is_security&&C.isBP?j.dead?"red":parseInt(j.health,10)<=W?"orange":parseInt(j.stat,10)===1?"blue":"violet":p(j,W)};return(0,e.createComponentVNode)(2,d.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,e.createComponentVNode)(2,d.NanoMap,{onZoom:function(){function F(j){return w(j)}return F}(),zLevels:N,zNames:x,z_current:T,setZCurrent:E,children:C.crewmembers.filter(function(F){return F.sensor_type===3}).map(function(F){return(0,e.createComponentVNode)(2,d.NanoMap.Marker,{x:F.x,y:F.y,z:F.z,z_current:T,zoom:L,icon:O(F),size:P(F),tooltip:F.name+" ("+F.assignment+")",color:R(F,C.critThreshold),onClick:function(){function j(){C.isAI&&h("track",{track:F.ref})}return j}()},F.ref)})})})}},63987:function(I,r,n){"use strict";r.__esModule=!0,r.Cryo=void 0;var e=n(89005),a=n(41260),t=n(72253),o=n(36036),d=n(98595),y=[{label:"\u0410\u0441\u0444\u0438\u043A\u0441\u0438\u044F",type:"oxyLoss"},{label:"\u0418\u043D\u0442\u043E\u043A\u0441\u0438\u043A\u0430\u0446\u0438\u044F",type:"toxLoss"},{label:"\u0420\u0430\u043D\u044B",type:"bruteLoss"},{label:"\u041E\u0436\u043E\u0433\u0438",type:"fireLoss"}],V=[["good","\u0412 \u0441\u043E\u0437\u043D\u0430\u043D\u0438\u0438"],["average","\u0411\u0435\u0437 \u0441\u043E\u0437\u043D\u0430\u043D\u0438\u044F"],["bad","\u0422\u0420\u0423\u041F"]],k=r.Cryo=function(){function i(l,f){return(0,e.createComponentVNode)(2,d.Window,{width:520,height:490,children:(0,e.createComponentVNode)(2,d.Window.Content,{children:(0,e.createComponentVNode)(2,S)})})}return i}(),S=function(l,f){var u=(0,t.useBackend)(f),s=u.act,m=u.data,c=m.isOperating,v=m.hasOccupant,b=m.occupant,g=b===void 0?[]:b,h=m.cellTemperature,C=m.cellTemperatureStatus,N=m.isBeakerLoaded,x=m.auto_eject_healthy,B=m.auto_eject_dead;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:2,children:(0,e.createComponentVNode)(2,o.Section,{title:"\u041F\u0430\u0446\u0438\u0435\u043D\u0442",fill:!0,buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"user-slash",onClick:function(){function L(){return s("ejectOccupant")}return L}(),disabled:!v,children:"\u0418\u0437\u0432\u043B\u0435\u0447\u044C"}),children:v?(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u041F\u0430\u0446\u0438\u0435\u043D\u0442",children:g.name||"\u0418\u043C\u044F \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u043E"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0417\u0434\u043E\u0440\u043E\u0432\u044C\u0435",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:g.health,max:g.maxHealth,value:g.health/g.maxHealth,color:g.health>0?"good":"average",children:(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:Math.round(g.health)})})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0421\u0442\u0430\u0442\u0443\u0441",color:V[g.stat][0],children:V[g.stat][1]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0422\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430",children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:Math.round(g.bodyTemperature)})," ","K"]}),(0,e.createComponentVNode)(2,o.LabeledList.Divider),y.map(function(L){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:L.label,children:(0,e.createComponentVNode)(2,o.ProgressBar,{value:g[L.type]/100,ranges:{bad:[.01,1/0]},children:(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:Math.round(g[L.type])})})},L.id)})]}):(0,e.createComponentVNode)(2,o.Stack,{fill:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:"1",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"\u041F\u0430\u0446\u0438\u0435\u043D\u0442 \u043D\u0435 \u043E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D."]})})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{title:"\u041A\u0440\u0438\u043E\u043A\u0430\u043F\u0441\u0443\u043B\u0430",fill:!0,buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"eject",onClick:function(){function L(){return s("ejectBeaker")}return L}(),disabled:!N,children:"\u0418\u0437\u0432\u043B\u0435\u0447\u044C \u0451\u043C\u043A\u043E\u0441\u0442\u044C"}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u041F\u0438\u0442\u0430\u043D\u0438\u0435",children:(0,e.createComponentVNode)(2,o.Button,{icon:"power-off",onClick:function(){function L(){return s(c?"switchOff":"switchOn")}return L}(),selected:c,children:c?"\u0412\u043A\u043B":"\u0412\u044B\u043A\u043B"})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0422\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430",color:C,children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:h})," K"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0401\u043C\u043A\u043E\u0441\u0442\u044C",children:(0,e.createComponentVNode)(2,p)}),(0,e.createComponentVNode)(2,o.LabeledList.Divider),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0410\u0432\u0442\u043E\u0438\u0437\u0432\u043B\u0435\u0447\u0435\u043D\u0438\u0435 \u0437\u0434\u043E\u0440\u043E\u0432\u044B\u0445 \u043F\u0430\u0446\u0438\u0435\u043D\u0442\u043E\u0432",children:(0,e.createComponentVNode)(2,o.Button,{icon:x?"toggle-on":"toggle-off",selected:x,onClick:function(){function L(){return s(x?"auto_eject_healthy_off":"auto_eject_healthy_on")}return L}(),children:x?"\u0412\u043A\u043B":"\u0412\u044B\u043A\u043B"})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0410\u0432\u0442\u043E\u0438\u0437\u0432\u043B\u0435\u0447\u0435\u043D\u0438\u0435 \u043C\u0451\u0440\u0442\u0432\u044B\u0445 \u043F\u0430\u0446\u0438\u0435\u043D\u0442\u043E\u0432",children:(0,e.createComponentVNode)(2,o.Button,{icon:B?"toggle-on":"toggle-off",selected:B,onClick:function(){function L(){return s(B?"auto_eject_dead_off":"auto_eject_dead_on")}return L}(),children:B?"\u0412\u043A\u043B":"\u0412\u044B\u043A\u043B"})})]})})})]})},p=function(l,f){var u=(0,t.useBackend)(f),s=u.act,m=u.data,c=m.isBeakerLoaded,v=m.beakerLabel,b=m.beakerVolume;return c?(0,e.createFragment)([v?"\xAB"+v+"\xBB":(0,e.createComponentVNode)(2,o.Box,{color:"average",children:"\u0401\u043C\u043A\u043E\u0441\u0442\u044C \u043D\u0435 \u043F\u043E\u0434\u043F\u0438\u0441\u0430\u043D\u0430"}),(0,e.createComponentVNode)(2,o.Box,{color:!b&&"bad",children:b?(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:b,format:function(){function g(h){var C=Math.round(h),N=(0,a.declensionRu)(C,"\u041E\u0441\u0442\u0430\u043B\u0430\u0441\u044C","\u041E\u0441\u0442\u0430\u043B\u0438\u0441\u044C","\u041E\u0441\u0442\u0430\u043B\u043E\u0441\u044C"),x=(0,a.declensionRu)(C,"\u0435\u0434\u0438\u043D\u0438\u0446\u0430","\u0435\u0434\u0438\u043D\u0438\u0446\u044B","\u0435\u0434\u0438\u043D\u0438\u0446");return N+" "+C+" "+x}return g}()}):"\u0401\u043C\u043A\u043E\u0441\u0442\u044C \u043F\u0443\u0441\u0442\u0430"})],0):(0,e.createComponentVNode)(2,o.Box,{color:"average",children:"\u0401\u043C\u043A\u043E\u0441\u0442\u044C \u043D\u0435 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0430"})}},86099:function(I,r,n){"use strict";r.__esModule=!0,r.CryopodConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=n(25328),y=r.CryopodConsole=function(){function S(p,i){var l=(0,a.useBackend)(i),f=l.data,u=f.account_name,s=f.allow_items;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:480,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Hello, "+(u||"[REDACTED]")+"!",children:"This automated cryogenic freezing unit will safely store your corporeal form until your next assignment."}),(0,e.createComponentVNode)(2,V),!!s&&(0,e.createComponentVNode)(2,k)]})})}return S}(),V=function(p,i){var l=(0,a.useBackend)(i),f=l.data,u=f.frozen_crew;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Stored Crew",children:u.length?(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:u.map(function(s,m){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:s.name,children:s.rank},m)})})}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No stored crew!"})})},k=function(p,i){var l=(0,a.useBackend)(i),f=l.act,u=l.data,s=u.frozen_items,m=function(v){var b=v.toString();return b.startsWith("the ")&&(b=b.slice(4,b.length)),(0,d.toTitleCase)(b)};return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Stored Items",children:s.length?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:s.map(function(c){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:m(c.name),buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",content:"Drop",mr:1,onClick:function(){function v(){return f("one_item",{item:c.uid})}return v}()})},c)})})}),(0,e.createComponentVNode)(2,t.Button,{content:"Drop All Items",color:"red",onClick:function(){function c(){return f("all_items")}return c}()})],4):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No stored items!"})})}},94848:function(I,r,n){"use strict";r.__esModule=!0,r.Customat=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),d=n(98595),y=function(S,p){var i=(0,t.useBackend)(p),l=i.act,f=i.data,u=S.product,s=f.user,m=f.userMoney,c=f.vend_ready,v=u.price===0,b="ERROR!",g="";v?(b="FREE",g="arrow-circle-down"):(b=u.price,g="shopping-cart");var h=!c||u.stock===0||!v&&u.price>m;return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+u.icon,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,e.createComponentVNode)(2,o.Table.Cell,{bold:!0,children:u.name}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,o.Box,{color:u.stock<=0&&"bad"||"good",children:[u.stock," in stock"]})}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,disabled:h,icon:g,content:b,textAlign:"left",onClick:function(){function C(){return l("vend",{Key:u.Key})}return C}()})})]})},V=r.Customat=function(){function k(S,p){var i=(0,t.useBackend)(p),l=i.act,f=i.data,u=f.guestNotice,s=f.userMoney,m=f.user,c=f.products,v=f.vend_ready,b=f.panel_open,g=f.speaker;return(0,e.createComponentVNode)(2,d.Window,{width:470,height:600,title:"Customat",children:(0,e.createComponentVNode)(2,d.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Section,{title:"User",children:m&&(0,e.createComponentVNode)(2,o.Box,{children:["Welcome, ",(0,e.createVNode)(1,"b",null,m.name,0),", ",(0,e.createVNode)(1,"b",null,m.job||"Unemployed",0),"!",(0,e.createVNode)(1,"br"),"Your balance is ",(0,e.createVNode)(1,"b",null,[s,(0,e.createTextVNode)(" credits")],0),"."]})||(0,e.createComponentVNode)(2,o.Box,{color:"light-grey",children:u})}),!!b&&(0,e.createComponentVNode)(2,o.Section,{title:"Maintenance",children:(0,e.createComponentVNode)(2,o.Button,{icon:g?"check":"volume-mute",selected:g,content:"Speaker",textAlign:"left",onClick:function(){function h(){return l("toggle_voice",{})}return h}()})})]}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{title:"Products",fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{children:c.map(function(h){return(0,e.createComponentVNode)(2,y,{product:h,productStock:h.stock},h.name)})})})})]})})})}return k}()},12692:function(I,r,n){"use strict";r.__esModule=!0,r.DNAModifier=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=n(3939),y=[["good","Alive"],["average","Critical"],["bad","DEAD"]],V=[["ui","Modify U.I.","dna"],["se","Modify S.E.","dna"],["buffer","Transfer Buffers","syringe"],["rejuvenators","Rejuvenators","flask"]],k=[5,10,20,30,50],S=r.DNAModifier=function(){function h(C,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,w=L.irradiating,A=L.dnaBlockSize,T=L.occupant;N.dnaBlockSize=A,N.isDNAInvalid=!T.isViableSubject||!T.uniqueIdentity||!T.structuralEnzymes;var E;return w&&(E=(0,e.createComponentVNode)(2,b,{duration:w})),(0,e.createComponentVNode)(2,o.Window,{width:660,height:775,children:[(0,e.createComponentVNode)(2,d.ComplexModal),E,(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,p)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,i)})]})})]})}return h}(),p=function(C,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,w=L.locked,A=L.hasOccupant,T=L.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"Occupant",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{color:"label",inline:!0,mr:"0.5rem",children:"Door Lock:"}),(0,e.createComponentVNode)(2,t.Button,{disabled:!A,selected:w,icon:w?"toggle-on":"toggle-off",content:w?"Engaged":"Disengaged",onClick:function(){function E(){return B("toggleLock")}return E}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!A||w,icon:"user-slash",content:"Eject",onClick:function(){function E(){return B("ejectOccupant")}return E}()})],4),children:A?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:T.name}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:T.minHealth,max:T.maxHealth,value:T.health/T.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:y[T.stat][0],children:y[T.stat][1]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider)]})}),N.isDNAInvalid?(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-circle"}),"\xA0 The occupant's DNA structure is ruined beyond recognition, please insert a subject with an intact DNA structure."]}):(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Radiation",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:"0",max:"100",value:T.radiationLevel/100,color:"average"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Unique Enzymes",children:L.occupant.uniqueEnzymes?L.occupant.uniqueEnzymes:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-circle"}),"\xA0 Unknown"]})})]})],0):(0,e.createComponentVNode)(2,t.Box,{color:"label",children:"Cell unoccupied."})})},i=function(C,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,w=L.selectedMenuKey,A=L.hasOccupant,T=L.occupant;if(A){if(N.isDNAInvalid)return(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No operation possible on this subject."]})})})}else return(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No occupant in DNA modifier."]})})});var E;return w==="ui"?E=(0,e.createFragment)([(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,u)],4):w==="se"?E=(0,e.createFragment)([(0,e.createComponentVNode)(2,f),(0,e.createComponentVNode)(2,u)],4):w==="buffer"?E=(0,e.createComponentVNode)(2,s):w==="rejuvenators"&&(E=(0,e.createComponentVNode)(2,v)),(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Tabs,{children:V.map(function(O,P){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:O[2],selected:w===O[0],onClick:function(){function R(){return B("selectMenuKey",{key:O[0]})}return R}(),children:O[1]},P)})}),E]})},l=function(C,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,w=L.selectedUIBlock,A=L.selectedUISubBlock,T=L.selectedUITarget,E=L.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"Modify Unique Identifier",children:[(0,e.createComponentVNode)(2,g,{dnaString:E.uniqueIdentity,selectedBlock:w,selectedSubblock:A,blockSize:N.dnaBlockSize,action:"selectUIBlock"}),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:15,stepPixelSize:"20",value:T,format:function(){function O(P){return P.toString(16).toUpperCase()}return O}(),ml:"0",onChange:function(){function O(P,R){return B("changeUITarget",{value:R})}return O}()})})}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"Irradiate Block",mt:"0.5rem",onClick:function(){function O(){return B("pulseUIRadiation")}return O}()})]})},f=function(C,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,w=L.selectedSEBlock,A=L.selectedSESubBlock,T=L.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"Modify Structural Enzymes",children:[(0,e.createComponentVNode)(2,g,{dnaString:T.structuralEnzymes,selectedBlock:w,selectedSubblock:A,blockSize:N.dnaBlockSize,action:"selectSEBlock"}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"Irradiate Block",onClick:function(){function E(){return B("pulseSERadiation")}return E}()})]})},u=function(C,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,w=L.radiationIntensity,A=L.radiationDuration;return(0,e.createComponentVNode)(2,t.Section,{title:"Radiation Emitter",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Intensity",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:10,stepPixelSize:20,value:w,popUpPosition:"right",ml:"0",onChange:function(){function T(E,O){return B("radiationIntensity",{value:O})}return T}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Duration",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:20,stepPixelSize:10,unit:"s",value:A,popUpPosition:"right",ml:"0",onChange:function(){function T(E,O){return B("radiationDuration",{value:O})}return T}()})})]}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"Pulse Radiation",tooltip:"Mutates a random block of either the occupant's UI or SE.",tooltipPosition:"top-start",mt:"0.5rem",onClick:function(){function T(){return B("pulseRadiation")}return T}()})]})},s=function(C,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,w=L.buffers,A=w.map(function(T,E){return(0,e.createComponentVNode)(2,m,{id:E+1,name:"Buffer "+(E+1),buffer:T},E)});return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{height:"75%",mt:1,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Buffers",children:A})}),(0,e.createComponentVNode)(2,t.Stack.Item,{height:"25%",children:(0,e.createComponentVNode)(2,c)})]})},m=function(C,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,w=C.id,A=C.name,T=C.buffer,E=L.isInjectorReady,O=A+(T.data?" - "+T.label:"");return(0,e.createComponentVNode)(2,t.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,e.createComponentVNode)(2,t.Section,{title:O,mx:"0",lineHeight:"18px",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Confirm,{disabled:!T.data,icon:"trash",content:"Clear",onClick:function(){function P(){return B("bufferOption",{option:"clear",id:w})}return P}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!T.data,icon:"pen",content:"Rename",onClick:function(){function P(){return B("bufferOption",{option:"changeLabel",id:w})}return P}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!T.data||!L.hasDisk,icon:"save",content:"Export",tooltip:"Exports this buffer to the currently loaded data disk.",tooltipPosition:"bottom-start",onClick:function(){function P(){return B("bufferOption",{option:"saveDisk",id:w})}return P}()})],4),children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Write",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"Subject U.I",mb:"0",onClick:function(){function P(){return B("bufferOption",{option:"saveUI",id:w})}return P}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"Subject U.I and U.E.",mb:"0",onClick:function(){function P(){return B("bufferOption",{option:"saveUIAndUE",id:w})}return P}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"Subject S.E.",mb:"0",onClick:function(){function P(){return B("bufferOption",{option:"saveSE",id:w})}return P}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!L.hasDisk||!L.disk.data,icon:"arrow-circle-down",content:"From Disk",mb:"0",onClick:function(){function P(){return B("bufferOption",{option:"loadDisk",id:w})}return P}()})]}),!!T.data&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subject",children:T.owner||(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Unknown"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Data Type",children:[T.type==="ui"?"Unique Identifiers":"Structural Enzymes",!!T.ue&&" and Unique Enzymes"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transfer to",children:[(0,e.createComponentVNode)(2,t.Button,{disabled:!E,icon:E?"syringe":"spinner",iconSpin:!E,content:"Injector",mb:"0",onClick:function(){function P(){return B("bufferOption",{option:"createInjector",id:w})}return P}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!E,icon:E?"syringe":"spinner",iconSpin:!E,content:"Block Injector",mb:"0",onClick:function(){function P(){return B("bufferOption",{option:"createInjector",id:w,block:1})}return P}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"user",content:"Subject",mb:"0",onClick:function(){function P(){return B("bufferOption",{option:"transfer",id:w})}return P}()})]})],4)]}),!T.data&&(0,e.createComponentVNode)(2,t.Box,{color:"label",mt:"0.5rem",children:"This buffer is empty."})]})})},c=function(C,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,w=L.hasDisk,A=L.disk;return(0,e.createComponentVNode)(2,t.Section,{title:"Data Disk",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Confirm,{disabled:!w||!A.data,icon:"trash",content:"Wipe",onClick:function(){function T(){return B("wipeDisk")}return T}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!w,icon:"eject",content:"Eject",onClick:function(){function T(){return B("ejectDisk")}return T}()})],4),children:w?A.data?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Label",children:A.label?A.label:"No label"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subject",children:A.owner?A.owner:(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Unknown"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Data Type",children:[A.type==="ui"?"Unique Identifiers":"Structural Enzymes",!!A.ue&&" and Unique Enzymes"]})]}):(0,e.createComponentVNode)(2,t.Box,{color:"label",children:"Disk is blank."}):(0,e.createComponentVNode)(2,t.Box,{color:"label",textAlign:"center",my:"1rem",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"save-o",size:"4"}),(0,e.createVNode)(1,"br"),"No disk inserted."]})})},v=function(C,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,w=L.isBeakerLoaded,A=L.beakerVolume,T=L.beakerLabel;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Rejuvenators and Beaker",buttons:(0,e.createComponentVNode)(2,t.Button,{disabled:!w,icon:"eject",content:"Eject",onClick:function(){function E(){return B("ejectBeaker")}return E}()}),children:w?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Inject",children:[k.map(function(E,O){return(0,e.createComponentVNode)(2,t.Button,{disabled:E>A,icon:"syringe",content:E,onClick:function(){function P(){return B("injectRejuvenators",{amount:E})}return P}()},O)}),(0,e.createComponentVNode)(2,t.Button,{disabled:A<=0,icon:"syringe",content:"All",onClick:function(){function E(){return B("injectRejuvenators",{amount:A})}return E}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Beaker",children:[(0,e.createComponentVNode)(2,t.Box,{mb:"0.5rem",children:T||"No label"}),A?(0,e.createComponentVNode)(2,t.Box,{color:"good",children:[A," unit",A===1?"":"s"," remaining"]}):(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"Empty"})]})]}):(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"flask",size:5,color:"silver"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"h3",null,"No beaker loaded.",16)]})})})},b=function(C,N){return(0,e.createComponentVNode)(2,t.Dimmer,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"spinner",size:"5",spin:!0}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{color:"average",children:(0,e.createVNode)(1,"h1",null,[(0,e.createComponentVNode)(2,t.Icon,{name:"radiation"}),(0,e.createTextVNode)("\xA0Irradiating occupant\xA0"),(0,e.createComponentVNode)(2,t.Icon,{name:"radiation"})],4)}),(0,e.createComponentVNode)(2,t.Box,{color:"label",children:(0,e.createVNode)(1,"h3",null,[(0,e.createTextVNode)("For "),C.duration,(0,e.createTextVNode)(" second"),C.duration===1?"":"s"],0)})]})},g=function(C,N){for(var x=(0,a.useBackend)(N),B=x.act,L=x.data,w=C.dnaString,A=C.selectedBlock,T=C.selectedSubblock,E=C.blockSize,O=C.action,P=w.split(""),R=0,F=[],j=function(){for(var H=W/E+1,$=[],G=function(){var he=ne+1;$.push((0,e.createComponentVNode)(2,t.Button,{selected:A===H&&T===he,content:P[W+ne],mb:"0",onClick:function(){function Ve(){return B(O,{block:H,subblock:he})}return Ve}()}))},ne=0;ne0?"Yes":"No",selected:i.com>0,onClick:function(){function f(){return p("toggle_com")}return f}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Security",children:l.map(function(f,u){return(0,e.createComponentVNode)(2,t.Button,{selected:i.sec===f,content:f,onClick:function(){function s(){return p("set_sec",{set_sec:f})}return s}()},"sec"+f)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Medical",children:l.map(function(f,u){return(0,e.createComponentVNode)(2,t.Button,{selected:i.med===f,content:f,onClick:function(){function s(){return p("set_med",{set_med:f})}return s}()},"med"+f)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Engineering",children:l.map(function(f,u){return(0,e.createComponentVNode)(2,t.Button,{selected:i.eng===f,content:f,onClick:function(){function s(){return p("set_eng",{set_eng:f})}return s}()},"eng"+f)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Paranormal",children:l.map(function(f,u){return(0,e.createComponentVNode)(2,t.Button,{selected:i.par===f,content:f,onClick:function(){function s(){return p("set_par",{set_par:f})}return s}()},"par"+f)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Janitor",children:l.map(function(f,u){return(0,e.createComponentVNode)(2,t.Button,{selected:i.jan===f,content:f,onClick:function(){function s(){return p("set_jan",{set_jan:f})}return s}()},"jan"+f)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cyborg",children:l.map(function(f,u){return(0,e.createComponentVNode)(2,t.Button,{selected:i.cyb===f,content:f,onClick:function(){function s(){return p("set_cyb",{set_cyb:f})}return s}()},"cyb"+f)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Slots",children:(0,e.createComponentVNode)(2,t.Box,{color:i.total>i.spawnpoints?"red":"green",children:[i.total," total, versus ",i.spawnpoints," spawnpoints"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Dispatch",children:(0,e.createComponentVNode)(2,t.Button,{icon:"ambulance",content:"Send ERT",onClick:function(){function f(){return p("dispatch_ert")}return f}()})})]})})]})})}return y}()},82565:function(I,r,n){"use strict";r.__esModule=!0,r.Electropack=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),d=n(98595),y=r.Electropack=function(){function V(k,S){var p=(0,t.useBackend)(S),i=p.act,l=p.data,f=l.power,u=l.code,s=l.frequency,m=l.minFrequency,c=l.maxFrequency;return(0,e.createComponentVNode)(2,d.Window,{width:360,height:150,children:(0,e.createComponentVNode)(2,d.Window.Content,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,o.Button,{icon:f?"power-off":"times",content:f?"On":"Off",selected:f,onClick:function(){function v(){return i("power")}return v}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Frequency",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Reset",onClick:function(){function v(){return i("reset",{reset:"freq"})}return v}()}),children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:m/10,maxValue:c/10,value:s/10,format:function(){function v(b){return(0,a.toFixed)(b,1)}return v}(),width:"80px",onChange:function(){function v(b,g){return i("freq",{freq:g})}return v}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Code",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Reset",onClick:function(){function v(){return i("reset",{reset:"code"})}return v}()}),children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:u,width:"80px",onChange:function(){function v(b,g){return i("code",{code:g})}return v}()})})]})})})})}return V}()},36730:function(I,r,n){"use strict";r.__esModule=!0,r.EvolutionMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.EvolutionMenu=function(){function k(S,p){return(0,e.createComponentVNode)(2,o.Window,{width:480,height:574,theme:"changeling",children:(0,e.createComponentVNode)(2,o.Window.Content,{className:"Layout__content--flexColumn",children:[(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,V)]})})}return k}(),y=function(S,p){var i=(0,a.useBackend)(p),l=i.act,f=i.data,u=f.evo_points,s=f.can_respec;return(0,e.createComponentVNode)(2,t.Section,{title:"Evolution Points",height:5.5,children:(0,e.createComponentVNode)(2,t.Flex,{children:[(0,e.createComponentVNode)(2,t.Flex.Item,{mt:.5,color:"label",children:"Points remaining:"}),(0,e.createComponentVNode)(2,t.Flex.Item,{mt:.5,ml:2,bold:!0,color:"#1b945c",children:u}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{ml:2.5,disabled:!s,content:"Readapt",icon:"sync",onClick:function(){function m(){return l("readapt")}return m}()}),(0,e.createComponentVNode)(2,t.Button,{tooltip:"By transforming a humanoid into a husk, we gain the ability to readapt our chosen evolutions.",tooltipPosition:"bottom",icon:"question-circle"})]})]})})},V=function(S,p){var i=(0,a.useBackend)(p),l=i.act,f=i.data,u=f.evo_points,s=f.ability_list,m=f.purchased_abilities,c=f.view_mode;return(0,e.createComponentVNode)(2,t.Section,{title:"Abilities",flexGrow:"1",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:c?"square-o":"check-square-o",selected:!c,content:"Compact",onClick:function(){function v(){return l("set_view_mode",{mode:0})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{icon:c?"check-square-o":"square-o",selected:c,content:"Expanded",onClick:function(){function v(){return l("set_view_mode",{mode:1})}return v}()})],4),children:s.map(function(v,b){return(0,e.createComponentVNode)(2,t.Box,{p:.5,mx:-1,className:"candystripe",children:[(0,e.createComponentVNode)(2,t.Flex,{align:"center",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{ml:.5,color:"#dedede",children:v.name}),m.includes(v.power_path)&&(0,e.createComponentVNode)(2,t.Flex.Item,{ml:2,bold:!0,color:"#1b945c",children:"(Purchased)"}),(0,e.createComponentVNode)(2,t.Flex.Item,{mr:3,textAlign:"right",grow:1,children:[(0,e.createComponentVNode)(2,t.Box,{as:"span",color:"label",children:["Cost:"," "]}),(0,e.createComponentVNode)(2,t.Box,{as:"span",bold:!0,color:"#1b945c",children:v.cost})]}),(0,e.createComponentVNode)(2,t.Flex.Item,{textAlign:"right",children:(0,e.createComponentVNode)(2,t.Button,{mr:.5,disabled:v.cost>u||m.includes(v.power_path),content:"Evolve",onClick:function(){function g(){return l("purchase",{power_path:v.power_path})}return g}()})})]}),!!c&&(0,e.createComponentVNode)(2,t.Flex,{color:"#8a8a8a",my:1,ml:1.5,width:"95%",children:v.description+" "+v.helptext})]},b)})})}},17370:function(I,r,n){"use strict";r.__esModule=!0,r.ExosuitFabricator=void 0;var e=n(89005),a=n(35840),t=n(25328),o=n(72253),d=n(36036),y=n(73379),V=n(98595),k=["id","amount","lineDisplay","onClick"];function S(b,g){if(b==null)return{};var h={};for(var C in b)if({}.hasOwnProperty.call(b,C)){if(g.includes(C))continue;h[C]=b[C]}return h}var p=2e3,i={bananium:"clown",tranquillite:"mime"},l=r.ExosuitFabricator=function(){function b(g,h){var C=(0,o.useBackend)(h),N=C.act,x=C.data,B=x.building;return(0,e.createComponentVNode)(2,V.Window,{width:950,height:625,children:(0,e.createComponentVNode)(2,V.Window.Content,{className:"Exofab",children:(0,e.createComponentVNode)(2,d.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,d.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,d.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,d.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,u)}),B&&(0,e.createComponentVNode)(2,d.Stack.Item,{children:(0,e.createComponentVNode)(2,s)})]})}),(0,e.createComponentVNode)(2,d.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,d.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,d.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f)}),(0,e.createComponentVNode)(2,d.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,m)})]})})]})})})}return b}(),f=function(g,h){var C=(0,o.useBackend)(h),N=C.act,x=C.data,B=x.materials,L=x.capacity,w=Object.values(B).reduce(function(A,T){return A+T},0);return(0,e.createComponentVNode)(2,d.Section,{fill:!0,scrollable:!0,title:"Materials",className:"Exofab__materials",buttons:(0,e.createComponentVNode)(2,d.Box,{color:"label",mt:"0.25rem",children:[(w/L*100).toPrecision(3),"% full"]}),children:["metal","glass","silver","gold","uranium","titanium","plasma","diamond","bluespace","bananium","tranquillite","plastic"].map(function(A){return(0,e.createComponentVNode)(2,c,{mt:-2,id:A,bold:A==="metal"||A==="glass",onClick:function(){function T(){return N("withdraw",{id:A})}return T}()},A)})})},u=function(g,h){var C=(0,o.useBackend)(h),N=C.act,x=C.data,B=x.curCategory,L=x.categories,w=x.designs,A=x.syncing,T=(0,o.useLocalState)(h,"searchText",""),E=T[0],O=T[1],P=(0,t.createSearch)(E,function(F){return F.name}),R=w.filter(P);return(0,e.createComponentVNode)(2,d.Section,{fill:!0,scrollable:!0,className:"Exofab__designs",title:(0,e.createComponentVNode)(2,d.Dropdown,{className:"Exofab__dropdown",selected:B,options:L,onSelected:function(){function F(j){return N("category",{cat:j})}return F}()}),buttons:(0,e.createComponentVNode)(2,d.Box,{mt:"2px",children:[(0,e.createComponentVNode)(2,d.Button,{icon:"plus",content:"Queue all",onClick:function(){function F(){return N("queueall")}return F}()}),(0,e.createComponentVNode)(2,d.Button,{disabled:A,iconSpin:A,icon:"sync-alt",content:A?"Synchronizing...":"Synchronize with R&D servers",onClick:function(){function F(){return N("sync")}return F}()})]}),children:[(0,e.createComponentVNode)(2,d.Input,{placeholder:"Search by name...",mb:"0.5rem",width:"100%",onInput:function(){function F(j,W){return O(W)}return F}()}),R.map(function(F){return(0,e.createComponentVNode)(2,v,{design:F},F.id)}),R.length===0&&(0,e.createComponentVNode)(2,d.Box,{color:"label",children:"No designs found."})]})},s=function(g,h){var C=(0,o.useBackend)(h),N=C.act,x=C.data,B=x.building,L=x.buildStart,w=x.buildEnd,A=x.worldTime;return(0,e.createComponentVNode)(2,d.Section,{className:"Exofab__building",stretchContents:!0,children:(0,e.createComponentVNode)(2,d.ProgressBar.Countdown,{start:L,current:A,end:w,children:(0,e.createComponentVNode)(2,d.Stack,{children:[(0,e.createComponentVNode)(2,d.Stack.Item,{children:(0,e.createComponentVNode)(2,d.Icon,{name:"cog",spin:!0})}),(0,e.createComponentVNode)(2,d.Stack.Item,{children:["Building ",B,"\xA0(",(0,e.createComponentVNode)(2,y.Countdown,{current:A,timeLeft:w-A,format:function(){function T(E,O){return O.substr(3)}return T}()}),")"]})]})})})},m=function(g,h){var C=(0,o.useBackend)(h),N=C.act,x=C.data,B=x.queue,L=x.processingQueue,w=Object.entries(x.queueDeficit).filter(function(T){return T[1]<0}),A=B.reduce(function(T,E){return T+E.time},0);return(0,e.createComponentVNode)(2,d.Section,{fill:!0,scrollable:!0,className:"Exofab__queue",title:"Queue",buttons:(0,e.createComponentVNode)(2,d.Box,{children:[(0,e.createComponentVNode)(2,d.Button,{selected:L,icon:L?"toggle-on":"toggle-off",content:"Process",onClick:function(){function T(){return N("process")}return T}()}),(0,e.createComponentVNode)(2,d.Button,{disabled:B.length===0,icon:"eraser",content:"Clear",onClick:function(){function T(){return N("unqueueall")}return T}()})]}),children:(0,e.createComponentVNode)(2,d.Stack,{fill:!0,vertical:!0,children:B.length===0?(0,e.createComponentVNode)(2,d.Box,{color:"label",children:"The queue is empty."}):(0,e.createFragment)([(0,e.createComponentVNode)(2,d.Stack.Item,{className:"Exofab__queue--queue",grow:!0,overflow:"auto",children:B.map(function(T,E){return(0,e.createComponentVNode)(2,d.Box,{color:T.notEnough&&"bad",children:[E+1,". ",T.name,E>0&&(0,e.createComponentVNode)(2,d.Button,{icon:"arrow-up",onClick:function(){function O(){return N("queueswap",{from:E+1,to:E})}return O}()}),E0&&(0,e.createComponentVNode)(2,d.Stack.Item,{className:"Exofab__queue--time",children:[(0,e.createComponentVNode)(2,d.Divider),"Processing time:",(0,e.createComponentVNode)(2,d.Icon,{name:"clock",mx:"0.5rem"}),(0,e.createComponentVNode)(2,d.Box,{inline:!0,bold:!0,children:new Date(A/10*1e3).toISOString().substr(14,5)})]}),Object.keys(w).length>0&&(0,e.createComponentVNode)(2,d.Stack.Item,{className:"Exofab__queue--deficit",shrink:"0",children:[(0,e.createComponentVNode)(2,d.Divider),"Lacking materials to complete:",w.map(function(T){return(0,e.createComponentVNode)(2,d.Box,{children:(0,e.createComponentVNode)(2,c,{id:T[0],amount:-T[1],lineDisplay:!0})},T[0])})]})],0)})})},c=function(g,h){var C=(0,o.useBackend)(h),N=C.act,x=C.data,B=g.id,L=g.amount,w=g.lineDisplay,A=g.onClick,T=S(g,k),E=x.materials[B]||0,O=L||E;if(!(O<=0&&!(B==="metal"||B==="glass"))){var P=L&&L>E;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,d.Stack,Object.assign({align:"center",className:(0,a.classes)(["Exofab__material",w&&"Exofab__material--line"])},T,{children:w?(0,e.createFragment)([(0,e.createComponentVNode)(2,d.Stack.Item,{className:(0,a.classes)(["materials32x32",B])}),(0,e.createComponentVNode)(2,d.Stack.Item,{className:"Exofab__material--amount",color:P&&"bad",ml:0,mr:1,children:O.toLocaleString("en-US")})],4):(0,e.createFragment)([(0,e.createComponentVNode)(2,d.Stack.Item,{basis:"content",children:(0,e.createComponentVNode)(2,d.Button,{width:"85%",color:"transparent",onClick:A,children:(0,e.createComponentVNode)(2,d.Box,{mt:1,className:(0,a.classes)(["materials32x32",B])})})}),(0,e.createComponentVNode)(2,d.Stack.Item,{grow:"1",children:[(0,e.createComponentVNode)(2,d.Box,{className:"Exofab__material--name",children:B}),(0,e.createComponentVNode)(2,d.Box,{className:"Exofab__material--amount",children:[O.toLocaleString("en-US")," cm\xB3 (",Math.round(O/p*10)/10," ","sheets)"]})]})],4)})))}},v=function(g,h){var C=(0,o.useBackend)(h),N=C.act,x=C.data,B=g.design;return(0,e.createComponentVNode)(2,d.Box,{className:"Exofab__design",children:[(0,e.createComponentVNode)(2,d.Button,{disabled:B.notEnough||x.building,icon:"cog",content:B.name,onClick:function(){function L(){return N("build",{id:B.id})}return L}()}),(0,e.createComponentVNode)(2,d.Button,{icon:"plus-circle",onClick:function(){function L(){return N("queue",{id:B.id})}return L}()}),(0,e.createComponentVNode)(2,d.Box,{className:"Exofab__design--cost",children:Object.entries(B.cost).map(function(L){return(0,e.createComponentVNode)(2,d.Box,{children:(0,e.createComponentVNode)(2,c,{id:L[0],amount:L[1],lineDisplay:!0})},L[0])})}),(0,e.createComponentVNode)(2,d.Stack,{className:"Exofab__design--time",children:(0,e.createComponentVNode)(2,d.Stack.Item,{children:[(0,e.createComponentVNode)(2,d.Icon,{name:"clock"}),B.time>0?(0,e.createFragment)([B.time/10,(0,e.createTextVNode)(" seconds")],0):"Instant"]})})]})}},97086:function(I,r,n){"use strict";r.__esModule=!0,r.ExternalAirlockController=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=0,y=1013,V=function(p){var i="good",l=80,f=95,u=110,s=120;return pu?i="average":p>s&&(i="bad"),i},k=r.ExternalAirlockController=function(){function S(p,i){var l=(0,a.useBackend)(i),f=l.act,u=l.data,s=u.chamber_pressure,m=u.exterior_status,c=u.interior_status,v=u.processing;return(0,e.createComponentVNode)(2,o.Window,{width:470,height:290,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Information",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Chamber Pressure",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:V(s),value:s,minValue:d,maxValue:y,children:[s," kPa"]})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Actions",children:[(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:v,onClick:function(){function b(){return f("cycle_ext")}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Cycle to Interior",icon:"arrow-circle-right",disabled:v,onClick:function(){function b(){return f("cycle_int")}return b}()})]}),(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Force Exterior Door",icon:"exclamation-triangle",color:c==="open"?"red":v?"yellow":null,onClick:function(){function b(){return f("force_ext")}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Force Interior Door",icon:"exclamation-triangle",color:c==="open"?"red":v?"yellow":null,onClick:function(){function b(){return f("force_int")}return b}()})]}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Abort",icon:"ban",color:"red",disabled:!v,onClick:function(){function b(){return f("abort")}return b}()})})]})]})})}return S}()},96142:function(I,r,n){"use strict";r.__esModule=!0,r.FaxMachine=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.FaxMachine=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data;return(0,e.createComponentVNode)(2,o.Window,{width:540,height:300,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Authorization",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Card",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.scan_name?"eject":"id-card",selected:i.scan_name,content:i.scan_name?i.scan_name:"-----",tooltip:i.scan_name?"Eject ID":"Insert ID",onClick:function(){function l(){return p("scan")}return l}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Authorize",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.authenticated?"sign-out-alt":"id-card",selected:i.authenticated,disabled:!i.scan_name&&!i.authenticated,content:i.authenticated?"Log Out":"Log In",onClick:function(){function l(){return p("auth")}return l}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Fax Menu",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Network",children:i.network}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Document",children:[(0,e.createComponentVNode)(2,t.Button,{icon:i.paper?"eject":"paperclip",disabled:!i.authenticated&&!i.paper,content:i.paper?i.paper:"-----",onClick:function(){function l(){return p("paper")}return l}()}),!!i.paper&&(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:"Rename",onClick:function(){function l(){return p("rename")}return l}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sending To",children:(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:i.destination?i.destination:"-----",disabled:!i.authenticated,onClick:function(){function l(){return p("dept")}return l}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Action",children:(0,e.createComponentVNode)(2,t.Button,{icon:"envelope",content:i.sendError?i.sendError:"Send",disabled:!i.paper||!i.destination||!i.authenticated||i.sendError,onClick:function(){function l(){return p("send")}return l}()})})]})})]})})}return y}()},83767:function(I,r,n){"use strict";r.__esModule=!0,r.FloorPainter=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=function(k,S){var p=(0,a.useBackend)(S),i=p.act,l=p.data,f=k.image,u=k.isSelected,s=k.onSelect;return(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+f,style:{"border-style":u&&"solid"||"none","border-width":"2px","border-color":"orange",padding:u&&"2px"||"4px"},onClick:s})},y=r.FloorPainter=function(){function V(k,S){var p=(0,a.useBackend)(S),i=p.act,l=p.data,f=l.availableStyles,u=l.selectedStyle,s=l.selectedDir,m=l.directionsPreview,c=l.allStylesPreview;return(0,e.createComponentVNode)(2,o.Window,{width:405,height:475,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Decal setup",children:[(0,e.createComponentVNode)(2,t.Flex,{children:[(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-left",onClick:function(){function v(){return i("cycle_style",{offset:-1})}return v}()})}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Dropdown,{options:f,selected:u,width:"150px",height:"20px",ml:"2px",mr:"2px",nochevron:!0,onSelected:function(){function v(b){return i("select_style",{style:b})}return v}()})}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",onClick:function(){function v(){return i("cycle_style",{offset:1})}return v}()})})]}),(0,e.createComponentVNode)(2,t.Box,{mt:"5px",mb:"5px",children:(0,e.createComponentVNode)(2,t.Flex,{overflowY:"auto",maxHeight:"220px",wrap:"wrap",children:f.map(function(v){return(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,d,{image:c[v],isSelected:u===v,onSelect:function(){function b(){return i("select_style",{style:v})}return b}()})},"{style}")})})}),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Direction",children:(0,e.createComponentVNode)(2,t.Table,{style:{display:"inline"},children:["north","","south"].map(function(v){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[v+"west",v,v+"east"].map(function(b){return(0,e.createComponentVNode)(2,t.Table.Cell,{style:{"vertical-align":"middle","text-align":"center"},children:b===""?(0,e.createComponentVNode)(2,t.Icon,{name:"arrows-alt",size:3}):(0,e.createComponentVNode)(2,d,{image:m[b],isSelected:b===s,onSelect:function(){function g(){return i("select_direction",{direction:b})}return g}()})},b)})},v)})})})})]})})})}return V}()},53424:function(I,r,n){"use strict";r.__esModule=!0,r.GPS=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),d=n(98595),y=function(u){return u?"("+u.join(", ")+")":"ERROR"},V=function(u,s,m){if(!(!u||!s)){if(u[2]!==s[2]||m!==1)return null;var c=Math.atan2(s[1]-u[1],s[0]-u[0]),v=Math.sqrt(Math.pow(s[1]-u[1],2)+Math.pow(s[0]-u[0],2));return{angle:(0,a.rad2deg)(c),distance:v}}},k=r.GPS=function(){function f(u,s){var m=(0,t.useBackend)(s),c=m.data,v=c.emped,b=c.active,g=c.area,h=c.position,C=c.saved;return(0,e.createComponentVNode)(2,d.Window,{width:450,height:700,children:(0,e.createComponentVNode)(2,d.Window.Content,{children:(0,e.createComponentVNode)(2,o.Flex,{direction:"column",height:"100%",children:v?(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",basis:"0",children:(0,e.createComponentVNode)(2,S,{emp:!0})}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Flex.Item,{children:(0,e.createComponentVNode)(2,p)}),b?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Flex.Item,{mt:"0.5rem",children:(0,e.createComponentVNode)(2,i,{area:g,position:h})}),C&&(0,e.createComponentVNode)(2,o.Flex.Item,{mt:"0.5rem",children:(0,e.createComponentVNode)(2,i,{title:"Saved Position",position:C})}),(0,e.createComponentVNode)(2,o.Flex.Item,{mt:"0.5rem",grow:"1",basis:"0",children:(0,e.createComponentVNode)(2,l,{height:"100%"})})],0):(0,e.createComponentVNode)(2,S)],0)})})})}return f}(),S=function(u,s){var m=u.emp;return(0,e.createComponentVNode)(2,o.Section,{mt:"0.5rem",width:"100%",height:"100%",stretchContents:!0,children:(0,e.createComponentVNode)(2,o.Box,{width:"100%",height:"100%",color:"label",textAlign:"center",children:(0,e.createComponentVNode)(2,o.Flex,{height:"100%",children:(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon,{name:m?"ban":"power-off",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),m?"ERROR: Device temporarily lost signal.":"Device is disabled."]})})})})},p=function(u,s){var m=(0,t.useBackend)(s),c=m.act,v=m.data,b=v.active,g=v.tag,h=v.same_z,C=(0,t.useLocalState)(s,"newTag",g),N=C[0],x=C[1];return(0,e.createComponentVNode)(2,o.Section,{title:"Settings",buttons:(0,e.createComponentVNode)(2,o.Button,{selected:b,icon:b?"toggle-on":"toggle-off",content:b?"On":"Off",onClick:function(){function B(){return c("toggle")}return B}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Tag",children:[(0,e.createComponentVNode)(2,o.Input,{width:"5rem",value:g,onEnter:function(){function B(){return c("tag",{newtag:N})}return B}(),onInput:function(){function B(L,w){return x(w)}return B}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:g===N,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){function B(){return c("tag",{newtag:N})}return B}(),children:(0,e.createComponentVNode)(2,o.Icon,{name:"pen"})})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Range",children:(0,e.createComponentVNode)(2,o.Button,{selected:!h,icon:h?"compress":"expand",content:h?"Local Sector":"Global",onClick:function(){function B(){return c("same_z")}return B}()})})]})})},i=function(u,s){var m=u.title,c=u.area,v=u.position;return(0,e.createComponentVNode)(2,o.Section,{title:m||"Position",children:(0,e.createComponentVNode)(2,o.Box,{fontSize:"1.5rem",children:[c&&(0,e.createFragment)([c,(0,e.createVNode)(1,"br")],0),y(v)]})})},l=function(u,s){var m=(0,t.useBackend)(s),c=m.data,v=c.position,b=c.signals,g=c.upgraded;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Signals",overflow:"auto"},u,{children:(0,e.createComponentVNode)(2,o.Table,{children:b.map(function(h){return Object.assign({},h,V(v,h.position,g))}).map(function(h,C){return(0,e.createComponentVNode)(2,o.Table.Row,{backgroundColor:C%2===0&&"rgba(255, 255, 255, 0.05)",children:[(0,e.createComponentVNode)(2,o.Table.Cell,{width:"30%",verticalAlign:"middle",color:"label",p:"0.25rem",bold:!0,children:h.tag}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",color:"grey",children:h.area}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",collapsing:!0,children:h.distance!==void 0&&(0,e.createComponentVNode)(2,o.Box,{opacity:Math.max(1-Math.min(h.distance,100)/100,.5),children:[(0,e.createComponentVNode)(2,o.Icon,{name:h.distance>0?"arrow-right":"circle",rotation:-h.angle}),"\xA0",Math.floor(h.distance)+"m"]})}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",pr:"0.25rem",collapsing:!0,children:y(h.position)})]},C)})})})))}},68703:function(I,r,n){"use strict";r.__esModule=!0,r.GasAnalyzerHistory=r.GasAnalyzerContent=r.GasAnalyzer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.GasAnalyzerContent=function(){function k(S,p){var i=(0,a.useBackend)(p),l=i.act,f=i.data,u=f.gasmixes,s=f.autoUpdating;return(0,e.createComponentVNode)(2,t.Section,{title:u[0].name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:s?"unlock":"lock",onClick:function(){function m(){return l("autoscantoggle")}return m}(),tooltip:s?"Auto-Update Enabled":"Auto-Update Disabled",fluid:!0,textAlign:"center",selected:s}),children:u[0].total_moles?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Moles",children:(u[0].total_moles?u[0].total_moles:"-")+" mol"}),u[0].oxygen?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Oxygen",children:u[0].oxygen.toFixed(2)+" mol ("+(u[0].oxygen/u[0].total_moles).toFixed(2)*100+" %)"}):"",u[0].nitrogen?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nitrogen",children:u[0].nitrogen.toFixed(2)+" mol ("+(u[0].nitrogen/u[0].total_moles).toFixed(2)*100+" %)"}):"",u[0].carbon_dioxide?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Carbon Dioxide",children:u[0].carbon_dioxide.toFixed(2)+" mol ("+(u[0].carbon_dioxide/u[0].total_moles).toFixed(2)*100+" %)"}):"",u[0].toxins?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Plasma",children:u[0].toxins.toFixed(2)+" mol ("+(u[0].toxins/u[0].total_moles).toFixed(2)*100+" %)"}):"",u[0].sleeping_agent?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nitrous Oxide",children:u[0].sleeping_agent.toFixed(2)+" mol ("+(u[0].sleeping_agent/u[0].total_moles).toFixed(2)*100+" %)"}):"",u[0].agent_b?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Agent B",children:u[0].agent_b.toFixed(2)+" mol ("+(u[0].agent_b/u[0].total_moles).toFixed(2)*100+" %)"}):"",(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:(u[0].total_moles?(u[0].temperature-273.15).toFixed(2):"-")+" \xB0C ("+(u[0].total_moles?u[0].temperature.toFixed(2):"-")+" K)"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Volume",children:(u[0].total_moles?u[0].volume:"-")+" L"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure",children:(u[0].total_moles?u[0].pressure.toFixed(2):"-")+" kPa"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Heat Capacity",children:u[0].heat_capacity+" / K"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Thermal Energy",children:u[0].thermal_energy})]}):(0,e.createComponentVNode)(2,t.Box,{nowrap:!0,italic:!0,mb:"10px",children:"No Gas Detected!"})},u[0])}return k}(),y=r.GasAnalyzerHistory=function(){function k(S,p){var i=(0,a.useBackend)(p),l=i.act,f=i.data,u=f.historyGasmixes,s=f.historyViewMode,m=f.historyIndex;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Scan History",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"trash",tooltip:"Clear History",onClick:function(){function c(){return l("clearhistory")}return c}(),textAlign:"center",disabled:u.length===0}),children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mode",children:(0,e.createComponentVNode)(2,t.Flex,{inline:!0,width:"50%",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"kPa",onClick:function(){function c(){return l("modekpa")}return c}(),textAlign:"center",selected:s==="kpa"})}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"mol",onClick:function(){function c(){return l("modemol")}return c}(),textAlign:"center",selected:s==="mol"})})]})}),(0,e.createComponentVNode)(2,t.LabeledList,{children:u.map(function(c,v){return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:v+1+". "+(s==="mol"?c[0].total_moles.toFixed(2):c[0].pressure.toFixed(2)),onClick:function(){function b(){return l("input",{target:v+1})}return b}(),textAlign:"left",selected:v+1===m,fluid:!0})},c[0])})})]})}return k}(),V=r.GasAnalyzer=function(){function k(S,p){var i={float:"left",width:"67%"},l={float:"right",width:"33%"};return(0,e.createComponentVNode)(2,o.Window,{width:500,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createVNode)(1,"div",null,(0,e.createComponentVNode)(2,t.Section,{grow:!0,children:(0,e.createComponentVNode)(2,d)}),2,{style:i}),(0,e.createVNode)(1,"div",null,(0,e.createComponentVNode)(2,t.Section,{width:"160px",children:(0,e.createComponentVNode)(2,y)}),2,{style:l})]})})}return k}()},27546:function(I,r,n){"use strict";r.__esModule=!0,r.GasFreezer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.GasFreezer=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.on,f=i.pressure,u=i.temperature,s=i.temperatureCelsius,m=i.min,c=i.max,v=i.target,b=i.targetCelsius,g=(u-m)/(c-m);return(0,e.createComponentVNode)(2,o.Window,{width:560,height:200,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"\u0421\u0442\u0430\u0442\u0443\u0441",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:l?"power-off":"times",content:l?"\u0412\u043A\u043B":"\u0412\u044B\u043A\u043B",selected:l,onClick:function(){function h(){return p("power")}return h}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0414\u0430\u0432\u043B\u0435\u043D\u0438\u0435",children:[f," \u043A\u041F\u0430"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0422\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430",children:(0,e.createComponentVNode)(2,t.Flex,{direction:"row",justify:"space-between",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{width:"65%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:g,ranges:{blue:[-1/0,.5],red:[.5,1/0]},children:"\xA0"})}),(0,e.createComponentVNode)(2,t.Flex.Item,{width:"35%",children:[g<.5&&(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"blue",ml:1,children:[u," \xB0K (",s," \xB0C)"]}),g>=.5&&(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"red",ml:1,children:[u," \xB0K (",s," \xB0C)"]})]})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0426\u0435\u043B\u0435\u0432\u0430\u044F \u0442\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430",children:(0,e.createComponentVNode)(2,t.Flex,{direction:"row",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{width:"65%",justify:"end",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:(v-m)/(c-m),children:"\xA0"})}),(0,e.createComponentVNode)(2,t.Flex.Item,{width:"35%",children:(0,e.createComponentVNode)(2,t.Box,{inline:!0,ml:1,children:[v," \xB0K (",b," \xB0C)"]})})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0417\u0430\u0434\u0430\u0442\u044C \u0446\u0435\u043B\u0435\u0432\u0443\u044E \u0442\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0443",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",title:"\u041C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u0442\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430",onClick:function(){function h(){return p("temp",{temp:m})}return h}()}),(0,e.createComponentVNode)(2,t.NumberInput,{value:Math.round(v),unit:"\xB0K",minValue:Math.round(m),maxValue:Math.round(c),step:5,stepPixelSize:3,onDrag:function(){function h(C,N){return p("temp",{temp:N})}return h}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",title:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u0442\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430",onClick:function(){function h(){return p("temp",{temp:c})}return h}()})]})]})})})})}return y}()},89124:function(I,r,n){"use strict";r.__esModule=!0,r.GeneModder=void 0;var e=n(89005),a=n(72253),t=n(35840),o=n(36036),d=n(3939),y=n(98595),V=r.GeneModder=function(){function s(m,c){var v=(0,a.useBackend)(c),b=v.data,g=b.has_seed;return(0,e.createComponentVNode)(2,y.Window,{width:500,height:650,children:(0,e.createComponentVNode)(2,y.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,p),(0,e.createComponentVNode)(2,d.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),g===0?(0,e.createComponentVNode)(2,S):(0,e.createComponentVNode)(2,k)]})})})}return s}(),k=function(m,c){var v=(0,a.useBackend)(c),b=v.act,g=v.data,h=g.disk;return(0,e.createComponentVNode)(2,o.Section,{title:"Genes",fill:!0,scrollable:!0,buttons:(0,e.createComponentVNode)(2,o.Button,{content:"Insert Gene from Disk",disabled:!h||!h.can_insert||h.is_core,icon:"arrow-circle-down",onClick:function(){function C(){return b("insert")}return C}()}),children:[(0,e.createComponentVNode)(2,i),(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,f)]})},S=function(m,c){return(0,e.createComponentVNode)(2,o.Section,{fill:!0,height:"85%",children:(0,e.createComponentVNode)(2,o.Stack,{height:"100%",children:(0,e.createComponentVNode)(2,o.Stack.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"green",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"leaf",size:5,mb:"10px"}),(0,e.createVNode)(1,"br"),"The plant DNA manipulator is missing a seed."]})})})},p=function(m,c){var v=(0,a.useBackend)(c),b=v.act,g=v.data,h=g.has_seed,C=g.seed,N=g.has_disk,x=g.disk,B,L;return h?B=(0,e.createComponentVNode)(2,o.Stack.Item,{mb:"-6px",mt:"-4px",children:[(0,e.createVNode)(1,"img",(0,t.classes)(["seeds32x32",C.image]),null,1,{style:{"vertical-align":"middle",width:"32px",margin:"-1px","margin-left":"-11px"}}),(0,e.createComponentVNode)(2,o.Button,{content:C.name,onClick:function(){function w(){return b("eject_seed")}return w}()}),(0,e.createComponentVNode)(2,o.Button,{ml:"3px",icon:"pen",tooltip:"Name Variant",onClick:function(){function w(){return b("variant_name")}return w}()})]}):B=(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{ml:3.3,content:"None",onClick:function(){function w(){return b("eject_seed")}return w}()})}),N?L=x.name:L="None",(0,e.createComponentVNode)(2,o.Section,{title:"Storage",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Plant Sample",children:B}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Data Disk",children:(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{ml:3.3,content:L,onClick:function(){function w(){return b("eject_disk")}return w}()})})})]})})},i=function(m,c){var v=(0,a.useBackend)(c),b=v.act,g=v.data,h=g.disk,C=g.core_genes;return(0,e.createComponentVNode)(2,o.Collapsible,{title:"Core Genes",open:!0,children:[C.map(function(N){return(0,e.createComponentVNode)(2,o.Stack,{py:"2px",className:"candystripe",children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"100%",ml:"2px",children:N.name}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Extract",disabled:!(h!=null&&h.can_extract),icon:"save",onClick:function(){function x(){return b("extract",{id:N.id})}return x}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Replace",disabled:!N.is_type||!h.can_insert,icon:"arrow-circle-down",onClick:function(){function x(){return b("replace",{id:N.id})}return x}()})})]},N)})," ",(0,e.createComponentVNode)(2,o.Stack,{children:(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Replace All",disabled:!(h!=null&&h.is_bulk_core),icon:"arrow-circle-down",onClick:function(){function N(){return b("bulk_replace_core")}return N}()})})})]},"Core Genes")},l=function(m,c){var v=(0,a.useBackend)(c),b=v.data,g=b.reagent_genes,h=b.has_reagent;return(0,e.createComponentVNode)(2,u,{title:"Reagent Genes",gene_set:g,do_we_show:h})},f=function(m,c){var v=(0,a.useBackend)(c),b=v.data,g=b.trait_genes,h=b.has_trait;return(0,e.createComponentVNode)(2,u,{title:"Trait Genes",gene_set:g,do_we_show:h})},u=function(m,c){var v=m.title,b=m.gene_set,g=m.do_we_show,h=(0,a.useBackend)(c),C=h.act,N=h.data,x=N.disk;return(0,e.createComponentVNode)(2,o.Collapsible,{title:v,open:!0,children:g?b.map(function(B){return(0,e.createComponentVNode)(2,o.Stack,{py:"2px",className:"candystripe",children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"100%",ml:"2px",children:B.name}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Extract",disabled:!(x!=null&&x.can_extract),icon:"save",onClick:function(){function L(){return C("extract",{id:B.id})}return L}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Remove",icon:"times",onClick:function(){function L(){return C("remove",{id:B.id})}return L}()})})]},B)}):(0,e.createComponentVNode)(2,o.Stack.Item,{children:"No Genes Detected"})},v)}},73053:function(I,r,n){"use strict";r.__esModule=!0,r.GenericCrewManifest=void 0;var e=n(89005),a=n(36036),t=n(98595),o=n(41874),d=r.GenericCrewManifest=function(){function y(V,k){return(0,e.createComponentVNode)(2,t.Window,{width:588,height:510,theme:"nologo",children:(0,e.createComponentVNode)(2,t.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,a.Section,{noTopPadding:!0,children:(0,e.createComponentVNode)(2,o.CrewManifest)})})})}return y}()},42914:function(I,r,n){"use strict";r.__esModule=!0,r.GhostHudPanel=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.GhostHudPanel=function(){function V(k,S){var p=(0,a.useBackend)(S),i=p.data,l=i.security,f=i.medical,u=i.diagnostic,s=i.ahud;return(0,e.createComponentVNode)(2,o.Window,{width:250,height:207,theme:"nologo",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,y,{label:"Medical",type:"medical",is_active:f}),(0,e.createComponentVNode)(2,y,{label:"Security",type:"security",is_active:l}),(0,e.createComponentVNode)(2,y,{label:"Diagnostic",type:"diagnostic",is_active:u}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,y,{label:"Antag HUD",is_active:s,act_on:"ahud_on",act_off:"ahud_off"})]})})})}return V}(),y=function(k,S){var p=(0,a.useBackend)(S),i=p.act,l=k.label,f=k.type,u=f===void 0?null:f,s=k.is_active,m=k.act_on,c=m===void 0?"hud_on":m,v=k.act_off,b=v===void 0?"hud_off":v;return(0,e.createComponentVNode)(2,t.Flex,{pt:.3,color:"label",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{pl:.5,align:"center",width:"80%",children:l}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{mr:.6,content:s?"On":"Off",icon:s?"toggle-on":"toggle-off",selected:s,onClick:function(){function g(){return i(s?b:c,{hud_type:u})}return g}()})})]})}},25825:function(I,r,n){"use strict";r.__esModule=!0,r.GlandDispenser=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.GlandDispenser=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.glands,f=l===void 0?[]:l;return(0,e.createComponentVNode)(2,o.Window,{width:300,height:338,theme:"abductor",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:f.map(function(u){return(0,e.createComponentVNode)(2,t.Button,{width:"60px",height:"60px",m:.75,textAlign:"center",fontSize:"17px",lineHeight:"55px",icon:"eject",backgroundColor:u.color,content:u.amount||"0",disabled:!u.amount,onClick:function(){function s(){return p("dispense",{gland_id:u.id})}return s}()},u.id)})})})})}return y}()},67834:function(I,r,n){"use strict";r.__esModule=!0,r.HandheldChemDispenser=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=[1,5,10,20,30,50],y=null,V=r.HandheldChemDispenser=function(){function p(i,l){return(0,e.createComponentVNode)(2,o.Window,{width:450,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,S)]})})})}return p}(),k=function(i,l){var f=(0,a.useBackend)(l),u=f.act,s=f.data,m=s.amount,c=s.energy,v=s.maxEnergy,b=s.mode;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Energy",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:c,minValue:0,maxValue:v,ranges:{good:[v*.5,1/0],average:[v*.25,v*.5],bad:[-1/0,v*.25]},children:[c," / ",v," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Amount",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{children:d.map(function(g,h){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"15%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"cog",selected:m===g,content:g,onClick:function(){function C(){return u("amount",{amount:g})}return C}()})},h)})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mode",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{justify:"space-between",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:b==="dispense",content:"Dispense",m:"0",width:"32%",onClick:function(){function g(){return u("mode",{mode:"dispense"})}return g}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:b==="remove",content:"Remove",m:"0",width:"32%",onClick:function(){function g(){return u("mode",{mode:"remove"})}return g}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:b==="isolate",content:"Isolate",m:"0",width:"32%",onClick:function(){function g(){return u("mode",{mode:"isolate"})}return g}()})]})})]})})})},S=function(i,l){for(var f=(0,a.useBackend)(l),u=f.act,s=f.data,m=s.chemicals,c=m===void 0?[]:m,v=s.current_reagent,b=[],g=0;g<(c.length+1)%3;g++)b.push(!0);return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,height:"18%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:s.glass?"Drink Selector":"Chemical Selector",children:[c.map(function(h,C){return(0,e.createComponentVNode)(2,t.Button,{width:"32%",icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",selected:v===h.id,content:h.title,style:{"margin-left":"2px"},onClick:function(){function N(){return u("dispense",{reagent:h.id})}return N}()},C)}),b.map(function(h,C){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:"1",basis:"25%"},C)})]})})}},75926:function(I,r,n){"use strict";r.__esModule=!0,r.ImplantPad=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.ImplantPad=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.implant,f=i.contains_case,u=i.tag,s=(0,a.useLocalState)(k,"newTag",u),m=s[0],c=s[1];return(0,e.createComponentVNode)(2,o.Window,{width:410,height:325,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Bio-chip Mini-Computer",buttons:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Eject Case",icon:"eject",disabled:!f,onClick:function(){function v(){return p("eject_case")}return v}()})}),children:l&&f?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{bold:!0,mb:2,children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+l.image,ml:0,mr:2,style:{"vertical-align":"middle",width:"32px"}}),l.name]}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Life",children:l.life}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Notes",children:l.notes}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Function",children:l.function}),!!u&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tag",children:[(0,e.createComponentVNode)(2,t.Input,{width:"5.5rem",value:u,onEnter:function(){function v(){return p("tag",{newtag:m})}return v}(),onInput:function(){function v(b,g){return c(g)}return v}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:u===m,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){function v(){return p("tag",{newtag:m})}return v}(),children:(0,e.createComponentVNode)(2,t.Icon,{name:"pen"})})]})]})],4):f?(0,e.createComponentVNode)(2,t.Box,{children:"This bio-chip case has no implant!"}):(0,e.createComponentVNode)(2,t.Box,{children:"Please insert a bio-chip casing!"})})})})}return y}()},25471:function(I,r,n){"use strict";r.__esModule=!0,r.Instrument=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),d=n(98595),y=r.Instrument=function(){function i(l,f){var u=(0,t.useBackend)(f),s=u.act,m=u.data;return(0,e.createComponentVNode)(2,d.Window,{width:600,height:505,children:[(0,e.createComponentVNode)(2,V),(0,e.createComponentVNode)(2,d.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,p)]})})]})}return i}(),V=function(l,f){var u=(0,t.useBackend)(f),s=u.act,m=u.data,c=m.help;if(c)return(0,e.createComponentVNode)(2,o.Modal,{maxWidth:"75%",height:window.innerHeight*.75+"px",mx:"auto",py:"0",px:"0.5rem",children:(0,e.createComponentVNode)(2,o.Section,{height:"100%",title:"Help",level:"2",overflow:"auto",children:(0,e.createComponentVNode)(2,o.Box,{px:"0.5rem",mt:"-0.5rem",children:[(0,e.createVNode)(1,"h1",null,"Making a Song",16),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Lines are a series of chords, separated by commas\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(,)"}),(0,e.createTextVNode)(", each with notes separated by hyphens\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(-)"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("as defined above.")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Notes are played by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"names of the note"}),(0,e.createTextVNode)(", and optionally, the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(", and/or the"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave number"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("By default, every note is\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"natural"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("and in\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave 3"}),(0,e.createTextVNode)(". Defining a different state for either is remembered for each"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"note"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Example:"}),(0,e.createTextVNode)("\xA0"),(0,e.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,e.createTextVNode)(" will play a\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"C"}),(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"major"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("scale.")],0),(0,e.createVNode)(1,"li",null,[(0,e.createTextVNode)("After a note has an\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("or\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("placed, it will be remembered:\xA0"),(0,e.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,e.createTextVNode)(" is "),(0,e.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],0)],4)],0),(0,e.createVNode)(1,"p",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Chords"}),(0,e.createTextVNode)("\xA0can be played simply by seperating each note with a hyphen:"),(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("A"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"pause"}),(0,e.createTextVNode)("\xA0may be denoted by an empty chord: "),(0,e.createVNode)(1,"i",null,"C,E,,C,G",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,e.createTextVNode)(",\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"eg:"}),(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,e.createTextVNode)(".")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Combined, an example line is: "),(0,e.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,e.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Lines are a series of chords, separated by commas\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(,)"}),(0,e.createTextVNode)(", each with notes separated by hyphens\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(-)"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("as defined above.")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Notes are played by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"names of the note"}),(0,e.createTextVNode)(", and optionally, the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(", and/or the"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave number"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("By default, every note is\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"natural"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("and in\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave 3"}),(0,e.createTextVNode)(". Defining a different state for either is remembered for each"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"note"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Example:"}),(0,e.createTextVNode)("\xA0"),(0,e.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,e.createTextVNode)(" will play a\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"C"}),(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"major"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("scale.")],0),(0,e.createVNode)(1,"li",null,[(0,e.createTextVNode)("After a note has an\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("or\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("placed, it will be remembered:\xA0"),(0,e.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,e.createTextVNode)(" is "),(0,e.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],0)],4)],0),(0,e.createVNode)(1,"p",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Chords"}),(0,e.createTextVNode)("\xA0can be played simply by seperating each note with a hyphen:"),(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("A"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"pause"}),(0,e.createTextVNode)("\xA0may be denoted by an empty chord: "),(0,e.createVNode)(1,"i",null,"C,E,,C,G",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,e.createTextVNode)(",\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"eg:"}),(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,e.createTextVNode)(".")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Combined, an example line is: "),(0,e.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,e.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,e.createVNode)(1,"h1",null,"Instrument Advanced Settings",16),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Type:"}),(0,e.createTextVNode)("\xA0Whether the instrument is legacy or synthesized."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Legacy instruments have a collection of sounds that are selectively used depending on the note to play."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Synthesized instruments use a base sound and change its pitch to match the note to play.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Current:"}),(0,e.createTextVNode)("\xA0Which instrument sample to play. Some instruments can be tuned to play different samples. Experiment!")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Note Shift/Note Transpose:"}),(0,e.createTextVNode)("\xA0The pitch to apply to all notes of the song.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Sustain Mode:"}),(0,e.createTextVNode)("\xA0How a played note fades out."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Linear sustain means a note will fade out at a constant rate."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Exponential sustain means a note will fade out at an exponential rate, sounding smoother.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Volume Dropoff Threshold:"}),(0,e.createTextVNode)("\xA0The volume threshold at which a note is fully stopped.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Sustain indefinitely last held note:"}),(0,e.createTextVNode)("\xA0Whether the last note should be sustained indefinitely.")],4)],4),(0,e.createComponentVNode)(2,o.Button,{color:"grey",content:"Close",onClick:function(){function v(){return s("help")}return v}()})]})})})},k=function(l,f){var u=(0,t.useBackend)(f),s=u.act,m=u.data,c=m.lines,v=m.playing,b=m.repeat,g=m.maxRepeats,h=m.tempo,C=m.minTempo,N=m.maxTempo,x=m.tickLag,B=m.volume,L=m.minVolume,w=m.maxVolume,A=m.ready;return(0,e.createComponentVNode)(2,o.Section,{title:"Instrument",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"info",content:"Help",onClick:function(){function T(){return s("help")}return T}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"file",content:"New",onClick:function(){function T(){return s("newsong")}return T}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"upload",content:"Import",onClick:function(){function T(){return s("import")}return T}()})],4),children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Playback",children:[(0,e.createComponentVNode)(2,o.Button,{selected:v,disabled:c.length===0||b<0,icon:"play",content:"Play",onClick:function(){function T(){return s("play")}return T}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!v,icon:"stop",content:"Stop",onClick:function(){function T(){return s("stop")}return T}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Repeat",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:0,maxValue:g,value:b,stepPixelSize:59,onChange:function(){function T(E,O){return s("repeat",{new:O})}return T}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Tempo",children:(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Button,{disabled:h>=N,content:"-",as:"span",mr:"0.5rem",onClick:function(){function T(){return s("tempo",{new:h+x})}return T}()}),(0,a.round)(600/h)," BPM",(0,e.createComponentVNode)(2,o.Button,{disabled:h<=C,content:"+",as:"span",ml:"0.5rem",onClick:function(){function T(){return s("tempo",{new:h-x})}return T}()})]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Volume",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:L,maxValue:w,value:B,stepPixelSize:6,onDrag:function(){function T(E,O){return s("setvolume",{new:O})}return T}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Status",children:A?(0,e.createComponentVNode)(2,o.Box,{color:"good",children:"Ready"}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"Instrument Definition Error!"})})]}),(0,e.createComponentVNode)(2,S)]})},S=function(l,f){var u=(0,t.useBackend)(f),s=u.act,m=u.data,c=m.allowedInstrumentNames,v=m.instrumentLoaded,b=m.instrument,g=m.canNoteShift,h=m.noteShift,C=m.noteShiftMin,N=m.noteShiftMax,x=m.sustainMode,B=m.sustainLinearDuration,L=m.sustainExponentialDropoff,w=m.legacy,A=m.sustainDropoffVolume,T=m.sustainHeldNote,E,O;return x===1?(E="Linear",O=(0,e.createComponentVNode)(2,o.Slider,{minValue:.1,maxValue:5,value:B,step:.5,stepPixelSize:85,format:function(){function P(R){return(0,a.round)(R*100)/100+" seconds"}return P}(),onChange:function(){function P(R,F){return s("setlinearfalloff",{new:F/10})}return P}()})):x===2&&(E="Exponential",O=(0,e.createComponentVNode)(2,o.Slider,{minValue:1.025,maxValue:10,value:L,step:.01,format:function(){function P(R){return(0,a.round)(R*1e3)/1e3+"% per decisecond"}return P}(),onChange:function(){function P(R,F){return s("setexpfalloff",{new:F})}return P}()})),c.sort(),(0,e.createComponentVNode)(2,o.Box,{my:-1,children:(0,e.createComponentVNode)(2,o.Collapsible,{mt:"1rem",mb:"0",title:"Advanced",children:(0,e.createComponentVNode)(2,o.Section,{mt:-1,children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Type",children:w?"Legacy":"Synthesized"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Current",children:v?(0,e.createComponentVNode)(2,o.Dropdown,{options:c,selected:b,width:"50%",onSelected:function(){function P(R){return s("switchinstrument",{name:R})}return P}()}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"None!"})}),!!(!w&&g)&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Note Shift/Note Transpose",children:(0,e.createComponentVNode)(2,o.Slider,{minValue:C,maxValue:N,value:h,stepPixelSize:2,format:function(){function P(R){return R+" keys / "+(0,a.round)(R/12*100)/100+" octaves"}return P}(),onChange:function(){function P(R,F){return s("setnoteshift",{new:F})}return P}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Sustain Mode",children:[(0,e.createComponentVNode)(2,o.Dropdown,{options:["Linear","Exponential"],selected:E,onSelected:function(){function P(R){return s("setsustainmode",{new:R})}return P}()}),O]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Volume Dropoff Threshold",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:.01,maxValue:100,value:A,stepPixelSize:6,onChange:function(){function P(R,F){return s("setdropoffvolume",{new:F})}return P}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Sustain indefinitely last held note",children:(0,e.createComponentVNode)(2,o.Button,{selected:T,icon:T?"toggle-on":"toggle-off",content:T?"Yes":"No",onClick:function(){function P(){return s("togglesustainhold")}return P}()})})],4)]}),(0,e.createComponentVNode)(2,o.Button,{icon:"redo",content:"Reset to Default",mt:"0.5rem",onClick:function(){function P(){return s("reset")}return P}()})]})})})},p=function(l,f){var u=(0,t.useBackend)(f),s=u.act,m=u.data,c=m.playing,v=m.lines,b=m.editing;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Editor",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:!b||c,icon:"plus",content:"Add Line",onClick:function(){function g(){return s("newline",{line:v.length+1})}return g}()}),(0,e.createComponentVNode)(2,o.Button,{selected:!b,icon:b?"chevron-up":"chevron-down",onClick:function(){function g(){return s("edit")}return g}()})],4),children:!!b&&(v.length>0?(0,e.createComponentVNode)(2,o.LabeledList,{children:v.map(function(g,h){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:h+1,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:c,icon:"pen",onClick:function(){function C(){return s("modifyline",{line:h+1})}return C}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:c,icon:"trash",onClick:function(){function C(){return s("deleteline",{line:h+1})}return C}()})],4),children:g},h)})}):(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"Song is empty."}))})}},65021:function(I,r,n){"use strict";r.__esModule=!0,r.ItemPixelShift=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.ItemPixelShift=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.pixel_x,f=i.pixel_y,u=i.max_shift_x,s=i.max_shift_y,m=i.random_drop_on;return(0,e.createComponentVNode)(2,o.Window,{width:250,height:160,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"X-coordinates",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-left",title:"Shifts item leftwards.",disabled:l===-u,onClick:function(){function c(){return p("shift_left")}return c}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,lineHeight:1.7,width:"75px",unit:"pixels",stepPixelSize:6,value:l,minValue:-u,maxValue:u,onChange:function(){function c(v,b){return p("custom_x",{pixel_x:b})}return c}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-right",title:"Shifts item rightwards.",disabled:l===u,onClick:function(){function c(){return p("shift_right")}return c}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Y-coordinates",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-up",title:"Shifts item upwards.",disabled:f===s,onClick:function(){function c(){return p("shift_up")}return c}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,lineHeight:1.7,width:"75px",unit:"pixels",stepPixelSize:6,value:f,minValue:-s,maxValue:s,onChange:function(){function c(v,b){return p("custom_y",{pixel_y:b})}return c}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",title:"Shifts item downwards.",disabled:f===-s,onClick:function(){function c(){return p("shift_down")}return c}()})]})]})}),(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,color:"brown",icon:"arrow-up",content:"Move to Top",title:"Tries to place an item on top of the others.",onClick:function(){function c(){return p("move_to_top")}return c}()})}),(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,color:m?"good":"bad",icon:"power-off",content:m?"Shift Enabled":"Shift Disabled",title:"Enables/Disables item pixel randomization on any drops.",onClick:function(){function c(){return p("toggle")}return c}()})})]})})]})})}return y}()},13618:function(I,r,n){"use strict";r.__esModule=!0,r.KeyComboModal=void 0;var e=n(89005),a=n(70611),t=n(72253),o=n(36036),d=n(98595),y=n(19203),V=n(51057),k=function(u){return u.key!==a.KEY.Alt&&u.key!==a.KEY.Control&&u.key!==a.KEY.Shift&&u.key!==a.KEY.Escape},S={DEL:"Delete",DOWN:"South",END:"Southwest",HOME:"Northwest",INSERT:"Insert",LEFT:"West",PAGEDOWN:"Southeast",PAGEUP:"Northeast",RIGHT:"East",SPACEBAR:"Space",UP:"North"},p=3,i=function(u){var s="";if(u.altKey&&(s+="Alt"),u.ctrlKey&&(s+="Ctrl"),u.shiftKey&&!(u.keyCode>=48&&u.keyCode<=57)&&(s+="Shift"),u.location===p&&(s+="Numpad"),k(u))if(u.shiftKey&&u.keyCode>=48&&u.keyCode<=57){var m=u.keyCode-48;s+="Shift"+m}else{var c=u.key.toUpperCase();s+=S[c]||c}return s},l=r.KeyComboModal=function(){function f(u,s){var m=(0,t.useBackend)(s),c=m.act,v=m.data,b=v.init_value,g=v.large_buttons,h=v.message,C=h===void 0?"":h,N=v.title,x=v.timeout,B=(0,t.useLocalState)(s,"input",b),L=B[0],w=B[1],A=(0,t.useLocalState)(s,"binding",!0),T=A[0],E=A[1],O=function(){function F(j){if(!T){j.key===a.KEY.Enter&&c("submit",{entry:L}),j.key===a.KEY.Escape&&c("cancel");return}if(j.preventDefault(),k(j)){P(i(j)),E(!1);return}else if(j.key===a.KEY.Escape){P(b),E(!1);return}}return F}(),P=function(){function F(j){j!==L&&w(j)}return F}(),R=130+(C.length>30?Math.ceil(C.length/3):0)+(C.length&&g?5:0);return(0,e.createComponentVNode)(2,d.Window,{title:N,width:240,height:R,children:[x&&(0,e.createComponentVNode)(2,V.Loader,{value:x}),(0,e.createComponentVNode)(2,d.Window.Content,{onKeyDown:function(){function F(j){O(j)}return F}(),children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Autofocus),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:C})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{disabled:T,content:T&&T!==null?"Awaiting input...":""+L,width:"100%",textAlign:"center",onClick:function(){function F(){P(b),E(!0)}return F}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,y.InputButtons,{input:L})})]})]})})]})}return f}()},35655:function(I,r,n){"use strict";r.__esModule=!0,r.KeycardAuth=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.KeycardAuth=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=(0,e.createComponentVNode)(2,t.Section,{title:"Keycard Authentication Device",children:(0,e.createComponentVNode)(2,t.Box,{children:"This device is used to trigger certain high security events. It requires the simultaneous swipe of two high-level ID cards."})});if(!i.swiping&&!i.busy)return(0,e.createComponentVNode)(2,o.Window,{width:540,height:280,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[l,(0,e.createComponentVNode)(2,t.Section,{title:"Choose Action",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Red Alert",children:(0,e.createComponentVNode)(2,t.Button,{icon:"exclamation-triangle",disabled:!i.redAvailable,onClick:function(){function u(){return p("triggerevent",{triggerevent:"Red Alert"})}return u}(),content:"Red Alert"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ERT",children:(0,e.createComponentVNode)(2,t.Button,{icon:"broadcast-tower",onClick:function(){function u(){return p("triggerevent",{triggerevent:"Emergency Response Team"})}return u}(),content:"Call ERT"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Maint Access",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"door-open",onClick:function(){function u(){return p("triggerevent",{triggerevent:"Grant Emergency Maintenance Access"})}return u}(),content:"Grant"}),(0,e.createComponentVNode)(2,t.Button,{icon:"door-closed",onClick:function(){function u(){return p("triggerevent",{triggerevent:"Revoke Emergency Maintenance Access"})}return u}(),content:"Revoke"})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Station-Wide Access",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"door-open",onClick:function(){function u(){return p("triggerevent",{triggerevent:"Activate Station-Wide Emergency Access"})}return u}(),content:"Grant"}),(0,e.createComponentVNode)(2,t.Button,{icon:"door-closed",onClick:function(){function u(){return p("triggerevent",{triggerevent:"Deactivate Station-Wide Emergency Access"})}return u}(),content:"Revoke"})]})]})})]})});var f=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Waiting for YOU to swipe your ID..."});return!i.hasSwiped&&!i.ertreason&&i.event==="Emergency Response Team"?f=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Fill out the reason for your ERT request."}):i.hasConfirm?f=(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Request Confirmed!"}):i.isRemote?f=(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"Swipe your card to CONFIRM the remote request."}):i.hasSwiped&&(f=(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"Waiting for second person to confirm..."})),(0,e.createComponentVNode)(2,o.Window,{width:540,height:265,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[l,i.event==="Emergency Response Team"&&(0,e.createComponentVNode)(2,t.Section,{title:"Reason for ERT Call",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{color:i.ertreason?"":"red",icon:i.ertreason?"check":"pencil-alt",content:i.ertreason?i.ertreason:"-----",disabled:i.busy,onClick:function(){function u(){return p("ert")}return u}()})})}),(0,e.createComponentVNode)(2,t.Section,{title:i.event,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back",disabled:i.busy||i.hasConfirm,onClick:function(){function u(){return p("reset")}return u}()}),children:f})]})})}return y}()},40951:function(I,r,n){"use strict";r.__esModule=!0,r.LaborClaimConsole=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),d=n(98595),y=r.LaborClaimConsole=function(){function S(p,i){return(0,e.createComponentVNode)(2,d.Window,{width:315,height:470,children:(0,e.createComponentVNode)(2,d.Window.Content,{children:[(0,e.createComponentVNode)(2,V),(0,e.createComponentVNode)(2,k)]})})}return S}(),V=function(p,i){var l=(0,t.useBackend)(i),f=l.act,u=l.data,s=u.can_go_home,m=u.emagged,c=u.id_inserted,v=u.id_name,b=u.id_points,g=u.id_goal,h=u.unclaimed_points,C=m?0:1,N=m?"ERR0R":s?"Completed!":"Insufficient";return(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Status",children:!!c&&(0,e.createComponentVNode)(2,o.ProgressBar,{value:b/g,ranges:{good:[C,1/0],bad:[-1/0,C]},children:b+" / "+g+" "+N})||!!m&&"ERR0R COMPLETED?!@"||"No ID inserted"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Shuttle controls",children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,content:"Move shuttle",disabled:!s,onClick:function(){function x(){return f("move_shuttle")}return x}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Unclaimed points",children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,content:"Claim points ("+h+")",disabled:!c||!h,onClick:function(){function x(){return f("claim_points")}return x}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Inserted ID",children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,content:c?v:"-------------",onClick:function(){function x(){return f("handle_id")}return x}()})})]})})},k=function(p,i){var l=(0,t.useBackend)(i),f=l.data,u=f.ores;return(0,e.createComponentVNode)(2,o.Section,{title:"Material values",children:(0,e.createComponentVNode)(2,o.Table,{children:[(0,e.createComponentVNode)(2,o.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Material"}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,textAlign:"right",children:"Value"})]}),u.map(function(s){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,a.toTitleCase)(s.ore)}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,textAlign:"right",children:(0,e.createComponentVNode)(2,o.Box,{color:"label",inline:!0,children:s.value})})]},s.ore)})]})})}},9525:function(I,r,n){"use strict";r.__esModule=!0,r.LawManager=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.LawManager=function(){function S(p,i){var l=(0,a.useBackend)(i),f=l.act,u=l.data,s=u.isAdmin,m=u.isSlaved,c=u.isMalf,v=u.isAIMalf,b=u.view;return(0,e.createComponentVNode)(2,o.Window,{width:800,height:c?620:365,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[!!(s&&m)&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:["This unit is slaved to ",m,"."]}),!!(c||v)&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Law Management",selected:b===0,onClick:function(){function g(){return f("set_view",{set_view:0})}return g}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Lawsets",selected:b===1,onClick:function(){function g(){return f("set_view",{set_view:1})}return g}()})]}),b===0&&(0,e.createComponentVNode)(2,y),b===1&&(0,e.createComponentVNode)(2,V)]})})}return S}(),y=function(p,i){var l=(0,a.useBackend)(i),f=l.act,u=l.data,s=u.has_zeroth_laws,m=u.zeroth_laws,c=u.has_ion_laws,v=u.ion_laws,b=u.ion_law_nr,g=u.has_inherent_laws,h=u.inherent_laws,C=u.has_supplied_laws,N=u.supplied_laws,x=u.channels,B=u.channel,L=u.isMalf,w=u.isAdmin,A=u.zeroth_law,T=u.ion_law,E=u.inherent_law,O=u.supplied_law,P=u.supplied_law_position;return(0,e.createFragment)([!!s&&(0,e.createComponentVNode)(2,k,{title:"ERR_NULL_VALUE",laws:m,ctx:i}),!!c&&(0,e.createComponentVNode)(2,k,{title:b,laws:v,ctx:i}),!!g&&(0,e.createComponentVNode)(2,k,{title:"Inherent",laws:h,ctx:i}),!!C&&(0,e.createComponentVNode)(2,k,{title:"Supplied",laws:N,ctx:i}),(0,e.createComponentVNode)(2,t.Section,{title:"Statement Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Statement Channel",children:x.map(function(R){return(0,e.createComponentVNode)(2,t.Button,{content:R.channel,selected:R.channel===B,onClick:function(){function F(){return f("law_channel",{law_channel:R.channel})}return F}()},R.channel)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"State Laws",children:(0,e.createComponentVNode)(2,t.Button,{content:"State Laws",onClick:function(){function R(){return f("state_laws")}return R}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Law Notification",children:(0,e.createComponentVNode)(2,t.Button,{content:"Notify",onClick:function(){function R(){return f("notify_laws")}return R}()})})]})}),!!L&&(0,e.createComponentVNode)(2,t.Section,{title:"Add Laws",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"10%",children:"Type"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"60%",children:"Law"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"10%",children:"Index"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"20%",children:"Actions"})]}),!!(w&&!s)&&(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Zero"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:A}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"N/A"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function R(){return f("change_zeroth_law")}return R}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function R(){return f("add_zeroth_law")}return R}()})]})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Ion"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:T}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"N/A"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function R(){return f("change_ion_law")}return R}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function R(){return f("add_ion_law")}return R}()})]})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Inherent"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:E}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"N/A"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function R(){return f("change_inherent_law")}return R}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function R(){return f("add_inherent_law")}return R}()})]})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Supplied"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:O}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:P,onClick:function(){function R(){return f("change_supplied_law_position")}return R}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function R(){return f("change_supplied_law")}return R}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function R(){return f("add_supplied_law")}return R}()})]})]})]})})],0)},V=function(p,i){var l=(0,a.useBackend)(i),f=l.act,u=l.data,s=u.law_sets;return(0,e.createComponentVNode)(2,t.Box,{children:s.map(function(m){return(0,e.createComponentVNode)(2,t.Section,{title:m.name+" - "+m.header,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Load Laws",icon:"download",onClick:function(){function c(){return f("transfer_laws",{transfer_laws:m.ref})}return c}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[m.laws.has_ion_laws>0&&m.laws.ion_laws.map(function(c){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:c.index,children:c.law},c.index)}),m.laws.has_zeroth_laws>0&&m.laws.zeroth_laws.map(function(c){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:c.index,children:c.law},c.index)}),m.laws.has_inherent_laws>0&&m.laws.inherent_laws.map(function(c){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:c.index,children:c.law},c.index)}),m.laws.has_supplied_laws>0&&m.laws.inherent_laws.map(function(c){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:c.index,children:c.law},c.index)})]})},m.name)})})},k=function(p,i){var l=(0,a.useBackend)(p.ctx),f=l.act,u=l.data,s=u.isMalf;return(0,e.createComponentVNode)(2,t.Section,{title:p.title+" Laws",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"10%",children:"Index"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"69%",children:"Law"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"21%",children:"State?"})]}),p.laws.map(function(m){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:m.index}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:m.law}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:m.state?"Yes":"No",selected:m.state,onClick:function(){function c(){return f("state_law",{ref:m.ref,state_law:m.state?0:1})}return c}()}),!!s&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function c(){return f("edit_law",{edit_law:m.ref})}return c}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Delete",icon:"trash",color:"red",onClick:function(){function c(){return f("delete_law",{delete_law:m.ref})}return c}()})],4)]})]},m.law)})]})})}},90447:function(I,r,n){"use strict";r.__esModule=!0,r.ListInputModal=void 0;var e=n(89005),a=n(51057),t=n(19203),o=n(36036),d=n(72253),y=n(92986),V=n(98595),k=r.ListInputModal=function(){function i(l,f){var u=(0,d.useBackend)(f),s=u.act,m=u.data,c=m.items,v=c===void 0?[]:c,b=m.message,g=b===void 0?"":b,h=m.init_value,C=m.timeout,N=m.title,x=(0,d.useLocalState)(f,"selected",v.indexOf(h)),B=x[0],L=x[1],w=(0,d.useLocalState)(f,"searchBarVisible",v.length>10),A=w[0],T=w[1],E=(0,d.useLocalState)(f,"searchQuery",""),O=E[0],P=E[1],R=function(){function ne(Q){var he=$.length-1;if(Q===y.KEY_DOWN)if(B===null||B===he){var Ve;L(0),(Ve=document.getElementById("0"))==null||Ve.scrollIntoView()}else{var Ne;L(B+1),(Ne=document.getElementById((B+1).toString()))==null||Ne.scrollIntoView()}else if(Q===y.KEY_UP)if(B===null||B===0){var Be;L(he),(Be=document.getElementById(he.toString()))==null||Be.scrollIntoView()}else{var Le;L(B-1),(Le=document.getElementById((B-1).toString()))==null||Le.scrollIntoView()}}return ne}(),F=function(){function ne(Q){Q!==B&&L(Q)}return ne}(),j=function(){function ne(){T(!1),T(!0)}return ne}(),W=function(){function ne(Q){var he=String.fromCharCode(Q),Ve=v.find(function(Le){return Le==null?void 0:Le.toLowerCase().startsWith(he==null?void 0:he.toLowerCase())});if(Ve){var Ne,Be=v.indexOf(Ve);L(Be),(Ne=document.getElementById(Be.toString()))==null||Ne.scrollIntoView()}}return ne}(),z=function(){function ne(Q){var he;Q!==O&&(P(Q),L(0),(he=document.getElementById("0"))==null||he.scrollIntoView())}return ne}(),H=function(){function ne(){T(!A),P("")}return ne}(),$=v.filter(function(ne){return ne==null?void 0:ne.toLowerCase().includes(O.toLowerCase())}),G=330+Math.ceil(g.length/3);return A||setTimeout(function(){var ne;return(ne=document.getElementById(B.toString()))==null?void 0:ne.focus()},1),(0,e.createComponentVNode)(2,V.Window,{title:N,width:325,height:G,children:[C&&(0,e.createComponentVNode)(2,a.Loader,{value:C}),(0,e.createComponentVNode)(2,V.Window.Content,{onKeyDown:function(){function ne(Q){var he=window.event?Q.which:Q.keyCode;(he===y.KEY_DOWN||he===y.KEY_UP)&&(Q.preventDefault(),R(he)),he===y.KEY_ENTER&&(Q.preventDefault(),s("submit",{entry:$[B]})),!A&&he>=y.KEY_A&&he<=y.KEY_Z&&(Q.preventDefault(),W(he)),he===y.KEY_ESCAPE&&(Q.preventDefault(),s("cancel"))}return ne}(),children:(0,e.createComponentVNode)(2,o.Section,{buttons:(0,e.createComponentVNode)(2,o.Button,{compact:!0,icon:A?"search":"font",selected:!0,tooltip:A?"Search Mode. Type to search or use arrow keys to select manually.":"Hotkey Mode. Type a letter to jump to the first match. Enter to select.",tooltipPosition:"left",onClick:function(){function ne(){return H()}return ne}()}),className:"ListInput__Section",fill:!0,title:g,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,S,{filteredItems:$,onClick:F,onFocusSearch:j,searchBarVisible:A,selected:B})}),(0,e.createComponentVNode)(2,o.Stack.Item,{m:0,children:A&&(0,e.createComponentVNode)(2,p,{filteredItems:$,onSearch:z,searchQuery:O,selected:B})}),(0,e.createComponentVNode)(2,o.Stack.Item,{mt:.5,children:(0,e.createComponentVNode)(2,t.InputButtons,{input:$[B]})})]})})})]})}return i}(),S=function(l,f){var u=(0,d.useBackend)(f),s=u.act,m=l.filteredItems,c=l.onClick,v=l.onFocusSearch,b=l.searchBarVisible,g=l.selected;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,tabIndex:0,children:m.map(function(h,C){return(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:"transparent",id:C,onClick:function(){function N(){return c(C)}return N}(),onDblClick:function(){function N(x){x.preventDefault(),s("submit",{entry:m[g]})}return N}(),onKeyDown:function(){function N(x){var B=window.event?x.which:x.keyCode;b&&B>=y.KEY_A&&B<=y.KEY_Z&&(x.preventDefault(),v())}return N}(),selected:C===g,style:{animation:"none",transition:"none"},children:h.replace(/^\w/,function(N){return N.toUpperCase()})},C)})})},p=function(l,f){var u=(0,d.useBackend)(f),s=u.act,m=l.filteredItems,c=l.onSearch,v=l.searchQuery,b=l.selected;return(0,e.createComponentVNode)(2,o.Input,{width:"100%",autoFocus:!0,autoSelect:!0,onEnter:function(){function g(h){h.preventDefault(),s("submit",{entry:m[b]})}return g}(),onInput:function(){function g(h,C){return c(C)}return g}(),placeholder:"Search...",value:v})}},72106:function(I,r,n){"use strict";r.__esModule=!0,r.MechBayConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.MechBayConsole=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.recharge_port,f=l&&l.mech,u=f&&f.cell,s=f&&f.name;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:150,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:s?"Mech status: "+s:"Mech status",textAlign:"center",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Sync",onClick:function(){function m(){return p("reconnect")}return m}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:!l&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No power port detected. Please re-sync."})||!f&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No mech detected."})||(0,e.createComponentVNode)(2,t.ProgressBar,{value:f.health/f.maxhealth,ranges:{good:[.7,1/0],average:[.3,.7],bad:[-1/0,.3]}})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:!l&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No power port detected. Please re-sync."})||!f&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No mech detected."})||!u&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No cell is installed."})||(0,e.createComponentVNode)(2,t.ProgressBar,{value:u.charge/u.maxcharge,ranges:{good:[.7,1/0],average:[.3,.7],bad:[-1/0,.3]},children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:u.charge})," / "+u.maxcharge]})})]})})})})}return y}()},7466:function(I,r,n){"use strict";r.__esModule=!0,r.MechaControlConsole=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),d=n(98595),y=n(25328),V=r.MechaControlConsole=function(){function k(S,p){var i=(0,t.useBackend)(p),l=i.act,f=i.data,u=f.beacons,s=f.stored_data;return s.length?(0,e.createComponentVNode)(2,d.Window,{width:420,height:500,children:(0,e.createComponentVNode)(2,d.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Section,{title:"Log",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"window-close",onClick:function(){function m(){return l("clear_log")}return m}()}),children:s.map(function(m){return(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{color:"label",children:["(",m.time,")"]}),(0,e.createComponentVNode)(2,o.Box,{children:(0,y.decodeHtmlEntities)(m.message)})]},m.time)})})})}):(0,e.createComponentVNode)(2,d.Window,{width:420,height:500,children:(0,e.createComponentVNode)(2,d.Window.Content,{scrollable:!0,children:u.length&&u.map(function(m){return(0,e.createComponentVNode)(2,o.Section,{title:m.name,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"comment",onClick:function(){function c(){return l("send_message",{mt:m.uid})}return c}(),children:"Message"}),(0,e.createComponentVNode)(2,o.Button,{icon:"eye",onClick:function(){function c(){return l("get_log",{mt:m.uid})}return c}(),children:"View Log"}),(0,e.createComponentVNode)(2,o.Button.Confirm,{color:"red",content:"EMP",icon:"bomb",onClick:function(){function c(){return l("shock",{mt:m.uid})}return c}()})],4),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,o.ProgressBar,{ranges:{good:[m.maxHealth*.75,1/0],average:[m.maxHealth*.5,m.maxHealth*.75],bad:[-1/0,m.maxHealth*.5]},value:m.health,maxValue:m.maxHealth})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Cell Charge",children:m.cell&&(0,e.createComponentVNode)(2,o.ProgressBar,{ranges:{good:[m.cellMaxCharge*.75,1/0],average:[m.cellMaxCharge*.5,m.cellMaxCharge*.75],bad:[-1/0,m.cellMaxCharge*.5]},value:m.cellCharge,maxValue:m.cellMaxCharge})||(0,e.createComponentVNode)(2,o.NoticeBox,{children:"No Cell Installed"})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Air Tank",children:[m.airtank,"kPa"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Pilot",children:m.pilot||"Unoccupied"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Location",children:(0,y.toTitleCase)(m.location)||"Unknown"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Active Equipment",children:m.active||"None"}),m.cargoMax&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Cargo Space",children:(0,e.createComponentVNode)(2,o.ProgressBar,{ranges:{bad:[m.cargoMax*.75,1/0],average:[m.cargoMax*.5,m.cargoMax*.75],good:[-1/0,m.cargoMax*.5]},value:m.cargoUsed,maxValue:m.cargoMax})})||null]})},m.name)})||(0,e.createComponentVNode)(2,o.NoticeBox,{children:"No mecha beacons found."})})})}return k}()},79625:function(I,r,n){"use strict";r.__esModule=!0,r.MedicalRecords=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),d=n(3939),y=n(98595),V=n(321),k=n(5485),S=n(22091),p={Minor:"lightgray",Medium:"good",Harmful:"average","Dangerous!":"bad","BIOHAZARD THREAT!":"darkred"},i={"*Deceased*":"deceased","*SSD*":"ssd","Physically Unfit":"physically_unfit",Disabled:"disabled"},l=function(w,A){(0,d.modalOpen)(w,"edit",{field:A.edit,value:A.value})},f=function(w,A){var T=w.args;return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:T.name||"Virus",children:(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Number of stages",children:T.max_stages}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Spread",children:[T.spread_text," Transmission"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Possible cure",children:T.cure}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Notes",children:T.desc}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Severity",color:p[T.severity],children:T.severity})]})})})},u=r.MedicalRecords=function(){function L(w,A){var T=(0,t.useBackend)(A),E=T.data,O=E.loginState,P=E.screen;if(!O.logged_in)return(0,e.createComponentVNode)(2,y.Window,{width:800,height:900,children:(0,e.createComponentVNode)(2,y.Window.Content,{children:(0,e.createComponentVNode)(2,k.LoginScreen)})});var R;return P===2?R=(0,e.createComponentVNode)(2,s):P===3?R=(0,e.createComponentVNode)(2,m):P===4?R=(0,e.createComponentVNode)(2,c):P===5?R=(0,e.createComponentVNode)(2,h):P===6&&(R=(0,e.createComponentVNode)(2,C)),(0,e.createComponentVNode)(2,y.Window,{width:800,height:900,children:[(0,e.createComponentVNode)(2,d.ComplexModal),(0,e.createComponentVNode)(2,y.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,V.LoginInfo),(0,e.createComponentVNode)(2,S.TemporaryNotice),(0,e.createComponentVNode)(2,B),R]})})]})}return L}(),s=function(w,A){var T=(0,t.useBackend)(A),E=T.act,O=T.data,P=O.records,R=(0,t.useLocalState)(A,"searchText",""),F=R[0],j=R[1],W=(0,t.useLocalState)(A,"sortId","name"),z=W[0],H=W[1],$=(0,t.useLocalState)(A,"sortOrder",!0),G=$[0],ne=$[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Manage Records",icon:"wrench",ml:"0.25rem",onClick:function(){function Q(){return E("screen",{screen:3})}return Q}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{fluid:!0,placeholder:"Search by Name, ID, Physical Status, or Mental Status",onInput:function(){function Q(he,Ve){return j(Ve)}return Q}()})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,mt:.5,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"MedicalRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,N,{id:"name",children:"Name"}),(0,e.createComponentVNode)(2,N,{id:"id",children:"ID"}),(0,e.createComponentVNode)(2,N,{id:"rank",children:"Assignment"}),(0,e.createComponentVNode)(2,N,{id:"p_stat",children:"Patient Status"}),(0,e.createComponentVNode)(2,N,{id:"m_stat",children:"Mental Status"})]}),P.filter((0,a.createSearch)(F,function(Q){return Q.name+"|"+Q.id+"|"+Q.rank+"|"+Q.p_stat+"|"+Q.m_stat})).sort(function(Q,he){var Ve=G?1:-1;return Q[z].localeCompare(he[z])*Ve}).map(function(Q){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listRow--"+i[Q.p_stat],onClick:function(){function he(){return E("view_record",{view_record:Q.ref})}return he}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",Q.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Q.id}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Q.rank}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Q.p_stat}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Q.m_stat})]},Q.id)})]})})})],4)},m=function(w,A){var T=(0,t.useBackend)(A),E=T.act;return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,lineHeight:3,color:"translucent",icon:"download",content:"Backup to Disk",disabled:!0})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:[(0,e.createComponentVNode)(2,o.Button,{fluid:!0,lineHeight:3,color:"translucent",icon:"upload",content:"Upload from Disk",my:"0.5rem",disabled:!0})," "]}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Button.Confirm,{fluid:!0,lineHeight:3,icon:"trash",color:"translucent",content:"Delete All Medical Records",onClick:function(){function O(){return E("del_all")}return O}()})})]})})},c=function(w,A){var T=(0,t.useBackend)(A),E=T.act,O=T.data,P=O.medical,R=O.printing;return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{height:"235px",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"General Data",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:R?"spinner":"print",disabled:R,iconSpin:!!R,content:"Print Record",ml:"0.5rem",onClick:function(){function F(){return E("print_record")}return F}()}),children:(0,e.createComponentVNode)(2,v)})}),!P||!P.fields?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Medical Data",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"pen",content:"Create New Record",onClick:function(){function F(){return E("new")}return F}()}),children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{bold:!0,grow:!0,textAlign:"center",fontSize:1.75,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon.Stack,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"scroll",size:5,color:"gray"}),(0,e.createComponentVNode)(2,o.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"Medical records lost!"]})})})}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Medical Data",buttons:(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",disabled:!!P.empty,content:"Delete Medical Record",onClick:function(){function F(){return E("del_r")}return F}()}),children:(0,e.createComponentVNode)(2,b)})}),(0,e.createComponentVNode)(2,g)],4)],0)},v=function(w,A){var T=(0,t.useBackend)(A),E=T.data,O=E.general;return!O||!O.fields?(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:"General records lost!"})})}):(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:O.fields.map(function(P,R){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:P.field,children:[(0,e.createComponentVNode)(2,o.Box,{height:"20px",inline:!0,children:P.value}),!!P.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",onClick:function(){function F(){return l(A,P)}return F}()})]},R)})})}),!!O.has_photos&&O.photos.map(function(P,R){return(0,e.createComponentVNode)(2,o.Stack.Item,{inline:!0,textAlign:"center",color:"label",ml:0,children:[(0,e.createVNode)(1,"img",null,null,1,{src:P,style:{width:"96px","margin-top":"2.5rem","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}}),(0,e.createVNode)(1,"br"),"Photo #",R+1]},R)})]})},b=function(w,A){var T=(0,t.useBackend)(A),E=T.act,O=T.data,P=O.medical;return!P||!P.fields?(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:"Medical records lost!"})})}):(0,e.createComponentVNode)(2,o.Stack,{children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:P.fields.map(function(R,F){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:R.field,preserveWhitespace:!0,children:[(0,a.decodeHtmlEntities)(R.value),!!R.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",mb:R.line_break?"1rem":"initial",onClick:function(){function j(){return l(A,R)}return j}()})]},F)})})})})},g=function(w,A){var T=(0,t.useBackend)(A),E=T.act,O=T.data,P=O.medical;return(0,e.createComponentVNode)(2,o.Stack.Item,{height:"150px",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Comments/Log",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"comment",content:"Add Entry",onClick:function(){function R(){return(0,d.modalOpen)(A,"add_comment")}return R}()}),children:P.comments.length===0?(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No comments found."}):P.comments.map(function(R,F){return(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{color:"label",inline:!0,children:R.header}),(0,e.createVNode)(1,"br"),R.text,(0,e.createComponentVNode)(2,o.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){function j(){return E("del_c",{del_c:F+1})}return j}()})]},F)})})})},h=function(w,A){var T=(0,t.useBackend)(A),E=T.act,O=T.data,P=O.virus,R=(0,t.useLocalState)(A,"searchText",""),F=R[0],j=R[1],W=(0,t.useLocalState)(A,"sortId2","name"),z=W[0],H=W[1],$=(0,t.useLocalState)(A,"sortOrder2",!0),G=$[0],ne=$[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{ml:"0.25rem",fluid:!0,placeholder:"Search by Name, Max Stages, or Severity",onInput:function(){function Q(he,Ve){return j(Ve)}return Q}()})}),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,mt:.5,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"MedicalRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,x,{id:"name",children:"Name"}),(0,e.createComponentVNode)(2,x,{id:"max_stages",children:"Max Stages"}),(0,e.createComponentVNode)(2,x,{id:"severity",children:"Severity"})]}),P.filter((0,a.createSearch)(F,function(Q){return Q.name+"|"+Q.max_stages+"|"+Q.severity})).sort(function(Q,he){var Ve=G?1:-1;return Q[z].localeCompare(he[z])*Ve}).map(function(Q){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listVirus--"+Q.severity,onClick:function(){function he(){return E("vir",{vir:Q.D})}return he}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"virus"})," ",Q.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Q.max_stages}),(0,e.createComponentVNode)(2,o.Table.Cell,{color:p[Q.severity],children:Q.severity})]},Q.id)})]})})})})],4)},C=function(w,A){var T=(0,t.useBackend)(A),E=T.act,O=T.data,P=O.medbots;return P.length===0?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{bold:!0,grow:!0,textAlign:"center",fontSize:1.75,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon.Stack,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"robot",size:5,color:"gray"}),(0,e.createComponentVNode)(2,o.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"There are no Medibots."]})})})}):(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"MedicalRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Area"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Chemicals"})]}),P.map(function(R){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listMedbot--"+R.on,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"medical"})," ",R.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:[R.area||"Unknown"," (",R.x,", ",R.y,")"]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:R.on?(0,e.createComponentVNode)(2,o.Box,{color:"good",children:"Online"}):(0,e.createComponentVNode)(2,o.Box,{color:"average",children:"Offline"})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:R.use_beaker?"Reservoir: "+R.total_volume+"/"+R.maximum_volume:"Using internal synthesizer"})]},R.id)})]})})})},N=function(w,A){var T=(0,t.useLocalState)(A,"sortId","name"),E=T[0],O=T[1],P=(0,t.useLocalState)(A,"sortOrder",!0),R=P[0],F=P[1],j=w.id,W=w.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:E!==j&&"transparent",onClick:function(){function z(){E===j?F(!R):(O(j),F(!0))}return z}(),children:[W,E===j&&(0,e.createComponentVNode)(2,o.Icon,{name:R?"sort-up":"sort-down",ml:"0.25rem;"})]})})},x=function(w,A){var T=(0,t.useLocalState)(A,"sortId2","name"),E=T[0],O=T[1],P=(0,t.useLocalState)(A,"sortOrder2",!0),R=P[0],F=P[1],j=w.id,W=w.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:E!==j&&"transparent",onClick:function(){function z(){E===j?F(!R):(O(j),F(!0))}return z}(),children:[W,E===j&&(0,e.createComponentVNode)(2,o.Icon,{name:R?"sort-up":"sort-down",ml:"0.25rem;"})]})})},B=function(w,A){var T=(0,t.useBackend)(A),E=T.act,O=T.data,P=O.screen,R=O.general;return(0,e.createComponentVNode)(2,o.Stack.Item,{m:0,children:(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"list",selected:P===2,onClick:function(){function F(){E("screen",{screen:2})}return F}(),children:"List Records"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"database",selected:P===5,onClick:function(){function F(){E("screen",{screen:5})}return F}(),children:"Virus Database"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"plus-square",selected:P===6,onClick:function(){function F(){return E("screen",{screen:6})}return F}(),children:"Medibot Tracking"}),P===3&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"wrench",selected:P===3,children:"Record Maintenance"}),P===4&&R&&!R.empty&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"file",selected:P===4,children:["Record: ",R.fields[0].value]})]})})};(0,d.modalRegisterBodyOverride)("virus",f)},52306:function(I,r,n){"use strict";r.__esModule=!0,r.Mimicking=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.Mimicking=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.slots||[];return(0,e.createComponentVNode)(2,o.Window,{width:400,height:300,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,fill:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:[l.map(function(f){return(0,e.createComponentVNode)(2,t.Section,{mb:.5,title:f.name,level:2,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Choose",selected:f.selected,onClick:function(){function u(){return p("Choose",{id:f.id})}return u}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Delete",color:"bad",onClick:function(){function u(){return p("Delete",{id:f.id})}return u}()})],4),children:(0,e.createComponentVNode)(2,t.Box,{preserveWhitespace:!0,textColor:"#878787",fontSize:"14px",children:["Voice: ",f.voice]})},f.id)}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"Add",onClick:function(){function f(){return p("Add")}return f}()})]})})})})}return y}()},66238:function(I,r,n){"use strict";r.__esModule=!0,r.Minesweeper=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.Minesweeper=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.matrix,f=i.showMessage,u=i.tokens,s=i.uiWidth,m={1:"blue",2:"green",3:"red",4:"darkblue",5:"brown",6:"lightblue",7:"black",8:"white"};document.addEventListener("contextmenu",function(C){return C.preventDefault()});var c=function(){function C(N,x,B){N.button!==0&&N.button!==2||p("Square",{X:x,Y:B,mode:N.button===2?h[b]:b})}return C}(),v=(0,a.useLocalState)(k,"mode","bomb"),b=v[0],g=v[1],h={flag:"bomb",bomb:"flag"};return(0,e.createComponentVNode)(2,o.Window,{theme:"ntOS95",width:s+80,height:750,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"\u0418\u0433\u0440\u043E\u0432\u043E\u0435 \u043F\u043E\u043B\u0435",textAlign:"center",fill:!0,fitted:!0,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"bomb",iconColor:"black",selected:b==="bomb",onClick:function(){function C(){return g("bomb")}return C}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"flag",iconColor:"red",selected:b==="flag",onClick:function(){function C(){return g("flag")}return C}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",onClick:function(){function C(){return p("Mode",{mode:"16x30"})}return C}()})],4),children:[(0,e.createVNode)(1,"p"),Object.keys(l).map(function(C){return(0,e.createComponentVNode)(2,t.Box,{children:Object.keys(l[C]).map(function(N){return(0,e.createComponentVNode)(2,t.Button,{m:"1px",height:"30px",width:"30px",className:l[C][N].open?"Minesweeper__open":"Minesweeper__closed",bold:!0,color:"transparent",icon:l[C][N].open?l[C][N].bomb?"bomb":"":l[C][N].flag?"flag":"",textColor:l[C][N].open?l[C][N].bomb?"black":m[l[C][N].around]:l[C][N].flag?"red":"gray",onMouseDown:function(){function x(B){return c(B,C,N)}return x}(),children:l[C][N].open&&!l[C][N].bomb&&l[C][N].around?l[C][N].around:" "},N)})},C)}),(0,e.createVNode)(1,"p"),(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",className:"Minesweeper__message",children:["\u0414\u043B\u044F \u043F\u043E\u0431\u0435\u0434\u044B \u043D\u0443\u0436\u043D\u043E \u043F\u043E\u043C\u0435\u0442\u0438\u0442\u044C \u0444\u043B\u0430\u0436\u043A\u0430\u043C\u0438 \u0432\u0441\u0435 \u0431\u043E\u043C\u0431\u044B, \u0430 \u0442\u0430\u043A\u0436\u0435 \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u0432\u0441\u0435 \u043F\u0443\u0441\u0442\u044B\u0435 \u043A\u043B\u0435\u0442\u043A\u0438.",(0,e.createVNode)(1,"br"),"\u0411\u0430\u043B\u0430\u043D\u0441 \u0442\u043E\u043A\u0435\u043D\u043E\u0432: ",u,(0,e.createVNode)(1,"br"),f]})]})})})})}return y}()},21385:function(I,r,n){"use strict";r.__esModule=!0,r.MiniGamesMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.MiniGamesMenu=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.spawners||[],f=i.thunderdome_eligible,u=i.notifications_enabled;return(0,e.createComponentVNode)(2,o.Window,{width:700,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"power-off",tooltip:f?"\u0412\u044B\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0443\u0447\u0430\u0441\u0442\u0438\u0435 \u0432 \u0431\u043E\u0435\u0432\u044B\u0445 \u043C\u0438\u043D\u0438-\u0438\u0433\u0440\u0430\u0445":"\u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0443\u0447\u0430\u0441\u0442\u0438\u0435 \u0432 \u0431\u043E\u0435\u0432\u044B\u0445 \u043C\u0438\u043D\u0438-\u0438\u0433\u0440\u0430\u0445",tooltipPosition:"bottom",content:f?"\u0412\u044B\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0443\u0447\u0430\u0441\u0442\u0438\u0435 \u0432 \u0431\u043E\u0435\u0432\u044B\u0445 \u043C\u0438\u043D\u0438-\u0438\u0433\u0440\u0430\u0445":"\u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0443\u0447\u0430\u0441\u0442\u0438\u0435 \u0432 \u0431\u043E\u0435\u0432\u044B\u0445 \u043C\u0438\u043D\u0438-\u0438\u0433\u0440\u0430\u0445",color:f?"good":"bad",onClick:function(){function s(){return p("toggle_minigames")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"power-off",tooltip:u?"\u041E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u044F \u043E \u0431\u043E\u0435\u0432\u044B\u0445 \u043C\u0438\u043D\u0438-\u0438\u0433\u0440\u0430\u0445":"\u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u044F \u043E \u0431\u043E\u0435\u0432\u044B\u0445 \u043C\u0438\u043D\u0438-\u0438\u0433\u0440\u0430\u0445",tooltipPosition:"bottom",content:u?"\u041E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u044F \u043E \u0431\u043E\u0435\u0432\u044B\u0445 \u043C\u0438\u043D\u0438-\u0438\u0433\u0440\u0430\u0445":"\u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u044F \u043E \u0431\u043E\u0435\u0432\u044B\u0445 \u043C\u0438\u043D\u0438-\u0438\u0433\u0440\u0430\u0445",color:u?"good":"bad",onClick:function(){function s(){return p("toggle_notifications")}return s}()}),(0,e.createComponentVNode)(2,t.Section,{children:l.map(function(s){return(0,e.createComponentVNode)(2,t.Section,{mb:.5,title:s.name,level:2,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-circle-right",content:"Jump",onClick:function(){function m(){return p("jump",{ID:s.uids})}return m}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-circle-right",content:"Start",onClick:function(){function m(){return p("spawn",{ID:s.uids})}return m}()})],4),children:[(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},mb:1,fontSize:"16px",children:s.desc}),!!s.fluff&&(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},textColor:"#878787",fontSize:"14px",children:s.fluff}),!!s.important_info&&(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},mt:1,bold:!0,color:"red",fontSize:"18px",children:s.important_info})]},s.name)})})]})})}return y}()},87684:function(I,r,n){"use strict";r.__esModule=!0,r.MiningVendor=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),d=n(98595),y=["title","items"];function V(u,s){if(u==null)return{};var m={};for(var c in u)if({}.hasOwnProperty.call(u,c)){if(s.includes(c))continue;m[c]=u[c]}return m}var k={Alphabetical:function(){function u(s,m){return s-m}return u}(),Availability:function(){function u(s,m){return-(s.affordable-m.affordable)}return u}(),Price:function(){function u(s,m){return s.price-m.price}return u}()},S=r.MiningVendor=function(){function u(s,m){return(0,e.createComponentVNode)(2,d.Window,{width:400,height:450,children:(0,e.createComponentVNode)(2,d.Window.Content,{className:"Layout__content--flexColumn",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,p),(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,i)]})})})}return u}(),p=function(s,m){var c=(0,t.useBackend)(m),v=c.act,b=c.data,g=b.has_id,h=b.id;return(0,e.createComponentVNode)(2,o.NoticeBox,{success:g,children:g?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{inline:!0,verticalAlign:"middle",style:{float:"left"},children:["Logged in as ",h.name,".",(0,e.createVNode)(1,"br"),"You have ",h.points.toLocaleString("en-US")," points."]}),(0,e.createComponentVNode)(2,o.Button,{icon:"eject",content:"Eject ID",style:{float:"right"},onClick:function(){function C(){return v("logoff")}return C}()}),(0,e.createComponentVNode)(2,o.Box,{style:{clear:"both"}})],4):"Please insert an ID in order to make purchases."})},i=function(s,m){var c=(0,t.useBackend)(m),v=c.act,b=c.data,g=b.has_id,h=b.id,C=b.items,N=(0,t.useLocalState)(m,"search",""),x=N[0],B=N[1],L=(0,t.useLocalState)(m,"sort","Alphabetical"),w=L[0],A=L[1],T=(0,t.useLocalState)(m,"descending",!1),E=T[0],O=T[1],P=(0,a.createSearch)(x,function(j){return j[0]}),R=!1,F=Object.entries(C).map(function(j,W){var z=Object.entries(j[1]).filter(P).map(function(H){return H[1].affordable=g&&h.points>=H[1].price,H[1]}).sort(k[w]);if(z.length!==0)return E&&(z=z.reverse()),R=!0,(0,e.createComponentVNode)(2,f,{title:j[0],items:z},j[0])});return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:R?F:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No items matching your criteria was found!"})})})},l=function(s,m){var c=(0,t.useLocalState)(m,"search",""),v=c[0],b=c[1],g=(0,t.useLocalState)(m,"sort",""),h=g[0],C=g[1],N=(0,t.useLocalState)(m,"descending",!1),x=N[0],B=N[1];return(0,e.createComponentVNode)(2,o.Box,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Search by item name..",width:"100%",onInput:function(){function L(w,A){return b(A)}return L}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"30%",children:(0,e.createComponentVNode)(2,o.Dropdown,{selected:"Alphabetical",options:Object.keys(k),width:"100%",onSelected:function(){function L(w){return C(w)}return L}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:x?"arrow-down":"arrow-up",height:"21px",tooltip:x?"Descending order":"Ascending order",tooltipPosition:"bottom-start",onClick:function(){function L(){return B(!x)}return L}()})})]})})},f=function(s,m){var c=(0,t.useBackend)(m),v=c.act,b=c.data,g=s.title,h=s.items,C=V(s,y);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Collapsible,Object.assign({open:!0,title:g},C,{children:h.map(function(N){return(0,e.createComponentVNode)(2,o.ImageButton,{bold:!0,asset:!0,color:"brown",imageSize:"64px",image:N.imageId,imageAsset:"mining_vendor64x64",content:N.name,children:(0,e.createComponentVNode)(2,o.ImageButton.Item,{bold:!0,horizontal:!0,width:"64px",fontSize:1,content:N.price,icon:"shopping-cart",iconSize:1,iconColor:!b.has_id||b.id.points"})}),!!O&&(0,e.createComponentVNode)(2,s,{mt:1.1,label:"ID tag",compactLabel:!0,wrapContent:F?(0,e.createComponentVNode)(2,f,{text:R,defaultText:"",color:"silver"}):(0,e.createComponentVNode)(2,o.Box,{as:"span",fontSize:"0.9rem",color:"red",italic:!0,nowrap:!0,children:"Not supported"})})]})})]})})})}return x}(),i=function(B,L){var w=B.iconName,A=B.machineName,T=B.noMachine,E=B.noMachineText,O=B.noMachineElem,P="Unknown machine",R=T?E:A||"Unknown machine",F=R===E,j=R===E||R===P;return T&&O?O:(0,e.createComponentVNode)(2,o.Flex,{mt:.1,mb:1.9,children:[!T&&(0,e.createComponentVNode)(2,o.Flex.Item,{grow:0,shrink:0,align:"center",children:(0,e.createComponentVNode)(2,o.Icon,{mr:1,size:1.1,name:w})}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:1,shrink:1,basis:0,wordWrap:"break-word",children:(0,e.createComponentVNode)(2,o.Box,{as:"span",wordWrap:"break-word",color:F?"label":"silver",fontSize:"1.1rem",bold:!0,italic:j,children:R})})]})},l=function(B,L){var w=B.text;return(0,e.createComponentVNode)(2,o.Box,{as:"span",fontSize:"0.9rem",color:"yellow",italic:!0,nowrap:!0,children:w})},f=function(B,L){var w=B.text,A=B.defaultText,T=S(B,y);return w?(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({as:"span",wordWrap:"break-word"},T,{children:w}))):(0,e.createComponentVNode)(2,l,{text:A})},u=function(B,L){var w=B.noConfirm,A=w===void 0?!1:w,T=S(B,V);return A?(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Button,Object.assign({},T))):(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Button.Confirm,Object.assign({},T)))},s=function(B,L){var w=B.label,A=B.wrapContent,T=B.noWrapContent,E=B.compactLabel,O=E===void 0?!1:E,P=S(B,k);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Flex,Object.assign({my:.5,mr:"0.5%",spacing:1,align:"center"},P,{children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:O?0:1,shrink:0,textOverflow:"ellipsis",overflow:"hidden",basis:O?"auto":0,maxWidth:O?"none":20,color:"label",nowrap:!0,children:w}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:1,shrink:1,basis:0,textAlign:"center",wordWrap:"break-word",children:A}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:.1}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:0,shrink:0,nowrap:!0,children:T})]})))},m=function(B,L){var w=(0,t.useBackend)(L),A=w.act,T=w.data;return(0,e.createComponentVNode)(2,o.Box,{mt:1.5,fontSize:"0.9rem",color:"silver",italic:!0,children:"No options"})},c=function(B,L){var w=(0,t.useBackend)(L),A=w.act,T=w.data;return(0,e.createComponentVNode)(2,o.Box,{fontSize:"1.1rem",color:"red",bold:!0,italic:!0,children:"ACCESS DENIED"})},v=function(B,L){var w=(0,t.useBackend)(L),A=w.act,T=w.data,E=T.attachedTag;return(0,e.createComponentVNode)(2,s,{label:"ID tag",wrapContent:(0,e.createComponentVNode)(2,f,{text:E,defaultText:"",color:"silver"}),noWrapContent:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{content:"Set",icon:"wrench",onClick:function(){function O(){return A("set_tag")}return O}()}),(0,e.createComponentVNode)(2,o.Button,{content:"Clear",icon:"times-circle",color:"red",disabled:!E,onClick:function(){function O(){return A("clear_tag")}return O}()})],4)})},b=function(B,L){var w=(0,t.useBackend)(L),A=w.act,T=w.data,E=T.frequency,O=T.minFrequency,P=T.maxFrequency,R=T.canReset;return(0,e.createComponentVNode)(2,s,{label:"Frequency",noWrapContent:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,unit:"kHz",step:.1,stepPixelSize:10,minValue:O/10,maxValue:P/10,value:E/10,format:function(){function F(j){return(0,a.toFixed)(j,1)}return F}(),onChange:function(){function F(j,W){return A("set_frequency",{frequency:W*10})}return F}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"undo",content:"",disabled:!R,tooltip:"Reset",onClick:function(){function F(){return A("reset_frequency")}return F}()})],4)})},g=function(B,L){var w=(0,t.useBackend)(L),A=w.act,T=w.data,E=T.attachedTags;return(0,e.createComponentVNode)(2,o.Section,{mt:1.7,ml:.5,mr:1,px:.5,title:"Linked tags",buttons:(0,e.createComponentVNode)(2,o.Button,{mr:1,pl:2.1,content:"Add tag",icon:"plus",iconRight:!0,onClick:function(){function O(){return A("add_tag")}return O}()}),children:E.map(function(O,P){return(0,e.createComponentVNode)(2,s,{mr:0,label:(0,e.createComponentVNode)(2,o.Icon,{name:"wave-square"}),compactLabel:!0,wrapContent:(0,e.createComponentVNode)(2,o.Flex,{align:"center",spacing:1,children:(0,e.createComponentVNode)(2,o.Flex.Item,{grow:1,shrink:1,basis:0,color:"silver",wordWrap:"break-word",children:O})}),noWrapContent:(0,e.createComponentVNode)(2,o.Flex,{children:(0,e.createComponentVNode)(2,o.Flex.Item,{grow:0,shrink:0,children:(0,e.createComponentVNode)(2,o.Button,{icon:"minus",color:"red",onClick:function(){function R(){return A("remove_tag",{tag_index:P})}return R}()})})})},P)})})},h=function(B,L){var w=(0,t.useBackend)(L),A=w.act,T=w.data,E=T.bolts,O=T.pressureCheck,P=T.temperatureCheck,R=T.oxygenCheck,F=T.toxinsCheck,j=T.nitrogenCheck,W=T.carbonDioxideCheck,z=[{bitflag:1,checked:O,label:"Monitor pressure"},{bitflag:2,checked:P,label:"Monitor temperature"},{bitflag:4,checked:R,label:"Monitor oxygen concentration"},{bitflag:8,checked:F,label:"Monitor plasma concentration"},{bitflag:16,checked:j,label:"Monitor nitrogen concentration"},{bitflag:32,checked:W,label:"Monitor carbon dioxide concentration"}];return(0,e.createFragment)([(0,e.createComponentVNode)(2,s,{label:"Floor bolts",noWrapContent:(0,e.createComponentVNode)(2,o.Button,{icon:E?"check":"times",selected:E,content:E?"YES":"NO",onClick:function(){function H(){return A("toggle_bolts")}return H}()})}),z.map(function(H){return(0,e.createComponentVNode)(2,s,{label:H.label,noWrapContent:(0,e.createComponentVNode)(2,o.Button.Checkbox,{checked:H.checked,onClick:function(){function $(){return A("toggle_flag",{bitflag:H.bitflag})}return $}()})},H.bitflag)})],0)},C=function(B,L){var w=(0,t.useBackend)(L),A=w.act,T=w.data,E=T.sensors;return(0,e.createComponentVNode)(2,o.Section,{mt:1.7,ml:.5,mr:1,px:.5,title:"Sensors",buttons:(0,e.createComponentVNode)(2,o.Button,{mr:1,pl:2.1,content:"Add sensor",icon:"plus",iconRight:!0,onClick:function(){function O(){return A("add_sensor")}return O}()}),children:[(0,e.createComponentVNode)(2,s,{mr:0,compactLabel:!0,wrapContent:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Flex.Item,{width:1}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:1,shrink:1,basis:0,color:"label",nowrap:!0,bold:!0,children:"ID tag"}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:1,shrink:1,basis:0,color:"label",nowrap:!0,bold:!0,children:"Label"}),(0,e.createComponentVNode)(2,o.Flex.Item,{width:11.3})]})}),Object.keys(E).map(function(O){return(0,e.createComponentVNode)(2,s,{mr:0,label:(0,e.createComponentVNode)(2,o.Icon,{name:"wave-square"}),compactLabel:!0,wrapContent:(0,e.createComponentVNode)(2,o.Flex,{align:"center",spacing:1,children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:1,shrink:1,basis:0,color:"silver",wordWrap:"break-word",children:O}),E[O]?(0,e.createComponentVNode)(2,o.Flex.Item,{grow:1,shrink:1,basis:0,color:"silver",wordWrap:"break-word",children:E[O]}):(0,e.createComponentVNode)(2,o.Flex.Item,{grow:1,shrink:1,basis:0,fontSize:"0.9rem",color:"yellow",italic:!0,nowrap:!0,children:""})]}),noWrapContent:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:0,shrink:0,children:[(0,e.createComponentVNode)(2,o.Button,{content:"Label",icon:"edit",onClick:function(){function P(){return A("change_label",{sensor_tag:O})}return P}()}),(0,e.createComponentVNode)(2,o.Button,{content:"Label",icon:"times-circle",color:"orange",disabled:!E[O],onClick:function(){function P(){return A("clear_label",{sensor_tag:O})}return P}()})]}),(0,e.createComponentVNode)(2,o.Flex.Item,{width:.5}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:0,shrink:0,children:(0,e.createComponentVNode)(2,o.Button,{px:1.2,icon:"minus",color:"red",onClick:function(){function P(){return A("del_sensor",{sensor_tag:O})}return P}()})})]})},O)})]})},N=function(B,L){var w=(0,t.useBackend)(L),A=w.act,T=w.data,E=T.inputTag,O=T.outputTag,P=T.bufferTag,R=T.bufferFitsInput,F=T.bufferFitsOutput,j=T.doNotLinkAndNotify;return(0,e.createFragment)([(0,e.createComponentVNode)(2,s,{label:"Input",labelWidth:6,wrapContent:(0,e.createComponentVNode)(2,f,{text:E,defaultText:"",color:"silver"}),noWrapContent:(0,e.createFragment)([(0,e.createComponentVNode)(2,u,{noConfirm:j||!E,confirmContent:"This will change the intput device. Confirm?",confirmColor:"orange",content:"Link buffer",icon:"link",selected:E&&P===E,disabled:!R,onClick:function(){function W(){return A("link_input")}return W}()}),(0,e.createComponentVNode)(2,o.Button.Confirm,{confirmContent:"This will unlink the intput device. Confirm?",confirmColor:"orange",content:"Unlink",icon:"unlink",color:"red",disabled:!E,onClick:function(){function W(){return A("unlink_input")}return W}()})],4)}),(0,e.createComponentVNode)(2,s,{label:"Output",labelWidth:6,wrapContent:(0,e.createComponentVNode)(2,f,{text:O,defaultText:"",color:"silver"}),noWrapContent:(0,e.createFragment)([(0,e.createComponentVNode)(2,u,{noConfirm:j||!O,confirmContent:"This will change the output device. Confirm?",confirmColor:"orange",content:"Link buffer",icon:"link",selected:O&&P===O,disabled:!F,onClick:function(){function W(){return A("link_output")}return W}()}),(0,e.createComponentVNode)(2,o.Button.Confirm,{confirmContent:"This will unlink the output device. Confirm?",confirmColor:"orange",content:"Unlink",icon:"unlink",color:"red",disabled:!O,onClick:function(){function W(){return A("unlink_output")}return W}()})],4)})],4)}},64713:function(I,r,n){"use strict";r.__esModule=!0,r.Newscaster=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),d=n(76910),y=n(98595),V=n(3939),k=n(22091),S=["icon","iconSpin","selected","security","onClick","title","children"],p=["name"];function i(B,L){if(B==null)return{};var w={};for(var A in B)if({}.hasOwnProperty.call(B,A)){if(L.includes(A))continue;w[A]=B[A]}return w}var l=128,f=["security","engineering","medical","science","service","supply"],u={security:{title:"Security",fluff_text:"Help keep the crew safe"},engineering:{title:"Engineering",fluff_text:"Ensure the station runs smoothly"},medical:{title:"Medical",fluff_text:"Practice medicine and save lives"},science:{title:"Science",fluff_text:"Develop new technologies"},service:{title:"Service",fluff_text:"Provide amenities to the crew"},supply:{title:"Supply",fluff_text:"Keep the station supplied"}},s=r.Newscaster=function(){function B(L,w){var A=(0,t.useBackend)(w),T=A.act,E=A.data,O=E.is_security,P=E.is_admin,R=E.is_silent,F=E.is_printing,j=E.screen,W=E.channels,z=E.channel_idx,H=z===void 0?-1:z,$=(0,t.useLocalState)(w,"menuOpen",!1),G=$[0],ne=$[1],Q=(0,t.useLocalState)(w,"viewingPhoto",""),he=Q[0],Ve=Q[1],Ne=(0,t.useLocalState)(w,"censorMode",!1),Be=Ne[0],Le=Ne[1],Ae;j===0||j===2?Ae=(0,e.createComponentVNode)(2,c):j===1&&(Ae=(0,e.createComponentVNode)(2,v));var fe=W.reduce(function(Z,J){return Z+J.unread},0);return(0,e.createComponentVNode)(2,y.Window,{theme:O&&"security",width:800,height:600,children:[he?(0,e.createComponentVNode)(2,h):(0,e.createComponentVNode)(2,V.ComplexModal,{maxWidth:window.innerWidth/1.5+"px",maxHeight:window.innerHeight/1.5+"px"}),(0,e.createComponentVNode)(2,y.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Section,{fill:!0,className:(0,a.classes)(["Newscaster__menu",G&&"Newscaster__menu--open"]),children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,m,{icon:"bars",title:"Toggle Menu",onClick:function(){function Z(){return ne(!G)}return Z}()}),(0,e.createComponentVNode)(2,m,{icon:"newspaper",title:"Headlines",selected:j===0,onClick:function(){function Z(){return T("headlines")}return Z}(),children:fe>0&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--unread",children:fe>=10?"9+":fe})}),(0,e.createComponentVNode)(2,m,{icon:"briefcase",title:"Job Openings",selected:j===1,onClick:function(){function Z(){return T("jobs")}return Z}()}),(0,e.createComponentVNode)(2,o.Divider)]}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:W.map(function(Z){return(0,e.createComponentVNode)(2,m,{icon:Z.icon,title:Z.name,selected:j===2&&W[H-1]===Z,onClick:function(){function J(){return T("channel",{uid:Z.uid})}return J}(),children:Z.unread>0&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--unread",children:Z.unread>=10?"9+":Z.unread})},Z)})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Divider),(!!O||!!P)&&(0,e.createFragment)([(0,e.createComponentVNode)(2,m,{security:!0,icon:"exclamation-circle",title:"Edit Wanted Notice",mb:"0.5rem",onClick:function(){function Z(){return(0,V.modalOpen)(w,"wanted_notice")}return Z}()}),(0,e.createComponentVNode)(2,m,{security:!0,icon:Be?"minus-square":"minus-square-o",title:"Censor Mode: "+(Be?"On":"Off"),mb:"0.5rem",onClick:function(){function Z(){return Le(!Be)}return Z}()}),(0,e.createComponentVNode)(2,o.Divider)],4),(0,e.createComponentVNode)(2,m,{icon:"pen-alt",title:"New Story",mb:"0.5rem",onClick:function(){function Z(){return(0,V.modalOpen)(w,"create_story")}return Z}()}),(0,e.createComponentVNode)(2,m,{icon:"plus-circle",title:"New Channel",onClick:function(){function Z(){return(0,V.modalOpen)(w,"create_channel")}return Z}()}),(0,e.createComponentVNode)(2,o.Divider),(0,e.createComponentVNode)(2,m,{icon:F?"spinner":"print",iconSpin:F,title:F?"Printing...":"Print Newspaper",onClick:function(){function Z(){return T("print_newspaper")}return Z}()}),(0,e.createComponentVNode)(2,m,{icon:R?"volume-mute":"volume-up",title:"Mute: "+(R?"On":"Off"),onClick:function(){function Z(){return T("toggle_mute")}return Z}()})]})]})}),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,width:"100%",children:[(0,e.createComponentVNode)(2,k.TemporaryNotice),Ae]})]})})]})}return B}(),m=function(L,w){var A=(0,t.useBackend)(w),T=A.act,E=L.icon,O=E===void 0?"":E,P=L.iconSpin,R=L.selected,F=R===void 0?!1:R,j=L.security,W=j===void 0?!1:j,z=L.onClick,H=L.title,$=L.children,G=i(L,S);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({className:(0,a.classes)(["Newscaster__menuButton",F&&"Newscaster__menuButton--selected",W&&"Newscaster__menuButton--security"]),onClick:z},G,{children:[F&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--selectedBar"}),(0,e.createComponentVNode)(2,o.Icon,{name:O,spin:P,size:"2"}),(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--title",children:H}),$]})))},c=function(L,w){var A=(0,t.useBackend)(w),T=A.act,E=A.data,O=E.screen,P=E.is_admin,R=E.channel_idx,F=E.channel_can_manage,j=E.channels,W=E.stories,z=E.wanted,H=(0,t.useLocalState)(w,"fullStories",[]),$=H[0],G=H[1],ne=(0,t.useLocalState)(w,"censorMode",!1),Q=ne[0],he=ne[1],Ve=O===2&&R>-1?j[R-1]:null;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[!!z&&(0,e.createComponentVNode)(2,b,{story:z,wanted:!0}),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:Ve?Ve.icon:"newspaper",mr:"0.5rem"}),Ve?Ve.name:"Headlines"],0),children:W.length>0?W.slice().reverse().map(function(Ne){return!$.includes(Ne.uid)&&Ne.body.length+3>l?Object.assign({},Ne,{body_short:Ne.body.substr(0,l-4)+"..."}):Ne}).map(function(Ne,Be){return(0,e.createComponentVNode)(2,b,{story:Ne},Be)}):(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__emptyNotice",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"times",size:"3"}),(0,e.createVNode)(1,"br"),"There are no stories at this time."]})}),!!Ve&&(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,height:"40%",title:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:"info-circle",mr:"0.5rem"}),(0,e.createTextVNode)("About")],4),buttons:(0,e.createFragment)([Q&&(0,e.createComponentVNode)(2,o.Button,{disabled:!!Ve.admin&&!P,selected:Ve.censored,icon:Ve.censored?"comment-slash":"comment",content:Ve.censored?"Uncensor Channel":"Censor Channel",mr:"0.5rem",onClick:function(){function Ne(){return T("censor_channel",{uid:Ve.uid})}return Ne}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!F,icon:"cog",content:"Manage",onClick:function(){function Ne(){return(0,V.modalOpen)(w,"manage_channel",{uid:Ve.uid})}return Ne}()})],0),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description",children:Ve.description||"N/A"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Owner",children:Ve.author||"N/A"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Public",children:Ve.public?"Yes":"No"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Total Views",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"eye",mr:"0.5rem"}),W.reduce(function(Ne,Be){return Ne+Be.view_count},0).toLocaleString()]})]})})]})},v=function(L,w){var A=(0,t.useBackend)(w),T=A.act,E=A.data,O=E.jobs,P=E.wanted,R=Object.entries(O).reduce(function(F,j){var W=j[0],z=j[1];return F+z.length},0);return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[!!P&&(0,e.createComponentVNode)(2,b,{story:P,wanted:!0}),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:"briefcase",mr:"0.5rem"}),(0,e.createTextVNode)("Job Openings")],4),buttons:(0,e.createComponentVNode)(2,o.Box,{mt:"0.25rem",color:"label",children:"Work for a better future at Nanotrasen"}),children:R>0?f.map(function(F){return Object.assign({},u[F],{id:F,jobs:O[F]})}).filter(function(F){return!!F&&F.jobs.length>0}).map(function(F){return(0,e.createComponentVNode)(2,o.Section,{className:(0,a.classes)(["Newscaster__jobCategory","Newscaster__jobCategory--"+F.id]),title:F.title,buttons:(0,e.createComponentVNode)(2,o.Box,{mt:"0.25rem",color:"label",children:F.fluff_text}),children:F.jobs.map(function(j){return(0,e.createComponentVNode)(2,o.Box,{class:(0,a.classes)(["Newscaster__jobOpening",!!j.is_command&&"Newscaster__jobOpening--command"]),children:["\u2022 ",j.title]},j.title)})},F.id)}):(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__emptyNotice",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"times",size:"3"}),(0,e.createVNode)(1,"br"),"There are no openings at this time."]})}),(0,e.createComponentVNode)(2,o.Section,{height:"17%",children:["Interested in serving Nanotrasen?",(0,e.createVNode)(1,"br"),"Sign up for any of the above position now at the"," ",(0,e.createVNode)(1,"b",null,"Head of Personnel's Office!",16),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Box,{as:"small",color:"label",children:"By signing up for a job at Nanotrasen, you agree to transfer your soul to the loyalty department of the omnipresent and helpful watcher of humanity."})]})]})},b=function(L,w){var A=(0,t.useBackend)(w),T=A.act,E=A.data,O=L.story,P=L.wanted,R=P===void 0?!1:P,F=(0,t.useLocalState)(w,"fullStories",[]),j=F[0],W=F[1],z=(0,t.useLocalState)(w,"censorMode",!1),H=z[0],$=z[1];return(0,e.createComponentVNode)(2,o.Section,{className:(0,a.classes)(["Newscaster__story",R&&"Newscaster__story--wanted"]),title:(0,e.createFragment)([R&&(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-circle",mr:"0.5rem"}),O.censor_flags&2&&"[REDACTED]"||O.title||"News from "+O.author],0),buttons:(0,e.createComponentVNode)(2,o.Box,{mt:"0.25rem",children:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:[!R&&H&&(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:(0,e.createComponentVNode)(2,o.Button,{enabled:O.censor_flags&2,icon:O.censor_flags&2?"comment-slash":"comment",content:O.censor_flags&2?"Uncensor":"Censor",mr:"0.5rem",mt:"-0.25rem",onClick:function(){function G(){return T("censor_story",{uid:O.uid})}return G}()})}),(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",O.author," |\xA0",!R&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:"eye"}),(0,e.createTextVNode)(" "),O.view_count.toLocaleString(),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("|\xA0")],0),(0,e.createComponentVNode)(2,o.Icon,{name:"clock"})," ",(0,d.timeAgo)(O.publish_time,E.world_time)]})]})}),children:(0,e.createComponentVNode)(2,o.Box,{children:O.censor_flags&2?"[REDACTED]":(0,e.createFragment)([!!O.has_photo&&(0,e.createComponentVNode)(2,g,{name:"story_photo_"+O.uid+".png",float:"right",ml:"0.5rem"}),(O.body_short||O.body).split("\n").map(function(G,ne){return(0,e.createComponentVNode)(2,o.Box,{children:G||(0,e.createVNode)(1,"br")},ne)}),O.body_short&&(0,e.createComponentVNode)(2,o.Button,{content:"Read more..",mt:"0.5rem",onClick:function(){function G(){return W([].concat(j,[O.uid]))}return G}()}),(0,e.createComponentVNode)(2,o.Box,{clear:"right"})],0)})})},g=function(L,w){var A=L.name,T=i(L,p),E=(0,t.useLocalState)(w,"viewingPhoto",""),O=E[0],P=E[1];return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({as:"img",className:"Newscaster__photo",src:A,onClick:function(){function R(){return P(A)}return R}()},T)))},h=function(L,w){var A=(0,t.useLocalState)(w,"viewingPhoto",""),T=A[0],E=A[1];return(0,e.createComponentVNode)(2,o.Modal,{className:"Newscaster__photoZoom",children:[(0,e.createComponentVNode)(2,o.Box,{as:"img",src:T}),(0,e.createComponentVNode)(2,o.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){function O(){return E("")}return O}()})]})},C=function(L,w){var A=(0,t.useBackend)(w),T=A.act,E=A.data,O=!!L.args.uid&&E.channels.filter(function(ee){return ee.uid===L.args.uid}).pop();if(L.id==="manage_channel"&&!O){(0,V.modalClose)(w);return}var P=L.id==="manage_channel",R=!!L.args.is_admin,F=L.args.scanned_user,j=(0,t.useLocalState)(w,"author",(O==null?void 0:O.author)||F||"Unknown"),W=j[0],z=j[1],H=(0,t.useLocalState)(w,"name",(O==null?void 0:O.name)||""),$=H[0],G=H[1],ne=(0,t.useLocalState)(w,"description",(O==null?void 0:O.description)||""),Q=ne[0],he=ne[1],Ve=(0,t.useLocalState)(w,"icon",(O==null?void 0:O.icon)||"newspaper"),Ne=Ve[0],Be=Ve[1],Le=(0,t.useLocalState)(w,"isPublic",P?!!(O!=null&&O.public):!1),Ae=Le[0],fe=Le[1],Z=(0,t.useLocalState)(w,"adminLocked",(O==null?void 0:O.admin)===1||!1),J=Z[0],te=Z[1];return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:P?"Manage "+O.name:"Create New Channel",children:[(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Owner",children:(0,e.createComponentVNode)(2,o.Input,{disabled:!R,width:"100%",value:W,onInput:function(){function ee(le,ye){return z(ye)}return ee}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:(0,e.createComponentVNode)(2,o.Input,{width:"100%",placeholder:"50 characters max.",maxLength:"50",value:$,onInput:function(){function ee(le,ye){return G(ye)}return ee}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description (optional)",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Input,{multiline:!0,width:"100%",placeholder:"128 characters max.",maxLength:"128",value:Q,onInput:function(){function ee(le,ye){return he(ye)}return ee}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Icon",children:[(0,e.createComponentVNode)(2,o.Input,{disabled:!R,value:Ne,width:"35%",mr:"0.5rem",onInput:function(){function ee(le,ye){return Be(ye)}return ee}()}),(0,e.createComponentVNode)(2,o.Icon,{name:Ne,size:"2",verticalAlign:"middle",mr:"0.5rem"})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Accept Public Stories?",children:(0,e.createComponentVNode)(2,o.Button,{selected:Ae,icon:Ae?"toggle-on":"toggle-off",content:Ae?"Yes":"No",onClick:function(){function ee(){return fe(!Ae)}return ee}()})}),R&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:J,icon:J?"lock":"lock-open",content:J?"On":"Off",tooltip:"Locking this channel will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function ee(){return te(!J)}return ee}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:W.trim().length===0||$.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function ee(){(0,V.modalAnswer)(w,L.id,"",{author:W,name:$.substr(0,49),description:Q.substr(0,128),icon:Ne,public:Ae?1:0,admin_locked:J?1:0})}return ee}()})]})},N=function(L,w){var A=(0,t.useBackend)(w),T=A.act,E=A.data,O=E.photo,P=E.channels,R=E.channel_idx,F=R===void 0?-1:R,j=!!L.args.is_admin,W=L.args.scanned_user,z=P.slice().sort(function(ee,le){if(F<0)return 0;var ye=P[F-1];if(ye.uid===ee.uid)return-1;if(ye.uid===le.uid)return 1}).filter(function(ee){return j||!ee.frozen&&(ee.author===W||!!ee.public)}),H=(0,t.useLocalState)(w,"author",W||"Unknown"),$=H[0],G=H[1],ne=(0,t.useLocalState)(w,"channel",z.length>0?z[0].name:""),Q=ne[0],he=ne[1],Ve=(0,t.useLocalState)(w,"title",""),Ne=Ve[0],Be=Ve[1],Le=(0,t.useLocalState)(w,"body",""),Ae=Le[0],fe=Le[1],Z=(0,t.useLocalState)(w,"adminLocked",!1),J=Z[0],te=Z[1];return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:"Create New Story",children:[(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Author",children:(0,e.createComponentVNode)(2,o.Input,{disabled:!j,width:"100%",value:$,onInput:function(){function ee(le,ye){return G(ye)}return ee}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Channel",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Dropdown,{selected:Q,options:z.map(function(ee){return ee.name}),mb:"0",width:"100%",onSelected:function(){function ee(le){return he(le)}return ee}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Divider),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Title",children:(0,e.createComponentVNode)(2,o.Input,{width:"100%",placeholder:"128 characters max.",maxLength:"128",value:Ne,onInput:function(){function ee(le,ye){return Be(ye)}return ee}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Story Text",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Input,{fluid:!0,multiline:!0,placeholder:"1024 characters max.",maxLength:"1024",rows:"8",width:"100%",value:Ae,onInput:function(){function ee(le,ye){return fe(ye)}return ee}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{icon:"image",selected:O,content:O?"Eject: "+O.name:"Insert Photo",tooltip:!O&&"Attach a photo to this story by holding the photograph in your hand.",onClick:function(){function ee(){return T(O?"eject_photo":"attach_photo")}return ee}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Preview",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Section,{noTopPadding:!0,title:Ne,maxHeight:"13.5rem",overflow:"auto",children:(0,e.createComponentVNode)(2,o.Box,{mt:"0.5rem",children:[!!O&&(0,e.createComponentVNode)(2,g,{name:"inserted_photo_"+O.uid+".png",float:"right"}),Ae.split("\n").map(function(ee,le){return(0,e.createComponentVNode)(2,o.Box,{children:ee||(0,e.createVNode)(1,"br")},le)}),(0,e.createComponentVNode)(2,o.Box,{clear:"right"})]})})}),j&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:J,icon:J?"lock":"lock-open",content:J?"On":"Off",tooltip:"Locking this story will make it censorable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function ee(){return te(!J)}return ee}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:$.trim().length===0||Q.trim().length===0||Ne.trim().length===0||Ae.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function ee(){(0,V.modalAnswer)(w,"create_story","",{author:$,channel:Q,title:Ne.substr(0,127),body:Ae.substr(0,1023),admin_locked:J?1:0})}return ee}()})]})},x=function(L,w){var A=(0,t.useBackend)(w),T=A.act,E=A.data,O=E.photo,P=E.wanted,R=!!L.args.is_admin,F=L.args.scanned_user,j=(0,t.useLocalState)(w,"author",(P==null?void 0:P.author)||F||"Unknown"),W=j[0],z=j[1],H=(0,t.useLocalState)(w,"name",(P==null?void 0:P.title.substr(8))||""),$=H[0],G=H[1],ne=(0,t.useLocalState)(w,"description",(P==null?void 0:P.body)||""),Q=ne[0],he=ne[1],Ve=(0,t.useLocalState)(w,"adminLocked",(P==null?void 0:P.admin_locked)===1||!1),Ne=Ve[0],Be=Ve[1];return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:"Manage Wanted Notice",children:[(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Authority",children:(0,e.createComponentVNode)(2,o.Input,{disabled:!R,width:"100%",value:W,onInput:function(){function Le(Ae,fe){return z(fe)}return Le}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:(0,e.createComponentVNode)(2,o.Input,{width:"100%",value:$,maxLength:"128",onInput:function(){function Le(Ae,fe){return G(fe)}return Le}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Input,{multiline:!0,width:"100%",value:Q,maxLength:"512",rows:"4",onInput:function(){function Le(Ae,fe){return he(fe)}return Le}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:[(0,e.createComponentVNode)(2,o.Button,{icon:"image",selected:O,content:O?"Eject: "+O.name:"Insert Photo",tooltip:!O&&"Attach a photo to this wanted notice by holding the photograph in your hand.",tooltipPosition:"top",onClick:function(){function Le(){return T(O?"eject_photo":"attach_photo")}return Le}()}),!!O&&(0,e.createComponentVNode)(2,g,{name:"inserted_photo_"+O.uid+".png",float:"right"})]}),R&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:Ne,icon:Ne?"lock":"lock-open",content:Ne?"On":"Off",tooltip:"Locking this wanted notice will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function Le(){return Be(!Ne)}return Le}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:!P,icon:"eraser",color:"danger",content:"Clear",position:"absolute",right:"7.25rem",bottom:"-0.75rem",onClick:function(){function Le(){T("clear_wanted_notice"),(0,V.modalClose)(w)}return Le}()}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:W.trim().length===0||$.trim().length===0||Q.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function Le(){(0,V.modalAnswer)(w,L.id,"",{author:W,name:$.substr(0,127),description:Q.substr(0,511),admin_locked:Ne?1:0})}return Le}()})]})};(0,V.modalRegisterBodyOverride)("create_channel",C),(0,V.modalRegisterBodyOverride)("manage_channel",C),(0,V.modalRegisterBodyOverride)("create_story",N),(0,V.modalRegisterBodyOverride)("wanted_notice",x)},97351:function(I,r,n){"use strict";r.__esModule=!0,r.NinjaBloodScan=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(39473),d=n(98595),y=r.NinjaBloodScan=function(){function S(p,i){var l=(0,a.useBackend)(i),f=l.act,u=l.data;return(0,e.createComponentVNode)(2,d.Window,{width:500,height:400,theme:"spider_clan",children:(0,e.createComponentVNode)(2,d.Window.Content,{className:"Layout__content--flexColumn",children:[(0,e.createComponentVNode)(2,V),(0,e.createComponentVNode)(2,k)]})})}return S}(),V=function(p,i){var l=(0,a.useBackend)(i),f=l.act,u=l.data,s=u.vialIcons,m=u.noVialIcon,c=u.bloodOwnerNames,v=u.bloodOwnerSpecies,b=u.bloodOwnerTypes,g=u.blockButtons,h=u.scanStates,C={blue:"Button_blue",green:"Button_green",red:"Button_red",disabled:"Button_disabled"},N=["NoticeBox_red","NoticeBox","NoticeBox_blue"],x=[1,2,3];return(0,e.createComponentVNode)(2,t.Flex,{direction:"column",shrink:1,alignContent:"center",children:(0,e.createComponentVNode)(2,t.Section,{title:"\u041E\u0431\u0440\u0430\u0437\u0446\u044B",backgroundColor:"rgba(0, 0, 0, 0.4)",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"?",tooltip:"\u0414\u043E\u0431\u0430\u0432\u044C\u0442\u0435 \u0442\u0440\u0438 \u043E\u0431\u0440\u0430\u0437\u0446\u0430 \u043A\u0440\u043E\u0432\u0438. \u041C\u0430\u0448\u0438\u043D\u0430 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043D\u0430 \u043D\u0430 \u0440\u0430\u0431\u043E\u0442\u0443 \u0441 \u043A\u0440\u043E\u0432\u044C\u044E \u0441\u0443\u0449\u0435\u0441\u0442\u0432 \u0438 \u0443\u0441\u043B\u043E\u0432\u0438\u044F\u043C\u0438 \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u043F\u043E\u0441\u0442\u0430\u0432\u0438\u043B \u0432\u0430\u043C \u043A\u043B\u0430\u043D. \u0420\u0435\u0430\u0433\u0435\u043D\u0442\u044B \u0438\u043C \u043D\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0435 \u043D\u0435 \u043F\u0440\u0438\u043C\u0443\u0442\u0441\u044F \u0438\u043B\u0438 \u0441\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 \u043D\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u043F\u0435\u0448\u043D\u044B\u043C",tooltipPosition:"bottom-start"}),children:[(0,e.createComponentVNode)(2,t.Flex,{direction:"row",shrink:1,alignContent:"center",children:x.map(function(B,L){return(0,e.createComponentVNode)(2,o.FlexItem,{direction:"column",width:"33.3%",ml:L?2:0,children:[(0,e.createComponentVNode)(2,t.Section,{title:c[L]?"\u041A\u0440\u043E\u0432\u044C":"\u041D\u0435\u0442 \u0440\u0435\u0430\u0433\u0435\u043D\u0442\u0430",style:{"text-align":"left",background:"rgba(53, 94, 163, 0.5)"}}),(0,e.createComponentVNode)(2,t.NoticeBox,{className:N[h[L]],success:0,danger:0,align:"center",children:(0,e.createComponentVNode)(2,t.Button,{className:g?C.disabled:C.blue,height:"100%",width:"100%",disabled:g,onClick:function(){function w(){return f("vial_out",{button_num:L+1})}return w}(),children:[(0,e.createVNode)(1,"img",null,null,1,{height:"128px",width:"128px",src:"data:image/jpeg;base64,"+(s[L]||m),style:{"margin-left":"3px","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}}),(0,e.createComponentVNode)(2,t.Tooltip,{title:c[L]||" - ",content:"\u0420\u0430\u0441\u0430: "+(v[L]||" - ")+"\n"+("\u0422\u0438\u043F \u043A\u0440\u043E\u0432\u0438: "+(b[L]||" - ")),position:"bottom"})]})})]},L)})}),(0,e.createComponentVNode)(2,t.NoticeBox,{className:"NoticeBox_red",success:0,danger:0,align:"center",children:(0,e.createComponentVNode)(2,t.Button,{className:g===0?"":"Button_disabled",content:"\u041D\u0430\u0447\u0430\u0442\u044C \u0441\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435",width:"250px",textAlign:"center",disabled:g,tooltip:"\u0421\u043A\u0430\u043D\u0438\u0440\u0443\u0435\u0442 \u043A\u0440\u043E\u0432\u044C \u0438 \u043F\u0435\u0440\u0435\u0441\u044B\u043B\u0430\u0435\u0442 \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043D\u0443\u044E \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044E \u043A\u043B\u0430\u043D\u0443.",tooltipPosition:"bottom",onClick:function(){function B(){return f("scan_blood")}return B}()})})]})})},k=function(p,i){var l=(0,a.useBackend)(i),f=l.data,u=f.progressBar;return(0,e.createComponentVNode)(2,t.Section,{stretchContents:!0,children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:"green",value:u,minValue:0,maxValue:100,children:(0,e.createVNode)(1,"center",null,(0,e.createComponentVNode)(2,t.NoticeBox,{className:"NoticeBox_green",mt:1,children:u?"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 "+(u+"%"):"\u0420\u0435\u0436\u0438\u043C \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u044F"}),2)})})}},32989:function(I,r,n){"use strict";r.__esModule=!0,r.NinjaMindScan=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.NinjaMindScan=function(){function V(k,S){var p=(0,a.useBackend)(S),i=p.act,l=p.data;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:400,theme:"spider_clan",children:(0,e.createComponentVNode)(2,o.Window.Content,{className:"Layout__content--flexColumn",children:(0,e.createComponentVNode)(2,y)})})}return V}(),y=function(k,S){var p=(0,a.useBackend)(S),i=p.act,l=p.data,f=l.occupantIcon,u=l.occupant_name,s=l.occupant_health,m=l.scanned_occupants,c=u==="none"?1:0;return(0,e.createComponentVNode)(2,t.Flex,{direction:"column",shrink:1,alignContent:"left",children:[(0,e.createComponentVNode)(2,t.Section,{title:"\u041F\u0430\u0446\u0438\u0435\u043D\u0442",backgroundColor:"rgba(0, 0, 0, 0.4)",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"?",tooltip:"\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0432\u043D\u0435\u0448\u043D\u0435\u0433\u043E \u0432\u0438\u0434\u0430 \u0438 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u044F \u043F\u0430\u0446\u0438\u0435\u043D\u0442\u0430 \u0432 \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0435.",tooltipPosition:"left"}),children:(0,e.createComponentVNode)(2,t.Flex,{direction:"row",shrink:1,alignContent:"left",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{shrink:1,alignContent:"left",children:(0,e.createComponentVNode)(2,t.NoticeBox,{className:"NoticeBox_blue",success:0,danger:0,width:"90px",align:"left",children:(0,e.createComponentVNode)(2,t.Section,{style:{background:"rgba(4, 74, 27, 0.75)"},align:"left",children:(0,e.createVNode)(1,"img",null,null,1,{height:"128px",width:"128px",src:"data:image/jpeg;base64,"+f,style:{"margin-left":"-28px","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}})})})}),(0,e.createComponentVNode)(2,t.Flex.Item,{grow:1,alignContent:"right",children:[(0,e.createComponentVNode)(2,t.NoticeBox,{className:"NoticeBox_green",success:0,danger:0,align:"left",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0418\u043C\u044F",children:u}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0417\u0434\u043E\u0440\u043E\u0432\u044C\u0435",children:s})]})}),(0,e.createComponentVNode)(2,t.NoticeBox,{className:"NoticeBox_red",mt:2.5,success:0,danger:0,align:"center",children:[(0,e.createComponentVNode)(2,t.Button,{className:c===0?"":"Button_disabled",content:"\u041D\u0430\u0447\u0430\u0442\u044C \u0441\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435",width:"250px",textAlign:"center",disabled:c,tooltip:"\u0421\u043A\u0430\u043D\u0438\u0440\u0443\u0435\u0442 \u043F\u0430\u0446\u0438\u0435\u043D\u0442\u0430 \u0438 \u043F\u044B\u0442\u0430\u0435\u0442\u0441\u044F \u0434\u043E\u0431\u044B\u0442\u044C \u0438\u0437 \u0435\u0433\u043E \u0440\u0430\u0437\u0443\u043C\u0430 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u0443\u044E \u043A\u043B\u0430\u043D\u0443 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044E.",tooltipPosition:"bottom-start",onClick:function(){function v(){return i("scan_occupant")}return v}()}),(0,e.createComponentVNode)(2,t.Button,{className:c===0?"":"Button_disabled",content:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u043E",width:"250px",textAlign:"center",disabled:c,tooltip:"\u041E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u0442 \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u043E, \u0432\u044B\u043F\u0443\u0441\u043A\u0430\u044F \u043F\u0430\u0446\u0438\u0435\u043D\u0442\u0430 \u0438\u0437 \u043A\u0430\u043F\u0441\u0443\u043B\u044B",tooltipPosition:"bottom-start",onClick:function(){function v(){return i("go_out")}return v}()}),(0,e.createComponentVNode)(2,t.Button,{className:c===0?"":"Button_disabled",content:"\u0422\u0435\u043B\u0435\u043F\u043E\u0440\u0442\u0430\u0446\u0438\u044F \u043F\u0430\u0446\u0438\u0435\u043D\u0442\u0430",width:"250px",textAlign:"center",disabled:c,tooltip:"\u0422\u0435\u043B\u0435\u043F\u043E\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u043F\u0430\u0446\u0438\u0435\u043D\u0442\u0430 \u043E\u0431\u0440\u0430\u0442\u043D\u043E \u043D\u0430 \u043E\u0431\u044C\u0435\u043A\u0442 \u0441 \u043A\u043E\u0442\u043E\u0440\u043E\u0433\u043E \u043E\u043D \u0431\u044B\u043B \u043F\u043E\u0445\u0438\u0449\u0435\u043D. \u0420\u0435\u043A\u043E\u043C\u0435\u043D\u0434\u0443\u0435\u043C \u043A\u0430\u043A \u0441\u043B\u0435\u0434\u0443\u0435\u0442 \u0435\u0433\u043E \u0437\u0430\u043F\u0443\u0433\u0430\u0442\u044C \u043F\u0435\u0440\u0435\u0434 \u044D\u0442\u0438\u043C, \u0447\u0442\u043E\u0431\u044B \u043E\u043D \u043D\u0435 \u0440\u0430\u0437\u0431\u043E\u043B\u0442\u0430\u043B \u043E \u0432\u0430\u0441.",tooltipPosition:"bottom-start",onClick:function(){function v(){return i("teleport_out")}return v}()})]})]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"\u0421\u043F\u0438\u0441\u043E\u043A \u0443\u0436\u0435 \u043F\u0440\u043E\u0441\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0432\u0430\u043C\u0438 \u043B\u044E\u0434\u0435\u0439",align:"center",backgroundColor:"rgba(0, 0, 0, 0.4)",children:(0,e.createComponentVNode)(2,t.Box,{maxHeight:15,overflowY:"auto",overflowX:"hidden",children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:m.map(function(v){return(0,e.createComponentVNode)(2,t.Table.Row,{children:(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Box,{children:v.scanned_occupant})})},v.scanned_occupant)})})})})]})}},41166:function(I,r,n){"use strict";r.__esModule=!0,r.NuclearBomb=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.NuclearBomb=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data;return i.extended?(0,e.createComponentVNode)(2,o.Window,{width:450,height:300,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Authorization",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auth Disk",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.authdisk?"eject":"id-card",selected:i.authdisk,content:i.diskname?i.diskname:"-----",tooltip:i.authdisk?"Eject Disk":"Insert Disk",onClick:function(){function l(){return p("auth")}return l}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auth Code",children:(0,e.createComponentVNode)(2,t.Button,{icon:"key",disabled:!i.authdisk,selected:i.authcode,content:i.codemsg,onClick:function(){function l(){return p("code")}return l}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Arming & Disarming",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Bolted to floor",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.anchored?"check":"times",selected:i.anchored,disabled:!i.authfull,content:i.anchored?"YES":"NO",onClick:function(){function l(){return p("toggle_anchor")}return l}()})}),i.authfull&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Time Left",children:(0,e.createComponentVNode)(2,t.Button,{icon:"stopwatch",content:i.time,disabled:!i.authfull,tooltip:"Set Timer",onClick:function(){function l(){return p("set_time")}return l}()})})||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Time Left",color:i.timer?"red":"",children:i.time+"s"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safety",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.safety?"check":"times",selected:i.safety,disabled:!i.authfull,content:i.safety?"ON":"OFF",tooltip:i.safety?"Disable Safety":"Enable Safety",onClick:function(){function l(){return p("toggle_safety")}return l}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Arm/Disarm",children:(0,e.createComponentVNode)(2,t.Button,{icon:(i.timer,"bomb"),disabled:i.safety||!i.authfull,color:"red",content:i.timer?"DISARM THE NUKE":"ARM THE NUKE",onClick:function(){function l(){return p("toggle_armed")}return l}()})})]})})]})}):(0,e.createComponentVNode)(2,o.Window,{width:450,height:300,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Deployment",children:(0,e.createComponentVNode)(2,t.Button,{icon:"exclamation-triangle",content:"Deploy Nuclear Device (will bolt device to floor)",onClick:function(){function l(){return p("deploy")}return l}()})})})})}return y}()},52416:function(I,r,n){"use strict";r.__esModule=!0,r.NumberInputModal=void 0;var e=n(89005),a=n(51057),t=n(19203),o=n(92986),d=n(72253),y=n(36036),V=n(98595),k=r.NumberInputModal=function(){function p(i,l){var f=(0,d.useBackend)(l),u=f.act,s=f.data,m=s.init_value,c=s.large_buttons,v=s.message,b=v===void 0?"":v,g=s.timeout,h=s.title,C=(0,d.useLocalState)(l,"input",m),N=C[0],x=C[1],B=function(){function A(T){T!==N&&x(T)}return A}(),L=function(){function A(T){T!==N&&x(T)}return A}(),w=140+Math.max(Math.ceil(b.length/3),b.length>0&&c?5:0);return(0,e.createComponentVNode)(2,V.Window,{title:h,width:270,height:w,children:[g&&(0,e.createComponentVNode)(2,a.Loader,{value:g}),(0,e.createComponentVNode)(2,V.Window.Content,{onKeyDown:function(){function A(T){var E=window.event?T.which:T.keyCode;E===o.KEY_ENTER&&u("submit",{entry:N}),E===o.KEY_ESCAPE&&u("cancel")}return A}(),children:(0,e.createComponentVNode)(2,y.Section,{fill:!0,children:(0,e.createComponentVNode)(2,y.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,y.Box,{color:"label",children:b})}),(0,e.createComponentVNode)(2,y.Stack.Item,{children:(0,e.createComponentVNode)(2,S,{input:N,onClick:L,onChange:B})}),(0,e.createComponentVNode)(2,y.Stack.Item,{children:(0,e.createComponentVNode)(2,t.InputButtons,{input:N})})]})})})]})}return p}(),S=function(i,l){var f=(0,d.useBackend)(l),u=f.act,s=f.data,m=s.min_value,c=s.max_value,v=s.init_value,b=s.round_value,g=i.input,h=i.onClick,C=i.onChange,N=Math.round(g!==m?Math.max(g/2,m):c/2),x=g===m&&m>0||g===1;return(0,e.createComponentVNode)(2,y.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,y.Stack.Item,{children:(0,e.createComponentVNode)(2,y.Button,{disabled:g===m,icon:"angle-double-left",onClick:function(){function B(){return h(m)}return B}(),tooltip:g===m?"Min":"Min ("+m+")"})}),(0,e.createComponentVNode)(2,y.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,y.RestrictedInput,{autoFocus:!0,autoSelect:!0,fluid:!0,allowFloats:!b,minValue:m,maxValue:c,onChange:function(){function B(L,w){return C(w)}return B}(),onEnter:function(){function B(L,w){return u("submit",{entry:w})}return B}(),value:g})}),(0,e.createComponentVNode)(2,y.Stack.Item,{children:(0,e.createComponentVNode)(2,y.Button,{disabled:g===c,icon:"angle-double-right",onClick:function(){function B(){return h(c)}return B}(),tooltip:g===c?"Max":"Max ("+c+")"})}),(0,e.createComponentVNode)(2,y.Stack.Item,{children:(0,e.createComponentVNode)(2,y.Button,{disabled:x,icon:"divide",onClick:function(){function B(){return h(N)}return B}(),tooltip:x?"Split":"Split ("+N+")"})}),(0,e.createComponentVNode)(2,y.Stack.Item,{children:(0,e.createComponentVNode)(2,y.Button,{disabled:g===v,icon:"redo",onClick:function(){function B(){return h(v)}return B}(),tooltip:v?"Reset ("+v+")":"Reset"})})]})}},1218:function(I,r,n){"use strict";r.__esModule=!0,r.OperatingComputer=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(98595),d=n(36036),y=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],V=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],k={average:[.25,.5],bad:[.5,1/0]},S=["bad","average","average","good","average","average","bad"],p=r.OperatingComputer=function(){function u(s,m){var c=(0,t.useBackend)(m),v=c.act,b=c.data,g=b.hasOccupant,h=b.choice,C;return h?C=(0,e.createComponentVNode)(2,f):C=g?(0,e.createComponentVNode)(2,i):(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,o.Window,{width:650,height:455,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,d.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,d.Stack.Item,{children:(0,e.createComponentVNode)(2,d.Tabs,{children:[(0,e.createComponentVNode)(2,d.Tabs.Tab,{selected:!h,icon:"user",onClick:function(){function N(){return v("choiceOff")}return N}(),children:"Patient"}),(0,e.createComponentVNode)(2,d.Tabs.Tab,{selected:!!h,icon:"cog",onClick:function(){function N(){return v("choiceOn")}return N}(),children:"Options"})]})}),(0,e.createComponentVNode)(2,d.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,d.Section,{fill:!0,scrollable:!0,children:C})})]})})})}return u}(),i=function(s,m){var c=(0,t.useBackend)(m),v=c.data,b=v.occupant;return(0,e.createComponentVNode)(2,d.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,d.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,d.Section,{fill:!0,title:"Patient",children:(0,e.createComponentVNode)(2,d.LabeledList,{children:[(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Name",children:b.name}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Status",color:y[b.stat][0],children:y[b.stat][1]}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,d.ProgressBar,{min:"0",max:b.maxHealth,value:b.health/b.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),V.map(function(g,h){return(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:g[0]+" Damage",children:(0,e.createComponentVNode)(2,d.ProgressBar,{min:"0",max:"100",value:b[g[1]]/100,ranges:k,children:(0,a.round)(b[g[1]])},h)},h)}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,d.ProgressBar,{min:"0",max:b.maxTemp,value:b.bodyTemperature/b.maxTemp,color:S[b.temperatureSuitability+3],children:[(0,a.round)(b.btCelsius),"\xB0C, ",(0,a.round)(b.btFaren),"\xB0F"]})}),!!b.hasBlood&&(0,e.createFragment)([(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Blood Level",children:(0,e.createComponentVNode)(2,d.ProgressBar,{min:"0",max:b.bloodMax,value:b.bloodLevel/b.bloodMax,ranges:{bad:[-1/0,.6],average:[.6,.9],good:[.6,1/0]},children:[b.bloodPercent,"%, ",b.bloodLevel,"cl"]})}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Pulse",children:[b.pulse," BPM"]})],4)]})})}),(0,e.createComponentVNode)(2,d.Stack.Item,{children:(0,e.createComponentVNode)(2,d.Section,{title:"Current Procedures",level:"2",children:b.inSurgery?b.surgeries.map(function(g){var h=g.bodypartName,C=g.surgeryName,N=g.stepName;return(0,e.createComponentVNode)(2,d.Section,{title:h,level:"4",children:(0,e.createComponentVNode)(2,d.LabeledList,{children:[(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Procedure",children:C}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Next Step",children:N})]})},h)}):(0,e.createComponentVNode)(2,d.Box,{color:"label",children:"No procedure ongoing."})})})]})},l=function(){return(0,e.createComponentVNode)(2,d.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,d.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,d.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No patient detected."]})})},f=function(s,m){var c=(0,t.useBackend)(m),v=c.act,b=c.data,g=b.verbose,h=b.health,C=b.healthAlarm,N=b.oxy,x=b.oxyAlarm,B=b.crit;return(0,e.createComponentVNode)(2,d.LabeledList,{children:[(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Loudspeaker",children:(0,e.createComponentVNode)(2,d.Button,{selected:g,icon:g?"toggle-on":"toggle-off",content:g?"On":"Off",onClick:function(){function L(){return v(g?"verboseOff":"verboseOn")}return L}()})}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Health Announcer",children:(0,e.createComponentVNode)(2,d.Button,{selected:h,icon:h?"toggle-on":"toggle-off",content:h?"On":"Off",onClick:function(){function L(){return v(h?"healthOff":"healthOn")}return L}()})}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Health Announcer Threshold",children:(0,e.createComponentVNode)(2,d.Knob,{bipolar:!0,minValue:-100,maxValue:100,value:C,stepPixelSize:5,ml:"0",onChange:function(){function L(w,A){return v("health_adj",{new:A})}return L}()})}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Oxygen Alarm",children:(0,e.createComponentVNode)(2,d.Button,{selected:N,icon:N?"toggle-on":"toggle-off",content:N?"On":"Off",onClick:function(){function L(){return v(N?"oxyOff":"oxyOn")}return L}()})}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Oxygen Alarm Threshold",children:(0,e.createComponentVNode)(2,d.Knob,{bipolar:!0,minValue:-100,maxValue:100,value:x,stepPixelSize:5,ml:"0",onChange:function(){function L(w,A){return v("oxy_adj",{new:A})}return L}()})}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Critical Alert",children:(0,e.createComponentVNode)(2,d.Button,{selected:B,icon:B?"toggle-on":"toggle-off",content:B?"On":"Off",onClick:function(){function L(){return v(B?"critOff":"critOn")}return L}()})})]})}},46892:function(I,r,n){"use strict";r.__esModule=!0,r.Orbit=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),d=n(98595);function y(m,c){var v=typeof Symbol!="undefined"&&m[Symbol.iterator]||m["@@iterator"];if(v)return(v=v.call(m)).next.bind(v);if(Array.isArray(m)||(v=V(m))||c&&m&&typeof m.length=="number"){v&&(m=v);var b=0;return function(){return b>=m.length?{done:!0}:{done:!1,value:m[b++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function V(m,c){if(m){if(typeof m=="string")return k(m,c);var v={}.toString.call(m).slice(8,-1);return v==="Object"&&m.constructor&&(v=m.constructor.name),v==="Map"||v==="Set"?Array.from(m):v==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(v)?k(m,c):void 0}}function k(m,c){(c==null||c>m.length)&&(c=m.length);for(var v=0,b=Array(c);vv},l=function(c,v){var b=c.name,g=v.name;if(!b||!g)return 0;var h=b.match(S),C=g.match(S);if(h&&C&&b.replace(S,"")===g.replace(S,"")){var N=parseInt(h[1],10),x=parseInt(C[1],10);return N-x}return i(b,g)},f=function(c,v){var b=(0,t.useBackend)(v),g=b.act,h=c.searchText,C=c.source,N=c.title,x=C.filter(p(h));return x.sort(l),C.length>0&&(0,e.createComponentVNode)(2,o.Section,{title:N+" - ("+C.length+")",children:x.map(function(B){return(0,e.createComponentVNode)(2,o.Button,{content:B.name,onClick:function(){function L(){return g("orbit",{ref:B.ref})}return L}()},B.name)})})},u=function(c,v){var b=(0,t.useBackend)(v),g=b.act,h=c.color,C=c.thing;return(0,e.createComponentVNode)(2,o.Button,{color:h,onClick:function(){function N(){return g("orbit",{ref:C.ref})}return N}(),children:C.name})},s=r.Orbit=function(){function m(c,v){for(var b=(0,t.useBackend)(v),g=b.act,h=b.data,C=h.alive,N=h.antagonists,x=h.highlights,B=h.auto_observe,L=h.dead,w=h.ghosts,A=h.misc,T=h.npcs,E=(0,t.useLocalState)(v,"searchText",""),O=E[0],P=E[1],R={},F=y(N),j;!(j=F()).done;){var W=j.value;R[W.antag]===void 0&&(R[W.antag]=[]),R[W.antag].push(W)}var z=Object.entries(R);z.sort(function($,G){return i($[0],G[0])});var H=function(){function $(G){for(var ne=0,Q=[z.map(function(Ne){var Be=Ne[0],Le=Ne[1];return Le}),x,C,w,L,T,A];ne0&&(0,e.createComponentVNode)(2,o.Section,{title:"Antagonists",children:z.map(function($){var G=$[0],ne=$[1];return(0,e.createComponentVNode)(2,o.Section,{title:G,level:2,children:ne.filter(p(O)).sort(l).map(function(Q){return(0,e.createComponentVNode)(2,u,{color:"bad",thing:Q},Q.name)})},G)})}),x.length>0&&(0,e.createComponentVNode)(2,f,{title:"Highlights",source:x,searchText:O,color:"teal"}),(0,e.createComponentVNode)(2,o.Section,{title:"Alive - ("+C.length+")",children:C.filter(p(O)).sort(l).map(function($){return(0,e.createComponentVNode)(2,u,{color:"good",thing:$},$.name)})}),(0,e.createComponentVNode)(2,o.Section,{title:"Ghosts - ("+w.length+")",children:w.filter(p(O)).sort(l).map(function($){return(0,e.createComponentVNode)(2,u,{color:"grey",thing:$},$.name)})}),(0,e.createComponentVNode)(2,f,{title:"Dead",source:L,searchText:O}),(0,e.createComponentVNode)(2,f,{title:"NPCs",source:T,searchText:O}),(0,e.createComponentVNode)(2,f,{title:"Misc",source:A,searchText:O})]})})}return m}()},15421:function(I,r,n){"use strict";r.__esModule=!0,r.OreRedemption=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),d=n(98595),y=n(9394);function V(c){if(c==null)throw new TypeError("Cannot destructure "+c)}var k=(0,y.createLogger)("OreRedemption"),S=function(v){return v.toLocaleString("en-US")+" pts"},p=r.OreRedemption=function(){function c(v,b){return(0,e.createComponentVNode)(2,d.Window,{width:490,height:750,children:(0,e.createComponentVNode)(2,d.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,i,{height:"100%"})}),(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,f)]})})})}return c}(),i=function(v,b){var g=(0,t.useBackend)(b),h=g.act,C=g.data,N=C.id,x=C.points,B=C.disk,L=Object.assign({},(V(v),v));return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({},L,{children:[(0,e.createComponentVNode)(2,o.Box,{color:"average",textAlign:"center",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"This machine only accepts ore. Gibtonite is not accepted."]}),(0,e.createComponentVNode)(2,o.Divider),(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"ID card",children:N?(0,e.createComponentVNode)(2,o.Button,{selected:!0,bold:!0,verticalAlign:"middle",icon:"eject",content:N.name,tooltip:"Ejects the ID card.",onClick:function(){function w(){return h("eject_id")}return w}(),style:{"white-space":"pre-wrap"}}):(0,e.createComponentVNode)(2,o.Button,{icon:"sign-in-alt",content:"Insert",tooltip:"Hold the ID card in your hand to insert.",onClick:function(){function w(){return h("insert_id")}return w}()})}),N&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Current Mining Points",children:(0,e.createComponentVNode)(2,o.Box,{bold:!0,children:S(N.points)})}),N&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Total Mining Points",children:(0,e.createComponentVNode)(2,o.Box,{bold:!0,children:S(N.total_points)})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Unclaimed Points",color:x>0?"good":"grey",bold:x>0&&"good",children:S(x)}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{children:(0,e.createComponentVNode)(2,o.Button,{disabled:!N,icon:"hand-holding-usd",content:"Claim",onClick:function(){function w(){return h("claim")}return w}()})})]}),(0,e.createComponentVNode)(2,o.Divider),B?(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Design disk",children:(0,e.createComponentVNode)(2,o.Button,{selected:!0,bold:!0,icon:"eject",content:B.name,tooltip:"Ejects the design disk.",onClick:function(){function w(){return h("eject_disk")}return w}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Stored design",children:(0,e.createComponentVNode)(2,o.Box,{color:B.design&&(B.compatible?"good":"bad"),children:B.design||"N/A"})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{children:(0,e.createComponentVNode)(2,o.Button,{disabled:!B.design||!B.compatible,icon:"upload",content:"Download",tooltip:"Downloads the design on the disk into the machine.",onClick:function(){function w(){return h("download")}return w}()})})]}):(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No design disk inserted."})]})))},l=function(v,b){var g=(0,t.useBackend)(b),h=g.act,C=g.data,N=C.sheets,x=Object.assign({},(V(v),v));return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,height:"20%",children:(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({fill:!0,scrollable:!0,className:"OreRedemption__Ores",p:"0"},x,{children:[(0,e.createComponentVNode)(2,u,{title:"Sheets",columns:[["Available","25%"],["Ore Value","15%"],["Smelt","20%"]]}),N.map(function(B){return(0,e.createComponentVNode)(2,s,{ore:B},B.id)})]})))})},f=function(v,b){var g=(0,t.useBackend)(b),h=g.act,C=g.data,N=C.alloys,x=Object.assign({},(V(v),v));return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({fill:!0,scrollable:!0,className:"OreRedemption__Ores",p:"0"},x,{children:[(0,e.createComponentVNode)(2,u,{title:"Alloys",columns:[["Recipe","50%"],["Available","11%"],["Smelt","20%"]]}),N.map(function(B){return(0,e.createComponentVNode)(2,m,{ore:B},B.id)})]})))})},u=function(v,b){var g;return(0,e.createComponentVNode)(2,o.Box,{className:"OreHeader",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:v.title}),(g=v.columns)==null?void 0:g.map(function(h){return(0,e.createComponentVNode)(2,o.Stack.Item,{basis:h[1],textAlign:"center",color:"label",bold:!0,children:h[0]},h)})]})})},s=function(v,b){var g=(0,t.useBackend)(b),h=g.act,C=v.ore;if(!(C.value&&C.amount<=0&&!(["metal","glass"].indexOf(C.id)>-1)))return(0,e.createComponentVNode)(2,o.Box,{className:"SheetLine",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"45%",align:"middle",children:(0,e.createComponentVNode)(2,o.Stack,{align:"center",children:[(0,e.createComponentVNode)(2,o.Stack.Item,{className:(0,a.classes)(["materials32x32",C.id])}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:C.name})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",color:C.amount>=1?"good":"gray",bold:C.amount>=1,align:"center",children:C.amount.toLocaleString("en-US")}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",align:"center",children:C.value}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,e.createComponentVNode)(2,o.NumberInput,{width:"40%",value:0,minValue:0,maxValue:Math.min(C.amount,50),stepPixelSize:6,onChange:function(){function N(x,B){return h(C.value?"sheet":"alloy",{id:C.id,amount:B})}return N}()})})]})})},m=function(v,b){var g=(0,t.useBackend)(b),h=g.act,C=v.ore;return(0,e.createComponentVNode)(2,o.Box,{className:"SheetLine",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"7%",align:"middle",children:(0,e.createComponentVNode)(2,o.Box,{className:(0,a.classes)(["alloys32x32",C.id])})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"30%",textAlign:"middle",align:"center",children:C.name}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"35%",textAlign:"middle",color:C.amount>=1?"good":"gray",align:"center",children:C.description}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"10%",textAlign:"center",color:C.amount>=1?"good":"gray",bold:C.amount>=1,align:"center",children:C.amount.toLocaleString("en-US")}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,e.createComponentVNode)(2,o.NumberInput,{width:"40%",value:0,minValue:0,maxValue:Math.min(C.amount,50),stepPixelSize:6,onChange:function(){function N(x,B){return h(C.value?"sheet":"alloy",{id:C.id,amount:B})}return N}()})})]})})}},30373:function(I,r,n){"use strict";r.__esModule=!0,r.PAI=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=n(71253),y=n(70752),V=function(p){var i;try{i=y("./"+p+".js")}catch(f){if(f.code==="MODULE_NOT_FOUND")return(0,d.routingError)("notFound",p);throw f}var l=i[p];return l||(0,d.routingError)("missingExport",p)},k=r.PAI=function(){function S(p,i){var l=(0,a.useBackend)(i),f=l.act,u=l.data,s=u.app_template,m=u.app_icon,c=u.app_title,v=V(s);return(0,e.createComponentVNode)(2,o.Window,{width:600,height:650,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:m,mr:1}),c,s!=="pai_main_menu"&&(0,e.createComponentVNode)(2,t.Button,{ml:2,content:"Home",icon:"arrow-up",onClick:function(){function b(){return f("MASTER_back")}return b}()})]}),p:1,children:(0,e.createComponentVNode)(2,v)})})})}return S}()},85175:function(I,r,n){"use strict";r.__esModule=!0,r.PDA=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=n(71253),y=n(59395),V=function(l){var f;try{f=y("./"+l+".js")}catch(s){if(s.code==="MODULE_NOT_FOUND")return(0,d.routingError)("notFound",l);throw s}var u=f[l];return u||(0,d.routingError)("missingExport",l)},k=r.PDA=function(){function i(l,f){var u=(0,a.useBackend)(f),s=u.act,m=u.data,c=m.app,v=m.owner;if(!v)return(0,e.createComponentVNode)(2,o.Window,{width:350,height:105,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Error",children:"No user data found. Please swipe an ID card."})})});var b=V(c.template);return(0,e.createComponentVNode)(2,o.Window,{width:600,height:650,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,S)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,p:1,pb:0,title:(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:c.icon,mr:1}),c.name]}),children:(0,e.createComponentVNode)(2,b)})}),(0,e.createComponentVNode)(2,t.Stack.Item,{mt:7.5,children:(0,e.createComponentVNode)(2,p)})]})})})}return i}(),S=function(l,f){var u=(0,a.useBackend)(f),s=u.act,m=u.data,c=m.idInserted,v=m.idLink,b=m.stationTime,g=m.cartridge_name;return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{ml:.5,children:(0,e.createComponentVNode)(2,t.Button,{icon:"id-card",color:"transparent",onClick:function(){function h(){return s("Authenticate")}return h}(),content:c?v:"No ID Inserted"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"sd-card",color:"transparent",onClick:function(){function h(){return s("Eject")}return h}(),content:g?["Eject "+g]:"No Cartridge Inserted"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"right",bold:!0,mr:1,mt:.5,children:b})]})},p=function(l,f){var u=(0,a.useBackend)(f),s=u.act,m=u.data,c=m.app;return(0,e.createComponentVNode)(2,t.Box,{height:"45px",className:"PDA__footer",backgroundColor:"#1b1b1b",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[!!c.has_back&&(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"33%",mr:-.5,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:c.has_back?"white":"disabled",icon:"arrow-alt-circle-left-o",onClick:function(){function v(){return s("Back")}return v}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{basis:c.has_back?"33%":"100%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:c.is_home?"disabled":"white",icon:"home",onClick:function(){function v(){s("Home")}return v}()})})]})})}},38280:function(I,r,n){"use strict";r.__esModule=!0,r.PDAPainter=r.PDAColorRow=void 0;var e=n(89005),a=n(72253),t=n(98595),o=n(36036),d=r.PDAPainter=function(){function V(k,S){var p=(0,a.useBackend)(S),i=p.act,l=p.data,f=l.statusLabel,u=l.pdaTypes,s=l.hasPDA,m=l.pdaIcon,c=l.pdaOwnerName,v=l.pdaJobName;return(0,e.createComponentVNode)(2,t.Window,{width:545,height:350,children:(0,e.createComponentVNode)(2,t.Window.Content,{children:(0,e.createComponentVNode)(2,o.Flex,{spacing:1,direction:"row",height:"100%",flex:"1",children:[(0,e.createComponentVNode)(2,o.Flex.Item,{width:24,shrink:0,children:[(0,e.createComponentVNode)(2,o.Section,{title:"\u041E\u0431\u0449\u0435\u0435",buttons:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,icon:s?"eject":"exclamation-triangle",selected:s,content:s?"\u0418\u0437\u0432\u043B\u0435\u0447\u044C":"-----",tooltip:s?"\u0418\u0437\u0432\u043B\u0435\u0447\u044C PDA":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C PDA",tooltipPosition:"left",onClick:function(){function b(){return i(s?"eject_pda":"insert_pda")}return b}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0418\u043C\u044F",children:c||"\u041D/\u0414"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C",children:v||"\u041D/\u0414"})]})}),(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.Flex,{height:"100%",direction:"column",flex:"1",children:(0,e.createComponentVNode)(2,o.Flex.Item,{children:[(0,e.createComponentVNode)(2,o.Box,{textAlign:"center",children:(0,e.createComponentVNode)(2,o.Box,{as:"img",height:"160px",src:s?"data:image/png;base64,"+m:"",style:{"-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"},align:"middle"})}),(0,e.createComponentVNode)(2,o.LabeledList,{m:"5px",children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0421\u0442\u0430\u0442\u0443\u0441",children:f})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{m:"5px",fluid:!0,disabled:!s,content:"\u0421\u0442\u0435\u0440\u0435\u0442\u044C PDA",confirmContent:"\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C?",textAlign:"left",color:"red",tooltip:"C\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0442\u0435\u043B\u0435\u0444\u043E\u043D \u043D\u0430 \u0437\u0430\u0432\u043E\u0434\u0441\u043A\u0438\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438",tooltipPosition:"top",onClick:function(){function b(){return i("erase_pda")}return b}()})]})})})]}),(0,e.createComponentVNode)(2,o.Flex.Item,{width:27,children:(0,e.createComponentVNode)(2,o.Flex,{direction:"column",height:"100%",flex:"1",children:(0,e.createComponentVNode)(2,o.Section,{title:"\u0426\u0432\u0435\u0442 PDA",flexGrow:"1",scrollable:!0,fill:!0,children:(0,e.createComponentVNode)(2,o.Table,{children:Object.keys(u).map(function(b){return(0,e.createComponentVNode)(2,y,{selectedPda:b,selectedPdaImage:u[b][0]},b)})})})})})]})})})}return V}(),y=r.PDAColorRow=function(){function V(k,S){var p=(0,a.useBackend)(S),i=p.act,l=p.data,f=l.hasPDA,u=k.selectedPda,s=k.selectedPdaImage;return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/png;base64,"+s,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,e.createComponentVNode)(2,o.Table.Cell,{bold:!0,children:(0,e.createComponentVNode)(2,o.Button.Confirm,{fluid:!0,disabled:!f,icon:s,content:u,confirmContent:"\u041F\u043E\u043A\u0440\u0430\u0441\u0438\u0442\u044C?",textAlign:"left",onClick:function(){function m(){return i("choose_pda",{selectedPda:u,selectedPdaImage:s})}return m}()})})]})}return V}()},68654:function(I,r,n){"use strict";r.__esModule=!0,r.Pacman=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=n(49968),y=r.Pacman=function(){function V(k,S){var p=(0,a.useBackend)(S),i=p.act,l=p.data,f=l.broken,u=l.anchored,s=l.active,m=l.fuel_type,c=l.fuel_usage,v=l.fuel_stored,b=l.fuel_cap,g=l.is_ai,h=l.tmp_current,C=l.tmp_max,N=l.tmp_overheat,x=l.output_max,B=l.power_gen,L=l.output_set,w=l.has_fuel,A=v/b,T=h/C,E=L*B,O=Math.round(v/c),P=Math.round(O/60),R=O>120?P+" minutes":O+" seconds";return(0,e.createComponentVNode)(2,o.Window,{width:500,height:260,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(f||!u)&&(0,e.createComponentVNode)(2,t.Section,{title:"Status",children:[!!f&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"The generator is malfunctioning!"}),!f&&!u&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"The generator needs to be anchored to the floor with a wrench."})]}),!f&&!!u&&(0,e.createVNode)(1,"div",null,[(0,e.createComponentVNode)(2,t.Section,{title:"Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:s?"power-off":"times",content:s?"On":"Off",tooltip:"Toggles the generator on/off. Requires fuel.",tooltipPosition:"left",disabled:!w,selected:s,onClick:function(){function F(){return i("toggle_power")}return F}()}),children:(0,e.createComponentVNode)(2,t.Flex,{direction:"row",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{width:"50%",className:"ml-1",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power setting",children:[(0,e.createComponentVNode)(2,t.NumberInput,{value:L,minValue:1,maxValue:x,step:1,className:"mt-1",onDrag:function(){function F(j,W){return i("change_power",{change_power:W})}return F}()}),"(",(0,d.formatPower)(E),")"]})})}),(0,e.createComponentVNode)(2,t.Flex.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:T,ranges:{green:[-1/0,.33],orange:[.33,.66],red:[.66,1/0]},children:[h," \u2103"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:[N>50&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"CRITICAL OVERHEAT!"}),N>20&&N<=50&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"WARNING: Overheating!"}),N>1&&N<=20&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"Temperature High"}),N===0&&(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Optimal"})]})]})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Fuel",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject Fuel",tooltip:"Ejects fuel. Generator needs to be offline.",tooltipPosition:"left",disabled:s||g||!w,onClick:function(){function F(){return i("eject_fuel")}return F}()}),children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Type",children:m}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fuel level",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:A,ranges:{red:[-1/0,.33],orange:[.33,.66],green:[.66,1/0]},children:[Math.round(v/1e3)," dm\xB3"]})})]})}),(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fuel usage",children:[c/1e3," dm\xB3/s"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fuel depletion",children:[!!w&&(c?R:"N/A"),!w&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Out of fuel"})]})]})})]})})],4)]})})}return V}()},33388:function(I,r,n){"use strict";r.__esModule=!0,r.PersonalCrafting=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.PersonalCrafting=function(){function k(S,p){var i=(0,a.useBackend)(p),l=i.act,f=i.data,u=f.busy,s=f.category,m=f.display_craftable_only,c=f.display_compact,v=f.prev_cat,b=f.next_cat,g=f.subcategory,h=f.prev_subcat,C=f.next_subcat;return(0,e.createComponentVNode)(2,o.Window,{width:700,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[!!u&&(0,e.createComponentVNode)(2,t.Dimmer,{fontSize:"32px",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"cog",spin:1})," Crafting..."]}),(0,e.createComponentVNode)(2,t.Section,{title:s,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Show Craftable Only",icon:m?"check-square-o":"square-o",selected:m,onClick:function(){function N(){return l("toggle_recipes")}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Compact Mode",icon:c?"check-square-o":"square-o",selected:c,onClick:function(){function N(){return l("toggle_compact")}return N}()})],4),children:[(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:v,icon:"arrow-left",onClick:function(){function N(){return l("backwardCat")}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:b,icon:"arrow-right",onClick:function(){function N(){return l("forwardCat")}return N}()})]}),g&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:h,icon:"arrow-left",onClick:function(){function N(){return l("backwardSubCat")}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:C,icon:"arrow-right",onClick:function(){function N(){return l("forwardSubCat")}return N}()})]}),c?(0,e.createComponentVNode)(2,y):(0,e.createComponentVNode)(2,V)]})]})})}return k}(),y=function(S,p){var i=(0,a.useBackend)(p),l=i.act,f=i.data,u=f.display_craftable_only,s=f.can_craft,m=f.cant_craft;return(0,e.createComponentVNode)(2,t.Box,{mt:1,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[s.map(function(c){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:c.name,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",onClick:function(){function v(){return l("make",{make:c.ref})}return v}()}),c.catalyst_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:c.catalyst_text,content:"Catalysts",color:"transparent"}),(0,e.createComponentVNode)(2,t.Button,{tooltip:c.req_text,content:"Requirements",color:"transparent"}),c.tool_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:c.tool_text,content:"Tools",color:"transparent"})]},c.name)}),!u&&m.map(function(c){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:c.name,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",disabled:!0}),c.catalyst_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:c.catalyst_text,content:"Catalysts",color:"transparent"}),(0,e.createComponentVNode)(2,t.Button,{tooltip:c.req_text,content:"Requirements",color:"transparent"}),c.tool_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:c.tool_text,content:"Tools",color:"transparent"})]},c.name)})]})})},V=function(S,p){var i=(0,a.useBackend)(p),l=i.act,f=i.data,u=f.display_craftable_only,s=f.can_craft,m=f.cant_craft;return(0,e.createComponentVNode)(2,t.Box,{mt:1,children:[s.map(function(c){return(0,e.createComponentVNode)(2,t.Section,{title:c.name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",onClick:function(){function v(){return l("make",{make:c.ref})}return v}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[c.catalyst_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Catalysts",children:c.catalyst_text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Requirements",children:c.req_text}),c.tool_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tools",children:c.tool_text})]})},c.name)}),!u&&m.map(function(c){return(0,e.createComponentVNode)(2,t.Section,{title:c.name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",disabled:!0}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[c.catalyst_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Catalysts",children:c.catalyst_text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Requirements",children:c.req_text}),c.tool_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tools",children:c.tool_text})]})},c.name)})]})}},56150:function(I,r,n){"use strict";r.__esModule=!0,r.Photocopier=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=n(88510),y=n(64795),V=n(25328);function k(f,u){var s=typeof Symbol!="undefined"&&f[Symbol.iterator]||f["@@iterator"];if(s)return(s=s.call(f)).next.bind(s);if(Array.isArray(f)||(s=S(f))||u&&f&&typeof f.length=="number"){s&&(f=s);var m=0;return function(){return m>=f.length?{done:!0}:{done:!1,value:f[m++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function S(f,u){if(f){if(typeof f=="string")return p(f,u);var s={}.toString.call(f).slice(8,-1);return s==="Object"&&f.constructor&&(s=f.constructor.name),s==="Map"||s==="Set"?Array.from(f):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?p(f,u):void 0}}function p(f,u){(u==null||u>f.length)&&(u=f.length);for(var s=0,m=Array(u);sf?this.substring(0,f)+"...":this};var i=function(u,s){s===void 0&&(s="");var m=(0,V.createSearch)(s,function(c){return c.altername});return(0,y.flow)([(0,d.filter)(function(c){return c==null?void 0:c.altername}),s&&(0,d.filter)(m),(0,d.sortBy)(function(c){return c.id})])(u)},l=r.Photocopier=function(){function f(u,s){for(var m=(0,a.useBackend)(s),c=m.act,v=m.data,b=v.copies,g=v.maxcopies,h=(0,a.useLocalState)(s,"searchText",""),C=h[0],N=h[1],x=i((0,d.sortBy)(function(R){return R.category})(v.forms||[]),C),B=[],L=k(x),w;!(w=L()).done;){var A=w.value;B.includes(A.category)||B.push(A.category)}var T=(0,a.useLocalState)(s,"number",0),E=T[0],O=T[1],P;return v.category===""?P=x:P=x.filter(function(R){return R.category===v.category}),(0,e.createComponentVNode)(2,o.Window,{width:550,height:575,theme:v.ui_theme,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"40%",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"\u0421\u0442\u0430\u0442\u0443\u0441",children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",mt:.3,color:"grey",children:"\u0417\u0430\u0440\u044F\u0434 \u0442\u043E\u043D\u0435\u0440\u0430:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{minValue:0,maxValue:30,value:v.toner})})]}),(0,e.createComponentVNode)(2,t.Stack,{mt:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",mb:.3,color:"grey",children:"\u0424\u043E\u0440\u043C\u0430:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",textAlign:"center",bold:!0,children:v.form_id===""?"\u041D\u0435 \u0432\u044B\u0431\u0440\u0430\u043D\u0430":v.form_id})]}),(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{width:"100%",mt:1,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",disabled:!v.copyitem&&!v.mob,icon:v.copyitem||v.mob?"eject":"times",content:v.copyitem?v.copyitem:v.mob?"\u0416\u043E\u043F\u0430 "+v.mob+"!":"\u0421\u043B\u043E\u0442 \u0434\u043B\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430",onClick:function(){function R(){return c("removedocument")}return R}()})})}),(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{width:"100%",mt:"3px",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",disabled:!v.folder,icon:v.folder?"eject":"times",content:v.folder?v.folder:"\u0421\u043B\u043E\u0442 \u0434\u043B\u044F \u043F\u0430\u043F\u043A\u0438",onClick:function(){function R(){return c("removefolder")}return R}()})})})]}),(0,e.createComponentVNode)(2,t.Section,{title:"\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435",children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"100%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"print",disabled:v.toner===0||v.form===null,content:"\u041F\u0435\u0447\u0430\u0442\u044C",onClick:function(){function R(){return c("print_form")}return R}()})}),!!v.isAI&&(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"100%",ml:"5px",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"image",disabled:v.toner<5,content:"\u0424\u043E\u0442\u043E",tooltip:"\u0420\u0430\u0441\u043F\u0435\u0447\u0430\u0442\u0430\u0442\u044C \u0444\u043E\u0442\u043E \u0441 \u0411\u0430\u0437\u044B \u0414\u0430\u043D\u043D\u044B\u0445",onClick:function(){function R(){return c("ai_pic")}return R}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"100%",mt:"3px",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"copy",content:"\u041A\u043E\u043F\u0438\u044F",disabled:v.toner===0||!v.copyitem&&!v.mob,onClick:function(){function R(){return c("copy")}return R}()})}),!!v.isAI&&(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"100%",ml:"5px",mt:"3px",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"i-cursor",content:"\u0422\u0435\u043A\u0441\u0442",tooltip:"\u0420\u0430\u0441\u043F\u0435\u0447\u0430\u0442\u0430\u0442\u044C \u0441\u0432\u043E\u0439 \u0442\u0435\u043A\u0441\u0442",disabled:v.toner===0,onClick:function(){function R(){return c("ai_text")}return R}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{mr:1.5,mt:1.2,width:"50%",color:"grey",children:"\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E:"}),(0,e.createComponentVNode)(2,t.Slider,{mt:.75,width:"50%",animated:!0,minValue:1,maxValue:g,value:b,stepPixelSize:10,onChange:function(){function R(F,j){return c("copies",{new:j})}return R}()})]})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mt:0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"\u0411\u044E\u0440\u043E\u043A\u0440\u0430\u0442\u0438\u044F",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mb:-.5,icon:"chevron-right",color:"transparent",content:"\u0412\u0441\u0435 \u0444\u043E\u0440\u043C\u044B",selected:!v.category,onClick:function(){function R(){return c("choose_category",{category:""})}return R}()})}),B.map(function(R){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"chevron-right",mb:-.5,color:"transparent",content:R,selected:v.category===R,onClick:function(){function F(){return c("choose_category",{category:R})}return F}()},R)},R)})]})})})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"60%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:v.category||"\u0412\u0441\u0435 \u0444\u043E\u0440\u043C\u044B",buttons:(0,e.createComponentVNode)(2,t.Input,{mr:18.5,width:"100%",placeholder:"\u041F\u043E\u0438\u0441\u043A \u0444\u043E\u0440\u043C\u044B",onInput:function(){function R(F,j){return N(j)}return R}()}),children:P.map(function(R){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mb:.5,color:"transparent",content:R.altername.trimLongStr(37),tooltip:R.altername,selected:v.form_id===R.id,onClick:function(){function F(){return c("choose_form",{path:R.path,id:R.id})}return F}()})},R.path)})})})]})})})}return f}()},94158:function(I,r,n){"use strict";r.__esModule=!0,r.PodTracking=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.PodTracking=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.pods;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:l.map(function(f){return(0,e.createComponentVNode)(2,t.Section,{title:f.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Position",children:[f.podx,", ",f.pody,", ",f.podz]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pilot",children:f.pilot}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Passengers",children:f.passengers})]})},f.name)})})})}return y}()},84676:function(I,r,n){"use strict";r.__esModule=!0,r.PoolController=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=["tempKey"];function y(p,i){if(p==null)return{};var l={};for(var f in p)if({}.hasOwnProperty.call(p,f)){if(i.includes(f))continue;l[f]=p[f]}return l}var V={scalding:{label:"Scalding",color:"#FF0000",icon:"fa fa-arrow-circle-up",requireEmag:!0},warm:{label:"Warm",color:"#990000",icon:"fa fa-arrow-circle-up"},normal:{label:"Normal",color:null,icon:"fa fa-arrow-circle-right"},cool:{label:"Cool",color:"#009999",icon:"fa fa-arrow-circle-down"},frigid:{label:"Frigid",color:"#00CCCC",icon:"fa fa-arrow-circle-down",requireEmag:!0}},k=function(i,l){var f=i.tempKey,u=y(i,d),s=V[f];if(!s)return null;var m=(0,a.useBackend)(l),c=m.data,v=m.act,b=c.currentTemp,g=s.label,h=s.icon,C=f===b,N=function(){v("setTemp",{temp:f})};return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Button,Object.assign({selected:C,onClick:N},u,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:h}),g]})))},S=r.PoolController=function(){function p(i,l){for(var f=(0,a.useBackend)(l),u=f.data,s=u.emagged,m=u.currentTemp,c=V[m]||V.normal,v=c.label,b=c.color,g=[],h=0,C=Object.entries(V);h50?"battery-half":"battery-quarter")||b==="C"&&"bolt"||b==="F"&&"battery-full"||b==="M"&&"slash",color:b==="N"&&(g>50?"yellow":"red")||b==="C"&&"yellow"||b==="F"&&"green"||b==="M"&&"orange"}),(0,e.createComponentVNode)(2,k.Box,{inline:!0,width:"36px",textAlign:"right",children:(0,o.toFixed)(g)+"%"})],4)};s.defaultHooks=d.pureComponentHooks;var m=function(v){var b,g,h=v.status;switch(h){case"AOn":b=!0,g=!0;break;case"AOff":b=!0,g=!1;break;case"On":b=!1,g=!0;break;case"Off":b=!1,g=!1;break}var C=(g?"On":"Off")+(" ["+(b?"auto":"manual")+"]");return(0,e.createComponentVNode)(2,k.ColorBox,{color:g?"good":"bad",content:b?void 0:"M",title:C})};m.defaultHooks=d.pureComponentHooks},50992:function(I,r,n){"use strict";r.__esModule=!0,r.PrisonerImplantManager=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(29319),d=n(3939),y=n(321),V=n(5485),k=n(98595),S=r.PrisonerImplantManager=function(){function p(i,l){var f=(0,a.useBackend)(l),u=f.act,s=f.data,m=s.loginState,c=s.prisonerInfo,v=s.chemicalInfo,b=s.trackingInfo,g;if(!m.logged_in)return(0,e.createComponentVNode)(2,k.Window,{theme:"security",width:500,height:850,children:(0,e.createComponentVNode)(2,k.Window.Content,{children:(0,e.createComponentVNode)(2,V.LoginScreen)})});var h=[1,5,10];return(0,e.createComponentVNode)(2,k.Window,{theme:"security",width:500,height:850,children:[(0,e.createComponentVNode)(2,d.ComplexModal),(0,e.createComponentVNode)(2,k.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y.LoginInfo),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Prisoner Points Manager System",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Prisoner",children:(0,e.createComponentVNode)(2,t.Button,{icon:c.name?"eject":"id-card",selected:c.name,content:c.name?c.name:"-----",tooltip:c.name?"Eject ID":"Insert ID",onClick:function(){function C(){return u("id_card")}return C}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Points",children:[c.points!==null?c.points:"-/-",(0,e.createComponentVNode)(2,t.Button,{ml:2,icon:"minus-square",disabled:c.points===null,content:"Reset",onClick:function(){function C(){return u("reset_points")}return C}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Point Goal",children:[c.goal!==null?c.goal:"-/-",(0,e.createComponentVNode)(2,t.Button,{ml:2,icon:"pen",disabled:c.goal===null,content:"Edit",onClick:function(){function C(){return(0,d.modalOpen)(l,"set_points")}return C}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{children:(0,e.createVNode)(1,"box",null,[(0,e.createTextVNode)("1 minute of prison time should roughly equate to 150 points."),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Sentences should not exceed 5000 points."),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Permanent prisoners should not be given a point goal."),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Prisoners who meet their point goal will be able to automatically access their locker and return to the station using the shuttle.")],4,{hidden:c.goal===null})})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Tracking Implants",children:b.map(function(C){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{p:1,backgroundColor:"rgba(255, 255, 255, 0.05)",children:[(0,e.createComponentVNode)(2,t.Box,{bold:!0,children:["Subject: ",C.subject]}),(0,e.createComponentVNode)(2,t.Box,{children:[" ",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Location",children:C.location}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health",children:C.health}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Prisoner",children:(0,e.createComponentVNode)(2,t.Button,{icon:"exclamation-triangle",content:"Warn",tooltip:"Broadcast a message to this poor sod",onClick:function(){function N(){return(0,d.modalOpen)(l,"warn",{uid:C.uid})}return N}()})})]})]},C.subject)]}),(0,e.createVNode)(1,"br")],4)})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Chemical Implants",children:v.map(function(C){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{p:1,backgroundColor:"rgba(255, 255, 255, 0.05)",children:[(0,e.createComponentVNode)(2,t.Box,{bold:!0,children:["Subject: ",C.name]}),(0,e.createComponentVNode)(2,t.Box,{children:[" ",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Remaining Reagents",children:C.volume})}),h.map(function(N){return(0,e.createComponentVNode)(2,t.Button,{mt:2,disabled:C.volume1100?"purple":m>500?"orange":m>250?"yellow":"green"},k=function(m,c){for(var v=[],b=0;b0?"envelope-open-text":"envelope",onClick:function(){function N(){return c("setScreen",{setScreen:6})}return N}()})}),(0,e.createComponentVNode)(2,t.Box,{mt:2,children:[(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Request Assistance",icon:"hand-paper",onClick:function(){function N(){return c("setScreen",{setScreen:1})}return N}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Request Supplies",icon:"box",onClick:function(){function N(){return c("setScreen",{setScreen:2})}return N}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Relay Anonymous Information",icon:"comment",onClick:function(){function N(){return c("setScreen",{setScreen:3})}return N}()})})]}),(0,e.createComponentVNode)(2,t.Box,{mt:2,children:[(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Print Shipping Label",icon:"tag",onClick:function(){function N(){return c("setScreen",{setScreen:9})}return N}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"View Shipping Logs",icon:"clipboard-list",onClick:function(){function N(){return c("setScreen",{setScreen:10})}return N}()})})]}),!!g&&(0,e.createComponentVNode)(2,t.Box,{mt:2,children:(0,e.createComponentVNode)(2,t.Button,{content:"Send Station-Wide Announcement",icon:"bullhorn",onClick:function(){function N(){return c("setScreen",{setScreen:8})}return N}()})}),(0,e.createComponentVNode)(2,t.Box,{mt:2,children:(0,e.createComponentVNode)(2,t.Button,{content:h?"Speaker Off":"Speaker On",selected:!h,icon:h?"volume-mute":"volume-up",onClick:function(){function N(){return c("toggleSilent")}return N}()})})]})},V=function(u,s){var m=(0,a.useBackend)(s),c=m.act,v=m.data,b=v.department,g,h;switch(u.purpose){case"ASSISTANCE":g=v.assist_dept,h="Request assistance from another department";break;case"SUPPLIES":g=v.supply_dept,h="Request supplies from another department";break;case"INFO":g=v.info_dept,h="Relay information to another department";break}return(0,e.createComponentVNode)(2,t.Section,{title:h,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function C(){return c("setScreen",{setScreen:0})}return C}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:g.filter(function(C){return C!==b}).map(function(C){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:C,children:[(0,e.createComponentVNode)(2,t.Button,{content:"Message",icon:"envelope",onClick:function(){function N(){return c("writeInput",{write:C,priority:1})}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:"High Priority",icon:"exclamation-circle",onClick:function(){function N(){return c("writeInput",{write:C,priority:2})}return N}()})]},C)})})})},k=function(u,s){var m=(0,a.useBackend)(s),c=m.act,v=m.data,b;switch(u.type){case"SUCCESS":b="Message sent successfully";break;case"FAIL":b="Request supplies from another department";break}return(0,e.createComponentVNode)(2,t.Section,{title:b,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function g(){return c("setScreen",{setScreen:0})}return g}()})})},S=function(u,s){var m=(0,a.useBackend)(s),c=m.act,v=m.data,b,g;switch(u.type){case"MESSAGES":b=v.message_log,g="Message Log";break;case"SHIPPING":b=v.shipping_log,g="Shipping label print log";break}return(0,e.createComponentVNode)(2,t.Section,{title:g,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function h(){return c("setScreen",{setScreen:0})}return h}()}),children:b.map(function(h){return(0,e.createComponentVNode)(2,t.Box,{className:"RequestConsole__message",children:h},h)})})},p=function(u,s){var m=(0,a.useBackend)(s),c=m.act,v=m.data,b=v.recipient,g=v.message,h=v.msgVerified,C=v.msgStamped;return(0,e.createComponentVNode)(2,t.Section,{title:"Message Authentication",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function N(){return c("setScreen",{setScreen:0})}return N}()}),children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Recipient",children:b}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Message",children:g}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Validated by",color:"green",children:h}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Stamped by",color:"blue",children:C})]}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mt:1,textAlign:"center",content:"Send Message",icon:"envelope",onClick:function(){function N(){return c("department",{department:b})}return N}()})]})},i=function(u,s){var m=(0,a.useBackend)(s),c=m.act,v=m.data,b=v.message,g=v.announceAuth;return(0,e.createComponentVNode)(2,t.Section,{title:"Station-Wide Announcement",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function h(){return c("setScreen",{setScreen:0})}return h}()}),children:[(0,e.createComponentVNode)(2,t.Button,{content:b||"Edit Message",icon:"edit",onClick:function(){function h(){return c("writeAnnouncement")}return h}()}),g?(0,e.createComponentVNode)(2,t.Box,{mt:1,color:"green",children:"ID verified. Authentication accepted."}):(0,e.createComponentVNode)(2,t.Box,{mt:1,children:"Swipe your ID card to authenticate yourself."}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mt:1,textAlign:"center",content:"Send Announcement",icon:"bullhorn",disabled:!(g&&b),onClick:function(){function h(){return c("sendAnnouncement")}return h}()})]})},l=function(u,s){var m=(0,a.useBackend)(s),c=m.act,v=m.data,b=v.shipDest,g=v.msgVerified,h=v.ship_dept;return(0,e.createComponentVNode)(2,t.Section,{title:"Print Shipping Label",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function C(){return c("setScreen",{setScreen:0})}return C}()}),children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Destination",children:b}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Validated by",children:g})]}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mt:1,textAlign:"center",content:"Print Label",icon:"print",disabled:!(b&&g),onClick:function(){function C(){return c("printLabel")}return C}()}),(0,e.createComponentVNode)(2,t.Section,{title:"Destinations",mt:1,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:h.map(function(C){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:C,children:(0,e.createComponentVNode)(2,t.Button,{content:b===C?"Selected":"Select",selected:b===C,onClick:function(){function N(){return c("shipSelect",{shipSelect:C})}return N}()})},C)})})})]})}},3786:function(I,r,n){"use strict";r.__esModule=!0,r.RequestManager=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),d=n(98595);/** + */var y=(0,t.createLogger)("hotkeys"),V={},k=[e.KEY_ESCAPE,e.KEY_ENTER,e.KEY_SPACE,e.KEY_TAB,e.KEY_CTRL,e.KEY_SHIFT,e.KEY_UP,e.KEY_DOWN,e.KEY_LEFT,e.KEY_RIGHT],S={},p=function(c){if(c===16)return"Shift";if(c===17)return"Ctrl";if(c===18)return"Alt";if(c===33)return"Northeast";if(c===34)return"Southeast";if(c===35)return"Southwest";if(c===36)return"Northwest";if(c===37)return"West";if(c===38)return"North";if(c===39)return"East";if(c===40)return"South";if(c===45)return"Insert";if(c===46)return"Delete";if(c>=48&&c<=57||c>=65&&c<=90)return String.fromCharCode(c);if(c>=96&&c<=105)return"Numpad"+(c-96);if(c>=112&&c<=123)return"F"+(c-111);if(c===188)return",";if(c===189)return"-";if(c===190)return"."},i=function(c){var v=String(c);if(v==="Ctrl+F5"||v==="Ctrl+R"){location.reload();return}if(v!=="Ctrl+F"&&!(c.event.defaultPrevented||c.isModifierKey()||k.includes(c.code))){v==="F5"&&(c.event.preventDefault(),c.event.returnValue=!1);var b=p(c.code);if(b){var g=V[b];if(g)return y.debug("macro",g),Byond.command(g);if(c.isDown()&&!S[b]){S[b]=!0;var h='KeyDown "'+b+'"';return y.debug(h),Byond.command(h)}if(c.isUp()&&S[b]){S[b]=!1;var C='KeyUp "'+b+'"';return y.debug(C),Byond.command(C)}}}},l=r.acquireHotKey=function(){function m(c){k.push(c)}return m}(),f=r.releaseHotKey=function(){function m(c){var v=k.indexOf(c);v>=0&&k.splice(v,1)}return m}(),u=r.releaseHeldKeys=function(){function m(){for(var c=0,v=Object.keys(S);c=75?l="green":i.integrity>=25?l="yellow":l="red",(0,e.createComponentVNode)(2,o.Window,{width:600,height:420,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:i.name,children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:l,value:i.integrity/100})})}),(0,e.createComponentVNode)(2,t.Box,{color:"red",children:(0,e.createVNode)(1,"h2",null,i.flushing===1?"Wipe of AI in progress...":"",0)})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Laws",children:!!i.has_laws&&(0,e.createComponentVNode)(2,t.Box,{children:i.laws.map(function(f,u){return(0,e.createComponentVNode)(2,t.Box,{children:f},u)})})||(0,e.createComponentVNode)(2,t.Box,{color:"red",children:(0,e.createVNode)(1,"h3",null,"No laws detected.",16)})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Wireless Activity",children:(0,e.createComponentVNode)(2,t.Button,{width:10,icon:i.wireless?"check":"times",content:i.wireless?"Enabled":"Disabled",color:i.wireless?"green":"red",onClick:function(){function f(){return p("wireless")}return f}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subspace Transceiver",children:(0,e.createComponentVNode)(2,t.Button,{width:10,icon:i.radio?"check":"times",content:i.radio?"Enabled":"Disabled",color:i.radio?"green":"red",onClick:function(){function f(){return p("radio")}return f}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Wipe",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{width:10,icon:"trash-alt",confirmIcon:"trash-alt",disabled:i.flushing||i.integrity===0,confirmColor:"red",content:"Wipe AI",onClick:function(){function f(){return p("wipe")}return f}()})})]})})})]})})})}return y}()},39454:function(I,r,n){"use strict";r.__esModule=!0,r.AIFixer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.AIFixer=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data;if(i.occupant===null)return(0,e.createComponentVNode)(2,o.Window,{width:550,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Stored AI",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"robot",size:5,color:"silver"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"h3",null,"No Artificial Intelligence detected.",16)]})})})})});var l=!0;(i.stat===2||i.stat===null)&&(l=!1);var f=null;i.integrity>=75?f="green":i.integrity>=25?f="yellow":f="red";var u=!0;return i.integrity>=100&&i.stat!==2&&(u=!1),(0,e.createComponentVNode)(2,o.Window,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:i.occupant,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:f,value:i.integrity/100})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:l?"green":"red",children:l?"Functional":"Non-Functional"})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Laws",children:!!i.has_laws&&(0,e.createComponentVNode)(2,t.Box,{children:i.laws.map(function(s,m){return(0,e.createComponentVNode)(2,t.Box,{inline:!0,children:s},m)})})||(0,e.createComponentVNode)(2,t.Box,{color:"red",children:(0,e.createVNode)(1,"h3",null,"No laws detected.",16)})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Actions",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Wireless Activity",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.wireless?"times":"check",content:i.wireless?"Disabled":"Enabled",color:i.wireless?"red":"green",onClick:function(){function s(){return p("wireless")}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subspace Transceiver",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.radio?"times":"check",content:i.radio?"Disabled":"Enabled",color:i.radio?"red":"green",onClick:function(){function s(){return p("radio")}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Start Repairs",children:(0,e.createComponentVNode)(2,t.Button,{icon:"wrench",disabled:!u||i.active,content:!u||i.active?"Already Repaired":"Repair",onClick:function(){function s(){return p("fix")}return s}()})})]}),(0,e.createComponentVNode)(2,t.Box,{color:"green",lineHeight:2,children:i.active?"Reconstruction in progress.":""})]})})]})})})}return y}()},88422:function(I,r,n){"use strict";r.__esModule=!0,r.APC=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=n(195),y=r.APC=function(){function p(i,l){return(0,e.createComponentVNode)(2,o.Window,{width:510,height:435,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,S)})})}return p}(),V={2:{color:"good",externalPowerText:"External Power",chargingText:"Fully Charged"},1:{color:"average",externalPowerText:"Low External Power",chargingText:"Charging"},0:{color:"bad",externalPowerText:"No External Power",chargingText:"Not Charging"}},k={1:{icon:"terminal",content:"Override Programming",action:"hack"},2:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"},3:{icon:"caret-square-left",content:"Return to Main Core",action:"deoccupy"},4:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"}},S=function(i,l){var f=(0,a.useBackend)(l),u=f.act,s=f.data,m=s.locked&&!s.siliconUser,c=s.normallyLocked,v=V[s.externalPower]||V[0],b=V[s.chargingStatus]||V[0],g=s.powerChannels||[],h=k[s.malfStatus]||k[0],C=s.powerCellStatus/100;return(0,e.createFragment)([(0,e.createComponentVNode)(2,d.InterfaceLockNoticeBox),(0,e.createComponentVNode)(2,t.Section,{title:"Power Status",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Main Breaker",color:v.color,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:s.isOperating?"power-off":"times",content:s.isOperating?"On":"Off",selected:s.isOperating&&!m,color:s.isOperating?"":"bad",disabled:m,onClick:function(){function N(){return u("breaker")}return N}()}),children:["[ ",v.externalPowerText," ]"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power Cell",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:"good",value:C})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Charge Mode",color:b.color,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:s.chargeMode?"sync":"times",content:s.chargeMode?"Auto":"Off",selected:s.chargeMode,disabled:m,onClick:function(){function N(){return u("charge")}return N}()}),children:["[ ",b.chargingText," ]"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Power Channels",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[g.map(function(N){var x=N.topicParams;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:N.title,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{inline:!0,mx:2,color:N.status>=2?"good":"bad",children:N.status>=2?"On":"Off"}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Auto",selected:!m&&(N.status===1||N.status===3),disabled:m,onClick:function(){function B(){return u("channel",x.auto)}return B}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:"On",selected:!m&&N.status===2,disabled:m,onClick:function(){function B(){return u("channel",x.on)}return B}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Off",selected:!m&&N.status===0,disabled:m,onClick:function(){function B(){return u("channel",x.off)}return B}()})],4),children:[N.powerLoad," W"]},N.title)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Load",children:(0,e.createVNode)(1,"b",null,[s.totalLoad,(0,e.createTextVNode)(" W")],0)})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Misc",buttons:!!s.siliconUser&&(0,e.createFragment)([!!s.malfStatus&&(0,e.createComponentVNode)(2,t.Button,{icon:h.icon,content:h.content,color:"bad",onClick:function(){function N(){return u(h.action)}return N}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"lightbulb-o",content:"Overload",onClick:function(){function N(){return u("overload")}return N}()})],0),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cover Lock",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.4,icon:s.coverLocked?"lock":"unlock",content:s.coverLocked?"Engaged":"Disengaged",disabled:m,onClick:function(){function N(){return u("cover")}return N}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Night Shift Lighting",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"lightbulb-o",content:s.nightshiftLights?"Enabled":"Disabled",onClick:function(){function N(){return u("toggle_nightshift")}return N}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Lighting Fallback",buttons:(0,e.createComponentVNode)(2,t.Button,{mt:.4,icon:"lightbulb-o",content:s.emergencyLights?"Engaged":"Disengaged",disabled:m,onClick:function(){function N(){return u("emergency_lighting")}return N}()})})]})})],4)}},99660:function(I,r,n){"use strict";r.__esModule=!0,r.ATM=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.ATM=function(){function u(s,m){var c=(0,a.useBackend)(m),v=c.act,b=c.data,g=b.view_screen,h=b.authenticated_account,C=b.ticks_left_locked_down,N=b.linked_db,x;if(C>0)x=(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-triangle"}),"Maximum number of pin attempts exceeded! Access to this ATM has been temporarily disabled."]});else if(!N)x=(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-triangle"}),"Unable to connect to accounts database, please retry and if the issue persists contact Nanotrasen IT support."]});else if(h)switch(g){case 1:x=(0,e.createComponentVNode)(2,V);break;case 2:x=(0,e.createComponentVNode)(2,k);break;case 3:x=(0,e.createComponentVNode)(2,l);break;case 4:x=(0,e.createComponentVNode)(2,S);break;default:x=(0,e.createComponentVNode)(2,p)}else x=(0,e.createComponentVNode)(2,i);return(0,e.createComponentVNode)(2,o.Window,{width:550,height:650,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,t.Section,{children:x})]})})}return u}(),y=function(s,m){var c=(0,a.useBackend)(m),v=c.act,b=c.data,g=b.machine_id,h=b.held_card_name;return(0,e.createComponentVNode)(2,t.Section,{title:"Nanotrasen Automatic Teller Machine",children:[(0,e.createComponentVNode)(2,t.Box,{children:"For all your monetary needs!"}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Card",children:(0,e.createComponentVNode)(2,t.Button,{content:h,icon:"eject",onClick:function(){function C(){return v("insert_card")}return C}()})})})]})},V=function(s,m){var c=(0,a.useBackend)(m),v=c.act,b=c.data,g=b.security_level;return(0,e.createComponentVNode)(2,t.Section,{title:"Select a new security level for this account",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Level",children:(0,e.createComponentVNode)(2,t.Button,{content:"Account Number",icon:"unlock",selected:g===0,onClick:function(){function h(){return v("change_security_level",{new_security_level:0})}return h}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:"Either the account number or card is required to access this account. EFTPOS transactions will require a card."}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Level",children:(0,e.createComponentVNode)(2,t.Button,{content:"Account Pin",icon:"unlock",selected:g===1,onClick:function(){function h(){return v("change_security_level",{new_security_level:1})}return h}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:"An account number and pin must be manually entered to access this account and process transactions."}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Level",children:(0,e.createComponentVNode)(2,t.Button,{content:"Card and Account Pin",icon:"unlock",selected:g===2,onClick:function(){function h(){return v("change_security_level",{new_security_level:2})}return h}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:"An account number, pin and card are required to access this account and process transactions."})]}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,f)]})},k=function(s,m){var c=(0,a.useBackend)(m),v=c.act,b=c.data,g=(0,a.useLocalState)(m,"targetAccNumber",0),h=g[0],C=g[1],N=(0,a.useLocalState)(m,"fundsAmount",0),x=N[0],B=N[1],L=(0,a.useLocalState)(m,"purpose",0),w=L[0],A=L[1],T=b.money;return(0,e.createComponentVNode)(2,t.Section,{title:"Transfer Fund",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Account Balance",children:["$",T]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target Account Number",children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"7 Digit Number",onInput:function(){function E(O,P){return C(P)}return E}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Funds to Transfer",children:(0,e.createComponentVNode)(2,t.Input,{onInput:function(){function E(O,P){return B(P)}return E}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transaction Purpose",children:(0,e.createComponentVNode)(2,t.Input,{fluid:!0,onInput:function(){function E(O,P){return A(P)}return E}()})})]}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.Button,{content:"Transfer",icon:"sign-out-alt",onClick:function(){function E(){return v("transfer",{target_acc_number:h,funds_amount:x,purpose:w})}return E}()}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,f)]})},S=function(s,m){var c=(0,a.useBackend)(m),v=c.act,b=c.data,g=b.insurance_type;return(0,e.createComponentVNode)(2,t.Section,{title:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u0442\u0438\u043F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u043A\u0438",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0422\u0438\u043F",children:[(0,e.createComponentVNode)(2,t.Button,{content:"\u041D\u0435\u0442 (0)",icon:"unlock",selected:g==="None",onClick:function(){function h(){return v("change_insurance_type",{new_insurance_type:"None"})}return h}()}),(0,e.createComponentVNode)(2,t.Button,{content:"\u0411\u044E\u0434\u0436\u0435\u0442\u043D\u0430\u044F (0)",icon:"unlock",selected:g==="Bugetary",onClick:function(){function h(){return v("change_insurance_type",{new_insurance_type:"Bugetary"})}return h}()}),(0,e.createComponentVNode)(2,t.Button,{content:"\u0421\u0442\u0430\u043D\u0434\u0430\u0440\u0442\u043D\u0430\u044F (500)",icon:"unlock",selected:g==="Standart",onClick:function(){function h(){return v("change_insurance_type",{new_insurance_type:"Standart"})}return h}()}),(0,e.createComponentVNode)(2,t.Button,{content:"\u0414\u0435\u043B\u044E\u043A\u0441 (2000)",icon:"unlock",selected:g==="Deluxe",onClick:function(){function h(){return v("change_insurance_type",{new_insurance_type:"Deluxe"})}return h}()})]})}),(0,e.createComponentVNode)(2,f)]})},p=function(s,m){var c=(0,a.useBackend)(m),v=c.act,b=c.data,g=(0,a.useLocalState)(m,"fundsAmount",0),h=g[0],C=g[1],N=(0,a.useLocalState)(m,"insuranceAmount",0),x=N[0],B=N[1],L=b.owner_name,w=b.money,A=b.insurance;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Welcome, "+L,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Logout",icon:"sign-out-alt",onClick:function(){function T(){return v("logout")}return T}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Account Balance",children:["$",w]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Withdrawal Amount",children:(0,e.createComponentVNode)(2,t.Input,{onInput:function(){function T(E,O){return C(O)}return T}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Withdraw Funds",icon:"sign-out-alt",onClick:function(){function T(){return v("withdrawal",{funds_amount:h})}return T}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Insurance Points",children:["$",A]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Adding Insurance",children:(0,e.createComponentVNode)(2,t.Input,{onInput:function(){function T(E,O){return B(O)}return T}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Add insurance points",icon:"sign-out-alt",onClick:function(){function T(){return v("insurance",{insurance_amount:x})}return T}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Toggle auto-replenishment of insurance",icon:"sign-out-alt",onClick:function(){function T(){return v("insurance_replenishment",{})}return T}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Menu",children:[(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Change account security level",icon:"lock",onClick:function(){function T(){return v("view_screen",{view_screen:1})}return T}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Make transfer",icon:"exchange-alt",onClick:function(){function T(){return v("view_screen",{view_screen:2})}return T}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"View transaction log",icon:"list",onClick:function(){function T(){return v("view_screen",{view_screen:3})}return T}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Change type of insurance",icon:"lock",onClick:function(){function T(){return v("view_screen",{view_screen:4})}return T}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Print balance statement",icon:"print",onClick:function(){function T(){return v("balance_statement")}return T}()})})]})],4)},i=function(s,m){var c=(0,a.useBackend)(m),v=c.act,b=c.data,g=(0,a.useLocalState)(m,"accountID",null),h=g[0],C=g[1],N=(0,a.useLocalState)(m,"accountPin",null),x=N[0],B=N[1],L=b.machine_id,w=b.held_card_name;return(0,e.createComponentVNode)(2,t.Section,{title:"Insert card or enter ID and pin to login",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Account ID",children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"6 Digit Number",onInput:function(){function A(T,E){return C(E)}return A}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pin",children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"6 Digit Number",onInput:function(){function A(T,E){return B(E)}return A}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Login",icon:"sign-in-alt",onClick:function(){function A(){return v("attempt_auth",{account_num:h,account_pin:x})}return A}()})})]})})},l=function(s,m){var c=(0,a.useBackend)(m),v=c.act,b=c.data,g=b.transaction_log;return(0,e.createComponentVNode)(2,t.Section,{title:"Transactions",children:[(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Timestamp"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Reason"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Value"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Terminal"})]}),g.map(function(h){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.time}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.purpose}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:h.is_deposit?"green":"red",children:["$",h.amount]}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.target_name})]},h)})]}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,f)]})},f=function(s,m){var c=(0,a.useBackend)(m),v=c.act,b=c.data;return(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"sign-out-alt",onClick:function(){function g(){return v("view_screen",{view_screen:0})}return g}()})}},86423:function(I,r,n){"use strict";r.__esModule=!0,r.AccountsUplinkTerminal=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),d=n(36352),y=n(98595),V=n(321),k=n(5485),S=r.AccountsUplinkTerminal=function(){function s(m,c){var v=(0,t.useBackend)(c),b=v.act,g=v.data,h=g.loginState,C=g.currentPage,N;if(h.logged_in)C===1?N=(0,e.createComponentVNode)(2,p):C===2?N=(0,e.createComponentVNode)(2,f):C===3&&(N=(0,e.createComponentVNode)(2,u));else return(0,e.createComponentVNode)(2,y.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,y.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,k.LoginScreen)})})});return(0,e.createComponentVNode)(2,y.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,y.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,V.LoginInfo),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:N})]})})})}return s}(),p=function(m,c){var v=(0,t.useBackend)(c),b=v.act,g=v.data,h=g.accounts,C=(0,t.useLocalState)(c,"searchText",""),N=C[0],x=C[1],B=(0,t.useLocalState)(c,"sortId","owner_name"),L=B[0],w=B[1],A=(0,t.useLocalState)(c,"sortOrder",!0),T=A[0],E=A[1];return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"AccountsUplinkTerminal__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,i,{id:"owner_name",children:"Account Holder"}),(0,e.createComponentVNode)(2,i,{id:"account_number",children:"Account Number"}),(0,e.createComponentVNode)(2,i,{id:"suspended",children:"Account Status"}),(0,e.createComponentVNode)(2,i,{id:"money",children:"Account Balance"})]}),h.filter((0,a.createSearch)(N,function(O){return O.owner_name+"|"+O.account_number+"|"+O.suspended+"|"+O.money})).sort(function(O,P){var R=T?1:-1;return O[L].localeCompare(P[L])*R}).map(function(O){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"AccountsUplinkTerminal__listRow--"+O.suspended,onClick:function(){function P(){return b("view_account_detail",{index:O.account_index})}return P}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",O.owner_name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:["#",O.account_number]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:O.suspended}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:O.money})]},O.account_number)})]})})})]})},i=function(m,c){var v=(0,t.useLocalState)(c,"sortId","name"),b=v[0],g=v[1],h=(0,t.useLocalState)(c,"sortOrder",!0),C=h[0],N=h[1],x=m.id,B=m.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{color:b!==x&&"transparent",width:"100%",onClick:function(){function L(){b===x?N(!C):(g(x),N(!0))}return L}(),children:[B,b===x&&(0,e.createComponentVNode)(2,o.Icon,{name:C?"sort-up":"sort-down",ml:"0.25rem;"})]})})},l=function(m,c){var v=(0,t.useBackend)(c),b=v.act,g=v.data,h=g.is_printing,C=(0,t.useLocalState)(c,"searchText",""),N=C[0],x=C[1];return(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Button,{content:"New Account",icon:"plus",onClick:function(){function B(){return b("create_new_account")}return B}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"print",content:"Print Account List",disabled:h,ml:"0.25rem",onClick:function(){function B(){return b("print_records")}return B}()})]}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Search by account holder, number, status",width:"100%",onInput:function(){function B(L,w){return x(w)}return B}()})})]})},f=function(m,c){var v=(0,t.useBackend)(c),b=v.act,g=v.data,h=g.account_number,C=g.owner_name,N=g.money,x=g.suspended,B=g.transactions;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:"#"+h+" / "+C,buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"arrow-left",content:"Back",onClick:function(){function L(){return b("back")}return L}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Number",children:["#",h]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Holder",children:C}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Balance",children:N}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Status",color:x?"red":"green",children:[x?"Suspended":"Active",(0,e.createComponentVNode)(2,o.Button,{ml:1,content:x?"Unsuspend":"Suspend",icon:x?"unlock":"lock",onClick:function(){function L(){return b("toggle_suspension")}return L}()})]})]})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Transactions",children:(0,e.createComponentVNode)(2,o.Table,{children:[(0,e.createComponentVNode)(2,o.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Timestamp"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Reason"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Value"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Terminal"})]}),B.map(function(L){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:L.time}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:L.purpose}),(0,e.createComponentVNode)(2,o.Table.Cell,{color:L.is_deposit?"green":"red",children:["$",L.amount]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:L.target_name})]},L)})]})})})]})},u=function(m,c){var v=(0,t.useBackend)(c),b=v.act,g=v.data,h=(0,t.useLocalState)(c,"accName",""),C=h[0],N=h[1],x=(0,t.useLocalState)(c,"accDeposit",""),B=x[0],L=x[1];return(0,e.createComponentVNode)(2,o.Section,{title:"Create Account",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"arrow-left",content:"Back",onClick:function(){function w(){return b("back")}return w}()}),children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Holder",children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Name Here",onChange:function(){function w(A,T){return N(T)}return w}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Initial Deposit",children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"0",onChange:function(){function w(A,T){return L(T)}return w}()})})]}),(0,e.createComponentVNode)(2,o.Button,{mt:1,fluid:!0,content:"Create Account",onClick:function(){function w(){return b("finalise_create_account",{holder_name:C,starting_funds:B})}return w}()})]})}},79571:function(I,r,n){"use strict";r.__esModule=!0,r.AgentCardSLSlots=r.AgentCardInfo=r.AgentCardAppearances=r.AgentCard=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),d=n(98595),y=r.AgentCard=function(){function p(i,l){var f=(0,t.useLocalState)(l,"tabIndex",0),u=f[0],s=f[1],m=function(){function c(v){switch(v){case 0:return(0,e.createComponentVNode)(2,V);case 1:return(0,e.createComponentVNode)(2,k);case 2:return(0,e.createComponentVNode)(2,S);default:return(0,e.createComponentVNode)(2,V)}}return c}();return(0,e.createComponentVNode)(2,d.Window,{width:500,height:475,theme:"syndicate",children:(0,e.createComponentVNode)(2,d.Window.Content,{children:(0,e.createComponentVNode)(2,o.Box,{fillPositionedParent:!0,overflow:"hidden",children:[(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:u===0,onClick:function(){function c(){return s(0)}return c}(),children:[(0,e.createComponentVNode)(2,o.Icon,{name:"table"})," Card Info"]},"Card Info"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:u===1,onClick:function(){function c(){return s(1)}return c}(),children:[(0,e.createComponentVNode)(2,o.Icon,{name:"id-card"})," Appearance"]},"Appearance"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:u===2,onClick:function(){function c(){return s(2)}return c}(),children:[(0,e.createComponentVNode)(2,o.Icon,{name:"arrow-down"})," Save/Load Card Info"]},"Save/Load Card Info")]}),m(u)]})})})}return p}(),V=r.AgentCardInfo=function(){function p(i,l){var f=(0,t.useBackend)(l),u=f.act,s=f.data,m=s.registered_name,c=s.sex,v=s.age,b=s.assignment,g=s.associated_account_number,h=s.blood_type,C=s.dna_hash,N=s.fingerprint_hash,x=s.photo,B=s.ai_tracking;return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Section,{title:"Card Info",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:(0,e.createComponentVNode)(2,o.Button,{content:m||"[UNSET]",onClick:function(){function L(){return u("change_name")}return L}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Sex",children:(0,e.createComponentVNode)(2,o.Button,{iconRight:!1,content:c||"[UNSET]",onClick:function(){function L(){return u("change_sex")}return L}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Age",children:(0,e.createComponentVNode)(2,o.Button,{content:v||"[UNSET]",onClick:function(){function L(){return u("change_age")}return L}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Rank",children:(0,e.createComponentVNode)(2,o.Button,{content:b||"[UNSET]",onClick:function(){function L(){return u("change_occupation")}return L}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Fingerprints",children:(0,e.createComponentVNode)(2,o.Button,{content:N||"[UNSET]",onClick:function(){function L(){return u("change_fingerprints")}return L}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Blood Type",children:(0,e.createComponentVNode)(2,o.Button,{content:h||"[UNSET]",onClick:function(){function L(){return u("change_blood_type")}return L}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"DNA Hash",children:(0,e.createComponentVNode)(2,o.Button,{content:C||"[UNSET]",onClick:function(){function L(){return u("change_dna_hash")}return L}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Money Account",children:(0,e.createComponentVNode)(2,o.Button,{content:g||"[UNSET]",onClick:function(){function L(){return u("change_money_account")}return L}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Photo",children:(0,e.createComponentVNode)(2,o.Button,{content:x?"Update":"[UNSET]",onClick:function(){function L(){return u("change_photo")}return L}()})})]})}),(0,e.createComponentVNode)(2,o.Section,{title:"Card Settings",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Card Info",children:(0,e.createComponentVNode)(2,o.Button,{content:"Delete Card Info",onClick:function(){function L(){return u("delete_info")}return L}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Access",children:(0,e.createComponentVNode)(2,o.Button,{content:"Reset Access",onClick:function(){function L(){return u("clear_access")}return L}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"AI Tracking",children:(0,e.createComponentVNode)(2,o.Button,{content:B?"Untrackable":"Trackable",onClick:function(){function L(){return u("change_ai_tracking")}return L}()})})]})})],4)}return p}(),k=r.AgentCardAppearances=function(){function p(i,l){var f=(0,t.useBackend)(l),u=f.act,s=f.data,m=s.appearances;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Card Appearance",children:m.map(function(c){return(0,e.createComponentVNode)(2,o.ImageButton,{tooltip:c,vertical:!0,asset:!0,style:{margin:"1px"},image:c,imageAsset:"id_card64x64",onclick:function(){function v(){return u("change_appearance_new",{new_appearance:c})}return v}()},c)})})}return p}(),S=r.AgentCardSLSlots=function(){function p(i,l){var f=(0,t.useBackend)(l),u=f.act,s=f.data,m=s.saved_info;return(0,e.createComponentVNode)(2,o.Section,{title:"Save/Load Manager",style:{"line-height":"25px"},children:(0,e.createComponentVNode)(2,o.LabeledList,{children:m.map(function(c){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:c.registered_name?c.registered_name+", "+c.assignment:"Slot "+c.id,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{content:"Clear",onClick:function(){function v(){return u("clear_slot",{slot:c.id})}return v}()}),(0,e.createComponentVNode)(2,o.Button,{content:"Save",onClick:function(){function v(){return u("save_slot",{slot:c.id})}return v}()}),(0,e.createComponentVNode)(2,o.Button,{content:"Load",disabled:!c.registered_name,onClick:function(){function v(){return u("load_slot",{slot:c.id})}return v}()})],4)},c.id)})})})}return p}()},56793:function(I,r,n){"use strict";r.__esModule=!0,r.AiAirlock=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d={2:{color:"good",localStatusText:"Offline"},1:{color:"average",localStatusText:"Caution"},0:{color:"bad",localStatusText:"Optimal"}},y=r.AiAirlock=function(){function V(k,S){var p=(0,a.useBackend)(S),i=p.act,l=p.data,f=d[l.power.main]||d[0],u=d[l.power.backup]||d[0],s=d[l.shock]||d[0];return(0,e.createComponentVNode)(2,o.Window,{width:500,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Power Status",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Main",color:f.color,buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,icon:"lightbulb-o",disabled:!l.power.main,content:"Disrupt",onClick:function(){function m(){return i("disrupt-main")}return m}()}),children:[l.power.main?"Online":"Offline"," ",!l.wires.main_power&&"[Wires have been cut!]"||l.power.main_timeleft>0&&"["+l.power.main_timeleft+"s]"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Backup",color:u.color,buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,icon:"lightbulb-o",disabled:!l.power.backup,content:"Disrupt",onClick:function(){function m(){return i("disrupt-backup")}return m}()}),children:[l.power.backup?"Online":"Offline"," ",!l.wires.backup_power&&"[Wires have been cut!]"||l.power.backup_timeleft>0&&"["+l.power.backup_timeleft+"s]"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Electrify",color:s.color,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{mr:.5,icon:"wrench",disabled:!(l.wires.shock&&l.shock!==2),content:"Restore",onClick:function(){function m(){return i("shock-restore")}return m}()}),(0,e.createComponentVNode)(2,t.Button,{mr:.5,icon:"bolt",disabled:!l.wires.shock,content:"Temporary",onClick:function(){function m(){return i("shock-temp")}return m}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"bolt",disabled:!l.wires.shock||l.shock===0,content:"Permanent",onClick:function(){function m(){return i("shock-perm")}return m}()})],4),children:[l.shock===2?"Safe":"Electrified"," ",!l.wires.shock&&"[Wires have been cut!]"||l.shock_timeleft>0&&"["+l.shock_timeleft+"s]"||l.shock_timeleft===-1&&"[Permanent]"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Access and Door Control",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Scan",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:l.id_scanner?"power-off":"times",content:l.id_scanner?"Enabled":"Disabled",selected:l.id_scanner,disabled:!l.wires.id_scanner,onClick:function(){function m(){return i("idscan-toggle")}return m}()}),children:!l.wires.id_scanner&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Access",buttons:(0,e.createComponentVNode)(2,t.Button,{width:6.5,icon:l.emergency?"power-off":"times",content:l.emergency?"Enabled":"Disabled",selected:l.emergency,onClick:function(){function m(){return i("emergency-toggle")}return m}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Bolts",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,icon:l.locked?"lock":"unlock",content:l.locked?"Lowered":"Raised",selected:l.locked,disabled:!l.wires.bolts,onClick:function(){function m(){return i("bolt-toggle")}return m}()}),children:!l.wires.bolts&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Bolt Lights",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:l.lights?"power-off":"times",content:l.lights?"Enabled":"Disabled",selected:l.lights,disabled:!l.wires.lights,onClick:function(){function m(){return i("light-toggle")}return m}()}),children:!l.wires.lights&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Force Sensors",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:l.safe?"power-off":"times",content:l.safe?"Enabled":"Disabled",selected:l.safe,disabled:!l.wires.safe,onClick:function(){function m(){return i("safe-toggle")}return m}()}),children:!l.wires.safe&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Timing Safety",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:l.speed?"power-off":"times",content:l.speed?"Enabled":"Disabled",selected:l.speed,disabled:!l.wires.timing,onClick:function(){function m(){return i("speed-toggle")}return m}()}),children:!l.wires.timing&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Control",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:l.opened?"sign-out-alt":"sign-in-alt",content:l.opened?"Open":"Closed",selected:l.opened,disabled:l.locked||l.welded,onClick:function(){function m(){return i("open-close")}return m}()}),children:!!(l.locked||l.welded)&&(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)("[Door is "),l.locked?"bolted":"",l.locked&&l.welded?" and ":"",l.welded?"welded":"",(0,e.createTextVNode)("!]")],0)})]})})]})})}return V}()},72475:function(I,r,n){"use strict";r.__esModule=!0,r.AirAlarm=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=n(195),y=r.AirAlarm=function(){function s(m,c){var v=(0,a.useBackend)(c),b=v.act,g=v.data,h=g.locked;return(0,e.createComponentVNode)(2,o.Window,{width:570,height:h?310:755,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,d.InterfaceLockNoticeBox),(0,e.createComponentVNode)(2,k),!h&&(0,e.createFragment)([(0,e.createComponentVNode)(2,S),(0,e.createComponentVNode)(2,p)],4)]})})}return s}(),V=function(m){return m===0?"green":m===1?"orange":"red"},k=function(m,c){var v=(0,a.useBackend)(c),b=v.act,g=v.data,h=g.air,C=g.mode,N=g.atmos_alarm,x=g.locked,B=g.alarmActivated,L=g.rcon,w=g.target_temp,A;return h.danger.overall===0?N===0?A="Optimal":A="Caution: Atmos alert in area":h.danger.overall===1?A="Caution":A="DANGER: Internals Required",(0,e.createComponentVNode)(2,t.Section,{title:"Air Status",children:h?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure",children:(0,e.createComponentVNode)(2,t.Box,{color:V(h.danger.pressure),children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:h.pressure})," kPa",!x&&(0,e.createFragment)([(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,t.Button,{content:C===3?"Deactivate Panic Siphon":"Activate Panic Siphon",selected:C===3,icon:"exclamation-triangle",onClick:function(){function T(){return b("mode",{mode:C===3?1:3})}return T}()})],4)]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Oxygen",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:h.contents.oxygen/100,fractionDigits:"1",color:V(h.danger.oxygen)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nitrogen",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:h.contents.nitrogen/100,fractionDigits:"1",color:V(h.danger.nitrogen)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Carbon Dioxide",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:h.contents.co2/100,fractionDigits:"1",color:V(h.danger.co2)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Toxins",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:h.contents.plasma/100,fractionDigits:"1",color:V(h.danger.plasma)})}),h.contents.n2o>.1&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nitrous Oxide",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:h.contents.n2o/100,fractionDigits:"1",color:V(h.danger.n2o)})}),h.contents.other>.1&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Other",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:h.contents.other/100,fractionDigits:"1",color:V(h.danger.other)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,t.Box,{color:V(h.danger.temperature),children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:h.temperature})," K /"," ",(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:h.temperature_c})," C\xA0",(0,e.createComponentVNode)(2,t.Button,{icon:"thermometer-full",content:w+" C",onClick:function(){function T(){return b("temperature")}return T}()}),(0,e.createComponentVNode)(2,t.Button,{content:h.thermostat_state?"On":"Off",selected:h.thermostat_state,icon:"power-off",onClick:function(){function T(){return b("thermostat_state")}return T}()})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Local Status",children:(0,e.createComponentVNode)(2,t.Box,{color:V(h.danger.overall),children:[A,!x&&(0,e.createFragment)([(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,t.Button,{content:B?"Reset Alarm":"Activate Alarm",selected:B,onClick:function(){function T(){return b(B?"atmos_reset":"atmos_alarm")}return T}()})],4)]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Remote Control Settings",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Off",selected:L===1,onClick:function(){function T(){return b("set_rcon",{rcon:1})}return T}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Auto",selected:L===2,onClick:function(){function T(){return b("set_rcon",{rcon:2})}return T}()}),(0,e.createComponentVNode)(2,t.Button,{content:"On",selected:L===3,onClick:function(){function T(){return b("set_rcon",{rcon:3})}return T}()})]})]}):(0,e.createComponentVNode)(2,t.Box,{children:"Unable to acquire air sample!"})})},S=function(m,c){var v=(0,a.useLocalState)(c,"tabIndex",0),b=v[0],g=v[1];return(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:b===0,onClick:function(){function h(){return g(0)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"sign-out-alt"})," Vent Control"]},"Vents"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:b===1,onClick:function(){function h(){return g(1)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"sign-in-alt"})," Scrubber Control"]},"Scrubbers"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:b===2,onClick:function(){function h(){return g(2)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"cog"})," Mode"]},"Mode"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:b===3,onClick:function(){function h(){return g(3)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"tachometer-alt"})," Thresholds"]},"Thresholds")]})},p=function(m,c){var v=(0,a.useLocalState)(c,"tabIndex",0),b=v[0],g=v[1];switch(b){case 0:return(0,e.createComponentVNode)(2,i);case 1:return(0,e.createComponentVNode)(2,l);case 2:return(0,e.createComponentVNode)(2,f);case 3:return(0,e.createComponentVNode)(2,u);default:return"WE SHOULDN'T BE HERE!"}},i=function(m,c){var v=(0,a.useBackend)(c),b=v.act,g=v.data,h=g.vents;return h.map(function(C){return(0,e.createComponentVNode)(2,t.Section,{title:C.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:[(0,e.createComponentVNode)(2,t.Button,{content:C.power?"On":"Off",selected:C.power,icon:"power-off",onClick:function(){function N(){return b("command",{cmd:"power",val:C.power===1?0:1,id_tag:C.id_tag})}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:C.direction==="release"?"Blowing":"Siphoning",icon:C.direction==="release"?"sign-out-alt":"sign-in-alt",onClick:function(){function N(){return b("command",{cmd:"direction",val:C.direction==="release"?0:1,id_tag:C.id_tag})}return N}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure Checks",children:[(0,e.createComponentVNode)(2,t.Button,{content:"External",selected:C.checks===1,onClick:function(){function N(){return b("command",{cmd:"checks",val:1,id_tag:C.id_tag})}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Internal",selected:C.checks===2,onClick:function(){function N(){return b("command",{cmd:"checks",val:2,id_tag:C.id_tag})}return N}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"External Pressure Target",children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:C.external})," kPa\xA0",(0,e.createComponentVNode)(2,t.Button,{content:"Set",icon:"cog",onClick:function(){function N(){return b("command",{cmd:"set_external_pressure",id_tag:C.id_tag})}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Reset",icon:"redo-alt",onClick:function(){function N(){return b("command",{cmd:"set_external_pressure",val:101.325,id_tag:C.id_tag})}return N}()})]})]})},C.name)})},l=function(m,c){var v=(0,a.useBackend)(c),b=v.act,g=v.data,h=g.scrubbers;return h.map(function(C){return(0,e.createComponentVNode)(2,t.Section,{title:C.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:[(0,e.createComponentVNode)(2,t.Button,{content:C.power?"On":"Off",selected:C.power,icon:"power-off",onClick:function(){function N(){return b("command",{cmd:"power",val:C.power===1?0:1,id_tag:C.id_tag})}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:C.scrubbing?"Scrubbing":"Siphoning",icon:C.scrubbing?"filter":"sign-in-alt",onClick:function(){function N(){return b("command",{cmd:"scrubbing",val:C.scrubbing===0?1:0,id_tag:C.id_tag})}return N}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Range",children:(0,e.createComponentVNode)(2,t.Button,{content:C.widenet?"Extended":"Normal",selected:C.widenet,icon:"expand-arrows-alt",onClick:function(){function N(){return b("command",{cmd:"widenet",val:C.widenet===0?1:0,id_tag:C.id_tag})}return N}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Filtering",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Carbon Dioxide",selected:C.filter_co2,onClick:function(){function N(){return b("command",{cmd:"co2_scrub",val:C.filter_co2===0?1:0,id_tag:C.id_tag})}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Plasma",selected:C.filter_toxins,onClick:function(){function N(){return b("command",{cmd:"tox_scrub",val:C.filter_toxins===0?1:0,id_tag:C.id_tag})}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Nitrous Oxide",selected:C.filter_n2o,onClick:function(){function N(){return b("command",{cmd:"n2o_scrub",val:C.filter_n2o===0?1:0,id_tag:C.id_tag})}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Oxygen",selected:C.filter_o2,onClick:function(){function N(){return b("command",{cmd:"o2_scrub",val:C.filter_o2===0?1:0,id_tag:C.id_tag})}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Nitrogen",selected:C.filter_n2,onClick:function(){function N(){return b("command",{cmd:"n2_scrub",val:C.filter_n2===0?1:0,id_tag:C.id_tag})}return N}()})]})]})},C.name)})},f=function(m,c){var v=(0,a.useBackend)(c),b=v.act,g=v.data,h=g.modes,C=g.presets,N=g.emagged,x=g.mode,B=g.preset;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"System Mode",children:(0,e.createComponentVNode)(2,t.Table,{children:h.map(function(L){return(!L.emagonly||L.emagonly&&!!N)&&(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",width:1,children:(0,e.createComponentVNode)(2,t.Button,{content:L.name,icon:"cog",selected:L.id===x,onClick:function(){function w(){return b("mode",{mode:L.id})}return w}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:L.desc})]},L.name)})})}),(0,e.createComponentVNode)(2,t.Section,{title:"System Presets",children:[(0,e.createComponentVNode)(2,t.Box,{italic:!0,children:"After making a selection, the system will automatically cycle in order to remove contaminants."}),(0,e.createComponentVNode)(2,t.Table,{mt:1,children:C.map(function(L){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",width:1,children:(0,e.createComponentVNode)(2,t.Button,{content:L.name,icon:"cog",selected:L.id===B,onClick:function(){function w(){return b("preset",{preset:L.id})}return w}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:L.desc})]},L.name)})})]})],4)},u=function(m,c){var v=(0,a.useBackend)(c),b=v.act,g=v.data,h=g.thresholds;return(0,e.createComponentVNode)(2,t.Section,{title:"Alarm Thresholds",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"20%",children:"Value"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"red",width:"20%",children:"Danger Min"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"orange",width:"20%",children:"Warning Min"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"orange",width:"20%",children:"Warning Max"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"red",width:"20%",children:"Danger Max"})]}),h.map(function(C){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:C.name}),C.settings.map(function(N){return(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:N.selected===-1?"Off":N.selected,onClick:function(){function x(){return b("command",{cmd:"set_threshold",env:N.env,var:N.val})}return x}()})},N.val)})]},C.name)})]})})}},12333:function(I,r,n){"use strict";r.__esModule=!0,r.AirlockAccessController=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.AirlockAccessController=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.exterior_status,f=i.interior_status,u=i.processing,s,m;return l==="open"?s=(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Lock Exterior Door",icon:"exclamation-triangle",disabled:u,onClick:function(){function c(){return p("force_ext")}return c}()}):s=(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:u,onClick:function(){function c(){return p("cycle_ext_door")}return c}()}),f==="open"?m=(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Lock Interior Door",icon:"exclamation-triangle",disabled:u,color:f==="open"?"red":u?"yellow":null,onClick:function(){function c(){return p("force_int")}return c}()}):m=(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Cycle to Interior",icon:"arrow-circle-right",disabled:u,onClick:function(){function c(){return p("cycle_int_door")}return c}()}),(0,e.createComponentVNode)(2,o.Window,{width:330,height:200,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Information",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"External Door Status",children:l==="closed"?"Locked":"Open"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Internal Door Status",children:f==="closed"?"Locked":"Open"})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Actions",children:(0,e.createComponentVNode)(2,t.Box,{children:[s,m]})})]})})}return y}()},28736:function(I,r,n){"use strict";r.__esModule=!0,r.AirlockElectronics=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=n(49148),y=1,V=2,k=4,S=8,p=r.AirlockElectronics=function(){function f(u,s){return(0,e.createComponentVNode)(2,o.Window,{width:450,height:565,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,i),(0,e.createComponentVNode)(2,l)]})})})}return f}(),i=function(u,s){var m=(0,a.useBackend)(s),c=m.act,v=m.data,b=v.unrestricted_dir;return(0,e.createComponentVNode)(2,t.Section,{title:"Access Control",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,mb:1,children:"Unrestricted Access From:"}),(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-left",content:"East",selected:b&k?"selected":null,onClick:function(){function g(){return c("unrestricted_access",{unres_dir:k})}return g}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-up",content:"South",selected:b&V?"selected":null,onClick:function(){function g(){return c("unrestricted_access",{unres_dir:V})}return g}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-right",content:"West",selected:b&S?"selected":null,onClick:function(){function g(){return c("unrestricted_access",{unres_dir:S})}return g}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-down",content:"North",selected:b&y?"selected":null,onClick:function(){function g(){return c("unrestricted_access",{unres_dir:y})}return g}()})})]})]})})},l=function(u,s){var m=(0,a.useBackend)(s),c=m.act,v=m.data,b=v.selected_accesses,g=v.one_access,h=v.regions;return(0,e.createComponentVNode)(2,d.AccessList,{usedByRcd:1,rcdButtons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:g,content:"One",onClick:function(){function C(){return c("set_one_access",{access:"one"})}return C}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!g,content:"All",onClick:function(){function C(){return c("set_one_access",{access:"all"})}return C}()})],4),accesses:h,selectedList:b,accessMod:function(){function C(N){return c("set",{access:N})}return C}(),grantAll:function(){function C(){return c("grant_all")}return C}(),denyAll:function(){function C(){return c("clear_all")}return C}(),grantDep:function(){function C(N){return c("grant_region",{region:N})}return C}(),denyDep:function(){function C(N){return c("deny_region",{region:N})}return C}()})}},47365:function(I,r,n){"use strict";r.__esModule=!0,r.AlertModal=void 0;var e=n(89005),a=n(51057),t=n(72253),o=n(92986),d=n(36036),y=n(98595),V=-1,k=1,S=r.AlertModal=function(){function l(f,u){var s=(0,t.useBackend)(u),m=s.act,c=s.data,v=c.autofocus,b=c.buttons,g=b===void 0?[]:b,h=c.large_buttons,C=c.message,N=C===void 0?"":C,x=c.timeout,B=c.title,L=(0,t.useLocalState)(u,"selected",0),w=L[0],A=L[1],T=110+(N.length>30?Math.ceil(N.length/4):0)+(N.length&&h?5:0),E=325+(g.length>2?100:0),O=function(){function P(R){w===0&&R===V?A(g.length-1):w===g.length-1&&R===k?A(0):A(w+R)}return P}();return(0,e.createComponentVNode)(2,y.Window,{title:B,height:T,width:E,children:[!!x&&(0,e.createComponentVNode)(2,a.Loader,{value:x}),(0,e.createComponentVNode)(2,y.Window.Content,{onKeyDown:function(){function P(R){var F=window.event?R.which:R.keyCode;F===o.KEY_SPACE||F===o.KEY_ENTER?m("choose",{choice:g[w]}):F===o.KEY_ESCAPE?m("cancel"):F===o.KEY_LEFT?(R.preventDefault(),O(V)):(F===o.KEY_TAB||F===o.KEY_RIGHT)&&(R.preventDefault(),O(k))}return P}(),children:(0,e.createComponentVNode)(2,d.Section,{fill:!0,children:(0,e.createComponentVNode)(2,d.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,d.Stack.Item,{grow:!0,m:1,children:(0,e.createComponentVNode)(2,d.Box,{color:"label",overflow:"hidden",children:N})}),(0,e.createComponentVNode)(2,d.Stack.Item,{children:[!!v&&(0,e.createComponentVNode)(2,d.Autofocus),(0,e.createComponentVNode)(2,p,{selected:w})]})]})})})]})}return l}(),p=function(f,u){var s=(0,t.useBackend)(u),m=s.data,c=m.buttons,v=c===void 0?[]:c,b=m.large_buttons,g=m.swapped_buttons,h=f.selected;return(0,e.createComponentVNode)(2,d.Flex,{fill:!0,align:"center",direction:g?"row":"row-reverse",justify:"space-around",wrap:!0,children:v==null?void 0:v.map(function(C,N){return b&&v.length<3?(0,e.createComponentVNode)(2,d.Flex.Item,{grow:!0,children:(0,e.createComponentVNode)(2,i,{button:C,id:N.toString(),selected:h===N})},N):(0,e.createComponentVNode)(2,d.Flex.Item,{grow:b?1:0,children:(0,e.createComponentVNode)(2,i,{button:C,id:N.toString(),selected:h===N})},N)})})},i=function(f,u){var s=(0,t.useBackend)(u),m=s.act,c=s.data,v=c.large_buttons,b=f.button,g=f.selected,h=b.length>7?"100%":7;return(0,e.createComponentVNode)(2,d.Button,{mx:v?1:0,pt:v?.33:0,content:b,fluid:!!v,onClick:function(){function C(){return m("choose",{choice:b})}return C}(),selected:g,textAlign:"center",height:!!v&&2,width:!v&&h})}},71824:function(I,r,n){"use strict";r.__esModule=!0,r.AppearanceChanger=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.AppearanceChanger=function(){function V(k,S){var p=(0,a.useBackend)(S),i=p.act,l=p.data,f=l.change_race,u=l.species,s=l.specimen,m=l.change_gender,c=l.gender,v=l.has_gender,b=l.change_eye_color,g=l.change_skin_tone,h=l.change_skin_color,C=l.change_head_accessory_color,N=l.change_hair_color,x=l.change_secondary_hair_color,B=l.change_facial_hair_color,L=l.change_secondary_facial_hair_color,w=l.change_head_marking_color,A=l.change_body_marking_color,T=l.change_tail_marking_color,E=l.change_head_accessory,O=l.head_accessory_styles,P=l.head_accessory_style,R=l.change_hair,F=l.hair_styles,j=l.hair_style,W=l.change_hair_gradient,z=l.change_facial_hair,H=l.facial_hair_styles,$=l.facial_hair_style,G=l.change_head_markings,ne=l.head_marking_styles,Q=l.head_marking_style,he=l.change_body_markings,Ve=l.body_marking_styles,Ne=l.body_marking_style,Be=l.change_tail_markings,Le=l.tail_marking_styles,Ae=l.tail_marking_style,fe=l.change_body_accessory,Z=l.body_accessory_styles,J=l.body_accessory_style,te=l.change_alt_head,ee=l.alt_head_styles,le=l.alt_head_style,ye=!1;return(b||g||h||C||N||x||B||L||w||A||T)&&(ye=!0),(0,e.createComponentVNode)(2,o.Window,{width:800,height:450,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[!!f&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Species",children:u.map(function(me){return(0,e.createComponentVNode)(2,t.Button,{content:me.specimen,selected:me.specimen===s,onClick:function(){function Te(){return i("race",{race:me.specimen})}return Te}()},me.specimen)})}),!!m&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gender",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Male",selected:c==="male",onClick:function(){function me(){return i("gender",{gender:"male"})}return me}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Female",selected:c==="female",onClick:function(){function me(){return i("gender",{gender:"female"})}return me}()}),!v&&(0,e.createComponentVNode)(2,t.Button,{content:"Genderless",selected:c==="plural",onClick:function(){function me(){return i("gender",{gender:"plural"})}return me}()})]}),!!ye&&(0,e.createComponentVNode)(2,y),!!E&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Head accessory",children:O.map(function(me){return(0,e.createComponentVNode)(2,t.Button,{content:me.headaccessorystyle,selected:me.headaccessorystyle===P,onClick:function(){function Te(){return i("head_accessory",{head_accessory:me.headaccessorystyle})}return Te}()},me.headaccessorystyle)})}),!!R&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hair",children:F.map(function(me){return(0,e.createComponentVNode)(2,t.Button,{content:me.hairstyle,selected:me.hairstyle===j,onClick:function(){function Te(){return i("hair",{hair:me.hairstyle})}return Te}()},me.hairstyle)})}),!!W&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hair Gradient",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Change Style",onClick:function(){function me(){return i("hair_gradient")}return me}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Offset",onClick:function(){function me(){return i("hair_gradient_offset")}return me}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Color",onClick:function(){function me(){return i("hair_gradient_colour")}return me}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Alpha",onClick:function(){function me(){return i("hair_gradient_alpha")}return me}()})]}),!!z&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Facial hair",children:H.map(function(me){return(0,e.createComponentVNode)(2,t.Button,{content:me.facialhairstyle,selected:me.facialhairstyle===$,onClick:function(){function Te(){return i("facial_hair",{facial_hair:me.facialhairstyle})}return Te}()},me.facialhairstyle)})}),!!G&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Head markings",children:ne.map(function(me){return(0,e.createComponentVNode)(2,t.Button,{content:me.headmarkingstyle,selected:me.headmarkingstyle===Q,onClick:function(){function Te(){return i("head_marking",{head_marking:me.headmarkingstyle})}return Te}()},me.headmarkingstyle)})}),!!he&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Body markings",children:Ve.map(function(me){return(0,e.createComponentVNode)(2,t.Button,{content:me.bodymarkingstyle,selected:me.bodymarkingstyle===Ne,onClick:function(){function Te(){return i("body_marking",{body_marking:me.bodymarkingstyle})}return Te}()},me.bodymarkingstyle)})}),!!Be&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tail markings",children:Le.map(function(me){return(0,e.createComponentVNode)(2,t.Button,{content:me.tailmarkingstyle,selected:me.tailmarkingstyle===Ae,onClick:function(){function Te(){return i("tail_marking",{tail_marking:me.tailmarkingstyle})}return Te}()},me.tailmarkingstyle)})}),!!fe&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Body accessory",children:Z.map(function(me){return(0,e.createComponentVNode)(2,t.Button,{content:me.bodyaccessorystyle,selected:me.bodyaccessorystyle===J,onClick:function(){function Te(){return i("body_accessory",{body_accessory:me.bodyaccessorystyle})}return Te}()},me.bodyaccessorystyle)})}),!!te&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Alternate head",children:ee.map(function(me){return(0,e.createComponentVNode)(2,t.Button,{content:me.altheadstyle,selected:me.altheadstyle===le,onClick:function(){function Te(){return i("alt_head",{alt_head:me.altheadstyle})}return Te}()},me.altheadstyle)})})]})})})}return V}(),y=function(k,S){var p=(0,a.useBackend)(S),i=p.act,l=p.data,f=[{key:"change_eye_color",text:"Change eye color",action:"eye_color"},{key:"change_skin_tone",text:"Change skin tone",action:"skin_tone"},{key:"change_skin_color",text:"Change skin color",action:"skin_color"},{key:"change_head_accessory_color",text:"Change head accessory color",action:"head_accessory_color"},{key:"change_hair_color",text:"Change hair color",action:"hair_color"},{key:"change_secondary_hair_color",text:"Change secondary hair color",action:"secondary_hair_color"},{key:"change_facial_hair_color",text:"Change facial hair color",action:"facial_hair_color"},{key:"change_secondary_facial_hair_color",text:"Change secondary facial hair color",action:"secondary_facial_hair_color"},{key:"change_head_marking_color",text:"Change head marking color",action:"head_marking_color"},{key:"change_body_marking_color",text:"Change body marking color",action:"body_marking_color"},{key:"change_tail_marking_color",text:"Change tail marking color",action:"tail_marking_color"}];return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Colors",children:f.map(function(u){return!!l[u.key]&&(0,e.createComponentVNode)(2,t.Button,{content:u.text,onClick:function(){function s(){return i(u.action)}return s}()},u.key)})})}},72285:function(I,r,n){"use strict";r.__esModule=!0,r.AtmosAlertConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.AtmosAlertConsole=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.priority||[],f=i.minor||[];return(0,e.createComponentVNode)(2,o.Window,{width:350,height:300,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Alarms",children:(0,e.createVNode)(1,"ul",null,[l.length===0&&(0,e.createVNode)(1,"li","color-good","No Priority Alerts",16),l.map(function(u){return(0,e.createVNode)(1,"li",null,(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:u,color:"bad",onClick:function(){function s(){return p("clear",{zone:u})}return s}()}),2,null,u)}),f.length===0&&(0,e.createVNode)(1,"li","color-good","No Minor Alerts",16),f.map(function(u){return(0,e.createVNode)(1,"li",null,(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:u,color:"average",onClick:function(){function s(){return p("clear",{zone:u})}return s}()}),2,null,u)})],0)})})})}return y}()},65805:function(I,r,n){"use strict";r.__esModule=!0,r.AtmosControl=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(36352),d=n(98595),y=function(l){if(l===0)return(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Good"});if(l===1)return(0,e.createComponentVNode)(2,t.Box,{color:"orange",bold:!0,children:"Warning"});if(l===2)return(0,e.createComponentVNode)(2,t.Box,{color:"red",bold:!0,children:"DANGER"})},V=function(l){if(l===0)return"green";if(l===1)return"orange";if(l===2)return"red"},k=r.AtmosControl=function(){function i(l,f){var u=(0,a.useBackend)(f),s=u.act,m=u.data,c=(0,a.useLocalState)(f,"tabIndex",0),v=c[0],b=c[1],g=function(){function h(C){switch(C){case 0:return(0,e.createComponentVNode)(2,S);case 1:return(0,e.createComponentVNode)(2,p);default:return"WE SHOULDN'T BE HERE!"}}return h}();return(0,e.createComponentVNode)(2,d.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,d.Window.Content,{scrollable:v===0,children:(0,e.createComponentVNode)(2,t.Box,{fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:v===0,onClick:function(){function h(){return b(0)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"table"})," Data View"]},"DataView"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:v===1,onClick:function(){function h(){return b(1)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),g(v)]})})})}return i}(),S=function(l,f){var u=(0,a.useBackend)(f),s=u.act,m=u.data,c=m.alarms;return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Access"})]}),c.map(function(v){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,o.TableCell,{children:v.name}),(0,e.createComponentVNode)(2,o.TableCell,{children:y(v.danger)}),(0,e.createComponentVNode)(2,o.TableCell,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"cog",content:"Access",onClick:function(){function b(){return s("open_alarm",{aref:v.ref})}return b}()})})]},v.name)})]})})},p=function(l,f){var u=(0,a.useBackend)(f),s=u.act,m=u.data,c=m.alarms,v=m.stationLevelNum,b=m.stationLevelName,g=(0,a.useLocalState)(f,"zoom",1),h=g[0],C=g[1],N=(0,a.useLocalState)(f,"z_current",v[0]),x=N[0],B=N[1];return(0,e.createComponentVNode)(2,t.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,e.createComponentVNode)(2,t.NanoMap,{onZoom:function(){function L(w){return C(w)}return L}(),zLevels:v,zNames:b,z_current:x,setZCurrent:B,children:c.map(function(L){return(0,e.createComponentVNode)(2,t.NanoMap.Marker,{x:L.x,y:L.y,z:L.z,z_current:x,zoom:h,icon:"circle",tooltip:L.name,color:V(L.danger),onClick:function(){function w(){return s("open_alarm",{aref:L.ref})}return w}()},L.ref)})})})}},87816:function(I,r,n){"use strict";r.__esModule=!0,r.AtmosFilter=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.AtmosFilter=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.on,f=i.pressure,u=i.max_pressure,s=i.filter_type,m=i.filter_type_list;return(0,e.createComponentVNode)(2,o.Window,{width:380,height:140,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:l?"On":"Off",color:l?null:"red",selected:l,onClick:function(){function c(){return p("power")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:f===0,width:2.2,onClick:function(){function c(){return p("min_pressure")}return c}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:u,value:f,onDrag:function(){function c(v,b){return p("custom_pressure",{pressure:b})}return c}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:f===u,width:2.2,onClick:function(){function c(){return p("max_pressure")}return c}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Filter",children:m.map(function(c){return(0,e.createComponentVNode)(2,t.Button,{selected:c.gas_type===s,content:c.label,onClick:function(){function v(){return p("set_filter",{filter:c.gas_type})}return v}()},c.label)})})]})})})})}return y}()},52977:function(I,r,n){"use strict";r.__esModule=!0,r.AtmosMixer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.AtmosMixer=function(){function V(k,S){var p=(0,a.useBackend)(S),i=p.act,l=p.data,f=l.on,u=l.pressure,s=l.max_pressure,m=l.node1_concentration,c=l.node2_concentration;return(0,e.createComponentVNode)(2,o.Window,{width:330,height:165,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:f?"On":"Off",color:f?null:"red",selected:f,onClick:function(){function v(){return i("power")}return v}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:u===0,width:2.2,onClick:function(){function v(){return i("min_pressure")}return v}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:s,value:u,onDrag:function(){function v(b,g){return i("custom_pressure",{pressure:g})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:u===s,width:2.2,onClick:function(){function v(){return i("max_pressure")}return v}()})]}),(0,e.createComponentVNode)(2,y,{node_name:"Node 1",node_ref:m}),(0,e.createComponentVNode)(2,y,{node_name:"Node 2",node_ref:c})]})})})})}return V}(),y=function(k,S){var p=(0,a.useBackend)(S),i=p.act,l=p.data,f=k.node_name,u=k.node_ref;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:f,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",width:2.2,disabled:u===0,onClick:function(){function s(){return i("set_node",{node_name:f,concentration:(u-10)/100})}return s}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"%",width:6.1,lineHeight:1.5,stepPixelSize:10,minValue:0,maxValue:100,value:u,onChange:function(){function s(m,c){return i("set_node",{node_name:f,concentration:c/100})}return s}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",width:2.2,disabled:u===100,onClick:function(){function s(){return i("set_node",{node_name:f,concentration:(u+10)/100})}return s}()})]})}},11748:function(I,r,n){"use strict";r.__esModule=!0,r.AtmosPump=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.AtmosPump=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.on,f=i.rate,u=i.max_rate,s=i.gas_unit,m=i.step;return(0,e.createComponentVNode)(2,o.Window,{width:330,height:110,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:l?"On":"Off",color:l?null:"red",selected:l,onClick:function(){function c(){return p("power")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:f===0,width:2.2,onClick:function(){function c(){return p("min_rate")}return c}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:s,width:6.1,lineHeight:1.5,step:m,minValue:0,maxValue:u,value:f,onDrag:function(){function c(v,b){return p("custom_rate",{rate:b})}return c}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:f===u,width:2.2,onClick:function(){function c(){return p("max_rate")}return c}()})]})]})})})})}return y}()},76511:function(I,r,n){"use strict";r.__esModule=!0,r.AutoDoc=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=n(39473),y=r.AutoDoc=function(){function V(k,S){var p=(0,a.useBackend)(S),i=p.act,l=p.data,f=l.HasTray,u=l.TguiIcons,s=l.occupant,m=l.isHealing,c=l.fixtimer,v=l.healtimer,b=(0,a.useLocalState)(S,"ChoosePart","chest"),g=b[0],h=b[1];return(0,e.createComponentVNode)(2,o.Window,{theme:"ntOS95",resizable:!0,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Flex,{width:"100%",children:[(0,e.createComponentVNode)(2,d.FlexItem,{basis:"30%",children:[(0,e.createVNode)(1,"img",null,null,1,{height:"256px",width:"256px",src:"data:image/jpeg;base64,"+u.human,style:{position:"absolute","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}}),(0,e.createVNode)(1,"img",null,null,1,{height:"256px",width:"256px",src:"data:image/jpeg;base64,"+u[g],style:{position:"absolute","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}})]}),(0,e.createComponentVNode)(2,d.FlexItem,{basis:"70%",children:(0,e.createComponentVNode)(2,t.Section,{title:"Info",buttons:(0,e.createFragment)([Object.keys(u).map(function(C){return C!=="human"&&(0,e.createComponentVNode)(2,t.Button,{content:C,selected:C===g,onClick:function(){function N(){return h(C)}return N}(),z:!0},C)}),(0,e.createComponentVNode)(2,t.Button,{style:{"margin-left":"30px"},content:f?"Eject Tray":"Reject Tray",locked:m,onClick:function(){function C(){return i("ChangeTrayState")}return C}()})],0),children:(0,e.createComponentVNode)(2,t.Box,{children:[!!(s[g]&&s[g].extOrgan)&&s[g].extOrgan.map(function(C){return(0,e.createFragment)([(0,e.createVNode)(1,"b",null,C.name,0),(0,e.createVNode)(1,"br"),C.open?"opened":"",C.broken?"broken":"",!!C.broken&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Fix",style:{"margin-left":"30px"},locked:m,onClick:function(){function N(){return i("FixOrgan",{organ:C.name,type:"fracture"})}return N}()}),(0,e.createVNode)(1,"br")],4),C.internalBleeding?"bleeding":"",!!C.internalBleeding&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Fix",style:{"margin-left":"30px"},locked:m,onClick:function(){function N(){return i("FixOrgan",{organ:C.name,type:"bleeding"})}return N}()}),(0,e.createVNode)(1,"br")],4),(0,e.createTextVNode)("Internals:"),(0,e.createComponentVNode)(2,t.Button,{content:"Complete",style:{"margin-left":"10px"},locked:m,onClick:function(){function N(){return i("FixOrgan",{organ:C.name,type:"completeInternal"})}return N}()}),(0,e.createVNode)(1,"br"),C.dead?"dead":"",!!C.dead&&(0,e.createVNode)(1,"br"),C.germ_level?"Germ level is "+C.germ_level:"",!!C.germ_level&&(0,e.createVNode)(1,"br"),C.totalLoss?"Total damage is "+C.totalLoss:"",(0,e.createVNode)(1,"br")],0,C.name)}),!!(s[g]&&s[g].intOrgan)&&s[g].intOrgan.map(function(C){return(0,e.createFragment)([(0,e.createVNode)(1,"b",null,C.name,0),(0,e.createComponentVNode)(2,t.Button,{content:"Remove",style:{"margin-left":"1.5rem"},locked:m,onClick:function(){function N(){return i("FixOrgan",{organ:C.name,type:"remove"})}return N}()}),(0,e.createVNode)(1,"br"),C.dead?"dead":"",!!C.dead&&(0,e.createVNode)(1,"br"),C.germ_level?"Germ level is "+C.germ_level:"",!!C.germ_level&&(0,e.createVNode)(1,"br"),C.totalLoss?"Total damage is "+C.damage:"",!!C.totalLoss&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Heal",style:{"margin-left":"30px"},locked:m,onClick:function(){function N(){return i("FixOrgan",{organ:C.name,type:"damage"})}return N}()}),(0,e.createVNode)(1,"br")],4)],0,C.name)}),!!s.TotalBruteBurn&&(0,e.createFragment)([(0,e.createTextVNode)("Total external damage is "),s.TotalBruteBurn,(0,e.createComponentVNode)(2,t.Button,{style:{"margin-left":"30px"},content:"Start Healing",onClick:function(){function C(){return i("HealBruteBurn")}return C}()}),(0,e.createComponentVNode)(2,t.Button,{style:{"margin-left":"30px"},content:"Reattach externals",onClick:function(){function C(){return i("CompleteExternal")}return C}()})],0),(0,e.createVNode)(1,"br"),!!c&&(0,e.createVNode)(1,"b",null,[(0,e.createTextVNode)("Fixing organ: "),c],0),!!v&&(0,e.createVNode)(1,"b",null,[(0,e.createTextVNode)("Healing external damage: "),v],0)]})})})]})})})}return V}()},59179:function(I,r,n){"use strict";r.__esModule=!0,r.Autolathe=void 0;var e=n(89005),a=n(64795),t=n(88510),o=n(72253),d=n(36036),y=n(98595),V=n(25328),k=function(i,l,f,u){return i.requirements===null?!0:!(i.requirements.metal*u>l||i.requirements.glass*u>f)},S=r.Autolathe=function(){function p(i,l){var f=(0,o.useBackend)(l),u=f.act,s=f.data,m=s.total_amount,c=s.max_amount,v=s.metal_amount,b=s.glass_amount,g=s.busyname,h=s.busyamt,C=s.showhacked,N=s.buildQueue,x=s.buildQueueLen,B=s.recipes,L=s.categories,w=(0,o.useSharedState)(l,"category",0),A=w[0],T=w[1];A===0&&(A="Tools");var E=v.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),O=b.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),P=m.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),R=(0,o.useSharedState)(l,"search_text",""),F=R[0],j=R[1],W=(0,V.createSearch)(F,function(G){return G.name}),z="";x>0&&(z=N.map(function(G,ne){return(0,e.createComponentVNode)(2,d.Box,{children:(0,e.createComponentVNode)(2,d.Button,{fluid:!0,icon:"times",color:"transparent",content:N[ne][0],onClick:function(){function Q(){return u("remove_from_queue",{remove_from_queue:N.indexOf(G)+1})}return Q}()},G)},ne)}));var H=(0,a.flow)([(0,t.filter)(function(G){return(G.category.indexOf(A)>-1||F)&&(s.showhacked||!G.hacked)}),F&&(0,t.filter)(W),(0,t.sortBy)(function(G){return G.name.toLowerCase()})])(B),$="Build";return F?$="Results for: '"+F+"':":A&&($="Build ("+A+")"),(0,e.createComponentVNode)(2,y.Window,{width:750,height:525,children:(0,e.createComponentVNode)(2,y.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,d.Stack,{fill:!0,horizontal:!0,children:[(0,e.createComponentVNode)(2,d.Stack.Item,{width:"70%",children:(0,e.createComponentVNode)(2,d.Section,{fill:!0,scrollable:!0,title:$,buttons:(0,e.createComponentVNode)(2,d.Dropdown,{width:"150px",options:L,selected:A,onSelected:function(){function G(ne){return T(ne)}return G}()}),children:[(0,e.createComponentVNode)(2,d.Input,{fluid:!0,placeholder:"Search for...",onInput:function(){function G(ne,Q){return j(Q)}return G}(),mb:1}),H.map(function(G){return(0,e.createComponentVNode)(2,d.Stack.Item,{grow:!0,children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+G.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),(0,e.createComponentVNode)(2,d.Button,{mr:1,icon:"hammer",selected:s.busyname===G.name&&s.busyamt===1,disabled:!k(G,s.metal_amount,s.glass_amount,1),onClick:function(){function ne(){return u("make",{make:G.uid,multiplier:1})}return ne}(),children:(0,V.toTitleCase)(G.name)}),G.max_multiplier>=10&&(0,e.createComponentVNode)(2,d.Button,{mr:1,icon:"hammer",selected:s.busyname===G.name&&s.busyamt===10,disabled:!k(G,s.metal_amount,s.glass_amount,10),onClick:function(){function ne(){return u("make",{make:G.uid,multiplier:10})}return ne}(),children:"10x"}),G.max_multiplier>=25&&(0,e.createComponentVNode)(2,d.Button,{mr:1,icon:"hammer",selected:s.busyname===G.name&&s.busyamt===25,disabled:!k(G,s.metal_amount,s.glass_amount,25),onClick:function(){function ne(){return u("make",{make:G.uid,multiplier:25})}return ne}(),children:"25x"}),G.max_multiplier>25&&(0,e.createComponentVNode)(2,d.Button,{mr:1,icon:"hammer",selected:s.busyname===G.name&&s.busyamt===G.max_multiplier,disabled:!k(G,s.metal_amount,s.glass_amount,G.max_multiplier),onClick:function(){function ne(){return u("make",{make:G.uid,multiplier:G.max_multiplier})}return ne}(),children:[G.max_multiplier,"x"]}),G.requirements&&Object.keys(G.requirements).map(function(ne){return(0,V.toTitleCase)(ne)+": "+G.requirements[ne]}).join(", ")||(0,e.createComponentVNode)(2,d.Box,{children:"No resources required."})]},G.ref)})]})}),(0,e.createComponentVNode)(2,d.Stack.Item,{width:"30%",children:[(0,e.createComponentVNode)(2,d.Section,{title:"Materials",children:(0,e.createComponentVNode)(2,d.LabeledList,{children:[(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Metal",children:E}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Glass",children:O}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Total",children:P}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Storage",children:[s.fill_percent,"% Full"]})]})}),(0,e.createComponentVNode)(2,d.Section,{title:"Building",children:(0,e.createComponentVNode)(2,d.Box,{color:g?"green":"",children:g||"Nothing"})}),(0,e.createComponentVNode)(2,d.Section,{title:"Build Queue",height:23.7,children:[z,(0,e.createComponentVNode)(2,d.Button,{mt:.5,fluid:!0,icon:"times",content:"Clear All",color:"red",disabled:!s.buildQueueLen,onClick:function(){function G(){return u("clear_queue")}return G}()})]})]})]})})})}return p}()},64273:function(I,r,n){"use strict";r.__esModule=!0,r.Biogenerator=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=n(62411),y=r.Biogenerator=function(){function p(i,l){var f=(0,a.useBackend)(l),u=f.data,s=f.config,m=u.container,c=u.processing,v=s.title;return(0,e.createComponentVNode)(2,o.Window,{width:390,height:595,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,d.Operating,{operating:c,name:v}),(0,e.createComponentVNode)(2,V),(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,S)]})})})}return p}(),V=function(i,l){var f=(0,a.useBackend)(l),u=f.act,s=f.data,m=s.biomass,c=s.container,v=s.container_curr_reagents,b=s.container_max_reagents;return(0,e.createComponentVNode)(2,t.Section,{title:"Storage",children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{mr:"20px",color:"silver",children:"Biomass:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{mr:"5px",children:m}),(0,e.createComponentVNode)(2,t.Icon,{name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,e.createComponentVNode)(2,t.Stack,{height:"21px",mt:"8px",align:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{mr:"10px",color:"silver",children:"Container:"}),c?(0,e.createComponentVNode)(2,t.ProgressBar,{value:v,maxValue:b,children:(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",children:v+" / "+b+" units"})}):(0,e.createComponentVNode)(2,t.Stack.Item,{children:"None"})]})]})},k=function(i,l){var f=(0,a.useBackend)(l),u=f.act,s=f.data,m=s.has_plants,c=s.container;return(0,e.createComponentVNode)(2,t.Section,{title:"Controls",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"power-off",disabled:!m,tooltip:m?"":"There are no plants in the biogenerator.",tooltipPosition:"top-start",content:"Activate",onClick:function(){function v(){return u("activate")}return v}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"40%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"flask",disabled:!c,tooltip:c?"":"The biogenerator does not have a container.",tooltipPosition:"top",content:"Detach Container",onClick:function(){function v(){return u("detach_container")}return v}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:!m,tooltip:m?"":"There are no stored plants to eject.",tooltipPosition:"top-end",content:"Eject Plants",onClick:function(){function v(){return u("eject_plants")}return v}()})})]})})},S=function(i,l){var f=(0,a.useBackend)(l),u=f.act,s=f.data,m=s.biomass,c=s.product_list,v=s.container,b=(0,a.useSharedState)(l,"vendAmount",1),g=b[0],h=b[1],C=Object.entries(c).map(function(N,x){var B=Object.entries(N[1]).map(function(L){return L[1]});return(0,e.createComponentVNode)(2,t.Collapsible,{title:N[0],open:!0,children:B.map(function(L){return(0,e.createComponentVNode)(2,t.Stack,{py:"2px",className:"candystripe",align:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",ml:"2px",children:L.name}),(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"right",width:"20%",children:[L.cost*g,(0,e.createComponentVNode)(2,t.Icon,{ml:"5px",name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"right",width:"40%",children:L.needs_container&&!v?(0,e.createComponentVNode)(2,t.Button,{content:"No container",disabled:!0,icon:"flask",tooltip:"\u0412\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u043B\u044E\u0431\u043E\u0439 \u043A\u043E\u043D\u0442\u0435\u0439\u043D\u0435\u0440 \u0434\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u044D\u0442\u043E\u0439 \u043E\u043F\u0446\u0438\u0438"}):(0,e.createComponentVNode)(2,t.Button,{content:"Vend",disabled:m0?Math.floor(A/u):0,P=f?"@?%%!\u2116@"+u:u,R=A>=u,F=s-s%5+(s%5>0?5:0);return(0,e.createComponentVNode)(2,t.Section,{title:"\u0418\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u0438\u0435 \u0420\u0430\u0437\u043B\u043E\u043C\u0430",children:[(0,e.createComponentVNode)(2,t.Box,{color:"silver",bold:!0,children:B}),(0,e.createComponentVNode)(2,t.ProgressBar,{color:E===0?"bad":E<100?"average":"good",value:w,maxValue:L,mt:1,mb:2,children:[E<=100?E:100," %"]}),(0,e.createComponentVNode)(2,t.Box,{children:["\u0414\u0430\u043D\u043D\u044B\u0435 \u0434\u043B\u044F \u0437\u043E\u043D\u0434\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F: ",(0,e.createComponentVNode)(2,t.Box,{color:A?R?"good":"average":"bad",as:"span",children:Math.floor(A)}),(0,e.createComponentVNode)(2,t.Button,{icon:"atom",tooltip:"\u0414\u043B\u044F \u0433\u0435\u043D\u0435\u0440\u0430\u0446\u0438\u0438 \u043E\u0434\u043D\u043E\u0433\u043E \u0437\u043E\u043D\u0434\u0438\u0440\u0443\u044E\u0449\u0435\u0433\u043E \u0438\u043C\u043F\u0443\u043B\u044C\u0441\u0430 \u043D\u0443\u0436\u043D\u043E \u0441\u043E\u0431\u0440\u0430\u0442\u044C "+P+" \u0434\u0430\u043D\u043D\u044B\u0445.",content:s>0?"\u041F\u043E\u0434\u0433\u043E\u0442\u043E\u0432\u043A\u0430 "+F+" \u0441\u0435\u043A\u0443\u043D\u0434":"\u0417\u043E\u043D\u0434\u0438\u0440\u043E\u0432\u0430\u0442\u044C ("+O+")",disabled:!R||s>0,onClick:function(){function j(){return i("probe",{rift_id:x})}return j}(),mx:2}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",content:T?"\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 \u043F\u043E\u043B\u0443\u0447\u0435\u043D":"\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 \u0438\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u0438\u0439",disabled:T||E<100,onClick:function(){function j(){return i("reward",{rift_id:x})}return j}(),mt:1.4})]})]})}return C}(),g=function(){function C(N){var x=N.servName,B=N.servData;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:x,children:B.length?B.map(function(L,w){return(0,e.createComponentVNode)(2,t.Box,{children:[L.riftName," \u2014 ",Math.floor(L.probePoints)," ","\u0434\u0430\u043D\u043D\u044B\u0445."]},w)}):(0,e.createComponentVNode)(2,t.Box,{children:"\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445"})})}return C}(),h=function(){function C(N){var x=N.scannerId,B=N.scannerName,L=N.scanStatus,w=N.canSwitch,A=N.switching,T=d[L],E=function(){function P(){if(T==="OFF")return[" ","silver"];if(T==="NO_RIFTS")return["\u041D\u0435\u0442 \u0440\u0430\u0437\u043B\u043E\u043C\u043E\u0432","silver"];if(T==="SOME_RIFTS")return["\u0421\u043A\u0430\u043D\u0438\u0440\u0443\u0435\u0442","good"];if(T==="DANGER")return["\u041E\u043F\u0430\u0441\u043D\u043E\u0441\u0442\u044C! \u0412\u044B\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u0441\u043A\u0430\u043D\u0435\u0440!","bad"]}return P}(),O=E();return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:B,py:0,children:[A?(0,e.createComponentVNode)(2,t.Icon,{name:"circle-notch",color:"silver",spin:!0,ml:1.85,mr:1.79,my:.84}):w?(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",color:T==="OFF"?"bad":"good",onClick:function(){function P(){return i("toggle_scanner",{scanner_id:x})}return P}(),ml:1,mr:1}):(0,e.createComponentVNode)(2,t.Icon,{name:"power-off",color:T==="OFF"?"bad":"good",ml:1.85,mr:1.79,my:.84}),T!=="OFF"&&(0,e.createComponentVNode)(2,t.Box,{as:"span",color:O[1],children:O[0]})]})}return C}();return(0,e.createComponentVNode)(2,o.Window,{width:570,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[m&&m.map(function(C){return b(C)}),(0,e.createComponentVNode)(2,t.Section,{title:"\u0421\u043A\u0430\u043D\u0435\u0440\u044B \u0432 \u0441\u0435\u0442\u0438",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:v&&v.map(function(C){return h(C)})})}),(0,e.createComponentVNode)(2,t.Section,{title:"\u0421\u0435\u0440\u0432\u0435\u0440\u044B \u0432 \u0441\u0435\u0442\u0438",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:c&&c.map(function(C){return g(C)})})})]})})}return V}()},27629:function(I,r,n){"use strict";r.__esModule=!0,r.BluespaceTap=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=n(49968),y=r.BluespaceTap=function(){function V(k,S){var p=(0,a.useBackend)(S),i=p.act,l=p.data,f=l.product||[],u=l.desiredLevel,s=l.inputLevel,m=l.points,c=l.totalPoints,v=l.powerUse,b=l.availablePower,g=l.maxLevel,h=l.emagged,C=l.safeLevels,N=l.nextLevelPower,x=u>s&&"bad"||"good";return(0,e.createComponentVNode)(2,o.Window,{width:650,height:450,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[!!h&&(0,e.createComponentVNode)(2,t.NoticeBox,{danger:1,children:"Safety Protocols disabled"}),s>C&&(0,e.createComponentVNode)(2,t.NoticeBox,{danger:1,children:"High Power, Instability likely"}),(0,e.createComponentVNode)(2,t.Collapsible,{title:"Input Management",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Input",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Input Level",children:s}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Desired Level",children:(0,e.createComponentVNode)(2,t.Stack,{inline:!0,width:"100%",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",disabled:u===0,tooltip:"Set to 0",onClick:function(){function B(){return i("set",{set_level:0})}return B}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"step-backward",tooltip:"Decrease to actual input level",disabled:u===0,onClick:function(){function B(){return i("set",{set_level:s})}return B}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:u===0,tooltip:"Decrease one step",onClick:function(){function B(){return i("decrease")}return B}()})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1,mx:1,children:(0,e.createComponentVNode)(2,t.Slider,{value:u,fillValue:s,minValue:0,color:x,maxValue:g,stepPixelSize:20,step:1,onChange:function(){function B(L,w){return i("set",{set_level:w})}return B}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:u===g,tooltip:"Increase one step",tooltipPosition:"left",onClick:function(){function B(){return i("increase")}return B}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:u===g,tooltip:"Set to max",tooltipPosition:"left",onClick:function(){function B(){return i("set",{set_level:g})}return B}()})]})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Power Use",children:(0,d.formatPower)(v)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power for next level",children:(0,d.formatPower)(N)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Surplus Power",children:(0,d.formatPower)(b)})]})})}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Output",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Available Points",children:m}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Points",children:c})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{align:"end",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:f.map(function(B){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:B.name,children:(0,e.createComponentVNode)(2,t.Button,{disabled:B.price>=m,onClick:function(){function L(){return i("vend",{target:B.key})}return L}(),content:B.price})},B.key)})})})})]})})]})})})}return V}()},33758:function(I,r,n){"use strict";r.__esModule=!0,r.BodyScanner=void 0;var e=n(89005),a=n(44879),t=n(25328),o=n(72253),d=n(36036),y=n(98595),V=[["good","Alive"],["average","Critical"],["bad","DEAD"]],k=[["hasBorer","bad","Large growth detected in frontal lobe, possibly cancerous. Surgical removal is recommended."],["hasVirus","bad","Viral pathogen detected in blood stream."],["blind","average","Cataracts detected."],["colourblind","average","Photoreceptor abnormalities detected."],["nearsighted","average","Retinal misalignment detected."]],S=[["Respiratory","oxyLoss"],["Brain","brainLoss"],["Toxin","toxLoss"],["Radioactive","radLoss"],["Brute","bruteLoss"],["Genetic","cloneLoss"],["Burn","fireLoss"],["Paralysis","paralysis"]],p={average:[.25,.5],bad:[.5,1/0]},i=function(x,B){for(var L=[],w=0;w0?x.filter(function(B){return!!B}).reduce(function(B,L){return(0,e.createFragment)([B,(0,e.createComponentVNode)(2,d.Box,{children:L},L)],0)},null):null},f=function(x){if(x>100){if(x<300)return"mild infection";if(x<400)return"mild infection+";if(x<500)return"mild infection++";if(x<700)return"acute infection";if(x<800)return"acute infection+";if(x<900)return"acute infection++";if(x>=900)return"septic"}return""},u=r.BodyScanner=function(){function N(x,B){var L=(0,o.useBackend)(B),w=L.data,A=w.occupied,T=w.occupant,E=T===void 0?{}:T,O=A?(0,e.createComponentVNode)(2,s,{occupant:E}):(0,e.createComponentVNode)(2,C);return(0,e.createComponentVNode)(2,y.Window,{width:700,height:600,title:"Body Scanner",children:(0,e.createComponentVNode)(2,y.Window.Content,{scrollable:!0,children:O})})}return N}(),s=function(x){var B=x.occupant;return(0,e.createComponentVNode)(2,d.Box,{children:[(0,e.createComponentVNode)(2,m,{occupant:B}),(0,e.createComponentVNode)(2,c,{occupant:B}),(0,e.createComponentVNode)(2,v,{occupant:B}),(0,e.createComponentVNode)(2,g,{organs:B.extOrgan}),(0,e.createComponentVNode)(2,h,{organs:B.intOrgan})]})},m=function(x,B){var L=(0,o.useBackend)(B),w=L.act,A=L.data,T=A.occupant;return(0,e.createComponentVNode)(2,d.Section,{title:"Occupant",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,d.Button,{icon:"print",onClick:function(){function E(){return w("print_p")}return E}(),children:"\u0420\u0430\u0441\u043F\u0435\u0447\u0430\u0442\u0430\u0442\u044C \u043E\u0442\u0447\u0435\u0442"}),(0,e.createComponentVNode)(2,d.Button,{icon:"print",onClick:function(){function E(){return w("insurance")}return E}(),children:"\u0421\u043F\u0438\u0441\u0430\u0442\u044C \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u043A\u0443"}),(0,e.createComponentVNode)(2,d.Button,{icon:"user-slash",onClick:function(){function E(){return w("eject_id")}return E}(),children:"\u0418\u0437\u0432\u043B\u0435\u0447\u044C \u043A\u0430\u0440\u0442\u0443"}),(0,e.createComponentVNode)(2,d.Button,{icon:"user-slash",onClick:function(){function E(){return w("ejectify")}return E}(),children:"\u0418\u0437\u0432\u043B\u0435\u0447\u044C \u043F\u0430\u0446\u0438\u0435\u043D\u0442\u0430"})],4),children:(0,e.createComponentVNode)(2,d.LabeledList,{children:[(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Name",children:T.name}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,d.ProgressBar,{min:"0",max:T.maxHealth,value:T.health/T.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Status",color:V[T.stat][0],children:V[T.stat][1]}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Temperature",children:[(0,e.createComponentVNode)(2,d.AnimatedNumber,{value:(0,a.round)(T.bodyTempC)}),"\xB0C,\xA0",(0,e.createComponentVNode)(2,d.AnimatedNumber,{value:(0,a.round)(T.bodyTempF)}),"\xB0F"]}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Implants",children:T.implant_len?(0,e.createComponentVNode)(2,d.Box,{children:T.implant.map(function(E){return E.name}).join(", ")}):(0,e.createComponentVNode)(2,d.Box,{color:"label",children:"None"})})]})})},c=function(x){var B=x.occupant;return B.hasBorer||B.blind||B.colourblind||B.nearsighted||B.hasVirus?(0,e.createComponentVNode)(2,d.Section,{title:"Abnormalities",children:k.map(function(L,w){if(B[L[0]])return(0,e.createComponentVNode)(2,d.Box,{color:L[1],bold:L[1]==="bad",children:L[2]},L[2])})}):(0,e.createComponentVNode)(2,d.Section,{title:"Abnormalities",children:(0,e.createComponentVNode)(2,d.Box,{color:"label",children:"No abnormalities found."})})},v=function(x){var B=x.occupant;return(0,e.createComponentVNode)(2,d.Section,{title:"Damage",children:(0,e.createComponentVNode)(2,d.Table,{children:i(S,function(L,w,A){return(0,e.createFragment)([(0,e.createComponentVNode)(2,d.Table.Row,{color:"label",children:[(0,e.createComponentVNode)(2,d.Table.Cell,{children:[L[0],":"]}),(0,e.createComponentVNode)(2,d.Table.Cell,{children:!!w&&w[0]+":"})]}),(0,e.createComponentVNode)(2,d.Table.Row,{children:[(0,e.createComponentVNode)(2,d.Table.Cell,{children:(0,e.createComponentVNode)(2,b,{value:B[L[1]],marginBottom:A100)&&"average"||!!B.status.robotic&&"label",width:"33%",children:(0,t.capitalize)(B.name)}),(0,e.createComponentVNode)(2,d.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,d.ProgressBar,{m:-.5,min:"0",max:B.maxHealth,mt:L>0&&"0.5rem",value:B.totalLoss/B.maxHealth,ranges:p,children:(0,e.createComponentVNode)(2,d.Stack,{children:[(0,e.createComponentVNode)(2,d.Tooltip,{content:"Total damage",children:(0,e.createComponentVNode)(2,d.Stack.Item,{children:[(0,e.createComponentVNode)(2,d.Icon,{name:"heartbeat",mr:.5}),(0,a.round)(B.totalLoss)]})}),!!B.bruteLoss&&(0,e.createComponentVNode)(2,d.Tooltip,{content:"Brute damage",children:(0,e.createComponentVNode)(2,d.Stack.Item,{grow:!0,children:[(0,e.createComponentVNode)(2,d.Icon,{name:"bone",mr:.5}),(0,a.round)(B.bruteLoss)]})}),!!B.fireLoss&&(0,e.createComponentVNode)(2,d.Tooltip,{content:"Burn damage",children:(0,e.createComponentVNode)(2,d.Stack.Item,{children:[(0,e.createComponentVNode)(2,d.Icon,{name:"fire",mr:.5}),(0,a.round)(B.fireLoss)]})})]})})}),(0,e.createComponentVNode)(2,d.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:L>0&&"calc(0.5rem + 2px)",children:[(0,e.createComponentVNode)(2,d.Box,{color:"average",inline:!0,children:l([!!B.internalBleeding&&"Internal bleeding",!!B.burnWound&&"Critical tissue burns",!!B.lungRuptured&&"Ruptured lung",!!B.status.broken&&B.status.broken,f(B.germ_level),!!B.open&&"Open incision"])}),(0,e.createComponentVNode)(2,d.Box,{inline:!0,children:[l([!!B.status.splinted&&(0,e.createComponentVNode)(2,d.Box,{color:"good",children:"Splinted"}),!!B.status.robotic&&(0,e.createComponentVNode)(2,d.Box,{color:"label",children:"Robotic"}),!!B.status.dead&&(0,e.createComponentVNode)(2,d.Box,{color:"bad",bold:!0,children:"DEAD"})]),l(B.shrapnel.map(function(w){return w.known?w.name:"Unknown object"}))]})]})]},L)})]})})},h=function(x){return x.organs.length===0?(0,e.createComponentVNode)(2,d.Section,{title:"Internal Organs",children:(0,e.createComponentVNode)(2,d.Box,{color:"label",children:"N/A"})}):(0,e.createComponentVNode)(2,d.Section,{title:"Internal Organs",children:(0,e.createComponentVNode)(2,d.Table,{children:[(0,e.createComponentVNode)(2,d.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,d.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,d.Table.Cell,{textAlign:"center",children:"Damage"}),(0,e.createComponentVNode)(2,d.Table.Cell,{textAlign:"right",children:"Injuries"})]}),x.organs.map(function(B,L){return(0,e.createComponentVNode)(2,d.Table.Row,{children:[(0,e.createComponentVNode)(2,d.Table.Cell,{color:!!B.dead&&"bad"||B.germ_level>100&&"average"||B.robotic>0&&"label",width:"33%",children:(0,t.capitalize)(B.name)}),(0,e.createComponentVNode)(2,d.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,d.ProgressBar,{min:"0",max:B.maxHealth,value:B.damage/B.maxHealth,mt:L>0&&"0.5rem",ranges:p,children:(0,a.round)(B.damage)})}),(0,e.createComponentVNode)(2,d.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:L>0&&"calc(0.5rem + 2px)",children:[(0,e.createComponentVNode)(2,d.Box,{color:"average",inline:!0,children:l([f(B.germ_level)])}),(0,e.createComponentVNode)(2,d.Box,{inline:!0,children:l([B.robotic===1&&(0,e.createComponentVNode)(2,d.Box,{color:"label",children:"Robotic"}),B.robotic===2&&(0,e.createComponentVNode)(2,d.Box,{color:"label",children:"Assisted"}),!!B.dead&&(0,e.createComponentVNode)(2,d.Box,{color:"bad",bold:!0,children:"DEAD"})])})]})]},L)})]})})},C=function(){return(0,e.createComponentVNode)(2,d.Section,{fill:!0,children:(0,e.createComponentVNode)(2,d.Stack,{fill:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,d.Stack.Item,{grow:!0,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,d.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No occupant detected."]})})})}},42570:function(I,r,n){"use strict";r.__esModule=!0,r.BorgPanel=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.BorgPanel=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.borg||{},f=i.cell||{},u=f.charge/f.maxcharge,s=i.channels||[],m=i.modules||[],c=i.upgrades||[],v=i.ais||[],b=i.laws||[];return(0,e.createComponentVNode)(2,o.Window,{title:"Borg Panel",width:700,height:700,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:l.name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:"Rename",onClick:function(){function g(){return p("rename")}return g}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:[(0,e.createComponentVNode)(2,t.Button,{icon:l.emagged?"check-square-o":"square-o",content:"Emagged",selected:l.emagged,onClick:function(){function g(){return p("toggle_emagged")}return g}()}),(0,e.createComponentVNode)(2,t.Button,{icon:l.lockdown?"check-square-o":"square-o",content:"Locked Down",selected:l.lockdown,onClick:function(){function g(){return p("toggle_lockdown")}return g}()}),(0,e.createComponentVNode)(2,t.Button,{icon:l.scrambledcodes?"check-square-o":"square-o",content:"Scrambled Codes",selected:l.scrambledcodes,onClick:function(){function g(){return p("toggle_scrambledcodes")}return g}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Reset Module",onClick:function(){function g(){return p("reset_module")}return g}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Charge",children:[f.missing?(0,e.createVNode)(1,"span","color-bad","No cell installed",16):(0,e.createComponentVNode)(2,t.ProgressBar,{value:u,children:f.charge+" / "+f.maxcharge}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:"Set",onClick:function(){function g(){return p("set_charge")}return g}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Change",onClick:function(){function g(){return p("change_cell")}return g}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"trash",content:"Remove",color:"bad",onClick:function(){function g(){return p("remove_cell")}return g}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Radio Channels",children:s.map(function(g){return(0,e.createComponentVNode)(2,t.Button,{icon:g.installed?"check-square-o":"square-o",content:g.name,selected:g.installed,onClick:function(){function h(){return p("toggle_radio",{channel:g.name})}return h}()},g.name)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Model",children:m.map(function(g){return(0,e.createComponentVNode)(2,t.Button,{icon:l.active_module===g.name?"check-square-o":"square-o",content:g.name+" module",selected:l.active_module===g.name,onClick:function(){function h(){return p("setmodule",{module:g.name})}return h}()},g.type)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Upgrades",children:c.map(function(g){return(0,e.createComponentVNode)(2,t.Button,{icon:g.installed?"check-square-o":"square-o",content:g.name,selected:g.installed,onClick:function(){function h(){return p("toggle_upgrade",{upgrade:g.type})}return h}()},g.type)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Master AI",children:v.map(function(g){return(0,e.createComponentVNode)(2,t.Button,{icon:g.connected?"check-square-o":"square-o",content:g.name,selected:g.connected,onClick:function(){function h(){return p("slavetoai",{slavetoai:g.ref})}return h}()},g.ref)})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Laws",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Law Manager",selected:l.lawmanager,onClick:function(){function g(){return p("lawmanager")}return g}()}),(0,e.createComponentVNode)(2,t.Button,{icon:l.lawupdate?"check-square-o":"square-o",content:"Lawsync",selected:l.lawupdate,onClick:function(){function g(){return p("toggle_lawupdate")}return g}()})],4),children:b.map(function(g){return(0,e.createComponentVNode)(2,t.Box,{children:g},g)})})]})})}return y}()},20464:function(I,r,n){"use strict";r.__esModule=!0,r.BotClean=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.BotClean=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.locked,f=i.noaccess,u=i.maintpanel,s=i.on,m=i.autopatrol,c=i.canhack,v=i.emagged,b=i.remote_disabled,g=i.painame,h=i.cleanblood;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.NoticeBox,{children:["\u041F\u0440\u043E\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u0432\u043E\u0435\u0439 ID-\u043A\u0430\u0440\u0442\u043E\u0439, \u0447\u0442\u043E\u0431\u044B",l?"\u0440\u0430\u0437\u0431\u043B\u043E\u043A\u0438\u0440\u043E\u0432\u0430\u0442\u044C":"\u0437\u0430\u0431\u043B\u043E\u043A\u0438\u0440\u043E\u0432\u0430\u0442\u044C"," \u044D\u0442\u043E\u0442 \u0438\u043D\u0442\u0435\u0440\u0444\u0435\u0439\u0441."]}),(0,e.createComponentVNode)(2,t.Section,{title:"\u041E\u0441\u043D\u043E\u0432\u043D\u044B\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0421\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435",children:(0,e.createComponentVNode)(2,t.Button,{icon:s?"power-off":"times",content:s?"\u0412\u043A\u043B\u044E\u0447\u0451\u043D":"\u0412\u044B\u043A\u043B\u044E\u0447\u0435\u043D",selected:s,disabled:f,onClick:function(){function C(){return p("power")}return C}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0420\u0435\u0436\u0438\u043C \u043F\u0430\u0442\u0440\u0443\u043B\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:m,content:"\u0410\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u043F\u0430\u0442\u0440\u0443\u043B\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435",disabled:f,onClick:function(){function C(){return p("autopatrol")}return C}()})}),!!u&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u0430\u043D\u0435\u043B\u044C \u0442\u0435\u0445\u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u044F",children:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"\u041F\u0430\u043D\u0435\u043B\u044C \u043E\u0442\u043A\u0440\u044B\u0442\u0430"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u0440\u043E\u0442\u043E\u043A\u043E\u043B\u044B \u0431\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u043E\u0441\u0442\u0438",children:(0,e.createComponentVNode)(2,t.Box,{color:v?"bad":"good",children:v?"\u041E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u044B":"\u0412\u043A\u043B\u044E\u0447\u0435\u043D\u044B"})}),!!c&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0412\u0437\u043B\u043E\u043C",children:(0,e.createComponentVNode)(2,t.Button,{icon:"terminal",content:v?"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043F\u0440\u043E\u0442\u043E\u043A\u043E\u043B\u044B \u0431\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u043E\u0441\u0442\u0438":"\u0412\u0437\u043B\u043E\u043C\u0430\u0442\u044C",disabled:f,color:"bad",onClick:function(){function C(){return p("hack")}return C}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0423\u0434\u0430\u043B\u0451\u043D\u043D\u044B\u0439 \u0434\u043E\u0441\u0442\u0443\u043F",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:!b,content:"\u0423\u0434\u0430\u043B\u0451\u043D\u043D\u044B\u0439 \u0434\u043E\u0441\u0442\u0443\u043F \u0441\u043E \u0441\u0442\u043E\u0440\u043E\u043D\u044B \u0418\u0418",disabled:f,onClick:function(){function C(){return p("disableremote")}return C}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043F\u0440\u043E\u0446\u0435\u0441\u0441\u0430 \u0443\u0431\u043E\u0440\u043A\u0438",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:h,content:"\u0423\u0431\u0438\u0440\u0430\u0442\u044C \u043A\u0440\u043E\u0432\u044C",disabled:f,onClick:function(){function C(){return p("blood")}return C}()})}),g&&(0,e.createComponentVNode)(2,t.Section,{title:"\u041F\u0418\u0418",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:g,disabled:f,onClick:function(){function C(){return p("ejectpai")}return C}()})})]})})}return y}()},74439:function(I,r,n){"use strict";r.__esModule=!0,r.BotSecurity=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.BotSecurity=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.locked,f=i.noaccess,u=i.maintpanel,s=i.on,m=i.autopatrol,c=i.canhack,v=i.emagged,b=i.remote_disabled,g=i.painame,h=i.check_id,C=i.check_weapons,N=i.check_warrant,x=i.arrest_mode,B=i.arrest_declare;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.NoticeBox,{children:["\u041F\u0440\u043E\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u0432\u043E\u0435\u0439 ID-\u043A\u0430\u0440\u0442\u043E\u0439, \u0447\u0442\u043E\u0431\u044B",l?"\u0440\u0430\u0437\u0431\u043B\u043E\u043A\u0438\u0440\u043E\u0432\u0430\u0442\u044C":"\u0437\u0430\u0431\u043B\u043E\u043A\u0438\u0440\u043E\u0432\u0430\u0442\u044C"," \u044D\u0442\u043E\u0442 \u0438\u043D\u0442\u0435\u0440\u0444\u0435\u0439\u0441."]}),(0,e.createComponentVNode)(2,t.Section,{title:"\u041E\u0441\u043D\u043E\u0432\u043D\u044B\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0421\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435",children:(0,e.createComponentVNode)(2,t.Button,{icon:s?"power-off":"times",content:s?"\u0412\u043A\u043B\u044E\u0447\u0451\u043D":"\u0412\u044B\u043A\u043B\u044E\u0447\u0435\u043D",selected:s,disabled:f,onClick:function(){function L(){return p("power")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0420\u0435\u0436\u0438\u043C \u043F\u0430\u0442\u0440\u0443\u043B\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:m,content:"\u0410\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u043F\u0430\u0442\u0440\u0443\u043B\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435",disabled:f,onClick:function(){function L(){return p("autopatrol")}return L}()})}),!!u&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u0430\u043D\u0435\u043B\u044C \u0442\u0435\u0445\u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u044F",children:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"\u041F\u0430\u043D\u0435\u043B\u044C \u043E\u0442\u043A\u0440\u044B\u0442\u0430"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u0440\u043E\u0442\u043E\u043A\u043E\u043B\u044B \u0431\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u043E\u0441\u0442\u0438",children:(0,e.createComponentVNode)(2,t.Box,{color:v?"bad":"good",children:v?"\u041E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u044B":"\u0412\u043A\u043B\u044E\u0447\u0435\u043D\u044B"})}),!!c&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0412\u0437\u043B\u043E\u043C",children:(0,e.createComponentVNode)(2,t.Button,{icon:"terminal",content:v?"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043F\u0440\u043E\u0442\u043E\u043A\u043E\u043B\u044B \u0431\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u043E\u0441\u0442\u0438":"\u0412\u0437\u043B\u043E\u043C\u0430\u0442\u044C",disabled:f,color:"bad",onClick:function(){function L(){return p("hack")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0423\u0434\u0430\u043B\u0451\u043D\u043D\u044B\u0439 \u0434\u043E\u0441\u0442\u0443\u043F",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:!b,content:"\u0423\u0434\u0430\u043B\u0451\u043D\u043D\u044B\u0439 \u0434\u043E\u0441\u0442\u0443\u043F \u0441\u043E \u0441\u0442\u043E\u0440\u043E\u043D\u044B \u0418\u0418",disabled:f,onClick:function(){function L(){return p("disableremote")}return L}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"\u0417\u0430\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043C\u044B\u0435 \u0446\u0435\u043B\u0438",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:h,content:"\u041D\u0435\u043E\u043F\u043E\u0437\u043D\u0430\u043D\u043D\u044B\u0435 \u043B\u0438\u0447\u043D\u043E\u0441\u0442\u0438",disabled:f,onClick:function(){function L(){return p("authid")}return L}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:C,content:"\u0418\u043C\u0435\u044E\u0449\u0438\u0435 \u043D\u0435\u0430\u0432\u0442\u043E\u0440\u0438\u0437\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u043E\u0435 \u043E\u0440\u0443\u0436\u0438\u0435",disabled:f,onClick:function(){function L(){return p("authweapon")}return L}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:N,content:"\u0420\u0430\u0437\u044B\u0441\u043A\u0438\u0432\u0430\u0435\u043C\u044B\u0435 \u043F\u0440\u0435\u0441\u0442\u0443\u043F\u043D\u0438\u043A\u0438",disabled:f,onClick:function(){function L(){return p("authwarrant")}return L}()})]}),(0,e.createComponentVNode)(2,t.Section,{title:"\u041F\u0440\u043E\u0446\u0435\u0434\u0443\u0440\u0430 \u0437\u0430\u0434\u0435\u0440\u0436\u0430\u043D\u0438\u044F",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:x,content:"\u0411\u0435\u0441\u0441\u0440\u043E\u0447\u043D\u043E\u0435 \u043E\u0433\u043B\u0443\u0448\u0435\u043D\u0438\u0435 \u0446\u0435\u043B\u0435\u0439 \u0432\u043C\u0435\u0441\u0442\u043E \u0437\u0430\u0434\u0435\u0440\u0436\u0430\u043D\u0438\u044F",disabled:f,onClick:function(){function L(){return p("arrtype")}return L}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:B,content:"\u0421\u043E\u043E\u0431\u0449\u0430\u0442\u044C \u043E \u0437\u0430\u0434\u0435\u0440\u0436\u0430\u043D\u0438\u0438 \u043F\u043E \u0440\u0430\u0434\u0438\u043E\u0441\u0432\u044F\u0437\u0438",disabled:f,onClick:function(){function L(){return p("arrdeclare")}return L}()})]}),g&&(0,e.createComponentVNode)(2,t.Section,{title:"\u041F\u0418\u0418",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:g,disabled:f,onClick:function(){function L(){return p("ejectpai")}return L}()})})]})})}return y}()},10833:function(I,r,n){"use strict";r.__esModule=!0,r.BrigCells=void 0;var e=n(89005),a=n(98595),t=n(36036),o=n(72253),d=function(S,p){var i=S.cell,l=(0,o.useBackend)(p),f=l.act,u=i.cell_id,s=i.occupant,m=i.crimes,c=i.brigged_by,v=i.time_left_seconds,b=i.time_set_seconds,g=i.ref,h="";v>0&&(h+=" BrigCells__listRow--active");var C=function(){f("release",{ref:g})};return(0,e.createComponentVNode)(2,t.Table.Row,{className:h,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:u}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:s}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:m}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:c}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.TimeDisplay,{totalSeconds:b})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.TimeDisplay,{totalSeconds:v})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{type:"button",onClick:C,children:"Release"})})]})},y=function(S){var p=S.cells;return(0,e.createComponentVNode)(2,t.Table,{className:"BrigCells__list",children:[(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Cell"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Occupant"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Crimes"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Brigged By"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Time Brigged For"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Time Left"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Release"})]}),p.map(function(i){return(0,e.createComponentVNode)(2,d,{cell:i},i.ref)})]})},V=r.BrigCells=function(){function k(S,p){var i=(0,o.useBackend)(p),l=i.act,f=i.data,u=f.cells;return(0,e.createComponentVNode)(2,a.Window,{theme:"security",width:800,height:400,children:(0,e.createComponentVNode)(2,a.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,y,{cells:u})})})})})}return k}()},45761:function(I,r,n){"use strict";r.__esModule=!0,r.BrigTimer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.BrigTimer=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data;i.nameText=i.occupant,i.timing&&(i.prisoner_hasrec?i.nameText=(0,e.createComponentVNode)(2,t.Box,{color:"green",children:i.occupant}):i.nameText=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:i.occupant}));var l="pencil-alt";i.prisoner_name&&(i.prisoner_hasrec||(l="exclamation-triangle"));var f=[],u=0;for(u=0;u60||!i.isAllowed,onClick:function(){function s(){return p("start")}return s}()})})]})})]})})}return y}()},26300:function(I,r,n){"use strict";r.__esModule=!0,r.CameraConsoleOldContent=r.CameraConsoleMapContent=r.CameraConsoleListContent=r.CameraConsole=void 0;var e=n(89005),a=n(88510),t=n(64795),o=n(35840),d=n(25328),y=n(72253),V=n(36036),k=n(98595);String.prototype.trimLongStr=function(s){return this.length>s?this.substring(0,s)+"...":this};var S=function(m,c){var v,b;if(!c)return[];var g=m.findIndex(function(h){return h.name===c.name});return[(v=m[g-1])==null?void 0:v.name,(b=m[g+1])==null?void 0:b.name]},p=function(m,c){c===void 0&&(c="");var v=(0,d.createSearch)(c,function(b){return b.name});return(0,t.flow)([(0,a.filter)(function(b){return b==null?void 0:b.name}),c&&(0,a.filter)(v),(0,a.sortBy)(function(b){return b.name})])(m)},i=r.CameraConsole=function(){function s(m,c){var v=(0,y.useLocalState)(c,"tabIndex",0),b=v[0],g=v[1],h=function(){function C(N){switch(N){case 0:return(0,e.createComponentVNode)(2,l);case 1:return(0,e.createComponentVNode)(2,f);default:return"WE SHOULDN'T BE HERE!"}}return C}();return(0,e.createComponentVNode)(2,k.Window,{width:1250,height:600,children:(0,e.createComponentVNode)(2,k.Window.Content,{children:(0,e.createComponentVNode)(2,V.Box,{fillPositionedParent:!0,overflow:"hidden",children:[(0,e.createComponentVNode)(2,V.Tabs,{children:[(0,e.createComponentVNode)(2,V.Tabs.Tab,{selected:b===0,onClick:function(){function C(){return g(0)}return C}(),children:[(0,e.createComponentVNode)(2,V.Icon,{name:"map-marked-alt"})," Map"]},"Map"),(0,e.createComponentVNode)(2,V.Tabs.Tab,{selected:b===1,onClick:function(){function C(){return g(1)}return C}(),children:[(0,e.createComponentVNode)(2,V.Icon,{name:"table"})," List"]},"List")]}),h(b)]})})})}return s}(),l=r.CameraConsoleMapContent=function(){function s(m,c){var v=(0,y.useBackend)(c),b=v.act,g=v.data,h=p(g.cameras),C=(0,y.useLocalState)(c,"zoom",1),N=C[0],x=C[1],B=g.mapRef,L=g.activeCamera,w=g.stationLevelNum,A=g.stationLevelName,T=(0,y.useLocalState)(c,"z_current",w[0]),E=T[0],O=T[1],P=S(h,L),R=P[0],F=P[1];return(0,e.createComponentVNode)(2,V.Box,{height:"100%",display:"flex",children:[(0,e.createVNode)(1,"div","CameraConsole__left",(0,e.createComponentVNode)(2,V.Box,{height:"100%",display:"flex",children:(0,e.createComponentVNode)(2,V.NanoMap,{onZoom:function(){function j(W){return x(W)}return j}(),zLevels:w,zNames:A,z_current:E,setZCurrent:O,children:h.map(function(j){return(0,e.createComponentVNode)(2,V.NanoMap.Marker,{x:j.x,y:j.y,z:j.z,z_current:E,zoom:N,icon:"box",tooltip:j.name,color:j.status?"blue":"red",bordered:!0,onClick:function(){function W(){return b("switch_camera",{name:j.name})}return W}()},j.ref)})})}),2),(0,e.createVNode)(1,"div","CameraConsole__right",[(0,e.createVNode)(1,"div","CameraConsole__toolbar",[(0,e.createVNode)(1,"b",null,"Camera: ",16),L&&L.name||"\u2014"],0),(0,e.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,e.createComponentVNode)(2,V.Button,{icon:"chevron-left",disabled:!R,onClick:function(){function j(){return b("switch_camera",{name:R})}return j}()}),(0,e.createComponentVNode)(2,V.Button,{icon:"chevron-right",disabled:!F,onClick:function(){function j(){return b("switch_camera",{name:F})}return j}()})],4),(0,e.createComponentVNode)(2,V.ByondUi,{className:"CameraConsole__map",params:{id:B,type:"map"}})],4)]})}return s}(),f=r.CameraConsoleOldContent=function(){function s(m,c){var v=(0,y.useBackend)(c),b=v.act,g=v.data,h=v.config,C=g.mapRef,N=g.activeCamera,x=(0,y.useLocalState)(c,"searchText",""),B=x[0],L=p(g.cameras,B),w=S(L,N),A=w[0],T=w[1];return(0,e.createComponentVNode)(2,V.Box,{children:[(0,e.createVNode)(1,"div","CameraConsole__left",(0,e.createComponentVNode)(2,k.Window.Content,{children:(0,e.createComponentVNode)(2,V.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,u)})}),2),(0,e.createVNode)(1,"div","CameraConsole__right",[(0,e.createVNode)(1,"div","CameraConsole__toolbar",[(0,e.createVNode)(1,"b",null,"Camera: ",16),N&&N.name||"\u2014"],0),(0,e.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,e.createComponentVNode)(2,V.Button,{icon:"chevron-left",disabled:!A,onClick:function(){function E(){return b("switch_camera",{name:A})}return E}()}),(0,e.createComponentVNode)(2,V.Button,{icon:"chevron-right",disabled:!T,onClick:function(){function E(){return b("switch_camera",{name:T})}return E}()})],4),(0,e.createComponentVNode)(2,V.ByondUi,{className:"CameraConsole__map",params:{id:C,type:"map"}})],4)]})}return s}(),u=r.CameraConsoleListContent=function(){function s(m,c){var v=(0,y.useBackend)(c),b=v.act,g=v.data,h=(0,y.useLocalState)(c,"searchText",""),C=h[0],N=h[1],x=g.activeCamera,B=p(g.cameras,C);return(0,e.createComponentVNode)(2,V.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,V.Stack.Item,{children:(0,e.createComponentVNode)(2,V.Input,{fluid:!0,placeholder:"Search for a camera",onInput:function(){function L(w,A){return N(A)}return L}()})}),(0,e.createComponentVNode)(2,V.Stack.Item,{grow:!0,m:0,children:(0,e.createComponentVNode)(2,V.Section,{fill:!0,scrollable:!0,children:B.map(function(L){return(0,e.createVNode)(1,"div",(0,o.classes)(["Button","Button--fluid","Button--color--transparent",x&&L.name===x.name&&"Button--selected"]),L.name,0,{title:L.name,onClick:function(){function w(){return b("switch_camera",{name:L.name})}return w}()},L.name)})})})]})}return s}()},52927:function(I,r,n){"use strict";r.__esModule=!0,r.Canister=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),d=n(49968),y=n(98595),V=r.Canister=function(){function k(S,p){var i=(0,t.useBackend)(p),l=i.act,f=i.data,u=f.portConnected,s=f.tankPressure,m=f.releasePressure,c=f.defaultReleasePressure,v=f.minReleasePressure,b=f.maxReleasePressure,g=f.valveOpen,h=f.name,C=f.canLabel,N=f.colorContainer,x=f.color_index,B=f.hasHoldingTank,L=f.holdingTank,w="";x.prim&&(w=N.prim.options[x.prim].name);var A="";x.sec&&(A=N.sec.options[x.sec].name);var T="";x.ter&&(T=N.ter.options[x.ter].name);var E="";x.quart&&(E=N.quart.options[x.quart].name);var O=[],P=[],R=[],F=[],j=0;for(j=0;jh.current_positions&&(0,e.createComponentVNode)(2,t.Box,{color:"green",children:h.total_positions-h.current_positions})||(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"0"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{content:"-",disabled:c.cooldown_time||!h.can_close,onClick:function(){function C(){return m("make_job_unavailable",{job:h.title})}return C}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{content:"+",disabled:c.cooldown_time||!h.can_open,onClick:function(){function C(){return m("make_job_available",{job:h.title})}return C}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:c.target_dept&&(0,e.createComponentVNode)(2,t.Box,{color:"green",children:c.priority_jobs.indexOf(h.title)>-1?"Yes":""})||(0,e.createComponentVNode)(2,t.Button,{content:h.is_priority?"Yes":"No",selected:h.is_priority,disabled:c.cooldown_time||!h.can_prioritize,onClick:function(){function C(){return m("prioritize_job",{job:h.title})}return C}()})})]},h.title)})]})})]}):g=(0,e.createComponentVNode)(2,k);break;case 2:!c.authenticated||!c.scan_name?g=(0,e.createComponentVNode)(2,k):c.modify_name?g=(0,e.createComponentVNode)(2,d.AccessList,{accesses:c.regions,selectedList:c.selectedAccess,accessMod:function(){function h(C){return m("set",{access:C})}return h}(),grantAll:function(){function h(){return m("grant_all")}return h}(),denyAll:function(){function h(){return m("clear_all")}return h}(),grantDep:function(){function h(C){return m("grant_region",{region:C})}return h}(),denyDep:function(){function h(C){return m("deny_region",{region:C})}return h}()}):g=(0,e.createComponentVNode)(2,S);break;case 3:c.authenticated?c.records.length?g=(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Records",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Delete All Records",disabled:!c.authenticated||c.records.length===0||c.target_dept,onClick:function(){function h(){return m("wipe_all_logs")}return h}()}),children:[(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Crewman"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Old Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"New Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Authorized By"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Time"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Reason"}),!!c.iscentcom&&(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Deleted By"})]}),c.records.map(function(h){return(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.transferee}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.oldvalue}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.newvalue}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.whodidit}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.timestamp}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.reason}),!!c.iscentcom&&(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.deletedby})]},h.timestamp)})]}),!!c.iscentcom&&(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:"Delete MY Records",color:"purple",disabled:!c.authenticated||c.records.length===0,onClick:function(){function h(){return m("wipe_my_logs")}return h}()})})]}):g=(0,e.createComponentVNode)(2,p):g=(0,e.createComponentVNode)(2,k);break;case 4:!c.authenticated||!c.scan_name?g=(0,e.createComponentVNode)(2,k):g=(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Your Team",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Sec Status"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Actions"})]}),c.people_dept.map(function(h){return(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.title}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.crimstat}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:h.buttontext,disabled:!h.demotable,onClick:function(){function C(){return m("remote_demote",{remote_demote:h.name})}return C}()})})]},h.title)})]})});break;default:g=(0,e.createComponentVNode)(2,t.Section,{title:"Warning",color:"red",children:"ERROR: Unknown Mode."})}return(0,e.createComponentVNode)(2,o.Window,{width:800,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:b}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:v}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:g})]})})})}return l}()},64083:function(I,r,n){"use strict";r.__esModule=!0,r.CargoConsole=void 0;var e=n(89005),a=n(64795),t=n(88510),o=n(72253),d=n(36036),y=n(98595),V=n(25328),k=r.CargoConsole=function(){function f(u,s){return(0,e.createComponentVNode)(2,y.Window,{width:900,height:800,children:(0,e.createComponentVNode)(2,y.Window.Content,{children:(0,e.createComponentVNode)(2,d.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,S),(0,e.createComponentVNode)(2,p),(0,e.createComponentVNode)(2,i),(0,e.createComponentVNode)(2,l)]})})})}return f}(),S=function(u,s){var m=(0,o.useLocalState)(s,"contentsModal",null),c=m[0],v=m[1],b=(0,o.useLocalState)(s,"contentsModalTitle",null),g=b[0],h=b[1];if(c!==null&&g!==null)return(0,e.createComponentVNode)(2,d.Modal,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:window.innerHeight*.75+"px",mx:"auto",children:[(0,e.createComponentVNode)(2,d.Box,{width:"100%",bold:!0,children:(0,e.createVNode)(1,"h1",null,[g,(0,e.createTextVNode)(" contents:")],0)}),(0,e.createComponentVNode)(2,d.Box,{children:c.map(function(C){return(0,e.createComponentVNode)(2,d.Box,{children:["- ",C]},C)})}),(0,e.createComponentVNode)(2,d.Box,{m:2,children:(0,e.createComponentVNode)(2,d.Button,{content:"Close",onClick:function(){function C(){v(null),h(null)}return C}()})})]})},p=function(u,s){var m=(0,o.useBackend)(s),c=m.act,v=m.data,b=v.is_public,g=v.points,h=v.credits,C=v.timeleft,N=v.moving,x=v.at_station,B,L;return!N&&!x?(B="Docked off-station",L="Call Shuttle"):!N&&x?(B="Docked at the station",L="Return Shuttle"):N&&(L="In Transit...",C!==1?B="Shuttle is en route (ETA: "+C+" minutes)":B="Shuttle is en route (ETA: "+C+" minute)"),(0,e.createComponentVNode)(2,d.Stack.Item,{children:(0,e.createComponentVNode)(2,d.Section,{title:"Status",children:(0,e.createComponentVNode)(2,d.LabeledList,{children:[(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Points Available",children:g}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Credits Available",children:h}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Shuttle Status",children:B}),b===0&&(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Controls",children:[(0,e.createComponentVNode)(2,d.Button,{content:L,disabled:N,onClick:function(){function w(){return c("moveShuttle")}return w}()}),(0,e.createComponentVNode)(2,d.Button,{content:"View Central Command Messages",onClick:function(){function w(){return c("showMessages")}return w}()})]})]})})})},i=function(u,s){var m=(0,o.useBackend)(s),c=m.act,v=m.data,b=v.categories,g=v.supply_packs,h=(0,o.useSharedState)(s,"category","Emergency"),C=h[0],N=h[1],x=(0,o.useSharedState)(s,"search_text",""),B=x[0],L=x[1],w=(0,o.useLocalState)(s,"contentsModal",null),A=w[0],T=w[1],E=(0,o.useLocalState)(s,"contentsModalTitle",null),O=E[0],P=E[1],R=(0,V.createSearch)(B,function(W){return W.name}),F=(0,a.flow)([(0,t.filter)(function(W){return W.cat===b.filter(function(z){return z.name===C})[0].category||B}),B&&(0,t.filter)(R),(0,t.sortBy)(function(W){return W.name.toLowerCase()})])(g),j="Crate Catalogue";return B?j="Results for '"+B+"':":C&&(j="Browsing "+C),(0,e.createComponentVNode)(2,d.Stack.Item,{children:(0,e.createComponentVNode)(2,d.Section,{title:j,buttons:(0,e.createComponentVNode)(2,d.Dropdown,{width:"190px",options:b.map(function(W){return W.name}),selected:C,onSelected:function(){function W(z){return N(z)}return W}()}),children:[(0,e.createComponentVNode)(2,d.Input,{fluid:!0,placeholder:"Search for...",onInput:function(){function W(z,H){return L(H)}return W}(),mb:1}),(0,e.createComponentVNode)(2,d.Box,{maxHeight:25,overflowY:"auto",overflowX:"hidden",children:(0,e.createComponentVNode)(2,d.Table,{m:"0.5rem",children:F.map(function(W){return(0,e.createComponentVNode)(2,d.Table.Row,{children:[(0,e.createComponentVNode)(2,d.Table.Cell,{bold:!0,children:(0,e.createComponentVNode)(2,d.Box,{color:W.has_sale?"good":"default",children:[W.name," (",W.cost?W.cost+" Points":"",W.creditsCost&&W.cost?" ":"",W.creditsCost?W.creditsCost+" Credits":"",")"]})}),(0,e.createComponentVNode)(2,d.Table.Cell,{textAlign:"right",pr:1,children:[(0,e.createComponentVNode)(2,d.Button,{content:"Order 1",icon:"shopping-cart",onClick:function(){function z(){return c("order",{crate:W.ref,multiple:0})}return z}()}),(0,e.createComponentVNode)(2,d.Button,{content:"Order Multiple",icon:"cart-plus",onClick:function(){function z(){return c("order",{crate:W.ref,multiple:1})}return z}()}),(0,e.createComponentVNode)(2,d.Button,{content:"View Contents",icon:"search",onClick:function(){function z(){T(W.contents),P(W.name)}return z}()})]})]},W.name)})})})]})})},l=function(u,s){var m=(0,o.useBackend)(s),c=m.act,v=m.data,b=v.requests,g=v.canapprove,h=v.orders;return(0,e.createComponentVNode)(2,d.Section,{fill:!0,scrollable:!0,title:"Details",children:[(0,e.createComponentVNode)(2,d.Box,{bold:!0,children:"Requests"}),(0,e.createComponentVNode)(2,d.Table,{m:"0.5rem",children:b.map(function(C){return(0,e.createComponentVNode)(2,d.Table.Row,{children:[(0,e.createComponentVNode)(2,d.Table.Cell,{children:[(0,e.createComponentVNode)(2,d.Box,{children:["- #",C.ordernum,": ",C.supply_type," for ",(0,e.createVNode)(1,"b",null,C.orderedby,0)]}),(0,e.createComponentVNode)(2,d.Box,{italic:!0,children:["Reason: ",C.comment]}),(0,e.createComponentVNode)(2,d.Box,{italic:!0,children:["Required Techs: ",C.pack_techs]})]}),(0,e.createComponentVNode)(2,d.Stack.Item,{textAlign:"right",children:[(0,e.createComponentVNode)(2,d.Button,{content:"Approve",color:"green",disabled:!g,onClick:function(){function N(){return c("approve",{ordernum:C.ordernum})}return N}()}),(0,e.createComponentVNode)(2,d.Button,{content:"Deny",color:"red",onClick:function(){function N(){return c("deny",{ordernum:C.ordernum})}return N}()})]})]},C.ordernum)})}),(0,e.createComponentVNode)(2,d.Box,{bold:!0,children:"Confirmed Orders"}),(0,e.createComponentVNode)(2,d.Table,{m:"0.5rem",children:h.map(function(C){return(0,e.createComponentVNode)(2,d.Table.Row,{children:(0,e.createComponentVNode)(2,d.Table.Cell,{children:[(0,e.createComponentVNode)(2,d.Box,{children:["- #",C.ordernum,": ",C.supply_type," for ",(0,e.createVNode)(1,"b",null,C.orderedby,0)]}),(0,e.createComponentVNode)(2,d.Box,{italic:!0,children:["Reason: ",C.comment]})]})},C.ordernum)})})]})}},12226:function(I,r,n){"use strict";r.__esModule=!0,r.Changelog=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),d=n(98595),y=n(79140),V=S(n(83331)),k=S(n(52754));function S(c){return c&&c.__esModule?c:{default:c}}function p(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */p=function(){return v};var c,v={},b=Object.prototype,g=b.hasOwnProperty,h=Object.defineProperty||function(fe,Z,J){fe[Z]=J.value},C=typeof Symbol=="function"?Symbol:{},N=C.iterator||"@@iterator",x=C.asyncIterator||"@@asyncIterator",B=C.toStringTag||"@@toStringTag";function L(fe,Z,J){return Object.defineProperty(fe,Z,{value:J,enumerable:!0,configurable:!0,writable:!0}),fe[Z]}try{L({},"")}catch(fe){L=function(J,te,ee){return J[te]=ee}}function w(fe,Z,J,te){var ee=Z&&Z.prototype instanceof F?Z:F,le=Object.create(ee.prototype),ye=new Le(te||[]);return h(le,"_invoke",{value:he(fe,J,ye)}),le}function A(fe,Z,J){try{return{type:"normal",arg:fe.call(Z,J)}}catch(te){return{type:"throw",arg:te}}}v.wrap=w;var T="suspendedStart",E="suspendedYield",O="executing",P="completed",R={};function F(){}function j(){}function W(){}var z={};L(z,N,function(){return this});var H=Object.getPrototypeOf,$=H&&H(H(Ae([])));$&&$!==b&&g.call($,N)&&(z=$);var G=W.prototype=F.prototype=Object.create(z);function ne(fe){["next","throw","return"].forEach(function(Z){L(fe,Z,function(J){return this._invoke(Z,J)})})}function Q(fe,Z){function J(ee,le,ye,me){var Te=A(fe[ee],fe,le);if(Te.type!=="throw"){var M=Te.arg,X=M.value;return X&&typeof X=="object"&&g.call(X,"__await")?Z.resolve(X.__await).then(function(ae){J("next",ae,ye,me)},function(ae){J("throw",ae,ye,me)}):Z.resolve(X).then(function(ae){M.value=ae,ye(M)},function(ae){return J("throw",ae,ye,me)})}me(Te.arg)}var te;h(this,"_invoke",{value:function(){function ee(le,ye){function me(){return new Z(function(Te,M){J(le,ye,Te,M)})}return te=te?te.then(me,me):me()}return ee}()})}function he(fe,Z,J){var te=T;return function(ee,le){if(te===O)throw Error("Generator is already running");if(te===P){if(ee==="throw")throw le;return{value:c,done:!0}}for(J.method=ee,J.arg=le;;){var ye=J.delegate;if(ye){var me=Ve(ye,J);if(me){if(me===R)continue;return me}}if(J.method==="next")J.sent=J._sent=J.arg;else if(J.method==="throw"){if(te===T)throw te=P,J.arg;J.dispatchException(J.arg)}else J.method==="return"&&J.abrupt("return",J.arg);te=O;var Te=A(fe,Z,J);if(Te.type==="normal"){if(te=J.done?P:E,Te.arg===R)continue;return{value:Te.arg,done:J.done}}Te.type==="throw"&&(te=P,J.method="throw",J.arg=Te.arg)}}}function Ve(fe,Z){var J=Z.method,te=fe.iterator[J];if(te===c)return Z.delegate=null,J==="throw"&&fe.iterator.return&&(Z.method="return",Z.arg=c,Ve(fe,Z),Z.method==="throw")||J!=="return"&&(Z.method="throw",Z.arg=new TypeError("The iterator does not provide a '"+J+"' method")),R;var ee=A(te,fe.iterator,Z.arg);if(ee.type==="throw")return Z.method="throw",Z.arg=ee.arg,Z.delegate=null,R;var le=ee.arg;return le?le.done?(Z[fe.resultName]=le.value,Z.next=fe.nextLoc,Z.method!=="return"&&(Z.method="next",Z.arg=c),Z.delegate=null,R):le:(Z.method="throw",Z.arg=new TypeError("iterator result is not an object"),Z.delegate=null,R)}function Ne(fe){var Z={tryLoc:fe[0]};1 in fe&&(Z.catchLoc=fe[1]),2 in fe&&(Z.finallyLoc=fe[2],Z.afterLoc=fe[3]),this.tryEntries.push(Z)}function Be(fe){var Z=fe.completion||{};Z.type="normal",delete Z.arg,fe.completion=Z}function Le(fe){this.tryEntries=[{tryLoc:"root"}],fe.forEach(Ne,this),this.reset(!0)}function Ae(fe){if(fe||fe===""){var Z=fe[N];if(Z)return Z.call(fe);if(typeof fe.next=="function")return fe;if(!isNaN(fe.length)){var J=-1,te=function(){function ee(){for(;++J=0;--ee){var le=this.tryEntries[ee],ye=le.completion;if(le.tryLoc==="root")return te("end");if(le.tryLoc<=this.prev){var me=g.call(le,"catchLoc"),Te=g.call(le,"finallyLoc");if(me&&Te){if(this.prev=0;--te){var ee=this.tryEntries[te];if(ee.tryLoc<=this.prev&&g.call(ee,"finallyLoc")&&this.prev=0;--J){var te=this.tryEntries[J];if(te.finallyLoc===Z)return this.complete(te.completion,te.afterLoc),Be(te),R}}return fe}(),catch:function(){function fe(Z){for(var J=this.tryEntries.length-1;J>=0;--J){var te=this.tryEntries[J];if(te.tryLoc===Z){var ee=te.completion;if(ee.type==="throw"){var le=ee.arg;Be(te)}return le}}throw Error("illegal catch attempt")}return fe}(),delegateYield:function(){function fe(Z,J,te){return this.delegate={iterator:Ae(Z),resultName:J,nextLoc:te},this.method==="next"&&(this.arg=c),R}return fe}()},v}function i(c,v,b,g,h,C,N){try{var x=c[C](N),B=x.value}catch(L){return void b(L)}x.done?v(B):Promise.resolve(B).then(g,h)}function l(c){return function(){var v=this,b=arguments;return new Promise(function(g,h){var C=c.apply(v,b);function N(B){i(C,g,h,N,x,"next",B)}function x(B){i(C,g,h,N,x,"throw",B)}N(void 0)})}}function f(c,v){c.prototype=Object.create(v.prototype),c.prototype.constructor=c,u(c,v)}function u(c,v){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,g){return b.__proto__=g,b},u(c,v)}var s={add:{icon:"check-circle",color:"green"},admin:{icon:"user-shield",color:"purple"},balance:{icon:"balance-scale-right",color:"yellow"},bugfix:{icon:"bug",color:"green"},code_imp:{icon:"code",color:"green"},config:{icon:"cogs",color:"purple"},del:{icon:"minus",color:"red"},expansion:{icon:"check-circle",color:"green"},experiment:{icon:"radiation",color:"yellow"},image:{icon:"image",color:"green"},imageadd:{icon:"tg-image-plus",color:"green"},imagedel:{icon:"tg-image-minus",color:"red"},qol:{icon:"hand-holding-heart",color:"green"},refactor:{icon:"tools",color:"green"},rscadd:{icon:"check-circle",color:"green"},rscdel:{icon:"times-circle",color:"red"},server:{icon:"server",color:"purple"},sound:{icon:"volume-high",color:"green"},soundadd:{icon:"tg-sound-plus",color:"green"},sounddel:{icon:"tg-sound-minus",color:"red"},spellcheck:{icon:"spell-check",color:"green"},tgs:{icon:"toolbox",color:"purple"},tweak:{icon:"wrench",color:"green"},unknown:{icon:"info-circle",color:"label"},wip:{icon:"hammer",color:"orange"}},m=r.Changelog=function(c){function v(){var g;return g=c.call(this)||this,g.getData=function(h,C){C===void 0&&(C=1);var N=(0,t.useBackend)(g.context),x=N.act,B=g,L=6;if(C>L)return g.setData("Failed to load data after "+L+" attempts");x("get_month",{date:h}),fetch((0,y.resolveAsset)(h+".yml")).then(function(){var w=l(p().mark(function(){function A(T){var E,O,P;return p().wrap(function(){function R(F){for(;;)switch(F.prev=F.next){case 0:return F.next=2,T.text();case 2:E=F.sent,O=/^Cannot find/,O.test(E)?(P=50+C*50,B.setData("Loading changelog data"+".".repeat(C+3)),setTimeout(function(){B.getData(h,C+1)},P)):B.setData(k.default.load(E,{schema:k.default.CORE_SCHEMA}));case 5:case"end":return F.stop()}}return R}(),A)}return A}()));return function(A){return w.apply(this,arguments)}}())},g.state={data:"Loading changelog data...",selectedDate:"",selectedIndex:0},g.dateChoices=[],g}f(v,c);var b=v.prototype;return b.setData=function(){function g(h){this.setState({data:h})}return g}(),b.setSelectedDate=function(){function g(h){this.setState({selectedDate:h})}return g}(),b.setSelectedIndex=function(){function g(h){this.setState({selectedIndex:h})}return g}(),b.componentDidMount=function(){function g(){var h=this,C=(0,t.useBackend)(this.context),N=C.data.dates,x=N===void 0?[]:N;x&&(x.forEach(function(B){return h.dateChoices.push((0,V.default)(B,"mmmm yyyy",!0))}),this.setSelectedDate(this.dateChoices[0]),this.getData(x[0]))}return g}(),b.render=function(){function g(){var h=this,C=this.state,N=C.data,x=C.selectedDate,B=C.selectedIndex,L=(0,t.useBackend)(this.context),w=L.data.dates,A=this.dateChoices,T=A.length>0&&(0,e.createComponentVNode)(2,o.Stack,{mb:1,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{className:"Changelog__Button",disabled:B===0,icon:"chevron-left",onClick:function(){function F(){var j=B-1;return h.setData("Loading changelog data..."),h.setSelectedIndex(j),h.setSelectedDate(A[j]),window.scrollTo(0,document.body.scrollHeight||document.documentElement.scrollHeight),h.getData(w[j])}return F}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Dropdown,{displayText:x,options:A,onSelected:function(){function F(j){var W=A.indexOf(j);return h.setData("Loading changelog data..."),h.setSelectedIndex(W),h.setSelectedDate(j),window.scrollTo(0,document.body.scrollHeight||document.documentElement.scrollHeight),h.getData(w[W])}return F}(),selected:x,width:"150px"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{className:"Changelog__Button",disabled:B===A.length-1,icon:"chevron-right",onClick:function(){function F(){var j=B+1;return h.setData("Loading changelog data..."),h.setSelectedIndex(j),h.setSelectedDate(A[j]),window.scrollTo(0,document.body.scrollHeight||document.documentElement.scrollHeight),h.getData(w[j])}return F}()})})]}),E=(0,e.createComponentVNode)(2,o.Section,{children:[(0,e.createVNode)(1,"h1",null,"Paradise Station",16),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Thanks to: ",16),(0,e.createTextVNode)("Baystation 12, /tg/station, /vg/station, NTstation, CDK Station devs, FacepunchStation, GoonStation devs, the original SpaceStation developers and Radithor for the title image. Also a thanks to anybody who has contributed who is not listed here :( Ask to be added here on irc.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Recent GitHub contributors can be found "),(0,e.createVNode)(1,"a",null,"here",16,{href:"https://github.com/ss220-space/Paradise/pulse/monthly"}),(0,e.createTextVNode)(".")],0),T]}),O=(0,e.createComponentVNode)(2,o.Section,{children:[T,(0,e.createVNode)(1,"h3",null,"GoonStation 13 Development Team",16),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Coders: ",16),(0,e.createTextVNode)("Stuntwaffle, Showtime, Pantaloons, Nannek, Keelin, Exadv1, hobnob, Justicefries, 0staf, sniperchance, AngriestIBM, BrianOBlivion")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Spriters: ",16),(0,e.createTextVNode)("Supernorn, Haruhi, Stuntwaffle, Pantaloons, Rho, SynthOrange, I Said No")],4),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Traditional Games Space Station 13 is thankful to the GoonStation 13 Development Team for its work on the game up to the"),(0,e.createTextVNode)(" r4407 release. The changelog for changes up to r4407 can be seen "),(0,e.createVNode)(1,"a",null,"here",16,{href:"https://wiki.ss13.co/Pre-2016_Changelog#April_2010"}),(0,e.createTextVNode)(".")],0),(0,e.createVNode)(1,"p",null,["Except where otherwise noted, Goon Station 13 is licensed under a ",(0,e.createVNode)(1,"a",null,"Creative Commons Attribution-Noncommercial-Share Alike 3.0 License",16,{href:"https://creativecommons.org/licenses/by-nc-sa/3.0/"}),". Rights are currently extended to ",(0,e.createVNode)(1,"a",null,"SomethingAwful Goons",16,{href:"http://forums.somethingawful.com/"})," only."],0),(0,e.createVNode)(1,"h3",null,"Traditional Games Space Station 13 License",16),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Some icons by"),(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"a",null,"Yusuke Kamiyamane",16,{href:"http://p.yusukekamiyamane.com/"}),(0,e.createTextVNode)(". All rights reserved. Licensed under a"),(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"a",null,"Creative Commons Attribution 3.0 License",16,{href:"http://creativecommons.org/licenses/by/3.0/"}),(0,e.createTextVNode)(".")],0)]}),P=/#\d+/,R=typeof N=="object"&&Object.keys(N).length>0&&Object.entries(N).reverse().map(function(F){var j=F[0],W=F[1];return(0,e.createComponentVNode)(2,o.Section,{title:(0,V.default)(j,"d mmmm yyyy",!0),children:(0,e.createComponentVNode)(2,o.Box,{ml:3,children:Object.entries(W).map(function(z){var H=z[0],$=z[1];return(0,e.createFragment)([(0,e.createVNode)(1,"h4",null,[H,(0,e.createTextVNode)(" changed:")],0),(0,e.createComponentVNode)(2,o.Box,{ml:3,children:(0,e.createComponentVNode)(2,o.Table,{children:$.map(function(G){var ne=Object.keys(G)[0],Q=G[ne],he=Q.match(P),Ve=(0,e.createComponentVNode)(2,o.Table.Cell,{className:(0,a.classes)(["Changelog__Cell","Changelog__Cell--Icon"]),children:(0,e.createComponentVNode)(2,o.Icon,{color:s[ne]?s[ne].color:s.unknown.color,name:s[ne]?s[ne].icon:s.unknown.icon})});return he!==null&&(0,e.createComponentVNode)(2,o.Table.Row,{children:[Ve,(0,e.createComponentVNode)(2,o.Table.Cell,{className:"Changelog__Cell",children:(0,e.createVNode)(1,"a",null,[" ",Q.charAt(0).toUpperCase()+Q.slice(1)," "],0,{href:"https://github.com/ss220-space/Paradise/pull/"+he[0].substring(1)})})]},ne+Q)||(0,e.createComponentVNode)(2,o.Table.Row,{children:[Ve,(0,e.createComponentVNode)(2,o.Table.Cell,{className:"Changelog__Cell",children:Q})]},ne+Q)})})})],4,H)})})},j)});return(0,e.createComponentVNode)(2,d.Window,{title:"Changelog",width:675,height:650,children:(0,e.createComponentVNode)(2,d.Window.Content,{scrollable:!0,children:[E,R,typeof N=="string"&&(0,e.createVNode)(1,"p",null,N,0),O]})})}return g}(),v}(e.Component)},36108:function(I,r,n){"use strict";r.__esModule=!0,r.ChemDispenser=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(85870),d=n(98595),y=[1,5,10,20,30,50,100],V=[1,5,10],k=r.ChemDispenser=function(){function l(f,u){var s=(0,a.useBackend)(u),m=s.act,c=s.data,v=c.chemicals;return(0,e.createComponentVNode)(2,d.Window,{width:460,height:400+v.length*8,children:(0,e.createComponentVNode)(2,d.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,S),(0,e.createComponentVNode)(2,p),(0,e.createComponentVNode)(2,i)]})})})}return l}(),S=function(f,u){var s=(0,a.useBackend)(u),m=s.act,c=s.data,v=c.amount,b=c.energy,g=c.maxEnergy;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Energy",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:b,minValue:0,maxValue:g,ranges:{good:[g*.5,1/0],average:[g*.25,g*.5],bad:[-1/0,g*.25]},children:[b," / ",g," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Dispense",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{children:y.map(function(h,C){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"15%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"cog",selected:v===h,content:h,onClick:function(){function N(){return m("amount",{amount:h})}return N}()})},C)})})})]})})})},p=function(f,u){for(var s=(0,a.useBackend)(u),m=s.act,c=s.data,v=c.chemicals,b=v===void 0?[]:v,g=[],h=0;h<(b.length+1)%3;h++)g.push(!0);return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:c.glass?"Drink Dispenser":"Chemical Dispenser",children:[b.map(function(C,N){return(0,e.createComponentVNode)(2,t.Button,{m:.1,width:"32.5%",icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",content:C.title,style:{"margin-left":"2px"},onClick:function(){function x(){return m("dispense",{reagent:C.id})}return x}()},N)}),g.map(function(C,N){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%"},N)})]})})},i=function(f,u){var s=(0,a.useBackend)(u),m=s.act,c=s.data,v=c.isBeakerLoaded,b=c.beakerCurrentVolume,g=c.beakerMaxVolume,h=c.beakerContents,C=h===void 0?[]:h;return(0,e.createComponentVNode)(2,t.Stack.Item,{height:16,children:(0,e.createComponentVNode)(2,t.Section,{title:c.glass?"Glass":"Beaker",fill:!0,scrollable:!0,buttons:(0,e.createComponentVNode)(2,t.Box,{children:[!!v&&(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"label",mr:2,children:[b," / ",g," units"]}),(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject",disabled:!v,onClick:function(){function N(){return m("ejectBeaker")}return N}()})]}),children:(0,e.createComponentVNode)(2,o.BeakerContents,{beakerLoaded:v,beakerContents:C,buttons:function(){function N(x){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Isolate",icon:"compress-arrows-alt",onClick:function(){function B(){return m("remove",{reagent:x.id,amount:-1})}return B}()}),V.map(function(B,L){return(0,e.createComponentVNode)(2,t.Button,{content:B,onClick:function(){function w(){return m("remove",{reagent:x.id,amount:B})}return w}()},L)}),(0,e.createComponentVNode)(2,t.Button,{content:"ALL",onClick:function(){function B(){return m("remove",{reagent:x.id,amount:x.volume})}return B}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Floor",tooltip:"Set to "+Math.trunc(x.volume),icon:"arrow-circle-down",onClick:function(){function B(){return m("remove",{reagent:x.id,amount:-2})}return B}()})],0)}return N}()})})})}},13146:function(I,r,n){"use strict";r.__esModule=!0,r.ChemHeater=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),d=n(85870),y=n(98595),V=r.ChemHeater=function(){function p(i,l){return(0,e.createComponentVNode)(2,y.Window,{width:350,height:275,children:(0,e.createComponentVNode)(2,y.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,S)]})})})}return p}(),k=function(i,l){var f=(0,t.useBackend)(l),u=f.act,s=f.data,m=s.targetTemp,c=s.targetTempReached,v=s.autoEject,b=s.isActive,g=s.currentTemp,h=s.isBeakerLoaded;return(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Settings",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{content:"Auto-eject",icon:v?"toggle-on":"toggle-off",selected:v,onClick:function(){function C(){return u("toggle_autoeject")}return C}()}),(0,e.createComponentVNode)(2,o.Button,{content:b?"On":"Off",icon:"power-off",selected:b,disabled:!h,onClick:function(){function C(){return u("toggle_on")}return C}()})],4),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Target",children:(0,e.createComponentVNode)(2,o.NumberInput,{width:"65px",unit:"K",step:10,stepPixelSize:3,value:(0,a.round)(m,0),minValue:0,maxValue:1e3,onDrag:function(){function C(N,x){return u("adjust_temperature",{target:x})}return C}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Reading",color:c?"good":"average",children:h&&(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:g,format:function(){function C(N){return(0,a.toFixed)(N)+" K"}return C}()})||"\u2014"})]})})})},S=function(i,l){var f=(0,t.useBackend)(l),u=f.act,s=f.data,m=s.isBeakerLoaded,c=s.beakerCurrentVolume,v=s.beakerMaxVolume,b=s.beakerContents;return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{title:"Beaker",fill:!0,scrollable:!0,buttons:!!m&&(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{inline:!0,color:"label",mr:2,children:[c," / ",v," units"]}),(0,e.createComponentVNode)(2,o.Button,{icon:"eject",content:"Eject",onClick:function(){function g(){return u("eject_beaker")}return g}()})]}),children:(0,e.createComponentVNode)(2,d.BeakerContents,{beakerLoaded:m,beakerContents:b})})})}},56541:function(I,r,n){"use strict";r.__esModule=!0,r.ChemMaster=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=n(85870),y=n(3939),V=n(35840),k=["icon"];function S(B,L){if(B==null)return{};var w={};for(var A in B)if({}.hasOwnProperty.call(B,A)){if(L.includes(A))continue;w[A]=B[A]}return w}function p(B,L){B.prototype=Object.create(L.prototype),B.prototype.constructor=B,i(B,L)}function i(B,L){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(w,A){return w.__proto__=A,w},i(B,L)}var l=[1,5,10],f=function(L,w){var A=(0,a.useBackend)(w),T=A.act,E=A.data,O=L.args.analysis;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:E.condi?"Condiment Analysis":"Reagent Analysis",children:(0,e.createComponentVNode)(2,t.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:O.name}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:(O.desc||"").length>0?O.desc:"N/A"}),O.blood_type&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood type",children:O.blood_type}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood DNA",className:"LabeledList__breakContents",children:O.blood_dna})],4),!E.condi&&(0,e.createComponentVNode)(2,t.Button,{icon:E.printing?"spinner":"print",disabled:E.printing,iconSpin:!!E.printing,ml:"0.5rem",content:"Print",onClick:function(){function P(){return T("print",{idx:O.idx,beaker:L.args.beaker})}return P}()})]})})})})},u=function(B){return B[B.ToDisposals=0]="ToDisposals",B[B.ToBeaker=1]="ToBeaker",B}(u||{}),s=r.ChemMaster=function(){function B(L,w){return(0,e.createComponentVNode)(2,o.Window,{width:575,height:650,children:[(0,e.createComponentVNode)(2,y.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,m),(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,v),(0,e.createComponentVNode)(2,x)]})})]})}return B}(),m=function(L,w){var A=(0,a.useBackend)(w),T=A.act,E=A.data,O=E.beaker,P=E.beaker_reagents,R=E.buffer_reagents,F=R.length>0;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Beaker",fill:!0,scrollable:!0,buttons:F?(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"eject",disabled:!O,content:"Eject and Clear Buffer",onClick:function(){function j(){return T("eject")}return j}()}):(0,e.createComponentVNode)(2,t.Button,{icon:"eject",disabled:!O,content:"Eject and Clear Buffer",onClick:function(){function j(){return T("eject")}return j}()}),children:O?(0,e.createComponentVNode)(2,d.BeakerContents,{beakerLoaded:!0,beakerContents:P,buttons:function(){function j(W,z){return(0,e.createComponentVNode)(2,t.Box,{mb:z0?(0,e.createComponentVNode)(2,d.BeakerContents,{beakerLoaded:!0,beakerContents:P,buttons:function(){function R(F,j){return(0,e.createComponentVNode)(2,t.Box,{mb:j0&&(F=R.map(function(j){var W=j.id,z=j.sprite;return(0,e.createComponentVNode)(2,C,{icon:z,color:"translucent",onClick:function(){function H(){return T("set_sprite_style",{production_mode:O,style:W})}return H}(),selected:P===W},W)})),(0,e.createComponentVNode)(2,h,{productionData:L.productionData,children:F&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Style",children:F})})},x=function(L,w){var A=(0,a.useBackend)(w),T=A.act,E=A.data,O=E.loaded_pill_bottle_style,P=E.containerstyles,R=E.loaded_pill_bottle,F={width:"20px",height:"20px"},j=P.map(function(W){var z=W.color,H=W.name,$=O===z;return(0,e.createComponentVNode)(2,t.Button,{style:{position:"relative",width:F.width,height:F.height},onClick:function(){function G(){return T("set_container_style",{style:z})}return G}(),icon:$&&"check",iconStyle:{position:"relative","z-index":1},tooltip:H,tooltipPosition:"top",children:[!$&&(0,e.createVNode)(1,"div",null,null,1,{style:{display:"inline-block"}}),(0,e.createVNode)(1,"span","Button",null,1,{style:{display:"inline-block",position:"absolute",top:0,left:0,margin:0,padding:0,width:F.width,height:F.height,"background-color":z,opacity:.6,filter:"alpha(opacity=60)"}})]},z)});return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Container Customization",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"eject",disabled:!R,content:"Eject Container",onClick:function(){function W(){return T("ejectp")}return W}()}),children:R?(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Style",children:[(0,e.createComponentVNode)(2,t.Button,{style:{width:F.width,height:F.height},icon:"tint-slash",onClick:function(){function W(){return T("clear_container_style")}return W}(),selected:!O,tooltip:"Default",tooltipPosition:"top"}),j]})}):(0,e.createComponentVNode)(2,t.Box,{color:"label",children:"No pill bottle or patch pack loaded."})})})};(0,y.modalRegisterBodyOverride)("analyze",f)},37173:function(I,r,n){"use strict";r.__esModule=!0,r.CloningConsole=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),d=n(76910),y=n(3939),V=n(98595),k=n(79140),S=function(v,b){var g=(0,t.useBackend)(b),h=g.act,C=g.data,N=v.args,x=N.activerecord,B=N.realname,L=N.health,w=N.unidentity,A=N.strucenzymes,T=L.split(" - ");return(0,e.createComponentVNode)(2,o.Section,{level:2,m:"-1rem",pb:"1rem",title:"Records of "+B,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:B}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Damage",children:T.length>1?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{color:d.COLORS.damageType.oxy,inline:!0,children:T[0]}),(0,e.createTextVNode)("\xA0|\xA0"),(0,e.createComponentVNode)(2,o.Box,{color:d.COLORS.damageType.toxin,inline:!0,children:T[2]}),(0,e.createTextVNode)("\xA0|\xA0"),(0,e.createComponentVNode)(2,o.Box,{color:d.COLORS.damageType.brute,inline:!0,children:T[3]}),(0,e.createTextVNode)("\xA0|\xA0"),(0,e.createComponentVNode)(2,o.Box,{color:d.COLORS.damageType.burn,inline:!0,children:T[1]})],4):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"Unknown"})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"UI",className:"LabeledList__breakContents",children:w}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"SE",className:"LabeledList__breakContents",children:A}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Disk",children:[(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:!C.disk,icon:"arrow-circle-down",content:"Import",onClick:function(){function E(){return h("disk",{option:"load"})}return E}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!C.disk,icon:"arrow-circle-up",content:"Export UI",onClick:function(){function E(){return h("disk",{option:"save",savetype:"ui"})}return E}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!C.disk,icon:"arrow-circle-up",content:"Export UI and UE",onClick:function(){function E(){return h("disk",{option:"save",savetype:"ue"})}return E}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!C.disk,icon:"arrow-circle-up",content:"Export SE",onClick:function(){function E(){return h("disk",{option:"save",savetype:"se"})}return E}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Actions",children:[(0,e.createComponentVNode)(2,o.Button,{disabled:!C.podready,icon:"user-plus",content:"Clone",onClick:function(){function E(){return h("clone",{ref:x})}return E}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"trash",content:"Delete",onClick:function(){function E(){return h("del_rec")}return E}()})]})]})})},p=r.CloningConsole=function(){function c(v,b){var g=(0,t.useBackend)(b),h=g.act,C=g.data,N=C.menu;return(0,y.modalRegisterBodyOverride)("view_rec",S),(0,e.createComponentVNode)(2,V.Window,{width:640,height:520,children:[(0,e.createComponentVNode)(2,y.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),(0,e.createComponentVNode)(2,V.Window.Content,{className:"Layout__content--flexColumn",children:[(0,e.createComponentVNode)(2,s),(0,e.createComponentVNode)(2,m),(0,e.createComponentVNode)(2,i),(0,e.createComponentVNode)(2,o.Section,{noTopPadding:!0,flexGrow:"1",children:(0,e.createComponentVNode)(2,l)})]})]})}return c}(),i=function(v,b){var g=(0,t.useBackend)(b),h=g.act,C=g.data,N=C.menu;return(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:N===1,icon:"home",onClick:function(){function x(){return h("menu",{num:1})}return x}(),children:"Main"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:N===2,icon:"folder",onClick:function(){function x(){return h("menu",{num:2})}return x}(),children:"Records"})]})},l=function(v,b){var g=(0,t.useBackend)(b),h=g.data,C=h.menu,N;return C===1?N=(0,e.createComponentVNode)(2,f):C===2&&(N=(0,e.createComponentVNode)(2,u)),N},f=function(v,b){var g=(0,t.useBackend)(b),h=g.act,C=g.data,N=C.loading,x=C.scantemp,B=C.occupant,L=C.locked,w=C.can_brainscan,A=C.scan_mode,T=C.numberofpods,E=C.pods,O=C.selected_pod,P=L&&!!B;return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Section,{title:"Scanner",level:"2",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{inline:!0,color:"label",children:"Scanner Lock:\xA0"}),(0,e.createComponentVNode)(2,o.Button,{disabled:!B,selected:P,icon:P?"toggle-on":"toggle-off",content:P?"Engaged":"Disengaged",onClick:function(){function R(){return h("lock")}return R}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:P||!B,icon:"user-slash",content:"Eject Occupant",onClick:function(){function R(){return h("eject")}return R}()})],4),children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Status",children:N?(0,e.createComponentVNode)(2,o.Box,{color:"average",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"spinner",spin:!0}),"\xA0 Scanning..."]}):(0,e.createComponentVNode)(2,o.Box,{color:x.color,children:x.text})}),!!w&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Scan Mode",children:(0,e.createComponentVNode)(2,o.Button,{icon:A?"brain":"male",content:A?"Brain":"Body",onClick:function(){function R(){return h("toggle_mode")}return R}()})})]}),(0,e.createComponentVNode)(2,o.Button,{disabled:!B||N,icon:"user",content:"Scan Occupant",mt:"0.5rem",mb:"0",onClick:function(){function R(){return h("scan")}return R}()})]}),(0,e.createComponentVNode)(2,o.Section,{title:"Pods",level:"2",children:T?E.map(function(R,F){var j;return R.status==="cloning"?j=(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:"100",value:R.progress/100,ranges:{good:[.75,1/0],average:[.25,.75],bad:[-1/0,.25]},mt:"0.5rem",children:(0,e.createComponentVNode)(2,o.Box,{textAlign:"center",children:(0,a.round)(R.progress,0)+"%"})}):R.status==="mess"?j=(0,e.createComponentVNode)(2,o.Box,{bold:!0,color:"bad",mt:"0.5rem",children:"ERROR"}):j=(0,e.createComponentVNode)(2,o.Button,{selected:O===R.pod,icon:O===R.pod&&"check",content:"Select",mt:"0.5rem",onClick:function(){function W(){return h("selectpod",{ref:R.pod})}return W}()}),(0,e.createComponentVNode)(2,o.Box,{width:"64px",textAlign:"center",display:"inline-block",mr:"0.5rem",children:[(0,e.createVNode)(1,"img",null,null,1,{src:(0,k.resolveAsset)("pod_"+R.status+".gif"),style:{width:"100%","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}}),(0,e.createComponentVNode)(2,o.Box,{color:"label",children:["Pod #",F+1]}),(0,e.createComponentVNode)(2,o.Box,{bold:!0,color:R.biomass>=150?"good":"bad",inline:!0,children:[(0,e.createComponentVNode)(2,o.Icon,{name:R.biomass>=150?"circle":"circle-o"}),"\xA0",R.biomass]}),j]},F)}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"No pods detected. Unable to clone."})})],4)},u=function(v,b){var g=(0,t.useBackend)(b),h=g.act,C=g.data,N=C.records;return N.length?(0,e.createComponentVNode)(2,o.Box,{mt:"0.5rem",children:N.map(function(x,B){return(0,e.createComponentVNode)(2,o.Button,{icon:"user",mb:"0.5rem",content:x.realname,onClick:function(){function L(){return h("view_rec",{ref:x.record})}return L}()},B)})}):(0,e.createComponentVNode)(2,o.Flex,{height:"100%",children:(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No records found."]})})},s=function(v,b){var g,h=(0,t.useBackend)(b),C=h.act,N=h.data,x=N.temp;if(!(!x||!x.text||x.text.length<=0)){var B=(g={},g[x.style]=!0,g);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.NoticeBox,Object.assign({},B,{children:[(0,e.createComponentVNode)(2,o.Box,{display:"inline-block",verticalAlign:"middle",children:x.text}),(0,e.createComponentVNode)(2,o.Button,{icon:"times-circle",float:"right",onClick:function(){function L(){return C("cleartemp")}return L}()}),(0,e.createComponentVNode)(2,o.Box,{clear:"both"})]})))}},m=function(v,b){var g=(0,t.useBackend)(b),h=g.act,C=g.data,N=C.scanner,x=C.numberofpods,B=C.autoallowed,L=C.autoprocess,w=C.disk;return(0,e.createComponentVNode)(2,o.Section,{title:"Status",buttons:(0,e.createFragment)([!!B&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{inline:!0,color:"label",children:"Auto-processing:\xA0"}),(0,e.createComponentVNode)(2,o.Button,{selected:L,icon:L?"toggle-on":"toggle-off",content:L?"Enabled":"Disabled",onClick:function(){function A(){return h("autoprocess",{on:L?0:1})}return A}()})],4),(0,e.createComponentVNode)(2,o.Button,{disabled:!w,icon:"eject",content:"Eject Disk",onClick:function(){function A(){return h("disk",{option:"eject"})}return A}()})],0),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Scanner",children:N?(0,e.createComponentVNode)(2,o.Box,{color:"good",children:"Connected"}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"Not connected!"})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Pods",children:x?(0,e.createComponentVNode)(2,o.Box,{color:"good",children:[x," connected"]}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"None connected!"})})]})})}},63818:function(I,r,n){"use strict";r.__esModule=!0,r.CommunicationsComputer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.CommunicationsComputer=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l;i.authenticated?i.is_ai?l="AI":i.authenticated===1?l="Command":i.authenticated===2?l="Captain":l="ERROR: Report This Bug!":l="Not Logged In";var f="View ("+i.messages.length+")",u=(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Authentication",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:i.is_ai&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Access Level",children:"AI"})||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.authenticated?"sign-out-alt":"id-card",selected:i.authenticated,content:i.authenticated?"Log Out ("+l+")":"Log In",onClick:function(){function x(){return p("auth")}return x}()})})})}),!!i.esc_section&&(0,e.createComponentVNode)(2,t.Section,{title:"Escape Shuttle",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[!!i.esc_status&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:i.esc_status}),!!i.esc_callable&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Options",children:(0,e.createComponentVNode)(2,t.Button,{icon:"rocket",content:"Call Shuttle",disabled:!i.authenticated,onClick:function(){function x(){return p("callshuttle")}return x}()})}),!!i.esc_recallable&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Options",children:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Recall Shuttle",disabled:!i.authenticated||i.is_ai,onClick:function(){function x(){return p("cancelshuttle")}return x}()})}),!!i.lastCallLoc&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Last Call/Recall From",children:i.lastCallLoc})]})})],0),s="Make Priority Announcement";i.msg_cooldown>0&&(s+=" ("+i.msg_cooldown+"s)");var m=i.emagged?"Message [UNKNOWN]":"Message CentComm",c="Request Authentication Codes";i.cc_cooldown>0&&(m+=" ("+i.cc_cooldown+"s)",c+=" ("+i.cc_cooldown+"s)");var v=i.str_security_level,b=i.levels.map(function(x){return(0,e.createComponentVNode)(2,t.Button,{icon:x.icon,content:x.name,disabled:!i.authmax||x.id===i.security_level,onClick:function(){function B(){return p("newalertlevel",{level:x.id})}return B}()},x.name)}),g=i.stat_display.presets.map(function(x){return(0,e.createComponentVNode)(2,t.Button,{content:x.label,selected:x.name===i.stat_display.type,disabled:!i.authenticated,onClick:function(){function B(){return p("setstat",{statdisp:x.name})}return B}()},x.name)}),h=i.stat_display.alerts.map(function(x){return(0,e.createComponentVNode)(2,t.Button,{content:x.label,selected:x.alert===i.stat_display.icon,disabled:!i.authenticated,onClick:function(){function B(){return p("setstat",{statdisp:"alert",alert:x.alert})}return B}()},x.alert)}),C;if(i.current_message_title)C=(0,e.createComponentVNode)(2,t.Section,{title:i.current_message_title,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Return To Message List",disabled:!i.authenticated,onClick:function(){function x(){return p("messagelist")}return x}()}),children:(0,e.createComponentVNode)(2,t.Box,{children:i.current_message})});else{var N=i.messages.map(function(x){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:x.title,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"eye",content:"View",disabled:!i.authenticated||i.current_message_title===x.title,onClick:function(){function B(){return p("messagelist",{msgid:x.id})}return B}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Delete",disabled:!i.authenticated,onClick:function(){function B(){return p("delmessage",{msgid:x.id})}return B}()})]},x.id)});C=(0,e.createComponentVNode)(2,t.Section,{title:"Messages Received",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){function x(){return p("main")}return x}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:N})})}switch(i.menu_state){case 1:return(0,e.createComponentVNode)(2,o.Window,{width:500,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[u,(0,e.createComponentVNode)(2,t.Section,{title:"Captain-Only Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Alert",color:i.security_level_color,children:v}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Change Alert",children:b}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Announcement",children:(0,e.createComponentVNode)(2,t.Button,{icon:"bullhorn",content:s,disabled:!i.authmax||i.msg_cooldown>0,onClick:function(){function x(){return p("announce")}return x}()})}),!!i.emagged&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transmit",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"broadcast-tower",color:"red",content:m,disabled:!i.authmax||i.cc_cooldown>0,onClick:function(){function x(){return p("MessageSyndicate")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync-alt",content:"Reset Relays",disabled:!i.authmax,onClick:function(){function x(){return p("RestoreBackup")}return x}()})]})||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transmit",children:(0,e.createComponentVNode)(2,t.Button,{icon:"broadcast-tower",content:m,disabled:!i.authmax||i.cc_cooldown>0,onClick:function(){function x(){return p("MessageCentcomm")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nuclear Device",children:(0,e.createComponentVNode)(2,t.Button,{icon:"bomb",content:c,disabled:!i.authmax||i.cc_cooldown>0,onClick:function(){function x(){return p("nukerequest")}return x}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Command Staff Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Displays",children:(0,e.createComponentVNode)(2,t.Button,{icon:"tv",content:"Change Status Displays",disabled:!i.authenticated,onClick:function(){function x(){return p("status")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Incoming Messages",children:(0,e.createComponentVNode)(2,t.Button,{icon:"folder-open",content:f,disabled:!i.authenticated,onClick:function(){function x(){return p("messagelist")}return x}()})})]})})]})});case 2:return(0,e.createComponentVNode)(2,o.Window,{width:500,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[u,(0,e.createComponentVNode)(2,t.Section,{title:"Modify Status Screens",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){function x(){return p("main")}return x}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Presets",children:g}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Alerts",children:h}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Message Line 1",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:i.stat_display.line_1,disabled:!i.authenticated,onClick:function(){function x(){return p("setmsg1")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Message Line 2",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:i.stat_display.line_2,disabled:!i.authenticated,onClick:function(){function x(){return p("setmsg2")}return x}()})})]})})]})});case 3:return(0,e.createComponentVNode)(2,o.Window,{width:500,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[u,C]})});default:return(0,e.createComponentVNode)(2,o.Window,{width:500,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[u,"ERRROR. Unknown menu_state: ",i.menu_state,"Please report this to NT Technical Support."]})})}}return y}()},21813:function(I,r,n){"use strict";r.__esModule=!0,r.Contractor=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),d=n(73379),y=n(98595);function V(b,g){b.prototype=Object.create(g.prototype),b.prototype.constructor=b,k(b,g)}function k(b,g){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(h,C){return h.__proto__=C,h},k(b,g)}var S={1:["ACTIVE","good"],2:["COMPLETED","good"],3:["FAILED","bad"]},p=["Recording biometric data...","Analyzing embedded syndicate info...","STATUS CONFIRMED","Contacting Syndicate database...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Response received, ack 4851234...","CONFIRM ACC "+Math.round(Math.random()*2e4),"Setting up private accounts...","CONTRACTOR ACCOUNT CREATED","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","CONTRACTS FOUND","WELCOME, AGENT"],i=r.Contractor=function(){function b(g,h){var C=(0,t.useBackend)(h),N=C.act,x=C.data,B;x.unauthorized?B=(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,e.createComponentVNode)(2,c,{height:"100%",allMessages:["ERROR: UNAUTHORIZED USER"],finishedTimeout:100,onFinished:function(){function T(){}return T}()})}):x.load_animation_completed?B=(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Flex.Item,{basis:"content",children:(0,e.createComponentVNode)(2,l)}),(0,e.createComponentVNode)(2,o.Flex.Item,{basis:"content",mt:"0.5rem",children:(0,e.createComponentVNode)(2,f)}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",overflow:"hidden",children:x.page===1?(0,e.createComponentVNode)(2,u,{height:"100%"}):(0,e.createComponentVNode)(2,m,{height:"100%"})})],4):B=(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,e.createComponentVNode)(2,c,{height:"100%",allMessages:p,finishedTimeout:3e3,onFinished:function(){function T(){return N("complete_load_animation")}return T}()})});var L=(0,t.useLocalState)(h,"viewingPhoto",""),w=L[0],A=L[1];return(0,e.createComponentVNode)(2,y.Window,{width:500,height:600,theme:"syndicate",children:[w&&(0,e.createComponentVNode)(2,v),(0,e.createComponentVNode)(2,y.Window.Content,{className:"Contractor",children:(0,e.createComponentVNode)(2,o.Flex,{direction:"column",height:"100%",children:B})})]})}return b}(),l=function(g,h){var C=(0,t.useBackend)(h),N=C.act,x=C.data,B=x.tc_available,L=x.tc_paid_out,w=x.completed_contracts,A=x.rep;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Summary",buttons:(0,e.createComponentVNode)(2,o.Box,{verticalAlign:"middle",mt:"0.25rem",children:[A," Rep"]})},g,{children:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Box,{flexBasis:"50%",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"TC Available",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,o.Flex,{align:"center",children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",children:[B," TC"]}),(0,e.createComponentVNode)(2,o.Button,{disabled:B<=0,content:"Claim",mx:"0.75rem",mb:"0",flexBasis:"content",onClick:function(){function T(){return N("claim")}return T}()})]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"TC Earned",children:[L," TC"]})]})}),(0,e.createComponentVNode)(2,o.Box,{flexBasis:"50%",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Contracts Completed",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,o.Box,{height:"20px",lineHeight:"20px",display:"inline-block",children:w})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Contractor Status",verticalAlign:"middle",children:"ACTIVE"})]})})]})})))},f=function(g,h){var C=(0,t.useBackend)(h),N=C.act,x=C.data,B=x.page;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Tabs,Object.assign({},g,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:B===1,onClick:function(){function L(){return N("page",{page:1})}return L}(),children:[(0,e.createComponentVNode)(2,o.Icon,{name:"suitcase"}),"Contracts"]}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:B===2,onClick:function(){function L(){return N("page",{page:2})}return L}(),children:[(0,e.createComponentVNode)(2,o.Icon,{name:"shopping-cart"}),"Hub"]})]})))},u=function(g,h){var C=(0,t.useBackend)(h),N=C.act,x=C.data,B=x.contracts,L=x.contract_active,w=x.can_extract,A=!!L&&B.filter(function(R){return R.status===1})[0],T=A&&A.time_left>0,E=(0,t.useLocalState)(h,"viewingPhoto",""),O=E[0],P=E[1];return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Available Contracts",overflow:"auto",buttons:(0,e.createComponentVNode)(2,o.Button,{disabled:!w||T,icon:"parachute-box",content:["Call Extraction",T&&(0,e.createComponentVNode)(2,d.Countdown,{timeLeft:A.time_left,format:function(){function R(F,j){return" ("+j.substr(3)+")"}return R}()})],onClick:function(){function R(){return N("extract")}return R}()})},g,{children:B.slice().sort(function(R,F){return R.status===1?-1:F.status===1?1:R.status-F.status}).map(function(R){var F;return(0,e.createComponentVNode)(2,o.Section,{title:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",color:R.status===1&&"good",children:R.target_name}),(0,e.createComponentVNode)(2,o.Flex.Item,{basis:"content",children:R.has_photo&&(0,e.createComponentVNode)(2,o.Button,{icon:"camera",mb:"-0.5rem",ml:"0.5rem",onClick:function(){function j(){return P("target_photo_"+R.uid+".png")}return j}()})})]}),className:"Contractor__Contract",buttons:(0,e.createComponentVNode)(2,o.Box,{width:"100%",children:[!!S[R.status]&&(0,e.createComponentVNode)(2,o.Box,{color:S[R.status][1],display:"inline-block",mt:R.status!==1&&"0.125rem",mr:"0.25rem",lineHeight:"20px",children:S[R.status][0]}),R.status===1&&(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"ban",color:"bad",content:"Abort",ml:"0.5rem",onClick:function(){function j(){return N("abort")}return j}()})]}),children:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"2",mr:"0.5rem",children:[R.fluff_message,!!R.completed_time&&(0,e.createComponentVNode)(2,o.Box,{color:"good",children:[(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Icon,{name:"check",mr:"0.5rem"}),"Contract completed at ",R.completed_time]}),!!R.dead_extraction&&(0,e.createComponentVNode)(2,o.Box,{color:"bad",mt:"0.5rem",bold:!0,children:[(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"Telecrystals reward reduced drastically as the target was dead during extraction."]}),!!R.fail_reason&&(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:[(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Icon,{name:"times",mr:"0.5rem"}),"Contract failed: ",R.fail_reason]})]}),(0,e.createComponentVNode)(2,o.Flex.Item,{flexBasis:"100%",children:[(0,e.createComponentVNode)(2,o.Flex,{mb:"0.5rem",color:"label",children:["Extraction Zone:\xA0",s(R)]}),(F=R.difficulties)==null?void 0:F.map(function(j,W){return(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:!!L,content:j.name+" ("+j.reward+" TC)",onClick:function(){function z(){return N("activate",{uid:R.uid,difficulty:W+1})}return z}()},W)}),!!R.objective&&(0,e.createComponentVNode)(2,o.Box,{color:"white",bold:!0,children:[R.objective.extraction_name,(0,e.createVNode)(1,"br"),"(",(R.objective.rewards.tc||0)+" TC",",\xA0",(R.objective.rewards.credits||0)+" Credits",")"]})]})]})},R.uid)})})))},s=function(g){if(!(!g.objective||g.status>1)){var h=g.objective.locs.user_area_id,C=g.objective.locs.user_coords,N=g.objective.locs.target_area_id,x=g.objective.locs.target_coords,B=h===N;return(0,e.createComponentVNode)(2,o.Flex.Item,{children:(0,e.createComponentVNode)(2,o.Icon,{name:B?"dot-circle-o":"arrow-alt-circle-right-o",color:B?"green":"yellow",rotation:B?null:-(0,a.rad2deg)(Math.atan2(x[1]-C[1],x[0]-C[0])),lineHeight:B?null:"0.85",size:"1.5"})})}},m=function(g,h){var C=(0,t.useBackend)(h),N=C.act,x=C.data,B=x.rep,L=x.buyables;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Available Purchases",overflow:"auto"},g,{children:L.map(function(w){return(0,e.createComponentVNode)(2,o.Section,{title:w.name,buttons:w.refundable&&(0,e.createComponentVNode)(2,o.Button.Confirm,{content:"Refund ("+w.cost+" Rep)",onClick:function(){function A(){return N("refund",{uid:w.uid})}return A}()}),children:[w.description,(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:B-1&&(0,e.createComponentVNode)(2,o.Box,{as:"span",color:w.stock===0?"bad":"good",ml:"0.5rem",children:[w.stock," in stock"]})]},w.uid)})})))},c=function(b){function g(C){var N;return N=b.call(this,C)||this,N.timer=null,N.state={currentIndex:0,currentDisplay:[]},N}V(g,b);var h=g.prototype;return h.tick=function(){function C(){var N=this.props,x=this.state;if(x.currentIndex<=N.allMessages.length){this.setState(function(L){return{currentIndex:L.currentIndex+1}});var B=x.currentDisplay;B.push(N.allMessages[x.currentIndex])}else clearTimeout(this.timer),setTimeout(N.onFinished,N.finishedTimeout)}return C}(),h.componentDidMount=function(){function C(){var N=this,x=this.props.linesPerSecond,B=x===void 0?2.5:x;this.timer=setInterval(function(){return N.tick()},1e3/B)}return C}(),h.componentWillUnmount=function(){function C(){clearTimeout(this.timer)}return C}(),h.render=function(){function C(){return(0,e.createComponentVNode)(2,o.Box,{m:1,children:this.state.currentDisplay.map(function(N){return(0,e.createFragment)([N,(0,e.createVNode)(1,"br")],0,N)})})}return C}(),g}(e.Component),v=function(g,h){var C=(0,t.useLocalState)(h,"viewingPhoto",""),N=C[0],x=C[1];return(0,e.createComponentVNode)(2,o.Modal,{className:"Contractor__photoZoom",children:[(0,e.createComponentVNode)(2,o.Box,{as:"img",src:N}),(0,e.createComponentVNode)(2,o.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){function B(){return x("")}return B}()})]})}},54151:function(I,r,n){"use strict";r.__esModule=!0,r.ConveyorSwitch=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.ConveyorSwitch=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.slowFactor,f=i.minSpeed,u=i.maxSpeed,s=i.oneWay,m=i.position;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:150,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Lever position",children:m>0?"forward":m<0?"reverse":"neutral"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Allow reverse",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!s,onClick:function(){function c(){return p("toggleOneWay")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Slowdown factor",children:(0,e.createComponentVNode)(2,t.Flex,{children:[(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-left",onClick:function(){function c(){return p("slowFactor",{value:l-.5})}return c}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-left",onClick:function(){function c(){return p("slowFactor",{value:l-.1})}return c}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Slider,{width:"100px",mx:"1px",value:l,fillValue:l,minValue:f,maxValue:u,step:.1,format:function(){function c(v){return v+"s."}return c}(),onChange:function(){function c(v,b){return p("slowFactor",{value:b})}return c}()})}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-right",onClick:function(){function c(){return p("slowFactor",{value:l+.1})}return c}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-right",onClick:function(){function c(){return p("slowFactor",{value:l+.5})}return c}()})," "]})]})})]})})})})}return y}()},73169:function(I,r,n){"use strict";r.__esModule=!0,r.CrewMonitor=void 0;var e=n(89005),a=n(88510),t=n(25328),o=n(72253),d=n(36036),y=n(36352),V=n(76910),k=n(98595),S=function(v,b){return v.dead?"Deceased":parseInt(v.health,10)<=b?"Critical":parseInt(v.stat,10)===1?"Unconscious":"Living"},p=function(v,b){return v.dead?"red":parseInt(v.health,10)<=b?"orange":parseInt(v.stat,10)===1?"blue":"green"},i=r.CrewMonitor=function(){function c(v,b){var g=(0,o.useBackend)(b),h=g.act,C=g.data,N=(0,o.useLocalState)(b,"tabIndex",C.IndexToggler),x=N[0],B=N[1],L=function(){function w(A){switch(A){case 0:return(0,e.createComponentVNode)(2,u);case 1:return(0,e.createComponentVNode)(2,s);case 2:return(0,e.createComponentVNode)(2,f);case 3:return(0,e.createComponentVNode)(2,m);default:return"WE SHOULDN'T BE HERE!"}}return w}();return(0,e.createComponentVNode)(2,k.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,k.Window.Content,{children:(0,e.createComponentVNode)(2,d.Box,{fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,d.Tabs,{children:[C.isBS?(0,e.createComponentVNode)(2,d.Tabs.Tab,{selected:x===0,onClick:function(){function w(){return B(0)}return w}(),children:[(0,e.createComponentVNode)(2,d.Icon,{name:"table"})," Command Data View"]},"ComDataView"):null,C.isBP?(0,e.createComponentVNode)(2,d.Tabs.Tab,{selected:x===1,onClick:function(){function w(){return B(1)}return w}(),children:[(0,e.createComponentVNode)(2,d.Icon,{name:"table"})," Security Data View"]},"SecDataView"):null,(0,e.createComponentVNode)(2,d.Tabs.Tab,{selected:x===2,onClick:function(){function w(){return B(2)}return w}(),children:[(0,e.createComponentVNode)(2,d.Icon,{name:"table"})," Data View"]},"DataView"),(0,e.createComponentVNode)(2,d.Tabs.Tab,{selected:x===3,onClick:function(){function w(){return B(3)}return w}(),children:[(0,e.createComponentVNode)(2,d.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),L(x)]})})})}return c}(),l=function(v){var b=v.crewData,g=v.context,h=(0,o.useBackend)(g),C=h.act,N=h.data,x=(0,a.sortBy)(function(T){return T.name})(b||[]),B=(0,o.useLocalState)(g,"search",""),L=B[0],w=B[1],A=(0,t.createSearch)(L,function(T){return T.name+"|"+T.assignment+"|"+T.area});return(0,e.createComponentVNode)(2,d.Box,{children:[(0,e.createComponentVNode)(2,d.Input,{placeholder:"Search by name, assignment or location..",width:"100%",onInput:function(){function T(E,O){return w(O)}return T}()}),(0,e.createComponentVNode)(2,d.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,d.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,d.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,d.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,d.Table.Cell,{children:"Location"})]}),x.filter(A).map(function(T){return(0,e.createComponentVNode)(2,d.Table.Row,{bold:!!T.is_command,children:[(0,e.createComponentVNode)(2,y.TableCell,{children:[T.name," (",T.assignment,")"]}),(0,e.createComponentVNode)(2,y.TableCell,{children:[(0,e.createComponentVNode)(2,d.Box,{inline:!0,color:p(T,N.critThreshold),children:S(T,N.critThreshold)}),T.sensor_type>=2?(0,e.createComponentVNode)(2,d.Box,{inline:!0,children:["(",(0,e.createComponentVNode)(2,d.Box,{inline:!0,color:V.COLORS.damageType.oxy,children:T.oxy}),"|",(0,e.createComponentVNode)(2,d.Box,{inline:!0,color:V.COLORS.damageType.toxin,children:T.tox}),"|",(0,e.createComponentVNode)(2,d.Box,{inline:!0,color:V.COLORS.damageType.burn,children:T.fire}),"|",(0,e.createComponentVNode)(2,d.Box,{inline:!0,color:V.COLORS.damageType.brute,children:T.brute}),")"]}):null]}),(0,e.createComponentVNode)(2,y.TableCell,{children:T.sensor_type===3?N.isAI?(0,e.createComponentVNode)(2,d.Button,{fluid:!0,icon:"location-arrow",content:T.area+" ("+T.x+", "+T.y+")",onClick:function(){function E(){return C("track",{track:T.ref})}return E}()}):T.area+" ("+T.x+", "+T.y+")":"Not Available"})]},T.ref)})]})]})},f=function(v,b){var g=(0,o.useBackend)(b),h=g.act,C=g.data,N=C.crewmembers||[];return(0,e.createComponentVNode)(2,l,{crewData:N,context:b})},u=function(v,b){var g=(0,o.useBackend)(b),h=g.act,C=g.data,N=C.crewmembers.filter(function(x){return x.is_command})||[];return(0,e.createComponentVNode)(2,l,{crewData:N,context:b})},s=function(v,b){var g=(0,o.useBackend)(b),h=g.act,C=g.data,N=C.crewmembers.filter(function(x){return x.is_security})||[];return(0,e.createComponentVNode)(2,l,{crewData:N,context:b})},m=function(v,b){var g=(0,o.useBackend)(b),h=g.act,C=g.data,N=C.stationLevelNum,x=C.stationLevelName,B=(0,o.useLocalState)(b,"zoom",1),L=B[0],w=B[1],A=(0,o.useLocalState)(b,"z_current",N[0]),T=A[0],E=A[1],O=function(j){return j.is_command&&C.isBS||j.is_security&&C.isBP?"square":"circle"},P=function(j){return j.is_command&&C.isBS||j.is_security&&C.isBP?10:6},R=function(j,W){return j.is_command&&C.isBS||j.is_security&&C.isBP?j.dead?"red":parseInt(j.health,10)<=W?"orange":parseInt(j.stat,10)===1?"blue":"violet":p(j,W)};return(0,e.createComponentVNode)(2,d.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,e.createComponentVNode)(2,d.NanoMap,{onZoom:function(){function F(j){return w(j)}return F}(),zLevels:N,zNames:x,z_current:T,setZCurrent:E,children:C.crewmembers.filter(function(F){return F.sensor_type===3}).map(function(F){return(0,e.createComponentVNode)(2,d.NanoMap.Marker,{x:F.x,y:F.y,z:F.z,z_current:T,zoom:L,icon:O(F),size:P(F),tooltip:F.name+" ("+F.assignment+")",color:R(F,C.critThreshold),onClick:function(){function j(){C.isAI&&h("track",{track:F.ref})}return j}()},F.ref)})})})}},63987:function(I,r,n){"use strict";r.__esModule=!0,r.Cryo=void 0;var e=n(89005),a=n(41260),t=n(72253),o=n(36036),d=n(98595),y=[{label:"\u0410\u0441\u0444\u0438\u043A\u0441\u0438\u044F",type:"oxyLoss"},{label:"\u0418\u043D\u0442\u043E\u043A\u0441\u0438\u043A\u0430\u0446\u0438\u044F",type:"toxLoss"},{label:"\u0420\u0430\u043D\u044B",type:"bruteLoss"},{label:"\u041E\u0436\u043E\u0433\u0438",type:"fireLoss"}],V=[["good","\u0412 \u0441\u043E\u0437\u043D\u0430\u043D\u0438\u0438"],["average","\u0411\u0435\u0437 \u0441\u043E\u0437\u043D\u0430\u043D\u0438\u044F"],["bad","\u0422\u0420\u0423\u041F"]],k=r.Cryo=function(){function i(l,f){return(0,e.createComponentVNode)(2,d.Window,{width:520,height:490,children:(0,e.createComponentVNode)(2,d.Window.Content,{children:(0,e.createComponentVNode)(2,S)})})}return i}(),S=function(l,f){var u=(0,t.useBackend)(f),s=u.act,m=u.data,c=m.isOperating,v=m.hasOccupant,b=m.occupant,g=b===void 0?[]:b,h=m.cellTemperature,C=m.cellTemperatureStatus,N=m.isBeakerLoaded,x=m.auto_eject_healthy,B=m.auto_eject_dead;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:2,children:(0,e.createComponentVNode)(2,o.Section,{title:"\u041F\u0430\u0446\u0438\u0435\u043D\u0442",fill:!0,buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"user-slash",onClick:function(){function L(){return s("ejectOccupant")}return L}(),disabled:!v,children:"\u0418\u0437\u0432\u043B\u0435\u0447\u044C"}),children:v?(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u041F\u0430\u0446\u0438\u0435\u043D\u0442",children:g.name||"\u0418\u043C\u044F \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u043E"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0417\u0434\u043E\u0440\u043E\u0432\u044C\u0435",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:g.health,max:g.maxHealth,value:g.health/g.maxHealth,color:g.health>0?"good":"average",children:(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:Math.round(g.health)})})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0421\u0442\u0430\u0442\u0443\u0441",color:V[g.stat][0],children:V[g.stat][1]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0422\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430",children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:Math.round(g.bodyTemperature)})," ","K"]}),(0,e.createComponentVNode)(2,o.LabeledList.Divider),y.map(function(L){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:L.label,children:(0,e.createComponentVNode)(2,o.ProgressBar,{value:g[L.type]/100,ranges:{bad:[.01,1/0]},children:(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:Math.round(g[L.type])})})},L.id)})]}):(0,e.createComponentVNode)(2,o.Stack,{fill:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:"1",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"\u041F\u0430\u0446\u0438\u0435\u043D\u0442 \u043D\u0435 \u043E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D."]})})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{title:"\u041A\u0440\u0438\u043E\u043A\u0430\u043F\u0441\u0443\u043B\u0430",fill:!0,buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"eject",onClick:function(){function L(){return s("ejectBeaker")}return L}(),disabled:!N,children:"\u0418\u0437\u0432\u043B\u0435\u0447\u044C \u0451\u043C\u043A\u043E\u0441\u0442\u044C"}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u041F\u0438\u0442\u0430\u043D\u0438\u0435",children:(0,e.createComponentVNode)(2,o.Button,{icon:"power-off",onClick:function(){function L(){return s(c?"switchOff":"switchOn")}return L}(),selected:c,children:c?"\u0412\u043A\u043B":"\u0412\u044B\u043A\u043B"})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0422\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430",color:C,children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:h})," K"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0401\u043C\u043A\u043E\u0441\u0442\u044C",children:(0,e.createComponentVNode)(2,p)}),(0,e.createComponentVNode)(2,o.LabeledList.Divider),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0410\u0432\u0442\u043E\u0438\u0437\u0432\u043B\u0435\u0447\u0435\u043D\u0438\u0435 \u0437\u0434\u043E\u0440\u043E\u0432\u044B\u0445 \u043F\u0430\u0446\u0438\u0435\u043D\u0442\u043E\u0432",children:(0,e.createComponentVNode)(2,o.Button,{icon:x?"toggle-on":"toggle-off",selected:x,onClick:function(){function L(){return s(x?"auto_eject_healthy_off":"auto_eject_healthy_on")}return L}(),children:x?"\u0412\u043A\u043B":"\u0412\u044B\u043A\u043B"})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0410\u0432\u0442\u043E\u0438\u0437\u0432\u043B\u0435\u0447\u0435\u043D\u0438\u0435 \u043C\u0451\u0440\u0442\u0432\u044B\u0445 \u043F\u0430\u0446\u0438\u0435\u043D\u0442\u043E\u0432",children:(0,e.createComponentVNode)(2,o.Button,{icon:B?"toggle-on":"toggle-off",selected:B,onClick:function(){function L(){return s(B?"auto_eject_dead_off":"auto_eject_dead_on")}return L}(),children:B?"\u0412\u043A\u043B":"\u0412\u044B\u043A\u043B"})})]})})})]})},p=function(l,f){var u=(0,t.useBackend)(f),s=u.act,m=u.data,c=m.isBeakerLoaded,v=m.beakerLabel,b=m.beakerVolume;return c?(0,e.createFragment)([v?"\xAB"+v+"\xBB":(0,e.createComponentVNode)(2,o.Box,{color:"average",children:"\u0401\u043C\u043A\u043E\u0441\u0442\u044C \u043D\u0435 \u043F\u043E\u0434\u043F\u0438\u0441\u0430\u043D\u0430"}),(0,e.createComponentVNode)(2,o.Box,{color:!b&&"bad",children:b?(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:b,format:function(){function g(h){var C=Math.round(h),N=(0,a.declensionRu)(C,"\u041E\u0441\u0442\u0430\u043B\u0430\u0441\u044C","\u041E\u0441\u0442\u0430\u043B\u0438\u0441\u044C","\u041E\u0441\u0442\u0430\u043B\u043E\u0441\u044C"),x=(0,a.declensionRu)(C,"\u0435\u0434\u0438\u043D\u0438\u0446\u0430","\u0435\u0434\u0438\u043D\u0438\u0446\u044B","\u0435\u0434\u0438\u043D\u0438\u0446");return N+" "+C+" "+x}return g}()}):"\u0401\u043C\u043A\u043E\u0441\u0442\u044C \u043F\u0443\u0441\u0442\u0430"})],0):(0,e.createComponentVNode)(2,o.Box,{color:"average",children:"\u0401\u043C\u043A\u043E\u0441\u0442\u044C \u043D\u0435 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0430"})}},86099:function(I,r,n){"use strict";r.__esModule=!0,r.CryopodConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=n(25328),y=r.CryopodConsole=function(){function S(p,i){var l=(0,a.useBackend)(i),f=l.data,u=f.account_name,s=f.allow_items;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:480,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Hello, "+(u||"[REDACTED]")+"!",children:"This automated cryogenic freezing unit will safely store your corporeal form until your next assignment."}),(0,e.createComponentVNode)(2,V),!!s&&(0,e.createComponentVNode)(2,k)]})})}return S}(),V=function(p,i){var l=(0,a.useBackend)(i),f=l.data,u=f.frozen_crew;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Stored Crew",children:u.length?(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:u.map(function(s,m){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:s.name,children:s.rank},m)})})}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No stored crew!"})})},k=function(p,i){var l=(0,a.useBackend)(i),f=l.act,u=l.data,s=u.frozen_items,m=function(v){var b=v.toString();return b.startsWith("the ")&&(b=b.slice(4,b.length)),(0,d.toTitleCase)(b)};return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Stored Items",children:s.length?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:s.map(function(c){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:m(c.name),buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",content:"Drop",mr:1,onClick:function(){function v(){return f("one_item",{item:c.uid})}return v}()})},c)})})}),(0,e.createComponentVNode)(2,t.Button,{content:"Drop All Items",color:"red",onClick:function(){function c(){return f("all_items")}return c}()})],4):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No stored items!"})})}},94848:function(I,r,n){"use strict";r.__esModule=!0,r.Customat=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),d=n(98595),y=function(S,p){var i=(0,t.useBackend)(p),l=i.act,f=i.data,u=S.product,s=f.user,m=f.userMoney,c=f.vend_ready,v=u.price===0,b="ERROR!",g="";v?(b="FREE",g="arrow-circle-down"):(b=u.price,g="shopping-cart");var h=!c||u.stock===0||!v&&u.price>m;return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+u.icon,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,e.createComponentVNode)(2,o.Table.Cell,{bold:!0,children:u.name}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,o.Box,{color:u.stock<=0&&"bad"||"good",children:[u.stock," in stock"]})}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,disabled:h,icon:g,content:b,textAlign:"left",onClick:function(){function C(){return l("vend",{Key:u.Key})}return C}()})})]})},V=r.Customat=function(){function k(S,p){var i=(0,t.useBackend)(p),l=i.act,f=i.data,u=f.guestNotice,s=f.userMoney,m=f.user,c=f.products,v=f.vend_ready,b=f.panel_open,g=f.speaker;return(0,e.createComponentVNode)(2,d.Window,{width:470,height:600,title:"Customat",children:(0,e.createComponentVNode)(2,d.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Section,{title:"User",children:m&&(0,e.createComponentVNode)(2,o.Box,{children:["Welcome, ",(0,e.createVNode)(1,"b",null,m.name,0),", ",(0,e.createVNode)(1,"b",null,m.job||"Unemployed",0),"!",(0,e.createVNode)(1,"br"),"Your balance is ",(0,e.createVNode)(1,"b",null,[s,(0,e.createTextVNode)(" credits")],0),"."]})||(0,e.createComponentVNode)(2,o.Box,{color:"light-grey",children:u})}),!!b&&(0,e.createComponentVNode)(2,o.Section,{title:"Maintenance",children:(0,e.createComponentVNode)(2,o.Button,{icon:g?"check":"volume-mute",selected:g,content:"Speaker",textAlign:"left",onClick:function(){function h(){return l("toggle_voice",{})}return h}()})})]}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{title:"Products",fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{children:c.map(function(h){return(0,e.createComponentVNode)(2,y,{product:h,productStock:h.stock},h.name)})})})})]})})})}return k}()},12692:function(I,r,n){"use strict";r.__esModule=!0,r.DNAModifier=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=n(3939),y=[["good","Alive"],["average","Critical"],["bad","DEAD"]],V=[["ui","Modify U.I.","dna"],["se","Modify S.E.","dna"],["buffer","Transfer Buffers","syringe"],["rejuvenators","Rejuvenators","flask"]],k=[5,10,20,30,50],S=r.DNAModifier=function(){function h(C,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,w=L.irradiating,A=L.dnaBlockSize,T=L.occupant;N.dnaBlockSize=A,N.isDNAInvalid=!T.isViableSubject||!T.uniqueIdentity||!T.structuralEnzymes;var E;return w&&(E=(0,e.createComponentVNode)(2,b,{duration:w})),(0,e.createComponentVNode)(2,o.Window,{width:660,height:775,children:[(0,e.createComponentVNode)(2,d.ComplexModal),E,(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,p)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,i)})]})})]})}return h}(),p=function(C,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,w=L.locked,A=L.hasOccupant,T=L.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"Occupant",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{color:"label",inline:!0,mr:"0.5rem",children:"Door Lock:"}),(0,e.createComponentVNode)(2,t.Button,{disabled:!A,selected:w,icon:w?"toggle-on":"toggle-off",content:w?"Engaged":"Disengaged",onClick:function(){function E(){return B("toggleLock")}return E}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!A||w,icon:"user-slash",content:"Eject",onClick:function(){function E(){return B("ejectOccupant")}return E}()})],4),children:A?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:T.name}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:T.minHealth,max:T.maxHealth,value:T.health/T.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:y[T.stat][0],children:y[T.stat][1]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider)]})}),N.isDNAInvalid?(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-circle"}),"\xA0 The occupant's DNA structure is ruined beyond recognition, please insert a subject with an intact DNA structure."]}):(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Radiation",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:"0",max:"100",value:T.radiationLevel/100,color:"average"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Unique Enzymes",children:L.occupant.uniqueEnzymes?L.occupant.uniqueEnzymes:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-circle"}),"\xA0 Unknown"]})})]})],0):(0,e.createComponentVNode)(2,t.Box,{color:"label",children:"Cell unoccupied."})})},i=function(C,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,w=L.selectedMenuKey,A=L.hasOccupant,T=L.occupant;if(A){if(N.isDNAInvalid)return(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No operation possible on this subject."]})})})}else return(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No occupant in DNA modifier."]})})});var E;return w==="ui"?E=(0,e.createFragment)([(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,u)],4):w==="se"?E=(0,e.createFragment)([(0,e.createComponentVNode)(2,f),(0,e.createComponentVNode)(2,u)],4):w==="buffer"?E=(0,e.createComponentVNode)(2,s):w==="rejuvenators"&&(E=(0,e.createComponentVNode)(2,v)),(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Tabs,{children:V.map(function(O,P){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:O[2],selected:w===O[0],onClick:function(){function R(){return B("selectMenuKey",{key:O[0]})}return R}(),children:O[1]},P)})}),E]})},l=function(C,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,w=L.selectedUIBlock,A=L.selectedUISubBlock,T=L.selectedUITarget,E=L.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"Modify Unique Identifier",children:[(0,e.createComponentVNode)(2,g,{dnaString:E.uniqueIdentity,selectedBlock:w,selectedSubblock:A,blockSize:N.dnaBlockSize,action:"selectUIBlock"}),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:15,stepPixelSize:"20",value:T,format:function(){function O(P){return P.toString(16).toUpperCase()}return O}(),ml:"0",onChange:function(){function O(P,R){return B("changeUITarget",{value:R})}return O}()})})}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"Irradiate Block",mt:"0.5rem",onClick:function(){function O(){return B("pulseUIRadiation")}return O}()})]})},f=function(C,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,w=L.selectedSEBlock,A=L.selectedSESubBlock,T=L.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"Modify Structural Enzymes",children:[(0,e.createComponentVNode)(2,g,{dnaString:T.structuralEnzymes,selectedBlock:w,selectedSubblock:A,blockSize:N.dnaBlockSize,action:"selectSEBlock"}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"Irradiate Block",onClick:function(){function E(){return B("pulseSERadiation")}return E}()})]})},u=function(C,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,w=L.radiationIntensity,A=L.radiationDuration;return(0,e.createComponentVNode)(2,t.Section,{title:"Radiation Emitter",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Intensity",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:10,stepPixelSize:20,value:w,popUpPosition:"right",ml:"0",onChange:function(){function T(E,O){return B("radiationIntensity",{value:O})}return T}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Duration",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:20,stepPixelSize:10,unit:"s",value:A,popUpPosition:"right",ml:"0",onChange:function(){function T(E,O){return B("radiationDuration",{value:O})}return T}()})})]}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"Pulse Radiation",tooltip:"Mutates a random block of either the occupant's UI or SE.",tooltipPosition:"top-start",mt:"0.5rem",onClick:function(){function T(){return B("pulseRadiation")}return T}()})]})},s=function(C,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,w=L.buffers,A=w.map(function(T,E){return(0,e.createComponentVNode)(2,m,{id:E+1,name:"Buffer "+(E+1),buffer:T},E)});return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{height:"75%",mt:1,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Buffers",children:A})}),(0,e.createComponentVNode)(2,t.Stack.Item,{height:"25%",children:(0,e.createComponentVNode)(2,c)})]})},m=function(C,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,w=C.id,A=C.name,T=C.buffer,E=L.isInjectorReady,O=A+(T.data?" - "+T.label:"");return(0,e.createComponentVNode)(2,t.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,e.createComponentVNode)(2,t.Section,{title:O,mx:"0",lineHeight:"18px",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Confirm,{disabled:!T.data,icon:"trash",content:"Clear",onClick:function(){function P(){return B("bufferOption",{option:"clear",id:w})}return P}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!T.data,icon:"pen",content:"Rename",onClick:function(){function P(){return B("bufferOption",{option:"changeLabel",id:w})}return P}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!T.data||!L.hasDisk,icon:"save",content:"Export",tooltip:"Exports this buffer to the currently loaded data disk.",tooltipPosition:"bottom-start",onClick:function(){function P(){return B("bufferOption",{option:"saveDisk",id:w})}return P}()})],4),children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Write",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"Subject U.I",mb:"0",onClick:function(){function P(){return B("bufferOption",{option:"saveUI",id:w})}return P}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"Subject U.I and U.E.",mb:"0",onClick:function(){function P(){return B("bufferOption",{option:"saveUIAndUE",id:w})}return P}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"Subject S.E.",mb:"0",onClick:function(){function P(){return B("bufferOption",{option:"saveSE",id:w})}return P}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!L.hasDisk||!L.disk.data,icon:"arrow-circle-down",content:"From Disk",mb:"0",onClick:function(){function P(){return B("bufferOption",{option:"loadDisk",id:w})}return P}()})]}),!!T.data&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subject",children:T.owner||(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Unknown"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Data Type",children:[T.type==="ui"?"Unique Identifiers":"Structural Enzymes",!!T.ue&&" and Unique Enzymes"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transfer to",children:[(0,e.createComponentVNode)(2,t.Button,{disabled:!E,icon:E?"syringe":"spinner",iconSpin:!E,content:"Injector",mb:"0",onClick:function(){function P(){return B("bufferOption",{option:"createInjector",id:w})}return P}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!E,icon:E?"syringe":"spinner",iconSpin:!E,content:"Block Injector",mb:"0",onClick:function(){function P(){return B("bufferOption",{option:"createInjector",id:w,block:1})}return P}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"user",content:"Subject",mb:"0",onClick:function(){function P(){return B("bufferOption",{option:"transfer",id:w})}return P}()})]})],4)]}),!T.data&&(0,e.createComponentVNode)(2,t.Box,{color:"label",mt:"0.5rem",children:"This buffer is empty."})]})})},c=function(C,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,w=L.hasDisk,A=L.disk;return(0,e.createComponentVNode)(2,t.Section,{title:"Data Disk",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Confirm,{disabled:!w||!A.data,icon:"trash",content:"Wipe",onClick:function(){function T(){return B("wipeDisk")}return T}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!w,icon:"eject",content:"Eject",onClick:function(){function T(){return B("ejectDisk")}return T}()})],4),children:w?A.data?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Label",children:A.label?A.label:"No label"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subject",children:A.owner?A.owner:(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Unknown"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Data Type",children:[A.type==="ui"?"Unique Identifiers":"Structural Enzymes",!!A.ue&&" and Unique Enzymes"]})]}):(0,e.createComponentVNode)(2,t.Box,{color:"label",children:"Disk is blank."}):(0,e.createComponentVNode)(2,t.Box,{color:"label",textAlign:"center",my:"1rem",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"save-o",size:"4"}),(0,e.createVNode)(1,"br"),"No disk inserted."]})})},v=function(C,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,w=L.isBeakerLoaded,A=L.beakerVolume,T=L.beakerLabel;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Rejuvenators and Beaker",buttons:(0,e.createComponentVNode)(2,t.Button,{disabled:!w,icon:"eject",content:"Eject",onClick:function(){function E(){return B("ejectBeaker")}return E}()}),children:w?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Inject",children:[k.map(function(E,O){return(0,e.createComponentVNode)(2,t.Button,{disabled:E>A,icon:"syringe",content:E,onClick:function(){function P(){return B("injectRejuvenators",{amount:E})}return P}()},O)}),(0,e.createComponentVNode)(2,t.Button,{disabled:A<=0,icon:"syringe",content:"All",onClick:function(){function E(){return B("injectRejuvenators",{amount:A})}return E}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Beaker",children:[(0,e.createComponentVNode)(2,t.Box,{mb:"0.5rem",children:T||"No label"}),A?(0,e.createComponentVNode)(2,t.Box,{color:"good",children:[A," unit",A===1?"":"s"," remaining"]}):(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"Empty"})]})]}):(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"flask",size:5,color:"silver"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"h3",null,"No beaker loaded.",16)]})})})},b=function(C,N){return(0,e.createComponentVNode)(2,t.Dimmer,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"spinner",size:"5",spin:!0}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{color:"average",children:(0,e.createVNode)(1,"h1",null,[(0,e.createComponentVNode)(2,t.Icon,{name:"radiation"}),(0,e.createTextVNode)("\xA0Irradiating occupant\xA0"),(0,e.createComponentVNode)(2,t.Icon,{name:"radiation"})],4)}),(0,e.createComponentVNode)(2,t.Box,{color:"label",children:(0,e.createVNode)(1,"h3",null,[(0,e.createTextVNode)("For "),C.duration,(0,e.createTextVNode)(" second"),C.duration===1?"":"s"],0)})]})},g=function(C,N){for(var x=(0,a.useBackend)(N),B=x.act,L=x.data,w=C.dnaString,A=C.selectedBlock,T=C.selectedSubblock,E=C.blockSize,O=C.action,P=w.split(""),R=0,F=[],j=function(){for(var H=W/E+1,$=[],G=function(){var he=ne+1;$.push((0,e.createComponentVNode)(2,t.Button,{selected:A===H&&T===he,content:P[W+ne],mb:"0",onClick:function(){function Ve(){return B(O,{block:H,subblock:he})}return Ve}()}))},ne=0;ne0?"Yes":"No",selected:i.com>0,onClick:function(){function f(){return p("toggle_com")}return f}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Security",children:l.map(function(f,u){return(0,e.createComponentVNode)(2,t.Button,{selected:i.sec===f,content:f,onClick:function(){function s(){return p("set_sec",{set_sec:f})}return s}()},"sec"+f)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Medical",children:l.map(function(f,u){return(0,e.createComponentVNode)(2,t.Button,{selected:i.med===f,content:f,onClick:function(){function s(){return p("set_med",{set_med:f})}return s}()},"med"+f)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Engineering",children:l.map(function(f,u){return(0,e.createComponentVNode)(2,t.Button,{selected:i.eng===f,content:f,onClick:function(){function s(){return p("set_eng",{set_eng:f})}return s}()},"eng"+f)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Paranormal",children:l.map(function(f,u){return(0,e.createComponentVNode)(2,t.Button,{selected:i.par===f,content:f,onClick:function(){function s(){return p("set_par",{set_par:f})}return s}()},"par"+f)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Janitor",children:l.map(function(f,u){return(0,e.createComponentVNode)(2,t.Button,{selected:i.jan===f,content:f,onClick:function(){function s(){return p("set_jan",{set_jan:f})}return s}()},"jan"+f)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cyborg",children:l.map(function(f,u){return(0,e.createComponentVNode)(2,t.Button,{selected:i.cyb===f,content:f,onClick:function(){function s(){return p("set_cyb",{set_cyb:f})}return s}()},"cyb"+f)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Slots",children:(0,e.createComponentVNode)(2,t.Box,{color:i.total>i.spawnpoints?"red":"green",children:[i.total," total, versus ",i.spawnpoints," spawnpoints"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Dispatch",children:(0,e.createComponentVNode)(2,t.Button,{icon:"ambulance",content:"Send ERT",onClick:function(){function f(){return p("dispatch_ert")}return f}()})})]})})]})})}return y}()},82565:function(I,r,n){"use strict";r.__esModule=!0,r.Electropack=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),d=n(98595),y=r.Electropack=function(){function V(k,S){var p=(0,t.useBackend)(S),i=p.act,l=p.data,f=l.power,u=l.code,s=l.frequency,m=l.minFrequency,c=l.maxFrequency;return(0,e.createComponentVNode)(2,d.Window,{width:360,height:150,children:(0,e.createComponentVNode)(2,d.Window.Content,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,o.Button,{icon:f?"power-off":"times",content:f?"On":"Off",selected:f,onClick:function(){function v(){return i("power")}return v}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Frequency",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Reset",onClick:function(){function v(){return i("reset",{reset:"freq"})}return v}()}),children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:m/10,maxValue:c/10,value:s/10,format:function(){function v(b){return(0,a.toFixed)(b,1)}return v}(),width:"80px",onChange:function(){function v(b,g){return i("freq",{freq:g})}return v}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Code",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Reset",onClick:function(){function v(){return i("reset",{reset:"code"})}return v}()}),children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:u,width:"80px",onChange:function(){function v(b,g){return i("code",{code:g})}return v}()})})]})})})})}return V}()},36730:function(I,r,n){"use strict";r.__esModule=!0,r.EvolutionMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.EvolutionMenu=function(){function k(S,p){return(0,e.createComponentVNode)(2,o.Window,{width:480,height:574,theme:"changeling",children:(0,e.createComponentVNode)(2,o.Window.Content,{className:"Layout__content--flexColumn",children:[(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,V)]})})}return k}(),y=function(S,p){var i=(0,a.useBackend)(p),l=i.act,f=i.data,u=f.evo_points,s=f.can_respec;return(0,e.createComponentVNode)(2,t.Section,{title:"Evolution Points",height:5.5,children:(0,e.createComponentVNode)(2,t.Flex,{children:[(0,e.createComponentVNode)(2,t.Flex.Item,{mt:.5,color:"label",children:"Points remaining:"}),(0,e.createComponentVNode)(2,t.Flex.Item,{mt:.5,ml:2,bold:!0,color:"#1b945c",children:u}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{ml:2.5,disabled:!s,content:"Readapt",icon:"sync",onClick:function(){function m(){return l("readapt")}return m}()}),(0,e.createComponentVNode)(2,t.Button,{tooltip:"By transforming a humanoid into a husk, we gain the ability to readapt our chosen evolutions.",tooltipPosition:"bottom",icon:"question-circle"})]})]})})},V=function(S,p){var i=(0,a.useBackend)(p),l=i.act,f=i.data,u=f.evo_points,s=f.ability_list,m=f.purchased_abilities,c=f.view_mode;return(0,e.createComponentVNode)(2,t.Section,{title:"Abilities",flexGrow:"1",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:c?"square-o":"check-square-o",selected:!c,content:"Compact",onClick:function(){function v(){return l("set_view_mode",{mode:0})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{icon:c?"check-square-o":"square-o",selected:c,content:"Expanded",onClick:function(){function v(){return l("set_view_mode",{mode:1})}return v}()})],4),children:s.map(function(v,b){return(0,e.createComponentVNode)(2,t.Box,{p:.5,mx:-1,className:"candystripe",children:[(0,e.createComponentVNode)(2,t.Flex,{align:"center",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{ml:.5,color:"#dedede",children:v.name}),m.includes(v.power_path)&&(0,e.createComponentVNode)(2,t.Flex.Item,{ml:2,bold:!0,color:"#1b945c",children:"(Purchased)"}),(0,e.createComponentVNode)(2,t.Flex.Item,{mr:3,textAlign:"right",grow:1,children:[(0,e.createComponentVNode)(2,t.Box,{as:"span",color:"label",children:["Cost:"," "]}),(0,e.createComponentVNode)(2,t.Box,{as:"span",bold:!0,color:"#1b945c",children:v.cost})]}),(0,e.createComponentVNode)(2,t.Flex.Item,{textAlign:"right",children:(0,e.createComponentVNode)(2,t.Button,{mr:.5,disabled:v.cost>u||m.includes(v.power_path),content:"Evolve",onClick:function(){function g(){return l("purchase",{power_path:v.power_path})}return g}()})})]}),!!c&&(0,e.createComponentVNode)(2,t.Flex,{color:"#8a8a8a",my:1,ml:1.5,width:"95%",children:v.description+" "+v.helptext})]},b)})})}},17370:function(I,r,n){"use strict";r.__esModule=!0,r.ExosuitFabricator=void 0;var e=n(89005),a=n(35840),t=n(25328),o=n(72253),d=n(36036),y=n(73379),V=n(98595),k=["id","amount","lineDisplay","onClick"];function S(b,g){if(b==null)return{};var h={};for(var C in b)if({}.hasOwnProperty.call(b,C)){if(g.includes(C))continue;h[C]=b[C]}return h}var p=2e3,i={bananium:"clown",tranquillite:"mime"},l=r.ExosuitFabricator=function(){function b(g,h){var C=(0,o.useBackend)(h),N=C.act,x=C.data,B=x.building;return(0,e.createComponentVNode)(2,V.Window,{width:950,height:625,children:(0,e.createComponentVNode)(2,V.Window.Content,{className:"Exofab",children:(0,e.createComponentVNode)(2,d.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,d.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,d.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,d.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,u)}),B&&(0,e.createComponentVNode)(2,d.Stack.Item,{children:(0,e.createComponentVNode)(2,s)})]})}),(0,e.createComponentVNode)(2,d.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,d.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,d.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f)}),(0,e.createComponentVNode)(2,d.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,m)})]})})]})})})}return b}(),f=function(g,h){var C=(0,o.useBackend)(h),N=C.act,x=C.data,B=x.materials,L=x.capacity,w=Object.values(B).reduce(function(A,T){return A+T},0);return(0,e.createComponentVNode)(2,d.Section,{fill:!0,scrollable:!0,title:"Materials",className:"Exofab__materials",buttons:(0,e.createComponentVNode)(2,d.Box,{color:"label",mt:"0.25rem",children:[(w/L*100).toPrecision(3),"% full"]}),children:["metal","glass","silver","gold","uranium","titanium","plasma","diamond","bluespace","bananium","tranquillite","plastic"].map(function(A){return(0,e.createComponentVNode)(2,c,{mt:-2,id:A,bold:A==="metal"||A==="glass",onClick:function(){function T(){return N("withdraw",{id:A})}return T}()},A)})})},u=function(g,h){var C=(0,o.useBackend)(h),N=C.act,x=C.data,B=x.curCategory,L=x.categories,w=x.designs,A=x.syncing,T=(0,o.useLocalState)(h,"searchText",""),E=T[0],O=T[1],P=(0,t.createSearch)(E,function(F){return F.name}),R=w.filter(P);return(0,e.createComponentVNode)(2,d.Section,{fill:!0,scrollable:!0,className:"Exofab__designs",title:(0,e.createComponentVNode)(2,d.Dropdown,{className:"Exofab__dropdown",selected:B,options:L,onSelected:function(){function F(j){return N("category",{cat:j})}return F}()}),buttons:(0,e.createComponentVNode)(2,d.Box,{mt:"2px",children:[(0,e.createComponentVNode)(2,d.Button,{icon:"plus",content:"Queue all",onClick:function(){function F(){return N("queueall")}return F}()}),(0,e.createComponentVNode)(2,d.Button,{disabled:A,iconSpin:A,icon:"sync-alt",content:A?"Synchronizing...":"Synchronize with R&D servers",onClick:function(){function F(){return N("sync")}return F}()})]}),children:[(0,e.createComponentVNode)(2,d.Input,{placeholder:"Search by name...",mb:"0.5rem",width:"100%",onInput:function(){function F(j,W){return O(W)}return F}()}),R.map(function(F){return(0,e.createComponentVNode)(2,v,{design:F},F.id)}),R.length===0&&(0,e.createComponentVNode)(2,d.Box,{color:"label",children:"No designs found."})]})},s=function(g,h){var C=(0,o.useBackend)(h),N=C.act,x=C.data,B=x.building,L=x.buildStart,w=x.buildEnd,A=x.worldTime;return(0,e.createComponentVNode)(2,d.Section,{className:"Exofab__building",stretchContents:!0,children:(0,e.createComponentVNode)(2,d.ProgressBar.Countdown,{start:L,current:A,end:w,children:(0,e.createComponentVNode)(2,d.Stack,{children:[(0,e.createComponentVNode)(2,d.Stack.Item,{children:(0,e.createComponentVNode)(2,d.Icon,{name:"cog",spin:!0})}),(0,e.createComponentVNode)(2,d.Stack.Item,{children:["Building ",B,"\xA0(",(0,e.createComponentVNode)(2,y.Countdown,{current:A,timeLeft:w-A,format:function(){function T(E,O){return O.substr(3)}return T}()}),")"]})]})})})},m=function(g,h){var C=(0,o.useBackend)(h),N=C.act,x=C.data,B=x.queue,L=x.processingQueue,w=Object.entries(x.queueDeficit).filter(function(T){return T[1]<0}),A=B.reduce(function(T,E){return T+E.time},0);return(0,e.createComponentVNode)(2,d.Section,{fill:!0,scrollable:!0,className:"Exofab__queue",title:"Queue",buttons:(0,e.createComponentVNode)(2,d.Box,{children:[(0,e.createComponentVNode)(2,d.Button,{selected:L,icon:L?"toggle-on":"toggle-off",content:"Process",onClick:function(){function T(){return N("process")}return T}()}),(0,e.createComponentVNode)(2,d.Button,{disabled:B.length===0,icon:"eraser",content:"Clear",onClick:function(){function T(){return N("unqueueall")}return T}()})]}),children:(0,e.createComponentVNode)(2,d.Stack,{fill:!0,vertical:!0,children:B.length===0?(0,e.createComponentVNode)(2,d.Box,{color:"label",children:"The queue is empty."}):(0,e.createFragment)([(0,e.createComponentVNode)(2,d.Stack.Item,{className:"Exofab__queue--queue",grow:!0,overflow:"auto",children:B.map(function(T,E){return(0,e.createComponentVNode)(2,d.Box,{color:T.notEnough&&"bad",children:[E+1,". ",T.name,E>0&&(0,e.createComponentVNode)(2,d.Button,{icon:"arrow-up",onClick:function(){function O(){return N("queueswap",{from:E+1,to:E})}return O}()}),E0&&(0,e.createComponentVNode)(2,d.Stack.Item,{className:"Exofab__queue--time",children:[(0,e.createComponentVNode)(2,d.Divider),"Processing time:",(0,e.createComponentVNode)(2,d.Icon,{name:"clock",mx:"0.5rem"}),(0,e.createComponentVNode)(2,d.Box,{inline:!0,bold:!0,children:new Date(A/10*1e3).toISOString().substr(14,5)})]}),Object.keys(w).length>0&&(0,e.createComponentVNode)(2,d.Stack.Item,{className:"Exofab__queue--deficit",shrink:"0",children:[(0,e.createComponentVNode)(2,d.Divider),"Lacking materials to complete:",w.map(function(T){return(0,e.createComponentVNode)(2,d.Box,{children:(0,e.createComponentVNode)(2,c,{id:T[0],amount:-T[1],lineDisplay:!0})},T[0])})]})],0)})})},c=function(g,h){var C=(0,o.useBackend)(h),N=C.act,x=C.data,B=g.id,L=g.amount,w=g.lineDisplay,A=g.onClick,T=S(g,k),E=x.materials[B]||0,O=L||E;if(!(O<=0&&!(B==="metal"||B==="glass"))){var P=L&&L>E;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,d.Stack,Object.assign({align:"center",className:(0,a.classes)(["Exofab__material",w&&"Exofab__material--line"])},T,{children:w?(0,e.createFragment)([(0,e.createComponentVNode)(2,d.Stack.Item,{className:(0,a.classes)(["materials32x32",B])}),(0,e.createComponentVNode)(2,d.Stack.Item,{className:"Exofab__material--amount",color:P&&"bad",ml:0,mr:1,children:O.toLocaleString("en-US")})],4):(0,e.createFragment)([(0,e.createComponentVNode)(2,d.Stack.Item,{basis:"content",children:(0,e.createComponentVNode)(2,d.Button,{width:"85%",color:"transparent",onClick:A,children:(0,e.createComponentVNode)(2,d.Box,{mt:1,className:(0,a.classes)(["materials32x32",B])})})}),(0,e.createComponentVNode)(2,d.Stack.Item,{grow:"1",children:[(0,e.createComponentVNode)(2,d.Box,{className:"Exofab__material--name",children:B}),(0,e.createComponentVNode)(2,d.Box,{className:"Exofab__material--amount",children:[O.toLocaleString("en-US")," cm\xB3 (",Math.round(O/p*10)/10," ","sheets)"]})]})],4)})))}},v=function(g,h){var C=(0,o.useBackend)(h),N=C.act,x=C.data,B=g.design;return(0,e.createComponentVNode)(2,d.Box,{className:"Exofab__design",children:[(0,e.createComponentVNode)(2,d.Button,{disabled:B.notEnough||x.building,icon:"cog",content:B.name,onClick:function(){function L(){return N("build",{id:B.id})}return L}()}),(0,e.createComponentVNode)(2,d.Button,{icon:"plus-circle",onClick:function(){function L(){return N("queue",{id:B.id})}return L}()}),(0,e.createComponentVNode)(2,d.Box,{className:"Exofab__design--cost",children:Object.entries(B.cost).map(function(L){return(0,e.createComponentVNode)(2,d.Box,{children:(0,e.createComponentVNode)(2,c,{id:L[0],amount:L[1],lineDisplay:!0})},L[0])})}),(0,e.createComponentVNode)(2,d.Stack,{className:"Exofab__design--time",children:(0,e.createComponentVNode)(2,d.Stack.Item,{children:[(0,e.createComponentVNode)(2,d.Icon,{name:"clock"}),B.time>0?(0,e.createFragment)([B.time/10,(0,e.createTextVNode)(" seconds")],0):"Instant"]})})]})}},97086:function(I,r,n){"use strict";r.__esModule=!0,r.ExternalAirlockController=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=0,y=1013,V=function(p){var i="good",l=80,f=95,u=110,s=120;return pu?i="average":p>s&&(i="bad"),i},k=r.ExternalAirlockController=function(){function S(p,i){var l=(0,a.useBackend)(i),f=l.act,u=l.data,s=u.chamber_pressure,m=u.exterior_status,c=u.interior_status,v=u.processing;return(0,e.createComponentVNode)(2,o.Window,{width:470,height:290,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Information",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Chamber Pressure",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:V(s),value:s,minValue:d,maxValue:y,children:[s," kPa"]})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Actions",children:[(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:v,onClick:function(){function b(){return f("cycle_ext")}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Cycle to Interior",icon:"arrow-circle-right",disabled:v,onClick:function(){function b(){return f("cycle_int")}return b}()})]}),(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Force Exterior Door",icon:"exclamation-triangle",color:c==="open"?"red":v?"yellow":null,onClick:function(){function b(){return f("force_ext")}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Force Interior Door",icon:"exclamation-triangle",color:c==="open"?"red":v?"yellow":null,onClick:function(){function b(){return f("force_int")}return b}()})]}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Abort",icon:"ban",color:"red",disabled:!v,onClick:function(){function b(){return f("abort")}return b}()})})]})]})})}return S}()},96142:function(I,r,n){"use strict";r.__esModule=!0,r.FaxMachine=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.FaxMachine=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data;return(0,e.createComponentVNode)(2,o.Window,{width:540,height:300,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Authorization",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Card",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.scan_name?"eject":"id-card",selected:i.scan_name,content:i.scan_name?i.scan_name:"-----",tooltip:i.scan_name?"Eject ID":"Insert ID",onClick:function(){function l(){return p("scan")}return l}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Authorize",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.authenticated?"sign-out-alt":"id-card",selected:i.authenticated,disabled:!i.scan_name&&!i.authenticated,content:i.authenticated?"Log Out":"Log In",onClick:function(){function l(){return p("auth")}return l}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Fax Menu",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Network",children:i.network}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Document",children:[(0,e.createComponentVNode)(2,t.Button,{icon:i.paper?"eject":"paperclip",disabled:!i.authenticated&&!i.paper,content:i.paper?i.paper:"-----",onClick:function(){function l(){return p("paper")}return l}()}),!!i.paper&&(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:"Rename",onClick:function(){function l(){return p("rename")}return l}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sending To",children:(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:i.destination?i.destination:"-----",disabled:!i.authenticated,onClick:function(){function l(){return p("dept")}return l}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Action",children:(0,e.createComponentVNode)(2,t.Button,{icon:"envelope",content:i.sendError?i.sendError:"Send",disabled:!i.paper||!i.destination||!i.authenticated||i.sendError,onClick:function(){function l(){return p("send")}return l}()})})]})})]})})}return y}()},83767:function(I,r,n){"use strict";r.__esModule=!0,r.FloorPainter=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=function(k,S){var p=(0,a.useBackend)(S),i=p.act,l=p.data,f=k.image,u=k.isSelected,s=k.onSelect;return(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+f,style:{"border-style":u&&"solid"||"none","border-width":"2px","border-color":"orange",padding:u&&"2px"||"4px"},onClick:s})},y=r.FloorPainter=function(){function V(k,S){var p=(0,a.useBackend)(S),i=p.act,l=p.data,f=l.availableStyles,u=l.selectedStyle,s=l.selectedDir,m=l.directionsPreview,c=l.allStylesPreview;return(0,e.createComponentVNode)(2,o.Window,{width:405,height:475,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Decal setup",children:[(0,e.createComponentVNode)(2,t.Flex,{children:[(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-left",onClick:function(){function v(){return i("cycle_style",{offset:-1})}return v}()})}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Dropdown,{options:f,selected:u,width:"150px",height:"20px",ml:"2px",mr:"2px",nochevron:!0,onSelected:function(){function v(b){return i("select_style",{style:b})}return v}()})}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",onClick:function(){function v(){return i("cycle_style",{offset:1})}return v}()})})]}),(0,e.createComponentVNode)(2,t.Box,{mt:"5px",mb:"5px",children:(0,e.createComponentVNode)(2,t.Flex,{overflowY:"auto",maxHeight:"220px",wrap:"wrap",children:f.map(function(v){return(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,d,{image:c[v],isSelected:u===v,onSelect:function(){function b(){return i("select_style",{style:v})}return b}()})},"{style}")})})}),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Direction",children:(0,e.createComponentVNode)(2,t.Table,{style:{display:"inline"},children:["north","","south"].map(function(v){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[v+"west",v,v+"east"].map(function(b){return(0,e.createComponentVNode)(2,t.Table.Cell,{style:{"vertical-align":"middle","text-align":"center"},children:b===""?(0,e.createComponentVNode)(2,t.Icon,{name:"arrows-alt",size:3}):(0,e.createComponentVNode)(2,d,{image:m[b],isSelected:b===s,onSelect:function(){function g(){return i("select_direction",{direction:b})}return g}()})},b)})},v)})})})})]})})})}return V}()},53424:function(I,r,n){"use strict";r.__esModule=!0,r.GPS=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),d=n(98595),y=function(u){return u?"("+u.join(", ")+")":"ERROR"},V=function(u,s,m){if(!(!u||!s)){if(u[2]!==s[2]||m!==1)return null;var c=Math.atan2(s[1]-u[1],s[0]-u[0]),v=Math.sqrt(Math.pow(s[1]-u[1],2)+Math.pow(s[0]-u[0],2));return{angle:(0,a.rad2deg)(c),distance:v}}},k=r.GPS=function(){function f(u,s){var m=(0,t.useBackend)(s),c=m.data,v=c.emped,b=c.active,g=c.area,h=c.position,C=c.saved;return(0,e.createComponentVNode)(2,d.Window,{width:450,height:700,children:(0,e.createComponentVNode)(2,d.Window.Content,{children:(0,e.createComponentVNode)(2,o.Flex,{direction:"column",height:"100%",children:v?(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",basis:"0",children:(0,e.createComponentVNode)(2,S,{emp:!0})}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Flex.Item,{children:(0,e.createComponentVNode)(2,p)}),b?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Flex.Item,{mt:"0.5rem",children:(0,e.createComponentVNode)(2,i,{area:g,position:h})}),C&&(0,e.createComponentVNode)(2,o.Flex.Item,{mt:"0.5rem",children:(0,e.createComponentVNode)(2,i,{title:"Saved Position",position:C})}),(0,e.createComponentVNode)(2,o.Flex.Item,{mt:"0.5rem",grow:"1",basis:"0",children:(0,e.createComponentVNode)(2,l,{height:"100%"})})],0):(0,e.createComponentVNode)(2,S)],0)})})})}return f}(),S=function(u,s){var m=u.emp;return(0,e.createComponentVNode)(2,o.Section,{mt:"0.5rem",width:"100%",height:"100%",stretchContents:!0,children:(0,e.createComponentVNode)(2,o.Box,{width:"100%",height:"100%",color:"label",textAlign:"center",children:(0,e.createComponentVNode)(2,o.Flex,{height:"100%",children:(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon,{name:m?"ban":"power-off",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),m?"ERROR: Device temporarily lost signal.":"Device is disabled."]})})})})},p=function(u,s){var m=(0,t.useBackend)(s),c=m.act,v=m.data,b=v.active,g=v.tag,h=v.same_z,C=(0,t.useLocalState)(s,"newTag",g),N=C[0],x=C[1];return(0,e.createComponentVNode)(2,o.Section,{title:"Settings",buttons:(0,e.createComponentVNode)(2,o.Button,{selected:b,icon:b?"toggle-on":"toggle-off",content:b?"On":"Off",onClick:function(){function B(){return c("toggle")}return B}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Tag",children:[(0,e.createComponentVNode)(2,o.Input,{width:"5rem",value:g,onEnter:function(){function B(){return c("tag",{newtag:N})}return B}(),onInput:function(){function B(L,w){return x(w)}return B}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:g===N,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){function B(){return c("tag",{newtag:N})}return B}(),children:(0,e.createComponentVNode)(2,o.Icon,{name:"pen"})})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Range",children:(0,e.createComponentVNode)(2,o.Button,{selected:!h,icon:h?"compress":"expand",content:h?"Local Sector":"Global",onClick:function(){function B(){return c("same_z")}return B}()})})]})})},i=function(u,s){var m=u.title,c=u.area,v=u.position;return(0,e.createComponentVNode)(2,o.Section,{title:m||"Position",children:(0,e.createComponentVNode)(2,o.Box,{fontSize:"1.5rem",children:[c&&(0,e.createFragment)([c,(0,e.createVNode)(1,"br")],0),y(v)]})})},l=function(u,s){var m=(0,t.useBackend)(s),c=m.data,v=c.position,b=c.signals,g=c.upgraded;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Signals",overflow:"auto"},u,{children:(0,e.createComponentVNode)(2,o.Table,{children:b.map(function(h){return Object.assign({},h,V(v,h.position,g))}).map(function(h,C){return(0,e.createComponentVNode)(2,o.Table.Row,{backgroundColor:C%2===0&&"rgba(255, 255, 255, 0.05)",children:[(0,e.createComponentVNode)(2,o.Table.Cell,{width:"30%",verticalAlign:"middle",color:"label",p:"0.25rem",bold:!0,children:h.tag}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",color:"grey",children:h.area}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",collapsing:!0,children:h.distance!==void 0&&(0,e.createComponentVNode)(2,o.Box,{opacity:Math.max(1-Math.min(h.distance,100)/100,.5),children:[(0,e.createComponentVNode)(2,o.Icon,{name:h.distance>0?"arrow-right":"circle",rotation:-h.angle}),"\xA0",Math.floor(h.distance)+"m"]})}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",pr:"0.25rem",collapsing:!0,children:y(h.position)})]},C)})})})))}},68703:function(I,r,n){"use strict";r.__esModule=!0,r.GasAnalyzerHistory=r.GasAnalyzerContent=r.GasAnalyzer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.GasAnalyzerContent=function(){function k(S,p){var i=(0,a.useBackend)(p),l=i.act,f=i.data,u=f.gasmixes,s=f.autoUpdating;return(0,e.createComponentVNode)(2,t.Section,{title:u[0].name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:s?"unlock":"lock",onClick:function(){function m(){return l("autoscantoggle")}return m}(),tooltip:s?"Auto-Update Enabled":"Auto-Update Disabled",fluid:!0,textAlign:"center",selected:s}),children:u[0].total_moles?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Moles",children:(u[0].total_moles?u[0].total_moles:"-")+" mol"}),u[0].oxygen?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Oxygen",children:u[0].oxygen.toFixed(2)+" mol ("+(u[0].oxygen/u[0].total_moles).toFixed(2)*100+" %)"}):"",u[0].nitrogen?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nitrogen",children:u[0].nitrogen.toFixed(2)+" mol ("+(u[0].nitrogen/u[0].total_moles).toFixed(2)*100+" %)"}):"",u[0].carbon_dioxide?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Carbon Dioxide",children:u[0].carbon_dioxide.toFixed(2)+" mol ("+(u[0].carbon_dioxide/u[0].total_moles).toFixed(2)*100+" %)"}):"",u[0].toxins?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Plasma",children:u[0].toxins.toFixed(2)+" mol ("+(u[0].toxins/u[0].total_moles).toFixed(2)*100+" %)"}):"",u[0].sleeping_agent?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nitrous Oxide",children:u[0].sleeping_agent.toFixed(2)+" mol ("+(u[0].sleeping_agent/u[0].total_moles).toFixed(2)*100+" %)"}):"",u[0].agent_b?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Agent B",children:u[0].agent_b.toFixed(2)+" mol ("+(u[0].agent_b/u[0].total_moles).toFixed(2)*100+" %)"}):"",(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:(u[0].total_moles?(u[0].temperature-273.15).toFixed(2):"-")+" \xB0C ("+(u[0].total_moles?u[0].temperature.toFixed(2):"-")+" K)"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Volume",children:(u[0].total_moles?u[0].volume:"-")+" L"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure",children:(u[0].total_moles?u[0].pressure.toFixed(2):"-")+" kPa"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Heat Capacity",children:u[0].heat_capacity+" / K"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Thermal Energy",children:u[0].thermal_energy})]}):(0,e.createComponentVNode)(2,t.Box,{nowrap:!0,italic:!0,mb:"10px",children:"No Gas Detected!"})},u[0])}return k}(),y=r.GasAnalyzerHistory=function(){function k(S,p){var i=(0,a.useBackend)(p),l=i.act,f=i.data,u=f.historyGasmixes,s=f.historyViewMode,m=f.historyIndex;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Scan History",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"trash",tooltip:"Clear History",onClick:function(){function c(){return l("clearhistory")}return c}(),textAlign:"center",disabled:u.length===0}),children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mode",children:(0,e.createComponentVNode)(2,t.Flex,{inline:!0,width:"50%",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"kPa",onClick:function(){function c(){return l("modekpa")}return c}(),textAlign:"center",selected:s==="kpa"})}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"mol",onClick:function(){function c(){return l("modemol")}return c}(),textAlign:"center",selected:s==="mol"})})]})}),(0,e.createComponentVNode)(2,t.LabeledList,{children:u.map(function(c,v){return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:v+1+". "+(s==="mol"?c[0].total_moles.toFixed(2):c[0].pressure.toFixed(2)),onClick:function(){function b(){return l("input",{target:v+1})}return b}(),textAlign:"left",selected:v+1===m,fluid:!0})},c[0])})})]})}return k}(),V=r.GasAnalyzer=function(){function k(S,p){var i={float:"left",width:"67%"},l={float:"right",width:"33%"};return(0,e.createComponentVNode)(2,o.Window,{width:500,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createVNode)(1,"div",null,(0,e.createComponentVNode)(2,t.Section,{grow:!0,children:(0,e.createComponentVNode)(2,d)}),2,{style:i}),(0,e.createVNode)(1,"div",null,(0,e.createComponentVNode)(2,t.Section,{width:"160px",children:(0,e.createComponentVNode)(2,y)}),2,{style:l})]})})}return k}()},27546:function(I,r,n){"use strict";r.__esModule=!0,r.GasFreezer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.GasFreezer=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.on,f=i.pressure,u=i.temperature,s=i.temperatureCelsius,m=i.min,c=i.max,v=i.target,b=i.targetCelsius,g=(u-m)/(c-m);return(0,e.createComponentVNode)(2,o.Window,{width:560,height:200,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"\u0421\u0442\u0430\u0442\u0443\u0441",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:l?"power-off":"times",content:l?"\u0412\u043A\u043B":"\u0412\u044B\u043A\u043B",selected:l,onClick:function(){function h(){return p("power")}return h}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0414\u0430\u0432\u043B\u0435\u043D\u0438\u0435",children:[f," \u043A\u041F\u0430"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0422\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430",children:(0,e.createComponentVNode)(2,t.Flex,{direction:"row",justify:"space-between",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{width:"65%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:g,ranges:{blue:[-1/0,.5],red:[.5,1/0]},children:"\xA0"})}),(0,e.createComponentVNode)(2,t.Flex.Item,{width:"35%",children:[g<.5&&(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"blue",ml:1,children:[u," \xB0K (",s," \xB0C)"]}),g>=.5&&(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"red",ml:1,children:[u," \xB0K (",s," \xB0C)"]})]})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0426\u0435\u043B\u0435\u0432\u0430\u044F \u0442\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430",children:(0,e.createComponentVNode)(2,t.Flex,{direction:"row",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{width:"65%",justify:"end",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:(v-m)/(c-m),children:"\xA0"})}),(0,e.createComponentVNode)(2,t.Flex.Item,{width:"35%",children:(0,e.createComponentVNode)(2,t.Box,{inline:!0,ml:1,children:[v," \xB0K (",b," \xB0C)"]})})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0417\u0430\u0434\u0430\u0442\u044C \u0446\u0435\u043B\u0435\u0432\u0443\u044E \u0442\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0443",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",title:"\u041C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u0442\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430",onClick:function(){function h(){return p("temp",{temp:m})}return h}()}),(0,e.createComponentVNode)(2,t.NumberInput,{value:Math.round(v),unit:"\xB0K",minValue:Math.round(m),maxValue:Math.round(c),step:5,stepPixelSize:3,onDrag:function(){function h(C,N){return p("temp",{temp:N})}return h}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",title:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u0442\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430",onClick:function(){function h(){return p("temp",{temp:c})}return h}()})]})]})})})})}return y}()},89124:function(I,r,n){"use strict";r.__esModule=!0,r.GeneModder=void 0;var e=n(89005),a=n(72253),t=n(35840),o=n(36036),d=n(3939),y=n(98595),V=r.GeneModder=function(){function s(m,c){var v=(0,a.useBackend)(c),b=v.data,g=b.has_seed;return(0,e.createComponentVNode)(2,y.Window,{width:500,height:650,children:(0,e.createComponentVNode)(2,y.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,p),(0,e.createComponentVNode)(2,d.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),g===0?(0,e.createComponentVNode)(2,S):(0,e.createComponentVNode)(2,k)]})})})}return s}(),k=function(m,c){var v=(0,a.useBackend)(c),b=v.act,g=v.data,h=g.disk;return(0,e.createComponentVNode)(2,o.Section,{title:"Genes",fill:!0,scrollable:!0,buttons:(0,e.createComponentVNode)(2,o.Button,{content:"Insert Gene from Disk",disabled:!h||!h.can_insert||h.is_core,icon:"arrow-circle-down",onClick:function(){function C(){return b("insert")}return C}()}),children:[(0,e.createComponentVNode)(2,i),(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,f)]})},S=function(m,c){return(0,e.createComponentVNode)(2,o.Section,{fill:!0,height:"85%",children:(0,e.createComponentVNode)(2,o.Stack,{height:"100%",children:(0,e.createComponentVNode)(2,o.Stack.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"green",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"leaf",size:5,mb:"10px"}),(0,e.createVNode)(1,"br"),"The plant DNA manipulator is missing a seed."]})})})},p=function(m,c){var v=(0,a.useBackend)(c),b=v.act,g=v.data,h=g.has_seed,C=g.seed,N=g.has_disk,x=g.disk,B,L;return h?B=(0,e.createComponentVNode)(2,o.Stack.Item,{mb:"-6px",mt:"-4px",children:[(0,e.createVNode)(1,"img",(0,t.classes)(["seeds32x32",C.image]),null,1,{style:{"vertical-align":"middle",width:"32px",margin:"-1px","margin-left":"-11px"}}),(0,e.createComponentVNode)(2,o.Button,{content:C.name,onClick:function(){function w(){return b("eject_seed")}return w}()}),(0,e.createComponentVNode)(2,o.Button,{ml:"3px",icon:"pen",tooltip:"Name Variant",onClick:function(){function w(){return b("variant_name")}return w}()})]}):B=(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{ml:3.3,content:"None",onClick:function(){function w(){return b("eject_seed")}return w}()})}),N?L=x.name:L="None",(0,e.createComponentVNode)(2,o.Section,{title:"Storage",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Plant Sample",children:B}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Data Disk",children:(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{ml:3.3,content:L,onClick:function(){function w(){return b("eject_disk")}return w}()})})})]})})},i=function(m,c){var v=(0,a.useBackend)(c),b=v.act,g=v.data,h=g.disk,C=g.core_genes;return(0,e.createComponentVNode)(2,o.Collapsible,{title:"Core Genes",open:!0,children:[C.map(function(N){return(0,e.createComponentVNode)(2,o.Stack,{py:"2px",className:"candystripe",children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"100%",ml:"2px",children:N.name}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Extract",disabled:!(h!=null&&h.can_extract),icon:"save",onClick:function(){function x(){return b("extract",{id:N.id})}return x}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Replace",disabled:!N.is_type||!h.can_insert,icon:"arrow-circle-down",onClick:function(){function x(){return b("replace",{id:N.id})}return x}()})})]},N)})," ",(0,e.createComponentVNode)(2,o.Stack,{children:(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Replace All",disabled:!(h!=null&&h.is_bulk_core),icon:"arrow-circle-down",onClick:function(){function N(){return b("bulk_replace_core")}return N}()})})})]},"Core Genes")},l=function(m,c){var v=(0,a.useBackend)(c),b=v.data,g=b.reagent_genes,h=b.has_reagent;return(0,e.createComponentVNode)(2,u,{title:"Reagent Genes",gene_set:g,do_we_show:h})},f=function(m,c){var v=(0,a.useBackend)(c),b=v.data,g=b.trait_genes,h=b.has_trait;return(0,e.createComponentVNode)(2,u,{title:"Trait Genes",gene_set:g,do_we_show:h})},u=function(m,c){var v=m.title,b=m.gene_set,g=m.do_we_show,h=(0,a.useBackend)(c),C=h.act,N=h.data,x=N.disk;return(0,e.createComponentVNode)(2,o.Collapsible,{title:v,open:!0,children:g?b.map(function(B){return(0,e.createComponentVNode)(2,o.Stack,{py:"2px",className:"candystripe",children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"100%",ml:"2px",children:B.name}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Extract",disabled:!(x!=null&&x.can_extract),icon:"save",onClick:function(){function L(){return C("extract",{id:B.id})}return L}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Remove",icon:"times",onClick:function(){function L(){return C("remove",{id:B.id})}return L}()})})]},B)}):(0,e.createComponentVNode)(2,o.Stack.Item,{children:"No Genes Detected"})},v)}},73053:function(I,r,n){"use strict";r.__esModule=!0,r.GenericCrewManifest=void 0;var e=n(89005),a=n(36036),t=n(98595),o=n(41874),d=r.GenericCrewManifest=function(){function y(V,k){return(0,e.createComponentVNode)(2,t.Window,{width:588,height:510,theme:"nologo",children:(0,e.createComponentVNode)(2,t.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,a.Section,{noTopPadding:!0,children:(0,e.createComponentVNode)(2,o.CrewManifest)})})})}return y}()},42914:function(I,r,n){"use strict";r.__esModule=!0,r.GhostHudPanel=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.GhostHudPanel=function(){function V(k,S){var p=(0,a.useBackend)(S),i=p.data,l=i.security,f=i.medical,u=i.diagnostic,s=i.ahud;return(0,e.createComponentVNode)(2,o.Window,{width:250,height:207,theme:"nologo",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,y,{label:"Medical",type:"medical",is_active:f}),(0,e.createComponentVNode)(2,y,{label:"Security",type:"security",is_active:l}),(0,e.createComponentVNode)(2,y,{label:"Diagnostic",type:"diagnostic",is_active:u}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,y,{label:"Antag HUD",is_active:s,act_on:"ahud_on",act_off:"ahud_off"})]})})})}return V}(),y=function(k,S){var p=(0,a.useBackend)(S),i=p.act,l=k.label,f=k.type,u=f===void 0?null:f,s=k.is_active,m=k.act_on,c=m===void 0?"hud_on":m,v=k.act_off,b=v===void 0?"hud_off":v;return(0,e.createComponentVNode)(2,t.Flex,{pt:.3,color:"label",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{pl:.5,align:"center",width:"80%",children:l}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{mr:.6,content:s?"On":"Off",icon:s?"toggle-on":"toggle-off",selected:s,onClick:function(){function g(){return i(s?b:c,{hud_type:u})}return g}()})})]})}},25825:function(I,r,n){"use strict";r.__esModule=!0,r.GlandDispenser=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.GlandDispenser=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.glands,f=l===void 0?[]:l;return(0,e.createComponentVNode)(2,o.Window,{width:300,height:338,theme:"abductor",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:f.map(function(u){return(0,e.createComponentVNode)(2,t.Button,{width:"60px",height:"60px",m:.75,textAlign:"center",fontSize:"17px",lineHeight:"55px",icon:"eject",backgroundColor:u.color,content:u.amount||"0",disabled:!u.amount,onClick:function(){function s(){return p("dispense",{gland_id:u.id})}return s}()},u.id)})})})})}return y}()},67834:function(I,r,n){"use strict";r.__esModule=!0,r.HandheldChemDispenser=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=[1,5,10,20,30,50],y=null,V=r.HandheldChemDispenser=function(){function p(i,l){return(0,e.createComponentVNode)(2,o.Window,{width:450,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,S)]})})})}return p}(),k=function(i,l){var f=(0,a.useBackend)(l),u=f.act,s=f.data,m=s.amount,c=s.energy,v=s.maxEnergy,b=s.mode;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Energy",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:c,minValue:0,maxValue:v,ranges:{good:[v*.5,1/0],average:[v*.25,v*.5],bad:[-1/0,v*.25]},children:[c," / ",v," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Amount",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{children:d.map(function(g,h){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"15%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"cog",selected:m===g,content:g,onClick:function(){function C(){return u("amount",{amount:g})}return C}()})},h)})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mode",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{justify:"space-between",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:b==="dispense",content:"Dispense",m:"0",width:"32%",onClick:function(){function g(){return u("mode",{mode:"dispense"})}return g}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:b==="remove",content:"Remove",m:"0",width:"32%",onClick:function(){function g(){return u("mode",{mode:"remove"})}return g}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:b==="isolate",content:"Isolate",m:"0",width:"32%",onClick:function(){function g(){return u("mode",{mode:"isolate"})}return g}()})]})})]})})})},S=function(i,l){for(var f=(0,a.useBackend)(l),u=f.act,s=f.data,m=s.chemicals,c=m===void 0?[]:m,v=s.current_reagent,b=[],g=0;g<(c.length+1)%3;g++)b.push(!0);return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,height:"18%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:s.glass?"Drink Selector":"Chemical Selector",children:[c.map(function(h,C){return(0,e.createComponentVNode)(2,t.Button,{width:"32%",icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",selected:v===h.id,content:h.title,style:{"margin-left":"2px"},onClick:function(){function N(){return u("dispense",{reagent:h.id})}return N}()},C)}),b.map(function(h,C){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:"1",basis:"25%"},C)})]})})}},75926:function(I,r,n){"use strict";r.__esModule=!0,r.ImplantPad=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.ImplantPad=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.implant,f=i.contains_case,u=i.tag,s=(0,a.useLocalState)(k,"newTag",u),m=s[0],c=s[1];return(0,e.createComponentVNode)(2,o.Window,{width:410,height:325,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Bio-chip Mini-Computer",buttons:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Eject Case",icon:"eject",disabled:!f,onClick:function(){function v(){return p("eject_case")}return v}()})}),children:l&&f?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{bold:!0,mb:2,children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+l.image,ml:0,mr:2,style:{"vertical-align":"middle",width:"32px"}}),l.name]}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Life",children:l.life}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Notes",children:l.notes}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Function",children:l.function}),!!u&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tag",children:[(0,e.createComponentVNode)(2,t.Input,{width:"5.5rem",value:u,onEnter:function(){function v(){return p("tag",{newtag:m})}return v}(),onInput:function(){function v(b,g){return c(g)}return v}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:u===m,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){function v(){return p("tag",{newtag:m})}return v}(),children:(0,e.createComponentVNode)(2,t.Icon,{name:"pen"})})]})]})],4):f?(0,e.createComponentVNode)(2,t.Box,{children:"This bio-chip case has no implant!"}):(0,e.createComponentVNode)(2,t.Box,{children:"Please insert a bio-chip casing!"})})})})}return y}()},25471:function(I,r,n){"use strict";r.__esModule=!0,r.Instrument=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),d=n(98595),y=r.Instrument=function(){function i(l,f){var u=(0,t.useBackend)(f),s=u.act,m=u.data;return(0,e.createComponentVNode)(2,d.Window,{width:600,height:505,children:[(0,e.createComponentVNode)(2,V),(0,e.createComponentVNode)(2,d.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,p)]})})]})}return i}(),V=function(l,f){var u=(0,t.useBackend)(f),s=u.act,m=u.data,c=m.help;if(c)return(0,e.createComponentVNode)(2,o.Modal,{maxWidth:"75%",height:window.innerHeight*.75+"px",mx:"auto",py:"0",px:"0.5rem",children:(0,e.createComponentVNode)(2,o.Section,{height:"100%",title:"Help",level:"2",overflow:"auto",children:(0,e.createComponentVNode)(2,o.Box,{px:"0.5rem",mt:"-0.5rem",children:[(0,e.createVNode)(1,"h1",null,"Making a Song",16),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Lines are a series of chords, separated by commas\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(,)"}),(0,e.createTextVNode)(", each with notes separated by hyphens\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(-)"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("as defined above.")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Notes are played by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"names of the note"}),(0,e.createTextVNode)(", and optionally, the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(", and/or the"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave number"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("By default, every note is\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"natural"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("and in\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave 3"}),(0,e.createTextVNode)(". Defining a different state for either is remembered for each"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"note"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Example:"}),(0,e.createTextVNode)("\xA0"),(0,e.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,e.createTextVNode)(" will play a\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"C"}),(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"major"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("scale.")],0),(0,e.createVNode)(1,"li",null,[(0,e.createTextVNode)("After a note has an\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("or\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("placed, it will be remembered:\xA0"),(0,e.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,e.createTextVNode)(" is "),(0,e.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],0)],4)],0),(0,e.createVNode)(1,"p",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Chords"}),(0,e.createTextVNode)("\xA0can be played simply by seperating each note with a hyphen:"),(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("A"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"pause"}),(0,e.createTextVNode)("\xA0may be denoted by an empty chord: "),(0,e.createVNode)(1,"i",null,"C,E,,C,G",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,e.createTextVNode)(",\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"eg:"}),(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,e.createTextVNode)(".")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Combined, an example line is: "),(0,e.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,e.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Lines are a series of chords, separated by commas\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(,)"}),(0,e.createTextVNode)(", each with notes separated by hyphens\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(-)"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("as defined above.")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Notes are played by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"names of the note"}),(0,e.createTextVNode)(", and optionally, the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(", and/or the"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave number"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("By default, every note is\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"natural"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("and in\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave 3"}),(0,e.createTextVNode)(". Defining a different state for either is remembered for each"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"note"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Example:"}),(0,e.createTextVNode)("\xA0"),(0,e.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,e.createTextVNode)(" will play a\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"C"}),(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"major"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("scale.")],0),(0,e.createVNode)(1,"li",null,[(0,e.createTextVNode)("After a note has an\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("or\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("placed, it will be remembered:\xA0"),(0,e.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,e.createTextVNode)(" is "),(0,e.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],0)],4)],0),(0,e.createVNode)(1,"p",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Chords"}),(0,e.createTextVNode)("\xA0can be played simply by seperating each note with a hyphen:"),(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("A"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"pause"}),(0,e.createTextVNode)("\xA0may be denoted by an empty chord: "),(0,e.createVNode)(1,"i",null,"C,E,,C,G",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,e.createTextVNode)(",\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"eg:"}),(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,e.createTextVNode)(".")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Combined, an example line is: "),(0,e.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,e.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,e.createVNode)(1,"h1",null,"Instrument Advanced Settings",16),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Type:"}),(0,e.createTextVNode)("\xA0Whether the instrument is legacy or synthesized."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Legacy instruments have a collection of sounds that are selectively used depending on the note to play."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Synthesized instruments use a base sound and change its pitch to match the note to play.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Current:"}),(0,e.createTextVNode)("\xA0Which instrument sample to play. Some instruments can be tuned to play different samples. Experiment!")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Note Shift/Note Transpose:"}),(0,e.createTextVNode)("\xA0The pitch to apply to all notes of the song.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Sustain Mode:"}),(0,e.createTextVNode)("\xA0How a played note fades out."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Linear sustain means a note will fade out at a constant rate."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Exponential sustain means a note will fade out at an exponential rate, sounding smoother.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Volume Dropoff Threshold:"}),(0,e.createTextVNode)("\xA0The volume threshold at which a note is fully stopped.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Sustain indefinitely last held note:"}),(0,e.createTextVNode)("\xA0Whether the last note should be sustained indefinitely.")],4)],4),(0,e.createComponentVNode)(2,o.Button,{color:"grey",content:"Close",onClick:function(){function v(){return s("help")}return v}()})]})})})},k=function(l,f){var u=(0,t.useBackend)(f),s=u.act,m=u.data,c=m.lines,v=m.playing,b=m.repeat,g=m.maxRepeats,h=m.tempo,C=m.minTempo,N=m.maxTempo,x=m.tickLag,B=m.volume,L=m.minVolume,w=m.maxVolume,A=m.ready;return(0,e.createComponentVNode)(2,o.Section,{title:"Instrument",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"info",content:"Help",onClick:function(){function T(){return s("help")}return T}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"file",content:"New",onClick:function(){function T(){return s("newsong")}return T}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"upload",content:"Import",onClick:function(){function T(){return s("import")}return T}()})],4),children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Playback",children:[(0,e.createComponentVNode)(2,o.Button,{selected:v,disabled:c.length===0||b<0,icon:"play",content:"Play",onClick:function(){function T(){return s("play")}return T}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!v,icon:"stop",content:"Stop",onClick:function(){function T(){return s("stop")}return T}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Repeat",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:0,maxValue:g,value:b,stepPixelSize:59,onChange:function(){function T(E,O){return s("repeat",{new:O})}return T}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Tempo",children:(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Button,{disabled:h>=N,content:"-",as:"span",mr:"0.5rem",onClick:function(){function T(){return s("tempo",{new:h+x})}return T}()}),(0,a.round)(600/h)," BPM",(0,e.createComponentVNode)(2,o.Button,{disabled:h<=C,content:"+",as:"span",ml:"0.5rem",onClick:function(){function T(){return s("tempo",{new:h-x})}return T}()})]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Volume",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:L,maxValue:w,value:B,stepPixelSize:6,onDrag:function(){function T(E,O){return s("setvolume",{new:O})}return T}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Status",children:A?(0,e.createComponentVNode)(2,o.Box,{color:"good",children:"Ready"}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"Instrument Definition Error!"})})]}),(0,e.createComponentVNode)(2,S)]})},S=function(l,f){var u=(0,t.useBackend)(f),s=u.act,m=u.data,c=m.allowedInstrumentNames,v=m.instrumentLoaded,b=m.instrument,g=m.canNoteShift,h=m.noteShift,C=m.noteShiftMin,N=m.noteShiftMax,x=m.sustainMode,B=m.sustainLinearDuration,L=m.sustainExponentialDropoff,w=m.legacy,A=m.sustainDropoffVolume,T=m.sustainHeldNote,E,O;return x===1?(E="Linear",O=(0,e.createComponentVNode)(2,o.Slider,{minValue:.1,maxValue:5,value:B,step:.5,stepPixelSize:85,format:function(){function P(R){return(0,a.round)(R*100)/100+" seconds"}return P}(),onChange:function(){function P(R,F){return s("setlinearfalloff",{new:F/10})}return P}()})):x===2&&(E="Exponential",O=(0,e.createComponentVNode)(2,o.Slider,{minValue:1.025,maxValue:10,value:L,step:.01,format:function(){function P(R){return(0,a.round)(R*1e3)/1e3+"% per decisecond"}return P}(),onChange:function(){function P(R,F){return s("setexpfalloff",{new:F})}return P}()})),c.sort(),(0,e.createComponentVNode)(2,o.Box,{my:-1,children:(0,e.createComponentVNode)(2,o.Collapsible,{mt:"1rem",mb:"0",title:"Advanced",children:(0,e.createComponentVNode)(2,o.Section,{mt:-1,children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Type",children:w?"Legacy":"Synthesized"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Current",children:v?(0,e.createComponentVNode)(2,o.Dropdown,{options:c,selected:b,width:"50%",onSelected:function(){function P(R){return s("switchinstrument",{name:R})}return P}()}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"None!"})}),!!(!w&&g)&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Note Shift/Note Transpose",children:(0,e.createComponentVNode)(2,o.Slider,{minValue:C,maxValue:N,value:h,stepPixelSize:2,format:function(){function P(R){return R+" keys / "+(0,a.round)(R/12*100)/100+" octaves"}return P}(),onChange:function(){function P(R,F){return s("setnoteshift",{new:F})}return P}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Sustain Mode",children:[(0,e.createComponentVNode)(2,o.Dropdown,{options:["Linear","Exponential"],selected:E,onSelected:function(){function P(R){return s("setsustainmode",{new:R})}return P}()}),O]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Volume Dropoff Threshold",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:.01,maxValue:100,value:A,stepPixelSize:6,onChange:function(){function P(R,F){return s("setdropoffvolume",{new:F})}return P}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Sustain indefinitely last held note",children:(0,e.createComponentVNode)(2,o.Button,{selected:T,icon:T?"toggle-on":"toggle-off",content:T?"Yes":"No",onClick:function(){function P(){return s("togglesustainhold")}return P}()})})],4)]}),(0,e.createComponentVNode)(2,o.Button,{icon:"redo",content:"Reset to Default",mt:"0.5rem",onClick:function(){function P(){return s("reset")}return P}()})]})})})},p=function(l,f){var u=(0,t.useBackend)(f),s=u.act,m=u.data,c=m.playing,v=m.lines,b=m.editing;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Editor",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:!b||c,icon:"plus",content:"Add Line",onClick:function(){function g(){return s("newline",{line:v.length+1})}return g}()}),(0,e.createComponentVNode)(2,o.Button,{selected:!b,icon:b?"chevron-up":"chevron-down",onClick:function(){function g(){return s("edit")}return g}()})],4),children:!!b&&(v.length>0?(0,e.createComponentVNode)(2,o.LabeledList,{children:v.map(function(g,h){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:h+1,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:c,icon:"pen",onClick:function(){function C(){return s("modifyline",{line:h+1})}return C}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:c,icon:"trash",onClick:function(){function C(){return s("deleteline",{line:h+1})}return C}()})],4),children:g},h)})}):(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"Song is empty."}))})}},65021:function(I,r,n){"use strict";r.__esModule=!0,r.ItemPixelShift=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.ItemPixelShift=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.pixel_x,f=i.pixel_y,u=i.max_shift_x,s=i.max_shift_y,m=i.random_drop_on;return(0,e.createComponentVNode)(2,o.Window,{width:250,height:160,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"X-coordinates",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-left",title:"Shifts item leftwards.",disabled:l===-u,onClick:function(){function c(){return p("shift_left")}return c}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,lineHeight:1.7,width:"75px",unit:"pixels",stepPixelSize:6,value:l,minValue:-u,maxValue:u,onChange:function(){function c(v,b){return p("custom_x",{pixel_x:b})}return c}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-right",title:"Shifts item rightwards.",disabled:l===u,onClick:function(){function c(){return p("shift_right")}return c}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Y-coordinates",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-up",title:"Shifts item upwards.",disabled:f===s,onClick:function(){function c(){return p("shift_up")}return c}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,lineHeight:1.7,width:"75px",unit:"pixels",stepPixelSize:6,value:f,minValue:-s,maxValue:s,onChange:function(){function c(v,b){return p("custom_y",{pixel_y:b})}return c}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",title:"Shifts item downwards.",disabled:f===-s,onClick:function(){function c(){return p("shift_down")}return c}()})]})]})}),(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,color:"brown",icon:"arrow-up",content:"Move to Top",title:"Tries to place an item on top of the others.",onClick:function(){function c(){return p("move_to_top")}return c}()})}),(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,color:m?"good":"bad",icon:"power-off",content:m?"Shift Enabled":"Shift Disabled",title:"Enables/Disables item pixel randomization on any drops.",onClick:function(){function c(){return p("toggle")}return c}()})})]})})]})})}return y}()},13618:function(I,r,n){"use strict";r.__esModule=!0,r.KeyComboModal=void 0;var e=n(89005),a=n(70611),t=n(72253),o=n(36036),d=n(98595),y=n(19203),V=n(51057),k=function(u){return u.key!==a.KEY.Alt&&u.key!==a.KEY.Control&&u.key!==a.KEY.Shift&&u.key!==a.KEY.Escape},S={DEL:"Delete",DOWN:"South",END:"Southwest",HOME:"Northwest",INSERT:"Insert",LEFT:"West",PAGEDOWN:"Southeast",PAGEUP:"Northeast",RIGHT:"East",SPACEBAR:"Space",UP:"North"},p=3,i=function(u){var s="";if(u.altKey&&(s+="Alt"),u.ctrlKey&&(s+="Ctrl"),u.shiftKey&&!(u.keyCode>=48&&u.keyCode<=57)&&(s+="Shift"),u.location===p&&(s+="Numpad"),k(u))if(u.shiftKey&&u.keyCode>=48&&u.keyCode<=57){var m=u.keyCode-48;s+="Shift"+m}else{var c=u.key.toUpperCase();s+=S[c]||c}return s},l=r.KeyComboModal=function(){function f(u,s){var m=(0,t.useBackend)(s),c=m.act,v=m.data,b=v.init_value,g=v.large_buttons,h=v.message,C=h===void 0?"":h,N=v.title,x=v.timeout,B=(0,t.useLocalState)(s,"input",b),L=B[0],w=B[1],A=(0,t.useLocalState)(s,"binding",!0),T=A[0],E=A[1],O=function(){function F(j){if(!T){j.key===a.KEY.Enter&&c("submit",{entry:L}),j.key===a.KEY.Escape&&c("cancel");return}if(j.preventDefault(),k(j)){P(i(j)),E(!1);return}else if(j.key===a.KEY.Escape){P(b),E(!1);return}}return F}(),P=function(){function F(j){j!==L&&w(j)}return F}(),R=130+(C.length>30?Math.ceil(C.length/3):0)+(C.length&&g?5:0);return(0,e.createComponentVNode)(2,d.Window,{title:N,width:240,height:R,children:[x&&(0,e.createComponentVNode)(2,V.Loader,{value:x}),(0,e.createComponentVNode)(2,d.Window.Content,{onKeyDown:function(){function F(j){O(j)}return F}(),children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Autofocus),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:C})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{disabled:T,content:T&&T!==null?"Awaiting input...":""+L,width:"100%",textAlign:"center",onClick:function(){function F(){P(b),E(!0)}return F}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,y.InputButtons,{input:L})})]})]})})]})}return f}()},35655:function(I,r,n){"use strict";r.__esModule=!0,r.KeycardAuth=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.KeycardAuth=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=(0,e.createComponentVNode)(2,t.Section,{title:"Keycard Authentication Device",children:(0,e.createComponentVNode)(2,t.Box,{children:"This device is used to trigger certain high security events. It requires the simultaneous swipe of two high-level ID cards."})});if(!i.swiping&&!i.busy)return(0,e.createComponentVNode)(2,o.Window,{width:540,height:280,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[l,(0,e.createComponentVNode)(2,t.Section,{title:"Choose Action",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Red Alert",children:(0,e.createComponentVNode)(2,t.Button,{icon:"exclamation-triangle",disabled:!i.redAvailable,onClick:function(){function u(){return p("triggerevent",{triggerevent:"Red Alert"})}return u}(),content:"Red Alert"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ERT",children:(0,e.createComponentVNode)(2,t.Button,{icon:"broadcast-tower",onClick:function(){function u(){return p("triggerevent",{triggerevent:"Emergency Response Team"})}return u}(),content:"Call ERT"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Maint Access",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"door-open",onClick:function(){function u(){return p("triggerevent",{triggerevent:"Grant Emergency Maintenance Access"})}return u}(),content:"Grant"}),(0,e.createComponentVNode)(2,t.Button,{icon:"door-closed",onClick:function(){function u(){return p("triggerevent",{triggerevent:"Revoke Emergency Maintenance Access"})}return u}(),content:"Revoke"})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Station-Wide Access",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"door-open",onClick:function(){function u(){return p("triggerevent",{triggerevent:"Activate Station-Wide Emergency Access"})}return u}(),content:"Grant"}),(0,e.createComponentVNode)(2,t.Button,{icon:"door-closed",onClick:function(){function u(){return p("triggerevent",{triggerevent:"Deactivate Station-Wide Emergency Access"})}return u}(),content:"Revoke"})]})]})})]})});var f=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Waiting for YOU to swipe your ID..."});return!i.hasSwiped&&!i.ertreason&&i.event==="Emergency Response Team"?f=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Fill out the reason for your ERT request."}):i.hasConfirm?f=(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Request Confirmed!"}):i.isRemote?f=(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"Swipe your card to CONFIRM the remote request."}):i.hasSwiped&&(f=(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"Waiting for second person to confirm..."})),(0,e.createComponentVNode)(2,o.Window,{width:540,height:265,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[l,i.event==="Emergency Response Team"&&(0,e.createComponentVNode)(2,t.Section,{title:"Reason for ERT Call",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{color:i.ertreason?"":"red",icon:i.ertreason?"check":"pencil-alt",content:i.ertreason?i.ertreason:"-----",disabled:i.busy,onClick:function(){function u(){return p("ert")}return u}()})})}),(0,e.createComponentVNode)(2,t.Section,{title:i.event,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back",disabled:i.busy||i.hasConfirm,onClick:function(){function u(){return p("reset")}return u}()}),children:f})]})})}return y}()},40951:function(I,r,n){"use strict";r.__esModule=!0,r.LaborClaimConsole=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),d=n(98595),y=r.LaborClaimConsole=function(){function S(p,i){return(0,e.createComponentVNode)(2,d.Window,{width:315,height:470,children:(0,e.createComponentVNode)(2,d.Window.Content,{children:[(0,e.createComponentVNode)(2,V),(0,e.createComponentVNode)(2,k)]})})}return S}(),V=function(p,i){var l=(0,t.useBackend)(i),f=l.act,u=l.data,s=u.can_go_home,m=u.emagged,c=u.id_inserted,v=u.id_name,b=u.id_points,g=u.id_goal,h=u.unclaimed_points,C=m?0:1,N=m?"ERR0R":s?"Completed!":"Insufficient";return(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Status",children:!!c&&(0,e.createComponentVNode)(2,o.ProgressBar,{value:b/g,ranges:{good:[C,1/0],bad:[-1/0,C]},children:b+" / "+g+" "+N})||!!m&&"ERR0R COMPLETED?!@"||"No ID inserted"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Shuttle controls",children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,content:"Move shuttle",disabled:!s,onClick:function(){function x(){return f("move_shuttle")}return x}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Unclaimed points",children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,content:"Claim points ("+h+")",disabled:!c||!h,onClick:function(){function x(){return f("claim_points")}return x}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Inserted ID",children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,content:c?v:"-------------",onClick:function(){function x(){return f("handle_id")}return x}()})})]})})},k=function(p,i){var l=(0,t.useBackend)(i),f=l.data,u=f.ores;return(0,e.createComponentVNode)(2,o.Section,{title:"Material values",children:(0,e.createComponentVNode)(2,o.Table,{children:[(0,e.createComponentVNode)(2,o.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Material"}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,textAlign:"right",children:"Value"})]}),u.map(function(s){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,a.toTitleCase)(s.ore)}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,textAlign:"right",children:(0,e.createComponentVNode)(2,o.Box,{color:"label",inline:!0,children:s.value})})]},s.ore)})]})})}},9525:function(I,r,n){"use strict";r.__esModule=!0,r.LawManager=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.LawManager=function(){function S(p,i){var l=(0,a.useBackend)(i),f=l.act,u=l.data,s=u.isAdmin,m=u.isSlaved,c=u.isMalf,v=u.isAIMalf,b=u.view;return(0,e.createComponentVNode)(2,o.Window,{width:800,height:c?620:365,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[!!(s&&m)&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:["This unit is slaved to ",m,"."]}),!!(c||v)&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Law Management",selected:b===0,onClick:function(){function g(){return f("set_view",{set_view:0})}return g}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Lawsets",selected:b===1,onClick:function(){function g(){return f("set_view",{set_view:1})}return g}()})]}),b===0&&(0,e.createComponentVNode)(2,y),b===1&&(0,e.createComponentVNode)(2,V)]})})}return S}(),y=function(p,i){var l=(0,a.useBackend)(i),f=l.act,u=l.data,s=u.has_zeroth_laws,m=u.zeroth_laws,c=u.has_ion_laws,v=u.ion_laws,b=u.ion_law_nr,g=u.has_inherent_laws,h=u.inherent_laws,C=u.has_supplied_laws,N=u.supplied_laws,x=u.channels,B=u.channel,L=u.isMalf,w=u.isAdmin,A=u.zeroth_law,T=u.ion_law,E=u.inherent_law,O=u.supplied_law,P=u.supplied_law_position;return(0,e.createFragment)([!!s&&(0,e.createComponentVNode)(2,k,{title:"ERR_NULL_VALUE",laws:m,ctx:i}),!!c&&(0,e.createComponentVNode)(2,k,{title:b,laws:v,ctx:i}),!!g&&(0,e.createComponentVNode)(2,k,{title:"Inherent",laws:h,ctx:i}),!!C&&(0,e.createComponentVNode)(2,k,{title:"Supplied",laws:N,ctx:i}),(0,e.createComponentVNode)(2,t.Section,{title:"Statement Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Statement Channel",children:x.map(function(R){return(0,e.createComponentVNode)(2,t.Button,{content:R.channel,selected:R.channel===B,onClick:function(){function F(){return f("law_channel",{law_channel:R.channel})}return F}()},R.channel)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"State Laws",children:(0,e.createComponentVNode)(2,t.Button,{content:"State Laws",onClick:function(){function R(){return f("state_laws")}return R}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Law Notification",children:(0,e.createComponentVNode)(2,t.Button,{content:"Notify",onClick:function(){function R(){return f("notify_laws")}return R}()})})]})}),!!L&&(0,e.createComponentVNode)(2,t.Section,{title:"Add Laws",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"10%",children:"Type"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"60%",children:"Law"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"10%",children:"Index"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"20%",children:"Actions"})]}),!!(w&&!s)&&(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Zero"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:A}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"N/A"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function R(){return f("change_zeroth_law")}return R}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function R(){return f("add_zeroth_law")}return R}()})]})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Ion"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:T}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"N/A"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function R(){return f("change_ion_law")}return R}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function R(){return f("add_ion_law")}return R}()})]})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Inherent"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:E}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"N/A"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function R(){return f("change_inherent_law")}return R}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function R(){return f("add_inherent_law")}return R}()})]})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Supplied"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:O}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:P,onClick:function(){function R(){return f("change_supplied_law_position")}return R}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function R(){return f("change_supplied_law")}return R}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function R(){return f("add_supplied_law")}return R}()})]})]})]})})],0)},V=function(p,i){var l=(0,a.useBackend)(i),f=l.act,u=l.data,s=u.law_sets;return(0,e.createComponentVNode)(2,t.Box,{children:s.map(function(m){return(0,e.createComponentVNode)(2,t.Section,{title:m.name+" - "+m.header,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Load Laws",icon:"download",onClick:function(){function c(){return f("transfer_laws",{transfer_laws:m.ref})}return c}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[m.laws.has_ion_laws>0&&m.laws.ion_laws.map(function(c){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:c.index,children:c.law},c.index)}),m.laws.has_zeroth_laws>0&&m.laws.zeroth_laws.map(function(c){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:c.index,children:c.law},c.index)}),m.laws.has_inherent_laws>0&&m.laws.inherent_laws.map(function(c){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:c.index,children:c.law},c.index)}),m.laws.has_supplied_laws>0&&m.laws.inherent_laws.map(function(c){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:c.index,children:c.law},c.index)})]})},m.name)})})},k=function(p,i){var l=(0,a.useBackend)(p.ctx),f=l.act,u=l.data,s=u.isMalf;return(0,e.createComponentVNode)(2,t.Section,{title:p.title+" Laws",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"10%",children:"Index"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"69%",children:"Law"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"21%",children:"State?"})]}),p.laws.map(function(m){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:m.index}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:m.law}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:m.state?"Yes":"No",selected:m.state,onClick:function(){function c(){return f("state_law",{ref:m.ref,state_law:m.state?0:1})}return c}()}),!!s&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function c(){return f("edit_law",{edit_law:m.ref})}return c}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Delete",icon:"trash",color:"red",onClick:function(){function c(){return f("delete_law",{delete_law:m.ref})}return c}()})],4)]})]},m.law)})]})})}},90447:function(I,r,n){"use strict";r.__esModule=!0,r.ListInputModal=void 0;var e=n(89005),a=n(51057),t=n(19203),o=n(36036),d=n(72253),y=n(92986),V=n(98595),k=r.ListInputModal=function(){function i(l,f){var u=(0,d.useBackend)(f),s=u.act,m=u.data,c=m.items,v=c===void 0?[]:c,b=m.message,g=b===void 0?"":b,h=m.init_value,C=m.timeout,N=m.title,x=(0,d.useLocalState)(f,"selected",v.indexOf(h)),B=x[0],L=x[1],w=(0,d.useLocalState)(f,"searchBarVisible",v.length>10),A=w[0],T=w[1],E=(0,d.useLocalState)(f,"searchQuery",""),O=E[0],P=E[1],R=function(){function ne(Q){var he=$.length-1;if(Q===y.KEY_DOWN)if(B===null||B===he){var Ve;L(0),(Ve=document.getElementById("0"))==null||Ve.scrollIntoView()}else{var Ne;L(B+1),(Ne=document.getElementById((B+1).toString()))==null||Ne.scrollIntoView()}else if(Q===y.KEY_UP)if(B===null||B===0){var Be;L(he),(Be=document.getElementById(he.toString()))==null||Be.scrollIntoView()}else{var Le;L(B-1),(Le=document.getElementById((B-1).toString()))==null||Le.scrollIntoView()}}return ne}(),F=function(){function ne(Q){Q!==B&&L(Q)}return ne}(),j=function(){function ne(){T(!1),T(!0)}return ne}(),W=function(){function ne(Q){var he=String.fromCharCode(Q),Ve=v.find(function(Le){return Le==null?void 0:Le.toLowerCase().startsWith(he==null?void 0:he.toLowerCase())});if(Ve){var Ne,Be=v.indexOf(Ve);L(Be),(Ne=document.getElementById(Be.toString()))==null||Ne.scrollIntoView()}}return ne}(),z=function(){function ne(Q){var he;Q!==O&&(P(Q),L(0),(he=document.getElementById("0"))==null||he.scrollIntoView())}return ne}(),H=function(){function ne(){T(!A),P("")}return ne}(),$=v.filter(function(ne){return ne==null?void 0:ne.toLowerCase().includes(O.toLowerCase())}),G=330+Math.ceil(g.length/3);return A||setTimeout(function(){var ne;return(ne=document.getElementById(B.toString()))==null?void 0:ne.focus()},1),(0,e.createComponentVNode)(2,V.Window,{title:N,width:325,height:G,children:[C&&(0,e.createComponentVNode)(2,a.Loader,{value:C}),(0,e.createComponentVNode)(2,V.Window.Content,{onKeyDown:function(){function ne(Q){var he=window.event?Q.which:Q.keyCode;(he===y.KEY_DOWN||he===y.KEY_UP)&&(Q.preventDefault(),R(he)),he===y.KEY_ENTER&&(Q.preventDefault(),s("submit",{entry:$[B]})),!A&&he>=y.KEY_A&&he<=y.KEY_Z&&(Q.preventDefault(),W(he)),he===y.KEY_ESCAPE&&(Q.preventDefault(),s("cancel"))}return ne}(),children:(0,e.createComponentVNode)(2,o.Section,{buttons:(0,e.createComponentVNode)(2,o.Button,{compact:!0,icon:A?"search":"font",selected:!0,tooltip:A?"Search Mode. Type to search or use arrow keys to select manually.":"Hotkey Mode. Type a letter to jump to the first match. Enter to select.",tooltipPosition:"left",onClick:function(){function ne(){return H()}return ne}()}),className:"ListInput__Section",fill:!0,title:g,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,S,{filteredItems:$,onClick:F,onFocusSearch:j,searchBarVisible:A,selected:B})}),(0,e.createComponentVNode)(2,o.Stack.Item,{m:0,children:A&&(0,e.createComponentVNode)(2,p,{filteredItems:$,onSearch:z,searchQuery:O,selected:B})}),(0,e.createComponentVNode)(2,o.Stack.Item,{mt:.5,children:(0,e.createComponentVNode)(2,t.InputButtons,{input:$[B]})})]})})})]})}return i}(),S=function(l,f){var u=(0,d.useBackend)(f),s=u.act,m=l.filteredItems,c=l.onClick,v=l.onFocusSearch,b=l.searchBarVisible,g=l.selected;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,tabIndex:0,children:m.map(function(h,C){return(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:"transparent",id:C,onClick:function(){function N(){return c(C)}return N}(),onDblClick:function(){function N(x){x.preventDefault(),s("submit",{entry:m[g]})}return N}(),onKeyDown:function(){function N(x){var B=window.event?x.which:x.keyCode;b&&B>=y.KEY_A&&B<=y.KEY_Z&&(x.preventDefault(),v())}return N}(),selected:C===g,style:{animation:"none",transition:"none"},children:h.replace(/^\w/,function(N){return N.toUpperCase()})},C)})})},p=function(l,f){var u=(0,d.useBackend)(f),s=u.act,m=l.filteredItems,c=l.onSearch,v=l.searchQuery,b=l.selected;return(0,e.createComponentVNode)(2,o.Input,{width:"100%",autoFocus:!0,autoSelect:!0,onEnter:function(){function g(h){h.preventDefault(),s("submit",{entry:m[b]})}return g}(),onInput:function(){function g(h,C){return c(C)}return g}(),placeholder:"Search...",value:v})}},72106:function(I,r,n){"use strict";r.__esModule=!0,r.MechBayConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.MechBayConsole=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.recharge_port,f=l&&l.mech,u=f&&f.cell,s=f&&f.name;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:150,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:s?"Mech status: "+s:"Mech status",textAlign:"center",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Sync",onClick:function(){function m(){return p("reconnect")}return m}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:!l&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No power port detected. Please re-sync."})||!f&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No mech detected."})||(0,e.createComponentVNode)(2,t.ProgressBar,{value:f.health/f.maxhealth,ranges:{good:[.7,1/0],average:[.3,.7],bad:[-1/0,.3]}})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:!l&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No power port detected. Please re-sync."})||!f&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No mech detected."})||!u&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No cell is installed."})||(0,e.createComponentVNode)(2,t.ProgressBar,{value:u.charge/u.maxcharge,ranges:{good:[.7,1/0],average:[.3,.7],bad:[-1/0,.3]},children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:u.charge})," / "+u.maxcharge]})})]})})})})}return y}()},7466:function(I,r,n){"use strict";r.__esModule=!0,r.MechaControlConsole=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),d=n(98595),y=n(25328),V=r.MechaControlConsole=function(){function k(S,p){var i=(0,t.useBackend)(p),l=i.act,f=i.data,u=f.beacons,s=f.stored_data;return s.length?(0,e.createComponentVNode)(2,d.Window,{width:420,height:500,children:(0,e.createComponentVNode)(2,d.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Section,{title:"Log",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"window-close",onClick:function(){function m(){return l("clear_log")}return m}()}),children:s.map(function(m){return(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{color:"label",children:["(",m.time,")"]}),(0,e.createComponentVNode)(2,o.Box,{children:(0,y.decodeHtmlEntities)(m.message)})]},m.time)})})})}):(0,e.createComponentVNode)(2,d.Window,{width:420,height:500,children:(0,e.createComponentVNode)(2,d.Window.Content,{scrollable:!0,children:u.length&&u.map(function(m){return(0,e.createComponentVNode)(2,o.Section,{title:m.name,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"comment",onClick:function(){function c(){return l("send_message",{mt:m.uid})}return c}(),children:"Message"}),(0,e.createComponentVNode)(2,o.Button,{icon:"eye",onClick:function(){function c(){return l("get_log",{mt:m.uid})}return c}(),children:"View Log"}),(0,e.createComponentVNode)(2,o.Button.Confirm,{color:"red",content:"EMP",icon:"bomb",onClick:function(){function c(){return l("shock",{mt:m.uid})}return c}()})],4),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,o.ProgressBar,{ranges:{good:[m.maxHealth*.75,1/0],average:[m.maxHealth*.5,m.maxHealth*.75],bad:[-1/0,m.maxHealth*.5]},value:m.health,maxValue:m.maxHealth})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Cell Charge",children:m.cell&&(0,e.createComponentVNode)(2,o.ProgressBar,{ranges:{good:[m.cellMaxCharge*.75,1/0],average:[m.cellMaxCharge*.5,m.cellMaxCharge*.75],bad:[-1/0,m.cellMaxCharge*.5]},value:m.cellCharge,maxValue:m.cellMaxCharge})||(0,e.createComponentVNode)(2,o.NoticeBox,{children:"No Cell Installed"})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Air Tank",children:[m.airtank,"kPa"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Pilot",children:m.pilot||"Unoccupied"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Location",children:(0,y.toTitleCase)(m.location)||"Unknown"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Active Equipment",children:m.active||"None"}),m.cargoMax&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Cargo Space",children:(0,e.createComponentVNode)(2,o.ProgressBar,{ranges:{bad:[m.cargoMax*.75,1/0],average:[m.cargoMax*.5,m.cargoMax*.75],good:[-1/0,m.cargoMax*.5]},value:m.cargoUsed,maxValue:m.cargoMax})})||null]})},m.name)})||(0,e.createComponentVNode)(2,o.NoticeBox,{children:"No mecha beacons found."})})})}return k}()},79625:function(I,r,n){"use strict";r.__esModule=!0,r.MedicalRecords=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),d=n(3939),y=n(98595),V=n(321),k=n(5485),S=n(22091),p={Minor:"lightgray",Medium:"good",Harmful:"average","Dangerous!":"bad","BIOHAZARD THREAT!":"darkred"},i={"*Deceased*":"deceased","*SSD*":"ssd","Physically Unfit":"physically_unfit",Disabled:"disabled"},l=function(w,A){(0,d.modalOpen)(w,"edit",{field:A.edit,value:A.value})},f=function(w,A){var T=w.args;return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:T.name||"Virus",children:(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Number of stages",children:T.max_stages}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Spread",children:[T.spread_text," Transmission"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Possible cure",children:T.cure}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Notes",children:T.desc}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Severity",color:p[T.severity],children:T.severity})]})})})},u=r.MedicalRecords=function(){function L(w,A){var T=(0,t.useBackend)(A),E=T.data,O=E.loginState,P=E.screen;if(!O.logged_in)return(0,e.createComponentVNode)(2,y.Window,{width:800,height:900,children:(0,e.createComponentVNode)(2,y.Window.Content,{children:(0,e.createComponentVNode)(2,k.LoginScreen)})});var R;return P===2?R=(0,e.createComponentVNode)(2,s):P===3?R=(0,e.createComponentVNode)(2,m):P===4?R=(0,e.createComponentVNode)(2,c):P===5?R=(0,e.createComponentVNode)(2,h):P===6&&(R=(0,e.createComponentVNode)(2,C)),(0,e.createComponentVNode)(2,y.Window,{width:800,height:900,children:[(0,e.createComponentVNode)(2,d.ComplexModal),(0,e.createComponentVNode)(2,y.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,V.LoginInfo),(0,e.createComponentVNode)(2,S.TemporaryNotice),(0,e.createComponentVNode)(2,B),R]})})]})}return L}(),s=function(w,A){var T=(0,t.useBackend)(A),E=T.act,O=T.data,P=O.records,R=(0,t.useLocalState)(A,"searchText",""),F=R[0],j=R[1],W=(0,t.useLocalState)(A,"sortId","name"),z=W[0],H=W[1],$=(0,t.useLocalState)(A,"sortOrder",!0),G=$[0],ne=$[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Manage Records",icon:"wrench",ml:"0.25rem",onClick:function(){function Q(){return E("screen",{screen:3})}return Q}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{fluid:!0,placeholder:"Search by Name, ID, Physical Status, or Mental Status",onInput:function(){function Q(he,Ve){return j(Ve)}return Q}()})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,mt:.5,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"MedicalRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,N,{id:"name",children:"Name"}),(0,e.createComponentVNode)(2,N,{id:"id",children:"ID"}),(0,e.createComponentVNode)(2,N,{id:"rank",children:"Assignment"}),(0,e.createComponentVNode)(2,N,{id:"p_stat",children:"Patient Status"}),(0,e.createComponentVNode)(2,N,{id:"m_stat",children:"Mental Status"})]}),P.filter((0,a.createSearch)(F,function(Q){return Q.name+"|"+Q.id+"|"+Q.rank+"|"+Q.p_stat+"|"+Q.m_stat})).sort(function(Q,he){var Ve=G?1:-1;return Q[z].localeCompare(he[z])*Ve}).map(function(Q){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listRow--"+i[Q.p_stat],onClick:function(){function he(){return E("view_record",{view_record:Q.ref})}return he}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",Q.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Q.id}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Q.rank}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Q.p_stat}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Q.m_stat})]},Q.id)})]})})})],4)},m=function(w,A){var T=(0,t.useBackend)(A),E=T.act;return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,lineHeight:3,color:"translucent",icon:"download",content:"Backup to Disk",disabled:!0})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:[(0,e.createComponentVNode)(2,o.Button,{fluid:!0,lineHeight:3,color:"translucent",icon:"upload",content:"Upload from Disk",my:"0.5rem",disabled:!0})," "]}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Button.Confirm,{fluid:!0,lineHeight:3,icon:"trash",color:"translucent",content:"Delete All Medical Records",onClick:function(){function O(){return E("del_all")}return O}()})})]})})},c=function(w,A){var T=(0,t.useBackend)(A),E=T.act,O=T.data,P=O.medical,R=O.printing;return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{height:"235px",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"General Data",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:R?"spinner":"print",disabled:R,iconSpin:!!R,content:"Print Record",ml:"0.5rem",onClick:function(){function F(){return E("print_record")}return F}()}),children:(0,e.createComponentVNode)(2,v)})}),!P||!P.fields?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Medical Data",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"pen",content:"Create New Record",onClick:function(){function F(){return E("new")}return F}()}),children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{bold:!0,grow:!0,textAlign:"center",fontSize:1.75,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon.Stack,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"scroll",size:5,color:"gray"}),(0,e.createComponentVNode)(2,o.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"Medical records lost!"]})})})}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Medical Data",buttons:(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",disabled:!!P.empty,content:"Delete Medical Record",onClick:function(){function F(){return E("del_r")}return F}()}),children:(0,e.createComponentVNode)(2,b)})}),(0,e.createComponentVNode)(2,g)],4)],0)},v=function(w,A){var T=(0,t.useBackend)(A),E=T.data,O=E.general;return!O||!O.fields?(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:"General records lost!"})})}):(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:O.fields.map(function(P,R){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:P.field,children:[(0,e.createComponentVNode)(2,o.Box,{height:"20px",inline:!0,children:P.value}),!!P.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",onClick:function(){function F(){return l(A,P)}return F}()})]},R)})})}),!!O.has_photos&&O.photos.map(function(P,R){return(0,e.createComponentVNode)(2,o.Stack.Item,{inline:!0,textAlign:"center",color:"label",ml:0,children:[(0,e.createVNode)(1,"img",null,null,1,{src:P,style:{width:"96px","margin-top":"2.5rem","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}}),(0,e.createVNode)(1,"br"),"Photo #",R+1]},R)})]})},b=function(w,A){var T=(0,t.useBackend)(A),E=T.act,O=T.data,P=O.medical;return!P||!P.fields?(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:"Medical records lost!"})})}):(0,e.createComponentVNode)(2,o.Stack,{children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:P.fields.map(function(R,F){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:R.field,preserveWhitespace:!0,children:[(0,a.decodeHtmlEntities)(R.value),!!R.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",mb:R.line_break?"1rem":"initial",onClick:function(){function j(){return l(A,R)}return j}()})]},F)})})})})},g=function(w,A){var T=(0,t.useBackend)(A),E=T.act,O=T.data,P=O.medical;return(0,e.createComponentVNode)(2,o.Stack.Item,{height:"150px",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Comments/Log",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"comment",content:"Add Entry",onClick:function(){function R(){return(0,d.modalOpen)(A,"add_comment")}return R}()}),children:P.comments.length===0?(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No comments found."}):P.comments.map(function(R,F){return(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{color:"label",inline:!0,children:R.header}),(0,e.createVNode)(1,"br"),R.text,(0,e.createComponentVNode)(2,o.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){function j(){return E("del_c",{del_c:F+1})}return j}()})]},F)})})})},h=function(w,A){var T=(0,t.useBackend)(A),E=T.act,O=T.data,P=O.virus,R=(0,t.useLocalState)(A,"searchText",""),F=R[0],j=R[1],W=(0,t.useLocalState)(A,"sortId2","name"),z=W[0],H=W[1],$=(0,t.useLocalState)(A,"sortOrder2",!0),G=$[0],ne=$[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{ml:"0.25rem",fluid:!0,placeholder:"Search by Name, Max Stages, or Severity",onInput:function(){function Q(he,Ve){return j(Ve)}return Q}()})}),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,mt:.5,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"MedicalRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,x,{id:"name",children:"Name"}),(0,e.createComponentVNode)(2,x,{id:"max_stages",children:"Max Stages"}),(0,e.createComponentVNode)(2,x,{id:"severity",children:"Severity"})]}),P.filter((0,a.createSearch)(F,function(Q){return Q.name+"|"+Q.max_stages+"|"+Q.severity})).sort(function(Q,he){var Ve=G?1:-1;return Q[z].localeCompare(he[z])*Ve}).map(function(Q){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listVirus--"+Q.severity,onClick:function(){function he(){return E("vir",{vir:Q.D})}return he}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"virus"})," ",Q.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Q.max_stages}),(0,e.createComponentVNode)(2,o.Table.Cell,{color:p[Q.severity],children:Q.severity})]},Q.id)})]})})})})],4)},C=function(w,A){var T=(0,t.useBackend)(A),E=T.act,O=T.data,P=O.medbots;return P.length===0?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{bold:!0,grow:!0,textAlign:"center",fontSize:1.75,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon.Stack,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"robot",size:5,color:"gray"}),(0,e.createComponentVNode)(2,o.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"There are no Medibots."]})})})}):(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"MedicalRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Area"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Chemicals"})]}),P.map(function(R){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listMedbot--"+R.on,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"medical"})," ",R.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:[R.area||"Unknown"," (",R.x,", ",R.y,")"]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:R.on?(0,e.createComponentVNode)(2,o.Box,{color:"good",children:"Online"}):(0,e.createComponentVNode)(2,o.Box,{color:"average",children:"Offline"})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:R.use_beaker?"Reservoir: "+R.total_volume+"/"+R.maximum_volume:"Using internal synthesizer"})]},R.id)})]})})})},N=function(w,A){var T=(0,t.useLocalState)(A,"sortId","name"),E=T[0],O=T[1],P=(0,t.useLocalState)(A,"sortOrder",!0),R=P[0],F=P[1],j=w.id,W=w.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:E!==j&&"transparent",onClick:function(){function z(){E===j?F(!R):(O(j),F(!0))}return z}(),children:[W,E===j&&(0,e.createComponentVNode)(2,o.Icon,{name:R?"sort-up":"sort-down",ml:"0.25rem;"})]})})},x=function(w,A){var T=(0,t.useLocalState)(A,"sortId2","name"),E=T[0],O=T[1],P=(0,t.useLocalState)(A,"sortOrder2",!0),R=P[0],F=P[1],j=w.id,W=w.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:E!==j&&"transparent",onClick:function(){function z(){E===j?F(!R):(O(j),F(!0))}return z}(),children:[W,E===j&&(0,e.createComponentVNode)(2,o.Icon,{name:R?"sort-up":"sort-down",ml:"0.25rem;"})]})})},B=function(w,A){var T=(0,t.useBackend)(A),E=T.act,O=T.data,P=O.screen,R=O.general;return(0,e.createComponentVNode)(2,o.Stack.Item,{m:0,children:(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"list",selected:P===2,onClick:function(){function F(){E("screen",{screen:2})}return F}(),children:"List Records"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"database",selected:P===5,onClick:function(){function F(){E("screen",{screen:5})}return F}(),children:"Virus Database"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"plus-square",selected:P===6,onClick:function(){function F(){return E("screen",{screen:6})}return F}(),children:"Medibot Tracking"}),P===3&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"wrench",selected:P===3,children:"Record Maintenance"}),P===4&&R&&!R.empty&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"file",selected:P===4,children:["Record: ",R.fields[0].value]})]})})};(0,d.modalRegisterBodyOverride)("virus",f)},52306:function(I,r,n){"use strict";r.__esModule=!0,r.Mimicking=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.Mimicking=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.slots||[];return(0,e.createComponentVNode)(2,o.Window,{width:400,height:300,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,fill:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:[l.map(function(f){return(0,e.createComponentVNode)(2,t.Section,{mb:.5,title:f.name,level:2,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Choose",selected:f.selected,onClick:function(){function u(){return p("Choose",{id:f.id})}return u}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Delete",color:"bad",onClick:function(){function u(){return p("Delete",{id:f.id})}return u}()})],4),children:(0,e.createComponentVNode)(2,t.Box,{preserveWhitespace:!0,textColor:"#878787",fontSize:"14px",children:["Voice: ",f.voice]})},f.id)}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"Add",onClick:function(){function f(){return p("Add")}return f}()})]})})})})}return y}()},66238:function(I,r,n){"use strict";r.__esModule=!0,r.Minesweeper=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.Minesweeper=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.matrix,f=i.showMessage,u=i.tokens,s=i.uiWidth,m={1:"blue",2:"green",3:"red",4:"darkblue",5:"brown",6:"lightblue",7:"black",8:"white"};document.addEventListener("contextmenu",function(C){return C.preventDefault()});var c=function(){function C(N,x,B){N.button!==0&&N.button!==2||p("Square",{X:x,Y:B,mode:N.button===2?h[b]:b})}return C}(),v=(0,a.useLocalState)(k,"mode","bomb"),b=v[0],g=v[1],h={flag:"bomb",bomb:"flag"};return(0,e.createComponentVNode)(2,o.Window,{theme:"ntOS95",width:s+80,height:750,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"\u0418\u0433\u0440\u043E\u0432\u043E\u0435 \u043F\u043E\u043B\u0435",textAlign:"center",fill:!0,fitted:!0,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"bomb",iconColor:"black",selected:b==="bomb",onClick:function(){function C(){return g("bomb")}return C}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"flag",iconColor:"red",selected:b==="flag",onClick:function(){function C(){return g("flag")}return C}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",onClick:function(){function C(){return p("Mode",{mode:"16x30"})}return C}()})],4),children:[(0,e.createVNode)(1,"p"),Object.keys(l).map(function(C){return(0,e.createComponentVNode)(2,t.Box,{children:Object.keys(l[C]).map(function(N){return(0,e.createComponentVNode)(2,t.Button,{m:"1px",height:"30px",width:"30px",className:l[C][N].open?"Minesweeper__open":"Minesweeper__closed",bold:!0,color:"transparent",icon:l[C][N].open?l[C][N].bomb?"bomb":"":l[C][N].flag?"flag":"",textColor:l[C][N].open?l[C][N].bomb?"black":m[l[C][N].around]:l[C][N].flag?"red":"gray",onMouseDown:function(){function x(B){return c(B,C,N)}return x}(),children:l[C][N].open&&!l[C][N].bomb&&l[C][N].around?l[C][N].around:" "},N)})},C)}),(0,e.createVNode)(1,"p"),(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",className:"Minesweeper__message",children:["\u0414\u043B\u044F \u043F\u043E\u0431\u0435\u0434\u044B \u043D\u0443\u0436\u043D\u043E \u043F\u043E\u043C\u0435\u0442\u0438\u0442\u044C \u0444\u043B\u0430\u0436\u043A\u0430\u043C\u0438 \u0432\u0441\u0435 \u0431\u043E\u043C\u0431\u044B, \u0430 \u0442\u0430\u043A\u0436\u0435 \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u0432\u0441\u0435 \u043F\u0443\u0441\u0442\u044B\u0435 \u043A\u043B\u0435\u0442\u043A\u0438.",(0,e.createVNode)(1,"br"),"\u0411\u0430\u043B\u0430\u043D\u0441 \u0442\u043E\u043A\u0435\u043D\u043E\u0432: ",u,(0,e.createVNode)(1,"br"),f]})]})})})})}return y}()},21385:function(I,r,n){"use strict";r.__esModule=!0,r.MiniGamesMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.MiniGamesMenu=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.spawners||[],f=i.thunderdome_eligible,u=i.notifications_enabled;return(0,e.createComponentVNode)(2,o.Window,{width:700,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"power-off",tooltip:f?"\u0412\u044B\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0443\u0447\u0430\u0441\u0442\u0438\u0435 \u0432 \u0431\u043E\u0435\u0432\u044B\u0445 \u043C\u0438\u043D\u0438-\u0438\u0433\u0440\u0430\u0445":"\u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0443\u0447\u0430\u0441\u0442\u0438\u0435 \u0432 \u0431\u043E\u0435\u0432\u044B\u0445 \u043C\u0438\u043D\u0438-\u0438\u0433\u0440\u0430\u0445",tooltipPosition:"bottom",content:f?"\u0412\u044B\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0443\u0447\u0430\u0441\u0442\u0438\u0435 \u0432 \u0431\u043E\u0435\u0432\u044B\u0445 \u043C\u0438\u043D\u0438-\u0438\u0433\u0440\u0430\u0445":"\u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0443\u0447\u0430\u0441\u0442\u0438\u0435 \u0432 \u0431\u043E\u0435\u0432\u044B\u0445 \u043C\u0438\u043D\u0438-\u0438\u0433\u0440\u0430\u0445",color:f?"good":"bad",onClick:function(){function s(){return p("toggle_minigames")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"power-off",tooltip:u?"\u041E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u044F \u043E \u0431\u043E\u0435\u0432\u044B\u0445 \u043C\u0438\u043D\u0438-\u0438\u0433\u0440\u0430\u0445":"\u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u044F \u043E \u0431\u043E\u0435\u0432\u044B\u0445 \u043C\u0438\u043D\u0438-\u0438\u0433\u0440\u0430\u0445",tooltipPosition:"bottom",content:u?"\u041E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u044F \u043E \u0431\u043E\u0435\u0432\u044B\u0445 \u043C\u0438\u043D\u0438-\u0438\u0433\u0440\u0430\u0445":"\u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u044F \u043E \u0431\u043E\u0435\u0432\u044B\u0445 \u043C\u0438\u043D\u0438-\u0438\u0433\u0440\u0430\u0445",color:u?"good":"bad",onClick:function(){function s(){return p("toggle_notifications")}return s}()}),(0,e.createComponentVNode)(2,t.Section,{children:l.map(function(s){return(0,e.createComponentVNode)(2,t.Section,{mb:.5,title:s.name,level:2,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-circle-right",content:"Jump",onClick:function(){function m(){return p("jump",{ID:s.uids})}return m}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-circle-right",content:"Start",onClick:function(){function m(){return p("spawn",{ID:s.uids})}return m}()})],4),children:[(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},mb:1,fontSize:"16px",children:s.desc}),!!s.fluff&&(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},textColor:"#878787",fontSize:"14px",children:s.fluff}),!!s.important_info&&(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},mt:1,bold:!0,color:"red",fontSize:"18px",children:s.important_info})]},s.name)})})]})})}return y}()},87684:function(I,r,n){"use strict";r.__esModule=!0,r.MiningVendor=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),d=n(98595),y=["title","items"];function V(u,s){if(u==null)return{};var m={};for(var c in u)if({}.hasOwnProperty.call(u,c)){if(s.includes(c))continue;m[c]=u[c]}return m}var k={Alphabetical:function(){function u(s,m){return s-m}return u}(),Availability:function(){function u(s,m){return-(s.affordable-m.affordable)}return u}(),Price:function(){function u(s,m){return s.price-m.price}return u}()},S=r.MiningVendor=function(){function u(s,m){return(0,e.createComponentVNode)(2,d.Window,{width:400,height:450,children:(0,e.createComponentVNode)(2,d.Window.Content,{className:"Layout__content--flexColumn",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,p),(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,i)]})})})}return u}(),p=function(s,m){var c=(0,t.useBackend)(m),v=c.act,b=c.data,g=b.has_id,h=b.id;return(0,e.createComponentVNode)(2,o.NoticeBox,{success:g,children:g?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{inline:!0,verticalAlign:"middle",style:{float:"left"},children:["Logged in as ",h.name,".",(0,e.createVNode)(1,"br"),"You have ",h.points.toLocaleString("en-US")," points."]}),(0,e.createComponentVNode)(2,o.Button,{icon:"eject",content:"Eject ID",style:{float:"right"},onClick:function(){function C(){return v("logoff")}return C}()}),(0,e.createComponentVNode)(2,o.Box,{style:{clear:"both"}})],4):"Please insert an ID in order to make purchases."})},i=function(s,m){var c=(0,t.useBackend)(m),v=c.act,b=c.data,g=b.has_id,h=b.id,C=b.items,N=(0,t.useLocalState)(m,"search",""),x=N[0],B=N[1],L=(0,t.useLocalState)(m,"sort","Alphabetical"),w=L[0],A=L[1],T=(0,t.useLocalState)(m,"descending",!1),E=T[0],O=T[1],P=(0,a.createSearch)(x,function(j){return j[0]}),R=!1,F=Object.entries(C).map(function(j,W){var z=Object.entries(j[1]).filter(P).map(function(H){return H[1].affordable=g&&h.points>=H[1].price,H[1]}).sort(k[w]);if(z.length!==0)return E&&(z=z.reverse()),R=!0,(0,e.createComponentVNode)(2,f,{title:j[0],items:z},j[0])});return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:R?F:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No items matching your criteria was found!"})})})},l=function(s,m){var c=(0,t.useLocalState)(m,"search",""),v=c[0],b=c[1],g=(0,t.useLocalState)(m,"sort",""),h=g[0],C=g[1],N=(0,t.useLocalState)(m,"descending",!1),x=N[0],B=N[1];return(0,e.createComponentVNode)(2,o.Box,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Search by item name..",width:"100%",onInput:function(){function L(w,A){return b(A)}return L}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"30%",children:(0,e.createComponentVNode)(2,o.Dropdown,{selected:"Alphabetical",options:Object.keys(k),width:"100%",onSelected:function(){function L(w){return C(w)}return L}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:x?"arrow-down":"arrow-up",height:"21px",tooltip:x?"Descending order":"Ascending order",tooltipPosition:"bottom-start",onClick:function(){function L(){return B(!x)}return L}()})})]})})},f=function(s,m){var c=(0,t.useBackend)(m),v=c.act,b=c.data,g=s.title,h=s.items,C=V(s,y);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Collapsible,Object.assign({open:!0,title:g},C,{children:h.map(function(N){return(0,e.createComponentVNode)(2,o.ImageButton,{bold:!0,asset:!0,color:"brown",imageSize:"64px",image:N.imageId,imageAsset:"mining_vendor64x64",content:N.name,children:(0,e.createComponentVNode)(2,o.ImageButton.Item,{bold:!0,horizontal:!0,width:"64px",fontSize:1,content:N.price,icon:"shopping-cart",iconSize:1,iconColor:!b.has_id||b.id.points"})}),!!O&&(0,e.createComponentVNode)(2,s,{mt:1.1,label:"ID tag",compactLabel:!0,wrapContent:F?(0,e.createComponentVNode)(2,f,{text:R,defaultText:"",color:"silver"}):(0,e.createComponentVNode)(2,o.Box,{as:"span",fontSize:"0.9rem",color:"red",italic:!0,nowrap:!0,children:"Not supported"})})]})})]})})})}return x}(),i=function(B,L){var w=B.iconName,A=B.machineName,T=B.noMachine,E=B.noMachineText,O=B.noMachineElem,P="Unknown machine",R=T?E:A||"Unknown machine",F=R===E,j=R===E||R===P;return T&&O?O:(0,e.createComponentVNode)(2,o.Flex,{mt:.1,mb:1.9,children:[!T&&(0,e.createComponentVNode)(2,o.Flex.Item,{grow:0,shrink:0,align:"center",children:(0,e.createComponentVNode)(2,o.Icon,{mr:1,size:1.1,name:w})}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:1,shrink:1,basis:0,wordWrap:"break-word",children:(0,e.createComponentVNode)(2,o.Box,{as:"span",wordWrap:"break-word",color:F?"label":"silver",fontSize:"1.1rem",bold:!0,italic:j,children:R})})]})},l=function(B,L){var w=B.text;return(0,e.createComponentVNode)(2,o.Box,{as:"span",fontSize:"0.9rem",color:"yellow",italic:!0,nowrap:!0,children:w})},f=function(B,L){var w=B.text,A=B.defaultText,T=S(B,y);return w?(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({as:"span",wordWrap:"break-word"},T,{children:w}))):(0,e.createComponentVNode)(2,l,{text:A})},u=function(B,L){var w=B.noConfirm,A=w===void 0?!1:w,T=S(B,V);return A?(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Button,Object.assign({},T))):(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Button.Confirm,Object.assign({},T)))},s=function(B,L){var w=B.label,A=B.wrapContent,T=B.noWrapContent,E=B.compactLabel,O=E===void 0?!1:E,P=S(B,k);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Flex,Object.assign({my:.5,mr:"0.5%",spacing:1,align:"center"},P,{children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:O?0:1,shrink:0,textOverflow:"ellipsis",overflow:"hidden",basis:O?"auto":0,maxWidth:O?"none":20,color:"label",nowrap:!0,children:w}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:1,shrink:1,basis:0,textAlign:"center",wordWrap:"break-word",children:A}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:.1}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:0,shrink:0,nowrap:!0,children:T})]})))},m=function(B,L){var w=(0,t.useBackend)(L),A=w.act,T=w.data;return(0,e.createComponentVNode)(2,o.Box,{mt:1.5,fontSize:"0.9rem",color:"silver",italic:!0,children:"No options"})},c=function(B,L){var w=(0,t.useBackend)(L),A=w.act,T=w.data;return(0,e.createComponentVNode)(2,o.Box,{fontSize:"1.1rem",color:"red",bold:!0,italic:!0,children:"ACCESS DENIED"})},v=function(B,L){var w=(0,t.useBackend)(L),A=w.act,T=w.data,E=T.attachedTag;return(0,e.createComponentVNode)(2,s,{label:"ID tag",wrapContent:(0,e.createComponentVNode)(2,f,{text:E,defaultText:"",color:"silver"}),noWrapContent:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{content:"Set",icon:"wrench",onClick:function(){function O(){return A("set_tag")}return O}()}),(0,e.createComponentVNode)(2,o.Button,{content:"Clear",icon:"times-circle",color:"red",disabled:!E,onClick:function(){function O(){return A("clear_tag")}return O}()})],4)})},b=function(B,L){var w=(0,t.useBackend)(L),A=w.act,T=w.data,E=T.frequency,O=T.minFrequency,P=T.maxFrequency,R=T.canReset;return(0,e.createComponentVNode)(2,s,{label:"Frequency",noWrapContent:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,unit:"kHz",step:.1,stepPixelSize:10,minValue:O/10,maxValue:P/10,value:E/10,format:function(){function F(j){return(0,a.toFixed)(j,1)}return F}(),onChange:function(){function F(j,W){return A("set_frequency",{frequency:W*10})}return F}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"undo",content:"",disabled:!R,tooltip:"Reset",onClick:function(){function F(){return A("reset_frequency")}return F}()})],4)})},g=function(B,L){var w=(0,t.useBackend)(L),A=w.act,T=w.data,E=T.attachedTags;return(0,e.createComponentVNode)(2,o.Section,{mt:1.7,ml:.5,mr:1,px:.5,title:"Linked tags",buttons:(0,e.createComponentVNode)(2,o.Button,{mr:1,pl:2.1,content:"Add tag",icon:"plus",iconRight:!0,onClick:function(){function O(){return A("add_tag")}return O}()}),children:E.map(function(O,P){return(0,e.createComponentVNode)(2,s,{mr:0,label:(0,e.createComponentVNode)(2,o.Icon,{name:"wave-square"}),compactLabel:!0,wrapContent:(0,e.createComponentVNode)(2,o.Flex,{align:"center",spacing:1,children:(0,e.createComponentVNode)(2,o.Flex.Item,{grow:1,shrink:1,basis:0,color:"silver",wordWrap:"break-word",children:O})}),noWrapContent:(0,e.createComponentVNode)(2,o.Flex,{children:(0,e.createComponentVNode)(2,o.Flex.Item,{grow:0,shrink:0,children:(0,e.createComponentVNode)(2,o.Button,{icon:"minus",color:"red",onClick:function(){function R(){return A("remove_tag",{tag_index:P})}return R}()})})})},P)})})},h=function(B,L){var w=(0,t.useBackend)(L),A=w.act,T=w.data,E=T.bolts,O=T.pressureCheck,P=T.temperatureCheck,R=T.oxygenCheck,F=T.toxinsCheck,j=T.nitrogenCheck,W=T.carbonDioxideCheck,z=[{bitflag:1,checked:O,label:"Monitor pressure"},{bitflag:2,checked:P,label:"Monitor temperature"},{bitflag:4,checked:R,label:"Monitor oxygen concentration"},{bitflag:8,checked:F,label:"Monitor plasma concentration"},{bitflag:16,checked:j,label:"Monitor nitrogen concentration"},{bitflag:32,checked:W,label:"Monitor carbon dioxide concentration"}];return(0,e.createFragment)([(0,e.createComponentVNode)(2,s,{label:"Floor bolts",noWrapContent:(0,e.createComponentVNode)(2,o.Button,{icon:E?"check":"times",selected:E,content:E?"YES":"NO",onClick:function(){function H(){return A("toggle_bolts")}return H}()})}),z.map(function(H){return(0,e.createComponentVNode)(2,s,{label:H.label,noWrapContent:(0,e.createComponentVNode)(2,o.Button.Checkbox,{checked:H.checked,onClick:function(){function $(){return A("toggle_flag",{bitflag:H.bitflag})}return $}()})},H.bitflag)})],0)},C=function(B,L){var w=(0,t.useBackend)(L),A=w.act,T=w.data,E=T.sensors;return(0,e.createComponentVNode)(2,o.Section,{mt:1.7,ml:.5,mr:1,px:.5,title:"Sensors",buttons:(0,e.createComponentVNode)(2,o.Button,{mr:1,pl:2.1,content:"Add sensor",icon:"plus",iconRight:!0,onClick:function(){function O(){return A("add_sensor")}return O}()}),children:[(0,e.createComponentVNode)(2,s,{mr:0,compactLabel:!0,wrapContent:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Flex.Item,{width:1}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:1,shrink:1,basis:0,color:"label",nowrap:!0,bold:!0,children:"ID tag"}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:1,shrink:1,basis:0,color:"label",nowrap:!0,bold:!0,children:"Label"}),(0,e.createComponentVNode)(2,o.Flex.Item,{width:11.3})]})}),Object.keys(E).map(function(O){return(0,e.createComponentVNode)(2,s,{mr:0,label:(0,e.createComponentVNode)(2,o.Icon,{name:"wave-square"}),compactLabel:!0,wrapContent:(0,e.createComponentVNode)(2,o.Flex,{align:"center",spacing:1,children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:1,shrink:1,basis:0,color:"silver",wordWrap:"break-word",children:O}),E[O]?(0,e.createComponentVNode)(2,o.Flex.Item,{grow:1,shrink:1,basis:0,color:"silver",wordWrap:"break-word",children:E[O]}):(0,e.createComponentVNode)(2,o.Flex.Item,{grow:1,shrink:1,basis:0,fontSize:"0.9rem",color:"yellow",italic:!0,nowrap:!0,children:""})]}),noWrapContent:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:0,shrink:0,children:[(0,e.createComponentVNode)(2,o.Button,{content:"Label",icon:"edit",onClick:function(){function P(){return A("change_label",{sensor_tag:O})}return P}()}),(0,e.createComponentVNode)(2,o.Button,{content:"Label",icon:"times-circle",color:"orange",disabled:!E[O],onClick:function(){function P(){return A("clear_label",{sensor_tag:O})}return P}()})]}),(0,e.createComponentVNode)(2,o.Flex.Item,{width:.5}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:0,shrink:0,children:(0,e.createComponentVNode)(2,o.Button,{px:1.2,icon:"minus",color:"red",onClick:function(){function P(){return A("del_sensor",{sensor_tag:O})}return P}()})})]})},O)})]})},N=function(B,L){var w=(0,t.useBackend)(L),A=w.act,T=w.data,E=T.inputTag,O=T.outputTag,P=T.bufferTag,R=T.bufferFitsInput,F=T.bufferFitsOutput,j=T.doNotLinkAndNotify;return(0,e.createFragment)([(0,e.createComponentVNode)(2,s,{label:"Input",labelWidth:6,wrapContent:(0,e.createComponentVNode)(2,f,{text:E,defaultText:"",color:"silver"}),noWrapContent:(0,e.createFragment)([(0,e.createComponentVNode)(2,u,{noConfirm:j||!E,confirmContent:"This will change the intput device. Confirm?",confirmColor:"orange",content:"Link buffer",icon:"link",selected:E&&P===E,disabled:!R,onClick:function(){function W(){return A("link_input")}return W}()}),(0,e.createComponentVNode)(2,o.Button.Confirm,{confirmContent:"This will unlink the intput device. Confirm?",confirmColor:"orange",content:"Unlink",icon:"unlink",color:"red",disabled:!E,onClick:function(){function W(){return A("unlink_input")}return W}()})],4)}),(0,e.createComponentVNode)(2,s,{label:"Output",labelWidth:6,wrapContent:(0,e.createComponentVNode)(2,f,{text:O,defaultText:"",color:"silver"}),noWrapContent:(0,e.createFragment)([(0,e.createComponentVNode)(2,u,{noConfirm:j||!O,confirmContent:"This will change the output device. Confirm?",confirmColor:"orange",content:"Link buffer",icon:"link",selected:O&&P===O,disabled:!F,onClick:function(){function W(){return A("link_output")}return W}()}),(0,e.createComponentVNode)(2,o.Button.Confirm,{confirmContent:"This will unlink the output device. Confirm?",confirmColor:"orange",content:"Unlink",icon:"unlink",color:"red",disabled:!O,onClick:function(){function W(){return A("unlink_output")}return W}()})],4)})],4)}},64713:function(I,r,n){"use strict";r.__esModule=!0,r.Newscaster=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),d=n(76910),y=n(98595),V=n(3939),k=n(22091),S=["icon","iconSpin","selected","security","onClick","title","children"],p=["name"];function i(B,L){if(B==null)return{};var w={};for(var A in B)if({}.hasOwnProperty.call(B,A)){if(L.includes(A))continue;w[A]=B[A]}return w}var l=128,f=["security","engineering","medical","science","service","supply"],u={security:{title:"Security",fluff_text:"Help keep the crew safe"},engineering:{title:"Engineering",fluff_text:"Ensure the station runs smoothly"},medical:{title:"Medical",fluff_text:"Practice medicine and save lives"},science:{title:"Science",fluff_text:"Develop new technologies"},service:{title:"Service",fluff_text:"Provide amenities to the crew"},supply:{title:"Supply",fluff_text:"Keep the station supplied"}},s=r.Newscaster=function(){function B(L,w){var A=(0,t.useBackend)(w),T=A.act,E=A.data,O=E.is_security,P=E.is_admin,R=E.is_silent,F=E.is_printing,j=E.screen,W=E.channels,z=E.channel_idx,H=z===void 0?-1:z,$=(0,t.useLocalState)(w,"menuOpen",!1),G=$[0],ne=$[1],Q=(0,t.useLocalState)(w,"viewingPhoto",""),he=Q[0],Ve=Q[1],Ne=(0,t.useLocalState)(w,"censorMode",!1),Be=Ne[0],Le=Ne[1],Ae;j===0||j===2?Ae=(0,e.createComponentVNode)(2,c):j===1&&(Ae=(0,e.createComponentVNode)(2,v));var fe=W.reduce(function(Z,J){return Z+J.unread},0);return(0,e.createComponentVNode)(2,y.Window,{theme:O&&"security",width:800,height:600,children:[he?(0,e.createComponentVNode)(2,h):(0,e.createComponentVNode)(2,V.ComplexModal,{maxWidth:window.innerWidth/1.5+"px",maxHeight:window.innerHeight/1.5+"px"}),(0,e.createComponentVNode)(2,y.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Section,{fill:!0,className:(0,a.classes)(["Newscaster__menu",G&&"Newscaster__menu--open"]),children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,m,{icon:"bars",title:"Toggle Menu",onClick:function(){function Z(){return ne(!G)}return Z}()}),(0,e.createComponentVNode)(2,m,{icon:"newspaper",title:"Headlines",selected:j===0,onClick:function(){function Z(){return T("headlines")}return Z}(),children:fe>0&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--unread",children:fe>=10?"9+":fe})}),(0,e.createComponentVNode)(2,m,{icon:"briefcase",title:"Job Openings",selected:j===1,onClick:function(){function Z(){return T("jobs")}return Z}()}),(0,e.createComponentVNode)(2,o.Divider)]}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:W.map(function(Z){return(0,e.createComponentVNode)(2,m,{icon:Z.icon,title:Z.name,selected:j===2&&W[H-1]===Z,onClick:function(){function J(){return T("channel",{uid:Z.uid})}return J}(),children:Z.unread>0&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--unread",children:Z.unread>=10?"9+":Z.unread})},Z)})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Divider),(!!O||!!P)&&(0,e.createFragment)([(0,e.createComponentVNode)(2,m,{security:!0,icon:"exclamation-circle",title:"Edit Wanted Notice",mb:"0.5rem",onClick:function(){function Z(){return(0,V.modalOpen)(w,"wanted_notice")}return Z}()}),(0,e.createComponentVNode)(2,m,{security:!0,icon:Be?"minus-square":"minus-square-o",title:"Censor Mode: "+(Be?"On":"Off"),mb:"0.5rem",onClick:function(){function Z(){return Le(!Be)}return Z}()}),(0,e.createComponentVNode)(2,o.Divider)],4),(0,e.createComponentVNode)(2,m,{icon:"pen-alt",title:"New Story",mb:"0.5rem",onClick:function(){function Z(){return(0,V.modalOpen)(w,"create_story")}return Z}()}),(0,e.createComponentVNode)(2,m,{icon:"plus-circle",title:"New Channel",onClick:function(){function Z(){return(0,V.modalOpen)(w,"create_channel")}return Z}()}),(0,e.createComponentVNode)(2,o.Divider),(0,e.createComponentVNode)(2,m,{icon:F?"spinner":"print",iconSpin:F,title:F?"Printing...":"Print Newspaper",onClick:function(){function Z(){return T("print_newspaper")}return Z}()}),(0,e.createComponentVNode)(2,m,{icon:R?"volume-mute":"volume-up",title:"Mute: "+(R?"On":"Off"),onClick:function(){function Z(){return T("toggle_mute")}return Z}()})]})]})}),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,width:"100%",children:[(0,e.createComponentVNode)(2,k.TemporaryNotice),Ae]})]})})]})}return B}(),m=function(L,w){var A=(0,t.useBackend)(w),T=A.act,E=L.icon,O=E===void 0?"":E,P=L.iconSpin,R=L.selected,F=R===void 0?!1:R,j=L.security,W=j===void 0?!1:j,z=L.onClick,H=L.title,$=L.children,G=i(L,S);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({className:(0,a.classes)(["Newscaster__menuButton",F&&"Newscaster__menuButton--selected",W&&"Newscaster__menuButton--security"]),onClick:z},G,{children:[F&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--selectedBar"}),(0,e.createComponentVNode)(2,o.Icon,{name:O,spin:P,size:"2"}),(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--title",children:H}),$]})))},c=function(L,w){var A=(0,t.useBackend)(w),T=A.act,E=A.data,O=E.screen,P=E.is_admin,R=E.channel_idx,F=E.channel_can_manage,j=E.channels,W=E.stories,z=E.wanted,H=(0,t.useLocalState)(w,"fullStories",[]),$=H[0],G=H[1],ne=(0,t.useLocalState)(w,"censorMode",!1),Q=ne[0],he=ne[1],Ve=O===2&&R>-1?j[R-1]:null;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[!!z&&(0,e.createComponentVNode)(2,b,{story:z,wanted:!0}),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:Ve?Ve.icon:"newspaper",mr:"0.5rem"}),Ve?Ve.name:"Headlines"],0),children:W.length>0?W.slice().reverse().map(function(Ne){return!$.includes(Ne.uid)&&Ne.body.length+3>l?Object.assign({},Ne,{body_short:Ne.body.substr(0,l-4)+"..."}):Ne}).map(function(Ne,Be){return(0,e.createComponentVNode)(2,b,{story:Ne},Be)}):(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__emptyNotice",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"times",size:"3"}),(0,e.createVNode)(1,"br"),"There are no stories at this time."]})}),!!Ve&&(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,height:"40%",title:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:"info-circle",mr:"0.5rem"}),(0,e.createTextVNode)("About")],4),buttons:(0,e.createFragment)([Q&&(0,e.createComponentVNode)(2,o.Button,{disabled:!!Ve.admin&&!P,selected:Ve.censored,icon:Ve.censored?"comment-slash":"comment",content:Ve.censored?"Uncensor Channel":"Censor Channel",mr:"0.5rem",onClick:function(){function Ne(){return T("censor_channel",{uid:Ve.uid})}return Ne}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!F,icon:"cog",content:"Manage",onClick:function(){function Ne(){return(0,V.modalOpen)(w,"manage_channel",{uid:Ve.uid})}return Ne}()})],0),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description",children:Ve.description||"N/A"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Owner",children:Ve.author||"N/A"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Public",children:Ve.public?"Yes":"No"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Total Views",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"eye",mr:"0.5rem"}),W.reduce(function(Ne,Be){return Ne+Be.view_count},0).toLocaleString()]})]})})]})},v=function(L,w){var A=(0,t.useBackend)(w),T=A.act,E=A.data,O=E.jobs,P=E.wanted,R=Object.entries(O).reduce(function(F,j){var W=j[0],z=j[1];return F+z.length},0);return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[!!P&&(0,e.createComponentVNode)(2,b,{story:P,wanted:!0}),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:"briefcase",mr:"0.5rem"}),(0,e.createTextVNode)("Job Openings")],4),buttons:(0,e.createComponentVNode)(2,o.Box,{mt:"0.25rem",color:"label",children:"Work for a better future at Nanotrasen"}),children:R>0?f.map(function(F){return Object.assign({},u[F],{id:F,jobs:O[F]})}).filter(function(F){return!!F&&F.jobs.length>0}).map(function(F){return(0,e.createComponentVNode)(2,o.Section,{className:(0,a.classes)(["Newscaster__jobCategory","Newscaster__jobCategory--"+F.id]),title:F.title,buttons:(0,e.createComponentVNode)(2,o.Box,{mt:"0.25rem",color:"label",children:F.fluff_text}),children:F.jobs.map(function(j){return(0,e.createComponentVNode)(2,o.Box,{class:(0,a.classes)(["Newscaster__jobOpening",!!j.is_command&&"Newscaster__jobOpening--command"]),children:["\u2022 ",j.title]},j.title)})},F.id)}):(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__emptyNotice",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"times",size:"3"}),(0,e.createVNode)(1,"br"),"There are no openings at this time."]})}),(0,e.createComponentVNode)(2,o.Section,{height:"17%",children:["Interested in serving Nanotrasen?",(0,e.createVNode)(1,"br"),"Sign up for any of the above position now at the"," ",(0,e.createVNode)(1,"b",null,"Head of Personnel's Office!",16),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Box,{as:"small",color:"label",children:"By signing up for a job at Nanotrasen, you agree to transfer your soul to the loyalty department of the omnipresent and helpful watcher of humanity."})]})]})},b=function(L,w){var A=(0,t.useBackend)(w),T=A.act,E=A.data,O=L.story,P=L.wanted,R=P===void 0?!1:P,F=(0,t.useLocalState)(w,"fullStories",[]),j=F[0],W=F[1],z=(0,t.useLocalState)(w,"censorMode",!1),H=z[0],$=z[1];return(0,e.createComponentVNode)(2,o.Section,{className:(0,a.classes)(["Newscaster__story",R&&"Newscaster__story--wanted"]),title:(0,e.createFragment)([R&&(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-circle",mr:"0.5rem"}),O.censor_flags&2&&"[REDACTED]"||O.title||"News from "+O.author],0),buttons:(0,e.createComponentVNode)(2,o.Box,{mt:"0.25rem",children:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:[!R&&H&&(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:(0,e.createComponentVNode)(2,o.Button,{enabled:O.censor_flags&2,icon:O.censor_flags&2?"comment-slash":"comment",content:O.censor_flags&2?"Uncensor":"Censor",mr:"0.5rem",mt:"-0.25rem",onClick:function(){function G(){return T("censor_story",{uid:O.uid})}return G}()})}),(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",O.author," |\xA0",!R&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:"eye"}),(0,e.createTextVNode)(" "),O.view_count.toLocaleString(),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("|\xA0")],0),(0,e.createComponentVNode)(2,o.Icon,{name:"clock"})," ",(0,d.timeAgo)(O.publish_time,E.world_time)]})]})}),children:(0,e.createComponentVNode)(2,o.Box,{children:O.censor_flags&2?"[REDACTED]":(0,e.createFragment)([!!O.has_photo&&(0,e.createComponentVNode)(2,g,{name:"story_photo_"+O.uid+".png",float:"right",ml:"0.5rem"}),(O.body_short||O.body).split("\n").map(function(G,ne){return(0,e.createComponentVNode)(2,o.Box,{children:G||(0,e.createVNode)(1,"br")},ne)}),O.body_short&&(0,e.createComponentVNode)(2,o.Button,{content:"Read more..",mt:"0.5rem",onClick:function(){function G(){return W([].concat(j,[O.uid]))}return G}()}),(0,e.createComponentVNode)(2,o.Box,{clear:"right"})],0)})})},g=function(L,w){var A=L.name,T=i(L,p),E=(0,t.useLocalState)(w,"viewingPhoto",""),O=E[0],P=E[1];return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({as:"img",className:"Newscaster__photo",src:A,onClick:function(){function R(){return P(A)}return R}()},T)))},h=function(L,w){var A=(0,t.useLocalState)(w,"viewingPhoto",""),T=A[0],E=A[1];return(0,e.createComponentVNode)(2,o.Modal,{className:"Newscaster__photoZoom",children:[(0,e.createComponentVNode)(2,o.Box,{as:"img",src:T}),(0,e.createComponentVNode)(2,o.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){function O(){return E("")}return O}()})]})},C=function(L,w){var A=(0,t.useBackend)(w),T=A.act,E=A.data,O=!!L.args.uid&&E.channels.filter(function(ee){return ee.uid===L.args.uid}).pop();if(L.id==="manage_channel"&&!O){(0,V.modalClose)(w);return}var P=L.id==="manage_channel",R=!!L.args.is_admin,F=L.args.scanned_user,j=(0,t.useLocalState)(w,"author",(O==null?void 0:O.author)||F||"Unknown"),W=j[0],z=j[1],H=(0,t.useLocalState)(w,"name",(O==null?void 0:O.name)||""),$=H[0],G=H[1],ne=(0,t.useLocalState)(w,"description",(O==null?void 0:O.description)||""),Q=ne[0],he=ne[1],Ve=(0,t.useLocalState)(w,"icon",(O==null?void 0:O.icon)||"newspaper"),Ne=Ve[0],Be=Ve[1],Le=(0,t.useLocalState)(w,"isPublic",P?!!(O!=null&&O.public):!1),Ae=Le[0],fe=Le[1],Z=(0,t.useLocalState)(w,"adminLocked",(O==null?void 0:O.admin)===1||!1),J=Z[0],te=Z[1];return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:P?"Manage "+O.name:"Create New Channel",children:[(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Owner",children:(0,e.createComponentVNode)(2,o.Input,{disabled:!R,width:"100%",value:W,onInput:function(){function ee(le,ye){return z(ye)}return ee}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:(0,e.createComponentVNode)(2,o.Input,{width:"100%",placeholder:"50 characters max.",maxLength:"50",value:$,onInput:function(){function ee(le,ye){return G(ye)}return ee}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description (optional)",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Input,{multiline:!0,width:"100%",placeholder:"128 characters max.",maxLength:"128",value:Q,onInput:function(){function ee(le,ye){return he(ye)}return ee}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Icon",children:[(0,e.createComponentVNode)(2,o.Input,{disabled:!R,value:Ne,width:"35%",mr:"0.5rem",onInput:function(){function ee(le,ye){return Be(ye)}return ee}()}),(0,e.createComponentVNode)(2,o.Icon,{name:Ne,size:"2",verticalAlign:"middle",mr:"0.5rem"})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Accept Public Stories?",children:(0,e.createComponentVNode)(2,o.Button,{selected:Ae,icon:Ae?"toggle-on":"toggle-off",content:Ae?"Yes":"No",onClick:function(){function ee(){return fe(!Ae)}return ee}()})}),R&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:J,icon:J?"lock":"lock-open",content:J?"On":"Off",tooltip:"Locking this channel will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function ee(){return te(!J)}return ee}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:W.trim().length===0||$.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function ee(){(0,V.modalAnswer)(w,L.id,"",{author:W,name:$.substr(0,49),description:Q.substr(0,128),icon:Ne,public:Ae?1:0,admin_locked:J?1:0})}return ee}()})]})},N=function(L,w){var A=(0,t.useBackend)(w),T=A.act,E=A.data,O=E.photo,P=E.channels,R=E.channel_idx,F=R===void 0?-1:R,j=!!L.args.is_admin,W=L.args.scanned_user,z=P.slice().sort(function(ee,le){if(F<0)return 0;var ye=P[F-1];if(ye.uid===ee.uid)return-1;if(ye.uid===le.uid)return 1}).filter(function(ee){return j||!ee.frozen&&(ee.author===W||!!ee.public)}),H=(0,t.useLocalState)(w,"author",W||"Unknown"),$=H[0],G=H[1],ne=(0,t.useLocalState)(w,"channel",z.length>0?z[0].name:""),Q=ne[0],he=ne[1],Ve=(0,t.useLocalState)(w,"title",""),Ne=Ve[0],Be=Ve[1],Le=(0,t.useLocalState)(w,"body",""),Ae=Le[0],fe=Le[1],Z=(0,t.useLocalState)(w,"adminLocked",!1),J=Z[0],te=Z[1];return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:"Create New Story",children:[(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Author",children:(0,e.createComponentVNode)(2,o.Input,{disabled:!j,width:"100%",value:$,onInput:function(){function ee(le,ye){return G(ye)}return ee}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Channel",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Dropdown,{selected:Q,options:z.map(function(ee){return ee.name}),mb:"0",width:"100%",onSelected:function(){function ee(le){return he(le)}return ee}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Divider),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Title",children:(0,e.createComponentVNode)(2,o.Input,{width:"100%",placeholder:"128 characters max.",maxLength:"128",value:Ne,onInput:function(){function ee(le,ye){return Be(ye)}return ee}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Story Text",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Input,{fluid:!0,multiline:!0,placeholder:"1024 characters max.",maxLength:"1024",rows:"8",width:"100%",value:Ae,onInput:function(){function ee(le,ye){return fe(ye)}return ee}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{icon:"image",selected:O,content:O?"Eject: "+O.name:"Insert Photo",tooltip:!O&&"Attach a photo to this story by holding the photograph in your hand.",onClick:function(){function ee(){return T(O?"eject_photo":"attach_photo")}return ee}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Preview",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Section,{noTopPadding:!0,title:Ne,maxHeight:"13.5rem",overflow:"auto",children:(0,e.createComponentVNode)(2,o.Box,{mt:"0.5rem",children:[!!O&&(0,e.createComponentVNode)(2,g,{name:"inserted_photo_"+O.uid+".png",float:"right"}),Ae.split("\n").map(function(ee,le){return(0,e.createComponentVNode)(2,o.Box,{children:ee||(0,e.createVNode)(1,"br")},le)}),(0,e.createComponentVNode)(2,o.Box,{clear:"right"})]})})}),j&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:J,icon:J?"lock":"lock-open",content:J?"On":"Off",tooltip:"Locking this story will make it censorable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function ee(){return te(!J)}return ee}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:$.trim().length===0||Q.trim().length===0||Ne.trim().length===0||Ae.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function ee(){(0,V.modalAnswer)(w,"create_story","",{author:$,channel:Q,title:Ne.substr(0,127),body:Ae.substr(0,1023),admin_locked:J?1:0})}return ee}()})]})},x=function(L,w){var A=(0,t.useBackend)(w),T=A.act,E=A.data,O=E.photo,P=E.wanted,R=!!L.args.is_admin,F=L.args.scanned_user,j=(0,t.useLocalState)(w,"author",(P==null?void 0:P.author)||F||"Unknown"),W=j[0],z=j[1],H=(0,t.useLocalState)(w,"name",(P==null?void 0:P.title.substr(8))||""),$=H[0],G=H[1],ne=(0,t.useLocalState)(w,"description",(P==null?void 0:P.body)||""),Q=ne[0],he=ne[1],Ve=(0,t.useLocalState)(w,"adminLocked",(P==null?void 0:P.admin_locked)===1||!1),Ne=Ve[0],Be=Ve[1];return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:"Manage Wanted Notice",children:[(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Authority",children:(0,e.createComponentVNode)(2,o.Input,{disabled:!R,width:"100%",value:W,onInput:function(){function Le(Ae,fe){return z(fe)}return Le}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:(0,e.createComponentVNode)(2,o.Input,{width:"100%",value:$,maxLength:"128",onInput:function(){function Le(Ae,fe){return G(fe)}return Le}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Input,{multiline:!0,width:"100%",value:Q,maxLength:"512",rows:"4",onInput:function(){function Le(Ae,fe){return he(fe)}return Le}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:[(0,e.createComponentVNode)(2,o.Button,{icon:"image",selected:O,content:O?"Eject: "+O.name:"Insert Photo",tooltip:!O&&"Attach a photo to this wanted notice by holding the photograph in your hand.",tooltipPosition:"top",onClick:function(){function Le(){return T(O?"eject_photo":"attach_photo")}return Le}()}),!!O&&(0,e.createComponentVNode)(2,g,{name:"inserted_photo_"+O.uid+".png",float:"right"})]}),R&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:Ne,icon:Ne?"lock":"lock-open",content:Ne?"On":"Off",tooltip:"Locking this wanted notice will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function Le(){return Be(!Ne)}return Le}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:!P,icon:"eraser",color:"danger",content:"Clear",position:"absolute",right:"7.25rem",bottom:"-0.75rem",onClick:function(){function Le(){T("clear_wanted_notice"),(0,V.modalClose)(w)}return Le}()}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:W.trim().length===0||$.trim().length===0||Q.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function Le(){(0,V.modalAnswer)(w,L.id,"",{author:W,name:$.substr(0,127),description:Q.substr(0,511),admin_locked:Ne?1:0})}return Le}()})]})};(0,V.modalRegisterBodyOverride)("create_channel",C),(0,V.modalRegisterBodyOverride)("manage_channel",C),(0,V.modalRegisterBodyOverride)("create_story",N),(0,V.modalRegisterBodyOverride)("wanted_notice",x)},97351:function(I,r,n){"use strict";r.__esModule=!0,r.NinjaBloodScan=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(39473),d=n(98595),y=r.NinjaBloodScan=function(){function S(p,i){var l=(0,a.useBackend)(i),f=l.act,u=l.data;return(0,e.createComponentVNode)(2,d.Window,{width:500,height:400,theme:"spider_clan",children:(0,e.createComponentVNode)(2,d.Window.Content,{className:"Layout__content--flexColumn",children:[(0,e.createComponentVNode)(2,V),(0,e.createComponentVNode)(2,k)]})})}return S}(),V=function(p,i){var l=(0,a.useBackend)(i),f=l.act,u=l.data,s=u.vialIcons,m=u.noVialIcon,c=u.bloodOwnerNames,v=u.bloodOwnerSpecies,b=u.bloodOwnerTypes,g=u.blockButtons,h=u.scanStates,C={blue:"Button_blue",green:"Button_green",red:"Button_red",disabled:"Button_disabled"},N=["NoticeBox_red","NoticeBox","NoticeBox_blue"],x=[1,2,3];return(0,e.createComponentVNode)(2,t.Flex,{direction:"column",shrink:1,alignContent:"center",children:(0,e.createComponentVNode)(2,t.Section,{title:"\u041E\u0431\u0440\u0430\u0437\u0446\u044B",backgroundColor:"rgba(0, 0, 0, 0.4)",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"?",tooltip:"\u0414\u043E\u0431\u0430\u0432\u044C\u0442\u0435 \u0442\u0440\u0438 \u043E\u0431\u0440\u0430\u0437\u0446\u0430 \u043A\u0440\u043E\u0432\u0438. \u041C\u0430\u0448\u0438\u043D\u0430 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043D\u0430 \u043D\u0430 \u0440\u0430\u0431\u043E\u0442\u0443 \u0441 \u043A\u0440\u043E\u0432\u044C\u044E \u0441\u0443\u0449\u0435\u0441\u0442\u0432 \u0438 \u0443\u0441\u043B\u043E\u0432\u0438\u044F\u043C\u0438 \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u043F\u043E\u0441\u0442\u0430\u0432\u0438\u043B \u0432\u0430\u043C \u043A\u043B\u0430\u043D. \u0420\u0435\u0430\u0433\u0435\u043D\u0442\u044B \u0438\u043C \u043D\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0435 \u043D\u0435 \u043F\u0440\u0438\u043C\u0443\u0442\u0441\u044F \u0438\u043B\u0438 \u0441\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 \u043D\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u043F\u0435\u0448\u043D\u044B\u043C",tooltipPosition:"bottom-start"}),children:[(0,e.createComponentVNode)(2,t.Flex,{direction:"row",shrink:1,alignContent:"center",children:x.map(function(B,L){return(0,e.createComponentVNode)(2,o.FlexItem,{direction:"column",width:"33.3%",ml:L?2:0,children:[(0,e.createComponentVNode)(2,t.Section,{title:c[L]?"\u041A\u0440\u043E\u0432\u044C":"\u041D\u0435\u0442 \u0440\u0435\u0430\u0433\u0435\u043D\u0442\u0430",style:{"text-align":"left",background:"rgba(53, 94, 163, 0.5)"}}),(0,e.createComponentVNode)(2,t.NoticeBox,{className:N[h[L]],success:0,danger:0,align:"center",children:(0,e.createComponentVNode)(2,t.Button,{className:g?C.disabled:C.blue,height:"100%",width:"100%",disabled:g,onClick:function(){function w(){return f("vial_out",{button_num:L+1})}return w}(),children:[(0,e.createVNode)(1,"img",null,null,1,{height:"128px",width:"128px",src:"data:image/jpeg;base64,"+(s[L]||m),style:{"margin-left":"3px","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}}),(0,e.createComponentVNode)(2,t.Tooltip,{title:c[L]||" - ",content:"\u0420\u0430\u0441\u0430: "+(v[L]||" - ")+"\n"+("\u0422\u0438\u043F \u043A\u0440\u043E\u0432\u0438: "+(b[L]||" - ")),position:"bottom"})]})})]},L)})}),(0,e.createComponentVNode)(2,t.NoticeBox,{className:"NoticeBox_red",success:0,danger:0,align:"center",children:(0,e.createComponentVNode)(2,t.Button,{className:g===0?"":"Button_disabled",content:"\u041D\u0430\u0447\u0430\u0442\u044C \u0441\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435",width:"250px",textAlign:"center",disabled:g,tooltip:"\u0421\u043A\u0430\u043D\u0438\u0440\u0443\u0435\u0442 \u043A\u0440\u043E\u0432\u044C \u0438 \u043F\u0435\u0440\u0435\u0441\u044B\u043B\u0430\u0435\u0442 \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043D\u0443\u044E \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044E \u043A\u043B\u0430\u043D\u0443.",tooltipPosition:"bottom",onClick:function(){function B(){return f("scan_blood")}return B}()})})]})})},k=function(p,i){var l=(0,a.useBackend)(i),f=l.data,u=f.progressBar;return(0,e.createComponentVNode)(2,t.Section,{stretchContents:!0,children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:"green",value:u,minValue:0,maxValue:100,children:(0,e.createVNode)(1,"center",null,(0,e.createComponentVNode)(2,t.NoticeBox,{className:"NoticeBox_green",mt:1,children:u?"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 "+(u+"%"):"\u0420\u0435\u0436\u0438\u043C \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u044F"}),2)})})}},32989:function(I,r,n){"use strict";r.__esModule=!0,r.NinjaMindScan=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.NinjaMindScan=function(){function V(k,S){var p=(0,a.useBackend)(S),i=p.act,l=p.data;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:400,theme:"spider_clan",children:(0,e.createComponentVNode)(2,o.Window.Content,{className:"Layout__content--flexColumn",children:(0,e.createComponentVNode)(2,y)})})}return V}(),y=function(k,S){var p=(0,a.useBackend)(S),i=p.act,l=p.data,f=l.occupantIcon,u=l.occupant_name,s=l.occupant_health,m=l.scanned_occupants,c=u==="none"?1:0;return(0,e.createComponentVNode)(2,t.Flex,{direction:"column",shrink:1,alignContent:"left",children:[(0,e.createComponentVNode)(2,t.Section,{title:"\u041F\u0430\u0446\u0438\u0435\u043D\u0442",backgroundColor:"rgba(0, 0, 0, 0.4)",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"?",tooltip:"\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0432\u043D\u0435\u0448\u043D\u0435\u0433\u043E \u0432\u0438\u0434\u0430 \u0438 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u044F \u043F\u0430\u0446\u0438\u0435\u043D\u0442\u0430 \u0432 \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0435.",tooltipPosition:"left"}),children:(0,e.createComponentVNode)(2,t.Flex,{direction:"row",shrink:1,alignContent:"left",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{shrink:1,alignContent:"left",children:(0,e.createComponentVNode)(2,t.NoticeBox,{className:"NoticeBox_blue",success:0,danger:0,width:"90px",align:"left",children:(0,e.createComponentVNode)(2,t.Section,{style:{background:"rgba(4, 74, 27, 0.75)"},align:"left",children:(0,e.createVNode)(1,"img",null,null,1,{height:"128px",width:"128px",src:"data:image/jpeg;base64,"+f,style:{"margin-left":"-28px","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}})})})}),(0,e.createComponentVNode)(2,t.Flex.Item,{grow:1,alignContent:"right",children:[(0,e.createComponentVNode)(2,t.NoticeBox,{className:"NoticeBox_green",success:0,danger:0,align:"left",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0418\u043C\u044F",children:u}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0417\u0434\u043E\u0440\u043E\u0432\u044C\u0435",children:s})]})}),(0,e.createComponentVNode)(2,t.NoticeBox,{className:"NoticeBox_red",mt:2.5,success:0,danger:0,align:"center",children:[(0,e.createComponentVNode)(2,t.Button,{className:c===0?"":"Button_disabled",content:"\u041D\u0430\u0447\u0430\u0442\u044C \u0441\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435",width:"250px",textAlign:"center",disabled:c,tooltip:"\u0421\u043A\u0430\u043D\u0438\u0440\u0443\u0435\u0442 \u043F\u0430\u0446\u0438\u0435\u043D\u0442\u0430 \u0438 \u043F\u044B\u0442\u0430\u0435\u0442\u0441\u044F \u0434\u043E\u0431\u044B\u0442\u044C \u0438\u0437 \u0435\u0433\u043E \u0440\u0430\u0437\u0443\u043C\u0430 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u0443\u044E \u043A\u043B\u0430\u043D\u0443 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044E.",tooltipPosition:"bottom-start",onClick:function(){function v(){return i("scan_occupant")}return v}()}),(0,e.createComponentVNode)(2,t.Button,{className:c===0?"":"Button_disabled",content:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u043E",width:"250px",textAlign:"center",disabled:c,tooltip:"\u041E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u0442 \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u043E, \u0432\u044B\u043F\u0443\u0441\u043A\u0430\u044F \u043F\u0430\u0446\u0438\u0435\u043D\u0442\u0430 \u0438\u0437 \u043A\u0430\u043F\u0441\u0443\u043B\u044B",tooltipPosition:"bottom-start",onClick:function(){function v(){return i("go_out")}return v}()}),(0,e.createComponentVNode)(2,t.Button,{className:c===0?"":"Button_disabled",content:"\u0422\u0435\u043B\u0435\u043F\u043E\u0440\u0442\u0430\u0446\u0438\u044F \u043F\u0430\u0446\u0438\u0435\u043D\u0442\u0430",width:"250px",textAlign:"center",disabled:c,tooltip:"\u0422\u0435\u043B\u0435\u043F\u043E\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u043F\u0430\u0446\u0438\u0435\u043D\u0442\u0430 \u043E\u0431\u0440\u0430\u0442\u043D\u043E \u043D\u0430 \u043E\u0431\u044C\u0435\u043A\u0442 \u0441 \u043A\u043E\u0442\u043E\u0440\u043E\u0433\u043E \u043E\u043D \u0431\u044B\u043B \u043F\u043E\u0445\u0438\u0449\u0435\u043D. \u0420\u0435\u043A\u043E\u043C\u0435\u043D\u0434\u0443\u0435\u043C \u043A\u0430\u043A \u0441\u043B\u0435\u0434\u0443\u0435\u0442 \u0435\u0433\u043E \u0437\u0430\u043F\u0443\u0433\u0430\u0442\u044C \u043F\u0435\u0440\u0435\u0434 \u044D\u0442\u0438\u043C, \u0447\u0442\u043E\u0431\u044B \u043E\u043D \u043D\u0435 \u0440\u0430\u0437\u0431\u043E\u043B\u0442\u0430\u043B \u043E \u0432\u0430\u0441.",tooltipPosition:"bottom-start",onClick:function(){function v(){return i("teleport_out")}return v}()})]})]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"\u0421\u043F\u0438\u0441\u043E\u043A \u0443\u0436\u0435 \u043F\u0440\u043E\u0441\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0432\u0430\u043C\u0438 \u043B\u044E\u0434\u0435\u0439",align:"center",backgroundColor:"rgba(0, 0, 0, 0.4)",children:(0,e.createComponentVNode)(2,t.Box,{maxHeight:15,overflowY:"auto",overflowX:"hidden",children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:m.map(function(v){return(0,e.createComponentVNode)(2,t.Table.Row,{children:(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Box,{children:v.scanned_occupant})})},v.scanned_occupant)})})})})]})}},41166:function(I,r,n){"use strict";r.__esModule=!0,r.NuclearBomb=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.NuclearBomb=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data;return i.extended?(0,e.createComponentVNode)(2,o.Window,{width:450,height:300,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Authorization",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auth Disk",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.authdisk?"eject":"id-card",selected:i.authdisk,content:i.diskname?i.diskname:"-----",tooltip:i.authdisk?"Eject Disk":"Insert Disk",onClick:function(){function l(){return p("auth")}return l}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auth Code",children:(0,e.createComponentVNode)(2,t.Button,{icon:"key",disabled:!i.authdisk,selected:i.authcode,content:i.codemsg,onClick:function(){function l(){return p("code")}return l}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Arming & Disarming",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Bolted to floor",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.anchored?"check":"times",selected:i.anchored,disabled:!i.authfull,content:i.anchored?"YES":"NO",onClick:function(){function l(){return p("toggle_anchor")}return l}()})}),i.authfull&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Time Left",children:(0,e.createComponentVNode)(2,t.Button,{icon:"stopwatch",content:i.time,disabled:!i.authfull,tooltip:"Set Timer",onClick:function(){function l(){return p("set_time")}return l}()})})||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Time Left",color:i.timer?"red":"",children:i.time+"s"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safety",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.safety?"check":"times",selected:i.safety,disabled:!i.authfull,content:i.safety?"ON":"OFF",tooltip:i.safety?"Disable Safety":"Enable Safety",onClick:function(){function l(){return p("toggle_safety")}return l}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Arm/Disarm",children:(0,e.createComponentVNode)(2,t.Button,{icon:(i.timer,"bomb"),disabled:i.safety||!i.authfull,color:"red",content:i.timer?"DISARM THE NUKE":"ARM THE NUKE",onClick:function(){function l(){return p("toggle_armed")}return l}()})})]})})]})}):(0,e.createComponentVNode)(2,o.Window,{width:450,height:300,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Deployment",children:(0,e.createComponentVNode)(2,t.Button,{icon:"exclamation-triangle",content:"Deploy Nuclear Device (will bolt device to floor)",onClick:function(){function l(){return p("deploy")}return l}()})})})})}return y}()},52416:function(I,r,n){"use strict";r.__esModule=!0,r.NumberInputModal=void 0;var e=n(89005),a=n(51057),t=n(19203),o=n(92986),d=n(72253),y=n(36036),V=n(98595),k=r.NumberInputModal=function(){function p(i,l){var f=(0,d.useBackend)(l),u=f.act,s=f.data,m=s.init_value,c=s.large_buttons,v=s.message,b=v===void 0?"":v,g=s.timeout,h=s.title,C=(0,d.useLocalState)(l,"input",m),N=C[0],x=C[1],B=function(){function A(T){T!==N&&x(T)}return A}(),L=function(){function A(T){T!==N&&x(T)}return A}(),w=140+Math.max(Math.ceil(b.length/3),b.length>0&&c?5:0);return(0,e.createComponentVNode)(2,V.Window,{title:h,width:270,height:w,children:[g&&(0,e.createComponentVNode)(2,a.Loader,{value:g}),(0,e.createComponentVNode)(2,V.Window.Content,{onKeyDown:function(){function A(T){var E=window.event?T.which:T.keyCode;E===o.KEY_ENTER&&u("submit",{entry:N}),E===o.KEY_ESCAPE&&u("cancel")}return A}(),children:(0,e.createComponentVNode)(2,y.Section,{fill:!0,children:(0,e.createComponentVNode)(2,y.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,y.Box,{color:"label",children:b})}),(0,e.createComponentVNode)(2,y.Stack.Item,{children:(0,e.createComponentVNode)(2,S,{input:N,onClick:L,onChange:B})}),(0,e.createComponentVNode)(2,y.Stack.Item,{children:(0,e.createComponentVNode)(2,t.InputButtons,{input:N})})]})})})]})}return p}(),S=function(i,l){var f=(0,d.useBackend)(l),u=f.act,s=f.data,m=s.min_value,c=s.max_value,v=s.init_value,b=s.round_value,g=i.input,h=i.onClick,C=i.onChange,N=Math.round(g!==m?Math.max(g/2,m):c/2),x=g===m&&m>0||g===1;return(0,e.createComponentVNode)(2,y.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,y.Stack.Item,{children:(0,e.createComponentVNode)(2,y.Button,{disabled:g===m,icon:"angle-double-left",onClick:function(){function B(){return h(m)}return B}(),tooltip:g===m?"Min":"Min ("+m+")"})}),(0,e.createComponentVNode)(2,y.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,y.RestrictedInput,{autoFocus:!0,autoSelect:!0,fluid:!0,allowFloats:!b,minValue:m,maxValue:c,onChange:function(){function B(L,w){return C(w)}return B}(),onEnter:function(){function B(L,w){return u("submit",{entry:w})}return B}(),value:g})}),(0,e.createComponentVNode)(2,y.Stack.Item,{children:(0,e.createComponentVNode)(2,y.Button,{disabled:g===c,icon:"angle-double-right",onClick:function(){function B(){return h(c)}return B}(),tooltip:g===c?"Max":"Max ("+c+")"})}),(0,e.createComponentVNode)(2,y.Stack.Item,{children:(0,e.createComponentVNode)(2,y.Button,{disabled:x,icon:"divide",onClick:function(){function B(){return h(N)}return B}(),tooltip:x?"Split":"Split ("+N+")"})}),(0,e.createComponentVNode)(2,y.Stack.Item,{children:(0,e.createComponentVNode)(2,y.Button,{disabled:g===v,icon:"redo",onClick:function(){function B(){return h(v)}return B}(),tooltip:v?"Reset ("+v+")":"Reset"})})]})}},1218:function(I,r,n){"use strict";r.__esModule=!0,r.OperatingComputer=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(98595),d=n(36036),y=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],V=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],k={average:[.25,.5],bad:[.5,1/0]},S=["bad","average","average","good","average","average","bad"],p=r.OperatingComputer=function(){function u(s,m){var c=(0,t.useBackend)(m),v=c.act,b=c.data,g=b.hasOccupant,h=b.choice,C;return h?C=(0,e.createComponentVNode)(2,f):C=g?(0,e.createComponentVNode)(2,i):(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,o.Window,{width:650,height:455,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,d.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,d.Stack.Item,{children:(0,e.createComponentVNode)(2,d.Tabs,{children:[(0,e.createComponentVNode)(2,d.Tabs.Tab,{selected:!h,icon:"user",onClick:function(){function N(){return v("choiceOff")}return N}(),children:"Patient"}),(0,e.createComponentVNode)(2,d.Tabs.Tab,{selected:!!h,icon:"cog",onClick:function(){function N(){return v("choiceOn")}return N}(),children:"Options"})]})}),(0,e.createComponentVNode)(2,d.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,d.Section,{fill:!0,scrollable:!0,children:C})})]})})})}return u}(),i=function(s,m){var c=(0,t.useBackend)(m),v=c.data,b=v.occupant;return(0,e.createComponentVNode)(2,d.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,d.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,d.Section,{fill:!0,title:"Patient",children:(0,e.createComponentVNode)(2,d.LabeledList,{children:[(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Name",children:b.name}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Status",color:y[b.stat][0],children:y[b.stat][1]}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,d.ProgressBar,{min:"0",max:b.maxHealth,value:b.health/b.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),V.map(function(g,h){return(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:g[0]+" Damage",children:(0,e.createComponentVNode)(2,d.ProgressBar,{min:"0",max:"100",value:b[g[1]]/100,ranges:k,children:(0,a.round)(b[g[1]])},h)},h)}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,d.ProgressBar,{min:"0",max:b.maxTemp,value:b.bodyTemperature/b.maxTemp,color:S[b.temperatureSuitability+3],children:[(0,a.round)(b.btCelsius),"\xB0C, ",(0,a.round)(b.btFaren),"\xB0F"]})}),!!b.hasBlood&&(0,e.createFragment)([(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Blood Level",children:(0,e.createComponentVNode)(2,d.ProgressBar,{min:"0",max:b.bloodMax,value:b.bloodLevel/b.bloodMax,ranges:{bad:[-1/0,.6],average:[.6,.9],good:[.6,1/0]},children:[b.bloodPercent,"%, ",b.bloodLevel,"cl"]})}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Pulse",children:[b.pulse," BPM"]})],4)]})})}),(0,e.createComponentVNode)(2,d.Stack.Item,{children:(0,e.createComponentVNode)(2,d.Section,{title:"Current Procedures",level:"2",children:b.inSurgery?b.surgeries.map(function(g){var h=g.bodypartName,C=g.surgeryName,N=g.stepName;return(0,e.createComponentVNode)(2,d.Section,{title:h,level:"4",children:(0,e.createComponentVNode)(2,d.LabeledList,{children:[(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Procedure",children:C}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Next Step",children:N})]})},h)}):(0,e.createComponentVNode)(2,d.Box,{color:"label",children:"No procedure ongoing."})})})]})},l=function(){return(0,e.createComponentVNode)(2,d.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,d.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,d.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No patient detected."]})})},f=function(s,m){var c=(0,t.useBackend)(m),v=c.act,b=c.data,g=b.verbose,h=b.health,C=b.healthAlarm,N=b.oxy,x=b.oxyAlarm,B=b.crit;return(0,e.createComponentVNode)(2,d.LabeledList,{children:[(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Loudspeaker",children:(0,e.createComponentVNode)(2,d.Button,{selected:g,icon:g?"toggle-on":"toggle-off",content:g?"On":"Off",onClick:function(){function L(){return v(g?"verboseOff":"verboseOn")}return L}()})}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Health Announcer",children:(0,e.createComponentVNode)(2,d.Button,{selected:h,icon:h?"toggle-on":"toggle-off",content:h?"On":"Off",onClick:function(){function L(){return v(h?"healthOff":"healthOn")}return L}()})}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Health Announcer Threshold",children:(0,e.createComponentVNode)(2,d.Knob,{bipolar:!0,minValue:-100,maxValue:100,value:C,stepPixelSize:5,ml:"0",onChange:function(){function L(w,A){return v("health_adj",{new:A})}return L}()})}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Oxygen Alarm",children:(0,e.createComponentVNode)(2,d.Button,{selected:N,icon:N?"toggle-on":"toggle-off",content:N?"On":"Off",onClick:function(){function L(){return v(N?"oxyOff":"oxyOn")}return L}()})}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Oxygen Alarm Threshold",children:(0,e.createComponentVNode)(2,d.Knob,{bipolar:!0,minValue:-100,maxValue:100,value:x,stepPixelSize:5,ml:"0",onChange:function(){function L(w,A){return v("oxy_adj",{new:A})}return L}()})}),(0,e.createComponentVNode)(2,d.LabeledList.Item,{label:"Critical Alert",children:(0,e.createComponentVNode)(2,d.Button,{selected:B,icon:B?"toggle-on":"toggle-off",content:B?"On":"Off",onClick:function(){function L(){return v(B?"critOff":"critOn")}return L}()})})]})}},46892:function(I,r,n){"use strict";r.__esModule=!0,r.Orbit=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),d=n(98595);function y(m,c){var v=typeof Symbol!="undefined"&&m[Symbol.iterator]||m["@@iterator"];if(v)return(v=v.call(m)).next.bind(v);if(Array.isArray(m)||(v=V(m))||c&&m&&typeof m.length=="number"){v&&(m=v);var b=0;return function(){return b>=m.length?{done:!0}:{done:!1,value:m[b++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function V(m,c){if(m){if(typeof m=="string")return k(m,c);var v={}.toString.call(m).slice(8,-1);return v==="Object"&&m.constructor&&(v=m.constructor.name),v==="Map"||v==="Set"?Array.from(m):v==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(v)?k(m,c):void 0}}function k(m,c){(c==null||c>m.length)&&(c=m.length);for(var v=0,b=Array(c);vv},l=function(c,v){var b=c.name,g=v.name;if(!b||!g)return 0;var h=b.match(S),C=g.match(S);if(h&&C&&b.replace(S,"")===g.replace(S,"")){var N=parseInt(h[1],10),x=parseInt(C[1],10);return N-x}return i(b,g)},f=function(c,v){var b=(0,t.useBackend)(v),g=b.act,h=c.searchText,C=c.source,N=c.title,x=C.filter(p(h));return x.sort(l),C.length>0&&(0,e.createComponentVNode)(2,o.Section,{title:N+" - ("+C.length+")",children:x.map(function(B){return(0,e.createComponentVNode)(2,o.Button,{content:B.name,onClick:function(){function L(){return g("orbit",{ref:B.ref})}return L}()},B.name)})})},u=function(c,v){var b=(0,t.useBackend)(v),g=b.act,h=c.color,C=c.thing;return(0,e.createComponentVNode)(2,o.Button,{color:h,onClick:function(){function N(){return g("orbit",{ref:C.ref})}return N}(),children:C.name})},s=r.Orbit=function(){function m(c,v){for(var b=(0,t.useBackend)(v),g=b.act,h=b.data,C=h.alive,N=h.antagonists,x=h.highlights,B=h.auto_observe,L=h.dead,w=h.ghosts,A=h.misc,T=h.npcs,E=(0,t.useLocalState)(v,"searchText",""),O=E[0],P=E[1],R={},F=y(N),j;!(j=F()).done;){var W=j.value;R[W.antag]===void 0&&(R[W.antag]=[]),R[W.antag].push(W)}var z=Object.entries(R);z.sort(function($,G){return i($[0],G[0])});var H=function(){function $(G){for(var ne=0,Q=[z.map(function(Ne){var Be=Ne[0],Le=Ne[1];return Le}),x,C,w,L,T,A];ne0&&(0,e.createComponentVNode)(2,o.Section,{title:"Antagonists",children:z.map(function($){var G=$[0],ne=$[1];return(0,e.createComponentVNode)(2,o.Section,{title:G,level:2,children:ne.filter(p(O)).sort(l).map(function(Q){return(0,e.createComponentVNode)(2,u,{color:"bad",thing:Q},Q.name)})},G)})}),x.length>0&&(0,e.createComponentVNode)(2,f,{title:"Highlights",source:x,searchText:O,color:"teal"}),(0,e.createComponentVNode)(2,o.Section,{title:"Alive - ("+C.length+")",children:C.filter(p(O)).sort(l).map(function($){return(0,e.createComponentVNode)(2,u,{color:"good",thing:$},$.name)})}),(0,e.createComponentVNode)(2,o.Section,{title:"Ghosts - ("+w.length+")",children:w.filter(p(O)).sort(l).map(function($){return(0,e.createComponentVNode)(2,u,{color:"grey",thing:$},$.name)})}),(0,e.createComponentVNode)(2,f,{title:"Dead",source:L,searchText:O}),(0,e.createComponentVNode)(2,f,{title:"NPCs",source:T,searchText:O}),(0,e.createComponentVNode)(2,f,{title:"Misc",source:A,searchText:O})]})})}return m}()},15421:function(I,r,n){"use strict";r.__esModule=!0,r.OreRedemption=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),d=n(98595),y=n(9394);function V(c){if(c==null)throw new TypeError("Cannot destructure "+c)}var k=(0,y.createLogger)("OreRedemption"),S=function(v){return v.toLocaleString("en-US")+" pts"},p=r.OreRedemption=function(){function c(v,b){return(0,e.createComponentVNode)(2,d.Window,{width:490,height:750,children:(0,e.createComponentVNode)(2,d.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,i,{height:"100%"})}),(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,f)]})})})}return c}(),i=function(v,b){var g=(0,t.useBackend)(b),h=g.act,C=g.data,N=C.id,x=C.points,B=C.disk,L=Object.assign({},(V(v),v));return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({},L,{children:[(0,e.createComponentVNode)(2,o.Box,{color:"average",textAlign:"center",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"This machine only accepts ore. Gibtonite is not accepted."]}),(0,e.createComponentVNode)(2,o.Divider),(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"ID card",children:N?(0,e.createComponentVNode)(2,o.Button,{selected:!0,bold:!0,verticalAlign:"middle",icon:"eject",content:N.name,tooltip:"Ejects the ID card.",onClick:function(){function w(){return h("eject_id")}return w}(),style:{"white-space":"pre-wrap"}}):(0,e.createComponentVNode)(2,o.Button,{icon:"sign-in-alt",content:"Insert",tooltip:"Hold the ID card in your hand to insert.",onClick:function(){function w(){return h("insert_id")}return w}()})}),N&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Current Mining Points",children:(0,e.createComponentVNode)(2,o.Box,{bold:!0,children:S(N.points)})}),N&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Total Mining Points",children:(0,e.createComponentVNode)(2,o.Box,{bold:!0,children:S(N.total_points)})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Unclaimed Points",color:x>0?"good":"grey",bold:x>0&&"good",children:S(x)}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{children:(0,e.createComponentVNode)(2,o.Button,{disabled:!N,icon:"hand-holding-usd",content:"Claim",onClick:function(){function w(){return h("claim")}return w}()})})]}),(0,e.createComponentVNode)(2,o.Divider),B?(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Design disk",children:(0,e.createComponentVNode)(2,o.Button,{selected:!0,bold:!0,icon:"eject",content:B.name,tooltip:"Ejects the design disk.",onClick:function(){function w(){return h("eject_disk")}return w}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Stored design",children:(0,e.createComponentVNode)(2,o.Box,{color:B.design&&(B.compatible?"good":"bad"),children:B.design||"N/A"})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{children:(0,e.createComponentVNode)(2,o.Button,{disabled:!B.design||!B.compatible,icon:"upload",content:"Download",tooltip:"Downloads the design on the disk into the machine.",onClick:function(){function w(){return h("download")}return w}()})})]}):(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No design disk inserted."})]})))},l=function(v,b){var g=(0,t.useBackend)(b),h=g.act,C=g.data,N=C.sheets,x=Object.assign({},(V(v),v));return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,height:"20%",children:(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({fill:!0,scrollable:!0,className:"OreRedemption__Ores",p:"0"},x,{children:[(0,e.createComponentVNode)(2,u,{title:"Sheets",columns:[["Available","25%"],["Ore Value","15%"],["Smelt","20%"]]}),N.map(function(B){return(0,e.createComponentVNode)(2,s,{ore:B},B.id)})]})))})},f=function(v,b){var g=(0,t.useBackend)(b),h=g.act,C=g.data,N=C.alloys,x=Object.assign({},(V(v),v));return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({fill:!0,scrollable:!0,className:"OreRedemption__Ores",p:"0"},x,{children:[(0,e.createComponentVNode)(2,u,{title:"Alloys",columns:[["Recipe","50%"],["Available","11%"],["Smelt","20%"]]}),N.map(function(B){return(0,e.createComponentVNode)(2,m,{ore:B},B.id)})]})))})},u=function(v,b){var g;return(0,e.createComponentVNode)(2,o.Box,{className:"OreHeader",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:v.title}),(g=v.columns)==null?void 0:g.map(function(h){return(0,e.createComponentVNode)(2,o.Stack.Item,{basis:h[1],textAlign:"center",color:"label",bold:!0,children:h[0]},h)})]})})},s=function(v,b){var g=(0,t.useBackend)(b),h=g.act,C=v.ore;if(!(C.value&&C.amount<=0&&!(["metal","glass"].indexOf(C.id)>-1)))return(0,e.createComponentVNode)(2,o.Box,{className:"SheetLine",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"45%",align:"middle",children:(0,e.createComponentVNode)(2,o.Stack,{align:"center",children:[(0,e.createComponentVNode)(2,o.Stack.Item,{className:(0,a.classes)(["materials32x32",C.id])}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:C.name})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",color:C.amount>=1?"good":"gray",bold:C.amount>=1,align:"center",children:C.amount.toLocaleString("en-US")}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",align:"center",children:C.value}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,e.createComponentVNode)(2,o.NumberInput,{width:"40%",value:0,minValue:0,maxValue:Math.min(C.amount,50),stepPixelSize:6,onChange:function(){function N(x,B){return h(C.value?"sheet":"alloy",{id:C.id,amount:B})}return N}()})})]})})},m=function(v,b){var g=(0,t.useBackend)(b),h=g.act,C=v.ore;return(0,e.createComponentVNode)(2,o.Box,{className:"SheetLine",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"7%",align:"middle",children:(0,e.createComponentVNode)(2,o.Box,{className:(0,a.classes)(["alloys32x32",C.id])})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"30%",textAlign:"middle",align:"center",children:C.name}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"35%",textAlign:"middle",color:C.amount>=1?"good":"gray",align:"center",children:C.description}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"10%",textAlign:"center",color:C.amount>=1?"good":"gray",bold:C.amount>=1,align:"center",children:C.amount.toLocaleString("en-US")}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,e.createComponentVNode)(2,o.NumberInput,{width:"40%",value:0,minValue:0,maxValue:Math.min(C.amount,50),stepPixelSize:6,onChange:function(){function N(x,B){return h(C.value?"sheet":"alloy",{id:C.id,amount:B})}return N}()})})]})})}},30373:function(I,r,n){"use strict";r.__esModule=!0,r.PAI=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=n(71253),y=n(70752),V=function(p){var i;try{i=y("./"+p+".js")}catch(f){if(f.code==="MODULE_NOT_FOUND")return(0,d.routingError)("notFound",p);throw f}var l=i[p];return l||(0,d.routingError)("missingExport",p)},k=r.PAI=function(){function S(p,i){var l=(0,a.useBackend)(i),f=l.act,u=l.data,s=u.app_template,m=u.app_icon,c=u.app_title,v=V(s);return(0,e.createComponentVNode)(2,o.Window,{width:600,height:650,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:m,mr:1}),c,s!=="pai_main_menu"&&(0,e.createComponentVNode)(2,t.Button,{ml:2,content:"Home",icon:"arrow-up",onClick:function(){function b(){return f("MASTER_back")}return b}()})]}),p:1,children:(0,e.createComponentVNode)(2,v)})})})}return S}()},85175:function(I,r,n){"use strict";r.__esModule=!0,r.PDA=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=n(71253),y=n(59395),V=function(l){var f;try{f=y("./"+l+".js")}catch(s){if(s.code==="MODULE_NOT_FOUND")return(0,d.routingError)("notFound",l);throw s}var u=f[l];return u||(0,d.routingError)("missingExport",l)},k=r.PDA=function(){function i(l,f){var u=(0,a.useBackend)(f),s=u.act,m=u.data,c=m.app,v=m.owner;if(!v)return(0,e.createComponentVNode)(2,o.Window,{width:350,height:105,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Error",children:"No user data found. Please swipe an ID card."})})});var b=V(c.template);return(0,e.createComponentVNode)(2,o.Window,{width:600,height:650,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,S)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,p:1,pb:0,title:(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:c.icon,mr:1}),c.name]}),children:(0,e.createComponentVNode)(2,b)})}),(0,e.createComponentVNode)(2,t.Stack.Item,{mt:7.5,children:(0,e.createComponentVNode)(2,p)})]})})})}return i}(),S=function(l,f){var u=(0,a.useBackend)(f),s=u.act,m=u.data,c=m.idInserted,v=m.idLink,b=m.stationTime,g=m.cartridge_name;return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{ml:.5,children:(0,e.createComponentVNode)(2,t.Button,{icon:"id-card",color:"transparent",onClick:function(){function h(){return s("Authenticate")}return h}(),content:c?v:"No ID Inserted"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"sd-card",color:"transparent",onClick:function(){function h(){return s("Eject")}return h}(),content:g?["Eject "+g]:"No Cartridge Inserted"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"right",bold:!0,mr:1,mt:.5,children:b})]})},p=function(l,f){var u=(0,a.useBackend)(f),s=u.act,m=u.data,c=m.app;return(0,e.createComponentVNode)(2,t.Box,{height:"45px",className:"PDA__footer",backgroundColor:"#1b1b1b",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[!!c.has_back&&(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"33%",mr:-.5,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:c.has_back?"white":"disabled",icon:"arrow-alt-circle-left-o",onClick:function(){function v(){return s("Back")}return v}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{basis:c.has_back?"33%":"100%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:c.is_home?"disabled":"white",icon:"home",onClick:function(){function v(){s("Home")}return v}()})})]})})}},38280:function(I,r,n){"use strict";r.__esModule=!0,r.PDAPainter=r.PDAColorRow=void 0;var e=n(89005),a=n(72253),t=n(98595),o=n(36036),d=r.PDAPainter=function(){function V(k,S){var p=(0,a.useBackend)(S),i=p.act,l=p.data,f=l.statusLabel,u=l.pdaTypes,s=l.hasPDA,m=l.pdaIcon,c=l.pdaOwnerName,v=l.pdaJobName;return(0,e.createComponentVNode)(2,t.Window,{width:545,height:350,children:(0,e.createComponentVNode)(2,t.Window.Content,{children:(0,e.createComponentVNode)(2,o.Flex,{spacing:1,direction:"row",height:"100%",flex:"1",children:[(0,e.createComponentVNode)(2,o.Flex.Item,{width:24,shrink:0,children:[(0,e.createComponentVNode)(2,o.Section,{title:"\u041E\u0431\u0449\u0435\u0435",buttons:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,icon:s?"eject":"exclamation-triangle",selected:s,content:s?"\u0418\u0437\u0432\u043B\u0435\u0447\u044C":"-----",tooltip:s?"\u0418\u0437\u0432\u043B\u0435\u0447\u044C PDA":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C PDA",tooltipPosition:"left",onClick:function(){function b(){return i(s?"eject_pda":"insert_pda")}return b}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0418\u043C\u044F",children:c||"\u041D/\u0414"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C",children:v||"\u041D/\u0414"})]})}),(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.Flex,{height:"100%",direction:"column",flex:"1",children:(0,e.createComponentVNode)(2,o.Flex.Item,{children:[(0,e.createComponentVNode)(2,o.Box,{textAlign:"center",children:(0,e.createComponentVNode)(2,o.Box,{as:"img",height:"160px",src:s?"data:image/png;base64,"+m:"",style:{"-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"},align:"middle"})}),(0,e.createComponentVNode)(2,o.LabeledList,{m:"5px",children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0421\u0442\u0430\u0442\u0443\u0441",children:f})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{m:"5px",fluid:!0,disabled:!s,content:"\u0421\u0442\u0435\u0440\u0435\u0442\u044C PDA",confirmContent:"\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C?",textAlign:"left",color:"red",tooltip:"C\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0442\u0435\u043B\u0435\u0444\u043E\u043D \u043D\u0430 \u0437\u0430\u0432\u043E\u0434\u0441\u043A\u0438\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438",tooltipPosition:"top",onClick:function(){function b(){return i("erase_pda")}return b}()})]})})})]}),(0,e.createComponentVNode)(2,o.Flex.Item,{width:27,children:(0,e.createComponentVNode)(2,o.Flex,{direction:"column",height:"100%",flex:"1",children:(0,e.createComponentVNode)(2,o.Section,{title:"\u0426\u0432\u0435\u0442 PDA",flexGrow:"1",scrollable:!0,fill:!0,children:(0,e.createComponentVNode)(2,o.Table,{children:Object.keys(u).map(function(b){return(0,e.createComponentVNode)(2,y,{selectedPda:b,selectedPdaImage:u[b][0]},b)})})})})})]})})})}return V}(),y=r.PDAColorRow=function(){function V(k,S){var p=(0,a.useBackend)(S),i=p.act,l=p.data,f=l.hasPDA,u=k.selectedPda,s=k.selectedPdaImage;return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/png;base64,"+s,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,e.createComponentVNode)(2,o.Table.Cell,{bold:!0,children:(0,e.createComponentVNode)(2,o.Button.Confirm,{fluid:!0,disabled:!f,icon:s,content:u,confirmContent:"\u041F\u043E\u043A\u0440\u0430\u0441\u0438\u0442\u044C?",textAlign:"left",onClick:function(){function m(){return i("choose_pda",{selectedPda:u,selectedPdaImage:s})}return m}()})})]})}return V}()},68654:function(I,r,n){"use strict";r.__esModule=!0,r.Pacman=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=n(49968),y=r.Pacman=function(){function V(k,S){var p=(0,a.useBackend)(S),i=p.act,l=p.data,f=l.broken,u=l.anchored,s=l.active,m=l.fuel_type,c=l.fuel_usage,v=l.fuel_stored,b=l.fuel_cap,g=l.is_ai,h=l.tmp_current,C=l.tmp_max,N=l.tmp_overheat,x=l.output_max,B=l.power_gen,L=l.output_set,w=l.has_fuel,A=v/b,T=h/C,E=L*B,O=Math.round(v/c),P=Math.round(O/60),R=O>120?P+" minutes":O+" seconds";return(0,e.createComponentVNode)(2,o.Window,{width:500,height:260,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(f||!u)&&(0,e.createComponentVNode)(2,t.Section,{title:"Status",children:[!!f&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"The generator is malfunctioning!"}),!f&&!u&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"The generator needs to be anchored to the floor with a wrench."})]}),!f&&!!u&&(0,e.createVNode)(1,"div",null,[(0,e.createComponentVNode)(2,t.Section,{title:"Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:s?"power-off":"times",content:s?"On":"Off",tooltip:"Toggles the generator on/off. Requires fuel.",tooltipPosition:"left",disabled:!w,selected:s,onClick:function(){function F(){return i("toggle_power")}return F}()}),children:(0,e.createComponentVNode)(2,t.Flex,{direction:"row",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{width:"50%",className:"ml-1",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power setting",children:[(0,e.createComponentVNode)(2,t.NumberInput,{value:L,minValue:1,maxValue:x,step:1,className:"mt-1",onDrag:function(){function F(j,W){return i("change_power",{change_power:W})}return F}()}),"(",(0,d.formatPower)(E),")"]})})}),(0,e.createComponentVNode)(2,t.Flex.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:T,ranges:{green:[-1/0,.33],orange:[.33,.66],red:[.66,1/0]},children:[h," \u2103"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:[N>50&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"CRITICAL OVERHEAT!"}),N>20&&N<=50&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"WARNING: Overheating!"}),N>1&&N<=20&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"Temperature High"}),N===0&&(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Optimal"})]})]})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Fuel",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject Fuel",tooltip:"Ejects fuel. Generator needs to be offline.",tooltipPosition:"left",disabled:s||g||!w,onClick:function(){function F(){return i("eject_fuel")}return F}()}),children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Type",children:m}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fuel level",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:A,ranges:{red:[-1/0,.33],orange:[.33,.66],green:[.66,1/0]},children:[Math.round(v/1e3)," dm\xB3"]})})]})}),(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fuel usage",children:[c/1e3," dm\xB3/s"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fuel depletion",children:[!!w&&(c?R:"N/A"),!w&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Out of fuel"})]})]})})]})})],4)]})})}return V}()},33388:function(I,r,n){"use strict";r.__esModule=!0,r.PersonalCrafting=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.PersonalCrafting=function(){function k(S,p){var i=(0,a.useBackend)(p),l=i.act,f=i.data,u=f.busy,s=f.category,m=f.display_craftable_only,c=f.display_compact,v=f.prev_cat,b=f.next_cat,g=f.subcategory,h=f.prev_subcat,C=f.next_subcat;return(0,e.createComponentVNode)(2,o.Window,{width:700,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[!!u&&(0,e.createComponentVNode)(2,t.Dimmer,{fontSize:"32px",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"cog",spin:1})," Crafting..."]}),(0,e.createComponentVNode)(2,t.Section,{title:s,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Show Craftable Only",icon:m?"check-square-o":"square-o",selected:m,onClick:function(){function N(){return l("toggle_recipes")}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Compact Mode",icon:c?"check-square-o":"square-o",selected:c,onClick:function(){function N(){return l("toggle_compact")}return N}()})],4),children:[(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:v,icon:"arrow-left",onClick:function(){function N(){return l("backwardCat")}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:b,icon:"arrow-right",onClick:function(){function N(){return l("forwardCat")}return N}()})]}),g&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:h,icon:"arrow-left",onClick:function(){function N(){return l("backwardSubCat")}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:C,icon:"arrow-right",onClick:function(){function N(){return l("forwardSubCat")}return N}()})]}),c?(0,e.createComponentVNode)(2,y):(0,e.createComponentVNode)(2,V)]})]})})}return k}(),y=function(S,p){var i=(0,a.useBackend)(p),l=i.act,f=i.data,u=f.display_craftable_only,s=f.can_craft,m=f.cant_craft;return(0,e.createComponentVNode)(2,t.Box,{mt:1,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[s.map(function(c){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:c.name,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",onClick:function(){function v(){return l("make",{make:c.ref})}return v}()}),c.catalyst_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:c.catalyst_text,content:"Catalysts",color:"transparent"}),(0,e.createComponentVNode)(2,t.Button,{tooltip:c.req_text,content:"Requirements",color:"transparent"}),c.tool_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:c.tool_text,content:"Tools",color:"transparent"})]},c.name)}),!u&&m.map(function(c){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:c.name,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",disabled:!0}),c.catalyst_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:c.catalyst_text,content:"Catalysts",color:"transparent"}),(0,e.createComponentVNode)(2,t.Button,{tooltip:c.req_text,content:"Requirements",color:"transparent"}),c.tool_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:c.tool_text,content:"Tools",color:"transparent"})]},c.name)})]})})},V=function(S,p){var i=(0,a.useBackend)(p),l=i.act,f=i.data,u=f.display_craftable_only,s=f.can_craft,m=f.cant_craft;return(0,e.createComponentVNode)(2,t.Box,{mt:1,children:[s.map(function(c){return(0,e.createComponentVNode)(2,t.Section,{title:c.name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",onClick:function(){function v(){return l("make",{make:c.ref})}return v}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[c.catalyst_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Catalysts",children:c.catalyst_text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Requirements",children:c.req_text}),c.tool_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tools",children:c.tool_text})]})},c.name)}),!u&&m.map(function(c){return(0,e.createComponentVNode)(2,t.Section,{title:c.name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",disabled:!0}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[c.catalyst_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Catalysts",children:c.catalyst_text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Requirements",children:c.req_text}),c.tool_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tools",children:c.tool_text})]})},c.name)})]})}},56150:function(I,r,n){"use strict";r.__esModule=!0,r.Photocopier=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=n(88510),y=n(64795),V=n(25328);function k(f,u){var s=typeof Symbol!="undefined"&&f[Symbol.iterator]||f["@@iterator"];if(s)return(s=s.call(f)).next.bind(s);if(Array.isArray(f)||(s=S(f))||u&&f&&typeof f.length=="number"){s&&(f=s);var m=0;return function(){return m>=f.length?{done:!0}:{done:!1,value:f[m++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function S(f,u){if(f){if(typeof f=="string")return p(f,u);var s={}.toString.call(f).slice(8,-1);return s==="Object"&&f.constructor&&(s=f.constructor.name),s==="Map"||s==="Set"?Array.from(f):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?p(f,u):void 0}}function p(f,u){(u==null||u>f.length)&&(u=f.length);for(var s=0,m=Array(u);sf?this.substring(0,f)+"...":this};var i=function(u,s){s===void 0&&(s="");var m=(0,V.createSearch)(s,function(c){return c.altername});return(0,y.flow)([(0,d.filter)(function(c){return c==null?void 0:c.altername}),s&&(0,d.filter)(m),(0,d.sortBy)(function(c){return c.id})])(u)},l=r.Photocopier=function(){function f(u,s){for(var m=(0,a.useBackend)(s),c=m.act,v=m.data,b=v.copies,g=v.maxcopies,h=(0,a.useLocalState)(s,"searchText",""),C=h[0],N=h[1],x=i((0,d.sortBy)(function(R){return R.category})(v.forms||[]),C),B=[],L=k(x),w;!(w=L()).done;){var A=w.value;B.includes(A.category)||B.push(A.category)}var T=(0,a.useLocalState)(s,"number",0),E=T[0],O=T[1],P;return v.category===""?P=x:P=x.filter(function(R){return R.category===v.category}),(0,e.createComponentVNode)(2,o.Window,{width:550,height:575,theme:v.ui_theme,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"40%",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"\u0421\u0442\u0430\u0442\u0443\u0441",children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",mt:.3,color:"grey",children:"\u0417\u0430\u0440\u044F\u0434 \u0442\u043E\u043D\u0435\u0440\u0430:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{minValue:0,maxValue:30,value:v.toner})})]}),(0,e.createComponentVNode)(2,t.Stack,{mt:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",mb:.3,color:"grey",children:"\u0424\u043E\u0440\u043C\u0430:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",textAlign:"center",bold:!0,children:v.form_id===""?"\u041D\u0435 \u0432\u044B\u0431\u0440\u0430\u043D\u0430":v.form_id})]}),(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{width:"100%",mt:1,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",disabled:!v.copyitem&&!v.mob,icon:v.copyitem||v.mob?"eject":"times",content:v.copyitem?v.copyitem:v.mob?"\u0416\u043E\u043F\u0430 "+v.mob+"!":"\u0421\u043B\u043E\u0442 \u0434\u043B\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430",onClick:function(){function R(){return c("removedocument")}return R}()})})}),(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{width:"100%",mt:"3px",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",disabled:!v.folder,icon:v.folder?"eject":"times",content:v.folder?v.folder:"\u0421\u043B\u043E\u0442 \u0434\u043B\u044F \u043F\u0430\u043F\u043A\u0438",onClick:function(){function R(){return c("removefolder")}return R}()})})})]}),(0,e.createComponentVNode)(2,t.Section,{title:"\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435",children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"100%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"print",disabled:v.toner===0||v.form===null,content:"\u041F\u0435\u0447\u0430\u0442\u044C",onClick:function(){function R(){return c("print_form")}return R}()})}),!!v.isAI&&(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"100%",ml:"5px",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"image",disabled:v.toner<5,content:"\u0424\u043E\u0442\u043E",tooltip:"\u0420\u0430\u0441\u043F\u0435\u0447\u0430\u0442\u0430\u0442\u044C \u0444\u043E\u0442\u043E \u0441 \u0411\u0430\u0437\u044B \u0414\u0430\u043D\u043D\u044B\u0445",onClick:function(){function R(){return c("ai_pic")}return R}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"100%",mt:"3px",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"copy",content:"\u041A\u043E\u043F\u0438\u044F",disabled:v.toner===0||!v.copyitem&&!v.mob,onClick:function(){function R(){return c("copy")}return R}()})}),!!v.isAI&&(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"100%",ml:"5px",mt:"3px",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"i-cursor",content:"\u0422\u0435\u043A\u0441\u0442",tooltip:"\u0420\u0430\u0441\u043F\u0435\u0447\u0430\u0442\u0430\u0442\u044C \u0441\u0432\u043E\u0439 \u0442\u0435\u043A\u0441\u0442",disabled:v.toner===0,onClick:function(){function R(){return c("ai_text")}return R}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{mr:1.5,mt:1.2,width:"50%",color:"grey",children:"\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E:"}),(0,e.createComponentVNode)(2,t.Slider,{mt:.75,width:"50%",animated:!0,minValue:1,maxValue:g,value:b,stepPixelSize:10,onChange:function(){function R(F,j){return c("copies",{new:j})}return R}()})]})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mt:0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"\u0411\u044E\u0440\u043E\u043A\u0440\u0430\u0442\u0438\u044F",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mb:-.5,icon:"chevron-right",color:"transparent",content:"\u0412\u0441\u0435 \u0444\u043E\u0440\u043C\u044B",selected:!v.category,onClick:function(){function R(){return c("choose_category",{category:""})}return R}()})}),B.map(function(R){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"chevron-right",mb:-.5,color:"transparent",content:R,selected:v.category===R,onClick:function(){function F(){return c("choose_category",{category:R})}return F}()},R)},R)})]})})})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"60%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:v.category||"\u0412\u0441\u0435 \u0444\u043E\u0440\u043C\u044B",buttons:(0,e.createComponentVNode)(2,t.Input,{mr:18.5,width:"100%",placeholder:"\u041F\u043E\u0438\u0441\u043A \u0444\u043E\u0440\u043C\u044B",onInput:function(){function R(F,j){return N(j)}return R}()}),children:P.map(function(R){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mb:.5,color:"transparent",content:R.altername.trimLongStr(37),tooltip:R.altername,selected:v.form_id===R.id,onClick:function(){function F(){return c("choose_form",{path:R.path,id:R.id})}return F}()})},R.path)})})})]})})})}return f}()},94158:function(I,r,n){"use strict";r.__esModule=!0,r.PodTracking=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=r.PodTracking=function(){function y(V,k){var S=(0,a.useBackend)(k),p=S.act,i=S.data,l=i.pods;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:l.map(function(f){return(0,e.createComponentVNode)(2,t.Section,{title:f.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Position",children:[f.podx,", ",f.pody,", ",f.podz]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pilot",children:f.pilot}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Passengers",children:f.passengers})]})},f.name)})})})}return y}()},84676:function(I,r,n){"use strict";r.__esModule=!0,r.PoolController=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),d=["tempKey"];function y(p,i){if(p==null)return{};var l={};for(var f in p)if({}.hasOwnProperty.call(p,f)){if(i.includes(f))continue;l[f]=p[f]}return l}var V={scalding:{label:"Scalding",color:"#FF0000",icon:"fa fa-arrow-circle-up",requireEmag:!0},warm:{label:"Warm",color:"#990000",icon:"fa fa-arrow-circle-up"},normal:{label:"Normal",color:null,icon:"fa fa-arrow-circle-right"},cool:{label:"Cool",color:"#009999",icon:"fa fa-arrow-circle-down"},frigid:{label:"Frigid",color:"#00CCCC",icon:"fa fa-arrow-circle-down",requireEmag:!0}},k=function(i,l){var f=i.tempKey,u=y(i,d),s=V[f];if(!s)return null;var m=(0,a.useBackend)(l),c=m.data,v=m.act,b=c.currentTemp,g=s.label,h=s.icon,C=f===b,N=function(){v("setTemp",{temp:f})};return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Button,Object.assign({selected:C,onClick:N},u,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:h}),g]})))},S=r.PoolController=function(){function p(i,l){for(var f=(0,a.useBackend)(l),u=f.data,s=u.emagged,m=u.currentTemp,c=V[m]||V.normal,v=c.label,b=c.color,g=[],h=0,C=Object.entries(V);h50?"battery-half":"battery-quarter")||b==="C"&&"bolt"||b==="F"&&"battery-full"||b==="M"&&"slash",color:b==="N"&&(g>50?"yellow":"red")||b==="C"&&"yellow"||b==="F"&&"green"||b==="M"&&"orange"}),(0,e.createComponentVNode)(2,k.Box,{inline:!0,width:"36px",textAlign:"right",children:(0,o.toFixed)(g)+"%"})],4)};s.defaultHooks=d.pureComponentHooks;var m=function(v){var b,g,h=v.status;switch(h){case"AOn":b=!0,g=!0;break;case"AOff":b=!0,g=!1;break;case"On":b=!1,g=!0;break;case"Off":b=!1,g=!1;break}var C=(g?"On":"Off")+(" ["+(b?"auto":"manual")+"]");return(0,e.createComponentVNode)(2,k.ColorBox,{color:g?"good":"bad",content:b?void 0:"M",title:C})};m.defaultHooks=d.pureComponentHooks},50992:function(I,r,n){"use strict";r.__esModule=!0,r.PrisonerImplantManager=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(29319),d=n(3939),y=n(321),V=n(5485),k=n(98595),S=r.PrisonerImplantManager=function(){function p(i,l){var f=(0,a.useBackend)(l),u=f.act,s=f.data,m=s.loginState,c=s.prisonerInfo,v=s.chemicalInfo,b=s.trackingInfo,g;if(!m.logged_in)return(0,e.createComponentVNode)(2,k.Window,{theme:"security",width:500,height:850,children:(0,e.createComponentVNode)(2,k.Window.Content,{children:(0,e.createComponentVNode)(2,V.LoginScreen)})});var h=[1,5,10];return(0,e.createComponentVNode)(2,k.Window,{theme:"security",width:500,height:850,children:[(0,e.createComponentVNode)(2,d.ComplexModal),(0,e.createComponentVNode)(2,k.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y.LoginInfo),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Prisoner Points Manager System",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Prisoner",children:(0,e.createComponentVNode)(2,t.Button,{icon:c.name?"eject":"id-card",selected:c.name,content:c.name?c.name:"-----",tooltip:c.name?"Eject ID":"Insert ID",onClick:function(){function C(){return u("id_card")}return C}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Points",children:[c.points!==null?c.points:"-/-",(0,e.createComponentVNode)(2,t.Button,{ml:2,icon:"minus-square",disabled:c.points===null,content:"Reset",onClick:function(){function C(){return u("reset_points")}return C}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Point Goal",children:[c.goal!==null?c.goal:"-/-",(0,e.createComponentVNode)(2,t.Button,{ml:2,icon:"pen",disabled:c.goal===null,content:"Edit",onClick:function(){function C(){return(0,d.modalOpen)(l,"set_points")}return C}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{children:(0,e.createVNode)(1,"box",null,[(0,e.createTextVNode)("1 minute of prison time should roughly equate to 150 points."),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Sentences should not exceed 5000 points."),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Permanent prisoners should not be given a point goal."),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Prisoners who meet their point goal will be able to automatically access their locker and return to the station using the shuttle.")],4,{hidden:c.goal===null})})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Tracking Implants",children:b.map(function(C){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{p:1,backgroundColor:"rgba(255, 255, 255, 0.05)",children:[(0,e.createComponentVNode)(2,t.Box,{bold:!0,children:["Subject: ",C.subject]}),(0,e.createComponentVNode)(2,t.Box,{children:[" ",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Location",children:C.location}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health",children:C.health}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Prisoner",children:(0,e.createComponentVNode)(2,t.Button,{icon:"exclamation-triangle",content:"Warn",tooltip:"Broadcast a message to this poor sod",onClick:function(){function N(){return(0,d.modalOpen)(l,"warn",{uid:C.uid})}return N}()})})]})]},C.subject)]}),(0,e.createVNode)(1,"br")],4)})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Chemical Implants",children:v.map(function(C){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{p:1,backgroundColor:"rgba(255, 255, 255, 0.05)",children:[(0,e.createComponentVNode)(2,t.Box,{bold:!0,children:["Subject: ",C.name]}),(0,e.createComponentVNode)(2,t.Box,{children:[" ",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Remaining Reagents",children:C.volume})}),h.map(function(N){return(0,e.createComponentVNode)(2,t.Button,{mt:2,disabled:C.volume1100?"purple":m>500?"orange":m>250?"yellow":"green"},k=function(m,c){for(var v=[],b=0;b0?"envelope-open-text":"envelope",onClick:function(){function N(){return c("setScreen",{setScreen:6})}return N}()})}),(0,e.createComponentVNode)(2,t.Box,{mt:2,children:[(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Request Assistance",icon:"hand-paper",onClick:function(){function N(){return c("setScreen",{setScreen:1})}return N}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Request Supplies",icon:"box",onClick:function(){function N(){return c("setScreen",{setScreen:2})}return N}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Relay Anonymous Information",icon:"comment",onClick:function(){function N(){return c("setScreen",{setScreen:3})}return N}()})})]}),(0,e.createComponentVNode)(2,t.Box,{mt:2,children:[(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Print Shipping Label",icon:"tag",onClick:function(){function N(){return c("setScreen",{setScreen:9})}return N}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"View Shipping Logs",icon:"clipboard-list",onClick:function(){function N(){return c("setScreen",{setScreen:10})}return N}()})})]}),!!g&&(0,e.createComponentVNode)(2,t.Box,{mt:2,children:(0,e.createComponentVNode)(2,t.Button,{content:"Send Station-Wide Announcement",icon:"bullhorn",onClick:function(){function N(){return c("setScreen",{setScreen:8})}return N}()})}),(0,e.createComponentVNode)(2,t.Box,{mt:2,children:(0,e.createComponentVNode)(2,t.Button,{content:h?"Speaker Off":"Speaker On",selected:!h,icon:h?"volume-mute":"volume-up",onClick:function(){function N(){return c("toggleSilent")}return N}()})})]})},V=function(u,s){var m=(0,a.useBackend)(s),c=m.act,v=m.data,b=v.department,g,h;switch(u.purpose){case"ASSISTANCE":g=v.assist_dept,h="Request assistance from another department";break;case"SUPPLIES":g=v.supply_dept,h="Request supplies from another department";break;case"INFO":g=v.info_dept,h="Relay information to another department";break}return(0,e.createComponentVNode)(2,t.Section,{title:h,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function C(){return c("setScreen",{setScreen:0})}return C}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:g.filter(function(C){return C!==b}).map(function(C){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:C,children:[(0,e.createComponentVNode)(2,t.Button,{content:"Message",icon:"envelope",onClick:function(){function N(){return c("writeInput",{write:C,priority:1})}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:"High Priority",icon:"exclamation-circle",onClick:function(){function N(){return c("writeInput",{write:C,priority:2})}return N}()})]},C)})})})},k=function(u,s){var m=(0,a.useBackend)(s),c=m.act,v=m.data,b;switch(u.type){case"SUCCESS":b="Message sent successfully";break;case"FAIL":b="Request supplies from another department";break}return(0,e.createComponentVNode)(2,t.Section,{title:b,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function g(){return c("setScreen",{setScreen:0})}return g}()})})},S=function(u,s){var m=(0,a.useBackend)(s),c=m.act,v=m.data,b,g;switch(u.type){case"MESSAGES":b=v.message_log,g="Message Log";break;case"SHIPPING":b=v.shipping_log,g="Shipping label print log";break}return(0,e.createComponentVNode)(2,t.Section,{title:g,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function h(){return c("setScreen",{setScreen:0})}return h}()}),children:b.map(function(h){return(0,e.createComponentVNode)(2,t.Box,{className:"RequestConsole__message",children:h},h)})})},p=function(u,s){var m=(0,a.useBackend)(s),c=m.act,v=m.data,b=v.recipient,g=v.message,h=v.msgVerified,C=v.msgStamped;return(0,e.createComponentVNode)(2,t.Section,{title:"Message Authentication",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function N(){return c("setScreen",{setScreen:0})}return N}()}),children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Recipient",children:b}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Message",children:g}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Validated by",color:"green",children:h}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Stamped by",color:"blue",children:C})]}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mt:1,textAlign:"center",content:"Send Message",icon:"envelope",onClick:function(){function N(){return c("department",{department:b})}return N}()})]})},i=function(u,s){var m=(0,a.useBackend)(s),c=m.act,v=m.data,b=v.message,g=v.announceAuth;return(0,e.createComponentVNode)(2,t.Section,{title:"Station-Wide Announcement",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function h(){return c("setScreen",{setScreen:0})}return h}()}),children:[(0,e.createComponentVNode)(2,t.Button,{content:b||"Edit Message",icon:"edit",onClick:function(){function h(){return c("writeAnnouncement")}return h}()}),g?(0,e.createComponentVNode)(2,t.Box,{mt:1,color:"green",children:"ID verified. Authentication accepted."}):(0,e.createComponentVNode)(2,t.Box,{mt:1,children:"Swipe your ID card to authenticate yourself."}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mt:1,textAlign:"center",content:"Send Announcement",icon:"bullhorn",disabled:!(g&&b),onClick:function(){function h(){return c("sendAnnouncement")}return h}()})]})},l=function(u,s){var m=(0,a.useBackend)(s),c=m.act,v=m.data,b=v.shipDest,g=v.msgVerified,h=v.ship_dept;return(0,e.createComponentVNode)(2,t.Section,{title:"Print Shipping Label",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function C(){return c("setScreen",{setScreen:0})}return C}()}),children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Destination",children:b}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Validated by",children:g})]}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mt:1,textAlign:"center",content:"Print Label",icon:"print",disabled:!(b&&g),onClick:function(){function C(){return c("printLabel")}return C}()}),(0,e.createComponentVNode)(2,t.Section,{title:"Destinations",mt:1,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:h.map(function(C){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:C,children:(0,e.createComponentVNode)(2,t.Button,{content:b===C?"Selected":"Select",selected:b===C,onClick:function(){function N(){return c("shipSelect",{shipSelect:C})}return N}()})},C)})})})]})}},3786:function(I,r,n){"use strict";r.__esModule=!0,r.RequestManager=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),d=n(98595);/** * @file * @copyright 2021 bobbahbrown (https://github.com/bobbahbrown) * @coauthor 2022 BeebBeebBoob (https://github.com/BeebBeebBoob)