diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm index 57eecdb41a80..d200f7c9dc17 100644 --- a/code/__HELPERS/text.dm +++ b/code/__HELPERS/text.dm @@ -62,6 +62,14 @@ for(var/i in 1 to times) . += string +// Создает строку используя список из ASCII +/proc/ascii_list2text(list/ascii_text) + . = "" + for(var/ascii_char in ascii_text) + if(ascii_char < 32 || ascii_char > 127) + CRASH("ascii_list2text: invalid ASCII code") + . += ascii2text(ascii_char) + /// Runs sanitize and strip_html_simple /// I believe strip_html_simple() is required to run first to prevent '<' from displaying as '<' after sanitize() calls byond's html_encode() /proc/strip_html(t, limit=MAX_MESSAGE_LEN) diff --git a/code/controllers/configuration/entries/config.dm b/code/controllers/configuration/entries/config.dm index 532336a04170..45dc9d5cfb4e 100644 --- a/code/controllers/configuration/entries/config.dm +++ b/code/controllers/configuration/entries/config.dm @@ -856,4 +856,6 @@ /datum/config_entry/flag/smart_cache_assets default = TRUE +/datum/config_entry/string/hmac_key + /datum/config_entry/flag/generate_assets_in_init diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm index 0d8e57c41eac..609282195a8a 100644 --- a/code/modules/research/circuitprinter.dm +++ b/code/modules/research/circuitprinter.dm @@ -309,6 +309,36 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis). update_static_data_for_all_viewers() +// Проверяет наличие всех данных +/obj/machinery/r_n_d/circuit_imprinter/proc/can_save_circuit_by_json(mob/living/user, json_data) + var/list/data = json_decode(json_data) + if(!islist(data)) + return FALSE + var/list/required_keys = list("dupe_data", "name", "materials", "integrated_circuit", "Icon", "IconState", "desc") + for(var/key in required_keys) + if(!LAZYACCESS(data, key)) + return FALSE + return TRUE + +// Для иморта платы +/obj/machinery/r_n_d/circuit_imprinter/proc/save_circuit_by_json(mob/living/user, json_data) + if(!can_save_circuit_by_json(user, json_data)) + return + + var/list/data = json_decode(json_data) + + for(var/list/component_data as anything in scanned_designs) + if(component_data["name"] == data["name"]) + balloon_alert(user, "название занято!") + return + + LAZYADD(scanned_designs, list(data)) + + balloon_alert(user, "схема сохранена") + playsound(src, 'sound/machines/ping.ogg', 50) + + update_static_data_for_all_viewers() + /obj/machinery/r_n_d/circuit_imprinter/proc/print_module(list/design) flick("[base_icon_state]_ani", src) @@ -376,6 +406,74 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis). LAZYREMOVE(scanned_designs, design) update_static_data_for_all_viewers() + if("export") + var/design_id = text2num(params["designId"]) + + if(design_id < 1 || design_id > length(scanned_designs)) + return TRUE + + var/list/design = LAZYACCESS(scanned_designs, design_id) + + var/mob/user= ui.user + + var/json_data = json_encode(design) + + var/hmac_key = CONFIG_GET(string/hmac_key) ? CONFIG_GET(string/hmac_key) : "" + + // Создает HMAC если ключ корректен + var/hmac_base64 = "" + if(validate_hmac_key(hmac_key)) + hmac_base64 = hmac_md5_base64(hmac_key, json_data) + + if(!hmac_base64) + tgui_alert(user, "Ошибка создания электронной подписи!", "Ошибка экспорта") + return TRUE + + var/json_base64 = rustg_encode_base64(json_data) + var/final_text = rustg_encode_base64("[json_base64].[hmac_base64]") + + hmac_key = "" // Удаляет значение ключа + + // Окно в вводом из которого можно скопировать текст + tgui_input_text(user, "Скопируйте текст схемы:", "Экспорт схемы", default = final_text, max_length=999999999) + + if("import") + var/mob/user = ui.user + + var/text = tgui_input_text(user, "Вставьте текст интегральной платы", "Импорт схемы", encode=FALSE, max_length = 999999999) + if(!text) + return TRUE + var/list/decoded_text_list = rustlib_decode_base64(text) + text = text && decoded_text_list ? ascii_list2text(decoded_text_list) : "" + + var/hmac_key = CONFIG_GET(string/hmac_key) ? CONFIG_GET(string/hmac_key) : "" + + if(!text || !findtext(text, ".")) + tgui_alert(user, "Ошибка расшифровки. Убедитесь в корректности данных", "Ошибка импорта") + return TRUE + + var/list/parts = splittext(text, ".") // [1] - json в виде списка ASCII [2] - HMAC в виде списка ASCII + + var/list/decoded_json_list = rustlib_decode_base64(parts[1]) + var/json_data = decoded_json_list ? ascii_list2text(decoded_json_list) : "" + + if(!json_data) + tgui_alert(user, "Некорректный JSON! Проверьте корректность данных.", "Ошибка импорта") + return TRUE + + // Создает HMAC если ключ корректен + var/hmac_base64 = "" + if(validate_hmac_key(hmac_key) && json_data) + hmac_base64 = hmac_md5_base64(hmac_key, json_data) + + // Сравнивает переданный и полученный HMAC + if(parts[2] != hmac_base64) + tgui_alert(user, "Ошибка электронной подписи! Проверьте корректность данных.", "Ошибка импорта") + return TRUE + + hmac_key = "" // Удаляет значение ключа + + save_circuit_by_json(user, json_data) return TRUE diff --git a/code/modules/wiremod/core/hmac.dm b/code/modules/wiremod/core/hmac.dm new file mode 100644 index 000000000000..ba85e8234f75 --- /dev/null +++ b/code/modules/wiremod/core/hmac.dm @@ -0,0 +1,104 @@ +#define HMAC_BLOCK_SIZE 64 +#define HMAC_IPAD 54 // ASCII "6" +#define HMAC_OPAD 92 // ASCII "\" + +/* + * Основная функция HMAC-MD5 + * hex_key - ключ в hex-формате + * data - данные для подписи + */ +/proc/hmac_md5_hex(hex_key, data) + var/key_bin = hex_to_bin(hex_key) + + if(!key_bin) + CRASH("hmac_md5_hex: Invalid hex key for HMAC") + + if(length(key_bin) > HMAC_BLOCK_SIZE) + key_bin = hex_to_bin(md5(key_bin)) + + if(length(key_bin) < HMAC_BLOCK_SIZE) + key_bin += repeat_string(HMAC_BLOCK_SIZE - length(key_bin), "0") + + var/ipad = repeat_string(HMAC_BLOCK_SIZE, ascii2text(HMAC_IPAD)) + var/opad = repeat_string(HMAC_BLOCK_SIZE, ascii2text(HMAC_OPAD)) + + var/i_key = xor_strings(key_bin, ipad) + var/o_key = xor_strings(key_bin, opad) + + var/inner_hash = md5(i_key + data) + + var/inner_hash_bin = hex_to_bin(inner_hash) + var/hmac_hex = md5(o_key + inner_hash_bin) + + return hmac_hex + +/proc/hmac_md5_base64(hex_key, data) + var/hmac_hex = hmac_md5_hex(hex_key, data) + var/hmac_bin = hex_to_bin(hmac_hex) + return rustg_encode_base64(hmac_bin) + +/proc/xor_strings(a, b) + if(length(a) != length(b)) + CRASH("XOR: strings of different lengths ([length(a)] vs [length(b)])") + + var/result = "" + for(var/i = 1; i <= length(a); i++) + var/byte_a = text2ascii(copytext(a, i, i+1)) + var/byte_b = text2ascii(copytext(b, i, i+1)) + result += ascii2text(byte_a ^ byte_b) + + return result + +/proc/hex_to_bin(hex_string) + if(!istext(hex_string)) + return null + + hex_string = replacetext(hex_string, " ", "") + hex_string = replacetext(hex_string, "\n", "") + hex_string = replacetext(hex_string, "\t", "") + + if(length(hex_string) % 2 != 0) + hex_string = "0" + hex_string + + var/bin = "" + for(var/i = 1; i <= length(hex_string); i += 2) + var/hex_pair = copytext(hex_string, i, i+2) + var/num = hex2num(hex_pair) + + if(isnull(num)) + return null + + bin += ascii2text(num) + + return bin + +/proc/bin_to_hex(bin_string) + if(!istext(bin_string)) + return "" + + var/hex = "" + for(var/i = 1; i <= length(bin_string); i++) + var/byte = text2ascii(copytext(bin_string, i, i+1)) + hex += num2hex(byte, 2) + + return lowertext(hex) + +/proc/validate_hmac_key(hex_key) + if(!istext(hex_key)) + return FALSE + + var/len = length(hex_key) + if(len != 40 && len != HMAC_BLOCK_SIZE) + return FALSE + + var/valid_chars = "0123456789abcdefABCDEF" + for(var/i = 1; i <= len; i++) + var/char = copytext(hex_key, i, i+1) + if(!findtext(valid_chars, char)) + return FALSE + + return TRUE + +#undef HMAC_BLOCK_SIZE +#undef HMAC_IPAD +#undef HMAC_OPAD diff --git a/config/example/config.txt b/config/example/config.txt index a8167c60c065..e795385ceec5 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -520,4 +520,9 @@ CACHE_ASSETS 0 ## This config option limits the maximum chunk count for which the server will accept a payload, default is 32 TGUI_MAX_CHUNK_COUNT 128 +## HMAC key for encode integrated circuit +## Written as hex in a string +## Size - 40 or 64 characters +HMAC_KEY ffffffffffffffffffffffffffffffffffffffff + ### INITIALIZATION SETTINGS END ### diff --git a/paradise.dme b/paradise.dme index f0e763f1f1a7..96e7e2a4999a 100644 --- a/paradise.dme +++ b/paradise.dme @@ -3880,6 +3880,7 @@ #include "code\modules\wiremod\core\component.dm" #include "code\modules\wiremod\core\datatypes.dm" #include "code\modules\wiremod\core\duplicator.dm" +#include "code\modules\wiremod\core\hmac.dm" #include "code\modules\wiremod\core\integrated_circuit.dm" #include "code\modules\wiremod\core\marker.dm" #include "code\modules\wiremod\core\port.dm" diff --git a/tgui/packages/tgui/interfaces/ComponentPrinter.tsx b/tgui/packages/tgui/interfaces/ComponentPrinter.tsx index 93ed032f7105..9e4787949ed2 100644 --- a/tgui/packages/tgui/interfaces/ComponentPrinter.tsx +++ b/tgui/packages/tgui/interfaces/ComponentPrinter.tsx @@ -31,6 +31,14 @@ export const ComponentPrinter = (props) => { return ( +
act('import')}> + {toTitleCase('Import')} + + } + /> {Object.values(designs).length === 0 && ( @@ -38,7 +46,7 @@ export const ComponentPrinter = (props) => { )} {Object.values(designs).map((design) => ( -
+
{ {toTitleCase(design.name)} - {(design.cost && - Object.keys(design.cost) - .map((mat) => toTitleCase(mat) + ': ' + design.cost[mat]) - .join(', ')) || Ресурсы для печати не требуются.} - - +
))} diff --git a/tgui/public/tgui.bundle.js b/tgui/public/tgui.bundle.js index d3dfb67816f7..412f26761fa6 100644 --- a/tgui/public/tgui.bundle.js +++ b/tgui/public/tgui.bundle.js @@ -263,7 +263,7 @@ User Agent: `+navigator.userAgent;Byond.sendMessage({type:"log",ns:m,message:l}) * @file * @copyright 2020 Aleksej Komarov * @license MIT - */var b=function(f){var m=f.children;return(0,e.jsx)("table",{className:"LabeledList",children:(0,e.jsx)("tbody",{children:m})})},y=function(f){var m=f.className,d=f.label,v=f.labelColor,_=v===void 0?"label":v,l=f.labelWrap,c=f.labelStyle,h=f.color,g=f.textAlign,p=f.buttons,j=f.content,x=f.children,C=f.verticalAlign,I=C===void 0?"baseline":C,P=f.tooltip,M;d&&(M=d,typeof d=="string"&&(M+=":")),P!==void 0&&(M=(0,e.jsx)(O.m,{content:P,children:(0,e.jsx)(t.a,{as:"span",style:{borderBottom:"2px dotted rgba(255, 255, 255, 0.8)"},children:M})}));var B=(0,e.jsx)(t.a,{as:"td",color:_,className:(0,s.Ly)(["LabeledList__cell",!l&&"LabeledList__label--nowrap"]),verticalAlign:I,style:c,children:M});return(0,e.jsxs)("tr",{className:(0,s.Ly)(["LabeledList__row",m]),children:[B,(0,e.jsxs)(t.a,{as:"td",color:h,textAlign:g,className:"LabeledList__cell",colSpan:p?void 0:2,verticalAlign:I,children:[j,x]}),p&&(0,e.jsx)("td",{className:"LabeledList__cell LabeledList__buttons",children:p})]})},u=function(f){var m=f.size?(0,n.zA)(Math.max(0,f.size-1)):0;return(0,e.jsx)("tr",{className:"LabeledList__row",children:(0,e.jsx)("td",{colSpan:3,style:{paddingTop:m,paddingBottom:m},children:(0,e.jsx)(a.c,{})})})};b.Divider=u,b.Item=y},5819:(q,S,r)=>{"use strict";r.r(S),r.d(S,{Healthanalyzer:()=>b});var e=r(1131),s=r(360),n=r(5180),t=r(3521),a=new Map([["upper body","\u0413\u0440\u0443\u0434\u044C"],["lower body","\u0416\u0438\u0432\u043E\u0442"],["head","\u0413\u043E\u043B\u043E\u0432\u0430"],["left arm","\u041B\u0435\u0432\u0430\u044F \u0440\u0443\u043A\u0430"],["right arm","\u041F\u0440\u0430\u0432\u0430\u044F \u0440\u0443\u043A\u0430"],["left leg","\u041B\u0435\u0432\u0430\u044F \u043D\u043E\u0433\u0430"],["right leg","\u041F\u0440\u0430\u0432\u0430\u044F \u043D\u043E\u0433\u0430"],["left foot","\u041B\u0435\u0432\u0430\u044F \u0441\u0442\u0443\u043F\u043D\u044F"],["right foot","\u041F\u0440\u0430\u0432\u0430\u044F \u0441\u0442\u0443\u043F\u043D\u044F"],["left hand","\u041B\u0435\u0432\u0430\u044F \u043A\u0438\u0441\u0442\u044C"],["right hand","\u041F\u0440\u0430\u0432\u0430\u044F \u043A\u0438\u0441\u0442\u044C"],["monkey tail","\u0425\u0432\u043E\u0441\u0442 \u043E\u0431\u0435\u0437\u044C\u044F\u043D\u044B"],["wolpin tail","\u0425\u0432\u043E\u0441\u0442 \u0432\u0443\u043B\u044C\u043F\u0438\u043D\u0430"],["unathi tail","\u0425\u0432\u043E\u0441\u0442 \u0443\u043D\u0430\u0442\u0445\u0430"],["tajaran tail","\u0425\u0432\u043E\u0441\u0442 \u0442\u0430\u044F\u0440\u0430\u043D\u0430"],["vulpkanin tail","\u0425\u0432\u043E\u0441\u0442 \u0432\u0443\u043B\u044C\u043F\u043A\u0430\u043D\u0438\u043D\u0430"],["vox tail","\u0425\u0432\u043E\u0441\u0442 \u0432\u043E\u043A\u0441\u0430"],["wryn tail","\u0425\u0432\u043E\u0441\u0442 \u0432\u0440\u0438\u043D\u0430"],["luam wings","\u041A\u0440\u044B\u043B\u044C\u044F \u043B\u0443\u0430\u043C"]]),O=new Map([["Diona","\u0414\u0438\u043E\u043D\u0430"],["Human","\u0427\u0435\u043B\u043E\u0432\u0435\u043A"],["Drask","\u0414\u0440\u0430\u0441\u043A"],["Grey","\u0413\u0440\u0435\u0439"],["Vulpkanin","\u0412\u0443\u043B\u044C\u043F\u0430\u043A\u0438\u043D"],["Tajaran","\u0422\u0430\u044F\u0440\u0430\u043D"],["Skrell","\u0421\u043A\u0440\u0435\u043B\u043B"],["Nian","\u041D\u0438\u0430\u043D"],["Unathi","\u0423\u043D\u0430\u0442\u0445"],["Kidan","\u041A\u0438\u0434\u0430\u043D"],["Wryn","\u0412\u0440\u0438\u043D"],["Vox","\u0412\u043E\u043A\u0441"]]),b=function(_){var l=(0,s.Oc)().data,c=l.scan_data;return(0,e.jsx)(t.p8,{width:500,height:450,theme:l.theme?l.theme:"",title:l.scan_title?l.scan_title:"\u0410\u043D\u0430\u043B\u0438\u0437\u0430\u0442\u043E\u0440 \u0437\u0434\u043E\u0440\u043E\u0432\u044C\u044F",children:(0,e.jsx)(t.p8.Content,{scrollable:!0,children:function(){return c?c.status==="ERROR"||c.status==="FLOOR"?(0,e.jsxs)(n.az,{children:[(0,e.jsx)(n.wn,{title:"\u041F\u043E\u0432\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u044F",children:(0,e.jsxs)(n.Ki,{children:[(0,e.jsx)(n.Ki.Item,{label:"\u0422\u0438\u043F \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0439",children:(0,e.jsxs)(n.az,{children:[(0,e.jsx)("span",{style:{color:"#0080ff"},children:"\u0423\u0434\u0443\u0448\u044C\u0435"})," /"," ",(0,e.jsx)("span",{style:{color:"green"},children:"\u041E\u0442\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435"})," /"," ",(0,e.jsx)("span",{style:{color:"#FF8000"},children:"\u0422\u0435\u0440\u043C."})," /"," ",(0,e.jsx)("span",{style:{color:"red"},children:"\u041C\u0435\u0445."})]})}),(0,e.jsx)(n.Ki.Item,{label:"\u0421\u0442\u0435\u043F\u0435\u043D\u044C \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0439",children:(0,e.jsxs)(n.az,{children:[(0,e.jsx)("span",{style:{color:"#0080ff"},children:"?"})," -"," ",(0,e.jsx)("span",{style:{color:"green"},children:"?"})," -"," ",(0,e.jsx)("span",{style:{color:"#FF8000"},children:"?"})," -"," ",(0,e.jsx)("span",{style:{color:"red"},children:"?"})]})})]})}),(0,e.jsx)(n.wn,{title:"\u041E\u0431\u0449\u0435\u0435 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435",children:(0,e.jsxs)(n.Ki,{children:[(0,e.jsx)(n.Ki.Item,{label:"\u041E\u0446\u0435\u043D\u043A\u0430 \u0437\u0434\u043E\u0440\u043E\u0432\u044C\u044F",children:(0,e.jsx)(n.az,{color:"#c51e1e",bold:!0,children:"\u041E\u0428\u0418\u0411\u041A\u0410"})}),(0,e.jsx)(n.Ki.Item,{label:"\u0422\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u0442\u0435\u043B\u0430",children:"--- \xB0C --- \xB0F"}),(0,e.jsx)(n.Ki.Item,{label:"\u0423\u0440\u043E\u0432\u0435\u043D\u044C \u043A\u0440\u043E\u0432\u0438",children:"--- %, --- u, \u0442\u0438\u043F: ---, \u043A\u0440\u043E\u0432\u044C \u0440\u0430\u0441\u044B: ---"}),(0,e.jsx)(n.Ki.Item,{label:"\u041F\u0443\u043B\u044C\u0441",children:"--- \u0443\u0434/\u043C\u0438\u043D"}),(0,e.jsx)(n.Ki.Item,{label:"\u0413\u0435\u043D\u044B",children:"\u0413\u0435\u043D\u043D\u0430\u044F \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0430 \u043D\u0435 \u043E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u0430"})]})})]}):(0,e.jsxs)(n.az,{children:[(0,e.jsx)(y,{}),(0,e.jsx)(n.wn,{title:"\u041F\u043E\u0432\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u044F",children:(0,e.jsxs)(n.Ki,{children:[(0,e.jsx)(n.Ki.Item,{label:"\u0422\u0438\u043F \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0439",children:(0,e.jsxs)(n.az,{children:[(0,e.jsx)("span",{style:{color:"#0080ff"},children:"\u0423\u0434\u0443\u0448\u044C\u0435"})," /"," ",(0,e.jsx)("span",{style:{color:"green"},children:"\u041E\u0442\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435"})," /"," ",(0,e.jsx)("span",{style:{color:"#FF8000"},children:"\u0422\u0435\u0440\u043C."})," /"," ",(0,e.jsx)("span",{style:{color:"red"},children:"\u041C\u0435\u0445."})]})}),(0,e.jsx)(n.Ki.Item,{label:"\u0421\u0442\u0435\u043F\u0435\u043D\u044C \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0439",children:(0,e.jsxs)(n.az,{children:[c.damageLevels.oxy>0?(0,e.jsx)("span",{style:{color:"#0080ff",fontWeight:"bold"},children:c.damageLevels.oxy}):(0,e.jsx)("span",{style:{color:"#0080ff"},children:c.damageLevels.oxy})," ","-"," ",c.damageLevels.tox>0?(0,e.jsx)("span",{style:{color:"green",fontWeight:"bold"},children:c.damageLevels.tox}):(0,e.jsx)("span",{style:{color:"green"},children:c.damageLevels.tox})," ","-"," ",c.damageLevels.burn>0?(0,e.jsx)("span",{style:{color:"#FF8000",fontWeight:"bold"},children:c.damageLevels.burn}):(0,e.jsx)("span",{style:{color:"#FF8000"},children:c.damageLevels.burn})," ","-"," ",c.damageLevels.brute>0?(0,e.jsx)("span",{style:{color:"red",fontWeight:"bold"},children:c.damageLevels.brute}):(0,e.jsx)("span",{style:{color:"red"},children:c.damageLevels.brute})]})})]})}),(0,e.jsxs)(n.wn,{title:"\u0421\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435",children:[(0,e.jsxs)(n.Ki,{children:[(0,e.jsx)(n.Ki.Item,{label:"\u0421\u0442\u0430\u0442\u0443\u0441",children:c.status===2?(0,e.jsxs)(n.az,{color:"red",bold:!0,children:["\u0421\u043C\u0435\u0440\u0442\u044C"," ",!!c.DRN&&(0,e.jsx)("span",{style:{fontWeight:"bold"},children:"[\u041D\u0420]"})]}):c.health>0?(0,e.jsxs)(n.az,{children:[c.health,"% "]}):(0,e.jsxs)(n.az,{color:"red",bold:!0,children:[c.health,"%"," "]})}),c.status===2&&(0,e.jsx)(n.Ki.Item,{label:"\u0412\u0440\u0435\u043C\u044F \u0441\u043C\u0435\u0440\u0442\u0438",children:c.timeofdeath}),(0,e.jsxs)(n.Ki.Item,{label:"\u0422\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u0442\u0435\u043B\u0430",children:[c.bodyTemperatureC," \xB0C (",c.bodyTemperatureF," \xB0F)"]}),c.bloodData&&(0,e.jsxs)(n.Ki.Item,{label:"\u0423\u0440\u043E\u0432\u0435\u043D\u044C \u043A\u0440\u043E\u0432\u0438",children:[c.bloodData.blood_volume<=501&&c.bloodData.blood_volume>346&&(0,e.jsxs)("span",{style:{color:"red",fontWeight:"bold"},children:["\u041D\u0418\u0417\u041A\u0418\u0419"," "]}),c.bloodData.blood_volume<346&&(0,e.jsxs)("span",{style:{color:"red",fontWeight:"bold"},children:["\u041A\u0420\u0418\u0422\u0418\u0427\u0415\u0421\u041A\u0418\u0419"," "]}),c.bloodData.blood_percent," %,"," ",c.bloodData.blood_volume," u, \u0442\u0438\u043F:"," ",c.bloodData.blood_type,", \u043A\u0440\u043E\u0432\u044C \u0440\u0430\u0441\u044B:"," ",O.get(c.bloodData.blood_species),"."]}),(0,e.jsx)(n.Ki.Item,{label:"\u041F\u0443\u043B\u044C\u0441",children:(0,e.jsxs)("span",{style:{color:c.pulse_status===2?"#0080ff":"red"},children:[c.pulse," \u0443\u0434/\u043C\u0438\u043D"]})}),(0,e.jsx)(n.Ki.Item,{label:"\u0413\u0435\u043D\u044B",children:c.genes<40?(0,e.jsx)(n.az,{color:"red",bold:!0,children:"\u041A\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043A\u0430\u044F \u0433\u0435\u043D\u043D\u0430\u044F \u043D\u0435\u0441\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u043E\u0441\u0442\u044C."}):c.genes<70?(0,e.jsx)(n.az,{color:"red",bold:!0,children:"\u0422\u044F\u0436\u0451\u043B\u0430\u044F \u0433\u0435\u043D\u043D\u0430\u044F \u043D\u0435\u0441\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u043E\u0441\u0442\u044C."}):c.genes<85?(0,e.jsx)(n.az,{color:"red",children:"\u041D\u0435\u0437\u043D\u0430\u0447\u0438\u0442\u0435\u043B\u044C\u043D\u0430\u044F \u0433\u0435\u043D\u043D\u0430\u044F \u043D\u0435\u0441\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u043E\u0441\u0442\u044C."}):c.genes>40&&(0,e.jsx)(n.az,{children:"\u0413\u0435\u043D\u043D\u0430\u044F \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0430 \u0441\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u0430."})})]}),(0,e.jsx)(u,{})]}),c.status===2&&(0,e.jsx)(n.wn,{children:(0,e.jsxs)(n.az,{children:[(0,e.jsxs)(n.az,{textAlign:"center",bold:!0,color:"red",children:["\u0421\u0443\u0431\u044A\u0435\u043A\u0442 \u0443\u043C\u0435\u0440 ",c.timetodefib," \u043D\u0430\u0437\u0430\u0434"]}),(0,e.jsx)(n.az,{textAlign:"center",bold:!0,color:"red",children:c.timetodefibText})]})}),c.heartCondition==="CRIT"&&(0,e.jsx)(n.wn,{title:"\u0412\u043D\u0438\u043C\u0430\u043D\u0438\u0435: \u041A\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435!",mt:2,mb:2,color:"red",children:(0,e.jsxs)(n.Ki,{children:[(0,e.jsx)(n.Ki.Item,{label:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435",children:(0,e.jsx)(n.az,{bold:!0,children:"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0430 \u0441\u0435\u0440\u0434\u0446\u0430"})}),(0,e.jsx)(n.Ki.Item,{label:"\u0422\u0438\u043F",children:(0,e.jsx)(n.az,{bold:!0,children:"\u0421\u0435\u0440\u0434\u0446\u0435 \u043F\u0430\u0446\u0438\u0435\u043D\u0442\u0430 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u043B\u043E\u0441\u044C"})}),(0,e.jsx)(n.Ki.Item,{label:"\u0421\u0442\u0430\u0434\u0438\u044F",children:(0,e.jsx)(n.az,{bold:!0,children:"1/1"})}),(0,e.jsx)(n.Ki.Item,{label:"\u041B\u0435\u0447\u0435\u043D\u0438\u0435",children:(0,e.jsx)(n.az,{bold:!0,children:"\u042D\u043B\u0435\u043A\u0442\u0440\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0448\u043E\u043A"})})]})}),l.localize&&(c.damageLocalization||c.fractureList[0]||c.infectedList[0]||c.bleedingList[0]||c.extraFacture)?(0,e.jsxs)(n.wn,{title:"\u041B\u043E\u043A\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0439",children:[!!c.damageLocalization&&(0,e.jsx)(n.az,{children:(0,e.jsx)(n.Ki,{children:c.damageLocalization.map(function(h,g){return(0,e.jsx)(n.Ki.Item,{label:a.get(h.name),children:(0,e.jsxs)(n.az,{children:[(0,e.jsx)("span",{style:{color:"#FF8000"},children:h.burn})," ","-"," ",(0,e.jsx)("span",{style:{color:"red"},children:h.brute})]})},g)})})}),!!c.fractureList[0]&&(0,e.jsx)(n.az,{children:c.fractureList.map(function(h,g){return(0,e.jsxs)(n.az,{color:"#c51e1e",mt:1,children:["\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D \u043F\u0435\u0440\u0435\u043B\u043E\u043C \u0432 ",h,"."]},g)})}),!!c.bleedingList[0]&&(0,e.jsx)(n.az,{children:c.bleedingList.map(function(h,g){return(0,e.jsxs)(n.az,{color:"#c51e1e",mt:1,children:[h,"."]},g)})}),!!c.infectedList[0]&&(0,e.jsx)(n.az,{children:c.infectedList.map(function(h,g){return(0,e.jsxs)(n.az,{color:"#c51e1e",mt:1,children:["\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E \u0437\u0430\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0432 ",h,"."]},g)})}),!!c.extraFacture&&(0,e.jsx)(n.az,{color:"#c51e1e",mt:1,children:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u044B \u043F\u0435\u0440\u0435\u043B\u043E\u043C\u044B. \u041B\u043E\u043A\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u0430."}),!!c.extraBleeding&&(0,e.jsx)(n.az,{color:"#c51e1e",mt:1,children:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E \u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0435\u0435 \u043A\u0440\u043E\u0432\u043E\u0442\u0435\u0447\u0435\u043D\u0438\u0435. \u041B\u043E\u043A\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u0430."})]}):!l.localize&&(!!c.fractureList[0]||c.infectedList[0]||!!c.extraFacture||!!c.extraBleeding)&&(0,e.jsxs)(n.wn,{title:"\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u0430\u044F \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F",children:[!!c.fractureList[0]&&(0,e.jsx)(n.az,{children:c.fractureList.map(function(h,g){return(0,e.jsxs)(n.az,{color:"#c51e1e",mt:1,children:["\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D \u043F\u0435\u0440\u0435\u043B\u043E\u043C \u0432 ",h,"."]},g)})}),!!c.bleedingList[0]&&(0,e.jsx)(n.az,{children:c.bleedingList.map(function(h,g){return(0,e.jsxs)(n.az,{color:"#c51e1e",mt:1,children:[h,"."]},g)})}),!!c.infectedList[0]&&(0,e.jsx)(n.az,{children:c.infectedList.map(function(h,g){return(0,e.jsxs)(n.az,{color:"#c51e1e",mt:1,children:["\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E \u0437\u0430\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0432 ",h,"."]},g)})}),!!c.extraFacture&&(0,e.jsx)(n.az,{color:"#c51e1e",mt:1,children:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u044B \u043F\u0435\u0440\u0435\u043B\u043E\u043C\u044B. \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0435 \u0441\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435."}),!!c.extraBleeding&&(0,e.jsx)(n.az,{color:"#c51e1e",mt:1,children:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E \u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0435\u0435 \u043A\u0440\u043E\u0432\u043E\u0442\u0435\u0447\u0435\u043D\u0438\u0435. \u041B\u043E\u043A\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u0430."})]}),!!c.reagentList&&(0,e.jsx)(m,{}),!!c.diseases[0]&&(0,e.jsx)(f,{}),!!c.addictionList&&(0,e.jsx)(d,{}),!!c.implantDetect&&(0,e.jsx)(v,{}),(0,e.jsx)(n.wn,{title:"\u0421\u0442\u0440\u0430\u0445\u043E\u0432\u043A\u0430",children:(0,e.jsxs)(n.Ki,{children:[(0,e.jsx)(n.Ki.Item,{label:"\u0422\u0438\u043F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u043A\u0438 ",children:c.insuranceType}),(0,e.jsx)(n.Ki.Item,{label:"\u0422\u0440\u0435\u0431\u0443\u0435\u043C\u043E\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043E\u0447\u043A\u043E\u0432 \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u043A\u0438",children:c.reqInsurance}),!!c.insurance&&(0,e.jsx)(n.Ki.Item,{label:"\u0422\u0435\u043A\u0443\u0449\u0435\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043E\u0447\u043A\u043E\u0432 \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u043A\u0438",children:c.insurance})]})})]}):(0,e.jsx)(n.az,{textAlign:"center",bold:!0,children:"\u041F\u0430\u043C\u044F\u0442\u044C \u0430\u043D\u0430\u043B\u0438\u0437\u0430\u0442\u043E\u0440\u0430 \u0437\u0434\u043E\u0440\u043E\u0432\u044C\u044F \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u043E\u0447\u0438\u0449\u0435\u043D\u0430"})}()})})},y=function(_){var l=(0,s.Oc)(),c=l.act,h=l.data;return(0,e.jsx)(n.wn,{textAlign:"center",children:(0,e.jsxs)(n.az,{nowrap:!0,children:[(0,e.jsx)(n.$n,{icon:"trash",content:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",onClick:function(){return c("clear")}}),(0,e.jsx)(n.$n,{icon:"map-marker-alt",onClick:function(){return c("localize")},color:h.localize?"":"red",children:"\u041B\u043E\u043A\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F"}),!!h.advanced&&(0,e.jsx)(n.$n,{icon:"print",onClick:function(){return c("print")},children:"\u041F\u0435\u0447\u0430\u0442\u044C \u043E\u0442\u0447\u0451\u0442\u0430"}),!!h.advanced&&(0,e.jsx)(n.$n,{icon:"file-invoice-dollar",onClick:function(){return c("insurance")},children:"\u0421\u043F\u0438\u0441\u0430\u0442\u044C \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u043A\u0443"})]})})},u=function(_){var l=(0,s.Oc)().data,c=l.scan_data,h=c.heartCondition,g=c.brainDamage,p=c.bleed,j=c.staminaStatus,x=c.cloneStatus,C=c.brainWorms;return(0,e.jsxs)(n.az,{children:[h==="LESS"?(0,e.jsx)(n.az,{color:"#d82020",mt:1,bold:!0,children:"\u0421\u0435\u0440\u0434\u0446\u0435 \u043D\u0435 \u043E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E."}):h==="NECROSIS"&&(0,e.jsx)(n.az,{color:"#d82020",mt:1,bold:!0,children:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D \u043D\u0435\u043A\u0440\u043E\u0437 \u0441\u0435\u0440\u0434\u0446\u0430."}),g>100?(0,e.jsx)(n.az,{color:"#c51e1e",mt:1,bold:!0,children:"\u041C\u043E\u0437\u0433 \u043C\u0451\u0440\u0442\u0432"}):g>60?(0,e.jsx)(n.az,{color:"#c51e1e",mt:1,bold:!0,children:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E \u0441\u0435\u0440\u044C\u0451\u0437\u043D\u043E\u0435 \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0435 \u043C\u043E\u0437\u0433\u0430."}):g>10?(0,e.jsx)(n.az,{color:"#c51e1e",mt:1,children:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E \u0437\u043D\u0430\u0447\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0435 \u043C\u043E\u0437\u0433\u0430."}):g==="LESS"&&(0,e.jsx)(n.az,{color:"#c51e1e",mt:1,bold:!0,children:"\u041C\u043E\u0437\u0433 \u043D\u0435 \u043E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D."}),!!p&&(0,e.jsx)(n.az,{color:"#c51e1e",mt:1,bold:!0,children:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E \u043A\u0440\u043E\u0432\u043E\u0442\u0435\u0447\u0435\u043D\u0438\u0435!"}),!!j&&(0,e.jsx)(n.az,{color:"#0080ff",mt:1,bold:!0,children:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E \u0438\u0441\u0442\u043E\u0449\u0435\u043D\u0438\u0435."}),x>30?(0,e.jsx)(n.az,{color:"#c51e1e",mt:1,bold:!0,children:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E \u0441\u0435\u0440\u044C\u0451\u0437\u043D\u043E\u0435 \u043A\u043B\u0435\u0442\u043E\u0447\u043D\u043E\u0435 \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0435!"}):x>0&&(0,e.jsx)(n.az,{color:"#c51e1e",mt:1,children:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E \u043D\u0435\u0437\u043D\u0430\u0447\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u043A\u043B\u0435\u0442\u043E\u0447\u043D\u043E\u0435 \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0435."}),!!C&&(0,e.jsx)(n.az,{color:"#c51e1e",mt:1,bold:!0,children:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u044B \u043E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u0438\u044F \u0432 \u0440\u0430\u0431\u043E\u0442\u0435 \u043C\u043E\u0437\u0433\u0430."})]})},f=function(_){var l=(0,s.Oc)().data,c=l.scan_data.diseases;return(0,e.jsx)(n.az,{children:c.map(function(h,g){return(0,e.jsx)(n.wn,{title:"\u0412\u043D\u0438\u043C\u0430\u043D\u0438\u0435: "+h.form,mt:2,mb:2,color:"red",children:(0,e.jsxs)(n.Ki,{children:[(0,e.jsx)(n.Ki.Item,{label:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435",children:(0,e.jsx)(n.az,{bold:!0,children:h.name})}),(0,e.jsx)(n.Ki.Item,{label:"\u0422\u0438\u043F",children:(0,e.jsx)(n.az,{bold:!0,children:h.additional_info})}),(0,e.jsx)(n.Ki.Item,{label:"\u0421\u0442\u0430\u0434\u0438\u044F",children:(0,e.jsxs)(n.az,{bold:!0,children:[h.stage,"/",h.max_stages]})}),(0,e.jsx)(n.Ki.Item,{label:"\u041B\u0435\u0447\u0435\u043D\u0438\u0435",children:(0,e.jsx)(n.az,{bold:!0,children:h.cure_text})})]})},g)})})},m=function(_){var l=(0,s.Oc)().data,c=l.scan_data.reagentList;return(0,e.jsx)(n.wn,{title:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u044B \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0430",children:(0,e.jsx)(n.Ki,{children:c.map(function(h,g){return(0,e.jsx)(n.Ki.Item,{label:h.name,children:(0,e.jsxs)(n.az,{children:[h.volume," \u0435\u0434."," ",!!h.overdosed&&(0,e.jsx)(n.az,{as:"span",color:"red",bold:!0,children:"- \u041F\u0415\u0420\u0415\u0414\u041E\u0417\u0418\u0420\u041E\u0412\u041A\u0410!"})]})},g)})})})},d=function(_){var l=(0,s.Oc)().data,c=l.scan_data.addictionList;return(0,e.jsx)(n.wn,{title:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u044B \u0437\u0430\u0432\u0438\u0441\u0438\u043C\u043E\u0441\u0442\u0438",children:(0,e.jsx)(n.Ki,{children:c.map(function(h,g){return(0,e.jsx)(n.Ki.Item,{label:h.name,children:(0,e.jsxs)(n.az,{children:["\u0421\u0442\u0430\u0434\u0438\u044F: ",h.addiction_stage,"/5"]})},g)})})})},v=function(_){var l=(0,s.Oc)().data,c=l.scan_data.implantDetect;return(0,e.jsx)(n.wn,{title:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u044B \u043A\u0438\u0431\u0435\u0440\u043D\u0435\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0435 \u043C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u0438:",children:(0,e.jsx)(n.Ki,{children:c.map(function(h,g){return(0,e.jsx)(n.az,{ml:1,bold:!0,children:h},g)})})})}},5838:(q,S,r)=>{"use strict";r.r(S),r.d(S,{CircuitModule:()=>b});var e=r(1131),s=r(360),n=r(5180),t=r(3521);function a(){return a=Object.assign||function(u){for(var f=1;f=0)&&(m[v]=u[v]);return m}var b=function(u){var f=(0,s.Oc)(),m=f.act,d=f.data,v=d.input_ports,_=d.output_ports,l=d.global_port_types;return(0,e.jsx)(t.p8,{width:600,height:300,children:(0,e.jsx)(t.p8.Content,{scrollable:!0,children:(0,e.jsxs)(n.BJ,{vertical:!0,children:[(0,e.jsx)(n.BJ.Item,{children:(0,e.jsx)(n.$n,{textAlign:"center",fluid:!0,onClick:function(){return m("open_internal_circuit")},children:"\u041E\u0431\u0437\u043E\u0440 \u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0435\u0439 \u0438\u043D\u0442\u0435\u0433\u0440\u0430\u043B\u044C\u043D\u043E\u0439 \u0441\u0445\u0435\u043C\u044B"})}),(0,e.jsx)(n.BJ.Item,{children:(0,e.jsxs)(n.BJ,{width:"100%",children:[(0,e.jsx)(n.BJ.Item,{basis:"50%",children:(0,e.jsx)(n.wn,{title:"\u041F\u043E\u0440\u0442\u044B \u0432\u0432\u043E\u0434\u0430",children:(0,e.jsxs)(n.BJ,{vertical:!0,children:[v.map(function(c,h){return(0,e.jsx)(y,{name:c.name,datatype:c.type,datatypeOptions:l,onRemove:function(){return m("remove_input_port",{port_id:h+1})},onSetType:function(g){return m("set_port_type",{port_id:h+1,is_input:!0,port_type:g})},onEnter:function(g,p){return m("set_port_name",{port_id:h+1,is_input:!0,port_name:p})}},h)}),(0,e.jsx)(n.BJ.Item,{children:(0,e.jsx)(n.$n,{fluid:!0,color:"good",icon:"plus",onClick:function(){return m("add_input_port")},children:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043F\u043E\u0440\u0442 \u0432\u0432\u043E\u0434\u0430"})})]})})}),(0,e.jsx)(n.BJ.Item,{basis:"50%",children:(0,e.jsx)(n.wn,{title:"\u041F\u043E\u0440\u0442\u044B \u0432\u044B\u0432\u043E\u0434\u0430",children:(0,e.jsxs)(n.BJ,{vertical:!0,children:[_.map(function(c,h){return(0,e.jsx)(y,{name:c.name,datatype:c.type,datatypeOptions:l,onRemove:function(){return m("remove_output_port",{port_id:h+1})},onSetType:function(g){return m("set_port_type",{port_id:h+1,is_input:!1,port_type:g})},onEnter:function(g,p){return m("set_port_name",{port_id:h+1,is_input:!1,port_name:p})}},h)}),(0,e.jsx)(n.BJ.Item,{children:(0,e.jsx)(n.$n,{fluid:!0,color:"good",icon:"plus",onClick:function(){return m("add_output_port")},children:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043F\u043E\u0440\u0442 \u0432\u044B\u0432\u043E\u0434\u0430"})})]})})})]})})]})})})},y=function(u){var f=u.onRemove,m=u.onEnter,d=u.onSetType,v=u.name,_=u.datatype,l=u.datatypeOptions,c=l===void 0?[]:l,h=O(u,["onRemove","onEnter","onSetType","name","datatype","datatypeOptions"]);return(0,e.jsx)(n.BJ.Item,a({},h,{children:(0,e.jsxs)(n.BJ,{children:[(0,e.jsx)(n.BJ.Item,{grow:!0,children:(0,e.jsx)(n.pd,{placeholder:"Name",value:v,onChange:m})}),(0,e.jsx)(n.BJ.Item,{children:(0,e.jsx)(n.ms,{selected:_,options:c,onSelected:d,width:"100%"})}),(0,e.jsx)(n.BJ.Item,{children:(0,e.jsx)(n.$n,{icon:"times",color:"red",onClick:f})})]})}))}},5899:(q,S,r)=>{"use strict";r.r(S),r.d(S,{SpawnPanel:()=>m});var e=r(1131),s=r(7003),n=r(5180),t=r(3655),a=r(1243),O=r(3521),b=r(4947),y=r(9427),u=r(8151);function f(){return f=Object.assign||function(d){for(var v=1;v{"use strict";r.r(S),r.d(S,{ComponentPrinter:()=>O});var e=r(1131),s=r(360),n=r(3521),t=r(5180),a=r(9845),O=function(b){var y=(0,s.Oc)(),u=y.act,f=y.data,m=f.designs;return(0,e.jsx)(n.p8,{title:"\u0414\u0443\u0431\u043B\u0438\u043A\u0430\u0442\u043E\u0440 \u043F\u0435\u0447\u0430\u0442\u043D\u044B\u0445 \u043F\u043B\u0430\u0442",width:670,height:600,children:(0,e.jsx)(n.p8.Content,{children:(0,e.jsxs)(t.az,{children:[Object.values(m).length===0&&(0,e.jsx)(t.BJ.Item,{mt:1,fontSize:1,children:(0,e.jsx)(t.IC,{info:!0,children:"\u0421\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0435 \u0441\u0445\u0435\u043C\u044B \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442."})}),Object.values(m).map(function(d){return(0,e.jsxs)(t.wn,{children:[(0,e.jsx)(t.Hg,{icon:d.icon,icon_state:d.IconState,style:{verticalAlign:"middle",width:"32px",margin:"0px",marginLeft:"0px"}}),(0,e.jsx)(t.$n,{mr:1,icon:"hammer",tooltip:d.desc,onClick:function(){return u("print",{designId:d.id})},children:(0,a.Sn)(d.name)}),d.cost&&Object.keys(d.cost).map(function(v){return(0,a.Sn)(v)+": "+d.cost[v]}).join(", ")||(0,e.jsx)(t.az,{children:"\u0420\u0435\u0441\u0443\u0440\u0441\u044B \u0434\u043B\u044F \u043F\u0435\u0447\u0430\u0442\u0438 \u043D\u0435 \u0442\u0440\u0435\u0431\u0443\u044E\u0442\u0441\u044F."}),(0,e.jsx)(t.$n,{mr:1,icon:"trash-can",position:"absolute",right:1,top:1,onClick:function(){return u("del_design",{designId:d.id})}})]},d.id)})]})})})}},5951:(q,S,r)=>{"use strict";r.r(S),r.d(S,{ListInputModal:()=>b});var e=r(1131),s=r(7003),n=r(5180),t=r(683),a=r(360),O=r(30),b=function(u){var f=(0,a.Oc)().act,m=u.items,d=m===void 0?[]:m,v=u.default_item,_=u.message,l=u.on_selected,c=u.on_cancel,h=(0,s.useState)(d.indexOf(v)),g=h[0],p=h[1],j=(0,s.useState)(d.length>9),x=j[0],C=j[1],I=(0,s.useState)(""),P=I[0],M=I[1],B=function($){var W=F.length-1;if($===t.R)if(g===null||g===W){var N;p(0),(N=document.getElementById("0"))==null||N.scrollIntoView()}else{var Z;p(g+1),(Z=document.getElementById((g+1).toString()))==null||Z.scrollIntoView()}else if($===t.gf)if(g===null||g===0){var ie;p(W),(ie=document.getElementById(W.toString()))==null||ie.scrollIntoView()}else{var Q;p(g-1),(Q=document.getElementById((g-1).toString()))==null||Q.scrollIntoView()}},w=function($){$!==g&&p($)},T=function(){C(!1),setTimeout(function(){C(!0)},1)},K=function($){var W=String.fromCharCode($),N=d.find(function(Q){return Q?.toLowerCase().startsWith(W?.toLowerCase())});if(N){var Z,ie=d.indexOf(N);p(ie),(Z=document.getElementById(ie.toString()))==null||Z.scrollIntoView()}},R=function($){var W;$!==P&&(M($),p(0),(W=document.getElementById("0"))==null||W.scrollIntoView())},U=function(){C(!x),M("")},F=d.filter(function($){return $?.toLowerCase().includes(P.toLowerCase())});return x||setTimeout(function(){var $;return($=document.getElementById(g.toString()))==null?void 0:$.focus()},1),(0,e.jsx)(n.wn,{onKeyDown:function($){var W=window.event?$.which:$.keyCode;(W===t.R||W===t.gf)&&($.preventDefault(),B(W)),W===t.Ri&&($.preventDefault(),l(F[g])),!x&&W>=t.W8&&W<=t.bh&&($.preventDefault(),K(W)),W===t.s6&&($.preventDefault(),c())},buttons:(0,e.jsx)(n.$n,{compact:!0,icon:x?"search":"font",selected:!0,tooltip:x?"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(){return U()}}),className:"ListInput__Section",fill:!0,title:_,children:(0,e.jsxs)(n.BJ,{fill:!0,vertical:!0,children:[(0,e.jsx)(n.BJ.Item,{grow:!0,children:(0,e.jsx)(y,{filteredItems:F,onClick:w,onFocusSearch:T,searchBarVisible:x,selected:g})}),x&&(0,e.jsx)(n.pd,{autoFocus:!0,autoSelect:!0,fluid:!0,onEnter:function(){f("submit",{entry:F[g]})},expensive:!0,onChange:R,placeholder:"Search...",value:P}),(0,e.jsx)(n.BJ.Item,{children:(0,e.jsx)(O.InputButtons,{input:F[g],on_submit:function(){return l(F[g])},on_cancel:c})})]})})},y=function(u){var f=(0,a.Oc)().act,m=u.filteredItems,d=u.onClick,v=u.onFocusSearch,_=u.searchBarVisible,l=u.selected;return(0,e.jsxs)(n.wn,{fill:!0,scrollable:!0,children:[(0,e.jsx)(n.y5,{}),m.map(function(c,h){return(0,e.jsx)(n.$n,{className:h!==l?"candystripe":"",color:"transparent",fluid:!0,id:h,onClick:function(){return d(h)},onDoubleClick:function(g){g.preventDefault(),f("submit",{entry:m[l]})},onKeyDown:function(g){var p=window.event?g.which:g.keyCode;_&&p>=t.W8&&p<=t.bh&&(g.preventDefault(),v())},selected:h===l,style:{animation:"none",transition:"none"},children:c.replace(/^\w/,function(g){return g.toUpperCase()})},h)})]})}},5959:(q,S,r)=>{"use strict";r.r(S),r.d(S,{Tank:()=>a});var e=r(1131),s=r(360),n=r(5180),t=r(3521),a=function(O){var b=(0,s.Oc)(),y=b.act,u=b.data,f;return u.has_mask?f=(0,e.jsx)(n.Ki.Item,{label:"Mask",children:(0,e.jsx)(n.$n,{icon:u.connected?"check":"times",selected:u.connected,onClick:function(){return y("internals")},children:u.connected?"Internals On":"Internals Off"})}):f=(0,e.jsx)(n.Ki.Item,{label:"Mask",color:"red",children:"No Mask Equipped"}),(0,e.jsx)(t.p8,{width:300,height:150,children:(0,e.jsx)(t.p8.Content,{children:(0,e.jsx)(n.wn,{children:(0,e.jsxs)(n.Ki,{children:[(0,e.jsx)(n.Ki.Item,{label:"Tank Pressure",children:(0,e.jsx)(n.z2,{value:u.tankPressure/1013,ranges:{good:[.35,1/0],average:[.15,.35],bad:[-1/0,.15]},children:u.tankPressure+" kPa"})}),(0,e.jsxs)(n.Ki.Item,{label:"Release Pressure",children:[(0,e.jsx)(n.$n,{icon:"fast-backward",disabled:u.releasePressure===u.minReleasePressure,tooltip:"Min",onClick:function(){return y("pressure",{pressure:"min"})}}),(0,e.jsx)(n.Q7,{animated:!0,value:u.releasePressure,width:"65px",unit:"kPa",step:.1,minValue:u.minReleasePressure,maxValue:u.maxReleasePressure,onChange:function(m){return y("pressure",{pressure:m})}}),(0,e.jsx)(n.$n,{icon:"fast-forward",disabled:u.releasePressure===u.maxReleasePressure,tooltip:"Max",onClick:function(){return y("pressure",{pressure:"max"})}}),(0,e.jsx)(n.$n,{icon:"undo",disabled:u.releasePressure===u.defaultReleasePressure,tooltip:"Reset",onClick:function(){return y("pressure",{pressure:"reset"})}})]}),f]})})})})}},6012:(q,S,r)=>{"use strict";r.r(S),r.d(S,{LatheChemicalStorage:()=>t});var e=r(1131),s=r(360),n=r(5180),t=function(a){var O=(0,s.Oc)(),b=O.data,y=O.act,u=b.loaded_chemicals,f=b.menu===4;return(0,e.jsxs)(n.wn,{title:"\u0411\u0443\u0444\u0435\u0440 \u0440\u0435\u0430\u0433\u0435\u043D\u0442\u043E\u0432",children:[(0,e.jsx)(n.$n,{icon:"trash",onClick:function(){var m=f?"disposeallP":"disposeallI";y(m)},children:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0451"}),(0,e.jsx)(n.Ki,{children:u.map(function(m){var d=m.volume,v=m.name,_=m.id;return(0,e.jsx)(n.Ki.Item,{label:"* "+d+" of "+v,children:(0,e.jsx)(n.$n,{icon:"trash",onClick:function(){var l=f?"disposeP":"disposeI";y(l,{id:_})},children:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C"})},_)})})]})}},6051:(q,S,r)=>{"use strict";r.r(S),r.d(S,{pai_advsecrecords:()=>t});var e=r(1131),s=r(360),n=r(5180),t=function(a){var O=(0,s.Oc)().act;return(0,e.jsx)(n.Ki,{children:(0,e.jsx)(n.Ki.Item,{label:"Special Syndicate options:",children:(0,e.jsx)(n.$n,{onClick:function(){return O("ui_interact")},children:"Select Records"})})})}},6081:(q,S,r)=>{"use strict";r.r(S),r.d(S,{Customat:()=>O});var e=r(1131),s=r(360),n=r(5180),t=r(3521),a=function(b){var y=(0,s.Oc)(),u=y.act,f=y.data,m=b.product,d=f.userMoney,v=f.vend_ready,_=m.price===0,l="ERROR!",c="";_?(l="\u0411\u0415\u0421\u041F\u041B\u0410\u0422\u041D\u041E",c="arrow-circle-down"):(l=m.price.toString(),c="shopping-cart");var h=!v||m.stock===0||!_&&m.price>d;return(0,e.jsxs)(n.XI.Row,{children:[(0,e.jsx)(n.XI.Cell,{collapsing:!0,children:(0,e.jsx)(n.Hg,{verticalAlign:"middle",icon:m.icon,icon_state:m.icon_state,fallback:(0,e.jsx)(n.In,{p:.66,name:"spinner",size:2,spin:!0})})}),(0,e.jsx)(n.XI.Cell,{bold:!0,children:(0,e.jsx)(n.$n,{multiLine:!0,color:"translucent",tooltip:m.desc,children:m.name})}),(0,e.jsx)(n.XI.Cell,{collapsing:!0,textAlign:"center",children:(0,e.jsxs)(n.az,{color:m.stock<=0&&"bad"||"good",children:[m.stock," \u0432 \u043D\u0430\u043B\u0438\u0447\u0438\u0438"]})}),(0,e.jsx)(n.XI.Cell,{collapsing:!0,textAlign:"center",children:(0,e.jsx)(n.$n,{fluid:!0,disabled:h,icon:c,textAlign:"left",onClick:function(){return u("vend",{Key:m.Key})},children:l})})]})},O=function(b){var y=(0,s.Oc)(),u=y.act,f=y.data,m=f.guestNotice,d=f.userMoney,v=f.user,_=f.products,l=f.panel_open,c=f.speaker;return(0,e.jsx)(t.p8,{width:470,height:600,title:"\u041A\u0430\u0441\u0442\u043E\u043C\u0430\u0442",children:(0,e.jsx)(t.p8.Content,{children:(0,e.jsxs)(n.BJ,{fill:!0,vertical:!0,children:[(0,e.jsxs)(n.BJ.Item,{children:[(0,e.jsx)(n.wn,{title:"\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C",children:v&&(0,e.jsxs)(n.az,{children:["\u0417\u0434\u0440\u0430\u0441\u0442\u0432\u0443\u0439\u0442\u0435, ",(0,e.jsx)("b",{children:v.name}),","," ",(0,e.jsx)("b",{children:v.job||"\u0411\u0435\u0437\u0440\u0430\u0431\u043E\u0442\u043D\u044B\u0439"}),"!",(0,e.jsx)("br",{}),"\u0412\u0430\u0448 \u0431\u0430\u043B\u0430\u043D\u0441: ",(0,e.jsxs)("b",{children:[d," \u043A\u0440."]})]})||(0,e.jsx)(n.az,{color:"light-grey",children:m})}),!!l&&(0,e.jsx)(n.wn,{title:"\u0422\u0435\u0445. \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u0435",children:(0,e.jsx)(n.$n,{icon:c?"check":"volume-mute",selected:c,textAlign:"left",onClick:function(){return u("toggle_voice",{})},children:"\u0414\u0438\u043D\u0430\u043C\u0438\u043A"})})]}),(0,e.jsx)(n.BJ.Item,{grow:!0,children:(0,e.jsx)(n.wn,{title:"\u041F\u0440\u043E\u0434\u0443\u043A\u0446\u0438\u044F",fill:!0,scrollable:!0,children:(0,e.jsx)(n.XI,{children:_.map(function(h){return(0,e.jsx)(a,{product:h},h.name)})})})})]})})})}},6092:(q,S,r)=>{"use strict";r.d(S,{$:()=>e});/** + */var b=function(f){var m=f.children;return(0,e.jsx)("table",{className:"LabeledList",children:(0,e.jsx)("tbody",{children:m})})},y=function(f){var m=f.className,d=f.label,v=f.labelColor,_=v===void 0?"label":v,l=f.labelWrap,c=f.labelStyle,h=f.color,g=f.textAlign,p=f.buttons,j=f.content,x=f.children,C=f.verticalAlign,I=C===void 0?"baseline":C,P=f.tooltip,M;d&&(M=d,typeof d=="string"&&(M+=":")),P!==void 0&&(M=(0,e.jsx)(O.m,{content:P,children:(0,e.jsx)(t.a,{as:"span",style:{borderBottom:"2px dotted rgba(255, 255, 255, 0.8)"},children:M})}));var B=(0,e.jsx)(t.a,{as:"td",color:_,className:(0,s.Ly)(["LabeledList__cell",!l&&"LabeledList__label--nowrap"]),verticalAlign:I,style:c,children:M});return(0,e.jsxs)("tr",{className:(0,s.Ly)(["LabeledList__row",m]),children:[B,(0,e.jsxs)(t.a,{as:"td",color:h,textAlign:g,className:"LabeledList__cell",colSpan:p?void 0:2,verticalAlign:I,children:[j,x]}),p&&(0,e.jsx)("td",{className:"LabeledList__cell LabeledList__buttons",children:p})]})},u=function(f){var m=f.size?(0,n.zA)(Math.max(0,f.size-1)):0;return(0,e.jsx)("tr",{className:"LabeledList__row",children:(0,e.jsx)("td",{colSpan:3,style:{paddingTop:m,paddingBottom:m},children:(0,e.jsx)(a.c,{})})})};b.Divider=u,b.Item=y},5819:(q,S,r)=>{"use strict";r.r(S),r.d(S,{Healthanalyzer:()=>b});var e=r(1131),s=r(360),n=r(5180),t=r(3521),a=new Map([["upper body","\u0413\u0440\u0443\u0434\u044C"],["lower body","\u0416\u0438\u0432\u043E\u0442"],["head","\u0413\u043E\u043B\u043E\u0432\u0430"],["left arm","\u041B\u0435\u0432\u0430\u044F \u0440\u0443\u043A\u0430"],["right arm","\u041F\u0440\u0430\u0432\u0430\u044F \u0440\u0443\u043A\u0430"],["left leg","\u041B\u0435\u0432\u0430\u044F \u043D\u043E\u0433\u0430"],["right leg","\u041F\u0440\u0430\u0432\u0430\u044F \u043D\u043E\u0433\u0430"],["left foot","\u041B\u0435\u0432\u0430\u044F \u0441\u0442\u0443\u043F\u043D\u044F"],["right foot","\u041F\u0440\u0430\u0432\u0430\u044F \u0441\u0442\u0443\u043F\u043D\u044F"],["left hand","\u041B\u0435\u0432\u0430\u044F \u043A\u0438\u0441\u0442\u044C"],["right hand","\u041F\u0440\u0430\u0432\u0430\u044F \u043A\u0438\u0441\u0442\u044C"],["monkey tail","\u0425\u0432\u043E\u0441\u0442 \u043E\u0431\u0435\u0437\u044C\u044F\u043D\u044B"],["wolpin tail","\u0425\u0432\u043E\u0441\u0442 \u0432\u0443\u043B\u044C\u043F\u0438\u043D\u0430"],["unathi tail","\u0425\u0432\u043E\u0441\u0442 \u0443\u043D\u0430\u0442\u0445\u0430"],["tajaran tail","\u0425\u0432\u043E\u0441\u0442 \u0442\u0430\u044F\u0440\u0430\u043D\u0430"],["vulpkanin tail","\u0425\u0432\u043E\u0441\u0442 \u0432\u0443\u043B\u044C\u043F\u043A\u0430\u043D\u0438\u043D\u0430"],["vox tail","\u0425\u0432\u043E\u0441\u0442 \u0432\u043E\u043A\u0441\u0430"],["wryn tail","\u0425\u0432\u043E\u0441\u0442 \u0432\u0440\u0438\u043D\u0430"],["luam wings","\u041A\u0440\u044B\u043B\u044C\u044F \u043B\u0443\u0430\u043C"]]),O=new Map([["Diona","\u0414\u0438\u043E\u043D\u0430"],["Human","\u0427\u0435\u043B\u043E\u0432\u0435\u043A"],["Drask","\u0414\u0440\u0430\u0441\u043A"],["Grey","\u0413\u0440\u0435\u0439"],["Vulpkanin","\u0412\u0443\u043B\u044C\u043F\u0430\u043A\u0438\u043D"],["Tajaran","\u0422\u0430\u044F\u0440\u0430\u043D"],["Skrell","\u0421\u043A\u0440\u0435\u043B\u043B"],["Nian","\u041D\u0438\u0430\u043D"],["Unathi","\u0423\u043D\u0430\u0442\u0445"],["Kidan","\u041A\u0438\u0434\u0430\u043D"],["Wryn","\u0412\u0440\u0438\u043D"],["Vox","\u0412\u043E\u043A\u0441"]]),b=function(_){var l=(0,s.Oc)().data,c=l.scan_data;return(0,e.jsx)(t.p8,{width:500,height:450,theme:l.theme?l.theme:"",title:l.scan_title?l.scan_title:"\u0410\u043D\u0430\u043B\u0438\u0437\u0430\u0442\u043E\u0440 \u0437\u0434\u043E\u0440\u043E\u0432\u044C\u044F",children:(0,e.jsx)(t.p8.Content,{scrollable:!0,children:function(){return c?c.status==="ERROR"||c.status==="FLOOR"?(0,e.jsxs)(n.az,{children:[(0,e.jsx)(n.wn,{title:"\u041F\u043E\u0432\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u044F",children:(0,e.jsxs)(n.Ki,{children:[(0,e.jsx)(n.Ki.Item,{label:"\u0422\u0438\u043F \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0439",children:(0,e.jsxs)(n.az,{children:[(0,e.jsx)("span",{style:{color:"#0080ff"},children:"\u0423\u0434\u0443\u0448\u044C\u0435"})," /"," ",(0,e.jsx)("span",{style:{color:"green"},children:"\u041E\u0442\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435"})," /"," ",(0,e.jsx)("span",{style:{color:"#FF8000"},children:"\u0422\u0435\u0440\u043C."})," /"," ",(0,e.jsx)("span",{style:{color:"red"},children:"\u041C\u0435\u0445."})]})}),(0,e.jsx)(n.Ki.Item,{label:"\u0421\u0442\u0435\u043F\u0435\u043D\u044C \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0439",children:(0,e.jsxs)(n.az,{children:[(0,e.jsx)("span",{style:{color:"#0080ff"},children:"?"})," -"," ",(0,e.jsx)("span",{style:{color:"green"},children:"?"})," -"," ",(0,e.jsx)("span",{style:{color:"#FF8000"},children:"?"})," -"," ",(0,e.jsx)("span",{style:{color:"red"},children:"?"})]})})]})}),(0,e.jsx)(n.wn,{title:"\u041E\u0431\u0449\u0435\u0435 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435",children:(0,e.jsxs)(n.Ki,{children:[(0,e.jsx)(n.Ki.Item,{label:"\u041E\u0446\u0435\u043D\u043A\u0430 \u0437\u0434\u043E\u0440\u043E\u0432\u044C\u044F",children:(0,e.jsx)(n.az,{color:"#c51e1e",bold:!0,children:"\u041E\u0428\u0418\u0411\u041A\u0410"})}),(0,e.jsx)(n.Ki.Item,{label:"\u0422\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u0442\u0435\u043B\u0430",children:"--- \xB0C --- \xB0F"}),(0,e.jsx)(n.Ki.Item,{label:"\u0423\u0440\u043E\u0432\u0435\u043D\u044C \u043A\u0440\u043E\u0432\u0438",children:"--- %, --- u, \u0442\u0438\u043F: ---, \u043A\u0440\u043E\u0432\u044C \u0440\u0430\u0441\u044B: ---"}),(0,e.jsx)(n.Ki.Item,{label:"\u041F\u0443\u043B\u044C\u0441",children:"--- \u0443\u0434/\u043C\u0438\u043D"}),(0,e.jsx)(n.Ki.Item,{label:"\u0413\u0435\u043D\u044B",children:"\u0413\u0435\u043D\u043D\u0430\u044F \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0430 \u043D\u0435 \u043E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u0430"})]})})]}):(0,e.jsxs)(n.az,{children:[(0,e.jsx)(y,{}),(0,e.jsx)(n.wn,{title:"\u041F\u043E\u0432\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u044F",children:(0,e.jsxs)(n.Ki,{children:[(0,e.jsx)(n.Ki.Item,{label:"\u0422\u0438\u043F \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0439",children:(0,e.jsxs)(n.az,{children:[(0,e.jsx)("span",{style:{color:"#0080ff"},children:"\u0423\u0434\u0443\u0448\u044C\u0435"})," /"," ",(0,e.jsx)("span",{style:{color:"green"},children:"\u041E\u0442\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435"})," /"," ",(0,e.jsx)("span",{style:{color:"#FF8000"},children:"\u0422\u0435\u0440\u043C."})," /"," ",(0,e.jsx)("span",{style:{color:"red"},children:"\u041C\u0435\u0445."})]})}),(0,e.jsx)(n.Ki.Item,{label:"\u0421\u0442\u0435\u043F\u0435\u043D\u044C \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0439",children:(0,e.jsxs)(n.az,{children:[c.damageLevels.oxy>0?(0,e.jsx)("span",{style:{color:"#0080ff",fontWeight:"bold"},children:c.damageLevels.oxy}):(0,e.jsx)("span",{style:{color:"#0080ff"},children:c.damageLevels.oxy})," ","-"," ",c.damageLevels.tox>0?(0,e.jsx)("span",{style:{color:"green",fontWeight:"bold"},children:c.damageLevels.tox}):(0,e.jsx)("span",{style:{color:"green"},children:c.damageLevels.tox})," ","-"," ",c.damageLevels.burn>0?(0,e.jsx)("span",{style:{color:"#FF8000",fontWeight:"bold"},children:c.damageLevels.burn}):(0,e.jsx)("span",{style:{color:"#FF8000"},children:c.damageLevels.burn})," ","-"," ",c.damageLevels.brute>0?(0,e.jsx)("span",{style:{color:"red",fontWeight:"bold"},children:c.damageLevels.brute}):(0,e.jsx)("span",{style:{color:"red"},children:c.damageLevels.brute})]})})]})}),(0,e.jsxs)(n.wn,{title:"\u0421\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435",children:[(0,e.jsxs)(n.Ki,{children:[(0,e.jsx)(n.Ki.Item,{label:"\u0421\u0442\u0430\u0442\u0443\u0441",children:c.status===2?(0,e.jsxs)(n.az,{color:"red",bold:!0,children:["\u0421\u043C\u0435\u0440\u0442\u044C"," ",!!c.DRN&&(0,e.jsx)("span",{style:{fontWeight:"bold"},children:"[\u041D\u0420]"})]}):c.health>0?(0,e.jsxs)(n.az,{children:[c.health,"% "]}):(0,e.jsxs)(n.az,{color:"red",bold:!0,children:[c.health,"%"," "]})}),c.status===2&&(0,e.jsx)(n.Ki.Item,{label:"\u0412\u0440\u0435\u043C\u044F \u0441\u043C\u0435\u0440\u0442\u0438",children:c.timeofdeath}),(0,e.jsxs)(n.Ki.Item,{label:"\u0422\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u0442\u0435\u043B\u0430",children:[c.bodyTemperatureC," \xB0C (",c.bodyTemperatureF," \xB0F)"]}),c.bloodData&&(0,e.jsxs)(n.Ki.Item,{label:"\u0423\u0440\u043E\u0432\u0435\u043D\u044C \u043A\u0440\u043E\u0432\u0438",children:[c.bloodData.blood_volume<=501&&c.bloodData.blood_volume>346&&(0,e.jsxs)("span",{style:{color:"red",fontWeight:"bold"},children:["\u041D\u0418\u0417\u041A\u0418\u0419"," "]}),c.bloodData.blood_volume<346&&(0,e.jsxs)("span",{style:{color:"red",fontWeight:"bold"},children:["\u041A\u0420\u0418\u0422\u0418\u0427\u0415\u0421\u041A\u0418\u0419"," "]}),c.bloodData.blood_percent," %,"," ",c.bloodData.blood_volume," u, \u0442\u0438\u043F:"," ",c.bloodData.blood_type,", \u043A\u0440\u043E\u0432\u044C \u0440\u0430\u0441\u044B:"," ",O.get(c.bloodData.blood_species),"."]}),(0,e.jsx)(n.Ki.Item,{label:"\u041F\u0443\u043B\u044C\u0441",children:(0,e.jsxs)("span",{style:{color:c.pulse_status===2?"#0080ff":"red"},children:[c.pulse," \u0443\u0434/\u043C\u0438\u043D"]})}),(0,e.jsx)(n.Ki.Item,{label:"\u0413\u0435\u043D\u044B",children:c.genes<40?(0,e.jsx)(n.az,{color:"red",bold:!0,children:"\u041A\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043A\u0430\u044F \u0433\u0435\u043D\u043D\u0430\u044F \u043D\u0435\u0441\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u043E\u0441\u0442\u044C."}):c.genes<70?(0,e.jsx)(n.az,{color:"red",bold:!0,children:"\u0422\u044F\u0436\u0451\u043B\u0430\u044F \u0433\u0435\u043D\u043D\u0430\u044F \u043D\u0435\u0441\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u043E\u0441\u0442\u044C."}):c.genes<85?(0,e.jsx)(n.az,{color:"red",children:"\u041D\u0435\u0437\u043D\u0430\u0447\u0438\u0442\u0435\u043B\u044C\u043D\u0430\u044F \u0433\u0435\u043D\u043D\u0430\u044F \u043D\u0435\u0441\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u043E\u0441\u0442\u044C."}):c.genes>40&&(0,e.jsx)(n.az,{children:"\u0413\u0435\u043D\u043D\u0430\u044F \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0430 \u0441\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u0430."})})]}),(0,e.jsx)(u,{})]}),c.status===2&&(0,e.jsx)(n.wn,{children:(0,e.jsxs)(n.az,{children:[(0,e.jsxs)(n.az,{textAlign:"center",bold:!0,color:"red",children:["\u0421\u0443\u0431\u044A\u0435\u043A\u0442 \u0443\u043C\u0435\u0440 ",c.timetodefib," \u043D\u0430\u0437\u0430\u0434"]}),(0,e.jsx)(n.az,{textAlign:"center",bold:!0,color:"red",children:c.timetodefibText})]})}),c.heartCondition==="CRIT"&&(0,e.jsx)(n.wn,{title:"\u0412\u043D\u0438\u043C\u0430\u043D\u0438\u0435: \u041A\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435!",mt:2,mb:2,color:"red",children:(0,e.jsxs)(n.Ki,{children:[(0,e.jsx)(n.Ki.Item,{label:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435",children:(0,e.jsx)(n.az,{bold:!0,children:"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0430 \u0441\u0435\u0440\u0434\u0446\u0430"})}),(0,e.jsx)(n.Ki.Item,{label:"\u0422\u0438\u043F",children:(0,e.jsx)(n.az,{bold:!0,children:"\u0421\u0435\u0440\u0434\u0446\u0435 \u043F\u0430\u0446\u0438\u0435\u043D\u0442\u0430 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u043B\u043E\u0441\u044C"})}),(0,e.jsx)(n.Ki.Item,{label:"\u0421\u0442\u0430\u0434\u0438\u044F",children:(0,e.jsx)(n.az,{bold:!0,children:"1/1"})}),(0,e.jsx)(n.Ki.Item,{label:"\u041B\u0435\u0447\u0435\u043D\u0438\u0435",children:(0,e.jsx)(n.az,{bold:!0,children:"\u042D\u043B\u0435\u043A\u0442\u0440\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0448\u043E\u043A"})})]})}),l.localize&&(c.damageLocalization||c.fractureList[0]||c.infectedList[0]||c.bleedingList[0]||c.extraFacture)?(0,e.jsxs)(n.wn,{title:"\u041B\u043E\u043A\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0439",children:[!!c.damageLocalization&&(0,e.jsx)(n.az,{children:(0,e.jsx)(n.Ki,{children:c.damageLocalization.map(function(h,g){return(0,e.jsx)(n.Ki.Item,{label:a.get(h.name),children:(0,e.jsxs)(n.az,{children:[(0,e.jsx)("span",{style:{color:"#FF8000"},children:h.burn})," ","-"," ",(0,e.jsx)("span",{style:{color:"red"},children:h.brute})]})},g)})})}),!!c.fractureList[0]&&(0,e.jsx)(n.az,{children:c.fractureList.map(function(h,g){return(0,e.jsxs)(n.az,{color:"#c51e1e",mt:1,children:["\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D \u043F\u0435\u0440\u0435\u043B\u043E\u043C \u0432 ",h,"."]},g)})}),!!c.bleedingList[0]&&(0,e.jsx)(n.az,{children:c.bleedingList.map(function(h,g){return(0,e.jsxs)(n.az,{color:"#c51e1e",mt:1,children:[h,"."]},g)})}),!!c.infectedList[0]&&(0,e.jsx)(n.az,{children:c.infectedList.map(function(h,g){return(0,e.jsxs)(n.az,{color:"#c51e1e",mt:1,children:["\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E \u0437\u0430\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0432 ",h,"."]},g)})}),!!c.extraFacture&&(0,e.jsx)(n.az,{color:"#c51e1e",mt:1,children:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u044B \u043F\u0435\u0440\u0435\u043B\u043E\u043C\u044B. \u041B\u043E\u043A\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u0430."}),!!c.extraBleeding&&(0,e.jsx)(n.az,{color:"#c51e1e",mt:1,children:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E \u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0435\u0435 \u043A\u0440\u043E\u0432\u043E\u0442\u0435\u0447\u0435\u043D\u0438\u0435. \u041B\u043E\u043A\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u0430."})]}):!l.localize&&(!!c.fractureList[0]||c.infectedList[0]||!!c.extraFacture||!!c.extraBleeding)&&(0,e.jsxs)(n.wn,{title:"\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u0430\u044F \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F",children:[!!c.fractureList[0]&&(0,e.jsx)(n.az,{children:c.fractureList.map(function(h,g){return(0,e.jsxs)(n.az,{color:"#c51e1e",mt:1,children:["\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D \u043F\u0435\u0440\u0435\u043B\u043E\u043C \u0432 ",h,"."]},g)})}),!!c.bleedingList[0]&&(0,e.jsx)(n.az,{children:c.bleedingList.map(function(h,g){return(0,e.jsxs)(n.az,{color:"#c51e1e",mt:1,children:[h,"."]},g)})}),!!c.infectedList[0]&&(0,e.jsx)(n.az,{children:c.infectedList.map(function(h,g){return(0,e.jsxs)(n.az,{color:"#c51e1e",mt:1,children:["\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E \u0437\u0430\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0432 ",h,"."]},g)})}),!!c.extraFacture&&(0,e.jsx)(n.az,{color:"#c51e1e",mt:1,children:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u044B \u043F\u0435\u0440\u0435\u043B\u043E\u043C\u044B. \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0435 \u0441\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435."}),!!c.extraBleeding&&(0,e.jsx)(n.az,{color:"#c51e1e",mt:1,children:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E \u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0435\u0435 \u043A\u0440\u043E\u0432\u043E\u0442\u0435\u0447\u0435\u043D\u0438\u0435. \u041B\u043E\u043A\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u0430."})]}),!!c.reagentList&&(0,e.jsx)(m,{}),!!c.diseases[0]&&(0,e.jsx)(f,{}),!!c.addictionList&&(0,e.jsx)(d,{}),!!c.implantDetect&&(0,e.jsx)(v,{}),(0,e.jsx)(n.wn,{title:"\u0421\u0442\u0440\u0430\u0445\u043E\u0432\u043A\u0430",children:(0,e.jsxs)(n.Ki,{children:[(0,e.jsx)(n.Ki.Item,{label:"\u0422\u0438\u043F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u043A\u0438 ",children:c.insuranceType}),(0,e.jsx)(n.Ki.Item,{label:"\u0422\u0440\u0435\u0431\u0443\u0435\u043C\u043E\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043E\u0447\u043A\u043E\u0432 \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u043A\u0438",children:c.reqInsurance}),!!c.insurance&&(0,e.jsx)(n.Ki.Item,{label:"\u0422\u0435\u043A\u0443\u0449\u0435\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043E\u0447\u043A\u043E\u0432 \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u043A\u0438",children:c.insurance})]})})]}):(0,e.jsx)(n.az,{textAlign:"center",bold:!0,children:"\u041F\u0430\u043C\u044F\u0442\u044C \u0430\u043D\u0430\u043B\u0438\u0437\u0430\u0442\u043E\u0440\u0430 \u0437\u0434\u043E\u0440\u043E\u0432\u044C\u044F \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u043E\u0447\u0438\u0449\u0435\u043D\u0430"})}()})})},y=function(_){var l=(0,s.Oc)(),c=l.act,h=l.data;return(0,e.jsx)(n.wn,{textAlign:"center",children:(0,e.jsxs)(n.az,{nowrap:!0,children:[(0,e.jsx)(n.$n,{icon:"trash",content:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",onClick:function(){return c("clear")}}),(0,e.jsx)(n.$n,{icon:"map-marker-alt",onClick:function(){return c("localize")},color:h.localize?"":"red",children:"\u041B\u043E\u043A\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F"}),!!h.advanced&&(0,e.jsx)(n.$n,{icon:"print",onClick:function(){return c("print")},children:"\u041F\u0435\u0447\u0430\u0442\u044C \u043E\u0442\u0447\u0451\u0442\u0430"}),!!h.advanced&&(0,e.jsx)(n.$n,{icon:"file-invoice-dollar",onClick:function(){return c("insurance")},children:"\u0421\u043F\u0438\u0441\u0430\u0442\u044C \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u043A\u0443"})]})})},u=function(_){var l=(0,s.Oc)().data,c=l.scan_data,h=c.heartCondition,g=c.brainDamage,p=c.bleed,j=c.staminaStatus,x=c.cloneStatus,C=c.brainWorms;return(0,e.jsxs)(n.az,{children:[h==="LESS"?(0,e.jsx)(n.az,{color:"#d82020",mt:1,bold:!0,children:"\u0421\u0435\u0440\u0434\u0446\u0435 \u043D\u0435 \u043E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E."}):h==="NECROSIS"&&(0,e.jsx)(n.az,{color:"#d82020",mt:1,bold:!0,children:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D \u043D\u0435\u043A\u0440\u043E\u0437 \u0441\u0435\u0440\u0434\u0446\u0430."}),g>100?(0,e.jsx)(n.az,{color:"#c51e1e",mt:1,bold:!0,children:"\u041C\u043E\u0437\u0433 \u043C\u0451\u0440\u0442\u0432"}):g>60?(0,e.jsx)(n.az,{color:"#c51e1e",mt:1,bold:!0,children:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E \u0441\u0435\u0440\u044C\u0451\u0437\u043D\u043E\u0435 \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0435 \u043C\u043E\u0437\u0433\u0430."}):g>10?(0,e.jsx)(n.az,{color:"#c51e1e",mt:1,children:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E \u0437\u043D\u0430\u0447\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0435 \u043C\u043E\u0437\u0433\u0430."}):g==="LESS"&&(0,e.jsx)(n.az,{color:"#c51e1e",mt:1,bold:!0,children:"\u041C\u043E\u0437\u0433 \u043D\u0435 \u043E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D."}),!!p&&(0,e.jsx)(n.az,{color:"#c51e1e",mt:1,bold:!0,children:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E \u043A\u0440\u043E\u0432\u043E\u0442\u0435\u0447\u0435\u043D\u0438\u0435!"}),!!j&&(0,e.jsx)(n.az,{color:"#0080ff",mt:1,bold:!0,children:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E \u0438\u0441\u0442\u043E\u0449\u0435\u043D\u0438\u0435."}),x>30?(0,e.jsx)(n.az,{color:"#c51e1e",mt:1,bold:!0,children:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E \u0441\u0435\u0440\u044C\u0451\u0437\u043D\u043E\u0435 \u043A\u043B\u0435\u0442\u043E\u0447\u043D\u043E\u0435 \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0435!"}):x>0&&(0,e.jsx)(n.az,{color:"#c51e1e",mt:1,children:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E \u043D\u0435\u0437\u043D\u0430\u0447\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u043A\u043B\u0435\u0442\u043E\u0447\u043D\u043E\u0435 \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0435."}),!!C&&(0,e.jsx)(n.az,{color:"#c51e1e",mt:1,bold:!0,children:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u044B \u043E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u0438\u044F \u0432 \u0440\u0430\u0431\u043E\u0442\u0435 \u043C\u043E\u0437\u0433\u0430."})]})},f=function(_){var l=(0,s.Oc)().data,c=l.scan_data.diseases;return(0,e.jsx)(n.az,{children:c.map(function(h,g){return(0,e.jsx)(n.wn,{title:"\u0412\u043D\u0438\u043C\u0430\u043D\u0438\u0435: "+h.form,mt:2,mb:2,color:"red",children:(0,e.jsxs)(n.Ki,{children:[(0,e.jsx)(n.Ki.Item,{label:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435",children:(0,e.jsx)(n.az,{bold:!0,children:h.name})}),(0,e.jsx)(n.Ki.Item,{label:"\u0422\u0438\u043F",children:(0,e.jsx)(n.az,{bold:!0,children:h.additional_info})}),(0,e.jsx)(n.Ki.Item,{label:"\u0421\u0442\u0430\u0434\u0438\u044F",children:(0,e.jsxs)(n.az,{bold:!0,children:[h.stage,"/",h.max_stages]})}),(0,e.jsx)(n.Ki.Item,{label:"\u041B\u0435\u0447\u0435\u043D\u0438\u0435",children:(0,e.jsx)(n.az,{bold:!0,children:h.cure_text})})]})},g)})})},m=function(_){var l=(0,s.Oc)().data,c=l.scan_data.reagentList;return(0,e.jsx)(n.wn,{title:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u044B \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0430",children:(0,e.jsx)(n.Ki,{children:c.map(function(h,g){return(0,e.jsx)(n.Ki.Item,{label:h.name,children:(0,e.jsxs)(n.az,{children:[h.volume," \u0435\u0434."," ",!!h.overdosed&&(0,e.jsx)(n.az,{as:"span",color:"red",bold:!0,children:"- \u041F\u0415\u0420\u0415\u0414\u041E\u0417\u0418\u0420\u041E\u0412\u041A\u0410!"})]})},g)})})})},d=function(_){var l=(0,s.Oc)().data,c=l.scan_data.addictionList;return(0,e.jsx)(n.wn,{title:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u044B \u0437\u0430\u0432\u0438\u0441\u0438\u043C\u043E\u0441\u0442\u0438",children:(0,e.jsx)(n.Ki,{children:c.map(function(h,g){return(0,e.jsx)(n.Ki.Item,{label:h.name,children:(0,e.jsxs)(n.az,{children:["\u0421\u0442\u0430\u0434\u0438\u044F: ",h.addiction_stage,"/5"]})},g)})})})},v=function(_){var l=(0,s.Oc)().data,c=l.scan_data.implantDetect;return(0,e.jsx)(n.wn,{title:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u044B \u043A\u0438\u0431\u0435\u0440\u043D\u0435\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0435 \u043C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u0438:",children:(0,e.jsx)(n.Ki,{children:c.map(function(h,g){return(0,e.jsx)(n.az,{ml:1,bold:!0,children:h},g)})})})}},5838:(q,S,r)=>{"use strict";r.r(S),r.d(S,{CircuitModule:()=>b});var e=r(1131),s=r(360),n=r(5180),t=r(3521);function a(){return a=Object.assign||function(u){for(var f=1;f=0)&&(m[v]=u[v]);return m}var b=function(u){var f=(0,s.Oc)(),m=f.act,d=f.data,v=d.input_ports,_=d.output_ports,l=d.global_port_types;return(0,e.jsx)(t.p8,{width:600,height:300,children:(0,e.jsx)(t.p8.Content,{scrollable:!0,children:(0,e.jsxs)(n.BJ,{vertical:!0,children:[(0,e.jsx)(n.BJ.Item,{children:(0,e.jsx)(n.$n,{textAlign:"center",fluid:!0,onClick:function(){return m("open_internal_circuit")},children:"\u041E\u0431\u0437\u043E\u0440 \u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0435\u0439 \u0438\u043D\u0442\u0435\u0433\u0440\u0430\u043B\u044C\u043D\u043E\u0439 \u0441\u0445\u0435\u043C\u044B"})}),(0,e.jsx)(n.BJ.Item,{children:(0,e.jsxs)(n.BJ,{width:"100%",children:[(0,e.jsx)(n.BJ.Item,{basis:"50%",children:(0,e.jsx)(n.wn,{title:"\u041F\u043E\u0440\u0442\u044B \u0432\u0432\u043E\u0434\u0430",children:(0,e.jsxs)(n.BJ,{vertical:!0,children:[v.map(function(c,h){return(0,e.jsx)(y,{name:c.name,datatype:c.type,datatypeOptions:l,onRemove:function(){return m("remove_input_port",{port_id:h+1})},onSetType:function(g){return m("set_port_type",{port_id:h+1,is_input:!0,port_type:g})},onEnter:function(g,p){return m("set_port_name",{port_id:h+1,is_input:!0,port_name:p})}},h)}),(0,e.jsx)(n.BJ.Item,{children:(0,e.jsx)(n.$n,{fluid:!0,color:"good",icon:"plus",onClick:function(){return m("add_input_port")},children:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043F\u043E\u0440\u0442 \u0432\u0432\u043E\u0434\u0430"})})]})})}),(0,e.jsx)(n.BJ.Item,{basis:"50%",children:(0,e.jsx)(n.wn,{title:"\u041F\u043E\u0440\u0442\u044B \u0432\u044B\u0432\u043E\u0434\u0430",children:(0,e.jsxs)(n.BJ,{vertical:!0,children:[_.map(function(c,h){return(0,e.jsx)(y,{name:c.name,datatype:c.type,datatypeOptions:l,onRemove:function(){return m("remove_output_port",{port_id:h+1})},onSetType:function(g){return m("set_port_type",{port_id:h+1,is_input:!1,port_type:g})},onEnter:function(g,p){return m("set_port_name",{port_id:h+1,is_input:!1,port_name:p})}},h)}),(0,e.jsx)(n.BJ.Item,{children:(0,e.jsx)(n.$n,{fluid:!0,color:"good",icon:"plus",onClick:function(){return m("add_output_port")},children:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043F\u043E\u0440\u0442 \u0432\u044B\u0432\u043E\u0434\u0430"})})]})})})]})})]})})})},y=function(u){var f=u.onRemove,m=u.onEnter,d=u.onSetType,v=u.name,_=u.datatype,l=u.datatypeOptions,c=l===void 0?[]:l,h=O(u,["onRemove","onEnter","onSetType","name","datatype","datatypeOptions"]);return(0,e.jsx)(n.BJ.Item,a({},h,{children:(0,e.jsxs)(n.BJ,{children:[(0,e.jsx)(n.BJ.Item,{grow:!0,children:(0,e.jsx)(n.pd,{placeholder:"Name",value:v,onChange:m})}),(0,e.jsx)(n.BJ.Item,{children:(0,e.jsx)(n.ms,{selected:_,options:c,onSelected:d,width:"100%"})}),(0,e.jsx)(n.BJ.Item,{children:(0,e.jsx)(n.$n,{icon:"times",color:"red",onClick:f})})]})}))}},5899:(q,S,r)=>{"use strict";r.r(S),r.d(S,{SpawnPanel:()=>m});var e=r(1131),s=r(7003),n=r(5180),t=r(3655),a=r(1243),O=r(3521),b=r(4947),y=r(9427),u=r(8151);function f(){return f=Object.assign||function(d){for(var v=1;v{"use strict";r.r(S),r.d(S,{ComponentPrinter:()=>O});var e=r(1131),s=r(360),n=r(3521),t=r(5180),a=r(9845),O=function(b){var y=(0,s.Oc)(),u=y.act,f=y.data,m=f.designs;return(0,e.jsx)(n.p8,{title:"\u0414\u0443\u0431\u043B\u0438\u043A\u0430\u0442\u043E\u0440 \u043F\u0435\u0447\u0430\u0442\u043D\u044B\u0445 \u043F\u043B\u0430\u0442",width:670,height:600,children:(0,e.jsxs)(n.p8.Content,{children:[(0,e.jsx)(t.wn,{title:"\u0421\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0435 \u0441\u0445\u0435\u043C\u044B",buttons:(0,e.jsx)(t.$n,{icon:"file-import",onClick:function(){return u("import")},children:(0,a.Sn)("Import")})}),(0,e.jsxs)(t.az,{children:[Object.values(m).length===0&&(0,e.jsx)(t.BJ.Item,{mt:1,fontSize:1,children:(0,e.jsx)(t.IC,{info:!0,children:"\u0421\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0435 \u0441\u0445\u0435\u043C\u044B \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442."})}),Object.values(m).map(function(d){return(0,e.jsxs)(t.wn,{style:{position:"relative"},children:[(0,e.jsx)(t.Hg,{icon:d.icon,icon_state:d.IconState,style:{verticalAlign:"middle",width:"32px",margin:"0px",marginLeft:"0px"}}),(0,e.jsx)(t.$n,{mr:1,icon:"hammer",tooltip:d.desc,onClick:function(){return u("print",{designId:d.id})},children:(0,a.Sn)(d.name)}),(0,e.jsx)(t.az,{style:{display:"inline"},children:d.cost&&Object.keys(d.cost).map(function(v){return(0,a.Sn)(v)+": "+d.cost[v]}).join(", ")||(0,e.jsx)(t.az,{children:"\u0420\u0435\u0441\u0443\u0440\u0441\u044B \u0434\u043B\u044F \u043F\u0435\u0447\u0430\u0442\u0438 \u043D\u0435 \u0442\u0440\u0435\u0431\u0443\u044E\u0442\u0441\u044F."})}),(0,e.jsxs)(t.az,{style:{position:"absolute",right:"8px",top:"8px",display:"flex",gap:"5px"},children:[(0,e.jsx)(t.$n,{icon:"save",onClick:function(){return u("export",{designId:d.id})},children:(0,a.Sn)("Export")}),(0,e.jsx)(t.$n,{icon:"trash-can",onClick:function(){return u("del_design",{designId:d.id})}})]})]},d.id)})]})]})})}},5951:(q,S,r)=>{"use strict";r.r(S),r.d(S,{ListInputModal:()=>b});var e=r(1131),s=r(7003),n=r(5180),t=r(683),a=r(360),O=r(30),b=function(u){var f=(0,a.Oc)().act,m=u.items,d=m===void 0?[]:m,v=u.default_item,_=u.message,l=u.on_selected,c=u.on_cancel,h=(0,s.useState)(d.indexOf(v)),g=h[0],p=h[1],j=(0,s.useState)(d.length>9),x=j[0],C=j[1],I=(0,s.useState)(""),P=I[0],M=I[1],B=function($){var W=F.length-1;if($===t.R)if(g===null||g===W){var N;p(0),(N=document.getElementById("0"))==null||N.scrollIntoView()}else{var Z;p(g+1),(Z=document.getElementById((g+1).toString()))==null||Z.scrollIntoView()}else if($===t.gf)if(g===null||g===0){var ie;p(W),(ie=document.getElementById(W.toString()))==null||ie.scrollIntoView()}else{var Q;p(g-1),(Q=document.getElementById((g-1).toString()))==null||Q.scrollIntoView()}},w=function($){$!==g&&p($)},T=function(){C(!1),setTimeout(function(){C(!0)},1)},K=function($){var W=String.fromCharCode($),N=d.find(function(Q){return Q?.toLowerCase().startsWith(W?.toLowerCase())});if(N){var Z,ie=d.indexOf(N);p(ie),(Z=document.getElementById(ie.toString()))==null||Z.scrollIntoView()}},R=function($){var W;$!==P&&(M($),p(0),(W=document.getElementById("0"))==null||W.scrollIntoView())},U=function(){C(!x),M("")},F=d.filter(function($){return $?.toLowerCase().includes(P.toLowerCase())});return x||setTimeout(function(){var $;return($=document.getElementById(g.toString()))==null?void 0:$.focus()},1),(0,e.jsx)(n.wn,{onKeyDown:function($){var W=window.event?$.which:$.keyCode;(W===t.R||W===t.gf)&&($.preventDefault(),B(W)),W===t.Ri&&($.preventDefault(),l(F[g])),!x&&W>=t.W8&&W<=t.bh&&($.preventDefault(),K(W)),W===t.s6&&($.preventDefault(),c())},buttons:(0,e.jsx)(n.$n,{compact:!0,icon:x?"search":"font",selected:!0,tooltip:x?"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(){return U()}}),className:"ListInput__Section",fill:!0,title:_,children:(0,e.jsxs)(n.BJ,{fill:!0,vertical:!0,children:[(0,e.jsx)(n.BJ.Item,{grow:!0,children:(0,e.jsx)(y,{filteredItems:F,onClick:w,onFocusSearch:T,searchBarVisible:x,selected:g})}),x&&(0,e.jsx)(n.pd,{autoFocus:!0,autoSelect:!0,fluid:!0,onEnter:function(){f("submit",{entry:F[g]})},expensive:!0,onChange:R,placeholder:"Search...",value:P}),(0,e.jsx)(n.BJ.Item,{children:(0,e.jsx)(O.InputButtons,{input:F[g],on_submit:function(){return l(F[g])},on_cancel:c})})]})})},y=function(u){var f=(0,a.Oc)().act,m=u.filteredItems,d=u.onClick,v=u.onFocusSearch,_=u.searchBarVisible,l=u.selected;return(0,e.jsxs)(n.wn,{fill:!0,scrollable:!0,children:[(0,e.jsx)(n.y5,{}),m.map(function(c,h){return(0,e.jsx)(n.$n,{className:h!==l?"candystripe":"",color:"transparent",fluid:!0,id:h,onClick:function(){return d(h)},onDoubleClick:function(g){g.preventDefault(),f("submit",{entry:m[l]})},onKeyDown:function(g){var p=window.event?g.which:g.keyCode;_&&p>=t.W8&&p<=t.bh&&(g.preventDefault(),v())},selected:h===l,style:{animation:"none",transition:"none"},children:c.replace(/^\w/,function(g){return g.toUpperCase()})},h)})]})}},5959:(q,S,r)=>{"use strict";r.r(S),r.d(S,{Tank:()=>a});var e=r(1131),s=r(360),n=r(5180),t=r(3521),a=function(O){var b=(0,s.Oc)(),y=b.act,u=b.data,f;return u.has_mask?f=(0,e.jsx)(n.Ki.Item,{label:"Mask",children:(0,e.jsx)(n.$n,{icon:u.connected?"check":"times",selected:u.connected,onClick:function(){return y("internals")},children:u.connected?"Internals On":"Internals Off"})}):f=(0,e.jsx)(n.Ki.Item,{label:"Mask",color:"red",children:"No Mask Equipped"}),(0,e.jsx)(t.p8,{width:300,height:150,children:(0,e.jsx)(t.p8.Content,{children:(0,e.jsx)(n.wn,{children:(0,e.jsxs)(n.Ki,{children:[(0,e.jsx)(n.Ki.Item,{label:"Tank Pressure",children:(0,e.jsx)(n.z2,{value:u.tankPressure/1013,ranges:{good:[.35,1/0],average:[.15,.35],bad:[-1/0,.15]},children:u.tankPressure+" kPa"})}),(0,e.jsxs)(n.Ki.Item,{label:"Release Pressure",children:[(0,e.jsx)(n.$n,{icon:"fast-backward",disabled:u.releasePressure===u.minReleasePressure,tooltip:"Min",onClick:function(){return y("pressure",{pressure:"min"})}}),(0,e.jsx)(n.Q7,{animated:!0,value:u.releasePressure,width:"65px",unit:"kPa",step:.1,minValue:u.minReleasePressure,maxValue:u.maxReleasePressure,onChange:function(m){return y("pressure",{pressure:m})}}),(0,e.jsx)(n.$n,{icon:"fast-forward",disabled:u.releasePressure===u.maxReleasePressure,tooltip:"Max",onClick:function(){return y("pressure",{pressure:"max"})}}),(0,e.jsx)(n.$n,{icon:"undo",disabled:u.releasePressure===u.defaultReleasePressure,tooltip:"Reset",onClick:function(){return y("pressure",{pressure:"reset"})}})]}),f]})})})})}},6012:(q,S,r)=>{"use strict";r.r(S),r.d(S,{LatheChemicalStorage:()=>t});var e=r(1131),s=r(360),n=r(5180),t=function(a){var O=(0,s.Oc)(),b=O.data,y=O.act,u=b.loaded_chemicals,f=b.menu===4;return(0,e.jsxs)(n.wn,{title:"\u0411\u0443\u0444\u0435\u0440 \u0440\u0435\u0430\u0433\u0435\u043D\u0442\u043E\u0432",children:[(0,e.jsx)(n.$n,{icon:"trash",onClick:function(){var m=f?"disposeallP":"disposeallI";y(m)},children:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0451"}),(0,e.jsx)(n.Ki,{children:u.map(function(m){var d=m.volume,v=m.name,_=m.id;return(0,e.jsx)(n.Ki.Item,{label:"* "+d+" of "+v,children:(0,e.jsx)(n.$n,{icon:"trash",onClick:function(){var l=f?"disposeP":"disposeI";y(l,{id:_})},children:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C"})},_)})})]})}},6051:(q,S,r)=>{"use strict";r.r(S),r.d(S,{pai_advsecrecords:()=>t});var e=r(1131),s=r(360),n=r(5180),t=function(a){var O=(0,s.Oc)().act;return(0,e.jsx)(n.Ki,{children:(0,e.jsx)(n.Ki.Item,{label:"Special Syndicate options:",children:(0,e.jsx)(n.$n,{onClick:function(){return O("ui_interact")},children:"Select Records"})})})}},6081:(q,S,r)=>{"use strict";r.r(S),r.d(S,{Customat:()=>O});var e=r(1131),s=r(360),n=r(5180),t=r(3521),a=function(b){var y=(0,s.Oc)(),u=y.act,f=y.data,m=b.product,d=f.userMoney,v=f.vend_ready,_=m.price===0,l="ERROR!",c="";_?(l="\u0411\u0415\u0421\u041F\u041B\u0410\u0422\u041D\u041E",c="arrow-circle-down"):(l=m.price.toString(),c="shopping-cart");var h=!v||m.stock===0||!_&&m.price>d;return(0,e.jsxs)(n.XI.Row,{children:[(0,e.jsx)(n.XI.Cell,{collapsing:!0,children:(0,e.jsx)(n.Hg,{verticalAlign:"middle",icon:m.icon,icon_state:m.icon_state,fallback:(0,e.jsx)(n.In,{p:.66,name:"spinner",size:2,spin:!0})})}),(0,e.jsx)(n.XI.Cell,{bold:!0,children:(0,e.jsx)(n.$n,{multiLine:!0,color:"translucent",tooltip:m.desc,children:m.name})}),(0,e.jsx)(n.XI.Cell,{collapsing:!0,textAlign:"center",children:(0,e.jsxs)(n.az,{color:m.stock<=0&&"bad"||"good",children:[m.stock," \u0432 \u043D\u0430\u043B\u0438\u0447\u0438\u0438"]})}),(0,e.jsx)(n.XI.Cell,{collapsing:!0,textAlign:"center",children:(0,e.jsx)(n.$n,{fluid:!0,disabled:h,icon:c,textAlign:"left",onClick:function(){return u("vend",{Key:m.Key})},children:l})})]})},O=function(b){var y=(0,s.Oc)(),u=y.act,f=y.data,m=f.guestNotice,d=f.userMoney,v=f.user,_=f.products,l=f.panel_open,c=f.speaker;return(0,e.jsx)(t.p8,{width:470,height:600,title:"\u041A\u0430\u0441\u0442\u043E\u043C\u0430\u0442",children:(0,e.jsx)(t.p8.Content,{children:(0,e.jsxs)(n.BJ,{fill:!0,vertical:!0,children:[(0,e.jsxs)(n.BJ.Item,{children:[(0,e.jsx)(n.wn,{title:"\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C",children:v&&(0,e.jsxs)(n.az,{children:["\u0417\u0434\u0440\u0430\u0441\u0442\u0432\u0443\u0439\u0442\u0435, ",(0,e.jsx)("b",{children:v.name}),","," ",(0,e.jsx)("b",{children:v.job||"\u0411\u0435\u0437\u0440\u0430\u0431\u043E\u0442\u043D\u044B\u0439"}),"!",(0,e.jsx)("br",{}),"\u0412\u0430\u0448 \u0431\u0430\u043B\u0430\u043D\u0441: ",(0,e.jsxs)("b",{children:[d," \u043A\u0440."]})]})||(0,e.jsx)(n.az,{color:"light-grey",children:m})}),!!l&&(0,e.jsx)(n.wn,{title:"\u0422\u0435\u0445. \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u0435",children:(0,e.jsx)(n.$n,{icon:c?"check":"volume-mute",selected:c,textAlign:"left",onClick:function(){return u("toggle_voice",{})},children:"\u0414\u0438\u043D\u0430\u043C\u0438\u043A"})})]}),(0,e.jsx)(n.BJ.Item,{grow:!0,children:(0,e.jsx)(n.wn,{title:"\u041F\u0440\u043E\u0434\u0443\u043A\u0446\u0438\u044F",fill:!0,scrollable:!0,children:(0,e.jsx)(n.XI,{children:_.map(function(h){return(0,e.jsx)(a,{product:h},h.name)})})})})]})})})}},6092:(q,S,r)=>{"use strict";r.d(S,{$:()=>e});/** * Various focus helpers. * * @file