diff --git a/code/modules/admin/player_options_panel.dm b/code/modules/admin/player_options_panel.dm
index dc2c3771fe7..1332babd540 100644
--- a/code/modules/admin/player_options_panel.dm
+++ b/code/modules/admin/player_options_panel.dm
@@ -33,11 +33,11 @@
/datum/vuap_personal/ui_data(mob/user)
var/list/player_data = list(
"characterName" = "No Character",
- "ckey" = selected_ckey || "Unknown",
+ "ckey" = selected_ckey || "NO CKEY",
"ipAddress" = "0.0.0.0",
- "CID" = "NO_CID",
+ "CID" = "NO CID",
"discord" = "No Discord",
- "gameState" = "Unknown", // cliented or clientless
+ "playtime" = "No client",
"rank" = "Player",
"byondVersion" = "0.0.0",
"mobType" = "null",
@@ -55,7 +55,7 @@
if(selected_ckey[1] == "@" || selected_ckey == "" || selected_ckey == null)
var/mob/player = selected_mob
player_data["characterName"] = player.name || "No Character"
- player_data["gameState"] = "Inactive"
+ player_data["playtime"] = "No client"
player_data["mobType"] = "[initial(player.type)]" || "null"
else
var/mob/player = get_mob_by_ckey(selected_ckey)
@@ -65,7 +65,7 @@
player_data["ipAddress"] = client_info.address || "0.0.0.0"
player_data["CID"] = client_info.computer_id || "NO_CID"
player_data["discord"] = client_info.prefs.discord_id || "No Discord"
- player_data["gameState"] = "Active"
+ player_data["playtime"] = client_info.get_exp_type(EXP_TYPE_CREW) || "none"
player_data["rank"] = client_info.holder?.rank || "Player"
player_data["byondVersion"] = "[client_info.byond_version || 0].[client_info.byond_build || 0]"
player_data["mobType"] = "[initial(player.type)]" || "null"
@@ -113,6 +113,8 @@
if("old_pp")
usr.client.holder.show_old_player_panel(M)
return
+ if("playtime")
+ usr.client.holder.Topic(null, list("getplaytimewindow" = M.UID()))
if("relatedbycid")
usr.client.holder.Topic(null, list("showrelatedacc" = "cid", "client" = M.client.UID()))
if("relatedbyip")
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index bc308f5c2cb..8d6f7c4f70c 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -3874,10 +3874,9 @@
var/client/C = locate(href_list["client"]) in GLOB.clients
var/thing_to_check
if(href_list["showrelatedacc"] == "cid")
- thing_to_check = C.related_accounts_cid
+ thing_to_check = jointext(C.related_accounts_cid, "
")
else
- thing_to_check = C.related_accounts_ip
- thing_to_check = splittext(thing_to_check, ", ")
+ thing_to_check = jointext(C.related_accounts_ip, "
")
var/list/dat = list("Related accounts by [uppertext(href_list["showrelatedacc"])]:")
diff --git a/tgui/packages/tgui/interfaces/PlayerPanel.tsx b/tgui/packages/tgui/interfaces/PlayerPanel.tsx
index 26700159293..0055f806bd0 100644
--- a/tgui/packages/tgui/interfaces/PlayerPanel.tsx
+++ b/tgui/packages/tgui/interfaces/PlayerPanel.tsx
@@ -19,7 +19,7 @@ interface playerData {
ipAddress: string;
CID: string;
discord: string;
- gameState: string;
+ playtime: string;
rank: string;
byondVersion: string;
mobType: string;
@@ -129,8 +129,13 @@ const PlayerInformation = (props, context) => {
Account Registered:
{data.accountRegistered}
- Byond Version:
- {data.byondVersion}
+ Playtime as Crew:
+
+
CID:
@@ -151,8 +156,8 @@ const PlayerInformation = (props, context) => {
Mob Type:
{data.mobType}
- Game State:
- {data.gameState}
+ Byond Version:
+ {data.byondVersion}
Related By CID:
diff --git a/tgui/public/tgui.bundle.js b/tgui/public/tgui.bundle.js
index 3497cdada52..08a574625f6 100644
--- a/tgui/public/tgui.bundle.js
+++ b/tgui/public/tgui.bundle.js
@@ -254,7 +254,7 @@
* @file
* @copyright 2023 itsmeow
* @license MIT
- */function f(T,A){T.prototype=Object.create(A.prototype),T.prototype.constructor=T,l(T,A)}function l(T,A){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(E,w){return E.__proto__=w,E},l(T,A)}function d(T,A){if(T==null)return{};var E={};for(var w in T)if({}.hasOwnProperty.call(T,w)){if(A.includes(w))continue;E[w]=T[w]}return E}var m=r.ColorPickerModal=function(){function T(A,E){var w=(0,t.useBackend)(E),O=w.data,M=O.timeout,P=O.message,F=O.title,R=O.autofocus,U=O.default_color,j=U===void 0?"#000000":U,W=(0,t.useLocalState)(E,"color_picker_choice",(0,y.hexToHsva)(j)),K=W[0],$=W[1];return(0,e.createComponentVNode)(2,p.Window,{height:400,title:F,width:600,theme:"generic",children:[!!M&&(0,e.createComponentVNode)(2,a.Loader,{value:M}),(0,e.createComponentVNode)(2,p.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[P&&(0,e.createComponentVNode)(2,o.Stack.Item,{m:1,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:(0,e.createComponentVNode)(2,o.Box,{color:"label",overflow:"hidden",children:P})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:[!!R&&(0,e.createComponentVNode)(2,o.Autofocus),(0,e.createComponentVNode)(2,i,{color:K,setColor:$,defaultColor:j})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,c.InputButtons,{input:(0,y.hsvaToHex)(K)})})]})})]})}return T}(),i=r.ColorSelector=function(){function T(A,E){var w=A.color,O=A.setColor,M=A.defaultColor,P=function(){function U(j){O(function(W){return Object.assign({},W,j)})}return U}(),F=(0,y.hsvaToRgba)(w),R=(0,y.hsvaToHex)(w);return(0,e.createComponentVNode)(2,o.Flex,{direction:"row",children:[(0,e.createComponentVNode)(2,o.Flex.Item,{mr:2,children:(0,e.createComponentVNode)(2,o.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createVNode)(1,"div","react-colorful",[(0,e.createComponentVNode)(2,g,{hsva:w,onChange:P}),(0,e.createComponentVNode)(2,N,{hue:w.h,onChange:P,className:"react-colorful__last-control"})],4)}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Box,{inline:!0,width:"100px",height:"20px",textAlign:"center",children:"Current"}),(0,e.createComponentVNode)(2,o.Box,{inline:!0,width:"100px",height:"20px",textAlign:"center",children:"Previous"}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Tooltip,{content:R,position:"bottom",children:(0,e.createComponentVNode)(2,o.Box,{inline:!0,width:"100px",height:"30px",backgroundColor:R})}),(0,e.createComponentVNode)(2,o.Tooltip,{content:M,position:"bottom",children:(0,e.createComponentVNode)(2,o.Box,{inline:!0,width:"100px",height:"30px",backgroundColor:M})})]})]})}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:!0,fontSize:"15px",lineHeight:"24px",children:(0,e.createComponentVNode)(2,o.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"Hex:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,height:"24px",children:(0,e.createComponentVNode)(2,v,{fluid:!0,color:(0,y.hsvaToHex)(w).substring(1),onChange:function(){function U(j){C.logger.info(j),O((0,y.hexToHsva)(j))}return U}(),prefixed:!0})})]})}),(0,e.createComponentVNode)(2,o.Stack.Divider),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"H:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,N,{hue:w.h,onChange:P})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,h,{value:w.h,callback:function(){function U(j,W){return P({h:W})}return U}(),max:360,unit:"\xB0"})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"S:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,x,{color:w,onChange:P})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,h,{value:w.s,callback:function(){function U(j,W){return P({s:W})}return U}(),unit:"%"})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"V:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,B,{color:w,onChange:P})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,h,{value:w.v,callback:function(){function U(j,W){return P({v:W})}return U}(),unit:"%"})})]})}),(0,e.createComponentVNode)(2,o.Stack.Divider),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"R:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,L,{color:w,onChange:P,target:"r"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,h,{value:F.r,callback:function(){function U(j,W){F.r=W,P((0,y.rgbaToHsva)(F))}return U}(),max:255})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"G:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,L,{color:w,onChange:P,target:"g"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,h,{value:F.g,callback:function(){function U(j,W){F.g=W,P((0,y.rgbaToHsva)(F))}return U}(),max:255})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"B:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,L,{color:w,onChange:P,target:"b"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,h,{value:F.b,callback:function(){function U(j,W){F.b=W,P((0,y.rgbaToHsva)(F))}return U}(),max:255})})]})})]})})]})}return T}(),h=function(A){var E=A.value,w=A.callback,O=A.min,M=O===void 0?0:O,P=A.max,F=P===void 0?100:P,R=A.unit;return(0,e.createComponentVNode)(2,o.NumberInput,{width:"70px",value:Math.round(E),step:1,minValue:M,maxValue:F,onChange:w,unit:R})},V=function(A){return"#"+A},v=r.HexColorInput=function(){function T(A){var E=A.prefixed,w=A.alpha,O=A.color,M=A.fluid,P=A.onChange,F=d(A,u),R=function(){function j(W){return W.replace(/([^0-9A-F]+)/gi,"").substring(0,w?8:6)}return j}(),U=function(){function j(W){return(0,y.validHex)(W,w)}return j}();return(0,e.normalizeProps)((0,e.createComponentVNode)(2,s,Object.assign({},F,{fluid:M,color:O,onChange:P,escape:R,format:E?V:void 0,validate:U})))}return T}(),s=r.ColorInput=function(T){function A(w){var O;return O=T.call(this)||this,O.props=void 0,O.state=void 0,O.handleInput=function(M){var P=O.props.escape(M.currentTarget.value);O.setState({localValue:P})},O.handleBlur=function(M){M.currentTarget&&(O.props.validate(M.currentTarget.value)?O.props.onChange(O.props.escape?O.props.escape(M.currentTarget.value):M.currentTarget.value):O.setState({localValue:O.props.escape(O.props.color)}))},O.props=w,O.state={localValue:O.props.escape(O.props.color)},O}f(A,T);var E=A.prototype;return E.componentDidUpdate=function(){function w(O,M){O.color!==this.props.color&&this.setState({localValue:this.props.escape(this.props.color)})}return w}(),E.render=function(){function w(){return(0,e.createComponentVNode)(2,o.Box,{className:(0,b.classes)(["Input",this.props.fluid&&"Input--fluid"]),children:[(0,e.createVNode)(1,"div","Input__baseline",".",16),(0,e.createVNode)(64,"input","Input__input",null,1,{value:this.props.format?this.props.format(this.state.localValue):this.state.localValue,spellCheck:"false",onInput:this.handleInput,onBlur:this.handleBlur})]})}return w}(),A}(e.Component),g=function(A){var E=A.hsva,w=A.onChange,O=function(R){w({s:R.left*100,v:100-R.top*100})},M=function(R){w({s:(0,k.clamp)(E.s+R.left*100,0,100),v:(0,k.clamp)(E.v-R.top*100,0,100)})},P={"background-color":(0,y.hsvaToHslString)({h:E.h,s:100,v:100,a:1})+" !important"};return(0,e.createVNode)(1,"div","react-colorful__saturation_value",(0,e.createComponentVNode)(2,S.Interactive,{onMove:O,onKey:M,"aria-label":"Color","aria-valuetext":"Saturation "+Math.round(E.s)+"%, Brightness "+Math.round(E.v)+"%",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__saturation_value-pointer",top:1-E.v/100,left:E.s/100,color:(0,y.hsvaToHslString)(E)})}),2,{style:P})},N=function(A){var E=A.className,w=A.hue,O=A.onChange,M=function(U){O({h:360*U.left})},P=function(U){O({h:(0,k.clamp)(w+U.left*360,0,360)})},F=(0,b.classes)(["react-colorful__hue",E]);return(0,e.createVNode)(1,"div",F,(0,e.createComponentVNode)(2,S.Interactive,{onMove:M,onKey:P,"aria-label":"Hue","aria-valuenow":Math.round(w),"aria-valuemax":"360","aria-valuemin":"0",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__hue-pointer",left:w/360,color:(0,y.hsvaToHslString)({h:w,s:100,v:100,a:1})})}),2)},x=function(A){var E=A.className,w=A.color,O=A.onChange,M=function(U){O({s:100*U.left})},P=function(U){O({s:(0,k.clamp)(w.s+U.left*100,0,100)})},F=(0,b.classes)(["react-colorful__saturation",E]);return(0,e.createVNode)(1,"div",F,(0,e.createComponentVNode)(2,S.Interactive,{style:{background:"linear-gradient(to right, "+(0,y.hsvaToHslString)({h:w.h,s:0,v:w.v,a:1})+", "+(0,y.hsvaToHslString)({h:w.h,s:100,v:w.v,a:1})+")"},onMove:M,onKey:P,"aria-label":"Saturation","aria-valuenow":Math.round(w.s),"aria-valuemax":"100","aria-valuemin":"0",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__saturation-pointer",left:w.s/100,color:(0,y.hsvaToHslString)({h:w.h,s:w.s,v:w.v,a:1})})}),2)},B=function(A){var E=A.className,w=A.color,O=A.onChange,M=function(U){O({v:100*U.left})},P=function(U){O({v:(0,k.clamp)(w.v+U.left*100,0,100)})},F=(0,b.classes)(["react-colorful__value",E]);return(0,e.createVNode)(1,"div",F,(0,e.createComponentVNode)(2,S.Interactive,{style:{background:"linear-gradient(to right, "+(0,y.hsvaToHslString)({h:w.h,s:w.s,v:0,a:1})+", "+(0,y.hsvaToHslString)({h:w.h,s:w.s,v:100,a:1})+")"},onMove:M,onKey:P,"aria-label":"Value","aria-valuenow":Math.round(w.s),"aria-valuemax":"100","aria-valuemin":"0",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__value-pointer",left:w.v/100,color:(0,y.hsvaToHslString)({h:w.h,s:w.s,v:w.v,a:1})})}),2)},L=function(A){var E=A.className,w=A.color,O=A.onChange,M=A.target,P=(0,y.hsvaToRgba)(w),F=function($){P[M]=$,O((0,y.rgbaToHsva)(P))},R=function($){F(255*$.left)},U=function($){F((0,k.clamp)(P[M]+$.left*255,0,255))},j=(0,b.classes)(["react-colorful__"+M,E]),W=M==="r"?"rgb("+Math.round(P.r)+",0,0)":M==="g"?"rgb(0,"+Math.round(P.g)+",0)":"rgb(0,0,"+Math.round(P.b)+")";return(0,e.createVNode)(1,"div",j,(0,e.createComponentVNode)(2,S.Interactive,{onMove:R,onKey:U,"aria-valuenow":P[M],"aria-valuemax":"100","aria-valuemin":"0",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__"+M+"-pointer",left:P[M]/255,color:W})}),2)}},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),p={1:function(){function m(){return(0,e.createComponentVNode)(2,b)}return m}(),2:function(){function m(){return(0,e.createComponentVNode)(2,u)}return m}(),3:function(){function m(){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,f)})})}return m}(),4:function(){function m(){return(0,e.createComponentVNode)(2,d)}return m}(),default:function(){function m(){return"\u041E\u0448\u0438\u0431\u043A\u0430. \u041D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u043E\u0435 menu_state. \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0441\u0432\u044F\u0436\u0438\u0442\u0435\u0441\u044C \u0441 \u0422\u0435\u0445\u043D\u0438\u0447\u0435\u0441\u043A\u043E\u0439 \u041F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u043E\u0439 NT."}return m}()},k=function(i){return p[i]},y=r.CommunicationsComputer=function(){function m(i,h){var V=(0,a.useBackend)(h),v=V.act,s=V.data,g=s.menu_state;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:600,title:"\u041A\u043E\u043D\u0441\u043E\u043B\u044C \u0441\u0432\u044F\u0437\u0438",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,S),k(g)()]})})})}return m}(),S=function(i,h){var V=(0,a.useBackend)(h),v=V.act,s=V.data,g=s.authenticated,N=s.noauthbutton,x=s.esc_section,B=s.esc_callable,L=s.esc_recallable,T=s.esc_status,A=s.authhead,E=s.is_ai,w=s.lastCallLoc,O=!1,M;return g?g===1?M="\u041A\u043E\u043C\u0430\u043D\u0434\u043E\u0432\u0430\u043D\u0438\u0435":g===2?M="\u041A\u0430\u043F\u0438\u0442\u0430\u043D":g===3?M="\u041E\u0444\u0438\u0446\u0435\u0440 \u0426\u0435\u043D\u0442\u0440\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u041A\u043E\u043C\u0430\u043D\u0434\u043E\u0432\u0430\u043D\u0438\u044F":g===4?(M="\u0417\u0430\u0449\u0438\u0449\u0451\u043D\u043D\u044B\u0439 \u043A\u0430\u043D\u0430\u043B \u0426\u0435\u043D\u0442\u041A\u043E\u043C\u0430",O=!0):M="\u041E\u0428\u0418\u0411\u041A\u0410: \u0421\u043E\u043E\u0431\u0449\u0438\u0442\u0435 \u043E\u0431 \u044D\u0442\u043E\u043C \u0431\u0430\u0433\u0435!":M="\u0412\u0445\u043E\u0434 \u043D\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D",(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"\u0410\u0443\u0442\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:O&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0414\u043E\u0441\u0442\u0443\u043F",children:M})||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F",children:(0,e.createComponentVNode)(2,t.Button,{icon:g?"sign-out-alt":"id-card",selected:g,disabled:N,content:g?"\u0412\u044B\u0439\u0442\u0438 ("+M+")":"\u0412\u043E\u0439\u0442\u0438",onClick:function(){function P(){return v("auth")}return P}()})})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:!!x&&(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"\u042D\u0432\u0430\u043A\u0443\u0430\u0446\u0438\u043E\u043D\u043D\u044B\u0439 \u0448\u0430\u0442\u0442\u043B",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[!!T&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0421\u0442\u0430\u0442\u0443\u0441",children:T}),!!B&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041E\u043F\u0446\u0438\u0438",children:(0,e.createComponentVNode)(2,t.Button,{icon:"rocket",content:"\u0412\u044B\u0437\u0432\u0430\u0442\u044C \u0448\u0430\u0442\u0442\u043B",disabled:!A,onClick:function(){function P(){return v("callshuttle")}return P}()})}),!!L&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041E\u043F\u0446\u0438\u0438",children:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"\u041E\u0442\u043E\u0437\u0432\u0430\u0442\u044C \u0448\u0430\u0442\u0442\u043B",disabled:!A||E,onClick:function(){function P(){return v("cancelshuttle")}return P}()})}),!!w&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0439 \u0432\u044B\u0437\u043E\u0432/\u043E\u0442\u0437\u044B\u0432 \u0438\u0437",children:w})]})})})],4)},b=function(i,h){var V=(0,a.useBackend)(h),v=V.act,s=V.data,g=s.is_admin;return g?(0,e.createComponentVNode)(2,C):(0,e.createComponentVNode)(2,c)},C=function(i,h){var V=(0,a.useBackend)(h),v=V.act,s=V.data,g=s.is_admin,N=s.gamma_armory_location,x=s.admin_levels,B=s.authenticated,L=s.ert_allowed;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Section,{title:'\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0443\u0440\u043E\u0432\u043D\u044F \u0434\u043E\u0441\u0442\u0443\u043F\u0430 "\u041E\u0444\u0438\u0446\u0435\u0440 \u0426\u0435\u043D\u0442\u0440\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u041A\u043E\u043C\u0430\u043D\u0434\u043E\u0432\u0430\u043D\u0438\u044F"',children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0421\u043C\u0435\u043D\u0438\u0442\u044C \u0443\u0440\u043E\u0432\u0435\u043D\u044C \u0443\u0433\u0440\u043E\u0437\u044B",children:(0,e.createComponentVNode)(2,l,{levels:x,required_access:g,use_confirm:1})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041E\u043F\u043E\u0432\u0435\u0449\u0435\u043D\u0438\u0435",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"bullhorn",content:"\u0421\u0434\u0435\u043B\u0430\u0442\u044C \u043E\u043F\u043E\u0432\u0435\u0449\u0435\u043D\u0438\u0435 \u0426\u041A",disabled:!g,onClick:function(){function T(){return v("send_to_cc_announcement_page")}return T}()}),B===4&&(0,e.createComponentVNode)(2,t.Button,{icon:"plus",content:"\u0421\u0434\u0435\u043B\u0430\u0442\u044C \u0434\u0440\u0443\u0433\u043E\u0435 \u043E\u043F\u043E\u0432\u0435\u0449\u0435\u043D\u0438\u0435",disabled:!g,onClick:function(){function T(){return v("make_other_announcement")}return T}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041E\u0411\u0420",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"ambulance",content:"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u041E\u0411\u0420",disabled:!g,onClick:function(){function T(){return v("dispatch_ert")}return T}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:L,content:L?"\u0412\u044B\u0437\u043E\u0432 \u041E\u0411\u0420 \u0440\u0430\u0437\u0440\u0435\u0448\u0451\u043D":"\u0412\u044B\u0437\u043E\u0432 \u041E\u0411\u0420 \u0437\u0430\u043F\u0440\u0435\u0449\u0451\u043D",tooltip:L?"\u041A\u043E\u043C\u0430\u043D\u0434\u043E\u0432\u0430\u043D\u0438\u0435 \u043C\u043E\u0436\u0435\u0442 \u0437\u0430\u043F\u0440\u043E\u0441\u0438\u0442\u044C \u041E\u0411\u0420":"\u041E\u0411\u0420 \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u0437\u0430\u043F\u0440\u043E\u0448\u0435\u043D",disabled:!g,onClick:function(){function T(){return v("toggle_ert_allowed")}return T}(),selected:null})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u042F\u0434\u0435\u0440\u043D\u0430\u044F \u0431\u043E\u0435\u0433\u043E\u043B\u043E\u0432\u043A\u0430",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"bomb",content:"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u0434\u044B \u0430\u0443\u0442\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u0438",disabled:!g,onClick:function(){function T(){return v("send_nuke_codes")}return T}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:'\u041E\u0440\u0443\u0436\u0435\u0439\u043D\u044B\u0439 \u0448\u0430\u0442\u0442\u043B "\u0413\u0430\u043C\u043C\u0430"',children:(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"biohazard",content:N?'\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043E\u0440\u0443\u0436\u0435\u0439\u043D\u044B\u0439 \u0448\u0430\u0442\u0442\u043B "\u0413\u0430\u043C\u043C\u0430"':'\u041E\u0442\u043E\u0437\u0432\u0430\u0442\u044C \u043E\u0440\u0443\u0436\u0435\u0439\u043D\u044B\u0439 \u0448\u0430\u0442\u0442\u043B "\u0413\u0430\u043C\u043C\u0430"',disabled:!g,onClick:function(){function T(){return v("move_gamma_armory")}return T}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0414\u0440\u0443\u0433\u043E\u0435",children:(0,e.createComponentVNode)(2,t.Button,{icon:"fax",content:"\u0424\u0430\u043A\u0441-\u043C\u0435\u043D\u0435\u0434\u0436\u0435\u0440",disabled:!g,onClick:function(){function T(){return v("view_fax")}return T}()})})]})}),(0,e.createComponentVNode)(2,t.Collapsible,{title:"\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u0434\u0435\u0439\u0441\u0442\u0438\u0439, \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u0434\u043B\u044F \u043A\u043E\u043C\u0430\u043D\u0434\u043E\u0432\u0430\u043D\u0438\u044F",children:(0,e.createComponentVNode)(2,c)})]})},c=function(i,h){var V=(0,a.useBackend)(h),v=V.act,s=V.data,g=s.msg_cooldown,N=s.emagged,x=s.cc_cooldown,B=s.security_level_color,L=s.str_security_level,T=s.levels,A=s.authcapt,E=s.authhead,w=s.messages,O="\u0421\u0434\u0435\u043B\u0430\u0442\u044C \u043F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442\u043D\u043E\u0435 \u043E\u043F\u043E\u0432\u0435\u0449\u0435\u043D\u0438\u0435";g>0&&(O+=" ("+g+"s)");var M=N?"\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 [\u041D\u0415\u0418\u0417\u0412\u0415\u0421\u0422\u041D\u041E]":"\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0426\u041A",P="\u0417\u0430\u043F\u0440\u043E\u0441\u0438\u0442\u044C \u043A\u043E\u0434\u044B \u0430\u0443\u0442\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u0438";return x>0&&(M+=" ("+x+"s)",P+=" ("+x+"s)"),(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:'\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0443\u0440\u043E\u0432\u043D\u044F \u0434\u043E\u0441\u0442\u0443\u043F\u0430 "\u041A\u0430\u043F\u0438\u0442\u0430\u043D"',children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0422\u0435\u043A\u0443\u0449\u0438\u0439 \u0443\u0440\u043E\u0432\u0435\u043D\u044C \u0443\u0433\u0440\u043E\u0437\u044B",color:B,children:L}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0421\u043C\u0435\u043D\u0438\u0442\u044C \u0443\u0440\u043E\u0432\u0435\u043D\u044C \u0443\u0433\u0440\u043E\u0437\u044B",children:(0,e.createComponentVNode)(2,l,{levels:T,required_access:A})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041E\u043F\u043E\u0432\u0435\u0449\u0435\u043D\u0438\u0435",children:(0,e.createComponentVNode)(2,t.Button,{icon:"bullhorn",content:O,disabled:!A||g>0,onClick:function(){function F(){return v("announce")}return F}()})}),!!N&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u0435\u0440\u0435\u0434\u0430\u0447\u0430",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"broadcast-tower",color:"red",content:M,disabled:!A||x>0,onClick:function(){function F(){return v("MessageSyndicate")}return F}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync-alt",content:"\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0440\u0435\u043B\u0435",disabled:!A,onClick:function(){function F(){return v("RestoreBackup")}return F}()})]})||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u0435\u0440\u0435\u0434\u0430\u0447\u0430",children:(0,e.createComponentVNode)(2,t.Button,{icon:"broadcast-tower",content:M,disabled:!A||x>0,onClick:function(){function F(){return v("MessageCentcomm")}return F}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u042F\u0434\u0435\u0440\u043D\u0430\u044F \u0431\u043E\u0435\u0433\u043E\u043B\u043E\u0432\u043A\u0430",children:(0,e.createComponentVNode)(2,t.Button,{icon:"bomb",content:P,disabled:!A||x>0,onClick:function(){function F(){return v("nukerequest")}return F}()})})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:'\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0443\u0440\u043E\u0432\u043D\u044F \u0434\u043E\u0441\u0442\u0443\u043F\u0430 "\u041A\u043E\u043C\u0430\u043D\u0434\u043E\u0432\u0430\u043D\u0438\u0435"',children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0414\u0438\u0441\u043F\u043B\u0435\u0438",children:(0,e.createComponentVNode)(2,t.Button,{icon:"tv",content:"\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435 \u0414\u0438\u0441\u043F\u043B\u0435\u0435\u0432 \u0441\u0442\u0430\u0442\u0443\u0441\u0430",disabled:!E,onClick:function(){function F(){return v("status")}return F}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0412\u0445\u043E\u0434\u044F\u0449\u0438\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F",children:(0,e.createComponentVNode)(2,t.Button,{icon:"folder-open",content:"\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C ("+w.length+")",disabled:!E,onClick:function(){function F(){return v("messagelist")}return F}()})})]})})})],4)},u=function(i,h){var V=(0,a.useBackend)(h),v=V.act,s=V.data,g=s.stat_display,N=s.authhead,x=s.current_message_title,B=g.presets.map(function(T){return(0,e.createComponentVNode)(2,t.Button,{content:T.label,selected:T.name===g.type,disabled:!N,onClick:function(){function A(){return v("setstat",{statdisp:T.id})}return A}()},T.name)}),L=g.alerts.map(function(T){return(0,e.createComponentVNode)(2,t.Button,{content:T.label,selected:T.alert===g.icon,disabled:!N,onClick:function(){function A(){return v("setstat",{statdisp:3,alert:T.alert})}return A}()},T.alert)});return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u044D\u043A\u0440\u0430\u043D\u044B \u0441\u0442\u0430\u0442\u0443\u0441\u0430",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u0432 \u043E\u0441\u043D\u043E\u0432\u043D\u043E\u0435 \u043C\u0435\u043D\u044E",onClick:function(){function T(){return v("main")}return T}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u0440\u0435\u0441\u0435\u0442\u044B",children:B}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041E\u043F\u043E\u0432\u0435\u0449\u0435\u043D\u0438\u044F",children:L}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0421\u0442\u0440\u043E\u043A\u0430 1",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:g.line_1,disabled:!N,onClick:function(){function T(){return v("setmsg1")}return T}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0421\u0442\u0440\u043E\u043A\u0430 2",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:g.line_2,disabled:!N,onClick:function(){function T(){return v("setmsg2")}return T}()})})]})})})},f=function(i,h){var V=(0,a.useBackend)(h),v=V.act,s=V.data,g=s.authhead,N=s.current_message_title,x=s.current_message,B=s.messages,L=s.security_level,T;if(N)T=(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:N,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043A \u0441\u043F\u0438\u0441\u043A\u0443 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439",disabled:!g,onClick:function(){function E(){return v("messagelist")}return E}()}),children:(0,e.createComponentVNode)(2,t.Box,{children:x})})});else{var A=B.map(function(E){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:E.title,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"eye",content:"\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C",disabled:!g||N===E.title,onClick:function(){function w(){return v("messagelist",{msgid:E.id})}return w}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"times",content:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C",disabled:!g,onClick:function(){function w(){return v("delmessage",{msgid:E.id})}return w}()})]},E.id)});T=(0,e.createComponentVNode)(2,t.Section,{title:"\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u0432 \u041E\u0441\u043D\u043E\u0432\u043D\u043E\u0435 \u043C\u0435\u043D\u044E",onClick:function(){function E(){return v("main")}return E}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:A})})}return(0,e.createComponentVNode)(2,t.Box,{children:T})},l=function(i,h){var V=(0,a.useBackend)(h),v=V.act,s=V.data,g=i.levels,N=i.required_access,x=i.use_confirm,B=s.security_level;return x?g.map(function(L){return(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:L.icon,content:L.name,disabled:!N||L.id===B,tooltip:L.tooltip,onClick:function(){function T(){return v("newalertlevel",{level:L.id})}return T}()},L.name)}):g.map(function(L){return(0,e.createComponentVNode)(2,t.Button,{icon:L.icon,content:L.name,disabled:!N||L.id===B,tooltip:L.tooltip,onClick:function(){function T(){return v("newalertlevel",{level:L.id})}return T}()},L.name)})},d=function(i,h){var V=(0,a.useBackend)(h),v=V.act,s=V.data,g=s.is_admin;if(!g)return v("main");var N=(0,a.useLocalState)(h,"subtitle",""),x=N[0],B=N[1],L=(0,a.useLocalState)(h,"text",""),T=L[0],A=L[1],E=(0,a.useLocalState)(h,"classified",0),w=E[0],O=E[1],M=(0,a.useLocalState)(h,"beepsound","Beep"),P=M[0],F=M[1];return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"\u041E\u043F\u043E\u0432\u0435\u0449\u0435\u043D\u0438\u0435 \u0426\u041A",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u0432 \u041E\u0441\u043D\u043E\u0432\u043D\u043E\u0435 \u043C\u0435\u043D\u044E",onClick:function(){function R(){return v("main")}return R}()}),children:[(0,e.createComponentVNode)(2,t.Input,{placeholder:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0442\u0443\u0442.",fluid:!0,value:x,onChange:function(){function R(U,j){return B(j)}return R}(),mb:"5px"}),(0,e.createComponentVNode)(2,t.Input,{placeholder:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0442\u0435\u043A\u0441\u0442 \u043E\u0431\u044A\u044F\u0432\u043B\u0435\u043D\u0438\u044F,\n\u041C\u043D\u043E\u0433\u043E\u0441\u0442\u0440\u043E\u0447\u043D\u044B\u0439 \u0432\u0432\u043E\u0434 \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442\u0441\u044F.",rows:10,fluid:!0,multiline:1,value:T,onChange:function(){function R(U,j){return A(j)}return R}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:w,content:"\u0417\u0430\u0441\u0435\u043A\u0440\u0435\u0447\u0435\u043D\u043E",fluid:!0,m:"5px",tooltip:w?"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043D\u0430 \u043A\u043E\u043D\u0441\u043E\u043B\u0438 \u0441\u0432\u044F\u0437\u0438 \u0441\u0442\u0430\u043D\u0446\u0438\u0438":"\u041F\u0443\u0431\u043B\u0438\u0447\u043D\u043E \u043E\u0431\u044A\u044F\u0432\u0438\u0442\u044C",onClick:function(){function R(){return O(!w)}return R}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"\u0421\u0434\u0435\u043B\u0430\u0442\u044C \u043E\u0431\u044A\u044F\u0432\u043B\u0435\u043D\u0438\u0435",fluid:!0,icon:"paper-plane",center:!0,mt:"5px",textAlign:"center",onClick:function(){function R(){return v("make_cc_announcement",{subtitle:x,text:T,classified:w,beepsound:P})}return R}()})]})})}},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),p=n(73379),k=n(98595);function y(V,v){V.prototype=Object.create(v.prototype),V.prototype.constructor=V,S(V,v)}function S(V,v){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,g){return s.__proto__=g,s},S(V,v)}var b={1:["ACTIVE","good"],2:["COMPLETED","good"],3:["FAILED","bad"]},C=["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"],c=r.Contractor=function(){function V(v,s){var g=(0,t.useBackend)(s),N=g.act,x=g.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,i,{height:"100%",allMessages:["ERROR: UNAUTHORIZED USER"],finishedTimeout:100,onFinished:function(){function E(){}return E}()})}):x.load_animation_completed?B=(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Flex.Item,{basis:"content",children:(0,e.createComponentVNode)(2,u)}),(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,l,{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,i,{height:"100%",allMessages:C,finishedTimeout:3e3,onFinished:function(){function E(){return N("complete_load_animation")}return E}()})});var L=(0,t.useLocalState)(s,"viewingPhoto",""),T=L[0],A=L[1];return(0,e.createComponentVNode)(2,k.Window,{width:500,height:600,theme:"syndicate",children:[T&&(0,e.createComponentVNode)(2,h),(0,e.createComponentVNode)(2,k.Window.Content,{className:"Contractor",children:(0,e.createComponentVNode)(2,o.Flex,{direction:"column",height:"100%",children:B})})]})}return V}(),u=function(v,s){var g=(0,t.useBackend)(s),N=g.act,x=g.data,B=x.tc_available,L=x.tc_paid_out,T=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"]})},v,{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 E(){return N("claim")}return E}()})]})}),(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:T})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Contractor Status",verticalAlign:"middle",children:"ACTIVE"})]})})]})})))},f=function(v,s){var g=(0,t.useBackend)(s),N=g.act,x=g.data,B=x.page;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Tabs,Object.assign({},v,{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"]})]})))},l=function(v,s){var g=(0,t.useBackend)(s),N=g.act,x=g.data,B=x.contracts,L=x.contract_active,T=x.can_extract,A=!!L&&B.filter(function(P){return P.status===1})[0],E=A&&A.time_left>0,w=(0,t.useLocalState)(s,"viewingPhoto",""),O=w[0],M=w[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:!T||E,icon:"parachute-box",content:["Call Extraction",E&&(0,e.createComponentVNode)(2,p.Countdown,{timeLeft:A.time_left,format:function(){function P(F,R){return" ("+R.substr(3)+")"}return P}()})],onClick:function(){function P(){return N("extract")}return P}()})},v,{children:B.slice().sort(function(P,F){return P.status===1?-1:F.status===1?1:P.status-F.status}).map(function(P){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:P.status===1&&"good",children:P.target_name}),(0,e.createComponentVNode)(2,o.Flex.Item,{basis:"content",children:P.has_photo&&(0,e.createComponentVNode)(2,o.Button,{icon:"camera",mb:"-0.5rem",ml:"0.5rem",onClick:function(){function R(){return M("target_photo_"+P.uid+".png")}return R}()})})]}),className:"Contractor__Contract",buttons:(0,e.createComponentVNode)(2,o.Box,{width:"100%",children:[!!b[P.status]&&(0,e.createComponentVNode)(2,o.Box,{color:b[P.status][1],display:"inline-block",mt:P.status!==1&&"0.125rem",mr:"0.25rem",lineHeight:"20px",children:b[P.status][0]}),P.status===1&&(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"ban",color:"bad",content:"Abort",ml:"0.5rem",onClick:function(){function R(){return N("abort")}return R}()})]}),children:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"2",mr:"0.5rem",children:[P.fluff_message,!!P.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 ",P.completed_time]}),!!P.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."]}),!!P.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: ",P.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",d(P)]}),(F=P.difficulties)==null?void 0:F.map(function(R,U){return(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:!!L,content:R.name+" ("+R.reward+" TC)",onClick:function(){function j(){return N("activate",{uid:P.uid,difficulty:U+1})}return j}()},U)}),!!P.objective&&(0,e.createComponentVNode)(2,o.Box,{color:"white",bold:!0,children:[P.objective.extraction_name,(0,e.createVNode)(1,"br"),"(",(P.objective.rewards.tc||0)+" TC",",\xA0",(P.objective.rewards.credits||0)+" Credits",")"]})]})]})},P.uid)})})))},d=function(v){if(!(!v.objective||v.status>1)){var s=v.objective.locs.user_area_id,g=v.objective.locs.user_coords,N=v.objective.locs.target_area_id,x=v.objective.locs.target_coords,B=s===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]-g[1],x[0]-g[0])),lineHeight:B?null:"0.85",size:"1.5"})})}},m=function(v,s){var g=(0,t.useBackend)(s),N=g.act,x=g.data,B=x.rep,L=x.buyables;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Available Purchases",overflow:"auto"},v,{children:L.map(function(T){return(0,e.createComponentVNode)(2,o.Section,{title:T.name,buttons:T.refundable&&(0,e.createComponentVNode)(2,o.Button.Confirm,{content:"Refund ("+T.cost+" Rep)",onClick:function(){function A(){return N("refund",{uid:T.uid})}return A}()}),children:[T.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:T.stock===0?"bad":"good",ml:"0.5rem",children:[T.stock," in stock"]})]},T.uid)})})))},i=function(V){function v(g){var N;return N=V.call(this,g)||this,N.timer=null,N.state={currentIndex:0,currentDisplay:[]},N}y(v,V);var s=v.prototype;return s.tick=function(){function g(){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 g}(),s.componentDidMount=function(){function g(){var N=this,x=this.props.linesPerSecond,B=x===void 0?2.5:x;this.timer=setInterval(function(){return N.tick()},1e3/B)}return g}(),s.componentWillUnmount=function(){function g(){clearTimeout(this.timer)}return g}(),s.render=function(){function g(){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 g}(),v}(e.Component),h=function(v,s){var g=(0,t.useLocalState)(s,"viewingPhoto",""),N=g[0],x=g[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),p=r.ConveyorSwitch=function(){function k(y,S){var b=(0,a.useBackend)(S),C=b.act,c=b.data,u=c.slowFactor,f=c.minSpeed,l=c.maxSpeed,d=c.oneWay,m=c.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:!d,onClick:function(){function i(){return C("toggleOneWay")}return i}()})}),(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 i(){return C("slowFactor",{value:u-.5})}return i}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-left",onClick:function(){function i(){return C("slowFactor",{value:u-.1})}return i}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Slider,{width:"100px",mx:"1px",value:u,fillValue:u,minValue:f,maxValue:l,step:.1,format:function(){function i(h){return h+"s."}return i}(),onChange:function(){function i(h,V){return C("slowFactor",{value:V})}return i}()})}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-right",onClick:function(){function i(){return C("slowFactor",{value:u+.1})}return i}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-right",onClick:function(){function i(){return C("slowFactor",{value:u+.5})}return i}()})," "]})]})})]})})})})}return k}()},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),p=n(36036),k=n(36352),y=n(76910),S=n(98595),b=function(h,V){return h.dead?"\u041C\u0451\u0440\u0442\u0432":parseInt(h.health,10)<=V?"\u041A\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435":parseInt(h.stat,10)===1?"\u0411\u0435\u0437 \u0441\u043E\u0437\u043D\u0430\u043D\u0438\u044F":"\u0416\u0438\u0432"},C=function(h,V){return h.dead?"red":parseInt(h.health,10)<=V?"orange":parseInt(h.stat,10)===1?"blue":"green"},c=r.CrewMonitor=function(){function i(h,V){var v=(0,o.useBackend)(V),s=v.act,g=v.data,N=(0,o.useLocalState)(V,"tabIndex",g.IndexToggler),x=N[0],B=N[1],L=function(){function T(A){switch(A){case 0:return(0,e.createComponentVNode)(2,l);case 1:return(0,e.createComponentVNode)(2,d);case 2:return(0,e.createComponentVNode)(2,f);case 3:return(0,e.createComponentVNode)(2,m);default:return"\u0427\u0422\u041E-\u0422\u041E \u0422\u041E\u0427\u041D\u041E \u041D\u0415 \u0422\u0410\u041A!"}}return T}();return(0,e.createComponentVNode)(2,S.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,S.Window.Content,{children:(0,e.createComponentVNode)(2,p.Box,{fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,p.Tabs,{children:[g.isBS?(0,e.createComponentVNode)(2,p.Tabs.Tab,{selected:x===0,onClick:function(){function T(){return B(0)}return T}(),children:[(0,e.createComponentVNode)(2,p.Icon,{name:"table"})," \u0414\u0430\u043D\u043D\u044B\u0435 \u043E \u041A\u043E\u043C\u0430\u043D\u0434\u043E\u0432\u0430\u043D\u0438\u0438"]},"ComDataView"):null,g.isBP?(0,e.createComponentVNode)(2,p.Tabs.Tab,{selected:x===1,onClick:function(){function T(){return B(1)}return T}(),children:[(0,e.createComponentVNode)(2,p.Icon,{name:"table"})," \u0414\u0430\u043D\u043D\u044B\u0435 \u043E \u0421\u043B\u0443\u0436\u0431\u0435 \u0411\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u043E\u0441\u0442\u0438"]},"SecDataView"):null,(0,e.createComponentVNode)(2,p.Tabs.Tab,{selected:x===2,onClick:function(){function T(){return B(2)}return T}(),children:[(0,e.createComponentVNode)(2,p.Icon,{name:"table"})," \u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0431 \u042D\u043A\u0438\u043F\u0430\u0436\u0435"]},"DataView"),(0,e.createComponentVNode)(2,p.Tabs.Tab,{selected:x===3,onClick:function(){function T(){return B(3)}return T}(),children:[(0,e.createComponentVNode)(2,p.Icon,{name:"map-marked-alt"})," \u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u041A\u0430\u0440\u0442\u044B"]},"MapView")]}),L(x)]})})})}return i}(),u=function(h){var V=h.crewData,v=h.context,s=(0,o.useBackend)(v),g=s.act,N=s.data,x=(0,a.sortBy)(function(E){return E.name})(V||[]),B=(0,o.useLocalState)(v,"search",""),L=B[0],T=B[1],A=(0,t.createSearch)(L,function(E){return E.name+"|"+E.assignment+"|"+E.area});return(0,e.createComponentVNode)(2,p.Box,{children:[(0,e.createComponentVNode)(2,p.Input,{placeholder:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0418\u043C\u044F, \u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C \u0438\u043B\u0438 \u041B\u043E\u043A\u0430\u0446\u0438\u044E...",width:"100%",onInput:function(){function E(w,O){return T(O)}return E}()}),(0,e.createComponentVNode)(2,p.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,p.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,p.Table.Cell,{children:"\u0418\u043C\u044F"}),(0,e.createComponentVNode)(2,p.Table.Cell,{children:"\u0421\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435"}),(0,e.createComponentVNode)(2,p.Table.Cell,{children:"\u041B\u043E\u043A\u0430\u0446\u0438\u044F"})]}),x.filter(A).map(function(E){return(0,e.createComponentVNode)(2,p.Table.Row,{bold:!!E.is_command,children:[(0,e.createComponentVNode)(2,k.TableCell,{children:[E.name," (",E.assignment,")"]}),(0,e.createComponentVNode)(2,k.TableCell,{children:[(0,e.createComponentVNode)(2,p.Box,{inline:!0,color:C(E,N.critThreshold),children:b(E,N.critThreshold)}),E.sensor_type>=2?(0,e.createComponentVNode)(2,p.Box,{inline:!0,children:["(",(0,e.createComponentVNode)(2,p.Box,{inline:!0,color:y.COLORS.damageType.oxy,children:E.oxy}),"|",(0,e.createComponentVNode)(2,p.Box,{inline:!0,color:y.COLORS.damageType.toxin,children:E.tox}),"|",(0,e.createComponentVNode)(2,p.Box,{inline:!0,color:y.COLORS.damageType.burn,children:E.fire}),"|",(0,e.createComponentVNode)(2,p.Box,{inline:!0,color:y.COLORS.damageType.brute,children:E.brute}),")"]}):null]}),(0,e.createComponentVNode)(2,k.TableCell,{children:E.sensor_type===3?N.isAI?(0,e.createComponentVNode)(2,p.Button,{fluid:!0,icon:"location-arrow",content:E.area+" ("+E.x+", "+E.y+")",onClick:function(){function w(){return g("track",{track:E.ref})}return w}()}):E.area+" ("+E.x+", "+E.y+")":"\u041D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E"})]},E.ref)})]})]})},f=function(h,V){var v=(0,o.useBackend)(V),s=v.act,g=v.data,N=g.crewmembers||[];return(0,e.createComponentVNode)(2,u,{crewData:N,context:V})},l=function(h,V){var v=(0,o.useBackend)(V),s=v.act,g=v.data,N=g.crewmembers.filter(function(x){return x.is_command})||[];return(0,e.createComponentVNode)(2,u,{crewData:N,context:V})},d=function(h,V){var v=(0,o.useBackend)(V),s=v.act,g=v.data,N=g.crewmembers.filter(function(x){return x.is_security})||[];return(0,e.createComponentVNode)(2,u,{crewData:N,context:V})},m=function(h,V){var v=(0,o.useBackend)(V),s=v.act,g=v.data,N=g.stationLevelNum,x=g.stationLevelName,B=(0,o.useLocalState)(V,"zoom",1),L=B[0],T=B[1],A=(0,o.useLocalState)(V,"z_current",N[0]),E=A[0],w=A[1],O=function(R){return R.is_command&&g.isBS||R.is_security&&g.isBP?"square":"circle"},M=function(R){return R.is_command&&g.isBS||R.is_security&&g.isBP?10:6},P=function(R,U){return R.is_command&&g.isBS||R.is_security&&g.isBP?R.dead?"red":parseInt(R.health,10)<=U?"orange":parseInt(R.stat,10)===1?"blue":"violet":C(R,U)};return(0,e.createComponentVNode)(2,p.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,e.createComponentVNode)(2,p.NanoMap,{onZoom:function(){function F(R){return T(R)}return F}(),zLevels:N,zNames:x,z_current:E,setZCurrent:w,children:g.crewmembers.filter(function(F){return F.sensor_type===3}).map(function(F){return(0,e.createComponentVNode)(2,p.NanoMap.Marker,{x:F.x,y:F.y,z:F.z,z_current:E,zoom:L,icon:O(F),size:M(F),tooltip:F.name+" ("+F.assignment+")",color:P(F,g.critThreshold),onClick:function(){function R(){g.isAI&&s("track",{track:F.ref})}return R}()},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),p=n(98595),k=[{label:"\u0423\u0434\u0443\u0448\u0435\u043D\u0438\u0435",type:"oxyLoss"},{label:"\u0422\u043E\u043A\u0441\u0438\u043D\u044B",type:"toxLoss"},{label:"\u0424\u0438\u0437\u0438\u0447\u0435\u0441\u043A\u0438\u0435 \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u044F",type:"bruteLoss"},{label:"\u041E\u0436\u043E\u0433\u0438",type:"fireLoss"}],y=[["good","\u0412 \u0441\u043E\u0437\u043D\u0430\u043D\u0438\u0438"],["average","\u0411\u0435\u0437 \u0441\u043E\u0437\u043D\u0430\u043D\u0438\u044F"],["bad","\u0421\u043C\u0435\u0440\u0442\u044C"]],S=r.Cryo=function(){function c(u,f){return(0,e.createComponentVNode)(2,p.Window,{width:520,height:490,children:(0,e.createComponentVNode)(2,p.Window.Content,{children:(0,e.createComponentVNode)(2,b)})})}return c}(),b=function(u,f){var l=(0,t.useBackend)(f),d=l.act,m=l.data,i=m.isOperating,h=m.hasOccupant,V=m.occupant,v=V===void 0?[]:V,s=m.cellTemperature,g=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 d("ejectOccupant")}return L}(),disabled:!h,children:"\u0418\u0437\u0432\u043B\u0435\u0447\u044C"}),children:h?(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u041F\u0430\u0446\u0438\u0435\u043D\u0442",children:v.name||"\u0418\u043C\u044F \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u043E"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u041E\u0446\u0435\u043D\u043A\u0430 \u0437\u0434\u043E\u0440\u043E\u0432\u044C\u044F",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:v.health,max:v.maxHealth,value:v.health/v.maxHealth,color:v.health>0?"good":"average",children:(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:Math.round(v.health)})})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0421\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435",color:y[v.stat][0],children:y[v.stat][1]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0422\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u0442\u0435\u043B\u0430",children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:Math.round(v.bodyTemperature)})," ","K"]}),(0,e.createComponentVNode)(2,o.LabeledList.Divider),k.map(function(L){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:L.label,children:(0,e.createComponentVNode)(2,o.ProgressBar,{value:v[L.type]/100,ranges:{bad:[.01,1/0]},children:(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:Math.round(v[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 d("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 d(i?"switchOff":"switchOn")}return L}(),selected:i,children:i?"\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:g,children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:s})," K"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0401\u043C\u043A\u043E\u0441\u0442\u044C",children:(0,e.createComponentVNode)(2,C)}),(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 d(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 d(B?"auto_eject_dead_off":"auto_eject_dead_on")}return L}(),children:B?"\u0412\u043A\u043B":"\u0412\u044B\u043A\u043B"})})]})})})]})},C=function(u,f){var l=(0,t.useBackend)(f),d=l.act,m=l.data,i=m.isBeakerLoaded,h=m.beakerLabel,V=m.beakerVolume;return i?(0,e.createFragment)([h?"\xAB"+h+"\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:!V&&"bad",children:V?(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:V,format:function(){function v(s){var g=Math.round(s),N=(0,a.declensionRu)(g,"\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)(g,"\u0435\u0434\u0438\u043D\u0438\u0446\u0430","\u0435\u0434\u0438\u043D\u0438\u0446\u044B","\u0435\u0434\u0438\u043D\u0438\u0446");return N+" "+g+" "+x}return v}()}):"\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),p=n(25328),k=r.CryopodConsole=function(){function b(C,c){var u=(0,a.useBackend)(c),f=u.data,l=f.account_name,d=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, "+(l||"[REDACTED]")+"!",children:"This automated cryogenic freezing unit will safely store your corporeal form until your next assignment."}),(0,e.createComponentVNode)(2,y),!!d&&(0,e.createComponentVNode)(2,S)]})})}return b}(),y=function(C,c){var u=(0,a.useBackend)(c),f=u.data,l=f.frozen_crew;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Stored Crew",children:l.length?(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:l.map(function(d,m){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.name,children:d.rank},m)})})}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No stored crew!"})})},S=function(C,c){var u=(0,a.useBackend)(c),f=u.act,l=u.data,d=l.frozen_items,m=function(h){var V=h.toString();return V.startsWith("the ")&&(V=V.slice(4,V.length)),(0,p.toTitleCase)(V)};return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Stored Items",children:d.length?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:d.map(function(i){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:m(i.name),buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",content:"Drop",mr:1,onClick:function(){function h(){return f("one_item",{item:i.uid})}return h}()})},i)})})}),(0,e.createComponentVNode)(2,t.Button,{content:"Drop All Items",color:"red",onClick:function(){function i(){return f("all_items")}return i}()})],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),p=n(98595),k=function(b,C){var c=(0,t.useBackend)(C),u=c.act,f=c.data,l=b.product,d=f.user,m=f.userMoney,i=f.vend_ready,h=l.price===0,V="ERROR!",v="";h?(V="FREE",v="arrow-circle-down"):(V=l.price,v="shopping-cart");var s=!i||l.stock===0||!h&&l.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,"+l.icon,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,e.createComponentVNode)(2,o.Table.Cell,{bold:!0,children:l.name}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,o.Box,{color:l.stock<=0&&"bad"||"good",children:[l.stock," in stock"]})}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,disabled:s,icon:v,content:V,textAlign:"left",onClick:function(){function g(){return u("vend",{Key:l.Key})}return g}()})})]})},y=r.Customat=function(){function S(b,C){var c=(0,t.useBackend)(C),u=c.act,f=c.data,l=f.guestNotice,d=f.userMoney,m=f.user,i=f.products,h=f.vend_ready,V=f.panel_open,v=f.speaker;return(0,e.createComponentVNode)(2,p.Window,{width:470,height:600,title:"Customat",children:(0,e.createComponentVNode)(2,p.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,[d,(0,e.createTextVNode)(" credits")],0),"."]})||(0,e.createComponentVNode)(2,o.Box,{color:"light-grey",children:l})}),!!V&&(0,e.createComponentVNode)(2,o.Section,{title:"Maintenance",children:(0,e.createComponentVNode)(2,o.Button,{icon:v?"check":"volume-mute",selected:v,content:"Speaker",textAlign:"left",onClick:function(){function s(){return u("toggle_voice",{})}return s}()})})]}),(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:i.map(function(s){return(0,e.createComponentVNode)(2,k,{product:s,productStock:s.stock},s.name)})})})})]})})})}return S}()},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),p=n(3939),k=[["good","\u041D\u043E\u0440\u043C\u0430"],["average","\u041A\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435"],["bad","\u0417\u0430\u0444\u0438\u043A\u0441\u0438\u0440\u043E\u0432\u0430\u043D\u0430 \u0441\u043C\u0435\u0440\u0442\u044C"]],y=[["ui","\u041C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F \u0423\u0418","dna"],["se","\u041C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F \u0421\u0424","dna"],["buffer","\u0411\u0443\u0444\u0435\u0440 \u0434\u0430\u043D\u043D\u044B\u0445","syringe"],["rejuvenators","\u0425\u0438\u043C\u0438\u043A\u0430\u0442\u044B","flask"]],S=[5,10,20,30,50],b=r.DNAModifier=function(){function s(g,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,T=L.irradiating,A=L.dnaBlockSize,E=L.occupant;N.dnaBlockSize=A,N.isDNAInvalid=!E.isViableSubject||!E.uniqueIdentity||!E.structuralEnzymes;var w;return T&&(w=(0,e.createComponentVNode)(2,V,{duration:T})),(0,e.createComponentVNode)(2,o.Window,{width:660,height:775,children:[(0,e.createComponentVNode)(2,p.ComplexModal),w,(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,C)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,c)})]})})]})}return s}(),C=function(g,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,T=L.locked,A=L.hasOccupant,E=L.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"\u0421\u0443\u0431\u044A\u0435\u043A\u0442",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{color:"label",inline:!0,mr:"0.5rem",children:"\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u044B\u0439 \u0437\u0430\u043C\u043E\u043A:"}),(0,e.createComponentVNode)(2,t.Button,{disabled:!A,selected:T,icon:T?"toggle-on":"toggle-off",content:T?"\u0412\u043A\u043B\u044E\u0447\u0451\u043D":"\u0412\u044B\u043A\u043B\u044E\u0447\u0435\u043D",onClick:function(){function w(){return B("toggleLock")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!A||T,icon:"user-slash",content:"\u0418\u0437\u0432\u043B\u0435\u0447\u044C \u0441\u0443\u0431\u044A\u0435\u043A\u0442",onClick:function(){function w(){return B("ejectOccupant")}return w}()})],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:"\u0418\u043C\u044F",children:E.name}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041E\u0446\u0435\u043D\u043A\u0430 \u0437\u0434\u043E\u0440\u043E\u0432\u044C\u044F",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:E.minHealth,max:E.maxHealth,value:E.health/E.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0421\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435",color:k[E.stat][0],children:k[E.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 \u041D\u0435\u043F\u043E\u0434\u0445\u043E\u0434\u044F\u0449\u0438\u0439 \u0441\u0443\u0431\u044A\u0435\u043A\u0442. \u041F\u0440\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u0435 \u043C\u0430\u043D\u0438\u043F\u0443\u043B\u044F\u0446\u0438\u0439 \u0441\u043E \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u043E\u0439 \u0414\u041D\u041A \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E."]}):(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0420\u0430\u0434\u0438\u0430\u0446\u0438\u043E\u043D\u043D\u043E\u0435 \u043F\u043E\u0440\u0430\u0436\u0435\u043D\u0438\u0435",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:"0",max:"100",value:E.radiationLevel/100,color:"average"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0423\u043D\u0438\u043A\u0430\u043B\u044C\u043D\u044B\u0435 \u0424\u0435\u0440\u043C\u0435\u043D\u0442\u044B",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 \u041D/\u0414"]})})]})],0):(0,e.createComponentVNode)(2,t.Box,{color:"label",children:"\u041A\u0430\u043F\u0441\u0443\u043B\u0430 \u0414\u041D\u041A-\u043C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440\u0430 \u043F\u0443\u0441\u0442\u0430."})})},c=function(g,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,T=L.selectedMenuKey,A=L.hasOccupant,E=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"),"\u041C\u0430\u043D\u0438\u043F\u0443\u043B\u044F\u0446\u0438\u0438 \u0441\u043E \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u043E\u0439 \u0414\u041D\u041A \u0441\u0443\u0431\u044A\u0435\u043A\u0442\u0430 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u044B."]})})})}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"),"\u041A\u0430\u043F\u0441\u0443\u043B\u0430 \u0414\u041D\u041A-\u043C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440\u0430 \u043F\u0443\u0441\u0442\u0430."]})})});var w;return T==="ui"?w=(0,e.createFragment)([(0,e.createComponentVNode)(2,u),(0,e.createComponentVNode)(2,l)],4):T==="se"?w=(0,e.createFragment)([(0,e.createComponentVNode)(2,f),(0,e.createComponentVNode)(2,l)],4):T==="buffer"?w=(0,e.createComponentVNode)(2,d):T==="rejuvenators"&&(w=(0,e.createComponentVNode)(2,h)),(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Tabs,{children:y.map(function(O,M){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:O[2],selected:T===O[0],onClick:function(){function P(){return B("selectMenuKey",{key:O[0]})}return P}(),children:O[1]},M)})}),w]})},u=function(g,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,T=L.selectedUIBlock,A=L.selectedUISubBlock,E=L.selectedUITarget,w=L.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"\u041C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F \u0423\u043D\u0438\u043A\u0430\u043B\u044C\u043D\u044B\u0445 \u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440\u043E\u0432",children:[(0,e.createComponentVNode)(2,v,{dnaString:w.uniqueIdentity,selectedBlock:T,selectedSubblock:A,blockSize:N.dnaBlockSize,action:"selectUIBlock"}),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u0431\u043B\u043E\u043A",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:15,stepPixelSize:"20",value:E,format:function(){function O(M){return M.toString(16).toUpperCase()}return O}(),ml:"0",onChange:function(){function O(M,P){return B("changeUITarget",{value:P})}return O}()})})}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"\u041E\u0431\u043B\u0443\u0447\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u0431\u043B\u043E\u043A",mt:"0.5rem",onClick:function(){function O(){return B("pulseUIRadiation")}return O}()})]})},f=function(g,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,T=L.selectedSEBlock,A=L.selectedSESubBlock,E=L.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"\u041C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F \u0421\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u043D\u044B\u0445 \u0424\u0435\u0440\u043C\u0435\u043D\u0442\u043E\u0432",children:[(0,e.createComponentVNode)(2,v,{dnaString:E.structuralEnzymes,selectedBlock:T,selectedSubblock:A,blockSize:N.dnaBlockSize,action:"selectSEBlock"}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"\u041E\u0431\u043B\u0443\u0447\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u0431\u043B\u043E\u043A",onClick:function(){function w(){return B("pulseSERadiation")}return w}()})]})},l=function(g,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,T=L.radiationIntensity,A=L.radiationDuration;return(0,e.createComponentVNode)(2,t.Section,{title:"\u0418\u0437\u043B\u0443\u0447\u0430\u0442\u0435\u043B\u044C \u0440\u0430\u0434\u0438\u0430\u0446\u0438\u0438",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041C\u043E\u0449\u043D\u043E\u0441\u0442\u044C",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:10,stepPixelSize:20,value:T,popUpPosition:"right",ml:"0",onChange:function(){function E(w,O){return B("radiationIntensity",{value:O})}return E}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0414\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:20,stepPixelSize:10,unit:"s",value:A,popUpPosition:"right",ml:"0",onChange:function(){function E(w,O){return B("radiationDuration",{value:O})}return E}()})})]}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"\u041E\u0431\u043B\u0443\u0447\u0438\u0442\u044C \u0440\u0430\u0434\u0438\u0430\u0446\u0438\u0435\u0439",tooltip:"\u041C\u0443\u0442\u0438\u0440\u0443\u0435\u0442 \u0441\u043B\u0443\u0447\u0430\u0439\u043D\u044B\u0439 \u0431\u043B\u043E\u043A, \u0423\u0418 \u0438\u043B\u0438 \u0421\u0424 \u0441\u0443\u0431\u044A\u0435\u043A\u0442\u0430.",tooltipPosition:"top-start",mt:"0.5rem",onClick:function(){function E(){return B("pulseRadiation")}return E}()})]})},d=function(g,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,T=L.buffers,A=T.map(function(E,w){return(0,e.createComponentVNode)(2,m,{id:w+1,name:"\u042F\u0447\u0435\u0439\u043A\u0430 \u0431\u0443\u0444\u0435\u0440\u0430 \u2116"+(w+1),buffer:E},w)});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:"\u0411\u0443\u0444\u0435\u0440",children:A})}),(0,e.createComponentVNode)(2,t.Stack.Item,{height:"25%",children:(0,e.createComponentVNode)(2,i)})]})},m=function(g,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,T=g.id,A=g.name,E=g.buffer,w=L.isInjectorReady,O=A+(E.data?" - "+E.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:!E.data,icon:"trash",content:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",onClick:function(){function M(){return B("bufferOption",{option:"clear",id:T})}return M}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!E.data,icon:"pen",content:"\u041F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u0442\u044C",onClick:function(){function M(){return B("bufferOption",{option:"changeLabel",id:T})}return M}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!E.data||!L.hasDisk,icon:"save",content:"\u042D\u043A\u0441\u043F\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C",tooltip:"\u042D\u043A\u0441\u043F\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u0443\u044E \u044F\u0447\u0435\u0439\u043A\u0443 \u0431\u0443\u0444\u0435\u0440\u0430 \u043D\u0430 \u0434\u0438\u0441\u043A\u0435\u0442\u0443.",tooltipPosition:"bottom-start",onClick:function(){function M(){return B("bufferOption",{option:"saveDisk",id:T})}return M}()})],4),children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0417\u0430\u043F\u0438\u0441\u0430\u0442\u044C \u0432 \u0431\u0443\u0444\u0435\u0440",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"\u0423\u0418 \u0441\u0443\u0431\u044A\u0435\u043A\u0442\u0430",mb:"0",onClick:function(){function M(){return B("bufferOption",{option:"saveUI",id:T})}return M}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"\u0423\u0418 \u0438 \u0423\u0424 \u0441\u0443\u0431\u044A\u0435\u0442\u0430",mb:"0",onClick:function(){function M(){return B("bufferOption",{option:"saveUIAndUE",id:T})}return M}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"\u0421\u0424 \u0441\u0443\u0431\u044A\u0435\u043A\u0442\u0430",mb:"0",onClick:function(){function M(){return B("bufferOption",{option:"saveSE",id:T})}return M}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!L.hasDisk||!L.disk.data,icon:"arrow-circle-down",content:"\u0421 \u0434\u0438\u0441\u043A\u0435\u0442\u044B",mb:"0",onClick:function(){function M(){return B("bufferOption",{option:"loadDisk",id:T})}return M}()})]}),!!E.data&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0421\u0443\u0431\u044A\u0435\u043A\u0442",children:E.owner||(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"\u041D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u043E"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0422\u0438\u043F \u0434\u0430\u043D\u043D\u044B\u0445",children:[E.type==="ui"?"\u0423\u043D\u0438\u043A\u0430\u043B\u044C\u043D\u044B\u0435 \u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440\u044B":"\u0421\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u043D\u044B\u0435 \u0424\u0435\u0440\u043C\u0435\u043D\u0442\u044B",!!E.ue&&" \u0438 \u0423\u043D\u0438\u043A\u0430\u043B\u044C\u043D\u044B\u0435 \u0424\u0435\u0440\u043C\u0435\u043D\u0442\u044B"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0434\u0430\u043D\u043D\u044B\u0445",children:[(0,e.createComponentVNode)(2,t.Button,{disabled:!w,icon:w?"syringe":"spinner",iconSpin:!w,content:"\u0418\u043D\u044A\u0435\u043A\u0442\u043E\u0440",mb:"0",onClick:function(){function M(){return B("bufferOption",{option:"createInjector",id:T})}return M}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!w,icon:w?"syringe":"spinner",iconSpin:!w,content:"\u0418\u043D\u044A\u0435\u043A\u0442\u043E\u0440 \u0431\u043B\u043E\u043A\u0430",mb:"0",onClick:function(){function M(){return B("bufferOption",{option:"createInjector",id:T,block:1})}return M}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"user",content:"\u0421\u0443\u0431\u044A\u0435\u043A\u0442",mb:"0",onClick:function(){function M(){return B("bufferOption",{option:"transfer",id:T})}return M}()})]})],4)]}),!E.data&&(0,e.createComponentVNode)(2,t.Box,{color:"label",mt:"0.5rem",children:"\u0411\u0443\u0444\u0435\u0440 \u0434\u0430\u043D\u043D\u044B\u0445 \u043F\u0443\u0441\u0442."})]})})},i=function(g,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,T=L.hasDisk,A=L.disk;return(0,e.createComponentVNode)(2,t.Section,{title:"\u0414\u0438\u0441\u043A\u0435\u0442\u0430",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Confirm,{disabled:!T||!A.data,icon:"trash",content:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",onClick:function(){function E(){return B("wipeDisk")}return E}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!T,icon:"eject",content:"\u0418\u0437\u0432\u043B\u0435\u0447\u044C",onClick:function(){function E(){return B("ejectDisk")}return E}()})],4),children:T?A.data?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u042D\u0442\u0438\u043A\u0435\u0442\u043A\u0430",children:A.label?A.label:"\u041E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0421\u0443\u0431\u044A\u0435\u043A\u0442",children:A.owner?A.owner:(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"\u041D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u043E"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0422\u0438\u043F \u0434\u0430\u043D\u043D\u044B\u0445",children:[A.type==="ui"?"\u0423\u043D\u0438\u043A\u0430\u043B\u044C\u043D\u044B\u0435 \u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440\u044B":"\u0421\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u043D\u044B\u0435 \u0424\u0435\u0440\u043C\u0435\u043D\u0442\u044B",!!A.ue&&" \u0438 \u0423\u043D\u0438\u043A\u0430\u043B\u044C\u043D\u044B\u0435 \u0424\u0435\u0440\u043C\u0435\u043D\u0442\u044B"]})]}):(0,e.createComponentVNode)(2,t.Box,{color:"label",children:"\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442."}):(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"),"\u0414\u0438\u0441\u043A\u0435\u0442\u0430 \u043D\u0435 \u0432\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0430."]})})},h=function(g,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,T=L.isBeakerLoaded,A=L.beakerVolume,E=L.beakerLabel;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"\u0425\u0438\u043C\u0438\u043A\u0430\u0442\u044B \u0438 \u0451\u043C\u043A\u043E\u0441\u0442\u0438",buttons:(0,e.createComponentVNode)(2,t.Button,{disabled:!T,icon:"eject",content:"\u0418\u0437\u0432\u043B\u0435\u0447\u044C \u0451\u043C\u043A\u043E\u0441\u0442\u044C",onClick:function(){function w(){return B("ejectBeaker")}return w}()}),children:T?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0412\u0432\u0435\u0441\u0442\u0438 \u0445\u0438\u043C\u0438\u043A\u0430\u0442\u044B",children:[S.map(function(w,O){return(0,e.createComponentVNode)(2,t.Button,{disabled:w>A,icon:"syringe",content:w,onClick:function(){function M(){return B("injectRejuvenators",{amount:w})}return M}()},O)}),(0,e.createComponentVNode)(2,t.Button,{disabled:A<=0,icon:"syringe",content:"\u0412\u0441\u0435",onClick:function(){function w(){return B("injectRejuvenators",{amount:A})}return w}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0401\u043C\u043A\u043E\u0441\u0442\u044C",children:[(0,e.createComponentVNode)(2,t.Box,{mb:"0.5rem",children:E||"\u042D\u0442\u0438\u043A\u0435\u0442\u043A\u0430 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442"}),A?(0,e.createComponentVNode)(2,t.Box,{color:"good",children:["\u041E\u0441\u0442\u0430\u043B\u043E\u0441\u044C: ",A,"u"]}):(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"\u041F\u0443\u0441\u0442\u043E"})]})]}):(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,"\u0401\u043C\u043A\u043E\u0441\u0442\u044C \u043D\u0435 \u0432\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0430.",16)]})})})},V=function(g,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)("\xA0\u041E\u0431\u043B\u0443\u0447\u0438\u0442\u044C \u0441\u0443\u0431\u044A\u0435\u043A\u0442\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)("\u0412 \u0442\u0435\u0447\u0435\u043D\u0438\u0438 "),g.duration,(0,e.createTextVNode)(" \u0441\u0435\u043A\u0443\u043D\u0434"),g.duration%10===1&&g.duration%100!==11?"\u044B":""],0)})]})},v=function(g,N){for(var x=(0,a.useBackend)(N),B=x.act,L=x.data,T=g.dnaString,A=g.selectedBlock,E=g.selectedSubblock,w=g.blockSize,O=g.action,M=T.split(""),P=0,F=[],R=function(){for(var W=U/w+1,K=[],$=function(){var le=ne+1;K.push((0,e.createComponentVNode)(2,t.Button,{selected:A===W&&E===le,content:M[U+ne],mb:"0",onClick:function(){function de(){return B(O,{block:W,subblock:le})}return de}()}))},ne=0;neh.spawnpoints?"red":"green",children:[h.total," \u0432\u044B\u0431\u0440\u0430\u043D\u043E, \u043F\u0440\u043E\u0442\u0438\u0432 ",h.spawnpoints," \u0442\u043E\u0447\u0435\u043A \u0441\u043F\u0430\u0432\u043D\u0430"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C",children:(0,e.createComponentVNode)(2,t.Button,{icon:"ambulance",content:"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u041E\u0411\u0420",onClick:function(){function N(){return i("dispatch_ert",{silent:s})}return N}()})})]})})},c=function(l,d){var m=(0,a.useBackend)(d),i=m.act,h=m.data,V=h.ert_request_messages;return(0,e.createComponentVNode)(2,t.Section,{children:V&&V.length?V.map(function(v){return(0,e.createComponentVNode)(2,t.Section,{title:v.time,buttons:(0,e.createComponentVNode)(2,t.Button,{content:v.sender_real_name,onClick:function(){function s(){return i("view_player_panel",{uid:v.sender_uid})}return s}(),tooltip:"\u041F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C Player panel"}),children:v.message},(0,p.decodeHtmlEntities)(v.time))}):(0,e.createComponentVNode)(2,t.Box,{fluid:!0,italic:!0,textAlign:"center",children:"\u041D\u0435\u0442 \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u0432 \u041E\u0411\u0420"})})},u=function(l,d){var m=(0,a.useBackend)(d),i=m.act,h=m.data,V=(0,a.useLocalState)(d,"text",""),v=V[0],s=V[1];return(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Input,{placeholder:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u0434\u0435\u0441\u044C \u043F\u0440\u0438\u0447\u0438\u043D\u0443 \u043E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u0438\u044F \u041E\u0411\u0420.\n\u041C\u043D\u043E\u0433\u043E\u0441\u0442\u0440\u043E\u0447\u043D\u044B\u0439 \u0432\u0432\u043E\u0434 \u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D.",rows:10,fluid:!0,multiline:1,value:v,onChange:function(){function g(N,x){return s(x)}return g}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"\u041E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C \u0437\u0430\u043F\u0440\u043E\u0441 \u041E\u0411\u0420",fluid:!0,icon:"times",center:!0,mt:"5px",textAlign:"center",onClick:function(){function g(){return i("deny_ert",{reason:v})}return g}()})]})}},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),p=n(98595),k=r.Electropack=function(){function y(S,b){var C=(0,t.useBackend)(b),c=C.act,u=C.data,f=u.power,l=u.code,d=u.frequency,m=u.minFrequency,i=u.maxFrequency;return(0,e.createComponentVNode)(2,p.Window,{width:360,height:150,children:(0,e.createComponentVNode)(2,p.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 h(){return c("power")}return h}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Frequency",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Reset",onClick:function(){function h(){return c("reset",{reset:"freq"})}return h}()}),children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:m/10,maxValue:i/10,value:d/10,format:function(){function h(V){return(0,a.toFixed)(V,1)}return h}(),width:"80px",onChange:function(){function h(V,v){return c("freq",{freq:v})}return h}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Code",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Reset",onClick:function(){function h(){return c("reset",{reset:"code"})}return h}()}),children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:l,width:"80px",onChange:function(){function h(V,v){return c("code",{code:v})}return h}()})})]})})})})}return y}()},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),p=r.EvolutionMenu=function(){function S(b,C){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,k),(0,e.createComponentVNode)(2,y)]})})}return S}(),k=function(b,C){var c=(0,a.useBackend)(C),u=c.act,f=c.data,l=f.evo_points,d=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:l}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{ml:2.5,disabled:!d,content:"Readapt",icon:"sync",onClick:function(){function m(){return u("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"})]})]})})},y=function(b,C){var c=(0,a.useBackend)(C),u=c.act,f=c.data,l=f.evo_points,d=f.ability_list,m=f.purchased_abilities,i=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:i?"square-o":"check-square-o",selected:!i,content:"Compact",onClick:function(){function h(){return u("set_view_mode",{mode:0})}return h}()}),(0,e.createComponentVNode)(2,t.Button,{icon:i?"check-square-o":"square-o",selected:i,content:"Expanded",onClick:function(){function h(){return u("set_view_mode",{mode:1})}return h}()})],4),children:d.map(function(h,V){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:h.name}),m.includes(h.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:h.cost})]}),(0,e.createComponentVNode)(2,t.Flex.Item,{textAlign:"right",children:(0,e.createComponentVNode)(2,t.Button,{mr:.5,disabled:h.cost>l||m.includes(h.power_path),content:"Evolve",onClick:function(){function v(){return u("purchase",{power_path:h.power_path})}return v}()})})]}),!!i&&(0,e.createComponentVNode)(2,t.Flex,{color:"#8a8a8a",my:1,ml:1.5,width:"95%",children:h.description+" "+h.helptext})]},V)})})}},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),p=n(36036),k=n(73379),y=n(98595),S=["id","amount","lineDisplay","onClick"];function b(V,v){if(V==null)return{};var s={};for(var g in V)if({}.hasOwnProperty.call(V,g)){if(v.includes(g))continue;s[g]=V[g]}return s}var C=2e3,c={bananium:"clown",tranquillite:"mime"},u=r.ExosuitFabricator=function(){function V(v,s){var g=(0,o.useBackend)(s),N=g.act,x=g.data,B=x.building;return(0,e.createComponentVNode)(2,y.Window,{width:950,height:625,children:(0,e.createComponentVNode)(2,y.Window.Content,{className:"Exofab",children:(0,e.createComponentVNode)(2,p.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,p.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,p.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,p.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,l)}),B&&(0,e.createComponentVNode)(2,p.Stack.Item,{children:(0,e.createComponentVNode)(2,d)})]})}),(0,e.createComponentVNode)(2,p.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,p.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,p.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f)}),(0,e.createComponentVNode)(2,p.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,m)})]})})]})})})}return V}(),f=function(v,s){var g=(0,o.useBackend)(s),N=g.act,x=g.data,B=x.materials,L=x.capacity,T=Object.values(B).reduce(function(A,E){return A+E},0);return(0,e.createComponentVNode)(2,p.Section,{fill:!0,scrollable:!0,title:"Materials",className:"Exofab__materials",buttons:(0,e.createComponentVNode)(2,p.Box,{color:"label",mt:"0.25rem",children:[(T/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,i,{mt:-2,id:A,bold:A==="metal"||A==="glass",onClick:function(){function E(){return N("withdraw",{id:A})}return E}()},A)})})},l=function(v,s){var g=(0,o.useBackend)(s),N=g.act,x=g.data,B=x.curCategory,L=x.categories,T=x.designs,A=x.syncing,E=(0,o.useLocalState)(s,"searchText",""),w=E[0],O=E[1],M=(0,t.createSearch)(w,function(F){return F.name}),P=T.filter(M);return(0,e.createComponentVNode)(2,p.Section,{fill:!0,scrollable:!0,className:"Exofab__designs",title:(0,e.createComponentVNode)(2,p.Dropdown,{className:"Exofab__dropdown",selected:B,options:L,onSelected:function(){function F(R){return N("category",{cat:R})}return F}()}),buttons:(0,e.createComponentVNode)(2,p.Box,{mt:"2px",children:[(0,e.createComponentVNode)(2,p.Button,{icon:"plus",content:"Queue all",onClick:function(){function F(){return N("queueall")}return F}()}),(0,e.createComponentVNode)(2,p.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,p.Input,{placeholder:"Search by name...",mb:"0.5rem",width:"100%",onInput:function(){function F(R,U){return O(U)}return F}()}),P.map(function(F){return(0,e.createComponentVNode)(2,h,{design:F},F.id)}),P.length===0&&(0,e.createComponentVNode)(2,p.Box,{color:"label",children:"No designs found."})]})},d=function(v,s){var g=(0,o.useBackend)(s),N=g.act,x=g.data,B=x.building,L=x.buildStart,T=x.buildEnd,A=x.worldTime;return(0,e.createComponentVNode)(2,p.Section,{className:"Exofab__building",stretchContents:!0,children:(0,e.createComponentVNode)(2,p.ProgressBar.Countdown,{start:L,current:A,end:T,children:(0,e.createComponentVNode)(2,p.Stack,{children:[(0,e.createComponentVNode)(2,p.Stack.Item,{children:(0,e.createComponentVNode)(2,p.Icon,{name:"cog",spin:!0})}),(0,e.createComponentVNode)(2,p.Stack.Item,{children:["Building ",B,"\xA0(",(0,e.createComponentVNode)(2,k.Countdown,{current:A,timeLeft:T-A,format:function(){function E(w,O){return O.substr(3)}return E}()}),")"]})]})})})},m=function(v,s){var g=(0,o.useBackend)(s),N=g.act,x=g.data,B=x.queue,L=x.processingQueue,T=Object.entries(x.queueDeficit).filter(function(E){return E[1]<0}),A=B.reduce(function(E,w){return E+w.time},0);return(0,e.createComponentVNode)(2,p.Section,{fill:!0,scrollable:!0,className:"Exofab__queue",title:"Queue",buttons:(0,e.createComponentVNode)(2,p.Box,{children:[(0,e.createComponentVNode)(2,p.Button,{selected:L,icon:L?"toggle-on":"toggle-off",content:"Process",onClick:function(){function E(){return N("process")}return E}()}),(0,e.createComponentVNode)(2,p.Button,{disabled:B.length===0,icon:"eraser",content:"Clear",onClick:function(){function E(){return N("unqueueall")}return E}()})]}),children:(0,e.createComponentVNode)(2,p.Stack,{fill:!0,vertical:!0,children:B.length===0?(0,e.createComponentVNode)(2,p.Box,{color:"label",children:"The queue is empty."}):(0,e.createFragment)([(0,e.createComponentVNode)(2,p.Stack.Item,{className:"Exofab__queue--queue",grow:!0,overflow:"auto",children:B.map(function(E,w){return(0,e.createComponentVNode)(2,p.Box,{color:E.notEnough&&"bad",children:[w+1,". ",E.name,w>0&&(0,e.createComponentVNode)(2,p.Button,{icon:"arrow-up",onClick:function(){function O(){return N("queueswap",{from:w+1,to:w})}return O}()}),w0&&(0,e.createComponentVNode)(2,p.Stack.Item,{className:"Exofab__queue--time",children:[(0,e.createComponentVNode)(2,p.Divider),"Processing time:",(0,e.createComponentVNode)(2,p.Icon,{name:"clock",mx:"0.5rem"}),(0,e.createComponentVNode)(2,p.Box,{inline:!0,bold:!0,children:new Date(A/10*1e3).toISOString().substr(14,5)})]}),Object.keys(T).length>0&&(0,e.createComponentVNode)(2,p.Stack.Item,{className:"Exofab__queue--deficit",shrink:"0",children:[(0,e.createComponentVNode)(2,p.Divider),"Lacking materials to complete:",T.map(function(E){return(0,e.createComponentVNode)(2,p.Box,{children:(0,e.createComponentVNode)(2,i,{id:E[0],amount:-E[1],lineDisplay:!0})},E[0])})]})],0)})})},i=function(v,s){var g=(0,o.useBackend)(s),N=g.act,x=g.data,B=v.id,L=v.amount,T=v.lineDisplay,A=v.onClick,E=b(v,S),w=x.materials[B]||0,O=L||w;if(!(O<=0&&!(B==="metal"||B==="glass"))){var M=L&&L>w;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,p.Stack,Object.assign({align:"center",className:(0,a.classes)(["Exofab__material",T&&"Exofab__material--line"])},E,{children:T?(0,e.createFragment)([(0,e.createComponentVNode)(2,p.Stack.Item,{className:(0,a.classes)(["materials32x32",B])}),(0,e.createComponentVNode)(2,p.Stack.Item,{className:"Exofab__material--amount",color:M&&"bad",ml:0,mr:1,children:O.toLocaleString("en-US")})],4):(0,e.createFragment)([(0,e.createComponentVNode)(2,p.Stack.Item,{basis:"content",children:(0,e.createComponentVNode)(2,p.Button,{width:"85%",color:"transparent",onClick:A,children:(0,e.createComponentVNode)(2,p.Box,{mt:1,className:(0,a.classes)(["materials32x32",B])})})}),(0,e.createComponentVNode)(2,p.Stack.Item,{grow:"1",children:[(0,e.createComponentVNode)(2,p.Box,{className:"Exofab__material--name",children:B}),(0,e.createComponentVNode)(2,p.Box,{className:"Exofab__material--amount",children:[O.toLocaleString("en-US")," cm\xB3 (",Math.round(O/C*10)/10," ","sheets)"]})]})],4)})))}},h=function(v,s){var g=(0,o.useBackend)(s),N=g.act,x=g.data,B=v.design;return(0,e.createComponentVNode)(2,p.Box,{className:"Exofab__design",children:[(0,e.createComponentVNode)(2,p.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,p.Button,{icon:"plus-circle",onClick:function(){function L(){return N("queue",{id:B.id})}return L}()}),(0,e.createComponentVNode)(2,p.Box,{className:"Exofab__design--cost",children:Object.entries(B.cost).map(function(L){return(0,e.createComponentVNode)(2,p.Box,{children:(0,e.createComponentVNode)(2,i,{id:L[0],amount:L[1],lineDisplay:!0})},L[0])})}),(0,e.createComponentVNode)(2,p.Stack,{className:"Exofab__design--time",children:(0,e.createComponentVNode)(2,p.Stack.Item,{children:[(0,e.createComponentVNode)(2,p.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),p=0,k=1013,y=function(C){var c="good",u=80,f=95,l=110,d=120;return Cl?c="average":C>d&&(c="bad"),c},S=r.ExternalAirlockController=function(){function b(C,c){var u=(0,a.useBackend)(c),f=u.act,l=u.data,d=l.chamber_pressure,m=l.exterior_status,i=l.interior_status,h=l.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:y(d),value:d,minValue:p,maxValue:k,children:[d," 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:h,onClick:function(){function V(){return f("cycle_ext")}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Cycle to Interior",icon:"arrow-circle-right",disabled:h,onClick:function(){function V(){return f("cycle_int")}return V}()})]}),(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Force Exterior Door",icon:"exclamation-triangle",color:i==="open"?"red":h?"yellow":null,onClick:function(){function V(){return f("force_ext")}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Force Interior Door",icon:"exclamation-triangle",color:i==="open"?"red":h?"yellow":null,onClick:function(){function V(){return f("force_int")}return V}()})]}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Abort",icon:"ban",color:"red",disabled:!h,onClick:function(){function V(){return f("abort")}return V}()})})]})]})})}return b}()},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),p=r.FaxMachine=function(){function k(y,S){var b=(0,a.useBackend)(S),C=b.act,c=b.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:c.scan_name?"eject":"id-card",selected:c.scan_name,content:c.scan_name?c.scan_name:"-----",tooltip:c.scan_name?"Eject ID":"Insert ID",onClick:function(){function u(){return C("scan")}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Authorize",children:(0,e.createComponentVNode)(2,t.Button,{icon:c.authenticated?"sign-out-alt":"id-card",selected:c.authenticated,disabled:!c.scan_name&&!c.authenticated,content:c.authenticated?"Log Out":"Log In",onClick:function(){function u(){return C("auth")}return u}()})})]})}),(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:c.network}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Document",children:[(0,e.createComponentVNode)(2,t.Button,{icon:c.paper?"eject":"paperclip",disabled:!c.authenticated&&!c.paper,content:c.paper?c.paper:"-----",onClick:function(){function u(){return C("paper")}return u}()}),!!c.paper&&(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:"Rename",onClick:function(){function u(){return C("rename")}return u}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sending To",children:(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:c.destination?c.destination:"-----",disabled:!c.authenticated,onClick:function(){function u(){return C("dept")}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Action",children:(0,e.createComponentVNode)(2,t.Button,{icon:"envelope",content:c.sendError?c.sendError:"Send",disabled:!c.paper||!c.destination||!c.authenticated||c.sendError,onClick:function(){function u(){return C("send")}return u}()})})]})})]})})}return k}()},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),p=function(b,C){var c=(0,a.useBackend)(C),u=c.act,f=c.data,l=b.icon_state,d=b.direction,m=b.isSelected,i=b.onSelect;return(0,e.createComponentVNode)(2,t.DmIcon,{icon:f.icon,icon_state:l,direction:d,onClick:i,style:{"border-style":m&&"solid"||"none","border-width":"2px","border-color":"orange",padding:m&&"0px"||"2px"}})},k={NORTH:1,SOUTH:2,EAST:4,WEST:8},y=r.FloorPainter=function(){function S(b,C){var c=(0,a.useBackend)(C),u=c.act,f=c.data,l=f.availableStyles,d=f.selectedStyle,m=f.selectedDir;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 i(){return u("cycle_style",{offset:-1})}return i}()})}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Dropdown,{options:l,selected:d,width:"150px",height:"20px",ml:"2px",mr:"2px",nochevron:!0,onSelected:function(){function i(h){return u("select_style",{style:h})}return i}()})}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",onClick:function(){function i(){return u("cycle_style",{offset:1})}return i}()})})]}),(0,e.createComponentVNode)(2,t.Box,{mt:"5px",mb:"5px",children:(0,e.createComponentVNode)(2,t.Flex,{overflowY:"auto",maxHeight:"239px",wrap:"wrap",children:l.map(function(i){return(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,p,{icon_state:i,isSelected:d===i,onSelect:function(){function h(){return u("select_style",{style:i})}return h}()})},i)})})}),(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:[k.NORTH,null,k.SOUTH].map(function(i){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[i+k.WEST,i,i+k.EAST].map(function(h){return(0,e.createComponentVNode)(2,t.Table.Cell,{style:{"vertical-align":"middle","text-align":"center"},children:h===null?(0,e.createComponentVNode)(2,t.Icon,{name:"arrows-alt",size:3}):(0,e.createComponentVNode)(2,p,{icon_state:d,direction:h,isSelected:h===m,onSelect:function(){function V(){return u("select_direction",{direction:h})}return V}()})},h)})},i)})})})})]})})})}return S}()},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),p=n(98595),k=function(l){return l?"("+l.join(", ")+")":"ERROR"},y=function(l,d,m){if(!(!l||!d)){if(l[2]!==d[2]||m!==1)return null;var i=Math.atan2(d[1]-l[1],d[0]-l[0]),h=Math.sqrt(Math.pow(d[1]-l[1],2)+Math.pow(d[0]-l[0],2));return{angle:(0,a.rad2deg)(i),distance:h}}},S=r.GPS=function(){function f(l,d){var m=(0,t.useBackend)(d),i=m.data,h=i.emped,V=i.active,v=i.area,s=i.position,g=i.saved;return(0,e.createComponentVNode)(2,p.Window,{width:450,height:700,children:(0,e.createComponentVNode)(2,p.Window.Content,{children:(0,e.createComponentVNode)(2,o.Flex,{direction:"column",height:"100%",children:h?(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",basis:"0",children:(0,e.createComponentVNode)(2,b,{emp:!0})}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Flex.Item,{children:(0,e.createComponentVNode)(2,C)}),V?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Flex.Item,{mt:"0.5rem",children:(0,e.createComponentVNode)(2,c,{area:v,position:s})}),g&&(0,e.createComponentVNode)(2,o.Flex.Item,{mt:"0.5rem",children:(0,e.createComponentVNode)(2,c,{title:"Saved Position",position:g})}),(0,e.createComponentVNode)(2,o.Flex.Item,{mt:"0.5rem",grow:"1",basis:"0",children:(0,e.createComponentVNode)(2,u,{height:"100%"})})],0):(0,e.createComponentVNode)(2,b)],0)})})})}return f}(),b=function(l,d){var m=l.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."]})})})})},C=function(l,d){var m=(0,t.useBackend)(d),i=m.act,h=m.data,V=h.active,v=h.tag,s=h.same_z,g=(0,t.useLocalState)(d,"newTag",v),N=g[0],x=g[1];return(0,e.createComponentVNode)(2,o.Section,{title:"Settings",buttons:(0,e.createComponentVNode)(2,o.Button,{selected:V,icon:V?"toggle-on":"toggle-off",content:V?"On":"Off",onClick:function(){function B(){return i("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:v,onEnter:function(){function B(){return i("tag",{newtag:N})}return B}(),onInput:function(){function B(L,T){return x(T)}return B}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:v===N,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){function B(){return i("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:!s,icon:s?"compress":"expand",content:s?"Local Sector":"Global",onClick:function(){function B(){return i("same_z")}return B}()})})]})})},c=function(l,d){var m=l.title,i=l.area,h=l.position;return(0,e.createComponentVNode)(2,o.Section,{title:m||"Position",children:(0,e.createComponentVNode)(2,o.Box,{fontSize:"1.5rem",children:[i&&(0,e.createFragment)([i,(0,e.createVNode)(1,"br")],0),k(h)]})})},u=function(l,d){var m=(0,t.useBackend)(d),i=m.data,h=i.position,V=i.signals,v=i.upgraded;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Signals",overflow:"auto"},l,{children:(0,e.createComponentVNode)(2,o.Table,{children:V.map(function(s){return Object.assign({},s,y(h,s.position,v))}).map(function(s,g){return(0,e.createComponentVNode)(2,o.Table.Row,{backgroundColor:g%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:s.tag}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",color:"grey",children:s.area}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",collapsing:!0,children:s.distance!==void 0&&(0,e.createComponentVNode)(2,o.Box,{opacity:Math.max(1-Math.min(s.distance,100)/100,.5),children:[(0,e.createComponentVNode)(2,o.Icon,{name:s.distance>0?"arrow-right":"circle",rotation:-s.angle}),"\xA0",Math.floor(s.distance)+"m"]})}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",pr:"0.25rem",collapsing:!0,children:k(s.position)})]},g)})})})))}},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),p=r.GasAnalyzerContent=function(){function S(b,C){var c=(0,a.useBackend)(C),u=c.act,f=c.data,l=f.gasmixes,d=f.autoUpdating;return(0,e.createComponentVNode)(2,t.Section,{title:l[0].name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:d?"unlock":"lock",onClick:function(){function m(){return u("autoscantoggle")}return m}(),tooltip:d?"Auto-Update Enabled":"Auto-Update Disabled",fluid:!0,textAlign:"center",selected:d}),children:l[0].total_moles?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Moles",children:(l[0].total_moles?l[0].total_moles:"-")+" mol"}),l[0].oxygen?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Oxygen",children:l[0].oxygen.toFixed(2)+" mol ("+(l[0].oxygen/l[0].total_moles).toFixed(2)*100+" %)"}):"",l[0].nitrogen?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nitrogen",children:l[0].nitrogen.toFixed(2)+" mol ("+(l[0].nitrogen/l[0].total_moles).toFixed(2)*100+" %)"}):"",l[0].carbon_dioxide?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Carbon Dioxide",children:l[0].carbon_dioxide.toFixed(2)+" mol ("+(l[0].carbon_dioxide/l[0].total_moles).toFixed(2)*100+" %)"}):"",l[0].toxins?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Plasma",children:l[0].toxins.toFixed(2)+" mol ("+(l[0].toxins/l[0].total_moles).toFixed(2)*100+" %)"}):"",l[0].sleeping_agent?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nitrous Oxide",children:l[0].sleeping_agent.toFixed(2)+" mol ("+(l[0].sleeping_agent/l[0].total_moles).toFixed(2)*100+" %)"}):"",l[0].agent_b?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Agent B",children:l[0].agent_b.toFixed(2)+" mol ("+(l[0].agent_b/l[0].total_moles).toFixed(2)*100+" %)"}):"",(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:(l[0].total_moles?(l[0].temperature-273.15).toFixed(2):"-")+" \xB0C ("+(l[0].total_moles?l[0].temperature.toFixed(2):"-")+" K)"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Volume",children:(l[0].total_moles?l[0].volume:"-")+" L"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure",children:(l[0].total_moles?l[0].pressure.toFixed(2):"-")+" kPa"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Heat Capacity",children:l[0].heat_capacity+" / K"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Thermal Energy",children:l[0].thermal_energy})]}):(0,e.createComponentVNode)(2,t.Box,{nowrap:!0,italic:!0,mb:"10px",children:"No Gas Detected!"})},l[0])}return S}(),k=r.GasAnalyzerHistory=function(){function S(b,C){var c=(0,a.useBackend)(C),u=c.act,f=c.data,l=f.historyGasmixes,d=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 i(){return u("clearhistory")}return i}(),textAlign:"center",disabled:l.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 i(){return u("modekpa")}return i}(),textAlign:"center",selected:d==="kpa"})}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"mol",onClick:function(){function i(){return u("modemol")}return i}(),textAlign:"center",selected:d==="mol"})})]})}),(0,e.createComponentVNode)(2,t.LabeledList,{children:l.map(function(i,h){return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:h+1+". "+(d==="mol"?i[0].total_moles.toFixed(2):i[0].pressure.toFixed(2)),onClick:function(){function V(){return u("input",{target:h+1})}return V}(),textAlign:"left",selected:h+1===m,fluid:!0})},i[0])})})]})}return S}(),y=r.GasAnalyzer=function(){function S(b,C){var c={float:"left",width:"67%"},u={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,p)}),2,{style:c}),(0,e.createVNode)(1,"div",null,(0,e.createComponentVNode)(2,t.Section,{width:"160px",children:(0,e.createComponentVNode)(2,k)}),2,{style:u})]})})}return S}()},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),p=r.GasFreezer=function(){function k(y,S){var b=(0,a.useBackend)(S),C=b.act,c=b.data,u=c.on,f=c.pressure,l=c.temperature,d=c.temperatureCelsius,m=c.min,i=c.max,h=c.target,V=c.targetCelsius,v=(l-m)/(i-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:u?"power-off":"times",content:u?"\u0412\u043A\u043B":"\u0412\u044B\u043A\u043B",selected:u,onClick:function(){function s(){return C("power")}return s}()}),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:v,ranges:{blue:[-1/0,.5],red:[.5,1/0]},children:"\xA0"})}),(0,e.createComponentVNode)(2,t.Flex.Item,{width:"35%",children:[v<.5&&(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"blue",ml:1,children:[l," \xB0K (",d," \xB0C)"]}),v>=.5&&(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"red",ml:1,children:[l," \xB0K (",d," \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:(h-m)/(i-m),children:"\xA0"})}),(0,e.createComponentVNode)(2,t.Flex.Item,{width:"35%",children:(0,e.createComponentVNode)(2,t.Box,{inline:!0,ml:1,children:[h," \xB0K (",V," \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 s(){return C("temp",{temp:m})}return s}()}),(0,e.createComponentVNode)(2,t.NumberInput,{value:Math.round(h),unit:"\xB0K",minValue:Math.round(m),maxValue:Math.round(i),step:5,stepPixelSize:3,onDrag:function(){function s(g,N){return C("temp",{temp:N})}return s}()}),(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 s(){return C("temp",{temp:i})}return s}()})]})]})})})})}return k}()},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),p=n(3939),k=n(98595),y=r.GeneModder=function(){function d(m,i){var h=(0,a.useBackend)(i),V=h.data,v=V.has_seed;return(0,e.createComponentVNode)(2,k.Window,{width:500,height:650,children:(0,e.createComponentVNode)(2,k.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,C),(0,e.createComponentVNode)(2,p.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),v===0?(0,e.createComponentVNode)(2,b):(0,e.createComponentVNode)(2,S)]})})})}return d}(),S=function(m,i){var h=(0,a.useBackend)(i),V=h.act,v=h.data,s=v.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:!s||!s.can_insert||s.is_core,icon:"arrow-circle-down",onClick:function(){function g(){return V("insert")}return g}()}),children:[(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,u),(0,e.createComponentVNode)(2,f)]})},b=function(m,i){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."]})})})},C=function(m,i){var h=(0,a.useBackend)(i),V=h.act,v=h.data,s=v.has_seed,g=v.seed,N=v.has_disk,x=v.disk,B,L;return s?B=(0,e.createComponentVNode)(2,o.Stack.Item,{mb:"-6px",mt:"-4px",children:[(0,e.createVNode)(1,"img",(0,t.classes)(["seeds32x32",g.image]),null,1,{style:{"vertical-align":"middle",width:"32px",margin:"-1px","margin-left":"-11px"}}),(0,e.createComponentVNode)(2,o.Button,{content:g.name,onClick:function(){function T(){return V("eject_seed")}return T}()}),(0,e.createComponentVNode)(2,o.Button,{ml:"3px",icon:"pen",tooltip:"Name Variant",onClick:function(){function T(){return V("variant_name")}return T}()})]}):B=(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{ml:3.3,content:"None",onClick:function(){function T(){return V("eject_seed")}return T}()})}),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 T(){return V("eject_disk")}return T}()})})})]})})},c=function(m,i){var h=(0,a.useBackend)(i),V=h.act,v=h.data,s=v.disk,g=v.core_genes;return(0,e.createComponentVNode)(2,o.Collapsible,{title:"Core Genes",open:!0,children:[g.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:!(s!=null&&s.can_extract),icon:"save",onClick:function(){function x(){return V("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||!s.can_insert,icon:"arrow-circle-down",onClick:function(){function x(){return V("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:!(s!=null&&s.is_bulk_core),icon:"arrow-circle-down",onClick:function(){function N(){return V("bulk_replace_core")}return N}()})})})]},"Core Genes")},u=function(m,i){var h=(0,a.useBackend)(i),V=h.data,v=V.reagent_genes,s=V.has_reagent;return(0,e.createComponentVNode)(2,l,{title:"Reagent Genes",gene_set:v,do_we_show:s})},f=function(m,i){var h=(0,a.useBackend)(i),V=h.data,v=V.trait_genes,s=V.has_trait;return(0,e.createComponentVNode)(2,l,{title:"Trait Genes",gene_set:v,do_we_show:s})},l=function(m,i){var h=m.title,V=m.gene_set,v=m.do_we_show,s=(0,a.useBackend)(i),g=s.act,N=s.data,x=N.disk;return(0,e.createComponentVNode)(2,o.Collapsible,{title:h,open:!0,children:v?V.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 g("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 g("remove",{id:B.id})}return L}()})})]},B)}):(0,e.createComponentVNode)(2,o.Stack.Item,{children:"No Genes Detected"})},h)}},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),p=r.GenericCrewManifest=function(){function k(y,S){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 k}()},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),p=r.GhostHudPanel=function(){function y(S,b){var C=(0,a.useBackend)(b),c=C.data,u=c.security,f=c.medical,l=c.diagnostic,d=c.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,k,{label:"Medical",type:"medical",is_active:f}),(0,e.createComponentVNode)(2,k,{label:"Security",type:"security",is_active:u}),(0,e.createComponentVNode)(2,k,{label:"Diagnostic",type:"diagnostic",is_active:l}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,k,{label:"Antag HUD",is_active:d,act_on:"ahud_on",act_off:"ahud_off"})]})})})}return y}(),k=function(S,b){var C=(0,a.useBackend)(b),c=C.act,u=S.label,f=S.type,l=f===void 0?null:f,d=S.is_active,m=S.act_on,i=m===void 0?"hud_on":m,h=S.act_off,V=h===void 0?"hud_off":h;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:u}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{mr:.6,content:d?"On":"Off",icon:d?"toggle-on":"toggle-off",selected:d,onClick:function(){function v(){return c(d?V:i,{hud_type:l})}return v}()})})]})}},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),p=r.GlandDispenser=function(){function k(y,S){var b=(0,a.useBackend)(S),C=b.act,c=b.data,u=c.glands,f=u===void 0?[]:u;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(l){return(0,e.createComponentVNode)(2,t.Button,{width:"60px",height:"60px",m:.75,textAlign:"center",fontSize:"17px",lineHeight:"55px",icon:"eject",backgroundColor:l.color,content:l.amount||"0",disabled:!l.amount,onClick:function(){function d(){return C("dispense",{gland_id:l.id})}return d}()},l.id)})})})})}return k}()},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),p=[1,5,10,20,30,50],k=null,y=r.HandheldChemDispenser=function(){function C(c,u){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,S),(0,e.createComponentVNode)(2,b)]})})})}return C}(),S=function(c,u){var f=(0,a.useBackend)(u),l=f.act,d=f.data,m=d.amount,i=d.energy,h=d.maxEnergy,V=d.mode;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u042D\u043D\u0435\u0440\u0433\u0438\u044F",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:i,minValue:0,maxValue:h,ranges:{good:[h*.5,1/0],average:[h*.25,h*.5],bad:[-1/0,h*.25]},children:[i," / ",h," \u0415\u0434\u0438\u043D\u0438\u0446"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041E\u0431\u044A\u0451\u043C \u0441\u0438\u043D\u0442\u0435\u0437\u0430",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{children:p.map(function(v,s){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===v,content:v,onClick:function(){function g(){return l("amount",{amount:v})}return g}()})},s)})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0420\u0435\u0436\u0438\u043C",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{justify:"space-between",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:V==="dispense",content:"\u0421\u0438\u043D\u0442\u0435\u0437",m:"0",width:"32%",onClick:function(){function v(){return l("mode",{mode:"dispense"})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:V==="remove",content:"\u0423\u0434\u0430\u043B\u0435\u043D\u0438\u0435",m:"0",width:"32%",onClick:function(){function v(){return l("mode",{mode:"remove"})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:V==="isolate",content:"\u0418\u0437\u043E\u043B\u044F\u0446\u0438\u044F",m:"0",width:"32%",onClick:function(){function v(){return l("mode",{mode:"isolate"})}return v}()})]})})]})})})},b=function(c,u){for(var f=(0,a.useBackend)(u),l=f.act,d=f.data,m=d.chemicals,i=m===void 0?[]:m,h=d.current_reagent,V=[],v=0;v<(i.length+1)%3;v++)V.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:d.glass?"\u0412\u044B\u0431\u043E\u0440 \u043D\u0430\u043F\u0438\u0442\u043A\u0430":"\u0412\u044B\u0431\u043E\u0440 \u0440\u0435\u0430\u0433\u0435\u043D\u0442\u0430",children:[i.map(function(s,g){return(0,e.createComponentVNode)(2,t.Button,{width:"32%",icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",selected:h===s.id,content:s.title,style:{"margin-left":"2px"},onClick:function(){function N(){return l("dispense",{reagent:s.id})}return N}()},g)}),V.map(function(s,g){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:"1",basis:"25%"},g)})]})})}},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),p=r.ImplantPad=function(){function k(y,S){var b=(0,a.useBackend)(S),C=b.act,c=b.data,u=c.implant,f=c.contains_case,l=c.tag,d=(0,a.useLocalState)(S,"newTag",l),m=d[0],i=d[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 h(){return C("eject_case")}return h}()})}),children:u&&f?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{bold:!0,mb:2,children:[(0,e.createComponentVNode)(2,t.DmIcon,{icon:u.icon,icon_state:u.icon_state,ml:0,mr:2,style:{"vertical-align":"middle",width:"32px"}}),u.name]}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Life",children:u.life}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Notes",children:u.notes}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Function",children:u.function}),!!l&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tag",children:[(0,e.createComponentVNode)(2,t.Input,{width:"5.5rem",value:l,onEnter:function(){function h(){return C("tag",{newtag:m})}return h}(),onInput:function(){function h(V,v){return i(v)}return h}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:l===m,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){function h(){return C("tag",{newtag:m})}return h}(),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 k}()},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),p=n(98595),k=r.Instrument=function(){function c(u,f){var l=(0,t.useBackend)(f),d=l.act,m=l.data;return(0,e.createComponentVNode)(2,p.Window,{width:600,height:505,children:[(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,p.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,S),(0,e.createComponentVNode)(2,C)]})})]})}return c}(),y=function(u,f){var l=(0,t.useBackend)(f),d=l.act,m=l.data,i=m.help;if(i)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 h(){return d("help")}return h}()})]})})})},S=function(u,f){var l=(0,t.useBackend)(f),d=l.act,m=l.data,i=m.lines,h=m.playing,V=m.repeat,v=m.maxRepeats,s=m.tempo,g=m.minTempo,N=m.maxTempo,x=m.tickLag,B=m.volume,L=m.minVolume,T=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 E(){return d("help")}return E}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"file",content:"New",onClick:function(){function E(){return d("newsong")}return E}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"upload",content:"Import",onClick:function(){function E(){return d("import")}return E}()})],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:h,disabled:i.length===0||V<0,icon:"play",content:"Play",onClick:function(){function E(){return d("play")}return E}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!h,icon:"stop",content:"Stop",onClick:function(){function E(){return d("stop")}return E}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Repeat",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:0,maxValue:v,value:V,stepPixelSize:59,onChange:function(){function E(w,O){return d("repeat",{new:O})}return E}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Tempo",children:(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Button,{disabled:s>=N,content:"-",as:"span",mr:"0.5rem",onClick:function(){function E(){return d("tempo",{new:s+x})}return E}()}),(0,a.round)(600/s)," BPM",(0,e.createComponentVNode)(2,o.Button,{disabled:s<=g,content:"+",as:"span",ml:"0.5rem",onClick:function(){function E(){return d("tempo",{new:s-x})}return E}()})]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Volume",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:L,maxValue:T,value:B,stepPixelSize:6,onDrag:function(){function E(w,O){return d("setvolume",{new:O})}return E}()})}),(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,b)]})},b=function(u,f){var l=(0,t.useBackend)(f),d=l.act,m=l.data,i=m.allowedInstrumentNames,h=m.instrumentLoaded,V=m.instrument,v=m.canNoteShift,s=m.noteShift,g=m.noteShiftMin,N=m.noteShiftMax,x=m.sustainMode,B=m.sustainLinearDuration,L=m.sustainExponentialDropoff,T=m.legacy,A=m.sustainDropoffVolume,E=m.sustainHeldNote,w,O;return x===1?(w="Linear",O=(0,e.createComponentVNode)(2,o.Slider,{minValue:.1,maxValue:5,value:B,step:.5,stepPixelSize:85,format:function(){function M(P){return(0,a.round)(P*100)/100+" seconds"}return M}(),onChange:function(){function M(P,F){return d("setlinearfalloff",{new:F/10})}return M}()})):x===2&&(w="Exponential",O=(0,e.createComponentVNode)(2,o.Slider,{minValue:1.025,maxValue:10,value:L,step:.01,format:function(){function M(P){return(0,a.round)(P*1e3)/1e3+"% per decisecond"}return M}(),onChange:function(){function M(P,F){return d("setexpfalloff",{new:F})}return M}()})),i.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:T?"Legacy":"Synthesized"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Current",children:h?(0,e.createComponentVNode)(2,o.Dropdown,{options:i,selected:V,width:"50%",onSelected:function(){function M(P){return d("switchinstrument",{name:P})}return M}()}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"None!"})}),!!(!T&&v)&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Note Shift/Note Transpose",children:(0,e.createComponentVNode)(2,o.Slider,{minValue:g,maxValue:N,value:s,stepPixelSize:2,format:function(){function M(P){return P+" keys / "+(0,a.round)(P/12*100)/100+" octaves"}return M}(),onChange:function(){function M(P,F){return d("setnoteshift",{new:F})}return M}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Sustain Mode",children:[(0,e.createComponentVNode)(2,o.Dropdown,{options:["Linear","Exponential"],selected:w,onSelected:function(){function M(P){return d("setsustainmode",{new:P})}return M}()}),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 M(P,F){return d("setdropoffvolume",{new:F})}return M}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Sustain indefinitely last held note",children:(0,e.createComponentVNode)(2,o.Button,{selected:E,icon:E?"toggle-on":"toggle-off",content:E?"Yes":"No",onClick:function(){function M(){return d("togglesustainhold")}return M}()})})],4)]}),(0,e.createComponentVNode)(2,o.Button,{icon:"redo",content:"Reset to Default",mt:"0.5rem",onClick:function(){function M(){return d("reset")}return M}()})]})})})},C=function(u,f){var l=(0,t.useBackend)(f),d=l.act,m=l.data,i=m.playing,h=m.lines,V=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:!V||i,icon:"plus",content:"Add Line",onClick:function(){function v(){return d("newline",{line:h.length+1})}return v}()}),(0,e.createComponentVNode)(2,o.Button,{selected:!V,icon:V?"chevron-up":"chevron-down",onClick:function(){function v(){return d("edit")}return v}()})],4),children:!!V&&(h.length>0?(0,e.createComponentVNode)(2,o.LabeledList,{children:h.map(function(v,s){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:s+1,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:i,icon:"pen",onClick:function(){function g(){return d("modifyline",{line:s+1})}return g}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:i,icon:"trash",onClick:function(){function g(){return d("deleteline",{line:s+1})}return g}()})],4),children:v},s)})}):(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),p=r.ItemPixelShift=function(){function k(y,S){var b=(0,a.useBackend)(S),C=b.act,c=b.data,u=c.pixel_x,f=c.pixel_y,l=c.max_shift_x,d=c.max_shift_y,m=c.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:u===-l,onClick:function(){function i(){return C("shift_left")}return i}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,lineHeight:1.7,width:"75px",unit:"pixels",stepPixelSize:6,value:u,minValue:-l,maxValue:l,onChange:function(){function i(h,V){return C("custom_x",{pixel_x:V})}return i}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-right",title:"Shifts item rightwards.",disabled:u===l,onClick:function(){function i(){return C("shift_right")}return i}()})]}),(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===d,onClick:function(){function i(){return C("shift_up")}return i}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,lineHeight:1.7,width:"75px",unit:"pixels",stepPixelSize:6,value:f,minValue:-d,maxValue:d,onChange:function(){function i(h,V){return C("custom_y",{pixel_y:V})}return i}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",title:"Shifts item downwards.",disabled:f===-d,onClick:function(){function i(){return C("shift_down")}return i}()})]})]})}),(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 i(){return C("move_to_top")}return i}()})}),(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 i(){return C("toggle")}return i}()})})]})})]})})}return k}()},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),p=n(98595),k=n(19203),y=n(51057),S=function(l){return l.key!==a.KEY.Alt&&l.key!==a.KEY.Control&&l.key!==a.KEY.Shift&&l.key!==a.KEY.Escape},b={DEL:"Delete",DOWN:"South",END:"Southwest",HOME:"Northwest",INSERT:"Insert",LEFT:"West",PAGEDOWN:"Southeast",PAGEUP:"Northeast",RIGHT:"East",SPACEBAR:"Space",UP:"North"},C=3,c=function(l){var d="";if(l.altKey&&(d+="Alt"),l.ctrlKey&&(d+="Ctrl"),l.shiftKey&&!(l.keyCode>=48&&l.keyCode<=57)&&(d+="Shift"),l.location===C&&(d+="Numpad"),S(l))if(l.shiftKey&&l.keyCode>=48&&l.keyCode<=57){var m=l.keyCode-48;d+="Shift"+m}else{var i=l.key.toUpperCase();d+=b[i]||i}return d},u=r.KeyComboModal=function(){function f(l,d){var m=(0,t.useBackend)(d),i=m.act,h=m.data,V=h.init_value,v=h.large_buttons,s=h.message,g=s===void 0?"":s,N=h.title,x=h.timeout,B=(0,t.useLocalState)(d,"input",V),L=B[0],T=B[1],A=(0,t.useLocalState)(d,"binding",!0),E=A[0],w=A[1],O=function(){function F(R){if(!E){R.key===a.KEY.Enter&&i("submit",{entry:L}),R.key===a.KEY.Escape&&i("cancel");return}if(R.preventDefault(),S(R)){M(c(R)),w(!1);return}else if(R.key===a.KEY.Escape){M(V),w(!1);return}}return F}(),M=function(){function F(R){R!==L&&T(R)}return F}(),P=130+(g.length>30?Math.ceil(g.length/3):0)+(g.length&&v?5:0);return(0,e.createComponentVNode)(2,p.Window,{title:N,width:240,height:P,children:[x&&(0,e.createComponentVNode)(2,y.Loader,{value:x}),(0,e.createComponentVNode)(2,p.Window.Content,{onKeyDown:function(){function F(R){O(R)}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:g})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{disabled:E,content:E&&E!==null?"Awaiting input...":""+L,width:"100%",textAlign:"center",onClick:function(){function F(){M(V),w(!0)}return F}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,k.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),p=r.KeycardAuth=function(){function k(y,S){var b=(0,a.useBackend)(S),C=b.act,c=b.data,u=(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(!c.swiping&&!c.busy)return(0,e.createComponentVNode)(2,o.Window,{width:540,height:280,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[u,(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:!c.redAvailable,onClick:function(){function l(){return C("triggerevent",{triggerevent:"Red Alert"})}return l}(),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 l(){return C("triggerevent",{triggerevent:"Emergency Response Team"})}return l}(),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 l(){return C("triggerevent",{triggerevent:"Grant Emergency Maintenance Access"})}return l}(),content:"Grant"}),(0,e.createComponentVNode)(2,t.Button,{icon:"door-closed",onClick:function(){function l(){return C("triggerevent",{triggerevent:"Revoke Emergency Maintenance Access"})}return l}(),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 l(){return C("triggerevent",{triggerevent:"Activate Station-Wide Emergency Access"})}return l}(),content:"Grant"}),(0,e.createComponentVNode)(2,t.Button,{icon:"door-closed",onClick:function(){function l(){return C("triggerevent",{triggerevent:"Deactivate Station-Wide Emergency Access"})}return l}(),content:"Revoke"})]})]})})]})});var f=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Waiting for YOU to swipe your ID..."});return!c.hasSwiped&&!c.ertreason&&c.event==="Emergency Response Team"?f=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Fill out the reason for your ERT request."}):c.hasConfirm?f=(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Request Confirmed!"}):c.isRemote?f=(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"Swipe your card to CONFIRM the remote request."}):c.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:[u,c.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:c.ertreason?"":"red",icon:c.ertreason?"check":"pencil-alt",content:c.ertreason?c.ertreason:"-----",disabled:c.busy,onClick:function(){function l(){return C("ert")}return l}()})})}),(0,e.createComponentVNode)(2,t.Section,{title:c.event,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back",disabled:c.busy||c.hasConfirm,onClick:function(){function l(){return C("reset")}return l}()}),children:f})]})})}return k}()},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),p=n(98595),k=r.LaborClaimConsole=function(){function b(C,c){return(0,e.createComponentVNode)(2,p.Window,{width:315,height:470,children:(0,e.createComponentVNode)(2,p.Window.Content,{children:[(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,S)]})})}return b}(),y=function(C,c){var u=(0,t.useBackend)(c),f=u.act,l=u.data,d=l.can_go_home,m=l.emagged,i=l.id_inserted,h=l.id_name,V=l.id_points,v=l.id_goal,s=l.unclaimed_points,g=m?0:1,N=m?"ERR0R":d?"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:!!i&&(0,e.createComponentVNode)(2,o.ProgressBar,{value:V/v,ranges:{good:[g,1/0],bad:[-1/0,g]},children:V+" / "+v+" "+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:!d,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 ("+s+")",disabled:!i||!s,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:i?h:"-------------",onClick:function(){function x(){return f("handle_id")}return x}()})})]})})},S=function(C,c){var u=(0,t.useBackend)(c),f=u.data,l=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"})]}),l.map(function(d){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,a.toTitleCase)(d.ore)}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,textAlign:"right",children:(0,e.createComponentVNode)(2,o.Box,{color:"label",inline:!0,children:d.value})})]},d.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),p=r.LawManager=function(){function b(C,c){var u=(0,a.useBackend)(c),f=u.act,l=u.data,d=l.isAdmin,m=l.isSlaved,i=l.isMalf,h=l.isAIMalf,V=l.view;return(0,e.createComponentVNode)(2,o.Window,{width:800,height:i?620:365,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[!!(d&&m)&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:["This unit is slaved to ",m,"."]}),!!(i||h)&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Law Management",selected:V===0,onClick:function(){function v(){return f("set_view",{set_view:0})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Lawsets",selected:V===1,onClick:function(){function v(){return f("set_view",{set_view:1})}return v}()})]}),V===0&&(0,e.createComponentVNode)(2,k),V===1&&(0,e.createComponentVNode)(2,y)]})})}return b}(),k=function(C,c){var u=(0,a.useBackend)(c),f=u.act,l=u.data,d=l.has_zeroth_laws,m=l.zeroth_laws,i=l.has_ion_laws,h=l.ion_laws,V=l.ion_law_nr,v=l.has_inherent_laws,s=l.inherent_laws,g=l.has_supplied_laws,N=l.supplied_laws,x=l.channels,B=l.channel,L=l.isMalf,T=l.isAdmin,A=l.zeroth_law,E=l.ion_law,w=l.inherent_law,O=l.supplied_law,M=l.supplied_law_position;return(0,e.createFragment)([!!d&&(0,e.createComponentVNode)(2,S,{title:"ERR_NULL_VALUE",laws:m,ctx:c}),!!i&&(0,e.createComponentVNode)(2,S,{title:V,laws:h,ctx:c}),!!v&&(0,e.createComponentVNode)(2,S,{title:"Inherent",laws:s,ctx:c}),!!g&&(0,e.createComponentVNode)(2,S,{title:"Supplied",laws:N,ctx:c}),(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(P){return(0,e.createComponentVNode)(2,t.Button,{content:P.channel,selected:P.channel===B,onClick:function(){function F(){return f("law_channel",{law_channel:P.channel})}return F}()},P.channel)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"State Laws",children:(0,e.createComponentVNode)(2,t.Button,{content:"State Laws",onClick:function(){function P(){return f("state_laws")}return P}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Law Notification",children:(0,e.createComponentVNode)(2,t.Button,{content:"Notify",onClick:function(){function P(){return f("notify_laws")}return P}()})})]})}),!!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"})]}),!!(T&&!d)&&(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 P(){return f("change_zeroth_law")}return P}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function P(){return f("add_zeroth_law")}return P}()})]})]}),(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: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 P(){return f("change_ion_law")}return P}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function P(){return f("add_ion_law")}return P}()})]})]}),(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:w}),(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 P(){return f("change_inherent_law")}return P}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function P(){return f("add_inherent_law")}return P}()})]})]}),(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:M,onClick:function(){function P(){return f("change_supplied_law_position")}return P}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function P(){return f("change_supplied_law")}return P}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function P(){return f("add_supplied_law")}return P}()})]})]})]})})],0)},y=function(C,c){var u=(0,a.useBackend)(c),f=u.act,l=u.data,d=l.law_sets;return(0,e.createComponentVNode)(2,t.Box,{children:d.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 i(){return f("transfer_laws",{transfer_laws:m.ref})}return i}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[m.laws.has_ion_laws>0&&m.laws.ion_laws.map(function(i){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:i.index,children:i.law},i.index)}),m.laws.has_zeroth_laws>0&&m.laws.zeroth_laws.map(function(i){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:i.index,children:i.law},i.index)}),m.laws.has_inherent_laws>0&&m.laws.inherent_laws.map(function(i){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:i.index,children:i.law},i.index)}),m.laws.has_supplied_laws>0&&m.laws.inherent_laws.map(function(i){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:i.index,children:i.law},i.index)})]})},m.name)})})},S=function(C,c){var u=(0,a.useBackend)(C.ctx),f=u.act,l=u.data,d=l.isMalf;return(0,e.createComponentVNode)(2,t.Section,{title:C.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?"})]}),C.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 i(){return f("state_law",{ref:m.ref,state_law:m.state?0:1})}return i}()}),!!d&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function i(){return f("edit_law",{edit_law:m.ref})}return i}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Delete",icon:"trash",color:"red",onClick:function(){function i(){return f("delete_law",{delete_law:m.ref})}return i}()})],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),p=n(72253),k=n(92986),y=n(98595),S=r.ListInputModal=function(){function c(u,f){var l=(0,p.useBackend)(f),d=l.act,m=l.data,i=m.items,h=i===void 0?[]:i,V=m.message,v=V===void 0?"":V,s=m.init_value,g=m.timeout,N=m.title,x=(0,p.useLocalState)(f,"selected",h.indexOf(s)),B=x[0],L=x[1],T=(0,p.useLocalState)(f,"searchBarVisible",h.length>10),A=T[0],E=T[1],w=(0,p.useLocalState)(f,"searchQuery",""),O=w[0],M=w[1],P=function(){function ne(Y){var le=K.length-1;if(Y===k.KEY_DOWN)if(B===null||B===le){var de;L(0),(de=document.getElementById("0"))==null||de.scrollIntoView()}else{var oe;L(B+1),(oe=document.getElementById((B+1).toString()))==null||oe.scrollIntoView()}else if(Y===k.KEY_UP)if(B===null||B===0){var re;L(le),(re=document.getElementById(le.toString()))==null||re.scrollIntoView()}else{var Z;L(B-1),(Z=document.getElementById((B-1).toString()))==null||Z.scrollIntoView()}}return ne}(),F=function(){function ne(Y){Y!==B&&L(Y)}return ne}(),R=function(){function ne(){E(!1),E(!0)}return ne}(),U=function(){function ne(Y){var le=String.fromCharCode(Y),de=h.find(function(Z){return Z==null?void 0:Z.toLowerCase().startsWith(le==null?void 0:le.toLowerCase())});if(de){var oe,re=h.indexOf(de);L(re),(oe=document.getElementById(re.toString()))==null||oe.scrollIntoView()}}return ne}(),j=function(){function ne(Y){var le;Y!==O&&(M(Y),L(0),(le=document.getElementById("0"))==null||le.scrollIntoView())}return ne}(),W=function(){function ne(){E(!A),M("")}return ne}(),K=h.filter(function(ne){return ne==null?void 0:ne.toLowerCase().includes(O.toLowerCase())}),$=330+Math.ceil(v.length/3);return A||setTimeout(function(){var ne;return(ne=document.getElementById(B.toString()))==null?void 0:ne.focus()},1),(0,e.createComponentVNode)(2,y.Window,{title:N,width:325,height:$,children:[g&&(0,e.createComponentVNode)(2,a.Loader,{value:g}),(0,e.createComponentVNode)(2,y.Window.Content,{onKeyDown:function(){function ne(Y){var le=window.event?Y.which:Y.keyCode;(le===k.KEY_DOWN||le===k.KEY_UP)&&(Y.preventDefault(),P(le)),le===k.KEY_ENTER&&(Y.preventDefault(),d("submit",{entry:K[B]})),!A&&le>=k.KEY_A&&le<=k.KEY_Z&&(Y.preventDefault(),U(le)),le===k.KEY_ESCAPE&&(Y.preventDefault(),d("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 W()}return ne}()}),className:"ListInput__Section",fill:!0,title:v,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,b,{filteredItems:K,onClick:F,onFocusSearch:R,searchBarVisible:A,selected:B})}),(0,e.createComponentVNode)(2,o.Stack.Item,{m:0,children:A&&(0,e.createComponentVNode)(2,C,{filteredItems:K,onSearch:j,searchQuery:O,selected:B})}),(0,e.createComponentVNode)(2,o.Stack.Item,{mt:.5,children:(0,e.createComponentVNode)(2,t.InputButtons,{input:K[B]})})]})})})]})}return c}(),b=function(u,f){var l=(0,p.useBackend)(f),d=l.act,m=u.filteredItems,i=u.onClick,h=u.onFocusSearch,V=u.searchBarVisible,v=u.selected;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,tabIndex:0,children:m.map(function(s,g){return(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:"transparent",id:g,onClick:function(){function N(){return i(g)}return N}(),onDblClick:function(){function N(x){x.preventDefault(),d("submit",{entry:m[v]})}return N}(),onKeyDown:function(){function N(x){var B=window.event?x.which:x.keyCode;V&&B>=k.KEY_A&&B<=k.KEY_Z&&(x.preventDefault(),h())}return N}(),selected:g===v,style:{animation:"none",transition:"none"},children:s.replace(/^\w/,function(N){return N.toUpperCase()})},g)})})},C=function(u,f){var l=(0,p.useBackend)(f),d=l.act,m=u.filteredItems,i=u.onSearch,h=u.searchQuery,V=u.selected;return(0,e.createComponentVNode)(2,o.Input,{width:"100%",autoFocus:!0,autoSelect:!0,onEnter:function(){function v(s){s.preventDefault(),d("submit",{entry:m[V]})}return v}(),onInput:function(){function v(s,g){return i(g)}return v}(),placeholder:"Search...",value:h})}},26826:function(I,r,n){"use strict";r.__esModule=!0,r.Loadout=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),p=n(98595),k={Default:function(){function u(f,l){return f.gear.gear_tier-l.gear.gear_tier}return u}(),Alphabetical:function(){function u(f,l){return f.gear.name.toLowerCase().localeCompare(l.gear.name.toLowerCase())}return u}(),Cost:function(){function u(f,l){return f.gear.cost-l.gear.cost}return u}()},y=r.Loadout=function(){function u(f,l){var d=(0,t.useBackend)(l),m=d.act,i=d.data,h=(0,t.useLocalState)(l,"search",!1),V=h[0],v=h[1],s=(0,t.useLocalState)(l,"searchText",""),g=s[0],N=s[1],x=(0,t.useLocalState)(l,"category",Object.keys(i.gears)[0]),B=x[0],L=x[1],T=(0,t.useLocalState)(l,"tweakedGear",""),A=T[0],E=T[1];return(0,e.createComponentVNode)(2,p.Window,{width:975,height:650,children:[A&&(0,e.createComponentVNode)(2,c,{tweakedGear:A,setTweakedGear:E}),(0,e.createComponentVNode)(2,p.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,S,{category:B,setCategory:L})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"25%",children:(0,e.createComponentVNode)(2,C,{setTweakedGear:E})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"75%",children:(0,e.createComponentVNode)(2,b,{category:B,search:V,setSearch:v,searchText:g,setSearchText:N})})]})})]})})]})}return u}(),S=function(f,l){var d=(0,t.useBackend)(l),m=d.act,i=d.data,h=f.category,V=f.setCategory;return(0,e.createComponentVNode)(2,o.Tabs,{fluid:!0,textAlign:"center",style:{"flex-wrap":"wrap-reverse"},children:Object.keys(i.gears).map(function(v){return(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:v===h,style:{"white-space":"nowrap"},onClick:function(){function s(){return V(v)}return s}(),children:v},v)})})},b=function(f,l){var d=(0,t.useBackend)(l),m=d.act,i=d.data,h=i.user_tier,V=i.gear_slots,v=i.max_gear_slots,s=f.category,g=f.search,N=f.setSearch,x=f.searchText,B=f.setSearchText,L=(0,t.useLocalState)(l,"sortType","Default"),T=L[0],A=L[1],E=(0,t.useLocalState)(l,"sortReverse",!1),w=E[0],O=E[1],M=(0,a.createSearch)(x,function(F){return F.name}),P;return x.length>2?P=Object.entries(i.gears).reduce(function(F,R){var U=R[0],j=R[1];return F.concat(Object.entries(j).map(function(W){var K=W[0],$=W[1];return{key:K,gear:$}}))},[]).filter(function(F){var R=F.gear;return M(R)}):P=Object.entries(i.gears[s]).map(function(F){var R=F[0],U=F[1];return{key:R,gear:U}}),P.sort(k[T]),w&&(P=P.reverse()),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:s,buttons:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Dropdown,{height:1.66,selected:T,options:Object.keys(k),onSelected:function(){function F(R){return A(R)}return F}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:w?"arrow-down-wide-short":"arrow-down-short-wide",tooltip:w?"Ascending order":"Descending order",tooltipPosition:"bottom-end",onClick:function(){function F(){return O(!w)}return F}()})}),g&&(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Input,{width:20,placeholder:"Search...",value:x,onInput:function(){function F(R){return B(R.target.value)}return F}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:"magnifying-glass",selected:g,tooltip:"Toggle search field",tooltipPosition:"bottom-end",onClick:function(){function F(){N(!g),B("")}return F}()})})]}),children:P.map(function(F){var R=F.key,U=F.gear,j=12,W=Object.keys(i.selected_gears).includes(R),K=(U.cost===1,U.cost+" Points"),$=(0,e.createComponentVNode)(2,o.Box,{children:[U.name.length>j&&(0,e.createComponentVNode)(2,o.Box,{children:U.name}),U.gear_tier>h&&(0,e.createComponentVNode)(2,o.Box,{mt:U.name.length>j&&1.5,textColor:"red",children:"That gear is only available at a higher donation tier than you are on."})]}),ne=(0,e.createFragment)([U.allowed_roles&&(0,e.createComponentVNode)(2,o.Button,{width:"22px",color:"transparent",icon:"user",tooltip:(0,e.createComponentVNode)(2,o.Section,{m:-1,title:"Allowed Roles",children:U.allowed_roles.map(function(le){return(0,e.createComponentVNode)(2,o.Box,{children:le},le)})}),tooltipPosition:"left"}),Object.entries(U.tweaks).map(function(le){var de=le[0],oe=le[1];return oe.map(function(re){return(0,e.createComponentVNode)(2,o.Button,{width:"22px",color:"transparent",icon:re.icon,tooltip:re.tooltip,tooltipPosition:"top"},de)})}),(0,e.createComponentVNode)(2,o.Button,{width:"22px",color:"transparent",icon:"info",tooltip:U.desc,tooltipPosition:"top"})],0),Y=(0,e.createComponentVNode)(2,o.Box,{class:"Loadout-InfoBox",children:[(0,e.createComponentVNode)(2,o.Box,{style:{"flex-grow":1},fontSize:1,color:"gold",opacity:.75,children:U.gear_tier>0&&"Tier "+U.gear_tier}),(0,e.createComponentVNode)(2,o.Box,{fontSize:.75,opacity:.66,children:K})]});return(0,e.createComponentVNode)(2,o.ImageButtonTS,{m:.5,imageSize:84,dmIcon:U.icon,dmIconState:U.icon_state,tooltip:(U.name.length>j||U.gear_tier>0)&&$,tooltipPosition:"bottom",selected:W,disabled:U.gear_tier>h||V+U.cost>v&&!W,buttons:ne,buttonsAlt:Y,onClick:function(){function le(){return m("toggle_gear",{gear:U.index_name})}return le}(),children:U.name},R)})})},C=function(f,l){var d=(0,t.useBackend)(l),m=d.act,i=d.data,h=f.setTweakedGear,V=Object.entries(i.gears).reduce(function(v,s){var g=s[0],N=s[1],x=Object.entries(N).filter(function(B){var L=B[0];return Object.keys(i.selected_gears).includes(L)}).map(function(B){var L=B[0],T=B[1];return Object.assign({key:L},T)});return v.concat(x)},[]);return(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.Section,{fill:!0,scrollable:!0,title:"Selected Equipment",buttons:(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",tooltip:"Clear Loadout",tooltipPosition:"bottom-end",onClick:function(){function v(){return m("clear_loadout")}return v}()}),children:V.map(function(v){var s=i.selected_gears[v.key];return(0,e.createComponentVNode)(2,o.ImageButtonTS,{fluid:!0,imageSize:48,base64:s.icon,dmIcon:s.icon_file?s.icon_file:v.icon,dmIconState:s.icon_state?s.icon_state:v.icon_state,buttons:(0,e.createFragment)([Object.entries(v.tweaks).length>0&&(0,e.createComponentVNode)(2,o.Button,{color:"translucent",icon:"gears",iconColor:"gray",width:"33px",onClick:function(){function g(){return h(v)}return g}()}),(0,e.createComponentVNode)(2,o.Button,{color:"translucent",icon:"times",iconColor:"red",width:"32px",onClick:function(){function g(){return m("toggle_gear",{gear:v.index_name})}return g}()})],0),children:s.name?s.name:v.name},v.key)})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.ProgressBar,{value:i.gear_slots,maxValue:i.max_gear_slots,ranges:{bad:[i.max_gear_slots,1/0],average:[i.max_gear_slots*.66,i.max_gear_slots],good:[0,i.max_gear_slots*.66]},children:(0,e.createComponentVNode)(2,o.Box,{textAlign:"center",children:["Used points ",i.gear_slots,"/",i.max_gear_slots]})})})})]})},c=function(f,l){var d=(0,t.useBackend)(l),m=d.act,i=d.data,h=f.tweakedGear,V=f.setTweakedGear;return(0,e.createComponentVNode)(2,o.Dimmer,{children:(0,e.createComponentVNode)(2,o.Box,{className:"Loadout-Modal__background",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,width:20,height:20,title:h.name,buttons:(0,e.createComponentVNode)(2,o.Button,{color:"red",icon:"times",tooltip:"Close",tooltipPosition:"top",onClick:function(){function v(){return V("")}return v}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:Object.entries(h.tweaks).map(function(v){var s=v[0],g=v[1];return g.map(function(N){var x=i.selected_gears[h.key][s];return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:N.name,color:x?"":"gray",buttons:(0,e.createComponentVNode)(2,o.Button,{color:"transparent",icon:"pen",onClick:function(){function B(){return m("set_tweak",{gear:h.index_name,tweak:s})}return B}()}),children:[x||"Default",(0,e.createComponentVNode)(2,o.Box,{inline:!0,ml:1,width:1,height:1,verticalAlign:"middle",style:{"background-color":""+x}})]},s)})})})})})})}},88832:function(I,r,n){"use strict";r.__esModule=!0,r.MatrixMathTester=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(44879),p=n(98595),k=function(b,C){var c=(0,a.useBackend)(C),u=c.act;return(0,e.createComponentVNode)(2,t.NumberInput,{value:b.value,step:.005,format:function(){function f(l){return(0,o.toFixed)(l,3)}return f}(),width:"100%",onChange:function(){function f(l,d){return u("change_var",{var_name:b.varName,var_value:d})}return f}()})},y=r.MatrixMathTester=function(){function S(b,C){var c=(0,a.useBackend)(C),u=c.act,f=c.data,l=f.matrix_a,d=f.matrix_b,m=f.matrix_c,i=f.matrix_d,h=f.matrix_e,V=f.matrix_f,v=f.pixelated,s=(0,a.useLocalState)(C,"scale_x",1),g=s[0],N=s[1],x=(0,a.useLocalState)(C,"scale_y",1),B=x[0],L=x[1],T=(0,a.useLocalState)(C,"translate_x",0),A=T[0],E=T[1],w=(0,a.useLocalState)(C,"translate_y",0),O=w[0],M=w[1],P=(0,a.useLocalState)(C,"shear_x",0),F=P[0],R=P[1],U=(0,a.useLocalState)(C,"shear_y",0),j=U[0],W=U[1],K=(0,a.useLocalState)(C,"angle",0),$=K[0],ne=K[1];return(0,e.createComponentVNode)(2,p.Window,{title:"Transform Editor",width:290,height:270,children:(0,e.createComponentVNode)(2,p.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,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:"30%"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"25%",children:"X"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"25%",children:"Y"})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Position(c, f)"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,k,{value:m,varName:"c"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,k,{value:V,varName:"f"})})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Incline(b, d)"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,k,{value:d,varName:"b"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,k,{value:i,varName:"d"})})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Scale(a,e)"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,k,{value:l,varName:"a"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,k,{value:h,varName:"e"})})]})]}),(0,e.createComponentVNode)(2,t.Table,{mt:3,children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Action"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"X"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Y"})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"up-right-and-down-left-from-center",content:"Scale",width:"100%",onClick:function(){function Y(){return u("scale",{x:g,y:B})}return Y}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.NumberInput,{value:g,step:.05,format:function(){function Y(le){return(0,o.toFixed)(le,2)}return Y}(),width:"100%",onChange:function(){function Y(le,de){return N(de)}return Y}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.NumberInput,{value:B,step:.05,format:function(){function Y(le){return(0,o.toFixed)(le,2)}return Y}(),width:"100%",onChange:function(){function Y(le,de){return L(de)}return Y}()})})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-right",content:"Translate",width:"100%",onClick:function(){function Y(){return u("translate",{x:A,y:O})}return Y}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.NumberInput,{value:A,step:1,format:function(){function Y(le){return(0,o.toFixed)(le,0)}return Y}(),width:"100%",onChange:function(){function Y(le,de){return E(de)}return Y}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.NumberInput,{value:O,step:1,format:function(){function Y(le){return(0,o.toFixed)(le,0)}return Y}(),width:"100%",onChange:function(){function Y(le,de){return M(de)}return Y}()})})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"maximize",content:"Shear",width:"100%",onClick:function(){function Y(){return u("shear",{x:F,y:j})}return Y}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.NumberInput,{value:F,step:.005,format:function(){function Y(le){return(0,o.toFixed)(le,3)}return Y}(),width:"100%",onChange:function(){function Y(le,de){return R(de)}return Y}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.NumberInput,{value:j,step:.005,format:function(){function Y(le){return(0,o.toFixed)(le,3)}return Y}(),width:"100%",onChange:function(){function Y(le,de){return W(de)}return Y}()})})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"rotate-right",content:"Rotate",width:"100%",onClick:function(){function Y(){return u("turn",{angle:$})}return Y}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.NumberInput,{value:$,step:.5,maxValue:360,minValue:-360,format:function(){function Y(le){return(0,o.toFixed)(le,1)}return Y}(),width:"100%",onChange:function(){function Y(le,de){return ne(de)}return Y}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"dog",color:"bad",selected:v,content:"PET",tooltip:"Pixel Enhanced Transforming",tooltipPosition:"bottom",width:"100%",onClick:function(){function Y(){return u("toggle_pixel")}return Y}()})})]})]})]})})})}return S}()},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),p=r.MechBayConsole=function(){function k(y,S){var b=(0,a.useBackend)(S),C=b.act,c=b.data,u=c.recharge_port,f=u&&u.mech,l=f&&f.cell,d=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:d?"Mech status: "+d:"Mech status",textAlign:"center",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Sync",onClick:function(){function m(){return C("reconnect")}return m}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:!u&&(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:!u&&(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."})||!l&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No cell is installed."})||(0,e.createComponentVNode)(2,t.ProgressBar,{value:l.charge/l.maxcharge,ranges:{good:[.7,1/0],average:[.3,.7],bad:[-1/0,.3]},children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:l.charge})," / "+l.maxcharge]})})]})})})})}return k}()},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),p=n(98595),k=n(25328),y=r.MechaControlConsole=function(){function S(b,C){var c=(0,t.useBackend)(C),u=c.act,f=c.data,l=f.beacons,d=f.stored_data;return d.length?(0,e.createComponentVNode)(2,p.Window,{width:420,height:500,children:(0,e.createComponentVNode)(2,p.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 u("clear_log")}return m}()}),children:d.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,k.decodeHtmlEntities)(m.message)})]},m.time)})})})}):(0,e.createComponentVNode)(2,p.Window,{width:420,height:500,children:(0,e.createComponentVNode)(2,p.Window.Content,{scrollable:!0,children:l.length&&l.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 i(){return u("send_message",{mt:m.uid})}return i}(),children:"Message"}),(0,e.createComponentVNode)(2,o.Button,{icon:"eye",onClick:function(){function i(){return u("get_log",{mt:m.uid})}return i}(),children:"View Log"}),(0,e.createComponentVNode)(2,o.Button.Confirm,{color:"red",content:"EMP",icon:"bomb",onClick:function(){function i(){return u("shock",{mt:m.uid})}return i}()})],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,k.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 S}()},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),p=n(3939),k=n(98595),y=n(321),S=n(5485),b=n(22091),C={Minor:"lightgray",Medium:"good",Harmful:"average","Dangerous!":"bad","BIOHAZARD THREAT!":"darkred"},c={"*Deceased*":"deceased","*SSD*":"ssd","Physically Unfit":"physically_unfit",Disabled:"disabled"},u=function(T,A){(0,p.modalOpen)(T,"edit",{field:A.edit,value:A.value})},f=function(T,A){var E=T.args;return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:E.name||"\u0412\u0438\u0440\u0443\u0441",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:"\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0441\u0442\u0430\u0434\u0438\u0439",children:E.max_stages}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0420\u0430\u0441\u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0435\u043D\u0438\u0435",children:E.spread_text}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0412\u043E\u0437\u043C\u043E\u0436\u043D\u044B\u0435 \u043C\u0435\u0442\u043E\u0434\u044B \u043B\u0435\u0447\u0435\u043D\u0438\u044F",children:E.cure}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0417\u0430\u043C\u0435\u0442\u043A\u0438",children:E.desc}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0422\u044F\u0436\u0435\u0441\u0442\u044C",color:C[E.severity],children:E.severity})]})})})},l=r.MedicalRecords=function(){function L(T,A){var E=(0,t.useBackend)(A),w=E.data,O=w.loginState,M=w.screen;if(!O.logged_in)return(0,e.createComponentVNode)(2,k.Window,{width:800,height:900,children:(0,e.createComponentVNode)(2,k.Window.Content,{children:(0,e.createComponentVNode)(2,S.LoginScreen)})});var P;return M===2?P=(0,e.createComponentVNode)(2,d):M===3?P=(0,e.createComponentVNode)(2,m):M===4?P=(0,e.createComponentVNode)(2,i):M===5?P=(0,e.createComponentVNode)(2,s):M===6&&(P=(0,e.createComponentVNode)(2,g)),(0,e.createComponentVNode)(2,k.Window,{width:800,height:900,children:[(0,e.createComponentVNode)(2,p.ComplexModal),(0,e.createComponentVNode)(2,k.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y.LoginInfo),(0,e.createComponentVNode)(2,b.TemporaryNotice),(0,e.createComponentVNode)(2,B),P]})})]})}return L}(),d=function(T,A){var E=(0,t.useBackend)(A),w=E.act,O=E.data,M=O.records,P=(0,t.useLocalState)(A,"searchText",""),F=P[0],R=P[1],U=(0,t.useLocalState)(A,"sortId","name"),j=U[0],W=U[1],K=(0,t.useLocalState)(A,"sortOrder",!0),$=K[0],ne=K[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:"\u041C\u0435\u0434\u0438\u0446\u0438\u043D\u0441\u043A\u0438\u0435 \u0437\u0430\u043F\u0438\u0441\u0438",icon:"wrench",ml:"0.25rem",onClick:function(){function Y(){return w("screen",{screen:3})}return Y}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{fluid:!0,placeholder:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0418\u043C\u044F, ID, \u0424\u0438\u0437\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u0438\u043B\u0438 \u041F\u0441\u0438\u0445\u043E\u043B\u043E\u0433\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435",onInput:function(){function Y(le,de){return R(de)}return Y}()})})]})}),(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:"\u0418\u043C\u044F"}),(0,e.createComponentVNode)(2,N,{id:"id",children:"ID"}),(0,e.createComponentVNode)(2,N,{id:"rank",children:"\u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C"}),(0,e.createComponentVNode)(2,N,{id:"p_stat",children:"\u0424\u0438\u0437\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435"}),(0,e.createComponentVNode)(2,N,{id:"m_stat",children:"\u041F\u0441\u0438\u0445\u043E\u043B\u043E\u0433\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435"})]}),M.filter((0,a.createSearch)(F,function(Y){return Y.name+"|"+Y.id+"|"+Y.rank+"|"+Y.p_stat+"|"+Y.m_stat})).sort(function(Y,le){var de=$?1:-1;return Y[j].localeCompare(le[j])*de}).map(function(Y){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listRow--"+c[Y.p_stat],onClick:function(){function le(){return w("view_record",{view_record:Y.ref})}return le}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",Y.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Y.id}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Y.rank}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Y.p_stat}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Y.m_stat})]},Y.id)})]})})})],4)},m=function(T,A){var E=(0,t.useBackend)(A),w=E.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:"\u0420\u0435\u0437\u0435\u0440\u0432\u043D\u043E\u0435 \u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 \u043D\u0430 \u0434\u0438\u0441\u043A\u0435\u0442\u0443",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:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0441 \u0434\u0438\u0441\u043A\u0435\u0442\u044B",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:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0431\u0430\u0437\u0443 \u0434\u0430\u043D\u043D\u044B\u0445 \u043C\u0435\u0434\u0438\u0446\u0438\u043D\u0441\u043A\u0438\u0445 \u0437\u0430\u043F\u0438\u0441\u0435\u0439",onClick:function(){function O(){return w("del_all")}return O}()})})]})})},i=function(T,A){var E=(0,t.useBackend)(A),w=E.act,O=E.data,M=O.medical,P=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:"\u041E\u0441\u043D\u043E\u0432\u043D\u0430\u044F \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:P?"spinner":"print",disabled:P,iconSpin:!!P,content:"\u0420\u0430\u0441\u043F\u0435\u0447\u0430\u0442\u0430\u0442\u044C \u0437\u0430\u043F\u0438\u0441\u044C",ml:"0.5rem",onClick:function(){function F(){return w("print_record")}return F}()}),children:(0,e.createComponentVNode)(2,h)})}),!M||!M.fields?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"\u041C\u0435\u0434\u0438\u0446\u0438\u043D\u0441\u043A\u0430\u044F \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"pen",content:"\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u043D\u043E\u0432\u0443\u044E \u0437\u0430\u043F\u0438\u0441\u044C",onClick:function(){function F(){return w("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"),"\u041C\u0435\u0434\u0438\u0446\u0438\u043D\u0441\u043A\u0430\u044F \u0437\u0430\u043F\u0438\u0441\u044C \u0443\u0442\u0440\u0430\u0447\u0435\u043D\u0430!"]})})})}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"\u041C\u0435\u0434\u0438\u0446\u0438\u043D\u0441\u043A\u0430\u044F \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F",buttons:(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",disabled:!!M.empty,content:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u043C\u0435\u0434\u0438\u0446\u0438\u043D\u0441\u043A\u0443\u044E \u0437\u0430\u043F\u0438\u0441\u044C",onClick:function(){function F(){return w("del_r")}return F}()}),children:(0,e.createComponentVNode)(2,V)})}),(0,e.createComponentVNode)(2,v)],4)],0)},h=function(T,A){var E=(0,t.useBackend)(A),w=E.data,O=w.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(M,P){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:M.field,children:[(0,e.createComponentVNode)(2,o.Box,{height:"20px",inline:!0,children:M.value}),!!M.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",onClick:function(){function F(){return u(A,M)}return F}()})]},P)})})}),!!O.has_photos&&O.photos.map(function(M,P){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:M,style:{width:"96px","margin-top":"2.5rem","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}}),(0,e.createVNode)(1,"br"),"\u0424\u043E\u0442\u043E \u2116",P+1]},P)})]})},V=function(T,A){var E=(0,t.useBackend)(A),w=E.act,O=E.data,M=O.medical;return!M||!M.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:"\u041C\u0435\u0434\u0438\u0446\u0438\u043D\u0441\u043A\u0430\u044F \u0437\u0430\u043F\u0438\u0441\u044C \u0443\u0442\u0440\u0430\u0447\u0435\u043D\u0430!"})})}):(0,e.createComponentVNode)(2,o.Stack,{children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:M.fields.map(function(P,F){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:P.field,preserveWhitespace:!0,children:[(0,a.decodeHtmlEntities)(P.value),!!P.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",mb:P.line_break?"1rem":"initial",onClick:function(){function R(){return u(A,P)}return R}()})]},F)})})})})},v=function(T,A){var E=(0,t.useBackend)(A),w=E.act,O=E.data,M=O.medical;return(0,e.createComponentVNode)(2,o.Stack.Item,{height:"150px",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0438",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"comment",content:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439",onClick:function(){function P(){return(0,p.modalOpen)(A,"add_comment")}return P}()}),children:M.comments.length===0?(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0438 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442."}):M.comments.map(function(P,F){return(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{color:"label",inline:!0,children:P.header}),(0,e.createVNode)(1,"br"),P.text,(0,e.createComponentVNode)(2,o.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){function R(){return w("del_c",{del_c:F+1})}return R}()})]},F)})})})},s=function(T,A){var E=(0,t.useBackend)(A),w=E.act,O=E.data,M=O.virus,P=(0,t.useLocalState)(A,"searchText",""),F=P[0],R=P[1],U=(0,t.useLocalState)(A,"sortId2","name"),j=U[0],W=U[1],K=(0,t.useLocalState)(A,"sortOrder2",!0),$=K[0],ne=K[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:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435, \u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0421\u0442\u0430\u0434\u0438\u0439 \u0438\u043B\u0438 \u0422\u044F\u0436\u0435\u0441\u0442\u044C",onInput:function(){function Y(le,de){return R(de)}return Y}()})}),(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:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435"}),(0,e.createComponentVNode)(2,x,{id:"max_stages",children:"\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0441\u0442\u0430\u0434\u0438\u0439"}),(0,e.createComponentVNode)(2,x,{id:"severity",children:"\u0422\u044F\u0436\u0435\u0441\u0442\u044C"})]}),M.filter((0,a.createSearch)(F,function(Y){return Y.name+"|"+Y.max_stages+"|"+Y.severity})).sort(function(Y,le){var de=$?1:-1;return Y[j].localeCompare(le[j])*de}).map(function(Y){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listVirus--"+Y.severity,onClick:function(){function le(){return w("vir",{vir:Y.D})}return le}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"virus"})," ",Y.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Y.max_stages}),(0,e.createComponentVNode)(2,o.Table.Cell,{color:C[Y.severity],children:Y.severity})]},Y.id)})]})})})})],4)},g=function(T,A){var E=(0,t.useBackend)(A),w=E.act,O=E.data,M=O.medbots;return M.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"),"\u041C\u0435\u0434\u0431\u043E\u0442\u044B \u043D\u0435 \u043E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u044B."]})})})}):(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:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"\u041B\u043E\u043A\u0430\u0446\u0438\u044F"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"\u0421\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"\u0425\u0438\u043C\u0438\u043A\u0430\u0442\u044B"})]}),M.map(function(P){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listMedbot--"+P.on,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"medical"})," ",P.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:[P.area||"\u041D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u043E"," (",P.x,", ",P.y,")"]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:P.on?(0,e.createComponentVNode)(2,o.Box,{color:"good",children:"\u0412\u043A\u043B\u044E\u0447\u0451\u043D"}):(0,e.createComponentVNode)(2,o.Box,{color:"average",children:"\u0412\u044B\u043A\u043B\u044E\u0447\u0435\u043D"})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:P.use_beaker?"\u0401\u043C\u043A\u043E\u0441\u0442\u044C: "+P.total_volume+"/"+P.maximum_volume:"\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0438\u0439 \u0441\u0438\u043D\u0442\u0435\u0437\u0430\u0442\u043E\u0440"})]},P.id)})]})})})},N=function(T,A){var E=(0,t.useLocalState)(A,"sortId","name"),w=E[0],O=E[1],M=(0,t.useLocalState)(A,"sortOrder",!0),P=M[0],F=M[1],R=T.id,U=T.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:w!==R&&"transparent",onClick:function(){function j(){w===R?F(!P):(O(R),F(!0))}return j}(),children:[U,w===R&&(0,e.createComponentVNode)(2,o.Icon,{name:P?"sort-up":"sort-down",ml:"0.25rem;"})]})})},x=function(T,A){var E=(0,t.useLocalState)(A,"sortId2","name"),w=E[0],O=E[1],M=(0,t.useLocalState)(A,"sortOrder2",!0),P=M[0],F=M[1],R=T.id,U=T.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:w!==R&&"transparent",onClick:function(){function j(){w===R?F(!P):(O(R),F(!0))}return j}(),children:[U,w===R&&(0,e.createComponentVNode)(2,o.Icon,{name:P?"sort-up":"sort-down",ml:"0.25rem;"})]})})},B=function(T,A){var E=(0,t.useBackend)(A),w=E.act,O=E.data,M=O.screen,P=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:M===2,onClick:function(){function F(){w("screen",{screen:2})}return F}(),children:"\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u0437\u0430\u043F\u0438\u0441\u0435\u0439"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"database",selected:M===5,onClick:function(){function F(){w("screen",{screen:5})}return F}(),children:"\u0411\u0430\u0437\u0430 \u0434\u0430\u043D\u043D\u044B\u0445 \u0432\u0438\u0440\u0443\u0441\u043E\u0432"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"plus-square",selected:M===6,onClick:function(){function F(){return w("screen",{screen:6})}return F}(),children:"\u041E\u0442\u0441\u043B\u0435\u0436\u0438\u0432\u0430\u043D\u0438\u0435 \u043C\u0435\u0434\u0431\u043E\u0442\u043E\u0432"}),M===3&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"wrench",selected:M===3,children:"\u041E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u0435 \u0431\u0430\u0437\u044B \u0434\u0430\u043D\u043D\u044B\u0445 \u0437\u0430\u043F\u0438\u0441\u0435\u0439"}),M===4&&P&&!P.empty&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"file",selected:M===4,children:["\u0417\u0430\u043F\u0438\u0441\u044C: ",P.fields[0].value]})]})})};(0,p.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),p=r.Mimicking=function(){function k(y,S){var b=(0,a.useBackend)(S),C=b.act,c=b.data,u=c.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:[u.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 l(){return C("Choose",{id:f.id})}return l}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Delete",color:"bad",onClick:function(){function l(){return C("Delete",{id:f.id})}return l}()})],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 C("Add")}return f}()})]})})})})}return k}()},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),p=r.Minesweeper=function(){function k(y,S){var b=(0,a.useBackend)(S),C=b.act,c=b.data,u=c.matrix,f=c.showMessage,l=c.tokens,d=c.uiWidth,m={1:"blue",2:"green",3:"red",4:"darkblue",5:"brown",6:"lightblue",7:"black",8:"white"};document.addEventListener("contextmenu",function(g){return g.preventDefault()});var i=function(){function g(N,x,B){N.button!==0&&N.button!==2||C("Square",{X:x,Y:B,mode:N.button===2?s[V]:V})}return g}(),h=(0,a.useLocalState)(S,"mode","bomb"),V=h[0],v=h[1],s={flag:"bomb",bomb:"flag"};return(0,e.createComponentVNode)(2,o.Window,{theme:"ntOS95",width:d+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:V==="bomb",onClick:function(){function g(){return v("bomb")}return g}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"flag",iconColor:"red",selected:V==="flag",onClick:function(){function g(){return v("flag")}return g}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",onClick:function(){function g(){return C("Mode",{mode:"16x30"})}return g}()})],4),children:[(0,e.createVNode)(1,"p"),Object.keys(u).map(function(g){return(0,e.createComponentVNode)(2,t.Box,{children:Object.keys(u[g]).map(function(N){return(0,e.createComponentVNode)(2,t.Button,{m:"1px",height:"30px",width:"30px",className:u[g][N].open?"Minesweeper__open":"Minesweeper__closed",bold:!0,color:"transparent",icon:u[g][N].open?u[g][N].bomb?"bomb":"":u[g][N].flag?"flag":"",textColor:u[g][N].open?u[g][N].bomb?"black":m[u[g][N].around]:u[g][N].flag?"red":"gray",onMouseDown:function(){function x(B){return i(B,g,N)}return x}(),children:u[g][N].open&&!u[g][N].bomb&&u[g][N].around?u[g][N].around:" "},N)})},g)}),(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: ",l,(0,e.createVNode)(1,"br"),f]})]})})})})}return k}()},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),p=r.MiniGamesMenu=function(){function k(y,S){var b=(0,a.useBackend)(S),C=b.act,c=b.data,u=c.spawners||[],f=c.thunderdome_eligible,l=c.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 d(){return C("toggle_minigames")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"power-off",tooltip:l?"\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:l?"\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:l?"good":"bad",onClick:function(){function d(){return C("toggle_notifications")}return d}()}),(0,e.createComponentVNode)(2,t.Section,{children:u.map(function(d){return(0,e.createComponentVNode)(2,t.Section,{mb:.5,title:d.name,level:2,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-circle-right",content:"Jump",onClick:function(){function m(){return C("jump",{ID:d.uids})}return m}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-circle-right",content:"Start",onClick:function(){function m(){return C("spawn",{ID:d.uids})}return m}()})],4),children:[(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},mb:1,fontSize:"16px",children:d.desc}),!!d.fluff&&(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},textColor:"#878787",fontSize:"14px",children:d.fluff}),!!d.important_info&&(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},mt:1,bold:!0,color:"red",fontSize:"18px",children:d.important_info})]},d.name)})})]})})}return k}()},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),p=n(98595),k=["title","items"];function y(l,d){if(l==null)return{};var m={};for(var i in l)if({}.hasOwnProperty.call(l,i)){if(d.includes(i))continue;m[i]=l[i]}return m}var S={Alphabetical:function(){function l(d,m){return d-m}return l}(),Availability:function(){function l(d,m){return-(d.affordable-m.affordable)}return l}(),Price:function(){function l(d,m){return d.price-m.price}return l}()},b=r.MiningVendor=function(){function l(d,m){return(0,e.createComponentVNode)(2,p.Window,{width:400,height:450,children:(0,e.createComponentVNode)(2,p.Window.Content,{className:"Layout__content--flexColumn",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,C),(0,e.createComponentVNode)(2,u),(0,e.createComponentVNode)(2,c)]})})})}return l}(),C=function(d,m){var i=(0,t.useBackend)(m),h=i.act,V=i.data,v=V.has_id,s=V.id;return(0,e.createComponentVNode)(2,o.NoticeBox,{success:v,children:v?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{inline:!0,verticalAlign:"middle",style:{float:"left"},children:["Logged in as ",s.name,".",(0,e.createVNode)(1,"br"),"You have ",s.points.toLocaleString("en-US")," points."]}),(0,e.createComponentVNode)(2,o.Button,{icon:"eject",content:"Eject ID",style:{float:"right"},onClick:function(){function g(){return h("logoff")}return g}()}),(0,e.createComponentVNode)(2,o.Box,{style:{clear:"both"}})],4):"Please insert an ID in order to make purchases."})},c=function(d,m){var i=(0,t.useBackend)(m),h=i.act,V=i.data,v=V.has_id,s=V.id,g=V.items,N=(0,t.useLocalState)(m,"search",""),x=N[0],B=N[1],L=(0,t.useLocalState)(m,"sort","Alphabetical"),T=L[0],A=L[1],E=(0,t.useLocalState)(m,"descending",!1),w=E[0],O=E[1],M=(0,a.createSearch)(x,function(R){return R[0]}),P=!1,F=Object.entries(g).map(function(R,U){var j=Object.entries(R[1]).filter(M).map(function(W){return W[1].affordable=v&&s.points>=W[1].price,W[1]}).sort(S[T]);if(j.length!==0)return w&&(j=j.reverse()),P=!0,(0,e.createComponentVNode)(2,f,{title:R[0],items:j},R[0])});return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:P?F:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No items matching your criteria was found!"})})})},u=function(d,m){var i=(0,t.useLocalState)(m,"search",""),h=i[0],V=i[1],v=(0,t.useLocalState)(m,"sort",""),s=v[0],g=v[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(T,A){return V(A)}return L}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"30%",children:(0,e.createComponentVNode)(2,o.Dropdown,{selected:"Alphabetical",options:Object.keys(S),width:"100%",onSelected:function(){function L(T){return g(T)}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(d,m){var i=(0,t.useBackend)(m),h=i.act,V=i.data,v=d.title,s=d.items,g=y(d,k);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Collapsible,Object.assign({open:!0,title:v},g,{children:s.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:!V.has_id||V.id.points"})}),!!O&&(0,e.createComponentVNode)(2,d,{mt:1.1,label:"ID tag",compactLabel:!0,wrapContent:F?(0,e.createComponentVNode)(2,f,{text:P,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}(),c=function(B,L){var T=B.iconName,A=B.machineName,E=B.noMachine,w=B.noMachineText,O=B.noMachineElem,M="Unknown machine",P=E?w:A||"Unknown machine",F=P===w,R=P===w||P===M;return E&&O?O:(0,e.createComponentVNode)(2,o.Flex,{mt:.1,mb:1.9,children:[!E&&(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:T})}),(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:R,children:P})})]})},u=function(B,L){var T=B.text;return(0,e.createComponentVNode)(2,o.Box,{as:"span",fontSize:"0.9rem",color:"yellow",italic:!0,nowrap:!0,children:T})},f=function(B,L){var T=B.text,A=B.defaultText,E=b(B,k);return T?(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({as:"span",wordWrap:"break-word"},E,{children:T}))):(0,e.createComponentVNode)(2,u,{text:A})},l=function(B,L){var T=B.noConfirm,A=T===void 0?!1:T,E=b(B,y);return A?(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Button,Object.assign({},E))):(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Button.Confirm,Object.assign({},E)))},d=function(B,L){var T=B.label,A=B.wrapContent,E=B.noWrapContent,w=B.compactLabel,O=w===void 0?!1:w,M=b(B,S);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Flex,Object.assign({my:.5,mr:"0.5%",spacing:1,align:"center"},M,{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:T}),(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:E})]})))},m=function(B,L){var T=(0,t.useBackend)(L),A=T.act,E=T.data;return(0,e.createComponentVNode)(2,o.Box,{mt:1.5,fontSize:"0.9rem",color:"silver",italic:!0,children:"No options"})},i=function(B,L){var T=(0,t.useBackend)(L),A=T.act,E=T.data;return(0,e.createComponentVNode)(2,o.Box,{fontSize:"1.1rem",color:"red",bold:!0,italic:!0,children:"ACCESS DENIED"})},h=function(B,L){var T=(0,t.useBackend)(L),A=T.act,E=T.data,w=E.attachedTag;return(0,e.createComponentVNode)(2,d,{label:"ID tag",wrapContent:(0,e.createComponentVNode)(2,f,{text:w,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:!w,onClick:function(){function O(){return A("clear_tag")}return O}()})],4)})},V=function(B,L){var T=(0,t.useBackend)(L),A=T.act,E=T.data,w=E.frequency,O=E.minFrequency,M=E.maxFrequency,P=E.canReset;return(0,e.createComponentVNode)(2,d,{label:"Frequency",noWrapContent:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,unit:"kHz",step:.1,stepPixelSize:10,minValue:O/10,maxValue:M/10,value:w/10,format:function(){function F(R){return(0,a.toFixed)(R,1)}return F}(),onChange:function(){function F(R,U){return A("set_frequency",{frequency:U*10})}return F}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"undo",content:"",disabled:!P,tooltip:"Reset",onClick:function(){function F(){return A("reset_frequency")}return F}()})],4)})},v=function(B,L){var T=(0,t.useBackend)(L),A=T.act,E=T.data,w=E.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:w.map(function(O,M){return(0,e.createComponentVNode)(2,d,{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 P(){return A("remove_tag",{tag_index:M})}return P}()})})})},M)})})},s=function(B,L){var T=(0,t.useBackend)(L),A=T.act,E=T.data,w=E.bolts,O=E.pressureCheck,M=E.temperatureCheck,P=E.oxygenCheck,F=E.toxinsCheck,R=E.nitrogenCheck,U=E.carbonDioxideCheck,j=[{bitflag:1,checked:O,label:"Monitor pressure"},{bitflag:2,checked:M,label:"Monitor temperature"},{bitflag:4,checked:P,label:"Monitor oxygen concentration"},{bitflag:8,checked:F,label:"Monitor plasma concentration"},{bitflag:16,checked:R,label:"Monitor nitrogen concentration"},{bitflag:32,checked:U,label:"Monitor carbon dioxide concentration"}];return(0,e.createFragment)([(0,e.createComponentVNode)(2,d,{label:"Floor bolts",noWrapContent:(0,e.createComponentVNode)(2,o.Button,{icon:w?"check":"times",selected:w,content:w?"YES":"NO",onClick:function(){function W(){return A("toggle_bolts")}return W}()})}),j.map(function(W){return(0,e.createComponentVNode)(2,d,{label:W.label,noWrapContent:(0,e.createComponentVNode)(2,o.Button.Checkbox,{checked:W.checked,onClick:function(){function K(){return A("toggle_flag",{bitflag:W.bitflag})}return K}()})},W.bitflag)})],0)},g=function(B,L){var T=(0,t.useBackend)(L),A=T.act,E=T.data,w=E.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,d,{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(w).map(function(O){return(0,e.createComponentVNode)(2,d,{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}),w[O]?(0,e.createComponentVNode)(2,o.Flex.Item,{grow:1,shrink:1,basis:0,color:"silver",wordWrap:"break-word",children:w[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 M(){return A("change_label",{sensor_tag:O})}return M}()}),(0,e.createComponentVNode)(2,o.Button,{content:"Label",icon:"times-circle",color:"orange",disabled:!w[O],onClick:function(){function M(){return A("clear_label",{sensor_tag:O})}return M}()})]}),(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 M(){return A("del_sensor",{sensor_tag:O})}return M}()})})]})},O)})]})},N=function(B,L){var T=(0,t.useBackend)(L),A=T.act,E=T.data,w=E.inputTag,O=E.outputTag,M=E.bufferTag,P=E.bufferFitsInput,F=E.bufferFitsOutput,R=E.doNotLinkAndNotify;return(0,e.createFragment)([(0,e.createComponentVNode)(2,d,{label:"Input",labelWidth:6,wrapContent:(0,e.createComponentVNode)(2,f,{text:w,defaultText:"",color:"silver"}),noWrapContent:(0,e.createFragment)([(0,e.createComponentVNode)(2,l,{noConfirm:R||!w,confirmContent:"This will change the intput device. Confirm?",confirmColor:"orange",content:"Link buffer",icon:"link",selected:w&&M===w,disabled:!P,onClick:function(){function U(){return A("link_input")}return U}()}),(0,e.createComponentVNode)(2,o.Button.Confirm,{confirmContent:"This will unlink the intput device. Confirm?",confirmColor:"orange",content:"Unlink",icon:"unlink",color:"red",disabled:!w,onClick:function(){function U(){return A("unlink_input")}return U}()})],4)}),(0,e.createComponentVNode)(2,d,{label:"Output",labelWidth:6,wrapContent:(0,e.createComponentVNode)(2,f,{text:O,defaultText:"",color:"silver"}),noWrapContent:(0,e.createFragment)([(0,e.createComponentVNode)(2,l,{noConfirm:R||!O,confirmContent:"This will change the output device. Confirm?",confirmColor:"orange",content:"Link buffer",icon:"link",selected:O&&M===O,disabled:!F,onClick:function(){function U(){return A("link_output")}return U}()}),(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 U(){return A("unlink_output")}return U}()})],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),p=n(76910),k=n(98595),y=n(3939),S=n(22091),b=["icon","iconSpin","selected","security","onClick","title","children"],C=["name"];function c(B,L){if(B==null)return{};var T={};for(var A in B)if({}.hasOwnProperty.call(B,A)){if(L.includes(A))continue;T[A]=B[A]}return T}var u=128,f=["security","engineering","medical","science","service","supply"],l={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"}},d=r.Newscaster=function(){function B(L,T){var A=(0,t.useBackend)(T),E=A.act,w=A.data,O=w.is_security,M=w.is_admin,P=w.is_silent,F=w.is_printing,R=w.screen,U=w.channels,j=w.channel_idx,W=j===void 0?-1:j,K=(0,t.useLocalState)(T,"menuOpen",!1),$=K[0],ne=K[1],Y=(0,t.useLocalState)(T,"viewingPhoto",""),le=Y[0],de=Y[1],oe=(0,t.useLocalState)(T,"censorMode",!1),re=oe[0],Z=oe[1],ae;R===0||R===2?ae=(0,e.createComponentVNode)(2,i):R===1&&(ae=(0,e.createComponentVNode)(2,h));var J=U.reduce(function(X,Q){return X+Q.unread},0);return(0,e.createComponentVNode)(2,k.Window,{theme:O&&"security",width:800,height:600,children:[le?(0,e.createComponentVNode)(2,s):(0,e.createComponentVNode)(2,y.ComplexModal,{maxWidth:window.innerWidth/1.5+"px",maxHeight:window.innerHeight/1.5+"px"}),(0,e.createComponentVNode)(2,k.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",$&&"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 X(){return ne(!$)}return X}()}),(0,e.createComponentVNode)(2,m,{icon:"newspaper",title:"Headlines",selected:R===0,onClick:function(){function X(){return E("headlines")}return X}(),children:J>0&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--unread",children:J>=10?"9+":J})}),(0,e.createComponentVNode)(2,m,{icon:"briefcase",title:"Job Openings",selected:R===1,onClick:function(){function X(){return E("jobs")}return X}()}),(0,e.createComponentVNode)(2,o.Divider)]}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:U.map(function(X){return(0,e.createComponentVNode)(2,m,{icon:X.icon,title:X.name,selected:R===2&&U[W-1]===X,onClick:function(){function Q(){return E("channel",{uid:X.uid})}return Q}(),children:X.unread>0&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--unread",children:X.unread>=10?"9+":X.unread})},X)})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Divider),(!!O||!!M)&&(0,e.createFragment)([(0,e.createComponentVNode)(2,m,{security:!0,icon:"exclamation-circle",title:"Edit Wanted Notice",mb:"0.5rem",onClick:function(){function X(){return(0,y.modalOpen)(T,"wanted_notice")}return X}()}),(0,e.createComponentVNode)(2,m,{security:!0,icon:re?"minus-square":"minus-square-o",title:"Censor Mode: "+(re?"On":"Off"),mb:"0.5rem",onClick:function(){function X(){return Z(!re)}return X}()}),(0,e.createComponentVNode)(2,o.Divider)],4),(0,e.createComponentVNode)(2,m,{icon:"pen-alt",title:"New Story",mb:"0.5rem",onClick:function(){function X(){return(0,y.modalOpen)(T,"create_story")}return X}()}),(0,e.createComponentVNode)(2,m,{icon:"plus-circle",title:"New Channel",onClick:function(){function X(){return(0,y.modalOpen)(T,"create_channel")}return X}()}),(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 X(){return E("print_newspaper")}return X}()}),(0,e.createComponentVNode)(2,m,{icon:P?"volume-mute":"volume-up",title:"Mute: "+(P?"On":"Off"),onClick:function(){function X(){return E("toggle_mute")}return X}()})]})]})}),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,width:"100%",children:[(0,e.createComponentVNode)(2,S.TemporaryNotice),ae]})]})})]})}return B}(),m=function(L,T){var A=(0,t.useBackend)(T),E=A.act,w=L.icon,O=w===void 0?"":w,M=L.iconSpin,P=L.selected,F=P===void 0?!1:P,R=L.security,U=R===void 0?!1:R,j=L.onClick,W=L.title,K=L.children,$=c(L,b);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({className:(0,a.classes)(["Newscaster__menuButton",F&&"Newscaster__menuButton--selected",U&&"Newscaster__menuButton--security"]),onClick:j},$,{children:[F&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--selectedBar"}),(0,e.createComponentVNode)(2,o.Icon,{name:O,spin:M,size:"2"}),(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--title",children:W}),K]})))},i=function(L,T){var A=(0,t.useBackend)(T),E=A.act,w=A.data,O=w.screen,M=w.is_admin,P=w.channel_idx,F=w.channel_can_manage,R=w.channels,U=w.stories,j=w.wanted,W=(0,t.useLocalState)(T,"fullStories",[]),K=W[0],$=W[1],ne=(0,t.useLocalState)(T,"censorMode",!1),Y=ne[0],le=ne[1],de=O===2&&P>-1?R[P-1]:null;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[!!j&&(0,e.createComponentVNode)(2,V,{story:j,wanted:!0}),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:de?de.icon:"newspaper",mr:"0.5rem"}),de?de.name:"Headlines"],0),children:U.length>0?U.slice().reverse().map(function(oe){return!K.includes(oe.uid)&&oe.body.length+3>u?Object.assign({},oe,{body_short:oe.body.substr(0,u-4)+"..."}):oe}).map(function(oe,re){return(0,e.createComponentVNode)(2,V,{story:oe},re)}):(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."]})}),!!de&&(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)([Y&&(0,e.createComponentVNode)(2,o.Button,{disabled:!!de.admin&&!M,selected:de.censored,icon:de.censored?"comment-slash":"comment",content:de.censored?"Uncensor Channel":"Censor Channel",mr:"0.5rem",onClick:function(){function oe(){return E("censor_channel",{uid:de.uid})}return oe}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!F,icon:"cog",content:"Manage",onClick:function(){function oe(){return(0,y.modalOpen)(T,"manage_channel",{uid:de.uid})}return oe}()})],0),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description",children:de.description||"N/A"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Owner",children:de.author||"N/A"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Public",children:de.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"}),U.reduce(function(oe,re){return oe+re.view_count},0).toLocaleString()]})]})})]})},h=function(L,T){var A=(0,t.useBackend)(T),E=A.act,w=A.data,O=w.jobs,M=w.wanted,P=Object.entries(O).reduce(function(F,R){var U=R[0],j=R[1];return F+j.length},0);return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[!!M&&(0,e.createComponentVNode)(2,V,{story:M,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:P>0?f.map(function(F){return Object.assign({},l[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(R){return(0,e.createComponentVNode)(2,o.Box,{class:(0,a.classes)(["Newscaster__jobOpening",!!R.is_command&&"Newscaster__jobOpening--command"]),children:["\u2022 ",R.title]},R.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."})]})]})},V=function(L,T){var A=(0,t.useBackend)(T),E=A.act,w=A.data,O=L.story,M=L.wanted,P=M===void 0?!1:M,F=(0,t.useLocalState)(T,"fullStories",[]),R=F[0],U=F[1],j=(0,t.useLocalState)(T,"censorMode",!1),W=j[0],K=j[1];return(0,e.createComponentVNode)(2,o.Section,{className:(0,a.classes)(["Newscaster__story",P&&"Newscaster__story--wanted"]),title:(0,e.createFragment)([P&&(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:[!P&&W&&(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 $(){return E("censor_story",{uid:O.uid})}return $}()})}),(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",O.author," |\xA0",!P&&(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,p.timeAgo)(O.publish_time,w.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,v,{name:"story_photo_"+O.uid+".png",float:"right",ml:"0.5rem"}),(O.body_short||O.body).split("\n").map(function($,ne){return(0,e.createComponentVNode)(2,o.Box,{children:$||(0,e.createVNode)(1,"br")},ne)}),O.body_short&&(0,e.createComponentVNode)(2,o.Button,{content:"Read more..",mt:"0.5rem",onClick:function(){function $(){return U([].concat(R,[O.uid]))}return $}()}),(0,e.createComponentVNode)(2,o.Box,{clear:"right"})],0)})})},v=function(L,T){var A=L.name,E=c(L,C),w=(0,t.useLocalState)(T,"viewingPhoto",""),O=w[0],M=w[1];return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({as:"img",className:"Newscaster__photo",src:A,onClick:function(){function P(){return M(A)}return P}()},E)))},s=function(L,T){var A=(0,t.useLocalState)(T,"viewingPhoto",""),E=A[0],w=A[1];return(0,e.createComponentVNode)(2,o.Modal,{className:"Newscaster__photoZoom",children:[(0,e.createComponentVNode)(2,o.Box,{as:"img",src:E}),(0,e.createComponentVNode)(2,o.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){function O(){return w("")}return O}()})]})},g=function(L,T){var A=(0,t.useBackend)(T),E=A.act,w=A.data,O=!!L.args.uid&&w.channels.filter(function(te){return te.uid===L.args.uid}).pop();if(L.id==="manage_channel"&&!O){(0,y.modalClose)(T);return}var M=L.id==="manage_channel",P=!!L.args.is_admin,F=L.args.scanned_user,R=(0,t.useLocalState)(T,"author",(O==null?void 0:O.author)||F||"Unknown"),U=R[0],j=R[1],W=(0,t.useLocalState)(T,"name",(O==null?void 0:O.name)||""),K=W[0],$=W[1],ne=(0,t.useLocalState)(T,"description",(O==null?void 0:O.description)||""),Y=ne[0],le=ne[1],de=(0,t.useLocalState)(T,"icon",(O==null?void 0:O.icon)||"newspaper"),oe=de[0],re=de[1],Z=(0,t.useLocalState)(T,"isPublic",M?!!(O!=null&&O.public):!1),ae=Z[0],J=Z[1],X=(0,t.useLocalState)(T,"adminLocked",(O==null?void 0:O.admin)===1||!1),Q=X[0],q=X[1];return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:M?"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:!P,width:"100%",value:U,onInput:function(){function te(fe,ye){return j(ye)}return te}()})}),(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:K,onInput:function(){function te(fe,ye){return $(ye)}return te}()})}),(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:Y,onInput:function(){function te(fe,ye){return le(ye)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Icon",children:[(0,e.createComponentVNode)(2,o.Input,{disabled:!P,value:oe,width:"35%",mr:"0.5rem",onInput:function(){function te(fe,ye){return re(ye)}return te}()}),(0,e.createComponentVNode)(2,o.Icon,{name:oe,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 te(){return J(!ae)}return te}()})}),P&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:Q,icon:Q?"lock":"lock-open",content:Q?"On":"Off",tooltip:"Locking this channel will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function te(){return q(!Q)}return te}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:U.trim().length===0||K.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function te(){(0,y.modalAnswer)(T,L.id,"",{author:U,name:K.substr(0,49),description:Y.substr(0,128),icon:oe,public:ae?1:0,admin_locked:Q?1:0})}return te}()})]})},N=function(L,T){var A=(0,t.useBackend)(T),E=A.act,w=A.data,O=w.photo,M=w.channels,P=w.channel_idx,F=P===void 0?-1:P,R=!!L.args.is_admin,U=L.args.scanned_user,j=M.slice().sort(function(te,fe){if(F<0)return 0;var ye=M[F-1];if(ye.uid===te.uid)return-1;if(ye.uid===fe.uid)return 1}).filter(function(te){return R||!te.frozen&&(te.author===U||!!te.public)}),W=(0,t.useLocalState)(T,"author",U||"Unknown"),K=W[0],$=W[1],ne=(0,t.useLocalState)(T,"channel",j.length>0?j[0].name:""),Y=ne[0],le=ne[1],de=(0,t.useLocalState)(T,"title",""),oe=de[0],re=de[1],Z=(0,t.useLocalState)(T,"body",""),ae=Z[0],J=Z[1],X=(0,t.useLocalState)(T,"adminLocked",!1),Q=X[0],q=X[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:!R,width:"100%",value:K,onInput:function(){function te(fe,ye){return $(ye)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Channel",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Dropdown,{selected:Y,options:j.map(function(te){return te.name}),mb:"0",width:"100%",onSelected:function(){function te(fe){return le(fe)}return te}()})}),(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:oe,onInput:function(){function te(fe,ye){return re(ye)}return te}()})}),(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 te(fe,ye){return J(ye)}return te}()})}),(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 te(){return E(O?"eject_photo":"attach_photo")}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Preview",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Section,{noTopPadding:!0,title:oe,maxHeight:"13.5rem",overflow:"auto",children:(0,e.createComponentVNode)(2,o.Box,{mt:"0.5rem",children:[!!O&&(0,e.createComponentVNode)(2,v,{name:"inserted_photo_"+O.uid+".png",float:"right"}),ae.split("\n").map(function(te,fe){return(0,e.createComponentVNode)(2,o.Box,{children:te||(0,e.createVNode)(1,"br")},fe)}),(0,e.createComponentVNode)(2,o.Box,{clear:"right"})]})})}),R&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:Q,icon:Q?"lock":"lock-open",content:Q?"On":"Off",tooltip:"Locking this story will make it censorable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function te(){return q(!Q)}return te}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:K.trim().length===0||Y.trim().length===0||oe.trim().length===0||ae.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function te(){(0,y.modalAnswer)(T,"create_story","",{author:K,channel:Y,title:oe.substr(0,127),body:ae.substr(0,1023),admin_locked:Q?1:0})}return te}()})]})},x=function(L,T){var A=(0,t.useBackend)(T),E=A.act,w=A.data,O=w.photo,M=w.wanted,P=!!L.args.is_admin,F=L.args.scanned_user,R=(0,t.useLocalState)(T,"author",(M==null?void 0:M.author)||F||"Unknown"),U=R[0],j=R[1],W=(0,t.useLocalState)(T,"name",(M==null?void 0:M.title.substr(8))||""),K=W[0],$=W[1],ne=(0,t.useLocalState)(T,"description",(M==null?void 0:M.body)||""),Y=ne[0],le=ne[1],de=(0,t.useLocalState)(T,"adminLocked",(M==null?void 0:M.admin_locked)===1||!1),oe=de[0],re=de[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:!P,width:"100%",value:U,onInput:function(){function Z(ae,J){return j(J)}return Z}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:(0,e.createComponentVNode)(2,o.Input,{width:"100%",value:K,maxLength:"128",onInput:function(){function Z(ae,J){return $(J)}return Z}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Input,{multiline:!0,width:"100%",value:Y,maxLength:"512",rows:"4",onInput:function(){function Z(ae,J){return le(J)}return Z}()})}),(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 Z(){return E(O?"eject_photo":"attach_photo")}return Z}()}),!!O&&(0,e.createComponentVNode)(2,v,{name:"inserted_photo_"+O.uid+".png",float:"right"})]}),P&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:oe,icon:oe?"lock":"lock-open",content:oe?"On":"Off",tooltip:"Locking this wanted notice will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function Z(){return re(!oe)}return Z}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:!M,icon:"eraser",color:"danger",content:"Clear",position:"absolute",right:"7.25rem",bottom:"-0.75rem",onClick:function(){function Z(){E("clear_wanted_notice"),(0,y.modalClose)(T)}return Z}()}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:U.trim().length===0||K.trim().length===0||Y.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function Z(){(0,y.modalAnswer)(T,L.id,"",{author:U,name:K.substr(0,127),description:Y.substr(0,511),admin_locked:oe?1:0})}return Z}()})]})};(0,y.modalRegisterBodyOverride)("create_channel",g),(0,y.modalRegisterBodyOverride)("manage_channel",g),(0,y.modalRegisterBodyOverride)("create_story",N),(0,y.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),p=n(98595),k=r.NinjaBloodScan=function(){function b(C,c){var u=(0,a.useBackend)(c),f=u.act,l=u.data;return(0,e.createComponentVNode)(2,p.Window,{width:500,height:400,theme:"spider_clan",children:(0,e.createComponentVNode)(2,p.Window.Content,{className:"Layout__content--flexColumn",children:[(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,S)]})})}return b}(),y=function(C,c){var u=(0,a.useBackend)(c),f=u.act,l=u.data,d=l.vialIcons,m=l.noVialIcon,i=l.bloodOwnerNames,h=l.bloodOwnerSpecies,V=l.bloodOwnerTypes,v=l.blockButtons,s=l.scanStates,g={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:i[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[s[L]],success:0,danger:0,align:"center",children:(0,e.createComponentVNode)(2,t.Button,{className:v?g.disabled:g.blue,height:"100%",width:"100%",disabled:v,onClick:function(){function T(){return f("vial_out",{button_num:L+1})}return T}(),children:[(0,e.createVNode)(1,"img",null,null,1,{height:"128px",width:"128px",src:"data:image/jpeg;base64,"+(d[L]||m),style:{"margin-left":"3px","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}}),(0,e.createComponentVNode)(2,t.Tooltip,{title:i[L]||" - ",content:"\u0420\u0430\u0441\u0430: "+(h[L]||" - ")+"\n"+("\u0422\u0438\u043F \u043A\u0440\u043E\u0432\u0438: "+(V[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:v===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:v,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}()})})]})})},S=function(C,c){var u=(0,a.useBackend)(c),f=u.data,l=f.progressBar;return(0,e.createComponentVNode)(2,t.Section,{stretchContents:!0,children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:"green",value:l,minValue:0,maxValue:100,children:(0,e.createVNode)(1,"center",null,(0,e.createComponentVNode)(2,t.NoticeBox,{className:"NoticeBox_green",mt:1,children:l?"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 "+(l+"%"):"\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),p=r.NinjaMindScan=function(){function y(S,b){var C=(0,a.useBackend)(b),c=C.act,u=C.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,k)})})}return y}(),k=function(S,b){var C=(0,a.useBackend)(b),c=C.act,u=C.data,f=u.occupantIcon,l=u.occupant_name,d=u.occupant_health,m=u.scanned_occupants,i=l==="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:l}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0417\u0434\u043E\u0440\u043E\u0432\u044C\u0435",children:d})]})}),(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:i===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:i,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 h(){return c("scan_occupant")}return h}()}),(0,e.createComponentVNode)(2,t.Button,{className:i===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:i,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 h(){return c("go_out")}return h}()}),(0,e.createComponentVNode)(2,t.Button,{className:i===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:i,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 h(){return c("teleport_out")}return h}()})]})]})]})}),(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(h){return(0,e.createComponentVNode)(2,t.Table.Row,{children:(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Box,{children:h.scanned_occupant})})},h.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),p=r.NuclearBomb=function(){function k(y,S){var b=(0,a.useBackend)(S),C=b.act,c=b.data;return c.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:c.authdisk?"eject":"id-card",selected:c.authdisk,content:c.diskname?c.diskname:"-----",tooltip:c.authdisk?"Eject Disk":"Insert Disk",onClick:function(){function u(){return C("auth")}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auth Code",children:(0,e.createComponentVNode)(2,t.Button,{icon:"key",disabled:!c.authdisk,selected:c.authcode,content:c.codemsg,onClick:function(){function u(){return C("code")}return u}()})})]})}),(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:c.anchored?"check":"times",selected:c.anchored,disabled:!c.authfull,content:c.anchored?"YES":"NO",onClick:function(){function u(){return C("toggle_anchor")}return u}()})}),c.authfull&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Time Left",children:(0,e.createComponentVNode)(2,t.Button,{icon:"stopwatch",content:c.time,disabled:!c.authfull,tooltip:"Set Timer",onClick:function(){function u(){return C("set_time")}return u}()})})||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Time Left",color:c.timer?"red":"",children:c.time+"s"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safety",children:(0,e.createComponentVNode)(2,t.Button,{icon:c.safety?"check":"times",selected:c.safety,disabled:!c.authfull,content:c.safety?"ON":"OFF",tooltip:c.safety?"Disable Safety":"Enable Safety",onClick:function(){function u(){return C("toggle_safety")}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Arm/Disarm",children:(0,e.createComponentVNode)(2,t.Button,{icon:(c.timer,"bomb"),disabled:c.safety||!c.authfull,color:"red",content:c.timer?"DISARM THE NUKE":"ARM THE NUKE",onClick:function(){function u(){return C("toggle_armed")}return u}()})})]})})]})}):(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 u(){return C("deploy")}return u}()})})})})}return k}()},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),p=n(72253),k=n(36036),y=n(98595),S=r.NumberInputModal=function(){function C(c,u){var f=(0,p.useBackend)(u),l=f.act,d=f.data,m=d.init_value,i=d.large_buttons,h=d.message,V=h===void 0?"":h,v=d.timeout,s=d.title,g=(0,p.useLocalState)(u,"input",m),N=g[0],x=g[1],B=function(){function A(E){E!==N&&x(E)}return A}(),L=function(){function A(E){E!==N&&x(E)}return A}(),T=140+Math.max(Math.ceil(V.length/3),V.length>0&&i?5:0);return(0,e.createComponentVNode)(2,y.Window,{title:s,width:270,height:T,children:[v&&(0,e.createComponentVNode)(2,a.Loader,{value:v}),(0,e.createComponentVNode)(2,y.Window.Content,{onKeyDown:function(){function A(E){var w=window.event?E.which:E.keyCode;w===o.KEY_ENTER&&l("submit",{entry:N}),w===o.KEY_ESCAPE&&l("cancel")}return A}(),children:(0,e.createComponentVNode)(2,k.Section,{fill:!0,children:(0,e.createComponentVNode)(2,k.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,k.Box,{color:"label",children:V})}),(0,e.createComponentVNode)(2,k.Stack.Item,{children:(0,e.createComponentVNode)(2,b,{input:N,onClick:L,onChange:B})}),(0,e.createComponentVNode)(2,k.Stack.Item,{children:(0,e.createComponentVNode)(2,t.InputButtons,{input:N})})]})})})]})}return C}(),b=function(c,u){var f=(0,p.useBackend)(u),l=f.act,d=f.data,m=d.min_value,i=d.max_value,h=d.init_value,V=d.round_value,v=c.input,s=c.onClick,g=c.onChange,N=Math.round(v!==m?Math.max(v/2,m):i/2),x=v===m&&m>0||v===1;return(0,e.createComponentVNode)(2,k.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,k.Stack.Item,{children:(0,e.createComponentVNode)(2,k.Button,{disabled:v===m,icon:"angle-double-left",onClick:function(){function B(){return s(m)}return B}(),tooltip:v===m?"Min":"Min ("+m+")"})}),(0,e.createComponentVNode)(2,k.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,k.RestrictedInput,{autoFocus:!0,autoSelect:!0,fluid:!0,allowFloats:!V,minValue:m,maxValue:i,onChange:function(){function B(L,T){return g(T)}return B}(),onEnter:function(){function B(L,T){return l("submit",{entry:T})}return B}(),value:v})}),(0,e.createComponentVNode)(2,k.Stack.Item,{children:(0,e.createComponentVNode)(2,k.Button,{disabled:v===i,icon:"angle-double-right",onClick:function(){function B(){return s(i)}return B}(),tooltip:v===i?"Max":"Max ("+i+")"})}),(0,e.createComponentVNode)(2,k.Stack.Item,{children:(0,e.createComponentVNode)(2,k.Button,{disabled:x,icon:"divide",onClick:function(){function B(){return s(N)}return B}(),tooltip:x?"Split":"Split ("+N+")"})}),(0,e.createComponentVNode)(2,k.Stack.Item,{children:(0,e.createComponentVNode)(2,k.Button,{disabled:v===h,icon:"redo",onClick:function(){function B(){return s(h)}return B}(),tooltip:h?"Reset ("+h+")":"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),p=n(36036),k=[["good","\u0412 \u0441\u043E\u0437\u043D\u0430\u043D\u0438\u0438"],["average","\u0411\u0435\u0437 \u0441\u043E\u0437\u043D\u0430\u043D\u0438\u044F"],["bad","\u0417\u0430\u0444\u0438\u043A\u0441\u0438\u0440\u043E\u0432\u0430\u043D\u0430 \u0441\u043C\u0435\u0440\u0442\u044C"]],y=[["\u0423\u0434\u0443\u0448\u0435\u043D\u0438\u0435","oxyLoss"],["\u0422\u043E\u043A\u0441\u0438\u043D\u044B","toxLoss"],["\u0424\u0438\u0437\u0438\u0447\u0435\u0441\u043A\u0438\u0435 \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u044F","bruteLoss"],["\u041E\u0436\u043E\u0433\u0438","fireLoss"]],S={average:[.25,.5],bad:[.5,1/0]},b=["bad","average","average","good","average","average","bad"],C=r.OperatingComputer=function(){function l(d,m){var i=(0,t.useBackend)(m),h=i.act,V=i.data,v=V.hasOccupant,s=V.choice,g;return s?g=(0,e.createComponentVNode)(2,f):g=v?(0,e.createComponentVNode)(2,c):(0,e.createComponentVNode)(2,u),(0,e.createComponentVNode)(2,o.Window,{width:650,height:455,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,p.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,p.Stack.Item,{children:(0,e.createComponentVNode)(2,p.Tabs,{children:[(0,e.createComponentVNode)(2,p.Tabs.Tab,{selected:!s,icon:"user",onClick:function(){function N(){return h("choiceOff")}return N}(),children:"\u041F\u0430\u0446\u0438\u0435\u043D\u0442"}),(0,e.createComponentVNode)(2,p.Tabs.Tab,{selected:!!s,icon:"cog",onClick:function(){function N(){return h("choiceOn")}return N}(),children:"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438"})]})}),(0,e.createComponentVNode)(2,p.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,p.Section,{fill:!0,scrollable:!0,children:g})})]})})})}return l}(),c=function(d,m){var i=(0,t.useBackend)(m),h=i.data,V=h.occupant;return(0,e.createComponentVNode)(2,p.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,p.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,p.Section,{fill:!0,title:"\u041F\u0430\u0446\u0438\u0435\u043D\u0442",children:(0,e.createComponentVNode)(2,p.LabeledList,{children:[(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:"\u0418\u043C\u044F",children:V.name}),(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:"\u0421\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435",color:k[V.stat][0],children:k[V.stat][1]}),(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:"\u041E\u0446\u0435\u043D\u043A\u0430 \u0437\u0434\u043E\u0440\u043E\u0432\u044C\u044F",children:(0,e.createComponentVNode)(2,p.ProgressBar,{min:"0",max:V.maxHealth,value:V.health/V.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),y.map(function(v,s){return(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:v[0],children:(0,e.createComponentVNode)(2,p.ProgressBar,{min:"0",max:"100",value:V[v[1]]/100,ranges:S,children:(0,a.round)(V[v[1]])},s)},s)}),(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:"\u0422\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u0442\u0435\u043B\u0430",children:(0,e.createComponentVNode)(2,p.ProgressBar,{min:"0",max:V.maxTemp,value:V.bodyTemperature/V.maxTemp,color:b[V.temperatureSuitability+3],children:[(0,a.round)(V.btCelsius),"\xB0C, ",(0,a.round)(V.btFaren),"\xB0F"]})}),!!V.hasBlood&&(0,e.createFragment)([(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:"\u0423\u0440\u043E\u0432\u0435\u043D\u044C \u043A\u0440\u043E\u0432\u0438",children:(0,e.createComponentVNode)(2,p.ProgressBar,{min:"0",max:V.bloodMax,value:V.bloodLevel/V.bloodMax,ranges:{bad:[-1/0,.6],average:[.6,.9],good:[.6,1/0]},children:[V.bloodPercent,"%, ",V.bloodLevel,"cl"]})}),(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:"\u041F\u0443\u043B\u044C\u0441",children:[V.pulse," \u0443\u0434/\u043C\u0438\u043D"]})],4)]})})}),(0,e.createComponentVNode)(2,p.Stack.Item,{children:(0,e.createComponentVNode)(2,p.Section,{title:"\u0422\u0435\u043A\u0443\u0449\u0438\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438",level:"2",children:V.inSurgery?V.surgeries.map(function(v){var s=v.bodypartName,g=v.surgeryName,N=v.stepName;return(0,e.createComponentVNode)(2,p.Section,{title:s,level:"4",children:(0,e.createComponentVNode)(2,p.LabeledList,{children:[(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:"\u041E\u043F\u0435\u0440\u0430\u0446\u0438\u044F",children:g}),(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u044D\u0442\u0430\u043F",children:N})]})},s)}):(0,e.createComponentVNode)(2,p.Box,{color:"label",children:"\u041E\u043F\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 \u0434\u0430\u043D\u043D\u044B\u0439 \u043C\u043E\u043C\u0435\u043D\u0442 \u043D\u0435 \u043F\u0440\u043E\u0432\u043E\u0434\u044F\u0442\u0441\u044F."})})})]})},u=function(){return(0,e.createComponentVNode)(2,p.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,p.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,p.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."]})})},f=function(d,m){var i=(0,t.useBackend)(m),h=i.act,V=i.data,v=V.verbose,s=V.health,g=V.healthAlarm,N=V.oxy,x=V.oxyAlarm,B=V.crit;return(0,e.createComponentVNode)(2,p.LabeledList,{children:[(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:"\u0414\u0438\u043D\u0430\u043C\u0438\u043A",children:(0,e.createComponentVNode)(2,p.Button,{selected:v,icon:v?"toggle-on":"toggle-off",content:v?"\u0412\u043A\u043B\u044E\u0447\u0451\u043D":"\u0412\u044B\u043A\u043B\u044E\u0447\u0435\u043D",onClick:function(){function L(){return h(v?"verboseOff":"verboseOn")}return L}()})}),(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:"\u041E\u043F\u043E\u0432\u0435\u0449\u0430\u0442\u044C \u043E \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0438 \u043F\u0430\u0446\u0438\u0435\u043D\u0442\u0430",children:(0,e.createComponentVNode)(2,p.Button,{selected:s,icon:s?"toggle-on":"toggle-off",content:s?"\u0412\u043A\u043B\u044E\u0447\u0435\u043D\u043E":"\u0412\u044B\u043A\u043B\u044E\u0447\u0435\u043D\u043E",onClick:function(){function L(){return h(s?"healthOff":"healthOn")}return L}()})}),(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:"\u041F\u043E\u0440\u043E\u0433 \u043E\u043F\u043E\u0432\u0435\u0449\u0435\u043D\u0438\u044F \u043E \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0438",children:(0,e.createComponentVNode)(2,p.Knob,{bipolar:!0,minValue:-100,maxValue:100,value:g,stepPixelSize:5,ml:"0",onChange:function(){function L(T,A){return h("health_adj",{new:A})}return L}()})}),(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:"\u041E\u043F\u043E\u0432\u0435\u0449\u0430\u0442\u044C \u043E \u0434\u044B\u0445\u0430\u043D\u0438\u0438 \u043F\u0430\u0446\u0438\u0435\u043D\u0442\u0430",children:(0,e.createComponentVNode)(2,p.Button,{selected:N,icon:N?"toggle-on":"toggle-off",content:N?"\u0412\u043A\u043B\u044E\u0447\u0435\u043D\u043E":"\u0412\u044B\u043A\u043B\u044E\u0447\u0435\u043D\u043E",onClick:function(){function L(){return h(N?"oxyOff":"oxyOn")}return L}()})}),(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:"\u041F\u043E\u0440\u043E\u0433 \u043E\u043F\u043E\u0432\u0435\u0449\u0435\u043D\u0438\u044F \u043E \u0434\u044B\u0445\u0430\u043D\u0438\u0438",children:(0,e.createComponentVNode)(2,p.Knob,{bipolar:!0,minValue:-100,maxValue:100,value:x,stepPixelSize:5,ml:"0",onChange:function(){function L(T,A){return h("oxy_adj",{new:A})}return L}()})}),(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:"\u041E\u043F\u043E\u0432\u0435\u0449\u0430\u0442\u044C \u043E \u043A\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u043C \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0438 \u043F\u0430\u0446\u0438\u0435\u043D\u0442\u0430",children:(0,e.createComponentVNode)(2,p.Button,{selected:B,icon:B?"toggle-on":"toggle-off",content:B?"\u0412\u043A\u043B\u044E\u0447\u0435\u043D\u043E":"\u0412\u044B\u043A\u043B\u044E\u0447\u0435\u043D\u043E",onClick:function(){function L(){return h(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),p=n(98595);function k(m,i){var h=typeof Symbol!="undefined"&&m[Symbol.iterator]||m["@@iterator"];if(h)return(h=h.call(m)).next.bind(h);if(Array.isArray(m)||(h=y(m))||i&&m&&typeof m.length=="number"){h&&(m=h);var V=0;return function(){return V>=m.length?{done:!0}:{done:!1,value:m[V++]}}}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 y(m,i){if(m){if(typeof m=="string")return S(m,i);var h={}.toString.call(m).slice(8,-1);return h==="Object"&&m.constructor&&(h=m.constructor.name),h==="Map"||h==="Set"?Array.from(m):h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h)?S(m,i):void 0}}function S(m,i){(i==null||i>m.length)&&(i=m.length);for(var h=0,V=Array(i);hh},u=function(i,h){var V=i.name,v=h.name;if(!V||!v)return 0;var s=V.match(b),g=v.match(b);if(s&&g&&V.replace(b,"")===v.replace(b,"")){var N=parseInt(s[1],10),x=parseInt(g[1],10);return N-x}return c(V,v)},f=function(i,h){var V=(0,t.useBackend)(h),v=V.act,s=i.searchText,g=i.source,N=i.title,x=g.filter(C(s));return x.sort(u),g.length>0&&(0,e.createComponentVNode)(2,o.Section,{title:N+" - ("+g.length+")",children:x.map(function(B){return(0,e.createComponentVNode)(2,o.Button,{content:B.name,onClick:function(){function L(){return v("orbit",{ref:B.ref})}return L}()},B.name)})})},l=function(i,h){var V=(0,t.useBackend)(h),v=V.act,s=i.color,g=i.thing;return(0,e.createComponentVNode)(2,o.Button,{color:s,onClick:function(){function N(){return v("orbit",{ref:g.ref})}return N}(),children:g.name})},d=r.Orbit=function(){function m(i,h){for(var V=(0,t.useBackend)(h),v=V.act,s=V.data,g=s.alive,N=s.antagonists,x=s.highlights,B=s.auto_observe,L=s.dead,T=s.ghosts,A=s.misc,E=s.npcs,w=(0,t.useLocalState)(h,"searchText",""),O=w[0],M=w[1],P={},F=k(N),R;!(R=F()).done;){var U=R.value;P[U.antag]===void 0&&(P[U.antag]=[]),P[U.antag].push(U)}var j=Object.entries(P);j.sort(function(K,$){return c(K[0],$[0])});var W=function(){function K($){for(var ne=0,Y=[j.map(function(oe){var re=oe[0],Z=oe[1];return Z}),x,g,T,L,E,A];ne0&&(0,e.createComponentVNode)(2,o.Section,{title:"Antagonists",children:j.map(function(K){var $=K[0],ne=K[1];return(0,e.createComponentVNode)(2,o.Section,{title:$,level:2,children:ne.filter(C(O)).sort(u).map(function(Y){return(0,e.createComponentVNode)(2,l,{color:"bad",thing:Y},Y.name)})},$)})}),x.length>0&&(0,e.createComponentVNode)(2,f,{title:"Highlights",source:x,searchText:O,color:"teal"}),(0,e.createComponentVNode)(2,o.Section,{title:"Alive - ("+g.length+")",children:g.filter(C(O)).sort(u).map(function(K){return(0,e.createComponentVNode)(2,l,{color:"good",thing:K},K.name)})}),(0,e.createComponentVNode)(2,o.Section,{title:"Ghosts - ("+T.length+")",children:T.filter(C(O)).sort(u).map(function(K){return(0,e.createComponentVNode)(2,l,{color:"grey",thing:K},K.name)})}),(0,e.createComponentVNode)(2,f,{title:"Dead",source:L,searchText:O}),(0,e.createComponentVNode)(2,f,{title:"NPCs",source:E,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),p=n(98595),k=n(9394);function y(i){if(i==null)throw new TypeError("Cannot destructure "+i)}var S=(0,k.createLogger)("OreRedemption"),b=function(h){return h.toLocaleString("en-US")+" pts"},C=r.OreRedemption=function(){function i(h,V){return(0,e.createComponentVNode)(2,p.Window,{width:490,height:750,children:(0,e.createComponentVNode)(2,p.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,c,{height:"100%"})}),(0,e.createComponentVNode)(2,u),(0,e.createComponentVNode)(2,f)]})})})}return i}(),c=function(h,V){var v=(0,t.useBackend)(V),s=v.act,g=v.data,N=g.id,x=g.points,B=g.disk,L=Object.assign({},(y(h),h));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 T(){return s("eject_id")}return T}(),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 T(){return s("insert_id")}return T}()})}),N&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Current Mining Points",children:(0,e.createComponentVNode)(2,o.Box,{bold:!0,children:b(N.points)})}),N&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Total Mining Points",children:(0,e.createComponentVNode)(2,o.Box,{bold:!0,children:b(N.total_points)})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Unclaimed Points",color:x>0?"good":"grey",bold:x>0&&"good",children:b(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 T(){return s("claim")}return T}()})})]}),(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 T(){return s("eject_disk")}return T}()})}),(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 T(){return s("download")}return T}()})})]}):(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No design disk inserted."})]})))},u=function(h,V){var v=(0,t.useBackend)(V),s=v.act,g=v.data,N=g.sheets,x=Object.assign({},(y(h),h));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,l,{title:"Sheets",columns:[["Available","25%"],["Ore Value","15%"],["Smelt","20%"]]}),N.map(function(B){return(0,e.createComponentVNode)(2,d,{ore:B},B.id)})]})))})},f=function(h,V){var v=(0,t.useBackend)(V),s=v.act,g=v.data,N=g.alloys,x=Object.assign({},(y(h),h));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,l,{title:"Alloys",columns:[["Recipe","50%"],["Available","11%"],["Smelt","20%"]]}),N.map(function(B){return(0,e.createComponentVNode)(2,m,{ore:B},B.id)})]})))})},l=function(h,V){var v;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:h.title}),(v=h.columns)==null?void 0:v.map(function(s){return(0,e.createComponentVNode)(2,o.Stack.Item,{basis:s[1],textAlign:"center",color:"label",bold:!0,children:s[0]},s)})]})})},d=function(h,V){var v=(0,t.useBackend)(V),s=v.act,g=h.ore;if(!(g.value&&g.amount<=0&&!(["metal","glass"].indexOf(g.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",g.id])}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:g.name})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",color:g.amount>=1?"good":"gray",bold:g.amount>=1,align:"center",children:g.amount.toLocaleString("en-US")}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",align:"center",children:g.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(g.amount,50),stepPixelSize:6,onChange:function(){function N(x,B){return s(g.value?"sheet":"alloy",{id:g.id,amount:B})}return N}()})})]})})},m=function(h,V){var v=(0,t.useBackend)(V),s=v.act,g=h.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",g.id])})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"30%",textAlign:"middle",align:"center",children:g.name}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"35%",textAlign:"middle",color:g.amount>=1?"good":"gray",align:"center",children:g.description}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"10%",textAlign:"center",color:g.amount>=1?"good":"gray",bold:g.amount>=1,align:"center",children:g.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(g.amount,50),stepPixelSize:6,onChange:function(){function N(x,B){return s(g.value?"sheet":"alloy",{id:g.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),p=n(71253),k=n(70752),y=function(C){var c;try{c=k("./"+C+".js")}catch(f){if(f.code==="MODULE_NOT_FOUND")return(0,p.routingError)("notFound",C);throw f}var u=c[C];return u||(0,p.routingError)("missingExport",C)},S=r.PAI=function(){function b(C,c){var u=(0,a.useBackend)(c),f=u.act,l=u.data,d=l.app_template,m=l.app_icon,i=l.app_title,h=y(d);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}),i,d!=="pai_main_menu"&&(0,e.createComponentVNode)(2,t.Button,{ml:2,content:"Home",icon:"arrow-up",onClick:function(){function V(){return f("MASTER_back")}return V}()})]}),p:1,children:(0,e.createComponentVNode)(2,h)})})})}return b}()},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),p=n(71253),k=n(59395),y=function(u){var f;try{f=k("./"+u+".js")}catch(d){if(d.code==="MODULE_NOT_FOUND")return(0,p.routingError)("notFound",u);throw d}var l=f[u];return l||(0,p.routingError)("missingExport",u)},S=r.PDA=function(){function c(u,f){var l=(0,a.useBackend)(f),d=l.act,m=l.data,i=m.app,h=m.owner;if(!h)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 V=y(i.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,b)}),(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:i.icon,mr:1}),i.name]}),children:(0,e.createComponentVNode)(2,V)})}),(0,e.createComponentVNode)(2,t.Stack.Item,{mt:7.5,children:(0,e.createComponentVNode)(2,C)})]})})})}return c}(),b=function(u,f){var l=(0,a.useBackend)(f),d=l.act,m=l.data,i=m.idInserted,h=m.idLink,V=m.stationTime,v=m.cartridge_name,s=m.request_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 g(){return d("Authenticate")}return g}(),content:i?h:"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 g(){return d("Eject")}return g}(),content:v?["Eject "+v]:"No Cartridge Inserted"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"sd-card",color:"transparent",onClick:function(){function g(){return d("Eject_Request")}return g}(),content:s?["Eject "+s]:"No Request Cartridge Inserted"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"right",bold:!0,mr:1,mt:.5,children:V})]})},C=function(u,f){var l=(0,a.useBackend)(f),d=l.act,m=l.data,i=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:[!!i.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:i.has_back?"white":"disabled",icon:"arrow-alt-circle-left-o",onClick:function(){function h(){return d("Back")}return h}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{basis:i.has_back?"33%":"100%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:i.is_home?"disabled":"white",icon:"home",onClick:function(){function h(){d("Home")}return h}()})})]})})}},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),p=r.PDAPainter=function(){function y(S,b){var C=(0,a.useBackend)(b),c=C.act,u=C.data,f=u.statusLabel,l=u.pdaTypes,d=u.hasPDA,m=u.pdaIcon,i=u.pdaIconState,h=u.pdaOwnerName,V=u.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:d?"eject":"exclamation-triangle",selected:d,content:d?"\u0418\u0437\u0432\u043B\u0435\u0447\u044C":"-----",tooltip:d?"\u0418\u0437\u0432\u043B\u0435\u0447\u044C PDA":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C PDA",tooltipPosition:"left",onClick:function(){function v(){return c(d?"eject_pda":"insert_pda")}return v}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0418\u043C\u044F",children:h||"\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.DmIcon,{height:"160px",icon:m,icon_state:i,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:!d,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 v(){return c("erase_pda")}return v}()})]})})})]}),(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(l).map(function(v){return(0,e.createComponentVNode)(2,k,{selectedPda:v,selectedPdaIcon:l[v][0]},v)})})})})})]})})})}return y}(),k=r.PDAColorRow=function(){function y(S,b){var C=(0,a.useBackend)(b),c=C.act,u=C.data,f=u.hasPDA,l=u.pdaIcon,d=S.selectedPda;return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:(0,e.createComponentVNode)(2,o.DmIcon,{icon:l,icon_state:d,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:d,content:d,confirmContent:"\u041F\u043E\u043A\u0440\u0430\u0441\u0438\u0442\u044C?",textAlign:"left",onClick:function(){function m(){return c("choose_pda",{selectedPda:d})}return m}()})})]})}return y}()},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),p=n(49968),k=r.Pacman=function(){function y(S,b){var C=(0,a.useBackend)(b),c=C.act,u=C.data,f=u.broken,l=u.anchored,d=u.active,m=u.fuel_type,i=u.fuel_usage,h=u.fuel_stored,V=u.fuel_cap,v=u.is_ai,s=u.tmp_current,g=u.tmp_max,N=u.tmp_overheat,x=u.output_max,B=u.power_gen,L=u.output_set,T=u.has_fuel,A=h/V,E=s/g,w=L*B,O=Math.round(h/i),M=Math.round(O/60),P=O>120?M+" minutes":O+" seconds";return(0,e.createComponentVNode)(2,o.Window,{width:500,height:260,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(f||!l)&&(0,e.createComponentVNode)(2,t.Section,{title:"Status",children:[!!f&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"The generator is malfunctioning!"}),!f&&!l&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"The generator needs to be anchored to the floor with a wrench."})]}),!f&&!!l&&(0,e.createVNode)(1,"div",null,[(0,e.createComponentVNode)(2,t.Section,{title:"Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:d?"power-off":"times",content:d?"On":"Off",tooltip:"Toggles the generator on/off. Requires fuel.",tooltipPosition:"left",disabled:!T,selected:d,onClick:function(){function F(){return c("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(R,U){return c("change_power",{change_power:U})}return F}()}),"(",(0,p.formatPower)(w),")"]})})}),(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:E,ranges:{green:[-1/0,.33],orange:[.33,.66],red:[.66,1/0]},children:[s," \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:d||v||!T,onClick:function(){function F(){return c("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(h/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:[i/1e3," dm\xB3/s"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fuel depletion",children:[!!T&&(i?P:"N/A"),!T&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Out of fuel"})]})]})})]})})],4)]})})}return y}()},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),p=r.PersonalCrafting=function(){function S(b,C){var c=(0,a.useBackend)(C),u=c.act,f=c.data,l=f.busy,d=f.category,m=f.display_craftable_only,i=f.display_compact,h=f.prev_cat,V=f.next_cat,v=f.subcategory,s=f.prev_subcat,g=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:[!!l&&(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:d,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 u("toggle_recipes")}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Compact Mode",icon:i?"check-square-o":"square-o",selected:i,onClick:function(){function N(){return u("toggle_compact")}return N}()})],4),children:[(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:h,icon:"arrow-left",onClick:function(){function N(){return u("backwardCat")}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:V,icon:"arrow-right",onClick:function(){function N(){return u("forwardCat")}return N}()})]}),v&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:s,icon:"arrow-left",onClick:function(){function N(){return u("backwardSubCat")}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:g,icon:"arrow-right",onClick:function(){function N(){return u("forwardSubCat")}return N}()})]}),i?(0,e.createComponentVNode)(2,k):(0,e.createComponentVNode)(2,y)]})]})})}return S}(),k=function(b,C){var c=(0,a.useBackend)(C),u=c.act,f=c.data,l=f.display_craftable_only,d=f.can_craft,m=f.cant_craft;return(0,e.createComponentVNode)(2,t.Box,{mt:1,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[d.map(function(i){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:i.name,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",onClick:function(){function h(){return u("make",{make:i.ref})}return h}()}),i.catalyst_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:i.catalyst_text,content:"Catalysts",color:"transparent"}),(0,e.createComponentVNode)(2,t.Button,{tooltip:i.req_text,content:"Requirements",color:"transparent"}),i.tool_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:i.tool_text,content:"Tools",color:"transparent"})]},i.name)}),!l&&m.map(function(i){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:i.name,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",disabled:!0}),i.catalyst_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:i.catalyst_text,content:"Catalysts",color:"transparent"}),(0,e.createComponentVNode)(2,t.Button,{tooltip:i.req_text,content:"Requirements",color:"transparent"}),i.tool_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:i.tool_text,content:"Tools",color:"transparent"})]},i.name)})]})})},y=function(b,C){var c=(0,a.useBackend)(C),u=c.act,f=c.data,l=f.display_craftable_only,d=f.can_craft,m=f.cant_craft;return(0,e.createComponentVNode)(2,t.Box,{mt:1,children:[d.map(function(i){return(0,e.createComponentVNode)(2,t.Section,{title:i.name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",onClick:function(){function h(){return u("make",{make:i.ref})}return h}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[i.catalyst_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Catalysts",children:i.catalyst_text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Requirements",children:i.req_text}),i.tool_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tools",children:i.tool_text})]})},i.name)}),!l&&m.map(function(i){return(0,e.createComponentVNode)(2,t.Section,{title:i.name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",disabled:!0}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[i.catalyst_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Catalysts",children:i.catalyst_text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Requirements",children:i.req_text}),i.tool_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tools",children:i.tool_text})]})},i.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),p=n(88510),k=n(64795),y=n(25328);function S(f,l){var d=typeof Symbol!="undefined"&&f[Symbol.iterator]||f["@@iterator"];if(d)return(d=d.call(f)).next.bind(d);if(Array.isArray(f)||(d=b(f))||l&&f&&typeof f.length=="number"){d&&(f=d);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 b(f,l){if(f){if(typeof f=="string")return C(f,l);var d={}.toString.call(f).slice(8,-1);return d==="Object"&&f.constructor&&(d=f.constructor.name),d==="Map"||d==="Set"?Array.from(f):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?C(f,l):void 0}}function C(f,l){(l==null||l>f.length)&&(l=f.length);for(var d=0,m=Array(l);df?this.substring(0,f)+"...":this};var c=function(l,d){d===void 0&&(d="");var m=(0,y.createSearch)(d,function(i){return i.altername});return(0,k.flow)([(0,p.filter)(function(i){return i==null?void 0:i.altername}),d&&(0,p.filter)(m),(0,p.sortBy)(function(i){return i.id})])(l)},u=r.Photocopier=function(){function f(l,d){for(var m=(0,a.useBackend)(d),i=m.act,h=m.data,V=h.copies,v=h.maxcopies,s=(0,a.useLocalState)(d,"searchText",""),g=s[0],N=s[1],x=c((0,p.sortBy)(function(P){return P.category})(h.forms||[]),g),B=[],L=S(x),T;!(T=L()).done;){var A=T.value;B.includes(A.category)||B.push(A.category)}var E=(0,a.useLocalState)(d,"number",0),w=E[0],O=E[1],M;return h.category===""?M=x:M=x.filter(function(P){return P.category===h.category}),(0,e.createComponentVNode)(2,o.Window,{width:550,height:575,theme:h.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:h.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:h.form_id===""?"\u041D\u0435 \u0432\u044B\u0431\u0440\u0430\u043D\u0430":h.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:!h.copyitem&&!h.mob,icon:h.copyitem||h.mob?"eject":"times",content:h.copyitem?h.copyitem:h.mob?"\u0416\u043E\u043F\u0430 "+h.mob+"!":"\u0421\u043B\u043E\u0442 \u0434\u043B\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430",onClick:function(){function P(){return i("removedocument")}return P}()})})}),(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:!h.folder,icon:h.folder?"eject":"times",content:h.folder?h.folder:"\u0421\u043B\u043E\u0442 \u0434\u043B\u044F \u043F\u0430\u043F\u043A\u0438",onClick:function(){function P(){return i("removefolder")}return P}()})})})]}),(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:h.toner===0||h.form===null,content:"\u041F\u0435\u0447\u0430\u0442\u044C",onClick:function(){function P(){return i("print_form")}return P}()})}),!!h.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:h.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 P(){return i("ai_pic")}return P}()})})]}),(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:h.toner===0||!h.copyitem&&!h.mob,onClick:function(){function P(){return i("copy")}return P}()})}),!!h.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:h.toner===0,onClick:function(){function P(){return i("ai_text")}return P}()})})]}),(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:v,value:V,stepPixelSize:10,onChange:function(){function P(F,R){return i("copies",{new:R})}return P}()})]})]}),(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:!h.category,onClick:function(){function P(){return i("choose_category",{category:""})}return P}()})}),B.map(function(P){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:P,selected:h.category===P,onClick:function(){function F(){return i("choose_category",{category:P})}return F}()},P)},P)})]})})})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"60%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:h.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 P(F,R){return N(R)}return P}()}),children:M.map(function(P){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mb:.5,color:"transparent",content:P.altername.trimLongStr(37),tooltip:P.altername,selected:h.form_id===P.id,onClick:function(){function F(){return i("choose_form",{path:P.path,id:P.id})}return F}()})},P.path)})})})]})})})}return f}()},49177:function(I,r,n){"use strict";r.__esModule=!0,r.PlayerPanel=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),p=["checked"];function k(u,f){if(u==null)return{};var l={};for(var d in u)if({}.hasOwnProperty.call(u,d)){if(f.includes(d))continue;l[d]=u[d]}return l}var y=function(f,l){var d,m={ghost:["ghost","dead","observer"],human:["human","carbon"],monkey:["monkey"],cyborg:["cyborg","robot","borg"],ai:["ai","artificial intelligence"],animal:["simple","animal"]};return((d=m[l])==null?void 0:d.some(function(i){return f.toLowerCase().includes(i)}))||!1},S=r.PlayerPanel=function(){function u(f,l){var d=(0,a.useBackend)(l),m=d.act,i=d.data,h=function(){function V(v,s){s===void 0&&(s={}),m(v,Object.assign({selectedPlayerCkey:i.ckey},s))}return V}();return i.ckey?(0,e.createComponentVNode)(2,o.Window,{title:"Options Panel - "+i.ckey,width:800,height:950,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Refresh",onClick:function(){function V(){return h("refresh")}return V}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Old Panel",onClick:function(){function V(){return h("old_pp")}return V}()})]}),(0,e.createComponentVNode)(2,b),(0,e.createComponentVNode)(2,C)]})})}):(0,e.createComponentVNode)(2,o.Window,{title:"Options Panel - Error",width:800,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Error",children:[(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"No valid player data found. Please refresh or select a valid player."}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Refresh",onClick:function(){function V(){return m("refresh")}return V}()})]})})})}return u}(),b=function(f,l){var d=(0,a.useBackend)(l),m=d.act,i=d.data,h=(0,a.useLocalState)(l,"show_ip",!1),V=h[0],v=h[1],s=(0,a.useLocalState)(l,"show_cid",!1),g=s[0],N=s[1],x=function(L,T){T===void 0&&(T={}),m(L,Object.assign({selectedPlayerCkey:i.ckey},T))};return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Player Information",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Character:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.characterName}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Ckey:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.ckey})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Rank:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.rank}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Discord:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.discord})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Account Registered:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.accountRegistered}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Byond Version:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.byondVersion})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"CID:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:g?i.CID:"Hidden",onClick:function(){function B(){return N(!g)}return B}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"IP Address:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:V?i.ipAddress:"Hidden",onClick:function(){function B(){return v(!V)}return B}()})})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Mob Type:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.mobType}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Game State:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.gameState})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Related By CID:"}),(0,e.createComponentVNode)(2,t.Button,{content:"Related by CID",color:"blue",onClick:function(){function B(){return x("relatedbycid")}return B}()}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Related By IP:"}),(0,e.createComponentVNode)(2,t.Button,{content:"Related by IP",color:"blue",onClick:function(){function B(){return x("relatedbyip")}return B}()})]})]})})})},C=function(f,l){var d=(0,a.useBackend)(l),m=d.act,i=d.data,h=function(g,N){N===void 0&&(N={}),m(g,Object.assign({selectedPlayerCkey:i.ckey},N))},V=function(g){return i.adminRights.toLowerCase().includes(g)||!1},v=function(g){i.ckey&&h("toggleMute",{type:g})};return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Punish",children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"times",content:"KICK",color:"red",onClick:function(){function s(){return h("kick")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"ban",content:"JOBBAN",color:"red",disabled:!V("ban"),onClick:function(){function s(){return h("jobban")}return s}()}),V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"bullseye",content:"ADD TO WATCHLIST",color:"red",onClick:function(){function s(){return h("watchlist")}return s}()}):null]}),(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"ban",content:"BAN",color:"red",disabled:!V("ban"),onClick:function(){function s(){return h("ban")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"ban",content:"APPEARANCE BAN",color:"red",disabled:!V("ban"),onClick:function(){function s(){return h("appban")}return s}()}),V("event")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"bolt",content:"SMITE",color:"red",hidden:!V("event"),onClick:function(){function s(){return h("smite")}return s}()}):null,V("event")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"hand-holding-heart",content:"BLESS",onClick:function(){function s(){return h("bless")}return s}()}):null]})]})})}),(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Message",children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"comment",content:"PM",onClick:function(){function s(){return h("pm")}return s}()}),V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"comment-alt",content:"NARRATE",onClick:function(){function s(){return h("narrate")}return s}()}):null,V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"user-secret",content:"SEND ALERT",onClick:function(){function s(){return h("sendalert")}return s}()}):null]}),(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"user-secret",content:"SM",disabled:!V("event"),onClick:function(){function s(){return h("sm")}return s}()}),V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"crown",content:"MAN UP",onClick:function(){function s(){return h("manup")}return s}()}):null,V("sound")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"music",content:"PLAY SOUND TO",onClick:function(){function s(){return h("playsoundto")}return s}()}):null]})]})})})]}),(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Movement",children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eye",content:"FLW",onClick:function(){function s(){return h("flw")}return s}()}),V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"download",content:"GET",onClick:function(){function s(){return h("get")}return s}()}):null,V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"paper-plane",content:"SEND",onClick:function(){function s(){return h("send")}return s}()}):null]}),(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"running",content:"JUMPTO",onClick:function(){function s(){return h("jumpto")}return s}()}),V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"sign-out-alt",content:"LOBBY",onClick:function(){function s(){return h("lobby")}return s}()}):null,V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"columns",content:"SEND TO CRYO",onClick:function(){function s(){return h("cryo")}return s}()}):null]})]})})}),(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Info",children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"book",content:"LOGS",onClick:function(){function s(){return h("logs")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"clipboard",content:"NOTES",onClick:function(){function s(){return h("notes")}return s}()}),V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eye",content:"PLAYTIME",onClick:function(){function s(){return h("playtime")}return s}()}):null,V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"globe",content:"GEOIP",onClick:function(){function s(){return h("geoip")}return s}()}):null]}),(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"user-secret",content:"TRAITOR PANEL",onClick:function(){function s(){return h("tp")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"code",content:"VV",onClick:function(){function s(){return h("vv")}return s}()}),V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"database",content:"CHECK GLOBAL CCDB",onClick:function(){function s(){return h("ccdb")}return s}()}):null]})]})})})]}),(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{children:[V("spawn")?(0,e.createComponentVNode)(2,t.Section,{title:"Transformation",children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"ghost",content:"MAKE GHOST",color:y(i.mobType,"ghost")?"good":"",onClick:function(){function s(){return h("makeghost")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"user",content:"MAKE HUMAN",color:y(i.mobType,"human")?"good":"",onClick:function(){function s(){return h("makehuman")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"paw",content:"MAKE MONKEY",color:y(i.mobType,"monkey")?"good":"",onClick:function(){function s(){return h("makemonkey")}return s}()})]}),(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"robot",content:"MAKE CYBORG",color:y(i.mobType,"cyborg")?"good":"",onClick:function(){function s(){return h("makeborg")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"microchip",content:"MAKE AI",color:y(i.mobType,"ai")?"good":"",onClick:function(){function s(){return h("makeai")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"microchip",content:"ANIMALIZE",color:y(i.mobType,"animal")?"good":"",onClick:function(){function s(){return h("makeanimal")}return s}()})]})]})}):null,y(i.mobType,"ghost")?(0,e.createComponentVNode)(2,t.Section,{title:"Observer",children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{size:2,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"TOGGLE RESPAWNABILITY",onClick:function(){function s(){return h("respawnability")}return s}()})}),(0,e.createComponentVNode)(2,t.Grid.Column,{size:2,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"staff-snake",content:"RE-INCARNATE",disabled:!V("spawn"),onClick:function(){function s(){return h("reviveghost")}return s}()})})]})}):(0,e.createComponentVNode)(2,t.Section,{title:"Health",children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"heart",content:"HEALTHSCAN",onClick:function(){function s(){return h("healthscan")}return s}()}),V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"GIVE DISEASE",onClick:function(){function s(){return h("giveDisease")}return s}()}):null,V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"CURE DISEASE",onClick:function(){function s(){return h("cureDisease")}return s}()}):null,V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"CURE ALL BAD DISEASES",onClick:function(){function s(){return h("cureAllDiseases")}return s}()}):null]}),(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"CHEMSCAN",onClick:function(){function s(){return h("chemscan")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"plus",content:"REJUVINATE",disabled:!V("rejuvinate"),onClick:function(){function s(){return h("aheal")}return s}()}),V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"dna",content:"SHOW DNA",onClick:function(){function s(){return h("mutate")}return s}()}):null]})]})})]}),(0,e.createComponentVNode)(2,t.Grid.Column,{children:[V("admin")?(0,e.createComponentVNode)(2,t.Section,{title:"Mob Manipulation",children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"pencil",content:"MOB RANDOM NAME",onClick:function(){function s(){return h("randomizename")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"shirt",content:"SELECT EQUIPMENT",disabled:!V("event"),onClick:function(){function s(){return h("selectequip")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"microphone",content:"CHANGE VOICE",onClick:function(){function s(){return h("changevoice")}return s}()}),V("event")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"circle-user",content:"MIRROR UI TO ADMIN",onClick:function(){function s(){return h("mirroradmin")}return s}()}):null]}),(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"pen",content:"CHARACTER RANDOM NAME",onClick:function(){function s(){return h("userandomname")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eraser",content:"ERASE FLAVOR",onClick:function(){function s(){return h("eraseflavortext")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"shirt",content:"CHECK CONTENTS",onClick:function(){function s(){return h("checkcontents")}return s}()}),V("event")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"circle-user",content:"MIRROR UI TO PLAYER",onClick:function(){function s(){return h("mirrorplayer")}return s}()}):null]})]})}):null,(0,e.createComponentVNode)(2,t.Section,{title:"Misc",children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[V("event")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"gavel",content:"THUNDERDOME 1",onClick:function(){function s(){return h("thunderdome1")}return s}()}):null,V("event")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"gavel",content:"THUNDERDOME 2",onClick:function(){function s(){return h("thunderdome2")}return s}()}):null,V("event")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"comment",content:"FORCESAY",onClick:function(){function s(){return h("forcesay")}return s}()}):null,V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"handcuffs",content:"PRISON",onClick:function(){function s(){return h("prison")}return s}()}):null,V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"SYNDI JAIL RELEASE",onClick:function(){function s(){return h("contractor_release")}return s}()}):null,V("event")||V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"cookie",content:"SPAWN COOKIE",onClick:function(){function s(){return h("spawncookie")}return s}()}):null]}),(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[V("event")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"gavel",content:"THUNDERDOME ADMIN",onClick:function(){function s(){return h("thunderdomeadmin")}return s}()}):null,V("event")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eye",content:"THUNDERDOME OBSERVER",onClick:function(){function s(){return h("thunderdomeobserver")}return s}()}):null,V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"wheelchair-move",content:"AROOM WRAP",onClick:function(){function s(){return h("adminroom")}return s}()}):null,V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"SYNDI JAIL START",onClick:function(){function s(){return h("contractor_start")}return s}()}):null,V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"SYNDI JAIL STOP",onClick:function(){function s(){return h("contractor_stop")}return s}()}):null,(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"Some Admin Button",onClick:function(){function s(){return h("someadminbutton")}return s}()})]})]})})]})]}),(0,e.createComponentVNode)(2,t.Grid,{children:(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Mute Controls",children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{size:7,children:[(0,e.createComponentVNode)(2,c,{fluid:!0,checked:i.muteStates.ic,onClick:function(){function s(){return v("ic")}return s}(),content:"IC"}),(0,e.createComponentVNode)(2,c,{fluid:!0,checked:i.muteStates.ooc,onClick:function(){function s(){return v("ooc")}return s}(),content:"OOC"}),(0,e.createComponentVNode)(2,c,{fluid:!0,checked:i.muteStates.pray,onClick:function(){function s(){return v("pray")}return s}(),content:"PRAY"}),(0,e.createComponentVNode)(2,c,{fluid:!0,checked:i.muteStates.emote,onClick:function(){function s(){return v("emote")}return s}(),content:"EMOTE"})]}),(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,c,{fluid:!0,checked:i.muteStates.adminhelp,onClick:function(){function s(){return v("adminhelp")}return s}(),content:"ADMINHELP"}),(0,e.createComponentVNode)(2,c,{fluid:!0,checked:i.muteStates.deadchat,onClick:function(){function s(){return v("deadchat")}return s}(),content:"DEADCHAT"}),(0,e.createComponentVNode)(2,c,{fluid:!0,checked:i.muteStates.all,onClick:function(){function s(){return v("all")}return s}(),content:"ALL"})]})]})})})})]})},c=function(f){var l=f.checked,d=k(f,p);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Button,Object.assign({color:l?"red":"green",icon:l?"check-square-o":"square-o"},d)))}},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),p=r.PodTracking=function(){function k(y,S){var b=(0,a.useBackend)(S),C=b.act,c=b.data,u=c.pods;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:u.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 k}()},70857:function(I,r,n){"use strict";r.__esModule=!0,r.PollListPanel=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),p=r.PollListPanel=function(){function k(y,S){var b=(0,a.useBackend)(S),C=b.act,c=b.data,u=c.polls||{};return(0,e.createComponentVNode)(2,o.Window,{title:"Poll List Panel",width:700,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Poll List Panel",children:["Currently running polls Note when editing polls or their options changes are not saved until you press Sumbit Poll.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"New Poll",onClick:function(){function f(){return C("newpoll")}return f}()}),(0,e.createComponentVNode)(2,t.LabeledList,{children:u.map(function(f){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:f.question,children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",onClick:function(){function l(){return C("editpoll",{poll_to_edit:f.id})}return l}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Delete",onClick:function(){function l(){return C("deletepoll",{poll_to_delete:f.id})}return l}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Results",onClick:function(){function l(){return C("resultspoll",{poll_to_result:f.id})}return l}()}),(0,e.createComponentVNode)(2,t.Box,{children:f.description}),(0,e.createComponentVNode)(2,t.Divider)]},"poll")})})]})})})}return k}()},45736:function(I,r,n){"use strict";r.__esModule=!0,r.PollManagement=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(94798),p=n(98595),k=r.PollManagement=function(){function S(b,C){var c=(0,a.useBackend)(C),u=c.act,f=c.data,l=f.poll,d=f.has_poll,m=f.poll_types,i=f.interval_types,h=(0,a.useLocalState)(C,"question",l.question),V=h[0],v=h[1],s=(0,a.useLocalState)(C,"poll_type",l.poll_type),g=s[0],N=s[1],x=(0,a.useLocalState)(C,"options_allowed",l.options_allowed),B=x[0],L=x[1],T=(0,a.useLocalState)(C,"admin_only",l.admin_only),A=T[0],E=T[1],w=(0,a.useLocalState)(C,"dont_show",l.dont_show),O=w[0],M=w[1],P=(0,a.useLocalState)(C,"allow_revoting",l.allow_revoting),F=P[0],R=P[1],U=(0,a.useLocalState)(C,"interval",l.interval),j=U[0],W=U[1],K=(0,a.useLocalState)(C,"duration",l.duration),$=K[0],ne=K[1],Y=(0,a.useLocalState)(C,"start_datetime",l.start_datetime),le=Y[0],de=Y[1],oe=(0,a.useLocalState)(C,"end_datetime",l.end_datetime),re=oe[0],Z=oe[1],ae=(0,a.useLocalState)(C,"subtitle",l.subtitle),J=ae[0],X=ae[1],Q=(0,a.useLocalState)(C,"minimum_playtime",l.minimum_playtime),q=Q[0],te=Q[1],fe=(0,a.useLocalState)(C,"run_duration",l.run_duration),ye=fe[0],pe=fe[1],Le=(0,a.useLocalState)(C,"run_start",l.run_start),D=Le[0],ie=Le[1],se=(0,a.useLocalState)(C,"clear_votes",l.clear_votes),Ce=se[0],he=se[1];return(0,e.createComponentVNode)(2,p.Window,{title:"Poll Management",width:600,height:640,children:(0,e.createComponentVNode)(2,p.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Poll Creation",children:[(0,e.createComponentVNode)(2,t.Box,{children:["Question:",(0,e.createComponentVNode)(2,t.Input,{width:40,placeholder:"Question goes here",value:V,onChange:function(){function ve(Be,we){return v(we)}return ve}()}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{inline:!0,pl:1,children:"Choice:"}),(0,e.createComponentVNode)(2,t.Dropdown,{width:10,disabled:d,options:m,selected:g,onSelected:function(){function ve(Be){return N(Be)}return ve}()}),d&g!=="Multiple Choice"?null:(0,e.createComponentVNode)(2,t.Box,{inline:!0,children:["Mult-choice options allowed:",(0,e.createComponentVNode)(2,t.NumberInput,{width:3,minValue:0,maxValue:100,value:B,onChange:function(){function ve(Be,we){return L(!B)}return ve}()})]}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.ButtonCheckbox,{content:"Admin only",checked:A,onClick:function(){function ve(){return E(!A)}return ve}()}),(0,e.createComponentVNode)(2,o.ButtonCheckbox,{content:"Don't show",checked:O,onClick:function(){function ve(){return M(!O)}return ve}()}),(0,e.createComponentVNode)(2,o.ButtonCheckbox,{content:"Allow revoting",checked:F,onClick:function(){function ve(){return R(!F)}return ve}()}),"Min. playtime to vote (in hours):",(0,e.createComponentVNode)(2,t.Box,{inline:!0,ml:1,children:(0,e.createComponentVNode)(2,t.NumberInput,{width:3,placeholder:"Number of hours",value:q,onChange:function(){function ve(Be,we){return te(we)}return ve}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",children:[(0,e.createComponentVNode)(2,t.Box,{children:"Duration"}),(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",py:1,content:ye?"Run for":"Run until",onClick:function(){function ve(){return pe(!ye)}return ve}()}),ye?(0,e.createComponentVNode)(2,t.Box,{inline:!0,children:[(0,e.createComponentVNode)(2,t.NumberInput,{placeholder:"Amount number",width:3,minValue:0,maxValue:100,value:$,onChange:function(){function ve(Be,we){return ne(we)}return ve}()}),(0,e.createComponentVNode)(2,t.Dropdown,{options:i,selected:j,onSelected:function(){function ve(Be){return W(Be)}return ve}()})]}):(0,e.createComponentVNode)(2,t.Box,{inline:!0,children:["Until:",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Input,{width:15,placeholder:"YYYY-MM-DD HH:MM:SS",value:re||"1970-01-01 00:00:01",onChange:function(){function ve(Be,we){return Z(we)}return ve}()})]})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Box,{children:"Start"}),(0,e.createComponentVNode)(2,t.Button,{content:D?"Now":"At datetime",onClick:function(){function ve(){return ie(!D)}return ve}()}),D?null:(0,e.createComponentVNode)(2,t.Input,{width:15,placeholder:"YYYY-MM-DD HH:MM:SS",value:le||"1970-01-01 00:00:01",onChange:function(){function ve(Be,we){return de(we)}return ve}()})]})]}),(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:["Subtitle (Optional)",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.TextArea,{height:10,width:20,rows:"12",value:J,onChange:function(){function ve(Be,we){return X(we)}return ve}()})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:d?(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Clear poll votes",onClick:function(){function ve(){return u("clear_poll_votes")}return ve}()}),l.poll_votes," players have voted"]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,o.ButtonCheckbox,{content:"Clear votes on edit",checked:Ce,onClick:function(){function ve(){return he(!Ce)}return ve}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{p:2,content:"Submit Poll",onClick:function(){function ve(){return u("submit_poll",{question:V,poll_type:g,options_allowed:B,admin_only:A,dont_show:O,allow_revoting:F,interval:j,duration:$,start_datetime:le,end_datetime:re,subtitle:J,poll_votes:q,run_duration:ye,run_start:D,clear_votes:Ce})}return ve}()})})]}):(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{p:1,m:2,content:"Initliaze Question",onClick:function(){function ve(){return u("initialize_poll",{question:V,poll_type:g,options_allowed:B,admin_only:A,dont_show:O,allow_revoting:F,interval:j,duration:$,start_datetime:le,end_datetime:re,subtitle:J,poll_votes:q,run_duration:ye,run_start:D,clear_votes:Ce})}return ve}()})})})})]})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Questions Manage",children:d?(0,e.createComponentVNode)(2,y):(0,e.createComponentVNode)(2,t.Box,{children:"First enter the poll question details and press Initialize Question. Then add poll options and press Submit Poll to save and create the question and options. No options are required for Text Reply polls."})})]})})}return S}(),y=function(b,C){var c=(0,a.useBackend)(C),u=c.act,f=c.data,l=f.poll,d=l.options,m=(0,a.useLocalState)(C,"poll_type",null),i=m[0],h=m[1];return(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Add Option",onClick:function(){function V(){return u("add_poll_option")}return V}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:d.map(function(V){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Option "+V.num,children:[V.text,i==="Rating"?(0,e.createComponentVNode)(2,t.Box,{children:["Minimum value: ",V.min_val," | Maximum value:"," ",V.max_val,"Minimum description: ",V.desc_min,"Middle description: ",V.desc_mid,"Maximum description: ",V.desc_max]}):null,(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Edit",onClick:function(){function v(){return u("edit_poll_option",{option_to_edit:V.id})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Delete",onClick:function(){function v(){return u("delete_poll_option",{option_to_delete:V.id})}return v}()}),(0,e.createComponentVNode)(2,t.Divider)]},"option")})})})]})}},80378:function(I,r,n){"use strict";r.__esModule=!0,r.PollOptionPanel=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(94798),p=n(98595),k=r.PollOptionPanel=function(){function y(S,b){var C=(0,a.useBackend)(b),c=C.act,u=C.data,f=u.poll_question,l=u.is_rating,d=u.option,m=(0,a.useLocalState)(b,"text",d.text),i=m[0],h=m[1],V=(0,a.useLocalState)(b,"default_percentage_calc",d.default_percentage_calc),v=V[0],s=V[1],g=(0,a.useLocalState)(b,"min_val",d.min_val),N=g[0],x=g[1],B=(0,a.useLocalState)(b,"max_val",d.max_val),L=B[0],T=B[1],A=(0,a.useLocalState)(b,"desc_min_check",d.desc_min_check),E=A[0],w=A[1],O=(0,a.useLocalState)(b,"desc_mid_check",d.desc_mid_check),M=O[0],P=O[1],F=(0,a.useLocalState)(b,"desc_max_check",d.desc_max_check),R=F[0],U=F[1],j=(0,a.useLocalState)(b,"desc_min_text",d.desc_min_text),W=j[0],K=j[1],$=(0,a.useLocalState)(b,"desc_mid_text",d.desc_min_text),ne=$[0],Y=$[1],le=(0,a.useLocalState)(b,"desc_max_text",d.desc_min_text),de=le[0],oe=le[1];return(0,e.createComponentVNode)(2,p.Window,{title:"Poll Option Panel",width:400,height:l?320:180,children:(0,e.createComponentVNode)(2,p.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:f,children:[(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Input,{width:"100%",content:i,onChange:function(){function re(Z,ae){return h(ae)}return re}()})}),(0,e.createVNode)(1,"br"),l?(0,e.createComponentVNode)(2,t.Box,{children:["Minimum value",(0,e.createComponentVNode)(2,t.Input,{value:N}),"Maximum Value",(0,e.createComponentVNode)(2,t.Input,{value:L}),(0,e.createComponentVNode)(2,Table,{children:[(0,e.createComponentVNode)(2,Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,Table.Cell,{children:(0,e.createComponentVNode)(2,o.ButtonCheckbox,{content:"Minimum description",checked:E,onClick:function(){function re(){return w(!E)}return re}()})}),(0,e.createComponentVNode)(2,Table.Cell,{children:(0,e.createComponentVNode)(2,o.ButtonCheckbox,{content:"Middle description",checked:M,onClick:function(){function re(){return P(!M)}return re}()})}),(0,e.createComponentVNode)(2,Table.Cell,{children:(0,e.createComponentVNode)(2,o.ButtonCheckbox,{content:"Maximum description",checked:R,onClick:function(){function re(){return U(!R)}return re}()})})]}),(0,e.createComponentVNode)(2,Table.Row,{children:[(0,e.createComponentVNode)(2,Table.Cell,{children:(0,e.createComponentVNode)(2,t.Input,{value:W,onEnter:function(){function re(Z,ae){return K(ae)}return re}()})}),(0,e.createComponentVNode)(2,Table.Cell,{children:(0,e.createComponentVNode)(2,t.Input,{value:ne,onEnter:function(){function re(Z,ae){return Y(ae)}return re}()})}),(0,e.createComponentVNode)(2,Table.Cell,{children:(0,e.createComponentVNode)(2,t.Input,{value:de,onEnter:function(){function re(Z,ae){return oe(ae)}return re}()})})]})]}),(0,e.createVNode)(1,"br")]}):null,(0,e.createComponentVNode)(2,o.ButtonCheckbox,{checked:v,content:"\u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043E\u043F\u0446\u0438\u044E \u0432 \u0440\u0430\u0441\u0447\u0435\u0442 \u043F\u0440\u043E\u0446\u0435\u043D\u0442\u0430 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432 \u043E\u043F\u0440\u043E\u0441\u0430",onClick:function(){function re(){return s(!v)}return re}()}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Sumbit",onClick:function(){function re(){return c("submit_option",{text:i,default_percentage_calc:v,min_val:N,max_val:L,desc_min_check:E,desc_mid_check:M,desc_max_check:R,desc_min_text:W,desc_mid_text:ne,desc_max_text:de})}return re}()})]})})})}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),p=["tempKey"];function k(C,c){if(C==null)return{};var u={};for(var f in C)if({}.hasOwnProperty.call(C,f)){if(c.includes(f))continue;u[f]=C[f]}return u}var y={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}},S=function(c,u){var f=c.tempKey,l=k(c,p),d=y[f];if(!d)return null;var m=(0,a.useBackend)(u),i=m.data,h=m.act,V=i.currentTemp,v=d.label,s=d.icon,g=f===V,N=function(){h("setTemp",{temp:f})};return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Button,Object.assign({selected:g,onClick:N},l,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:s}),v]})))},b=r.PoolController=function(){function C(c,u){for(var f=(0,a.useBackend)(u),l=f.data,d=l.emagged,m=l.currentTemp,i=y[m]||y.normal,h=i.label,V=i.color,v=[],s=0,g=Object.entries(y);s50?"battery-half":"battery-quarter")||V==="C"&&"bolt"||V==="F"&&"battery-full"||V==="M"&&"slash",color:V==="N"&&(v>50?"yellow":"red")||V==="C"&&"yellow"||V==="F"&&"green"||V==="M"&&"orange"}),(0,e.createComponentVNode)(2,S.Box,{inline:!0,width:"36px",textAlign:"right",children:(0,o.toFixed)(v)+"%"})],4)};d.defaultHooks=p.pureComponentHooks;var m=function(h){var V,v,s=h.status;switch(s){case"AOn":V=!0,v=!0;break;case"AOff":V=!0,v=!1;break;case"On":V=!1,v=!0;break;case"Off":V=!1,v=!1;break}var g=(v?"On":"Off")+(" ["+(V?"auto":"manual")+"]");return(0,e.createComponentVNode)(2,S.ColorBox,{color:v?"good":"bad",content:V?void 0:"M",title:g})};m.defaultHooks=p.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),p=n(3939),k=n(321),y=n(5485),S=n(98595),b=r.PrisonerImplantManager=function(){function C(c,u){var f=(0,a.useBackend)(u),l=f.act,d=f.data,m=d.loginState,i=d.prisonerInfo,h=d.chemicalInfo,V=d.trackingInfo,v;if(!m.logged_in)return(0,e.createComponentVNode)(2,S.Window,{theme:"security",width:500,height:850,children:(0,e.createComponentVNode)(2,S.Window.Content,{children:(0,e.createComponentVNode)(2,y.LoginScreen)})});var s=[1,5,10];return(0,e.createComponentVNode)(2,S.Window,{theme:"security",width:500,height:850,children:[(0,e.createComponentVNode)(2,p.ComplexModal),(0,e.createComponentVNode)(2,S.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k.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:i.name?"eject":"id-card",selected:i.name,content:i.name?i.name:"-----",tooltip:i.name?"Eject ID":"Insert ID",onClick:function(){function g(){return l("id_card")}return g}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Points",children:[i.points!==null?i.points:"-/-",(0,e.createComponentVNode)(2,t.Button,{ml:2,icon:"minus-square",disabled:i.points===null,content:"Reset",onClick:function(){function g(){return l("reset_points")}return g}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Point Goal",children:[i.goal!==null?i.goal:"-/-",(0,e.createComponentVNode)(2,t.Button,{ml:2,icon:"pen",disabled:i.goal===null,content:"Edit",onClick:function(){function g(){return(0,p.modalOpen)(u,"set_points")}return g}()})]}),(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:i.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:V.map(function(g){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: ",g.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:g.location}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health",children:g.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,p.modalOpen)(u,"warn",{uid:g.uid})}return N}()})})]})]},g.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:h.map(function(g){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: ",g.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:g.volume})}),s.map(function(N){return(0,e.createComponentVNode)(2,t.Button,{mt:2,disabled:g.volume1100?"purple":m>500?"orange":m>250?"yellow":"green"},S=function(m,i){for(var h=[],V=0;V0?"envelope-open-text":"envelope",onClick:function(){function x(){return h("setScreen",{setScreen:6})}return x}()})}),(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 x(){return h("setScreen",{setScreen:1})}return x}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Request Supplies",icon:"box",onClick:function(){function x(){return h("setScreen",{setScreen:2})}return x}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Relay Anonymous Information",icon:"comment",onClick:function(){function x(){return h("setScreen",{setScreen:3})}return x}()})})]}),(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 x(){return h("setScreen",{setScreen:9})}return x}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"View Shipping Logs",icon:"clipboard-list",onClick:function(){function x(){return h("setScreen",{setScreen:10})}return x}()})})]}),!!s&&(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 x(){return h("setScreen",{setScreen:8})}return x}()})}),(0,e.createComponentVNode)(2,t.Box,{mt:2,children:(0,e.createComponentVNode)(2,t.Button,{content:g?"Speaker Off":"Speaker On",selected:!g,icon:g?"volume-mute":"volume-up",onClick:function(){function x(){return h("toggleSilent")}return x}()})})]})},S=function(d,m){var i=(0,a.useBackend)(m),h=i.act,V=i.data,v=V.department,s,g;switch(d.purpose){case"ASSISTANCE":s=V.assist_dept,g="Request assistance from another department";break;case"SUPPLIES":s=V.supply_dept,g="Request supplies from another department";break;case"INFO":s=V.info_dept,g="Relay information to another department";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 N(){return h("setScreen",{setScreen:0})}return N}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:s.filter(function(N){return N!==v}).map(function(N){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:N,children:[(0,e.createComponentVNode)(2,t.Button,{content:"Message",icon:"envelope",onClick:function(){function x(){return h("writeInput",{write:N,priority:1})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:"High Priority",icon:"exclamation-circle",onClick:function(){function x(){return h("writeInput",{write:N,priority:2})}return x}()})]},N)})})})},b=function(d,m){var i=(0,a.useBackend)(m),h=i.act,V=i.data,v;switch(d.type){case"SUCCESS":v="Message sent successfully";break;case"FAIL":v="Request supplies from another department";break}return(0,e.createComponentVNode)(2,t.Section,{title:v,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function s(){return h("setScreen",{setScreen:0})}return s}()})})},C=function(d,m){var i=(0,a.useBackend)(m),h=i.act,V=i.data,v,s;switch(d.type){case"MESSAGES":v=V.message_log,s="Message Log";break;case"SHIPPING":v=V.shipping_log,s="Shipping label print log";break}return(0,e.createComponentVNode)(2,t.Section,{title:s,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function g(){return h("setScreen",{setScreen:0})}return g}()}),children:v.map(function(g){return(0,e.createComponentVNode)(2,t.Box,{className:"RequestConsole__message",children:g},g)})})},c=function(d,m){var i=(0,a.useBackend)(m),h=i.act,V=i.data,v=V.recipient,s=V.message,g=V.msgVerified,N=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 x(){return h("setScreen",{setScreen:0})}return x}()}),children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Recipient",children:v}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Message",children:s}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Validated by",color:"green",children:g}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Stamped by",color:"blue",children:N})]}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mt:1,textAlign:"center",content:"Send Message",icon:"envelope",onClick:function(){function x(){return h("department",{department:v})}return x}()})]})},u=function(d,m){var i=(0,a.useBackend)(m),h=i.act,V=i.data,v=V.message,s=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 g(){return h("setScreen",{setScreen:0})}return g}()}),children:[(0,e.createComponentVNode)(2,t.Button,{content:v||"Edit Message",icon:"edit",onClick:function(){function g(){return h("writeAnnouncement")}return g}()}),s?(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:!(s&&v),onClick:function(){function g(){return h("sendAnnouncement")}return g}()})]})},f=function(d,m){var i=(0,a.useBackend)(m),h=i.act,V=i.data,v=V.shipDest,s=V.msgVerified,g=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 N(){return h("setScreen",{setScreen:0})}return N}()}),children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Destination",children:v}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Validated by",children:s})]}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mt:1,textAlign:"center",content:"Print Label",icon:"print",disabled:!(v&&s),onClick:function(){function N(){return h("printLabel")}return N}()}),(0,e.createComponentVNode)(2,t.Section,{title:"Destinations",mt:1,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:g.map(function(N){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:N,children:(0,e.createComponentVNode)(2,t.Button,{content:v===N?"Selected":"Select",selected:v===N,onClick:function(){function x(){return h("shipSelect",{shipSelect:N})}return x}()})},N)})})})]})}},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),p=n(98595);/**
+ */function f(T,A){T.prototype=Object.create(A.prototype),T.prototype.constructor=T,l(T,A)}function l(T,A){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(E,w){return E.__proto__=w,E},l(T,A)}function d(T,A){if(T==null)return{};var E={};for(var w in T)if({}.hasOwnProperty.call(T,w)){if(A.includes(w))continue;E[w]=T[w]}return E}var m=r.ColorPickerModal=function(){function T(A,E){var w=(0,t.useBackend)(E),O=w.data,M=O.timeout,P=O.message,F=O.title,R=O.autofocus,U=O.default_color,j=U===void 0?"#000000":U,W=(0,t.useLocalState)(E,"color_picker_choice",(0,y.hexToHsva)(j)),K=W[0],$=W[1];return(0,e.createComponentVNode)(2,p.Window,{height:400,title:F,width:600,theme:"generic",children:[!!M&&(0,e.createComponentVNode)(2,a.Loader,{value:M}),(0,e.createComponentVNode)(2,p.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[P&&(0,e.createComponentVNode)(2,o.Stack.Item,{m:1,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:(0,e.createComponentVNode)(2,o.Box,{color:"label",overflow:"hidden",children:P})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:[!!R&&(0,e.createComponentVNode)(2,o.Autofocus),(0,e.createComponentVNode)(2,i,{color:K,setColor:$,defaultColor:j})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,c.InputButtons,{input:(0,y.hsvaToHex)(K)})})]})})]})}return T}(),i=r.ColorSelector=function(){function T(A,E){var w=A.color,O=A.setColor,M=A.defaultColor,P=function(){function U(j){O(function(W){return Object.assign({},W,j)})}return U}(),F=(0,y.hsvaToRgba)(w),R=(0,y.hsvaToHex)(w);return(0,e.createComponentVNode)(2,o.Flex,{direction:"row",children:[(0,e.createComponentVNode)(2,o.Flex.Item,{mr:2,children:(0,e.createComponentVNode)(2,o.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createVNode)(1,"div","react-colorful",[(0,e.createComponentVNode)(2,g,{hsva:w,onChange:P}),(0,e.createComponentVNode)(2,N,{hue:w.h,onChange:P,className:"react-colorful__last-control"})],4)}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Box,{inline:!0,width:"100px",height:"20px",textAlign:"center",children:"Current"}),(0,e.createComponentVNode)(2,o.Box,{inline:!0,width:"100px",height:"20px",textAlign:"center",children:"Previous"}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Tooltip,{content:R,position:"bottom",children:(0,e.createComponentVNode)(2,o.Box,{inline:!0,width:"100px",height:"30px",backgroundColor:R})}),(0,e.createComponentVNode)(2,o.Tooltip,{content:M,position:"bottom",children:(0,e.createComponentVNode)(2,o.Box,{inline:!0,width:"100px",height:"30px",backgroundColor:M})})]})]})}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:!0,fontSize:"15px",lineHeight:"24px",children:(0,e.createComponentVNode)(2,o.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"Hex:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,height:"24px",children:(0,e.createComponentVNode)(2,v,{fluid:!0,color:(0,y.hsvaToHex)(w).substring(1),onChange:function(){function U(j){C.logger.info(j),O((0,y.hexToHsva)(j))}return U}(),prefixed:!0})})]})}),(0,e.createComponentVNode)(2,o.Stack.Divider),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"H:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,N,{hue:w.h,onChange:P})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,h,{value:w.h,callback:function(){function U(j,W){return P({h:W})}return U}(),max:360,unit:"\xB0"})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"S:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,x,{color:w,onChange:P})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,h,{value:w.s,callback:function(){function U(j,W){return P({s:W})}return U}(),unit:"%"})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"V:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,B,{color:w,onChange:P})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,h,{value:w.v,callback:function(){function U(j,W){return P({v:W})}return U}(),unit:"%"})})]})}),(0,e.createComponentVNode)(2,o.Stack.Divider),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"R:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,L,{color:w,onChange:P,target:"r"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,h,{value:F.r,callback:function(){function U(j,W){F.r=W,P((0,y.rgbaToHsva)(F))}return U}(),max:255})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"G:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,L,{color:w,onChange:P,target:"g"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,h,{value:F.g,callback:function(){function U(j,W){F.g=W,P((0,y.rgbaToHsva)(F))}return U}(),max:255})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"B:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,L,{color:w,onChange:P,target:"b"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,h,{value:F.b,callback:function(){function U(j,W){F.b=W,P((0,y.rgbaToHsva)(F))}return U}(),max:255})})]})})]})})]})}return T}(),h=function(A){var E=A.value,w=A.callback,O=A.min,M=O===void 0?0:O,P=A.max,F=P===void 0?100:P,R=A.unit;return(0,e.createComponentVNode)(2,o.NumberInput,{width:"70px",value:Math.round(E),step:1,minValue:M,maxValue:F,onChange:w,unit:R})},V=function(A){return"#"+A},v=r.HexColorInput=function(){function T(A){var E=A.prefixed,w=A.alpha,O=A.color,M=A.fluid,P=A.onChange,F=d(A,u),R=function(){function j(W){return W.replace(/([^0-9A-F]+)/gi,"").substring(0,w?8:6)}return j}(),U=function(){function j(W){return(0,y.validHex)(W,w)}return j}();return(0,e.normalizeProps)((0,e.createComponentVNode)(2,s,Object.assign({},F,{fluid:M,color:O,onChange:P,escape:R,format:E?V:void 0,validate:U})))}return T}(),s=r.ColorInput=function(T){function A(w){var O;return O=T.call(this)||this,O.props=void 0,O.state=void 0,O.handleInput=function(M){var P=O.props.escape(M.currentTarget.value);O.setState({localValue:P})},O.handleBlur=function(M){M.currentTarget&&(O.props.validate(M.currentTarget.value)?O.props.onChange(O.props.escape?O.props.escape(M.currentTarget.value):M.currentTarget.value):O.setState({localValue:O.props.escape(O.props.color)}))},O.props=w,O.state={localValue:O.props.escape(O.props.color)},O}f(A,T);var E=A.prototype;return E.componentDidUpdate=function(){function w(O,M){O.color!==this.props.color&&this.setState({localValue:this.props.escape(this.props.color)})}return w}(),E.render=function(){function w(){return(0,e.createComponentVNode)(2,o.Box,{className:(0,b.classes)(["Input",this.props.fluid&&"Input--fluid"]),children:[(0,e.createVNode)(1,"div","Input__baseline",".",16),(0,e.createVNode)(64,"input","Input__input",null,1,{value:this.props.format?this.props.format(this.state.localValue):this.state.localValue,spellCheck:"false",onInput:this.handleInput,onBlur:this.handleBlur})]})}return w}(),A}(e.Component),g=function(A){var E=A.hsva,w=A.onChange,O=function(R){w({s:R.left*100,v:100-R.top*100})},M=function(R){w({s:(0,k.clamp)(E.s+R.left*100,0,100),v:(0,k.clamp)(E.v-R.top*100,0,100)})},P={"background-color":(0,y.hsvaToHslString)({h:E.h,s:100,v:100,a:1})+" !important"};return(0,e.createVNode)(1,"div","react-colorful__saturation_value",(0,e.createComponentVNode)(2,S.Interactive,{onMove:O,onKey:M,"aria-label":"Color","aria-valuetext":"Saturation "+Math.round(E.s)+"%, Brightness "+Math.round(E.v)+"%",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__saturation_value-pointer",top:1-E.v/100,left:E.s/100,color:(0,y.hsvaToHslString)(E)})}),2,{style:P})},N=function(A){var E=A.className,w=A.hue,O=A.onChange,M=function(U){O({h:360*U.left})},P=function(U){O({h:(0,k.clamp)(w+U.left*360,0,360)})},F=(0,b.classes)(["react-colorful__hue",E]);return(0,e.createVNode)(1,"div",F,(0,e.createComponentVNode)(2,S.Interactive,{onMove:M,onKey:P,"aria-label":"Hue","aria-valuenow":Math.round(w),"aria-valuemax":"360","aria-valuemin":"0",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__hue-pointer",left:w/360,color:(0,y.hsvaToHslString)({h:w,s:100,v:100,a:1})})}),2)},x=function(A){var E=A.className,w=A.color,O=A.onChange,M=function(U){O({s:100*U.left})},P=function(U){O({s:(0,k.clamp)(w.s+U.left*100,0,100)})},F=(0,b.classes)(["react-colorful__saturation",E]);return(0,e.createVNode)(1,"div",F,(0,e.createComponentVNode)(2,S.Interactive,{style:{background:"linear-gradient(to right, "+(0,y.hsvaToHslString)({h:w.h,s:0,v:w.v,a:1})+", "+(0,y.hsvaToHslString)({h:w.h,s:100,v:w.v,a:1})+")"},onMove:M,onKey:P,"aria-label":"Saturation","aria-valuenow":Math.round(w.s),"aria-valuemax":"100","aria-valuemin":"0",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__saturation-pointer",left:w.s/100,color:(0,y.hsvaToHslString)({h:w.h,s:w.s,v:w.v,a:1})})}),2)},B=function(A){var E=A.className,w=A.color,O=A.onChange,M=function(U){O({v:100*U.left})},P=function(U){O({v:(0,k.clamp)(w.v+U.left*100,0,100)})},F=(0,b.classes)(["react-colorful__value",E]);return(0,e.createVNode)(1,"div",F,(0,e.createComponentVNode)(2,S.Interactive,{style:{background:"linear-gradient(to right, "+(0,y.hsvaToHslString)({h:w.h,s:w.s,v:0,a:1})+", "+(0,y.hsvaToHslString)({h:w.h,s:w.s,v:100,a:1})+")"},onMove:M,onKey:P,"aria-label":"Value","aria-valuenow":Math.round(w.s),"aria-valuemax":"100","aria-valuemin":"0",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__value-pointer",left:w.v/100,color:(0,y.hsvaToHslString)({h:w.h,s:w.s,v:w.v,a:1})})}),2)},L=function(A){var E=A.className,w=A.color,O=A.onChange,M=A.target,P=(0,y.hsvaToRgba)(w),F=function($){P[M]=$,O((0,y.rgbaToHsva)(P))},R=function($){F(255*$.left)},U=function($){F((0,k.clamp)(P[M]+$.left*255,0,255))},j=(0,b.classes)(["react-colorful__"+M,E]),W=M==="r"?"rgb("+Math.round(P.r)+",0,0)":M==="g"?"rgb(0,"+Math.round(P.g)+",0)":"rgb(0,0,"+Math.round(P.b)+")";return(0,e.createVNode)(1,"div",j,(0,e.createComponentVNode)(2,S.Interactive,{onMove:R,onKey:U,"aria-valuenow":P[M],"aria-valuemax":"100","aria-valuemin":"0",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__"+M+"-pointer",left:P[M]/255,color:W})}),2)}},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),p={1:function(){function m(){return(0,e.createComponentVNode)(2,b)}return m}(),2:function(){function m(){return(0,e.createComponentVNode)(2,u)}return m}(),3:function(){function m(){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,f)})})}return m}(),4:function(){function m(){return(0,e.createComponentVNode)(2,d)}return m}(),default:function(){function m(){return"\u041E\u0448\u0438\u0431\u043A\u0430. \u041D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u043E\u0435 menu_state. \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0441\u0432\u044F\u0436\u0438\u0442\u0435\u0441\u044C \u0441 \u0422\u0435\u0445\u043D\u0438\u0447\u0435\u0441\u043A\u043E\u0439 \u041F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u043E\u0439 NT."}return m}()},k=function(i){return p[i]},y=r.CommunicationsComputer=function(){function m(i,h){var V=(0,a.useBackend)(h),v=V.act,s=V.data,g=s.menu_state;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:600,title:"\u041A\u043E\u043D\u0441\u043E\u043B\u044C \u0441\u0432\u044F\u0437\u0438",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,S),k(g)()]})})})}return m}(),S=function(i,h){var V=(0,a.useBackend)(h),v=V.act,s=V.data,g=s.authenticated,N=s.noauthbutton,x=s.esc_section,B=s.esc_callable,L=s.esc_recallable,T=s.esc_status,A=s.authhead,E=s.is_ai,w=s.lastCallLoc,O=!1,M;return g?g===1?M="\u041A\u043E\u043C\u0430\u043D\u0434\u043E\u0432\u0430\u043D\u0438\u0435":g===2?M="\u041A\u0430\u043F\u0438\u0442\u0430\u043D":g===3?M="\u041E\u0444\u0438\u0446\u0435\u0440 \u0426\u0435\u043D\u0442\u0440\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u041A\u043E\u043C\u0430\u043D\u0434\u043E\u0432\u0430\u043D\u0438\u044F":g===4?(M="\u0417\u0430\u0449\u0438\u0449\u0451\u043D\u043D\u044B\u0439 \u043A\u0430\u043D\u0430\u043B \u0426\u0435\u043D\u0442\u041A\u043E\u043C\u0430",O=!0):M="\u041E\u0428\u0418\u0411\u041A\u0410: \u0421\u043E\u043E\u0431\u0449\u0438\u0442\u0435 \u043E\u0431 \u044D\u0442\u043E\u043C \u0431\u0430\u0433\u0435!":M="\u0412\u0445\u043E\u0434 \u043D\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D",(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"\u0410\u0443\u0442\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:O&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0414\u043E\u0441\u0442\u0443\u043F",children:M})||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F",children:(0,e.createComponentVNode)(2,t.Button,{icon:g?"sign-out-alt":"id-card",selected:g,disabled:N,content:g?"\u0412\u044B\u0439\u0442\u0438 ("+M+")":"\u0412\u043E\u0439\u0442\u0438",onClick:function(){function P(){return v("auth")}return P}()})})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:!!x&&(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"\u042D\u0432\u0430\u043A\u0443\u0430\u0446\u0438\u043E\u043D\u043D\u044B\u0439 \u0448\u0430\u0442\u0442\u043B",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[!!T&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0421\u0442\u0430\u0442\u0443\u0441",children:T}),!!B&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041E\u043F\u0446\u0438\u0438",children:(0,e.createComponentVNode)(2,t.Button,{icon:"rocket",content:"\u0412\u044B\u0437\u0432\u0430\u0442\u044C \u0448\u0430\u0442\u0442\u043B",disabled:!A,onClick:function(){function P(){return v("callshuttle")}return P}()})}),!!L&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041E\u043F\u0446\u0438\u0438",children:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"\u041E\u0442\u043E\u0437\u0432\u0430\u0442\u044C \u0448\u0430\u0442\u0442\u043B",disabled:!A||E,onClick:function(){function P(){return v("cancelshuttle")}return P}()})}),!!w&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0439 \u0432\u044B\u0437\u043E\u0432/\u043E\u0442\u0437\u044B\u0432 \u0438\u0437",children:w})]})})})],4)},b=function(i,h){var V=(0,a.useBackend)(h),v=V.act,s=V.data,g=s.is_admin;return g?(0,e.createComponentVNode)(2,C):(0,e.createComponentVNode)(2,c)},C=function(i,h){var V=(0,a.useBackend)(h),v=V.act,s=V.data,g=s.is_admin,N=s.gamma_armory_location,x=s.admin_levels,B=s.authenticated,L=s.ert_allowed;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Section,{title:'\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0443\u0440\u043E\u0432\u043D\u044F \u0434\u043E\u0441\u0442\u0443\u043F\u0430 "\u041E\u0444\u0438\u0446\u0435\u0440 \u0426\u0435\u043D\u0442\u0440\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u041A\u043E\u043C\u0430\u043D\u0434\u043E\u0432\u0430\u043D\u0438\u044F"',children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0421\u043C\u0435\u043D\u0438\u0442\u044C \u0443\u0440\u043E\u0432\u0435\u043D\u044C \u0443\u0433\u0440\u043E\u0437\u044B",children:(0,e.createComponentVNode)(2,l,{levels:x,required_access:g,use_confirm:1})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041E\u043F\u043E\u0432\u0435\u0449\u0435\u043D\u0438\u0435",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"bullhorn",content:"\u0421\u0434\u0435\u043B\u0430\u0442\u044C \u043E\u043F\u043E\u0432\u0435\u0449\u0435\u043D\u0438\u0435 \u0426\u041A",disabled:!g,onClick:function(){function T(){return v("send_to_cc_announcement_page")}return T}()}),B===4&&(0,e.createComponentVNode)(2,t.Button,{icon:"plus",content:"\u0421\u0434\u0435\u043B\u0430\u0442\u044C \u0434\u0440\u0443\u0433\u043E\u0435 \u043E\u043F\u043E\u0432\u0435\u0449\u0435\u043D\u0438\u0435",disabled:!g,onClick:function(){function T(){return v("make_other_announcement")}return T}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041E\u0411\u0420",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"ambulance",content:"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u041E\u0411\u0420",disabled:!g,onClick:function(){function T(){return v("dispatch_ert")}return T}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:L,content:L?"\u0412\u044B\u0437\u043E\u0432 \u041E\u0411\u0420 \u0440\u0430\u0437\u0440\u0435\u0448\u0451\u043D":"\u0412\u044B\u0437\u043E\u0432 \u041E\u0411\u0420 \u0437\u0430\u043F\u0440\u0435\u0449\u0451\u043D",tooltip:L?"\u041A\u043E\u043C\u0430\u043D\u0434\u043E\u0432\u0430\u043D\u0438\u0435 \u043C\u043E\u0436\u0435\u0442 \u0437\u0430\u043F\u0440\u043E\u0441\u0438\u0442\u044C \u041E\u0411\u0420":"\u041E\u0411\u0420 \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u0437\u0430\u043F\u0440\u043E\u0448\u0435\u043D",disabled:!g,onClick:function(){function T(){return v("toggle_ert_allowed")}return T}(),selected:null})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u042F\u0434\u0435\u0440\u043D\u0430\u044F \u0431\u043E\u0435\u0433\u043E\u043B\u043E\u0432\u043A\u0430",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"bomb",content:"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u0434\u044B \u0430\u0443\u0442\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u0438",disabled:!g,onClick:function(){function T(){return v("send_nuke_codes")}return T}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:'\u041E\u0440\u0443\u0436\u0435\u0439\u043D\u044B\u0439 \u0448\u0430\u0442\u0442\u043B "\u0413\u0430\u043C\u043C\u0430"',children:(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"biohazard",content:N?'\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043E\u0440\u0443\u0436\u0435\u0439\u043D\u044B\u0439 \u0448\u0430\u0442\u0442\u043B "\u0413\u0430\u043C\u043C\u0430"':'\u041E\u0442\u043E\u0437\u0432\u0430\u0442\u044C \u043E\u0440\u0443\u0436\u0435\u0439\u043D\u044B\u0439 \u0448\u0430\u0442\u0442\u043B "\u0413\u0430\u043C\u043C\u0430"',disabled:!g,onClick:function(){function T(){return v("move_gamma_armory")}return T}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0414\u0440\u0443\u0433\u043E\u0435",children:(0,e.createComponentVNode)(2,t.Button,{icon:"fax",content:"\u0424\u0430\u043A\u0441-\u043C\u0435\u043D\u0435\u0434\u0436\u0435\u0440",disabled:!g,onClick:function(){function T(){return v("view_fax")}return T}()})})]})}),(0,e.createComponentVNode)(2,t.Collapsible,{title:"\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u0434\u0435\u0439\u0441\u0442\u0438\u0439, \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u0434\u043B\u044F \u043A\u043E\u043C\u0430\u043D\u0434\u043E\u0432\u0430\u043D\u0438\u044F",children:(0,e.createComponentVNode)(2,c)})]})},c=function(i,h){var V=(0,a.useBackend)(h),v=V.act,s=V.data,g=s.msg_cooldown,N=s.emagged,x=s.cc_cooldown,B=s.security_level_color,L=s.str_security_level,T=s.levels,A=s.authcapt,E=s.authhead,w=s.messages,O="\u0421\u0434\u0435\u043B\u0430\u0442\u044C \u043F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442\u043D\u043E\u0435 \u043E\u043F\u043E\u0432\u0435\u0449\u0435\u043D\u0438\u0435";g>0&&(O+=" ("+g+"s)");var M=N?"\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 [\u041D\u0415\u0418\u0417\u0412\u0415\u0421\u0422\u041D\u041E]":"\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0426\u041A",P="\u0417\u0430\u043F\u0440\u043E\u0441\u0438\u0442\u044C \u043A\u043E\u0434\u044B \u0430\u0443\u0442\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u0438";return x>0&&(M+=" ("+x+"s)",P+=" ("+x+"s)"),(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:'\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0443\u0440\u043E\u0432\u043D\u044F \u0434\u043E\u0441\u0442\u0443\u043F\u0430 "\u041A\u0430\u043F\u0438\u0442\u0430\u043D"',children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0422\u0435\u043A\u0443\u0449\u0438\u0439 \u0443\u0440\u043E\u0432\u0435\u043D\u044C \u0443\u0433\u0440\u043E\u0437\u044B",color:B,children:L}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0421\u043C\u0435\u043D\u0438\u0442\u044C \u0443\u0440\u043E\u0432\u0435\u043D\u044C \u0443\u0433\u0440\u043E\u0437\u044B",children:(0,e.createComponentVNode)(2,l,{levels:T,required_access:A})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041E\u043F\u043E\u0432\u0435\u0449\u0435\u043D\u0438\u0435",children:(0,e.createComponentVNode)(2,t.Button,{icon:"bullhorn",content:O,disabled:!A||g>0,onClick:function(){function F(){return v("announce")}return F}()})}),!!N&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u0435\u0440\u0435\u0434\u0430\u0447\u0430",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"broadcast-tower",color:"red",content:M,disabled:!A||x>0,onClick:function(){function F(){return v("MessageSyndicate")}return F}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync-alt",content:"\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0440\u0435\u043B\u0435",disabled:!A,onClick:function(){function F(){return v("RestoreBackup")}return F}()})]})||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u0435\u0440\u0435\u0434\u0430\u0447\u0430",children:(0,e.createComponentVNode)(2,t.Button,{icon:"broadcast-tower",content:M,disabled:!A||x>0,onClick:function(){function F(){return v("MessageCentcomm")}return F}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u042F\u0434\u0435\u0440\u043D\u0430\u044F \u0431\u043E\u0435\u0433\u043E\u043B\u043E\u0432\u043A\u0430",children:(0,e.createComponentVNode)(2,t.Button,{icon:"bomb",content:P,disabled:!A||x>0,onClick:function(){function F(){return v("nukerequest")}return F}()})})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:'\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0443\u0440\u043E\u0432\u043D\u044F \u0434\u043E\u0441\u0442\u0443\u043F\u0430 "\u041A\u043E\u043C\u0430\u043D\u0434\u043E\u0432\u0430\u043D\u0438\u0435"',children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0414\u0438\u0441\u043F\u043B\u0435\u0438",children:(0,e.createComponentVNode)(2,t.Button,{icon:"tv",content:"\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435 \u0414\u0438\u0441\u043F\u043B\u0435\u0435\u0432 \u0441\u0442\u0430\u0442\u0443\u0441\u0430",disabled:!E,onClick:function(){function F(){return v("status")}return F}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0412\u0445\u043E\u0434\u044F\u0449\u0438\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F",children:(0,e.createComponentVNode)(2,t.Button,{icon:"folder-open",content:"\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C ("+w.length+")",disabled:!E,onClick:function(){function F(){return v("messagelist")}return F}()})})]})})})],4)},u=function(i,h){var V=(0,a.useBackend)(h),v=V.act,s=V.data,g=s.stat_display,N=s.authhead,x=s.current_message_title,B=g.presets.map(function(T){return(0,e.createComponentVNode)(2,t.Button,{content:T.label,selected:T.name===g.type,disabled:!N,onClick:function(){function A(){return v("setstat",{statdisp:T.id})}return A}()},T.name)}),L=g.alerts.map(function(T){return(0,e.createComponentVNode)(2,t.Button,{content:T.label,selected:T.alert===g.icon,disabled:!N,onClick:function(){function A(){return v("setstat",{statdisp:3,alert:T.alert})}return A}()},T.alert)});return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u044D\u043A\u0440\u0430\u043D\u044B \u0441\u0442\u0430\u0442\u0443\u0441\u0430",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u0432 \u043E\u0441\u043D\u043E\u0432\u043D\u043E\u0435 \u043C\u0435\u043D\u044E",onClick:function(){function T(){return v("main")}return T}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u0440\u0435\u0441\u0435\u0442\u044B",children:B}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041E\u043F\u043E\u0432\u0435\u0449\u0435\u043D\u0438\u044F",children:L}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0421\u0442\u0440\u043E\u043A\u0430 1",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:g.line_1,disabled:!N,onClick:function(){function T(){return v("setmsg1")}return T}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0421\u0442\u0440\u043E\u043A\u0430 2",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:g.line_2,disabled:!N,onClick:function(){function T(){return v("setmsg2")}return T}()})})]})})})},f=function(i,h){var V=(0,a.useBackend)(h),v=V.act,s=V.data,g=s.authhead,N=s.current_message_title,x=s.current_message,B=s.messages,L=s.security_level,T;if(N)T=(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:N,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043A \u0441\u043F\u0438\u0441\u043A\u0443 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439",disabled:!g,onClick:function(){function E(){return v("messagelist")}return E}()}),children:(0,e.createComponentVNode)(2,t.Box,{children:x})})});else{var A=B.map(function(E){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:E.title,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"eye",content:"\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C",disabled:!g||N===E.title,onClick:function(){function w(){return v("messagelist",{msgid:E.id})}return w}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"times",content:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C",disabled:!g,onClick:function(){function w(){return v("delmessage",{msgid:E.id})}return w}()})]},E.id)});T=(0,e.createComponentVNode)(2,t.Section,{title:"\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u0432 \u041E\u0441\u043D\u043E\u0432\u043D\u043E\u0435 \u043C\u0435\u043D\u044E",onClick:function(){function E(){return v("main")}return E}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:A})})}return(0,e.createComponentVNode)(2,t.Box,{children:T})},l=function(i,h){var V=(0,a.useBackend)(h),v=V.act,s=V.data,g=i.levels,N=i.required_access,x=i.use_confirm,B=s.security_level;return x?g.map(function(L){return(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:L.icon,content:L.name,disabled:!N||L.id===B,tooltip:L.tooltip,onClick:function(){function T(){return v("newalertlevel",{level:L.id})}return T}()},L.name)}):g.map(function(L){return(0,e.createComponentVNode)(2,t.Button,{icon:L.icon,content:L.name,disabled:!N||L.id===B,tooltip:L.tooltip,onClick:function(){function T(){return v("newalertlevel",{level:L.id})}return T}()},L.name)})},d=function(i,h){var V=(0,a.useBackend)(h),v=V.act,s=V.data,g=s.is_admin;if(!g)return v("main");var N=(0,a.useLocalState)(h,"subtitle",""),x=N[0],B=N[1],L=(0,a.useLocalState)(h,"text",""),T=L[0],A=L[1],E=(0,a.useLocalState)(h,"classified",0),w=E[0],O=E[1],M=(0,a.useLocalState)(h,"beepsound","Beep"),P=M[0],F=M[1];return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"\u041E\u043F\u043E\u0432\u0435\u0449\u0435\u043D\u0438\u0435 \u0426\u041A",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u0432 \u041E\u0441\u043D\u043E\u0432\u043D\u043E\u0435 \u043C\u0435\u043D\u044E",onClick:function(){function R(){return v("main")}return R}()}),children:[(0,e.createComponentVNode)(2,t.Input,{placeholder:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0442\u0443\u0442.",fluid:!0,value:x,onChange:function(){function R(U,j){return B(j)}return R}(),mb:"5px"}),(0,e.createComponentVNode)(2,t.Input,{placeholder:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0442\u0435\u043A\u0441\u0442 \u043E\u0431\u044A\u044F\u0432\u043B\u0435\u043D\u0438\u044F,\n\u041C\u043D\u043E\u0433\u043E\u0441\u0442\u0440\u043E\u0447\u043D\u044B\u0439 \u0432\u0432\u043E\u0434 \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442\u0441\u044F.",rows:10,fluid:!0,multiline:1,value:T,onChange:function(){function R(U,j){return A(j)}return R}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:w,content:"\u0417\u0430\u0441\u0435\u043A\u0440\u0435\u0447\u0435\u043D\u043E",fluid:!0,m:"5px",tooltip:w?"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043D\u0430 \u043A\u043E\u043D\u0441\u043E\u043B\u0438 \u0441\u0432\u044F\u0437\u0438 \u0441\u0442\u0430\u043D\u0446\u0438\u0438":"\u041F\u0443\u0431\u043B\u0438\u0447\u043D\u043E \u043E\u0431\u044A\u044F\u0432\u0438\u0442\u044C",onClick:function(){function R(){return O(!w)}return R}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"\u0421\u0434\u0435\u043B\u0430\u0442\u044C \u043E\u0431\u044A\u044F\u0432\u043B\u0435\u043D\u0438\u0435",fluid:!0,icon:"paper-plane",center:!0,mt:"5px",textAlign:"center",onClick:function(){function R(){return v("make_cc_announcement",{subtitle:x,text:T,classified:w,beepsound:P})}return R}()})]})})}},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),p=n(73379),k=n(98595);function y(V,v){V.prototype=Object.create(v.prototype),V.prototype.constructor=V,S(V,v)}function S(V,v){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,g){return s.__proto__=g,s},S(V,v)}var b={1:["ACTIVE","good"],2:["COMPLETED","good"],3:["FAILED","bad"]},C=["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"],c=r.Contractor=function(){function V(v,s){var g=(0,t.useBackend)(s),N=g.act,x=g.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,i,{height:"100%",allMessages:["ERROR: UNAUTHORIZED USER"],finishedTimeout:100,onFinished:function(){function E(){}return E}()})}):x.load_animation_completed?B=(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Flex.Item,{basis:"content",children:(0,e.createComponentVNode)(2,u)}),(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,l,{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,i,{height:"100%",allMessages:C,finishedTimeout:3e3,onFinished:function(){function E(){return N("complete_load_animation")}return E}()})});var L=(0,t.useLocalState)(s,"viewingPhoto",""),T=L[0],A=L[1];return(0,e.createComponentVNode)(2,k.Window,{width:500,height:600,theme:"syndicate",children:[T&&(0,e.createComponentVNode)(2,h),(0,e.createComponentVNode)(2,k.Window.Content,{className:"Contractor",children:(0,e.createComponentVNode)(2,o.Flex,{direction:"column",height:"100%",children:B})})]})}return V}(),u=function(v,s){var g=(0,t.useBackend)(s),N=g.act,x=g.data,B=x.tc_available,L=x.tc_paid_out,T=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"]})},v,{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 E(){return N("claim")}return E}()})]})}),(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:T})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Contractor Status",verticalAlign:"middle",children:"ACTIVE"})]})})]})})))},f=function(v,s){var g=(0,t.useBackend)(s),N=g.act,x=g.data,B=x.page;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Tabs,Object.assign({},v,{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"]})]})))},l=function(v,s){var g=(0,t.useBackend)(s),N=g.act,x=g.data,B=x.contracts,L=x.contract_active,T=x.can_extract,A=!!L&&B.filter(function(P){return P.status===1})[0],E=A&&A.time_left>0,w=(0,t.useLocalState)(s,"viewingPhoto",""),O=w[0],M=w[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:!T||E,icon:"parachute-box",content:["Call Extraction",E&&(0,e.createComponentVNode)(2,p.Countdown,{timeLeft:A.time_left,format:function(){function P(F,R){return" ("+R.substr(3)+")"}return P}()})],onClick:function(){function P(){return N("extract")}return P}()})},v,{children:B.slice().sort(function(P,F){return P.status===1?-1:F.status===1?1:P.status-F.status}).map(function(P){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:P.status===1&&"good",children:P.target_name}),(0,e.createComponentVNode)(2,o.Flex.Item,{basis:"content",children:P.has_photo&&(0,e.createComponentVNode)(2,o.Button,{icon:"camera",mb:"-0.5rem",ml:"0.5rem",onClick:function(){function R(){return M("target_photo_"+P.uid+".png")}return R}()})})]}),className:"Contractor__Contract",buttons:(0,e.createComponentVNode)(2,o.Box,{width:"100%",children:[!!b[P.status]&&(0,e.createComponentVNode)(2,o.Box,{color:b[P.status][1],display:"inline-block",mt:P.status!==1&&"0.125rem",mr:"0.25rem",lineHeight:"20px",children:b[P.status][0]}),P.status===1&&(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"ban",color:"bad",content:"Abort",ml:"0.5rem",onClick:function(){function R(){return N("abort")}return R}()})]}),children:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"2",mr:"0.5rem",children:[P.fluff_message,!!P.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 ",P.completed_time]}),!!P.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."]}),!!P.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: ",P.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",d(P)]}),(F=P.difficulties)==null?void 0:F.map(function(R,U){return(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:!!L,content:R.name+" ("+R.reward+" TC)",onClick:function(){function j(){return N("activate",{uid:P.uid,difficulty:U+1})}return j}()},U)}),!!P.objective&&(0,e.createComponentVNode)(2,o.Box,{color:"white",bold:!0,children:[P.objective.extraction_name,(0,e.createVNode)(1,"br"),"(",(P.objective.rewards.tc||0)+" TC",",\xA0",(P.objective.rewards.credits||0)+" Credits",")"]})]})]})},P.uid)})})))},d=function(v){if(!(!v.objective||v.status>1)){var s=v.objective.locs.user_area_id,g=v.objective.locs.user_coords,N=v.objective.locs.target_area_id,x=v.objective.locs.target_coords,B=s===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]-g[1],x[0]-g[0])),lineHeight:B?null:"0.85",size:"1.5"})})}},m=function(v,s){var g=(0,t.useBackend)(s),N=g.act,x=g.data,B=x.rep,L=x.buyables;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Available Purchases",overflow:"auto"},v,{children:L.map(function(T){return(0,e.createComponentVNode)(2,o.Section,{title:T.name,buttons:T.refundable&&(0,e.createComponentVNode)(2,o.Button.Confirm,{content:"Refund ("+T.cost+" Rep)",onClick:function(){function A(){return N("refund",{uid:T.uid})}return A}()}),children:[T.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:T.stock===0?"bad":"good",ml:"0.5rem",children:[T.stock," in stock"]})]},T.uid)})})))},i=function(V){function v(g){var N;return N=V.call(this,g)||this,N.timer=null,N.state={currentIndex:0,currentDisplay:[]},N}y(v,V);var s=v.prototype;return s.tick=function(){function g(){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 g}(),s.componentDidMount=function(){function g(){var N=this,x=this.props.linesPerSecond,B=x===void 0?2.5:x;this.timer=setInterval(function(){return N.tick()},1e3/B)}return g}(),s.componentWillUnmount=function(){function g(){clearTimeout(this.timer)}return g}(),s.render=function(){function g(){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 g}(),v}(e.Component),h=function(v,s){var g=(0,t.useLocalState)(s,"viewingPhoto",""),N=g[0],x=g[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),p=r.ConveyorSwitch=function(){function k(y,S){var b=(0,a.useBackend)(S),C=b.act,c=b.data,u=c.slowFactor,f=c.minSpeed,l=c.maxSpeed,d=c.oneWay,m=c.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:!d,onClick:function(){function i(){return C("toggleOneWay")}return i}()})}),(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 i(){return C("slowFactor",{value:u-.5})}return i}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-left",onClick:function(){function i(){return C("slowFactor",{value:u-.1})}return i}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Slider,{width:"100px",mx:"1px",value:u,fillValue:u,minValue:f,maxValue:l,step:.1,format:function(){function i(h){return h+"s."}return i}(),onChange:function(){function i(h,V){return C("slowFactor",{value:V})}return i}()})}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-right",onClick:function(){function i(){return C("slowFactor",{value:u+.1})}return i}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-right",onClick:function(){function i(){return C("slowFactor",{value:u+.5})}return i}()})," "]})]})})]})})})})}return k}()},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),p=n(36036),k=n(36352),y=n(76910),S=n(98595),b=function(h,V){return h.dead?"\u041C\u0451\u0440\u0442\u0432":parseInt(h.health,10)<=V?"\u041A\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435":parseInt(h.stat,10)===1?"\u0411\u0435\u0437 \u0441\u043E\u0437\u043D\u0430\u043D\u0438\u044F":"\u0416\u0438\u0432"},C=function(h,V){return h.dead?"red":parseInt(h.health,10)<=V?"orange":parseInt(h.stat,10)===1?"blue":"green"},c=r.CrewMonitor=function(){function i(h,V){var v=(0,o.useBackend)(V),s=v.act,g=v.data,N=(0,o.useLocalState)(V,"tabIndex",g.IndexToggler),x=N[0],B=N[1],L=function(){function T(A){switch(A){case 0:return(0,e.createComponentVNode)(2,l);case 1:return(0,e.createComponentVNode)(2,d);case 2:return(0,e.createComponentVNode)(2,f);case 3:return(0,e.createComponentVNode)(2,m);default:return"\u0427\u0422\u041E-\u0422\u041E \u0422\u041E\u0427\u041D\u041E \u041D\u0415 \u0422\u0410\u041A!"}}return T}();return(0,e.createComponentVNode)(2,S.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,S.Window.Content,{children:(0,e.createComponentVNode)(2,p.Box,{fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,p.Tabs,{children:[g.isBS?(0,e.createComponentVNode)(2,p.Tabs.Tab,{selected:x===0,onClick:function(){function T(){return B(0)}return T}(),children:[(0,e.createComponentVNode)(2,p.Icon,{name:"table"})," \u0414\u0430\u043D\u043D\u044B\u0435 \u043E \u041A\u043E\u043C\u0430\u043D\u0434\u043E\u0432\u0430\u043D\u0438\u0438"]},"ComDataView"):null,g.isBP?(0,e.createComponentVNode)(2,p.Tabs.Tab,{selected:x===1,onClick:function(){function T(){return B(1)}return T}(),children:[(0,e.createComponentVNode)(2,p.Icon,{name:"table"})," \u0414\u0430\u043D\u043D\u044B\u0435 \u043E \u0421\u043B\u0443\u0436\u0431\u0435 \u0411\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u043E\u0441\u0442\u0438"]},"SecDataView"):null,(0,e.createComponentVNode)(2,p.Tabs.Tab,{selected:x===2,onClick:function(){function T(){return B(2)}return T}(),children:[(0,e.createComponentVNode)(2,p.Icon,{name:"table"})," \u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0431 \u042D\u043A\u0438\u043F\u0430\u0436\u0435"]},"DataView"),(0,e.createComponentVNode)(2,p.Tabs.Tab,{selected:x===3,onClick:function(){function T(){return B(3)}return T}(),children:[(0,e.createComponentVNode)(2,p.Icon,{name:"map-marked-alt"})," \u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u041A\u0430\u0440\u0442\u044B"]},"MapView")]}),L(x)]})})})}return i}(),u=function(h){var V=h.crewData,v=h.context,s=(0,o.useBackend)(v),g=s.act,N=s.data,x=(0,a.sortBy)(function(E){return E.name})(V||[]),B=(0,o.useLocalState)(v,"search",""),L=B[0],T=B[1],A=(0,t.createSearch)(L,function(E){return E.name+"|"+E.assignment+"|"+E.area});return(0,e.createComponentVNode)(2,p.Box,{children:[(0,e.createComponentVNode)(2,p.Input,{placeholder:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0418\u043C\u044F, \u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C \u0438\u043B\u0438 \u041B\u043E\u043A\u0430\u0446\u0438\u044E...",width:"100%",onInput:function(){function E(w,O){return T(O)}return E}()}),(0,e.createComponentVNode)(2,p.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,p.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,p.Table.Cell,{children:"\u0418\u043C\u044F"}),(0,e.createComponentVNode)(2,p.Table.Cell,{children:"\u0421\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435"}),(0,e.createComponentVNode)(2,p.Table.Cell,{children:"\u041B\u043E\u043A\u0430\u0446\u0438\u044F"})]}),x.filter(A).map(function(E){return(0,e.createComponentVNode)(2,p.Table.Row,{bold:!!E.is_command,children:[(0,e.createComponentVNode)(2,k.TableCell,{children:[E.name," (",E.assignment,")"]}),(0,e.createComponentVNode)(2,k.TableCell,{children:[(0,e.createComponentVNode)(2,p.Box,{inline:!0,color:C(E,N.critThreshold),children:b(E,N.critThreshold)}),E.sensor_type>=2?(0,e.createComponentVNode)(2,p.Box,{inline:!0,children:["(",(0,e.createComponentVNode)(2,p.Box,{inline:!0,color:y.COLORS.damageType.oxy,children:E.oxy}),"|",(0,e.createComponentVNode)(2,p.Box,{inline:!0,color:y.COLORS.damageType.toxin,children:E.tox}),"|",(0,e.createComponentVNode)(2,p.Box,{inline:!0,color:y.COLORS.damageType.burn,children:E.fire}),"|",(0,e.createComponentVNode)(2,p.Box,{inline:!0,color:y.COLORS.damageType.brute,children:E.brute}),")"]}):null]}),(0,e.createComponentVNode)(2,k.TableCell,{children:E.sensor_type===3?N.isAI?(0,e.createComponentVNode)(2,p.Button,{fluid:!0,icon:"location-arrow",content:E.area+" ("+E.x+", "+E.y+")",onClick:function(){function w(){return g("track",{track:E.ref})}return w}()}):E.area+" ("+E.x+", "+E.y+")":"\u041D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E"})]},E.ref)})]})]})},f=function(h,V){var v=(0,o.useBackend)(V),s=v.act,g=v.data,N=g.crewmembers||[];return(0,e.createComponentVNode)(2,u,{crewData:N,context:V})},l=function(h,V){var v=(0,o.useBackend)(V),s=v.act,g=v.data,N=g.crewmembers.filter(function(x){return x.is_command})||[];return(0,e.createComponentVNode)(2,u,{crewData:N,context:V})},d=function(h,V){var v=(0,o.useBackend)(V),s=v.act,g=v.data,N=g.crewmembers.filter(function(x){return x.is_security})||[];return(0,e.createComponentVNode)(2,u,{crewData:N,context:V})},m=function(h,V){var v=(0,o.useBackend)(V),s=v.act,g=v.data,N=g.stationLevelNum,x=g.stationLevelName,B=(0,o.useLocalState)(V,"zoom",1),L=B[0],T=B[1],A=(0,o.useLocalState)(V,"z_current",N[0]),E=A[0],w=A[1],O=function(R){return R.is_command&&g.isBS||R.is_security&&g.isBP?"square":"circle"},M=function(R){return R.is_command&&g.isBS||R.is_security&&g.isBP?10:6},P=function(R,U){return R.is_command&&g.isBS||R.is_security&&g.isBP?R.dead?"red":parseInt(R.health,10)<=U?"orange":parseInt(R.stat,10)===1?"blue":"violet":C(R,U)};return(0,e.createComponentVNode)(2,p.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,e.createComponentVNode)(2,p.NanoMap,{onZoom:function(){function F(R){return T(R)}return F}(),zLevels:N,zNames:x,z_current:E,setZCurrent:w,children:g.crewmembers.filter(function(F){return F.sensor_type===3}).map(function(F){return(0,e.createComponentVNode)(2,p.NanoMap.Marker,{x:F.x,y:F.y,z:F.z,z_current:E,zoom:L,icon:O(F),size:M(F),tooltip:F.name+" ("+F.assignment+")",color:P(F,g.critThreshold),onClick:function(){function R(){g.isAI&&s("track",{track:F.ref})}return R}()},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),p=n(98595),k=[{label:"\u0423\u0434\u0443\u0448\u0435\u043D\u0438\u0435",type:"oxyLoss"},{label:"\u0422\u043E\u043A\u0441\u0438\u043D\u044B",type:"toxLoss"},{label:"\u0424\u0438\u0437\u0438\u0447\u0435\u0441\u043A\u0438\u0435 \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u044F",type:"bruteLoss"},{label:"\u041E\u0436\u043E\u0433\u0438",type:"fireLoss"}],y=[["good","\u0412 \u0441\u043E\u0437\u043D\u0430\u043D\u0438\u0438"],["average","\u0411\u0435\u0437 \u0441\u043E\u0437\u043D\u0430\u043D\u0438\u044F"],["bad","\u0421\u043C\u0435\u0440\u0442\u044C"]],S=r.Cryo=function(){function c(u,f){return(0,e.createComponentVNode)(2,p.Window,{width:520,height:490,children:(0,e.createComponentVNode)(2,p.Window.Content,{children:(0,e.createComponentVNode)(2,b)})})}return c}(),b=function(u,f){var l=(0,t.useBackend)(f),d=l.act,m=l.data,i=m.isOperating,h=m.hasOccupant,V=m.occupant,v=V===void 0?[]:V,s=m.cellTemperature,g=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 d("ejectOccupant")}return L}(),disabled:!h,children:"\u0418\u0437\u0432\u043B\u0435\u0447\u044C"}),children:h?(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u041F\u0430\u0446\u0438\u0435\u043D\u0442",children:v.name||"\u0418\u043C\u044F \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u043E"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u041E\u0446\u0435\u043D\u043A\u0430 \u0437\u0434\u043E\u0440\u043E\u0432\u044C\u044F",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:v.health,max:v.maxHealth,value:v.health/v.maxHealth,color:v.health>0?"good":"average",children:(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:Math.round(v.health)})})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0421\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435",color:y[v.stat][0],children:y[v.stat][1]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0422\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u0442\u0435\u043B\u0430",children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:Math.round(v.bodyTemperature)})," ","K"]}),(0,e.createComponentVNode)(2,o.LabeledList.Divider),k.map(function(L){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:L.label,children:(0,e.createComponentVNode)(2,o.ProgressBar,{value:v[L.type]/100,ranges:{bad:[.01,1/0]},children:(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:Math.round(v[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 d("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 d(i?"switchOff":"switchOn")}return L}(),selected:i,children:i?"\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:g,children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:s})," K"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0401\u043C\u043A\u043E\u0441\u0442\u044C",children:(0,e.createComponentVNode)(2,C)}),(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 d(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 d(B?"auto_eject_dead_off":"auto_eject_dead_on")}return L}(),children:B?"\u0412\u043A\u043B":"\u0412\u044B\u043A\u043B"})})]})})})]})},C=function(u,f){var l=(0,t.useBackend)(f),d=l.act,m=l.data,i=m.isBeakerLoaded,h=m.beakerLabel,V=m.beakerVolume;return i?(0,e.createFragment)([h?"\xAB"+h+"\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:!V&&"bad",children:V?(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:V,format:function(){function v(s){var g=Math.round(s),N=(0,a.declensionRu)(g,"\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)(g,"\u0435\u0434\u0438\u043D\u0438\u0446\u0430","\u0435\u0434\u0438\u043D\u0438\u0446\u044B","\u0435\u0434\u0438\u043D\u0438\u0446");return N+" "+g+" "+x}return v}()}):"\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),p=n(25328),k=r.CryopodConsole=function(){function b(C,c){var u=(0,a.useBackend)(c),f=u.data,l=f.account_name,d=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, "+(l||"[REDACTED]")+"!",children:"This automated cryogenic freezing unit will safely store your corporeal form until your next assignment."}),(0,e.createComponentVNode)(2,y),!!d&&(0,e.createComponentVNode)(2,S)]})})}return b}(),y=function(C,c){var u=(0,a.useBackend)(c),f=u.data,l=f.frozen_crew;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Stored Crew",children:l.length?(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:l.map(function(d,m){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.name,children:d.rank},m)})})}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No stored crew!"})})},S=function(C,c){var u=(0,a.useBackend)(c),f=u.act,l=u.data,d=l.frozen_items,m=function(h){var V=h.toString();return V.startsWith("the ")&&(V=V.slice(4,V.length)),(0,p.toTitleCase)(V)};return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Stored Items",children:d.length?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:d.map(function(i){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:m(i.name),buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",content:"Drop",mr:1,onClick:function(){function h(){return f("one_item",{item:i.uid})}return h}()})},i)})})}),(0,e.createComponentVNode)(2,t.Button,{content:"Drop All Items",color:"red",onClick:function(){function i(){return f("all_items")}return i}()})],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),p=n(98595),k=function(b,C){var c=(0,t.useBackend)(C),u=c.act,f=c.data,l=b.product,d=f.user,m=f.userMoney,i=f.vend_ready,h=l.price===0,V="ERROR!",v="";h?(V="FREE",v="arrow-circle-down"):(V=l.price,v="shopping-cart");var s=!i||l.stock===0||!h&&l.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,"+l.icon,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,e.createComponentVNode)(2,o.Table.Cell,{bold:!0,children:l.name}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,o.Box,{color:l.stock<=0&&"bad"||"good",children:[l.stock," in stock"]})}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,disabled:s,icon:v,content:V,textAlign:"left",onClick:function(){function g(){return u("vend",{Key:l.Key})}return g}()})})]})},y=r.Customat=function(){function S(b,C){var c=(0,t.useBackend)(C),u=c.act,f=c.data,l=f.guestNotice,d=f.userMoney,m=f.user,i=f.products,h=f.vend_ready,V=f.panel_open,v=f.speaker;return(0,e.createComponentVNode)(2,p.Window,{width:470,height:600,title:"Customat",children:(0,e.createComponentVNode)(2,p.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,[d,(0,e.createTextVNode)(" credits")],0),"."]})||(0,e.createComponentVNode)(2,o.Box,{color:"light-grey",children:l})}),!!V&&(0,e.createComponentVNode)(2,o.Section,{title:"Maintenance",children:(0,e.createComponentVNode)(2,o.Button,{icon:v?"check":"volume-mute",selected:v,content:"Speaker",textAlign:"left",onClick:function(){function s(){return u("toggle_voice",{})}return s}()})})]}),(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:i.map(function(s){return(0,e.createComponentVNode)(2,k,{product:s,productStock:s.stock},s.name)})})})})]})})})}return S}()},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),p=n(3939),k=[["good","\u041D\u043E\u0440\u043C\u0430"],["average","\u041A\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435"],["bad","\u0417\u0430\u0444\u0438\u043A\u0441\u0438\u0440\u043E\u0432\u0430\u043D\u0430 \u0441\u043C\u0435\u0440\u0442\u044C"]],y=[["ui","\u041C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F \u0423\u0418","dna"],["se","\u041C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F \u0421\u0424","dna"],["buffer","\u0411\u0443\u0444\u0435\u0440 \u0434\u0430\u043D\u043D\u044B\u0445","syringe"],["rejuvenators","\u0425\u0438\u043C\u0438\u043A\u0430\u0442\u044B","flask"]],S=[5,10,20,30,50],b=r.DNAModifier=function(){function s(g,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,T=L.irradiating,A=L.dnaBlockSize,E=L.occupant;N.dnaBlockSize=A,N.isDNAInvalid=!E.isViableSubject||!E.uniqueIdentity||!E.structuralEnzymes;var w;return T&&(w=(0,e.createComponentVNode)(2,V,{duration:T})),(0,e.createComponentVNode)(2,o.Window,{width:660,height:775,children:[(0,e.createComponentVNode)(2,p.ComplexModal),w,(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,C)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,c)})]})})]})}return s}(),C=function(g,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,T=L.locked,A=L.hasOccupant,E=L.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"\u0421\u0443\u0431\u044A\u0435\u043A\u0442",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{color:"label",inline:!0,mr:"0.5rem",children:"\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u044B\u0439 \u0437\u0430\u043C\u043E\u043A:"}),(0,e.createComponentVNode)(2,t.Button,{disabled:!A,selected:T,icon:T?"toggle-on":"toggle-off",content:T?"\u0412\u043A\u043B\u044E\u0447\u0451\u043D":"\u0412\u044B\u043A\u043B\u044E\u0447\u0435\u043D",onClick:function(){function w(){return B("toggleLock")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!A||T,icon:"user-slash",content:"\u0418\u0437\u0432\u043B\u0435\u0447\u044C \u0441\u0443\u0431\u044A\u0435\u043A\u0442",onClick:function(){function w(){return B("ejectOccupant")}return w}()})],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:"\u0418\u043C\u044F",children:E.name}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041E\u0446\u0435\u043D\u043A\u0430 \u0437\u0434\u043E\u0440\u043E\u0432\u044C\u044F",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:E.minHealth,max:E.maxHealth,value:E.health/E.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0421\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435",color:k[E.stat][0],children:k[E.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 \u041D\u0435\u043F\u043E\u0434\u0445\u043E\u0434\u044F\u0449\u0438\u0439 \u0441\u0443\u0431\u044A\u0435\u043A\u0442. \u041F\u0440\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u0435 \u043C\u0430\u043D\u0438\u043F\u0443\u043B\u044F\u0446\u0438\u0439 \u0441\u043E \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u043E\u0439 \u0414\u041D\u041A \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E."]}):(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0420\u0430\u0434\u0438\u0430\u0446\u0438\u043E\u043D\u043D\u043E\u0435 \u043F\u043E\u0440\u0430\u0436\u0435\u043D\u0438\u0435",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:"0",max:"100",value:E.radiationLevel/100,color:"average"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0423\u043D\u0438\u043A\u0430\u043B\u044C\u043D\u044B\u0435 \u0424\u0435\u0440\u043C\u0435\u043D\u0442\u044B",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 \u041D/\u0414"]})})]})],0):(0,e.createComponentVNode)(2,t.Box,{color:"label",children:"\u041A\u0430\u043F\u0441\u0443\u043B\u0430 \u0414\u041D\u041A-\u043C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440\u0430 \u043F\u0443\u0441\u0442\u0430."})})},c=function(g,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,T=L.selectedMenuKey,A=L.hasOccupant,E=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"),"\u041C\u0430\u043D\u0438\u043F\u0443\u043B\u044F\u0446\u0438\u0438 \u0441\u043E \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u043E\u0439 \u0414\u041D\u041A \u0441\u0443\u0431\u044A\u0435\u043A\u0442\u0430 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u044B."]})})})}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"),"\u041A\u0430\u043F\u0441\u0443\u043B\u0430 \u0414\u041D\u041A-\u043C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440\u0430 \u043F\u0443\u0441\u0442\u0430."]})})});var w;return T==="ui"?w=(0,e.createFragment)([(0,e.createComponentVNode)(2,u),(0,e.createComponentVNode)(2,l)],4):T==="se"?w=(0,e.createFragment)([(0,e.createComponentVNode)(2,f),(0,e.createComponentVNode)(2,l)],4):T==="buffer"?w=(0,e.createComponentVNode)(2,d):T==="rejuvenators"&&(w=(0,e.createComponentVNode)(2,h)),(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Tabs,{children:y.map(function(O,M){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:O[2],selected:T===O[0],onClick:function(){function P(){return B("selectMenuKey",{key:O[0]})}return P}(),children:O[1]},M)})}),w]})},u=function(g,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,T=L.selectedUIBlock,A=L.selectedUISubBlock,E=L.selectedUITarget,w=L.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"\u041C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F \u0423\u043D\u0438\u043A\u0430\u043B\u044C\u043D\u044B\u0445 \u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440\u043E\u0432",children:[(0,e.createComponentVNode)(2,v,{dnaString:w.uniqueIdentity,selectedBlock:T,selectedSubblock:A,blockSize:N.dnaBlockSize,action:"selectUIBlock"}),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u0431\u043B\u043E\u043A",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:15,stepPixelSize:"20",value:E,format:function(){function O(M){return M.toString(16).toUpperCase()}return O}(),ml:"0",onChange:function(){function O(M,P){return B("changeUITarget",{value:P})}return O}()})})}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"\u041E\u0431\u043B\u0443\u0447\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u0431\u043B\u043E\u043A",mt:"0.5rem",onClick:function(){function O(){return B("pulseUIRadiation")}return O}()})]})},f=function(g,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,T=L.selectedSEBlock,A=L.selectedSESubBlock,E=L.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"\u041C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F \u0421\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u043D\u044B\u0445 \u0424\u0435\u0440\u043C\u0435\u043D\u0442\u043E\u0432",children:[(0,e.createComponentVNode)(2,v,{dnaString:E.structuralEnzymes,selectedBlock:T,selectedSubblock:A,blockSize:N.dnaBlockSize,action:"selectSEBlock"}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"\u041E\u0431\u043B\u0443\u0447\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u0431\u043B\u043E\u043A",onClick:function(){function w(){return B("pulseSERadiation")}return w}()})]})},l=function(g,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,T=L.radiationIntensity,A=L.radiationDuration;return(0,e.createComponentVNode)(2,t.Section,{title:"\u0418\u0437\u043B\u0443\u0447\u0430\u0442\u0435\u043B\u044C \u0440\u0430\u0434\u0438\u0430\u0446\u0438\u0438",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041C\u043E\u0449\u043D\u043E\u0441\u0442\u044C",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:10,stepPixelSize:20,value:T,popUpPosition:"right",ml:"0",onChange:function(){function E(w,O){return B("radiationIntensity",{value:O})}return E}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0414\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:20,stepPixelSize:10,unit:"s",value:A,popUpPosition:"right",ml:"0",onChange:function(){function E(w,O){return B("radiationDuration",{value:O})}return E}()})})]}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"\u041E\u0431\u043B\u0443\u0447\u0438\u0442\u044C \u0440\u0430\u0434\u0438\u0430\u0446\u0438\u0435\u0439",tooltip:"\u041C\u0443\u0442\u0438\u0440\u0443\u0435\u0442 \u0441\u043B\u0443\u0447\u0430\u0439\u043D\u044B\u0439 \u0431\u043B\u043E\u043A, \u0423\u0418 \u0438\u043B\u0438 \u0421\u0424 \u0441\u0443\u0431\u044A\u0435\u043A\u0442\u0430.",tooltipPosition:"top-start",mt:"0.5rem",onClick:function(){function E(){return B("pulseRadiation")}return E}()})]})},d=function(g,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,T=L.buffers,A=T.map(function(E,w){return(0,e.createComponentVNode)(2,m,{id:w+1,name:"\u042F\u0447\u0435\u0439\u043A\u0430 \u0431\u0443\u0444\u0435\u0440\u0430 \u2116"+(w+1),buffer:E},w)});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:"\u0411\u0443\u0444\u0435\u0440",children:A})}),(0,e.createComponentVNode)(2,t.Stack.Item,{height:"25%",children:(0,e.createComponentVNode)(2,i)})]})},m=function(g,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,T=g.id,A=g.name,E=g.buffer,w=L.isInjectorReady,O=A+(E.data?" - "+E.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:!E.data,icon:"trash",content:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",onClick:function(){function M(){return B("bufferOption",{option:"clear",id:T})}return M}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!E.data,icon:"pen",content:"\u041F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u0442\u044C",onClick:function(){function M(){return B("bufferOption",{option:"changeLabel",id:T})}return M}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!E.data||!L.hasDisk,icon:"save",content:"\u042D\u043A\u0441\u043F\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C",tooltip:"\u042D\u043A\u0441\u043F\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u0443\u044E \u044F\u0447\u0435\u0439\u043A\u0443 \u0431\u0443\u0444\u0435\u0440\u0430 \u043D\u0430 \u0434\u0438\u0441\u043A\u0435\u0442\u0443.",tooltipPosition:"bottom-start",onClick:function(){function M(){return B("bufferOption",{option:"saveDisk",id:T})}return M}()})],4),children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0417\u0430\u043F\u0438\u0441\u0430\u0442\u044C \u0432 \u0431\u0443\u0444\u0435\u0440",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"\u0423\u0418 \u0441\u0443\u0431\u044A\u0435\u043A\u0442\u0430",mb:"0",onClick:function(){function M(){return B("bufferOption",{option:"saveUI",id:T})}return M}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"\u0423\u0418 \u0438 \u0423\u0424 \u0441\u0443\u0431\u044A\u0435\u0442\u0430",mb:"0",onClick:function(){function M(){return B("bufferOption",{option:"saveUIAndUE",id:T})}return M}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"\u0421\u0424 \u0441\u0443\u0431\u044A\u0435\u043A\u0442\u0430",mb:"0",onClick:function(){function M(){return B("bufferOption",{option:"saveSE",id:T})}return M}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!L.hasDisk||!L.disk.data,icon:"arrow-circle-down",content:"\u0421 \u0434\u0438\u0441\u043A\u0435\u0442\u044B",mb:"0",onClick:function(){function M(){return B("bufferOption",{option:"loadDisk",id:T})}return M}()})]}),!!E.data&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0421\u0443\u0431\u044A\u0435\u043A\u0442",children:E.owner||(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"\u041D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u043E"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0422\u0438\u043F \u0434\u0430\u043D\u043D\u044B\u0445",children:[E.type==="ui"?"\u0423\u043D\u0438\u043A\u0430\u043B\u044C\u043D\u044B\u0435 \u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440\u044B":"\u0421\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u043D\u044B\u0435 \u0424\u0435\u0440\u043C\u0435\u043D\u0442\u044B",!!E.ue&&" \u0438 \u0423\u043D\u0438\u043A\u0430\u043B\u044C\u043D\u044B\u0435 \u0424\u0435\u0440\u043C\u0435\u043D\u0442\u044B"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0434\u0430\u043D\u043D\u044B\u0445",children:[(0,e.createComponentVNode)(2,t.Button,{disabled:!w,icon:w?"syringe":"spinner",iconSpin:!w,content:"\u0418\u043D\u044A\u0435\u043A\u0442\u043E\u0440",mb:"0",onClick:function(){function M(){return B("bufferOption",{option:"createInjector",id:T})}return M}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!w,icon:w?"syringe":"spinner",iconSpin:!w,content:"\u0418\u043D\u044A\u0435\u043A\u0442\u043E\u0440 \u0431\u043B\u043E\u043A\u0430",mb:"0",onClick:function(){function M(){return B("bufferOption",{option:"createInjector",id:T,block:1})}return M}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"user",content:"\u0421\u0443\u0431\u044A\u0435\u043A\u0442",mb:"0",onClick:function(){function M(){return B("bufferOption",{option:"transfer",id:T})}return M}()})]})],4)]}),!E.data&&(0,e.createComponentVNode)(2,t.Box,{color:"label",mt:"0.5rem",children:"\u0411\u0443\u0444\u0435\u0440 \u0434\u0430\u043D\u043D\u044B\u0445 \u043F\u0443\u0441\u0442."})]})})},i=function(g,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,T=L.hasDisk,A=L.disk;return(0,e.createComponentVNode)(2,t.Section,{title:"\u0414\u0438\u0441\u043A\u0435\u0442\u0430",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Confirm,{disabled:!T||!A.data,icon:"trash",content:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",onClick:function(){function E(){return B("wipeDisk")}return E}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!T,icon:"eject",content:"\u0418\u0437\u0432\u043B\u0435\u0447\u044C",onClick:function(){function E(){return B("ejectDisk")}return E}()})],4),children:T?A.data?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u042D\u0442\u0438\u043A\u0435\u0442\u043A\u0430",children:A.label?A.label:"\u041E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0421\u0443\u0431\u044A\u0435\u043A\u0442",children:A.owner?A.owner:(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"\u041D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u043E"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0422\u0438\u043F \u0434\u0430\u043D\u043D\u044B\u0445",children:[A.type==="ui"?"\u0423\u043D\u0438\u043A\u0430\u043B\u044C\u043D\u044B\u0435 \u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440\u044B":"\u0421\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u043D\u044B\u0435 \u0424\u0435\u0440\u043C\u0435\u043D\u0442\u044B",!!A.ue&&" \u0438 \u0423\u043D\u0438\u043A\u0430\u043B\u044C\u043D\u044B\u0435 \u0424\u0435\u0440\u043C\u0435\u043D\u0442\u044B"]})]}):(0,e.createComponentVNode)(2,t.Box,{color:"label",children:"\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442."}):(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"),"\u0414\u0438\u0441\u043A\u0435\u0442\u0430 \u043D\u0435 \u0432\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0430."]})})},h=function(g,N){var x=(0,a.useBackend)(N),B=x.act,L=x.data,T=L.isBeakerLoaded,A=L.beakerVolume,E=L.beakerLabel;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"\u0425\u0438\u043C\u0438\u043A\u0430\u0442\u044B \u0438 \u0451\u043C\u043A\u043E\u0441\u0442\u0438",buttons:(0,e.createComponentVNode)(2,t.Button,{disabled:!T,icon:"eject",content:"\u0418\u0437\u0432\u043B\u0435\u0447\u044C \u0451\u043C\u043A\u043E\u0441\u0442\u044C",onClick:function(){function w(){return B("ejectBeaker")}return w}()}),children:T?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0412\u0432\u0435\u0441\u0442\u0438 \u0445\u0438\u043C\u0438\u043A\u0430\u0442\u044B",children:[S.map(function(w,O){return(0,e.createComponentVNode)(2,t.Button,{disabled:w>A,icon:"syringe",content:w,onClick:function(){function M(){return B("injectRejuvenators",{amount:w})}return M}()},O)}),(0,e.createComponentVNode)(2,t.Button,{disabled:A<=0,icon:"syringe",content:"\u0412\u0441\u0435",onClick:function(){function w(){return B("injectRejuvenators",{amount:A})}return w}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0401\u043C\u043A\u043E\u0441\u0442\u044C",children:[(0,e.createComponentVNode)(2,t.Box,{mb:"0.5rem",children:E||"\u042D\u0442\u0438\u043A\u0435\u0442\u043A\u0430 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442"}),A?(0,e.createComponentVNode)(2,t.Box,{color:"good",children:["\u041E\u0441\u0442\u0430\u043B\u043E\u0441\u044C: ",A,"u"]}):(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"\u041F\u0443\u0441\u0442\u043E"})]})]}):(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,"\u0401\u043C\u043A\u043E\u0441\u0442\u044C \u043D\u0435 \u0432\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0430.",16)]})})})},V=function(g,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)("\xA0\u041E\u0431\u043B\u0443\u0447\u0438\u0442\u044C \u0441\u0443\u0431\u044A\u0435\u043A\u0442\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)("\u0412 \u0442\u0435\u0447\u0435\u043D\u0438\u0438 "),g.duration,(0,e.createTextVNode)(" \u0441\u0435\u043A\u0443\u043D\u0434"),g.duration%10===1&&g.duration%100!==11?"\u044B":""],0)})]})},v=function(g,N){for(var x=(0,a.useBackend)(N),B=x.act,L=x.data,T=g.dnaString,A=g.selectedBlock,E=g.selectedSubblock,w=g.blockSize,O=g.action,M=T.split(""),P=0,F=[],R=function(){for(var W=U/w+1,K=[],$=function(){var le=ne+1;K.push((0,e.createComponentVNode)(2,t.Button,{selected:A===W&&E===le,content:M[U+ne],mb:"0",onClick:function(){function de(){return B(O,{block:W,subblock:le})}return de}()}))},ne=0;neh.spawnpoints?"red":"green",children:[h.total," \u0432\u044B\u0431\u0440\u0430\u043D\u043E, \u043F\u0440\u043E\u0442\u0438\u0432 ",h.spawnpoints," \u0442\u043E\u0447\u0435\u043A \u0441\u043F\u0430\u0432\u043D\u0430"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C",children:(0,e.createComponentVNode)(2,t.Button,{icon:"ambulance",content:"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u041E\u0411\u0420",onClick:function(){function N(){return i("dispatch_ert",{silent:s})}return N}()})})]})})},c=function(l,d){var m=(0,a.useBackend)(d),i=m.act,h=m.data,V=h.ert_request_messages;return(0,e.createComponentVNode)(2,t.Section,{children:V&&V.length?V.map(function(v){return(0,e.createComponentVNode)(2,t.Section,{title:v.time,buttons:(0,e.createComponentVNode)(2,t.Button,{content:v.sender_real_name,onClick:function(){function s(){return i("view_player_panel",{uid:v.sender_uid})}return s}(),tooltip:"\u041F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C Player panel"}),children:v.message},(0,p.decodeHtmlEntities)(v.time))}):(0,e.createComponentVNode)(2,t.Box,{fluid:!0,italic:!0,textAlign:"center",children:"\u041D\u0435\u0442 \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u0432 \u041E\u0411\u0420"})})},u=function(l,d){var m=(0,a.useBackend)(d),i=m.act,h=m.data,V=(0,a.useLocalState)(d,"text",""),v=V[0],s=V[1];return(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Input,{placeholder:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u0434\u0435\u0441\u044C \u043F\u0440\u0438\u0447\u0438\u043D\u0443 \u043E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u0438\u044F \u041E\u0411\u0420.\n\u041C\u043D\u043E\u0433\u043E\u0441\u0442\u0440\u043E\u0447\u043D\u044B\u0439 \u0432\u0432\u043E\u0434 \u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D.",rows:10,fluid:!0,multiline:1,value:v,onChange:function(){function g(N,x){return s(x)}return g}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"\u041E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C \u0437\u0430\u043F\u0440\u043E\u0441 \u041E\u0411\u0420",fluid:!0,icon:"times",center:!0,mt:"5px",textAlign:"center",onClick:function(){function g(){return i("deny_ert",{reason:v})}return g}()})]})}},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),p=n(98595),k=r.Electropack=function(){function y(S,b){var C=(0,t.useBackend)(b),c=C.act,u=C.data,f=u.power,l=u.code,d=u.frequency,m=u.minFrequency,i=u.maxFrequency;return(0,e.createComponentVNode)(2,p.Window,{width:360,height:150,children:(0,e.createComponentVNode)(2,p.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 h(){return c("power")}return h}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Frequency",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Reset",onClick:function(){function h(){return c("reset",{reset:"freq"})}return h}()}),children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:m/10,maxValue:i/10,value:d/10,format:function(){function h(V){return(0,a.toFixed)(V,1)}return h}(),width:"80px",onChange:function(){function h(V,v){return c("freq",{freq:v})}return h}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Code",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Reset",onClick:function(){function h(){return c("reset",{reset:"code"})}return h}()}),children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:l,width:"80px",onChange:function(){function h(V,v){return c("code",{code:v})}return h}()})})]})})})})}return y}()},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),p=r.EvolutionMenu=function(){function S(b,C){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,k),(0,e.createComponentVNode)(2,y)]})})}return S}(),k=function(b,C){var c=(0,a.useBackend)(C),u=c.act,f=c.data,l=f.evo_points,d=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:l}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{ml:2.5,disabled:!d,content:"Readapt",icon:"sync",onClick:function(){function m(){return u("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"})]})]})})},y=function(b,C){var c=(0,a.useBackend)(C),u=c.act,f=c.data,l=f.evo_points,d=f.ability_list,m=f.purchased_abilities,i=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:i?"square-o":"check-square-o",selected:!i,content:"Compact",onClick:function(){function h(){return u("set_view_mode",{mode:0})}return h}()}),(0,e.createComponentVNode)(2,t.Button,{icon:i?"check-square-o":"square-o",selected:i,content:"Expanded",onClick:function(){function h(){return u("set_view_mode",{mode:1})}return h}()})],4),children:d.map(function(h,V){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:h.name}),m.includes(h.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:h.cost})]}),(0,e.createComponentVNode)(2,t.Flex.Item,{textAlign:"right",children:(0,e.createComponentVNode)(2,t.Button,{mr:.5,disabled:h.cost>l||m.includes(h.power_path),content:"Evolve",onClick:function(){function v(){return u("purchase",{power_path:h.power_path})}return v}()})})]}),!!i&&(0,e.createComponentVNode)(2,t.Flex,{color:"#8a8a8a",my:1,ml:1.5,width:"95%",children:h.description+" "+h.helptext})]},V)})})}},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),p=n(36036),k=n(73379),y=n(98595),S=["id","amount","lineDisplay","onClick"];function b(V,v){if(V==null)return{};var s={};for(var g in V)if({}.hasOwnProperty.call(V,g)){if(v.includes(g))continue;s[g]=V[g]}return s}var C=2e3,c={bananium:"clown",tranquillite:"mime"},u=r.ExosuitFabricator=function(){function V(v,s){var g=(0,o.useBackend)(s),N=g.act,x=g.data,B=x.building;return(0,e.createComponentVNode)(2,y.Window,{width:950,height:625,children:(0,e.createComponentVNode)(2,y.Window.Content,{className:"Exofab",children:(0,e.createComponentVNode)(2,p.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,p.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,p.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,p.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,l)}),B&&(0,e.createComponentVNode)(2,p.Stack.Item,{children:(0,e.createComponentVNode)(2,d)})]})}),(0,e.createComponentVNode)(2,p.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,p.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,p.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f)}),(0,e.createComponentVNode)(2,p.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,m)})]})})]})})})}return V}(),f=function(v,s){var g=(0,o.useBackend)(s),N=g.act,x=g.data,B=x.materials,L=x.capacity,T=Object.values(B).reduce(function(A,E){return A+E},0);return(0,e.createComponentVNode)(2,p.Section,{fill:!0,scrollable:!0,title:"Materials",className:"Exofab__materials",buttons:(0,e.createComponentVNode)(2,p.Box,{color:"label",mt:"0.25rem",children:[(T/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,i,{mt:-2,id:A,bold:A==="metal"||A==="glass",onClick:function(){function E(){return N("withdraw",{id:A})}return E}()},A)})})},l=function(v,s){var g=(0,o.useBackend)(s),N=g.act,x=g.data,B=x.curCategory,L=x.categories,T=x.designs,A=x.syncing,E=(0,o.useLocalState)(s,"searchText",""),w=E[0],O=E[1],M=(0,t.createSearch)(w,function(F){return F.name}),P=T.filter(M);return(0,e.createComponentVNode)(2,p.Section,{fill:!0,scrollable:!0,className:"Exofab__designs",title:(0,e.createComponentVNode)(2,p.Dropdown,{className:"Exofab__dropdown",selected:B,options:L,onSelected:function(){function F(R){return N("category",{cat:R})}return F}()}),buttons:(0,e.createComponentVNode)(2,p.Box,{mt:"2px",children:[(0,e.createComponentVNode)(2,p.Button,{icon:"plus",content:"Queue all",onClick:function(){function F(){return N("queueall")}return F}()}),(0,e.createComponentVNode)(2,p.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,p.Input,{placeholder:"Search by name...",mb:"0.5rem",width:"100%",onInput:function(){function F(R,U){return O(U)}return F}()}),P.map(function(F){return(0,e.createComponentVNode)(2,h,{design:F},F.id)}),P.length===0&&(0,e.createComponentVNode)(2,p.Box,{color:"label",children:"No designs found."})]})},d=function(v,s){var g=(0,o.useBackend)(s),N=g.act,x=g.data,B=x.building,L=x.buildStart,T=x.buildEnd,A=x.worldTime;return(0,e.createComponentVNode)(2,p.Section,{className:"Exofab__building",stretchContents:!0,children:(0,e.createComponentVNode)(2,p.ProgressBar.Countdown,{start:L,current:A,end:T,children:(0,e.createComponentVNode)(2,p.Stack,{children:[(0,e.createComponentVNode)(2,p.Stack.Item,{children:(0,e.createComponentVNode)(2,p.Icon,{name:"cog",spin:!0})}),(0,e.createComponentVNode)(2,p.Stack.Item,{children:["Building ",B,"\xA0(",(0,e.createComponentVNode)(2,k.Countdown,{current:A,timeLeft:T-A,format:function(){function E(w,O){return O.substr(3)}return E}()}),")"]})]})})})},m=function(v,s){var g=(0,o.useBackend)(s),N=g.act,x=g.data,B=x.queue,L=x.processingQueue,T=Object.entries(x.queueDeficit).filter(function(E){return E[1]<0}),A=B.reduce(function(E,w){return E+w.time},0);return(0,e.createComponentVNode)(2,p.Section,{fill:!0,scrollable:!0,className:"Exofab__queue",title:"Queue",buttons:(0,e.createComponentVNode)(2,p.Box,{children:[(0,e.createComponentVNode)(2,p.Button,{selected:L,icon:L?"toggle-on":"toggle-off",content:"Process",onClick:function(){function E(){return N("process")}return E}()}),(0,e.createComponentVNode)(2,p.Button,{disabled:B.length===0,icon:"eraser",content:"Clear",onClick:function(){function E(){return N("unqueueall")}return E}()})]}),children:(0,e.createComponentVNode)(2,p.Stack,{fill:!0,vertical:!0,children:B.length===0?(0,e.createComponentVNode)(2,p.Box,{color:"label",children:"The queue is empty."}):(0,e.createFragment)([(0,e.createComponentVNode)(2,p.Stack.Item,{className:"Exofab__queue--queue",grow:!0,overflow:"auto",children:B.map(function(E,w){return(0,e.createComponentVNode)(2,p.Box,{color:E.notEnough&&"bad",children:[w+1,". ",E.name,w>0&&(0,e.createComponentVNode)(2,p.Button,{icon:"arrow-up",onClick:function(){function O(){return N("queueswap",{from:w+1,to:w})}return O}()}),w0&&(0,e.createComponentVNode)(2,p.Stack.Item,{className:"Exofab__queue--time",children:[(0,e.createComponentVNode)(2,p.Divider),"Processing time:",(0,e.createComponentVNode)(2,p.Icon,{name:"clock",mx:"0.5rem"}),(0,e.createComponentVNode)(2,p.Box,{inline:!0,bold:!0,children:new Date(A/10*1e3).toISOString().substr(14,5)})]}),Object.keys(T).length>0&&(0,e.createComponentVNode)(2,p.Stack.Item,{className:"Exofab__queue--deficit",shrink:"0",children:[(0,e.createComponentVNode)(2,p.Divider),"Lacking materials to complete:",T.map(function(E){return(0,e.createComponentVNode)(2,p.Box,{children:(0,e.createComponentVNode)(2,i,{id:E[0],amount:-E[1],lineDisplay:!0})},E[0])})]})],0)})})},i=function(v,s){var g=(0,o.useBackend)(s),N=g.act,x=g.data,B=v.id,L=v.amount,T=v.lineDisplay,A=v.onClick,E=b(v,S),w=x.materials[B]||0,O=L||w;if(!(O<=0&&!(B==="metal"||B==="glass"))){var M=L&&L>w;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,p.Stack,Object.assign({align:"center",className:(0,a.classes)(["Exofab__material",T&&"Exofab__material--line"])},E,{children:T?(0,e.createFragment)([(0,e.createComponentVNode)(2,p.Stack.Item,{className:(0,a.classes)(["materials32x32",B])}),(0,e.createComponentVNode)(2,p.Stack.Item,{className:"Exofab__material--amount",color:M&&"bad",ml:0,mr:1,children:O.toLocaleString("en-US")})],4):(0,e.createFragment)([(0,e.createComponentVNode)(2,p.Stack.Item,{basis:"content",children:(0,e.createComponentVNode)(2,p.Button,{width:"85%",color:"transparent",onClick:A,children:(0,e.createComponentVNode)(2,p.Box,{mt:1,className:(0,a.classes)(["materials32x32",B])})})}),(0,e.createComponentVNode)(2,p.Stack.Item,{grow:"1",children:[(0,e.createComponentVNode)(2,p.Box,{className:"Exofab__material--name",children:B}),(0,e.createComponentVNode)(2,p.Box,{className:"Exofab__material--amount",children:[O.toLocaleString("en-US")," cm\xB3 (",Math.round(O/C*10)/10," ","sheets)"]})]})],4)})))}},h=function(v,s){var g=(0,o.useBackend)(s),N=g.act,x=g.data,B=v.design;return(0,e.createComponentVNode)(2,p.Box,{className:"Exofab__design",children:[(0,e.createComponentVNode)(2,p.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,p.Button,{icon:"plus-circle",onClick:function(){function L(){return N("queue",{id:B.id})}return L}()}),(0,e.createComponentVNode)(2,p.Box,{className:"Exofab__design--cost",children:Object.entries(B.cost).map(function(L){return(0,e.createComponentVNode)(2,p.Box,{children:(0,e.createComponentVNode)(2,i,{id:L[0],amount:L[1],lineDisplay:!0})},L[0])})}),(0,e.createComponentVNode)(2,p.Stack,{className:"Exofab__design--time",children:(0,e.createComponentVNode)(2,p.Stack.Item,{children:[(0,e.createComponentVNode)(2,p.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),p=0,k=1013,y=function(C){var c="good",u=80,f=95,l=110,d=120;return Cl?c="average":C>d&&(c="bad"),c},S=r.ExternalAirlockController=function(){function b(C,c){var u=(0,a.useBackend)(c),f=u.act,l=u.data,d=l.chamber_pressure,m=l.exterior_status,i=l.interior_status,h=l.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:y(d),value:d,minValue:p,maxValue:k,children:[d," 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:h,onClick:function(){function V(){return f("cycle_ext")}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Cycle to Interior",icon:"arrow-circle-right",disabled:h,onClick:function(){function V(){return f("cycle_int")}return V}()})]}),(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Force Exterior Door",icon:"exclamation-triangle",color:i==="open"?"red":h?"yellow":null,onClick:function(){function V(){return f("force_ext")}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Force Interior Door",icon:"exclamation-triangle",color:i==="open"?"red":h?"yellow":null,onClick:function(){function V(){return f("force_int")}return V}()})]}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Abort",icon:"ban",color:"red",disabled:!h,onClick:function(){function V(){return f("abort")}return V}()})})]})]})})}return b}()},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),p=r.FaxMachine=function(){function k(y,S){var b=(0,a.useBackend)(S),C=b.act,c=b.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:c.scan_name?"eject":"id-card",selected:c.scan_name,content:c.scan_name?c.scan_name:"-----",tooltip:c.scan_name?"Eject ID":"Insert ID",onClick:function(){function u(){return C("scan")}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Authorize",children:(0,e.createComponentVNode)(2,t.Button,{icon:c.authenticated?"sign-out-alt":"id-card",selected:c.authenticated,disabled:!c.scan_name&&!c.authenticated,content:c.authenticated?"Log Out":"Log In",onClick:function(){function u(){return C("auth")}return u}()})})]})}),(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:c.network}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Document",children:[(0,e.createComponentVNode)(2,t.Button,{icon:c.paper?"eject":"paperclip",disabled:!c.authenticated&&!c.paper,content:c.paper?c.paper:"-----",onClick:function(){function u(){return C("paper")}return u}()}),!!c.paper&&(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:"Rename",onClick:function(){function u(){return C("rename")}return u}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sending To",children:(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:c.destination?c.destination:"-----",disabled:!c.authenticated,onClick:function(){function u(){return C("dept")}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Action",children:(0,e.createComponentVNode)(2,t.Button,{icon:"envelope",content:c.sendError?c.sendError:"Send",disabled:!c.paper||!c.destination||!c.authenticated||c.sendError,onClick:function(){function u(){return C("send")}return u}()})})]})})]})})}return k}()},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),p=function(b,C){var c=(0,a.useBackend)(C),u=c.act,f=c.data,l=b.icon_state,d=b.direction,m=b.isSelected,i=b.onSelect;return(0,e.createComponentVNode)(2,t.DmIcon,{icon:f.icon,icon_state:l,direction:d,onClick:i,style:{"border-style":m&&"solid"||"none","border-width":"2px","border-color":"orange",padding:m&&"0px"||"2px"}})},k={NORTH:1,SOUTH:2,EAST:4,WEST:8},y=r.FloorPainter=function(){function S(b,C){var c=(0,a.useBackend)(C),u=c.act,f=c.data,l=f.availableStyles,d=f.selectedStyle,m=f.selectedDir;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 i(){return u("cycle_style",{offset:-1})}return i}()})}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Dropdown,{options:l,selected:d,width:"150px",height:"20px",ml:"2px",mr:"2px",nochevron:!0,onSelected:function(){function i(h){return u("select_style",{style:h})}return i}()})}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",onClick:function(){function i(){return u("cycle_style",{offset:1})}return i}()})})]}),(0,e.createComponentVNode)(2,t.Box,{mt:"5px",mb:"5px",children:(0,e.createComponentVNode)(2,t.Flex,{overflowY:"auto",maxHeight:"239px",wrap:"wrap",children:l.map(function(i){return(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,p,{icon_state:i,isSelected:d===i,onSelect:function(){function h(){return u("select_style",{style:i})}return h}()})},i)})})}),(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:[k.NORTH,null,k.SOUTH].map(function(i){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[i+k.WEST,i,i+k.EAST].map(function(h){return(0,e.createComponentVNode)(2,t.Table.Cell,{style:{"vertical-align":"middle","text-align":"center"},children:h===null?(0,e.createComponentVNode)(2,t.Icon,{name:"arrows-alt",size:3}):(0,e.createComponentVNode)(2,p,{icon_state:d,direction:h,isSelected:h===m,onSelect:function(){function V(){return u("select_direction",{direction:h})}return V}()})},h)})},i)})})})})]})})})}return S}()},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),p=n(98595),k=function(l){return l?"("+l.join(", ")+")":"ERROR"},y=function(l,d,m){if(!(!l||!d)){if(l[2]!==d[2]||m!==1)return null;var i=Math.atan2(d[1]-l[1],d[0]-l[0]),h=Math.sqrt(Math.pow(d[1]-l[1],2)+Math.pow(d[0]-l[0],2));return{angle:(0,a.rad2deg)(i),distance:h}}},S=r.GPS=function(){function f(l,d){var m=(0,t.useBackend)(d),i=m.data,h=i.emped,V=i.active,v=i.area,s=i.position,g=i.saved;return(0,e.createComponentVNode)(2,p.Window,{width:450,height:700,children:(0,e.createComponentVNode)(2,p.Window.Content,{children:(0,e.createComponentVNode)(2,o.Flex,{direction:"column",height:"100%",children:h?(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",basis:"0",children:(0,e.createComponentVNode)(2,b,{emp:!0})}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Flex.Item,{children:(0,e.createComponentVNode)(2,C)}),V?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Flex.Item,{mt:"0.5rem",children:(0,e.createComponentVNode)(2,c,{area:v,position:s})}),g&&(0,e.createComponentVNode)(2,o.Flex.Item,{mt:"0.5rem",children:(0,e.createComponentVNode)(2,c,{title:"Saved Position",position:g})}),(0,e.createComponentVNode)(2,o.Flex.Item,{mt:"0.5rem",grow:"1",basis:"0",children:(0,e.createComponentVNode)(2,u,{height:"100%"})})],0):(0,e.createComponentVNode)(2,b)],0)})})})}return f}(),b=function(l,d){var m=l.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."]})})})})},C=function(l,d){var m=(0,t.useBackend)(d),i=m.act,h=m.data,V=h.active,v=h.tag,s=h.same_z,g=(0,t.useLocalState)(d,"newTag",v),N=g[0],x=g[1];return(0,e.createComponentVNode)(2,o.Section,{title:"Settings",buttons:(0,e.createComponentVNode)(2,o.Button,{selected:V,icon:V?"toggle-on":"toggle-off",content:V?"On":"Off",onClick:function(){function B(){return i("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:v,onEnter:function(){function B(){return i("tag",{newtag:N})}return B}(),onInput:function(){function B(L,T){return x(T)}return B}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:v===N,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){function B(){return i("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:!s,icon:s?"compress":"expand",content:s?"Local Sector":"Global",onClick:function(){function B(){return i("same_z")}return B}()})})]})})},c=function(l,d){var m=l.title,i=l.area,h=l.position;return(0,e.createComponentVNode)(2,o.Section,{title:m||"Position",children:(0,e.createComponentVNode)(2,o.Box,{fontSize:"1.5rem",children:[i&&(0,e.createFragment)([i,(0,e.createVNode)(1,"br")],0),k(h)]})})},u=function(l,d){var m=(0,t.useBackend)(d),i=m.data,h=i.position,V=i.signals,v=i.upgraded;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Signals",overflow:"auto"},l,{children:(0,e.createComponentVNode)(2,o.Table,{children:V.map(function(s){return Object.assign({},s,y(h,s.position,v))}).map(function(s,g){return(0,e.createComponentVNode)(2,o.Table.Row,{backgroundColor:g%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:s.tag}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",color:"grey",children:s.area}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",collapsing:!0,children:s.distance!==void 0&&(0,e.createComponentVNode)(2,o.Box,{opacity:Math.max(1-Math.min(s.distance,100)/100,.5),children:[(0,e.createComponentVNode)(2,o.Icon,{name:s.distance>0?"arrow-right":"circle",rotation:-s.angle}),"\xA0",Math.floor(s.distance)+"m"]})}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",pr:"0.25rem",collapsing:!0,children:k(s.position)})]},g)})})})))}},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),p=r.GasAnalyzerContent=function(){function S(b,C){var c=(0,a.useBackend)(C),u=c.act,f=c.data,l=f.gasmixes,d=f.autoUpdating;return(0,e.createComponentVNode)(2,t.Section,{title:l[0].name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:d?"unlock":"lock",onClick:function(){function m(){return u("autoscantoggle")}return m}(),tooltip:d?"Auto-Update Enabled":"Auto-Update Disabled",fluid:!0,textAlign:"center",selected:d}),children:l[0].total_moles?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Moles",children:(l[0].total_moles?l[0].total_moles:"-")+" mol"}),l[0].oxygen?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Oxygen",children:l[0].oxygen.toFixed(2)+" mol ("+(l[0].oxygen/l[0].total_moles).toFixed(2)*100+" %)"}):"",l[0].nitrogen?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nitrogen",children:l[0].nitrogen.toFixed(2)+" mol ("+(l[0].nitrogen/l[0].total_moles).toFixed(2)*100+" %)"}):"",l[0].carbon_dioxide?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Carbon Dioxide",children:l[0].carbon_dioxide.toFixed(2)+" mol ("+(l[0].carbon_dioxide/l[0].total_moles).toFixed(2)*100+" %)"}):"",l[0].toxins?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Plasma",children:l[0].toxins.toFixed(2)+" mol ("+(l[0].toxins/l[0].total_moles).toFixed(2)*100+" %)"}):"",l[0].sleeping_agent?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nitrous Oxide",children:l[0].sleeping_agent.toFixed(2)+" mol ("+(l[0].sleeping_agent/l[0].total_moles).toFixed(2)*100+" %)"}):"",l[0].agent_b?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Agent B",children:l[0].agent_b.toFixed(2)+" mol ("+(l[0].agent_b/l[0].total_moles).toFixed(2)*100+" %)"}):"",(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:(l[0].total_moles?(l[0].temperature-273.15).toFixed(2):"-")+" \xB0C ("+(l[0].total_moles?l[0].temperature.toFixed(2):"-")+" K)"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Volume",children:(l[0].total_moles?l[0].volume:"-")+" L"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure",children:(l[0].total_moles?l[0].pressure.toFixed(2):"-")+" kPa"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Heat Capacity",children:l[0].heat_capacity+" / K"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Thermal Energy",children:l[0].thermal_energy})]}):(0,e.createComponentVNode)(2,t.Box,{nowrap:!0,italic:!0,mb:"10px",children:"No Gas Detected!"})},l[0])}return S}(),k=r.GasAnalyzerHistory=function(){function S(b,C){var c=(0,a.useBackend)(C),u=c.act,f=c.data,l=f.historyGasmixes,d=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 i(){return u("clearhistory")}return i}(),textAlign:"center",disabled:l.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 i(){return u("modekpa")}return i}(),textAlign:"center",selected:d==="kpa"})}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"mol",onClick:function(){function i(){return u("modemol")}return i}(),textAlign:"center",selected:d==="mol"})})]})}),(0,e.createComponentVNode)(2,t.LabeledList,{children:l.map(function(i,h){return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:h+1+". "+(d==="mol"?i[0].total_moles.toFixed(2):i[0].pressure.toFixed(2)),onClick:function(){function V(){return u("input",{target:h+1})}return V}(),textAlign:"left",selected:h+1===m,fluid:!0})},i[0])})})]})}return S}(),y=r.GasAnalyzer=function(){function S(b,C){var c={float:"left",width:"67%"},u={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,p)}),2,{style:c}),(0,e.createVNode)(1,"div",null,(0,e.createComponentVNode)(2,t.Section,{width:"160px",children:(0,e.createComponentVNode)(2,k)}),2,{style:u})]})})}return S}()},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),p=r.GasFreezer=function(){function k(y,S){var b=(0,a.useBackend)(S),C=b.act,c=b.data,u=c.on,f=c.pressure,l=c.temperature,d=c.temperatureCelsius,m=c.min,i=c.max,h=c.target,V=c.targetCelsius,v=(l-m)/(i-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:u?"power-off":"times",content:u?"\u0412\u043A\u043B":"\u0412\u044B\u043A\u043B",selected:u,onClick:function(){function s(){return C("power")}return s}()}),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:v,ranges:{blue:[-1/0,.5],red:[.5,1/0]},children:"\xA0"})}),(0,e.createComponentVNode)(2,t.Flex.Item,{width:"35%",children:[v<.5&&(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"blue",ml:1,children:[l," \xB0K (",d," \xB0C)"]}),v>=.5&&(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"red",ml:1,children:[l," \xB0K (",d," \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:(h-m)/(i-m),children:"\xA0"})}),(0,e.createComponentVNode)(2,t.Flex.Item,{width:"35%",children:(0,e.createComponentVNode)(2,t.Box,{inline:!0,ml:1,children:[h," \xB0K (",V," \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 s(){return C("temp",{temp:m})}return s}()}),(0,e.createComponentVNode)(2,t.NumberInput,{value:Math.round(h),unit:"\xB0K",minValue:Math.round(m),maxValue:Math.round(i),step:5,stepPixelSize:3,onDrag:function(){function s(g,N){return C("temp",{temp:N})}return s}()}),(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 s(){return C("temp",{temp:i})}return s}()})]})]})})})})}return k}()},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),p=n(3939),k=n(98595),y=r.GeneModder=function(){function d(m,i){var h=(0,a.useBackend)(i),V=h.data,v=V.has_seed;return(0,e.createComponentVNode)(2,k.Window,{width:500,height:650,children:(0,e.createComponentVNode)(2,k.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,C),(0,e.createComponentVNode)(2,p.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),v===0?(0,e.createComponentVNode)(2,b):(0,e.createComponentVNode)(2,S)]})})})}return d}(),S=function(m,i){var h=(0,a.useBackend)(i),V=h.act,v=h.data,s=v.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:!s||!s.can_insert||s.is_core,icon:"arrow-circle-down",onClick:function(){function g(){return V("insert")}return g}()}),children:[(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,u),(0,e.createComponentVNode)(2,f)]})},b=function(m,i){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."]})})})},C=function(m,i){var h=(0,a.useBackend)(i),V=h.act,v=h.data,s=v.has_seed,g=v.seed,N=v.has_disk,x=v.disk,B,L;return s?B=(0,e.createComponentVNode)(2,o.Stack.Item,{mb:"-6px",mt:"-4px",children:[(0,e.createVNode)(1,"img",(0,t.classes)(["seeds32x32",g.image]),null,1,{style:{"vertical-align":"middle",width:"32px",margin:"-1px","margin-left":"-11px"}}),(0,e.createComponentVNode)(2,o.Button,{content:g.name,onClick:function(){function T(){return V("eject_seed")}return T}()}),(0,e.createComponentVNode)(2,o.Button,{ml:"3px",icon:"pen",tooltip:"Name Variant",onClick:function(){function T(){return V("variant_name")}return T}()})]}):B=(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{ml:3.3,content:"None",onClick:function(){function T(){return V("eject_seed")}return T}()})}),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 T(){return V("eject_disk")}return T}()})})})]})})},c=function(m,i){var h=(0,a.useBackend)(i),V=h.act,v=h.data,s=v.disk,g=v.core_genes;return(0,e.createComponentVNode)(2,o.Collapsible,{title:"Core Genes",open:!0,children:[g.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:!(s!=null&&s.can_extract),icon:"save",onClick:function(){function x(){return V("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||!s.can_insert,icon:"arrow-circle-down",onClick:function(){function x(){return V("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:!(s!=null&&s.is_bulk_core),icon:"arrow-circle-down",onClick:function(){function N(){return V("bulk_replace_core")}return N}()})})})]},"Core Genes")},u=function(m,i){var h=(0,a.useBackend)(i),V=h.data,v=V.reagent_genes,s=V.has_reagent;return(0,e.createComponentVNode)(2,l,{title:"Reagent Genes",gene_set:v,do_we_show:s})},f=function(m,i){var h=(0,a.useBackend)(i),V=h.data,v=V.trait_genes,s=V.has_trait;return(0,e.createComponentVNode)(2,l,{title:"Trait Genes",gene_set:v,do_we_show:s})},l=function(m,i){var h=m.title,V=m.gene_set,v=m.do_we_show,s=(0,a.useBackend)(i),g=s.act,N=s.data,x=N.disk;return(0,e.createComponentVNode)(2,o.Collapsible,{title:h,open:!0,children:v?V.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 g("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 g("remove",{id:B.id})}return L}()})})]},B)}):(0,e.createComponentVNode)(2,o.Stack.Item,{children:"No Genes Detected"})},h)}},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),p=r.GenericCrewManifest=function(){function k(y,S){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 k}()},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),p=r.GhostHudPanel=function(){function y(S,b){var C=(0,a.useBackend)(b),c=C.data,u=c.security,f=c.medical,l=c.diagnostic,d=c.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,k,{label:"Medical",type:"medical",is_active:f}),(0,e.createComponentVNode)(2,k,{label:"Security",type:"security",is_active:u}),(0,e.createComponentVNode)(2,k,{label:"Diagnostic",type:"diagnostic",is_active:l}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,k,{label:"Antag HUD",is_active:d,act_on:"ahud_on",act_off:"ahud_off"})]})})})}return y}(),k=function(S,b){var C=(0,a.useBackend)(b),c=C.act,u=S.label,f=S.type,l=f===void 0?null:f,d=S.is_active,m=S.act_on,i=m===void 0?"hud_on":m,h=S.act_off,V=h===void 0?"hud_off":h;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:u}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{mr:.6,content:d?"On":"Off",icon:d?"toggle-on":"toggle-off",selected:d,onClick:function(){function v(){return c(d?V:i,{hud_type:l})}return v}()})})]})}},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),p=r.GlandDispenser=function(){function k(y,S){var b=(0,a.useBackend)(S),C=b.act,c=b.data,u=c.glands,f=u===void 0?[]:u;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(l){return(0,e.createComponentVNode)(2,t.Button,{width:"60px",height:"60px",m:.75,textAlign:"center",fontSize:"17px",lineHeight:"55px",icon:"eject",backgroundColor:l.color,content:l.amount||"0",disabled:!l.amount,onClick:function(){function d(){return C("dispense",{gland_id:l.id})}return d}()},l.id)})})})})}return k}()},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),p=[1,5,10,20,30,50],k=null,y=r.HandheldChemDispenser=function(){function C(c,u){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,S),(0,e.createComponentVNode)(2,b)]})})})}return C}(),S=function(c,u){var f=(0,a.useBackend)(u),l=f.act,d=f.data,m=d.amount,i=d.energy,h=d.maxEnergy,V=d.mode;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u042D\u043D\u0435\u0440\u0433\u0438\u044F",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:i,minValue:0,maxValue:h,ranges:{good:[h*.5,1/0],average:[h*.25,h*.5],bad:[-1/0,h*.25]},children:[i," / ",h," \u0415\u0434\u0438\u043D\u0438\u0446"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041E\u0431\u044A\u0451\u043C \u0441\u0438\u043D\u0442\u0435\u0437\u0430",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{children:p.map(function(v,s){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===v,content:v,onClick:function(){function g(){return l("amount",{amount:v})}return g}()})},s)})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0420\u0435\u0436\u0438\u043C",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{justify:"space-between",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:V==="dispense",content:"\u0421\u0438\u043D\u0442\u0435\u0437",m:"0",width:"32%",onClick:function(){function v(){return l("mode",{mode:"dispense"})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:V==="remove",content:"\u0423\u0434\u0430\u043B\u0435\u043D\u0438\u0435",m:"0",width:"32%",onClick:function(){function v(){return l("mode",{mode:"remove"})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:V==="isolate",content:"\u0418\u0437\u043E\u043B\u044F\u0446\u0438\u044F",m:"0",width:"32%",onClick:function(){function v(){return l("mode",{mode:"isolate"})}return v}()})]})})]})})})},b=function(c,u){for(var f=(0,a.useBackend)(u),l=f.act,d=f.data,m=d.chemicals,i=m===void 0?[]:m,h=d.current_reagent,V=[],v=0;v<(i.length+1)%3;v++)V.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:d.glass?"\u0412\u044B\u0431\u043E\u0440 \u043D\u0430\u043F\u0438\u0442\u043A\u0430":"\u0412\u044B\u0431\u043E\u0440 \u0440\u0435\u0430\u0433\u0435\u043D\u0442\u0430",children:[i.map(function(s,g){return(0,e.createComponentVNode)(2,t.Button,{width:"32%",icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",selected:h===s.id,content:s.title,style:{"margin-left":"2px"},onClick:function(){function N(){return l("dispense",{reagent:s.id})}return N}()},g)}),V.map(function(s,g){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:"1",basis:"25%"},g)})]})})}},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),p=r.ImplantPad=function(){function k(y,S){var b=(0,a.useBackend)(S),C=b.act,c=b.data,u=c.implant,f=c.contains_case,l=c.tag,d=(0,a.useLocalState)(S,"newTag",l),m=d[0],i=d[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 h(){return C("eject_case")}return h}()})}),children:u&&f?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{bold:!0,mb:2,children:[(0,e.createComponentVNode)(2,t.DmIcon,{icon:u.icon,icon_state:u.icon_state,ml:0,mr:2,style:{"vertical-align":"middle",width:"32px"}}),u.name]}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Life",children:u.life}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Notes",children:u.notes}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Function",children:u.function}),!!l&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tag",children:[(0,e.createComponentVNode)(2,t.Input,{width:"5.5rem",value:l,onEnter:function(){function h(){return C("tag",{newtag:m})}return h}(),onInput:function(){function h(V,v){return i(v)}return h}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:l===m,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){function h(){return C("tag",{newtag:m})}return h}(),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 k}()},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),p=n(98595),k=r.Instrument=function(){function c(u,f){var l=(0,t.useBackend)(f),d=l.act,m=l.data;return(0,e.createComponentVNode)(2,p.Window,{width:600,height:505,children:[(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,p.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,S),(0,e.createComponentVNode)(2,C)]})})]})}return c}(),y=function(u,f){var l=(0,t.useBackend)(f),d=l.act,m=l.data,i=m.help;if(i)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 h(){return d("help")}return h}()})]})})})},S=function(u,f){var l=(0,t.useBackend)(f),d=l.act,m=l.data,i=m.lines,h=m.playing,V=m.repeat,v=m.maxRepeats,s=m.tempo,g=m.minTempo,N=m.maxTempo,x=m.tickLag,B=m.volume,L=m.minVolume,T=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 E(){return d("help")}return E}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"file",content:"New",onClick:function(){function E(){return d("newsong")}return E}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"upload",content:"Import",onClick:function(){function E(){return d("import")}return E}()})],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:h,disabled:i.length===0||V<0,icon:"play",content:"Play",onClick:function(){function E(){return d("play")}return E}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!h,icon:"stop",content:"Stop",onClick:function(){function E(){return d("stop")}return E}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Repeat",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:0,maxValue:v,value:V,stepPixelSize:59,onChange:function(){function E(w,O){return d("repeat",{new:O})}return E}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Tempo",children:(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Button,{disabled:s>=N,content:"-",as:"span",mr:"0.5rem",onClick:function(){function E(){return d("tempo",{new:s+x})}return E}()}),(0,a.round)(600/s)," BPM",(0,e.createComponentVNode)(2,o.Button,{disabled:s<=g,content:"+",as:"span",ml:"0.5rem",onClick:function(){function E(){return d("tempo",{new:s-x})}return E}()})]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Volume",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:L,maxValue:T,value:B,stepPixelSize:6,onDrag:function(){function E(w,O){return d("setvolume",{new:O})}return E}()})}),(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,b)]})},b=function(u,f){var l=(0,t.useBackend)(f),d=l.act,m=l.data,i=m.allowedInstrumentNames,h=m.instrumentLoaded,V=m.instrument,v=m.canNoteShift,s=m.noteShift,g=m.noteShiftMin,N=m.noteShiftMax,x=m.sustainMode,B=m.sustainLinearDuration,L=m.sustainExponentialDropoff,T=m.legacy,A=m.sustainDropoffVolume,E=m.sustainHeldNote,w,O;return x===1?(w="Linear",O=(0,e.createComponentVNode)(2,o.Slider,{minValue:.1,maxValue:5,value:B,step:.5,stepPixelSize:85,format:function(){function M(P){return(0,a.round)(P*100)/100+" seconds"}return M}(),onChange:function(){function M(P,F){return d("setlinearfalloff",{new:F/10})}return M}()})):x===2&&(w="Exponential",O=(0,e.createComponentVNode)(2,o.Slider,{minValue:1.025,maxValue:10,value:L,step:.01,format:function(){function M(P){return(0,a.round)(P*1e3)/1e3+"% per decisecond"}return M}(),onChange:function(){function M(P,F){return d("setexpfalloff",{new:F})}return M}()})),i.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:T?"Legacy":"Synthesized"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Current",children:h?(0,e.createComponentVNode)(2,o.Dropdown,{options:i,selected:V,width:"50%",onSelected:function(){function M(P){return d("switchinstrument",{name:P})}return M}()}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"None!"})}),!!(!T&&v)&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Note Shift/Note Transpose",children:(0,e.createComponentVNode)(2,o.Slider,{minValue:g,maxValue:N,value:s,stepPixelSize:2,format:function(){function M(P){return P+" keys / "+(0,a.round)(P/12*100)/100+" octaves"}return M}(),onChange:function(){function M(P,F){return d("setnoteshift",{new:F})}return M}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Sustain Mode",children:[(0,e.createComponentVNode)(2,o.Dropdown,{options:["Linear","Exponential"],selected:w,onSelected:function(){function M(P){return d("setsustainmode",{new:P})}return M}()}),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 M(P,F){return d("setdropoffvolume",{new:F})}return M}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Sustain indefinitely last held note",children:(0,e.createComponentVNode)(2,o.Button,{selected:E,icon:E?"toggle-on":"toggle-off",content:E?"Yes":"No",onClick:function(){function M(){return d("togglesustainhold")}return M}()})})],4)]}),(0,e.createComponentVNode)(2,o.Button,{icon:"redo",content:"Reset to Default",mt:"0.5rem",onClick:function(){function M(){return d("reset")}return M}()})]})})})},C=function(u,f){var l=(0,t.useBackend)(f),d=l.act,m=l.data,i=m.playing,h=m.lines,V=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:!V||i,icon:"plus",content:"Add Line",onClick:function(){function v(){return d("newline",{line:h.length+1})}return v}()}),(0,e.createComponentVNode)(2,o.Button,{selected:!V,icon:V?"chevron-up":"chevron-down",onClick:function(){function v(){return d("edit")}return v}()})],4),children:!!V&&(h.length>0?(0,e.createComponentVNode)(2,o.LabeledList,{children:h.map(function(v,s){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:s+1,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:i,icon:"pen",onClick:function(){function g(){return d("modifyline",{line:s+1})}return g}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:i,icon:"trash",onClick:function(){function g(){return d("deleteline",{line:s+1})}return g}()})],4),children:v},s)})}):(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),p=r.ItemPixelShift=function(){function k(y,S){var b=(0,a.useBackend)(S),C=b.act,c=b.data,u=c.pixel_x,f=c.pixel_y,l=c.max_shift_x,d=c.max_shift_y,m=c.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:u===-l,onClick:function(){function i(){return C("shift_left")}return i}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,lineHeight:1.7,width:"75px",unit:"pixels",stepPixelSize:6,value:u,minValue:-l,maxValue:l,onChange:function(){function i(h,V){return C("custom_x",{pixel_x:V})}return i}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-right",title:"Shifts item rightwards.",disabled:u===l,onClick:function(){function i(){return C("shift_right")}return i}()})]}),(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===d,onClick:function(){function i(){return C("shift_up")}return i}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,lineHeight:1.7,width:"75px",unit:"pixels",stepPixelSize:6,value:f,minValue:-d,maxValue:d,onChange:function(){function i(h,V){return C("custom_y",{pixel_y:V})}return i}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",title:"Shifts item downwards.",disabled:f===-d,onClick:function(){function i(){return C("shift_down")}return i}()})]})]})}),(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 i(){return C("move_to_top")}return i}()})}),(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 i(){return C("toggle")}return i}()})})]})})]})})}return k}()},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),p=n(98595),k=n(19203),y=n(51057),S=function(l){return l.key!==a.KEY.Alt&&l.key!==a.KEY.Control&&l.key!==a.KEY.Shift&&l.key!==a.KEY.Escape},b={DEL:"Delete",DOWN:"South",END:"Southwest",HOME:"Northwest",INSERT:"Insert",LEFT:"West",PAGEDOWN:"Southeast",PAGEUP:"Northeast",RIGHT:"East",SPACEBAR:"Space",UP:"North"},C=3,c=function(l){var d="";if(l.altKey&&(d+="Alt"),l.ctrlKey&&(d+="Ctrl"),l.shiftKey&&!(l.keyCode>=48&&l.keyCode<=57)&&(d+="Shift"),l.location===C&&(d+="Numpad"),S(l))if(l.shiftKey&&l.keyCode>=48&&l.keyCode<=57){var m=l.keyCode-48;d+="Shift"+m}else{var i=l.key.toUpperCase();d+=b[i]||i}return d},u=r.KeyComboModal=function(){function f(l,d){var m=(0,t.useBackend)(d),i=m.act,h=m.data,V=h.init_value,v=h.large_buttons,s=h.message,g=s===void 0?"":s,N=h.title,x=h.timeout,B=(0,t.useLocalState)(d,"input",V),L=B[0],T=B[1],A=(0,t.useLocalState)(d,"binding",!0),E=A[0],w=A[1],O=function(){function F(R){if(!E){R.key===a.KEY.Enter&&i("submit",{entry:L}),R.key===a.KEY.Escape&&i("cancel");return}if(R.preventDefault(),S(R)){M(c(R)),w(!1);return}else if(R.key===a.KEY.Escape){M(V),w(!1);return}}return F}(),M=function(){function F(R){R!==L&&T(R)}return F}(),P=130+(g.length>30?Math.ceil(g.length/3):0)+(g.length&&v?5:0);return(0,e.createComponentVNode)(2,p.Window,{title:N,width:240,height:P,children:[x&&(0,e.createComponentVNode)(2,y.Loader,{value:x}),(0,e.createComponentVNode)(2,p.Window.Content,{onKeyDown:function(){function F(R){O(R)}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:g})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{disabled:E,content:E&&E!==null?"Awaiting input...":""+L,width:"100%",textAlign:"center",onClick:function(){function F(){M(V),w(!0)}return F}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,k.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),p=r.KeycardAuth=function(){function k(y,S){var b=(0,a.useBackend)(S),C=b.act,c=b.data,u=(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(!c.swiping&&!c.busy)return(0,e.createComponentVNode)(2,o.Window,{width:540,height:280,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[u,(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:!c.redAvailable,onClick:function(){function l(){return C("triggerevent",{triggerevent:"Red Alert"})}return l}(),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 l(){return C("triggerevent",{triggerevent:"Emergency Response Team"})}return l}(),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 l(){return C("triggerevent",{triggerevent:"Grant Emergency Maintenance Access"})}return l}(),content:"Grant"}),(0,e.createComponentVNode)(2,t.Button,{icon:"door-closed",onClick:function(){function l(){return C("triggerevent",{triggerevent:"Revoke Emergency Maintenance Access"})}return l}(),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 l(){return C("triggerevent",{triggerevent:"Activate Station-Wide Emergency Access"})}return l}(),content:"Grant"}),(0,e.createComponentVNode)(2,t.Button,{icon:"door-closed",onClick:function(){function l(){return C("triggerevent",{triggerevent:"Deactivate Station-Wide Emergency Access"})}return l}(),content:"Revoke"})]})]})})]})});var f=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Waiting for YOU to swipe your ID..."});return!c.hasSwiped&&!c.ertreason&&c.event==="Emergency Response Team"?f=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Fill out the reason for your ERT request."}):c.hasConfirm?f=(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Request Confirmed!"}):c.isRemote?f=(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"Swipe your card to CONFIRM the remote request."}):c.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:[u,c.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:c.ertreason?"":"red",icon:c.ertreason?"check":"pencil-alt",content:c.ertreason?c.ertreason:"-----",disabled:c.busy,onClick:function(){function l(){return C("ert")}return l}()})})}),(0,e.createComponentVNode)(2,t.Section,{title:c.event,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back",disabled:c.busy||c.hasConfirm,onClick:function(){function l(){return C("reset")}return l}()}),children:f})]})})}return k}()},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),p=n(98595),k=r.LaborClaimConsole=function(){function b(C,c){return(0,e.createComponentVNode)(2,p.Window,{width:315,height:470,children:(0,e.createComponentVNode)(2,p.Window.Content,{children:[(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,S)]})})}return b}(),y=function(C,c){var u=(0,t.useBackend)(c),f=u.act,l=u.data,d=l.can_go_home,m=l.emagged,i=l.id_inserted,h=l.id_name,V=l.id_points,v=l.id_goal,s=l.unclaimed_points,g=m?0:1,N=m?"ERR0R":d?"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:!!i&&(0,e.createComponentVNode)(2,o.ProgressBar,{value:V/v,ranges:{good:[g,1/0],bad:[-1/0,g]},children:V+" / "+v+" "+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:!d,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 ("+s+")",disabled:!i||!s,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:i?h:"-------------",onClick:function(){function x(){return f("handle_id")}return x}()})})]})})},S=function(C,c){var u=(0,t.useBackend)(c),f=u.data,l=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"})]}),l.map(function(d){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,a.toTitleCase)(d.ore)}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,textAlign:"right",children:(0,e.createComponentVNode)(2,o.Box,{color:"label",inline:!0,children:d.value})})]},d.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),p=r.LawManager=function(){function b(C,c){var u=(0,a.useBackend)(c),f=u.act,l=u.data,d=l.isAdmin,m=l.isSlaved,i=l.isMalf,h=l.isAIMalf,V=l.view;return(0,e.createComponentVNode)(2,o.Window,{width:800,height:i?620:365,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[!!(d&&m)&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:["This unit is slaved to ",m,"."]}),!!(i||h)&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Law Management",selected:V===0,onClick:function(){function v(){return f("set_view",{set_view:0})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Lawsets",selected:V===1,onClick:function(){function v(){return f("set_view",{set_view:1})}return v}()})]}),V===0&&(0,e.createComponentVNode)(2,k),V===1&&(0,e.createComponentVNode)(2,y)]})})}return b}(),k=function(C,c){var u=(0,a.useBackend)(c),f=u.act,l=u.data,d=l.has_zeroth_laws,m=l.zeroth_laws,i=l.has_ion_laws,h=l.ion_laws,V=l.ion_law_nr,v=l.has_inherent_laws,s=l.inherent_laws,g=l.has_supplied_laws,N=l.supplied_laws,x=l.channels,B=l.channel,L=l.isMalf,T=l.isAdmin,A=l.zeroth_law,E=l.ion_law,w=l.inherent_law,O=l.supplied_law,M=l.supplied_law_position;return(0,e.createFragment)([!!d&&(0,e.createComponentVNode)(2,S,{title:"ERR_NULL_VALUE",laws:m,ctx:c}),!!i&&(0,e.createComponentVNode)(2,S,{title:V,laws:h,ctx:c}),!!v&&(0,e.createComponentVNode)(2,S,{title:"Inherent",laws:s,ctx:c}),!!g&&(0,e.createComponentVNode)(2,S,{title:"Supplied",laws:N,ctx:c}),(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(P){return(0,e.createComponentVNode)(2,t.Button,{content:P.channel,selected:P.channel===B,onClick:function(){function F(){return f("law_channel",{law_channel:P.channel})}return F}()},P.channel)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"State Laws",children:(0,e.createComponentVNode)(2,t.Button,{content:"State Laws",onClick:function(){function P(){return f("state_laws")}return P}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Law Notification",children:(0,e.createComponentVNode)(2,t.Button,{content:"Notify",onClick:function(){function P(){return f("notify_laws")}return P}()})})]})}),!!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"})]}),!!(T&&!d)&&(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 P(){return f("change_zeroth_law")}return P}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function P(){return f("add_zeroth_law")}return P}()})]})]}),(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: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 P(){return f("change_ion_law")}return P}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function P(){return f("add_ion_law")}return P}()})]})]}),(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:w}),(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 P(){return f("change_inherent_law")}return P}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function P(){return f("add_inherent_law")}return P}()})]})]}),(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:M,onClick:function(){function P(){return f("change_supplied_law_position")}return P}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function P(){return f("change_supplied_law")}return P}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function P(){return f("add_supplied_law")}return P}()})]})]})]})})],0)},y=function(C,c){var u=(0,a.useBackend)(c),f=u.act,l=u.data,d=l.law_sets;return(0,e.createComponentVNode)(2,t.Box,{children:d.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 i(){return f("transfer_laws",{transfer_laws:m.ref})}return i}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[m.laws.has_ion_laws>0&&m.laws.ion_laws.map(function(i){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:i.index,children:i.law},i.index)}),m.laws.has_zeroth_laws>0&&m.laws.zeroth_laws.map(function(i){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:i.index,children:i.law},i.index)}),m.laws.has_inherent_laws>0&&m.laws.inherent_laws.map(function(i){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:i.index,children:i.law},i.index)}),m.laws.has_supplied_laws>0&&m.laws.inherent_laws.map(function(i){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:i.index,children:i.law},i.index)})]})},m.name)})})},S=function(C,c){var u=(0,a.useBackend)(C.ctx),f=u.act,l=u.data,d=l.isMalf;return(0,e.createComponentVNode)(2,t.Section,{title:C.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?"})]}),C.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 i(){return f("state_law",{ref:m.ref,state_law:m.state?0:1})}return i}()}),!!d&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function i(){return f("edit_law",{edit_law:m.ref})}return i}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Delete",icon:"trash",color:"red",onClick:function(){function i(){return f("delete_law",{delete_law:m.ref})}return i}()})],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),p=n(72253),k=n(92986),y=n(98595),S=r.ListInputModal=function(){function c(u,f){var l=(0,p.useBackend)(f),d=l.act,m=l.data,i=m.items,h=i===void 0?[]:i,V=m.message,v=V===void 0?"":V,s=m.init_value,g=m.timeout,N=m.title,x=(0,p.useLocalState)(f,"selected",h.indexOf(s)),B=x[0],L=x[1],T=(0,p.useLocalState)(f,"searchBarVisible",h.length>10),A=T[0],E=T[1],w=(0,p.useLocalState)(f,"searchQuery",""),O=w[0],M=w[1],P=function(){function ne(Y){var le=K.length-1;if(Y===k.KEY_DOWN)if(B===null||B===le){var de;L(0),(de=document.getElementById("0"))==null||de.scrollIntoView()}else{var oe;L(B+1),(oe=document.getElementById((B+1).toString()))==null||oe.scrollIntoView()}else if(Y===k.KEY_UP)if(B===null||B===0){var re;L(le),(re=document.getElementById(le.toString()))==null||re.scrollIntoView()}else{var Z;L(B-1),(Z=document.getElementById((B-1).toString()))==null||Z.scrollIntoView()}}return ne}(),F=function(){function ne(Y){Y!==B&&L(Y)}return ne}(),R=function(){function ne(){E(!1),E(!0)}return ne}(),U=function(){function ne(Y){var le=String.fromCharCode(Y),de=h.find(function(Z){return Z==null?void 0:Z.toLowerCase().startsWith(le==null?void 0:le.toLowerCase())});if(de){var oe,re=h.indexOf(de);L(re),(oe=document.getElementById(re.toString()))==null||oe.scrollIntoView()}}return ne}(),j=function(){function ne(Y){var le;Y!==O&&(M(Y),L(0),(le=document.getElementById("0"))==null||le.scrollIntoView())}return ne}(),W=function(){function ne(){E(!A),M("")}return ne}(),K=h.filter(function(ne){return ne==null?void 0:ne.toLowerCase().includes(O.toLowerCase())}),$=330+Math.ceil(v.length/3);return A||setTimeout(function(){var ne;return(ne=document.getElementById(B.toString()))==null?void 0:ne.focus()},1),(0,e.createComponentVNode)(2,y.Window,{title:N,width:325,height:$,children:[g&&(0,e.createComponentVNode)(2,a.Loader,{value:g}),(0,e.createComponentVNode)(2,y.Window.Content,{onKeyDown:function(){function ne(Y){var le=window.event?Y.which:Y.keyCode;(le===k.KEY_DOWN||le===k.KEY_UP)&&(Y.preventDefault(),P(le)),le===k.KEY_ENTER&&(Y.preventDefault(),d("submit",{entry:K[B]})),!A&&le>=k.KEY_A&&le<=k.KEY_Z&&(Y.preventDefault(),U(le)),le===k.KEY_ESCAPE&&(Y.preventDefault(),d("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 W()}return ne}()}),className:"ListInput__Section",fill:!0,title:v,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,b,{filteredItems:K,onClick:F,onFocusSearch:R,searchBarVisible:A,selected:B})}),(0,e.createComponentVNode)(2,o.Stack.Item,{m:0,children:A&&(0,e.createComponentVNode)(2,C,{filteredItems:K,onSearch:j,searchQuery:O,selected:B})}),(0,e.createComponentVNode)(2,o.Stack.Item,{mt:.5,children:(0,e.createComponentVNode)(2,t.InputButtons,{input:K[B]})})]})})})]})}return c}(),b=function(u,f){var l=(0,p.useBackend)(f),d=l.act,m=u.filteredItems,i=u.onClick,h=u.onFocusSearch,V=u.searchBarVisible,v=u.selected;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,tabIndex:0,children:m.map(function(s,g){return(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:"transparent",id:g,onClick:function(){function N(){return i(g)}return N}(),onDblClick:function(){function N(x){x.preventDefault(),d("submit",{entry:m[v]})}return N}(),onKeyDown:function(){function N(x){var B=window.event?x.which:x.keyCode;V&&B>=k.KEY_A&&B<=k.KEY_Z&&(x.preventDefault(),h())}return N}(),selected:g===v,style:{animation:"none",transition:"none"},children:s.replace(/^\w/,function(N){return N.toUpperCase()})},g)})})},C=function(u,f){var l=(0,p.useBackend)(f),d=l.act,m=u.filteredItems,i=u.onSearch,h=u.searchQuery,V=u.selected;return(0,e.createComponentVNode)(2,o.Input,{width:"100%",autoFocus:!0,autoSelect:!0,onEnter:function(){function v(s){s.preventDefault(),d("submit",{entry:m[V]})}return v}(),onInput:function(){function v(s,g){return i(g)}return v}(),placeholder:"Search...",value:h})}},26826:function(I,r,n){"use strict";r.__esModule=!0,r.Loadout=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),p=n(98595),k={Default:function(){function u(f,l){return f.gear.gear_tier-l.gear.gear_tier}return u}(),Alphabetical:function(){function u(f,l){return f.gear.name.toLowerCase().localeCompare(l.gear.name.toLowerCase())}return u}(),Cost:function(){function u(f,l){return f.gear.cost-l.gear.cost}return u}()},y=r.Loadout=function(){function u(f,l){var d=(0,t.useBackend)(l),m=d.act,i=d.data,h=(0,t.useLocalState)(l,"search",!1),V=h[0],v=h[1],s=(0,t.useLocalState)(l,"searchText",""),g=s[0],N=s[1],x=(0,t.useLocalState)(l,"category",Object.keys(i.gears)[0]),B=x[0],L=x[1],T=(0,t.useLocalState)(l,"tweakedGear",""),A=T[0],E=T[1];return(0,e.createComponentVNode)(2,p.Window,{width:975,height:650,children:[A&&(0,e.createComponentVNode)(2,c,{tweakedGear:A,setTweakedGear:E}),(0,e.createComponentVNode)(2,p.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,S,{category:B,setCategory:L})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"25%",children:(0,e.createComponentVNode)(2,C,{setTweakedGear:E})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"75%",children:(0,e.createComponentVNode)(2,b,{category:B,search:V,setSearch:v,searchText:g,setSearchText:N})})]})})]})})]})}return u}(),S=function(f,l){var d=(0,t.useBackend)(l),m=d.act,i=d.data,h=f.category,V=f.setCategory;return(0,e.createComponentVNode)(2,o.Tabs,{fluid:!0,textAlign:"center",style:{"flex-wrap":"wrap-reverse"},children:Object.keys(i.gears).map(function(v){return(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:v===h,style:{"white-space":"nowrap"},onClick:function(){function s(){return V(v)}return s}(),children:v},v)})})},b=function(f,l){var d=(0,t.useBackend)(l),m=d.act,i=d.data,h=i.user_tier,V=i.gear_slots,v=i.max_gear_slots,s=f.category,g=f.search,N=f.setSearch,x=f.searchText,B=f.setSearchText,L=(0,t.useLocalState)(l,"sortType","Default"),T=L[0],A=L[1],E=(0,t.useLocalState)(l,"sortReverse",!1),w=E[0],O=E[1],M=(0,a.createSearch)(x,function(F){return F.name}),P;return x.length>2?P=Object.entries(i.gears).reduce(function(F,R){var U=R[0],j=R[1];return F.concat(Object.entries(j).map(function(W){var K=W[0],$=W[1];return{key:K,gear:$}}))},[]).filter(function(F){var R=F.gear;return M(R)}):P=Object.entries(i.gears[s]).map(function(F){var R=F[0],U=F[1];return{key:R,gear:U}}),P.sort(k[T]),w&&(P=P.reverse()),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:s,buttons:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Dropdown,{height:1.66,selected:T,options:Object.keys(k),onSelected:function(){function F(R){return A(R)}return F}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:w?"arrow-down-wide-short":"arrow-down-short-wide",tooltip:w?"Ascending order":"Descending order",tooltipPosition:"bottom-end",onClick:function(){function F(){return O(!w)}return F}()})}),g&&(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Input,{width:20,placeholder:"Search...",value:x,onInput:function(){function F(R){return B(R.target.value)}return F}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:"magnifying-glass",selected:g,tooltip:"Toggle search field",tooltipPosition:"bottom-end",onClick:function(){function F(){N(!g),B("")}return F}()})})]}),children:P.map(function(F){var R=F.key,U=F.gear,j=12,W=Object.keys(i.selected_gears).includes(R),K=(U.cost===1,U.cost+" Points"),$=(0,e.createComponentVNode)(2,o.Box,{children:[U.name.length>j&&(0,e.createComponentVNode)(2,o.Box,{children:U.name}),U.gear_tier>h&&(0,e.createComponentVNode)(2,o.Box,{mt:U.name.length>j&&1.5,textColor:"red",children:"That gear is only available at a higher donation tier than you are on."})]}),ne=(0,e.createFragment)([U.allowed_roles&&(0,e.createComponentVNode)(2,o.Button,{width:"22px",color:"transparent",icon:"user",tooltip:(0,e.createComponentVNode)(2,o.Section,{m:-1,title:"Allowed Roles",children:U.allowed_roles.map(function(le){return(0,e.createComponentVNode)(2,o.Box,{children:le},le)})}),tooltipPosition:"left"}),Object.entries(U.tweaks).map(function(le){var de=le[0],oe=le[1];return oe.map(function(re){return(0,e.createComponentVNode)(2,o.Button,{width:"22px",color:"transparent",icon:re.icon,tooltip:re.tooltip,tooltipPosition:"top"},de)})}),(0,e.createComponentVNode)(2,o.Button,{width:"22px",color:"transparent",icon:"info",tooltip:U.desc,tooltipPosition:"top"})],0),Y=(0,e.createComponentVNode)(2,o.Box,{class:"Loadout-InfoBox",children:[(0,e.createComponentVNode)(2,o.Box,{style:{"flex-grow":1},fontSize:1,color:"gold",opacity:.75,children:U.gear_tier>0&&"Tier "+U.gear_tier}),(0,e.createComponentVNode)(2,o.Box,{fontSize:.75,opacity:.66,children:K})]});return(0,e.createComponentVNode)(2,o.ImageButtonTS,{m:.5,imageSize:84,dmIcon:U.icon,dmIconState:U.icon_state,tooltip:(U.name.length>j||U.gear_tier>0)&&$,tooltipPosition:"bottom",selected:W,disabled:U.gear_tier>h||V+U.cost>v&&!W,buttons:ne,buttonsAlt:Y,onClick:function(){function le(){return m("toggle_gear",{gear:U.index_name})}return le}(),children:U.name},R)})})},C=function(f,l){var d=(0,t.useBackend)(l),m=d.act,i=d.data,h=f.setTweakedGear,V=Object.entries(i.gears).reduce(function(v,s){var g=s[0],N=s[1],x=Object.entries(N).filter(function(B){var L=B[0];return Object.keys(i.selected_gears).includes(L)}).map(function(B){var L=B[0],T=B[1];return Object.assign({key:L},T)});return v.concat(x)},[]);return(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.Section,{fill:!0,scrollable:!0,title:"Selected Equipment",buttons:(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",tooltip:"Clear Loadout",tooltipPosition:"bottom-end",onClick:function(){function v(){return m("clear_loadout")}return v}()}),children:V.map(function(v){var s=i.selected_gears[v.key];return(0,e.createComponentVNode)(2,o.ImageButtonTS,{fluid:!0,imageSize:48,base64:s.icon,dmIcon:s.icon_file?s.icon_file:v.icon,dmIconState:s.icon_state?s.icon_state:v.icon_state,buttons:(0,e.createFragment)([Object.entries(v.tweaks).length>0&&(0,e.createComponentVNode)(2,o.Button,{color:"translucent",icon:"gears",iconColor:"gray",width:"33px",onClick:function(){function g(){return h(v)}return g}()}),(0,e.createComponentVNode)(2,o.Button,{color:"translucent",icon:"times",iconColor:"red",width:"32px",onClick:function(){function g(){return m("toggle_gear",{gear:v.index_name})}return g}()})],0),children:s.name?s.name:v.name},v.key)})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.ProgressBar,{value:i.gear_slots,maxValue:i.max_gear_slots,ranges:{bad:[i.max_gear_slots,1/0],average:[i.max_gear_slots*.66,i.max_gear_slots],good:[0,i.max_gear_slots*.66]},children:(0,e.createComponentVNode)(2,o.Box,{textAlign:"center",children:["Used points ",i.gear_slots,"/",i.max_gear_slots]})})})})]})},c=function(f,l){var d=(0,t.useBackend)(l),m=d.act,i=d.data,h=f.tweakedGear,V=f.setTweakedGear;return(0,e.createComponentVNode)(2,o.Dimmer,{children:(0,e.createComponentVNode)(2,o.Box,{className:"Loadout-Modal__background",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,width:20,height:20,title:h.name,buttons:(0,e.createComponentVNode)(2,o.Button,{color:"red",icon:"times",tooltip:"Close",tooltipPosition:"top",onClick:function(){function v(){return V("")}return v}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:Object.entries(h.tweaks).map(function(v){var s=v[0],g=v[1];return g.map(function(N){var x=i.selected_gears[h.key][s];return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:N.name,color:x?"":"gray",buttons:(0,e.createComponentVNode)(2,o.Button,{color:"transparent",icon:"pen",onClick:function(){function B(){return m("set_tweak",{gear:h.index_name,tweak:s})}return B}()}),children:[x||"Default",(0,e.createComponentVNode)(2,o.Box,{inline:!0,ml:1,width:1,height:1,verticalAlign:"middle",style:{"background-color":""+x}})]},s)})})})})})})}},88832:function(I,r,n){"use strict";r.__esModule=!0,r.MatrixMathTester=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(44879),p=n(98595),k=function(b,C){var c=(0,a.useBackend)(C),u=c.act;return(0,e.createComponentVNode)(2,t.NumberInput,{value:b.value,step:.005,format:function(){function f(l){return(0,o.toFixed)(l,3)}return f}(),width:"100%",onChange:function(){function f(l,d){return u("change_var",{var_name:b.varName,var_value:d})}return f}()})},y=r.MatrixMathTester=function(){function S(b,C){var c=(0,a.useBackend)(C),u=c.act,f=c.data,l=f.matrix_a,d=f.matrix_b,m=f.matrix_c,i=f.matrix_d,h=f.matrix_e,V=f.matrix_f,v=f.pixelated,s=(0,a.useLocalState)(C,"scale_x",1),g=s[0],N=s[1],x=(0,a.useLocalState)(C,"scale_y",1),B=x[0],L=x[1],T=(0,a.useLocalState)(C,"translate_x",0),A=T[0],E=T[1],w=(0,a.useLocalState)(C,"translate_y",0),O=w[0],M=w[1],P=(0,a.useLocalState)(C,"shear_x",0),F=P[0],R=P[1],U=(0,a.useLocalState)(C,"shear_y",0),j=U[0],W=U[1],K=(0,a.useLocalState)(C,"angle",0),$=K[0],ne=K[1];return(0,e.createComponentVNode)(2,p.Window,{title:"Transform Editor",width:290,height:270,children:(0,e.createComponentVNode)(2,p.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,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:"30%"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"25%",children:"X"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"25%",children:"Y"})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Position(c, f)"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,k,{value:m,varName:"c"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,k,{value:V,varName:"f"})})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Incline(b, d)"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,k,{value:d,varName:"b"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,k,{value:i,varName:"d"})})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Scale(a,e)"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,k,{value:l,varName:"a"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,k,{value:h,varName:"e"})})]})]}),(0,e.createComponentVNode)(2,t.Table,{mt:3,children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Action"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"X"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Y"})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"up-right-and-down-left-from-center",content:"Scale",width:"100%",onClick:function(){function Y(){return u("scale",{x:g,y:B})}return Y}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.NumberInput,{value:g,step:.05,format:function(){function Y(le){return(0,o.toFixed)(le,2)}return Y}(),width:"100%",onChange:function(){function Y(le,de){return N(de)}return Y}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.NumberInput,{value:B,step:.05,format:function(){function Y(le){return(0,o.toFixed)(le,2)}return Y}(),width:"100%",onChange:function(){function Y(le,de){return L(de)}return Y}()})})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-right",content:"Translate",width:"100%",onClick:function(){function Y(){return u("translate",{x:A,y:O})}return Y}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.NumberInput,{value:A,step:1,format:function(){function Y(le){return(0,o.toFixed)(le,0)}return Y}(),width:"100%",onChange:function(){function Y(le,de){return E(de)}return Y}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.NumberInput,{value:O,step:1,format:function(){function Y(le){return(0,o.toFixed)(le,0)}return Y}(),width:"100%",onChange:function(){function Y(le,de){return M(de)}return Y}()})})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"maximize",content:"Shear",width:"100%",onClick:function(){function Y(){return u("shear",{x:F,y:j})}return Y}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.NumberInput,{value:F,step:.005,format:function(){function Y(le){return(0,o.toFixed)(le,3)}return Y}(),width:"100%",onChange:function(){function Y(le,de){return R(de)}return Y}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.NumberInput,{value:j,step:.005,format:function(){function Y(le){return(0,o.toFixed)(le,3)}return Y}(),width:"100%",onChange:function(){function Y(le,de){return W(de)}return Y}()})})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"rotate-right",content:"Rotate",width:"100%",onClick:function(){function Y(){return u("turn",{angle:$})}return Y}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.NumberInput,{value:$,step:.5,maxValue:360,minValue:-360,format:function(){function Y(le){return(0,o.toFixed)(le,1)}return Y}(),width:"100%",onChange:function(){function Y(le,de){return ne(de)}return Y}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"dog",color:"bad",selected:v,content:"PET",tooltip:"Pixel Enhanced Transforming",tooltipPosition:"bottom",width:"100%",onClick:function(){function Y(){return u("toggle_pixel")}return Y}()})})]})]})]})})})}return S}()},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),p=r.MechBayConsole=function(){function k(y,S){var b=(0,a.useBackend)(S),C=b.act,c=b.data,u=c.recharge_port,f=u&&u.mech,l=f&&f.cell,d=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:d?"Mech status: "+d:"Mech status",textAlign:"center",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Sync",onClick:function(){function m(){return C("reconnect")}return m}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:!u&&(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:!u&&(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."})||!l&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No cell is installed."})||(0,e.createComponentVNode)(2,t.ProgressBar,{value:l.charge/l.maxcharge,ranges:{good:[.7,1/0],average:[.3,.7],bad:[-1/0,.3]},children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:l.charge})," / "+l.maxcharge]})})]})})})})}return k}()},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),p=n(98595),k=n(25328),y=r.MechaControlConsole=function(){function S(b,C){var c=(0,t.useBackend)(C),u=c.act,f=c.data,l=f.beacons,d=f.stored_data;return d.length?(0,e.createComponentVNode)(2,p.Window,{width:420,height:500,children:(0,e.createComponentVNode)(2,p.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 u("clear_log")}return m}()}),children:d.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,k.decodeHtmlEntities)(m.message)})]},m.time)})})})}):(0,e.createComponentVNode)(2,p.Window,{width:420,height:500,children:(0,e.createComponentVNode)(2,p.Window.Content,{scrollable:!0,children:l.length&&l.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 i(){return u("send_message",{mt:m.uid})}return i}(),children:"Message"}),(0,e.createComponentVNode)(2,o.Button,{icon:"eye",onClick:function(){function i(){return u("get_log",{mt:m.uid})}return i}(),children:"View Log"}),(0,e.createComponentVNode)(2,o.Button.Confirm,{color:"red",content:"EMP",icon:"bomb",onClick:function(){function i(){return u("shock",{mt:m.uid})}return i}()})],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,k.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 S}()},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),p=n(3939),k=n(98595),y=n(321),S=n(5485),b=n(22091),C={Minor:"lightgray",Medium:"good",Harmful:"average","Dangerous!":"bad","BIOHAZARD THREAT!":"darkred"},c={"*Deceased*":"deceased","*SSD*":"ssd","Physically Unfit":"physically_unfit",Disabled:"disabled"},u=function(T,A){(0,p.modalOpen)(T,"edit",{field:A.edit,value:A.value})},f=function(T,A){var E=T.args;return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:E.name||"\u0412\u0438\u0440\u0443\u0441",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:"\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0441\u0442\u0430\u0434\u0438\u0439",children:E.max_stages}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0420\u0430\u0441\u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0435\u043D\u0438\u0435",children:E.spread_text}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0412\u043E\u0437\u043C\u043E\u0436\u043D\u044B\u0435 \u043C\u0435\u0442\u043E\u0434\u044B \u043B\u0435\u0447\u0435\u043D\u0438\u044F",children:E.cure}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0417\u0430\u043C\u0435\u0442\u043A\u0438",children:E.desc}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0422\u044F\u0436\u0435\u0441\u0442\u044C",color:C[E.severity],children:E.severity})]})})})},l=r.MedicalRecords=function(){function L(T,A){var E=(0,t.useBackend)(A),w=E.data,O=w.loginState,M=w.screen;if(!O.logged_in)return(0,e.createComponentVNode)(2,k.Window,{width:800,height:900,children:(0,e.createComponentVNode)(2,k.Window.Content,{children:(0,e.createComponentVNode)(2,S.LoginScreen)})});var P;return M===2?P=(0,e.createComponentVNode)(2,d):M===3?P=(0,e.createComponentVNode)(2,m):M===4?P=(0,e.createComponentVNode)(2,i):M===5?P=(0,e.createComponentVNode)(2,s):M===6&&(P=(0,e.createComponentVNode)(2,g)),(0,e.createComponentVNode)(2,k.Window,{width:800,height:900,children:[(0,e.createComponentVNode)(2,p.ComplexModal),(0,e.createComponentVNode)(2,k.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y.LoginInfo),(0,e.createComponentVNode)(2,b.TemporaryNotice),(0,e.createComponentVNode)(2,B),P]})})]})}return L}(),d=function(T,A){var E=(0,t.useBackend)(A),w=E.act,O=E.data,M=O.records,P=(0,t.useLocalState)(A,"searchText",""),F=P[0],R=P[1],U=(0,t.useLocalState)(A,"sortId","name"),j=U[0],W=U[1],K=(0,t.useLocalState)(A,"sortOrder",!0),$=K[0],ne=K[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:"\u041C\u0435\u0434\u0438\u0446\u0438\u043D\u0441\u043A\u0438\u0435 \u0437\u0430\u043F\u0438\u0441\u0438",icon:"wrench",ml:"0.25rem",onClick:function(){function Y(){return w("screen",{screen:3})}return Y}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{fluid:!0,placeholder:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0418\u043C\u044F, ID, \u0424\u0438\u0437\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u0438\u043B\u0438 \u041F\u0441\u0438\u0445\u043E\u043B\u043E\u0433\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435",onInput:function(){function Y(le,de){return R(de)}return Y}()})})]})}),(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:"\u0418\u043C\u044F"}),(0,e.createComponentVNode)(2,N,{id:"id",children:"ID"}),(0,e.createComponentVNode)(2,N,{id:"rank",children:"\u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C"}),(0,e.createComponentVNode)(2,N,{id:"p_stat",children:"\u0424\u0438\u0437\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435"}),(0,e.createComponentVNode)(2,N,{id:"m_stat",children:"\u041F\u0441\u0438\u0445\u043E\u043B\u043E\u0433\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435"})]}),M.filter((0,a.createSearch)(F,function(Y){return Y.name+"|"+Y.id+"|"+Y.rank+"|"+Y.p_stat+"|"+Y.m_stat})).sort(function(Y,le){var de=$?1:-1;return Y[j].localeCompare(le[j])*de}).map(function(Y){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listRow--"+c[Y.p_stat],onClick:function(){function le(){return w("view_record",{view_record:Y.ref})}return le}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",Y.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Y.id}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Y.rank}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Y.p_stat}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Y.m_stat})]},Y.id)})]})})})],4)},m=function(T,A){var E=(0,t.useBackend)(A),w=E.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:"\u0420\u0435\u0437\u0435\u0440\u0432\u043D\u043E\u0435 \u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 \u043D\u0430 \u0434\u0438\u0441\u043A\u0435\u0442\u0443",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:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0441 \u0434\u0438\u0441\u043A\u0435\u0442\u044B",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:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0431\u0430\u0437\u0443 \u0434\u0430\u043D\u043D\u044B\u0445 \u043C\u0435\u0434\u0438\u0446\u0438\u043D\u0441\u043A\u0438\u0445 \u0437\u0430\u043F\u0438\u0441\u0435\u0439",onClick:function(){function O(){return w("del_all")}return O}()})})]})})},i=function(T,A){var E=(0,t.useBackend)(A),w=E.act,O=E.data,M=O.medical,P=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:"\u041E\u0441\u043D\u043E\u0432\u043D\u0430\u044F \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:P?"spinner":"print",disabled:P,iconSpin:!!P,content:"\u0420\u0430\u0441\u043F\u0435\u0447\u0430\u0442\u0430\u0442\u044C \u0437\u0430\u043F\u0438\u0441\u044C",ml:"0.5rem",onClick:function(){function F(){return w("print_record")}return F}()}),children:(0,e.createComponentVNode)(2,h)})}),!M||!M.fields?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"\u041C\u0435\u0434\u0438\u0446\u0438\u043D\u0441\u043A\u0430\u044F \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"pen",content:"\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u043D\u043E\u0432\u0443\u044E \u0437\u0430\u043F\u0438\u0441\u044C",onClick:function(){function F(){return w("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"),"\u041C\u0435\u0434\u0438\u0446\u0438\u043D\u0441\u043A\u0430\u044F \u0437\u0430\u043F\u0438\u0441\u044C \u0443\u0442\u0440\u0430\u0447\u0435\u043D\u0430!"]})})})}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"\u041C\u0435\u0434\u0438\u0446\u0438\u043D\u0441\u043A\u0430\u044F \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F",buttons:(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",disabled:!!M.empty,content:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u043C\u0435\u0434\u0438\u0446\u0438\u043D\u0441\u043A\u0443\u044E \u0437\u0430\u043F\u0438\u0441\u044C",onClick:function(){function F(){return w("del_r")}return F}()}),children:(0,e.createComponentVNode)(2,V)})}),(0,e.createComponentVNode)(2,v)],4)],0)},h=function(T,A){var E=(0,t.useBackend)(A),w=E.data,O=w.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(M,P){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:M.field,children:[(0,e.createComponentVNode)(2,o.Box,{height:"20px",inline:!0,children:M.value}),!!M.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",onClick:function(){function F(){return u(A,M)}return F}()})]},P)})})}),!!O.has_photos&&O.photos.map(function(M,P){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:M,style:{width:"96px","margin-top":"2.5rem","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}}),(0,e.createVNode)(1,"br"),"\u0424\u043E\u0442\u043E \u2116",P+1]},P)})]})},V=function(T,A){var E=(0,t.useBackend)(A),w=E.act,O=E.data,M=O.medical;return!M||!M.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:"\u041C\u0435\u0434\u0438\u0446\u0438\u043D\u0441\u043A\u0430\u044F \u0437\u0430\u043F\u0438\u0441\u044C \u0443\u0442\u0440\u0430\u0447\u0435\u043D\u0430!"})})}):(0,e.createComponentVNode)(2,o.Stack,{children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:M.fields.map(function(P,F){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:P.field,preserveWhitespace:!0,children:[(0,a.decodeHtmlEntities)(P.value),!!P.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",mb:P.line_break?"1rem":"initial",onClick:function(){function R(){return u(A,P)}return R}()})]},F)})})})})},v=function(T,A){var E=(0,t.useBackend)(A),w=E.act,O=E.data,M=O.medical;return(0,e.createComponentVNode)(2,o.Stack.Item,{height:"150px",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0438",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"comment",content:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439",onClick:function(){function P(){return(0,p.modalOpen)(A,"add_comment")}return P}()}),children:M.comments.length===0?(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0438 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442."}):M.comments.map(function(P,F){return(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{color:"label",inline:!0,children:P.header}),(0,e.createVNode)(1,"br"),P.text,(0,e.createComponentVNode)(2,o.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){function R(){return w("del_c",{del_c:F+1})}return R}()})]},F)})})})},s=function(T,A){var E=(0,t.useBackend)(A),w=E.act,O=E.data,M=O.virus,P=(0,t.useLocalState)(A,"searchText",""),F=P[0],R=P[1],U=(0,t.useLocalState)(A,"sortId2","name"),j=U[0],W=U[1],K=(0,t.useLocalState)(A,"sortOrder2",!0),$=K[0],ne=K[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:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435, \u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0421\u0442\u0430\u0434\u0438\u0439 \u0438\u043B\u0438 \u0422\u044F\u0436\u0435\u0441\u0442\u044C",onInput:function(){function Y(le,de){return R(de)}return Y}()})}),(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:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435"}),(0,e.createComponentVNode)(2,x,{id:"max_stages",children:"\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0441\u0442\u0430\u0434\u0438\u0439"}),(0,e.createComponentVNode)(2,x,{id:"severity",children:"\u0422\u044F\u0436\u0435\u0441\u0442\u044C"})]}),M.filter((0,a.createSearch)(F,function(Y){return Y.name+"|"+Y.max_stages+"|"+Y.severity})).sort(function(Y,le){var de=$?1:-1;return Y[j].localeCompare(le[j])*de}).map(function(Y){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listVirus--"+Y.severity,onClick:function(){function le(){return w("vir",{vir:Y.D})}return le}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"virus"})," ",Y.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Y.max_stages}),(0,e.createComponentVNode)(2,o.Table.Cell,{color:C[Y.severity],children:Y.severity})]},Y.id)})]})})})})],4)},g=function(T,A){var E=(0,t.useBackend)(A),w=E.act,O=E.data,M=O.medbots;return M.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"),"\u041C\u0435\u0434\u0431\u043E\u0442\u044B \u043D\u0435 \u043E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u044B."]})})})}):(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:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"\u041B\u043E\u043A\u0430\u0446\u0438\u044F"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"\u0421\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"\u0425\u0438\u043C\u0438\u043A\u0430\u0442\u044B"})]}),M.map(function(P){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listMedbot--"+P.on,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"medical"})," ",P.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:[P.area||"\u041D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u043E"," (",P.x,", ",P.y,")"]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:P.on?(0,e.createComponentVNode)(2,o.Box,{color:"good",children:"\u0412\u043A\u043B\u044E\u0447\u0451\u043D"}):(0,e.createComponentVNode)(2,o.Box,{color:"average",children:"\u0412\u044B\u043A\u043B\u044E\u0447\u0435\u043D"})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:P.use_beaker?"\u0401\u043C\u043A\u043E\u0441\u0442\u044C: "+P.total_volume+"/"+P.maximum_volume:"\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0438\u0439 \u0441\u0438\u043D\u0442\u0435\u0437\u0430\u0442\u043E\u0440"})]},P.id)})]})})})},N=function(T,A){var E=(0,t.useLocalState)(A,"sortId","name"),w=E[0],O=E[1],M=(0,t.useLocalState)(A,"sortOrder",!0),P=M[0],F=M[1],R=T.id,U=T.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:w!==R&&"transparent",onClick:function(){function j(){w===R?F(!P):(O(R),F(!0))}return j}(),children:[U,w===R&&(0,e.createComponentVNode)(2,o.Icon,{name:P?"sort-up":"sort-down",ml:"0.25rem;"})]})})},x=function(T,A){var E=(0,t.useLocalState)(A,"sortId2","name"),w=E[0],O=E[1],M=(0,t.useLocalState)(A,"sortOrder2",!0),P=M[0],F=M[1],R=T.id,U=T.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:w!==R&&"transparent",onClick:function(){function j(){w===R?F(!P):(O(R),F(!0))}return j}(),children:[U,w===R&&(0,e.createComponentVNode)(2,o.Icon,{name:P?"sort-up":"sort-down",ml:"0.25rem;"})]})})},B=function(T,A){var E=(0,t.useBackend)(A),w=E.act,O=E.data,M=O.screen,P=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:M===2,onClick:function(){function F(){w("screen",{screen:2})}return F}(),children:"\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u0437\u0430\u043F\u0438\u0441\u0435\u0439"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"database",selected:M===5,onClick:function(){function F(){w("screen",{screen:5})}return F}(),children:"\u0411\u0430\u0437\u0430 \u0434\u0430\u043D\u043D\u044B\u0445 \u0432\u0438\u0440\u0443\u0441\u043E\u0432"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"plus-square",selected:M===6,onClick:function(){function F(){return w("screen",{screen:6})}return F}(),children:"\u041E\u0442\u0441\u043B\u0435\u0436\u0438\u0432\u0430\u043D\u0438\u0435 \u043C\u0435\u0434\u0431\u043E\u0442\u043E\u0432"}),M===3&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"wrench",selected:M===3,children:"\u041E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u0435 \u0431\u0430\u0437\u044B \u0434\u0430\u043D\u043D\u044B\u0445 \u0437\u0430\u043F\u0438\u0441\u0435\u0439"}),M===4&&P&&!P.empty&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"file",selected:M===4,children:["\u0417\u0430\u043F\u0438\u0441\u044C: ",P.fields[0].value]})]})})};(0,p.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),p=r.Mimicking=function(){function k(y,S){var b=(0,a.useBackend)(S),C=b.act,c=b.data,u=c.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:[u.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 l(){return C("Choose",{id:f.id})}return l}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Delete",color:"bad",onClick:function(){function l(){return C("Delete",{id:f.id})}return l}()})],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 C("Add")}return f}()})]})})})})}return k}()},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),p=r.Minesweeper=function(){function k(y,S){var b=(0,a.useBackend)(S),C=b.act,c=b.data,u=c.matrix,f=c.showMessage,l=c.tokens,d=c.uiWidth,m={1:"blue",2:"green",3:"red",4:"darkblue",5:"brown",6:"lightblue",7:"black",8:"white"};document.addEventListener("contextmenu",function(g){return g.preventDefault()});var i=function(){function g(N,x,B){N.button!==0&&N.button!==2||C("Square",{X:x,Y:B,mode:N.button===2?s[V]:V})}return g}(),h=(0,a.useLocalState)(S,"mode","bomb"),V=h[0],v=h[1],s={flag:"bomb",bomb:"flag"};return(0,e.createComponentVNode)(2,o.Window,{theme:"ntOS95",width:d+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:V==="bomb",onClick:function(){function g(){return v("bomb")}return g}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"flag",iconColor:"red",selected:V==="flag",onClick:function(){function g(){return v("flag")}return g}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",onClick:function(){function g(){return C("Mode",{mode:"16x30"})}return g}()})],4),children:[(0,e.createVNode)(1,"p"),Object.keys(u).map(function(g){return(0,e.createComponentVNode)(2,t.Box,{children:Object.keys(u[g]).map(function(N){return(0,e.createComponentVNode)(2,t.Button,{m:"1px",height:"30px",width:"30px",className:u[g][N].open?"Minesweeper__open":"Minesweeper__closed",bold:!0,color:"transparent",icon:u[g][N].open?u[g][N].bomb?"bomb":"":u[g][N].flag?"flag":"",textColor:u[g][N].open?u[g][N].bomb?"black":m[u[g][N].around]:u[g][N].flag?"red":"gray",onMouseDown:function(){function x(B){return i(B,g,N)}return x}(),children:u[g][N].open&&!u[g][N].bomb&&u[g][N].around?u[g][N].around:" "},N)})},g)}),(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: ",l,(0,e.createVNode)(1,"br"),f]})]})})})})}return k}()},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),p=r.MiniGamesMenu=function(){function k(y,S){var b=(0,a.useBackend)(S),C=b.act,c=b.data,u=c.spawners||[],f=c.thunderdome_eligible,l=c.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 d(){return C("toggle_minigames")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"power-off",tooltip:l?"\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:l?"\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:l?"good":"bad",onClick:function(){function d(){return C("toggle_notifications")}return d}()}),(0,e.createComponentVNode)(2,t.Section,{children:u.map(function(d){return(0,e.createComponentVNode)(2,t.Section,{mb:.5,title:d.name,level:2,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-circle-right",content:"Jump",onClick:function(){function m(){return C("jump",{ID:d.uids})}return m}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-circle-right",content:"Start",onClick:function(){function m(){return C("spawn",{ID:d.uids})}return m}()})],4),children:[(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},mb:1,fontSize:"16px",children:d.desc}),!!d.fluff&&(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},textColor:"#878787",fontSize:"14px",children:d.fluff}),!!d.important_info&&(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},mt:1,bold:!0,color:"red",fontSize:"18px",children:d.important_info})]},d.name)})})]})})}return k}()},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),p=n(98595),k=["title","items"];function y(l,d){if(l==null)return{};var m={};for(var i in l)if({}.hasOwnProperty.call(l,i)){if(d.includes(i))continue;m[i]=l[i]}return m}var S={Alphabetical:function(){function l(d,m){return d-m}return l}(),Availability:function(){function l(d,m){return-(d.affordable-m.affordable)}return l}(),Price:function(){function l(d,m){return d.price-m.price}return l}()},b=r.MiningVendor=function(){function l(d,m){return(0,e.createComponentVNode)(2,p.Window,{width:400,height:450,children:(0,e.createComponentVNode)(2,p.Window.Content,{className:"Layout__content--flexColumn",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,C),(0,e.createComponentVNode)(2,u),(0,e.createComponentVNode)(2,c)]})})})}return l}(),C=function(d,m){var i=(0,t.useBackend)(m),h=i.act,V=i.data,v=V.has_id,s=V.id;return(0,e.createComponentVNode)(2,o.NoticeBox,{success:v,children:v?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{inline:!0,verticalAlign:"middle",style:{float:"left"},children:["Logged in as ",s.name,".",(0,e.createVNode)(1,"br"),"You have ",s.points.toLocaleString("en-US")," points."]}),(0,e.createComponentVNode)(2,o.Button,{icon:"eject",content:"Eject ID",style:{float:"right"},onClick:function(){function g(){return h("logoff")}return g}()}),(0,e.createComponentVNode)(2,o.Box,{style:{clear:"both"}})],4):"Please insert an ID in order to make purchases."})},c=function(d,m){var i=(0,t.useBackend)(m),h=i.act,V=i.data,v=V.has_id,s=V.id,g=V.items,N=(0,t.useLocalState)(m,"search",""),x=N[0],B=N[1],L=(0,t.useLocalState)(m,"sort","Alphabetical"),T=L[0],A=L[1],E=(0,t.useLocalState)(m,"descending",!1),w=E[0],O=E[1],M=(0,a.createSearch)(x,function(R){return R[0]}),P=!1,F=Object.entries(g).map(function(R,U){var j=Object.entries(R[1]).filter(M).map(function(W){return W[1].affordable=v&&s.points>=W[1].price,W[1]}).sort(S[T]);if(j.length!==0)return w&&(j=j.reverse()),P=!0,(0,e.createComponentVNode)(2,f,{title:R[0],items:j},R[0])});return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:P?F:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No items matching your criteria was found!"})})})},u=function(d,m){var i=(0,t.useLocalState)(m,"search",""),h=i[0],V=i[1],v=(0,t.useLocalState)(m,"sort",""),s=v[0],g=v[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(T,A){return V(A)}return L}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"30%",children:(0,e.createComponentVNode)(2,o.Dropdown,{selected:"Alphabetical",options:Object.keys(S),width:"100%",onSelected:function(){function L(T){return g(T)}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(d,m){var i=(0,t.useBackend)(m),h=i.act,V=i.data,v=d.title,s=d.items,g=y(d,k);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Collapsible,Object.assign({open:!0,title:v},g,{children:s.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:!V.has_id||V.id.points"})}),!!O&&(0,e.createComponentVNode)(2,d,{mt:1.1,label:"ID tag",compactLabel:!0,wrapContent:F?(0,e.createComponentVNode)(2,f,{text:P,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}(),c=function(B,L){var T=B.iconName,A=B.machineName,E=B.noMachine,w=B.noMachineText,O=B.noMachineElem,M="Unknown machine",P=E?w:A||"Unknown machine",F=P===w,R=P===w||P===M;return E&&O?O:(0,e.createComponentVNode)(2,o.Flex,{mt:.1,mb:1.9,children:[!E&&(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:T})}),(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:R,children:P})})]})},u=function(B,L){var T=B.text;return(0,e.createComponentVNode)(2,o.Box,{as:"span",fontSize:"0.9rem",color:"yellow",italic:!0,nowrap:!0,children:T})},f=function(B,L){var T=B.text,A=B.defaultText,E=b(B,k);return T?(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({as:"span",wordWrap:"break-word"},E,{children:T}))):(0,e.createComponentVNode)(2,u,{text:A})},l=function(B,L){var T=B.noConfirm,A=T===void 0?!1:T,E=b(B,y);return A?(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Button,Object.assign({},E))):(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Button.Confirm,Object.assign({},E)))},d=function(B,L){var T=B.label,A=B.wrapContent,E=B.noWrapContent,w=B.compactLabel,O=w===void 0?!1:w,M=b(B,S);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Flex,Object.assign({my:.5,mr:"0.5%",spacing:1,align:"center"},M,{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:T}),(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:E})]})))},m=function(B,L){var T=(0,t.useBackend)(L),A=T.act,E=T.data;return(0,e.createComponentVNode)(2,o.Box,{mt:1.5,fontSize:"0.9rem",color:"silver",italic:!0,children:"No options"})},i=function(B,L){var T=(0,t.useBackend)(L),A=T.act,E=T.data;return(0,e.createComponentVNode)(2,o.Box,{fontSize:"1.1rem",color:"red",bold:!0,italic:!0,children:"ACCESS DENIED"})},h=function(B,L){var T=(0,t.useBackend)(L),A=T.act,E=T.data,w=E.attachedTag;return(0,e.createComponentVNode)(2,d,{label:"ID tag",wrapContent:(0,e.createComponentVNode)(2,f,{text:w,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:!w,onClick:function(){function O(){return A("clear_tag")}return O}()})],4)})},V=function(B,L){var T=(0,t.useBackend)(L),A=T.act,E=T.data,w=E.frequency,O=E.minFrequency,M=E.maxFrequency,P=E.canReset;return(0,e.createComponentVNode)(2,d,{label:"Frequency",noWrapContent:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,unit:"kHz",step:.1,stepPixelSize:10,minValue:O/10,maxValue:M/10,value:w/10,format:function(){function F(R){return(0,a.toFixed)(R,1)}return F}(),onChange:function(){function F(R,U){return A("set_frequency",{frequency:U*10})}return F}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"undo",content:"",disabled:!P,tooltip:"Reset",onClick:function(){function F(){return A("reset_frequency")}return F}()})],4)})},v=function(B,L){var T=(0,t.useBackend)(L),A=T.act,E=T.data,w=E.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:w.map(function(O,M){return(0,e.createComponentVNode)(2,d,{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 P(){return A("remove_tag",{tag_index:M})}return P}()})})})},M)})})},s=function(B,L){var T=(0,t.useBackend)(L),A=T.act,E=T.data,w=E.bolts,O=E.pressureCheck,M=E.temperatureCheck,P=E.oxygenCheck,F=E.toxinsCheck,R=E.nitrogenCheck,U=E.carbonDioxideCheck,j=[{bitflag:1,checked:O,label:"Monitor pressure"},{bitflag:2,checked:M,label:"Monitor temperature"},{bitflag:4,checked:P,label:"Monitor oxygen concentration"},{bitflag:8,checked:F,label:"Monitor plasma concentration"},{bitflag:16,checked:R,label:"Monitor nitrogen concentration"},{bitflag:32,checked:U,label:"Monitor carbon dioxide concentration"}];return(0,e.createFragment)([(0,e.createComponentVNode)(2,d,{label:"Floor bolts",noWrapContent:(0,e.createComponentVNode)(2,o.Button,{icon:w?"check":"times",selected:w,content:w?"YES":"NO",onClick:function(){function W(){return A("toggle_bolts")}return W}()})}),j.map(function(W){return(0,e.createComponentVNode)(2,d,{label:W.label,noWrapContent:(0,e.createComponentVNode)(2,o.Button.Checkbox,{checked:W.checked,onClick:function(){function K(){return A("toggle_flag",{bitflag:W.bitflag})}return K}()})},W.bitflag)})],0)},g=function(B,L){var T=(0,t.useBackend)(L),A=T.act,E=T.data,w=E.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,d,{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(w).map(function(O){return(0,e.createComponentVNode)(2,d,{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}),w[O]?(0,e.createComponentVNode)(2,o.Flex.Item,{grow:1,shrink:1,basis:0,color:"silver",wordWrap:"break-word",children:w[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 M(){return A("change_label",{sensor_tag:O})}return M}()}),(0,e.createComponentVNode)(2,o.Button,{content:"Label",icon:"times-circle",color:"orange",disabled:!w[O],onClick:function(){function M(){return A("clear_label",{sensor_tag:O})}return M}()})]}),(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 M(){return A("del_sensor",{sensor_tag:O})}return M}()})})]})},O)})]})},N=function(B,L){var T=(0,t.useBackend)(L),A=T.act,E=T.data,w=E.inputTag,O=E.outputTag,M=E.bufferTag,P=E.bufferFitsInput,F=E.bufferFitsOutput,R=E.doNotLinkAndNotify;return(0,e.createFragment)([(0,e.createComponentVNode)(2,d,{label:"Input",labelWidth:6,wrapContent:(0,e.createComponentVNode)(2,f,{text:w,defaultText:"",color:"silver"}),noWrapContent:(0,e.createFragment)([(0,e.createComponentVNode)(2,l,{noConfirm:R||!w,confirmContent:"This will change the intput device. Confirm?",confirmColor:"orange",content:"Link buffer",icon:"link",selected:w&&M===w,disabled:!P,onClick:function(){function U(){return A("link_input")}return U}()}),(0,e.createComponentVNode)(2,o.Button.Confirm,{confirmContent:"This will unlink the intput device. Confirm?",confirmColor:"orange",content:"Unlink",icon:"unlink",color:"red",disabled:!w,onClick:function(){function U(){return A("unlink_input")}return U}()})],4)}),(0,e.createComponentVNode)(2,d,{label:"Output",labelWidth:6,wrapContent:(0,e.createComponentVNode)(2,f,{text:O,defaultText:"",color:"silver"}),noWrapContent:(0,e.createFragment)([(0,e.createComponentVNode)(2,l,{noConfirm:R||!O,confirmContent:"This will change the output device. Confirm?",confirmColor:"orange",content:"Link buffer",icon:"link",selected:O&&M===O,disabled:!F,onClick:function(){function U(){return A("link_output")}return U}()}),(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 U(){return A("unlink_output")}return U}()})],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),p=n(76910),k=n(98595),y=n(3939),S=n(22091),b=["icon","iconSpin","selected","security","onClick","title","children"],C=["name"];function c(B,L){if(B==null)return{};var T={};for(var A in B)if({}.hasOwnProperty.call(B,A)){if(L.includes(A))continue;T[A]=B[A]}return T}var u=128,f=["security","engineering","medical","science","service","supply"],l={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"}},d=r.Newscaster=function(){function B(L,T){var A=(0,t.useBackend)(T),E=A.act,w=A.data,O=w.is_security,M=w.is_admin,P=w.is_silent,F=w.is_printing,R=w.screen,U=w.channels,j=w.channel_idx,W=j===void 0?-1:j,K=(0,t.useLocalState)(T,"menuOpen",!1),$=K[0],ne=K[1],Y=(0,t.useLocalState)(T,"viewingPhoto",""),le=Y[0],de=Y[1],oe=(0,t.useLocalState)(T,"censorMode",!1),re=oe[0],Z=oe[1],ae;R===0||R===2?ae=(0,e.createComponentVNode)(2,i):R===1&&(ae=(0,e.createComponentVNode)(2,h));var J=U.reduce(function(X,Q){return X+Q.unread},0);return(0,e.createComponentVNode)(2,k.Window,{theme:O&&"security",width:800,height:600,children:[le?(0,e.createComponentVNode)(2,s):(0,e.createComponentVNode)(2,y.ComplexModal,{maxWidth:window.innerWidth/1.5+"px",maxHeight:window.innerHeight/1.5+"px"}),(0,e.createComponentVNode)(2,k.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",$&&"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 X(){return ne(!$)}return X}()}),(0,e.createComponentVNode)(2,m,{icon:"newspaper",title:"Headlines",selected:R===0,onClick:function(){function X(){return E("headlines")}return X}(),children:J>0&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--unread",children:J>=10?"9+":J})}),(0,e.createComponentVNode)(2,m,{icon:"briefcase",title:"Job Openings",selected:R===1,onClick:function(){function X(){return E("jobs")}return X}()}),(0,e.createComponentVNode)(2,o.Divider)]}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:U.map(function(X){return(0,e.createComponentVNode)(2,m,{icon:X.icon,title:X.name,selected:R===2&&U[W-1]===X,onClick:function(){function Q(){return E("channel",{uid:X.uid})}return Q}(),children:X.unread>0&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--unread",children:X.unread>=10?"9+":X.unread})},X)})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Divider),(!!O||!!M)&&(0,e.createFragment)([(0,e.createComponentVNode)(2,m,{security:!0,icon:"exclamation-circle",title:"Edit Wanted Notice",mb:"0.5rem",onClick:function(){function X(){return(0,y.modalOpen)(T,"wanted_notice")}return X}()}),(0,e.createComponentVNode)(2,m,{security:!0,icon:re?"minus-square":"minus-square-o",title:"Censor Mode: "+(re?"On":"Off"),mb:"0.5rem",onClick:function(){function X(){return Z(!re)}return X}()}),(0,e.createComponentVNode)(2,o.Divider)],4),(0,e.createComponentVNode)(2,m,{icon:"pen-alt",title:"New Story",mb:"0.5rem",onClick:function(){function X(){return(0,y.modalOpen)(T,"create_story")}return X}()}),(0,e.createComponentVNode)(2,m,{icon:"plus-circle",title:"New Channel",onClick:function(){function X(){return(0,y.modalOpen)(T,"create_channel")}return X}()}),(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 X(){return E("print_newspaper")}return X}()}),(0,e.createComponentVNode)(2,m,{icon:P?"volume-mute":"volume-up",title:"Mute: "+(P?"On":"Off"),onClick:function(){function X(){return E("toggle_mute")}return X}()})]})]})}),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,width:"100%",children:[(0,e.createComponentVNode)(2,S.TemporaryNotice),ae]})]})})]})}return B}(),m=function(L,T){var A=(0,t.useBackend)(T),E=A.act,w=L.icon,O=w===void 0?"":w,M=L.iconSpin,P=L.selected,F=P===void 0?!1:P,R=L.security,U=R===void 0?!1:R,j=L.onClick,W=L.title,K=L.children,$=c(L,b);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({className:(0,a.classes)(["Newscaster__menuButton",F&&"Newscaster__menuButton--selected",U&&"Newscaster__menuButton--security"]),onClick:j},$,{children:[F&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--selectedBar"}),(0,e.createComponentVNode)(2,o.Icon,{name:O,spin:M,size:"2"}),(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--title",children:W}),K]})))},i=function(L,T){var A=(0,t.useBackend)(T),E=A.act,w=A.data,O=w.screen,M=w.is_admin,P=w.channel_idx,F=w.channel_can_manage,R=w.channels,U=w.stories,j=w.wanted,W=(0,t.useLocalState)(T,"fullStories",[]),K=W[0],$=W[1],ne=(0,t.useLocalState)(T,"censorMode",!1),Y=ne[0],le=ne[1],de=O===2&&P>-1?R[P-1]:null;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[!!j&&(0,e.createComponentVNode)(2,V,{story:j,wanted:!0}),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:de?de.icon:"newspaper",mr:"0.5rem"}),de?de.name:"Headlines"],0),children:U.length>0?U.slice().reverse().map(function(oe){return!K.includes(oe.uid)&&oe.body.length+3>u?Object.assign({},oe,{body_short:oe.body.substr(0,u-4)+"..."}):oe}).map(function(oe,re){return(0,e.createComponentVNode)(2,V,{story:oe},re)}):(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."]})}),!!de&&(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)([Y&&(0,e.createComponentVNode)(2,o.Button,{disabled:!!de.admin&&!M,selected:de.censored,icon:de.censored?"comment-slash":"comment",content:de.censored?"Uncensor Channel":"Censor Channel",mr:"0.5rem",onClick:function(){function oe(){return E("censor_channel",{uid:de.uid})}return oe}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!F,icon:"cog",content:"Manage",onClick:function(){function oe(){return(0,y.modalOpen)(T,"manage_channel",{uid:de.uid})}return oe}()})],0),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description",children:de.description||"N/A"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Owner",children:de.author||"N/A"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Public",children:de.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"}),U.reduce(function(oe,re){return oe+re.view_count},0).toLocaleString()]})]})})]})},h=function(L,T){var A=(0,t.useBackend)(T),E=A.act,w=A.data,O=w.jobs,M=w.wanted,P=Object.entries(O).reduce(function(F,R){var U=R[0],j=R[1];return F+j.length},0);return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[!!M&&(0,e.createComponentVNode)(2,V,{story:M,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:P>0?f.map(function(F){return Object.assign({},l[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(R){return(0,e.createComponentVNode)(2,o.Box,{class:(0,a.classes)(["Newscaster__jobOpening",!!R.is_command&&"Newscaster__jobOpening--command"]),children:["\u2022 ",R.title]},R.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."})]})]})},V=function(L,T){var A=(0,t.useBackend)(T),E=A.act,w=A.data,O=L.story,M=L.wanted,P=M===void 0?!1:M,F=(0,t.useLocalState)(T,"fullStories",[]),R=F[0],U=F[1],j=(0,t.useLocalState)(T,"censorMode",!1),W=j[0],K=j[1];return(0,e.createComponentVNode)(2,o.Section,{className:(0,a.classes)(["Newscaster__story",P&&"Newscaster__story--wanted"]),title:(0,e.createFragment)([P&&(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:[!P&&W&&(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 $(){return E("censor_story",{uid:O.uid})}return $}()})}),(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",O.author," |\xA0",!P&&(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,p.timeAgo)(O.publish_time,w.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,v,{name:"story_photo_"+O.uid+".png",float:"right",ml:"0.5rem"}),(O.body_short||O.body).split("\n").map(function($,ne){return(0,e.createComponentVNode)(2,o.Box,{children:$||(0,e.createVNode)(1,"br")},ne)}),O.body_short&&(0,e.createComponentVNode)(2,o.Button,{content:"Read more..",mt:"0.5rem",onClick:function(){function $(){return U([].concat(R,[O.uid]))}return $}()}),(0,e.createComponentVNode)(2,o.Box,{clear:"right"})],0)})})},v=function(L,T){var A=L.name,E=c(L,C),w=(0,t.useLocalState)(T,"viewingPhoto",""),O=w[0],M=w[1];return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({as:"img",className:"Newscaster__photo",src:A,onClick:function(){function P(){return M(A)}return P}()},E)))},s=function(L,T){var A=(0,t.useLocalState)(T,"viewingPhoto",""),E=A[0],w=A[1];return(0,e.createComponentVNode)(2,o.Modal,{className:"Newscaster__photoZoom",children:[(0,e.createComponentVNode)(2,o.Box,{as:"img",src:E}),(0,e.createComponentVNode)(2,o.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){function O(){return w("")}return O}()})]})},g=function(L,T){var A=(0,t.useBackend)(T),E=A.act,w=A.data,O=!!L.args.uid&&w.channels.filter(function(te){return te.uid===L.args.uid}).pop();if(L.id==="manage_channel"&&!O){(0,y.modalClose)(T);return}var M=L.id==="manage_channel",P=!!L.args.is_admin,F=L.args.scanned_user,R=(0,t.useLocalState)(T,"author",(O==null?void 0:O.author)||F||"Unknown"),U=R[0],j=R[1],W=(0,t.useLocalState)(T,"name",(O==null?void 0:O.name)||""),K=W[0],$=W[1],ne=(0,t.useLocalState)(T,"description",(O==null?void 0:O.description)||""),Y=ne[0],le=ne[1],de=(0,t.useLocalState)(T,"icon",(O==null?void 0:O.icon)||"newspaper"),oe=de[0],re=de[1],Z=(0,t.useLocalState)(T,"isPublic",M?!!(O!=null&&O.public):!1),ae=Z[0],J=Z[1],X=(0,t.useLocalState)(T,"adminLocked",(O==null?void 0:O.admin)===1||!1),Q=X[0],q=X[1];return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:M?"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:!P,width:"100%",value:U,onInput:function(){function te(fe,ye){return j(ye)}return te}()})}),(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:K,onInput:function(){function te(fe,ye){return $(ye)}return te}()})}),(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:Y,onInput:function(){function te(fe,ye){return le(ye)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Icon",children:[(0,e.createComponentVNode)(2,o.Input,{disabled:!P,value:oe,width:"35%",mr:"0.5rem",onInput:function(){function te(fe,ye){return re(ye)}return te}()}),(0,e.createComponentVNode)(2,o.Icon,{name:oe,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 te(){return J(!ae)}return te}()})}),P&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:Q,icon:Q?"lock":"lock-open",content:Q?"On":"Off",tooltip:"Locking this channel will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function te(){return q(!Q)}return te}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:U.trim().length===0||K.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function te(){(0,y.modalAnswer)(T,L.id,"",{author:U,name:K.substr(0,49),description:Y.substr(0,128),icon:oe,public:ae?1:0,admin_locked:Q?1:0})}return te}()})]})},N=function(L,T){var A=(0,t.useBackend)(T),E=A.act,w=A.data,O=w.photo,M=w.channels,P=w.channel_idx,F=P===void 0?-1:P,R=!!L.args.is_admin,U=L.args.scanned_user,j=M.slice().sort(function(te,fe){if(F<0)return 0;var ye=M[F-1];if(ye.uid===te.uid)return-1;if(ye.uid===fe.uid)return 1}).filter(function(te){return R||!te.frozen&&(te.author===U||!!te.public)}),W=(0,t.useLocalState)(T,"author",U||"Unknown"),K=W[0],$=W[1],ne=(0,t.useLocalState)(T,"channel",j.length>0?j[0].name:""),Y=ne[0],le=ne[1],de=(0,t.useLocalState)(T,"title",""),oe=de[0],re=de[1],Z=(0,t.useLocalState)(T,"body",""),ae=Z[0],J=Z[1],X=(0,t.useLocalState)(T,"adminLocked",!1),Q=X[0],q=X[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:!R,width:"100%",value:K,onInput:function(){function te(fe,ye){return $(ye)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Channel",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Dropdown,{selected:Y,options:j.map(function(te){return te.name}),mb:"0",width:"100%",onSelected:function(){function te(fe){return le(fe)}return te}()})}),(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:oe,onInput:function(){function te(fe,ye){return re(ye)}return te}()})}),(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 te(fe,ye){return J(ye)}return te}()})}),(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 te(){return E(O?"eject_photo":"attach_photo")}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Preview",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Section,{noTopPadding:!0,title:oe,maxHeight:"13.5rem",overflow:"auto",children:(0,e.createComponentVNode)(2,o.Box,{mt:"0.5rem",children:[!!O&&(0,e.createComponentVNode)(2,v,{name:"inserted_photo_"+O.uid+".png",float:"right"}),ae.split("\n").map(function(te,fe){return(0,e.createComponentVNode)(2,o.Box,{children:te||(0,e.createVNode)(1,"br")},fe)}),(0,e.createComponentVNode)(2,o.Box,{clear:"right"})]})})}),R&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:Q,icon:Q?"lock":"lock-open",content:Q?"On":"Off",tooltip:"Locking this story will make it censorable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function te(){return q(!Q)}return te}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:K.trim().length===0||Y.trim().length===0||oe.trim().length===0||ae.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function te(){(0,y.modalAnswer)(T,"create_story","",{author:K,channel:Y,title:oe.substr(0,127),body:ae.substr(0,1023),admin_locked:Q?1:0})}return te}()})]})},x=function(L,T){var A=(0,t.useBackend)(T),E=A.act,w=A.data,O=w.photo,M=w.wanted,P=!!L.args.is_admin,F=L.args.scanned_user,R=(0,t.useLocalState)(T,"author",(M==null?void 0:M.author)||F||"Unknown"),U=R[0],j=R[1],W=(0,t.useLocalState)(T,"name",(M==null?void 0:M.title.substr(8))||""),K=W[0],$=W[1],ne=(0,t.useLocalState)(T,"description",(M==null?void 0:M.body)||""),Y=ne[0],le=ne[1],de=(0,t.useLocalState)(T,"adminLocked",(M==null?void 0:M.admin_locked)===1||!1),oe=de[0],re=de[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:!P,width:"100%",value:U,onInput:function(){function Z(ae,J){return j(J)}return Z}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:(0,e.createComponentVNode)(2,o.Input,{width:"100%",value:K,maxLength:"128",onInput:function(){function Z(ae,J){return $(J)}return Z}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Input,{multiline:!0,width:"100%",value:Y,maxLength:"512",rows:"4",onInput:function(){function Z(ae,J){return le(J)}return Z}()})}),(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 Z(){return E(O?"eject_photo":"attach_photo")}return Z}()}),!!O&&(0,e.createComponentVNode)(2,v,{name:"inserted_photo_"+O.uid+".png",float:"right"})]}),P&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:oe,icon:oe?"lock":"lock-open",content:oe?"On":"Off",tooltip:"Locking this wanted notice will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function Z(){return re(!oe)}return Z}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:!M,icon:"eraser",color:"danger",content:"Clear",position:"absolute",right:"7.25rem",bottom:"-0.75rem",onClick:function(){function Z(){E("clear_wanted_notice"),(0,y.modalClose)(T)}return Z}()}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:U.trim().length===0||K.trim().length===0||Y.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function Z(){(0,y.modalAnswer)(T,L.id,"",{author:U,name:K.substr(0,127),description:Y.substr(0,511),admin_locked:oe?1:0})}return Z}()})]})};(0,y.modalRegisterBodyOverride)("create_channel",g),(0,y.modalRegisterBodyOverride)("manage_channel",g),(0,y.modalRegisterBodyOverride)("create_story",N),(0,y.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),p=n(98595),k=r.NinjaBloodScan=function(){function b(C,c){var u=(0,a.useBackend)(c),f=u.act,l=u.data;return(0,e.createComponentVNode)(2,p.Window,{width:500,height:400,theme:"spider_clan",children:(0,e.createComponentVNode)(2,p.Window.Content,{className:"Layout__content--flexColumn",children:[(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,S)]})})}return b}(),y=function(C,c){var u=(0,a.useBackend)(c),f=u.act,l=u.data,d=l.vialIcons,m=l.noVialIcon,i=l.bloodOwnerNames,h=l.bloodOwnerSpecies,V=l.bloodOwnerTypes,v=l.blockButtons,s=l.scanStates,g={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:i[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[s[L]],success:0,danger:0,align:"center",children:(0,e.createComponentVNode)(2,t.Button,{className:v?g.disabled:g.blue,height:"100%",width:"100%",disabled:v,onClick:function(){function T(){return f("vial_out",{button_num:L+1})}return T}(),children:[(0,e.createVNode)(1,"img",null,null,1,{height:"128px",width:"128px",src:"data:image/jpeg;base64,"+(d[L]||m),style:{"margin-left":"3px","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}}),(0,e.createComponentVNode)(2,t.Tooltip,{title:i[L]||" - ",content:"\u0420\u0430\u0441\u0430: "+(h[L]||" - ")+"\n"+("\u0422\u0438\u043F \u043A\u0440\u043E\u0432\u0438: "+(V[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:v===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:v,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}()})})]})})},S=function(C,c){var u=(0,a.useBackend)(c),f=u.data,l=f.progressBar;return(0,e.createComponentVNode)(2,t.Section,{stretchContents:!0,children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:"green",value:l,minValue:0,maxValue:100,children:(0,e.createVNode)(1,"center",null,(0,e.createComponentVNode)(2,t.NoticeBox,{className:"NoticeBox_green",mt:1,children:l?"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 "+(l+"%"):"\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),p=r.NinjaMindScan=function(){function y(S,b){var C=(0,a.useBackend)(b),c=C.act,u=C.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,k)})})}return y}(),k=function(S,b){var C=(0,a.useBackend)(b),c=C.act,u=C.data,f=u.occupantIcon,l=u.occupant_name,d=u.occupant_health,m=u.scanned_occupants,i=l==="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:l}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0417\u0434\u043E\u0440\u043E\u0432\u044C\u0435",children:d})]})}),(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:i===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:i,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 h(){return c("scan_occupant")}return h}()}),(0,e.createComponentVNode)(2,t.Button,{className:i===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:i,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 h(){return c("go_out")}return h}()}),(0,e.createComponentVNode)(2,t.Button,{className:i===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:i,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 h(){return c("teleport_out")}return h}()})]})]})]})}),(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(h){return(0,e.createComponentVNode)(2,t.Table.Row,{children:(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Box,{children:h.scanned_occupant})})},h.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),p=r.NuclearBomb=function(){function k(y,S){var b=(0,a.useBackend)(S),C=b.act,c=b.data;return c.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:c.authdisk?"eject":"id-card",selected:c.authdisk,content:c.diskname?c.diskname:"-----",tooltip:c.authdisk?"Eject Disk":"Insert Disk",onClick:function(){function u(){return C("auth")}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auth Code",children:(0,e.createComponentVNode)(2,t.Button,{icon:"key",disabled:!c.authdisk,selected:c.authcode,content:c.codemsg,onClick:function(){function u(){return C("code")}return u}()})})]})}),(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:c.anchored?"check":"times",selected:c.anchored,disabled:!c.authfull,content:c.anchored?"YES":"NO",onClick:function(){function u(){return C("toggle_anchor")}return u}()})}),c.authfull&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Time Left",children:(0,e.createComponentVNode)(2,t.Button,{icon:"stopwatch",content:c.time,disabled:!c.authfull,tooltip:"Set Timer",onClick:function(){function u(){return C("set_time")}return u}()})})||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Time Left",color:c.timer?"red":"",children:c.time+"s"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safety",children:(0,e.createComponentVNode)(2,t.Button,{icon:c.safety?"check":"times",selected:c.safety,disabled:!c.authfull,content:c.safety?"ON":"OFF",tooltip:c.safety?"Disable Safety":"Enable Safety",onClick:function(){function u(){return C("toggle_safety")}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Arm/Disarm",children:(0,e.createComponentVNode)(2,t.Button,{icon:(c.timer,"bomb"),disabled:c.safety||!c.authfull,color:"red",content:c.timer?"DISARM THE NUKE":"ARM THE NUKE",onClick:function(){function u(){return C("toggle_armed")}return u}()})})]})})]})}):(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 u(){return C("deploy")}return u}()})})})})}return k}()},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),p=n(72253),k=n(36036),y=n(98595),S=r.NumberInputModal=function(){function C(c,u){var f=(0,p.useBackend)(u),l=f.act,d=f.data,m=d.init_value,i=d.large_buttons,h=d.message,V=h===void 0?"":h,v=d.timeout,s=d.title,g=(0,p.useLocalState)(u,"input",m),N=g[0],x=g[1],B=function(){function A(E){E!==N&&x(E)}return A}(),L=function(){function A(E){E!==N&&x(E)}return A}(),T=140+Math.max(Math.ceil(V.length/3),V.length>0&&i?5:0);return(0,e.createComponentVNode)(2,y.Window,{title:s,width:270,height:T,children:[v&&(0,e.createComponentVNode)(2,a.Loader,{value:v}),(0,e.createComponentVNode)(2,y.Window.Content,{onKeyDown:function(){function A(E){var w=window.event?E.which:E.keyCode;w===o.KEY_ENTER&&l("submit",{entry:N}),w===o.KEY_ESCAPE&&l("cancel")}return A}(),children:(0,e.createComponentVNode)(2,k.Section,{fill:!0,children:(0,e.createComponentVNode)(2,k.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,k.Box,{color:"label",children:V})}),(0,e.createComponentVNode)(2,k.Stack.Item,{children:(0,e.createComponentVNode)(2,b,{input:N,onClick:L,onChange:B})}),(0,e.createComponentVNode)(2,k.Stack.Item,{children:(0,e.createComponentVNode)(2,t.InputButtons,{input:N})})]})})})]})}return C}(),b=function(c,u){var f=(0,p.useBackend)(u),l=f.act,d=f.data,m=d.min_value,i=d.max_value,h=d.init_value,V=d.round_value,v=c.input,s=c.onClick,g=c.onChange,N=Math.round(v!==m?Math.max(v/2,m):i/2),x=v===m&&m>0||v===1;return(0,e.createComponentVNode)(2,k.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,k.Stack.Item,{children:(0,e.createComponentVNode)(2,k.Button,{disabled:v===m,icon:"angle-double-left",onClick:function(){function B(){return s(m)}return B}(),tooltip:v===m?"Min":"Min ("+m+")"})}),(0,e.createComponentVNode)(2,k.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,k.RestrictedInput,{autoFocus:!0,autoSelect:!0,fluid:!0,allowFloats:!V,minValue:m,maxValue:i,onChange:function(){function B(L,T){return g(T)}return B}(),onEnter:function(){function B(L,T){return l("submit",{entry:T})}return B}(),value:v})}),(0,e.createComponentVNode)(2,k.Stack.Item,{children:(0,e.createComponentVNode)(2,k.Button,{disabled:v===i,icon:"angle-double-right",onClick:function(){function B(){return s(i)}return B}(),tooltip:v===i?"Max":"Max ("+i+")"})}),(0,e.createComponentVNode)(2,k.Stack.Item,{children:(0,e.createComponentVNode)(2,k.Button,{disabled:x,icon:"divide",onClick:function(){function B(){return s(N)}return B}(),tooltip:x?"Split":"Split ("+N+")"})}),(0,e.createComponentVNode)(2,k.Stack.Item,{children:(0,e.createComponentVNode)(2,k.Button,{disabled:v===h,icon:"redo",onClick:function(){function B(){return s(h)}return B}(),tooltip:h?"Reset ("+h+")":"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),p=n(36036),k=[["good","\u0412 \u0441\u043E\u0437\u043D\u0430\u043D\u0438\u0438"],["average","\u0411\u0435\u0437 \u0441\u043E\u0437\u043D\u0430\u043D\u0438\u044F"],["bad","\u0417\u0430\u0444\u0438\u043A\u0441\u0438\u0440\u043E\u0432\u0430\u043D\u0430 \u0441\u043C\u0435\u0440\u0442\u044C"]],y=[["\u0423\u0434\u0443\u0448\u0435\u043D\u0438\u0435","oxyLoss"],["\u0422\u043E\u043A\u0441\u0438\u043D\u044B","toxLoss"],["\u0424\u0438\u0437\u0438\u0447\u0435\u0441\u043A\u0438\u0435 \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u044F","bruteLoss"],["\u041E\u0436\u043E\u0433\u0438","fireLoss"]],S={average:[.25,.5],bad:[.5,1/0]},b=["bad","average","average","good","average","average","bad"],C=r.OperatingComputer=function(){function l(d,m){var i=(0,t.useBackend)(m),h=i.act,V=i.data,v=V.hasOccupant,s=V.choice,g;return s?g=(0,e.createComponentVNode)(2,f):g=v?(0,e.createComponentVNode)(2,c):(0,e.createComponentVNode)(2,u),(0,e.createComponentVNode)(2,o.Window,{width:650,height:455,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,p.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,p.Stack.Item,{children:(0,e.createComponentVNode)(2,p.Tabs,{children:[(0,e.createComponentVNode)(2,p.Tabs.Tab,{selected:!s,icon:"user",onClick:function(){function N(){return h("choiceOff")}return N}(),children:"\u041F\u0430\u0446\u0438\u0435\u043D\u0442"}),(0,e.createComponentVNode)(2,p.Tabs.Tab,{selected:!!s,icon:"cog",onClick:function(){function N(){return h("choiceOn")}return N}(),children:"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438"})]})}),(0,e.createComponentVNode)(2,p.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,p.Section,{fill:!0,scrollable:!0,children:g})})]})})})}return l}(),c=function(d,m){var i=(0,t.useBackend)(m),h=i.data,V=h.occupant;return(0,e.createComponentVNode)(2,p.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,p.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,p.Section,{fill:!0,title:"\u041F\u0430\u0446\u0438\u0435\u043D\u0442",children:(0,e.createComponentVNode)(2,p.LabeledList,{children:[(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:"\u0418\u043C\u044F",children:V.name}),(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:"\u0421\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435",color:k[V.stat][0],children:k[V.stat][1]}),(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:"\u041E\u0446\u0435\u043D\u043A\u0430 \u0437\u0434\u043E\u0440\u043E\u0432\u044C\u044F",children:(0,e.createComponentVNode)(2,p.ProgressBar,{min:"0",max:V.maxHealth,value:V.health/V.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),y.map(function(v,s){return(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:v[0],children:(0,e.createComponentVNode)(2,p.ProgressBar,{min:"0",max:"100",value:V[v[1]]/100,ranges:S,children:(0,a.round)(V[v[1]])},s)},s)}),(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:"\u0422\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u0442\u0435\u043B\u0430",children:(0,e.createComponentVNode)(2,p.ProgressBar,{min:"0",max:V.maxTemp,value:V.bodyTemperature/V.maxTemp,color:b[V.temperatureSuitability+3],children:[(0,a.round)(V.btCelsius),"\xB0C, ",(0,a.round)(V.btFaren),"\xB0F"]})}),!!V.hasBlood&&(0,e.createFragment)([(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:"\u0423\u0440\u043E\u0432\u0435\u043D\u044C \u043A\u0440\u043E\u0432\u0438",children:(0,e.createComponentVNode)(2,p.ProgressBar,{min:"0",max:V.bloodMax,value:V.bloodLevel/V.bloodMax,ranges:{bad:[-1/0,.6],average:[.6,.9],good:[.6,1/0]},children:[V.bloodPercent,"%, ",V.bloodLevel,"cl"]})}),(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:"\u041F\u0443\u043B\u044C\u0441",children:[V.pulse," \u0443\u0434/\u043C\u0438\u043D"]})],4)]})})}),(0,e.createComponentVNode)(2,p.Stack.Item,{children:(0,e.createComponentVNode)(2,p.Section,{title:"\u0422\u0435\u043A\u0443\u0449\u0438\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438",level:"2",children:V.inSurgery?V.surgeries.map(function(v){var s=v.bodypartName,g=v.surgeryName,N=v.stepName;return(0,e.createComponentVNode)(2,p.Section,{title:s,level:"4",children:(0,e.createComponentVNode)(2,p.LabeledList,{children:[(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:"\u041E\u043F\u0435\u0440\u0430\u0446\u0438\u044F",children:g}),(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u044D\u0442\u0430\u043F",children:N})]})},s)}):(0,e.createComponentVNode)(2,p.Box,{color:"label",children:"\u041E\u043F\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 \u0434\u0430\u043D\u043D\u044B\u0439 \u043C\u043E\u043C\u0435\u043D\u0442 \u043D\u0435 \u043F\u0440\u043E\u0432\u043E\u0434\u044F\u0442\u0441\u044F."})})})]})},u=function(){return(0,e.createComponentVNode)(2,p.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,p.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,p.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."]})})},f=function(d,m){var i=(0,t.useBackend)(m),h=i.act,V=i.data,v=V.verbose,s=V.health,g=V.healthAlarm,N=V.oxy,x=V.oxyAlarm,B=V.crit;return(0,e.createComponentVNode)(2,p.LabeledList,{children:[(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:"\u0414\u0438\u043D\u0430\u043C\u0438\u043A",children:(0,e.createComponentVNode)(2,p.Button,{selected:v,icon:v?"toggle-on":"toggle-off",content:v?"\u0412\u043A\u043B\u044E\u0447\u0451\u043D":"\u0412\u044B\u043A\u043B\u044E\u0447\u0435\u043D",onClick:function(){function L(){return h(v?"verboseOff":"verboseOn")}return L}()})}),(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:"\u041E\u043F\u043E\u0432\u0435\u0449\u0430\u0442\u044C \u043E \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0438 \u043F\u0430\u0446\u0438\u0435\u043D\u0442\u0430",children:(0,e.createComponentVNode)(2,p.Button,{selected:s,icon:s?"toggle-on":"toggle-off",content:s?"\u0412\u043A\u043B\u044E\u0447\u0435\u043D\u043E":"\u0412\u044B\u043A\u043B\u044E\u0447\u0435\u043D\u043E",onClick:function(){function L(){return h(s?"healthOff":"healthOn")}return L}()})}),(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:"\u041F\u043E\u0440\u043E\u0433 \u043E\u043F\u043E\u0432\u0435\u0449\u0435\u043D\u0438\u044F \u043E \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0438",children:(0,e.createComponentVNode)(2,p.Knob,{bipolar:!0,minValue:-100,maxValue:100,value:g,stepPixelSize:5,ml:"0",onChange:function(){function L(T,A){return h("health_adj",{new:A})}return L}()})}),(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:"\u041E\u043F\u043E\u0432\u0435\u0449\u0430\u0442\u044C \u043E \u0434\u044B\u0445\u0430\u043D\u0438\u0438 \u043F\u0430\u0446\u0438\u0435\u043D\u0442\u0430",children:(0,e.createComponentVNode)(2,p.Button,{selected:N,icon:N?"toggle-on":"toggle-off",content:N?"\u0412\u043A\u043B\u044E\u0447\u0435\u043D\u043E":"\u0412\u044B\u043A\u043B\u044E\u0447\u0435\u043D\u043E",onClick:function(){function L(){return h(N?"oxyOff":"oxyOn")}return L}()})}),(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:"\u041F\u043E\u0440\u043E\u0433 \u043E\u043F\u043E\u0432\u0435\u0449\u0435\u043D\u0438\u044F \u043E \u0434\u044B\u0445\u0430\u043D\u0438\u0438",children:(0,e.createComponentVNode)(2,p.Knob,{bipolar:!0,minValue:-100,maxValue:100,value:x,stepPixelSize:5,ml:"0",onChange:function(){function L(T,A){return h("oxy_adj",{new:A})}return L}()})}),(0,e.createComponentVNode)(2,p.LabeledList.Item,{label:"\u041E\u043F\u043E\u0432\u0435\u0449\u0430\u0442\u044C \u043E \u043A\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u043C \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0438 \u043F\u0430\u0446\u0438\u0435\u043D\u0442\u0430",children:(0,e.createComponentVNode)(2,p.Button,{selected:B,icon:B?"toggle-on":"toggle-off",content:B?"\u0412\u043A\u043B\u044E\u0447\u0435\u043D\u043E":"\u0412\u044B\u043A\u043B\u044E\u0447\u0435\u043D\u043E",onClick:function(){function L(){return h(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),p=n(98595);function k(m,i){var h=typeof Symbol!="undefined"&&m[Symbol.iterator]||m["@@iterator"];if(h)return(h=h.call(m)).next.bind(h);if(Array.isArray(m)||(h=y(m))||i&&m&&typeof m.length=="number"){h&&(m=h);var V=0;return function(){return V>=m.length?{done:!0}:{done:!1,value:m[V++]}}}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 y(m,i){if(m){if(typeof m=="string")return S(m,i);var h={}.toString.call(m).slice(8,-1);return h==="Object"&&m.constructor&&(h=m.constructor.name),h==="Map"||h==="Set"?Array.from(m):h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h)?S(m,i):void 0}}function S(m,i){(i==null||i>m.length)&&(i=m.length);for(var h=0,V=Array(i);hh},u=function(i,h){var V=i.name,v=h.name;if(!V||!v)return 0;var s=V.match(b),g=v.match(b);if(s&&g&&V.replace(b,"")===v.replace(b,"")){var N=parseInt(s[1],10),x=parseInt(g[1],10);return N-x}return c(V,v)},f=function(i,h){var V=(0,t.useBackend)(h),v=V.act,s=i.searchText,g=i.source,N=i.title,x=g.filter(C(s));return x.sort(u),g.length>0&&(0,e.createComponentVNode)(2,o.Section,{title:N+" - ("+g.length+")",children:x.map(function(B){return(0,e.createComponentVNode)(2,o.Button,{content:B.name,onClick:function(){function L(){return v("orbit",{ref:B.ref})}return L}()},B.name)})})},l=function(i,h){var V=(0,t.useBackend)(h),v=V.act,s=i.color,g=i.thing;return(0,e.createComponentVNode)(2,o.Button,{color:s,onClick:function(){function N(){return v("orbit",{ref:g.ref})}return N}(),children:g.name})},d=r.Orbit=function(){function m(i,h){for(var V=(0,t.useBackend)(h),v=V.act,s=V.data,g=s.alive,N=s.antagonists,x=s.highlights,B=s.auto_observe,L=s.dead,T=s.ghosts,A=s.misc,E=s.npcs,w=(0,t.useLocalState)(h,"searchText",""),O=w[0],M=w[1],P={},F=k(N),R;!(R=F()).done;){var U=R.value;P[U.antag]===void 0&&(P[U.antag]=[]),P[U.antag].push(U)}var j=Object.entries(P);j.sort(function(K,$){return c(K[0],$[0])});var W=function(){function K($){for(var ne=0,Y=[j.map(function(oe){var re=oe[0],Z=oe[1];return Z}),x,g,T,L,E,A];ne0&&(0,e.createComponentVNode)(2,o.Section,{title:"Antagonists",children:j.map(function(K){var $=K[0],ne=K[1];return(0,e.createComponentVNode)(2,o.Section,{title:$,level:2,children:ne.filter(C(O)).sort(u).map(function(Y){return(0,e.createComponentVNode)(2,l,{color:"bad",thing:Y},Y.name)})},$)})}),x.length>0&&(0,e.createComponentVNode)(2,f,{title:"Highlights",source:x,searchText:O,color:"teal"}),(0,e.createComponentVNode)(2,o.Section,{title:"Alive - ("+g.length+")",children:g.filter(C(O)).sort(u).map(function(K){return(0,e.createComponentVNode)(2,l,{color:"good",thing:K},K.name)})}),(0,e.createComponentVNode)(2,o.Section,{title:"Ghosts - ("+T.length+")",children:T.filter(C(O)).sort(u).map(function(K){return(0,e.createComponentVNode)(2,l,{color:"grey",thing:K},K.name)})}),(0,e.createComponentVNode)(2,f,{title:"Dead",source:L,searchText:O}),(0,e.createComponentVNode)(2,f,{title:"NPCs",source:E,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),p=n(98595),k=n(9394);function y(i){if(i==null)throw new TypeError("Cannot destructure "+i)}var S=(0,k.createLogger)("OreRedemption"),b=function(h){return h.toLocaleString("en-US")+" pts"},C=r.OreRedemption=function(){function i(h,V){return(0,e.createComponentVNode)(2,p.Window,{width:490,height:750,children:(0,e.createComponentVNode)(2,p.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,c,{height:"100%"})}),(0,e.createComponentVNode)(2,u),(0,e.createComponentVNode)(2,f)]})})})}return i}(),c=function(h,V){var v=(0,t.useBackend)(V),s=v.act,g=v.data,N=g.id,x=g.points,B=g.disk,L=Object.assign({},(y(h),h));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 T(){return s("eject_id")}return T}(),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 T(){return s("insert_id")}return T}()})}),N&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Current Mining Points",children:(0,e.createComponentVNode)(2,o.Box,{bold:!0,children:b(N.points)})}),N&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Total Mining Points",children:(0,e.createComponentVNode)(2,o.Box,{bold:!0,children:b(N.total_points)})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Unclaimed Points",color:x>0?"good":"grey",bold:x>0&&"good",children:b(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 T(){return s("claim")}return T}()})})]}),(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 T(){return s("eject_disk")}return T}()})}),(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 T(){return s("download")}return T}()})})]}):(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No design disk inserted."})]})))},u=function(h,V){var v=(0,t.useBackend)(V),s=v.act,g=v.data,N=g.sheets,x=Object.assign({},(y(h),h));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,l,{title:"Sheets",columns:[["Available","25%"],["Ore Value","15%"],["Smelt","20%"]]}),N.map(function(B){return(0,e.createComponentVNode)(2,d,{ore:B},B.id)})]})))})},f=function(h,V){var v=(0,t.useBackend)(V),s=v.act,g=v.data,N=g.alloys,x=Object.assign({},(y(h),h));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,l,{title:"Alloys",columns:[["Recipe","50%"],["Available","11%"],["Smelt","20%"]]}),N.map(function(B){return(0,e.createComponentVNode)(2,m,{ore:B},B.id)})]})))})},l=function(h,V){var v;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:h.title}),(v=h.columns)==null?void 0:v.map(function(s){return(0,e.createComponentVNode)(2,o.Stack.Item,{basis:s[1],textAlign:"center",color:"label",bold:!0,children:s[0]},s)})]})})},d=function(h,V){var v=(0,t.useBackend)(V),s=v.act,g=h.ore;if(!(g.value&&g.amount<=0&&!(["metal","glass"].indexOf(g.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",g.id])}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:g.name})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",color:g.amount>=1?"good":"gray",bold:g.amount>=1,align:"center",children:g.amount.toLocaleString("en-US")}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",align:"center",children:g.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(g.amount,50),stepPixelSize:6,onChange:function(){function N(x,B){return s(g.value?"sheet":"alloy",{id:g.id,amount:B})}return N}()})})]})})},m=function(h,V){var v=(0,t.useBackend)(V),s=v.act,g=h.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",g.id])})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"30%",textAlign:"middle",align:"center",children:g.name}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"35%",textAlign:"middle",color:g.amount>=1?"good":"gray",align:"center",children:g.description}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"10%",textAlign:"center",color:g.amount>=1?"good":"gray",bold:g.amount>=1,align:"center",children:g.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(g.amount,50),stepPixelSize:6,onChange:function(){function N(x,B){return s(g.value?"sheet":"alloy",{id:g.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),p=n(71253),k=n(70752),y=function(C){var c;try{c=k("./"+C+".js")}catch(f){if(f.code==="MODULE_NOT_FOUND")return(0,p.routingError)("notFound",C);throw f}var u=c[C];return u||(0,p.routingError)("missingExport",C)},S=r.PAI=function(){function b(C,c){var u=(0,a.useBackend)(c),f=u.act,l=u.data,d=l.app_template,m=l.app_icon,i=l.app_title,h=y(d);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}),i,d!=="pai_main_menu"&&(0,e.createComponentVNode)(2,t.Button,{ml:2,content:"Home",icon:"arrow-up",onClick:function(){function V(){return f("MASTER_back")}return V}()})]}),p:1,children:(0,e.createComponentVNode)(2,h)})})})}return b}()},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),p=n(71253),k=n(59395),y=function(u){var f;try{f=k("./"+u+".js")}catch(d){if(d.code==="MODULE_NOT_FOUND")return(0,p.routingError)("notFound",u);throw d}var l=f[u];return l||(0,p.routingError)("missingExport",u)},S=r.PDA=function(){function c(u,f){var l=(0,a.useBackend)(f),d=l.act,m=l.data,i=m.app,h=m.owner;if(!h)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 V=y(i.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,b)}),(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:i.icon,mr:1}),i.name]}),children:(0,e.createComponentVNode)(2,V)})}),(0,e.createComponentVNode)(2,t.Stack.Item,{mt:7.5,children:(0,e.createComponentVNode)(2,C)})]})})})}return c}(),b=function(u,f){var l=(0,a.useBackend)(f),d=l.act,m=l.data,i=m.idInserted,h=m.idLink,V=m.stationTime,v=m.cartridge_name,s=m.request_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 g(){return d("Authenticate")}return g}(),content:i?h:"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 g(){return d("Eject")}return g}(),content:v?["Eject "+v]:"No Cartridge Inserted"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"sd-card",color:"transparent",onClick:function(){function g(){return d("Eject_Request")}return g}(),content:s?["Eject "+s]:"No Request Cartridge Inserted"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"right",bold:!0,mr:1,mt:.5,children:V})]})},C=function(u,f){var l=(0,a.useBackend)(f),d=l.act,m=l.data,i=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:[!!i.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:i.has_back?"white":"disabled",icon:"arrow-alt-circle-left-o",onClick:function(){function h(){return d("Back")}return h}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{basis:i.has_back?"33%":"100%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:i.is_home?"disabled":"white",icon:"home",onClick:function(){function h(){d("Home")}return h}()})})]})})}},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),p=r.PDAPainter=function(){function y(S,b){var C=(0,a.useBackend)(b),c=C.act,u=C.data,f=u.statusLabel,l=u.pdaTypes,d=u.hasPDA,m=u.pdaIcon,i=u.pdaIconState,h=u.pdaOwnerName,V=u.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:d?"eject":"exclamation-triangle",selected:d,content:d?"\u0418\u0437\u0432\u043B\u0435\u0447\u044C":"-----",tooltip:d?"\u0418\u0437\u0432\u043B\u0435\u0447\u044C PDA":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C PDA",tooltipPosition:"left",onClick:function(){function v(){return c(d?"eject_pda":"insert_pda")}return v}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"\u0418\u043C\u044F",children:h||"\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.DmIcon,{height:"160px",icon:m,icon_state:i,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:!d,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 v(){return c("erase_pda")}return v}()})]})})})]}),(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(l).map(function(v){return(0,e.createComponentVNode)(2,k,{selectedPda:v,selectedPdaIcon:l[v][0]},v)})})})})})]})})})}return y}(),k=r.PDAColorRow=function(){function y(S,b){var C=(0,a.useBackend)(b),c=C.act,u=C.data,f=u.hasPDA,l=u.pdaIcon,d=S.selectedPda;return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:(0,e.createComponentVNode)(2,o.DmIcon,{icon:l,icon_state:d,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:d,content:d,confirmContent:"\u041F\u043E\u043A\u0440\u0430\u0441\u0438\u0442\u044C?",textAlign:"left",onClick:function(){function m(){return c("choose_pda",{selectedPda:d})}return m}()})})]})}return y}()},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),p=n(49968),k=r.Pacman=function(){function y(S,b){var C=(0,a.useBackend)(b),c=C.act,u=C.data,f=u.broken,l=u.anchored,d=u.active,m=u.fuel_type,i=u.fuel_usage,h=u.fuel_stored,V=u.fuel_cap,v=u.is_ai,s=u.tmp_current,g=u.tmp_max,N=u.tmp_overheat,x=u.output_max,B=u.power_gen,L=u.output_set,T=u.has_fuel,A=h/V,E=s/g,w=L*B,O=Math.round(h/i),M=Math.round(O/60),P=O>120?M+" minutes":O+" seconds";return(0,e.createComponentVNode)(2,o.Window,{width:500,height:260,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(f||!l)&&(0,e.createComponentVNode)(2,t.Section,{title:"Status",children:[!!f&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"The generator is malfunctioning!"}),!f&&!l&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"The generator needs to be anchored to the floor with a wrench."})]}),!f&&!!l&&(0,e.createVNode)(1,"div",null,[(0,e.createComponentVNode)(2,t.Section,{title:"Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:d?"power-off":"times",content:d?"On":"Off",tooltip:"Toggles the generator on/off. Requires fuel.",tooltipPosition:"left",disabled:!T,selected:d,onClick:function(){function F(){return c("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(R,U){return c("change_power",{change_power:U})}return F}()}),"(",(0,p.formatPower)(w),")"]})})}),(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:E,ranges:{green:[-1/0,.33],orange:[.33,.66],red:[.66,1/0]},children:[s," \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:d||v||!T,onClick:function(){function F(){return c("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(h/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:[i/1e3," dm\xB3/s"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fuel depletion",children:[!!T&&(i?P:"N/A"),!T&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Out of fuel"})]})]})})]})})],4)]})})}return y}()},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),p=r.PersonalCrafting=function(){function S(b,C){var c=(0,a.useBackend)(C),u=c.act,f=c.data,l=f.busy,d=f.category,m=f.display_craftable_only,i=f.display_compact,h=f.prev_cat,V=f.next_cat,v=f.subcategory,s=f.prev_subcat,g=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:[!!l&&(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:d,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 u("toggle_recipes")}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Compact Mode",icon:i?"check-square-o":"square-o",selected:i,onClick:function(){function N(){return u("toggle_compact")}return N}()})],4),children:[(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:h,icon:"arrow-left",onClick:function(){function N(){return u("backwardCat")}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:V,icon:"arrow-right",onClick:function(){function N(){return u("forwardCat")}return N}()})]}),v&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:s,icon:"arrow-left",onClick:function(){function N(){return u("backwardSubCat")}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:g,icon:"arrow-right",onClick:function(){function N(){return u("forwardSubCat")}return N}()})]}),i?(0,e.createComponentVNode)(2,k):(0,e.createComponentVNode)(2,y)]})]})})}return S}(),k=function(b,C){var c=(0,a.useBackend)(C),u=c.act,f=c.data,l=f.display_craftable_only,d=f.can_craft,m=f.cant_craft;return(0,e.createComponentVNode)(2,t.Box,{mt:1,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[d.map(function(i){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:i.name,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",onClick:function(){function h(){return u("make",{make:i.ref})}return h}()}),i.catalyst_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:i.catalyst_text,content:"Catalysts",color:"transparent"}),(0,e.createComponentVNode)(2,t.Button,{tooltip:i.req_text,content:"Requirements",color:"transparent"}),i.tool_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:i.tool_text,content:"Tools",color:"transparent"})]},i.name)}),!l&&m.map(function(i){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:i.name,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",disabled:!0}),i.catalyst_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:i.catalyst_text,content:"Catalysts",color:"transparent"}),(0,e.createComponentVNode)(2,t.Button,{tooltip:i.req_text,content:"Requirements",color:"transparent"}),i.tool_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:i.tool_text,content:"Tools",color:"transparent"})]},i.name)})]})})},y=function(b,C){var c=(0,a.useBackend)(C),u=c.act,f=c.data,l=f.display_craftable_only,d=f.can_craft,m=f.cant_craft;return(0,e.createComponentVNode)(2,t.Box,{mt:1,children:[d.map(function(i){return(0,e.createComponentVNode)(2,t.Section,{title:i.name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",onClick:function(){function h(){return u("make",{make:i.ref})}return h}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[i.catalyst_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Catalysts",children:i.catalyst_text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Requirements",children:i.req_text}),i.tool_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tools",children:i.tool_text})]})},i.name)}),!l&&m.map(function(i){return(0,e.createComponentVNode)(2,t.Section,{title:i.name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",disabled:!0}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[i.catalyst_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Catalysts",children:i.catalyst_text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Requirements",children:i.req_text}),i.tool_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tools",children:i.tool_text})]})},i.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),p=n(88510),k=n(64795),y=n(25328);function S(f,l){var d=typeof Symbol!="undefined"&&f[Symbol.iterator]||f["@@iterator"];if(d)return(d=d.call(f)).next.bind(d);if(Array.isArray(f)||(d=b(f))||l&&f&&typeof f.length=="number"){d&&(f=d);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 b(f,l){if(f){if(typeof f=="string")return C(f,l);var d={}.toString.call(f).slice(8,-1);return d==="Object"&&f.constructor&&(d=f.constructor.name),d==="Map"||d==="Set"?Array.from(f):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?C(f,l):void 0}}function C(f,l){(l==null||l>f.length)&&(l=f.length);for(var d=0,m=Array(l);df?this.substring(0,f)+"...":this};var c=function(l,d){d===void 0&&(d="");var m=(0,y.createSearch)(d,function(i){return i.altername});return(0,k.flow)([(0,p.filter)(function(i){return i==null?void 0:i.altername}),d&&(0,p.filter)(m),(0,p.sortBy)(function(i){return i.id})])(l)},u=r.Photocopier=function(){function f(l,d){for(var m=(0,a.useBackend)(d),i=m.act,h=m.data,V=h.copies,v=h.maxcopies,s=(0,a.useLocalState)(d,"searchText",""),g=s[0],N=s[1],x=c((0,p.sortBy)(function(P){return P.category})(h.forms||[]),g),B=[],L=S(x),T;!(T=L()).done;){var A=T.value;B.includes(A.category)||B.push(A.category)}var E=(0,a.useLocalState)(d,"number",0),w=E[0],O=E[1],M;return h.category===""?M=x:M=x.filter(function(P){return P.category===h.category}),(0,e.createComponentVNode)(2,o.Window,{width:550,height:575,theme:h.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:h.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:h.form_id===""?"\u041D\u0435 \u0432\u044B\u0431\u0440\u0430\u043D\u0430":h.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:!h.copyitem&&!h.mob,icon:h.copyitem||h.mob?"eject":"times",content:h.copyitem?h.copyitem:h.mob?"\u0416\u043E\u043F\u0430 "+h.mob+"!":"\u0421\u043B\u043E\u0442 \u0434\u043B\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430",onClick:function(){function P(){return i("removedocument")}return P}()})})}),(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:!h.folder,icon:h.folder?"eject":"times",content:h.folder?h.folder:"\u0421\u043B\u043E\u0442 \u0434\u043B\u044F \u043F\u0430\u043F\u043A\u0438",onClick:function(){function P(){return i("removefolder")}return P}()})})})]}),(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:h.toner===0||h.form===null,content:"\u041F\u0435\u0447\u0430\u0442\u044C",onClick:function(){function P(){return i("print_form")}return P}()})}),!!h.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:h.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 P(){return i("ai_pic")}return P}()})})]}),(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:h.toner===0||!h.copyitem&&!h.mob,onClick:function(){function P(){return i("copy")}return P}()})}),!!h.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:h.toner===0,onClick:function(){function P(){return i("ai_text")}return P}()})})]}),(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:v,value:V,stepPixelSize:10,onChange:function(){function P(F,R){return i("copies",{new:R})}return P}()})]})]}),(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:!h.category,onClick:function(){function P(){return i("choose_category",{category:""})}return P}()})}),B.map(function(P){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:P,selected:h.category===P,onClick:function(){function F(){return i("choose_category",{category:P})}return F}()},P)},P)})]})})})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"60%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:h.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 P(F,R){return N(R)}return P}()}),children:M.map(function(P){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mb:.5,color:"transparent",content:P.altername.trimLongStr(37),tooltip:P.altername,selected:h.form_id===P.id,onClick:function(){function F(){return i("choose_form",{path:P.path,id:P.id})}return F}()})},P.path)})})})]})})})}return f}()},49177:function(I,r,n){"use strict";r.__esModule=!0,r.PlayerPanel=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),p=["checked"];function k(u,f){if(u==null)return{};var l={};for(var d in u)if({}.hasOwnProperty.call(u,d)){if(f.includes(d))continue;l[d]=u[d]}return l}var y=function(f,l){var d,m={ghost:["ghost","dead","observer"],human:["human","carbon"],monkey:["monkey"],cyborg:["cyborg","robot","borg"],ai:["ai","artificial intelligence"],animal:["simple","animal"]};return((d=m[l])==null?void 0:d.some(function(i){return f.toLowerCase().includes(i)}))||!1},S=r.PlayerPanel=function(){function u(f,l){var d=(0,a.useBackend)(l),m=d.act,i=d.data,h=function(){function V(v,s){s===void 0&&(s={}),m(v,Object.assign({selectedPlayerCkey:i.ckey},s))}return V}();return i.ckey?(0,e.createComponentVNode)(2,o.Window,{title:"Options Panel - "+i.ckey,width:800,height:950,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Refresh",onClick:function(){function V(){return h("refresh")}return V}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Old Panel",onClick:function(){function V(){return h("old_pp")}return V}()})]}),(0,e.createComponentVNode)(2,b),(0,e.createComponentVNode)(2,C)]})})}):(0,e.createComponentVNode)(2,o.Window,{title:"Options Panel - Error",width:800,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Error",children:[(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"No valid player data found. Please refresh or select a valid player."}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Refresh",onClick:function(){function V(){return m("refresh")}return V}()})]})})})}return u}(),b=function(f,l){var d=(0,a.useBackend)(l),m=d.act,i=d.data,h=(0,a.useLocalState)(l,"show_ip",!1),V=h[0],v=h[1],s=(0,a.useLocalState)(l,"show_cid",!1),g=s[0],N=s[1],x=function(L,T){T===void 0&&(T={}),m(L,Object.assign({selectedPlayerCkey:i.ckey},T))};return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Player Information",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Character:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.characterName}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Ckey:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.ckey})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Rank:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.rank}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Discord:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.discord})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Account Registered:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.accountRegistered}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Playtime as Crew:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:i.playtime,onClick:function(){function B(){return x("playtime")}return B}()})})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"CID:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:g?i.CID:"Hidden",onClick:function(){function B(){return N(!g)}return B}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"IP Address:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:V?i.ipAddress:"Hidden",onClick:function(){function B(){return v(!V)}return B}()})})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Mob Type:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.mobType}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Byond Version:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.byondVersion})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Related By CID:"}),(0,e.createComponentVNode)(2,t.Button,{content:"Related by CID",color:"blue",onClick:function(){function B(){return x("relatedbycid")}return B}()}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Related By IP:"}),(0,e.createComponentVNode)(2,t.Button,{content:"Related by IP",color:"blue",onClick:function(){function B(){return x("relatedbyip")}return B}()})]})]})})})},C=function(f,l){var d=(0,a.useBackend)(l),m=d.act,i=d.data,h=function(g,N){N===void 0&&(N={}),m(g,Object.assign({selectedPlayerCkey:i.ckey},N))},V=function(g){return i.adminRights.toLowerCase().includes(g)||!1},v=function(g){i.ckey&&h("toggleMute",{type:g})};return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Punish",children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"times",content:"KICK",color:"red",onClick:function(){function s(){return h("kick")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"ban",content:"JOBBAN",color:"red",disabled:!V("ban"),onClick:function(){function s(){return h("jobban")}return s}()}),V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"bullseye",content:"ADD TO WATCHLIST",color:"red",onClick:function(){function s(){return h("watchlist")}return s}()}):null]}),(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"ban",content:"BAN",color:"red",disabled:!V("ban"),onClick:function(){function s(){return h("ban")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"ban",content:"APPEARANCE BAN",color:"red",disabled:!V("ban"),onClick:function(){function s(){return h("appban")}return s}()}),V("event")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"bolt",content:"SMITE",color:"red",hidden:!V("event"),onClick:function(){function s(){return h("smite")}return s}()}):null,V("event")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"hand-holding-heart",content:"BLESS",onClick:function(){function s(){return h("bless")}return s}()}):null]})]})})}),(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Message",children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"comment",content:"PM",onClick:function(){function s(){return h("pm")}return s}()}),V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"comment-alt",content:"NARRATE",onClick:function(){function s(){return h("narrate")}return s}()}):null,V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"user-secret",content:"SEND ALERT",onClick:function(){function s(){return h("sendalert")}return s}()}):null]}),(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"user-secret",content:"SM",disabled:!V("event"),onClick:function(){function s(){return h("sm")}return s}()}),V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"crown",content:"MAN UP",onClick:function(){function s(){return h("manup")}return s}()}):null,V("sound")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"music",content:"PLAY SOUND TO",onClick:function(){function s(){return h("playsoundto")}return s}()}):null]})]})})})]}),(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Movement",children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eye",content:"FLW",onClick:function(){function s(){return h("flw")}return s}()}),V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"download",content:"GET",onClick:function(){function s(){return h("get")}return s}()}):null,V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"paper-plane",content:"SEND",onClick:function(){function s(){return h("send")}return s}()}):null]}),(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"running",content:"JUMPTO",onClick:function(){function s(){return h("jumpto")}return s}()}),V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"sign-out-alt",content:"LOBBY",onClick:function(){function s(){return h("lobby")}return s}()}):null,V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"columns",content:"SEND TO CRYO",onClick:function(){function s(){return h("cryo")}return s}()}):null]})]})})}),(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Info",children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"book",content:"LOGS",onClick:function(){function s(){return h("logs")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"clipboard",content:"NOTES",onClick:function(){function s(){return h("notes")}return s}()}),V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eye",content:"PLAYTIME",onClick:function(){function s(){return h("playtime")}return s}()}):null,V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"globe",content:"GEOIP",onClick:function(){function s(){return h("geoip")}return s}()}):null]}),(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"user-secret",content:"TRAITOR PANEL",onClick:function(){function s(){return h("tp")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"code",content:"VV",onClick:function(){function s(){return h("vv")}return s}()}),V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"database",content:"CHECK GLOBAL CCDB",onClick:function(){function s(){return h("ccdb")}return s}()}):null]})]})})})]}),(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{children:[V("spawn")?(0,e.createComponentVNode)(2,t.Section,{title:"Transformation",children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"ghost",content:"MAKE GHOST",color:y(i.mobType,"ghost")?"good":"",onClick:function(){function s(){return h("makeghost")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"user",content:"MAKE HUMAN",color:y(i.mobType,"human")?"good":"",onClick:function(){function s(){return h("makehuman")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"paw",content:"MAKE MONKEY",color:y(i.mobType,"monkey")?"good":"",onClick:function(){function s(){return h("makemonkey")}return s}()})]}),(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"robot",content:"MAKE CYBORG",color:y(i.mobType,"cyborg")?"good":"",onClick:function(){function s(){return h("makeborg")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"microchip",content:"MAKE AI",color:y(i.mobType,"ai")?"good":"",onClick:function(){function s(){return h("makeai")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"microchip",content:"ANIMALIZE",color:y(i.mobType,"animal")?"good":"",onClick:function(){function s(){return h("makeanimal")}return s}()})]})]})}):null,y(i.mobType,"ghost")?(0,e.createComponentVNode)(2,t.Section,{title:"Observer",children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{size:2,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"TOGGLE RESPAWNABILITY",onClick:function(){function s(){return h("respawnability")}return s}()})}),(0,e.createComponentVNode)(2,t.Grid.Column,{size:2,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"staff-snake",content:"RE-INCARNATE",disabled:!V("spawn"),onClick:function(){function s(){return h("reviveghost")}return s}()})})]})}):(0,e.createComponentVNode)(2,t.Section,{title:"Health",children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"heart",content:"HEALTHSCAN",onClick:function(){function s(){return h("healthscan")}return s}()}),V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"GIVE DISEASE",onClick:function(){function s(){return h("giveDisease")}return s}()}):null,V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"CURE DISEASE",onClick:function(){function s(){return h("cureDisease")}return s}()}):null,V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"CURE ALL BAD DISEASES",onClick:function(){function s(){return h("cureAllDiseases")}return s}()}):null]}),(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"CHEMSCAN",onClick:function(){function s(){return h("chemscan")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"plus",content:"REJUVINATE",disabled:!V("rejuvinate"),onClick:function(){function s(){return h("aheal")}return s}()}),V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"dna",content:"SHOW DNA",onClick:function(){function s(){return h("mutate")}return s}()}):null]})]})})]}),(0,e.createComponentVNode)(2,t.Grid.Column,{children:[V("admin")?(0,e.createComponentVNode)(2,t.Section,{title:"Mob Manipulation",children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"pencil",content:"MOB RANDOM NAME",onClick:function(){function s(){return h("randomizename")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"shirt",content:"SELECT EQUIPMENT",disabled:!V("event"),onClick:function(){function s(){return h("selectequip")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"microphone",content:"CHANGE VOICE",onClick:function(){function s(){return h("changevoice")}return s}()}),V("event")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"circle-user",content:"MIRROR UI TO ADMIN",onClick:function(){function s(){return h("mirroradmin")}return s}()}):null]}),(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"pen",content:"CHARACTER RANDOM NAME",onClick:function(){function s(){return h("userandomname")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eraser",content:"ERASE FLAVOR",onClick:function(){function s(){return h("eraseflavortext")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"shirt",content:"CHECK CONTENTS",onClick:function(){function s(){return h("checkcontents")}return s}()}),V("event")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"circle-user",content:"MIRROR UI TO PLAYER",onClick:function(){function s(){return h("mirrorplayer")}return s}()}):null]})]})}):null,(0,e.createComponentVNode)(2,t.Section,{title:"Misc",children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[V("event")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"gavel",content:"THUNDERDOME 1",onClick:function(){function s(){return h("thunderdome1")}return s}()}):null,V("event")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"gavel",content:"THUNDERDOME 2",onClick:function(){function s(){return h("thunderdome2")}return s}()}):null,V("event")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"comment",content:"FORCESAY",onClick:function(){function s(){return h("forcesay")}return s}()}):null,V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"handcuffs",content:"PRISON",onClick:function(){function s(){return h("prison")}return s}()}):null,V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"SYNDI JAIL RELEASE",onClick:function(){function s(){return h("contractor_release")}return s}()}):null,V("event")||V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"cookie",content:"SPAWN COOKIE",onClick:function(){function s(){return h("spawncookie")}return s}()}):null]}),(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[V("event")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"gavel",content:"THUNDERDOME ADMIN",onClick:function(){function s(){return h("thunderdomeadmin")}return s}()}):null,V("event")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eye",content:"THUNDERDOME OBSERVER",onClick:function(){function s(){return h("thunderdomeobserver")}return s}()}):null,V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"wheelchair-move",content:"AROOM WRAP",onClick:function(){function s(){return h("adminroom")}return s}()}):null,V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"SYNDI JAIL START",onClick:function(){function s(){return h("contractor_start")}return s}()}):null,V("admin")?(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"SYNDI JAIL STOP",onClick:function(){function s(){return h("contractor_stop")}return s}()}):null,(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"Some Admin Button",onClick:function(){function s(){return h("someadminbutton")}return s}()})]})]})})]})]}),(0,e.createComponentVNode)(2,t.Grid,{children:(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Mute Controls",children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{size:7,children:[(0,e.createComponentVNode)(2,c,{fluid:!0,checked:i.muteStates.ic,onClick:function(){function s(){return v("ic")}return s}(),content:"IC"}),(0,e.createComponentVNode)(2,c,{fluid:!0,checked:i.muteStates.ooc,onClick:function(){function s(){return v("ooc")}return s}(),content:"OOC"}),(0,e.createComponentVNode)(2,c,{fluid:!0,checked:i.muteStates.pray,onClick:function(){function s(){return v("pray")}return s}(),content:"PRAY"}),(0,e.createComponentVNode)(2,c,{fluid:!0,checked:i.muteStates.emote,onClick:function(){function s(){return v("emote")}return s}(),content:"EMOTE"})]}),(0,e.createComponentVNode)(2,t.Grid.Column,{size:6,children:[(0,e.createComponentVNode)(2,c,{fluid:!0,checked:i.muteStates.adminhelp,onClick:function(){function s(){return v("adminhelp")}return s}(),content:"ADMINHELP"}),(0,e.createComponentVNode)(2,c,{fluid:!0,checked:i.muteStates.deadchat,onClick:function(){function s(){return v("deadchat")}return s}(),content:"DEADCHAT"}),(0,e.createComponentVNode)(2,c,{fluid:!0,checked:i.muteStates.all,onClick:function(){function s(){return v("all")}return s}(),content:"ALL"})]})]})})})})]})},c=function(f){var l=f.checked,d=k(f,p);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Button,Object.assign({color:l?"red":"green",icon:l?"check-square-o":"square-o"},d)))}},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),p=r.PodTracking=function(){function k(y,S){var b=(0,a.useBackend)(S),C=b.act,c=b.data,u=c.pods;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:u.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 k}()},70857:function(I,r,n){"use strict";r.__esModule=!0,r.PollListPanel=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),p=r.PollListPanel=function(){function k(y,S){var b=(0,a.useBackend)(S),C=b.act,c=b.data,u=c.polls||{};return(0,e.createComponentVNode)(2,o.Window,{title:"Poll List Panel",width:700,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Poll List Panel",children:["Currently running polls Note when editing polls or their options changes are not saved until you press Sumbit Poll.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"New Poll",onClick:function(){function f(){return C("newpoll")}return f}()}),(0,e.createComponentVNode)(2,t.LabeledList,{children:u.map(function(f){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:f.question,children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",onClick:function(){function l(){return C("editpoll",{poll_to_edit:f.id})}return l}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Delete",onClick:function(){function l(){return C("deletepoll",{poll_to_delete:f.id})}return l}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Results",onClick:function(){function l(){return C("resultspoll",{poll_to_result:f.id})}return l}()}),(0,e.createComponentVNode)(2,t.Box,{children:f.description}),(0,e.createComponentVNode)(2,t.Divider)]},"poll")})})]})})})}return k}()},45736:function(I,r,n){"use strict";r.__esModule=!0,r.PollManagement=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(94798),p=n(98595),k=r.PollManagement=function(){function S(b,C){var c=(0,a.useBackend)(C),u=c.act,f=c.data,l=f.poll,d=f.has_poll,m=f.poll_types,i=f.interval_types,h=(0,a.useLocalState)(C,"question",l.question),V=h[0],v=h[1],s=(0,a.useLocalState)(C,"poll_type",l.poll_type),g=s[0],N=s[1],x=(0,a.useLocalState)(C,"options_allowed",l.options_allowed),B=x[0],L=x[1],T=(0,a.useLocalState)(C,"admin_only",l.admin_only),A=T[0],E=T[1],w=(0,a.useLocalState)(C,"dont_show",l.dont_show),O=w[0],M=w[1],P=(0,a.useLocalState)(C,"allow_revoting",l.allow_revoting),F=P[0],R=P[1],U=(0,a.useLocalState)(C,"interval",l.interval),j=U[0],W=U[1],K=(0,a.useLocalState)(C,"duration",l.duration),$=K[0],ne=K[1],Y=(0,a.useLocalState)(C,"start_datetime",l.start_datetime),le=Y[0],de=Y[1],oe=(0,a.useLocalState)(C,"end_datetime",l.end_datetime),re=oe[0],Z=oe[1],ae=(0,a.useLocalState)(C,"subtitle",l.subtitle),J=ae[0],X=ae[1],Q=(0,a.useLocalState)(C,"minimum_playtime",l.minimum_playtime),q=Q[0],te=Q[1],fe=(0,a.useLocalState)(C,"run_duration",l.run_duration),ye=fe[0],pe=fe[1],Le=(0,a.useLocalState)(C,"run_start",l.run_start),D=Le[0],ie=Le[1],se=(0,a.useLocalState)(C,"clear_votes",l.clear_votes),Ce=se[0],he=se[1];return(0,e.createComponentVNode)(2,p.Window,{title:"Poll Management",width:600,height:640,children:(0,e.createComponentVNode)(2,p.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Poll Creation",children:[(0,e.createComponentVNode)(2,t.Box,{children:["Question:",(0,e.createComponentVNode)(2,t.Input,{width:40,placeholder:"Question goes here",value:V,onChange:function(){function ve(Be,we){return v(we)}return ve}()}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{inline:!0,pl:1,children:"Choice:"}),(0,e.createComponentVNode)(2,t.Dropdown,{width:10,disabled:d,options:m,selected:g,onSelected:function(){function ve(Be){return N(Be)}return ve}()}),d&g!=="Multiple Choice"?null:(0,e.createComponentVNode)(2,t.Box,{inline:!0,children:["Mult-choice options allowed:",(0,e.createComponentVNode)(2,t.NumberInput,{width:3,minValue:0,maxValue:100,value:B,onChange:function(){function ve(Be,we){return L(!B)}return ve}()})]}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.ButtonCheckbox,{content:"Admin only",checked:A,onClick:function(){function ve(){return E(!A)}return ve}()}),(0,e.createComponentVNode)(2,o.ButtonCheckbox,{content:"Don't show",checked:O,onClick:function(){function ve(){return M(!O)}return ve}()}),(0,e.createComponentVNode)(2,o.ButtonCheckbox,{content:"Allow revoting",checked:F,onClick:function(){function ve(){return R(!F)}return ve}()}),"Min. playtime to vote (in hours):",(0,e.createComponentVNode)(2,t.Box,{inline:!0,ml:1,children:(0,e.createComponentVNode)(2,t.NumberInput,{width:3,placeholder:"Number of hours",value:q,onChange:function(){function ve(Be,we){return te(we)}return ve}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",children:[(0,e.createComponentVNode)(2,t.Box,{children:"Duration"}),(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",py:1,content:ye?"Run for":"Run until",onClick:function(){function ve(){return pe(!ye)}return ve}()}),ye?(0,e.createComponentVNode)(2,t.Box,{inline:!0,children:[(0,e.createComponentVNode)(2,t.NumberInput,{placeholder:"Amount number",width:3,minValue:0,maxValue:100,value:$,onChange:function(){function ve(Be,we){return ne(we)}return ve}()}),(0,e.createComponentVNode)(2,t.Dropdown,{options:i,selected:j,onSelected:function(){function ve(Be){return W(Be)}return ve}()})]}):(0,e.createComponentVNode)(2,t.Box,{inline:!0,children:["Until:",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Input,{width:15,placeholder:"YYYY-MM-DD HH:MM:SS",value:re||"1970-01-01 00:00:01",onChange:function(){function ve(Be,we){return Z(we)}return ve}()})]})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Box,{children:"Start"}),(0,e.createComponentVNode)(2,t.Button,{content:D?"Now":"At datetime",onClick:function(){function ve(){return ie(!D)}return ve}()}),D?null:(0,e.createComponentVNode)(2,t.Input,{width:15,placeholder:"YYYY-MM-DD HH:MM:SS",value:le||"1970-01-01 00:00:01",onChange:function(){function ve(Be,we){return de(we)}return ve}()})]})]}),(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:["Subtitle (Optional)",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.TextArea,{height:10,width:20,rows:"12",value:J,onChange:function(){function ve(Be,we){return X(we)}return ve}()})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:d?(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Clear poll votes",onClick:function(){function ve(){return u("clear_poll_votes")}return ve}()}),l.poll_votes," players have voted"]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,o.ButtonCheckbox,{content:"Clear votes on edit",checked:Ce,onClick:function(){function ve(){return he(!Ce)}return ve}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{p:2,content:"Submit Poll",onClick:function(){function ve(){return u("submit_poll",{question:V,poll_type:g,options_allowed:B,admin_only:A,dont_show:O,allow_revoting:F,interval:j,duration:$,start_datetime:le,end_datetime:re,subtitle:J,poll_votes:q,run_duration:ye,run_start:D,clear_votes:Ce})}return ve}()})})]}):(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{p:1,m:2,content:"Initliaze Question",onClick:function(){function ve(){return u("initialize_poll",{question:V,poll_type:g,options_allowed:B,admin_only:A,dont_show:O,allow_revoting:F,interval:j,duration:$,start_datetime:le,end_datetime:re,subtitle:J,poll_votes:q,run_duration:ye,run_start:D,clear_votes:Ce})}return ve}()})})})})]})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Questions Manage",children:d?(0,e.createComponentVNode)(2,y):(0,e.createComponentVNode)(2,t.Box,{children:"First enter the poll question details and press Initialize Question. Then add poll options and press Submit Poll to save and create the question and options. No options are required for Text Reply polls."})})]})})}return S}(),y=function(b,C){var c=(0,a.useBackend)(C),u=c.act,f=c.data,l=f.poll,d=l.options,m=(0,a.useLocalState)(C,"poll_type",null),i=m[0],h=m[1];return(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Add Option",onClick:function(){function V(){return u("add_poll_option")}return V}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:d.map(function(V){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Option "+V.num,children:[V.text,i==="Rating"?(0,e.createComponentVNode)(2,t.Box,{children:["Minimum value: ",V.min_val," | Maximum value:"," ",V.max_val,"Minimum description: ",V.desc_min,"Middle description: ",V.desc_mid,"Maximum description: ",V.desc_max]}):null,(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Edit",onClick:function(){function v(){return u("edit_poll_option",{option_to_edit:V.id})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Delete",onClick:function(){function v(){return u("delete_poll_option",{option_to_delete:V.id})}return v}()}),(0,e.createComponentVNode)(2,t.Divider)]},"option")})})})]})}},80378:function(I,r,n){"use strict";r.__esModule=!0,r.PollOptionPanel=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(94798),p=n(98595),k=r.PollOptionPanel=function(){function y(S,b){var C=(0,a.useBackend)(b),c=C.act,u=C.data,f=u.poll_question,l=u.is_rating,d=u.option,m=(0,a.useLocalState)(b,"text",d.text),i=m[0],h=m[1],V=(0,a.useLocalState)(b,"default_percentage_calc",d.default_percentage_calc),v=V[0],s=V[1],g=(0,a.useLocalState)(b,"min_val",d.min_val),N=g[0],x=g[1],B=(0,a.useLocalState)(b,"max_val",d.max_val),L=B[0],T=B[1],A=(0,a.useLocalState)(b,"desc_min_check",d.desc_min_check),E=A[0],w=A[1],O=(0,a.useLocalState)(b,"desc_mid_check",d.desc_mid_check),M=O[0],P=O[1],F=(0,a.useLocalState)(b,"desc_max_check",d.desc_max_check),R=F[0],U=F[1],j=(0,a.useLocalState)(b,"desc_min_text",d.desc_min_text),W=j[0],K=j[1],$=(0,a.useLocalState)(b,"desc_mid_text",d.desc_min_text),ne=$[0],Y=$[1],le=(0,a.useLocalState)(b,"desc_max_text",d.desc_min_text),de=le[0],oe=le[1];return(0,e.createComponentVNode)(2,p.Window,{title:"Poll Option Panel",width:400,height:l?320:180,children:(0,e.createComponentVNode)(2,p.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:f,children:[(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Input,{width:"100%",content:i,onChange:function(){function re(Z,ae){return h(ae)}return re}()})}),(0,e.createVNode)(1,"br"),l?(0,e.createComponentVNode)(2,t.Box,{children:["Minimum value",(0,e.createComponentVNode)(2,t.Input,{value:N}),"Maximum Value",(0,e.createComponentVNode)(2,t.Input,{value:L}),(0,e.createComponentVNode)(2,Table,{children:[(0,e.createComponentVNode)(2,Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,Table.Cell,{children:(0,e.createComponentVNode)(2,o.ButtonCheckbox,{content:"Minimum description",checked:E,onClick:function(){function re(){return w(!E)}return re}()})}),(0,e.createComponentVNode)(2,Table.Cell,{children:(0,e.createComponentVNode)(2,o.ButtonCheckbox,{content:"Middle description",checked:M,onClick:function(){function re(){return P(!M)}return re}()})}),(0,e.createComponentVNode)(2,Table.Cell,{children:(0,e.createComponentVNode)(2,o.ButtonCheckbox,{content:"Maximum description",checked:R,onClick:function(){function re(){return U(!R)}return re}()})})]}),(0,e.createComponentVNode)(2,Table.Row,{children:[(0,e.createComponentVNode)(2,Table.Cell,{children:(0,e.createComponentVNode)(2,t.Input,{value:W,onEnter:function(){function re(Z,ae){return K(ae)}return re}()})}),(0,e.createComponentVNode)(2,Table.Cell,{children:(0,e.createComponentVNode)(2,t.Input,{value:ne,onEnter:function(){function re(Z,ae){return Y(ae)}return re}()})}),(0,e.createComponentVNode)(2,Table.Cell,{children:(0,e.createComponentVNode)(2,t.Input,{value:de,onEnter:function(){function re(Z,ae){return oe(ae)}return re}()})})]})]}),(0,e.createVNode)(1,"br")]}):null,(0,e.createComponentVNode)(2,o.ButtonCheckbox,{checked:v,content:"\u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043E\u043F\u0446\u0438\u044E \u0432 \u0440\u0430\u0441\u0447\u0435\u0442 \u043F\u0440\u043E\u0446\u0435\u043D\u0442\u0430 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432 \u043E\u043F\u0440\u043E\u0441\u0430",onClick:function(){function re(){return s(!v)}return re}()}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Sumbit",onClick:function(){function re(){return c("submit_option",{text:i,default_percentage_calc:v,min_val:N,max_val:L,desc_min_check:E,desc_mid_check:M,desc_max_check:R,desc_min_text:W,desc_mid_text:ne,desc_max_text:de})}return re}()})]})})})}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),p=["tempKey"];function k(C,c){if(C==null)return{};var u={};for(var f in C)if({}.hasOwnProperty.call(C,f)){if(c.includes(f))continue;u[f]=C[f]}return u}var y={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}},S=function(c,u){var f=c.tempKey,l=k(c,p),d=y[f];if(!d)return null;var m=(0,a.useBackend)(u),i=m.data,h=m.act,V=i.currentTemp,v=d.label,s=d.icon,g=f===V,N=function(){h("setTemp",{temp:f})};return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Button,Object.assign({selected:g,onClick:N},l,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:s}),v]})))},b=r.PoolController=function(){function C(c,u){for(var f=(0,a.useBackend)(u),l=f.data,d=l.emagged,m=l.currentTemp,i=y[m]||y.normal,h=i.label,V=i.color,v=[],s=0,g=Object.entries(y);s50?"battery-half":"battery-quarter")||V==="C"&&"bolt"||V==="F"&&"battery-full"||V==="M"&&"slash",color:V==="N"&&(v>50?"yellow":"red")||V==="C"&&"yellow"||V==="F"&&"green"||V==="M"&&"orange"}),(0,e.createComponentVNode)(2,S.Box,{inline:!0,width:"36px",textAlign:"right",children:(0,o.toFixed)(v)+"%"})],4)};d.defaultHooks=p.pureComponentHooks;var m=function(h){var V,v,s=h.status;switch(s){case"AOn":V=!0,v=!0;break;case"AOff":V=!0,v=!1;break;case"On":V=!1,v=!0;break;case"Off":V=!1,v=!1;break}var g=(v?"On":"Off")+(" ["+(V?"auto":"manual")+"]");return(0,e.createComponentVNode)(2,S.ColorBox,{color:v?"good":"bad",content:V?void 0:"M",title:g})};m.defaultHooks=p.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),p=n(3939),k=n(321),y=n(5485),S=n(98595),b=r.PrisonerImplantManager=function(){function C(c,u){var f=(0,a.useBackend)(u),l=f.act,d=f.data,m=d.loginState,i=d.prisonerInfo,h=d.chemicalInfo,V=d.trackingInfo,v;if(!m.logged_in)return(0,e.createComponentVNode)(2,S.Window,{theme:"security",width:500,height:850,children:(0,e.createComponentVNode)(2,S.Window.Content,{children:(0,e.createComponentVNode)(2,y.LoginScreen)})});var s=[1,5,10];return(0,e.createComponentVNode)(2,S.Window,{theme:"security",width:500,height:850,children:[(0,e.createComponentVNode)(2,p.ComplexModal),(0,e.createComponentVNode)(2,S.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k.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:i.name?"eject":"id-card",selected:i.name,content:i.name?i.name:"-----",tooltip:i.name?"Eject ID":"Insert ID",onClick:function(){function g(){return l("id_card")}return g}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Points",children:[i.points!==null?i.points:"-/-",(0,e.createComponentVNode)(2,t.Button,{ml:2,icon:"minus-square",disabled:i.points===null,content:"Reset",onClick:function(){function g(){return l("reset_points")}return g}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Point Goal",children:[i.goal!==null?i.goal:"-/-",(0,e.createComponentVNode)(2,t.Button,{ml:2,icon:"pen",disabled:i.goal===null,content:"Edit",onClick:function(){function g(){return(0,p.modalOpen)(u,"set_points")}return g}()})]}),(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:i.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:V.map(function(g){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: ",g.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:g.location}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health",children:g.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,p.modalOpen)(u,"warn",{uid:g.uid})}return N}()})})]})]},g.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:h.map(function(g){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: ",g.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:g.volume})}),s.map(function(N){return(0,e.createComponentVNode)(2,t.Button,{mt:2,disabled:g.volume1100?"purple":m>500?"orange":m>250?"yellow":"green"},S=function(m,i){for(var h=[],V=0;V0?"envelope-open-text":"envelope",onClick:function(){function x(){return h("setScreen",{setScreen:6})}return x}()})}),(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 x(){return h("setScreen",{setScreen:1})}return x}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Request Supplies",icon:"box",onClick:function(){function x(){return h("setScreen",{setScreen:2})}return x}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Relay Anonymous Information",icon:"comment",onClick:function(){function x(){return h("setScreen",{setScreen:3})}return x}()})})]}),(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 x(){return h("setScreen",{setScreen:9})}return x}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"View Shipping Logs",icon:"clipboard-list",onClick:function(){function x(){return h("setScreen",{setScreen:10})}return x}()})})]}),!!s&&(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 x(){return h("setScreen",{setScreen:8})}return x}()})}),(0,e.createComponentVNode)(2,t.Box,{mt:2,children:(0,e.createComponentVNode)(2,t.Button,{content:g?"Speaker Off":"Speaker On",selected:!g,icon:g?"volume-mute":"volume-up",onClick:function(){function x(){return h("toggleSilent")}return x}()})})]})},S=function(d,m){var i=(0,a.useBackend)(m),h=i.act,V=i.data,v=V.department,s,g;switch(d.purpose){case"ASSISTANCE":s=V.assist_dept,g="Request assistance from another department";break;case"SUPPLIES":s=V.supply_dept,g="Request supplies from another department";break;case"INFO":s=V.info_dept,g="Relay information to another department";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 N(){return h("setScreen",{setScreen:0})}return N}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:s.filter(function(N){return N!==v}).map(function(N){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:N,children:[(0,e.createComponentVNode)(2,t.Button,{content:"Message",icon:"envelope",onClick:function(){function x(){return h("writeInput",{write:N,priority:1})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:"High Priority",icon:"exclamation-circle",onClick:function(){function x(){return h("writeInput",{write:N,priority:2})}return x}()})]},N)})})})},b=function(d,m){var i=(0,a.useBackend)(m),h=i.act,V=i.data,v;switch(d.type){case"SUCCESS":v="Message sent successfully";break;case"FAIL":v="Request supplies from another department";break}return(0,e.createComponentVNode)(2,t.Section,{title:v,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function s(){return h("setScreen",{setScreen:0})}return s}()})})},C=function(d,m){var i=(0,a.useBackend)(m),h=i.act,V=i.data,v,s;switch(d.type){case"MESSAGES":v=V.message_log,s="Message Log";break;case"SHIPPING":v=V.shipping_log,s="Shipping label print log";break}return(0,e.createComponentVNode)(2,t.Section,{title:s,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function g(){return h("setScreen",{setScreen:0})}return g}()}),children:v.map(function(g){return(0,e.createComponentVNode)(2,t.Box,{className:"RequestConsole__message",children:g},g)})})},c=function(d,m){var i=(0,a.useBackend)(m),h=i.act,V=i.data,v=V.recipient,s=V.message,g=V.msgVerified,N=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 x(){return h("setScreen",{setScreen:0})}return x}()}),children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Recipient",children:v}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Message",children:s}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Validated by",color:"green",children:g}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Stamped by",color:"blue",children:N})]}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mt:1,textAlign:"center",content:"Send Message",icon:"envelope",onClick:function(){function x(){return h("department",{department:v})}return x}()})]})},u=function(d,m){var i=(0,a.useBackend)(m),h=i.act,V=i.data,v=V.message,s=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 g(){return h("setScreen",{setScreen:0})}return g}()}),children:[(0,e.createComponentVNode)(2,t.Button,{content:v||"Edit Message",icon:"edit",onClick:function(){function g(){return h("writeAnnouncement")}return g}()}),s?(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:!(s&&v),onClick:function(){function g(){return h("sendAnnouncement")}return g}()})]})},f=function(d,m){var i=(0,a.useBackend)(m),h=i.act,V=i.data,v=V.shipDest,s=V.msgVerified,g=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 N(){return h("setScreen",{setScreen:0})}return N}()}),children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Destination",children:v}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Validated by",children:s})]}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mt:1,textAlign:"center",content:"Print Label",icon:"print",disabled:!(v&&s),onClick:function(){function N(){return h("printLabel")}return N}()}),(0,e.createComponentVNode)(2,t.Section,{title:"Destinations",mt:1,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:g.map(function(N){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:N,children:(0,e.createComponentVNode)(2,t.Button,{content:v===N?"Selected":"Select",selected:v===N,onClick:function(){function x(){return h("shipSelect",{shipSelect:N})}return x}()})},N)})})})]})}},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),p=n(98595);/**
* @file
* @copyright 2021 bobbahbrown (https://github.com/bobbahbrown)
* @coauthor 2022 BeebBeebBoob (https://github.com/BeebBeebBoob)