elcrm 0.9.161 → 0.9.162

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
@@ -405,14 +405,14 @@ function Ir() {
405
405
  }
406
406
  return null;
407
407
  }
408
- var M = Object.assign, W = 0, Q, oe, je, Re, Be, Ye, Yt;
408
+ var M = Object.assign, W = 0, Q, le, je, Re, Be, Ye, Yt;
409
409
  function qt() {
410
410
  }
411
411
  qt.__reactDisabledLog = !0;
412
412
  function wa() {
413
413
  {
414
414
  if (W === 0) {
415
- Q = console.log, oe = console.info, je = console.warn, Re = console.error, Be = console.group, Ye = console.groupCollapsed, Yt = console.groupEnd;
415
+ Q = console.log, le = console.info, je = console.warn, Re = console.error, Be = console.group, Ye = console.groupCollapsed, Yt = console.groupEnd;
416
416
  var u = {
417
417
  configurable: !0,
418
418
  enumerable: !0,
@@ -445,7 +445,7 @@ function Ir() {
445
445
  value: Q
446
446
  }),
447
447
  info: M({}, u, {
448
- value: oe
448
+ value: le
449
449
  }),
450
450
  warn: M({}, u, {
451
451
  value: je
@@ -1184,27 +1184,27 @@ function gs({ children: e }) {
1184
1184
  function xs({ children: e }) {
1185
1185
  return /* @__PURE__ */ n.jsx("div", { className: re.g, children: e });
1186
1186
  }
1187
- const le = {};
1187
+ const ce = {};
1188
1188
  function vs(e) {
1189
- return e && (le.s = e), le.s;
1189
+ return e && (ce.s = e), ce.s;
1190
1190
  }
1191
1191
  function Cs(e) {
1192
- return e && (le.a = e), le.a;
1192
+ return e && (ce.a = e), ce.a;
1193
1193
  }
1194
1194
  function js(e) {
1195
- return e && (le.c = e), le.c;
1195
+ return e && (ce.c = e), ce.c;
1196
1196
  }
1197
1197
  function ys(e) {
1198
- return e && (le.h = e), le.h;
1198
+ return e && (ce.h = e), ce.h;
1199
1199
  }
1200
1200
  function ks(e) {
1201
- return e && (le.i = e), le.i;
1201
+ return e && (ce.i = e), ce.i;
1202
1202
  }
1203
1203
  function ws(e) {
1204
- return e && (le.d = e), le.d;
1204
+ return e && (ce.d = e), ce.d;
1205
1205
  }
1206
1206
  function at(e) {
1207
- return le.i(e);
1207
+ return ce.i(e);
1208
1208
  }
1209
1209
  let Qe = {};
1210
1210
  function bs({ children: e }) {
@@ -2028,11 +2028,14 @@ function zs() {
2028
2028
  }
2029
2029
  function Hs(e) {
2030
2030
  const [t, a] = g.useState(!1);
2031
- return localStorage.getItem("d") ? (async () => await ee.Load(Ft) && a(!0))() : (["a", "b", "c", "d", "e", "m", "u", "s", "q", "p"].forEach(
2031
+ return localStorage.getItem("d") ? (async () => {
2032
+ if (await ee.Load(Ft)) return a(!0);
2033
+ oe();
2034
+ })() : (["a", "b", "c", "d", "e", "m", "u", "s", "q", "p"].forEach(
2032
2035
  (s) => localStorage.removeItem(s)
2033
2036
  ), ["f"].forEach((s) => sessionStorage.removeItem(s)), ee.Reset(), a(!0)), t ? e : "";
2034
2037
  }
2035
- function ce() {
2038
+ function oe() {
2036
2039
  ["a", "b", "c", "d", "e", "m", "u", "s", "q", "p", "t"].forEach(
2037
2040
  (e) => localStorage.removeItem(e)
2038
2041
  ), ["f"].forEach((e) => sessionStorage.removeItem(e)), window.history.pushState({}, "", "/"), window.location.reload();
@@ -2058,16 +2061,16 @@ function Qs() {
2058
2061
  let e = localStorage.getItem("p");
2059
2062
  if (e !== "" && e !== "undefined" && e !== null) {
2060
2063
  let t = A.deCode(e);
2061
- return t || ce(), t;
2064
+ return t || oe(), t;
2062
2065
  } else
2063
- return ce(), !1;
2066
+ return oe(), !1;
2064
2067
  }
2065
2068
  async function ei(e, t) {
2066
2069
  jn.data[e] = t, localStorage.setItem("s", await A.enCode(jn.data));
2067
2070
  }
2068
2071
  function ti(e) {
2069
2072
  let t = localStorage.getItem("s");
2070
- return t === null ? {} : (t = A.deCode(t), t ? e !== void 0 ? t[e] : t : ce());
2073
+ return t === null ? {} : (t = A.deCode(t), t ? e !== void 0 ? t[e] : t : oe());
2071
2074
  }
2072
2075
  async function ni(e) {
2073
2076
  localStorage.setItem("m", await A.enCode({ data: e }));
@@ -2078,7 +2081,7 @@ function ai() {
2078
2081
  let t = localStorage.getItem("m");
2079
2082
  if (t === null) return !1;
2080
2083
  let a = A.deCode(t);
2081
- a || ce();
2084
+ a || oe();
2082
2085
  const r = (i, o) => {
2083
2086
  let d = o + "";
2084
2087
  for (; d.length < i; ) d = "0" + d;
@@ -2086,7 +2089,7 @@ function ai() {
2086
2089
  };
2087
2090
  return a.data.split(",").map((i) => "M" + r(2, i));
2088
2091
  } else
2089
- return ce(), !1;
2092
+ return oe(), !1;
2090
2093
  }
2091
2094
  function ri(e) {
2092
2095
  }
@@ -2106,9 +2109,9 @@ async function Hn(e, t) {
2106
2109
  let a = localStorage.getItem("c");
2107
2110
  if (a !== "" && a !== "undefined" && a !== null) {
2108
2111
  let s = await A.deCode(a);
2109
- return s || ce(), e === void 0 ? s : t ? (r = s[e][t]) == null ? void 0 : r.n : s[e];
2112
+ return s || oe(), e === void 0 ? s : t ? (r = s[e][t]) == null ? void 0 : r.n : s[e];
2110
2113
  } else
2111
- return ce(), !1;
2114
+ return oe(), !1;
2112
2115
  }
2113
2116
  async function ii(e) {
2114
2117
  xe.data = e, localStorage.setItem("q", await A.enCode(xe.data));
@@ -2140,9 +2143,9 @@ async function fi(e) {
2140
2143
  let t = localStorage.getItem("u");
2141
2144
  if (t !== "" && t !== "undefined" && t !== null) {
2142
2145
  let a = await A.deCode(t);
2143
- return a || ce(), e ? a[e] : a;
2146
+ return a || oe(), e ? a[e] : a;
2144
2147
  } else
2145
- return ce(), !1;
2148
+ return oe(), !1;
2146
2149
  }
2147
2150
  function mi() {
2148
2151
  let e = localStorage.getItem("u");
@@ -2156,7 +2159,7 @@ function hi() {
2156
2159
  if (e !== "" && e !== "undefined" && e !== null)
2157
2160
  try {
2158
2161
  let t = A.deCode(e);
2159
- return t || ce(), t;
2162
+ return t || oe(), t;
2160
2163
  } catch {
2161
2164
  return {};
2162
2165
  }
@@ -2193,11 +2196,11 @@ async function Ci(e) {
2193
2196
  let t = localStorage.getItem("t");
2194
2197
  if (t !== "" && t !== "undefined" && t !== null) {
2195
2198
  let a = await A.deCode(t);
2196
- return a || ce(), Object.keys(a).forEach((r) => {
2199
+ return a || oe(), Object.keys(a).forEach((r) => {
2197
2200
  _e[r] = a[r];
2198
2201
  }), e ? _e[e] : _e;
2199
2202
  } else
2200
- return ce(), {};
2203
+ return oe(), {};
2201
2204
  } else
2202
2205
  return e ? _e[e] : _e;
2203
2206
  }
@@ -2424,7 +2427,7 @@ const H = {
2424
2427
  setPORT: Vs,
2425
2428
  setAUTH: Js,
2426
2429
  getAUTH: Xs,
2427
- Logaut: ce,
2430
+ Logaut: oe,
2428
2431
  setMenu: ni,
2429
2432
  getMenu: ai,
2430
2433
  useSort: ri,
@@ -6361,12 +6364,12 @@ function Gt({
6361
6364
  }, N = (I) => {
6362
6365
  let k = 0, M = "", W = I.replace(/\D/g, "");
6363
6366
  W === "" && (x = !0);
6364
- let Q = W.split(""), oe = "";
6367
+ let Q = W.split(""), le = "";
6365
6368
  Q.forEach((Be) => {
6366
- x && (oe += Be, vt[oe] !== void 0 && x ? (x = !1, p = vt[oe].mask.replace(new RegExp("[0-9]", "g"), "_"), M = vt[oe].code) : (x && (y = ("" + oe).length, p = `+${oe}_(___) ___-__-__`.replace(
6369
+ x && (le += Be, vt[le] !== void 0 && x ? (x = !1, p = vt[le].mask.replace(new RegExp("[0-9]", "g"), "_"), M = vt[le].code) : (x && (y = ("" + le).length, p = `+${le}_(___) ___-__-__`.replace(
6367
6370
  new RegExp("[0-9]", "g"),
6368
6371
  "_"
6369
- ), M = ""), y > ("" + oe).length && (x = !0, p = `+${oe}_(___) ___-__-__`.replace(
6372
+ ), M = ""), y > ("" + le).length && (x = !0, p = `+${le}_(___) ___-__-__`.replace(
6370
6373
  new RegExp("[0-9]", "g"),
6371
6374
  "_"
6372
6375
  ), M = "")));
@@ -7531,8 +7534,8 @@ function Cc({
7531
7534
  }, N = (k) => {
7532
7535
  let M = 0, W = "", Q = k.replace(/\D/g, "");
7533
7536
  Q === "" && (y = !0);
7534
- let oe = Q.split(""), je = "";
7535
- oe.forEach((Ye) => {
7537
+ let le = Q.split(""), je = "";
7538
+ le.forEach((Ye) => {
7536
7539
  y && (je += Ye, y && (j = ("" + je).length, x = s.replace(new RegExp("[0-9]", "g"), "_"), W = ""), j > ("" + je).length && (y = !0, x = s.replace(new RegExp("[0-9]", "g"), "_"), W = ""));
7537
7540
  });
7538
7541
  let Re = x.replace(/\D/g, "");
package/dist/index.umd.js CHANGED
@@ -16,16 +16,16 @@
16
16
  * This source code is licensed under the MIT license found in the
17
17
  * LICENSE file in the root directory of this source tree.
18
18
  */var an;function qa(){return an||(an=1,process.env.NODE_ENV!=="production"&&function(){var e=m,t=Symbol.for("react.element"),a=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),v=Symbol.iterator,x="@@iterator";function b(u){if(u===null||typeof u!="object")return null;var S=v&&u[v]||u[x];return typeof S=="function"?S:null}var k=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(u){{for(var S=arguments.length,B=new Array(S>1?S-1:0),P=1;P<S;P++)B[P-1]=arguments[P];N("error",u,B)}}function N(u,S,B){{var P=k.ReactDebugCurrentFrame,W=P.getStackAddendum();W!==""&&(S+="%s",B=B.concat([W]));var Y=B.map(function(Z){return String(Z)});Y.unshift("Warning: "+S),Function.prototype.apply.call(console[u],console,Y)}}var T=!1,M=!1,y=!1,C=!1,E=!1,O;O=Symbol.for("react.module.reference");function I(u){return!!(typeof u=="string"||typeof u=="function"||u===r||u===o||E||u===i||u===_||u===d||C||u===h||T||M||y||typeof u=="object"&&u!==null&&(u.$$typeof===f||u.$$typeof===g||u.$$typeof===s||u.$$typeof===c||u.$$typeof===l||u.$$typeof===O||u.getModuleId!==void 0))}function L(u,S,B){var P=u.displayName;if(P)return P;var W=S.displayName||S.name||"";return W!==""?B+"("+W+")":B}function D(u){return u.displayName||"Context"}function j(u){if(u==null)return null;if(typeof u.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case r:return"Fragment";case a:return"Portal";case o:return"Profiler";case i:return"StrictMode";case _:return"Suspense";case d:return"SuspenseList"}if(typeof u=="object")switch(u.$$typeof){case c:var S=u;return D(S)+".Consumer";case s:var B=u;return D(B._context)+".Provider";case l:return L(u,u.render,"ForwardRef");case g:var P=u.displayName||null;return P!==null?P:j(u.type)||"Memo";case f:{var W=u,Y=W._payload,Z=W._init;try{return j(Z(Y))}catch{return null}}}return null}var $=Object.assign,U=0,Q,le,ve,Ne,Re,Ve,ia;function oa(){}oa.__reactDisabledLog=!0;function fl(){{if(U===0){Q=console.log,le=console.info,ve=console.warn,Ne=console.error,Re=console.group,Ve=console.groupCollapsed,ia=console.groupEnd;var u={configurable:!0,enumerable:!0,value:oa,writable:!0};Object.defineProperties(console,{info:u,log:u,warn:u,error:u,group:u,groupCollapsed:u,groupEnd:u})}U++}}function ml(){{if(U--,U===0){var u={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},u,{value:Q}),info:$({},u,{value:le}),warn:$({},u,{value:ve}),error:$({},u,{value:Ne}),group:$({},u,{value:Re}),groupCollapsed:$({},u,{value:Ve}),groupEnd:$({},u,{value:ia})})}U<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var $t=k.ReactCurrentDispatcher,Lt;function Qe(u,S,B){{if(Lt===void 0)try{throw Error()}catch(W){var P=W.stack.trim().match(/\n( *(at )?)/);Lt=P&&P[1]||""}return`
19
- `+Lt+u}}var At=!1,et;{var pl=typeof WeakMap=="function"?WeakMap:Map;et=new pl}function sa(u,S){if(!u||At)return"";{var B=et.get(u);if(B!==void 0)return B}var P;At=!0;var W=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Y;Y=$t.current,$t.current=null,fl();try{if(S){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(ie){P=ie}Reflect.construct(u,[],Z)}else{try{Z.call()}catch(ie){P=ie}u.call(Z.prototype)}}else{try{throw Error()}catch(ie){P=ie}u()}}catch(ie){if(ie&&P&&typeof ie.stack=="string"){for(var R=ie.stack.split(`
19
+ `+Lt+u}}var At=!1,et;{var pl=typeof WeakMap=="function"?WeakMap:Map;et=new pl}function sa(u,S){if(!u||At)return"";{var B=et.get(u);if(B!==void 0)return B}var P;At=!0;var W=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Y;Y=$t.current,$t.current=null,fl();try{if(S){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(oe){P=oe}Reflect.construct(u,[],Z)}else{try{Z.call()}catch(oe){P=oe}u.call(Z.prototype)}}else{try{throw Error()}catch(oe){P=oe}u()}}catch(oe){if(oe&&P&&typeof oe.stack=="string"){for(var R=oe.stack.split(`
20
20
  `),te=P.stack.split(`
21
21
  `),X=R.length-1,V=te.length-1;X>=1&&V>=0&&R[X]!==te[V];)V--;for(;X>=1&&V>=0;X--,V--)if(R[X]!==te[V]){if(X!==1||V!==1)do if(X--,V--,V<0||R[X]!==te[V]){var fe=`
22
22
  `+R[X].replace(" at new "," at ");return u.displayName&&fe.includes("<anonymous>")&&(fe=fe.replace("<anonymous>",u.displayName)),typeof u=="function"&&et.set(u,fe),fe}while(X>=1&&V>=0);break}}}finally{At=!1,$t.current=Y,ml(),Error.prepareStackTrace=W}var Me=u?u.displayName||u.name:"",Ee=Me?Qe(Me):"";return typeof u=="function"&&et.set(u,Ee),Ee}function gl(u,S,B){return sa(u,!1)}function hl(u){var S=u.prototype;return!!(S&&S.isReactComponent)}function tt(u,S,B){if(u==null)return"";if(typeof u=="function")return sa(u,hl(u));if(typeof u=="string")return Qe(u);switch(u){case _:return Qe("Suspense");case d:return Qe("SuspenseList")}if(typeof u=="object")switch(u.$$typeof){case l:return gl(u.render);case g:return tt(u.type,S,B);case f:{var P=u,W=P._payload,Y=P._init;try{return tt(Y(W),S,B)}catch{}}}return""}var Ze=Object.prototype.hasOwnProperty,la={},da=k.ReactDebugCurrentFrame;function nt(u){if(u){var S=u._owner,B=tt(u.type,u._source,S?S.type:null);da.setExtraStackFrame(B)}else da.setExtraStackFrame(null)}function xl(u,S,B,P,W){{var Y=Function.call.bind(Ze);for(var Z in u)if(Y(u,Z)){var R=void 0;try{if(typeof u[Z]!="function"){var te=Error((P||"React class")+": "+B+" type `"+Z+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof u[Z]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw te.name="Invariant Violation",te}R=u[Z](S,Z,P,B,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(X){R=X}R&&!(R instanceof Error)&&(nt(W),w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",P||"React class",B,Z,typeof R),nt(null)),R instanceof Error&&!(R.message in la)&&(la[R.message]=!0,nt(W),w("Failed %s type: %s",B,R.message),nt(null))}}}var bl=Array.isArray;function Ft(u){return bl(u)}function vl(u){{var S=typeof Symbol=="function"&&Symbol.toStringTag,B=S&&u[Symbol.toStringTag]||u.constructor.name||"Object";return B}}function yl(u){try{return ca(u),!1}catch{return!0}}function ca(u){return""+u}function _a(u){if(yl(u))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",vl(u)),ca(u)}var Ue=k.ReactCurrentOwner,wl={key:!0,ref:!0,__self:!0,__source:!0},ua,fa,Pt;Pt={};function kl(u){if(Ze.call(u,"ref")){var S=Object.getOwnPropertyDescriptor(u,"ref").get;if(S&&S.isReactWarning)return!1}return u.ref!==void 0}function jl(u){if(Ze.call(u,"key")){var S=Object.getOwnPropertyDescriptor(u,"key").get;if(S&&S.isReactWarning)return!1}return u.key!==void 0}function Cl(u,S){if(typeof u.ref=="string"&&Ue.current&&S&&Ue.current.stateNode!==S){var B=j(Ue.current.type);Pt[B]||(w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',j(Ue.current.type),u.ref),Pt[B]=!0)}}function Sl(u,S){{var B=function(){ua||(ua=!0,w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",S))};B.isReactWarning=!0,Object.defineProperty(u,"key",{get:B,configurable:!0})}}function El(u,S){{var B=function(){fa||(fa=!0,w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",S))};B.isReactWarning=!0,Object.defineProperty(u,"ref",{get:B,configurable:!0})}}var Il=function(u,S,B,P,W,Y,Z){var R={$$typeof:t,type:u,key:S,ref:B,props:Z,_owner:Y};return R._store={},Object.defineProperty(R._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(R,"_self",{configurable:!1,enumerable:!1,writable:!1,value:P}),Object.defineProperty(R,"_source",{configurable:!1,enumerable:!1,writable:!1,value:W}),Object.freeze&&(Object.freeze(R.props),Object.freeze(R)),R};function Dl(u,S,B,P,W){{var Y,Z={},R=null,te=null;B!==void 0&&(_a(B),R=""+B),jl(S)&&(_a(S.key),R=""+S.key),kl(S)&&(te=S.ref,Cl(S,W));for(Y in S)Ze.call(S,Y)&&!wl.hasOwnProperty(Y)&&(Z[Y]=S[Y]);if(u&&u.defaultProps){var X=u.defaultProps;for(Y in X)Z[Y]===void 0&&(Z[Y]=X[Y])}if(R||te){var V=typeof u=="function"?u.displayName||u.name||"Unknown":u;R&&Sl(Z,V),te&&El(Z,V)}return Il(u,R,te,W,P,Ue.current,Z)}}var Ot=k.ReactCurrentOwner,ma=k.ReactDebugCurrentFrame;function Te(u){if(u){var S=u._owner,B=tt(u.type,u._source,S?S.type:null);ma.setExtraStackFrame(B)}else ma.setExtraStackFrame(null)}var zt;zt=!1;function Rt(u){return typeof u=="object"&&u!==null&&u.$$typeof===t}function pa(){{if(Ot.current){var u=j(Ot.current.type);if(u)return`
23
23
 
24
24
  Check the render method of \``+u+"`."}return""}}function Nl(u){return""}var ga={};function Tl(u){{var S=pa();if(!S){var B=typeof u=="string"?u:u.displayName||u.name;B&&(S=`
25
25
 
26
- Check the top-level render call using <`+B+">.")}return S}}function ha(u,S){{if(!u._store||u._store.validated||u.key!=null)return;u._store.validated=!0;var B=Tl(S);if(ga[B])return;ga[B]=!0;var P="";u&&u._owner&&u._owner!==Ot.current&&(P=" It was passed a child from "+j(u._owner.type)+"."),Te(u),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',B,P),Te(null)}}function xa(u,S){{if(typeof u!="object")return;if(Ft(u))for(var B=0;B<u.length;B++){var P=u[B];Rt(P)&&ha(P,S)}else if(Rt(u))u._store&&(u._store.validated=!0);else if(u){var W=b(u);if(typeof W=="function"&&W!==u.entries)for(var Y=W.call(u),Z;!(Z=Y.next()).done;)Rt(Z.value)&&ha(Z.value,S)}}}function Ml(u){{var S=u.type;if(S==null||typeof S=="string")return;var B;if(typeof S=="function")B=S.propTypes;else if(typeof S=="object"&&(S.$$typeof===l||S.$$typeof===g))B=S.propTypes;else return;if(B){var P=j(S);xl(B,u.props,"prop",P,u)}else if(S.PropTypes!==void 0&&!zt){zt=!0;var W=j(S);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",W||"Unknown")}typeof S.getDefaultProps=="function"&&!S.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Bl(u){{for(var S=Object.keys(u.props),B=0;B<S.length;B++){var P=S[B];if(P!=="children"&&P!=="key"){Te(u),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",P),Te(null);break}}u.ref!==null&&(Te(u),w("Invalid attribute `ref` supplied to `React.Fragment`."),Te(null))}}var ba={};function va(u,S,B,P,W,Y){{var Z=I(u);if(!Z){var R="";(u===void 0||typeof u=="object"&&u!==null&&Object.keys(u).length===0)&&(R+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var te=Nl();te?R+=te:R+=pa();var X;u===null?X="null":Ft(u)?X="array":u!==void 0&&u.$$typeof===t?(X="<"+(j(u.type)||"Unknown")+" />",R=" Did you accidentally export a JSX literal instead of a component?"):X=typeof u,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",X,R)}var V=Dl(u,S,B,W,Y);if(V==null)return V;if(Z){var fe=S.children;if(fe!==void 0)if(P)if(Ft(fe)){for(var Me=0;Me<fe.length;Me++)xa(fe[Me],u);Object.freeze&&Object.freeze(fe)}else w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else xa(fe,u)}if(Ze.call(S,"key")){var Ee=j(u),ie=Object.keys(S).filter(function(Ol){return Ol!=="key"}),Zt=ie.length>0?"{key: someKey, "+ie.join(": ..., ")+": ...}":"{key: someKey}";if(!ba[Ee+Zt]){var Pl=ie.length>0?"{"+ie.join(": ..., ")+": ...}":"{}";w(`A props object containing a "key" prop is being spread into JSX:
26
+ Check the top-level render call using <`+B+">.")}return S}}function ha(u,S){{if(!u._store||u._store.validated||u.key!=null)return;u._store.validated=!0;var B=Tl(S);if(ga[B])return;ga[B]=!0;var P="";u&&u._owner&&u._owner!==Ot.current&&(P=" It was passed a child from "+j(u._owner.type)+"."),Te(u),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',B,P),Te(null)}}function xa(u,S){{if(typeof u!="object")return;if(Ft(u))for(var B=0;B<u.length;B++){var P=u[B];Rt(P)&&ha(P,S)}else if(Rt(u))u._store&&(u._store.validated=!0);else if(u){var W=b(u);if(typeof W=="function"&&W!==u.entries)for(var Y=W.call(u),Z;!(Z=Y.next()).done;)Rt(Z.value)&&ha(Z.value,S)}}}function Ml(u){{var S=u.type;if(S==null||typeof S=="string")return;var B;if(typeof S=="function")B=S.propTypes;else if(typeof S=="object"&&(S.$$typeof===l||S.$$typeof===g))B=S.propTypes;else return;if(B){var P=j(S);xl(B,u.props,"prop",P,u)}else if(S.PropTypes!==void 0&&!zt){zt=!0;var W=j(S);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",W||"Unknown")}typeof S.getDefaultProps=="function"&&!S.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Bl(u){{for(var S=Object.keys(u.props),B=0;B<S.length;B++){var P=S[B];if(P!=="children"&&P!=="key"){Te(u),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",P),Te(null);break}}u.ref!==null&&(Te(u),w("Invalid attribute `ref` supplied to `React.Fragment`."),Te(null))}}var ba={};function va(u,S,B,P,W,Y){{var Z=I(u);if(!Z){var R="";(u===void 0||typeof u=="object"&&u!==null&&Object.keys(u).length===0)&&(R+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var te=Nl();te?R+=te:R+=pa();var X;u===null?X="null":Ft(u)?X="array":u!==void 0&&u.$$typeof===t?(X="<"+(j(u.type)||"Unknown")+" />",R=" Did you accidentally export a JSX literal instead of a component?"):X=typeof u,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",X,R)}var V=Dl(u,S,B,W,Y);if(V==null)return V;if(Z){var fe=S.children;if(fe!==void 0)if(P)if(Ft(fe)){for(var Me=0;Me<fe.length;Me++)xa(fe[Me],u);Object.freeze&&Object.freeze(fe)}else w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else xa(fe,u)}if(Ze.call(S,"key")){var Ee=j(u),oe=Object.keys(S).filter(function(Ol){return Ol!=="key"}),Zt=oe.length>0?"{key: someKey, "+oe.join(": ..., ")+": ...}":"{key: someKey}";if(!ba[Ee+Zt]){var Pl=oe.length>0?"{"+oe.join(": ..., ")+": ...}":"{}";w(`A props object containing a "key" prop is being spread into JSX:
27
27
  let props = %s;
28
28
  <%s {...props} />
29
29
  React keys must be passed directly to JSX without using spread:
30
30
  let props = %s;
31
- <%s key={someKey} {...props} />`,Zt,Ee,Pl,Ee),ba[Ee+Zt]=!0}}return u===r?Bl(V):Ml(V),V}}function $l(u,S,B){return va(u,S,B,!0)}function Ll(u,S,B){return va(u,S,B,!1)}var Al=Ll,Fl=$l;$e.Fragment=r,$e.jsx=Al,$e.jsxs=Fl}()),$e}process.env.NODE_ENV==="production"?ot.exports=Ha():ot.exports=qa();var n=ot.exports;const Ja={notice:"_notice_13j98_2",error:"_error_13j98_11",success:"_success_13j98_14",remark:"_remark_13j98_17",copy:"_copy_13j98_20","show-notice":"_show-notice_13j98_1","hide-notice":"_hide-notice_13j98_1"};let pe={};function Le({data:e}){let[t,a]=m.useState("show");m.useEffect(()=>{e.hide&&(setTimeout(function(){a("hide")},1800),setTimeout(function(){pe.del(e.key)},2500))},[e.key]);let r,i;switch(e.type){case"error":r=n.jsx(Ce.error,{}),i="Ошибка:";break;case"success":r=n.jsx(Ce.success,{}),i="Информация:";break;case"copy":r=n.jsx(Ce.success,{}),i="Копирование:";break;case"remark":r=n.jsx(Ce.success,{}),i="Подсказка:";break;default:r=n.jsx(Ce.success,{}),i="Предупреждение:";break}return n.jsxs("li",{className:"item "+e.type,"data-status":t,children:[r,n.jsx("b",{children:i}),n.jsx("p",{children:e.text})]})}function Xa({data:e}){let[t,a]=m.useState("show");return m.useEffect(()=>{e.hide&&(setTimeout(function(){a("hide")},1800),setTimeout(function(){pe.del(e.key)},2500))},[e.key]),n.jsx("li",{className:"item","data-status":t,children:e.text})}const Ce={};Ce.error=()=>n.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[n.jsx("path",{d:"M12 22C7.28595 22 4.92893 22 3.46447 20.5355C2 19.0711 2 16.714 2 12C2 7.28595 2 4.92893 3.46447 3.46447C4.92893 2 7.28595 2 12 2C16.714 2 19.0711 2 20.5355 3.46447C22 4.92893 22 7.28595 22 12C22 16.714 22 19.0711 20.5355 20.5355C19.0711 22 16.714 22 12 22Z",fill:"#bb2014"}),n.jsx("path",{d:"M8.96967 8.96967C9.26256 8.67678 9.73744 8.67678 10.0303 8.96967L12 10.9394L13.9697 8.96969C14.2626 8.6768 14.7374 8.6768 15.0303 8.96969C15.3232 9.26258 15.3232 9.73746 15.0303 10.0303L13.0607 12L15.0303 13.9697C15.3232 14.2625 15.3232 14.7374 15.0303 15.0303C14.7374 15.3232 14.2625 15.3232 13.9696 15.0303L12 13.0607L10.0304 15.0303C9.73746 15.3232 9.26258 15.3232 8.96969 15.0303C8.6768 14.7374 8.6768 14.2626 8.96969 13.9697L10.9394 12L8.96967 10.0303C8.67678 9.73744 8.67678 9.26256 8.96967 8.96967Z",fill:"#fff"})]}),Ce.success=()=>n.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[n.jsx("path",{d:"M12 22C7.28595 22 4.92893 22 3.46447 20.5355C2 19.0711 2 16.714 2 12C2 7.28595 2 4.92893 3.46447 3.46447C4.92893 2 7.28595 2 12 2C16.714 2 19.0711 2 20.5355 3.46447C22 4.92893 22 7.28595 22 12C22 16.714 22 19.0711 20.5355 20.5355C19.0711 22 16.714 22 12 22Z",fill:"#367738"}),n.jsx("path",{d:"M16.0303 8.96967C16.3232 9.26256 16.3232 9.73744 16.0303 10.0303L11.0303 15.0303C10.7374 15.3232 10.2626 15.3232 9.96967 15.0303L7.96967 13.0303C7.67678 12.7374 7.67678 12.2626 7.96967 11.9697C8.26256 11.6768 8.73744 11.6768 9.03033 11.9697L10.5 13.4393L14.9697 8.96967C15.2626 8.67678 15.7374 8.67678 16.0303 8.96967Z",fill:"#fff"})]}),p.Notice=void 0,(e=>{function t(){let[l,_]=m.useState([]);return pe.set=d=>{_([...l,d])},pe.del=d=>{_(l.filter(g=>g.key!==d))},l.length===0?"":n.jsx("ul",{id:"notice",className:Ja.notice,children:l.map(d=>d.item)})}e.Init=t;function a(l,_=!0){let d=Date.now(),g={key:d,text:l,hide:_,type:"error"};pe.set({item:n.jsx(Le,{data:g},d),key:d})}e.Error=a;function r(l,_=!0){let d=Date.now(),g={key:d,text:l,hide:_,type:"success"};pe.set({item:n.jsx(Le,{data:g},d),key:d})}e.Success=r;function i(l,_=!0){let d=Date.now(),g={key:d,hide:_,text:l};pe.set({item:n.jsx(Xa,{data:g},d),key:d})}e.Custom=i;function o(l){let _=Date.now(),d={key:_,hide:!0,...l};pe.set({item:n.jsx(Le,{data:d},_),key:_})}e.Send=o;function s(l,_=!0){let d=Date.now(),g={key:d,text:l,hide:_,type:"remark"};pe.set({item:n.jsx(Le,{data:g},d),key:d})}e.Remark=s;function c(l,_=!0){let d=Date.now(),g={key:d,text:l,hide:_,type:"copy"};pe.set({item:n.jsx(Le,{data:g},d),key:d})}e.Copy=c})(p.Notice||(p.Notice={}));const st={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 Ae={};const Va=({data:e,callback:t,cancel:a})=>(e.button=e.button===void 0?"Подтвердить":e.button,n.jsxs("div",{className:st.alerts,children:[n.jsxs("dl",{children:[n.jsx("dt",{children:e.title}),n.jsx("dd",{children:e.text}),n.jsx("ul",{children:n.jsx("button",{color:e.color||"blue",onClick:()=>{t(),Ae.del()},children:e.button})})]}),n.jsx("div",{className:st["--body"],onClick:()=>{a==null||a(),Ae.del()}})]}));p.Alert=void 0,(e=>{function t(){let[i,o]=m.useState("");return Ae.set=s=>o(s),Ae.del=()=>o(""),n.jsx(n.Fragment,{children:i})}e.Init=t;function a(i,o,s){Ae.set(n.jsx(Va,{data:i,callback:o,cancel:s}))}e.Send=a;function r({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 n.jsxs("div",{className:st.al,..._,children:[n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",fillRule:"evenodd",clipRule:"evenodd",children:n.jsx("path",{fill:"#fff",d:"M10.362 2.015C11.4264 1.66167 12.5736 1.66167 13.638 2.015C14.6981 2.36687 15.5304 3.20141 16.3665 4.37395C17.1999 5.5426 18.1208 7.17206 19.3078 9.2725L19.3544 9.35496C20.5417 11.4557 21.4625 13.0851 22.0364 14.4065C22.613 15.7343 22.9002 16.8807 22.6711 17.9821C22.4403 19.0911 21.8714 20.0995 21.0428 20.8617C20.2162 21.622 19.0907 21.9428 17.6736 22.0968C16.2645 22.25 14.4212 22.25 12.0488 22.25H11.9513C9.57882 22.25 7.73554 22.25 6.32642 22.0968C4.90927 21.9428 3.78379 21.622 2.95722 20.8617C2.12862 20.0995 1.55968 19.0911 1.32895 17.9821C1.0998 16.8807 1.387 15.7343 1.96365 14.4065C2.53752 13.0851 3.45835 11.4557 4.64558 9.35495L4.69218 9.2725L4.69218 9.27249C5.87921 7.17206 6.80008 5.5426 7.63347 4.37395C8.46963 3.20141 9.30194 2.36687 10.362 2.015ZM11 17C11 16.4477 11.4457 16 11.9955 16H12.0045C12.5543 16 13 16.4477 13 17C13 17.5523 12.5543 18 12.0045 18H11.9955C11.4457 18 11 17.5523 11 17ZM11 13C11 13.5523 11.4477 14 12 14C12.5523 14 13 13.5523 13 13V9C13 8.44772 12.5523 8 12 8C11.4477 8 11 8.44772 11 9V13Z"})}),n.jsx("span",{children:i}),s&&n.jsx("button",{onClick:d,children:s.label})]})}e.Line=r})(p.Alert||(p.Alert={}));function Qa({children:e}){return n.jsx("div",{className:"l",children:n.jsx("ul",{children:e})})}const ae={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 er({children:e}){return n.jsx("div",{className:ae.s,children:e})}function tr({children:e,viev:t="row",className:a}){let r={};return a&&(r.className=a),n.jsx("ul",{className:[ae.f,ae[t],r.className].join(" "),children:e})}function nr({children:e}){return n.jsx("div",{className:ae.c,children:e})}function ar({children:e}){return n.jsx("div",{className:ae.g,children:e})}const oe={};function rr(e){return e&&(oe.s=e),oe.s}function ir(e){return e&&(oe.a=e),oe.a}function or(e){return e&&(oe.c=e),oe.c}function sr(e){return e&&(oe.h=e),oe.h}function lr(e){return e&&(oe.i=e),oe.i}function dr(e){return e&&(oe.d=e),oe.d}function We(e){return oe.i(e)}let Ge={};function cr({children:e}){return n.jsx(n.Fragment,{children:e})}p.Modal=void 0,(e=>{function t(){let[l,_]=m.useState([]);return Ge.x=d=>{_(d?l.filter(g=>g.key!==d):[])},Ge.add=(d,g=Date.now())=>{_([...l,{key:g,item:d}])},n.jsx(n.Fragment,{children:l.map(d=>d.item)})}e.Init=t,e.List=Qa,e.Scroll=er,e.Form=tr,e.Center=nr,e.Column=ar;function a(l,_,d){We(`${l}/modal/${_}.tsx`).then(g=>{g.default.Open(d)})}e.Open=a;function r({type:l,name:_,params:d}){let[g,f]=m.useState(null);return m.useEffect(()=>{We(`${l}/modal/${_}.tsx`).then(h=>{f(h.default.Icon(d))})},[d.id]),n.jsx(n.Fragment,{children:g})}e.Icon=r;function i(l,_){Ge.add(n.jsx(cr,{children:l},String(Date.now())),_)}e.Add=i;function o(l){Ge.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:g,size:f="m",className:h="",shake:v=!0,menu:x}){const[b,k]=m.useState(!0),w=m.useRef(),N=M=>{if(d){if(d.onClick)return M(!1),d.onClick({setOpen:k});if(d.onSend)return d.onSend({setOpen:k,disabled:M})}},T=()=>{if(!v)return k(!1);w.current.setAttribute("shake",!0),setTimeout(()=>{w.current.setAttribute("shake",!1)},1e3)};return b?n.jsxs("div",{className:`${ae.modal}`,children:[n.jsx("div",{className:ae.o,onClick:T}),n.jsxs("div",{className:[ae.w,ae[`s${f}`],h].join(" "),ref:w,children:[n.jsxs("div",{className:ae.h,children:[n.jsx("div",{className:ae.t,children:l}),n.jsxs("div",{className:ae.m,children:[g&&n.jsx("nav",{children:g.map((M,y)=>n.jsx("span",{onClick:M.onClick,className:M.active?"active":"",children:M.name},y))}),x]}),n.jsx("div",{className:ae.x,onClick:()=>{k(!1)},children:n.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:n.jsx("path",{d:"M19.0005 4.99988L5.00045 18.9999M5.00045 4.99988L19.0005 18.9999",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),_,d!==void 0?n.jsx(wn,{label:d.label,onSend:N,className:ae.btn}):""]})]}):""}e.Main=c})(p.Modal||(p.Modal={}));let Fe={};const _r=({content:e,position:t,orientation:a="up",update:r,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(a){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"},[r]),n.jsx("div",{ref:o,className:"tooltip",children:e})};p.Tooltip=void 0,(e=>{e.Init=()=>{let[t,a]=m.useState("");return Fe.set=r=>a(r),Fe.del=()=>a(""),n.jsx(n.Fragment,{children:t})},e.Text=({content:t,children:a,className:r,textAlign:i="center",orientation:o="down",dev:s,...c})=>{const l=d=>{c.element?Fe.set(n.jsx(c.element,{content:t,position:d.currentTarget.getBoundingClientRect(),textAlign:i,update:Date.now()})):Fe.set(n.jsx(_r,{update:Date.now(),orientation:o,content:t,textAlign:i,position:d.currentTarget.getBoundingClientRect()}))},_=()=>{s||Fe.del()};return n.jsx("span",{className:r,onMouseOver:l,onMouseOut:_,children:a})}})(p.Tooltip||(p.Tooltip={}));const rn={key:"Y0zt37HgOx-BY7SQjYVmrqhPkO41Ii2Jcb9yydUDPf6"},on=async()=>window.crypto.subtle.importKey("jwk",{kty:"oct",k:rn.key,alg:"A256GCM",ext:!0},{name:"AES-GCM",length:256},!1,["encrypt","decrypt"]),ur=e=>new TextDecoder().decode(e),fr=async(e,t,a)=>{const r=await window.crypto.subtle.decrypt({name:"AES-GCM",iv:a},t,e);return ur(r)},sn=e=>{const t=window.atob(e),a=new ArrayBuffer(t.length),r=new Uint8Array(a);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return a},mr=e=>new TextEncoder().encode(e),pr=()=>window.crypto.getRandomValues(new Uint8Array(12)),ln=e=>btoa(String.fromCharCode.apply(null,new Uint8Array(e))),gr=async e=>{let t=await on();const a=mr(e),r=pr(),i=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:r},t,a);return`${ln(r)}${ln(i)}`};p.Crypto=void 0,(e=>{e.setKey=async t=>{rn.key=t},e.enCode=async t=>gr(t),e.deCode=async t=>{try{let a=await on(),r=t.substring(0,16),i=t.substring(16,t.length),o=await fr(sn(i),a,sn(r)),s=JSON.parse(o);return s||!1}catch{return!1}}})(p.Crypto||(p.Crypto={}));const z={},F={},lt={defaultModules:""};p.Router=void 0,(e=>{async function t({defaultModules:y}){lt.defaultModules=y;let C=sessionStorage.getItem("f");if(C){if(C=await p.Crypto.deCode(C),!C)return!1;F.id=C.id,F.tab=C.tab,F.page=C.page,F.module=C.module,F.time=C.time,F.payment={active:!0},F.module_admin=C.module_admin}else F.id=0,F.tab="",F.page="Main",F.module=lt.defaultModules}e.Load=t;function a(){F.id=0,F.tab="",F.page="Main",F.module=lt.defaultModules}e.Reset=a;function r(){const[y,C]=m.useState(o()),E=O=>{C(O)};return z.page=E,[y]}e.usePage=r;async function i(y,C=!0){F.page=y,sessionStorage.setItem("f",await p.Crypto.enCode(F)),z.dynamicURL&&z.dynamicURL(F),C&&z.page(y)}e.setPage=i;function o(){return F.page}e.getPage=o;function s(y){return F.page===y}e.isPage=s;function c(y){if(typeof y!="function"){const[C,E]=m.useState(y||_()),O=I=>{E(I)};return z.module=O,[C]}else z.module=y}e.useModule=c;async function l(y,C=!0){F.module=y,sessionStorage.setItem("f",await p.Crypto.enCode(F)),z.dynamicURL&&z.dynamicURL(F),C&&z.module(y)}e.setModule=l;function _(){return F.module}e.getModule=_;function d(y){return F.module===y}e.isModule=d;function g(y){if(typeof y!="function"){const[C,E]=m.useState(y||h());return z.tabs=E,[C]}else z.tabs=y}e.useTabs=g;async function f(y,C=!0){if(F.tab=y,sessionStorage.setItem("f",await p.Crypto.enCode(F)),z.dynamicURL&&z.dynamicURL(F),!!C)if(z.tabs)z.tabs(y);else throw new Error("useTabs not found")}e.setTabs=f;function h(){return F.tab}e.getTabs=h;function v(y){return F.tab===y}e.isTabs=v;function x(y){if(typeof y!="function"){const[C,E]=m.useState(y||w()),O=I=>{E(I)};return z.id=O,[C]}else z.id=y}e.useId=x;function b(y){z.id=y}e.subId=b;async function k(y,C=!0){F.id=y,sessionStorage.setItem("f",await p.Crypto.enCode(F)),z.dynamicURL&&z.dynamicURL(F),C&&z.id(y)}e.setId=k;function w(){return F.id}e.getId=w;function N(y){return Number(F.id)===y}e.isId=N;async function T(y,C,E){F.module=y,F.id=E,F.tab=C,sessionStorage.setItem("f",await p.Crypto.enCode(F)),z.dynamicURL&&z.dynamicURL(F),z.module(y),z.tabs(C)}e.Path=T;async function M(y,C,E,O){var I,L,D;if(F.page===y)if(F.module===C){if(F.tab=E||"",F.id=O||0,F.tab==="")return;(I=z.tabs)==null||I.call(z,E)}else F.module=C,F.tab=E||"",F.id=O||0,(L=z.module)==null||L.call(z,C);else F.module=C,F.tab=E||"",F.id=O||0,F.page=y,(D=z.page)==null||D.call(z,y);sessionStorage.setItem("f",await p.Crypto.enCode(F)),z.dynamicURL&&z.dynamicURL(F)}e.Push=M})(p.Router||(p.Router={}));function hr(e,t){t===void 0?(t=e,e=new Date):e=new Date(e);let a={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 r in a)t=t.replace(r,a[r]);return t}function xr(e){let t=["Января","Февраля","Марта","Апреля","Мая","Июня","Июля","Августа","Сентября","Октября","Ноября","Декабря"],a=new Date(e);return{day:(""+a.getFullYear()).slice(-2)+""+("0"+(a.getMonth()+1)).slice(-2)+("0"+a.getDate()).slice(-2),name:a.getDate()+" "+t[a.getMonth()]}}const br=e=>{function t(N,T){var M,C,y;N=N??"",T=T??1;for(var M=[],y=0,C=N.length;y<C;)M.push(N.slice(y,y+=T));return M}function a(N,T){var M=[2,0,1,1,1,2];return T[N>4&&N<20?2:M[Math.min(N,5)]]}var r={null:"ноль",a1:["один","два","три","четыре","пять","шесть","семь","восемь","девять"],a2:["одна","две","три","четыре","пять","шесть","семь","восемь","девять"],a10:["десять","одиннадцать","двенадцать","тринадцать","четырнадцать","пятнадцать","шестнадцать","семнадцать","восемнадцать","девятнадцать"],a20:["двадцать","тридцать","сорок","пятьдесят","шестьдесят","семьдесят","восемьдесят","девяносто"],a100:["сто","двести","триста","четыреста","пятьсот","шестьсот","семьсот","восемьсот","девятьсот"],uc:["копейка","копейки","копеек"],ur:["рубль","рубля","рублей"],u3:["тысяча","тысячи","тысяч"],u2:["миллион","миллиона","миллионов"],u1:["миллиард","миллиарда","миллиардов"]},i,o,s,c,b,l,_,x,d,g,f,h;d=parseFloat(e).toFixed(2).split("."),l=d[0],c=d[1];var v=12-l.length;if(v<0)return!1;for(var x=[];v--;)x.push("0");l=x.join("")+l;var b=[];if(l>0){g=t(l,3);for(var k=-1;k<g.length;k++)if(_=g[k],_>0&&(f=t(_,1),i=parseInt(f[0]),o=parseInt(f[1]),s=parseInt(f[2]),b.push(r.a100[i-1]),h=k+1==3?"a2":"a1",o>1?b.push(r.a20[o-2]+(s>0?" "+r[h][s-1]:"")):b.push(o>0?r.a10[s]:r[h][s-1]),g.length>k+1)){var w=r["u"+(k+1)];b.push(a(_,w))}}else b.push(r.null);return b.push(a(l,r.ur)),b.push(c+" "+a(c,r.uc)),b.join(" ").replace(RegExp(" {2,}","g")," ").trimLeft()};function vr(e){let t=-1,a=[" kB"," MB"," GB"," TB","PB","EB","ZB","YB"];do e=e/1024,t++;while(e>1024);return Math.max(e,.1).toFixed(1)+a[t]}function yr(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 wr(e,t,a,r){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("-"),g=0,f=d.length;g<f;g++)d[g]=this.word(d[g],c,l,_);return d.join("-")}if(s.match(/^[А-ЯЁ]\.?$/i))return s;this.init();var h=this.rules[l];let v;return h.exceptions&&(v=this.pick(s,c,_,h.exceptions,!0),v)?v:(v=this.pick(s,c,_,h.suffixes,!1),v||s)},pick:function(s,c,l,_,d){let g=s.toLowerCase();for(var f=0,h=_.length;f<h;f++)if(this.ruleMatch(g,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,g=l.test.length;d<g;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,g=_.length;d<g;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],a=o[3],i.fullNameSurnameLast=!0):(e=o[1],t=o[3],a=o[5])}return i.ln=e,i.fn=t||"",i.mn=a||"",i.sex=r||i.getSex(),i}function kr(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 jr(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 Cr(e,t){return t&&(e=Number(e)/t),parseFloat(e).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g,"$1 ")}function Sr(e,t){let a=t+"";for(;a.length<e;)a="0"+a;return a}function Er(e,t,a){let r=t/e*a;return(typeof r!="number"||r===1/0)&&(r=0),parseFloat(r).toFixed(1)}function Ir(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Dr(e,t){e=Math.abs(e)%100;let a=e%10;return e>10&&e<20?t[2]:a>1&&a<5?t[1]:a===1?t[0]:t[2]}const dn={},cn={},de={},ge={};let ye="",dt="M06",me={};function Nr(e){dt=e}function Tr(){return dt}function Mr(e){const[t,a]=m.useState(!1);return localStorage.getItem("d")?(async()=>await p.Router.Load(dt)&&a(!0))():(["a","b","c","d","e","m","u","s","q","p"].forEach(i=>localStorage.removeItem(i)),["f"].forEach(i=>sessionStorage.removeItem(i)),p.Router.Reset(),a(!0)),t?e:""}function se(){["a","b","c","d","e","m","u","s","q","p","t"].forEach(e=>localStorage.removeItem(e)),["f"].forEach(e=>sessionStorage.removeItem(e)),window.history.pushState({},"","/"),window.location.reload()}function Br(e){return localStorage.setItem("d",e)}function $r(){let e=localStorage.getItem("d");return e!==""&&e!=="undefined"&&e!==null?e:""}function Lr(e){return localStorage.setItem("a",e)}function Ar(){let e=localStorage.getItem("a");return e!==""&&e!=="undefined"&&e!==null?e:""}async function Fr(e){localStorage.setItem("p",await p.Crypto.enCode(e))}function Pr(){let e=localStorage.getItem("p");if(e!==""&&e!=="undefined"&&e!==null){let t=p.Crypto.deCode(e);return t||se(),t}else return se(),!1}async function Or(e,t){dn.data[e]=t,localStorage.setItem("s",await p.Crypto.enCode(dn.data))}function zr(e){let t=localStorage.getItem("s");return t===null?{}:(t=p.Crypto.deCode(t),t?e!==void 0?t[e]:t:se())}async function Rr(e){localStorage.setItem("m",await p.Crypto.enCode({data:e}))}function Zr(){let e=localStorage.getItem("m");if(e!==""&&e!=="undefined"&&e!==null){let t=localStorage.getItem("m");if(t===null)return!1;let a=p.Crypto.deCode(t);a||se();const r=(o,s)=>{let c=s+"";for(;c.length<o;)c="0"+c;return c};return a.data.split(",").map(o=>"M"+r(2,o))}else return se(),!1}function Ur(e){}async function _n(e){let t=localStorage.getItem("b");t=t===null?{}:p.Crypto.deCode(t),t[p.Router.getTabs()]=e,localStorage.setItem("b",await p.Crypto.enCode(t))}function ct(){let e=localStorage.getItem("b");return e===null?{}:(e=p.Crypto.deCode(e),e=e[p.Router.getTabs()],e=e===void 0?{active:1,sort:"<"}:e,e)}async function Wr(e){localStorage.setItem("c",await p.Crypto.enCode(e))}async function un(e,t){var r;let a=localStorage.getItem("c");if(a!==""&&a!=="undefined"&&a!==null){let i=await p.Crypto.deCode(a);return i||se(),e===void 0?i:t?(r=i[e][t])==null?void 0:r.n:i[e]}else return se(),!1}async function Gr(e){ge.data=e,localStorage.setItem("q",await p.Crypto.enCode(ge.data))}async function Kr(e,t){ge.data={...ge.data,[e]:t},localStorage.setItem("q",await p.Crypto.enCode(ge.data))}function Pe(e,t){if(!ge.data){let a=localStorage.getItem("q");a&&(ge.data=p.Crypto.deCode(a))}return e===void 0&&t===void 0?ge.data:e!==void 0&&t===void 0?ge.data[e]:ge.data[e][t]}function Yr(e){cn.data=e}function Hr(e){return cn.data[e]}function qr(e){}function Jr(){}async function Xr(e){localStorage.setItem("u",await p.Crypto.enCode(e))}async function Vr(e){let t=localStorage.getItem("u");if(t!==""&&t!=="undefined"&&t!==null){let a=await p.Crypto.deCode(t);return a||se(),e?a[e]:a}else return se(),!1}function Qr(){let e=localStorage.getItem("u");return e!==""&&e!=="undefined"&&e!==null?p.Crypto.deCode(e):!1}async function fn(e){localStorage.setItem("e",await p.Crypto.enCode(e))}function ei(){let e=localStorage.getItem("e");if(e!==""&&e!=="undefined"&&e!==null)try{let t=p.Crypto.deCode(e);return t||se(),t}catch{return{}}else return{}}function ti(e){const t=async a=>{let r=localStorage.getItem(a);if(r!==""&&r!=="undefined"&&r!==null)try{let i=await p.Crypto.deCode(r);if(!i)return;me[a]={is:!0,time:i.time,data:i.data}}catch{me[a]={is:!1,time:0,data:{}}}else me[a]={is:!1,time:0,data:{}}};e.forEach(a=>t(a))}function ni(e){return me[e]===void 0?(me[e]={data:{},time:0},{data:{},time:0}):me[e]}async function ai(e,t){me[e]={data:t.data,time:t.time},localStorage.setItem(e,await p.Crypto.enCode(me[e]))}async function ri(e,t){de[e]=t,localStorage.setItem("t",await p.Crypto.enCode(de))}async function ii(e){if(Object.keys(de).length===0){let t=localStorage.getItem("t");if(t!==""&&t!=="undefined"&&t!==null){let a=await p.Crypto.deCode(t);return a||se(),Object.keys(a).forEach(r=>{de[r]=a[r]}),e?de[e]:de}else return se(),{}}else return e?de[e]:de}async function oi(e){if(Object.keys(de).length===0){let t=localStorage.getItem("t");if(t!==""&&t!=="undefined"&&t!==null){let a=await p.Crypto.deCode(t);return a?(Object.keys(a).forEach(r=>{de[r]=a[r]}),!!de[e]):!1}else return!1}else return!!de[e]}async function si(e,t,a){me[e].time=a,me[e].data[t.item][t.name]=t.value,localStorage.setItem(e,await p.Crypto.enCode(me[e]))}function li(){var a;let t=(a=new URLSearchParams(window.location.search.substring(1)).get("devmod"))==null?void 0:a.trim();if(t)try{return JSON.parse(t||"{}")}catch{return p.Notice.Error("Error parse devMod"),{}}}function mn(){return ye===""?(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))!=-1?(ye="Opera","Opera"):navigator.userAgent.indexOf("Edg")!=-1?(ye="Edg","Edg"):navigator.userAgent.indexOf("Chrome")!=-1?(ye="Chrome","Chrome"):navigator.userAgent.indexOf("Safari")!=-1?(ye="Safari","Safari"):navigator.userAgent.indexOf("Firefox")!=-1?(ye="Firefox","Firefox"):(ye="unknown","unknown"):ye}function di(e){return mn()===e}function ci(e,t,a){return Pe(e,t)?Pe(e,t).n:a||""}function _i(e,t,a,r){return Pe(e,t)?Pe(e,t)[a]:r||""}function ui(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=Math.random()*16|0,a=e=="x"?t:t&3|8;return a.toString(16)})}function fi(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 mi(e,t){return e.reduce(function(a,r){let i=t instanceof Function?t(r):r[t];return a[i]!==void 0||(a[i]={}),a[i][r.id]=r,a},{})}function pi(e){return parseInt((Date.now()-new Date(e).getTime())/31536e6+"")+""}function gi(e){return["number","string"].includes(typeof e)?!isNaN(Number(e))&&!isNaN(parseFloat(e)):!1}function hi(e){var t="",a={а:"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 r=0;r<e.length;++r)a[e[r]]==null?t+=e[r]:t+=a[e[r]];return t}function xi(e,t,a=!1){return a?e.sort((r,i)=>i[t]-r[t]):e.sort((r,i)=>r[t]-i[t])}function bi(e,t){return e.reduce(function(a,r){let i=t instanceof Function?t(r):r[t];return a[i]!==void 0||(a[i]={}),a[i][r.id]=r,a},{})}function vi(e,t,a=!1){return a?e.sort((r,i)=>new Date(i[t]).getTime()-new Date(r[t]).getTime()):e.sort((r,i)=>new Date(r[t]).getTime()-new Date(i[t]).getTime())}function yi(e,t){return e.reduce((a,r)=>a+(r[t]||0),0)}function wi(e,t,a,r=!1){return r?e.sort((i,o)=>a(o[t])-a(i[t])):e.sort((i,o)=>a(i[t])-a(o[t]))}function ki(e){return{style:{background:`var(--color-${e})`}}}const K={Age:pi,ArraySort:xi,ArrayGroup:bi,ArraySortDate:vi,ArraySortFunction:wi,ArraySumma:yi,Translit:hi,Date:hr,ColorBackground:ki,MoneyString:br,DateSort:xr,UUID:ui,Size:vr,TypeFiles:yr,Cases:wr,Initials:kr,Month:jr,Money:Cr,Number:Sr,Percent:Er,CapitalizeFirstLetter:Ir,DeclensionWord:Dr,Select:ci,SelectParams:_i,ObjectByArray:mi,isNumeric:gi,Week:fi,set:(e,t)=>{K[e]=t}},ji={Counter:({before:e,from:t=0,to:a,secund:r=3})=>{const i=m.useRef();return m.useEffect(()=>{i.s=!0;const o=1e3,s=a/(r*10);i.n=0;let c=o/(a/s),l=e?e+" ":"";return i.i=setInterval(()=>{if(!i.s)return i.current.textContent=`${l}`+K.Money(a),clearInterval(i.i);if(a===0)return i.current.textContent=`${l}`+K.Money(a),clearInterval(i.i);i.n=i.n+s,i.n>a&&i.n>=a&&(i.n=a,clearInterval(i.i)),i.current&&(i.current.textContent=`${l}`+K.Money(i.n))},c),()=>{i.s=!1,clearInterval(i.i)}},[t,a]),n.jsx("span",{ref:i})}},be={setSSID:Br,getSSID:$r,getPORT:Pr,setPORT:Fr,setAUTH:Lr,getAUTH:Ar,Logaut:se,setMenu:Rr,getMenu:Zr,useSort:Ur,setSort:_n,getSort:ct,setCompany:Wr,getCompany:un,setSelect:Gr,addSelect:Kr,getSelect:Pe,setApi:Yr,getApi:Hr,setPayment:qr,getPayment:Jr,setUser:Xr,isUser:Qr,getUser:Vr,getDefaultModules:Tr,getBase:ni,setBase:ai,isData:oi,setData:ri,getData:ii,editBase:si,loadBase:ti,devMod:li,isBrowser:di,getBrowser:mn},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"},pn=({title:e,left:t,right:a,children:r})=>n.jsxs("div",{className:re.h,children:[n.jsx("div",{className:re.t,children:e}),t&&n.jsx("div",{className:re.hl,children:t}),a&&n.jsx("div",{className:re.hr,children:a}),r]}),gn=({children:e,...t})=>n.jsx("div",{className:re.l,children:e}),hn=({children:e})=>n.jsx("div",{className:re.s,children:e}),xn=({children:e,edit:t})=>{const a={};return t&&(a.edit=""),n.jsx("div",{...a,className:re.f,children:e})};function bn({children:e}){return n.jsx("div",{className:re.g,children:e})}const Ci=({children:e,className:t,title:a})=>n.jsxs("div",{className:[re.o,t].join(" "),children:[a&&n.jsx("div",{className:re.hh,children:a}),e]}),Si=({children:e})=>n.jsx("div",{className:re.u,children:e}),Ei=({children:e})=>n.jsx("div",{className:re.c,children:e}),Ii=({children:e})=>n.jsx("div",{className:re.m,children:e}),Di=p.Alert.Line,_t={Header:pn,Section:hn,Group:bn,Form:xn,List:gn,A:Di,U:Si,G:bn,C:Ei,L:gn,O:Ci,S:hn,H:pn,M:Ii,F:xn},Ni=(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(a=>a.id===t.data.id?Object.assign({},a,{[t.data.name]:t.data.value}):a),temp:e.temp.map(a=>a.id===t.data.id?Object.assign({},a,{[t.data.name]:t.data.value}):a)};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(a=>a.id!==t.id)};case"edit":return{...e,list:e.list.map(a=>a.id===t.j.item?Object.assign({},a,{[t.j.name]:t.j.value}):a)};default:return e}},Ti=()=>({load:!0,list:[],name:"Файлы",add:!1,search:!1,revers:!0}),Mi=()=>{let[e,t]=m.useState([]);return n.jsx(n.Fragment,{children:e.length!==0?n.jsxs("div",{className:"upload view",children:[n.jsxs("div",{className:"--head",children:[n.jsx("b",{children:"Загрузки"}),n.jsx("i",{className:"x",onClick:()=>t([]),"data-icon":"F038"})]}),n.jsx("div",{className:"--list",children:e.map(a=>a)})]}):""})},Bi=({id:e,name:t,listen:a,dir:r})=>{t=t||"Файлы";const[i,o]=m.useReducer(Ni,{},Ti),s=()=>{p.Modal.Add(n.jsx($i,{dir:r,dispatch:o,id:e},new Date().getTime()))};return m.useEffect(()=>{},[e,r]),n.jsxs(_t.O,{children:[" ",n.jsx(_t.H,{title:t,right:n.jsx("i",{className:"f025","data-icon":"C005 25 pointer","data-color":"_b5b9cc :506290",onClick:s}),left:n.jsx("i",{className:"f025","data-icon":"E009 25","data-color":"_2196f3"})}),n.jsx("ul",{"data-empty":"Файлов нет",className:"files_list",children:i.load?n.jsxs("div",{"type-load":"load",children:[n.jsx("i",{}),n.jsx("i",{}),n.jsx("i",{})]}):i.list.length===0?n.jsx(n.Fragment,{}):i.list.map((c,l)=>n.jsx(Li,{dispatch:o,data:c},l))})]})},$i=({id:e,dir:t,dispatch:a})=>{let[r,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)})},[]),n.jsx(n.Fragment,{children:r?n.jsx(n.Fragment,{children:n.jsx("div",{className:"modal o ",onClick:p.Modal.Shake,children:n.jsxs("div",{className:"b",children:[n.jsx("div",{className:"h",children:"Загрузка файлов"}),n.jsx("div",{className:"x","data-icon":"F038",onClick:()=>{i(!1)}}),n.jsxs("div",{className:"upload",ref:o,children:[n.jsx("input",{type:"file",id:"fileElem",name:"files",multiple:!0}),n.jsx("dd",{}),n.jsx("i",{"data-icon":"F061"})]})]})},new Date().getTime())}):""})},Li=({data:e,dispatch:t})=>{let a=async()=>{let o=await(await fetch(p.Api.url().files+"/yandex/data/"+e.id,{headers:{"Content-type":"application/json;charset=utf-8",SSID:be.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()}},r=async()=>{(await(await fetch(p.Api.url().files+"/yandex/delete/"+e.id,{headers:{"Content-type":"application/json;charset=utf-8",SSID:be.getSSID()||""}})).json()).status==="success"&&(t({type:"delete",id:e.id}),p.Notice.Send({type:"success",text:"Файл успешно удалён"}))};return n.jsxs("li",{children:[n.jsx("div",{className:"f035",children:K.TypeFiles(e.type)}),n.jsx("div",{className:"f100",children:K.Date(e.uDate,"dd.mm.yy")}),n.jsx("div",{className:"f000",children:e.name}),n.jsxs("div",{className:"f050 flex button",children:[n.jsx("i",{className:"f025","data-icon":"F060 35 pointer","data-color":"_b5b9cc :4CAF50",onClick:a}),n.jsx("i",{className:"f025","data-icon":"F048 35 pointer","data-color":"_b5b9cc :FF9800",onClick:r})]}),n.jsx("div",{className:"f080",children:K.Size(e.size)})]})},Ke={setSetting:Or,getSetting:zr};let q={};q.list=ei(),q.active=null;const Ai=()=>{var i;let[e,t]=m.useState([]),[a,r]=m.useState(Ke.getSetting("s03"));return m.useEffect(()=>{(async()=>{let o=Object.keys(q.list);if(o.length!==0){let s=[];o.forEach((c,l)=>{s.push({item:n.jsx(ut,{data:q.list[c]},q.list[c].id),link:q.list[c].link})}),t(s)}})()},[]),q.active=o=>{var s;r(o),(s=document.querySelector("app-body"))==null||s.setAttribute("bookmarks",o===1?"bottom":"")},q.set=o=>{t([...e,{item:n.jsx(ut,{data:o},o.id),link:o.link}])},q.del=o=>{e.forEach((s,c)=>{s.link===o&&e.splice(c,1)}),t([...e])},(i=document.querySelector("app-body"))==null||i.setAttribute("bookmarks",a===1&&e.length!==0?"bottom":""),a!==0?n.jsx(n.Fragment,{children:e.length!==0?n.jsx("div",{className:"bookmarks",children:e.map(o=>o.item)}):""}):""},Fi=({id:e,type:t,name:a})=>{let r=t+"-"+e,[i,o]=m.useState(q.list[r]!==void 0);m.useEffect(()=>{o(q.list[r]!==void 0)},[r]);let s=()=>{q.list[r]!==void 0?(q.del(r),delete q.list[r],fn(q.list),o(!1),p.Notice.Send({type:"success",text:"Запись удален из закладок"})):(q.list[r]={id:e,name:a,type:t,link:r},q.set(q.list[r]),fn(q.list),o(!0),p.Notice.Send({type:"success",text:"Запись добавлен в закладки"}))};return n.jsx(n.Fragment,{children:Ke.getSetting("s03")!==0?n.jsx("i",{"data-icon":"C018","data-color":i?"_F44333 :F44333":"_b5b9cc :F44333",onClick:s}):""})},ut=({data:e})=>{let t=r=>{r.preventDefault(),delete q.list[e.link],q.del(e.link)},a=()=>{p.Router.setId(e.id)};return n.jsx("span",{onContextMenu:t,onClick:a,children:e.name})},Pi=e=>{q.active(e)},H={},ft={},A={};A.config={iceServers:[{url:"stun:stun.l.google.com:19302"}]},A.constraints={optional:[{DtlsSrtpKeyAgreement:!0}]},A.other=[],A.users={},A.asset=0,A.remoute=!1,A.stream=null,A.user=0,A.connect=!1,A.offer=null,A.btnRefuse=null,A.time=!1;let Se;Se=document.createElement("audio"),Se.setAttribute("autoplay","true"),Se.setAttribute("muted","true"),H.start=async e=>{A.rtc=new RTCPeerConnection(A.config),A.other=[],A.remoute=!1,A.rtc.onicecandidate=a=>{a.candidate&&A.other.push(a.candidate)},A.rtc.ontrack=a=>{if(a.streams&&a.streams[0])Se.srcObject=a.streams[0];else{let r=new MediaStream(a.track);Se.srcObject=r}};const t=await navigator.mediaDevices.getUserMedia({video:!1,audio:{echoCancellation:!1,autoGainControl:!0}});t.getTracks().forEach(a=>{A.rtc.addTrack(a,t)}),A.rtc.onconnectionstatechange=()=>{A.rtc.connectionState},A.rtc.ontrack=async a=>{if(a.streams&&a.streams[0])Se.srcObject=a.streams[0];else{let r=new MediaStream(a.track);Se.srcObject=r}},A.rtc.onaddstream=a=>{},A.rtc.onnegotiationneeded=a=>{},A.rtc.oniceconnectionstatechange=a=>{},A.rtc.onsignalingstatechange=a=>{},A.rtc.onicegatheringstatechange=a=>{},A.rtc.onicecandidateerror=a=>{},A.rtc.ondatachannel=a=>{},A.rtc.onerror=a=>{},e()},H.useListener=e=>{ft.rtc=e},H.setListener=e=>{ft.rtc&&ft.rtc(e)},H.callTo=async e=>{H.start(async()=>{const t=await A.rtc.createOffer();await A.rtc.setLocalDescription(t),A.uid=e})},H.callIn=async e=>{A.asset=e.id,A.offer=e.offer,A.uid=e.id},H.callRise=async()=>{H.start(async()=>{A.rtc.setRemoteDescription(new RTCSessionDescription(JSON.parse(atob(A.offer))));const e=await A.rtc.createAnswer();await A.rtc.setLocalDescription(e)})},H.callOk=async e=>{A.asset=e.id;const t=new RTCSessionDescription(JSON.parse(atob(e.answer)));await A.rtc.setRemoteDescription(t)},H.IceCandidate=async e=>{e.candidate.forEach(t=>{A.rtc.addIceCandidate(new RTCIceCandidate(t))})},H.callFrom=async()=>{},H.callNo=()=>{A.asset=0,A.time=!1,A.rtc&&A.rtc.close(),H.setListener({type:"state",data:"closed"})},H.callOf=()=>{A.asset=0,A.time=!1,A.rtc.close()},H.callRefuser=async()=>{A.asset=0,A.time=!1,A.rtc&&A.rtc.close()},H.Run=async e=>{H[e.data.type]&&H[e.data.type](e.data)};let Oe={};function Oi(){let[e,t]=m.useState([]),a=m.useRef(null);return m.useEffect(()=>{},[]),Oe.set=r=>{t([...e,r])},Oe.del=()=>{t([])},Oe.audio=(r,i)=>{a.current.volume=.5,a.current.loop=i,a.current.src="/audio/"+r,a.current.muted=!1},n.jsxs(n.Fragment,{children:[e.map(r=>r.item),n.jsx("audio",{id:"audio",ref:a,autoPlay:!0,muted:!0})]})}function zi(e,t){let a=new Date().getTime();Oe.set({item:n.jsx(Ri,{type:t,id:e},a),key:a})}function Ri({id:e,type:t}){const[a,r]=m.useState({}),[i,o]=m.useState(t);m.useEffect(()=>{r(be.getSelect("user")[e])},[]),H.useListener(l=>{switch(l.type){case"state":o(l.data)}});const s=()=>{switch(i){case"out":return n.jsx("span",{onClick:()=>{H.callTo(a.id),o("call")},children:n.jsx("svg",{className:"green",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:n.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 n.jsxs(n.Fragment,{children:[n.jsx("span",{onClick:c,children:n.jsx("svg",{className:"red",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:n.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"})})}),n.jsx("span",{onClick:H.callRise,children:n.jsx("svg",{className:"green",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:n.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 n.jsx("span",{onClick:()=>H.callNo(a.id),children:n.jsx("svg",{className:"red",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:n.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 n.jsx("span",{onClick:()=>{H.callTo(a.id),o("call")},children:n.jsx("svg",{className:"green",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:n.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=()=>{H.callRefuser(a.id),Oe.del()};return n.jsx("div",{className:"web-phone white",children:n.jsxs("div",{className:"w",children:[n.jsx("div",{className:"x","data-icon":"F038",onClick:c}),n.jsx("div",{className:"a"}),n.jsx("div",{className:"n",children:a.name}),n.jsx("div",{className:"b",children:s()})]})})}const mt={};function Zi(e){mt.add(e)}function Ui({color:e,size:t,name:a}){return n.jsx("svg",{width:t,height:t,color:e,children:n.jsx("use",{href:`#${a}`})})}function Wi(){let[e,t]=m.useState([]);if(mt.x=()=>{t([])},mt.add=r=>{t(r)},e.length===0)return"";const a={sprite:""};return n.jsx("svg",{...a,xmlns:"http://www.w3.org/2000/svg",children:e.map((r,i)=>n.jsx("symbol",{id:r.name,viewBox:"0 0 24 24",fillRule:"evenodd",clipRule:"evenodd",children:n.jsx(r.path,{})},i))})}let Ye={},pt={},gt="ru";const Gi=(e,t)=>{pt=e,t?gt=t:gt=Object.keys(e)[0]},vn=m.createContext(localStorage.getItem("lang")||navigator.language),Ki=({children:e})=>{const[t,a]=m.useState(localStorage.getItem("lang")||navigator.language);return Ye.update=a,n.jsx(vn.Provider,{value:pt[t]||pt[gt],children:e})},Yi=e=>{var t;localStorage.setItem("lang",e),(t=Ye.update)==null||t.call(Ye,e)},Hi=()=>m.useContext(vn),qi=()=>localStorage.getItem("lang")||navigator.language;m.createContext({tab:"",setTabs:e=>{}});const ht={};function xt(e,t){ht[e]=t}function Ji(e,t){ht[e]!==void 0&&ht[e](t)}const we={};function Xi(e,t){const[a,r]=m.useState(t);return m.useEffect(()=>{if(we[e])return we[e].push(r);we[e]=[r]},[]),[a]}function Vi(e,t){if(we[e])return we[e].push(t);we[e]=[t]}function Qi(e,t){we[e]&&we[e].forEach(a=>a(t))}const ce={setListener:Ji,useListener:xt,setEmitter:Qi,useEmitter:Xi,subEmitter:Vi};function eo(){let[e,t]=m.useState([]);return ce.useListener("form",a=>{t([a])}),n.jsx(n.Fragment,{children:e.map(a=>a)})}const yn=({children:e,lang:t})=>Mr(n.jsxs(Ki,{children:[n.jsx(p.Modal.Init,{}),n.jsx(p.Notice.Init,{}),n.jsx(p.Alert.Init,{}),n.jsx(Mi,{}),n.jsx(Wi,{}),n.jsx(eo,{}),n.jsx(Oi,{}),n.jsx(p.Tooltip.Init,{}),n.jsx(Ai,{}),e]})),to=({children:e,...t})=>n.jsx("menu",{children:e}),no=({children:e,...t})=>n.jsxs("header",{children:["xz",e]}),ao={payment:"_payment_1lxfv_1"};function ro(){let[e,t]=m.useState({});return!e.active&&!e.payment?"":n.jsx("div",{className:ao.payment,children:"Истек срок оплаты! Доступ доступен до 16.04.2024"})}const io=({children:e,...t})=>n.jsxs("div",{className:"app",children:[n.jsx(ro,{}),n.jsx(to,{}),n.jsx(no,{}),n.jsx(yn,{}),e]}),He={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"},wn=({onClick:e,onSend:t,size:a="m",view:r="confirm",mode:i="primary",children:o,isDisabled:s=!1,className:c,after:l,before:_,label:d,onRef:g,awaitText:f="Ожидайте"})=>{let[h,v]=m.useState(!1);const x=k=>{if(e)return e();h||(t?(v(!0),t(v)):k.preventDefault())};let b={};return(s||h)&&(b.disabled=!0),n.jsx("button",{...b,ref:g,className:[He.btn,h?He.disabled:He[r],a&&He[a],c].join(" "),onClick:x,children:h?f:n.jsxs(n.Fragment,{children:[_||""," ",d," ",l||""]})||o})},oo=({list:e,onClick:t,active:a,size:r,view:i})=>n.jsx("nav",{children:n.jsx("ul",{className:[r,i].join(" "),children:e.map(o=>n.jsx(so,{onClick:t,active:a,label:o.label,link:o.link},o.link))})}),so=({onClick:e,label:t,link:a,active:r})=>n.jsx("li",{"tabs-active":String(r===a),onClick:()=>e(a),children:t}),kn={tabs:"_tabs_1i88v_1",tab:"_tab_1i88v_1"},jn=({list:e=[],active:t,onTab:a})=>{const r=i=>{if(a)return a(i);p.Router.setTabs(i)};return n.jsx("nav",{className:[kn.tabs,"tabs"].join(" "),children:e.map(i=>m.createElement("div",{onClick:()=>r(i.id),active:(t===i.id).toString(),className:kn.tab,key:i.id},i.label,i.badge?n.jsx("em",{children:i.badge}):""))})},lo=({list:e=[],active:t,onChange:a,className:r,after:i})=>{const[o,s]=m.useState(t);return n.jsxs("div",{className:["tabs-button",r].join(" "),children:[n.jsx("ul",{children:e.map(c=>n.jsx(co,{data:c,light:c.light,setTabs:s,active:c.id===o,onChange:a},c.id))}),i]})},co=({data:e,light:t,active:a,setTabs:r,onChange:i})=>{const o=()=>{e.disabled||(i&&i(e.id),r(e.id))};return n.jsxs("li",{onClick:o,className:e.disabled?"disabled":a?"active":"",children:[n.jsxs("p",{children:[e.before,e.name]}),t&&n.jsx("em",{})]})},_o={List:oo,Lite:jn,Button:lo},uo=({title:e="",button:t,description:a="",children:r})=>n.jsxs("fieldset",{children:[e&&n.jsxs("legend",{children:[e,t&&n.jsx("div",{role:"button-outline",onClick:()=>t.onClick(),children:t.label})," "]}),n.jsx("ul",{children:r}),a&&n.jsx("article",{children:a})]}),fo={setting:"_setting_dva4m_2"},mo=({children:e})=>n.jsx("div",{className:fo.setting,children:e}),po=({label:e,children:t})=>{let[a,r]=m.useState(!1);return n.jsxs("li",{"data-item":"accordion",children:[n.jsxs("dl",{onClick:()=>r(!a),children:[n.jsx("dt",{children:e}),n.jsx("dd",{children:n.jsx("div",{"data-close":String(a)})})]}),a&&n.jsx("div",{children:t})]})},go=({label:e,onClick:t,button:a})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{role:"button",onClick:()=>t(),children:a})]})}),Cn={Switch:({active:e,onClick:t})=>(e=typeof e=="number"?!!e:e,n.jsx("div",{role:"switch",onClick:()=>{t()},"aria-checked":e?"true":"false"}))},ho={Accordion:po,Button:go,Switch:({label:e,onClick:t,active:a})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{children:n.jsx(Cn.Switch,{onClick:t,active:a})})]})}),Info:({label:e,info:t})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{role:"info",children:t})]})}),Select:({label:e,active:t,options:a})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{role:"info",children:t})]})}),Component:({label:e,children:t})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{children:t})]})}),Node:({label:e,children:t})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{children:t})]})})};function Sn({list:e,onClick:t,active:a,size:r,view:i}){return n.jsx("nav",{children:n.jsx("ul",{className:[r,i].join(" "),children:e.map(o=>n.jsx(xo,{onClick:t,active:a,label:o.label,link:o.link},o.link))})})}const xo=({onClick:e,label:t,link:a,active:r})=>n.jsx("li",{"tabs-active":String(r===a),onClick:()=>e(a),children:t});Sn.defaultProps={size:"M",view:"H"};const bo={Section:uo,Main:mo,Item:ho,Tabs:Sn};function vo({value:e,background:t,gradient:a}){let r=835.24,i=r-e/100*r;const o=m.useId();return n.jsxs("svg",{viewBox:"0 0 275 275",xmlns:"http://www.w3.org/2000/svg",style:{borderRadius:"50%",background:t},children:[a&&n.jsx("linearGradient",{id:o,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:a.map((s,c)=>n.jsx("stop",{offset:s[0],stopColor:s[1]},c))}),n.jsx("circle",{strokeWidth:"10",fill:"transparent",r:"133",cx:"137.5",cy:"137.5",stroke:`url(#${o})`,strokeLinecap:"round",strokeDasharray:r,strokeDashoffset:i,transform:"rotate(-90 137.5 137.5)"})]})}const yo={Circle:vo},wo={Icon:Fi,Item:ut,Active:Pi};function ko(){return n.jsx("svg",{viewBox:"0 0 462.86 359.96",children:n.jsx("path",{d:"M210.5,307.78c-27,35.41-58.14,58-120.55,50.84-1-.12-1.58-.39-1.58-2V327.87c0-1.32.51-2.12,1.85-2,100.39-1,88.17-63.46,74.8-90.94-47.3-97.28-14.46-166.27,20.26-205.14,14.1-16.37,50.53-42,128.07-23.24,9.1,2,30.51,7.8,24.46,11.38C317.5,30,297.66,68.33,295,73.12c-3.62,6.59-6.26,13.17-4.57,14.13,2.37,1.35,3.5-1.56,6.58-7.91C319.78,34.41,366-22.76,402.78,37.68a1.14,1.14,0,0,1,.09.26c9.3,56.05,30.57,228.62-97.76,224.22-23.38-2-28.82-22-32.57-18.89-3.36,3,10,21.4,32.76,23.19C448.18,270.75,411.55,66.74,407.79,41.91a1.41,1.41,0,0,1,0-.3c2-7.32,129.15,17.47,112.77,158.08,4.82,6.57,10.89,10,18.7,16.08l.13.07c8.9,3.67,10.46,12.06,11.43,18.88a63.15,63.15,0,0,1-.14,15.49c-10.48-4.62-22.74-10.11-22.26-22.53.43-12,7.35-5.21-8.8-14.22a.69.69,0,0,0-1,.57c-.33,3.87-2.7,14.69-3,16.59v0c-4.64,17-16.59,86-18.41,99.58-.77,5.7-4.94,10.41-11.4,10.39l-56.71.18c-7.73.22-9.57-7.9-10.27-11.89-2.7-15.31-4.08-29.7-4.18-29.67-20.24,9.26-108.69,3.08-108.69,3.27V330c-.29,7.56-4.51,15.26-11.74,15.32l-52.87,1c-10.36.1-13.85-1.67-15.5-11.87-2.08-13.08-1-34.26-5.32-37.43-2,1.84-8.33,8.11-10,10.83M196.16,203q9.57,0,11.42-7.72c2.18-9.07-5.66-17.7-14.77-15.68-4.95,1.11-7.53,4.94-7.53,11.53C185.28,199,188.94,203,196.16,203Z",transform:"translate(-88.37 0)"})})}const jo={i:"_i_it11s_1"};let En="/assets/";function Co(e){En=e}function So({name:e,size:t="16px",onClick:a,hover:r,origin:i=!1,className:o}){const s={[i?"backgroundImage":"WebkitMaskImage"]:`url(${En}${e}.svg)`,"--size":t},c={};return o&&(c.className=o),a&&(c.onClick=a,c.pointer=""),r&&(c.hover=r),n.jsx("i",{role:"icon",style:s,className:[jo.i,`icon-${e}`].join(" "),...c})}let bt={};function Eo(e){bt={...bt,...e}}function In(){return bt}function Io({name:e,hover:t,onClick:a,className:r}){const i={};return a&&(i.onClick=a,i.pointer=""),t&&(i.hover=t),r&&(i.className=r),In()[e]?n.jsx("i",{role:"icon",...i,children:In()[e]()}):""}const Do={Logo:ko,Sprite:Zi,set:Eo,Symbol:Ui,Default:Io,Assets:So};let Dn={};Dn.setAttribute=(e,t)=>{const a=document.getElementById("root");a.dataset[e]=t};function No({items:e,list:t,icons:a,isSetting:r=!0}){const i=()=>{p.Alert.Send({title:"Выйти",text:"Вы уверене что хотиет выйти"},()=>{be.Logaut()})};return n.jsxs("menu",{children:[n.jsx("ul",{children:t.map(o=>n.jsx(To,{items:e,i:o,icons:a},o))}),n.jsx("em",{}),n.jsxs("ul",{children:[n.jsx(Mo,{icons:a}),r&&n.jsxs("li",{className:p.Router.isModule("Settings")?"active":"",onClick:()=>p.Router.setModule("Settings"),children:[n.jsx(a.Icons,{name:"s040"}),n.jsx("span",{children:"Настройки"})]}),n.jsxs("li",{onClick:i,children:[n.jsx(a.Icons,{name:"s044"}),n.jsx("span",{children:"Выход"})]})]})]})}const To=({items:e,i:t,icons:a})=>t[0]==="#"?n.jsx("b",{children:t.slice(1)}):n.jsxs("li",{className:p.Router.isModule(e[t].link)?"active":"",onClick:()=>{p.Router.setTabs(e[t].temp,!1),p.Router.setModule(e[t].link)},children:[n.jsx(a.Icons,{name:e[t].icon}),n.jsx("span",{children:e[t].name})]}),Mo=({icons:e})=>{const[t,a]=m.useState(!1),r=m.useRef(null),i=async()=>{r.current&&(await r.current.prompt(),a(!1))};return m.useEffect(()=>{window.addEventListener("appinstalled",o=>{}),window.addEventListener("beforeinstallprompt",async o=>{o.preventDefault(),r.current=o,a(!0)})},[]),t?n.jsxs("li",{onClick:i,children:[n.jsx(e.Icons,{name:"install"}),n.jsx("span",{children:"Установить как приложение"})]}):""};function Nn({path:e,query:t,button:a,emptyList:r="Список пуст",searchParams:i=["p01","p02","p03"],...o}){const[s,c]=m.useState([]),[l,_]=m.useState([]),[d,g]=m.useState(!1),f=async()=>{let h=await p.Api.fetch(e,t);h.data&&h.data.length>0&&(c(h.data),_(h.data)),g(!0)};return ce.useListener("list_children",h=>{if(h.action==="edit"){let v=l.map(x=>x.id===h.id?Object.assign(x,{[h.name]:h.value}):x);c(v),_(v)}if(h.action==="delete"){let v=l.filter(x=>x.id!==h.id);c(v),_(v)}}),ce.useListener("search",h=>{c(l.filter(v=>(""+i.map(b=>v[b]).toString()).toLowerCase().includes(h.toLowerCase())))}),m.useEffect(()=>{f(),a&&ce.setListener("button",a)},[]),d&&s.length===0?n.jsx("ul",{className:"list-body",children:r}):n.jsx("ul",{className:"list-body",children:s.map((h,v)=>n.jsx(o.item,{data:h,count:v+1},h.id))})}const Bo={Menu:No,List:Nn},$o={sort:"_sort_1yrvt_1"};let qe={};function Lo(e,t){switch(t.type){case"active":let a="<";return e.active===t.data&&(a=e.sort==="<"?">":"<"),qe.get({active:t.data,sort:a},!1),_n({active:t.data,sort:a}),{...e,active:t.data,sort:a};default:throw new Error}}function Ao(){const[e,t]=m.useReducer(Lo,ct()===void 0?{active:1,sort:"<"}:ct());return n.jsxs("div",{className:$o.sort,children:[n.jsx("i",{"data-color":e.active===1?"_506290":"_b5b9cc","data-icon":e.active===1?e.sort==="<"?"F073":"F072":"F071",onClick:()=>t({type:"active",data:1})}),n.jsx("i",{"data-color":e.active===2?"_506290":"_b5b9cc","data-icon":e.active===2?e.sort==="<"?"F066":"F067":"F074",onClick:()=>t({type:"active",data:2})}),n.jsx("i",{"data-color":e.active===3?"_506290":"_b5b9cc","data-icon":e.active===3?e.sort==="<"?"F068":"F069":"F070",onClick:()=>t({type:"active",data:3})})]})}function Fo(e){qe.get=e}function Po(e){qe.set(e)}function Oo(e,t,a){let r=1,i=0,o={},s=50;o[r]=[];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),a.active){case 1:l=a.sort===">"?"s1d":"s1a";break;case 2:l=a.sort===">"?"s2d":"s2a";break;case 3:l=a.sort===">"?"s3d":"s3a";break}return t.sort(c[l]).forEach(_=>{i++,i<=s||(r++,i=1,o[r]=[]),o[r].push(e[_.id])}),{data:o}}function zo(e){qe.count(e)}const Ro={Init:Ao,useValue:Fo,Set:Po,Run:Oo,Count:zo},Je={},Tn={};function Zo(e){const[t,a]=m.useState({}),r=async i=>{a(Object.keys(Je).reduce((o,s)=>(o?o[s]=Je[s].all:o={},o),{}))};return m.useEffect(()=>{e.forEach(i=>Je[i]={all:0}),Tn.menu=r,r()},[e]),t}function Uo(e,t){switch(typeof t){case"number":Je[e].all+=t,Tn.menu();break}}const Wo={useMenu:Zo,setUpdate:Uo};class Go{constructor(t="el",a="db"){Ut(this,"storeName");Ut(this,"_dbp");this.storeName=a,this._dbp=new Promise((r,i)=>{const o=indexedDB.open(t,1);o.onerror=()=>i(o.error),o.onsuccess=()=>r(o.result),o.onupgradeneeded=()=>{o.result.createObjectStore(a)}})}_withIDBStore(t,a){return this._dbp.then(r=>new Promise((i,o)=>{const s=r.transaction(this.storeName,t);s.oncomplete=()=>i(),s.onabort=s.onerror=()=>o(s.error),a(s.objectStore(this.storeName))}))}}let vt,J={};const De=()=>(vt||(vt=new Go),vt),ke=(e,t,a=De())=>a._withIDBStore("readwrite",r=>{J[e]=t,r.put(p.Crypto.enCode(t),e)}),he=(e,t=De())=>J[e]===void 0?new Promise((a,r)=>{let i;t._withIDBStore("readonly",o=>{i=o.get(e)}).then(()=>{if(i.result!==void 0){let o=p.Crypto.deCode(i.result);J[e]=o,a(o)}else a({})})}):J[e],Ko=(e,t=De())=>t._withIDBStore("readwrite",a=>{a.delete(e)}),yt=(e=De())=>e._withIDBStore("readwrite",t=>{t.clear()}),Yo={id:async(e,t,a)=>{let r=await he(t);if(a!==void 0)a({type:"load",base:r});else return r[e]},get:he,set:ke,add:async(e,t,a,r)=>{let i,o;o=await he(a),o[e.id]=e,await ke(a,o),i!==null&&(i=await he(t),i[e.id]=e.eDate,await ke(t,i)),r!==void 0&&r({type:"load",page:i,base:o})},del:Ko,upd:(e,t,a,r=De())=>{if(J[e]===void 0)return new Promise((i,o)=>{let s;r._withIDBStore("readonly",c=>{s=c.get(e)}).then(()=>{if(s.result!==void 0){let c=p.Crypto.deCode(s.result);J[e]=c,J[e][t.id]={...J[e][t.id],...t.data},r.put(p.Crypto.enCode(J[e]),e),i({})}else i({})})});if(J[e][t.id]!==void 0)return J[e][t.id]={...J[e][t.id],...t.data},a!==void 0&&J[a]!==void 0?J[a][t.id]!==void 0&&(J[a][t.id]=t.data.eDate):J[a]=[],delete J[e][t.id].$_item,delete J[e][t.id].$_send,r._withIDBStore("readwrite",i=>{i.put(p.Crypto.enCode(J[e]),e),a!==void 0&&i.put(p.Crypto.enCode(J[a]),a)})},key:(e=De())=>{const t=[];return e._withIDBStore("readonly",a=>{(a.openKeyCursor||a.openCursor).call(a).onsuccess=function(){this.result&&(t.push(this.result.key),this.result.continue())}}).then(()=>t)},load:e=>J[e],split:(e,t,a=[],r={})=>{let i=a.length!==0,o=[],s=r.sort,c=Object.keys(r).length!==0,l=Object.keys(r),_=Object.keys(e),d=[],g=h=>{let v="";if(a.forEach(x=>{v+=t[h][x]}),c){let x={};l.forEach(b=>{x[b]=t[h][b]});for(let b in s)t[h][s[b]]===void 0&&(yt(),location.reload()),b==="s1"&&(x[b]=new Date(t[h][s[b]]).getTime()),b==="s2"&&(x[b]=t[h][s[b]]),b==="s3"&&(x[b]=t[h][s[b]].replace(/[^a-zа-яё]/gi,"").substring(0,1));o.push({id:h,text:v,...x})}else o.push({id:h,text:v})},f=h=>{};return _.forEach(h=>{d.push(t[h])}),d.forEach(h=>{h===void 0?(yt(),location.reload()):(i&&g(h.id),c&&f(h.id))}),{list:d,search:o,filter:r}},clear:yt,updAll:async(e,t,a,r)=>{let i=await he(t),o=await he(a);for(let s in e)o[s]=e[s],i[s]=e[s].eDate;await ke(t,i),await ke(a,o),r!==void 0&&r({type:"load",page:i,base:o})},delAll:async(e,t,a,r)=>{let i=await he(t),o=await he(a);e.forEach(s=>delete i[s]),await ke(t,i),r!==void 0&&r({type:"load",page:i,base:o})},delList:async(e,t,a)=>{let r=await he(t);e.forEach(i=>delete r[i]),await ke(t,r)},addList:async(e,t,a)=>{let r=await he(t);e.forEach(i=>r[i.id]=i.eDate),await ke(t,r)}},Ho={version:{Api:ir,Server:rr,Client:or},Host:sr,Import:lr,Crypto,defaultModule:Nr,IconAssets:Co,DynamicURL:dr},qo={useKey:(e,t)=>{const a=[];t=t.map(r=>r.charCodeAt(0)),document.onkeydown=function(r){a.push(r.keyCode);for(var i=0;i<t.length;i++)if(a.indexOf(t[i])==-1)return;e(),a.length=0},document.onkeyup=function(r){a.length=0}}},Jo={s:"_s_18bde_1",loadingB:"_loadingB_18bde_1",ul:"_ul_18bde_31"};function Mn({children:e}){return n.jsx("ul",{className:re.ul,children:e})}function Xo(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 a=Object.keys(e.data).length,r=e.item+1;return r=a<r?1:r,e.item===r?e:{...e,wait:e.size===r,item:r,list:[...e.list,...e.data[r]]};case"clear":return{load:!1,list:[],data:{},item:1,wait:!1,size:0};default:throw new Error}}function Bn({list:e,load:t,className:a,...r}){const i=m.useRef(null),[o,s]=m.useReducer(Xo,{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 n.jsx("div",{className:[Jo.s,a].join(" "),ref:i,onScroll:c,children:n.jsx(Mn,{"el-empty":"Данные не найдены",children:o.load&&o.list!==void 0?o.list.map(l=>n.jsx(r.item,{data:l},l.id)):n.jsxs("div",{"data-load":"load",children:[n.jsx("i",{}),n.jsx("i",{}),n.jsx("i",{})]})})})}const Vo={Widget:Bi},$n=({onClick:e,active:t})=>(t=!!t,n.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(a=>{if(e){let r=t.target.textContent.length;if(r>=e)return;e-=r,a=a.slice(0,e)}window.document.execCommand("insertText",!1,a.replace(/(\r\n|\n|\r)/gm," "))}).catch(a=>{})},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=be.isBrowser("Firefox")?"true":"plaintext-only";function ze({id:e,value:t,onValue:a,name:r,placeholder:i="",title:o="",error:s="",hide:c=!1,edit:l=!0,active:_=!0,after:d="",before:g="",show:f=!0,maxLength:h,onSave:v,className:x="",isCopy:b=!0,isReload:k=!1}){let w=!!(c&&(t===""||t===void 0)),N=I=>{a&&a({value:I.target.textContent.trim(),name:r,reload:k})},T=I=>{h&&I.target.textContent.trim().length>=h&&I.key!=="Backspace"&&I.preventDefault(),I.key==="Enter"&&I.preventDefault()},M=I=>{b&&(I.preventDefault(),navigator.clipboard.writeText(I.target.textContent.trim()).then(function(){p.Notice.Copy("Данные в буфер обмене")},function(L){}))},y=I=>{I.preventDefault(),navigator.clipboard.readText().then(L=>{if(h){let D=I.target.textContent.length;if(D>=h)return;h-=D,L=L.slice(0,h)}window.document.execCommand("insertText",!1,L.replace(/(\r\n|\n|\r)/gm," "))}).catch(L=>{})};if(!(l&&_)&&!f||!(l&&_)&&w)return"";const C={};C.field="input",x&&(C.className=x);const E={};i&&(E.placeholder=i),l&&_&&(E.edit="");const O=I=>{G.Blur(I),v==null||v({value:I.target.textContent.trim(),name:r})};return n.jsxs("dl",{...C,children:[o?n.jsx("dt",{children:o}):"",g,n.jsx("dd",{onPaste:y,onInput:N,onBlur:O,onKeyDown:T,onContextMenu:M,spellCheck:"true",contentEditable:l&&_?G.ContentEditable:"false",suppressContentEditableWarning:!0,...E,children:t}),d,s?n.jsx("em",{children:s}):""]})}function Ln({onClick:e,onSend:t,name:a,onRef:r}){let[i,o]=m.useState(!1);const s=()=>{if(e)return e();i||(o(!0),t&&t(o))};return n.jsx("button",{ref:r,"data-form":"button",className:i?"btn await":"btn confirm pointer",onClick:s,children:i?"Ожидайте":a})}function An({value:e,onValue:t,onActive:a,data:r,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}),g=()=>{d.current.value.length>0?d.current.send&&(a(!0),d.current.send=!1,d.current.timerId=setTimeout(()=>{d.current.send=!0},3e3)):a(!1)},f=w=>{d.current.value=w.target.textContent,g()},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="",r&&r(d.current.value),t&&t(d.current.value),d.current.value="",a(!1)))},v=w=>{w.keyCode===16&&(d.current.shift=!1)},x=w=>{w.preventDefault(),navigator.clipboard.readText().then(N=>{if(s){let T=w.target.textContent.length;if(T>=s)return;s-=T,N=N.slice(0,s)}window.document.execCommand("insertText",!1,N)}).catch(N=>{})},b=()=>{a(!1)},k={spellCheck:"true"};return _&&(k.placeholder=_),c&&l&&(k.contentEditable=G.ContentEditable),n.jsx("dl",{"data-form":"message",children:n.jsx("dd",{onPaste:x,onInput:f,onKeyUp:v,onKeyDown:h,onBlur:b,...k,suppressContentEditableWarning:!0,children:e})})}function Fn(e){let t=()=>e.title?n.jsx("dt",{children:e.title}):"",a=e.edit!==void 0?e.edit:!0,r=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 n.jsxs("dl",{"data-form":"input","type-data":"generator",children:[t(),n.jsx("dd",{onPaste:c,onInput:o,onKeyDown:s,contentEditable:a&&r?G.ContentEditable:"false","data-placeholder":i,suppressContentEditableWarning:!0,children:e.value})]})}function Pn({value:e,onValue:t,maxLength:a,placeholder:r="",name:i}){let o=(v,x)=>Number(Math.round(v+Math.random()*(x-v))),s=m.useRef(null),c=m.useRef(null),l=o(1e4,99999),_=v=>{v.key!=="Backspace"&&(v.key==="Enter"&&v.preventDefault(),v.target.textContent.length===5&&v.preventDefault(),/\d/.test(v.key)||v.preventDefault())},d=v=>{t({value:Number(v.target.textContent)===l,name:i})},g=v=>{v.preventDefault(),navigator.clipboard.readText().then(x=>{if(a){let b=v.target.textContent.length;if(b>=a)return;a-=b,x=x.slice(0,a)}window.document.execCommand("insertText",!1,x.replace(/(\r\n|\n|\r)/gm," ").replace(/[^0-9]/g,"").substring(0,5))}).catch(x=>{})};m.useEffect(()=>{const v=s.current,x=v.getContext("2d");x.clearRect(0,0,v.width,v.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 r&&(h.placeholder=r),n.jsxs("dl",{...f,children:[n.jsx("dd",{ref:c,onPaste:g,onInput:d,onBlur:G.Blur,onKeyDown:_,contentEditable:G.ContentEditable,suppressContentEditableWarning:!0,...h}),n.jsx("canvas",{ref:s,width:"100",height:"35"})]})}function On({className:e,title:t,error:a,edit:r=!0,real:i,onValue:o,empty:s,name:c}){let l={n1:"",n2:"",n3:"",n4:"",n5:"",n6:"",code:""},_=x=>{if(x.preventDefault(),!r)return;x.target.textContent=x.target.textContent.slice(-1).replace(/[^+\d]/g,"");let b=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,b.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(!r)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 b=x.target.previousSibling.id.slice(1);x.target.previousSibling.textContent="",l["n"+b]="",x.target.previousSibling.focus()}l.code=l.n1+""+l.n2+l.n3+l.n4+l.n5+l.n6}},g=x=>{if(!r)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 b=1;b<=6;b++){let k=document.getElementById("n"+b);k&&(k.textContent="")}}},f=x=>{x.target.textContent=""},h=x=>{x.preventDefault(),navigator.clipboard.readText().then(b=>{var T;var k=/\d+/g;let w=(T=b.match(k))==null?void 0:T.toString();if(!w)return;let N=w.split("");for(let M=1;M<=N.length;M++){let y=document.getElementById("n"+M);y&&(y.textContent=N[M-1],l["n"+M]=N[M-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 M=1;M<=6;M++){let y=document.getElementById("n"+M);y&&(y.textContent="")}}}).catch(b=>{})};const v={};return v.field="code",e&&(v.className=e),n.jsxs("dl",{...v,children:[t?n.jsx("dt",{children:t}):"",n.jsxs("div",{children:[n.jsx("dd",{id:"n1",inputMode:"numeric",onKeyDown:d,onKeyUp:g,onFocus:f,onPaste:h,onInput:_,contentEditable:!0}),n.jsx("dd",{id:"n2",inputMode:"numeric",onKeyDown:d,onKeyUp:g,onFocus:f,onPaste:h,onInput:_,contentEditable:!0}),n.jsx("dd",{id:"n3",inputMode:"numeric",onKeyDown:d,onKeyUp:g,onFocus:f,onPaste:h,onInput:_,contentEditable:!0}),n.jsx("dd",{id:"n4",inputMode:"numeric",onKeyDown:d,onKeyUp:g,onFocus:f,onPaste:h,onInput:_,contentEditable:!0}),n.jsx("dd",{id:"n5",inputMode:"numeric",onKeyDown:d,onKeyUp:g,onFocus:f,onPaste:h,onInput:_,contentEditable:!0}),n.jsx("dd",{id:"n6",inputMode:"numeric",onKeyDown:d,onKeyUp:g,onFocus:f,onPaste:h,onInput:_,contentEditable:!0})]}),a?n.jsx("em",{children:a}):""]})}function zn({id:e,value:t,onValue:a,name:r,placeholder:i="",title:o="",error:s="",hide:c=!1,length:l=6,edit:_=!0,active:d=!0,after:g="",show:f=!0,view:h,onSave:v,className:x=""}){_=_!==void 0?_:!0,d=d!==void 0?d:!0;let[b,k]=m.useState(t),w=T=>{k(T),a==null||a({value:T,name:r}),v==null||v({value:T,name:r})};const N={};return N.field="color",x&&(N.className=x),n.jsx(n.Fragment,{children:h==="icon"?n.jsx("i",{"data-icon":"F043"}):n.jsxs("dl",{...N,children:[o&&n.jsx("dt",{children:o}),n.jsx("dd",{children:l>0&&Array.from(Array(l).keys()).map(T=>n.jsx("s",{active:(Number(T)===Number(b))+"",onClick:()=>w(T),style:{backgroundColor:`var(--color-${T})`}},T))}),s&&n.jsx("em",{children:s})]})})}const xe={o:"_o_76l23_1",c:"_c_76l23_11",_active:"__active_76l23_41",as:"_as_76l23_94",ap:"_ap_76l23_97"};function wt({title:e,error:t,edit:a=!0,active:r=!0,className:i,placeholder:o,max:s,min:c,view:l="date",onValue:_,name:d,value:g,after:f}){let[h,v]=m.useState(g===void 0?new Date:g),x=!a&&r;m.useEffect(()=>{v(g===void 0?new Date:g)},[g]);let b=T=>{v(T),_==null||_({value:T,name:d})},k=T=>{const M=T.target.getBoundingClientRect(),y=M.left,C=M.bottom,E=M.top;ce.setListener("form",n.jsx(Qo,{position:{x:y,y:E,b:C},onValue:b,date:h,max:s,min:c,className:i},new Date().getTime()))};const w={};w.field="input",i&&(w.className=i);const N={};return o&&(N.placeholder=o),x?n.jsx(n.Fragment,{}):n.jsx(n.Fragment,{children:l==="icon"?n.jsx("i",{"data-icon":"F043",className:"pointer","data-color":"_b5b9cc :506290",onClick:k}):n.jsxs("dl",{...w,children:[e&&n.jsx("dt",{children:e}),n.jsxs("dd",{onClick:k,...N,"data-edit":(a&&r)+"",children:[K.Date(h,"dd.mm.yyyy"),f]}),t&&n.jsx("em",{children:t})]})})}const Qo=({date:e,onValue:t,position:a,max:r,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},g={y:parseInt(_.getFullYear()),d:parseInt(_.getDate()),m:parseInt(_.getMonth())+1},[f,h]=m.useState({y:g.y,m:g.m}),v=j=>{let $=j.getDay();return $===0&&($=7),$-1},x=["пн","вт","ср","чт","пт","сб","вс"],b=f.m-1,k=new Date(f.y,b),w=[];for(let j=0;j<v(k);j++)w.push(0);for(;k.getMonth()===b;)w.push(k.getDate()),k.setDate(k.getDate()+1);let N=()=>{c(!1)},T=()=>{C(f.m+1,f.y)},M=()=>{C(f.m-1,f.y)},y=j=>{t(f.y+"-"+K.Number(2,f.m)+"-"+K.Number(2,j)),N()},C=(j,$)=>{$=j>12?$+1:j<1?$-1:$,j=j>12?1:j<1?12:j,h({y:$,m:j})};const E=j=>d.y===f.y&&d.m===f.m&&d.d===j?{"data-active":"true"}:{},O=j=>g.y===f.y&&g.m===f.m&&g.d===j?{"data-current":"true"}:{},I=j=>{let $=!0;if(r){let U=r.getTime(),Q=new Date(f.y,f.m-1,j).getTime();U<Q&&($=!1)}if(i){let U=i.getTime(),Q=new Date(f.y,f.m-1,j).getTime();U>Q&&($=!1)}return $};let L=window.innerHeight-a.y<320?a.y-312:a.b,D=window.innerWidth-a.x<265?a.x-235:a.x;return n.jsx(n.Fragment,{children:s?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:xe.o,onClick:()=>N()},new Date().getTime()),n.jsxs("div",{className:[xe.c,o&&o+"-backdrop"].join(" "),style:{top:L+"px",left:D+"px"},children:[n.jsxs("s",{children:[n.jsx("i",{onClick:M,children:n.jsx("svg",{width:"16",height:"16",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:n.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"})})}),n.jsxs("h2",{children:[K.Month(f.m).name," ",f.y]}),n.jsx("i",{onClick:T,children:n.jsx("svg",{width:"16",height:"16",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:n.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"})})})]}),n.jsxs("div",{"grid-calendar":"",children:[x.map((j,$)=>n.jsx("p",{children:j},"v"+$)),w.map((j,$)=>n.jsx("span",{children:j!==0&&I(j)?n.jsx("b",{...E(j),...O(j),onClick:()=>y(j),children:j}):n.jsx("p",{...E(j),...O(j),children:j!==0?j:""})},$))]})]})]}):""})};function kt({value:e,onValue:t,name:a,placeholder:r="",title:i,error:o,hide:s=!1,edit:c=!0,show:l=!0,active:_=!0,after:d="",view:g,modal:f,module:h,options:v,className:x}){let[b,k]=m.useState(e),w=M=>{if(!(c&&_)||!f)return;let y=f.split(".");p.Modal.Open(y[0],y[1],{callback:C=>{t&&t({value:C,name:a}),k(C)},onValue:t,options:v,name:a,value:e})};const N={};N.field="input",x&&(N.className=x);const T={};return r&&(T.placeholder=r),s?n.jsx(n.Fragment,{}):n.jsxs("dl",{...N,children:[i&&n.jsx("dt",{children:i}),n.jsx("dd",{...T,onClick:w,edit:(c&&_)+"","data-after":d,children:b}),o&&n.jsx("em",{children:o})]})}function jt({value:e,onValue:t,name:a,placeholder:r="",title:i="",error:o="",hide:s=!1,edit:c=!0,active:l=!0,after:_="",show:d=!0,course:g=100,view:f,type:h,onSave:v,className:x="",isClear:b=!1}){let k=!!(s&&(e===""||e===void 0));e=K.isNumeric(e)?Number(e)/g:0;let w=D=>h==="multi"?D.replace(/[^+\d.+-]/g,""):D.replace(/[^+\d.]/g,""),N=(D,j)=>{let $=document.createRange(),U=window.getSelection();$.setStart(j.childNodes[0],D),$.collapse(!0),U.removeAllRanges(),U.addRange($),j.focus()},T=D=>{t==null||t({value:w(D.target.textContent)*g,name:a}),D.target.textContent=w(D.target.textContent),D.target.textContent.length>0&&N(D.target.textContent.length,D.target)},M=D=>{G.Blur(D),D.target.textContent===""&&(D.target.textContent=0),v==null||v({value:w(D.target.textContent)*g,name:a}),t==null||t({value:w(D.target.textContent)*g,name:a}),D.target.textContent=K.Money(D.target.textContent)},y=D=>{D.target.textContent=w(D.target.textContent)},C=D=>{D.currentTarget.previousElementSibling.textContent="",t==null||t({value:0,name:a})},E=D=>{D.key==="Enter"&&D.preventDefault()},O=D=>{D.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 I={};I.field="input",x&&(I.className=x);const L={};return L.inputMode="decimal",r&&(L.placeholder=r),c&&l&&(L.edit=""),n.jsxs("dl",{...I,children:[i?n.jsx("dt",{children:i}):"",n.jsx("dd",{...L,onInput:T,onPaste:O,onBlur:M,onKeyDown:E,onFocus:y,contentEditable:c&&l?G.ContentEditable:"false",suppressContentEditableWarning:!0,"data-after":_,children:!r||e?K.Money(e):""}),b&&n.jsx("svg",{"action-type":"delete",onClick:C,viewBox:"0 0 24 24",children:n.jsx("path",{d:"M17 6L6 17M6 6L17 17"})}),o?n.jsx("em",{children:o}):""]})}function Rn({value:e,onValue:t,name:a,view:r,error:i,edit:o=!0,active:s=!0,title:c,placeholder:l="",className:_,after:d}){let[g,f]=m.useState(e);m.useEffect(()=>{f(e)},[e]);let h=b=>{f(b),t&&t({value:b,name:a})},v=b=>{if(!o||!s)return;const k=b.target.getBoundingClientRect(),w=k.left,N=k.top;ce.setListener("form",n.jsx(es,{position:{x:w,y:N},onValue:h,date:g},new Date().getTime()))};const x={};return l&&(x.placeholder=l),r==="icon"?n.jsx("i",{"data-icon":"F043",onClick:v}):n.jsxs("dl",{children:[c&&n.jsx("dt",{children:c}),n.jsx("dd",{onClick:v,...x,children:K.Date(g,"mm.yyyy")}),i&&n.jsx("em",{children:i})]})}const es=e=>{let[t,a]=m.useState(!0),r=new Date,i=new Date(e.date),o={y:parseInt(r.getFullYear()),m:parseInt(r.getMonth())+1},s={y:parseInt(i.getFullYear()),m:parseInt(i.getMonth())+1},[c,l]=m.useState(s.y),_=()=>{a(!1)},d=()=>{l(c+1)},g=()=>{l(c-1)},f=k=>{e.onValue(c+"-"+K.Number(2,k)),_()},h=k=>o.y===s.y&&o.m===k?"_FFEB3B":"",v=Array(12).fill("").map((k,w)=>w+1),x=window.innerHeight-e.position.y+33<320?e.position.y-312:e.position.y+33,b=window.innerWidth-e.position.x<265?e.position.x-235:e.position.x;return n.jsx(n.Fragment,{children:t?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:xe.o,onClick:()=>_()},new Date().getTime()),n.jsxs("div",{className:xe.c,style:{top:x+"px",left:b+"px"},children:[n.jsxs("s",{children:[n.jsx("i",{onClick:g,children:n.jsx("svg",{width:"16",height:"16",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:n.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"})})}),n.jsx("h2",{children:c}),n.jsx("i",{onClick:d,children:n.jsx("svg",{width:"16",height:"16",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:n.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"})})})]}),n.jsx("div",{"grid-month":"",children:v.map((k,w)=>n.jsx("span",{onClick:()=>{f(k)},color:h(k),children:n.jsx("b",{children:K.Month(k).abc})},w))})]})]}):""})};function Zn({id:e,value:t,onValue:a,name:r,placeholder:i="",title:o="",error:s="",hide:c=!1,edit:l=!0,active:_=!0,after:d="",show:g=!0,maxLength:f,view:h,onSave:v,className:x="",isCopy:b=!0}){let[k,w]=m.useState(!1);k=l?!0:k;let N=I=>{a==null||a({value:I.target.innerText,name:r})},T=I=>{f&&I.target.textContent.trim().length>=f&&I.key!=="Backspace"&&I.preventDefault(),I.key==="Enter"&&I.preventDefault()},M=I=>{b&&(I.preventDefault(),navigator.clipboard.writeText(I.target.textContent.trim()).then(function(){p.Notice.Copy("Данные в буфер обмене")},function(L){}))},y=I=>{I.preventDefault(),navigator.clipboard.readText().then(L=>{if(f){let D=I.target.textContent.length;if(D>=f)return;f-=D,L=L.slice(0,f)}window.document.execCommand("insertText",!1,L.replace(/(\r\n|\n|\r)/gm," "))}).catch(L=>{})};if(c)return n.jsx(n.Fragment,{});if(!(l&&_)&&!g)return"";const C={};C.field="notes",x&&(C.className=x);const E={};i&&(E.placeholder=i),l&&_&&(E.edit=""),k&&(E.open="");const O=I=>{G.Blur(I),v==null||v({value:I.target.textContent.trim(),name:r})};return n.jsxs("dl",{...C,children:[o?n.jsx("dt",{children:o}):"",n.jsx("dd",{onPaste:y,onInput:N,onBlur:O,onKeyDown:T,onContextMenu:M,contentEditable:l&&_?G.ContentEditable:"false",suppressContentEditableWarning:!0,...E,children:t}),d,s?n.jsx("em",{children:s}):""]})}function Ct({onValue:e,onSave:t,active:a,max:r,edit:i,title:o,error:s,show:c,hide:l,value:_,placeholder:d,className:g,maxLength:f,name:h,after:v="",before:x="",view:b}){i=i!==void 0?i:!0,a=a!==void 0?a:!0,l=!!(l&&(_===""||_===void 0))&&!(i&&a),d=d!==void 0?d:"",r=r!==void 0?r:99;let w=!1,N=I=>{e==null||e({value:I.target.textContent,name:h})},T=I=>{if(!(w&&I.which===86)){if(I.which===17||I.which===91)return w=!0;I.key!=="Backspace"&&(I.target.textContent.length===r&&I.preventDefault(),I.key==="Enter"&&I.preventDefault(),isNaN(I.key)&&I.preventDefault())}},M=I=>{if(I.which===17||I.which===91)return w=!1},y=I=>{I.preventDefault(),navigator.clipboard.readText().then(L=>{if(L=L.replace(/(?!^\+|\d)./g,""),f){let D=I.target.textContent.length;if(D>=f)return;f-=D,L=L.slice(0,f)}window.document.execCommand("insertText",!1,""+L)}).catch(L=>{})};const C=I=>{G.Blur(I),t==null||t({value:I.target.textContent,name:h})},E={};E.field="input",g&&(E.className=g);let O={};return i&&a?(O.edit="true",O.contentEditable=G.ContentEditable):O.contentEditable="false",O.inputMode="decimal",d&&(O.placeholder=d),l?n.jsx(n.Fragment,{}):n.jsxs("dl",{...E,children:[o&&n.jsx("dt",{children:o}),x,n.jsx("dd",{...O,onPaste:y,onInput:N,onBlur:C,onKeyDown:T,onKeyUp:M,suppressContentEditableWarning:!0,children:_}),v,s&&n.jsx("em",{children:s})]})}function Un({value:e,onValue:t,onSave:a,name:r,placeholder:i="",className:o,title:s,error:c,edit:l=!0,active:_=!0,reload:d=!1,native:g=!1,isShow:f=!1,maxLength:h,eyes:v=[],after:x=""}){const[b,k]=m.useState(f);let w=E=>{t&&t({value:E.target.textContent,name:r,reload:d})},N=E=>{E.key==="Enter"&&E.preventDefault()},T=E=>{E.preventDefault(),navigator.clipboard.readText().then(O=>{if(h){let I=E.target.textContent.length;if(I>=h)return;h-=I,O=O.slice(0,h)}window.document.execCommand("insertText",!1,O.replace(/(\r\n|\n|\r)/gm," "))}).catch(O=>{})},M=E=>{G.Blur(E),a==null||a({value:E.target.textContent.trim(),name:r})};const y={};y.field="password",b&&(y.show=""),o&&(y.className=o);const C={};return i&&(C.placeholder=i),g?"":n.jsxs("dl",{...y,children:[s?n.jsx("dt",{children:s}):"",n.jsx("dd",{onPaste:T,onInput:w,onKeyDown:N,onBlur:M,contentEditable:l&&_?G.ContentEditable:"false",...C,suppressContentEditableWarning:!0,children:e}),v[0]&&n.jsx("i",{onClick:()=>k(!b),children:b?v[1]:v[0]}),x,c?n.jsx("em",{children:c}):""]})}const St={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 Et({value:e,onValue:t,onSave:a,name:r,placeholder:i="",title:o="",error:s="",hide:c=!1,edit:l=!0,active:_=!0,after:d="",show:g=!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="+_(___) ___-__-__",b=!0,k=0,w=(D,j)=>{let $=document.createRange(),U=window.getSelection();$.setStart(j.childNodes[0],D),$.collapse(!0),U.removeAllRanges(),U.addRange($),j.focus()},N=D=>{let j=M(D.target.textContent);D.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,D.target),t&&t({value:j.q.replace(/\D/g,""),name:r})},T=D=>{D.preventDefault(),navigator.clipboard.readText().then(j=>{window.document.execCommand("insertText",!1,j)}).catch(j=>{})},M=D=>{let j=0,$="",U=D.replace(/\D/g,"");U===""&&(b=!0);let Q=U.split(""),le="";Q.forEach(Re=>{b&&(le+=Re,St[le]!==void 0&&b?(b=!1,x=St[le].mask.replace(new RegExp("[0-9]","g"),"_"),$=St[le].code):(b&&(k=(""+le).length,x=`+${le}_(___) ___-__-__`.replace(new RegExp("[0-9]","g"),"_"),$=""),k>(""+le).length&&(b=!0,x=`+${le}_(___) ___-__-__`.replace(new RegExp("[0-9]","g"),"_"),$="")))});let ve=x.replace(/\D/g,"");return ve.length>=U.length&&(U=ve),{q:x.replace(/[_\d]/g,function(){return U.charAt(j++)||"_"}),i:j,v:U,f:$}},y=D=>{D.preventDefault(),navigator.clipboard.writeText(D.target.textContent.replace(/\D/g,"")).then(function(){p.Notice.Copy("Данные в буфер обмене")},function(j){})},C=M(e),E=D=>{D.key==="Enter"&&D.preventDefault()};const O=D=>{G.Blur(D),a&&a({value:D.target.textContent.replace(/\D/g,""),name:r})},I={};I.field="input",h&&(I.className=h);let L={};return l&&_?(L.edit="true",L.contentEditable=G.ContentEditable):L.contentEditable="false",i&&(L.placeholder=i),d&&(L.after=d),c?n.jsx(n.Fragment,{}):n.jsxs("dl",{...I,children:[o&&n.jsx("dt",{children:o}),n.jsx("dd",{...L,onPaste:T,onInput:N,onKeyDown:E,onContextMenu:y,onBlur:O,suppressContentEditableWarning:!0,children:C.q}),s&&n.jsx("em",{children:s})]})}const Wn=({className:e,title:t,timeout:a=1e3,placeholder:r,edit:i=!0,active:o=!0,value:s,onValue:c,maxLength:l=20})=>{let _=0,d=m.useRef({textContent:s}),g=()=>{d.current.textContent.trim().length===0&&(d.current.textContent=""),clearTimeout(_),_=setTimeout(()=>{var w;return c((w=d.current)==null?void 0:w.textContent)},a)},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()},v=w=>{w.preventDefault(),navigator.clipboard.readText().then(N=>{if(l){let T=w.target.textContent.length;if(T>=l)return;l-=T,N=N.slice(0,l)}window.document.execCommand("insertText",!1,N.replace(/(\r\n|\n|\r)/gm," "))}).catch(N=>{})},x=()=>{d.current.textContent=d.current.textContent.trim()};const b={};b.field="search",e&&(b.className=e);const k={};return r&&(k.placeholder=r),n.jsxs("dl",{...b,children:[t&&n.jsx("dt",{children:t}),n.jsx("dd",{ref:d,onPaste:v,onInput:g,onKeyDown:h,onBlur:x,contentEditable:i&&o?G.ContentEditable:"false",...k,suppressContentEditableWarning:!0,children:s}),n.jsx("svg",{"aria-label":"icon",onClick:f,viewBox:"0 0 24 24",children:n.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"})}),n.jsx("svg",{"action-type":"delete",onClick:f,viewBox:"0 0 24 24",children:n.jsx("path",{d:"M17 6L6 17M6 6L17 17"})})]})};function It({title:e,error:t,edit:a=!0,active:r=!0,hide:i,value:o=0,onValue:s,options:c,placeholder:l="",className:_,name:d,after:g,view:f,order:h,isReload:v=!1}){var O,I;const x=m.useRef(),[b,k]=m.useState(o),[w,N]=m.useState(c);m.useEffect(()=>{k(o),N(c)},[o,c]),i=!!(i&&(o===0||((O=w==null?void 0:w[o])==null?void 0:O.n)===void 0))&&!(a&&r);let M=L=>{k(L),s&&s({value:L,name:d,reload:v})},y=L=>{if(Object.keys(w||{}).length===0||!(a&&r))return;const D=L.target.getBoundingClientRect();ce.setListener("form",n.jsx(ts,{parent:D,onValue:M,view:f,className:_,options:w,order:h},new Date().getTime()))},C={field:"select",className:_},E={onClick:y};return l&&(E.placeholder=l),g&&(E.after=g),a&&r&&(E.edit=""),i?"":n.jsxs("dl",{...C,children:[e&&n.jsx("dt",{children:e}),n.jsx("dd",{...E,ref:x,children:(I=w==null?void 0:w[b])==null?void 0:I.n}),Object.keys(w||{}).length!==0&&n.jsx("s",{children:n.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:n.jsx("path",{d:"m5.25 8.625 6.75 6.75 6.75-6.75"})})}),t&&n.jsx("em",{children:t})]})}const ts=({onValue:e,parent:t,view:a,className:r,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,g=window.innerWidth-t.x<265?t.x-235:t.x;return n.jsx(n.Fragment,{children:s?n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-select":"backdrop",onClick:l},new Date().getTime()),n.jsx("div",{className:r,"data-select":"background "+a,style:{top:d+"px",left:g+"px",width:t.width},children:n.jsx(ns,{order:o,options:i,link:_})})]}):""})},ns=({order:e,options:t,link:a})=>e?n.jsx("ul",{children:e.map((r,i)=>t[r].s!==0?n.jsx("li",{onClick:()=>{a(r)},children:t[r].n},i):"")}):n.jsx("ul",{children:Object.keys(t).map((r,i)=>t[r].s!==0?n.jsx("li",{onClick:()=>{a(r)},children:t[r].n},i):"")});function Dt(e){let t=()=>e.title?n.jsx("dt",{children:e.title}):"",a=()=>e.error?n.jsx("em",{children:e.error}):"",r=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))&&!(r&&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),g=h=>{if(!(r&&i))return;const v=h.target.getBoundingClientRect();ce.setListener("form",n.jsx(as,{parent:v,onValue:l,view:e.view,options:e.options},new Date().getTime()))};const f={};return c&&(f.placeholder=c),s?n.jsx(n.Fragment,{}):n.jsxs("dl",{"data-form":"select",children:[t(),n.jsx("dd",{onClick:g,"data-edit":(r&&i)+"",...f,children:_}),a()]})}const as=({onValue:e,parent:t,view:a,options:r})=>{let[i,o]=m.useState(!0),s=()=>{o(!1)},c=g=>{o(!1),e(g)},l=Object.keys(r).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 n.jsx(n.Fragment,{children:i?n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-select":"backdrop",onClick:s},new Date().getTime()),n.jsx("div",{"data-select":"background "+a,style:{top:_+"px",left:d+"px",width:t.width},children:n.jsx("ul",{children:Object.keys(r).map((g,f)=>n.jsx("li",{onClick:()=>{c(g)},children:r[g]},f))})})]}):""})};function Nt({set:e,value:t,onValue:a,name:r,placeholder:i="",title:o="",error:s="",hide:c=!1,edit:l=!0,show:_=!0,active:d=!0,after:g="",view:f,module:h,item:v,className:x=""}){let b={};switch(e){case"Input":return n.jsx(ze,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:a,name:r,placeholder:i,className:x});case"Select":return v&&(b=be.getSelect(parseInt(v))?be.getSelect(parseInt(v)):{0:{s:"1",n:"не известно"}}),n.jsx(It,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:parseInt(t||"0"),onValue:a,name:r,placeholder:i,className:x,options:b});case"Users":return be.getSelect("user"),n.jsx(Dt,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:a,name:r,placeholder:i,className:x,options:b});case"Date":return n.jsx(wt,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:a,name:r,placeholder:i,className:x});case"Phone":return n.jsx(Et,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:a,name:r,placeholder:i,className:x});case"Number":return n.jsx(Ct,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:a,name:r,placeholder:i,className:x});case"Money":return n.jsx(jt,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:a,name:r,placeholder:i,className:x});case"Modal":return n.jsx(kt,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:a,name:r||"",placeholder:i,className:x,options:b,module:h||""})}}function Gn({value:e,onValue:t,name:a,placeholder:r="",title:i="",error:o="",hide:s=!1,edit:c=!0,active:l=!0,after:_="",show:d=!0,view:g,maxLength:f,onSave:h,className:v=""}){let x=!!(s&&(e===""||e===void 0));if(!(c&&l)&&!d||!(c&&l)&&x)return"";let b=M=>{t&&t({value:M.target.innerText,name:a})},k=M=>{h&&h({value:M.target.innerText,name:a})},w=M=>{M.preventDefault(),navigator.clipboard.readText().then(y=>{if(f){let C=M.target.textContent.length;if(C>=f)return;f-=C,y=y.slice(0,f)}window.document.execCommand("insertText",!1,y)}).catch(y=>{})};const N={};N.field="text",v&&(N.className=v);const T={};return r&&(T.placeholder=r),n.jsxs("dl",{...N,children:[i&&n.jsx("dt",{children:i}),n.jsx("dd",{onPaste:w,onBlur:k,onInput:b,contentEditable:c&&l?G.ContentEditable:"false",...T,suppressContentEditableWarning:!0,children:e}),o&&n.jsx("em",{children:o})]})}function Kn({value:e,onValue:t,name:a,placeholder:r="",title:i="",error:o="",hide:s=!1,edit:c=!0,active:l=!0,after:_="",show:d=!0,view:g,onSave:f,className:h=""}){let v=!!(s&&(e===""||e===void 0)),x=K.Date(e===void 0?new Date:e,"HH:MM"),b=m.useRef(null);if(!(c&&l)&&!d||!(c&&l)&&v)return"";let k=y=>{b.current.textContent=y,t&&t({value:y,name:a})},w=y=>{f&&f({value:y,name:a})},N=y=>{const C=y.target.getBoundingClientRect(),E=C.left,O=C.top;ce.setListener("form",n.jsx(rs,{positions:{x:E,y:O},onSave:w,onValue:k,date:x},new Date().getTime()))};const T={};T.field="input",h&&(T.className=h);const M={};return r&&(M.placeholder=r),n.jsx(n.Fragment,{children:g==="icon"?n.jsx("i",{"data-icon":"F043",onClick:N}):n.jsxs("dl",{...T,children:[i?n.jsx("dt",{children:i}):"",n.jsx("dd",{onClick:N,ref:b,...M,children:x}),o?n.jsx("em",{children:o}):""]})})}const rs=({positions:e,onSave:t,onValue:a,date:r})=>{let i=r.split(":"),o={h:K.Number(2,i[0]),m:K.Number(2,i[1])},s="hour",[c,l]=m.useState({}),_=!1,d=0,g=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},v=()=>{_=!1,s=s==="hour"?"time":"hour",f.body.current.setAttribute("active",s)},x=y=>{if(_){let E=Math.atan2(y.pageX-(c.x+78),y.pageY-(c.y+78))*(180/Math.PI)*-1+180;f[s].current.style.transform="rotate("+E+"deg)",s==="hour"?(o={...o,h:K.Number(2,parseInt(String(E/15),10))},f.hourText.current.textContent=o.h):(o={...o,m:K.Number(2,parseInt(String(E/6),10))},f.timeText.current.textContent=o.m),a(o.h+":"+o.m)}},b=y=>{if(s==="hour")if(y.deltaY>0){d+=y.deltaY;let C=parseInt(String(d/50));if(g!==C){g=C;let E=parseInt(o.h,10)+1;E=E>23?0:E,o={...o,h:K.Number(2,E)},f.hourText.current.textContent=o.h,f[s].current.style.transform="rotate("+o.h*15+"deg)"}}else{d-=y.deltaY;let C=parseInt(String(d/50));if(g!==C){g=C;let E=parseInt(o.h,10)-1;E=E<0?23:E,o={...o,h:K.Number(2,E)},f.hourText.current.textContent=o.h,f[s].current.style.transform="rotate("+o.h*15+"deg)"}}else if(y.deltaY>0){d+=y.deltaY;let C=parseInt(String(d/50));if(g!==C){g=C;let E=parseInt(o.m,10)+1;E=E>59?0:E,o={...o,m:K.Number(2,E)},f.timeText.current.textContent=o.m,f[s].current.style.transform="rotate("+o.m*6+"deg)"}}else{d-=y.deltaY;let C=parseInt(String(d/50));if(g!==C){g=C;let E=parseInt(o.m,10)-1;E=E<0?59:E,o={...o,m:K.Number(2,E)},f.timeText.current.textContent=o.m,f[s].current.style.transform="rotate("+o.m*6+"deg)"}}a(o.h+":"+o.m)},[k,w]=m.useState(!0),N=()=>{w(!1),t(o.h+":"+o.m)},T=window.innerHeight-e.y+33<320?e.y-312:e.y+33,M=window.innerWidth-e.x<265?e.x-235:e.x;return n.jsx(n.Fragment,{children:k?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:xe.o,onClick:()=>N()},new Date().getTime()),n.jsxs("div",{className:xe.c,onMouseDown:h,onMouseUp:v,onMouseMove:x,onWheel:b,ref:f.body,style:{top:T+"px",left:M+"px"},children:[n.jsx("div",{className:"b"}),n.jsxs("div",{className:"s",children:[n.jsx("span",{className:["hour",s==="hour"?xe.as:xe.ap].join(" "),ref:f.hourText,children:o.h})," ",":"," ",n.jsx("span",{className:["min",s==="time"?xe.as:xe.ap].join(" "),ref:f.timeText,children:o.m})]}),n.jsx("div",{className:"h",ref:f.hour}),n.jsx("div",{className:"t",ref:f.time})]})]}):""})};function Yn({onValue:e,label:t,value:a,title:r,className:i,name:o,text:s,id:c,reload:l}){const[_,d]=m.useState(!!a),g=t||r;m.useEffect(()=>{d(!!a)},[a]);let f=()=>{e&&e({value:_?0:1,name:o,id:c}),d(!_)};const h={};return h.field="check",i&&(h.className=i),n.jsxs("dl",{...h,children:[g?n.jsx("dt",{children:g}):"",n.jsxs("dd",{onClick:f,children:[n.jsx("span",{children:s}),n.jsx("div",{role:"switch","aria-checked":`${_?"true":"false"}`})]})]})}const is=({label:e,onValue:t,value:a,name:r,item:i})=>{const[o,s]=m.useState(!!a);m.useEffect(()=>{s(!!a)},[a]);let c=()=>{let l=parseInt(o)===0?1:0;s(l),t({value:l,name:r,key:i,item:i})};return n.jsx("div",{role:"switch",onClick:c,"aria-checked":`${o?"true":"false"}`})},Hn=({onValue:e,value:t,name:a,item:r})=>{const[i,o]=m.useState(!!t);m.useEffect(()=>{o(!!t)},[t]);let s=()=>{let c=parseInt(i)===0?1:0;o(c),e({value:c,name:a,key:r,item:r})};return n.jsx("div",{role:"switch",onClick:s,"aria-checked":`${i?"true":"false"}`})};function qn({value:e,onValue:t,name:a,placeholder:r="",title:i="",error:o="",hide:s=!1,edit:c=!0,active:l=!0,after:_="",show:d=!0,view:g,max:f=0,onSave:h,className:v="",separator:x=","}){const[b,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&&b.length>=f)return p.Notice.Error("Слишком много");k([...b,""])},N=L=>{b.splice(L,1),b.length===0&&b.push(""),k([...b]),h!==void 0&&h({value:b.join(x),name:a})},T=!!(s&&(e===""||e===void 0)),M=L=>{};if(!(c&&l)&&!d||!(c&&l)&&T)return"";const y={};y.field="group",v&&(y.className=v);const C=(L,D)=>{G.Blur(L),b[D]=L.target.textContent,h&&h({value:b.join(x),name:a})};let E=(L,D)=>{b[D]=L.target.textContent,t&&t({value:b.join(x),name:a})},O=L=>{L.key==="Enter"&&L.preventDefault()};const I=({data:L})=>f!==0&&L.length>=f?"":n.jsx("i",{onClick:w,children:n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",children:[n.jsx("path",{d:"M12 5.25v13.5"}),n.jsx("path",{d:"M18.75 12H5.25"})]})});return n.jsxs("dl",{...y,children:[n.jsxs("dt",{children:[i,n.jsx(I,{data:b})]}),n.jsx("dd",{children:b.map((L,D)=>n.jsxs("li",{className:"field_group_item",children:[n.jsx("span",{onInput:j=>E(j,D),edit:"true",name:a,placeholder:r,onPaste:M,contentEditable:c&&l?G.ContentEditable:"false",onKeyDown:O,onBlur:j=>C(j,D),suppressContentEditableWarning:!0,children:b[D]}),n.jsx("i",{onClick:()=>{N(D)},children:n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",children:[n.jsx("path",{d:"M17.25 17.25 6.75 6.75"}),n.jsx("path",{d:"m17.25 6.75-10.5 10.5"})]})})]},D))}),o&&n.jsx("em",{children:o})]})}const os=e=>(e=e!==void 0&&e!==""?e.split(","):[],e.reduce((t,a)=>(t[a]=!0,t),{}));function Jn({value:e,onValue:t,name:a,placeholder:r="",title:i,error:o,hide:s=!1,edit:c=!0,show:l=!0,active:_=!0,outFormat:d="",after:g="",view:f,modal:h,module:v,options:x,className:b}){const[k,w]=m.useState(os(e)),N=y=>{if(!(c&&_)||!h)return;let C=h.split(".");p.Modal.Open(C[0],C[1],{callback:E=>{if(t)switch(d){case"array":t({value:Object.keys(E),name:a});break;case"string":t({value:Object.keys(E).join(","),name:a});break;default:t({value:E,name:a})}w(E)},onValue:t,options:x,name:a,value:k})},T={};T.field="group",b&&(T.className=b);const M={};return r&&(M.placeholder=r),s?n.jsx(n.Fragment,{}):n.jsxs("dl",{...T,children:[n.jsxs("dt",{children:[i,n.jsx("i",{onClick:N,children:n.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:n.jsx("path",{d:"M12 5.25v13.5M18.75 12H5.25"})})})]}),n.jsx("dd",{...M,onClick:N,edit:(c&&_)+"","data-after":g,children:Object.keys(k).map(y=>{var C;return n.jsx("div",{className:"field_group_item",children:(C=x[y])==null?void 0:C.label},y)})}),o&&n.jsx("em",{children:o})]})}function Xn({value:e,onValue:t,name:a,placeholder:r="",title:i="",link:o="",error:s="",hide:c=!1,edit:l=!0,active:_=!0,after:d="",show:g=!0,type:f,view:h,onSave:v,className:x=""}){const b=m.useId();let k=!!(c&&(e===""||e===void 0)),[w,N]=m.useState(o);if(!(l&&_)&&!g||!(l&&_)&&k)return"";const T=async y=>{if(f){let C=ls(y,f,e||"default");t==null||t({name:a,value:C}),N(URL.createObjectURL(C))}else t==null||t({name:a,value:y}),N(URL.createObjectURL(y))},M={};return M.field="file",x&&(M.className=x),n.jsxs("dl",{...M,children:[i&&n.jsxs("dt",{children:[i," "]}),n.jsxs(ss,{onFiles:T,children:[n.jsx("input",{id:b,type:"file",multiple:!0,onChange:y=>{y.target.files[0]&&T(y.target.files[0])}}),n.jsx("label",{htmlFor:b}),n.jsx("img",{src:w})]}),s&&n.jsx("em",{children:s})]})}const ss=({children:e,onFiles:t})=>{const a=m.useRef(null);return m.useEffect(()=>{if(a.preventDefaults)return;a.preventDefaults=i=>{i.preventDefault(),i.stopPropagation()},a.highlight=i=>{},a.unhighlight=i=>{},a.onHandleDrop=i=>{let c=i.dataTransfer.files[0];t&&t(c)};let r=a.current;["dragenter","dragover","dragleave","drop"].forEach(i=>{r.addEventListener(i,a.preventDefaults,!1),document.body.addEventListener(i,a.preventDefaults,!1)}),["dragenter","dragover"].forEach(i=>{r.addEventListener(i,a.highlight,!1)}),["dragleave","drop"].forEach(i=>{r.addEventListener(i,a.unhighlight,!1)}),r.addEventListener("drop",a.onHandleDrop,!1)},[]),n.jsx("dd",{ref:a,children:e})},ls=(e,t,a)=>{var r=document.getElementsByTagName("body")[0],i=document.createElement("canvas");r.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=ds(c,a);return i.remove(),l}),s.src=URL.createObjectURL(e)};function ds(e,t){let a=e.split(","),r=a[0].match(/:(.*?);/)[1],i=atob(a[1]),o=i.length,s=new Uint8Array(o);for(;o--;)s[o]=i.charCodeAt(o);return new File([s],t,{type:r})}function Vn({name:e,value:t,title:a,style:r,className:i}){let o={field:"progress"};return r&&(o.style=r),i&&(o.className=i),n.jsxs("dl",{...o,children:[a&&n.jsx("dt",{children:a}),n.jsx("dd",{})]})}const _e={};function cs(e){const[t,a]=m.useState({}),r=m.useRef(e);return _e.u=i=>{r.current={...r.current,[i.name]:i.value}},_e.n=i=>{r.current=i,a(Date.now())},_e.r=()=>{a(Date.now())},[r.current,_e.n]}function _s(e){_e.u(e),e.reload&&_e.r()}function us(){_e.r&&_e.r()}function fs(e){const[t,a]=m.useState({}),r=m.useRef(e);return _e.u=i=>{r.current={...r.current,[i.name]:i.value}},_e.n=i=>{Object.keys(i).length>0?Object.keys(i).forEach(o=>{r.current[o]=i[o]}):r.current={},a(Date.now())},_e.r=()=>{a(Date.now())},[r.current,_e.n]}const ms={Color:zn,Date:wt,Mask:Xn,Image:Xn,Code:On,Check:Yn,Switch:$n,Input:ze,Button:Ln,Message:An,Generator:Fn,Captcha:Pn,Modal:kt,Money:jt,Month:Rn,Notes:Zn,Number:Ct,Password:Un,Phone:Et,Search:Wn,Select:It,Set:Nt,Textarea:Gn,Time:Kn,Users:Dt,String:ze,Form:Nt,runReload:us,useData:cs,setValue:_s,Palette:is,Toogle:Hn,Group:qn,Options:Jn,useError:fs,Progress:Vn};function ps({value:e="",onValue:t,onSave:a,name:r,format:i="+_(___) ___-__-__",placeholder:o="",title:s="",error:c="",hide:l=!1,edit:_=!0,active:d=!0,after:g="",show:f=!0,view:h,className:v=""}){_=_!==void 0?_:!0,d=d!==void 0?d:!0,l=!!(l&&(e===""||e===void 0))&&!(_&&d),m.useRef(null);let b=i,k=!0,w=0,N=(j,$)=>{let U=document.createRange(),Q=window.getSelection();U.setStart($.childNodes[0],j),U.collapse(!0),Q.removeAllRanges(),Q.addRange(U),$.focus()},T=j=>{j.preventDefault(),navigator.clipboard.readText().then($=>{window.document.execCommand("insertText",!1,$)}).catch($=>{})},M=j=>{let $=0,U="",Q=j.replace(/\D/g,"");Q===""&&(k=!0);let le=Q.split(""),ve="";le.forEach(Ve=>{k&&(ve+=Ve,k&&(w=(""+ve).length,b=i.replace(new RegExp("[0-9]","g"),"_"),U=""),w>(""+ve).length&&(k=!0,b=i.replace(new RegExp("[0-9]","g"),"_"),U=""))});let Ne=b.replace(/\D/g,"");return Ne.length>=Q.length&&(Q=Ne),{q:b.replace(/[_\d]/g,function(){return Q.charAt($++)||"_"}),i:$,v:Q,f:U}},y=j=>{j.preventDefault(),navigator.clipboard.writeText(j.target.textContent.replace(/\D/g,"")).then(function(){p.Notice.Copy("Данные в буфер обмене")},function($){})},C=M(e),E=j=>{let $=M(j.target.textContent);j.target.textContent=$.q,$.i=$.q.lastIndexOf($.v.substr(-1)),$.i<$.q.length&&$.q!==b?$.i++:$.i=$.q.indexOf("_"),N($.i,j.target),t&&t({value:$.q.replace(/\D/g,""),name:r})},O=j=>{j.key==="Enter"&&j.preventDefault()};const I=j=>{G.Blur(j),a&&a({value:j.target.textContent.replace(/\D/g,""),name:r})},L={};L.field="input",v&&(L.className=v);let D={};return _&&d?(D.edit="true",D.contentEditable=G.ContentEditable):D.contentEditable="false",o&&(D.placeholder=o),g&&(D.after=g),l?n.jsx(n.Fragment,{}):n.jsxs("dl",{...L,children:[s&&n.jsx("dt",{children:s}),n.jsx("dd",{...D,onPaste:T,onInput:E,onKeyDown:O,onContextMenu:y,onBlur:I,suppressContentEditableWarning:!0,children:C.q}),c&&n.jsx("em",{children:c})]})}const gs={Color:zn,Date:wt,Code:On,Check:Yn,Switch:$n,Input:ze,Button:Ln,Message:An,Generator:Fn,Captcha:Pn,Modal:kt,Money:jt,Mask:ps,Month:Rn,Notes:Zn,Number:Ct,Password:Un,Phone:Et,Search:Wn,Select:It,Set:Nt,Textarea:Gn,Time:Kn,Users:Dt,String:ze,Toogle:Hn,Group:qn,Options:Jn,Progress:Vn},Qn={spinner:"_spinner_o487n_1",l:"_l_o487n_75",loadingB:"_loadingB_o487n_1"};function hs(){return n.jsx("div",{className:Qn.spinner,children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 483 484",children:n.jsx("path",{d:"M264,492a22.2,22.2,0,0,0,22-22V411a22.2,22.2,0,0,0-22-22H236a22.2,22.2,0,0,0-22,22v59a22.2,22.2,0,0,0,22,22Zm74-134a23.9,23.9,0,0,0-6,16,20.35,20.35,0,0,0,6,15l42,42q7,7,16,7,10,0,16-7l20-20a20.35,20.35,0,0,0,6-15,23.9,23.9,0,0,0-6-16l-42-42q-7-7-16-7-8,0-15,7ZM163,389a18.94,18.94,0,0,0,7-15q0-9-7-16l-20-20q-7-7-16-7-8,0-15,7L70,380q-7,7-7,16a18.94,18.94,0,0,0,7,15l20,20q7,7,16,7a18.94,18.94,0,0,0,15-7ZM112,237a22.2,22.2,0,0,0-22-22H31a21.17,21.17,0,0,0-15.5,6.5A21.17,21.17,0,0,0,9,237v28a21.17,21.17,0,0,0,6.5,15.5A21.17,21.17,0,0,0,31,287H90a22.2,22.2,0,0,0,22-22Zm358,50a22.2,22.2,0,0,0,22-22V237a22.2,22.2,0,0,0-22-22H411a22.2,22.2,0,0,0-22,22v28a22.2,22.2,0,0,0,22,22ZM163,142q7-7,7-15.5T163,111L121,69q-7-7-15-7-7,0-16,7L70,89q-7,7-7,16a18.94,18.94,0,0,0,7,15l42,42a18.94,18.94,0,0,0,15,7q10,0,16-7Zm269-22a20.35,20.35,0,0,0,6-15,23.9,23.9,0,0,0-6-16L412,69q-7-7-16-7-7,0-16,7l-42,42q-7,8-7,16t7,15l21,20a18.94,18.94,0,0,0,15,7q10,0,16-7Zm-168-9a22.06,22.06,0,0,0,15.5-6q6.5-6,6.5-16V30a21.17,21.17,0,0,0-6.5-15.5A21.17,21.17,0,0,0,264,8H236a21.17,21.17,0,0,0-15.5,6.5A21.17,21.17,0,0,0,214,30V89q0,10,6.5,16a22.06,22.06,0,0,0,15.5,6Z",transform:"translate(-9 -8)"})})})}function xs(){return n.jsxs("div",{className:Qn.l,children:[n.jsx("i",{}),n.jsx("i",{}),n.jsx("i",{})]})}const bs={Spinner:hs,Inline:xs},ea={ph:"_ph_1wjxu_1",e:"_e_1wjxu_5"},vs=({title:e,affter:t,onDynamicURL:a,children:r,button:i,page:o,tabs:s=[],className:c="",modules:l,loading:_})=>{const[d]=p.Router.useTabs(s.map(h=>h.id).includes(p.Router.getTabs())?p.Router.getTabs():o),[g,f]=m.useState(!1);return m.useEffect(()=>{f(!0)},[]),n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:[ea.ph,c].join(" "),children:[n.jsx(ks,{title:e,affter:t}),n.jsx("div",{className:ea.e}),n.jsx(ws,{button:i})]}),s.length>0&&n.jsx(jn,{list:s,active:d}),r,g&&n.jsx(ys,{onDynamicURL:a,loading:_,m:l,t:d})]})};let ys=({m:e,t,loading:a,onDynamicURL:r})=>{const i=m.lazy(()=>We(e+"/pages/"+t+".tsx"));return r&&r((e+"/"+t).toLowerCase()),n.jsx(m.Suspense,{fallback:a,children:n.jsx(i,{})})},ws=({button:e})=>{const[t,a]=m.useState(e);return xt("button",a),n.jsxs(n.Fragment,{children:[" ",t]})},ks=({title:e,affter:t})=>{const[a,r]=m.useState(n.jsxs(n.Fragment,{children:[e," ",t]}));return xt("title",r),n.jsx("h2",{children:a})};const js={Lite:vs},ta={s:"_s_t9swc_1"};let Tt;function Cs({className:e,placeholder:t}){let a=s=>{Tt(s.target.textContent)},r=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?[ta.s,e].join(" "):ta.s,n.jsx("div",{onPaste:i,onInput:a,onKeyDown:r,contentEditable:"plaintext-only",...o,suppressContentEditableWarning:!0})}function Ss(e,t,a){let r=[],i=1,o=0,s={},c=50;return s[i]=[],e.forEach(l=>{l.text.toLowerCase().indexOf(t)>-1&&r.push(l.id)}),r.forEach(l=>{o++,o<=c||(i++,o=1,s[i]=[]),s[i].push(a[l])}),s}function Es(e){Tt=e}function Is(e){Tt=e}const Ds={Field:Cs,Run:Ss,Get:Es,useValue:Is};function Ns(){return n.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[n.jsx("path",{d:"M5.15837 11.491C5.08489 12.887 5.16936 14.373 3.92213 15.3084C3.34164 15.7438 3 16.427 3 17.1527C3 18.1508 3.7818 19 4.8 19H19.2C20.2182 19 21 18.1508 21 17.1527C21 16.427 20.6584 15.7438 20.0779 15.3084C18.8306 14.373 18.9151 12.887 18.8416 11.491C18.6501 7.85223 15.6438 5 12 5C8.35617 5 5.34988 7.85222 5.15837 11.491Z",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"}),n.jsx("path",{d:"M10.5 3.125C10.5 3.95343 11.1716 5 12 5C12.8284 5 13.5 3.95343 13.5 3.125C13.5 2.29657 12.8284 2 12 2C11.1716 2 10.5 2.29657 10.5 3.125Z",stroke:"currentColor",strokeWidth:"1",fill:"none"}),n.jsx("path",{d:"M15 19C15 20.6569 13.6569 22 12 22C10.3431 22 9 20.6569 9 19",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})}function Ts(){return n.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[n.jsx("path",{d:"M4.4094 11.4516C4.62188 7.41446 7.95728 4.25 12 4.25C16.0427 4.25 19.3781 7.41446 19.5906 11.4516C19.5997 11.6241 19.6064 11.7893 19.6129 11.9485C19.6351 12.49 19.6544 12.9615 19.7525 13.4133C19.8698 13.9531 20.0867 14.3775 20.5279 14.7084C21.2972 15.2854 21.75 16.191 21.75 17.1527C21.75 18.534 20.6628 19.75 19.2 19.75H4.8C3.33719 19.75 2.25 18.534 2.25 17.1527C2.25 16.191 2.70278 15.2854 3.47213 14.7084C3.91329 14.3775 4.13025 13.9531 4.24749 13.4133C4.34561 12.9615 4.3649 12.49 4.38705 11.9485V11.9485L4.38705 11.9485C4.39356 11.7893 4.40032 11.6241 4.4094 11.4516Z",fill:"#141B34"}),n.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.5286 1.37434C10.9737 1.08296 11.517 1 12 1C12.483 1 13.0263 1.08296 13.4714 1.37434C13.9652 1.69759 14.25 2.22083 14.25 2.875C14.25 3.47116 14.017 4.09375 13.6626 4.57057C13.3138 5.03989 12.7415 5.5 12 5.5C11.2585 5.5 10.6862 5.03989 10.3374 4.57057C9.98299 4.09375 9.75 3.47116 9.75 2.875C9.75 2.22083 10.0348 1.69759 10.5286 1.37434Z",fill:"#141B34"}),n.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 18C9.55228 18 10 18.4477 10 19C10 20.1046 10.8954 21 12 21C13.1046 21 14 20.1046 14 19C14 18.4477 14.4477 18 15 18C15.5523 18 16 18.4477 16 19C16 21.2091 14.2091 23 12 23C9.79086 23 8 21.2091 8 19C8 18.4477 8.44772 18 9 18Z",fill:"#141B34"})]})}function Ms(){return n.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:n.jsx("path",{d:"M8.85746 12.5061C6.36901 10.6456 4.59564 8.59915 3.62734 7.44867C3.3276 7.09253 3.22938 6.8319 3.17033 6.3728C2.96811 4.8008 2.86701 4.0148 3.32795 3.5074C3.7889 3 4.60404 3 6.23433 3H17.7657C19.396 3 20.2111 3 20.672 3.5074C21.133 4.0148 21.0319 4.8008 20.8297 6.37281C20.7706 6.83191 20.6724 7.09254 20.3726 7.44867C19.403 8.60062 17.6261 10.6507 15.1326 12.5135C14.907 12.6821 14.7583 12.9567 14.7307 13.2614C14.4837 15.992 14.2559 17.4876 14.1141 18.2442C13.8853 19.4657 12.1532 20.2006 11.226 20.8563C10.6741 21.2466 10.0043 20.782 9.93278 20.1778C9.79643 19.0261 9.53961 16.6864 9.25927 13.2614C9.23409 12.9539 9.08486 12.6761 8.85746 12.5061Z",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})})}const Bs={f:"_f_q3r0i_1"};let ue={};function $s(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 a={};return Object.keys(t.data).forEach(i=>{i!=="sort"&&(a[i]=t.data[i],e.take[i]="999")}),{...e,data:a,take:e.take};case"size":return{...e,size:t.size};case"take":let r={[t.list]:t.take};r={...e.take,...r},e.active=!1;for(let i in r)r[i]!=="999"&&(e.active=!0);return ue.get(r,e.active),{...e,take:r,active:e.active};case"exit":for(let i in e.take)e.take[i]="999";return ue.get&&ue.get([],!1),{...e,size:0,active:!1,take:e.take,open:!1};default:throw new Error}}function Ls(){const[e,t]=m.useReducer($s,{open:!1,view:null,data:{},take:{},size:0,active:!1});return ue.set=a=>{t({type:"data",data:a})},ue.count=a=>{t({type:"size",size:a})},ue.reset=()=>{t({type:"exit"})},n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:Bs.f,onClick:()=>{t({type:"open",open:!0})},children:[n.jsx(Ms,{}),e.active&&n.jsxs("i",{children:[e.size,"1"]})]}),e.open?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"filter o",onClick:()=>{t({type:"open",open:!1})}}),n.jsxs("div",{className:"filter m",children:[n.jsx("div",{className:"filter l",children:Object.keys(e.data).map(a=>n.jsx(zs,{data:a,dispatch:t,state:e},a))}),n.jsx("div",{className:"filter b",onClick:()=>{t({type:"exit"})},children:"Убрать фильтер"})]})]}):n.jsx(n.Fragment,{})]})}function As(e){ue.get=e}function Fs(e){ue.set!==void 0&&ue.set(e)}function Ps(e){ue.reset!==void 0&&ue.reset(e)}function Os(e,t,a,r){let i=[],o=1,s=0,c={},l=50;return c[o]=[],r===!0&&(Object.keys(t).forEach(_=>{Number.parseInt(t[_])!==999&&(e=e.filter(d=>Number.parseInt(d[_])===Number.parseInt(t[_])))}),na(e.length)),e.forEach(_=>{i.push(_.id)}),i.forEach(_=>{s++,s<=l||(o++,s=1,c[o]=[]),c[o].push(a[_])}),c}function na(e){ue.count(e)}function zs({data:e,state:t,dispatch:a}){let r=()=>{a({type:"view",view:e})},i=()=>{a({type:"take",list:e,take:"999"})};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"filter s",children:[n.jsxs("div",{onClick:r,children:[" ",t.data[e].name," "]}),t.take[e]!=="999"?n.jsx("div",{onClick:i,className:"filter x","data-icon":"F038"}):""]}),n.jsx("div",{className:"filter u","set-active":(t.view===e)+"",children:Object.keys(t.data[e].list).map((o,s)=>n.jsx(Rs,{data:t.data[e].list[o],head:e,type:o,dispatch:a,state:t},s))})]})}function Rs({data:e,head:t,state:a,dispatch:r,type:i}){if(i!=="999"&&e.count===void 0)return"";const o=()=>{r({type:"take",list:t,take:i})};return n.jsxs("div",{className:"filter a",onClick:o,"set-active":(a.take[t]===i)+"",children:[e.name,n.jsx("div",{className:"filter e",children:e.count})]})}const Zs={Button:Ls,useValue:As,Set:Fs,Run:Os,Count:na,Reset:Ps},Us={n:"_n_euuvm_1"};let Xe={},Mt=[];const Ws=(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 a=e.news.filter(i=>i.id!==t.id);return{...e,news:a,active:a.length!==0};case"size":return{...e,size:t.size};case"take":let r={[t.list]:t.take};r={...e.take,...r},e.active=!1;for(let i in r)r[i]!=="999"&&(e.active=!0);return Xe.get(r,e.active),{...e,take:r,active:e.active};case"exit":return e;default:throw new Error}};function Gs(e){Xe.fn({action:"add",data:e})}function Ks(e){Xe.fn({action:"add",data:e})}function Ys(e){Xe.fn=e}function Hs(){const[e,t]=m.useReducer(Ws,{open:!1,active:!1,news:[],take:{}});Ys(async r=>{switch(r.action){case"add":Mt.push(r.data);break}}),m.useEffect(()=>{setInterval(()=>{Mt.forEach((r,i)=>{t({type:"add",data:{module:r.module,type:r.type,id:r.id,datetime:r.datetime,txt:r.title}}),r.datetime<new Date().getTime()&&Mt.splice(i,1)})},6e4)},[]);let a=async r=>{t({type:"hide",id:r.id})};return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:Us.n,onClick:()=>{t({type:"open",open:!0})},children:e.active?n.jsx(Ts,{}):n.jsx(Ns,{})}),e.open?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"notify-o",onClick:()=>{t({type:"open",open:!1})}}),n.jsxs("div",{className:"notify-m",children:[n.jsx("div",{className:"notify-l",children:e.news.map((r,i)=>n.jsx(qs,{data:r,dispatch:t},i))}),n.jsx("div",{className:"notify-b",onClick:a,children:"История"})]})]}):""]})}const qs=({data:e,dispatch:t})=>{let a=async r=>{t({type:"hide",id:r.id})};return n.jsxs("div",{className:"notify-i",children:[n.jsx("div",{className:"--icon","data-icon":e.type}),n.jsxs("div",{className:"--body",children:[n.jsx("div",{className:"--name",children:e.type}),n.jsx("div",{className:"--text",children:e.txt})]}),n.jsx("div",{className:"--hide","data-icon":"F038",onClick:()=>a(e),children:" "})]})},Js={Bell:Hs,Send:Ks,Add:Gs},aa={p:"_p_djnh1_1",l:"_l_djnh1_38"};function Xs(e){let t=3,a=e.page,r=e.count,i=[],o=()=>{i.push({page:1}),i.push({text:"..."})},s=()=>{i.push({text:"..."}),i.push({page:r})},c=(l,_)=>{for(let d=l;d<_;d++)i.push({page:d})};return r<t*2+6?c(1,r+1):a<t*2+1?(c(1,t*2+4),s()):a>r-t*2?(t=r>1e4?1:t,o(),c(r-t*2-2,r+1)):(t=r>1e4?1:t,o(),c(a-t,a+t+1),s()),i.length===1?n.jsx(n.Fragment,{}):n.jsxs("div",{className:aa.p,children:[n.jsx("i",{onClick:()=>e.onChangePage(a-1),children:n.jsx("svg",{viewBox:"0 0 24 24",children:n.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)}),n.jsx("i",{onClick:()=>e.onChangePage(a+1),children:n.jsx("svg",{viewBox:"0 0 24 24",children:n.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 Vs(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 ra({load:e,list:t,item:a}){const r=m.useRef(null),[i,o]=m.useReducer(Vs,{load:!1,list:[],data:{},page:1,wait:!1,item:a});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]),n.jsxs(n.Fragment,{children:[n.jsx("div",{className:aa.l,ref:r,children:n.jsx(Mn,{"el-empty":"Данные не найдены",children:i.load&&i.list!==void 0?i.list.map(c=>n.jsx(i.item,{data:c},c.id)):n.jsxs("div",{"type-data":"load",children:[n.jsx("i",{}),n.jsx("i",{}),n.jsx("i",{})]})})}),i.load&&i.list!==void 0?n.jsx(Xs,{page:i.page,count:i.size,onChangePage:s}):n.jsx(n.Fragment,{})]})}const Qs={Pagination:ra};function el({head:e,load:t,list:a,item:r}){const i=e;return n.jsxs(n.Fragment,{children:[n.jsx(i,{}),Ke.getSetting("s05")===1?n.jsx(ra,{list:a,load:t,item:r}):n.jsx(Bn,{list:a,load:t,item:r})]})}function tl(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 Bt={};function nl(e){Bt.get=e}function al(e){Bt.get&&Bt.get(e)}const rl={View:el,Reducer:tl,useValue:nl,Lite:Nn,setValue:al},il={addDictionary:Gi,getDictionary:Hi,setDictionary:Yi,current:qi};async function ol(){let e=await un(),t={};return Object.keys(e).forEach(a=>{t[e[a].id]={},t[e[a].id].name=e[a].a}),t}const sl={Get:ol},ll=function({title:e,children:t,imp:a,button:r,page:i,tabs:o,modules:s}){const[c]=p.Router.useTabs(i),[l,_]=m.useState(!1);return m.useEffect(()=>{_(!0)},[]),n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"list-info",children:[n.jsx("h2",{children:e}),n.jsx("div",{className:"empty"}),n.jsx(cl,{button:r})]}),l&&n.jsx(dl,{imp:a,modules:s,t:c}),t]})};let dl=({modules:e,t})=>{const a=m.lazy(()=>We(e+"/pages/"+t+".tsx"));return n.jsx(m.Suspense,{fallback:"",children:n.jsx(a,{})})},cl=({button:e})=>{const[t,a]=m.useState(e);return ce.useListener("button",a),n.jsxs(n.Fragment,{children:[" ",t]})};const _l={Open:zi};function ul({active:e,onActive:t,id:a,name:r}){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:r,id:a,setActive:o})};return n.jsx("div",{role:"switch",onClick:s,"aria-checked":`${i?"true":"false"}`})}p.Action=Cn,p.Animation=ji,p.Badge=Wo,p.Bookmarks=wo,p.Browser=io,p.Button=wn,p.Chart=yo,p.Company=sl,p.Component=_t,p.DataBase=Yo,p.Event=ce,p.Events=ce,p.Files=Vo,p.Filter=Zs,p.Form=ms,p.Format=K,p.HotKey=qo,p.Icon=Do,p.Init=yn,p.Input=gs,p.Lang=il,p.Layout=js,p.List=rl,p.Lite=Bo,p.Loading=bs,p.Notifications=Js,p.Pagination=Qs,p.Phone=_l,p.Root=Dn,p.Scrolling=Bn,p.Search=Ds,p.Setting=bo,p.Sistym=Ho,p.Store=be,p.Switch=ul,p.Tabs=_o,p.Test=ll,p.Triage=Ro,p.User=Ke,p.WebRTC=H,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
31
+ <%s key={someKey} {...props} />`,Zt,Ee,Pl,Ee),ba[Ee+Zt]=!0}}return u===r?Bl(V):Ml(V),V}}function $l(u,S,B){return va(u,S,B,!0)}function Ll(u,S,B){return va(u,S,B,!1)}var Al=Ll,Fl=$l;$e.Fragment=r,$e.jsx=Al,$e.jsxs=Fl}()),$e}process.env.NODE_ENV==="production"?ot.exports=Ha():ot.exports=qa();var n=ot.exports;const Ja={notice:"_notice_13j98_2",error:"_error_13j98_11",success:"_success_13j98_14",remark:"_remark_13j98_17",copy:"_copy_13j98_20","show-notice":"_show-notice_13j98_1","hide-notice":"_hide-notice_13j98_1"};let pe={};function Le({data:e}){let[t,a]=m.useState("show");m.useEffect(()=>{e.hide&&(setTimeout(function(){a("hide")},1800),setTimeout(function(){pe.del(e.key)},2500))},[e.key]);let r,i;switch(e.type){case"error":r=n.jsx(Ce.error,{}),i="Ошибка:";break;case"success":r=n.jsx(Ce.success,{}),i="Информация:";break;case"copy":r=n.jsx(Ce.success,{}),i="Копирование:";break;case"remark":r=n.jsx(Ce.success,{}),i="Подсказка:";break;default:r=n.jsx(Ce.success,{}),i="Предупреждение:";break}return n.jsxs("li",{className:"item "+e.type,"data-status":t,children:[r,n.jsx("b",{children:i}),n.jsx("p",{children:e.text})]})}function Xa({data:e}){let[t,a]=m.useState("show");return m.useEffect(()=>{e.hide&&(setTimeout(function(){a("hide")},1800),setTimeout(function(){pe.del(e.key)},2500))},[e.key]),n.jsx("li",{className:"item","data-status":t,children:e.text})}const Ce={};Ce.error=()=>n.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[n.jsx("path",{d:"M12 22C7.28595 22 4.92893 22 3.46447 20.5355C2 19.0711 2 16.714 2 12C2 7.28595 2 4.92893 3.46447 3.46447C4.92893 2 7.28595 2 12 2C16.714 2 19.0711 2 20.5355 3.46447C22 4.92893 22 7.28595 22 12C22 16.714 22 19.0711 20.5355 20.5355C19.0711 22 16.714 22 12 22Z",fill:"#bb2014"}),n.jsx("path",{d:"M8.96967 8.96967C9.26256 8.67678 9.73744 8.67678 10.0303 8.96967L12 10.9394L13.9697 8.96969C14.2626 8.6768 14.7374 8.6768 15.0303 8.96969C15.3232 9.26258 15.3232 9.73746 15.0303 10.0303L13.0607 12L15.0303 13.9697C15.3232 14.2625 15.3232 14.7374 15.0303 15.0303C14.7374 15.3232 14.2625 15.3232 13.9696 15.0303L12 13.0607L10.0304 15.0303C9.73746 15.3232 9.26258 15.3232 8.96969 15.0303C8.6768 14.7374 8.6768 14.2626 8.96969 13.9697L10.9394 12L8.96967 10.0303C8.67678 9.73744 8.67678 9.26256 8.96967 8.96967Z",fill:"#fff"})]}),Ce.success=()=>n.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[n.jsx("path",{d:"M12 22C7.28595 22 4.92893 22 3.46447 20.5355C2 19.0711 2 16.714 2 12C2 7.28595 2 4.92893 3.46447 3.46447C4.92893 2 7.28595 2 12 2C16.714 2 19.0711 2 20.5355 3.46447C22 4.92893 22 7.28595 22 12C22 16.714 22 19.0711 20.5355 20.5355C19.0711 22 16.714 22 12 22Z",fill:"#367738"}),n.jsx("path",{d:"M16.0303 8.96967C16.3232 9.26256 16.3232 9.73744 16.0303 10.0303L11.0303 15.0303C10.7374 15.3232 10.2626 15.3232 9.96967 15.0303L7.96967 13.0303C7.67678 12.7374 7.67678 12.2626 7.96967 11.9697C8.26256 11.6768 8.73744 11.6768 9.03033 11.9697L10.5 13.4393L14.9697 8.96967C15.2626 8.67678 15.7374 8.67678 16.0303 8.96967Z",fill:"#fff"})]}),p.Notice=void 0,(e=>{function t(){let[l,_]=m.useState([]);return pe.set=d=>{_([...l,d])},pe.del=d=>{_(l.filter(g=>g.key!==d))},l.length===0?"":n.jsx("ul",{id:"notice",className:Ja.notice,children:l.map(d=>d.item)})}e.Init=t;function a(l,_=!0){let d=Date.now(),g={key:d,text:l,hide:_,type:"error"};pe.set({item:n.jsx(Le,{data:g},d),key:d})}e.Error=a;function r(l,_=!0){let d=Date.now(),g={key:d,text:l,hide:_,type:"success"};pe.set({item:n.jsx(Le,{data:g},d),key:d})}e.Success=r;function i(l,_=!0){let d=Date.now(),g={key:d,hide:_,text:l};pe.set({item:n.jsx(Xa,{data:g},d),key:d})}e.Custom=i;function o(l){let _=Date.now(),d={key:_,hide:!0,...l};pe.set({item:n.jsx(Le,{data:d},_),key:_})}e.Send=o;function s(l,_=!0){let d=Date.now(),g={key:d,text:l,hide:_,type:"remark"};pe.set({item:n.jsx(Le,{data:g},d),key:d})}e.Remark=s;function c(l,_=!0){let d=Date.now(),g={key:d,text:l,hide:_,type:"copy"};pe.set({item:n.jsx(Le,{data:g},d),key:d})}e.Copy=c})(p.Notice||(p.Notice={}));const st={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 Ae={};const Va=({data:e,callback:t,cancel:a})=>(e.button=e.button===void 0?"Подтвердить":e.button,n.jsxs("div",{className:st.alerts,children:[n.jsxs("dl",{children:[n.jsx("dt",{children:e.title}),n.jsx("dd",{children:e.text}),n.jsx("ul",{children:n.jsx("button",{color:e.color||"blue",onClick:()=>{t(),Ae.del()},children:e.button})})]}),n.jsx("div",{className:st["--body"],onClick:()=>{a==null||a(),Ae.del()}})]}));p.Alert=void 0,(e=>{function t(){let[i,o]=m.useState("");return Ae.set=s=>o(s),Ae.del=()=>o(""),n.jsx(n.Fragment,{children:i})}e.Init=t;function a(i,o,s){Ae.set(n.jsx(Va,{data:i,callback:o,cancel:s}))}e.Send=a;function r({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 n.jsxs("div",{className:st.al,..._,children:[n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",fillRule:"evenodd",clipRule:"evenodd",children:n.jsx("path",{fill:"#fff",d:"M10.362 2.015C11.4264 1.66167 12.5736 1.66167 13.638 2.015C14.6981 2.36687 15.5304 3.20141 16.3665 4.37395C17.1999 5.5426 18.1208 7.17206 19.3078 9.2725L19.3544 9.35496C20.5417 11.4557 21.4625 13.0851 22.0364 14.4065C22.613 15.7343 22.9002 16.8807 22.6711 17.9821C22.4403 19.0911 21.8714 20.0995 21.0428 20.8617C20.2162 21.622 19.0907 21.9428 17.6736 22.0968C16.2645 22.25 14.4212 22.25 12.0488 22.25H11.9513C9.57882 22.25 7.73554 22.25 6.32642 22.0968C4.90927 21.9428 3.78379 21.622 2.95722 20.8617C2.12862 20.0995 1.55968 19.0911 1.32895 17.9821C1.0998 16.8807 1.387 15.7343 1.96365 14.4065C2.53752 13.0851 3.45835 11.4557 4.64558 9.35495L4.69218 9.2725L4.69218 9.27249C5.87921 7.17206 6.80008 5.5426 7.63347 4.37395C8.46963 3.20141 9.30194 2.36687 10.362 2.015ZM11 17C11 16.4477 11.4457 16 11.9955 16H12.0045C12.5543 16 13 16.4477 13 17C13 17.5523 12.5543 18 12.0045 18H11.9955C11.4457 18 11 17.5523 11 17ZM11 13C11 13.5523 11.4477 14 12 14C12.5523 14 13 13.5523 13 13V9C13 8.44772 12.5523 8 12 8C11.4477 8 11 8.44772 11 9V13Z"})}),n.jsx("span",{children:i}),s&&n.jsx("button",{onClick:d,children:s.label})]})}e.Line=r})(p.Alert||(p.Alert={}));function Qa({children:e}){return n.jsx("div",{className:"l",children:n.jsx("ul",{children:e})})}const ae={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 er({children:e}){return n.jsx("div",{className:ae.s,children:e})}function tr({children:e,viev:t="row",className:a}){let r={};return a&&(r.className=a),n.jsx("ul",{className:[ae.f,ae[t],r.className].join(" "),children:e})}function nr({children:e}){return n.jsx("div",{className:ae.c,children:e})}function ar({children:e}){return n.jsx("div",{className:ae.g,children:e})}const se={};function rr(e){return e&&(se.s=e),se.s}function ir(e){return e&&(se.a=e),se.a}function or(e){return e&&(se.c=e),se.c}function sr(e){return e&&(se.h=e),se.h}function lr(e){return e&&(se.i=e),se.i}function dr(e){return e&&(se.d=e),se.d}function We(e){return se.i(e)}let Ge={};function cr({children:e}){return n.jsx(n.Fragment,{children:e})}p.Modal=void 0,(e=>{function t(){let[l,_]=m.useState([]);return Ge.x=d=>{_(d?l.filter(g=>g.key!==d):[])},Ge.add=(d,g=Date.now())=>{_([...l,{key:g,item:d}])},n.jsx(n.Fragment,{children:l.map(d=>d.item)})}e.Init=t,e.List=Qa,e.Scroll=er,e.Form=tr,e.Center=nr,e.Column=ar;function a(l,_,d){We(`${l}/modal/${_}.tsx`).then(g=>{g.default.Open(d)})}e.Open=a;function r({type:l,name:_,params:d}){let[g,f]=m.useState(null);return m.useEffect(()=>{We(`${l}/modal/${_}.tsx`).then(h=>{f(h.default.Icon(d))})},[d.id]),n.jsx(n.Fragment,{children:g})}e.Icon=r;function i(l,_){Ge.add(n.jsx(cr,{children:l},String(Date.now())),_)}e.Add=i;function o(l){Ge.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:g,size:f="m",className:h="",shake:v=!0,menu:x}){const[b,k]=m.useState(!0),w=m.useRef(),N=M=>{if(d){if(d.onClick)return M(!1),d.onClick({setOpen:k});if(d.onSend)return d.onSend({setOpen:k,disabled:M})}},T=()=>{if(!v)return k(!1);w.current.setAttribute("shake",!0),setTimeout(()=>{w.current.setAttribute("shake",!1)},1e3)};return b?n.jsxs("div",{className:`${ae.modal}`,children:[n.jsx("div",{className:ae.o,onClick:T}),n.jsxs("div",{className:[ae.w,ae[`s${f}`],h].join(" "),ref:w,children:[n.jsxs("div",{className:ae.h,children:[n.jsx("div",{className:ae.t,children:l}),n.jsxs("div",{className:ae.m,children:[g&&n.jsx("nav",{children:g.map((M,y)=>n.jsx("span",{onClick:M.onClick,className:M.active?"active":"",children:M.name},y))}),x]}),n.jsx("div",{className:ae.x,onClick:()=>{k(!1)},children:n.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:n.jsx("path",{d:"M19.0005 4.99988L5.00045 18.9999M5.00045 4.99988L19.0005 18.9999",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),_,d!==void 0?n.jsx(wn,{label:d.label,onSend:N,className:ae.btn}):""]})]}):""}e.Main=c})(p.Modal||(p.Modal={}));let Fe={};const _r=({content:e,position:t,orientation:a="up",update:r,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(a){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"},[r]),n.jsx("div",{ref:o,className:"tooltip",children:e})};p.Tooltip=void 0,(e=>{e.Init=()=>{let[t,a]=m.useState("");return Fe.set=r=>a(r),Fe.del=()=>a(""),n.jsx(n.Fragment,{children:t})},e.Text=({content:t,children:a,className:r,textAlign:i="center",orientation:o="down",dev:s,...c})=>{const l=d=>{c.element?Fe.set(n.jsx(c.element,{content:t,position:d.currentTarget.getBoundingClientRect(),textAlign:i,update:Date.now()})):Fe.set(n.jsx(_r,{update:Date.now(),orientation:o,content:t,textAlign:i,position:d.currentTarget.getBoundingClientRect()}))},_=()=>{s||Fe.del()};return n.jsx("span",{className:r,onMouseOver:l,onMouseOut:_,children:a})}})(p.Tooltip||(p.Tooltip={}));const rn={key:"Y0zt37HgOx-BY7SQjYVmrqhPkO41Ii2Jcb9yydUDPf6"},on=async()=>window.crypto.subtle.importKey("jwk",{kty:"oct",k:rn.key,alg:"A256GCM",ext:!0},{name:"AES-GCM",length:256},!1,["encrypt","decrypt"]),ur=e=>new TextDecoder().decode(e),fr=async(e,t,a)=>{const r=await window.crypto.subtle.decrypt({name:"AES-GCM",iv:a},t,e);return ur(r)},sn=e=>{const t=window.atob(e),a=new ArrayBuffer(t.length),r=new Uint8Array(a);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return a},mr=e=>new TextEncoder().encode(e),pr=()=>window.crypto.getRandomValues(new Uint8Array(12)),ln=e=>btoa(String.fromCharCode.apply(null,new Uint8Array(e))),gr=async e=>{let t=await on();const a=mr(e),r=pr(),i=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:r},t,a);return`${ln(r)}${ln(i)}`};p.Crypto=void 0,(e=>{e.setKey=async t=>{rn.key=t},e.enCode=async t=>gr(t),e.deCode=async t=>{try{let a=await on(),r=t.substring(0,16),i=t.substring(16,t.length),o=await fr(sn(i),a,sn(r)),s=JSON.parse(o);return s||!1}catch{return!1}}})(p.Crypto||(p.Crypto={}));const z={},F={},lt={defaultModules:""};p.Router=void 0,(e=>{async function t({defaultModules:y}){lt.defaultModules=y;let C=sessionStorage.getItem("f");if(C){if(C=await p.Crypto.deCode(C),!C)return!1;F.id=C.id,F.tab=C.tab,F.page=C.page,F.module=C.module,F.time=C.time,F.payment={active:!0},F.module_admin=C.module_admin}else F.id=0,F.tab="",F.page="Main",F.module=lt.defaultModules}e.Load=t;function a(){F.id=0,F.tab="",F.page="Main",F.module=lt.defaultModules}e.Reset=a;function r(){const[y,C]=m.useState(o()),E=O=>{C(O)};return z.page=E,[y]}e.usePage=r;async function i(y,C=!0){F.page=y,sessionStorage.setItem("f",await p.Crypto.enCode(F)),z.dynamicURL&&z.dynamicURL(F),C&&z.page(y)}e.setPage=i;function o(){return F.page}e.getPage=o;function s(y){return F.page===y}e.isPage=s;function c(y){if(typeof y!="function"){const[C,E]=m.useState(y||_()),O=I=>{E(I)};return z.module=O,[C]}else z.module=y}e.useModule=c;async function l(y,C=!0){F.module=y,sessionStorage.setItem("f",await p.Crypto.enCode(F)),z.dynamicURL&&z.dynamicURL(F),C&&z.module(y)}e.setModule=l;function _(){return F.module}e.getModule=_;function d(y){return F.module===y}e.isModule=d;function g(y){if(typeof y!="function"){const[C,E]=m.useState(y||h());return z.tabs=E,[C]}else z.tabs=y}e.useTabs=g;async function f(y,C=!0){if(F.tab=y,sessionStorage.setItem("f",await p.Crypto.enCode(F)),z.dynamicURL&&z.dynamicURL(F),!!C)if(z.tabs)z.tabs(y);else throw new Error("useTabs not found")}e.setTabs=f;function h(){return F.tab}e.getTabs=h;function v(y){return F.tab===y}e.isTabs=v;function x(y){if(typeof y!="function"){const[C,E]=m.useState(y||w()),O=I=>{E(I)};return z.id=O,[C]}else z.id=y}e.useId=x;function b(y){z.id=y}e.subId=b;async function k(y,C=!0){F.id=y,sessionStorage.setItem("f",await p.Crypto.enCode(F)),z.dynamicURL&&z.dynamicURL(F),C&&z.id(y)}e.setId=k;function w(){return F.id}e.getId=w;function N(y){return Number(F.id)===y}e.isId=N;async function T(y,C,E){F.module=y,F.id=E,F.tab=C,sessionStorage.setItem("f",await p.Crypto.enCode(F)),z.dynamicURL&&z.dynamicURL(F),z.module(y),z.tabs(C)}e.Path=T;async function M(y,C,E,O){var I,L,D;if(F.page===y)if(F.module===C){if(F.tab=E||"",F.id=O||0,F.tab==="")return;(I=z.tabs)==null||I.call(z,E)}else F.module=C,F.tab=E||"",F.id=O||0,(L=z.module)==null||L.call(z,C);else F.module=C,F.tab=E||"",F.id=O||0,F.page=y,(D=z.page)==null||D.call(z,y);sessionStorage.setItem("f",await p.Crypto.enCode(F)),z.dynamicURL&&z.dynamicURL(F)}e.Push=M})(p.Router||(p.Router={}));function hr(e,t){t===void 0?(t=e,e=new Date):e=new Date(e);let a={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 r in a)t=t.replace(r,a[r]);return t}function xr(e){let t=["Января","Февраля","Марта","Апреля","Мая","Июня","Июля","Августа","Сентября","Октября","Ноября","Декабря"],a=new Date(e);return{day:(""+a.getFullYear()).slice(-2)+""+("0"+(a.getMonth()+1)).slice(-2)+("0"+a.getDate()).slice(-2),name:a.getDate()+" "+t[a.getMonth()]}}const br=e=>{function t(N,T){var M,C,y;N=N??"",T=T??1;for(var M=[],y=0,C=N.length;y<C;)M.push(N.slice(y,y+=T));return M}function a(N,T){var M=[2,0,1,1,1,2];return T[N>4&&N<20?2:M[Math.min(N,5)]]}var r={null:"ноль",a1:["один","два","три","четыре","пять","шесть","семь","восемь","девять"],a2:["одна","две","три","четыре","пять","шесть","семь","восемь","девять"],a10:["десять","одиннадцать","двенадцать","тринадцать","четырнадцать","пятнадцать","шестнадцать","семнадцать","восемнадцать","девятнадцать"],a20:["двадцать","тридцать","сорок","пятьдесят","шестьдесят","семьдесят","восемьдесят","девяносто"],a100:["сто","двести","триста","четыреста","пятьсот","шестьсот","семьсот","восемьсот","девятьсот"],uc:["копейка","копейки","копеек"],ur:["рубль","рубля","рублей"],u3:["тысяча","тысячи","тысяч"],u2:["миллион","миллиона","миллионов"],u1:["миллиард","миллиарда","миллиардов"]},i,o,s,c,b,l,_,x,d,g,f,h;d=parseFloat(e).toFixed(2).split("."),l=d[0],c=d[1];var v=12-l.length;if(v<0)return!1;for(var x=[];v--;)x.push("0");l=x.join("")+l;var b=[];if(l>0){g=t(l,3);for(var k=-1;k<g.length;k++)if(_=g[k],_>0&&(f=t(_,1),i=parseInt(f[0]),o=parseInt(f[1]),s=parseInt(f[2]),b.push(r.a100[i-1]),h=k+1==3?"a2":"a1",o>1?b.push(r.a20[o-2]+(s>0?" "+r[h][s-1]:"")):b.push(o>0?r.a10[s]:r[h][s-1]),g.length>k+1)){var w=r["u"+(k+1)];b.push(a(_,w))}}else b.push(r.null);return b.push(a(l,r.ur)),b.push(c+" "+a(c,r.uc)),b.join(" ").replace(RegExp(" {2,}","g")," ").trimLeft()};function vr(e){let t=-1,a=[" kB"," MB"," GB"," TB","PB","EB","ZB","YB"];do e=e/1024,t++;while(e>1024);return Math.max(e,.1).toFixed(1)+a[t]}function yr(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 wr(e,t,a,r){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("-"),g=0,f=d.length;g<f;g++)d[g]=this.word(d[g],c,l,_);return d.join("-")}if(s.match(/^[А-ЯЁ]\.?$/i))return s;this.init();var h=this.rules[l];let v;return h.exceptions&&(v=this.pick(s,c,_,h.exceptions,!0),v)?v:(v=this.pick(s,c,_,h.suffixes,!1),v||s)},pick:function(s,c,l,_,d){let g=s.toLowerCase();for(var f=0,h=_.length;f<h;f++)if(this.ruleMatch(g,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,g=l.test.length;d<g;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,g=_.length;d<g;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],a=o[3],i.fullNameSurnameLast=!0):(e=o[1],t=o[3],a=o[5])}return i.ln=e,i.fn=t||"",i.mn=a||"",i.sex=r||i.getSex(),i}function kr(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 jr(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 Cr(e,t){return t&&(e=Number(e)/t),parseFloat(e).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g,"$1 ")}function Sr(e,t){let a=t+"";for(;a.length<e;)a="0"+a;return a}function Er(e,t,a){let r=t/e*a;return(typeof r!="number"||r===1/0)&&(r=0),parseFloat(r).toFixed(1)}function Ir(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Dr(e,t){e=Math.abs(e)%100;let a=e%10;return e>10&&e<20?t[2]:a>1&&a<5?t[1]:a===1?t[0]:t[2]}const dn={},cn={},de={},ge={};let ye="",dt="M06",me={};function Nr(e){dt=e}function Tr(){return dt}function Mr(e){const[t,a]=m.useState(!1);return localStorage.getItem("d")?(async()=>{if(await p.Router.Load(dt))return a(!0);re()})():(["a","b","c","d","e","m","u","s","q","p"].forEach(i=>localStorage.removeItem(i)),["f"].forEach(i=>sessionStorage.removeItem(i)),p.Router.Reset(),a(!0)),t?e:""}function re(){["a","b","c","d","e","m","u","s","q","p","t"].forEach(e=>localStorage.removeItem(e)),["f"].forEach(e=>sessionStorage.removeItem(e)),window.history.pushState({},"","/"),window.location.reload()}function Br(e){return localStorage.setItem("d",e)}function $r(){let e=localStorage.getItem("d");return e!==""&&e!=="undefined"&&e!==null?e:""}function Lr(e){return localStorage.setItem("a",e)}function Ar(){let e=localStorage.getItem("a");return e!==""&&e!=="undefined"&&e!==null?e:""}async function Fr(e){localStorage.setItem("p",await p.Crypto.enCode(e))}function Pr(){let e=localStorage.getItem("p");if(e!==""&&e!=="undefined"&&e!==null){let t=p.Crypto.deCode(e);return t||re(),t}else return re(),!1}async function Or(e,t){dn.data[e]=t,localStorage.setItem("s",await p.Crypto.enCode(dn.data))}function zr(e){let t=localStorage.getItem("s");return t===null?{}:(t=p.Crypto.deCode(t),t?e!==void 0?t[e]:t:re())}async function Rr(e){localStorage.setItem("m",await p.Crypto.enCode({data:e}))}function Zr(){let e=localStorage.getItem("m");if(e!==""&&e!=="undefined"&&e!==null){let t=localStorage.getItem("m");if(t===null)return!1;let a=p.Crypto.deCode(t);a||re();const r=(o,s)=>{let c=s+"";for(;c.length<o;)c="0"+c;return c};return a.data.split(",").map(o=>"M"+r(2,o))}else return re(),!1}function Ur(e){}async function _n(e){let t=localStorage.getItem("b");t=t===null?{}:p.Crypto.deCode(t),t[p.Router.getTabs()]=e,localStorage.setItem("b",await p.Crypto.enCode(t))}function ct(){let e=localStorage.getItem("b");return e===null?{}:(e=p.Crypto.deCode(e),e=e[p.Router.getTabs()],e=e===void 0?{active:1,sort:"<"}:e,e)}async function Wr(e){localStorage.setItem("c",await p.Crypto.enCode(e))}async function un(e,t){var r;let a=localStorage.getItem("c");if(a!==""&&a!=="undefined"&&a!==null){let i=await p.Crypto.deCode(a);return i||re(),e===void 0?i:t?(r=i[e][t])==null?void 0:r.n:i[e]}else return re(),!1}async function Gr(e){ge.data=e,localStorage.setItem("q",await p.Crypto.enCode(ge.data))}async function Kr(e,t){ge.data={...ge.data,[e]:t},localStorage.setItem("q",await p.Crypto.enCode(ge.data))}function Pe(e,t){if(!ge.data){let a=localStorage.getItem("q");a&&(ge.data=p.Crypto.deCode(a))}return e===void 0&&t===void 0?ge.data:e!==void 0&&t===void 0?ge.data[e]:ge.data[e][t]}function Yr(e){cn.data=e}function Hr(e){return cn.data[e]}function qr(e){}function Jr(){}async function Xr(e){localStorage.setItem("u",await p.Crypto.enCode(e))}async function Vr(e){let t=localStorage.getItem("u");if(t!==""&&t!=="undefined"&&t!==null){let a=await p.Crypto.deCode(t);return a||re(),e?a[e]:a}else return re(),!1}function Qr(){let e=localStorage.getItem("u");return e!==""&&e!=="undefined"&&e!==null?p.Crypto.deCode(e):!1}async function fn(e){localStorage.setItem("e",await p.Crypto.enCode(e))}function ei(){let e=localStorage.getItem("e");if(e!==""&&e!=="undefined"&&e!==null)try{let t=p.Crypto.deCode(e);return t||re(),t}catch{return{}}else return{}}function ti(e){const t=async a=>{let r=localStorage.getItem(a);if(r!==""&&r!=="undefined"&&r!==null)try{let i=await p.Crypto.deCode(r);if(!i)return;me[a]={is:!0,time:i.time,data:i.data}}catch{me[a]={is:!1,time:0,data:{}}}else me[a]={is:!1,time:0,data:{}}};e.forEach(a=>t(a))}function ni(e){return me[e]===void 0?(me[e]={data:{},time:0},{data:{},time:0}):me[e]}async function ai(e,t){me[e]={data:t.data,time:t.time},localStorage.setItem(e,await p.Crypto.enCode(me[e]))}async function ri(e,t){de[e]=t,localStorage.setItem("t",await p.Crypto.enCode(de))}async function ii(e){if(Object.keys(de).length===0){let t=localStorage.getItem("t");if(t!==""&&t!=="undefined"&&t!==null){let a=await p.Crypto.deCode(t);return a||re(),Object.keys(a).forEach(r=>{de[r]=a[r]}),e?de[e]:de}else return re(),{}}else return e?de[e]:de}async function oi(e){if(Object.keys(de).length===0){let t=localStorage.getItem("t");if(t!==""&&t!=="undefined"&&t!==null){let a=await p.Crypto.deCode(t);return a?(Object.keys(a).forEach(r=>{de[r]=a[r]}),!!de[e]):!1}else return!1}else return!!de[e]}async function si(e,t,a){me[e].time=a,me[e].data[t.item][t.name]=t.value,localStorage.setItem(e,await p.Crypto.enCode(me[e]))}function li(){var a;let t=(a=new URLSearchParams(window.location.search.substring(1)).get("devmod"))==null?void 0:a.trim();if(t)try{return JSON.parse(t||"{}")}catch{return p.Notice.Error("Error parse devMod"),{}}}function mn(){return ye===""?(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))!=-1?(ye="Opera","Opera"):navigator.userAgent.indexOf("Edg")!=-1?(ye="Edg","Edg"):navigator.userAgent.indexOf("Chrome")!=-1?(ye="Chrome","Chrome"):navigator.userAgent.indexOf("Safari")!=-1?(ye="Safari","Safari"):navigator.userAgent.indexOf("Firefox")!=-1?(ye="Firefox","Firefox"):(ye="unknown","unknown"):ye}function di(e){return mn()===e}function ci(e,t,a){return Pe(e,t)?Pe(e,t).n:a||""}function _i(e,t,a,r){return Pe(e,t)?Pe(e,t)[a]:r||""}function ui(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=Math.random()*16|0,a=e=="x"?t:t&3|8;return a.toString(16)})}function fi(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 mi(e,t){return e.reduce(function(a,r){let i=t instanceof Function?t(r):r[t];return a[i]!==void 0||(a[i]={}),a[i][r.id]=r,a},{})}function pi(e){return parseInt((Date.now()-new Date(e).getTime())/31536e6+"")+""}function gi(e){return["number","string"].includes(typeof e)?!isNaN(Number(e))&&!isNaN(parseFloat(e)):!1}function hi(e){var t="",a={а:"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 r=0;r<e.length;++r)a[e[r]]==null?t+=e[r]:t+=a[e[r]];return t}function xi(e,t,a=!1){return a?e.sort((r,i)=>i[t]-r[t]):e.sort((r,i)=>r[t]-i[t])}function bi(e,t){return e.reduce(function(a,r){let i=t instanceof Function?t(r):r[t];return a[i]!==void 0||(a[i]={}),a[i][r.id]=r,a},{})}function vi(e,t,a=!1){return a?e.sort((r,i)=>new Date(i[t]).getTime()-new Date(r[t]).getTime()):e.sort((r,i)=>new Date(r[t]).getTime()-new Date(i[t]).getTime())}function yi(e,t){return e.reduce((a,r)=>a+(r[t]||0),0)}function wi(e,t,a,r=!1){return r?e.sort((i,o)=>a(o[t])-a(i[t])):e.sort((i,o)=>a(i[t])-a(o[t]))}function ki(e){return{style:{background:`var(--color-${e})`}}}const K={Age:pi,ArraySort:xi,ArrayGroup:bi,ArraySortDate:vi,ArraySortFunction:wi,ArraySumma:yi,Translit:hi,Date:hr,ColorBackground:ki,MoneyString:br,DateSort:xr,UUID:ui,Size:vr,TypeFiles:yr,Cases:wr,Initials:kr,Month:jr,Money:Cr,Number:Sr,Percent:Er,CapitalizeFirstLetter:Ir,DeclensionWord:Dr,Select:ci,SelectParams:_i,ObjectByArray:mi,isNumeric:gi,Week:fi,set:(e,t)=>{K[e]=t}},ji={Counter:({before:e,from:t=0,to:a,secund:r=3})=>{const i=m.useRef();return m.useEffect(()=>{i.s=!0;const o=1e3,s=a/(r*10);i.n=0;let c=o/(a/s),l=e?e+" ":"";return i.i=setInterval(()=>{if(!i.s)return i.current.textContent=`${l}`+K.Money(a),clearInterval(i.i);if(a===0)return i.current.textContent=`${l}`+K.Money(a),clearInterval(i.i);i.n=i.n+s,i.n>a&&i.n>=a&&(i.n=a,clearInterval(i.i)),i.current&&(i.current.textContent=`${l}`+K.Money(i.n))},c),()=>{i.s=!1,clearInterval(i.i)}},[t,a]),n.jsx("span",{ref:i})}},be={setSSID:Br,getSSID:$r,getPORT:Pr,setPORT:Fr,setAUTH:Lr,getAUTH:Ar,Logaut:re,setMenu:Rr,getMenu:Zr,useSort:Ur,setSort:_n,getSort:ct,setCompany:Wr,getCompany:un,setSelect:Gr,addSelect:Kr,getSelect:Pe,setApi:Yr,getApi:Hr,setPayment:qr,getPayment:Jr,setUser:Xr,isUser:Qr,getUser:Vr,getDefaultModules:Tr,getBase:ni,setBase:ai,isData:oi,setData:ri,getData:ii,editBase:si,loadBase:ti,devMod:li,isBrowser:di,getBrowser:mn},ie={h:"_h_1usnu_1",g:"_g_1usnu_11",hr:"_hr_1usnu_16",hl:"_hl_1usnu_28",t:"_t_1usnu_40",s:"_s_1usnu_60",u:"_u_1usnu_69",o:"_o_1usnu_76",l:"_l_1usnu_105",hh:"_hh_1usnu_115",c:"_c_1usnu_128",loadingB:"_loadingB_1usnu_1",m:"_m_1usnu_180",ul:"_ul_1usnu_196",f:"_f_1usnu_226"},pn=({title:e,left:t,right:a,children:r})=>n.jsxs("div",{className:ie.h,children:[n.jsx("div",{className:ie.t,children:e}),t&&n.jsx("div",{className:ie.hl,children:t}),a&&n.jsx("div",{className:ie.hr,children:a}),r]}),gn=({children:e,...t})=>n.jsx("div",{className:ie.l,children:e}),hn=({children:e})=>n.jsx("div",{className:ie.s,children:e}),xn=({children:e,edit:t})=>{const a={};return t&&(a.edit=""),n.jsx("div",{...a,className:ie.f,children:e})};function bn({children:e}){return n.jsx("div",{className:ie.g,children:e})}const Ci=({children:e,className:t,title:a})=>n.jsxs("div",{className:[ie.o,t].join(" "),children:[a&&n.jsx("div",{className:ie.hh,children:a}),e]}),Si=({children:e})=>n.jsx("div",{className:ie.u,children:e}),Ei=({children:e})=>n.jsx("div",{className:ie.c,children:e}),Ii=({children:e})=>n.jsx("div",{className:ie.m,children:e}),Di=p.Alert.Line,_t={Header:pn,Section:hn,Group:bn,Form:xn,List:gn,A:Di,U:Si,G:bn,C:Ei,L:gn,O:Ci,S:hn,H:pn,M:Ii,F:xn},Ni=(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(a=>a.id===t.data.id?Object.assign({},a,{[t.data.name]:t.data.value}):a),temp:e.temp.map(a=>a.id===t.data.id?Object.assign({},a,{[t.data.name]:t.data.value}):a)};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(a=>a.id!==t.id)};case"edit":return{...e,list:e.list.map(a=>a.id===t.j.item?Object.assign({},a,{[t.j.name]:t.j.value}):a)};default:return e}},Ti=()=>({load:!0,list:[],name:"Файлы",add:!1,search:!1,revers:!0}),Mi=()=>{let[e,t]=m.useState([]);return n.jsx(n.Fragment,{children:e.length!==0?n.jsxs("div",{className:"upload view",children:[n.jsxs("div",{className:"--head",children:[n.jsx("b",{children:"Загрузки"}),n.jsx("i",{className:"x",onClick:()=>t([]),"data-icon":"F038"})]}),n.jsx("div",{className:"--list",children:e.map(a=>a)})]}):""})},Bi=({id:e,name:t,listen:a,dir:r})=>{t=t||"Файлы";const[i,o]=m.useReducer(Ni,{},Ti),s=()=>{p.Modal.Add(n.jsx($i,{dir:r,dispatch:o,id:e},new Date().getTime()))};return m.useEffect(()=>{},[e,r]),n.jsxs(_t.O,{children:[" ",n.jsx(_t.H,{title:t,right:n.jsx("i",{className:"f025","data-icon":"C005 25 pointer","data-color":"_b5b9cc :506290",onClick:s}),left:n.jsx("i",{className:"f025","data-icon":"E009 25","data-color":"_2196f3"})}),n.jsx("ul",{"data-empty":"Файлов нет",className:"files_list",children:i.load?n.jsxs("div",{"type-load":"load",children:[n.jsx("i",{}),n.jsx("i",{}),n.jsx("i",{})]}):i.list.length===0?n.jsx(n.Fragment,{}):i.list.map((c,l)=>n.jsx(Li,{dispatch:o,data:c},l))})]})},$i=({id:e,dir:t,dispatch:a})=>{let[r,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)})},[]),n.jsx(n.Fragment,{children:r?n.jsx(n.Fragment,{children:n.jsx("div",{className:"modal o ",onClick:p.Modal.Shake,children:n.jsxs("div",{className:"b",children:[n.jsx("div",{className:"h",children:"Загрузка файлов"}),n.jsx("div",{className:"x","data-icon":"F038",onClick:()=>{i(!1)}}),n.jsxs("div",{className:"upload",ref:o,children:[n.jsx("input",{type:"file",id:"fileElem",name:"files",multiple:!0}),n.jsx("dd",{}),n.jsx("i",{"data-icon":"F061"})]})]})},new Date().getTime())}):""})},Li=({data:e,dispatch:t})=>{let a=async()=>{let o=await(await fetch(p.Api.url().files+"/yandex/data/"+e.id,{headers:{"Content-type":"application/json;charset=utf-8",SSID:be.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()}},r=async()=>{(await(await fetch(p.Api.url().files+"/yandex/delete/"+e.id,{headers:{"Content-type":"application/json;charset=utf-8",SSID:be.getSSID()||""}})).json()).status==="success"&&(t({type:"delete",id:e.id}),p.Notice.Send({type:"success",text:"Файл успешно удалён"}))};return n.jsxs("li",{children:[n.jsx("div",{className:"f035",children:K.TypeFiles(e.type)}),n.jsx("div",{className:"f100",children:K.Date(e.uDate,"dd.mm.yy")}),n.jsx("div",{className:"f000",children:e.name}),n.jsxs("div",{className:"f050 flex button",children:[n.jsx("i",{className:"f025","data-icon":"F060 35 pointer","data-color":"_b5b9cc :4CAF50",onClick:a}),n.jsx("i",{className:"f025","data-icon":"F048 35 pointer","data-color":"_b5b9cc :FF9800",onClick:r})]}),n.jsx("div",{className:"f080",children:K.Size(e.size)})]})},Ke={setSetting:Or,getSetting:zr};let q={};q.list=ei(),q.active=null;const Ai=()=>{var i;let[e,t]=m.useState([]),[a,r]=m.useState(Ke.getSetting("s03"));return m.useEffect(()=>{(async()=>{let o=Object.keys(q.list);if(o.length!==0){let s=[];o.forEach((c,l)=>{s.push({item:n.jsx(ut,{data:q.list[c]},q.list[c].id),link:q.list[c].link})}),t(s)}})()},[]),q.active=o=>{var s;r(o),(s=document.querySelector("app-body"))==null||s.setAttribute("bookmarks",o===1?"bottom":"")},q.set=o=>{t([...e,{item:n.jsx(ut,{data:o},o.id),link:o.link}])},q.del=o=>{e.forEach((s,c)=>{s.link===o&&e.splice(c,1)}),t([...e])},(i=document.querySelector("app-body"))==null||i.setAttribute("bookmarks",a===1&&e.length!==0?"bottom":""),a!==0?n.jsx(n.Fragment,{children:e.length!==0?n.jsx("div",{className:"bookmarks",children:e.map(o=>o.item)}):""}):""},Fi=({id:e,type:t,name:a})=>{let r=t+"-"+e,[i,o]=m.useState(q.list[r]!==void 0);m.useEffect(()=>{o(q.list[r]!==void 0)},[r]);let s=()=>{q.list[r]!==void 0?(q.del(r),delete q.list[r],fn(q.list),o(!1),p.Notice.Send({type:"success",text:"Запись удален из закладок"})):(q.list[r]={id:e,name:a,type:t,link:r},q.set(q.list[r]),fn(q.list),o(!0),p.Notice.Send({type:"success",text:"Запись добавлен в закладки"}))};return n.jsx(n.Fragment,{children:Ke.getSetting("s03")!==0?n.jsx("i",{"data-icon":"C018","data-color":i?"_F44333 :F44333":"_b5b9cc :F44333",onClick:s}):""})},ut=({data:e})=>{let t=r=>{r.preventDefault(),delete q.list[e.link],q.del(e.link)},a=()=>{p.Router.setId(e.id)};return n.jsx("span",{onContextMenu:t,onClick:a,children:e.name})},Pi=e=>{q.active(e)},H={},ft={},A={};A.config={iceServers:[{url:"stun:stun.l.google.com:19302"}]},A.constraints={optional:[{DtlsSrtpKeyAgreement:!0}]},A.other=[],A.users={},A.asset=0,A.remoute=!1,A.stream=null,A.user=0,A.connect=!1,A.offer=null,A.btnRefuse=null,A.time=!1;let Se;Se=document.createElement("audio"),Se.setAttribute("autoplay","true"),Se.setAttribute("muted","true"),H.start=async e=>{A.rtc=new RTCPeerConnection(A.config),A.other=[],A.remoute=!1,A.rtc.onicecandidate=a=>{a.candidate&&A.other.push(a.candidate)},A.rtc.ontrack=a=>{if(a.streams&&a.streams[0])Se.srcObject=a.streams[0];else{let r=new MediaStream(a.track);Se.srcObject=r}};const t=await navigator.mediaDevices.getUserMedia({video:!1,audio:{echoCancellation:!1,autoGainControl:!0}});t.getTracks().forEach(a=>{A.rtc.addTrack(a,t)}),A.rtc.onconnectionstatechange=()=>{A.rtc.connectionState},A.rtc.ontrack=async a=>{if(a.streams&&a.streams[0])Se.srcObject=a.streams[0];else{let r=new MediaStream(a.track);Se.srcObject=r}},A.rtc.onaddstream=a=>{},A.rtc.onnegotiationneeded=a=>{},A.rtc.oniceconnectionstatechange=a=>{},A.rtc.onsignalingstatechange=a=>{},A.rtc.onicegatheringstatechange=a=>{},A.rtc.onicecandidateerror=a=>{},A.rtc.ondatachannel=a=>{},A.rtc.onerror=a=>{},e()},H.useListener=e=>{ft.rtc=e},H.setListener=e=>{ft.rtc&&ft.rtc(e)},H.callTo=async e=>{H.start(async()=>{const t=await A.rtc.createOffer();await A.rtc.setLocalDescription(t),A.uid=e})},H.callIn=async e=>{A.asset=e.id,A.offer=e.offer,A.uid=e.id},H.callRise=async()=>{H.start(async()=>{A.rtc.setRemoteDescription(new RTCSessionDescription(JSON.parse(atob(A.offer))));const e=await A.rtc.createAnswer();await A.rtc.setLocalDescription(e)})},H.callOk=async e=>{A.asset=e.id;const t=new RTCSessionDescription(JSON.parse(atob(e.answer)));await A.rtc.setRemoteDescription(t)},H.IceCandidate=async e=>{e.candidate.forEach(t=>{A.rtc.addIceCandidate(new RTCIceCandidate(t))})},H.callFrom=async()=>{},H.callNo=()=>{A.asset=0,A.time=!1,A.rtc&&A.rtc.close(),H.setListener({type:"state",data:"closed"})},H.callOf=()=>{A.asset=0,A.time=!1,A.rtc.close()},H.callRefuser=async()=>{A.asset=0,A.time=!1,A.rtc&&A.rtc.close()},H.Run=async e=>{H[e.data.type]&&H[e.data.type](e.data)};let Oe={};function Oi(){let[e,t]=m.useState([]),a=m.useRef(null);return m.useEffect(()=>{},[]),Oe.set=r=>{t([...e,r])},Oe.del=()=>{t([])},Oe.audio=(r,i)=>{a.current.volume=.5,a.current.loop=i,a.current.src="/audio/"+r,a.current.muted=!1},n.jsxs(n.Fragment,{children:[e.map(r=>r.item),n.jsx("audio",{id:"audio",ref:a,autoPlay:!0,muted:!0})]})}function zi(e,t){let a=new Date().getTime();Oe.set({item:n.jsx(Ri,{type:t,id:e},a),key:a})}function Ri({id:e,type:t}){const[a,r]=m.useState({}),[i,o]=m.useState(t);m.useEffect(()=>{r(be.getSelect("user")[e])},[]),H.useListener(l=>{switch(l.type){case"state":o(l.data)}});const s=()=>{switch(i){case"out":return n.jsx("span",{onClick:()=>{H.callTo(a.id),o("call")},children:n.jsx("svg",{className:"green",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:n.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 n.jsxs(n.Fragment,{children:[n.jsx("span",{onClick:c,children:n.jsx("svg",{className:"red",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:n.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"})})}),n.jsx("span",{onClick:H.callRise,children:n.jsx("svg",{className:"green",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:n.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 n.jsx("span",{onClick:()=>H.callNo(a.id),children:n.jsx("svg",{className:"red",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:n.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 n.jsx("span",{onClick:()=>{H.callTo(a.id),o("call")},children:n.jsx("svg",{className:"green",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:n.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=()=>{H.callRefuser(a.id),Oe.del()};return n.jsx("div",{className:"web-phone white",children:n.jsxs("div",{className:"w",children:[n.jsx("div",{className:"x","data-icon":"F038",onClick:c}),n.jsx("div",{className:"a"}),n.jsx("div",{className:"n",children:a.name}),n.jsx("div",{className:"b",children:s()})]})})}const mt={};function Zi(e){mt.add(e)}function Ui({color:e,size:t,name:a}){return n.jsx("svg",{width:t,height:t,color:e,children:n.jsx("use",{href:`#${a}`})})}function Wi(){let[e,t]=m.useState([]);if(mt.x=()=>{t([])},mt.add=r=>{t(r)},e.length===0)return"";const a={sprite:""};return n.jsx("svg",{...a,xmlns:"http://www.w3.org/2000/svg",children:e.map((r,i)=>n.jsx("symbol",{id:r.name,viewBox:"0 0 24 24",fillRule:"evenodd",clipRule:"evenodd",children:n.jsx(r.path,{})},i))})}let Ye={},pt={},gt="ru";const Gi=(e,t)=>{pt=e,t?gt=t:gt=Object.keys(e)[0]},vn=m.createContext(localStorage.getItem("lang")||navigator.language),Ki=({children:e})=>{const[t,a]=m.useState(localStorage.getItem("lang")||navigator.language);return Ye.update=a,n.jsx(vn.Provider,{value:pt[t]||pt[gt],children:e})},Yi=e=>{var t;localStorage.setItem("lang",e),(t=Ye.update)==null||t.call(Ye,e)},Hi=()=>m.useContext(vn),qi=()=>localStorage.getItem("lang")||navigator.language;m.createContext({tab:"",setTabs:e=>{}});const ht={};function xt(e,t){ht[e]=t}function Ji(e,t){ht[e]!==void 0&&ht[e](t)}const we={};function Xi(e,t){const[a,r]=m.useState(t);return m.useEffect(()=>{if(we[e])return we[e].push(r);we[e]=[r]},[]),[a]}function Vi(e,t){if(we[e])return we[e].push(t);we[e]=[t]}function Qi(e,t){we[e]&&we[e].forEach(a=>a(t))}const ce={setListener:Ji,useListener:xt,setEmitter:Qi,useEmitter:Xi,subEmitter:Vi};function eo(){let[e,t]=m.useState([]);return ce.useListener("form",a=>{t([a])}),n.jsx(n.Fragment,{children:e.map(a=>a)})}const yn=({children:e,lang:t})=>Mr(n.jsxs(Ki,{children:[n.jsx(p.Modal.Init,{}),n.jsx(p.Notice.Init,{}),n.jsx(p.Alert.Init,{}),n.jsx(Mi,{}),n.jsx(Wi,{}),n.jsx(eo,{}),n.jsx(Oi,{}),n.jsx(p.Tooltip.Init,{}),n.jsx(Ai,{}),e]})),to=({children:e,...t})=>n.jsx("menu",{children:e}),no=({children:e,...t})=>n.jsxs("header",{children:["xz",e]}),ao={payment:"_payment_1lxfv_1"};function ro(){let[e,t]=m.useState({});return!e.active&&!e.payment?"":n.jsx("div",{className:ao.payment,children:"Истек срок оплаты! Доступ доступен до 16.04.2024"})}const io=({children:e,...t})=>n.jsxs("div",{className:"app",children:[n.jsx(ro,{}),n.jsx(to,{}),n.jsx(no,{}),n.jsx(yn,{}),e]}),He={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"},wn=({onClick:e,onSend:t,size:a="m",view:r="confirm",mode:i="primary",children:o,isDisabled:s=!1,className:c,after:l,before:_,label:d,onRef:g,awaitText:f="Ожидайте"})=>{let[h,v]=m.useState(!1);const x=k=>{if(e)return e();h||(t?(v(!0),t(v)):k.preventDefault())};let b={};return(s||h)&&(b.disabled=!0),n.jsx("button",{...b,ref:g,className:[He.btn,h?He.disabled:He[r],a&&He[a],c].join(" "),onClick:x,children:h?f:n.jsxs(n.Fragment,{children:[_||""," ",d," ",l||""]})||o})},oo=({list:e,onClick:t,active:a,size:r,view:i})=>n.jsx("nav",{children:n.jsx("ul",{className:[r,i].join(" "),children:e.map(o=>n.jsx(so,{onClick:t,active:a,label:o.label,link:o.link},o.link))})}),so=({onClick:e,label:t,link:a,active:r})=>n.jsx("li",{"tabs-active":String(r===a),onClick:()=>e(a),children:t}),kn={tabs:"_tabs_1i88v_1",tab:"_tab_1i88v_1"},jn=({list:e=[],active:t,onTab:a})=>{const r=i=>{if(a)return a(i);p.Router.setTabs(i)};return n.jsx("nav",{className:[kn.tabs,"tabs"].join(" "),children:e.map(i=>m.createElement("div",{onClick:()=>r(i.id),active:(t===i.id).toString(),className:kn.tab,key:i.id},i.label,i.badge?n.jsx("em",{children:i.badge}):""))})},lo=({list:e=[],active:t,onChange:a,className:r,after:i})=>{const[o,s]=m.useState(t);return n.jsxs("div",{className:["tabs-button",r].join(" "),children:[n.jsx("ul",{children:e.map(c=>n.jsx(co,{data:c,light:c.light,setTabs:s,active:c.id===o,onChange:a},c.id))}),i]})},co=({data:e,light:t,active:a,setTabs:r,onChange:i})=>{const o=()=>{e.disabled||(i&&i(e.id),r(e.id))};return n.jsxs("li",{onClick:o,className:e.disabled?"disabled":a?"active":"",children:[n.jsxs("p",{children:[e.before,e.name]}),t&&n.jsx("em",{})]})},_o={List:oo,Lite:jn,Button:lo},uo=({title:e="",button:t,description:a="",children:r})=>n.jsxs("fieldset",{children:[e&&n.jsxs("legend",{children:[e,t&&n.jsx("div",{role:"button-outline",onClick:()=>t.onClick(),children:t.label})," "]}),n.jsx("ul",{children:r}),a&&n.jsx("article",{children:a})]}),fo={setting:"_setting_dva4m_2"},mo=({children:e})=>n.jsx("div",{className:fo.setting,children:e}),po=({label:e,children:t})=>{let[a,r]=m.useState(!1);return n.jsxs("li",{"data-item":"accordion",children:[n.jsxs("dl",{onClick:()=>r(!a),children:[n.jsx("dt",{children:e}),n.jsx("dd",{children:n.jsx("div",{"data-close":String(a)})})]}),a&&n.jsx("div",{children:t})]})},go=({label:e,onClick:t,button:a})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{role:"button",onClick:()=>t(),children:a})]})}),Cn={Switch:({active:e,onClick:t})=>(e=typeof e=="number"?!!e:e,n.jsx("div",{role:"switch",onClick:()=>{t()},"aria-checked":e?"true":"false"}))},ho={Accordion:po,Button:go,Switch:({label:e,onClick:t,active:a})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{children:n.jsx(Cn.Switch,{onClick:t,active:a})})]})}),Info:({label:e,info:t})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{role:"info",children:t})]})}),Select:({label:e,active:t,options:a})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{role:"info",children:t})]})}),Component:({label:e,children:t})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{children:t})]})}),Node:({label:e,children:t})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{children:t})]})})};function Sn({list:e,onClick:t,active:a,size:r,view:i}){return n.jsx("nav",{children:n.jsx("ul",{className:[r,i].join(" "),children:e.map(o=>n.jsx(xo,{onClick:t,active:a,label:o.label,link:o.link},o.link))})})}const xo=({onClick:e,label:t,link:a,active:r})=>n.jsx("li",{"tabs-active":String(r===a),onClick:()=>e(a),children:t});Sn.defaultProps={size:"M",view:"H"};const bo={Section:uo,Main:mo,Item:ho,Tabs:Sn};function vo({value:e,background:t,gradient:a}){let r=835.24,i=r-e/100*r;const o=m.useId();return n.jsxs("svg",{viewBox:"0 0 275 275",xmlns:"http://www.w3.org/2000/svg",style:{borderRadius:"50%",background:t},children:[a&&n.jsx("linearGradient",{id:o,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:a.map((s,c)=>n.jsx("stop",{offset:s[0],stopColor:s[1]},c))}),n.jsx("circle",{strokeWidth:"10",fill:"transparent",r:"133",cx:"137.5",cy:"137.5",stroke:`url(#${o})`,strokeLinecap:"round",strokeDasharray:r,strokeDashoffset:i,transform:"rotate(-90 137.5 137.5)"})]})}const yo={Circle:vo},wo={Icon:Fi,Item:ut,Active:Pi};function ko(){return n.jsx("svg",{viewBox:"0 0 462.86 359.96",children:n.jsx("path",{d:"M210.5,307.78c-27,35.41-58.14,58-120.55,50.84-1-.12-1.58-.39-1.58-2V327.87c0-1.32.51-2.12,1.85-2,100.39-1,88.17-63.46,74.8-90.94-47.3-97.28-14.46-166.27,20.26-205.14,14.1-16.37,50.53-42,128.07-23.24,9.1,2,30.51,7.8,24.46,11.38C317.5,30,297.66,68.33,295,73.12c-3.62,6.59-6.26,13.17-4.57,14.13,2.37,1.35,3.5-1.56,6.58-7.91C319.78,34.41,366-22.76,402.78,37.68a1.14,1.14,0,0,1,.09.26c9.3,56.05,30.57,228.62-97.76,224.22-23.38-2-28.82-22-32.57-18.89-3.36,3,10,21.4,32.76,23.19C448.18,270.75,411.55,66.74,407.79,41.91a1.41,1.41,0,0,1,0-.3c2-7.32,129.15,17.47,112.77,158.08,4.82,6.57,10.89,10,18.7,16.08l.13.07c8.9,3.67,10.46,12.06,11.43,18.88a63.15,63.15,0,0,1-.14,15.49c-10.48-4.62-22.74-10.11-22.26-22.53.43-12,7.35-5.21-8.8-14.22a.69.69,0,0,0-1,.57c-.33,3.87-2.7,14.69-3,16.59v0c-4.64,17-16.59,86-18.41,99.58-.77,5.7-4.94,10.41-11.4,10.39l-56.71.18c-7.73.22-9.57-7.9-10.27-11.89-2.7-15.31-4.08-29.7-4.18-29.67-20.24,9.26-108.69,3.08-108.69,3.27V330c-.29,7.56-4.51,15.26-11.74,15.32l-52.87,1c-10.36.1-13.85-1.67-15.5-11.87-2.08-13.08-1-34.26-5.32-37.43-2,1.84-8.33,8.11-10,10.83M196.16,203q9.57,0,11.42-7.72c2.18-9.07-5.66-17.7-14.77-15.68-4.95,1.11-7.53,4.94-7.53,11.53C185.28,199,188.94,203,196.16,203Z",transform:"translate(-88.37 0)"})})}const jo={i:"_i_it11s_1"};let En="/assets/";function Co(e){En=e}function So({name:e,size:t="16px",onClick:a,hover:r,origin:i=!1,className:o}){const s={[i?"backgroundImage":"WebkitMaskImage"]:`url(${En}${e}.svg)`,"--size":t},c={};return o&&(c.className=o),a&&(c.onClick=a,c.pointer=""),r&&(c.hover=r),n.jsx("i",{role:"icon",style:s,className:[jo.i,`icon-${e}`].join(" "),...c})}let bt={};function Eo(e){bt={...bt,...e}}function In(){return bt}function Io({name:e,hover:t,onClick:a,className:r}){const i={};return a&&(i.onClick=a,i.pointer=""),t&&(i.hover=t),r&&(i.className=r),In()[e]?n.jsx("i",{role:"icon",...i,children:In()[e]()}):""}const Do={Logo:ko,Sprite:Zi,set:Eo,Symbol:Ui,Default:Io,Assets:So};let Dn={};Dn.setAttribute=(e,t)=>{const a=document.getElementById("root");a.dataset[e]=t};function No({items:e,list:t,icons:a,isSetting:r=!0}){const i=()=>{p.Alert.Send({title:"Выйти",text:"Вы уверене что хотиет выйти"},()=>{be.Logaut()})};return n.jsxs("menu",{children:[n.jsx("ul",{children:t.map(o=>n.jsx(To,{items:e,i:o,icons:a},o))}),n.jsx("em",{}),n.jsxs("ul",{children:[n.jsx(Mo,{icons:a}),r&&n.jsxs("li",{className:p.Router.isModule("Settings")?"active":"",onClick:()=>p.Router.setModule("Settings"),children:[n.jsx(a.Icons,{name:"s040"}),n.jsx("span",{children:"Настройки"})]}),n.jsxs("li",{onClick:i,children:[n.jsx(a.Icons,{name:"s044"}),n.jsx("span",{children:"Выход"})]})]})]})}const To=({items:e,i:t,icons:a})=>t[0]==="#"?n.jsx("b",{children:t.slice(1)}):n.jsxs("li",{className:p.Router.isModule(e[t].link)?"active":"",onClick:()=>{p.Router.setTabs(e[t].temp,!1),p.Router.setModule(e[t].link)},children:[n.jsx(a.Icons,{name:e[t].icon}),n.jsx("span",{children:e[t].name})]}),Mo=({icons:e})=>{const[t,a]=m.useState(!1),r=m.useRef(null),i=async()=>{r.current&&(await r.current.prompt(),a(!1))};return m.useEffect(()=>{window.addEventListener("appinstalled",o=>{}),window.addEventListener("beforeinstallprompt",async o=>{o.preventDefault(),r.current=o,a(!0)})},[]),t?n.jsxs("li",{onClick:i,children:[n.jsx(e.Icons,{name:"install"}),n.jsx("span",{children:"Установить как приложение"})]}):""};function Nn({path:e,query:t,button:a,emptyList:r="Список пуст",searchParams:i=["p01","p02","p03"],...o}){const[s,c]=m.useState([]),[l,_]=m.useState([]),[d,g]=m.useState(!1),f=async()=>{let h=await p.Api.fetch(e,t);h.data&&h.data.length>0&&(c(h.data),_(h.data)),g(!0)};return ce.useListener("list_children",h=>{if(h.action==="edit"){let v=l.map(x=>x.id===h.id?Object.assign(x,{[h.name]:h.value}):x);c(v),_(v)}if(h.action==="delete"){let v=l.filter(x=>x.id!==h.id);c(v),_(v)}}),ce.useListener("search",h=>{c(l.filter(v=>(""+i.map(b=>v[b]).toString()).toLowerCase().includes(h.toLowerCase())))}),m.useEffect(()=>{f(),a&&ce.setListener("button",a)},[]),d&&s.length===0?n.jsx("ul",{className:"list-body",children:r}):n.jsx("ul",{className:"list-body",children:s.map((h,v)=>n.jsx(o.item,{data:h,count:v+1},h.id))})}const Bo={Menu:No,List:Nn},$o={sort:"_sort_1yrvt_1"};let qe={};function Lo(e,t){switch(t.type){case"active":let a="<";return e.active===t.data&&(a=e.sort==="<"?">":"<"),qe.get({active:t.data,sort:a},!1),_n({active:t.data,sort:a}),{...e,active:t.data,sort:a};default:throw new Error}}function Ao(){const[e,t]=m.useReducer(Lo,ct()===void 0?{active:1,sort:"<"}:ct());return n.jsxs("div",{className:$o.sort,children:[n.jsx("i",{"data-color":e.active===1?"_506290":"_b5b9cc","data-icon":e.active===1?e.sort==="<"?"F073":"F072":"F071",onClick:()=>t({type:"active",data:1})}),n.jsx("i",{"data-color":e.active===2?"_506290":"_b5b9cc","data-icon":e.active===2?e.sort==="<"?"F066":"F067":"F074",onClick:()=>t({type:"active",data:2})}),n.jsx("i",{"data-color":e.active===3?"_506290":"_b5b9cc","data-icon":e.active===3?e.sort==="<"?"F068":"F069":"F070",onClick:()=>t({type:"active",data:3})})]})}function Fo(e){qe.get=e}function Po(e){qe.set(e)}function Oo(e,t,a){let r=1,i=0,o={},s=50;o[r]=[];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),a.active){case 1:l=a.sort===">"?"s1d":"s1a";break;case 2:l=a.sort===">"?"s2d":"s2a";break;case 3:l=a.sort===">"?"s3d":"s3a";break}return t.sort(c[l]).forEach(_=>{i++,i<=s||(r++,i=1,o[r]=[]),o[r].push(e[_.id])}),{data:o}}function zo(e){qe.count(e)}const Ro={Init:Ao,useValue:Fo,Set:Po,Run:Oo,Count:zo},Je={},Tn={};function Zo(e){const[t,a]=m.useState({}),r=async i=>{a(Object.keys(Je).reduce((o,s)=>(o?o[s]=Je[s].all:o={},o),{}))};return m.useEffect(()=>{e.forEach(i=>Je[i]={all:0}),Tn.menu=r,r()},[e]),t}function Uo(e,t){switch(typeof t){case"number":Je[e].all+=t,Tn.menu();break}}const Wo={useMenu:Zo,setUpdate:Uo};class Go{constructor(t="el",a="db"){Ut(this,"storeName");Ut(this,"_dbp");this.storeName=a,this._dbp=new Promise((r,i)=>{const o=indexedDB.open(t,1);o.onerror=()=>i(o.error),o.onsuccess=()=>r(o.result),o.onupgradeneeded=()=>{o.result.createObjectStore(a)}})}_withIDBStore(t,a){return this._dbp.then(r=>new Promise((i,o)=>{const s=r.transaction(this.storeName,t);s.oncomplete=()=>i(),s.onabort=s.onerror=()=>o(s.error),a(s.objectStore(this.storeName))}))}}let vt,J={};const De=()=>(vt||(vt=new Go),vt),ke=(e,t,a=De())=>a._withIDBStore("readwrite",r=>{J[e]=t,r.put(p.Crypto.enCode(t),e)}),he=(e,t=De())=>J[e]===void 0?new Promise((a,r)=>{let i;t._withIDBStore("readonly",o=>{i=o.get(e)}).then(()=>{if(i.result!==void 0){let o=p.Crypto.deCode(i.result);J[e]=o,a(o)}else a({})})}):J[e],Ko=(e,t=De())=>t._withIDBStore("readwrite",a=>{a.delete(e)}),yt=(e=De())=>e._withIDBStore("readwrite",t=>{t.clear()}),Yo={id:async(e,t,a)=>{let r=await he(t);if(a!==void 0)a({type:"load",base:r});else return r[e]},get:he,set:ke,add:async(e,t,a,r)=>{let i,o;o=await he(a),o[e.id]=e,await ke(a,o),i!==null&&(i=await he(t),i[e.id]=e.eDate,await ke(t,i)),r!==void 0&&r({type:"load",page:i,base:o})},del:Ko,upd:(e,t,a,r=De())=>{if(J[e]===void 0)return new Promise((i,o)=>{let s;r._withIDBStore("readonly",c=>{s=c.get(e)}).then(()=>{if(s.result!==void 0){let c=p.Crypto.deCode(s.result);J[e]=c,J[e][t.id]={...J[e][t.id],...t.data},r.put(p.Crypto.enCode(J[e]),e),i({})}else i({})})});if(J[e][t.id]!==void 0)return J[e][t.id]={...J[e][t.id],...t.data},a!==void 0&&J[a]!==void 0?J[a][t.id]!==void 0&&(J[a][t.id]=t.data.eDate):J[a]=[],delete J[e][t.id].$_item,delete J[e][t.id].$_send,r._withIDBStore("readwrite",i=>{i.put(p.Crypto.enCode(J[e]),e),a!==void 0&&i.put(p.Crypto.enCode(J[a]),a)})},key:(e=De())=>{const t=[];return e._withIDBStore("readonly",a=>{(a.openKeyCursor||a.openCursor).call(a).onsuccess=function(){this.result&&(t.push(this.result.key),this.result.continue())}}).then(()=>t)},load:e=>J[e],split:(e,t,a=[],r={})=>{let i=a.length!==0,o=[],s=r.sort,c=Object.keys(r).length!==0,l=Object.keys(r),_=Object.keys(e),d=[],g=h=>{let v="";if(a.forEach(x=>{v+=t[h][x]}),c){let x={};l.forEach(b=>{x[b]=t[h][b]});for(let b in s)t[h][s[b]]===void 0&&(yt(),location.reload()),b==="s1"&&(x[b]=new Date(t[h][s[b]]).getTime()),b==="s2"&&(x[b]=t[h][s[b]]),b==="s3"&&(x[b]=t[h][s[b]].replace(/[^a-zа-яё]/gi,"").substring(0,1));o.push({id:h,text:v,...x})}else o.push({id:h,text:v})},f=h=>{};return _.forEach(h=>{d.push(t[h])}),d.forEach(h=>{h===void 0?(yt(),location.reload()):(i&&g(h.id),c&&f(h.id))}),{list:d,search:o,filter:r}},clear:yt,updAll:async(e,t,a,r)=>{let i=await he(t),o=await he(a);for(let s in e)o[s]=e[s],i[s]=e[s].eDate;await ke(t,i),await ke(a,o),r!==void 0&&r({type:"load",page:i,base:o})},delAll:async(e,t,a,r)=>{let i=await he(t),o=await he(a);e.forEach(s=>delete i[s]),await ke(t,i),r!==void 0&&r({type:"load",page:i,base:o})},delList:async(e,t,a)=>{let r=await he(t);e.forEach(i=>delete r[i]),await ke(t,r)},addList:async(e,t,a)=>{let r=await he(t);e.forEach(i=>r[i.id]=i.eDate),await ke(t,r)}},Ho={version:{Api:ir,Server:rr,Client:or},Host:sr,Import:lr,Crypto,defaultModule:Nr,IconAssets:Co,DynamicURL:dr},qo={useKey:(e,t)=>{const a=[];t=t.map(r=>r.charCodeAt(0)),document.onkeydown=function(r){a.push(r.keyCode);for(var i=0;i<t.length;i++)if(a.indexOf(t[i])==-1)return;e(),a.length=0},document.onkeyup=function(r){a.length=0}}},Jo={s:"_s_18bde_1",loadingB:"_loadingB_18bde_1",ul:"_ul_18bde_31"};function Mn({children:e}){return n.jsx("ul",{className:ie.ul,children:e})}function Xo(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 a=Object.keys(e.data).length,r=e.item+1;return r=a<r?1:r,e.item===r?e:{...e,wait:e.size===r,item:r,list:[...e.list,...e.data[r]]};case"clear":return{load:!1,list:[],data:{},item:1,wait:!1,size:0};default:throw new Error}}function Bn({list:e,load:t,className:a,...r}){const i=m.useRef(null),[o,s]=m.useReducer(Xo,{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 n.jsx("div",{className:[Jo.s,a].join(" "),ref:i,onScroll:c,children:n.jsx(Mn,{"el-empty":"Данные не найдены",children:o.load&&o.list!==void 0?o.list.map(l=>n.jsx(r.item,{data:l},l.id)):n.jsxs("div",{"data-load":"load",children:[n.jsx("i",{}),n.jsx("i",{}),n.jsx("i",{})]})})})}const Vo={Widget:Bi},$n=({onClick:e,active:t})=>(t=!!t,n.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(a=>{if(e){let r=t.target.textContent.length;if(r>=e)return;e-=r,a=a.slice(0,e)}window.document.execCommand("insertText",!1,a.replace(/(\r\n|\n|\r)/gm," "))}).catch(a=>{})},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=be.isBrowser("Firefox")?"true":"plaintext-only";function ze({id:e,value:t,onValue:a,name:r,placeholder:i="",title:o="",error:s="",hide:c=!1,edit:l=!0,active:_=!0,after:d="",before:g="",show:f=!0,maxLength:h,onSave:v,className:x="",isCopy:b=!0,isReload:k=!1}){let w=!!(c&&(t===""||t===void 0)),N=I=>{a&&a({value:I.target.textContent.trim(),name:r,reload:k})},T=I=>{h&&I.target.textContent.trim().length>=h&&I.key!=="Backspace"&&I.preventDefault(),I.key==="Enter"&&I.preventDefault()},M=I=>{b&&(I.preventDefault(),navigator.clipboard.writeText(I.target.textContent.trim()).then(function(){p.Notice.Copy("Данные в буфер обмене")},function(L){}))},y=I=>{I.preventDefault(),navigator.clipboard.readText().then(L=>{if(h){let D=I.target.textContent.length;if(D>=h)return;h-=D,L=L.slice(0,h)}window.document.execCommand("insertText",!1,L.replace(/(\r\n|\n|\r)/gm," "))}).catch(L=>{})};if(!(l&&_)&&!f||!(l&&_)&&w)return"";const C={};C.field="input",x&&(C.className=x);const E={};i&&(E.placeholder=i),l&&_&&(E.edit="");const O=I=>{G.Blur(I),v==null||v({value:I.target.textContent.trim(),name:r})};return n.jsxs("dl",{...C,children:[o?n.jsx("dt",{children:o}):"",g,n.jsx("dd",{onPaste:y,onInput:N,onBlur:O,onKeyDown:T,onContextMenu:M,spellCheck:"true",contentEditable:l&&_?G.ContentEditable:"false",suppressContentEditableWarning:!0,...E,children:t}),d,s?n.jsx("em",{children:s}):""]})}function Ln({onClick:e,onSend:t,name:a,onRef:r}){let[i,o]=m.useState(!1);const s=()=>{if(e)return e();i||(o(!0),t&&t(o))};return n.jsx("button",{ref:r,"data-form":"button",className:i?"btn await":"btn confirm pointer",onClick:s,children:i?"Ожидайте":a})}function An({value:e,onValue:t,onActive:a,data:r,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}),g=()=>{d.current.value.length>0?d.current.send&&(a(!0),d.current.send=!1,d.current.timerId=setTimeout(()=>{d.current.send=!0},3e3)):a(!1)},f=w=>{d.current.value=w.target.textContent,g()},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="",r&&r(d.current.value),t&&t(d.current.value),d.current.value="",a(!1)))},v=w=>{w.keyCode===16&&(d.current.shift=!1)},x=w=>{w.preventDefault(),navigator.clipboard.readText().then(N=>{if(s){let T=w.target.textContent.length;if(T>=s)return;s-=T,N=N.slice(0,s)}window.document.execCommand("insertText",!1,N)}).catch(N=>{})},b=()=>{a(!1)},k={spellCheck:"true"};return _&&(k.placeholder=_),c&&l&&(k.contentEditable=G.ContentEditable),n.jsx("dl",{"data-form":"message",children:n.jsx("dd",{onPaste:x,onInput:f,onKeyUp:v,onKeyDown:h,onBlur:b,...k,suppressContentEditableWarning:!0,children:e})})}function Fn(e){let t=()=>e.title?n.jsx("dt",{children:e.title}):"",a=e.edit!==void 0?e.edit:!0,r=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 n.jsxs("dl",{"data-form":"input","type-data":"generator",children:[t(),n.jsx("dd",{onPaste:c,onInput:o,onKeyDown:s,contentEditable:a&&r?G.ContentEditable:"false","data-placeholder":i,suppressContentEditableWarning:!0,children:e.value})]})}function Pn({value:e,onValue:t,maxLength:a,placeholder:r="",name:i}){let o=(v,x)=>Number(Math.round(v+Math.random()*(x-v))),s=m.useRef(null),c=m.useRef(null),l=o(1e4,99999),_=v=>{v.key!=="Backspace"&&(v.key==="Enter"&&v.preventDefault(),v.target.textContent.length===5&&v.preventDefault(),/\d/.test(v.key)||v.preventDefault())},d=v=>{t({value:Number(v.target.textContent)===l,name:i})},g=v=>{v.preventDefault(),navigator.clipboard.readText().then(x=>{if(a){let b=v.target.textContent.length;if(b>=a)return;a-=b,x=x.slice(0,a)}window.document.execCommand("insertText",!1,x.replace(/(\r\n|\n|\r)/gm," ").replace(/[^0-9]/g,"").substring(0,5))}).catch(x=>{})};m.useEffect(()=>{const v=s.current,x=v.getContext("2d");x.clearRect(0,0,v.width,v.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 r&&(h.placeholder=r),n.jsxs("dl",{...f,children:[n.jsx("dd",{ref:c,onPaste:g,onInput:d,onBlur:G.Blur,onKeyDown:_,contentEditable:G.ContentEditable,suppressContentEditableWarning:!0,...h}),n.jsx("canvas",{ref:s,width:"100",height:"35"})]})}function On({className:e,title:t,error:a,edit:r=!0,real:i,onValue:o,empty:s,name:c}){let l={n1:"",n2:"",n3:"",n4:"",n5:"",n6:"",code:""},_=x=>{if(x.preventDefault(),!r)return;x.target.textContent=x.target.textContent.slice(-1).replace(/[^+\d]/g,"");let b=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,b.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(!r)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 b=x.target.previousSibling.id.slice(1);x.target.previousSibling.textContent="",l["n"+b]="",x.target.previousSibling.focus()}l.code=l.n1+""+l.n2+l.n3+l.n4+l.n5+l.n6}},g=x=>{if(!r)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 b=1;b<=6;b++){let k=document.getElementById("n"+b);k&&(k.textContent="")}}},f=x=>{x.target.textContent=""},h=x=>{x.preventDefault(),navigator.clipboard.readText().then(b=>{var T;var k=/\d+/g;let w=(T=b.match(k))==null?void 0:T.toString();if(!w)return;let N=w.split("");for(let M=1;M<=N.length;M++){let y=document.getElementById("n"+M);y&&(y.textContent=N[M-1],l["n"+M]=N[M-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 M=1;M<=6;M++){let y=document.getElementById("n"+M);y&&(y.textContent="")}}}).catch(b=>{})};const v={};return v.field="code",e&&(v.className=e),n.jsxs("dl",{...v,children:[t?n.jsx("dt",{children:t}):"",n.jsxs("div",{children:[n.jsx("dd",{id:"n1",inputMode:"numeric",onKeyDown:d,onKeyUp:g,onFocus:f,onPaste:h,onInput:_,contentEditable:!0}),n.jsx("dd",{id:"n2",inputMode:"numeric",onKeyDown:d,onKeyUp:g,onFocus:f,onPaste:h,onInput:_,contentEditable:!0}),n.jsx("dd",{id:"n3",inputMode:"numeric",onKeyDown:d,onKeyUp:g,onFocus:f,onPaste:h,onInput:_,contentEditable:!0}),n.jsx("dd",{id:"n4",inputMode:"numeric",onKeyDown:d,onKeyUp:g,onFocus:f,onPaste:h,onInput:_,contentEditable:!0}),n.jsx("dd",{id:"n5",inputMode:"numeric",onKeyDown:d,onKeyUp:g,onFocus:f,onPaste:h,onInput:_,contentEditable:!0}),n.jsx("dd",{id:"n6",inputMode:"numeric",onKeyDown:d,onKeyUp:g,onFocus:f,onPaste:h,onInput:_,contentEditable:!0})]}),a?n.jsx("em",{children:a}):""]})}function zn({id:e,value:t,onValue:a,name:r,placeholder:i="",title:o="",error:s="",hide:c=!1,length:l=6,edit:_=!0,active:d=!0,after:g="",show:f=!0,view:h,onSave:v,className:x=""}){_=_!==void 0?_:!0,d=d!==void 0?d:!0;let[b,k]=m.useState(t),w=T=>{k(T),a==null||a({value:T,name:r}),v==null||v({value:T,name:r})};const N={};return N.field="color",x&&(N.className=x),n.jsx(n.Fragment,{children:h==="icon"?n.jsx("i",{"data-icon":"F043"}):n.jsxs("dl",{...N,children:[o&&n.jsx("dt",{children:o}),n.jsx("dd",{children:l>0&&Array.from(Array(l).keys()).map(T=>n.jsx("s",{active:(Number(T)===Number(b))+"",onClick:()=>w(T),style:{backgroundColor:`var(--color-${T})`}},T))}),s&&n.jsx("em",{children:s})]})})}const xe={o:"_o_76l23_1",c:"_c_76l23_11",_active:"__active_76l23_41",as:"_as_76l23_94",ap:"_ap_76l23_97"};function wt({title:e,error:t,edit:a=!0,active:r=!0,className:i,placeholder:o,max:s,min:c,view:l="date",onValue:_,name:d,value:g,after:f}){let[h,v]=m.useState(g===void 0?new Date:g),x=!a&&r;m.useEffect(()=>{v(g===void 0?new Date:g)},[g]);let b=T=>{v(T),_==null||_({value:T,name:d})},k=T=>{const M=T.target.getBoundingClientRect(),y=M.left,C=M.bottom,E=M.top;ce.setListener("form",n.jsx(Qo,{position:{x:y,y:E,b:C},onValue:b,date:h,max:s,min:c,className:i},new Date().getTime()))};const w={};w.field="input",i&&(w.className=i);const N={};return o&&(N.placeholder=o),x?n.jsx(n.Fragment,{}):n.jsx(n.Fragment,{children:l==="icon"?n.jsx("i",{"data-icon":"F043",className:"pointer","data-color":"_b5b9cc :506290",onClick:k}):n.jsxs("dl",{...w,children:[e&&n.jsx("dt",{children:e}),n.jsxs("dd",{onClick:k,...N,"data-edit":(a&&r)+"",children:[K.Date(h,"dd.mm.yyyy"),f]}),t&&n.jsx("em",{children:t})]})})}const Qo=({date:e,onValue:t,position:a,max:r,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},g={y:parseInt(_.getFullYear()),d:parseInt(_.getDate()),m:parseInt(_.getMonth())+1},[f,h]=m.useState({y:g.y,m:g.m}),v=j=>{let $=j.getDay();return $===0&&($=7),$-1},x=["пн","вт","ср","чт","пт","сб","вс"],b=f.m-1,k=new Date(f.y,b),w=[];for(let j=0;j<v(k);j++)w.push(0);for(;k.getMonth()===b;)w.push(k.getDate()),k.setDate(k.getDate()+1);let N=()=>{c(!1)},T=()=>{C(f.m+1,f.y)},M=()=>{C(f.m-1,f.y)},y=j=>{t(f.y+"-"+K.Number(2,f.m)+"-"+K.Number(2,j)),N()},C=(j,$)=>{$=j>12?$+1:j<1?$-1:$,j=j>12?1:j<1?12:j,h({y:$,m:j})};const E=j=>d.y===f.y&&d.m===f.m&&d.d===j?{"data-active":"true"}:{},O=j=>g.y===f.y&&g.m===f.m&&g.d===j?{"data-current":"true"}:{},I=j=>{let $=!0;if(r){let U=r.getTime(),Q=new Date(f.y,f.m-1,j).getTime();U<Q&&($=!1)}if(i){let U=i.getTime(),Q=new Date(f.y,f.m-1,j).getTime();U>Q&&($=!1)}return $};let L=window.innerHeight-a.y<320?a.y-312:a.b,D=window.innerWidth-a.x<265?a.x-235:a.x;return n.jsx(n.Fragment,{children:s?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:xe.o,onClick:()=>N()},new Date().getTime()),n.jsxs("div",{className:[xe.c,o&&o+"-backdrop"].join(" "),style:{top:L+"px",left:D+"px"},children:[n.jsxs("s",{children:[n.jsx("i",{onClick:M,children:n.jsx("svg",{width:"16",height:"16",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:n.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"})})}),n.jsxs("h2",{children:[K.Month(f.m).name," ",f.y]}),n.jsx("i",{onClick:T,children:n.jsx("svg",{width:"16",height:"16",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:n.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"})})})]}),n.jsxs("div",{"grid-calendar":"",children:[x.map((j,$)=>n.jsx("p",{children:j},"v"+$)),w.map((j,$)=>n.jsx("span",{children:j!==0&&I(j)?n.jsx("b",{...E(j),...O(j),onClick:()=>y(j),children:j}):n.jsx("p",{...E(j),...O(j),children:j!==0?j:""})},$))]})]})]}):""})};function kt({value:e,onValue:t,name:a,placeholder:r="",title:i,error:o,hide:s=!1,edit:c=!0,show:l=!0,active:_=!0,after:d="",view:g,modal:f,module:h,options:v,className:x}){let[b,k]=m.useState(e),w=M=>{if(!(c&&_)||!f)return;let y=f.split(".");p.Modal.Open(y[0],y[1],{callback:C=>{t&&t({value:C,name:a}),k(C)},onValue:t,options:v,name:a,value:e})};const N={};N.field="input",x&&(N.className=x);const T={};return r&&(T.placeholder=r),s?n.jsx(n.Fragment,{}):n.jsxs("dl",{...N,children:[i&&n.jsx("dt",{children:i}),n.jsx("dd",{...T,onClick:w,edit:(c&&_)+"","data-after":d,children:b}),o&&n.jsx("em",{children:o})]})}function jt({value:e,onValue:t,name:a,placeholder:r="",title:i="",error:o="",hide:s=!1,edit:c=!0,active:l=!0,after:_="",show:d=!0,course:g=100,view:f,type:h,onSave:v,className:x="",isClear:b=!1}){let k=!!(s&&(e===""||e===void 0));e=K.isNumeric(e)?Number(e)/g:0;let w=D=>h==="multi"?D.replace(/[^+\d.+-]/g,""):D.replace(/[^+\d.]/g,""),N=(D,j)=>{let $=document.createRange(),U=window.getSelection();$.setStart(j.childNodes[0],D),$.collapse(!0),U.removeAllRanges(),U.addRange($),j.focus()},T=D=>{t==null||t({value:w(D.target.textContent)*g,name:a}),D.target.textContent=w(D.target.textContent),D.target.textContent.length>0&&N(D.target.textContent.length,D.target)},M=D=>{G.Blur(D),D.target.textContent===""&&(D.target.textContent=0),v==null||v({value:w(D.target.textContent)*g,name:a}),t==null||t({value:w(D.target.textContent)*g,name:a}),D.target.textContent=K.Money(D.target.textContent)},y=D=>{D.target.textContent=w(D.target.textContent)},C=D=>{D.currentTarget.previousElementSibling.textContent="",t==null||t({value:0,name:a})},E=D=>{D.key==="Enter"&&D.preventDefault()},O=D=>{D.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 I={};I.field="input",x&&(I.className=x);const L={};return L.inputMode="decimal",r&&(L.placeholder=r),c&&l&&(L.edit=""),n.jsxs("dl",{...I,children:[i?n.jsx("dt",{children:i}):"",n.jsx("dd",{...L,onInput:T,onPaste:O,onBlur:M,onKeyDown:E,onFocus:y,contentEditable:c&&l?G.ContentEditable:"false",suppressContentEditableWarning:!0,"data-after":_,children:!r||e?K.Money(e):""}),b&&n.jsx("svg",{"action-type":"delete",onClick:C,viewBox:"0 0 24 24",children:n.jsx("path",{d:"M17 6L6 17M6 6L17 17"})}),o?n.jsx("em",{children:o}):""]})}function Rn({value:e,onValue:t,name:a,view:r,error:i,edit:o=!0,active:s=!0,title:c,placeholder:l="",className:_,after:d}){let[g,f]=m.useState(e);m.useEffect(()=>{f(e)},[e]);let h=b=>{f(b),t&&t({value:b,name:a})},v=b=>{if(!o||!s)return;const k=b.target.getBoundingClientRect(),w=k.left,N=k.top;ce.setListener("form",n.jsx(es,{position:{x:w,y:N},onValue:h,date:g},new Date().getTime()))};const x={};return l&&(x.placeholder=l),r==="icon"?n.jsx("i",{"data-icon":"F043",onClick:v}):n.jsxs("dl",{children:[c&&n.jsx("dt",{children:c}),n.jsx("dd",{onClick:v,...x,children:K.Date(g,"mm.yyyy")}),i&&n.jsx("em",{children:i})]})}const es=e=>{let[t,a]=m.useState(!0),r=new Date,i=new Date(e.date),o={y:parseInt(r.getFullYear()),m:parseInt(r.getMonth())+1},s={y:parseInt(i.getFullYear()),m:parseInt(i.getMonth())+1},[c,l]=m.useState(s.y),_=()=>{a(!1)},d=()=>{l(c+1)},g=()=>{l(c-1)},f=k=>{e.onValue(c+"-"+K.Number(2,k)),_()},h=k=>o.y===s.y&&o.m===k?"_FFEB3B":"",v=Array(12).fill("").map((k,w)=>w+1),x=window.innerHeight-e.position.y+33<320?e.position.y-312:e.position.y+33,b=window.innerWidth-e.position.x<265?e.position.x-235:e.position.x;return n.jsx(n.Fragment,{children:t?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:xe.o,onClick:()=>_()},new Date().getTime()),n.jsxs("div",{className:xe.c,style:{top:x+"px",left:b+"px"},children:[n.jsxs("s",{children:[n.jsx("i",{onClick:g,children:n.jsx("svg",{width:"16",height:"16",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:n.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"})})}),n.jsx("h2",{children:c}),n.jsx("i",{onClick:d,children:n.jsx("svg",{width:"16",height:"16",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:n.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"})})})]}),n.jsx("div",{"grid-month":"",children:v.map((k,w)=>n.jsx("span",{onClick:()=>{f(k)},color:h(k),children:n.jsx("b",{children:K.Month(k).abc})},w))})]})]}):""})};function Zn({id:e,value:t,onValue:a,name:r,placeholder:i="",title:o="",error:s="",hide:c=!1,edit:l=!0,active:_=!0,after:d="",show:g=!0,maxLength:f,view:h,onSave:v,className:x="",isCopy:b=!0}){let[k,w]=m.useState(!1);k=l?!0:k;let N=I=>{a==null||a({value:I.target.innerText,name:r})},T=I=>{f&&I.target.textContent.trim().length>=f&&I.key!=="Backspace"&&I.preventDefault(),I.key==="Enter"&&I.preventDefault()},M=I=>{b&&(I.preventDefault(),navigator.clipboard.writeText(I.target.textContent.trim()).then(function(){p.Notice.Copy("Данные в буфер обмене")},function(L){}))},y=I=>{I.preventDefault(),navigator.clipboard.readText().then(L=>{if(f){let D=I.target.textContent.length;if(D>=f)return;f-=D,L=L.slice(0,f)}window.document.execCommand("insertText",!1,L.replace(/(\r\n|\n|\r)/gm," "))}).catch(L=>{})};if(c)return n.jsx(n.Fragment,{});if(!(l&&_)&&!g)return"";const C={};C.field="notes",x&&(C.className=x);const E={};i&&(E.placeholder=i),l&&_&&(E.edit=""),k&&(E.open="");const O=I=>{G.Blur(I),v==null||v({value:I.target.textContent.trim(),name:r})};return n.jsxs("dl",{...C,children:[o?n.jsx("dt",{children:o}):"",n.jsx("dd",{onPaste:y,onInput:N,onBlur:O,onKeyDown:T,onContextMenu:M,contentEditable:l&&_?G.ContentEditable:"false",suppressContentEditableWarning:!0,...E,children:t}),d,s?n.jsx("em",{children:s}):""]})}function Ct({onValue:e,onSave:t,active:a,max:r,edit:i,title:o,error:s,show:c,hide:l,value:_,placeholder:d,className:g,maxLength:f,name:h,after:v="",before:x="",view:b}){i=i!==void 0?i:!0,a=a!==void 0?a:!0,l=!!(l&&(_===""||_===void 0))&&!(i&&a),d=d!==void 0?d:"",r=r!==void 0?r:99;let w=!1,N=I=>{e==null||e({value:I.target.textContent,name:h})},T=I=>{if(!(w&&I.which===86)){if(I.which===17||I.which===91)return w=!0;I.key!=="Backspace"&&(I.target.textContent.length===r&&I.preventDefault(),I.key==="Enter"&&I.preventDefault(),isNaN(I.key)&&I.preventDefault())}},M=I=>{if(I.which===17||I.which===91)return w=!1},y=I=>{I.preventDefault(),navigator.clipboard.readText().then(L=>{if(L=L.replace(/(?!^\+|\d)./g,""),f){let D=I.target.textContent.length;if(D>=f)return;f-=D,L=L.slice(0,f)}window.document.execCommand("insertText",!1,""+L)}).catch(L=>{})};const C=I=>{G.Blur(I),t==null||t({value:I.target.textContent,name:h})},E={};E.field="input",g&&(E.className=g);let O={};return i&&a?(O.edit="true",O.contentEditable=G.ContentEditable):O.contentEditable="false",O.inputMode="decimal",d&&(O.placeholder=d),l?n.jsx(n.Fragment,{}):n.jsxs("dl",{...E,children:[o&&n.jsx("dt",{children:o}),x,n.jsx("dd",{...O,onPaste:y,onInput:N,onBlur:C,onKeyDown:T,onKeyUp:M,suppressContentEditableWarning:!0,children:_}),v,s&&n.jsx("em",{children:s})]})}function Un({value:e,onValue:t,onSave:a,name:r,placeholder:i="",className:o,title:s,error:c,edit:l=!0,active:_=!0,reload:d=!1,native:g=!1,isShow:f=!1,maxLength:h,eyes:v=[],after:x=""}){const[b,k]=m.useState(f);let w=E=>{t&&t({value:E.target.textContent,name:r,reload:d})},N=E=>{E.key==="Enter"&&E.preventDefault()},T=E=>{E.preventDefault(),navigator.clipboard.readText().then(O=>{if(h){let I=E.target.textContent.length;if(I>=h)return;h-=I,O=O.slice(0,h)}window.document.execCommand("insertText",!1,O.replace(/(\r\n|\n|\r)/gm," "))}).catch(O=>{})},M=E=>{G.Blur(E),a==null||a({value:E.target.textContent.trim(),name:r})};const y={};y.field="password",b&&(y.show=""),o&&(y.className=o);const C={};return i&&(C.placeholder=i),g?"":n.jsxs("dl",{...y,children:[s?n.jsx("dt",{children:s}):"",n.jsx("dd",{onPaste:T,onInput:w,onKeyDown:N,onBlur:M,contentEditable:l&&_?G.ContentEditable:"false",...C,suppressContentEditableWarning:!0,children:e}),v[0]&&n.jsx("i",{onClick:()=>k(!b),children:b?v[1]:v[0]}),x,c?n.jsx("em",{children:c}):""]})}const St={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 Et({value:e,onValue:t,onSave:a,name:r,placeholder:i="",title:o="",error:s="",hide:c=!1,edit:l=!0,active:_=!0,after:d="",show:g=!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="+_(___) ___-__-__",b=!0,k=0,w=(D,j)=>{let $=document.createRange(),U=window.getSelection();$.setStart(j.childNodes[0],D),$.collapse(!0),U.removeAllRanges(),U.addRange($),j.focus()},N=D=>{let j=M(D.target.textContent);D.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,D.target),t&&t({value:j.q.replace(/\D/g,""),name:r})},T=D=>{D.preventDefault(),navigator.clipboard.readText().then(j=>{window.document.execCommand("insertText",!1,j)}).catch(j=>{})},M=D=>{let j=0,$="",U=D.replace(/\D/g,"");U===""&&(b=!0);let Q=U.split(""),le="";Q.forEach(Re=>{b&&(le+=Re,St[le]!==void 0&&b?(b=!1,x=St[le].mask.replace(new RegExp("[0-9]","g"),"_"),$=St[le].code):(b&&(k=(""+le).length,x=`+${le}_(___) ___-__-__`.replace(new RegExp("[0-9]","g"),"_"),$=""),k>(""+le).length&&(b=!0,x=`+${le}_(___) ___-__-__`.replace(new RegExp("[0-9]","g"),"_"),$="")))});let ve=x.replace(/\D/g,"");return ve.length>=U.length&&(U=ve),{q:x.replace(/[_\d]/g,function(){return U.charAt(j++)||"_"}),i:j,v:U,f:$}},y=D=>{D.preventDefault(),navigator.clipboard.writeText(D.target.textContent.replace(/\D/g,"")).then(function(){p.Notice.Copy("Данные в буфер обмене")},function(j){})},C=M(e),E=D=>{D.key==="Enter"&&D.preventDefault()};const O=D=>{G.Blur(D),a&&a({value:D.target.textContent.replace(/\D/g,""),name:r})},I={};I.field="input",h&&(I.className=h);let L={};return l&&_?(L.edit="true",L.contentEditable=G.ContentEditable):L.contentEditable="false",i&&(L.placeholder=i),d&&(L.after=d),c?n.jsx(n.Fragment,{}):n.jsxs("dl",{...I,children:[o&&n.jsx("dt",{children:o}),n.jsx("dd",{...L,onPaste:T,onInput:N,onKeyDown:E,onContextMenu:y,onBlur:O,suppressContentEditableWarning:!0,children:C.q}),s&&n.jsx("em",{children:s})]})}const Wn=({className:e,title:t,timeout:a=1e3,placeholder:r,edit:i=!0,active:o=!0,value:s,onValue:c,maxLength:l=20})=>{let _=0,d=m.useRef({textContent:s}),g=()=>{d.current.textContent.trim().length===0&&(d.current.textContent=""),clearTimeout(_),_=setTimeout(()=>{var w;return c((w=d.current)==null?void 0:w.textContent)},a)},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()},v=w=>{w.preventDefault(),navigator.clipboard.readText().then(N=>{if(l){let T=w.target.textContent.length;if(T>=l)return;l-=T,N=N.slice(0,l)}window.document.execCommand("insertText",!1,N.replace(/(\r\n|\n|\r)/gm," "))}).catch(N=>{})},x=()=>{d.current.textContent=d.current.textContent.trim()};const b={};b.field="search",e&&(b.className=e);const k={};return r&&(k.placeholder=r),n.jsxs("dl",{...b,children:[t&&n.jsx("dt",{children:t}),n.jsx("dd",{ref:d,onPaste:v,onInput:g,onKeyDown:h,onBlur:x,contentEditable:i&&o?G.ContentEditable:"false",...k,suppressContentEditableWarning:!0,children:s}),n.jsx("svg",{"aria-label":"icon",onClick:f,viewBox:"0 0 24 24",children:n.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"})}),n.jsx("svg",{"action-type":"delete",onClick:f,viewBox:"0 0 24 24",children:n.jsx("path",{d:"M17 6L6 17M6 6L17 17"})})]})};function It({title:e,error:t,edit:a=!0,active:r=!0,hide:i,value:o=0,onValue:s,options:c,placeholder:l="",className:_,name:d,after:g,view:f,order:h,isReload:v=!1}){var O,I;const x=m.useRef(),[b,k]=m.useState(o),[w,N]=m.useState(c);m.useEffect(()=>{k(o),N(c)},[o,c]),i=!!(i&&(o===0||((O=w==null?void 0:w[o])==null?void 0:O.n)===void 0))&&!(a&&r);let M=L=>{k(L),s&&s({value:L,name:d,reload:v})},y=L=>{if(Object.keys(w||{}).length===0||!(a&&r))return;const D=L.target.getBoundingClientRect();ce.setListener("form",n.jsx(ts,{parent:D,onValue:M,view:f,className:_,options:w,order:h},new Date().getTime()))},C={field:"select",className:_},E={onClick:y};return l&&(E.placeholder=l),g&&(E.after=g),a&&r&&(E.edit=""),i?"":n.jsxs("dl",{...C,children:[e&&n.jsx("dt",{children:e}),n.jsx("dd",{...E,ref:x,children:(I=w==null?void 0:w[b])==null?void 0:I.n}),Object.keys(w||{}).length!==0&&n.jsx("s",{children:n.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:n.jsx("path",{d:"m5.25 8.625 6.75 6.75 6.75-6.75"})})}),t&&n.jsx("em",{children:t})]})}const ts=({onValue:e,parent:t,view:a,className:r,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,g=window.innerWidth-t.x<265?t.x-235:t.x;return n.jsx(n.Fragment,{children:s?n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-select":"backdrop",onClick:l},new Date().getTime()),n.jsx("div",{className:r,"data-select":"background "+a,style:{top:d+"px",left:g+"px",width:t.width},children:n.jsx(ns,{order:o,options:i,link:_})})]}):""})},ns=({order:e,options:t,link:a})=>e?n.jsx("ul",{children:e.map((r,i)=>t[r].s!==0?n.jsx("li",{onClick:()=>{a(r)},children:t[r].n},i):"")}):n.jsx("ul",{children:Object.keys(t).map((r,i)=>t[r].s!==0?n.jsx("li",{onClick:()=>{a(r)},children:t[r].n},i):"")});function Dt(e){let t=()=>e.title?n.jsx("dt",{children:e.title}):"",a=()=>e.error?n.jsx("em",{children:e.error}):"",r=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))&&!(r&&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),g=h=>{if(!(r&&i))return;const v=h.target.getBoundingClientRect();ce.setListener("form",n.jsx(as,{parent:v,onValue:l,view:e.view,options:e.options},new Date().getTime()))};const f={};return c&&(f.placeholder=c),s?n.jsx(n.Fragment,{}):n.jsxs("dl",{"data-form":"select",children:[t(),n.jsx("dd",{onClick:g,"data-edit":(r&&i)+"",...f,children:_}),a()]})}const as=({onValue:e,parent:t,view:a,options:r})=>{let[i,o]=m.useState(!0),s=()=>{o(!1)},c=g=>{o(!1),e(g)},l=Object.keys(r).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 n.jsx(n.Fragment,{children:i?n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-select":"backdrop",onClick:s},new Date().getTime()),n.jsx("div",{"data-select":"background "+a,style:{top:_+"px",left:d+"px",width:t.width},children:n.jsx("ul",{children:Object.keys(r).map((g,f)=>n.jsx("li",{onClick:()=>{c(g)},children:r[g]},f))})})]}):""})};function Nt({set:e,value:t,onValue:a,name:r,placeholder:i="",title:o="",error:s="",hide:c=!1,edit:l=!0,show:_=!0,active:d=!0,after:g="",view:f,module:h,item:v,className:x=""}){let b={};switch(e){case"Input":return n.jsx(ze,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:a,name:r,placeholder:i,className:x});case"Select":return v&&(b=be.getSelect(parseInt(v))?be.getSelect(parseInt(v)):{0:{s:"1",n:"не известно"}}),n.jsx(It,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:parseInt(t||"0"),onValue:a,name:r,placeholder:i,className:x,options:b});case"Users":return be.getSelect("user"),n.jsx(Dt,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:a,name:r,placeholder:i,className:x,options:b});case"Date":return n.jsx(wt,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:a,name:r,placeholder:i,className:x});case"Phone":return n.jsx(Et,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:a,name:r,placeholder:i,className:x});case"Number":return n.jsx(Ct,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:a,name:r,placeholder:i,className:x});case"Money":return n.jsx(jt,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:a,name:r,placeholder:i,className:x});case"Modal":return n.jsx(kt,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:a,name:r||"",placeholder:i,className:x,options:b,module:h||""})}}function Gn({value:e,onValue:t,name:a,placeholder:r="",title:i="",error:o="",hide:s=!1,edit:c=!0,active:l=!0,after:_="",show:d=!0,view:g,maxLength:f,onSave:h,className:v=""}){let x=!!(s&&(e===""||e===void 0));if(!(c&&l)&&!d||!(c&&l)&&x)return"";let b=M=>{t&&t({value:M.target.innerText,name:a})},k=M=>{h&&h({value:M.target.innerText,name:a})},w=M=>{M.preventDefault(),navigator.clipboard.readText().then(y=>{if(f){let C=M.target.textContent.length;if(C>=f)return;f-=C,y=y.slice(0,f)}window.document.execCommand("insertText",!1,y)}).catch(y=>{})};const N={};N.field="text",v&&(N.className=v);const T={};return r&&(T.placeholder=r),n.jsxs("dl",{...N,children:[i&&n.jsx("dt",{children:i}),n.jsx("dd",{onPaste:w,onBlur:k,onInput:b,contentEditable:c&&l?G.ContentEditable:"false",...T,suppressContentEditableWarning:!0,children:e}),o&&n.jsx("em",{children:o})]})}function Kn({value:e,onValue:t,name:a,placeholder:r="",title:i="",error:o="",hide:s=!1,edit:c=!0,active:l=!0,after:_="",show:d=!0,view:g,onSave:f,className:h=""}){let v=!!(s&&(e===""||e===void 0)),x=K.Date(e===void 0?new Date:e,"HH:MM"),b=m.useRef(null);if(!(c&&l)&&!d||!(c&&l)&&v)return"";let k=y=>{b.current.textContent=y,t&&t({value:y,name:a})},w=y=>{f&&f({value:y,name:a})},N=y=>{const C=y.target.getBoundingClientRect(),E=C.left,O=C.top;ce.setListener("form",n.jsx(rs,{positions:{x:E,y:O},onSave:w,onValue:k,date:x},new Date().getTime()))};const T={};T.field="input",h&&(T.className=h);const M={};return r&&(M.placeholder=r),n.jsx(n.Fragment,{children:g==="icon"?n.jsx("i",{"data-icon":"F043",onClick:N}):n.jsxs("dl",{...T,children:[i?n.jsx("dt",{children:i}):"",n.jsx("dd",{onClick:N,ref:b,...M,children:x}),o?n.jsx("em",{children:o}):""]})})}const rs=({positions:e,onSave:t,onValue:a,date:r})=>{let i=r.split(":"),o={h:K.Number(2,i[0]),m:K.Number(2,i[1])},s="hour",[c,l]=m.useState({}),_=!1,d=0,g=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},v=()=>{_=!1,s=s==="hour"?"time":"hour",f.body.current.setAttribute("active",s)},x=y=>{if(_){let E=Math.atan2(y.pageX-(c.x+78),y.pageY-(c.y+78))*(180/Math.PI)*-1+180;f[s].current.style.transform="rotate("+E+"deg)",s==="hour"?(o={...o,h:K.Number(2,parseInt(String(E/15),10))},f.hourText.current.textContent=o.h):(o={...o,m:K.Number(2,parseInt(String(E/6),10))},f.timeText.current.textContent=o.m),a(o.h+":"+o.m)}},b=y=>{if(s==="hour")if(y.deltaY>0){d+=y.deltaY;let C=parseInt(String(d/50));if(g!==C){g=C;let E=parseInt(o.h,10)+1;E=E>23?0:E,o={...o,h:K.Number(2,E)},f.hourText.current.textContent=o.h,f[s].current.style.transform="rotate("+o.h*15+"deg)"}}else{d-=y.deltaY;let C=parseInt(String(d/50));if(g!==C){g=C;let E=parseInt(o.h,10)-1;E=E<0?23:E,o={...o,h:K.Number(2,E)},f.hourText.current.textContent=o.h,f[s].current.style.transform="rotate("+o.h*15+"deg)"}}else if(y.deltaY>0){d+=y.deltaY;let C=parseInt(String(d/50));if(g!==C){g=C;let E=parseInt(o.m,10)+1;E=E>59?0:E,o={...o,m:K.Number(2,E)},f.timeText.current.textContent=o.m,f[s].current.style.transform="rotate("+o.m*6+"deg)"}}else{d-=y.deltaY;let C=parseInt(String(d/50));if(g!==C){g=C;let E=parseInt(o.m,10)-1;E=E<0?59:E,o={...o,m:K.Number(2,E)},f.timeText.current.textContent=o.m,f[s].current.style.transform="rotate("+o.m*6+"deg)"}}a(o.h+":"+o.m)},[k,w]=m.useState(!0),N=()=>{w(!1),t(o.h+":"+o.m)},T=window.innerHeight-e.y+33<320?e.y-312:e.y+33,M=window.innerWidth-e.x<265?e.x-235:e.x;return n.jsx(n.Fragment,{children:k?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:xe.o,onClick:()=>N()},new Date().getTime()),n.jsxs("div",{className:xe.c,onMouseDown:h,onMouseUp:v,onMouseMove:x,onWheel:b,ref:f.body,style:{top:T+"px",left:M+"px"},children:[n.jsx("div",{className:"b"}),n.jsxs("div",{className:"s",children:[n.jsx("span",{className:["hour",s==="hour"?xe.as:xe.ap].join(" "),ref:f.hourText,children:o.h})," ",":"," ",n.jsx("span",{className:["min",s==="time"?xe.as:xe.ap].join(" "),ref:f.timeText,children:o.m})]}),n.jsx("div",{className:"h",ref:f.hour}),n.jsx("div",{className:"t",ref:f.time})]})]}):""})};function Yn({onValue:e,label:t,value:a,title:r,className:i,name:o,text:s,id:c,reload:l}){const[_,d]=m.useState(!!a),g=t||r;m.useEffect(()=>{d(!!a)},[a]);let f=()=>{e&&e({value:_?0:1,name:o,id:c}),d(!_)};const h={};return h.field="check",i&&(h.className=i),n.jsxs("dl",{...h,children:[g?n.jsx("dt",{children:g}):"",n.jsxs("dd",{onClick:f,children:[n.jsx("span",{children:s}),n.jsx("div",{role:"switch","aria-checked":`${_?"true":"false"}`})]})]})}const is=({label:e,onValue:t,value:a,name:r,item:i})=>{const[o,s]=m.useState(!!a);m.useEffect(()=>{s(!!a)},[a]);let c=()=>{let l=parseInt(o)===0?1:0;s(l),t({value:l,name:r,key:i,item:i})};return n.jsx("div",{role:"switch",onClick:c,"aria-checked":`${o?"true":"false"}`})},Hn=({onValue:e,value:t,name:a,item:r})=>{const[i,o]=m.useState(!!t);m.useEffect(()=>{o(!!t)},[t]);let s=()=>{let c=parseInt(i)===0?1:0;o(c),e({value:c,name:a,key:r,item:r})};return n.jsx("div",{role:"switch",onClick:s,"aria-checked":`${i?"true":"false"}`})};function qn({value:e,onValue:t,name:a,placeholder:r="",title:i="",error:o="",hide:s=!1,edit:c=!0,active:l=!0,after:_="",show:d=!0,view:g,max:f=0,onSave:h,className:v="",separator:x=","}){const[b,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&&b.length>=f)return p.Notice.Error("Слишком много");k([...b,""])},N=L=>{b.splice(L,1),b.length===0&&b.push(""),k([...b]),h!==void 0&&h({value:b.join(x),name:a})},T=!!(s&&(e===""||e===void 0)),M=L=>{};if(!(c&&l)&&!d||!(c&&l)&&T)return"";const y={};y.field="group",v&&(y.className=v);const C=(L,D)=>{G.Blur(L),b[D]=L.target.textContent,h&&h({value:b.join(x),name:a})};let E=(L,D)=>{b[D]=L.target.textContent,t&&t({value:b.join(x),name:a})},O=L=>{L.key==="Enter"&&L.preventDefault()};const I=({data:L})=>f!==0&&L.length>=f?"":n.jsx("i",{onClick:w,children:n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",children:[n.jsx("path",{d:"M12 5.25v13.5"}),n.jsx("path",{d:"M18.75 12H5.25"})]})});return n.jsxs("dl",{...y,children:[n.jsxs("dt",{children:[i,n.jsx(I,{data:b})]}),n.jsx("dd",{children:b.map((L,D)=>n.jsxs("li",{className:"field_group_item",children:[n.jsx("span",{onInput:j=>E(j,D),edit:"true",name:a,placeholder:r,onPaste:M,contentEditable:c&&l?G.ContentEditable:"false",onKeyDown:O,onBlur:j=>C(j,D),suppressContentEditableWarning:!0,children:b[D]}),n.jsx("i",{onClick:()=>{N(D)},children:n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",children:[n.jsx("path",{d:"M17.25 17.25 6.75 6.75"}),n.jsx("path",{d:"m17.25 6.75-10.5 10.5"})]})})]},D))}),o&&n.jsx("em",{children:o})]})}const os=e=>(e=e!==void 0&&e!==""?e.split(","):[],e.reduce((t,a)=>(t[a]=!0,t),{}));function Jn({value:e,onValue:t,name:a,placeholder:r="",title:i,error:o,hide:s=!1,edit:c=!0,show:l=!0,active:_=!0,outFormat:d="",after:g="",view:f,modal:h,module:v,options:x,className:b}){const[k,w]=m.useState(os(e)),N=y=>{if(!(c&&_)||!h)return;let C=h.split(".");p.Modal.Open(C[0],C[1],{callback:E=>{if(t)switch(d){case"array":t({value:Object.keys(E),name:a});break;case"string":t({value:Object.keys(E).join(","),name:a});break;default:t({value:E,name:a})}w(E)},onValue:t,options:x,name:a,value:k})},T={};T.field="group",b&&(T.className=b);const M={};return r&&(M.placeholder=r),s?n.jsx(n.Fragment,{}):n.jsxs("dl",{...T,children:[n.jsxs("dt",{children:[i,n.jsx("i",{onClick:N,children:n.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:n.jsx("path",{d:"M12 5.25v13.5M18.75 12H5.25"})})})]}),n.jsx("dd",{...M,onClick:N,edit:(c&&_)+"","data-after":g,children:Object.keys(k).map(y=>{var C;return n.jsx("div",{className:"field_group_item",children:(C=x[y])==null?void 0:C.label},y)})}),o&&n.jsx("em",{children:o})]})}function Xn({value:e,onValue:t,name:a,placeholder:r="",title:i="",link:o="",error:s="",hide:c=!1,edit:l=!0,active:_=!0,after:d="",show:g=!0,type:f,view:h,onSave:v,className:x=""}){const b=m.useId();let k=!!(c&&(e===""||e===void 0)),[w,N]=m.useState(o);if(!(l&&_)&&!g||!(l&&_)&&k)return"";const T=async y=>{if(f){let C=ls(y,f,e||"default");t==null||t({name:a,value:C}),N(URL.createObjectURL(C))}else t==null||t({name:a,value:y}),N(URL.createObjectURL(y))},M={};return M.field="file",x&&(M.className=x),n.jsxs("dl",{...M,children:[i&&n.jsxs("dt",{children:[i," "]}),n.jsxs(ss,{onFiles:T,children:[n.jsx("input",{id:b,type:"file",multiple:!0,onChange:y=>{y.target.files[0]&&T(y.target.files[0])}}),n.jsx("label",{htmlFor:b}),n.jsx("img",{src:w})]}),s&&n.jsx("em",{children:s})]})}const ss=({children:e,onFiles:t})=>{const a=m.useRef(null);return m.useEffect(()=>{if(a.preventDefaults)return;a.preventDefaults=i=>{i.preventDefault(),i.stopPropagation()},a.highlight=i=>{},a.unhighlight=i=>{},a.onHandleDrop=i=>{let c=i.dataTransfer.files[0];t&&t(c)};let r=a.current;["dragenter","dragover","dragleave","drop"].forEach(i=>{r.addEventListener(i,a.preventDefaults,!1),document.body.addEventListener(i,a.preventDefaults,!1)}),["dragenter","dragover"].forEach(i=>{r.addEventListener(i,a.highlight,!1)}),["dragleave","drop"].forEach(i=>{r.addEventListener(i,a.unhighlight,!1)}),r.addEventListener("drop",a.onHandleDrop,!1)},[]),n.jsx("dd",{ref:a,children:e})},ls=(e,t,a)=>{var r=document.getElementsByTagName("body")[0],i=document.createElement("canvas");r.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=ds(c,a);return i.remove(),l}),s.src=URL.createObjectURL(e)};function ds(e,t){let a=e.split(","),r=a[0].match(/:(.*?);/)[1],i=atob(a[1]),o=i.length,s=new Uint8Array(o);for(;o--;)s[o]=i.charCodeAt(o);return new File([s],t,{type:r})}function Vn({name:e,value:t,title:a,style:r,className:i}){let o={field:"progress"};return r&&(o.style=r),i&&(o.className=i),n.jsxs("dl",{...o,children:[a&&n.jsx("dt",{children:a}),n.jsx("dd",{})]})}const _e={};function cs(e){const[t,a]=m.useState({}),r=m.useRef(e);return _e.u=i=>{r.current={...r.current,[i.name]:i.value}},_e.n=i=>{r.current=i,a(Date.now())},_e.r=()=>{a(Date.now())},[r.current,_e.n]}function _s(e){_e.u(e),e.reload&&_e.r()}function us(){_e.r&&_e.r()}function fs(e){const[t,a]=m.useState({}),r=m.useRef(e);return _e.u=i=>{r.current={...r.current,[i.name]:i.value}},_e.n=i=>{Object.keys(i).length>0?Object.keys(i).forEach(o=>{r.current[o]=i[o]}):r.current={},a(Date.now())},_e.r=()=>{a(Date.now())},[r.current,_e.n]}const ms={Color:zn,Date:wt,Mask:Xn,Image:Xn,Code:On,Check:Yn,Switch:$n,Input:ze,Button:Ln,Message:An,Generator:Fn,Captcha:Pn,Modal:kt,Money:jt,Month:Rn,Notes:Zn,Number:Ct,Password:Un,Phone:Et,Search:Wn,Select:It,Set:Nt,Textarea:Gn,Time:Kn,Users:Dt,String:ze,Form:Nt,runReload:us,useData:cs,setValue:_s,Palette:is,Toogle:Hn,Group:qn,Options:Jn,useError:fs,Progress:Vn};function ps({value:e="",onValue:t,onSave:a,name:r,format:i="+_(___) ___-__-__",placeholder:o="",title:s="",error:c="",hide:l=!1,edit:_=!0,active:d=!0,after:g="",show:f=!0,view:h,className:v=""}){_=_!==void 0?_:!0,d=d!==void 0?d:!0,l=!!(l&&(e===""||e===void 0))&&!(_&&d),m.useRef(null);let b=i,k=!0,w=0,N=(j,$)=>{let U=document.createRange(),Q=window.getSelection();U.setStart($.childNodes[0],j),U.collapse(!0),Q.removeAllRanges(),Q.addRange(U),$.focus()},T=j=>{j.preventDefault(),navigator.clipboard.readText().then($=>{window.document.execCommand("insertText",!1,$)}).catch($=>{})},M=j=>{let $=0,U="",Q=j.replace(/\D/g,"");Q===""&&(k=!0);let le=Q.split(""),ve="";le.forEach(Ve=>{k&&(ve+=Ve,k&&(w=(""+ve).length,b=i.replace(new RegExp("[0-9]","g"),"_"),U=""),w>(""+ve).length&&(k=!0,b=i.replace(new RegExp("[0-9]","g"),"_"),U=""))});let Ne=b.replace(/\D/g,"");return Ne.length>=Q.length&&(Q=Ne),{q:b.replace(/[_\d]/g,function(){return Q.charAt($++)||"_"}),i:$,v:Q,f:U}},y=j=>{j.preventDefault(),navigator.clipboard.writeText(j.target.textContent.replace(/\D/g,"")).then(function(){p.Notice.Copy("Данные в буфер обмене")},function($){})},C=M(e),E=j=>{let $=M(j.target.textContent);j.target.textContent=$.q,$.i=$.q.lastIndexOf($.v.substr(-1)),$.i<$.q.length&&$.q!==b?$.i++:$.i=$.q.indexOf("_"),N($.i,j.target),t&&t({value:$.q.replace(/\D/g,""),name:r})},O=j=>{j.key==="Enter"&&j.preventDefault()};const I=j=>{G.Blur(j),a&&a({value:j.target.textContent.replace(/\D/g,""),name:r})},L={};L.field="input",v&&(L.className=v);let D={};return _&&d?(D.edit="true",D.contentEditable=G.ContentEditable):D.contentEditable="false",o&&(D.placeholder=o),g&&(D.after=g),l?n.jsx(n.Fragment,{}):n.jsxs("dl",{...L,children:[s&&n.jsx("dt",{children:s}),n.jsx("dd",{...D,onPaste:T,onInput:E,onKeyDown:O,onContextMenu:y,onBlur:I,suppressContentEditableWarning:!0,children:C.q}),c&&n.jsx("em",{children:c})]})}const gs={Color:zn,Date:wt,Code:On,Check:Yn,Switch:$n,Input:ze,Button:Ln,Message:An,Generator:Fn,Captcha:Pn,Modal:kt,Money:jt,Mask:ps,Month:Rn,Notes:Zn,Number:Ct,Password:Un,Phone:Et,Search:Wn,Select:It,Set:Nt,Textarea:Gn,Time:Kn,Users:Dt,String:ze,Toogle:Hn,Group:qn,Options:Jn,Progress:Vn},Qn={spinner:"_spinner_o487n_1",l:"_l_o487n_75",loadingB:"_loadingB_o487n_1"};function hs(){return n.jsx("div",{className:Qn.spinner,children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 483 484",children:n.jsx("path",{d:"M264,492a22.2,22.2,0,0,0,22-22V411a22.2,22.2,0,0,0-22-22H236a22.2,22.2,0,0,0-22,22v59a22.2,22.2,0,0,0,22,22Zm74-134a23.9,23.9,0,0,0-6,16,20.35,20.35,0,0,0,6,15l42,42q7,7,16,7,10,0,16-7l20-20a20.35,20.35,0,0,0,6-15,23.9,23.9,0,0,0-6-16l-42-42q-7-7-16-7-8,0-15,7ZM163,389a18.94,18.94,0,0,0,7-15q0-9-7-16l-20-20q-7-7-16-7-8,0-15,7L70,380q-7,7-7,16a18.94,18.94,0,0,0,7,15l20,20q7,7,16,7a18.94,18.94,0,0,0,15-7ZM112,237a22.2,22.2,0,0,0-22-22H31a21.17,21.17,0,0,0-15.5,6.5A21.17,21.17,0,0,0,9,237v28a21.17,21.17,0,0,0,6.5,15.5A21.17,21.17,0,0,0,31,287H90a22.2,22.2,0,0,0,22-22Zm358,50a22.2,22.2,0,0,0,22-22V237a22.2,22.2,0,0,0-22-22H411a22.2,22.2,0,0,0-22,22v28a22.2,22.2,0,0,0,22,22ZM163,142q7-7,7-15.5T163,111L121,69q-7-7-15-7-7,0-16,7L70,89q-7,7-7,16a18.94,18.94,0,0,0,7,15l42,42a18.94,18.94,0,0,0,15,7q10,0,16-7Zm269-22a20.35,20.35,0,0,0,6-15,23.9,23.9,0,0,0-6-16L412,69q-7-7-16-7-7,0-16,7l-42,42q-7,8-7,16t7,15l21,20a18.94,18.94,0,0,0,15,7q10,0,16-7Zm-168-9a22.06,22.06,0,0,0,15.5-6q6.5-6,6.5-16V30a21.17,21.17,0,0,0-6.5-15.5A21.17,21.17,0,0,0,264,8H236a21.17,21.17,0,0,0-15.5,6.5A21.17,21.17,0,0,0,214,30V89q0,10,6.5,16a22.06,22.06,0,0,0,15.5,6Z",transform:"translate(-9 -8)"})})})}function xs(){return n.jsxs("div",{className:Qn.l,children:[n.jsx("i",{}),n.jsx("i",{}),n.jsx("i",{})]})}const bs={Spinner:hs,Inline:xs},ea={ph:"_ph_1wjxu_1",e:"_e_1wjxu_5"},vs=({title:e,affter:t,onDynamicURL:a,children:r,button:i,page:o,tabs:s=[],className:c="",modules:l,loading:_})=>{const[d]=p.Router.useTabs(s.map(h=>h.id).includes(p.Router.getTabs())?p.Router.getTabs():o),[g,f]=m.useState(!1);return m.useEffect(()=>{f(!0)},[]),n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:[ea.ph,c].join(" "),children:[n.jsx(ks,{title:e,affter:t}),n.jsx("div",{className:ea.e}),n.jsx(ws,{button:i})]}),s.length>0&&n.jsx(jn,{list:s,active:d}),r,g&&n.jsx(ys,{onDynamicURL:a,loading:_,m:l,t:d})]})};let ys=({m:e,t,loading:a,onDynamicURL:r})=>{const i=m.lazy(()=>We(e+"/pages/"+t+".tsx"));return r&&r((e+"/"+t).toLowerCase()),n.jsx(m.Suspense,{fallback:a,children:n.jsx(i,{})})},ws=({button:e})=>{const[t,a]=m.useState(e);return xt("button",a),n.jsxs(n.Fragment,{children:[" ",t]})},ks=({title:e,affter:t})=>{const[a,r]=m.useState(n.jsxs(n.Fragment,{children:[e," ",t]}));return xt("title",r),n.jsx("h2",{children:a})};const js={Lite:vs},ta={s:"_s_t9swc_1"};let Tt;function Cs({className:e,placeholder:t}){let a=s=>{Tt(s.target.textContent)},r=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?[ta.s,e].join(" "):ta.s,n.jsx("div",{onPaste:i,onInput:a,onKeyDown:r,contentEditable:"plaintext-only",...o,suppressContentEditableWarning:!0})}function Ss(e,t,a){let r=[],i=1,o=0,s={},c=50;return s[i]=[],e.forEach(l=>{l.text.toLowerCase().indexOf(t)>-1&&r.push(l.id)}),r.forEach(l=>{o++,o<=c||(i++,o=1,s[i]=[]),s[i].push(a[l])}),s}function Es(e){Tt=e}function Is(e){Tt=e}const Ds={Field:Cs,Run:Ss,Get:Es,useValue:Is};function Ns(){return n.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[n.jsx("path",{d:"M5.15837 11.491C5.08489 12.887 5.16936 14.373 3.92213 15.3084C3.34164 15.7438 3 16.427 3 17.1527C3 18.1508 3.7818 19 4.8 19H19.2C20.2182 19 21 18.1508 21 17.1527C21 16.427 20.6584 15.7438 20.0779 15.3084C18.8306 14.373 18.9151 12.887 18.8416 11.491C18.6501 7.85223 15.6438 5 12 5C8.35617 5 5.34988 7.85222 5.15837 11.491Z",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"}),n.jsx("path",{d:"M10.5 3.125C10.5 3.95343 11.1716 5 12 5C12.8284 5 13.5 3.95343 13.5 3.125C13.5 2.29657 12.8284 2 12 2C11.1716 2 10.5 2.29657 10.5 3.125Z",stroke:"currentColor",strokeWidth:"1",fill:"none"}),n.jsx("path",{d:"M15 19C15 20.6569 13.6569 22 12 22C10.3431 22 9 20.6569 9 19",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})}function Ts(){return n.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[n.jsx("path",{d:"M4.4094 11.4516C4.62188 7.41446 7.95728 4.25 12 4.25C16.0427 4.25 19.3781 7.41446 19.5906 11.4516C19.5997 11.6241 19.6064 11.7893 19.6129 11.9485C19.6351 12.49 19.6544 12.9615 19.7525 13.4133C19.8698 13.9531 20.0867 14.3775 20.5279 14.7084C21.2972 15.2854 21.75 16.191 21.75 17.1527C21.75 18.534 20.6628 19.75 19.2 19.75H4.8C3.33719 19.75 2.25 18.534 2.25 17.1527C2.25 16.191 2.70278 15.2854 3.47213 14.7084C3.91329 14.3775 4.13025 13.9531 4.24749 13.4133C4.34561 12.9615 4.3649 12.49 4.38705 11.9485V11.9485L4.38705 11.9485C4.39356 11.7893 4.40032 11.6241 4.4094 11.4516Z",fill:"#141B34"}),n.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.5286 1.37434C10.9737 1.08296 11.517 1 12 1C12.483 1 13.0263 1.08296 13.4714 1.37434C13.9652 1.69759 14.25 2.22083 14.25 2.875C14.25 3.47116 14.017 4.09375 13.6626 4.57057C13.3138 5.03989 12.7415 5.5 12 5.5C11.2585 5.5 10.6862 5.03989 10.3374 4.57057C9.98299 4.09375 9.75 3.47116 9.75 2.875C9.75 2.22083 10.0348 1.69759 10.5286 1.37434Z",fill:"#141B34"}),n.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 18C9.55228 18 10 18.4477 10 19C10 20.1046 10.8954 21 12 21C13.1046 21 14 20.1046 14 19C14 18.4477 14.4477 18 15 18C15.5523 18 16 18.4477 16 19C16 21.2091 14.2091 23 12 23C9.79086 23 8 21.2091 8 19C8 18.4477 8.44772 18 9 18Z",fill:"#141B34"})]})}function Ms(){return n.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:n.jsx("path",{d:"M8.85746 12.5061C6.36901 10.6456 4.59564 8.59915 3.62734 7.44867C3.3276 7.09253 3.22938 6.8319 3.17033 6.3728C2.96811 4.8008 2.86701 4.0148 3.32795 3.5074C3.7889 3 4.60404 3 6.23433 3H17.7657C19.396 3 20.2111 3 20.672 3.5074C21.133 4.0148 21.0319 4.8008 20.8297 6.37281C20.7706 6.83191 20.6724 7.09254 20.3726 7.44867C19.403 8.60062 17.6261 10.6507 15.1326 12.5135C14.907 12.6821 14.7583 12.9567 14.7307 13.2614C14.4837 15.992 14.2559 17.4876 14.1141 18.2442C13.8853 19.4657 12.1532 20.2006 11.226 20.8563C10.6741 21.2466 10.0043 20.782 9.93278 20.1778C9.79643 19.0261 9.53961 16.6864 9.25927 13.2614C9.23409 12.9539 9.08486 12.6761 8.85746 12.5061Z",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})})}const Bs={f:"_f_q3r0i_1"};let ue={};function $s(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 a={};return Object.keys(t.data).forEach(i=>{i!=="sort"&&(a[i]=t.data[i],e.take[i]="999")}),{...e,data:a,take:e.take};case"size":return{...e,size:t.size};case"take":let r={[t.list]:t.take};r={...e.take,...r},e.active=!1;for(let i in r)r[i]!=="999"&&(e.active=!0);return ue.get(r,e.active),{...e,take:r,active:e.active};case"exit":for(let i in e.take)e.take[i]="999";return ue.get&&ue.get([],!1),{...e,size:0,active:!1,take:e.take,open:!1};default:throw new Error}}function Ls(){const[e,t]=m.useReducer($s,{open:!1,view:null,data:{},take:{},size:0,active:!1});return ue.set=a=>{t({type:"data",data:a})},ue.count=a=>{t({type:"size",size:a})},ue.reset=()=>{t({type:"exit"})},n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:Bs.f,onClick:()=>{t({type:"open",open:!0})},children:[n.jsx(Ms,{}),e.active&&n.jsxs("i",{children:[e.size,"1"]})]}),e.open?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"filter o",onClick:()=>{t({type:"open",open:!1})}}),n.jsxs("div",{className:"filter m",children:[n.jsx("div",{className:"filter l",children:Object.keys(e.data).map(a=>n.jsx(zs,{data:a,dispatch:t,state:e},a))}),n.jsx("div",{className:"filter b",onClick:()=>{t({type:"exit"})},children:"Убрать фильтер"})]})]}):n.jsx(n.Fragment,{})]})}function As(e){ue.get=e}function Fs(e){ue.set!==void 0&&ue.set(e)}function Ps(e){ue.reset!==void 0&&ue.reset(e)}function Os(e,t,a,r){let i=[],o=1,s=0,c={},l=50;return c[o]=[],r===!0&&(Object.keys(t).forEach(_=>{Number.parseInt(t[_])!==999&&(e=e.filter(d=>Number.parseInt(d[_])===Number.parseInt(t[_])))}),na(e.length)),e.forEach(_=>{i.push(_.id)}),i.forEach(_=>{s++,s<=l||(o++,s=1,c[o]=[]),c[o].push(a[_])}),c}function na(e){ue.count(e)}function zs({data:e,state:t,dispatch:a}){let r=()=>{a({type:"view",view:e})},i=()=>{a({type:"take",list:e,take:"999"})};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"filter s",children:[n.jsxs("div",{onClick:r,children:[" ",t.data[e].name," "]}),t.take[e]!=="999"?n.jsx("div",{onClick:i,className:"filter x","data-icon":"F038"}):""]}),n.jsx("div",{className:"filter u","set-active":(t.view===e)+"",children:Object.keys(t.data[e].list).map((o,s)=>n.jsx(Rs,{data:t.data[e].list[o],head:e,type:o,dispatch:a,state:t},s))})]})}function Rs({data:e,head:t,state:a,dispatch:r,type:i}){if(i!=="999"&&e.count===void 0)return"";const o=()=>{r({type:"take",list:t,take:i})};return n.jsxs("div",{className:"filter a",onClick:o,"set-active":(a.take[t]===i)+"",children:[e.name,n.jsx("div",{className:"filter e",children:e.count})]})}const Zs={Button:Ls,useValue:As,Set:Fs,Run:Os,Count:na,Reset:Ps},Us={n:"_n_euuvm_1"};let Xe={},Mt=[];const Ws=(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 a=e.news.filter(i=>i.id!==t.id);return{...e,news:a,active:a.length!==0};case"size":return{...e,size:t.size};case"take":let r={[t.list]:t.take};r={...e.take,...r},e.active=!1;for(let i in r)r[i]!=="999"&&(e.active=!0);return Xe.get(r,e.active),{...e,take:r,active:e.active};case"exit":return e;default:throw new Error}};function Gs(e){Xe.fn({action:"add",data:e})}function Ks(e){Xe.fn({action:"add",data:e})}function Ys(e){Xe.fn=e}function Hs(){const[e,t]=m.useReducer(Ws,{open:!1,active:!1,news:[],take:{}});Ys(async r=>{switch(r.action){case"add":Mt.push(r.data);break}}),m.useEffect(()=>{setInterval(()=>{Mt.forEach((r,i)=>{t({type:"add",data:{module:r.module,type:r.type,id:r.id,datetime:r.datetime,txt:r.title}}),r.datetime<new Date().getTime()&&Mt.splice(i,1)})},6e4)},[]);let a=async r=>{t({type:"hide",id:r.id})};return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:Us.n,onClick:()=>{t({type:"open",open:!0})},children:e.active?n.jsx(Ts,{}):n.jsx(Ns,{})}),e.open?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"notify-o",onClick:()=>{t({type:"open",open:!1})}}),n.jsxs("div",{className:"notify-m",children:[n.jsx("div",{className:"notify-l",children:e.news.map((r,i)=>n.jsx(qs,{data:r,dispatch:t},i))}),n.jsx("div",{className:"notify-b",onClick:a,children:"История"})]})]}):""]})}const qs=({data:e,dispatch:t})=>{let a=async r=>{t({type:"hide",id:r.id})};return n.jsxs("div",{className:"notify-i",children:[n.jsx("div",{className:"--icon","data-icon":e.type}),n.jsxs("div",{className:"--body",children:[n.jsx("div",{className:"--name",children:e.type}),n.jsx("div",{className:"--text",children:e.txt})]}),n.jsx("div",{className:"--hide","data-icon":"F038",onClick:()=>a(e),children:" "})]})},Js={Bell:Hs,Send:Ks,Add:Gs},aa={p:"_p_djnh1_1",l:"_l_djnh1_38"};function Xs(e){let t=3,a=e.page,r=e.count,i=[],o=()=>{i.push({page:1}),i.push({text:"..."})},s=()=>{i.push({text:"..."}),i.push({page:r})},c=(l,_)=>{for(let d=l;d<_;d++)i.push({page:d})};return r<t*2+6?c(1,r+1):a<t*2+1?(c(1,t*2+4),s()):a>r-t*2?(t=r>1e4?1:t,o(),c(r-t*2-2,r+1)):(t=r>1e4?1:t,o(),c(a-t,a+t+1),s()),i.length===1?n.jsx(n.Fragment,{}):n.jsxs("div",{className:aa.p,children:[n.jsx("i",{onClick:()=>e.onChangePage(a-1),children:n.jsx("svg",{viewBox:"0 0 24 24",children:n.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)}),n.jsx("i",{onClick:()=>e.onChangePage(a+1),children:n.jsx("svg",{viewBox:"0 0 24 24",children:n.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 Vs(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 ra({load:e,list:t,item:a}){const r=m.useRef(null),[i,o]=m.useReducer(Vs,{load:!1,list:[],data:{},page:1,wait:!1,item:a});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]),n.jsxs(n.Fragment,{children:[n.jsx("div",{className:aa.l,ref:r,children:n.jsx(Mn,{"el-empty":"Данные не найдены",children:i.load&&i.list!==void 0?i.list.map(c=>n.jsx(i.item,{data:c},c.id)):n.jsxs("div",{"type-data":"load",children:[n.jsx("i",{}),n.jsx("i",{}),n.jsx("i",{})]})})}),i.load&&i.list!==void 0?n.jsx(Xs,{page:i.page,count:i.size,onChangePage:s}):n.jsx(n.Fragment,{})]})}const Qs={Pagination:ra};function el({head:e,load:t,list:a,item:r}){const i=e;return n.jsxs(n.Fragment,{children:[n.jsx(i,{}),Ke.getSetting("s05")===1?n.jsx(ra,{list:a,load:t,item:r}):n.jsx(Bn,{list:a,load:t,item:r})]})}function tl(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 Bt={};function nl(e){Bt.get=e}function al(e){Bt.get&&Bt.get(e)}const rl={View:el,Reducer:tl,useValue:nl,Lite:Nn,setValue:al},il={addDictionary:Gi,getDictionary:Hi,setDictionary:Yi,current:qi};async function ol(){let e=await un(),t={};return Object.keys(e).forEach(a=>{t[e[a].id]={},t[e[a].id].name=e[a].a}),t}const sl={Get:ol},ll=function({title:e,children:t,imp:a,button:r,page:i,tabs:o,modules:s}){const[c]=p.Router.useTabs(i),[l,_]=m.useState(!1);return m.useEffect(()=>{_(!0)},[]),n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"list-info",children:[n.jsx("h2",{children:e}),n.jsx("div",{className:"empty"}),n.jsx(cl,{button:r})]}),l&&n.jsx(dl,{imp:a,modules:s,t:c}),t]})};let dl=({modules:e,t})=>{const a=m.lazy(()=>We(e+"/pages/"+t+".tsx"));return n.jsx(m.Suspense,{fallback:"",children:n.jsx(a,{})})},cl=({button:e})=>{const[t,a]=m.useState(e);return ce.useListener("button",a),n.jsxs(n.Fragment,{children:[" ",t]})};const _l={Open:zi};function ul({active:e,onActive:t,id:a,name:r}){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:r,id:a,setActive:o})};return n.jsx("div",{role:"switch",onClick:s,"aria-checked":`${i?"true":"false"}`})}p.Action=Cn,p.Animation=ji,p.Badge=Wo,p.Bookmarks=wo,p.Browser=io,p.Button=wn,p.Chart=yo,p.Company=sl,p.Component=_t,p.DataBase=Yo,p.Event=ce,p.Events=ce,p.Files=Vo,p.Filter=Zs,p.Form=ms,p.Format=K,p.HotKey=qo,p.Icon=Do,p.Init=yn,p.Input=gs,p.Lang=il,p.Layout=js,p.List=rl,p.Lite=Bo,p.Loading=bs,p.Notifications=Js,p.Pagination=Qs,p.Phone=_l,p.Root=Dn,p.Scrolling=Bn,p.Search=Ds,p.Setting=bo,p.Sistym=Ho,p.Store=be,p.Switch=ul,p.Tabs=_o,p.Test=ll,p.Triage=Ro,p.User=Ke,p.WebRTC=H,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elcrm",
3
- "version": "0.9.161",
3
+ "version": "0.9.162",
4
4
  "description": "React framework for creating modules for elCRM",
5
5
  "type": "module",
6
6
  "author": "MaSkal <dev@elcrm.online>",