elcrm 0.9.180 → 0.9.181

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.es.js CHANGED
@@ -7304,8 +7304,8 @@ const Kl = ({ label: e, onValue: t, value: n, name: a, item: s }) => {
7304
7304
  i(!!t);
7305
7305
  }, [t]);
7306
7306
  let o = () => {
7307
- let d = s ? 1 : 0;
7308
- i(d), e({ value: d, name: n, key: a, item: a });
7307
+ let d = s ? 0 : 1;
7308
+ i(!!d), e({ value: d, name: n, key: a, item: a });
7309
7309
  };
7310
7310
  return /* @__PURE__ */ r.jsx(
7311
7311
  "div",
package/dist/index.umd.js CHANGED
@@ -28,4 +28,4 @@ Check the top-level render call using <`+L+">.")}return S}}function mr(u,S){{if(
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} />`,Ut,Ne,Cl,Ne),hr[Ne+Ut]=!0}}return u===a?bl(X):xl(X),X}}function vl(u,S,L){return gr(u,S,L,!0)}function yl(u,S,L){return gr(u,S,L,!1)}var wl=yl,kl=vl;Ae.Fragment=a,Ae.jsx=wl,Ae.jsxs=kl}()),Ae}process.env.NODE_ENV==="production"?lt.exports=$r():lt.exports=Pr();var r=lt.exports;let pe={};function Fe({data:e}){let[t,n]=m.useState("show");m.useEffect(()=>{e.hide&&(setTimeout(function(){n("hide")},1800),setTimeout(function(){pe.del(e.key)},2500))},[e.key]);let a,i;switch(e.type){case"error":a=r.jsx(Ee.error,{}),i="Ошибка:";break;case"success":a=r.jsx(Ee.success,{}),i="Информация:";break;case"copy":a=r.jsx(Ee.success,{}),i="Копирование:";break;case"remark":a=r.jsx(Ee.success,{}),i="Подсказка:";break;default:a=r.jsx(Ee.success,{}),i="Предупреждение:";break}return r.jsxs("li",{className:"item "+e.type,"data-status":t,children:[a,r.jsx("b",{children:i}),r.jsx("p",{children:e.text})]})}function Ar({data:e}){let[t,n]=m.useState("show");return m.useEffect(()=>{e.hide&&(setTimeout(function(){n("hide")},1800),setTimeout(function(){pe.del(e.key)},2500))},[e.key]),r.jsx("li",{className:"item","data-status":t,children:e.text})}const Ee={};Ee.error=()=>r.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[r.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:"#bb2014"}),r.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:"#fff"})]}),Ee.success=()=>r.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[r.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:"#367738"}),r.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:"#fff"})]}),g.Notice=void 0,(e=>{function t(){let[l,_]=m.useState([]);return pe.set=d=>{_([...l,d])},pe.del=d=>{_(l.filter(p=>p.key!==d))},l.length===0?"":r.jsx("ul",{id:"notice",children:l.map(d=>d.item)})}e.Init=t;function n(l,_=!0){let d=Date.now(),p={key:d,text:l,hide:_,type:"error"};pe.set({item:r.jsx(Fe,{data:p},d),key:d})}e.Error=n;function a(l,_=!0){let d=Date.now(),p={key:d,text:l,hide:_,type:"success"};pe.set({item:r.jsx(Fe,{data:p},d),key:d})}e.Success=a;function i(l,_=!0){let d=Date.now(),p={key:d,hide:_,text:l};pe.set({item:r.jsx(Ar,{data:p},d),key:d})}e.Custom=i;function o(l){let _=Date.now(),d={key:_,hide:!0,...l};pe.set({item:r.jsx(Fe,{data:d},_),key:_})}e.Send=o;function s(l,_=!0){let d=Date.now(),p={key:d,text:l,hide:_,type:"remark"};pe.set({item:r.jsx(Fe,{data:p},d),key:d})}e.Remark=s;function c(l,_=!0){let d=Date.now(),p={key:d,text:l,hide:_,type:"copy"};pe.set({item:r.jsx(Fe,{data:p},d),key:d})}e.Copy=c})(g.Notice||(g.Notice={}));const dt={alerts:"_alerts_ita6j_1",menuAnimation:"_menuAnimation_ita6j_1",menuItemAnimation:"_menuItemAnimation_ita6j_1","--body":"_--body_ita6j_103",allert:"_allert_ita6j_111","--form":"_--form_ita6j_111",al:"_al_ita6j_1"};let Oe={};const Fr=({data:e,callback:t,cancel:n})=>(e.button=e.button===void 0?"Подтвердить":e.button,r.jsxs("div",{className:dt.alerts,children:[r.jsxs("dl",{children:[r.jsx("dt",{children:e.title}),r.jsx("dd",{children:e.text}),r.jsx("ul",{children:r.jsx("button",{color:e.color||"blue",onClick:()=>{t(),Oe.del()},children:e.button})})]}),r.jsx("div",{className:dt["--body"],onClick:()=>{n==null||n(),Oe.del()}})]}));g.Alert=void 0,(e=>{function t(){let[i,o]=m.useState("");return Oe.set=s=>o(s),Oe.del=()=>o(""),r.jsx(r.Fragment,{children:i})}e.Init=t;function n(i,o,s){Oe.set(r.jsx(Fr,{data:i,callback:o,cancel:s}))}e.Send=n;function a({text:i,type:o,button:s}){let[c,l]=m.useState(!1),_={active:o};const d=()=>{if(s){if(s.onClick)return s.onClick({});if(s.onSend)return c?void 0:(l(!0),s.onSend(l))}};return r.jsxs("div",{className:dt.al,..._,children:[r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",fillRule:"evenodd",clipRule:"evenodd",children:r.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"})}),r.jsx("span",{children:i}),s&&r.jsx("button",{onClick:d,children:s.label})]})}e.Line=a})(g.Alert||(g.Alert={}));function Or({children:e}){return r.jsx("div",{className:"l",children:r.jsx("ul",{children:e})})}const te={white:"_white_1g9i9_14",black:"_black_1g9i9_28",shake:"_shake_1g9i9_1",modal:"_modal_1g9i9_77",o:"_o_1g9i9_87",w:"_w_1g9i9_14",h:"_h_1g9i9_112",l:"_l_1g9i9_126",t:"_t_1g9i9_164",m:"_m_1g9i9_77",x:"_x_1g9i9_172",s:"_s_1g9i9_182",c:"_c_1g9i9_187",f:"_f_1g9i9_192",row:"_row_1g9i9_214",col:"_col_1g9i9_226",g:"_g_1g9i9_235","size-a":"_size-a_1g9i9_285","size-s":"_size-s_1g9i9_290","size-m":"_size-m_1g9i9_294","size-l":"_size-l_1g9i9_298","size-x":"_size-x_1g9i9_302","size-f":"_size-f_1g9i9_306",active:"_active_1g9i9_355",coincidence:"_coincidence_1g9i9_361",sa:"_sa_1g9i9_397",ss:"_ss_1g9i9_401",sm:"_sm_1g9i9_405",sl:"_sl_1g9i9_409",sx:"_sx_1g9i9_413",sf:"_sf_1g9i9_417",btn:"_btn_1g9i9_423"};function zr({children:e}){return r.jsx("div",{className:te.s,children:e})}function Rr({children:e,viev:t="row",className:n}){let a={};return n&&(a.className=n),r.jsx("ul",{className:[te.f,te[t],a.className].join(" "),children:e})}function Zr({children:e}){return r.jsx("div",{className:te.c,children:e})}function Ur({children:e}){return r.jsx("div",{className:te.g,children:e})}const oe={};function Wr(e){return e&&(oe.s=e),oe.s}function Gr(e){return e&&(oe.a=e),oe.a}function Kr(e){return e&&(oe.c=e),oe.c}function Yr(e){return e&&(oe.h=e),oe.h}function Hr(e){return e&&(oe.i=e),oe.i}function qr(e){return e&&(oe.d=e),oe.d}function He(e){return oe.i(e)}let qe={};function Jr({children:e}){return r.jsx(r.Fragment,{children:e})}g.Modal=void 0,(e=>{function t(){let[l,_]=m.useState([]);return qe.x=d=>{_(d?l.filter(p=>p.key!==d):[])},qe.add=(d,p=Date.now())=>{_([...l,{key:p,item:d}])},r.jsx(r.Fragment,{children:l.map(d=>d.item)})}e.Init=t,e.List=Or,e.Scroll=zr,e.Form=Rr,e.Center=Zr,e.Column=Ur;function n(l,_,d){He(`${l}/modal/${_}.tsx`).then(p=>{p.default.Open(d)})}e.Open=n;function a({type:l,name:_,params:d}){let[p,f]=m.useState(null);return m.useEffect(()=>{He(`${l}/modal/${_}.tsx`).then(h=>{f(h.default.Icon(d))})},[d.id]),r.jsx(r.Fragment,{children:p})}e.Icon=a;function i(l,_){qe.add(r.jsx(Jr,{children:l},String(Date.now())),_)}e.Add=i;function o(l){qe.x(l)}e.Close=o;function s(l){if(l.target.classList[0]!=="modal")return;let _=l.target.children[0];_.setAttribute("shake",!0),setTimeout(()=>{_.setAttribute("shake",!1)},1e3)}e.Shake=s;function c({title:l,children:_,button:d,tabs:p,size:f="m",className:h="",shake:b=!0,menu:x}){const[v,k]=m.useState(!0),w=m.useRef(),D=B=>{if(d){if(d.onClick)return B(!1),d.onClick({setOpen:k});if(d.onSend)return d.onSend({setOpen:k,disabled:B})}},T=()=>{if(!b)return k(!1);w.current.setAttribute("shake",!0),setTimeout(()=>{w.current.setAttribute("shake",!1)},1e3)};return v?r.jsxs("div",{className:`${te.modal}`,children:[r.jsx("div",{className:te.o,onClick:T}),r.jsxs("div",{className:[te.w,te[`s${f}`],h].join(" "),ref:w,children:[r.jsxs("div",{className:te.h,children:[r.jsx("div",{className:te.t,children:l}),r.jsxs("div",{className:te.m,children:[p&&r.jsx("nav",{children:p.map((B,N)=>r.jsx("span",{onClick:B.onClick,className:B.active?"active":"",children:B.name},N))}),x]}),r.jsx("div",{className:te.x,onClick:()=>{k(!1)},children:r.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:r.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"})})})]}),_,d!==void 0?r.jsx(xn,{label:d.label,onSend:D,className:te.btn}):""]})]}):""}e.Main=c})(g.Modal||(g.Modal={}));let ze={};const Xr=({content:e,position:t,orientation:n="up",update:a,textAlign:i})=>{const o=m.useRef(null);return m.useEffect(()=>{const s=o.current;s.style.opacity="0",s.style.width="auto",s.style.left="0px",s.style.top="0px";let c={x:0,y:0};const l=s.getBoundingClientRect();let _=t.width/2;s.style.width=l.width+"px";let d=0;switch(n){case"up":d=t.left+_-l.width/2-10,d=window.innerWidth<d+l.width?window.innerWidth-l.width-20:d,d=d<0?0:d,s.style.left=d+"px",s.style.top=t.top-l.height-10+"px",c.x=t.left+_,c.y=t.top-10;break;case"down":d=t.left+_-l.width/2,d=d<0?0:d,s.style.left=d+"px",s.style.top=t.bottom+10+"px";break;case"left":s.style.top=t.top+"px",s.style.left=t.left-l.width-t.width+"px";break;case"right":s.style.top=t.top+"px",s.style.left=t.right+"px";break}s.style.setProperty("--tooltip-arrow-x",c.x+"px"),s.style.setProperty("--tooltip-arrow-y",c.y+"px"),s.style.transition="opacity 0.3s",s.style.textAlign=i,s.style.opacity="1"},[a]),r.jsx("div",{ref:o,className:"tooltip",children:e})};g.Tooltip=void 0,(e=>{e.Init=()=>{let[t,n]=m.useState("");return ze.set=a=>n(a),ze.del=()=>n(""),r.jsx(r.Fragment,{children:t})},e.Text=({content:t,children:n,className:a,textAlign:i="center",orientation:o="down",dev:s,...c})=>{const l=d=>{c.element?ze.set(r.jsx(c.element,{content:t,position:d.currentTarget.getBoundingClientRect(),textAlign:i,update:Date.now()})):ze.set(r.jsx(Xr,{update:Date.now(),orientation:o,content:t,textAlign:i,position:d.currentTarget.getBoundingClientRect()}))},_=()=>{s||ze.del()};return r.jsx("span",{className:a,onMouseOver:l,onMouseOut:_,children:n})}})(g.Tooltip||(g.Tooltip={}));const Ie={key:"Y0zt37HgOx-BY7SQjYVmrqhPkO41Ii2Jcb9yydUDPf6",iterations:7,saltLength:16},Je=e=>{let t=0;for(let a=0;a<e.length;a++){const i=e.charCodeAt(a);t=(t<<5)-t+i,t=t&t}t=Math.abs(t);let n="";for(let a=0;a<64;a++){const i=(t^a*197)&255;n+=i.toString(16).padStart(2,"0")}return n},rn=(e,t)=>{let n=e+t;for(let i=0;i<Ie.iterations;i++)n=Je(n);const a=new Uint8Array(32);for(let i=0;i<32;i++)a[i]=parseInt(n.substring(i*2,i*2+2),16);return a},an=(e,t)=>{const n=new Uint8Array(e.length),a=new Uint8Array(e.length);let i=0;for(let o=0;o<e.length;o++){const s=o%t.length;i=t[s]+o+i&255,a[o]=i}for(let o=0;o<e.length;o++)n[o]=e[o]^a[o];return n},Vr=e=>new TextEncoder().encode(e),Qr=e=>new TextDecoder().decode(e),ea=e=>{let t="";for(let a=0;a<e.length;a+=8192){const i=e.slice(a,Math.min(a+8192,e.length));t+=String.fromCharCode.apply(null,Array.from(i))}return btoa(t)},ta=e=>{const t=atob(e),n=new Uint8Array(t.length);for(let a=0;a<t.length;a++)n[a]=t.charCodeAt(a);return n},na=e=>{try{const t=Je(Date.now().toString()+Math.random()).substring(0,Ie.saltLength*2),n=Je(e+t).substring(0,8),a=rn(Ie.key,t),i=Vr(e),o=an(i,a),s=ea(o);return`${t}.${s}.${n}`}catch{throw new Error("Не удалось зашифровать данные")}},ra=e=>{try{const t=e.split(".");if(t.length!==3)throw new Error("Неверный формат зашифрованных данных");const n=t[0],a=t[1],i=t[2],o=rn(Ie.key,n),s=ta(a),c=an(s,o),l=Qr(c);if(Je(l+n).substring(0,8)!==i)throw new Error("Контрольная сумма не совпадает");return l}catch{return""}};g.Crypto=void 0,(e=>{e.setKey=t=>{Ie.key=t},e.enCode=t=>{try{const n=JSON.stringify(t);return na(n)}catch{throw new Error("Не удалось зашифровать объект")}},e.deCode=t=>{try{if(!t||t.length<10)return!1;const n=ra(t);return n&&JSON.parse(n)||!1}catch{return!1}},e.setSecurityParams=(t,n)=>{Ie.iterations=t,Ie.saltLength=n}})(g.Crypto||(g.Crypto={}));const z={},A={},he={module:"",page:"Auth",main:"Main"};g.Router=void 0,(e=>{async function t(){let y=sessionStorage.getItem("f");if(y){if(y=await g.Crypto.deCode(y),!y)return!1;A.id=y.id,A.tab=y.tab,A.page=y.page,A.module=y.module,A.time=y.time,A.payment={active:!0},A.module_admin=y.module_admin}else A.id=0,A.tab="",A.page=he.main,A.module=he.module;return!0}e.Load=t;function n(){A.id=0,A.tab="",A.page=he.page,A.module=he.module}e.Reset=n;function a({module:y=he.module,page:C=he.page,main:F=he.main}){he.page=C,he.module=y,he.main=F}e.Default=a;function i(){const[y,C]=m.useState(s()),F=E=>{C(E)};return z.page=F,[y]}e.usePage=i;async function o(y,C=!0){A.page=y,sessionStorage.setItem("f",await g.Crypto.enCode(A)),z.dynamicURL&&z.dynamicURL(A),C&&z.page(y)}e.setPage=o;function s(){return A.page}e.getPage=s;function c(y){return A.page===y}e.isPage=c;function l(y,C){if(typeof y!="function"){const[F,E]=m.useState(!C),[M,I]=m.useState(y||d());return z.module=I,C&&m.useEffect(()=>{E(!0)},[]),[M,F]}else z.module=y}e.useModule=l;async function _(y,C=!0){A.module=y,sessionStorage.setItem("f",await g.Crypto.enCode(A)),z.dynamicURL&&z.dynamicURL(A),C&&z.module(y)}e.setModule=_;function d(){return A.module}e.getModule=d;function p(y){return A.module===y}e.isModule=p;function f(y,C){if(typeof y!="function"){const[F,E]=m.useState(y||b()),[M,I]=m.useState(!C);return C&&m.useEffect(()=>{I(!0)},[]),z.tabs=E,[F,M]}else z.tabs=y}e.useTabs=f;async function h(y,C=!0){if(A.tab=y,sessionStorage.setItem("f",await g.Crypto.enCode(A)),z.dynamicURL&&z.dynamicURL(A),!!C)if(z.tabs)z.tabs(y);else throw new Error("useTabs not found")}e.setTabs=h;function b(){return A.tab}e.getTabs=b;function x(y){return A.tab===y}e.isTabs=x;function v(y){if(typeof y!="function"){const[C,F]=m.useState(y||D()),E=M=>{F(M)};return z.id=E,[C]}else z.id=y}e.useId=v;function k(y){z.id=y}e.subId=k;async function w(y,C=!0){A.id=y,sessionStorage.setItem("f",await g.Crypto.enCode(A)),z.dynamicURL&&z.dynamicURL(A),C&&z.id(y)}e.setId=w;function D(){return A.id}e.getId=D;function T(y){return Number(A.id)===y}e.isId=T;async function B(y,C,F){A.module=y,A.id=F,A.tab=C,sessionStorage.setItem("f",await g.Crypto.enCode(A)),z.dynamicURL&&z.dynamicURL(A),z.module(y),z.tabs(C)}e.Path=B;async function N(y,C,F,E){var M,I,j;if(A.page===y)if(A.module===C){if(A.tab=F||"",A.id=E||0,A.tab==="")return;(M=z.tabs)==null||M.call(z,F)}else A.module=C,A.tab=F||"",A.id=E||0,(I=z.module)==null||I.call(z,C);else A.module=C,A.tab=F||"",A.id=E||0,A.page=y,(j=z.page)==null||j.call(z,y);sessionStorage.setItem("f",await g.Crypto.enCode(A)),z.dynamicURL&&z.dynamicURL(A)}e.Push=N})(g.Router||(g.Router={}));function aa(e,t){t===void 0?(t=e,e=new Date):e=new Date(e);let n={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 a in n)t=t.replace(a,n[a]);return t}function ia(e){let t=["Января","Февраля","Марта","Апреля","Мая","Июня","Июля","Августа","Сентября","Октября","Ноября","Декабря"],n=new Date(e);return{day:(""+n.getFullYear()).slice(-2)+""+("0"+(n.getMonth()+1)).slice(-2)+("0"+n.getDate()).slice(-2),name:n.getDate()+" "+t[n.getMonth()]}}const oa=e=>{function t(D,T){var B,y,N;D=D??"",T=T??1;for(var B=[],N=0,y=D.length;N<y;)B.push(D.slice(N,N+=T));return B}function n(D,T){var B=[2,0,1,1,1,2];return T[D>4&&D<20?2:B[Math.min(D,5)]]}var a={null:"ноль",a1:["один","два","три","четыре","пять","шесть","семь","восемь","девять"],a2:["одна","две","три","четыре","пять","шесть","семь","восемь","девять"],a10:["десять","одиннадцать","двенадцать","тринадцать","четырнадцать","пятнадцать","шестнадцать","семнадцать","восемнадцать","девятнадцать"],a20:["двадцать","тридцать","сорок","пятьдесят","шестьдесят","семьдесят","восемьдесят","девяносто"],a100:["сто","двести","триста","четыреста","пятьсот","шестьсот","семьсот","восемьсот","девятьсот"],uc:["копейка","копейки","копеек"],ur:["рубль","рубля","рублей"],u3:["тысяча","тысячи","тысяч"],u2:["миллион","миллиона","миллионов"],u1:["миллиард","миллиарда","миллиардов"]},i,o,s,c,v,l,_,x,d,p,f,h;d=parseFloat(e).toFixed(2).split("."),l=d[0],c=d[1];var b=12-l.length;if(b<0)return!1;for(var x=[];b--;)x.push("0");l=x.join("")+l;var v=[];if(l>0){p=t(l,3);for(var k=-1;k<p.length;k++)if(_=p[k],_>0&&(f=t(_,1),i=parseInt(f[0]),o=parseInt(f[1]),s=parseInt(f[2]),v.push(a.a100[i-1]),h=k+1==3?"a2":"a1",o>1?v.push(a.a20[o-2]+(s>0?" "+a[h][s-1]:"")):v.push(o>0?a.a10[s]:a[h][s-1]),p.length>k+1)){var w=a["u"+(k+1)];v.push(n(_,w))}}else v.push(a.null);return v.push(n(l,a.ur)),v.push(c+" "+n(c,a.uc)),v.join(" ").replace(RegExp(" {2,}","g")," ").trimLeft()};function sa(e){let t=-1,n=[" kB"," MB"," GB"," TB","PB","EB","ZB","YB"];do e=e/1024,t++;while(e>1024);return Math.max(e,.1).toFixed(1)+n[t]}function la(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 da(e,t,n,a){let i={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 s in this.rules)for(var c in this.rules[s])for(var l=0,_=this.rules[s][c].length;l<_;l++)this.rules[s][c][l]=this.rule(this.rules[s][c][l])},rule:function(s){var c=s.match(/^\s*([fm]?)\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s*$/);return c?{sex:c[1],test:c[2].split(","),mods:[c[3],c[4],c[5],c[6],c[7]]}:!1},word:function(s,c,l,_){if(_===this.gcaseNom)return s;if(s.match(/[-]/)){for(var d=s.split("-"),p=0,f=d.length;p<f;p++)d[p]=this.word(d[p],c,l,_);return d.join("-")}if(s.match(/^[А-ЯЁ]\.?$/i))return s;this.init();var h=this.rules[l];let b;return h.exceptions&&(b=this.pick(s,c,_,h.exceptions,!0),b)?b:(b=this.pick(s,c,_,h.suffixes,!1),b||s)},pick:function(s,c,l,_,d){let p=s.toLowerCase();for(var f=0,h=_.length;f<h;f++)if(this.ruleMatch(p,c,_[f],d))return this.applyMod(s,l,_[f]);return!1},ruleMatch:function(s,c,l,_){if(l.sex===this.sexM&&c===this.sexF||l.sex===this.sexF&&c!==this.sexF)return!1;for(var d=0,p=l.test.length;d<p;d++){var f=_?s:s.substr(Math.max(s.length-l.test[d].length,0));if(f===l.test[d])return!0}return!1},applyMod:function(s,c,l){let _;switch(c){case this.gcaseNom:_=".";break;case this.gcaseGen:_=l.mods[0];break;case this.gcaseDat:_=l.mods[1];break;case this.gcaseAcc:_=l.mods[2];break;case this.gcaseIns:_=l.mods[3];break;case this.gcasePos:_=l.mods[4];break}for(var d=0,p=_.length;d<p;d++){var f=_.substr(d,1);switch(f){case".":break;case"-":s=s.substr(0,s.length-1);break;default:s+=f}}return s},getSex:()=>{if(i.mn.length>2)switch(i.mn.substr(i.mn.length-2)){case"ич":return"m";case"на":return"f"}return""},fullName:s=>((i.fullNameSurnameLast?"":i.lastName(s)+" ")+i.firstName(s)+" "+i.middleName(s)+(i.fullNameSurnameLast?" "+i.lastName(s):"")).replace(/^ +| +$/g,""),lastName:s=>i.word(i.ln,i.sex,"lastName",s),firstName:s=>i.word(i.fn,i.sex,"firstName",s),middleName:s=>i.word(i.mn,i.sex,"middleName",s)};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],n=o[3],i.fullNameSurnameLast=!0):(e=o[1],t=o[3],n=o[5])}return i.ln=e,i.fn=t||"",i.mn=n||"",i.sex=a||i.getSex(),i}function ca(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 _a(e){return e=typeof e=="number"?e:new Date(e).getMonth()+1,{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 ua(e,t){return t&&(e=Number(e)/t),parseFloat(e).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g,"$1 ")}function fa(e,t){let n=t+"";for(;n.length<e;)n="0"+n;return n}function ma(e,t,n){let a=t/e*n;return(typeof a!="number"||a===1/0)&&(a=0),parseFloat(a).toFixed(1)}function pa(e){return e.charAt(0).toUpperCase()+e.slice(1)}function ha(e,t){e=Math.abs(e)%100;let n=e%10;return e>10&&e<20?t[2]:n>1&&n<5?t[1]:n===1?t[0]:t[2]}const on={},sn={},le={},ge={},Te={};let ke="",fe={};function ga(e,t){const[n,a]=m.useState(!1);return m.useEffect(()=>{let i=localStorage.getItem("d");i?(async()=>{let o=await g.Router.Load();if(o)return a(!0);t==null||t(o),t&&alert("Router.Load Error"),ne()})():(t==null||t(i),t&&alert("No SSID"),["a","b","c","d","e","m","u","s","p","q","w"].forEach(o=>localStorage.removeItem(o)),["f"].forEach(o=>sessionStorage.removeItem(o)),g.Router.Reset(),a(!0))},[]),n?e:""}function ne(){["a","b","c","d","e","m","u","s","q","p","t","w"].forEach(e=>localStorage.removeItem(e)),["f"].forEach(e=>sessionStorage.removeItem(e)),window.history.pushState({},"","/"),window.location.reload()}function xa(e){return localStorage.setItem("d",e)}function ba(){let e=localStorage.getItem("d");return e!==""&&e!=="undefined"&&e!==null?e:""}function va(e){return localStorage.setItem("a",e)}function ya(){let e=localStorage.getItem("a");return e!==""&&e!=="undefined"&&e!==null?e:""}async function wa(e){localStorage.setItem("p",await g.Crypto.enCode(e))}function ka(){let e=localStorage.getItem("p");if(e!==""&&e!=="undefined"&&e!==null){let t=g.Crypto.deCode(e);return t||ne(),t}else return ne(),!1}function Ca(e,t){on.data[e]=t,localStorage.setItem("s",g.Crypto.enCode(on.data))}function ja(e){let t=localStorage.getItem("s");return t===null?{}:(t=g.Crypto.deCode(t),t?e!==void 0?t[e]:t:ne())}async function Sa(e){localStorage.setItem("m",await g.Crypto.enCode({data:e}))}function Ea(){let e=localStorage.getItem("m");if(e!==""&&e!=="undefined"&&e!==null){let t=localStorage.getItem("m");if(t===null)return!1;let n=g.Crypto.deCode(t);n||ne();const a=(o,s)=>{let c=s+"";for(;c.length<o;)c="0"+c;return c};return n.data.split(",").map(o=>"M"+a(2,o))}else return ne(),!1}function Ia(e){}function ln(e){let t=localStorage.getItem("b");t=t===null?{}:g.Crypto.deCode(t),t[g.Router.getTabs()]=e,localStorage.setItem("b",g.Crypto.enCode(t))}function ct(){let e=localStorage.getItem("b");return e===null?{}:(e=g.Crypto.deCode(e),e=e[g.Router.getTabs()],e=e===void 0?{active:1,sort:"<"}:e,e)}function Da(e){localStorage.setItem("c",g.Crypto.enCode(e))}function dn(e,t){var a;let n=localStorage.getItem("c");if(n!==""&&n!=="undefined"&&n!==null){let i=g.Crypto.deCode(n);return i||ne(),e===void 0?i:t?(a=i[e][t])==null?void 0:a.n:i[e]}else return ne(),!1}function Na(e){ge.data=e,localStorage.setItem("q",g.Crypto.enCode(ge.data))}function Ta(e,t){ge.data={...ge.data,[e]:t},localStorage.setItem("q",g.Crypto.enCode(ge.data))}function Re(e,t){if(!ge.data){let n=localStorage.getItem("q");n&&(ge.data=g.Crypto.deCode(n))}return e===void 0&&t===void 0?ge.data:e!==void 0&&t===void 0?ge.data[e]:ge.data[e][t]}function Ba(e){sn.data=e}function La(e){return sn.data[e]}function Ma(e){}function $a(){}async function Pa(){if(Te.data)return Te.data;let e=localStorage.getItem("u");if(e!==""&&e!=="undefined"&&e!==null){let t=await g.Crypto.deCode(e);return t||ne(),Te.data=t,t}else return ne(),!1}function Aa(){let e=localStorage.getItem("u");return e!==""&&e!=="undefined"&&e!==null?g.Crypto.deCode(e):!1}function Fa(e){Te.data=e,localStorage.setItem("u",g.Crypto.enCode(e))}function Oa(e){return e?Te.data[e]:Te.data||{}}function za(){let e=localStorage.getItem("e");if(e!==""&&e!=="undefined"&&e!==null)try{let t=g.Crypto.deCode(e);return t||ne(),t}catch{return{}}else return{}}function Ra(e){const t=async n=>{let a=localStorage.getItem(n);if(a!==""&&a!=="undefined"&&a!==null)try{let i=await g.Crypto.deCode(a);if(!i)return;fe[n]={is:!0,time:i.time,data:i.data}}catch{fe[n]={is:!1,time:0,data:{}}}else fe[n]={is:!1,time:0,data:{}}};e.forEach(n=>t(n))}function Za(e){return fe[e]===void 0?(fe[e]={data:{},time:0},{data:{},time:0}):fe[e]}function Ua(e,t){fe[e]={data:t.data,time:t.time},localStorage.setItem(e,g.Crypto.enCode(fe[e]))}function Wa(e,t){le[e]=t,localStorage.setItem("t",g.Crypto.enCode(le))}function Ga(e){if(Object.keys(le).length===0){let t=localStorage.getItem("t");if(t!==""&&t!=="undefined"&&t!==null){let n=g.Crypto.deCode(t);return n||ne(),Object.keys(n).forEach(a=>{le[a]=n[a]}),e?le[e]:le}else return ne(),{}}else return e?le[e]:le}function Ka(e){if(Object.keys(le).length===0){let t=localStorage.getItem("t");if(t!==""&&t!=="undefined"&&t!==null){let n=g.Crypto.deCode(t);return n?(Object.keys(n).forEach(a=>{le[a]=n[a]}),!!le[e]):!1}else return!1}else return!!le[e]}async function Ya(e,t,n){fe[e].time=n,fe[e].data[t.item][t.name]=t.value,localStorage.setItem(e,await g.Crypto.enCode(fe[e]))}function Ha(){var n;let t=(n=new URLSearchParams(window.location.search.substring(1)).get("devmod"))==null?void 0:n.trim();if(t)try{return JSON.parse(t||"{}")}catch{return g.Notice.Error("Error parse devMod"),{}}}function cn(){return ke===""?(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))!=-1?(ke="Opera","Opera"):navigator.userAgent.indexOf("Edg")!=-1?(ke="Edg","Edg"):navigator.userAgent.indexOf("Chrome")!=-1?(ke="Chrome","Chrome"):navigator.userAgent.indexOf("Safari")!=-1?(ke="Safari","Safari"):navigator.userAgent.indexOf("Firefox")!=-1?(ke="Firefox","Firefox"):(ke="unknown","unknown"):ke}function qa(e){return cn()===e}function Ja(e,t,n){return Re(e,t)?Re(e,t).n:n||""}function Xa(e,t,n,a){return Re(e,t)?Re(e,t)[n]:a||""}function Va(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=Math.random()*16|0,n=e=="x"?t:t&3|8;return n.toString(16)})}function Qa(e,t){return t&&(e=e===0?7:e),{1:{name:"Понедельник",names:"Понедельника",abc:"пн"},2:{name:"Вторник",names:"Вторника",abc:"вт"},3:{name:"Среда",names:"Среды",abc:"ср"},4:{name:"Четверг",names:"Четверга",abc:"чт"},5:{name:"Пятница",names:"Пятницы",abc:"пт"},6:{name:"Суббота",names:"Субботы",abc:"сб"},7:{name:"Воскресенье",names:"Воскресенья",abc:"вс"}}[e]}function ei(e,t){return e.reduce(function(n,a){let i=t instanceof Function?t(a):a[t];return n[i]!==void 0||(n[i]={}),n[i][a.id]=a,n},{})}function ti(e){return parseInt((Date.now()-new Date(e).getTime())/31536e6+"")+""}function ni(e){return["number","string"].includes(typeof e)?!isNaN(Number(e))&&!isNaN(parseFloat(e)):!1}function ri(e){var t="",n={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"e",ж:"zh",з:"z",и:"i",й:"y",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"h",ц:"c",ч:"ch",ш:"sh",щ:"sch",ь:"",ы:"y",ъ:"",э:"e",ю:"yu",я:"ya",А:"A",Б:"B",В:"V",Г:"G",Д:"D",Е:"E",Ё:"E",Ж:"Zh",З:"Z",И:"I",Й:"Y",К:"K",Л:"L",М:"M",Н:"N",О:"O",П:"P",Р:"R",С:"S",Т:"T",У:"U",Ф:"F",Х:"H",Ц:"C",Ч:"Ch",Ш:"Sh",Щ:"Sch",Ь:"",Ы:"Y",Ъ:"",Э:"E",Ю:"Yu",Я:"Ya"};for(let a=0;a<e.length;++a)n[e[a]]==null?t+=e[a]:t+=n[e[a]];return t}function ai(e,t,n=!1){return n?e.sort((a,i)=>i[t]-a[t]):e.sort((a,i)=>a[t]-i[t])}function ii(e,t){return e.reduce(function(n,a){let i=t instanceof Function?t(a):a[t];return n[i]!==void 0||(n[i]={}),n[i][a.id]=a,n},{})}function oi(e,t,n=!1){return n?e.sort((a,i)=>new Date(i[t]).getTime()-new Date(a[t]).getTime()):e.sort((a,i)=>new Date(a[t]).getTime()-new Date(i[t]).getTime())}function si(e,t){return e.reduce((n,a)=>n+(a[t]||0),0)}function li(e,t,n,a=!1){return a?e.sort((i,o)=>n(o[t])-n(i[t])):e.sort((i,o)=>n(i[t])-n(o[t]))}function di(e){return{style:{background:`var(--color-${e})`}}}const K={Age:ti,ArraySort:ai,ArrayGroup:ii,ArraySortDate:oi,ArraySortFunction:li,ArraySumma:si,Translit:ri,Date:aa,ColorBackground:di,MoneyString:oa,DateSort:ia,UUID:Va,Size:sa,TypeFiles:la,Cases:da,Initials:ca,Month:_a,Money:ua,Number:fa,Percent:ma,CapitalizeFirstLetter:pa,DeclensionWord:ha,Select:Ja,SelectParams:Xa,ObjectByArray:ei,isNumeric:ni,Week:Qa,set:(e,t)=>{K[e]=t}},ci={Counter:({before:e,from:t=0,to:n,secund:a=3})=>{const i=m.useRef();return m.useEffect(()=>{i.s=!0;const o=1e3,s=n/(a*10);i.n=0;let c=o/(n/s),l=e?e+" ":"";return i.i=setInterval(()=>{if(!i.s)return i.current.textContent=`${l}`+K.Money(n),clearInterval(i.i);if(n===0)return i.current.textContent=`${l}`+K.Money(n),clearInterval(i.i);i.n=i.n+s,i.n>n&&i.n>=n&&(i.n=n,clearInterval(i.i)),i.current&&(i.current.textContent=`${l}`+K.Money(i.n))},c),()=>{i.s=!1,clearInterval(i.i)}},[t,n]),r.jsx("span",{ref:i})}},ye={setSSID:xa,getSSID:ba,getPORT:ka,setPORT:wa,setAUTH:va,getAUTH:ya,Logaut:ne,setMenu:Sa,getMenu:Ea,useSort:Ia,setSort:ln,getSort:ct,setCompany:Da,getCompany:dn,setSelect:Na,addSelect:Ta,getSelect:Re,setApi:Ba,getApi:La,setPayment:Ma,getPayment:$a,setUser:Fa,isUser:Aa,initUser:Pa,getUser:Oa,getBase:Za,setBase:Ua,isData:Ka,setData:Wa,getData:Ga,editBase:Ya,loadBase:Ra,devMod:Ha,isBrowser:qa,getBrowser:cn},re={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"},_n=({title:e,left:t,right:n,children:a})=>r.jsxs("div",{className:re.h,children:[r.jsx("div",{className:re.t,children:e}),t&&r.jsx("div",{className:re.hl,children:t}),n&&r.jsx("div",{className:re.hr,children:n}),a]}),un=({children:e,...t})=>r.jsx("div",{className:re.l,children:e}),fn=({children:e})=>r.jsx("div",{className:re.s,children:e}),mn=({children:e,edit:t})=>{const n={};return t&&(n.edit=""),r.jsx("div",{...n,className:re.f,children:e})};function pn({children:e}){return r.jsx("div",{className:re.g,children:e})}const _i=({children:e,className:t,title:n})=>r.jsxs("div",{className:[re.o,t].join(" "),children:[n&&r.jsx("div",{className:re.hh,children:n}),e]}),ui=({children:e})=>r.jsx("div",{className:re.u,children:e}),fi=({children:e})=>r.jsx("div",{className:re.c,children:e}),mi=({children:e})=>r.jsx("div",{className:re.m,children:e}),pi=g.Alert.Line,_t={Header:_n,Section:fn,Group:pn,Form:mn,List:un,A:pi,U:ui,G:pn,C:fi,L:un,O:_i,S:fn,H:_n,M:mi,F:mn},hi=(e,t)=>{switch(t.type){case"load":return{...e,list:t.list.reverse(),load:!1};case"id":return{...e,id:t.id};case"add":return{...e,list:[t.data,...e.list]};case"update":return{...e,list:e.list.map(n=>n.id===t.data.id?Object.assign({},n,{[t.data.name]:t.data.value}):n),temp:e.temp.map(n=>n.id===t.data.id?Object.assign({},n,{[t.data.name]:t.data.value}):n)};case"view":return{...e,view:e.view==="card"?"item":"card"};case"revers":return{...e,list:[...e.list.reverse()],temp:[...e.temp.reverse()],revers:!e.revers};case"delete":return{...e,list:e.list.filter(n=>n.id!==t.id)};case"edit":return{...e,list:e.list.map(n=>n.id===t.j.item?Object.assign({},n,{[t.j.name]:t.j.value}):n)};default:return e}},gi=()=>({load:!0,list:[],name:"Файлы",add:!1,search:!1,revers:!0}),xi=()=>{let[e,t]=m.useState([]);return r.jsx(r.Fragment,{children:e.length!==0?r.jsxs("div",{className:"upload view",children:[r.jsxs("div",{className:"--head",children:[r.jsx("b",{children:"Загрузки"}),r.jsx("i",{className:"x",onClick:()=>t([]),"data-icon":"F038"})]}),r.jsx("div",{className:"--list",children:e.map(n=>n)})]}):""})},bi=({id:e,name:t,listen:n,dir:a})=>{t=t||"Файлы";const[i,o]=m.useReducer(hi,{},gi),s=()=>{g.Modal.Add(r.jsx(vi,{dir:a,dispatch:o,id:e},new Date().getTime()))};return m.useEffect(()=>{},[e,a]),r.jsxs(_t.O,{children:[" ",r.jsx(_t.H,{title:t,right:r.jsx("i",{className:"f025","data-icon":"C005 25 pointer","data-color":"_b5b9cc :506290",onClick:s}),left:r.jsx("i",{className:"f025","data-icon":"E009 25","data-color":"_2196f3"})}),r.jsx("ul",{"data-empty":"Файлов нет",className:"files_list",children:i.load?r.jsxs("div",{"type-load":"load",children:[r.jsx("i",{}),r.jsx("i",{}),r.jsx("i",{})]}):i.list.length===0?r.jsx(r.Fragment,{}):i.list.map((c,l)=>r.jsx(yi,{dispatch:o,data:c},l))})]})},vi=({id:e,dir:t,dispatch:n})=>{let[a,i]=m.useState(!0),o=m.useRef(null),s=_=>{_.preventDefault(),_.stopPropagation()},c=_=>{},l=_=>{};return m.useEffect(()=>{let _=o.current;["dragenter","dragover","dragleave","drop"].forEach(d=>{_.addEventListener(d,s,!1),document.body.addEventListener(d,s,!1)}),["dragenter","dragover"].forEach(d=>{_.addEventListener(d,c,!1)}),["dragleave","drop"].forEach(d=>{_.addEventListener(d,l,!1)})},[]),r.jsx(r.Fragment,{children:a?r.jsx(r.Fragment,{children:r.jsx("div",{className:"modal o ",onClick:g.Modal.Shake,children:r.jsxs("div",{className:"b",children:[r.jsx("div",{className:"h",children:"Загрузка файлов"}),r.jsx("div",{className:"x","data-icon":"F038",onClick:()=>{i(!1)}}),r.jsxs("div",{className:"upload",ref:o,children:[r.jsx("input",{type:"file",id:"fileElem",name:"files",multiple:!0}),r.jsx("dd",{}),r.jsx("i",{"data-icon":"F061"})]})]})},new Date().getTime())}):""})},yi=({data:e,dispatch:t})=>{let n=async()=>{let o=await(await fetch(g.Api.url().files+"/yandex/data/"+e.id,{headers:{"Content-type":"application/json;charset=utf-8",SSID:ye.getSSID()||""}})).blob();if(o.size!==2){let s=new Blob([o],{type:o.type});s=URL.createObjectURL(s);let c=document.createElement("a");c.setAttribute("href",s),c.setAttribute("download",e.name),c.click()}},a=async()=>{(await(await fetch(g.Api.url().files+"/yandex/delete/"+e.id,{headers:{"Content-type":"application/json;charset=utf-8",SSID:ye.getSSID()||""}})).json()).status==="success"&&(t({type:"delete",id:e.id}),g.Notice.Send({type:"success",text:"Файл успешно удалён"}))};return r.jsxs("li",{children:[r.jsx("div",{className:"f035",children:K.TypeFiles(e.type)}),r.jsx("div",{className:"f100",children:K.Date(e.uDate,"dd.mm.yy")}),r.jsx("div",{className:"f000",children:e.name}),r.jsxs("div",{className:"f050 flex button",children:[r.jsx("i",{className:"f025","data-icon":"F060 35 pointer","data-color":"_b5b9cc :4CAF50",onClick:n}),r.jsx("i",{className:"f025","data-icon":"F048 35 pointer","data-color":"_b5b9cc :FF9800",onClick:a})]}),r.jsx("div",{className:"f080",children:K.Size(e.size)})]})};let ae={};ae.list=za(),ae.active=null;const wi=()=>{var i;let[e,t]=m.useState([]),[n,a]=m.useState();return m.useEffect(()=>{(async()=>{let o=Object.keys(ae.list);if(o.length!==0){let s=[];o.forEach((c,l)=>{s.push({item:r.jsx(ut,{data:ae.list[c]},ae.list[c].id),link:ae.list[c].link})}),t(s)}})()},[]),ae.active=o=>{var s;a(o),(s=document.querySelector("app-body"))==null||s.setAttribute("bookmarks",o===1?"bottom":"")},ae.set=o=>{t([...e,{item:r.jsx(ut,{data:o},o.id),link:o.link}])},ae.del=o=>{e.forEach((s,c)=>{s.link===o&&e.splice(c,1)}),t([...e])},(i=document.querySelector("app-body"))==null||i.setAttribute("bookmarks",n===1&&e.length!==0?"bottom":""),n!==0?r.jsx(r.Fragment,{children:e.length!==0?r.jsx("div",{className:"bookmarks",children:e.map(o=>o.item)}):""}):""},ki=({id:e,type:t,name:n})=>{let a=t+"-"+e,[i,o]=m.useState(ae.list[a]!==void 0);return m.useEffect(()=>{o(ae.list[a]!==void 0)},[a]),r.jsx(r.Fragment,{children:""})},ut=({data:e})=>{let t=a=>{a.preventDefault(),delete ae.list[e.link],ae.del(e.link)},n=()=>{g.Router.setId(e.id)};return r.jsx("span",{onContextMenu:t,onClick:n,children:e.name})},Ci=e=>{ae.active(e)},q={},ft={},P={};P.config={iceServers:[{url:"stun:stun.l.google.com:19302"}]},P.constraints={optional:[{DtlsSrtpKeyAgreement:!0}]},P.other=[],P.users={},P.asset=0,P.remoute=!1,P.stream=null,P.user=0,P.connect=!1,P.offer=null,P.btnRefuse=null,P.time=!1;let De;De=document.createElement("audio"),De.setAttribute("autoplay","true"),De.setAttribute("muted","true"),q.start=async e=>{P.rtc=new RTCPeerConnection(P.config),P.other=[],P.remoute=!1,P.rtc.onicecandidate=n=>{n.candidate&&P.other.push(n.candidate)},P.rtc.ontrack=n=>{if(n.streams&&n.streams[0])De.srcObject=n.streams[0];else{let a=new MediaStream(n.track);De.srcObject=a}};const t=await navigator.mediaDevices.getUserMedia({video:!1,audio:{echoCancellation:!1,autoGainControl:!0}});t.getTracks().forEach(n=>{P.rtc.addTrack(n,t)}),P.rtc.onconnectionstatechange=()=>{P.rtc.connectionState},P.rtc.ontrack=async n=>{if(n.streams&&n.streams[0])De.srcObject=n.streams[0];else{let a=new MediaStream(n.track);De.srcObject=a}},P.rtc.onaddstream=n=>{},P.rtc.onnegotiationneeded=n=>{},P.rtc.oniceconnectionstatechange=n=>{},P.rtc.onsignalingstatechange=n=>{},P.rtc.onicegatheringstatechange=n=>{},P.rtc.onicecandidateerror=n=>{},P.rtc.ondatachannel=n=>{},P.rtc.onerror=n=>{},e()},q.useListener=e=>{ft.rtc=e},q.setListener=e=>{ft.rtc&&ft.rtc(e)},q.callTo=async e=>{q.start(async()=>{const t=await P.rtc.createOffer();await P.rtc.setLocalDescription(t),P.uid=e})},q.callIn=async e=>{P.asset=e.id,P.offer=e.offer,P.uid=e.id},q.callRise=async()=>{q.start(async()=>{P.rtc.setRemoteDescription(new RTCSessionDescription(JSON.parse(atob(P.offer))));const e=await P.rtc.createAnswer();await P.rtc.setLocalDescription(e)})},q.callOk=async e=>{P.asset=e.id;const t=new RTCSessionDescription(JSON.parse(atob(e.answer)));await P.rtc.setRemoteDescription(t)},q.IceCandidate=async e=>{e.candidate.forEach(t=>{P.rtc.addIceCandidate(new RTCIceCandidate(t))})},q.callFrom=async()=>{},q.callNo=()=>{P.asset=0,P.time=!1,P.rtc&&P.rtc.close(),q.setListener({type:"state",data:"closed"})},q.callOf=()=>{P.asset=0,P.time=!1,P.rtc.close()},q.callRefuser=async()=>{P.asset=0,P.time=!1,P.rtc&&P.rtc.close()},q.Run=async e=>{q[e.data.type]&&q[e.data.type](e.data)};let Ze={};function ji(){let[e,t]=m.useState([]),n=m.useRef(null);return m.useEffect(()=>{},[]),Ze.set=a=>{t([...e,a])},Ze.del=()=>{t([])},Ze.audio=(a,i)=>{n.current.volume=.5,n.current.loop=i,n.current.src="/audio/"+a,n.current.muted=!1},r.jsxs(r.Fragment,{children:[e.map(a=>a.item),r.jsx("audio",{id:"audio",ref:n,autoPlay:!0,muted:!0})]})}function Si(e,t){let n=new Date().getTime();Ze.set({item:r.jsx(Ei,{type:t,id:e},n),key:n})}function Ei({id:e,type:t}){const[n,a]=m.useState({}),[i,o]=m.useState(t);m.useEffect(()=>{a(ye.getSelect("user")[e])},[]),q.useListener(l=>{switch(l.type){case"state":o(l.data)}});const s=()=>{switch(i){case"out":return r.jsx("span",{onClick:()=>{q.callTo(n.id),o("call")},children:r.jsx("svg",{className:"green",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M 27.9999 51.9062 C 41.0546 51.9062 51.9063 41.0547 51.9063 28.0000 C 51.9063 14.9219 41.0312 4.0938 27.9765 4.0938 C 14.8983 4.0938 4.0937 14.9219 4.0937 28.0000 C 4.0937 41.0547 14.9218 51.9062 27.9999 51.9062 Z M 21.8827 33.8360 C 16.0702 28.0469 12.3671 20.6640 16.7499 16.2813 C 17.0077 16.0234 17.2890 15.7656 17.5468 15.5078 C 18.8827 14.2422 20.1718 14.3125 21.3202 15.9297 L 24.3671 20.2656 C 25.3983 21.7656 25.1405 22.6094 24.0390 23.7813 L 23.0780 24.8360 C 22.7265 25.1640 22.8671 25.6094 23.0312 25.8906 C 23.4765 26.7344 24.7421 28.2344 26.1014 29.5938 C 27.5077 31.0000 28.9374 32.1953 29.8280 32.6875 C 30.1562 32.875 30.6249 32.9219 30.9296 32.6406 L 31.9374 31.6797 C 33.0624 30.5781 33.9765 30.2969 35.4296 31.3281 C 37.4452 32.7578 38.6640 33.6016 39.8593 34.4219 C 41.3358 35.5000 41.6874 36.8360 40.1874 38.1953 C 39.9296 38.4531 39.6952 38.7344 39.4374 38.9922 C 35.0546 43.3516 27.6952 39.6484 21.8827 33.8360 Z"})})});case"in":return r.jsxs(r.Fragment,{children:[r.jsx("span",{onClick:c,children:r.jsx("svg",{className:"red",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M 27.9999 51.9063 C 41.0546 51.9063 51.9063 41.0781 51.9063 28 C 51.9063 14.9453 41.0312 4.0937 27.9765 4.0937 C 14.8983 4.0937 4.0937 14.9453 4.0937 28 C 4.0937 41.0781 14.9218 51.9063 27.9999 51.9063 Z M 19.5858 38.4063 C 18.4843 38.4063 17.5936 37.5156 17.5936 36.4141 C 17.5936 35.8750 17.8280 35.4063 18.2030 35.0547 L 25.1874 28.0234 L 18.2030 20.9922 C 17.8280 20.6641 17.5936 20.1719 17.5936 19.6328 C 17.5936 18.5547 18.4843 17.6875 19.5858 17.6875 C 20.1249 17.6875 20.5936 17.8984 20.9452 18.2734 L 27.9765 25.2812 L 35.0546 18.25 C 35.4530 17.8281 35.8749 17.6406 36.3905 17.6406 C 37.4921 17.6406 38.3827 18.5312 38.3827 19.6094 C 38.3827 20.1484 38.1952 20.5937 37.7968 20.9688 L 30.7655 28.0234 L 37.7733 35.0078 C 38.1249 35.3828 38.3593 35.8516 38.3593 36.4141 C 38.3593 37.5156 37.4687 38.4063 36.3671 38.4063 C 35.8046 38.4063 35.3358 38.1719 34.9843 37.8203 L 27.9765 30.7890 L 20.9921 37.8203 C 20.6405 38.1953 20.1249 38.4063 19.5858 38.4063 Z"})})}),r.jsx("span",{onClick:q.callRise,children:r.jsx("svg",{className:"green",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M 27.9999 51.9062 C 41.0546 51.9062 51.9063 41.0547 51.9063 28.0000 C 51.9063 14.9219 41.0312 4.0938 27.9765 4.0938 C 14.8983 4.0938 4.0937 14.9219 4.0937 28.0000 C 4.0937 41.0547 14.9218 51.9062 27.9999 51.9062 Z M 21.8827 33.8360 C 16.0702 28.0469 12.3671 20.6640 16.7499 16.2813 C 17.0077 16.0234 17.2890 15.7656 17.5468 15.5078 C 18.8827 14.2422 20.1718 14.3125 21.3202 15.9297 L 24.3671 20.2656 C 25.3983 21.7656 25.1405 22.6094 24.0390 23.7813 L 23.0780 24.8360 C 22.7265 25.1640 22.8671 25.6094 23.0312 25.8906 C 23.4765 26.7344 24.7421 28.2344 26.1014 29.5938 C 27.5077 31.0000 28.9374 32.1953 29.8280 32.6875 C 30.1562 32.875 30.6249 32.9219 30.9296 32.6406 L 31.9374 31.6797 C 33.0624 30.5781 33.9765 30.2969 35.4296 31.3281 C 37.4452 32.7578 38.6640 33.6016 39.8593 34.4219 C 41.3358 35.5000 41.6874 36.8360 40.1874 38.1953 C 39.9296 38.4531 39.6952 38.7344 39.4374 38.9922 C 35.0546 43.3516 27.6952 39.6484 21.8827 33.8360 Z"})})})]});case"call":return r.jsx("span",{onClick:()=>q.callNo(n.id),children:r.jsx("svg",{className:"red",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M 27.9999 51.9063 C 41.0546 51.9063 51.9063 41.0781 51.9063 28 C 51.9063 14.9453 41.0312 4.0937 27.9765 4.0937 C 14.8983 4.0937 4.0937 14.9453 4.0937 28 C 4.0937 41.0781 14.9218 51.9063 27.9999 51.9063 Z M 19.5858 38.4063 C 18.4843 38.4063 17.5936 37.5156 17.5936 36.4141 C 17.5936 35.8750 17.8280 35.4063 18.2030 35.0547 L 25.1874 28.0234 L 18.2030 20.9922 C 17.8280 20.6641 17.5936 20.1719 17.5936 19.6328 C 17.5936 18.5547 18.4843 17.6875 19.5858 17.6875 C 20.1249 17.6875 20.5936 17.8984 20.9452 18.2734 L 27.9765 25.2812 L 35.0546 18.25 C 35.4530 17.8281 35.8749 17.6406 36.3905 17.6406 C 37.4921 17.6406 38.3827 18.5312 38.3827 19.6094 C 38.3827 20.1484 38.1952 20.5937 37.7968 20.9688 L 30.7655 28.0234 L 37.7733 35.0078 C 38.1249 35.3828 38.3593 35.8516 38.3593 36.4141 C 38.3593 37.5156 37.4687 38.4063 36.3671 38.4063 C 35.8046 38.4063 35.3358 38.1719 34.9843 37.8203 L 27.9765 30.7890 L 20.9921 37.8203 C 20.6405 38.1953 20.1249 38.4063 19.5858 38.4063 Z"})})});case"closed":return r.jsx("span",{onClick:()=>{q.callTo(n.id),o("call")},children:r.jsx("svg",{className:"green",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M 27.9999 51.9062 C 41.0546 51.9062 51.9063 41.0547 51.9063 28.0000 C 51.9063 14.9219 41.0312 4.0938 27.9765 4.0938 C 14.8983 4.0938 4.0937 14.9219 4.0937 28.0000 C 4.0937 41.0547 14.9218 51.9062 27.9999 51.9062 Z M 21.8827 33.8360 C 16.0702 28.0469 12.3671 20.6640 16.7499 16.2813 C 17.0077 16.0234 17.2890 15.7656 17.5468 15.5078 C 18.8827 14.2422 20.1718 14.3125 21.3202 15.9297 L 24.3671 20.2656 C 25.3983 21.7656 25.1405 22.6094 24.0390 23.7813 L 23.0780 24.8360 C 22.7265 25.1640 22.8671 25.6094 23.0312 25.8906 C 23.4765 26.7344 24.7421 28.2344 26.1014 29.5938 C 27.5077 31.0000 28.9374 32.1953 29.8280 32.6875 C 30.1562 32.875 30.6249 32.9219 30.9296 32.6406 L 31.9374 31.6797 C 33.0624 30.5781 33.9765 30.2969 35.4296 31.3281 C 37.4452 32.7578 38.6640 33.6016 39.8593 34.4219 C 41.3358 35.5000 41.6874 36.8360 40.1874 38.1953 C 39.9296 38.4531 39.6952 38.7344 39.4374 38.9922 C 35.0546 43.3516 27.6952 39.6484 21.8827 33.8360 Z"})})})}},c=()=>{q.callRefuser(n.id),Ze.del()};return r.jsx("div",{className:"web-phone white",children:r.jsxs("div",{className:"w",children:[r.jsx("div",{className:"x","data-icon":"F038",onClick:c}),r.jsx("div",{className:"a"}),r.jsx("div",{className:"n",children:n.name}),r.jsx("div",{className:"b",children:s()})]})})}const mt={};function Ii(e){mt.add(e)}function Di({color:e,size:t,name:n}){return r.jsx("svg",{width:t,height:t,color:e,children:r.jsx("use",{href:`#${n}`})})}function Ni(){let[e,t]=m.useState([]);if(mt.x=()=>{t([])},mt.add=a=>{t(a)},e.length===0)return"";const n={sprite:""};return r.jsx("svg",{...n,xmlns:"http://www.w3.org/2000/svg",children:e.map((a,i)=>r.jsx("symbol",{id:a.name,viewBox:"0 0 24 24",fillRule:"evenodd",clipRule:"evenodd",children:r.jsx(a.path,{})},i))})}let Xe={},pt={},ht="ru";const Ti=(e,t)=>{pt=e,t?ht=t:ht=Object.keys(e)[0]},hn=m.createContext(localStorage.getItem("lang")||navigator.language),Bi=({children:e})=>{const[t,n]=m.useState(localStorage.getItem("lang")||navigator.language);return Xe.update=n,r.jsx(hn.Provider,{value:pt[t]||pt[ht],children:e})},Li=e=>{var t;localStorage.setItem("lang",e),(t=Xe.update)==null||t.call(Xe,e)},Mi=()=>m.useContext(hn),$i=()=>localStorage.getItem("lang")||navigator.language;m.createContext({tab:"",setTabs:e=>{}});const gt={};function xt(e,t){gt[e]=t}function Pi(e,t){gt[e]!==void 0&&gt[e](t)}const Ce={};function Ai(e,t){const[n,a]=m.useState(t);return m.useEffect(()=>{if(Ce[e])return Ce[e].push(a);Ce[e]=[a]},[]),[n]}function Fi(e,t){if(Ce[e])return Ce[e].push(t);Ce[e]=[t]}function Oi(e,t){Ce[e]&&Ce[e].forEach(n=>n(t))}const de={setListener:Pi,useListener:xt,setEmitter:Oi,useEmitter:Ai,subEmitter:Fi};function zi(){let[e,t]=m.useState([]);return de.useListener("form",n=>{t([n])}),r.jsx(r.Fragment,{children:e.map(n=>n)})}const gn=({children:e,lang:t,log:n})=>ga(r.jsxs(Bi,{children:[r.jsx(g.Modal.Init,{}),r.jsx(g.Notice.Init,{}),r.jsx(g.Alert.Init,{}),r.jsx(g.Tooltip.Init,{}),r.jsx(xi,{}),r.jsx(Ni,{}),r.jsx(zi,{}),r.jsx(ji,{}),r.jsx(wi,{}),e]}),n),Ri=({children:e,...t})=>r.jsx("menu",{children:e}),Zi=({children:e,...t})=>r.jsxs("header",{children:["xz",e]}),Ui={payment:"_payment_1lxfv_1"};function Wi(){let[e,t]=m.useState({});return!e.active&&!e.payment?"":r.jsx("div",{className:Ui.payment,children:"Истек срок оплаты! Доступ доступен до 16.04.2024"})}const Gi=({children:e,...t})=>r.jsxs("div",{className:"app",children:[r.jsx(Wi,{}),r.jsx(Ri,{}),r.jsx(Zi,{}),r.jsx(gn,{}),e]}),Ve={btn:"_btn_294gf_1",confirm:"_confirm_294gf_15",cancel:"_cancel_294gf_20",action:"_action_294gf_25",disabled:"_disabled_294gf_30",await:"_await_294gf_37",m:"_m_294gf_44",l:"_l_294gf_48"},xn=({onClick:e,onSend:t,size:n="m",view:a="confirm",mode:i="primary",children:o,isDisabled:s=!1,className:c,after:l,before:_,label:d,onRef:p,awaitText:f="Ожидайте"})=>{let[h,b]=m.useState(!1);const x=k=>{if(e)return e();h||(t?(b(!0),t(b)):k.preventDefault())};let v={};return(s||h)&&(v.disabled=!0),r.jsx("button",{...v,ref:p,className:[Ve.btn,h?Ve.disabled:Ve[a],n&&Ve[n],c].join(" "),onClick:x,children:h?f:r.jsxs(r.Fragment,{children:[_||""," ",d," ",l||""]})||o})},Ki=({list:e,onClick:t,active:n,size:a,view:i})=>r.jsx("nav",{children:r.jsx("ul",{className:[a,i].join(" "),children:e.map(o=>r.jsx(Yi,{onClick:t,active:n,label:o.label,link:o.link},o.link))})}),Yi=({onClick:e,label:t,link:n,active:a})=>r.jsx("li",{"tabs-active":String(a===n),onClick:()=>e(n),children:t}),bn={tabs:"_tabs_1i88v_1",tab:"_tab_1i88v_1"},vn=({list:e=[],active:t,onTab:n})=>{const a=i=>{if(n)return n(i);g.Router.setTabs(i)};return r.jsx("nav",{className:[bn.tabs,"tabs"].join(" "),children:e.map(i=>m.createElement("div",{onClick:()=>a(i.id),active:(t===i.id).toString(),className:bn.tab,key:i.id},i.label,i.badge?r.jsx("em",{children:i.badge}):""))})},Hi=({list:e=[],active:t,onChange:n,className:a,after:i})=>{const[o,s]=m.useState(t);return r.jsxs("div",{className:["tabs-button",a].join(" "),children:[r.jsx("ul",{children:e.map(c=>r.jsx(qi,{data:c,light:c.light,setTabs:s,active:c.id===o,onChange:n},c.id))}),i]})},qi=({data:e,light:t,active:n,setTabs:a,onChange:i})=>{const o=()=>{e.disabled||(i&&i(e.id),a(e.id))};return r.jsxs("li",{onClick:o,className:e.disabled?"disabled":n?"active":"",children:[r.jsxs("p",{children:[e.before,e.name]}),t&&r.jsx("em",{})]})},Ji={List:Ki,Lite:vn,Button:Hi},Xi=({title:e="",button:t,description:n="",children:a})=>r.jsxs("fieldset",{children:[e&&r.jsxs("legend",{children:[e,t&&r.jsx("div",{role:"button-outline",onClick:()=>t.onClick(),children:t.label})," "]}),r.jsx("ul",{children:a}),n&&r.jsx("article",{children:n})]}),Vi={setting:"_setting_dva4m_2"},Qi=({children:e})=>r.jsx("div",{className:Vi.setting,children:e}),eo=({label:e,children:t})=>{let[n,a]=m.useState(!1);return r.jsxs("li",{"data-item":"accordion",children:[r.jsxs("dl",{onClick:()=>a(!n),children:[r.jsx("dt",{children:e}),r.jsx("dd",{children:r.jsx("div",{"data-close":String(n)})})]}),n&&r.jsx("div",{children:t})]})},to=({label:e,onClick:t,button:n})=>r.jsx("li",{children:r.jsxs("dl",{children:[r.jsx("dt",{children:e}),r.jsx("dd",{role:"button",onClick:()=>t(),children:n})]})}),yn={Switch:({active:e,onClick:t})=>(e=typeof e=="number"?!!e:e,r.jsx("div",{role:"switch",onClick:()=>{t()},"aria-checked":e?"true":"false"}))},no={Accordion:eo,Button:to,Switch:({label:e,onClick:t,active:n})=>r.jsx("li",{children:r.jsxs("dl",{children:[r.jsx("dt",{children:e}),r.jsx("dd",{children:r.jsx(yn.Switch,{onClick:t,active:n})})]})}),Info:({label:e,info:t})=>r.jsx("li",{children:r.jsxs("dl",{children:[r.jsx("dt",{children:e}),r.jsx("dd",{role:"info",children:t})]})}),Select:({label:e,active:t,options:n})=>r.jsx("li",{children:r.jsxs("dl",{children:[r.jsx("dt",{children:e}),r.jsx("dd",{role:"info",children:t})]})}),Component:({label:e,children:t})=>r.jsx("li",{children:r.jsxs("dl",{children:[r.jsx("dt",{children:e}),r.jsx("dd",{children:t})]})}),Node:({label:e,children:t})=>r.jsx("li",{children:r.jsxs("dl",{children:[r.jsx("dt",{children:e}),r.jsx("dd",{children:t})]})})};function wn({list:e,onClick:t,active:n,size:a,view:i}){return r.jsx("nav",{children:r.jsx("ul",{className:[a,i].join(" "),children:e.map(o=>r.jsx(ro,{onClick:t,active:n,label:o.label,link:o.link},o.link))})})}const ro=({onClick:e,label:t,link:n,active:a})=>r.jsx("li",{"tabs-active":String(a===n),onClick:()=>e(n),children:t});wn.defaultProps={size:"M",view:"H"};const ao={Section:Xi,Main:Qi,Item:no,Tabs:wn};function io({value:e,background:t,gradient:n}){let a=835.24,i=a-e/100*a;const o=m.useId();return r.jsxs("svg",{viewBox:"0 0 275 275",xmlns:"http://www.w3.org/2000/svg",style:{borderRadius:"50%",background:t},children:[n&&r.jsx("linearGradient",{id:o,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:n.map((s,c)=>r.jsx("stop",{offset:s[0],stopColor:s[1]},c))}),r.jsx("circle",{strokeWidth:"10",fill:"transparent",r:"133",cx:"137.5",cy:"137.5",stroke:`url(#${o})`,strokeLinecap:"round",strokeDasharray:a,strokeDashoffset:i,transform:"rotate(-90 137.5 137.5)"})]})}const oo={Circle:io},so={Icon:ki,Item:ut,Active:Ci};function lo(){return r.jsx("svg",{viewBox:"0 0 462.86 359.96",children:r.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 co={i:"_i_it11s_1"};let kn="/assets/";function _o(e){kn=e}function uo({name:e,size:t="16px",onClick:n,hover:a,origin:i=!1,className:o}){const s={[i?"backgroundImage":"WebkitMaskImage"]:`url(${kn}${e}.svg)`,"--size":t},c={};return o&&(c.className=o),n&&(c.onClick=n,c.pointer=""),a&&(c.hover=a),r.jsx("i",{role:"icon",style:s,className:[co.i,`icon-${e}`].join(" "),...c})}let bt={};function fo(e){bt={...bt,...e}}function Cn(){return bt}function mo({name:e,hover:t,onClick:n,className:a}){const i={};return n&&(i.onClick=n,i.pointer=""),t&&(i.hover=t),a&&(i.className=a),Cn()[e]?r.jsx("i",{role:"icon",...i,children:Cn()[e]()}):""}const po={Logo:lo,Sprite:Ii,set:fo,Symbol:Di,Default:mo,Assets:uo};let jn={};jn.setAttribute=(e,t)=>{const n=document.getElementById("root");n.dataset[e]=t};function ho({items:e,list:t,icons:n,isSetting:a=!0}){const i=()=>{g.Alert.Send({title:"Выйти",text:"Вы уверене что хотиет выйти"},()=>{ye.Logaut()})};return r.jsxs("menu",{children:[r.jsx("ul",{children:t.map(o=>r.jsx(go,{items:e,i:o,icons:n},o))}),r.jsx("em",{}),r.jsxs("ul",{children:[r.jsx(xo,{icons:n}),a&&r.jsxs("li",{className:g.Router.isModule("Settings")?"active":"",onClick:()=>g.Router.setModule("Settings"),children:[r.jsx(n.Icons,{name:"s040"}),r.jsx("span",{children:"Настройки"})]}),r.jsxs("li",{onClick:i,children:[r.jsx(n.Icons,{name:"s044"}),r.jsx("span",{children:"Выход"})]})]})]})}const go=({items:e,i:t,icons:n})=>t[0]==="#"?r.jsx("b",{children:t.slice(1)}):r.jsxs("li",{className:g.Router.isModule(e[t].link)?"active":"",onClick:()=>{g.Router.setTabs(e[t].temp,!1),g.Router.setModule(e[t].link)},children:[r.jsx(n.Icons,{name:e[t].icon}),r.jsx("span",{children:e[t].name})]}),xo=({icons:e})=>{const[t,n]=m.useState(!1),a=m.useRef(null),i=async()=>{a.current&&(await a.current.prompt(),n(!1))};return m.useEffect(()=>{window.addEventListener("appinstalled",o=>{}),window.addEventListener("beforeinstallprompt",async o=>{o.preventDefault(),a.current=o,n(!0)})},[]),t?r.jsxs("li",{onClick:i,children:[r.jsx(e.Icons,{name:"install"}),r.jsx("span",{children:"Установить как приложение"})]}):""};function Sn({path:e,query:t,button:n,emptyList:a="Список пуст",searchParams:i=["p01","p02","p03"],...o}){const[s,c]=m.useState([]),[l,_]=m.useState([]),[d,p]=m.useState(!1),f=async()=>{let h=await g.Api.fetch(e,t);h.data&&h.data.length>0&&(c(h.data),_(h.data)),p(!0)};return de.useListener("list_children",h=>{if(h.action==="edit"){let b=l.map(x=>x.id===h.id?Object.assign(x,{[h.name]:h.value}):x);c(b),_(b)}if(h.action==="delete"){let b=l.filter(x=>x.id!==h.id);c(b),_(b)}}),de.useListener("search",h=>{c(l.filter(b=>(""+i.map(v=>b[v]).toString()).toLowerCase().includes(h.toLowerCase())))}),m.useEffect(()=>{f(),n&&de.setListener("button",n)},[]),d&&s.length===0?r.jsx("ul",{className:"list-body",children:a}):r.jsx("ul",{className:"list-body",children:s.map((h,b)=>r.jsx(o.item,{data:h,count:b+1},h.id))})}const bo={Menu:ho,List:Sn},vo={sort:"_sort_1yrvt_1"};let Qe={};function yo(e,t){switch(t.type){case"active":let n="<";return e.active===t.data&&(n=e.sort==="<"?">":"<"),Qe.get({active:t.data,sort:n},!1),ln({active:t.data,sort:n}),{...e,active:t.data,sort:n};default:throw new Error}}function wo(){const[e,t]=m.useReducer(yo,ct()===void 0?{active:1,sort:"<"}:ct());return r.jsxs("div",{className:vo.sort,children:[r.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})}),r.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})}),r.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 ko(e){Qe.get=e}function Co(e){Qe.set(e)}function jo(e,t,n){let a=1,i=0,o={},s=50;o[a]=[];let c={},l="s1a";switch(c.s1a=(_,d)=>d.s1-_.s1,c.s1d=(_,d)=>_.s1-d.s1,c.s2a=(_,d)=>_.s2-d.s2,c.s2d=(_,d)=>d.s2-_.s2,c.s3a=(_,d)=>_.s3.localeCompare(d.s3),c.s3d=(_,d)=>d.s3.localeCompare(_.s3),n.active){case 1:l=n.sort===">"?"s1d":"s1a";break;case 2:l=n.sort===">"?"s2d":"s2a";break;case 3:l=n.sort===">"?"s3d":"s3a";break}return t.sort(c[l]).forEach(_=>{i++,i<=s||(a++,i=1,o[a]=[]),o[a].push(e[_.id])}),{data:o}}function So(e){Qe.count(e)}const Eo={Init:wo,useValue:ko,Set:Co,Run:jo,Count:So},et={},En={};function Io(e){const[t,n]=m.useState({}),a=async i=>{n(Object.keys(et).reduce((o,s)=>(o?o[s]=et[s].all:o={},o),{}))};return m.useEffect(()=>{e.forEach(i=>et[i]={all:0}),En.menu=a,a()},[e]),t}function Do(e,t){switch(typeof t){case"number":et[e].all+=t,En.menu();break}}const No={useMenu:Io,setUpdate:Do};class To{constructor(t="el",n="db"){Wt(this,"storeName");Wt(this,"_dbp");this.storeName=n,this._dbp=new Promise((a,i)=>{try{const o=indexedDB.open(t,1);o.onerror=s=>{i(o.error)},o.onsuccess=()=>{a(o.result)},o.onupgradeneeded=()=>{try{o.result.createObjectStore(n)}catch(s){i(s)}}}catch(o){i(o)}})}async _withIDBStore(t,n){try{const a=await this._dbp;return new Promise((i,o)=>{try{const s=a.transaction(this.storeName,t);s.oncomplete=()=>i(),s.onabort=s.onerror=()=>o(s.error),n(s.objectStore(this.storeName))}catch(s){o(s)}})}catch(a){throw a}}}let vt,H={};const Be=()=>(vt||(vt=new To),vt),yt=(e,t="",n=new Set)=>{if(e==null)return null;if(e instanceof Promise)return t;if(typeof e!="object"||n.has(e))return null;n.add(e);try{for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&!a.startsWith("__"))try{const i=e[a];if(i instanceof Promise)return t?`${t}.${a}`:a;if(i&&typeof i=="object"&&typeof i.then=="function")return t?`${t}.${a}`:a;const o=t?`${t}.${a}`:a,s=yt(i,o,n);if(s)return s}catch{continue}if(Array.isArray(e))for(let a=0;a<e.length;a++)try{const i=`${t}[${a}]`,o=yt(e[a],i,n);if(o)return o}catch{continue}}catch{}return null},me=e=>{if(e==null)return!1;if(e instanceof Promise||e&&typeof e=="object"&&typeof e.then=="function")return!0;try{if(yt(e))return!0}catch{return!0}return!1},je=async(e,t,n=Be())=>{if(me(t))throw new Error(`Нельзя сохранить объект с Promise в IndexedDB для ключа ${e}`);try{const a=await g.Crypto.enCode(t);return H[e]=t,await n._withIDBStore("readwrite",i=>{i.put(a,e)}),!0}catch(a){throw a}},xe=async(e,t=Be())=>{if(H[e]!==void 0)return H[e];try{let n;if(await t._withIDBStore("readonly",a=>{n=a.get(e)}),n.result!==void 0){let a=await g.Crypto.deCode(n.result);return H[e]=a,a}return{}}catch{return{}}},Bo=async(e,t=Be())=>{try{return await t._withIDBStore("readwrite",n=>{n.delete(e)}),delete H[e],!0}catch(n){throw n}},wt=async(e=Be())=>{try{return await e._withIDBStore("readwrite",t=>{t.clear()}),H={},!0}catch(t){throw t}},Lo={id:async(e,t,n)=>{let a=await xe(t);if(n!==void 0)n({type:"load",base:a});else return a[e]},get:xe,set:je,add:async(e,t,n,a)=>{if(me(e))throw new Error("Нельзя сохранить объект с Promise в IndexedDB в add");let i,o;if(o=await xe(n),o[e.id]=e,me(o))throw new Error("Нельзя сохранить объект с Promise в IndexedDB в add после объединения");if(await je(n,o),t!=null&&(i=await xe(t),e.eDate!==void 0)){if(i[e.id]=e.eDate,me(i))throw new Error("Нельзя сохранить page объект с Promise в IndexedDB в add");await je(t,i)}a!==void 0&&a({type:"load",page:i,base:o})},del:Bo,upd:async(e,t,n,a=Be())=>{if(me(t))throw new Error("Нельзя сохранить объект с Promise в IndexedDB при обновлении");if(H[e]===void 0){let i;try{if(await a._withIDBStore("readonly",o=>{i=o.get(e)}),i.result!==void 0){let o=await g.Crypto.deCode(i.result);if(H[e]=o,H[e][t.id]={...H[e][t.id],...t.data},me(H[e]))return{};let s=await g.Crypto.enCode(H[e]);return await a._withIDBStore("readwrite",c=>{c.put(s,e)}),{}}else return{}}catch{return{}}}else if(H[e][t.id]!==void 0){if(H[e][t.id]={...H[e][t.id],...t.data},n!==void 0&&H[n]!==void 0?H[n][t.id]!==void 0&&(H[n][t.id]=t.data.eDate):H[n]=[],delete H[e][t.id].$_item,delete H[e][t.id].$_send,me(H[e])||n!==void 0&&me(H[n]))throw new Error("Нельзя сохранить объект с Promise в IndexedDB при обновлении");try{return await a._withIDBStore("readwrite",i=>{i.put(g.Crypto.enCode(H[e]),e),n!==void 0&&i.put(g.Crypto.enCode(H[n]),n)}),{}}catch(i){throw i}}},key:async(e=Be())=>{const t=[];try{return await e._withIDBStore("readonly",n=>{(n.openKeyCursor||n.openCursor).call(n).onsuccess=function(){this.result&&(t.push(this.result.key),this.result.continue())}}),t}catch{return[]}},load:e=>H[e],split:(e,t,n=[],a={})=>{let i=n.length!==0,o=[],s=a.sort,c=Object.keys(a).length!==0,l=Object.keys(a),_=Object.keys(e),d=[],p=h=>{let b="";if(n.forEach(x=>{b+=t[h][x]}),c){let x={};l.forEach(v=>{x[v]=t[h][v]});for(let v in s)t[h][s[v]]===void 0&&(wt(),location.reload()),v==="s1"&&(x[v]=new Date(t[h][s[v]]).getTime()),v==="s2"&&(x[v]=t[h][s[v]]),v==="s3"&&(x[v]=t[h][s[v]].replace(/[^a-zа-яё]/gi,"").substring(0,1));o.push({id:h,text:b,...x})}else o.push({id:h,text:b})},f=h=>{};return _.forEach(h=>{d.push(t[h])}),d.forEach(h=>{h===void 0?(wt(),location.reload()):(i&&p(h.id),c&&f(h.id))}),{list:d,search:o,filter:a}},clear:wt,updAll:async(e,t,n,a)=>{if(me(e))throw new Error("Нельзя сохранить объект с Promise в IndexedDB в updAll");let i=await xe(t),o=await xe(n);for(let s in e)o[s]=e[s],i[s]=e[s].eDate;if(me(o))throw new Error("Нельзя сохранить base объект с Promise в IndexedDB в updAll после объединения");if(me(i))throw new Error("Нельзя сохранить page объект с Promise в IndexedDB в updAll после объединения");await je(t,i),await je(n,o),a!==void 0&&a({type:"load",page:i,base:o})},delAll:async(e,t,n,a)=>{let i=await xe(t),o=await xe(n);e.forEach(s=>delete i[s]),await je(t,i),a!==void 0&&a({type:"load",page:i,base:o})},delList:async(e,t,n)=>{let a=await xe(t);e.forEach(i=>delete a[i]),await je(t,a)},addList:async(e,t,n)=>{let a=await xe(t);e.forEach(i=>a[i.id]=i.eDate),await je(t,a)}},In={setSetting:Ca,getSetting:ja},Mo={version:{Api:Gr,Server:Wr,Client:Kr},Host:Yr,Import:Hr,IconAssets:_o,DynamicURL:qr},$o={useKey:(e,t)=>{const n=[];t=t.map(a=>a.charCodeAt(0)),document.onkeydown=function(a){n.push(a.keyCode);for(var i=0;i<t.length;i++)if(n.indexOf(t[i])==-1)return;e(),n.length=0},document.onkeyup=function(a){n.length=0}}},Po={s:"_s_18bde_1",loadingB:"_loadingB_18bde_1",ul:"_ul_18bde_31"};function Dn({children:e}){return r.jsx("ul",{className:re.ul,children:e})}function Ao(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 n=Object.keys(e.data).length,a=e.item+1;return a=n<a?1:a,e.item===a?e:{...e,wait:e.size===a,item:a,list:[...e.list,...e.data[a]]};case"clear":return{load:!1,list:[],data:{},item:1,wait:!1,size:0};default:throw new Error}}function Nn({list:e,load:t,className:n,...a}){const i=m.useRef(null),[o,s]=m.useReducer(Ao,{load:!1,list:[],data:{},item:1,wait:!1,size:0});m.useEffect(()=>{i.current.scrollTop=0,e!==null&&s({type:"load",load:!0,data:e})},[t]);let c=()=>{i.current.scrollHeight-i.current.scrollTop-300<=i.current.clientHeight&&!o.wait&&s({type:"update"})};return r.jsx("div",{className:[Po.s,n].join(" "),ref:i,onScroll:c,children:r.jsx(Dn,{"el-empty":"Данные не найдены",children:o.load&&o.list!==void 0?o.list.map(l=>r.jsx(a.item,{data:l},l.id)):r.jsxs("div",{"data-load":"load",children:[r.jsx("i",{}),r.jsx("i",{}),r.jsx("i",{})]})})})}const Fo={Widget:bi},Tn=({onClick:e,active:t})=>(t=!!t,r.jsx("div",{role:"switch",onClick:()=>e,"aria-checked":`${t?"true":"false"}`}));let G={};G.KeyDown=e=>{e.key==="Enter"&&e.preventDefault()},G.PasteOne=e=>{e.preventDefault(),navigator.clipboard.readText().then(t=>{t=t.replace(/^\s*/,"").replace(/\s*$/,""),window.document.execCommand("insertText",!1,t)}).catch(t=>{})},G.Paste=(e,t)=>{t.preventDefault(),navigator.clipboard.readText().then(n=>{if(e){let a=t.target.textContent.length;if(a>=e)return;e-=a,n=n.slice(0,e)}window.document.execCommand("insertText",!1,n.replace(/(\r\n|\n|\r)/gm," "))}).catch(n=>{})},G.Focus=e=>{e.target.textContent.length===0&&(e.target.innerHTML="<br>")},G.Blur=e=>{e.target.scrollLeft=0,e.target.querySelector("br")!==null&&e.target.querySelector("br").remove()},G.ContentEditable=ye.isBrowser("Firefox")?"true":"plaintext-only";function Ue({id:e,value:t,onValue:n,name:a,placeholder:i="",title:o="",error:s="",hide:c=!1,edit:l=!0,active:_=!0,after:d="",before:p="",show:f=!0,maxLength:h,onSave:b,className:x="",isCopy:v=!0,isReload:k=!1}){let w=!!(c&&(t===""||t===void 0)),D=E=>{n&&n({value:E.target.textContent.trim(),name:a,reload:k})},T=E=>{h&&E.target.textContent.trim().length>=h&&E.key!=="Backspace"&&E.preventDefault(),E.key==="Enter"&&E.preventDefault()},B=E=>{v&&(E.preventDefault(),navigator.clipboard.writeText(E.target.textContent.trim()).then(function(){g.Notice.Copy("Данные в буфер обмене")},function(M){}))},N=E=>{E.preventDefault(),navigator.clipboard.readText().then(M=>{if(h){let I=E.target.textContent.length;if(I>=h)return;h-=I,M=M.slice(0,h)}window.document.execCommand("insertText",!1,M.replace(/(\r\n|\n|\r)/gm," "))}).catch(M=>{})};if(!(l&&_)&&!f||!(l&&_)&&w)return"";const y={};y.field="input",x&&(y.className=x);const C={};i&&(C.placeholder=i),l&&_&&(C.edit="");const F=E=>{G.Blur(E),b==null||b({value:E.target.textContent.trim(),name:a})};return r.jsxs("dl",{...y,children:[o?r.jsx("dt",{children:o}):"",p,r.jsx("dd",{onPaste:N,onInput:D,onBlur:F,onKeyDown:T,onContextMenu:B,spellCheck:"true",contentEditable:l&&_?G.ContentEditable:"false",suppressContentEditableWarning:!0,...C,children:t}),d,s?r.jsx("em",{children:s}):""]})}function Bn({onClick:e,onSend:t,name:n,onRef:a}){let[i,o]=m.useState(!1);const s=()=>{if(e)return e();i||(o(!0),t&&t(o))};return r.jsx("button",{ref:a,"data-form":"button",className:i?"btn await":"btn confirm pointer",onClick:s,children:i?"Ожидайте":n})}function Ln({value:e,onValue:t,onActive:n,data:a,name:i,view:o,maxLength:s,edit:c=!0,active:l=!0,placeholder:_="Введите сообщение"}){const d=m.useRef({value:e,timerId:null,shift:!1,send:!0}),p=()=>{d.current.value.length>0?d.current.send&&(n(!0),d.current.send=!1,d.current.timerId=setTimeout(()=>{d.current.send=!0},3e3)):n(!1)},f=w=>{d.current.value=w.target.textContent,p()},h=w=>{w.keyCode===16&&(d.current.shift=!0),w.keyCode===13&&!d.current.shift&&(w.preventDefault(),d.current.value.length!==0&&(w.target.textContent="",a&&a(d.current.value),t&&t(d.current.value),d.current.value="",n(!1)))},b=w=>{w.keyCode===16&&(d.current.shift=!1)},x=w=>{w.preventDefault(),navigator.clipboard.readText().then(D=>{if(s){let T=w.target.textContent.length;if(T>=s)return;s-=T,D=D.slice(0,s)}window.document.execCommand("insertText",!1,D)}).catch(D=>{})},v=()=>{n(!1)},k={spellCheck:"true"};return _&&(k.placeholder=_),c&&l&&(k.contentEditable=G.ContentEditable),r.jsx("dl",{"data-form":"message",children:r.jsx("dd",{onPaste:x,onInput:f,onKeyUp:b,onKeyDown:h,onBlur:v,...k,suppressContentEditableWarning:!0,children:e})})}function Mn(e){let t=()=>e.title?r.jsx("dt",{children:e.title}):"",n=e.edit!==void 0?e.edit:!0,a=e.active!==void 0?e.active:!0,i=e.placeholder!==void 0?e.placeholder:"",o=l=>{e.onValue({value:l.target.textContent,name:e.name})},s=l=>{l.key==="Enter"&&l.preventDefault()},c=l=>{l.preventDefault(),navigator.clipboard.readText().then(_=>{window.document.execCommand("insertText",!1,_)}).catch(_=>{})};return r.jsxs("dl",{"data-form":"input","type-data":"generator",children:[t(),r.jsx("dd",{onPaste:c,onInput:o,onKeyDown:s,contentEditable:n&&a?G.ContentEditable:"false","data-placeholder":i,suppressContentEditableWarning:!0,children:e.value})]})}function $n({value:e,onValue:t,maxLength:n,placeholder:a="",name:i}){let o=(b,x)=>Number(Math.round(b+Math.random()*(x-b))),s=m.useRef(null),c=m.useRef(null),l=o(1e4,99999),_=b=>{b.key!=="Backspace"&&(b.key==="Enter"&&b.preventDefault(),b.target.textContent.length===5&&b.preventDefault(),/\d/.test(b.key)||b.preventDefault())},d=b=>{t({value:Number(b.target.textContent)===l,name:i})},p=b=>{b.preventDefault(),navigator.clipboard.readText().then(x=>{if(n){let v=b.target.textContent.length;if(v>=n)return;n-=v,x=x.slice(0,n)}window.document.execCommand("insertText",!1,x.replace(/(\r\n|\n|\r)/gm," ").replace(/[^0-9]/g,"").substring(0,5))}).catch(x=>{})};m.useEffect(()=>{const b=s.current,x=b.getContext("2d");x.clearRect(0,0,b.width,b.height),x.font="30px brush script mt",x.fillStyle="#eee",x.textAlign="center",x.fillText(l,50,27),c.current.textContent=""},[l]);const f={};f.field="captcha";const h={};return a&&(h.placeholder=a),r.jsxs("dl",{...f,children:[r.jsx("dd",{ref:c,onPaste:p,onInput:d,onBlur:G.Blur,onKeyDown:_,contentEditable:G.ContentEditable,suppressContentEditableWarning:!0,...h}),r.jsx("canvas",{ref:s,width:"100",height:"35"})]})}function Pn({className:e,title:t,error:n,edit:a=!0,real:i,onValue:o,empty:s,name:c}){let l={n1:"",n2:"",n3:"",n4:"",n5:"",n6:"",code:""},_=x=>{if(x.preventDefault(),!a)return;x.target.textContent=x.target.textContent.slice(-1).replace(/[^+\d]/g,"");let v=window.getSelection(),k=x.target.textContent.length;if(l[x.target.id]=x.target.textContent,l.code=l.n1+""+l.n2+l.n3+l.n4+l.n5+l.n6,v.collapse(x.target.firstChild,1),k===0){x.target.blur(),x.target.focus();return}x.target.nextSibling!=null&&x.target.nextSibling.focus()},d=x=>{if(!a)return x.preventDefault();if(x.key==="Enter"&&x.preventDefault(),x.key==="Backspace"){if(x.preventDefault(),x.target.textContent="",l[x.target.id]="",x.target.previousSibling!=null){let v=x.target.previousSibling.id.slice(1);x.target.previousSibling.textContent="",l["n"+v]="",x.target.previousSibling.focus()}l.code=l.n1+""+l.n2+l.n3+l.n4+l.n5+l.n6}},p=x=>{if(!a)return x.preventDefault();if(i)o&&o({value:l.code,name:c});else if(l.code.length===6&&(x.target.blur(),o&&o({value:l.code,name:c}),s)){l={n1:"",n2:"",n3:"",n4:"",n5:"",n6:"",code:""};for(let v=1;v<=6;v++){let k=document.getElementById("n"+v);k&&(k.textContent="")}}},f=x=>{x.target.textContent=""},h=x=>{x.preventDefault(),navigator.clipboard.readText().then(v=>{var T;var k=/\d+/g;let w=(T=v.match(k))==null?void 0:T.toString();if(!w)return;let D=w.split("");for(let B=1;B<=D.length;B++){let N=document.getElementById("n"+B);N&&(N.textContent=D[B-1],l["n"+B]=D[B-1])}if(l.code=l.n1+""+l.n2+l.n3+l.n4+l.n5+l.n6,l.code.length===6&&(x.target.blur(),o&&o({value:l.code,name:c}),s)){l={n1:"",n2:"",n3:"",n4:"",n5:"",n6:"",code:""};for(let B=1;B<=6;B++){let N=document.getElementById("n"+B);N&&(N.textContent="")}}}).catch(v=>{})};const b={};return b.field="code",e&&(b.className=e),r.jsxs("dl",{...b,children:[t?r.jsx("dt",{children:t}):"",r.jsxs("div",{children:[r.jsx("dd",{id:"n1",inputMode:"numeric",onKeyDown:d,onKeyUp:p,onFocus:f,onPaste:h,onInput:_,contentEditable:!0}),r.jsx("dd",{id:"n2",inputMode:"numeric",onKeyDown:d,onKeyUp:p,onFocus:f,onPaste:h,onInput:_,contentEditable:!0}),r.jsx("dd",{id:"n3",inputMode:"numeric",onKeyDown:d,onKeyUp:p,onFocus:f,onPaste:h,onInput:_,contentEditable:!0}),r.jsx("dd",{id:"n4",inputMode:"numeric",onKeyDown:d,onKeyUp:p,onFocus:f,onPaste:h,onInput:_,contentEditable:!0}),r.jsx("dd",{id:"n5",inputMode:"numeric",onKeyDown:d,onKeyUp:p,onFocus:f,onPaste:h,onInput:_,contentEditable:!0}),r.jsx("dd",{id:"n6",inputMode:"numeric",onKeyDown:d,onKeyUp:p,onFocus:f,onPaste:h,onInput:_,contentEditable:!0})]}),n?r.jsx("em",{children:n}):""]})}function An({id:e,value:t,onValue:n,name:a,placeholder:i="",title:o="",error:s="",hide:c=!1,length:l=6,edit:_=!0,active:d=!0,after:p="",show:f=!0,view:h,onSave:b,className:x=""}){_=_!==void 0?_:!0,d=d!==void 0?d:!0;let[v,k]=m.useState(t),w=T=>{k(T),n==null||n({value:T,name:a}),b==null||b({value:T,name:a})};const D={};return D.field="color",x&&(D.className=x),r.jsx(r.Fragment,{children:h==="icon"?r.jsx("i",{"data-icon":"F043"}):r.jsxs("dl",{...D,children:[o&&r.jsx("dt",{children:o}),r.jsx("dd",{children:l>0&&Array.from(Array(l).keys()).map(T=>r.jsx("s",{active:(Number(T)===Number(v))+"",onClick:()=>w(T),style:{backgroundColor:`var(--color-${T})`}},T))}),s&&r.jsx("em",{children:s})]})})}const be={o:"_o_76l23_1",c:"_c_76l23_11",_active:"__active_76l23_41",as:"_as_76l23_94",ap:"_ap_76l23_97"};function kt({title:e,error:t,edit:n=!0,active:a=!0,className:i,placeholder:o,max:s,min:c,view:l="date",onValue:_,name:d,value:p,after:f}){let[h,b]=m.useState(p===void 0?new Date:p),x=!n&&a;m.useEffect(()=>{b(p===void 0?new Date:p)},[p]);let v=T=>{b(T),_==null||_({value:T,name:d})},k=T=>{const B=T.target.getBoundingClientRect(),N=B.left,y=B.bottom,C=B.top;de.setListener("form",r.jsx(Oo,{position:{x:N,y:C,b:y},onValue:v,date:h,max:s,min:c,className:i},new Date().getTime()))};const w={};w.field="input",i&&(w.className=i);const D={};return o&&(D.placeholder=o),x?r.jsx(r.Fragment,{}):r.jsx(r.Fragment,{children:l==="icon"?r.jsx("i",{"data-icon":"F043",className:"pointer","data-color":"_b5b9cc :506290",onClick:k}):r.jsxs("dl",{...w,children:[e&&r.jsx("dt",{children:e}),r.jsxs("dd",{onClick:k,...D,"data-edit":(n&&a)+"",children:[K.Date(h,"dd.mm.yyyy"),f]}),t&&r.jsx("em",{children:t})]})})}const Oo=({date:e,onValue:t,position:n,max:a,min:i,className:o})=>{let[s,c]=m.useState(!0),l=new Date,_=new Date(e),d={y:parseInt(l.getFullYear()),d:parseInt(l.getDate()),m:parseInt(l.getMonth())+1},p={y:parseInt(_.getFullYear()),d:parseInt(_.getDate()),m:parseInt(_.getMonth())+1},[f,h]=m.useState({y:p.y,m:p.m}),b=j=>{let $=j.getDay();return $===0&&($=7),$-1},x=["пн","вт","ср","чт","пт","сб","вс"],v=f.m-1,k=new Date(f.y,v),w=[];for(let j=0;j<b(k);j++)w.push(0);for(;k.getMonth()===v;)w.push(k.getDate()),k.setDate(k.getDate()+1);let D=()=>{c(!1)},T=()=>{y(f.m+1,f.y)},B=()=>{y(f.m-1,f.y)},N=j=>{t(f.y+"-"+K.Number(2,f.m)+"-"+K.Number(2,j)),D()},y=(j,$)=>{$=j>12?$+1:j<1?$-1:$,j=j>12?1:j<1?12:j,h({y:$,m:j})};const C=j=>d.y===f.y&&d.m===f.m&&d.d===j?{"data-active":"true"}:{},F=j=>p.y===f.y&&p.m===f.m&&p.d===j?{"data-current":"true"}:{},E=j=>{let $=!0;if(a){let U=a.getTime(),V=new Date(f.y,f.m-1,j).getTime();U<V&&($=!1)}if(i){let U=i.getTime(),V=new Date(f.y,f.m-1,j).getTime();U>V&&($=!1)}return $};let M=window.innerHeight-n.y<320?n.y-312:n.b,I=window.innerWidth-n.x<265?n.x-235:n.x;return r.jsx(r.Fragment,{children:s?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:be.o,onClick:()=>D()},new Date().getTime()),r.jsxs("div",{className:[be.c,o&&o+"-backdrop"].join(" "),style:{top:M+"px",left:I+"px"},children:[r.jsxs("s",{children:[r.jsx("i",{onClick:B,children:r.jsx("svg",{width:"16",height:"16",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"m15.09 4.594-7.646 6.553a1.126 1.126 0 0 0 0 1.708l7.647 6.552c.73.625 1.857.107 1.857-.854V5.447c0-.961-1.127-1.48-1.857-.853Z"})})}),r.jsxs("h2",{children:[K.Month(f.m).name," ",f.y]}),r.jsx("i",{onClick:T,children:r.jsx("svg",{width:"16",height:"16",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"m8.91 19.406 7.646-6.552a1.125 1.125 0 0 0 0-1.709L8.91 4.593c-.73-.625-1.857-.107-1.857.854v13.107c0 .96 1.127 1.479 1.857.852Z"})})})]}),r.jsxs("div",{"grid-calendar":"",children:[x.map((j,$)=>r.jsx("p",{children:j},"v"+$)),w.map((j,$)=>r.jsx("span",{children:j!==0&&E(j)?r.jsx("b",{...C(j),...F(j),onClick:()=>N(j),children:j}):r.jsx("p",{...C(j),...F(j),children:j!==0?j:""})},$))]})]})]}):""})};function Ct({value:e,onValue:t,name:n,placeholder:a="",title:i,error:o,hide:s=!1,edit:c=!0,show:l=!0,active:_=!0,after:d="",view:p,modal:f,module:h,options:b,className:x}){let[v,k]=m.useState(e),w=B=>{if(!(c&&_)||!f)return;let N=f.split(".");g.Modal.Open(N[0],N[1],{callback:y=>{t&&t({value:y,name:n}),k(y)},onValue:t,options:b,name:n,value:e})};const D={};D.field="input",x&&(D.className=x);const T={};return a&&(T.placeholder=a),s?r.jsx(r.Fragment,{}):r.jsxs("dl",{...D,children:[i&&r.jsx("dt",{children:i}),r.jsx("dd",{...T,onClick:w,edit:(c&&_)+"","data-after":d,children:v}),o&&r.jsx("em",{children:o})]})}function jt({value:e,onValue:t,name:n,placeholder:a="",title:i="",error:o="",hide:s=!1,edit:c=!0,active:l=!0,after:_="",show:d=!0,course:p=100,view:f,type:h,onSave:b,className:x="",isClear:v=!1}){let k=!!(s&&(e===""||e===void 0));e=K.isNumeric(e)?Number(e)/p:0;let w=I=>h==="multi"?I.replace(/[^+\d.+-]/g,""):I.replace(/[^+\d.]/g,""),D=(I,j)=>{let $=document.createRange(),U=window.getSelection();$.setStart(j.childNodes[0],I),$.collapse(!0),U.removeAllRanges(),U.addRange($),j.focus()},T=I=>{t==null||t({value:w(I.target.textContent)*p,name:n}),I.target.textContent=w(I.target.textContent),I.target.textContent.length>0&&D(I.target.textContent.length,I.target)},B=I=>{G.Blur(I),I.target.textContent===""&&(I.target.textContent=0),b==null||b({value:w(I.target.textContent)*p,name:n}),t==null||t({value:w(I.target.textContent)*p,name:n}),I.target.textContent=K.Money(I.target.textContent)},N=I=>{I.target.textContent=w(I.target.textContent)},y=I=>{I.currentTarget.previousElementSibling.textContent="",t==null||t({value:0,name:n})},C=I=>{I.key==="Enter"&&I.preventDefault()},F=I=>{I.preventDefault(),navigator.clipboard.readText().then(j=>{j=j.replace(/^\s*/,"").replace(/\s*$/,""),window.document.execCommand("insertText",!1,j)}).catch(j=>{})};if(!(c&&l)&&!d||!(c&&l)&&k)return"";const E={};E.field="input",x&&(E.className=x);const M={};return M.inputMode="decimal",a&&(M.placeholder=a),c&&l&&(M.edit=""),r.jsxs("dl",{...E,children:[i?r.jsx("dt",{children:i}):"",r.jsx("dd",{...M,onInput:T,onPaste:F,onBlur:B,onKeyDown:C,onFocus:N,contentEditable:c&&l?G.ContentEditable:"false",suppressContentEditableWarning:!0,"data-after":_,children:!a||e?K.Money(e):""}),v&&r.jsx("svg",{"action-type":"delete",onClick:y,viewBox:"0 0 24 24",children:r.jsx("path",{d:"M17 6L6 17M6 6L17 17"})}),o?r.jsx("em",{children:o}):""]})}function Fn({value:e,onValue:t,name:n,view:a,error:i,edit:o=!0,active:s=!0,title:c,placeholder:l="",className:_,after:d}){let[p,f]=m.useState(e);m.useEffect(()=>{f(e)},[e]);let h=v=>{f(v),t&&t({value:v,name:n})},b=v=>{if(!o||!s)return;const k=v.target.getBoundingClientRect(),w=k.left,D=k.top;de.setListener("form",r.jsx(zo,{position:{x:w,y:D},onValue:h,date:p},new Date().getTime()))};const x={};return l&&(x.placeholder=l),a==="icon"?r.jsx("i",{"data-icon":"F043",onClick:b}):r.jsxs("dl",{children:[c&&r.jsx("dt",{children:c}),r.jsx("dd",{onClick:b,...x,children:K.Date(p,"mm.yyyy")}),i&&r.jsx("em",{children:i})]})}const zo=e=>{let[t,n]=m.useState(!0),a=new Date,i=new Date(e.date),o={y:parseInt(a.getFullYear()),m:parseInt(a.getMonth())+1},s={y:parseInt(i.getFullYear()),m:parseInt(i.getMonth())+1},[c,l]=m.useState(s.y),_=()=>{n(!1)},d=()=>{l(c+1)},p=()=>{l(c-1)},f=k=>{e.onValue(c+"-"+K.Number(2,k)),_()},h=k=>o.y===s.y&&o.m===k?"_FFEB3B":"",b=Array(12).fill("").map((k,w)=>w+1),x=window.innerHeight-e.position.y+33<320?e.position.y-312:e.position.y+33,v=window.innerWidth-e.position.x<265?e.position.x-235:e.position.x;return r.jsx(r.Fragment,{children:t?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:be.o,onClick:()=>_()},new Date().getTime()),r.jsxs("div",{className:be.c,style:{top:x+"px",left:v+"px"},children:[r.jsxs("s",{children:[r.jsx("i",{onClick:p,children:r.jsx("svg",{width:"16",height:"16",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"m15.09 4.594-7.646 6.553a1.126 1.126 0 0 0 0 1.708l7.647 6.552c.73.625 1.857.107 1.857-.854V5.447c0-.961-1.127-1.48-1.857-.853Z"})})}),r.jsx("h2",{children:c}),r.jsx("i",{onClick:d,children:r.jsx("svg",{width:"16",height:"16",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"m8.91 19.406 7.646-6.552a1.125 1.125 0 0 0 0-1.709L8.91 4.593c-.73-.625-1.857-.107-1.857.854v13.107c0 .96 1.127 1.479 1.857.852Z"})})})]}),r.jsx("div",{"grid-month":"",children:b.map((k,w)=>r.jsx("span",{onClick:()=>{f(k)},color:h(k),children:r.jsx("b",{children:K.Month(k).abc})},w))})]})]}):""})};function On({id:e,value:t,onValue:n,name:a,placeholder:i="",title:o="",error:s="",hide:c=!1,edit:l=!0,active:_=!0,after:d="",show:p=!0,maxLength:f,view:h,onSave:b,className:x="",isCopy:v=!0}){let[k,w]=m.useState(!1);k=l?!0:k;let D=E=>{n==null||n({value:E.target.innerText,name:a})},T=E=>{f&&E.target.textContent.trim().length>=f&&E.key!=="Backspace"&&E.preventDefault(),E.key==="Enter"&&E.preventDefault()},B=E=>{v&&(E.preventDefault(),navigator.clipboard.writeText(E.target.textContent.trim()).then(function(){g.Notice.Copy("Данные в буфер обмене")},function(M){}))},N=E=>{E.preventDefault(),navigator.clipboard.readText().then(M=>{if(f){let I=E.target.textContent.length;if(I>=f)return;f-=I,M=M.slice(0,f)}window.document.execCommand("insertText",!1,M.replace(/(\r\n|\n|\r)/gm," "))}).catch(M=>{})};if(c)return r.jsx(r.Fragment,{});if(!(l&&_)&&!p)return"";const y={};y.field="notes",x&&(y.className=x);const C={};i&&(C.placeholder=i),l&&_&&(C.edit=""),k&&(C.open="");const F=E=>{G.Blur(E),b==null||b({value:E.target.textContent.trim(),name:a})};return r.jsxs("dl",{...y,children:[o?r.jsx("dt",{children:o}):"",r.jsx("dd",{onPaste:N,onInput:D,onBlur:F,onKeyDown:T,onContextMenu:B,contentEditable:l&&_?G.ContentEditable:"false",suppressContentEditableWarning:!0,...C,children:t}),d,s?r.jsx("em",{children:s}):""]})}function St({onValue:e,onSave:t,active:n,max:a,edit:i,title:o,error:s,show:c,hide:l,value:_,placeholder:d,className:p,maxLength:f,name:h,after:b="",before:x="",view:v}){i=i!==void 0?i:!0,n=n!==void 0?n:!0,l=!!(l&&(_===""||_===void 0))&&!(i&&n),d=d!==void 0?d:"",a=a!==void 0?a:99;let w=!1,D=E=>{e==null||e({value:E.target.textContent,name:h})},T=E=>{if(!(w&&E.which===86)){if(E.which===17||E.which===91)return w=!0;E.key!=="Backspace"&&(E.target.textContent.length===a&&E.preventDefault(),E.key==="Enter"&&E.preventDefault(),isNaN(E.key)&&E.preventDefault())}},B=E=>{if(E.which===17||E.which===91)return w=!1},N=E=>{E.preventDefault(),navigator.clipboard.readText().then(M=>{if(M=M.replace(/(?!^\+|\d)./g,""),f){let I=E.target.textContent.length;if(I>=f)return;f-=I,M=M.slice(0,f)}window.document.execCommand("insertText",!1,""+M)}).catch(M=>{})};const y=E=>{G.Blur(E),t==null||t({value:E.target.textContent,name:h})},C={};C.field="input",p&&(C.className=p);let F={};return i&&n?(F.edit="true",F.contentEditable=G.ContentEditable):F.contentEditable="false",F.inputMode="decimal",d&&(F.placeholder=d),l?r.jsx(r.Fragment,{}):r.jsxs("dl",{...C,children:[o&&r.jsx("dt",{children:o}),x,r.jsx("dd",{...F,onPaste:N,onInput:D,onBlur:y,onKeyDown:T,onKeyUp:B,suppressContentEditableWarning:!0,children:_}),b,s&&r.jsx("em",{children:s})]})}function zn({value:e,onValue:t,onSave:n,name:a,placeholder:i="",className:o,title:s,error:c,edit:l=!0,active:_=!0,reload:d=!1,native:p=!1,isShow:f=!1,maxLength:h,eyes:b=[],after:x=""}){const[v,k]=m.useState(f);let w=C=>{t&&t({value:C.target.textContent,name:a,reload:d})},D=C=>{C.key==="Enter"&&C.preventDefault()},T=C=>{C.preventDefault(),navigator.clipboard.readText().then(F=>{if(h){let E=C.target.textContent.length;if(E>=h)return;h-=E,F=F.slice(0,h)}window.document.execCommand("insertText",!1,F.replace(/(\r\n|\n|\r)/gm," "))}).catch(F=>{})},B=C=>{G.Blur(C),n==null||n({value:C.target.textContent.trim(),name:a})};const N={};N.field="password",v&&(N.show=""),o&&(N.className=o);const y={};return i&&(y.placeholder=i),p?"":r.jsxs("dl",{...N,children:[s?r.jsx("dt",{children:s}):"",r.jsx("dd",{onPaste:T,onInput:w,onKeyDown:D,onBlur:B,contentEditable:l&&_?G.ContentEditable:"false",...y,suppressContentEditableWarning:!0,children:e}),b[0]&&r.jsx("i",{onClick:()=>k(!v),children:v?b[1]:b[0]}),x,c?r.jsx("em",{children:c}):""]})}const Et={0:{name:"Heard Island and Mcdonald Islands",dial_code:"+0",code:"HM",mask:"+0(___) ___-__-__"},1:{name:"United States",dial_code:"+1",code:"US",mask:"+1(___) ___-__-__"},7:{name:"Russia",dial_code:"+7",code:"RU",mask:"+7(___) ___-__-__"},20:{name:"Egypt",dial_code:"+20",code:"EG",mask:"+20(___) ___-__-__"},27:{name:"South Africa",dial_code:"+27",code:"ZA",mask:"+27(___) __-__-__"},30:{name:"Greece",dial_code:"+30",code:"GR",mask:"+30(___) ___-__-__"},31:{name:"Netherlands",dial_code:"+31",code:"NL",mask:"+31(___) __-__-__"},32:{name:"Belgium",dial_code:"+32",code:"BE",mask:"+32(___) __-__-__"},33:{name:"France",dial_code:"+33",code:"FR",mask:"+33(___) __-__-__"},34:{name:"Spain",dial_code:"+34",code:"ES",mask:"+34(___) __-__-__"},36:{name:"Hungary",dial_code:"+36",code:"HU",mask:"+36(___) __-__-__"},39:{name:"Italy",dial_code:"+39",code:"IT",mask:"+39(___) ___-__-__"},40:{name:"Romania",dial_code:"+40",code:"RO",mask:"+40(___) __-__-__"},41:{name:"Switzerland",dial_code:"+41",code:"CH",mask:"+41(___) __-__-__"},43:{name:"Austria",dial_code:"+43",code:"AT",mask:"+43(__) ___-__-__"},44:{name:"United Kingdom",dial_code:"+44",code:"GB",mask:"+44(___) ___-__-__"},45:{name:"Denmark",dial_code:"+45",code:"DK",mask:"+45(__) __-__-__"},46:{name:"Sweden",dial_code:"+46",code:"SE",mask:"+46(___) __-__-__"},47:{name:"Svalbard and Jan Mayen",dial_code:"+47",code:"SJ",mask:"+47(__) __-__-__"},48:{name:"Poland",dial_code:"+48",code:"PL",mask:"+48(__) __-__-__"},49:{name:"Germany",dial_code:"+49",code:"DE",mask:"+49(___) ___-__-__"},51:{name:"Peru",dial_code:"+51",code:"PE",mask:"+51(___) __-__-__"},52:{name:"Mexico",dial_code:"+52",code:"MX",mask:"+52(__-__) ___-__-__"},53:{name:"Cuba",dial_code:"+53",code:"CU",mask:"+53(__) __-__-__"},54:{name:"Argentina",dial_code:"+54",code:"AR",mask:"+54(__-__) ___-__-__"},55:{name:"Brazil",dial_code:"+55",code:"BR",mask:"+55(___) ___-__-__"},56:{name:"Chile",dial_code:"+56",code:"CL",mask:"+56(___) __-__-__"},57:{name:"Colombia",dial_code:"+57",code:"CO",mask:"+57(___) ___-__-__"},58:{name:"Venezuela, Bolivarian Republic of Venezuela",dial_code:"+58",code:"VE",mask:"+58(___) ___-__-__"},60:{name:"Malaysia",dial_code:"+60",code:"MY",mask:"+60(___) __-__-__"},61:{name:"Cocos (Keeling) Islands",dial_code:"+61",code:"CC",mask:"+61(___) ___-__-__"},62:{name:"Indonesia",dial_code:"+62",code:"ID",mask:"+62(___) __-__-__"},63:{name:"Philippines",dial_code:"+63",code:"PH",mask:"+63(___) ___-__-__"},64:{name:"Pitcairn",dial_code:"+64",code:"PN",mask:"+64(___) __-__-__"},65:{name:"Singapore",dial_code:"+65",code:"SG",mask:"+65(__) __-__-__"},66:{name:"Thailand",dial_code:"+66",code:"TH",mask:"+66(___) __-__-__"},77:{name:"Kazakhstan",dial_code:"+77",code:"KZ",mask:"+77(__) ___-__-__"},81:{name:"Japan",dial_code:"+81",code:"JP",mask:"+81(___) ___-__-__"},82:{name:"Korea, Republic of South Korea",dial_code:"+82",code:"KR",mask:"+82(___) ___-__-__"},84:{name:"Vietnam",dial_code:"+84",code:"VN",mask:"+84(___) __-__-__"},86:{name:"China",dial_code:"+86",code:"CN",mask:"+86(__-__) ___-__-__"},90:{name:"Turkey",dial_code:"+90",code:"TR",mask:"+90(___) ___-__-__"},91:{name:"India",dial_code:"+91",code:"IN",mask:"+91(___) ___-__-__"},92:{name:"Pakistan",dial_code:"+92",code:"PK",mask:"+92(___) ___-__-__"},93:{name:"Afghanistan",dial_code:"+93",code:"AF",mask:"+93(__) ___-__-__"},94:{name:"Sri Lanka",dial_code:"+94",code:"LK",mask:"+94(___) __-__-__"},95:{name:"Myanmar",dial_code:"+95",code:"MM",mask:"+95(___) ___-__-__"},98:{name:"Iran, Islamic Republic of Persian Gulf",dial_code:"+98",code:"IR",mask:"+98(___) ___-__-__"},211:{name:"South Sudan",dial_code:"+211",code:"SS",mask:"+211(___) ___-__-__"},212:{name:"Morocco",dial_code:"+212",code:"MA",mask:"+212(___) __-__-__"},213:{name:"Algeria",dial_code:"+213",code:"DZ",mask:"+213(__) ___-__-__"},216:{name:"Tunisia",dial_code:"+216",code:"TN",mask:"+216(__) __-__-__"},218:{name:"Libyan Arab Jamahiriya",dial_code:"+218",code:"LY",mask:"+218(___) ___-__-__"},220:{name:"Gambia",dial_code:"+220",code:"GM",mask:"+220(___) __-__"},221:{name:"Senegal",dial_code:"+221",code:"SN",mask:"+221(___) __-__-__"},222:{name:"Mauritania",dial_code:"+222",code:"MR",mask:"+222(__) __-__-__"},223:{name:"Mali",dial_code:"+223",code:"ML",mask:"+223(__) __-__-__"},224:{name:"Guinea",dial_code:"+224",code:"GN",mask:"+224(__) __-__-__"},225:{name:"Cote d'Ivoire",dial_code:"+225",code:"CI",mask:"+225(__) __-__-__"},226:{name:"Burkina Faso",dial_code:"+226",code:"BF",mask:"+226(__) __-__-__"},227:{name:"Niger",dial_code:"+227",code:"NE",mask:"+227(__) __-__-__"},228:{name:"Togo",dial_code:"+228",code:"TG",mask:"+228(__) __-__-__"},229:{name:"Benin",dial_code:"+229",code:"BJ",mask:"+229(__) __-__-__"},230:{name:"Mauritius",dial_code:"+230",code:"MU",mask:"+230(___) __-__"},231:{name:"Liberia",dial_code:"+231",code:"LR",mask:"+231(___) __-__"},232:{name:"Sierra Leone",dial_code:"+232",code:"SL",mask:"+232(__) __-__-__"},233:{name:"Ghana",dial_code:"+233",code:"GH",mask:"+233(___) __-__-__"},234:{name:"Nigeria",dial_code:"+234",code:"NG",mask:"+234(___) ___-__-__"},235:{name:"Chad",dial_code:"+235",code:"TD",mask:"+235(__) __-__-__"},236:{name:"Central African Republic",dial_code:"+236",code:"CF",mask:"+236(__) __-__-__"},237:{name:"Cameroon",dial_code:"+237",code:"CM",mask:"+237(__) __-__-__"},238:{name:"Cape Verde",dial_code:"+238",code:"CV",mask:"+238(___) __-__"},239:{name:"Sao Tome and Principe",dial_code:"+239",code:"ST",mask:"+239(___) ___-__-__"},240:{name:"Equatorial Guinea",dial_code:"+240",code:"GQ",mask:"+240(___) __-__-__"},241:{name:"Gabon",dial_code:"+241",code:"GA",mask:"+241(__) __-__-__"},242:{name:"Congo",dial_code:"+242",code:"CG",mask:"+242(___) __-__-__"},243:{name:"Congo, The Democratic Republic of the Congo",dial_code:"+243",code:"CD",mask:"+243(___) ___-__-__"},244:{name:"Angola",dial_code:"+244",code:"AO",mask:"+244(__) ___-__-__"},245:{name:"Guinea-Bissau",dial_code:"+245",code:"GW",mask:"+245(___) __-__"},246:{name:"British Indian Ocean Territory",dial_code:"+246",code:"IO",mask:"+246(___) ___-__-__"},248:{name:"Seychelles",dial_code:"+248",code:"SC",mask:"+248(___) ___-__-__"},249:{name:"Sudan",dial_code:"+249",code:"SD",mask:"+249(___) __-__-__"},250:{name:"Rwanda",dial_code:"+250",code:"RW",mask:"+250(___) __-__-__"},251:{name:"Ethiopia",dial_code:"+251",code:"ET",mask:"+251(___) __-__-__"},252:{name:"Somalia",dial_code:"+252",code:"SO",mask:"+252(___) ___-__-__"},253:{name:"Djibouti",dial_code:"+253",code:"DJ",mask:"+253(___) ___-__-__"},254:{name:"Kenya",dial_code:"+254",code:"KE",mask:"+254(___) __-__-__"},255:{name:"Tanzania, United Republic of Tanzania",dial_code:"+255",code:"TZ",mask:"+255(___) __-__-__"},256:{name:"Uganda",dial_code:"+256",code:"UG",mask:"+256(___) __-__-__"},257:{name:"Burundi",dial_code:"+257",code:"BI",mask:"+257(__) __-__-__"},258:{name:"Mozambique",dial_code:"+258",code:"MZ",mask:"+258(___) __-__-__"},260:{name:"Zambia",dial_code:"+260",code:"ZM",mask:"+260(___) __-__-__"},261:{name:"Madagascar",dial_code:"+261",code:"MG",mask:"+261(___) __-__-__"},262:{name:"Reunion",dial_code:"+262",code:"RE",mask:"+262(___) __-__-__"},263:{name:"Zimbabwe",dial_code:"+263",code:"ZW",mask:"+263(___) __-__-__"},264:{name:"Namibia",dial_code:"+264",code:"NA",mask:"+264(___) __-__-__"},265:{name:"Malawi",dial_code:"+265",code:"MW",mask:"+265(___) __-__-__"},266:{name:"Lesotho",dial_code:"+266",code:"LS",mask:"+266(__) __-__-__"},267:{name:"Botswana",dial_code:"+267",code:"BW",mask:"+267(__) __-__-__"},268:{name:"Swaziland",dial_code:"+268",code:"SZ",mask:"+268(___) ___-__-__"},269:{name:"Comoros",dial_code:"+269",code:"KM",mask:"+269(___) __-__"},290:{name:"Saint Helena, Ascension and Tristan Da Cunha",dial_code:"+290",code:"SH",mask:"+290(___) ___-__-__"},291:{name:"Eritrea",dial_code:"+291",code:"ER",mask:"+291(___) ___-__-__"},297:{name:"Aruba",dial_code:"+297",code:"AW",mask:"+297(_) __-__-__"},298:{name:"Faroe Islands",dial_code:"+298",code:"FO",mask:"+298(__) __-__"},299:{name:"Greenland",dial_code:"+299",code:"GL",mask:"+299(__) __-__"},345:{name:"Cayman Islands",dial_code:"+ 345",code:"KY",mask:"+345(___) ___-__-__"},350:{name:"Gibraltar",dial_code:"+350",code:"GI",mask:"+350(__) __-__-__"},351:{name:"Portugal",dial_code:"+351",code:"PT",mask:"+351(___) __-__-__"},352:{name:"Luxembourg",dial_code:"+352",code:"LU",mask:"+352(___) __-__-__"},353:{name:"Ireland",dial_code:"+353",code:"IE",mask:"+353(___) __-__-__"},354:{name:"Iceland",dial_code:"+354",code:"IS",mask:"+354(___) __-__"},355:{name:"Albania",dial_code:"+355",code:"AL",mask:"+355(__) ___-__-__"},356:{name:"Malta",dial_code:"+356",code:"MT",mask:"+356(__) __-__-__"},357:{name:"Cyprus",dial_code:"+357",code:"CY",mask:"+357(__) __-__-__"},358:{name:"Finland",dial_code:"+358",code:"FI",mask:"+358(___) __-__-__"},359:{name:"Bulgaria",dial_code:"+359",code:"BG",mask:"+359(___) __-__-__"},370:{name:"Lithuania",dial_code:"+370",code:"LT",mask:"+370(_) ___-__-__"},371:{name:"Latvia",dial_code:"+371",code:"LV",mask:"+371(__) __-__-__"},372:{name:"Estonia",dial_code:"+372",code:"EE",mask:"+372(__) __-__-__"},373:{name:"Moldova",dial_code:"+373",code:"MD",mask:"+373(__) __-__-__"},374:{name:"Armenia",dial_code:"+374",code:"AM",mask:"+374(_) ___-__-__"},375:{name:"Belarus",dial_code:"+375",code:"BY",mask:"+375(__) ___-__-__"},376:{name:"Andorra",dial_code:"+376",code:"AD",mask:"+376(_) _-__-__"},377:{name:"Monaco",dial_code:"+377",code:"MC",mask:"+377(___) __-__-__"},378:{name:"San Marino",dial_code:"+378",code:"SM",mask:"+378(__) __-__-__"},379:{name:"Holy See (Vatican City State)",dial_code:"+379",code:"VA",mask:"+379(___) ___-__-__"},380:{name:"Ukraine",dial_code:"+380",code:"UA",mask:"+380(__) ___-__-__"},381:{name:"Serbia",dial_code:"+381",code:"RS",mask:"+381(__) __-__-__"},382:{name:"Montenegro",dial_code:"+382",code:"ME",mask:"+382(___) ___-__-__"},383:{name:"Kosovo",dial_code:"+383",code:"XK",mask:"+383(___) __-__"},385:{name:"Croatia",dial_code:"+385",code:"HR",mask:"+385(__) __-__-__"},386:{name:"Slovenia",dial_code:"+386",code:"SI",mask:"+386(__) __-__-__"},387:{name:"Bosnia and Herzegovina",dial_code:"+387",code:"BA",mask:"+387(__) __-__-__"},389:{name:"Macedonia",dial_code:"+389",code:"MK",mask:"+389(__) __-__-__"},420:{name:"Czech Republic",dial_code:"+420",code:"CZ",mask:"+420(___) __-__-__"},421:{name:"Slovakia",dial_code:"+421",code:"SK",mask:"+421(___) __-__-__"},423:{name:"Liechtenstein",dial_code:"+423",code:"LI",mask:"+423(___) __-__-__"},500:{name:"South Georgia and the South Sandwich Islands",dial_code:"+500",code:"GS",mask:"+500(___) ___-__-__"},501:{name:"Belize",dial_code:"+501",code:"BZ",mask:"+501(___) __-__"},502:{name:"Guatemala",dial_code:"+502",code:"GT",mask:"+502(__) __-__-__"},503:{name:"El Salvador",dial_code:"+503",code:"SV",mask:"+503(__) __-__-__"},504:{name:"Honduras",dial_code:"+504",code:"HN",mask:"+504(__) __-__-__"},505:{name:"Nicaragua",dial_code:"+505",code:"NI",mask:"+505(__) __-__-__"},506:{name:"Costa Rica",dial_code:"+506",code:"CR",mask:"+506(__) __-__-__"},507:{name:"Panama",dial_code:"+507",code:"PA",mask:"+507(__) __-__-__"},508:{name:"Saint Pierre and Miquelon",dial_code:"+508",code:"PM",mask:"+508(___) ___-__-__"},509:{name:"Haiti",dial_code:"+509",code:"HT",mask:"+509(__) __-__-__"},590:{name:"Saint Martin",dial_code:"+590",code:"MF",mask:"+590(___) __-__-__"},591:{name:"Bolivia, Plurinational State of bolivia",dial_code:"+591",code:"BO",mask:"+591(__) __-__-__"},592:{name:"Guyana",dial_code:"+592",code:"GY",mask:"+592(___) ___-__-__"},593:{name:"Ecuador",dial_code:"+593",code:"EC",mask:"+593(___) __-__-__"},594:{name:"French Guiana",dial_code:"+594",code:"GF",mask:"+594(___) __-__-__"},595:{name:"Paraguay",dial_code:"+595",code:"PY",mask:"+595(___) __-__-__"},596:{name:"Martinique",dial_code:"+596",code:"MQ",mask:"+596(___) __-__-__"},597:{name:"Suriname",dial_code:"+597",code:"SR",mask:"+597(___) __-__"},598:{name:"Uruguay",dial_code:"+598",code:"UY",mask:"+598(__) __-__-__"},599:{name:"Netherlands Antilles",dial_code:"+599",code:"AN",mask:"+599(__) __-__-__"},670:{name:"Timor-Leste",dial_code:"+670",code:"TL",mask:"+670(__) __-__-__"},672:{name:"Norfolk Island",dial_code:"+672",code:"NF",mask:"+672(___) ___-__-__"},673:{name:"Brunei Darussalam",dial_code:"+673",code:"BN",mask:"+673(___) __-__"},674:{name:"Nauru",dial_code:"+674",code:"NR",mask:"+674(___) __-__"},675:{name:"Papua New Guinea",dial_code:"+675",code:"PG",mask:"+675(___) __-__"},676:{name:"Tonga",dial_code:"+676",code:"TO",mask:"+676(___) __-__"},677:{name:"Solomon Islands",dial_code:"+677",code:"SB",mask:"+677(___) __-__"},678:{name:"Vanuatu",dial_code:"+678",code:"VU",mask:"+678(___) __-__"},679:{name:"Fiji",dial_code:"+679",code:"FJ",mask:"+679(___) __-__"},680:{name:"Palau",dial_code:"+680",code:"PW",mask:"+680(___) ___-__-__"},681:{name:"Wallis and Futuna",dial_code:"+681",code:"WF",mask:"+681(___) ___-__-__"},682:{name:"Cook Islands",dial_code:"+682",code:"CK",mask:"+682(_) __-__"},683:{name:"Niue",dial_code:"+683",code:"NU",mask:"+683(___) ___-__-__"},685:{name:"Samoa",dial_code:"+685",code:"WS",mask:"+685(__) __-__"},686:{name:"Kiribati",dial_code:"+686",code:"KI",mask:"+686(___) ___-__-__"},687:{name:"New Caledonia",dial_code:"+687",code:"NC",mask:"+687(__) __-__"},688:{name:"Tuvalu",dial_code:"+688",code:"TV",mask:"+688(___) ___-__-__"},689:{name:"French Polynesia",dial_code:"+689",code:"PF",mask:"+689(__) __-__"},690:{name:"Tokelau",dial_code:"+690",code:"TK",mask:"+690(___) ___-__-__"},691:{name:"Micronesia, Federated States of Micronesia",dial_code:"+691",code:"FM",mask:"+691(___) ___-__-__"},692:{name:"Marshall Islands",dial_code:"+692",code:"MH",mask:"+692(___) ___-__-__"},850:{name:"Korea, Democratic People's Republic of Korea",dial_code:"+850",code:"KP",mask:"+850(___) ___-__-__"},852:{name:"Hong Kong",dial_code:"+852",code:"HK",mask:"+852(__) __-__-__"},853:{name:"Macao",dial_code:"+853",code:"MO",mask:"+853(__) __-__-__"},855:{name:"Cambodia",dial_code:"+855",code:"KH",mask:"+855(__) __-__-__"},856:{name:"Laos",dial_code:"+856",code:"LA",mask:"+856(___) ___-__-__"},880:{name:"Bangladesh",dial_code:"+880",code:"BD",mask:"+880(___) ___-__-__"},886:{name:"Taiwan",dial_code:"+886",code:"TW",mask:"+886(___) __-__-__"},960:{name:"Maldives",dial_code:"+960",code:"MV",mask:"+960(___) __-__"},961:{name:"Lebanon",dial_code:"+961",code:"LB",mask:"+961(__) __-__-__"},962:{name:"Jordan",dial_code:"+962",code:"JO",mask:"+962(___) __-__-__"},963:{name:"Syrian Arab Republic",dial_code:"+963",code:"SY",mask:"+963(___) __-__-__"},964:{name:"Iraq",dial_code:"+964",code:"IQ",mask:"+964(___) ___-__-__"},965:{name:"Kuwait",dial_code:"+965",code:"KW",mask:"+965(__) __-__-__"},966:{name:"Saudi Arabia",dial_code:"+966",code:"SA",mask:"+966(___) __-__-__"},967:{name:"Yemen",dial_code:"+967",code:"YE",mask:"+967(___) __-__-__"},968:{name:"Oman",dial_code:"+968",code:"OM",mask:"+968(__) __-__-__"},970:{name:"Palestinian Territory, Occupied",dial_code:"+970",code:"PS",mask:"+970(___) __-__-__"},971:{name:"United Arab Emirates",dial_code:"+971",code:"AE",mask:"+971(___) __-__-__"},972:{name:"Israel",dial_code:"+972",code:"IL",mask:"+972(___) __-__-__"},973:{name:"Bahrain",dial_code:"+973",code:"BH",mask:"+973(__) __-__-__"},974:{name:"Qatar",dial_code:"+974",code:"QA",mask:"+974(__) __-__-__"},975:{name:"Bhutan",dial_code:"+975",code:"BT",mask:"+975(__) __-__-__"},976:{name:"Mongolia",dial_code:"+976",code:"MN",mask:"+976(__) __-__-__"},977:{name:"Nepal",dial_code:"+977",code:"NP",mask:"+977(___) ___-__-__"},992:{name:"Tajikistan",dial_code:"+992",code:"TJ",mask:"+992(___) __-__-__"},993:{name:"Turkmenistan",dial_code:"+993",code:"TM",mask:"+993(__) __-__-__"},994:{name:"Azerbaijan",dial_code:"+994",code:"AZ",mask:"+994(__) ___-__-__"},995:{name:"Georgia",dial_code:"+995",code:"GE",mask:"+995(___) __-__-__"},996:{name:"Kyrgyzstan",dial_code:"+996",code:"KG",mask:"+996(___) __-__-__"},998:{name:"Uzbekistan",dial_code:"+998",code:"UZ",mask:"+998(___) __-__-__"},1242:{name:"Bahamas",dial_code:"+1242",code:"BS",mask:"+1242(___) __-__"},1246:{name:"Barbados",dial_code:"+1246",code:"BB",mask:"+1246(___) __-__"},1264:{name:"Anguilla",dial_code:"+1264",code:"AI",mask:"+1264(___) ___-__-__"},1268:{name:"Antigua and Barbuda",dial_code:"+1268",code:"AG",mask:"+1268(_) __-__"},1284:{name:"Virgin Islands, British",dial_code:"+1284",code:"VG",mask:"+1284(___) __-__"},1340:{name:"Virgin Islands, U.S.",dial_code:"+1340",code:"VI",mask:"+1340(___) ___-__-__"},1441:{name:"Bermuda",dial_code:"+1441",code:"BM",mask:"+1441(___) __-__"},1473:{name:"Grenada",dial_code:"+1473",code:"GD",mask:"+1473(___) __-__"},1649:{name:"Turks and Caicos Islands",dial_code:"+1649",code:"TC",mask:"+1649(___) ___-__-__"},1664:{name:"Montserrat",dial_code:"+1664",code:"MS",mask:"+1664(___) ___-__-__"},1670:{name:"Northern Mariana Islands",dial_code:"+1670",code:"MP",mask:"+1670(___) ___-__-__"},1671:{name:"Guam",dial_code:"+1671",code:"GU",mask:"+1671(___) ___-__-__"},1684:{name:"American Samoa",dial_code:"+1684",code:"AS",mask:"+1684(___) ___-__-__"},1758:{name:"Saint Lucia",dial_code:"+1758",code:"LC",mask:"+1758(___) __-__"},1767:{name:"Dominica",dial_code:"+1767",code:"DM",mask:"+1767(___) __-__"},1784:{name:"Saint Vincent and the Grenadines",dial_code:"+1784",code:"VC",mask:"+1784(___) __-__"},1849:{name:"Dominican Republic",dial_code:"+1849",code:"DO",mask:"+1849(___) ___-__-__"},1868:{name:"Trinidad and Tobago",dial_code:"+1868",code:"TT",mask:"+1868(___) __-__"},1869:{name:"Saint Kitts and Nevis",dial_code:"+1869",code:"KN",mask:"+1869(___) __-__"},1876:{name:"Jamaica",dial_code:"+1876",code:"JM",mask:"+1876(___) __-__"},1939:{name:"Puerto Rico",dial_code:"+1939",code:"PR",mask:"+1939(___) ___-__-__"}};function It({value:e,onValue:t,onSave:n,name:a,placeholder:i="",title:o="",error:s="",hide:c=!1,edit:l=!0,active:_=!0,after:d="",show:p=!0,view:f,className:h=""}){l=l!==void 0?l:!0,_=_!==void 0?_:!0,c=!!(c&&(e===""||e===void 0))&&!(l&&_),m.useRef(null);let x="+_(___) ___-__-__",v=!0,k=0,w=(I,j)=>{let $=document.createRange(),U=window.getSelection();$.setStart(j.childNodes[0],I),$.collapse(!0),U.removeAllRanges(),U.addRange($),j.focus()},D=I=>{let j=B(I.target.textContent);I.target.textContent=j.q,j.i=j.q.lastIndexOf(j.v.substr(-1)),j.i<j.q.length&&j.q!==x?j.i++:j.i=j.q.indexOf("_"),w(j.i,I.target),t&&t({value:j.q.replace(/\D/g,""),name:a})},T=I=>{I.preventDefault(),navigator.clipboard.readText().then(j=>{window.document.execCommand("insertText",!1,j)}).catch(j=>{})},B=I=>{let j=0,$="",U=I.replace(/\D/g,"");U===""&&(v=!0);let V=U.split(""),se="";V.forEach(We=>{v&&(se+=We,Et[se]!==void 0&&v?(v=!1,x=Et[se].mask.replace(new RegExp("[0-9]","g"),"_"),$=Et[se].code):(v&&(k=(""+se).length,x=`+${se}_(___) ___-__-__`.replace(new RegExp("[0-9]","g"),"_"),$=""),k>(""+se).length&&(v=!0,x=`+${se}_(___) ___-__-__`.replace(new RegExp("[0-9]","g"),"_"),$="")))});let we=x.replace(/\D/g,"");return we.length>=U.length&&(U=we),{q:x.replace(/[_\d]/g,function(){return U.charAt(j++)||"_"}),i:j,v:U,f:$}},N=I=>{I.preventDefault(),navigator.clipboard.writeText(I.target.textContent.replace(/\D/g,"")).then(function(){g.Notice.Copy("Данные в буфер обмене")},function(j){})},y=B(e),C=I=>{I.key==="Enter"&&I.preventDefault()};const F=I=>{G.Blur(I),n&&n({value:I.target.textContent.replace(/\D/g,""),name:a})},E={};E.field="input",h&&(E.className=h);let M={};return l&&_?(M.edit="true",M.contentEditable=G.ContentEditable):M.contentEditable="false",i&&(M.placeholder=i),d&&(M.after=d),c?r.jsx(r.Fragment,{}):r.jsxs("dl",{...E,children:[o&&r.jsx("dt",{children:o}),r.jsx("dd",{...M,onPaste:T,onInput:D,onKeyDown:C,onContextMenu:N,onBlur:F,suppressContentEditableWarning:!0,children:y.q}),s&&r.jsx("em",{children:s})]})}const Rn=({className:e,title:t,timeout:n=1e3,placeholder:a,edit:i=!0,active:o=!0,value:s,onValue:c,maxLength:l=20})=>{let _=0,d=m.useRef({textContent:s}),p=()=>{d.current.textContent.trim().length===0&&(d.current.textContent=""),clearTimeout(_),_=setTimeout(()=>{var w;return c((w=d.current)==null?void 0:w.textContent)},n)},f=()=>{d.current&&(d.current.textContent=""),c("")},h=w=>{l&&w.target.textContent.trim().length>=l&&w.key!=="Backspace"&&w.preventDefault(),w.key==="Enter"&&w.preventDefault()},b=w=>{w.preventDefault(),navigator.clipboard.readText().then(D=>{if(l){let T=w.target.textContent.length;if(T>=l)return;l-=T,D=D.slice(0,l)}window.document.execCommand("insertText",!1,D.replace(/(\r\n|\n|\r)/gm," "))}).catch(D=>{})},x=()=>{d.current.textContent=d.current.textContent.trim()};const v={};v.field="search",e&&(v.className=e);const k={};return a&&(k.placeholder=a),r.jsxs("dl",{...v,children:[t&&r.jsx("dt",{children:t}),r.jsx("dd",{ref:d,onPaste:b,onInput:p,onKeyDown:h,onBlur:x,contentEditable:i&&o?G.ContentEditable:"false",...k,suppressContentEditableWarning:!0,children:s}),r.jsx("svg",{"aria-label":"icon",onClick:f,viewBox:"0 0 24 24",children:r.jsx("path",{d:"M10.364 3a7.364 7.364 0 1 0 0 14.727 7.364 7.364 0 0 0 0-14.727v0ZM15.857 15.86 21 21.001"})}),r.jsx("svg",{"action-type":"delete",onClick:f,viewBox:"0 0 24 24",children:r.jsx("path",{d:"M17 6L6 17M6 6L17 17"})})]})};function Dt({title:e,error:t,edit:n=!0,active:a=!0,hide:i,value:o=0,onValue:s,options:c,placeholder:l="",className:_,name:d,after:p,view:f,order:h,isReload:b=!1}){var F,E;const x=m.useRef(),[v,k]=m.useState(o),[w,D]=m.useState(c);m.useEffect(()=>{k(o),D(c)},[o,c]),i=!!(i&&(o===0||((F=w==null?void 0:w[o])==null?void 0:F.n)===void 0))&&!(n&&a);let B=M=>{k(M),s&&s({value:M,name:d,reload:b})},N=M=>{if(Object.keys(w||{}).length===0||!(n&&a))return;const I=M.target.getBoundingClientRect();de.setListener("form",r.jsx(Ro,{parent:I,onValue:B,view:f,className:_,options:w,order:h},new Date().getTime()))},y={field:"select",className:_},C={onClick:N};return l&&(C.placeholder=l),p&&(C.after=p),n&&a&&(C.edit=""),i?"":r.jsxs("dl",{...y,children:[e&&r.jsx("dt",{children:e}),r.jsx("dd",{...C,ref:x,children:(E=w==null?void 0:w[v])==null?void 0:E.n}),Object.keys(w||{}).length!==0&&r.jsx("s",{children:r.jsx("svg",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"m5.25 8.625 6.75 6.75 6.75-6.75"})})}),t&&r.jsx("em",{children:t})]})}const Ro=({onValue:e,parent:t,view:n,className:a,options:i,order:o})=>{let[s,c]=m.useState(!0),l=()=>{c(!1)},_=f=>{c(!1),e(f)},d=window.innerHeight-t.y+t.height<320?t.y-312:t.y+33,p=window.innerWidth-t.x<265?t.x-235:t.x;return r.jsx(r.Fragment,{children:s?r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-select":"backdrop",onClick:l},new Date().getTime()),r.jsx("div",{className:a,"data-select":"background "+n,style:{top:d+"px",left:p+"px",width:t.width},children:r.jsx(Zo,{order:o,options:i,link:_})})]}):""})},Zo=({order:e,options:t,link:n})=>e?r.jsx("ul",{children:e.map((a,i)=>t[a].s!==0?r.jsx("li",{onClick:()=>{n(a)},children:t[a].n},i):"")}):r.jsx("ul",{children:Object.keys(t).map((a,i)=>t[a].s!==0?r.jsx("li",{onClick:()=>{n(a)},children:t[a].n},i):"")});function Nt(e){let t=()=>e.title?r.jsx("dt",{children:e.title}):"",n=()=>e.error?r.jsx("em",{children:e.error}):"",a=e.edit!==void 0?e.edit:!0,i=e.active!==void 0?e.active:!0,s=!!(e.hide&&(e.default===""||e.options[e.default]===void 0))&&!(a&&i),c=e.placeholder!==void 0?e.placeholder:"",l=h=>{d(e.options[h]),e.onValue({value:h,name:e.name})},[_,d]=m.useState(e.default!==void 0?e.options[e.default]:e.default),p=h=>{if(!(a&&i))return;const b=h.target.getBoundingClientRect();de.setListener("form",r.jsx(Uo,{parent:b,onValue:l,view:e.view,options:e.options},new Date().getTime()))};const f={};return c&&(f.placeholder=c),s?r.jsx(r.Fragment,{}):r.jsxs("dl",{"data-form":"select",children:[t(),r.jsx("dd",{onClick:p,"data-edit":(a&&i)+"",...f,children:_}),n()]})}const Uo=({onValue:e,parent:t,view:n,options:a})=>{let[i,o]=m.useState(!0),s=()=>{o(!1)},c=p=>{o(!1),e(p)},l=Object.keys(a).length*36,_=window.innerHeight-t.y+t.height<l?t.y-(l-33):t.y+33,d=window.innerWidth-t.x<265?t.x-235:t.x;return r.jsx(r.Fragment,{children:i?r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-select":"backdrop",onClick:s},new Date().getTime()),r.jsx("div",{"data-select":"background "+n,style:{top:_+"px",left:d+"px",width:t.width},children:r.jsx("ul",{children:Object.keys(a).map((p,f)=>r.jsx("li",{onClick:()=>{c(p)},children:a[p]},f))})})]}):""})};function Tt({set:e,value:t,onValue:n,name:a,placeholder:i="",title:o="",error:s="",hide:c=!1,edit:l=!0,show:_=!0,active:d=!0,after:p="",view:f,module:h,item:b,className:x=""}){let v={};switch(e){case"Input":return r.jsx(Ue,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:n,name:a,placeholder:i,className:x});case"Select":return b&&(v=ye.getSelect(parseInt(b))?ye.getSelect(parseInt(b)):{0:{s:"1",n:"не известно"}}),r.jsx(Dt,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:parseInt(t||"0"),onValue:n,name:a,placeholder:i,className:x,options:v});case"Users":return ye.getSelect("user"),r.jsx(Nt,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:n,name:a,placeholder:i,className:x,options:v});case"Date":return r.jsx(kt,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:n,name:a,placeholder:i,className:x});case"Phone":return r.jsx(It,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:n,name:a,placeholder:i,className:x});case"Number":return r.jsx(St,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:n,name:a,placeholder:i,className:x});case"Money":return r.jsx(jt,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:n,name:a,placeholder:i,className:x});case"Modal":return r.jsx(Ct,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:n,name:a||"",placeholder:i,className:x,options:v,module:h||""})}}function Zn({value:e,onValue:t,name:n,placeholder:a="",title:i="",error:o="",hide:s=!1,edit:c=!0,active:l=!0,after:_="",show:d=!0,view:p,maxLength:f,onSave:h,className:b=""}){let x=!!(s&&(e===""||e===void 0));if(!(c&&l)&&!d||!(c&&l)&&x)return"";let v=B=>{t&&t({value:B.target.innerText,name:n})},k=B=>{h&&h({value:B.target.innerText,name:n})},w=B=>{B.preventDefault(),navigator.clipboard.readText().then(N=>{if(f){let y=B.target.textContent.length;if(y>=f)return;f-=y,N=N.slice(0,f)}window.document.execCommand("insertText",!1,N)}).catch(N=>{})};const D={};D.field="text",b&&(D.className=b);const T={};return a&&(T.placeholder=a),r.jsxs("dl",{...D,children:[i&&r.jsx("dt",{children:i}),r.jsx("dd",{onPaste:w,onBlur:k,onInput:v,contentEditable:c&&l?G.ContentEditable:"false",...T,suppressContentEditableWarning:!0,children:e}),o&&r.jsx("em",{children:o})]})}function Un({value:e,onValue:t,name:n,placeholder:a="",title:i="",error:o="",hide:s=!1,edit:c=!0,active:l=!0,after:_="",show:d=!0,view:p,onSave:f,className:h=""}){let b=!!(s&&(e===""||e===void 0)),x=K.Date(e===void 0?new Date:e,"HH:MM"),v=m.useRef(null);if(!(c&&l)&&!d||!(c&&l)&&b)return"";let k=N=>{v.current.textContent=N,t&&t({value:N,name:n})},w=N=>{f&&f({value:N,name:n})},D=N=>{const y=N.target.getBoundingClientRect(),C=y.left,F=y.top;de.setListener("form",r.jsx(Wo,{positions:{x:C,y:F},onSave:w,onValue:k,date:x},new Date().getTime()))};const T={};T.field="input",h&&(T.className=h);const B={};return a&&(B.placeholder=a),r.jsx(r.Fragment,{children:p==="icon"?r.jsx("i",{"data-icon":"F043",onClick:D}):r.jsxs("dl",{...T,children:[i?r.jsx("dt",{children:i}):"",r.jsx("dd",{onClick:D,ref:v,...B,children:x}),o?r.jsx("em",{children:o}):""]})})}const Wo=({positions:e,onSave:t,onValue:n,date:a})=>{let i=a.split(":"),o={h:K.Number(2,i[0]),m:K.Number(2,i[1])},s="hour",[c,l]=m.useState({}),_=!1,d=0,p=0,f={body:m.useRef(null),time:m.useRef(null),hour:m.useRef(null),timeText:m.useRef(null),hourText:m.useRef(null)};m.useEffect(()=>{l(f.body.current.getBoundingClientRect()),f.hour.current.style.transform="rotate("+o.h*15+"deg)",f.time.current.style.transform="rotate("+o.m*6+"deg)"},[f.body,f.hour,f.time,o.m,o.h]);let h=()=>{_=!0},b=()=>{_=!1,s=s==="hour"?"time":"hour",f.body.current.setAttribute("active",s)},x=N=>{if(_){let C=Math.atan2(N.pageX-(c.x+78),N.pageY-(c.y+78))*(180/Math.PI)*-1+180;f[s].current.style.transform="rotate("+C+"deg)",s==="hour"?(o={...o,h:K.Number(2,parseInt(String(C/15),10))},f.hourText.current.textContent=o.h):(o={...o,m:K.Number(2,parseInt(String(C/6),10))},f.timeText.current.textContent=o.m),n(o.h+":"+o.m)}},v=N=>{if(s==="hour")if(N.deltaY>0){d+=N.deltaY;let y=parseInt(String(d/50));if(p!==y){p=y;let C=parseInt(o.h,10)+1;C=C>23?0:C,o={...o,h:K.Number(2,C)},f.hourText.current.textContent=o.h,f[s].current.style.transform="rotate("+o.h*15+"deg)"}}else{d-=N.deltaY;let y=parseInt(String(d/50));if(p!==y){p=y;let C=parseInt(o.h,10)-1;C=C<0?23:C,o={...o,h:K.Number(2,C)},f.hourText.current.textContent=o.h,f[s].current.style.transform="rotate("+o.h*15+"deg)"}}else if(N.deltaY>0){d+=N.deltaY;let y=parseInt(String(d/50));if(p!==y){p=y;let C=parseInt(o.m,10)+1;C=C>59?0:C,o={...o,m:K.Number(2,C)},f.timeText.current.textContent=o.m,f[s].current.style.transform="rotate("+o.m*6+"deg)"}}else{d-=N.deltaY;let y=parseInt(String(d/50));if(p!==y){p=y;let C=parseInt(o.m,10)-1;C=C<0?59:C,o={...o,m:K.Number(2,C)},f.timeText.current.textContent=o.m,f[s].current.style.transform="rotate("+o.m*6+"deg)"}}n(o.h+":"+o.m)},[k,w]=m.useState(!0),D=()=>{w(!1),t(o.h+":"+o.m)},T=window.innerHeight-e.y+33<320?e.y-312:e.y+33,B=window.innerWidth-e.x<265?e.x-235:e.x;return r.jsx(r.Fragment,{children:k?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:be.o,onClick:()=>D()},new Date().getTime()),r.jsxs("div",{className:be.c,onMouseDown:h,onMouseUp:b,onMouseMove:x,onWheel:v,ref:f.body,style:{top:T+"px",left:B+"px"},children:[r.jsx("div",{className:"b"}),r.jsxs("div",{className:"s",children:[r.jsx("span",{className:["hour",s==="hour"?be.as:be.ap].join(" "),ref:f.hourText,children:o.h})," ",":"," ",r.jsx("span",{className:["min",s==="time"?be.as:be.ap].join(" "),ref:f.timeText,children:o.m})]}),r.jsx("div",{className:"h",ref:f.hour}),r.jsx("div",{className:"t",ref:f.time})]})]}):""})};function Wn({onValue:e,label:t,value:n,title:a,className:i,name:o,text:s,id:c,reload:l}){const[_,d]=m.useState(!!n),p=t||a;m.useEffect(()=>{d(!!n)},[n]);let f=()=>{e&&e({value:_?0:1,name:o,id:c}),d(!_)};const h={};return h.field="check",i&&(h.className=i),r.jsxs("dl",{...h,children:[p?r.jsx("dt",{children:p}):"",r.jsxs("dd",{onClick:f,children:[r.jsx("span",{children:s}),r.jsx("div",{role:"switch","aria-checked":`${_?"true":"false"}`})]})]})}const Go=({label:e,onValue:t,value:n,name:a,item:i})=>{const[o,s]=m.useState(!!n);m.useEffect(()=>{s(!!n)},[n]);let c=()=>{let l=parseInt(o)===0?1:0;s(l),t({value:l,name:a,key:i,item:i})};return r.jsx("div",{role:"switch",onClick:c,"aria-checked":`${o?"true":"false"}`})},Gn=({onValue:e,value:t,name:n,item:a})=>{const[i,o]=m.useState(!!t);m.useEffect(()=>{o(!!t)},[t]);let s=()=>{let c=i?1:0;o(c),e({value:c,name:n,key:a,item:a})};return r.jsx("div",{role:"switch",onClick:s,"aria-checked":`${i?"true":"false"}`})};function Kn({value:e,onValue:t,name:n,placeholder:a="",title:i="",error:o="",hide:s=!1,edit:c=!0,active:l=!0,after:_="",show:d=!0,view:p,max:f=0,onSave:h,className:b="",separator:x=","}){const[v,k]=m.useState(e!==void 0?e.split(x):[]);m.useEffect(()=>{k(e!==void 0?e!==void 0?e.split(x):[]:[])},[e]);let w=()=>{if(f!==0&&v.length>=f)return g.Notice.Error("Слишком много");k([...v,""])},D=M=>{v.splice(M,1),v.length===0&&v.push(""),k([...v]),h!==void 0&&h({value:v.join(x),name:n})},T=!!(s&&(e===""||e===void 0)),B=M=>{};if(!(c&&l)&&!d||!(c&&l)&&T)return"";const N={};N.field="group",b&&(N.className=b);const y=(M,I)=>{G.Blur(M),v[I]=M.target.textContent,h&&h({value:v.join(x),name:n})};let C=(M,I)=>{v[I]=M.target.textContent,t&&t({value:v.join(x),name:n})},F=M=>{M.key==="Enter"&&M.preventDefault()};const E=({data:M})=>f!==0&&M.length>=f?"":r.jsx("i",{onClick:w,children:r.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:[r.jsx("path",{d:"M12 5.25v13.5"}),r.jsx("path",{d:"M18.75 12H5.25"})]})});return r.jsxs("dl",{...N,children:[r.jsxs("dt",{children:[i,r.jsx(E,{data:v})]}),r.jsx("dd",{children:v.map((M,I)=>r.jsxs("li",{className:"field_group_item",children:[r.jsx("span",{onInput:j=>C(j,I),edit:"true",name:n,placeholder:a,onPaste:B,contentEditable:c&&l?G.ContentEditable:"false",onKeyDown:F,onBlur:j=>y(j,I),suppressContentEditableWarning:!0,children:v[I]}),r.jsx("i",{onClick:()=>{D(I)},children:r.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:[r.jsx("path",{d:"M17.25 17.25 6.75 6.75"}),r.jsx("path",{d:"m17.25 6.75-10.5 10.5"})]})})]},I))}),o&&r.jsx("em",{children:o})]})}const Ko=e=>(e=e!==void 0&&e!==""?e.split(","):[],e.reduce((t,n)=>(t[n]=!0,t),{}));function Yn({value:e,onValue:t,name:n,placeholder:a="",title:i,error:o,hide:s=!1,edit:c=!0,show:l=!0,active:_=!0,outFormat:d="",after:p="",view:f,modal:h,module:b,options:x,className:v}){const[k,w]=m.useState(Ko(e)),D=N=>{if(!(c&&_)||!h)return;let y=h.split(".");g.Modal.Open(y[0],y[1],{callback:C=>{if(t)switch(d){case"array":t({value:Object.keys(C),name:n});break;case"string":t({value:Object.keys(C).join(","),name:n});break;default:t({value:C,name:n})}w(C)},onValue:t,options:x,name:n,value:k})},T={};T.field="group",v&&(T.className=v);const B={};return a&&(B.placeholder=a),s?r.jsx(r.Fragment,{}):r.jsxs("dl",{...T,children:[r.jsxs("dt",{children:[i,r.jsx("i",{onClick:D,children:r.jsx("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:r.jsx("path",{d:"M12 5.25v13.5M18.75 12H5.25"})})})]}),r.jsx("dd",{...B,onClick:D,edit:(c&&_)+"","data-after":p,children:Object.keys(k).map(N=>{var y;return r.jsx("div",{className:"field_group_item",children:(y=x[N])==null?void 0:y.label},N)})}),o&&r.jsx("em",{children:o})]})}function Hn({value:e,onValue:t,name:n,placeholder:a="",title:i="",link:o="",error:s="",hide:c=!1,edit:l=!0,active:_=!0,after:d="",show:p=!0,type:f,view:h,onSave:b,className:x=""}){const v=m.useId();let k=!!(c&&(e===""||e===void 0)),[w,D]=m.useState(o);if(!(l&&_)&&!p||!(l&&_)&&k)return"";const T=async N=>{if(f){let y=Ho(N,f,e||"default");t==null||t({name:n,value:y}),D(URL.createObjectURL(y))}else t==null||t({name:n,value:N}),D(URL.createObjectURL(N))},B={};return B.field="file",x&&(B.className=x),r.jsxs("dl",{...B,children:[i&&r.jsxs("dt",{children:[i," "]}),r.jsxs(Yo,{onFiles:T,children:[r.jsx("input",{id:v,type:"file",multiple:!0,onChange:N=>{N.target.files[0]&&T(N.target.files[0])}}),r.jsx("label",{htmlFor:v}),r.jsx("img",{src:w})]}),s&&r.jsx("em",{children:s})]})}const Yo=({children:e,onFiles:t})=>{const n=m.useRef(null);return m.useEffect(()=>{if(n.preventDefaults)return;n.preventDefaults=i=>{i.preventDefault(),i.stopPropagation()},n.highlight=i=>{},n.unhighlight=i=>{},n.onHandleDrop=i=>{let c=i.dataTransfer.files[0];t&&t(c)};let a=n.current;["dragenter","dragover","dragleave","drop"].forEach(i=>{a.addEventListener(i,n.preventDefaults,!1),document.body.addEventListener(i,n.preventDefaults,!1)}),["dragenter","dragover"].forEach(i=>{a.addEventListener(i,n.highlight,!1)}),["dragleave","drop"].forEach(i=>{a.addEventListener(i,n.unhighlight,!1)}),a.addEventListener("drop",n.onHandleDrop,!1)},[]),r.jsx("dd",{ref:n,children:e})},Ho=(e,t,n)=>{var a=document.getElementsByTagName("body")[0],i=document.createElement("canvas");a.appendChild(i);const o=i.getContext("2d"),s=new Image;s.addEventListener("load",()=>{o.drawImage(s,0,0,s.width,s.height);const c=t==="png"?i.toDataURL():i.toDataURL(`image/${t}`),l=qo(c,n);return i.remove(),l}),s.src=URL.createObjectURL(e)};function qo(e,t){let n=e.split(","),a=n[0].match(/:(.*?);/)[1],i=atob(n[1]),o=i.length,s=new Uint8Array(o);for(;o--;)s[o]=i.charCodeAt(o);return new File([s],t,{type:a})}function qn({name:e,value:t,title:n,style:a,className:i}){let o={field:"progress"};return a&&(o.style=a),i&&(o.className=i),r.jsxs("dl",{...o,children:[n&&r.jsx("dt",{children:n}),r.jsx("dd",{})]})}const ce={};function Jo(e){const[t,n]=m.useState({}),a=m.useRef(e);return ce.u=i=>{a.current={...a.current,[i.name]:i.value}},ce.n=i=>{a.current=i,n(Date.now())},ce.r=()=>{n(Date.now())},[a.current,ce.n]}function Xo(e){ce.u(e),e.reload&&ce.r()}function Vo(){ce.r&&ce.r()}function Qo(e){const[t,n]=m.useState({}),a=m.useRef(e);return ce.u=i=>{a.current={...a.current,[i.name]:i.value}},ce.n=i=>{Object.keys(i).length>0?Object.keys(i).forEach(o=>{a.current[o]=i[o]}):a.current={},n(Date.now())},ce.r=()=>{n(Date.now())},[a.current,ce.n]}const es={Color:An,Date:kt,Mask:Hn,Image:Hn,Code:Pn,Check:Wn,Switch:Tn,Input:Ue,Button:Bn,Message:Ln,Generator:Mn,Captcha:$n,Modal:Ct,Money:jt,Month:Fn,Notes:On,Number:St,Password:zn,Phone:It,Search:Rn,Select:Dt,Set:Tt,Textarea:Zn,Time:Un,Users:Nt,String:Ue,Form:Tt,runReload:Vo,useData:Jo,setValue:Xo,Palette:Go,Toogle:Gn,Group:Kn,Options:Yn,useError:Qo,Progress:qn};function ts({value:e="",onValue:t,onSave:n,name:a,format:i="+_(___) ___-__-__",placeholder:o="",title:s="",error:c="",hide:l=!1,edit:_=!0,active:d=!0,after:p="",show:f=!0,view:h,className:b=""}){_=_!==void 0?_:!0,d=d!==void 0?d:!0,l=!!(l&&(e===""||e===void 0))&&!(_&&d),m.useRef(null);let v=i,k=!0,w=0,D=(j,$)=>{let U=document.createRange(),V=window.getSelection();U.setStart($.childNodes[0],j),U.collapse(!0),V.removeAllRanges(),V.addRange(U),$.focus()},T=j=>{j.preventDefault(),navigator.clipboard.readText().then($=>{window.document.execCommand("insertText",!1,$)}).catch($=>{})},B=j=>{let $=0,U="",V=j.replace(/\D/g,"");V===""&&(k=!0);let se=V.split(""),we="";se.forEach(nt=>{k&&(we+=nt,k&&(w=(""+we).length,v=i.replace(new RegExp("[0-9]","g"),"_"),U=""),w>(""+we).length&&(k=!0,v=i.replace(new RegExp("[0-9]","g"),"_"),U=""))});let Le=v.replace(/\D/g,"");return Le.length>=V.length&&(V=Le),{q:v.replace(/[_\d]/g,function(){return V.charAt($++)||"_"}),i:$,v:V,f:U}},N=j=>{j.preventDefault(),navigator.clipboard.writeText(j.target.textContent.replace(/\D/g,"")).then(function(){g.Notice.Copy("Данные в буфер обмене")},function($){})},y=B(e),C=j=>{let $=B(j.target.textContent);j.target.textContent=$.q,$.i=$.q.lastIndexOf($.v.substr(-1)),$.i<$.q.length&&$.q!==v?$.i++:$.i=$.q.indexOf("_"),D($.i,j.target),t&&t({value:$.q.replace(/\D/g,""),name:a})},F=j=>{j.key==="Enter"&&j.preventDefault()};const E=j=>{G.Blur(j),n&&n({value:j.target.textContent.replace(/\D/g,""),name:a})},M={};M.field="input",b&&(M.className=b);let I={};return _&&d?(I.edit="true",I.contentEditable=G.ContentEditable):I.contentEditable="false",o&&(I.placeholder=o),p&&(I.after=p),l?r.jsx(r.Fragment,{}):r.jsxs("dl",{...M,children:[s&&r.jsx("dt",{children:s}),r.jsx("dd",{...I,onPaste:T,onInput:C,onKeyDown:F,onContextMenu:N,onBlur:E,suppressContentEditableWarning:!0,children:y.q}),c&&r.jsx("em",{children:c})]})}const ns={Color:An,Date:kt,Code:Pn,Check:Wn,Switch:Tn,Input:Ue,Button:Bn,Message:Ln,Generator:Mn,Captcha:$n,Modal:Ct,Money:jt,Mask:ts,Month:Fn,Notes:On,Number:St,Password:zn,Phone:It,Search:Rn,Select:Dt,Set:Tt,Textarea:Zn,Time:Un,Users:Nt,String:Ue,Toogle:Gn,Group:Kn,Options:Yn,Progress:qn},Jn={spinner:"_spinner_o487n_1",l:"_l_o487n_75",loadingB:"_loadingB_o487n_1"};function rs(){return r.jsx("div",{className:Jn.spinner,children:r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 483 484",children:r.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 as(){return r.jsxs("div",{className:Jn.l,children:[r.jsx("i",{}),r.jsx("i",{}),r.jsx("i",{})]})}const is={Spinner:rs,Inline:as},Xn={ph:"_ph_1wjxu_1",e:"_e_1wjxu_5"},os=({title:e,affter:t,onDynamicURL:n,children:a,button:i,page:o,tabs:s=[],className:c="",modules:l,loading:_})=>{const[d]=g.Router.useTabs(s.map(h=>h.id).includes(g.Router.getTabs())?g.Router.getTabs():o),[p,f]=m.useState(!1);return m.useEffect(()=>{f(!0)},[]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:[Xn.ph,c].join(" "),children:[r.jsx(ds,{title:e,affter:t}),r.jsx("div",{className:Xn.e}),r.jsx(ls,{button:i})]}),s.length>0&&r.jsx(vn,{list:s,active:d}),a,p&&r.jsx(ss,{onDynamicURL:n,loading:_,m:l,t:d})]})};let ss=({m:e,t,loading:n,onDynamicURL:a})=>{const i=m.lazy(()=>He(e+"/pages/"+t+".tsx"));return a&&a((e+"/"+t).toLowerCase()),r.jsx(m.Suspense,{fallback:n,children:r.jsx(i,{})})},ls=({button:e})=>{const[t,n]=m.useState(e);return xt("button",n),r.jsxs(r.Fragment,{children:[" ",t]})},ds=({title:e,affter:t})=>{const[n,a]=m.useState(r.jsxs(r.Fragment,{children:[e," ",t]}));return xt("title",a),r.jsx("h2",{children:n})};const cs={Lite:os},Vn={s:"_s_t9swc_1"};let Bt;function _s({className:e,placeholder:t}){let n=s=>{Bt(s.target.textContent)},a=s=>{s.key==="Enter"&&s.preventDefault()},i=s=>{s.preventDefault(),navigator.clipboard.readText().then(c=>{window.document.execCommand("insertText",!1,c)}).catch(c=>{})};const o={};return t&&(o.placeholder=t),o.className=e?[Vn.s,e].join(" "):Vn.s,r.jsx("div",{onPaste:i,onInput:n,onKeyDown:a,contentEditable:"plaintext-only",...o,suppressContentEditableWarning:!0})}function us(e,t,n){let a=[],i=1,o=0,s={},c=50;return s[i]=[],e.forEach(l=>{l.text.toLowerCase().indexOf(t)>-1&&a.push(l.id)}),a.forEach(l=>{o++,o<=c||(i++,o=1,s[i]=[]),s[i].push(n[l])}),s}function fs(e){Bt=e}function ms(e){Bt=e}const ps={Field:_s,Run:us,Get:fs,useValue:ms};function hs(){return r.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[r.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"}),r.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"}),r.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 gs(){return r.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[r.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"}),r.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"}),r.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 xs(){return r.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:r.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 bs={f:"_f_q3r0i_1"};let _e={};function vs(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 n={};return Object.keys(t.data).forEach(i=>{i!=="sort"&&(n[i]=t.data[i],e.take[i]="999")}),{...e,data:n,take:e.take};case"size":return{...e,size:t.size};case"take":let a={[t.list]:t.take};a={...e.take,...a},e.active=!1;for(let i in a)a[i]!=="999"&&(e.active=!0);return _e.get(a,e.active),{...e,take:a,active:e.active};case"exit":for(let i in e.take)e.take[i]="999";return _e.get&&_e.get([],!1),{...e,size:0,active:!1,take:e.take,open:!1};default:throw new Error}}function ys(){const[e,t]=m.useReducer(vs,{open:!1,view:null,data:{},take:{},size:0,active:!1});return _e.set=n=>{t({type:"data",data:n})},_e.count=n=>{t({type:"size",size:n})},_e.reset=()=>{t({type:"exit"})},r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:bs.f,onClick:()=>{t({type:"open",open:!0})},children:[r.jsx(xs,{}),e.active&&r.jsxs("i",{children:[e.size,"1"]})]}),e.open?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"filter o",onClick:()=>{t({type:"open",open:!1})}}),r.jsxs("div",{className:"filter m",children:[r.jsx("div",{className:"filter l",children:Object.keys(e.data).map(n=>r.jsx(Ss,{data:n,dispatch:t,state:e},n))}),r.jsx("div",{className:"filter b",onClick:()=>{t({type:"exit"})},children:"Убрать фильтер"})]})]}):r.jsx(r.Fragment,{})]})}function ws(e){_e.get=e}function ks(e){_e.set!==void 0&&_e.set(e)}function Cs(e){_e.reset!==void 0&&_e.reset(e)}function js(e,t,n,a){let i=[],o=1,s=0,c={},l=50;return c[o]=[],a===!0&&(Object.keys(t).forEach(_=>{Number.parseInt(t[_])!==999&&(e=e.filter(d=>Number.parseInt(d[_])===Number.parseInt(t[_])))}),Qn(e.length)),e.forEach(_=>{i.push(_.id)}),i.forEach(_=>{s++,s<=l||(o++,s=1,c[o]=[]),c[o].push(n[_])}),c}function Qn(e){_e.count(e)}function Ss({data:e,state:t,dispatch:n}){let a=()=>{n({type:"view",view:e})},i=()=>{n({type:"take",list:e,take:"999"})};return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"filter s",children:[r.jsxs("div",{onClick:a,children:[" ",t.data[e].name," "]}),t.take[e]!=="999"?r.jsx("div",{onClick:i,className:"filter x","data-icon":"F038"}):""]}),r.jsx("div",{className:"filter u","set-active":(t.view===e)+"",children:Object.keys(t.data[e].list).map((o,s)=>r.jsx(Es,{data:t.data[e].list[o],head:e,type:o,dispatch:n,state:t},s))})]})}function Es({data:e,head:t,state:n,dispatch:a,type:i}){if(i!=="999"&&e.count===void 0)return"";const o=()=>{a({type:"take",list:t,take:i})};return r.jsxs("div",{className:"filter a",onClick:o,"set-active":(n.take[t]===i)+"",children:[e.name,r.jsx("div",{className:"filter e",children:e.count})]})}const Is={Button:ys,useValue:ws,Set:ks,Run:js,Count:Qn,Reset:Cs},Ds={n:"_n_euuvm_1"};let tt={},Lt=[];const Ns=(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 n=e.news.filter(i=>i.id!==t.id);return{...e,news:n,active:n.length!==0};case"size":return{...e,size:t.size};case"take":let a={[t.list]:t.take};a={...e.take,...a},e.active=!1;for(let i in a)a[i]!=="999"&&(e.active=!0);return tt.get(a,e.active),{...e,take:a,active:e.active};case"exit":return e;default:throw new Error}};function Ts(e){tt.fn({action:"add",data:e})}function Bs(e){tt.fn({action:"add",data:e})}function Ls(e){tt.fn=e}function Ms(){const[e,t]=m.useReducer(Ns,{open:!1,active:!1,news:[],take:{}});Ls(async a=>{switch(a.action){case"add":Lt.push(a.data);break}}),m.useEffect(()=>{setInterval(()=>{Lt.forEach((a,i)=>{t({type:"add",data:{module:a.module,type:a.type,id:a.id,datetime:a.datetime,txt:a.title}}),a.datetime<new Date().getTime()&&Lt.splice(i,1)})},6e4)},[]);let n=async a=>{t({type:"hide",id:a.id})};return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Ds.n,onClick:()=>{t({type:"open",open:!0})},children:e.active?r.jsx(gs,{}):r.jsx(hs,{})}),e.open?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"notify-o",onClick:()=>{t({type:"open",open:!1})}}),r.jsxs("div",{className:"notify-m",children:[r.jsx("div",{className:"notify-l",children:e.news.map((a,i)=>r.jsx($s,{data:a,dispatch:t},i))}),r.jsx("div",{className:"notify-b",onClick:n,children:"История"})]})]}):""]})}const $s=({data:e,dispatch:t})=>{let n=async a=>{t({type:"hide",id:a.id})};return r.jsxs("div",{className:"notify-i",children:[r.jsx("div",{className:"--icon","data-icon":e.type}),r.jsxs("div",{className:"--body",children:[r.jsx("div",{className:"--name",children:e.type}),r.jsx("div",{className:"--text",children:e.txt})]}),r.jsx("div",{className:"--hide","data-icon":"F038",onClick:()=>n(e),children:" "})]})},Ps={Bell:Ms,Send:Bs,Add:Ts},er={p:"_p_djnh1_1",l:"_l_djnh1_38"};function As(e){let t=3,n=e.page,a=e.count,i=[],o=()=>{i.push({page:1}),i.push({text:"..."})},s=()=>{i.push({text:"..."}),i.push({page:a})},c=(l,_)=>{for(let d=l;d<_;d++)i.push({page:d})};return a<t*2+6?c(1,a+1):n<t*2+1?(c(1,t*2+4),s()):n>a-t*2?(t=a>1e4?1:t,o(),c(a-t*2-2,a+1)):(t=a>1e4?1:t,o(),c(n-t,n+t+1),s()),i.length===1?r.jsx(r.Fragment,{}):r.jsxs("div",{className:er.p,children:[r.jsx("i",{onClick:()=>e.onChangePage(n-1),children:r.jsx("svg",{viewBox:"0 0 24 24",children:r.jsx("path",{d:"M8.19486 5.40705C8.52237 4.96235 9.14837 4.86736 9.59306 5.19488C9.93847 5.44927 10.2668 5.70372 10.5528 5.92689C11.1236 6.3724 11.8882 6.98573 12.6556 7.65208C13.4181 8.31412 14.2064 9.04815 14.8119 9.73344C15.1136 10.0749 15.3911 10.4279 15.5986 10.7721C15.7895 11.0888 16 11.524 16 12.0001C16 12.4762 15.7895 12.9115 15.5986 13.2282C15.3911 13.5724 15.1136 13.9253 14.8119 14.2668C14.2064 14.9521 13.4181 15.6861 12.6556 16.3482C11.8882 17.0145 11.1236 17.6278 10.5528 18.0734C10.2668 18.2965 9.93847 18.551 9.59307 18.8054C9.14837 19.1329 8.52237 19.0379 8.19486 18.5932C8.0632 18.4144 7.99983 18.2064 8.00001 18.0002L8 12.0001L8 6.00007C7.99983 5.79387 8.0632 5.58581 8.19486 5.40705Z"})})}),i.map((l,_)=>{const d={};return l.page&&(d.onClick=()=>e.onChangePage(l.page)),l.page===e.page&&(d.active=""),m.createElement("span",{...d,key:_},l.page||l.text)}),r.jsx("i",{onClick:()=>e.onChangePage(n+1),children:r.jsx("svg",{viewBox:"0 0 24 24",children:r.jsx("path",{d:"M8.19486 5.40705C8.52237 4.96235 9.14837 4.86736 9.59306 5.19488C9.93847 5.44927 10.2668 5.70372 10.5528 5.92689C11.1236 6.3724 11.8882 6.98573 12.6556 7.65208C13.4181 8.31412 14.2064 9.04815 14.8119 9.73344C15.1136 10.0749 15.3911 10.4279 15.5986 10.7721C15.7895 11.0888 16 11.524 16 12.0001C16 12.4762 15.7895 12.9115 15.5986 13.2282C15.3911 13.5724 15.1136 13.9253 14.8119 14.2668C14.2064 14.9521 13.4181 15.6861 12.6556 16.3482C11.8882 17.0145 11.1236 17.6278 10.5528 18.0734C10.2668 18.2965 9.93847 18.551 9.59307 18.8054C9.14837 19.1329 8.52237 19.0379 8.19486 18.5932C8.0632 18.4144 7.99983 18.2064 8.00001 18.0002L8 12.0001L8 6.00007C7.99983 5.79387 8.0632 5.58581 8.19486 5.40705Z"})})})]})}function Fs(e,t){switch(t.type){case"load":return{...e,load:t.load,wait:!1,data:t.data,list:t.data[e.page],size:Object.keys(t.data).length};case"page":return{...e,page:t.page,list:e.data[t.page]};default:throw new Error}}function tr({load:e,list:t,item:n}){const a=m.useRef(null),[i,o]=m.useReducer(Fs,{load:!1,list:[],data:{},page:1,wait:!1,item:n});m.useEffect(()=>{t!==null&&o({type:"load",load:e,data:t})},[e]);let s=c=>{if(c===0)return c=1;if(c>i.size)return c=i.size;o({type:"page",page:c})};return m.useEffect(()=>{},[i]),r.jsxs(r.Fragment,{children:[r.jsx("div",{className:er.l,ref:a,children:r.jsx(Dn,{"el-empty":"Данные не найдены",children:i.load&&i.list!==void 0?i.list.map(c=>r.jsx(i.item,{data:c},c.id)):r.jsxs("div",{"type-data":"load",children:[r.jsx("i",{}),r.jsx("i",{}),r.jsx("i",{})]})})}),i.load&&i.list!==void 0?r.jsx(As,{page:i.page,count:i.size,onChangePage:s}):r.jsx(r.Fragment,{})]})}const Os={Pagination:tr};function zs({head:e,load:t,list:n,item:a}){const i=e;return r.jsxs(r.Fragment,{children:[r.jsx(i,{}),In.getSetting("s05")===1?r.jsx(tr,{list:n,load:t,item:a}):r.jsx(Nn,{list:n,load:t,item:a})]})}function Rs(e,t){switch(t.type){case"load":return{...e,time:Date.now(),load:t.load,list:t.list,temp:t.temp};case"filter":return{...e,list:t.list,filter:t.active,band:t.band,time:Date.now()};case"search":return{...e,time:Date.now(),list:t.list};case"triage":return{...e,time:Date.now(),list:t.list,sort:t.sort};case"noload":return{...e,load:!0,time:Date.now()};default:throw new Error}}const Mt={};function Zs(e){Mt.get=e}function Us(e){Mt.get&&Mt.get(e)}const Ws={View:zs,Reducer:Rs,useValue:Zs,Lite:Sn,setValue:Us},Gs={addDictionary:Ti,getDictionary:Mi,setDictionary:Li,current:$i};async function Ks(){let e=await dn(),t={};return Object.keys(e).forEach(n=>{t[e[n].id]={},t[e[n].id].name=e[n].a}),t}const Ys={Get:Ks},Hs=function({title:e,children:t,imp:n,button:a,page:i,tabs:o,modules:s}){const[c]=g.Router.useTabs(i),[l,_]=m.useState(!1);return m.useEffect(()=>{_(!0)},[]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"list-info",children:[r.jsx("h2",{children:e}),r.jsx("div",{className:"empty"}),r.jsx(Js,{button:a})]}),l&&r.jsx(qs,{imp:n,modules:s,t:c}),t]})};let qs=({modules:e,t})=>{const n=m.lazy(()=>He(e+"/pages/"+t+".tsx"));return r.jsx(m.Suspense,{fallback:"",children:r.jsx(n,{})})},Js=({button:e})=>{const[t,n]=m.useState(e);return de.useListener("button",n),r.jsxs(r.Fragment,{children:[" ",t]})};const Xs={Open:Si};function Vs({active:e,onActive:t,id:n,name:a}){const[i,o]=m.useState(!!e);m.useEffect(()=>{o(!!e)},[e]);let s=()=>{let c=i?0:1;o(!i),t&&t({value:c,is:!i,name:a,id:n,setActive:o})};return r.jsx("div",{role:"switch",onClick:s,"aria-checked":`${i?"true":"false"}`})}g.Action=yn,g.Animation=ci,g.Badge=No,g.Bookmarks=so,g.Browser=Gi,g.Button=xn,g.Chart=oo,g.Company=Ys,g.Component=_t,g.DataBase=Lo,g.Event=de,g.Events=de,g.Files=Fo,g.Filter=Is,g.Form=es,g.Format=K,g.HotKey=$o,g.Icon=po,g.Init=gn,g.Input=ns,g.Lang=Gs,g.Layout=cs,g.List=Ws,g.Lite=bo,g.Loading=is,g.Notifications=Ps,g.Pagination=Os,g.Phone=Xs,g.Root=jn,g.Scrolling=Nn,g.Search=ps,g.Setting=ao,g.Sistym=Mo,g.Store=ye,g.Switch=Vs,g.Tabs=Ji,g.Test=Hs,g.Triage=Eo,g.User=In,g.WebRTC=q,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
31
+ <%s key={someKey} {...props} />`,Ut,Ne,Cl,Ne),hr[Ne+Ut]=!0}}return u===a?bl(X):xl(X),X}}function vl(u,S,L){return gr(u,S,L,!0)}function yl(u,S,L){return gr(u,S,L,!1)}var wl=yl,kl=vl;Ae.Fragment=a,Ae.jsx=wl,Ae.jsxs=kl}()),Ae}process.env.NODE_ENV==="production"?lt.exports=$r():lt.exports=Pr();var r=lt.exports;let pe={};function Fe({data:e}){let[t,n]=m.useState("show");m.useEffect(()=>{e.hide&&(setTimeout(function(){n("hide")},1800),setTimeout(function(){pe.del(e.key)},2500))},[e.key]);let a,i;switch(e.type){case"error":a=r.jsx(Ee.error,{}),i="Ошибка:";break;case"success":a=r.jsx(Ee.success,{}),i="Информация:";break;case"copy":a=r.jsx(Ee.success,{}),i="Копирование:";break;case"remark":a=r.jsx(Ee.success,{}),i="Подсказка:";break;default:a=r.jsx(Ee.success,{}),i="Предупреждение:";break}return r.jsxs("li",{className:"item "+e.type,"data-status":t,children:[a,r.jsx("b",{children:i}),r.jsx("p",{children:e.text})]})}function Ar({data:e}){let[t,n]=m.useState("show");return m.useEffect(()=>{e.hide&&(setTimeout(function(){n("hide")},1800),setTimeout(function(){pe.del(e.key)},2500))},[e.key]),r.jsx("li",{className:"item","data-status":t,children:e.text})}const Ee={};Ee.error=()=>r.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[r.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:"#bb2014"}),r.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:"#fff"})]}),Ee.success=()=>r.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[r.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:"#367738"}),r.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:"#fff"})]}),g.Notice=void 0,(e=>{function t(){let[l,_]=m.useState([]);return pe.set=d=>{_([...l,d])},pe.del=d=>{_(l.filter(p=>p.key!==d))},l.length===0?"":r.jsx("ul",{id:"notice",children:l.map(d=>d.item)})}e.Init=t;function n(l,_=!0){let d=Date.now(),p={key:d,text:l,hide:_,type:"error"};pe.set({item:r.jsx(Fe,{data:p},d),key:d})}e.Error=n;function a(l,_=!0){let d=Date.now(),p={key:d,text:l,hide:_,type:"success"};pe.set({item:r.jsx(Fe,{data:p},d),key:d})}e.Success=a;function i(l,_=!0){let d=Date.now(),p={key:d,hide:_,text:l};pe.set({item:r.jsx(Ar,{data:p},d),key:d})}e.Custom=i;function o(l){let _=Date.now(),d={key:_,hide:!0,...l};pe.set({item:r.jsx(Fe,{data:d},_),key:_})}e.Send=o;function s(l,_=!0){let d=Date.now(),p={key:d,text:l,hide:_,type:"remark"};pe.set({item:r.jsx(Fe,{data:p},d),key:d})}e.Remark=s;function c(l,_=!0){let d=Date.now(),p={key:d,text:l,hide:_,type:"copy"};pe.set({item:r.jsx(Fe,{data:p},d),key:d})}e.Copy=c})(g.Notice||(g.Notice={}));const dt={alerts:"_alerts_ita6j_1",menuAnimation:"_menuAnimation_ita6j_1",menuItemAnimation:"_menuItemAnimation_ita6j_1","--body":"_--body_ita6j_103",allert:"_allert_ita6j_111","--form":"_--form_ita6j_111",al:"_al_ita6j_1"};let Oe={};const Fr=({data:e,callback:t,cancel:n})=>(e.button=e.button===void 0?"Подтвердить":e.button,r.jsxs("div",{className:dt.alerts,children:[r.jsxs("dl",{children:[r.jsx("dt",{children:e.title}),r.jsx("dd",{children:e.text}),r.jsx("ul",{children:r.jsx("button",{color:e.color||"blue",onClick:()=>{t(),Oe.del()},children:e.button})})]}),r.jsx("div",{className:dt["--body"],onClick:()=>{n==null||n(),Oe.del()}})]}));g.Alert=void 0,(e=>{function t(){let[i,o]=m.useState("");return Oe.set=s=>o(s),Oe.del=()=>o(""),r.jsx(r.Fragment,{children:i})}e.Init=t;function n(i,o,s){Oe.set(r.jsx(Fr,{data:i,callback:o,cancel:s}))}e.Send=n;function a({text:i,type:o,button:s}){let[c,l]=m.useState(!1),_={active:o};const d=()=>{if(s){if(s.onClick)return s.onClick({});if(s.onSend)return c?void 0:(l(!0),s.onSend(l))}};return r.jsxs("div",{className:dt.al,..._,children:[r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",fillRule:"evenodd",clipRule:"evenodd",children:r.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"})}),r.jsx("span",{children:i}),s&&r.jsx("button",{onClick:d,children:s.label})]})}e.Line=a})(g.Alert||(g.Alert={}));function Or({children:e}){return r.jsx("div",{className:"l",children:r.jsx("ul",{children:e})})}const te={white:"_white_1g9i9_14",black:"_black_1g9i9_28",shake:"_shake_1g9i9_1",modal:"_modal_1g9i9_77",o:"_o_1g9i9_87",w:"_w_1g9i9_14",h:"_h_1g9i9_112",l:"_l_1g9i9_126",t:"_t_1g9i9_164",m:"_m_1g9i9_77",x:"_x_1g9i9_172",s:"_s_1g9i9_182",c:"_c_1g9i9_187",f:"_f_1g9i9_192",row:"_row_1g9i9_214",col:"_col_1g9i9_226",g:"_g_1g9i9_235","size-a":"_size-a_1g9i9_285","size-s":"_size-s_1g9i9_290","size-m":"_size-m_1g9i9_294","size-l":"_size-l_1g9i9_298","size-x":"_size-x_1g9i9_302","size-f":"_size-f_1g9i9_306",active:"_active_1g9i9_355",coincidence:"_coincidence_1g9i9_361",sa:"_sa_1g9i9_397",ss:"_ss_1g9i9_401",sm:"_sm_1g9i9_405",sl:"_sl_1g9i9_409",sx:"_sx_1g9i9_413",sf:"_sf_1g9i9_417",btn:"_btn_1g9i9_423"};function zr({children:e}){return r.jsx("div",{className:te.s,children:e})}function Rr({children:e,viev:t="row",className:n}){let a={};return n&&(a.className=n),r.jsx("ul",{className:[te.f,te[t],a.className].join(" "),children:e})}function Zr({children:e}){return r.jsx("div",{className:te.c,children:e})}function Ur({children:e}){return r.jsx("div",{className:te.g,children:e})}const oe={};function Wr(e){return e&&(oe.s=e),oe.s}function Gr(e){return e&&(oe.a=e),oe.a}function Kr(e){return e&&(oe.c=e),oe.c}function Yr(e){return e&&(oe.h=e),oe.h}function Hr(e){return e&&(oe.i=e),oe.i}function qr(e){return e&&(oe.d=e),oe.d}function He(e){return oe.i(e)}let qe={};function Jr({children:e}){return r.jsx(r.Fragment,{children:e})}g.Modal=void 0,(e=>{function t(){let[l,_]=m.useState([]);return qe.x=d=>{_(d?l.filter(p=>p.key!==d):[])},qe.add=(d,p=Date.now())=>{_([...l,{key:p,item:d}])},r.jsx(r.Fragment,{children:l.map(d=>d.item)})}e.Init=t,e.List=Or,e.Scroll=zr,e.Form=Rr,e.Center=Zr,e.Column=Ur;function n(l,_,d){He(`${l}/modal/${_}.tsx`).then(p=>{p.default.Open(d)})}e.Open=n;function a({type:l,name:_,params:d}){let[p,f]=m.useState(null);return m.useEffect(()=>{He(`${l}/modal/${_}.tsx`).then(h=>{f(h.default.Icon(d))})},[d.id]),r.jsx(r.Fragment,{children:p})}e.Icon=a;function i(l,_){qe.add(r.jsx(Jr,{children:l},String(Date.now())),_)}e.Add=i;function o(l){qe.x(l)}e.Close=o;function s(l){if(l.target.classList[0]!=="modal")return;let _=l.target.children[0];_.setAttribute("shake",!0),setTimeout(()=>{_.setAttribute("shake",!1)},1e3)}e.Shake=s;function c({title:l,children:_,button:d,tabs:p,size:f="m",className:h="",shake:b=!0,menu:x}){const[v,k]=m.useState(!0),w=m.useRef(),D=B=>{if(d){if(d.onClick)return B(!1),d.onClick({setOpen:k});if(d.onSend)return d.onSend({setOpen:k,disabled:B})}},T=()=>{if(!b)return k(!1);w.current.setAttribute("shake",!0),setTimeout(()=>{w.current.setAttribute("shake",!1)},1e3)};return v?r.jsxs("div",{className:`${te.modal}`,children:[r.jsx("div",{className:te.o,onClick:T}),r.jsxs("div",{className:[te.w,te[`s${f}`],h].join(" "),ref:w,children:[r.jsxs("div",{className:te.h,children:[r.jsx("div",{className:te.t,children:l}),r.jsxs("div",{className:te.m,children:[p&&r.jsx("nav",{children:p.map((B,N)=>r.jsx("span",{onClick:B.onClick,className:B.active?"active":"",children:B.name},N))}),x]}),r.jsx("div",{className:te.x,onClick:()=>{k(!1)},children:r.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:r.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"})})})]}),_,d!==void 0?r.jsx(xn,{label:d.label,onSend:D,className:te.btn}):""]})]}):""}e.Main=c})(g.Modal||(g.Modal={}));let ze={};const Xr=({content:e,position:t,orientation:n="up",update:a,textAlign:i})=>{const o=m.useRef(null);return m.useEffect(()=>{const s=o.current;s.style.opacity="0",s.style.width="auto",s.style.left="0px",s.style.top="0px";let c={x:0,y:0};const l=s.getBoundingClientRect();let _=t.width/2;s.style.width=l.width+"px";let d=0;switch(n){case"up":d=t.left+_-l.width/2-10,d=window.innerWidth<d+l.width?window.innerWidth-l.width-20:d,d=d<0?0:d,s.style.left=d+"px",s.style.top=t.top-l.height-10+"px",c.x=t.left+_,c.y=t.top-10;break;case"down":d=t.left+_-l.width/2,d=d<0?0:d,s.style.left=d+"px",s.style.top=t.bottom+10+"px";break;case"left":s.style.top=t.top+"px",s.style.left=t.left-l.width-t.width+"px";break;case"right":s.style.top=t.top+"px",s.style.left=t.right+"px";break}s.style.setProperty("--tooltip-arrow-x",c.x+"px"),s.style.setProperty("--tooltip-arrow-y",c.y+"px"),s.style.transition="opacity 0.3s",s.style.textAlign=i,s.style.opacity="1"},[a]),r.jsx("div",{ref:o,className:"tooltip",children:e})};g.Tooltip=void 0,(e=>{e.Init=()=>{let[t,n]=m.useState("");return ze.set=a=>n(a),ze.del=()=>n(""),r.jsx(r.Fragment,{children:t})},e.Text=({content:t,children:n,className:a,textAlign:i="center",orientation:o="down",dev:s,...c})=>{const l=d=>{c.element?ze.set(r.jsx(c.element,{content:t,position:d.currentTarget.getBoundingClientRect(),textAlign:i,update:Date.now()})):ze.set(r.jsx(Xr,{update:Date.now(),orientation:o,content:t,textAlign:i,position:d.currentTarget.getBoundingClientRect()}))},_=()=>{s||ze.del()};return r.jsx("span",{className:a,onMouseOver:l,onMouseOut:_,children:n})}})(g.Tooltip||(g.Tooltip={}));const Ie={key:"Y0zt37HgOx-BY7SQjYVmrqhPkO41Ii2Jcb9yydUDPf6",iterations:7,saltLength:16},Je=e=>{let t=0;for(let a=0;a<e.length;a++){const i=e.charCodeAt(a);t=(t<<5)-t+i,t=t&t}t=Math.abs(t);let n="";for(let a=0;a<64;a++){const i=(t^a*197)&255;n+=i.toString(16).padStart(2,"0")}return n},rn=(e,t)=>{let n=e+t;for(let i=0;i<Ie.iterations;i++)n=Je(n);const a=new Uint8Array(32);for(let i=0;i<32;i++)a[i]=parseInt(n.substring(i*2,i*2+2),16);return a},an=(e,t)=>{const n=new Uint8Array(e.length),a=new Uint8Array(e.length);let i=0;for(let o=0;o<e.length;o++){const s=o%t.length;i=t[s]+o+i&255,a[o]=i}for(let o=0;o<e.length;o++)n[o]=e[o]^a[o];return n},Vr=e=>new TextEncoder().encode(e),Qr=e=>new TextDecoder().decode(e),ea=e=>{let t="";for(let a=0;a<e.length;a+=8192){const i=e.slice(a,Math.min(a+8192,e.length));t+=String.fromCharCode.apply(null,Array.from(i))}return btoa(t)},ta=e=>{const t=atob(e),n=new Uint8Array(t.length);for(let a=0;a<t.length;a++)n[a]=t.charCodeAt(a);return n},na=e=>{try{const t=Je(Date.now().toString()+Math.random()).substring(0,Ie.saltLength*2),n=Je(e+t).substring(0,8),a=rn(Ie.key,t),i=Vr(e),o=an(i,a),s=ea(o);return`${t}.${s}.${n}`}catch{throw new Error("Не удалось зашифровать данные")}},ra=e=>{try{const t=e.split(".");if(t.length!==3)throw new Error("Неверный формат зашифрованных данных");const n=t[0],a=t[1],i=t[2],o=rn(Ie.key,n),s=ta(a),c=an(s,o),l=Qr(c);if(Je(l+n).substring(0,8)!==i)throw new Error("Контрольная сумма не совпадает");return l}catch{return""}};g.Crypto=void 0,(e=>{e.setKey=t=>{Ie.key=t},e.enCode=t=>{try{const n=JSON.stringify(t);return na(n)}catch{throw new Error("Не удалось зашифровать объект")}},e.deCode=t=>{try{if(!t||t.length<10)return!1;const n=ra(t);return n&&JSON.parse(n)||!1}catch{return!1}},e.setSecurityParams=(t,n)=>{Ie.iterations=t,Ie.saltLength=n}})(g.Crypto||(g.Crypto={}));const z={},A={},he={module:"",page:"Auth",main:"Main"};g.Router=void 0,(e=>{async function t(){let y=sessionStorage.getItem("f");if(y){if(y=await g.Crypto.deCode(y),!y)return!1;A.id=y.id,A.tab=y.tab,A.page=y.page,A.module=y.module,A.time=y.time,A.payment={active:!0},A.module_admin=y.module_admin}else A.id=0,A.tab="",A.page=he.main,A.module=he.module;return!0}e.Load=t;function n(){A.id=0,A.tab="",A.page=he.page,A.module=he.module}e.Reset=n;function a({module:y=he.module,page:C=he.page,main:F=he.main}){he.page=C,he.module=y,he.main=F}e.Default=a;function i(){const[y,C]=m.useState(s()),F=E=>{C(E)};return z.page=F,[y]}e.usePage=i;async function o(y,C=!0){A.page=y,sessionStorage.setItem("f",await g.Crypto.enCode(A)),z.dynamicURL&&z.dynamicURL(A),C&&z.page(y)}e.setPage=o;function s(){return A.page}e.getPage=s;function c(y){return A.page===y}e.isPage=c;function l(y,C){if(typeof y!="function"){const[F,E]=m.useState(!C),[M,I]=m.useState(y||d());return z.module=I,C&&m.useEffect(()=>{E(!0)},[]),[M,F]}else z.module=y}e.useModule=l;async function _(y,C=!0){A.module=y,sessionStorage.setItem("f",await g.Crypto.enCode(A)),z.dynamicURL&&z.dynamicURL(A),C&&z.module(y)}e.setModule=_;function d(){return A.module}e.getModule=d;function p(y){return A.module===y}e.isModule=p;function f(y,C){if(typeof y!="function"){const[F,E]=m.useState(y||b()),[M,I]=m.useState(!C);return C&&m.useEffect(()=>{I(!0)},[]),z.tabs=E,[F,M]}else z.tabs=y}e.useTabs=f;async function h(y,C=!0){if(A.tab=y,sessionStorage.setItem("f",await g.Crypto.enCode(A)),z.dynamicURL&&z.dynamicURL(A),!!C)if(z.tabs)z.tabs(y);else throw new Error("useTabs not found")}e.setTabs=h;function b(){return A.tab}e.getTabs=b;function x(y){return A.tab===y}e.isTabs=x;function v(y){if(typeof y!="function"){const[C,F]=m.useState(y||D()),E=M=>{F(M)};return z.id=E,[C]}else z.id=y}e.useId=v;function k(y){z.id=y}e.subId=k;async function w(y,C=!0){A.id=y,sessionStorage.setItem("f",await g.Crypto.enCode(A)),z.dynamicURL&&z.dynamicURL(A),C&&z.id(y)}e.setId=w;function D(){return A.id}e.getId=D;function T(y){return Number(A.id)===y}e.isId=T;async function B(y,C,F){A.module=y,A.id=F,A.tab=C,sessionStorage.setItem("f",await g.Crypto.enCode(A)),z.dynamicURL&&z.dynamicURL(A),z.module(y),z.tabs(C)}e.Path=B;async function N(y,C,F,E){var M,I,j;if(A.page===y)if(A.module===C){if(A.tab=F||"",A.id=E||0,A.tab==="")return;(M=z.tabs)==null||M.call(z,F)}else A.module=C,A.tab=F||"",A.id=E||0,(I=z.module)==null||I.call(z,C);else A.module=C,A.tab=F||"",A.id=E||0,A.page=y,(j=z.page)==null||j.call(z,y);sessionStorage.setItem("f",await g.Crypto.enCode(A)),z.dynamicURL&&z.dynamicURL(A)}e.Push=N})(g.Router||(g.Router={}));function aa(e,t){t===void 0?(t=e,e=new Date):e=new Date(e);let n={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 a in n)t=t.replace(a,n[a]);return t}function ia(e){let t=["Января","Февраля","Марта","Апреля","Мая","Июня","Июля","Августа","Сентября","Октября","Ноября","Декабря"],n=new Date(e);return{day:(""+n.getFullYear()).slice(-2)+""+("0"+(n.getMonth()+1)).slice(-2)+("0"+n.getDate()).slice(-2),name:n.getDate()+" "+t[n.getMonth()]}}const oa=e=>{function t(D,T){var B,y,N;D=D??"",T=T??1;for(var B=[],N=0,y=D.length;N<y;)B.push(D.slice(N,N+=T));return B}function n(D,T){var B=[2,0,1,1,1,2];return T[D>4&&D<20?2:B[Math.min(D,5)]]}var a={null:"ноль",a1:["один","два","три","четыре","пять","шесть","семь","восемь","девять"],a2:["одна","две","три","четыре","пять","шесть","семь","восемь","девять"],a10:["десять","одиннадцать","двенадцать","тринадцать","четырнадцать","пятнадцать","шестнадцать","семнадцать","восемнадцать","девятнадцать"],a20:["двадцать","тридцать","сорок","пятьдесят","шестьдесят","семьдесят","восемьдесят","девяносто"],a100:["сто","двести","триста","четыреста","пятьсот","шестьсот","семьсот","восемьсот","девятьсот"],uc:["копейка","копейки","копеек"],ur:["рубль","рубля","рублей"],u3:["тысяча","тысячи","тысяч"],u2:["миллион","миллиона","миллионов"],u1:["миллиард","миллиарда","миллиардов"]},i,o,s,c,v,l,_,x,d,p,f,h;d=parseFloat(e).toFixed(2).split("."),l=d[0],c=d[1];var b=12-l.length;if(b<0)return!1;for(var x=[];b--;)x.push("0");l=x.join("")+l;var v=[];if(l>0){p=t(l,3);for(var k=-1;k<p.length;k++)if(_=p[k],_>0&&(f=t(_,1),i=parseInt(f[0]),o=parseInt(f[1]),s=parseInt(f[2]),v.push(a.a100[i-1]),h=k+1==3?"a2":"a1",o>1?v.push(a.a20[o-2]+(s>0?" "+a[h][s-1]:"")):v.push(o>0?a.a10[s]:a[h][s-1]),p.length>k+1)){var w=a["u"+(k+1)];v.push(n(_,w))}}else v.push(a.null);return v.push(n(l,a.ur)),v.push(c+" "+n(c,a.uc)),v.join(" ").replace(RegExp(" {2,}","g")," ").trimLeft()};function sa(e){let t=-1,n=[" kB"," MB"," GB"," TB","PB","EB","ZB","YB"];do e=e/1024,t++;while(e>1024);return Math.max(e,.1).toFixed(1)+n[t]}function la(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 da(e,t,n,a){let i={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 s in this.rules)for(var c in this.rules[s])for(var l=0,_=this.rules[s][c].length;l<_;l++)this.rules[s][c][l]=this.rule(this.rules[s][c][l])},rule:function(s){var c=s.match(/^\s*([fm]?)\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s*$/);return c?{sex:c[1],test:c[2].split(","),mods:[c[3],c[4],c[5],c[6],c[7]]}:!1},word:function(s,c,l,_){if(_===this.gcaseNom)return s;if(s.match(/[-]/)){for(var d=s.split("-"),p=0,f=d.length;p<f;p++)d[p]=this.word(d[p],c,l,_);return d.join("-")}if(s.match(/^[А-ЯЁ]\.?$/i))return s;this.init();var h=this.rules[l];let b;return h.exceptions&&(b=this.pick(s,c,_,h.exceptions,!0),b)?b:(b=this.pick(s,c,_,h.suffixes,!1),b||s)},pick:function(s,c,l,_,d){let p=s.toLowerCase();for(var f=0,h=_.length;f<h;f++)if(this.ruleMatch(p,c,_[f],d))return this.applyMod(s,l,_[f]);return!1},ruleMatch:function(s,c,l,_){if(l.sex===this.sexM&&c===this.sexF||l.sex===this.sexF&&c!==this.sexF)return!1;for(var d=0,p=l.test.length;d<p;d++){var f=_?s:s.substr(Math.max(s.length-l.test[d].length,0));if(f===l.test[d])return!0}return!1},applyMod:function(s,c,l){let _;switch(c){case this.gcaseNom:_=".";break;case this.gcaseGen:_=l.mods[0];break;case this.gcaseDat:_=l.mods[1];break;case this.gcaseAcc:_=l.mods[2];break;case this.gcaseIns:_=l.mods[3];break;case this.gcasePos:_=l.mods[4];break}for(var d=0,p=_.length;d<p;d++){var f=_.substr(d,1);switch(f){case".":break;case"-":s=s.substr(0,s.length-1);break;default:s+=f}}return s},getSex:()=>{if(i.mn.length>2)switch(i.mn.substr(i.mn.length-2)){case"ич":return"m";case"на":return"f"}return""},fullName:s=>((i.fullNameSurnameLast?"":i.lastName(s)+" ")+i.firstName(s)+" "+i.middleName(s)+(i.fullNameSurnameLast?" "+i.lastName(s):"")).replace(/^ +| +$/g,""),lastName:s=>i.word(i.ln,i.sex,"lastName",s),firstName:s=>i.word(i.fn,i.sex,"firstName",s),middleName:s=>i.word(i.mn,i.sex,"middleName",s)};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],n=o[3],i.fullNameSurnameLast=!0):(e=o[1],t=o[3],n=o[5])}return i.ln=e,i.fn=t||"",i.mn=n||"",i.sex=a||i.getSex(),i}function ca(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 _a(e){return e=typeof e=="number"?e:new Date(e).getMonth()+1,{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 ua(e,t){return t&&(e=Number(e)/t),parseFloat(e).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g,"$1 ")}function fa(e,t){let n=t+"";for(;n.length<e;)n="0"+n;return n}function ma(e,t,n){let a=t/e*n;return(typeof a!="number"||a===1/0)&&(a=0),parseFloat(a).toFixed(1)}function pa(e){return e.charAt(0).toUpperCase()+e.slice(1)}function ha(e,t){e=Math.abs(e)%100;let n=e%10;return e>10&&e<20?t[2]:n>1&&n<5?t[1]:n===1?t[0]:t[2]}const on={},sn={},le={},ge={},Te={};let ke="",fe={};function ga(e,t){const[n,a]=m.useState(!1);return m.useEffect(()=>{let i=localStorage.getItem("d");i?(async()=>{let o=await g.Router.Load();if(o)return a(!0);t==null||t(o),t&&alert("Router.Load Error"),ne()})():(t==null||t(i),t&&alert("No SSID"),["a","b","c","d","e","m","u","s","p","q","w"].forEach(o=>localStorage.removeItem(o)),["f"].forEach(o=>sessionStorage.removeItem(o)),g.Router.Reset(),a(!0))},[]),n?e:""}function ne(){["a","b","c","d","e","m","u","s","q","p","t","w"].forEach(e=>localStorage.removeItem(e)),["f"].forEach(e=>sessionStorage.removeItem(e)),window.history.pushState({},"","/"),window.location.reload()}function xa(e){return localStorage.setItem("d",e)}function ba(){let e=localStorage.getItem("d");return e!==""&&e!=="undefined"&&e!==null?e:""}function va(e){return localStorage.setItem("a",e)}function ya(){let e=localStorage.getItem("a");return e!==""&&e!=="undefined"&&e!==null?e:""}async function wa(e){localStorage.setItem("p",await g.Crypto.enCode(e))}function ka(){let e=localStorage.getItem("p");if(e!==""&&e!=="undefined"&&e!==null){let t=g.Crypto.deCode(e);return t||ne(),t}else return ne(),!1}function Ca(e,t){on.data[e]=t,localStorage.setItem("s",g.Crypto.enCode(on.data))}function ja(e){let t=localStorage.getItem("s");return t===null?{}:(t=g.Crypto.deCode(t),t?e!==void 0?t[e]:t:ne())}async function Sa(e){localStorage.setItem("m",await g.Crypto.enCode({data:e}))}function Ea(){let e=localStorage.getItem("m");if(e!==""&&e!=="undefined"&&e!==null){let t=localStorage.getItem("m");if(t===null)return!1;let n=g.Crypto.deCode(t);n||ne();const a=(o,s)=>{let c=s+"";for(;c.length<o;)c="0"+c;return c};return n.data.split(",").map(o=>"M"+a(2,o))}else return ne(),!1}function Ia(e){}function ln(e){let t=localStorage.getItem("b");t=t===null?{}:g.Crypto.deCode(t),t[g.Router.getTabs()]=e,localStorage.setItem("b",g.Crypto.enCode(t))}function ct(){let e=localStorage.getItem("b");return e===null?{}:(e=g.Crypto.deCode(e),e=e[g.Router.getTabs()],e=e===void 0?{active:1,sort:"<"}:e,e)}function Da(e){localStorage.setItem("c",g.Crypto.enCode(e))}function dn(e,t){var a;let n=localStorage.getItem("c");if(n!==""&&n!=="undefined"&&n!==null){let i=g.Crypto.deCode(n);return i||ne(),e===void 0?i:t?(a=i[e][t])==null?void 0:a.n:i[e]}else return ne(),!1}function Na(e){ge.data=e,localStorage.setItem("q",g.Crypto.enCode(ge.data))}function Ta(e,t){ge.data={...ge.data,[e]:t},localStorage.setItem("q",g.Crypto.enCode(ge.data))}function Re(e,t){if(!ge.data){let n=localStorage.getItem("q");n&&(ge.data=g.Crypto.deCode(n))}return e===void 0&&t===void 0?ge.data:e!==void 0&&t===void 0?ge.data[e]:ge.data[e][t]}function Ba(e){sn.data=e}function La(e){return sn.data[e]}function Ma(e){}function $a(){}async function Pa(){if(Te.data)return Te.data;let e=localStorage.getItem("u");if(e!==""&&e!=="undefined"&&e!==null){let t=await g.Crypto.deCode(e);return t||ne(),Te.data=t,t}else return ne(),!1}function Aa(){let e=localStorage.getItem("u");return e!==""&&e!=="undefined"&&e!==null?g.Crypto.deCode(e):!1}function Fa(e){Te.data=e,localStorage.setItem("u",g.Crypto.enCode(e))}function Oa(e){return e?Te.data[e]:Te.data||{}}function za(){let e=localStorage.getItem("e");if(e!==""&&e!=="undefined"&&e!==null)try{let t=g.Crypto.deCode(e);return t||ne(),t}catch{return{}}else return{}}function Ra(e){const t=async n=>{let a=localStorage.getItem(n);if(a!==""&&a!=="undefined"&&a!==null)try{let i=await g.Crypto.deCode(a);if(!i)return;fe[n]={is:!0,time:i.time,data:i.data}}catch{fe[n]={is:!1,time:0,data:{}}}else fe[n]={is:!1,time:0,data:{}}};e.forEach(n=>t(n))}function Za(e){return fe[e]===void 0?(fe[e]={data:{},time:0},{data:{},time:0}):fe[e]}function Ua(e,t){fe[e]={data:t.data,time:t.time},localStorage.setItem(e,g.Crypto.enCode(fe[e]))}function Wa(e,t){le[e]=t,localStorage.setItem("t",g.Crypto.enCode(le))}function Ga(e){if(Object.keys(le).length===0){let t=localStorage.getItem("t");if(t!==""&&t!=="undefined"&&t!==null){let n=g.Crypto.deCode(t);return n||ne(),Object.keys(n).forEach(a=>{le[a]=n[a]}),e?le[e]:le}else return ne(),{}}else return e?le[e]:le}function Ka(e){if(Object.keys(le).length===0){let t=localStorage.getItem("t");if(t!==""&&t!=="undefined"&&t!==null){let n=g.Crypto.deCode(t);return n?(Object.keys(n).forEach(a=>{le[a]=n[a]}),!!le[e]):!1}else return!1}else return!!le[e]}async function Ya(e,t,n){fe[e].time=n,fe[e].data[t.item][t.name]=t.value,localStorage.setItem(e,await g.Crypto.enCode(fe[e]))}function Ha(){var n;let t=(n=new URLSearchParams(window.location.search.substring(1)).get("devmod"))==null?void 0:n.trim();if(t)try{return JSON.parse(t||"{}")}catch{return g.Notice.Error("Error parse devMod"),{}}}function cn(){return ke===""?(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))!=-1?(ke="Opera","Opera"):navigator.userAgent.indexOf("Edg")!=-1?(ke="Edg","Edg"):navigator.userAgent.indexOf("Chrome")!=-1?(ke="Chrome","Chrome"):navigator.userAgent.indexOf("Safari")!=-1?(ke="Safari","Safari"):navigator.userAgent.indexOf("Firefox")!=-1?(ke="Firefox","Firefox"):(ke="unknown","unknown"):ke}function qa(e){return cn()===e}function Ja(e,t,n){return Re(e,t)?Re(e,t).n:n||""}function Xa(e,t,n,a){return Re(e,t)?Re(e,t)[n]:a||""}function Va(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=Math.random()*16|0,n=e=="x"?t:t&3|8;return n.toString(16)})}function Qa(e,t){return t&&(e=e===0?7:e),{1:{name:"Понедельник",names:"Понедельника",abc:"пн"},2:{name:"Вторник",names:"Вторника",abc:"вт"},3:{name:"Среда",names:"Среды",abc:"ср"},4:{name:"Четверг",names:"Четверга",abc:"чт"},5:{name:"Пятница",names:"Пятницы",abc:"пт"},6:{name:"Суббота",names:"Субботы",abc:"сб"},7:{name:"Воскресенье",names:"Воскресенья",abc:"вс"}}[e]}function ei(e,t){return e.reduce(function(n,a){let i=t instanceof Function?t(a):a[t];return n[i]!==void 0||(n[i]={}),n[i][a.id]=a,n},{})}function ti(e){return parseInt((Date.now()-new Date(e).getTime())/31536e6+"")+""}function ni(e){return["number","string"].includes(typeof e)?!isNaN(Number(e))&&!isNaN(parseFloat(e)):!1}function ri(e){var t="",n={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"e",ж:"zh",з:"z",и:"i",й:"y",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"h",ц:"c",ч:"ch",ш:"sh",щ:"sch",ь:"",ы:"y",ъ:"",э:"e",ю:"yu",я:"ya",А:"A",Б:"B",В:"V",Г:"G",Д:"D",Е:"E",Ё:"E",Ж:"Zh",З:"Z",И:"I",Й:"Y",К:"K",Л:"L",М:"M",Н:"N",О:"O",П:"P",Р:"R",С:"S",Т:"T",У:"U",Ф:"F",Х:"H",Ц:"C",Ч:"Ch",Ш:"Sh",Щ:"Sch",Ь:"",Ы:"Y",Ъ:"",Э:"E",Ю:"Yu",Я:"Ya"};for(let a=0;a<e.length;++a)n[e[a]]==null?t+=e[a]:t+=n[e[a]];return t}function ai(e,t,n=!1){return n?e.sort((a,i)=>i[t]-a[t]):e.sort((a,i)=>a[t]-i[t])}function ii(e,t){return e.reduce(function(n,a){let i=t instanceof Function?t(a):a[t];return n[i]!==void 0||(n[i]={}),n[i][a.id]=a,n},{})}function oi(e,t,n=!1){return n?e.sort((a,i)=>new Date(i[t]).getTime()-new Date(a[t]).getTime()):e.sort((a,i)=>new Date(a[t]).getTime()-new Date(i[t]).getTime())}function si(e,t){return e.reduce((n,a)=>n+(a[t]||0),0)}function li(e,t,n,a=!1){return a?e.sort((i,o)=>n(o[t])-n(i[t])):e.sort((i,o)=>n(i[t])-n(o[t]))}function di(e){return{style:{background:`var(--color-${e})`}}}const K={Age:ti,ArraySort:ai,ArrayGroup:ii,ArraySortDate:oi,ArraySortFunction:li,ArraySumma:si,Translit:ri,Date:aa,ColorBackground:di,MoneyString:oa,DateSort:ia,UUID:Va,Size:sa,TypeFiles:la,Cases:da,Initials:ca,Month:_a,Money:ua,Number:fa,Percent:ma,CapitalizeFirstLetter:pa,DeclensionWord:ha,Select:Ja,SelectParams:Xa,ObjectByArray:ei,isNumeric:ni,Week:Qa,set:(e,t)=>{K[e]=t}},ci={Counter:({before:e,from:t=0,to:n,secund:a=3})=>{const i=m.useRef();return m.useEffect(()=>{i.s=!0;const o=1e3,s=n/(a*10);i.n=0;let c=o/(n/s),l=e?e+" ":"";return i.i=setInterval(()=>{if(!i.s)return i.current.textContent=`${l}`+K.Money(n),clearInterval(i.i);if(n===0)return i.current.textContent=`${l}`+K.Money(n),clearInterval(i.i);i.n=i.n+s,i.n>n&&i.n>=n&&(i.n=n,clearInterval(i.i)),i.current&&(i.current.textContent=`${l}`+K.Money(i.n))},c),()=>{i.s=!1,clearInterval(i.i)}},[t,n]),r.jsx("span",{ref:i})}},ye={setSSID:xa,getSSID:ba,getPORT:ka,setPORT:wa,setAUTH:va,getAUTH:ya,Logaut:ne,setMenu:Sa,getMenu:Ea,useSort:Ia,setSort:ln,getSort:ct,setCompany:Da,getCompany:dn,setSelect:Na,addSelect:Ta,getSelect:Re,setApi:Ba,getApi:La,setPayment:Ma,getPayment:$a,setUser:Fa,isUser:Aa,initUser:Pa,getUser:Oa,getBase:Za,setBase:Ua,isData:Ka,setData:Wa,getData:Ga,editBase:Ya,loadBase:Ra,devMod:Ha,isBrowser:qa,getBrowser:cn},re={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"},_n=({title:e,left:t,right:n,children:a})=>r.jsxs("div",{className:re.h,children:[r.jsx("div",{className:re.t,children:e}),t&&r.jsx("div",{className:re.hl,children:t}),n&&r.jsx("div",{className:re.hr,children:n}),a]}),un=({children:e,...t})=>r.jsx("div",{className:re.l,children:e}),fn=({children:e})=>r.jsx("div",{className:re.s,children:e}),mn=({children:e,edit:t})=>{const n={};return t&&(n.edit=""),r.jsx("div",{...n,className:re.f,children:e})};function pn({children:e}){return r.jsx("div",{className:re.g,children:e})}const _i=({children:e,className:t,title:n})=>r.jsxs("div",{className:[re.o,t].join(" "),children:[n&&r.jsx("div",{className:re.hh,children:n}),e]}),ui=({children:e})=>r.jsx("div",{className:re.u,children:e}),fi=({children:e})=>r.jsx("div",{className:re.c,children:e}),mi=({children:e})=>r.jsx("div",{className:re.m,children:e}),pi=g.Alert.Line,_t={Header:_n,Section:fn,Group:pn,Form:mn,List:un,A:pi,U:ui,G:pn,C:fi,L:un,O:_i,S:fn,H:_n,M:mi,F:mn},hi=(e,t)=>{switch(t.type){case"load":return{...e,list:t.list.reverse(),load:!1};case"id":return{...e,id:t.id};case"add":return{...e,list:[t.data,...e.list]};case"update":return{...e,list:e.list.map(n=>n.id===t.data.id?Object.assign({},n,{[t.data.name]:t.data.value}):n),temp:e.temp.map(n=>n.id===t.data.id?Object.assign({},n,{[t.data.name]:t.data.value}):n)};case"view":return{...e,view:e.view==="card"?"item":"card"};case"revers":return{...e,list:[...e.list.reverse()],temp:[...e.temp.reverse()],revers:!e.revers};case"delete":return{...e,list:e.list.filter(n=>n.id!==t.id)};case"edit":return{...e,list:e.list.map(n=>n.id===t.j.item?Object.assign({},n,{[t.j.name]:t.j.value}):n)};default:return e}},gi=()=>({load:!0,list:[],name:"Файлы",add:!1,search:!1,revers:!0}),xi=()=>{let[e,t]=m.useState([]);return r.jsx(r.Fragment,{children:e.length!==0?r.jsxs("div",{className:"upload view",children:[r.jsxs("div",{className:"--head",children:[r.jsx("b",{children:"Загрузки"}),r.jsx("i",{className:"x",onClick:()=>t([]),"data-icon":"F038"})]}),r.jsx("div",{className:"--list",children:e.map(n=>n)})]}):""})},bi=({id:e,name:t,listen:n,dir:a})=>{t=t||"Файлы";const[i,o]=m.useReducer(hi,{},gi),s=()=>{g.Modal.Add(r.jsx(vi,{dir:a,dispatch:o,id:e},new Date().getTime()))};return m.useEffect(()=>{},[e,a]),r.jsxs(_t.O,{children:[" ",r.jsx(_t.H,{title:t,right:r.jsx("i",{className:"f025","data-icon":"C005 25 pointer","data-color":"_b5b9cc :506290",onClick:s}),left:r.jsx("i",{className:"f025","data-icon":"E009 25","data-color":"_2196f3"})}),r.jsx("ul",{"data-empty":"Файлов нет",className:"files_list",children:i.load?r.jsxs("div",{"type-load":"load",children:[r.jsx("i",{}),r.jsx("i",{}),r.jsx("i",{})]}):i.list.length===0?r.jsx(r.Fragment,{}):i.list.map((c,l)=>r.jsx(yi,{dispatch:o,data:c},l))})]})},vi=({id:e,dir:t,dispatch:n})=>{let[a,i]=m.useState(!0),o=m.useRef(null),s=_=>{_.preventDefault(),_.stopPropagation()},c=_=>{},l=_=>{};return m.useEffect(()=>{let _=o.current;["dragenter","dragover","dragleave","drop"].forEach(d=>{_.addEventListener(d,s,!1),document.body.addEventListener(d,s,!1)}),["dragenter","dragover"].forEach(d=>{_.addEventListener(d,c,!1)}),["dragleave","drop"].forEach(d=>{_.addEventListener(d,l,!1)})},[]),r.jsx(r.Fragment,{children:a?r.jsx(r.Fragment,{children:r.jsx("div",{className:"modal o ",onClick:g.Modal.Shake,children:r.jsxs("div",{className:"b",children:[r.jsx("div",{className:"h",children:"Загрузка файлов"}),r.jsx("div",{className:"x","data-icon":"F038",onClick:()=>{i(!1)}}),r.jsxs("div",{className:"upload",ref:o,children:[r.jsx("input",{type:"file",id:"fileElem",name:"files",multiple:!0}),r.jsx("dd",{}),r.jsx("i",{"data-icon":"F061"})]})]})},new Date().getTime())}):""})},yi=({data:e,dispatch:t})=>{let n=async()=>{let o=await(await fetch(g.Api.url().files+"/yandex/data/"+e.id,{headers:{"Content-type":"application/json;charset=utf-8",SSID:ye.getSSID()||""}})).blob();if(o.size!==2){let s=new Blob([o],{type:o.type});s=URL.createObjectURL(s);let c=document.createElement("a");c.setAttribute("href",s),c.setAttribute("download",e.name),c.click()}},a=async()=>{(await(await fetch(g.Api.url().files+"/yandex/delete/"+e.id,{headers:{"Content-type":"application/json;charset=utf-8",SSID:ye.getSSID()||""}})).json()).status==="success"&&(t({type:"delete",id:e.id}),g.Notice.Send({type:"success",text:"Файл успешно удалён"}))};return r.jsxs("li",{children:[r.jsx("div",{className:"f035",children:K.TypeFiles(e.type)}),r.jsx("div",{className:"f100",children:K.Date(e.uDate,"dd.mm.yy")}),r.jsx("div",{className:"f000",children:e.name}),r.jsxs("div",{className:"f050 flex button",children:[r.jsx("i",{className:"f025","data-icon":"F060 35 pointer","data-color":"_b5b9cc :4CAF50",onClick:n}),r.jsx("i",{className:"f025","data-icon":"F048 35 pointer","data-color":"_b5b9cc :FF9800",onClick:a})]}),r.jsx("div",{className:"f080",children:K.Size(e.size)})]})};let ae={};ae.list=za(),ae.active=null;const wi=()=>{var i;let[e,t]=m.useState([]),[n,a]=m.useState();return m.useEffect(()=>{(async()=>{let o=Object.keys(ae.list);if(o.length!==0){let s=[];o.forEach((c,l)=>{s.push({item:r.jsx(ut,{data:ae.list[c]},ae.list[c].id),link:ae.list[c].link})}),t(s)}})()},[]),ae.active=o=>{var s;a(o),(s=document.querySelector("app-body"))==null||s.setAttribute("bookmarks",o===1?"bottom":"")},ae.set=o=>{t([...e,{item:r.jsx(ut,{data:o},o.id),link:o.link}])},ae.del=o=>{e.forEach((s,c)=>{s.link===o&&e.splice(c,1)}),t([...e])},(i=document.querySelector("app-body"))==null||i.setAttribute("bookmarks",n===1&&e.length!==0?"bottom":""),n!==0?r.jsx(r.Fragment,{children:e.length!==0?r.jsx("div",{className:"bookmarks",children:e.map(o=>o.item)}):""}):""},ki=({id:e,type:t,name:n})=>{let a=t+"-"+e,[i,o]=m.useState(ae.list[a]!==void 0);return m.useEffect(()=>{o(ae.list[a]!==void 0)},[a]),r.jsx(r.Fragment,{children:""})},ut=({data:e})=>{let t=a=>{a.preventDefault(),delete ae.list[e.link],ae.del(e.link)},n=()=>{g.Router.setId(e.id)};return r.jsx("span",{onContextMenu:t,onClick:n,children:e.name})},Ci=e=>{ae.active(e)},q={},ft={},P={};P.config={iceServers:[{url:"stun:stun.l.google.com:19302"}]},P.constraints={optional:[{DtlsSrtpKeyAgreement:!0}]},P.other=[],P.users={},P.asset=0,P.remoute=!1,P.stream=null,P.user=0,P.connect=!1,P.offer=null,P.btnRefuse=null,P.time=!1;let De;De=document.createElement("audio"),De.setAttribute("autoplay","true"),De.setAttribute("muted","true"),q.start=async e=>{P.rtc=new RTCPeerConnection(P.config),P.other=[],P.remoute=!1,P.rtc.onicecandidate=n=>{n.candidate&&P.other.push(n.candidate)},P.rtc.ontrack=n=>{if(n.streams&&n.streams[0])De.srcObject=n.streams[0];else{let a=new MediaStream(n.track);De.srcObject=a}};const t=await navigator.mediaDevices.getUserMedia({video:!1,audio:{echoCancellation:!1,autoGainControl:!0}});t.getTracks().forEach(n=>{P.rtc.addTrack(n,t)}),P.rtc.onconnectionstatechange=()=>{P.rtc.connectionState},P.rtc.ontrack=async n=>{if(n.streams&&n.streams[0])De.srcObject=n.streams[0];else{let a=new MediaStream(n.track);De.srcObject=a}},P.rtc.onaddstream=n=>{},P.rtc.onnegotiationneeded=n=>{},P.rtc.oniceconnectionstatechange=n=>{},P.rtc.onsignalingstatechange=n=>{},P.rtc.onicegatheringstatechange=n=>{},P.rtc.onicecandidateerror=n=>{},P.rtc.ondatachannel=n=>{},P.rtc.onerror=n=>{},e()},q.useListener=e=>{ft.rtc=e},q.setListener=e=>{ft.rtc&&ft.rtc(e)},q.callTo=async e=>{q.start(async()=>{const t=await P.rtc.createOffer();await P.rtc.setLocalDescription(t),P.uid=e})},q.callIn=async e=>{P.asset=e.id,P.offer=e.offer,P.uid=e.id},q.callRise=async()=>{q.start(async()=>{P.rtc.setRemoteDescription(new RTCSessionDescription(JSON.parse(atob(P.offer))));const e=await P.rtc.createAnswer();await P.rtc.setLocalDescription(e)})},q.callOk=async e=>{P.asset=e.id;const t=new RTCSessionDescription(JSON.parse(atob(e.answer)));await P.rtc.setRemoteDescription(t)},q.IceCandidate=async e=>{e.candidate.forEach(t=>{P.rtc.addIceCandidate(new RTCIceCandidate(t))})},q.callFrom=async()=>{},q.callNo=()=>{P.asset=0,P.time=!1,P.rtc&&P.rtc.close(),q.setListener({type:"state",data:"closed"})},q.callOf=()=>{P.asset=0,P.time=!1,P.rtc.close()},q.callRefuser=async()=>{P.asset=0,P.time=!1,P.rtc&&P.rtc.close()},q.Run=async e=>{q[e.data.type]&&q[e.data.type](e.data)};let Ze={};function ji(){let[e,t]=m.useState([]),n=m.useRef(null);return m.useEffect(()=>{},[]),Ze.set=a=>{t([...e,a])},Ze.del=()=>{t([])},Ze.audio=(a,i)=>{n.current.volume=.5,n.current.loop=i,n.current.src="/audio/"+a,n.current.muted=!1},r.jsxs(r.Fragment,{children:[e.map(a=>a.item),r.jsx("audio",{id:"audio",ref:n,autoPlay:!0,muted:!0})]})}function Si(e,t){let n=new Date().getTime();Ze.set({item:r.jsx(Ei,{type:t,id:e},n),key:n})}function Ei({id:e,type:t}){const[n,a]=m.useState({}),[i,o]=m.useState(t);m.useEffect(()=>{a(ye.getSelect("user")[e])},[]),q.useListener(l=>{switch(l.type){case"state":o(l.data)}});const s=()=>{switch(i){case"out":return r.jsx("span",{onClick:()=>{q.callTo(n.id),o("call")},children:r.jsx("svg",{className:"green",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M 27.9999 51.9062 C 41.0546 51.9062 51.9063 41.0547 51.9063 28.0000 C 51.9063 14.9219 41.0312 4.0938 27.9765 4.0938 C 14.8983 4.0938 4.0937 14.9219 4.0937 28.0000 C 4.0937 41.0547 14.9218 51.9062 27.9999 51.9062 Z M 21.8827 33.8360 C 16.0702 28.0469 12.3671 20.6640 16.7499 16.2813 C 17.0077 16.0234 17.2890 15.7656 17.5468 15.5078 C 18.8827 14.2422 20.1718 14.3125 21.3202 15.9297 L 24.3671 20.2656 C 25.3983 21.7656 25.1405 22.6094 24.0390 23.7813 L 23.0780 24.8360 C 22.7265 25.1640 22.8671 25.6094 23.0312 25.8906 C 23.4765 26.7344 24.7421 28.2344 26.1014 29.5938 C 27.5077 31.0000 28.9374 32.1953 29.8280 32.6875 C 30.1562 32.875 30.6249 32.9219 30.9296 32.6406 L 31.9374 31.6797 C 33.0624 30.5781 33.9765 30.2969 35.4296 31.3281 C 37.4452 32.7578 38.6640 33.6016 39.8593 34.4219 C 41.3358 35.5000 41.6874 36.8360 40.1874 38.1953 C 39.9296 38.4531 39.6952 38.7344 39.4374 38.9922 C 35.0546 43.3516 27.6952 39.6484 21.8827 33.8360 Z"})})});case"in":return r.jsxs(r.Fragment,{children:[r.jsx("span",{onClick:c,children:r.jsx("svg",{className:"red",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M 27.9999 51.9063 C 41.0546 51.9063 51.9063 41.0781 51.9063 28 C 51.9063 14.9453 41.0312 4.0937 27.9765 4.0937 C 14.8983 4.0937 4.0937 14.9453 4.0937 28 C 4.0937 41.0781 14.9218 51.9063 27.9999 51.9063 Z M 19.5858 38.4063 C 18.4843 38.4063 17.5936 37.5156 17.5936 36.4141 C 17.5936 35.8750 17.8280 35.4063 18.2030 35.0547 L 25.1874 28.0234 L 18.2030 20.9922 C 17.8280 20.6641 17.5936 20.1719 17.5936 19.6328 C 17.5936 18.5547 18.4843 17.6875 19.5858 17.6875 C 20.1249 17.6875 20.5936 17.8984 20.9452 18.2734 L 27.9765 25.2812 L 35.0546 18.25 C 35.4530 17.8281 35.8749 17.6406 36.3905 17.6406 C 37.4921 17.6406 38.3827 18.5312 38.3827 19.6094 C 38.3827 20.1484 38.1952 20.5937 37.7968 20.9688 L 30.7655 28.0234 L 37.7733 35.0078 C 38.1249 35.3828 38.3593 35.8516 38.3593 36.4141 C 38.3593 37.5156 37.4687 38.4063 36.3671 38.4063 C 35.8046 38.4063 35.3358 38.1719 34.9843 37.8203 L 27.9765 30.7890 L 20.9921 37.8203 C 20.6405 38.1953 20.1249 38.4063 19.5858 38.4063 Z"})})}),r.jsx("span",{onClick:q.callRise,children:r.jsx("svg",{className:"green",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M 27.9999 51.9062 C 41.0546 51.9062 51.9063 41.0547 51.9063 28.0000 C 51.9063 14.9219 41.0312 4.0938 27.9765 4.0938 C 14.8983 4.0938 4.0937 14.9219 4.0937 28.0000 C 4.0937 41.0547 14.9218 51.9062 27.9999 51.9062 Z M 21.8827 33.8360 C 16.0702 28.0469 12.3671 20.6640 16.7499 16.2813 C 17.0077 16.0234 17.2890 15.7656 17.5468 15.5078 C 18.8827 14.2422 20.1718 14.3125 21.3202 15.9297 L 24.3671 20.2656 C 25.3983 21.7656 25.1405 22.6094 24.0390 23.7813 L 23.0780 24.8360 C 22.7265 25.1640 22.8671 25.6094 23.0312 25.8906 C 23.4765 26.7344 24.7421 28.2344 26.1014 29.5938 C 27.5077 31.0000 28.9374 32.1953 29.8280 32.6875 C 30.1562 32.875 30.6249 32.9219 30.9296 32.6406 L 31.9374 31.6797 C 33.0624 30.5781 33.9765 30.2969 35.4296 31.3281 C 37.4452 32.7578 38.6640 33.6016 39.8593 34.4219 C 41.3358 35.5000 41.6874 36.8360 40.1874 38.1953 C 39.9296 38.4531 39.6952 38.7344 39.4374 38.9922 C 35.0546 43.3516 27.6952 39.6484 21.8827 33.8360 Z"})})})]});case"call":return r.jsx("span",{onClick:()=>q.callNo(n.id),children:r.jsx("svg",{className:"red",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M 27.9999 51.9063 C 41.0546 51.9063 51.9063 41.0781 51.9063 28 C 51.9063 14.9453 41.0312 4.0937 27.9765 4.0937 C 14.8983 4.0937 4.0937 14.9453 4.0937 28 C 4.0937 41.0781 14.9218 51.9063 27.9999 51.9063 Z M 19.5858 38.4063 C 18.4843 38.4063 17.5936 37.5156 17.5936 36.4141 C 17.5936 35.8750 17.8280 35.4063 18.2030 35.0547 L 25.1874 28.0234 L 18.2030 20.9922 C 17.8280 20.6641 17.5936 20.1719 17.5936 19.6328 C 17.5936 18.5547 18.4843 17.6875 19.5858 17.6875 C 20.1249 17.6875 20.5936 17.8984 20.9452 18.2734 L 27.9765 25.2812 L 35.0546 18.25 C 35.4530 17.8281 35.8749 17.6406 36.3905 17.6406 C 37.4921 17.6406 38.3827 18.5312 38.3827 19.6094 C 38.3827 20.1484 38.1952 20.5937 37.7968 20.9688 L 30.7655 28.0234 L 37.7733 35.0078 C 38.1249 35.3828 38.3593 35.8516 38.3593 36.4141 C 38.3593 37.5156 37.4687 38.4063 36.3671 38.4063 C 35.8046 38.4063 35.3358 38.1719 34.9843 37.8203 L 27.9765 30.7890 L 20.9921 37.8203 C 20.6405 38.1953 20.1249 38.4063 19.5858 38.4063 Z"})})});case"closed":return r.jsx("span",{onClick:()=>{q.callTo(n.id),o("call")},children:r.jsx("svg",{className:"green",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M 27.9999 51.9062 C 41.0546 51.9062 51.9063 41.0547 51.9063 28.0000 C 51.9063 14.9219 41.0312 4.0938 27.9765 4.0938 C 14.8983 4.0938 4.0937 14.9219 4.0937 28.0000 C 4.0937 41.0547 14.9218 51.9062 27.9999 51.9062 Z M 21.8827 33.8360 C 16.0702 28.0469 12.3671 20.6640 16.7499 16.2813 C 17.0077 16.0234 17.2890 15.7656 17.5468 15.5078 C 18.8827 14.2422 20.1718 14.3125 21.3202 15.9297 L 24.3671 20.2656 C 25.3983 21.7656 25.1405 22.6094 24.0390 23.7813 L 23.0780 24.8360 C 22.7265 25.1640 22.8671 25.6094 23.0312 25.8906 C 23.4765 26.7344 24.7421 28.2344 26.1014 29.5938 C 27.5077 31.0000 28.9374 32.1953 29.8280 32.6875 C 30.1562 32.875 30.6249 32.9219 30.9296 32.6406 L 31.9374 31.6797 C 33.0624 30.5781 33.9765 30.2969 35.4296 31.3281 C 37.4452 32.7578 38.6640 33.6016 39.8593 34.4219 C 41.3358 35.5000 41.6874 36.8360 40.1874 38.1953 C 39.9296 38.4531 39.6952 38.7344 39.4374 38.9922 C 35.0546 43.3516 27.6952 39.6484 21.8827 33.8360 Z"})})})}},c=()=>{q.callRefuser(n.id),Ze.del()};return r.jsx("div",{className:"web-phone white",children:r.jsxs("div",{className:"w",children:[r.jsx("div",{className:"x","data-icon":"F038",onClick:c}),r.jsx("div",{className:"a"}),r.jsx("div",{className:"n",children:n.name}),r.jsx("div",{className:"b",children:s()})]})})}const mt={};function Ii(e){mt.add(e)}function Di({color:e,size:t,name:n}){return r.jsx("svg",{width:t,height:t,color:e,children:r.jsx("use",{href:`#${n}`})})}function Ni(){let[e,t]=m.useState([]);if(mt.x=()=>{t([])},mt.add=a=>{t(a)},e.length===0)return"";const n={sprite:""};return r.jsx("svg",{...n,xmlns:"http://www.w3.org/2000/svg",children:e.map((a,i)=>r.jsx("symbol",{id:a.name,viewBox:"0 0 24 24",fillRule:"evenodd",clipRule:"evenodd",children:r.jsx(a.path,{})},i))})}let Xe={},pt={},ht="ru";const Ti=(e,t)=>{pt=e,t?ht=t:ht=Object.keys(e)[0]},hn=m.createContext(localStorage.getItem("lang")||navigator.language),Bi=({children:e})=>{const[t,n]=m.useState(localStorage.getItem("lang")||navigator.language);return Xe.update=n,r.jsx(hn.Provider,{value:pt[t]||pt[ht],children:e})},Li=e=>{var t;localStorage.setItem("lang",e),(t=Xe.update)==null||t.call(Xe,e)},Mi=()=>m.useContext(hn),$i=()=>localStorage.getItem("lang")||navigator.language;m.createContext({tab:"",setTabs:e=>{}});const gt={};function xt(e,t){gt[e]=t}function Pi(e,t){gt[e]!==void 0&&gt[e](t)}const Ce={};function Ai(e,t){const[n,a]=m.useState(t);return m.useEffect(()=>{if(Ce[e])return Ce[e].push(a);Ce[e]=[a]},[]),[n]}function Fi(e,t){if(Ce[e])return Ce[e].push(t);Ce[e]=[t]}function Oi(e,t){Ce[e]&&Ce[e].forEach(n=>n(t))}const de={setListener:Pi,useListener:xt,setEmitter:Oi,useEmitter:Ai,subEmitter:Fi};function zi(){let[e,t]=m.useState([]);return de.useListener("form",n=>{t([n])}),r.jsx(r.Fragment,{children:e.map(n=>n)})}const gn=({children:e,lang:t,log:n})=>ga(r.jsxs(Bi,{children:[r.jsx(g.Modal.Init,{}),r.jsx(g.Notice.Init,{}),r.jsx(g.Alert.Init,{}),r.jsx(g.Tooltip.Init,{}),r.jsx(xi,{}),r.jsx(Ni,{}),r.jsx(zi,{}),r.jsx(ji,{}),r.jsx(wi,{}),e]}),n),Ri=({children:e,...t})=>r.jsx("menu",{children:e}),Zi=({children:e,...t})=>r.jsxs("header",{children:["xz",e]}),Ui={payment:"_payment_1lxfv_1"};function Wi(){let[e,t]=m.useState({});return!e.active&&!e.payment?"":r.jsx("div",{className:Ui.payment,children:"Истек срок оплаты! Доступ доступен до 16.04.2024"})}const Gi=({children:e,...t})=>r.jsxs("div",{className:"app",children:[r.jsx(Wi,{}),r.jsx(Ri,{}),r.jsx(Zi,{}),r.jsx(gn,{}),e]}),Ve={btn:"_btn_294gf_1",confirm:"_confirm_294gf_15",cancel:"_cancel_294gf_20",action:"_action_294gf_25",disabled:"_disabled_294gf_30",await:"_await_294gf_37",m:"_m_294gf_44",l:"_l_294gf_48"},xn=({onClick:e,onSend:t,size:n="m",view:a="confirm",mode:i="primary",children:o,isDisabled:s=!1,className:c,after:l,before:_,label:d,onRef:p,awaitText:f="Ожидайте"})=>{let[h,b]=m.useState(!1);const x=k=>{if(e)return e();h||(t?(b(!0),t(b)):k.preventDefault())};let v={};return(s||h)&&(v.disabled=!0),r.jsx("button",{...v,ref:p,className:[Ve.btn,h?Ve.disabled:Ve[a],n&&Ve[n],c].join(" "),onClick:x,children:h?f:r.jsxs(r.Fragment,{children:[_||""," ",d," ",l||""]})||o})},Ki=({list:e,onClick:t,active:n,size:a,view:i})=>r.jsx("nav",{children:r.jsx("ul",{className:[a,i].join(" "),children:e.map(o=>r.jsx(Yi,{onClick:t,active:n,label:o.label,link:o.link},o.link))})}),Yi=({onClick:e,label:t,link:n,active:a})=>r.jsx("li",{"tabs-active":String(a===n),onClick:()=>e(n),children:t}),bn={tabs:"_tabs_1i88v_1",tab:"_tab_1i88v_1"},vn=({list:e=[],active:t,onTab:n})=>{const a=i=>{if(n)return n(i);g.Router.setTabs(i)};return r.jsx("nav",{className:[bn.tabs,"tabs"].join(" "),children:e.map(i=>m.createElement("div",{onClick:()=>a(i.id),active:(t===i.id).toString(),className:bn.tab,key:i.id},i.label,i.badge?r.jsx("em",{children:i.badge}):""))})},Hi=({list:e=[],active:t,onChange:n,className:a,after:i})=>{const[o,s]=m.useState(t);return r.jsxs("div",{className:["tabs-button",a].join(" "),children:[r.jsx("ul",{children:e.map(c=>r.jsx(qi,{data:c,light:c.light,setTabs:s,active:c.id===o,onChange:n},c.id))}),i]})},qi=({data:e,light:t,active:n,setTabs:a,onChange:i})=>{const o=()=>{e.disabled||(i&&i(e.id),a(e.id))};return r.jsxs("li",{onClick:o,className:e.disabled?"disabled":n?"active":"",children:[r.jsxs("p",{children:[e.before,e.name]}),t&&r.jsx("em",{})]})},Ji={List:Ki,Lite:vn,Button:Hi},Xi=({title:e="",button:t,description:n="",children:a})=>r.jsxs("fieldset",{children:[e&&r.jsxs("legend",{children:[e,t&&r.jsx("div",{role:"button-outline",onClick:()=>t.onClick(),children:t.label})," "]}),r.jsx("ul",{children:a}),n&&r.jsx("article",{children:n})]}),Vi={setting:"_setting_dva4m_2"},Qi=({children:e})=>r.jsx("div",{className:Vi.setting,children:e}),eo=({label:e,children:t})=>{let[n,a]=m.useState(!1);return r.jsxs("li",{"data-item":"accordion",children:[r.jsxs("dl",{onClick:()=>a(!n),children:[r.jsx("dt",{children:e}),r.jsx("dd",{children:r.jsx("div",{"data-close":String(n)})})]}),n&&r.jsx("div",{children:t})]})},to=({label:e,onClick:t,button:n})=>r.jsx("li",{children:r.jsxs("dl",{children:[r.jsx("dt",{children:e}),r.jsx("dd",{role:"button",onClick:()=>t(),children:n})]})}),yn={Switch:({active:e,onClick:t})=>(e=typeof e=="number"?!!e:e,r.jsx("div",{role:"switch",onClick:()=>{t()},"aria-checked":e?"true":"false"}))},no={Accordion:eo,Button:to,Switch:({label:e,onClick:t,active:n})=>r.jsx("li",{children:r.jsxs("dl",{children:[r.jsx("dt",{children:e}),r.jsx("dd",{children:r.jsx(yn.Switch,{onClick:t,active:n})})]})}),Info:({label:e,info:t})=>r.jsx("li",{children:r.jsxs("dl",{children:[r.jsx("dt",{children:e}),r.jsx("dd",{role:"info",children:t})]})}),Select:({label:e,active:t,options:n})=>r.jsx("li",{children:r.jsxs("dl",{children:[r.jsx("dt",{children:e}),r.jsx("dd",{role:"info",children:t})]})}),Component:({label:e,children:t})=>r.jsx("li",{children:r.jsxs("dl",{children:[r.jsx("dt",{children:e}),r.jsx("dd",{children:t})]})}),Node:({label:e,children:t})=>r.jsx("li",{children:r.jsxs("dl",{children:[r.jsx("dt",{children:e}),r.jsx("dd",{children:t})]})})};function wn({list:e,onClick:t,active:n,size:a,view:i}){return r.jsx("nav",{children:r.jsx("ul",{className:[a,i].join(" "),children:e.map(o=>r.jsx(ro,{onClick:t,active:n,label:o.label,link:o.link},o.link))})})}const ro=({onClick:e,label:t,link:n,active:a})=>r.jsx("li",{"tabs-active":String(a===n),onClick:()=>e(n),children:t});wn.defaultProps={size:"M",view:"H"};const ao={Section:Xi,Main:Qi,Item:no,Tabs:wn};function io({value:e,background:t,gradient:n}){let a=835.24,i=a-e/100*a;const o=m.useId();return r.jsxs("svg",{viewBox:"0 0 275 275",xmlns:"http://www.w3.org/2000/svg",style:{borderRadius:"50%",background:t},children:[n&&r.jsx("linearGradient",{id:o,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:n.map((s,c)=>r.jsx("stop",{offset:s[0],stopColor:s[1]},c))}),r.jsx("circle",{strokeWidth:"10",fill:"transparent",r:"133",cx:"137.5",cy:"137.5",stroke:`url(#${o})`,strokeLinecap:"round",strokeDasharray:a,strokeDashoffset:i,transform:"rotate(-90 137.5 137.5)"})]})}const oo={Circle:io},so={Icon:ki,Item:ut,Active:Ci};function lo(){return r.jsx("svg",{viewBox:"0 0 462.86 359.96",children:r.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 co={i:"_i_it11s_1"};let kn="/assets/";function _o(e){kn=e}function uo({name:e,size:t="16px",onClick:n,hover:a,origin:i=!1,className:o}){const s={[i?"backgroundImage":"WebkitMaskImage"]:`url(${kn}${e}.svg)`,"--size":t},c={};return o&&(c.className=o),n&&(c.onClick=n,c.pointer=""),a&&(c.hover=a),r.jsx("i",{role:"icon",style:s,className:[co.i,`icon-${e}`].join(" "),...c})}let bt={};function fo(e){bt={...bt,...e}}function Cn(){return bt}function mo({name:e,hover:t,onClick:n,className:a}){const i={};return n&&(i.onClick=n,i.pointer=""),t&&(i.hover=t),a&&(i.className=a),Cn()[e]?r.jsx("i",{role:"icon",...i,children:Cn()[e]()}):""}const po={Logo:lo,Sprite:Ii,set:fo,Symbol:Di,Default:mo,Assets:uo};let jn={};jn.setAttribute=(e,t)=>{const n=document.getElementById("root");n.dataset[e]=t};function ho({items:e,list:t,icons:n,isSetting:a=!0}){const i=()=>{g.Alert.Send({title:"Выйти",text:"Вы уверене что хотиет выйти"},()=>{ye.Logaut()})};return r.jsxs("menu",{children:[r.jsx("ul",{children:t.map(o=>r.jsx(go,{items:e,i:o,icons:n},o))}),r.jsx("em",{}),r.jsxs("ul",{children:[r.jsx(xo,{icons:n}),a&&r.jsxs("li",{className:g.Router.isModule("Settings")?"active":"",onClick:()=>g.Router.setModule("Settings"),children:[r.jsx(n.Icons,{name:"s040"}),r.jsx("span",{children:"Настройки"})]}),r.jsxs("li",{onClick:i,children:[r.jsx(n.Icons,{name:"s044"}),r.jsx("span",{children:"Выход"})]})]})]})}const go=({items:e,i:t,icons:n})=>t[0]==="#"?r.jsx("b",{children:t.slice(1)}):r.jsxs("li",{className:g.Router.isModule(e[t].link)?"active":"",onClick:()=>{g.Router.setTabs(e[t].temp,!1),g.Router.setModule(e[t].link)},children:[r.jsx(n.Icons,{name:e[t].icon}),r.jsx("span",{children:e[t].name})]}),xo=({icons:e})=>{const[t,n]=m.useState(!1),a=m.useRef(null),i=async()=>{a.current&&(await a.current.prompt(),n(!1))};return m.useEffect(()=>{window.addEventListener("appinstalled",o=>{}),window.addEventListener("beforeinstallprompt",async o=>{o.preventDefault(),a.current=o,n(!0)})},[]),t?r.jsxs("li",{onClick:i,children:[r.jsx(e.Icons,{name:"install"}),r.jsx("span",{children:"Установить как приложение"})]}):""};function Sn({path:e,query:t,button:n,emptyList:a="Список пуст",searchParams:i=["p01","p02","p03"],...o}){const[s,c]=m.useState([]),[l,_]=m.useState([]),[d,p]=m.useState(!1),f=async()=>{let h=await g.Api.fetch(e,t);h.data&&h.data.length>0&&(c(h.data),_(h.data)),p(!0)};return de.useListener("list_children",h=>{if(h.action==="edit"){let b=l.map(x=>x.id===h.id?Object.assign(x,{[h.name]:h.value}):x);c(b),_(b)}if(h.action==="delete"){let b=l.filter(x=>x.id!==h.id);c(b),_(b)}}),de.useListener("search",h=>{c(l.filter(b=>(""+i.map(v=>b[v]).toString()).toLowerCase().includes(h.toLowerCase())))}),m.useEffect(()=>{f(),n&&de.setListener("button",n)},[]),d&&s.length===0?r.jsx("ul",{className:"list-body",children:a}):r.jsx("ul",{className:"list-body",children:s.map((h,b)=>r.jsx(o.item,{data:h,count:b+1},h.id))})}const bo={Menu:ho,List:Sn},vo={sort:"_sort_1yrvt_1"};let Qe={};function yo(e,t){switch(t.type){case"active":let n="<";return e.active===t.data&&(n=e.sort==="<"?">":"<"),Qe.get({active:t.data,sort:n},!1),ln({active:t.data,sort:n}),{...e,active:t.data,sort:n};default:throw new Error}}function wo(){const[e,t]=m.useReducer(yo,ct()===void 0?{active:1,sort:"<"}:ct());return r.jsxs("div",{className:vo.sort,children:[r.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})}),r.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})}),r.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 ko(e){Qe.get=e}function Co(e){Qe.set(e)}function jo(e,t,n){let a=1,i=0,o={},s=50;o[a]=[];let c={},l="s1a";switch(c.s1a=(_,d)=>d.s1-_.s1,c.s1d=(_,d)=>_.s1-d.s1,c.s2a=(_,d)=>_.s2-d.s2,c.s2d=(_,d)=>d.s2-_.s2,c.s3a=(_,d)=>_.s3.localeCompare(d.s3),c.s3d=(_,d)=>d.s3.localeCompare(_.s3),n.active){case 1:l=n.sort===">"?"s1d":"s1a";break;case 2:l=n.sort===">"?"s2d":"s2a";break;case 3:l=n.sort===">"?"s3d":"s3a";break}return t.sort(c[l]).forEach(_=>{i++,i<=s||(a++,i=1,o[a]=[]),o[a].push(e[_.id])}),{data:o}}function So(e){Qe.count(e)}const Eo={Init:wo,useValue:ko,Set:Co,Run:jo,Count:So},et={},En={};function Io(e){const[t,n]=m.useState({}),a=async i=>{n(Object.keys(et).reduce((o,s)=>(o?o[s]=et[s].all:o={},o),{}))};return m.useEffect(()=>{e.forEach(i=>et[i]={all:0}),En.menu=a,a()},[e]),t}function Do(e,t){switch(typeof t){case"number":et[e].all+=t,En.menu();break}}const No={useMenu:Io,setUpdate:Do};class To{constructor(t="el",n="db"){Wt(this,"storeName");Wt(this,"_dbp");this.storeName=n,this._dbp=new Promise((a,i)=>{try{const o=indexedDB.open(t,1);o.onerror=s=>{i(o.error)},o.onsuccess=()=>{a(o.result)},o.onupgradeneeded=()=>{try{o.result.createObjectStore(n)}catch(s){i(s)}}}catch(o){i(o)}})}async _withIDBStore(t,n){try{const a=await this._dbp;return new Promise((i,o)=>{try{const s=a.transaction(this.storeName,t);s.oncomplete=()=>i(),s.onabort=s.onerror=()=>o(s.error),n(s.objectStore(this.storeName))}catch(s){o(s)}})}catch(a){throw a}}}let vt,H={};const Be=()=>(vt||(vt=new To),vt),yt=(e,t="",n=new Set)=>{if(e==null)return null;if(e instanceof Promise)return t;if(typeof e!="object"||n.has(e))return null;n.add(e);try{for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&!a.startsWith("__"))try{const i=e[a];if(i instanceof Promise)return t?`${t}.${a}`:a;if(i&&typeof i=="object"&&typeof i.then=="function")return t?`${t}.${a}`:a;const o=t?`${t}.${a}`:a,s=yt(i,o,n);if(s)return s}catch{continue}if(Array.isArray(e))for(let a=0;a<e.length;a++)try{const i=`${t}[${a}]`,o=yt(e[a],i,n);if(o)return o}catch{continue}}catch{}return null},me=e=>{if(e==null)return!1;if(e instanceof Promise||e&&typeof e=="object"&&typeof e.then=="function")return!0;try{if(yt(e))return!0}catch{return!0}return!1},je=async(e,t,n=Be())=>{if(me(t))throw new Error(`Нельзя сохранить объект с Promise в IndexedDB для ключа ${e}`);try{const a=await g.Crypto.enCode(t);return H[e]=t,await n._withIDBStore("readwrite",i=>{i.put(a,e)}),!0}catch(a){throw a}},xe=async(e,t=Be())=>{if(H[e]!==void 0)return H[e];try{let n;if(await t._withIDBStore("readonly",a=>{n=a.get(e)}),n.result!==void 0){let a=await g.Crypto.deCode(n.result);return H[e]=a,a}return{}}catch{return{}}},Bo=async(e,t=Be())=>{try{return await t._withIDBStore("readwrite",n=>{n.delete(e)}),delete H[e],!0}catch(n){throw n}},wt=async(e=Be())=>{try{return await e._withIDBStore("readwrite",t=>{t.clear()}),H={},!0}catch(t){throw t}},Lo={id:async(e,t,n)=>{let a=await xe(t);if(n!==void 0)n({type:"load",base:a});else return a[e]},get:xe,set:je,add:async(e,t,n,a)=>{if(me(e))throw new Error("Нельзя сохранить объект с Promise в IndexedDB в add");let i,o;if(o=await xe(n),o[e.id]=e,me(o))throw new Error("Нельзя сохранить объект с Promise в IndexedDB в add после объединения");if(await je(n,o),t!=null&&(i=await xe(t),e.eDate!==void 0)){if(i[e.id]=e.eDate,me(i))throw new Error("Нельзя сохранить page объект с Promise в IndexedDB в add");await je(t,i)}a!==void 0&&a({type:"load",page:i,base:o})},del:Bo,upd:async(e,t,n,a=Be())=>{if(me(t))throw new Error("Нельзя сохранить объект с Promise в IndexedDB при обновлении");if(H[e]===void 0){let i;try{if(await a._withIDBStore("readonly",o=>{i=o.get(e)}),i.result!==void 0){let o=await g.Crypto.deCode(i.result);if(H[e]=o,H[e][t.id]={...H[e][t.id],...t.data},me(H[e]))return{};let s=await g.Crypto.enCode(H[e]);return await a._withIDBStore("readwrite",c=>{c.put(s,e)}),{}}else return{}}catch{return{}}}else if(H[e][t.id]!==void 0){if(H[e][t.id]={...H[e][t.id],...t.data},n!==void 0&&H[n]!==void 0?H[n][t.id]!==void 0&&(H[n][t.id]=t.data.eDate):H[n]=[],delete H[e][t.id].$_item,delete H[e][t.id].$_send,me(H[e])||n!==void 0&&me(H[n]))throw new Error("Нельзя сохранить объект с Promise в IndexedDB при обновлении");try{return await a._withIDBStore("readwrite",i=>{i.put(g.Crypto.enCode(H[e]),e),n!==void 0&&i.put(g.Crypto.enCode(H[n]),n)}),{}}catch(i){throw i}}},key:async(e=Be())=>{const t=[];try{return await e._withIDBStore("readonly",n=>{(n.openKeyCursor||n.openCursor).call(n).onsuccess=function(){this.result&&(t.push(this.result.key),this.result.continue())}}),t}catch{return[]}},load:e=>H[e],split:(e,t,n=[],a={})=>{let i=n.length!==0,o=[],s=a.sort,c=Object.keys(a).length!==0,l=Object.keys(a),_=Object.keys(e),d=[],p=h=>{let b="";if(n.forEach(x=>{b+=t[h][x]}),c){let x={};l.forEach(v=>{x[v]=t[h][v]});for(let v in s)t[h][s[v]]===void 0&&(wt(),location.reload()),v==="s1"&&(x[v]=new Date(t[h][s[v]]).getTime()),v==="s2"&&(x[v]=t[h][s[v]]),v==="s3"&&(x[v]=t[h][s[v]].replace(/[^a-zа-яё]/gi,"").substring(0,1));o.push({id:h,text:b,...x})}else o.push({id:h,text:b})},f=h=>{};return _.forEach(h=>{d.push(t[h])}),d.forEach(h=>{h===void 0?(wt(),location.reload()):(i&&p(h.id),c&&f(h.id))}),{list:d,search:o,filter:a}},clear:wt,updAll:async(e,t,n,a)=>{if(me(e))throw new Error("Нельзя сохранить объект с Promise в IndexedDB в updAll");let i=await xe(t),o=await xe(n);for(let s in e)o[s]=e[s],i[s]=e[s].eDate;if(me(o))throw new Error("Нельзя сохранить base объект с Promise в IndexedDB в updAll после объединения");if(me(i))throw new Error("Нельзя сохранить page объект с Promise в IndexedDB в updAll после объединения");await je(t,i),await je(n,o),a!==void 0&&a({type:"load",page:i,base:o})},delAll:async(e,t,n,a)=>{let i=await xe(t),o=await xe(n);e.forEach(s=>delete i[s]),await je(t,i),a!==void 0&&a({type:"load",page:i,base:o})},delList:async(e,t,n)=>{let a=await xe(t);e.forEach(i=>delete a[i]),await je(t,a)},addList:async(e,t,n)=>{let a=await xe(t);e.forEach(i=>a[i.id]=i.eDate),await je(t,a)}},In={setSetting:Ca,getSetting:ja},Mo={version:{Api:Gr,Server:Wr,Client:Kr},Host:Yr,Import:Hr,IconAssets:_o,DynamicURL:qr},$o={useKey:(e,t)=>{const n=[];t=t.map(a=>a.charCodeAt(0)),document.onkeydown=function(a){n.push(a.keyCode);for(var i=0;i<t.length;i++)if(n.indexOf(t[i])==-1)return;e(),n.length=0},document.onkeyup=function(a){n.length=0}}},Po={s:"_s_18bde_1",loadingB:"_loadingB_18bde_1",ul:"_ul_18bde_31"};function Dn({children:e}){return r.jsx("ul",{className:re.ul,children:e})}function Ao(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 n=Object.keys(e.data).length,a=e.item+1;return a=n<a?1:a,e.item===a?e:{...e,wait:e.size===a,item:a,list:[...e.list,...e.data[a]]};case"clear":return{load:!1,list:[],data:{},item:1,wait:!1,size:0};default:throw new Error}}function Nn({list:e,load:t,className:n,...a}){const i=m.useRef(null),[o,s]=m.useReducer(Ao,{load:!1,list:[],data:{},item:1,wait:!1,size:0});m.useEffect(()=>{i.current.scrollTop=0,e!==null&&s({type:"load",load:!0,data:e})},[t]);let c=()=>{i.current.scrollHeight-i.current.scrollTop-300<=i.current.clientHeight&&!o.wait&&s({type:"update"})};return r.jsx("div",{className:[Po.s,n].join(" "),ref:i,onScroll:c,children:r.jsx(Dn,{"el-empty":"Данные не найдены",children:o.load&&o.list!==void 0?o.list.map(l=>r.jsx(a.item,{data:l},l.id)):r.jsxs("div",{"data-load":"load",children:[r.jsx("i",{}),r.jsx("i",{}),r.jsx("i",{})]})})})}const Fo={Widget:bi},Tn=({onClick:e,active:t})=>(t=!!t,r.jsx("div",{role:"switch",onClick:()=>e,"aria-checked":`${t?"true":"false"}`}));let G={};G.KeyDown=e=>{e.key==="Enter"&&e.preventDefault()},G.PasteOne=e=>{e.preventDefault(),navigator.clipboard.readText().then(t=>{t=t.replace(/^\s*/,"").replace(/\s*$/,""),window.document.execCommand("insertText",!1,t)}).catch(t=>{})},G.Paste=(e,t)=>{t.preventDefault(),navigator.clipboard.readText().then(n=>{if(e){let a=t.target.textContent.length;if(a>=e)return;e-=a,n=n.slice(0,e)}window.document.execCommand("insertText",!1,n.replace(/(\r\n|\n|\r)/gm," "))}).catch(n=>{})},G.Focus=e=>{e.target.textContent.length===0&&(e.target.innerHTML="<br>")},G.Blur=e=>{e.target.scrollLeft=0,e.target.querySelector("br")!==null&&e.target.querySelector("br").remove()},G.ContentEditable=ye.isBrowser("Firefox")?"true":"plaintext-only";function Ue({id:e,value:t,onValue:n,name:a,placeholder:i="",title:o="",error:s="",hide:c=!1,edit:l=!0,active:_=!0,after:d="",before:p="",show:f=!0,maxLength:h,onSave:b,className:x="",isCopy:v=!0,isReload:k=!1}){let w=!!(c&&(t===""||t===void 0)),D=E=>{n&&n({value:E.target.textContent.trim(),name:a,reload:k})},T=E=>{h&&E.target.textContent.trim().length>=h&&E.key!=="Backspace"&&E.preventDefault(),E.key==="Enter"&&E.preventDefault()},B=E=>{v&&(E.preventDefault(),navigator.clipboard.writeText(E.target.textContent.trim()).then(function(){g.Notice.Copy("Данные в буфер обмене")},function(M){}))},N=E=>{E.preventDefault(),navigator.clipboard.readText().then(M=>{if(h){let I=E.target.textContent.length;if(I>=h)return;h-=I,M=M.slice(0,h)}window.document.execCommand("insertText",!1,M.replace(/(\r\n|\n|\r)/gm," "))}).catch(M=>{})};if(!(l&&_)&&!f||!(l&&_)&&w)return"";const y={};y.field="input",x&&(y.className=x);const C={};i&&(C.placeholder=i),l&&_&&(C.edit="");const F=E=>{G.Blur(E),b==null||b({value:E.target.textContent.trim(),name:a})};return r.jsxs("dl",{...y,children:[o?r.jsx("dt",{children:o}):"",p,r.jsx("dd",{onPaste:N,onInput:D,onBlur:F,onKeyDown:T,onContextMenu:B,spellCheck:"true",contentEditable:l&&_?G.ContentEditable:"false",suppressContentEditableWarning:!0,...C,children:t}),d,s?r.jsx("em",{children:s}):""]})}function Bn({onClick:e,onSend:t,name:n,onRef:a}){let[i,o]=m.useState(!1);const s=()=>{if(e)return e();i||(o(!0),t&&t(o))};return r.jsx("button",{ref:a,"data-form":"button",className:i?"btn await":"btn confirm pointer",onClick:s,children:i?"Ожидайте":n})}function Ln({value:e,onValue:t,onActive:n,data:a,name:i,view:o,maxLength:s,edit:c=!0,active:l=!0,placeholder:_="Введите сообщение"}){const d=m.useRef({value:e,timerId:null,shift:!1,send:!0}),p=()=>{d.current.value.length>0?d.current.send&&(n(!0),d.current.send=!1,d.current.timerId=setTimeout(()=>{d.current.send=!0},3e3)):n(!1)},f=w=>{d.current.value=w.target.textContent,p()},h=w=>{w.keyCode===16&&(d.current.shift=!0),w.keyCode===13&&!d.current.shift&&(w.preventDefault(),d.current.value.length!==0&&(w.target.textContent="",a&&a(d.current.value),t&&t(d.current.value),d.current.value="",n(!1)))},b=w=>{w.keyCode===16&&(d.current.shift=!1)},x=w=>{w.preventDefault(),navigator.clipboard.readText().then(D=>{if(s){let T=w.target.textContent.length;if(T>=s)return;s-=T,D=D.slice(0,s)}window.document.execCommand("insertText",!1,D)}).catch(D=>{})},v=()=>{n(!1)},k={spellCheck:"true"};return _&&(k.placeholder=_),c&&l&&(k.contentEditable=G.ContentEditable),r.jsx("dl",{"data-form":"message",children:r.jsx("dd",{onPaste:x,onInput:f,onKeyUp:b,onKeyDown:h,onBlur:v,...k,suppressContentEditableWarning:!0,children:e})})}function Mn(e){let t=()=>e.title?r.jsx("dt",{children:e.title}):"",n=e.edit!==void 0?e.edit:!0,a=e.active!==void 0?e.active:!0,i=e.placeholder!==void 0?e.placeholder:"",o=l=>{e.onValue({value:l.target.textContent,name:e.name})},s=l=>{l.key==="Enter"&&l.preventDefault()},c=l=>{l.preventDefault(),navigator.clipboard.readText().then(_=>{window.document.execCommand("insertText",!1,_)}).catch(_=>{})};return r.jsxs("dl",{"data-form":"input","type-data":"generator",children:[t(),r.jsx("dd",{onPaste:c,onInput:o,onKeyDown:s,contentEditable:n&&a?G.ContentEditable:"false","data-placeholder":i,suppressContentEditableWarning:!0,children:e.value})]})}function $n({value:e,onValue:t,maxLength:n,placeholder:a="",name:i}){let o=(b,x)=>Number(Math.round(b+Math.random()*(x-b))),s=m.useRef(null),c=m.useRef(null),l=o(1e4,99999),_=b=>{b.key!=="Backspace"&&(b.key==="Enter"&&b.preventDefault(),b.target.textContent.length===5&&b.preventDefault(),/\d/.test(b.key)||b.preventDefault())},d=b=>{t({value:Number(b.target.textContent)===l,name:i})},p=b=>{b.preventDefault(),navigator.clipboard.readText().then(x=>{if(n){let v=b.target.textContent.length;if(v>=n)return;n-=v,x=x.slice(0,n)}window.document.execCommand("insertText",!1,x.replace(/(\r\n|\n|\r)/gm," ").replace(/[^0-9]/g,"").substring(0,5))}).catch(x=>{})};m.useEffect(()=>{const b=s.current,x=b.getContext("2d");x.clearRect(0,0,b.width,b.height),x.font="30px brush script mt",x.fillStyle="#eee",x.textAlign="center",x.fillText(l,50,27),c.current.textContent=""},[l]);const f={};f.field="captcha";const h={};return a&&(h.placeholder=a),r.jsxs("dl",{...f,children:[r.jsx("dd",{ref:c,onPaste:p,onInput:d,onBlur:G.Blur,onKeyDown:_,contentEditable:G.ContentEditable,suppressContentEditableWarning:!0,...h}),r.jsx("canvas",{ref:s,width:"100",height:"35"})]})}function Pn({className:e,title:t,error:n,edit:a=!0,real:i,onValue:o,empty:s,name:c}){let l={n1:"",n2:"",n3:"",n4:"",n5:"",n6:"",code:""},_=x=>{if(x.preventDefault(),!a)return;x.target.textContent=x.target.textContent.slice(-1).replace(/[^+\d]/g,"");let v=window.getSelection(),k=x.target.textContent.length;if(l[x.target.id]=x.target.textContent,l.code=l.n1+""+l.n2+l.n3+l.n4+l.n5+l.n6,v.collapse(x.target.firstChild,1),k===0){x.target.blur(),x.target.focus();return}x.target.nextSibling!=null&&x.target.nextSibling.focus()},d=x=>{if(!a)return x.preventDefault();if(x.key==="Enter"&&x.preventDefault(),x.key==="Backspace"){if(x.preventDefault(),x.target.textContent="",l[x.target.id]="",x.target.previousSibling!=null){let v=x.target.previousSibling.id.slice(1);x.target.previousSibling.textContent="",l["n"+v]="",x.target.previousSibling.focus()}l.code=l.n1+""+l.n2+l.n3+l.n4+l.n5+l.n6}},p=x=>{if(!a)return x.preventDefault();if(i)o&&o({value:l.code,name:c});else if(l.code.length===6&&(x.target.blur(),o&&o({value:l.code,name:c}),s)){l={n1:"",n2:"",n3:"",n4:"",n5:"",n6:"",code:""};for(let v=1;v<=6;v++){let k=document.getElementById("n"+v);k&&(k.textContent="")}}},f=x=>{x.target.textContent=""},h=x=>{x.preventDefault(),navigator.clipboard.readText().then(v=>{var T;var k=/\d+/g;let w=(T=v.match(k))==null?void 0:T.toString();if(!w)return;let D=w.split("");for(let B=1;B<=D.length;B++){let N=document.getElementById("n"+B);N&&(N.textContent=D[B-1],l["n"+B]=D[B-1])}if(l.code=l.n1+""+l.n2+l.n3+l.n4+l.n5+l.n6,l.code.length===6&&(x.target.blur(),o&&o({value:l.code,name:c}),s)){l={n1:"",n2:"",n3:"",n4:"",n5:"",n6:"",code:""};for(let B=1;B<=6;B++){let N=document.getElementById("n"+B);N&&(N.textContent="")}}}).catch(v=>{})};const b={};return b.field="code",e&&(b.className=e),r.jsxs("dl",{...b,children:[t?r.jsx("dt",{children:t}):"",r.jsxs("div",{children:[r.jsx("dd",{id:"n1",inputMode:"numeric",onKeyDown:d,onKeyUp:p,onFocus:f,onPaste:h,onInput:_,contentEditable:!0}),r.jsx("dd",{id:"n2",inputMode:"numeric",onKeyDown:d,onKeyUp:p,onFocus:f,onPaste:h,onInput:_,contentEditable:!0}),r.jsx("dd",{id:"n3",inputMode:"numeric",onKeyDown:d,onKeyUp:p,onFocus:f,onPaste:h,onInput:_,contentEditable:!0}),r.jsx("dd",{id:"n4",inputMode:"numeric",onKeyDown:d,onKeyUp:p,onFocus:f,onPaste:h,onInput:_,contentEditable:!0}),r.jsx("dd",{id:"n5",inputMode:"numeric",onKeyDown:d,onKeyUp:p,onFocus:f,onPaste:h,onInput:_,contentEditable:!0}),r.jsx("dd",{id:"n6",inputMode:"numeric",onKeyDown:d,onKeyUp:p,onFocus:f,onPaste:h,onInput:_,contentEditable:!0})]}),n?r.jsx("em",{children:n}):""]})}function An({id:e,value:t,onValue:n,name:a,placeholder:i="",title:o="",error:s="",hide:c=!1,length:l=6,edit:_=!0,active:d=!0,after:p="",show:f=!0,view:h,onSave:b,className:x=""}){_=_!==void 0?_:!0,d=d!==void 0?d:!0;let[v,k]=m.useState(t),w=T=>{k(T),n==null||n({value:T,name:a}),b==null||b({value:T,name:a})};const D={};return D.field="color",x&&(D.className=x),r.jsx(r.Fragment,{children:h==="icon"?r.jsx("i",{"data-icon":"F043"}):r.jsxs("dl",{...D,children:[o&&r.jsx("dt",{children:o}),r.jsx("dd",{children:l>0&&Array.from(Array(l).keys()).map(T=>r.jsx("s",{active:(Number(T)===Number(v))+"",onClick:()=>w(T),style:{backgroundColor:`var(--color-${T})`}},T))}),s&&r.jsx("em",{children:s})]})})}const be={o:"_o_76l23_1",c:"_c_76l23_11",_active:"__active_76l23_41",as:"_as_76l23_94",ap:"_ap_76l23_97"};function kt({title:e,error:t,edit:n=!0,active:a=!0,className:i,placeholder:o,max:s,min:c,view:l="date",onValue:_,name:d,value:p,after:f}){let[h,b]=m.useState(p===void 0?new Date:p),x=!n&&a;m.useEffect(()=>{b(p===void 0?new Date:p)},[p]);let v=T=>{b(T),_==null||_({value:T,name:d})},k=T=>{const B=T.target.getBoundingClientRect(),N=B.left,y=B.bottom,C=B.top;de.setListener("form",r.jsx(Oo,{position:{x:N,y:C,b:y},onValue:v,date:h,max:s,min:c,className:i},new Date().getTime()))};const w={};w.field="input",i&&(w.className=i);const D={};return o&&(D.placeholder=o),x?r.jsx(r.Fragment,{}):r.jsx(r.Fragment,{children:l==="icon"?r.jsx("i",{"data-icon":"F043",className:"pointer","data-color":"_b5b9cc :506290",onClick:k}):r.jsxs("dl",{...w,children:[e&&r.jsx("dt",{children:e}),r.jsxs("dd",{onClick:k,...D,"data-edit":(n&&a)+"",children:[K.Date(h,"dd.mm.yyyy"),f]}),t&&r.jsx("em",{children:t})]})})}const Oo=({date:e,onValue:t,position:n,max:a,min:i,className:o})=>{let[s,c]=m.useState(!0),l=new Date,_=new Date(e),d={y:parseInt(l.getFullYear()),d:parseInt(l.getDate()),m:parseInt(l.getMonth())+1},p={y:parseInt(_.getFullYear()),d:parseInt(_.getDate()),m:parseInt(_.getMonth())+1},[f,h]=m.useState({y:p.y,m:p.m}),b=j=>{let $=j.getDay();return $===0&&($=7),$-1},x=["пн","вт","ср","чт","пт","сб","вс"],v=f.m-1,k=new Date(f.y,v),w=[];for(let j=0;j<b(k);j++)w.push(0);for(;k.getMonth()===v;)w.push(k.getDate()),k.setDate(k.getDate()+1);let D=()=>{c(!1)},T=()=>{y(f.m+1,f.y)},B=()=>{y(f.m-1,f.y)},N=j=>{t(f.y+"-"+K.Number(2,f.m)+"-"+K.Number(2,j)),D()},y=(j,$)=>{$=j>12?$+1:j<1?$-1:$,j=j>12?1:j<1?12:j,h({y:$,m:j})};const C=j=>d.y===f.y&&d.m===f.m&&d.d===j?{"data-active":"true"}:{},F=j=>p.y===f.y&&p.m===f.m&&p.d===j?{"data-current":"true"}:{},E=j=>{let $=!0;if(a){let U=a.getTime(),V=new Date(f.y,f.m-1,j).getTime();U<V&&($=!1)}if(i){let U=i.getTime(),V=new Date(f.y,f.m-1,j).getTime();U>V&&($=!1)}return $};let M=window.innerHeight-n.y<320?n.y-312:n.b,I=window.innerWidth-n.x<265?n.x-235:n.x;return r.jsx(r.Fragment,{children:s?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:be.o,onClick:()=>D()},new Date().getTime()),r.jsxs("div",{className:[be.c,o&&o+"-backdrop"].join(" "),style:{top:M+"px",left:I+"px"},children:[r.jsxs("s",{children:[r.jsx("i",{onClick:B,children:r.jsx("svg",{width:"16",height:"16",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"m15.09 4.594-7.646 6.553a1.126 1.126 0 0 0 0 1.708l7.647 6.552c.73.625 1.857.107 1.857-.854V5.447c0-.961-1.127-1.48-1.857-.853Z"})})}),r.jsxs("h2",{children:[K.Month(f.m).name," ",f.y]}),r.jsx("i",{onClick:T,children:r.jsx("svg",{width:"16",height:"16",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"m8.91 19.406 7.646-6.552a1.125 1.125 0 0 0 0-1.709L8.91 4.593c-.73-.625-1.857-.107-1.857.854v13.107c0 .96 1.127 1.479 1.857.852Z"})})})]}),r.jsxs("div",{"grid-calendar":"",children:[x.map((j,$)=>r.jsx("p",{children:j},"v"+$)),w.map((j,$)=>r.jsx("span",{children:j!==0&&E(j)?r.jsx("b",{...C(j),...F(j),onClick:()=>N(j),children:j}):r.jsx("p",{...C(j),...F(j),children:j!==0?j:""})},$))]})]})]}):""})};function Ct({value:e,onValue:t,name:n,placeholder:a="",title:i,error:o,hide:s=!1,edit:c=!0,show:l=!0,active:_=!0,after:d="",view:p,modal:f,module:h,options:b,className:x}){let[v,k]=m.useState(e),w=B=>{if(!(c&&_)||!f)return;let N=f.split(".");g.Modal.Open(N[0],N[1],{callback:y=>{t&&t({value:y,name:n}),k(y)},onValue:t,options:b,name:n,value:e})};const D={};D.field="input",x&&(D.className=x);const T={};return a&&(T.placeholder=a),s?r.jsx(r.Fragment,{}):r.jsxs("dl",{...D,children:[i&&r.jsx("dt",{children:i}),r.jsx("dd",{...T,onClick:w,edit:(c&&_)+"","data-after":d,children:v}),o&&r.jsx("em",{children:o})]})}function jt({value:e,onValue:t,name:n,placeholder:a="",title:i="",error:o="",hide:s=!1,edit:c=!0,active:l=!0,after:_="",show:d=!0,course:p=100,view:f,type:h,onSave:b,className:x="",isClear:v=!1}){let k=!!(s&&(e===""||e===void 0));e=K.isNumeric(e)?Number(e)/p:0;let w=I=>h==="multi"?I.replace(/[^+\d.+-]/g,""):I.replace(/[^+\d.]/g,""),D=(I,j)=>{let $=document.createRange(),U=window.getSelection();$.setStart(j.childNodes[0],I),$.collapse(!0),U.removeAllRanges(),U.addRange($),j.focus()},T=I=>{t==null||t({value:w(I.target.textContent)*p,name:n}),I.target.textContent=w(I.target.textContent),I.target.textContent.length>0&&D(I.target.textContent.length,I.target)},B=I=>{G.Blur(I),I.target.textContent===""&&(I.target.textContent=0),b==null||b({value:w(I.target.textContent)*p,name:n}),t==null||t({value:w(I.target.textContent)*p,name:n}),I.target.textContent=K.Money(I.target.textContent)},N=I=>{I.target.textContent=w(I.target.textContent)},y=I=>{I.currentTarget.previousElementSibling.textContent="",t==null||t({value:0,name:n})},C=I=>{I.key==="Enter"&&I.preventDefault()},F=I=>{I.preventDefault(),navigator.clipboard.readText().then(j=>{j=j.replace(/^\s*/,"").replace(/\s*$/,""),window.document.execCommand("insertText",!1,j)}).catch(j=>{})};if(!(c&&l)&&!d||!(c&&l)&&k)return"";const E={};E.field="input",x&&(E.className=x);const M={};return M.inputMode="decimal",a&&(M.placeholder=a),c&&l&&(M.edit=""),r.jsxs("dl",{...E,children:[i?r.jsx("dt",{children:i}):"",r.jsx("dd",{...M,onInput:T,onPaste:F,onBlur:B,onKeyDown:C,onFocus:N,contentEditable:c&&l?G.ContentEditable:"false",suppressContentEditableWarning:!0,"data-after":_,children:!a||e?K.Money(e):""}),v&&r.jsx("svg",{"action-type":"delete",onClick:y,viewBox:"0 0 24 24",children:r.jsx("path",{d:"M17 6L6 17M6 6L17 17"})}),o?r.jsx("em",{children:o}):""]})}function Fn({value:e,onValue:t,name:n,view:a,error:i,edit:o=!0,active:s=!0,title:c,placeholder:l="",className:_,after:d}){let[p,f]=m.useState(e);m.useEffect(()=>{f(e)},[e]);let h=v=>{f(v),t&&t({value:v,name:n})},b=v=>{if(!o||!s)return;const k=v.target.getBoundingClientRect(),w=k.left,D=k.top;de.setListener("form",r.jsx(zo,{position:{x:w,y:D},onValue:h,date:p},new Date().getTime()))};const x={};return l&&(x.placeholder=l),a==="icon"?r.jsx("i",{"data-icon":"F043",onClick:b}):r.jsxs("dl",{children:[c&&r.jsx("dt",{children:c}),r.jsx("dd",{onClick:b,...x,children:K.Date(p,"mm.yyyy")}),i&&r.jsx("em",{children:i})]})}const zo=e=>{let[t,n]=m.useState(!0),a=new Date,i=new Date(e.date),o={y:parseInt(a.getFullYear()),m:parseInt(a.getMonth())+1},s={y:parseInt(i.getFullYear()),m:parseInt(i.getMonth())+1},[c,l]=m.useState(s.y),_=()=>{n(!1)},d=()=>{l(c+1)},p=()=>{l(c-1)},f=k=>{e.onValue(c+"-"+K.Number(2,k)),_()},h=k=>o.y===s.y&&o.m===k?"_FFEB3B":"",b=Array(12).fill("").map((k,w)=>w+1),x=window.innerHeight-e.position.y+33<320?e.position.y-312:e.position.y+33,v=window.innerWidth-e.position.x<265?e.position.x-235:e.position.x;return r.jsx(r.Fragment,{children:t?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:be.o,onClick:()=>_()},new Date().getTime()),r.jsxs("div",{className:be.c,style:{top:x+"px",left:v+"px"},children:[r.jsxs("s",{children:[r.jsx("i",{onClick:p,children:r.jsx("svg",{width:"16",height:"16",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"m15.09 4.594-7.646 6.553a1.126 1.126 0 0 0 0 1.708l7.647 6.552c.73.625 1.857.107 1.857-.854V5.447c0-.961-1.127-1.48-1.857-.853Z"})})}),r.jsx("h2",{children:c}),r.jsx("i",{onClick:d,children:r.jsx("svg",{width:"16",height:"16",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"m8.91 19.406 7.646-6.552a1.125 1.125 0 0 0 0-1.709L8.91 4.593c-.73-.625-1.857-.107-1.857.854v13.107c0 .96 1.127 1.479 1.857.852Z"})})})]}),r.jsx("div",{"grid-month":"",children:b.map((k,w)=>r.jsx("span",{onClick:()=>{f(k)},color:h(k),children:r.jsx("b",{children:K.Month(k).abc})},w))})]})]}):""})};function On({id:e,value:t,onValue:n,name:a,placeholder:i="",title:o="",error:s="",hide:c=!1,edit:l=!0,active:_=!0,after:d="",show:p=!0,maxLength:f,view:h,onSave:b,className:x="",isCopy:v=!0}){let[k,w]=m.useState(!1);k=l?!0:k;let D=E=>{n==null||n({value:E.target.innerText,name:a})},T=E=>{f&&E.target.textContent.trim().length>=f&&E.key!=="Backspace"&&E.preventDefault(),E.key==="Enter"&&E.preventDefault()},B=E=>{v&&(E.preventDefault(),navigator.clipboard.writeText(E.target.textContent.trim()).then(function(){g.Notice.Copy("Данные в буфер обмене")},function(M){}))},N=E=>{E.preventDefault(),navigator.clipboard.readText().then(M=>{if(f){let I=E.target.textContent.length;if(I>=f)return;f-=I,M=M.slice(0,f)}window.document.execCommand("insertText",!1,M.replace(/(\r\n|\n|\r)/gm," "))}).catch(M=>{})};if(c)return r.jsx(r.Fragment,{});if(!(l&&_)&&!p)return"";const y={};y.field="notes",x&&(y.className=x);const C={};i&&(C.placeholder=i),l&&_&&(C.edit=""),k&&(C.open="");const F=E=>{G.Blur(E),b==null||b({value:E.target.textContent.trim(),name:a})};return r.jsxs("dl",{...y,children:[o?r.jsx("dt",{children:o}):"",r.jsx("dd",{onPaste:N,onInput:D,onBlur:F,onKeyDown:T,onContextMenu:B,contentEditable:l&&_?G.ContentEditable:"false",suppressContentEditableWarning:!0,...C,children:t}),d,s?r.jsx("em",{children:s}):""]})}function St({onValue:e,onSave:t,active:n,max:a,edit:i,title:o,error:s,show:c,hide:l,value:_,placeholder:d,className:p,maxLength:f,name:h,after:b="",before:x="",view:v}){i=i!==void 0?i:!0,n=n!==void 0?n:!0,l=!!(l&&(_===""||_===void 0))&&!(i&&n),d=d!==void 0?d:"",a=a!==void 0?a:99;let w=!1,D=E=>{e==null||e({value:E.target.textContent,name:h})},T=E=>{if(!(w&&E.which===86)){if(E.which===17||E.which===91)return w=!0;E.key!=="Backspace"&&(E.target.textContent.length===a&&E.preventDefault(),E.key==="Enter"&&E.preventDefault(),isNaN(E.key)&&E.preventDefault())}},B=E=>{if(E.which===17||E.which===91)return w=!1},N=E=>{E.preventDefault(),navigator.clipboard.readText().then(M=>{if(M=M.replace(/(?!^\+|\d)./g,""),f){let I=E.target.textContent.length;if(I>=f)return;f-=I,M=M.slice(0,f)}window.document.execCommand("insertText",!1,""+M)}).catch(M=>{})};const y=E=>{G.Blur(E),t==null||t({value:E.target.textContent,name:h})},C={};C.field="input",p&&(C.className=p);let F={};return i&&n?(F.edit="true",F.contentEditable=G.ContentEditable):F.contentEditable="false",F.inputMode="decimal",d&&(F.placeholder=d),l?r.jsx(r.Fragment,{}):r.jsxs("dl",{...C,children:[o&&r.jsx("dt",{children:o}),x,r.jsx("dd",{...F,onPaste:N,onInput:D,onBlur:y,onKeyDown:T,onKeyUp:B,suppressContentEditableWarning:!0,children:_}),b,s&&r.jsx("em",{children:s})]})}function zn({value:e,onValue:t,onSave:n,name:a,placeholder:i="",className:o,title:s,error:c,edit:l=!0,active:_=!0,reload:d=!1,native:p=!1,isShow:f=!1,maxLength:h,eyes:b=[],after:x=""}){const[v,k]=m.useState(f);let w=C=>{t&&t({value:C.target.textContent,name:a,reload:d})},D=C=>{C.key==="Enter"&&C.preventDefault()},T=C=>{C.preventDefault(),navigator.clipboard.readText().then(F=>{if(h){let E=C.target.textContent.length;if(E>=h)return;h-=E,F=F.slice(0,h)}window.document.execCommand("insertText",!1,F.replace(/(\r\n|\n|\r)/gm," "))}).catch(F=>{})},B=C=>{G.Blur(C),n==null||n({value:C.target.textContent.trim(),name:a})};const N={};N.field="password",v&&(N.show=""),o&&(N.className=o);const y={};return i&&(y.placeholder=i),p?"":r.jsxs("dl",{...N,children:[s?r.jsx("dt",{children:s}):"",r.jsx("dd",{onPaste:T,onInput:w,onKeyDown:D,onBlur:B,contentEditable:l&&_?G.ContentEditable:"false",...y,suppressContentEditableWarning:!0,children:e}),b[0]&&r.jsx("i",{onClick:()=>k(!v),children:v?b[1]:b[0]}),x,c?r.jsx("em",{children:c}):""]})}const Et={0:{name:"Heard Island and Mcdonald Islands",dial_code:"+0",code:"HM",mask:"+0(___) ___-__-__"},1:{name:"United States",dial_code:"+1",code:"US",mask:"+1(___) ___-__-__"},7:{name:"Russia",dial_code:"+7",code:"RU",mask:"+7(___) ___-__-__"},20:{name:"Egypt",dial_code:"+20",code:"EG",mask:"+20(___) ___-__-__"},27:{name:"South Africa",dial_code:"+27",code:"ZA",mask:"+27(___) __-__-__"},30:{name:"Greece",dial_code:"+30",code:"GR",mask:"+30(___) ___-__-__"},31:{name:"Netherlands",dial_code:"+31",code:"NL",mask:"+31(___) __-__-__"},32:{name:"Belgium",dial_code:"+32",code:"BE",mask:"+32(___) __-__-__"},33:{name:"France",dial_code:"+33",code:"FR",mask:"+33(___) __-__-__"},34:{name:"Spain",dial_code:"+34",code:"ES",mask:"+34(___) __-__-__"},36:{name:"Hungary",dial_code:"+36",code:"HU",mask:"+36(___) __-__-__"},39:{name:"Italy",dial_code:"+39",code:"IT",mask:"+39(___) ___-__-__"},40:{name:"Romania",dial_code:"+40",code:"RO",mask:"+40(___) __-__-__"},41:{name:"Switzerland",dial_code:"+41",code:"CH",mask:"+41(___) __-__-__"},43:{name:"Austria",dial_code:"+43",code:"AT",mask:"+43(__) ___-__-__"},44:{name:"United Kingdom",dial_code:"+44",code:"GB",mask:"+44(___) ___-__-__"},45:{name:"Denmark",dial_code:"+45",code:"DK",mask:"+45(__) __-__-__"},46:{name:"Sweden",dial_code:"+46",code:"SE",mask:"+46(___) __-__-__"},47:{name:"Svalbard and Jan Mayen",dial_code:"+47",code:"SJ",mask:"+47(__) __-__-__"},48:{name:"Poland",dial_code:"+48",code:"PL",mask:"+48(__) __-__-__"},49:{name:"Germany",dial_code:"+49",code:"DE",mask:"+49(___) ___-__-__"},51:{name:"Peru",dial_code:"+51",code:"PE",mask:"+51(___) __-__-__"},52:{name:"Mexico",dial_code:"+52",code:"MX",mask:"+52(__-__) ___-__-__"},53:{name:"Cuba",dial_code:"+53",code:"CU",mask:"+53(__) __-__-__"},54:{name:"Argentina",dial_code:"+54",code:"AR",mask:"+54(__-__) ___-__-__"},55:{name:"Brazil",dial_code:"+55",code:"BR",mask:"+55(___) ___-__-__"},56:{name:"Chile",dial_code:"+56",code:"CL",mask:"+56(___) __-__-__"},57:{name:"Colombia",dial_code:"+57",code:"CO",mask:"+57(___) ___-__-__"},58:{name:"Venezuela, Bolivarian Republic of Venezuela",dial_code:"+58",code:"VE",mask:"+58(___) ___-__-__"},60:{name:"Malaysia",dial_code:"+60",code:"MY",mask:"+60(___) __-__-__"},61:{name:"Cocos (Keeling) Islands",dial_code:"+61",code:"CC",mask:"+61(___) ___-__-__"},62:{name:"Indonesia",dial_code:"+62",code:"ID",mask:"+62(___) __-__-__"},63:{name:"Philippines",dial_code:"+63",code:"PH",mask:"+63(___) ___-__-__"},64:{name:"Pitcairn",dial_code:"+64",code:"PN",mask:"+64(___) __-__-__"},65:{name:"Singapore",dial_code:"+65",code:"SG",mask:"+65(__) __-__-__"},66:{name:"Thailand",dial_code:"+66",code:"TH",mask:"+66(___) __-__-__"},77:{name:"Kazakhstan",dial_code:"+77",code:"KZ",mask:"+77(__) ___-__-__"},81:{name:"Japan",dial_code:"+81",code:"JP",mask:"+81(___) ___-__-__"},82:{name:"Korea, Republic of South Korea",dial_code:"+82",code:"KR",mask:"+82(___) ___-__-__"},84:{name:"Vietnam",dial_code:"+84",code:"VN",mask:"+84(___) __-__-__"},86:{name:"China",dial_code:"+86",code:"CN",mask:"+86(__-__) ___-__-__"},90:{name:"Turkey",dial_code:"+90",code:"TR",mask:"+90(___) ___-__-__"},91:{name:"India",dial_code:"+91",code:"IN",mask:"+91(___) ___-__-__"},92:{name:"Pakistan",dial_code:"+92",code:"PK",mask:"+92(___) ___-__-__"},93:{name:"Afghanistan",dial_code:"+93",code:"AF",mask:"+93(__) ___-__-__"},94:{name:"Sri Lanka",dial_code:"+94",code:"LK",mask:"+94(___) __-__-__"},95:{name:"Myanmar",dial_code:"+95",code:"MM",mask:"+95(___) ___-__-__"},98:{name:"Iran, Islamic Republic of Persian Gulf",dial_code:"+98",code:"IR",mask:"+98(___) ___-__-__"},211:{name:"South Sudan",dial_code:"+211",code:"SS",mask:"+211(___) ___-__-__"},212:{name:"Morocco",dial_code:"+212",code:"MA",mask:"+212(___) __-__-__"},213:{name:"Algeria",dial_code:"+213",code:"DZ",mask:"+213(__) ___-__-__"},216:{name:"Tunisia",dial_code:"+216",code:"TN",mask:"+216(__) __-__-__"},218:{name:"Libyan Arab Jamahiriya",dial_code:"+218",code:"LY",mask:"+218(___) ___-__-__"},220:{name:"Gambia",dial_code:"+220",code:"GM",mask:"+220(___) __-__"},221:{name:"Senegal",dial_code:"+221",code:"SN",mask:"+221(___) __-__-__"},222:{name:"Mauritania",dial_code:"+222",code:"MR",mask:"+222(__) __-__-__"},223:{name:"Mali",dial_code:"+223",code:"ML",mask:"+223(__) __-__-__"},224:{name:"Guinea",dial_code:"+224",code:"GN",mask:"+224(__) __-__-__"},225:{name:"Cote d'Ivoire",dial_code:"+225",code:"CI",mask:"+225(__) __-__-__"},226:{name:"Burkina Faso",dial_code:"+226",code:"BF",mask:"+226(__) __-__-__"},227:{name:"Niger",dial_code:"+227",code:"NE",mask:"+227(__) __-__-__"},228:{name:"Togo",dial_code:"+228",code:"TG",mask:"+228(__) __-__-__"},229:{name:"Benin",dial_code:"+229",code:"BJ",mask:"+229(__) __-__-__"},230:{name:"Mauritius",dial_code:"+230",code:"MU",mask:"+230(___) __-__"},231:{name:"Liberia",dial_code:"+231",code:"LR",mask:"+231(___) __-__"},232:{name:"Sierra Leone",dial_code:"+232",code:"SL",mask:"+232(__) __-__-__"},233:{name:"Ghana",dial_code:"+233",code:"GH",mask:"+233(___) __-__-__"},234:{name:"Nigeria",dial_code:"+234",code:"NG",mask:"+234(___) ___-__-__"},235:{name:"Chad",dial_code:"+235",code:"TD",mask:"+235(__) __-__-__"},236:{name:"Central African Republic",dial_code:"+236",code:"CF",mask:"+236(__) __-__-__"},237:{name:"Cameroon",dial_code:"+237",code:"CM",mask:"+237(__) __-__-__"},238:{name:"Cape Verde",dial_code:"+238",code:"CV",mask:"+238(___) __-__"},239:{name:"Sao Tome and Principe",dial_code:"+239",code:"ST",mask:"+239(___) ___-__-__"},240:{name:"Equatorial Guinea",dial_code:"+240",code:"GQ",mask:"+240(___) __-__-__"},241:{name:"Gabon",dial_code:"+241",code:"GA",mask:"+241(__) __-__-__"},242:{name:"Congo",dial_code:"+242",code:"CG",mask:"+242(___) __-__-__"},243:{name:"Congo, The Democratic Republic of the Congo",dial_code:"+243",code:"CD",mask:"+243(___) ___-__-__"},244:{name:"Angola",dial_code:"+244",code:"AO",mask:"+244(__) ___-__-__"},245:{name:"Guinea-Bissau",dial_code:"+245",code:"GW",mask:"+245(___) __-__"},246:{name:"British Indian Ocean Territory",dial_code:"+246",code:"IO",mask:"+246(___) ___-__-__"},248:{name:"Seychelles",dial_code:"+248",code:"SC",mask:"+248(___) ___-__-__"},249:{name:"Sudan",dial_code:"+249",code:"SD",mask:"+249(___) __-__-__"},250:{name:"Rwanda",dial_code:"+250",code:"RW",mask:"+250(___) __-__-__"},251:{name:"Ethiopia",dial_code:"+251",code:"ET",mask:"+251(___) __-__-__"},252:{name:"Somalia",dial_code:"+252",code:"SO",mask:"+252(___) ___-__-__"},253:{name:"Djibouti",dial_code:"+253",code:"DJ",mask:"+253(___) ___-__-__"},254:{name:"Kenya",dial_code:"+254",code:"KE",mask:"+254(___) __-__-__"},255:{name:"Tanzania, United Republic of Tanzania",dial_code:"+255",code:"TZ",mask:"+255(___) __-__-__"},256:{name:"Uganda",dial_code:"+256",code:"UG",mask:"+256(___) __-__-__"},257:{name:"Burundi",dial_code:"+257",code:"BI",mask:"+257(__) __-__-__"},258:{name:"Mozambique",dial_code:"+258",code:"MZ",mask:"+258(___) __-__-__"},260:{name:"Zambia",dial_code:"+260",code:"ZM",mask:"+260(___) __-__-__"},261:{name:"Madagascar",dial_code:"+261",code:"MG",mask:"+261(___) __-__-__"},262:{name:"Reunion",dial_code:"+262",code:"RE",mask:"+262(___) __-__-__"},263:{name:"Zimbabwe",dial_code:"+263",code:"ZW",mask:"+263(___) __-__-__"},264:{name:"Namibia",dial_code:"+264",code:"NA",mask:"+264(___) __-__-__"},265:{name:"Malawi",dial_code:"+265",code:"MW",mask:"+265(___) __-__-__"},266:{name:"Lesotho",dial_code:"+266",code:"LS",mask:"+266(__) __-__-__"},267:{name:"Botswana",dial_code:"+267",code:"BW",mask:"+267(__) __-__-__"},268:{name:"Swaziland",dial_code:"+268",code:"SZ",mask:"+268(___) ___-__-__"},269:{name:"Comoros",dial_code:"+269",code:"KM",mask:"+269(___) __-__"},290:{name:"Saint Helena, Ascension and Tristan Da Cunha",dial_code:"+290",code:"SH",mask:"+290(___) ___-__-__"},291:{name:"Eritrea",dial_code:"+291",code:"ER",mask:"+291(___) ___-__-__"},297:{name:"Aruba",dial_code:"+297",code:"AW",mask:"+297(_) __-__-__"},298:{name:"Faroe Islands",dial_code:"+298",code:"FO",mask:"+298(__) __-__"},299:{name:"Greenland",dial_code:"+299",code:"GL",mask:"+299(__) __-__"},345:{name:"Cayman Islands",dial_code:"+ 345",code:"KY",mask:"+345(___) ___-__-__"},350:{name:"Gibraltar",dial_code:"+350",code:"GI",mask:"+350(__) __-__-__"},351:{name:"Portugal",dial_code:"+351",code:"PT",mask:"+351(___) __-__-__"},352:{name:"Luxembourg",dial_code:"+352",code:"LU",mask:"+352(___) __-__-__"},353:{name:"Ireland",dial_code:"+353",code:"IE",mask:"+353(___) __-__-__"},354:{name:"Iceland",dial_code:"+354",code:"IS",mask:"+354(___) __-__"},355:{name:"Albania",dial_code:"+355",code:"AL",mask:"+355(__) ___-__-__"},356:{name:"Malta",dial_code:"+356",code:"MT",mask:"+356(__) __-__-__"},357:{name:"Cyprus",dial_code:"+357",code:"CY",mask:"+357(__) __-__-__"},358:{name:"Finland",dial_code:"+358",code:"FI",mask:"+358(___) __-__-__"},359:{name:"Bulgaria",dial_code:"+359",code:"BG",mask:"+359(___) __-__-__"},370:{name:"Lithuania",dial_code:"+370",code:"LT",mask:"+370(_) ___-__-__"},371:{name:"Latvia",dial_code:"+371",code:"LV",mask:"+371(__) __-__-__"},372:{name:"Estonia",dial_code:"+372",code:"EE",mask:"+372(__) __-__-__"},373:{name:"Moldova",dial_code:"+373",code:"MD",mask:"+373(__) __-__-__"},374:{name:"Armenia",dial_code:"+374",code:"AM",mask:"+374(_) ___-__-__"},375:{name:"Belarus",dial_code:"+375",code:"BY",mask:"+375(__) ___-__-__"},376:{name:"Andorra",dial_code:"+376",code:"AD",mask:"+376(_) _-__-__"},377:{name:"Monaco",dial_code:"+377",code:"MC",mask:"+377(___) __-__-__"},378:{name:"San Marino",dial_code:"+378",code:"SM",mask:"+378(__) __-__-__"},379:{name:"Holy See (Vatican City State)",dial_code:"+379",code:"VA",mask:"+379(___) ___-__-__"},380:{name:"Ukraine",dial_code:"+380",code:"UA",mask:"+380(__) ___-__-__"},381:{name:"Serbia",dial_code:"+381",code:"RS",mask:"+381(__) __-__-__"},382:{name:"Montenegro",dial_code:"+382",code:"ME",mask:"+382(___) ___-__-__"},383:{name:"Kosovo",dial_code:"+383",code:"XK",mask:"+383(___) __-__"},385:{name:"Croatia",dial_code:"+385",code:"HR",mask:"+385(__) __-__-__"},386:{name:"Slovenia",dial_code:"+386",code:"SI",mask:"+386(__) __-__-__"},387:{name:"Bosnia and Herzegovina",dial_code:"+387",code:"BA",mask:"+387(__) __-__-__"},389:{name:"Macedonia",dial_code:"+389",code:"MK",mask:"+389(__) __-__-__"},420:{name:"Czech Republic",dial_code:"+420",code:"CZ",mask:"+420(___) __-__-__"},421:{name:"Slovakia",dial_code:"+421",code:"SK",mask:"+421(___) __-__-__"},423:{name:"Liechtenstein",dial_code:"+423",code:"LI",mask:"+423(___) __-__-__"},500:{name:"South Georgia and the South Sandwich Islands",dial_code:"+500",code:"GS",mask:"+500(___) ___-__-__"},501:{name:"Belize",dial_code:"+501",code:"BZ",mask:"+501(___) __-__"},502:{name:"Guatemala",dial_code:"+502",code:"GT",mask:"+502(__) __-__-__"},503:{name:"El Salvador",dial_code:"+503",code:"SV",mask:"+503(__) __-__-__"},504:{name:"Honduras",dial_code:"+504",code:"HN",mask:"+504(__) __-__-__"},505:{name:"Nicaragua",dial_code:"+505",code:"NI",mask:"+505(__) __-__-__"},506:{name:"Costa Rica",dial_code:"+506",code:"CR",mask:"+506(__) __-__-__"},507:{name:"Panama",dial_code:"+507",code:"PA",mask:"+507(__) __-__-__"},508:{name:"Saint Pierre and Miquelon",dial_code:"+508",code:"PM",mask:"+508(___) ___-__-__"},509:{name:"Haiti",dial_code:"+509",code:"HT",mask:"+509(__) __-__-__"},590:{name:"Saint Martin",dial_code:"+590",code:"MF",mask:"+590(___) __-__-__"},591:{name:"Bolivia, Plurinational State of bolivia",dial_code:"+591",code:"BO",mask:"+591(__) __-__-__"},592:{name:"Guyana",dial_code:"+592",code:"GY",mask:"+592(___) ___-__-__"},593:{name:"Ecuador",dial_code:"+593",code:"EC",mask:"+593(___) __-__-__"},594:{name:"French Guiana",dial_code:"+594",code:"GF",mask:"+594(___) __-__-__"},595:{name:"Paraguay",dial_code:"+595",code:"PY",mask:"+595(___) __-__-__"},596:{name:"Martinique",dial_code:"+596",code:"MQ",mask:"+596(___) __-__-__"},597:{name:"Suriname",dial_code:"+597",code:"SR",mask:"+597(___) __-__"},598:{name:"Uruguay",dial_code:"+598",code:"UY",mask:"+598(__) __-__-__"},599:{name:"Netherlands Antilles",dial_code:"+599",code:"AN",mask:"+599(__) __-__-__"},670:{name:"Timor-Leste",dial_code:"+670",code:"TL",mask:"+670(__) __-__-__"},672:{name:"Norfolk Island",dial_code:"+672",code:"NF",mask:"+672(___) ___-__-__"},673:{name:"Brunei Darussalam",dial_code:"+673",code:"BN",mask:"+673(___) __-__"},674:{name:"Nauru",dial_code:"+674",code:"NR",mask:"+674(___) __-__"},675:{name:"Papua New Guinea",dial_code:"+675",code:"PG",mask:"+675(___) __-__"},676:{name:"Tonga",dial_code:"+676",code:"TO",mask:"+676(___) __-__"},677:{name:"Solomon Islands",dial_code:"+677",code:"SB",mask:"+677(___) __-__"},678:{name:"Vanuatu",dial_code:"+678",code:"VU",mask:"+678(___) __-__"},679:{name:"Fiji",dial_code:"+679",code:"FJ",mask:"+679(___) __-__"},680:{name:"Palau",dial_code:"+680",code:"PW",mask:"+680(___) ___-__-__"},681:{name:"Wallis and Futuna",dial_code:"+681",code:"WF",mask:"+681(___) ___-__-__"},682:{name:"Cook Islands",dial_code:"+682",code:"CK",mask:"+682(_) __-__"},683:{name:"Niue",dial_code:"+683",code:"NU",mask:"+683(___) ___-__-__"},685:{name:"Samoa",dial_code:"+685",code:"WS",mask:"+685(__) __-__"},686:{name:"Kiribati",dial_code:"+686",code:"KI",mask:"+686(___) ___-__-__"},687:{name:"New Caledonia",dial_code:"+687",code:"NC",mask:"+687(__) __-__"},688:{name:"Tuvalu",dial_code:"+688",code:"TV",mask:"+688(___) ___-__-__"},689:{name:"French Polynesia",dial_code:"+689",code:"PF",mask:"+689(__) __-__"},690:{name:"Tokelau",dial_code:"+690",code:"TK",mask:"+690(___) ___-__-__"},691:{name:"Micronesia, Federated States of Micronesia",dial_code:"+691",code:"FM",mask:"+691(___) ___-__-__"},692:{name:"Marshall Islands",dial_code:"+692",code:"MH",mask:"+692(___) ___-__-__"},850:{name:"Korea, Democratic People's Republic of Korea",dial_code:"+850",code:"KP",mask:"+850(___) ___-__-__"},852:{name:"Hong Kong",dial_code:"+852",code:"HK",mask:"+852(__) __-__-__"},853:{name:"Macao",dial_code:"+853",code:"MO",mask:"+853(__) __-__-__"},855:{name:"Cambodia",dial_code:"+855",code:"KH",mask:"+855(__) __-__-__"},856:{name:"Laos",dial_code:"+856",code:"LA",mask:"+856(___) ___-__-__"},880:{name:"Bangladesh",dial_code:"+880",code:"BD",mask:"+880(___) ___-__-__"},886:{name:"Taiwan",dial_code:"+886",code:"TW",mask:"+886(___) __-__-__"},960:{name:"Maldives",dial_code:"+960",code:"MV",mask:"+960(___) __-__"},961:{name:"Lebanon",dial_code:"+961",code:"LB",mask:"+961(__) __-__-__"},962:{name:"Jordan",dial_code:"+962",code:"JO",mask:"+962(___) __-__-__"},963:{name:"Syrian Arab Republic",dial_code:"+963",code:"SY",mask:"+963(___) __-__-__"},964:{name:"Iraq",dial_code:"+964",code:"IQ",mask:"+964(___) ___-__-__"},965:{name:"Kuwait",dial_code:"+965",code:"KW",mask:"+965(__) __-__-__"},966:{name:"Saudi Arabia",dial_code:"+966",code:"SA",mask:"+966(___) __-__-__"},967:{name:"Yemen",dial_code:"+967",code:"YE",mask:"+967(___) __-__-__"},968:{name:"Oman",dial_code:"+968",code:"OM",mask:"+968(__) __-__-__"},970:{name:"Palestinian Territory, Occupied",dial_code:"+970",code:"PS",mask:"+970(___) __-__-__"},971:{name:"United Arab Emirates",dial_code:"+971",code:"AE",mask:"+971(___) __-__-__"},972:{name:"Israel",dial_code:"+972",code:"IL",mask:"+972(___) __-__-__"},973:{name:"Bahrain",dial_code:"+973",code:"BH",mask:"+973(__) __-__-__"},974:{name:"Qatar",dial_code:"+974",code:"QA",mask:"+974(__) __-__-__"},975:{name:"Bhutan",dial_code:"+975",code:"BT",mask:"+975(__) __-__-__"},976:{name:"Mongolia",dial_code:"+976",code:"MN",mask:"+976(__) __-__-__"},977:{name:"Nepal",dial_code:"+977",code:"NP",mask:"+977(___) ___-__-__"},992:{name:"Tajikistan",dial_code:"+992",code:"TJ",mask:"+992(___) __-__-__"},993:{name:"Turkmenistan",dial_code:"+993",code:"TM",mask:"+993(__) __-__-__"},994:{name:"Azerbaijan",dial_code:"+994",code:"AZ",mask:"+994(__) ___-__-__"},995:{name:"Georgia",dial_code:"+995",code:"GE",mask:"+995(___) __-__-__"},996:{name:"Kyrgyzstan",dial_code:"+996",code:"KG",mask:"+996(___) __-__-__"},998:{name:"Uzbekistan",dial_code:"+998",code:"UZ",mask:"+998(___) __-__-__"},1242:{name:"Bahamas",dial_code:"+1242",code:"BS",mask:"+1242(___) __-__"},1246:{name:"Barbados",dial_code:"+1246",code:"BB",mask:"+1246(___) __-__"},1264:{name:"Anguilla",dial_code:"+1264",code:"AI",mask:"+1264(___) ___-__-__"},1268:{name:"Antigua and Barbuda",dial_code:"+1268",code:"AG",mask:"+1268(_) __-__"},1284:{name:"Virgin Islands, British",dial_code:"+1284",code:"VG",mask:"+1284(___) __-__"},1340:{name:"Virgin Islands, U.S.",dial_code:"+1340",code:"VI",mask:"+1340(___) ___-__-__"},1441:{name:"Bermuda",dial_code:"+1441",code:"BM",mask:"+1441(___) __-__"},1473:{name:"Grenada",dial_code:"+1473",code:"GD",mask:"+1473(___) __-__"},1649:{name:"Turks and Caicos Islands",dial_code:"+1649",code:"TC",mask:"+1649(___) ___-__-__"},1664:{name:"Montserrat",dial_code:"+1664",code:"MS",mask:"+1664(___) ___-__-__"},1670:{name:"Northern Mariana Islands",dial_code:"+1670",code:"MP",mask:"+1670(___) ___-__-__"},1671:{name:"Guam",dial_code:"+1671",code:"GU",mask:"+1671(___) ___-__-__"},1684:{name:"American Samoa",dial_code:"+1684",code:"AS",mask:"+1684(___) ___-__-__"},1758:{name:"Saint Lucia",dial_code:"+1758",code:"LC",mask:"+1758(___) __-__"},1767:{name:"Dominica",dial_code:"+1767",code:"DM",mask:"+1767(___) __-__"},1784:{name:"Saint Vincent and the Grenadines",dial_code:"+1784",code:"VC",mask:"+1784(___) __-__"},1849:{name:"Dominican Republic",dial_code:"+1849",code:"DO",mask:"+1849(___) ___-__-__"},1868:{name:"Trinidad and Tobago",dial_code:"+1868",code:"TT",mask:"+1868(___) __-__"},1869:{name:"Saint Kitts and Nevis",dial_code:"+1869",code:"KN",mask:"+1869(___) __-__"},1876:{name:"Jamaica",dial_code:"+1876",code:"JM",mask:"+1876(___) __-__"},1939:{name:"Puerto Rico",dial_code:"+1939",code:"PR",mask:"+1939(___) ___-__-__"}};function It({value:e,onValue:t,onSave:n,name:a,placeholder:i="",title:o="",error:s="",hide:c=!1,edit:l=!0,active:_=!0,after:d="",show:p=!0,view:f,className:h=""}){l=l!==void 0?l:!0,_=_!==void 0?_:!0,c=!!(c&&(e===""||e===void 0))&&!(l&&_),m.useRef(null);let x="+_(___) ___-__-__",v=!0,k=0,w=(I,j)=>{let $=document.createRange(),U=window.getSelection();$.setStart(j.childNodes[0],I),$.collapse(!0),U.removeAllRanges(),U.addRange($),j.focus()},D=I=>{let j=B(I.target.textContent);I.target.textContent=j.q,j.i=j.q.lastIndexOf(j.v.substr(-1)),j.i<j.q.length&&j.q!==x?j.i++:j.i=j.q.indexOf("_"),w(j.i,I.target),t&&t({value:j.q.replace(/\D/g,""),name:a})},T=I=>{I.preventDefault(),navigator.clipboard.readText().then(j=>{window.document.execCommand("insertText",!1,j)}).catch(j=>{})},B=I=>{let j=0,$="",U=I.replace(/\D/g,"");U===""&&(v=!0);let V=U.split(""),se="";V.forEach(We=>{v&&(se+=We,Et[se]!==void 0&&v?(v=!1,x=Et[se].mask.replace(new RegExp("[0-9]","g"),"_"),$=Et[se].code):(v&&(k=(""+se).length,x=`+${se}_(___) ___-__-__`.replace(new RegExp("[0-9]","g"),"_"),$=""),k>(""+se).length&&(v=!0,x=`+${se}_(___) ___-__-__`.replace(new RegExp("[0-9]","g"),"_"),$="")))});let we=x.replace(/\D/g,"");return we.length>=U.length&&(U=we),{q:x.replace(/[_\d]/g,function(){return U.charAt(j++)||"_"}),i:j,v:U,f:$}},N=I=>{I.preventDefault(),navigator.clipboard.writeText(I.target.textContent.replace(/\D/g,"")).then(function(){g.Notice.Copy("Данные в буфер обмене")},function(j){})},y=B(e),C=I=>{I.key==="Enter"&&I.preventDefault()};const F=I=>{G.Blur(I),n&&n({value:I.target.textContent.replace(/\D/g,""),name:a})},E={};E.field="input",h&&(E.className=h);let M={};return l&&_?(M.edit="true",M.contentEditable=G.ContentEditable):M.contentEditable="false",i&&(M.placeholder=i),d&&(M.after=d),c?r.jsx(r.Fragment,{}):r.jsxs("dl",{...E,children:[o&&r.jsx("dt",{children:o}),r.jsx("dd",{...M,onPaste:T,onInput:D,onKeyDown:C,onContextMenu:N,onBlur:F,suppressContentEditableWarning:!0,children:y.q}),s&&r.jsx("em",{children:s})]})}const Rn=({className:e,title:t,timeout:n=1e3,placeholder:a,edit:i=!0,active:o=!0,value:s,onValue:c,maxLength:l=20})=>{let _=0,d=m.useRef({textContent:s}),p=()=>{d.current.textContent.trim().length===0&&(d.current.textContent=""),clearTimeout(_),_=setTimeout(()=>{var w;return c((w=d.current)==null?void 0:w.textContent)},n)},f=()=>{d.current&&(d.current.textContent=""),c("")},h=w=>{l&&w.target.textContent.trim().length>=l&&w.key!=="Backspace"&&w.preventDefault(),w.key==="Enter"&&w.preventDefault()},b=w=>{w.preventDefault(),navigator.clipboard.readText().then(D=>{if(l){let T=w.target.textContent.length;if(T>=l)return;l-=T,D=D.slice(0,l)}window.document.execCommand("insertText",!1,D.replace(/(\r\n|\n|\r)/gm," "))}).catch(D=>{})},x=()=>{d.current.textContent=d.current.textContent.trim()};const v={};v.field="search",e&&(v.className=e);const k={};return a&&(k.placeholder=a),r.jsxs("dl",{...v,children:[t&&r.jsx("dt",{children:t}),r.jsx("dd",{ref:d,onPaste:b,onInput:p,onKeyDown:h,onBlur:x,contentEditable:i&&o?G.ContentEditable:"false",...k,suppressContentEditableWarning:!0,children:s}),r.jsx("svg",{"aria-label":"icon",onClick:f,viewBox:"0 0 24 24",children:r.jsx("path",{d:"M10.364 3a7.364 7.364 0 1 0 0 14.727 7.364 7.364 0 0 0 0-14.727v0ZM15.857 15.86 21 21.001"})}),r.jsx("svg",{"action-type":"delete",onClick:f,viewBox:"0 0 24 24",children:r.jsx("path",{d:"M17 6L6 17M6 6L17 17"})})]})};function Dt({title:e,error:t,edit:n=!0,active:a=!0,hide:i,value:o=0,onValue:s,options:c,placeholder:l="",className:_,name:d,after:p,view:f,order:h,isReload:b=!1}){var F,E;const x=m.useRef(),[v,k]=m.useState(o),[w,D]=m.useState(c);m.useEffect(()=>{k(o),D(c)},[o,c]),i=!!(i&&(o===0||((F=w==null?void 0:w[o])==null?void 0:F.n)===void 0))&&!(n&&a);let B=M=>{k(M),s&&s({value:M,name:d,reload:b})},N=M=>{if(Object.keys(w||{}).length===0||!(n&&a))return;const I=M.target.getBoundingClientRect();de.setListener("form",r.jsx(Ro,{parent:I,onValue:B,view:f,className:_,options:w,order:h},new Date().getTime()))},y={field:"select",className:_},C={onClick:N};return l&&(C.placeholder=l),p&&(C.after=p),n&&a&&(C.edit=""),i?"":r.jsxs("dl",{...y,children:[e&&r.jsx("dt",{children:e}),r.jsx("dd",{...C,ref:x,children:(E=w==null?void 0:w[v])==null?void 0:E.n}),Object.keys(w||{}).length!==0&&r.jsx("s",{children:r.jsx("svg",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"m5.25 8.625 6.75 6.75 6.75-6.75"})})}),t&&r.jsx("em",{children:t})]})}const Ro=({onValue:e,parent:t,view:n,className:a,options:i,order:o})=>{let[s,c]=m.useState(!0),l=()=>{c(!1)},_=f=>{c(!1),e(f)},d=window.innerHeight-t.y+t.height<320?t.y-312:t.y+33,p=window.innerWidth-t.x<265?t.x-235:t.x;return r.jsx(r.Fragment,{children:s?r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-select":"backdrop",onClick:l},new Date().getTime()),r.jsx("div",{className:a,"data-select":"background "+n,style:{top:d+"px",left:p+"px",width:t.width},children:r.jsx(Zo,{order:o,options:i,link:_})})]}):""})},Zo=({order:e,options:t,link:n})=>e?r.jsx("ul",{children:e.map((a,i)=>t[a].s!==0?r.jsx("li",{onClick:()=>{n(a)},children:t[a].n},i):"")}):r.jsx("ul",{children:Object.keys(t).map((a,i)=>t[a].s!==0?r.jsx("li",{onClick:()=>{n(a)},children:t[a].n},i):"")});function Nt(e){let t=()=>e.title?r.jsx("dt",{children:e.title}):"",n=()=>e.error?r.jsx("em",{children:e.error}):"",a=e.edit!==void 0?e.edit:!0,i=e.active!==void 0?e.active:!0,s=!!(e.hide&&(e.default===""||e.options[e.default]===void 0))&&!(a&&i),c=e.placeholder!==void 0?e.placeholder:"",l=h=>{d(e.options[h]),e.onValue({value:h,name:e.name})},[_,d]=m.useState(e.default!==void 0?e.options[e.default]:e.default),p=h=>{if(!(a&&i))return;const b=h.target.getBoundingClientRect();de.setListener("form",r.jsx(Uo,{parent:b,onValue:l,view:e.view,options:e.options},new Date().getTime()))};const f={};return c&&(f.placeholder=c),s?r.jsx(r.Fragment,{}):r.jsxs("dl",{"data-form":"select",children:[t(),r.jsx("dd",{onClick:p,"data-edit":(a&&i)+"",...f,children:_}),n()]})}const Uo=({onValue:e,parent:t,view:n,options:a})=>{let[i,o]=m.useState(!0),s=()=>{o(!1)},c=p=>{o(!1),e(p)},l=Object.keys(a).length*36,_=window.innerHeight-t.y+t.height<l?t.y-(l-33):t.y+33,d=window.innerWidth-t.x<265?t.x-235:t.x;return r.jsx(r.Fragment,{children:i?r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-select":"backdrop",onClick:s},new Date().getTime()),r.jsx("div",{"data-select":"background "+n,style:{top:_+"px",left:d+"px",width:t.width},children:r.jsx("ul",{children:Object.keys(a).map((p,f)=>r.jsx("li",{onClick:()=>{c(p)},children:a[p]},f))})})]}):""})};function Tt({set:e,value:t,onValue:n,name:a,placeholder:i="",title:o="",error:s="",hide:c=!1,edit:l=!0,show:_=!0,active:d=!0,after:p="",view:f,module:h,item:b,className:x=""}){let v={};switch(e){case"Input":return r.jsx(Ue,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:n,name:a,placeholder:i,className:x});case"Select":return b&&(v=ye.getSelect(parseInt(b))?ye.getSelect(parseInt(b)):{0:{s:"1",n:"не известно"}}),r.jsx(Dt,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:parseInt(t||"0"),onValue:n,name:a,placeholder:i,className:x,options:v});case"Users":return ye.getSelect("user"),r.jsx(Nt,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:n,name:a,placeholder:i,className:x,options:v});case"Date":return r.jsx(kt,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:n,name:a,placeholder:i,className:x});case"Phone":return r.jsx(It,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:n,name:a,placeholder:i,className:x});case"Number":return r.jsx(St,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:n,name:a,placeholder:i,className:x});case"Money":return r.jsx(jt,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:n,name:a,placeholder:i,className:x});case"Modal":return r.jsx(Ct,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:n,name:a||"",placeholder:i,className:x,options:v,module:h||""})}}function Zn({value:e,onValue:t,name:n,placeholder:a="",title:i="",error:o="",hide:s=!1,edit:c=!0,active:l=!0,after:_="",show:d=!0,view:p,maxLength:f,onSave:h,className:b=""}){let x=!!(s&&(e===""||e===void 0));if(!(c&&l)&&!d||!(c&&l)&&x)return"";let v=B=>{t&&t({value:B.target.innerText,name:n})},k=B=>{h&&h({value:B.target.innerText,name:n})},w=B=>{B.preventDefault(),navigator.clipboard.readText().then(N=>{if(f){let y=B.target.textContent.length;if(y>=f)return;f-=y,N=N.slice(0,f)}window.document.execCommand("insertText",!1,N)}).catch(N=>{})};const D={};D.field="text",b&&(D.className=b);const T={};return a&&(T.placeholder=a),r.jsxs("dl",{...D,children:[i&&r.jsx("dt",{children:i}),r.jsx("dd",{onPaste:w,onBlur:k,onInput:v,contentEditable:c&&l?G.ContentEditable:"false",...T,suppressContentEditableWarning:!0,children:e}),o&&r.jsx("em",{children:o})]})}function Un({value:e,onValue:t,name:n,placeholder:a="",title:i="",error:o="",hide:s=!1,edit:c=!0,active:l=!0,after:_="",show:d=!0,view:p,onSave:f,className:h=""}){let b=!!(s&&(e===""||e===void 0)),x=K.Date(e===void 0?new Date:e,"HH:MM"),v=m.useRef(null);if(!(c&&l)&&!d||!(c&&l)&&b)return"";let k=N=>{v.current.textContent=N,t&&t({value:N,name:n})},w=N=>{f&&f({value:N,name:n})},D=N=>{const y=N.target.getBoundingClientRect(),C=y.left,F=y.top;de.setListener("form",r.jsx(Wo,{positions:{x:C,y:F},onSave:w,onValue:k,date:x},new Date().getTime()))};const T={};T.field="input",h&&(T.className=h);const B={};return a&&(B.placeholder=a),r.jsx(r.Fragment,{children:p==="icon"?r.jsx("i",{"data-icon":"F043",onClick:D}):r.jsxs("dl",{...T,children:[i?r.jsx("dt",{children:i}):"",r.jsx("dd",{onClick:D,ref:v,...B,children:x}),o?r.jsx("em",{children:o}):""]})})}const Wo=({positions:e,onSave:t,onValue:n,date:a})=>{let i=a.split(":"),o={h:K.Number(2,i[0]),m:K.Number(2,i[1])},s="hour",[c,l]=m.useState({}),_=!1,d=0,p=0,f={body:m.useRef(null),time:m.useRef(null),hour:m.useRef(null),timeText:m.useRef(null),hourText:m.useRef(null)};m.useEffect(()=>{l(f.body.current.getBoundingClientRect()),f.hour.current.style.transform="rotate("+o.h*15+"deg)",f.time.current.style.transform="rotate("+o.m*6+"deg)"},[f.body,f.hour,f.time,o.m,o.h]);let h=()=>{_=!0},b=()=>{_=!1,s=s==="hour"?"time":"hour",f.body.current.setAttribute("active",s)},x=N=>{if(_){let C=Math.atan2(N.pageX-(c.x+78),N.pageY-(c.y+78))*(180/Math.PI)*-1+180;f[s].current.style.transform="rotate("+C+"deg)",s==="hour"?(o={...o,h:K.Number(2,parseInt(String(C/15),10))},f.hourText.current.textContent=o.h):(o={...o,m:K.Number(2,parseInt(String(C/6),10))},f.timeText.current.textContent=o.m),n(o.h+":"+o.m)}},v=N=>{if(s==="hour")if(N.deltaY>0){d+=N.deltaY;let y=parseInt(String(d/50));if(p!==y){p=y;let C=parseInt(o.h,10)+1;C=C>23?0:C,o={...o,h:K.Number(2,C)},f.hourText.current.textContent=o.h,f[s].current.style.transform="rotate("+o.h*15+"deg)"}}else{d-=N.deltaY;let y=parseInt(String(d/50));if(p!==y){p=y;let C=parseInt(o.h,10)-1;C=C<0?23:C,o={...o,h:K.Number(2,C)},f.hourText.current.textContent=o.h,f[s].current.style.transform="rotate("+o.h*15+"deg)"}}else if(N.deltaY>0){d+=N.deltaY;let y=parseInt(String(d/50));if(p!==y){p=y;let C=parseInt(o.m,10)+1;C=C>59?0:C,o={...o,m:K.Number(2,C)},f.timeText.current.textContent=o.m,f[s].current.style.transform="rotate("+o.m*6+"deg)"}}else{d-=N.deltaY;let y=parseInt(String(d/50));if(p!==y){p=y;let C=parseInt(o.m,10)-1;C=C<0?59:C,o={...o,m:K.Number(2,C)},f.timeText.current.textContent=o.m,f[s].current.style.transform="rotate("+o.m*6+"deg)"}}n(o.h+":"+o.m)},[k,w]=m.useState(!0),D=()=>{w(!1),t(o.h+":"+o.m)},T=window.innerHeight-e.y+33<320?e.y-312:e.y+33,B=window.innerWidth-e.x<265?e.x-235:e.x;return r.jsx(r.Fragment,{children:k?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:be.o,onClick:()=>D()},new Date().getTime()),r.jsxs("div",{className:be.c,onMouseDown:h,onMouseUp:b,onMouseMove:x,onWheel:v,ref:f.body,style:{top:T+"px",left:B+"px"},children:[r.jsx("div",{className:"b"}),r.jsxs("div",{className:"s",children:[r.jsx("span",{className:["hour",s==="hour"?be.as:be.ap].join(" "),ref:f.hourText,children:o.h})," ",":"," ",r.jsx("span",{className:["min",s==="time"?be.as:be.ap].join(" "),ref:f.timeText,children:o.m})]}),r.jsx("div",{className:"h",ref:f.hour}),r.jsx("div",{className:"t",ref:f.time})]})]}):""})};function Wn({onValue:e,label:t,value:n,title:a,className:i,name:o,text:s,id:c,reload:l}){const[_,d]=m.useState(!!n),p=t||a;m.useEffect(()=>{d(!!n)},[n]);let f=()=>{e&&e({value:_?0:1,name:o,id:c}),d(!_)};const h={};return h.field="check",i&&(h.className=i),r.jsxs("dl",{...h,children:[p?r.jsx("dt",{children:p}):"",r.jsxs("dd",{onClick:f,children:[r.jsx("span",{children:s}),r.jsx("div",{role:"switch","aria-checked":`${_?"true":"false"}`})]})]})}const Go=({label:e,onValue:t,value:n,name:a,item:i})=>{const[o,s]=m.useState(!!n);m.useEffect(()=>{s(!!n)},[n]);let c=()=>{let l=parseInt(o)===0?1:0;s(l),t({value:l,name:a,key:i,item:i})};return r.jsx("div",{role:"switch",onClick:c,"aria-checked":`${o?"true":"false"}`})},Gn=({onValue:e,value:t,name:n,item:a})=>{const[i,o]=m.useState(!!t);m.useEffect(()=>{o(!!t)},[t]);let s=()=>{let c=i?0:1;o(!!c),e({value:c,name:n,key:a,item:a})};return r.jsx("div",{role:"switch",onClick:s,"aria-checked":`${i?"true":"false"}`})};function Kn({value:e,onValue:t,name:n,placeholder:a="",title:i="",error:o="",hide:s=!1,edit:c=!0,active:l=!0,after:_="",show:d=!0,view:p,max:f=0,onSave:h,className:b="",separator:x=","}){const[v,k]=m.useState(e!==void 0?e.split(x):[]);m.useEffect(()=>{k(e!==void 0?e!==void 0?e.split(x):[]:[])},[e]);let w=()=>{if(f!==0&&v.length>=f)return g.Notice.Error("Слишком много");k([...v,""])},D=M=>{v.splice(M,1),v.length===0&&v.push(""),k([...v]),h!==void 0&&h({value:v.join(x),name:n})},T=!!(s&&(e===""||e===void 0)),B=M=>{};if(!(c&&l)&&!d||!(c&&l)&&T)return"";const N={};N.field="group",b&&(N.className=b);const y=(M,I)=>{G.Blur(M),v[I]=M.target.textContent,h&&h({value:v.join(x),name:n})};let C=(M,I)=>{v[I]=M.target.textContent,t&&t({value:v.join(x),name:n})},F=M=>{M.key==="Enter"&&M.preventDefault()};const E=({data:M})=>f!==0&&M.length>=f?"":r.jsx("i",{onClick:w,children:r.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:[r.jsx("path",{d:"M12 5.25v13.5"}),r.jsx("path",{d:"M18.75 12H5.25"})]})});return r.jsxs("dl",{...N,children:[r.jsxs("dt",{children:[i,r.jsx(E,{data:v})]}),r.jsx("dd",{children:v.map((M,I)=>r.jsxs("li",{className:"field_group_item",children:[r.jsx("span",{onInput:j=>C(j,I),edit:"true",name:n,placeholder:a,onPaste:B,contentEditable:c&&l?G.ContentEditable:"false",onKeyDown:F,onBlur:j=>y(j,I),suppressContentEditableWarning:!0,children:v[I]}),r.jsx("i",{onClick:()=>{D(I)},children:r.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:[r.jsx("path",{d:"M17.25 17.25 6.75 6.75"}),r.jsx("path",{d:"m17.25 6.75-10.5 10.5"})]})})]},I))}),o&&r.jsx("em",{children:o})]})}const Ko=e=>(e=e!==void 0&&e!==""?e.split(","):[],e.reduce((t,n)=>(t[n]=!0,t),{}));function Yn({value:e,onValue:t,name:n,placeholder:a="",title:i,error:o,hide:s=!1,edit:c=!0,show:l=!0,active:_=!0,outFormat:d="",after:p="",view:f,modal:h,module:b,options:x,className:v}){const[k,w]=m.useState(Ko(e)),D=N=>{if(!(c&&_)||!h)return;let y=h.split(".");g.Modal.Open(y[0],y[1],{callback:C=>{if(t)switch(d){case"array":t({value:Object.keys(C),name:n});break;case"string":t({value:Object.keys(C).join(","),name:n});break;default:t({value:C,name:n})}w(C)},onValue:t,options:x,name:n,value:k})},T={};T.field="group",v&&(T.className=v);const B={};return a&&(B.placeholder=a),s?r.jsx(r.Fragment,{}):r.jsxs("dl",{...T,children:[r.jsxs("dt",{children:[i,r.jsx("i",{onClick:D,children:r.jsx("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:r.jsx("path",{d:"M12 5.25v13.5M18.75 12H5.25"})})})]}),r.jsx("dd",{...B,onClick:D,edit:(c&&_)+"","data-after":p,children:Object.keys(k).map(N=>{var y;return r.jsx("div",{className:"field_group_item",children:(y=x[N])==null?void 0:y.label},N)})}),o&&r.jsx("em",{children:o})]})}function Hn({value:e,onValue:t,name:n,placeholder:a="",title:i="",link:o="",error:s="",hide:c=!1,edit:l=!0,active:_=!0,after:d="",show:p=!0,type:f,view:h,onSave:b,className:x=""}){const v=m.useId();let k=!!(c&&(e===""||e===void 0)),[w,D]=m.useState(o);if(!(l&&_)&&!p||!(l&&_)&&k)return"";const T=async N=>{if(f){let y=Ho(N,f,e||"default");t==null||t({name:n,value:y}),D(URL.createObjectURL(y))}else t==null||t({name:n,value:N}),D(URL.createObjectURL(N))},B={};return B.field="file",x&&(B.className=x),r.jsxs("dl",{...B,children:[i&&r.jsxs("dt",{children:[i," "]}),r.jsxs(Yo,{onFiles:T,children:[r.jsx("input",{id:v,type:"file",multiple:!0,onChange:N=>{N.target.files[0]&&T(N.target.files[0])}}),r.jsx("label",{htmlFor:v}),r.jsx("img",{src:w})]}),s&&r.jsx("em",{children:s})]})}const Yo=({children:e,onFiles:t})=>{const n=m.useRef(null);return m.useEffect(()=>{if(n.preventDefaults)return;n.preventDefaults=i=>{i.preventDefault(),i.stopPropagation()},n.highlight=i=>{},n.unhighlight=i=>{},n.onHandleDrop=i=>{let c=i.dataTransfer.files[0];t&&t(c)};let a=n.current;["dragenter","dragover","dragleave","drop"].forEach(i=>{a.addEventListener(i,n.preventDefaults,!1),document.body.addEventListener(i,n.preventDefaults,!1)}),["dragenter","dragover"].forEach(i=>{a.addEventListener(i,n.highlight,!1)}),["dragleave","drop"].forEach(i=>{a.addEventListener(i,n.unhighlight,!1)}),a.addEventListener("drop",n.onHandleDrop,!1)},[]),r.jsx("dd",{ref:n,children:e})},Ho=(e,t,n)=>{var a=document.getElementsByTagName("body")[0],i=document.createElement("canvas");a.appendChild(i);const o=i.getContext("2d"),s=new Image;s.addEventListener("load",()=>{o.drawImage(s,0,0,s.width,s.height);const c=t==="png"?i.toDataURL():i.toDataURL(`image/${t}`),l=qo(c,n);return i.remove(),l}),s.src=URL.createObjectURL(e)};function qo(e,t){let n=e.split(","),a=n[0].match(/:(.*?);/)[1],i=atob(n[1]),o=i.length,s=new Uint8Array(o);for(;o--;)s[o]=i.charCodeAt(o);return new File([s],t,{type:a})}function qn({name:e,value:t,title:n,style:a,className:i}){let o={field:"progress"};return a&&(o.style=a),i&&(o.className=i),r.jsxs("dl",{...o,children:[n&&r.jsx("dt",{children:n}),r.jsx("dd",{})]})}const ce={};function Jo(e){const[t,n]=m.useState({}),a=m.useRef(e);return ce.u=i=>{a.current={...a.current,[i.name]:i.value}},ce.n=i=>{a.current=i,n(Date.now())},ce.r=()=>{n(Date.now())},[a.current,ce.n]}function Xo(e){ce.u(e),e.reload&&ce.r()}function Vo(){ce.r&&ce.r()}function Qo(e){const[t,n]=m.useState({}),a=m.useRef(e);return ce.u=i=>{a.current={...a.current,[i.name]:i.value}},ce.n=i=>{Object.keys(i).length>0?Object.keys(i).forEach(o=>{a.current[o]=i[o]}):a.current={},n(Date.now())},ce.r=()=>{n(Date.now())},[a.current,ce.n]}const es={Color:An,Date:kt,Mask:Hn,Image:Hn,Code:Pn,Check:Wn,Switch:Tn,Input:Ue,Button:Bn,Message:Ln,Generator:Mn,Captcha:$n,Modal:Ct,Money:jt,Month:Fn,Notes:On,Number:St,Password:zn,Phone:It,Search:Rn,Select:Dt,Set:Tt,Textarea:Zn,Time:Un,Users:Nt,String:Ue,Form:Tt,runReload:Vo,useData:Jo,setValue:Xo,Palette:Go,Toogle:Gn,Group:Kn,Options:Yn,useError:Qo,Progress:qn};function ts({value:e="",onValue:t,onSave:n,name:a,format:i="+_(___) ___-__-__",placeholder:o="",title:s="",error:c="",hide:l=!1,edit:_=!0,active:d=!0,after:p="",show:f=!0,view:h,className:b=""}){_=_!==void 0?_:!0,d=d!==void 0?d:!0,l=!!(l&&(e===""||e===void 0))&&!(_&&d),m.useRef(null);let v=i,k=!0,w=0,D=(j,$)=>{let U=document.createRange(),V=window.getSelection();U.setStart($.childNodes[0],j),U.collapse(!0),V.removeAllRanges(),V.addRange(U),$.focus()},T=j=>{j.preventDefault(),navigator.clipboard.readText().then($=>{window.document.execCommand("insertText",!1,$)}).catch($=>{})},B=j=>{let $=0,U="",V=j.replace(/\D/g,"");V===""&&(k=!0);let se=V.split(""),we="";se.forEach(nt=>{k&&(we+=nt,k&&(w=(""+we).length,v=i.replace(new RegExp("[0-9]","g"),"_"),U=""),w>(""+we).length&&(k=!0,v=i.replace(new RegExp("[0-9]","g"),"_"),U=""))});let Le=v.replace(/\D/g,"");return Le.length>=V.length&&(V=Le),{q:v.replace(/[_\d]/g,function(){return V.charAt($++)||"_"}),i:$,v:V,f:U}},N=j=>{j.preventDefault(),navigator.clipboard.writeText(j.target.textContent.replace(/\D/g,"")).then(function(){g.Notice.Copy("Данные в буфер обмене")},function($){})},y=B(e),C=j=>{let $=B(j.target.textContent);j.target.textContent=$.q,$.i=$.q.lastIndexOf($.v.substr(-1)),$.i<$.q.length&&$.q!==v?$.i++:$.i=$.q.indexOf("_"),D($.i,j.target),t&&t({value:$.q.replace(/\D/g,""),name:a})},F=j=>{j.key==="Enter"&&j.preventDefault()};const E=j=>{G.Blur(j),n&&n({value:j.target.textContent.replace(/\D/g,""),name:a})},M={};M.field="input",b&&(M.className=b);let I={};return _&&d?(I.edit="true",I.contentEditable=G.ContentEditable):I.contentEditable="false",o&&(I.placeholder=o),p&&(I.after=p),l?r.jsx(r.Fragment,{}):r.jsxs("dl",{...M,children:[s&&r.jsx("dt",{children:s}),r.jsx("dd",{...I,onPaste:T,onInput:C,onKeyDown:F,onContextMenu:N,onBlur:E,suppressContentEditableWarning:!0,children:y.q}),c&&r.jsx("em",{children:c})]})}const ns={Color:An,Date:kt,Code:Pn,Check:Wn,Switch:Tn,Input:Ue,Button:Bn,Message:Ln,Generator:Mn,Captcha:$n,Modal:Ct,Money:jt,Mask:ts,Month:Fn,Notes:On,Number:St,Password:zn,Phone:It,Search:Rn,Select:Dt,Set:Tt,Textarea:Zn,Time:Un,Users:Nt,String:Ue,Toogle:Gn,Group:Kn,Options:Yn,Progress:qn},Jn={spinner:"_spinner_o487n_1",l:"_l_o487n_75",loadingB:"_loadingB_o487n_1"};function rs(){return r.jsx("div",{className:Jn.spinner,children:r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 483 484",children:r.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 as(){return r.jsxs("div",{className:Jn.l,children:[r.jsx("i",{}),r.jsx("i",{}),r.jsx("i",{})]})}const is={Spinner:rs,Inline:as},Xn={ph:"_ph_1wjxu_1",e:"_e_1wjxu_5"},os=({title:e,affter:t,onDynamicURL:n,children:a,button:i,page:o,tabs:s=[],className:c="",modules:l,loading:_})=>{const[d]=g.Router.useTabs(s.map(h=>h.id).includes(g.Router.getTabs())?g.Router.getTabs():o),[p,f]=m.useState(!1);return m.useEffect(()=>{f(!0)},[]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:[Xn.ph,c].join(" "),children:[r.jsx(ds,{title:e,affter:t}),r.jsx("div",{className:Xn.e}),r.jsx(ls,{button:i})]}),s.length>0&&r.jsx(vn,{list:s,active:d}),a,p&&r.jsx(ss,{onDynamicURL:n,loading:_,m:l,t:d})]})};let ss=({m:e,t,loading:n,onDynamicURL:a})=>{const i=m.lazy(()=>He(e+"/pages/"+t+".tsx"));return a&&a((e+"/"+t).toLowerCase()),r.jsx(m.Suspense,{fallback:n,children:r.jsx(i,{})})},ls=({button:e})=>{const[t,n]=m.useState(e);return xt("button",n),r.jsxs(r.Fragment,{children:[" ",t]})},ds=({title:e,affter:t})=>{const[n,a]=m.useState(r.jsxs(r.Fragment,{children:[e," ",t]}));return xt("title",a),r.jsx("h2",{children:n})};const cs={Lite:os},Vn={s:"_s_t9swc_1"};let Bt;function _s({className:e,placeholder:t}){let n=s=>{Bt(s.target.textContent)},a=s=>{s.key==="Enter"&&s.preventDefault()},i=s=>{s.preventDefault(),navigator.clipboard.readText().then(c=>{window.document.execCommand("insertText",!1,c)}).catch(c=>{})};const o={};return t&&(o.placeholder=t),o.className=e?[Vn.s,e].join(" "):Vn.s,r.jsx("div",{onPaste:i,onInput:n,onKeyDown:a,contentEditable:"plaintext-only",...o,suppressContentEditableWarning:!0})}function us(e,t,n){let a=[],i=1,o=0,s={},c=50;return s[i]=[],e.forEach(l=>{l.text.toLowerCase().indexOf(t)>-1&&a.push(l.id)}),a.forEach(l=>{o++,o<=c||(i++,o=1,s[i]=[]),s[i].push(n[l])}),s}function fs(e){Bt=e}function ms(e){Bt=e}const ps={Field:_s,Run:us,Get:fs,useValue:ms};function hs(){return r.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[r.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"}),r.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"}),r.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 gs(){return r.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[r.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"}),r.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"}),r.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 xs(){return r.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:r.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 bs={f:"_f_q3r0i_1"};let _e={};function vs(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 n={};return Object.keys(t.data).forEach(i=>{i!=="sort"&&(n[i]=t.data[i],e.take[i]="999")}),{...e,data:n,take:e.take};case"size":return{...e,size:t.size};case"take":let a={[t.list]:t.take};a={...e.take,...a},e.active=!1;for(let i in a)a[i]!=="999"&&(e.active=!0);return _e.get(a,e.active),{...e,take:a,active:e.active};case"exit":for(let i in e.take)e.take[i]="999";return _e.get&&_e.get([],!1),{...e,size:0,active:!1,take:e.take,open:!1};default:throw new Error}}function ys(){const[e,t]=m.useReducer(vs,{open:!1,view:null,data:{},take:{},size:0,active:!1});return _e.set=n=>{t({type:"data",data:n})},_e.count=n=>{t({type:"size",size:n})},_e.reset=()=>{t({type:"exit"})},r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:bs.f,onClick:()=>{t({type:"open",open:!0})},children:[r.jsx(xs,{}),e.active&&r.jsxs("i",{children:[e.size,"1"]})]}),e.open?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"filter o",onClick:()=>{t({type:"open",open:!1})}}),r.jsxs("div",{className:"filter m",children:[r.jsx("div",{className:"filter l",children:Object.keys(e.data).map(n=>r.jsx(Ss,{data:n,dispatch:t,state:e},n))}),r.jsx("div",{className:"filter b",onClick:()=>{t({type:"exit"})},children:"Убрать фильтер"})]})]}):r.jsx(r.Fragment,{})]})}function ws(e){_e.get=e}function ks(e){_e.set!==void 0&&_e.set(e)}function Cs(e){_e.reset!==void 0&&_e.reset(e)}function js(e,t,n,a){let i=[],o=1,s=0,c={},l=50;return c[o]=[],a===!0&&(Object.keys(t).forEach(_=>{Number.parseInt(t[_])!==999&&(e=e.filter(d=>Number.parseInt(d[_])===Number.parseInt(t[_])))}),Qn(e.length)),e.forEach(_=>{i.push(_.id)}),i.forEach(_=>{s++,s<=l||(o++,s=1,c[o]=[]),c[o].push(n[_])}),c}function Qn(e){_e.count(e)}function Ss({data:e,state:t,dispatch:n}){let a=()=>{n({type:"view",view:e})},i=()=>{n({type:"take",list:e,take:"999"})};return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"filter s",children:[r.jsxs("div",{onClick:a,children:[" ",t.data[e].name," "]}),t.take[e]!=="999"?r.jsx("div",{onClick:i,className:"filter x","data-icon":"F038"}):""]}),r.jsx("div",{className:"filter u","set-active":(t.view===e)+"",children:Object.keys(t.data[e].list).map((o,s)=>r.jsx(Es,{data:t.data[e].list[o],head:e,type:o,dispatch:n,state:t},s))})]})}function Es({data:e,head:t,state:n,dispatch:a,type:i}){if(i!=="999"&&e.count===void 0)return"";const o=()=>{a({type:"take",list:t,take:i})};return r.jsxs("div",{className:"filter a",onClick:o,"set-active":(n.take[t]===i)+"",children:[e.name,r.jsx("div",{className:"filter e",children:e.count})]})}const Is={Button:ys,useValue:ws,Set:ks,Run:js,Count:Qn,Reset:Cs},Ds={n:"_n_euuvm_1"};let tt={},Lt=[];const Ns=(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 n=e.news.filter(i=>i.id!==t.id);return{...e,news:n,active:n.length!==0};case"size":return{...e,size:t.size};case"take":let a={[t.list]:t.take};a={...e.take,...a},e.active=!1;for(let i in a)a[i]!=="999"&&(e.active=!0);return tt.get(a,e.active),{...e,take:a,active:e.active};case"exit":return e;default:throw new Error}};function Ts(e){tt.fn({action:"add",data:e})}function Bs(e){tt.fn({action:"add",data:e})}function Ls(e){tt.fn=e}function Ms(){const[e,t]=m.useReducer(Ns,{open:!1,active:!1,news:[],take:{}});Ls(async a=>{switch(a.action){case"add":Lt.push(a.data);break}}),m.useEffect(()=>{setInterval(()=>{Lt.forEach((a,i)=>{t({type:"add",data:{module:a.module,type:a.type,id:a.id,datetime:a.datetime,txt:a.title}}),a.datetime<new Date().getTime()&&Lt.splice(i,1)})},6e4)},[]);let n=async a=>{t({type:"hide",id:a.id})};return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Ds.n,onClick:()=>{t({type:"open",open:!0})},children:e.active?r.jsx(gs,{}):r.jsx(hs,{})}),e.open?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"notify-o",onClick:()=>{t({type:"open",open:!1})}}),r.jsxs("div",{className:"notify-m",children:[r.jsx("div",{className:"notify-l",children:e.news.map((a,i)=>r.jsx($s,{data:a,dispatch:t},i))}),r.jsx("div",{className:"notify-b",onClick:n,children:"История"})]})]}):""]})}const $s=({data:e,dispatch:t})=>{let n=async a=>{t({type:"hide",id:a.id})};return r.jsxs("div",{className:"notify-i",children:[r.jsx("div",{className:"--icon","data-icon":e.type}),r.jsxs("div",{className:"--body",children:[r.jsx("div",{className:"--name",children:e.type}),r.jsx("div",{className:"--text",children:e.txt})]}),r.jsx("div",{className:"--hide","data-icon":"F038",onClick:()=>n(e),children:" "})]})},Ps={Bell:Ms,Send:Bs,Add:Ts},er={p:"_p_djnh1_1",l:"_l_djnh1_38"};function As(e){let t=3,n=e.page,a=e.count,i=[],o=()=>{i.push({page:1}),i.push({text:"..."})},s=()=>{i.push({text:"..."}),i.push({page:a})},c=(l,_)=>{for(let d=l;d<_;d++)i.push({page:d})};return a<t*2+6?c(1,a+1):n<t*2+1?(c(1,t*2+4),s()):n>a-t*2?(t=a>1e4?1:t,o(),c(a-t*2-2,a+1)):(t=a>1e4?1:t,o(),c(n-t,n+t+1),s()),i.length===1?r.jsx(r.Fragment,{}):r.jsxs("div",{className:er.p,children:[r.jsx("i",{onClick:()=>e.onChangePage(n-1),children:r.jsx("svg",{viewBox:"0 0 24 24",children:r.jsx("path",{d:"M8.19486 5.40705C8.52237 4.96235 9.14837 4.86736 9.59306 5.19488C9.93847 5.44927 10.2668 5.70372 10.5528 5.92689C11.1236 6.3724 11.8882 6.98573 12.6556 7.65208C13.4181 8.31412 14.2064 9.04815 14.8119 9.73344C15.1136 10.0749 15.3911 10.4279 15.5986 10.7721C15.7895 11.0888 16 11.524 16 12.0001C16 12.4762 15.7895 12.9115 15.5986 13.2282C15.3911 13.5724 15.1136 13.9253 14.8119 14.2668C14.2064 14.9521 13.4181 15.6861 12.6556 16.3482C11.8882 17.0145 11.1236 17.6278 10.5528 18.0734C10.2668 18.2965 9.93847 18.551 9.59307 18.8054C9.14837 19.1329 8.52237 19.0379 8.19486 18.5932C8.0632 18.4144 7.99983 18.2064 8.00001 18.0002L8 12.0001L8 6.00007C7.99983 5.79387 8.0632 5.58581 8.19486 5.40705Z"})})}),i.map((l,_)=>{const d={};return l.page&&(d.onClick=()=>e.onChangePage(l.page)),l.page===e.page&&(d.active=""),m.createElement("span",{...d,key:_},l.page||l.text)}),r.jsx("i",{onClick:()=>e.onChangePage(n+1),children:r.jsx("svg",{viewBox:"0 0 24 24",children:r.jsx("path",{d:"M8.19486 5.40705C8.52237 4.96235 9.14837 4.86736 9.59306 5.19488C9.93847 5.44927 10.2668 5.70372 10.5528 5.92689C11.1236 6.3724 11.8882 6.98573 12.6556 7.65208C13.4181 8.31412 14.2064 9.04815 14.8119 9.73344C15.1136 10.0749 15.3911 10.4279 15.5986 10.7721C15.7895 11.0888 16 11.524 16 12.0001C16 12.4762 15.7895 12.9115 15.5986 13.2282C15.3911 13.5724 15.1136 13.9253 14.8119 14.2668C14.2064 14.9521 13.4181 15.6861 12.6556 16.3482C11.8882 17.0145 11.1236 17.6278 10.5528 18.0734C10.2668 18.2965 9.93847 18.551 9.59307 18.8054C9.14837 19.1329 8.52237 19.0379 8.19486 18.5932C8.0632 18.4144 7.99983 18.2064 8.00001 18.0002L8 12.0001L8 6.00007C7.99983 5.79387 8.0632 5.58581 8.19486 5.40705Z"})})})]})}function Fs(e,t){switch(t.type){case"load":return{...e,load:t.load,wait:!1,data:t.data,list:t.data[e.page],size:Object.keys(t.data).length};case"page":return{...e,page:t.page,list:e.data[t.page]};default:throw new Error}}function tr({load:e,list:t,item:n}){const a=m.useRef(null),[i,o]=m.useReducer(Fs,{load:!1,list:[],data:{},page:1,wait:!1,item:n});m.useEffect(()=>{t!==null&&o({type:"load",load:e,data:t})},[e]);let s=c=>{if(c===0)return c=1;if(c>i.size)return c=i.size;o({type:"page",page:c})};return m.useEffect(()=>{},[i]),r.jsxs(r.Fragment,{children:[r.jsx("div",{className:er.l,ref:a,children:r.jsx(Dn,{"el-empty":"Данные не найдены",children:i.load&&i.list!==void 0?i.list.map(c=>r.jsx(i.item,{data:c},c.id)):r.jsxs("div",{"type-data":"load",children:[r.jsx("i",{}),r.jsx("i",{}),r.jsx("i",{})]})})}),i.load&&i.list!==void 0?r.jsx(As,{page:i.page,count:i.size,onChangePage:s}):r.jsx(r.Fragment,{})]})}const Os={Pagination:tr};function zs({head:e,load:t,list:n,item:a}){const i=e;return r.jsxs(r.Fragment,{children:[r.jsx(i,{}),In.getSetting("s05")===1?r.jsx(tr,{list:n,load:t,item:a}):r.jsx(Nn,{list:n,load:t,item:a})]})}function Rs(e,t){switch(t.type){case"load":return{...e,time:Date.now(),load:t.load,list:t.list,temp:t.temp};case"filter":return{...e,list:t.list,filter:t.active,band:t.band,time:Date.now()};case"search":return{...e,time:Date.now(),list:t.list};case"triage":return{...e,time:Date.now(),list:t.list,sort:t.sort};case"noload":return{...e,load:!0,time:Date.now()};default:throw new Error}}const Mt={};function Zs(e){Mt.get=e}function Us(e){Mt.get&&Mt.get(e)}const Ws={View:zs,Reducer:Rs,useValue:Zs,Lite:Sn,setValue:Us},Gs={addDictionary:Ti,getDictionary:Mi,setDictionary:Li,current:$i};async function Ks(){let e=await dn(),t={};return Object.keys(e).forEach(n=>{t[e[n].id]={},t[e[n].id].name=e[n].a}),t}const Ys={Get:Ks},Hs=function({title:e,children:t,imp:n,button:a,page:i,tabs:o,modules:s}){const[c]=g.Router.useTabs(i),[l,_]=m.useState(!1);return m.useEffect(()=>{_(!0)},[]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"list-info",children:[r.jsx("h2",{children:e}),r.jsx("div",{className:"empty"}),r.jsx(Js,{button:a})]}),l&&r.jsx(qs,{imp:n,modules:s,t:c}),t]})};let qs=({modules:e,t})=>{const n=m.lazy(()=>He(e+"/pages/"+t+".tsx"));return r.jsx(m.Suspense,{fallback:"",children:r.jsx(n,{})})},Js=({button:e})=>{const[t,n]=m.useState(e);return de.useListener("button",n),r.jsxs(r.Fragment,{children:[" ",t]})};const Xs={Open:Si};function Vs({active:e,onActive:t,id:n,name:a}){const[i,o]=m.useState(!!e);m.useEffect(()=>{o(!!e)},[e]);let s=()=>{let c=i?0:1;o(!i),t&&t({value:c,is:!i,name:a,id:n,setActive:o})};return r.jsx("div",{role:"switch",onClick:s,"aria-checked":`${i?"true":"false"}`})}g.Action=yn,g.Animation=ci,g.Badge=No,g.Bookmarks=so,g.Browser=Gi,g.Button=xn,g.Chart=oo,g.Company=Ys,g.Component=_t,g.DataBase=Lo,g.Event=de,g.Events=de,g.Files=Fo,g.Filter=Is,g.Form=es,g.Format=K,g.HotKey=$o,g.Icon=po,g.Init=gn,g.Input=ns,g.Lang=Gs,g.Layout=cs,g.List=Ws,g.Lite=bo,g.Loading=is,g.Notifications=Ps,g.Pagination=Os,g.Phone=Xs,g.Root=jn,g.Scrolling=Nn,g.Search=ps,g.Setting=ao,g.Sistym=Mo,g.Store=ye,g.Switch=Vs,g.Tabs=Ji,g.Test=Hs,g.Triage=Eo,g.User=In,g.WebRTC=q,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elcrm",
3
- "version": "0.9.180",
3
+ "version": "0.9.181",
4
4
  "description": "React framework for creating modules for elCRM",
5
5
  "type": "module",
6
6
  "author": "MaSkal <dev@elcrm.online>",