@elcrm/telegram 0.0.48 → 0.0.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,5 +1,5 @@
1
1
  (function(B,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],b):(B=typeof globalThis<"u"?globalThis:B||self,b((B.elCRM=B.elCRM||{},B.elCRM.components={}),B.React))})(this,function(B,b){"use strict";var Mo=Object.defineProperty;var zo=(B,b,de)=>b in B?Mo(B,b,{enumerable:!0,configurable:!0,writable:!0,value:de}):B[b]=de;var jt=(B,b,de)=>(zo(B,typeof b!="symbol"?b+"":b,de),de);var de=document.createElement("style");de.textContent=`@charset "UTF-8";._notice_q5jau_1{position:sticky;top:0;z-index:999;max-height:0px;padding-top:0;height:0px;font-family:Inter,sans-serif}._notice_q5jau_1 ._error_q5jau_10{background:#f44336}._notice_q5jau_1 ._success_q5jau_13{background:#4caf50}._notice_q5jau_1 ._warning_q5jau_16{background:#ff9800}._notice_q5jau_1 ._copy_q5jau_19{background:#3f51b5}._notice_q5jau_1 li{display:block;color:#fff;overflow:hidden;cursor:pointer;display:flex;margin:0 15px 10px;border-radius:12px;align-items:center;transition:all 3s ease 0s;opacity:1}._notice_q5jau_1 svg{width:20px;height:20px;fill:#fff;margin:0 10px}._notice_q5jau_1 p{padding:9px 0;flex:1}@keyframes _show-notice_q5jau_1{0%{opacity:0}to{opacity:1}}@keyframes _hide-notice_q5jau_1{0%{opacity:1}to{opacity:0}}._alerts_1pds5_1{position:fixed;top:0;bottom:0;left:0;right:0;color:var(--system-color);background:#0000009e;z-index:30;display:flex;flex:1;align-content:center;justify-content:center}._alerts_1pds5_1 dl{margin:auto;overflow:hidden;width:270px;height:auto;border-radius:12px;border:0;height:fit-content;z-index:1;background:var(--system-bg);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);-webkit-animation:_menuAnimation_1pds5_1 .4s 0s both;animation:_menuAnimation_1pds5_1 .4s 0s both;list-style:none;padding-top:20px;font-family:-apple-system,BlinkMacSystemFont;-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;box-sizing:border-box;font-size:17px;box-shadow:0 0 0 1px var(--system-border),0 2px 2px #00000008,0 4px 4px #0000000a,0 10px 8px #0000000d,0 15px 15px #0000000f,0 30px 30px #00000012,0 70px 65px #00000017}._alerts_1pds5_1 dt{font-family:-apple-system,BlinkMacSystemFont;-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;box-sizing:border-box;font-size:17px;text-align:center;text-transform:capitalize;font-weight:600;line-height:22px;margin:0 0 5px;padding:0 20px}._alerts_1pds5_1 dd{font-family:-apple-system,BlinkMacSystemFont;-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;box-sizing:border-box;font-size:13px;margin:0;text-align:center;line-height:16px;padding:0 20px 20px}._alerts_1pds5_1 ul{border-top:1px solid var(--system-hr);width:100%;display:flex}._alerts_1pds5_1 button{font-family:-apple-system,BlinkMacSystemFont;-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;box-sizing:border-box;font-size:17px;padding:10px;cursor:pointer;text-align:center;font-weight:600;background:#0000;border-radius:0;display:block;width:-webkit-fill-available;-webkit-animation:_menuItemAnimation_1pds5_1 .2s 0s both;animation:_menuItemAnimation_1pds5_1 .2s 0s both;font-family:Inter,sans-serif;border:0}._alerts_1pds5_1 button[color=blue]{color:#1b6ac0}._alerts_1pds5_1 button[color=red]{color:#c21c0d}._alerts_1pds5_1 button:hover{background:var(--system-hover)}._alerts_1pds5_1 ._--body_1pds5_103{position:fixed;top:0;bottom:0;left:0;right:0}._allert_1pds5_111 ._--form_1pds5_111{font-family:-apple-system,BlinkMacSystemFont;-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;box-sizing:border-box;font-size:17px;padding:20px;border-bottom:1px solid var(--system-hr)}._al_1pds5_1{display:flex;color:#fff;font-weight:700;height:40px;align-items:center}._al_1pds5_1 svg{fill:#fff;width:25px;height:25px;margin:0 15px}._al_1pds5_1[active=success]{background:#4caf51}._al_1pds5_1[active=error]{background:#f44336}._al_1pds5_1[active=remark]{background:#ff9800}._al_1pds5_1[active=none],._al_1pds5_1[active="0"]{display:none}._al_1pds5_1[active="1"]{background:#ff9800}._al_1pds5_1[active="2"]{background:#f44336}._al_1pds5_1[active="3"]{background:#4caf51}._al_1pds5_1[active="4"]{background:#abb6d2}._al_1pds5_1[active="5"]{background:#506290}._al_1pds5_1 button{height:30px;line-height:30px;padding:0 20px;font-weight:400;margin-left:20px;background:#e6e6e6}button{background:#b95656;font-weight:700}._btn_1hz2s_6{min-width:200px;margin:10px auto 20px;opacity:.7;padding:7px 25px;border-radius:5px;box-shadow:var(--outset);display:flex;justify-content:center;cursor:pointer;transition:.3s ease}._confirm_1hz2s_19{background:#4caf50;color:#fff}:root{--primary-light: #8abdff;--primary: #6d5dfc;--primary-dark: #5b0eeb;--white: #fff;--greyLight-1: #e4ebf5;--greyLight-2: #abb6d2;--greyLight-3: #bec8e4;--greyDark: #9baacf;--inset: inset 2px 2px 2px var(--shadow), inset -1px -1px 1px var(--shade)}._white_11p39_14{--background: #e4ebf5;--shadow: #abb6d2;--shade: #fff;--color: #1f253d;--disabled: #9baacf;--text: #394264;--tinge: #3f51b50a;--inset: inset 2px 2px 2px var(--shadow), inset -1px -1px 1px var(--shade);--outset: 2px 2px 2px var(--shadow), -1px -1px 1px var(--shade)}._black_11p39_26{--background: #506290;--shadow: #1f253d;--shade: #394264;--color: #fff;--disabled: #29314c;--text: #abb6d2;--tinge: #00000026;--inset: inset 1px 1px 1px #394264, inset -1px -1px 1px #39426470;--outset: 1px 1px 1px #394264, -1px -1px 1px #39426470}[shake=true]{-webkit-animation-name:_shake_11p39_1;animation-name:_shake_11p39_1;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}@keyframes _shake_11p39_1{0%,to{transform:translateZ(0)}10%,30%,50%,70%,90%{transform:translate3d(-10px,0,0)}20%,40%,60%,80%{transform:translate3d(10px,0,0)}}[data-color-bg=fff1d6]{--inset: inset 1px 1px 1px #c9c1ac, inset -1px -1px 1px var(--shade);--outset: 2px 2px 2px #c9c1ac, -1px -1px 1px var(--shade)}[data-color-bg=ffd9d9]{--inset: inset 1px 1px 1px #cdb0b1, inset -1px -1px 1px var(--shade);--outset: 2px 2px 2px #cdb0b1, -1px -1px 1px var(--shade)}[data-color-bg=daffe5]{--inset: inset 1px 1px 1px #b6d2be, inset -1px -1px 1px var(--shade);--outset: 2px 2px 2px #b6d2be, -1px -1px 1px var(--shade)}._modal_11p39_73{position:fixed;top:0;left:0;right:0;bottom:0;z-index:10;display:flex}._o_11p39_83{position:fixed;top:0;left:0;right:0;bottom:0;background-color:#000000b8}._w_11p39_14{box-shadow:5px 7px 18px #000000a8;background:var(--background);position:relative;min-width:300px;margin:auto;border-radius:10px;width:400px;max-height:90%;display:flex;flex-flow:column nowrap;overflow:hidden}._h_11p39_107{flex:1;font-size:15px;line-height:35px;font-weight:700;text-align:left;color:var(--color);padding:10px 15px 5px 30px;user-select:none;-webkit-user-select:none;display:flex;z-index:1}._l_11p39_121{border-radius:10px;font-size:15px;box-shadow:var(--inset);color:var(--color);margin:10px;overflow:hidden;overflow-y:scroll;padding:5px 0}._l_11p39_121 li{display:flex;margin:0 5px;padding:10px;position:relative}._l_11p39_121 li:after{content:"";border-bottom:1px solid #ddd;position:absolute;bottom:0;left:5px;right:5px}._l_11p39_121 li:last-child{border-bottom:0}._l_11p39_121 li:hover{background:#00000012;cursor:pointer;border-radius:5px}._t_11p39_159{padding-right:10px}._m_11p39_73{flex:1}._x_11p39_167{cursor:pointer;color:#1f253d;opacity:.5;display:flex}._x_11p39_167 svg{width:20px}._s_11p39_177{flex:1;overflow-y:scroll}._c_11p39_182{text-align:center;margin:20px}._f_11p39_187{padding:0 20px;display:flex;flex-direction:column}._f_11p39_187 dl{margin:7px 0;flex:1 1;flex-direction:row;display:flex}._f_11p39_187 dt{padding:7px 10px;color:var(--text);margin-left:7px;flex:0 1 150px}._f_11p39_187 dd{margin:0;background:var(--tinge);color:var(--color);box-shadow:var(--inset);border-radius:5px;min-height:33px;padding:7px 10px;flex:1 1}._f_11p39_187 p{margin:auto;width:300px;padding:20px 0 5px;color:#1f253dc7;font-size:15px}._x_11p39_167:hover{opacity:1}._btn_11p39_230{min-width:200px;margin:10px auto 20px;opacity:.7;padding:7px 25px;border-radius:5px;box-shadow:var(--outset);display:flex;justify-content:center;cursor:pointer;transition:.3s ease}._g_11p39_243{display:flex;gap:10px}._c_11p39_182{margin:10px 7px 20px;opacity:.8;box-shadow:var(--outset);border-radius:10px;padding:20px;flex:1;text-align:center;cursor:pointer}._c_11p39_182:first-child{margin-left:20px}._c_11p39_182:last-child{margin-right:20px}._c_11p39_182:hover{opacity:1;background:var(--tinge)}._c_11p39_182 i{font-size:70px;margin-bottom:20px;text-align:center;display:block;color:var(--disabled)}._c_11p39_182 b{text-align:center;display:block;color:var(--color)}._c_11p39_182 p{text-align:center;font-size:15px;color:var(--text)}._btn_11p39_230:hover{opacity:1}._modal_11p39_73._size-a_11p39_296 ._w_11p39_14{width:auto}._modal_11p39_73._size-s_11p39_300 ._w_11p39_14{width:400px}._modal_11p39_73._size-m_11p39_304 ._w_11p39_14{width:500px}._modal_11p39_73._size-l_11p39_308 ._w_11p39_14{width:800px}._modal_11p39_73._size-x_11p39_312 ._w_11p39_14{width:1000px}._modal_11p39_73._size-f_11p39_316 ._w_11p39_14{width:100%;max-width:1200px;min-width:910px}._btn_11p39_230._confirm_11p39_322{background:#4caf50;color:#fff}._btn_11p39_230._cancel_11p39_327{background:#f44336;color:#fff}._btn_11p39_230._disabled_11p39_332,._btn_11p39_230._await_11p39_339{background:#efefef;color:#000;opacity:1;cursor:default}._m_11p39_73 big{position:absolute;margin:10px auto 20px;border-radius:5px;box-shadow:var(--outset);display:flex;top:-1px;right:55px}._m_11p39_73 big i{width:30px;height:30px;text-align:center;margin:3px;line-height:30px;cursor:pointer;border-radius:5px}._m_11p39_73 big i:hover{box-shadow:var(--inset)}._m_11p39_73 nav{width:fit-content;height:35px;margin:0 auto;box-shadow:var(--outset);border-radius:5px;display:flex}._m_11p39_73 span{border-radius:3px;flex:1 1;margin:2px;padding:0 10px;line-height:35px;color:var(--disabled);cursor:pointer}._m_11p39_73 span._active_11p39_389{box-shadow:var(--inset);color:var(--color)}._coincidence_11p39_395{position:fixed;right:20px;bottom:20px;z-index:1111;overflow-y:scroll;max-height:565px;padding-top:90px}._coincidence_11p39_395 span{display:block;width:300px;border-radius:5px;overflow:hidden;cursor:pointer;margin:10px 0;padding:10px;color:#1f253d}._coincidence_11p39_395 dl{display:flex;padding:0;margin:5px}._coincidence_11p39_395 dd{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0;margin:0 10px}._sa_11p39_431{width:auto}._ss_11p39_435{width:400px}._sm_11p39_439{width:500px}._sl_11p39_443{width:800px}._sx_11p39_447{width:1000px}._sf_11p39_451{width:100%;max-width:1200px;min-width:910px}._o_1kqkq_1{position:fixed;z-index:98;top:0;left:0;right:0;bottom:0;background:#0000}._c_1kqkq_11{box-shadow:5px 7px 18px #000000a8;padding:10px;margin:0;display:block;position:absolute;background:#394264;z-index:99;border-radius:10px;overflow:hidden;max-height:315px;color:#fff}._c_1kqkq_11 div{display:grid;grid-template-columns:35px 35px 35px 35px 35px 35px 35px}._c_1kqkq_11 b{font-weight:400;display:block;padding:8px 5px;border-radius:5px;cursor:pointer;text-align:center}._c_1kqkq_11 b:hover{background:#00000073}._c_1kqkq_11 p{color:#abb6d2;text-align:center;padding:0;margin:3px;cursor:default}._c_1kqkq_11 i{flex:0 30px;padding:9px;text-align:center;cursor:pointer;border-radius:5px}._c_1kqkq_11 i:hover{background:#00000073}._c_1kqkq_11 i:before{cursor:pointer;display:block}._c_1kqkq_11 s{display:flex;font-style:normal;text-decoration:none;padding-bottom:5px;align-items:center}._c_1kqkq_11 s h2{flex:1 1;padding:0;margin:0;font-size:18px;text-align:center;font-weight:400;line-height:35px;color:#fff;cursor:default}._c_1kqkq_11 span{padding:2px;text-align:center}[field=password] dd{white-space:nowrap;font-style:unset;-webkit-text-security:disc;user-select:none;-webkit-user-select:text}[field=password] dd:before{-webkit-text-security:none}[field=select] dd{cursor:pointer}[field] dd:before{pointer-events:none}[field=check] dd{max-width:35px;padding:0;cursor:pointer}[field=check] [active]:after{content:"";background:#394264;width:15px;height:15px;display:block;border-radius:5px}*{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;padding:0;margin:0}html{height:-webkit-fill-available}body{background:var(--tg-theme-bg-color);color:var(--tg-theme-text-color);-webkit-font-smoothing:antialiased;font-family:sans-serif;font-variant:no-common-ligatures;text-rendering:optimizeLegibility;padding:0;margin:0}body::-webkit-scrollbar{width:0px;height:0px}._debug_ug20b_34{height:50px;font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;background:var(--tg-theme-header-bg-color);color:var(--tg-theme-text-color);display:flex;justify-content:space-between;align-items:center;z-index:222;position:sticky;top:0}._debug_ug20b_34 ._b_ug20b_46,._debug_ug20b_34 ._o_ug20b_50{padding:0 15px;cursor:pointer}._mb_ug20b_55{bottom:0;position:fixed;left:0;right:0;padding:10px}._mb_ug20b_55 button{width:100%}._tm_ug20b_66{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;display:flex;flex-direction:column;background-color:var(--tg-theme-secondary-bg-color);border-radius:10px;box-shadow:0 10px 20px #40404026;width:200px;position:absolute;right:5px;z-index:999;border:1px solid var(--tg-theme-hint-color)}._tm_ug20b_66 ul{list-style-type:none;margin:0;display:block;width:100%;padding:8px;border-top:1px solid var(--tg-theme-hint-color)}._tm_ug20b_66 ul:first-child{border-top:0}._tm_ug20b_66 ol{list-style-type:none;display:none;padding:8px;background-color:var(--tg-theme-secondary-bg-color);border-radius:10px;box-shadow:0 10px 20px #40404026;position:absolute;right:100%;left:-180px;z-index:100;width:100%;top:0;flex-direction:column;border:1px solid var(--tg-theme-hint-color)}._tm_ug20b_66 ol:hover{display:flex}._tm_ug20b_66 li{position:relative}._tm_ug20b_66 button{font:inherit;border:0;padding:8px 36px 8px 8px;width:100%;border-radius:8px;text-align:left;display:flex;align-items:center;position:relative;color:var(--tg-theme-text-color);background-color:var(--tg-theme-secondary-bg-color)}._tm_ug20b_66 button:hover{background-color:var(--tg-theme-button-color)}._tm_ug20b_66 button:hover+ol{display:flex}._ta_ug20b_133{margin:0;width:100vw;height:100vh;display:-webkit-flex;display:flex;justify-content:center;align-items:center;background-color:#0006}._ta_ug20b_133 ._--body_ug20b_143{font-family:-apple-system,BlinkMacSystemFont;-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;box-sizing:border-box;font-size:17px;overflow:hidden;width:270px;height:auto;background-color:#ffffff73;border-radius:12px}._setting_dva4m_2{width:100%;overflow:auto}._setting_dva4m_2 nav{border:0px;padding:0 10px 5px;margin:25px auto;width:600px}._setting_dva4m_2 nav ul{display:flex;justify-content:space-between;gap:1px}._setting_dva4m_2 nav li{flex:1;text-align:center;background:var(--setting-bg);color:var(--setting-color);cursor:pointer;opacity:.7}._setting_dva4m_2 nav li[tabs-active=true]{opacity:1}._setting_dva4m_2 fieldset{border:0px;padding:0 10px 5px;margin:25px auto;width:600px}._setting_dva4m_2 legend{text-transform:uppercase;font-weight:300;font-size:1.3em}._setting_dva4m_2 ul{margin:10px 0;color:#000;border-radius:8px;overflow:hidden;list-style-type:none;padding:0}._setting_dva4m_2 li{font-size:20px;line-height:40px}._setting_dva4m_2 dl{display:flex;margin:0 0 1px;align-items:center;padding-right:9px;color:var(--setting-color);background:var(--setting-bg)}._setting_dva4m_2 dd{text-align:right;padding-left:15px;position:relative;display:flex;justify-content:center}._setting_dva4m_2 dt{flex:1;padding:0 15px}._setting_dva4m_2 article{padding-left:15px;color:var(--setting-bg);font-weight:100;font-size:14px}._setting_dva4m_2 legend{color:var(--setting-bg);display:flex;justify-content:space-between;width:100%}._setting_dva4m_2 svg{fill:var(--setting-color);width:15px;margin-left:10px}._setting_dva4m_2 [data-close]{cursor:pointer;width:10px;height:10px;border-top:3px solid var(--setting-color);border-left:3px solid var(--setting-color);position:absolute;right:10px;top:3px;-webkit-transform:translate(0,-50%) rotate(45deg);-ms-transform:translate(0,-50%) rotate(45deg);transform:translateY(-50%) rotate(45deg)}._setting_dva4m_2 [data-close=false]{right:10px;top:0;-webkit-transform:translate(0,-50%) rotate(-135deg);-ms-transform:translate(0,-50%) rotate(-135deg);transform:translateY(-50%) rotate(-135deg)}._setting_dva4m_2 [data-item=accordion]>div{margin-top:1px;background-color:var(--setting-bg)}._setting_dva4m_2 [role=button]{font-size:13px;border-radius:5px;text-align:center;width:100px;line-height:30px;padding:0;cursor:pointer}._setting_dva4m_2 [role=button]:hover{background:var(--setting-action)}._setting_dva4m_2 [role=button-outline]{font-size:14px;border:1px solid;padding:3px 13px;border-radius:6px;cursor:pointer;text-transform:none}._setting_dva4m_2 [role=button-outline]:hover{background:#00000038}._setting_dva4m_2 [role=switch]{cursor:pointer;position:relative;width:44px;height:22px;border-radius:50px;vertical-align:text-bottom;transition:all .3s linear;margin:0}._setting_dva4m_2 [role=switch]:after{content:"";position:absolute;left:4px;width:16px;height:16px;background-color:#fff;border-radius:50%;box-shadow:0 2px 2px #0000003d;transform:translate3d(0,3px,0);transition:all .2s ease-in-out}._setting_dva4m_2 [role=switch]:before{content:"";position:absolute;left:0;width:42px;height:22px;background-color:#ddd;border-radius:11px;transition:all .25s linear}._setting_dva4m_2 [role=switch][aria-checked=true]{background-color:#1f253d}._setting_dva4m_2 [role=switch][aria-checked=true]:before{transform:translate3d(18px,2px,0) scale3d(0,0,0)}._setting_dva4m_2 [role=switch][aria-checked=true]:after{transform:translate3d(19px,3px,0)}._h_1usnu_1{background:var(--content);margin-bottom:2px;border-radius:5px 5px 0 0;line-height:35px;align-items:center;display:flex;height:35px}._g_1usnu_11{display:flex;gap:5px}._hr_1usnu_16{text-align:center;position:absolute;display:flex;top:0;right:0;align-items:center;gap:6px;padding-right:4px;height:35px}._hl_1usnu_28{text-align:center;position:absolute;display:flex;top:0;left:0;align-items:center;gap:6px;padding-left:4px;height:35px}._t_1usnu_40{border-bottom:0;cursor:default;display:block;flex:1;margin-block-start:0;margin-block-end:0;margin-inline-start:0px;margin-inline-end:0px;font-size:14px!important;line-height:35px;font-weight:700;text-align:center;color:var(--label);position:absolute;left:0;right:0;height:35px}._s_1usnu_60{display:flex;flex:1;position:relative;overflow:hidden;border-radius:5px;flex-flow:column nowrap}._u_1usnu_69{overflow:hidden;border-radius:0 0 5px 5px;background:var(--content);display:block}._o_1usnu_76{overflow:hidden;position:relative;border-radius:5px;margin-top:5px;flex:1 1;background:var(--content)}._o_1usnu_76 ul{border-top:1px solid var(--separator);display:flex;flex-direction:column;gap:1px;background:var(--separator)}._o_1usnu_76 li{background:var(--content);display:flex}._o_1usnu_76 li[data-empty]:empty:before{content:attr(data-empty);display:block;color:#ccc;text-align:center;height:50px;line-height:50px;background:#fff}._l_1usnu_105{flex:1;overflow:hidden;overflow-y:scroll;border-radius:0 0 5px 5px}._l_1usnu_105:last-child{border-radius:0}._hh_1usnu_115{background:#fff;display:block;flex:1 1;font-size:14px;line-height:35px;font-weight:700;text-align:center;color:#1f253d;border-bottom:1px solid #ddd;position:relative}._c_1usnu_128{width:300px;height:150px;margin:auto;border-radius:5px;text-align:center;background:#0000004a;line-height:150px;color:#fff}[type=load]{display:block;text-align:center;height:50px;line-height:50px;background:#fff;border-radius:0 0 5px 5px}[type=load] i{display:inline-block;width:15px;height:15px;border-radius:15px;background-color:#e6ebf4;margin:0 5px}[type=load] i:nth-last-child(1){animation:_loadingB_1usnu_1 1.5s 1s infinite}[type=load] i:nth-last-child(2){animation:_loadingB_1usnu_1 1.5s .5s infinite}[type=load] i:nth-last-child(3){animation:_loadingB_1usnu_1 1.5s 0s infinite}@keyframes _loadingB_1usnu_1{0%{width:15px}50%{width:35px}to{width:15px}}._m_1usnu_180{-webkit-app-region:no-drag;overflow:hidden;border-radius:5px;margin-top:5px;background:#fff;display:block;min-height:35px;padding:10px;text-align:justify;white-space:pre-line}._m_1usnu_180 dd{min-height:35px}._ul_1usnu_196{overflow:hidden;border-radius:0;background:var(--separator);list-style-type:none;list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:1px}._ul_1usnu_196 li{display:flex;font-size:12px;min-height:25px;cursor:pointer;align-items:center;gap:1px}._ul_1usnu_196 span{background:var(--content);flex:1;height:25px;line-height:25px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._f_1usnu_226{border-top:1px solid var(--separator)}._f_1usnu_226 dl{display:flex;border-bottom:1px solid #ddd;margin:0}._f_1usnu_226 dt{flex:0 120px;font-size:13px;color:#999;margin:0;padding:6px 0 5px 9px}._f_1usnu_226 dd{flex:1;margin:0;border-left:1px solid #ddd;padding:5px;font-size:15px;min-height:17px;margin-inline-start:0px;overflow:hidden;overflow-x:scroll}._f_1usnu_226[edit] [edit=true]{color:red}._n_euuvm_1{flex:0 0 50px;cursor:pointer;color:#fff;border-right:1px solid #000;display:flex;justify-content:center;align-items:center}._n_euuvm_1 svg{width:30px;height:30px;color:#fff}._s_18bde_1{flex:1;overflow:scroll}._s_18bde_1 [data-load]{display:block;text-align:center;height:50px;line-height:50px;background:#fff;border-radius:0 0 5px 5px}._s_18bde_1 [data-load] i{display:inline-block;width:15px;height:15px;border-radius:15px;background-color:#e6ebf4;margin:0 5px}._s_18bde_1 [data-load] i:nth-last-child(1){animation:_loadingB_18bde_1 1.5s 1s infinite}._s_18bde_1 [data-load] i:nth-last-child(2){animation:_loadingB_18bde_1 1.5s .5s infinite}._s_18bde_1 [data-load] i:nth-last-child(3){animation:_loadingB_18bde_1 1.5s 0s infinite}._ul_18bde_31{overflow:hidden;border-radius:0 0 5px 5px;background:var(--separator);display:block;list-style-type:none;list-style:none;padding:0;margin:0}._ul_18bde_31 [data-empty]:empty:before{content:attr(data-empty);display:block;color:#ccc;text-align:center;height:50px;line-height:50px;background:#fff}@keyframes _loadingB_18bde_1{0%{width:15px}50%{width:35px}to{width:15px}}._spinner_1ul0m_1{fill:#fff;display:block;width:70px;height:70px;margin:70px auto;animation:_spinner_1ul0m_1 1.5s infinite linear;border-radius:50%}@-webkit-keyframes _spinner_1ul0m_1{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-ms-transform:rotate(360deg);-o-transform:rotate(360deg);transform:rotate(360deg)}}@-moz-keyframes _spinner_1ul0m_1{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-ms-transform:rotate(360deg);-o-transform:rotate(360deg);transform:rotate(360deg)}}@-o-keyframes _spinner_1ul0m_1{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-ms-transform:rotate(360deg);-o-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes _spinner_1ul0m_1{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-ms-transform:rotate(360deg);-o-transform:rotate(360deg);transform:rotate(360deg)}}._l_1ul0m_75{display:block;text-align:center;height:50px;line-height:50px;background:#fff;border-radius:0 0 5px 5px}._l_1ul0m_75 i{display:inline-block;width:15px;height:15px;border-radius:15px;background-color:#e6ebf4;margin:0 5px}._l_1ul0m_75 i:nth-last-child(1){animation:_loadingB_1ul0m_1 1.5s 1s infinite}._l_1ul0m_75 i:nth-last-child(2){animation:_loadingB_1ul0m_1 1.5s .5s infinite}._l_1ul0m_75 i:nth-last-child(3){animation:_loadingB_1ul0m_1 1.5s 0s infinite}@keyframes _loadingB_1ul0m_1{0%{width:15px}50%{width:35px}to{width:15px}}._s_t9swc_1{flex:0 0 200px;cursor:text;text-align:left;line-height:30px;max-width:200px;overflow:hidden;white-space:nowrap;outline:none;height:30px;padding:0 5px 0 10px;color:#fff;margin-top:10px;margin-left:5px;background:#0000004d;border:1px solid rgba(0,0,0,.3);border-radius:5px;box-shadow:inset 0 -5px 45px #64646433,0 1px 1px #fff3}._s_t9swc_1:empty:before{content:attr(placeholder);display:block;color:#ccc}._f_q3r0i_1{flex:0 0 50px;position:relative;display:flex;align-items:center;justify-content:center;cursor:pointer}._f_q3r0i_1 svg{width:30px;height:30px;color:#fff}._f_q3r0i_1 i{width:15px;height:15px;color:#fff;position:absolute;background:red;border-radius:50%;font-style:normal;top:5px;right:0;display:flex;align-items:center;justify-content:center;padding:10px}._sort_1yrvt_1{text-align:center;position:absolute;top:0;right:0}._sort_1yrvt_1 i{flex:0 1 35px;text-align:center;font-size:16px;line-height:35px;cursor:pointer;width:30px;display:inline-block}
2
- `,document.head.appendChild(de);let Ge={};const N={enCode:e=>Ge.enCode(e),deCode:e=>Ge.deCode(e),New:e=>{Ge=e}},j={},Z={},ke={},Ct={},ie={};let Ve="M06";function Wn(e){Ve=e}function Zn(){return Ve}function Un(e){if(localStorage.getItem("d")){let r=sessionStorage.getItem("f");r?(r=N.deCode(r),r||V(),j.id=r.id,j.tab=r.tab,j.page=r.page,j.module=r.module,j.time=r.time,j.payment={active:!0},j.module_admin=r.module_admin):(j.id=0,j.tab="",j.page="Main",j.module=j.module||Ve)}else["a","b","c","d","e","m","u","s","q","p"].forEach(r=>localStorage.removeItem(r)),["f"].forEach(r=>sessionStorage.removeItem(r)),j.id=0,j.tab="",j.page="Auth",j.module="M00";return e}function V(){["a","b","c","d","e","m","u","s","q","p"].forEach(e=>localStorage.removeItem(e)),["f"].forEach(e=>sessionStorage.removeItem(e)),window.location.reload()}function Yn(e){e=e.split("/"),j.page="Main",j.module=e[0],j.tab=e[1],j.id=0,sessionStorage.setItem("f",N.enCode({module:j.module,page:j.page,tab:j.tab,id:j.id,time:new Date().getTime()})),Z.page(j.page)}function Kn(e){return localStorage.setItem("d",e)}function Hn(){let e=localStorage.getItem("d");return e!==""&&e!=="undefined"&&e!==null?e:""}function Gn(e){return localStorage.setItem("a",e)}function Vn(){let e=localStorage.getItem("a");return e!==""&&e!=="undefined"&&e!==null?e:""}function Xn(e){localStorage.setItem("p",N.enCode(e))}function Xe(){let e=localStorage.getItem("p");if(e!==""&&e!=="undefined"&&e!==null){let t=N.deCode(e);return t||V(),t}else return V(),!1}function Jn(e){if(typeof e!="function"){const[t,r]=b.useState(e||St()),i=a=>{r(a)};return Z.page=i,[t]}else Z.page=e}function Qn(e,t=!0){j.page=e,sessionStorage.setItem("f",N.enCode(j)),t&&Z.page(e)}function St(){return j.page}function er(e){return j.page===e}function tr(e){if(typeof e!="function"){const[t,r]=b.useState(e||Et()),i=a=>{r(a)};return Z.module=i,[t]}else Z.module=e}function nr(e,t=!0){j.module=e,sessionStorage.setItem("f",N.enCode(j)),t&&Z.module(e)}function Et(){return j.module}function rr(e){return j.module===e}function ir(e){if(typeof e!="function"){const[t,r]=b.useState(e||Pe()),[i,a]=b.useState(!1);return b.useEffect(()=>{a(!0)},[]),Z.tabs=r,[t,i]}else Z.tabs=e}function ar(e,t=!0){if(j.tab=e,sessionStorage.setItem("f",N.enCode(j)),!!t)if(Z.tabs)Z.tabs(e);else throw new Error("useTabs not found")}function Pe(){return j.tab}function or(e){return j.tab===e}function sr(e){if(typeof e!="function"){const[t,r]=b.useState(e||Bt()),i=a=>{r(a)};return Z.id=i,[t]}else Z.id=e}function lr(e){Z.id=e}function dr(e,t=!0){j.id=e,sessionStorage.setItem("f",N.enCode(j)),t&&Z.id(e)}function Bt(){return j.id}function cr(e){return Number(j.id)===e}function ur(e,t,r){j.module=e,j.id=r,j.tab=t,sessionStorage.setItem("f",N.enCode(j)),Z.module(e),Z.tabs(t)}function fr(e){ke.data=e[0],delete ke.data.id,document.body.dataset.theme=ke.data.s15,localStorage.setItem("s",N.enCode(ke.data))}function pr(e,t){ke.data[e]=t,localStorage.setItem("s",N.enCode(ke.data))}function xr(e){let t=localStorage.getItem("s");return t===null?{}:(t=N.deCode(t),t?e!==void 0?t[e]:t:V())}function Tt(e){localStorage.setItem("m",N.enCode({data:e}))}function hr(){let e=localStorage.getItem("m");if(e!==""&&e!=="undefined"&&e!==null){let t=localStorage.getItem("m"),r=N.deCode(t);r||V();const i=(o,l)=>{let d=l+"";for(;d.length<o;)d="0"+d;return d};return r.data.split(",").map(o=>"M"+i(2,o))}else return V(),!1}function gr(e){Z.sort=e}function It(e){let t=localStorage.getItem("b");t=t===null?{}:N.deCode(t),t[Pe()]=e,localStorage.setItem("b",N.enCode(t))}function Je(){let e=localStorage.getItem("b");return e===null?{}:(e=N.deCode(e),e=e[Pe()],e=e===void 0?{active:1,sort:"<"}:e,e)}function $t(e){localStorage.setItem("c",N.enCode(e))}function mr(e,t){var i;let r=localStorage.getItem("c");if(r!==""&&r!=="undefined"&&r!==null){let a=N.deCode(r);return a||V(),e===void 0?a:t?(i=a[e][t])==null?void 0:i.n:a[e]}else return V(),!1}function Ee(e){ie.data=e,localStorage.setItem("q",N.enCode(ie.data))}function _r(e,t){ie.data={...ie.data,[e]:t},localStorage.setItem("q",N.enCode(ie.data))}function he(e,t){if(!ie.data){let r=localStorage.getItem("q");r&&(ie.data=N.deCode(r))}return e===void 0&&t===void 0?ie.data:e!==void 0&&t===void 0?ie.data[e]:ie.data[e][t]}function br(e){Ct.data=e}function vr(e){return Ct.data[e]}function yr(e){j.payment=e}function wr(){return j.payment}function Nt(e){localStorage.setItem("u",N.enCode(e))}function kr(){let e=localStorage.getItem("u");if(e!==""&&e!=="undefined"&&e!==null){let t=N.deCode(e);return t||V(),t}else return V(),!1}function jr(e){const t=r=>{let i=localStorage.getItem(r);if(i!==""&&i!=="undefined"&&i!==null)try{let a=N.deCode(i);if(!a)return;j[r]={is:!0,time:a.time,data:a.data}}catch{j[r]={is:!1,time:0,data:{}}}else j[r]={is:!1,time:0,data:{}}};e.forEach(r=>t(r))}function Cr(e){return j[e]===void 0?(j[e]={data:{},time:0},{data:{},time:0}):j[e]}function Sr(e,t){j[e]={data:t.data,time:t.time},localStorage.setItem(e,N.enCode(j[e]))}function Er(e,t,r){j[e].time=r,j[e].data[t.item][t.name]=t.value,localStorage.setItem(e,N.enCode(j[e]))}const oe={setSSID:Kn,getSSID:Hn,getPORT:Xe,setPORT:Xn,setAUTH:Gn,getAUTH:Vn,Logaut:V,Start:Yn,setMenu:Tt,getMenu:hr,useSort:gr,setSort:It,getSort:Je,setCompany:$t,getCompany:mr,setSelect:Ee,addSelect:_r,getSelect:he,setApi:br,getApi:vr,setPayment:yr,getPayment:wr,setUser:Nt,getUser:kr,getDefaultModules:Zn,getBase:Cr,setBase:Sr,editBase:Er,loadBase:jr},Dt="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO29ubWVzc2FnZT1hc3luYyB0PT57dHJ5e2xldCBhPWF3YWl0IGZldGNoKGAke3QuZGF0YS5ob3N0fSR7dC5kYXRhLmxpbmt9YCx7bWV0aG9kOiJQT1NUIixoZWFkZXJzOntzc2lkOnQuZGF0YS5zc2lkLCJDb250ZW50LXR5cGUiOiJhcHBsaWNhdGlvbi9qc29uO2NoYXJzZXQ9dXRmLTgifSxib2R5OkpTT04uc3RyaW5naWZ5KHQuZGF0YS5kYXRhKX0pO3Bvc3RNZXNzYWdlKGF3YWl0IGEuanNvbigpKX1jYXRjaChhKXtwb3N0TWVzc2FnZSh7c3RhdHVzOiJlcnJvciIsZGF0YToid29ya2VyIixtZXNzYWdlOmF9KX19fSkoKTsK",Br=e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0)),Mt=typeof window<"u"&&window.Blob&&new Blob([Br(Dt)],{type:"text/javascript;charset=utf-8"});function zt(e){let t;try{if(t=Mt&&(window.URL||window.webkitURL).createObjectURL(Mt),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;base64,"+Dt,{name:e==null?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}const ce={};function Tr(e){return e&&(ce.s=e),ce.s}function Ir(e){return e&&(ce.a=e),ce.a}function $r(e){return e&&(ce.c=e),ce.c}function Nr(e){return e&&(ce.h=e),ce.h}const Re={version:{Api:Ir,Server:Tr,Client:$r},Host:Nr};let Dr="api",Mr="elcrm",zr="online";function Fr(){let e=oe.getPORT(),t="",r="";return e.address==="localhost"?(t=`http://localhost:${e.socket}/documents`,r=`http://localhost:${e.socket}/files`):(t="https://"+e.address+"/documents",r="https://"+e.address+"/files"),{documents:t,files:r}}let Ft=`${Dr}.${Mr}.${zr}`;function Pr(e){return"https://"+oe.getPORT().address+"/audio/"+e}function Oe(e,t={},r=oe.getAUTH()){return new Promise(i=>{const a=new zt;a.onmessage=o=>{i(o.data),a.terminate()},a.postMessage({link:e,data:t,ssid:r,host:Re.Host()||`https://${Ft}/`})})}function Rr(e,t={},r=oe.getAUTH()){return new Promise(i=>{const a=new zt;a.onmessage=o=>{i(o.data),a.terminate()},a.postMessage({link:e,data:t,ssid:r,host:Re.Host()+"modules/"||`https://${Ft}/modules`})})}function Or(e,t={},r){const[i,a]=b.useState({status:"load"}),o=async l=>{let d=await Oe(e,l,r);a(d)};return b.useEffect(()=>{o(t)},[]),[i,o]}let Pt={"Content-type":"application/json;charset=utf-8",ssid:oe.getAUTH()||""};async function Lr(e,t,r={}){try{return await(await Oe("https://"+e+"/"+t,{method:"POST",headers:Pt,body:JSON.stringify(r)})).json()}catch{return{status:"error"}}}async function Ar(e,t={}){try{return await(await Oe("https://tb.elcrm.online/v1/"+e,{method:"POST",headers:Pt,body:JSON.stringify(t)})).json()}catch{return{status:"error"}}}const qr={audio:Pr,fetch:Oe,modules:Rr,remoute:Lr,url:Fr,telegram:Ar,use:Or};var Qe={exports:{}},Be={};/**
2
+ `,document.head.appendChild(de);let Ge={};const N={enCode:e=>Ge.enCode(e),deCode:e=>Ge.deCode(e),New:e=>{Ge=e}},j={},U={},ke={},Ct={},re={};let Ve="M06";function Wn(e){Ve=e}function Zn(){return Ve}function Un(e){if(localStorage.getItem("d")){let r=sessionStorage.getItem("f");r?(r=N.deCode(r),r||V(),j.id=r.id,j.tab=r.tab,j.page=r.page,j.module=r.module,j.time=r.time,j.payment={active:!0},j.module_admin=r.module_admin):(j.id=0,j.tab="",j.page="Main",j.module=j.module||Ve)}else["a","b","c","d","e","m","u","s","q","p"].forEach(r=>localStorage.removeItem(r)),["f"].forEach(r=>sessionStorage.removeItem(r)),j.id=0,j.tab="",j.page="Auth",j.module="M00";return e}function V(){["a","b","c","d","e","m","u","s","q","p"].forEach(e=>localStorage.removeItem(e)),["f"].forEach(e=>sessionStorage.removeItem(e)),window.location.reload()}function Yn(e){e=e.split("/"),j.page="Main",j.module=e[0],j.tab=e[1],j.id=0,sessionStorage.setItem("f",N.enCode({module:j.module,page:j.page,tab:j.tab,id:j.id,time:new Date().getTime()})),U.page(j.page)}function Kn(e){return localStorage.setItem("d",e)}function Hn(){let e=localStorage.getItem("d");return e!==""&&e!=="undefined"&&e!==null?e:""}function Gn(e){return localStorage.setItem("a",e)}function Vn(){let e=localStorage.getItem("a");return e!==""&&e!=="undefined"&&e!==null?e:""}function Xn(e){localStorage.setItem("p",N.enCode(e))}function Xe(){let e=localStorage.getItem("p");if(e!==""&&e!=="undefined"&&e!==null){let t=N.deCode(e);return t||V(),t}else return V(),!1}function Jn(e){if(typeof e!="function"){const[t,r]=b.useState(e||St()),i=a=>{r(a)};return U.page=i,[t]}else U.page=e}function Qn(e,t=!0){j.page=e,sessionStorage.setItem("f",N.enCode(j)),t&&U.page(e)}function St(){return j.page}function er(e){return j.page===e}function tr(e){if(typeof e!="function"){const[t,r]=b.useState(e||Et()),i=a=>{r(a)};return U.module=i,[t]}else U.module=e}function nr(e,t=!0){j.module=e,sessionStorage.setItem("f",N.enCode(j)),t&&U.module(e)}function Et(){return j.module}function rr(e){return j.module===e}function ir(e){if(typeof e!="function"){const[t,r]=b.useState(e||Pe()),[i,a]=b.useState(!1);return b.useEffect(()=>{a(!0)},[]),U.tabs=r,[t,i]}else U.tabs=e}function ar(e,t=!0){if(j.tab=e,sessionStorage.setItem("f",N.enCode(j)),!!t)if(U.tabs)U.tabs(e);else throw new Error("useTabs not found")}function Pe(){return j.tab}function or(e){return j.tab===e}function sr(e){if(typeof e!="function"){const[t,r]=b.useState(e||Bt()),i=a=>{r(a)};return U.id=i,[t]}else U.id=e}function lr(e){U.id=e}function dr(e,t=!0){j.id=e,sessionStorage.setItem("f",N.enCode(j)),t&&U.id(e)}function Bt(){return j.id}function cr(e){return Number(j.id)===e}function ur(e,t,r){j.module=e,j.id=r,j.tab=t,sessionStorage.setItem("f",N.enCode(j)),U.module(e),U.tabs(t)}function fr(e){ke.data=e[0],delete ke.data.id,document.body.dataset.theme=ke.data.s15,localStorage.setItem("s",N.enCode(ke.data))}function pr(e,t){ke.data[e]=t,localStorage.setItem("s",N.enCode(ke.data))}function xr(e){let t=localStorage.getItem("s");return t===null?{}:(t=N.deCode(t),t?e!==void 0?t[e]:t:V())}function Tt(e){localStorage.setItem("m",N.enCode({data:e}))}function hr(){let e=localStorage.getItem("m");if(e!==""&&e!=="undefined"&&e!==null){let t=localStorage.getItem("m"),r=N.deCode(t);r||V();const i=(o,l)=>{let d=l+"";for(;d.length<o;)d="0"+d;return d};return r.data.split(",").map(o=>"M"+i(2,o))}else return V(),!1}function gr(e){U.sort=e}function It(e){let t=localStorage.getItem("b");t=t===null?{}:N.deCode(t),t[Pe()]=e,localStorage.setItem("b",N.enCode(t))}function Je(){let e=localStorage.getItem("b");return e===null?{}:(e=N.deCode(e),e=e[Pe()],e=e===void 0?{active:1,sort:"<"}:e,e)}function $t(e){localStorage.setItem("c",N.enCode(e))}function mr(e,t){var i;let r=localStorage.getItem("c");if(r!==""&&r!=="undefined"&&r!==null){let a=N.deCode(r);return a||V(),e===void 0?a:t?(i=a[e][t])==null?void 0:i.n:a[e]}else return V(),!1}function Ee(e){re.data=e,localStorage.setItem("q",N.enCode(re.data))}function _r(e,t){re.data={...re.data,[e]:t},localStorage.setItem("q",N.enCode(re.data))}function he(e,t){if(!re.data){let r=localStorage.getItem("q");r&&(re.data=N.deCode(r))}return e===void 0&&t===void 0?re.data:e!==void 0&&t===void 0?re.data[e]:re.data[e][t]}function br(e){Ct.data=e}function vr(e){return Ct.data[e]}function yr(e){j.payment=e}function wr(){return j.payment}function Nt(e){localStorage.setItem("u",N.enCode(e))}function kr(){let e=localStorage.getItem("u");if(e!==""&&e!=="undefined"&&e!==null){let t=N.deCode(e);return t||V(),t}else return V(),!1}function jr(e){const t=r=>{let i=localStorage.getItem(r);if(i!==""&&i!=="undefined"&&i!==null)try{let a=N.deCode(i);if(!a)return;j[r]={is:!0,time:a.time,data:a.data}}catch{j[r]={is:!1,time:0,data:{}}}else j[r]={is:!1,time:0,data:{}}};e.forEach(r=>t(r))}function Cr(e){return j[e]===void 0?(j[e]={data:{},time:0},{data:{},time:0}):j[e]}function Sr(e,t){j[e]={data:t.data,time:t.time},localStorage.setItem(e,N.enCode(j[e]))}function Er(e,t,r){j[e].time=r,j[e].data[t.item][t.name]=t.value,localStorage.setItem(e,N.enCode(j[e]))}const oe={setSSID:Kn,getSSID:Hn,getPORT:Xe,setPORT:Xn,setAUTH:Gn,getAUTH:Vn,Logaut:V,Start:Yn,setMenu:Tt,getMenu:hr,useSort:gr,setSort:It,getSort:Je,setCompany:$t,getCompany:mr,setSelect:Ee,addSelect:_r,getSelect:he,setApi:br,getApi:vr,setPayment:yr,getPayment:wr,setUser:Nt,getUser:kr,getDefaultModules:Zn,getBase:Cr,setBase:Sr,editBase:Er,loadBase:jr},Dt="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO29ubWVzc2FnZT1hc3luYyB0PT57dHJ5e2xldCBhPWF3YWl0IGZldGNoKGAke3QuZGF0YS5ob3N0fSR7dC5kYXRhLmxpbmt9YCx7bWV0aG9kOiJQT1NUIixoZWFkZXJzOntzc2lkOnQuZGF0YS5zc2lkLCJDb250ZW50LXR5cGUiOiJhcHBsaWNhdGlvbi9qc29uO2NoYXJzZXQ9dXRmLTgifSxib2R5OkpTT04uc3RyaW5naWZ5KHQuZGF0YS5kYXRhKX0pO3Bvc3RNZXNzYWdlKGF3YWl0IGEuanNvbigpKX1jYXRjaChhKXtwb3N0TWVzc2FnZSh7c3RhdHVzOiJlcnJvciIsZGF0YToid29ya2VyIixtZXNzYWdlOmF9KX19fSkoKTsK",Br=e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0)),Mt=typeof window<"u"&&window.Blob&&new Blob([Br(Dt)],{type:"text/javascript;charset=utf-8"});function zt(e){let t;try{if(t=Mt&&(window.URL||window.webkitURL).createObjectURL(Mt),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;base64,"+Dt,{name:e==null?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}const ce={};function Tr(e){return e&&(ce.s=e),ce.s}function Ir(e){return e&&(ce.a=e),ce.a}function $r(e){return e&&(ce.c=e),ce.c}function Nr(e){return e&&(ce.h=e),ce.h}const Re={version:{Api:Ir,Server:Tr,Client:$r},Host:Nr};let Dr="api",Mr="elcrm",zr="online";function Fr(){let e=oe.getPORT(),t="",r="";return e.address==="localhost"?(t=`http://localhost:${e.socket}/documents`,r=`http://localhost:${e.socket}/files`):(t="https://"+e.address+"/documents",r="https://"+e.address+"/files"),{documents:t,files:r}}let Ft=`${Dr}.${Mr}.${zr}`;function Pr(e){return"https://"+oe.getPORT().address+"/audio/"+e}function Oe(e,t={},r=oe.getAUTH()){return new Promise(i=>{const a=new zt;a.onmessage=o=>{i(o.data),a.terminate()},a.postMessage({link:e,data:t,ssid:r,host:Re.Host()||`https://${Ft}/`})})}function Rr(e,t={},r=oe.getAUTH()){return new Promise(i=>{const a=new zt;a.onmessage=o=>{i(o.data),a.terminate()},a.postMessage({link:e,data:t,ssid:r,host:Re.Host()+"modules/"||`https://${Ft}/modules`})})}function Or(e,t={},r){const[i,a]=b.useState({status:"load"}),o=async l=>{let d=await Oe(e,l,r);a(d)};return b.useEffect(()=>{o(t)},[]),[i,o]}let Pt={"Content-type":"application/json;charset=utf-8",ssid:oe.getAUTH()||""};async function Lr(e,t,r={}){try{return await(await Oe("https://"+e+"/"+t,{method:"POST",headers:Pt,body:JSON.stringify(r)})).json()}catch{return{status:"error"}}}async function Ar(e,t={}){try{return await(await Oe("https://tb.elcrm.online/v1/"+e,{method:"POST",headers:Pt,body:JSON.stringify(t)})).json()}catch{return{status:"error"}}}const qr={audio:Pr,fetch:Oe,modules:Rr,remoute:Lr,url:Fr,telegram:Ar,use:Or};var Qe={exports:{}},Be={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.min.js
5
5
  *
@@ -15,17 +15,17 @@
15
15
  *
16
16
  * This source code is licensed under the MIT license found in the
17
17
  * LICENSE file in the root directory of this source tree.
18
- */var Ot;function Zr(){return Ot||(Ot=1,process.env.NODE_ENV!=="production"&&function(){var e=b,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),d=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),x=Symbol.for("react.offscreen"),g=Symbol.iterator,v="@@iterator";function _(s){if(s===null||typeof s!="object")return null;var h=g&&s[g]||s[v];return typeof h=="function"?h:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function k(s){{for(var h=arguments.length,w=new Array(h>1?h-1:0),E=1;E<h;E++)w[E-1]=arguments[E];T("error",s,w)}}function T(s,h,w){{var E=y.ReactDebugCurrentFrame,z=E.getStackAddendum();z!==""&&(h+="%s",w=w.concat([z]));var P=w.map(function(D){return String(D)});P.unshift("Warning: "+h),Function.prototype.apply.call(console[s],console,P)}}var $=!1,M=!1,q=!1,U=!1,re=!1,L;L=Symbol.for("react.module.reference");function C(s){return!!(typeof s=="string"||typeof s=="function"||s===i||s===o||re||s===a||s===u||s===f||U||s===x||$||M||q||typeof s=="object"&&s!==null&&(s.$$typeof===m||s.$$typeof===p||s.$$typeof===l||s.$$typeof===d||s.$$typeof===c||s.$$typeof===L||s.getModuleId!==void 0))}function R(s,h,w){var E=s.displayName;if(E)return E;var z=h.displayName||h.name||"";return z!==""?w+"("+z+")":w}function Q(s){return s.displayName||"Context"}function F(s){if(s==null)return null;if(typeof s.tag=="number"&&k("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case i:return"Fragment";case r:return"Portal";case o:return"Profiler";case a:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case d:var h=s;return Q(h)+".Consumer";case l:var w=s;return Q(w._context)+".Provider";case c:return R(s,s.render,"ForwardRef");case p:var E=s.displayName||null;return E!==null?E:F(s.type)||"Memo";case m:{var z=s,P=z._payload,D=z._init;try{return F(D(P))}catch{return null}}}return null}var X=Object.assign,Me=0,yn,wn,kn,jn,Cn,Sn,En;function Bn(){}Bn.__reactDisabledLog=!0;function oo(){{if(Me===0){yn=console.log,wn=console.info,kn=console.warn,jn=console.error,Cn=console.group,Sn=console.groupCollapsed,En=console.groupEnd;var s={configurable:!0,enumerable:!0,value:Bn,writable:!0};Object.defineProperties(console,{info:s,log:s,warn:s,error:s,group:s,groupCollapsed:s,groupEnd:s})}Me++}}function so(){{if(Me--,Me===0){var s={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:X({},s,{value:yn}),info:X({},s,{value:wn}),warn:X({},s,{value:kn}),error:X({},s,{value:jn}),group:X({},s,{value:Cn}),groupCollapsed:X({},s,{value:Sn}),groupEnd:X({},s,{value:En})})}Me<0&&k("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ht=y.ReactCurrentDispatcher,gt;function Ue(s,h,w){{if(gt===void 0)try{throw Error()}catch(z){var E=z.stack.trim().match(/\n( *(at )?)/);gt=E&&E[1]||""}return`
18
+ */var Ot;function Zr(){return Ot||(Ot=1,process.env.NODE_ENV!=="production"&&function(){var e=b,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),d=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),x=Symbol.for("react.offscreen"),g=Symbol.iterator,v="@@iterator";function _(s){if(s===null||typeof s!="object")return null;var h=g&&s[g]||s[v];return typeof h=="function"?h:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function k(s){{for(var h=arguments.length,w=new Array(h>1?h-1:0),E=1;E<h;E++)w[E-1]=arguments[E];T("error",s,w)}}function T(s,h,w){{var E=y.ReactDebugCurrentFrame,z=E.getStackAddendum();z!==""&&(h+="%s",w=w.concat([z]));var P=w.map(function(D){return String(D)});P.unshift("Warning: "+h),Function.prototype.apply.call(console[s],console,P)}}var $=!1,M=!1,W=!1,L=!1,ae=!1,A;A=Symbol.for("react.module.reference");function C(s){return!!(typeof s=="string"||typeof s=="function"||s===i||s===o||ae||s===a||s===u||s===f||L||s===x||$||M||W||typeof s=="object"&&s!==null&&(s.$$typeof===m||s.$$typeof===p||s.$$typeof===l||s.$$typeof===d||s.$$typeof===c||s.$$typeof===A||s.getModuleId!==void 0))}function F(s,h,w){var E=s.displayName;if(E)return E;var z=h.displayName||h.name||"";return z!==""?w+"("+z+")":w}function J(s){return s.displayName||"Context"}function R(s){if(s==null)return null;if(typeof s.tag=="number"&&k("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case i:return"Fragment";case r:return"Portal";case o:return"Profiler";case a:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case d:var h=s;return J(h)+".Consumer";case l:var w=s;return J(w._context)+".Provider";case c:return F(s,s.render,"ForwardRef");case p:var E=s.displayName||null;return E!==null?E:R(s.type)||"Memo";case m:{var z=s,P=z._payload,D=z._init;try{return R(D(P))}catch{return null}}}return null}var ne=Object.assign,Me=0,yn,wn,kn,jn,Cn,Sn,En;function Bn(){}Bn.__reactDisabledLog=!0;function oo(){{if(Me===0){yn=console.log,wn=console.info,kn=console.warn,jn=console.error,Cn=console.group,Sn=console.groupCollapsed,En=console.groupEnd;var s={configurable:!0,enumerable:!0,value:Bn,writable:!0};Object.defineProperties(console,{info:s,log:s,warn:s,error:s,group:s,groupCollapsed:s,groupEnd:s})}Me++}}function so(){{if(Me--,Me===0){var s={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ne({},s,{value:yn}),info:ne({},s,{value:wn}),warn:ne({},s,{value:kn}),error:ne({},s,{value:jn}),group:ne({},s,{value:Cn}),groupCollapsed:ne({},s,{value:Sn}),groupEnd:ne({},s,{value:En})})}Me<0&&k("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ht=y.ReactCurrentDispatcher,gt;function Ue(s,h,w){{if(gt===void 0)try{throw Error()}catch(z){var E=z.stack.trim().match(/\n( *(at )?)/);gt=E&&E[1]||""}return`
19
19
  `+gt+s}}var mt=!1,Ye;{var lo=typeof WeakMap=="function"?WeakMap:Map;Ye=new lo}function Tn(s,h){if(!s||mt)return"";{var w=Ye.get(s);if(w!==void 0)return w}var E;mt=!0;var z=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var P;P=ht.current,ht.current=null,oo();try{if(h){var D=function(){throw Error()};if(Object.defineProperty(D.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(D,[])}catch(G){E=G}Reflect.construct(s,[],D)}else{try{D.call()}catch(G){E=G}s.call(D.prototype)}}else{try{throw Error()}catch(G){E=G}s()}}catch(G){if(G&&E&&typeof G.stack=="string"){for(var I=G.stack.split(`
20
20
  `),K=E.stack.split(`
21
- `),A=I.length-1,W=K.length-1;A>=1&&W>=0&&I[A]!==K[W];)W--;for(;A>=1&&W>=0;A--,W--)if(I[A]!==K[W]){if(A!==1||W!==1)do if(A--,W--,W<0||I[A]!==K[W]){var ee=`
22
- `+I[A].replace(" at new "," at ");return s.displayName&&ee.includes("<anonymous>")&&(ee=ee.replace("<anonymous>",s.displayName)),typeof s=="function"&&Ye.set(s,ee),ee}while(A>=1&&W>=0);break}}}finally{mt=!1,ht.current=P,so(),Error.prepareStackTrace=z}var Se=s?s.displayName||s.name:"",we=Se?Ue(Se):"";return typeof s=="function"&&Ye.set(s,we),we}function co(s,h,w){return Tn(s,!1)}function uo(s){var h=s.prototype;return!!(h&&h.isReactComponent)}function Ke(s,h,w){if(s==null)return"";if(typeof s=="function")return Tn(s,uo(s));if(typeof s=="string")return Ue(s);switch(s){case u:return Ue("Suspense");case f:return Ue("SuspenseList")}if(typeof s=="object")switch(s.$$typeof){case c:return co(s.render);case p:return Ke(s.type,h,w);case m:{var E=s,z=E._payload,P=E._init;try{return Ke(P(z),h,w)}catch{}}}return""}var ze=Object.prototype.hasOwnProperty,In={},$n=y.ReactDebugCurrentFrame;function He(s){if(s){var h=s._owner,w=Ke(s.type,s._source,h?h.type:null);$n.setExtraStackFrame(w)}else $n.setExtraStackFrame(null)}function fo(s,h,w,E,z){{var P=Function.call.bind(ze);for(var D in s)if(P(s,D)){var I=void 0;try{if(typeof s[D]!="function"){var K=Error((E||"React class")+": "+w+" type `"+D+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[D]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw K.name="Invariant Violation",K}I=s[D](h,D,E,w,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(A){I=A}I&&!(I instanceof Error)&&(He(z),k("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",E||"React class",w,D,typeof I),He(null)),I instanceof Error&&!(I.message in In)&&(In[I.message]=!0,He(z),k("Failed %s type: %s",w,I.message),He(null))}}}var po=Array.isArray;function _t(s){return po(s)}function xo(s){{var h=typeof Symbol=="function"&&Symbol.toStringTag,w=h&&s[Symbol.toStringTag]||s.constructor.name||"Object";return w}}function ho(s){try{return Nn(s),!1}catch{return!0}}function Nn(s){return""+s}function Dn(s){if(ho(s))return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",xo(s)),Nn(s)}var Fe=y.ReactCurrentOwner,go={key:!0,ref:!0,__self:!0,__source:!0},Mn,zn,bt;bt={};function mo(s){if(ze.call(s,"ref")){var h=Object.getOwnPropertyDescriptor(s,"ref").get;if(h&&h.isReactWarning)return!1}return s.ref!==void 0}function _o(s){if(ze.call(s,"key")){var h=Object.getOwnPropertyDescriptor(s,"key").get;if(h&&h.isReactWarning)return!1}return s.key!==void 0}function bo(s,h){if(typeof s.ref=="string"&&Fe.current&&h&&Fe.current.stateNode!==h){var w=F(Fe.current.type);bt[w]||(k('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',F(Fe.current.type),s.ref),bt[w]=!0)}}function vo(s,h){{var w=function(){Mn||(Mn=!0,k("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",h))};w.isReactWarning=!0,Object.defineProperty(s,"key",{get:w,configurable:!0})}}function yo(s,h){{var w=function(){zn||(zn=!0,k("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",h))};w.isReactWarning=!0,Object.defineProperty(s,"ref",{get:w,configurable:!0})}}var wo=function(s,h,w,E,z,P,D){var I={$$typeof:t,type:s,key:h,ref:w,props:D,_owner:P};return I._store={},Object.defineProperty(I._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(I,"_self",{configurable:!1,enumerable:!1,writable:!1,value:E}),Object.defineProperty(I,"_source",{configurable:!1,enumerable:!1,writable:!1,value:z}),Object.freeze&&(Object.freeze(I.props),Object.freeze(I)),I};function ko(s,h,w,E,z){{var P,D={},I=null,K=null;w!==void 0&&(Dn(w),I=""+w),_o(h)&&(Dn(h.key),I=""+h.key),mo(h)&&(K=h.ref,bo(h,z));for(P in h)ze.call(h,P)&&!go.hasOwnProperty(P)&&(D[P]=h[P]);if(s&&s.defaultProps){var A=s.defaultProps;for(P in A)D[P]===void 0&&(D[P]=A[P])}if(I||K){var W=typeof s=="function"?s.displayName||s.name||"Unknown":s;I&&vo(D,W),K&&yo(D,W)}return wo(s,I,K,z,E,Fe.current,D)}}var vt=y.ReactCurrentOwner,Fn=y.ReactDebugCurrentFrame;function Ce(s){if(s){var h=s._owner,w=Ke(s.type,s._source,h?h.type:null);Fn.setExtraStackFrame(w)}else Fn.setExtraStackFrame(null)}var yt;yt=!1;function wt(s){return typeof s=="object"&&s!==null&&s.$$typeof===t}function Pn(){{if(vt.current){var s=F(vt.current.type);if(s)return`
21
+ `),q=I.length-1,Z=K.length-1;q>=1&&Z>=0&&I[q]!==K[Z];)Z--;for(;q>=1&&Z>=0;q--,Z--)if(I[q]!==K[Z]){if(q!==1||Z!==1)do if(q--,Z--,Z<0||I[q]!==K[Z]){var Q=`
22
+ `+I[q].replace(" at new "," at ");return s.displayName&&Q.includes("<anonymous>")&&(Q=Q.replace("<anonymous>",s.displayName)),typeof s=="function"&&Ye.set(s,Q),Q}while(q>=1&&Z>=0);break}}}finally{mt=!1,ht.current=P,so(),Error.prepareStackTrace=z}var Se=s?s.displayName||s.name:"",we=Se?Ue(Se):"";return typeof s=="function"&&Ye.set(s,we),we}function co(s,h,w){return Tn(s,!1)}function uo(s){var h=s.prototype;return!!(h&&h.isReactComponent)}function Ke(s,h,w){if(s==null)return"";if(typeof s=="function")return Tn(s,uo(s));if(typeof s=="string")return Ue(s);switch(s){case u:return Ue("Suspense");case f:return Ue("SuspenseList")}if(typeof s=="object")switch(s.$$typeof){case c:return co(s.render);case p:return Ke(s.type,h,w);case m:{var E=s,z=E._payload,P=E._init;try{return Ke(P(z),h,w)}catch{}}}return""}var ze=Object.prototype.hasOwnProperty,In={},$n=y.ReactDebugCurrentFrame;function He(s){if(s){var h=s._owner,w=Ke(s.type,s._source,h?h.type:null);$n.setExtraStackFrame(w)}else $n.setExtraStackFrame(null)}function fo(s,h,w,E,z){{var P=Function.call.bind(ze);for(var D in s)if(P(s,D)){var I=void 0;try{if(typeof s[D]!="function"){var K=Error((E||"React class")+": "+w+" type `"+D+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[D]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw K.name="Invariant Violation",K}I=s[D](h,D,E,w,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(q){I=q}I&&!(I instanceof Error)&&(He(z),k("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",E||"React class",w,D,typeof I),He(null)),I instanceof Error&&!(I.message in In)&&(In[I.message]=!0,He(z),k("Failed %s type: %s",w,I.message),He(null))}}}var po=Array.isArray;function _t(s){return po(s)}function xo(s){{var h=typeof Symbol=="function"&&Symbol.toStringTag,w=h&&s[Symbol.toStringTag]||s.constructor.name||"Object";return w}}function ho(s){try{return Nn(s),!1}catch{return!0}}function Nn(s){return""+s}function Dn(s){if(ho(s))return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",xo(s)),Nn(s)}var Fe=y.ReactCurrentOwner,go={key:!0,ref:!0,__self:!0,__source:!0},Mn,zn,bt;bt={};function mo(s){if(ze.call(s,"ref")){var h=Object.getOwnPropertyDescriptor(s,"ref").get;if(h&&h.isReactWarning)return!1}return s.ref!==void 0}function _o(s){if(ze.call(s,"key")){var h=Object.getOwnPropertyDescriptor(s,"key").get;if(h&&h.isReactWarning)return!1}return s.key!==void 0}function bo(s,h){if(typeof s.ref=="string"&&Fe.current&&h&&Fe.current.stateNode!==h){var w=R(Fe.current.type);bt[w]||(k('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',R(Fe.current.type),s.ref),bt[w]=!0)}}function vo(s,h){{var w=function(){Mn||(Mn=!0,k("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",h))};w.isReactWarning=!0,Object.defineProperty(s,"key",{get:w,configurable:!0})}}function yo(s,h){{var w=function(){zn||(zn=!0,k("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",h))};w.isReactWarning=!0,Object.defineProperty(s,"ref",{get:w,configurable:!0})}}var wo=function(s,h,w,E,z,P,D){var I={$$typeof:t,type:s,key:h,ref:w,props:D,_owner:P};return I._store={},Object.defineProperty(I._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(I,"_self",{configurable:!1,enumerable:!1,writable:!1,value:E}),Object.defineProperty(I,"_source",{configurable:!1,enumerable:!1,writable:!1,value:z}),Object.freeze&&(Object.freeze(I.props),Object.freeze(I)),I};function ko(s,h,w,E,z){{var P,D={},I=null,K=null;w!==void 0&&(Dn(w),I=""+w),_o(h)&&(Dn(h.key),I=""+h.key),mo(h)&&(K=h.ref,bo(h,z));for(P in h)ze.call(h,P)&&!go.hasOwnProperty(P)&&(D[P]=h[P]);if(s&&s.defaultProps){var q=s.defaultProps;for(P in q)D[P]===void 0&&(D[P]=q[P])}if(I||K){var Z=typeof s=="function"?s.displayName||s.name||"Unknown":s;I&&vo(D,Z),K&&yo(D,Z)}return wo(s,I,K,z,E,Fe.current,D)}}var vt=y.ReactCurrentOwner,Fn=y.ReactDebugCurrentFrame;function Ce(s){if(s){var h=s._owner,w=Ke(s.type,s._source,h?h.type:null);Fn.setExtraStackFrame(w)}else Fn.setExtraStackFrame(null)}var yt;yt=!1;function wt(s){return typeof s=="object"&&s!==null&&s.$$typeof===t}function Pn(){{if(vt.current){var s=R(vt.current.type);if(s)return`
23
23
 
24
24
  Check the render method of \``+s+"`."}return""}}function jo(s){return""}var Rn={};function Co(s){{var h=Pn();if(!h){var w=typeof s=="string"?s:s.displayName||s.name;w&&(h=`
25
25
 
26
- Check the top-level render call using <`+w+">.")}return h}}function On(s,h){{if(!s._store||s._store.validated||s.key!=null)return;s._store.validated=!0;var w=Co(h);if(Rn[w])return;Rn[w]=!0;var E="";s&&s._owner&&s._owner!==vt.current&&(E=" It was passed a child from "+F(s._owner.type)+"."),Ce(s),k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',w,E),Ce(null)}}function Ln(s,h){{if(typeof s!="object")return;if(_t(s))for(var w=0;w<s.length;w++){var E=s[w];wt(E)&&On(E,h)}else if(wt(s))s._store&&(s._store.validated=!0);else if(s){var z=_(s);if(typeof z=="function"&&z!==s.entries)for(var P=z.call(s),D;!(D=P.next()).done;)wt(D.value)&&On(D.value,h)}}}function So(s){{var h=s.type;if(h==null||typeof h=="string")return;var w;if(typeof h=="function")w=h.propTypes;else if(typeof h=="object"&&(h.$$typeof===c||h.$$typeof===p))w=h.propTypes;else return;if(w){var E=F(h);fo(w,s.props,"prop",E,s)}else if(h.PropTypes!==void 0&&!yt){yt=!0;var z=F(h);k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",z||"Unknown")}typeof h.getDefaultProps=="function"&&!h.getDefaultProps.isReactClassApproved&&k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Eo(s){{for(var h=Object.keys(s.props),w=0;w<h.length;w++){var E=h[w];if(E!=="children"&&E!=="key"){Ce(s),k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",E),Ce(null);break}}s.ref!==null&&(Ce(s),k("Invalid attribute `ref` supplied to `React.Fragment`."),Ce(null))}}var An={};function qn(s,h,w,E,z,P){{var D=C(s);if(!D){var I="";(s===void 0||typeof s=="object"&&s!==null&&Object.keys(s).length===0)&&(I+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var K=jo();K?I+=K:I+=Pn();var A;s===null?A="null":_t(s)?A="array":s!==void 0&&s.$$typeof===t?(A="<"+(F(s.type)||"Unknown")+" />",I=" Did you accidentally export a JSX literal instead of a component?"):A=typeof s,k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",A,I)}var W=ko(s,h,w,z,P);if(W==null)return W;if(D){var ee=h.children;if(ee!==void 0)if(E)if(_t(ee)){for(var Se=0;Se<ee.length;Se++)Ln(ee[Se],s);Object.freeze&&Object.freeze(ee)}else k("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ln(ee,s)}if(ze.call(h,"key")){var we=F(s),G=Object.keys(h).filter(function(Do){return Do!=="key"}),kt=G.length>0?"{key: someKey, "+G.join(": ..., ")+": ...}":"{key: someKey}";if(!An[we+kt]){var No=G.length>0?"{"+G.join(": ..., ")+": ...}":"{}";k(`A props object containing a "key" prop is being spread into JSX:
26
+ Check the top-level render call using <`+w+">.")}return h}}function On(s,h){{if(!s._store||s._store.validated||s.key!=null)return;s._store.validated=!0;var w=Co(h);if(Rn[w])return;Rn[w]=!0;var E="";s&&s._owner&&s._owner!==vt.current&&(E=" It was passed a child from "+R(s._owner.type)+"."),Ce(s),k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',w,E),Ce(null)}}function Ln(s,h){{if(typeof s!="object")return;if(_t(s))for(var w=0;w<s.length;w++){var E=s[w];wt(E)&&On(E,h)}else if(wt(s))s._store&&(s._store.validated=!0);else if(s){var z=_(s);if(typeof z=="function"&&z!==s.entries)for(var P=z.call(s),D;!(D=P.next()).done;)wt(D.value)&&On(D.value,h)}}}function So(s){{var h=s.type;if(h==null||typeof h=="string")return;var w;if(typeof h=="function")w=h.propTypes;else if(typeof h=="object"&&(h.$$typeof===c||h.$$typeof===p))w=h.propTypes;else return;if(w){var E=R(h);fo(w,s.props,"prop",E,s)}else if(h.PropTypes!==void 0&&!yt){yt=!0;var z=R(h);k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",z||"Unknown")}typeof h.getDefaultProps=="function"&&!h.getDefaultProps.isReactClassApproved&&k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Eo(s){{for(var h=Object.keys(s.props),w=0;w<h.length;w++){var E=h[w];if(E!=="children"&&E!=="key"){Ce(s),k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",E),Ce(null);break}}s.ref!==null&&(Ce(s),k("Invalid attribute `ref` supplied to `React.Fragment`."),Ce(null))}}var An={};function qn(s,h,w,E,z,P){{var D=C(s);if(!D){var I="";(s===void 0||typeof s=="object"&&s!==null&&Object.keys(s).length===0)&&(I+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var K=jo();K?I+=K:I+=Pn();var q;s===null?q="null":_t(s)?q="array":s!==void 0&&s.$$typeof===t?(q="<"+(R(s.type)||"Unknown")+" />",I=" Did you accidentally export a JSX literal instead of a component?"):q=typeof s,k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",q,I)}var Z=ko(s,h,w,z,P);if(Z==null)return Z;if(D){var Q=h.children;if(Q!==void 0)if(E)if(_t(Q)){for(var Se=0;Se<Q.length;Se++)Ln(Q[Se],s);Object.freeze&&Object.freeze(Q)}else k("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ln(Q,s)}if(ze.call(h,"key")){var we=R(s),G=Object.keys(h).filter(function(Do){return Do!=="key"}),kt=G.length>0?"{key: someKey, "+G.join(": ..., ")+": ...}":"{key: someKey}";if(!An[we+kt]){var No=G.length>0?"{"+G.join(": ..., ")+": ...}":"{}";k(`A props object containing a "key" prop is being spread into JSX:
27
27
  let props = %s;
28
28
  <%s {...props} />
29
29
  React keys must be passed directly to JSX without using spread:
30
30
  let props = %s;
31
- <%s key={someKey} {...props} />`,kt,we,No,we),An[we+kt]=!0}}return s===i?Eo(W):So(W),W}}function Bo(s,h,w){return qn(s,h,w,!0)}function To(s,h,w){return qn(s,h,w,!1)}var Io=To,$o=Bo;Te.Fragment=i,Te.jsx=Io,Te.jsxs=$o}()),Te}process.env.NODE_ENV==="production"?Qe.exports=Wr():Qe.exports=Zr();var n=Qe.exports;const Lt={notice:"_notice_q5jau_1",error:"_error_q5jau_10",success:"_success_q5jau_13",warning:"_warning_q5jau_16",copy:"_copy_q5jau_19","show-notice":"_show-notice_q5jau_1","hide-notice":"_hide-notice_q5jau_1"};let ue={};function Ur(){let[e,t]=b.useState([]);return ue.set=r=>{t([...e,r])},ue.del=r=>{t(e.filter(i=>i.key!==r))},e.length===0?"":n.jsx("ul",{className:Lt.notice,children:e.map(r=>r.item)})}function Ie({data:e}){let[t,r]=b.useState("show");b.useEffect(()=>{setTimeout(function(){r("hide")},1800),setTimeout(function(){ue.del(e.key)},2500)},[e.key]);let i;switch(e.type){case"error":i=n.jsx(ge.error,{});break;case"success":i=n.jsx(ge.success,{});break;case"copy":i=n.jsx(ge.success,{});break;case"remark":i=n.jsx(ge.success,{});break;default:i=n.jsx(ge.success,{});break}return n.jsxs("li",{className:"item "+Lt[e.type],"data-status":t,children:[i,n.jsx("p",{children:e.text})]})}function Yr(e){let t=Date.now(),r={key:t,...e};ue.set({item:n.jsx(Ie,{data:r},t),key:t})}function Kr(e){let t=Date.now(),r={key:t,text:e,type:"error"};ue.set({item:n.jsx(Ie,{data:r},t),key:t})}function Hr(e){let t=Date.now(),r={key:t,text:e,type:"success"};ue.set({item:n.jsx(Ie,{data:r},t),key:t})}function Gr(e){let t=Date.now(),r={key:t,text:e,type:"remark"};ue.set({item:n.jsx(Ie,{data:r},t),key:t})}function Vr(e){let t=Date.now(),r={key:t,text:e,type:"copy"};ue.set({item:n.jsx(Ie,{data:r},t),key:t})}const ge={};ge.error=()=>n.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[n.jsx("path",{d:"M12 22C7.28595 22 4.92893 22 3.46447 20.5355C2 19.0711 2 16.714 2 12C2 7.28595 2 4.92893 3.46447 3.46447C4.92893 2 7.28595 2 12 2C16.714 2 19.0711 2 20.5355 3.46447C22 4.92893 22 7.28595 22 12C22 16.714 22 19.0711 20.5355 20.5355C19.0711 22 16.714 22 12 22Z",fill:"#fff"}),n.jsx("path",{d:"M8.96967 8.96967C9.26256 8.67678 9.73744 8.67678 10.0303 8.96967L12 10.9394L13.9697 8.96969C14.2626 8.6768 14.7374 8.6768 15.0303 8.96969C15.3232 9.26258 15.3232 9.73746 15.0303 10.0303L13.0607 12L15.0303 13.9697C15.3232 14.2625 15.3232 14.7374 15.0303 15.0303C14.7374 15.3232 14.2625 15.3232 13.9696 15.0303L12 13.0607L10.0304 15.0303C9.73746 15.3232 9.26258 15.3232 8.96969 15.0303C8.6768 14.7374 8.6768 14.2626 8.96969 13.9697L10.9394 12L8.96967 10.0303C8.67678 9.73744 8.67678 9.26256 8.96967 8.96967Z",fill:"#bb2014"})]}),ge.success=()=>n.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[n.jsx("path",{d:"M12 22C7.28595 22 4.92893 22 3.46447 20.5355C2 19.0711 2 16.714 2 12C2 7.28595 2 4.92893 3.46447 3.46447C4.92893 2 7.28595 2 12 2C16.714 2 19.0711 2 20.5355 3.46447C22 4.92893 22 7.28595 22 12C22 16.714 22 19.0711 20.5355 20.5355C19.0711 22 16.714 22 12 22Z",fill:"#fff"}),n.jsx("path",{d:"M16.0303 8.96967C16.3232 9.26256 16.3232 9.73744 16.0303 10.0303L11.0303 15.0303C10.7374 15.3232 10.2626 15.3232 9.96967 15.0303L7.96967 13.0303C7.67678 12.7374 7.67678 12.2626 7.96967 11.9697C8.26256 11.6768 8.73744 11.6768 9.03033 11.9697L10.5 13.4393L14.9697 8.96967C15.2626 8.67678 15.7374 8.67678 16.0303 8.96967Z",fill:"#367738"})]});const et={alerts:"_alerts_1pds5_1",menuAnimation:"_menuAnimation_1pds5_1",menuItemAnimation:"_menuItemAnimation_1pds5_1","--body":"_--body_1pds5_103",allert:"_allert_1pds5_111","--form":"_--form_1pds5_111",al:"_al_1pds5_1"};let $e={};function Xr(){let[e,t]=b.useState("");return $e.set=r=>t(r),$e.del=()=>t(""),n.jsx(n.Fragment,{children:e})}const Jr=({data:e,callback:t})=>(e.button=e.button===void 0?"Подтвердить":e.button,n.jsxs("div",{className:et.alerts,children:[n.jsxs("dl",{children:[n.jsx("dt",{children:e.title}),n.jsx("dd",{children:e.text}),n.jsx("ul",{children:n.jsx("button",{"data-color":e.color||"blue",onClick:()=>{t(),$e.del()},children:e.button})})]}),n.jsx("div",{className:et["--body"],onClick:$e.del})]}));function Qr(e,t){$e.set(n.jsx(Jr,{data:e,callback:t}))}const At={btn:"_btn_1hz2s_6",confirm:"_confirm_1hz2s_19"};function qt({onClick:e,onSend:t,label:r,onRef:i}){let[a,o]=b.useState(!1);const l=()=>{if(e)return e();a||(o(!0),t&&t(o))};return n.jsx("button",{ref:i,className:[At.btn,At.confirm].join(" "),onClick:l,children:a?"Ожидайте":r})}const te={white:"_white_11p39_14",black:"_black_11p39_26",shake:"_shake_11p39_1",modal:"_modal_11p39_73",o:"_o_11p39_83",w:"_w_11p39_14",h:"_h_11p39_107",l:"_l_11p39_121",t:"_t_11p39_159",m:"_m_11p39_73",x:"_x_11p39_167",s:"_s_11p39_177",c:"_c_11p39_182",f:"_f_11p39_187",btn:"_btn_11p39_230",g:"_g_11p39_243","size-a":"_size-a_11p39_296","size-s":"_size-s_11p39_300","size-m":"_size-m_11p39_304","size-l":"_size-l_11p39_308","size-x":"_size-x_11p39_312","size-f":"_size-f_11p39_316",confirm:"_confirm_11p39_322",cancel:"_cancel_11p39_327",disabled:"_disabled_11p39_332",await:"_await_11p39_339",active:"_active_11p39_389",coincidence:"_coincidence_11p39_395",sa:"_sa_11p39_431",ss:"_ss_11p39_435",sm:"_sm_11p39_439",sl:"_sl_11p39_443",sx:"_sx_11p39_447",sf:"_sf_11p39_451"};let me={};function ei({config:e}){let[t,r]=b.useState([]);return me.x=i=>{i||r([])},me.config=e,me.add=i=>{r([...t,i])},n.jsx(n.Fragment,{children:t.map(i=>i)})}function ti({title:e,children:t,button:r,tabs:i,size:a="m",menu:o}){const[l,d]=b.useState(!0),c=b.useRef(),u=p=>{if(r){if(r.onClick)return p(!1),r.onClick({setOpen:d});if(r.onSend)return r.onSend({setOpen:d,disabled:p})}},f=()=>{c.current.setAttribute("shake",!0),setTimeout(()=>{c.current.setAttribute("shake",!1)},1e3)};return n.jsx(n.Fragment,{children:l?n.jsxs("div",{className:`${te.modal} ${te.white}`,children:[n.jsx("div",{className:te.o,onClick:f}),n.jsxs("div",{className:[te.w,te[`s${a}`]].join(" "),ref:c,children:[n.jsxs("div",{className:te.h,children:[n.jsx("div",{className:te.t,children:e}),n.jsxs("div",{className:te.m,children:[i&&n.jsx("nav",{children:i.map((p,m)=>n.jsx("span",{onClick:p.onClick,className:p.active?"active":"",children:p.name},m))}),o]}),n.jsx("div",{className:te.x,onClick:()=>{d(!1)},children:n.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:n.jsx("path",{d:"M19.0005 4.99988L5.00045 18.9999M5.00045 4.99988L19.0005 18.9999",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),t,r!==void 0?n.jsx(qt,{label:r.label,onSend:u}):""]})]}):""})}function ni(e){me.add(n.jsx(ri,{children:e},String(Date.now())))}function ri({children:e}){return n.jsx(n.Fragment,{children:e})}function ii(e){if(e.target.classList[0]!=="modal")return;let t=e.target.children[0];t.setAttribute("shake",!0),setTimeout(()=>{t.setAttribute("shake",!1)},1e3)}function ai({type:e,name:t,params:r}){let[i,a]=b.useState(null);return b.useEffect(()=>{me.config(e,t,r,a)},[r.id]),n.jsx(n.Fragment,{children:i})}function oi(e,t){me.config(e,t)}function si(e){me.x(e)}const tt={};function li(e,t){tt[e]=t}function di(e,t){tt[e]!==void 0&&tt[e](t)}const fe={};function ci(e,t){const[r,i]=b.useState(t);return b.useEffect(()=>{if(fe[e])return fe[e].push(i);fe[e]=[i]},[]),[r]}function ui(e,t){if(fe[e])return fe[e].push(t);fe[e]=[t]}function fi(e,t){fe[e]&&fe[e].forEach(r=>r(t))}const Le={setListener:di,useListener:li,setEmitter:fi,useEmitter:ci,subEmitter:ui};function pi(){let[e,t]=b.useState([]);return Le.useListener("form",r=>{t([r])}),n.jsx(n.Fragment,{children:e.map(r=>r)})}const se={Path:ur,setPage:Qn,getPage:St,usePage:Jn,isPage:er,setModule:nr,getModule:Et,useModule:tr,isModule:rr,setTabs:ar,getTabs:Pe,useTabs:ir,isTabs:or,useId:sr,setId:dr,subId:lr,getId:Bt,isId:cr},Ae={Send:Yr,Error:Kr,Remark:Gr,Success:Hr,Copy:Vr},Wt=({onClick:e,active:t})=>(t=!!t,n.jsx("div",{role:"switch",onClick:()=>e,"aria-checked":`${t?"true":"false"}`}));function Zt({onClick:e,onSend:t,name:r,onRef:i}){let[a,o]=b.useState(!1);const l=()=>{if(e)return e();a||(o(!0),t&&t(o))};return n.jsx("button",{ref:i,"data-form":"button",className:a?"btn await":"btn confirm pointer",onClick:l,children:a?"Ожидайте":r})}function Ut({value:e,onValue:t,onActive:r,data:i,name:a,view:o,edit:l=!0,active:d=!0,placeholder:c="Введите сообщение"}){const u=b.useRef({value:e,timerId:null,shift:!1,send:!0}),f=()=>{u.current.value.length>0?u.current.send&&(r(!0),u.current.send=!1,u.current.timerId=setTimeout(()=>{u.current.send=!0},3e3)):r(!1)},p=y=>{u.current.value=y.target.textContent,f()},m=y=>{y.keyCode===16&&(u.current.shift=!0),y.keyCode===13&&!u.current.shift&&(y.preventDefault(),u.current.value.length!==0&&(y.target.textContent="",i&&i(u.current.value),t&&t(u.current.value),u.current.value="",r(!1)))},x=y=>{y.keyCode===16&&(u.current.shift=!1)},g=y=>{y.preventDefault(),navigator.clipboard.readText().then(k=>{window.document.execCommand("insertText",!1,k)}).catch(k=>{})},v=()=>{r(!1)},_={spellCheck:"true"};return c&&(_.placeholder=c),l&&d&&(_.contentEditable="plaintext-only"),n.jsx("dl",{"data-form":"message",children:n.jsx("dd",{onPaste:g,onInput:p,onKeyUp:x,onKeyDown:m,onBlur:v,..._,suppressContentEditableWarning:!0,children:e})})}function Yt(e){let t=()=>e.title?n.jsx("dt",{children:e.title}):"",r=e.edit!==void 0?e.edit:!0,i=e.active!==void 0?e.active:!0,a=e.placeholder!==void 0?e.placeholder:"",o=c=>{e.onValue({value:c.target.textContent,name:e.name})},l=c=>{c.key==="Enter"&&c.preventDefault()},d=c=>{c.preventDefault(),navigator.clipboard.readText().then(u=>{window.document.execCommand("insertText",!1,u)}).catch(u=>{})};return n.jsxs("dl",{"data-form":"input","type-data":"generator",children:[t(),n.jsx("dd",{onPaste:d,onInput:o,onKeyDown:l,contentEditable:r&&i?"plaintext-only":"false","data-placeholder":a,suppressContentEditableWarning:!0,children:e.value})]})}let _e={};_e.KeyDown=e=>{e.key==="Enter"&&e.preventDefault()},_e.PasteOne=e=>{e.preventDefault(),navigator.clipboard.readText().then(t=>{t=t.replace(/^\s*/,"").replace(/\s*$/,""),window.document.execCommand("insertText",!1,t)}).catch(t=>{})},_e.Focus=e=>{e.target.textContent.length===0&&(e.target.innerHTML="<br>")},_e.Blur=e=>{e.target.scrollLeft=0,e.target.querySelector("br")!==null&&e.target.querySelector("br").remove()};function Kt({value:e,onValue:t,placeholder:r="",name:i}){let a=(x,g)=>Number(Math.round(x+Math.random()*(g-x))),o=b.useRef(null),l=b.useRef(null),d=a(1e4,99999),c=x=>{x.key!=="Backspace"&&(x.key==="Enter"&&x.preventDefault(),x.target.textContent.length===5&&x.preventDefault(),/\d/.test(x.key)||x.preventDefault())},u=x=>{t({value:Number(x.target.textContent)===d,name:i})},f=x=>{x.preventDefault(),navigator.clipboard.readText().then(g=>{window.document.execCommand("insertText",!1,g.replace(/(\r\n|\n|\r)/gm," ").replace(/[^0-9]/g,"").substring(0,5))}).catch(g=>{})};b.useEffect(()=>{const x=o.current,g=x.getContext("2d");g.clearRect(0,0,x.width,x.height),g.font="30px brush script mt",g.fillStyle="#eee",g.textAlign="center",g.fillText(d,50,27),l.current.textContent=""},[d]);const p={};p.field="captcha";const m={};return r&&(m.placeholder=r),n.jsxs("dl",{...p,children:[n.jsx("dd",{ref:l,onPaste:f,onInput:u,onBlur:_e.Blur,onKeyDown:c,contentEditable:"plaintext-only",suppressContentEditableWarning:!0,...m}),n.jsx("canvas",{ref:o,width:"100",height:"35"})]})}function Ht(e){let t=()=>e.title?n.jsx("dt",{children:e.title}):"",r=()=>e.error?n.jsx("em",{children:e.error}):"",i={n1:"",n2:"",n3:"",n4:"",n5:"",n6:"",code:""},a=u=>{u.preventDefault(),u.target.textContent=u.target.textContent.slice(-1).replace(/[^+\d]/g,"");let f=window.getSelection(),p=u.target.textContent.length;if(i[u.target.id]=u.target.textContent,i.code=i.n1+""+i.n2+i.n3+i.n4+i.n5+i.n6,f.collapse(u.target.firstChild,1),p===0){u.target.blur(),u.target.focus();return}u.target.nextSibling!=null&&u.target.nextSibling.focus()},o=u=>{if(u.key==="Enter"&&u.preventDefault(),u.key==="Backspace"){if(u.preventDefault(),u.target.textContent="",i[u.target.id]="",u.target.previousSibling!=null){let f=u.target.previousSibling.id.slice(1);u.target.previousSibling.textContent="",i["n"+f]="",u.target.previousSibling.focus()}i.code=i.n1+""+i.n2+i.n3+i.n4+i.n5+i.n6}},l=u=>{if(e.real)e.onValue({value:i.code,name:e.name});else if(i.code.length===6&&(e.onValue({value:i.code,name:e.name}),e.empty)){i={n1:"",n2:"",n3:"",n4:"",n5:"",n6:"",code:""};for(let f=1;f<=6;f++){let p=document.getElementById("n"+f);p&&(p.textContent="")}}},d=u=>{u.target.textContent=""},c=u=>{u.preventDefault()};return n.jsxs("dl",{"data-form":"code",children:[t(),n.jsxs("div",{children:[n.jsx("dd",{id:"n1",onKeyDown:o,onKeyUp:l,onFocus:d,onPaste:c,onInput:a,contentEditable:!0}),n.jsx("dd",{id:"n2",onKeyDown:o,onKeyUp:l,onFocus:d,onPaste:c,onInput:a,contentEditable:!0}),n.jsx("dd",{id:"n3",onKeyDown:o,onKeyUp:l,onFocus:d,onPaste:c,onInput:a,contentEditable:!0}),n.jsx("dd",{id:"n4",onKeyDown:o,onKeyUp:l,onFocus:d,onPaste:c,onInput:a,contentEditable:!0}),n.jsx("dd",{id:"n5",onKeyDown:o,onKeyUp:l,onFocus:d,onPaste:c,onInput:a,contentEditable:!0}),n.jsx("dd",{id:"n6",onKeyDown:o,onKeyUp:l,onFocus:d,onPaste:c,onInput:a,contentEditable:!0})]}),r()]})}function Gt(e){let t=()=>e.title?n.jsx("dt",{children:e.title}):"",r=()=>e.error?n.jsx("em",{children:e.error}):"";e.edit!==void 0&&e.edit,e.active!==void 0&&e.active;let[i,a]=b.useState(e.value),o=l=>{let d=l.target.getAttribute("set-color");a(d),e.onValue({value:d,name:e.name})};return n.jsx(n.Fragment,{children:e.view==="icon"?n.jsx("i",{"data-icon":"F043"}):n.jsxs("dl",{children:[t(),n.jsxs("dd",{"el-val":i,children:[n.jsx("em",{onClick:o,"set-color":"0"}),n.jsx("em",{onClick:o,"set-color":"1"}),n.jsx("em",{onClick:o,"set-color":"2"}),n.jsx("em",{onClick:o,"set-color":"3"}),n.jsx("em",{onClick:o,"set-color":"4"}),n.jsx("em",{onClick:o,"set-color":"5"})]}),r()]})})}function xi(e,t){t===void 0?(t=e,e=new Date):e=new Date(e);let r={yyyy:e.getFullYear(),yy:(""+e.getFullYear()).slice(-2),mm:("0"+(e.getMonth()+1)).slice(-2),dd:("0"+e.getDate()).slice(-2),HH:("0"+e.getHours()).slice(-2),MM:("0"+e.getMinutes()).slice(-2),SS:("0"+e.getSeconds()).slice(-2),__:"      ",_:"    "};for(const i in r)t=t.replace(i,r[i]);return t}function hi(e){let t=["Января","Февраля","Марта","Апреля","Мая","Июня","Июля","Августа","Сентября","Октября","Ноября","Декабря"],r=new Date(e);return{day:(""+r.getFullYear()).slice(-2)+""+("0"+(r.getMonth()+1)).slice(-2)+("0"+r.getDate()).slice(-2),name:r.getDate()+" "+t[r.getMonth()]}}const gi=e=>{function t(T,$){var M,U,q;T=T??"",$=$??1;for(var M=[],q=0,U=T.length;q<U;)M.push(T.slice(q,q+=$));return M}function r(T,$){var M=[2,0,1,1,1,2];return $[T>4&&T<20?2:M[Math.min(T,5)]]}var i={null:"ноль",a1:["один","два","три","четыре","пять","шесть","семь","восемь","девять"],a2:["одна","две","три","четыре","пять","шесть","семь","восемь","девять"],a10:["десять","одиннадцать","двенадцать","тринадцать","четырнадцать","пятнадцать","шестнадцать","семнадцать","восемнадцать","девятнадцать"],a20:["двадцать","тридцать","сорок","пятьдесят","шестьдесят","семьдесят","восемьдесят","девяносто"],a100:["сто","двести","триста","четыреста","пятьсот","шестьсот","семьсот","восемьсот","девятьсот"],uc:["копейка","копейки","копеек"],ur:["рубль","рубля","рублей"],u3:["тысяча","тысячи","тысяч"],u2:["миллион","миллиона","миллионов"],u1:["миллиард","миллиарда","миллиардов"]},a,o,l,d,_,c,u,v,f,p,m,x;f=parseFloat(e).toFixed(2).split("."),c=f[0],d=f[1];var g=12-c.length;if(g<0)return!1;for(var v=[];g--;)v.push("0");c=v.join("")+c;var _=[];if(c>0){p=t(c,3);for(var y=-1;y<p.length;y++)if(u=p[y],u>0&&(m=t(u,1),a=parseInt(m[0]),o=parseInt(m[1]),l=parseInt(m[2]),_.push(i.a100[a-1]),x=y+1==3?"a2":"a1",o>1?_.push(i.a20[o-2]+(l>0?" "+i[x][l-1]:"")):_.push(o>0?i.a10[l]:i[x][l-1]),p.length>y+1)){var k=i["u"+(y+1)];_.push(r(u,k))}}else _.push(i.null);return _.push(r(c,i.ur)),_.push(d+" "+r(d,i.uc)),_.join(" ").replace(RegExp(" {2,}","g")," ").trimLeft()};function mi(e){let t=-1,r=[" kB"," MB"," GB"," TB","PB","EB","ZB","YB"];do e=e/1024,t++;while(e>1024);return Math.max(e,.1).toFixed(1)+r[t]}function _i(e){let t={};return t["application/atom+xml"]="atom",t["application/json"]="json",t["application/javascript"]="js",t["application/ogg"]="ogg",t["application/pdf"]="pdf",t["application/soap+xml"]="soap",t["application/font-woff"]="woff",t["application/xhtml+xml"]="xml",t["application/xml-dtd"]="dtd",t["application/xop+xml"]="xop",t["application/zip"]="zip",t["application/gzip"]="gzip",t["application/x-bittorrent"]="bittorrent",t["application/x-tex"]="tex",t["application/xml"]="xml",t["application/msword"]="doc",t["image/svg+xml"]="svg",t[e]}function bi(e,t,r,i){let a={sexM:"m",sexF:"f",gcaseIm:"nominative",gcaseNom:"nominative",gcaseRod:"genitive",gcaseGen:"genitive",gcaseDat:"dative",gcaseVin:"accusative",gcaseAcc:"accusative",gcaseTvor:"instrumentative",gcaseIns:"instrumentative",gcasePred:"prepositional",gcasePos:"prepositional",rules:{lastName:{exceptions:[" дюма,тома,дега,люка,ферма,гамарра,петипа,шандра . . . . ."," гусь,ремень,камень,онук,богода,нечипас,долгопалец,маненок,рева,кива . . . . ."," вий,сой,цой,хой -я -ю -я -ем -е"],suffixes:["f б,в,г,д,ж,з,й,к,л,м,н,п,р,с,т,ф,х,ц,ч,ш,щ,ъ,ь . . . . .","f ска,цка -ой -ой -ую -ой -ой","f ая --ой --ой --ую --ой --ой"," ская --ой --ой --ую --ой --ой","f на -ой -ой -у -ой -ой"," иной -я -ю -я -ем -е"," уй -я -ю -я -ем -е"," ца -a -е -у -ей -е"," рих а у а ом е"," ия . . . . ."," иа,аа,оа,уа,ыа,еа,юа,эа . . . . ."," их,ых . . . . ."," о,е,э,и,ы,у,ю . . . . ."," ова,ева -ой -ой -у -ой -ой"," га,ка,ха,ча,ща,жа -и -е -у -ой -е"," ца -и -е -у -ей -е"," а -ы -е -у -ой -е"," ь -я -ю -я -ем -е"," ия -и -и -ю -ей -и"," я -и -е -ю -ей -е"," ей -я -ю -я -ем -е"," ян,ан,йн а у а ом е"," ынец,обец --ца --цу --ца --цем --це"," онец,овец --ца --цу --ца --цом --це"," ц,ч,ш,щ а у а ем е"," ай -я -ю -я -ем -е"," гой,кой -го -му -го --им -м"," ой -го -му -го --ым -м"," ах,ив а у а ом е"," ший,щий,жий,ний --его --ему --его -м --ем"," кий,ый --ого --ому --ого -м --ом"," ий -я -ю -я -ем -и"," ок --ка --ку --ка --ком --ке"," ец --ца --цу --ца --цом --це"," в,н а у а ым е"," б,г,д,ж,з,к,л,м,п,р,с,т,ф,х а у а ом е"]},firstName:{exceptions:[" лев --ьва --ьву --ьва --ьвом --ьве"," павел --ла --лу --ла --лом --ле","m шота . . . . .","m пётр ---етра ---етру ---етра ---етром ---етре","f рашель,нинель,николь,габриэль,даниэль . . . . ."],suffixes:[" е,ё,и,о,у,ы,э,ю . . . . .","f б,в,г,д,ж,з,й,к,л,м,н,п,р,с,т,ф,х,ц,ч,ш,щ,ъ . . . . .","f ь -и -и . ю -и","m ь -я -ю -я -ем -е"," га,ка,ха,ча,ща,жа -и -е -у -ой -е"," ша -и -е -у -ей -е"," а -ы -е -у -ой -е"," ия -и -и -ю -ей -и"," я -и -е -ю -ей -е"," ей -я -ю -я -ем -е"," ий -я -ю -я -ем -и"," й -я -ю -я -ем -е"," б,в,г,д,ж,з,к,л,м,н,п,р,с,т,ф,х,ц,ч а у а ом е"]},middleName:{suffixes:[" ич а у а ем е"," на -ы -е -у -ой -е"]}},initialized:!1,init:function(){this.initialized||(this.prepareRules(),this.initialized=!0)},prepareRules:function(){for(var l in this.rules)for(var d in this.rules[l])for(var c=0,u=this.rules[l][d].length;c<u;c++)this.rules[l][d][c]=this.rule(this.rules[l][d][c])},rule:function(l){var d=l.match(/^\s*([fm]?)\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s*$/);return d?{sex:d[1],test:d[2].split(","),mods:[d[3],d[4],d[5],d[6],d[7]]}:!1},word:function(l,d,c,u){if(u===this.gcaseNom)return l;if(l.match(/[-]/)){for(var f=l.split("-"),p=0,m=f.length;p<m;p++)f[p]=this.word(f[p],d,c,u);return f.join("-")}if(l.match(/^[А-ЯЁ]\.?$/i))return l;this.init();var x=this.rules[c];let g;return x.exceptions&&(g=this.pick(l,d,u,x.exceptions,!0),g)?g:(g=this.pick(l,d,u,x.suffixes,!1),g||l)},pick:function(l,d,c,u,f){let p=l.toLowerCase();for(var m=0,x=u.length;m<x;m++)if(this.ruleMatch(p,d,u[m],f))return this.applyMod(l,c,u[m]);return!1},ruleMatch:function(l,d,c,u){if(c.sex===this.sexM&&d===this.sexF||c.sex===this.sexF&&d!==this.sexF)return!1;for(var f=0,p=c.test.length;f<p;f++){var m=u?l:l.substr(Math.max(l.length-c.test[f].length,0));if(m===c.test[f])return!0}return!1},applyMod:function(l,d,c){let u;switch(d){case this.gcaseNom:u=".";break;case this.gcaseGen:u=c.mods[0];break;case this.gcaseDat:u=c.mods[1];break;case this.gcaseAcc:u=c.mods[2];break;case this.gcaseIns:u=c.mods[3];break;case this.gcasePos:u=c.mods[4];break}for(var f=0,p=u.length;f<p;f++){var m=u.substr(f,1);switch(m){case".":break;case"-":l=l.substr(0,l.length-1);break;default:l+=m}}return l},getSex:()=>{if(a.mn.length>2)switch(a.mn.substr(a.mn.length-2)){case"ич":return"m";case"на":return"f"}return""},fullName:l=>((a.fullNameSurnameLast?"":a.lastName(l)+" ")+a.firstName(l)+" "+a.middleName(l)+(a.fullNameSurnameLast?" "+a.lastName(l):"")).replace(/^ +| +$/g,""),lastName:l=>a.word(a.ln,a.sex,"lastName",l),firstName:l=>a.word(a.fn,a.sex,"firstName",l),middleName:l=>a.word(a.mn,a.sex,"middleName",l)};if(typeof t>"u"){var o=e.match(/^\s*(\S+)(\s+(\S+)(\s+(\S+))?)?\s*$/);if(!o)return"Cannot parse supplied name";o[5]&&o[3].match(/(ич|на)$/)&&!o[5].match(/(ич|на)$/)?(e=o[5],t=o[1],r=o[3],a.fullNameSurnameLast=!0):(e=o[1],t=o[3],r=o[5])}return a.ln=e,a.fn=t||"",a.mn=r||"",a.sex=i||a.getSex(),a}function vi(e){let t=e.split(" ");switch(t.length){case 2:return t[0]+" "+t[1].substring(0,1)+".";case 3:return t[0]+" "+t[1].substring(0,1)+"."+t[2].substring(0,1)+".";default:return e}}function yi(e){return{1:{val:"01",name:"Январь",names:"Января",abc:"Янв"},2:{val:"02",name:"Февраль",names:"Февраля",abc:"Февр"},3:{val:"03",name:"Март",names:"Марта",abc:"Март"},4:{val:"04",name:"Апрель",names:"Апреля",abc:"Апр"},5:{val:"05",name:"Май",names:"Мая",abc:"Май"},6:{val:"06",name:"Июнь",names:"Июня",abc:"Июнь"},7:{val:"07",name:"Июль",names:"Июля",abc:"Июль"},8:{val:"08",name:"Август",names:"Августа",abc:"Авг"},9:{val:"09",name:"Сентябрь",names:"Сентебря",abc:"Сент"},10:{val:"10",name:"Октябрь",names:"Октября",abc:"Окт"},11:{val:"11",name:"Ноябрь",names:"Ноября",abc:"Нояб"},12:{val:"12",name:"Декабрь",names:"Декабря",abc:"Дек"}}[e]}function wi(e){return parseFloat(e).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g,"$1 ")}function ki(e,t){let r=t+"";for(;r.length<e;)r="0"+r;return r}function ji(e,t,r){let i=t/e*r;return(typeof i!="number"||i===1/0)&&(i=0),parseFloat(i).toFixed(1)}function Ci(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Si(e,t){e=Math.abs(e)%100;let r=e%10;return e>10&&e<20?t[2]:r>1&&r<5?t[1]:r===1?t[0]:t[2]}function Ei(e,t,r){return he(e,t)?he(e,t).n:r||""}function Bi(e,t){return e.reduce(function(r,i){let a=t instanceof Function?t(i):i[t];return r[a]!==void 0||(r[a]={}),r[a][i.id]=i,r},{})}function Ti(e){return parseInt((Date.now()-new Date(e).getTime())/31536e6+"")+""}const pe={Age:Ti,Date:xi,MoneyString:gi,DateSort:hi,Size:mi,TypeFiles:_i,Cases:bi,Initials:vi,Month:yi,Money:wi,Number:ki,Percent:ji,CapitalizeFirstLetter:Ci,DeclensionWord:Si,Select:Ei,ObjectByArray:Bi};function nt({label:e,value:t,placeholder:r,onValue:i,name:a}){const o="__.__.____",l=new Set("_"),d=(g=>Array.from(o,(v,_)=>l.has(v)?g=_+1:g))(0),c=[...o].findIndex(g=>l.has(g)),u=new RegExp("\\d","g"),f=g=>(g=g.match(u)||[],Array.from(o,v=>(g[0]===v||l.has(v))&&g.shift()||v)),p=g=>{const[v,_]=[g.target.selectionStart,g.target.selectionEnd].map(y=>(y=f(g.target.value.slice(0,y)).findIndex(k=>l.has(k)),y<0?d[d.length-1]:m?d[y-1]||c:y));g.target.value=f(g.target.value).join(""),g.target.setSelectionRange(v,_),m=!1,i==null||i({name:a,value:g.target.value})};let m=!1;const x={};return x.field="input",n.jsxs("dl",{...x,children:[n.jsx("dt",{}),n.jsx("dd",{children:n.jsx("input",{type:"tel",placeholder:r,onChange:p,inputMode:"numeric",onKeyDown:g=>m=g.key==="Backspace",onFocus:p,defaultValue:pe.Date(t,"dd.mm.yyyy"),onBlur:g=>g.target.value===o&&(g.target.value="")})})]})}function Ii({children:e}){return n.jsx("div",{className:"l",children:n.jsx("ul",{children:e})})}function $i({children:e}){return n.jsx("div",{className:te.s,children:e})}function Ni({children:e,className:t}){let r={};return t&&(r.className=t),n.jsx("div",{"data-form":"outline",...r,children:n.jsx("ul",{children:e})})}function Di({children:e}){return n.jsx("div",{className:te.c,children:e})}const rt={List:Ii,Scroll:$i,Main:ti,Add:ni,Icon:ai,Open:oi,Shake:ii,Form:Ni,Center:Di,Close:si};function it({value:e,onValue:t,name:r,placeholder:i="",title:a,error:o,hide:l=!1,edit:d=!0,show:c=!0,active:u=!0,after:f="",view:p,modal:m,module:x,options:g,className:v}){let[_,y]=b.useState(e),k=M=>{if(!(d&&u)||!m)return;let q=m.split(".");rt.Open(q[1],{callback:U=>{t&&t({value:U,name:r}),y(U)},onValue:t,options:g,name:r,value:e})};const T={};T.field="input",v&&(T.className=v);const $={};return i&&($.placeholder=i),l?n.jsx(n.Fragment,{}):n.jsxs("dl",{...T,children:[a&&n.jsx("dt",{children:a}),n.jsx("dd",{...$,onClick:k,edit:(d&&u)+"","data-after":f,children:_}),o&&n.jsx("em",{children:o})]})}function at(e){let t=e.value,r=p=>e.type==="multi"?p.replace(/[^+\d.+-]/g,""):p.replace(/[^+\d.]/g,""),i=(p,m)=>{let x=document.createRange(),g=window.getSelection();x.setStart(m.childNodes[0],p),x.collapse(!0),g.removeAllRanges(),g.addRange(x),m.focus()},a=p=>{e.onValue({value:r(p.target.textContent),name:e.name}),p.target.textContent=r(p.target.textContent),p.target.textContent.length>0&&i(p.target.textContent.length,p.target)},o=p=>{p.target.textContent===""&&(p.target.textContent=0),e.onValue({value:r(p.target.textContent),name:e.name}),p.target.textContent=pe.Money(p.target.textContent)},l=p=>{p.target.textContent=r(p.target.textContent)},d=p=>{p.key==="Enter"&&p.preventDefault()},c=p=>{p.preventDefault(),navigator.clipboard.readText().then(m=>{m=m.replace(/^\s*/,"").replace(/\s*$/,""),window.document.execCommand("insertText",!1,m)}).catch(m=>{})},u=()=>e.title?n.jsx("dt",{children:e.title}):"",f=()=>e.error?n.jsx("em",{children:e.error}):"";return n.jsxs("dl",{"data-form":"input",children:[u(),n.jsx("dd",{onInput:a,onPaste:c,onBlur:o,onKeyDown:d,onFocus:l,contentEditable:!0,suppressContentEditableWarning:!0,"e-after":e.after,children:pe.Money(t)}),f()]})}const Vt={o:"_o_1kqkq_1",c:"_c_1kqkq_11"};function Xt({value:e,onValue:t,name:r,view:i,error:a,edit:o=!0,active:l=!0,title:d,placeholder:c="",after:u}){let[f,p]=b.useState(e);b.useEffect(()=>{p(e)},[e]);let m=v=>{p(v),t&&t({value:v,name:r})},x=v=>{if(!o||!l)return;const _=v.target.getBoundingClientRect(),y=_.left,k=_.top;Le.setListener("form",n.jsx(Mi,{position:{x:y,y:k},onValue:m,date:f},new Date().getTime()))};const g={};return c&&(g.placeholder=c),n.jsx(n.Fragment,{children:i==="icon"?n.jsx("i",{"data-icon":"F043",onClick:x}):n.jsxs("dl",{children:[d&&n.jsx("dt",{children:d}),n.jsx("dd",{onClick:x,...g,children:pe.Date(f,"mm.yyyy")}),a&&n.jsx("em",{children:a})]})})}const Mi=e=>{let[t,r]=b.useState(!0),i=new Date,a=new Date(e.date),o={y:parseInt(i.getFullYear()),m:parseInt(i.getMonth())+1},l={y:parseInt(a.getFullYear()),m:parseInt(a.getMonth())+1},[d,c]=b.useState(l.y),u=()=>{r(!1)},f=()=>{c(d+1)},p=()=>{c(d-1)},m=y=>{e.onValue(d+"-"+pe.Number(2,y)),u()},x=y=>o.y===l.y&&o.m===y?"_FFEB3B":"",g=Array(12).fill("").map((y,k)=>k+1),v=window.innerHeight-e.position.y+33<320?e.position.y-312:e.position.y+33,_=window.innerWidth-e.position.x<265?e.position.x-235:e.position.x;return n.jsx(n.Fragment,{children:t?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:Vt.o,onClick:()=>u()},new Date().getTime()),n.jsxs("div",{className:Vt.c,style:{top:v+"px",left:_+"px"},children:[n.jsxs("s",{children:[n.jsx("i",{"data-icon":"F021",onClick:()=>p()}),n.jsx("h2",{children:d}),n.jsx("i",{"data-icon":"F022",onClick:()=>f()})]}),n.jsx("div",{children:g.map((y,k)=>n.jsx("span",{onClick:()=>{m(y)},color:x(y),children:n.jsx("b",{children:pe.Month(y).abc})},k))})]})]}):""})};function Jt(e){let t=()=>e.title?n.jsx("dt",{children:e.title}):"",r=()=>e.error?n.jsx("em",{children:e.error}):"",[i,a]=b.useState(!1),o=e.edit!==void 0?e.edit:!0,l=e.active!==void 0?e.active:!0,c=!!(e.hide&&(e.value===""||e.value===void 0))&&!(o&&l);i=o?!0:i;let u=e.placeholder!==void 0?e.placeholder:"Заметка пуста",f=_=>{e.onValue&&e.onValue({value:_.target.innerText,name:e.name})},p=_=>{_.preventDefault(),navigator.clipboard.readText().then(y=>{window.document.execCommand("insertText",!1,y)}).catch(y=>{})},m=_=>{o||a(!i)};const x=_=>{e.onSave&&e.onSave({value:_.target.innerText,name:e.name})},g={};g.field="notes",e.className&&(g.className=e.className);const v={};return u&&(v.placeholder=u),i&&(v.open=""),o&&l&&(v.edit=""),c?n.jsx(n.Fragment,{}):n.jsxs("dl",{...g,children:[t(),n.jsx("dd",{onPaste:p,onInput:f,onBlur:x,contentEditable:o&&l?"plaintext-only":"false",...v,onDoubleClick:m,suppressContentEditableWarning:!0,children:e.value}),r()]})}function ot({onValue:e,onSave:t,value:r,name:i,active:a,max:o,edit:l,title:d,error:c,show:u,hide:f,placeholder:p,className:m,after:x,view:g}){l=l!==void 0?l:!0,a=a!==void 0?a:!0,f=!!(f&&(r===""||r===void 0))&&!(l&&a),p=p!==void 0?p:"",o=o!==void 0?o:99;let _=T=>{e==null||e({name:i,value:T.currentTarget.value})};const y=T=>{t==null||t({name:i,value:T.currentTarget.value})},k={};return k.field="input",m&&(k.className=m),f?n.jsx(n.Fragment,{}):n.jsxs("dl",{...k,children:[d&&n.jsx("dt",{children:d}),n.jsx("dd",{children:n.jsx("input",{name:i,type:"tel",inputMode:"numeric",onChange:_,onBlur:y,placeholder:p,defaultValue:r})}),c&&n.jsx("em",{children:c})]})}function Qt({value:e,onValue:t,name:r,placeholder:i="",className:a,title:o,error:l,edit:d=!0,active:c=!0,reload:u=!1,after:f=""}){let p=_=>{t&&t({value:_.target.textContent,name:r,reload:u})},m=_=>{_.key==="Enter"&&_.preventDefault()},x=_=>{_.preventDefault(),navigator.clipboard.readText().then(y=>{window.document.execCommand("insertText",!1,y.replace(/(\r\n|\n|\r)/gm," "))}).catch(y=>{})};const g={};g.field="password",a&&(g.className=a);const v={};return i&&(v.placeholder=i),n.jsxs("dl",{...g,children:[o?n.jsx("dt",{children:o}):"",n.jsx("dd",{onPaste:x,onInput:p,onKeyDown:m,onBlur:_e.Blur,contentEditable:d&&c?"plaintext-only":"false",...v,suppressContentEditableWarning:!0,children:e}),l?n.jsx("em",{children:l}):""]})}function st({onValue:e,onSave:t,value:r,name:i,active:a,max:o,edit:l,title:d,error:c,show:u,hide:f,placeholder:p,className:m,after:x,view:g}){l=l!==void 0?l:!0,a=a!==void 0?a:!0,f=!!(f&&(r===""||r===void 0))&&!(l&&a),p=p||"";const _="+7__________",y=new Set("_"),k=(C=>Array.from(_,(R,Q)=>y.has(R)?C=Q+1:C))(0),T=[..._].findIndex(C=>y.has(C)),$=new RegExp("\\d","g"),M=C=>(C=C.match($)||[],Array.from(_,R=>(C[0]===R||y.has(R))&&C.shift()||R)),q=C=>{const[R,Q]=[C.target.selectionStart,C.target.selectionEnd].map(F=>(F=M(C.target.value.slice(0,F)).findIndex(X=>y.has(X)),F<0?k[k.length-1]:re?k[F-1]||T:F));C.target.value=M(C.target.value).join(""),C.target.setSelectionRange(R,Q),re=!1,e==null||e({name:i,value:C.target.value})},U=C=>{const[R,Q]=[C.target.selectionStart,C.target.selectionEnd].map(F=>(F=M(C.target.value.slice(0,F)).findIndex(X=>y.has(X)),F<0?k[k.length-1]:re?k[F-1]||T:F));C.target.value=M(C.target.value).join(""),C.target.setSelectionRange(R,Q),re=!1,e==null||e({name:i,value:C.target.value})};let re=!1;const L={};return L.field="input",m&&(L.className=m),f?n.jsx(n.Fragment,{}):n.jsxs("dl",{...L,children:[d&&n.jsx("dt",{children:d}),n.jsx("dd",{children:n.jsx("input",{name:i,type:"tel",inputMode:"numeric",onChange:q,onBlur:U,placeholder:p,defaultValue:r})}),c&&n.jsx("em",{children:c})]})}const en=e=>{let t=()=>e.title?n.jsx("dt",{children:e.title}):"",r=e.edit!==void 0?e.edit:!0,i=e.active!==void 0?e.active:!0,a=e.placeholder!==void 0?e.placeholder:"",o=0,l=()=>{clearTimeout(o),o=setTimeout(()=>{},1e3)},d=f=>{f.key==="Enter"&&f.preventDefault()},c=f=>{f.preventDefault(),navigator.clipboard.readText().then(p=>{window.document.execCommand("insertText",!1,p)}).catch(p=>{})};const u={};return a&&(u.placeholder=a),n.jsxs("dl",{"data-form":"input",children:[t(),n.jsx("dd",{onPaste:c,onInput:l,onKeyDown:d,contentEditable:r&&i?"plaintext-only":"false",...u,suppressContentEditableWarning:!0,children:e.value})]})};function lt({title:e,error:t,edit:r=!0,active:i=!0,hide:a,value:o="0",onValue:l,options:d,placeholder:c="",name:u,after:f,view:p,className:m}){var k;const x=b.useId(),[g,v]=b.useState((k=d[parseInt(o)])==null?void 0:k.n);let _=T=>{v(d[T.target.value].n),l==null||l({name:u,value:T.target.value})};const y={};return y.field="select",m&&(y.className=m),n.jsxs("dl",{...y,children:[e?n.jsx("dt",{children:e}):"",n.jsxs("dd",{children:[g,n.jsx("select",{name:u,id:x,defaultValue:o+"",onChange:_,children:Object.keys(d).map(T=>n.jsx("option",{value:T,children:d[T].n},T))})]})]})}function dt({value:e,onValue:t,name:r,placeholder:i="",title:a="",error:o="",hide:l=!1,edit:d=!0,active:c=!0,after:u="",show:f=!0,view:p,onSave:m,className:x=""}){let g=!!(l&&(e===""||e===void 0)),v=$=>{t==null||t({value:$.target.value,name:r})},_=$=>{$.preventDefault(),navigator.clipboard.readText().then(M=>{window.document.execCommand("insertText",!1,M.replace(/(\r\n|\n|\r)/gm," "))}).catch(M=>{})},y=$=>{$.preventDefault(),navigator.clipboard.writeText($.target.value).then(function(){Ae.Copy("Данные в буфер обмене")},function(M){})};if(!(d&&c)&&!f||!(d&&c)&&g)return"";const k={};k.field="input",x&&(k.className=x);const T=$=>{m==null||m({value:$.target.value,name:r})};return n.jsxs("dl",{...k,children:[a?n.jsx("dt",{children:a}):"",n.jsx("dd",{children:n.jsx("input",{name:r,autoComplete:"off",type:"text",onChange:v,onPaste:_,onBlur:T,onContextMenu:y,placeholder:i,defaultValue:e,spellCheck:"false"})}),o?n.jsx("em",{children:o}):""]})}function ct(e){let t=()=>e.title?n.jsx("dt",{children:e.title}):"",r=()=>e.error?n.jsx("em",{children:e.error}):"",i=e.edit!==void 0?e.edit:!0,a=e.active!==void 0?e.active:!0,l=!!(e.hide&&(e.default===""||e.options[e.default]===void 0))&&!(i&&a),d=e.placeholder!==void 0?e.placeholder:"",c=x=>{f(e.options[x]),e.onValue({value:x,name:e.name})},[u,f]=b.useState(e.default!==void 0?e.options[e.default]:e.default),p=x=>{if(!(i&&a))return;const g=x.target.getBoundingClientRect();Le.setListener("form",n.jsx(zi,{parent:g,onValue:c,view:e.view,options:e.options},new Date().getTime()))};const m={};return d&&(m.placeholder=d),l?n.jsx(n.Fragment,{}):n.jsxs("dl",{"data-form":"select",children:[t(),n.jsx("dd",{onClick:p,"data-edit":(i&&a)+"",...m,children:u}),r()]})}const zi=({onValue:e,parent:t,view:r,options:i})=>{let[a,o]=b.useState(!0),l=()=>{o(!1)},d=p=>{o(!1),e(p)},c=Object.keys(i).length*36,u=window.innerHeight-t.y+t.height<c?t.y-(c-33):t.y+33,f=window.innerWidth-t.x<265?t.x-235:t.x;return n.jsx(n.Fragment,{children:a?n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-select":"backdrop",onClick:l},new Date().getTime()),n.jsx("div",{"data-select":"background "+r,style:{top:u+"px",left:f+"px",width:t.width},children:n.jsx("ul",{children:Object.keys(i).map((p,m)=>n.jsx("li",{onClick:()=>{d(p)},children:i[p]},m))})})]}):""})};function ut({set:e,value:t,onValue:r,name:i,placeholder:a="",title:o="",error:l="",hide:d=!1,edit:c=!0,show:u=!0,active:f=!0,after:p="",view:m,module:x,item:g,className:v=""}){let _={};switch(e){case"String":return n.jsx(dt,{title:o,show:u,hide:d,view:m,edit:c,active:f,value:t,onValue:r,name:i,placeholder:a,className:v});case"Select":return g&&(_=oe.getSelect(parseInt(g))?oe.getSelect(parseInt(g)):{0:{s:"1",n:"не известно"}}),n.jsx(lt,{title:o,show:u,hide:d,view:m,edit:c,active:f,value:t,onValue:r,name:i,placeholder:a,className:v,options:_});case"Users":return oe.getSelect("user"),n.jsx(ct,{title:o,show:u,hide:d,view:m,edit:c,active:f,value:t,onValue:r,name:i,placeholder:a,className:v,options:_});case"Date":return n.jsx(nt,{title:o,show:u,hide:d,view:m,edit:c,active:f,value:t,onValue:r,name:i,placeholder:a,className:v});case"Phone":return n.jsx(st,{title:o,show:u,hide:d,view:m,edit:c,active:f,value:t,onValue:r,name:i,placeholder:a,className:v});case"Number":return n.jsx(ot,{title:o,show:u,hide:d,view:m,edit:c,active:f,value:t,onValue:r,name:i,placeholder:a,className:v});case"Money":return n.jsx(at,{title:o,show:u,hide:d,view:m,edit:c,active:f,value:t,onValue:r,name:i,placeholder:a,className:v});case"Modal":return n.jsx(it,{title:o,show:u,hide:d,view:m,edit:c,active:f,value:t,onValue:r,name:i||"",placeholder:a,className:v,options:_,module:x||""})}}function tn({value:e,onValue:t,name:r,placeholder:i="",title:a="",error:o="",hide:l=!1,edit:d=!0,active:c=!0,after:u="",show:f=!0,view:p,onBlur:m,onSave:x,className:g=""}){let v=!!(l&&(e===""||e===void 0));if(!(d&&c)&&!f||!(d&&c)&&v)return"";let _=$=>{t&&t({value:$.target.innerText,name:r})},y=$=>{x&&x({value:$.target.innerText,name:r})},k=$=>{$.preventDefault(),navigator.clipboard.readText().then(M=>{window.document.execCommand("insertText",!1,M)}).catch(M=>{})};const T={};return i&&(T.placeholder=i),n.jsxs("dl",{children:[a??n.jsx("dt",{children:a}),n.jsx("dd",{onPaste:k,onBlur:y,onInput:_,contentEditable:d&&c?"plaintext-only":"false",...T,suppressContentEditableWarning:!0,children:e}),o??n.jsx("em",{children:o})]})}function nn({value:e,onValue:t,name:r,placeholder:i="",title:a="",error:o="",hide:l=!1,edit:d=!0,active:c=!0,after:u="",show:f=!0,view:p,onBlur:m,onSave:x,className:g=""}){let v=!!(l&&(e===""||e===void 0));if(pe.Date(e===void 0?new Date:e,"HH:MM"),b.useRef(null),!(d&&c)&&!f||!(d&&c)&&v)return"";const _="__:__",y=new Set("_"),k=(C=>Array.from(_,(R,Q)=>y.has(R)?C=Q+1:C))(0),T=[..._].findIndex(C=>y.has(C)),$=new RegExp("\\d","g"),M=C=>(C=C.match($)||[],Array.from(_,R=>(C[0]===R||y.has(R))&&C.shift()||R)),q=C=>{const[R,Q]=[C.target.selectionStart,C.target.selectionEnd].map(F=>(F=M(C.target.value.slice(0,F)).findIndex(X=>y.has(X)),F<0?k[k.length-1]:L?k[F-1]||T:F));C.target.value=M(C.target.value).join(""),C.target.setSelectionRange(R,Q),t==null||t({name:r,value:C.target.value})},U={};U.field="input",g&&(U.className=g);const re={};i&&(re.placeholder=i);let L=!1;return n.jsx(n.Fragment,{children:n.jsxs("dl",{...U,children:[a?n.jsx("dt",{children:a}):"",n.jsx("dd",{...re,children:n.jsx("input",{type:"tel",placeholder:i,onChange:q,inputMode:"numeric",onKeyDown:C=>L=C.key==="Backspace",onFocus:q,onBlur:C=>C.target.value===_&&(C.target.value="")})}),o?n.jsx("em",{children:o}):""]})})}function rn({onValue:e,label:t,value:r,className:i,name:a,reload:o}){r=!!r;const[l,d]=b.useState(r),c=()=>{let p=!l;e({name:a,value:p,reload:o}),d(p)},u={};u.field="check",i&&(u.className=i);const f={};return l&&(f.active=""),n.jsxs("dl",{...u,children:[t?n.jsx("dt",{children:t}):"",n.jsx("dd",{...f,onClick:c})]})}const an=({onValue:e,value:t,name:r,item:i})=>{const[a,o]=b.useState(!!t);b.useEffect(()=>{o(!!t)},[t]);let l=()=>{let d=parseInt(a)===0?1:0;o(d),e({value:d,name:r,key:i,item:i})};return n.jsx("div",{role:"switch",onClick:l,"aria-checked":`${a?"true":"false"}`})};function on({value:e,onValue:t,name:r,placeholder:i="",title:a="",error:o="",hide:l=!1,edit:d=!0,active:c=!0,after:u="",show:f=!0,view:p,onBlur:m,onSave:x,className:g=""}){const[v,_]=b.useState(e!==void 0?e.split(","):[]);b.useEffect(()=>{e!==void 0&&_(e!==void 0?e.split(","):[])},[e]);let y=()=>{_([...v,""])},k=L=>{v.splice(L,1),v.length===0&&v.push(""),_([...v]),m!==void 0&&m({value:v.join(","),name:r})},T=!!(l&&(e===""||e===void 0)),$=L=>{};if(!(d&&c)&&!f||!(d&&c)&&T)return"";const M={};M.field="group",g&&(M.className=g);const q=L=>{_e.Blur(L),x&&x({value:L.target.textContent,name:r})};let U=(L,C)=>{v[C]=L.target.textContent,t!==void 0&&t({value:v.join(","),name:r})},re=L=>{L.key==="Enter"&&L.preventDefault()};return n.jsxs("dl",{...M,children:[n.jsxs("dt",{children:[a,n.jsx("i",{onClick:y,children:n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",children:[n.jsx("path",{d:"M12 5.25v13.5"}),n.jsx("path",{d:"M18.75 12H5.25"})]})})]}),n.jsx("dd",{children:v.map((L,C)=>n.jsxs("li",{className:"field_group_item",children:[n.jsx("span",{onInput:R=>U(R,C),edit:"true",name:r,placeholder:i,onPaste:$,contentEditable:!0,onKeyDown:re,onBlur:q,suppressContentEditableWarning:!0,children:v[C]}),n.jsx("i",{onClick:()=>{k(C)},children:n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",children:[n.jsx("path",{d:"M17.25 17.25 6.75 6.75"}),n.jsx("path",{d:"m17.25 6.75-10.5 10.5"})]})})]},C))}),o?n.jsx("em",{children:o}):""]})}const Fi=e=>(e=e!==void 0&&e!==""?e.split(","):[],e.reduce((t,r)=>(t[r]=!0,t),{}));function sn({value:e,onValue:t,name:r,placeholder:i="",title:a,error:o,hide:l=!1,edit:d=!0,show:c=!0,active:u=!0,after:f="",view:p,modal:m,module:x,options:g,className:v}){const[_,y]=b.useState(Fi(e)),k=M=>{if(!(d&&u)||!m)return;let q=m.split(".");rt.Open(q[1],{callback:U=>{t&&t({value:U,name:r}),y(U)},onValue:t,options:g,name:r,value:_})},T={};T.field="group",v&&(T.className=v);const $={};return i&&($.placeholder=i),l?n.jsx(n.Fragment,{}):n.jsxs("dl",{...T,children:[n.jsxs("dt",{children:[a,n.jsx("i",{onClick:k,children:n.jsxs("svg",{width:"20",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("path",{d:"M12 5.25v13.5"}),n.jsx("path",{d:"M18.75 12H5.25"})]})})]}),n.jsx("dd",{...$,onClick:open,edit:(d&&u)+"","data-after":f,children:Object.keys(_).map(M=>{var q;return n.jsx("div",{className:"field_group_item",children:(q=g[M])==null?void 0:q.label},M)})}),o&&n.jsx("em",{children:o})]})}const ln={Color:Gt,Date:nt,Code:Ht,Check:rn,Switch:Wt,Button:Zt,Message:Ut,Generator:Yt,Captcha:Kt,Modal:it,Money:at,Month:Xt,Notes:Jt,Number:ot,Password:Qt,Phone:st,Search:en,Select:lt,Set:ut,Textarea:tn,Time:nn,Users:ct,String:dt,Toogle:an,Group:on,Options:sn},be={debug:"_debug_ug20b_34",b:"_b_ug20b_46",o:"_o_ug20b_50",mb:"_mb_ug20b_55",tm:"_tm_ug20b_66",ta:"_ta_ug20b_133","--body":"_--body_ug20b_143"},S=window.Telegram.WebApp,le={is:!1,MainButton:{},BackButton:{}};let ve={};ve.dark={"--tg-theme-bg-color":"#212121","--tg-theme-text-color":"#ffffff","--tg-theme-hint-color":"#aaaaaa","--tg-theme-link-color":"#8774e1","--tg-theme-button-color":"#8774e1","--tg-theme-button-text-color":"#ffffff","--tg-theme-secondary-bg-color":"#0f0f0f","--tg-theme-header-bg-color":"#212121","--tg-theme-accent-text-color":"#8774e1","--tg-theme-section-bg-color":"#212121","--tg-theme-section-header-text-color":"#aaaaaa","--tg-theme-subtitle-text-color":"#aaaaaa","--tg-theme-destructive-text-color":"#e53935"},ve.light={"--tg-theme-bg-color":"#ffffff","--tg-theme-text-color":"#000000","--tg-theme-hint-color":"#999999","--tg-theme-link-color":"#2481cc","--tg-theme-button-color":"#2481cc","--tg-theme-button-text-color":"#ffffff","--tg-theme-secondary-bg-color":"#efeff3"},ve.users={"--tg-theme-bg-color":"#000000","--tg-theme-text-color":"#ffffff","--tg-theme-hint-color":"#98989e","--tg-theme-link-color":"#ffffff","--tg-theme-button-color":"#ffffff","--tg-theme-button-text-color":"#000000","--tg-theme-secondary-bg-color":"#000000"},S.getUser=()=>{var e;return((e=S.initDataUnsafe)==null?void 0:e.user)===void 0?{}:S.initDataUnsafe},S.MainButton.callback=[],S.MainButton.set=e=>{le.is?le.MainButton.set(e):(S.MainButton.callback.forEach(t=>{S.MainButton.offClick(t)}),S.MainButton.callback=[],typeof e=="boolean"?S.MainButton.isVisible=!1:(S.MainButton.text=e.text,e.color&&(S.MainButton.color=e.color),e.textColor&&(S.MainButton.textColor=e.textColor),S.MainButton.isVisible=!0,S.MainButton.isActive=e.isActive===void 0?!0:e.isActive,S.MainButton.callback.push(()=>{var t;e.page===void 0?(t=e.callback)==null||t.call(e):se.setPage(e.page)}),S.MainButton.onClick(S.MainButton.callback[0])))},S.BackButton.state=[!1],S.BackButton.listen=[],S.BackButton.router=e=>{e===!1?(S.BackButton.isVisible=!1,S.BackButton.offClick(S.BackButton.listen[0]),S.BackButton.listen.shift(),S.BackButton.state.length!==1&&S.BackButton.state.pop()):(S.BackButton.isVisible=!0,S.BackButton.offClick(S.BackButton.listen[0]),S.BackButton.listen.shift(),S.BackButton.listen.push(()=>{let t=S.BackButton.state.pop();if(t.page!==void 0)se.setPage(t.page);else{let r=S.BackButton.state[S.BackButton.state.length-1];S.BackButton.router(r)}}),S.BackButton.onClick(S.BackButton.listen[0]))},S.BackButton.set=e=>{le.is?le.BackButton.set(e):(S.BackButton.state.push(e),S.BackButton.router(e))},S.Notice=(e,t)=>{t!==void 0?(Ae.Send({type:e,text:t}),le.is||S.HapticFeedback.notificationOccurred(e)):(Ae.Send(e),le.is||S.HapticFeedback.notificationOccurred(e.type))},S.Init=({dev:e})=>{if(e){let[t,r]=b.useState(!1),[i,a]=b.useState(!1),[o,l]=b.useState("dark"),[d,c]=b.useState(!1),[u,f]=b.useState(!1);le.is=!0,le.MainButton.set=r,le.BackButton.set=a,b.useEffect(()=>{for(let x in ve[o])document.documentElement.style.setProperty(x,ve[o][x])},[]);let p=x=>{for(let g in ve[x])document.documentElement.style.setProperty(g,ve[x][g]);l(x),c(!1)},m=()=>{c(!1),f(!0)};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:be.debug,children:[i===!1?n.jsx("div",{className:be.b,children:"Отмена"}):n.jsx("div",{onClick:()=>{i.page===void 0||se.setPage(i.page)},className:be.b,children:"Назад"}),n.jsx("div",{className:be.o,onClick:()=>c(!d),children:"Меню"})]}),t&&n.jsx("div",{className:be.mb,children:n.jsx("button",{onClick:()=>{t.page&&se.setPage(t.page),t.callback&&t.callback()},children:t.text})}),d?n.jsxs("div",{className:be.tm,children:[n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("button",{onClick:m,children:"Authorization"})}),n.jsx("li",{children:n.jsx("button",{onClick:()=>se.setPage("Add"),children:"Add Page"})})]}),n.jsxs("ul",{children:[n.jsxs("li",{children:[n.jsx("button",{children:"Thema"}),n.jsxs("ol",{children:[n.jsx("li",{children:n.jsx("button",{onClick:()=>p("dark"),children:"Dark"})}),n.jsx("li",{children:n.jsx("button",{onClick:()=>p("light"),children:"Light"})}),n.jsx("li",{children:n.jsx("button",{onClick:()=>p("users"),children:"Users"})})]})]}),n.jsx("li",{children:n.jsx("button",{onClick:()=>c(!d),children:"Closed"})})]})]}):"",u?n.jsx(Pi,{setAuthorization:f}):""]})}else return n.jsx(n.Fragment,{})};const Pi=({setAuthorization:e})=>{let t={},r=a=>{t=a.value},i=a=>{localStorage.setItem("auth",t)};return n.jsx("div",{className:be.ta,children:n.jsxs("div",{className:"--body",children:[n.jsx("fieldset",{children:n.jsx(ln.Notes,{label:"Data JSON",name:"description",onValue:r,placeholder:""})}),n.jsx("div",{onClick:i,children:" Сщхранить "})]})})},Ri=({children:e,config:t})=>(window.location.pathname==="/clear"&&(window.history.pushState({},"","/"),V()),N.New(t.crypto),t.defaultModule&&Wn(t.defaultModule),Un(n.jsxs(n.Fragment,{children:[n.jsx(S.Init,{dev:t.dev}),n.jsx(ei,{config:t.modal}),n.jsx(Ur,{}),n.jsx(Xr,{}),n.jsx(pi,{}),e]}))),dn=({list:e,onClick:t,active:r,size:i,view:a})=>n.jsx("nav",{children:n.jsx("ul",{className:[i,a].join(" "),children:e.map(o=>n.jsx(Oi,{onClick:t,active:r,label:o.label,link:o.link},o.link))})}),Oi=({onClick:e,label:t,link:r,active:i})=>n.jsx("li",{"tabs-active":String(i===r),onClick:()=>e(r),children:t});dn.defaultProps={size:"M",view:"H"};const Li=({title:e="",button:t,description:r="",children:i})=>n.jsxs("fieldset",{children:[e&&n.jsxs("legend",{children:[e,t&&n.jsx("div",{role:"button-outline",onClick:()=>t.onClick(),children:t.label})," "]}),n.jsx("ul",{children:i}),r&&n.jsx("article",{children:r})]}),Ai={setting:"_setting_dva4m_2"},qi=({children:e})=>n.jsx("div",{className:Ai.setting,children:e}),Wi=({label:e,children:t})=>{let[r,i]=b.useState(!1);return n.jsxs("li",{"data-item":"accordion",children:[n.jsxs("dl",{onClick:()=>i(!r),children:[n.jsx("dt",{children:e}),n.jsx("dd",{children:n.jsx("div",{"data-close":String(r)})})]}),r&&n.jsx("div",{children:t})]})},Zi=({label:e,onClick:t,button:r})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{role:"button",onClick:()=>t(),children:r})]})}),cn={Switch:({active:e,onClick:t})=>(e=typeof e=="number"?!!e:e,n.jsx("div",{role:"switch",onClick:()=>{t()},"aria-checked":e?"true":"false"}))},Ui={Accordion:Wi,Button:Zi,Switch:({label:e,onClick:t,active:r})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{children:n.jsx(cn.Switch,{onClick:t,active:r})})]})}),Info:({label:e,info:t})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{role:"info",children:t})]})}),Select:({label:e,active:t,options:r})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{role:"info",children:t})]})}),Component:({label:e,children:t})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{children:t})]})}),Node:({label:e,children:t})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{children:t})]})})};function un({list:e,onClick:t,active:r,size:i,view:a}){return n.jsx("nav",{children:n.jsx("ul",{className:[i,a].join(" "),children:e.map(o=>n.jsx(Yi,{onClick:t,active:r,label:o.label,link:o.link},o.link))})})}const Yi=({onClick:e,label:t,link:r,active:i})=>n.jsx("li",{"tabs-active":String(i===r),onClick:()=>e(r),children:t});un.defaultProps={size:"M",view:"H"};const Ki={Section:Li,Main:qi,Item:Ui,Tabs:un};function fn({text:e,type:t,button:r}){let[i,a]=b.useState(!1),o={active:t};const l=()=>{if(r){if(r.onClick)return r.onClick({});if(r.onSend)return i?void 0:(a(!0),r.onSend(a))}};return n.jsxs("div",{className:et.al,...o,children:[n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",fillRule:"evenodd",clipRule:"evenodd",children:n.jsx("path",{fill:"#fff",d:"M10.362 2.015C11.4264 1.66167 12.5736 1.66167 13.638 2.015C14.6981 2.36687 15.5304 3.20141 16.3665 4.37395C17.1999 5.5426 18.1208 7.17206 19.3078 9.2725L19.3544 9.35496C20.5417 11.4557 21.4625 13.0851 22.0364 14.4065C22.613 15.7343 22.9002 16.8807 22.6711 17.9821C22.4403 19.0911 21.8714 20.0995 21.0428 20.8617C20.2162 21.622 19.0907 21.9428 17.6736 22.0968C16.2645 22.25 14.4212 22.25 12.0488 22.25H11.9513C9.57882 22.25 7.73554 22.25 6.32642 22.0968C4.90927 21.9428 3.78379 21.622 2.95722 20.8617C2.12862 20.0995 1.55968 19.0911 1.32895 17.9821C1.0998 16.8807 1.387 15.7343 1.96365 14.4065C2.53752 13.0851 3.45835 11.4557 4.64558 9.35495L4.69218 9.2725L4.69218 9.27249C5.87921 7.17206 6.80008 5.5426 7.63347 4.37395C8.46963 3.20141 9.30194 2.36687 10.362 2.015ZM11 17C11 16.4477 11.4457 16 11.9955 16H12.0045C12.5543 16 13 16.4477 13 17C13 17.5523 12.5543 18 12.0045 18H11.9955C11.4457 18 11 17.5523 11 17ZM11 13C11 13.5523 11.4477 14 12 14C12.5523 14 13 13.5523 13 13V9C13 8.44772 12.5523 8 12 8C11.4477 8 11 8.44772 11 9V13Z"})}),n.jsx("span",{children:e}),r&&n.jsx("button",{onClick:l,children:r.label})]})}const H={h:"_h_1usnu_1",g:"_g_1usnu_11",hr:"_hr_1usnu_16",hl:"_hl_1usnu_28",t:"_t_1usnu_40",s:"_s_1usnu_60",u:"_u_1usnu_69",o:"_o_1usnu_76",l:"_l_1usnu_105",hh:"_hh_1usnu_115",c:"_c_1usnu_128",loadingB:"_loadingB_1usnu_1",m:"_m_1usnu_180",ul:"_ul_1usnu_196",f:"_f_1usnu_226"},pn=({title:e,left:t,right:r,children:i})=>n.jsxs("div",{className:H.h,children:[n.jsx("div",{className:H.t,children:e}),t&&n.jsx("div",{className:H.hl,children:t}),r&&n.jsx("div",{className:H.hr,children:r}),i]}),xn=({children:e,...t})=>n.jsx("div",{className:H.l,children:e}),hn=({children:e})=>n.jsx("div",{className:H.s,children:e}),gn=({children:e,edit:t})=>{const r={};return t&&(r.edit=""),n.jsx("div",{...r,className:H.f,children:e})};function mn({children:e}){return n.jsx("div",{className:H.g,children:e})}const Hi={Header:pn,Section:hn,Group:mn,Form:gn,List:xn,A:fn,U:({children:e})=>n.jsx("div",{className:H.u,children:e}),G:mn,C:({children:e})=>n.jsx("div",{className:H.c,children:e}),L:xn,O:({children:e,className:t,title:r})=>n.jsxs("div",{className:[H.o,t].join(" "),children:[r&&n.jsx("div",{className:H.hh,children:r}),e]}),S:hn,H:pn,M:({children:e})=>n.jsx("div",{className:H.m,children:e}),F:gn},Gi={Send:Qr,Line:fn};function Vi(){return n.jsx("svg",{viewBox:"0 0 462.86 359.96",children:n.jsx("path",{d:"M210.5,307.78c-27,35.41-58.14,58-120.55,50.84-1-.12-1.58-.39-1.58-2V327.87c0-1.32.51-2.12,1.85-2,100.39-1,88.17-63.46,74.8-90.94-47.3-97.28-14.46-166.27,20.26-205.14,14.1-16.37,50.53-42,128.07-23.24,9.1,2,30.51,7.8,24.46,11.38C317.5,30,297.66,68.33,295,73.12c-3.62,6.59-6.26,13.17-4.57,14.13,2.37,1.35,3.5-1.56,6.58-7.91C319.78,34.41,366-22.76,402.78,37.68a1.14,1.14,0,0,1,.09.26c9.3,56.05,30.57,228.62-97.76,224.22-23.38-2-28.82-22-32.57-18.89-3.36,3,10,21.4,32.76,23.19C448.18,270.75,411.55,66.74,407.79,41.91a1.41,1.41,0,0,1,0-.3c2-7.32,129.15,17.47,112.77,158.08,4.82,6.57,10.89,10,18.7,16.08l.13.07c8.9,3.67,10.46,12.06,11.43,18.88a63.15,63.15,0,0,1-.14,15.49c-10.48-4.62-22.74-10.11-22.26-22.53.43-12,7.35-5.21-8.8-14.22a.69.69,0,0,0-1,.57c-.33,3.87-2.7,14.69-3,16.59v0c-4.64,17-16.59,86-18.41,99.58-.77,5.7-4.94,10.41-11.4,10.39l-56.71.18c-7.73.22-9.57-7.9-10.27-11.89-2.7-15.31-4.08-29.7-4.18-29.67-20.24,9.26-108.69,3.08-108.69,3.27V330c-.29,7.56-4.51,15.26-11.74,15.32l-52.87,1c-10.36.1-13.85-1.67-15.5-11.87-2.08-13.08-1-34.26-5.32-37.43-2,1.84-8.33,8.11-10,10.83M196.16,203q9.57,0,11.42-7.72c2.18-9.07-5.66-17.7-14.77-15.68-4.95,1.11-7.53,4.94-7.53,11.53C185.28,199,188.94,203,196.16,203Z",transform:"translate(-88.37 0)"})})}const Xi={};function Ji(e){Xi.add(e)}function Qi({color:e,size:t,name:r}){return n.jsx("svg",{width:t,height:t,color:e,children:n.jsx("use",{href:`#${r}`})})}const ea={Logo:Vi,Sprite:Ji,Symbol:Qi};function ta(){return n.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[n.jsx("path",{d:"M5.15837 11.491C5.08489 12.887 5.16936 14.373 3.92213 15.3084C3.34164 15.7438 3 16.427 3 17.1527C3 18.1508 3.7818 19 4.8 19H19.2C20.2182 19 21 18.1508 21 17.1527C21 16.427 20.6584 15.7438 20.0779 15.3084C18.8306 14.373 18.9151 12.887 18.8416 11.491C18.6501 7.85223 15.6438 5 12 5C8.35617 5 5.34988 7.85222 5.15837 11.491Z",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"}),n.jsx("path",{d:"M10.5 3.125C10.5 3.95343 11.1716 5 12 5C12.8284 5 13.5 3.95343 13.5 3.125C13.5 2.29657 12.8284 2 12 2C11.1716 2 10.5 2.29657 10.5 3.125Z",stroke:"currentColor",strokeWidth:"1",fill:"none"}),n.jsx("path",{d:"M15 19C15 20.6569 13.6569 22 12 22C10.3431 22 9 20.6569 9 19",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})}function na(){return n.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[n.jsx("path",{d:"M4.4094 11.4516C4.62188 7.41446 7.95728 4.25 12 4.25C16.0427 4.25 19.3781 7.41446 19.5906 11.4516C19.5997 11.6241 19.6064 11.7893 19.6129 11.9485C19.6351 12.49 19.6544 12.9615 19.7525 13.4133C19.8698 13.9531 20.0867 14.3775 20.5279 14.7084C21.2972 15.2854 21.75 16.191 21.75 17.1527C21.75 18.534 20.6628 19.75 19.2 19.75H4.8C3.33719 19.75 2.25 18.534 2.25 17.1527C2.25 16.191 2.70278 15.2854 3.47213 14.7084C3.91329 14.3775 4.13025 13.9531 4.24749 13.4133C4.34561 12.9615 4.3649 12.49 4.38705 11.9485V11.9485L4.38705 11.9485C4.39356 11.7893 4.40032 11.6241 4.4094 11.4516Z",fill:"#141B34"}),n.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.5286 1.37434C10.9737 1.08296 11.517 1 12 1C12.483 1 13.0263 1.08296 13.4714 1.37434C13.9652 1.69759 14.25 2.22083 14.25 2.875C14.25 3.47116 14.017 4.09375 13.6626 4.57057C13.3138 5.03989 12.7415 5.5 12 5.5C11.2585 5.5 10.6862 5.03989 10.3374 4.57057C9.98299 4.09375 9.75 3.47116 9.75 2.875C9.75 2.22083 10.0348 1.69759 10.5286 1.37434Z",fill:"#141B34"}),n.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 18C9.55228 18 10 18.4477 10 19C10 20.1046 10.8954 21 12 21C13.1046 21 14 20.1046 14 19C14 18.4477 14.4477 18 15 18C15.5523 18 16 18.4477 16 19C16 21.2091 14.2091 23 12 23C9.79086 23 8 21.2091 8 19C8 18.4477 8.44772 18 9 18Z",fill:"#141B34"})]})}function ra(){return n.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:n.jsx("path",{d:"M8.85746 12.5061C6.36901 10.6456 4.59564 8.59915 3.62734 7.44867C3.3276 7.09253 3.22938 6.8319 3.17033 6.3728C2.96811 4.8008 2.86701 4.0148 3.32795 3.5074C3.7889 3 4.60404 3 6.23433 3H17.7657C19.396 3 20.2111 3 20.672 3.5074C21.133 4.0148 21.0319 4.8008 20.8297 6.37281C20.7706 6.83191 20.6724 7.09254 20.3726 7.44867C19.403 8.60062 17.6261 10.6507 15.1326 12.5135C14.907 12.6821 14.7583 12.9567 14.7307 13.2614C14.4837 15.992 14.2559 17.4876 14.1141 18.2442C13.8853 19.4657 12.1532 20.2006 11.226 20.8563C10.6741 21.2466 10.0043 20.782 9.93278 20.1778C9.79643 19.0261 9.53961 16.6864 9.25927 13.2614C9.23409 12.9539 9.08486 12.6761 8.85746 12.5061Z",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})})}const ia={n:"_n_euuvm_1"};let Ne={},De=[];const aa=(e,t)=>{switch(t.type){case"open":return{...e,open:t.open};case"view":return{...e,view:e.view===t.view?null:t.view};case"add":return{...e,news:[...e.news,t.data],active:!0};case"news":return{...e,news:t.data,active:t.data.length!==0};case"hide":let r=e.news.filter(a=>a.id!==t.id);return{...e,news:r,active:r.length!==0};case"size":return{...e,size:t.size};case"take":let i={[t.list]:t.take};i={...e.take,...i},e.active=!1;for(let a in i)i[a]!=="999"&&(e.active=!0);return Ne.get(i,e.active),{...e,take:i,active:e.active};case"exit":return e;default:throw new Error}};function oa(e){Ne.fn({action:"add",data:e})}function sa(e){Ne.fn({action:"add",data:e})}function la(e){Ne.fn({action:"new",data:e})}function da(e){Ne.fn=e}function ca(){const[e,t]=b.useReducer(aa,{open:!1,active:!1,news:[],take:{}});We.useListener("bell",async i=>{}),da(async i=>{switch(i.action){case"add":De.push(i.data);break}}),b.useEffect(()=>{(async()=>{let i=await We.Send({type:"module",module:"M00",query:"x0054",array:["M01","M02"]});for(let a in i)switch(a){case"news":t({type:"news",data:i.news});break;case"M01":i[a].forEach(o=>{De.push({module:"M01",type:1,id:o.id,datetime:new Date(o.tDate).getTime(),txt:o.p01})});break;case"M02":i[a].forEach(o=>{De.push({module:"M02",type:117,id:o.id,datetime:new Date(o.tDate).getTime(),txt:o.p01})});break}})(),setInterval(()=>{De.forEach((i,a)=>{t({type:"add",data:{module:i.module,type:i.type,id:i.id,datetime:i.datetime,txt:i.title}}),i.datetime<new Date().getTime()&&De.splice(a,1)})},6e4)},[]);let r=async i=>{t({type:"hide",id:i.id})};return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:ia.n,onClick:()=>{t({type:"open",open:!0})},children:e.active?n.jsx(na,{}):n.jsx(ta,{})}),e.open?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"notify-o",onClick:()=>{t({type:"open",open:!1})}}),n.jsxs("div",{className:"notify-m",children:[n.jsx("div",{className:"notify-l",children:e.news.map((i,a)=>n.jsx(ua,{data:i,dispatch:t},a))}),n.jsx("div",{className:"notify-b",onClick:r,children:"История"})]})]}):""]})}const ua=({data:e,dispatch:t})=>{let r=async i=>{t({type:"hide",id:i.id}),await We.Send({type:"module",module:"M00",query:"x0055",data:{id:i.id,type:i.type,db:i.db}})};return n.jsxs("div",{className:"notify-i",children:[n.jsx("div",{className:"--icon","data-icon":e.type}),n.jsxs("div",{className:"--body",children:[n.jsx("div",{className:"--name",children:e.type}),n.jsx("div",{className:"--text",children:e.txt})]}),n.jsx("div",{className:"--hide","data-icon":"F038",onClick:()=>r(e),children:" "})]})},fa="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2xldCBhPVtdLHM9bnVsbDtvbmNvbm5lY3Q9ZnVuY3Rpb24obCl7dmFyIHQ9bC5zb3VyY2U7YS5wdXNoKHQpO2NvbnN0IG49ZT0+e3MhPT1udWxsJiZzLnJlYWR5U3RhdGU9PT0xP3Muc2VuZChKU09OLnN0cmluZ2lmeShlKSk6dC5wb3N0TWVzc2FnZSh7dHlwZToibm9TZW5kIn0pfTtsZXQgcj1lPT57aWYocyE9PW51bGwmJnMucmVhZHlTdGF0ZT09PTEpcmV0dXJuIHQucG9zdE1lc3NhZ2Uoe3R5cGU6InRydWUifSk7ZS5say5hZGRyZXNzPT09ImxvY2FsaG9zdCI/cz1uZXcgV2ViU29ja2V0KGB3czovL2xvY2FsaG9zdDoke2UubGsuc29ja2V0KzF9YCk6cz1uZXcgV2ViU29ja2V0KCJ3c3M6Ly8iK2UubGsuYWRkcmVzcysiOiIrKGUubGsuc29ja2V0KzEpKSxzLm9uZXJyb3I9KCk9PnQucG9zdE1lc3NhZ2Uoe3R5cGU6ImVycm9yIn0pLHMub25vcGVuPSgpPT57bih7dHlwZToiY29ubmVjdCIsdWtleTplLnVrZXl9KX0scy5vbm1lc3NhZ2U9bz0+e2xldCBjPUpTT04ucGFyc2Uoby5kYXRhKTthLmZvckVhY2goZD0+e2QucG9zdE1lc3NhZ2UoYyl9KX0scy5vbmNsb3NlPSgpPT50LnBvc3RNZXNzYWdlKHt0eXBlOiJjbG9zZWQifSl9O3Qub25tZXNzYWdlPWZ1bmN0aW9uKGUpe3N3aXRjaChlLmRhdGEudHlwZSl7Y2FzZSJsZW5ndGgiOnJldHVybiB0LnBvc3RNZXNzYWdlKGEubGVuZ3RoKTtjYXNlImFsbCI6cmV0dXJuIGEuZm9yRWFjaChvPT5vLnBvc3RNZXNzYWdlKHthbGw6YS5sZW5ndGh9KSk7Y2FzZSJzZW5kIjpyZXR1cm4gbihlLmRhdGEuanNvbik7Y2FzZSJjb25uZWN0IjpyZXR1cm4gcihlLmRhdGEpO2RlZmF1bHQ6dC5wb3N0TWVzc2FnZSh7dHlwZToiZGVmYXVsdCIsZGF0YTplLmRhdGEuanNvbn0pfX19fSkoKTsK";function pa(e){return new SharedWorker("data:text/javascript;base64,"+fa,{name:e==null?void 0:e.name})}function xa(e){let t={},r={};e.data.forEach(a=>{t[a.id]={s:a.v,n:a.a},r[a.id]=a});let i={...he(),901:t};$t(r),Ee(i)}let ne={},Y={},qe=["filter","online","users","company","select","setting","info","job"];function ha(){const[e,t]=b.useState(!1),[r,i]=b.useState(!1);function a(o){const l=new pa;ne.laodData=d=>{let c=qe.indexOf(d);c>=0&&qe.splice(c,1),qe.length===0&&t(!0)},ne.send=d=>{l.port.postMessage({type:"send",json:d})},l.port.onmessage=d=>{let c=d.data;c.type==="error"&&i(!0),c.type==="true"&&t(!0),c.type==="closed"&&l.port.postMessage({type:"connect",ukey:o,lk:Xe()}),qe.length!==0&&ne.laodData(c.type),Y[c.type]&&Y[c.type](c)},l.port.postMessage({type:"connect",ukey:o,lk:Xe()})}return[a,e,r]}Y.module=e=>{ne[e.listen]!==void 0&&(ne[e.listen](e),delete ne[e.listen])},Y.bell=la,Y.company=xa,Y.info=e=>{let t={};t.db=e.db,t.id=e.data.id,t.job=e.data.job,t.login=e.data.login,t.name=e.data.p02,t.patronymic=e.data.p03,t.surname=e.data.p01,t.email=e.data.email,t.admin=e.data.menu.includes("99"),Nt(t),Tt(e.data.menu)},Y.version=async e=>{Re.version.Server(e.data)},Y.online=async e=>{},Y.offline=async e=>{},Y.chat=e=>{switch(e.data.action){case"new_message":se.getModule();break;case"view_message":se.getModule();break;case"write_message":se.getModule();break}},Y.users=e=>{let t={};e.data.forEach(i=>{let a=i.p01+" "+i.p02+" "+i.p03,o=i.p01+" "+i.p02.substring(0,1)+"."+i.p03.substring(0,1)+".",l=i.p01.substring(0,1)+""+i.p02.substring(0,1)+i.p03.substring(0,1);t[i.id]={id:i.id,admin:i.m.includes("99"),ava:JSON.parse(i.a),job:i.j,login:"",online:{time:i.o,status:0},sts:i.s,nameFull:a,name:o,number:l}});let r={...he(),user:t};Ee(r)},Y.api=e=>{let t={};e.data.forEach(r=>{t[r.api]={key:r.key,p01:r.p01,p02:r.p02}})},Y.delete=()=>{V()},Y.select=e=>{let t={...he()};e.data.forEach(r=>{t[r.n]=JSON.parse(r.s)}),Ee(t)},Y.job=e=>{let t={...he()},r={};Object.keys(e.data).forEach(i=>{r[i]={s:1,n:e.data[i]}}),t[1]=r,Ee(t)},Y.setting=e=>{fr(e.data)},Y.app=()=>{};const ga=(e,t)=>{ne[e]=t},ma=(e,t)=>{ne[e](t)};function _a(e){let t="_"+String(Math.random()).substring(2,7);return new Promise(r=>{ne[t]=i=>{i.error!==void 0?r({error:i.error}):r(i.data),delete ne[t]},e={...e,listen:t},e.type="modules",ne.send(e)})}const We={useConnect:ha,useListener:ga,setListener:ma,Send:_a};class ba{constructor(t="el",r="db"){jt(this,"storeName");jt(this,"_dbp");this.storeName=r,this._dbp=new Promise((i,a)=>{const o=indexedDB.open(t,1);o.onerror=()=>a(o.error),o.onsuccess=()=>i(o.result),o.onupgradeneeded=()=>{o.result.createObjectStore(r)}})}_withIDBStore(t,r){return this._dbp.then(i=>new Promise((a,o)=>{const l=i.transaction(this.storeName,t);l.oncomplete=()=>a(),l.onabort=l.onerror=()=>o(l.error),r(l.objectStore(this.storeName))}))}}let ft,O={};const je=()=>(ft||(ft=new ba),ft),xe=(e,t,r=je())=>r._withIDBStore("readwrite",i=>{O[e]=t,i.put(N.enCode(t),e)}),ae=(e,t=je())=>O[e]===void 0?new Promise((r,i)=>{let a;t._withIDBStore("readonly",o=>{a=o.get(e)}).then(()=>{if(a.result!==void 0){let o=N.deCode(a.result);O[e]=o,r(o)}else r({})})}):O[e],va=(e,t=je())=>t._withIDBStore("readwrite",r=>{r.delete(e)}),pt=(e=je())=>e._withIDBStore("readwrite",t=>{t.clear()}),ya={id:async(e,t,r)=>{let i=await ae(t);if(r!==void 0)r({type:"load",base:i});else return i[e]},get:ae,set:xe,add:async(e,t,r,i)=>{let a,o;o=await ae(r),o[e.id]=e,await xe(r,o),a!==null&&(a=await ae(t),a[e.id]=e.eDate,await xe(t,a)),i!==void 0&&i({type:"load",page:a,base:o})},del:va,upd:(e,t,r,i=je())=>{if(O[e]===void 0)return new Promise((a,o)=>{let l;i._withIDBStore("readonly",d=>{l=d.get(e)}).then(()=>{if(l.result!==void 0){let d=N.deCode(l.result);O[e]=d,O[e][t.id]={...O[e][t.id],...t.data},i.put(N.enCode(O[e]),e),a({})}else a({})})});if(O[e][t.id]!==void 0)return O[e][t.id]={...O[e][t.id],...t.data},r!==void 0&&O[r]!==void 0?O[r][t.id]!==void 0&&(O[r][t.id]=t.data.eDate):O[r]=[],delete O[e][t.id].$_item,delete O[e][t.id].$_send,i._withIDBStore("readwrite",a=>{a.put(N.enCode(O[e]),e),r!==void 0&&a.put(N.enCode(O[r]),r)})},key:(e=je())=>{const t=[];return e._withIDBStore("readonly",r=>{(r.openKeyCursor||r.openCursor).call(r).onsuccess=function(){this.result&&(t.push(this.result.key),this.result.continue())}}).then(()=>t)},load:e=>O[e],split:(e,t,r=[],i={})=>{let a=r.length!==0,o=[],l=i.sort,d=Object.keys(i).length!==0,c=Object.keys(i),u=Object.keys(e),f=[],p=x=>{let g="";if(r.forEach(v=>{g+=t[x][v]}),d){let v={};c.forEach(_=>{v[_]=t[x][_]});for(let _ in l)t[x][l[_]]===void 0&&(pt(),location.reload()),_==="s1"&&(v[_]=new Date(t[x][l[_]]).getTime()),_==="s2"&&(v[_]=t[x][l[_]]),_==="s3"&&(v[_]=t[x][l[_]].replace(/[^a-zа-яё]/gi,"").substring(0,1));o.push({id:x,text:g,...v})}else o.push({id:x,text:g})},m=x=>{};return u.forEach(x=>{f.push(t[x])}),f.forEach(x=>{x===void 0?(pt(),location.reload()):(a&&p(x.id),d&&m(x.id))}),{list:f,search:o,filter:i}},clear:pt,updAll:async(e,t,r,i)=>{let a=await ae(t),o=await ae(r);for(let l in e)o[l]=e[l],a[l]=e[l].eDate;await xe(t,a),await xe(r,o),i!==void 0&&i({type:"load",page:a,base:o})},delAll:async(e,t,r,i)=>{let a=await ae(t),o=await ae(r);e.forEach(l=>delete a[l]),await xe(t,a),i!==void 0&&i({type:"load",page:a,base:o})},delList:async(e,t,r)=>{let i=await ae(t);e.forEach(a=>delete i[a]),await xe(t,i)},addList:async(e,t,r)=>{let i=await ae(t);e.forEach(a=>i[a.id]=a.eDate),await xe(t,i)}},wa={setSetting:pr,getSetting:xr},ka={s:"_s_18bde_1",loadingB:"_loadingB_18bde_1",ul:"_ul_18bde_31"};function ja({children:e}){return n.jsx("ul",{className:H.ul,children:e})}function Ca(e,t){switch(t.type){case"load":return{...e,load:t.load,wait:!1,item:1,data:t.data,list:t.data[1],size:Object.keys(t.data).length};case"update":let r=Object.keys(e.data).length,i=e.item+1;return i=r<i?1:i,e.item===i?e:{...e,wait:e.size===i,item:i,list:[...e.list,...e.data[i]]};case"clear":return{load:!1,list:[],data:{},item:1,wait:!1,size:0};default:throw new Error}}function Sa({list:e,load:t,className:r,...i}){const a=b.useRef(null),[o,l]=b.useReducer(Ca,{load:!1,list:[],data:{},item:1,wait:!1,size:0});b.useEffect(()=>{a.current.scrollTop=0,e!==null&&l({type:"load",load:!0,data:e})},[t]);let d=()=>{a.current.scrollHeight-a.current.scrollTop-300<=a.current.clientHeight&&!o.wait&&l({type:"update"})};return n.jsx("div",{className:[ka.s,r].join(" "),ref:a,onScroll:d,children:n.jsx(ja,{"el-empty":"Данные не найдены",children:o.load&&o.list!==void 0?o.list.map(c=>n.jsx(i.item,{data:c},c.id)):n.jsxs("div",{"data-load":"load",children:[n.jsx("i",{}),n.jsx("i",{}),n.jsx("i",{})]})})})}const Ea=({label:e,onValue:t,value:r,name:i,item:a})=>{const[o,l]=b.useState(!!r);b.useEffect(()=>{l(!!r)},[r]);let d=()=>{let c=parseInt(o)===0?1:0;l(c),t({value:c,name:i,key:a,item:a})};return n.jsx("div",{role:"switch",onClick:d,"aria-checked":`${o?"true":"false"}`})},ye={};function Ba(e){const[t,r]=b.useState({}),i=b.useRef(e);ye.u=o=>{i.current={...i.current,[o.name]:o.value}},ye.r=()=>{r(Date.now())};const a=o=>{i.current[o.name]=o.value,o.reload&&ye.r()};return[i.current,a]}function Ta(e){ye.u(e),e.reload&&ye.r()}function Ia(){ye.r&&ye.r()}const $a={Color:Gt,Date:nt,Code:Ht,Check:rn,Switch:Wt,Button:Zt,Message:Ut,Generator:Yt,Captcha:Kt,Modal:it,Money:at,Month:Xt,Notes:Jt,Number:ot,Password:Qt,Phone:st,Search:en,Select:lt,Set:ut,Textarea:tn,Time:nn,Users:ct,String:dt,Form:ut,runReload:Ia,useData:Ba,setValue:Ta,Palette:Ea,Toogle:an,Group:on,Options:sn},_n={spinner:"_spinner_1ul0m_1",l:"_l_1ul0m_75",loadingB:"_loadingB_1ul0m_1"};function Na(){return n.jsx("div",{className:_n.spinner,children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 483 484",children:n.jsx("path",{d:"M264,492a22.2,22.2,0,0,0,22-22V411a22.2,22.2,0,0,0-22-22H236a22.2,22.2,0,0,0-22,22v59a22.2,22.2,0,0,0,22,22Zm74-134a23.9,23.9,0,0,0-6,16,20.35,20.35,0,0,0,6,15l42,42q7,7,16,7,10,0,16-7l20-20a20.35,20.35,0,0,0,6-15,23.9,23.9,0,0,0-6-16l-42-42q-7-7-16-7-8,0-15,7ZM163,389a18.94,18.94,0,0,0,7-15q0-9-7-16l-20-20q-7-7-16-7-8,0-15,7L70,380q-7,7-7,16a18.94,18.94,0,0,0,7,15l20,20q7,7,16,7a18.94,18.94,0,0,0,15-7ZM112,237a22.2,22.2,0,0,0-22-22H31a21.17,21.17,0,0,0-15.5,6.5A21.17,21.17,0,0,0,9,237v28a21.17,21.17,0,0,0,6.5,15.5A21.17,21.17,0,0,0,31,287H90a22.2,22.2,0,0,0,22-22Zm358,50a22.2,22.2,0,0,0,22-22V237a22.2,22.2,0,0,0-22-22H411a22.2,22.2,0,0,0-22,22v28a22.2,22.2,0,0,0,22,22ZM163,142q7-7,7-15.5T163,111L121,69q-7-7-15-7-7,0-16,7L70,89q-7,7-7,16a18.94,18.94,0,0,0,7,15l42,42a18.94,18.94,0,0,0,15,7q10,0,16-7Zm269-22a20.35,20.35,0,0,0,6-15,23.9,23.9,0,0,0-6-16L412,69q-7-7-16-7-7,0-16,7l-42,42q-7,8-7,16t7,15l21,20a18.94,18.94,0,0,0,15,7q10,0,16-7Zm-168-9a22.06,22.06,0,0,0,15.5-6q6.5-6,6.5-16V30a21.17,21.17,0,0,0-6.5-15.5A21.17,21.17,0,0,0,264,8H236a21.17,21.17,0,0,0-15.5,6.5A21.17,21.17,0,0,0,214,30V89q0,10,6.5,16a22.06,22.06,0,0,0,15.5,6Z",transform:"translate(-9 -8)"})})})}function Da(){return n.jsxs("div",{className:_n.l,children:[n.jsx("i",{}),n.jsx("i",{}),n.jsx("i",{})]})}const Ma={Spinner:Na,Inline:Da},bn={s:"_s_t9swc_1"};let xt;function za({className:e,placeholder:t}){let r=l=>{xt(l.target.textContent)},i=l=>{l.key==="Enter"&&l.preventDefault()},a=l=>{l.preventDefault(),navigator.clipboard.readText().then(d=>{window.document.execCommand("insertText",!1,d)}).catch(d=>{})};const o={};return t&&(o.placeholder=t),o.className=e?[bn.s,e].join(" "):bn.s,n.jsx("div",{onPaste:a,onInput:r,onKeyDown:i,contentEditable:"true",...o,suppressContentEditableWarning:!0})}function Fa(e,t,r){let i=[],a=1,o=0,l={},d=50;return l[a]=[],e.forEach(c=>{c.text.toLowerCase().indexOf(t)>-1&&i.push(c.id)}),i.forEach(c=>{o++,o<=d||(a++,o=1,l[a]=[]),l[a].push(r[c])}),l}function Pa(e){xt=e}function Ra(e){xt=e}const Oa={Field:za,Run:Fa,Get:Pa,useValue:Ra},La={f:"_f_q3r0i_1"};let J={};function Aa(e,t){switch(t.type){case"open":return{...e,open:t.open};case"view":return{...e,view:e.view===t.view?null:t.view};case"data":let r={};return Object.keys(t.data).forEach(a=>{a!=="sort"&&(r[a]=t.data[a],e.take[a]="999")}),{...e,data:r,take:e.take};case"size":return{...e,size:t.size};case"take":let i={[t.list]:t.take};i={...e.take,...i},e.active=!1;for(let a in i)i[a]!=="999"&&(e.active=!0);return J.get(i,e.active),{...e,take:i,active:e.active};case"exit":for(let a in e.take)e.take[a]="999";return J.get&&J.get([],!1),{...e,size:0,active:!1,take:e.take,open:!1};default:throw new Error}}function qa(){const[e,t]=b.useReducer(Aa,{open:!1,view:null,data:{},take:{},size:0,active:!1});return J.set=r=>{t({type:"data",data:r})},J.count=r=>{t({type:"size",size:r})},J.reset=()=>{t({type:"exit"})},n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:La.f,onClick:()=>{t({type:"open",open:!0})},children:[n.jsx(ra,{}),e.active&&n.jsxs("i",{children:[e.size,"1"]})]}),e.open?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"filter o",onClick:()=>{t({type:"open",open:!1})}}),n.jsxs("div",{className:"filter m",children:[n.jsx("div",{className:"filter l",children:Object.keys(e.data).map(r=>n.jsx(Ka,{data:r,dispatch:t,state:e},r))}),n.jsx("div",{className:"filter b",onClick:()=>{t({type:"exit"})},children:"Убрать фильтер"})]})]}):n.jsx(n.Fragment,{})]})}function Wa(e){J.get=e}function Za(e){J.set!==void 0&&J.set(e)}function Ua(e){J.reset!==void 0&&J.reset(e)}function Ya(e,t,r,i){let a=[],o=1,l=0,d={},c=50;return d[o]=[],i===!0&&(Object.keys(t).forEach(u=>{Number.parseInt(t[u])!==999&&(e=e.filter(f=>Number.parseInt(f[u])===Number.parseInt(t[u])))}),vn(e.length)),e.forEach(u=>{a.push(u.id)}),a.forEach(u=>{l++,l<=c||(o++,l=1,d[o]=[]),d[o].push(r[u])}),d}function vn(e){J.count(e)}function Ka({data:e,state:t,dispatch:r}){let i=()=>{r({type:"view",view:e})},a=()=>{r({type:"take",list:e,take:"999"})};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"filter s",children:[n.jsxs("div",{onClick:i,children:[" ",t.data[e].name," "]}),t.take[e]!=="999"?n.jsx("div",{onClick:a,className:"filter x","data-icon":"F038"}):""]}),n.jsx("div",{className:"filter u","set-active":(t.view===e)+"",children:Object.keys(t.data[e].list).map((o,l)=>n.jsx(Ha,{data:t.data[e].list[o],head:e,type:o,dispatch:r,state:t},l))})]})}function Ha({data:e,head:t,state:r,dispatch:i,type:a}){if(a!=="999"&&e.count===void 0)return"";const o=()=>{i({type:"take",list:t,take:a})};return n.jsxs("div",{className:"filter a",onClick:o,"set-active":(r.take[t]===a)+"",children:[e.name,n.jsx("div",{className:"filter e",children:e.count})]})}const Ga={Button:qa,useValue:Wa,Set:Za,Run:Ya,Count:vn,Reset:Ua},Va={Bell:ca,Send:sa,Add:oa};function Xa({active:e,onActive:t,id:r,name:i}){const[a,o]=b.useState(!!e);b.useEffect(()=>{o(!!e)},[e]);let l=()=>{let d=parseInt(a)===0?1:0;o(d),t&&t({value:d,name:i,id:r})};return n.jsx("div",{role:"switch",onClick:l,"aria-checked":`${a?"true":"false"}`})}const Ja={sort:"_sort_1yrvt_1"};let Ze={};function Qa(e,t){switch(t.type){case"active":let r="<";return e.active===t.data&&(r=e.sort==="<"?">":"<"),Ze.get({active:t.data,sort:r},!1),It({active:t.data,sort:r}),{...e,active:t.data,sort:r};default:throw new Error}}function eo(){const[e,t]=b.useReducer(Qa,Je()===void 0?{active:1,sort:"<"}:Je());return n.jsxs("div",{className:Ja.sort,children:[n.jsx("i",{"data-color":e.active===1?"_506290":"_b5b9cc","data-icon":e.active===1?e.sort==="<"?"F073":"F072":"F071",onClick:()=>t({type:"active",data:1})}),n.jsx("i",{"data-color":e.active===2?"_506290":"_b5b9cc","data-icon":e.active===2?e.sort==="<"?"F066":"F067":"F074",onClick:()=>t({type:"active",data:2})}),n.jsx("i",{"data-color":e.active===3?"_506290":"_b5b9cc","data-icon":e.active===3?e.sort==="<"?"F068":"F069":"F070",onClick:()=>t({type:"active",data:3})})]})}function to(e){Ze.get=e}function no(e){Ze.set(e)}function ro(e,t,r){let i=1,a=0,o={},l=50;o[i]=[];let d={},c="s1a";switch(d.s1a=(u,f)=>f.s1-u.s1,d.s1d=(u,f)=>u.s1-f.s1,d.s2a=(u,f)=>u.s2-f.s2,d.s2d=(u,f)=>f.s2-u.s2,d.s3a=(u,f)=>u.s3.localeCompare(f.s3),d.s3d=(u,f)=>f.s3.localeCompare(u.s3),r.active){case 1:c=r.sort===">"?"s1d":"s1a";break;case 2:c=r.sort===">"?"s2d":"s2a";break;case 3:c=r.sort===">"?"s3d":"s3a";break}return t.sort(d[c]).forEach(u=>{a++,a<=l||(i++,a=1,o[i]=[]),o[i].push(e[u.id])}),{data:o}}function io(e){Ze.count(e)}const ao={Init:eo,useValue:to,Set:no,Run:ro,Count:io};B.Action=cn,B.Alert=Gi,B.Api=qr,B.Button=qt,B.Component=Hi,B.DataBase=ya,B.Events=Le,B.Filter=Ga,B.Form=$a,B.Format=pe,B.Icon=ea,B.Init=Ri,B.Input=ln,B.Loading=Ma,B.Modal=rt,B.Notice=Ae,B.Notifications=Va,B.Router=se,B.Scrolling=Sa,B.Search=Oa,B.Setting=Ki,B.Sistym=Re,B.Socket=We,B.Store=oe,B.Switch=Xa,B.Tabs=dn,B.Telegram=S,B.Triage=ao,B.User=wa,Object.defineProperty(B,Symbol.toStringTag,{value:"Module"})});
31
+ <%s key={someKey} {...props} />`,kt,we,No,we),An[we+kt]=!0}}return s===i?Eo(Z):So(Z),Z}}function Bo(s,h,w){return qn(s,h,w,!0)}function To(s,h,w){return qn(s,h,w,!1)}var Io=To,$o=Bo;Te.Fragment=i,Te.jsx=Io,Te.jsxs=$o}()),Te}process.env.NODE_ENV==="production"?Qe.exports=Wr():Qe.exports=Zr();var n=Qe.exports;const Lt={notice:"_notice_q5jau_1",error:"_error_q5jau_10",success:"_success_q5jau_13",warning:"_warning_q5jau_16",copy:"_copy_q5jau_19","show-notice":"_show-notice_q5jau_1","hide-notice":"_hide-notice_q5jau_1"};let ue={};function Ur(){let[e,t]=b.useState([]);return ue.set=r=>{t([...e,r])},ue.del=r=>{t(e.filter(i=>i.key!==r))},e.length===0?"":n.jsx("ul",{className:Lt.notice,children:e.map(r=>r.item)})}function Ie({data:e}){let[t,r]=b.useState("show");b.useEffect(()=>{setTimeout(function(){r("hide")},1800),setTimeout(function(){ue.del(e.key)},2500)},[e.key]);let i;switch(e.type){case"error":i=n.jsx(ge.error,{});break;case"success":i=n.jsx(ge.success,{});break;case"copy":i=n.jsx(ge.success,{});break;case"remark":i=n.jsx(ge.success,{});break;default:i=n.jsx(ge.success,{});break}return n.jsxs("li",{className:"item "+Lt[e.type],"data-status":t,children:[i,n.jsx("p",{children:e.text})]})}function Yr(e){let t=Date.now(),r={key:t,...e};ue.set({item:n.jsx(Ie,{data:r},t),key:t})}function Kr(e){let t=Date.now(),r={key:t,text:e,type:"error"};ue.set({item:n.jsx(Ie,{data:r},t),key:t})}function Hr(e){let t=Date.now(),r={key:t,text:e,type:"success"};ue.set({item:n.jsx(Ie,{data:r},t),key:t})}function Gr(e){let t=Date.now(),r={key:t,text:e,type:"remark"};ue.set({item:n.jsx(Ie,{data:r},t),key:t})}function Vr(e){let t=Date.now(),r={key:t,text:e,type:"copy"};ue.set({item:n.jsx(Ie,{data:r},t),key:t})}const ge={};ge.error=()=>n.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[n.jsx("path",{d:"M12 22C7.28595 22 4.92893 22 3.46447 20.5355C2 19.0711 2 16.714 2 12C2 7.28595 2 4.92893 3.46447 3.46447C4.92893 2 7.28595 2 12 2C16.714 2 19.0711 2 20.5355 3.46447C22 4.92893 22 7.28595 22 12C22 16.714 22 19.0711 20.5355 20.5355C19.0711 22 16.714 22 12 22Z",fill:"#fff"}),n.jsx("path",{d:"M8.96967 8.96967C9.26256 8.67678 9.73744 8.67678 10.0303 8.96967L12 10.9394L13.9697 8.96969C14.2626 8.6768 14.7374 8.6768 15.0303 8.96969C15.3232 9.26258 15.3232 9.73746 15.0303 10.0303L13.0607 12L15.0303 13.9697C15.3232 14.2625 15.3232 14.7374 15.0303 15.0303C14.7374 15.3232 14.2625 15.3232 13.9696 15.0303L12 13.0607L10.0304 15.0303C9.73746 15.3232 9.26258 15.3232 8.96969 15.0303C8.6768 14.7374 8.6768 14.2626 8.96969 13.9697L10.9394 12L8.96967 10.0303C8.67678 9.73744 8.67678 9.26256 8.96967 8.96967Z",fill:"#bb2014"})]}),ge.success=()=>n.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[n.jsx("path",{d:"M12 22C7.28595 22 4.92893 22 3.46447 20.5355C2 19.0711 2 16.714 2 12C2 7.28595 2 4.92893 3.46447 3.46447C4.92893 2 7.28595 2 12 2C16.714 2 19.0711 2 20.5355 3.46447C22 4.92893 22 7.28595 22 12C22 16.714 22 19.0711 20.5355 20.5355C19.0711 22 16.714 22 12 22Z",fill:"#fff"}),n.jsx("path",{d:"M16.0303 8.96967C16.3232 9.26256 16.3232 9.73744 16.0303 10.0303L11.0303 15.0303C10.7374 15.3232 10.2626 15.3232 9.96967 15.0303L7.96967 13.0303C7.67678 12.7374 7.67678 12.2626 7.96967 11.9697C8.26256 11.6768 8.73744 11.6768 9.03033 11.9697L10.5 13.4393L14.9697 8.96967C15.2626 8.67678 15.7374 8.67678 16.0303 8.96967Z",fill:"#367738"})]});const et={alerts:"_alerts_1pds5_1",menuAnimation:"_menuAnimation_1pds5_1",menuItemAnimation:"_menuItemAnimation_1pds5_1","--body":"_--body_1pds5_103",allert:"_allert_1pds5_111","--form":"_--form_1pds5_111",al:"_al_1pds5_1"};let $e={};function Xr(){let[e,t]=b.useState("");return $e.set=r=>t(r),$e.del=()=>t(""),n.jsx(n.Fragment,{children:e})}const Jr=({data:e,callback:t})=>(e.button=e.button===void 0?"Подтвердить":e.button,n.jsxs("div",{className:et.alerts,children:[n.jsxs("dl",{children:[n.jsx("dt",{children:e.title}),n.jsx("dd",{children:e.text}),n.jsx("ul",{children:n.jsx("button",{"data-color":e.color||"blue",onClick:()=>{t(),$e.del()},children:e.button})})]}),n.jsx("div",{className:et["--body"],onClick:$e.del})]}));function Qr(e,t){$e.set(n.jsx(Jr,{data:e,callback:t}))}const At={btn:"_btn_1hz2s_6",confirm:"_confirm_1hz2s_19"};function qt({onClick:e,onSend:t,label:r,onRef:i}){let[a,o]=b.useState(!1);const l=()=>{if(e)return e();a||(o(!0),t&&t(o))};return n.jsx("button",{ref:i,className:[At.btn,At.confirm].join(" "),onClick:l,children:a?"Ожидайте":r})}const ee={white:"_white_11p39_14",black:"_black_11p39_26",shake:"_shake_11p39_1",modal:"_modal_11p39_73",o:"_o_11p39_83",w:"_w_11p39_14",h:"_h_11p39_107",l:"_l_11p39_121",t:"_t_11p39_159",m:"_m_11p39_73",x:"_x_11p39_167",s:"_s_11p39_177",c:"_c_11p39_182",f:"_f_11p39_187",btn:"_btn_11p39_230",g:"_g_11p39_243","size-a":"_size-a_11p39_296","size-s":"_size-s_11p39_300","size-m":"_size-m_11p39_304","size-l":"_size-l_11p39_308","size-x":"_size-x_11p39_312","size-f":"_size-f_11p39_316",confirm:"_confirm_11p39_322",cancel:"_cancel_11p39_327",disabled:"_disabled_11p39_332",await:"_await_11p39_339",active:"_active_11p39_389",coincidence:"_coincidence_11p39_395",sa:"_sa_11p39_431",ss:"_ss_11p39_435",sm:"_sm_11p39_439",sl:"_sl_11p39_443",sx:"_sx_11p39_447",sf:"_sf_11p39_451"};let me={};function ei({config:e}){let[t,r]=b.useState([]);return me.x=i=>{i||r([])},me.config=e,me.add=i=>{r([...t,i])},n.jsx(n.Fragment,{children:t.map(i=>i)})}function ti({title:e,children:t,button:r,tabs:i,size:a="m",menu:o}){const[l,d]=b.useState(!0),c=b.useRef(),u=p=>{if(r){if(r.onClick)return p(!1),r.onClick({setOpen:d});if(r.onSend)return r.onSend({setOpen:d,disabled:p})}},f=()=>{c.current.setAttribute("shake",!0),setTimeout(()=>{c.current.setAttribute("shake",!1)},1e3)};return n.jsx(n.Fragment,{children:l?n.jsxs("div",{className:`${ee.modal} ${ee.white}`,children:[n.jsx("div",{className:ee.o,onClick:f}),n.jsxs("div",{className:[ee.w,ee[`s${a}`]].join(" "),ref:c,children:[n.jsxs("div",{className:ee.h,children:[n.jsx("div",{className:ee.t,children:e}),n.jsxs("div",{className:ee.m,children:[i&&n.jsx("nav",{children:i.map((p,m)=>n.jsx("span",{onClick:p.onClick,className:p.active?"active":"",children:p.name},m))}),o]}),n.jsx("div",{className:ee.x,onClick:()=>{d(!1)},children:n.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:n.jsx("path",{d:"M19.0005 4.99988L5.00045 18.9999M5.00045 4.99988L19.0005 18.9999",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),t,r!==void 0?n.jsx(qt,{label:r.label,onSend:u}):""]})]}):""})}function ni(e){me.add(n.jsx(ri,{children:e},String(Date.now())))}function ri({children:e}){return n.jsx(n.Fragment,{children:e})}function ii(e){if(e.target.classList[0]!=="modal")return;let t=e.target.children[0];t.setAttribute("shake",!0),setTimeout(()=>{t.setAttribute("shake",!1)},1e3)}function ai({type:e,name:t,params:r}){let[i,a]=b.useState(null);return b.useEffect(()=>{me.config(e,t,r,a)},[r.id]),n.jsx(n.Fragment,{children:i})}function oi(e,t){me.config(e,t)}function si(e){me.x(e)}const tt={};function li(e,t){tt[e]=t}function di(e,t){tt[e]!==void 0&&tt[e](t)}const fe={};function ci(e,t){const[r,i]=b.useState(t);return b.useEffect(()=>{if(fe[e])return fe[e].push(i);fe[e]=[i]},[]),[r]}function ui(e,t){if(fe[e])return fe[e].push(t);fe[e]=[t]}function fi(e,t){fe[e]&&fe[e].forEach(r=>r(t))}const Le={setListener:di,useListener:li,setEmitter:fi,useEmitter:ci,subEmitter:ui};function pi(){let[e,t]=b.useState([]);return Le.useListener("form",r=>{t([r])}),n.jsx(n.Fragment,{children:e.map(r=>r)})}const se={Path:ur,setPage:Qn,getPage:St,usePage:Jn,isPage:er,setModule:nr,getModule:Et,useModule:tr,isModule:rr,setTabs:ar,getTabs:Pe,useTabs:ir,isTabs:or,useId:sr,setId:dr,subId:lr,getId:Bt,isId:cr},Ae={Send:Yr,Error:Kr,Remark:Gr,Success:Hr,Copy:Vr},Wt=({onClick:e,active:t})=>(t=!!t,n.jsx("div",{role:"switch",onClick:()=>e,"aria-checked":`${t?"true":"false"}`}));function Zt({onClick:e,onSend:t,name:r,onRef:i}){let[a,o]=b.useState(!1);const l=()=>{if(e)return e();a||(o(!0),t&&t(o))};return n.jsx("button",{ref:i,"data-form":"button",className:a?"btn await":"btn confirm pointer",onClick:l,children:a?"Ожидайте":r})}function Ut({value:e,onValue:t,onActive:r,data:i,name:a,view:o,edit:l=!0,active:d=!0,placeholder:c="Введите сообщение"}){const u=b.useRef({value:e,timerId:null,shift:!1,send:!0}),f=()=>{u.current.value.length>0?u.current.send&&(r(!0),u.current.send=!1,u.current.timerId=setTimeout(()=>{u.current.send=!0},3e3)):r(!1)},p=y=>{u.current.value=y.target.textContent,f()},m=y=>{y.keyCode===16&&(u.current.shift=!0),y.keyCode===13&&!u.current.shift&&(y.preventDefault(),u.current.value.length!==0&&(y.target.textContent="",i&&i(u.current.value),t&&t(u.current.value),u.current.value="",r(!1)))},x=y=>{y.keyCode===16&&(u.current.shift=!1)},g=y=>{y.preventDefault(),navigator.clipboard.readText().then(k=>{window.document.execCommand("insertText",!1,k)}).catch(k=>{})},v=()=>{r(!1)},_={spellCheck:"true"};return c&&(_.placeholder=c),l&&d&&(_.contentEditable="plaintext-only"),n.jsx("dl",{"data-form":"message",children:n.jsx("dd",{onPaste:g,onInput:p,onKeyUp:x,onKeyDown:m,onBlur:v,..._,suppressContentEditableWarning:!0,children:e})})}function Yt(e){let t=()=>e.title?n.jsx("dt",{children:e.title}):"",r=e.edit!==void 0?e.edit:!0,i=e.active!==void 0?e.active:!0,a=e.placeholder!==void 0?e.placeholder:"",o=c=>{e.onValue({value:c.target.textContent,name:e.name})},l=c=>{c.key==="Enter"&&c.preventDefault()},d=c=>{c.preventDefault(),navigator.clipboard.readText().then(u=>{window.document.execCommand("insertText",!1,u)}).catch(u=>{})};return n.jsxs("dl",{"data-form":"input","type-data":"generator",children:[t(),n.jsx("dd",{onPaste:d,onInput:o,onKeyDown:l,contentEditable:r&&i?"plaintext-only":"false","data-placeholder":a,suppressContentEditableWarning:!0,children:e.value})]})}let _e={};_e.KeyDown=e=>{e.key==="Enter"&&e.preventDefault()},_e.PasteOne=e=>{e.preventDefault(),navigator.clipboard.readText().then(t=>{t=t.replace(/^\s*/,"").replace(/\s*$/,""),window.document.execCommand("insertText",!1,t)}).catch(t=>{})},_e.Focus=e=>{e.target.textContent.length===0&&(e.target.innerHTML="<br>")},_e.Blur=e=>{e.target.scrollLeft=0,e.target.querySelector("br")!==null&&e.target.querySelector("br").remove()};function Kt({value:e,onValue:t,placeholder:r="",name:i}){let a=(x,g)=>Number(Math.round(x+Math.random()*(g-x))),o=b.useRef(null),l=b.useRef(null),d=a(1e4,99999),c=x=>{x.key!=="Backspace"&&(x.key==="Enter"&&x.preventDefault(),x.target.textContent.length===5&&x.preventDefault(),/\d/.test(x.key)||x.preventDefault())},u=x=>{t({value:Number(x.target.textContent)===d,name:i})},f=x=>{x.preventDefault(),navigator.clipboard.readText().then(g=>{window.document.execCommand("insertText",!1,g.replace(/(\r\n|\n|\r)/gm," ").replace(/[^0-9]/g,"").substring(0,5))}).catch(g=>{})};b.useEffect(()=>{const x=o.current,g=x.getContext("2d");g.clearRect(0,0,x.width,x.height),g.font="30px brush script mt",g.fillStyle="#eee",g.textAlign="center",g.fillText(d,50,27),l.current.textContent=""},[d]);const p={};p.field="captcha";const m={};return r&&(m.placeholder=r),n.jsxs("dl",{...p,children:[n.jsx("dd",{ref:l,onPaste:f,onInput:u,onBlur:_e.Blur,onKeyDown:c,contentEditable:"plaintext-only",suppressContentEditableWarning:!0,...m}),n.jsx("canvas",{ref:o,width:"100",height:"35"})]})}function Ht(e){let t=()=>e.title?n.jsx("dt",{children:e.title}):"",r=()=>e.error?n.jsx("em",{children:e.error}):"",i={n1:"",n2:"",n3:"",n4:"",n5:"",n6:"",code:""},a=u=>{u.preventDefault(),u.target.textContent=u.target.textContent.slice(-1).replace(/[^+\d]/g,"");let f=window.getSelection(),p=u.target.textContent.length;if(i[u.target.id]=u.target.textContent,i.code=i.n1+""+i.n2+i.n3+i.n4+i.n5+i.n6,f.collapse(u.target.firstChild,1),p===0){u.target.blur(),u.target.focus();return}u.target.nextSibling!=null&&u.target.nextSibling.focus()},o=u=>{if(u.key==="Enter"&&u.preventDefault(),u.key==="Backspace"){if(u.preventDefault(),u.target.textContent="",i[u.target.id]="",u.target.previousSibling!=null){let f=u.target.previousSibling.id.slice(1);u.target.previousSibling.textContent="",i["n"+f]="",u.target.previousSibling.focus()}i.code=i.n1+""+i.n2+i.n3+i.n4+i.n5+i.n6}},l=u=>{if(e.real)e.onValue({value:i.code,name:e.name});else if(i.code.length===6&&(e.onValue({value:i.code,name:e.name}),e.empty)){i={n1:"",n2:"",n3:"",n4:"",n5:"",n6:"",code:""};for(let f=1;f<=6;f++){let p=document.getElementById("n"+f);p&&(p.textContent="")}}},d=u=>{u.target.textContent=""},c=u=>{u.preventDefault()};return n.jsxs("dl",{"data-form":"code",children:[t(),n.jsxs("div",{children:[n.jsx("dd",{id:"n1",onKeyDown:o,onKeyUp:l,onFocus:d,onPaste:c,onInput:a,contentEditable:!0}),n.jsx("dd",{id:"n2",onKeyDown:o,onKeyUp:l,onFocus:d,onPaste:c,onInput:a,contentEditable:!0}),n.jsx("dd",{id:"n3",onKeyDown:o,onKeyUp:l,onFocus:d,onPaste:c,onInput:a,contentEditable:!0}),n.jsx("dd",{id:"n4",onKeyDown:o,onKeyUp:l,onFocus:d,onPaste:c,onInput:a,contentEditable:!0}),n.jsx("dd",{id:"n5",onKeyDown:o,onKeyUp:l,onFocus:d,onPaste:c,onInput:a,contentEditable:!0}),n.jsx("dd",{id:"n6",onKeyDown:o,onKeyUp:l,onFocus:d,onPaste:c,onInput:a,contentEditable:!0})]}),r()]})}function Gt(e){let t=()=>e.title?n.jsx("dt",{children:e.title}):"",r=()=>e.error?n.jsx("em",{children:e.error}):"";e.edit!==void 0&&e.edit,e.active!==void 0&&e.active;let[i,a]=b.useState(e.value),o=l=>{let d=l.target.getAttribute("set-color");a(d),e.onValue({value:d,name:e.name})};return n.jsx(n.Fragment,{children:e.view==="icon"?n.jsx("i",{"data-icon":"F043"}):n.jsxs("dl",{children:[t(),n.jsxs("dd",{"el-val":i,children:[n.jsx("em",{onClick:o,"set-color":"0"}),n.jsx("em",{onClick:o,"set-color":"1"}),n.jsx("em",{onClick:o,"set-color":"2"}),n.jsx("em",{onClick:o,"set-color":"3"}),n.jsx("em",{onClick:o,"set-color":"4"}),n.jsx("em",{onClick:o,"set-color":"5"})]}),r()]})})}function xi(e,t){t===void 0?(t=e,e=new Date):e=new Date(e);let r={yyyy:e.getFullYear(),yy:(""+e.getFullYear()).slice(-2),mm:("0"+(e.getMonth()+1)).slice(-2),dd:("0"+e.getDate()).slice(-2),HH:("0"+e.getHours()).slice(-2),MM:("0"+e.getMinutes()).slice(-2),SS:("0"+e.getSeconds()).slice(-2),__:"      ",_:"    "};for(const i in r)t=t.replace(i,r[i]);return t}function hi(e){let t=["Января","Февраля","Марта","Апреля","Мая","Июня","Июля","Августа","Сентября","Октября","Ноября","Декабря"],r=new Date(e);return{day:(""+r.getFullYear()).slice(-2)+""+("0"+(r.getMonth()+1)).slice(-2)+("0"+r.getDate()).slice(-2),name:r.getDate()+" "+t[r.getMonth()]}}const gi=e=>{function t(T,$){var M,L,W;T=T??"",$=$??1;for(var M=[],W=0,L=T.length;W<L;)M.push(T.slice(W,W+=$));return M}function r(T,$){var M=[2,0,1,1,1,2];return $[T>4&&T<20?2:M[Math.min(T,5)]]}var i={null:"ноль",a1:["один","два","три","четыре","пять","шесть","семь","восемь","девять"],a2:["одна","две","три","четыре","пять","шесть","семь","восемь","девять"],a10:["десять","одиннадцать","двенадцать","тринадцать","четырнадцать","пятнадцать","шестнадцать","семнадцать","восемнадцать","девятнадцать"],a20:["двадцать","тридцать","сорок","пятьдесят","шестьдесят","семьдесят","восемьдесят","девяносто"],a100:["сто","двести","триста","четыреста","пятьсот","шестьсот","семьсот","восемьсот","девятьсот"],uc:["копейка","копейки","копеек"],ur:["рубль","рубля","рублей"],u3:["тысяча","тысячи","тысяч"],u2:["миллион","миллиона","миллионов"],u1:["миллиард","миллиарда","миллиардов"]},a,o,l,d,_,c,u,v,f,p,m,x;f=parseFloat(e).toFixed(2).split("."),c=f[0],d=f[1];var g=12-c.length;if(g<0)return!1;for(var v=[];g--;)v.push("0");c=v.join("")+c;var _=[];if(c>0){p=t(c,3);for(var y=-1;y<p.length;y++)if(u=p[y],u>0&&(m=t(u,1),a=parseInt(m[0]),o=parseInt(m[1]),l=parseInt(m[2]),_.push(i.a100[a-1]),x=y+1==3?"a2":"a1",o>1?_.push(i.a20[o-2]+(l>0?" "+i[x][l-1]:"")):_.push(o>0?i.a10[l]:i[x][l-1]),p.length>y+1)){var k=i["u"+(y+1)];_.push(r(u,k))}}else _.push(i.null);return _.push(r(c,i.ur)),_.push(d+" "+r(d,i.uc)),_.join(" ").replace(RegExp(" {2,}","g")," ").trimLeft()};function mi(e){let t=-1,r=[" kB"," MB"," GB"," TB","PB","EB","ZB","YB"];do e=e/1024,t++;while(e>1024);return Math.max(e,.1).toFixed(1)+r[t]}function _i(e){let t={};return t["application/atom+xml"]="atom",t["application/json"]="json",t["application/javascript"]="js",t["application/ogg"]="ogg",t["application/pdf"]="pdf",t["application/soap+xml"]="soap",t["application/font-woff"]="woff",t["application/xhtml+xml"]="xml",t["application/xml-dtd"]="dtd",t["application/xop+xml"]="xop",t["application/zip"]="zip",t["application/gzip"]="gzip",t["application/x-bittorrent"]="bittorrent",t["application/x-tex"]="tex",t["application/xml"]="xml",t["application/msword"]="doc",t["image/svg+xml"]="svg",t[e]}function bi(e,t,r,i){let a={sexM:"m",sexF:"f",gcaseIm:"nominative",gcaseNom:"nominative",gcaseRod:"genitive",gcaseGen:"genitive",gcaseDat:"dative",gcaseVin:"accusative",gcaseAcc:"accusative",gcaseTvor:"instrumentative",gcaseIns:"instrumentative",gcasePred:"prepositional",gcasePos:"prepositional",rules:{lastName:{exceptions:[" дюма,тома,дега,люка,ферма,гамарра,петипа,шандра . . . . ."," гусь,ремень,камень,онук,богода,нечипас,долгопалец,маненок,рева,кива . . . . ."," вий,сой,цой,хой -я -ю -я -ем -е"],suffixes:["f б,в,г,д,ж,з,й,к,л,м,н,п,р,с,т,ф,х,ц,ч,ш,щ,ъ,ь . . . . .","f ска,цка -ой -ой -ую -ой -ой","f ая --ой --ой --ую --ой --ой"," ская --ой --ой --ую --ой --ой","f на -ой -ой -у -ой -ой"," иной -я -ю -я -ем -е"," уй -я -ю -я -ем -е"," ца -a -е -у -ей -е"," рих а у а ом е"," ия . . . . ."," иа,аа,оа,уа,ыа,еа,юа,эа . . . . ."," их,ых . . . . ."," о,е,э,и,ы,у,ю . . . . ."," ова,ева -ой -ой -у -ой -ой"," га,ка,ха,ча,ща,жа -и -е -у -ой -е"," ца -и -е -у -ей -е"," а -ы -е -у -ой -е"," ь -я -ю -я -ем -е"," ия -и -и -ю -ей -и"," я -и -е -ю -ей -е"," ей -я -ю -я -ем -е"," ян,ан,йн а у а ом е"," ынец,обец --ца --цу --ца --цем --це"," онец,овец --ца --цу --ца --цом --це"," ц,ч,ш,щ а у а ем е"," ай -я -ю -я -ем -е"," гой,кой -го -му -го --им -м"," ой -го -му -го --ым -м"," ах,ив а у а ом е"," ший,щий,жий,ний --его --ему --его -м --ем"," кий,ый --ого --ому --ого -м --ом"," ий -я -ю -я -ем -и"," ок --ка --ку --ка --ком --ке"," ец --ца --цу --ца --цом --це"," в,н а у а ым е"," б,г,д,ж,з,к,л,м,п,р,с,т,ф,х а у а ом е"]},firstName:{exceptions:[" лев --ьва --ьву --ьва --ьвом --ьве"," павел --ла --лу --ла --лом --ле","m шота . . . . .","m пётр ---етра ---етру ---етра ---етром ---етре","f рашель,нинель,николь,габриэль,даниэль . . . . ."],suffixes:[" е,ё,и,о,у,ы,э,ю . . . . .","f б,в,г,д,ж,з,й,к,л,м,н,п,р,с,т,ф,х,ц,ч,ш,щ,ъ . . . . .","f ь -и -и . ю -и","m ь -я -ю -я -ем -е"," га,ка,ха,ча,ща,жа -и -е -у -ой -е"," ша -и -е -у -ей -е"," а -ы -е -у -ой -е"," ия -и -и -ю -ей -и"," я -и -е -ю -ей -е"," ей -я -ю -я -ем -е"," ий -я -ю -я -ем -и"," й -я -ю -я -ем -е"," б,в,г,д,ж,з,к,л,м,н,п,р,с,т,ф,х,ц,ч а у а ом е"]},middleName:{suffixes:[" ич а у а ем е"," на -ы -е -у -ой -е"]}},initialized:!1,init:function(){this.initialized||(this.prepareRules(),this.initialized=!0)},prepareRules:function(){for(var l in this.rules)for(var d in this.rules[l])for(var c=0,u=this.rules[l][d].length;c<u;c++)this.rules[l][d][c]=this.rule(this.rules[l][d][c])},rule:function(l){var d=l.match(/^\s*([fm]?)\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s*$/);return d?{sex:d[1],test:d[2].split(","),mods:[d[3],d[4],d[5],d[6],d[7]]}:!1},word:function(l,d,c,u){if(u===this.gcaseNom)return l;if(l.match(/[-]/)){for(var f=l.split("-"),p=0,m=f.length;p<m;p++)f[p]=this.word(f[p],d,c,u);return f.join("-")}if(l.match(/^[А-ЯЁ]\.?$/i))return l;this.init();var x=this.rules[c];let g;return x.exceptions&&(g=this.pick(l,d,u,x.exceptions,!0),g)?g:(g=this.pick(l,d,u,x.suffixes,!1),g||l)},pick:function(l,d,c,u,f){let p=l.toLowerCase();for(var m=0,x=u.length;m<x;m++)if(this.ruleMatch(p,d,u[m],f))return this.applyMod(l,c,u[m]);return!1},ruleMatch:function(l,d,c,u){if(c.sex===this.sexM&&d===this.sexF||c.sex===this.sexF&&d!==this.sexF)return!1;for(var f=0,p=c.test.length;f<p;f++){var m=u?l:l.substr(Math.max(l.length-c.test[f].length,0));if(m===c.test[f])return!0}return!1},applyMod:function(l,d,c){let u;switch(d){case this.gcaseNom:u=".";break;case this.gcaseGen:u=c.mods[0];break;case this.gcaseDat:u=c.mods[1];break;case this.gcaseAcc:u=c.mods[2];break;case this.gcaseIns:u=c.mods[3];break;case this.gcasePos:u=c.mods[4];break}for(var f=0,p=u.length;f<p;f++){var m=u.substr(f,1);switch(m){case".":break;case"-":l=l.substr(0,l.length-1);break;default:l+=m}}return l},getSex:()=>{if(a.mn.length>2)switch(a.mn.substr(a.mn.length-2)){case"ич":return"m";case"на":return"f"}return""},fullName:l=>((a.fullNameSurnameLast?"":a.lastName(l)+" ")+a.firstName(l)+" "+a.middleName(l)+(a.fullNameSurnameLast?" "+a.lastName(l):"")).replace(/^ +| +$/g,""),lastName:l=>a.word(a.ln,a.sex,"lastName",l),firstName:l=>a.word(a.fn,a.sex,"firstName",l),middleName:l=>a.word(a.mn,a.sex,"middleName",l)};if(typeof t>"u"){var o=e.match(/^\s*(\S+)(\s+(\S+)(\s+(\S+))?)?\s*$/);if(!o)return"Cannot parse supplied name";o[5]&&o[3].match(/(ич|на)$/)&&!o[5].match(/(ич|на)$/)?(e=o[5],t=o[1],r=o[3],a.fullNameSurnameLast=!0):(e=o[1],t=o[3],r=o[5])}return a.ln=e,a.fn=t||"",a.mn=r||"",a.sex=i||a.getSex(),a}function vi(e){let t=e.split(" ");switch(t.length){case 2:return t[0]+" "+t[1].substring(0,1)+".";case 3:return t[0]+" "+t[1].substring(0,1)+"."+t[2].substring(0,1)+".";default:return e}}function yi(e){return{1:{val:"01",name:"Январь",names:"Января",abc:"Янв"},2:{val:"02",name:"Февраль",names:"Февраля",abc:"Февр"},3:{val:"03",name:"Март",names:"Марта",abc:"Март"},4:{val:"04",name:"Апрель",names:"Апреля",abc:"Апр"},5:{val:"05",name:"Май",names:"Мая",abc:"Май"},6:{val:"06",name:"Июнь",names:"Июня",abc:"Июнь"},7:{val:"07",name:"Июль",names:"Июля",abc:"Июль"},8:{val:"08",name:"Август",names:"Августа",abc:"Авг"},9:{val:"09",name:"Сентябрь",names:"Сентебря",abc:"Сент"},10:{val:"10",name:"Октябрь",names:"Октября",abc:"Окт"},11:{val:"11",name:"Ноябрь",names:"Ноября",abc:"Нояб"},12:{val:"12",name:"Декабрь",names:"Декабря",abc:"Дек"}}[e]}function wi(e){return parseFloat(e).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g,"$1 ")}function ki(e,t){let r=t+"";for(;r.length<e;)r="0"+r;return r}function ji(e,t,r){let i=t/e*r;return(typeof i!="number"||i===1/0)&&(i=0),parseFloat(i).toFixed(1)}function Ci(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Si(e,t){e=Math.abs(e)%100;let r=e%10;return e>10&&e<20?t[2]:r>1&&r<5?t[1]:r===1?t[0]:t[2]}function Ei(e,t,r){return he(e,t)?he(e,t).n:r||""}function Bi(e,t){return e.reduce(function(r,i){let a=t instanceof Function?t(i):i[t];return r[a]!==void 0||(r[a]={}),r[a][i.id]=i,r},{})}function Ti(e){return parseInt((Date.now()-new Date(e).getTime())/31536e6+"")+""}const pe={Age:Ti,Date:xi,MoneyString:gi,DateSort:hi,Size:mi,TypeFiles:_i,Cases:bi,Initials:vi,Month:yi,Money:wi,Number:ki,Percent:ji,CapitalizeFirstLetter:Ci,DeclensionWord:Si,Select:Ei,ObjectByArray:Bi};function nt({label:e,value:t,placeholder:r,onValue:i,name:a}){const o="__.__.____",l=new Set("_"),d=(g=>Array.from(o,(v,_)=>l.has(v)?g=_+1:g))(0),c=[...o].findIndex(g=>l.has(g)),u=new RegExp("\\d","g"),f=g=>(g=g.match(u)||[],Array.from(o,v=>(g[0]===v||l.has(v))&&g.shift()||v)),p=g=>{const[v,_]=[g.target.selectionStart,g.target.selectionEnd].map(y=>(y=f(g.target.value.slice(0,y)).findIndex(k=>l.has(k)),y<0?d[d.length-1]:m?d[y-1]||c:y));g.target.value=f(g.target.value).join(""),g.target.setSelectionRange(v,_),m=!1,i==null||i({name:a,value:g.target.value})};let m=!1;const x={};return x.field="input",n.jsxs("dl",{...x,children:[n.jsx("dt",{}),n.jsx("dd",{children:n.jsx("input",{type:"tel",placeholder:r,onChange:p,inputMode:"numeric",onKeyDown:g=>m=g.key==="Backspace",onFocus:p,defaultValue:pe.Date(t,"dd.mm.yyyy"),onBlur:g=>g.target.value===o&&(g.target.value="")})})]})}function Ii({children:e}){return n.jsx("div",{className:"l",children:n.jsx("ul",{children:e})})}function $i({children:e}){return n.jsx("div",{className:ee.s,children:e})}function Ni({children:e,className:t}){let r={};return t&&(r.className=t),n.jsx("div",{"data-form":"outline",...r,children:n.jsx("ul",{children:e})})}function Di({children:e}){return n.jsx("div",{className:ee.c,children:e})}const rt={List:Ii,Scroll:$i,Main:ti,Add:ni,Icon:ai,Open:oi,Shake:ii,Form:Ni,Center:Di,Close:si};function it({value:e,onValue:t,name:r,placeholder:i="",title:a,error:o,hide:l=!1,edit:d=!0,show:c=!0,active:u=!0,after:f="",view:p,modal:m,module:x,options:g,className:v}){let[_,y]=b.useState(e),k=M=>{if(!(d&&u)||!m)return;let W=m.split(".");rt.Open(W[1],{callback:L=>{t&&t({value:L,name:r}),y(L)},onValue:t,options:g,name:r,value:e})};const T={};T.field="input",v&&(T.className=v);const $={};return i&&($.placeholder=i),l?n.jsx(n.Fragment,{}):n.jsxs("dl",{...T,children:[a&&n.jsx("dt",{children:a}),n.jsx("dd",{...$,onClick:k,edit:(d&&u)+"","data-after":f,children:_}),o&&n.jsx("em",{children:o})]})}function at(e){let t=e.value,r=p=>e.type==="multi"?p.replace(/[^+\d.+-]/g,""):p.replace(/[^+\d.]/g,""),i=(p,m)=>{let x=document.createRange(),g=window.getSelection();x.setStart(m.childNodes[0],p),x.collapse(!0),g.removeAllRanges(),g.addRange(x),m.focus()},a=p=>{e.onValue({value:r(p.target.textContent),name:e.name}),p.target.textContent=r(p.target.textContent),p.target.textContent.length>0&&i(p.target.textContent.length,p.target)},o=p=>{p.target.textContent===""&&(p.target.textContent=0),e.onValue({value:r(p.target.textContent),name:e.name}),p.target.textContent=pe.Money(p.target.textContent)},l=p=>{p.target.textContent=r(p.target.textContent)},d=p=>{p.key==="Enter"&&p.preventDefault()},c=p=>{p.preventDefault(),navigator.clipboard.readText().then(m=>{m=m.replace(/^\s*/,"").replace(/\s*$/,""),window.document.execCommand("insertText",!1,m)}).catch(m=>{})},u=()=>e.title?n.jsx("dt",{children:e.title}):"",f=()=>e.error?n.jsx("em",{children:e.error}):"";return n.jsxs("dl",{"data-form":"input",children:[u(),n.jsx("dd",{onInput:a,onPaste:c,onBlur:o,onKeyDown:d,onFocus:l,contentEditable:!0,suppressContentEditableWarning:!0,"e-after":e.after,children:pe.Money(t)}),f()]})}const Vt={o:"_o_1kqkq_1",c:"_c_1kqkq_11"};function Xt({value:e,onValue:t,name:r,view:i,error:a,edit:o=!0,active:l=!0,title:d,placeholder:c="",after:u}){let[f,p]=b.useState(e);b.useEffect(()=>{p(e)},[e]);let m=v=>{p(v),t&&t({value:v,name:r})},x=v=>{if(!o||!l)return;const _=v.target.getBoundingClientRect(),y=_.left,k=_.top;Le.setListener("form",n.jsx(Mi,{position:{x:y,y:k},onValue:m,date:f},new Date().getTime()))};const g={};return c&&(g.placeholder=c),n.jsx(n.Fragment,{children:i==="icon"?n.jsx("i",{"data-icon":"F043",onClick:x}):n.jsxs("dl",{children:[d&&n.jsx("dt",{children:d}),n.jsx("dd",{onClick:x,...g,children:pe.Date(f,"mm.yyyy")}),a&&n.jsx("em",{children:a})]})})}const Mi=e=>{let[t,r]=b.useState(!0),i=new Date,a=new Date(e.date),o={y:parseInt(i.getFullYear()),m:parseInt(i.getMonth())+1},l={y:parseInt(a.getFullYear()),m:parseInt(a.getMonth())+1},[d,c]=b.useState(l.y),u=()=>{r(!1)},f=()=>{c(d+1)},p=()=>{c(d-1)},m=y=>{e.onValue(d+"-"+pe.Number(2,y)),u()},x=y=>o.y===l.y&&o.m===y?"_FFEB3B":"",g=Array(12).fill("").map((y,k)=>k+1),v=window.innerHeight-e.position.y+33<320?e.position.y-312:e.position.y+33,_=window.innerWidth-e.position.x<265?e.position.x-235:e.position.x;return n.jsx(n.Fragment,{children:t?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:Vt.o,onClick:()=>u()},new Date().getTime()),n.jsxs("div",{className:Vt.c,style:{top:v+"px",left:_+"px"},children:[n.jsxs("s",{children:[n.jsx("i",{"data-icon":"F021",onClick:()=>p()}),n.jsx("h2",{children:d}),n.jsx("i",{"data-icon":"F022",onClick:()=>f()})]}),n.jsx("div",{children:g.map((y,k)=>n.jsx("span",{onClick:()=>{m(y)},color:x(y),children:n.jsx("b",{children:pe.Month(y).abc})},k))})]})]}):""})};function Jt(e){let t=()=>e.title?n.jsx("dt",{children:e.title}):"",r=()=>e.error?n.jsx("em",{children:e.error}):"",[i,a]=b.useState(!1),o=e.edit!==void 0?e.edit:!0,l=e.active!==void 0?e.active:!0,c=!!(e.hide&&(e.value===""||e.value===void 0))&&!(o&&l);i=o?!0:i;let u=e.placeholder!==void 0?e.placeholder:"Заметка пуста",f=_=>{e.onValue&&e.onValue({value:_.target.innerText,name:e.name})},p=_=>{_.preventDefault(),navigator.clipboard.readText().then(y=>{window.document.execCommand("insertText",!1,y)}).catch(y=>{})},m=_=>{o||a(!i)};const x=_=>{e.onSave&&e.onSave({value:_.target.innerText,name:e.name})},g={};g.field="notes",e.className&&(g.className=e.className);const v={};return u&&(v.placeholder=u),i&&(v.open=""),o&&l&&(v.edit=""),c?n.jsx(n.Fragment,{}):n.jsxs("dl",{...g,children:[t(),n.jsx("dd",{onPaste:p,onInput:f,onBlur:x,contentEditable:o&&l?"plaintext-only":"false",...v,onDoubleClick:m,suppressContentEditableWarning:!0,children:e.value}),r()]})}function ot({onValue:e,onSave:t,value:r,name:i,active:a,max:o,edit:l,title:d,error:c,show:u,hide:f,placeholder:p,className:m,after:x,view:g}){l=l!==void 0?l:!0,a=a!==void 0?a:!0,f=!!(f&&(r===""||r===void 0))&&!(l&&a),p=p!==void 0?p:"",o=o!==void 0?o:99;let _=T=>{e==null||e({name:i,value:T.currentTarget.value})};const y=T=>{t==null||t({name:i,value:T.currentTarget.value})},k={};return k.field="input",m&&(k.className=m),f?n.jsx(n.Fragment,{}):n.jsxs("dl",{...k,children:[d&&n.jsx("dt",{children:d}),n.jsx("dd",{children:n.jsx("input",{name:i,type:"tel",inputMode:"numeric",onChange:_,onBlur:y,placeholder:p,defaultValue:r})}),c&&n.jsx("em",{children:c})]})}function Qt({value:e,onValue:t,name:r,placeholder:i="",className:a,title:o,error:l,edit:d=!0,active:c=!0,reload:u=!1,after:f=""}){let p=_=>{t&&t({value:_.target.textContent,name:r,reload:u})},m=_=>{_.key==="Enter"&&_.preventDefault()},x=_=>{_.preventDefault(),navigator.clipboard.readText().then(y=>{window.document.execCommand("insertText",!1,y.replace(/(\r\n|\n|\r)/gm," "))}).catch(y=>{})};const g={};g.field="password",a&&(g.className=a);const v={};return i&&(v.placeholder=i),n.jsxs("dl",{...g,children:[o?n.jsx("dt",{children:o}):"",n.jsx("dd",{onPaste:x,onInput:p,onKeyDown:m,onBlur:_e.Blur,contentEditable:d&&c?"plaintext-only":"false",...v,suppressContentEditableWarning:!0,children:e}),l?n.jsx("em",{children:l}):""]})}function st({onValue:e,onSave:t,value:r,name:i,active:a,max:o,edit:l,title:d,error:c,show:u,hide:f,placeholder:p,className:m,after:x,view:g}){l=l!==void 0?l:!0,a=a!==void 0?a:!0,f=!!(f&&(r===""||r===void 0))&&!(l&&a),p=p||"";const _="+7__________",y=new Set("_"),k=(C=>Array.from(_,(F,J)=>y.has(F)?C=J+1:C))(0),T=[..._].findIndex(C=>y.has(C)),$=new RegExp("\\d","g"),M=C=>(C=C.match($)||[],Array.from(_,F=>(C[0]===F||y.has(F))&&C.shift()||F)),W=C=>{const[F,J]=[C.target.selectionStart,C.target.selectionEnd].map(R=>(R=M(C.target.value.slice(0,R)).findIndex(ne=>y.has(ne)),R<0?k[k.length-1]:ae?k[R-1]||T:R));C.target.value=M(C.target.value).join(""),C.target.setSelectionRange(F,J),ae=!1,e==null||e({name:i,value:C.target.value})},L=C=>{[C.target.selectionStart,C.target.selectionEnd].map(F=>(F=M(C.target.value.slice(0,F)).findIndex(J=>y.has(J)),F<0?k[k.length-1]:ae?k[F-1]||T:F)),C.target.value=M(C.target.value).join(""),L==null||L({name:i,value:C.target.value})};let ae=!1;const A={};return A.field="input",m&&(A.className=m),f?n.jsx(n.Fragment,{}):n.jsxs("dl",{...A,children:[d&&n.jsx("dt",{children:d}),n.jsx("dd",{children:n.jsx("input",{name:i,type:"tel",inputMode:"numeric",onChange:W,onBlur:L,placeholder:p,defaultValue:r})}),c&&n.jsx("em",{children:c})]})}const en=e=>{let t=()=>e.title?n.jsx("dt",{children:e.title}):"",r=e.edit!==void 0?e.edit:!0,i=e.active!==void 0?e.active:!0,a=e.placeholder!==void 0?e.placeholder:"",o=0,l=()=>{clearTimeout(o),o=setTimeout(()=>{},1e3)},d=f=>{f.key==="Enter"&&f.preventDefault()},c=f=>{f.preventDefault(),navigator.clipboard.readText().then(p=>{window.document.execCommand("insertText",!1,p)}).catch(p=>{})};const u={};return a&&(u.placeholder=a),n.jsxs("dl",{"data-form":"input",children:[t(),n.jsx("dd",{onPaste:c,onInput:l,onKeyDown:d,contentEditable:r&&i?"plaintext-only":"false",...u,suppressContentEditableWarning:!0,children:e.value})]})};function lt({title:e,error:t,edit:r=!0,active:i=!0,hide:a,value:o="0",onValue:l,options:d,placeholder:c="",name:u,after:f,view:p,className:m}){var k;const x=b.useId(),[g,v]=b.useState((k=d[parseInt(o)])==null?void 0:k.n);let _=T=>{v(d[T.target.value].n),l==null||l({name:u,value:T.target.value})};const y={};return y.field="select",m&&(y.className=m),n.jsxs("dl",{...y,children:[e?n.jsx("dt",{children:e}):"",n.jsxs("dd",{children:[g,n.jsx("select",{name:u,id:x,defaultValue:o+"",onChange:_,children:Object.keys(d).map(T=>n.jsx("option",{value:T,children:d[T].n},T))})]})]})}function dt({value:e,onValue:t,name:r,placeholder:i="",title:a="",error:o="",hide:l=!1,edit:d=!0,active:c=!0,after:u="",show:f=!0,view:p,onSave:m,className:x=""}){let g=!!(l&&(e===""||e===void 0)),v=$=>{t==null||t({value:$.target.value,name:r})},_=$=>{$.preventDefault(),navigator.clipboard.readText().then(M=>{window.document.execCommand("insertText",!1,M.replace(/(\r\n|\n|\r)/gm," "))}).catch(M=>{})},y=$=>{$.preventDefault(),navigator.clipboard.writeText($.target.value).then(function(){Ae.Copy("Данные в буфер обмене")},function(M){})};if(!(d&&c)&&!f||!(d&&c)&&g)return"";const k={};k.field="input",x&&(k.className=x);const T=$=>{m==null||m({value:$.target.value,name:r})};return n.jsxs("dl",{...k,children:[a?n.jsx("dt",{children:a}):"",n.jsx("dd",{children:n.jsx("input",{name:r,autoComplete:"off",type:"text",onChange:v,onPaste:_,onBlur:T,onContextMenu:y,placeholder:i,defaultValue:e,spellCheck:"false"})}),o?n.jsx("em",{children:o}):""]})}function ct(e){let t=()=>e.title?n.jsx("dt",{children:e.title}):"",r=()=>e.error?n.jsx("em",{children:e.error}):"",i=e.edit!==void 0?e.edit:!0,a=e.active!==void 0?e.active:!0,l=!!(e.hide&&(e.default===""||e.options[e.default]===void 0))&&!(i&&a),d=e.placeholder!==void 0?e.placeholder:"",c=x=>{f(e.options[x]),e.onValue({value:x,name:e.name})},[u,f]=b.useState(e.default!==void 0?e.options[e.default]:e.default),p=x=>{if(!(i&&a))return;const g=x.target.getBoundingClientRect();Le.setListener("form",n.jsx(zi,{parent:g,onValue:c,view:e.view,options:e.options},new Date().getTime()))};const m={};return d&&(m.placeholder=d),l?n.jsx(n.Fragment,{}):n.jsxs("dl",{"data-form":"select",children:[t(),n.jsx("dd",{onClick:p,"data-edit":(i&&a)+"",...m,children:u}),r()]})}const zi=({onValue:e,parent:t,view:r,options:i})=>{let[a,o]=b.useState(!0),l=()=>{o(!1)},d=p=>{o(!1),e(p)},c=Object.keys(i).length*36,u=window.innerHeight-t.y+t.height<c?t.y-(c-33):t.y+33,f=window.innerWidth-t.x<265?t.x-235:t.x;return n.jsx(n.Fragment,{children:a?n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-select":"backdrop",onClick:l},new Date().getTime()),n.jsx("div",{"data-select":"background "+r,style:{top:u+"px",left:f+"px",width:t.width},children:n.jsx("ul",{children:Object.keys(i).map((p,m)=>n.jsx("li",{onClick:()=>{d(p)},children:i[p]},m))})})]}):""})};function ut({set:e,value:t,onValue:r,name:i,placeholder:a="",title:o="",error:l="",hide:d=!1,edit:c=!0,show:u=!0,active:f=!0,after:p="",view:m,module:x,item:g,className:v=""}){let _={};switch(e){case"String":return n.jsx(dt,{title:o,show:u,hide:d,view:m,edit:c,active:f,value:t,onValue:r,name:i,placeholder:a,className:v});case"Select":return g&&(_=oe.getSelect(parseInt(g))?oe.getSelect(parseInt(g)):{0:{s:"1",n:"не известно"}}),n.jsx(lt,{title:o,show:u,hide:d,view:m,edit:c,active:f,value:t,onValue:r,name:i,placeholder:a,className:v,options:_});case"Users":return oe.getSelect("user"),n.jsx(ct,{title:o,show:u,hide:d,view:m,edit:c,active:f,value:t,onValue:r,name:i,placeholder:a,className:v,options:_});case"Date":return n.jsx(nt,{title:o,show:u,hide:d,view:m,edit:c,active:f,value:t,onValue:r,name:i,placeholder:a,className:v});case"Phone":return n.jsx(st,{title:o,show:u,hide:d,view:m,edit:c,active:f,value:t,onValue:r,name:i,placeholder:a,className:v});case"Number":return n.jsx(ot,{title:o,show:u,hide:d,view:m,edit:c,active:f,value:t,onValue:r,name:i,placeholder:a,className:v});case"Money":return n.jsx(at,{title:o,show:u,hide:d,view:m,edit:c,active:f,value:t,onValue:r,name:i,placeholder:a,className:v});case"Modal":return n.jsx(it,{title:o,show:u,hide:d,view:m,edit:c,active:f,value:t,onValue:r,name:i||"",placeholder:a,className:v,options:_,module:x||""})}}function tn({value:e,onValue:t,name:r,placeholder:i="",title:a="",error:o="",hide:l=!1,edit:d=!0,active:c=!0,after:u="",show:f=!0,view:p,onBlur:m,onSave:x,className:g=""}){let v=!!(l&&(e===""||e===void 0));if(!(d&&c)&&!f||!(d&&c)&&v)return"";let _=$=>{t&&t({value:$.target.innerText,name:r})},y=$=>{x&&x({value:$.target.innerText,name:r})},k=$=>{$.preventDefault(),navigator.clipboard.readText().then(M=>{window.document.execCommand("insertText",!1,M)}).catch(M=>{})};const T={};return i&&(T.placeholder=i),n.jsxs("dl",{children:[a??n.jsx("dt",{children:a}),n.jsx("dd",{onPaste:k,onBlur:y,onInput:_,contentEditable:d&&c?"plaintext-only":"false",...T,suppressContentEditableWarning:!0,children:e}),o??n.jsx("em",{children:o})]})}function nn({value:e,onValue:t,name:r,placeholder:i="",title:a="",error:o="",hide:l=!1,edit:d=!0,active:c=!0,after:u="",show:f=!0,view:p,onBlur:m,onSave:x,className:g=""}){let v=!!(l&&(e===""||e===void 0));if(pe.Date(e===void 0?new Date:e,"HH:MM"),b.useRef(null),!(d&&c)&&!f||!(d&&c)&&v)return"";const _="__:__",y=new Set("_"),k=(C=>Array.from(_,(F,J)=>y.has(F)?C=J+1:C))(0),T=[..._].findIndex(C=>y.has(C)),$=new RegExp("\\d","g"),M=C=>(C=C.match($)||[],Array.from(_,F=>(C[0]===F||y.has(F))&&C.shift()||F)),W=C=>{const[F,J]=[C.target.selectionStart,C.target.selectionEnd].map(R=>(R=M(C.target.value.slice(0,R)).findIndex(ne=>y.has(ne)),R<0?k[k.length-1]:A?k[R-1]||T:R));C.target.value=M(C.target.value).join(""),C.target.setSelectionRange(F,J),t==null||t({name:r,value:C.target.value})},L={};L.field="input",g&&(L.className=g);const ae={};i&&(ae.placeholder=i);let A=!1;return n.jsx(n.Fragment,{children:n.jsxs("dl",{...L,children:[a?n.jsx("dt",{children:a}):"",n.jsx("dd",{...ae,children:n.jsx("input",{type:"tel",placeholder:i,onChange:W,inputMode:"numeric",onKeyDown:C=>A=C.key==="Backspace",onFocus:W,onBlur:C=>C.target.value===_&&(C.target.value="")})}),o?n.jsx("em",{children:o}):""]})})}function rn({onValue:e,label:t,value:r,className:i,name:a,reload:o}){r=!!r;const[l,d]=b.useState(r),c=()=>{let p=!l;e({name:a,value:p,reload:o}),d(p)},u={};u.field="check",i&&(u.className=i);const f={};return l&&(f.active=""),n.jsxs("dl",{...u,children:[t?n.jsx("dt",{children:t}):"",n.jsx("dd",{...f,onClick:c})]})}const an=({onValue:e,value:t,name:r,item:i})=>{const[a,o]=b.useState(!!t);b.useEffect(()=>{o(!!t)},[t]);let l=()=>{let d=parseInt(a)===0?1:0;o(d),e({value:d,name:r,key:i,item:i})};return n.jsx("div",{role:"switch",onClick:l,"aria-checked":`${a?"true":"false"}`})};function on({value:e,onValue:t,name:r,placeholder:i="",title:a="",error:o="",hide:l=!1,edit:d=!0,active:c=!0,after:u="",show:f=!0,view:p,onBlur:m,onSave:x,className:g=""}){const[v,_]=b.useState(e!==void 0?e.split(","):[]);b.useEffect(()=>{e!==void 0&&_(e!==void 0?e.split(","):[])},[e]);let y=()=>{_([...v,""])},k=A=>{v.splice(A,1),v.length===0&&v.push(""),_([...v]),m!==void 0&&m({value:v.join(","),name:r})},T=!!(l&&(e===""||e===void 0)),$=A=>{};if(!(d&&c)&&!f||!(d&&c)&&T)return"";const M={};M.field="group",g&&(M.className=g);const W=A=>{_e.Blur(A),x&&x({value:A.target.textContent,name:r})};let L=(A,C)=>{v[C]=A.target.textContent,t!==void 0&&t({value:v.join(","),name:r})},ae=A=>{A.key==="Enter"&&A.preventDefault()};return n.jsxs("dl",{...M,children:[n.jsxs("dt",{children:[a,n.jsx("i",{onClick:y,children:n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",children:[n.jsx("path",{d:"M12 5.25v13.5"}),n.jsx("path",{d:"M18.75 12H5.25"})]})})]}),n.jsx("dd",{children:v.map((A,C)=>n.jsxs("li",{className:"field_group_item",children:[n.jsx("span",{onInput:F=>L(F,C),edit:"true",name:r,placeholder:i,onPaste:$,contentEditable:!0,onKeyDown:ae,onBlur:W,suppressContentEditableWarning:!0,children:v[C]}),n.jsx("i",{onClick:()=>{k(C)},children:n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",children:[n.jsx("path",{d:"M17.25 17.25 6.75 6.75"}),n.jsx("path",{d:"m17.25 6.75-10.5 10.5"})]})})]},C))}),o?n.jsx("em",{children:o}):""]})}const Fi=e=>(e=e!==void 0&&e!==""?e.split(","):[],e.reduce((t,r)=>(t[r]=!0,t),{}));function sn({value:e,onValue:t,name:r,placeholder:i="",title:a,error:o,hide:l=!1,edit:d=!0,show:c=!0,active:u=!0,after:f="",view:p,modal:m,module:x,options:g,className:v}){const[_,y]=b.useState(Fi(e)),k=M=>{if(!(d&&u)||!m)return;let W=m.split(".");rt.Open(W[1],{callback:L=>{t&&t({value:L,name:r}),y(L)},onValue:t,options:g,name:r,value:_})},T={};T.field="group",v&&(T.className=v);const $={};return i&&($.placeholder=i),l?n.jsx(n.Fragment,{}):n.jsxs("dl",{...T,children:[n.jsxs("dt",{children:[a,n.jsx("i",{onClick:k,children:n.jsxs("svg",{width:"20",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("path",{d:"M12 5.25v13.5"}),n.jsx("path",{d:"M18.75 12H5.25"})]})})]}),n.jsx("dd",{...$,onClick:open,edit:(d&&u)+"","data-after":f,children:Object.keys(_).map(M=>{var W;return n.jsx("div",{className:"field_group_item",children:(W=g[M])==null?void 0:W.label},M)})}),o&&n.jsx("em",{children:o})]})}const ln={Color:Gt,Date:nt,Code:Ht,Check:rn,Switch:Wt,Button:Zt,Message:Ut,Generator:Yt,Captcha:Kt,Modal:it,Money:at,Month:Xt,Notes:Jt,Number:ot,Password:Qt,Phone:st,Search:en,Select:lt,Set:ut,Textarea:tn,Time:nn,Users:ct,String:dt,Toogle:an,Group:on,Options:sn},be={debug:"_debug_ug20b_34",b:"_b_ug20b_46",o:"_o_ug20b_50",mb:"_mb_ug20b_55",tm:"_tm_ug20b_66",ta:"_ta_ug20b_133","--body":"_--body_ug20b_143"},S=window.Telegram.WebApp,le={is:!1,MainButton:{},BackButton:{}};let ve={};ve.dark={"--tg-theme-bg-color":"#212121","--tg-theme-text-color":"#ffffff","--tg-theme-hint-color":"#aaaaaa","--tg-theme-link-color":"#8774e1","--tg-theme-button-color":"#8774e1","--tg-theme-button-text-color":"#ffffff","--tg-theme-secondary-bg-color":"#0f0f0f","--tg-theme-header-bg-color":"#212121","--tg-theme-accent-text-color":"#8774e1","--tg-theme-section-bg-color":"#212121","--tg-theme-section-header-text-color":"#aaaaaa","--tg-theme-subtitle-text-color":"#aaaaaa","--tg-theme-destructive-text-color":"#e53935"},ve.light={"--tg-theme-bg-color":"#ffffff","--tg-theme-text-color":"#000000","--tg-theme-hint-color":"#999999","--tg-theme-link-color":"#2481cc","--tg-theme-button-color":"#2481cc","--tg-theme-button-text-color":"#ffffff","--tg-theme-secondary-bg-color":"#efeff3"},ve.users={"--tg-theme-bg-color":"#000000","--tg-theme-text-color":"#ffffff","--tg-theme-hint-color":"#98989e","--tg-theme-link-color":"#ffffff","--tg-theme-button-color":"#ffffff","--tg-theme-button-text-color":"#000000","--tg-theme-secondary-bg-color":"#000000"},S.getUser=()=>{var e;return((e=S.initDataUnsafe)==null?void 0:e.user)===void 0?{}:S.initDataUnsafe},S.MainButton.callback=[],S.MainButton.set=e=>{le.is?le.MainButton.set(e):(S.MainButton.callback.forEach(t=>{S.MainButton.offClick(t)}),S.MainButton.callback=[],typeof e=="boolean"?S.MainButton.isVisible=!1:(S.MainButton.text=e.text,e.color&&(S.MainButton.color=e.color),e.textColor&&(S.MainButton.textColor=e.textColor),S.MainButton.isVisible=!0,S.MainButton.isActive=e.isActive===void 0?!0:e.isActive,S.MainButton.callback.push(()=>{var t;e.page===void 0?(t=e.callback)==null||t.call(e):se.setPage(e.page)}),S.MainButton.onClick(S.MainButton.callback[0])))},S.BackButton.state=[!1],S.BackButton.listen=[],S.BackButton.router=e=>{e===!1?(S.BackButton.isVisible=!1,S.BackButton.offClick(S.BackButton.listen[0]),S.BackButton.listen.shift(),S.BackButton.state.length!==1&&S.BackButton.state.pop()):(S.BackButton.isVisible=!0,S.BackButton.offClick(S.BackButton.listen[0]),S.BackButton.listen.shift(),S.BackButton.listen.push(()=>{let t=S.BackButton.state.pop();if(t.page!==void 0)se.setPage(t.page);else{let r=S.BackButton.state[S.BackButton.state.length-1];S.BackButton.router(r)}}),S.BackButton.onClick(S.BackButton.listen[0]))},S.BackButton.set=e=>{le.is?le.BackButton.set(e):(S.BackButton.state.push(e),S.BackButton.router(e))},S.Notice=(e,t)=>{t!==void 0?(Ae.Send({type:e,text:t}),le.is||S.HapticFeedback.notificationOccurred(e)):(Ae.Send(e),le.is||S.HapticFeedback.notificationOccurred(e.type))},S.Init=({dev:e})=>{if(e){let[t,r]=b.useState(!1),[i,a]=b.useState(!1),[o,l]=b.useState("dark"),[d,c]=b.useState(!1),[u,f]=b.useState(!1);le.is=!0,le.MainButton.set=r,le.BackButton.set=a,b.useEffect(()=>{for(let x in ve[o])document.documentElement.style.setProperty(x,ve[o][x])},[]);let p=x=>{for(let g in ve[x])document.documentElement.style.setProperty(g,ve[x][g]);l(x),c(!1)},m=()=>{c(!1),f(!0)};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:be.debug,children:[i===!1?n.jsx("div",{className:be.b,children:"Отмена"}):n.jsx("div",{onClick:()=>{i.page===void 0||se.setPage(i.page)},className:be.b,children:"Назад"}),n.jsx("div",{className:be.o,onClick:()=>c(!d),children:"Меню"})]}),t&&n.jsx("div",{className:be.mb,children:n.jsx("button",{onClick:()=>{t.page&&se.setPage(t.page),t.callback&&t.callback()},children:t.text})}),d?n.jsxs("div",{className:be.tm,children:[n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("button",{onClick:m,children:"Authorization"})}),n.jsx("li",{children:n.jsx("button",{onClick:()=>se.setPage("Add"),children:"Add Page"})})]}),n.jsxs("ul",{children:[n.jsxs("li",{children:[n.jsx("button",{children:"Thema"}),n.jsxs("ol",{children:[n.jsx("li",{children:n.jsx("button",{onClick:()=>p("dark"),children:"Dark"})}),n.jsx("li",{children:n.jsx("button",{onClick:()=>p("light"),children:"Light"})}),n.jsx("li",{children:n.jsx("button",{onClick:()=>p("users"),children:"Users"})})]})]}),n.jsx("li",{children:n.jsx("button",{onClick:()=>c(!d),children:"Closed"})})]})]}):"",u?n.jsx(Pi,{setAuthorization:f}):""]})}else return n.jsx(n.Fragment,{})};const Pi=({setAuthorization:e})=>{let t={},r=a=>{t=a.value},i=a=>{localStorage.setItem("auth",t)};return n.jsx("div",{className:be.ta,children:n.jsxs("div",{className:"--body",children:[n.jsx("fieldset",{children:n.jsx(ln.Notes,{label:"Data JSON",name:"description",onValue:r,placeholder:""})}),n.jsx("div",{onClick:i,children:" Сщхранить "})]})})},Ri=({children:e,config:t})=>(window.location.pathname==="/clear"&&(window.history.pushState({},"","/"),V()),N.New(t.crypto),t.defaultModule&&Wn(t.defaultModule),Un(n.jsxs(n.Fragment,{children:[n.jsx(S.Init,{dev:t.dev}),n.jsx(ei,{config:t.modal}),n.jsx(Ur,{}),n.jsx(Xr,{}),n.jsx(pi,{}),e]}))),dn=({list:e,onClick:t,active:r,size:i,view:a})=>n.jsx("nav",{children:n.jsx("ul",{className:[i,a].join(" "),children:e.map(o=>n.jsx(Oi,{onClick:t,active:r,label:o.label,link:o.link},o.link))})}),Oi=({onClick:e,label:t,link:r,active:i})=>n.jsx("li",{"tabs-active":String(i===r),onClick:()=>e(r),children:t});dn.defaultProps={size:"M",view:"H"};const Li=({title:e="",button:t,description:r="",children:i})=>n.jsxs("fieldset",{children:[e&&n.jsxs("legend",{children:[e,t&&n.jsx("div",{role:"button-outline",onClick:()=>t.onClick(),children:t.label})," "]}),n.jsx("ul",{children:i}),r&&n.jsx("article",{children:r})]}),Ai={setting:"_setting_dva4m_2"},qi=({children:e})=>n.jsx("div",{className:Ai.setting,children:e}),Wi=({label:e,children:t})=>{let[r,i]=b.useState(!1);return n.jsxs("li",{"data-item":"accordion",children:[n.jsxs("dl",{onClick:()=>i(!r),children:[n.jsx("dt",{children:e}),n.jsx("dd",{children:n.jsx("div",{"data-close":String(r)})})]}),r&&n.jsx("div",{children:t})]})},Zi=({label:e,onClick:t,button:r})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{role:"button",onClick:()=>t(),children:r})]})}),cn={Switch:({active:e,onClick:t})=>(e=typeof e=="number"?!!e:e,n.jsx("div",{role:"switch",onClick:()=>{t()},"aria-checked":e?"true":"false"}))},Ui={Accordion:Wi,Button:Zi,Switch:({label:e,onClick:t,active:r})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{children:n.jsx(cn.Switch,{onClick:t,active:r})})]})}),Info:({label:e,info:t})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{role:"info",children:t})]})}),Select:({label:e,active:t,options:r})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{role:"info",children:t})]})}),Component:({label:e,children:t})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{children:t})]})}),Node:({label:e,children:t})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{children:t})]})})};function un({list:e,onClick:t,active:r,size:i,view:a}){return n.jsx("nav",{children:n.jsx("ul",{className:[i,a].join(" "),children:e.map(o=>n.jsx(Yi,{onClick:t,active:r,label:o.label,link:o.link},o.link))})})}const Yi=({onClick:e,label:t,link:r,active:i})=>n.jsx("li",{"tabs-active":String(i===r),onClick:()=>e(r),children:t});un.defaultProps={size:"M",view:"H"};const Ki={Section:Li,Main:qi,Item:Ui,Tabs:un};function fn({text:e,type:t,button:r}){let[i,a]=b.useState(!1),o={active:t};const l=()=>{if(r){if(r.onClick)return r.onClick({});if(r.onSend)return i?void 0:(a(!0),r.onSend(a))}};return n.jsxs("div",{className:et.al,...o,children:[n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",fillRule:"evenodd",clipRule:"evenodd",children:n.jsx("path",{fill:"#fff",d:"M10.362 2.015C11.4264 1.66167 12.5736 1.66167 13.638 2.015C14.6981 2.36687 15.5304 3.20141 16.3665 4.37395C17.1999 5.5426 18.1208 7.17206 19.3078 9.2725L19.3544 9.35496C20.5417 11.4557 21.4625 13.0851 22.0364 14.4065C22.613 15.7343 22.9002 16.8807 22.6711 17.9821C22.4403 19.0911 21.8714 20.0995 21.0428 20.8617C20.2162 21.622 19.0907 21.9428 17.6736 22.0968C16.2645 22.25 14.4212 22.25 12.0488 22.25H11.9513C9.57882 22.25 7.73554 22.25 6.32642 22.0968C4.90927 21.9428 3.78379 21.622 2.95722 20.8617C2.12862 20.0995 1.55968 19.0911 1.32895 17.9821C1.0998 16.8807 1.387 15.7343 1.96365 14.4065C2.53752 13.0851 3.45835 11.4557 4.64558 9.35495L4.69218 9.2725L4.69218 9.27249C5.87921 7.17206 6.80008 5.5426 7.63347 4.37395C8.46963 3.20141 9.30194 2.36687 10.362 2.015ZM11 17C11 16.4477 11.4457 16 11.9955 16H12.0045C12.5543 16 13 16.4477 13 17C13 17.5523 12.5543 18 12.0045 18H11.9955C11.4457 18 11 17.5523 11 17ZM11 13C11 13.5523 11.4477 14 12 14C12.5523 14 13 13.5523 13 13V9C13 8.44772 12.5523 8 12 8C11.4477 8 11 8.44772 11 9V13Z"})}),n.jsx("span",{children:e}),r&&n.jsx("button",{onClick:l,children:r.label})]})}const H={h:"_h_1usnu_1",g:"_g_1usnu_11",hr:"_hr_1usnu_16",hl:"_hl_1usnu_28",t:"_t_1usnu_40",s:"_s_1usnu_60",u:"_u_1usnu_69",o:"_o_1usnu_76",l:"_l_1usnu_105",hh:"_hh_1usnu_115",c:"_c_1usnu_128",loadingB:"_loadingB_1usnu_1",m:"_m_1usnu_180",ul:"_ul_1usnu_196",f:"_f_1usnu_226"},pn=({title:e,left:t,right:r,children:i})=>n.jsxs("div",{className:H.h,children:[n.jsx("div",{className:H.t,children:e}),t&&n.jsx("div",{className:H.hl,children:t}),r&&n.jsx("div",{className:H.hr,children:r}),i]}),xn=({children:e,...t})=>n.jsx("div",{className:H.l,children:e}),hn=({children:e})=>n.jsx("div",{className:H.s,children:e}),gn=({children:e,edit:t})=>{const r={};return t&&(r.edit=""),n.jsx("div",{...r,className:H.f,children:e})};function mn({children:e}){return n.jsx("div",{className:H.g,children:e})}const Hi={Header:pn,Section:hn,Group:mn,Form:gn,List:xn,A:fn,U:({children:e})=>n.jsx("div",{className:H.u,children:e}),G:mn,C:({children:e})=>n.jsx("div",{className:H.c,children:e}),L:xn,O:({children:e,className:t,title:r})=>n.jsxs("div",{className:[H.o,t].join(" "),children:[r&&n.jsx("div",{className:H.hh,children:r}),e]}),S:hn,H:pn,M:({children:e})=>n.jsx("div",{className:H.m,children:e}),F:gn},Gi={Send:Qr,Line:fn};function Vi(){return n.jsx("svg",{viewBox:"0 0 462.86 359.96",children:n.jsx("path",{d:"M210.5,307.78c-27,35.41-58.14,58-120.55,50.84-1-.12-1.58-.39-1.58-2V327.87c0-1.32.51-2.12,1.85-2,100.39-1,88.17-63.46,74.8-90.94-47.3-97.28-14.46-166.27,20.26-205.14,14.1-16.37,50.53-42,128.07-23.24,9.1,2,30.51,7.8,24.46,11.38C317.5,30,297.66,68.33,295,73.12c-3.62,6.59-6.26,13.17-4.57,14.13,2.37,1.35,3.5-1.56,6.58-7.91C319.78,34.41,366-22.76,402.78,37.68a1.14,1.14,0,0,1,.09.26c9.3,56.05,30.57,228.62-97.76,224.22-23.38-2-28.82-22-32.57-18.89-3.36,3,10,21.4,32.76,23.19C448.18,270.75,411.55,66.74,407.79,41.91a1.41,1.41,0,0,1,0-.3c2-7.32,129.15,17.47,112.77,158.08,4.82,6.57,10.89,10,18.7,16.08l.13.07c8.9,3.67,10.46,12.06,11.43,18.88a63.15,63.15,0,0,1-.14,15.49c-10.48-4.62-22.74-10.11-22.26-22.53.43-12,7.35-5.21-8.8-14.22a.69.69,0,0,0-1,.57c-.33,3.87-2.7,14.69-3,16.59v0c-4.64,17-16.59,86-18.41,99.58-.77,5.7-4.94,10.41-11.4,10.39l-56.71.18c-7.73.22-9.57-7.9-10.27-11.89-2.7-15.31-4.08-29.7-4.18-29.67-20.24,9.26-108.69,3.08-108.69,3.27V330c-.29,7.56-4.51,15.26-11.74,15.32l-52.87,1c-10.36.1-13.85-1.67-15.5-11.87-2.08-13.08-1-34.26-5.32-37.43-2,1.84-8.33,8.11-10,10.83M196.16,203q9.57,0,11.42-7.72c2.18-9.07-5.66-17.7-14.77-15.68-4.95,1.11-7.53,4.94-7.53,11.53C185.28,199,188.94,203,196.16,203Z",transform:"translate(-88.37 0)"})})}const Xi={};function Ji(e){Xi.add(e)}function Qi({color:e,size:t,name:r}){return n.jsx("svg",{width:t,height:t,color:e,children:n.jsx("use",{href:`#${r}`})})}const ea={Logo:Vi,Sprite:Ji,Symbol:Qi};function ta(){return n.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[n.jsx("path",{d:"M5.15837 11.491C5.08489 12.887 5.16936 14.373 3.92213 15.3084C3.34164 15.7438 3 16.427 3 17.1527C3 18.1508 3.7818 19 4.8 19H19.2C20.2182 19 21 18.1508 21 17.1527C21 16.427 20.6584 15.7438 20.0779 15.3084C18.8306 14.373 18.9151 12.887 18.8416 11.491C18.6501 7.85223 15.6438 5 12 5C8.35617 5 5.34988 7.85222 5.15837 11.491Z",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"}),n.jsx("path",{d:"M10.5 3.125C10.5 3.95343 11.1716 5 12 5C12.8284 5 13.5 3.95343 13.5 3.125C13.5 2.29657 12.8284 2 12 2C11.1716 2 10.5 2.29657 10.5 3.125Z",stroke:"currentColor",strokeWidth:"1",fill:"none"}),n.jsx("path",{d:"M15 19C15 20.6569 13.6569 22 12 22C10.3431 22 9 20.6569 9 19",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})}function na(){return n.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[n.jsx("path",{d:"M4.4094 11.4516C4.62188 7.41446 7.95728 4.25 12 4.25C16.0427 4.25 19.3781 7.41446 19.5906 11.4516C19.5997 11.6241 19.6064 11.7893 19.6129 11.9485C19.6351 12.49 19.6544 12.9615 19.7525 13.4133C19.8698 13.9531 20.0867 14.3775 20.5279 14.7084C21.2972 15.2854 21.75 16.191 21.75 17.1527C21.75 18.534 20.6628 19.75 19.2 19.75H4.8C3.33719 19.75 2.25 18.534 2.25 17.1527C2.25 16.191 2.70278 15.2854 3.47213 14.7084C3.91329 14.3775 4.13025 13.9531 4.24749 13.4133C4.34561 12.9615 4.3649 12.49 4.38705 11.9485V11.9485L4.38705 11.9485C4.39356 11.7893 4.40032 11.6241 4.4094 11.4516Z",fill:"#141B34"}),n.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.5286 1.37434C10.9737 1.08296 11.517 1 12 1C12.483 1 13.0263 1.08296 13.4714 1.37434C13.9652 1.69759 14.25 2.22083 14.25 2.875C14.25 3.47116 14.017 4.09375 13.6626 4.57057C13.3138 5.03989 12.7415 5.5 12 5.5C11.2585 5.5 10.6862 5.03989 10.3374 4.57057C9.98299 4.09375 9.75 3.47116 9.75 2.875C9.75 2.22083 10.0348 1.69759 10.5286 1.37434Z",fill:"#141B34"}),n.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 18C9.55228 18 10 18.4477 10 19C10 20.1046 10.8954 21 12 21C13.1046 21 14 20.1046 14 19C14 18.4477 14.4477 18 15 18C15.5523 18 16 18.4477 16 19C16 21.2091 14.2091 23 12 23C9.79086 23 8 21.2091 8 19C8 18.4477 8.44772 18 9 18Z",fill:"#141B34"})]})}function ra(){return n.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:n.jsx("path",{d:"M8.85746 12.5061C6.36901 10.6456 4.59564 8.59915 3.62734 7.44867C3.3276 7.09253 3.22938 6.8319 3.17033 6.3728C2.96811 4.8008 2.86701 4.0148 3.32795 3.5074C3.7889 3 4.60404 3 6.23433 3H17.7657C19.396 3 20.2111 3 20.672 3.5074C21.133 4.0148 21.0319 4.8008 20.8297 6.37281C20.7706 6.83191 20.6724 7.09254 20.3726 7.44867C19.403 8.60062 17.6261 10.6507 15.1326 12.5135C14.907 12.6821 14.7583 12.9567 14.7307 13.2614C14.4837 15.992 14.2559 17.4876 14.1141 18.2442C13.8853 19.4657 12.1532 20.2006 11.226 20.8563C10.6741 21.2466 10.0043 20.782 9.93278 20.1778C9.79643 19.0261 9.53961 16.6864 9.25927 13.2614C9.23409 12.9539 9.08486 12.6761 8.85746 12.5061Z",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})})}const ia={n:"_n_euuvm_1"};let Ne={},De=[];const aa=(e,t)=>{switch(t.type){case"open":return{...e,open:t.open};case"view":return{...e,view:e.view===t.view?null:t.view};case"add":return{...e,news:[...e.news,t.data],active:!0};case"news":return{...e,news:t.data,active:t.data.length!==0};case"hide":let r=e.news.filter(a=>a.id!==t.id);return{...e,news:r,active:r.length!==0};case"size":return{...e,size:t.size};case"take":let i={[t.list]:t.take};i={...e.take,...i},e.active=!1;for(let a in i)i[a]!=="999"&&(e.active=!0);return Ne.get(i,e.active),{...e,take:i,active:e.active};case"exit":return e;default:throw new Error}};function oa(e){Ne.fn({action:"add",data:e})}function sa(e){Ne.fn({action:"add",data:e})}function la(e){Ne.fn({action:"new",data:e})}function da(e){Ne.fn=e}function ca(){const[e,t]=b.useReducer(aa,{open:!1,active:!1,news:[],take:{}});We.useListener("bell",async i=>{}),da(async i=>{switch(i.action){case"add":De.push(i.data);break}}),b.useEffect(()=>{(async()=>{let i=await We.Send({type:"module",module:"M00",query:"x0054",array:["M01","M02"]});for(let a in i)switch(a){case"news":t({type:"news",data:i.news});break;case"M01":i[a].forEach(o=>{De.push({module:"M01",type:1,id:o.id,datetime:new Date(o.tDate).getTime(),txt:o.p01})});break;case"M02":i[a].forEach(o=>{De.push({module:"M02",type:117,id:o.id,datetime:new Date(o.tDate).getTime(),txt:o.p01})});break}})(),setInterval(()=>{De.forEach((i,a)=>{t({type:"add",data:{module:i.module,type:i.type,id:i.id,datetime:i.datetime,txt:i.title}}),i.datetime<new Date().getTime()&&De.splice(a,1)})},6e4)},[]);let r=async i=>{t({type:"hide",id:i.id})};return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:ia.n,onClick:()=>{t({type:"open",open:!0})},children:e.active?n.jsx(na,{}):n.jsx(ta,{})}),e.open?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"notify-o",onClick:()=>{t({type:"open",open:!1})}}),n.jsxs("div",{className:"notify-m",children:[n.jsx("div",{className:"notify-l",children:e.news.map((i,a)=>n.jsx(ua,{data:i,dispatch:t},a))}),n.jsx("div",{className:"notify-b",onClick:r,children:"История"})]})]}):""]})}const ua=({data:e,dispatch:t})=>{let r=async i=>{t({type:"hide",id:i.id}),await We.Send({type:"module",module:"M00",query:"x0055",data:{id:i.id,type:i.type,db:i.db}})};return n.jsxs("div",{className:"notify-i",children:[n.jsx("div",{className:"--icon","data-icon":e.type}),n.jsxs("div",{className:"--body",children:[n.jsx("div",{className:"--name",children:e.type}),n.jsx("div",{className:"--text",children:e.txt})]}),n.jsx("div",{className:"--hide","data-icon":"F038",onClick:()=>r(e),children:" "})]})},fa="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2xldCBhPVtdLHM9bnVsbDtvbmNvbm5lY3Q9ZnVuY3Rpb24obCl7dmFyIHQ9bC5zb3VyY2U7YS5wdXNoKHQpO2NvbnN0IG49ZT0+e3MhPT1udWxsJiZzLnJlYWR5U3RhdGU9PT0xP3Muc2VuZChKU09OLnN0cmluZ2lmeShlKSk6dC5wb3N0TWVzc2FnZSh7dHlwZToibm9TZW5kIn0pfTtsZXQgcj1lPT57aWYocyE9PW51bGwmJnMucmVhZHlTdGF0ZT09PTEpcmV0dXJuIHQucG9zdE1lc3NhZ2Uoe3R5cGU6InRydWUifSk7ZS5say5hZGRyZXNzPT09ImxvY2FsaG9zdCI/cz1uZXcgV2ViU29ja2V0KGB3czovL2xvY2FsaG9zdDoke2UubGsuc29ja2V0KzF9YCk6cz1uZXcgV2ViU29ja2V0KCJ3c3M6Ly8iK2UubGsuYWRkcmVzcysiOiIrKGUubGsuc29ja2V0KzEpKSxzLm9uZXJyb3I9KCk9PnQucG9zdE1lc3NhZ2Uoe3R5cGU6ImVycm9yIn0pLHMub25vcGVuPSgpPT57bih7dHlwZToiY29ubmVjdCIsdWtleTplLnVrZXl9KX0scy5vbm1lc3NhZ2U9bz0+e2xldCBjPUpTT04ucGFyc2Uoby5kYXRhKTthLmZvckVhY2goZD0+e2QucG9zdE1lc3NhZ2UoYyl9KX0scy5vbmNsb3NlPSgpPT50LnBvc3RNZXNzYWdlKHt0eXBlOiJjbG9zZWQifSl9O3Qub25tZXNzYWdlPWZ1bmN0aW9uKGUpe3N3aXRjaChlLmRhdGEudHlwZSl7Y2FzZSJsZW5ndGgiOnJldHVybiB0LnBvc3RNZXNzYWdlKGEubGVuZ3RoKTtjYXNlImFsbCI6cmV0dXJuIGEuZm9yRWFjaChvPT5vLnBvc3RNZXNzYWdlKHthbGw6YS5sZW5ndGh9KSk7Y2FzZSJzZW5kIjpyZXR1cm4gbihlLmRhdGEuanNvbik7Y2FzZSJjb25uZWN0IjpyZXR1cm4gcihlLmRhdGEpO2RlZmF1bHQ6dC5wb3N0TWVzc2FnZSh7dHlwZToiZGVmYXVsdCIsZGF0YTplLmRhdGEuanNvbn0pfX19fSkoKTsK";function pa(e){return new SharedWorker("data:text/javascript;base64,"+fa,{name:e==null?void 0:e.name})}function xa(e){let t={},r={};e.data.forEach(a=>{t[a.id]={s:a.v,n:a.a},r[a.id]=a});let i={...he(),901:t};$t(r),Ee(i)}let te={},Y={},qe=["filter","online","users","company","select","setting","info","job"];function ha(){const[e,t]=b.useState(!1),[r,i]=b.useState(!1);function a(o){const l=new pa;te.laodData=d=>{let c=qe.indexOf(d);c>=0&&qe.splice(c,1),qe.length===0&&t(!0)},te.send=d=>{l.port.postMessage({type:"send",json:d})},l.port.onmessage=d=>{let c=d.data;c.type==="error"&&i(!0),c.type==="true"&&t(!0),c.type==="closed"&&l.port.postMessage({type:"connect",ukey:o,lk:Xe()}),qe.length!==0&&te.laodData(c.type),Y[c.type]&&Y[c.type](c)},l.port.postMessage({type:"connect",ukey:o,lk:Xe()})}return[a,e,r]}Y.module=e=>{te[e.listen]!==void 0&&(te[e.listen](e),delete te[e.listen])},Y.bell=la,Y.company=xa,Y.info=e=>{let t={};t.db=e.db,t.id=e.data.id,t.job=e.data.job,t.login=e.data.login,t.name=e.data.p02,t.patronymic=e.data.p03,t.surname=e.data.p01,t.email=e.data.email,t.admin=e.data.menu.includes("99"),Nt(t),Tt(e.data.menu)},Y.version=async e=>{Re.version.Server(e.data)},Y.online=async e=>{},Y.offline=async e=>{},Y.chat=e=>{switch(e.data.action){case"new_message":se.getModule();break;case"view_message":se.getModule();break;case"write_message":se.getModule();break}},Y.users=e=>{let t={};e.data.forEach(i=>{let a=i.p01+" "+i.p02+" "+i.p03,o=i.p01+" "+i.p02.substring(0,1)+"."+i.p03.substring(0,1)+".",l=i.p01.substring(0,1)+""+i.p02.substring(0,1)+i.p03.substring(0,1);t[i.id]={id:i.id,admin:i.m.includes("99"),ava:JSON.parse(i.a),job:i.j,login:"",online:{time:i.o,status:0},sts:i.s,nameFull:a,name:o,number:l}});let r={...he(),user:t};Ee(r)},Y.api=e=>{let t={};e.data.forEach(r=>{t[r.api]={key:r.key,p01:r.p01,p02:r.p02}})},Y.delete=()=>{V()},Y.select=e=>{let t={...he()};e.data.forEach(r=>{t[r.n]=JSON.parse(r.s)}),Ee(t)},Y.job=e=>{let t={...he()},r={};Object.keys(e.data).forEach(i=>{r[i]={s:1,n:e.data[i]}}),t[1]=r,Ee(t)},Y.setting=e=>{fr(e.data)},Y.app=()=>{};const ga=(e,t)=>{te[e]=t},ma=(e,t)=>{te[e](t)};function _a(e){let t="_"+String(Math.random()).substring(2,7);return new Promise(r=>{te[t]=i=>{i.error!==void 0?r({error:i.error}):r(i.data),delete te[t]},e={...e,listen:t},e.type="modules",te.send(e)})}const We={useConnect:ha,useListener:ga,setListener:ma,Send:_a};class ba{constructor(t="el",r="db"){jt(this,"storeName");jt(this,"_dbp");this.storeName=r,this._dbp=new Promise((i,a)=>{const o=indexedDB.open(t,1);o.onerror=()=>a(o.error),o.onsuccess=()=>i(o.result),o.onupgradeneeded=()=>{o.result.createObjectStore(r)}})}_withIDBStore(t,r){return this._dbp.then(i=>new Promise((a,o)=>{const l=i.transaction(this.storeName,t);l.oncomplete=()=>a(),l.onabort=l.onerror=()=>o(l.error),r(l.objectStore(this.storeName))}))}}let ft,O={};const je=()=>(ft||(ft=new ba),ft),xe=(e,t,r=je())=>r._withIDBStore("readwrite",i=>{O[e]=t,i.put(N.enCode(t),e)}),ie=(e,t=je())=>O[e]===void 0?new Promise((r,i)=>{let a;t._withIDBStore("readonly",o=>{a=o.get(e)}).then(()=>{if(a.result!==void 0){let o=N.deCode(a.result);O[e]=o,r(o)}else r({})})}):O[e],va=(e,t=je())=>t._withIDBStore("readwrite",r=>{r.delete(e)}),pt=(e=je())=>e._withIDBStore("readwrite",t=>{t.clear()}),ya={id:async(e,t,r)=>{let i=await ie(t);if(r!==void 0)r({type:"load",base:i});else return i[e]},get:ie,set:xe,add:async(e,t,r,i)=>{let a,o;o=await ie(r),o[e.id]=e,await xe(r,o),a!==null&&(a=await ie(t),a[e.id]=e.eDate,await xe(t,a)),i!==void 0&&i({type:"load",page:a,base:o})},del:va,upd:(e,t,r,i=je())=>{if(O[e]===void 0)return new Promise((a,o)=>{let l;i._withIDBStore("readonly",d=>{l=d.get(e)}).then(()=>{if(l.result!==void 0){let d=N.deCode(l.result);O[e]=d,O[e][t.id]={...O[e][t.id],...t.data},i.put(N.enCode(O[e]),e),a({})}else a({})})});if(O[e][t.id]!==void 0)return O[e][t.id]={...O[e][t.id],...t.data},r!==void 0&&O[r]!==void 0?O[r][t.id]!==void 0&&(O[r][t.id]=t.data.eDate):O[r]=[],delete O[e][t.id].$_item,delete O[e][t.id].$_send,i._withIDBStore("readwrite",a=>{a.put(N.enCode(O[e]),e),r!==void 0&&a.put(N.enCode(O[r]),r)})},key:(e=je())=>{const t=[];return e._withIDBStore("readonly",r=>{(r.openKeyCursor||r.openCursor).call(r).onsuccess=function(){this.result&&(t.push(this.result.key),this.result.continue())}}).then(()=>t)},load:e=>O[e],split:(e,t,r=[],i={})=>{let a=r.length!==0,o=[],l=i.sort,d=Object.keys(i).length!==0,c=Object.keys(i),u=Object.keys(e),f=[],p=x=>{let g="";if(r.forEach(v=>{g+=t[x][v]}),d){let v={};c.forEach(_=>{v[_]=t[x][_]});for(let _ in l)t[x][l[_]]===void 0&&(pt(),location.reload()),_==="s1"&&(v[_]=new Date(t[x][l[_]]).getTime()),_==="s2"&&(v[_]=t[x][l[_]]),_==="s3"&&(v[_]=t[x][l[_]].replace(/[^a-zа-яё]/gi,"").substring(0,1));o.push({id:x,text:g,...v})}else o.push({id:x,text:g})},m=x=>{};return u.forEach(x=>{f.push(t[x])}),f.forEach(x=>{x===void 0?(pt(),location.reload()):(a&&p(x.id),d&&m(x.id))}),{list:f,search:o,filter:i}},clear:pt,updAll:async(e,t,r,i)=>{let a=await ie(t),o=await ie(r);for(let l in e)o[l]=e[l],a[l]=e[l].eDate;await xe(t,a),await xe(r,o),i!==void 0&&i({type:"load",page:a,base:o})},delAll:async(e,t,r,i)=>{let a=await ie(t),o=await ie(r);e.forEach(l=>delete a[l]),await xe(t,a),i!==void 0&&i({type:"load",page:a,base:o})},delList:async(e,t,r)=>{let i=await ie(t);e.forEach(a=>delete i[a]),await xe(t,i)},addList:async(e,t,r)=>{let i=await ie(t);e.forEach(a=>i[a.id]=a.eDate),await xe(t,i)}},wa={setSetting:pr,getSetting:xr},ka={s:"_s_18bde_1",loadingB:"_loadingB_18bde_1",ul:"_ul_18bde_31"};function ja({children:e}){return n.jsx("ul",{className:H.ul,children:e})}function Ca(e,t){switch(t.type){case"load":return{...e,load:t.load,wait:!1,item:1,data:t.data,list:t.data[1],size:Object.keys(t.data).length};case"update":let r=Object.keys(e.data).length,i=e.item+1;return i=r<i?1:i,e.item===i?e:{...e,wait:e.size===i,item:i,list:[...e.list,...e.data[i]]};case"clear":return{load:!1,list:[],data:{},item:1,wait:!1,size:0};default:throw new Error}}function Sa({list:e,load:t,className:r,...i}){const a=b.useRef(null),[o,l]=b.useReducer(Ca,{load:!1,list:[],data:{},item:1,wait:!1,size:0});b.useEffect(()=>{a.current.scrollTop=0,e!==null&&l({type:"load",load:!0,data:e})},[t]);let d=()=>{a.current.scrollHeight-a.current.scrollTop-300<=a.current.clientHeight&&!o.wait&&l({type:"update"})};return n.jsx("div",{className:[ka.s,r].join(" "),ref:a,onScroll:d,children:n.jsx(ja,{"el-empty":"Данные не найдены",children:o.load&&o.list!==void 0?o.list.map(c=>n.jsx(i.item,{data:c},c.id)):n.jsxs("div",{"data-load":"load",children:[n.jsx("i",{}),n.jsx("i",{}),n.jsx("i",{})]})})})}const Ea=({label:e,onValue:t,value:r,name:i,item:a})=>{const[o,l]=b.useState(!!r);b.useEffect(()=>{l(!!r)},[r]);let d=()=>{let c=parseInt(o)===0?1:0;l(c),t({value:c,name:i,key:a,item:a})};return n.jsx("div",{role:"switch",onClick:d,"aria-checked":`${o?"true":"false"}`})},ye={};function Ba(e){const[t,r]=b.useState({}),i=b.useRef(e);ye.u=o=>{i.current={...i.current,[o.name]:o.value}},ye.r=()=>{r(Date.now())};const a=o=>{i.current[o.name]=o.value,o.reload&&ye.r()};return[i.current,a]}function Ta(e){ye.u(e),e.reload&&ye.r()}function Ia(){ye.r&&ye.r()}const $a={Color:Gt,Date:nt,Code:Ht,Check:rn,Switch:Wt,Button:Zt,Message:Ut,Generator:Yt,Captcha:Kt,Modal:it,Money:at,Month:Xt,Notes:Jt,Number:ot,Password:Qt,Phone:st,Search:en,Select:lt,Set:ut,Textarea:tn,Time:nn,Users:ct,String:dt,Form:ut,runReload:Ia,useData:Ba,setValue:Ta,Palette:Ea,Toogle:an,Group:on,Options:sn},_n={spinner:"_spinner_1ul0m_1",l:"_l_1ul0m_75",loadingB:"_loadingB_1ul0m_1"};function Na(){return n.jsx("div",{className:_n.spinner,children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 483 484",children:n.jsx("path",{d:"M264,492a22.2,22.2,0,0,0,22-22V411a22.2,22.2,0,0,0-22-22H236a22.2,22.2,0,0,0-22,22v59a22.2,22.2,0,0,0,22,22Zm74-134a23.9,23.9,0,0,0-6,16,20.35,20.35,0,0,0,6,15l42,42q7,7,16,7,10,0,16-7l20-20a20.35,20.35,0,0,0,6-15,23.9,23.9,0,0,0-6-16l-42-42q-7-7-16-7-8,0-15,7ZM163,389a18.94,18.94,0,0,0,7-15q0-9-7-16l-20-20q-7-7-16-7-8,0-15,7L70,380q-7,7-7,16a18.94,18.94,0,0,0,7,15l20,20q7,7,16,7a18.94,18.94,0,0,0,15-7ZM112,237a22.2,22.2,0,0,0-22-22H31a21.17,21.17,0,0,0-15.5,6.5A21.17,21.17,0,0,0,9,237v28a21.17,21.17,0,0,0,6.5,15.5A21.17,21.17,0,0,0,31,287H90a22.2,22.2,0,0,0,22-22Zm358,50a22.2,22.2,0,0,0,22-22V237a22.2,22.2,0,0,0-22-22H411a22.2,22.2,0,0,0-22,22v28a22.2,22.2,0,0,0,22,22ZM163,142q7-7,7-15.5T163,111L121,69q-7-7-15-7-7,0-16,7L70,89q-7,7-7,16a18.94,18.94,0,0,0,7,15l42,42a18.94,18.94,0,0,0,15,7q10,0,16-7Zm269-22a20.35,20.35,0,0,0,6-15,23.9,23.9,0,0,0-6-16L412,69q-7-7-16-7-7,0-16,7l-42,42q-7,8-7,16t7,15l21,20a18.94,18.94,0,0,0,15,7q10,0,16-7Zm-168-9a22.06,22.06,0,0,0,15.5-6q6.5-6,6.5-16V30a21.17,21.17,0,0,0-6.5-15.5A21.17,21.17,0,0,0,264,8H236a21.17,21.17,0,0,0-15.5,6.5A21.17,21.17,0,0,0,214,30V89q0,10,6.5,16a22.06,22.06,0,0,0,15.5,6Z",transform:"translate(-9 -8)"})})})}function Da(){return n.jsxs("div",{className:_n.l,children:[n.jsx("i",{}),n.jsx("i",{}),n.jsx("i",{})]})}const Ma={Spinner:Na,Inline:Da},bn={s:"_s_t9swc_1"};let xt;function za({className:e,placeholder:t}){let r=l=>{xt(l.target.textContent)},i=l=>{l.key==="Enter"&&l.preventDefault()},a=l=>{l.preventDefault(),navigator.clipboard.readText().then(d=>{window.document.execCommand("insertText",!1,d)}).catch(d=>{})};const o={};return t&&(o.placeholder=t),o.className=e?[bn.s,e].join(" "):bn.s,n.jsx("div",{onPaste:a,onInput:r,onKeyDown:i,contentEditable:"true",...o,suppressContentEditableWarning:!0})}function Fa(e,t,r){let i=[],a=1,o=0,l={},d=50;return l[a]=[],e.forEach(c=>{c.text.toLowerCase().indexOf(t)>-1&&i.push(c.id)}),i.forEach(c=>{o++,o<=d||(a++,o=1,l[a]=[]),l[a].push(r[c])}),l}function Pa(e){xt=e}function Ra(e){xt=e}const Oa={Field:za,Run:Fa,Get:Pa,useValue:Ra},La={f:"_f_q3r0i_1"};let X={};function Aa(e,t){switch(t.type){case"open":return{...e,open:t.open};case"view":return{...e,view:e.view===t.view?null:t.view};case"data":let r={};return Object.keys(t.data).forEach(a=>{a!=="sort"&&(r[a]=t.data[a],e.take[a]="999")}),{...e,data:r,take:e.take};case"size":return{...e,size:t.size};case"take":let i={[t.list]:t.take};i={...e.take,...i},e.active=!1;for(let a in i)i[a]!=="999"&&(e.active=!0);return X.get(i,e.active),{...e,take:i,active:e.active};case"exit":for(let a in e.take)e.take[a]="999";return X.get&&X.get([],!1),{...e,size:0,active:!1,take:e.take,open:!1};default:throw new Error}}function qa(){const[e,t]=b.useReducer(Aa,{open:!1,view:null,data:{},take:{},size:0,active:!1});return X.set=r=>{t({type:"data",data:r})},X.count=r=>{t({type:"size",size:r})},X.reset=()=>{t({type:"exit"})},n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:La.f,onClick:()=>{t({type:"open",open:!0})},children:[n.jsx(ra,{}),e.active&&n.jsxs("i",{children:[e.size,"1"]})]}),e.open?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"filter o",onClick:()=>{t({type:"open",open:!1})}}),n.jsxs("div",{className:"filter m",children:[n.jsx("div",{className:"filter l",children:Object.keys(e.data).map(r=>n.jsx(Ka,{data:r,dispatch:t,state:e},r))}),n.jsx("div",{className:"filter b",onClick:()=>{t({type:"exit"})},children:"Убрать фильтер"})]})]}):n.jsx(n.Fragment,{})]})}function Wa(e){X.get=e}function Za(e){X.set!==void 0&&X.set(e)}function Ua(e){X.reset!==void 0&&X.reset(e)}function Ya(e,t,r,i){let a=[],o=1,l=0,d={},c=50;return d[o]=[],i===!0&&(Object.keys(t).forEach(u=>{Number.parseInt(t[u])!==999&&(e=e.filter(f=>Number.parseInt(f[u])===Number.parseInt(t[u])))}),vn(e.length)),e.forEach(u=>{a.push(u.id)}),a.forEach(u=>{l++,l<=c||(o++,l=1,d[o]=[]),d[o].push(r[u])}),d}function vn(e){X.count(e)}function Ka({data:e,state:t,dispatch:r}){let i=()=>{r({type:"view",view:e})},a=()=>{r({type:"take",list:e,take:"999"})};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"filter s",children:[n.jsxs("div",{onClick:i,children:[" ",t.data[e].name," "]}),t.take[e]!=="999"?n.jsx("div",{onClick:a,className:"filter x","data-icon":"F038"}):""]}),n.jsx("div",{className:"filter u","set-active":(t.view===e)+"",children:Object.keys(t.data[e].list).map((o,l)=>n.jsx(Ha,{data:t.data[e].list[o],head:e,type:o,dispatch:r,state:t},l))})]})}function Ha({data:e,head:t,state:r,dispatch:i,type:a}){if(a!=="999"&&e.count===void 0)return"";const o=()=>{i({type:"take",list:t,take:a})};return n.jsxs("div",{className:"filter a",onClick:o,"set-active":(r.take[t]===a)+"",children:[e.name,n.jsx("div",{className:"filter e",children:e.count})]})}const Ga={Button:qa,useValue:Wa,Set:Za,Run:Ya,Count:vn,Reset:Ua},Va={Bell:ca,Send:sa,Add:oa};function Xa({active:e,onActive:t,id:r,name:i}){const[a,o]=b.useState(!!e);b.useEffect(()=>{o(!!e)},[e]);let l=()=>{let d=parseInt(a)===0?1:0;o(d),t&&t({value:d,name:i,id:r})};return n.jsx("div",{role:"switch",onClick:l,"aria-checked":`${a?"true":"false"}`})}const Ja={sort:"_sort_1yrvt_1"};let Ze={};function Qa(e,t){switch(t.type){case"active":let r="<";return e.active===t.data&&(r=e.sort==="<"?">":"<"),Ze.get({active:t.data,sort:r},!1),It({active:t.data,sort:r}),{...e,active:t.data,sort:r};default:throw new Error}}function eo(){const[e,t]=b.useReducer(Qa,Je()===void 0?{active:1,sort:"<"}:Je());return n.jsxs("div",{className:Ja.sort,children:[n.jsx("i",{"data-color":e.active===1?"_506290":"_b5b9cc","data-icon":e.active===1?e.sort==="<"?"F073":"F072":"F071",onClick:()=>t({type:"active",data:1})}),n.jsx("i",{"data-color":e.active===2?"_506290":"_b5b9cc","data-icon":e.active===2?e.sort==="<"?"F066":"F067":"F074",onClick:()=>t({type:"active",data:2})}),n.jsx("i",{"data-color":e.active===3?"_506290":"_b5b9cc","data-icon":e.active===3?e.sort==="<"?"F068":"F069":"F070",onClick:()=>t({type:"active",data:3})})]})}function to(e){Ze.get=e}function no(e){Ze.set(e)}function ro(e,t,r){let i=1,a=0,o={},l=50;o[i]=[];let d={},c="s1a";switch(d.s1a=(u,f)=>f.s1-u.s1,d.s1d=(u,f)=>u.s1-f.s1,d.s2a=(u,f)=>u.s2-f.s2,d.s2d=(u,f)=>f.s2-u.s2,d.s3a=(u,f)=>u.s3.localeCompare(f.s3),d.s3d=(u,f)=>f.s3.localeCompare(u.s3),r.active){case 1:c=r.sort===">"?"s1d":"s1a";break;case 2:c=r.sort===">"?"s2d":"s2a";break;case 3:c=r.sort===">"?"s3d":"s3a";break}return t.sort(d[c]).forEach(u=>{a++,a<=l||(i++,a=1,o[i]=[]),o[i].push(e[u.id])}),{data:o}}function io(e){Ze.count(e)}const ao={Init:eo,useValue:to,Set:no,Run:ro,Count:io};B.Action=cn,B.Alert=Gi,B.Api=qr,B.Button=qt,B.Component=Hi,B.DataBase=ya,B.Events=Le,B.Filter=Ga,B.Form=$a,B.Format=pe,B.Icon=ea,B.Init=Ri,B.Input=ln,B.Loading=Ma,B.Modal=rt,B.Notice=Ae,B.Notifications=Va,B.Router=se,B.Scrolling=Sa,B.Search=Oa,B.Setting=Ki,B.Sistym=Re,B.Socket=We,B.Store=oe,B.Switch=Xa,B.Tabs=dn,B.Telegram=S,B.Triage=ao,B.User=wa,Object.defineProperty(B,Symbol.toStringTag,{value:"Module"})});