1(function(){var isRtl = typeof document !== "undefined" && document.cookie && (document.cookie.indexOf("lang=ar") !== -1 || document.cookie.indexOf("lang=he") !== -1);var rtlPostfix = isRtl ? ".rtl" : "";var cssPackage = "css!SabyPageLayoutPackages/common/styles" + rtlPostfix;define("css!Tailwind/tailwind", [cssPackage], "");define("css!Controls/LoadingIndicator", [cssPackage], "");define("css!Controls/popup", [cssPackage], "");define("css!Controls/CommonClasses", [cssPackage], "");define("css!Controls/icon", [cssPackage], "");define("css!Controls/buttons", [cssPackage], "");define("css!Controls/themes", [cssPackage], "");define("css!Controls/dragnDrop", [cssPackage], "");define("css!Controls/Application/oldCss", [cssPackage], "");define("css!Controls/application", [cssPackage], "");define("css!Page/base", [cssPackage], "");define("css!ViewSettings/controller", [cssPackage], "");})(); 2define("react-dom/client", ["exports", "scheduler", "react", "react-dom"], function(e,n,t,o){"use strict";const l=!1,r=!1;function i(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}const a=10,u=11,s=12,c=13,f=14,d=15,p=18,h=19,m=22,g=23,y=24,b=25,w=26,k=27,v=30,S=31,E=128,x=4096,C=16,z=32,P=64,T=256,N=512,L=1024,R=2048,_=8192,M=16384,O=M,A=_,D=L,F=32768,I=65536,U=131072,H=262144,j=524288,V=1048576,B=4194304,Q=16777216,W=18874368,q=33554432,$=1028,Y=13878,K=8772,X=10256,G=65011712;function Z(e){let n=e,t=e;if(e.alternate)for(;n.return;)n=n.return;else{let e=n;do{n=e,4098&n.flags&&(t=n.return),e=n.return}while(e)}return 3===n.tag?t:null}function J(e){if(e.tag===c){let n=e.memoizedState;if(null===n){const t=e.alternate;null!==t&&(n=t.memoizedState)}if(null!==n)return n.dehydrated}return null}function ee(e){if(e.tag===S){let n=e.memoizedState;if(null===n){const t=e.alternate;null!==t&&(n=t.memoizedState)}if(null!==n)return n.dehydrated}return null}function ne(e){return 3===e.tag?e.stateNode.containerInfo:null}function te(e){if(Z(e)!==e)throw new Error("Unable to find node on an unmounted component.")}function oe(e){const n=function(e){const n=e.alternate;if(!n){const n=Z(e);if(null===n)throw new Error("Unable to find node on an unmounted component.");return n!==e?null:e}let t=e,o=n;for(;;){const l=t.return;if(null===l)break;const r=l.alternate;if(null===r){const e=l.return;if(null!==e){t=o=e;continue}break}if(l.child===r.child){let r=l.child;for(;r;){if(r===t)return te(l),e;if(r===o)return te(l),n;r=r.sibling}throw new Error("Unable to find node on an unmounted component.")}if(t.return!==o.return)t=l,o=r;else{let e=!1,n=l.child;for(;n;){if(n===t){e=!0,t=l,o=r;break}if(n===o){e=!0,o=l,t=r;break}n=n.sibling}if(!e){for(n=r.child;n;){if(n===t){e=!0,t=r,o=l;break}if(n===o){e=!0,o=r,t=l;break}n=n.sibling}if(!e)throw new Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(t.alternate!==o)throw new Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(3!==t.tag)throw new Error("Unable to find node on an unmounted component.");return t.stateNode.current===t?e:n}(e);return null!==n?le(n):null}function le(e){const n=e.tag;if(5===n||n===w||n===k||6===n)return e;let t=e.child;for(;null!==t;){const e=le(t);if(null!==e)return e;t=t.sibling}return null}const re=Object.assign;function ie(e){return e._reactInternals}const ae=Symbol.for("react.element"),ue=Symbol.for("react.transitional.element"),se=Symbol.for("react.portal"),ce=Symbol.for("react.fragment"),fe=Symbol.for("react.strict_mode"),de=Symbol.for("react.profiler"),pe=Symbol.for("react.consumer"),he=Symbol.for("react.context"),me=Symbol.for("react.forward_ref"),ge=Symbol.for("react.suspense"),ye=Symbol.for("react.suspense_list"),be=Symbol.for("react.memo"),we=Symbol.for("react.lazy"),ke=(Symbol.for("react.scope"),Symbol.for("react.activity")),ve=(Symbol.for("react.legacy_hidden"),Symbol.for("react.tracing_marker"),Symbol.for("react.memo_cache_sentinel")),Se=(Symbol.for("react.view_transition"),Symbol.iterator);function Ee(e){if(null===e||"object"!=typeof e)return null;const n=Se&&e[Se]||e["@@iterator"];return"function"==typeof n?n:null}function xe(e){return e.displayName||"Context"}const Ce=Symbol.for("react.client.reference");function ze(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===Ce?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case ce:return"Fragment";case de:return"Profiler";case fe:return"StrictMode";case ge:return"Suspense";case ye:return"SuspenseList";case ke:return"Activity"}if("object"==typeof e)switch(e.$$typeof){case se:return"Portal";case he:return xe(e);case pe:return xe(e._context)+".Consumer";case me:return function(e,n,t){const o=e.displayName;if(o)return o;const l=n.displayName||n.name||"";return""!==l?t+"("+l+")":t}(e,e.render,"ForwardRef");case be:const n=e.displayName||null;return null!==n?n:ze(e.type)||"Memo";case we:{const n=e,t=n._payload,o=n._init;try{return ze(o(t))}catch(e){return null}}}return null}const Pe=Array.isArray;function Te(e){return Pe(e)}const Ne=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Le=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Re={pending:!1,data:null,method:null,action:null},_e=[];let Me=-1;function Oe(e){return{current:e}}function Ae(e,n){Me<0||(e.current=_e[Me],_e[Me]=null,Me--)}function De(e,n,t){Me++,_e[Me]=e.current,e.current=n}const Fe=Oe(null),Ie=Oe(null),Ue=Oe(null),He=Oe(null);function je(){return Ue.current}function Ve(e,n){De(Ue,n),De(Ie,e),De(Fe,null);const t=function(e){let n,t;
2const o=e.nodeType;switch(o){case 9:case 11:{n=9===o?"#document":"#fragment";const l=e.documentElement;if(l){const e=l.namespaceURI;t=e?Dy(e):Ly}else t=Ly;break}default:{const o=e;n=o.tagName;const l=o.namespaceURI;if(l){t=Fy(Dy(l),n)}else switch(n){case"svg":t=Ry;break;case"math":t=_y;break;default:t=Ly}break}}return t}(n);Ae(Fe),De(Fe,t)}function Be(e){Ae(Fe),Ae(Ie),Ae(Ue)}function Qe(){return Fe.current}function We(e){null!==e.memoizedState&&De(He,e);const n=Fe.current,t=(o=n,l=e.type,Fy(o,l));var o,l;n!==t&&(De(Ie,e),De(Fe,t))}function qe(e){Ie.current===e&&(Ae(Fe),Ae(Ie)),He.current===e&&(Ae(He),ew._currentValue=Jb)}var $e=void 0;let Ye,Ke;function Xe(e){if(void 0===Ye)try{throw Error()}catch(e){const n=e.stack.trim().match(/\n( *(at )?)/);Ye=n&&n[1]||"",Ke=e.stack.indexOf("\n at")>-1?" (<anonymous>)":e.stack.indexOf("@")>-1?"@unknown:0:0":""}return"\n"+Ye+e+Ke}let Ge=!1;function Ze(e,n){if(!e||Ge)return"";Ge=!0;const t=Error.prepareStackTrace;Error.prepareStackTrace=$e;try{const t={DetermineComponentFrameRoot(){let t;try{if(n){const n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){t=e}Reflect.construct(e,[],n)}
2else{try{n.call()}catch(e){t=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){t=e}const n=e();n&&"function"==typeof n.catch&&n.catch((()=>{}))}}catch(e){if(e&&t&&"string"==typeof e.stack)return[e.stack,t.stack]}return[null,null]}};t.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";const o=Object.getOwnPropertyDescriptor(t.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(t.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});const l=t.DetermineComponentFrameRoot(),r=l[0],i=l[1];if(r&&i){const n=r.split("\n"),t=i.split("\n");let o=0,l=0;for(;o<n.length&&!n[o].includes("DetermineComponentFrameRoot");)o++;for(;l<t.length&&!t[l].includes("DetermineComponentFrameRoot");)l++;if(o===n.length||l===t.length)for(o=n.length-1,l=t.length-1;o>=1&&l>=0&&n[o]!==t[l];)l--;for(;o>=1&&l>=0;o--,l--)if(n[o]!==t[l]){if(1!==o||1!==l)do{if(o--,l--,l<0||n[o]!==t[l]){let t="\n"+n[o].replace(" at new "," at ");return e.displayName&&t.includes("<anonymous>")&&(t=t.replace("<anonymous>",e.displayName)),t}}while(o>=1&&l>=0);break}}}finally{Ge=!1,Error.prepareStackTrace=t}const o=e?e.displayName||e.name:"";return o?Xe(o):""}function Je(e){return Ze(e,!1)}function en(e,n){switch(e.tag){case w:case k:case 5:return Xe(e.type);case 16:return Xe("Lazy");case c:return e.child!==n&&null!==n?Xe("Suspense Fallback"):Xe("Suspense");case h:return Xe("SuspenseList");case 0:case d:return Je(e.type);case u:return Je(e.type.render);case 1:return Ze(e.type,!0);case S:return Xe("Activity");default:return""}}function nn(e){try{let n="",t=e,o=null;do{n+=en(t,o),o=t,t=t.return}while(t);return n}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}const tn=Object.prototype.hasOwnProperty,on=n.unstable_scheduleCallback,ln=n.unstable_cancelCallback,rn=n.unstable_shouldYield,an=n.unstable_requestPaint,un=n.unstable_now,sn=n.unstable_getCurrentPriorityLevel,cn=n.unstable_ImmediatePriority,fn=n.unstable_UserBlockingPriority,dn=n.unstable_NormalPriority,pn=n.unstable_LowPriority,hn=n.unstable_IdlePriority,mn=n.log,gn=n.unstable_setDisableYieldValue;let yn=null,bn=null;function wn(e){if("function"==typeof mn&&gn(e),bn&&"function"==typeof bn.setStrictMode)try{bn.setStrictMode(yn,e)}catch(e){}}const kn=Math.clz32?Math.clz32:function(e){const n=e>>>0;if(0===n)return 32;return 31-(vn(n)/Sn|0)|0},vn=Math.log,Sn=Math.LN2;const En=16,xn=32,Cn=128,zn=4194048,Pn=256,Tn=512,Nn=1024,Ln=2048,Rn=4096,_n=8192,Mn=16384,On=32768,An=65536,Dn=131072,Fn=262144,In=524288,Un=1048576,Hn=2097152,jn=261888,Vn=3932160,Bn=62914560,Qn=4194304,Wn=8388608,qn=16777216,$n=33554432,Yn=Qn,Kn=67108864,Xn=134217727,Gn=134217728,Zn=268435456,Jn=536870912,et=1073741824,nt=261930,tt=201326741,ot=-1;let lt=Pn,rt=Fn,it=Qn;function at(e){const n=42&e;if(0!==n)return n;switch(kt(e)){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case En:return En;case xn:return xn;case 64:return 64;case Cn:return Cn;case Pn:case Tn:case Nn:case Ln:case Rn:case _n:case Mn:case On:case An:case Dn:return e&jn;case Fn:case In:case Un:case Hn:return e&Vn;case Qn:case Wn:case qn:case $n:return e&Bn;case Kn:return Kn;case Gn:return Gn;case Zn:return Zn;case Jn:return Jn;case et:return 0;default:return e}}function ut(e,n,t){const o=e.pendingLanes;if(0===o)return 0;let l=0;const r=e.suspendedLanes,i=e.pingedLanes,a=e.warmLanes,u=o&Xn;if(0!==u){const e=u&~r;if(0!==e)l=at(e);else{const e=u&i;if(0!==e)l=at(e);else if(!t){const e=u&~a;
20!==e&&(l=at(e))}}}else{const e=o&~r;if(0!==e)l=at(e);else if(0!==i)l=at(i);else if(!t){const e=o&~a;0!==e&&(l=at(e))}}if(0===l)return 0;if(0!==n&&n!==l&&!(n&r)){const e=kt(l),t=kt(n);if(e>=t||e===xn&&t&zn)return n}return l}function st(e,n){const t=42|n,o=e.pendingLanes;if(0===o)return 0;const l=o&~(e.suspendedLanes&~e.pingedLanes)&(1<<31-kn(t)+1)-1;return l&tt?l&tt|1:l?2|l:0}function ct(e,n){return!(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)}function ft(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+250;case En:case xn:case Cn:case Pn:case Tn:case Nn:case Ln:case Rn:case _n:case Mn:case On:case An:case Dn:case Fn:case In:case Un:case Hn:return n+5e3;default:return ot}}function dt(e,n){if(e.errorRecoveryDisabledLanes&n)return 0;const t=-536870913&e.pendingLanes;return 0!==t?t:t&Jn?Jn:0}function pt(e){return!!(3&e)}function ht(e){return!!(e&Xn)}function mt(e){return(e&Bn)===e}function gt(e){return(e&zn)===e}function yt(e){return!!(127&e)}function bt(e){return!!(e&zn)}function wt(){const e=it;return it<<=1,it&Bn||(it=Qn),e}function kt(e){return e&-e}function vt(e){return kt(e)}function St(e){return 31-kn(e)}function Et(e){return St(e)}function xt(e,n){return!!(e&n)}function Ct(e,n){return(e&n)===n}function zt(e,n){return e|n}function Pt(e,n){return e&~n}function Tt(e,n){return e&n}function Nt(e){const n=[];for(let t=0;t<31;t++)n.push(e);return n}function Lt(e,n,t){e.pendingLanes|=n,e.suspendedLanes&=~n;const o=Et(n);e.entangledLanes|=n,e.entanglements[o]|=et|t&nt}function Rt(e,n){const t=e.entangledLanes|=n,o=e.entanglements;let l=t;for(;l;){const e=St(l),t=1<<e;t&n|o[e]&n&&(o[e]|=n),l&=~t}}function _t(e,n){const t=kt(n),o=42&t?1:Mt(t);return o&(e.suspendedLanes|n)?0:o}function Mt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case xn:e=En;break;case Pn:case Tn:case Nn:case Ln:case Rn:case _n:case Mn:case On:case An:case Dn:case Fn:case In:case Un:case Hn:case Qn:case Wn:case qn:case $n:e=Cn;break;case Zn:e=Gn;break;default:e=0}return e}const Ot=xn,At=Zn;function Dt(e,n){return 0!==e&&e<n}function Ft(e){const n=kt(e);return Dt(2,n)?Dt(8,n)?ht(n)?Ot:At:8:2}function It(e,n){Le.p=e}function Ut(){return Le.p}function Ht(){const e=Le.p;if(0!==e)return e;const n=window.event;return void 0===n?Ot:ww(n.type)}function jt(e,n){const t=Ut();try{return It(e),n()}finally{It(t)}}const Vt=Math.random().toString(36).slice(2),Bt="__reactFiber$"+Vt,Qt="__reactProps$"+Vt,Wt="__reactContainer$"+Vt,qt="__reactEvents$"+Vt,$t="__reactListeners$"+Vt,Yt="__reactHandles$"+Vt,Kt="__reactResources$"+Vt,Xt="__reactMarker$"+Vt;function Gt(e){delete e[Bt],delete e[Qt],delete e[qt],delete e[$t],delete e[Yt]}function Zt(e,n){n[Bt]=e}function Jt(e,n){n[Wt]=e}function eo(e){let n=e[Bt];if(n)return n;let t=e.parentNode;for(;t;){if(n=t[Wt]||t[Bt],n){const t=n.alternate;if(null!==n.child||null!==t&&null!==t.child){let n=sb(e);for(;null!==n;){const e=n[Bt];if(e)return e;n=sb(n)}}return n}t=(e=t).parentNode}return null}function no(e){const n=e[Bt]||e[Wt];if(n){const e=n.tag;return 5===e||6===e||e===c||e===S||e===w||e===k||3===e?n:null}return null}function to(e){const n=e.tag;if(5===n||n===w||n===k||6===n)return e.stateNode;throw new Error("getNodeFromInstance: Invalid argument.")}function oo(e){return e[Qt]||null}function lo(e,n){e[Qt]=n}function ro(e){let n=e[Kt];return n||(n=e[Kt]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function io(e){return!!e[Xt]}function ao(e){e[Xt]=!0}function uo(e){return!(!e[Xt]&&!e[Bt])}const so=new Set,co={};function fo(e,n){po(e,n),po(e+"Capture",n)}function po(e,n){co[e]=n;for(let e=0;e<n.length;e++)so.add(n[e])}const ho=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",mo=new RegExp("^["+ho+"]["+(ho+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*$"),go={},yo={};function bo(e,n,t){if(o=n,tn.call(yo,o)||!tn.call(go,o)&&(mo.test(o)?(yo[o]=!0,1):(go[o]=!0,0))){if(null===t)return void e.removeAttribute(n);switch(typeof t){case"undefined":case"function":case"symbol":return void e.removeAttribute(n);case"boolean":{const t=n.toLowerCase().slice(0,5);if("data-"!==t&&"aria-"!==t)return void e.removeAttribute(n)}}e.setAttribute(n,""+t)}var o}function wo(e,n,t){if(null!==t){switch(typeof t){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(n)}e.setAttribute(n,""+t)}else e.removeAttribute(n)}function ko(e,n,t,o){if(null!==o){switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(t)}e.setAttributeNS(n,t,""+o)}else e.removeAttribute(t)}function vo(e){return""+e}function So(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function Eo(e){const n=e.type,t=e.nodeName;return t&&"input"===t.toLowerCase()&&("checkbox"===n||"radio"===n)}function xo(e){return e._valueTracker}function Co(e){if(xo(e))return;const n=Eo(e)?"checked":"value",t=""+e[n];e._valueTracker=function(e,n,t){const o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(e.hasOwnProperty(n)||void 0===o||"function"!=typeof o.get||"function"!=typeof o.set)return;const l=o.get,r=o.set;Object.defineProperty(e,n,{configurable:!0,get:function(){return l.call(this)},set:function(e){t=""+e,r.call(this,e)}}),Object.defineProperty(e,n,{enumerable:o.enumerable});const i={getValue:()=>t,setValue(e){t=""+e},stopTracking(){!function(e){e._valueTracker=null}(e),delete e[n]}};return i}(e,n,t)}function zo(e){if(!e)return!1;const n=xo(e);if(!n)return!0;const t=n.getValue(),o=function(e){let n="";return e?(n=Eo(e)?e.checked?"true":"false":e.value,n):n}(e);return o!==t&&(n.setValue(o),!0)}function Po(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(n){return e.body}}const To=/[\n\"\\]/g;function No(e){return e.replace(To,(e=>"\\"+e.charCodeAt(0).toString(16)+" "))}function Lo(e,n,t,o,l,r,i,a){const u=e;u.name="",null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i?u.type=i:u.removeAttribute("type"),null!=n?"number"===i?(0===n&&""===u.value||u.value!=n)&&(u.value=vo(So(n))):u.value!==vo(So(n))&&(u.value=vo(So(n))):"submit"!==i&&"reset"!==i||u.removeAttribute("value"),null!=n?_o(u,i,So(n)):null!=t?_o(u,i,So(t)):null!=o&&u.removeAttribute("value"),null==l&&null!=r&&(u.defaultChecked=!!r),null!=l&&(u.checked=l&&"function"!=typeof l&&"symbol"!=typeof l),null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a?u.name=vo(So(a)
2):u.removeAttribute("name")}function Ro(e,n,t,o,l,r,i,a){const u=e;if(null!=r&&"function"!=typeof r&&"symbol"!=typeof r&&"boolean"!=typeof r&&(u.type=r),null!=n||null!=t){if(("submit"===r||"reset"===r)&&null==n)return void Co(e);const o=null!=t?vo(So(t)):"",l=null!=n?vo(So(n)):o;a||l!==u.value&&(u.value=l),u.defaultValue=l}const s=null!=o?o:l,c="function"!=typeof s&&"symbol"!=typeof s&&!!s;u.checked=a?u.checked:!!c,u.defaultChecked=!u.defaultChecked,u.defaultChecked=!!c,null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i&&(u.name=i),Co(e)}function _o(e,n,t){"number"===n&&Po(e.ownerDocument)===e||e.defaultValue!==vo(t)&&(e.defaultValue=vo(t))}function Mo(e,n,t,o){const l=e.options;if(n){const e=t,n={};for(let t=0;t<e.length;t++)n["$"+e[t]]=!0;for(let e=0;e<l.length;e++){const t=n.hasOwnProperty("$"+l[e].value);l[e].selected!==t&&(l[e].selected=t),t&&o&&(l[e].defaultSelected=!0)}}else{const e=vo(So(t));let n=null;for(let t=0;t<l.length;t++){if(l[t].value===e)return l[t].selected=!0,void(o&&(l[t].defaultSelected=!0));null!==n||l[t].disabled||(n=l[t])}null!==n&&(n.selected=!0)}}function Oo(e,n,t){const o=e;if(null!=n){const e=vo(So(n));if(e!==o.value&&(o.value=e),null==t)return void(o.defaultValue!==e&&(o.defaultValue=e))}o.defaultValue=null!=t?vo(So(t)):""}function Ao(e,n,t,o){const l=e;let r=n;if(null==r){if(null!=o){if(null!=t)throw new Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(Te(o)){if(o.length>1)throw new Error("<textarea> can only have at most one child.");o=o[0]}t=o}null==t&&(t=""),r=t}const i=So(r);l.defaultValue=i;const a=l.textContent;a===i&&""!==a&&null!==a&&(l.value=a),Co(e)}function Do(e,n){if(n){const t=e.firstChild;if(t&&t===e.lastChild&&3===t.nodeType)return void(t.nodeValue=n)}e.textContent=n}const Fo=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridArea","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineClamp","lineHeight","opacity","order","orphans","scale","tabSize","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","MozAnimationIterationCount","MozBoxFlex","MozBoxFlexGroup","MozLineClamp","msAnimationIterationCount","msFlex","msZoom","msFlexGrow","msFlexNegative","msFlexOrder","msFlexPositive","msFlexShrink","msGridColumn","msGridColumnSpan","msGridRow","msGridRowSpan","WebkitAnimationIterationCount","WebkitBoxFlex","WebKitBoxFlexGroup","WebkitBoxOrdinalGroup","WebkitColumnCount","WebkitColumns","WebkitFlex","WebkitFlexGrow","WebkitFlexPositive","WebkitFlexShrink","WebkitLineClamp"]);function Io(e,n,t){const o=0===n.indexOf("--");var l;null==t||"boolean"==typeof t||""===t?o?e.setProperty(n,""):"float"===n?e.cssFloat="":e[n]="":o?e.setProperty(n,t):"number"!=typeof t||0===t||(l=n,Fo.has(l))?"float"===n?e.cssFloat=t:e[n]=(""+t).trim():e[n]=t+"px"}function Uo(e,n,t){if(null!=n&&"object"!=typeof n)throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");const o=e.style;if(null!=t){for(const e in t)if(t.hasOwnProperty(e)&&(null==n||!n.hasOwnProperty(e))){0===e.indexOf("--")?o.setProperty(e,""):"float"===e?o.cssFloat="":o[e]=""}for(const e in n){const l=n[e];n.hasOwnProperty(e)&&t[e]!==l&&Io(o,e,l)}}else for(const e in n)if(n.hasOwnProperty(e)){Io(o,e,n[e])}}const Ho="http://www.w3.org/1998/Math/MathML",jo="http://www.w3.org/2000/svg";function Vo(e,n){if(-1===e.indexOf("-"))return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}const Bo=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRen
2dering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]);const Qo=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;function Wo(e){return Qo.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function qo(){}let $o=null;function Yo(e){let n=e.target||e.srcElement||window;return n.correspondingUseElement&&(n=n.correspondingUseElement),3===n.nodeType?n.parentNode:n}let Ko=null,Xo=null;function Go(e){const n=no(e);if(!n)return;const t=n.stateNode;if(t){const e=oo(t);!function(e,n,t){switch(n){case"input":return void function(e,n){const t=e;Lo(t,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name);const o=n.name;if("radio"===n.type&&null!=o){let e=t;for(;e.parentNode;)e=e.parentNode;const n=e.querySelectorAll('input[name="'+No(""+o)+'"][type="radio"]');for(let e=0;e<n.length;e++){const o=n[e];if(o===t||o.form!==t.form)continue;const l=oo(o);if(!l)throw new Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");Lo(o,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}for(let e=0;e<n.length;e++){const o=n[e];o.form===t.form&&zo(o)}}}(e,t);case"textarea":return void function(e,n){Oo(e,n.value,n.defaultValue)}(e,t);case"select":!function(e,n){const t=e,o=n.value;null!=o&&Mo(t,!!n.multiple,o,!1)}(e,t)}}(n.stateNode,n.type,e)}}let Zo=!1;function Jo(){(null!==Ko||null!==Xo)&&(Om(),function(){if(!Ko)return;const e=Ko,n=Xo;if(Ko=null,Xo=null,Go(e),n)for(let e=0;e<n.length;e++)Go(n[e])}())}function el(e,n,t){if(Zo)return e(n,t);Zo=!0;try{return function(e,n){return e(n)}(e,n)}finally{Zo=!1,Jo()}}function nl(e,n){const t=e.stateNode;if(null===t)return null;const o=oo(t);if(null===o)return null;const l=o[n];if(function(e,n,t){switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":return!(!t.disabled||(o=n,"button"!==o&&"input"!==o&&"select"!==o&&"textarea"!==o)
2);default:return!1}var o}(n,e.type,o))return null;if(l&&"function"!=typeof l)throw new Error("Expected `"+n+"` listener to be a function, instead got a value of `"+typeof l+"` type.");return l}const tl=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement);let ol=!1;if(tl)try{const e={};Object.defineProperty(e,"passive",{get:function(){ol=!0}}),window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){ol=!1}let ll=null,rl=null,il=null;function al(){if(il)return il;let e;const n=rl,t=n.length;let o;const l=ul(),r=l.length;for(e=0;e<t&&n[e]===l[e];e++);const i=t-e;for(o=1;o<=i&&n[t-o]===l[r-o];o++);const a=o>1?1-o:void 0;return il=l.slice(e,a),il}function ul(){return"value"in ll?ll.value:ll.textContent}function sl(e){let n;const t=e.keyCode;return"charCode"in e?(n=e.charCode,0===n&&13===t&&(n=13)):n=t,10===n&&(n=13),n>=32||13===n?n:0}function cl(){return!0}function fl(){return!1}function dl(e){function n(n,t,o,l,r){this._reactName=n,this._targetInst=o,this.type=t,this.nativeEvent=l,this.target=r,this.currentTarget=null;for(const n in e){if(!e.hasOwnProperty(n))continue;const t=e[n];this[n]=t?t(l):l[n]}const i=null!=l.defaultPrevented?l.defaultPrevented:!1===l.returnValue;return this.isDefaultPrevented=i?cl:fl,this.isPropagationStopped=fl,this}return re(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;const e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=cl)},stopPropagation:function(){const e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=cl)},persist:function(){},isPersistent:cl}),n}const pl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hl=dl(pl),ml=re({},pl,{view:0,detail:0}),gl=dl(ml);let yl,bl,wl;const kl=re({},ml,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_l,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(function(e){e!==wl&&(wl&&"mousemove"===e.type?(yl=e.screenX-wl.screenX,bl=e.screenY-wl.screenY):(yl=0,bl=0),wl=e)}(e),yl)},movementY:function(e){return"movementY"in e?e.movementY:bl}}),vl=dl(kl),Sl=dl(re({},kl,{dataTransfer:0})),El=dl(re({},ml,{relatedTarget:0})),xl=dl(re({},pl,{animationName:0,elapsedTime:0,pseudoElement:0})),Cl=dl(re({},pl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),zl=dl(re({},pl,{data:0})),Pl=zl,Tl={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Nl={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};const Ll={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Rl(e){const n=this.nativeEvent;if(n.getModifierState)return n.getModifierState(e);const t=Ll[e];return!!t&&!!n[t]}function _l(e){return Rl}const Ml=dl(re({},ml,{key:function(e){if(e.key){const n=Tl[e.key]||e.key;if("Unidentified"!==n)return n}if("keypress"===e.type){const n=sl(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?Nl[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_l,charCode:function(e){return"keypress"===e.type?sl(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?sl(e):"keydown"===e.type||"ke
2yup"===e.type?e.keyCode:0}})),Ol=dl(re({},kl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Al=dl(re({},ml,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_l})),Dl=dl(re({},pl,{propertyName:0,elapsedTime:0,pseudoElement:0})),Fl=dl(re({},kl,{deltaX:e=>"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0,deltaY:e=>"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0,deltaZ:0,deltaMode:0})),Il=dl(re({},pl,{newState:0,oldState:0})),Ul=[9,13,27,32],Hl=229,jl=tl&&"CompositionEvent"in window;let Vl=null;tl&&"documentMode"in document&&(Vl=document.documentMode);const Bl=tl&&"TextEvent"in window&&!Vl,Ql=tl&&(!jl||Vl&&Vl>8&&Vl<=11),Wl=32,ql=String.fromCharCode(Wl);let $l=!1;function Yl(e,n){switch(e){case"keyup":return-1!==Ul.indexOf(n.keyCode);case"keydown":return n.keyCode!==Hl;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Kl(e){const n=e.detail;return"object"==typeof n&&"data"in n?n.data:null}function Xl(e){return"ko"===e.locale}let Gl=!1;function Zl(e,n,t,o,l){let r,i;if(jl?r=function(e){switch(e){case"compositionstart":return"onCompositionStart";case"compositionend":return"onCompositionEnd";case"compositionupdate":return"onCompositionUpdate"}}(n):Gl?Yl(n,o)&&(r="onCompositionEnd"):function(e,n){return"keydown"===e&&n.keyCode===Hl}(n,o)&&(r="onCompositionStart"),!r)return null;Ql&&!Xl(o)&&(Gl||"onCompositionStart"!==r?"onCompositionEnd"===r&&Gl&&(i=al()):Gl=function(e){return ll=e,rl=ul(),!0}(l));const a=ny(t,r);if(a.length>0){const t=new zl(r,n,null,o,l);if(e.push({event:t,listeners:a}),i)t.data=i;else{const e=Kl(o);null!==e&&(t.data=e)}}}function Jl(e,n){if(Gl){if("compositionend"===e||!jl&&Yl(e,n)){const e=al();return ll=null,rl=null,il=null,Gl=!1,e}return null}switch(e){case"paste":default:return null;case"keypress":if(!function(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}(n)){if(n.char&&n.char.length>1)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Ql&&!Xl(n)?null:n.data}}function er(e,n,t,o,l){let r;if(r=Bl?function(e,n){switch(e){case"compositionend":return Kl(n);case"keypress":return n.which!==Wl?null:($l=!0,ql);case"textInput":const e=n.data;return e===ql&&$l?null:e;default:return null}}(n,o):Jl(n,o),!r)return null;const i=ny(t,"onBeforeInput");if(i.length>0){const n=new Pl("onBeforeInput","beforeinput",null,o,l);e.push({event:n,listeners:i}),n.data=r}}const nr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function tr(e){const n=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===n?!!nr[e.type]:"textarea"===n} 3/** 4 * Checks if an event is supported in the current execution environment. 5 * 6 * NOTE: This will not work correctly for non-generic events such as `change`, 7 * `reset`, `load`, `error`, and `select`. 8 * 9 * Borrows from Modernizr. 10 * 11 * @param {string} eventNameSuffix Event name, e.g. "click". 12 * @return {boolean} True if the event is supported. 13 * @internal 14 * @license Modernizr 3.0.0pre (Custom Build) | MIT 15 */function or(e,n,t,o){!function(e){Ko?Xo?Xo.push(e):Xo=[e]:Ko=e}(o);const l=ny(n,"onChange");if(l.length>0){const n=new hl("onChange","change",null,t,o);e.push({event:n,listeners:l})}}let lr=null,rr=null;function ir(e){qg(e,0)}function ar(e){if(zo(to(e)))return e}function ur(e,n){if("change"===e)return n}let sr=!1;function cr(){lr&&(lr.detachEvent("onpropertychange",fr),lr=null,rr=null)}function fr(e){"value"===e.propertyName&&ar(rr)&&function(e){const n=[];or(n,rr,e,Yo(e)),el(ir,n)}(e)}function dr(e,n,t){"focusin"===e?(cr(),function(e,n){lr=e,rr=n,lr.attachEvent("onpropertychange",fr)}(n,t)):"focusout"===e&&cr()}function pr(e,n){if("selectionchange"===e||"keyup"===e||"keydown"===e)return ar(rr)}function hr(e,n){if("click"===e)return ar(n)}function mr(e,n){if("input"===e||"change"===e)return ar(n)}function gr(e,n,t,o,l,r,i){const a=t?to(t):window;let u,s;if(!function(e){const n=e.nodeName&&e.nodeName.toLowerCase();return"select"===n||"input"===n&&"file"===e.type}(a)?tr(a)?sr?u=mr:(u=pr,s=dr):!function(e){const n=e.nodeName;return n&&"input"===n.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}
15(a)?t&&Vo(t.elementType)&&(u=ur):u=hr:u=ur,u){const r=u(n,t);if(r)return void or(e,r,o,l)}if(s&&s(n,a,t),"focusout"===n&&t){!function(e,n){"number"===e.type&&null!=n.value&&_o(e,"number",e.value)}(a,t.memoizedProps)}}function yr(e,n,t,o,l,r,i){const a="mouseover"===n||"pointerover"===n,u="mouseout"===n||"pointerout"===n;if(a&&o!==$o){const e=o.relatedTarget||o.fromElement;if(e&&(eo(e)||e[Wt]))return}if(!u&&!a)return;let s,c,f;if(l.window===l)s=l;else{const e=l.ownerDocument;s=e?e.defaultView||e.parentWindow:window}if(u){const e=o.relatedTarget||o.toElement;if(c=t,f=e?eo(e):null,null!==f){const e=Z(f),n=f.tag;(f!==e||5!==n&&n!==k&&6!==n)&&(f=null)}}else c=null,f=t;if(c===f)return;let d=vl,p="onMouseLeave",h="onMouseEnter",m="mouse";"pointerout"!==n&&"pointerover"!==n||(d=Ol,p="onPointerLeave",h="onPointerEnter",m="pointer");const g=null==c?s:to(c),y=null==f?s:to(f),b=new d(p,m+"leave",c,o,l);b.target=g,b.relatedTarget=y;let w=null;if(eo(l)===t){const e=new d(h,m+"enter",f,o,l);e.target=y,e.relatedTarget=g,w=e}!function(e,n,t,o,l){const r=o&&l?function(e,n,t){let o=e,l=n,r=0;for(let e=o;e;e=t(e))r++;let i=0;for(let e=l;e;e=t(e))i++;for(;r-i>0;)o=t(o),r--;for(;i-r>0;)l=t(l),i--;let a=r;for(;a--;){if(o===l||null!==l&&o===l.alternate)return o;o=t(o),l=t(l)}return null}(o,l,ty):null;null!==o&&oy(e,n,o,r,!1);null!==l&&null!==t&&oy(e,t,l,r,!0)}(e,b,w,c,f)}tl&&(sr=function(e){if(!tl)return!1;const n="on"+e;let t=n in document;if(!t){const e=document.createElement("div");e.setAttribute(n,"return;"),t="function"==typeof e[n]}return t}("input")&&(!document.documentMode||document.documentMode>9));const br="function"==typeof Object.is?Object.is:function(e,n){return e===n&&(0!==e||1/e==1/n)||e!=e&&n!=n};function wr(e,n){if(br(e,n))return!0;if("object"!=typeof e||null===e||"object"!=typeof n||null===n)return!1;const t=Object.keys(e),o=Object.keys(n);if(t.length!==o.length)return!1;for(let o=0;o<t.length;o++){const l=t[o];if(!tn.call(n,l)||!br(e[l],n[l]))return!1}return!0}function kr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vr(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function Sr(e,n){let t=kr(e),o=0,l=0;for(;t;){if(3===t.nodeType){if(l=o+t.textContent.length,o<=n&&l>=n)return{node:t,offset:n-o};o=l}t=kr(vr(t))}}function Er(e){const n=e.ownerDocument,t=n&&n.defaultView||window,o=t.getSelection&&t.getSelection();if(!o||0===o.rangeCount)return null;const l=o.anchorNode,r=o.anchorOffset,i=o.focusNode,a=o.focusOffset;try{l.nodeType,i.nodeType}catch(e){return null}return function(e,n,t,o,l){let r=0,i=-1,a=-1,u=0,s=0,c=e,f=null;e:for(;;){let d=null;for(;c!==n||0!==t&&3!==c.nodeType||(i=r+t),c!==o||0!==l&&3!==c.nodeType||(a=r+l),3===c.nodeType&&(r+=c.nodeValue.length),null!==(d=c.firstChild);)f=c,c=d;for(;;){if(c===e)break e;if(f===n&&++u===t&&(i=r),f===o&&++s===l&&(a=r),null!==(d=c.nextSibling))break;c=f,f=c.parentNode}c=d}if(-1===i||-1===a)return null;return{start:i,end:a}}(e,l,r,i,a)}function xr(e){return e&&3===e.nodeType}function Cr(e,n){return!(!e||!n)&&(e===n||!xr(e)&&(xr(n)?Cr(e,n.parentNode):"contains"in e?e.contains(n):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(n))))}function zr(e){return e&&e.ownerDocument&&Cr(e.ownerDocument.documentElement,e)}function Pr(e){try{return"string"==typeof e.contentWindow.location.href}catch(e){return!1}}function Tr(e){let n=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window,t=Po(n.document);for(;t instanceof n.HTMLIFrameElement;){if(!Pr(t))return t;n=t.contentWindow,t=Po(n.document)}return t}function Nr(e){const n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&("input"===n&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===n||"true"===e.contentEditable)}function Lr(e,n){const t=Tr(n),o=e.focusedElem,l=e.selectionRange;if(t!==o&&zr(o)){null!==l&&Nr(o)&&function(e,n){const t=n.start;let o=n.end;void 0===o&&(o=t);"selectionStart"in e?(e.selectionStart=t,e.selectionEnd=Math.min(o,e.value.length)):function(e,n){const t=e.ownerDocument||document,o=t&&t.defaultView||window;if(!o.getSelection)return;const l=o.getSelection(),r=e.textContent.length;let i=Math.min(n.start,r),a=void 0===n.end?i:Math.min(n.end,r);if(!l.extend&&i>a){const e=a;a=i,i=e}const u=Sr(e,i),s=Sr(e,a);if(u&&s){if(1===l.rangeCount&&l.anchorNode===u.node&&l.anchorOffset===u.offset&&l.focusNode===s.node&&l.focusOffset===s.offset)return;const e=t.createRange();e.setStart(u.node,u.offset),l.removeAllRanges(),i>a?(l.addRange(e),l.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),l.addRange(e))}}(e,n)}(o,l);const e=[];let n=o;for(;n=n.parentNode;)1===n.nodeType&&e.push({element:n,left:n.scrollLeft,top:n.scrollTop});"function"==typeof o.focus&&o.focus();for(let n=0;n<e.length;
15n++){const t=e[n];t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}}function Rr(e){let n;return n="selectionStart"in e?{start:e.selectionStart,end:e.selectionEnd}:Er(e),n||{start:0,end:0}}const _r=tl&&"documentMode"in document&&document.documentMode<=11;let Mr=null,Or=null,Ar=null,Dr=!1;function Fr(e,n,t){const o=(l=t).window===l?l.document:9===l.nodeType?l:l.ownerDocument;var l;if(Dr||null==Mr||Mr!==Po(o))return;const r=function(e){if("selectionStart"in e&&Nr(e))return{start:e.selectionStart,end:e.selectionEnd};{const n=(e.ownerDocument&&e.ownerDocument.defaultView||window).getSelection();return{anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}}}(Mr);if(!Ar||!wr(Ar,r)){Ar=r;const o=ny(Or,"onSelect");if(o.length>0){const l=new hl("onSelect","select",null,n,t);e.push({event:l,listeners:o}),l.target=Mr}}}function Ir(e,n){const t={};return t[e.toLowerCase()]=n.toLowerCase(),t["Webkit"+e]="webkit"+n,t["Moz"+e]="moz"+n,t}const Ur={animationend:Ir("Animation","AnimationEnd"),animationiteration:Ir("Animation","AnimationIteration"),animationstart:Ir("Animation","AnimationStart"),transitionrun:Ir("Transition","TransitionRun"),transitionstart:Ir("Transition","TransitionStart"),transitioncancel:Ir("Transition","TransitionCancel"),transitionend:Ir("Transition","TransitionEnd")},Hr={};let jr={};function Vr(e){if(Hr[e])return Hr[e];if(!Ur[e])return e;const n=Ur[e];for(const t in n)if(n.hasOwnProperty(t)&&t in jr)return Hr[e]=n[t];return e}tl&&(jr=document.createElement("div").style,"AnimationEvent"in window||(delete Ur.animationend.animation,delete Ur.animationiteration.animation,delete Ur.animationstart.animation),"TransitionEvent"in window||delete Ur.transitionend.transition);const Br=Vr("animationend"),Qr=Vr("animationiteration"),Wr=Vr("animationstart"),qr=Vr("transitionrun"),$r=Vr("transitionstart"),Yr=Vr("transitioncancel"),Kr=Vr("transitionend"),Xr=new Map,Gr=["abort","auxClick","beforeToggle","cancel","canPlay","canPlayThrough","click","close","contextMenu","copy","cut","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","gotPointerCapture","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","lostPointerCapture","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","pointerCancel","pointerDown","pointerMove","pointerOut","pointerOver","pointerUp","progress","rateChange","reset","resize","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchStart","volumeChange","scroll","toggle","touchMove","waiting","wheel"];function Zr(e,n){Xr.set(e,n),fo(n,[e])}function Jr(e,n,t,o,l,r,i){const a=Xr.get(n);if(void 0===a)return;let u=hl,s=n;switch(n){case"keypress":if(0===sl(o))return;case"keydown":case"keyup":u=Ml;break;case"focusin":s="focus",u=El;break;case"focusout":s="blur",u=El;break;case"beforeblur":case"afterblur":u=El;break;case"click":if(2===o.button)return;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=vl;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=Sl;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=Al;break;case Br:case Qr:case Wr:u=xl;break;case Kr:u=Dl;break;case"scroll":case"scrollend":u=gl;break;case"wheel":u=Fl;break;case"copy":case"cut":case"paste":u=Cl;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=Ol;break;case"toggle":case"beforetoggle":u=Il}const c=!!(4&r);{const r=!c&&("scroll"===n||"scrollend"===n),i=function(e,n,t,o,l){const r=null!==n?n+"Capture":null,i=o?r:n;let a=[],u=e,s=null;for(;null!==u;){const e=u,n=e.stateNode,t=e.tag;if((5===t||t===w||t===k)&&null!==n&&(s=n,null!==i)){const e=nl(u,i);null!=e&&a.push(ey(u,e,s))}if(l)break;u=u.return}return a}(t,a,o.type,c,r);if(i.length>0){const n=new u(a,s,null,o,l);e.push({event:n,listeners:i})}}}Gr.push("scrollEnd");let ei=0;function ni(e,n){if(null!=e.name&&"auto"!==e.name)return e.name;if(null!==n.autoName)return n.autoName;const t="_"+sm.identifierPrefix+"t_"+(ei++).toString(32)+"_";return n.autoName=t,t}function ti(e){return null==e||"string"==typeof e?e:e.default}function oi(e,n){const t=ti(e),o=ti(n);return null==o?"auto"===t?null:t:"auto"===o?null:o}const li="function"==typeof reportError?reportError:e=>{if("object"==typeof window&&"function"==typeof window.ErrorEvent){const n="object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:n,error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},ri=1,ii=2,ai=[];let ui=0,si=0;function ci(){const e=ui;ui=0,si=0;let n=0;for(;n<e;){const e=ai[n];ai[n++]=null;const t=ai[n];ai[n++]=null;const o=ai[n];ai[n++]=null;const l=ai[n];if(ai[n++]=null,null!==t&&null!==o){const e=t.pending;null===e?o.next=o:(o.next=e.next,e.next=o),t.pending=o}0!==l&&mi(e,o,l)}}function fi(){return si}
15function di(e,n,t,o){ai[ui++]=e,ai[ui++]=n,ai[ui++]=t,ai[ui++]=o,si=zt(si,o),e.lanes=zt(e.lanes,o);const l=e.alternate;null!==l&&(l.lanes=zt(l.lanes,o))}function pi(e,n,t,o){return di(e,n,t,o),gi(e)}function hi(e,n){return di(e,null,null,n),gi(e)}function mi(e,n,t){e.lanes=zt(e.lanes,t);let o=e.alternate;null!==o&&(o.lanes=zt(o.lanes,t));let l=!1,r=e.return,i=e;for(;null!==r;){if(r.childLanes=zt(r.childLanes,t),o=r.alternate,null!==o&&(o.childLanes=zt(o.childLanes,t)),r.tag===m){const e=r.stateNode;null===e||e._visibility&ri||(l=!0)}i=r,r=r.return}if(3===i.tag){const e=i.stateNode;return l&&null!==n&&function(e,n,t){const o=Et(t),l=e.hiddenUpdates,r=l[o];null===r?l[o]=[n]:r.push(n),n.lane=t|Jn}(e,n,t),e}return null}function gi(e){!function(){if(gm>mm)throw gm=0,ym=null,new Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.")}();let n=e,t=n.return;for(;null!==t;)n=t,t=n.return;return 3===n.tag?n.stateNode:null}const yi={};const bi=0,wi=1,ki=2,vi=8,Si=16,Ei=32;function xi(e,n,t,o){this.tag=e,this.key=t,this.elementType=null,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.refCleanup=null,this.pendingProps=n,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=o,this.flags=0,this.subtreeFlags=0,this.deletions=null,this.lanes=0,this.childLanes=0,this.alternate=null}const Ci=function(e,n,t,o){return new xi(e,n,t,o)};function zi(e){const n=e.prototype;return!(!n||!n.isReactComponent)}function Pi(e,n){let t=e.alternate;null===t?(t=Ci(e.tag,n,e.key,e.mode),t.elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=n,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=e.flags&G,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue;const o=e.dependencies;return t.dependencies=null===o?null:{lanes:o.lanes,firstContext:o.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t.refCleanup=e.refCleanup,t}function Ti(e,n){e.flags&=65011714;const t=e.alternate;if(null===t)e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null;else{e.childLanes=t.childLanes,e.lanes=t.lanes,e.child=t.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=t.memoizedProps,e.memoizedState=t.memoizedState,e.updateQueue=t.updateQueue,e.type=t.type;const n=t.dependencies;e.dependencies=null===n?null:{lanes:n.lanes,firstContext:n.firstContext}}return e}function Ni(e,n,t,o,l,r){let i=0,d=e;if("function"==typeof e)zi(e)&&(i=1);else if("string"==typeof e){i=function(e,n,t){let o;if(o=t,o===Ry||null!=n.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":return"string"==typeof n.precedence&&"string"==typeof n.href&&""!==n.href;case"link":if("string"!=typeof n.rel||"string"!=typeof n.href||""===n.href||n.onLoad||n.onError)return!1;if("stylesheet"===n.rel){const e=n.precedence,t=n.disabled;return"string"==typeof e&&null==t}return!0;case"script":return!(!(n.async&&"function"!=typeof n.async&&"symbol"!=typeof n.async)||n.onLoad||n.onError||!n.src||"string"!=typeof n.src);case"noscript":case"template":return!1}return!1}(e,t,Qe())?w:function(e){return"html"===e||"head"===e||"body"===e}(e)?k:5}else e:switch(e){case ke:return function(e,n,t,o){const l=Ci(S,e,o,n);return l.elementType=ke,l.lanes=t,l}(t,l,r,n);case ce:return Ri(t.children,l,r,n);case fe:i=8,l|=vi,l|=Si;break;case de:return function(e,n,t,o){const l=Ci(s,e,o,n|ki);return l.elementType=de,l.lanes=t,l}(t,l,r,n);case ge:return function(e,n,t,o){const l=Ci(c,e,o,n);return l.elementType=ge,l.lanes=t,l}(t,l,r,n);case ye:return function(e,n,t,o){const l=Ci(h,e,o,n);return l.elementType=ye,l.lanes=t,l}(t,l,r,n);default:{if("object"==typeof e&&null!==e)switch(e.$$typeof){case he:i=a;break e;case pe:i=9;break e;case me:i=u;break e;case be:i=f;break e;case we:i=16,d=null;break e}let n;n=null===e?"null":typeof e,i=29,t=new Error("Element type is invali
15d: expected a string (for built-in components) or a class/function (for composite components) but got: "+n+"."+""),d=null}}const p=Ci(i,t,n,l);return p.elementType=e,p.type=d,p.lanes=r,p}function Li(e,n,t){return Ni(e.type,e.key,e.props,0,n,t)}function Ri(e,n,t,o){const l=Ci(7,e,o,n);return l.lanes=t,l}function _i(e,n,t){const o=Ci(6,e,null,n);return o.lanes=t,o}function Mi(e){const n=Ci(p,null,null,bi);return n.stateNode=e,n}function Oi(e,n,t){const o=null!==e.children?e.children:[],l=Ci(4,o,e.key,n);return l.lanes=t,l.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},l}function Ai(e){return e.current.memoizedState.isDehydrated}const Di=new WeakMap;function Fi(e,n){if("object"==typeof e&&null!==e){const t=Di.get(e);if(void 0!==t)return t;const o={value:e,source:n,stack:nn(n)};return Di.set(e,o),o}return{value:e,source:n,stack:nn(n)}}const Ii=[];let Ui=0,Hi=null,ji=0;const Vi=[];let Bi=0,Qi=null,Wi=1,qi="";function $i(e){return ji}function Yi(){const e=qi;return(Wi&~function(e){return 1<<Zi(e)-1}(Wi)).toString(32)+e}function Ki(e,n){Ii[Ui++]=ji,Ii[Ui++]=Hi,Hi=e,ji=n}function Xi(e,n,t){Vi[Bi++]=Wi,Vi[Bi++]=qi,Vi[Bi++]=Qi,Qi=e;const o=Wi,l=qi,r=Zi(o)-1,i=o&~(1<<r),a=t+1,u=Zi(n)+r;if(u>30){const e=r-r%5,t=(i&(1<<e)-1).toString(32),o=i>>e,u=r-e,s=Zi(n)+u;Wi=1<<s|(a<<u|o),qi=t+l}else{Wi=1<<u|(a<<r|i),qi=l}}function Gi(e){if(null!==e.return){const n=1,t=0;Ki(e,n),Xi(e,n,t)}}function Zi(e){return 32-kn(e)}function Ji(e){for(;e===Hi;)Hi=Ii[--Ui],Ii[Ui]=null,ji=Ii[--Ui],Ii[Ui]=null;for(;e===Qi;)Qi=Vi[--Bi],Vi[Bi]=null,qi=Vi[--Bi],Vi[Bi]=null,Wi=Vi[--Bi],Vi[Bi]=null}function ea(){return null!==Qi?{id:Wi,overflow:qi}:null}function na(e,n){Vi[Bi++]=Wi,Vi[Bi++]=qi,Vi[Bi++]=Qi,Wi=n.id,qi=n.overflow,Qi=e}let ta=null,oa=null,la=!1,ra=null,ia=!1;function aa(e){const n=e.stateNode.containerInfo;return oa=function(e){let n;if(9===e.nodeType)n=e.body;else n="HTML"===e.nodeName?e.ownerDocument.body:e;return rb(n.firstChild)}(n),ta=e,la=!0,ra=null,ia=!0,!0}function ua(e,n,t){return oa=rb(n.nextSibling),ta=e,la=!0,ra=null,ia=!1,null!==t&&na(e,t),!0}function sa(e,n,t){return oa=rb(n.nextSibling),ta=e,la=!0,ra=null,ia=!1,null!==t&&na(e,t),!0}function ca(e,n,t){const o=function(e,n,t,o){for(;1===e.nodeType;){const l=e,r=t;if(l.nodeName.toLowerCase()!==n.toLowerCase()){if(!o&&("INPUT"!==l.nodeName||"hidden"!==l.type))return null}else if(o)if(io(l));else switch(n){case"meta":if(!l.hasAttribute("itemprop"))break;return l;case"link":{const e=l.getAttribute("rel");if("stylesheet"===e&&l.hasAttribute("data-precedence"))break;if(e!==r.rel||l.getAttribute("href")!==(null==r.href||""===r.href?null:r.href)||l.getAttribute("crossorigin")!==(null==r.crossOrigin?null:r.crossOrigin)||l.getAttribute("title")!==(null==r.title?null:r.title))break;return l}case"style":if(l.hasAttribute("data-precedence"))break;return l;case"script":{const e=l.getAttribute("src");if((e!==(null==r.src?null:r.src)||l.getAttribute("type")!==(null==r.type?null:r.type)||l.getAttribute("crossorigin")!==(null==r.crossOrigin?null:r.crossOrigin))&&e&&l.hasAttribute("async")&&!l.hasAttribute("itemprop"))break;return l}default:return l}else{if("input"!==n||"hidden"!==l.type)return l;{const e=null==r.name?null:""+r.name;if("hidden"===r.type&&l.getAttribute("name")===e)return l}}const i=ib(l);if(null===i)break;e=i}return null}(n,e.type,e.pendingProps,ia);return null!==o&&(e.stateNode=o,ta=e,oa=rb(o.firstChild),ia=!1,!0)}function fa(e,n){const t=function(e,n,t){if(""===n)return null;for(;3!==e.nodeType;){if(1===e.nodeType&&"INPUT"===e.nodeName&&"hidden"===e.type);else if(!t)return null;const n=ib(e);if(null===n)return null;e=n}return e}(n,e.pendingProps,ia);return null!==t&&(e.stateNode=t,ta=e,oa=null,!0)}
15function da(e,n){const t=function(e,n){const t=tb(e,n);if(null!==t&&t.data===gy)return t;return null}(n,ia);if(null!==t){const n={dehydrated:t,treeContext:ea(),retryLane:Jn,hydrationErrors:null};e.memoizedState=n;const o=Mi(t);o.return=e,e.child=o,ta=e,oa=null}return t}function pa(e,n){const t=function(e,n){const t=tb(e,n);if(null!==t&&t.data!==gy)return t;return null}(n,ia);if(null!==t){const n={dehydrated:t,treeContext:ea(),retryLane:Jn,hydrationErrors:null};e.memoizedState=n;const o=Mi(t);o.return=e,e.child=o,ta=e,oa=null}return t}const ha=new Error("Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React.");function ma(e){throw Na(Fi(new Error("Hydration failed because the server rendered "+(arguments.length>1&&void 0!==arguments[1]&&arguments[1]?"text":"HTML")+" didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:\n\n- A server/client branch `if (typeof window !== 'undefined')`.\n- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.\n- Date formatting in a user's locale which doesn't match the server.\n- External changing data without sending a snapshot of it along with the HTML.\n- Invalid HTML tag nesting.\n\nIt can also happen if the client has a browser extension installed which messes with the HTML before React loaded.\n\nhttps://react.dev/link/hydration-mismatch"),e)),ha}function ga(e){{if(!la)return;const l=je(),r=e.stateNode=cb(e.type,e.pendingProps,l);ta=e,ia=!0,n=e.type,t=r,o=oa,oa=$y(n)?(ab=o,rb(t.firstChild)):o}var n,t,o}function ya(e){if(!la)return!1;if(oa){const e=function(e,n){for(;8!==e.nodeType;){if(!n)return null;const t=ib(e);if(null===t)return null;e=t}const t=e.data;if(t===zy||t===Py){return e}return null}(oa,ia);if(e)return oa=ib(e),function(e){return e.data===zy}(e)}return ma(e),!1}function ba(e,n){const t=function(e,n,t,o,l){return Zt(l,e),lo(e,t),function(e,n,t){switch(n){case"dialog":$g("cancel",e),$g("close",e);break;case"iframe":case"object":case"embed":$g("load",e);break;case"video":case"audio":for(let n=0;n<Vg.length;n++)$g(Vg[n],e);break;case"source":$g("error",e);break;case"img":case"image":case"link":$g("error",e),$g("load",e);break;case"details":$g("toggle",e);break;case"input":$g("invalid",e),Ro(e,t.value,t.defaultValue,t.checked,t.defaultChecked,t.type,t.name,!0);break;case"option":break;case"select":$g("invalid",e);break;case"textarea":$g("invalid",e),Ao(e,t.value,t.defaultValue,t.children)}const o=t.children;if(("string"==typeof o||"number"==typeof o||"bigint"==typeof o)&&e.textContent!==""+o&&!0!==t.suppressHydrationWarning&&!ay(e.textContent,o))return!1;null!=t.popover&&($g("beforetoggle",e),$g("toggle",e));null!=t.onScroll&&$g("scroll",e);null!=t.onScrollEnd&&$g("scrollend",e);null!=t.onClick&&uy(e);return!0}(e,n,t)}(e.stateNode,e.type,e.memoizedProps,0,e);t||ma(e,!0)}function wa(e){const n=e.stateNode,t=e.memoizedProps;let o=null;const l=ta;if(null!==l)switch(l.tag){case 3:break;case k:case 5:o=l.memoizedProps}const r=function(e,n,t,o){return Zt(t,e),function(e,n,t){if(e.nodeValue!==n&&(null===t||!0!==t.suppressHydrationWarning)&&!ay(e.nodeValue,n))return!1;return!0}(e,n,o)}(n,t,e,o);r||ma(e,!0)}function ka(e){const n=e.memoizedState,t=null!==n?n.dehydrated:null;if(!t)throw new Error("Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue.");!function(e,n){Zt(n,e)}(t,e)}function va(e){const n=e.memoizedState,t=null!==n?n.dehydrated:null;if(!t)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");!function(e,n){Zt(n,e)}(t,e)}function Sa(e){const n=e.memoizedState,t=null!==n?n.dehydrated:null;if(!t)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return function(e){return ub(e)}(t)}function Ea(e){const n=e.memoizedState,t=null!==n?n.dehydrated:null;if(!t)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return function(e){return ub(e)}(t)}function xa(e){for(ta=e.return;ta;)switch(ta.tag){case 5:case S:case c:return void(ia=!1);case k:case 3:return void(ia=!0);default:ta=ta.return}}function Ca(e){if(e!==ta)return!1;if(!la)return xa(e),la=!0,!1;const n=e.tag;if(3!==n&&n!==k&&(5!==n||"form"!==(t=e.type)&&"button"!==t&&!Iy(e.type,e.memoizedProps))){oa&&ma(e)}var t;return xa(e),oa=n===c?Ea(e):n===S?Sa(e):n===k?function(e,n){if($y(e)){const e=ab;return ab=null,e}return n}(e.type,oa):ta?ib(e.stateNode):null,!0}function za(){ta=null,oa=null,la=!1}function Pa(){const e=ra;return null!==e&&(zm(e),ra=null),e}function Ta(){return la}function Na(e){null===ra?ra=[e]:ra.push(e)}const La=Oe(null);let Ra=null,_a=null;function Ma(){Ra=null,_a=null}function Oa(e,n,t){De(La,n._currentValue),n._currentValue=t}function Aa(e,n){const t=La.current;e._currentValue=t,Ae(La)}function Da(e,n,t){let o=e;for(;null!==o;){const e=o.alternate;if(Ct(o.childLanes,n)?null===e||Ct(e.childLanes,n)||(e.childLanes=zt(e.childLanes,n)):(o.childLanes=zt(o.childLanes,n),null!==e&&(e.childLanes=zt(e.childLanes,n))),o===t)break;o=o.return}}function Fa(e,n,t){Ia(e,[n],t,!0)}function Ia(e,n,t,o){let l=e.child;for(null!==l&&(l.return=e);null!==l;){let r;const i=l.dependencies;if(null!==i){r=l.child;let a=i.firstContext;e:for(;null!==a;){const i=a,u=l;for(let l=0;l<n.length;l++){const a=n[l];if(i.context===a){u.lanes=zt(u.lanes,t);const n=u.alternate;null!==n&&(n.lanes=zt(n.lanes,t)),Da(u.return,t,e),o||(r=null);break e}}a=i.next}}else if(l.tag===p){const n=l.return;if(null===n)throw new Error("We just came from a parent so we must have had a parent. This is a bug in React.");n.lanes=zt(n.lanes,t);const o=n.alternate;null!==o&&(o.lanes=zt(o.lanes,t)),Da(n,t,e),r=null}else r=l.child;if(null!==r)r.return=l;else for(r=l;null!==r;){if(r===e){r=null;break}const n=r.sibling;if(null!==n){n.return=r.return,r=n;break}r=r.return}l=r}}function Ua(e,n,t){ja(e,n,t,!1)}function Ha(e,n,t){ja(e,n,t,!0)}function ja(e,n,t,o){let l=null,r=n,i=!1;for(;null!==r;){if(!i)if(r.flags&j)i=!0;else if(r.flags&H)break;if(r.tag===a){const e=r.alternate;if(null===e)throw new Error("Should have a current fiber. This is a bug in React.");const n=e.memoizedProps;if(null!==n){const e=r.type,t=r.pendingProps.value,o=n.value;br(t,o)||(null!==l?l.push(e):l=[e])}}else if(r===He.current){const e=r.alternate;if(null===e)throw new Error("Should have a current fiber. This is a bug in React.");e.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(null!==l?l.push(ew):l=[ew])}r=r.return}null!==l&&Ia(n,l,t,o),n.flags|=H}function Va(e){let n=e.firstContext;
15for(;null!==n;){const e=n.context._currentValue,t=n.memoizedValue;if(!br(e,t))return!0;n=n.next}return!1}function Ba(e,n){Ra=e,_a=null;const t=e.dependencies;null!==t&&(t.firstContext=null)}function Qa(e){return qa(Ra,e)}function Wa(e,n,t){return null===Ra&&Ba(e),qa(e,n)}function qa(e,n){const t=n._currentValue,o={context:n,memoizedValue:t,next:null};if(null===_a){if(null===e)throw new Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");_a=o,e.dependencies={lanes:0,firstContext:o},e.flags|=j}else _a=_a.next=o;return t}const $a="undefined"!=typeof AbortController?AbortController:function(){const e=[],n=this.signal={aborted:!1,addEventListener:(n,t)=>{e.push(t)}};this.abort=()=>{n.aborted=!0,e.forEach((e=>e()))}},Ya=n.unstable_scheduleCallback,Ka=n.unstable_NormalPriority,Xa={$$typeof:he,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ga(){return{controller:new $a,data:new Map,refCount:0}}function Za(e){e.refCount++}function Ja(e){e.refCount--,0===e.refCount&&Ya(Ka,(()=>{e.controller.abort()}))}function eu(e,n){Oa(0,Xa,n)}function nu(e,n){Aa(Xa)}let tu=-0,ou=-0;let lu=null,ru=0,iu=0,au=null;function uu(){if(0==--ru&&null!==lu){if(null!==au){au.status="fulfilled"}const e=lu;lu=null,iu=0,au=null;for(let n=0;n<e.length;n++){(0,e[n])()}}}function su(){return iu}function cu(){return au}const fu=Ne.S;Ne.S=function(e,n){if(Yh=un(),"object"==typeof n&&null!==n&&"function"==typeof n.then){!function(e,n){if(null===lu){const e=lu=[];ru=0,iu=Dg(),au={status:"pending",value:void 0,then(n){e.push(n)}}}ru++,n.then(uu,uu)}(0,n)}null!==fu&&fu(e,n)};const du=Oe(null);function pu(){const e=du.current;if(null!==e)return e;return bm().pooledCache}function hu(e,n,t){De(du,null===n?du.current:n.pool)}function mu(e,n){null!==n&&Ae(du)}function gu(){const e=pu();return null===e?null:{parent:Xa._currentValue,pool:e}}function yu(){const e=pu();return null===e?null:{parent:Xa._currentValue,pool:e}}const bu=new Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),wu=new Error("Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),ku=new Error("Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary."),vu={then(){}};function Su(e){const n=e.status;return"fulfilled"===n||"rejected"===n}function Eu(e,n,t){const o=e,l=o[t];switch(void 0===l?o.push(n):l!==n&&(n.then(qo,qo),n=l),n.status){case"fulfilled":return n.value;case"rejected":{const e=n.reason;throw Tu(e),e}default:if("string"==typeof n.status)n.then(qo,qo);else{const e=bm();if(null!==e&&e.shellSuspendCounter>100)throw new Error("An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.");const t=n;t.status="pending",t.then((e=>{if("pending"===n.status){const t=n;t.status="fulfilled",t.value=e}}),(e=>{if("pending"===n.status){const t=n;t.status="rejected",t.reason=e}}))}switch(n.status){case"fulfilled":return n.value;case"rejected":{const e=n.reason;throw Tu(e),e}}throw zu=n,bu}}function xu(){throw zu=vu,wu}function Cu(e){try{0;const n=e._payload;return(0,e._init)(n)}catch(e){if(null!==e&&"object"==typeof e&&"function"==typeof e.then)throw zu=e,bu;throw e}}let zu=null;function Pu(){if(null===zu)throw new Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");const e=zu;return zu=null,e}function Tu(e){if(e===bu||e===ku)throw new Error("Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.")}let Nu=null,Lu=0;function Ru(e){const n=Lu;return Lu+=1,null===Nu&&(Nu=[]),Eu(Nu,e,n)}function _u(e,n){const t=n.props.ref;e.ref=void 0!==t?t:null}function Mu(e,n){!function(e,n){if(n.$$typeof===ae)throw new Error('A React Element from an older version of React was rendered. This is not supported. It can happen if:\n- Multiple copies of the "react" package is used.\n- A library pre-bundled an old copy of "react" or "react/jsx-runtime".\n- A compiler tries to "inline" JSX instead of using the runtime.');const t=Object.prototype.toString.call(n);throw new Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(n).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}(0,n)}function Ou(e){function n(n,t){if(!e)return;const o=n.deletions;null===o?(n.deletions=[t],n.flags|=C):o.push(t)}
15function t(t,o){if(!e)return null;let l=o;for(;null!==l;)n(t,l),l=l.sibling;return null}function o(e){const n=new Map;let t=e;for(;null!==t;)null!==t.key?n.set(t.key,t):n.set(t.index,t),t=t.sibling;return n}function l(e,n){const t=Pi(e,n);return t.index=0,t.sibling=null,t}function r(n,t,o){if(n.index=o,!e)return n.flags|=V,t;const l=n.alternate;if(null!==l){const e=l.index;return e<t?(n.flags|=67108866,t):e}return n.flags|=67108866,t}function i(n){return e&&null===n.alternate&&(n.flags|=67108866),n}function a(e,n,t,o){if(null===n||6!==n.tag){const n=_i(t,e.mode,o);return n.return=e,n}{const o=l(n,t);return o.return=e,o}}function u(e,n,t,o){const r=t.type;if(r===ce){return c(e,n,t.props.children,o,t.key)}if(null!==n&&(n.elementType===r||"object"==typeof r&&null!==r&&r.$$typeof===we&&Cu(r)===n.type)){const o=l(n,t.props);return _u(o,t),o.return=e,o}const i=Li(t,e.mode,o);return _u(i,t),i.return=e,i}function s(e,n,t,o){if(null===n||4!==n.tag||n.stateNode.containerInfo!==t.containerInfo||n.stateNode.implementation!==t.implementation){const n=Oi(t,e.mode,o);return n.return=e,n}{const o=l(n,t.children||[]);return o.return=e,o}}function c(e,n,t,o,r){if(null===n||7!==n.tag){const n=Ri(t,e.mode,o,r);return n.return=e,n}{const o=l(n,t);return o.return=e,o}}function f(e,n,t){if("string"==typeof n&&""!==n||"number"==typeof n||"bigint"==typeof n){const o=_i(""+n,e.mode,t);return o.return=e,o}if("object"==typeof n&&null!==n){switch(n.$$typeof){case ue:{const o=Li(n,e.mode,t);return _u(o,n),o.return=e,o}case se:{const o=Oi(n,e.mode,t);return o.return=e,o}case we:return f(e,Cu(n),t)}if(Te(n)||Ee(n)){const o=Ri(n,e.mode,t,null);return o.return=e,o}if("function"==typeof n.then){return f(e,Ru(n),t)}if(n.$$typeof===he){return f(e,Wa(e,n),t)}Mu(0,n)}return null}function d(e,n,t,o){const l=null!==n?n.key:null;if("string"==typeof t&&""!==t||"number"==typeof t||"bigint"==typeof t)return null!==l?null:a(e,n,""+t,o);if("object"==typeof t&&null!==t){switch(t.$$typeof){case ue:if(t.key===l){return u(e,n,t,o)}return null;case se:return t.key===l?s(e,n,t,o):null;case we:return d(e,n,Cu(t),o)}if(Te(t)||Ee(t)){if(null!==l)return null;return c(e,n,t,o,null)}if("function"==typeof t.then){return d(e,n,Ru(t),o)}if(t.$$typeof===he){return d(e,n,Wa(e,t),o)}Mu(0,t)}return null}function p(e,n,t,o,l){if("string"==typeof o&&""!==o||"number"==typeof o||"bigint"==typeof o){return a(n,e.get(t)||null,""+o,l)}if("object"==typeof o&&null!==o){switch(o.$$typeof){case ue:return u(n,e.get(null===o.key?t:o.key)||null,o,l);case se:return s(n,e.get(null===o.key?t:o.key)||null,o,l);case we:return p(e,n,t,Cu(o),l)}if(Te(o)||Ee(o)){return c(n,e.get(t)||null,o,l,null)}if("function"==typeof o.then){return p(e,n,t,Ru(o),l)}if(o.$$typeof===he){return p(e,n,t,Wa(n,o),l)}Mu(0,o)}return null}function h(l,i,a,u){const s=Ee(a);if("function"!=typeof s)throw new Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");return function(l,i,a,u){if(null==a)throw new Error("An iterable object provided no iterator.");let s=null,c=null,h=i,m=0,g=0,y=null,b=a.next();for(;null!==h&&!b.done;g++,b=a.next()){h.index>g?(y=h,h=null):y=h.sibling;const t=d(l,h,b.value,u);if(null===t){null===h&&(h=y);break}e&&h&&null===t.alternate&&n(l,h),m=r(t,m,g),null===c?s=t:c.sibling=t,c=t,h=y}if(b.done){if(t(l,h),Ta()){Ki(l,g)}return s}if(null===h){for(;!b.done;g++,b=a.next()){const e=f(l,b.value,u);null!==e&&(m=r(e,m,g),null===c?s=e:c.sibling=e,c=e)}if(Ta()){Ki(l,g)}return s}const w=o(h);for(;!b.done;g++,b=a.next()){const n=p(w,l,g,b.value,u);null!==n&&(e&&null!==n.alternate&&w.delete(null===n.key?g:n.key),m=r(n,m,g),null===c?s=n:c.sibling=n,c=n)}e&&w.forEach((e=>n(l,e)));if(Ta()){Ki(l,g)}return s}(l,i,s.call(a),u)}function m(a,u,s,c){if("object"==typeof s&&null!==s&&s.type===ce&&null===s.key&&!0&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case ue:{const e=i(function(e,o,r,i){const a=r.key;let u=o;for(;null!==u;){if(u.key===a){const n=r.type;if(n===ce){if(7===u.tag){t(e,u.sibling);const n=l(u,r.props.children);return n.return=e,n}}else if(u.elementType===n||"object"==typeof n&&null!==n&&n.$$typeof===we&&Cu(n)===u.type){t(e,u.sibling);const n=l(u,r.props);return _u(n,r),n.return=e,n}t(e,u);break}n(e,u),u=u.sibling}
15if(r.type===ce){const n=Ri(r.props.children,e.mode,i,r.key);return n.return=e,n}{const n=Li(r,e.mode,i);return _u(n,r),n.return=e,n}}(a,u,s,c));return e}case se:return i(function(e,o,r,i){const a=r.key;let u=o;for(;null!==u;){if(u.key===a){if(4===u.tag&&u.stateNode.containerInfo===r.containerInfo&&u.stateNode.implementation===r.implementation){t(e,u.sibling);const n=l(u,r.children||[]);return n.return=e,n}t(e,u);break}n(e,u),u=u.sibling}const s=Oi(r,e.mode,i);return s.return=e,s}(a,u,s,c));case we:return m(a,u,Cu(s),c)}if(Te(s)){const l=function(l,i,a,u){let s=null,c=null,h=i,m=0,g=0,y=null;for(;null!==h&&g<a.length;g++){h.index>g?(y=h,h=null):y=h.sibling;const t=d(l,h,a[g],u);if(null===t){null===h&&(h=y);break}e&&h&&null===t.alternate&&n(l,h),m=r(t,m,g),null===c?s=t:c.sibling=t,c=t,h=y}if(g===a.length)return t(l,h),Ta()&&Ki(l,g),s;if(null===h){for(;g<a.length;g++){const e=f(l,a[g],u);null!==e&&(m=r(e,m,g),null===c?s=e:c.sibling=e,c=e)}return Ta()&&Ki(l,g),s}const b=o(h);for(;g<a.length;g++){const n=p(b,l,g,a[g],u);null!==n&&(e&&null!==n.alternate&&b.delete(null===n.key?g:n.key),m=r(n,m,g),null===c?s=n:c.sibling=n,c=n)}e&&b.forEach((e=>n(l,e))),Ta()&&Ki(l,g);return s}(a,u,s,c);return l}if(Ee(s)){return h(a,u,s,c)}if("function"==typeof s.then){return m(a,u,Ru(s),c)}if(s.$$typeof===he){return m(a,u,Wa(a,s),c)}Mu(0,s)}return"string"==typeof s&&""!==s||"number"==typeof s||"bigint"==typeof s?i(function(e,n,o,r){if(null!==n&&6===n.tag){t(e,n.sibling);const r=l(n,o);return r.return=e,r}t(e,n);const i=_i(o,e.mode,r);return i.return=e,i}(a,u,""+s,c)):t(a,u)}return function(e,n,t,o){try{Lu=0;const l=m(e,n,t,o);return Nu=null,l}catch(n){if(n===bu||n===ku)throw n;const t=function(e,n,t){const o=Ci(29,e,null,n);return o.lanes=t,o}(n,e.mode,o);return t.return=e,t}}}const Au=Ou(!0),Du=Ou(!1);function Fu(e,n){let t=e.child;for(;null!==t;)Ti(t,n),t=t.sibling}const Iu=0,Uu=1,Hu=2,ju=3;let Vu=!1;function Bu(e){const n={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null};e.updateQueue=n}function Qu(e,n){const t=n.updateQueue,o=e.updateQueue;if(t===o){const e={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null};n.updateQueue=e}}function Wu(e){return{lane:e,tag:Iu,payload:null,callback:null,next:null}}function qu(e,n,t){const o=e.updateQueue;if(null===o)return null;const l=o.shared;if((bh&sh)!==uh){const o=l.pending;return null===o?n.next=n:(n.next=o.next,o.next=n),l.pending=n,function(e,n){const t=gi(e);return mi(e,null,n),t}(e,t)}return function(e,n,t,o){return di(e,n,t,o),gi(e)}(e,l,n,t)}function $u(e,n,t){const o=n.updateQueue;if(null===o)return;const l=o.shared;if(bt(t)){let n=l.lanes;n=Tt(n,e.pendingLanes);const o=zt(n,t);l.lanes=o,Rt(e,o)}}function Yu(e,n){let t=e.updateQueue;const o=e.alternate;if(null!==o){const l=o.updateQueue;if(t===l){let o=null,r=null;const i=t.firstBaseUpdate;if(null!==i){let e=i;do{const n={lane:e.lane,tag:e.tag,payload:e.payload,callback:null,next:null};null===r?o=r=n:(r.next=n,r=n),e=e.next}while(null!==e);null===r?o=r=n:(r.next=n,r=n)}else o=r=n;return t={baseState:l.baseState,firstBaseUpdate:o,lastBaseUpdate:r,shared:l.shared,callbacks:l.callbacks},void(e.updateQueue=t)}}const l=t.lastBaseUpdate;null===l?t.firstBaseUpdate=n:l.next=n,t.lastBaseUpdate=n}function Ku(e,n,t,o,l,r){switch(t.tag){case Uu:{const e=t.payload;if("function"==typeof e){return e.call(r,o,l)}return e}case ju:e.flags=-65537&e.flags|E;
15case Iu:{const e=t.payload;let n;return n="function"==typeof e?e.call(r,o,l):e,null==n?o:re({},o,n)}case Hu:return Vu=!0,o}return o}let Xu=!1;function Gu(){if(Xu){const e=cu();if(null!==e)throw e}}function Zu(e,n,t,o){Xu=!1;const l=e.updateQueue;Vu=!1;let r=l.firstBaseUpdate,i=l.lastBaseUpdate,a=l.shared.pending;if(null!==a){l.shared.pending=null;const n=a,t=n.next;n.next=null,null===i?r=t:i.next=t,i=n;const o=e.alternate;if(null!==o){const e=o.updateQueue,l=e.lastBaseUpdate;l!==i&&(null===l?e.firstBaseUpdate=t:l.next=t,e.lastBaseUpdate=n)}}if(null!==r){let i=l.baseState,u=0,s=null,c=null,f=null,d=r;for(;;){const r=Pt(d.lane,Jn),p=r!==d.lane;if(p?!Ct(wm(),r):!Ct(o,r)){const e={lane:r,tag:d.tag,payload:d.payload,callback:d.callback,next:null};null===f?(c=f=e,s=i):f=f.next=e,u=zt(u,r)}else{if(0!==r&&r===su()&&(Xu=!0),null!==f){const e={lane:0,tag:d.tag,payload:d.payload,callback:null,next:null};f=f.next=e}i=Ku(e,0,d,i,n,t);const o=d.callback;if(null!==o){e.flags|=P,p&&(e.flags|=_);const n=l.callbacks;null===n?l.callbacks=[o]:n.push(o)}}if(d=d.next,null===d){if(a=l.shared.pending,null===a)break;{const e=a,n=e.next;e.next=null,d=n,l.lastBaseUpdate=e,l.shared.pending=null}}}null===f&&(s=i),l.baseState=s,l.firstBaseUpdate=c,l.lastBaseUpdate=f,null===r&&(l.shared.lanes=0),$m(u),e.lanes=u,e.memoizedState=i}}function Ju(e,n){if("function"!=typeof e)throw new Error("Invalid argument passed as callback. Expected a function. Instead received: "+e);e.call(n)}function es(){Vu=!1}function ns(){return Vu}function ts(e,n){const t=e.callbacks;if(null!==t){e.callbacks=null;for(let e=0;e<t.length;e++){Ju(t[e],n)}}}const os=Oe(null),ls=Oe(0);function rs(e,n){const t=Fm();De(ls,t),De(os,n),Dm(zt(t,n.baseLanes))}function is(e){De(ls,Fm()),De(os,os.current)}function as(e){Dm(ls.current),Ae(os),Ae(ls)}function us(){return null!==os.current}const ss=Oe(null);let cs=null;function fs(){return cs}function ds(e){const n=e.alternate;if(Cs(e,Es(vs.current)),De(ss,e),null===cs)if(null===n||us())cs=e;else{null!==n.memoizedState&&(cs=e)}}function ps(e){gs(e)}function hs(e){Cs(e,vs.current),De(ss,e),null===cs&&(cs=e)}function ms(e){e.tag===m?(Cs(e,vs.current),De(ss,e),null===cs&&(cs=e)):gs(e)}function gs(e){Cs(e,vs.current),De(ss,ys())}function ys(){return ss.current}function bs(e){Ae(ss),cs===e&&(cs=null),zs()}const ws=1,ks=2,vs=Oe(0);function Ss(e,n){return!!(e&n)}function Es(e){return e&ws}function xs(e,n){return e&ws|n}function Cs(e,n){De(vs,n)}function zs(e){Ae(vs)}function Ps(e){let n=e;for(;null!==n;){if(n.tag===c){const e=n.memoizedState;if(null!==e){const t=e.dehydrated;if(null===t||ob(t)||lb(t))return n}}else if(n.tag!==h||"forwards"!==n.memoizedProps.revealOrder&&"backwards"!==n.memoizedProps.revealOrder&&"unstable_legacy-backwards"!==n.memoizedProps.revealOrder&&"together"!==n.memoizedProps.revealOrder){if(null!==n.child){n.child.return=n,n=n.child;continue}}else{if(!!(n.flags&E))return n}if(n===e)return null;for(;null===n.sibling;){if(null===n.return||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}const Ts=1,Ns=2,Ls=4,Rs=8;let _s=0,Ms=null,Os=null,As=null,Ds=!1,Fs=!1,Is=!1,Us=0,Hs=0,js=null,Vs=0;const Bs=25;function Qs(){throw new Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.")}function Ws(e,n){if(null===n)return!1;for(let t=0;t<n.length&&t<e.length;t++)if(!br(e[t],n[t]))return!1;return!0}function qs(e,n,t,o,l,r){_s=r,Ms=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,Ne.H=null===e||null===e.memoizedState?hf:mf;Is=!1;let i=t(o,l);return Is=!1,Fs&&(i=Ys(n,t,o,l)),$s(e),i}function $s(e,n,t){Ne.H=pf;const o=null!==Os&&null!==Os.next;if(_s=0,Ms=null,Os=null,As=null,Ds=!1,Hs=0,js=null,o)throw new Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");if(null!==e&&!Of){const n=e.dependencies;null!==n&&Va(n)&&pd()}}function Ys(e,n,t,o){Ms=e;let l,r=0;do{if(Fs&&(js=null),Hs=0,Fs=!1,r>=Bs)throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");r+=1,Os=null,As=null,null!=e.updateQueue&&nc(e.updateQueue),Ne.H=gf,l=n(t,o)}while(Fs);return l}function Ks(){const e=Ne.H,n=e.useState()[0];let t;if("function"==typeof n.then){t=tc(n)}else{t=n}const o=e.useState()[0];
15return(null!==Os?Os.memoizedState:null)!==o&&(Ms.flags|=D),t}function Xs(){const e=0!==Us;return Us=0,e}function Gs(e,n,t){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes=Pt(e.lanes,t)}function Zs(e){if(Ds){let n=e.memoizedState;for(;null!==n;){const e=n.queue;null!==e&&(e.pending=null),n=n.next}Ds=!1}_s=0,Ms=null,Os=null,As=null,Fs=!1,Us=0,Hs=0,js=null}function Js(){const e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===As?Ms.memoizedState=As=e:As=As.next=e,As}function ec(){let e,n;if(null===Os){const n=Ms.alternate;e=null!==n?n.memoizedState:null}else e=Os.next;if(n=null===As?Ms.memoizedState:As.next,null!==n)As=n,n=As.next,Os=e;else{if(null===e){throw null===Ms.alternate?new Error("Update hook called on initial render. This is likely a bug in React. Please file an issue."):new Error("Rendered more hooks than during the previous render.")}Os=e;const n={memoizedState:Os.memoizedState,baseState:Os.baseState,baseQueue:Os.baseQueue,queue:Os.queue,next:null};null===As?Ms.memoizedState=As=n:As=As.next=n}return As}function nc(e){e.lastEffect=null,e.events=null,e.stores=null,null!=e.memoCache&&(e.memoCache.index=0)}function tc(e){const n=Hs;Hs+=1,null===js&&(js=[]);const t=Eu(js,e,n),o=Ms;if(null!==(null===As?o.memoizedState:As.next));else{const e=o.alternate;Ne.H=null===e||null===e.memoizedState?hf:mf}return t}function oc(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then){return tc(e)}if(e.$$typeof===he){return Qa(e)}}throw new Error("An unsupported type was passed to use(): "+String(e))}function lc(e){let n=null,t=Ms.updateQueue;if(null!==t&&(n=t.memoCache),null==n){const e=Ms.alternate;if(null!==e){const t=e.updateQueue;if(null!==t){const e=t.memoCache;null!=e&&(n={data:e.data.map((e=>e.slice())),index:0})}}}null==n&&(n={data:[],index:0}),null===t&&(t={lastEffect:null,events:null,stores:null,memoCache:null},Ms.updateQueue=t),t.memoCache=n;let o=n.data[n.index];if(void 0===o){o=n.data[n.index]=new Array(e);for(let n=0;n<e;n++)o[n]=ve}return n.index++,o}function rc(e,n){return"function"==typeof n?n(e):n}function ic(e,n,t){return ac(ec(),Os,e)}function ac(e,n,t){const o=e.queue;if(null===o)throw new Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");o.lastRenderedReducer=t;let l=e.baseQueue;const r=o.pending;if(null!==r){if(null!==l){const e=l.next,n=r.next;l.next=n,r.next=e}n.baseQueue=l=r,o.pending=null}const i=e.baseState;if(null===l)e.memoizedState=i;else{const n=l.next;let r=i,a=null,u=null,s=null,c=n,f=!1;do{const e=Pt(c.lane,Jn);if(e!==c.lane?!Ct(wm(),e):!Ct(_s,e)){const n={lane:e,revertLane:c.revertLane,gesture:c.gesture,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===s?(u=s=n,a=r):s=s.next=n,Ms.lanes=zt(Ms.lanes,e),$m(e)}else{const n=c.revertLane;if(0===n){if(null!==s){const e={lane:0,revertLane:0,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};s=s.next=e}e===su()&&(f=!0)}else{if(Ct(_s,n)){c=c.next,n===su()&&(f=!0);continue}{const e={lane:0,revertLane:c.revertLane,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===s?(u=s=e,a=r):s=s.next=e,Ms.lanes=zt(Ms.lanes,n),$m(n)}}const o=c.action;Is&&t(r,o),r=c.hasEagerState?c.eagerState:t(r,o)}c=c.next}while(null!==c&&c!==n);if(null===s?a=r:s.next=u,!br(r,e.memoizedState)&&(pd(),f)){const e=cu();if(null!==e)throw e}e.memoizedState=r,e.baseState=a,e.baseQueue=s,o.lastRenderedState=r}null===l&&(o.lanes=0);const a=o.dispatch;return[e.memoizedState,a]}function uc(e,n,t){const o=ec(),l=o.queue;if(null===l)throw new Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");l.lastRenderedReducer=e;const r=l.dispatch,i=l.pending;let a=o.memoizedState;if(null!==i){l.pending=null;const n=i.next;let t=n;do{a=e(a,t.action),t=t.next}while(t!==n);br(a,o.memoizedState)||pd(),o.memoizedState=a,null===o.baseQueue&&(o.baseState=a),l.lastRenderedState=a}return[a,r]}function sc(e,n,t){const o=Ms,l=ec();let r;const i=Ta();if(i){if(void 0===t)throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");r=t()}else r=n();const a=(Os||l).memoizedState,u=!br(a,r);u&&(l.memoizedState=r,pd());const s=l.queue;if(Fc(dc.bind(null,o,s,e),[e]),s.getSnapshot!==n||u||null!==As&&As.memoizedState.tag&Ts){o.flags|=R,Rc(Ts|Rs,_c(),fc.bind(null,o,s,r,n
15),null);if(null===bm())throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");i||yt(_s)||cc(o,n,r)}return r}function cc(e,n,t){e.flags|=M;const o={getSnapshot:n,value:t};let l=Ms.updateQueue;if(null===l)l={lastEffect:null,events:null,stores:null,memoCache:null},Ms.updateQueue=l,l.stores=[o];else{const e=l.stores;null===e?l.stores=[o]:e.push(o)}}function fc(e,n,t,o){n.value=t,n.getSnapshot=o,pc(n)&&hc(e)}function dc(e,n,t){return t((()=>{pc(n)&&hc(e)}))}function pc(e){const n=e.getSnapshot,t=e.value;try{const e=n();return!br(t,e)}catch(e){return!0}}function hc(e){const n=hi(e,2);null!==n&&Em(n,e,2)}function mc(e){const n=Js();if("function"==typeof e){const n=e;if(e=n(),Is){wn(!0);try{n()}finally{wn(!1)}}}n.memoizedState=n.baseState=e;const t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rc,lastRenderedState:e};return n.queue=t,n}function gc(e){return ic(rc)}function yc(e){return uc(rc)}function bc(e,n,t,o){e.baseState=t;return ac(e,Os,"function"==typeof o?o:rc)}function wc(e,n,t,o,l){if(cf(e))throw new Error("Cannot update form state while rendering.");const r=n.action;if(null===r)return;const i={payload:l,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then(e){i.listeners.push(e)}};null!==Ne.T?(t(!0),o(i)):(i.isTransition=!1,o(i));const a=n.pending;if(null===a)i.next=n.pending=i,kc(n,i);else{const e=a.next;i.next=e,n.pending=a.next=i}}function kc(e,n){const t=n.action,o=n.payload,l=e.state;if(n.isTransition){const r=Ne.T,i={};Ne.T=i;try{const r=t(l,o),a=Ne.S;null!==a&&a(i,r),vc(e,n,r)}catch(t){Ec(e,n,t)}finally{null!==r&&null!==i.types&&(r.types=i.types),Ne.T=r}}else try{vc(e,n,t(l,o))}catch(t){Ec(e,n,t)}}function vc(e,n,t){if(null!==t&&"object"==typeof t&&"function"==typeof t.then){t.then((t=>{Sc(e,n,t)}),(t=>Ec(e,n,t)))}else{Sc(e,n,t)}}function Sc(e,n,t){n.status="fulfilled",n.value=t,xc(n),e.state=t;const o=e.pending;if(null!==o){const n=o.next;if(n===o)e.pending=null;else{const t=n.next;o.next=t,kc(e,t)}}}function Ec(e,n,t){const o=e.pending;if(e.pending=null,null!==o){const e=o.next;do{n.status="rejected",n.reason=t,xc(n),n=n.next}while(n!==e)}e.action=null}function xc(e){const n=e.listeners;for(let e=0;e<n.length;e++){(0,n[e])()}}function Cc(e,n){return n}function zc(e,n,t){let o=n;if(Ta()){const e=bm().formState;if(null!==e){ya(Ms)&&(o=e[0])}}const l=Js();l.memoizedState=l.baseState=o;const r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cc,lastRenderedState:o};l.queue=r;const i=af.bind(null,Ms,r);r.dispatch=i;const a=mc(!1),u=sf.bind(null,Ms,!1,a.queue),s=Js(),c={state:o,dispatch:null,action:e,pending:null};s.queue=c;const f=wc.bind(null,Ms,c,u,i);return c.dispatch=f,s.memoizedState=e,[o,f,!1]}function Pc(e,n,t){return Tc(ec(),Os,e)}function Tc(e,n,t,o,l){const r=ac(e,n,Cc)[0],i=gc()[0];let a;if("object"==typeof r&&null!==r&&"function"==typeof r.then)try{a=tc(r)}catch(e){throw e===bu?ku:e}else a=r;const u=ec(),s=u.queue,c=s.dispatch;return t!==u.memoizedState&&(Ms.flags|=R,Rc(Ts|Rs,_c(),Nc.bind(null,s,t),null)),[a,c,i]}function Nc(e,n){e.action=n}function Lc(e,n,t){const o=ec();if(null!==Os)return Tc(o,Os,e);ec();const l=o.memoizedState,r=ec(),i=r.queue.dispatch;return r.memoizedState=e,[l,i,!1]}function Rc(e,n,t,o){return function(e){let n=Ms.updateQueue;null===n&&(n={lastEffect:null,events:null,stores:null,memoCache:null},Ms.updateQueue=n);const t=n.lastEffect;if(null===t)n.lastEffect=e.next=e;else{const o=t.next;t.next=e,e.next=o,n.lastEffect=e}return e}({tag:e,create:t,deps:o,inst:n,next:null})}function _c(){return{destroy:void 0}}function Mc(e){return ec().memoizedState}function Oc(e,n,t,o){const l=Js(),r=void 0===o?null:o;Ms.flags|=e,l.memoizedState=Rc(Ts|n,{destroy:void 0},t,r)}function Ac(e,n,t,o){const l=ec(),r=void 0===o?null:o,i=l.memoizedState.inst;if(null!==Os&&null!==r){if(Ws(r,Os.memoizedState.deps))return void(l.memoizedState=Rc(n,i,t,r))}Ms.flags|=e,l.memoizedState=Rc(Ts|n,i,t,r)}function Dc(e,n){Oc(8390656,Rs,e,n)}function Fc(e,n){Ac(R,Rs,e,n)}function Ic(e){const n=ec().memoizedState;return function(e){Ms.flags|=4;let n=Ms.updateQueue;if(null===n)n={lastEffect:null,events:null,stores:null,memoCache:null},Ms.updateQueue=n,n.events=[e];else{const t=n.events;null===t?n.events=[e]:t.push(e)}}({ref:n,nextImpl:e}),function(){if(Am())throw new Error("A function wrapped in useEffectEvent can't be called during rendering.");return n.impl.apply(void 0,arguments)}}function Uc(e,n){return Ac(4,Ns,e,n)}function Hc(e,n){return Ac(4,Ls,e,n)}function jc(e,n){if("function"==typeof n){const t=n,o=e(),l=t(o);return()=>{"function"==typeof l?l():t(null)}}if(null!=n){const t=n,o=e();return t.current=o,()=>{t.current=null}}}function Vc(e,n,t){const o=null!=t?t.concat([e]):null;Ac(4,Ls,jc.bind(null,n,e),o)}function Bc(e,n){}const Qc=Bc;
15function Wc(e,n){const t=ec(),o=void 0===n?null:n,l=t.memoizedState;if(null!==o){if(Ws(o,l[1]))return l[0]}return t.memoizedState=[e,o],e}function qc(e,n){const t=ec(),o=void 0===n?null:n,l=t.memoizedState;if(null!==o){if(Ws(o,l[1]))return l[0]}const r=e();if(Is){wn(!0);try{e()}finally{wn(!1)}}return t.memoizedState=[r,o],r}function $c(){if(!xt(_s,et))return!1;return!xt(wm(),nt)}function Yc(e,n,t){if(void 0===t||$c())return e.memoizedState=n,n;{e.memoizedState=t;const n=Sm();return Ms.lanes=zt(Ms.lanes,n),$m(n),t}}function Kc(e,n,t,o){if(br(t,n))return t;if(us()){const l=Yc(e,t,o);return br(l,n)||pd(),l}if(!(l=_s,!(42&l)||$c())){const e=Sm();return Ms.lanes=zt(Ms.lanes,e),$m(e),n}return pd(),e.memoizedState=t,t;var l}function Xc(e,n,t,o,l,r){const i=Ut();var a,u;It((u=8,0!==(a=i)&&a<u?a:u));const s=Ne.T,c={};Ne.T=c,sf(e,!1,n,t);try{const t=l(),r=Ne.S;if(null!==r&&r(c,t),null!==t&&"object"==typeof t&&"function"==typeof t.then){0;const l=function(e,n){const t=[],o={status:"pending",value:null,reason:null,then(e){t.push(e)}};return e.then((e=>{const l=o;l.status="fulfilled",l.value=n;for(let e=0;e<t.length;e++)(0,t[e])(n)}),(e=>{const n=o;n.status="rejected",n.reason=e;for(let e=0;e<t.length;e++)(0,t[e])(void 0)})),o}(t,o);uf(e,n,l,vm(e))}else uf(e,n,o,vm(e))}catch(t){uf(e,n,{then(){},status:"rejected",reason:t},vm())}finally{It(i),null!==s&&null!==c.types&&(s.types=c.types),Ne.T=s}}const Gc=()=>{};function Zc(e,n,t,o){if(5!==e.tag)throw new Error("Expected the form instance to be a HostComponent. This is a bug in React.");const l=Jc(e).queue;Xc(e,l,n,Jb,null===t?Gc:()=>(ef(e),t(o)))}function Jc(e){const n=e.memoizedState;if(null!==n)return n;const t={memoizedState:Jb,baseState:Jb,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:rc,lastRenderedState:Jb},next:null},o={},l={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:rc,lastRenderedState:o},next:null};t.next=l,e.memoizedState=t;const r=e.alternate;return null!==r&&(r.memoizedState=t),t}function ef(e){let n=Jc(e);null===n.next&&(n=e.alternate.memoizedState);uf(e,n.next.queue,{},vm())}function nf(){return Qa(ew)}function tf(){return ec().memoizedState}function of(){return ec().memoizedState}function lf(e,n,t){let o=e.return;for(;null!==o;){switch(o.tag){case y:case 3:{const e=vm(),n=Wu(e),t=qu(o,n,e);null!==t&&(Em(t,o,e),$u(t,o,e));const l={cache:Ga()};return void(n.payload=l)}}o=o.return}}function rf(e,n,t){const o=vm(),l={lane:o,revertLane:0,gesture:null,action:t,hasEagerState:!1,eagerState:null,next:null};if(cf(e))ff(n,l);else{const t=pi(e,n,l,o);null!==t&&(Em(t,e,o),df(t,n,o))}}function af(e,n,t){uf(e,n,t,vm())}function uf(e,n,t,o){const l={lane:o,revertLane:0,gesture:null,action:t,hasEagerState:!1,eagerState:null,next:null};if(cf(e))ff(n,l);else{const r=e.alternate;if(0===e.lanes&&(null===r||0===r.lanes)){const o=n.lastRenderedReducer;if(null!==o)try{const r=n.lastRenderedState,i=o(r,t);if(l.hasEagerState=!0,l.eagerState=i,br(i,r))return function(e,n,t){di(e,n,t,0),null!==bm()||ci()}(e,n,l),!1}catch(e){}}const i=pi(e,n,l,o);if(null!==i)return Em(i,e,o),df(i,n,o),!0}return!1}function sf(e,n,t,o){const l={lane:2,revertLane:Dg(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(cf(e)){if(n)throw new Error("Cannot update optimistic state while rendering.")}else{const n=pi(e,t,l,2);null!==n&&Em(n,e,2)}}function cf(e){const n=e.alternate;return e===Ms||null!==n&&n===Ms}function ff(e,n){Fs=Ds=!0;const t=e.pending;null===t?n.next=n:(n.next=t.next,t.next=n),e.pending=n}function df(e,n,t){if(bt(t)){let o=n.lanes;o=Tt(o,e.pendingLanes);const l=zt(o,t);n.lanes=l,Rt(e,l)}}const pf={readContext:Qa,use:oc,useCallback:Qs,useContext:Qs,useEffect:Qs,useImperativeHandle:Qs,useLayoutEffect:Qs,useInsertionEffect:Qs,useMemo:Qs,useReducer:Qs,useRef:Qs,useState:Qs,useDebugValue:Qs,useDeferredValue:Qs,useTransition:Qs,useSyncExternalStore:Qs,useId:Qs,useHostTransitionStatus:Qs,useFormState:Qs,useActionState:Qs,useOptimistic:Qs,useMemoCache:Qs,useCacheRefresh:Qs};pf.useEffectEvent=Qs;
15const hf={readContext:Qa,use:oc,useCallback:function(e,n){const t=void 0===n?null:n;return Js().memoizedState=[e,t],e},useContext:Qa,useEffect:Dc,useImperativeHandle:function(e,n,t){const o=null!=t?t.concat([e]):null;Oc(4194308,Ls,jc.bind(null,n,e),o)},useLayoutEffect:function(e,n){return Oc(4194308,Ls,e,n)},useInsertionEffect:function(e,n){Oc(4,Ns,e,n)},useMemo:function(e,n){const t=Js(),o=void 0===n?null:n,l=e();if(Is){wn(!0);try{e()}finally{wn(!1)}}return t.memoizedState=[l,o],l},useReducer:function(e,n,t){const o=Js();let l;if(void 0!==t){if(l=t(n),Is){wn(!0);try{t(n)}finally{wn(!1)}}}else l=n;o.memoizedState=o.baseState=l;const r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l};o.queue=r;const i=r.dispatch=rf.bind(null,Ms,r);return[o.memoizedState,i]},useRef:function(e){const n={current:e};return Js().memoizedState=n,n},useState:function(e){const n=mc(e),t=n.queue,o=af.bind(null,Ms,t);return t.dispatch=o,[n.memoizedState,o]},useDebugValue:Bc,useDeferredValue:function(e,n){return Yc(Js(),e,n)},useTransition:function(){const e=mc(!1),n=Xc.bind(null,Ms,e.queue,!0,!1);return Js().memoizedState=n,[!1,n]},useSyncExternalStore:function(e,n,t){const o=Ms,l=Js();let r;if(Ta()){if(void 0===t)throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");r=t()}else{r=n();if(null===bm())throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");yt(wm())||cc(o,n,r)}l.memoizedState=r;const i={value:r,getSnapshot:n};return l.queue=i,Dc(dc.bind(null,o,i,e),[e]),o.flags|=R,Rc(Ts|Rs,_c(),fc.bind(null,o,i,r,n),null),r},useId:function(){const e=Js(),n=bm().identifierPrefix;let t;if(Ta()){t="_"+n+"R_"+Yi();const e=Us++;e>0&&(t+="H"+e.toString(32)),t+="_"}else{t="_"+n+"r_"+(Vs++).toString(32)+"_"}return e.memoizedState=t,t},useHostTransitionStatus:nf,useFormState:zc,useActionState:zc,useOptimistic:function(e,n){const t=Js();t.memoizedState=t.baseState=e;const o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};t.queue=o;const l=sf.bind(null,Ms,!0,o);return o.dispatch=l,[e,l]},useMemoCache:lc,useCacheRefresh:function(){return Js().memoizedState=lf.bind(null,Ms)},useEffectEvent:function(e){const n=Js(),t={impl:e};return n.memoizedState=t,function(){if(Am())throw new Error("A function wrapped in useEffectEvent can't be called during rendering.");return t.impl.apply(void 0,arguments)}}},mf={readContext:Qa,use:oc,useCallback:Wc,useContext:Qa,useEffect:Fc,useImperativeHandle:Vc,useInsertionEffect:Uc,useLayoutEffect:Hc,useMemo:qc,useReducer:ic,useRef:Mc,useState:gc,useDebugValue:Qc,useDeferredValue:function(e,n){return Kc(ec(),Os.memoizedState,e,n)},useTransition:function(){const e=gc()[0],n=ec().memoizedState;return["boolean"==typeof e?e:tc(e),n]},useSyncExternalStore:sc,useId:tf,useHostTransitionStatus:nf,useFormState:Pc,useActionState:Pc,useOptimistic:function(e,n){return bc(ec(),Os,e,n)},useMemoCache:lc,useCacheRefresh:of};mf.useEffectEvent=Ic;const gf={readContext:Qa,use:oc,useCallback:Wc,useContext:Qa,useEffect:Fc,useImperativeHandle:Vc,useInsertionEffect:Uc,useLayoutEffect:Hc,useMemo:qc,useReducer:uc,useRef:Mc,useState:yc,useDebugValue:Qc,useDeferredValue:function(e,n){const t=ec();return null===Os?Yc(t,e,n):Kc(t,Os.memoizedState,e,n)},useTransition:function(){const e=yc()[0],n=ec().memoizedState;return["boolean"==typeof e?e:tc(e),n]},useSyncExternalStore:sc,useId:tf,useHostTransitionStatus:nf,useFormState:Lc,useActionState:Lc,useOptimistic:function(e,n){const t=ec();return null!==Os?bc(t,0,e,n):(t.baseState=e,[e,t.queue.dispatch])},useMemoCache:lc,useCacheRefresh:of};function yf(e,n,t,o){const l=e.memoizedState;let r=t(o,l);const i=null==r?l:re({},l,r);if(e.memoizedState=i,0===e.lanes){e.updateQueue.baseState=i}}gf.useEffectEvent=Ic;const bf={enqueueSetState(e,n,t){const o=ie(e),l=vm(),r=Wu(l);r.payload=n,null!=t&&(r.callback=t);const i=qu(o,r,l);null!==i&&(Em(i,o,l),$u(i,o,l))},enqueueReplaceState(e,n,t){const o=ie(e),l=vm(),r=Wu(l);r.tag=Uu,r.payload=n,null!=t&&(r.callback=t);const i=qu(o,r,l);null!==i&&(Em(i,o,l),$u(i,o,l))}
15,enqueueForceUpdate(e,n){const t=ie(e),o=vm(),l=Wu(o);l.tag=Hu,null!=n&&(l.callback=n);const r=qu(t,l,o);null!==r&&(Em(r,t,o),$u(r,t,o))}};function wf(e,n,t,o,l,r,i){const a=e.stateNode;if("function"==typeof a.shouldComponentUpdate){return a.shouldComponentUpdate(o,r,i)}return!n.prototype||!n.prototype.isPureReactComponent||(!wr(t,o)||!wr(l,r))}function kf(e,n,t,o){const l=n.state;"function"==typeof n.componentWillReceiveProps&&n.componentWillReceiveProps(t,o),"function"==typeof n.UNSAFE_componentWillReceiveProps&&n.UNSAFE_componentWillReceiveProps(t,o),n.state!==l&&bf.enqueueReplaceState(n,n.state,null)}function vf(e,n,t,o){const l=e.stateNode;l.props=t,l.state=e.memoizedState,l.refs={},Bu(e);const r=n.contextType;l.context="object"==typeof r&&null!==r?Qa(r):yi,l.state=e.memoizedState;const i=n.getDerivedStateFromProps;"function"==typeof i&&(yf(e,0,i,t),l.state=e.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof l.getSnapshotBeforeUpdate||"function"!=typeof l.UNSAFE_componentWillMount&&"function"!=typeof l.componentWillMount||(!function(e,n){const t=n.state;"function"==typeof n.componentWillMount&&n.componentWillMount(),"function"==typeof n.UNSAFE_componentWillMount&&n.UNSAFE_componentWillMount(),t!==n.state&&bf.enqueueReplaceState(n,n.state,null)}(0,l),Zu(e,t,l,o),Gu(),l.state=e.memoizedState),"function"==typeof l.componentDidMount&&(e.flags|=4194308)}function Sf(e,n){let t=n;if("ref"in n){t={};for(const e in n)"ref"!==e&&(t[e]=n[e])}const o=e.defaultProps;if(o){t===n&&(t=re({},t));for(const e in o)void 0===t[e]&&(t[e]=o[e])}return t}function Ef(e,n){li(e)}function xf(e,n){console.error(e)}function Cf(e,n){li(e)}function zf(e,n){try{0;const t=n.value;0;(0,e.onUncaughtError)(t,{componentStack:n.stack})}catch(e){setTimeout((()=>{throw e}))}}function Pf(e,n,t){try{0;const o=t.value;(0,e.onCaughtError)(o,{componentStack:t.stack,errorBoundary:1===n.tag?n.stateNode:null})}catch(e){setTimeout((()=>{throw e}))}}function Tf(e,n,t){const o=Wu(t);return o.tag=ju,o.payload={element:null},o.callback=()=>{zf(e,n)},o}function Nf(e){const n=Wu(e);return n.tag=ju,n}function Lf(e,n,t,o){const l=t.type.getDerivedStateFromError;if("function"==typeof l){const r=o.value;e.payload=()=>l(r),e.callback=()=>{Pf(n,t,o)}}const r=t.stateNode;null!==r&&"function"==typeof r.componentDidCatch&&(e.callback=function(){var e;Pf(n,t,o),"function"!=typeof l&&(e=this,null===nm?nm=new Set([e]):nm.add(e));{const e=o.value,n=o.stack;this.componentDidCatch(e,{componentStack:null!==n?n:""})}})}function Rf(e,n,t,o,l){return e.flags|=I,e.lanes=l,e}function _f(e,n,t,o,l){if(t.flags|=F,null!==o&&"object"==typeof o&&"function"==typeof o.then){const n=o;!function(e,n){const t=e.alternate;null!==t&&Ha(t,e,n)}(t,l);const r=ys();if(null!==r){switch(r.tag){case S:case c:if(null===fs())Ym();else{null===r.alternate&&Ih===fh&&(Ih=hh)}r.flags&=-257,Rf(r,0,0,0,l);if(n===vu)r.flags|=O;else{const t=r.updateQueue;null===t?r.updateQueue=new Set([n]):t.add(n),gg(e,n,l)}return!1;case m:r.flags|=I;if(n===vu)r.flags|=O;else{const t=r.updateQueue;if(null===t){const e={transitions:null,markerInstances:null,retryQueue:new Set([n])};r.updateQueue=e}else{const e=t.retryQueue;null===e?t.retryQueue=new Set([n]):e.add(n)}gg(e,n,l)}return!1}throw new Error("Unexpected Suspense handler tag ("+r.tag+"). This is a bug in React.")}return gg(e,n,l),Ym(),!1}if(Ta()){const n=ys();if(null!==n){if(n.flags&I||(n.flags|=T),Rf(n,0,0,0,l),o!==ha){Na(Fi(new Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:o}),t))}return!1}{if(o!==ha){Na(Fi(new Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:o}),t))}const n=e.current.alternate;n.flags|=I;const r=vt(l);n.lanes=zt(n.lanes,r);const i=Fi(o,t);return Yu(n,Tf(n.stateNode,i,r)),Km(),!1}}const r=new Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:o});var i;if(i=Fi(r,t),null===Qh?Qh=[i]:Qh.push(i),Km(),null===n)return!0;const a=Fi(o,t);let u=n;do{switch(u.tag){case 3:{u.flags|=I;const e=vt(l);u.lanes=zt(u.lanes,e);return Yu(u,Tf(u.stateNode,a,e)),!1}case 1:const n=u.type,t=u.stateNode;if(!(u.flags&E||"function"!=typeof n.getDerivedStateFromError&&(null===t||"function"!=typeof t.componentDidCatch||pg(t)))){u.flags|=I;const n=vt(l);u.lanes=zt(u.lanes,n);const t=Nf(n);return Lf(t,e,u,a),Yu(u,t),!1}}u=u.return}while(null!==u);return!1}const Mf=new Error("This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue.");let Of=!1;function Af(e,n,t,o){n.child=null===e?Du(n,null,t,o):Au(n,e.child,t,o)}function Df(e,n,t,o,l){const r=t.render,i=n.ref;let a;if("ref"in o){a={};for(const e in o)"ref"!==e&&(a[e]=o[e])}else a=o;Ba(n);const u=qs(e,n,r,a,i,l),s=Xs();return null===e||Of?(Ta()&&s&&Gi(n),n.flags|=1,Af(e,n,u,l),n.child):(Gs(e,n,l),hd(e,n,l))}function Ff(e,n,t,o,l){if(null===e){const r=t.type;if(function(e){return"function"==typeof e&&!zi(e)&&void 0===e.defaultProps}(r)&&null===t.compare){let t=r;return n.tag=d,n.type=t,If(e,n,t,o,l)}const i=Ni(t.type,null,o,0,n.mode,l);return i.ref=n.ref,i.return=n,n.child=i,i}const r=e.child;if(!md(e,l)){const i=r.memoizedProps;let a=t.compare;if(a=null!==a?a:wr,a(i,o)&&e.ref===n.ref)return hd(e,n,l)}n.flags|=1;const i=Pi(r,o);return i.ref=n.ref,i.return=n,n.child=i,i}function If(e,n,t,o,l){if(null!==e){const t=e.memoizedProps;if(wr(t,o)&&e.ref===n.ref){if(Of=!1,n.pendingProps=o=t,!md(e,l))return n.lanes=e.lanes,hd(e,n,l);e.flags&U&&(Of=!0)}}return $f(e,n,t,o,l)}function Uf(e,n,t,o){const l=o.children,r=null!==e?e.memoizedState:null;if(null===e&&null===n.stateNode){const e={_visibility:ri,_pendingMarkers:null,_retryCache:null,_transitions:null};n.stateNode=e}if("hidden"===o.mode){if(!!(n.flags&E)){const o=null!==r?zt(r.baseLanes,t):t;let l;if(null!==e){let t=n.child=e.child,r=0;for(;null!==t;)r=zt(zt(r,t.lanes),t.childLanes),t=t.sibling;l=Pt(r,o)}else l=0,n.child=null;return jf(e,n,o,t,l)}if(!xt(t,Jn)){const o=n.lanes=Jn;return jf(e,n,null!==r?zt(r.baseLanes,t):t,t,o)}{const t={baseLanes:0,cachePool:null};if(n.memoizedState=t,null!==e){hu(0,null!==r?r.cachePool:null)}null!==r?rs(0,r):is(),ms(n)}}else if(null!==r){let e=null;e=r.cachePool,hu(0,e),rs(0,r),gs(n),n.memoizedState=null}else null!==e&&hu(0,null),is(),gs(n);return Af(e,n,l,t),n.child}function Hf(e,n){if((null===e||e.tag!==m)&&null===n.stateNode){const e={_visibility:ri,_pendingMarkers:null,_retryCache:null,_transitions:null};n.stateNode=e}return n.sibling}function jf(e,n,t,o,l){const r={baseLanes:t,cachePool:yu()};return n.memoizedState=r,null!==e&&hu(0,null),is(),ms(n),null!==e&&Ha(e,n,o),n.childLanes=l,null}function Vf(e,n,t){const o=n.children,l=ad({mode:n.mode,children:o},e.mode);return l.ref=e.ref,e.child=l,l.return=e,l}function Bf(e,n,t){Au(n,e.child,null,t);const o=Vf(n,n.pendingProps);return o.flags|=2,bs(n),n.memoizedState=null,o}function Qf(e,n,t){const o=n.pendingProps,l=!!(n.flags&E);if(n.flags&=-129,null===e){if(Ta()){if("hidden"===o.mode){const e=Vf(n,o);return n.lanes=Jn,Hf(null,e)}return hs(n),function(e){const n=oa?da(e,oa):null;if(null===n)throw ma(e)}(n),function(e){return e.lanes=Jn,null}(n)}return Vf(n,o)}{const r=e.memoizedState;if(null!==r){return function(e,n,t,o,l,r,i){if(hs(n),t){if(n.flags&T)return n.flags&=-257,Bf(e,n,i);if(null!==n.memoizedState)return n.child=e.child,n.flags|=E,null;throw new Error("Client rendering an Activity suspended it again. This is a bug in React.")}{Of||Ua(e,n,i);const t=xt(i,e.childLanes);if(Of||t){const t=bm();if(null!==t){const n=_t(t,i);if(0!==n&&n!==r.retryLane)throw r.retryLane=n,hi(e,n),Em(t,e,n),Mf}return Ym(),Bf(e,n,i)}{ua(n,l,r.treeContext);const e=Vf(n,o);return e.flags|=x,e}}}(e,n,l,o,r.dehydrated,r,t)}const i=e.child,a=o.children,u=ud(i,{mode:o.mode,children:a});return u.ref=n.ref,n.child=u,u.return=n,u}}function Wf(e,n,t){Ba(n);const o=Qa(Xa);if(null===e){const e=function(e){const n=pu();if(null!==n)return n;const t=bm(),o=Ga();return t.pooledCache=o,Za(o),null!==o&&(t.pooledCacheLanes|=e),o}(t),l={parent:o,cache:e};n.memoizedState=l,Bu(n),eu(0,e)}
15else{xt(e.lanes,t)&&(Qu(e,n),Zu(n,null,null,t),Gu());const l=e.memoizedState,r=n.memoizedState;if(l.parent!==o){const e={parent:o,cache:o};if(n.memoizedState=e,0===n.lanes){const t=n.updateQueue;n.memoizedState=t.baseState=e}eu(0,o)}else{const e=r.cache;eu(0,e),e!==l.cache&&Fa(n,Xa,t)}}return Af(e,n,n.pendingProps.children,t),n.child}function qf(e,n){const t=n.ref;if(null===t)null!==e&&null!==e.ref&&(n.flags|=4194816);else{if("function"!=typeof t&&"object"!=typeof t)throw new Error("Expected ref to be a function, an object returned by React.createRef(), or undefined/null.");null!==e&&e.ref===t||(n.flags|=4194816)}}function $f(e,n,t,o,l){let r,i;return Ba(n),r=qs(e,n,t,o,undefined,l),i=Xs(),null===e||Of?(Ta()&&i&&Gi(n),n.flags|=1,Af(e,n,r,l),n.child):(Gs(e,n,l),hd(e,n,l))}function Yf(e,n,t,o,l,r){Ba(n);const i=function(e,n,t,o,l){n.updateQueue=null;const r=Ys(n,t,o,l);return $s(e),r}(e,n,o,t,l),a=Xs();return null===e||Of?(Ta()&&a&&Gi(n),n.flags|=1,Af(e,n,i,r),n.child):(Gs(e,n,r),hd(e,n,r))}function Kf(e,n,t,o,l){let r;r=!1,Ba(n);let i;null===n.stateNode?(!function(e,n,t){let o=yi;const l=n.contextType;"object"==typeof l&&null!==l&&(o=Qa(l));let r=new n(t,o);var i;e.memoizedState=null!==r.state&&void 0!==r.state?r.state:null,r.updater=bf,e.stateNode=r,i=e,r._reactInternals=i}(n,t,o),vf(n,t,o,l),i=!0):i=null===e?function(e,n,t,o){const l=e.stateNode,r=e.memoizedProps,i=Sf(n,r);l.props=i;const a=l.context,u=n.contextType;let s=yi;"object"==typeof u&&null!==u&&(s=Qa(u));const c=n.getDerivedStateFromProps,f="function"==typeof c||"function"==typeof l.getSnapshotBeforeUpdate,d=e.pendingProps!==r;f||"function"!=typeof l.UNSAFE_componentWillReceiveProps&&"function"!=typeof l.componentWillReceiveProps||(d||a!==s)&&kf(0,l,t,s),es();const p=e.memoizedState;let h=l.state=p;if(Zu(e,t,l,o),Gu(),h=e.memoizedState,!d&&p===h&&!ns())return"function"==typeof l.componentDidMount&&(e.flags|=4194308),!1;"function"==typeof c&&(yf(e,0,c,t),h=e.memoizedState);const m=ns()||wf(e,n,i,t,p,h,s);return m?(f||"function"!=typeof l.UNSAFE_componentWillMount&&"function"!=typeof l.componentWillMount||("function"==typeof l.componentWillMount&&l.componentWillMount(),"function"==typeof l.UNSAFE_componentWillMount&&l.UNSAFE_componentWillMount()),"function"==typeof l.componentDidMount&&(e.flags|=4194308)):("function"==typeof l.componentDidMount&&(e.flags|=4194308),e.memoizedProps=t,e.memoizedState=h),l.props=t,l.state=h,l.context=s,m}(n,t,o,l):function(e,n,t,o,l){const r=n.stateNode;Qu(e,n);const i=n.memoizedProps,a=Sf(t,i);r.props=a;const u=n.pendingProps,s=r.context,c=t.contextType;let f=yi;"object"==typeof c&&null!==c&&(f=Qa(c));const d=t.getDerivedStateFromProps,p="function"==typeof d||"function"==typeof r.getSnapshotBeforeUpdate;p||"function"!=typeof r.UNSAFE_componentWillReceiveProps&&"function"!=typeof r.componentWillReceiveProps||i===u&&s===f||kf(0,r,o,f),es();const h=n.memoizedState;let m=r.state=h;if(Zu(n,o,r,l),Gu(),m=n.memoizedState,!(i!==u||h!==m||ns()||null!==e&&null!==e.dependencies&&Va(e.dependencies)))return"function"==typeof r.componentDidUpdate&&(i===e.memoizedProps&&h===e.memoizedState||(n.flags|=4)),"function"==typeof r.getSnapshotBeforeUpdate&&(i===e.memoizedProps&&h===e.memoizedState||(n.flags|=L)),!1;"function"==typeof d&&(yf(n,0,d,o),m=n.memoizedState);const g=ns()||wf(n,t,a,o,h,m,f)||null!==e&&null!==e.dependencies&&Va(e.dependencies);return g?(p||"function"!=typeof r.UNSAFE_componentWillUpdate&&"function"!=typeof r.componentWillUpdate||("function"==typeof r.componentWillUpdate&&r.componentWillUpdate(o,m,f),"function"==typeof r.UNSAFE_componentWillUpdate&&r.UNSAFE_componentWillUpdate(o,m,f)),"function"==typeof r.componentDidUpdate&&(n.flags|=4),"function"==typeof r.getSnapshotBeforeUpdate&&(n.flags|=L)):("function"==typeof r.componentDidUpdate&&(i===e.memoizedProps&&h===e.memoizedState||(n.flags|=4)),"function"==typeof r.getSnapshotBeforeUpdate&&(i===e.memoizedProps&&h===e.memoizedState||(n.flags|=L)),n.memoizedProps=o,n.memoizedState=m),r.props=o,r.state=m,r.context=f,g}(e,n,t,o,l);const a=function(e,n,t,o,l,r){qf(e,n);const i=!!(n.flags&E);if(!o&&!i)return hd(e,n,r);const a=n.stateNode;let u;u=i&&"function"!=typeof t.getDerivedStateFromError?null:a.render();n.flags|=1,null!==e&&i?function(e,n,t,o){n.child=Au(n,e.child,null,o),n.child=Au(n,null,t,o)}(e,n,u,r):Af(e,n,u,r);return n.memoizedState=a.state,n.child}(e,n,t,i,0,l);return a}function Xf(e){Ve(e,e.stateNode.containerInfo)}function Gf(e,n,t,o){return za(),n.flags|=T,Af(e,n,t,o),n.child}function Zf(e,n,t){null===e&&function(e){if(!la)return;oa&&ca(e,oa)||ma(e)}(n),We(n);const o=n.type,l=n.pendingProps,r=null!==e?e.memoizedProps:null;let i=l.children;Iy(o,l)?i=null:null!==r&&Iy(o,r)&&(n.flags|=z);if(null!==n.memoizedState){const o=function(e,n,t){return qs(e,n,Ks,null,
15null,t)}(e,n,t);ew._currentValue=o}return qf(e,n),Af(e,n,i,t),n.child}function Jf(e,n,t){if(qf(e,n),null===e){const e=zb(n.type,null,n.pendingProps,null);e?n.memoizedState=e:Ta()||(n.stateNode=function(e,n,t,o){const l=Ay(t).createElement(e);return Zt(o,l),lo(l,n),py(l,e,n),ao(l),l}(n.type,n.pendingProps,je(),n))}else n.memoizedState=zb(n.type,e.memoizedProps,n.pendingProps,e.memoizedState);return null}function ed(e,n){return null===e&&function(e){if(!la)return;oa&&fa(e,oa)||ma(e)}(n),null}function nd(e,n,t,o){const l=n.pendingProps;let r=Cu(t);if(n.type=r,"function"==typeof r){if(zi(r)){const e=Sf(r,l);return n.tag=1,Kf(null,n,r,e,o)}return n.tag=0,$f(null,n,r,l,o)}if(null!=r){const e=r.$$typeof;if(e===me)return n.tag=u,Df(null,n,r,l,o);if(e===be)return n.tag=f,Ff(null,n,r,l,o)}const i=ze(r)||r;throw new Error("Element type is invalid. Received a promise that resolves to: "+i+". Lazy element type must resolve to a class or function.")}const td={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function od(e){return{baseLanes:e,cachePool:gu()}}function ld(e,n,t){let o=null!==e?Pt(e.childLanes,t):0;return n&&(o=zt(o,Vh)),o}function rd(e,n,t){const o=n.pendingProps;let l=!1;const r=!!(n.flags&E);(r||function(e){if(null!==e&&null===e.memoizedState)return!1;return Ss(vs.current,ks)}(e))&&(l=!0,n.flags&=-129);const i=!!(32&n.flags);if(n.flags&=-33,null===e){if(Ta()){l?ds(n):ps(n);return function(e,n){lb(n)?e.lanes=xn:e.lanes=Jn;return null}(n,function(e){const n=oa?pa(e,oa):null;if(null===n)throw ma(e);return n}(n))}const r=o.children,a=o.fallback;if(l){ps(n),function(e,n,t,o){const l=e.mode;let r,i;r=ad({mode:"hidden",children:n},l),i=Ri(t,l,o,null),r.return=e,i.return=e,r.sibling=i,e.child=r}(n,r,a,t);const o=n.child;return o.memoizedState=od(t),o.childLanes=ld(e,i,t),n.memoizedState=td,Hf(null,o)}return ds(n),id(n,r)}{const a=e.memoizedState;if(null!==a){const l=a.dehydrated;if(null!==l)return function(e,n,t,o,l,r,i,a){if(t){if(n.flags&T)return ds(n),n.flags&=-257,sd(e,n,a);if(null!==n.memoizedState)return ps(n),n.child=e.child,n.flags|=E,null;{ps(n);!function(e,n,t,o,l){const r=n.mode,i=ad({mode:"visible",children:t},r),a=Ri(o,r,l,null);a.flags|=2,i.return=n,a.return=n,i.sibling=a,n.child=i,Au(n,e.child,null,l)}(e,n,l.children,l.fallback,a);const t=n.child;return t.memoizedState=od(a),t.childLanes=ld(e,o,a),n.memoizedState=td,Hf(null,t)}}{if(ds(n),lb(r)){let t,o=null;var u=function(e){const n=e.nextSibling&&e.nextSibling.dataset;let t;n&&(t=n.dgst);return{digest:t}}(r);t=u.digest;{let e;e=new Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),e.stack="",e.digest=t;Na(function(e,n){const t={value:e,source:null,stack:n};return"string"==typeof n&&Di.set(e,t),t}(e,o))}return sd(e,n,a)}Of||Ua(e,n,a);const t=xt(a,e.childLanes);if(Of||t){const t=bm();if(null!==t){const n=_t(t,a);if(0!==n&&n!==i.retryLane)throw i.retryLane=n,hi(e,n),Em(t,e,n),Mf}return ob(r)||Ym(),sd(e,n,a)}if(ob(r))return n.flags|=192,n.child=e.child,null;{sa(n,r,i.treeContext);const e=id(n,l.children);return e.flags|=x,e}}}(e,n,r,i,o,l,a,t)}if(l){ps(n);const l=o.fallback;!function(e,n,t,o,l){const r=n.mode,i=e.child,a=i.sibling;let u,s;u=ud(i,{mode:"hidden",children:t}),u.subtreeFlags=i.subtreeFlags&G,null!==a?s=Pi(a,o):(s=Ri(o,r,l,null),s.flags|=2);s.return=n,u.return=n,u.sibling=s,n.child=u,Hf(null,u)}(e,n,o.children,l,t);const r=n.child,a=e.child.memoizedState;return r.memoizedState=null===a?od(t):function(e,n){let t=null;const o=e.cachePool;if(null!==o){const e=Xa._currentValue;t=o.parent!==e?{parent:e,pool:e}:o}else t=gu();return{baseLanes:zt(e.baseLanes,n),cachePool:t}}(a,t),r.childLanes=ld(e,i,t),n.memoizedState=td,Hf(e.child,r)}{ds(n);const t=function(e,n,t){const o=e.child,l=o.sibling,r=ud(o,{mode:"visible",children:t});if(r.return=n,r.sibling=null,null!==l){const e=n.deletions;null===e?(n.deletions=[l],n.flags|=C):e.push(l)}return n.child=r,r}(e,n,o.children);return n.memoizedState=null,t}}}function id(e,n,t){const o=ad({mode:"visible",children:n},e.mode);return o.return=e,e.child=o,o}function ad(e,n,t){return function(e,n,t,o){const l=Ci(m,e,o,n);return l.lanes=t,l}(e,n,0,null)}function ud(e,n){return Pi(e,n)}function sd(e,n,t){Au(n,e.child,null,t);const o=id(n,n.pendingProps.children);return o.flags|=2,n.memoizedState=null,o}function cd(e,n,t){e.lanes=zt(e.lanes,n);const o=e.alternate;null!==o&&(o.lanes=zt(o.lanes,n)),Da(e.return,n,t)}function fd(e,n,t,o,l,r){const i=e.memoizedState;null===i?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:t,tailMode:l,treeForkCount:r}:(i.isBackwards=n,i.rendering=null,i.renderingStartTime=0,i.last=o,i.tail=t,i.tailMode=l,i.treeForkCount=r)}function dd(e,n,t){const o=n.pendingProps,l=o.revealOrder,r=o.tail,i=o.children;let a=vs.current;const u=Ss(a,ks);u?(a=xs(a,ks),n.flags|=E):a=Es(a),Cs(0,a),Af(e,n,i,t);const s=Ta()?$i():0;if(!u){null!==e&&!!(e.flags&E)&&function(e,n,t){let o=n;for(;null!==o;){if(o.tag===c)null!==o.memoizedState&&cd(o,t,e);else if(o.tag===h)cd(o,t,e);else if(null!==o.child){o.child.return=o,o=o.child;continue}if(o===e)return;for(;null===o.sibling;){if(null===o.return||o.return===e)return;o=o.return}o.sibling.return=o.return,o=o.sibling}}(n,n.child,t)}switch(l){case"forwards":{const e=function(e){let n=e,t=null;for(;null!==n;){const e=n.alternate;null!==e&&null===Ps(e)&&(t=n),n=n.sibling}return t}(n.child);let t;null===e?(t=n.child,n.child=null):(t=e.sibling,e.sibling=null),fd(n,!1,t,e,r,s);break}case"backwards":case"unstable_legacy-backwards":{let e=null,t=n.child;for(n.child=null;null!==t;){const o=t.alternate;if(null!==o&&null===Ps(o)){n.child=t;break}const l=t.sibling;t.sibling=e,e=t,t=l}fd(n,!0,e,null,r,s);break}case"together":fd(n,!1,null,null,void 0,s);break;default:n.memoizedState=null}return n.child}function pd(){Of=!0}function hd(e,n,t){if(null!==e&&(n.dependencies=e.dependencies),$m(n.lanes),!xt(t,n.childLanes)){if(null===e)return null;if(Ua(e,n,t),!xt(t,n.childLanes))return null}return function(e,n){if(null!==e&&n.child!==e.child)throw new Error("Resuming work not yet implemented.");
15if(null===n.child)return;let t=n.child,o=Pi(t,t.pendingProps);for(n.child=o,o.return=n;null!==t.sibling;)t=t.sibling,o=o.sibling=Pi(t,t.pendingProps),o.return=n;o.sibling=null}(e,n),n.child}function md(e,n){if(xt(e.lanes,n))return!0;const t=e.dependencies;return!(null===t||!Va(t))}function gd(e,n,t){if(null!==e){if(e.memoizedProps!==n.pendingProps)Of=!0;else{if(!(md(e,t)||n.flags&E))return Of=!1,function(e,n,t){switch(n.tag){case 3:Xf(n),eu(0,e.memoizedState.cache),za();break;case k:case 5:We(n);break;case 1:break;case 4:Ve(n,n.stateNode.containerInfo);break;case a:{const e=n.memoizedProps.value;Oa(0,n.type,e);break}case s:break;case S:if(null!==n.memoizedState)return n.flags|=E,hs(n),null;break;case c:{const o=n.memoizedState;if(null!==o){if(null!==o.dehydrated)return ds(n),n.flags|=E,null;if(xt(t,n.child.childLanes))return rd(e,n,t);{ds(n);const o=hd(e,n,t);return null!==o?o.sibling:null}}ds(n);break}case h:{const o=!!(e.flags&E);let l=xt(t,n.childLanes);if(l||(Ua(e,n,t),l=xt(t,n.childLanes)),o){if(l)return dd(e,n,t);n.flags|=E}const r=n.memoizedState;if(null!==r&&(r.rendering=null,r.tail=null,r.lastEffect=null),Cs(0,vs.current),l)break;return null}case m:return n.lanes=0,Uf(e,n,t,n.pendingProps);case y:eu(0,e.memoizedState.cache)}return hd(e,n,t)}(e,n,t);Of=!!(e.flags&U)}}else if(Of=!1,Ta()&&function(e){return!!(e.flags&V)}(n)){const e=n.index;Xi(n,$i(),e)}switch(n.lanes=0,n.tag){case 16:return nd(0,n,n.elementType,t);case 0:return $f(e,n,n.type,n.pendingProps,t);case 1:{const o=n.type;return Kf(e,n,o,Sf(o,n.pendingProps),t)}case 3:return function(e,n,t){if(Xf(n),null===e)throw new Error("Should have a current fiber. This is a bug in React.");const o=n.pendingProps,l=n.memoizedState,r=l.element;Qu(e,n),Zu(n,o,null,t);const i=n.memoizedState,a=i.cache;eu(0,a),a!==l.cache&&Fa(n,Xa,t),Gu();const u=i.element;if(l.isDehydrated){const o={element:u,isDehydrated:!1,cache:i.cache};if(n.updateQueue.baseState=o,n.memoizedState=o,n.flags&T)return Gf(e,n,u,t);if(u!==r)return Na(Fi(new Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),n)),Gf(e,n,u,t);{aa(n);const e=Du(n,null,u,t);n.child=e;let o=e;for(;o;)o.flags=-3&o.flags|x,o=o.sibling}}else{if(za(),u===r)return hd(e,n,t);Af(e,n,u,t)}return n.child}(e,n,t);case w:return Jf(e,n);case k:return function(e,n,t){return We(n),null===e&&ga(n),Af(e,n,n.pendingProps.children,t),qf(e,n),null===e&&(n.flags|=B),n.child}(e,n,t);case 5:return Zf(e,n,t);case 6:return ed(e,n);case c:return rd(e,n,t);case 4:return function(e,n,t){Ve(n,n.stateNode.containerInfo);const o=n.pendingProps;return null===e?n.child=Au(n,null,o,t):Af(e,n,o,t),n.child}(e,n,t);case u:return Df(e,n,n.type,n.pendingProps,t);case 7:return function(e,n,t){return Af(e,n,n.pendingProps,t),n.child}(e,n,t);case 8:case s:return function(e,n,t){return Af(e,n,n.pendingProps.children,t),n.child}(e,n,t);case a:return function(e,n,t){const o=n.type,l=n.pendingProps;return Oa(0,o,l.value),Af(e,n,l.children,t),n.child}(e,n,t);case 9:return function(e,n,t){const o=n.type._context,l=n.pendingProps.children;let r;return Ba(n),r=l(Qa(o)),n.flags|=1,Af(e,n,r,t),n.child}(e,n,t);case f:return Ff(e,n,n.type,n.pendingProps,t);case d:return If(e,n,n.type,n.pendingProps,t);case 17:case 28:break;case h:return dd(e,n,t);case 21:break;case S:return Qf(e,n,t);case m:return Uf(e,n,t,n.pendingProps);case g:break;case y:return Wf(e,n,t);case b:case v:break;case 29:throw n.pendingProps}throw new Error("Unknown unit of work tag ("+n.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function yd(e){e.flags|=4}function bd(e,n,t,o,l){const r=(e.mode&Ei)!==bi&&(null===t?jb():function(e,n,t){return jb()&&(t.src!==n.src||t.srcSet!==n.srcSet)}(0,t,o));var i;if(r){if(e.flags|=Q,(335544128&(i=l))===i){Vb(e.stateNode)||Vm()?e.flags|=A:xu()}}else e.flags&=-16777217}function wd(e,n,t,o,l){if(!function(e){return"stylesheet"===e.type&&(e.state.loading&gb)===db}(n))return void(e.flags&=-16777217);e.flags|=Q;Bb(n)||(Vm()?e.flags|=A:xu())}function kd(e,n){if(null!==n&&(e.flags|=4),e.flags&O){const n=e.tag!==m?wt():J
15n;e.lanes=zt(e.lanes,n),Bh=zt(Bh,n)}}function vd(e,n){if(!Ta())switch(e.tailMode){case"hidden":{let n=e.tail,t=null;for(;null!==n;)null!==n.alternate&&(t=n),n=n.sibling;null===t?e.tail=null:t.sibling=null;break}case"collapsed":{let t=e.tail,o=null;for(;null!==t;)null!==t.alternate&&(o=t),t=t.sibling;null===o?n||null===e.tail?e.tail=null:e.tail.sibling=null:o.sibling=null;break}}}function Sd(e){const n=null!==e.alternate&&e.alternate.child===e.child;let t=0,o=0;if(n){{let n=e.child;for(;null!==n;)t=zt(t,zt(n.lanes,n.childLanes)),o|=n.subtreeFlags&G,o|=n.flags&G,n.return=e,n=n.sibling}e.subtreeFlags|=o}else{{let n=e.child;for(;null!==n;)t=zt(t,zt(n.lanes,n.childLanes)),o|=n.subtreeFlags,o|=n.flags,n.return=e,n=n.sibling}e.subtreeFlags|=o}return e.childLanes=t,n}function Ed(e,n,t){const o=n.pendingProps;switch(Ji(n),n.tag){case 28:break;case 16:case d:case 0:case u:case 7:case 8:case s:case 9:case f:case 1:return Sd(n),null;case 3:{const t=n.stateNode;let o=null;null!==e&&(o=e.memoizedState.cache);if(n.memoizedState.cache!==o&&(n.flags|=R),nu(),Be(),t.pendingContext&&(t.context=t.pendingContext,t.pendingContext=null),null===e||null===e.child){if(Ca(n))yd(n);else if(null!==e){(!e.memoizedState.isDehydrated||n.flags&T)&&(n.flags|=L,Pa())}}return Sd(n),null}case w:{n.type;const l=n.memoizedState;if(null===e)return yd(n),null!==l?(Sd(n),wd(n,l),null):(Sd(n),bd(n,0,null,o,t),null);if(l)return l!==e.memoizedState?(yd(n),Sd(n),wd(n,l),null):(Sd(n),n.flags&=-16777217,null);{const l=e.memoizedProps;return l!==o&&yd(n),Sd(n),bd(n,0,l,o,t),null}}case k:{qe(n);const t=je(),l=n.type;if(null!==e&&null!=n.stateNode){e.memoizedProps!==o&&yd(n)}else{if(!o){if(null===n.stateNode)throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return Sd(n),null}Qe();let e;Ca(n)?(ba(n),e=n.stateNode):(e=cb(l,o,t),n.stateNode=e,yd(n))}return Sd(n),null}case 5:{qe(n);const l=n.type;if(null!==e&&null!=n.stateNode)!function(e,n,t,o){if(e.memoizedProps===o)return;yd(n)}(e,n,0,o);else{if(!o){if(null===n.stateNode)throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return Sd(n),null}const e=Qe();if(Ca(n))ba(n);else{const t=function(e,n,t,o,l){let r;r=o;const i=Ay(t);let a;switch(r){case Ry:a=i.createElementNS(jo,e);break;case _y:a=i.createElementNS(Ho,e);break;default:switch(e){case"svg":a=i.createElementNS(jo,e);break;case"math":a=i.createElementNS(Ho,e);break;case"script":{const e=i.createElement("div");e.innerHTML="<script><\/script>";const n=e.firstChild;a=e.removeChild(n);break}case"select":a="string"==typeof n.is?i.createElement("select",{is:n.is}):i.createElement("select"),n.multiple?a.multiple=!0:n.size&&(a.size=n.size);break;default:a="string"==typeof n.is?i.createElement(e,{is:n.is}):i.createElement(e)}}return Zt(l,a),lo(a,n),a}(l,o,je(),e,n);!function(e,n){{let l=n.child;for(;null!==l;){if(5===l.tag||6===l.tag)t=e,o=l.stateNode,t.appendChild(o);else if(4===l.tag||l.tag===k);else if(null!==l.child){l.child.return=l,l=l.child;continue}if(l===n)return;for(;null===l.sibling;){if(null===l.return||l.return===n)return;l=l.return}l.sibling.return=l.return,l=l.sibling}}var t,o}(t,n),n.stateNode=t,function(e,n,t){switch(py(e,n,t),n){case"button":case"input":case"select":case"textarea":return!!t.autoFocus;case"img":return!0;default:return!1}}(t,l,o)&&yd(n)}}return Sd(n),bd(n,n.type,null===e?null:e.memoizedProps,n.pendingProps,t),null}case 6:{const t=o;if(e&&null!=n.stateNode){!function(e,n,t,o){t!==o&&yd(n)}(0,n,e.memoizedProps,t)}else{if("string"!=typeof t&&null===n.stateNode)throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");const e=je();Qe();Ca(n)?wa(n):n.stateNode=function(e,n,t,o){const l=Ay(n).createTextNode(e);return Zt(o,l),l}(t,e,0,n)}return Sd(n),null}case S:{const t=n.memoizedState;if(null===e||null!==e.memoizedState){const o=function(e,n,t){const o=Ca(n);if(null!==t){if(null===e){if(!o)throw new Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");return ka(n),Sd(n),!1}return za(),n.flags&E||(t=n.memoizedState=null),n.flags|=4,Sd(n),!1}{const n=Pa();return null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),!0}}(e,n,t);if(!o)return n.flags&T?(bs(n),n):(bs(n),null);if(n.flags&E)throw new Error("Client rendering an Activity suspended it again. This is a bug in React.")}return Sd(n),null}case c:{const o=n.memoizedState;if(null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){const t=function(e,n,t){const o=Ca(n);if(null!==t&&null!==t.dehydrated){if(null===e){if(!o)throw new Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");return va(n),Sd(n),!1}return za(),n.flags&E||(t=n.memoizedState=null),n.flags|=4,Sd(n),!1}{const n=Pa();return null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),!0}}(e,n,o);if(!t)return n.flags&T?(bs(n),n):(bs(n),null)}if(bs(n),n.flags&E)return n.lanes=t,n;const l=null!==o,r=null!==e&&null!==e.memoizedState;if(l){const e=n.child;let t=null;null!==e.alternate&&null!==e.alternate.memoizedState&&null!==e.alternate.memoizedState.cachePool&&(t=e.alternate.memoizedState.cachePool.pool);let o=null;null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(o=e.memoizedState.cachePool.pool),o!==t&&(e.flags|=R)}if(l!==r&&l){n.child.flags|=_}return kd(n,n.updateQueue),Sd(n),null}case 4:return Be(),null===e&&Xg(n.stateNode.containerInfo),Sd(n),null;case a:return Aa(n.type),Sd(n),null;case 17:break;case h:{zs();const o=n.memoizedState;if(null===o)return Sd(n),null;let l=!!(n.flags&E);const r=o.rendering;if(null===r)if(l)vd(o,!1);else{if(!!(Ih!==fh||null!==e&&e.flags&E)){let e=n.child;for(;null!==e;){const r=Ps(e);if(null!==r){l=!0,n.flags|=E,vd(o,!1);const e=r.updateQueue;return n.updateQueue=e,kd(n,e),n.subtreeFlags=0,Fu(n,t),Cs(0,xs(vs.current,ks)),Ta()&&Ki(n,o.treeForkCount),n.child}e=e.sibling}}null!==o.tail&&un()>em()&&(n.flags|=E,l=!0,vd(o,!1),n.lanes=Yn)}else{if(!l){const e=Ps(r);if(null!==e){n.flags|=E,l=!0;const t=e.updateQueue;if(n.updateQueue=t,kd(n,t),vd(o,!0),null===o.tail&&"hidden"===o.tailMode&&!r.alternate&&!Ta())return Sd(n),null}else 2*un()-o.renderingStartTime>em()&&t!==Jn&&(n.flags|=E,l=!0,vd(o,!1),n.lanes=Yn)}if(o.isBackwards)r.sibling=n.child,n.child=r;else{const e=o.last;null!==e?e.sibling=r:n.child=r,o.last=r}}if(null!==o.tail){const e=o.tail;o.rendering=e,o.tail=e.sibling,o.renderingStartTime=un(),e.sibling=null;let t=vs.current;return t=l?xs(t,ks):Es(t),Cs(0,t),Ta()&&Ki(n,o.treeForkCount),e}return Sd(n),null}case 21:break;
15case m:case g:{bs(n),as();const o=null!==n.memoizedState;if(null!==e){null!==e.memoizedState!==o&&(n.flags|=_)}else o&&(n.flags|=_);o?!xt(t,Jn)||n.flags&E||(Sd(n),6&n.subtreeFlags&&(n.flags|=_)):Sd(n);const l=n.updateQueue;if(null!==l){kd(n,l.retryQueue)}let r=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(r=e.memoizedState.cachePool.pool);let i=null;return null!==n.memoizedState&&null!==n.memoizedState.cachePool&&(i=n.memoizedState.cachePool.pool),i!==r&&(n.flags|=R),mu(0,e),null}case y:{let t=null;null!==e&&(t=e.memoizedState.cache);return n.memoizedState.cache!==t&&(n.flags|=R),nu(),Sd(n),null}case b:case v:return null}throw new Error("Unknown unit of work tag ("+n.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function xd(e,n,t){switch(Ji(n),n.tag){case 1:{const e=n.flags;return e&I?(n.flags=-65537&e|E,n):null}case 3:{nu(),Be();const e=n.flags;return e&I&&!(e&E)?(n.flags=-65537&e|E,n):null}case w:case k:case 5:return qe(n),null;case S:{if(null!==n.memoizedState){if(bs(n),null===n.alternate)throw new Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");za()}const e=n.flags;return e&I?(n.flags=-65537&e|E,n):null}case c:{bs(n);const e=n.memoizedState;if(null!==e&&null!==e.dehydrated){if(null===n.alternate)throw new Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");za()}const t=n.flags;return t&I?(n.flags=-65537&t|E,n):null}case h:return zs(),null;case 4:return Be(),null;case a:return Aa(n.type),null;case m:case g:{bs(n),as(),mu(0,e);const t=n.flags;return t&I?(n.flags=-65537&t|E,n):null}case y:return nu(),null;default:return null}}function Cd(e,n,t){switch(Ji(n),n.tag){case 1:break;case 3:nu(),Be();break;case w:case k:case 5:qe(n);break;case 4:Be();break;case S:null!==n.memoizedState&&bs(n);break;case c:bs(n);break;case h:zs();break;case a:Aa(n.type);break;case m:case g:bs(n),as(),mu(0,e);break;case y:nu()}}function zd(e){return l}function Pd(e,n){Nd(n,e)}function Td(e,n,t){Ld(t,e,n)}function Nd(e,n){try{const t=n.updateQueue,o=null!==t?t.lastEffect:null;if(null!==o){const n=o.next;let t=n;do{if((t.tag&e)===e){let e;r;{const n=t.create,o=t.inst;e=n(),o.destroy=e}r}t=t.next}while(t!==n)}}catch(e){mg(n,n.return,e)}}function Ld(e,n,t){try{const o=n.updateQueue,l=null!==o?o.lastEffect:null;if(null!==l){const o=l.next;let r=o;do{if((r.tag&e)===e){const e=r.inst,o=e.destroy;void 0!==o&&(e.destroy=void 0,Id(n,t,o))}r=r.next}while(r!==o)}}catch(e){mg(n,n.return,e)}}function Rd(e,n){Nd(n,e)}function _d(e,n,t){Ld(t,e,n)}function Md(e){const n=e.updateQueue;if(null!==n){const t=e.stateNode;try{ts(n,t)}catch(n){mg(e,e.return,n)}}}function Od(e){const n=e.updateQueue;if(null!==n){const t=e.stateNode;try{(function(e,n){const t=e.shared.hiddenCallbacks;if(null!==t){e.shared.hiddenCallbacks=null;for(let e=0;e<t.length;e++)Ju(t[e],n)}})(n,t)}catch(n){mg(e,e.return,n)}}}function Ad(e,n,t){t.props=Sf(e.type,e.memoizedProps),t.state=e.memoizedState;try{t.componentWillUnmount()}catch(t){mg(e,n,t)}}function Dd(e,n){try{(function(e){const n=e.ref;if(null!==n){let t;e.tag,t=e.stateNode,"function"==typeof n?e.refCleanup=n(t):n.current=t}})(e)}catch(t){mg(e,n,t)}}function Fd(e,n){const t=e.ref,o=e.refCleanup;if(null!==t)if("function"==typeof o)try{zd()||o()}catch(t){mg(e,n,t)}finally{e.refCleanup=null;const n=e.alternate;null!=n&&(n.refCleanup=null)}else if("function"==typeof t)try{zd()||t(null)}catch(t){mg(e,n,t)}else t.current=null}function Id(e,n,t,o){const l=null==o?t:t.bind(null,o);try{l()}catch(t){mg(e,n,t)}}function Ud(e){const n=e.type,t=e.memoizedProps,o=e.stateNode;try{(function(e,n,t){switch(n){case"button":case"input":case"select":case"textarea":return void(t.autoFocus&&e.focus());case"img":if(t.src){const n=t.src;e.src=n}else t.srcSet&&(e.srcset=t.srcSet)}})(o,n,t)}catch(n){mg(e,e.return,n)}}function Hd(e,n,t){try{(function(e,n,t,o){(function(e,n,t,o){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":{let l=null,r=null,i=null,a=null,u=null,s=null,c=null;for(const l in t){const r=t[l];if(t.hasOwnProperty(l)&&null!=r)switch(l){case"checked":case"value":break;case"defaultValue":u=r;default:o.hasOwnProperty(l)||fy(e,n,l,null,o,r)}}for(const u in o){const f=o[u],d=t[u];
15if(o.hasOwnProperty(u)&&(null!=f||null!=d))switch(u){case"type":r=f;break;case"name":l=f;break;case"checked":s=f;break;case"defaultChecked":c=f;break;case"value":i=f;break;case"defaultValue":a=f;break;case"children":case"dangerouslySetInnerHTML":if(null!=f)throw new Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:f!==d&&fy(e,n,u,f,o,d)}}return void Lo(e,i,a,u,s,c,r,l)}case"select":{let l=null,r=null,i=null,a=null;for(const l in t){const r=t[l];if(t.hasOwnProperty(l)&&null!=r)switch(l){case"value":break;case"multiple":a=r;default:o.hasOwnProperty(l)||fy(e,n,l,null,o,r)}}for(const a in o){const u=o[a],s=t[a];if(o.hasOwnProperty(a)&&(null!=u||null!=s))switch(a){case"value":l=u;break;case"defaultValue":r=u;break;case"multiple":i=u;default:u!==s&&fy(e,n,a,u,o,s)}}return void function(e,n,t,o,l){const r=e;null!=n?Mo(r,!!o,n,!1):!!l!=!!o&&(null!=t?Mo(r,!!o,t,!0):Mo(r,!!o,o?[]:"",!1))}(e,l,r,i,a)}case"textarea":{let l=null,r=null;for(const l in t){const r=t[l];if(t.hasOwnProperty(l)&&null!=r&&!o.hasOwnProperty(l))switch(l){case"value":case"children":break;default:fy(e,n,l,null,o,r)}}for(const i in o){const a=o[i],u=t[i];if(o.hasOwnProperty(i)&&(null!=a||null!=u))switch(i){case"value":l=a;break;case"defaultValue":r=a;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=a)throw new Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:a!==u&&fy(e,n,i,a,o,u)}}return void Oo(e,l,r)}case"option":for(const l in t){const r=t[l];if(t.hasOwnProperty(l)&&null!=r&&!o.hasOwnProperty(l))if("selected"===l)e.selected=!1;else fy(e,n,l,null,o,r)}for(const l in o){const r=o[l],i=t[l];if(o.hasOwnProperty(l)&&r!==i&&(null!=r||null!=i))if("selected"===l)e.selected=r&&"function"!=typeof r&&"symbol"!=typeof r;else fy(e,n,l,r,o,i)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(const l in t){const r=t[l];t.hasOwnProperty(l)&&null!=r&&!o.hasOwnProperty(l)&&fy(e,n,l,null,o,r)}for(const l in o){const r=o[l],i=t[l];if(o.hasOwnProperty(l)&&r!==i&&(null!=r||null!=i))switch(l){case"children":case"dangerouslySetInnerHTML":if(null!=r)throw new Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:fy(e,n,l,r,o,i)}}return;default:if(Vo(n)){for(const l in t){const r=t[l];t.hasOwnProperty(l)&&void 0!==r&&!o.hasOwnProperty(l)&&dy(e,n,l,void 0,o,r)}for(const l in o){const r=o[l],i=t[l];!o.hasOwnProperty(l)||r===i||void 0===r&&void 0===i||dy(e,n,l,r,o,i)}return}}for(const l in t){const r=t[l];t.hasOwnProperty(l)&&null!=r&&!o.hasOwnProperty(l)&&fy(e,n,l,null,o,r)}for(const l in o){const r=o[l],i=t[l];!o.hasOwnProperty(l)||r===i||null==r&&null==i||fy(e,n,l,r,o,i)}})(e,n,t,o),lo(e,o)})(e.stateNode,e.type,t,n)}catch(n){mg(e,e.return,n)}}function jd(e,n){try{const t=e.stateNode;n?Ky(t,!0):Ky(e.stateNode,!1)}catch(n){mg(e,e.return,n)}}function Vd(e,n){try{const t=e.stateNode;n?function(e){const n=e.style;"function"==typeof n.setProperty?n.setProperty("display","none","important"):n.display="none"}(t):function(e,n){const t=n[Ny],o=null!=t&&t.hasOwnProperty("display")?t.display:null;e.style.display=null==o||"boolean"==typeof o?"":(""+o).trim()}(e.stateNode,e.memoizedProps)}catch(n){mg(e,e.return,n)}}function Bd(e,n){try{const t=e.stateNode;n?t.nodeValue="":function(e,n){e.nodeValue=n}(t,e.memoizedProps)}catch(n){mg(e,e.return,n)}}function Qd(e){return 5===e.tag||3===e.tag||e.tag===w||e.tag===k&&$y(e.type)||4===e.tag}function Wd(e){let n=e;e:for(;;){for(;null===n.sibling;){if(null===n.return||Qd(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&n.tag!==p;){if(n.tag===k&&$y(n.type))continue e;if(2&n.flags)continue e;if(null===n.child||4===n.tag)continue e;n.child.return=n,n=n.child}if(!(2&n.flags))return n.stateNode}}function qd(e,n,t,o){const l=e.tag;if(5===l||6===l){const o=e.stateNode;return void(n?function(e,n,t){let o;
15o=9===e.nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e;o.insertBefore(n,t)}(t,o,n):function(e,n){let t;t=9===e.nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e;t.appendChild(n);const o=e._reactRootContainer;null==o&&null===t.onclick&&uy(t)}(t,o))}if(4===l)return;l===k&&$y(e.type)&&(t=e.stateNode,n=null);const r=e.child;if(null!==r){qd(r,n,t);let e=r.sibling;for(;null!==e;)qd(e,n,t),e=e.sibling}}function $d(e,n,t,o){const l=e.tag;if(5===l||6===l){const o=e.stateNode;return void(n?function(e,n,t){e.insertBefore(n,t)}(t,o,n):function(e,n){e.appendChild(n)}(t,o))}if(4===l)return;l===k&&$y(e.type)&&(t=e.stateNode);const r=e.child;if(null!==r){$d(r,n,t);let e=r.sibling;for(;null!==e;)$d(e,n,t),e=e.sibling}}function Yd(e){try{(function(e){let n,t=e.return;for(;null!==t;){if(Qd(t)){n=t;break}t=t.return}if(null==n)throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");switch(n.tag){case k:{const t=n.stateNode;$d(e,Wd(e),t);break}case 5:{const t=n.stateNode;n.flags&z&&(qy(t),n.flags&=-33),$d(e,Wd(e),t);break}case 3:case 4:{const t=n.stateNode.containerInfo;qd(e,Wd(e),t);break}default:throw new Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}})(e)}catch(n){mg(e,e.return,n)}}function Kd(e,n,t,o){try{(function(e,n){let t;t=9===e.nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e;t.removeChild(n)})(t,o)}catch(t){mg(e,n,t)}}function Xd(e,n){try{Fw(e.containerInfo)}catch(e){mg(n,n.return,e)}}function Gd(e,n){try{(function(e){Fw(e)})(e)}catch(e){mg(n,n.return,e)}}function Zd(e,n){try{(function(e){Fw(e)})(e)}catch(e){mg(n,n.return,e)}}function Jd(e){const n=e.stateNode,t=e.memoizedProps;try{(function(e,n,t,o){const l=t.attributes;for(;l.length;)t.removeAttributeNode(l[0]);py(t,e,n),Zt(o,t),lo(t,n)})(e.type,t,n,e)}catch(n){mg(e,e.return,n)}}function ep(e){fb(e.stateNode)}let np=null;function tp(){np=null}let op=0;function lp(e,n,t,o,l){op=0;return rp(e.child,n,t,o,l)}function rp(e,n,t,o,l){let r=!1;for(;null!==e;){if(5===e.tag){const l=e.stateNode;if(null!==o){const e=Zy(l);o.push(e),Jy(e)&&(r=!0)}else r||Jy(Zy(l))&&(r=!0);Xy(l,0===op?n:n+"_"+op,t),op++}else e.tag===m&&null!==e.memoizedState||e.tag===v&&l||rp(e.child,n,t,o,l)&&(r=!0);e=e.sibling}return r}function ip(e,n){for(;null!==e;){if(5===e.tag){Gy(e.stateNode,e.memoizedProps)}else e.tag===m&&null!==e.memoizedState||e.tag===v&&n||ip(e.child,n);e=e.sibling}}function ap(e){if(null===np||0===np.size)return;const n=np;if(!(e.subtreeFlags&W))return;let t=e.child;for(;null!==t;){if(t.tag===m&&null===t.memoizedState);else{if(t.tag===v&&t.flags&W){const e=t.memoizedProps,o=e.name;if(null!=o&&"auto"!==o){const l=n.get(o);if(void 0!==l){const r=oi(e.default,e.share);if("none"!==r){if(lp(t,o,r,null,!1)){const e=t.stateNode,n=l;n.paired=e,e.paired=n}else ip(t.child,!1)}if(n.delete(o),0===n.size)break}}}ap(t)}t=t.sibling}}function up(e){if(e.tag===v){const n=e.memoizedProps,t=ni(n,e.stateNode),o=null!==np?np.get(t):void 0,l=oi(n.default,void 0!==o?n.share:n.exit);if("none"!==l){if(lp(e,t,l,null,!1)){if(void 0!==o){const n=e.stateNode,l=o;l.paired=n,n.paired=l,np.delete(t)}}else ip(e.child,!1)}null!==np&&ap(e)}else if(e.subtreeFlags&q){let n=e.child;for(;null!==n;)up(n),n=n.sibling}else null!==np&&ap(e)}function sp(e){let n=e.child;for(;null!==n;){if(n.tag===v){const e=n.memoizedProps,t=ni(e,n.stateNode),o=oi(e.default,e.update);n.flags&=-5,"none"!==o&&lp(n,t,o,n.memoizedState=[],!1)}else n.subtreeFlags&q&&sp(n);n=n.sibling}}let cp=!1,fp=!1,dp=!1;const pp="function"==typeof WeakSet?WeakSet:Set;let hp=null,mp=!1;function gp(e,n,t){!function(e){My=fw,Oy=function(e){const n=Tr(e);return{focusedElem:n,selectionRange:Nr(n)?Rr(n):null}}(e);let n=null;dw(!1)}(e.containerInfo),mp=!1;hp=n,function(e){const n=e?9270:$;for(;null!==hp;){const t=hp;if(e){const n=t.deletions;if(null!==n)for(let t=0;t<n.length;t++){wp(n[t],e)}}const o=t.child;t.subtreeFlags&n&&null!==o?(o.return=t,hp=o):(e&&sp(t),yp())}}(false),tp()}function yp(e){for(;null!==hp;){const e=hp;bp(e);const n=e.sibling;if(null!==n)return n.return=e.return,void(hp=n);hp=e.return}}function bp(e,n){const t=e.alternate,o=e.flags;switch(e.tag){case 0:if(4&o){const n=e.updateQueue,t=null!==n?n.events:null;if(null!==t)for(let e=0;e<t.length;e++){const n=t[e],o=n.ref,l=n.nextImpl;o.impl=l}}break;case u:case d:break;case 1:o&L&&null!==t&&function(e,n){const t=n.memoizedProps,o=n.memoizedState,l=e.stateNode;try{let n;n=function(e,n,t){return e.getSnapshotBeforeUpdate(n,t)}(l,Sf(e.type,t),o),l.__reactInternalSnapshotBeforeUpdate=n}catch(n){mg(e,e.return,n)}}(e,t);break;case 3:if(o&L){!function(e){const n=e.nodeType;if(9===n)eb(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":return void eb(e);default:e.textContent=""}}(e.stateNode.containerInfo)}break;case 5:case w:case k:case 6:case 4:case 17:break;default:if(o&L)throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}}function wp(e,n){n&&up(e)}function kp(e,n,t,o){const l=t.flags;switch(t.tag){case 0:case u:case d:Dp(e,t),4&l&&Pd(t,Ls|Ts);break;case 1:Dp(e,t),4&l&&function(e,n){const t=e.stateNode;if(null===n)try{t.componentDidMount()}catch(n){mg(e,e.return,n)}else{const o=Sf(e.type,n.memoizedProps),l=n.memoizedState;
15try{t.componentDidUpdate(o,l,t.__reactInternalSnapshotBeforeUpdate)}catch(n){mg(e,e.return,n)}}}(t,n),l&P&&Md(t),l&N&&Dd(t,t.return);break;case 3:Dp(e,t),l&P&&function(e){const n=e.updateQueue;if(null!==n){let t=null;if(null!==e.child)switch(e.child.tag){case k:case 5:case 1:t=e.child.stateNode}try{ts(n,t)}catch(n){mg(e,e.return,n)}}}(t);break;case k:null===n&&4&l&&Jd(t);case w:case 5:Dp(e,t),null===n&&(4&l?Ud(t):64&l&&function(e){e.type,e.memoizedProps,e.stateNode}(t)),l&N&&Dd(t,t.return);break;case s:Dp(e,t);break;case S:Dp(e,t),4&l&&Pp(e,t);break;case c:if(Dp(e,t),4&l&&Tp(e,t),l&P){const e=t.memoizedState;if(null!==e){const n=e.dehydrated;if(null!==n){!function(e,n){const t=e.ownerDocument;if(e.data===vy)e._reactRetry=n;else if(e.data!==ky||t.readyState!==Ty)n();else{const o=()=>{n(),t.removeEventListener("DOMContentLoaded",o)};t.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}(n,wg.bind(null,t))}}}break;case m:{const o=null!==t.memoizedState||cp;if(o);else{const l=null!==n&&null!==n.memoizedState,r=cp,i=fp;if(cp=o,fp=l||fp,fp&&!i){Hp(e,t,!!(t.subtreeFlags&K))}else Dp(e,t);cp=r,fp=i}}break;case v:break;default:Dp(e,t)}}function vp(e){const n=e.alternate;if(null!==n&&(e.alternate=null,vp(n)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag){const n=e.stateNode;null!==n&&Gt(n)}e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}let Sp=null,Ep=!1;function xp(e,n,t){{let o=n;e:for(;null!==o;){switch(o.tag){case k:if($y(o.type)){Sp=o.stateNode,Ep=!1;break e}break;case 5:Sp=o.stateNode,Ep=!1;break e;case 3:case 4:Sp=o.stateNode.containerInfo,Ep=!0;break e}o=o.return}if(null===Sp)throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");zp(e,n,t),Sp=null,Ep=!1}!function(e){const n=e.alternate;null!==n&&(n.return=null),e.return=null}(t)}function Cp(e,n,t){let o=t.child;for(;null!==o;)zp(e,n,o),o=o.sibling}function zp(e,n,t){switch(function(e){if(bn&&"function"==typeof bn.onCommitFiberUnmount)try{bn.onCommitFiberUnmount(yn,e)}catch(e){}}(t),t.tag){case w:fp||Fd(t,n),Cp(e,n,t),t.memoizedState?Mb(t.memoizedState):t.stateNode&&Hb(t.stateNode);break;case k:{fp||Fd(t,n);const o=Sp,l=Ep;$y(t.type)&&(Sp=t.stateNode,Ep=!1),Cp(e,n,t),ep(t),Sp=o,Ep=l;break}case 5:fp||Fd(t,n);case 6:{const o=Sp,l=Ep;Sp=null,Cp(e,n,t),Sp=o,Ep=l,null!==Sp&&(Ep?Kd(t,n,Sp,t.stateNode):function(e,n,t,o){try{!function(e,n){e.removeChild(n)}(t,o)}catch(t){mg(e,n,t)}}(t,n,Sp,t.stateNode))}break;case p:null!==Sp&&(Ep?(o=Sp,l=t.stateNode,function(e,n){let t;t=9===e.nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,Yy(t,n),Fw(e)}(o,l)):function(e,n){Yy(e,n)}(Sp,t.stateNode));break;case 4:{const o=Sp,l=Ep;Sp=t.stateNode.containerInfo,Ep=!0,Cp(e,n,t),Sp=o,Ep=l}break;case 0:case u:case f:case d:Ld(Ns,t,n),fp||Td(t,n,Ls),Cp(e,n,t);break;case 1:if(!fp){Fd(t,n);const e=t.stateNode;"function"==typeof e.componentWillUnmount&&Ad(t,n,e)}Cp(e,n,t);break;case 21:Cp(e,n,t);break;case m:{const o=fp;fp=o||null!==t.memoizedState,Cp(e,n,t),fp=o}break;default:Cp(e,n,t)}var o,l}function Pp(e,n){if(null===n.memoizedState){const e=n.alternate;if(null!==e){const t=e.memoizedState;if(null!==t){Gd(t.dehydrated,n)}}}}function Tp(e,n){if(null===n.memoizedState){const e=n.alternate;if(null!==e){const t=e.memoizedState;if(null!==t){const e=t.dehydrated;null!==e&&Zd(e,n)}}}}function Np(e,n){const t=function(e){switch(e.tag){case S:case c:case h:{let n=e.stateNode;return null===n&&(n=e.stateNode=new pp),n}case m:{const n=e.stateNode;let t=n._retryCache;return null===t&&(t=n._retryCache=new pp),t}default:throw new Error("Unexpected Suspense handler tag ("+e.tag+"). This is a bug in React.")}}(e);n.forEach((n=>{if(!t.has(n)){t.add(n);const o=kg.bind(null,e,n);n.then(o,o)}}))}function Lp(e,n,t){const o=n.deletions;if(null!==o)for(let t=0;t<o.length;t++){xp(e,n,o[t])}if(13886&n.subtreeFlags){let t=n.child;for(;null!==t;)_p(t,e),t=t.sibling}}let Rp=null;function _p(e,n,t){const o=e.alternate,l=e.flags;switch(e.tag){case 0:case u:case f:case d:Lp(n,e),Mp(e),4&l&&(Ld(Ns|Ts,e,e.return),Nd(Ns|Ts,e),Td(e,e.return,Ls|Ts));break;case 1:if(Lp(n,e),Mp(e),l&N&&(fp||null===o||Fd(o,o.return)),l&P&&cp){const n=e.updateQueue;null!==n&&function(e){const n=e.callbacks;
15if(null!==n){const t=e.shared.hiddenCallbacks;e.shared.hiddenCallbacks=null===t?n:t.concat(n)}}(n)}break;case w:{const t=Rp;if(Lp(n,e),Mp(e),l&N&&(fp||null===o||Fd(o,o.return)),4&l){const n=null!==o?o.memoizedState:null,l=e.memoizedState;null===o?null===l?null===e.stateNode?e.stateNode=function(e,n,t,o){const l=vb(e);let r=null;e:switch(n){case"title":return r=l.getElementsByTagName("title")[0],(!r||uo(r)||r.namespaceURI===jo||r.hasAttribute("itemprop"))&&(r=l.createElement(n),l.head.insertBefore(r,l.querySelector("head > title"))),py(r,n,t),Zt(o,r),ao(r),r;case"link":{const e=Ib("link","href",l),o=n+(t.href||""),i=e.get(o);if(i){const e=i;for(let n=0;n<e.length;n++){const o=e[n];if(o.getAttribute("href")===(null==t.href||""===t.href?null:t.href)&&o.getAttribute("rel")===(null==t.rel?null:t.rel)&&o.getAttribute("title")===(null==t.title?null:t.title)&&o.getAttribute("crossorigin")===(null==t.crossOrigin?null:t.crossOrigin)){r=o,e.splice(n,1);break e}}}r=l.createElement(n),py(r,n,t),l.head.appendChild(r);break}case"meta":{const e=Ib("meta","content",l),o=n+(t.content||""),i=e.get(o);if(i){const e=i;for(let n=0;n<e.length;n++){const o=e[n];if(o.getAttribute("content")===(null==t.content?null:""+t.content)&&o.getAttribute("name")===(null==t.name?null:t.name)&&o.getAttribute("property")===(null==t.property?null:t.property)&&o.getAttribute("http-equiv")===(null==t.httpEquiv?null:t.httpEquiv)&&o.getAttribute("charset")===(null==t.charSet?null:t.charSet)){r=o,e.splice(n,1);break e}}}r=l.createElement(n),py(r,n,t),l.head.appendChild(r);break}default:throw new Error('getNodesForType encountered a type it did not expect: "'+n+'". This is a bug in React.')}return Zt(o,r),ao(r),r}(t,e.type,e.memoizedProps,e):Ub(t,e.type,e.stateNode):e.stateNode=_b(t,l,e.memoizedProps):n!==l?(null===n?null!==o.stateNode&&Hb(o.stateNode):Mb(n),null===l?Ub(t,e.type,e.stateNode):_b(t,l,e.memoizedProps)):null===l&&null!==e.stateNode&&Hd(e,e.memoizedProps,o.memoizedProps)}break}case k:if(Lp(n,e),Mp(e),l&N&&(fp||null===o||Fd(o,o.return)),null!==o&&4&l){Hd(e,e.memoizedProps,o.memoizedProps)}break;case 5:if(Lp(n,e),Mp(e),l&N&&(fp||null===o||Fd(o,o.return)),e.flags&z&&function(e){const n=e.stateNode;try{qy(n)}catch(n){mg(e,e.return,n)}}(e),4&l){if(null!=e.stateNode){const n=e.memoizedProps;Hd(e,n,null!==o?o.memoizedProps:n)}}l&D&&(dp=!0);break;case 6:if(Lp(n,e),Mp(e),4&l){if(null===e.stateNode)throw new Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");const n=e.memoizedProps;null!==o&&o.memoizedProps;!function(e,n){const t=e.stateNode;try{!function(e,n,t){e.nodeValue=t}(t,0,n)}catch(n){mg(e,e.return,n)}}(e,n)}break;case 3:{Fb=null;const t=Rp;Rp=wb(n.containerInfo),Lp(n,e),Rp=t,Mp(e)}if(4&l&&null!==o){o.memoizedState.isDehydrated&&Xd(n,e)}dp&&(dp=!1,Op(e));break;case 4:{const t=Rp;Rp=wb(e.stateNode.containerInfo),Lp(n,e),Mp(e),Rp=t}break;case s:Lp(n,e),Mp(e);break;case S:if(Lp(n,e),Mp(e),4&l){const n=e.updateQueue;null!==n&&(e.updateQueue=null,Np(e,n))}break;case c:Lp(n,e),Mp(e);if(e.child.flags&_){null!==e.memoizedState!==(null!==o&&null!==o.memoizedState)&&($h=un())}if(4&l){const n=e.updateQueue;null!==n&&(e.updateQueue=null,Np(e,n))}break;case m:{const t=null!==e.memoizedState,r=null!==o&&null!==o.memoizedState;{const o=cp,l=fp;cp=o||t,fp=l||r,Lp(n,e),fp=l,cp=o}if(Mp(e),l&_){const n=e.stateNode;t?n._visibility&=~ri:n._visibility|=ri;t&&(!(null!==o)||r||cp||fp||Ip(e)),function(e,n){let t=null;{let o=e;for(;;){if(5===o.tag||o.tag===w)null===t&&(t=o,Vd(o,n));else if(6===o.tag)null===t&&Bd(o,n);else if(o.tag===p)null===t&&jd(o,n);else if((o.tag!==m&&o.tag!==g||null===o.memoizedState||o===e)&&null!==o.child){o.child.return=o,o=o.child;continue}if(o===e)return;for(;null===o.sibling;){if(null===o.return||o.return===e)return;t===o&&(t=null),o=o.return}t===o&&(t=null),o.sibling.return=o.return,o=o.sibling}}}(e,t)}if(4&l){const n=e.updateQueue;if(null!==n){const t=n.retryQueue;null!==t&&(n.retryQueue=null,Np(e,t))}}break}case h:if(Lp(n,e),Mp(e),4&l){const n=e.updateQueue;null!==n&&(e.updateQueue=null,Np(e,n))}break;case v:case 21:break;default:Lp(n,e),Mp(e)}}function Mp(e,n){const t=e.flags;2&t&&(Yd(e),e.flags&=-3),t&x&&(e.flags&=-4097)}function Op(e){if(e.subtreeFlags&D){let n=e.child;for(;null!==n;)Ap(n),n=n.sibling}}function Ap(e){if(Op(e),5===e.tag&&e.flags&D){const n=e.stateNode;n.reset()}}function Dp(e,n,t){if(n.subtreeFlags&K){let t=n.child;for(;null!==t;){kp(e,t.alternate,t),t=t.sibling}}}function Fp(e){switch(e.tag){case 0:case u:case f:case d:Td(e,e.return,Ls),Ip(e);break;case 1:{Fd(e,e.return);const n=e.stateNode;"function"==typeof n.componentWillUnmount&&Ad(e,e.return,n),Ip(e);break}case k:ep(e);case w:case 5:Fd(e,e.return),Ip(e);break;case m:null!==e.memoizedState||Ip(e);break;default:Ip(e)}}function Ip(e){let n=e.child;for(;null!==n;)Fp(n),n=n.sibling}function Up(e,n,t,o){const l=t.flags;switch(t.tag){case 0:case u:case d:Hp(e,t,o),Pd(t,Ls);break;case 1:Hp(e,t,o),function(e){const n=e.stateNode;if("function"==typeof n.componentDidMount)try{n.componentDidMount()}catch(n){mg(e,e.return,n)}}(t),Od(t),o&&l&P&&Md(t),Dd(t,t.return);break;case k:Jd(t);case w:case 5:Hp(e,t,o),o&&null===n&&4&l&&Ud(t),Dd(t,t.return);break;case s:Hp(e,t,o);break;case S:Hp(e,t,o),o&&4&l&&Pp(0,t);break;case c:Hp(e,t,o),o&&4&l&&Tp(0,t);break;case m:null!==t.memoizedState||Hp(e,t,o),Dd(t,t.return);break;case v:break;default:Hp(e,t,o)}}function Hp(e,n,t){const o=t&&!!(n.subtreeFlags&K);let l=n.child;for(;null!==l;){Up(e,l.alternate,l,o),l=l.sibling}}function jp(e,n,t){let o=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(o=e.memoizedState.cachePool.pool);let l=null;null!==n.memoizedState&&null!==n.memoizedState.cachePool&&(l=n.memoizedState.cachePool.pool),l!==o&&(null!=l&&Za(l),null!=o&&Ja(o))}function Vp(e,n){let t=null;null!==n.alternate&&(t=n.alternate.memoizedState.cache);const o=n.memoizedState.cache;o!==t&&(Za(o),null!=t&&Ja(t))}function Bp(e,n,t,o,l){if(10256&n.subtreeFlags){let l=n.child;for(;null!==l;)Qp(e,l,t,o),l=l.sibling}}function Qp(e,n,t,o,r){const i=n.flags;switch(n.tag){case 0:case u:case d:Bp(e,n,t,o),i&R&&Rd(n,Rs|Ts);break;case 1:Bp(e,n,t,o);break;case 3:if(Bp(e,n,t,o),i&R){let e=null;null!==n.alternate&&(e=n.alternate.memoizedState.cache);const t=n.memoizedState.cache;t!==e&&(Za(t),null!=e&&Ja(e))}break;case s:if(i&R){Bp(e,n,t,o);const l=n.stateNode;!function(e,n,t,o){try{!function(e,n,t,o){const l=e.memoizedProps,r=l.id,i=l.onPostCommit;"function"==typeof i&&i(r,null===n?"mount":"update",o,t)}(e,n,t,o)}catch(n){mg(e,e.return,n)}}(n,n.alternate,ou,l.passiveEffectDuration)}else Bp(e,n,t,o);break;case S:case c:Bp(e,n,t,o);break;case g:break;case m:{const r=n.stateNode,a=n.alternate;if(null!==n.memoizedState)r._visibility&ii?Bp(e,n,t,o):$p(e,n);else if(r._visibility&ii)Bp(e,n,t,o);else{r._visibility|=ii;Wp(e,n,t,o,!!(n.subtreeFlags&X)||l)}i&R&&jp(a,n);break}case y:if(Bp(e,n,t,o),i&R){n.alternate;Vp(0,n)}break;default:Bp(e,n,t,o)}}function Wp(e,n,t,o,r,i){const a=r&&(!!(n.subtreeFlags&X)||l);let u=n.child;for(;null!==u;)qp(e,u,t,o,a),u=u.sibling}function qp(e,n,t,o,l,r){const i=n.flags;switch(n.tag){case 0:case u:case d:Wp(e,n,t,o,l),Rd(n,Rs);break;case g:break;case m:{const r=n.stateNode;if(null!==n.memoizedState?r._visibility&ii?Wp(e,n,t,o,l):$p(e,n):(r._visibility|=ii,Wp(e,n,t,o,l)),l&&i&R){jp(n.alternate,n)}break}case y:if(Wp(e,n,t,o,l),l&&i&R){n.alternate;Vp(0,n)}break;default:Wp(e,n,t,o,l)}}function $p(e,n,t,o,l){if(n.subtreeFlags&X){let t=n.child;for(;null!==t;)Yp(e,t),t=t.sibling}}function Yp(e,n,t,o,l){const r=n.flags;switch(n.tag){case m:if($p(e,n),r&R){jp(n.alternate,n)}break;case y:if($p(e,n),r&R){n.alternate;Vp(0,n)}break;default:$p(e,n)}}let Kp=A;function Xp(e,n,t){if(e.subtreeFlags&Kp){let o=e.child;for(;null!==o;)Gp(o,n,t),o=o.sibling}}function Gp(e,n,t){switch(e.tag){case w:Xp(e,n,t),e.flags&Kp&&null!==e.memoizedState&&function(e,n,t,o){if("stylesheet"===t.type){if("string"==typeof o.media&&!1===matchMedia(o.media).matches)return;if((t.state.loading&gb)===db){if(null===t.instance){const l=Pb(o.href);let r=n.querySelector(Tb(l));if(r){const n=r._p;if(null!==n&&"object"==typeof n&&"function"==typeof n.then){const t=n;e.count++;const o=Yb.bind(e);t.then(o,o)}return t.state.loading|=gb,t.instance=r,void ao(r)}const i=vb(n),a=Nb(o),u=yb.get(l);u&&Ab(a,u),r=i.createElement("link"),ao(r);const s=r;s._p=new Promise(((e,n)=>{s.onload=e,s.onerror=n})),py(r,"link",a),t.instance=r}null===e.stylesheets&&(e.stylesheets=new Map),e.stylesheets.set(t,n);const l=t.state.preload;if(l&&(t.state.loading&mb)===db){e.count++;const n=Yb.bind(e);l.addEventListener("load",n),l.addEventListener("error",n)}}}}(t,Rp,e.memoizedState,e.memoizedProps);break;case 5:Xp(e,n,t);break;case 3:case 4:{const o=Rp,l=e.stateNode.containerInfo;Rp=wb(l),Xp(e,n,t),Rp=o}break;case m:if(null!==e.memoizedState);else{const o=e.alternate;if(null!==o&&null!==o.memoizedState){const o=Kp;Kp=Q,Xp(e,n,t),Kp=o}else Xp(e,n,t)}break;default:Xp(e,n,t)}}function Zp(e){const n=e.alternate;if(null!==n){let e=n.child;if(null!==e){n.child=null;do{const n=e.sibling;e.sibling=null,e=n}while(null!==e)}}}function Jp(e){const n=e.deletions;if(e.flags&C){if(null!==n)for(let t=0;t<n.length;t++){const o=n[t];hp=o,oh(o,e)}Zp(e)}if(e.subtreeFlags&X){let n=e.child;for(;null!==n;)eh(n),n=n.sibling}}function eh(e){switch(e.tag){case 0:case u:case d:Jp(e),e.flags&R&&_d(e,e.return,Rs|Ts);break;case 3:case s:Jp(e);break;case m:{const n=e.stateNode;null!==e.memoizedState&&n._visibility&ii&&(null===e.return||e.return.tag!==c)?(n._visibility&=~ii,nh(e)):Jp(e);break}default:Jp(e)}}function nh(e){const n=e.deletions;if(e.flags&C){if(null!==n)for(let t=0;t<n.length;t++){const o=n[t];hp=o,oh(o,e)}Zp(e)}let t=e.child;for(;null!==t;)th(t),t=t.sibling}function th(e){switch(e.tag){case 0:case u:case d:_d(e,e.return,Rs),nh(e);break;case m:{const n=e.stateNode;n._visibility&ii&&(n._visibility&=~ii,nh(e));break}default:nh(e)}}function oh(e,n){for(;null!==hp;){const t=hp;rh(t,n);const o=t.child;null!==o?(o.return=t,hp=o):lh(e)}}function lh(e){for(;null!==hp;){const n=hp,t=n.sibling,o=n.return;if(vp(n),n===e)return void(hp=null);if(null!==t)return t.return=o,void(hp=t);hp=o}}function rh(e,n){switch(e.tag){case 0:case u:case d:_d(e,n,Rs);break;case g:case m:if(null!==e.memoizedState&&null!==e.memoizedState.cachePool){const n=e.memoizedState.cachePool.pool;null!=n&&Za(n)}break;case c:break;case y:Ja(e.memoizedState.cache);break}}const ih={getCacheForType:function(e){const n=Qa(Xa);let t=n.data.get(e);return void 0===t&&(t=e(),n.data.set(e,t)),t},cacheSignal:function(){return Qa(Xa).controller.signal},getOwner:function(){return void 0}},ah="function"==typeof WeakMap?WeakMap:Map,uh=0,sh=2,ch=4,fh=0,dh=1,ph=2,hh=3,mh=4,gh=6,yh=5;let bh=uh,wh=null,kh=null,vh=0;const Sh=0,Eh=1,xh=2,Ch=3,zh=4,Ph=5,Th=6,Nh=7,Lh=8,Rh=9;let _h=Sh,Mh=null,Oh=!1,Ah=!1,Dh=!1,Fh=0,Ih=fh,Uh=0,Hh=0,jh=0,Vh=0,Bh=0,Qh=null,Wh=null,qh=!1,$h=0,Yh=0;const Kh=300;let Xh=1/0;const Gh=500;let Zh=null;function Jh(){Xh=un()+Gh}function em(){return Xh}let nm=null;const tm=0,om=1,lm=2,rm=3,im=4,am=5;let um=0,sm=null,cm=null,fm=0,dm=0,pm=null,hm=null;const mm=50;let gm=0,ym=null;function bm(){return wh}function wm(){return vh}function km(){return um!==tm&&um!==am}function vm(e){if((bh&sh)!==uh&&0!==vh)return vt(vh);return null!==Ne.T?Dg():Ht()}
15function Sm(){if(0===Vh){const e=xt(vh,Jn)&&!Ta();Vh=e?Jn:function(){const e=rt;return rt<<=1,rt&Vn||(rt=Fn),e}()}const e=ys();return null!==e&&(e.flags|=32),Vh}function Em(e,n,t){if(e===wh&&(_h===xh||_h===Rh)||null!==e.cancelPendingCommit){Um(e,0);Rm(e,vh,Vh,!1)}if(Lm(e,t),(bh&sh)!==uh&&e===wh);else{if(e===wh&&((bh&sh)===uh&&(Hh=zt(Hh,t)),Ih===mh)){Rm(e,vh,Vh,!1)}Pg(e)}}function xm(e,n,t){if((bh&(sh|ch))!==uh)throw new Error("Should not already be working.");const o=!t&&!yt(n)&&!function(e,n){return!!(n&e.expiredLanes)}(e,n)||ct(e,n);let l=o?function(e,n){const t=bh;bh|=sh;const o=Bm(),l=Wm();wh!==e||vh!==n?(Zh=null,Jh(),Um(e,n)):Ah=ct(e,n);e:for(;;)try{if(_h!==Sh&&null!==kh){const n=kh,t=Mh;n:switch(_h){case Eh:_h=Sh,Mh=null,ng(e,n,t,Eh);break;case xh:case Rh:{const o=t;if(Su(o)){_h=Sh,Mh=null,eg(n);break}const l=()=>{_h!==xh&&_h!==Rh||wh!==e||(_h=Nh),Pg(e)};o.then(l,l);break e}case Ch:_h=Nh;break e;case zh:_h=Ph;break e;case Nh:Su(t)?(_h=Sh,Mh=null,eg(n)):(_h=Sh,Mh=null,ng(e,n,t,Nh));break;case Ph:{let o=null;switch(kh.tag){case w:o=kh.memoizedState;case 5:case k:{const e=kh,n=e.type,t=e.pendingProps;if(o?Bb(o):Vb(e.stateNode,n,t)){_h=Sh,Mh=null;const n=e.sibling;if(null!==n)kh=n;else{const n=e.return;null!==n?(kh=n,og(n)):kh=null}break n}break}}_h=Sh,Mh=null,ng(e,n,t,Ph);break}case Th:_h=Sh,Mh=null,ng(e,n,t,Th);break;case Lh:Im(),Ih=gh;break e;default:throw new Error("Unexpected SuspendedReason. This is a bug in React.")}}Zm();break}catch(n){jm(e,n)}return Ma(),Qm(o),qm(l),bh=t,null!==kh?fh:(wh=null,vh=0,ci(),Ih)}(e,n):Xm(e,n,!0),r=o;for(;;){if(l===fh){if(Ah&&!o){Rm(e,n,0,!1)}break}{let t=0;const o=e.current.alternate;if(r&&!Nm(o)){l=Xm(e,n,!1),r=!1;continue}if(l===ph){const t=n,o=dt(e,t);if(0!==o&&(n=o,l=Cm(e,t,o),r=!1,l!==ph))continue}if(l===dh){Um(e,0);Rm(e,n,0,!0);break}Pm(e,l,o,n,t)}break}Pg(e)}function Cm(e,n,t){const o=Qh,l=Ai(e);if(l){Um(e,t).flags|=T}const r=Xm(e,t,!1);if(r!==ph){if(Dh&&!l)return e.errorRecoveryDisabledLanes=zt(e.errorRecoveryDisabledLanes,n),Hh|=n,mh;const t=Wh;Wh=o,null!==t&&zm(t)}return r}function zm(e){null===Wh?Wh=e:Wh.push.apply(Wh,e)}function Pm(e,n,t,o,l){switch(n){case fh:case dh:throw new Error("Root did not complete. This is a bug in React.");case mh:if(!gt(o))break;case gh:return void Rm(e,o,Vh,!Oh);case ph:Wh=null;break;case hh:case yh:break;default:throw new Error("Unknown root exit status.")}
15if(mt(o)){const r=$h+Kh-un();if(r>10){Rm(e,o,Vh,!Oh);if(0!==ut(e,0,!0))return;return fm=o,void(e.timeoutHandle=Hy(Tm.bind(null,e,t,Wh,Zh,qh,o,Vh,Hh,Bh,Oh,n,"Throttled",tu,l),r))}}Tm(e,t,Wh,Zh,qh,o,Vh,Hh,Bh,Oh,n,null,tu,l)}function Tm(e,n,t,o,l,r,i,a,u,s,c,f,d,p){e.timeoutHandle=Vy;const h=16785408,m=n.subtreeFlags;let g=null;if(m&A||(m&h)===h){g={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:qo},function(e,n,t){tp(),Gp(e,n,t)}(n,r,g);const f=function(e,n){e.stylesheets&&0===e.count&&Gb(e,e.stylesheets);if(e.count>0||e.imgCount>0)return t=>{const o=setTimeout((()=>{if(e.stylesheets&&Gb(e,e.stylesheets),e.unsuspend){const n=e.unsuspend;e.unsuspend=null,n()}}),Qb+n);if(e.imgBytes>0&&0===$b){const e=function(){if("function"==typeof performance.getEntriesByType){let e=0,n=0;const t=performance.getEntriesByType("resource");for(let o=0;o<t.length;o++){const l=t[o],r=l.transferSize,i=l.initiatorType,a=l.duration;if(!r||!a||!my(i))continue;let u=0;const s=l.responseEnd;let c;for(c=o+1;c<t.length;c++){const e=t[c],n=e.startTime;if(n>s)break;const o=e.transferSize,l=e.initiatorType;if(!o||!my(l))continue;const r=e.responseEnd;u+=o*(r<s?1:(s-n)/(r-n))}o=c-1;if(n+=8*(r+u)/(l.duration/1e3),e++,e>10)break}if(e>0)return n/e/1e6}if(navigator.connection){const e=navigator.connection.downlink;if("number"==typeof e)return e}return 5}();$b=125*e*qb}const l=e.imgBytes>$b?50:Wb,r=setTimeout((()=>{if(e.waitingForImages=!1,0===e.count&&(e.stylesheets&&Gb(e,e.stylesheets),e.unsuspend)){const n=e.unsuspend;e.unsuspend=null,n()}}),l+n);return e.unsuspend=t,()=>{e.unsuspend=null,clearTimeout(o),clearTimeout(r)}};return null}(g,mt(r)?$h-un():gt(r)?Yh-un():0);if(null!==f){fm=r,e.cancelPendingCommit=f(rg.bind(null,e,n,r,t,o,l,i,a,u,c,g,null,d,p));return void Rm(e,r,i,!s)}}rg(e,n,r,t,o,l,i,a,u)}function Nm(e){let n=e;for(;;){const t=n.tag;if((0===t||t===u||t===d)&&n.flags&M){const e=n.updateQueue;if(null!==e){const n=e.stores;if(null!==n)for(let e=0;e<n.length;e++){const t=n[e],o=t.getSnapshot,l=t.value;try{if(!br(o(),l))return!1}catch(e){return!1}}}}const o=n.child;if(n.subtreeFlags&M&&null!==o)o.return=n,n=o;else{if(n===e)return!0;for(;null===n.sibling;){if(null===n.return||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Lm(e,n){!function(e,n){e.pendingLanes|=n,n!==Zn&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}(e,n)}function Rm(e,n,t,o){n=Pt(n,jh),function(e,n,t,o){e.suspendedLanes|=n,e.pingedLanes&=~n,o&&(e.warmLanes|=n);const l=e.expirationTimes;let r=n;for(;r>0;){const e=St(r),n=1<<e;l[e]=ot,r&=~n}0!==t&&Lt(e,t,n)}(e,n=Pt(n,Hh),t,o)}function _m(e,n){0!==n&&(!function(e,n){e.pendingLanes|=2,e.entangledLanes|=2;let t=n;for(;t;){const n=1<<St(t);e.entanglements[1]|=n,t&=~n}}(e,n),Pg(e),(bh&(sh|ch))===uh&&(Jh(),Tg()))}function Mm(){return bh}function Om(){return(bh&(sh|ch))!==uh||(Tg(),!1)}function Am(){return(bh&sh)!==uh}function Dm(e){Fh=e}function Fm(){return Fh}function Im(){if(null===kh)return;let e;for(_h===Sh?e=kh.return:(Hm(kh),e=kh);null!==e;){Cd(e.alternate,e),e=e.return}kh=null}function Um(e,n){const t=e.timeoutHandle;t!==Vy&&(e.timeoutHandle=Vy,jy(t));const o=e.cancelPendingCommit;null!==o&&(e.cancelPendingCommit=null,o()),fm=0,Im(),wh=e;const l=Pi(e.current,null);return kh=l,vh=n,_h=Sh,Mh=null,Oh=!1,Ah=ct(e,n),Dh=!1,Ih=fh,Uh=0,Hh=0,jh=0,Vh=0,Bh=0,Qh=null,Wh=null,qh=!1,Fh=function(e,n){let t=n;8&t&&(t|=t&xn);const o=e.entangledLanes;if(0!==o){const n=e.entanglements;let l=t&o;for(;l>0;){const e=St(l),o=1<<e;t|=n[e],l&=~o}}return t}(e,n),ci(),l}function Hm(e){Ma(),Zs(e),Nu=null,Lu=0}function jm(e,n){if(Ms=null,Ne.H=pf,n===bu||n===ku)n=Pu(),_h=Ch;else if(n===wu)n=Pu(),_h=zh;else if(n===Mf)_h=Lh;else{const e=null!==n&&"object"==typeof n&&"function"==typeof n.then;_h=e?Th:Eh}Mh=n;if(null===kh)return Ih=dh,void zf(e,Fi(n,e.current))}function Vm(){const e=ys();return null===e||(gt(vh)?null===fs():!(!mt(vh)&&!xt(vh,Jn))&&e===fs())}function Bm(e){const n=Ne.H;return Ne.H=pf,null===n?pf:n}function Qm(e){Ne.H=e}function Wm(){const e=Ne.A;return Ne.A=ih,e}function qm(e){Ne.A=e}function $m(e){Uh=zt(e,Uh)}function Ym(){if(Ih=mh,Oh||!gt(vh)&&null!==ys()||(Ah=!0),(ht(Uh)||ht(Hh))&&null!==wh){Rm(wh,vh,Vh,!1)}}function Km(){Ih!==mh&&(Ih=ph)}function Xm(e,n,t){const o=bh;bh|=sh;const l=Bm(),r=Wm();wh===e&&vh===n||(Zh=null,Um(e,n));let i=!1,a=Ih;e:for(;;)try{if(_h!==Sh&&null!==kh){const n=kh,o=Mh;switch(_h){case Lh:Im(),a=gh;break e;case Ch:case xh:case Rh:case Th:{null===ys()&&(i=!0);const l=_h;
15if(_h=Sh,Mh=null,ng(e,n,o,l),t&&Ah){a=fh;break e}break}default:{const t=_h;_h=Sh,Mh=null,ng(e,n,o,t);break}}}Gm(),a=Ih;break}catch(n){jm(e,n)}return i&&e.shellSuspendCounter++,Ma(),bh=o,Qm(l),qm(r),null!==kh||(wh=null,vh=0,ci()),a}function Gm(){for(;null!==kh;)Jm(kh)}function Zm(){for(;null!==kh&&!rn();)Jm(kh)}function Jm(e){let n;n=gd(e.alternate,e,Fh),e.memoizedProps=e.pendingProps,null===n?og(e):kh=n}function eg(e){let n;n=function(e){const n=e.alternate;let t;switch(e.tag){case d:case 0:{const o=e.type;let l;t=Yf(n,e,e.pendingProps,o,l,vh);break}case u:{const o=e.type.render;t=Yf(n,e,e.pendingProps,o,e.ref,vh);break}case 5:Zs(e);default:Cd(n,e),t=gd(n,e=kh=Ti(e,Fh),Fh)}return t}(e),e.memoizedProps=e.pendingProps,null===n?og(e):kh=n}function ng(e,n,t,o){Hm(n);const l=n.return;try{if(_f(e,l,n,t,vh))return void tg(e,t)}catch(n){if(null!==l)throw kh=l,n;return void tg(e,t)}if(n.flags&F){let e;if(Ta()||o===Eh)e=!0;else if(Ah||xt(vh,Jn))e=!1;else if(e=!0,Oh=!0,o===xh||o===Rh||o===Ch||o===Th){const e=ys();null!==e&&e.tag===c&&(e.flags|=O)}lg(n,e)}else og(n)}function tg(e,n){Ih=dh,zf(e,Fi(n,e.current)),kh=null}function og(e){let n=e;do{if(n.flags&F){return void lg(n,Oh)}const e=n.alternate,t=n.return;let o;if(o=Ed(e,n,Fh),null!==o)return void(kh=o);const l=n.sibling;if(null!==l)return void(kh=l);n=t,kh=n}while(null!==n);Ih===fh&&(Ih=yh)}function lg(e,n){let t=e;do{const e=xd(t.alternate,t);if(null!==e)return e.flags&=32767,void(kh=e);const o=t.return;if(null!==o&&(o.flags|=F,o.subtreeFlags=0,o.deletions=null),!n){const e=t.sibling;if(null!==e)return void(kh=e)}t=o,kh=t}while(null!==t);Ih=gh,kh=null}function rg(e,n,t,o,l,r,i,a,u,s,c,f,d,p){e.cancelPendingCommit=null;do{fg()}while(um!==tm);if((bh&(sh|ch))!==uh)throw new Error("Should not already be working.");if(null===n)return;if(n===e.current)throw new Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");let h=zt(n.lanes,n.childLanes);let m;h=zt(h,fi()),function(e,n,t,o,l,r){const i=e.pendingLanes,a=i&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=t,e.entangledLanes&=t,e.errorRecoveryDisabledLanes&=t,e.shellSuspendCounter=0;const u=e.entanglements,s=e.expirationTimes,c=e.hiddenUpdates;let f=a;for(;f>0;){const e=St(f),n=1<<e;u[e]=0,s[e]=ot;const t=c[e];if(null!==t){c[e]=null;for(let e=0;e<t.length;e++){const n=t[e];null!==n&&(n.lane&=-536870913)}}f&=~n}if(0!==o&&Lt(e,o,0),0!==r&&0===l&&0!==e.tag){const t=r&~(i&~n);e.suspendedLanes|=t}}(e,t,h,i,a,u),e===wh&&(wh=null,kh=null,vh=0),cm=n,sm=e,fm=t,dm=h,pm=l,hm=o,m=X,n.subtreeFlags&m||n.flags&m?(e.callbackNode=null,e.callbackPriority=0,on(dn,(()=>(dg(),null)))):(e.callbackNode=null,e.callbackPriority=0);const g=!!(13878&n.subtreeFlags),y=!!(13878&n.flags);if(g||y){const t=Ne.T;Ne.T=null;const o=Ut();It(2);const l=bh;bh|=ch;try{gp(e,n)}finally{bh=l,It(o),Ne.T=t}}um=om,ig(),ag(),ug()}function ig(){if(um!==om)return;um=tm;const e=sm,n=cm,t=!!(n.subtreeFlags&Y),o=!!(n.flags&Y);if(t||o){const t=Ne.T;Ne.T=null;const o=Ut();It(2);const r=bh;bh|=ch;try{!function(e,n){_p(n,e)}(e,n),l=e.containerInfo,Lr(Oy,l),dw(My),My=null,Oy=null}finally{bh=r,It(o),Ne.T=t}}var l;e.current=n,um=lm}function ag(){if(um!==lm)return;um=tm;const e=sm,n=cm,t=!!(n.subtreeFlags&K),o=!!(n.flags&K);if(t||o){const t=Ne.T;Ne.T=null;const o=Ut();It(2);const l=bh;bh|=ch;try{r,function(e,n){kp(n,e.alternate,e)}(n,e)}finally{bh=l,It(o),Ne.T=t}}um=rm}function ug(){if(um!==im&&um!==rm)return;um=tm,an();const e=sm,n=cm,t=fm,o=hm,l=X;!!(n.subtreeFlags&l)||!!(n.flags&l)?um=am:(um=tm,sm=null,cm=null,cg(e,e.pendingLanes));let r=e.pendingLanes;0===r&&(nm=null);Ft(t);if(function(e){if(bn&&"function"==typeof bn.onCommitFiberRoot)try{const n=(e.current.flags&E)===E;bn.onCommitFiberRoot(yn,e,void 0,n)}catch(e){}}(n.stateNode),null!==o){const n=Ne.T,t=Ut();It(2),Ne.T=null;try{const n=e.onRecoverableError;for(let e=0;e<o.length;e++){const t=o[e],l=sg(t.stack);n(t.value,l)}}finally{Ne.T=n,It(t)}}pt(fm)&&fg(),Pg(e),r=e.pendingLanes,xt(t,nt)&&xt(r,42)?e===ym?gm++:(gm=0,ym=e):gm=0,Tg()}function sg(e){return{componentStack:e}}function cg(e,n){if(0===(e.pooledCacheLanes&=n)){const n=e.pooledCache;null!=n&&(e.pooledCache=null,Ja(n))}}function fg(){return ig(),ag(),ug(),dg()}function dg(){if(um!==am)return!1;const e=sm,n=dm;
15dm=0;const t=Ft(fm),o=(r=t,0===(l=Ot)||l>r?l:r);var l,r;const i=Ne.T,a=Ut();try{return It(o),Ne.T=null,function(){const e=pm;pm=null;const n=sm,t=fm;if(um=tm,sm=null,cm=null,fm=0,(bh&(sh|ch))!==uh)throw new Error("Cannot flush passive effects while already rendering.");const o=bh;return bh|=ch,function(e){eh(e)}(n.current),function(e,n,t,o){Qp(e,n,t,o)}(n,n.current,t,e),bh=o,Tg(),function(e){if(bn&&"function"==typeof bn.onPostCommitFiberRoot)try{bn.onPostCommitFiberRoot(yn,e)}catch(e){}}(n),!0}()}finally{It(a),Ne.T=i,cg(e,n)}}function pg(e){return null!==nm&&nm.has(e)}function hg(e,n,t){const o=Fi(t,n),l=qu(e,Tf(e.stateNode,o,2),2);null!==l&&(Lm(l,2),Pg(l))}function mg(e,n,t){if(3===e.tag)return void hg(e,e,t);let o=n;for(;null!==o;){if(3===o.tag)return void hg(o,e,t);if(1===o.tag){const n=o.type,l=o.stateNode;if("function"==typeof n.getDerivedStateFromError||"function"==typeof l.componentDidCatch&&!pg(l)){const n=Fi(t,e),l=Nf(2),r=qu(o,l,2);return void(null!==r&&(Lf(l,r,o,n),Lm(r,2),Pg(r)))}}o=o.return}}function gg(e,n,t){let o,l=e.pingCache;if(null===l?(l=e.pingCache=new ah,o=new Set,l.set(n,o)):(o=l.get(n),void 0===o&&(o=new Set,l.set(n,o))),!o.has(t)){Dh=!0,o.add(t);const l=yg.bind(null,e,n,t);n.then(l,l)}}function yg(e,n,t){const o=e.pingCache;null!==o&&o.delete(n),function(e,n){!function(e,n){e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n}(e,n)}(e,t),wh===e&&Ct(vh,t)&&(Ih===mh||Ih===hh&&mt(vh)&&un()-$h<Kh?(bh&sh)===uh&&Um(e,0):jh=zt(jh,t),Bh===vh&&(Bh=0)),Pg(e)}function bg(e,n){0===n&&(n=wt());const t=hi(e,n);null!==t&&(Lm(t,n),Pg(t))}function wg(e){const n=e.memoizedState;let t=0;null!==n&&(t=n.retryLane),bg(e,t)}function kg(e,n){let t,o=0;switch(e.tag){case S:case c:t=e.stateNode;const n=e.memoizedState;null!==n&&(o=n.retryLane);break;case h:t=e.stateNode;break;case m:t=e.stateNode._retryCache;break;default:throw new Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}null!==t&&t.delete(n),bg(e,o)}let vg=null,Sg=null,Eg=!1,xg=!1,Cg=!1,zg=0;function Pg(e){e===Sg||null!==e.next||(null===Sg?vg=Sg=e:(Sg.next=e,Sg=e)),xg=!0,Eg||(Eg=!0,Qy((()=>{(Mm()&(sh|ch))===uh?Rg():on(cn,Lg)})))}function Tg(){Ng(0,!1)}function Ng(e,n){if(Cg)return;if(!xg)return;let t;Cg=!0;do{t=!1;let o=vg;for(;null!==o;){if(n);else if(0!==e){const n=st(o,e);0!==n&&(t=!0,Og(o,n))}else{const e=bm(),n=wm(),l=ut(o,o===e?n:0,null!==o.cancelPendingCommit||o.timeoutHandle!==Vy);pt(l)&&!ct(o,l)&&(t=!0,Og(o,l))}o=o.next}}while(t);Cg=!1}function Lg(){Rg()}function Rg(){Eg=!1,xg=!1;let e=0;0!==zg&&function(){const e=window.event;if(e&&"popstate"===e.type)return e!==Uy&&(Uy=e,!0);return Uy=null,!1}()&&(e=zg);const n=un();let t=null,o=vg;for(;null!==o;){const l=o.next,r=_g(o,n);0===r?(o.next=null,null===t?vg=l:t.next=l,null===l&&(Sg=t)):(t=o,(0!==e||pt(r))&&(xg=!0)),o=l}km()||Ng(e,!1),0!==zg&&(zg=0)}function _g(e,n){!function(e,n){const t=e.pendingLanes,o=e.suspendedLanes,l=e.pingedLanes,r=e.expirationTimes;let i=-62914561&t;for(;i>0;){const t=St(i),a=1<<t,u=r[t];u===ot?a&o&&!(a&l)||(r[t]=ft(a,n)):u<=n&&(e.expiredLanes|=a),i&=~a}}(e,n);const t=bm(),o=wm(),l=ut(e,e===t?o:0,null!==e.cancelPendingCommit||e.timeoutHandle!==Vy),r=e.callbackNode;if(0===l||e===t&&(_h===xh||_h===Rh)||null!==e.cancelPendingCommit)return null!==r&&Ag(r),e.callbackNode=null,e.callbackPriority=0,0;if(pt(l)&&!ct(e,l))return null!==r&&Ag(r),e.callbackPriority=2,e.callbackNode=null,2;{const n=e.callbackPriority,t=kt(l);if(t===n)return t;let o;switch(Ag(r),Ft(l)){case 2:case 8:o=fn;break;case Ot:o=dn;break;case At:o=hn;break;default:o=dn}const u=(i=o,a=Mg.bind(null,e),on(i,a));return e.callbackPriority=t,e.callbackNode=u,t}var i,a}function Mg(e,n){if(km())return e.callbackNode=null,e.callbackPriority=0,null;const t=e.callbackNode;if(fg()&&e.callbackNode!==t)return null;const o=bm(),l=wm(),r=ut(e,e===o?l:0,null!==e.cancelPendingCommit||e.timeoutHandle!==Vy);if(0===r)return null;return xm(e,r,n),_g(e,un()),null!=e.callbackNode&&e.callbackNode===t?Mg.bind(null,e):null}function Og(e,n){if(fg())return null;xm(e,n,!0)}function Ag(e){null!==e&&ln(e)}function Dg(e){if(0===zg){const e=su();zg=0!==e?e:function(){const e=lt;return lt<<=1,lt&jn||(lt=Pn),e}()}return zg}function Fg(e){return null==e||"symbol"==typeof e||"boolean"==typeof e?null:"function"==typeof e?e:Wo(""+e)}function Ig(e,n){const t=n.ownerDocument.createElement("input");
15t.name=n.name,t.value=n.value,e.id&&t.setAttribute("form",e.id),n.parentNode.insertBefore(t,n);const o=new FormData(e);return t.parentNode.removeChild(t),o}function Ug(e,n,t,o,l,r,i){if("submit"!==n)return;if(!t||t.stateNode!==l)return;const a=t,u=l;let s,c=Fg(oo(u).action),f=o.submitter;if(f){const e=oo(f);s=e?Fg(e.formAction):f.getAttribute("formAction"),null!==s&&(c=s,f=null)}const d=new hl("action","action",null,o,l);e.push({event:d,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(0!==zg){const e=f?Ig(u,f):new FormData(u),n={pending:!0,data:e,method:u.method,action:c};Zc(a,n,null,e)}}else if("function"==typeof c){d.preventDefault();const e=f?Ig(u,f):new FormData(u),n={pending:!0,data:e,method:u.method,action:c};Zc(a,n,c,e)}},currentTarget:u}]})}function Hg(e,n,t,o){Zc(e,{pending:!0,data:o,method:n.method,action:t},t,o)}function jg(e,n,t,o,l,r,i){Jr(e,n,t,o,l,r);!(7&r)&&(yr(e,n,t,o,l),gr(e,n,t,o,l),function(e,n,t,o,l){const r=t?to(t):window;switch(n){case"focusin":(tr(r)||"true"===r.contentEditable)&&(Mr=r,Or=t,Ar=null);break;case"focusout":Mr=null,Or=null,Ar=null;break;case"mousedown":Dr=!0;break;case"contextmenu":case"mouseup":case"dragend":Dr=!1,Fr(e,o,l);break;case"selectionchange":if(_r)break;case"keydown":case"keyup":Fr(e,o,l)}}(e,n,t,o,l),function(e,n,t,o,l){Zl(e,n,t,o,l),er(e,n,t,o,l)}(e,n,t,o,l),Ug(e,n,t,o,l))}!function(){for(let e=0;e<Gr.length;e++){const n=Gr[e];Zr(n.toLowerCase(),"on"+(n[0].toUpperCase()+n.slice(1)))}Zr(Br,"onAnimationEnd"),Zr(Qr,"onAnimationIteration"),Zr(Wr,"onAnimationStart"),Zr("dblclick","onDoubleClick"),Zr("focusin","onFocus"),Zr("focusout","onBlur"),Zr(qr,"onTransitionRun"),Zr($r,"onTransitionStart"),Zr(Yr,"onTransitionCancel"),Zr(Kr,"onTransitionEnd")}(),po("onMouseEnter",["mouseout","mouseover"]),po("onMouseLeave",["mouseout","mouseover"]),po("onPointerEnter",["pointerout","pointerover"]),po("onPointerLeave",["pointerout","pointerover"]),fo("onChange",["change","click","focusin","focusout","input","keydown","keyup","selectionchange"]),fo("onSelect",["focusout","contextmenu","dragend","focusin","keydown","keyup","mousedown","mouseup","selectionchange"]),fo("onBeforeInput",["compositionend","keypress","textInput","paste"]),fo("onCompositionEnd",["compositionend","focusout","keydown","keypress","keyup","mousedown"]),fo("onCompositionStart",["compositionstart","focusout","keydown","keypress","keyup","mousedown"]),fo("onCompositionUpdate",["compositionupdate","focusout","keydown","keypress","keyup","mousedown"]);const Vg=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","resize","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],Bg=new Set(["beforetoggle","cancel","close","invalid","load","scroll","scrollend","toggle"].concat(Vg));function Qg(e,n,t){e.currentTarget=t;try{n(e)}catch(e){li(e)}e.currentTarget=null}function Wg(e,n,t){let o;if(t)for(let t=n.length-1;t>=0;t--){const l=n[t],r=l.instance,i=l.currentTarget,a=l.listener;if(r!==o&&e.isPropagationStopped())return;Qg(e,a,i),o=r}else for(let t=0;t<n.length;t++){const l=n[t],r=l.instance,i=l.currentTarget,a=l.listener;if(r!==o&&e.isPropagationStopped())return;Qg(e,a,i),o=r}}function qg(e,n){const t=!!(4&n);for(let n=0;n<e.length;n++){const o=e[n];Wg(o.event,o.listeners,t)}}function $g(e,n){const t=!1,o=function(e){let n=e[qt];return void 0===n&&(n=e[qt]=new Set),n}(n),l=function(e,n){return e+"__"+(n?"capture":"bubble")}(e,t);o.has(l)||(Gg(n,e,2,t),o.add(l))}function Yg(e,n,t){let o=0;n&&(o|=4),Gg(t,e,o,n)}const Kg="_reactListening"+Math.random().toString(36).slice(2);function Xg(e){if(!e[Kg]){e[Kg]=!0,so.forEach((n=>{"selectionchange"!==n&&(Bg.has(n)||Yg(n,!1,e),Yg(n,!0,e))}));const n=9===e.nodeType?e:e.ownerDocument;null!==n&&(n[Kg]||(n[Kg]=!0,Yg("selectionchange",!1,n)))}}function Gg(e,n,t,o,l){let r,i=function(e,n,t){let o;switch(ww(n)){case 2:o=pw;break;case 8:o=hw;break;default:o=mw}return o.bind(null,n,t,e)}(e,n,t);ol&&("touchstart"!==n&&"touchmove"!==n&&"wheel"!==n||(r=!0)),o?void 0!==r?function(e,n,t,o){e.addEventListener(n,t,{capture:!0,passive:o})}(e,n,i,r):function(e,n,t){e.addEventListener(n,t,!0)}(e,n,i):void 0!==r?function(e,n,t,o){e.addEventListener(n,t,{passive:o})}(e,n,i,r):function(e,n,t){e.addEventListener(n,t,!1)}(e,n,i)}function Zg(e,n){return e===n||!1}function Jg(e,n,t,o,l){let r=o;if(!(1&n||2&n)){const e=l;if(null!==o){let n=o;e:for(;;){if(null===n)return;const t=n.tag;if(3===t||4===t){let o=n.stateNode.containerInfo;
15if(Zg(o,e))break;if(4===t){let t=n.return;for(;null!==t;){const n=t.tag;if(3===n||4===n){if(Zg(t.stateNode.containerInfo,e))return}t=t.return}}for(;null!==o;){const e=eo(o);if(null===e)return;const t=e.tag;if(5===t||6===t||t===w||t===k){n=r=e;continue e}o=o.parentNode}}n=n.return}}}el((()=>function(e,n,t,o){const l=[];jg(l,e,o,t,Yo(t),n),qg(l,n)}(e,n,t,r)))}function ey(e,n,t){return{instance:e,listener:n,currentTarget:t}}function ny(e,n){const t=n+"Capture",o=[];let l=e;for(;null!==l;){const e=l,r=e.stateNode,i=e.tag;if((5===i||i===w||i===k)&&null!==r){const e=r,i=nl(l,t);null!=i&&o.unshift(ey(l,i,e));const a=nl(l,n);null!=a&&o.push(ey(l,a,e))}if(3===l.tag)return o;l=l.return}return[]}function ty(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag&&e.tag!==k);return e||null}function oy(e,n,t,o,l){const r=n._reactName,i=[];let a=t;for(;null!==a&&a!==o;){const e=a,n=e.alternate,t=e.stateNode,u=e.tag;if(null!==n&&n===o)break;if((5===u||u===w||u===k)&&null!==t){const e=t;if(l){const n=nl(a,r);null!=n&&i.unshift(ey(a,n,e))}else if(!l){const n=nl(a,r);null!=n&&i.push(ey(a,n,e))}}a=a.return}0!==i.length&&e.push({event:n,listeners:i})}const ly=/\r\n?/g,ry=/\u0000|\uFFFD/g;function iy(e){return("string"==typeof e?e:""+e).replace(ly,"\n").replace(ry,"")}function ay(e,n){const t=iy(n);return iy(e)===t}function uy(e){e.onclick=qo}const sy="http://www.w3.org/1999/xlink",cy="http://www.w3.org/XML/1998/namespace";function fy(e,n,t,o,l,r){switch(t){case"children":if("string"==typeof o){"body"!==n&&("textarea"!==n||""!==o)&&Do(e,o)}else{if("number"!=typeof o&&"bigint"!=typeof o)return;"body"!==n&&Do(e,""+o)}break;case"className":wo(e,"class",o);break;case"tabIndex":wo(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":wo(e,t,o);break;case"style":return void Uo(e,o,r);case"data":if("object"!==n){wo(e,"data",o);break}case"src":case"href":{if(""===o&&("a"!==n||"href"!==t)){e.removeAttribute(t);break}if(null==o||"function"==typeof o||"symbol"==typeof o||"boolean"==typeof o){e.removeAttribute(t);break}const l=Wo(""+o);e.setAttribute(t,l);break}case"action":case"formAction":{if("function"==typeof o){e.setAttribute(t,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}if("function"==typeof r&&("formAction"===t?("input"!==n&&fy(e,n,"name",l.name,l,null),fy(e,n,"formEncType",l.formEncType,l,null),fy(e,n,"formMethod",l.formMethod,l,null),fy(e,n,"formTarget",l.formTarget,l,null)):(fy(e,n,"encType",l.encType,l,null),fy(e,n,"method",l.method,l,null),fy(e,n,"target",l.target,l,null))),null==o||"symbol"==typeof o||"boolean"==typeof o){e.removeAttribute(t);break}const i=Wo(""+o);e.setAttribute(t,i);break}case"onClick":return void(null!=o&&uy(e));case"onScroll":return void(null!=o&&$g("scroll",e));case"onScrollEnd":return void(null!=o&&$g("scrollend",e));case"dangerouslySetInnerHTML":if(null!=o){if("object"!=typeof o||!("__html"in o))throw new Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");const n=o.__html;if(null!=n){if(null!=l.children)throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");e.innerHTML=n}}break;case"multiple":e.multiple=o&&"function"!=typeof o&&"symbol"!=typeof o;break;case"muted":e.muted=o&&"function"!=typeof o&&"symbol"!=typeof o;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":break;case"xlinkHref":{if(null==o||"function"==typeof o||"boolean"==typeof o||"symbol"==typeof o){e.removeAttribute("xlink:href");break}const n=Wo(""+o);e.setAttributeNS(sy,"xlink:href",n);break}case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":null!=o&&"function"!=typeof o&&"symbol"!=typeof o?e.
15setAttribute(t,""+o):e.removeAttribute(t);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&"function"!=typeof o&&"symbol"!=typeof o?e.setAttribute(t,""):e.removeAttribute(t);break;case"capture":case"download":!0===o?e.setAttribute(t,""):!1!==o&&null!=o&&"function"!=typeof o&&"symbol"!=typeof o?e.setAttribute(t,o):e.removeAttribute(t);break;case"cols":case"rows":case"size":case"span":null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&!isNaN(o)&&o>=1?e.setAttribute(t,o):e.removeAttribute(t);break;case"rowSpan":case"start":null==o||"function"==typeof o||"symbol"==typeof o||isNaN(o)?e.removeAttribute(t):e.setAttribute(t,o);break;case"popover":$g("beforetoggle",e),$g("toggle",e),bo(e,"popover",o);break;case"xlinkActuate":ko(e,sy,"xlink:actuate",o);break;case"xlinkArcrole":ko(e,sy,"xlink:arcrole",o);break;case"xlinkRole":ko(e,sy,"xlink:role",o);break;case"xlinkShow":ko(e,sy,"xlink:show",o);break;case"xlinkTitle":ko(e,sy,"xlink:title",o);break;case"xlinkType":ko(e,sy,"xlink:type",o);break;case"xmlBase":ko(e,cy,"xml:base",o);break;case"xmlLang":ko(e,cy,"xml:lang",o);break;case"xmlSpace":ko(e,cy,"xml:space",o);break;case"is":bo(e,"is",o);break;case"innerText":case"textContent":return;default:if(t.length>2&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1]))return;bo(e,(i=t,Bo.get(i)||i),o)}var i}function dy(e,n,t,o,l,r){switch(t){case"style":return void Uo(e,o,r);case"dangerouslySetInnerHTML":if(null!=o){if("object"!=typeof o||!("__html"in o))throw new Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");const n=o.__html;if(null!=n){if(null!=l.children)throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");e.innerHTML=n}}break;case"children":if("string"==typeof o)Do(e,o);else{if("number"!=typeof o&&"bigint"!=typeof o)return;Do(e,""+o)}break;case"onScroll":return void(null!=o&&$g("scroll",e));case"onScrollEnd":return void(null!=o&&$g("scrollend",e));case"onClick":return void(null!=o&&uy(e));case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":return;default:return co.hasOwnProperty(t)?void 0:void function(e,n,t){if("o"===n[0]&&"n"===n[1]){const o=n.endsWith("Capture"),l=n.slice(2,o?n.length-7:void 0),r=oo(e),i=null!=r?r[n]:null;if("function"==typeof i&&e.removeEventListener(l,i,o),"function"==typeof t)return"function"!=typeof i&&null!==i&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),void e.addEventListener(l,t,o)}n in e?e[n]=t:!0!==t?bo(e,n,t):e.setAttribute(n,"")}(e,t,o)}}function py(e,n,t){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":{$g("error",e),$g("load",e);let o=!1,l=!1;for(const r in t){if(!t.hasOwnProperty(r))continue;const i=t[r];if(null!=i)switch(r){case"src":o=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw new Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:fy(e,n,r,i,t,null)}}return l&&fy(e,n,"srcSet",t.srcSet,t,null),void(o&&fy(e,n,"src",t.src,t,null))}case"input":{$g("invalid",e);let o=null,l=null,r=null,i=null,a=null,u=null;for(const s in t){if(!t.hasOwnProperty(s))continue;const c=t[s];if(null!=c)switch(s){case"name":o=c;break;case"type":l=c;break;case"checked":a=c;break;case"defaultChecked":u=c;break;case"value":r=c;break;case"defaultValue":i=c;break;case"children":case"dangerouslySetInnerHTML":if(null!=c)throw new Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:fy(e,n,s,c,t,null)}}return void Ro(e,r,i,a,u,l,o,!1)}case"select":{$g("invalid",e);let o=null,l=null,r=null;for(const i in t){if(!t.hasOwnProperty(i))continue;const a=t[i];if(null!=a)switch(i){case"value":o=a;break;case"defaultValue":l=a;break;case"multiple":r=a;default:fy(e,n,i,a,t,null)}}return void function(e,n,t,o){const l=e;l.multiple=!!o,null!=n?Mo(l,!!o,n,!1):null!=t&&Mo(l,!!o,t,!0)}(e,o,l,r)}case"textarea":{$g("invalid",e);let o=null,l=null,r=null;for(const i in t){if(!t.hasOwnProperty(i))continue;const a=t[i];if(null!=a)switch(i){case"value":o=a;break;case"defaultValue":l=a;break;case"children":r=a;break;case"dangerouslySetInnerHTML":if(null!=a)throw new Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:fy(e,n,i,a,t,null)}}return void Ao(e,o,l,r)}case"option":for(const o in t){if(!t.hasOwnProperty(o))continue;const l=t[o];if(null!=l)if("selected"===o)e.selected=l&&"function"!=typeof l&&"symbol"!=typeof l;else fy(e,n,o,l,t,null)}return;case"dialog":$g("beforetoggle",e),$g("toggle",e),$g("cancel",e),$g("close",e);break;case"iframe":case"object":$g("load",e);break;case"video":case"audio":for(let n=0;n<Vg.length;n++)$g(Vg[n],e);break;case"image":$g("error",e),$g("load",e);break;case"details":$g("toggle",e);break;case"embed":case"source":case"link":$g("error",e),$g("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(const o in t){if(!t.hasOwnProperty(o))continue;const l=t[o];if(null!=l)switch(o){case"children":case"dangerouslySetInnerHTML":throw new Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:fy(e,n,o,l,t,null)}}return;default:if(Vo(n)){for(const n in t){if(!t.hasOwnProperty(n))continue;const o=t[n];void 0!==o&&dy(e,0,n,o,t,void 0)}return}}for(const o in t){if(!t.hasOwnProperty(o))continue;const l=t[o];null!=l&&fy(e,n,o,l,t,null)}}var hy="19.2.3";function my(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}
15const gy="&",yy="/&",by="$",wy="/$",ky="$?",vy="$~",Sy="$!",Ey="html",xy="body",Cy="head",zy="F!",Py="F",Ty="loading",Ny="style",Ly=0,Ry=1,_y=2;let My=null,Oy=null;function Ay(e){return 9===e.nodeType?e:e.ownerDocument}function Dy(e){switch(e){case jo:return Ry;case Ho:return _y;default:return Ly}}function Fy(e,n){if(e===Ly)switch(n){case"svg":return Ry;case"math":return _y;default:return Ly}return e===Ry&&"foreignObject"===n?Ly:e}function Iy(e,n){return"textarea"===e||"noscript"===e||"string"==typeof n.children||"number"==typeof n.children||"bigint"==typeof n.children||"object"==typeof n.dangerouslySetInnerHTML&&null!==n.dangerouslySetInnerHTML&&null!=n.dangerouslySetInnerHTML.__html}let Uy=null;const Hy="function"==typeof setTimeout?setTimeout:void 0,jy="function"==typeof clearTimeout?clearTimeout:void 0,Vy=-1,By="function"==typeof Promise?Promise:void 0;const Qy="function"==typeof queueMicrotask?queueMicrotask:void 0!==By?e=>By.resolve(null).then(e).catch(Wy):Hy;function Wy(e){setTimeout((()=>{throw e}))}function qy(e){Do(e,"")}function $y(e){return"head"===e}function Yy(e,n){let t=n,o=0;do{const l=t.nextSibling;if(e.removeChild(t),l&&8===l.nodeType){const t=l.data;if(t===wy||t===yy){if(0===o)return e.removeChild(l),void Fw(n);o--}else if(t===by||t===ky||t===vy||t===Sy||t===gy)o++;else if(t===Ey){fb(e.ownerDocument.documentElement)}else if(t===Cy){const n=e.ownerDocument.head;fb(n),nb(n)}else if(t===xy){fb(e.ownerDocument.body)}}t=l}while(t);Fw(n)}function Ky(e,n){let t=e,o=0;do{const e=t.nextSibling;if(1===t.nodeType){const e=t;n?(e._stashedDisplay=e.style.display,e.style.display="none"):(e.style.display=e._stashedDisplay||"",""===e.getAttribute("style")&&e.removeAttribute("style"))}else if(3===t.nodeType){const e=t;n?(e._stashedText=e.nodeValue,e.nodeValue=""):e.nodeValue=e._stashedText||""}if(e&&8===e.nodeType){const n=e.data;if(n===wy){if(0===o)return;o--}else n!==by&&n!==ky&&n!==vy&&n!==Sy||o++}t=e}while(t)}function Xy(e,n,t){e.style.viewTransitionName=n,null!=t&&(e.style.viewTransitionClass=t);const o=getComputedStyle(e);if("inline"===o.display){const n=e.getClientRects();if(1===function(e){if(1===e.length)return 1;let n=0;for(let t=0;t<e.length;t++){const o=e[t];o.width>0&&o.height>0&&n++}return n}(n)){const t=e.style;t.display=1===n.length?"inline-block":"block",t.marginTop="-"+o.paddingTop,t.marginBottom="-"+o.paddingBottom}}}function Gy(e,n){const t=e.style,o=n[Ny],l=null!=o?o.hasOwnProperty("viewTransitionName")?o.viewTransitionName:o.hasOwnProperty("view-transition-name")?o["view-transition-name"]:null:null;t.viewTransitionName=null==l||"boolean"==typeof l?"":(""+l).trim();const r=null!=o?o.hasOwnProperty("viewTransitionClass")?o.viewTransitionClass:o.hasOwnProperty("view-transition-class")?o["view-transition-class"]:null:null;if(t.viewTransitionClass=null==r||"boolean"==typeof r?"":(""+r).trim(),"inline-block"===t.display)if(null==o)t.display=t.margin="";else{const e=o.display;t.display=null==e||"boolean"==typeof e?"":e;const n=o.margin;if(null!=n)t.margin=n;else{const e=o.hasOwnProperty("marginTop")?o.marginTop:o["margin-top"];t.marginTop=null==e||"boolean"==typeof e?"":e;const n=o.hasOwnProperty("marginBottom")?o.marginBottom:o["margin-bottom"];t.marginBottom=null==n||"boolean"==typeof n?"":n}}}function Zy(e){return function(e,n,t){const o=t.ownerDocument.defaultView;return{rect:e,abs:"absolute"===n.position||"fixed"===n.position,clip:"none"!==n.clipPath||"visible"!==n.overflow||"none"!==n.filter||"n
15one"!==n.mask||"none"!==n.mask||"0px"!==n.borderRadius,view:e.bottom>=0&&e.right>=0&&e.top<=o.innerHeight&&e.left<=o.innerWidth}}(e.getBoundingClientRect(),getComputedStyle(e),e)}function Jy(e){return e.view}function eb(e){let n,t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){switch(n=t,t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":{const e=n;eb(e),Gt(e);continue}case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function nb(e){let n=e.firstChild;for(;n;){const t=n.nextSibling,o=n.nodeName;io(n)||"SCRIPT"===o||"STYLE"===o||"LINK"===o&&"stylesheet"===n.rel.toLowerCase()||e.removeChild(n),n=t}}function tb(e,n){for(;8!==e.nodeType;){if(1===e.nodeType&&"INPUT"===e.nodeName&&"hidden"===e.type);else if(!n)return null;const t=ib(e);if(null===t)return null;e=t}return e}function ob(e){return e.data===ky||e.data===vy}function lb(e){return e.data===Sy||e.data===ky&&e.ownerDocument.readyState!==Ty}function rb(e){for(;null!=e;e=e.nextSibling){const n=e.nodeType;if(1===n||3===n)break;if(8===n){const n=e.data;if(n===by||n===Sy||n===ky||n===vy||n===gy||n===zy||n===Py)break;if(n===wy||n===yy)return null}}return e}function ib(e){return rb(e.nextSibling)}let ab=null;function ub(e){let n=e.nextSibling,t=0;for(;n;){if(8===n.nodeType){const e=n.data;if(e===wy||e===yy){if(0===t)return ib(n);t--}else e!==by&&e!==Sy&&e!==ky&&e!==vy&&e!==gy||t++}n=n.nextSibling}return null}function sb(e){let n=e.previousSibling,t=0;for(;n;){if(8===n.nodeType){const e=n.data;if(e===by||e===Sy||e===ky||e===vy||e===gy){if(0===t)return n;t--}else e!==wy&&e!==yy||t++}n=n.previousSibling}return null}function cb(e,n,t,o,l){const r=Ay(t);switch(e){case"html":{const e=r.documentElement;if(!e)throw new Error("React expected an <html> element (document.documentElement) to exist in the Document but one was not found. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page.");return e}case"head":{const e=r.head;if(!e)throw new Error("React expected a <head> element (document.head) to exist in the Document but one was not found. React never removes the head for any Document it renders into so the cause is likely in some other script running on this page.");return e}case"body":{const e=r.body;if(!e)throw new Error("React expected a <body> element (document.body) to exist in the Document but one was not found. React never removes the body for any Document it renders into so the cause is likely in some other script running on this page.");return e}default:throw new Error("resolveSingletonInstance was called with an element type that is not supported. This is a bug in React.")}}function fb(e){const n=e.attributes;for(;n.length;)e.removeAttributeNode(n[0]);Gt(e)}const db=0,pb=1,hb=2,mb=3,gb=4;const yb=new Map,bb=new Set;function wb(e){return"function"==typeof e.getRootNode?e.getRootNode():9===e.nodeType?e:e.ownerDocument}function kb(){const e=Ue.current;return e?wb(e):null}function vb(e){return e.ownerDocument||e}const Sb=Le.d;Le.d={f:function(){{const e=Sb.f(),n=Om();return e||n}},r:function(e){const n=no(e);null!==n&&5===n.tag&&"form"===n.type?ef(n):Sb.r(e)},D:function(e){Sb.D(e),Cb("dns-prefetch",e,null)},C:function(e,n){Sb.C(e,n),Cb("preconnect",e,n)},L:function(e,n,t){Sb.L(e,n,t);const o=xb();if(o&&e&&n){let l='link[rel="preload"][as="'+No(n)+'"]';"image"===n&&t&&t.imageSrcSet?(l+='[imagesrcset="'+No(t.imageSrcSet)+'"]',"string"==typeof t.imageSizes&&(l+='[imagesizes="'+No(t.imageSizes)+'"]')):l+='[href="'+No(e)+'"]';let r=l;switch(n){case"style":r=Pb(e);break;case"script":r=Lb(e)}if(!yb.has(r)){const i=re({rel:"preload",href:"image"===n&&t&&t.imageSrcSet?void 0:e,as:n},t);if(yb.set(r,i),null===o.querySelector(l)){if("style"===n&&o.querySelector(Tb(r)))return;if("script"===n&&o.querySelector(Rb(r)))return;const e=o.createElement("link");py(e,"link",i),ao(e),o.head.appendChild(e)}}}},m:function(e,n){Sb.m(e,n);const t=xb();if(t&&e){const o=n&&"string"==typeof n.as?n.as:"script",l='link[rel="modulepreload"][as="'+No(o)+'"][href="'+No(e)+'"]';let r=l;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=Lb(e)}if(!yb.has(r)){const i=re({rel:"modulepreload",href:e},n);if(yb.set(r,i),null===t.querySelector(l)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(t.querySelector(Rb(r)))return}const e=t.createElement("link");py(e,"link",i),ao(e),t.head.appendChild(e)}}}}
15,X:function(e,n){Sb.X(e,n);const t=xb();if(t&&e){const o=ro(t).hoistableScripts,l=Lb(e);let r=o.get(l);if(r)return;let i=t.querySelector(Rb(l));if(!i){const o=re({src:e,async:!0},n),r=yb.get(l);r&&Db(o,r),i=t.createElement("script"),ao(i),py(i,"link",o),t.head.appendChild(i)}return r={type:"script",instance:i,count:1,state:null},void o.set(l,r)}},S:function(e,n,t){Sb.S(e,n,t);const o=xb();if(o&&e){const l=ro(o).hoistableStyles,r=Pb(e);n=n||"default";let i=l.get(r);if(i)return;const a={loading:db,preload:null};let u=o.querySelector(Tb(r));if(u)a.loading=pb|gb;else{const l=re({rel:"stylesheet",href:e,"data-precedence":n},t),i=yb.get(r);i&&Ab(l,i);const s=u=o.createElement("link");ao(s),py(s,"link",l),s._p=new Promise(((e,n)=>{s.onload=e,s.onerror=n})),s.addEventListener("load",(()=>{a.loading|=pb})),s.addEventListener("error",(()=>{a.loading|=hb})),a.loading|=gb,Ob(u,n,o)}return i={type:"stylesheet",instance:u,count:1,state:a},void l.set(r,i)}},M:function(e,n){Sb.M(e,n);const t=xb();if(t&&e){const o=ro(t).hoistableScripts,l=Lb(e);let r=o.get(l);if(r)return;let i=t.querySelector(Rb(l));if(!i){const o=re({src:e,async:!0,type:"module"},n),r=yb.get(l);r&&Db(o,r),i=t.createElement("script"),ao(i),py(i,"link",o),t.head.appendChild(i)}return r={type:"script",instance:i,count:1,state:null},void o.set(l,r)}}};const Eb="undefined"==typeof document?null:document;function xb(){return Eb}function Cb(e,n,t){const o=xb();if(o&&"string"==typeof n&&n){let l='link[rel="'+e+'"][href="'+No(n)+'"]';if("string"==typeof t&&(l+='[crossorigin="'+t+'"]'),!bb.has(l)){bb.add(l);const r={rel:e,crossOrigin:t,href:n};if(null===o.querySelector(l)){const e=o.createElement("link");py(e,"link",r),ao(e),o.head.appendChild(e)}}}}function zb(e,n,t,o){const l=kb();if(!l)throw new Error('"resourceRoot" was expected to exist. This is a bug in React.');switch(e){case"meta":case"title":return null;case"style":if("string"==typeof t.precedence&&"string"==typeof t.href){const e=Pb(t.href),n=ro(l).hoistableStyles;let o=n.get(e);return o||(o={type:"style",instance:null,count:0,state:null},n.set(e,o)),o}return{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===t.rel&&"string"==typeof t.href&&"string"==typeof t.precedence){const e=t,i=Pb(e.href),a=ro(l).hoistableStyles;let u=a.get(i);if(!u){const n=vb(l);u={type:"stylesheet",instance:null,count:0,state:{loading:db,preload:null}},a.set(i,u);const t=n.querySelector(Tb(i));if(t){t._p||(u.instance=t,u.state.loading=pb|gb)}if(!yb.has(i)){const o={rel:"preload",as:"style",href:(r=e).href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy};yb.set(i,o),t||function(e,n,t,o){const l=e.querySelector(function(e){return'link[rel="preload"][as="style"]['+e+"]"}(n));if(l)o.loading=pb;else{const n=e.createElement("link");o.preload=n,n.addEventListener("load",(()=>o.loading|=pb)),n.addEventListener("error",(()=>o.loading|=hb)),py(n,"link",t),ao(n),e.head.appendChild(n)}}(n,i,o,u.state)}}if(n&&null===o){throw new Error("Expected <link> not to update to be updated to a stylesheet with precedence. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+"")}return u}if(n&&null!==o){throw new Error("Expected stylesheet with precedence to not be updated to a different kind of <link>. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+"")}return null;case"script":{const e=t.async,n=t.src;if("string"==typeof n&&e&&"function"!=typeof e&&"symbol"!=typeof e){const e=Lb(n),t=ro(l).hoistableScripts;let o=t.get(e);return o||(o={type:"script",instance:null,count:0,state:null},t.set(e,o)),o}return{type:"void",instance:null,count:0,state:null}}default:throw new Error('getResource encountered a type it did not expect: "'+e+'". this is a bug in React.')}var r}function Pb(e){return'href="'+No(e)+'"'}function Tb(e){return'link[rel="stylesheet"]['+e+"]"}function Nb(e){return re({},e,{"data-precedence":e.precedence,precedence:null})}
15function Lb(e){return'[src="'+No(e)+'"]'}function Rb(e){return"script[async]"+e}function _b(e,n,t){if(n.count++,null===n.instance)switch(n.type){case"style":{const l=t;let r=e.querySelector('style[data-href~="'+No(l.href)+'"]');if(r)return n.instance=r,ao(r),r;const i=re({},o=t,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return r=vb(e).createElement("style"),ao(r),py(r,"style",i),Ob(r,l.precedence,e),n.instance=r,r}case"stylesheet":{const o=t,l=Pb(o.href);let r=e.querySelector(Tb(l));if(r)return n.state.loading|=gb,n.instance=r,ao(r),r;const i=Nb(t),a=yb.get(l);a&&Ab(i,a);r=vb(e).createElement("link"),ao(r);const u=r;return u._p=new Promise(((e,n)=>{u.onload=e,u.onerror=n})),py(r,"link",i),n.state.loading|=gb,Ob(r,o.precedence,e),n.instance=r,r}case"script":{const o=t,l=Lb(o.src);let r=e.querySelector(Rb(l));if(r)return n.instance=r,ao(r),r;let i=o;const a=yb.get(l);a&&(i=re({},o),Db(i,a));const u=vb(e);return r=u.createElement("script"),ao(r),py(r,"link",i),u.head.appendChild(r),n.instance=r,r}case"void":return null;default:throw new Error('acquireResource encountered a resource type it did not expect: "'+n.type+'". this is a bug in React.')}else if("stylesheet"===n.type&&(n.state.loading&gb)===db){const o=t,l=n.instance;n.state.loading|=gb,Ob(l,o.precedence,e)}var o;return n.instance}function Mb(e){e.count--}function Ob(e,n,t){const o=t.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=o.length?o[o.length-1]:null;let r=l;for(let e=0;e<o.length;e++){const t=o[e];if(t.dataset.precedence===n)r=t;else if(r!==l)break}if(r)r.parentNode.insertBefore(e,r.nextSibling);else{const n=9===t.nodeType?t.head:t;n.insertBefore(e,n.firstChild)}}function Ab(e,n){null==e.crossOrigin&&(e.crossOrigin=n.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=n.referrerPolicy),null==e.title&&(e.title=n.title)}function Db(e,n){null==e.crossOrigin&&(e.crossOrigin=n.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=n.referrerPolicy),null==e.integrity&&(e.integrity=n.integrity)}let Fb=null;function Ib(e,n,t){let o,l;if(null===Fb)o=new Map,l=Fb=new Map,l.set(t,o);else{l=Fb;const e=l.get(t);e?o=e:(o=new Map,l.set(t,o))}if(o.has(e))return o;o.set(e,null);const r=t.getElementsByTagName(e);for(let t=0;t<r.length;t++){const l=r[t];if(!uo(l)&&("link"!==e||"stylesheet"!==l.getAttribute("rel"))&&l.namespaceURI!==jo){const t=e+(l.getAttribute(n)||""),r=o.get(t);r?r.push(l):o.set(t,[l])}}return o}function Ub(e,n,t){const o=vb(e);o.head.insertBefore(t,"title"===n?o.querySelector("head > title"):null)}function Hb(e){e.parentNode.removeChild(e)}function jb(e,n){return!1}function Vb(e,n,t){return!!e.complete}function Bb(e){return"stylesheet"!==e.type||(e.state.loading&mb)!==db}const Qb=6e4,Wb=800,qb=500;let $b=0;function Yb(){this.count--,function(e){if(0===e.count&&(0===e.imgCount||!e.waitingForImages))if(e.stylesheets)Gb(e,e.stylesheets);else if(e.unsuspend){const n=e.unsuspend;e.unsuspend=null,n()}}(this)}const Kb=null;let Xb=null;function Gb(e,n){e.stylesheets=null,null!==e.unsuspend&&(e.count++,Xb=new Map,n.forEac
15h(Zb,e),Xb=null,Yb.call(e))}function Zb(e,n,t){if(n.state.loading&gb)return;let o,l=Xb.get(e);if(l)o=l.get(Kb);else{l=new Map,Xb.set(e,l);const n=e.querySelectorAll("link[data-precedence],style[data-precedence]");for(let e=0;e<n.length;e++){const t=n[e];"LINK"!==t.nodeName&&"not all"===t.getAttribute("media")||(l.set(t.dataset.precedence,t),o=t)}o&&l.set(Kb,o)}const r=n.instance,i=r.getAttribute("data-precedence"),a=l.get(i)||o;a===o&&l.set(Kb,r),l.set(i,r),this.count++;const u=Yb.bind(this);if(r.addEventListener("load",u),r.addEventListener("error",u),a)a.parentNode.insertBefore(r,a.nextSibling);else{const n=9===e.nodeType?e.head:e;n.insertBefore(r,n.firstChild)}n.state.loading|=gb}const Jb=Re,ew={$$typeof:he,Provider:null,Consumer:null,_currentValue:Jb,_currentValue2:Jb,_threadCount:0};function nw(e,n,t,o,l,r,i,a,u){this.tag=1,this.containerInfo=e,this.pendingChildren=null,this.current=null,this.pingCache=null,this.timeoutHandle=Vy,this.cancelPendingCommit=null,this.context=null,this.pendingContext=null,this.next=null,this.callbackNode=null,this.callbackPriority=0,this.expirationTimes=Nt(ot),this.pendingLanes=0,this.suspendedLanes=0,this.pingedLanes=0,this.warmLanes=0,this.expiredLanes=0,this.errorRecoveryDisabledLanes=0,this.shellSuspendCounter=0,this.entangledLanes=0,this.entanglements=Nt(0),this.hiddenUpdates=Nt(null),this.identifierPrefix=o,this.onUncaughtError=l,this.onCaughtError=r,this.onRecoverableError=i,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=u,this.incompleteTransitions=new Map}function tw(e,n,t,o,l,r,i,a,u,s,c,f,d){const p=new nw(e,n,t,i,u,s,c,f,a),h=function(e,n){let t;return t=wi,!0===n&&(t|=vi|Si),Ci(3,null,null,t)}(0,r);p.current=h,h.stateNode=p;const m=Ga();Za(m),p.pooledCache=m,Za(m);const g={element:o,isDehydrated:t,cache:m};return h.memoizedState=g,Bu(h),p}function ow(e){if(!e)return yi;const n=ie(e),t=yi;if(1===n.tag){n.type;0}return t}function lw(e,n,t,o,l,r,i,a,u,s,c,f,d,p){const h=tw(t,o,!0,e,0,r,a,p,u,s,c,f);h.context=ow(null);const m=h.current;let g=vm();g=Mt(g);const y=Wu(g);return y.callback=null!=n?n:null,qu(m,y,g),function(e,n){e.current.lanes=n,Lm(e,n),Pg(e)}(h,g),h}function rw(e,n,t,o,l,r){const i=ow(l);null===o.context?o.context=i:o.pendingContext=i;const a=Wu(n);a.payload={element:t},null!==(r=void 0===r?null:r)&&(a.callback=r);const u=qu(e,a,n);null!==u&&(Em(u,0,n),$u(u,e,n))}function iw(e){switch(e.tag){case 3:{const n=e.stateNode;if(Ai(n)){const e=function(e){return at(e.pendingLanes)}(n);_m(n,e)}break}case S:case c:{const n=hi(e,2);null!==n&&Em(n,0,2),Om();uw(e,2);break}}}function aw(e,n){const t=e.memoizedState;var o,l;null!==t&&null!==t.dehydrated&&(t.retryLane=(o=t.retryLane,l=n,0!==o&&o<l?o:l))}function uw(e,n){aw(e,n);const t=e.alternate;t&&aw(t,n)}function sw(e){if(e.tag!==c&&e.tag!==S)return;const n=Kn,t=hi(e,n);null!==t&&Em(t,0,n),uw(e,n)}function cw(e){if(e.tag!==c&&e.tag!==S)return;let n=vm();n=Mt(n);const t=hi(e,n);null!==t&&Em(t,0,n),uw(e,n)}let fw=!0;function dw(e){fw=!!e}function pw(e,n,t,o){const l=Ne.T;Ne.T=null;const r=Ut();try{It(2),mw(e,n,t,o)}finally{It(r),Ne.T=l}}function hw(e,n,t,o){const l=Ne.T;Ne.T=null;const r=Ut();try{It(8),mw(e,n,t,o)}finally{It(r),Ne.T=l}}function mw(e,n,t,o){if(!fw)return;let l=gw(o);if(null===l)return Jg(e,n,o,yw,t),void Tw(e,o);if(function(e,n,t,o,l){switch(n){case"focusin":return vw=Nw(vw,e,n,t,o,l),!0;case"dragenter":return Sw=Nw(Sw,e,n,t,o,l),!0;case"mouseover":return Ew=Nw(Ew,e,n,t,o,l),!0;case"pointerover":{const r=l,i=r.pointerId;return xw.set(i,Nw(xw.get(i)||null,e,n,t,o,r)),!0}case"gotpointercapture":{const r=l,i=r.pointerId;return Cw.set(i,Nw(Cw.get(i)||null,e,n,t,o,r)),!0}}return!1}(l,e,n,t,o))o.stopPropagation();else if(Tw(e,o),4&n&&(r=e,Pw.indexOf(r)>-1)){for(;null!==l;){const r=no(l);null!==r&&iw(r);const i=gw(o);if(null===i&&Jg(e,n,o,yw,t),i===l)break;l=i}null!==l&&o.stopPropagation()}else{var r;Jg(e,n,o,null,t)}}function gw(e){return bw(Yo(e))}let yw=null;function bw(e){yw=null;let n=eo(e);if(null!==n){const e=Z(n);if(null===e)n=null;else{const t=e.tag;if(t===c){const t=J(e);if(null!==t)return t;n=null}else if(t===S){const t=ee(e);
15if(null!==t)return t;n=null}else if(3===t){if(Ai(e.stateNode))return ne(e);n=null}else e!==n&&(n=null)}}return yw=n,null}function ww(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(sn()){case cn:return 2;case fn:return 8;case dn:case pn:return Ot;case hn:return At;default:return Ot}default:return Ot}}let kw=!1,vw=null,Sw=null,Ew=null;const xw=new Map,Cw=new Map,zw=[],Pw=["mousedown","mouseup","touchcancel","touchend","touchstart","auxclick","dblclick","pointercancel","pointerdown","pointerup","dragend","dragstart","drop","compositionend","compositionstart","keydown","keypress","keyup","input","textInput","copy","cut","paste","click","change","contextmenu","reset"];function Tw(e,n){switch(e){case"focusin":case"focusout":vw=null;break;case"dragenter":case"dragleave":Sw=null;break;case"mouseover":case"mouseout":Ew=null;break;case"pointerover":case"pointerout":{const e=n.pointerId;xw.delete(e);break}case"gotpointercapture":case"lostpointercapture":{const e=n.pointerId;Cw.delete(e);break}}}function Nw(e,n,t,o,l,r){if(null===e||e.nativeEvent!==r){const e=function(e,n,t,o,l){return{blockedOn:e,domEventName:n,eventSystemFlags:t,nativeEvent:l,targetContainers:[o]}}(n,t,o,l,r);if(null!==n){const e=no(n);null!==e&&sw(e)}return e}e.eventSystemFlags|=o;const i=e.targetContainers;return null!==l&&-1===i.indexOf(l)&&i.push(l),e}function Lw(e){const n=eo(e.target);if(null!==n){const t=Z(n);if(null!==t){const n=t.tag;if(n===c){const n=J(t);if(null!==n)return e.blockedOn=n,void jt(e.priority,(()=>{cw(t)}))}else if(n===S){const n=ee(t);if(null!==n)return e.blockedOn=n,void jt(e.priority,(()=>{cw(t)}))}else if(3===n){if(Ai(t.stateNode))return void(e.blockedOn=ne(t))}}}e.blockedOn=null}function Rw(e){if(null!==e.blockedOn)return!1;const n=e.targetContainers;for(;n.length>0;){const t=gw(e.nativeEvent);if(null!==t){const n=no(t);return null!==n&&sw(n),e.blockedOn=t,!1}{const n=e.nativeEvent,t=new n.constructor(n.type,n);$o=t,n.target.dispatchEvent(t),$o=null}n.shift()}return!0}function _w(e,n,t){Rw(e)&&t.delete(n)}function Mw(){kw=!1,null!==vw&&Rw(vw)&&(vw=null),null!==Sw&&Rw(Sw)&&(Sw=null),null!==Ew&&Rw(Ew)&&(Ew=null),xw.forEach(_w),Cw.forEach(_w)}function Ow(e,t){e.blockedOn===t&&(e.blockedOn=null,kw||(kw=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Mw)))}let Aw=null;function Dw(e){Aw!==e&&(Aw=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,(()=>function(e){Aw===e&&(Aw=null);for(let n=0;n<e.length;n+=3){const t=e[n],o=e[n+1],l=e[n+2];if("function"!=typeof o){if(null===bw(o||t))continue;break}const r=no(t);null===r||(e.splice(n,3),n-=3,Hg(r,t,o,l))}}(e))))}function Fw(e){null!==vw&&Ow(vw,e),null!==Sw&&Ow(Sw,e),null!==Ew&&Ow(Ew,e);const n=n=>Ow(n,e);xw.forEach(n),Cw.forEach(n);for(let n=0;n<zw.length;n++){const t=zw[n];t.blockedOn===e&&(t.blockedOn=null)}for(;zw.length>0;){const e=zw[0];if(null!==e.blockedOn)break;Lw(e),null===e.blockedOn&&zw.shift()}const t=(e.ownerDocument||e).$$reactFormReplay;if(null!=t)for(let e=0;e<t.length;e+=3){const n=t[e],o=t[e+1],l=oo(n);if("function"==typeof o){l||Dw(t);continue}let r=n;if(l){let n=null;const i=o;if(i&&i.hasAttribute("formAction")){r=i;const e=oo(i);if(e)n=e.formAction;else{if(null!==bw(r))continue}}else n=l.action;"function"==typeof n?t[e+1]=n:(t.splice(e,3),e-=3),Dw(t)}else;}}function Iw(){if("object"!=typeof navigation)return;let e=!1,n=null;function t(e){e.canIntercept&&"react-transition"===e.info&&e.intercept({handler:()=>new Promise((e=>n=e)),focusReset:"manual",scroll:"manual"})}function o(){null!==n&&(n(),n=null),e||setTimeout(l,20)}function l(){if(e)return;if(navigation.transition)return;const n=navigation.currentEntry;n&&null!=n.url&&navigation.navigate(n.url,{state:n.getState(),info:"react-transition",history:"replace"})}return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(l,100),function(){e=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),null!==n&&(n(),n=null)}}function Uw(e){this._internalRoot=e}function Hw(e){this._internalRoot=e}Hw.prototype.render=Uw.prototype.render=function(e){const n=this._internalRoot;if(null===n)throw new Error("Cannot update an unmounted root.");!function(e,n,t,o){const l=n.current,r=vm();rw(l,r,e,n,t,o)}(e,n,null,null)},Hw.prototype.unmount=Uw.prototype.unmount=function(){const e=this._internalRoot;if(null!==e){this._internalRoot=null;const n=e.containerInfo;!function(e,n,t,o){rw(n.current,2,e,n,t,o)}(null,e,null,null),Om(),n[Wt]=null}},Hw.prototype.unstable_scheduleHydration=function(e){e&&function(e){const n=Ht(),t={blockedOn:null,target:e,priority:n};let o=0;for(;o<zw.length&&Dt(n,zw[o].priority);o++);zw.splice(o,0,t),0===o&&Lw(t)}(e)},function(){const e=t.version;if(e!==hy)throw new Error('Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: '+e+"\n - react-dom: "+hy+"\nLearn more: https://react.dev/warnings/version-mismatch")}(),Le.findDOMNode=function(e){return function(e){const n=ie(e);if(void 0===n){if("function"==typeof e.render)throw new Error("Unable to find node on an unmounted component.");{const n=Object.keys(e).join(",");throw new Error("Argument appears to not be a ReactComponent. Keys: "+n)}}const t=oe(n);return null===t?null:t.stateNode}(e)},function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;const n=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(n.isDisabled)return!0;
15if(!n.supportsFiber)return!0;try{yn=n.inject(e),bn=n}catch(e){}n.checkDCE}({bundleType:0,version:hy,rendererPackageName:"react-dom",currentDispatcherRef:Ne,reconcilerVersion:hy}),e.createRoot=function(e,n){if(!i(e))throw new Error("Target container is not a DOM element.");let t=!1,o="",l=Ef,r=xf,a=Cf,u=Iw;null!=n&&(!0===n.unstable_strictMode&&(t=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onUncaughtError&&(l=n.onUncaughtError),void 0!==n.onCaughtError&&(r=n.onCaughtError),void 0!==n.onRecoverableError&&(a=n.onRecoverableError));const s=function(e,n,t,o,l,r,i,a,u,s){return tw(e,n,!1,null,0,o,r,null,i,a,u,s)}(e,1,0,t,0,o,l,r,a,u);return Jt(s.current,e),Xg(e),new Uw(s)},e.hydrateRoot=function(e,n,t){if(!i(e))throw new Error("Target container is not a DOM element.");let o=!1,l="",r=Ef,a=xf,u=Cf,s=Iw,c=null,f=null;null!=t&&(!0===t.unstable_strictMode&&(o=!0),void 0!==t.identifierPrefix&&(l=t.identifierPrefix),void 0!==t.onUncaughtError&&(r=t.onUncaughtError),void 0!==t.onCaughtError&&(a=t.onCaughtError),void 0!==t.onRecoverableError&&(u=t.onRecoverableError),void 0!==t.unstable_transitionCallbacks&&(c=t.unstable_transitionCallbacks),void 0!==t.formState&&(f=t.formState));const d=lw(n,null,e,1,0,o,0,l,r,a,u,s,0,f);return Jt(d.current,e),Xg(e),new Hw(d)},e.version=hy}); 16define("react", ["exports"], function(e){"use strict";const t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),i=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.scope"),d=Symbol.for("react.activity"),_=Symbol.for("react.legacy_hidden"),h=Symbol.for("react.tracing_marker"),b=Symbol.for("react.view_transition"),m=Symbol.iterator;const S={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,n){},enqueueReplaceState:function(e,t,n,r){},enqueueSetState:function(e,t,n,r){}},E=Object.assign,g={};function w(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||S}function v(){}function j(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||S}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw new Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=w.prototype;const k=j.prototype=new v;k.constructor=j,E(k,w.prototype),k.isPureReactComponent=!0;const C=Array.isArray;function R(e){return C(e)}function T(){}const $={H:null,A:null,T:null,S:null},A=Object.prototype.hasOwnProperty;
16function x(e){return void 0!==e.key}function O(e,n,r,o,u,s){const c=r.ref;let i;return i={$$typeof:t,type:e,key:n,ref:void 0!==c?c:null,props:r},i}function I(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}const P=/\/+/g;function M(e){return e.replace(P,"$&/")}function N(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){const t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function U(e,r,o,u,s){const c=typeof e;"undefined"!==c&&"boolean"!==c||(e=null);let i=!1;if(null===e)i=!0;else switch(c){case"bigint":case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case t:case n:i=!0;break;case p:const c=e._payload;return U((0,e._init)(c),r,o,u,s)}}if(i){const t=e;let n=s(t);const c=""===u?"."+N(t,0):u;if(R(n)){let e="";null!=c&&(e=M(c)+"/"),U(n,r,e,"",(e=>e))}else if(null!=n){if(I(n)){n=(f=n,l=o+(null==n.key||t&&t.key===n.key?"":M(""+n.key)+"/")+c,O(f.type,l,f.props))}r.push(n)}return 1}var f,l;let a,y,d=0;const _=""===u?".":u+":";if(R(e))for(let t=0;t<e.length;t++)a=e[t],y=_+N(a,t),d+=U(a,r,o,y,s);else{const t=function(e){if(null===e||"object"!=typeof e)return null;const t=m&&e[m]||e["@@iterator"];return"function"==typeof t?t:null}(e);if("function"==typeof t){const n=e,u=t.call(n);let c,i=0;for(;!(c=u.next()).done;)a=c.value,y=_+N(a,i++),d+=U(a,r,o,y,s)}else if("object"===c){if("function"==typeof e.then)return U(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:if("string"==typeof e.status)e.then(T,T);else{const t=e;t.status="pending",t.then((t=>{if("pending"===e.status){const n=e;n.status="fulfilled",n.value=t}}),(t=>{if("pending"===e.status){const n=e;n.status="rejected",n.reason=t}}))}switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(e),r,o,u,s);const t=String(e);throw new Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}}return d}function L(e,t,n){if(null==e)return e;const r=[];let o=0;return U(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function V(e){if(-1===e._status){const t=(0,e._result)();if(t.then((t=>{if(0===e._status||-1===e._status){const n=e;n._status=1,n._result=t}}),(t=>{if(0===e._status||-1===e._status){const n=e;n._status=2,n._result=t}})),-1===e._status){const n=e;n._status=0,n._result=t}}if(1===e._status){return e._result.default}throw e._result}const H=function(e){return function(){return e.apply(null,arguments)}};const q=function(){return null};function D(){return $.H}const F="function"==typeof reportError?reportError:e=>{if("object"==typeof window&&"function"==typeof window.ErrorEvent){const t="object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:t,error:e});if(!window.dispatchEvent(n))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)};var z={__proto__:null,c:function(e){return D().useMemoCache(e)}};const G={map:L,forEach:function(e,t,n){L(e,(function(){t.apply(this,arguments)}),n)},count:function(e){let t=0;return L(e,(()=>{t++})),t},toArray:function(e){return L(e,(e=>e))||[]},only:function(e){if(!I(e))throw new Error("React.Children.only expected to receive a single React element child.");return e}};e.Activity=d,e.Children=G,e.Component=w,e.Fragment=r,e.Profiler=u,e.PureComponent=j,e.StrictMode=o,e.Suspense=f,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,e.__COMPILER_RUNTIME=z,e.cache=H,e.cacheSignal=q,e.cloneElement=function(e,t,n){if(null==e)throw new Error("The argument must be a React element, but you passed "+e+".");let r;const o=E({},e.props);let u=e.key;if(null!=t)for(r in x(t)&&(u=""+t.key),t)!A.call(t,r)||"key"===r||"__self"===r||"__source"===r||"ref"===r&&void 0===t.ref||(o[r]=t[r]);const s=arguments.length-2;if(1===s)o.children=n;else if(s>1){const e=Array(s);for(let t=0;t<s;t++)e[t]=arguments[t+2];o.children=e}return O(e.type,u,o)},e.createContext=function(e){const t={$$typeof:c,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null};return t.Provider=t,t.Consumer={$$typeof:s,_context:t},t},e.createElement=function(e,t,n){let r;const o={};let u=null;if(null!=t)for(r in x(t)&&(u=""+t.key),t)A.call(t,r)&&"key"!==r&&"__self"!==r&&"__source"!==r&&(o[r]=t[r]);const s=arguments.length-2;if(1===s)o.children=n;else if(s>1){const e=Array(s);for(let t=0;t<s;t++)e[t]=arguments[t+2];o.children=e}if(e&&e.defaultProps){const t=e.defaultProps;for(r in t)void 0===o[r]&&(o[r]=t[r])}return O(e,u,o)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:i,render:e}},e.isValidElement=I,e.lazy=function(e){return{$$typeof:p,_payload:{_status:-1,_result:e},_init:V}},e.memo=function(e,t){return{$$typeof:a,type:e,compare:void 0===t?null:t}},e.startTransition=function(e,t){const n=$.T,r={};$.T=r;
16try{const t=e(),n=$.S;null!==n&&n(r,t),"object"==typeof t&&null!==t&&"function"==typeof t.then&&t.then(T,F)}catch(e){F(e)}finally{null!==n&&null!==r.types&&(n.types=r.types),$.T=n}},e.unstable_LegacyHidden=_,e.unstable_Scope=y,e.unstable_SuspenseList=l,e.unstable_TracingMarker=h,e.unstable_ViewTransition=b,e.unstable_addTransitionType=function(e){},e.unstable_getCacheForType=function(e){const t=$.A;return t?t.getCacheForType(e):e()},e.unstable_useCacheRefresh=function(){return D().useCacheRefresh()},e.use=function(e){return D().use(e)},e.useActionState=function(e,t,n){return D().useActionState(e,t,n)},e.useCallback=function(e,t){return D().useCallback(e,t)},e.useContext=function(e){return D().useContext(e)},e.useDebugValue=function(e,t){},e.useDeferredValue=function(e,t){return D().useDeferredValue(e,t)},e.useEffect=function(e,t){return D().useEffect(e,t)},e.useEffectEvent=function(e){return D().useEffectEvent(e)},e.useId=function(){return D().useId()},e.useImperativeHandle=function(e,t,n){return D().useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return D().useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return D().useLayoutEffect(e,t)},e.useMemo=function(e,t){return D().useMemo(e,t)},e.useOptimistic=function(e,t){return D().useOptimistic(e,t)},e.useReducer=function(e,t,n){return D().useReducer(e,t,n)},e.useRef=function(e){return D().useRef(e)},e.useState=function(e){return D().useState(e)},e.useSyncExternalStore=function(e,t,n){return D().useSyncExternalStore(e,t,n)},e.useTransition=function(){return D().useTransition()},e.version="19.2.3"}); 17define("react-dom", ["exports", "react"], function(t,e){"use strict";function i(){}const n={d:{f:i,r:function(t){throw new Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null};const r=Symbol.for("react.portal");const o=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;const s=function(t){const e=o.T,i=n.p;try{return o.T=null,n.p=2,t?t():void 0}finally{o.T=e,n.p=i,n.d.f()}};function c(t,e){return"font"===t?"":"string"==typeof e?"use-credentials"===e?e:"":void 0}function f(){return o.H}t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,t.createPortal=function(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!(n=e)||1!==n.nodeType&&9!==n.nodeType&&11!==n.nodeType)throw new Error("Target container is not a DOM element.");var n;return function(t,e,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:r,key:null==n?null:""+n,children:t,containerInfo:e,implementation:i}}(t,e,null,i)},t.flushSync=s,t.preconnect=function(t,e){if("string"==typeof t){const i=e?function(t){if("string"==typeof t)return"use-credentials"===t?t:""}(e.crossOrigin):null;n.d.C(t,i)}},t.prefetchDNS=function(t){"string"==typeof t&&n.d.D(t)},t.preinit=function(t,e){if("string"==typeof t&&e&&"string"==typeof e.as){const i=e.as,r=c(i,e.crossOrigin),o="string"==typeof e.integrity?e.integrity:void 0,s="string"==typeof e.fetchPriority?e.fetchPriority:void 0;"style"===i?n.d.S(t,"string"==typeof e.precedence?e.precedence:void 0,{crossOrigin:r,integrity:o,fetchPriority:s}):"script"===i&&n.d.X(t,{crossOrigin:r,integrity:o,fetchPriority:s,nonce:"string"==typeof e.nonce?e.nonce:void 0})}},t.preinitModule=function(t,e){if("string"==typeof t)if("object"==typeof e&&null!==e){if(null==e.as||"script"===e.as){const i=c(e.as,e.crossOrigin);n.d.M(t,{crossOrigin:i,integrity:"string"==typeof e.integrity?e.integrity:void 0,nonce:"string"==typeof e.nonce?e.nonce:void 0})}}else null==e&&n.d.M(t)},t.preload=function(t,e){if("string"==typeof t&&"object"==typeof e&&null!==e&&"string"==typeof e.as){const i=e.as,r=c(i,e.crossOrigin);n.d.L(t,i,{crossOrigin:r,integrity:"string"==typeof e.integrity?e.integrity:void 0,nonce:"string"==typeof e.nonce?e.nonce:void 0,type:"string"==typeof e.type?e.type:void 0,fetchPriority:"string"==typeof e.fetchPriority?e.fetchPriority:void 0,referrerPolicy:"string"==typeof e.referrerPolicy?e.referrerPolicy:void 0,imageSrcSet:"string"==typeof e.imageSrcSet?e.imageSrcSet:void 0,imageSizes:"string"==typeof e.imageSizes?e.imageSizes:void 0,media:"string"==typeof e.media?e.media:void 0})}},t.preloadModule=function(t,e){if("string"==typeof t)if(e){const i=c(e.as,e.crossOrigin);
17n.d.m(t,{as:"string"==typeof e.as&&"script"!==e.as?e.as:void 0,crossOrigin:i,integrity:"string"==typeof e.integrity?e.integrity:void 0})}else n.d.m(t)},t.requestFormReset=function(t){n.d.r(t)},t.unstable_batchedUpdates=function(t,e){return t(e)},t.useFormState=function(t,e,i){return f().useFormState(t,e,i)},t.useFormStatus=function(){return f().useHostTransitionStatus()},t.version="19.2.3",t.unmountComponentAtNode=function(){return null}}); 18define("scheduler", ["exports"], function(e){"use strict";function n(e,n){const t=e.length;e.push(n),function(e,n,t){let l=t;for(;l>0;){const t=l-1>>>1,o=e[t];if(!(r(o,n)>0))return;e[t]=n,e[l]=o,l=t}}(e,n,t)}function t(e){return 0===e.length?null:e[0]}function l(e){if(0===e.length)return null;const n=e[0],t=e.pop();return t!==n&&(e[0]=t,function(e,n,t){let l=t;const o=e.length,i=o>>>1;for(;l<i;){const t=2*(l+1)-1,i=e[t],a=t+1,u=e[a];if(r(i,n)<0)a<o&&r(u,i)<0?(e[l]=u,e[a]=n,l=a):(e[l]=i,e[t]=n,l=t);else{if(!(a<o&&r(u,n)<0))return;e[l]=u,e[a]=n,l=a}}}(e,t,0)),n}function r(e,n){const t=e.sortIndex-n.sortIndex;return 0!==t?t:e.id-n.id}e.unstable_now=void 0;if("object"==typeof performance&&"function"==typeof performance.now){const n=performance;e.unstable_now=()=>n.now()}else{const n=Date,t=n.now();e.unstable_now=()=>n.now()-t}var o=[],i=[],a=1,u=null,s=3,c=!1,f=!1,b=!1,p=!1;const y="function"==typeof setTimeout?setTimeout:null,d="function"==typeof clearTimeout?clearTimeout:null,m="undefined"!=typeof setImmediate?setImmediate:null;function _(e){let r=t(i);for(;null!==r;){if(null===r.callback)l(i);else{if(!(r.startTime<=e))return;l(i),r.sortIndex=r.expirationTime,n(o,r)}r=t(i)}}function h(e){if(b=!1,_(e),!f)if(null!==t(o))f=!0,C();else{const n=t(i);null!==n&&L(h,n.startTime-e)}}function w(n){f=!1,b&&(b=!1,M()),c=!0;const r=s;try{return function(n){let r=n;_(r),u=t(o);for(;null!==u&&!(u.expirationTime>r&&T());){const n=u.callback;if("function"==typeof n){u.callback=null,s=u.priorityLevel;const i=n(u.expirationTime<=r);if(r=e.unstable_now(),"function"==typeof i)return u.callback=i,_(r),!0;u===t(o)&&l(o),_(r)}else l(o);u=t(o)}if(null!==u)return!0;{const e=t(i);return null!==e&&L(h,e.startTime-r),!1}}(n)}finally{u=null,s=r,c=!1}}let k=!1,v=-1,g=5,x=-1;function T(){if(p)return!0;return!(e.unstable_now()-x<g)}const I=()=>{if(p=!1,k){const n=e.unstable_now();x=n;let t=!0;try{t=w(n)}finally{t?P():k=!1}}};let P;if("function"==typeof m)P=()=>{m(I)};else if("undefined"!=typeof MessageChannel){const e=new MessageChannel,n=e.port2;e.port1.onmessage=I,P=()=>{n.postMessage(null)}}else P=()=>{y(I,0)};function C(){k||(k=!0,P())}function L(n,t){v=y((()=>{n(e.unstable_now())}),t)}function M(){d(v),v=-1}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){e<0||e>125?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):g=e>0?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return s},e.unstable_next=function(e){var n;switch(s){case 1:case 2:case 3:n=3;break;default:n=s}var t=s;s=n;try{return e()}finally{s=t}},e.unstable_requestPaint=function(){p=!0},e.unstable_runWithPriority=function(e,n){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var t=s;s=e;try{return n()}finally{s=t}},e.unstable_scheduleCallback=function(l,r,u){var s,p,y=e.unstable_now();if("object"==typeof u&&null!==u){var d=u.delay;s="number"==typeof d&&d>0?y+d:y}else s=y;switch(l){case 1:p=-1;break;case 2:p=250;break;case 5:p=1073741823;break;case 4:p=1e4;break;default:p=5e3}var m=s+p,_={id:a++,callback:r,priorityLevel:l,startTime:s,expirationTime:m,sortIndex:-1};return s>y?(_.sortIndex=s,n(i,_),null===t(o)&&_===t(i)&&(b?M():b=!0,L(h,s-y))):(_.sortIndex=m,n(o,_),f||c||(f=!0,C())),_},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(e){var n=s;return function(){var t=s;s=n;try{return e.apply(this,arguments)}finally{s=t}}}}); 19define("react/jsx-dev-runtime", ["exports"], function(e){"use strict";const t=Symbol.for("react.fragment");e.Fragment=t,e.jsxDEV=undefined}); 20define("react/jsx-runtime", ["exports"], function(e){"use strict";const t=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(e,n,r){let o,i=null;
20if(void 0!==r&&(i=""+r),function(e){return void 0!==e.key}(n)&&(i=""+n.key),"key"in n){o={};for(const e in n)"key"!==e&&(o[e]=n[e])}else o=n;return function(e,n,r){const o=r.ref;let i;return i={$$typeof:t,type:e,key:n,ref:void 0!==o?o:null,props:r},i}(e,i,o)}const o=r,i=r;e.Fragment=n,e.jsx=o,e.jsxs=i}); 21!function(){function e(){define("Router/CustomRouterJson",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.get=void 0,t.get=function(){}}))}function t(t,f){if(!t)if(f)return e();else e();else!function(t,i){if(t&&t[s]){if(t[s]&&t[s].includes("/"))n=t[s];else n=t[s]+"/"+u.join("/");if(n===o)if(i)e();else e();else if(i){var f=r.requirejs(n);module.exports=f}else define(o,[n],(function(e){return e}))}else e()}(t.modules[i].features,f)}var n,o="Router/CustomRouterJson",s="Router/CustomRouterJson",u=o.split("/"),i=u.shift(),r=function(){return this||(0,eval)("this")}();if("function"==typeof defineFeature)defineFeature("Router/CustomRouterJson",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.get=void 0,t.get=function(){}}));else if(r.contents)t(r.contents,!1);else if("undefined"==typeof window)t(function(){try{contents=require("json!resources/contents")}catch(e){try{contents=require("json!contents")}catch(e){contents=""}}}()||r.requirejs("Router/contents.json"),!1)}(); 22define("Router/router",["router","react/jsx-runtime","react","WasabyLoader/ModulesLoader","UICore/Contexts","UI/Contexts","Router/CustomRouterJson","Env/Env","Application/Env","require","exports"],(function(e,t,r,s,i,n,o,a,l,u,c){var h,f,d,g,p,y,_,R,m,v,P,w,O,U,b,S,x,k,H,C,j,I,M,N,Q,E,T,F,A,D,L,V,$,B,q,W,G,X,Y,K,J,z,Z,ee,te,re;return Object.defineProperty(c,"__esModule",{value:!0}),h=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SPA_HISTORY_MAX_LENGTH=void 0,t.SPA_HISTORY_MAX_LENGTH=20;t.default=class{constructor(e,t,r,s){this._urlRewriter=e,this._routerUrl=t,this._windowHistory=r,this._spaHistory=[],this._onChangeHistoryState="function"==typeof s?s:()=>{},this._initHistory()}_initHistory(){let e=this._routerUrl.getUrl();e=e.replace(/^[\/]{2,}/,"/");const t={id:0,state:this._urlRewriter.get(this._routerUrl.getLogicUrl()),href:e};if("undefined"!=typeof window)if(this._windowHistory.state&&"number"==typeof this._windowHistory.state.id)t.id=this._windowHistory.state.id;else if(!this._windowHistory.state)s=!0,this._windowHistory.replaceState(t,t.href,t.href),s=!1;this._setHistory([t]),this._setHistoryPosition(0),this._callOnChangeHistoryState(t)}back(e){const t=this.getHistory(),r=this.getHistoryPosition();if(0===r){const r=this._calculateNewHistoryState(e);t.unshift({id:t[0].id-1,state:r.state,href:r.href})}else if(e&&e.state){let s=r-1;for(let r=s;r>=0;r--){const i=t[r];if(i.state===e.state)if(!("id"in e)||i.id===e.id){s=r;break}}this._setHistoryPosition(s)}else this._setHistoryPosition(r-1);this._callOnChangeHistoryState(this.getCurrentState()),this._updateStateUrl()}forward(e){const t=this.getHistory();let r=this.getHistoryPosition()+1;if(e&&e.state&&r<t.length)for(let s=r;s<t.length;s++)if(t[s].state===e.state){r=s;break}if(this._setHistoryPosition(r),r>=t.length){const s=this._calculateNewHistoryState(e);t.push({id:t[r-1].id+1,state:s.state,href:s.href})}else if(e&&e.state&&e.href&&e.id)t[r]=e;this._callOnChangeHistoryState(this.getCurrentState()),this._updateStateUrl()}_calculateNewHistoryState(e){var t;if(e&&e.state)return{id:e.id,state:this._urlRewriter.get(e.state),href:e.href||this._urlRewriter.getReverse(e.state)};const r=null===(t=null===window||void 0===window?void 0:window.history)||void 0===t?void 0:t.state,s=r&&r.state,i=this._routerUrl.getUrl();return{id:(null==r?void 0:r.id)||0,state:s||this._urlRewriter.get(i),href:i}}push(e){const t=this.getHistory(),r=this.getHistoryPosition();t.length=r+1,e.id=t[r].id+1,t.push(e),this._setHistoryPosition(r+1),this._callOnChangeHistoryState(e),this._updateStateUrl();const s=e.href||e.state;this._windowHistory.pushState(e,s,s)}replaceState(e){const t=this.getHistory(),r=this.getHistoryPosition(),i=t[r];e.id=i.id,e.href=e.href||this._routerUrl.getRealUrl(this._urlRewriter.getReverse(e.state)),t[r]=e,this._callOnChangeHistoryState(e,!0),this._updateStateUrl(),s=!0,this._windowHistory.replaceState(e,e.href,e.href),s=!1}_updateStateUrl(){this._routerUrl.setStateUrl(this.getCurrentState().state)}getPrevState(){return this.getHistory()[this.getHistoryPosition()-1]}getCurrentState(){return this.getHistory()[this.getHistoryPosition()]}getNextState(){return this.getHistory()[this.getHistoryPosition()+1]}getHistory(){return this._routerHistory}_setHistory(e){this._routerHistory=e}getHistoryPosition(){return this._historyPosition}_setHistoryPosition(e){this._historyPosition=e}getSpaHistory(){return this._spaHistory}_callOnChangeHistoryState(e,r=!1){const s=e.href||e.state;if(r)this._spaHistory.pop();for(this._spaHistory.push(s);this._spaHistory.length>t.SPA_HISTORY_MAX_LENGTH;)this._spaHistory.shift();this._onChangeHistoryState({href:s,spaHistory:this._spaHistory})}};let s=!0;if("undefined"!=typeof window){const e=window.history.replaceState;window.history.replaceState=function(t,i,n){if(!s&&!globalThis.unsafe_replaceState)r.logger.error(new Error("ÐелÑÐ·Ñ Ð²ÑзÑваÑÑ window.history.replaceState в Ð¾Ð±Ñ Ð¾Ð´ Ð¼ÐµÑ Ð°Ð½Ð¸Ð·Ð¼Ð¾Ð² Wasaby-ÑоÑÑинга. \nÐÑполÑзÑйÑе меÑÐ¾Ð´Ñ Router/router:IRouter#replaceState или Router/router:IHistory#replaceState."));e.apply(window.history,[t,i,n])}}return t}(0,{},l),f=function(e,t){"use strict";
22return Object.defineProperty(t,"__esModule",{value:!0}),t.decodeParam=t.encodeParam=void 0,t.encodeParam=function(e){const t=typeof e;let r=e;if("undefined"!==t){if("string"!==t)r=JSON.stringify(r);r=encodeURIComponent(r)}return r},t.decodeParam=function(e){let t=e;if(void 0!==t)try{t=decodeURIComponent(t)}catch(e){}return t},t}(0,{}),d=function(e,t,r){"use strict";function s(e){const t=/[?&](ext[^=]+)=([^&]+)/g;let s=[];if(r.detection.isIE||r.detection.chrome&&r.detection.chromeVersion<73){let r;for(;null!==(r=t.exec(e));)s.push(r)}else s=[...e.matchAll(t)];return s.map((e=>`${e[1]}=${e[2]}`)).join("&")}Object.defineProperty(t,"__esModule",{value:!0}),t.UrlParts=void 0;const i=/[^/]\/[^/]+\.[a-zA-Z]+$/;if(t.UrlParts=class{constructor(e){this._hasTrailingSlash=!1,this._urlParts=this._parseUrl(e)}_parseUrl(e){let t=e.indexOf("?");const r=e.indexOf("#");if(r>=0&&t>r)t=-1;let i=e,n="",o="";if(t>=0&&r>=0)i=e.substring(0,t),n=e.substring(t,r),o=e.substring(r,e.length);else if(t>=0)i=e.substring(0,t),n=e.substring(t,e.length);else if(r>=0)i=e.substring(0,r),o=e.substring(r,e.length);let a="";if(n)a=s(n);return this._hasTrailingSlash=i&&"/"!==i?!!i.match(/\/$/):!1,{path:i.replace(/\/$/,""),query:n,fragment:o,extQuery:a}}getPath(){return this._urlParts.path}getQuery(){return this._urlParts.query}clearQuery(){this._urlParts.query=""}getFragment(){return this._urlParts.fragment}clearFragment(){this._urlParts.fragment=""}get hasTrailingSlash(){return this._hasTrailingSlash}join(e,t=!1){let r=this.getPath();if(e.hasOwnProperty("path"))r=e.path;r=r.replace(/^[#/?&]+/,"").replace(/[#/?&]+$/,"");const i=r.startsWith("http")?"":"/";r=r.length?[i,r,this._getTrailingSlash(r,t)].join(""):"/";let n=this.getQuery();if(e.hasOwnProperty("query"))n=e.query;if(n=n.replace(/^[#/?]/,""),n.length>0)n="?"+n;let o=this.getFragment();if(e.hasOwnProperty("fragment"))o=e.fragment;if(o=o.replace(/^[#/?]/,""),o.length>0)o="#"+o;const a=this.getExtQuery();if(a&&!s(n))if(n.length>0)n=n+"&"+a.replace("?","&");else n="?"+a;return[r,n,o].join("")}_getTrailingSlash(e,t){if(i.exec(e))return"";else return this._hasTrailingSlash||t?"/":""}getExtQuery(){return this._urlParts.extQuery}setExtQuery(e){this._urlParts.extQuery=e}},"undefined"!=typeof window){const e=window.open,t=/ret=([^&]+)/;window.open=function(r,i,n){try{if(!r||"_blank"!==i)return e(r,i,n);const o=s(window.location.href);if(!o)return e(r,i,n);const a=r.match(t);if(!a||!a[1])return e(r,i,n);const l=decodeURIComponent(a[1]),u=l.indexOf("?")>=0?"&":"?",c=encodeURIComponent(l+u+o),h=r.replace(t,`ret=${c}`);return e(h,i,n)}catch(e){console.error("ÐÑоизоÑла оÑибка пÑи попÑÑке вÑÑавиÑÑ Ð² новÑй url ext-паÑамеÑÑÑ ",e)}return e(r,i,n)}}return t}(0,{},a),g=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(){this._registeredRoutes={},this._registeredReferences={}}addRoute(e,t,r){this._registeredRoutes[e.getInstanceId()]={beforeUrlChangeCb:t,afterUrlChangeCb:r}}removeRoute(e){delete this._registeredRoutes[e.getInstanceId()]}addReference(e,t){this._registeredReferences[e.getInstanceId()]={afterUrlChangeCb:t}}removeReference(e){delete this._registeredReferences[e.getInstanceId()]}callBeforeUrlChange(e,t,r){if(!Object.keys(this._registeredRoutes).length)return!1;let s=[];const i=[];for(const n in this._registeredRoutes){if(!this._registeredRoutes.hasOwnProperty(n))continue;const o=this._registeredRoutes[n].beforeUrlChangeCb(e,t,r);if(o instanceof Promise)s.push(o);else i.push(o)}if(s.length)return s=s.concat(i.map((e=>Promise.resolve(e)))),Promise.all(s).then((e=>-1===e.indexOf(!1)));else return-1===i.indexOf(!1)}callAfterUrlChange(e,t){for(const r in this._registeredRoutes)if(this._registeredRoutes.hasOwnProperty(r))this._registeredRoutes[r].afterUrlChangeCb(e,t);for(const r in this._registeredReferences)if(this._registeredReferences.hasOwnProperty(r))this._registeredReferences[r].afterUrlChangeCb(e,t)}},t}(0,{}),p=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e,t){this.location=e,this._stateUrl=t.get(this.getLogicUrl())}getStateUrl(){return this._stateUrl||this.getLogicUrl()}setStateUrl(e){this._stateUrl=e}getUrl(){return this.location.pathname+this.location.search+this.location.hash}getServiceUrl(e){const t=e||this.getUrl();let s=(0,r.getConfig)("appRoot");if(!s||"/"===s)return t;s=s.replace(/\//g,"");const i=t.replace(/^\//,"").split("/");if(i[0]!==s)i.unshift(s);return"/"+i.join("/")}getLogicUrl(){let e=this.getUrl();const t=(0,r.getConfig)("appRoot");if(t&&"/"!==t){const r=t.replace(/\//g,""),s=new RegExp(`^/${r}`);e=e.replace(s,"")}const s=(0,r.getConfig)("appAlias");if(!s)return e;const i=new RegExp(`^/${s}`);return e.replace(i,"")}getRealUrl(e){let t=e;if(t){const e=(0,r.getConfig)("appAlias");if(e)t="/"+e+(t.startsWith("/")?t:"/"+t)}else t=this.getUrl();
22return this.getServiceUrl(t)}},t}(0,{},l),y=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{get state(){return this._states[this._states.length-1]}constructor(e){this._location=e,this.isFake=!0,this._states=[]}pushState(e,t,r){this._states.push(e),this._location._update(r)}replaceState(e,t,r){this._states.pop(),this._states.push(e),this._location._update(r)}back(){this._states.pop();const e=this._states[this._states.length-1];if(e)this._location._update(e.href||e.state)}},t}(0,{}),_=function(e,t){"use strict";function r(e,t){const{path:r,misc:n}=function(e){const t=e.match(/[?#]/);if(t){const r=t.index;return{path:e.substring(0,r),misc:e.slice(r)}}return{path:e,misc:""}}(e);if("/"===r&&t&&t.rootRoute)return t.rootRoute+n;if(!t||!t.tree||!Object.keys(t.tree).length)return;let a,l=-1;const u=[],c=(e,t,r=[])=>{if(e||r.length)a=e,l=t,u.push(...r)},h=i(r).split("/");let f=t.tree;for(let e=0;e<h.length;e++){const t=h[e];if(f.hasOwnProperty(t)){c(f[t].value,e),f=f[t].tree;continue}const{regexValues:r,state:i,treeNode:n}=s(t,f);if(!n)break;c(i,e,r),f=n}if(!a)return;u.forEach(((e,t)=>{a=null==a?void 0:a.replace(`$${t+1}`,e)}));const d=h.slice(l+1).join("/");return("/"+a+(d?"/"+d:"")).replace(o,"/")+n}function s(e,t){let r,s,i=[];return Object.keys(t).forEach((n=>{if(i.length||r||0!==n.indexOf("regex:"))return;const o=new RegExp(n.replace("regex:","")),a=e.match(o);if(a)i=a.slice(1),r=t[n].value,s=t[n].tree})),{regexValues:i,state:r,treeNode:s}}function i(e){let t=e.replace(n,"");const r=t.indexOf("?"),s=t.indexOf("#");if(-1!==r)t=t.slice(0,r);if(-1!==s)t=t.slice(0,s);return t=t.replace(/^\//,"").replace(/\/$/,""),t}Object.defineProperty(t,"__esModule",{value:!0}),t.getPath=t.UrlRewriterClass=void 0;const n=/^http[s]?:\/\//,o=/\/{2,}/g;return t.UrlRewriterClass=class{constructor(e){this.routeTree=e.routeTree,this.reverseRouteTree=e.reverseRouteTree}get(e,t=!1){const s=r(e,this.routeTree);if(t)return s;else return null!=s?s:e}getReverse(e,t=!1){const s=r(e,this.reverseRouteTree);if(t)return s;else return null!=s?s:e}},t.getPath=i,t}(0,{}),R=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=(0,r.createContext)(undefined);return s.displayName="Router/router:Context",t.default=s,t}(0,{},r),m=R,v=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.disablePartialSend=t.enablePartialSend=void 0,t.enablePartialSend=function(){if("undefined"!=typeof window)return;return(0,r.loadSync)("Router/ServerRouting").enablePartialSend()},t.disablePartialSend=function(){if("undefined"!=typeof window)return;return(0,r.loadSync)("Router/ServerRouting").disablePartialSend()},t}(0,{},s),P=v,w=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.calculateReferenceHref=void 0,t.calculateReferenceHref=function(e,t,r){const s=t.maskResolver.calculateState(e.state,e,r);let i;if(e.href){const s=t.urlRewriter.getReverse(r||t.url.getStateUrl());i=t.maskResolver.calculateUrl(e.href,e,s)}else{const e=t.urlRewriter.getReverse(s);i=t.url.getRealUrl(e)}return{state:s,href:i}},t}(0,{}),O=w,U=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUrlOptionsFromProps=void 0,t.getUrlOptionsFromProps=function(e,t){const s={};for(const n in e)if(e.hasOwnProperty(n)&&(i=n,!(r.indexOf(i)>=0))&&!t.hasOwnProperty(n))s[n]=e[n];var i;return s};const r=["content","mask","theme","_isSeparatedOptions","_logicParent","readOnly","children","getDataToRender"];return t}(0,{}),b=U,S=function(e,t,r,s){"use strict";var i;return Object.defineProperty(t,"__esModule",{value:!0}),t.calculateMaskType=t.MaskType=void 0,function(e){e[e.Undefined=0]="Undefined",e[e.Path=1]="Path",e[e.Query=2]="Query",e[e.PathFragment=3]="PathFragment",e[e.QueryFragment=4]="QueryFragment"}(i||(t.MaskType=i={})),t.calculateMaskType=function(e,t,n=!1){const o=new s.UrlParts(e),a=[];return[o.getPath(),o.getQuery(),o.getFragment()].forEach((e=>{if(!e)return;const s=function(e,t){if(e.indexOf("/")>-1)return function(e,t){if(0===e.indexOf("#"))return!0;const r=t.getFragment();if(!r)return!1;const s=/([^\/?&#:]+\/):[^\/?&#]/g;let i=s.exec(e);for(;i;){if(r.indexOf(i[1])>-1)return!0;
22i=s.exec(e)}return!1}(e,t)?i.PathFragment:i.Path;if(e.indexOf("=")>-1)return 0===e.indexOf("#")?i.QueryFragment:i.Query;return r.IoC.resolve("ILogger").error("Router.MaskResolver",`Mask "${e}" is invalid`),i.Undefined}(e,t),l={mask:e,maskType:s};if(n&&s===i.Path)l.hasTrailingSlash=o.hasTrailingSlash;a.push(l)})),a},t}(0,{},a,d),x=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e="/"){this.protocol="",this.host="",this.hostname="",this.port="",this.href="",this.pathname="",this.search="",this.hash="",this._update(e||"/")}replace(){}_update(e){const t=new r.UrlParts(e);this.pathname=t.getPath(),this.search=t.getQuery(),this.hash=t.getFragment(),this.href=e}},t}(0,{},d),k=function(e,t,r,s,i,n){"use strict";function o(e){const t=function(e){if(!e)return[];const t=Object.keys(e);let r=t.length;const s=new Array(r);for(;r--;)s[r]=[t[r],e[t[r]]];return s}(e),r=a(t),s=a(function(e){return e.map((e=>[e[1],e[0]]))}(t));return{routeTree:r,reverseRouteTree:s}}function a(e){const t={tree:{},rootRoute:null};return e.forEach((e=>{const r=e[0],s=e[1];if("/"===r)return void(t.rootRoute="/"+(0,n.getPath)(s));const i=r.split("/").filter((e=>e));let o=t.tree;i.forEach(((e,t)=>{if(!o.hasOwnProperty(e))o[e]={value:void 0,tree:{}};if(t===i.length-1)if(!o[e].value||o[e].value.length>s.length)o[e].value=s;o=o[e].tree}))})),t}Object.defineProperty(t,"__esModule",{value:!0}),t._prepareRoutes=void 0;class l{constructor(e){this.rewriters=e}get(e){let t;for(const r of this.rewriters)if(t=r.get(e,!0),t)break;return null!=t?t:e}getReverse(e){let t;for(const r of this.rewriters)if(t=r.getReverse(e,!0),t)break;return null!=t?t:e}static getInstance(){const e=(0,s.getStore)("UrlRewriterAPI");let t=e.get("instance");if(!t){const s=[],a=o(r||{});s.push(new n.UrlRewriterClass(a));const u=(0,i.get)();if(u)s.push(new n.UrlRewriterClass(o(u)));t=new l(s),e.set("instance",t)}return t}}return t.default=l,t._prepareRoutes=o,t}(0,{},e,l,o,_),H=function(e,t,r,s,i,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.useRouter=void 0,t.useRouter=function(){const e=(0,r.useContext)(i.default),{Router:t}=(0,r.useContext)((0,n.getWasabyContext)());if(!e)s.logger.error(new Error("Router не наÑелÑÑ Ð² конÑекÑÑе. ÐеобÑ
одимо ÑбедиÑÑÑÑ, ÑÑÐ¾Ð±Ñ ÐºÐ¾Ð½ÑекÑÑ Router/router:Context бÑл пÑавилÑно иниÑиализиÑован в коÑне ÑÑÑаниÑÑ."));return e||t},t}(0,{},r,l,R,i),C=H,j=function(e,t,r,s,i){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.withRouter=void 0,t.withRouter=function(e){const t=e.displayName||e.name||"Component";class n extends s.Component{constructor(e){super(e),this.ref=this.ref.bind(this)}ref(e){this._$child=e}render(){return(0,r.jsx)(e,{...this.props,ref:this.ref,Router:this.context})}}return n.contextType=i.default,n.displayName=`withRouter(${t})`,n.getDefaultOptions=e.getDefaultOptions,n._getDefaultOptions=e._getDefaultOptions,n.defaultProps=e.defaultProps,n.getOptionTypes=e.getOptionTypes,n},t}(0,{},t,r,R),I=j,M=function(e,t,r,s,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryParams=t.PathParams=t.UrlParamsGetter=void 0;const o="traverse",a=`*${o}`;t.UrlParamsGetter=class{constructor(e,t){this.urlParts=new n.UrlParts(t),this.maskTypes=(0,s.calculateMaskType)(e,this.urlParts)}get(){let e=[];this.maskTypes.forEach((t=>{switch(t.maskType){case s.MaskType.Path:e=[...e,...l.calculateParams(t.mask,this.urlParts.getPath())];break;case s.MaskType.Query:e=[...e,...u.createQueryObject().calculateParams(t.mask,this.urlParts.getQuery())];break;case s.MaskType.PathFragment:e=[...e,...l.calculateParams(t.mask,this.urlParts.getFragment())];break;case s.MaskType.QueryFragment:e=[...e,...u.createFragmentObject().calculateParams(t.mask,this.urlParts.getFragment())]}}));const t={};return e.forEach((e=>{if(e.maskId)t[e.maskId]=(0,i.decodeParam)(e.urlValue)})),t}};class l{static calculateParams(e,t){const r=[],s=t.replace(/^\//,"").split(/[#\/]/),i=Array.from(l._parseMask(e).entries());
22return i.forEach((([e,t],n)=>{let u;for(let e=n+1;e<i.length;e++)if(void 0!==i[e][0]){u=i[e][0];break}const{urlValues:c,urlIdIndex:h}=l._getUrlValue(s,e,t.length,u);t.forEach(((t,i)=>{if(t===a){let e;if(h&&h>=0)e=[c[i],...s.slice(h)].join("/");else e=[c[i],...s].join("/");return void r.push({maskId:o,urlValue:e,urlId:void 0})}const n={maskId:t,urlValue:c[i],urlId:0===i?e:void 0};r.push(n)}))})),r}static _parseMask(e){const t=e.split(/[#/]/),s=new Map;let i,n=!1;return t.forEach((e=>{var t,o;if(e)if(!n){if(!e.startsWith(":")&&e!==a)return s.set(e,[]),void(i=e);if(void 0===i&&!s.has(i))s.set(i,[]);if(e===a)null===(t=s.get(i))||void 0===t||t.push(e),n=!0;else null===(o=s.get(i))||void 0===o||o.push(e.slice(1))}else r.logger.error('ÐÑавило маÑки "*traverse" необÑ
одимо Ð´Ð»Ñ Ð¿Ð¾Ð»ÑÑÐµÐ½Ð¸Ñ Ñ
воÑÑа url-адÑеÑа. ÐелÑÐ·Ñ Ð² маÑке поÑле него задаваÑÑ Ð´ÑÑгие пÑавила маÑки!')})),s}static _getUrlValue(e,t,r,s){let i,n;if(void 0===t){let t=0;if(void 0!==s){const i=e.indexOf(s);if(i>0)t=Math.max(0,i-r)}i=e.splice(t,r)}else{if(n=e.indexOf(t),!e.length||n<0)return{urlValues:[]};i=e.splice(n,r+1),i.splice(0,1)}if(!i.length)return{urlValues:[""]};else return{urlValues:i,urlIdIndex:n}}}t.PathParams=l;class u{constructor(e){this.queryStringParams=e}calculateParams(e,t){const r=this.queryStringParams.getParamsFromQueryMaskString(e),s=this.queryStringParams.getParamsFromQueryString(t),i=[],n=[];return[s,r].forEach((e=>{for(const t in e)if(e.hasOwnProperty(t)&&!(n.indexOf(t)>-1))i.push({maskId:r[t],urlValue:s[t],urlId:t}),n.push(t)})),i}static createQueryObject(){return new u(c.createQueryObject())}static createFragmentObject(){return new u(c.createFragmentObject())}}t.QueryParams=u;class c{constructor(e){this.splitRegexp=e}getParamsFromQueryString(e){return this._getQueryParams(e,(e=>e))}getParamsFromQueryMaskString(e){return this._getQueryParams(e,(e=>0===e.indexOf(":")?e.slice(1):e))}_getQueryParams(e,t){const r={},s=e.split(this.splitRegexp);for(let e=0;e<s.length;e++){if(!s[e])continue;if(-1===s[e].indexOf("="))continue;const i=s[e].split("=");r[i[0]]=t(i[1])}return r}static createQueryObject(){return new c(c.QUERY_REGEXP)}static createFragmentObject(){return new c(c.FRAGMENT_REGEXP)}}return c.QUERY_REGEXP=/[?&]/,c.FRAGMENT_REGEXP=/[#&]/,t}(0,{},l,S,f,d),N=function(e,t,r){"use strict";function s(e,t,s){if(!e)if(t&&t.state&&t.href)return t;else return{state:r.default.getInstance().get(s),href:s};if(t&&t.state&&t.href)return t;else return e}return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("undefined"==typeof window)return;let t=!1;window.onpopstate=r=>{if(t)return void(t=!1);if(!r.state)return;if(r.state&&!r.state.id&&!r.state.state&&!r.state.href)return;const i=e(),n=i.history.getCurrentState(),o=i.history.getPrevState();if(!r.state&&!o||r.state&&r.state.id<n.id){const e=s(o,r.state,r.state||o?i.url.getStateUrl():i.url.getUrl());i.navigate(e,(()=>i.history.back(e)))}else{const e=s(i.history.getNextState(),r.state,i.url.getStateUrl());i.navigate(e,(()=>i.history.forward(e)),(()=>{t=!0,window.history.back()}))}}},t}(0,{},k),Q=N,E=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s={get:e=>r.default.getInstance().get(e),getReverse:e=>r.default.getInstance().getReverse(e)};return t.default=s,t}(0,{},k),T=E,F=function(e,t,r,s,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UrlQueryModifier=t.UrlModifier=void 0;t.UrlModifier=class{constructor(e,t,s){if(this.mask=e,this.urlParts=new n.UrlParts(s),this.maskTypes=(0,r.calculateMaskType)(e,this.urlParts,t.trailingSlash),this.keepQuery=!!t.keepQuery,this.cfg=t.clear?{}:{...t},this.cfg.replace){const e=this.urlParts.getExtQuery();this.urlParts=new n.UrlParts(""),this.urlParts.setExtQuery(e),delete this.cfg.replace}}modify(){const e={},t=this.mask.startsWith("/");let s=!1;if(this.maskTypes.forEach((i=>{switch(i.maskType){case r.MaskType.Path:e.path=o.modify(i.mask,this.cfg,this.urlParts.getPath()),s=!!i.hasTrailingSlash;break;case r.MaskType.Query:e.query=a.createQueryObject().modify(i.mask,this.cfg,t?"":this.urlParts.getQuery());break;case r.MaskType.PathFragment:e.fragment=o.modify(i.mask,this.cfg,t?"":this.urlParts.getFragment());break;case r.MaskType.QueryFragment:e.fragment=a.createFragmentObject().modify(i.mask,this.cfg,t?"":this.urlParts.getFragment())}})),t){(this.keepQuery?["path","fragment"]:["path","query","fragment"]).forEac
22h((t=>{if(void 0===e[t])e[t]=""}))}return this.urlParts.join(e,s)}};t.UrlQueryModifier=class{constructor(e,t){if(this.urlParts=new n.UrlParts(t),this.cfg={...e},this.cfg.replace){const e=this.urlParts.getExtQuery();this.urlParts.clearQuery(),this.urlParts.setExtQuery(e),delete this.cfg.replace}if(this.cfg.clearFragment)this.urlParts.clearFragment(),delete this.cfg.clearFragment;this.mask="?"+Object.keys(this.cfg).map((e=>`${e}=:${e}`)).join("&")}modify(){const e={};return e.query=a.createQueryObject().modify(this.mask,this.cfg,this.urlParts.getQuery()),this.urlParts.join(e)}};class o{static modify(e,t,r){const n=i.PathParams.calculateParams(e,r),a=o._calculateNewUrlPart(r,e,n).replace(/^[#\/]+/,"").replace(/[#\/]+$/,"").split("/"),l=[];for(let e=0;e<n.length;e++){const r=n[e],i=t[r.maskId];if(void 0===i&&void 0===r.urlValue)continue;if(void 0===i){if(r.urlId){a.splice(o._getUrlIdIndex(a,r.urlId,r.urlValue,l),2);continue}a.splice(a.indexOf(r.urlValue),1);continue}const u=(0,s.encodeParam)(i);if(void 0===r.urlValue){if(r.urlId)a.push(r.urlId);a.push(u);continue}let c;if(r.urlId)c=o._getUrlIdIndex(a,r.urlId,r.urlValue,l)+1;else c=o._getReplaceIndex(a,r.urlValue,l);l.push(c),a[c]=u}return a.join("/")}static _calculateNewUrlPart(e,t,r){let s="",i="";const n=[];if(r.forEach((e=>{if(e.urlId){if(i)n.push(i);i=e.urlId+"(?=\\/|$)(\\/[^\\/?#]+)?\\/?",s+=e.urlId+"(\\/:[^\\/?#]+)\\/?"}else i+="([^\\/?#]+\\/?)?",s+="(:[^\\/?#]+\\/?)"})),i)n.push(i);let o=t.replace(new RegExp(s),"");if(o=o.replace(/[?#]/,""),!o)return e;let a=e.indexOf(o);if(!o.endsWith("/"))for(;-1!==a;){const t=e[a+o.length];if(void 0===t||"/"===t||"?"===t||"#"===t)break;a=e.indexOf(o,a+1)}if(-1===a)return o;let l=e.slice(0,a+o.length);const u=e.slice(a+o.length);return n.forEach((e=>{const t=u.match(new RegExp(e));if(t){const e=t.index,r=u[e+t[0].length],s=t[0][t[0].length-1];if(!(0!==e&&"/"!==u[e-1]||void 0!==r&&"/"!==s))l+=t[0]}})),l}static _getUrlIdIndex(e,t,r,s){let i=-1;for(;;){const n=e.indexOf(t,i+1);if(n<0)break;if(e[n+1]&&e[n+1]===r){if(s.includes(n))continue;return n}i=n}return i}static _getReplaceIndex(e,t,r){let s,i=-1;for(;;){if(s=e.indexOf(t,i+1),-1===s)return-1;if(!r.includes(s))break;else i=s}return s}}class a{constructor(e){this.queryParams=e}modify(e,t,r){const i=this.queryParams.calculateParams(e,r),n={};for(let e=0;e<i.length;e++){const r=i[e];if(void 0===r.maskId){n[r.urlId]=r.urlValue;continue}const o=t[r.maskId];if(void 0!==o)n[r.urlId]=(0,s.encodeParam)(o)}const o=[];for(const e in n)if(n.hasOwnProperty(e))o.push([e,n[e]].join("="));return o.join("&")}static createQueryObject(){return new a(i.QueryParams.createQueryObject())}static createFragmentObject(){return new a(i.QueryParams.createFragmentObject())}}return t}(0,{},S,f,M,d),A=function(e,t,r,s,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAppNameByUrl=void 0,t.getAppNameByUrl=function(e){let t;try{t=decodeURIComponent(e)}catch(s){r.logger.warn(`ÐÑибка пÑи обÑабоÑке ÑÑÑоки URI "${e}"`,s),t=e}let i=s.default.getInstance().get(t)||"";if(-1!==i.indexOf("?"))i=i.replace(/\?.*/,"");if(-1!==i.indexOf("#"))i=i.replace(/#.*/,"");if(-1!==i.indexOf("/"))i=i.split("/")[1];return i+"/Index"};return t.default=class{constructor(e,t){this._urlRewriter=e,this._routerUrl=t}calculateUrlParams(e,t){const r=t||this._routerUrl.getStateUrl();return new i.UrlParamsGetter(e,r).get()}calculateState(e,t,r){const s=r||this._routerUrl.getStateUrl();return new n.UrlModifier(e,t,s).modify()}calculateHref(e,t,r){return this.calculateState(e,t,r)}calculateUrl(e,t,r){const s=this.calculateState(e,t,r);if(r)return s;const i=this._urlRewriter.getReverse(this.calculateState(e,t,r));return this._routerUrl.getRealUrl(i)}calculateQueryState(e,t){const r=t||this._routerUrl.getStateUrl();return new n.UrlQueryModifier(e,r).modify()}calculateQueryHref(e,t){return this.calculateQueryState(e,t)}calculateQueryUrl(e,t){const r=this.calculateQueryState(e,t);if(t)return r;const s=this._urlRewriter.getReverse(this.calculateQueryState(e,t));return this._routerUrl.getRealUrl(s)}},t}(0,{},l,k,M,F),D=A,L=function(e,t,r,s,i,n,o,a,l,u){"use strict";function c(e,t,r){const l=s.default.getInstance(),u=new i.default(e,l),c=new n.default(l,u),h=new o.default(l,u,t,r),d=new a.default;return new f(l,u,c,h,d)}
22Object.defineProperty(t,"__esModule",{value:!0}),t.createNewRouter=t.getRootRouter=void 0;const h="undefined"==typeof window;class f{constructor(e,t,r,s,i){this.urlRewriter=e,this.url=t,this.maskResolver=r,this.history=s,this._manager=i,this._isNavigating=!1,this._instId=f._instIdCounter++}navigate(e,t,s){const i=this.urlRewriter.get(e.state),n=e.href||this.url.getRealUrl(this.urlRewriter.getReverse(i)),o=this.history.getCurrentState();if(o.state===i||this._isNavigating)return;const a={state:i,href:n};this._isNavigating=!0;const l=e=>{if(this._isNavigating=!1,e){if(t){if(!0===t())this.history.push(a)}else this.history.push(a);this._manager.callAfterUrlChange(a,o)}else if(s)s()},u=e=>{if(this._isNavigating=!1,s)s(e);else r.logger.error("ÐÑибка пÑи вÑзове IRouter.navigate - "+e.message,e)};let c;try{c=this._tryApplyNewState(a)}catch(e){return void u(e)}if(!(c instanceof Promise))l(c);else c.then(l,u)}navigatePushState(e){this.callBeforeUrlChangeAndCallback(e,(()=>{this.history.push(e)}))}navigateReplaceState(e){this.callBeforeUrlChangeAndCallback(e,(()=>{this.history.replaceState(e)}))}callBeforeUrlChangeAndCallback(e,t){if(this._isNavigating)return;this._isNavigating=!0;const s=e=>{this._isNavigating=!1,t()},i=e=>{this._isNavigating=!1,r.logger.error("ÐÑибка пÑи вÑзове IRouter.navigate - "+e.message,e)};let n;try{n=this._tryApplyNewState(e,!0)}catch(e){return void i(e)}if(!(n instanceof Promise))s();else n.then(s,i)}replaceState(e,t){const r=this.urlRewriter.get(e.state),s={state:r,href:e.href||this.url.getRealUrl(this.urlRewriter.getReverse(r))};this.navigate(s,(()=>{this.history.replaceState(s),null==t||t(s)}))}get instId(){return this._instId}_tryApplyNewState(e,t){const s=this.history.getCurrentState(),i=(0,n.getAppNameByUrl)(e.state),o=(0,n.getAppNameByUrl)(s.state),a=t=>{if(i===o)return t;if(h)return r.logger.warn("ÐеÑеÑ
од Ð¼Ð¾Ð¶ÐµÑ Ð¿ÑивеÑÑи к ÑедиÑекÑÑ Ð½Ð° СÐ. ÐÑо веÑоÑÑно ÑÐ»Ð¾Ð¼Ð°ÐµÑ Ð¿Ð¾Ñоковое поÑÑÑоение.","ТекÑÑий state: "+s.state,"ÐовÑй state: "+e.state),t;else return this.url.location.href=e.href,!1},l=this._manager.callBeforeUrlChange(e,s,t);if(l instanceof Promise)return l.then((e=>a(e)));else return a(l)}}return f._instIdCounter=0,t.default=f,t.getRootRouter=function(e=!1,t){if(e){const e=new Error("ÐÑзов getRootRouter Ñам, где ÑÑо не нÑжно. ÐаÑианÑÑ Ð¸ÑпÑавлениÑ:\n 1) пеÑейÑи на иÑполÑзование API ÑоÑÑеÑа из конÑекÑÑа;\n 2) возможно забÑли пÑокинÑÑÑ Router из меÑода getDataToRender модÑÐ»Ñ Index.");r.logger.warn(e)}const s=(0,r.getStore)("ROOT_ROUTER");let i=s.get("instance");if(!i)i=c(r.location,"undefined"!=typeof window?window.history:new u.default(new l.default),t),s.set("instance",i);return i},t.createNewRouter=function(e="/",t){const r=new l.default(e);return c(r,new u.default(r),t)},t}(0,{},l,k,p,A,h,g,x,y),V=L,$=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.removeRoute=t.addRoute=t.replaceState=t.navigate=void 0,t.navigate=function(e,t,s){(0,r.getRootRouter)().navigate(e,t,s)},t.replaceState=function(e,t){(0,r.getRootRouter)().replaceState(e,t)},t.addRoute=function(e,t,s){(0,r.getRootRouter)()._manager.addRoute(e,t,s)},t.removeRoute=function(e){(0,r.getRootRouter)()._manager.removeRoute(e)},t}(0,{},L),B=$,q=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.getVisibleRelativeUrl=t.getRelativeUrl=t.getRelativeUrlWithService=t.getHistoryPosition=t.getHistory=void 0,t.getHistory=function(){return(0,r.getRootRouter)().history.getHistory()},t.getHistoryPosition=function(){return(0,r.getRootRouter)().history.getHistoryPosition()},t.getRelativeUrlWithService=function(e){return(0,r.getRootRouter)().url.getServiceUrl(e)},t.getRelativeUrl=function(){return(0,r.getRootRouter)().url.getStateUrl()},t.getVisibleRelativeUrl=function(){return(0,r.getRootRouter)().url.getUrl()},t}(0,{},L),W=q,G=function(e,t,r){"use strict";
22return Object.defineProperty(t,"__esModule",{value:!0}),t.replaceState=t.push=t.forward=t.back=t.getNextState=t.getCurrentState=t.getPrevState=void 0,t.getPrevState=function(){return(0,r.getRootRouter)().history.getPrevState()},t.getCurrentState=function(){return(0,r.getRootRouter)().history.getCurrentState()},t.getNextState=function(){return(0,r.getRootRouter)().history.getNextState()},t.back=function(e){(0,r.getRootRouter)().history.back(e)},t.forward=function(e){(0,r.getRootRouter)().history.forward(e)},t.push=function(e){(0,r.getRootRouter)().history.push(e)},t.replaceState=function(e){(0,r.getRootRouter)().history.replaceState(e)},t}(0,{},L),X=G,Y=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.calculateQueryHref=t.calculateHref=t.calculateUrlParams=void 0,t.calculateUrlParams=function(e,t){return(0,r.getRootRouter)().maskResolver.calculateUrlParams(e,t)},t.calculateHref=function(e,t,s){return(0,r.getRootRouter)().maskResolver.calculateHref(e,t,s)},t.calculateQueryHref=function(e,t){return(0,r.getRootRouter)().maskResolver.calculateQueryHref(e,t)},t}(0,{},L),K=Y,J=function(e,t,r,s,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=(0,s.forwardRef)((function(e,t){const a=(0,s.useMemo)((()=>e.Router||(0,n.getRootRouter)(!0)),[e.Router]),l=!t?e.children:(0,s.cloneElement)(e.children,{ref:t}),u=!0===e.forwardRouter?(0,r.jsx)(i.WasabyContextManager,{Router:a,children:l}):l;return(0,r.jsx)(o.default.Provider,{value:a,children:u})}));return a.displayName="Router/router:ContextProvider",t.default=a,t}(0,{},t,r,n,L,R),z=J,Z=function(e,t,r,s,i,n,o,a,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Reference=void 0;let c=0;class h extends s.Component{constructor(e,t){super(e),this._instId="reference_"+c++,this.state=(0,u.calculateReferenceHref)(e,t||(0,o.getRootRouter)(!0)),this._mousedownHandler=this._mousedownHandler.bind(this),this._clickHandler=this._clickHandler.bind(this),this._mouseoverHandler=this._mouseoverHandler.bind(this)}getInstanceId(){return this._instId}componentDidMount(){this.Router._manager.addReference(this,(()=>(this.setState((0,u.calculateReferenceHref)(this.props,this.Router)),!0)))}componentDidUpdate(e,t){const r=(0,u.calculateReferenceHref)(this.props,this.Router);if(t.state!==r.state||t.href!==r.href)this.setState(r)}componentWillUnmount(){this.Router._manager.removeReference(this)}render(){const e={};if((0,s.isValidElement)(this.props.children)&&"string"!=typeof this.props.children.type)e.onMouseOverCallback=this._mouseoverHandler;if("data-qa"in this.props)e["data-qa"]=this.props["data-qa"];const t={...this.props.children&&"props"in this.props.children?this.props.children.props:{},className:this.props.className,href:this.state.href||this.state.state,onMouseDown:this._mousedownHandler,onClick:this._clickHandler,onMouseOver:this._mouseoverHandler,...e,ref:this.props.forwardedRef};return(0,s.cloneElement)(this.props.children,t)}get Router(){return this.context||(0,o.getRootRouter)(!0)}_mousedownHandler(e){var t,r;if(0!==e.nativeEvent.button)return;if(e.nativeEvent.ctrlKey||i.detection.isMacOSDesktop&&e.nativeEvent.metaKey)return;if(!1===(null===(r=(t=this.props).onMouseDown)||void 0===r?void 0:r.call(t,e)))return;const s={state:this.state.state,href:this.state.href};if(e.routerReferenceNavigation=!0,!this.props.onNavigate||!1!==this.props.onNavigate(s,e))this.Router.navigate(s)}_clickHandler(e){if(!(e.nativeEvent.ctrlKey||i.detection.isMacOSDesktop&&e.nativeEvent.metaKey))if(0===e.nativeEvent.button)e.preventDefault()}_mouseoverHandler(){if(this.props.recalcUrlBeforeNavigate)this.setState((0,u.calculateReferenceHref)(this.props,this.Router,this.Router.url.getLogicUrl()))}}t.Reference=h,h.contextType=l.default,h.displayName="Router/router:Reference";const f=(0,s.forwardRef)((function(e,t){const i=(0,s.useContext)(l.default),o=(0,s.useContext)((0,n.getWasabyContext)());if(o.Router&&(!i||o.Router.instId>i.instId))return(0,r.jsx)(a.default,{Router:o.Router,children:(0,r.jsx)(h,{...e,forwardedRef:t})});else return(0,r.jsx)(h,{...e,forwardedRef:t})}));return f.displayName=`wrapToContext(${h.displayName})`,t.default=f,t}(0,{},t,r,a,n,L,J,R,w),ee=Z,te=function(e,t,r,s,i,n,o,a,l,u){"use strict";
22Object.defineProperty(t,"__esModule",{value:!0}),t.Route=void 0;let c=0;class h extends s.Component{constructor(e,t){super(e),this._urlOptions={},this._isResolved=!1,this._urlOptionsFields=[],this._needLoadData=!1,this._instId="activator_"+c++,this._urlOptions={},this._progressBar=e.progressBar,this._applyNewUrl(e.mask,t||(0,o.getRootRouter)(!0),e)}componentDidMount(){if("undefined"!=typeof window)this._register();this._checkUrlResolved()}render(){var e,t,i,n,o;return this._applyNewUrl(this.props.mask,this.Router,this.props,null===(e=this._newLoc)||void 0===e?void 0:e.state),this.props.children?(0,s.cloneElement)(this.props.children,{...this._urlOptions,pageConfig:this._pageConfig,forwardedRef:this.props.forwardedRef,children:null===(i=null===(t=this.props.children)||void 0===t?void 0:t.props)||void 0===i?void 0:i.children,content:null===(o=null===(n=this.props.children)||void 0===n?void 0:n.props)||void 0===o?void 0:o.content,logInvalidProps:!1}):(0,r.jsx)("span",{})}componentDidUpdate(e){if(e.contentWidth!==this.props.contentWidth)this._needLoadData=!0,this._afterApplyNewUrl()}componentWillUnmount(){if(this._unregister(),this._isResolved&&this.props.onLeave)this.props.onLeave(this._newLoc,this._oldLoc)}getInstanceId(){return this._instId}get Router(){return this.context||(0,o.getRootRouter)(!0)}_register(){this.Router._manager.addRoute(this,((e,t,r)=>this._beforeApplyNewUrl(e,t,r)),(()=>(this._afterApplyNewUrl(),!0)))}_unregister(){this.Router._manager.removeRoute(this)}_beforeApplyNewUrl(e,t,r=!1){var s,n;this._needLoadData=!1,this._newLoc=e,this._oldLoc=t;const o=s=>{var i,n,o,a,l;if(!1===s)return!1;let u=!0;const c=this._urlOptions,h=this._applyNewUrl(this.props.mask,this.Router,this.props,e.state);if(r)return s||u;if(h&&!this._isResolved)u=null===(n=(i=this.props).onEnter)||void 0===n?void 0:n.call(i,e,t),this._isResolved=!0;else if(!h&&this._isResolved)u=null===(a=(o=this.props).onLeave)||void 0===a?void 0:a.call(o,e,t),this._isResolved=!1;if(this._didOptionsChange(this._urlOptions,c))null===(l=this.props.onUrlChange)||void 0===l||l.call(this,this._urlOptions,c),this._needLoadData=!0;return s||u},a=null===(n=(s=this.props).onBeforeChange)||void 0===n?void 0:n.call(s,e,t);if(a&&a.then)return a.then((e=>o(e))).catch((e=>(i.logger.error(e),!1)));else return o(a)}_afterApplyNewUrl(){var e;if(!this.props.getDataToRender)return void this.setState({updated:{}});if(!this._needLoadData)return;null===(e=this._progressBar)||void 0===e||e.show();const t=this._urlOptions;this.props.getDataToRender(this._urlOptions).then((e=>{if(!this._didOptionsChange(this._urlOptions,t))this._pageConfig=e,this._needLoadData=!1,this.setState({updated:{}})})).catch((e=>(i.logger.warn("ÐÑибка пÑи загÑÑзке даннÑÑ
",e),e)))}_applyNewUrl(e,t,r,s){this._setUrlOptions(t.maskResolver.calculateUrlParams(e,s));const i=this._hasResolvedParams(this._urlOptions);return this._fillUrlOptionsFromOptions(r),i}_hasResolvedParams(e){let t=!1;for(const r in e)if(e.hasOwnProperty(r)&&void 0!==e[r]){t=!0;break}return t}_fillUrlOptionsFromOptions(e){this._urlOptions={...this._urlOptions,...(0,u.getUrlOptionsFromProps)(e,this._urlOptions)}}_checkUrlResolved(){var e,t;const r=this.Router,s=r.url.getStateUrl(),i=r.maskResolver.calculateUrlParams(this.props.mask,s),n=this._hasResolvedParams(i);this._fillUrlOptionsFromOptions(this.props);const o=r.history.getCurrentState();let a=r.history.getPrevState();if(n){if(this._didOptionsChange(i,this._urlOptions))this._setUrlOptions(i);if(this._isResolved=!0,!a)a={state:r.maskResolver.calculateState(this.props.mask,{clear:!0})};null===(e=this.props.onEnter)||void 0===e||e.call(this,o,a),null===(t=this.props.onUrlChange)||void 0===t||t.call(this,this._urlOptions,{})}}_setUrlOptions(e){this._urlOptions=e,this._urlOptionsFields=Object.keys(e)}_didOptionsChange(e,t){let r;for(r in e)if(e.hasOwnProperty(r))if(!t.hasOwnProperty(r)||e[r]!==t[r]){if("pageUrl"===r&&(void 0===e[r]&&"main"===t[r]||"main"===e[r]&&void 0===t[r]))continue;return!0}for(r in t)if(t.hasOwnProperty(r)&&(0===this._urlOptionsFields.length||this._urlOptionsFields.indexOf(r)>=0)&&!e.hasOwnProperty(r))return!0;return!1}}t.Route=h,h.contextType=l.default,h.displayName="Router/router:Route";const f=(0,s.forwardRef)((function(e,t){const i=(0,s.useContext)(l.default),o=(0,s.useContext)((0,n.getWasabyContext)());if(o.Router&&(!i||o.Router.instId>i.instId))return(0,r.jsx)(a.default,{Router:o.Router,children:(0,r.jsx)(h,{...e,forwardedRef:t,ref:e.instanceRef})});else return(0,r.jsx)(h,{...e,forwardedRef:t,ref:e.instanceRef})}));return f.displayName=`wrapToContext(${h.displayName})`,t.default=f,t}(0,{},t,r,l,n,L,J,R,U),re=te,c.calculateReferenceHref=c.getUrlOptionsFromProps=c.disableParti
22alSend=c.enablePartialSend=c.createNewRouter=c.getRootRouter=c.getAppNameByUrl=c.UrlRewriter=c.MaskResolver=c.History=c.Data=c.Controller=c.withRouter=c.useRouter=c.ContextProvider=c.Context=c.BaseRoute=c.Route=c.BaseReference=c.Reference=void 0,Object.defineProperty(c,"getRootRouter",{enumerable:!0,get:function(){return V.getRootRouter}}),Object.defineProperty(c,"createNewRouter",{enumerable:!0,get:function(){return V.createNewRouter}}),(0,Q.default)(V.getRootRouter),c.Controller=B,c.Data=W,c.UrlRewriter=T.default,c.History=X,c.MaskResolver=K,Object.defineProperty(c,"getAppNameByUrl",{enumerable:!0,get:function(){return D.getAppNameByUrl}}),Object.defineProperty(c,"Reference",{enumerable:!0,get:function(){return ee.default}}),Object.defineProperty(c,"BaseReference",{enumerable:!0,get:function(){return ee.Reference}}),Object.defineProperty(c,"Route",{enumerable:!0,get:function(){return re.default}}),Object.defineProperty(c,"BaseRoute",{enumerable:!0,get:function(){return re.Route}}),Object.defineProperty(c,"Context",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(c,"ContextProvider",{enumerable:!0,get:function(){return z.default}}),Object.defineProperty(c,"useRouter",{enumerable:!0,get:function(){return C.useRouter}}),Object.defineProperty(c,"withRouter",{enumerable:!0,get:function(){return I.withRouter}}),Object.defineProperty(c,"enablePartialSend",{enumerable:!0,get:function(){return P.enablePartialSend}}),Object.defineProperty(c,"disablePartialSend",{enumerable:!0,get:function(){return P.disablePartialSend}}),Object.defineProperty(c,"getUrlOptionsFromProps",{enumerable:!0,get:function(){return b.getUrlOptionsFromProps}}),Object.defineProperty(c,"calculateReferenceHref",{enumerable:!0,get:function(){return O.calculateReferenceHref}}),c})); 23define("Application/Env",["Application/State","Application/Request","Application/Config","require","exports"],(function(e,t,o,n,r){var s,i,c,u,a,l,f,g,h,p,d,v,y,R,_,q,b,m,w,L,S,C,k;return Object.defineProperty(r,"__esModule",{value:!0}),s=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=/=.*/,n="; ";return t.default=class{constructor(e=new Map){if(this.cacheCookie=e,this.isCoookieAvailable=function(){try{return"string"==typeof document.cookie}catch(e){return!1}}(),!this.isCoookieAvailable)throw new Error("document.cookie is not available")}get(e){if(this.cacheCookie.has(e))return this.cacheCookie.get(e);const t=document.cookie.split(n);let o=null;for(let n=0;n<t.length;n++){const r=String(t[n]).trim(),s=r.indexOf("="),i=r.slice(0,s);if(this.cacheCookie.has(i))continue;let c;try{c=decodeURIComponent(r.slice(s+1))}catch(e){continue}if(this.cacheCookie.set(i,c),i===e)o=c}return o}set(e,t,o){let r="";if(o=o||{},null===t)o.expires=-1;if(o.expires){let e;if("number"==typeof o.expires)e=new Date,e.setTime(e.getTime()+864e5*o.expires);else if(o.expires.toUTCString)e=o.expires;else throw new TypeError('Option "expires" should be a Number or Date instance');r=`${n}expires=${e.toUTCString()}`}const s=o.path?`${n}path=${o.path}`:"",i=o.domain?`${n}domain=${o.domain}`:"",c=o.secure?`${n}secure`:"";try{document.cookie=[e,"=",encodeURIComponent(Object.is(t,null)?"":t),r,s,i,c].join(""),this.cacheCookie.set(e,t)}catch(e){return!1}return!0}remove(e){this.set(e,null),this.cacheCookie.delete(e)}clearCache(){this.cacheCookie.clear()}getKeys(){return document.cookie.split(n).map((function(e){return e.replace(o,"")}))}toObject(){const e={};return document.cookie.split(n).forEach((function(t){const o=t.split("="),n=o[0],r=o[1];e[n]=decodeURIComponent(r)})),e}},t}(0,{}),i=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevel=void 0;const o=(e,t)=>e&&"function"==typeof e[t];var n;!function(e){e[e.info=0]="info",e[e.warning=1]="warning",e[e.error=2]="error"}(n||(t.LogLevel=n={}));return t.default=class{constructor(e){this.__logLevel=n.info,this.__console=e}isShow(e){return e>=this.__logLevel}setLogLevel(e){this.__logLevel=e}getLogLevel(){return this.__logLevel}info(){if(this.isShow(n.info)&&o(this.__console,"info"))console.info.apply(console,arguments)}log(){if(this.isShow(n.info)&&o(this.__console,"log"))console.log.apply(console,arguments)}warn(){if(this.isShow(n.warning)){if(o(this.__console,"warn"))return console.warn.apply(console,arguments);if(o(this.__console,"log"))return console.log.apply(console,arguments);else return}}error(){if(this.isShow(n.error)&&o(this.__console,"error"))console.error.apply(console,arguments)}},t}(0,{}),c=i,u=function(e,t){"use strict";function o(e,t){if("object"==typeof console&&"function"==typeof console[e])console[e].apply(void 0,t)}var n;
23Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevel=void 0,function(e){e[e.llDISABLED=0]="llDISABLED",e[e.llMINIMAL=1]="llMINIMAL",e[e.llSTANDARD=2]="llSTANDARD",e[e.llEXTENDED=3]="llEXTENDED",e[e.llDEBUG=4]="llDEBUG"}(n||(t.LogLevel=n={}));return t.default=class{constructor(){this.__logLevel=n.llSTANDARD}setLogLevel(e){this.__logLevel=e}getLogLevel(){return this.__logLevel}info(...e){o("info",e)}log(...e){o("log",e)}warn(...e){o("warn",e)}error(...e){o("error",e)}},t}(0,{}),a=u,l=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class o{constructor(e,t){this.getRequest=e,this.getResponse=t}get(e){var t;return(null===(t=this.getRequest().cookies)||void 0===t?void 0:t[e])||null}set(e,t,n={}){const{cookie:r}=this.getResponse();if("function"!=typeof r)return!1;const s={...n};return delete s.expires,r.apply(this.getResponse(),[e,t,{...s,...o.getExpires(null===t?-1:n.expires)}]),!0}remove(e){this.set(e,null)}clearCache(){}getKeys(){return Object.keys(this.getRequest().cookies||{})}toObject(){return{...this.getRequest().cookies}}static getExpires(e){if(!e)return{};let t;if("number"==typeof e){t=new Date;const o=864e5;t.setTime(t.getTime()+e*o)}else if(e.toUTCString)t=e;else throw new TypeError('Option "expires" should be a Number or Date instance');return{expires:t}}}return t.default=o,t}(0,{}),f=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e,t){if(this.requestGetter=e,this.responseGetter=t,this.hostMask=/([^:]+)(:\d+)?/,this.searchMask=/(\?.+)$/,"function"!=typeof e)throw new Error("requestGetter must be a function in new Location(requestGetter, responseGetter)");if("function"!=typeof t)throw new Error("responseGetter must be a function in new Location(requestGetter, responseGetter)")}getReqProp(e){const t=this.requestGetter();if("string"!=typeof t[e])return"";else return t[e]}get pathname(){return this.getReqProp("path")}get protocol(){return this.getReqProp("protocol")+":"}get port(){const e=this.hostname.match(this.hostMask);if(null===e||!e[2])return"";else return e[2]}get host(){const e=this.hostname.match(this.hostMask);if(null===e||!e[1])return"";else return e[1]}get hostname(){var e;const t=this.requestGetter(),o=null===(e=t.header)||void 0===e?void 0:e.call(t,"host");if(o)return o;else return this.getReqProp("hostname")}get href(){return`${this.protocol}//${this.hostname}${this.getReqProp("url")}`}set href(e){this.replace(e)}get search(){const e=this.getReqProp("url").match(this.searchMask);if(null===e||!e[1])return"";else return e[1]}get hash(){return""}set hash(e){}replace(e){var t,o;null===(o=(t=this.responseGetter()).redirect)||void 0===o||o.call(t,e)}},t}(0,{}),g=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(){this.__data={}}get(e){return this.__data[e]}set(e,t){return this.__data[e]=t,!0}remove(e){delete this.__data[e]}getKeys(){return Object.keys(this.__data)}toObject(){return this.__data}},t}(0,{}),h=function(e,t){"use strict";function o(e,t){if(-1===e.indexOf(t))return Object.create(null);const o=e.substr(e.indexOf(t)+1),s=o.search(r);return n(o.substring(0,-1!==s?s:void 0))}function n(e){return e.split("&").reduce(((e,t)=>{if(!t)return e;const[o,n]=t.split("=");return e[o]=n,e}),Object.create(null))}Object.defineProperty(t,"__esModule",{value:!0}),t.extractParams=t.extractQuery=t.parseQueryGet=t.parseQueryHash=void 0;const r=new RegExp("\\?|\\#");t.parseQueryHash=e=>o(e,"#");return t.parseQueryGet=e=>o(e,"?"),t.extractQuery=o,t.extractParams=n,t}(0,{}),p=function(e,t,o,n,r,s,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e){this.initRequest=!0,this.envConfig=new o.Config(e),this.location=window.location,this.console=new s.default(window.console);const t=this.envConfig.get("logLevel");if(void 0!==t){const e="number"==typeof t?t:parseInt(t.toString(),10);this.console.setLogLevel(e)}try{this.cookie=new r.default}catch(e){this.cookie=new i.default,this.console.warn("Can't use Cookie",e)}}
23getRequest(){return this._request}createRequest(e){if(e)e.setState({...this.envConfig.getState(),...e.getState()});return this._request=new n.default({cookie:this.cookie,location:this.location},e)}},t}(0,{},o,t,s,i,g),d=p,v=function(e,t,o,n,r,s,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e,t){this.initRequest=!1,this.envConfig=new o.Config(e),this.console=t||new r.default;const n=this.envConfig.get("logLevel");if(void 0!==n){const e="number"==typeof n?n:parseInt(n.toString(),10);this.console.setLogLevel(e)}}getRequest(){if("function"!=typeof this.getHttpRequest)throw new Error("ÐелÑÐ·Ñ Ð¸ÑполÑзоваÑÑ Request вне полÑзоваÑелÑÑкого запÑоÑа!");return this.getHttpRequest().appRequest}createRequest(e,t,o){if(e)e.setState({...this.envConfig.getState(),...e.getState()});return this.getHttpRequest=t,this.location=new i.default(t,o),this.cookie=new s.default(t,o),t().appRequest=new n.default({location:this.location,cookie:this.cookie},e)}},t}(0,{},o,t,u,l,f),y=v,R=function(e,t,o,n,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i="undefined"==typeof window?s.default:r.default;class c{constructor(e,t=new i(e),o=new n.StateReceiver){if(this.env=t,c.instance=this,t.initRequest)c.startRequest(e,o)}static getRequest(){return c.getInstance().env.getRequest()}static startRequest(e,t=new n.StateReceiver,r,s){const i=new o.Config(e),u=c.singletonCrossEnv.entries();let a=u.next();for(;!a.done;)t.register(a.value[0],a.value[1]),a=u.next();t.setLogger(c.getInstance().env.console),c.getInstance().env.createRequest(i,r,s).setStateReceiver(t)}static registerSingleton(e,t){c.singletonCrossEnv.set(e,t);const o=c.getRequest();if(o)o.getStateReceiver().register(e,t)}static getEnv(){return c.getInstance().env}static isInit(){return!!c.instance}static getInstance(){if(c.instance)return c.instance;const e=new Error("Application не иниÑиализиÑован!\n\tСкоÑее вÑего Ð¸Ð´ÐµÑ Ð²Ñзов пÑÑмо из Ñела модÑлÑ.\n\tÐеобÑ
одимо поднимаÑÑÑÑ Ð¿Ð¾ ÑÑÐµÐºÑ Ð¾Ñибки и ÑмоÑÑеÑÑ Ð¾ÑкÑда пÑоизоÑел вÑзов.\n\tСпоÑÐ¾Ð±Ñ Ð¸ÑпÑавлениÑ:\n\t\t - еÑли ÑезÑлÑÑÐ°Ñ Ð²Ñзова подÑÑавлÑеÑÑÑ Ð² пеÑеменнÑÑ, Ñо пÑоÑÑо замениÑÑ Ð¸ÑполÑзование пеÑеменной на вÑзов\n\t\t - еÑли ÑезÑлÑÑÐ°Ñ Ð²Ñзова помеÑаеÑÑÑ Ð² поле обÑекÑа и ÑÑÐ¾Ñ ÐºÐ¾Ð´ не вÑполнÑеÑÑÑ Ð½Ð° СÐ, Ñо можно опÑеделиÑÑ ÑÑо ÑвойÑÑво динмаÑеÑким Ñ Ð¿Ð¾Ð¼Ð¾ÑÑÑ Object.defineProperty");throw new Error(e.stack)}}return c.singletonCrossEnv=new Map,t.default=c,t}(0,{},o,e,p,v),_=R,q=function(e,t,o){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.location=void 0,t.location={get protocol(){return o.default.getRequest().location.protocol},get host(){return o.default.getRequest().location.host},get hostname(){return o.default.getRequest().location.hostname},get port(){return o.default.getRequest().location.port},get href(){return o.default.getRequest().location.href},set href(e){o.default.getRequest().location.href=e},get pathname(){return o.default.getRequest().location.pathname},get search(){return o.default.getRequest().location.search},get hash(){return o.default.getRequest().location.hash},set hash(e){o.default.getRequest().location.hash=e},replace:e=>{o.default.getRequest().location.replace(e)}},t}(0,{},R),b=q,m=function(e,t,o){"use strict";function n(){return o.default.getRequest().getStateReceiver()}Object.defineProperty(t,"__esModule",{value:!0}),t.getStateReceiverData=t.getStateReceiver=void 0,t.getStateReceiver=n,t.getStateReceiverData=function(e,t){const o=new r;let s;if(n().register(t,o),"undefined"==typeof window)s=e,o.setState(e);else s=o.getState();return s};class r{getState(){return this._state}setState(e){this._state=e}}return t}(0,{},R),w=m,L=function(e,t,o,n){"use strict";function r(e){return Object.entries(e).map((e=>`${e[0]}=${e[1]}`)).join("&")}
23return Object.defineProperty(t,"__esModule",{value:!0}),t.hash=t.query=void 0,t.query={get hash(){return(0,n.parseQueryHash)(o.location.href)},get get(){return(0,n.parseQueryGet)(o.location.href)}},t.hash={get(e){const o=t.query.hash;if(e)return o[e];else return o},set(e,n){const s=t.query.hash;s[e]=n,o.location.hash=r(s)},remove(e){const n=t.query.hash;if("string"==typeof e)delete n[e];else for(const t of e)delete n[t];o.location.hash=r(n)}},t}(0,{},q,h),S=L,C=function(e,t,o,n){"use strict";function r(e){let t=o.default.getRequest().getConfig().get("appRoot");if(!t||"/"===t)return e;else return t=t.replace(/\//g,""),`/${t}/${e.replace(/^\//,"")}`}Object.defineProperty(t,"__esModule",{value:!0}),t.serviceLocation=void 0;const s="undefined"!=typeof window;return t.serviceLocation={get protocol(){return n.location.protocol},get host(){return n.location.host},get hostname(){return n.location.hostname},get port(){return n.location.port},get href(){if(s)return n.location.href;const e=r(n.location.pathname);return`${n.location.protocol}//${n.location.hostname}${e}${n.location.search}`},set href(e){n.location.href=e},get pathname(){if(s)return n.location.pathname;else return r(n.location.pathname)},get search(){return n.location.search},get hash(){return n.location.hash},set hash(e){n.location.hash=e},replace:e=>{n.location.replace(e)}},t}(0,{},R,q),k=C,r.setConfig=r.getConfig=r.setStore=r.getStore=r.logger=r.cookie=r.App=r.getStateReceiverData=r.getStateReceiver=r.serviceLocation=r.location=r.BrowserConsole=r.LogLevel=r.hash=r.query=r.ConsoleNodeJS=r.LogLevelNodeJS=r.EnvNodeJS=r.EnvBrowser=void 0,Object.defineProperty(r,"EnvBrowser",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(r,"EnvNodeJS",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(r,"LogLevelNodeJS",{enumerable:!0,get:function(){return a.LogLevel}}),Object.defineProperty(r,"ConsoleNodeJS",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(r,"query",{enumerable:!0,get:function(){return S.query}}),Object.defineProperty(r,"hash",{enumerable:!0,get:function(){return S.hash}}),Object.defineProperty(r,"LogLevel",{enumerable:!0,get:function(){return c.LogLevel}}),Object.defineProperty(r,"BrowserConsole",{enumerable:!0,get:function(){return c.default}}),r.App=_.default,Object.defineProperty(r,"location",{enumerable:!0,get:function(){return b.location}}),Object.defineProperty(r,"serviceLocation",{enumerable:!0,get:function(){return k.serviceLocation}}),Object.defineProperty(r,"getStateReceiver",{enumerable:!0,get:function(){return w.getStateReceiver}}),Object.defineProperty(r,"getStateReceiverData",{enumerable:!0,get:function(){return w.getStateReceiverData}}),r.cookie={get:e=>_.default.getRequest().cookie.get(e),set:(e,t,o)=>_.default.getRequest().cookie.set(e,t,o),remove:e=>_.default.getRequest().cookie.remove(e),clearCache(){var e,t;null===(t=(e=_.default.getRequest().cookie).clearCache)||void 0===t||t.call(e)},getKeys:()=>_.default.getRequest().cookie.getKeys(),toObject:()=>_.default.getRequest().cookie.toObject()},r.logger={setLogLevel:e=>_.default.getEnv().console.setLogLevel(e),getLogLevel:()=>_.default.getEnv().console.getLogLevel(),log(...e){const t=_.default.getEnv().console;return t.log.apply(t,e)},info(...e){const t=_.default.getEnv().console;return t.info.apply(t,e)},warn(...e){const t=_.default.getEnv().console;return t.warn.apply(t,e)},error(...e){const t=_.default.getEnv().console;return t.error.apply(t,e)}},r.getStore=function(e,t){return _.default.getRequest().getStore(e,t)},r.setStore=function(e,t){return _.default.getRequest().setStore(e,t)},r.getConfig=function(e){return _.default.getRequest().getConfig().get(e)},r.setConfig=function(e,t){return _.default.getRequest().getConfig().set(e,t)},r})); 24define("Application/Config",["require","exports"],(function(t,e){var r,i;return Object.defineProperty(e,"__esModule",{value:!0}),r=function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});return e.default=class{constructor(t={},e="appConfig"){this.data=t,this.__uid=e}get(t){return this.data[t]}set(t,e){return this.data[t]=e}getState(){return this.data}setState(t){if(t)this.data=t}getUID(){return this.__uid}},e}(0,{}),i=r,e.Config=void 0,Object.defineProperty(e,"Config",{enumerable:!0,get:function(){return i.default}}),e})); 25define("Application/Request",["require","exports"],(function(e,t){var r,s,a,o,i;
25return Object.defineProperty(t,"__esModule",{value:!0}),r=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FakeWebStorage=void 0;return t.FakeWebStorage=class{constructor(){this.__data={}}get length(){return Object.keys(this.__data).length}getItem(e){return this.__data[e]}setItem(e,t){return this.__data[e]=t,!0}removeItem(e){delete this.__data[e]}getKeys(){return Object.keys(this.__data)}key(e){return Object.keys(this.__data)[e]}clear(){this.__data={}}},t}(0,{}),s=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e){this.__storage=e}get(e){try{return this.__storage.getItem(e)}catch(e){return null}}set(e,t){try{return this.__storage.setItem(e,t),!0}catch(e){return!1}}remove(e){try{this.__storage.removeItem(e)}catch(e){}}getKeys(){try{if(this.__storage.getKeys)return this.__storage.getKeys();else return Object.keys(this.__storage)}catch(e){return[]}}toObject(){try{return{...this.__storage}}catch(e){return{}}}},t}(0,{}),a=s,o=function(e,t,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e,t){this.__storages={},this.cookie=e.cookie,this.location=e.location,this.__config=t}getStore(e,t){if(!this.__storages[e]){const a=t?t():new s.default(new r.FakeWebStorage);this.__storages[e]=a}return this.__storages[e]}setStore(e,t){this.__storages[e]=t}setStateReceiver(e){this.__stateReceiver=e}getStateReceiver(){return this.__stateReceiver}getConfig(){return this.__config}},t}(0,{},r,s),i=o,t.Store=void 0,t.default=i.default,Object.defineProperty(t,"Store",{enumerable:!0,get:function(){return a.default}}),t})); 26define("Application/State",["require","exports"],(function(e,t){var r,i,s,o;return Object.defineProperty(t,"__esModule",{value:!0}),r=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toMixDisposable=void 0;class r{constructor(e){this._owner=e,this._totalResources=[]}track(e){this._totalResources.push(e),e.enter(this._owner)}dispose(){this._totalResources.forEach((e=>e.dispose(this._owner))),this._totalResources=[]}}return t.default=r,t.toMixDisposable=function(e){return class extends e{constructor(){super(...arguments),this._resources=new r(e)}attach(e){this._resources.track(e)}unleash(){this._resources.dispose()}}},t}(0,{}),i=r,s=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StateReceiver=t.Serializer=t.componentOptsReArray=void 0;t.componentOptsReArray=[{toFind:/\\/g,toReplace:"\\\\"},{toFind:/<\/(script)/gi,toReplace:"<\\/$1"},{toFind:/<!--/g,toReplace:"<\\!--"},{toFind:/'/g,toReplace:"\\u0027"},{toFind:/\n/g,toReplace:"\\u000a"},{toFind:/\r/g,toReplace:"\\u000d"}];const r="DATE";class i{constructor(){this._linksStorage={},this._depsStorage={},this.deserialize=void 0,this.serializeStrict=void 0}static parseDeclaration(e){return{name:e}}static setIgnorePatternName(e){}static deleteIgnorePatternName(e){}}t.Serializer=i;const s={getLogLevel:()=>0,info(...e){},log(...e){},setLogLevel(e){},error(...e){},warn(...e){}};return t.StateReceiver=class{constructor(e=i){this._constructorSerializer=e,this._receivedStateObjectsArray={},this._receivedStatePromisesArray={},this._deserialized={},this._deferConsume=!1,this._pendingConsumeKeys=new Set,this.ReactComponentRe=/_el_[0-9]+/g}setLogger(e){this._logger=e}_getLogger(){if(this._logger)return this._logger;else return this._logger=s,this._logger}__getSerializer(){if(this.__serializer)return this.__serializer;else return this.__serializer=new this._constructorSerializer,this.__serializer}_debugSerializeMap(e){const t=new this._constructorSerializer,r={};return Object.keys(e).forEach((i=>{const s=e[i].data.getState();if(s)try{if(JSON.stringify(s,t.serializeStrict))r[i]=s}catch(t){const s=e[i].meta;this._getLogger().error(function(e,t,r){const i=`${t} неÑеÑиализÑемое ÑоÑÑоÑние: ${r}`;if(!e)return`Ðевозможно вÑполниÑÑ Ð²ÑзваннÑÑ Ð² пÑикладном коде ÑеÑиализаÑÐ¸Ñ Ð¾Ð±ÑекÑа по пÑиÑине: ${i}`;else return`_beforeMount конÑÑола ${e} веÑнÑл обÑекÑ, коÑоÑÑй невозможно ÑеÑиализоваÑÑ Ð¿Ð¾ пÑиÑине: ${i}`}(null==s?void 0:s.moduleName,i,t),t),delete r[i]}})),r}_preparDataMap(e){const t={};return Object.keys(e).forEach((r=>{const i=e[r].data.getState();if(i)t[r]=i})),t}waitBeforeMounts(){if(!Object.keys(this._receivedStatePromisesArray).length)return Promise.resolve();const e=new Promise(((e,t)=>{setTimeout(t,5e3)}));return Promise.race([e,Promise.all(Object.keys(this._receivedStatePromisesArray).map((e=>this._receivedStatePromisesArray[e])))]).catch((()=>{}))}serialize(){if(this._serialized){const e=new Error("Application/_State/StateReceiver повÑоÑнÑй вÑзов меÑода seri
26alize");return this._getLogger().error(e.stack),this._serialized}const e=this.__getSerializer(),r={},i=Date.prototype.toJSON;let s;Date.prototype.toJSON=function(){return{$serialized$:"$d",state:i.call(this)}};try{s=JSON.stringify(this._preparDataMap(this._receivedStateObjectsArray),e.serializeStrict)}catch(e){s=JSON.stringify(this._debugSerializeMap(this._receivedStateObjectsArray),(new this._constructorSerializer).serializeStrict)}Date.prototype.toJSON=i,t.componentOptsReArray.forEach((e=>{s=s.replace(e.toFind,e.toReplace)}));const o=function(e){let t;const r={},i=e._linksStorage;let s;for(const o in i)if(i.hasOwnProperty(o))if(t=i[o],t.module)s=e.constructor.parseDeclaration(t.module),r[s.name]=!0;const o=e._depsStorage||{};for(const e in o)if(o.hasOwnProperty(e))r[e]=!0;return r}(e);for(const e in o)if(o.hasOwnProperty(e))r[e]=!0;return this._serialized={serialized:s,additionalDeps:r},this._serialized}deserialize(e){if(!e)return;const t=this.__getSerializer();this._constructorSerializer.setIgnorePatternName(r);try{this._deserialized=JSON.parse(e,t.deserialize)}catch(t){this._getLogger().error(`ÐÑибка деÑеÑиализаÑии ${e}`,null,t)}this._constructorSerializer.deleteIgnorePatternName(r)}register(e,t,r=!1){if(t instanceof Promise)return this._registerPromise(e,t);this._registerInst(e,t,r)}_registerPromise(e,t){const r=("string"==typeof e?{ulid:e}:e).ulid;this._receivedStatePromisesArray[r]=t.then((t=>{if(t)this._registerInst(e,{getState:()=>t,setState:()=>{}})})).catch((e=>{this._getLogger().warn(`${r} оÑибка пÑи ожидании ÑезÑлÑÑаÑа аÑинÑ
Ñоного _beforeMount: `,e)}))}replaceReactComponentInKey(e){return e.replace(this.ReactComponentRe,"_r_")}removeDeserializedKey(e){if(delete this._deserialized[e],this.deserializedKeys&&this.preparedKeys){const t=this.deserializedKeys.indexOf(e);this.deserializedKeys.splice(t,1),this.preparedKeys.splice(t,1)}}_guessResult(e,t=!1){if(this._deserialized[e]){const t=this._deserialized[e];return this._consumeDeserializedKey(e),t}if(!t||"undefined"==typeof window)return;let r;this.deserializedKeys=this.deserializedKeys||Object.keys(this._deserialized),this.preparedKeys=this.preparedKeys||this.deserializedKeys.map((e=>this.replaceReactComponentInKey(e)));const i=this.preparedKeys.indexOf(this.replaceReactComponentInKey(e));if(-1!==i)r=this.deserializedKeys[i];if(!r){let t=0;this.deserializedKeys.forEach((i=>{const s=e,o=i,n=s.length,a=o.length;let c=0,l=1;for(;l<n&&l<a&&s[n-l]===o[a-l];)c++,l++;if(c>t)t=c,r=i}))}if(r){const e=this._deserialized[r];if(!e||!e.uniqueId)return;return this._consumeDeserializedKey(r),e._$guessed=!0,e}}_registerInst(e,t,r=!1){const i="string"==typeof e?{ulid:e}:e,s=i.ulid,o=this._guessResult(s,r);if(o)t.setState(o);if("undefined"==typeof window)if(void 0!==this._receivedStateObjectsArray[s]){const e=`[Application/_State/StateReceiver:register] - Try to register instance more than once or duplication of keys happened; current key is ${s}`;this._getLogger().warn(e,t)}this._receivedStateObjectsArray[s]={meta:i,data:t}}unregister(e){delete this._receivedStateObjectsArray[e]}beginHydrationDeferredCleanup(){this._deferConsume=!0,this._pendingConsumeKeys.clear()}commitHydrationDeferredCleanup(){if(this._deferConsume){for(const e of this._pendingConsumeKeys)this.removeDeserializedKey(e);this._pendingConsumeKeys.clear(),this._deferConsume=!1}}rollbackHydrationDeferredCleanup(){if(this._deferConsume)this._pendingConsumeKeys.clear(),this._deferConsume=!1}_consumeDeserializedKey(e){if(this._deferConsume)this._pendingConsumeKeys.add(e);else this.removeDeserializedKey(e)}},t}(0,{}),o=s,t.toMixDisposable=t.DisposeControl=t.componentOptsReArray=t.StateReceiver=void 0,Object.defineProperty(t,"StateReceiver",{enumerable:!0,get:function(){return o.StateReceiver}}),Object.defineProperty(t,"componentOptsReArray",{enumerable:!0,get:function(){return o.componentOptsReArray}}),Object.defineProperty(t,"DisposeControl",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"toMixDisposable",{enumerable:!0,get:function(){return i.toMixDisposable}}
26),t})); 27define("Env/Env",["Application/Env","require","exports","Env/Constants"],(function(e,t,i,r){var s,o,n,a,d,l,c,u,p,f,h,S,g,b,T,m,M,w,P,E,v,y,O,W,A;if(Object.defineProperty(i,"__esModule",{value:!0}),s=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{log(){throw new Error("ILogger::log method is not implemented")}error(){throw new Error("ILogger::error method is not implemented")}info(){}warn(){}methodExecutionStart(){}methodExecutionFinish(){}},t}(0,{}),o=s,n=function(e,t){"use strict";function i(e,t){if(e instanceof Function&&e.prototype&&e.prototype.$constructor)return new e(t);else return e(t)}Object.defineProperty(t,"__esModule",{value:!0});const r={},s={};return t.default=class{constructor(){}static bind(e,t){r[e]={implementation:t,isSingle:!1}}static bindSingle(e,t,i){r[e]={implementation:t,isSingle:!0,config:i||{}},s[e]=""}static resolve(e,t){const o=r[e];if(!o)throw new ReferenceError(`No mappings defined for ${e}`);const{implementation:n,isSingle:a}=o;if(a&&s[e])return s[e];if("function"!=typeof n)return n;if(a)return s[e]=i(n,o.config);else return i(n,t)}static has(e){return e in r}},t}(0,{}),a=n,d=function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.detect=t.Mode=t.Browser=void 0,t.Browser={IE:{version(e){const t=/(msie)\s+([\w.]+)/i.exec(e)||/(edge)\/([\w]+)/i.exec(e)||/(trident)(?:.*rv:[ ]?([\w.]+))?/i.exec(e);return t&&parseInt(t[2],10)},isDetected(e){return!!this.version(e)},isNotGridSupport:e=>!0,isNotDisplaySupport:e=>!0},Edge:{version(e){const t=/(Edg|EdgA|EdgiOS)\/([\w]+)/i.exec(e);return t&&parseInt(t[2],10)},isDetected(e){return!!this.version(e)},isNotGridSupport(e){try{return this.version(e)<57}catch{return!0}},isNotDisplaySupport(e){try{return this.version(e)<65}catch{return!0}}},Chrome:{version(e){if(e.includes("CriOS"))return parseInt(e.match(/CriOS\/[\d]*./)[0].substr(6,8),10);else return parseInt(e.match(/Chrome\/[\d]*./)[0].substr(7,8),10)},isDetected(e,t){switch(t){case i.IOS:return/\bCriOS\b/.test(e);case i.MOBILE:return/Chrome\/[.\d]* Mobile/i.test(e);default:return/Chrome(?!.*Edg|.*OPR|.*YaBrowser)\/[\d]*/i.test(e)}},isNotGridSupport(e){try{return this.version(e)<57}catch{return!0}},isNotDisplaySupport(e){try{return this.version(e)<65}catch{return!0}}},Safari:{version(e,t){switch(t){case i.MOBILE:return;case i.DESKTOP:const t=/Version\/(\d+).(\d+) Safari/,r=/Version\/(\d+).(\d+).(\d+) Safari/.exec(e)||t.exec(e);return r&&parseInt(r[1],10);default:const s=/Version\/([\d\.]*)/.exec(e);return s&&parseInt(s[1],10)}},fullVersion(e,t){if(t===i.MOBILE){const t=/\bCPU\s+((iPhone OS)|(i?OS)) ((\d|_)*)/.exec(e);if(!t||!t[4])return null;return t[4].split("_").map((e=>parseInt(e,10)))}},build(e){const t=/(Safari\/)+([\w.]+)/.exec(e);return t&&parseInt(t[2],10)},isDetected(e,t,r){switch(t){case i.MOBILE:return/(iPhone|iPad|iPod)/i.test(e);case i.DESKTOP:return!r&&/Version\/[\d]*.[\d].[\d] Safari/.test(e);default:return/^((?!chrome|android).)*safari/i.test(e)}},isNotGridSupport(e,t){switch(t){case i.MOBILE:const t=this.fullVersion(e,i.MOBILE);if(null===t)return!1;const r=[10,3],s=t[0]<r[0],o=t[0]===r[0]&&t[1]<r[1];return s||o;case i.DESKTOP:const n=12;return this.version(e,i.DESKTOP)<n;default:return!1}},isNotDisplaySupport(e,t){switch(t){case i.MOBILE:const t=this.fullVersion(e,i.MOBILE);if(null===t)return!1;const r=[11,4],s=t[0]<r[0],o=t[0]===r[0]&&t[1]<r[1];return s||o;case i.DESKTOP:return!0;default:return!1}}},Firefox:{version:e=>parseInt(e.match(/Firefox\/[\d]*./)[0].substr(8,8),10),isDetected:e=>/Firefox\/[\d]*./.test(e),isNotGridSupport(e){try{return this.version(e)<52}catch{return!0}},isNotDisplaySupport(e){try{return this.version(e)<62}catch{return!0}}},YaBrowser:{isDetected:e=>/\bYaBrowser\/(\d+)/i.test(e)},Opera:{isDetected:e=>/(Opera|\bOPR\b)/i.test(e),version(e){const t=e.match(/(Opera|Opera Mini|OPR)\/?\s*(\d+)\./i);if(t&&t[2])return Number(t[2]);else return 0}},OneC:{isDetected:(e,i,r)=>[t.Browser.Edge,t.Browser.Chrome,t.Browser.YaBrowser,t.Browser.IE,t.Browser.Firefox,t.Browser.Opera,t.Browser.Safari].every((t=>!t.isDetected(e,i,r)))&&/V8WebKit/.test(e),isNotDisplaySupport:()=>!0}},function(e){e[e.DEFAULT=0]="DEFAULT",e[e.MOBILE=1]="MOBILE",e[e.DESKTOP=2]="DESKTOP",e[e.IOS=3]="IOS",e[e.CHROME=4]="CHROME"}(i||(t.Mode=i={}));const r=[{browser:t.Browser.IE,platform:i.DEFAULT},{browser:t.Browser.Edge,platform:i.DEFAULT},{browser:t.Browser.Chrome,platform:i.DEFAULT},{browser:t.Browser.Safari,platform:i.DESKTOP},{browser:t.Browser.Safari,platform:i.MOBILE},{browser:t.Browser.Firefox,platform:i.DEFAULT},{browser:t.Browser.YaBrowser,platform:i.DEFAULT},{browser:t.Browser.Opera,platform:i.DEFAULT},{browser:t.Browser.OneC,platform:i.DEFAULT}];return t.detect=function(e,t,i){return r.find((({browser:r,platform:s})=>{if(!i||r.hasOwnProperty(i))return r.isDetected(e,s,t)}))},t}(0,{}),l=function(e,t){"use strict";
27return Object.defineProperty(t,"__esModule",{value:!0}),t.Engine=void 0,t.Engine={WebKit:{isDetected:e=>/AppleWebKit/i.test(e)},Trident:{version(e){const t=e.match(/Trident[ ]?\/[ ]?(\d+)/i);return t&&parseInt(t[1],10)}}},t}(0,{}),c=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.WinFamily=t.OS=void 0,t.OS={Windows:{isDetected:e=>/Windows/i.test(e)},Android:{version(e){const t=/\bAndroid\s(\d+)/.exec(e);return t&&parseInt(t[1],10)},isDetected:e=>/Android/i.test(e)},Unix:{isDetected:e=>/unix/i.test(e)},Linux:{isDetected:e=>/linux/i.test(e)},IOS:{version(e){const t=/Version\/(\d+)/,i=/iOS\s([0-9.]+).*native/;let r=/\bCPU\s+(?:i.+?\s)?OS\s+(\d+)/.exec(e);if(!r)r=t.exec(e);if(!r)r=i.exec(e);return r&&parseInt(r[1],10)},isDetected:e=>/(iPhone|iPad|iPod)/i.test(e)},MacOS:{isDetected:e=>/(Mac OS X|MacPPC|MacIntel|Mac_PowerPC|Macintosh)/i.test(e)}},t.WinFamily={IEMobile:{isDetected:e=>/iemobile/i.test(e)},Lumia:{isDetected:e=>/Lumia/i.test(e)},WindowsPhone:{isDetected:e=>/Windows Phone/i.test(e)},WPDesktop:{isDetected:e=>/WPDesktop/i.test(e)},Windows10:{isDetected:e=>/(Windows 10\.0|Windows NT 10\.0)/i.test(e)},Windows8_1:{isDetected:e=>/(Windows 8\.1|Windows NT 6\.3)/i.test(e)},Windows8:{isDetected:e=>/(Windows 8|Windows NT 6\.2)/i.test(e)},Windows7:{isDetected:e=>/(Windows 7|Windows NT 6\.1)/i.test(e)},WindowsVista:{isDetected:e=>/Windows NT 6\.0/i.test(e)},WindowsServer2003:{isDetected:e=>/Windows NT 5\.2/i.test(e)},WindowsXP:{isDetected:e=>/(Windows NT 5\.1|Windows XP)/i.test(e)}},t}(0,{}),function(){"use strict";if("undefined"==typeof window)globalThis.window=void 0;if("undefined"==typeof document)globalThis.document=void 0;if("undefined"==typeof navigator)globalThis.navigator=void 0;if("undefined"==typeof process)globalThis.process=void 0;return{}}(),u=function(e,t){"use strict";function i(e){if(!e||!/Trident/.test(e))return!1;const t=/Trident\/([0-9]{1,}[.0-9]{0,})/i.exec(e),i=parseFloat(t&&t.length&&t.pop()||""),r=/(MSIE |rv:[ ]?)([0-9]{1,}[.0-9]{0,})/i.exec(e);return parseFloat(r&&r.length&&r.pop()||"")!==4+i}Object.defineProperty(t,"__esModule",{value:!0}),t.Browser=void 0;class r{static detect(e){const t=e.replace("_",".").toLowerCase(),s=Object.keys(r.family).find((e=>r.family[e].reg.test(t)));if(!s)throw new Error(`Ðе ÑдалоÑÑ Ð¾Ð¿ÑеделиÑÑ Ð±ÑаÑÐ·ÐµÑ Ð´Ð»Ñ Ð·Ð½Ð°ÑÐµÐ½Ð¸Ñ UserAgent ${t} :: ${typeof t}`);const o=r.family[s],{reg:n,available:a}=o.version,d=n.exec(t),l=parseFloat(d&&d.length&&d.pop()||"999")||a;return{isAvailable:l>=a,isCompatibleMode:o===r.family.IE&&i(t),name:o.name,version:l,family:o}}}return t.Browser=r,r.family={YaBrowser:{name:"Ð¯Ð½Ð´ÐµÐºÑ ÐÑаÑзеÑ",reg:/\bYaBrowser\/(\d+)/i,version:{reg:/YaBrowser\/([0-9]{1,}[\.0-9]{0,})/i,available:17.4}},Firefox:{name:"Firefox",reg:/Firefox/i,version:{reg:/Firefox\/([0-9]{1,}[\.0-9]{0,})/i,available:36}},OperaChrome:{name:"Opera",reg:/(OPR)/i,version:{reg:/OPR\/([0-9]{1,}[\.0-9]{0,})/i,available:36}},Chrome:{name:"Chrome",reg:/Chrome|CriOS/i,version:{reg:/(Chrome|CriOS)\/([0-9]{1,}[\.0-9]{0,})/i,available:49}},Opera:{name:"Opera",reg:/(Opera)/i,version:{reg:/(Opera|Version)\/([0-9]{1,}[\.0-9]{0,})/i,available:36}},Edge:{name:"Microsoft Edge",reg:/Edge/i,version:{reg:/Edge([0-9]{1,}[\.0-9]{0,})/i,available:12}},IE:{name:"Internet Explorer",reg:/MSIE|rv\:/i,version:{reg:/(MSIE |rv:[ ]?)([0-9]{1,}[\.0-9]{0,})/i,available:10}},Safari:{name:"Safari",reg:/^((?!chrome|android|mobile).)*safari/i,version:{reg:/(Safari\/)+([\w.]+)/i,available:534.57}},SafariMobile:{name:"Safari Mobile",reg:/.*Mobile.*Safari/i,version:{reg:/Version\/+([\w.]+).*Mobile.*Safari/i,available:6}}},t}(0,{}),p=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OS=void 0;class i{static detect(e){const t=i.detectPlatform(e),r=e.replace("_",".").toLowerCase(),s=Object.keys(i.list).find((e=>i.list[e].reg.test(r)));if(s)return{...i.list[s],platform:t};const o=Object.keys(i.family).find((e=>i.family[e].reg.test(r)));if(!o)throw new Error(`Ðе ÑдалоÑÑ Ð¾Ð¿ÑеделиÑÑ ÐС Ð´Ð»Ñ Ð·Ð½Ð°ÑÐµÐ½Ð¸Ñ UserAgent ${r} :: ${typeof r}`);const n=i.family[o],a=parseFloat((n.version.exec(r)||[null]).pop())||n.available;return{isAvailable:a>=n.available,name:n.name,platform:t,version:a,family:n}}static detectPlatform(e){return[/ia64/i,/sparc64/i,/ppc64/i,/IRIX64/i,/x86_64/i,/x86-64/i,/Win64/i,/x64;/i,/amd64/i,/AMD64/i,/WOW64/i,/x64_64/i].some((t=>t.test(e)))?i.platform.x64:i.platform.x32}}return t.OS=i,i.platform={x64:"x64",x32:"x32"},i.family={Windows:{name:"Windows",reg:/Windows/i,version:/Windows NT ([0-9]{1,}[\.0-9]{0,})/i,available:5.1},Android:{name:"Android",reg:/Android/i,version:/Android ([0-9]{1,}[\.0-9]{0,})/i,available:0},Unix:{name:"Unix",reg:/unix/i,version:new RegExp(""),available:0},Linux:{name:"Linux",reg:/linux/i,version:new RegExp(""),available:0},IOS:{name:"IOS",reg:/(iPhone|iPad|iPod)/i,version:/\bOS\s(\d+)/i,available:6},MacOS:{name:"MacOS",reg:/(Mac OS X|MacPPC|MacIntel|Mac_PowerPC|Macintosh)/i,version:/Mac OS X ([0-9]{1,}[\.0-9]{0,})/i,available:0}}
27,i.list={Windows10:{name:"Windows 10",reg:/(Windows 10.0|Windows NT 10.0)/i,family:i.family.Windows,platform:null,version:10,isAvailable:!0},Windows8_1:{name:"Windows 8.1",reg:/(Windows 8.1|Windows NT 6.3)/i,family:i.family.Windows,platform:null,version:6.3,isAvailable:!0},Windows8:{name:"Windows 8",reg:/(Windows 8|Windows NT 6.2)/i,family:i.family.Windows,platform:null,version:6.2,isAvailable:!0},Windows7:{name:"Windows 7",reg:/(Windows 7|Windows NT 6.1)/i,family:i.family.Windows,platform:null,version:6.1,isAvailable:!0},WindowsVista:{name:"Windows Vista",reg:/Windows NT 6.0/i,platform:null,family:i.family.Windows,version:6,isAvailable:!1},WindowsServer2003:{name:"Windows Server 2003",reg:/Windows NT 5.2/i,platform:null,family:i.family.Windows,version:5.2,isAvailable:!1},WindowsXP:{name:"Windows XP",reg:/(Windows NT 5.1|Windows XP)/i,family:i.family.Windows,platform:null,version:5.1,isAvailable:!1},Windows2000:{name:"Windows 2000",reg:/(Windows NT 5.0|Windows 2000)/i,family:i.family.Windows,platform:null,version:5,isAvailable:!1},WindowsME:{name:"Windows ME",reg:/(Win 9x 4.90|Windows ME)/i,family:i.family.Windows,platform:null,version:4.9,isAvailable:!1},Windows98:{name:"Windows 98",reg:/(Windows 98|Win98)/i,family:i.family.Windows,platform:null,version:4.5,isAvailable:!1},Windows95:{name:"Windows 95",reg:/(Windows 95|Win95|Windows_95)/i,family:i.family.Windows,platform:null,version:4.2,isAvailable:!1},WindowsNT4_0:{name:"Windows NT 4.0",reg:/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/i,family:i.family.Windows,platform:null,version:4,isAvailable:!1},WindowsCE:{name:"Windows CE",reg:/Windows CE/i,family:i.family.Windows,platform:null,version:3.5,isAvailable:!1},Windows3_11:{name:"Windows 3.11",reg:/Win16/i,family:i.family.Windows,platform:null,version:3.11,isAvailable:!1}},t}(0,{}),f=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Screen=void 0;class i{static detect(e){return{resolution:i.detectResolution(e&&e.screen),orientation:i.detectOrientation(e)}}static detectResolution(e){if(!e)return{width:null,height:null};const{availWidth:t,availHeight:i}=e;return{width:t,height:i}}static detectOrientation(e){if(!e||!e.matchMedia)return null;else return e.matchMedia("(orientation: portrait)").matches?"portrait":"landscape"}}return t.Screen=i,t}(0,{}),h=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=document&&document.createElement("div"),r=i&&i.style,s=document&&((void 0!==i.style.transform?"transform":void 0!==i.style.msTransform&&"msTransform")||void 0!==i.style.oTransform&&"oTransform"||void 0!==i.style.MozTransform&&"MozTransform"||void 0!==i.style.webkitTransform&&"webkitTransform"),o=document&&document.createElement("input"),n=document&&document.createElement("style");o&&o.setAttribute("type","file"),n&&n.setAttribute("type","text/css");class a{constructor(){this.isBrowserEnv="undefined"!=typeof window&&"undefined"!=typeof navigator&&"undefined"!=typeof document}getProperty(e,t){if(a.isPropExist(e))return a.props[e];const i=t();if(this.isBrowserEnv)a.props[e]=i;return i}get dateBug(){return this.getProperty("dateBug",(()=>0!==new Date(2014,0,1,0,0,0,0).getHours()))}set dateBug(e){a.props.dateBug=e}get placeholder(){return this.getProperty("placeholder",(()=>document&&!!("placeholder"in o)))}set placeholder(e){a.props.placeholder=e}get fileupload(){return this.getProperty("fileupload",(()=>document&&!o.disabled))}set fileupload(e){a.props.fileupload=e}get correctKeyEvents(){return this.getProperty("correctKeyEvents",(()=>window&&(!window.opera||parseFloat(window.opera.version())>=12.1)))}set correctKeyEvents(e){a.props.correctKeyEvents=e}get cssAnimations(){return this.getProperty("cssAnimations",(()=>document&&(void 0!==r.transition||void 0!==r.mozTransition||void 0!==r.webkitTransition)))}set cssAnimations(e){a.props.cssAnimations=e}get fullScreen(){return this.getProperty("fullScreen",(()=>void 0!==i.requestFullscreen||void 0!==i.mozRequestFullScreen||void 0!==i.webkitRequestFullscreen))}set fullScreen(e){a.props.fullScreen=e}get wheel(){return this.getProperty("wheel",(()=>document&&(void 0!==i.onwheel||document.documentMode>=9?"wheel":void 0!==i.onmousewheel?"mousewheel":"DOMMouseScroll")))}set wheel(e){a.props.wheel=e}get cssTransformProperty(){return this.getProperty("cssTransformProperty",(()=>s))}set cssTransformProperty(e){a.props.cssTransformProperty=e}get cssTransform(){return this.getProperty("cssTransform",(()=>!!s))}set cssTransform(e){a.props.cssTransform=e}get touch(){return this.getProperty("touch",(()=>document&&(navigator.msMaxTouchPoints||navigator.maxTouchPoints||"ontouchstart"in document.documentElement)))}set touch(e){a.props.touch=e}get standartStylesheetProperty(){return this.getProperty("standartStylesheetProperty",(()=>document&&!n.styleSheet))}set standartStylesheetProperty(e){a.props.standartStylesheetProperty=e}get supportPassive(){return this.getProperty("supportPassive",(()=>(()=>{let e=!1;try{const t=Object.defineProperty({},"passive",{get(){e=!0}});window.addEventListener("test",(()=>{}),t)}catch(e){}return e})()))}set supportPassive(e){a.props.supportPassive=e}get webGL(){return this.getProperty("webGL",(()=>{try{if("undefined"!=typeof document&&"undefined"!=typeof WebGLRenderingContext){const e=document.createElement("canvas");return Boolean(e&&(e.getContext("webgl")||e.getContext("experimental-webgl")))}return!1}catch(e){return!1}}
27))}static isPropExist(e){return void 0!==a.props[e]}static getInstance(){var e;return a.instance=null!==(e=a.instance)&&void 0!==e?e:new a,a.instance}}return a.props={},t.default=a,t}(0,{}),S=h,g=function(e,t,i,r){"use strict";function s(e){try{return!!e.cookie||!0}catch(e){return r.default.resolve("ILogger").error("Unfortunately cookies are disabled",e),!1}}function o(){if(!function(e){if(void 0===a)a=s(e);return a}(document))return n(),l;const e=document.cookie;if(e!==d)d=e,l=function(e){const t={};if(e){const i=e.split(";");for(const e of i){const i=String(e).trim(),r=i.indexOf("=");if(!(r<0))t[i.substring(0,r)]=decodeURIComponent(i.substring(r+1))}}return t}(e);return l}function n(){d=null,l={}}Object.defineProperty(t,"__esModule",{value:!0}),t.invalidateCookiesCache=t.calcDocumentCookieEnabled=void 0;let a;t.calcDocumentCookieEnabled=s;let d=null,l={};t.invalidateCookiesCache=n;return t.default=class{static get(e){if(i.constants.isServerSide){const t=process&&process.domain&&process.domain.req||{};return t.cookies?t.cookies[e]:null}const t=o();return Object.prototype.hasOwnProperty.call(t,e)?t[e]:null}static set(e,t,r){var s,o;const a={...r};let d=t;if(null===t)d="",a.expires=-1;if(a.expires){let e;if("number"==typeof a.expires)e=new Date,e.setTime(e.getTime()+864e5*a.expires);else if(a.expires.toUTCString())e=a.expires;else throw new TypeError('Option "expires" should be a Number or Date instance');a.expires=e}if(i.constants.isServerSide)null===(o=null===(s=null===process||void 0===process?void 0:process.domain)||void 0===s?void 0:s.res)||void 0===o||o.cookie(e,t,a);else a.expires=a.expires&&a.expires.toUTCString(),document.cookie=function(e,t,i){const r=i.expires?`; expires=${i.expires}`:"",s=i.path?`; path=${i.path}`:"",o=i.domain?`; domain=${i.domain}`:"",n=i.secure?"; secure":"";return[e,"=",encodeURIComponent(t),r,s,o,n].join("")}(e,t,a),n()}},t}(0,{},r,n),b=g,T=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=!1;return t.default=class{static get logMethodExecutionTime(){return r}static set logMethodExecutionTime(e){r=e}static checkAssertion(e,t){if(!e)throw new Error(t||"ÐÑибка логики")}static getStackTrace(){return(new Error).stack||""}static methodExecutionTime(e,t,s){let o,n,a;if(r){if(a=i.default.resolve("ILogger"),"function"==typeof a.methodExecutionStart)a.methodExecutionStart(e);o=Date.now()}try{n=e.apply(t,s)}catch(e){throw e}finally{if(r&&"function"==typeof a.methodExecutionFinish)a.methodExecutionFinish(e,Date.now()-(null!=o?o:0))}return n}},t}(0,{},n),m=T,M=function(e,t,i,r,s){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.OS=t.Screen=t.Browser=void 0,Object.defineProperty(t,"Browser",{enumerable:!0,get:function(){return i.Browser}}),Object.defineProperty(t,"Screen",{enumerable:!0,get:function(){return r.Screen}}),Object.defineProperty(t,"OS",{enumerable:!0,get:function(){return s.OS}}),t}(0,{},u,f,p),w=M,P=function(e,t,i){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return new Promise(((e,t)=>{try{i.default.resolve("ILogger").error("Env/Env/isIncognito","ÐодÑÐ»Ñ ÑÑÑаÑел и его иÑполÑзование в 21.3000 бÑÐ´ÐµÑ ÑÑиÑаÑÑÑÑ Ð¾Ñибкой."),e(!1)}catch(e){t(e)}}))},t}(0,{},n),E=P,v=function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.detectPhone=void 0;const s={iPad:"iPad|iPad.*Mobile",GoogleTablet:"Android.*Pixel C",SamsungTablet:"SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-
27I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-T116BU|SM-P550|SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T815|SM-T360|SM-T533|SM-T113|SM-T335|SM-T715|SM-T560|SM-T670|SM-T677|SM-T377|SM-T567|SM-T357T|SM-T555|SM-T561|SM-T713|SM-T719|SM-T813|SM-T819|SM-T580|SM-T355Y?|SM-T280|SM-T817A|SM-T820|SM-W700|SM-P580|SM-T587|SM-P350|SM-P555M|SM-P355M|SM-T113NU|SM-T815Y|SM-T585|SM-T285|SM-T825|SM-W708|SM-T835|SM-T830|SM-T837V|SM-T720|SM-T510|SM-T387V|SM-P610|SM-T290|SM-T515|SM-T590|SM-T595|SM-T725|SM-T817P|SM-P585N0|SM-T395|SM-T295|SM-T865|SM-P610N|SM-P615|SM-T970|SM-T380|SM-T5950|SM-T905|SM-T231|SM-T500|SM-T860|SM-T837A|SM-X200",SurfaceTablet:"Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)",HPTablet:"HP Slate (7|8|10)|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10",AsusTablet:"^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|Slider SL101|\\bK00F\\b|\\bK00C\\b|\\bK00E\\b|\\bK00L\\b|TX201LA|ME176C|ME102A|\\bM80TA\\b|ME372CL|ME560CG|ME372CG|ME302KL| K010 | K011 | K017 | K01E |ME572C|ME103K|ME170C|ME171C|\\bME70C\\b|ME581C|ME581CL|ME8510C|ME181C|P01Y|PO1MA|P01Z|\\bP027\\b|\\bP024\\b|\\bP00C\\b",AcerTablet:"Android.*; \\b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\\b|W3-810|\\bA3-A10\\b|\\bA3-A11\\b|\\bA3-A20\\b|\\bA3-A30|A3-A40",LenovoTablet:"Lenovo TAB|Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|YT3-850M|YT3-X90L|YT3-X90F|YT3-X90X|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|B8000|B8080)(-|)(FL|F|HV|H|)|TB-X103F|TB-X304X|TB-X304F|TB-X304L|TB-X505F|TB-X505L|TB-X505X|TB-X605F|TB-X605L|TB-8703F|TB-8703X|TB-8703N|TB-8704N|TB-8704F|TB-8704X|TB-8704V|TB-7304F|TB-7304I|TB-7304X|Tab2A7-10F|Tab2A7-20F|TB2-X30L|YT3-X50L|YT3-X50F|YT3-X50M|YT-X705F|YT-X703F|YT-X703L|YT-X705L|YT-X705X|TB2-X30F|TB2-X30L|TB2-X30M|A2107A-F|A2107A-H|TB3-730F|TB3-730M|TB3-730X|TB-7504F|TB-7504X|TB-X704F|TB-X104F|TB3-X70F|TB-X705F|TB-8504F|TB3-X70L|TB3-710F|TB-X704L|TB-J606F|TB-J606L",HuaweiTablet:"MediaPad|MediaPad 7 Youth|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim|M2-A01L|BAH-L09|BAH-W09|AGS-L09|CMR-AL19|MediaPad M5|BAH2-W19|BAH2-L09|SHT-AL09",TeclastTablet:"T98 4G|\\bP80\\b|\\bX90HD\\b|X98 Air|X98 Air 3G|\\bX89\\b|P80 3G|\\bX80h\\b|P98 Air|\\bX89HD\\b|P98 3G|\\bP90HD\\b|P89 3G|X98 3G|\\bP70h\\b|P79HD 3G|G18d 3G|\\bP79HD\\b|\\bP89s\\b|\\bA88\\b|\\bP10HD\\b|\\bP19HD\\b|G18 3G|\\bP78HD\\b|\\bA78\\b|\\bP75\\b|G17s 3G|G17h 3G|\\bP85t\\b|\\bP90\\b|\\bP11\\b|\\bP98t\\b|\\bP98HD\\b|\\bG18d\\b|\\bP85s\\b|\\bP11HD\\b|\\bP88s\\b|\\bA80HD\\b|\\bA80se\\b|\\bA10h\\b|\\bP89\\b|\\bP78s\\b|\\bG18\\b|\\bP85\\b|\\bA70h\\b|\\bA70\\b|\\bG17\\b|\\bP18\\b|\\bA80s\\b|\\bA11s\\b|\\bP88HD\\b|\\bA80h\\b|\\bP76s\\b|\\bP76h\\b|\\bP98\\b|\\bA10HD\\b|\\bP78\\b|\\bP88\\b|\\bA11\\b|\\bA10t\\b|\\bP76a\\b|\\bP76t\\b|\\bP76e\\b|\\bP85HD\\b|\\bP85a\\b|\\bP86\\b|\\bP75HD\\b|\\bP76v\\b|\\bA12\\b|\\bP75a\\b|\\bA15\\b|\\bP76Ti\\b|\\bP81HD\\b|\\bA10\\b|\\bT760VE\\b|\\bT720HD\\b|\\bP76\\b|\\bP73\\b|\\bP71\\b|\\bP72\\b|\\bT720SE\\b|\\bC520Ti\\b|\\bT760\\b|\\bT720VE\\b|T720-3GE|T720-WiFi",MiTablet:"\\bMI PAD\\b|\\bHM NOTE 1W\\b|21051182G|M2105K81AC"};!function(e){for(const t in e)if(e.hasOwnProperty(t))e[t]=new RegExp(e[t],"i")}(s);const o=["windowInnerWidth","windowInnerHeight","windowOuterWidth","windowOuterHeight","viewportWidth","viewportHeight","screenWidth","screenHeight","containerClientWidth","containerClientHeight"];return t.detectPhone=function(e){var t,n,a,d,l,c;for(const t of Object.keys(s))if(s[t].test(e))return!1;let u="";try{u=i.location.pathname}catch(e){if("undefined"!=typeof window)u=window.location.pathname}if("/page/empty-page"===u)return!0;
27if("false"===r.default.get("useAdaptive"))return!0;const p=r.default.get("s3ac");let f;try{f=p?function(e){const t=e.split("!");if(t.length!==o.length+1)throw new Error;const i={};for(let e=0;e<o.length;e++){const r=o[e];if(""===t[e])i[r]=void 0;else if(i[r]=parseInt(t[e],10),isNaN(i[r]))throw new Error}const r=parseInt(t[o.length],10);if(isNaN(r))throw new Error;const s=function(e){const t=e?[]:[!1];for(;e;)t.unshift(!(1&~e)),e>>=1;for(;t.length<4;)t.unshift(!1);return t}(r);return i.isTouch=s[0],i.isVertical=s[1],i.isPhone=s[2],i.isTablet=s[3],i}(p):{}}catch(e){f={}}const h="undefined"!=typeof window?null!==(n=null===(t=window.screen)||void 0===t?void 0:t.width)&&void 0!==n?n:0:null!==(a=f.screenWidth)&&void 0!==a?a:0,S="undefined"!=typeof window?null!==(l=null===(d=window.screen)||void 0===d?void 0:d.height)&&void 0!==l?l:0:null!==(c=f.screenHeight)&&void 0!==c?c:0,g=Math.min(h,S);if(g&&g>600)return!1;else return!0},t}(0,{},e,g),y=function(e,t,i,r,s,o,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class a{constructor(){if(this.IPAD_COOKIE_KEY="machine_is_ipad",this.IPAD_COOKIE_VALUE="true",this.SBISCEF_COOKIE_KEY="desktop_app",this.SBISCEF_COOKIE_VALUE="true",this.MULTI_TOUCH_COOKIE_KEY="is_multitouch",this.MUlTI_TOUCH_COOKIE_VALUE="true",this.WEBVIEW_COOKIE_KEY="isWebView",this.WEBVIEW_COOKIE_VALUE="true",this.isNodeEnv="undefined"!=typeof process,this.isBrowserEnv="undefined"!=typeof window&&"undefined"!=typeof navigator&&"undefined"!=typeof document,this.isBrowserEnv&&this.isMobileIOS)document.cookie=`${this.IPAD_COOKIE_KEY}=${this.IPAD_COOKIE_VALUE};path=/`;if(this.isBrowserEnv&&this.isMultiTouch)document.cookie=`${this.MULTI_TOUCH_COOKIE_KEY}=${this.MUlTI_TOUCH_COOKIE_VALUE};path=/`}isSomeDetected(...e){return e.some((e=>{var t;return null===(t=e.isDetected)||void 0===t?void 0:t.call(e,this.userAgent)}))}getProperty(e,t){if(a.isPropExist(e))return a.props[e];const i=t();if(this.isBrowserEnv)if(void 0!==a.props)a.props[e]=i;return i}get userAgent(){return this.getProperty("userAgent",(()=>{if(this.isNodeEnv){const e=process.domain&&process.domain.req;return e&&e.headers&&e.headers["user-agent"]?e.headers["user-agent"]:""}if(this.isBrowserEnv)return navigator.userAgent;else return""}))}set userAgent(e){a.props.userAgent=e}get isMobileIOS(){return this.getProperty("isMobileIOS",(()=>{const e=this.userAgent;if(this.isNodeEnv){if(s.OS.IOS.isDetected&&s.OS.IOS.isDetected(e))return!0;const t=process.domain&&process.domain.req&&process.domain.req.cookies[this.IPAD_COOKIE_KEY]===this.IPAD_COOKIE_VALUE;return!(!(s.OS.MacOS.isDetected&&s.OS.MacOS.isDetected(e)&&t)||o.Browser.Chrome.isDetected(e))}const t=s.OS.IOS.isDetected&&s.OS.IOS.isDetected(e),i=s.OS.MacOS.isDetected&&s.OS.MacOS.isDetected(e)&&(null===navigator||void 0===navigator?void 0:navigator.maxTouchPoints)>0;return!(!t&&!i)}))}set isMobileIOS(e){a.props.isMobileIOS=e}get AndroidVersion(){return this.getProperty("AndroidVersion",(()=>{if(this.isMobileAndroid)return s.OS.Android.version&&s.OS.Android.version(this.userAgent)}))}set AndroidVersion(e){a.props.AndroidVersion=e}get IOSVersion(){return this.getProperty("IOSVersion",(()=>{if(this.isMobileIOS)return s.OS.IOS.version&&s.OS.IOS.version(this.userAgent)}))}set IOSVersion(e){a.props.IOSVersion=e}get isMac(){return this.getProperty("isMac",(()=>"function"==typeof s.OS.MacOS.isDetected&&s.OS.MacOS.isDetected(this.userAgent)))}set isMac(e){a.props.isMac=e}get isMacOSDesktop(){return this.getProperty("isMacOSDesktop",(()=>this.isMac&&!this.isMobileIOS))}set isMacOSDesktop(e){a.props.isMacOSDesktop=e}get isMacOSMobile(){return this.getProperty("isMacOSMobile",(()=>this.isMac&&this.isMobileIOS))}set isMacOSMobile(e){a.props.isMacOSMobile=e}get isWin(){return this.getProperty("isWin",(()=>!(!s.OS.Windows.isDetected||!s.OS.Windows.isDetected(this.userAgent))))}set isWin(e){a.props.isWin=e}get isWin10(){return this.getProperty("isWin10",(()=>!(!s.WinFamily.Windows10.isDetected||!s.WinFamily.Windows10.isDetected(this.userAgent))))}set isWin10(e){a.props.isWin10=e}get isWin8(){return this.getProperty("isWin8",(()=>this.isSomeDetected(s.WinFamily.Windows8,s.WinFamily.Windows8_1)))}set isWin8(e){a.props.isWin8=e}get isWin7(){return this.getProperty("isWin7",(()=>!(!s.WinFamily.Windows7.isDetected||!s.WinFamily.Windows7.isDetected(this.userAgent))))}set isWin7(e){a.props.isWin7=e}get isWinVista(){return this.getProperty("isWinVista",(()=>!(!s.WinFamily.WindowsVista.isDetected||!s.WinFamily.WindowsVista.isDetected(this.userAgent))))}set isWinVista(e){a.props.isWinVista=e}get isWinXP(){return this.getProperty("isWinXP",(()=>this.isSomeDetected(s.WinFamily.WindowsServer2003,s.WinFamily.WindowsXP)))}set isWinXP(e){a.props.isWinXP=e}get isUnix(){return this.getProperty("isUnix",(()=>this.isSomeDetected(s.OS.Unix,s.OS.Linux)))}set isUnix(e){a.props.isUnix=e}get isWPMobilePlatform(){return this.getProperty("isWPMobilePlatform",(()=>this.isSomeDetected(s.WinFamily.WindowsPhone,s.WinFamily.IEMobile,s.WinFamily.WPDesktop,s.WinFamily.Lumia)))}set isWPMobilePlatform(e){a.props.isWPMobilePlatform=e}get isMobileAndroid(){return this.getProperty("isMobileAndroid",(()=>!(!s.OS.Android.isDetected||!s.OS.Android.isDetected(this.userAgent))))}set isMobileAndroid(e){a.props.isMobileAndroid=e}get isMobilePlatform(){return this.getProperty("isMobilePlatform",(()=>this.isMobileIOS||this.isMobileAndroid||this.isWPMobilePlatform))}set isMobilePlatform(e){a.props.isMobilePlatform=e}get EdgeVersion(){return this.getProperty("EdgeVersion",(()=>"function"==typeof o.Browser.Edge.version&&o.Browser.Edge.version(this.userAgent)))}set EdgeVersion(e){a.props.EdgeVersion=e}get IEVersion(){return this.getProperty("IEVersion",(()=>"function"==typeof o.Browser.IE.version&&o.Browser.IE.version(this.userAgent)))}set IEVersion(e){a.props.IEVersion=e}get isIE(){return this.getProperty("isIE",(()=>!!this.IEVersion))}set isIE(e){a.props.isIE=e}get isModernIE(){return this.getProperty("isModernIE",(()=>this.IEVersion>9))}set isModernIE(e){a.props.isModernIE=e}get isIE10(){return this.getProperty("isIE10",(()=>10===this.IEVersion))}set isIE10(e){a.props.isIE10=e}get isRealIE10(){return this.getProperty("isRealIE10",(()=>this.isIE10&&"function"==typeof i.Engine.Trident.version&&6===i.Engine.Trident.version(this.userAgent)))}set isRealIE10(e){a.props.isRealIE10=e}get isIE11(){return this.getProperty("isIE11",(()=>11===this.IEVersion))}set isIE11(e){a.props.isIE11=e}get isIE12(){return this.getProperty("isIE12",(()=>this.IEVersion>=12))}set isIE12(e){a.props.isIE12=e}
27get isEdge(){return this.getProperty("isEdge",(()=>this.EdgeVersion>=85))}set isEdge(e){a.props.isEdge=e}get isChromeIOS(){return this.getProperty("isChromeIOS",(()=>this.isMobileIOS&&o.Browser.Chrome.isDetected(this.userAgent,o.Mode.IOS)))}set isChromeIOS(e){a.props.isChromeIOS=e}get isMobileChrome(){return this.getProperty("isMobileChrome",(()=>this.isChromeIOS||o.Browser.Chrome.isDetected(this.userAgent,o.Mode.MOBILE)))}set isMobileChrome(e){a.props.isMobileChrome=e}get isDesktopChrome(){return this.getProperty("isDesktopChrome",(()=>!this.IEVersion&&!this.isMobileChrome&&o.Browser.Chrome.isDetected(this.userAgent)))}set isDesktopChrome(e){a.props.isDesktopChrome=e}get chrome(){return this.getProperty("chrome",(()=>this.isMobileChrome||this.isDesktopChrome))}set chrome(e){a.props.chrome=e}get chromeVersion(){return this.getProperty("chromeVersion",(()=>{if(this.chrome)return o.Browser.Chrome.version&&o.Browser.Chrome.version(this.userAgent)}))}set chromeVersion(e){a.props.chromeVersion=e}get isDesktopSafari(){return this.getProperty("isDesktopSafari",(()=>!(!(this.isMacOSDesktop&&i.Engine.WebKit.isDetected&&i.Engine.WebKit.isDetected(this.userAgent))||o.Browser.Chrome.isDetected(this.userAgent)||o.Browser.YaBrowser.isDetected(this.userAgent)||o.Browser.Edge.isDetected(this.userAgent)||o.Browser.Opera.isDetected(this.userAgent))))}set isDesktopSafari(e){a.props.isDesktopSafari=e}get isMobileSafari(){return this.getProperty("isMobileSafari",(()=>!(!this.isMobileIOS||this.isChromeIOS||!i.Engine.WebKit.isDetected||!i.Engine.WebKit.isDetected(this.userAgent))))}set isMobileSafari(e){a.props.isMobileSafari=e}get safari(){return this.getProperty("safari",(()=>this.isMobileSafari||this.isDesktopSafari))}set safari(e){a.props.safari=e}get safari11(){return this.getProperty("safari11",(()=>!(!this.safari||!o.Browser.Safari.version||11!==o.Browser.Safari.version(this.userAgent))))}set safari11(e){a.props.safari11=e}get safariVersion(){return this.getProperty("safariVersion",(()=>{if(this.safari)return o.Browser.Safari.version&&o.Browser.Safari.version(this.userAgent)}))}set safariVersion(e){a.props.safariVersion=e}get firefox(){return this.getProperty("firefox",(()=>o.Browser.Firefox.isDetected(this.userAgent)))}set firefox(e){a.props.firefox=e}get firefoxVersion(){return this.getProperty("firefoxVersion",(()=>{if(this.firefox)return o.Browser.Firefox.version&&o.Browser.Firefox.version(this.userAgent)}))}set firefoxVersion(e){a.props.firefoxVersion=e}get opera(){return this.getProperty("opera",(()=>o.Browser.Opera.isDetected(this.userAgent)))}set opera(e){a.props.opera=e}get operaVersion(){return this.getProperty("operaVersion",(()=>{if(this.operaChrome)return o.Browser.Opera.version&&o.Browser.Opera.version(this.userAgent)}))}set operaVersion(e){a.props.operaVersion=e}get operaChrome(){return this.getProperty("opera",(()=>o.Browser.Opera.isDetected(this.userAgent)))}set operaChrome(e){a.props.operaChrome=e}get yandex(){return this.getProperty("yandex",(()=>o.Browser.YaBrowser.isDetected(this.userAgent)))}set yandex(e){a.props.yandex=e}get webkit(){return this.getProperty("webkit",(()=>!(this.isDesktopChrome||!i.Engine.WebKit.isDetected||!i.Engine.WebKit.isDetected(this.userAgent)||this.isIE12)))}set webkit(e){a.props.webkit=e}get isOldWebKit(){return this.getProperty("isOldWebKit",(()=>!!(this.isChromeIOS&&this.IOSVersion<11||this.safari&&o.Browser.Safari.build&&o.Browser.Safari.build(this.userAgent)<604)))}set isOldWebKit(e){a.props.isOldWebKit=e}get isDesktop(){return this.getProperty("isDesktop",(()=>r.default.get(this.SBISCEF_COOKIE_KEY)===this.SBISCEF_COOKIE_VALUE))}set isDesktop(e){a.props.isDesktop=e}get isNotFullGridSupport(){return this.getProperty("isNotFullGridSupport",(()=>{const e=(0,o.detect)(this.userAgent,this.isMobilePlatform,"isNotDisplaySupport");return!!(e&&e.browser.isNotDisplaySupport&&e.browser.isNotDisplaySupport(this.userAgent,e.platform))}))}set isNotFullGridSupport(e){a.props.isNotFullGridSupport=e}get isNotGridSupport(){return this.getProperty("isNotGridSupport",(()=>{const e=(0,o.detect)(this.userAgent,this.isMobilePlatform,"isNotGridSupport");return!!(e&&"isNotGridSupport"in e.browser&&e.browser.isNotGridSupport&&e.browser.isNotGridSupport(this.userAgent,e.platform))}))}set isNotGridSupport(e){a.props.isNotGridSupport=e}get isMultiTouch(){return this.getProperty("isMultiTouch",(()=>{let e=!1;if(this.isNodeEnv){return!!(process.domain&&process.domain.req&&process.domain.req.cookies[this.MULTI_TOUCH_COOKIE_KEY]===this.MUlTI_TOUCH_COOKIE_VALUE)}if(this.isBrowserEnv)if(window.PointerEvent&&"maxTouchPoints"in navigator){if(navigator.maxTouchPoints>0)e=!0}else if(window.matchMedia&&window.matchMedia("(any-pointer:coarse)").matches)e=!0;else if(window.TouchEvent||"ontouchstart"in window)e=!0;return e}))}set isMultiTouch(e){a.props.isMultiTouch=e}get isPhone(){return this.getProperty("isPhone",(()=>{const e=this.userAgent,t=/\biPhone\b|\biPod\b/;
27if(s.OS.MacOS.isDetected)if(s.OS.MacOS.isDetected(e)&&!t.test(e))return!1;return this.isMobilePlatform&&(0,n.detectPhone)(e)}))}set isPhone(e){a.props.isPhone=e}get isRobot(){return this.getProperty("isRobot",(()=>/bot|crawler|spider|crawling/i.test(this.userAgent)))}set isRobot(e){a.props.isRobot=e}get isRetina(){return this.getProperty("isRetina",(()=>{if(this.isNodeEnv)return!1;if(window.devicePixelRatio>1||window.matchMedia&&window.matchMedia("(-webkit-min-device-pixel-ratio: 1.5),\n (min--moz-device-pixel-ratio: 1.5),\n (-o-min-device-pixel-ratio: 3/2),\n (min-device-pixel-ratio: 1.5),\n (min-resolution: 144dpi),\n (min-resolution: 1.5dppx)").matches)return!0;else return!1}))}set isRetina(e){a.props.isRetina=e}get isHeadlessChrome(){return this.getProperty("isHeadlessChrome",(()=>this.userAgent.toLowerCase().includes("headless")))}set isHeadlessChrome(e){a.props.isHeadlessChrome=e}get isWebView(){return r.default.get(this.WEBVIEW_COOKIE_KEY)===this.WEBVIEW_COOKIE_VALUE}set isWebView(e){a.props.isWebView=e}static isPropExist(e){return void 0!==a.props[e]}static getInstance(){var e;return a.instance=null!==(e=a.instance)&&void 0!==e?e:new a,a.instance}}return a.props={},t.default=a,t}(0,{},l,g,c,d,v),O=y,W=function(e,t,i,r,s,o){"use strict";function n(){if("undefined"==typeof window||!window.location)return i.constants.logLevel;if(i.constants.isProductionHost(window.location.hostname))return a.error;if(window.wsConfig&&void 0!==window.wsConfig.logLevel)return window.wsConfig.logLevel;else return i.constants.logLevel}var a;Object.defineProperty(t,"__esModule",{value:!0}),t.getLogLevel=void 0,function(e){e[e.info=0]="info",e[e.warning=1]="warning",e[e.error=2]="error"}(a||(a={}));class d{constructor(e=a.info){if(this.level=e,"jstestdriver"in globalThis)this._con=globalThis.jstestdriver.console;else if("console"in globalThis)this._con=globalThis.console;const t=r.default.getInstance();if(s.default.get("desktop_app")||t.isDesktop||t.safari)this.__createMessage=this.__createMessageForEmbedded}__isMethodExists(e){return this._con&&"function"==typeof this._con[e]}__createMessage(e,t,i){let r=[e];if(t)r=[`${e}: `,t];if(i)r.push(i);return r}log(e,t){try{this._con.log(...this.__createMessage(e,t))}catch(e){}}warn(e,t){if(!(this.level>a.warning))if(!this.__isMethodExists("warn"))this.log(e,t);else this._con.warn(...this.__createMessage(e,t))}error(e,t,i){const r=i&&i.stack?`\nStack: ${i.stack}`:"";try{this._con.error(...this.__createMessage(e,t,r))}catch(i){this.log(e,t)}}info(...e){try{this._con.info(...e)}catch(e){}}methodExecutionStart(e){this.log("methodExecutionStart",e.name)}methodExecutionFinish(e,t){this.log("methodExecutionFinish",`${e.name} execution time = ${t}ms`)}__createMessageForEmbedded(e,t,i){let r=[e];if(t)r=[`${e}: `,t];if(i)r.push(i);return[r.map((e=>this.__dataToString(e))).reduce(((e,t)=>e+` ${t}`))]}__dataToString(e){if("string"==typeof e)return e;if("function"==typeof e)return e.toString();if(e instanceof Error)return`{'message: '${e.message}', 'stack': '${e.stack}', 'name': '${e.name}'}`;else return JSON.stringify(e)}}if(t.getLogLevel=n,!o.default.has("ILogger"))o.default.bindSingle("ILogger",new d(n()));return t.default=d,t}(0,{},r,y,g,n),A=W,i.isIncognito=i.IoC=i.ILogger=i.experimental=i.coreDebug=i.cookie=i.ConsoleLogger=i.Detection=i.constants=i.compatibility=i.detection=void 0,i.experimental=w,i.Detection=O.default,i.ConsoleLogger=A.default,i.IoC=a.default,i.ILogger=o.default,Object.defineProperty(i,"cookie",{enumerable:!0,get:function(){return b.default}}),i.coreDebug=m.default,i.isIncognito=E.default,i.detection=O.default.getInstance(),i.compatibility=S.default.getInstance(),i.constants=Object.assign(r.default,{browser:i.detection,compatibility:i.compatibility}),!a.default.has("ILogger"))a.default.bindSingle("ILogger",new A.default((0,A.getLogLevel)()));return i})); 28define("Env/Constants",["require","exports"],(function(e,n){var t,o;return Object.defineProperty(n,"__esModule",{value:!0}),t=function(e,n){"use strict";function t(e){if("undefined"!=typeof localStorage&&null!==localStorage&&"0"===(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("reportactivity")))return!1;const n=e.replace(/:\d+$/,""),t=n.split("."),o=["test","pre-test","fix","dev"],i=t.some((e=>{const n=e.toLowerCase();return o.some((e=>{const t=e.toLowerCase();return n.startsWith(t+"-")}))}
28)),s=/\.sbis\.ru$/i.test(n)||/\.saby\.ru$/i.test(n),a=t.some((e=>"dev"===e.toLowerCase()));if(s&&a&&!i)return!0;else return!i}Object.defineProperty(n,"__esModule",{value:!0});const o=+new Date,i=+new Date(2014,9,26),s="1.0.4",a="3.0.1",r="1.0.0",c={isProductionHost:t,JSONRPC_PROOTOCOL_VERSION:7,appRoot:"/",resourceRoot:"/resources/",metaRoot:"/resources/",wsRoot:"/ws/",cdnRoot:"/cdn/",defaultServiceUrl:"/service/",decoratedLinkService:"/linkdecorator/service/",decoratedLinkHost:"object"==typeof location?location.protocol+"//"+location.host:"",logLevel:0,buildnumber:"",isBrowserPlatform:"undefined"!=typeof window,isServerSide:"undefined"==typeof window,compat:("undefined"==typeof window||window&&-1===window.location.href.indexOf("withoutLayout"))&&("undefined"==typeof window||!1!==window.wsConfig.compatible),i18n:!1,defaultLanguage:"ru",availableLanguage:{},dictionary:{},theme:"wi_scheme",tensorFontsUrl:["Controls-default-theme/fonts/TensorInter.css","Controls-default-theme/fonts/cbus-icons.css","SBIS3.CONTROLS/themes/general.css"],interFontsUrl:["Controls-default-theme/fonts/TensorInter.css","Controls-default-theme/fonts/cbus-icons.css","SBIS3.CONTROLS/themes/general.css"],hosts:[],services:{},modules:{},jsCoreModules:{},jsModules:{},moscowTimeOffset:o>=i?180:240,styleLoadTimeout:4e3,IDENTITY_SPLITTER:",",userConfigSupport:!1,globalConfigSupport:!0,debug:!1,saveLastState:!0,checkSessionCookie:!0,layoutConfig:{contentArea:["#contentArea","#contentAreaEdit","#ctr"]},isNewNav:!0,xmlPackages:{},jsPackages:{},xmlContents:{},htmlNames:{},hdlBindings:{},startDragDistance:4,WINDOW_CLASSES:["Lib/Control/FloatArea/FloatArea","
28Lib/Control/Window/Window","Deprecated/Controls/FieldEditAtPlace/FieldEditAtPlace"],key:{left:37,up:38,right:39,down:40,insert:45,del:46,space:32,backspace:8,minus:109,plus:107,enter:13,esc:27,f1:112,f3:114,f4:115,f5:116,f7:118,f12:123,meta:157,underscore:95,pageUp:33,pageDown:34,end:35,home:36,tab:9,ctrl:17,b:66,c:67,h:72,v:86,y:89,s:83,q:81,p:80,m:77,n:78,o:79,androidAnyKey:229},modifiers:{nothing:0,shift:2,control:4,alt:8},operaKeys:{43:"plus",45:"minus"},NON_CTRL:".ws-non-control",fasttemplate:!1,nostyle:!1,javaStartTimeout:15e3,resizeDelay:40,classLoaderMappings:{},IE_ACTIVEOBJECT_XML_PRINT_TYPE:"Microsoft.XmlDom",ApplicationConfig:{errorHandlers:["SbisEnvUI/Maintains:Parking.handlers.javaScript","SbisEnvUI/Maintains:Parking.handlers.require","SbisEnvUI/Maintains:Parking.handlers.internal","SbisEnvUI/Maintains:Parking.handlers.notFound","SbisEnvUI/Maintains:Parking.handlers.maintenance","SbisEnvUI/Maintains:Parking.handlers.connection","SbisEnvUI/Maintains:Parking.handlers.network","SbisEnvUI/Maintains:Parking.handlers.accessDenied","SbisEnvUI/Maintains:Parking.handlers.rpc"]},cbucIcons:"/cdn/CbucIcons/1.6.0/cbuc-icons/cbuc-icons.woff2",isProduction:"undefined"!=typeof location&&t(location.host),cbucIcons24:"/cdn/CbucIcons/1.6.0/cbuc-icons24/cbuc-icons24.woff2",emojiFont:"/cdn/EmojiFont/1.0.2/EmojiFont.woff2",accordionFont:"/cdn/AccordionFont/1.0.41/Accordion-Font.woff2",accordionFont20:"/cdn/AccordionFont/1.0.41/Accordion-Font-20.woff2",tensorFont:"/cdn/TensorFont/1.0.3/TensorFont/TensorFont.woff2",tensorFontBold:"/cdn/TensorFont/1.0.3/TensorFontBold/TensorFontBold.woff2",tensorFontBoldItalic:"/cdn/TensorFont/1.0.3/TensorFontBoldItalic/TensorFontBoldItalic.woff2",tensorFontItalic:"/cdn/TensorFont/1.0.3/TensorFontItalic/TensorFontItalic.woff2",interFont:`/cdn/TensorInter/${a}/static-hint/Inter-Regular-small-hint.woff2`,interFontBold:`/cdn/TensorInter/${a}/static-hint/Inter-SemiBold-small-hint.woff2`,interFontBoldItalic:`/cdn/TensorInter/${a}/static-hint/Inter-SemiBoldItalic-small-hint.woff2`,interFontMedium:`/cdn/TensorInter/${a}/static-hint/Inter-Medium-small-hint.woff2`,interFontMediumItalic:`/cdn/TensorInter/${a}/static-hint/Inter-MediumItalic-small-hint.woff2`,interFontItalic:`/cdn/TensorInter/${a}/static-hint/Inter-Italic-small-hint.woff2`,interFontMac:`/cdn/TensorInter/${a}/static/Inter-Regular-small.woff2`,interFontBoldMac:`/cdn/TensorInter/${a}/static/Inter-SemiBold-small.woff2`,interFontBoldItalicMac:`/cdn/TensorInter/${a}/static/Inter-SemiBoldItalic-small.woff2`,interFontMediumMac:`/cdn/TensorInter/${a}/static/Inter-Medium-small.woff2`,interFontMediumItalicMac:`/cdn/TensorInter/${a}/static/Inter-MediumItalic-small.woff2`,interFontItalicMac:`/cdn/TensorInter/${a}/static/Inter-Italic-small.woff2`,interFontMediumSubset:`/cdn/TensorInter/${a}/static-hint/Inter-Regular-medium-hint.woff2`,interFontBoldMediumSubset:`/cdn/TensorInter/${a}/static-hint/Inter-SemiBold-medium-hint.woff2`,interFontBoldItalicMediumSubset:`/cdn/TensorInter/${a}/static-hint/Inter-SemiBoldItalic-medium-hint.woff2`,interFontMediumMediumSubset:`/cdn/TensorInter/${a}/static-hint/Inter-Medium-medium-hint.woff2`,interFontMediumItalicMediumSubset:`/cdn/TensorInter/${a}/static-hint/Inter-MediumItalic-medium-hint.woff2`,interFontItalicMediumSubset:`/cdn/TensorInter/${a}/static-hint/Inter-Italic-medium-hint.woff2`,interFontMacMediumSubset:`/cdn/TensorInter/${a}/static/Inter-Regular-medium.woff2`,interFontBoldMacMediumSubset:`/cdn/TensorInter/${a}/static/Inter-SemiBold-medium.woff2`,interFontBoldItalicMacMediumSubset:`/cdn/TensorInter/${a}/static/Inter-SemiBoldItalic-medium.woff2`,interFontMediumMacMediumSubset:`/cdn/TensorInter/${a}/static/Inter-Medium-medium.woff2`,interFontMediumItalicMacMediumSubset:`/cdn/TensorInter/${a}/static/Inter-MediumItalic-medium.woff2`,interFontItalicMacMediumSubset:`/cdn/TensorInter/${a}/static/Inter-Italic-medium.woff2`,maisonNeue:`/cdn/MaisonNeue/${s}/MaisonNeue/MaisonNeue.woff2`,maisonNeueBold:`/cdn/MaisonNeue/${s}/MaisonNeueBold/MaisonNeueBold.woff2`,maisonNeueBoldItalic:`/cdn/MaisonNeue/${s}/MaisonNeueBoldItalic/MaisonNeueBoldItalic.woff2`,maisonNeueItalic:`/cdn/MaisonNeue/${s}/MaisonNeueItalic/MaisonNeueItalic.woff2`,maisonNeueExtendedDemi:{MaisonSABYSBI:`/cdn/MaisonNeue/${s}/MaisonNeueExtendedBold/Maison_az-hint.woff2`,MaisonRUEN:`/cdn/MaisonNeue/${s}/MaisonNeueExtendedBold/MaisonRUEN_wo_az-hint.woff2`,MaisonOther:`/cdn/MaisonNeue/${s}/MaisonNeueExtendedBold/MaisonOther-hint.woff2`},maisonNeueExtendedBook:{MaisonSABYSBI:`/cdn/MaisonNeue/${s}/MaisonNeueExtendedRegular/MaisonSABYSBI-hint.woff2`,MaisonRUEN:`/cdn/MaisonNeue/${s}/MaisonNeueExtendedRegular/MaisonRUEN-hint.woff2`,MaisonOther:`/cdn/MaisonNeue/${s}/MaisonNeueExtendedRegular/MaisonOther-hint.woff2`},robotoMono:`/cdn/RobotoMono/${r}/RobotoMono-VariableFont_wght.woff2`,robotoMonoItalic:`/cdn/RobotoMono/${r}/RobotoMono-Italic-VariableFont_wght.woff2`};return globalThis.IS_PRODUCTION=c.isProduction,n.default=c,n}(0,{}
28),o=t,n.constants=void 0,n.constants=o.default,n.default=o.default,n})); 29define("UI/Contexts",["require","exports","UICore/Contexts"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WasabyContextManager=t.getWasabyContext=t.withReadonly=t.useReadonly=t.withTheme=t.useTheme=void 0,Object.defineProperty(t,"useTheme",{enumerable:!0,get:function(){return n.useTheme}}),Object.defineProperty(t,"withTheme",{enumerable:!0,get:function(){return n.withTheme}}),Object.defineProperty(t,"useReadonly",{enumerable:!0,get:function(){return n.useReadonly}}),Object.defineProperty(t,"withReadonly",{enumerable:!0,get:function(){return n.withReadonly}}),Object.defineProperty(t,"getWasabyContext",{enumerable:!0,get:function(){return n.getWasabyContext}}),Object.defineProperty(t,"WasabyContextManager",{enumerable:!0,get:function(){return n.WasabyContextManager}})})); 30define("UICore/Contexts",["react","UICommon/Utils","require","exports"],(function(e,t,n,r){var o,a,i,d,u,l,y,s;return Object.defineProperty(r,"__esModule",{value:!0}),o=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getWasabyContext=void 0;const r={readOnly:!1,theme:"default",_physicParent:void 0,_logicParent:void 0,_parentKey:void 0,pageData:void 0,Router:void 0,isAdaptive:void 0,isScrollOnBody:void 0,bubblingEvents:void 0,workByKeyboard:void 0,onErrorBoundary:()=>{}},o=(0,n.createContext)(r);return t.getWasabyContext=function(){return o},t}(0,{},e),a=o,i=function(e,t,n,r,o){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.WasabyContextManager=t.wasabyContextPropNames=void 0,t.wasabyContextPropNames=new Set(["readOnly","theme","_physicParent","_logicParent","_parentKey","pageData","Router","isAdaptive","isScrollOnBody","bubblingEvents","onErrorBoundary"]),t.WasabyContextManager=function(e){var t,a,i,d,u,l,y,s,c,b,v,m,f;const h=(0,r.getWasabyContext)(),{Provider:p}=h;let g,O,w,C,P,x,_,R,B,W,E,j,M;try{g=(0,n.useContext)(h),O=null!==(t=e.readOnly)&&void 0!==t?t:g.readOnly,w=null!==(a=e.theme)&&void 0!==a?a:g.theme,C=null!==(i=e._physicParent)&&void 0!==i?i:g._physicParent,P=null!==(d=e._logicParent)&&void 0!==d?d:g._logicParent,x=null!==(l=null!==(u=e._parentKey)&&void 0!==u?u:g._parentKey)&&void 0!==l?l:e.rskey,_=null!==(y=e.pageData)&&void 0!==y?y:g.pageData,R=null!==(s=e.Router)&&void 0!==s?s:g.Router,B=null!==(c=e.isAdaptive)&&void 0!==c?c:g.isAdaptive,W=null!==(b=e.isScrollOnBody)&&void 0!==b?b:g.isScrollOnBody,E=null!==(v=e.bubblingEvents)&&void 0!==v?v:g.bubblingEvents,j=null!==(m=e.workByKeyboard)&&void 0!==m?m:g.workByKeyboard,M=null!==(f=e.onErrorBoundary)&&void 0!==f?f:g.onErrorBoundary}catch(t){const n=`ÐÑибка пÑи поÑÑÑоении WasabyContextManager из модÑÐ»Ñ ${e.moduleName}`;throw o.Logger.error(n,e,t),t}const T=(0,n.useMemo)((()=>({readOnly:O,theme:w,_physicParent:C,_logicParent:P,_parentKey:x,pageData:_,Router:R,isAdaptive:B,isScrollOnBody:W,bubblingEvents:E,workByKeyboard:j,onErrorBoundary:M})),[x,C,P,O,w,_,R,B,W,E,j,M]);return(0,n.createElement)(p,{value:T,children:e.children})},t}(0,{},e,o,t),d=i,u=function(e,t,n,r,o){"use strict";function a(e={}){var t;const o=(0,n.useContext)((0,r.getWasabyContext)()).readOnly;return null!==(t=e.readOnly)&&void 0!==t?t:o}return Object.defineProperty(t,"__esModule",{value:!0}),t.useReadonly=t.withReadonly=void 0,t.withReadonly=function(e){const t=e.displayName||e.name||"Component",r=(r,i)=>{var d;const u=a();if(void 0!==r.readOnly&&r.readOnly!==u)o.Logger.error(`[${t}] ÐнаÑение опÑии readOnly пеÑеданное в опÑии не ÑÐ¾Ð²Ð¿Ð°Ð´Ð°ÐµÑ Ñо знаÑением из конÑекÑÑа (опÑии: ${r.readOnly}, конÑекÑÑ: ${u}). Ðадание опÑии readOnly ÑеÑез опÑÐ¸Ñ ÑÑÑаÑело, иÑполÑзÑйÑе конÑекÑÑ.`);return(0,n.createElement)(e,{...r,forwardedRef:null!==(d=r.forwardedRef)&&void 0!==d?d:i,readOnly:u})};return r.displayName=`withReadOnly(${t})`,(0,n.forwardRef)(r)},t.useReadonly=a,t}(0,{},e,o,t),l=u,y=function(e,t,n,r,o){"use strict";function a(e){return(0,n.useContext)((0,r.getWasabyContext)()).theme}
30return Object.defineProperty(t,"__esModule",{value:!0}),t.useTheme=t.withTheme=void 0,t.withTheme=function(e){const t=e.displayName||e.name||"Component",r=(r,i)=>{var d;const u=a();if(void 0!==r.theme&&r.theme!==u)o.Logger.error(`[${t}] ÐнаÑение опÑии theme пеÑеданное в опÑии не ÑÐ¾Ð²Ð¿Ð°Ð´Ð°ÐµÑ Ñо знаÑением из конÑекÑÑа (опÑии: ${r.theme}, конÑекÑÑ: ${u}). Ðадание опÑии theme ÑеÑез опÑÐ¸Ñ ÑÑÑаÑело, иÑполÑзÑйÑе конÑекÑÑ.`);return(0,n.createElement)(e,{...r,forwardedRef:null!==(d=r.forwardedRef)&&void 0!==d?d:i,theme:u})};return r.displayName=`withTheme(${t})`,(0,n.forwardRef)(r)},t.useTheme=a,t}(0,{},e,o,t),s=y,r.getWasabyContext=r.withReadonly=r.useReadonly=r.withTheme=r.useTheme=r.wasabyContextPropNames=r.WasabyContextManager=void 0,Object.defineProperty(r,"WasabyContextManager",{enumerable:!0,get:function(){return d.WasabyContextManager}}),Object.defineProperty(r,"wasabyContextPropNames",{enumerable:!0,get:function(){return d.wasabyContextPropNames}}),Object.defineProperty(r,"useTheme",{enumerable:!0,get:function(){return s.useTheme}}),Object.defineProperty(r,"withTheme",{enumerable:!0,get:function(){return s.withTheme}}),Object.defineProperty(r,"useReadonly",{enumerable:!0,get:function(){return l.useReadonly}}),Object.defineProperty(r,"withReadonly",{enumerable:!0,get:function(){return l.withReadonly}}),Object.defineProperty(r,"getWasabyContext",{enumerable:!0,get:function(){return a.getWasabyContext}}),r})); 31define("UICommon/Utils",["UICommon/NodeCollector","RequireJsLoader/conduct","I18n/i18n","Env/Env","Application/Initializer","Application/Env","require","exports"],(function(e,t,r,n,o,i,u,s){var c,l,f,a,d,p,g,b,y,O,m,j,v,E,_,w,P,C,M,R,N,h,$,A,U,I,T,L,S,D,k,B,x,H,q,F,V,J;Object.defineProperty(s,"__esModule",{value:!0}),c=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){let n=-1;if(!Array.isArray(e))return n;if(!t)t=e=>!!e;for(let o=0,i=e.length;o<i;o++)if(o in e)if(t.call(r,e[o],o,e)){n=o;break}return n},t}(0,{}),l=c,f=function(e,t){"use strict";function r(e){return e.for}return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n,o){let i=[];for(const u of t)if(Array.isArray(u)){if(i=i.concat(e(u,n,o)),r(u))Object.defineProperty(i,"for",{value:!0,enumerable:!1})}else{if(n&&void 0===u)continue;if(o&&""===u)continue;i.push(u)}return i},t}(0,{}),a=f,d=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!Array.isArray(e))throw new TypeError("Invalid type of the first argument. Array expected.");const t={};return e.reduce(((e,r)=>{if(!t.hasOwnProperty(r))t[r]=!0,e.push(r);return e}),[])},t}(0,{}),p=d,g=function(e,t){"use strict";function r(e){return e&&(e.constructor===Object&&!("$constructor"in e)||e.constructor===Array)}function n(e,t){switch(e){case null:return!t.noOverrideByNull;case void 0:return!t.noOverrideByUndefined;default:return!0}}function o(e,t,o,u,s){if(u.ignoreRegExp&&u.ignoreRegExp.test(o))return;const c=t[o];if("object"==typeof c&&null!==c&&u.clone)if(r(c))e[o]=i(c instanceof Array?[]:{},c,u,o,s);else e[o]=c;else if(n(c,u))e[o]=c}function i(e,t,u,s,c){if(t instanceof Date)if(u.clone)return new Date(t);else return t;if(null!==e&&"object"==typeof e&&null!==t&&"object"==typeof t){if(c.keys.push(null===s?".":s),c.objects.indexOf(t)>-1)throw new Error(`Recursive traversal detected for path "${c.keys.join(" -> ")}" with ${t}`);c.objects.push(t);for(const n in t)if(t.hasOwnProperty(n))if(!u.ignoreRegExp||!u.ignoreRegExp.test(n))if(void 0===e[n]){if
31(u.create)if(null===t[n])e[n]=null;else o(e,t,n,u,c)}else if(!u.preferSource)if(e[n]&&"object"==typeof e[n]&&"object"==typeof t[n]){if(e[n]instanceof Date)if(t[n]instanceof Date){if(u.clone)e[n]=new Date(+t[n]);else e[n]=t[n];continue}else e[n]=t[n]instanceof Array?[]:{};else if(t[n]instanceof Date){if(u.clone)e[n]=new Date(+t[n]);else e[n]=t[n];continue}if(u.rec&&(r(t[n])||null===t[n])&&Object.keys(e[n]).length>0)e[n]=i(e[n],t[n],u,n,c);else e[n]=t[n]}else o(e,t,n,u,c);else if("object"==typeof e[n]&&"object"==typeof t[n]&&u.rec)if(r(t[n])||null===t[n])e[n]=i(e[n],t[n],u,n,c);c.keys.pop(),c.objects.pop()}else if(n(t,u)&&!u.preferSource)e=t;return e}Object.defineProperty(t,"__esModule",{value:!0});const u={preferSource:!1,rec:!0,clone:!1,create:!0,noOverrideByNull:!1,noOverrideByUndefined:!1};return t.default=function(e,t,r){const n=function(e){if(e)return e.clone=u.clone,e.create=u.create,e.noOverrideByNull=u.noOverrideByNull,e;else return u}(r);return i(e,t,n,null,{keys:[],objects:[]})},t}(0,{}),b=g,y=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!r.detection.isIE)return e;let t=e;for(;t&&t.correspondingUseElement;)t=t.correspondingUseElement.parentNode;return t},t}(0,{},n),O=y,m=function(e,t,r){"use strict";function n(){if("undefined"==typeof window||void 0===o)i=r.cookie.get("s3debug"),o="false"!==i&&!!i}let o,i;return Object.defineProperty(t,"__esModule",{value:!0}),t.gets3debug=t.isDebug=void 0,t.isDebug=function(){return n(),o},t.gets3debug=function(){return n(),i},t}(0,{},n),j=m,v=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=/\btw-hidden-important\b/,n=/\b(tw-hidden-important|tw-invisible-important|ws-compatible-popup-hidden)\b/;return t.default=function(e,t=!1){let o;const i=document;let u=!0;const s=t?n:r;if(!((e=e&&e.jquery?e[0]:e)instanceof HTMLElement||e instanceof SVGElement))return!1;if(e.wsControl){if(e.wsControl.isDestroyed())return!1;const t=requirejs("UICore/Base").Control;if(e.wsControl instanceof t)u=u&&(!e.wsControl.isVisible||e.wsControl.isVisible())}for(;e&&e.getAttribute&&(o=e.getAttribute("class"),!o||!s.test(o));){const t=window.getComputedStyle(e);if(t.visibility&&("hidden"===t.visibility||"invisible"===t.visibility))break;if(t.display&&"none"===t.display)break;e=e.parentNode}return u=u&&e===i,u},t}(0,{}),E=v,_=function(e,t,r,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if((0,r.isInit)()){const e=(0,n.getStore)("HeadData");return!1!==(e&&e.get("isNewEnvironment"))}return!1},t}(0,{},o,i),w=_,P=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asyncRenderErrorLog=t.templateError=t.lifeError=t.error=t.warn=t.info=t.debug=t.setDebug=t.prepareStack=t.logger=void 0;const o=()=>r.IoC.resolve("ILogger");t.logger=o;const i={debug:!1},u="undefined"!=typeof document,s=(e=c())=>{let t="";try{t=e.stack.match(/at (\S+)/g)[0].slice(3)}catch(e){t="[not detected]"}return t},c=()=>new Error,l=e=>{if(!e)return"";if("string"==typeof e)return`${e}\n ⱠРкаÑеÑÑво ÑоÑки вÑ
ода бÑла пеÑедана ÑÑÑока, воÑÑÑановление ÑÑека невозможно.`;let t="",r=1;let o=e;if(u&&o instanceof HTMLElement)if(o=(0,n.getClosestControl)(o),!o)return"";if("control"in o)o=o.control;const i={"Controls/event:Register":!0,"Router/router:Route":!0,"UI/_base/HTML/Wait":!0},s=(e,t)=>{if(!(e instanceof Object))return"";let n,o,u="_moduleName"in e?e._moduleName:null,s=t;if("string"==typeof u&&!i[u]){if("Controls/Container/Async"===u){const t=e._options;u+=`:template - "${t&&"templateName"in t&&t.templateName||"not detected"}"`}if(r>20)n=" ",o="â";else n="\n"+((e,t)=>{let r="";for(let n=0;n<e;n++)r+=t;return r})(r," "),o="â±";s+=`${n}${o} ${u}`,r+=1}return s},c=(e,t)=>{do{if(e)t=s(e,t);if(e._logicParent)e=e._logicParent;else if(e.getParent)e=e.getParent();else e=null}while(e);return t};if(u&&o&&o._container){const e=(0,n.goUpByControlTree)(o._container);if(e&&e.length)e.forEach((e=>{t=s(e,t)}));else t=c(o,t)}else t=c(o,t);return t};t.prepareStack=l;t.setDebug=e=>(i.debug=e,i.debug);
31t.debug=(e="",t=null)=>{let r="";if(i.debug){let n="";if(t)try{n=JSON.stringify(t)}catch(e){n=String(t)}finally{n=`\n${n}`}r=`CONTROL DEBUG: ${e} ${n}`,o().log(r)}return{msg:e,logMsg:r}};t.info=(e="")=>{const t=`CONTROL INFO: ${e}`;return o().log(t),{msg:e,data:t}};t.warn=(e="",t)=>{let r=`CONTROL WARNING: ${e}`;if(t)r+="\n"+l(t)+"\n";return o().warn(r),{msg:e,data:r}};const f=(e="",t,n,i)=>{let f="",a=i||"CONTROL ERROR";if(u&&!n)n=c();if(e){if(e.includes("LIFECYCLE")||e.includes("TEMPLATE")){if(a=e.split(":")[0],f=e.replace(`${a}: `,""),t)f+="\n"+l(t)+"\n"}else if(f=e,t){if(t._moduleName)f+=` IN "${t._moduleName}"`;f+="\n"+l(t)+"\n"}}else f="IN "+s(n);if(!u)f+=function(e,t){var r,n;const o="Ðа СеÑвиÑе ÐÑедÑÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ Ð·Ð°Ð¿ÑеÑено делаÑÑ RPCJSON вÑзов";if((null===(r=null==e?void 0:e.message)||void 0===r?void 0:r.includes(o))||(null===(n=null==t?void 0:t.message)||void 0===n?void 0:n.includes(o)))return"\n"+new Error("ÐпÑеделение ÑоÑки вÑÐ²ÐµÐ´ÐµÐ½Ð¸Ñ Ð¾Ñибки в логи").stack+"\n";return""}(t,n);if(n)o().error(a,f,n);else o().error(a,f);if(u&&void 0!==(null===window||void 0===window?void 0:window.wsErrorMonitor)&&!window.wsErrorMonitor.reason&&!r.detection.isIE){const e=n instanceof Error?n:new Error(a),t=new ErrorEvent("JS_ERROR",{error:e,message:`${a},\n info: ${f}\n at: ${(new Date).toLocaleString()}`});window.wsErrorMonitor.onError(t)}return f=`${a}: ${f}`,{msg:e,data:f,errorInfo:n}};t.error=f;t.lifeError=(e="[not detected]",t,r)=>{const n=t?t._moduleName:s();return f(`LIFECYCLE ERROR: IN "${n}". HOOK NAME: "${e}"`,t,r)};t.templateError=(e="",t="[not detected]",r,n)=>f(`TEMPLATE ERROR: ${e} IN "${t}"`,r,n);return t.asyncRenderErrorLog=(e,t)=>{const r="Async function was rejected "+(e?`with message "${e.message||e}"`:"");return f(r,t,e)},t}(0,{},n,e),C=P,M=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n=!1){if(e.hasOwnProperty("$$typeof"))return!1;const o=e.prototype._moduleName;if(!0===n)return!0;if("Controls/compatiblePopup:CompoundArea"===o||"Core/CompoundContainer"===o)return!0;if(!r.constants.compat)return!1;const i=t&&!!t.setActive&&!!t._hasMarkup&&!!t._registerToParent,u=!(!t||"function"!=typeof t.hasCompatible||!t.hasCompatible());return i||u},t}(0,{},n),R=M,N=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=Object.prototype.toString;return t.default=function(e){if(null===e||"object"!=typeof e)return!1;if("[object Object]"===r.call(e)||e instanceof Object)for(const t in e)return!1;return!0},t}(0,{}),h=N,$=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=function(e){if(Object.getPrototypeOf.simulated&&"undefined"!=typeof jQuery)return jQuery.isPlainObject(e);else return!(!e||"[object Object]"!==Object.prototype.toString.call(e)||Object.getPrototypeOf(e)!==Object.prototype)},t}(0,{}),A=$,U=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=Object.getPrototypeOf({});return t.default=function(e){if("object"!=typeof e)return[];const t=[];let n=e;for(;n&&n!==r;)t.push(...Object.keys(n)),n=Object.getPrototypeOf(n);return t},t}(0,{}),I=U,T=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={"<":"<",">":">",'"':"""},n=/&([^#])/g,o=/([<>"])/g;return t.default=function(e){if("string"==typeof e)return(e=e.replace(n,((e,t)=>`&${t}`))).replace(o,(e=>r[e]||e));else return e},t}(0,{}),L=T,S=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return"true"===r.cookie.get("useReact19")},t}(0,{},i),D=S,k=function(e,t,r,n){"use strict";let o;return Object.defineProperty(t,"__esModule",{value:!0}),t.isUnitTestMode=void 0,t.isUnitTestMode=function(){if(!(0,n.isInit)())return!1;if(void 0===o)o=!!(0,r.getConfig)("unitTestMode");return o},t}(0,{},i,o),B=k,x=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.jsEscape=void 0,t.jsEscape=function(e){return String(e).replace(/[^\w. ]/gi,(e=>"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)))},t}(0,{}),H=x,q=function(e,t,r){"use strict";
31return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let t;if(Array.isArray(e))t=e.slice(0);else t=(0,r.default)({},e,{clone:!1,rec:!1});return t},t}(0,{},g),F=q,V=function(e,t,r,n,o){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=!1){const i=t?"false":(0,n.gets3debug)();return(0,r.getResourceUrl)(e,i,!1,o.controller.currentLocaleConfig.directionality,!0)},t}(0,{},t,m,r),J=V,s.isReact19=s.ObjectUtils=s.FunctionUtils=s.getSvgParentNode=s.isElementVisible=s.isNewEnvironment=s.jsEscape=s.gets3debug=s.isDebug=s.isUnitTestMode=s.ArrayUtils=s.needToBeCompatible=s.escapeHtml=s.getResourceUrl=s.Logger=void 0,s.Logger=C,s.isNewEnvironment=w.default,Object.defineProperty(s,"getResourceUrl",{enumerable:!0,get:function(){return J.default}}),Object.defineProperty(s,"escapeHtml",{enumerable:!0,get:function(){return L.default}}),s.isElementVisible=E.default,s.getSvgParentNode=O.default;const G={merge:b.default,shallowClone:F.default};s.FunctionUtils=G;const W={isPlainObject:A.default,isEmpty:h.default,getKeysWithPrototypes:I.default};return s.ObjectUtils=W,Object.defineProperty(s,"needToBeCompatible",{enumerable:!0,get:function(){return R.default}}),s.ArrayUtils={flatten:a.default,findIndex:l.default,uniq:p.default},Object.defineProperty(s,"isUnitTestMode",{enumerable:!0,get:function(){return B.isUnitTestMode}}),Object.defineProperty(s,"isDebug",{enumerable:!0,get:function(){return j.isDebug}}),Object.defineProperty(s,"gets3debug",{enumerable:!0,get:function(){return j.gets3debug}}),Object.defineProperty(s,"jsEscape",{enumerable:!0,get:function(){return H.jsEscape}}),Object.defineProperty(s,"isReact19",{enumerable:!0,get:function(){return D.default}}),s})); 32define("Application/Initializer",["require","exports","Application/Env"],(function(e,t,i){"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0}),t.getReadyPromise=t.registerComponent=t.isInit=t.startRequest=void 0,t.startRequest=i.App.startRequest,t.isInit=i.App.isInit;let r=!1;const o=new Promise((e=>{n=e}));t.default=function(e,o,s){if(!(0,t.isInit)()){if(new i.App(e,o,s),r=!0,n(),"undefined"!=typeof window);}else i.logger.warn(new Error("ÐовÑоÑÐ½Ð°Ñ Ð¸Ð½Ð¸ÑиализаÑÐ¸Ñ Application!\nÐÐµÐ¾Ð±Ñ Ð¾Ð´Ð¸Ð¼Ð¾ вÑпиÑаÑÑ Ð·Ð°Ð´Ð°ÑÑ Ð¾ÑвеÑÑÑÐ²ÐµÐ½Ð½Ð¾Ð¼Ñ Ð·Ð° ÐкÑÑжение (Application), пÑиложиÑÑ ÑÑек вÑзовов в debug Ñежиме:\n").stack)},t.registerComponent=function(e,t){i.App.registerSingleton(e,t)},t.getReadyPromise=function(){if(r)return Promise.resolve();else return o}})); 33define("I18n/i18n",["require","exports","I18n/singletonI18n","i18n!controller?I18n/controller"],(function(e,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.TranslatableString=r.Controller=r.controller=r.Loader=r.Translator=void 0,Object.defineProperty(r,"Translator",{enumerable:!0,get:function(){return n.Translator}}),Object.defineProperty(r,"Loader",{enumerable:!0,get:function(){return n.Loader}}),Object.defineProperty(r,"controller",{enumerable:!0,get:function(){return n.controller}}),Object.defineProperty(r,"Controller",{enumerable:!0,get:function(){return n.Controller}}),Object.defineProperty(r,"TranslatableString",{enumerable:!0,get:function(){return n.TranslatableString}})})); 34define("I18n/singletonI18n",["RequireJsLoader/conduct","Env/Env","Application/Initializer","Application/Env","require","exports","Env/Constants"],(function(e,t,s,i,r,n,o){var a,l,u,c,h,g,d,f,y,p;Object.defineProperty(n,"__esModule",{value:!0}),a=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e){this.availableContexts=e,this.history={contexts:{},contents:{},languages:{},regions:{}}}load(t){return new Promise(((s,i)=>{e([t],s,i)}))}region(e,t=this.load){return this.history.regions[e]=`LocalizationConfigs/localization_configs/region/${e}.json`,t(this.history.regions[e])}async language(e,t=this.load){return this.history.languages[e]=`I18n/locales/${e}`,(await t(this.history.languages[e])).default}
34async context(e,t,s){if(this.availableContexts.hasOwnProperty(e)){const i=await this.getRequiredResources(e,t,s),r=[],n=[],o={};for(const t of i.dictionary)r.push(this.dictionary(e,t));for(const t of i.css)n.push(this.style(e,t));const[a]=await Promise.all([Promise.all(r),Promise.all(n)]);for(const[e,t]of a)o[e]=t||{};return o}else return{}}async dictionary(e,t,s=this.load){const i=t.split("-")[0],r=`${this.normalizeContextName(e)}/lang/${i}/${t}.json`;return this.addContextInHistory(r,e,i,"dictionary"),[i,await s(r)]}style(e,t,s=this.load){const i=`${this.normalizeContextName(e)}/lang/${t}/${t}`;return this.addContextInHistory(i,e,t,"style"),s(`css!${i}`)}contents(e,t=this.load){return this.history.contents[e]=`${e}/contents.json`,t(this.history.contents[e])}addContextInHistory(e,t,s,i){if(!this.history.contexts[t])this.history.contexts[t]={};if(!this.history.contexts[t][s])this.history.contexts[t][s]={};this.history.contexts[t][s][i]=e}normalizeContextName(e){if("WS.Deprecated"===e)return"Deprecated";else return e}async getRequiredResources(e,t,s){const i=await this.getAvailableResource(e),r={dictionary:[],css:[]};for(const e of t){const t=`${e}-${s}`;if(!i.includes(t)){if(i.includes(e))r.dictionary.push(e);if(i.includes(`${e}.css`))r.css.push(e)}else r.dictionary.push(t)}return r}async getAvailableResource(e){const t=this.availableContexts[e];if(t){if(t.path){const t=(await this.contents(e)).modules[e];if(null==t?void 0:t.dict)return t.dict}if(t.dict)return t.dict}return[]}},t}(r,{}),l=a,u=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e,t,s){this.code=e,this.directionality=t.directionality,this.date=t.dateTimeFormat||s.DateTimeFormats,this.ecosystem=s.Ecosystem,this.number=s.NumberFormat,this.socialNetworks=s.SocialNetworks,this.money={symbol:s.Money.symbol,charCode:s.Money.charCode,currentCurrencyUnitDenominations:s.Money.currencyDenominations,currency:t.moneyEntities.currency[s.Money.currency],shortCurrency:t.moneyEntities.shortCurrency[s.Money.shortCurrency],superShortCurrency:t.moneyEntities.superShortCurrency[s.Money.superShortCurrency],subunit:t.moneyEntities.subunit[s.Money.subunit],currentCurrencySubunitDenominations:s.Money.subunitDenominations,shortSubunit:t.moneyEntities.shortSubunit[s.Money.shortSubunit],superShortSubunit:t.moneyEntities.superShortSubunit[s.Money.superShortSubunit]},this.moneyEntities=t.moneyEntities,this.calendarEntities=t.calendarEntities,this.timeInterval=t.timeInterval,this.plural=t.plural}},t}(0,{}),c=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e,t,s){this.loader=t,this.postLoad=s,this.elements={};for(const t of e)this.set(t)}get(e){if(this.elements.hasOwnProperty(e))return Promise.resolve(this.elements[e]);else return this.loader(e).then((t=>(this.elements[e]=t,this.postLoad(),t)))}set(e,t){if(t)return this.elements[e]=t,void this.postLoad();this.loader(e).then((t=>{this.elements[e]=t,this.postLoad()}))}},t}(0,{}),h=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class extends String{constructor(e,t){super(),this.value=e,this.translate=t,this.i18n=!0}toString(){return this.translatedValue}toJSON(){return this.translatedValue}valueOf(){return this.translatedValue}get length(){return this.translatedValue.length}get translatedValue(){const e=this.translate();return String(void 0!==e?e:this.value)}static getNativeString(e){const t=new String(e);return t.toJSON=t.valueOf=()=>e,t.i18n=!0,t}},t}(0,{}),g=h,d=function(e,t,s,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e,t){this.dictionaries=e,this.controller=t}translate(e,t,r,n){if("string"==typeof e){let o=t,a=r;if("number"==typeof t)a=o,o=void 0;if(!this.controller.isEnabled)return s.default.isServerSide?i.default.getNativeString(e):e;if(s.default.isServerSide)return new i.default(e,(()=>this.translateKey(e,o,a,n)));else return this.translateKey(e,o,a,n)}return e}setDictionaries(e){this.dictionaries=e}translateKey(e,t,s,i){const r=this.controller.currentLocaleConfig,n=this.controller.currentLang;let o,a="";if(this.dictionaries.hasOwnProperty(n)){if(i)a="template#";if(void 0!==s){const i=this.getTranslatedKey("plural#"+a+e,n,t);if(i)o=this._translatePlural(i,s,r)}else o=this.getTranslatedKey(a+e,n,t)}return void 0===o?e:o}getTranslatedKey(e,t,s){const i=s?`${s}@@${e}`:`${e}`;return this.dictionaries[t][i]}_translatePlural(e,t,s){return s.plural(Math.abs(t),...e.split("|"))}},t}(0,{},o,h),f=d,y=function(e,t,s,i,r,n,o,a,l,u,c){"use strict";
34Object.defineProperty(t,"__esModule",{value:!0});const h={en:"en-US",fr:"fr-FR",he:"he-IL",ar:"ar-AE",ru:"ru-RU",uz:"uz-UZ",kk:"kk-KZ",tk:"tk-TM",zh:"zh-RU",el:"el-RU",es:"es-RU"},g={RU:"ru",KZ:"kk",UZ:"uz",TM:"tk",FR:"fr",US:"en",GB:"en",AE:"ar",IL:"he"};class d{constructor(e){this.availableLocales=[],this.translators={},this.ready=!1,this.defaultLanguage=e.defaultLanguage||"ru",this.availableLanguages=e.availableLanguages||[],this.availableRegions=e.availableRegions||["RU"],this.availableContexts=e.availableContexts||{},this.localesStore={},this.loader=e.loader||new a.default(this.availableContexts),this.initStores()}get requiredLanguages(){if(!this.isEnabled)return[this.defaultLanguage];else return s.default.isServerSide?this.availableLanguages:[this.currentLang]}get requiredRegions(){return s.default.isServerSide?this.availableRegions:[this.currentCountry]}get currentLocale(){return h[this.currentLang]}get currentLocaleNew(){return`${this.currentLang}-${this.currentCountry}`}get currentLang(){if(!this.isEnabled)return this.defaultLanguage;if(s.default.isBrowserPlatform){if(!this.currentLanguageCode)this.currentLanguageCode=this._calculateLanguageCode();return this.currentLanguageCode}else return this._calculateLanguageCode()}get currentCountry(){if(s.default.isBrowserPlatform){if(!this.currentRegionCode)this.currentRegionCode=this._calculateRegion();return this.currentRegionCode}return this._calculateRegion()}get loadingsHistory(){return this.loader.history}get currentLocaleConfig(){return this.localesStore[this.currentLocaleNew]||this._getAvailableConfig()}getCurrentLocaleConfig(){return this.isReady().then((()=>this.currentLocaleConfig))}get isEnabled(){return 0!==this.availableLanguages.length}get stateLanguage(){return g[this.currentCountry]}setLang(e,t=365){const s=this._normalizeCode(e),i=d.getCookie("lang");if(this._isSupportedLang(s)&&i!==s)d.setCookie("lang",s,t)}isSupportedLang(e){return this._isSupportedLang(this._normalizeCode(e))}setLocale(e,t=365){this.setLang(e.split("-")[0],t)}isSupportedLocale(e){return this.isSupportedLang(e)}async isReady(){if(!this.ready){const e=[],t=[];for(const t of this.requiredLanguages)e.push(this.languagesStore.get(t));for(const e of this.requiredRegions)t.push(this.regionStore.get(e));const[s,i]=await Promise.all([Promise.all(e),Promise.all(t)]);this._synchronizeLocales(s,i),this.ready=!0}return!0}getTranslatorSync(e){if(this.translators[e])return this.translators[e];else return this.translators[e]=new u.default({},this),this._getContext(e).then((t=>{this.translators[e].setDictionaries(t)})),this.translators[e]}getTranslator(e){if(this.translators[e])return Promise.resolve(this.translators[e]);else return this._getContext(e).then((t=>(this.translators[e]=new u.default(t,this),this.translators[e])))}addContext(e,t){this.contextStore.set(e,t)}addLang(e,t,s=!0){if(!this.availableLanguages.includes(e)&&s)this.availableLanguages.push(e);if(this.languagesStore.set(e,t),t)this.loader.history.languages[e]=`I18n/locales/${e}`}addRegion(e,t,s=!0){if(!this.availableRegions.includes(e)&&s)this.availableRegions.push(e);if(this.regionStore.set(e,t),t)this.loader.history.regions[e]=`LocalizationConfigs/localization_configs/region/${e}.json`}getImageUrl(e,t,s){if(s)return(0,o.getResourceUrl)(`/cdn/${e}/${s}/lang/${this.currentLang}/images/${t}`);else return(0,o.getModuleUrl)(`${e}/lang/${this.currentLang}/images/${t}`)}initStores(){this.contextStore=new l.default([],(e=>this.loader.context(e,this.requiredLanguages,this.currentCountry)),(()=>{})),this.languagesStore=new l.default(s.default.isServerSide?[]:this.requiredLanguages,(e=>this.loader.language(e)),(()=>{this._synchronizeLocales()})),this.regionStore=new l.default(s.default.isServerSide?[]:this.requiredRegions,(e=>this.loader.region(e)),(()=>{this._synchronizeLocales()}))}_getContext(e){return new Promise(((t,s)=>{let i;if(this.isEnabled)this.contextStore.set(e),i=this.contextStore.get(e);else i=Promise.resolve({});Promise.all([i,this.isReady()]).then((([e])=>{if(e)t(e)})).catch(s)}))}_getAvailableConfig(){var e;if(null===(e=globalThis.wsConfig)||void 0===e?void 0:e.IS_BUILDER)if(this.localesStore["ru-RU"])return this.localesStore["ru-RU"];else return Object.values(this.localesStore)[0]||{}}_getHost(){if(s.default.isServerSide)return(0,n.isInit)()?r.location.hostname:void 0;else return location.host}_calculateRegion(){var e;const t=d.getCookie("region");if(t&&this.availableRegions.includes(t))return t;const s=this._getHost();if(s){const t=null===(e=s.split(".").pop())||void 0===e?void 0:e.toUpperCase();if(this.availableRegions.includes(t))return t}return"RU"}_calculateLanguageCode(){const e=d.getQueryLang();if(this._isSupportedLang(e))return e;const t=d.getCookie("lang");if(this._isSupportedLang(t))return t;const s=this._normalizeCode(t);if(this._isSupportedLang(s))return this.setLang(s),s;const i=this._detectCodeFromAcceptLanguage(d.getAcceptLanguage());if(i)return this.setLang(i),i;else return this.defaultLanguage}_detectCodeFromAcceptLanguage(e){if(0!==this.availableLanguages.length)for(const t of e){let e=t.split(";")[0];if(d.isLocaleCode(e))e=e.split("-")[0];if(this._isSupportedLang(e))return e}}_isSupportedLang(e){return"string"==typeof e&&d.isLangCode(e)&&this.availableLanguages.includes(e)}_normalizeCode(e){if("string"==typeof e){if(d.isLangCode(e))return e;if(d.isLocaleCode(e))return e.split("-")[0]}}_synchronizeLocales(e=Object.values(this.languagesStore.elements),t=Object.values(this.regionStore.elements)){for(const s of t)if(s)for(const t of e){if(!t)continue;const e=`${t.code}
34-${s.code}`;if(!this.localesStore.hasOwnProperty(e))this.localesStore[e]=new c.default(e,t,s)}}static getQueryLang(){if(s.default.isServerSide)return(0,n.isInit)()?r.query.get.lang:void 0;return location.search.slice(1).split("&").reduce(((e,t)=>{const[s,i]=t.split("=");return e[s]=i,e}),{}).lang}static setCookie(e,t,s=365){var r,n;if(i.cookie.set(e,t,{expires:s,path:"/"}),"object"==typeof process&&(null===(n=null===(r=null===process||void 0===process?void 0:process.domain)||void 0===r?void 0:r.req)||void 0===n?void 0:n.cookies))process.domain.req.cookies[e]=t}static getCookie(e){return i.cookie.get(e)}static removeCookie(e){i.cookie.set(e,null,{path:"/"})}static getAcceptLanguage(e){var t;const s=e||"object"==typeof process&&(null===(t=null===process||void 0===process?void 0:process.domain)||void 0===t?void 0:t.req),i=s&&s.headers&&s.headers["accept-language"];return i?i.split(","):[]}static isLangCode(e){return 2===e.length}static isLocaleCode(e){return 5===e.length}}return t.default=d,t}(0,{},o,t,i,s,e,a,c,d,u),p=y,n.Controller=n.controller=n.Translator=n.TranslatableString=n.Loader=void 0,Object.defineProperty(n,"Loader",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(n,"TranslatableString",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(n,"Translator",{enumerable:!0,get:function(){return f.default}}),n.Controller=p.default;const v=new p.default(function(){var e;let t="ru";const s=globalThis.contents;if(s){const i=function(e={}){const t=[];for(const s of Object.keys(e))if(p.default.isLangCode(s))t.push(s);return t}(s.availableLanguage);if(t=(null===(e=s.defaultLanguage)||void 0===e?void 0:e.split("-")[0])||t,o.default.isBrowserPlatform)!function(e=[],t){if(e.length<2)p.default.setCookie("lang_ignore","bl"),p.default.setCookie("lang",t);else if("bl"===p.default.getCookie("lang_ignore"))p.default.removeCookie("lang_ignore")}(i,t);return{availableRegions:["RU","KZ","UZ","TM"],availableLanguages:i,defaultLanguage:t,availableContexts:s.modules}}return{defaultLanguage:t}}());return n.controller=v,n})); 35define("RequireJsLoader/conduct",["require","exports"],(function(e,t){var o,n,r,s,i,u,l,d,c,a;return Object.defineProperty(t,"__esModule",{value:!0}),o=function(e,t){"use strict";function o(e){var t,o;if(e)return"";if(n||!r){const e=globalThis;let n="";if(Array.isArray(e.wsConfig.staticDomains))n=e.wsConfig.staticDomains[0];else n=null===(o=null===(t=e.wsConfig.staticDomains)||void 0===t?void 0:t.domains)||void 0===o?void 0:o[0];r=n?`//${n}`:""}return r}Object.defineProperty(t,"__esModule",{value:!0});const n=void 0===typeof window;let r="";const s=new Set(["contents.js","router.js","contents","router"]);return t.default=function(e,t,n,r,i){if(!e)return e;const u=globalThis;if(u.requirejs.isNewRequire){const t=u.wsConfig.cdnRoot||"/cdn/";if(e.includes("//")||e.includes("?")||e.includes("#"))return e;if(e.startsWith(t)&&"/cdn/"!==t)return`${o(n)}${e}`;if(!e.includes("."))return`${o(n)}${e}`;const r=function(e){var t;const o=globalThis,n=o.requirejs.instance,r=o.wsConfig.resourceRoot||"/resources/",i=n.getDefineName(e.startsWith(r)?e.replace(r,""):e),u=n.getModulePath(i),l=n.getRootDir(u),d=u.split(".").pop();if("cdn"===l)return n.buildUrl(u.replace(`.${d}`,""),d);if(n.modules.hasOwnProperty(l)){const e=u.replace(".min.",".").replace(`.${d}`,"");return n.buildUrl(e,d)}if(s.has(i))return n.buildUrl(u.replace(`.${d}`,""),d);const c=null===(t=null==o?void 0:o.contents)||void 0===t?void 0:t.buildnumber;return`${e}${c?`?x_module=${c}`:""}`}(e);if(n&&r.includes("//"))return r.replace(/^\/\/[^\/]+/,"");else return r}const{handlers:l}=requirejs("RequireJsLoader/config");return l.getWithDomain(l.getWithSuffix(l.getWithVersion(l.getWithResourceRoot(e),i),t,r),t,n)},t}(0,{}),n=o,r=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!e.defined)return!1;let o;if("s"in e){o=e.s.contexts._.defined[t]}else{if(!e.defined(t))return!1;o=e(t)}if(0===t.indexOf("css!")&&""===o)return!0;else return!!o&&("object"!=typeof o||Object.keys(o).length>0)},t}(0,{}),s=r,i=function(e,t){"use strict";function o(e,t,o,n=""){e.undef(t),o.log("RequireJsLoader/extras:undefineAncestors->undefine()",`Module "${t}" has been undefined.`+(n?`Reason: ${n}`:""))}function n(e,t){const o=t.registry;return Object.keys(o).filter((t=>{const n=o[t].depMaps;return n&&n.some((t=>"string"!=typeof t&&t.id===e))}))}
35return Object.defineProperty(t,"__esModule",{value:!0}),t.undefine=void 0,t.undefine=o,t.default=function e(t,r,s,i,u){for(const l of function(e){if(e.startsWith("_"))return[e];const[t,...o]=e.split("!").reverse();let n=!1,r="",s="";for(const e of o)if(e.endsWith("optional"))r+="optional!",n=!0;else s+=`${e}!`,r+=`${e}!`;if(s+=t,r+=t,n)return[s,r,r.replace("optional!","RequireJsLoader/plugins/optional!")];else return[s,`optional!${s}`,`RequireJsLoader/plugins/optional!${s}`]}(t))if(!s.has(l))s.add(l),n(l,r).forEach((t=>{e(t,r,s,i,u.toString())})),o(r.require,l,i,u.toString())},t}(0,{}),u=i,l=function(e,t,o,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=globalThis,s=/^(?:\w+!(?:\w+\?)?)?([\w.-]+)(?:\/|$)/,i=["Core","Lib","Ext","Helpers","Transport","WS","Deprecated","router","pages-info","navx-towarmup-info","wasaby-routes","routes-info","react","react-dom","react-test-renderer"];return t.default=class{constructor(e={}){this._moduleLoadCallbacks=[],this.cache={},this._loader=e.loader||requirejs}isLoaded(e){return(0,n.default)(this._loader,e.replace("optional!",""))}loadModule(e){if(this.cache[e])return Promise.resolve(this.cache[e]);else return new Promise(((t,o)=>{this._loader([e],((...o)=>{this.cache[e]=o[0],t(o[0])}),(t=>{this._loader.undef(e),o(t)}))}))}load(e){const t=[];for(const o of e)t.push(this.loadModule(o));return Promise.all(t)}unload(e){return new Promise(((t,o)=>{try{e.forEach((e=>this.unloadSync(e))),t()}catch(e){o(e)}}))}loadSync(e){const t=e.replace("optional!","");if(!this.cache[t])this.cache[t]=this._loader(t);return this.cache[t]}unloadSync(e){if(delete this.cache[e],this._loader.isNewRequire)return void this._loader.undef(e);const t=this._loader.s.contexts._,n=new Set;(0,o.default)(e,t,n,console,`Called unloadSync for module ${e}`)}onModuleLoaded(e){this._moduleLoadCallbacks.push(e),this._setModuleLoadHook()}offModuleLoaded(e){if(this._moduleLoadCallbacks=this._moduleLoadCallbacks.filter((t=>t!==e)),0===this._moduleLoadCallbacks.length)this._unsetModuleLoadHook()}_setModuleLoadHook(){if(this._onModuleLoad)return;const e=this._loader.onResourceLoad;this._loader.onResourceLoad=(t,o,n)=>{const r=o.id,s=t.defined[r];if(this._moduleLoadCallbacks.forEach((e=>{const o=e(r,s);if(void 0!==o){t.defined[r]=o;const e=t.registry[r];if(e)e.exports=o}})),e)e(t,o,n)},this._onModuleLoad=[e]}_unsetModuleLoadHook(){if(this._onModuleLoad)this._loader.onResourceLoad=this._onModuleLoad[0],this._onModuleLoad=null}static isModule(e){if(r.contents&&r.contents.modules){const t=e.match(s);if(t){const e=t[1];return r.contents.modules.hasOwnProperty(e)||i.includes(e)}return!1}return!0}},t}(0,{},i,r),d=l,c=function(e,t,o){"use strict";function n(e,t){const o=e.split(/[!?]/);let n=o.pop()||"";const l=n.split("/"),d=1===l.length&&r.has(n),c=s.test(n);let a="";if(o.length>0)if(o[0].includes("."))n=o[0];else a=`.${o[0]}`;else{const e=(l.pop()||"").split(".");if(1===e.length||!u.includes(e.pop()||""))a=".js"}if(c){if(!i.includes(o[0]))a=".js";if(n.endsWith(a))a=""}if("css"===o.join(",")&&!c)if("rtl"===(t||function(){var e;if("object"==typeof document)return null===(e=document.body)||void 0===e?void 0:e.dir;else return""}())&&-1===n.indexOf(".rtl"))n+=".rtl";return{plugin:o.join(","),basename:n,extension:a,isRootModule:d}}Object.defineProperty(t,"__esModule",{value:!0});const r=new Set(["contents","router"]),s=/^\/(cdn|rtpack|demo_src)\//,i=["css","js"],u=["svg","js","png","jpg","css","woff2","webp"];return t.default=function(e,t=requirejs,r,s,i,l){var d;const c=globalThis;if(c.requirejs.isNewRequire){if(e.includes("//")||e.includes("?x_module")||e.includes("#"))return e;const t=c.requirejs.instance,o=t.getDefineName(e),n=t.getModulePath(o),r=t.getLoaderName(o),s=e.split(".").pop();if(u.includes(s))return t.buildUrl(n.replace(`.${s}`,""),s);else return t.buildUrl(n,r)}const a=n(e,i),f=c.wsConfig||{};let h=t.toUrl(a.basename+a.extension);if(f.IS_BUILDER&&f.APP_PATH){if(h=h.substr(f.APP_PATH.length),h&&h.startsWith("/"))h=h.substr(1);h=`${f.RESOURCES_PATH}${h}`}if(f.IS_SERVER_SCRIPT&&"string"==typeof f.APP_PATH&&!h.startsWith("//")&&h.startsWith(f.APP_PATH)){h=h.substr(f.APP_PATH.length);const e=h.indexOf("?x_module");if(-1!==e)h=h.substr(0,e);if(h&&h.startsWith("/"))h=h.substr(1);if(h&&"/"!==f.resourceRoot&&(null===(d=f.resourceRoot)||void 0===d?void 0:d.startsWith("/"))){const e=function(e,t){if(t.metaRoot&&"/"!==t.metaRoot&&t.metaRoot.startsWith("/")&&e.isRootModule)return t.metaRoot.replace("resources/","");if(t.resourceRoot)return t.resourceRoot.replace("resources/","");else return""}(a,f);h=`${e}${h}`}if(h&&"/"!==h[0])h=`/${h}`}return(0,o.default)(h,r,s,i,l)},t}(0,{},o),a=c,t.undefineModule=t.undefineAncestors=t.isModuleDefined=t.ModulesManager=t.getModuleUrl=t.getResourceUrl=void 0,Object.defineProperty(t,"getResourceUrl",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"getModuleUrl",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"ModulesManager",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"isModuleDefined",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"undefineAncestors",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"undefineModule",{enumerable:!0,get:function(){return u.undefine}}),t})); 36define("UICommon/NodeCollector",["Application/Env","require","exports"],(function(e,o,n){var t,r,l,s,i,c;return Object.defineProperty(n,"__esModule",{value:!0}),t=function(e,o){"use strict";return Object.defineProperty(o,"__esModule",{value:!0}),o.focusParentRefName=o.focusCallbacksObjectsSetName=void 0,o.focusCallbacksObjectsSetName="focus-callbacks-objects",o.focusParentRefName="focus-parent-ref",o}(0,{}),r=t,l=function(e,o){"use strict";function n(e){var o;if(!t)return;let n=(null==e?void 0:e.jquery)?e[0]:e;for(;n&&n!==document.documentElement&&n!==document.body;){if(n._$controls&&n._$controls.length)return n._$controls[0].control;if(n.wsControl&&(null===(o=n.wsControl._container)||void 0===o?void 0:o[0])===n)return n.wsControl;n=n.parentNode}}Object.defineProperty(o,"__esModule",{value:!0}),o.getClosestControlInner=o.getClosestControl=void 0;const t="undefined"!=typeof document;return o.getClosestControl=function(e){return n(e)},o.getClosestControlInner=n,o}(0,{}),s=l,i=function(e,o,n,t,r){"use strict";function l(e,o,n=!1){const t=o||[],l=(0,r.getClosestControlInner)(e);if(!n)if(!l)return t;else return s(l,t,!0),f.clear(),t;if(!l)return u(e,document.body,t),f.clear(),t;if(u(e,a(l),t))return f.clear(),t;const i=[];s(l,i,!1);const c=i.filter((e=>!!e._container));for(let e=0;e<c.length;e++){const o=c[e];if(!o.isFocusActivator)t.push(o);if(u(a(o),c[e+1]?a(c[e+1]):document.body,t))return f.clear(),t}return f.clear(),t}function s(e,o,n){if(f.has(e)){const n=[];for(let t=o.indexOf(e);t<o.length;t++)n.push(o[t]._moduleName);n.push(e._moduleName);const t="ÐодÑÑм по деÑÐµÐ²Ñ ÐºÐ¾Ð½ÑÑолов заÑиклилÑÑ. ÐозможнÑе пÑиÑинÑ:\n1. ÐнÑÑÑи ÑиÐ
36ºÐ»Ð° еÑÑÑ ÑиÑÑÑй ÑÐµÐ°ÐºÑ Ð² коÑне ваÑаби, коÑоÑÑй не пÑокинÑл ref.\n2. ÐпеÑеÑом Ñказан конÑÑол, Ð½Ð°Ñ Ð¾Ð´ÑÑийÑÑ Ð² поддеÑеве Ñого, Ð´Ð»Ñ ÐºÐ¾Ð³Ð¾ он опенеÑ.\n"+n.join(" -> "),r=requirejs.defined("UICommon/Utils")&&requirejs("UICommon/Utils");return void(null==r||r.Logger.error(t))}f.add(e),o.push(e);let t=i(e);if(n)for(;null==t?void 0:t.isFocusActivator;)t=i(t);if(function(e){let o;if(e)if(e&&!(e._options||e.props||e.isFocusActivator)){const n=e.getName?e.getName():"[not detected]";o=`Control ${e._moduleName} with name ${n} must have _options`}if(o){const n=`[UICore/_nodeCollector/goUpByControlTree:checkOpener] DOMEnvironment - Incorrect opener or parent is found! It seems that anybody set wrong opener option! ${o}`,t=requirejs.defined("UICommon/Utils")&&requirejs("UICommon/Utils");null==t||t.Logger.error(n,e)}}(t),t)s(t,o,n)}function i(e){var o,n;const t=null==e?void 0:e._options;let l=(null==t?void 0:t.opener)||(null==t?void 0:t._physicParent)||(null===(o=null==e?void 0:e.getOpener)||void 0===o?void 0:o.call(e))||(null==t?void 0:t.parent)||(null===(n=null==e?void 0:e.getParent)||void 0===n?void 0:n.call(e));if(!l&&c(e)){const o=a(e);l=null==o?void 0:o.parentNode}if(l instanceof HTMLElement)l=(0,r.getClosestControlInner)(l);if(c(l))return l;else return null}function c(e){if(!e)return!1;else return!(e._destroyed||e._isDestroyed||!e._container&&null!==e._container)}function u(e,o,t){var r;if(e&&o&&e!==o&&o.contains(e))for(let s=e;s!==o;s=s.parentNode){const e=s[n.focusCallbacksObjectsSetName];if(e)e.forEach((e=>{if(!f.has(e))f.add(e),t.push(e)}));const o=null===(r=s[n.focusParentRefName])||void 0===r?void 0:r.current;if(o)return f.clear(),l(o,t,!0),1}}function a(e){const o=e._container;if(o){if(o.jquery)return o[0];if("function"==typeof o.contains)return o;else{const n='Рполе _container конÑÑола Ð»ÐµÐ¶Ð¸Ñ Ð½Ðµ HTMLElement. СкоÑее вÑего, в коÑне конÑÑола Ð»ÐµÐ¶Ð¸Ñ React.forwardRef, коÑоÑÑй пеÑедал ref из вÑоÑого аÑгÑменÑа на клаÑÑовÑй компоненÑ. ÐÑÐ¾Ñ ref должен ÑÑÑлаÑÑÑÑ Ð½Ð° коÑневой HTMLElement. ÐодÑобнее в главе "ÐÑоÑбÑÐ¾Ñ ref" ÑÑаÑÑи https://online.sbis.ru/page/knowledge-bases/wasaby?article=ae49631c-1a0e-4908-90a2-cea13b7a78e1';t.logger.error(n,"ÐонÑÑол Ñ Ð¾ÑибоÑнÑм конÑейнеÑом:",e,"ÐмеÑÑо HTMLElement в конÑейнеÑе Ð½Ð°Ñ Ð¾Ð´Ð¸ÑÑÑ:",o)}}}Object.defineProperty(o,"__esModule",{value:!0}),o.goUpByControlTreeInner=o.goUpByControlTree=void 0;const f=new Set;return o.goUpByControlTree=function(e,o,n=!1){return l(e,o,n)},o.goUpByControlTreeInner=l,o}(0,{},t,e,l),c=i,n.goUpByControlTree=n.getClosestControl=n.focusCallbacksObjectsSetName=void 0,Object.defineProperty(n,"focusCallbacksObjectsSetName",{enumerable:!0,get:function(){return r.focusCallbacksObjectsSetName}}),Object.defineProperty(n,"getClosestControl",{enumerable:!0,get:function(){return s.getClosestControl}}),Object.defineProperty(n,"goUpByControlTree",{enumerable:!0,get:function(){return c.goUpByControlTree}}),n})); 37define("WasabyLoader/ModulesLoader",["require","exports","RequireJsLoader/conduct","WasabyLoader/Library"],(function(e,r,n,o){"use strict";function i(){if(!d)d=new n.ModulesManager(requirejs);return d}function u(e,r){const n=(0,o.extract)(e,r);if(n instanceof Error)throw new Error(n.message);return n}async function t(e,r,t){if(!e||"string"!=typeof e){const e=new Error("Module name must be string and not empty");throw null==t||t(e),e}if(!e.startsWith("optional!")&&!n.ModulesManager.isModule(e)){const r=new Error(`UI module ${e} not found in contents.json`);throw null==t||t(r),r}if(null===requirejs||void 0===requirejs?void 0:requirejs.isNewRequire)try{let n;const o=e.includes(":")?e:`${e}:default`;if(s)n=requirejs(o),null==r||r(n);else n=await new Promise(((e,n)=>{requirejs([o],(n=>{null==r||r(n),e(n)}),(e=>{n(e)}))}));return n}catch(e){throw null==t||t(e),e}if(a[e])return null==r||r(a[e]),a[e];const d=(0,o.parse)(e),l=i();if(l.isLoaded(e))return a[e]=u(l.loadSync(e),d),null==r||r(a[e]),a[e];const c=(new Error).stack;try{const n=await l.loadModule(d.name);return a[e]=u(n,d),null==r||r(a[e]),a[e]}catch(e){if(e instanceof Error){const r=`"loadAsync" function call stack: ${c}`;e.message=`${e.message}\n ${r}\n Original error stack:`}throw null==t||t(e),e}}
37Object.defineProperty(r,"__esModule",{value:!0}),r.clearCache=r.unloadSync=r.loadSync=r.loadAsync=r.addToWarmup=r.initWarmup=r.getModuleUrl=r.isLoaded=r.offModuleLoaded=r.onModuleLoaded=void 0;const s="undefined"==typeof window;let d,a={};const l=new Set([]);r.onModuleLoaded=function(e){if(null===requirejs||void 0===requirejs?void 0:requirejs.isNewRequire)requirejs.instance.onLoadModule(e);else i().onModuleLoaded(e)},r.offModuleLoaded=function(e){if(null===requirejs||void 0===requirejs?void 0:requirejs.isNewRequire)requirejs.instance.offLoadModule(e);else if(d)i().offModuleLoaded(e)},r.isLoaded=function(e){if(null===requirejs||void 0===requirejs?void 0:requirejs.isNewRequire)return requirejs.defined(e);const r=(0,o.parse)(e);return i().isLoaded(r.name)},r.getModuleUrl=function(e,r,i,u){const t=(0,o.parse)(e);return(0,n.getModuleUrl)(t.name,void 0,r,void 0,i,u)},r.initWarmup=async function(){return new Promise(((e,r)=>{const n=function(){if("object"==typeof document){const e=String(document.cookie).match(/s3WarmupTimeout=([^;]+)[;]?/);if(e)return Number(e[1])}return 2e3}();setTimeout((async()=>{const n=[],o=[];[...l].forEach((e=>{n.push(t(e))})),l.clear(),Promise.allSettled(n).then((n=>{if(n.forEach((e=>{if("rejected"===e.status)o.push(e.reason)})),o.length>0)r(`Ðо вÑÐµÐ¼Ñ Ð¿ÑогÑева некоÑоÑÑе модÑли не Ñмогли загÑÑзиÑÑÑÑ:\n${o.join("\n------------------------\n")}`);else e()}))}),n)}))},r.addToWarmup=function(e){if(e instanceof Array)e.forEach((e=>l.add(e)));if("string"==typeof e)l.add(e)},r.loadAsync=t,r.loadSync=function(e){if(null===requirejs||void 0===requirejs?void 0:requirejs.isNewRequire){return requirejs(e.includes(":")?e:`${e}:default`)}if(!a[e]){if(!n.ModulesManager.isModule(e))throw new Error(`UI module ${e} not found in contents.json`);const r=(0,o.parse)(e);a[e]=u(i().loadSync(r.name),r)}return a[e]},r.unloadSync=function(e){if(null===requirejs||void 0===requirejs?void 0:requirejs.isNewRequire)requirejs.undef(e);else{const r=(0,o.parse)(e);delete a[e],i().unloadSync(r.name)}},r.clearCache=function(){a={}}})); 38define("WasabyLoader/Library",["require","exports"],(function(e,t){"use strict";function n(e){if((t=e)&&"object"==typeof t)return Object.keys(e).filter((e=>!e.includes("/")));else return e;var t}function r(e){return!!e&&o.includes(typeof e)}Object.defineProperty(t,"__esModule",{value:!0}),t.parse=t.extract=t.load=void 0;const o=["object","function"];t.load=function(t){return new Promise(((t,n)=>{e(["WasabyLoader/ModulesLoader"],t,n)})).then((({loadAsync:e})=>e(t))).catch((function(e){requirejs.onError(e)}))},t.extract=function(e,t){let o=e;if(t.path.length){const e=[];for(let i=0;i<t.path.length;i++){const a=t.path[i];if(e.push(a),r(o)&&a in o){o=o[a];continue}const u=`Available export names: ${n(o)}`,c=`Cannot find module "${e.join(".")}" in library "${t.name}".`;return new ReferenceError(`${c} ${u}`)}}else if(o&&o.__esModule&&o.default)o=o.default;return o},t.parse=function(e){const t=String(e||"").split(":",2);return{name:t[0],path:t[1]?t[1].split("."):[]}}})); 39define("SbisUI/Wasaby",["require","exports","Env/Env"],(function(e,n,s){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.assign(s.constants,window.wsConfig,window.contents)})); 40define('Controls/packageMap.json',[],function() { return {"Controls/Application":"Controls/controls-superbundle.package.min.js","Controls/Application/ApplicationReact":"Controls/controls-superbundle.package.min.js","Controls/Application/BodyClasses":"Controls/controls-superbundle.package.min.js","Controls/Application/Interfaces":"Controls/controls-superbundle.package.min.js","Controls/Application/ScrollOnRotateHack":"Controls/controls-superbundle.package.min.js","Controls/Application/SettingsController":"Controls/controls-superbundle.package.min.js","Controls/Application/Utils":"Controls/controls-superbundle.package.min.js","Controls/Application/VisualViewportFix":"Controls/controls-superbundle.package.min.js","Controls/Application/withBodyClasses":"Controls/controls-superbundle.package.min.js","Controls/Application/withLoadingContextProvider":"Controls/control
40s-superbundle.package.min.js","Controls/Application/withPendingContextProvider":"Controls/controls-superbundle.package.min.js","Controls/Application/withPopupManagerActions":"Controls/controls-superbundle.package.min.js","Controls/Application/withRegisters":"Controls/controls-superbundle.package.min.js","Controls/Application/withScrollContextProvider":"Controls/controls-superbundle.package.min.js","Controls/Application/withWhiteSpaceOnRotationHack":"Controls/controls-superbundle.package.min.js","Controls/Container/Async":"Controls/controls-superbundle.package.min.js","Controls/LoadingIndicator":"Controls/controls-superbundle.package.min.js","Controls/Pending":"Controls/controls-superbundle.package.min.js","Controls/Utils/ArraySimpleValuesUtil":"Controls/controls-superbundle.package.min.js","Controls/Utils/Helpers/functions":"Controls/controls-superbundle.package.min.js","Controls/Utils/History/interfaces/IHistoryFields":"Controls/controls-superbundle.package.min.js","Controls/Utils/History/isHistorySeparatorVisible":"Controls/controls-superbundle.package.min.js","Controls/Utils/Icon":"Controls/controls-superbundle.package.min.js","Controls/Utils/InertialScrolling":"Controls/controls-superbundle.package.min.js","Controls/Utils/IsLetterPressedOnKeyboard":"Controls/controls-superbundle.package.min.js","Controls/Utils/LogUtil":"Controls/controls-superbundle.package.min.js","Controls/Utils/colorUtil":"Controls/controls-superbundle.package.min.js","Controls/Utils/getFontClass":"Controls/controls-superbundle.package.min.js","Controls/Utils/logControlError":"Controls/controls-superbundle.package.min.js","Controls/buttons":"Controls/controls-superbundle.package.min.js","Controls/context":"Controls/controls-superbundle.package.min.js","Controls/dataSource":"Controls/controls-superbundle.package.min.js","Controls/design":"Controls/controls-superbundle.package.min.js","Controls/dragnDrop":"Controls/controls-superbundle.package.min.js","Controls/error":"Controls/controls-superbundle.package.min.js","Controls/event":"Controls/controls-superbundle.package.min.js","Controls/freezeContext":"Controls/controls-superbundle.package.min.js","Controls/hooks":"Controls/controls-superbundle.package.min.js","Controls/popup":"Controls/controls-superbundle.package.min.js","Controls/scrollLite":"Controls/controls-superbundle.package.min.js","Controls/sizeUtils":"Controls/controls-superbundle.package.min.js","Controls/stickyBlock":"Controls/controls-superbundle.package.min.js","Controls/themes":"Controls/controls-superbundle.package.min.js","css!Controls/Application/oldCss":"Controls/controls-superbundle.package.min.css","css!Controls/CommonClasse
40s":"Controls/controls-superbundle.package.min.css","css!Controls/LoadingIndicator":"Controls/controls-superbundle.package.min.css","css!Controls/application":"Controls/controls-superbundle.package.min.css","css!Controls/buttons":"Controls/controls-superbundle.package.min.css","css!Controls/dragnDrop":"Controls/controls-superbundle.package.min.css","css!Controls/popup":"Controls/controls-superbundle.package.min.css","css!Controls/scrollLite":"Controls/controls-superbundle.package.min.css","css!Controls/stickyBlock":"Controls/controls-superbundle.package.min.css","css!Controls/themes":"Controls/controls-superbundle.package.min.css"};}); 41define("Controls-DataEnv/context",["react/jsx-runtime","react-dom","react","WasabyLoader/ModulesLoader","UICore/Jsx","UICore/Events","UICore/Contexts","UICommon/Utils","UICommon/Deps","UI/Focus","UI/Contexts","Types/util","Types/object","Types/guards","Types/entity","Env/Env","Controls/LoadingIndicator","Controls-DataEnv/slice","Controls-DataEnv/dataFactory","Application/Initializer","Application/Env","require","exports"],(function(e,t,n,r,o,i,s,a,l,u,c,d,f,h,_,g,v,p,C,y,m,E,O){var x,b,P,$,D,N,T,S,R,j,F,I,A,M,B,V,w,L,k,X,Y,K,G,U,z,q,H,W,J,Q,Z,ee,te,ne,re,oe,ie,se,ae,le,ue,ce,de,fe,he,_e,ge,ve,pe,Ce,ye,me,Ee,Oe,xe,be,Pe,$e,De,Ne,Te,Se,Re,je,Fe,Ie,Ae,Me,Be,Ve,we;
41return Object.defineProperty(O,"__esModule",{value:!0}),x=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.CONTEXT_DATA_CONFIG_FIELD=t.CONTEXT_NODE_PATH=t.CONTEXT_STORE_FIELD=t.STORE_ROOT_NODE_KEY=void 0,t.STORE_ROOT_NODE_KEY="root",t.CONTEXT_STORE_FIELD=Symbol.for("ContextStoreField"),t.CONTEXT_NODE_PATH=Symbol("$_CONTEXT_NODE_PATH_$"),t.CONTEXT_DATA_CONFIG_FIELD="$_CONTEXT_DATA_CONFIG_$",t}(0,{}),b=x,P=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n.createContext({readOnly:!1});return r.displayName="Controls-DataEnv/context:FormContext",t.default=r,t}(0,{},n),$=P,D=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=(0,n.createContext)({});return r.displayName="Controls-DataEnv/context:IsolatedContext",t.default=r,t}(0,{},n),N=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n.createContext(void 0);return r.displayName="Controls-DataEnv/context:DataContext",t.default=r,t}(0,{},n),T=N,S=function(e,t){"use strict";var n;return Object.defineProperty(t,"__esModule",{value:!0}),t.FetchPolicyEnum=void 0,function(e){e.LocalOnly="local-only",e.LocalFirst="local-first",e.NetworkFirst="network-first",e.NetworkOnly="network-only"}(n||(t.FetchPolicyEnum=n={})),t}(0,{}),R=S,j=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultResolver=void 0;const n="value",r=e=>e.charAt(0).toUpperCase()+e.slice(1),o=(e,t)=>{const{prop:o=n,mode:i="rw",path:s}=e;if("rw"!==i||!(null==t?void 0:t.dataContext))return{};else return{[`on${r(o)}Changed`]:e=>{var n;if(s)null===(n=t.dataContext)||void 0===n||n.setValue(s,e)}}};return t.defaultResolver=(e,t,r)=>({[e.prop||n]:t,...o(e,r)}),t}(0,{}),F=function(e,t,n){"use strict";function r(e){return null!=e}function o(e){return"value"in e?e.value:void 0}function i(e,t){const o=r(t)?(0,n.getValueType)(t):e.type,i="string"==typeof o?o:(null==o?void 0:o.type)||e.type||"record";return new n.Record({adapter:"adapter.sbis",format:[{name:"value",type:i,defaultValue:t}],typeName:`${e.metatype}:${e.type}`})}function s(e){const t=o(e),s=r(t)?t:function(e){const t=e.defaultValue;if(r(t))return t instanceof n.Record?t:i(e,t)}(e);return{...e,value:s}}return Object.defineProperty(t,"__esModule",{value:!0}),t.makeField=t.normalizeContextField=t.makeFieldValueRecord=t.isDataContextField=void 0,t.isDataContextField=function(e,t){return!!t||e instanceof n.Record&&e.isTyped()},t.makeFieldValueRecord=i,t.normalizeContextField=s,t.makeField=function(e,t,n){var i,a,l;if(n){const i=r(t)?t:o(n);return s({...n,name:e,value:i})}return{name:e,value:t,type:t.getTypeName(),metatype:null===(l=null===(a=(i=t).getMetaType)||void 0===a?void 0:a.call(i))||void 0===l?void 0:l.toLowerCase()}},t}(0,{},_),I=F,A=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.FIELD_TYPE=void 0,t.FIELD_TYPE={ApplicationObject:"applicationobject",Primitive:"primitive",Object:"object",DataSet:"dataset"},t}(0,{}),M=A,B=function(e,t,n,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServerContext=void 0;class i extends((0,o.mixin)(r.OptionsToPropertyMixin,r.SerializableMixin)){constructor(e){super(e),this._node=null,this._$storeName="",this._$path=[],r.OptionsToPropertyMixin.initMixin(this,e);const t=(0,n.getStore)("context").get(this._$storeName);if(t)this._node=t.getNodeByPath(this._$path);else throw Error(`Ðе найден конÑекÑÑ Ñ Ð¸Ð¼ÐµÐ½ÐµÐ¼ ${this._$storeName}`)}useSlice(e){var t,n;return null===(n=null===(t=this._node)||void 0===t?void 0:t.getElement(e))||void 0===n?void 0:n.getValue()}}return t.ServerContext=i,t.default=function(e,t){return new i({path:t,storeName:e.getName()})},t}(0,{},m,_,d),V=B,w=function(e,t,n){"use strict";function r(e){return(0,n.isPlainObject)(e)}return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(Object.is(e,t))return!0;if(!r(e)||!r(t))return!1;const n=new Set([...Object.keys(e),...Object.keys(t)]);for(const r of n)if(!Object.is(e[r],t[r]))return!1;return!0},t}(0,{},f),L=function(e,t,n,r,o,i,s){"use strict";function a(e){const t=l(e.dataFactoryName),n=t.slice;return t.getContextConfig||(null==n?void 0:n.getContextConfig)}function l(e){let t;try{t=(0,o.loadSync)(e)||{}}catch(e){t={}}return t}function u(e,t){const n=null==e?void 0:e.sliceExtraValues;if(!n)return;const r={},o={};
41return null==n||n.forEach((({propName:n,dependencyPropName:i,dependencyName:s,prepare:a})=>{var l;const u=t[s],d=null==u?void 0:u.getValue();let f,h;if(o[s]=null===(l=null==u?void 0:u.getParent())||void 0===l?void 0:l.getName(),c(d)){if(h=d.state,!(h instanceof Object))throw Error("ContextElement:::Ð£ÐºÐ°Ð·Ð°Ð½Ñ sliceExtraValues Ð¾Ñ ÑлайÑа, ÑоÑÑоÑние коÑоÑого не ÑвлÑеÑÑÑ Ð¾Ð±ÑекÑом, далÑнейÑÐ°Ñ ÑабоÑа невозможна");f=h[i]}if(a)f=a(f,r.hasOwnProperty(n)?r[n]:e[n],h);r[n]=f})),{properties:r,extraValuesDependencies:o}}function c(e){return e instanceof r.Slice}Object.defineProperty(t,"__esModule",{value:!0});class d{constructor(e){var t,n;if(this._$destroyed=!1,this._$extraValuesDependencies={},this._$props=e,this._$name=e.name,this._$parentNode=e.parentNode,n=e.config.dataFactoryName,["Controls-DataEnv/dataFactory:Custom","Controls-DataEnv/dataFactory:CompatibleCustom"].includes(n))this._$value=e.loadResult;else this._$value=this._initSlice();this._$extraValues=null===(t=this._$props.config.dataFactoryArguments)||void 0===t?void 0:t.sliceExtraValues}getLoadResult(){return this._$props.loadResult}getValue(){return this._$value}getName(){return this._$name}getParent(){return this._$parentNode}setState(e){if(c(this._$value))this._$value.setState(e);else this._$value=e}getData(){if(c(this._$value))return this._$value.getData();else return this._$value}hasDependencyFromNode(e){var t;return!!(null===(t=this._$extraValuesDependencies)||void 0===t?void 0:t[e])}getExtraValues(){return this._$extraValues}hasContextConfigs(){return!!a(this._$props.config)}getContextConfigs(){const e=this._$props.config,t=l(e.dataFactoryName),r=a(e);if(r){const e=r(this._$props.loadResult,this._resolveDataFactoryArguments(t,this._$props.config,this._$props.router));if(!e)return;if(n.DataConfigResolver.isFlatContextConfig(e))return{configs:e.configs,data:e.loadResults,onChange:e.onChange};else if(n.DataConfigResolver.isIHierarchyContextConfig(e)){const t=new i.relation.Tree({parentProperty:"parentId",childrenProperty:"children",keyProperty:"name"});return Object.entries(e.configs).forEach((([t,n])=>{var r;n.data=(null===(r=e.loadResults)||void 0===r?void 0:r[t])||{}})),t.parseTree(e.configs),{...t.toObject(),onChange:e.onChange}}else return e}}_resolveDataFactoryArguments(e,t,n){let r=t.dataFactoryArguments;const o={},i=d.getValuesDependencies(t),s={};if(i.forEach((e=>{s[e]=this.getParent().getElement(e)})),t.dependencies)t.dependencies.forEach((e=>{o[e]=this.getParent().getLoadResult(e)}));if(e.getDataFactoryArguments)r=e.getDataFactoryArguments(t.dataFactoryArguments,o,n);const a=u(r,s);if(a)r={...r,...a.properties},this._$extraValuesDependencies=a.extraValuesDependencies;return r}_onElementInitError(e){var t;if(e instanceof Error)s.IoC.resolve("ILogger").error("Controls-DataEnv/context:ContextElement",`ÐÑоизоÑла оÑибка пÑи иниÑиализаÑии ÑлайÑа ${this._$n
41ame} из ÑабÑики ${this._$props.config.dataFactoryName}.\n Узел конÑекÑÑа ${null===(t=this.getParent())||void 0===t?void 0:t.getName()}.\n СоÑÑоÑние ÑлайÑа бÑÐ´ÐµÑ Ð·Ð°Ð¼ÐµÐ½ÐµÐ½Ð¾ на пÑÑÑой обÑекÑ.\n ÐÑибка: ${e.message}`,e)}_notifySubscribers(e){if(c(this._$value))this._$props.onSnapshot(this._$props.name,e)}_initSlice(e=this._$props.name,t=this._$props.loadResult,o=this._$props.config,i=this._$props.onChange,s=this._$props.router){const a=l(o.dataFactoryName),u=a.slice||n.Custom.slice,c=this._resolveDataFactoryArguments(a,o,s),d=t instanceof Object&&(null==t?void 0:t.constructor)===Object&&Object.getPrototypeOf(t)===Object.prototype;return function(e,t,n){if(e===r.AbstractSlice.prototype.constructor)throw new Error(`Controls-DataEnv/context.createSlice::slice Ñ Ð¸Ð¼ÐµÐ½ÐµÐ¼ ${n} не бÑÐ´ÐµÑ Ñоздан.\n РкаÑеÑÑве ÑлайÑа Ñ ÑабÑики ${t.dataFactoryName} задан абÑÑÑакÑнÑй клаÑÑ Controls-DataEnv/slice:AbstractSlice.\n Создание ÑкземплÑÑа абÑÑÑакÑного клаÑÑа невозможно. ÐÑполÑзÑйÑе Controls-DataEnv/slice:Slice`)}(u,o,e),new u({config:c||{},loadResult:d?{...t}:t,dataContext:this._$props.dataContext,onChange:i,onInitError:this._onElementInitError.bind(this),onNotifySubscribers:this._notifySubscribers.bind(this),name:e})}destroy(){if(c(this._$value))this._$value.destroy();this._$value=null,this._$destroyed=!0}isDestroyed(){return this._$destroyed}static getDependencies(e){const t=e.dependencies||[],n=d.getValuesDependencies(e);return t.concat(n)}static getValuesDependencies(e){var t,n;const r=[];return null===(n=null===(t=e.dataFactoryArguments)||void 0===t?void 0:t.sliceExtraValues)||void 0===n||n.forEach((({dependencyName:e})=>{if(!r.includes(e))r.push(e)})),r}static getExtraValueByName(e,t){var n,r;return null===(r=null===(n=e.dataFactoryArguments)||void 0===n?void 0:n.sliceExtraValues)||void 0===r?void 0:r.find((({dependencyName:e})=>e===t))}}return t.default=d,t}(0,{},C,p,r,_,g),k=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n.createContext(void 0);return r.displayName="Controls-DataEnv/context:RootDataContext",t.default=r,t}(0,{},n),X=k,Y=function(e,t,n,r,o){"use strict";function i(e){const t=(e=>{var t;return null===(t=e.type)||void 0===t?void 0:t.toLowerCase()})(e);return t&&s[t]||n.defaultResolver}Object.defineProperty(t,"__esModule",{value:!0}),t.resolveBinding=t.getBindingResolver=t.registerBindingResolver=void 0;const s={};return t.registerBindingResolver=function(e,t,n){const i=e.toLowerCase(),a=s[i];if(!a)s[i]=t;if((!a||a===t)&&(0,r.isInit)())(0,o.addPageDeps)([n.moduleName])},t.getBindingResolver=i,t.resolveBinding=function(e,t,n){return i(e)(e,t,n)},t}(0,{},j,y,l),K=Y,G=function(e,t,n,r,o,i){"use strict";function s(e){return(0,o.isRecord)(e)&&e.has("data")&&e.has("element_id")&&"variant"===e.getMetaType()}function a(e,t){return l(e.get("data"),t)}function l(e,t){if(!t.length)return{found:!0,value:e};if(null==e)return u;const[n,...o]=t;let i;if(e instanceof r.Model)return function(e,t,n,r){if(e.has(t))return l(e.get(t),n);else return s(e)?a(e,r):u}(e,n,o,t);else if(s(e))return a(e,t);else if("object"==typeof e){if(!function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(e,n))return u;i=e[n]}else return u;return l(i,o)}Object.defineProperty(t,"__esModule",{value:!0});const u={found:!1};return t.default=class{constructor(e){this._field=e,this._name=e.name,this._value=e.value,this._type=e.type,this._metatype=e.metatype}get type(){return this._type}get metatype(){return this._metatype}get name(){return this._name}set value(e){if(this._isRecordValueType())this._value=e;else if(this._value instanceof r.Record)this._value.set("value",e);else this._value=(0,i.makeFieldValueRecord)(this._field,e)}get value(){if(this._isRecordValueType())return this._value;const e=this._value;if(e instanceof r.Record)return e.get("value");else return e}resolveByName(e){const t=this.value;if(e===this.name)return{found:!0,value:t};if(t instanceof r.Model&&t.has(e))return{found:!0,value:t.get(e)};else return u}resolveByPath(e){const[t,...n]=e,r=this.resolveByName(t);return r.found?l(r.value,n):u}resolveByType(e){const t=this.value;if(this._isRecordValueType()&&t instanceof r.Model){if(t.getTypeName()===e)return{found:!0,value:t};const n=function(e,t){let n;
41return e.getFormat().forEach((o=>{const i=o.getName(),s=e.get(i);if(s instanceof r.Model&&s.getTypeName()===t)n=i})),n}(t,e);if(n)return{found:!0,value:t.get(n)}}else if(this.type===e)return{found:!0,value:t};return u}toObject(){return{...this._field,name:this._name,value:this._value,type:this._type,metatype:this._metatype}}_isRecordValueType(){return!this.metatype||this._metatype===n.FIELD_TYPE.ApplicationObject||this._metatype===n.FIELD_TYPE.DataSet}},t}(0,{},A,_,h,F),U=function(e,t,n,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return(0,r.useContext)(n.default).path},t}(0,{},D,n),z=function(e,t,n,r,o){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.useContextEdit=void 0,t.useContextEdit=function(e){const t=(0,n.useContext)(r.default);return(0,n.useCallback)((n=>{var r;const i=t.readOnly;if(null===(r=null==t?void 0:t.edit)||void 0===r||r.call(t),i&&(null==e?void 0:e.current)){const t=n.currentTarget||e.current;setTimeout((()=>{(0,o.activate)(t,{enableScrollToElement:!0,enableScreenKeyboard:!0})}),100)}}),[t])},t}(0,{},n,P,u),q=z,H=function(e,t,n,r,o){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.useFormReadonly=void 0,t.useFormReadonly=function(){const e=(0,r.useContext)(o.default);return(0,n.useReadonly)({readOnly:null==e?void 0:e.readOnly})},t}(0,{},c,n,P),W=H,J=function(e,t,n,r,o,i){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e;const t=(0,n.default)(),s=(0,r.useContext)(o.default),a=(0,r.useRef)(null==s?void 0:s[i.CONTEXT_STORE_FIELD]);return a.current=null==s?void 0:s[i.CONTEXT_STORE_FIELD],null===(e=a.current)||void 0===e?void 0:e.getDataContext(t)},t}(0,{},U,n,k,x),Q=function(e,t,n,r,o,i,s){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=!0){const a=(0,r.useContext)(s.default),l=null==a?void 0:a[o.CONTEXT_STORE_FIELD],u=(0,n.default)(),c=(0,r.useRef)(),d=(0,r.useCallback)((()=>{if(!e)return void(c.current=void 0);const n=null==l?void 0:l.getElement(e,u||[o.STORE_ROOT_NODE_KEY]);if(c.current=n,t)return null==n?void 0:n.state;else return n}),[u,e,l,t]),f=(0,r.useCallback)((()=>{if(!e)return;const n=null==l?void 0:l.getElement(e,u||[o.STORE_ROOT_NODE_KEY]);if(t)return null==n?void 0:n.state;else return n}),[u,e,l,t]),h=(0,r.useCallback)((t=>{if(l&&e)return l.subscribe(t);else return()=>{}}),[l,e]);if((0,i.useSyncExternalStore)(h,d,f),void 0!==c.current)return c.current;else return null==l?void 0:l.getElement(e,u||[o.STORE_ROOT_NODE_KEY])},t}(0,{},U,n,x,o,k),Z=function(e,t,n,r,o,i){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=(0,i.useContext)(o.default),t=(0,i.useContext)(n.default),s=(0,i.useRef)(null==e?void 0:e[r.CONTEXT_STORE_FIELD]);return s.current=null==e?void 0:e[r.CONTEXT_STORE_FIELD],(0,i.useMemo)((()=>({execute:async(e,n)=>{var r;return(null===(r=null==s?void 0:s.current)||void 0===r?void 0:r.getDataContext(t.path)).execute(e,n)},getCurrentDataContext:()=>{var e;return null===(e=null==s?void 0:s.current)||void 0===e?void 0:e.getDataContext(t.path)}})),[t.path])},t}(0,{},D,x,k,n),ee=Z,te=function(e,t,n,r,o,i){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=(0,r.useContext)(n.default),t=(0,r.useContext)(o.default),s=(0,r.useRef)(null==e?void 0:e[i.CONTEXT_STORE_FIELD]);return s.current=null==e?void 0:e[i.CONTEXT_STORE_FIELD],(0,r.useMemo)((()=>({[i.CONTEXT_NODE_PATH]:t.path,hasChildren(e){var n;if(null==t?void 0:t.path){const r=[...t.path,e];return!!(null===(n=s.current)||void 0===n?void 0:n.getNodeByPath(r))}return!1},getElement(e){var n;return null===(n=s.current)||void 0===n?void 0:n.getElement(e,t.path)},createElement(e,n){var r;return null===(r=s.current)||void 0===r?void 0:r.createElement(t.path,e,n)},async createNode(e,n){var r;const o={...n};return null===(r=s.current)||void 0===r?void 0:r.createNode(t.path,e,o)},createElementSync(e,n,r){var o;return null===(o=s.current)||void 0===o?void 0:o.createElementSync(t.path,e,n,r)},createElements(e){var n;return null===(n=s.current)||void 0===n?void 0:n.createElements(t.path,e)},createElementsSync(e,n){var r;return null===(r=s.current)||void 0===r?void 0:r.createElementsSync(t.path,e,n)},createNodeSync(e,n,r){var o;const i={...n};return null===(o=s.current)||void 0===o?void 0:o.createNodeSync(t.path,e,i,r)},updateElements(e,n){var r;return null===(r=s.current)||void 0===r?void 0:r.updateNodeElements(t.path,e,n)},update(e){var n;return null===(n=s.current)||void 0===n?void 0:n.updateNode(t.path,e)},destroy(){var e;null===(e=s.current)||void 0===e||e.destroyNode(t.path)},async reloadElement(e,n,r){var o;return null===(o=s.current)||void 0===o?void 0:o.reloadElement(t.path,e,n,r)},unsafe__getElementsByTree(){var e;return(null===(e=s.current)||void 0===e?void 0:e.getElementsFromPath(t.path))||{}},getDataContext(){var e;return(null===(e=s.current)||void 0===e?void 0:e.getDataContext(t.path))||null}})),[t])},t}(0,{},k,n,D,x),ne=te,re=function(e,t,n,r,o,i,s,a){"use strict";
41return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=(0,n.default)(),l=(0,i.useContext)(s.default),u=null==l?void 0:l[a.CONTEXT_STORE_FIELD],c=(0,i.useCallback)((()=>null==u?void 0:u.getElementsFromPath(t,!0)),[u,t]),d=(0,i.useCallback)((()=>null==u?void 0:u.getElementsFromPath(t,!0)),[u,t]),f=(0,i.useCallback)((e=>{if(u)return u.subscribe(e);else return()=>{}}),[u]);return(0,r.useSyncExternalStoreWithSelector)(f,c,e,o.default,d)},t}(0,{},U,o,w,n,k,x),oe=re,ie=function(e,t,n,r,o,i,s,a,l,u,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const d={};return t.default=r.forwardRef((function(e,t){const f=(0,s.useContext)(u.default),h=null==f?void 0:f[c.CONTEXT_STORE_FIELD],_=(0,l.default)(),g=r.useMemo((()=>{if(e.dataLayoutId){if(_)return[..._,e.dataLayoutId]}else return _;return[e.dataLayoutId]}),[e.dataLayoutId,_]),v=r.useMemo((()=>!!(null==h?void 0:h.getNodeByPath(g))),[h,g]),p=r.useMemo((()=>({dataLayoutId:e.dataLayoutId||"",path:v?g:_})),[g,e.dataLayoutId,_,v]),C=(0,s.useCallback)((()=>{var e;return null===(e=null==h?void 0:h.getNodeByPath(p.path))||void 0===e?void 0:e.getValue()}),[p.path,h]),y=(0,s.useCallback)((()=>{var e;return null===(e=null==h?void 0:h.getNodeByPath(p.path))||void 0===e?void 0:e.getValue()}),[p.path,h]),m=(0,s.useCallback)((e=>{if(h)return h.subscribe(e);else return()=>{}}),[h]),E=(0,a.useSyncExternalStore)(m,C,y),O=r.useMemo((()=>{const n={};if(t)n.ref=t;if(e.attrs)n.attrs=e.attrs;return n}),[t,e.attrs]);return(0,n.jsx)(o.default.Provider,{value:p,children:(0,n.jsx)(i.default.Provider,{value:E||d,children:r.cloneElement(e.children,O)})})})),t}(0,{},e,n,D,N,n,o,U,k,x),se=function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e=[],t){this._destroyed=!1,this._getParentContext=t,this._setContext(e)}get parentContext(){var e;return null===(e=this._getParentContext)||void 0===e?void 0:e.call(this)}getDescription(){var e;return[...this._context.map((e=>e.toObject())),...(null===(e=this.parentContext)||void 0===e?void 0:e.getDescription())||[]]}destroy(){this._getParentContext=void 0,this._destroyed=!0}_setContext(e){this._context=e.map((e=>e instanceof n.default?e:new n.default((0,r.normalizeContextField)(e))))}},t}(0,{},G,F),ae=function(e,t,n,r,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s={found:!1};class a extends o.default{constructor(e=[],t){var n;super(e,t),this._changeCallbacks={},this._recordChangeCallbacks={},this._isRecordSubscriptionRequired=!1,this._isRecordSubscriptionRequired=!!this._getParentContext,this._subscribeToFieldsChange(this._context),this._parentContextChangeUnsubscribe=null===(n=this.parentContext)||void 0===n?void 0:n.onChange(this._onParentContextChanged.bind(this))}setValue(e,t){var n;const r=this._getByPath(e);if(r.found&&r.value===t)return!0;const o=this._setValue(e,t);if(o)return this._notifyChanges(e,t),o;else return!!(null===(n=this.parentContext)||void 0===n?void 0:n.setValue(e,t))}getByPath(e=""){var t;const n=this._getByPath(e);return n.found?n.value:null===(t=this.parentContext)||void 0===t?void 0:t.getByPath(e)}getByName(e){var t;const n=this._getByName(e);return n.found?n.value:null===(t=this.parentContext)||void 0===t?void 0:t.getByName(e)}onChange(e,t="all"){if(!this._changeCallbacks[t])this._changeCallbacks[t]=[];return this._changeCallbacks[t].push(e),()=>{var n;this._changeCallbacks[t]=null===(n=this._changeCallbacks[t])||void 0===n?void 0:n.filter((t=>t!==e))}}getByType(e){var t;const n=this._getByType(e);return n.found?n.value:null===(t=this.parentContext)||void 0===t?void 0:t.getByType(e)}getByConf(e,t){var n;if(!(e=>!(!e.path&&!e.type))(e))return;const r=e.path?this._getByPath(e.path):this._getByType(e.type||"");return r.found?(0,i.resolveBinding)(e,r.value,t):null===(n=this.parentContext)||void 0===n?void 0:n.getByConf(e,t)}destroy(){var e;this._unsubscribeToFieldsChange(this._context),null===(e=this._parentContextChangeUnsubscribe)||void 0===e||e.call(this),this._changeCallbacks={},this._parentContextChangeUnsubscribe=void 0}updateContext(e=[]){const t=this._context;this._unsubscribeToFieldsChange(this._context),this._setContext(e),this._subscribeToFieldsChange(this._context),t.forEach((e=>{const t=this._getByName(e.name).value;if(e.value!==t)this._notifyChanges(e.name,t)}))}_subscribeToFieldsChange(e){if(this._isRecordSubscriptionRequired)for(const{name:t,value:r}of e)if(r instanceof n.Record){const e=this._onRecordChangeCallback.bind(this,t);r.subscribe("onPropertyChange",e),this._recordChangeCallbacks[t]=e}}_unsubscribeToFieldsChange(e){if(this._isRecordSubscriptionRequired)for(const{name:t,value:r}of e){const e=this._recordChangeCallbacks[t];if(e&&r instanceof n.Record)r.unsubscribe("onPropertyChange",e),this._recordChangeCallbacks[t]=void 0}}_onRecordChangeCallback(e,t,n){const r=Object.keys(n);for(const t of r)this._notifyChanges([e,t].join("."),n[t])}_onParentContextChanged(e,t){this._notifyChanges(e,t)}_getByPath(e=""){const t=e.split(".");for(const e of this._context){const n=e.resolveByPath(t);if(n.found)return n}return s}_getByType(e){for(const t of this._context){const n=t.resolveByType(e);if(n.found)return n}return s}_getByName(e){for(const t of this._context){const n=t.resolveByName(e);
41if(n.found)return n}return s}_notifyChanges(e,t){const n=this._getTriggerKeys(e);for(const r of n){const n=this._changeCallbacks[r];if(n)for(const r of n)r(e,t)}}_setValue(e,t){const[o,...i]=e.split("."),s=(o,i)=>{if(!e.length&&o.value instanceof n.Model&&t instanceof n.Model)this._unsubscribeToFieldsChange([o]),this._subscribeToFieldsChange([{...o,value:t}]);return r.object.implantValue(o,["value",...i],t)};for(const e of this._context){const{name:t,value:r}=e;if(o===t)return s(e,[...i]);if(r instanceof n.Model&&r.has(o))return s(e,[o,...i])}return!1}_getTriggerKeys(e){return["all",...Object.keys(this._changeCallbacks).filter((t=>t.includes(e)))]}}return t.default=a,t}(0,{},_,d,se,Y),le=function(e,t,n,r,o,i,s,a,l){"use strict";function u(e,t,n,r){const o={},i={dataContext:t,reloadCallableBindings:e=>{var t;const o=n.getElement("UserData",r||[s.STORE_ROOT_NODE_KEY]);return null===(t=null==o?void 0:o.reloadBindings)||void 0===t?void 0:t.call(o,e)}};return e.forEach((e=>{const n=t.getByConf(e,i);if(n)Object.assign(o,n)})),o}Object.defineProperty(t,"__esModule",{value:!0}),t.useBind=void 0;const c={};return t.useBind=function(e){var t;const d=(0,o.useContext)(i.default),f=null==d?void 0:d[s.CONTEXT_STORE_FIELD],h=(0,r.default)(),_=(0,n.default)(),g=(0,o.useMemo)((()=>{if(!e)return[];else return Array.isArray(e)?e:[e]}),[e]),v=(0,o.useMemo)((()=>g.map((e=>e.path)).filter(Boolean)),[g]),p=(0,o.useCallback)((e=>{if(_||f){const t=null==_?void 0:_.onChange(((t,n)=>{if(v.some((e=>t.includes(e))))e(t,n)})),n=null==f?void 0:f.subscribe(e);return()=>{null==n||n(),null==t||t()}}else return()=>{}}),[f,_,v]),C=(0,o.useRef)(),y=(0,o.useCallback)((()=>{if(!f)return c;const e=C.current,t=u(g,_,f,h);if(((e,t)=>{if(!e||!t)return!0;const n=e,r=t;if(Object.keys(n).length!==Object.keys(r).length)return!0;return Object.entries(r).filter((([e,t])=>!("function"==typeof t))).some((([e,t])=>!n.hasOwnProperty(e)||n[e]!==t&&!(0,l.isEqual)(n[e],t)))})(e,t))C.current=t;return C.current}),[f,g,_,h]),m=(0,o.useCallback)((()=>{if(!f)return c;else return u(g,_,f,h)}),[f,g,_,h]);return(0,a.useSyncExternalStore)(p,y,m),null!==(t=C.current)&&void 0!==t?t:m()},t}(0,{},J,U,n,k,x,o,f),ue=le,ce=function(e,t,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return(0,n.default)().getDescription()},t}(0,{},J),de=ce,fe=function(e,t,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e)},t}(0,{},Q),he=fe,_e=function(e,t,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e,!1)},t}(0,{},Q),ge=_e,ve=function(e,t,n,r,o,i,s,a,l,u,c){"use strict";function d(e){var t;const u=e.storeId||(null===(t=e.name)||void 0===t?void 0:t[0]),d=(0,i.default)(u),f=(0,s.default)(o.DEFAULT_FORM_SLICE_NAME),h=(0,r.useContext)(e.PendingContext),[_,g]=(0,r.useState)(e.initialReadOnly||!1),v=(0,r.useRef)(),p=f||d,C=(0,r.useMemo)((()=>({readOnly:_,setReadOnly:g,canEdit:e.canEdit,edit:()=>{if(_)if(e.canEdit)g(!1)}})),[_]),y=(0,r.useCallback)((()=>{const e=c.IndicatorOpener.show();v.current=e}),[]),m=(0,r.useCallback)((()=>{if(v.current)c.IndicatorOpener.hide(v.current)}),[]);(0,r.useEffect)((()=>{if(p&&h)p.registerAction("registerPending",h.registerPending),p.registerAction("cancelFinishingPending",h.cancelFinishingPending),p.initChangePending();return null==p||p.registerAction("longOperationStart",y),null==p||p.registerAction("longOperationEnd",m),()=>{null==p||p.unregisterAction("registerPending"),null==p||p.unregisterAction("cancelFinishingPending")}}),[p,h]);const E=(0,r.useCallback)(((e,t={})=>{if(p)Object.entries(t).forEach((([e,t])=>{p.registerAction(e,t)}))}),[p]),{children:O,forwardedRef:x}=e,b=(0,r.useMemo)((()=>{if(!O||!x)return O;else return(0,r.cloneElement)(O,{forwardedRef:x})}),[O,x]);return(0,n.jsx)(a.default.Provider,{value:C,children:(0,n.jsx)(l.EventSubscriber,{onRegisterFormOperation:E,children:b})})}Object.defineProperty(t,"__esModule",{value:!0});const f="Controls/Pending:Context";return t.default=(0,r.forwardRef)((function(e,t){const[o,i]=(0,r.useState)((0,u.isLoaded)(f)?(0,u.loadSync)(f):null);if((0,r.useEffect)((()=>
41{if(o)return;let e=!1;const t=()=>{e=!0};return(0,u.loadAsync)(f).then((t=>{if(!e)i(t)}),t),t}),[o]),!o)return null;else return(0,n.jsx)(d,{...e,PendingContext:o,forwardedRef:t})})),t}(0,{},e,n,C,_e,fe,P,i,r,v),pe=ve,Ce=function(e,t,n,r,o){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=(0,r.useContext)(n.default),i=(0,o.default)(e);return(null==t?void 0:t[e])?t[e]:i},t}(0,{},N,n,fe),ye=Ce,me=function(e,t,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=(0,n.default)(e);if(!t)throw Error(`РконÑекÑÑе даннÑÑ
оÑÑÑÑÑÑвÑÐµÑ ÑÐ»Ð°Ð¹Ñ Ñ Ð¸Ð´ÐµÐ½ÑиÑикаÑоÑом - ${e}`);return t},t}(0,{},fe),Ee=me,Oe=function(e,t,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=(0,n.default)(e);if(!t)throw Error(`РконÑекÑÑе даннÑÑ
оÑÑÑÑÑÑвÑÐµÑ ÑÐ»Ð°Ð¹Ñ Ñ Ð¸Ð´ÐµÐ½ÑиÑикаÑоÑом - ${e}`);return t},t}(0,{},_e),xe=Oe,be=function(e,t,n,r,o,i,s){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.useDataContextProxyValue=void 0,t.useDataContextProxyValue=function(){const e=(0,r.useContext)(s.default),t=(0,r.useContext)(o.default);return(0,r.useMemo)((()=>({rootContext:e,pathContext:t})),[e,t])},t.default=function(e){if(!e.proxyContextValues)return e.children;else return(0,n.jsx)(s.default.Provider,{value:e.proxyContextValues.rootContext,children:(0,n.jsx)(o.default.Provider,{value:e.proxyContextValues.pathContext,children:(0,n.jsx)(i.default,{children:e.children})})})},t}(0,{},e,n,D,ie,k),Pe=be,$e=function(e,t,n,r,o){"use strict";async function i(){return(await(0,o.loadAsync)("Controls-DataEnv/dataLoader")).DataContextServiceAPI}Object.defineProperty(t,"__esModule",{value:!0});class s extends r.default{constructor(e=[],t,r){super(e,t),this._localAPI=new n.default(this._context,t),this._dataContextDescription=r}getByPath(e=""){return this._localAPI.getByPath(e)}getByName(e=""){return this._localAPI.getByName(e)}getByType(e=""){return this._localAPI.getByType(e)}getByConf(e,t){return this._localAPI.getByConf(e,t)}getValue(e){return this.getByName(e)}getObject(e){return this.getByName(e)||this.getByType(e)||null}setValue(e,t){return this._localAPI.setValue(e,t)}onChange(e,t){return this._localAPI.onChange(e,t)}async execute(e,t={}){const n=this.getDescription();return(await i()).execute(e,n,t)}toObject(){const e={};return this._context.forEach((t=>{e[t.name]=t.value})),e}destroy(){super.destroy(),this._localAPI.destroy()}static async fillContextFields(e,t,n){if(!e.length)return t;return(await i()).fillContextFields(e,t,n)}}return t.default=s,t}(0,{},ae,se,r),De=$e,Ne=function(e,t,n,r,o,i,s,a,l){"use strict";function u(e,t){if(!t.length)return;let n=e;for(const e of t.slice(0,-1)){const t=n.get(e);if(!(t instanceof i.Model))return;n=t}const r=t[t.length-1],o=n.getFormat(),s=o.getFieldIndex(r);if(!(null==s||s<0))return o.at(s)}function c(e){if(e&&"object"==typeof e&&"name"in e)return e;else return{name:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.getSafeFieldType=t.getModelFieldType=t.clearProps=t.useConnectedValue=void 0;const d="FormData",f={get:()=>{},set:()=>{}},h=[];return t.useConnectedValue=function(e=h,t=null){const _=e||h,g=n.useMemo((()=>c(_).name),[_]),[v,...p]=g,C=n.useRef(null),y=(0,a.default)(d),m=(0,a.default)(v),E=m||y||f;let{value:O,onValueChanged:x}=(0,l.useBind)({path:g.join(".")})||{};if(g.length>1&&E instanceof r.FormSlice)O=void 0,x=void 0;const b=m?p:_,P=n.useCallback((e=>{var n;if(void 0!==O)return O;const r=(null==e?void 0:e[v])||(null==e?void 0:e[d]),o=0!==b.length?null===(n=null==r?void 0:r.store)||void 0===n?void 0:n.get(b):void 0;return void 0!==o?o:t}),[b,v,t,O]),$=n.useCallback((e=>{var t,n;const r=(null==e?void 0:e[v])||(null==e?void 0:e[d]),o=(E instanceof i.Model?u(E,b):null===(t=null==r?void 0:r.store)||void 0===t?void 0:t.getType(b))||function(e,t){const n=function(e,t){var n;const r=Array.isArray(e)?e.join("."):e,o=null===(n=null==t?void 0:t.fieldTypeStore)||void 0===n?void 0:n.find((e=>e.name===r));if(!o)return;try{return i.format.fieldsFactory({name:o.name,type:o.type})}catch{return i.format.fieldsFactory({name:o.name,type:"record"})}}(t,e);if(!n)return;return n}(null==e?void 0:e.TypeRepository,_);if((null==o?void 0:o.getType())!==(null===(n=C.current)||void 0===n?void 0:n.getType()))C.current=o;return C.current}),[b,v,_,E]),D=n.useCallback((e=>{var t,n;if(!Array.isArray(_))return;const r=null===(n=null===(t=null==e?void 0:e.TypeRepository)||void 0===t?void 0:t.fieldTypeStore)||void 0===n?void 0:n.find((e=>e.typeId===_.join(".")));return null==r?void 0:r.titlePath}),[_]),N=(0,s.default)(P),T=(0,s.default)($),S=(0,s.default)(D);return n.useMemo((()=>({value:N,onChange:e=>
41{if(!_.length)return o.Logger.warn("useConnectedValue: Ðе задана пÑивÑзка name, запиÑÑ Ð·Ð½Ð°ÑÐµÐ½Ð¸Ñ Ð½ÐµÐ²Ð¾Ð·Ð¼Ð¾Ð¶Ð½Ð°.");if(x)return x(e);if(E instanceof i.Model)(0,r.injectValue)(E,b,e);else null==E||E.set(b,e)},type:T,decoratedValue:S})),[_,N,E,b,T,S,x])},t.clearProps=function(e){const{name:t,requiredIndicatorStyle:n,...r}=e;return r},t.getModelFieldType=u,t.getSafeFieldType=c,t}(0,{},n,C,a,_,re,_e,le),Te=Ne,Se=function(e,t,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e={}){return(0,n.useBind)(e)},t}(0,{},le),Re=Se,je=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends n.default{updateContext(e=[],t){if(this._setContext(e),this._localAPI.updateContext(this._context),t)this._dataContextDescription=t}}return t.default=r,t}(0,{},$e),Fe=function(e,t,n,r,o,i,s,a,l,u){"use strict";function c(e){const t=Object.entries(e),n=new Set,o=[];for(;t.length;){const i=t.shift();if(i){const[s,a]=i,l=r.default.getValuesDependencies(a),u=l.every((e=>n.has(e))),c=l.some((t=>{const n=e[t];return n&&r.default.getValuesDependencies(n).includes(s)}));if(u||c)n.add(s),o.push(s);else t.push([s,a])}}return o}function d(e,t){return!!t.find((t=>t.name===e))}Object.defineProperty(t,"__esModule",{value:!0});const f=Symbol.for("Controls-DataEnv/_context/store/ContextNode:sliceChildren");class h{constructor(e){this._$configs={},this._$isElementsDestroyed=!1,this._$elements={},this._$children=new Map,this._$elementOrder=[],this._$value={},this._$relatedElements={},this._$destroyListeners=[],this._$props=e,this._$parentNode=e.parentNode||null,this._onElementSnapshot=this._onElementSnapshot.bind(this),this._onChangeElement=this._onChangeElement.bind(this),this._initState(e.contextConfigs)}_createElementOrder(){this._$elementOrder=c(this._$configs)}getRelatedElements(e){const t={nodes:[],elements:[]};if("configs"in e)t.elements=Object.keys(e.configs);if(e.children)t.nodes=Object.keys(e.children);if("onChange"in e)t.onChange=e.onChange;return t}getRelatedValues(e){const t={};return e.elements.forEach((e=>{const n=this._$elements[e];if(n)t[e]=n.getValue()})),e.nodes.forEach((e=>{const n=this._$children.get(e);if(n)t[e]=n.toObject()})),t}updateSliceChildren(e,t){var n;const r=null===(n=this._$elements[e])||void 0===n?void 0:n.getValue();if((o=r)instanceof Object&&o["[ISlice]"])!function(e){if(!Object.getOwnPropertyDescriptor(e,"children"))Object.defineProperty(e,"children",{enumerable:!1,configurable:!0,get(){return this[f]||{}}})}(r),r[f]=this.getRelatedValues(t);var o}
41_getDataConfigs(e=this._$contextConfigs){if("configs"in e)return e.configs;else if("configGetter"in e){let t;try{let r=e;if(e.configGetterArgumentsArray){const t=[...e.configGetterArgumentsArray];t[2]=this._$props.router,r={...e,configGetterArgumentsArray:t}}t=!e.isAsyncConfigGetter?n.DataConfigResolver.getConfigFromLoaderSync(r,this.getDataContext()):n.DataConfigResolver.convertLoadResultsToFactory(e.data)}catch(n){if(t={},n instanceof Error)o.logger.error(`ÐÑоизоÑла оÑибка пÑи вÑзове меÑода getConfig из модÑÐ»Ñ ${e.configGetter} ${n.message}`)}if(this._$props.getSlicesConfig&&this._$props.getSlicesConfigNode&&this._$name===this._$props.getSlicesConfigNode){const e=this._$props.getSlicesConfig(this._$data);return{...t,...e}}return t}return{}}_makeDataContextMap(e){if(e)return e.reduce(((e,t)=>(e[t.name]=t,e)),{})}initElements(){this._$isElementsDestroyed=!1,this._createElementOrder(),this._$elementOrder.forEach((e=>{this.addElement(e,this._$data[e],this._$configs[e])}))}_initState(e){var t,n,o;if(this._$contextConfigs={...e},this._$name=this._$contextConfigs.name||this._$props.name,this._$dataContextDescription=e[s.CONTEXT_DATA_CONFIG_FIELD]||this._$props.dataContextDescription,this._$dataContextFieldsMap=this._makeDataContextMap(null===(t=this._$dataContextDescription)||void 0===t?void 0:t.fields),this._$data=this._$contextConfigs.data||{},this._$configs=this._getDataConfigs(),n=this._$configs,o=this._$name,Object.entries(n).forEach((([e,t])=>{var i;if(null===(i=t.dataFactoryArguments)||void 0===i?void 0:i.sliceExtraValues)r.default.getValuesDependencies(t).forEach((i=>{const s=n[i];if(r.default.getValuesDependencies(s).includes(e)){const n=r.default.getExtraValueByName(s,e),a=r.default.getExtraValueByName(t,e);if((null==n?void 0:n.dependencyPropName)===(null==a?void 0:a.propName)&&(null==a?void 0:a.dependencyPropName)===(null==n?void 0:n.propName))throw new Error(`РконÑигÑÑаÑии ÑабÑик даннÑÑ
ÑÑÑеÑÑвÑÐµÑ ÑиклиÑеÑÐºÐ°Ñ Ð·Ð°Ð²Ð¸ÑимоÑÑÑ.\n Ð sliceExtraValues ÑабÑики ${e} Ñказана завиÑимоÑÑÑ Ð¾Ñ ${i}. Узел ${o}`)}}))})),this.initElements(),this.initDataContext(),this._$contextConfigs.children)this.reInitChildren(this._$contextConfigs.children,this._$props.getSlicesConfig)}_onElementSnapshot(e,t){const n=this.getChanges(t,e);this._$props.onSnapshot(n,this.getPath())}_onChangeElement(){this._$value={...this._$value},this._$props.onChange(),this.initDataContext()}getParent(){return this._$parentNode}setParent(e){const t=this.getParent();if(null!==t)t.detachChildren(this.getName());this._$parentNode=e,e.registerChildren(this)}registerChildren(e){this._$children.set(e.getName(),e)}getConfigs(){return this._$configs}getState(){return this._$elements}getValue(){return this._$value}reInitChildren(e,t){Object.entries(e).forEach((([e,n])=>{const r=this._$children.get(e);if(r)r.reInitState(n);else this.addChild(e,n,void 0,!1,t)}))}getPath(e=!0){const t=[];let n=e?this:this.getParent();for(;n;)t.unshift(n.getName()),n=n.getParent();return t}getData(){const e={};return Object.entries(this._$elements).forEach((([t,n])=>{e[t]=n.getData()})),e}getDataContext(){if(this._$dataContext)return this._$dataContext;else return this.initDataContext()}getDataContextFields(){const e=[];return Object.entries(this._$data).forEach((([t,n])=>{var r;const o=null===(r=this._$dataContextFieldsMap)||void 0===r?void 0:r[t];if((0,u.isDataContextField)(n,o)&&!d(t,e)){const r=this._$elements[t]?this._$elements[t].getData():n,i=(0,u.makeField)(t,r,o);if(i)e.push(i)}})),Object.values(this._$dataContextFieldsMap||{}).forEach((t=>{const n=t.name;if(void 0!==t.defaultValue&&!d(n,e)){const r=(0,u.makeField)(n,void 0,t);if(r)e.push(r)}})),e}initDataContext(){const e=this.getDataContextFields();if(this._$dataContext)return this._$dataContext.updateContext(e,this._$dataContextDescription),this._$dataContext;else return this._$dataContext=new l.default(e,this.getParentContext.bind(this),this._$dataContextDescription),this._$dataContext}getParentContext(){var e;return null===(e=this.getParent())||void 0===e?void 0:e.getDataContext()}clearDataContext(){if(this._$dataContext)this._$dataContext.destroy();this._$dataContext=void 0}getLoadResults(){return this._$data}reInitState(e){this.destroy(!0),this._initState(e)}update(e,t=!1){const n=this._getDataConfigs(e);if(n)this.updateElements(n,e.data||{},t);if(e.children)this.updateChildren(e.children,t)}updateChildren(e,t=!1){Object.entries(e).forEach((([e,n])=>{const r=this._$children.get(e);if(r)r.update(n,t);else this.addChild(e,n)}))}hasAliveChildren(){if(this.isAlive())return!0;for(const e of this._$children.values())if(e.hasAliveChildren())return!0;return!1}getLoadResult(e){let t=this,n=this._$data.hasOwnProperty(e),r=this._$data[e];for(;!n&&(null==t?void 0:t.getParent());){t=null==t?void 0:t.getParent();const o=null==t?void 0:t.getLoadResults();n=!!(null==o?void 0:o.hasOwnProperty(e)),r=null==o?void 0:o[e]}return r}
41getName(){return this._$name}getElement(e,t=!0){const n=this.getState()[e];if(!n&&t){const n=this.getParent();if(n)return n.getElement(e,t)}return n}isRoot(){return!!this._$props.isRoot}getNodeByPath(e){const[t]=e;let n=this.getChild(t);for(let t=1;t<e.length;t++){if(null==n)return null;const r=e[t];n=n.getChild(r)}return n}getChild(e){return this._$name===e?this:this._$children.get(e)||null}onDestroy(e){return this._$destroyListeners.push(e),()=>{this._$destroyListeners=this._$destroyListeners.filter((t=>t!==e))}}async reloadElement(e,t,n=!0){const r=this._$elements[e];if(!r)throw new Error(`Ð Ñзле конÑекÑÑа ${this.getName()} не найден ÑÐ»ÐµÐ¼ÐµÐ½Ñ ${e} попÑÑке его пеÑезагÑÑзиÑÑ`);const o=Object.entries(this._$relatedElements).reduce(((t,n)=>{const[r,o]=n;if(o.elements.includes(e)&&o.onChange)return[...t,r];else return t}),[]),s=await async function(){return(await(0,i.loadAsync)("Controls-DataEnv/dataLoader")).Loader}(),a=this.getConfigs(),l={...a[e]};l.dataFactoryArguments={...l.dataFactoryArguments,...t};const u={[e]:l};if(l.dependencies&&n)l.dependencies.forEach((e=>{u[e]=a[e]}));else l.dependencies=[];const c=await s.load(u,void 0,this._$props.router);if(!r.isDestroyed()){if(l.dependencies)l.dependencies.forEach((e=>{this.addElement(e,c[e],u[e])}));if(o)o.forEach((t=>{var n;const r=this._$relatedElements[t],o=null===(n=this.getElement(t))||void 0===n?void 0:n.getValue();if(r.onChange)r.onChange(e,c[e],l,o)}));this.addElement(e,c[e],l),this._$props.onChange(),this.initDataContext()}}setState(e={}){this._$elementOrder.forEach((t=>{const n=e[t];if(n)this._$elements[t].setState(n)})),this._$value={...this._$value}}updateElements(e,t,n=!1){this._$configs={...this._$configs,...e};const r={...this._$data};this._$data={...this._$data,...t};c(this._$configs).filter((t=>e.hasOwnProperty(t))).forEach((o=>{if(!n||!(0,a.isEqual)(t[o],r[o]))this.addElement(o,t[o],e[o])}))}updateRelatedConfigs(e,t){const n=this.getRelatedElements(e),r=this._$relatedElements[t];if(!r)this.update(e);else{n.nodes.forEach((t=>{var n;if(null===(n=e.children)||void 0===n?void 0:n[t])this.addChild(t,e.children[t])}));if(r.nodes.filter((e=>!n.nodes.includes(e))).forEach((e=>{const t=this._$children.get(e);if(t)if(t.destroy(!0),!t.hasAliveChildren())this._$children.delete(e)})),r.elements.length)r.elements.forEach((e=>{this.removeElement(e)}));if("configs"in e||"configGetter"in e){const t=this._getDataConfigs(e);this.updateElements(t,e.data||{})}}this._$relatedElements[t]=n,this.updateSliceChildren(t,n)}addElement(e,t,n){this.removeElement(e),this._$configs[e]=n,this._$data[e]=t;
41const o=new r.default({name:e,onChange:this._onChangeElement,onSnapshot:this._onElementSnapshot,config:n,loadResult:t,parentNode:this,dataContext:()=>this.getDataContext(),router:this._$props.router});if(this._$elements[e]=o,this._$value={...this._$value},this._$value[e]=this._$elements[e].getValue(),o.hasContextConfigs()){const e=o.getContextConfigs();if(e)this.updateRelatedConfigs(e,o.getName())}this._createElementOrder()}createElementsSync(e,t){c({...this.getConfigs(),...e}).forEach((n=>{if(e[n])this.addElement(n,t[n],e[n])}))}addChild(e,t,n,r,o){var i;if(this._$children.get(e))return void(null===(i=this._$children.get(e))||void 0===i||i.reInitState(t));const a=new h({router:this._$props.router,parentNode:this,dataContextDescription:t[s.CONTEXT_DATA_CONFIG_FIELD]||this._$dataContextDescription,contextConfigs:t.hasOwnProperty(s.STORE_ROOT_NODE_KEY)?t[s.STORE_ROOT_NODE_KEY]:t,name:e,onChange:n?()=>{n(),this._$props.onChange()}:this._$props.onChange,onSnapshot:this._$props.onSnapshot,getSlicesConfigNode:this._$props.getSlicesConfigNode,getSlicesConfig:o,isRoot:r});this._$children.set(e,a)}removeElement(e){if(this._$elements[e])this._$elements[e].destroy(),this._$value={...this._$value},delete this._$value[e],delete this._$elements[e],this.initDataContext()}getChanges(e,t){var n,r,o,i;const s={[t]:e},a=this.getState(),l=null===(n=null==a?void 0:a[t])||void 0===n?void 0:n.getValue(),u=null==l?void 0:l.state;for(const[n,l]of Object.entries(this._$elements)){const c=null===(r=l.getExtraValues)||void 0===r?void 0:r.call(l);if(!(null==c?void 0:c.length))continue;const d=null===(o=null==a?void 0:a[n])||void 0===o?void 0:o.getValue();for(const{dependencyName:r,dependencyPropName:o,propName:a,prepare:l}of c){const c=r===t,f="object"==typeof u,h=(null==u?void 0:u[o])!==e[o];if(!c||!f||!h)continue;let _=e[o];if(l){const e=null==d?void 0:d.state,t=s[n];_=l(_,t&&t.hasOwnProperty(a)?t[a]:null==e?void 0:e[a],e,u)}null!==(i=s[n])&&void 0!==i||(s[n]={}),s[n][a]=_}}return delete s[t],s}toObject(){const e={};if(Object.entries(this._$elements).forEach((([t,n])=>{e[t]=n.getValue()})),this._$children.size)e.children={},this._$children.forEach(((t,n)=>{e.children[n]=t.toObject()}));return e}destroyElements(){this._$isElementsDestroyed=!0,Object.keys(this._$elements).forEach((e=>{this.removeElement(e)}))}destroy(e=!1){this.destroyElements(),this.clearDataContext();const t=[];if(this._$children.forEach((n=>{if(!n.isRoot()||!e)if(n.destroy(e),!n.hasAliveChildren())t.push(n.getName())})),t.forEach((e=>{this.detachChildren(e)})),!e)this._$children.clear();if(!e&&!this._$children.size)this.detachFromParent(),this._$parentNode=null;this._$destroyListeners.forEach((e=>e()))}isAlive(){return!this._$isElementsDestroyed}detachFromParent(){const e=this.getParent();if(e){const t=this.getName();null==e||e.detachChildren(t),this.clearDataContext()}}detachChildren(e){var t;if(this._$children.has(e))null===(t=this._$children.get(e))||void 0===t||t.clearDataContext(),this._$children.delete(e)}static getDependencies(e){const t=Object.values(e).flatMap((e=>r.default.getDependencies(e)));return[...new Set(t)]}}return t.default=h,t}(0,{},C,L,m,r,x,f,je,F),Ie=function(e,t,n,r,o,i,s,a,l){"use strict";async function u(){return(await(0,s.loadAsync)("Controls-DataEnv/dataLoader")).Loader}Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e){var t;let n;if(this.version=0,this.listeners=[],this._$props=e,this._onContextSnapshot=this._onContextSnapshot.bind(this),this._onChange=this._onChange.bind(this),this._$root=e.root||"root",function(e){return!!e.configs}(e))n={configs:(null===(t=e.getSlicesConfig)||void 0===t?void 0:t.call(e,{...e.loadResults}))||{...e.configs},data:{...e.loadResults}};else if(e.dataConfigs.configs&&e.dataConfigs.loadResults){const t=new a.relation.Tree({parentProperty:"parentId",childrenProperty:"children",keyProperty:"name"}),r={...e.dataConfigs.configs},i={...e.dataConfigs.loadResults};if(Object.entries(e.dataConfigs.configs).forEach((([e,t])=>{const n={...t};if(!n.parentId&&"root"!==e)n.parentId="root";n.data=(null==i?void 0:i[e])||{},r[e]=n})),!r[o.STORE_ROOT_NODE_KEY])r[o.STORE_ROOT_NODE_KEY]={};let s;if(1===Object.keys(r).length)s=r;else t.parseTree(r),s=t.toObject();n=s[o.STORE_ROOT_NODE_KEY]||{}}else n={...e.dataConfigs.contextConfigs||e.dataConfigs};this._$value=new r.default({name:this._$root,contextConfigs:n.hasOwnProperty(o.STORE_ROOT_NODE_KEY)?n[o.STORE_ROOT_NODE_KEY]:n,dataContextDescription:n[o.CONTEXT_DATA_CONFIG_FIELD],router:e.router,parentNode:null,onSnapshot:this._onContextSnapshot,onChange:this._onChange,getSlicesConfig:e.getSlicesConfig,getSlicesConfigNode:e.getSlicesContextNodeName})}_onContextSnapshot(e,t){const n=this.getNodeByPath(t);if(n)n.setState(e)}setState(){this._$value.setState()}notifyOnChange(){this._onChange()}toObject(){return this._$value.toObject()}getDataContext(e){const t=this.getNodeByPath(e);if(!t)throw new Error("ÐолÑÑение конÑекÑÑа даннÑÑ
невозможно, возможно Ð²Ñ Ð´ÐµÐ»Ð°ÐµÑе вÑзов вне конÑекÑÑа");return t.getDataContext()}onNodeDestroy(e,t){const n=this.getNodeByPath(e);if(n)return n.onDestroy(t);else return()=>{}}getName(){return this._$props.name||""}
41getNodeValueByPath(e){var t;return(null===(t=this._$value.getNodeByPath(e))||void 0===t?void 0:t.getValue())||null}async reloadElement(e,t,n={},r=!0){const o=this._$value.getNodeByPath(e);if(!o)throw new Error(`Узел конÑекÑÑа ${e.join(". ")} не найден пÑи попÑÑке пеÑезагÑÑзиÑÑ ÑÐ»Ð°Ð¹Ñ ${t}`);const i=o.getElement(t),s=null==i?void 0:i.getParent();if(s)return s.reloadElement(t,n,r)}async createNode(e,t,n){const r=await async function(){return(await(0,s.loadAsync)("Controls-DataEnv/dataLoader")).DataContextLoader}();if(this._$value.getNodeByPath(e)){const o=await new r({configs:n,router:this._$props.router}).load();this.createNodeSync(e,t,o)}}createNodeSync(e,t,n,r){const o=this._$value.getNodeByPath(e);if(!o)return s=t,a="createNode",void i.logger.error(`RootContext:${a}::ÐÐ»ÐµÐ¼ÐµÐ½Ñ ÐºÐ¾Ð½ÑекÑÑа Ñ Ð¸Ð¼ÐµÐ½ÐµÐ¼ ${s} Ñже ÑÑÑеÑÑвÑеÑ`);var s,a;if(o.addChild(t,n),!r)this.notifyOnChange()}createRoot(e,t,n,r,o){const i=this._$value.getNodeByPath(e);if(i)i.addChild(t,n,r,!0,o)}async createElement(e,t,n){const r=await u(),o=await r.load({[t]:n},void 0,this._$props.router);this.createElementSync(e,t,n,o)}createElementSync(e,t,n,r){const o=this._$value.getNodeByPath(e);if(o)o.addElement(t,r,n),this.notifyOnChange()}async createElements(e,t){const n=await u(),r=await n.load(t);this.createElementsSync(e,t,r)}createElementsSync(e,t,n){const r=this._$value.getNodeByPath(e);if(r)r.createElementsSync(t,n),this.notifyOnChange()}subscribe(e){return this.listeners.push(e),()=>{const t=this.listeners.indexOf(e);if(-1!==t)this.listeners.splice(t,1)}}getElementsFromPath(e,t=!1){let r={};if(e){r={};let o=this.getNodeByPath(e);const i=[];for(;o;){const e=o.getValue();if(t){const t={};Object.entries(e).forEach((([e,r])=>{t[e]=r instanceof n.Slice?r.state:r})),i.push(t)}else i.push(e);o=o.getParent()}if(i.length)i.reverse().forEach((e=>{r={...r,...e}}))}return r}_onChange(){this.version=this.version+=1,(0,l.unstable_batchedUpdates)((()=>{this.listeners.forEach((e=>{e.apply(this,[])})),this._$props.onChange({})}))}getState(e=this._$root){var t;return(null===(t=this._$value.getNodeByPath([e]))||void 0===t?void 0:t.getValue())||{}}getElement(e,t){var n;const r=this.getNodeByPath(t);if(r)return null===(n=r.getElement(e))||void 0===n?void 0:n.getValue()}getNodeByPath(e){return this._$value.getNodeByPath(e)}getNode(e){return this.getNodeByPath([e])||this.getNodeByPath([this._$root])}update(e){this._$value.update(e,!0),this.notifyOnChange()}getVersion(){return this.version}updateNodeElements(e,t,n){const r=this._$value.getNodeByPath(e);if(r)r.updateElements(t,n);this.notifyOnChange()}updateNode(e,t){const n=this._$value.getNodeByPath(e);if(n)n.update(t)}updateRoot(e,t,n=!1){const r=this._$value.getNodeByPath(e);if(r)if(n)r.update(t,n);else r.reInitState(t)}replaceRoot(e,t){const n=this.getNodeByPath(t),r=this.getNodeByPath(e);if(n&&r)n.setParent(r)}destroyNode(e){const t=this._$value.getNodeByPath(e);if(t)t.destroy()}destroy(){this._$value.destroy(),this.listeners=[]}},t}(0,{},p,Fe,x,m,r,_,t),Ae=function(e,t,n,r,o,i,s,a,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const c=[];return t.default=function(e,t,d,f,h=!1){const _=(0,n.useContext)(o.default),g=(0,n.useContext)((0,l.getWasabyContext)()),v=(0,r.default)(),p=(0,n.useRef)(),C=v[i.CONTEXT_NODE_PATH]||c,[y,m]=(0,n.use
41State)(_&&C.length?`${s.applied.Guid.create()}__root`:i.STORE_ROOT_NODE_KEY),E=(0,n.useRef)([]),O=(0,n.useMemo)((()=>{const e=[...C,y];if(!(0,u.isEqual)(E.current,e))return e;else return E.current}),[C,y]);if(!E.current.length)E.current=O;const x=(0,n.useRef)();let b=x.current;if(!b)b=(null==_?void 0:_[i.CONTEXT_STORE_FIELD])||new a.default({dataConfigs:e,onChange:t,router:g.Router,getSlicesConfig:d,getSlicesContextNodeName:f});x.current=b;const P=(0,n.useMemo)((()=>{const t=e.contextConfigs||e,n=t.hasOwnProperty(i.STORE_ROOT_NODE_KEY)?t[i.STORE_ROOT_NODE_KEY]:t,r={};if(t.hasOwnProperty(i.CONTEXT_DATA_CONFIG_FIELD))r[i.CONTEXT_DATA_CONFIG_FIELD]=t[i.CONTEXT_DATA_CONFIG_FIELD];return{...n,...r}}),[e]);if(!p.current){if(C.length)b.createRoot(C,y,P,t,d)}else if(p.current!==e)b.updateRoot(O,P,h);if(E.current!==O)b.replaceRoot(C,E.current),E.current=O;return p.current=e,(0,n.useEffect)((()=>()=>{null==b||b.destroyNode(O)}),[O,b]),{store:b,rootKey:y}},t}(0,{},n,te,k,x,_,Ie,s,f),Me=function(e,t,n,r,o,i,s,a,l,u){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=o.forwardRef((function({dataConfigs:e,getSlicesConfig:t,isPartialUpdateMode:c,attrs:d,children:f,getSlicesContextNodeName:h},_){const g=o.useCallback((()=>{}),[]),v=o.useContext(l.default),p=o.useMemo((()=>{if("string"==typeof t)return(0,i.loadSync)(t);else return t}),[t]),C=o.useMemo((()=>{let t={};if(e.configs&&e.loadResults){const n=new u.relation.Tree({parentProperty:"parentId",childrenProperty:"children",keyProperty:"name"}),r={...e.configs},o={...e.loadResults};if(Object.entries(r).forEach((([e,t])=>{const n={...t};if(!n.parentId&&"root"!==e)n.parentId="root";n.data=(null==o?void 0:o[e])||{},r[e]=n})),!r[s.STORE_ROOT_NODE_KEY])r[s.STORE_ROOT_NODE_KEY]={};let i;if(1===Object.keys(r).length)i=r;else n.parseTree(r),i=n.toObject();t=i[s.STORE_ROOT_NODE_KEY]||{}}else t={...e.contextConfigs||e};return t}),[e]),{store:y,rootKey:m}=(0,a.default)(C,g,p,h,c),E=o.useMemo((()=>{var e;if(null===(e=null==v?void 0:v.path)||void 0===e?void 0:e.length)return[...v.path,m];else return[m]}),[v.path,m]),O=o.useMemo((()=>({dataLayoutId:m,path:E})),[E,m]),x=o.useMemo((()=>({[s.CONTEXT_STORE_FIELD]:y,rootKey:m,configs:C})),[y,m,C]),b=o.useMemo((()=>{const e={};if(_)e.ref=_;if(d)e.attrs=d;return e}),[_,d]);return(0,n.jsx)(l.default.Provider,{value:O,children:(0,n.jsx)(r.default.Provider,{value:x,children:o.cloneElement(f,b)})})})),t}(0,{},e,k,n,r,x,Ae,D,_),Be=Me,Ve=function(e,t,n,r,o,i,s){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.DataContextProvider=void 0,t.DataContextProvider=i.forwardRef((function({children:e,loadResults:t,configs:a,dataLayoutId:l,value:u,getSlicesConfig:c,...d},f){const h=i.useMemo((()=>{if(u&&(!t||!a))return{contextConfigs:{configs:r.DataConfigResolver.convertLoadResultsToFactory(u),data:u}};else return{contextConfigs:{configs:a||{},data:t||{}}}}),[a,t,u]);return l?(0,n.jsx)(s.default,{dataLayoutId:l,ref:f,attrs:d.attrs,children:e}):(0,n.jsx)(o.default,{isRoot:!1,dataConfigs:h,getSlicesConfig:c,attrs:d.attrs,children:(0,n.jsx)(s.default,{ref:f,children:i.cloneElement(e,{...d,...e.props})})})})),t}(0,{},e,C,Me,n,ie),we=Ve,O.FIELD_TYPE=O.normalizeContextField=O.makeField=O.isDataContextField=O.ServerContext=O.getServerContext=O.FormContext=O.useContextDescription=O.useContextActionExecutor=O.useStrictSliceActions=O.FetchPolicyEnum=O.DataContextAPI=O.useSliceActions=O.useSelector=O.FormContainer=O.useDataContextProxyValue=O.DataContextProxy=O.registerBindingResolver=O.useDataAggregator=O.useBind=O.clearProps=O.useConnectedValue=O.useContextEdit=O.useFormReadonly=O.useContextNode=O.useStrictSlice=O.useSliceOld=O.useSlice=O.RootContext=O.RootContextProvider=O.CONTEXT_DATA_CONFIG_FIELD=O.STORE_ROOT_NODE_KEY=O.DataContext=O.Provider=void 0,Object.defineProperty(O,"Provider",{enumerable:!0,get:function(){return we.DataContextProvider}}),Object.defineProperty(O,"DataContext",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(O,"STORE_ROOT_NODE_KEY",{enumerable:!0,get:function(){return b.STORE_ROOT_NODE_KEY}}),Object.defineProperty(O,"CONTEXT_DATA_CONFIG_FIELD",{enumerable:!0,get:function(){return b.CONTEXT_DATA_CONFIG_FIELD}}),Object.defineProperty(O,"RootContextProvider",{enumerable:!0,get:function(){return Be.default}}),Object.defineProperty(O,"RootContext",{enumerable:!0,get:function(){return X.default}}),Object.defineProperty(O,"useSlice",{enumerable:!0,get:function(){return he.default}}),Object.defineProperty(O,"useSliceOld",{enumerable:!0,get:function(){return ye.default}}),Object.defineProperty(O,"useStrictSlice",{enumerable:!0,get:function(){return Ee.default}}),Object.defineProperty(O,"useContextNode",{enumerable:!0,get:function(){return ne.default}}),Object.defineProperty(O,"useFormReadonly",{enumerable:!0,get:function(){return W.useFormReadonly}}),Object.defineProperty(O,"useContextEdit",{enumerable:!0,get:function(){return q.useContextEdit}}),Object.defineProperty(O,"useConnectedValue",{enumerable:!0,get:function(){return Te.useConnectedValue}}),Object.defineProperty(O,"clearProps",{enumerable:!0,get:function(){return Te.clearProps}}),Object.defineProperty(O,"useBind",{enumerable:!0,get:function(){return ue.useBind}}),Object.defineProperty(O,"useDataAggregator",{enumerable:!0,get:function(){return Re.default}}),Object.defineProperty(O,"registerBindingResolver",{enumerable:!0,get:function(){return K.registerBindingResolver}}),Object.defineProperty(O,"DataContextProxy",{enumerable:!0,get:function(){return Pe.default}}),Object.defineProperty(O,"useDataContextProxyValue",{enumerable:!0,get:function(){return Pe.useDataContextProxyValue}}),Object.defineProperty(O,"FormContainer",{enumerable:!0,get:function(){return pe.default}}),Object.defineProperty(O,"useSelector",{enumerable:!0,get:function(){return oe.default}}),Object.defineProperty(O,"useSliceActions",{enumerable:!0,get:function(){return ge.default}}),Object.defineProperty(O,"DataContextAPI",{enumerable:!0,get:function(){return De.default}}),Object.defineProperty(O,"FetchPolicyEnum",{enumerable:!0,get:function(){return R.FetchPolicyEnum}}
41),Object.defineProperty(O,"useStrictSliceActions",{enumerable:!0,get:function(){return xe.default}}),Object.defineProperty(O,"useContextActionExecutor",{enumerable:!0,get:function(){return ee.default}}),Object.defineProperty(O,"useContextDescription",{enumerable:!0,get:function(){return de.default}}),Object.defineProperty(O,"FormContext",{enumerable:!0,get:function(){return $.default}}),Object.defineProperty(O,"getServerContext",{enumerable:!0,get:function(){return V.default}}),Object.defineProperty(O,"ServerContext",{enumerable:!0,get:function(){return V.ServerContext}}),Object.defineProperty(O,"isDataContextField",{enumerable:!0,get:function(){return I.isDataContextField}}),Object.defineProperty(O,"makeField",{enumerable:!0,get:function(){return I.makeField}}),Object.defineProperty(O,"normalizeContextField",{enumerable:!0,get:function(){return I.normalizeContextField}}),Object.defineProperty(O,"FIELD_TYPE",{enumerable:!0,get:function(){return M.FIELD_TYPE}}),O})); 42define("Controls-DataEnv/dataFactory",["i18n!Controls-DataEnv","i18n!Controls","WasabyLoader/ModulesLoader","UI/Focus","UI/Deps","Types/util","Types/guards","Types/entity","Types/chain","Controls-DataEnv/slice","Browser/Transport","Application/Env","require","exports"],(function(e,t,r,i,n,o,a,s,c,l,u,d,h,f){var _,g,p,v,y,A,m,D,T,E,C,O,P,b,S,R,F,w,j,L,M,U,I,N,x,V,Y,G,$,k,z,X,W;return Object.defineProperty(f,"__esModule",{value:!0}),function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.CONTEXT_DATA_CONFIG_FIELD=t.CONTEXT_NODE_PATH=t.CONTEXT_STORE_FIELD=t.STORE_ROOT_NODE_KEY=void 0,t.STORE_ROOT_NODE_KEY="root",t.CONTEXT_STORE_FIELD=Symbol.for("ContextStoreField"),t.CONTEXT_NODE_PATH=Symbol("$_CONTEXT_NODE_PATH_$"),t.CONTEXT_DATA_CONFIG_FIELD="$_CONTEXT_DATA_CONFIG_$",t}(0,{}),_=function(e,t,r,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class o extends r.Slice{load(e,t){const r=e.config.configs[t];if(r){const n=(0,i.loadSync)("Controls-DataEnv/dataLoader").Loader.load(r);if(n instanceof Promise)return new Promise(((r,i)=>{this._promiseReject=i,n.then((i=>{this._promiseReject=null;const o={...this.state.results,[t]:i};if(!this.isDestroyed())this.setState({results:o});r({...n,config:e.config,results:o})}))}))}else n.logger.error("Area:Initializer: Указан не ÑÑÑеÑÑвÑÑÑий клÑÑ.");return Promise.resolve(e)}_initState(e,t){return{...e,config:t}}destroy(){var e;null===(e=this._promiseReject)||void 0===e||e.call(this),super.destroy()}}return t.default=o,t}(0,{},l,r,d),g=_,p=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i{static loadData(e,t,r){if(!(null==e?void 0:e.loadDataMethod))return Promise.resolve(void 0);else return e.loadDataMethod(e.loadDataMethodArguments,t,r)}}return i.slice=r.Slice,t.default=i,t}(0,{},l),v=p,y=function(e,t,r,i,n){"use strict";function o(e,t,r){const i=e instanceof Function?e:e.getConfig;let n=t.configGetterArgumentsArray||[t.configGetterArguments];return n=[...n],n.push(r),i.apply(null,n)}Object.defineProperty(t,"__esModule",{value:!0}),t.callGetConfig=void 0;const a="Controls-DataEnv/dataFactory:DataConfigResolver",s={list:"Controls-DataEnv/compatibleList:CompatibleList",custom:"Controls-DataEnv/dataFactory:CompatibleCustom",area:"Controls-DataEnv/dataFactory:CompatibleArea"};t.callGetConfig=o;class c{static getConfigFromLoaderSync(e,t){if(e.isResolvedConfigGetter)return c.normalizeConfigs(e.configGetter);if(!(0,r.isLoaded)(e.configGetter))throw new Error(`${a}::configGetter Ñ Ð¸Ð¼ÐµÐ½ÐµÐ¼ ${e.configGetter} не загÑÑжен`);else{const i=(0,r.loadSync)(e.configGetter);if(!i)throw new Error(`${a} ÐодÑÐ»Ñ ${e.configGetter} ниÑего не ÑкÑпоÑÑиÑÑеÑ`);else{let r=o(i,e,t);if(!(r instanceof Object))n.logger.error(`ÐеÑод getConfig из модÑÐ»Ñ ${e.configGetter} должен возвÑаÑаÑÑ Ð¾Ð±ÑÐµÐºÑ Ñ Ð½Ð°Ð±Ð¾Ñом ÑабÑик даннÑÑ , ÑейÑÐ°Ñ Ð²Ð¾Ð·Ð²ÑаÑаеÑÑÑ\n ${i}`),r={};return c.normalizeConfigs(r)}}}static isDataFactory(e){return Object.values(e).every((e=>e.hasOwnProperty("dataFactoryName")))}static isDataConfigs(e){return c.isDataFactory(e)}static isFlatContextConfig(e){return e instanceof Object&&!!e.loadResults&&c.isDataConfigs(e.configs)}static isFlatObjectTree(e){return"object"==typeof e&&Object.values(e).some((e=>e.hasOwnProperty("parentId")&&!!e.parentId))}static isIHierarchyContextConfig(e){return e instanceof Object&&!!e.loadResults&&c.isFlatObjectTree(e.configs)}static normalizeConfigs(e){const t={};return Object.entries(e).forEach((([e,r])=>
42{if(!c.isDataFactory([r]))t[e]=c.convertToDataConfig(r);else t[e]=r})),t}static convertToDataConfig(e){const t=e,r=e.type||"list";return{dataFactoryName:s[r],dataFactoryArguments:{...t,loadDataTimeout:t.loadDataTimeout||t.loadTimeout},dependencies:e.dependencies,afterLoadCallback:e.afterLoadCallback}}static async loadConfigGetter(e,t){const s=await async function(e){try{const t=await(0,r.loadAsync)(e);return(0,i.addPageDeps)([e]),t}catch(t){if(t instanceof Error)n.logger.error(`${a} ÐÑибка пÑи загÑÑзке модÑÐ»Ñ ${e}`,0,t)}}(e.configGetter);let l={};if(!s)throw new Error(`${a}:: Ðе ÑдалоÑÑ Ð·Ð°Ð³ÑÑзиÑÑ Ð¼Ð¾Ð´ÑÐ»Ñ ${e.configGetter}`);else{const r=o(s,e,t),i=!!r.then;if(i)l=await r;else l=r;if(c.isDataFactory(l)){if(i)throw new Error(`${a} ÐеÑод Ð´Ð»Ñ Ð¿Ð¾Ð»ÑÑÐµÐ½Ð¸Ñ ÐºÐ¾Ð½Ñига Ñ Ð¼Ð¾Ð´ÑÐ»Ñ ${e.configGetter} должен бÑÑÑ ÑинÑ
ÑоннÑм, загÑÑзка Ñ Ð°ÑинÑ
ÑоннÑм меÑодом невозможна`)}else l=c.normalizeConfigs(l)}return l}static addCompatibleDepsToPage(){(0,i.addPageDeps)(Object.values(s))}static isOldDataFormat(e){return Object.values(e).some((e=>!e.dataFactoryName))}static convertLoadResultsToFactory(e,t){const r={};return Object.entries(e).forEach((([e,i])=>{const n=i instanceof Object;let o=n&&i.dataFactoryName;if(!o){o=n&&i.type&&!!s[i.type]?s[i.type]:s.custom}const a=t&&t[e],l=a&&!c.isOldDataFormat({[e]:a}),u=n&&!c.isOldDataFormat({[e]:i}),d=n&&i.key;if(l||u)r[d||e]=a?t[e]:i;else r[d||e]={dataFactoryName:o,dataFactoryArguments:i,afterLoadCallback:n?i.afterLoadCallback:void 0,dependencies:n&&i.dependencies?i.dependencies:[]};if(d)r[e]=r[d]})),r}static resolveRootDeps(e,t){const r={};for(const[i,n]of Object.entries(e))for(const[,e]of Object.entries(n)){const o=c.calcAllDependencies(e,t),a=[];if(o.forEach((e=>{if(!n.hasOwnProperty(e))a.push(e)})),a.length)r[i]=a}return r}static calcAllDependencies(e,t){let r=e.dependencies||[];const i=e.dataFactoryArguments||{},n="load"===t?i.loaderExtraValues:i.sliceExtraValues;if(n){const e=n.map((({dependencyName:e})=>e));r=r.concat(e.filter((e=>!r.includes(e))))}return r}}return t.default=c,t}(0,{},r,n,d),A=y,m=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionManager=void 0;return t.ActionManager=class{constructor(){this._actions={}}startAction(e,t=[]){const r=this._actions[e];return Promise.resolve(null==r?void 0:r(...t))}registerAction(e,t){this._actions[e]=t}unregisterAction(e){delete this._actions[e]}hasRegisterAction(e){return!!this._actions[e]}},t}(0,{}),D=function(e,t,r,i){"use strict";function n(e){return!(!e||!e.isChanged())}Object.defineProperty(t,"__esModule",{value:!0}),t.ConfirmationManager=void 0;return t.ConfirmationManager=class{constructor(e){this._isDisplayed=!1,this._options=function(e={}){return{message:(null==e?void 0:e.message)||r("СоÑ
ÑаниÑÑ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ?"),needShowConfirmationCallback:(null==e?void 0:e.needShowConfirmationCallback)||n}}(e)}confirmSave(e){if(this._isDisplayed)return Promise.resolve();if(this._needShowConfirmation(e))this._showPopup().then((e=>{if(this._isDisplayed=!1,!0===e)return Promise.resolve(!0);else return Promise.reject()})).catch((()=>{this._isDisplayed=!1}));else return Promise.resolve(!0);return Promise.resolve(!0)}reset(){this._isDisplayed=!1}_needShowConfirmation(e){return this._options.needShowConfirmationCallback(e)}async _showPopup(){this._isDisplayed=!0;const{Confirmation:e}=await(0,i.loadAsync)("Controls/popup");return e.openPopup({message:this._options.message,type:"yesno"},null)}},t}(0,{},e,r),T=function(e,t,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorManager=void 0;return t.ErrorManager=class{async processSourceError(e){return(await this._getErrorController()).process({error:e}).then((t=>{if(t)this._showError(t);if(e instanceof i.RPC.Error)throw e}))}async _showError(e){(await this._getDialogOpener()).open(e,{opener:null,modal:!1})}async _getErrorController(){if(this._errorController)return Promise.resolve(this._errorController);const{ErrorController:e}=await(0,r.loadAsync)("Controls/error");return new e}
42async _getDialogOpener(){if(this._dialogOpener)return Promise.resolve(this._dialogOpener);const{DialogOpener:e}=await(0,r.loadAsync)("Controls/error");return new e}},t}(0,{},r,u),E=function(e,t){"use strict";var r;return Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_USERDATA_PROPERTY=t.DEFAULT_DATA_PROPERTY=t.FormSliceActionType=void 0,function(e){e.Save="fullSave",e.PartialUpdate="partial"}(r||(t.FormSliceActionType=r={})),t.DEFAULT_DATA_PROPERTY="record",t.DEFAULT_USERDATA_PROPERTY="UserData",t}(0,{}),C=E,O=function(e,t,r,i,n){"use strict";function o(e){return!0===e?s.valid:s.invalid}var a,s;Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationSlice=t.VALIDATION_STATE=t.TValidationStatus=void 0,function(e){e.Valid="valid",e.Invalid="invalid",e.InvalidAccent="invalidAccent"}(a||(t.TValidationStatus=a={})),function(e){e.valid="valid",e.invalid="invalid",e.invalidAccent="invalidAccent"}(s||(t.VALIDATION_STATE=s={}));class c extends r.Slice{constructor(){super(...arguments),this._validators={}}get validationState(){return this.state.validationState||{}}get(e){}registerValidators(e,t,r){if(!(null==r?void 0:r.current))i.logger.warn(`ÐÑибка ÑегиÑÑÑаÑии валидаÑоÑа: не Ñказан ref на Ð²Ð¸Ð´Ð¶ÐµÑ Ð´Ð»Ñ ${e}. ФокÑÑ Ð¿Ñи валидаÑии невозможен.`);this._validators[e]={ref:r,callbacks:t}}unRegisterValidators(e){delete this._validators[e]}async validate(e,t=!0){const r=await this._validate(e,t);return this.setState({validationState:{...this.validationState,[e]:o(r)}}),r}resetValidation(e){if(this.validationState[e]&&this.validationState[e]!==a.Valid)this._closeInfobox(),this.setState({validationState:{...this.validationState,[e]:a.Valid}})}validateAll(){return this.validateSome(Object.keys(this._validators))}validateSome(e){this._closeInfobox();const t=[];return e.forEach((e=>{t.push(this._validate(e,!1))})),Promise.all(t).then((t=>{var r;const i={},n=[];for(let c=0;c<t.length;c++){const l=t[c],u=o(l);if((u===a.Invalid||u===a.InvalidAccent)&&((s=l)&&(null==s?void 0:s.msg)))if(null===(r=l.validator.ref)||void 0===r?void 0:r.current)n.push(t[c]);i[e[c]]=u}var s;if(n.length){const[e]=n;this._activateValidatorInput(null==e?void 0:e.validator),this._showInfobox(e.validator,e.msg)}return this.setState({validationState:i}),t}))}isValid(){let e=!0;for(const t of Object.values(this.validationState))if(t===a.Invalid||t===a.InvalidAccent)e=!1;return e}focus(e){let t=!1;for(const r in this.validationState)if(r===e){if(this.validationState[r]!==a.Valid&&this.validationState[r]!==a.InvalidAccent)t=!0,this.setState({validationState:{...this.validationState,[r]:a.InvalidAccent}})}else if(this.validationState[r]!==a.Valid)this.setState({validationState:{...this.validationState,[r]:s.invalid}});return t}_activateValidatorInput(e){var t,r;if(!(null===(t=e.ref)||void 0===t?void 0:t.current));else(0,n.activate)(null===(r=e.ref)||void 0===r?void 0:r.current,{enableScrollToElement:!0})}_validate(e,t=!0){if(t)this._closeInfobox();if(this._validators[e]){let r=!0;const i=[];let n;return this._validators[e].callbacks.map((t=>{const o=t({value:this.get(e)});if(o instanceof Promise)return o.then((e=>{if(!0!==e)if(r=!1,!n)n=e})),i.push(o);if(!0!==o){if(r=!1,!n)n=o;i.push(Promise.resolve(o))}})),Promise.all(i).then((()=>
42{if(t&&n)this._showInfobox(this._validators[e],n);return r?r:{msg:n,validator:this._validators[e]}}))}return Promise.resolve(!0)}_showInfobox(e,t){this._infoboxOpenerCb((()=>{var r;if(t&&(null===(r=e.ref)||void 0===r?void 0:r.current)){const r=function(e){if(!e)return null;else return e}(e.ref.current);if(r)this._infoboxOpener.openPopup({target:r,message:t,...this._getInfoboxPopupOptions()})}}))}_getInfoboxPopupOptions(){return{closeOnOutsideClick:!1,borderStyle:"danger"}}_closeInfobox(){this._infoboxOpenerCb((()=>{this._infoboxOpener.closePopup()}))}_infoboxOpenerCb(t){if(this._infoboxOpener)t();else new Promise(((t,r)=>{e(["Controls/popup"],t,r)})).then((({Infobox:e})=>{this._infoboxOpener=e,t()})).catch((function(e){requirejs.onError(e)}))}}return t.ValidationSlice=c,t}(h,{},l,d,i),P=O,b=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.createLoader=void 0,t.createLoader=function(e){const{source:t,sourceOptions:r}=e;if(t)if(function(e){const t={construct:()=>t};try{return!!new new Proxy(e,t)}catch(e){return!1}}(t))return new t(r);else return t(r)},t}(0,{}),S=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.getFieldDeclaration=void 0,t.getFieldDeclaration=function(e,t){const i=(0,r.getValueType)(t);if(null!==i&&"object"==typeof i)return{name:e,...i};else return{name:e,type:i}},t}(0,{},s),R=function(e,t,r,i){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.resolveActionFunction=void 0,t.resolveActionFunction=async function(e,t){if(e){if("function"==typeof e)return e;const t=await(0,r.loadAsync)(e).catch((e=>{throw i.logger.error(e),e}));if("function"==typeof t)return t;else{const t=new Error(`ÐодÑÐ»Ñ ${e} должен возвÑаÑаÑÑ ÑÑнкÑиÑ.`);throw i.logger.error(t),t}}if(!t)return i.logger.error("Ðе пеÑедана ÑеализаÑÐ¸Ñ Ð¿Ð¾ ÑмолÑаниÑ"),Promise.reject();else return t},t}(0,{},r,d),F=function(e,t,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{static loadData(e,t,r){const n=[];return e.initialKeys.forEach((t=>{n.push((0,i.loadSync)("Controls-DataEnv/dataLoader").Loader.load(e.configs[t],void 0,r).then((e=>({[t]:e}))))})),Promise.all(n).then((e=>{let t={};return e.forEach((e=>{t={...t,...e}})),{results:t,type:"area"}}))}}return n.slice=r.default,t.default=n,t}(0,{},_,r),w=F,j=function(e,t,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends i.Slice{constructor(){super(...arguments),this["[ICompatibleSlice]"]=!0}}class o extends r.default{}return o.slice=n,t.default=o,t}(0,{},p,l),L=j,M=function(e,t,r,i,n,o,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_FORM_SLICE_NAME=t.NewFormSlice=void 0;class c extends r.ValidationSlice{constructor(){super(...arguments),this._dataContextChanged=!1}_initState(e,t){var r;return this._dataContextUnsubscribe=null===(r=this.dataContext)||void 0===r?void 0:r.onChange((e=>{this._dataContextChanged=!0,this.resetValidation(e)})),this._customSubmit=t.submit,this._submitArguments=t.submitArguments,this._router=t.router,this._errorManager=new i.ErrorManager,this._actionManager=new o.ActionManager,{validationState:{}}}get(e){var t;return null===(t=this.dataContext)||void 0===t?void 0:t.getByPath(e)}async submit(){const e=await this.startAction("save");if(null==e?void 0:e.canceled)return Promise.resolve({canceled:!0});else return this._submit()}async delete(){return this._delete()}hasChanges(){return!!this._dataContextChanged}destroy(){var e,t;null===(e=this._dataContextUnsubscribe)||void 0===e||e.call(this),null===(t=this._pe
42ndingResolveFunction)||void 0===t||t.call(this)}registerAction(e,t){this._actionManager.registerAction(e,t)}hasRegisterAction(e){return this._actionManager.hasRegisterAction(e)}unregisterAction(e){this._actionManager.unregisterAction(e)}startAction(e){return this._actionManager.startAction(e)}initChangePending(){if(!this._actionManager.hasRegisterAction("registerPending"))throw new Error("ФÑнкÑÐ¸Ñ ÑегиÑÑÑаÑии пендинга не опÑеделена на ÑлайÑе.");const e=new Promise((e=>{this._pendingResolveFunction=e}));this._actionManager.startAction("registerPending",[e,{showLoadingIndicator:!1,validate:()=>(this._actionManager.startAction("beforeCancel"),this.hasChanges()),onPendingFail:e=>{this._actionManager.startAction("cancel").then((()=>{this._showConfirmDialog(e)}))}}])}_showConfirmDialog(e){if(void 0!==e)this._confirmDialogResult(e);else this._showConfirmPopup("yesnocancel",s("ЧÑÐ¾Ð±Ñ Ð¿ÑодолжиÑÑ ÑедакÑиÑование, нажмиÑе «ÐÑмена»")).then((e=>(this._confirmDialogResult(e),e)))}async _confirmDialogResult(e){if(!0===e){if(await this.validateAll(),!this.isValid())return this._actionManager.startAction("cancelFinishingPending");this.submit().then((e=>{if(this._pendingResolveFunction)this._pendingResolveFunction(),this._pendingResolveFunction=void 0;return e}),(()=>{this._actionManager.startAction("cancelFinishingPending")}))}else if(!1===e){if(this._pendingResolveFunction)this._pendingResolveFunction(),this._pendingResolveFunction=void 0}else this._actionManager.startAction("cancelFinishingPending")}async _showConfirmPopup(e,t){const{Confirmation:r}=await(0,a.loadAsync)("Controls/popup");return r.openPopup({message:s("СоÑ
ÑаниÑÑ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ?"),details:t,type:e})}async _submit(){return this._callWithLongOperationTracking(this._customSubmit,this._defaultSubmit,[this.dataContext,this._router,this._submitArguments]).catch((e=>(this._errorManager.processSourceError(e),Promise.reject(e))))}async _delete(){return this._callWithLongOperationTracking(this._customSubmit,this._defaultDelete,[this.dataContext,this._router])}async _callWithLongOperationTracking(e,t,r){const i=await(0,n.resolveActionFunction)(e,t.bind(this));return this._withLongOperationTracking((()=>i(...r)))}_withLongOperationTracking(e){this.startAction("longOperationStart");const t=e();return Promise.resolve(t).then((e=>(this._dataContextChanged=!1,e))).finally((()=>{this.startAction("longOperationEnd")}))}async _defaultDelete(){var e;try{return await(null===(e=this.dataContext)||void 0===e?void 0:e.execute("Destroy",{}))}catch(e){return this._errorManager.processSourceError(e)}}async _defaultSubmit(){var e;const t=await(null===(e=this.dataContext)||void 0===e?void 0:e.execute("Send",{}));return this._dataContextChanged=!1,t}}return t.NewFormSlice=c,t.DEFAULT_FORM_SLICE_NAME="NewFormSlice",t}(0,{},O,T,R,m,r,t),U=M,I=function(e,t,r,i,n,o){"use strict";function a(e){return"object"==typeof e&&!e["[Types/_entity/IObject]"]}function s(e){return"object"==typeof e&&!!e["[Types/_entity/IObject]"]}return Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeValueToSet=t.isPlainObject=t.isIObject=t.setPropertyValue=void 0,t.setPropertyValue=function(e,t,r){if(s(e))return function(e,t,r){if(!e.has(t))e.addField((0,n.getFieldDeclaration)(t,r));return i.object.setPropertyValue(e,t,r),r}(e,t,r);if(a(e))return function(e,t,r){return e[t]=r}(e,t,r);else return},t.normalizeValueToSet=function(e,t){let i=t;if(t instanceof r.Record&&e instanceof r.Record&&(n=e.getAdapter(),a=t.getAdapter(),!Object.getPrototypeOf(n).isPrototypeOf(a)))i=function(e,t){const r=(0,o.factory)(e).toObject();return e.constructor.fromObject(r,t,e.getTypeName())}(t,e.getAdapter());var n,a;return i},t.isPlainObject=a,t.isIObject=s,t}(0,{},s,o,S,c),N=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.isDataNodeConfigs=t.isDataNodeConfigGetter=void 0,t.isDataNodeConfigGetter=function(e){return e instanceof Object&&!!e.configGetter},t.isDataNodeConfigs=function(e){return e instanceof Object&&!!e.configs},t}(0,{}),x=N,V=function(e,t,r,i){"use strict";
42Object.defineProperty(t,"__esModule",{value:!0});class n extends i.default{constructor(){super(...arguments),this["[ICompatibleSlice]"]=!0}}class o extends r.default{}return o.slice=n,t.default=o,t}(0,{},F,_),Y=V,G=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i{static loadData(){return Promise.resolve({})}}return i.slice=r.NewFormSlice,t.default=i,t}(0,{},M),$=G,k=function(e,t,r,i,n,o,a,s,c,l,u,d){"use strict";function h(e,t,r){if(!e||0===t.length)return;let n=e;for(let e=0;e<t.length-1;e++)if(n=i.object.getPropertyValue(n,t[e]),!n)return;const o=t[t.length-1];return(0,l.setPropertyValue)(n,o,r)}Object.defineProperty(t,"__esModule",{value:!0}),t.injectValue=t.DataWrapper=void 0;const f=".",_={create:"Create",read:"Read",update:"Write",destroy:"Destroy"};class g extends d.NewFormSlice{constructor(){super(...arguments),this._isChanges=!1,this._moduleName="Controls-DataEnv/dataFactory:FormSlice"}_initState(e,t){super._initState(e,t),this._config=t;const r=new v(this._normalizeLoadResults(e),{newRecord:!t.id});return this._onDataSave=t.onDataSave||p,this._onDataLoad=t.onDataLoad||p,this._onDataChange=t.onDataChange||p,this._confirmationManager=new a.ConfirmationManager(null==t?void 0:t.confirmationOptions),this._errorManager=new s.ErrorManager,this._onDataLoad(r,this),{key:t.id||r.getId(),store:r,readOnly:t.readOnly,loader:(0,o.createLoader)(t),validationState:{},version:0,crudContract:(i=t.crudContract,{..._,...i}),error:this._getErrorState(e)};var i}_beforeApplyState(e){if(e.store.getStore()&&this.store.getStore()!==e.store.getStore())this._beforeRecordClose();if(e.record&&e.record!==this.store.getStore())e.store=new v(this._normalizeLoadResults(e.record));return super._beforeApplyState(e)}setEditing(e){this.setState({editing:e})}get readOnly(){return this.state.readOnly}setReadOnly(e){if(this.state.readOnly!==e)this.setState({readOnly:e})}async send(){var e;const t=await this.startAction("save");if(null==t?void 0:t.canceled)return Promise.reject();else return null===(e=this.dataContext)||void 0===e?void 0:e.execute("Send",{}).then((e=>(this._isChanges=!1,e))).catch((e=>(this._errorManager.processSourceError(e),e)))}async contextDestroy(){var e;return null===(e=this.dataContext)||void 0===e?void 0:e.execute(this.state.crudContract.destroy).catch((e=>(this._errorManager.processSourceError(e),e)))}hasChanges(){return this._isChanges}create(e){if(this._isLocalData)throw new Error(`${this._moduleName} Ðе задан иÑÑоÑник в опÑии source.`);return this.loader.create(e||this._config.createMetaData).then((e=>{this.setState({store:new v(e),error:this._getErrorState(e)}),this._isChanges=!1})).catch((e=>this._errorManager.processSourceError(e)))}read(e){if(this._isLocalData)throw new Error(`${this._moduleName} Ðе задан иÑÑоÑник в опÑии source.`);return this._beforeRecordClose().then((()=>this.loader.read(this.key,e||this._config.readMetaData).then((e=>{this.setState({store:new v(e),error:this._getErrorState(e)}),this._isChanges=!1})).catch((e=>this._errorManager.processSourceError(e)))))}async update(e=c.FormSliceActionType.PartialUpdate,t){var r;if(this._isLocalData)return null===(r=this._onDataSave)||void 0===r||r.call(this,this._getStoreRecord(),e),Promise.resolve();const i=this.store.get(c.DEFAULT_USERDATA_PROPERTY)?this.store.getStore():this.store.get(c.DEFAULT_DATA_PROPERTY);return await this.startAction("save"),this.loader.update(i,t).then((()=>{var t;return null===(t=this._onDataSave)||void 0===t||t.call(this,this._getStoreRecord(),e),this._isChanges=!1,!0})).catch((e=>this._errorManager.processSourceError(e)))}async delete(e){if(this._isLocalData)throw new Error(`${this._moduleName} Ðе задан иÑÑоÑник в опÑии source.`);return this.loader.destroy(this.key,e||this._config.destroyMetaData).catch((e=>this._errorManager.processSourceError(e)))}async submit(){return this.send()}initChangeRecordPending(){this.initChangePending()}get(e){return this.store.get(e)}set(e,t){var r,i;const n=this.store.get(e),o=this.store.set(e,t);if(o)this._isChanges=!0,null===(r=this._onDataChange)||void 0===r||r.call(this,this,o,{property:e,previousValue:n,nextValue:t}),null===(i=this._onChange)||void 0===i||i.call(this),this._upVersion()}has(e){return this.store.has(e)}isApplicationObject(){return this._getStoreRecord().isTyped()}isChanged(){return this._getStoreRecord().isChanged()}destroy(){this._onDataChange=null,this._onDataSave=null,this._onDataLoad=null,
42super.destroy()}getCloneRecord(){var e;return null===(e=this._getStoreRecord())||void 0===e?void 0:e.clone()}getData(){return this._getStoreRecord()}mergeData(e){this._getStoreRecord().merge(e)}deepMergeData(e){this._getStoreRecord().deepMerge(e),this._upVersion()}_upVersion(){if(void 0!==this.state.version)this.setState({version:this.state.version+1})}get _isLocalData(){return!this.loader}_normalizeLoadResults(e){if(!e||e instanceof Error)return new r.Model({});if((null==e?void 0:e.has(c.DEFAULT_DATA_PROPERTY))||(null==e?void 0:e.has(c.DEFAULT_USERDATA_PROPERTY))&&e.getTypeName()!==c.DEFAULT_USERDATA_PROPERTY)return e;const t=new r.Model({adapter:e.getAdapter()});return t.addField({name:c.DEFAULT_DATA_PROPERTY,type:"record"}),t.set(c.DEFAULT_DATA_PROPERTY,e),t.acceptChanges([c.DEFAULT_DATA_PROPERTY]),t}_getStoreRecord(){return this.store.getStore().get(c.DEFAULT_DATA_PROPERTY)}_beforeRecordClose(){if(!this.store.getStore())return Promise.resolve();else return this._confirmationManager.confirmSave(this.store.getStore()).then((async()=>{if(await this.validateAll(),!this.isValid())throw Error("ÐекоÑÑекÑно Ð·Ð°Ð¿Ð¾Ð»Ð½ÐµÐ½Ñ Ð¾Ð±ÑзаÑелÑнÑе полÑ");return this.update()})).catch((()=>{if(this.store.needDestroy())return this.loader.destroy(this.store.getId())}))}_getErrorState(e){return e instanceof Error?e:void 0}}t.default=g;const p=()=>{};class v{constructor(e,t){this._newRecord=!1,this._store=this._normalizeStore(e),this._newRecord=!!(null==t?void 0:t.newRecord)}set(e,t){const{path:r,binding:i,root:n}=this._normalizeBinding(e),o=n===c.DEFAULT_USERDATA_PROPERTY,a=this.get(e);if(o)return this._setUserData(i,t),this._isChanged(t,a);if(this._store.has(i))return this._store.set(i,(0,l.normalizeValueToSet)(this._store,t)),this._isChanged(this._store.get(i),a);const s=this._store.get(n);if(null==s?void 0:s.has(i))return s.set(i,(0,l.normalizeValueToSet)(s,t)),this._isChanged(s.get(i),a);const u=h(this._store,r,(0,l.normalizeValueToSet)(s,t));return this._isChanged(u,a)}get(e){const{path:t,binding:r,root:o}=this._normalizeBinding(e);if(this._store.has(r))return this._store.get(r);const a=this._store.get(o);if(null==a?void 0:a.has(r))return a.get(r);else return function(e,t){let r=e;for(const e of t){if(!r)return;if(o=r,(0,n.isRecord)(o)&&"variant"===o.getMetaType())r=r.get("data");r=i.object.getPropertyValue(r,e)}var o;return r}(this._store,t)}has(e){return!!this.get(e)}getCount(){return this._store.get(c.DEFAULT_USERDATA_PROPERTY).getFormat().getCount()+this._store.get(c.DEFAULT_DATA_PROPERTY).getFormat().getCount()}getStore(){return this._store}getId(){const e=this._store.get(c.DEFAULT_DATA_PROPERTY);if(e)return e.getKey();else return this._store.getKey()}getType(e){if(!this.has(e))return;const{root:t,binding:r}=this._normalizeBinding(e);if(this._store.has(r))return this._getType(this._store,r);const i=this._store.get(t);if(null==i?void 0:i.has(r))return this._getType(i,r);const[n,o]=[e.slice(0,e.length-1),...e.slice(e.length-1)];return this._getType(this.get(n),o)}needDestroy(){return this._newRecord&&!!this.getId()}_getType(e,t){var r;const i=null===(r=null==e?void 0:e.getFormat)||void 0===r?void 0:r.call(e);if(!i)return;const n=i.getFieldIndex(t);if(!(null==n||n<0))return i.at(n)}_normalizeStore(e){if(e&&e["[Types/_entity/Record]"])return e;else return new r.Model({adapter:new r.adapter.Sbis})}_normalizeBinding(e){if(!Array.isArray(e))e=e.split(f);const t=e[0];if(this._store.has(t))return{binding:e.join(f),path:[t,...e],root:t};if(t===c.DEFAULT_USERDATA_PROPERTY)return{binding:e.join(f),path:e,root:c.DEFAULT_USERDATA_PROPERTY};else return{binding:e.join(f),path:[c.DEFAULT_DATA_PROPERTY,...e],root:c.DEFAULT_DATA_PROPERTY}}_setUserData(e,t){if(!this._store.has(c.DEFAULT_USERDATA_PROPERTY))this._store.addField({name:c.DEFAULT_USERDATA_PROPERTY,type:"record"});let i=this._store.get(c.DEFAULT_USERDATA_PROPERTY);if(!i)this._store.set(c.DEFAULT_USERDATA_PROPERTY,new r.Model({adapter:this._store.getAdapter()})),this._store.acceptChanges([c.DEFAULT_USERDATA_PROPERTY]),i=this._store.get(c.DEFAULT_USERDATA_PROPERTY);
42if(void 0===i.get(e)&&i.has(e))i.removeField(e);if(i.has(e))i.set(e,t);else i.addField((0,u.getFieldDeclaration)(e,t)),i.set(e,t);return!0}_isChanged(e,t){return e!==t}}return t.DataWrapper=v,t.injectValue=h,t}(0,{},s,o,a,b,D,T,E,I,S,M),z=k,X=function(e,t,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{static loadData(e){const t=(0,i.createLoader)(e);if(e.record)return Promise.resolve(e.record);if(void 0===e.id||null===e.id&&!e.nullableKeyIsAllowed)return t.create(e.createMetaData);else return t.read(e.id,e.readMetaData||e.sourceOptions)}}return n.slice=r.default,t.default=n,t}(0,{},k,b),W=X,f.callGetConfig=f.DataConfigResolver=f.DEFAULT_USERDATA_PROPERTY=f.FormSliceActionType=f.VALIDATION_STATE=f.injectValue=f.FormSlice=f.DEFAULT_FORM_SLICE_NAME=f.NewFormSlice=f.NewFactory=f.Form=f.CompatibleCustom=f.Custom=f.CompatibleArea=f.Area=f.AreaSlice=f.isDataNodeConfigs=f.isDataNodeConfigGetter=void 0,Object.defineProperty(f,"isDataNodeConfigGetter",{enumerable:!0,get:function(){return x.isDataNodeConfigGetter}}),Object.defineProperty(f,"isDataNodeConfigs",{enumerable:!0,get:function(){return x.isDataNodeConfigs}}),Object.defineProperty(f,"AreaSlice",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(f,"Area",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(f,"CompatibleArea",{enumerable:!0,get:function(){return Y.default}}),Object.defineProperty(f,"Custom",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(f,"CompatibleCustom",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(f,"Form",{enumerable:!0,get:function(){return W.default}}),Object.defineProperty(f,"NewFactory",{enumerable:!0,get:function(){return $.default}}),Object.defineProperty(f,"NewFormSlice",{enumerable:!0,get:function(){return U.NewFormSlice}}),Object.defineProperty(f,"DEFAULT_FORM_SLICE_NAME",{enumerable:!0,get:function(){return U.DEFAULT_FORM_SLICE_NAME}}),Object.defineProperty(f,"FormSlice",{enumerable:!0,get:function(){return z.default}}),Object.defineProperty(f,"injectValue",{enumerable:!0,get:function(){return z.injectValue}}),Object.defineProperty(f,"VALIDATION_STATE",{enumerable:!0,get:function(){return P.VALIDATION_STATE}}),Object.defineProperty(f,"FormSliceActionType",{enumerable:!0,get:function(){return C.FormSliceActionType}}),Object.defineProperty(f,"DEFAULT_USERDATA_PROPERTY",{enumerable:!0,get:function(){return C.DEFAULT_USERDATA_PROPERTY}}),Object.defineProperty(f,"DataConfigResolver",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(f,"callGetConfig",{enumerable:!0,get:function(){return A.callGetConfig}}),f})); 43define("Browser/Transport",["i18n!Browser","Types/formatter","Types/entity","Types/deferred","I18n/i18n","Env/UserInfo","Env/Event","Env/Constants","Browser/rpcHeadersBuilder","Browser/Storage","Application/Initializer","Application/Env","require","exports","TransportCore/transport","Env/Env","Types/di","Browser/base64","Browser/iconv","Types/PromiseAPIDeferred"],(function(e,r,t,o,n,s,i,a,c,u,d,l,f,p,h,m,y,g,_){var b,E,T,P,v,R,O,C,w,S,I,x,j,A,M,k,N,L,X,H,B,U,D,$,q,J,F,V,G,z,W,Y,K,Q,Z;if(Object.defineProperty(p,"__esModule",{value:!0}),b=function(e,r,t,o){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.HeadersContainer=void 0;class n{static get(){if(n._headers)return(new o.Deferred).callback(n._headers);else return(0,t.produce)().addCallback((e=>{if(e)n._headers=e;return null!=e?e:{}}))}static reset(){n._headers=null}}return r.HeadersContainer=n,r}(0,{},c,o),E=b,T=function(e,r,t,o){"use strict";Object.defineProperty(r,"__esModule",{value:!0});class n extends o.HTTPError{constructor(e,r,t,o,s,i,a,c,u,d){super("object"==typeof e&&null!==e&&!Array.isArray(e)?e:{message:e,url:i||"",httpError:r,code:t,methodName:o,details:s,classid:a,errType:c,addinfo:u,error_code:d}),this.name="Transport error",this._moduleName=n.moduleName;const l=this.config;this.addinfo=l.addinfo||"",this.classid=l.classid||"",this.code=l.code||500,this.details=l.details||"",this.error_code=l.error_code,this.errType=l.errType||"error",this.user_hint=l.user_hint,this.methodName=l.methodName||""}toString(){return`${this.name}: ${this.message}; method: ${this.methodName}; code: ${this.code}; httpError: ${this.httpError}; details: ${this.details}`}static checkErrorStatus(e,r){if(e instanceof o.HTTPError&&r.indexOf(e.status)>=0)return e.status;if(e instanceof n&&r.indexOf(e.error_code)>=0)return e.error_code;else return 0}static log(e,r=""){if("warning"!==e.errType)t.IoC.resolve("ILogger").error(r,e);else t.IoC.resolve("ILogger").warn(r,e)}}return n.moduleName="Browser/Transport:RPC.Error",r.default=n,r}(0,{},m,h),P=function(e,r,t){"use strict";
43Object.defineProperty(r,"__esModule",{value:!0});return r.default=({data:r,headers:o,transport:n,timeout:s})=>{const i=new t.Deferred;return new Promise(((r,t)=>{e(["Browser/Event"],r,t)})).then((({Server:e})=>{const t=()=>e.serverChannel("system.bl_async_replies");t().once("onReady",(()=>{const e={deferred:i,guid:o["X-UNIQ-ID"]},a=(c=e,(e,r)=>{if(!r)return;let t;if("string"==typeof r)t=JSON.parse(r);if(t&&t.guid===c.guid)clearTimeout(c.timeout),c.deferred.callback(t.data)});var c;e.timeout=setTimeout((()=>{t().unsubscribe("onMessage",a),i.errback("Timeout")}),s),t().subscribe("onMessage",a),n.execute(r,o)}))})).catch((e=>{i.errback(e)})),i},r}(f,{},o),v=function(e,r,t,o){"use strict";return Object.defineProperty(r,"__esModule",{value:!0}),r.getAppConfig=void 0,r.getAppConfig=function(e){if((0,t.isInit)())return(0,o.getConfig)(e)},r}(0,{},d,l),R=function(e,r,t){"use strict";return Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return JSON.parse(t.default.decode(e))},r}(0,{},g),O=function(e,r){"use strict";return Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){return"undefined"!=typeof process&&process&&process.domain&&process.domain.req&&process.domain.req.hostname||"undefined"!=typeof location&&location&&location.hostname||""},r}(0,{}),C=function(e,r){"use strict";return Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){const r="undefined"!=typeof process&&process&&process.domain&&process.domain.req&&process.domain.req.query;if(r)return r[e]||"";if("undefined"!=typeof location){const r=new RegExp("[?&]"+e+"=([^&]*)"),t=location.search.match(r);return decodeURIComponent(t&&t[1]||"")}return""},r}(0,{}),w=function(e,r){"use strict";return Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){const e="undefined"!=typeof process&&process&&process.domain&&process.domain.req;if(e)return e.originalUrl;if("undefined"!=typeof location&&location)return location.href;else return""},r}(0,{}),S=function(e,r,t){"use strict";return Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){let r=e;if(r instanceof Object&&Object.getPrototypeOf(r)===Object.prototype)r=Object.keys(r).sort().reduce(((e,t)=>(e[t]=r[t],e)),{});let o=JSON.stringify(void 0===r?"":r);if(-1!==o.indexOf("\\u"))o=unescape(o.replace(/\\u/g,"%u"));return t.default.encode(o)},r}(0,{},g),I=function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isCrossOrigin=r.delay=r.getAbortedPromise=void 0;r.getAbortedPromise=(e,r)=>Object.assign(e,{abort(){if(r)r.abort()}});return r.delay=e=>new Promise((r=>{setTimeout(r,e||0)})),r.isCrossOrigin=function(e){var r,o;if(t.constants.isBrowserPlatform)try{const t=document.createElement("a");t.href="undefined"!=typeof location?location.href:"";const n=document.createElement("a");n.href=e,n.href=n.href;const s=e=>`${t.protocol}//${e}`,i=[s(t.host),...((null===(o=null===(r=null===window||void 0===window?void 0:window.wsConfig)||void 0===r?void 0:r.staticDomains)||void 0===o?void 0:o.domains)||[]).map(s)],a=`${n.protocol}//${n.host}`;return i.every((e=>e!==a))}catch(e){return!0}},r}(0,{},m),x=I,j=function(e,r){"use strict";function t(e,r){var t,o=new XMLHttpRequest,i=function(e){var r=e.headers||{};if(e.data&&e.hasContent&&!1!==e.contentType||e.contentType)r["Content-Type"]=e.contentType;if(r.Accept=e.dataTypes[0]&&e.accepts[e.dataTypes[0]]?e.accepts[e.dataTypes[0]]+("*"!==e.dataTypes[0]?", "+s+"; q=0.01":""):e.accepts["*"],!e.crossDomain&&!r["X-Requested-With"])r["X-Requested-With"]="XMLHttpRequest";return r}(e);if(o.open(e.type,e.url,!!e.async),!1===e.crossDomain)o.withCredentials=!0;if(e.mimeType&&o.overrideMimeType)o.overrideMimeType(e.mimeType);for(t in i)o.setRequestHeader(t,i[t]);return o.onload=function(){r(n[o.status]||o.status,o.statusText,"string"!=typeof o.responseText?{binary:o.response}:{text:o.responseText},o.getAllResponseHeaders())},o.upload.onprogress=e.onprogress,o.onabort=function(){r(o.status,"abort")},o.onerror=function(){r(o.status,o.statusText)},o}Object.defineProperty(r,"__esModule",{value:!0});var o="undefined"!=typeof location?location:{href:"",protocol:"https"},n={0:200},s="*/".concat("*"),i={url:o.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(o.protocol),global:!0,processData:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":s,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":function(e){var r;if(!e||"string"!=typeof e)return null;try{r=(new window.DOMParser).parseFromString(e,"text/xml")}catch(e){r=void 0}if(!r||r.getElementsByTagName("parsererror").length)throw new Error("Invalid XML: "+e);return r}},success(){},error(){}},a=/^(?:GET|HEAD)$/,c=/\?/,u=/%20/g,d=/#.*$/,l=/[^\x20\t\r\n\f]+/g,f=/([?&])_=[^&]*/,p=/^(.*?):[ \t]*([^\r\n]*)$/gm,h=Date.now();return r.default=function(e){function r(e,r,t,o){var s,i,a,c,u,d,l=r;if(a=e>=200&&e<300||304===e,t)d=function(e,r,t){for(var o,n,s,i,a=e.contents,c=e.dataTypes;"*"===c[0];)if(c.shift(),void 0===o)o=e.mimeType||r.getResponseHeader("Content-Type");if(o)for(n in a)if(a[n]&&a[n].test(o)){c.unshift(n);break}if(c[0]in t)s=c[0];else{for(n in t){if(!c[0]||e.converters[n+" "+c[0]]){s=n;break}if(!i)i=n}s=s||i}if(s){if(s!==c[0])c.unshift(s);return t[s]}}(g,n,t);if(d=function(e,r,t){var o,n,s,i,a,c={},u=e.dataTypes.slice();if(u[1])for(s in e.converters)c[s.toLowerCase()]=e.converters[s];for(n=u.shift();n;){if(e.responseFields[n])t[e.responseFields[n]]=r;if(a=n,n=u.shift())if("*"===n)n=a;else if("*"!==a&&a!==n){if(!(s=c[a+" "+n]||c["* "+n]))for(o in c)if((i=o.split(" "))[1]===n)if(s=c[a+" "+i[0]]||c["* "+i[0]]){if(!0===s)s=c[o];else if(!0!==c[o])n=i[0],u.unshift(i[1]);break}if(!0!==s)if(s&&e.throws)r=s(r);else try{r=s(r)}
43catch(e){return{state:"parsererror",error:s?e:new Error("No conversion from "+a+" to "+n)}}}}return{state:"success",data:r}}(g,d,n),a)if(204===e||"HEAD"===g.type)l="nocontent";else if(304===e)l="notmodified";else l=d.state,c=d.data,a=!(u=d.error);else if(u=l,e||!l)if(l="error",e<0)e=0;if(Object.assign(n,{statusText:l,status:e}),a)null===(s=g.success)||void 0===s||s.call(g,c,l,n);else null===(i=g.error)||void 0===i||i.call(g,n,l,u)}var n,s,m,y,g=function(e){return{...i,...e}}(e),_=document.createElement("a");if(_.href=o.href,g.url=((g.url||loc_locationation.href)+"").replace(/^\/\//,o.protocol+"//"),g.dataTypes=(g.dataType||"*").toLowerCase().match(l)||[""],null==g.crossDomain){y=document.createElement("a");try{y.href=g.url,y.href=y.href,g.crossDomain=_.protocol+"//"+_.host!=y.protocol+"//"+y.host}catch(e){g.crossDomain=!0}}if(g.type=g.type.toUpperCase(),g.hasContent=!a.test(g.type),s=g.url.replace(d,""),!g.hasContent){if(m=g.url.slice(s.length),g.data)s+=(c.test(s)?"&":"?")+g.data,delete g.data;if(!1===g.cache)s=s.replace(f,"$1"),m=(c.test(s)?"&":"?")+"_="+h+++m;g.url=s+m}else if(g.data&&g.processData&&0===(g.contentType||"").indexOf("application/x-www-form-urlencoded"))g.data=g.data.replace(u,"+");if(n=function(e){var r,t;return t={readyState:0,getResponseHeader(t){var o,n=e.getAllResponseHeaders();if(!n)return null;if(!r)for(r={};o=p.exec(n);)r[o[1].toLowerCase()]=o[2];return null==(o=r[t.toLowerCase()])?null:o}},["setRequestHeader","getAllResponseHeaders","overrideMimeType","abort","send","onprogress"].forEach((function(r){t[r]=function(){return e[r].apply(e,arguments)}})),t}(t(g,r)),g.beforeSend&&!1===g.beforeSend.call(null,n,g))return n.abort();try{n.send(g.hasContent&&g.data||null)}catch(e){r(-1,e)}return n},r}(0,{}),A=j,M=function(e,r,t){"use strict";return Object.defineProperty(r,"__esModule",{value:!0}),r.DETAILS_TEXT=r.Parse=r.Auth=r.Transport=r.Abort=r.HTTP=r.Connection=r.ERROR_TEXT=void 0,Object.defineProperty(r,"ERROR_TEXT",{enumerable:!0,get:function(){return t.ERROR_TEXT}}),Object.defineProperty(r,"Connection",{enumerable:!0,get:function(){return t.ConnectionError}}),Object.defineProperty(r,"HTTP",{enumerable:!0,get:function(){return t.HTTPError}}),Object.defineProperty(r,"Abort",{enumerable:!0,get:function(){return t.AbortError}}),Object.defineProperty(r,"Transport",{enumerable:!0,get:function(){return t.TransportError}}),Object.defineProperty(r,"Auth",{enumerable:!0,get:function(){return t.AuthError}}),Object.defineProperty(r,"Parse",{enumerable:!0,get:function(){return t.ParseError}}),Object.defineProperty(r,"DETAILS_TEXT",{enumerable:!0,get:function(){return t.DETAILS_TEXT}}),r}(0,{},h),k=function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.RESPONSE_TYPE=r.parse=void 0;const o={xml:e=>e.text().then((e=>{let r;if(!e)return null;if("undefined"!=typeof DOMParser)try{r=(new DOMParser).parseFromString(e,"text/xml")}catch(e){r=void 0}if(!r||r.getElementsByTagName("parsererror").length)throw new Error(`Invalid XML: ${e}`);return r}))};return r.parse=(e,r)=>{const n=(e=>{switch(e){case"XML":return"xml";case"JSON":return"json";case"TEXT":default:return"text";case"BLOB":return"blob"}})(r);let s;if("xml"===n)s=o[n];else s=e[n];return s.call(e,e).catch((r=>{throw new t.ParseError({url:e.url,details:r.message})}))},r.RESPONSE_TYPE={TEXT:"TEXT",JSON:"JSON",BLOB:"BLOB",XML:"XML"},r}(0,{},h),N=function(e,r,t,o,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.fromBLError=r.fromHTTP=r.fromRPC=void 0;r.fromRPC=(e,r,n)=>{var s;return new t.default({addinfo:e.data&&e.data.addinfo,classid:e.data&&e.data.classid,code:e.code,details:e.details,error_code:e.data&&e.data.error_code,errType:e.type,httpError:"undefined"!==e.httpError?e.httpError:"",message:null!==(s=e.message)&&void 0!==s?s:"",methodName:r,url:n||o.constants.defaultServiceUrl,user_hint:e.user_hint})};r.fromHTTP=(e,t)=>{if(!(e instanceof n.HTTPError))return e;const o={message:e.message,httpError:e.httpError,details:e.details,code:0};let s;try{s=JSON.parse(e.payload)}catch{s={}}return(0,r.fromRPC)({...o,..."object"!=typeof s.error?s:s.error},t,e.url)};return r.fromBLError=e=>{var n,s;let i,a,c,u=e.error_code;if(!o.constants.isServerSide&&"undefined"==typeof sbis)return(0,r.fromRPC)({...e,httpError:e.http_code,classid:e.class_uuid,message:null!==(n=e.user_msg)&&void 0!==n?n:"",errType:"etWarning"===e.type?"warning":"error"},"");if(e instanceof sbis.SerializableException)i=e.class_uuid,u=e.error_code,c=e.addinfo,a=e.http_code&&e.http_code[0]||void 0;else if(e instanceof sbis.GenericHttpError||e instanceof sbis.NetworkException)u=void 0,a=e.error_code;return new t.default({classid:i,details:e.details,error_code:u,addinfo:c,errType:"etWarning"===e.type?"warning":"error",httpError:a,message:null!==(s=e.user_msg)&&void 0!==s?s:"",url:"",user_hint:e.user_hint})},r}(0,{},T,a,h),L=function(e,r,t,o,n,s,i,a,c,u,d,l){"use strict";function f(e,r){if("GET"===e)return function(){const e={},r=o.getCurrent();
43if(r){const[t,o]=r.split("-");e["X-SbisSessionsID"]=r,e["X-CID"]=t,e["X-UID"]=o}return e}();if("POST"===e)return function(e){const r={};if(m[e])r[h]=m[e];return r}(r);else return{}}function p(e){return btoa(unescape(encodeURIComponent(e)))}Object.defineProperty(r,"__esModule",{value:!0});const h="X-LastModification",m={};let y;t.Bus.channel("Transport").subscribe("onResponseSuccess",((e,r,t,o)=>{const n=r.getResponseHeader(h);if(n)m[o]=n}));class g{constructor({fallback:e,asyncInvoke:r,url:t,recent:o,method:n,httpMethod:s,headers:i,cache:u}){const h=function(){if(!y){const e=c.cookie.get("SBIS3.Plugin/OSVersionInfo"),r=new d.LocalStorage("SBIS3.Plugin"),t=e||r.getItem("OSVersionInfo");if(t){const{OSType:e,OSVersion:r,IsWin11:o}=t;y=`OSType=${e};OSVersion=${r};IsWin11=${o}`}r.destroy()}return y}(),m=c.detection.isMobilePlatform;if(e)this["X-PublishAsyncResponse"]="true",this["X-UNIQ-ID"]=a.Guid.create();if(r||e)this["X-ASYNCINVOKE"]="true";if(o)this["X-RequireRecent"]="true";if(u){const e=function({maxAge:e,mustRevalidate:r,ignoredParams:t}){const o=[];if(e>0)o.push(`max-age=${Math.round(e)}`);if("number"==typeof r)o.push(`must-revalidate=${Math.round(r)}`);if(t&&t.length)o.push(`ignored-params=${t.map(p).join(",")}`);return o.join("; ")}(u);if(e)this["X-Client-Cache-Control"]=e}if(h)this["X-OSVersion"]=h;this["X-Adaptive"]=`${m}`;const _=(0,l.getAppConfig)("xSabyAppId");if(_)this["X-Saby-Appid"]=_;const b=(0,l.getAppConfig)("xSabyCfgId");if(b)this["X-Saby-Cfgid"]=b;const E=(0,l.getAppConfig)("xSabyAppVersion");if(E)this["X-Saby-Appversion"]=E;Object.assign(this,g.getForMethod(n),f(s,t),i)}static getForMethod(e){if(!e)return{};const r={"X-CalledMethod":(0,s.cyrTranslit)(""+e),"X-OriginalMethodName":i.default.encode(""+e),"Accept-Language":n.controller.currentLocale+";q=0.8,en-US;q=0.5,en;q=0.3"};if(c.cookie.get("IsWasabyCLI"))r["X-RefererPage"]=u.location.href;return r}}return r.default=g,r}(0,{},i,s,n,r,g,t,m,l,u,v),X=function(e,r,t,o,n,s,i){"use strict";return Object.defineProperty(r,"__esModule",{value:!0}),r.getUrl=r.getQueryParam=r.getHostName=r.serializeData=r.deserializeData=void 0,Object.defineProperty(r,"deserializeData",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(r,"serializeData",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(r,"getHostName",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(r,"getQueryParam",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(r,"getUrl",{enumerable:!0,get:function(){return i.default}}),r}(0,{},R,S,O,C,w),H=X,B=function(e,r,t,o,n,s,i,a,c,u){"use strict";function d(e,r){if(h.isOfflineError(e)){var t;try{(t=JSON.parse(r).method.split(".")).push(e)}catch(o){t=[r,e]}return!!h.notifyOfflineError(t)}}Object.defineProperty(r,"__esModule",{value:!0});let l=c.Bus.channel("Transport"),f=c.Bus.channel("errors");var p=!1;if("undefined"!=typeof window)window.addEventListener("beforeunload",(function(){p=!0}));class h{$constructor(){}constructor(e){if(this._options={...h.defaultOptions,...e},""===this._options.url)throw new Error("Request with no URL is ambiguous")}execute(e,r,c=()=>{}){var h,m=new n.Deferred({cancelCallback:this.abort.bind(this)}),y=this;if(m.addErrback((e=>e)),o.constants.checkSessionCookie&&!s.isValid()){if(m.errback(a.ERROR_TEXT[401]),y._options.notifyAuthError)f.notify("onAuthError");return m}h=this._options.url;try{this._xhr=(0,i.default)({type:this._options.method,dataType:this._options.dataType,contentType:this._options.contentType,url:h,onprogress:c,headers:r||{},data:e,async:this._options.async,crossDomain:this._options.useCredentials?!1:(0,u.isCrossOrigin)(h),beforeSend:(e,r)=>l.notify("onBeforeSend",e,r),success(r,t,o){if(!d(r.error,e)){var s=n.Deferred.success(r);return l.notify("onResponseSuccess",o,s,y._options.url),m.dependOn(s),r}else m.errback(new a.ConnectionError(h))},error(r,o){var s,i,c,u,g;if(!r.responseJSON||!d(r.responseJSON.error,e))if("abort"!==o){if(s=r.status,i=a.ERROR_TEXT[s]||a.ERROR_TEXT[o]||a.ERROR_TEXT.unknown||"",0===s&&""===r.getAllResponseHeaders())c="/"===y._options.url.charAt(0)?window.location.hostname:y._options.url,i=a.ERROR_TEXT.lossOfConnection+" "+c;if(u=new a.HTTPError({message:i,httpError:s,url:y._options.url,payload:r.responseText,xhr:r}),void 0!==(null===window||void 0===window?void 0:window.wsErrorMonitor)&&!window.wsErrorMonitor.reason&&!t.detection.isIE){const e=new ErrorEvent("XHR Error",{error:u,message:`${u.message},\n XHR_ERROR\n status: ${r.status},\n url: ${this.url}
43\n at: ${(new Date).toLocaleString()},\n X-CalledMethod=${this.headers["X-CalledMethod"]}`});window.wsErrorMonitor.onError(e)}if(f.notify("onHTTPError",u),"401"==s&&y._options.notifyAuthError)if(!0===f.notify("onAuthError"))return;if("423"!=s)if(g=new n.Deferred,l.notify("onResponseError",y._xhr,g),g.addCallback((function(e){m.callback(e)})).addErrback((function(e){m.errback(e)})),p)g.cancel();else g.errback(u);else f.notify("onSessionLocked")}else m.cancel();else m.errback(new a.ConnectionError(h))}})}catch(e){m.errback("JavaScript exception while trying to execute request: "+e.message)}return m}setUrl(e){if("string"==typeof e)this._options.url=e}abort(){if(this._xhr)this._xhr.abort();return Promise.resolve()}static isOfflineError(e){let r;return r=e&&(e.data&&e.data.error_code||e.httpError||e.code),300===r||405===r}}if(h.ERRORS_TEXT=a.ERROR_TEXT,h.notifyOfflineError=e=>{const r=c.Bus.globalChannel(),o=r.notify.apply(r,["onOfflineModeError",...e]);if(o)t.IoC.resolve("ILogger").info("XHRTransport","РабоÑа в offline-Ñежиме");return o},h.getServiceByName=e=>o.constants.services[e]||o.constants.defaultServiceUrl,h.defaultOptions={method:"GET",dataType:"text",contentType:"application/x-www-form-urlencoded",url:"",notifyAuthError:!0,async:!0},!t.IoC.has("ITransport"))t.IoC.bind("ITransport",h);return r.default=h,r}(0,{},m,a,o,s,j,h,i,I),U=B,D=function(e,r,t,o,n,s){"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i={method:"GET",url:""};let a=!1,c=!1;const u=e=>c||300===e||405===e;(()=>{if("undefined"!=typeof window){if(t.detection.firefox)window.addEventListener("beforeunload",(()=>{a=!0,setTimeout((()=>{a=!1}),600)}));window.addEventListener("pagehide",(e=>{if(!e.persisted)a=!0})),window.addEventListener("pageshow",(e=>{if(e.persisted)a=!1})),window.addEventListener("online",(()=>{c=!1})),window.addEventListener("offline",(()=>{c=!0}))}})();return r.default=e=>{const{url:r,method:t,body:c,headers:d,credentials:l,cache:f,redirect:p,mode:h}={...i,...e},m=new AbortController,y=fetch(r,{method:t,headers:d,redirect:p,mode:h,body:c,credentials:l,cache:f,signal:m.signal}).then((e=>{const{status:t,statusText:n,headers:i}=e;if((e=>e>=200&&e<300||304===e)(t))return e;if(401===t)throw s.IoC.resolve("ILogger").error(`auth error with ${r}`),new o.AuthError(r);if(u(t)||((e,r)=>{let t=!0;return r.forEach((()=>{t=!1})),0===e&&t})(t,i))throw new o.ConnectionError(r);const a=o.ERROR_TEXT[t]||o.ERROR_TEXT[n]||o.ERROR_TEXT.unknown;return e.text().then((e=>{throw new o.HTTPError({url:r,message:a,payload:e,httpError:t})}))}),(e=>{if((e=>"AbortError"===e.name)(e)||a)throw new o.AbortError(r);return(0,n.delay)(2e3).then((()=>
43{if(u())throw new o.ConnectionError(r);throw e}))}));return(0,n.getAbortedPromise)(y,m)},r}(0,{},m,h,I,m),$=function(e,r,t,o,n,s,i,a,c,u,d,l){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.setCanCallRPCJSON=void 0;const f={serviceUrl:o.constants.defaultServiceUrl,asyncInvoke:!1};class p{constructor(e){if(this._options={...f,...e},!1===(null==e?void 0:e.async))sbis.ErrorMsg("PSRPC::async is false. Presentation Service does not support synchronous requests")}callMethod(e,r,t,o,i,a,d){if(!function(){if(!(0,s.isInit)())return!0;else return!1!==(0,n.getStore)("canCallRPCJSON").get("state")}()){const t=r?Object.keys(r).length:0,o=new Error(`Ðа СеÑвиÑе ÐÑедÑÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ Ð·Ð°Ð¿ÑеÑено делаÑÑ RPCJSON вÑзов в Ð¼Ð¾Ð¼ÐµÐ½Ñ Ð¿Ð¾ÑÑÑÐ¾ÐµÐ½Ð¸Ñ Ð²ÑÑÑÑки.\n РезÑлÑÑÐ°Ñ ÑÑого вÑзова вÑÑ Ñавно никак не повлиÑÐµÑ Ð½Ð° иÑоговÑÑ Ð²ÑÑÑÑÐºÑ Ð¾ÑпÑавлÑемÑÑ Ð² бÑаÑзеÑ.\n ÐеобÑ
одимо делаÑÑ ÑÑÐ¾Ñ Ð²Ñзов на ÑÑапе пÑедзагÑÑзки даннÑÑ
.\n ÐÑзÑваемÑй меÑод: ${e}/${t}`);return o.isForbiddenRPCJSON=!0,n.logger.warn(o),(new c.Deferred).errback(o)}const l=this.getServiceAddress();let f={data:"",headers:{...this.createHeaders(t),...d},method:e,url:l,timeout:this._options.timeout,transport:void 0};return u.HeadersContainer.get().addCallback((e=>{if(f.headers={...e,...f.headers},a)f=a.processRequest(f);const[t,n]=f.method.split("."),s=this.createEndpoint(f.url,f.headers,o);return new sbis.BLCoreObject(t,s).Invoke(n,r).addErrback((e=>p._createRPCError(e,f.method,f.url)))}))}abort(){sbis.ErrorMsg("Method PSRPC::abort() is not supported in Presentation Service")}getServiceAddress(){const e=this._options.serviceUrl||o.constants.defaultServiceUrl,r=e.indexOf("?")>-1?"&":"?";return`${e}${r}x_version=${o.constants.buildnumber}`}createHeaders(e){const r={};if(e)r["X-RequireRecent"]="true";if(this._options.asyncInvoke)r["X-ASYNCINVOKE"]="true";if(this._options.timeout&&this._options.timeout>0)r["X-Timeout"]=String(this._options.timeout);const t=(0,d.getAppConfig)("xSabyAppId");if(t)r["X-Saby-Appid"]=t;const o=(0,d.getAppConfig)("xSabyCfgId");if(o)r["X-Saby-Cfgid"]=o;const n=(0,d.getAppConfig)("xSabyAppVersion");if(n)r["X-Saby-Appversion"]=n;return r}createEndpoint(e,r,t=o.constants.JSONRPC_PROOTOCOL_VERSION){const n=new sbis.EndPoint(e);n.SetProtocol(t);for(const e in r)if(r.hasOwnProperty(e))n.SetHeader(e,r[e]);return n}static isProperEnv(){return o.constants.isServerSide&&(!p._isProcessRequired||"undefined"!=typeof process)&&"undefined"!=typeof sbis}static _createRPCError(e,r,o){let n;if("function"==typeof sbis.Error&&e instanceof sbis.Error)n=(0,l.fromBLError)(e);else if(e instanceof Error)n=p._createRPCErrorFromError(e);else n=new i.default({message:a.ERROR_TEXT.unknown,url:o});if(""===n.httpError)n.httpError=void 0;if(!n.details&&n.httpError>a.HTTPStatus.InternalServerError)n.details=t("ÐопÑобÑйÑе заглÑнÑÑÑ ÑÑда ÑеÑез 15 минÑÑ");return n.methodName=r||"",n.url=o,n}static _createRPCErrorFromError(e){return new i.default({message:e.message||a.ERROR_TEXT.unknown,url:""})}}return p._isProcessRequired=!1,r.default=p,r.setCanCallRPCJSON=function(e){(0,n.getStore)("canCallRPCJSON").set("state",e)},r}(0,{},e,m,l,d,T,h,o,b,v,N,"undefined"==typeof Types_PromiseAPIDeferred||Types_PromiseAPIDeferred),q=$,J=function(e,r,t,o,n){"use strict";return Object.defineProperty(r,"__esModule",{value:!0}),r.responseParser=r.RESPONSE_TYPE=r.fetch=r.Errors=void 0,r.Errors=t,r.fetch=o.default,Object.defineProperty(r,"RESPONSE_TYPE",{enumerable:!0,get:function(){return n.RESPONSE_TYPE}}),Object.defineProperty(r,"responseParser",{enumerable:!0,get:function(){return n.parse}}),r.default=o.default,r}(0,{},M,D,k),F=function(e,r,t,o,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getEmptyResponse=r.getURL=r.getBody=void 0;r.getBody=(e,r,o,n)=>JSON.stringify({jsonrpc:"2.0",protocol:void 0!==n?n:t.constants.JSONRPC_PROOTOCOL_VERSION,method:e,params:r,id:void 0!==o?o:1});r.getURL=(e,r,n,s)=>"?protocol="+(void 0!==s?s:t.constants.JSONRPC_PROOTOCOL_VERSION)+"&method="+encodeURI(e)+"&args="+encodeURIComponent((0,o.seri
43alizeData)(r))+"&id="+(void 0!==n?n:1);return r.getEmptyResponse=()=>({error:{message:n("ÐолÑÑен пÑÑÑой оÑÐ²ÐµÑ Ð¾Ñ ÑеÑвиÑа"),code:"",details:""}}),r}(0,{},a,X,e),V=function(e,r,t,o){"use strict";Object.defineProperty(r,"__esModule",{value:!0});return r.default=function(e,r,n,s={}){const i=s.id||0,a=s.url||t.constants.defaultServiceUrl,c=s.protocol||t.constants.JSONRPC_PROOTOCOL_VERSION,u=e+"."+r;return a+"?id="+encodeURIComponent(i)+"&method="+encodeURIComponent(u)+"&protocol="+encodeURIComponent(c)+"&args="+encodeURIComponent((0,o.serializeData)(n||{}))},r}(0,{},a,X),G=function(e,r,t,o,n,s,i){"use strict";return Object.defineProperty(r,"__esModule",{value:!0}),r.Headers=r.getInvocationUrl=r.ErrorCreator=r.Error=r.Body=void 0,r.Body=t,r.ErrorCreator=o,r.Headers=n.default,r.Error=s.default,r.getInvocationUrl=i.default,r}(0,{},F,N,L,T,V),z=G,W=function(e,r,t,o){"use strict";function n(r){if(r)return r;if(s)return s;try{s=e("Core/Context").global}catch(e){}return s}Object.defineProperty(r,"__esModule",{value:!0});let s;return r.default=function(e,r,s,i,a,c,u){const d={...s}||{};for(const r in d)if(d.hasOwnProperty(r)){const t=d[r];if(null!==t&&"object"==typeof t&&"fieldName"in t){const e=n(i);if(e)d[r]=e.getValue(t.fieldName);else o.IoC.resolve("ILogger").warn("Browser/Transport/RPC:prepareGetRPCInvocationURL",'Using context fields in vdom environment is not supported. Parameter name: "'+r+'"')}if("ÐдÐ"===r){const t=d[r];if(!t)return"";if("string"==typeof t){let o=String(t).split(",");if(1===o.length)o=[o[0],""];if(o[0])d[r]=o[0];if(o[1])e=o[1]}}}const l={};if(a)l.url=a;if(c)l.id=c;if(u)l.protocol=u;return(0,t.default)(e,r,d,l)},r}(f,{},V,m),Y=W,K=function(e,r,t,o,n,s){"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=e=>{t.Bus.channel("errors").notify("onRPCError",e)};return r.default=({data:e,headers:r,transport:t,method:a,url:c})=>t.execute(e,r).then(s.Deferred.skipLogExecutionTime((e=>{const r=e||o.getEmptyResponse();if("error"in r){const e=n.fromRPC(r.error,a,c);return i(e),Promise.reject(e)}return r.result})),(e=>{const r=n.fromHTTP(e,a);return i(r),Promise.reject(r)})),r}(0,{},i,F,N,o,"undefined"==typeof Types_PromiseAPIDeferred||Types_PromiseAPIDeferred),Q=function(e,r,t,o,n,s,i,a,c,u,d,l){"use strict";function f(e){t.IoC.resolve("ILogger").log("Browser/_Transport/RPCJSON",e)}function p(e,r){f(`Method "${e}" is deprecated and will be removed${r?`, use "${r}"`:""}`)}function h(e,r,t){return function(){return p(e,r),t.apply(this,arguments)}}Object.defineProperty(r,"__esModule",{value:!0});class m{constructor(e={}){if(this._transports={},this._options={serviceUrl:"",fallback:!1,timeout:0,asyncInvoke:!1,async:!0,...e},this._options.fallback&&void 0===e.timeout)this._options.timeout=m.DEFAULT_FALLBACK_TIMEOUT;if(u.default.isProperEnv()&&!this._options.fallback)return new u.default(this._options)}callMethod(e,r,o,n,a,u,f=!1,p){const h=this._getRequestParam(e,r,o,n,a,u,p);this._transports.current=h.transport;const y=this._options.fallback?i.default:s.default;let g;return l.HeadersContainer.get().addCallback((e=>{if(h.headers={...e,...h.headers},!f&&t.cookie.get("s3csu")){if(!m._checkCookie)m._checkCookie=this._callCookieReset(n,!0);g=m._checkCookie.then((()=>y(h)))}else g=y(h);return g.addErrback((e=>{if(!e.details){const r=e.httpError||0;e.details=r>d.HTTPStatus.InternalServerError?c("ÐопÑобÑйÑе заглÑнÑÑÑ ÑÑда ÑеÑез 15 минÑÑ"):""}return e}))}))}_callCookieReset(e,r=!0){const t=()=>{m._checkCookie=void 0};return(new m).callMethod("SAP.GetActualUserCookie",{},!1,e,void 0,void 0,r).then(t,t)}abort(){var e,r;if(f('ÐеÑод "abort" обÑÑÐ²Ð°ÐµÑ ÑолÑко поÑледний ÑозданнÑй запÑоÑ. ÐÑли вам необÑ
одима ÑÑа логика иÑполÑзÑйде Core/Deferred#cancel'),this._transports.current)null===(r=(e=this._transports.current).abort)||void 0===r||r.call(e)}_getRequestParam(e,r,s,i,a,c,u){var d;let l,f,p,h="";if(function(e){if("undefined"==typeof window||!window.cachedMethods||!window.cachedMethods.length)return!1;else return window.cachedMethods.indexOf(e)>-1}(e))h=o.getURL(e,r,void 0,i);const m=this._getServiceAddress(h);if(h&&function(e){return e.length<2048}(h))l="GET",f=this._getTransport(l),null===(d=f.setUrl)||void 0===d||d.call(f,m),p="";else l="POST",f=this._getTransport(),p=o.getBody(e,r,void 0,i);const y=this._options.timeout,g=null!=u?u:{};if(y>0)g["X-Timeout"]=y;const _={method:e,timeout:y,headers:new n.default({asyncInvoke:this._options.asyncInvoke,cache:t.constants.isBrowserPlatform?a:void 0,fallback:this._options.fallback,headers:g,httpMethod:l,method:e,recent:s,url:m}),data:p,url:this._getServiceAddress(),transport:f};return c?c.processRequest(_):_}_getTransport(e="POST"){if(!this._transports[e])this._transports[e]=this._createTransport(e);return this._transports[e]}_createTransport(e){return t.IoC.resolve("ITransport",{...this._options.transportOptions,url:this._getServiceAddress(),method:e,dataType:"json",contentType:"application/json; charset=utf-8",async:this._options.async})}_getServiceAddress(e){let r=this._options.serviceUrl||t.constants.defaultServiceUrl;r+=r.indexOf("?")>-1?"&":"?";let o=r+("x_version="+t.constants.buildnumber);if(e)o+=e.replace(/^\?/,"&");return o}_setHeaders(e,r,t){p("_setHeaders","Browser/_Transport/RPC/Headers"),Object.assign(e.reqHeaders,new n.default({recent:t,httpMethod:r,fallback:this._options.fallback,asyncInvoke:this._options.asyncInvoke}))}_fallbackResponse(){p("_fallbackResponse")}static jsonRpcPreparePacket(e,r,t){return p("jsonRpcPreparePacket",'Browser/_Transport/RPC/Body" or "Browser/_Transport/RPC/Headers'),{reqUrl:o.getURL(e,r,t),reqBody:o.getBody(e,r,t),reqHeaders:n.default.getForMethod(e)}}}return m.DEFAULT_FALLBACK_TIMEOUT=6e4,m.getEmptyRpcResponse=h("getEmptyRpcResponse","Browser/_Transport/RPC/Body#getEmptyResponse",o.getEmptyResponse),m.handleHTTPError=h("handleHTTPError","Browser/_Transport/RPC/ErrorNotifier#HTTP",a.fromHTTP),m.handleRPCError=h("handleRPCError","Browser/_Transport/RPC/ErrorNotifier#RPC",a.fromRPC),r.default=m,r}(0,{},m,F,L,K,P,N,e,$,h,b),Z=Q,p.HeadersContainer=p.iconv=p.base64=p.setCanCallRPCJSON=p.XHR=p.URL=p.RPCJSON=p.RPC=p.prepareGetRPCInvocationURL=p.isCrossOrigin=p.HTTPStatus=p.fetch=p.ajax=void 0,p.fetch=J,p.URL=H,p.RPC=z,p.XHR=U.default,p.RPCJSON=Z.default,Object.defineProperty(p,"setCanCallRPCJSON",{enumerable:!0,get:function(){return q.setCanCallRPCJSON}}),Object.defineProperty(p,"HTTPStatus",{enumerable:!0,get:function(){return h.HTTPStatus}}),Object.defineProperty(p,"ajax",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(p,"isCrossOrigin",{enumerable:!0,get:function(){return x.isCrossOrigin}}),Object.defineProperty(p,"prepareGetRPCInvocationURL",{enumerable:!0,get:function(){return Y.default}}),Object.defineProperty(p,"HeadersContainer",{enumerable:!0,get:function(){return E.HeadersContainer}}
43),p.base64=g.default,p.iconv=_.default,!m.IoC.has("ITransport"))m.IoC.bind("ITransport",U.default);return(0,y.register)(z.Error.moduleName,z.Error,{instantiate:!1}),p})); 44define("Browser/Storage",["require","exports","BrowserAPI/Storage"],(function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.utils=t.SessionStorage=t.LocalStorageNative=t.LocalStorage=void 0,Object.defineProperty(t,"LocalStorage",{enumerable:!0,get:function(){return r.LocalStorage}}),Object.defineProperty(t,"LocalStorageNative",{enumerable:!0,get:function(){return r.LocalStorageNative}}),Object.defineProperty(t,"SessionStorage",{enumerable:!0,get:function(){return r.SessionStorage}}),Object.defineProperty(t,"utils",{enumerable:!0,get:function(){return r.utils}})})); 45define("BrowserAPI/Storage",["i18n!BrowserAPI","Types/formatter","Types/entity","Env/UserInfo","Env/Event","Env/Env","Env/Constants","require","exports"],(function(e,t,r,n,s,i,o,a,l){var c,u,f,g,d,h,m,v,y,p,I,S,b;return Object.defineProperty(l,"__esModule",{value:!0}),c=function(e,t,r){"use strict";function n(e,t="BrowserAPI/Storage"){r.IoC.resolve("ILogger").log(t,e)}function s(){let e={};return{setItem(t,r){e[t]=String(r)},removeItem(t){delete e[t]},getItem:t=>e[t]||null,clear(){e={}},key(t){const r=Object.keys(e);return t>=0&&t<r.length?r[t]:null},get length(){return Object.keys(e).length}}}function i(e){let t;try{t=o&&o[e]}catch(e){console.warn(e)}if(!r.constants.isBrowserPlatform||!t)return s();else return function(e){return{getItem(t){try{return e.getItem(t)}catch(e){return n(e),null}},setItem(t,r){try{return e.setItem(t,r),!0}catch(e){return n(e),!1}},removeItem(t){try{e.removeItem(t)}catch(e){n(e)}},clear(){try{e.clear()}catch(e){n(e)}},key(t){try{return e.key(t)}catch(e){return n(e),null}},get length(){try{return e.length}catch(e){return n(e),0}}}}(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.getSession=t.getLocal=t.createObjectStorage=void 0;const o=globalThis;t.createObjectStorage=s;t.getLocal=()=>i("localStorage");return t.getSession=()=>i("sessionStorage"),t}(0,{},i),u=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNativeLocalStorageAvailable=void 0;return t.isNativeLocalStorageAvailable=()=>{let e=!0;try{window.localStorage.setItem("checkLocalStorage",`${Date.now()}`),window.localStorage.removeItem("checkLocalStorage")}catch(t){e=!1}return e},t}(0,{}),f=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.deserialize=t.serialize=void 0,t.serialize=function(e){let t=e;if(function(e){return!!e&&"function"==typeof e.toJSON}(e))t=e.toJSON();try{return JSON.stringify(t,r.jsonReplacer)}catch(e){return String(t)}},t.deserialize=function(e){try{return JSON.parse(e,r.jsonReviver)}catch(t){return e}},t}(0,{},t),g=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startsWith=t.remove=t.add=void 0;t.add=(e,t)=>t&&t+"/"+e||e;t.remove=(e,r)=>r&&(0,t.startsWith)(e,r)?e.substr(r.length+1):e;return t.startsWith=(e,t)=>!t||0===e.indexOf(t+"/"),t}(0,{}),d=function(e,t,r,n,s,i,o,a,l){"use strict";function c(e,t){if(!s.constants.isBrowserPlatform)return!0;const r=function(e){const t=encodeURIComponent(e).match(/%[89ABab]/g);return e.length+(t?t.length:0)}(t);if(r<=v)return!0;else return function(e,t="log"){n.IoC.resolve("ILogger")[t]("Core/LocalStorageNative",e)}((0,l.template)(y,{max:Math.ceil(512),key:e,size:(0,l.number)(r/m,{maximumFractionDigits:2})})),!1}function u(){h.setItem(f,r.getCurrent())}Object.defineProperty(t,"__esModule",{value:!0});const f="__s3su",g="ws-local-keys",d="ws-store-always-keys",h=(0,o.getLocal)(),m=1024,v=524288,y=i("ÐÑевÑÑен макÑималÑнÑй ÑÐ°Ð·Ð¼ÐµÑ Ð·Ð°Ð¿Ð¸Ñи (${max} kb) в локалÑное Ñ ÑанилиÑе Ð´Ð»Ñ ÐºÐ»ÑÑа ${key} (${size} kb)"),p=()=>{const e=I();let t;try{t=[].concat(JSON.parse(h.getItem(d)))}catch(e){t=[]}const r=[];e.forEach((e=>{if(-1===t.indexOf(e))return h.removeItem(e);r.push(e)})),h.setItem(g,JSON.stringify(r))},I=()=>{try{return JSON.parse(h.getItem(g))||[]}catch(e){return[]}};a.Bus.channel("errors").subscribe("onAuthError",p).subscribe("authLogout",p),function(){const e=h.getItem(f);if(!r.isValid(e))p(),u()}();const S={getItem:e=>h.getItem(e),setItem(e,t){if(e===f)return!1;const r=""+t;if(!c(e,r))return!1;const n=h.setItem(e,r),s=I();if(-1===s.indexOf(e)&&e!==d)s.push(e),h.setItem(g,JSON.stringify(s));return!!n},removeItem(e){if(e===f)return;h.removeItem(e);let t,r=I();r=r.filter((t=>e!==t)),h.setItem(g,JSON.stringify(r));try{t=JSON.parse(h.getItem(d))||[]}catch(e){t=[]}if(-1!==t.indexOf(e))t=t.filter((t=>e!==t)),h.setItem(d,JSON.stringify(t))},clear(){p(),u()},getLength:()=>I().length,getKeys:()=>I()};return t.default=S,t}(0,{},n,i,o,e,c,s,t),h=d,m=function(e,t,r,n,s){"use strict";function i(){var e;const t="undefined"!=typeof process&&(null===(e=null===process||void 0===process?void 0:process.domain)||void 0===e?void 0:e.req);if(t)f=t.sessionStorage=t.sessionStorage||{};if(f)return f;const n=c.getItem(u);try{f=JSON.parse(n)||{}}catch(e){f={}}if(!f.hasOwnProperty("user"))f.user=r.getCurrent();if(null===f.user)f.user=r.getCurrent();if(!r.isValid(f.user))c.removeItem(u),f={},f.user=r.getCurrent();return f}function o(){c.setItem(u,JSON.stringify(i()))}function a(){if(n.constants.isBrowserPlatform)clearTimeout(l),l=setTimeout(o,4e3)}let l;
45Object.defineProperty(t,"__esModule",{value:!0});const c=(0,s.getSession)(),u="wsss";let f;if(n.constants.isBrowserPlatform)window.addEventListener("beforeunload",o);const g={get:e=>i()[e],set(e,t){if(e){if(null==t&&"object"==typeof e&&"[object Object]"===Object.prototype.toString.call(e)){for(const t in e)if(e.hasOwnProperty(t))i()[t]=e[t]}else i()[String(e)]=t;a()}},remove(e){delete i()[e],a()},toObject:()=>i(),save(){o()},clear(){!function(){if(n.constants.isBrowserPlatform)c.removeItem(u)}()}};return t.default=g,t}(0,{},n,i,c),v=m,y=function(e,t,r,n,s){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.isNativeLocalStorageAvailable=t.prefix=t.item=void 0,t.item=r,t.prefix=n,Object.defineProperty(t,"isNativeLocalStorageAvailable",{enumerable:!0,get:function(){return s.isNativeLocalStorageAvailable}}),t}(0,{},f,g,u),p=y,I=function(e,t,r,n,s,i,o){"use strict";function a(e){return e.length>=2143}function l(e){const t=e||c.event;if(!t)return;let{newValue:r}=t;const{key:n,oldValue:i}=t;if(r===i)return t.stopPropagation(),void t.stopImmediatePropagation();const l=Date.now();if(v&&v.key===n&&v.newValue===r&&v.oldValue===i&&l-v.date<=2e3)return;let p,I;if(v={key:n,newValue:r,oldValue:i,date:l},r){const e=r.match(h);if(e)r=r.replace(e[0],""),p=e[1],I=!0,t.stopPropagation(),t.stopImmediatePropagation()}if(p!==m){if(s.prefix.startsWith(n,u))return function(e,t){const r=s.prefix.remove(e,u),n=t,i=10;if(r===g)setTimeout((()=>{const e=y.getItem(n),t=d.filter((t=>t.key===n&&t.length===e.length));if(!t)f().notify("onChange",n,o.deserialize(e));d=d.filter((e=>e!==t))}),i)}(n,r);if(a(r))d.push({key:n,length:r.length});if(I)f().notify("onChange",n,o.deserialize(r))}}const c=globalThis,u="__storage",f=()=>r.Bus.channel("local_storage"),g=s.prefix.add("ie-fix-event",u);let d=[];const h=/\$ie-fix\{(\d+)\}/i,m=Math.random().toString().substr(2);let v;const y={getItem(e){return(t=n.default.getItem(e))&&t.replace(h,"")||t;var t},setItem(e,t){if("ws-store-always-keys"===e||"ws-local-keys"===e)return n.default.setItem(e,t);const r=(e=>`$ie-fix{${m}}${e}`)(t),s=n.default.setItem(e,r);if(s&&a(r))n.default.setItem(g,e),n.default.removeItem(g);return s}};return["getLength","getKeys","removeItem","clear"].forEach((e=>{y[e]=n.default[e].bind(y)})),()=>{if(i.detection.isIE&&c.addEventListener)return c.addEventListener("storage",l,!1),y;else return n.default}}(0,0,s,d,y,i,f),S=function(e,t,r,n,s,i,o){"use strict";function a(e){let t=e;if(!e&&globalThis.event)t=globalThis.event;if(!t)return;const{key:r,newValue:n}=t;if(r)if(!n)return d().notify("onRemove",r);else return d().notify("onChange",r,s.deserialize(n));else d().notify("onClear")}function l(e,t,r){if(!t)return this._notify(e.name);if(i.startsWith(t,this.prefix))return this._notify(e.name,i.remove(t,this.prefix),r);else return}function c(e,t){return s.deserialize(h.getItem(e,!t))}function u(e){return h.getKeys().filter((t=>i.startsWith(t,e)))}Object.defineProperty(t,"__esModule",{value:!0});const f="ws-store-always-keys",g=["onChange","onRemove","onClear"],d=()=>r.Bus.channel("local_storage"),h=n();let m=!1;class v extends o.ObservableMixin{constructor(e="",t=!1,r=!0){super(),this.prefix=e,this.storeAlways=t,this.isCheckSession=r,this._onStorage=l.bind(this),g.forEach((e=>{d().subscribe(e,this._onStorage)})),this._publish.apply(this,g),function(){if(!m&&globalThis)if(m=!0,globalThis.addEventListener)globalThis.addEventListener("storage",a,!1);else;}()}destroy(){return g.forEach((e=>{d().unsubscribe(e,this._onStorage)})),super.destroy.call(this)}setItem(e,t){const r=i.add(e,this.prefix),n=s.serialize(t),o=h.setItem(r,n,!this.isCheckSession);if(!o||!this.storeAlways)return o;const a=c(f,!this.isCheckSession)||[];if(-1===a.indexOf(r))a.push(r),h.setItem(f,s.serialize(a),!this.isCheckSession);return o}getItem(e){return c(i.add(e,this.prefix),!this.isCheckSession)}removeItem(e){return h.removeItem(i.add(e,this.prefix))}clear(){u(this.prefix).forEach((e=>{h.removeItem(e)}))}getKeys(){return u(this.prefix).map((e=>i.remove(e,this.prefix)))}toObject(){const e={};
45return u(this.prefix).forEach((t=>{e[t]=c(t,!this.isCheckSession)})),e}static clearAll(){h.clear()}}return t.default=v,t}(0,{},s,I,f,g,r),b=S,l.utils=l.SessionStorage=l.LocalStorageNative=l.LocalStorage=void 0,l.LocalStorage=b.default,l.LocalStorageNative=h.default,l.SessionStorage=v.default,l.utils=p,l})); 46define("Env/Event",["Env/Env","Env/Constants","Application/Env","require","exports"],(function(e,t,n,i,s){var r,o,u,a,h,c,l,f,d,_,v,b,g,p;return Object.defineProperty(s,"__esModule",{value:!0}),r=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e,t){this._isBubbling=!0,this._target=null,this.name=this._eventName=e,this._target=t}cancelBubble(){this._isBubbling=!1}isBubbling(){return this._isBubbling}getResult(){return this._result}setResult(e){this._result=e}getTarget(){return this._target}},t}(0,{}),o=r,u=function(e,t){"use strict";function n(){if("undefined"!=typeof globalThis&&globalThis.document)return globalThis.document;else return"undefined"!=typeof document?document:void 0}function i(){if("undefined"!=typeof globalThis&&globalThis.window)return globalThis.window;else return"undefined"!=typeof window?window:void 0}function s(){const e=n();return!!e&&"onfreeze"in e}return Object.defineProperty(t,"__esModule",{value:!0}),t.onPageResume=t.onPageFreeze=t.isPageFreezeSupported=void 0,t.isPageFreezeSupported=s,t.onPageFreeze=function(e,t={}){var r;const o=null!==(r=t.capture)&&void 0!==r?r:!1,u=n(),a=i();if(s()&&u)return u.addEventListener("freeze",e,o),()=>{u.removeEventListener("freeze",e,o)};const h=t=>{if(t.persisted)e()};return null==a||a.addEventListener("pagehide",h,o),()=>{null==a||a.removeEventListener("pagehide",h,o)}},t.onPageResume=function(e,t={}){var r;const o=null!==(r=t.capture)&&void 0!==r?r:!1,u=n(),a=i();if(s()&&u)return u.addEventListener("resume",e,o),()=>{u.removeEventListener("resume",e,o)};const h=t=>{if(t.persisted)e()};return null==a||a.addEventListener("pageshow",h,o),()=>{null==a||a.removeEventListener("pageshow",h,o)}},t}(0,{}),a=u,h=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e,t,n){this._channel=e,this._event=t,this._handler=n}enter(){this._channel.subscribe(this._event,this._handler)}dispose(){this._channel.unsubscribe(this._event,this._handler)}},t}(0,{}),c=h,l=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.handleTimeout=void 0,t.handleTimeout=function(e,t,n,i){let s=0,r=!1;const o=()=>{if(!r)clearInterval(s),s=setInterval(i,n)};return o.isTimeoutHandler=!0,e.subscribe(t,o),o(),()=>{e.unsubscribe(t,o),clearInterval(s),r=!0}},t}(0,{}),f=l,d=function(e,t,n,i,s,r){"use strict";function o(e){if("string"!=typeof e)return e;else return e.toLowerCase()}Object.defineProperty(t,"__esModule",{value:!0});const u=!(s.constants.isBrowserPlatform||"undefined"!=typeof process&&void 0===process.application);return t.default=class{constructor(e={}){this._events={},this._eventQueue=[],this._eventsAllowed=!1,this._isDestroyed=!1,this._onceEvents={},this._notificationQueue={},this._queueSize={},this._waitForPermit=e.waitForPermit||!1,this._strictMode=e.strictMode||!1,this._name=e.name||"",this.__EbDestroyCallback=e.destroyCallback||function(){},this._subscribeOnPS=e.subscribeOnPS||!1,this._subscribeCallback=e.subscribeCallback,this._convertName=void 0!==e.convertName?e.convertName:!0,this.publish("onDestroy")}isDestroyed(){return this._isDestroyed}publish(...e){var t,n,i;for(t=0,n=arguments.length;t<n;t++){if((i=arguments[t])&&!i.charAt)throw new Error("ÐÑгÑменÑами ÑÑнкÑии publish должно бÑÑÑ Ð½ÐµÑколÑко ÑÑÑок - имÑн ÑобÑÑий");i=this._convertName?o(i):i,this._events[i]=this._events[i]||[],this._notificationQueue[i]=this._notificationQueue[i]||[]}return this}setEventQueueSize(e,t){var n,i,s;if("number"==typeof e)t=e,e="*";if("object"!=typeof e){if(e=this._convertName?o(e):e,this._queueSize[e]=t,"*"==e)n=Object.keys(this._notificationQueue);else n=[e];n.forEach((e=>{if(this._notificationQueue[e]&&this._notificationQueue[e].length>t)this._notificationQueue[e]=this._notificationQueue[e].slice(-t)}))}else for(i in e)if(e.hasOwnProperty(i))s=e[i],this.setEventQueueSize(i,s)}_notifyToHandler(e,t,n,s){try{if(s=[t].concat(s),n&&(!n.ctx||!n.ctx.isDestroyed||!n.ctx.isDestroyed()))n.fn.apply(n.ctx,s);if(!t.isBubbling()||!this._events)return!1}catch(t){i.IoC.resolve("ILogger").error(n.ctx&&n.ctx.describe?n.ctx.describe():"Unknown Object",'Event handler for "'+e+'" returned error: '+t.message,t)}}notify(e,...t){var n,t=new Array(arguments.length-1);for(n=1;n<arguments.length;n++)t[n-1]=arguments[n];return this._notifyWithTarget(e,void 0,t)}notifyWithTarget(e,t){var n,i=new Array(arguments.length-2);for(n=2;n<arguments.length;n++)i[n-2]=arguments[n];return this._notifyWithTarget(e,t,i)}_notifyWithTarget(e,t,i){var s,r,u,a,h,c,l=this._convertName?o(e):e;
46if(!this._waitForPermit||this._eventsAllowed){if(!(c=this._events[l])){if(this._strictMode)throw new Error('Event "'+l+'" have not published yet');c=[],this._events[l]=c}if(0!==(h=c.length)){for(u=l,r=new n.default(l,t),a=0;a<h&&!1!==this._notifyToHandler(u,r,c[a],i);a++);s=r.getResult()}return this._saveNotification(l,t,i),s}else this._eventQueue.push(arguments)}_saveNotification(e,t,n){var i,s=this._queueSize[e]||this._queueSize["*"]||0;if(s){if((i=this._notificationQueue[e]=this._notificationQueue[e]||[]).length>=s)i.shift();i.push([t,n])}}eventsAllowed(){return this._eventsAllowed}allowEvents(){if(!1===this._eventsAllowed){this._eventsAllowed=!0;for(var e=0,t=this._eventQueue.length;e<t;e++)this._notifyWithTarget.apply(this,this._eventQueue[e]);this._eventQueue.length=0}}once(e,t,n,i,s){function r(){a._unsubscribeFromOnce(e,t,n,r),t.apply(this,arguments)}if(u&&!this._subscribeOnPS)return this;if(e=this._convertName?o(e):e,r.originalFn=t,"function"==typeof n)s=i,i=n,n=null;var a=this,h={handler:t,ctx:n,wrapper:r,fallback:i};if(!this._onceEvents[e])this._onceEvents[e]=[];return this._onceEvents[e].push(h),this.subscribe(e,r,n,i,s)}subscribe(e,t,i,s,r){var a,h,c,l,f,d;if(u&&!this._subscribeOnPS)return this;if(e=this._convertName?o(e):e,this._isDestroyed)throw new Error("Trying to subscribe event '"+e+"', but EventBusChannel is destroyed");else if(this._strictMode&&!(e in this._events))throw new Error("Event '"+e+"' is not registered");else if("function"==typeof t){if("function"==typeof i)r=s,s=i,i=null;if(s&&"function"==typeof s)h=this,c=function(){clearTimeout(f)},l=function(n){if(!d){if(d=!0,h.unsubscribe(e,c,i),"function"==typeof t.originalFn)h.unsubscribe(e,t.originalFn,i,s);else h.unsubscribe(e,t,i,s);return n?c():s(),!0}},f=setTimeout(l,r||2e4),this.once(e,c,i);if(a={fn:t,ctx:i,fb:s,killFb:l},this._events[e]=this._events[e]||[],this._events[e].push(a),"function"==typeof this._subscribeCallback&&!t.isTimeoutHandler&&1===this._events[e].filter((e=>!e.fn.isTimeoutHandler)).length)this._subscribeCallback(e,!0);if(this._notificationQueue[e]&&this._notificationQueue[e].length)this._notificationQueue[e].forEach((function(t){var i=t[0],s=t[1],r=new n.default(e,i);this._notifyToHandler(e,r,a,s)}),this);return this}else throw new TypeError("Event '"+e+"' has unexpected handler")}getResource(e,t){return new r.default(this,e,t)}_unsubscribeFromOnce(e,t,n,i,s){e=this._convertName?o(e):e;var r,u,a=this._onceEvents[e],h=[];if(a){for(r=0;r<a.length;++r)if(!((u=a[r]).handler!==t||n&&u.ctx!==n||i&&i!==u.wrapper||s&&s!==u.fallback))h.push(r);for(r=h.length-1;r>=0;--r)this.unsubscribe(e,a[h[r]].wrapper,n,s),this._onceEvents[e].splice(h[r],1)}}unsubscribe(e,t,n,i){var s,r,a,h,c;if(u&&!this._subscribeOnPS)return this;if(e=this._convertName?o(e):e,!t||"function"!=typeof t)throw new TypeError("Unsubscribe: second argument is not a function");if(s=this._strictMode?this._events[e]:this._events[e]=this._events[e]||[]){if("function"==typeof n)i=n,n=null;for(this._unsubscribeFromOnce(e,t,n,null,i),a=0,c=(s=this._events[e]).length;a!==c;a++)if(s[a].fn===t&&(s[a].ctx&&n?s[a].ctx===n:1)&&(s[a].fb&&i?s[a].fb===i:1)){if(s[a].killFb&&s[a].killFb(!0))continue;for(r=s.slice(0,a),h=++a;a!==c;a++)if(s[a].fn===t&&(s[a].ctx&&n?s[a].ctx===n:1)&&(s[a].fb&&i?s[a].fb===i:1)){if(h!==a)r=r.concat(s.slice(h,a));h=a+1}if(h!==c)r=r.concat(s.slice(h,c));this._events[e]=r;break}if(s.length&&"function"==typeof this._subscribeCallback&&!t.isTimeoutHandler&&!this._events[e].filter((e=>!e.fn.isTimeoutHandler)).length)this._subscribeCallback(e,!1);return this}else throw new Error("Event '"+e+"' is not registered")}unsubscribeAll(){for(let e in this._events)if(this._events.hasOwnProperty(e)&&this._events[e]&&0!==this._events[e].length){if("function"==typeof this._subscribeCallback&&this._events[e].filter((e=>!e.fn.isTimeoutHandler)).length)this._subscribeCallback(e,!1);this._events[e].length=0}this._onceEvents={}}getName(){return this._name}destroy(){if(this.notifyWithTarget("onDestroy",this),this.unsubscribeAll(),this._name)this.__EbDestroyCallback(this);this._isDestroyed=!0}unbind(e){if(e=this._convertName?o(e):e,this._events[e]&&this._events[e].length){if(this._onceEvents[e]&&this._onceEvents[e].length)this._onceEvents[e]=[];if("function"==typeof this._subscribeCallback&&this._events[e].filter((e=>!e.fn.isTimeoutHandler)).length)this._subscribeCallback(e,!1);this._events[e]=[]}return this}hasEvent(e){return e=this._convertName?o(e):e,!this._strictMode||this._events&&!!this._events[e]}getEvents(){return Object.keys(this._events)}hasEventHandlers(e){return e=this._convertName?o(e):e,!!this._events[e]&&this._events[e].length>0}getEventHandlers(e){return e=this._convertName?o(e):e,(this._events[e]||[]).map((function(e){return e.fn}))}},t}(0,{},r,e,t,h),_=d,v=function(e,t,n){"use strict";function i(e){r.removeChannel(e.getName())}
46Object.defineProperty(t,"__esModule",{value:!0}),t.EventBus=void 0;class s{constructor(){this._channels={}}channel(e,t){let s,r;if("object"==typeof e&&e)s="",r=e;else s=String(e||"").toLowerCase(),r=t||{};if(!s)return new n.default(r);if(!(s in this._channels))r.name=s,r.destroyCallback=i,this._channels[s]=new n.default(r);return this._channels[s]}removeChannel(e){delete this._channels[e.toLowerCase()]}hasChannel(e){return void 0!==this._channels[e.toLowerCase()]}globalChannel(){return this.channel("global")}}t.EventBus=s;const r=new s;return r.id=Math.random().toString(20).substr(2,20),t.default=r,t}(0,{},d),b=v,g=function(e,t,n,i,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.onWakeUp=void 0;const o=e=>{if(n.detection.isDesktop)s.logger.info("WakeUpWatcher",e)};return t.onWakeUp=function(e=12e4,t=1260){function s(){i.default.globalChannel().notify("onWakeUp",a),h=!1}function u(){h=h||Date.now()-a>=e}if(!n.constants.isBrowserPlatform)return;let a=Date.now(),h=!1;setInterval((()=>{if(u(),h&&!document.hidden)o("ÐнÑеÑвал. ÐÑзов notify()"),s();a=Date.now()}),t),document.addEventListener("visibilitychange",(()=>{if(o(`ÐбÑабоÑÑик visibilitychange. document.hidden=${document.hidden}`),!document.hidden){if(u(),h||n.detection.isMobilePlatform)o("ÐбÑабоÑÑик visibilitychange. ÐÑзов notify()"),s();a=Date.now()}}),!1),(0,r.onPageFreeze)((()=>{h=!0,o("ÐбÑабоÑÑик freeze")})),(0,r.onPageResume)((()=>{if(o(`ÐбÑабоÑÑик resume. document.hidden=${document.hidden}`),document.hidden)s();a=Date.now()}))},t}(0,{},e,v,n,u),p=g,s.onPageResume=s.onPageFreeze=s.isPageFreezeSupported=s.ResourceSubscription=s.Object=s.handleTimeout=s.Channel=s.EventBus=s.Bus=void 0,s.Bus=b.default,Object.defineProperty(s,"EventBus",{enumerable:!0,get:function(){return b.EventBus}}),s.Channel=_.default,s.Object=o.default,s.ResourceSubscription=c.default,Object.defineProperty(s,"handleTimeout",{enumerable:!0,get:function(){return f.handleTimeout}}),(0,p.onWakeUp)(),Object.defineProperty(s,"isPageFreezeSupported",{enumerable:!0,get:function(){return a.isPageFreezeSupported}}),Object.defineProperty(s,"onPageFreeze",{enumerable:!0,get:function(){return a.onPageFreeze}}),Object.defineProperty(s,"onPageResume",{enumerable:!0,get:function(){return a.onPageResume}}),s})); 47define("Env/UserInfo",["Env/Env"],(function(e){"use strict";var n="s3su",r=e.cookie.get(n),o={get:function(e){return(process&&process.domain&&process.domain.req&&process.domain.req.userInfo||"undefined"!=typeof window&&window.userInfo||{})[e]},isValid:function(o){if(0===arguments.length)o=r;var i=e.cookie.get(n);if(!o&&!i)return!0;if(!o&&i){if(0===arguments.length)r=i;return!0}if(!o||!i)return!1;else return o===i},getCurrent:function(){return e.cookie.get(n)},isInit:function(){return!!("undefined"!=typeof window?window.userInfo:process&&process.domain&&process.domain.req&&process.domain.req.userInfo&&Object.keys(process.domain.req.userInfo).length)}};return o}
47)); 48define("Types/entity",["Types/util","Types/shim","Types/parser","Types/object","Types/formatter","Env/Event","Env/Env","require","exports","Types/guards","Types/di"],(function(e,t,i,r,n,s,a,o,l,d,u){var c,h,f,p,y,_,g,m,b,T,F,v,O,w,P,M,D,j,C,E,S,R,N,x,$,I,A,k,V,z,H,K,B,U,L,J,G,W,Y,Z,Q,q,X,ee,te,ie,re,ne,se,ae,oe,le,de,ue,ce,he,fe,pe,ye,_e,ge,me,be,Te,Fe,ve,Oe,we,Pe,Me,De,je,Ce,Ee,Se,Re,Ne,xe,$e,Ie,Ae,ke,Ve,ze,He,Ke,Be,Ue,Le,Je,Ge,We,Ye,Ze,Qe,qe,Xe,et,tt,it,rt,nt,st,at,ot,lt,dt,ut,ct,ht,ft,pt,yt,_t,gt,mt,bt,Tt,Ft,vt,Ot,wt,Pt,Mt;return Object.defineProperty(l,"__esModule",{value:!0}),c=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=Symbol("clone");class n{clone(e){let t;if(e){const e=Object.getPrototypeOf(this).constructor,i=this.toJSON();if(i.state=this._unlinkCollection(i.state),i.state.$options)i.state.$options=this._unlinkCollection(i.state.$options);t=e.fromJSON(i)}else{const e=new Map,r=(0,i.getJsonReplacerWithStorage)(e),n=(0,i.getJsonReviverWithStorage)(void 0,e);t=JSON.parse(JSON.stringify(this,r),n)}return t[r]=!0,delete t._instanceId,t}_unlinkCollection(e){let t;if(e instanceof Array){t=[];for(let i=0;i<e.length;i++)t[i]=this._unlinkObject(e[i]);return t}if(e instanceof Object){t={};for(const i in e)if(e.hasOwnProperty(i))t[i]=this._unlinkObject(e[i]);return t}return e}_unlinkObject(e){if(e instanceof Array)return e.slice();else return e}}return t.default=n,Object.assign(n.prototype,{"[Types/_entity/CloneableMixin]":!0,"[Types/_entity/ICloneable]":!0}),t}(0,{},n),h=c,f=function(e,t,i){"use strict";function r(){throw new ReferenceError("This class instance is destroyed.")}Object.defineProperty(t,"__esModule",{value:!0});const n=Symbol("destroyed");class s{constructor(){this["[Types/_entity/DestroyableMixin]"]=!0}get destroyed(){return Boolean(this[n])}destroy(e){if(this[n]=!0,!i.constants.isProduction)for(const e in this)switch(e){case"destroy":case"destroyed":case"isDestroyed":break;default:if("function"==typeof this[e])this[e]=r}}isDestroyed(){return this.destroyed}}return t.default=s,Object.assign(s.prototype,{"[Types/_entity/DestroyableMixin]":!0}),t}(0,{},a),p=f,y=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i{constructor(){i.initMixin(this)}static initMixin(e){e._publish("onEventRaisingChange")}setEventRaising(e,t){e=!!e,t=!!t;const i=this._eventRaising===e;if(t&&i)throw new Error(`The events raising is already ${e?"enabled":"disabled"} with analyze=true`);if(this._eventRaisingTrigger)this._eventRaisingTrigger.call(this,e,t);if(this._eventRaising=e,!i)this._notify("onEventRaisingChange",e,t)}isEventRaising(){return this._eventRaising}}return t.default=i,Object.assign(i.prototype,{"[Types/_entity/EventRaisingMixin]":!0,_eventRaising:!0}),t}(0,{}),_=y,g=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.isCloneable=void 0,t.isCloneable=function(e){return!!e["[Types/_entity/ICloneable]"]},t}(0,{}),m=g,b=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,r="undefined"==typeof window;let n=0;class s{getInstanceId(){if(n>=i)n=0;return this._instanceId||(this._instanceId=(r?"server-":"client-")+this._instancePrefix+n++)}}t.default=s,Object.assign(s.prototype,{"[Types/_entity/InstantiableMixin]":!0,"[Types/_entity/IInstantiable]":!0,_instancePrefix:"id-",_instanceId:""}),s.prototype.getHash=s.prototype.getInstanceId;for(const e of Object.getOwnPropertyNames(s.prototype))if("constructor"!==e)s[e]=s.prototype[e];return t}(0,{}),T=b,F=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e){r.initMixin(this,e)}static initMixin(e,t){const i=t&&t.handlers;if(i instanceof Object)for(const t in i)if(i.hasOwnProperty(t))e.subscribe(t,i[t])}destroy(e){if(this._eventBusChannel)this._eventBusChannel.unsubscribeAll(),this._eventBusChannel.destroy(),this._eventBusChannel=null}subscribe(e,t,r){if(!this._destroyed){if(!this._eventBusChannel)if(this._eventBusChannel=i.Bus.channel(this.eventBusOptions||{convertName:!1}),this._publishedEvents)for(let e=0;e<this._publishedEvents.length;e++)this._eventBusChannel.publish(this._publishedEvents[e]);if(void 0===r)r=this;this._eventBusChannel.subscribe(e,t,r)}}unsubscribe(e,t,i){if(this._eventBusChannel){if(void 0===i)i=this;this._eventBusChannel.unsubscribe(e,t,i)}}getEventHandlers(e){return this._eventBusChannel?this._eventBusChannel.getEventHandlers(e):[]}hasEventHandlers(e){return this._eventBusChannel?this._eventBusChannel.hasEventHandlers(e):!1}_publish(...e){let t;this._publishedEvents=this._publishedEvents||[];for(let i=0;i<e.length;i++)if(t=e[i],this._publishedEvents.push(t),this._eventBusChannel)this._eventBusChannel.publish(t)}_notify(e,...t){if(this._eventBusChannel)return this._notifyPushQueue.apply(this,[e,...t]),this._notifyQueue(this._eventsQueue)[0]}_notifyLater(e,...t){if(this._eventBusChannel)this._notifyPushQueue.apply(this,[e,...t])}_notifyPushQueue(e,...t){this._eventsQueue=this._eventsQueue||[],this._eventsQueue.push([e,...t])}_notifyQueue(e){const t=[];if(!e.running){let i;for(e.running=!0;i=e[0];)t.push(this._eventBusChannel._notifyWithTarget(i[0],this,i.slice(1))),e.shift();e.running=!1}return t}_removeFromQueue(e){if(this._eventsQueue)for(let t=1;t<this._eventsQueue.length;t++)if(this._eventsQueue[t][0]===e)this._eventsQueue.splice(t,1),t--}static setChannelOptions(e,t){e.eventBusOptions=t}}return t.default=r,Object.assign(r.prototype,{"[Types/_entity/ObservableMixin]":!0,_eventBusChannel:null,_eventsQueue:null,_publishedEvents:null}),t}(0,{},s),v=F,O=function(e,t,i){"use strict";
48Object.defineProperty(t,"__esModule",{value:!0}),t.isObservableMixin=t.ObserveSessionMixin=void 0,t.isObservableMixin=function(e){return e&&e["[Types/_entity/ObserveSessionMixin]"]};class r{startObserveSession(){if(this.isObserveSessionGathering)i.logger.error("СнаÑала завеÑÑиÑе ÑекÑÑÑÑ ÑеÑÑÐ¸Ñ ÑбоÑа завиÑимоÑÑей ÑеÑез .endObserveSession(), пÑежде Ñем запÑÑкаÑÑ Ð½Ð¾Ð²ÑÑ.");if(!this._sessionGathering)this._sessionGathering={dependencies:new Set,observableReferences:new Set}}get isObserveSessionGathering(){return null!==this._sessionGathering}endObserveSession(e){if(!this._sessionGathering)return i.logger.error("СнаÑала запÑÑÑиÑе новÑÑ ÑеÑÑÐ¸Ñ ÑбоÑа завиÑимоÑÑей ÑеÑез .startObserveSession(), пÑежде Ñем завеÑÑаÑÑ ÐµÑ."),()=>{};this._setSession(e,this._sessionGathering);const t=[];for(const i of this._sessionGathering.observableReferences)t.push(i.endObserveSession(e));return this._sessionGathering=null,()=>{t.forEach((e=>e())),this._sessions.delete(e)}}destroy(e){this._sessions=null,this._sessionGathering=null}_isSessionGathering(){return!!this._sessionGathering}_pushSessionDependency(e){if(this._sessionGathering)this._sessionGathering.dependencies.add(e)}_createObservableDependency(e){var t;if(!e.isObserveSessionGathering)e.startObserveSession(),null===(t=this._sessionGathering)||void 0===t||t.observableReferences.add(e)}_triggerSessionDependency(e){if(!this._sessions)return;if(!e)return;const t=Object.keys(e);for(const[i,r]of this._sessions)if(t.some((e=>r.dependencies.has(e))))i(e)}_setSession(e,t){if(!this._sessions)this._sessions=new Map;this._sessions.set(e,t)}}return t.ObserveSessionMixin=r,Object.assign(r.prototype,{"[Types/_entity/ObserveSessionMixin]":!0,_sessionGathering:null}),t}(0,{},e),w=O,P=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isOptionsMixin=void 0,t.isOptionsMixin=function(e){return e&&!0===e["[Types/_entity/OptionsMixin]"]};class i{constructor(e){this["[Types/_entity/OptionsMixin]"]=!0,this._$options=e||{}}getOptions(){return this._$options}setOptions(e={}){if(this._hasChangedOptions(e))this._$options={...this._$options,...e}}_hasChangedOptions(e={}){for(const t in e)if(!Object.prototype.hasOwnProperty.call(this._$options,t)||this._$options[t]!==e[t])return!0;return!1}}return t.default=i,Object.assign(i.prototype,{_$options:{}}),t}(0,{}),M=P,D=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isOptionsToPropertyMixin=t.getMergeableProperty=void 0;const i="_$",r=Symbol("mergeable");t.getMergeableProperty=function(e){return e[r]=!0,e},t.isOptionsToPropertyMixin=function(e){return e&&!0===e["[Types/_entity/OptionsToPropertyMixin]"]};
48class n{constructor(e){this["[Types/_entity/OptionsToPropertyMixin]"]=!0,n.initMixin(this,e)}static initMixin(e,t){if(t&&"object"==typeof t){const n=Object.keys(t);if(n.length){const s=Object.getPrototypeOf(e),a=i;let o,l;for(let i=0,d=n.length;i<d;i++){o=n[i],l=a+o;const d=s[l]&&s[l][r];if(l in e)e[l]=d?{...s[l],...t[o]}:t[o]}}}}_getOptions(){const e={},t=Object.keys(this),n=Object.getPrototypeOf(this);let s,a,o;for(let l=0,d=t.length;l<d;l++)if(s=t[l],s.substr(0,2)===i)if(a=this[s],o=s.substr(2),n[s]&&n[s][r])e[o]=Object.keys(a).filter((e=>a[e]!==n[s][e])).reduce(((e,t)=>(e[t]=a[t],e)),{});else e[o]=a;if(this._options)for(s in this._options)if(this._options.hasOwnProperty(s)&&!(s in e))e[s]=this._options[s];return e}}return t.default=n,Object.assign(n.prototype,{"[Types/_entity/OptionsToPropertyMixin]":!0}),t}(0,{}),j=D,C=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i{get versionLocked(){return void 0!==this._lockedVersion}getVersion(){return this._version}lockVersion(){if(void 0!==this._lockedVersion)throw new Error("Can't lock version because it's already locked");this._lockedVersion=this._version}unlockVersion(e=!1){if(void 0===this._lockedVersion)throw new Error("Can't unlock version because it's not locked yet");if(!e)this._version=this._lockedVersion;this._lockedVersion=void 0}_nextVersion(){if(void 0===this._lockedVersion){if(this._version++,this._$versionCallback)this._$versionCallback(this._version);if((e=this)instanceof Object&&e["[Types/_entity/ManyToManyMixin]"])this._getMediator().belongsTo(this,(e=>{if(e&&e["[Types/_entity/IVersionable]"])e._nextVersion()}));var e}else this._lockedVersion++}}t.default=i,Object.assign(i.prototype,{"[Types/_entity/VersionableMixin]":!0,"[Types/_entity/IVersionable]":!0,_version:0,_lockedVersion:void 0,_$versionCallback:null});for(const e of Object.getOwnPropertyNames(i.prototype))if("constructor"!==e)i[e]=i.prototype[e];return t}(0,{}),E=C,S=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.isDecorator=void 0,t.isDecorator=function(e){return!!e["[Types/_entity/adapter/IDecorator]"]},t}(0,{}),R=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.isInstanceWithMeta=void 0,t.isInstanceWithMeta=function(e){return e["[Types/_entity/adapter/IMetaData]"]},t}(0,{}),N=R,x=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default={boolean:"ÐогиÑеÑкое",integer:"ЧиÑло Ñелое",real:"ЧиÑло веÑеÑÑвенное",money:"ÐенÑги",string:"СÑÑока",xml:"XML-Ñайл",datetime:"ÐаÑа и вÑемÑ",date:"ÐаÑа",time:"ÐÑемÑ",timeinterval:"ÐÑеменной инÑеÑвал",link:"СвÑзÑ",i
48dentity:"ÐденÑиÑикаÑоÑ",enum:"ÐеÑеÑиÑлÑемое",flags:"Флаги",record:"ÐапиÑÑ",recordset:"ÐÑбоÑка",binary:"ÐвоиÑное",uuid:"UUID",rpcfile:"Файл-rpc",object:"JSON-обÑекÑ",array:"ÐаÑÑив"},t}(0,{}),$=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromiseCanceledError=void 0;const i=Symbol("isCanceled");class r extends Error{constructor(e){super(e),this.message=e,this.isCanceled=!0,this.name="PromiseCanceledError"}}t.PromiseCanceledError=r;return t.default=class{constructor(e){this.promise=new Promise(((t,r)=>{this._chained=e.then((e=>this[i]?r(this[i]):t(e))).catch((e=>this[i]?r(this[i]):r(e)))}))}cancel(e){this[i]=new r(e||"Unknown reason")}},t}(0,{}),I=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{static create(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}static isValid(e){return/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(e)}},t}(0,{}),A=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e){if(!(e instanceof Array))if("string"==typeof e)e=e.split(this._separator);else e=[e];this._value=e}getValue(){return this._value[0]}getName(){return this._value[1]}valueOf(){return this._value}toString(){return null===this._value[0]?null:this._value.join(",")}}return t.default=r,r.prototype["[Types/_entity/applied/Identity]"]=!0,r.prototype._separator=",",r.prototype._value=null,(0,i.register)("Types/entity:Identity",r,{instantiate:!1}),t}(0,{},u),k=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i{static isNode(e){return Boolean(Array.isArray(e)&&"string"==typeof e[0])}static isRootNode(e){return Array.isArray(e)&&(i.isNode(e[0])||"string"!=typeof e[0])}static hasChildNodes(e){if(i.isNode(e))if(i.hasAttributes(e))return Boolean(e.slice(2).length);else return Boolean(e.slice(1).length);else return!1}static getAttributes(e){if(i.isNode(e)&&i.hasAttributes(e))return e[1]}static hasAttributes(e){return i.isNode(e)&&"object"==typeof e[1]&&!Array.isArray(e[1])}static getChildren(e){if(i.isNode(e))if(i.hasAttributes(e))return e.slice(2);else return e.slice(1);else if(i.isRootNode(e))return e}static prepend(e,...t){if(i.isNode(e))if(i.hasAttributes(e))e.splice(2,0,...t);else e.splice(1,0,...t)}static append(e,...t){if(i.isNode(e))e.push(...t)}static removeChild(e,t){if(i.isNode(e))if(i.hasAttributes(e))return e.splice(2+t,1)[0];else return e.splice(1+t,1)[0]}static removeChildNodes(e){if(i.hasChildNodes(e))if(i.hasAttributes(e))e.splice(2);else e.splice(1)}static getNodeName(e){if(i.isNode(e))return e[0]}static setAttribute(e,t,r){if(i.isNode(e))if(!i.hasAttributes(e))i.setAttributes(e,{[t]:r});else e[1][t]=r}static getAttribute(e,t){var r;if(!i.isNode(e)||!i.hasAttributes(e))return null;else return null!==(r=i.getAttributes(e)[t])&&void 0!==r?r:null}static removeAttribute(e,t){if(!i.isNode(e)||!i.hasAttributes(e))return;const r=i.getAttribute(e,t);return delete i.getAttributes(e)[t],r}static removeAttributes(e){if(i.hasAttributes(e))e.splice(1,1)}static setAttributes(e,t){if(i.isNode(e))if(i.hasAttributes(e))e.splice(1,1,t);else e.splice(1,0,t)}static changeNodeName(e,t){if(i.isNode(e))e[0]=t}static iterateJSONML(e,t,r){if("function"==typeof t)if(i.isNode(e)||i.isRootNode(e)){t(e,r);const n=i.getChildren(e);if(Array.isArray(n))n.forEach((r=>{i.iterateJSONML(r,t,e)}))}else if("string"==typeof e)t(e,r)}static replaceNode(e,t){if(i.isNode(e)&&i.isNode(t))t.splice(0,1/0,...e)}}return t.default=i,t}(0,{}),V=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i{constructor(e){this._value=e}valueOf(){return this._value}toJSON(){return this._value}}return t.default=i,i.prototype["[Types/_entity/applied/PrimaryKey]"]=!0,t}(0,{}),z=function(e,t){"use strict";function i(){let e=Math.floor(32*Math.random());if(32===e)e=31;return r.charAt(e)}
48Object.defineProperty(t,"__esModule",{value:!0});const r="0123456789ABCDEFGHJKMNPQRSTVWXYZ";return t.default=class{static create(e=Date.now()){return`${function(e,t){let i,n="";for(;t>0;t--)i=e%32,n=r.charAt(i)+n,e=(e-i)/32;return n}(e,10)}${function(){let e="";for(let t=16;t>0;t--)e=i()+e;return e}()}`}static isValid(e){if(26!==e.length)return!1;for(let t=25;t>=0;t--)if(!r.includes(e[t]))return!1;return!0}},t}(0,{}),H=function(e,t){"use strict";var i;return Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Year=0]="Year",e[e.Month=1]="Month",e[e.Day=2]="Day"}(i||(i={})),t.default=i,t}(0,{}),K=function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.Units=void 0,function(e){e.Year="Year",e.Month="Month",e.Day="Day"}(i||(t.Units=i={}));const r=864e5;return t.default=function(e,t,n){let s;if(e instanceof Date&&t instanceof Date)switch(n){case i.Year:s=function(e,t){return t.getFullYear()-e.getFullYear()}(e,t);break;case i.Month:s=function(e,t){const i=12*e.getFullYear()+e.getMonth();return 12*t.getFullYear()+t.getMonth()-i}(e,t);break;case i.Day:s=function(e,t){const i=new Date(e.getFullYear(),e.getMonth(),e.getDate(),12),n=new Date(t.getFullYear(),t.getMonth(),t.getDate(),12);return(Number(n)-Number(i))/r}(e,t);break;default:s=Number(t)-Number(e)}else s=Number(t)-Number(e);return s<0?-Math.floor(-s):Math.floor(s)},t}(0,{}),B=function(e,t){"use strict";function i(e){const t=typeof(e=function(e){if("function"==typeof e)switch(e){case Boolean:e="boolean";break;case Number:e="number";break;case String:e="string"}return e}(e));if(null===e)return function(e,t){const i=e[t];if(null!==i)return new TypeError(`Value "${i}" should be null`)};switch(t){case"string":return function(t,i){const r=t[i];if(!(void 0===r||typeof r===e||r instanceof String))return new TypeError(`Value "${r}" should be type of ${e}`)};case"function":return function(t,i){const r=t[i];if(!(void 0===r||r instanceof e))return new TypeError(`Value "${r}" should be instance of ${e}`)};case"object":return function(t,i){const r=t[i];if(void 0===r)return;const n=function(e){return"object"==typeof e&&null!==e&&!!e._mixins}(r)&&r._mixins;if(!(n instanceof Array&&-1!==n.indexOf(e)))return new TypeError(`Value "${r}" should implement ${e}`)}}throw new TypeError(`Argument "type" should be one of following types: string, function or object but "${t}" received.`)}function r(){const e=this;return o((function(t,i,r){if(void 0===t[i])return new TypeError("Value is required");else return e(t,i,r)}))}function n(e){if(!(e instanceof Array))throw new TypeError("Argument values should be an instance of Array");const t=this;return o((function(i,r,n){const s=i[r];if(void 0!==s&&-1===e.indexOf(s))return new TypeError(`Invalid value ${s}`);else return t(i,r,n)}))}function s(e){if(!(e instanceof Array))throw new TypeError("Argument values should be an instance of Array");const t=this;return o((function(i,r,n){const s=i[r];if(void 0!==s&&-1!==e.indexOf(s))return new TypeError(`Invalid value ${s}`);else return t(i,r,n)}))}function a(e){const t=this,r=i(e);return o((function(e,i,n){const s=e[i];if(void 0!==s){if(!(s instanceof Array))return new TypeError(`'Value "${s}" is not an Array`);let e;for(let t=0;t<s.length;t++)if(e=r(s,t,n),e instanceof Error)return e}return t(e,i,n)}))}function o(e){const t=(...t)=>e.apply(this,t);return Object.defineProperties(t,{required:{enumerable:!0,value:r},oneOf:{enumerable:!0,value:n},not:{enumerable:!0,value:s},arrayOf:{enumerable:!0,value:a}}),t}return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(...e){if(0===e.length)throw new TypeError("You should specify one type descriptor at least");return o(e.length>1?function(...e){const t=e.map((e=>i(e)));return function(e,i,r){let n=!1;const s=[];for(let a=0;a<t.length;a++){const o=(0,t[a])(e,i,r);if(o instanceof Error)s.push(o);else{n=!0;break}}if(!n)return new TypeError("There are following restrictions for composite type: "+s.map((e=>`"${e.message}"`)).join(" or "))}}(...e):i(e[0]))},t}(0,{}),U=B,L=function(e,t){"use strict";var i;
48return Object.defineProperty(t,"__esModule",{value:!0}),t.FieldTypeEnum=void 0,function(e){e.boolean="boolean",e.integer="integer",e.real="real",e.decimal="decimal",e.float="float",e.double="double",e.money="money",e.string="string",e.xml="xml",e.datetime="datetime",e.date="date",e.time="time",e.timeinterval="timeinterval",e.identity="identity",e.enum="enum",e.flags="flags",e.record="record",e.model="model",e.recordset="recordset",e.binary="binary",e.uuid="uuid",e.rpcfile="rpcfile",e.object="object",e.array="array",e.link="link"}(i||(t.FieldTypeEnum=i={})),t}(0,{}),J=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{}return t.default=r,Object.assign(r.prototype,{"[Types/_entity/format/UniversalField]":!0,_moduleName:"Types/entity:format.UniversalField",type:"",name:"",defaultValue:null,nullable:!1,meta:null}),(0,i.register)("Types/entity:format.UniversalField",r,{instantiate:!1}),t}(0,{},u),G=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=Symbol("functors");return t.default=class{constructor(e,...t){return Object.getPrototypeOf(this).constructor.create(e,...t)}static create(e){if(!(e instanceof Function))throw new TypeError('Argument "fn" be an instance of Function');const t=this,r=e[i]?e[i].slice():[];return Object.defineProperty(e,i,{get:()=>r.concat(t)}),e}static isFunctor(e){return Boolean(e&&e[i]&&e[i].indexOf(this)>-1)}},t}(0,{}),W=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeDataIterator=void 0;return t.TreeDataIterator=class{constructor(e,t){this._treeOptions=e,this._entryCallback=t}get childrenProperty(){return this._treeOptions.childrenProperty||"children"}get parentProperty(){return this._treeOptions.parentProperty||"parentId"}get keyProperty(){return this._treeOptions.keyProperty}iterate(e){if(function(e){return Array.isArray(e)}(e))return this._processFlatArrayTree(e);if(function(e,t){return"object"==typeof e&&Object.values(e).some((e=>e.hasOwnProperty(t)&&!!e[t]))}(e,this.parentProperty))return this._processFlatObjectTree(e);if(function(e,t){return"object"==typeof e&&Object.values(e).some((e=>e.hasOwnProperty(t)&&!!e[t]))}(e,this.childrenProperty))return this._processNestedTree(e);else return}_processFlatArrayTree(e,t=[]){const i=t.length?t[t.length-1]:void 0,r=e.filter((e=>e[this.parentProperty]===i));for(const i of r){const r=i[this.keyProperty],n=[...t,r];this._entryCallback(this._getClearValue(i),n),this._processFlatArrayTree(e,n)}}_processFlatObjectTree(e,t=[]){const i=t.length?t[t.length-1]:void 0,r=Object.keys(e).filter((t=>{const r=e[t];return r&&r[this.parentProperty]===i}));for(const i of r){const r=[...t,i];this._entryCallback(this._getClearValue(e[i]),r),this._processFlatObjectTree(e,r)}}_processNestedTree(e,t=[]){for(const[i,r]of Object.entries(e)){const e=[...t,i];this._entryCallback(this._getClearValue(r),e);const n=r[this.childrenProperty];if(n&&Object.keys(n).length)this._processNestedTree(n,e)}}_getClearValue(e){const t={...e};return delete t[this.keyProperty],delete t[this.childrenProperty],delete t[this.parentProperty],t}},t}(0,{}),Y=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.INTERNAL_MODIFY_METHOD=void 0,t.INTERNAL_MODIFY_METHOD=Symbol("internalModify"),t}(0,{}),Z=Y,Q=function(e,t,i,r,n){"use strict";function s(){return this._instanceNumber||(this._instanceNumber=++u)}function a(e,t,r){var n;const s=function(e){const t=Object.getPrototypeOf(e),i=[];return"{"+Object.keys(t).map((e=>[e,JSON.stringify(t[e],((e,t)=>{if(t&&"object"==typeof t)if(-1===i.indexOf(t)){if(i.push(t),t.$serialized$)return"{*serialized*}"}else return"{*recursion*}";if("function"==typeof t)return d?getFunctionDefinition(t):String(t);else return t}))])).map((e=>`${e[0]}: ${e[1]}`)).join(",")+"}"}(e),a='ÐÐ»Ñ ÑеÑиализаÑии клаÑÑа ÑÑебÑеÑÑÑ ÑвойÑÑво "_moduleName"',o=`${a} \n ÐÑоблема в ÑкземплÑÑе клаÑÑа "${(null===(n=null==e?void 0:e.constructor)||void 0===n?void 0:n.name)||"неизвеÑÑнÑй конÑÑÑÑкÑоÑ"}": ${s}. \n ÐпÑеделиÑе ÑоÑÐºÑ Ð²Ñзова ÑеÑиализаÑии по ÑÑÐµÐºÑ Ð½Ð¸Ð¶Ðµ и добавÑÑе ÑÑаÑиÑеÑкое ÑвойÑÑво _moduleName в клаÑÑ`;if(t){const e=new ReferenceError(a);i.logger.error(o,e)}else i.logger.stack(o,void 0===r?3:r)}
48Object.defineProperty(t,"__esModule",{value:!0});const o=Symbol("unserialized"),l="object"==typeof{}.__proto__,d="function"==typeof getFunctionDefinition;let u=0;class c{constructor(e){}toJSON(){if(this._checkModuleName(!0))return{$serialized$:"inst",module:this._moduleName,id:s.call(this),state:this._getSerializableState({})}}_getSerializableState(e){if((0,n.isOptionsToPropertyMixin)(this))e.$options=this._getOptions();else if((0,r.isOptionsMixin)(this))e.$options=this.getOptions();else e.$options={};return e}_setSerializableState(e){return function(){this[o]=!0}}_isUnserialized(){return Boolean(this[o])}_checkModuleName(e,t){if(!this._moduleName)return a(this,e,t),!1;if(!l)return!0;const i=this.__proto__;if(!this.hasOwnProperty("_moduleName")&&!i.hasOwnProperty("_moduleName"))return a(this,e,t),!1;else return!0}static fromJSON(e){const t=this.prototype._setSerializableState(e.state),i=new this(e.state.$options);if(t)t.call(i);return i}}return t.default=c,Object.assign(c.prototype,{"[Types/_entity/SerializableMixin]":!0,_instanceNumber:null}),c.prototype.fromJSON=c.fromJSON,t}(0,{},e,P,D),q=Q,X=function(e,t,i,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends i.default{constructor(e,t,i){if(super(),this._original=t,this._originalRecord=t.forRecord(e),i)this._writeCallback=i}has(e){return this._originalRecord.has(e)}get(e){return this._originalRecord.get(e)}set(e,t){return this._copy(),this._originalRecord.set(e,t)}clear(){return this._copy(),this._originalRecord.clear()}getData(){return this._originalRecord.getData()}getFields(){return this._originalRecord.getFields()}getFormat(e){return this._originalRecord.getFormat(e)}getSharedFormat(e){return this._originalRecord.getSharedFormat(e)}addField(e,t){return this._copy(),this._originalRecord.addField(e,t)}removeField(e){return this._copy(),this._originalRecord.removeField(e)}removeFieldAt(e){return this._copy(),this._originalRecord.removeFieldAt(e)}getOriginal(){return this._originalRecord}_copy(){if(!this._copied){if((0,r.isCloneable)(this._originalRecord))this._originalRecord=this._originalRecord.clone();else this._originalRecord=this._original.forRecord(n.object.clonePlain(this._originalRecord.getData()));if(this._copied=!0,this._writeCallback)this._writeCallback(),this._writeCallback=null}}getTypeName(){return this._originalRecord.getTypeName()}getMetaType(){return this._originalRecord.getMetaType()}isTyped(){return this._originalRecord.isTyped()}getTypeRef(){return this._originalRecord.getTypeRef()}setTypeRef(e){return this._originalRecord.setTypeRef(e)}}return t.default=s,Object.assign(s.prototype,{"[Types/_entity/adapter/CowRecord]":!0,"[Types/_entity/adapter/IRecord]":!0,"[Types/_entity/adapter/IDecorator]":!0,_original:null,_originalRecord:null,_writeCallback:null,_copied:!1}),t}(0,{},f,g,e),ee=function(e,t,i,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends i.default{constructor(e,t,i){if(super(),this._original=t,this._originalTable=t.forTable(e),i)this._writeCallback=i}getFields(){return this._originalTable.getFields()}getCount(){return this._originalTable.getCount()}getData(){return this._originalTable.getData()}add(e,t){return this._copy(),this._originalTable.add(e,t)}at(e){return this._originalTable.at(e)}remove(e){return this._copy(),this._originalTable.remove(e)}replace(e,t){return this._copy(),this._originalTable.replace(e,t)}move(e,t){return this._copy(),this._originalTable.move(e,t)}merge(e,t,i){return this._copy(),this._originalTable.merge(e,t,i)}copy(e){return this._copy(),this._originalTable.copy(e)}clear(){return this._copy(),this._originalTable.clear()}getFormat(e){return this._originalTable.getFormat(e)}getSharedFormat(e){return this._originalTable.getSharedFormat(e)}addField(e,t){return this._copy(),this._originalTable.addField(e,t)}removeField(e){return this._copy(),this._originalTable.removeField(e)}removeFieldAt(e){return this._copy(),this._originalTable.removeFieldAt(e)}getOriginal(){return this._originalTable}getTypeName(){return this._originalTable.getTypeName()}getMetaType(){return this._originalTable.getMetaType()}isTyped(){return this._originalTable.isTyped()}getTypeRef(){return this._originalTable.getTypeRef()}setTypeRef(e){return this._originalTable.setTypeRef(e)}_copy(){if(!this._copied){if((0,r.isCloneable)(this._originalTable))this._originalTable=this._originalTable.clone();else this._originalTable=this._original.forTable(n.object.clonePlain(this._originalTable.getData()));if(this._copied=!0,this._writeCallback)this._writeCallback(),this._writeCallback=null}}}return t.default=s,Object.assign(s.prototype,{"[Types/_entity/adapter/CowTable]":!0,"[Types/_entity/adapter/ITable]":!0,"[Types/_entity/adapter/IDecorator]":!0,_original:null,_originalTable:null,_writeCallback:null,_copied:!1}),t}(0,{},f,g,e),te=function(e,t,i,r){"use strict";
48Object.defineProperty(t,"__esModule",{value:!0});class n extends i.default{constructor(e,t){if(super(),t)this._$versionCallback=t;this._proxyProperties(e)}getVersion(){return Object.keys(this).forEach((e=>{const t=this[e];if(t instanceof i.default){if(!this._nestedVersions)this._nestedVersions=new r.Map;const i=this._nestedVersions,n=i.get(e)||0,s=t.getVersion();if(n!==s)i.set(e,s),this._nextVersion()}})),super.getVersion()}_proxyProperties(e){let t;Object.keys(e).forEach((i=>{let n=Object.getOwnPropertyDescriptor(e,i);if(!n)throw new Error(`ÐеÑкÑипÑÐ¾Ñ Ð´Ð»Ñ Ð¿Ð¾Ð»Ñ ${i} не ÑÑÑеÑÑвÑÐµÑ Ð² обÑекÑе ${e}.`);if(n.set)n.set=(e=>t=>{const r=this[i];if(e.call(this,t),t!==r)this._nextVersion()})(n.set);else if(!n.get){if(!t)t=new r.Map;t.set(i,n.value),n={get:()=>t.get(i),set:n.writable?e=>{const r=t.get(i);if(t.set(i,e),e!==r)this._nextVersion()}:void 0,configurable:n.configurable,enumerable:n.enumerable}}Object.defineProperty(this,i,n)}))}}return t.default=n,t}(0,{},C,t),ie=function(e,t,i){"use strict";function r(e,t){const i=new Date(t.getFullYear(),t.getMonth()+1,0).getDate();return 1===e.getDate()&&t.getDate()===i}Object.defineProperty(t,"__esModule",{value:!0});return t.default=function(e,t,n){switch(n){case i.Units.Day:return function(e,t){return 0===e.getHours()&&23===t.getHours()&&0===e.getMinutes()&&59===t.getMinutes()}(e,t);case i.Units.Month:return r(e,t);case i.Units.Year:return function(e,t){return r(e,t)&&0===e.getMonth()&&11===t.getMonth()}(e,t);default:throw Error(`unit "${n}" does not supported`)}},t}(0,{},K),re=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends i.default{static create(e,t=[]){const r=i.default.create.call(this,e);if(!(t instanceof Array))throw new TypeError('Argument "properties" should be an instance of Array');return Object.defineProperty(r,"properties",{get:()=>t}),r}}return t.default=r,t}(0,{},G),ne=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends i.default{static create(e,t){const r=i.default.create.call(this,e);return Object.defineProperty(r,"propertyName",{get:()=>t}),r}}return t.default=r,t}(0,{},G),se=function(e,t,i,r,n,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class a extends((0,n.mixin)(i.default,r.default)){constructor(e){if(super(e),r.default.initMixin(this,e),!this._$keyProperty&&e&&e.idProperty)this._$keyProperty=e.idProperty}getKeyProperty(){return this._$keyProperty}setKeyProperty(e){this._$keyProperty=e}getParentProperty(){return this._$parentProperty}setParentProperty(e){this._$parentProperty=e}getNodeProperty(){return this._$nodeProperty}setNodeProperty(e){this._$nodeProperty=e}getDeclaredChildrenProperty(){return this._$declaredChildrenProperty}setDeclaredChildrenProperty(e){this._$declaredChildrenProperty=e}getRootKey(){return this._$rootKey}setRootKey(e){this._$rootKey=e}isNode(e){return e.get(this._$nodeProperty)}isValid(e){if(null===this._$rootKey||void 0===this._$rootKey)return n.logger.error(`${this._moduleName}: hierarchy has not specified rootKey. Validation skipped`),!0;return this._validate(e,(e=>{n.logger.error(`${this._moduleName}: ${e}`)}))}validate(e){this._validate(e,(e=>{throw new Error(`${this._moduleName}: ${e}`)}))}_validate(e,t){const i=this._$rootKey;if(null==i)return t("rootKey is not valid"),!1;const r=this._$keyProperty||e.getKeyProperty(),n=new Set;if(e.each((e=>{const i=e.get(r);if(n.has(i))return t(`recordset has duplicate nodes with key ${i}`),!1;n.add(i)})),n.delete(i),this._traverseHierarchy(i,e,n),0!==n.size)return t(`hierarchy has more than one root. Only one root allowed with rootKey ${i}`),!1;else return!0}_traverseHierarchy(e,t,i){this.getChildren(e,t).forEach((e=>{const r=this._$keyProperty||t.getKeyProperty(),n=e.get(r);i.delete(n),this._traverseHierarchy(n,t,i)}))}getChildren(e,t){if(!this._$parentProperty)return null==e?(()=>{const e=[];return t.each((t=>{e.push(t)})),e})():[];const i=this._asField(e,this._$keyProperty);let r=t.getIndicesByValue(this._$parentProperty,i);const n=[];if(0===r.length&&null===i)r=t.getIndicesByValue(this._$parentProperty,void 0);for(let e=0;e<r.length;e++){const i=t.at(r[e]);if(i)n.push(i)}return n}hasDeclaredChildren(e){return e.get(this._$declaredChildrenProperty)}hasParent(e,t){const i=(e=this._asRecord(e,t)).get(this._$parentProperty),r=this._$keyProperty||t.getKeyProperty();
48if(this._validRootKey()&&e.get(r)===this.getRootKey())return!1;return t.getIndexByValue(r,i)>-1}getParent(e,t){if(this._validRootKey()&&this.getRootKey()===e)return null;const i=(e=this._asRecord(e,t)).get(this._$keyProperty);if(this._validRootKey()&&this.getRootKey()===i)return null;if(this.hasParent(e,t)){const i=e.get(this._$parentProperty);return this._asRecord(i,t)}return null}_asRecord(e,t){if(e&&(0,s.isRecord)(e))return e;const i=this._$keyProperty||t.getKeyProperty(),r=t.getIndexByValue(i,e);if(-1===r)throw new ReferenceError(`${this._moduleName}: record with id "${e}" does not found in the recordset`);return t.at(r)}_asField(e,t){if(!e||!(0,s.isRecord)(e))return e;else return e.get(t)}_validRootKey(){const e=this._$rootKey;return null!=e}}return t.default=a,Object.assign(a.prototype,{"[Types/_entity/relation/Hierarchy]":!0,_$keyProperty:"",_$parentProperty:"",_$nodeProperty:"",_$declaredChildrenProperty:"",_$rootKey:null,getIdProperty:a.prototype.getKeyProperty,setIdProperty:a.prototype.setKeyProperty}),t}(0,{},f,D,e,d),ae=function(e,t,i,r){"use strict";function n(e){return e instanceof Object&&e["[Types/_entity/DestroyableMixin]"]?!e.destroyed:!0}var s;Object.defineProperty(t,"__esModule",{value:!0}),t.isManyToMany=t.ClearType=void 0,function(e){e[e.All=0]="All",e[e.Masters=1]="Masters",e[e.Slaves=2]="Slaves"}(s||(t.ClearType=s={})),t.isManyToMany=function(e){return e instanceof Object&&e["[Types/_entity/relation/ManyToMany]"]};class a extends i.default{constructor(){super(),this._hasMany=new r.Map,this._hasManyName=new r.Map,this._belongsTo=new r.Map,this._belongsToName=new r.Map}destroy(){this._hasMany=null,this._hasManyName=null,this._belongsTo=null,this._belongsToName=null,super.destroy()}addRelationship(e,t,i){this._addHasMany(e,t,i),this._addBelongsTo(t,e,i)}removeRelationship(e,t){this._removeHasMany(e,t),this._removeBelongsTo(t,e)}clear(e,t=s.All){var i,r;if((t===s.All||t===s.Slaves)&&this._hasMany.has(e))null===(i=this._hasMany.get(e))||void 0===i||i.forEach((t=>{this._removeBelongsTo(t,e)})),this._hasMany.delete(e),this._hasManyName.delete(e);if((t===s.All||t===s.Masters)&&this._belongsTo.has(e))null===(r=this._belongsTo.get(e))||void 0===r||r.forEach((t=>{this._removeHasMany(t,e)})),this._belongsTo.delete(e),this._belongsToName.delete(e)}hasMany(e,t){var i;if(this._hasMany.has(e)){const r=this._hasManyName.get(e);null===(i=this._hasMany.get(e))||void 0===i||i.forEach((e=>{if(n(e))t.call(this,e,null==r?void 0:r.get(e))}))}}belongsTo(e,t){var i;if(this._belongsTo.has(e)){const r=this._belongsToName.get(e);null===(i=this._belongsTo.get(e))||void 0===i||i.forEach((e=>{if(n(e))t.call(this,e,null==r?void 0:r.get(e))}))}}_addHasMany(e,t,i){let n,s;if(this._hasMany.has(e))n=this._hasMany.get(e),s=this._hasManyName.get(e);else n=new r.Set,s=new r.Map,this._hasMany.set(e,n),this._hasManyName.set(e,s);if(null==n||n.add(t),i)null==s||s.set(t,i)}_removeHasMany(e,t){var i;if(this._hasMany.has(e)){const r=this._hasMany.get(e);if(null==r||r.delete(t),null===(i=this._hasManyName.get(e))||void 0===i||i.delete(t),0===(null==r?void 0:r.size))this._hasMany.delete(e),this._hasManyName.delete(e)}}_addBelongsTo(e,t,i){let n,s;if(this._belongsTo.has(e))n=this._belongsTo.get(e),s=this._belongsToName.get(e);else n=new r.Set,s=new r.Map,this._belongsTo.set(e,n),this._belongsToName.set(e,s);if(null==n||n.add(t),i)null==s||s.set(t,i)}_removeBelongsTo(e,t){var i;if(this._belongsTo.has(e)){const r=this._belongsTo.get(e);if(null==r||r.delete(t),null===(i=this._belongsToName.get(e))||void 0===i||i.delete(t),0===(null==r?void 0:r.size))this._belongsTo.delete(e),this._belongsToName.delete(e)}}}return a["[Types/_entity/relation/ManyToMany]"]=!0,t.default=a,t}(0,{},f,t),oe=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isManyToManyMixin=void 0,t.isManyToManyMixin=function(e){return e instanceof Object&&e["[Types/_entity/ManyToManyMixin]"]};class r{constructor(){this["[Types/_entity/ManyToManyMixin]"]=!0}destroy(...e){const t=this._getMediator(),i=[];let r;t.hasMany(this,(e=>{i.push(e)})),t.clear(this);for(let e=0,t=i.length;e<t;e++)if(r=i[e],r["[Types/_entity/DestroyableMixin]"]&&!r.destroyed)r.destroy();this._setMediator(null)}_addChild(e,t){if(e instanceof Object){const i=this._getMediator();if(i.addRelationship(this,e,t),e["[Types/_entity/ManyToManyMixin]"]&&!e._hasSameMediator(i)){if
48(!e._hasMediator())e._setMediator(this._createMediator());e._getMediator().addRelationship(this,e,t)}}}_removeChild(e){if(e instanceof Object){const t=this._getMediator();if(t.removeRelationship(this,e),e["[Types/_entity/ManyToManyMixin]"]&&e._hasMediator()&&!e._hasSameMediator(t))e._getMediator().removeRelationship(this,e)}}_parentChanged(e){const t={target:this,data:e,original:e};this._getMediator().hasMany(this,((e,i)=>{if(e["[Types/_entity/relation/IReceiver]"])e.relationChanged(t,[i])}))}_childChanged(e){const t=e,i=(r,n,s)=>{r.belongsTo(n,((r,a)=>{const o=s.slice(),l={target:n,data:e,original:t};let d;if(o.unshift(a),r["[Types/_entity/relation/IReceiver]"])if(d=r.relationChanged(l,o),void 0!==d)e=d.data;i(r._getMediator(),r,o)}))};i(this._getMediator(),this,[])}_hasMediator(){return!!this._mediator}_hasSameMediator(e){return this._mediator===e}_createMediator(){return new i.default}_getMediator(){return this._mediator||(this._mediator=this._createMediator())}_setMediator(e){this._mediator=e}}return t.default=r,Object.assign(r.prototype,{"[Types/_entity/ManyToManyMixin]":!0,_mediator:null}),t}(0,{},ae),le=oe,de=function(e,t,i,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(!i.Units.hasOwnProperty(n))throw Error(`unit "${n}" does not supported`);const s=(0,i.default)(e,t,n);if((0,r.default)(e,t,n))return s+1;else return 1===s&&!function(e,t){switch(t){case i.Units.Day:return 0===e.getHours()&&0===e.getMinutes();case i.Units.Month:return 1===e.getDate();case i.Units.Year:return 0===e.getMonth()}}(e,n)?0:s},t}(0,{},K,ie),ue=function(e,t,i,r,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.Abstract=t.Track=t.Compute=void 0,Object.defineProperty(t,"Compute",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"Track",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"Abstract",{enumerable:!0,get:function(){return n.default}}),t}(0,{},re,ne,G),ce=ue,he=function(e,t,i,r,n){"use strict";var s;Object.defineProperty(t,"__esModule",{value:!0});const a=Object.prototype.hasOwnProperty,o=Symbol("writable");class l{get writable(){return this[o]}constructor(e){l.initMixin(this,e)}static initMixin(e,t){if(e._options&&a.call(e._options,"writable"))e[o]=e._options.writable;if(t&&a.call(t,"writable"))e[o]=t.writable;if(e[o])r.default.initMixin(e,t)}destroy(...e){if(this[o])r.default.prototype.destroy.call(this),n.default.prototype.destroy.call(this)}subscribe(e,t,i){if(this[o])return r.default.prototype.subscribe.call(this,e,t,i)}unsubscribe(e,t,i){if(this[o])return r.default.prototype.unsubscribe.call(this,e,t,i)}_getOptions(){const e=i.default.prototype._getOptions.call(this);return delete e.writable,e}}t.default=l,Object.assign(l.prototype,{"[Types/_entity/ReadWriteMixin]":!0,_publish(...e){if(this[o])return r.default.prototype._publish.apply(this,arguments)},_notify(e,...t){if(this[o])return r.default.prototype._notify.apply(this,arguments)}});const d="undefined"!=typeof window,u=!("undefined"==typeof globalThis||!(null===(s=globalThis.assert)||void 0===s?void 0:s.strictEqual));return Object.defineProperty(l.prototype,o,{writable:!0,value:d||u}),t}(0,{},D,F,oe),fe=he,pe=function(e,t,i,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends((0,n.mixin)(i.default,r.default)){constructor(){super()}getProperty(e,t){const i=(t=t||"").split(this._pathSeparator);let r;for(let t=0;t<i.length;t++)r=t?r?r[i[t]]:void 0:e?e[i[t]]:void 0;return r}setProperty(e,t,i){if(!(e&&e instanceof Object))return;const r=(t=t||"").split(this._pathSeparator);let n=e;for(let e=0,t=r.length-1;e<=t;e++)if(e===t)n[r[e]]=i;else{if(void 0===n[r[e]])n[r[e]]={};n=n[r[e]]}}forRecord(){throw new Error("Method must be implemented")}forTable(){throw new Error("Method must be implemented")}getKeyField(e){throw new Error("Method must be implemented")}static fromJSON(e){return r.default.fromJSON.call(this,e)}}return t.default=s,Object.assign(s.prototype,{"[Types/_entity/adapter/Abstract]":!0,"[Types/_entity/adapter/IAdapter]":!0,_pathSeparator:"."}),t}(0,{},f,Q,e),ye=function(e,t,i,r){"use strict";function n(){}
48Object.defineProperty(t,"__esModule",{value:!0}),t.isDateTime=t.$withoutTimeZone=void 0,t.$withoutTimeZone=Symbol("withoutTimeZone");const s=new Date;t.isDateTime=function(e){return e&&e["[Types/_entity/applied/DateTime]"]};class a extends i.default{get _proto(){return a.prototype}get withoutTimeZone(){return Boolean(this[t.$withoutTimeZone])}constructor(...e){super();const[i,r]=function(...e){const t=e.findIndex((e=>"boolean"==typeof e));if(t>-1)return[e[t],e.slice(0,t)];else return[!1,e]}(...e),n=new Date(...r);if(Object.setPrototypeOf(n,this._proto),!0===i)n[t.$withoutTimeZone]=!0;return n}_getSerializableState(e){if(e.$options=this.getTime(),this[t.$withoutTimeZone])e.withoutTimeZone=this[t.$withoutTimeZone];return e}_setSerializableState(e){const r=i.default.prototype._setSerializableState(e);return function(){if(r.call(this),e.withoutTimeZone)this[t.$withoutTimeZone]=e.withoutTimeZone}}toJSON(){return i.default.prototype.toJSON.call(this)}static getClientTimezoneOffset(){var e,t,i,r;const n=null===(r=null===(i=null===(t=null===(e=globalThis.process)||void 0===e?void 0:e.domain)||void 0===t?void 0:t.req)||void 0===i?void 0:i.cookies)||void 0===r?void 0:r.tz;if(n)return parseInt(n,10);else return s.getTimezoneOffset()}}t.default=a;const o=Object.getPrototypeOf(a.prototype);
48for(const e of Object.getOwnPropertyNames(o))if("constructor"!==e)n.prototype[e]=o[e];return Object.setPrototypeOf(n.prototype,Date.prototype),Object.setPrototypeOf(a.prototype,n.prototype),Object.assign(a.prototype,{"[Types/_entity/applied/DateTime]":!0,_moduleName:"Types/entity:DateTime"}),(0,r.register)("Types/entity:DateTime",a,{instantiate:!1}),t}(0,{},Q,u),_e=function(e,t,i,r){"use strict";function n(e){return parseFloat(e)||0}function s(e){return e>0?Math.floor(e):Math.ceil(e)}function a(e){const t=[],i=p.regExp.exec(e);if(!function(e){return y.regExp.test(e)}(e))throw new Error(`The argument does not correspond to the ISO 8601 format. Allowed formats: ${y.format}.`);return null==i||i.slice(1).forEach(((e,r)=>{if(r===i.length-1)t.push(s(Number(e))),t.push((Number(e)%1*1e3).toFixed());else t.push(n(e))})),t}function o(e){return f.hasOwnProperty(e)}Object.defineProperty(t,"__esModule",{value:!0});const l=1e3,d=6e4,u=36e5,c=864e5,h=["days","hours","minutes","seconds","milliseconds"],f={days:c,hours:u,minutes:d,seconds:l,milliseconds:1},p={regExp:/^P(?:(-?[0-9]+)D)?(?:T(?:(-?[0-9]+)H)?(?:(-?[0-9]+)M)?(?:(-?[0-9]+(?:\.[0-9]{0,3})?)[0-9]*S)?)?$/i,format:"P[<ЧиÑло_дней>D][T[<ЧиÑло_ÑаÑов>H][<ЧиÑло_минÑÑ>M][<ЧиÑло_ÑекÑнд>[.ЧиÑло_долей_ÑекÑндÑ]S]"},y={regExp:/^P(-?[0-9]+D)?(T(-?[0-9]+H)?(-?[0-9]+M)?(-?[0-9]+(\.[0-9]+)?S)?)?$/i,format:"P[<ЧиÑло_дней>D][T[<ЧиÑло_ÑаÑов>H][<ЧиÑло_минÑÑ>M][<ЧиÑло_ÑекÑнд>[.ЧиÑло_долей_ÑекÑндÑ]S]"};class _ extends r.default{constructor(e){if(super(),this instanceof _)this._normIntervalObj=void 0,this._normIntervalStr=void 0,this.set(e);else throw new Error("TimeInterval call via operator new")}getDays(){var e;const t=null===(e=this._normIntervalObj)||void 0===e?void 0:e.days;if(void 0===t)throw new Error("Ð ÑÑом инÑеÑвале не ÑÐºÐ°Ð·Ð°Ð½Ñ Ð´Ð½Ð¸.");return t}addDays(e){return this.addMilliseconds(e*c)}subDays(e){return this.subMilliseconds(e*c)}getHours(){var e;const t=null===(e=this._normIntervalObj)||void 0===e?void 0:e.hours;if(void 0===t)throw new Error("Рданном инÑеÑвале не ÑÐºÐ°Ð·Ð°Ð½Ñ ÑаÑÑ.");return t}addHours(e){return this.addMilliseconds(e*u)}subHours(e){return this.subMilliseconds(e*u)}getMinutes(){var e;const t=null===(e=this._normIntervalObj)||void 0===e?void 0:e.minutes;if(void 0===t)throw new Error("Рданном инÑеÑвале не ÑÐºÐ°Ð·Ð°Ð½Ñ Ð¼Ð¸Ð½ÑÑÑ.");return t}addMinutes(e){return this.addMilliseconds(e*d)}subMinutes(e){return this.subMilliseconds(e*d)}getSeconds(){var e;const t=null===(e=this._normIntervalObj)||void 0===e?void 0:e.seconds;if(void 0===t)throw new Error("Рданном инÑеÑвале не ÑÐºÐ°Ð·Ð°Ð½Ñ ÑекÑндÑ.");return t}addSeconds(e){return this.addMilliseconds(e*l)}subSeconds(e){return this.subMilliseconds(e*l)}getMilliseconds(){var e;const t=null===(e=this._normIntervalObj)||void 0===e?void 0:e.milliseconds;if(void 0===t)throw new Error("Рданном инÑеÑвале не ÑÐºÐ°Ð·Ð°Ð½Ñ Ð¼Ð¸Ð»Ð»Ð¸ÑекÑндÑ.");return t}addMilliseconds(e){return this.set(this.getTotalMilliseconds()+s(e))}subMilliseconds(e){return this.set(this.getTotalMilliseconds()-s(e))}getTotalHours(){var e,t;const i=null===(e=this._normIntervalObj)||void 0===e?void 0:e.days;if(void 0===i)throw new Error("Рданном инÑеÑвале не ÑÐºÐ°Ð·Ð°Ð½Ñ Ð´Ð½Ð¸.");const r=null===(t=this._normIntervalObj)||void 0===t?void 0:t.hours;if(void 0===r)throw new Error("Рданном инÑеÑвале не ÑÐºÐ°Ð·Ð°Ð½Ñ ÑаÑÑ.");return 24*i+r}getTotalMinutes(){var e;const t=null===(e=this._normIntervalObj)||void 0===e?void 0:e.minutes;if(void 0===t)throw new Error("Рданном инÑеÑвале не ÑÐºÐ°Ð·Ð°Ð½Ñ Ð¼Ð¸Ð½ÑÑÑ.");return 60*this.getTotalHours()+t}getTotalSeconds(){var e;const t=null===(e=this._normIntervalObj)||void 0===e?void 0:e.seconds;if(void 0===t)throw new Error("Рданном инÑеÑвале не ÑÐºÐ°Ð·Ð°Ð½Ñ ÑекÑндÑ.");return 60*this.getTotalMinutes()+t}getTotalMilliseconds(){var e;const t=null===(e=this._normIntervalObj)||void 0===e?void 0:e.milliseconds;if(void 0===t)throw new Error("Рданном инÑеÑвале не ÑÐºÐ°Ð·Ð°Ð½Ñ Ð¼Ð¸Ð»Ð»Ð¸ÑекÑндÑ.");return this.getTotalSeconds()*l+t}set(e){let t;if(e instanceof _)t="timeInterval";else if("string"==typeof e)t="intervalStr";else if(e instanceof Array)e=e.slice(),t="intervalArray";else if(e&&"object"==typeof e)e={...e},t="intervalObj";else e=n(e),t="milliseconds";switch(t){case"intervalStr":e=a(e);case"intervalArray":e=function(e){const t={};return h.forEach(((i,r)=>{t[i]=n(String(e[r]))})),t}(e);case"intervalObj":e=function(e){let t=0;for(const i in f)if(o(i))t+=f[i]*n(e[i]);return t}(e);case"milliseconds":this._normIntervalObj=e=function(e){const t={};for(const i in f)if(o(i)){const r=f[i];t[i]=s(e/r),e%=r}return t}(e),this._normIntervalStr=function(e){const t=Number((e.seconds+e.milliseconds/1e3).toFixed(3));return`P${e.days}DT${e.hours}H${e.minutes}M${t}S`}(e);break;case"timeInterval":this.assign(e)}return this}toString(){return String(this._normIntervalStr)}valueOf(){return String(this._normIntervalStr)}toObject(){return{...this._normIntervalObj}}clone(){return new _(this)}calc(e,t){const i=["==","!=",">=","<=",">","<","+","-","+=","-="];if(-1===i.indexOf(e))throw new Error(`Operation "${e}" is not available. Permitted operations: ${i.join(", ")}.`);
48if(!(this instanceof _&&t instanceof _))throw new Error("Operand must be an instance of TimeInterval");const r=this.getTotalMilliseconds(),n=t.getTotalMilliseconds();switch(e){case"==":return r===n;case"!=":return r!==n;case">=":return r>=n;case"<=":return r<=n;case">":return r>n;case"<":return r<n;case"+":return(new _).set(r+n);case"-":return(new _).set(r-n);case"+=":return this.set(r+n);case"-=":return this.set(r-n)}}addToDate(e){return this._dateModifier(1,e)}subFromDate(e){return this._dateModifier(-1,e)}assign(e){this._normIntervalObj=e.toObject(),this._normIntervalStr=e.valueOf()}_dateModifier(e,t){const i=new Date(t.getTime());return i.setTime(i.getTime()+e*this.getTotalMilliseconds()),i}_getSerializableState(e){return e.$options=this.toString(),e}_setSerializableState(e){return r.default.prototype._setSerializableState(e)}static toString(e){if(void 0!==e)return _.prototype.set.call({},e)._normIntervalStr;else return Function.toString.call(this)}}return t.default=_,Object.assign(_.prototype,{"[Types/_entity/applied/TimeInterval]":!0,_moduleName:"Types/entity:TimeInterval"}),(0,i.register)("Types/entity:TimeInterval",_,{instantiate:!1}),t}(0,{},u,Q),ge=function(e,t,i,r,n,s,a,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class l extends((0,i.mixin)(o.default,r.default,n.default,s.default)){constructor(e){super(e),this["[Types/_entity/format/DestroyableMixin]"]=!0,this["[Types/_entity/IEquatable]"]=!0,this._typeName=""}isEqual(e){if(e===this)return!0;return Object.getPrototypeOf(this)===Object.getPrototypeOf(e)&&this.getName()===e.getName()&&(0,a.isEqual)(this.getDefaultValue(),e.getDefaultValue())&&this.isNullable()===e.isNullable()}clone(e){return super.clone(e)}getType(){return this.getOptions().type||this.getTypeName()}getTypeName(){return this._typeName}getName(){return this.getOptions().name||d}setName(e){this.setOptions({name:e})}getDefaultValue(){if(void 0===this.getOptions().defaultValue)return null;else return this.getOptions().defaultValue}setDefaultValue(e){this.setOptions({defaultValue:e})}isNullable(){if(void 0===this.getOptions().nullable)return!0;else return this.getOptions().nullable}setNullable(e){this.setOptions({nullable:e})}copyFrom(e){this.setOptions(e.getOptions())}}t.default=l;const d="";return t}(0,{},e,f,Q,c,r,P),me=function(e,t,i,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeItem=void 0;class s extends((0,i.mixin)(n.default,r.default)){constructor(e){super(e),this._moduleName="Types/_entity/relation/_tree/TreeItem",this._parent=null,this._children=new Map,this._initTreeInstance()}get name(){return this._name}set name(e){this._name=e}get parent(){return this._parent}set parent(e){this._parent=e}get value(){return this._value}set value(e){this._value=this._getClearValue(e)}getParentProperty(){return this._$parentProperty}getKeyProperty(){return this._$keyProperty}getChildrenProperty(){return this._$childrenProperty}addChild(e,t){const i=s.buildTreeItem(t,e,this,this._getOptions());return this._children.set(e,i),i}getChild(e){return this._children.get(e)}getPath(e=!0){let t=this;const i=[];do{i.unshift(t.name),t=t.parent}while(t);if(!e)i.pop();return i}deleteChild(e){this._children.delete(e)}hasChild(e){if(!e)return this._children.size>0;else return this._children.has(e)}isRoot(){return!this.parent}_getClearValue(e){const t={...e};return delete t[this.getKeyProperty()],delete t[this.getParentProperty()],delete t[this.getChildrenProperty()],t}_initTreeInstance(e){n.default.initMixin(this,e)}[Symbol.iterator](){return this._children[Symbol.iterator]()}static buildTreeItem(e,t,i,r){const n=new s(r);return n.value=e,n.name=t,n.parent=i,n}}return t.TreeItem=s,Object.assign(s.prototype,{_moduleName:"Types/_entity/relation/_tree/TreeItem",_$keyProperty:"",_$parentProperty:null,_$childrenProperty:null}),t}(0,{},e,Q,D),be=function(e,t,i,r,n,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEntityDate=void 0;const o="ISO:",l="YYYY-MM-DD";t.isEntityDate=function(e){return e&&e["[Types/_entity/applied/Date]"]};class d extends i.default{get _proto(){return d.prototype}constructor(...e){const t=super(...e);if(t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),!0===t[i.$withoutTimeZone])delete t[i.$withoutTimeZone];return t}_getSerializableState(e){return e.$options=o+(0,n.date)(this,l),e}_setSerializableState(e){const t=String(e&&e.$options);if(t.startsWith(o))e.$options=(0,s.date)(t.substr(4),l);return r.default.prototype._setSerializableState(e)}}return t.default=d,Object.assign(d.prototype,{"[Types/_entity/applied/Date]":!0,_moduleName:"Types/entity:Date"}),(0,a.register)("Types/entity:Date",d,{instantiate:!1}),t}(0,{},ye,Q,n,i,u),Te=function(e,t,i,r){"use strict";
48Object.defineProperty(t,"__esModule",{value:!0}),t.isTime=void 0,t.isTime=function(e){return e&&e["[Types/_entity/applied/Time]"]};class n extends i.default{get _proto(){return n.prototype}constructor(...e){const t=super(...e);if(!0===t[i.$withoutTimeZone])delete t[i.$withoutTimeZone];return t}}return t.default=n,Object.assign(n.prototype,{"[Types/_entity/applied/Time]":!0,_moduleName:"Types/entity:Time"}),(0,r.register)("Types/entity:Time",n,{instantiate:!1}),t}(0,{},ye,u),Fe=function(e,t,i,r,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.isFullInterval=t.dateInterval=t.DateUnits=t.dateDifference=void 0,Object.defineProperty(t,"dateDifference",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"DateUnits",{enumerable:!0,get:function(){return i.Units}}),Object.defineProperty(t,"dateInterval",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"isFullInterval",{enumerable:!0,get:function(){return n.default}}),t}(0,{},K,de,ie),ve=Fe,Oe=function(e,t,i,r,n,s,a,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class l extends((0,o.mixin)(i.default,s.default)){constructor(e,t){if(super(),this._original=e,t)this._writeCallback=t}forTable(e){return new r.default(e,this._original,this._writeCallback)}forRecord(e){return new n.default(e,this._original,this._writeCallback)}getKeyField(e){return this._original.getKeyField(e)}getProperty(e,t){return this._original.getProperty(e,t)}setProperty(e,t,i){return this._original.setProperty(e,t,i)}getOriginal(){return this._original}_getSerializableState(e){return{...s.default.prototype._getSerializableState.call(this,e),_original:this._original}}_setSerializableState(e){const t=s.default.prototype._setSerializableState(e);return function(){t.call(this),this._original=e._original}}}return t.default=l,Object.assign(l.prototype,{"[Types/_entity/adapter/Cow]":!0,"[Types/_entity/adapter/IDecorator]":!0,_moduleName:"Types/entity:adapter.Cow",_original:null,_writeCallback:null}),(0,a.register)("Types/entity:adapter.Cow",l,{instantiate:!1}),t}(0,{},pe,ee,X,Q,u,e),we=function(e,t,i,r,n,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Tree=void 0;class o extends((0,i.mixin)(n.default,r.default)){constructor(e){super(e),this._moduleName="Types/entity.relation#Tree",this._children=new Map,this._iteratorCallback=(e,t)=>{if(1===t.length){const[i]=t;return void this.addChild(e,i)}const i=[...t],r=i.pop(),n=this.findChild(i);if(n&&r)n.addChild(r,e)},this._initTreeInstance(e)}getParentProperty(){return this._$parentProperty}getKeyProperty(){return this._$keyProperty}getChildrenProperty(){return this._$childrenProperty}addChild(e,t,i){const r=s.TreeItem.buildTreeItem(e,t,null,this._getOptions());if(this.hasChild(t)&&!(null==i?void 0:i.replace))throw new Error(`${this._moduleName}:: Ñзел Ñ Ñаким названием Ñже ÑÑÑеÑÑвÑеÑ`);return this._children.set(t,r),r}getChild(e){return this._children.get(e)}hasChild(e){if(!e)return this._children.size>0;else return this._children.has(e)}findChild(e){const[t]=e;let i=this.getChild(t);for(let t=1;t<e.length;t++){if(null==i)return null;const r=e[t];i=i.getChild(r)}return i}parseTree(e){return new a.TreeDataIterator(this._getOptions(),this._iteratorCallback).iterate(e),this}each(e){const t=(i,r)=>{if(e(i.value,r,i),i.hasChild())for(const[e,r]of i)t(r,e)};for(const[e,i]of this)t(i,e)}toArray(){const e=[],t=i=>{for(const[r,n]of i){const i={[this.getKeyProperty()]:r,...n.value};if(n.parent)i[this.getParentProperty()]=n.parent.name;if(e.push(i),n.hasChild())t(n)}};return t(this),e}toObject(){const e={},t=(e,i)=>{for(const[r,n]of e){const e={...n.value};if(n.hasChild()){const i={};t(n,i),e[this.getChildrenProperty()]=i}i[r]=e}};return t(this,e),e}toFlatObject(){const e={},t=i=>{for(const[r,n]of i){const i={...n.value};if(n.parent)i[this.getParentProperty()]=n.parent.name;if(e[r]=i,n.hasChild())t(n)}};return t(this),e}_initTreeInstance(e){n.default.initMixin(this,e)}[Symbol.iterator](){return this._children[Symbol.iterator]()}}return t.Tree=o,Object.assign(o.prototype,{_moduleName:"Types/entity.relation:Tree",_$keyProperty:"",_$parentProperty:null,_$childrenProperty:null}),t}(0,{},e,Q,D,me,W),Pe=function(e,t,i,r){"use strict";
48Object.defineProperty(t,"__esModule",{value:!0});class n extends i.default{constructor(e){super(e),this._typeName="Array",this["[Types/_entity/format/ArrayField]"]=!0,this._moduleName="Types/entity:format.ArrayField"}getKind(){var e;return null!==(e=this.getOptions().kind)&&void 0!==e?e:s}}t.default=n;const s="";return(0,r.register)("Types/entity:format.ArrayField",n,{instantiate:!1}),t}(0,{},ge,u),Me=function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends i.default{constructor(){super(...arguments),this._typeName="Binary",this["[Types/_entity/format/BinaryField]"]=!0,this._moduleName="Types/entity:format.BinaryField"}}return t.default=n,(0,r.register)("Types/entity:format.BinaryField",n,{instantiate:!1}),t}(0,{},ge,u),De=function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends i.default{constructor(){super(...arguments),this._typeName="Boolean",this["[Types/_entity/format/BooleanField]"]=!0,this._moduleName="Types/entity:format.BooleanField"}}return t.default=n,(0,r.register)("Types/entity:format.BooleanField",n,{instantiate:!1}),t}(0,{},ge,u),je=function(e,t,i,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends i.default{constructor(){super(...arguments),this._typeName="Date",this["[Types/_entity/format/DateField]"]=!0,this._moduleName="Types/entity:format.DateField"}getDefaultValue(e=!1){if(e&&super.getDefaultValue()instanceof Date)return(0,r.dateToSql)(super.getDefaultValue(),r.TO_SQL_MODE.DATE);else return super.getDefaultValue()}}return t.default=s,(0,n.register)("Types/entity:format.DateField",s,{instantiate:!1}),t}(0,{},ge,n,u),Ce=function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends i.default{constructor(e){super(e),this._typeName="DateTime",this["[Types/_entity/format/DateTimeField]"]=!0,this._moduleName="Types/entity:format.DateTimeField"}isWithoutTimeZone(){return this.getOptions().withoutTimeZone||!1}}return t.default=n,(0,r.register)("Types/entity:format.DateTimeField",n,{instantiate:!1}),t}(0,{},ge,u),Ee=function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends i.default{constructor(e){super(e),this._typeName="Dictionary",this["[Types/_entity/format/DictionaryField]"]=!0,this._moduleName="Types/entity:format.DictionaryField"}getDictionary(){return this.getOptions().dictionary||null}getLocaleDictionary(){return this.getOptions().localeDictionary||null}}return t.default=n,(0,r.register)("Types/entity:format.DictionaryField",n,{instantiate:!1}),t}(0,{},ge,u),Se=function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends i.default{constructor(){super(...arguments),this._typeName="Hierarchy",this["[Types/_entity/format/HierarchyField]"]=!0,this._moduleName="Types/entity:format.HierarchyField"}getKind(){return this.getOptions().kind||""}getDefaultValue(){if(this.getOptions().kind&&"Identity"===this.getOptions().kind)return[null];else return null}}return t.default=n,(0,r.register)("Types/entity:format.HierarchyField",n,{instantiate:!1}),t}(0,{},ge,u),Re=function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends i.default{constructor(){super(...arguments),this._separator=",",this._typeName="Identity",this["[Types/_entity/format/IdentityField]"]=!0,this._moduleName="Types/entity:format.IdentityField"}getSeparator(){return this._separator}getDefaultValue(){if(void 0===this.getOptions().defaultValue)return s;else return this.getOptions().defaultValue}}t.default=n;const s=[null];return(0,r.register)("Types/entity:format.IdentityField",n,{instantiate:!1}),t}(0,{},ge,u),Ne=function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends i.default{constructor(){super(...arguments),this._typeName="Integer",this["[Types/_entity/format/IntegerField]"]=!0,this._moduleName="Types/entity:format.IntegerField"}}return t.default=n,(0,r.register)("Types/entity:format.IntegerField",n,{instantiate:!1}),t}(0,{},ge,u),xe=function(e,t,i,r){"use strict";
48Object.defineProperty(t,"__esModule",{value:!0});class n extends i.default{constructor(){super(...arguments),this._typeName="Link",this["[Types/_entity/format/LinkField]"]=!0,this._moduleName="Types/entity:format.LinkField"}getDefaultValue(){if(void 0===this.getOptions().defaultValue)return s;else return this.getOptions().defaultValue}}t.default=n;const s=0;return(0,r.register)("Types/entity:format.LinkField",n,{instantiate:!1}),t}(0,{},ge,u),$e=function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends i.default{constructor(){super(...arguments),this._typeName="Object",this["[Types/_entity/format/ObjectField]"]=!0,this._moduleName="Types/entity:format.ObjectField"}}return t.default=n,(0,r.register)("Types/entity:format.ObjectField",n,{instantiate:!1}),t}(0,{},ge,u),Ie=function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_PRECISION=void 0;class n extends i.default{constructor(e){super(e),this._typeName="Real",this["[Types/_entity/format/RealField]"]=!0,this._moduleName="Types/entity:format.RealField"}getPrecision(){if(void 0===this.getOptions().precision)return t.DEFAULT_PRECISION;else return this.getOptions().precision}setPrecision(e){this.setOptions({precision:e})}}return t.default=n,t.DEFAULT_PRECISION=16,(0,r.register)("Types/entity:format.RealField",n,{instantiate:!1}),t}(0,{},ge,u),Ae=function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends i.default{constructor(){super(...arguments),this._typeName="Record",this["[Types/_entity/format/RecordField]"]=!0,this._moduleName="Types/entity:format.RecordField"}}return t.default=n,(0,r.register)("Types/entity:format.RecordField",n,{instantiate:!1}),t}(0,{},ge,u),ke=function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends i.default{constructor(){super(...arguments),this._typeName="RecordSet",this["[Types/_entity/format/RecordSetField]"]=!0,this._moduleName="Types/entity:format.RecordSetField"}}return t.default=n,(0,r.register)("Types/entity:format.RecordSetField",n,{instantiate:!1}),t}(0,{},ge,u),Ve=function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends i.default{constructor(){super(...arguments),this._typeName="RpcFile",this["[Types/_entity/format/RpcFileField]"]=!0,this._moduleName="Types/entity:format.RpcFileField"}}return t.default=n,(0,r.register)("Types/entity:format.RpcFileField",n,{instantiate:!1}),t}(0,{},ge,u),ze=function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends i.default{constructor(){super(...arguments),this._typeName="String",this["[Types/_entity/format/StringField]"]=!0,this._moduleName="Types/entity:format.StringField"}}return t.default=n,(0,r.register)("Types/entity:format.StringField",n,{instantiate:!1}),t}(0,{},ge,u),He=function(e,t,i,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends i.default{constructor(){super(...arguments),this._typeName="Time",this["[Types/_entity/format/TimeField]"]=!0,this._moduleName="Types/entity:format.TimeField"}getDefaultValue(e=!1){if(e&&super.getDefaultValue()instanceof Date)return(0,r.dateToSql)(super.getDefaultValue(),r.TO_SQL_MODE.TIME);else return super.getDefaultValue()}}return t.default=s,(0,n.register)("Types/entity:format.TimeField",s,{instantiate:!1}),t}(0,{},ge,n,u),Ke=function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends i.default{constructor(){super(...arguments),this._typeName="TimeInterval",this["[Types/_entity/format/TimeIntervalField]"]=!0,this._moduleName="Types/entity:format.TimeIntervalField"}getDefaultValue(){if(void 0===this.getOptions().defaultValue)return s;else return this.getOptions().defaultValue}}t.default=n;const s=0;return(0,r.register)("Types/entity:format.TimeIntervalField",n,{instantiate:!1}),t}(0,{},ge,u),Be=function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends i.default{constructor(){super(...arguments),this._typeName="Uuid",this["[Types/_entity/format/UuidField]"]=!0,this._moduleName="Types/entity:format.UuidField"}}return t.default=n,(0,r.register)("Types/entity:format.UuidField",n,{instantiate:!1}),t}(0,{},ge,u),Ue=function(e,t,i,r){"use strict";
48Object.defineProperty(t,"__esModule",{value:!0});class n extends i.default{constructor(){super(...arguments),this._typeName="Xml",this["[Types/_entity/format/XmlField]"]=!0,this._moduleName="Types/entity:format.XmlField"}getDefaultValue(){if(void 0===this.getOptions().defaultValue)return s;else return this.getOptions().defaultValue}}t.default=n;const s="";return(0,r.register)("Types/entity:format.XmlField",n,{instantiate:!1}),t}(0,{},ge,u),Le=function(e,t,i,r,n,s,a,o,l,d,u,c,h,f){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.Ulid=t.TimeInterval=t.isTime=t.Time=t.ReactiveObject=t.PrimaryKey=t.JSONML=t.Identity=t.Guid=t.dateUnit=t.isDateTime=t.DateTime=t.isEntityDate=t.Date=t.PromiseCanceledError=t.CancelablePromise=void 0,Object.defineProperty(t,"CancelablePromise",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"PromiseCanceledError",{enumerable:!0,get:function(){return i.PromiseCanceledError}}),Object.defineProperty(t,"Date",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"isEntityDate",{enumerable:!0,get:function(){return r.isEntityDate}}),Object.defineProperty(t,"DateTime",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"isDateTime",{enumerable:!0,get:function(){return n.isDateTime}}),Object.defineProperty(t,"dateUnit",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"Guid",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"Identity",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"JSONML",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"PrimaryKey",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"ReactiveObject",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"Time",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"isTime",{enumerable:!0,get:function(){return c.isTime}}),Object.defineProperty(t,"TimeInterval",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"Ulid",{enumerable:!0,get:function(){return f.default}}),t}(0,{},$,be,ye,H,I,A,k,V,te,Te,_e,z),Je=Le,Ge=Le,We=Le,Ye=function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends i.default{constructor(){super(...arguments),this._typeName="Enum",this["[Types/_entity/format/EnumField]"]=!0,this._moduleName="Types/entity:format.EnumField"}}return t.default=n,(0,r.register)("Types/entity:format.EnumField",n,{instantiate:!1}),t}(0,{},Ee,u),Ze=function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends i.default{constructor(){super(...arguments),this._typeName="Flags",this["[Types/_entity/format/FlagsField]"]=!0,this._moduleName="Types/entity:format.FlagsField"}}return t.default=n,(0,r.register)("Types/entity:format.FlagsField",n,{instantiate:!1}),t}(0,{},Ee,u),Qe=function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_PRECISION=void 0;class n extends i.default{constructor(){super(...arguments),this._typeName="Money",this["[Types/_entity/format/MoneyField]"]=!0,this._moduleName="Types/entity:format.MoneyField"}isLarge(){return this.getOptions().large||s}getPrecision(){if(void 0===this.getOptions().precision)return t.DEFAULT_PRECISION;else return this.getOptions().precision}}t.default=n,t.DEFAULT_PRECISION=2;const s=!1;return(0,r.register)("Types/entity:format.MoneyField",n,{instantiate:!1}),t}(0,{},Ie,u),qe=function(e,t,i,r,n,s,a,o,l,d,u,c,h,f,p,y,_,g,m,b,T,F,v,O,w,P){"use strict";function M(e,t){const i=D[e];if(!i)return null;else return new i(t)}Object.defineProperty(t,"__esModule",{value:!0});const D={[P.FieldTypeEnum.boolean]:i.default,[P.FieldTypeEnum.integer]:r.default,[P.FieldTypeEnum.string]:a.default,[P.FieldTypeEnum.xml]:o.default,[P.FieldTypeEnum.datetime]:l.default,[P.FieldTypeEnum.date]:d.default,[P.FieldTypeEnum.time]:u.default,[P.FieldTypeEnum.timeinterval]:c.default,[P.FieldTypeEnum.identity]:h.default,[P.FieldTypeEnum.enum]:f.default,[P.FieldTypeEnum.flags]:p.default,[P.FieldTypeEnum.record]:y.default,[P.FieldTypeEnum.model]:y.default,[P.FieldTypeEnum.recordset]:_.default,[P.FieldTypeEnum.binary]:g.default,[P.FieldTypeEnum.uuid]:m.default,[P.FieldTypeEnum.rpcfile]:b.default,[P.FieldTypeEnum.object]:T.default,[P.FieldTypeEnum.array]:F.default,[P.FieldTypeEnum.real]:n.default,[P.FieldTypeEnum.money]:s.default,[P.FieldTypeEnum.link]:v.default,[P.FieldTypeEnum.decimal]:s.default,[P.FieldTypeEnum.float]:n.default,[P.FieldTypeEnum.double]:n.default},j={text:{replacement:P.FieldTypeEnum.string,version:"3.18.10.",migrate:!0},hierarchy:{replacement:P.FieldTypeEnum.identity,version:"3.18.10.",migrate:!0},link:{replacement:P.FieldTypeEnum.identity,version:"21.5100"}},C="Types/entity:format.fieldsFactory";return t.default=function(e){if(Object.getPrototypeOf(e)!==Object.prototype)throw new TypeError(`${C}: деклаÑаÑивное опиÑание Ð¿Ð¾Ð»Ñ ÑоÑмаÑа должно бÑÑÑ Ð¾Ð±ÑекÑом IDeclaration`);let{type:t}=e;if("string"==typeof t){let i=t.toLowerCase();if(i in j){const{replacement:e,version:t,migrate:r}=j[i];if(w.logger.info(`${C}: Ñип ${i} Ñдален наÑÐ¸Ð½Ð°Ñ Ñ Ð²ÐµÑÑии ${t}. ÐÑполÑзÑйÑе Ñип ${e}`),r)i=e}const r=M(i,e);if(r)return r;if((0,O.isRegistered)(t))t=(0,O.resolve)(t)}if("function"==typeof t){const i=Object.create(t.prototype);if(i["[Types/_entity/IObject]"]&&i["[Types/_entity/FormattableMixin]"])return M(P.FieldTypeEnum.record,e);if(i["[Types/_collection/IList]"]&&i["[Types/_entity/FormattableMixin]"])return M(P.FieldTypeEnum.recordset,e);if(i["[Types/_collection/IEnum]"])return M(P.FieldTypeEnum.enum,e);if(i["[Types/_collection/IFlags]"])return M(P.FieldTypeEnum.flags,e);if(i instanceof Array)return M(P.FieldTypeEnum.array,e);if(i instanceof Date)return M(P.FieldTypeEnum.date,e);if(i instanceof String)return M(P.FieldTypeEnum.string,e);if(i instanceof Number)return M(P.FieldTypeEnum.real,e);if(t===Object)return M(P.FieldTypeEnum.object,e)}throw new TypeError(`${C}: Ñип Ð¿Ð¾Ð»Ñ ${t} не поддеÑживаеÑÑÑ`)},t}(0,{},De,Ne,Ie,Qe,ze,Ue,Ce,je,He,Ke,Re,Ye,Ze,Ae,ke,Me,Be,Ve,$e,Pe,xe,u,e,L),Xe=function(e,t,i,r,n,s){"use strict";
48return Object.defineProperty(t,"__esModule",{value:!0}),t.TreeItem=t.Tree=t.ManyToManyClearType=t.Hierarchy=void 0,Object.defineProperty(t,"Hierarchy",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"ManyToManyClearType",{enumerable:!0,get:function(){return r.ClearType}}),Object.defineProperty(t,"Tree",{enumerable:!0,get:function(){return n.Tree}}),Object.defineProperty(t,"TreeItem",{enumerable:!0,get:function(){return s.TreeItem}}),t}(0,{},se,ae,we,me),et=Xe,tt=Xe,it=function(e,t,i,r,n,s,a,o,l,d,u,c,h,f,p,y,_,g,m,b,T,F,v,O,w,P,M,D,j){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.XmlField=t.UuidField=t.UniversalField=t.TimeIntervalField=t.TimeField=t.StringField=t.RpcFileField=t.RecordSetField=t.RecordField=t.RealField=t.ObjectField=t.MoneyField=t.LinkField=t.IntegerField=t.IdentityField=t.HierarchyField=t.FlagsField=t.FieldTypeEnum=t.fieldsFactory=t.EnumField=t.DictionaryField=t.DateTimeField=t.DateField=t.BooleanField=t.BinaryField=t.ArrayField=t.Field=void 0,Object.defineProperty(t,"Field",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"ArrayField",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"BinaryField",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"BooleanField",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"DateField",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"DateTimeField",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"DictionaryField",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"EnumField",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"fieldsFactory",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"FieldTypeEnum",{enumerable:!0,get:function(){return c.FieldTypeEnum}}),Object.defineProperty(t,"FlagsField",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"HierarchyField",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"IdentityField",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"IntegerField",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(t,"LinkField",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(t,"MoneyField",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"ObjectField",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(t,"RealField",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(t,"RecordField",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(t,"RecordSetField",{enumerable:!0,get:function(){return F.default}}),Object.defineProperty(t,"RpcFileField",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(t,"StringField",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(t,"TimeField",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(t,"TimeIntervalField",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(t,"UniversalField",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(t,"UuidField",{enumerable:!0,get:function(){return D.default}}),Object.defineProperty(t,"XmlField",{enumerable:!0,get:function(){return j.default}}),t}(0,{},ge,Pe,Me,De,je,Ce,Ee,Ye,qe,L,Ze,Se,Re,Ne,xe,Qe,$e,Ie,Ae,ke,Ve,ze,He,Ke,J,Be,Ue),rt=it,nt=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e){r.initMixin(this,e)}static initMixin(e,t){e._data=t}getData(){return this._data}getFormat(e){const t=this._getFieldsFormat(),i=t?t.getFieldIndex(e):-1;if(-1===i)throw new ReferenceError(`${this._moduleName}::getFormat(): field "${e}" doesn't exist`);return t.at(i)}getSharedFormat(e){if(null===this._sharedFieldFormat)this._sharedFieldFormat=new i.UniversalField;const t=this._sharedFieldFormat,r=this._getFieldsFormat(),n=r?r.getFieldIndex(e):-1;return t.name=e,t.type=-1===n?"String":r.at(n).getType(),t.meta=-1===n?{}:this._getFieldMeta(e),t}addField(e,t){if(!(e&&e instanceof i.Field))throw new TypeError(`${this._moduleName}::addField(): format should be an instance of Types/entity:format.Field`);const r=e.getName();if(!r)throw new Error("{$this._moduleName}::addField(): field name is empty");const n=this._getFieldsFormat();if((n?n.getFieldIndex(r):-1)>-1)throw new Error(`${this._moduleName}::addField(): field "${r}" already exists`);this._touchData(),n.add(e,t)}removeField(e){const t=this._getFieldsFormat(),i=t?t.getFieldIndex(e):-1;if(-1===i)throw new ReferenceError(`${this._moduleName}::removeField(): field "${e}" doesn't exist`);this._touchData(),t.removeAt(i)}removeFieldAt(e){this._touchData();const t=this._getFieldsFormat();if(t)t.removeAt(e)}_touchData(){}_isValidData(){return!0}_getFieldsFormat(){throw new Error("Method must be implemented")}_getFieldMeta(e){if(null===this._sharedFieldMeta)this._sharedFieldMeta={};const t=this.getFormat(e),i=this._sharedFieldMeta;switch(t.getType()){case"Real":case"Money":i.precision=t.getPrecision();break;case"Enum":case"Flags":i.dictionary=t.getDictionary();break;case"Identity":i.separator=t.getSeparator();break;case"Array":i.kind=t.getKind()}return i}}return t.default=r,Object.assign(r.prototype,{"[Types/_entity/adapter/GenericFormatMixin]":!0,_data:null,_sharedFieldFormat:null,_sharedFieldMeta:null}),t}(0,{},it),st=function(e,t,i){"use strict";
48Object.defineProperty(t,"__esModule",{value:!0});const r="record";class n{constructor(){this._format={},n.initMixin(this)}static initMixin(e){e._format={}}getFormat(e){if(!this._has(e))throw new ReferenceError(`${this._moduleName}::getFormat(): field "${e}" doesn't exist`);if(!this._format.hasOwnProperty(e))this._format[e]=this._buildFormat(e);return this._format[e]}getSharedFormat(e){if(null===this._sharedFieldFormat)this._sharedFieldFormat=new i.UniversalField;const t=this._sharedFieldFormat;if(t.name=e,this._format.hasOwnProperty(e))t.type=this.getFormat(e).getType(),t.meta=this._getFieldMeta(e);else t.type="String";return t}addField(e){if(!(e&&e instanceof i.Field))throw new TypeError(`${this._moduleName}::addField(): format should be an instance of Types/entity:format.Field`);const t=e.getName();if(!t)throw new Error(`${this._moduleName}::addField(): field name is empty`);this._touchData(),this._format[t]=e}removeField(e){if(!this._has(e))throw new ReferenceError(`${this._moduleName}::removeField(): field "${e}" doesn't exist`);this._touchData(),delete this._format[e]}removeFieldAt(){throw new Error(`Method ${this._moduleName}::removeFieldAt() doesn't supported`)}getTypeName(){return this._typeName||r}getMetaType(){if(!this.isTyped())return r;else return this._metaType||"applicationObject"}isTyped(){return!!this._typeName}getTypeRef(){if(!this.isTyped())return null;else return{name:this.getTypeName(),metaType:this.getMetaType()}}setTypeRef(e){if(e.name)this._typeName=e.name,this._metaType=e.metaType}_touchData(){if(!(this._data instanceof Object))this._data={}}_isValidData(){return this._data instanceof Object}_buildFormat(e){return(0,i.fieldsFactory)({name:e,type:"string"})}}return t.default=n,Object.assign(n.prototype,{"[Types/_entity/adapter/GenericFormatMixin]":!0,_format:null}),t}(0,{},it),at=function(e,t,i,r,n,s,a,o,l){"use strict";function d(e,t){const i=(""+e).trim(),r=/^-?([0]*)(\d+)\.?\d*\D*$/;if(!i.match(r))return"0";const n=i.replace(r,"$2");return("-"===i.substr(0,1)?"-":"")+(t?n:n.replace(/(?=(\d{3})+$)/g," ").trim())}function u(e,t){const i=e+"",r=i.indexOf(".");let n=i;if(-1!==r)n=i.substring(0,r);let s=-1===r?"0":i.substr(r);const a=-1!==n.indexOf("-");let o;if("."===s)s=".0";if(0!==parseFloat(s))o=parseFloat((s+"00000000000000000000000000000000").substr(0,t+1)).toFixed(t);else o=parseFloat(s).toFixed(t);if("number"==typeof o&&1===o)n=parseInt(n,10),n=a?n-1:n+1;if(o=o.replace(/.+\./,""),0===t)return d(n,!0);const l=[];return l.push(d(n,!0)),l.push("."),l.push(o),l.join("")}function c(e,t){const i=function(e){return(e instanceof r.DictionaryField?e.getDictionary():e.meta&&e.meta.dictionary)||[]}(t.format);if(null===e&&!i.hasOwnProperty(e))return!0;else if(void 0===e)return!0;return!1}function h(e,t,i){if(null==t){switch(e){case"identity":return!1;case"enum":return c(t,i)}if("function"==typeof e){const r=Object.create(e.prototype);if(r&&r["[Types/_collection/IEnum]"])return c(t,i)}return!0}return!1}function f(e){if(Array.isArray(e)&&e.length<2)return e.length?e[0]:null;else return e}function p(e){if(!e)return!1;else return Boolean(e instanceof r.DateTimeField?e.isWithoutTimeZone():e.meta&&e.meta.withoutTimeZone)}function y(e){if(!e)return!1;else return e instanceof r.MoneyField?e.isLarge():e.meta&&e.meta.large}function _(e){if(!e)return 0;else return(e.getPrecision?e.getPrecision():e.meta&&e.meta.precision)||0}function g(e){return(e.getKind?e.getKind():e.meta&&e.meta.kind)||""}Object.defineProperty(t,"__esModule",{value:!0}),t.serialize=t.cast=void 0;const m=/[+-][:0-9]+$/;return t.cast=function e(t,r,d){if(h(r,t,d=d||{}))return t;let c,f=r;if("string"==typeof f)switch(f=f.toLowerCase(),f){case"recordset":f=(0,o.resolve)("Types/collection:RecordSet");break;case"record":f=(0,o.resolve)("Types/entity:Model");break;case"enum":f=(0,o.resolve)("Types/collection:Enum");break;case"flags":f=(0,o.resolve)("Types/collection:Flags");break;case"link":case"integer":if("number"==typeof t)return parseInt(t,10);if(t=parseInt(t,10),Number.isNaN(t))return null;else return t;case"real":case"double":if("number"==typeof t)return t;if(t=parseFloat(t),Number.isNaN(t))return null;else return t;case"boolean":return!!t;case"money":const r=d.format;if(!y(r)){const e=_(r);if(e>3)return u(t,e)}return void 0===t?null:t;case"date":case"time":case"datetime":if(t instanceof Date)return t;else if("infinity"===t)return 1/0;else if("-infinity"===t)return-1/0;if(t=(0,l.dateFromSql)(""+t).getTime(),"date"===f)f=s.default;else if("time"===f)f=a.default;else f=i.default,c=[p(d.format)];break;case"timeinterval":if(t instanceof n.default)return t.toString();else return n.default.toString(t);case"array":const h=g(d.format),m={...d,strict:!0};if(!(t instanceof Array))t=[t];return t.map((t=>e(t,h,m)));case"string":if(d.strict)return String(t);else return t;default:return t}if("function"==typeof f){if(t instanceof f)return t;if(f.prototype["[Types/_entity/IProducible]"])return f.produceInstance(t,d);if(c)return new f(t,...c);else return new f(t)}throw new TypeError(`Unknown type ${f}`)},t.serialize=function e(t,i){const s=function(e){let t;if("object"==typeof e)t=e instanceof r.Field?e.getType():e.type;else t=e;return(""+t).toLowerCase()}((i=i||{}).format);if(h(s,t,i))return t;if(t&&"object"==typeof t)if(t["[Types/_entity/FormattableMixin]"])t=t.getRawData(!0);else if(t["[Types/_collection/IFlags]"])t=function(e){const t=[];return e.each((i=>{t.push(e.get(i))})),t}(t);else if(t["[Types/_collection/IEnum]"])t=t.get();else if(t["[Types/_collection/IList]"]&&"recordset"===s)t=function(e){let t="Types/entity:adapter.Json";const i=e.getCount();let r;for(let n=0;n<i;n++)if(r=e.at(n),r&&r["[Types/_entity/IObject]"]&&r["[Types/_entity/FormattableMixin]"]){t=r.getAdapter();break}const n=(0,o.create)("Types/collection:RecordSet",{adapter:t});for(let t=0;t<i;t++)n.add(e.at(t));return n.getRawData(!0)}(t);else{const e=t._moduleName;if("Deprecated/Record"===e||"Deprecated/RecordSet"===e||"Deprecated/Enum"===e)throw new TypeError(`${e} can't be used with "Types" module`)}switch(s){case"integer":if("number"==typeof(t=f(t)))return parseInt(t,10);if(t-=0,Number.isNaN(t))return null;else return parseInt(t,10);case"real":case"double":return f(t);case"link":return parseInt(t,10);case"money":t=f(t);const r=i.format;if(!y(r)){const e=_(r);if(e>3)return u(t,e)}return t;case"date":case"time":case"datetime":t=f(t);const a=i.format;let o=l.TO_SQL_MODE.DATE,d=!1;switch(s){case"datetime":o=l.TO_SQL_MODE.DATETIME,d=p(a);break;case"time":o=l.TO_SQL_MODE.TIME,d=!0}
48if(!t)t=(0,l.dateFromSql)(""+t);if(t instanceof Date){if(t=(0,l.dateToSql)(t,o),d)t=t.replace(m,"")}else if(t===1/0)return"infinity";else if(t===-1/0)return"-infinity";return t;case"timeinterval":if((t=f(t))instanceof n.default)return t.toString();else return n.default.toString(t);case"array":const c=g(i.format);if(!(t instanceof Array))t=[t];return t.map((t=>e(t,{format:c})));default:return t}},t}(0,{},ye,it,_e,be,Te,u,n),ot=at,lt=function(e,t,i,r,n,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class o extends((0,a.mixin)(i.default,r.default,n.default)){constructor(e){super(e),r.default.initMixin(this,e),n.default.initMixin(this)}addField(e,t){if(!(e&&e instanceof s.Field))throw new TypeError(`${this._moduleName}::addField(): argument "format" should be an instance of Types/entity:format.Field`);super.addField(e,t);const i=e.getName();if(!this.has(i))this.set(i,e.getDefaultValue(!0))}removeField(e){super.removeField(e),delete this._data[e]}has(e){return this._isValidData()?this._data.hasOwnProperty(e):!1}get(e){return this._isValidData()?this._data[e]:void 0}set(e,t){if(!e)throw new ReferenceError(`${this._moduleName}::set(): field name is not defined`);this._touchData(),this._data[e]=t}clear(){this._touchData();const e=Object.keys(this._data),t=e.length;for(let i=0;i<t;i++)delete this._data[e[i]]}getFields(){return this._isValidData()?Object.keys(this._data):[]}getKeyField(){}_has(e){return this.has(e)}}return t.default=o,Object.assign(o.prototype,{"[Types/_entity/adapter/JsonRecord]":!0,"[Types/_entity/adapter/IRecord]":!0,_data:null}),t}(0,{},f,nt,st,it,e),dt=function(e,t,i,r,n,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class o extends((0,s.mixin)(i.default,r.default)){constructor(e,t){if(e&&!(0,a.isRecord)(e))throw new TypeError('Argument "data" should be an instance of Types/entity:Record');super(e),r.default.initMixin(this,e),this._tableData=t}has(e){return this._isValidData()?this._data.has(e):!1}get(e){return this._isValidData()?this._data.get(e):void 0}set(e,t){if(!e)throw new ReferenceError(`${this._moduleName}::set(): argument "name" is not defined`);if(this._touchData(),!this._isValidData())throw new TypeError("Passed data has invalid format");return this._data.set(e,t)}clear(){if(this._touchData(),!this._isValidData())throw new TypeError("Passed data has invalid format");const e=this.getFields(),t=this._data.getFormat();if(t){let i,r;for(let n=0;n<e.length;n++)if(i=e[n],r=t.getFieldIndex(i),r>-1)this._data.removeField(i)}}getFields(){const e=[];if(this._isValidData())this._data.getFormat(!0).each((t=>{e.push(t.getName())}));return e}addField(e,t){if(this._touchData(),!this._isValidData())throw new TypeError("Passed data has invalid format");this._data.addField(e,t)}removeField(e){if(this._touchData(),!this._isValidData())throw new TypeError("Passed data has invalid format");this._data.removeField(e)}removeFieldAt(e){if(this._touchData(),!this._isValidData())throw new TypeError("Passed data has invalid format");this._data.removeFieldAt(e)}getTableData(){return this._tableData}_touchData(){if(this._data)return;let e,t="Types/entity:Record";if(this._tableData&&this._tableData["[Types/_entity/FormattableMixin]"])t=this._tableData.getModel(),e=this._tableData.getAdapter();const i={};if(e)i.adapter=e;this._data=(0,n.create)(t,i)}_isValidData(){return this._data&&(0,a.isRecord)(this._data)}_getFieldsFormat(){return this._isValidData()?this._data.getFormat(!0):(0,n.create)("Types/collection:format.Format")}getTypeName(){return this._data.getTypeName()}getMetaType(){return this._data.getMetaType()}isTyped(){return this._data.isTyped()}getTypeRef(){throw new Error(`${this._moduleName}:: невозможно полÑÑиÑÑ ÑÑÑÐ»ÐºÑ Ð½Ð° Ñип в адапÑеÑе-обеÑÑке. УкажиÑе Ñип в иÑÑ
одной запиÑи`)}setTypeRef(e){throw new Error(`${this._moduleName}:: невозможно ÑказаÑÑ ÑÑÑÐ»ÐºÑ Ð½Ð° Ñип в адапÑеÑе-обеÑÑке. УкажиÑе Ñип в иÑÑ
одной запиÑи`)}}return t.default=o,Object.assign(o.prototype,{"[Types/_entity/adapter/RecordSetRecord]":!0,"[Types/_entity/adapter/IRecord]":!0,_data:null,_tableData:null}),t}(0,{},f,nt,u,e,d),ut=function(e,t,i,r,n,s,a){"use strict";
48Object.defineProperty(t,"__esModule",{value:!0});class o extends((0,s.mixin)(i.default,r.default)){constructor(e){if(e&&!(0,a.isRecordSet)(e))throw new TypeError('Argument "data" should be an instance of Types/collection:RecordSet');super(e),r.default.initMixin(this,e)}getFields(){const e=[];if(this._isValidData())this._data.getFormat(!0).each((t=>{e.push(t.getName())}));return e}getCount(){return this._isValidData()?this._data.getCount():0}add(e,t){this._buildData(e),this._data.add(e,t)}at(e){return this._isValidData()?this._data.at(e):void 0}remove(e){if(!this._isValidData())throw new TypeError("Passed data has invalid format");return this._data.removeAt(e)}replace(e,t){if(!this._isValidData())throw new TypeError("Passed data has invalid format");return this._data.replace(e,t)}move(e,t){if(!this._isValidData())throw new TypeError("Passed data has invalid format");const i=this._data.at(e);this._data.removeAt(e),this._data.add(i,t)}merge(e,t,i){if(!this._isValidData())throw new TypeError("Passed data has invalid format");const r=this._data.at(e);this._data.at(t).each(((e,t)=>{if(e!==i)r.set(e,t)}),this),this._data.removeAt(t)}copy(e){if(!this._isValidData())throw new TypeError("Passed data has invalid format");const t=this._data.at(e).clone();return this.add(t,1+e),t}clear(){if(!this._isValidData())throw new TypeError("Passed data has invalid format");for(let e=this._data.getCount()-1;e>=0;e--)this._data.removeAt(e)}addField(e,t){if(!this._isValidData())throw new TypeError("Passed data has invalid format");this._data.addField(e,t)}removeField(e){if(!this._isValidData())throw new TypeError("Passed data has invalid format");this._data.removeField(e)}removeFieldAt(e){if(!this._isValidData())throw new TypeError("Passed data has invalid format");this._data.removeFieldAt(e)}_buildData(e){if(!this._data){const t={};if(e){if(e.getAdapter)t.adapter=e.getAdapter();if(e.getKeyProperty)t.keyProperty=e.getKeyProperty()}this._data=(0,n.create)("Types/collection:RecordSet",t)}}_isValidData(){return this._data&&(0,a.isRecordSet)(this._data)}_getFieldsFormat(){return this._data.getFormat(!0)}getTypeName(){return this._data.getTypeName()}getMetaType(){return this._data.getMetaType()}isTyped(){return this._data.isTyped()}getTypeRef(){throw new Error(`${this._moduleName}:: невозможно полÑÑиÑÑ ÑÑÑÐ»ÐºÑ Ð½Ð° Ñип в адапÑеÑе-обеÑÑке. УкажиÑе Ñип в иÑÑ
одной запиÑи`)}setTypeRef(e){throw new Error(`${this._moduleName}:: невозможно ÑказаÑÑ ÑÑÑÐ»ÐºÑ Ð½Ð° Ñип в адапÑеÑе-обеÑÑке. УкажиÑе Ñип в иÑÑ
одной запиÑи`)}}return t.default=o,Object.assign(o.prototype,{"[Types/_entity/adapter/RecordSetTable]":!0,"[Types/_entity/adapter/ITable]":!0,_data:null}),t}(0,{},f,nt,u,e,d),ct=function(e,t,i,r,n,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class o extends i.default{constructor(){super(...arguments),this["[Types/_entity/adapter/IDataHolder]"]=!0,this["[Types/_entity/adapter/RecordSet]"]=!0}get dataReference(){return this._dataReference}set dataReference(e){this._dataReference=e}forTable(e){return new r.default(e)}forRecord(e,t){return new n.default(e,t||this.dataReference)}getProperty(e,t){return a.object.getPropertyValue(e,t)}setProperty(e,t,i){return a.object.setPropertyValue(e,t,i)}getKeyField(e){if(e&&"function"==typeof e.getKeyProperty)return e.getKeyProperty()}}return t.default=o,Object.assign(o.prototype,{"[Types/_entity/adapter/RecordSet]":!0,"[Types/_entity/adapter/IDataHolder]":!0,_moduleName:"Types/entity:adapter.RecordSet"}),(0,s.register)("Types/entity:adapter.RecordSet",o,{instantiate:!1}),(0,s.register)("adapter.recordset",o,{instantiate:!1}),t}(0,{},pe,ut,dt,u,e),ht=function(e,t,i,r,n,s,a,o,l){"use strict";function d(e){return e instanceof Object&&!!e.n}function u(e){return T[e]||"string"}function c(e,t){let r=e;if("object"==typeof r&&void 0!==r.withoutTimeZone)r=r.type;if("object"==typeof r&&"array"===r.type)throw new TypeError(`Field type "array of array" for field ${t} is not supported.`);const n=i.default[(r+"").toLowerCase()];if(!n)throw new TypeError(`Field type "${JSON.stringify(r)}" for field ${t} is not supported.`);return n}function h(e,t){const i=e.map((e=>{let t=e.t,i="";if(t&&t.n){if(t.t)i=t.t;else if(t.s)i=JSON.stringify(t.s);t=t.n}return`${e.n}:${t}:${i}`}));if(t)i.unshift(t);return i.join(",")}function f(e,t){if(Array.isArray(e)){for(const i of e)if(!1===f(i,t))return!1}else if(e&&"object"==typeof e){const i=e;if(void 0!==i.d&&(void 0!==i.s||void 0!==i.f))if(!1===t(i))return!1;if(i.d)if(!1===f(i.d,t))return!1}}function p(e){Object.defineProperty(e,b,{enumerable:!1,value:!0})}function y(e){if(!e||e[b])return;let t;f(e,(e=>{if(t=t||new a.Map,void 0!==e.f)if(!e[b])!function(e,t){const i=e.f;if(void 0!==i)if(e.s)t.set(i,{format:e.s.slice(),type:e.tp}
48);else{const r=t.get(i);if(Object.defineProperty(e,"s",{configurable:!0,enumerable:!0,value:null==r?void 0:r.format.slice(),writable:!0}),(null==r?void 0:r.type)&&!e.tp)Object.defineProperty(e,"tp",{configurable:!0,enumerable:!0,value:r.type,writable:!0})}delete e.f,Object.defineProperty(e,"f",{configurable:!0,value:i})}(e,t),p(e)}))}function _(e){const t=o.object.clonePlain(e),i=new a.Map;return f(t,(e=>{const t=e.s;if(void 0!==t){const r=h(t,e.tp);if(i.has(r)){const t=i.get(r);delete e.s,e.f=t}else{const t=i.size;i.set(r,t),e.f=t}}else delete e.s})),t}function g(e){if(e&&!e.toJSON)Object.defineProperty(e,"toJSON",{enumerable:!1,value:()=>_(e)})}function m(e){if(-1===e.indexOf(F))return{name:e};const[t,i]=e.split(F);return{metaType:t,name:i}}Object.defineProperty(t,"__esModule",{value:!0}),t.makeSerializable=t.normalizeFormats=t.denormalizeFormats=t.markEntryAsDenormalized=t.getFormatHash=t.isField=void 0;const b=Symbol("denormalized");t.isField=d;const T=Object.keys(i.default).reduce(((e,t)=>(e[i.default[t]]=t,e)),{}),F=":",v="record",O="applicationobject",w="undefined"==typeof Symbol?void 0:Symbol("fieldIndices");t.getFormatHash=h,t.markEntryAsDenormalized=p,t.denormalizeFormats=y,t.normalizeFormats=_,t.makeSerializable=g;class P{get type(){return""}constructor(e,t){P.initMixin(this,e)}static initMixin(e,t){if(t){if(Object.getPrototypeOf(t)!==Object.prototype)throw new TypeError("Argument 'data' should be an instance of plain Object");if(t._type&&t._type!==e.type)throw new TypeError(`Argument 'data' has '${t._type}' type signature but '${e.type}' is expected.`);y(t),g(t)}e._data=t,e._format={}}getData(){return this._data}getFields(){const e=[];if(this._isValidData()){const t=this._data.s;for(let i=0,r=t.length;i<r;i++)e.push(t[i].n)}return e}getTypeRef(){return this._buildTypeRef()}setTypeRef(e){if(!e.name||e.name===v)return;const t=m(e.name);if(t)if(t.metaType)return this._setTypeRefString([t.metaType,t.name].join(F));else return void this._setTypeRefString([e.metaType||O,t.name].filter(Boolean).join(F))}getTypeName(){var e;return(null===(e=this.getTypeRef())||void 0===e?void 0:e.name)||v}getMetaType(){var e;if(!this.isTyped())return"record";else return(null===(e=this.getTypeRef())||void 0===e?void 0:e.metaType)||O}isTyped(){return!!this._getTypeRefString()}clear(){this._touchData(),this._data.d.length=0}getFormat(e){if(!this._has(e))throw new ReferenceError(`${this._moduleName}::getFormat(): field "${e}" doesn't exist`);if(!this._format.hasOwnProperty(e))this._format[e]=this._buildFormat(e);return this._format[e]}getSharedFormat(e){const t=this._sharedFieldFormat||(this._sharedFieldFormat=new n.UniversalField),i=this._getFieldIndex(e);if(-1===i)throw new ReferenceError(`${this._moduleName}::getSharedFormat(): field "${e}" doesn't exist`);return t.name=e,t.type=this._getFieldType(i),t.meta=this._getFieldMeta(i,t.type,!0),t}addField(e,t){let i=e;if(!(i&&i instanceof n.Field))throw new TypeError(`${this._moduleName}::addField(): format should be an instance of Types/entity:format.Field`);const s=i.getName();if(this._has(s))throw new ReferenceError(`${this._moduleName}::addField(): field "${s}" already exists`);if((0,l.isArrayField)(i)&&"object"===i.getKind()){const e=new n.ObjectField;e.copyFrom(i),i=e}if(this._touchData(),void 0===t)t=this._data.s.length;this._checkFieldIndex(t,!0),this._format[s]=i,this._resetFieldIndices(),this._data.s.splice(t,0,this._buildS(i)),this._buildD(t,(0,r.serialize)(i.getDefaultValue(),{format:i}))}removeField(e){this._touchData();const t=this._getFieldIndex(e);if(-1===t)throw new ReferenceError(`${this._moduleName}::removeField(): field "${e}" doesn't exist`);delete this._format[e],this._resetFieldIndices(),this._data.s.splice(t,1),this._removeD(t)}removeFieldAt(e){this._touchData(),this._checkFieldIndex(e);const t=this._data.s[e].n;delete this._format[t],this._resetFieldIndices(),this._data.s.splice(e,1),this._removeD(e)}_touchData(){this._data=this._normalizeData(this._data,this.type),g(this._data)}_normalizeData(e,t){if(!(e instanceof Object))e={};if(!(e.d instanceof Array))e.d=[];if(!(e.s instanceof Array)&&void 0===e.f)e.s=[];return e._type=t,e}_cloneData(e){const t=o.object.clone(this._data);if(e&&t){if(t.s)t.s=this._data.s;if(void 0!==t.f&&void 0!==this._data.f)t.f=this._data.f}return t}_isValidData(){return this._data&&this._data.s instanceof Array}_has(e){return this._getFieldIndex(e)>
48=0}_getFieldIndex(e){if(!this._isValidData())return-1;const t=this._data.s;let i=w?t[w]:this._fieldIndices;if(i){if(w&&i.size!==t.length)i=null;if(!w&&this._fieldIndices["[{s}]"]!==t)i=null}if(!i){if(i=new a.Map,w)t[w]=i;else this._fieldIndices=i,this._fieldIndices["[{s}]"]=t;for(let e=0,r=t.length;e<r;e++)i.set(t[e].n,e)}return i.has(e)?i.get(e):-1}_resetFieldIndices(){if(this._isValidData())if(w)this._data.s[w]=null;else this._fieldIndices=null}_checkFieldIndex(e,t){let i=this._data.s.length-1;if(t)i++;if(!(e>=0&&e<=i))throw new RangeError(`${this._moduleName}: field index "${e}" is out of bounds.`)}_getFieldType(e){let t=this._data.s[e].t;if(t&&t instanceof Object)t=t.n;return u(t)}_getFieldMeta(e,t,i){if(i&&null===this._sharedFieldMeta)this._sharedFieldMeta={};const r=this._data.s[e],n=i?this._sharedFieldMeta:{};switch(t){case"real":n.precision=r.t.p;break;case"money":if(n.precision=void 0,"object"==typeof r.t&&"p"in r.t)n.precision=r.t.p;n.large=!!r.t.l;break;case"enum":case"flags":n.dictionary=r.t.s,n.localeDictionary=r.t.sl;break;case"datetime":n.withoutTimeZone=r.t&&r.t.n&&"tz"in r.t?!r.t.tz:!1;break;case"identity":n.separator=",";break;case"array":n.kind=u(r.t.t),Object.assign(n,this._getFieldMeta(e,n.kind))}return n}_checkFormat(e,t){const i=this._isValidData()?this._data.s:[],r=e?e.s||[]:[],n=i.length;let s;if(i!==r){if(t=t||"",n!==r.length)s=n+" columns expected instead of "+r.length;else for(let e=0;e<n&&(s=this._checkFormatColumns(i[e],r[e],e),!s);e++);if(s)o.logger.info(this._moduleName+t+": the formats are not equal ("+s+")")}}_checkFormatColumns(e,t,i){if(!t||e.n!==t.n)return`field with name "${e.n}" at position ${i} expected instead of "${t.n}"`;let r,n=e.t;if(d(n))n=n.n;if(r=t.t,d(r))r=r.n;if(n!==r)return`expected type for "${e.n}" at position '${i} is "${n}" instead of "${r}"`;else return}_buildFormatDeclaration(e){const t=this._getFieldIndex(e),i=this._getFieldType(t),r=this._getFieldMeta(t,i);return r.name=e,r.type=i,r}_buildFormat(e){return(0,n.fieldsFactory)(this._buildFormatDeclaration(e))}_buildS(e){const t={t:"",n:e.getName()};return this._buildSType(t,e),t}_buildSType(e,t){const r=(t.getTypeName()+"").toLowerCase(),a=e.n;switch(r){case"money":let o,l;if(t instanceof n.MoneyField){if(o=t.getPrecision(),o===s.DEFAULT_PRECISION)o=void 0;l=t.isLarge()}if(o||l){if(e.t={n:i.default[r]},o)e.t.p=o;if(l)e.t.l=l}else e.t=i.default[r];break;case"enum":case"flags":const d=t.getDictionary();let u;if(d instanceof Array)u=d.reduce(((e,t,i)=>(e[i]=t,e)),{});e.t={n:i.default[r],s:u||d};break;case"datetime":const h=t.isWithoutTimeZone();if(h)e.t={n:i.default[r],tz:!h};else e.t=i.default[r];break;case"array":e.t={n:i.default[r],t:c(t.getKind(),a)};break;default:e.t=i.default[r]}}_setTypeRefString(e){this._data.tp=e}_getTypeRefString(){var e;return null===(e=this._data)||void 0===e?void 0:e.tp}_buildTypeRef(){const e=this._getTypeRefString();if(!e)return null;else return m(e)}}return t.default=P,Object.assign(P.prototype,{"[Types/_entity/adapter/SbisFormatMixin]":!0,_data:null,_fieldIndices:null,_format:null,_sharedFieldFormat:null,_sharedFieldMeta:null}),t}(0,{},x,at,it,Qe,t,e,d),ft=function(e,t,i,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends((0,n.mixin)(r.default,i.default)){get type(){return"record"}constructor(e,t){super(e),i.default.initMixin(this,e)}has(e){return this._has(e)}get(e){const t=this._getFieldIndex(e);if(!(t<0))return this._cast(this._data.s[t],this._data.d[t])}set(e,t){const r=this._getFieldIndex(e);if(r<0)throw new ReferenceError(`${this._moduleName}::set(): field "${e}" is not defined`);(0,i.denormalizeFormats)(t),this._data.d[r]=this._uncast(this._data.s[r],t)}clear(){if(this._touchData(),super.clear(),this._data.s instanceof Array)this._data.s.length=0}clone(e){return new s(e?this.getData():this._cloneData(!0))}_buildD(e,t){this._data.d.splice(e,0,t)}_removeD(e){this._data.d.splice(e,1)}_cast(e,t){if("ÐденÑиÑикаÑоÑ"===(e&&e.t)){if(!(t instanceof Array))return t;if(1===t.length||null===t[0])return t[0];else return t.join(this._castSeparator)}return t}_uncast(e,t){if("ÐденÑиÑикаÑоÑ"===(e&&e.t)){if(t instanceof Array)return t;if("string"==typeof t)return t.split(this._castSeparator);else return[t]}return t}}return t.default=s,Object.assign(s.prototype,{"[Types/_entity/adapter/SbisRecord]":!0,"[Types/_entity/adapter/IRecord]":!0,"[Types/_entity/ICloneable]":!0,_castSeparator:","}),t}(0,{},ht,f,e),pt=function(e,t,i,r,n,s,a,o){"use strict";
48Object.defineProperty(t,"__esModule",{value:!0});class l extends((0,a.mixin)(n.default,i.default)){get type(){return"recordset"}constructor(e,t){super(e),this["[Types/_entity/adapter/ITable]"]=!0,this["[Types/_entity/adapter/IMetaData]"]=!0,this["[Types/_entity/ICloneable]"]=!0,i.default.initMixin(this,e)}getCount(){return this._isValidData()?this._data.d.length:0}add(e,t){if(this._touchData(),e=this._normalizeData(e,r.default.prototype.type),(0,i.denormalizeFormats)(e),0===this._data.d.length&&e.s)this._data.s=e.s;if(this._checkFormat(e,"::add()"),e.s=this._data.s,void 0===t)this._data.d.push(e.d);else this._checkRowIndex(t,!0),this._data.d.splice(t,0,e.d)}at(e){const t=this._data;if(!this._isValidData()||!t.d[e])return;const n={_type:r.default.prototype.type,d:t.d[e],s:t.s};return(0,i.markEntryAsDenormalized)(n),n}remove(e){this._touchData(),this._checkRowIndex(e),this._data.d.splice(e,1)}replace(e,t){if(this._touchData(),this._checkRowIndex(t),!this._data.s.length&&e.s.length)this._data.s=e.s;(0,i.denormalizeFormats)(e),e.s=this._data.s,this._checkFormat(e,"::replace()"),this._data.d[t]=e.d}move(e,t){if(this._touchData(),t===e)return;const i=this._data.d.splice(e,1).shift();if(i)if(-1===t)this._data.d.unshift(i);else this._data.d.splice(t,0,i)}merge(e,t){this._touchData(),this._checkRowIndex(e),this._checkRowIndex(t),(0,o.merge)(this._data.d[e],this._data.d[t]),this.remove(t)}copy(e){this._touchData(),this._checkRowIndex(e);const t=this._data.d[e],i=(0,o.merge)([],t);return this._data.d.splice(1+e,0,i),i}getMetaDataDescriptor(){const e=[],t=this.getData();if(!(t instanceof Object))return e;if(t.hasOwnProperty("r"))e.push((0,s.fieldsFactory)({name:"results",type:"record"}));if(t.hasOwnProperty("p"))e.push((0,s.fieldsFactory)({name:"path",type:"recordset"}));if(t.hasOwnProperty("n")){let i="integer";switch(typeof t.n){case"boolean":i="boolean";break;case"object":if(t.n){i="object";const e=t.n._type;if(e)i=e}}e.push((0,s.fieldsFactory)({name:"total",type:i})),e.push((0,s.fieldsFactory)({name:"more",type:i}))}if(t.hasOwnProperty("m")){const i=new r.default(t.m);i.getFields().forEach((t=>{e.push(i.getFormat(t))}))}return e}getMetaFieldEnumerator(e){const t=this.getData();if(!(t instanceof Object))return[];const i=[];if("r"in t||"results"in e)i.push((0,s.fieldsFactory)({name:"results",type:"record"}));if("p"in t||"path"in e)i.push((0,s.fieldsFactory)({name:"path",type:"recordset"}));if("n"in t||"total"in e||"more"in e){let r="integer";if("n"in t)r=this._getValueType(t.n);else if("total"in e)r=this._getValueType(e.total);else if("more"in e)r=this._getValueType(e.more);i.push((0,s.fieldsFactory)({name:"total",type:r})),i.push((0,s.fieldsFactory)({name:"more",type:r}))}if(t.hasOwnProperty("m")){const e=new r.default(t.m);e.getFields().forEach((t=>{i.push(e.getFormat(t))}))}return i}_getValueType(e){let t="integer";switch(typeof e){case"boolean":t="boolean";break;case"object":if(e){t="object";const i=e._type;if(i)t=i}}return t}getMetaData(e){const t=this._getMetaDataAlias(e),i=this.getData();if(t)return i&&i instanceof Object?i[t]:void 0;return new r.default(i.m).get(e)}setMetaData(e,t){const i=this._getMetaDataAlias(e),n=this.getData();if(i){if(n&&n instanceof Object)n[i]=t;return}new r.default(n.m).set(e,t)}_getMetaDataAlias(e){switch(e){case"results":return"r";case"path":return"p";case"more":case"total":return"n"}}clone(e){return new l(e?this.getData():this._cloneData())}_buildD(e,t){this._data.d.forEach((i=>{i.splice(e,0,t)}))}_removeD(e){this._data.d.forEach((t=>{t.splice(e,1)}))}_checkRowIndex(e,t){const i=this._data.d.length+(t?0:-1);if(!(e>=0&&e<=i))throw new RangeError(`${this._moduleName}: row index ${e} is out of bounds.`)}}return t.default=l,Object.assign(l.prototype,{"[Types/_entity/adapter/SbisTable]":!0,"[Types/_entity/adapter/ITable]":!0,"[Types/_entity/adapter/IMetaData]":!0,"[Types/_entity/ICloneable]":!0}),t}(0,{},ht,ft,f,it,e,r),yt=function(e,t,i,r,n,s,a,o,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class d extends((0,o.mixin)(i.default,r.default,n.default)){constructor(e){super(e),r.default.initMixin(this,e),n.default.initMixin(this)}addField(e,t){super.addField(e,t);const i=e.getName(),r=e.getDefaultValue(!0);let n;for(let e=0;e<this._data.length;e++)if(n=this._data[e],!n.hasOwnProperty(i))n[i]=r}removeField(e){super.removeField(e);for(let t=0;t<this._data.length;t++)delete this._data[t][e]}getFields(){const e=this.getCount(),t=new a.Set,i=[],r=e=>{t.add(e)};for(let t=0;t<e;t++){const e=this.at(t);if(e instanceof Object)Object.keys(e).forEach(r)}return t.forEach((e=>{i.push(e)})),i}getCount(){return this._isValidData()?this._data.length:0}add(e,t){if(this._touchData(),void 0===t)this._data.push(e);else this._checkPosition(t),this._data.splice(t,0,e)}at(e){return this._isValidData()?this._data[e]:void 0}remove(e){this._touchData(),this._checkPosition(e),this._data.splice(e,1)}replace(e,t){this._touchData(),this._checkPosition(t),this._data[t]=e}move(e,t){if(this._touchData(),t===e)return;const i=this._data.splice(e,1).shift();if(void 0!==i)if(-1===t)this._data.unshift(i);else this._data.splice(t,0,i)}merge(e,t,i){this._touchData();const r=this.at(e),n=this.at(t),a=new s.default(r),o=a.get(i);(0,l.merge)(r,n),a.set(i,o),this.remove(t)}copy(e){this._touchData();const t=this.at(e),i=(0,l.merge)({},t);return this.add(i,1+e),i}clear(){this._touchData(),this._data.length=0}_touchData(){if(!(this._data instanceof Array))this._data=[]}_isValidData(){return this._data instanceof Array}_has(e){const t=this.getCount();let i=!1;for(let r=0;r<t;r++){const t=this.at(r);if(t instanceof Object)if(i=t.hasOwnProperty(e),i)break}return i}_checkPosition(e){if(e<0||e>this._data.length)throw new Error("Out of bounds")}}return t.default=d,Object.assign(d.prototype,{"[Types/_entity/adapter/JsonTable]":!0,_data:null}),t}(0,{},f,nt,st,lt,t,e,r),_t=function(e,t,i,r,n,s){"use strict";
48Object.defineProperty(t,"__esModule",{value:!0});class a extends i.default{forTable(e){return new r.default(e)}forRecord(e){return new n.default(e)}getKeyField(e){}}return t.default=a,Object.assign(a.prototype,{"[Types/_entity/adapter/Json]":!0,_moduleName:"Types/entity:adapter.Json"}),(0,s.register)("Types/entity:adapter.Json",a,{instantiate:!1}),(0,s.register)("adapter.json",a),t}(0,{},pe,yt,lt,u),gt=function(e,t,i,r,n,s,a,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class l extends i.default{forTable(e){return new n.default(e,this._isUnserialized())}forRecord(e,t){return new s.default(e,this._isUnserialized())}getKeyField(e){if(!e)return;(0,r.denormalizeFormats)(e);const t=e.s;if(!t)return;let i;for(let e=0,r=t.length;e<r;e++)if(t[e].n&&"@"===t[e].n[0]){i=e;break}if(void 0===i&&t.length)i=0;return void 0===i?void 0:t[i].n}static get FIELD_TYPE(){return a.default}}return t.default=l,Object.assign(l.prototype,{"[Types/_entity/adapter/Sbis]":!0,_moduleName:"Types/entity:adapter.Sbis"}),(0,o.register)("Types/entity:adapter.Sbis",l,{instantiate:!1}),(0,o.register)("adapter.sbis",l),t}(0,{},pe,ht,pt,ft,x,u),mt=function(e,t,i,r,n,s,a,o,l,d,u,c,h,f,p,y,_,g){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.GenericFormatMixin=t.GenericFormatMixinOrig=t.SbisFormatMixin=t.JsonFormatMixin=t.SbisTable=t.SbisRecord=t.SbisFieldType=t.Sbis=t.RecordSetTable=t.RecordSetRecord=t.RecordSet=t.isDecorator=t.JsonRecord=t.JsonTable=t.Json=t.Cow=t.Abstract=void 0,Object.defineProperty(t,"Abstract",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"Cow",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"Json",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"JsonTable",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"JsonRecord",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"isDecorator",{enumerable:!0,get:function(){return o.isDecorator}}),Object.defineProperty(t,"RecordSet",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"RecordSetRecord",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"RecordSetTable",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"Sbis",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"SbisFieldType",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"SbisRecord",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"SbisTable",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"JsonFormatMixin",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(t,"SbisFormatMixin",{enumerable:!0,get:function(){return _.default}}),t.GenericFormatMixinOrig=g.default,t.GenericFormatMixin=g.default.prototype,t}(0,{},pe,Oe,_t,yt,lt,S,ct,dt,ut,gt,x,ft,pt,st,ht,nt),bt=mt,Tt=function(e,t,i,r,n,s,a,o){"use strict";function l(e){return!!e["[Types/_entity/adapter/IDecorator]"]}function d(){const e=(0,n.create)("Types/collection:format.Format"),t=this._getRawDataAdapter(),i=this._getRawDataFields(),r=i.length;for(let n=0;n<r;n++)e.add(t.getFormat(i[n]));return e}Object.defineProperty(t,"__esModule",{value:!0});const u="Types/entity:adapter.Json";class c{constructor(){this["[Types/_entity/FormattableMixin]"]=!0,c.initMixin(this)}static initMixin(e){if(!e._$format&&e._options&&e._options.format)e._$format=e._options.format}_getSerializableState(e){if(e.$options)e.$options.rawData=this._getRawData();return e}_setSerializableState(e){return function(){}}getRawData(e){return e?this._getRawData():s.object.clonePlain(this._getRawData(),{keepUndefined:!1})}setRawData(e){this._resetRawDataAdapter(e),this._resetRawDataFields(),this._clearFormatClone()}getAdapter(){let e=this._getAdapter();if(l(e))e=e.getOriginal();return e}hasDeclaredFormat(){return!!this._$format}resetDeclaredFormat(){this._$format=this._formatClone=null}createDeclaredFormat(){this._$format=this._getFormat(!0),this._unlinkFormatOption(),this._resetRawDataFields(),this._clearFormatClone()}getFormat(e){const t=this._getFormat(!0);if(e||(0,a.isCowFormat)(t))return t;if(!this._formatClone)this._formatClone=this._getFormat(!0).clone(!0);return this._formatClone}addField(e,t){const i=this._buildField(e);if(this._$format=this._getFormat(!0),this._getRawDataAdapter().addField(i,t),(0,a.isCowFormat)(this._$format))this._modifyInnerFormat([{type:"add",item:i}]);else this._unlinkFormatOption(),this._$format.add(i,t);return this._resetRawDataFields(),this._clearFormatClone(),i}removeField(e){this._$format=this._getFormat(!0);const t=this._$format.getFieldIndex(e);if(this._getRawDataAdapter().removeField(e),(0,a.isCowFormat)(this._$format))this._modifyInnerFormat([{type:"removeAt",at:t}]);else this._unlinkFormatOption(),this._$format.removeField(e);this._resetRawDataFields(),this._clearFormatClone()}removeFieldAt(e){if(this._$format=this._getFormat(!0),this._getRawDataAdapter().removeFieldAt(e),(0,a.isCowFormat)(this._$format))this._modifyInnerFormat([{type:"removeAt",at:e}]);else this._unlinkFormatOption(),this._$format.removeAt(e);this._resetRawDataFields(),this._clearFormatClone()}_getRawData(){return this._rawDataAdapter||this.hasDeclaredFormat()?this._getRawDataAdapter().getData():this._getRawDataFromOption()}_getRawDataFromOption(){return"function"==typeof this._$rawData?this._$rawData():this._$rawData}_getDefaultAdapter(){return u}_getAdapter(){if(this._$adapter===u&&c.prototype._getDefaultAdapter!==this._getDefaultAdapter)this._$adapter=this._getDefaultAdapter();if(this._$adapter&&!(this._$adapter instanceof Object))this._$adapter=(0,n.create)(this._$adapter);if(this._$cow&&!l(this._$adapter))this._$adapter=new r.Cow(this._$adapter);return this._$adapter}_getRawDataAdapter(){if(!this._rawDataAdapter)this._rawDataAdapter=this._createRawDataAdapter(),this._initRawDataAdapter(this._rawDataAdapter);return this._rawDataAdapter}_createRawDataAdapter(){throw new Error("Method must be implemented")}_initRawDataAdapter(e){if(this.hasDeclaredFormat()){if(l(e))e=e.getOriginal();if(e._touchData)e._touchData();const t=e.getFields();this._getFormat().each((i=>{try{if(-1===t.indexOf(i.getName()))e.addField(i)}catch(e){if(e instanceof Error)s.logger.info(`${this._moduleName}::constructor(): can't add raw data field (${e.message})`)}}))}if(this._$typeName)null==e||e.setTypeRef({name:this._$typeName,metaType:this._$metaType})}_resetRawDataAdapter(e){if(void 0===e){if(this._rawDataAdapter&&"function"!=typeof this._$rawData)this._$rawData=this._rawDataAdapter.getData()}else this._$rawData=e;this._rawDataAdapter=null}_checkAdapterCompatibility(e){let t=this._getAdapter();if(l(e))e=e.getOriginal();if(l(t))t=t.getOriginal();if(!Object.getPrototypeOf(t).isPrototypeOf(e))throw new TypeError(`The foreign adapter "${e._moduleName}" is incompatible with the internal adapter "${t._moduleName}"`)}_getRawDataFields(){return this._rawDataFields||(this._rawDataFields=this._getRawDataAdapter().getFields())}_addRawDataField(e){this._getRawDataFields().push(e)}_resetRawDataFields(){this._rawDataFields=null}_getFormat(e){if(!this._format)if(this.hasDeclaredFormat())this._format=this._$format=c.prototype._buildFormat(this._$format,(()=>d.call(this)));else if(e)this._format=d.call(this);return this._format}_clearFormat(){if(this.hasDeclaredFormat())throw new Error(`${this._moduleName}: format can't be cleared because it's defined directly`);this._format=null,this._clearFormatClone()}_clearFormatClone(){this._formatClone=null}_unlinkFormatOption(){if(!this._formatUnlinked&&this._$format&&(0,a.isFormat)(this._$format))this._format=this._$format=this._$format.clone(!0),this._clearFormatClone(),this._formatUnlinked=!0}_hasFormat(){return this.hasDeclaredFormat()}_getFieldFormat(e,t){if(this.hasDeclaredFormat()){const t=this._getFormat(),i=t.getFieldIndex(e);if(i>-1)return t.at(i)}return t.getSharedFormat(e)}_getFieldType(e){let t=e.getType?e.getType():e.type;if(t&&"string"==typeof t)if((0,n.isRegistered)(t))t=(0,n.resolve)(t);return t}_buildField(e){if("string"==typeof e||Object.getPrototypeOf(e)===Object.prototype)e=(0,i.fieldsFactory)(e);if(!(e&&e instanceof i.Field))throw new TypeError(`${this._moduleName}: format should be an instance of Types/entity:format.Field`);return e}_buildFormat(e,t){const r=(0,n.resolve)("Types/collection:format.Format");if((0,a.isCowFormat)(e))return e;if(e){const s=Object.getPrototypeOf(e);if(s===Array.prototype){e=(0,n.resolve)("Types/collection:format.factory")(e)}else if(s===Object.prototype)e=function(e,t){let r,n;for(const s in e)if(e.hasOwnProperty(s)){if(r=e[s],"object"!=typeof r)r={type:r};if(!(r instanceof i.Field))r=(0,i.fieldsFactory)(r);if(r.setName(s),n=t.getFieldIndex(s),-1===n)t.add(r);else t.replace(r,n)}return t}(e,t?t():new r)}if(!(e&&e instanceof r))e=new r;return e}_modifyInnerFormat(e){if(this._$format=this._getFormat(!0),!(0,a.isCowFormat)(this._$format))throw new Error("ÐÑзов _modifyInnerFormat пÑи неÑÑÑановленном Ñежиме COW Ñвл
48ÑеÑÑÑ Ð¾Ñибкой в Types");if(this._formatUnlinked)this._$format[o.INTERNAL_MODIFY_METHOD](e);else this._$format=this._format=this._$format.modify(e),this._formatUnlinked=!0}_checkCowFormat(){if((0,a.isCowFormat)(this._$format))throw new Error("ÐодиÑикаÑÐ¸Ñ ÑоÑмаÑа запиÑи запÑеÑена, Ñак как даннÑй ÑоÑÐ¼Ð°Ñ Ð¾Ð±ÑÑвлен Ñ Ñежимом Copy-On-Write. ÐÐ»Ñ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ ÑоздайÑе новÑй ÑоÑÐ¼Ð°Ñ Ð·Ð°Ð¿Ð¸Ñи.")}}return t.default=c,Object.assign(c.prototype,{"[Types/_entity/FormattableMixin]":!0,_moduleName:"Types/entity:FormattableMixin",_$rawData:null,_$cow:!1,_$adapter:u,_$typeName:null,_$metaType:null,_$format:null,_format:null,_formatClone:null,_rawDataAdapter:null,_rawDataFields:null,hasDecalredFormat:c.prototype.hasDeclaredFormat}),t}(0,{},it,mt,u,e,d,Y),Ft=Tt,vt=function(e,t,i,r,n,s,a,o,l,d,u,c,h,f,p,y,_,g,m){"use strict";function b(e){return e&&"object"==typeof e?!1:!0}function T(e){if(e&&"object"==typeof e&&e!==e.valueOf())return e.valueOf();else return e}function F(e){switch(typeof e){case"boolean":return"boolean";case"number":if(e%1==0)return"integer";else return"real";case"object":if(null===e)return"string";else if((0,m.isRecord)(e))return"record";else if((0,m.isRecordSet)(e))return"recordset";else if(e instanceof Date){if(e["[Types/_entity/applied/Date]"])return"date";if(e["[Types/_entity/applied/Time]"])return"time";if(e["[Types/_entity/applied/DateTime]"])return{type:"datetime",withoutTimeZone:e.withoutTimeZone};if(e.hasOwnProperty("_serializeMode"))switch(e.getSQLSerializationMode()){case Date.SQL_SERIALIZE_MODE_DATE:return"date";case Date.SQL_SERIALIZE_MODE_TIME:return"time"}return"datetime"}else if(e instanceof Array){const t=e.filter((e=>null===e?!1:!0)),i=t.length-1;return{type:"array",kind:F(t.find(((e,t)=>{if(void 0===e)return!1;else if("number"==typeof e){if("integer"===F(e)&&t<i)return!1}return!0})))}}else if(e["[Types/_entity/applied/TimeInterval]"])return"timeinterval";return"object";default:return"string"}}Object.defineProperty(t,"__esModule",{value:!0}),t.getValueType=t.CacheMode=void 0;const v=Symbol("fieldsCache"),O=Symbol("fieldsClone"),w=Symbol("changedFields"),P={ADDED:"Added",DELETED:"Deleted",CHANGED:"Changed",UNCHANGED:"Unchanged",DETACHED:"Detached"},M="field.";var D;!function(e){e.Objects="objects",e.All="all"}(D||(t.CacheMode=D={})),t.getValueType=F;class j extends((0,p.mixin)(i.default,n.default,s.default,a.default,o.default,l.default,d.default,u.default,c.default,h.default,g.ObserveSessionMixin)){get _fieldsCache(){return this[v]||(this[v]=new y.Map)}get _fieldsClone(){return this[O]||(this[O]=new y.Map)}get _changedFields(){const e={},t=this[w];if(!t)return e;let i,r,n;return Object.keys(t).forEach((s=>{if(i=t[s],n=i[0],r=i[1],!(n&&r&&(0,m.isRecord)(n))||n.isChanged())e[s]=this._haveToClone(n)&&this._fieldsClone.has(s)?this._fieldsClone.get(s):n})),e}constructor(e){j.checkOptions(e),super(e),this["[Types/_entity/Record]"]=!0,this["[Types/_collection/IEnumerable]"]=!0,this["[Types/_entity/IObservableObject]"]=!0,this["[Types/_entity/IEquatable]"]=!0,this["[Types/_entity/relation/IReceiver]"]=!0,this.initRecord(e)}initRecord(e){n.default.initMixin(this,e),c.default.initMixin(this),u.default.initMixin(this,e),this._publish("onPropertyChange"),this._publish("onStateChange"),this._clearChangedFields(),this._acceptedState=this._$state}destroy(){this[w]=null,this._clearFieldsCache(),u.default.prototype.destroy.call(this),i.default.prototype.destroy.call(this)}get(e){this._pushSessionDependency(e);const t=this._fieldsCache;if(t.has(e))return t.get(e);const i=this._getRawDataValue(e);if(this._isSessionGathering()&&(0,g.isObservableMixin)(i))this._createObservableDependency(i);if(this._isFieldValueCacheable(i))if(this._addChild(i,this._getRelationNameForField(e)),t.set(e,i),this._haveToClone(i))this._fieldsClone.set(e,i.clone());return i}set(e,t){const i=this.isChanged(),r=this._getHashMap(e,t),n=[],s=this._setPairs(Object.keys(r).map((e=>[e,r[e],this.get(e),!0])),n);if(s)this._notifyChange(s);
48if(i&&!this.isChanged()&&this.getOwner())this._childChanged(j.prototype.set);this._checkErrors(n)}has(e){return this._getRawDataFields().indexOf(e)>-1}_setPairs(e,t){let i=null;return e.forEach((e=>{const[r,n,s,a]=e;let o=n;if(function(e,t){if(T(e)===T(t))if(!b(e)&&!b(t)&&e["[Types/_collection/Enum]"]&&t["[Types/_collection/Enum]"])return(0,_.isEqual)(e.getDictionary(),t.getDictionary());else return!0;return!1}(o,s)){if("object"==typeof o&&a)this._setRawDataValue(r,o)}else try{if(this._removeChild(s),a)if(b(o))o=this._setRawDataValue(r,o);else this._setRawDataValue(r,o);if(this._addChild(o,this._getRelationNameForField(r)),o!==s){if(!this.has(r))this._addRawDataField(r);if(!i)i={};if(i[r]=o,this._hasChangedField(r)&&T(this._getChangedFieldValue(r))===T(o)&&!this._isChangedState(o))this._unsetChangedField(r);else this._setChangedField(r,s);if(this._isFieldValueCacheable(o)){if(this._fieldsCache.set(r,o),this._haveToClone(o))this._fieldsClone.set(r,o.clone())}else this._fieldsCache.delete(r),this._fieldsClone.delete(r)}}catch(e){if(e instanceof Error)t.push(e)}})),this._triggerSessionDependency(i),i}getEnumerator(){return(0,f.create)("Types/collection:enumerator.Arraywise",this._getRawDataFields())}getOriginal(e){if(this._hasChangedField(e)&&!this._statefulPrimitive(e,!0))return this._getChangedFieldValue(e);else return this.get(e)}each(e,t){const i=this.getEnumerator();let r;for(;i.moveNext();)if(r=i.getCurrent(),r)e.call(t||this,r,this.get(r))}isEqual(e){if(e===this)return!0;if(!(e&&e instanceof j))return!1;this._getRawDataAdapter(),e._getRawDataAdapter();const t=this._getRawData(),i=e.getRawData(!0);if(t instanceof j)return t.isEqual(i);else return(0,_.isEqual)(t,i)}relationChanged(e,t){const i=(e,t)=>{const i={};if(this._getRawDataAdapter().has(e))this._setRawDataValue(e,t,!0);return this._setChangedField(e,t,!0),i[e]=t,this._notifyChange(i,!1),i},r=t[0],n=this._getFieldFromRelationName(r),s=e.target;switch(e.original){case j.prototype.acceptChanges:if(n&&s["[Types/_entity/IStateful]"]&&!s.isChanged())this.acceptChanges([n]);break;case j.prototype.rejectChanges:if(n&&s["[Types/_entity/IStateful]"]&&!s.isChanged()){if(s["[Types/_collection/Enum]"]&&null==this._getChangedFieldValue(n)){if(this._unsetChangedField(n),0===this.getChanged().length)this._setState(this._acceptedState);return}this.rejectChanges([n])}break;case j.prototype.addField:case j.prototype.removeField:case j.prototype.removeFieldAt:if(this._resetRawDataAdapter(),this._resetRawDataFields(),n)i(n,s);break;case j.prototype.set:if(n&&s["[Types/_entity/IStateful]"]&&!s.isChanged()){if(this._unsetChangedField(n),0===this.getChanged().length)this._setState(this._acceptedState);this._notifyChange()}break;default:if(n){const e=i(n,s);return this._triggerSessionDependency(e),{target:s,data:e}}}}_getRelationNameForField(e){return M+e}_getFieldFromRelationName(e){if((e+="").substr(0,6)===M)return e.substr(6)}merge(e){if(e!==this)try{const t={},i=e.getFormat();e.each(((e,r)=>{if(t[e]=r,this._isFormatWritable())if(!this.has(e)){const t=i.at(i.getFieldIndex(e));if(t)this._checkFormatIsWritable(),this._checkCowFormat(),this.addField(t)}})),this.set(t)}catch(e){if(e instanceof ReferenceError)p.logger.info(this._moduleName+"::merge(): "+e.toString());else throw e}}deepMerge(e){if(e!==this)try{const t={},i=e.getFormat();e.each(((e,r)=>{const n=r;if((0,m.isRecord)(n)){const t=this.get(e);if((0,m.isRecord)(t))return void t.deepMerge(n)}if(t[e]=n,this._isFormatWritable()&&-1===this.getFormat(!0).getFieldIndex(e)){const t=i.at(i.getFieldIndex(e));if(t)this._checkFormatIsWritable(),this._checkCowFormat(),this.addField(t)}})),this.set(t)}catch(e){if(e instanceof ReferenceError)p.logger.info(this._moduleName+"::deepMerge(): "+e.toString());else throw e}}toJSON(e){return super.toJSON()}_getSerializableState(e){var t;let i=o.default.prototype._getSerializableState.call(this,e);if(i=c.default.prototype._getSerializableState.call(this,i),i._changedFields=this[w],i.$options&&i.$options.owner&&i.$options.owner.hasDeclaredFormat())i._format=i.$options.owner.getFormat();return null===(t=i.$options)||void 0===t||delete t.owner,i}_setSerializableState(e){const t=o.default.prototype._setSerializableState(e),i=c.default.prototype._setSerializableState(e);return function(){if(t.call(this),i.call(this),this[w]=e._changedFields,e._format)this._$format=e._format}}setRawData(e){super.setRawData(e),this._nextVersion(),this._clearFieldsCache(),this._notifyChange()}hasDeclaredFormat(){const e=this.getOwner();if(e)return e.hasDeclaredFormat();else return super.hasDeclaredFormat()}addField(e,t,i){this._checkFormatIsWritable();const r=super.addField(e,t),n=r.getName();if(void 0!==i)this.set(n,i);else this._notifyChange({[n]:r.getDefaultValue()},!1);
48return this._childChanged(j.prototype.addField),this._nextVersion(),r}removeField(e){this._checkFormatIsWritable(),this._fieldsCache.delete(e),this._fieldsClone.delete(e),this._unsetChangedField(e),super.removeField(e),this._notifyChange({[e]:void 0},!1),this._childChanged(j.prototype.removeField),this._nextVersion()}removeFieldAt(e){this._checkFormatIsWritable();const t=this._getFormat(!0).at(e);let i="";if(t)i=t.getName(),this._fieldsCache.delete(i),this._fieldsClone.delete(i),this._unsetChangedField(i);if(super.removeFieldAt(e),t)this._notifyChange({[i]:void 0},!1);this._childChanged(j.prototype.removeFieldAt),this._nextVersion()}_getFormat(e){const t=this.getOwner();if(t)return t._getFormat(e);else return super._getFormat.call(this,e)}_getFieldFormat(e,t){const i=this.getOwner();if(i)return i._getFieldFormat(e,t);else return super._getFieldFormat.call(this,e,t)}_createRawDataAdapter(){var e,t,i,r;const n=this._getAdapter();if(!(0,m.isAdapter)(n)){const s=null!==(e=null==n?void 0:n._moduleName)&&void 0!==e?e:"unknown",a=null!==(r=null===(i=(t=n).getInstanceId)||void 0===i?void 0:i.call(t))&&void 0!==r?r:"unknown";p.logger.info(`Invalid record adapter "${s}" with instanceId "${a}": expected IAdapter`)}return n.forRecord(this._getRawDataFromOption())}_checkFormatIsWritable(){if(!this._isFormatWritable())throw new Error("Record format has read only access if record belongs to recordset. You should change recordset format instead.")}_isFormatWritable(){return!this.getOwner()}isChanged(e){return e?this._hasChangedField(e):this.getChanged().length>0}getOwner(){return this._$owner}detach(){this._getRawDataAdapter(),this._$owner=null,this.setState(P.DETACHED)}getState(){return this._$state}setState(e){this._setState(e)}getChanged(){return Object.keys(this._changedFields)}acceptChanges(e,t,i){if(void 0===t&&void 0===i&&"boolean"==typeof e)t=e,e=void 0;if(void 0===i&&"boolean"==typeof e&&"boolean"==typeof t)i=t,t=e,e=void 0;if(void 0===e)this.getChanged().forEach((e=>{this._acceptField(e,!!i)})),this._clearChangedFields();else{if(!(e instanceof Array))throw new TypeError('Argument "fields" should be an instance of Array');e.forEach((e=>{this._acceptField(e,!!i),this._unsetChangedField(e)}))}if(0===this.getChanged().length)switch(this._$state){case P.ADDED:case P.CHANGED:this._setState(P.UNCHANGED);break;case P.DELETED:case P.DETACHED:this._setState(P.DETACHED)}if(this._acceptedState=this._$state,t)this._childChanged(j.prototype.acceptChanges)}rejectChanges(e,t,i){if(void 0===t&&void 0===i&&"boolean"==typeof e)t=e,e=void 0;if("boolean"==typeof e&&"boolean"==typeof t)i=t,t=e,e=void 0;const r={};if(void 0===e)e=this.getChanged();else if(!(e instanceof Array))throw new TypeError('Argument "fields" should be an instance of Array');e.forEach((e=>{if(this._hasChangedField(e))r[e]=this._getChangedFieldValue(e)})),this.set(r);for(const e in r)if(r.hasOwnProperty(e))this._rejectField(e,!!i),this._unsetChangedField(e);if(0===this.getChanged().length)this._setState(this._acceptedState);if(t)this._childChanged(j.prototype.rejectChanges)}_statefulPrimitive(e,t){return e&&!b(e)&&e["[Types/_entity/IStateful]"]&&("record"!==F(e)&&"recordset"!==F(e)||t)}toString(){const e={};return this.each(((t,i)=>{e[t]=i})),JSON.stringify(e)}subscribe(e,t,i){u.default.prototype.subscribe.call(this,e,t,i)}setEventRaising(e,t){if(t)throw new Error("The changes analysis is disabled for Records");a.default.prototype.setEventRaising.call(this,e,t)}getTypeName(){return this._getRawDataAdapter().getTypeName()}getMetaType(){return this._getRawDataAdapter().getMetaType()}setTypeName(e,t){this._getRawDataAdapter().setTypeRef({name:e,metaType:t})}isTyped(){return this._getRawDataAdapter().isTyped()}_checkErrors(e){if(e.length){let t=e[0];for(let i=e.length;i>0;i--)if(t>e[i])t=e[i];throw t}}_getHashMap(e,t){let i=e;if(!(i instanceof Object))i={},i[e]=t;return i}_clearFieldsCache(){this[v]=null,this[O]=null}_isFieldValueCacheable(e){switch(this._$cacheMode){case D.Objects:return e instanceof Object;case D.All:return!0;default:return!1}}_haveToClone(e){return this._$cloneChanged&&e&&e["[Types/_entity/ICloneable]"]}_getRawDataValue(e){const t=this._getRawDataAdapter();if(!t.has(e))return;const i=t.get(e),n=this._getFieldFormat(e,t);return(0,r.cast)(i,this._getFieldType(n),{format:n,adapter:this._getAdapter()})}_setRawDataValue(e,t,i){if(!i&&t&&t["[Types/_entity/FormattableMixin]"])this._checkAdapterCompatibility(t.getAdapter());const n=this._getRawDataAdapter();return t=(0,r.serialize)(t,{format:this._getFieldFormat(e,n),adapter:this.getAdapter()}),n.set(e,t),t}_notifyChange(e,t){if(e=e||{}
48,void 0===t||!0===t)this._childChanged(e);if(this._nextVersion(),this._isNeedNotifyPropertyChange())this._notify("onPropertyChange",e)}_isNeedNotifyPropertyChange(){return this._eventRaising&&this.hasEventHandlers("onPropertyChange")}_isNeedNotifyStateChange(){return this._eventRaising&&this.hasEventHandlers("onStateChange")}_clearChangedFields(){this[w]={}}_hasChangedField(e){return this._changedFields.hasOwnProperty(e)}_getChangedFieldValue(e){return this._changedFields[e]}_setChangedField(e,t,i){const r=this[w],n=r.hasOwnProperty(e);if(this._$state===P.UNCHANGED)this._setState(P.CHANGED);if(!n)return void(r[e]=[t,Boolean(i)]);const s=r[e]!==t;if(i&&(0,m.isRecord)(t)&&s)r[e]=[t,Boolean(i)]}_setState(e){if(this._$state=e,this._isNeedNotifyStateChange())this._notify("onStateChange",e)}_unsetChangedField(e){delete this[w][e]}_isChangedState(e){if("recordset"===F(e))return e.isChanged();else return!1}_acceptField(e,t){const i=this.get(e);if(this._statefulPrimitive(i,t))i.acceptChanges(!1,t)}_rejectField(e,t){const i=this.get(e);if(this._statefulPrimitive(i,t))i.rejectChanges(!1,t)}static extend(e,t){return(0,p.deprecateExtend)(this,t,e,"Types/_entity/Record")}static checkOptions(e){if(e&&e.owner&&!(0,m.isRecordSet)(e.owner))throw new TypeError("Records owner should be an instance of Types/collection:RecordSet")}static es5Constructor(e){j.checkOptions(e),j.prototype.initRecord.call(this,e)}static get RecordState(){return P}static get CACHE_MODE_OBJECTS(){return D.Objects}static get CACHE_MODE_ALL(){return D.All}static fromObject(e,t,i){if(null===e)return e;if(e&&e instanceof j)return e;const r=new this({adapter:t||"Types/entity:adapter.Json",format:[],typeName:i}),n=e;let s=[];for(const e in n)if(n.hasOwnProperty(e))s.push(e);s=s.sort();for(let e=0,t=s.length;e<t;e++){const t=s[e],i=n[t];if(void 0!==i)j.addFieldTo(r,t,i)}return r.acceptChanges(),r}static filter(e,t){const i=new j({adapter:e.getAdapter()});return e.getFormat().each((r=>{const n=r.getName(),s=e.get(n);if(!t||t(n,s))i.addField(r),i.set(n,s)})),i.acceptChanges(),i}static addFieldTo(e,t,i,r){if(!r){let e=F(i);if("string"==typeof e)e={name:"",type:e};e.name=t,r=e}e.addField(r,void 0,i)}static filterFields(e,t){if(!(t instanceof Array))throw new TypeError('Argument "fields" should be an instance of Array');return j.filter(e,(e=>t.indexOf(e)>-1))}static produceInstance(e,t){const i={rawData:e};if(t&&t.adapter)i.adapter=t.adapter;return new this(i)}}return t.default=j,Object.assign(j.prototype,{"[Types/_entity/Record]":!0,"[Types/_collection/IEnumerable]":!0,"[Types/_entity/IEquatable]":!0,"[Types/_entity/IObject]":!0,"[Types/_entity/IObservableObject]":!0,"[Types/_entity/IProducible]":!0,"[Types/_entity/relation/IReceiver]":!0,"[Types/_entity/IStateful]":!0,_moduleName:"Types/entity:Record",_$state:P.DETACHED,_$cacheMode:D.Objects,_$cloneChanged:!1,_$owner:null,_acceptedState:void 0,[w]:null}),(0,f.register)("Types/entity:Record",j,{instantiate:!1}),t}(0,{},f,at,D,F,y,Q,c,oe,he,Tt,C,u,e,t,r,O,d),Ot=vt,wt=vt,Pt=function(e,t,i,r,n,s,a,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const l=Symbol("isCalculating");class d extends i.default{constructor(e){super(e),this["[Types/_entity/Model]"]=!0,this["[Types/_entity/IStateful]"]=!0,this.initModel(e)}initModel(e){if(this._propertiesInjected=!!e&&"properties"in e,e&&e.instanceState)this._setInstanceState(e.instanceState);if(!this._$keyProperty&&e&&e.idProperty)this._$keyProperty=e.idProperty;if(this._options){if(this._options.properties){const e={};Object.assign(e,this._$properties),Object.assign(e,this._options.properties),this._$properties=e}if(!this._$keyProperty&&this._options.idProperty)this._$keyProperty=this._options.idProperty}}destroy(){this._defaultPropertiesValues=null,this._propertiesDependency=null,this._deepChangedProperties=null,super.destroy()}get(e){if(this._pushDependency(e),this._fieldsCache.has(e))return this._pushSessionDependency(e),this._fieldsCache.get(e);const t=this._$properties&&this._$properties[e],i=super.get(e);if(!t)return i;let r=i;if("def"in t&&!this._getRawDataAdapter().has(e))r=this.getDefault(e);if(!t.get)return r;const n=this._processCalculatedValue(e,r,t.get,!0);if(n!==i)this._removeChild(i),this._addChild(n,this._getRelationNameForField(e));if(this._isFieldValueCacheable(n))this._fieldsCache.set(e,n);else if(this._fieldsCache.has(e))this._fieldsCache.delete(e);return n}set(e,t){if(!this._$properties)return void super.set(e,t);const r=this._getHashMap(e,t),s=[],a=[],o=this._$properties&&Object.values(this._$properties).some((e=>e.get&&e.get[l]||e.set&&e.set[l]));Object.keys(r).forEach((e=>{const t=e;this._deleteDependencyCache(e);let o=r[t];try{const t=this._$properties&&this._$properties[e];if(t)if(t.set){const i=n.Track.isFunctor(t.set),r=i?this.get(e):void 0;if(this._fieldsCache.has(e))this._removeChild(this._fieldsCache.get(e)),this._fieldsCache.delete(e);o=this._processCalculatedValue(e,o,t.set,!1);const a=void 0!==o;if(i)return void s.push([e,this.get(e),r,a]);else if(!a)return}else if(t.get)return void a.push(new ReferenceError(`Property "${e}" is read only`));s.push([e,o,i.default.prototype.get.call(this,e),!0])}catch(e){if(e instanceof Error)a.push(e)}}));const d=[];let u=super._setPairs(s,d);if(o&&u)this._deepChangedProperties=this._deepChangedProperties||{},Object.assign(this._deepChangedProperties,u);else if(!o&&this._deepChangedProperties){if(u)Object.assign(this._deepChangedProperties,u);u=this._deepChangedProperties,this._deepChangedProperties=null}if(!o&&u){const e=Object.keys(u).reduce(((e,t)=>(e[t]=this.get(t),e)),{});this._notifyChange(e)}this._checkErrors([...a,...d])}has(e){return this._$properties&&this._$properties.hasOwnProperty(e)||super.has(e)}getEnumerator(){return(0,s.create)("Types/collection:enumerator.Arraywise",this._getAllProperties())}each(e,t){return super.each(e,t)}relationChanged(e,t){const i=[],r=t.length-1;return t.forEach(((t,n)=>{const s=this._getFieldFromRelationName(t);if(s)if(i.push(s),this._deleteDependencyCache(i.join(".")),n===r&&e.data instanceof Object)Object.keys(e.data).forEac
48h((e=>{this._deleteDependencyCache(i.concat([e]).join("."))}))})),super.relationChanged(e,t)}getInstanceState(){if(!this._$properties)return null;else return Object.keys(this._$properties).map((e=>{const t=this._$properties[e];let i;if(n.Track.isFunctor(t.get))i=t.get.propertyName;if(!i&&n.Track.isFunctor(t.set))i=t.set.propertyName;return i})).filter((e=>!!e)).reduce(((e,t)=>{let i=e;if(void 0===t)return i;if(void 0!==this[t])i=e,i[t]=this[t];return i}),{})}_setInstanceState(e){if(e)Object.keys(e).forEach((t=>{this[t]=e[t]}))}_getSerializableState(e){const t=super._getSerializableState(e);if(!this._propertiesInjected)delete t.$options.properties;if(t._instanceId=this.getInstanceId(),t._isDeleted=this._isDeleted,this._defaultPropertiesValues)t._defaultPropertiesValues=this._defaultPropertiesValues;return t}_setSerializableState(e){const t=super._setSerializableState(e);return function(){if(t.call(this),this._instanceId=e._instanceId,this._isDeleted=e._isDeleted,e._defaultPropertiesValues)this._defaultPropertiesValues=e._defaultPropertiesValues}}rejectChanges(e,t,i){if(super.rejectChanges(e,t,i),!(e instanceof Array))this._isChanged=!1}acceptChanges(e,t,i){if(super.acceptChanges(e,t,i),!(e instanceof Array))this._isChanged=!1}isChanged(e){if(!e&&this._isChanged)return!0;else return super.isChanged(e)}getProperties(){return this._$properties}getDefault(e){let t=this._defaultPropertiesValues;if(!t)t=this._defaultPropertiesValues={};if(!t.hasOwnProperty(e)){const i=this._$properties[e];if(i&&"def"in i)t[e]=[i.def instanceof Function?i.def.call(this):i.def];else t[e]=[]}return t[e][0]}merge(e){super.merge(e)}getKey(){const e=this.getKeyProperty();if(e)return this.get(e);else a.logger.info(this._moduleName+"::getKey(): keyProperty is not defined")}getKeyProperty(){if(!this._$keyProperty)this._$keyProperty=this._getAdapter().getKeyField(this._getRawData())||"";return this._$keyProperty}setKeyProperty(e){if(this._$keyProperty!==e)if(!e||this.has(e))this._$keyProperty=e;else a.logger.info(this._moduleName+'::setKeyProperty(): property "'+e+'" is not defined')}_getAllProperties(){const e=this._getRawDataFields();if(!this._$properties)return e;const t=this._$properties;return Object.keys(t).concat(e.filter((e=>!t.hasOwnProperty(e))))}_processCalculatedValue(e,t,i,r){var s;if(i[l])throw new Error(`Recursive value ${r?"reading":"writing"} detected for property "${e}"`);const a=r&&n.Compute.isFunctor(i),o=r&&!a;let d;if(r)d=this._propertiesDependencyGathering,this._propertiesDependencyGathering=o?e:"";if(a)null===(s=i.properties)||void 0===s||s.forEach((t=>{this._pushDependencyFor(t,e)}));try{i[l]=!0,t=i.call(this,t)}finally{if(r)this._propertiesDependencyGathering=d;i[l]=!1}return t}_pushDependency(e){if(this._propertiesDependencyGathering&&this._propertiesDependencyGathering!==e)this._pushDependencyFor(e,this._propertiesDependencyGathering)}_pushDependencyFor(e,t){let i,r=this._propertiesDependency;if(!r)r=this._propertiesDependency=new o.Map;if(r.has(e))i=r.get(e);else i=new o.Set,r.set(e,i);if(i&&!i.has(t))i.add(t)}_deleteDependencyCache(e){var t;const i=this._propertiesDependency;if(i&&i.has(e))null===(t=i.get(e))||void 0===t||t.forEach((e=>{this._removeChild(this._fieldsCache.get(e));const t=this._fieldsCache.delete(e);if(this._fieldsClone.delete(e),t)this._unsetChangedField(e);this._deleteDependencyCache(e)}))}static fromObject(e,t){return i.default.fromObject.call(this,e,t)}static createAppObject(e,t){const r="Id";if(!t)throw new Error("Type name must be provided when creating an application object.");const n=i.default.fromObject.call(this,{[r]:null!=e?e:null},"adapter.sbis",t);return n.setKeyProperty("Id"),n}static extend(e,t){return(0,a.deprecateExtend)(this,t,e,"Types/_entity/Model")}static es5Constructor(e){i.default.es5Constructor.call(this,e),d.prototype.initModel.call(this,e)}}return(0,a.applyMixins)(d,r.default),Object.assign(d.prototype,{"[Types/_entity/Model]":!0,"[Types/_entity/IStateful]":!0,_moduleName:"Types/entity:Model",_instancePrefix:"model-",_$properties:null,_$keyProperty:"",_isDeleted:!1,_defaultPropertiesValues:null,_propertiesDependency:null,_propertiesDependencyGathering:"",_deepChangedProperties:null,getId:d.prototype.getKey,getIdProperty:d.prototype.getKeyProperty,setIdPro
48perty:d.prototype.setKeyProperty}),t.default=d,d.produceInstance=i.default.produceInstance,t}(0,{},vt,b,ue,u,e,t),Mt=Pt,l.INTERNAL_MODIFY_METHOD=l.RecordCacheMode=l.getValueType=l.isRecord=l.Model=l.Record=l.isInstanceWithMeta=l.InstantiableMixin=l.isCloneable=l.isObservableMixin=l.ObserveSessionMixin=l.VersionableMixin=l.SerializableMixin=l.ReadWriteMixin=l.EventRaisingMixin=l.ObservableMixin=l.OptionsMixin=l.getMergeableProperty=l.OptionsToPropertyMixin=l.FormattableMixin=l.isManyToManyMixin=l.ManyToManyMixin=l.CloneableMixin=l.DestroyableMixin=l.Tree=l.TimeInterval=l.ReactiveObject=l.PromiseCanceledError=l.JSONML=l.Ulid=l.Guid=l.CancelablePromise=l.Time=l.Identity=l.DateTime=l.Date=l.relation=l.functor=l.format=l.compare=l.factory=l.applied=l.adapter=l.descriptor=void 0,l.adapter=bt,l.applied=Je,l.factory=ot,l.compare=ve,l.format=rt,l.functor=ce,l.relation=et,Object.defineProperty(l,"descriptor",{enumerable:!0,get:function(){return U.default}}),Object.defineProperty(l,"Date",{enumerable:!0,get:function(){return Ge.Date}}),Object.defineProperty(l,"DateTime",{enumerable:!0,get:function(){return Ge.DateTime}}),Object.defineProperty(l,"Identity",{enumerable:!0,get:function(){return Ge.Identity}}),Object.defineProperty(l,"Time",{enumerable:!0,get:function(){return Ge.Time}}),Object.defineProperty(l,"CancelablePromise",{enumerable:!0,get:function(){return We.CancelablePromise}}),Object.defineProperty(l,"Guid",{enumerable:!0,get:function(){return We.Guid}}),Object.defineProperty(l,"Ulid",{enumerable:!0,get:function(){return We.Ulid}}),Object.defineProperty(l,"JSONML",{enumerable:!0,get:function(){return We.JSONML}}),Object.defineProperty(l,"PromiseCanceledError",{enumerable:!0,get:function(){return We.PromiseCanceledError}}),Object.defineProperty(l,"ReactiveObject",{enumerable:!0,get:function(){return We.ReactiveObject}}),Object.defineProperty(l,"TimeInterval",{enumerable:!0,get:function(){return We.TimeInterval}}),Object.defineProperty(l,"Tree",{enumerable:!0,get:function(){return tt.Tree}}),Object.defineProperty(l,"DestroyableMixin",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(l,"CloneableMixin",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(l,"ManyToManyMixin",{enumerable:!0,get:function(){return le.default}}),Object.defineProperty(l,"isManyToManyMixin",{enumerable:!0,get:function(){return le.isManyToManyMixin}}),Object.defineProperty(l,"FormattableMixin",{enumerable:!0,get:function(){return Ft.default}}),Object.defineProperty(l,"OptionsToPropertyMixin",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(l,"getMergeableProperty",{enumerable:!0,get:function(){return j.getMergeableProperty}}),Object.defineProperty(l,"OptionsMixin",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(l,"ObservableMixin",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(l,"EventRaisingMixin",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(l,"ReadWriteMixin",{enumerable:!0,get:function(){return fe.default}}),Object.defineProperty(l,"SerializableMixin",{enumerable:!0,get:function(){return q.default}}),Object.defineProperty(l,"VersionableMixin",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(l,"ObserveSessionMixin",{enumerable:!0,get:function(){return w.ObserveSessionMixin}}),Object.defineProperty(l,"isObservableMixin",{enumerable:!0,get:function(){return w.isObservableMixin}}),Object.defineProperty(l,"isCloneable",{enumerable:!0,get:function(){return m.isCloneable}}),Object.defineProperty(l,"InstantiableMixin",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(l,"isInstanceWithMeta",{enumerable:!0,get:function(){return N.isInstanceWithMeta}}),Object.defineProperty(l,"Record",{enumerable:!0,get:function(){return Ot.default}}),Object.defineProperty(l,"Model",{enumerable:!0,get:function(){return Mt.default}}),Object.defineProperty(l,"isRecord",{enumerable:!0,get:function(){return d.isRecord}}),Object.defineProperty(l,"getValueType",{enumerable:!0,get:function(){return wt.getValueType}}),Object.defineProperty(l,"RecordCacheMode",{enumerable:!0,get:function(){return wt.Cac
48heMode}}),Object.defineProperty(l,"INTERNAL_MODIFY_METHOD",{enumerable:!0,get:function(){return Z.INTERNAL_MODIFY_METHOD}}),(0,u.register)("Types/entity:Model",Mt.default,{instantiate:!1}),(0,u.register)("Types/entity:Record",Ot.default,{instantiate:!1}),(0,u.register)("Types/entity:adapter.Cow",bt.Cow,{instantiate:!1}),(0,u.register)("Types/entity:adapter.Json",bt.Json,{instantiate:!1}),(0,u.register)("Types/entity:adapter.RecordSet",bt.RecordSet,{instantiate:!1}),(0,u.register)("Types/entity:adapter.Sbis",bt.Sbis,{instantiate:!1}),(0,u.register)("Types/entity:Date",Je.Date,{instantiate:!1}),(0,u.register)("Types/entity:DateTime",Je.DateTime,{instantiate:!1}),(0,u.register)("Types/entity:Identity",Je.Identity,{instantiate:!1}),(0,u.register)("Types/entity:Time",Je.Time,{instantiate:!1}),(0,u.register)("Types/entity:format.ArrayField",rt.ArrayField,{instantiate:!1}),(0,u.register)("Types/entity:format.BinaryField",rt.BinaryField,{instantiate:!1}),(0,u.register)("Types/entity:format.BooleanField",rt.BooleanField,{instantiate:!1}),(0,u.register)("Types/entity:format.DateField",rt.DateField,{instantiate:!1}),(0,u.register)("Types/entity:format.DateTimeField",rt.DateTimeField,{instantiate:!1}),(0,u.register)("Types/entity:format.DictionaryField",rt.DictionaryField,{instantiate:!1}),(0,u.register)("Types/entity:format.EnumField",rt.EnumField,{instantiate:!1}),(0,u.register)("Types/entity:format.FlagsField",rt.FlagsField,{instantiate:!1}),(0,u.register)("Types/entity:format.HierarchyField",rt.HierarchyField,{instantiate:!1}),(0,u.register)("Types/entity:format.IdentityField",rt.IdentityField,{instantiate:!1}),(0,u.register)("Types/entity:format.IntegerField",rt.IntegerField,{instantiate:!1}),(0,u.register)("Types/entity:format.LinkField",rt.LinkField,{instantiate:!1}),(0,u.register)("Types/entity:format.MoneyField",rt.MoneyField,{instantiate:!1}),(0,u.register)("Types/entity:format.ObjectField",rt.ObjectField,{instantiate:!1}),(0,u.register)("Types/entity:format.RealField",rt.RealField,{instantiate:!1}),(0,u.register)("Types/entity:format.RecordField",rt.RecordField,{instantiate:!1}),(0,u.register)("Types/entity:format.RecordSetField",rt.RecordSetField,{instantiate:!1}),(0,u.register)("Types/entity:format.RpcFileField",rt.RpcFileField,{instantiate:!1}),(0,u.register)("Types/entity:format.StringField",rt.StringField,{instantiate:!1}),(0,u.register)("Types/entity:format.TimeField",rt.TimeField,{instantiate:!1}),(0,u.register)("Types/entity:format.TimeIntervalField",rt.TimeIntervalField,{instantiate:!1}),(0,u.register)("Types/entity:format.UniversalField",rt.UniversalField,{instantiate:!1}),(0,u.register)("Types/entity:format.UuidField",rt.UuidField,{instantiate:!1}),(0,u.register)("Types/entity:format.XmlField",rt.XmlField,{instantiate:!1}),(0,u.register)("entity.model",Mt.default),(0,u.register)("adapter.json",bt.Json),(0,u.register)("adapter.recordset",bt.RecordSet,{instantiate:!1}),(0,u.register)("adapter.sbis",bt.Sbis),l})); 49define("Types/di",["require","exports"],(function(e,t){"use strict";function n(e){if("string"!=typeof e)throw new TypeError("Alias should be a string");if(!e)throw new TypeError("Alias is empty")}function i(e){return n(e),s.has(e)}function r(e,t){let n,r,o;switch(typeof e){case"function":n=e;break;case"object":n=e,r={instantiate:!1};break;default:if(!i(e))throw new ReferenceError(`Alias "${e}" is not registered`);[n,r,o]=s.get(e)}if(r){if(!1===r.instantiate)return n;if(!0===r.single){if(void 0===o){const i=s.get(e);if(i)o=i[2]=new n(t)}return o}}return new n(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.resolve=t.create=t.isInstantiable=t.isRegistered=t.unregister=t.register=void 0;const s=new Map;t.register=function(e,t,i){n(e),s.set(e,[t,i])},t.unregister=function(e){n(e),s.delete(e)},t.isRegistered=i,t.isInstantiable=function(e){if(i(e)){const t=s.get(e)[1];return!1!==(t&&t.instantiate)}},t.create=function(e,t){const n=r(e,t);if("function"==typeof n)return r(n,t);else return n},t.resolve=r})); 50define("Types/formatter",["i18n!Types","WasabyLoader/ModulesLoader","Types/object","Types/guards","Types/di","I18n/i18n","Env/Env","require","exports"],(function(e,t,r,n,o,a,i,u,s){var l,c,f,d,T,_,O,g,M,h,p,L,m,y,H,F,D,S,R,E,Y,N,A,U,b,v,P,w,$,I,j,C,Q,x,W,k,q,z,Z,G,V,J,B,X,K,ee;return Object.defineProperty(s,"__esModule",{value:!0}),l=function(e,t){"use strict";
50return Object.defineProperty(t,"__esModule",{value:!0}),t.iterateNumber=void 0,t.iterateNumber=function(e,t){let r=0;const n=[];for(;e.length>0;){const t=e.substr(Math.max(e.length-3,0),3);if(0!==t.length)n.unshift([t.padStart(3,"0"),r++]);e=e.slice(0,-3)}n.forEach((e=>{t.call(null,...e)}))},t}(0,{}),c=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",Ñ:"e",ж:"j",з:"z",и:"i",й:"j",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",Ñ:"r",Ñ:"s",Ñ:"t",Ñ:"u",Ñ:"f",Ñ
:"h",Ñ:"ts",Ñ:"ch",Ñ:"sh",Ñ:"sch",Ñ:"",Ñ:"y",Ñ:"",Ñ:"e",Ñ:"yu",Ñ:"ya"," ":"_",Ð:"A",Ð:"B",Ð:"V",Ð:"G",Ð:"D",Ð:"E",Ð:"E",Ð:"J",Ð:"Z",Ð:"I",Ð:"J",Ð:"K",Ð:"L",Ð:"M",Ð:"N",Ð:"O",Ð:"P",Ð :"R",С:"S",Т:"T",У:"U",Ф:"F",Ð¥:"H",Ц:"TS",Ч:"CH",Ш:"SH",Щ:"SCH",Ъ:"",Ы:"Y",Ь:"",Ð:"E",Ю:"YU",Я:"YA"};return t.default=function(e){const t=[];for(let n=0,o=e.length;n<o;n++){const o=e[n];t[n]=o in r?r[o]:o}return t.join("")},t}(0,{}),f=c,d=function(e,t){"use strict";var r;return Object.defineProperty(t,"__esModule",{value:!0}),t.DateFormattingStrategyType=void 0,function(e){e.Default="Default",e.Registry="Registry",e.OnlyDate="OnlyDate"}(r||(t.DateFormattingStrategyType=r={})),t}(0,{}),T=d,_=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("number"!=typeof t)return e;const r=e.getTimezoneOffset();if(t===r)return e;const n=new Date(e.getTime());return n.setMinutes(n.getMinutes()+r-t),n.getTimezoneOffset=()=>t,n},t}(0,{}),O=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=/([0-9]{2}:[0-9]{2}:[0-9]{2}(?:\.[0-9]{1,9})?)([+-])([0-9]{2})[:-]*([0-9]{2})*$/;return t.default=function(e,t){let o=e.indexOf("-");const a=e.indexOf(":"),i=e.indexOf("."),u=e.match(n),s=u&&u.index+u[1].length||-1,l=new Date;let c,f,d,T,_=null;if(l.setHours(0,0,0,0),-1===a&&-1===o)return l;if(a>-1&&o>a)o=-1;if(-1!==i){if(c=e.substr(i+1,(-1===s?e.length:s)-(i+1)),c.length>3)c=c.substr(0,3);if(_=parseInt(c,10),c.length<3)_*=2===c.length?10:100}if(-1!==o){if(f=parseInt(e.substr(o-4,4),10),d=parseInt(e.substr(o+1,2),10)-1,T=parseInt(e.substr(o+4,2),10),r.constants.compatibility.dateBug&&0===d&&1===T)l.setHours(1);l.setFullYear(f,d,T)}const O=l.getTimezoneOffset();if(-1!==a){l.setHours(parseInt(e.substr(a-2,2),10),parseInt(e.substr(a+1,2),10),parseInt(e.substr(a+4,2),10),_);let r=t;if(u)r=Number(u[2]+"1")*(60*Number(u[3])+(1*Number(u[4])||0));if(void 0!==r)l.setMinutes(l.getMinutes()-r-O)}return l},t}(0,{},i),g=O,M=function(e,t){"use strict";function r(e,t,r){let n=!1,o=!1;for(const[a,i]of r){if(a===e)n=!0;if(i===t)o=!0}return n&&o}function n(e,t,r){return r.some((r=>r[0]===e&&r[1]===t))}function o(e){const t=e.getMonth();if(1===t&&(r=e.getFullYear(),29===new Date(r,1,29).getDate()))return 29===e.getDate();else return e.getDate()===f[t];var r}Object.defineProperty(t,"__esModule",{value:!0});const a=0,i=5,u=6,s=11,l=[[a,i],[u,s]],c=[[a,2],[3,i],[u,8],[9,s]],f=[31,28,31,30,31,30,31,31,30,31,30,31];return t.default=function(e,t){if(function(e,t){return 1===e.getDate()&&o(t)}(e,t)){const o=e.getFullYear(),i=t.getFullYear(),u=e.getMonth(),f=t.getMonth();if(function(e,t){return e===a&&t===s}(u,f))return o===i?"oneYear":"years";if(r(u,f,l))return function(e,t,r,o){if(r===o&&n(e,t,l))return"oneHalfYear";else return"halfYearsYears"}(u,f,o,i);if(r(u,f,c))return function(e,t,r,o){if(r===o)return n(e,t,c)?"oneQuarter":"quartersOneYear";else return"quartersYears"}(u,f,o,i);else return function(e,t,r,n){if(r===n)return e===t?"oneMonth":"monthsOneYear";else return"monthsYears"}(u,f,o,i)}return function(e,t){if(e.getFullYear()===t.getFullYear()){if(e.getMonth()===t.getMonth())if(e.getDate()===t.getDate())return"oneDay";else return"daysOneMonth";return"daysMonthsOneYear"}return"daysMonthsYears"}(e,t)},t}(0,{}),h=M,p=function(e,t,r){"use strict";function n(e){const t=new Map;return function(n,o){if(""===n&&(!this||1===Object.keys(this).length))t.clear();let a;if(!(o&&"object"==typeof o)||Array.isArray(o)||(0,r.isPlainObject)(o)){if(e&&"function"==typeof o){const t=e.size;return a={$serialized$:"function",id:t},e.set(t,o),a}if(o===1/0)a={$serialized$:"+inf"};else if(o===-1/0)a={$serialized$:"-inf"};else if(void 0===o)a={$serialized$:"undef"};else if(Number.isNaN(o))a={$serialized$:"NaN"};else a=function(e,t){if(e&&"object"==typeof e&&"inst"===e.$serialized$&&e.hasOwnProperty("id")){const r=e.id;if(t.has(r))return{$serialized$:"link",id:r};else t.set(r,e)}return e}(o,t);return a}}}
50return Object.defineProperty(t,"__esModule",{value:!0}),t.getReplacerWithStorage=void 0,t.getReplacerWithStorage=n,t.default=n(),t}(0,{},r),L=p,m=function(e,t,r,n){"use strict";function o(e,t=n.loadSync){let o;if(!1===(0,r.isInstantiable)(e))o=(0,r.resolve)(e);if(!o)if(o=t(e),!o)throw new ReferenceError(`The module "${e}" is not loaded yet. Please make sure it's included into application dependencies.`);return o}function a(e,t){for(let r=0;r<e.length;r++){const n=e[r];let a=null;if(t.has(n.value.id))a=t.get(n.value.id);else if(n.value.module){const e=n.value.module,r=o(e);if(!r)throw new Error(`The module "${e}" is not loaded yet.`);if(!r.prototype)throw new Error(`The module "${e}" is not a constructor.`);if("function"!=typeof r.fromJSON&&"function"!=typeof r.prototype.fromJSON)throw new Error(`The module "${e}" doesn't have fromJSON() method.`);a=r.fromJSON?r.fromJSON(n.value):r.prototype.fromJSON.call(r,n.value),t.set(n.value.id,a)}n.scope[n.name]=n.value=a}}function i(e=s,t){let r=[],n=[],i=[],l=new Map;return function(s,c){let f=c;if(c instanceof Object&&c.hasOwnProperty("$serialized$"))switch(c.$serialized$){case"inst":n.push({scope:this,name:s,value:c}),i.push(c.id);break;case"link":r.push({scope:this,name:s,value:c});break;case"func":if(f=o(c.module+(c.path?":"+c.path:"")),"function"!=typeof f)throw new Error(`Cannot resolve function "${s}".`);break;case"function":if(!t)throw new ReferenceError("Functions storage is required to restore function");const e=c.id;if(!t.has(e))throw new ReferenceError(`Functions storage doesn't contain function with id "${e}"`);f=t.get(e);break;case"+inf":f=1/0;break;case"-inf":f=-1/0;break;case"undef":f=void 0;break;case"NaN":f=NaN;break;default:throw new Error(`Unknown serialized type "${c.$serialized$}" detected`)}if(e.resolveDates&&"string"==typeof f&&u.test(f))f=new Date(f);if(""===s&&(!this||1===Object.keys(this).length)){try{!function(e,t,r){for(let n=0;n<e.length;n++){const o=e[n];if(o.linkResolved)continue;const a=r.indexOf(o.value.id);if(-1===a)throw new Error("Can't resolve link for property \""+o.name+'" with instance id "'+o.value.id+'".');const i=t[a];if(o.scope[o.name]=o.value=i.value,o.linkResolved=!0,!i.instanceResolved)t.splice(1+a,0,o),r.splice(1+a,0,o.value.id)}}(r,n,i),a(n,l)}finally{r=[],n=[],i=[],l=new Map}if(this&&f===c)f=this[s]}return f}}Object.defineProperty(t,"__esModule",{value:!0}),t.getReviverWithStorage=t.resolveInstances=void 0;const u=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:[0-9\.]+Z$/,s={resolveDates:!0};return t.resolveInstances=a,t.getReviverWithStorage=i,t.default=i(),t}(0,{},o,t),y=m,H=function(e,t,r,n){"use strict";function o(e,t){if(e.hasOwnProperty("minimumSignificantDigits")||e.hasOwnProperty("maximumSignificantDigits"))return function(e,t,r,n){const o=e;let i=o.toString();const[u,s=""]=i.split("."),l=u.length+s.length;if(l>=t&&l<=r)return i;if(l<t)return o.toFixed(t-u.length);const c=l-r;if(s.length>=c)return a(o,r-u.length,n);const f=c-s.length;return i=a(o/Math.pow(10,f),0,n),i.padEnd(u.length,"0")}(t,e.minimumSignificantDigits||1,e.maximumSignificantDigits||21,e.roundingMode);else return function(e,t,r,n,o){const i=e;let u=i.toString();const[s,l=""]=u.split(".");if(l.length<r)u=i.toFixed(r);if(l.length>n)u=a(i,n,o);if(s.length<t){const[e,r=""]=u.split(".");return`${e.padStart(t,"0")}${r?"."+r:""}`}return u}(t,e.minimumIntegerDigits,e.minimumFractionDigits,e.maximumFractionDigits,e.roundingMode)}function a(e,t,r){switch(r){case l.Trunc:const r=e.toString(),[n,o=""]=r.split(".");if(0===t)return n;else return`${n}${o?"."+o.substring(0,t):""}`;case l.HalfExpand:default:const a=Math.pow(10,t),i=e*a+Number.EPSILON;return(Math.round(i)/a).toFixed(t)}}var i,u,s,l;Object.defineProperty(t,"__esModule",{value:!0}),t.RoundingMode=t.CompactDisplayMode=t.CompactNotationMode=t.NotationMode=void 0;const c=()=>r.controller.currentLocaleConfig;!function(e){e.Standard="standard",e.Compact="compact"}(i||(t.NotationMode=i={})),function(e){e.Thousands="thousands",e.Millions="millions",e.Billions="billions",e.Trillion="trillion",e.Adaptive="adaptive"}(u||(t.CompactNotationMode=u={})),function(e){e.Short="short",e.Long="long",e.SuperShort="superShort"}(s||(t.CompactDisplayMode=s={}));const f=[u.Thousands,u.Millions,u.Billions,u.Trillion],d={thousands:{long:"ÑÑÑÑÑа",short:"ÑÑÑ",superShort:"к",class:1e3},millions:{long:"миллион",short:"млн",superShort:"м",class:1e6},billions:{long:"миллиаÑд",short:"млÑд",superShort:"г",class:1e9},trillion:{long:"ÑÑиллион",short:"ÑÑлн",superShort:"Ñ",class:1e12}},T={decimal:{positivePattern:"{number}",negativePattern:"{minusSign}{number}"},percent:{positivePattern:"{number} {percentSign}",negativePattern:"{minusSign}{number} {percentSign}"}},_={get NAN(){return n("nan")},PLUS_SIGN:"+",MINUS_SIGN:"-",PERCENT_SIGN:"%",INFINITY:"â"};return function(e){e.Trunc="trunc",e.HalfExpand="halfExpand"}(l||(t.RoundingMode=l={})),t.default=function(e,t){const r=function(e){return{style:"decimal",useGrouping:!0,minimumIntegerDigits:1,minimumFractionDigits:0,maximumFractionDigits:3,roundingMode:l.HalfExpand,fractionSeparator:c().number.fractionSeparator,groupSeparator:c().number.triadDelimiter,...e||{}}}(t);let a=e;if((null==r?void 0:r.notation)===i.Compact){const t=function(e,t=u.Adaptive,r=s.Short){let n;if(t!==u.Adaptive)n=d[t];else for(const t of f)if(!(Math.abs(e)>=d[t].class))break;else n=d[t];if(n)return{postfix:n[r],class:n.class}}(e,r.compactNotation,r.compactDisplay);if(t){a/=t.class;const e=r.postfix?` ${r.postfix}`:"",o=n(t.postfix,a);r.postfix=`${o}${e}`}}const O=function(e,t){const r=e.style||"decimal";let n;if(!isNaN(t)&&t<0)t=-t,n=T[r].negativePattern;else n=T[r].positivePattern;const a=[];let i=n.indexOf("{",0),u=0,s=0;const l=n.length;for(;i>-1&&i<l;){if(u=n.indexOf("}",i),-1===u)throw new Error;if(i>s){const e=n.substring(s,i);a.push({type:"literal",value:e})}const r=n.substring(i+1,u);if("number"===r)if(isNaN(t)){const e=_.NAN;a.push({type:"nan",value:e})}else if(!isFinite(t)){const e=_.INFINITY;a.push({type:"infinity",value:e})}else{if("percent"===e.style)t*=100;const r=o(e,t);let n,i;const u=r.indexOf(".",0);if(u>0)n=r.substring(0,u),i=r.substring(u+1);else n=r,i=void 0;if(!0===e.useGrouping){const t=e.groupSeparator,r=[];if(n.length>3){const e=n.length-3;let t=e%3;const o=n.slice(0,t);if(o.length)r.push(o);for(;t<e;)r.push(n.slice(t,t+3)),t+=3;r.push(n.slice(e))}else r.push(n);if(0===r.length)throw new Error("group is empty");for(;r.length;){const e=r.shift();if(a.push({type:"integer",value:e}),r.length)a.push({type:"group",value:t})}}else a.push({type:"integer",value:n});if(void 0!==i){const t=e.fractionSeparator;a.push({type:"decimal",value:t}),a.push({type:"fraction",value:i})}}else if("plusSign"===r){const e=_.PLUS_SIGN;a.push({type:"plusSign",value:e})}else if("minusSign"===r){const e=_.MINUS_SIGN;a.push({type:"minusSign",value:e})}else if("percentSign"===r&&"percent"===e.style){const e=_.PERCENT_SIGN;a.push({type:"literal",value:e})}else{const e=n.substring(i,u);a.push({type:"literal",value:e})}s=u+1,i=n.indexOf("{",s)}if(s<l){const e=n.substring(s,l);a.push({type:"literal",value:e})}return a}(r,a);let g="";for(let e=0;O.length>e;e++){g+=O[e].value}if(r.postfix)return`${g} ${r.postfix}`;else return g},t}(0,{},a,e),F=H,D=function(e,t){"use strict";
50Object.defineProperty(t,"__esModule",{value:!0});const r={M:1e3,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1};return t.default=function(e){let t="";for(const n of Object.keys(r))if(r.hasOwnProperty(n))for(;e>=r[n];)t+=n,e-=r[n];return t},t}(0,{}),S=D,R=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultShortWithoutYearFormats=t.DefaultFullWithoutYearFormats=t.DefaultShortFormats=t.DefaultFullFormats=void 0;class n{static get quartersOneYearsTemplate(){return r.controller.currentLocaleConfig.calendarEntities.manyQuarter}static get openStartPeriodTemplate(){return r.controller.currentLocaleConfig.calendarEntities.openStartPeriod}static get openFinishPeriodTemplate(){return r.controller.currentLocaleConfig.calendarEntities.openFinishPeriod}static get allPeriod(){return r.controller.currentLocaleConfig.calendarEntities.allPeriod}static get today(){return r.controller.currentLocaleConfig.calendarEntities.today}}t.DefaultFullFormats=n,n.oneDay=["FULL_DATE_FULL_MONTH"],n.daysOneMonth=["FULL_DATE","FULL_DATE"],n.daysMonthsOneYear=["FULL_DATE","FULL_DATE"],n.daysMonthsYears=["FULL_DATE","FULL_DATE"],n.oneMonth=["FULL_MONTH"],n.monthsOneYear=["MONTH","FULL_MONTH"],n.monthsYears=["FULL_MONTH","FULL_MONTH"],n.oneQuarter=["FULL_QUARTER"],n.quartersOneYear=["QUARTER","FULL_QUARTER"],n.quartersYears=["FULL_QUARTER","FULL_QUARTER"],n.oneHalfYear=["FULL_HALF_YEAR"],n.halfYearsYears=["FULL_HALF_YEAR","FULL_HALF_YEAR"],n.oneYear=["FULL_YEAR"],n.years=["FULL_YEAR","FULL_YEAR"],n.openStartPeriod="FULL_DATE_FULL_MONTH",n.openFinishPeriod="FULL_DATE_FULL_MONTH";class o{static get quartersOneYearsTemplate(){return r.controller.currentLocaleConfig.calendarEntities.shortQuarter}static get openStartPeriodTemplate(){return r.controller.currentLocaleConfig.calendarEntities.openStartPeriod}static get openFinishPeriodTemplate(){return r.controller.currentLocaleConfig.calendarEntities.openFinishPeriod}static get allPeriod(){return r.controller.currentLocaleConfig.calendarEntities.allPeriod}static get today(){return r.controller.currentLocaleConfig.calendarEntities.today}}t.DefaultShortFormats=o,o.oneDay=["FULL_DATE_SHORT_MONTH"],o.daysOneMonth=["FULL_DATE","FULL_DATE"],o.daysMonthsOneYear=["FULL_DATE","FULL_DATE"],o.daysMonthsYears=["FULL_DATE","FULL_DATE"],o.oneMonth=["SHORT_MONTH"],o.monthsOneYear=["SHR_MONTH","SHORT_MONTH"],o.monthsYears=["SHORT_MONTH","SHORT_MONTH"],o.oneQuarter=["SHORT_QUARTER"],o.quartersOneYear=["QUARTER","SHORT_QUARTER"],o.quartersYears=["SHORT_QUARTER","SHORT_QUARTER"],o.oneHalfYear=["SHORT_HALF_YEAR"],o.halfYearsYears=["SHORT_HALF_YEAR","SHORT_HALF_YEAR"],o.oneYear=["FULL_YEAR"],o.years=["FULL_YEAR","FULL_YEAR"],o.openStartPeriod="FULL_DATE_SHORT_MONTH",o.openFinishPeriod="FULL_DATE_SHORT_MONTH";class a extends n{}t.DefaultFullWithoutYearFormats=a,a.oneDay=["SHORT_DATE_FULL_MONTH"],a.oneMonth=["MONTH"],a.monthsOneYear=["MONTH","MONTH"],a.oneQuarter=["ONLY_QUARTER"],a.quartersOneYear=["QUARTER","ONLY_QUARTER"],a.oneHalfYear=["ONLY_HALF_YEAR"],a.openStartPeriod="SHORT_DATE_FULL_MONTH",a.openFinishPeriod="SHORT_DATE_FULL_MONTH";class i extends o{}t.DefaultShortWithoutYearFormats=i,i.oneDay=["SHORT_DATE_SHORT_MONTH"],i.oneMonth=["SHR_MONTH"],i.monthsOneYear=["SHR_MONTH","SHR_MONTH"],i.oneQuarter=["ONLY_SHORT_QUARTER"],i.quartersOneYear=["QUARTER","ONLY_SHORT_QUARTER"],i.oneHalfYear=["ONLY_SHORT_HALF_YEAR"],i.openStartPeriod="SHORT_DATE_SHORT_MONTH",i.openFinishPeriod="SHORT_DATE_SHORT_MONTH";const u={full:n,short:o,fullWithoutYear:a,shortWithoutYear:i};return t.default=u,t}(0,{},a),E=function(e,t){"use strict";var r,n;return Object.defineProperty(t,"__esModule",{value:!0}),t.PeriodType=t.ConfigurationType=void 0,function(e){e.Default="Default",e.Text="Text",e.Accounting="Accounting"}(r||(t.ConfigurationType=r={})),function(e){e.oneDay="oneDay",e.daysOneMonth="daysOneMonth",e.daysMonthsOneYear="daysMonthsOneYear",e.daysMonthsYears="daysMonthsYears",e.oneMonth="oneMonth",e.monthsOneYear="monthsOneYear",e.monthsYears="monthsYears",e.oneQuarter="oneQuarter",e.quartersOneYear="quartersOneYear",e.quartersOneYearsTemplate="quartersOneYearsTemplate",e.quartersYears="quartersYears",e.oneHalfYear="oneHalfYear",e.halfYearsYears="halfYearsYears",e.oneYear="oneYear",e.years="years",e.openStartPeriod="openStartPeriod",e.openStartPeriodTemplate="openStartPeriodTemplate",e.openFinishPeriod="openFinishPeriod",e.openFinishPeriodTemplate="openFinishPeriodTemplate",e.allPeriod="allPeriod",e.today="today"}(n||(t.PeriodType=n={})),t}(0,{}),Y=E,N=function(e,t,r){"use strict";function n(e){return"function"==typeof e}function o(e,t){return t+e.substr(0,1).toUpperCase()+e.substr(1)}function a(e,t="."){if(Array.isArray(e))return[...e];if(!e)return[];else return e.split(t)}function i(e,t,o={}){const i=n(o)?o:null==o?void 0:o.onElementResolve,u=a(t,!n(o)?o.delimiter:void 0);let s=e;for(let e=0;e<u.length;e++){if(null==s)return;const t=u[e];if((0,r.isIObject)(s)&&s.has(t))s=s.get(t);else if("_options"!==t||s[t]){if(i)i(t,s,e);s=s[t]}}return s}
50return Object.defineProperty(t,"__esModule",{value:!0}),t.hasValue=t.extractValue=t.implantValue=t.setPropertyValue=t.getPropertyValue=void 0,t.getPropertyValue=function(e,t){if(!e||"object"!=typeof e)return;const n=e,a=t||"";if(a in e)return n[a];if((0,r.isIObject)(e))return e.get(a);const i=n[o(a,"get")];if("function"==typeof i&&!i.deprecated)return i.call(e);else return},t.setPropertyValue=function(e,t,n){if(!e||"object"!=typeof e)throw new TypeError("Argument object should be an instance of Object");const a=e,i=t||"";if(i in e)return void(a[i]=n);if((0,r.isIObject)(a)&&a.has(i))return void a.set(i,n);const u=a[o(i,"set")];if("function"!=typeof u||u.deprecated)throw new ReferenceError(`Object doesn't have setter for property "${t}"`);else u.call(e,n)},t.implantValue=function(e,t,n,o={}){const u=a(t,o.delimiter),s=u.pop(),l=i(e,u,o);if(l){const e=null!=s?s:"undefined";if((0,r.isIObject)(l))l.set(e,n);else l[e]=n;return!0}return!1},t.extractValue=i,t.hasValue=function(e,t,n={}){const o=a(t,n.delimiter),u=o.pop(),s=i(e,o,n);if(s){const e=null!=u?u:"undefined";if((0,r.isIObject)(s))return s.has(e);else{return void 0!==s[e]}}return!1},t}(0,{},n),A=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=void 0;const n=/:[0-9]+:[0-9]+/,o={};class a{log(e,t){if(1===arguments.length)t=e,e="Log";r.IoC.resolve("ILogger").log(e,t||"")}error(e,t){if(1===arguments.length)t=e,e="Critical";if(t instanceof Error)r.IoC.resolve("ILogger").error(e,t.message,t);else r.IoC.resolve("ILogger").error(e,t||"")}info(e,t){if(1===arguments.length)t=e,e="Warning";r.IoC.resolve("ILogger").warn(e,t||"")}stack(e,t,n){t=t||0,n=n||"info";const a=new Error(e),i=this._getStack(a,t),u=e+i||"";if(!o.hasOwnProperty(u))o[u]=!0,r.IoC.resolve("ILogger")[n](a.message,i)}stackToCloud(e,t,n){n=n||"info";const a=new Error(e),i=this._getStack(a,t),u=e+i||"";if(!o.hasOwnProperty(u))if(o[u]=!0,void 0!==(null===window||void 0===window?void 0:window.wsErrorMonitor))window.wsErrorMonitor.onError(new ErrorEvent("ERROR STACK LOG",{message:[e,i].join("\n")}));else r.IoC.resolve("ILogger")[n](a.message,i)}_getStack(e,t){let r=2+(t=t||0),o="";if("stack"in e){const t=String(e.stack).split("\n");if(t[0]&&!n.test(t[0]))r++;o=t.slice(r).join("\n").trim()}return o}}t.Logger=a;const i=new a;return t.default=i,t}(0,{},i),U=function(e,t,r,n){"use strict";function o(e,t){if(1==t.value&&e.value<100)return e;else if(t.value<100&&t.value>e.value)return{title:`${t.title}-${e.title}`,value:t.value+e.value};else if(t.value>=100&&t.value>e.value)return{title:`${t.title} and ${e.title}`,value:t.value+e.value};return{title:`${t.title} ${e.title}`,value:t.value+e.value}}Object.defineProperty(t,"__esModule",{value:!0});const a=["zero","one","two","three","four","five","six","seven","eight","nine"],i=["ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"],u={2:"twenty",3:"thirty",4:"forty",5:"fifty",6:"sixty",7:"seventy",8:"eighty",9:"ninety"},s=["","ÑÑÑÑÑа","миллион","миллиаÑд","ÑÑиллион","квадÑиллион","квинÑиллион","ÑикÑÑиллион","ÑепÑиллион","окÑиллион","нониллион","деÑиллион"];return t.default=function e(t){if("-"===t[0])return"minus "+e(t.slice(1));const l=[];return(0,r.iterateNumber)(t,((e,t)=>{const r=[];if("0"!==e[0])r.push({title:`${a[e[0]]} hundred`,value:100*e[0]});if(e[1]>1)r.push({title:u[e[1]],value:10*e[1]});if(1==e[1])r.push({title:i[e[2]],value:+e.slice(1)});else if(e[2]>0||0==+e&&0===l.length)r.push({title:a[e[2]],value:+e[2]});if(r.length>0){let a=r.reduceRight(o).title;if(t>0&&0!=+e)a+=" "+n(s[t],+e);l.push(a)}})),l.join(", ")},t}(0,{},l,e),b=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o={0:"нолÑ",1:"один",2:"два",3:"ÑÑи",4:"ÑеÑÑÑе",5:"пÑÑÑ",6:"ÑеÑÑÑ",7:"ÑемÑ",8:"воÑемÑ",9:"девÑÑÑ"},a={0:"нолÑ",1:"одна",2:"две",3:"ÑÑи",4:"ÑеÑÑÑе",5:"пÑÑÑ",6:"ÑеÑÑÑ",7:"ÑемÑ",8:"воÑемÑ",9:"девÑÑÑ"},i={0:"деÑÑÑÑ",1:"одиннадÑаÑÑ",2:"двенадÑаÑÑ",3:"ÑÑинадÑаÑÑ",4:"ÑеÑÑÑнадÑаÑÑ",5:"пÑÑнадÑаÑÑ",6:"ÑеÑÑнадÑаÑÑ",7:"ÑемнадÑаÑÑ",8:"воÑемнадÑаÑÑ",9:"девÑÑнадÑаÑÑ"},u={2:"двадÑаÑÑ",3:"ÑÑидÑаÑÑ",4:"ÑоÑок",5:"пÑÑÑдеÑÑÑ",6:"ÑеÑÑÑдеÑÑÑ",7:"ÑемÑдеÑÑÑ",8:"воÑемÑдеÑÑÑ",9:"девÑноÑÑо"},s={0:"",1:"ÑÑо",2:"двеÑÑи",3:"ÑÑиÑÑа",4:"ÑеÑÑÑеÑÑа",5:"пÑÑÑÑоÑ",6:"ÑеÑÑÑÑоÑ",7:"ÑемÑÑоÑ",8:"воÑемÑÑоÑ",9:"девÑÑÑÑоÑ"},l=["","ÑÑÑÑÑа","миллион","миллиаÑд","ÑÑиллион","квадÑиллион","квинÑиллион","ÑикÑÑиллион","ÑепÑиллион","окÑиллион","нониллион","деÑиллион"];return t.default=function e(t,c=!1){if("-"===t[0])return"минÑÑ "+e(t.slice(1));const f=[];return(0,r.iterateNumber)(t,((e,t)=>
50{if("0"!==e[0])f.push(s[e[0]]);if(e[1]>1)f.push(u[e[1]]);if(1==e[1])f.push(i[e[2]]);else if(e[2]>0||0==+e&&0===f.length){const r=1===t||c?a:o;f.push(r[e[2]])}if(t>0&&0!=+e)f.push(n(l[t],+e))})),f.join(" ")},t}(0,{},l,e),v=function(e,t,r,n){"use strict";function o(e,t){const n=t.getFullYear()===e.getFullYear(),o=new Date(t.getTime());if(e.getTime()>t.getTime()){if(o.setMonth(t.getMonth()+2),o.getTime()>e.getTime())return r.controller.currentLocaleConfig.date.SHORT_DATE_SHORT_MONTH}else{const a=n?6:4;if(o.setMonth(t.getMonth()-a),o.getTime()<e.getTime())return r.controller.currentLocaleConfig.date.SHORT_DATE_SHORT_MONTH}return r.controller.currentLocaleConfig.date.FULL_DATE}function a(e,t){return t.getDate()===e.getDate()&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()}Object.defineProperty(t,"__esModule",{value:!0});const i={Registry:(e,t)=>{const i=(0,n.default)(t.currentDate||new Date,t.timeZoneOffset);if(a(e,i))return r.controller.currentLocaleConfig.date.SHORT_TIME;else return o(e,i)},OnlyDate:(e,t)=>{const i=(0,n.default)(t.currentDate||new Date,t.timeZoneOffset);if(a(e,i))return r.controller.currentLocaleConfig.date.SHORT_DATE_SHORT_MONTH;else return o(e,i)},Default:()=>r.controller.currentLocaleConfig.date.FULL_DATE};return t.default=i,t}(0,{},a,_),P=function(e,t,r,n){"use strict";function o(e,t){const n=r.controller.currentLocaleConfig;switch(t){case i.Short:return n.money.shortCurrency;case i.SuperShort:return n.money.superShortCurrency;case i.Symbol:return n.money.symbol;case i.Full:return n.plural(e,...n.money.currency)}}function a(e,t){if(e.startsWith("00"))return t?"00":"";else return e}var i,u;Object.defineProperty(t,"__esModule",{value:!0}),t.DisplayMode=t.CurrencyName=void 0,function(e){e[e.SuperShort=0]="SuperShort",e[e.Short=1]="Short",e[e.Full=2]="Full",e[e.Symbol=3]="Symbol"}(i||(t.CurrencyName=i={})),function(e){e[e.Numeric=0]="Numeric",e[e.Literal=1]="Literal"}(u||(t.DisplayMode=u={}));const s={currencyName:i.Short,subunit:u.Numeric,showEmptySubunit:!0};return t.default=function(e,t){const l=t?{...s,...t}:s;if(l.currencyName===i.Symbol)l.subunit=u.Numeric;const[c,f]=function(e){return(0,n.default)(e,{maximumFractionDigits:2,minimumFractionDigits:2})}(e).split(".");switch(l.subunit){case u.Numeric:{const t=o(e,l.currencyName),n=r.controller.currentLocaleConfig.number.fractionSeparator,i=a(f,l.showEmptySubunit);if(!i)return`${c} ${t}`;else return`${c}${n}${i} ${t}`}case u.Literal:{const t=Math.trunc(e),u=o(t,l.currencyName),s=(0,n.default)(t),c=a(f,l.showEmptySubunit);if(!c)return`${s} ${u}`;return`${s} ${u} ${c} ${function(e,t){const n=r.controller.currentLocaleConfig;switch(t){case i.Short:return n.money.shortSubunit;case i.SuperShort:return n.money.superShortSubunit;case i.Full:return n.plural(e,...n.money.subunit)}}(+c,l.currencyName)}`}}},t}(0,{},a,H),w=P,$=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccountingShortWithoutYearFormats=t.AccountingFullWithoutYearFormats=t.AccountingShortFormats=t.AccountingFullFormats=void 0;class n extends r.DefaultFullFormats{}t.AccountingFullFormats=n,n.oneQuarter=["MONTH","FULL_MONTH"],n.quartersOneYear=["MONTH","FULL_MONTH"],n.quartersYears=["FULL_MONTH","FULL_MONTH"],n.oneHalfYear=["MONTH","FULL_MONTH"],n.halfYearsYears=["FULL_MONTH","FULL_MONTH"];class o extends r.DefaultShortFormats{}t.AccountingShortFormats=o,o.oneQuarter=["SHR_MONTH","SHORT_MONTH"],o.quartersOneYear=["SHR_MONTH","SHORT_MONTH"],o.quartersYears=["SHORT_MONTH","SHORT_MONTH"],o.oneHalfYear=["SHR_MONTH","SHORT_MONTH"],o.halfYearsYears=["SHORT_MONTH","SHORT_MONTH"];class a extends r.DefaultFullWithoutYearFormats{}t.AccountingFullWithoutYearFormats=a,a.oneQuarter=["MONTH","MONTH"],a.quartersOneYear=["MONTH","MONTH"],a.quartersYears=["FULL_MONTH","FULL_MONTH"],a.oneHalfYear=["MONTH","MONTH"],a.halfYearsYears=["FULL_MONTH","FULL_MONTH"];class i extends r.DefaultShortWithoutYearFormats{}t.AccountingShortWithoutYearFormats=i,i.oneQuarter=["SHR_MONTH","SHR_MONTH"],i.quartersOneYear=["SHR_MONTH","SHR_MONTH"],i.quartersYears=["SHORT_MONTH","SHORT_MONTH"],i.oneHalfYear=["SHR_MONTH","SHR_MONTH"],i.halfYearsYears=["SHORT_MONTH","SHORT_MONTH"];const u={full:n,short:o,fullWithoutYear:a,shortWithoutYear:i};return t.default=u,t}(0,{},R),I=function(e,t,r){"use strict";
50Object.defineProperty(t,"__esModule",{value:!0}),t.TextShortWithoutYearFormats=t.TextFullWithoutYearFormats=t.TextShortFormats=t.TextFullFormats=void 0;class n extends r.DefaultFullFormats{}t.TextFullFormats=n,n.oneDay=["FULL_DATE_FULL_MONTH"],n.daysOneMonth=["DAY","FULL_DATE_FULL_MONTH"],n.daysMonthsOneYear=["SHORT_DATE_FULL_MONTH","FULL_DATE_FULL_MONTH"],n.daysMonthsYears=["FULL_DATE_FULL_MONTH","FULL_DATE_FULL_MONTH"],n.oneQuarter=["MONTH","FULL_MONTH"],n.quartersOneYear=["MONTH","FULL_MONTH"],n.quartersYears=["FULL_MONTH","FULL_MONTH"],n.oneHalfYear=["MONTH","FULL_MONTH"],n.halfYearsYears=["FULL_MONTH","FULL_MONTH"];class o extends r.DefaultShortFormats{}t.TextShortFormats=o,o.oneDay=["FULL_DATE_SHORT_MONTH"],o.daysOneMonth=["DAY","FULL_DATE_SHORT_MONTH"],o.daysMonthsOneYear=["SHORT_DATE_SHORT_MONTH","FULL_DATE_SHORT_MONTH"],o.daysMonthsYears=["FULL_DATE_SHORT_MONTH","FULL_DATE_SHORT_MONTH"],o.oneQuarter=["SHR_MONTH","SHORT_MONTH"],o.quartersOneYear=["SHR_MONTH","SHORT_MONTH"],o.quartersYears=["SHORT_MONTH","SHORT_MONTH"],o.oneHalfYear=["SHR_MONTH","SHORT_MONTH"],o.halfYearsYears=["SHORT_MONTH","SHORT_MONTH"];class a extends r.DefaultFullWithoutYearFormats{}t.TextFullWithoutYearFormats=a,a.daysOneMonth=["DAY","SHORT_DATE_FULL_MONTH"],a.daysMonthsOneYear=["SHORT_DATE_FULL_MONTH","SHORT_DATE_FULL_MONTH"],a.daysMonthsYears=["FULL_DATE_FULL_MONTH","FULL_DATE_FULL_MONTH"],a.oneQuarter=["MONTH","MONTH"],a.quartersOneYear=["MONTH","MONTH"],a.quartersYears=["FULL_MONTH","FULL_MONTH"],a.oneHalfYear=["MONTH","MONTH"],a.halfYearsYears=["FULL_MONTH","FULL_MONTH"];class i extends r.DefaultShortWithoutYearFormats{}t.TextShortWithoutYearFormats=i,i.daysOneMonth=["DAY","SHORT_DATE_SHORT_MONTH"],i.daysMonthsOneYear=["SHORT_DATE_SHORT_MONTH","SHORT_DATE_SHORT_MONTH"],i.daysMonthsYears=["FULL_DATE_SHORT_MONTH","FULL_DATE_SHORT_MONTH"],i.oneQuarter=["SHR_MONTH","SHR_MONTH"],i.quartersOneYear=["SHR_MONTH","SHR_MONTH"],i.quartersYears=["SHORT_MONTH","SHORT_MONTH"],i.oneHalfYear=["SHR_MONTH","SHR_MONTH"],i.halfYearsYears=["SHORT_MONTH","SHORT_MONTH"];const u={full:n,short:o,fullWithoutYear:a,shortWithoutYear:i};return t.default=u,t}(0,{},R),j=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TemplateBuilder=void 0;const o=/\$\{([^}]*)\}/g,a=/%([A-Za-z_$][\w$.\[\]0-9]*)%/g;class i{constructor(e){this._tokenMatcher=o,this._template=e}useCurly(){return this._tokenMatcher=o,this}usePercent(){return this._tokenMatcher=a,this}scope(e){return this._scope=e,this._transformer=(0,n.isRecord)(e)?t=>function(e,t){var n;const o=e.split(".");if(!Array.isArray(o)||!o.length)return"";try{return null!==(n=(0,r.extractValue)(t,o))&&void 0!==n?n:""}catch(t){const r=t;throw r.message=`Unable to read value "${e}": ${r.message}`,r}}(t,e):t=>function(e,t){if(t&&/^[-_$A-z][0-9-_$A-z]*$/.test(e)){if(!(e in t))throw new ReferenceError(`${e} is not defined`);return t[e]}let r,n;try{r=t?Object.keys(t):[],n=new Function(r.join(", "),`return ${e};`)}catch(t){const r=t;throw r.message=`Unable to compile expression "${e}": ${r.message}`,r}try{const e=r.map((e=>t[e]));return n.apply(null,e)}catch(t){const r=t;throw r.message=`Unable to evaluate expression "${e}": ${r.message}`,r}}(t,e),this}render(){if(!this._scope)throw new Error("Template scope not set");return this._template.replace(this._tokenMatcher,((e,t)=>this._transformer(t)))}}return t.TemplateBuilder=i,t.default=function(e,t){return new i(e).useCurly().scope(t).render()},t}(0,{},N,n),C=j,Q=function(e,t,r,n){"use strict";function o(e){const t=e.startDate,r=e.finishDate;let n=0;if(t.getFullYear()===r.getFullYear())return n;const o=r.getFullYear()-t.getFullYear();if(o>1)n+=o-1,t.setFullYear(r.getFullYear()-1);if(t.getMonth()>r.getMonth())return n;if(t.getMonth()===r.getMonth()&&t.getDate()>r.getDate())return n;else return n++,t.setFullYear(r.getFullYear()),n}function a(e){let t=e.displayedUnits.years?0:12*o(e);const r=e.startDate,n=e.finishDate;if(function(e,t){return e.getMonth()===t.getMonth()}(r,n)&&s(r,n))return t;let a;if(s(r,n))a=n.getMonth()-r.getMonth();else a=12-(r.getMonth()-n.getMonth());if(a>1)t+=a-1,u(r,n.getFullYear(),n.getMonth()-1);if(r.getDate()>n.getDate())return t;else return t++,u(r,n.getFullYear(),n.getMonth()),t}function i(e,t){return Math.abs(t.getTime()-e.getTime())}function u(e,t,r){const n=e.getDate();e.setDate(1),e.setFullYear(t),e.setMonth(r);const o=new Date(e.getFullYear(),e.getMonth()+1,0).getDate();e.setDate(Math.min(n,o))}function s(e,t){return e.getFullYear()===t.getFullYear()}var l,c;
50Object.defineProperty(t,"__esModule",{value:!0}),t.TimeUnits=t.DisplayMode=void 0;!function(e){e[e.Numeric=0]="Numeric",e[e.Literal=1]="Literal",e[e.Mixed=2]="Mixed"}(l||(t.DisplayMode=l={})),function(e){e[e.Second=1e3]="Second",e[e.Minute=6e4]="Minute",e[e.Hour=36e5]="Hour",e[e.Day=864e5]="Day",e[e.Week=6048e5]="Week"}(c||(t.TimeUnits=c={}));const f={seconds:c.Second,minutes:c.Minute,hours:c.Hour,days:c.Day,weeks:c.Week};return t.default=function(e){const t=function(e){if(!("number"==typeof e.time||e.startDate instanceof Date))throw new TypeError('Type is incorrect for field "time" or "startDate"');const t={displayMode:l.Numeric,short:!0,displayedUnitsNumber:6,...e};if(t.displayedUnits={years:!0,months:!0,weeks:!1,days:!0,hours:!0,minutes:!0,seconds:!0,...e.displayedUnits},!t.startDate)t.displayedUnits.years=!1,t.displayedUnits.months=!1;else t.startDate=new Date(t.startDate.getTime()),t.finishDate=t.finishDate?new Date(t.finishDate.getTime()):new Date,t.time=i(t.startDate,t.finishDate);if(t.startDate instanceof Date&&t.finishDate instanceof Date&&t.startDate>t.finishDate)n.default.error(`Ðевозможно оÑÑоÑмаÑиÑоваÑÑ Ð¿ÐµÑиод: даÑа наÑала (${t.startDate}) позже даÑÑ Ð¾ÐºÐ¾Ð½ÑÐ°Ð½Ð¸Ñ (${t.finishDate}).`);if(t.displayMode===l.Mixed)if(t.time/c.Day<1)t.displayMode=l.Numeric;else t.displayMode=l.Literal,t.displayedUnits.minutes=!1,t.displayedUnits.seconds=!1;if(t.displayMode===l.Numeric)t.showNullUnits=!0,t.displayedUnits.years=!1,t.displayedUnits.months=!1,t.displayedUnits.days=!1;if(t.displayMode===l.Literal)if(t.short){const e=t.displayedUnits;if(!1===e.years&&!1===e.months&&!0===e.days&&!0===e.hours&&!0===e.minutes&&!1===e.seconds)t.literalFormat="superShort";else t.literalFormat="short"}else t.literalFormat="full";return t}(e),u=function(e){const t={};let r=0,n=!0;const u=Object.entries(e.displayedUnits);for(const[s,l]of u){if(!l)continue;let u;switch(s){case"years":u=o(e),e.time=i(e.startDate,e.finishDate);break;case"months":u=a(e),e.time=i(e.startDate,e.finishDate);break;default:u=Math.floor(e.time/f[s]),e.time=e.time%f[s]}if(u||!n&&e.showNullUnits)n=!1,t[s]=u,r++;if(r===e.displayedUnitsNumber)return t}return t}(t);if(t.displayMode===l.Literal)return r.controller.currentLocaleConfig.timeInterval(u,t.literalFormat);else return function(e,t=!1){const r=Object.values(e);if(0===r.length)return t?"00:00":"0:00";if(1===r.length)return`${t?"00":"0"}:${r[0]<10?`0${r[0]}`:r[0]}`;else return r.map(((e,r)=>{if(0===r&&t&&e<10)return`0${e}`;else return 0!==r&&e<10?`0${e}`:e})).join(":")}(u,t.leadZero)},t}(0,{},a,A),x=Q,W=function(e,t,r,n,o,a){"use strict";function i(e,t){const r=String(Math.abs(e)),n=t-r.length;return(e>=0?"":"-")+(String(Math.pow(10,Math.max(0,n))).substr(1)+r)}function u(e){return e.getHours()%12||12}function s(e){return R().calendarEntities.minDays[e.getDay()]}function l(e){return R().calendarEntities.shortDays[e.getDay()]}function c(e){return R().calendarEntities.longDays[e.getDay()]}function f(e){return e.getMonth()+1}function d(e){return R().calendarEntities.shortMonths[e.getMonth()]}function T(e){return R().calendarEntities.shortGenitiveMonths[e.getMonth()]}function _(e){return R().calendarEntities.shortLocativeMonths[e.getMonth()]}function O(e){return R().calendarEntities.longMonths[e.getMonth()]}function g(e){return R().calendarEntities.longGenitiveMonths[e.getMonth()]}function M(e){return R().calendarEntities.longLocativeMonths[e.getMonth()]}function h(e){return 1+Math.floor(e.getMonth()/3)}function p(e){return e.getFullYear()%100}function L(e){return e.getMonth()<6?1:2}function m(e,t){let r=Math.trunc(e.getTimezoneOffset());const n=r<=0?"+":"-";r=Math.abs(r);const o=Math.floor(r/60),a=r-60*o,u=a?t.separator+i(a,2):"";return`${n}${i(o,2)}${u}`}function y(e,t,r={}){S[e]=[t,r],D=null}function H(e,t,r){const i="string"==typeof t?{mask:t,timeZoneOffset:r}:t;if(i.date=(0,o.default)(e,i.timeZoneOffset),null==(u=i.mask)||"string"!=typeof u)i.mask=function(e){if(!e)return n.default[a.DateFormattingStrategyType.Default];if("string"==typeof e)return n.default[e]||n.default[a.DateFormattingStrategyType.Default];return e}(i.strategy)(i.date,i);var u;return i}function F(e,t={}
50,n){if(function(e){if(null==e)return!0;if(e instanceof Date)return!e.getFullYear()||"Invalid Date"===e.toString();if("string"==typeof e)return"Invalid Date"===new Date(e).toString();else return!1}(e))throw new TypeError('Argument "date" should be valid instance of Date');const o=H(e,t,n);return String(o.mask).replace(function(){if(D)return D;const e=Object.keys(S).sort(((e,t)=>t.length-e.length));return D=new RegExp("\\[[^\\]]+\\]|("+e.join("|")+")","g"),D}(),(e=>{if("["===e[0]&&"]"===e[e.length-1])return e.substr(1,e.length-2);else return function(e,t,n){if("string"==typeof t)o=t,t=e=>e[o]();var o;let a=t(e,n);if(n.lead)a=i(a,n.lead);if(n.lower&&"string"==typeof a&&"en"!==r.controller.currentLang)a=a.toLowerCase();return a}(o.date,S[e][0],S[e][1])}))}Object.defineProperty(t,"__esModule",{value:!0}),t.Constants=t.format=void 0;let D;const S={},R=()=>r.controller.currentLocaleConfig;y("SSS","getMilliseconds",{lead:3}),y("s","getSeconds"),y("ss","getSeconds",{lead:2}),y("m","getMinutes"),y("mm","getMinutes",{lead:2}),y("h",u),y("hh",u,{lead:2}),y("H","getHours"),y("HH","getHours",{lead:2}),y("HHH",(function(e){const t=Math.floor(e.getTime()/1e3);return Math.floor(t/3600)})),y("a",(function(e){return e.getHours()>=12?R().calendarEntities.pm:R().calendarEntities.am})),y("D","getDate"),y("DD","getDate",{lead:2}),y("dd",s),y("ddl",s,{lower:!0}),y("ddd",l),y("dddl",l,{lower:!0}),y("dddd",c),y("ddddl",c,{lower:!0}),y("M",f),y("MM",f,{lead:2}),y("MMM",d),y("MMMl",d,{lower:!0}),y("MMMo",T),y("MMMlo",T,{lower:!0}),y("MMMgen",T),y("MMMlgen",T,{lower:!0}),y("MMMloc",_),y("MMMlloc",_,{lower:!0}),y("MMMM",O),y("MMMMl",O,{lower:!0}),y("MMMMo",g),y("MMMMlo",g,{lower:!0}),y("MMMMgen",g),y("MMMMlgen",g,{lower:!0}),y("MMMMloc",M),y("MMMMlloc",M,{lower:!0}),y("Y",p),y("Yh",L),y("YY",p,{lead:2}),y("YYhr",(function(e){return R().calendarEntities.shortHalfYears[L(e)-1]})),y("YYYY","getFullYear"),y("YYYYhr",(function(e){return R().calendarEntities.longHalfYears[L(e)-1]})),y("Q",h),y("Qr",(function(e){return R().calendarEntities.quarters[h(e)-1]})),y("QQr",(function(e){return R().calendarEntities.minQuarters[h(e)-1]})),y("QQQr",(function(e){return R().calendarEntities.shortQuarters[h(e)-1]})),y("QQQQr",(function(e){return R().calendarEntities.longQuarters[h(e)-1]})),y("Z",m,{separator:":"}),y("ZZ",m,{separator:""}),t.format=F;class E{get DIGITAL_MONTH_FULL_YEAR(){return R().date.DIGITAL_MONTH_FULL_YEAR}get DURATION_SHORT_TIME(){return R().date.DURATION_SHORT_TIME}get DURATION_FULL_TIME(){return R().date.DURATION_FULL_TIME}get FULL_DATE_DOW(){return R().date.FULL_DATE_DOW}get DAY(){return"D"}get FULL_DATE(){return R().date.FULL_DATE}get FULL_DATE_FULL_MONTH(){return R().date.FULL_DATE_FULL_MONTH}get FULL_DATE_FULL_MONTH_FULL_YEAR(){return R().date.FULL_DATE_FULL_MONTH_FULL_YEAR}get FULL_DATE_FULL_YEAR(){return R().date.FULL_DATE_FULL_YEAR}get FULL_DATE_SHORT_MONTH(){return R().date.FULL_DATE_SHORT_MONTH}get FULL_DATE_SHORT_MONTH_FULL_YEAR(){return R().date.FULL_DATE_SHORT_MONTH_FULL_YEAR}get FULL_DATE_SHORT_TIME(){return R().date.FULL_DATE_SHORT_TIME}get FULL_DATE_FULL_TIME(){return R().date.FULL_DATE_FULL_TIME}get FULL_DATE_FULL_TIME_FRACTION(){return R().date.FULL_DATE_FULL_TIME_FRACTION}get FULL_DATE_FULL_YEAR_SHORT_TIME(){return R().date.FULL_DATE_FULL_YEAR_SHORT_TIME}get FULL_DATE_FULL_YEAR_FULL_TIME(){return R().date.FULL_DATE_FULL_YEAR_FULL_TIME}get FULL_DATE_FULL_YEAR_FULL_TIME_FRACTION(){return R().date.FULL_DATE_FULL_YEAR_FULL_TIME_FRACTION}get FULL_DATETIME(){return R().date.FULL_DATETIME}get FULL_HALF_YEAR(){return R().date.FULL_HALF_YEAR}get ONLY_HALF_YEAR(){return"YYYYhr"}get ONLY_SHORT_HALF_YEAR(){return"YYhr"}get FULL_MONTH(){return R().date.FULL_MONTH}get MONTH(){return"MMMM"}get SHR_MONTH(){return"MMM"}get FULL_QUARTER(){return R().date.FULL_QUARTER}get QUARTER(){return"Qr"}get ONLY_QUARTER(){return"QQQQr"}get ONLY_SHORT_QUARTER(){return"QQQr"}get FULL_YEAR(){return"YYYY"}get FULL_TIME(){return R().date.FULL_TIME}get FULL_TIME_FRACTION(){return R().date.FULL_TIME_FRACTION}get ISO_DATETIME(){return R().date.ISO_DATETIME}get ISO_DATETIME_SQL(){return R().date.ISO_DATETIME_SQL}get SHORT_DATE_DOW(){return R().date.SHORT_DATE_DOW}get SHORT_DATE_SHORT_DOW(){return R().date.SHORT_DATE_SHORT_DOW}get SHORT_DATE_SHORT_MONTH_SHORT_DOW(){return R().date.SHORT_DATE_SHORT_MONTH_SHORT_DOW}get SHORT_DATE(){return R().date.SHORT_DATE}get SHORT_DATE_FULL_MONTH(){return R().date.SHORT_DATE_FULL_MONTH}get SHORT_DATE_SHORT_MONTH(){return R().date.SHORT_DATE_SHORT_MONTH}get SHORT_DATE_SHORT_TIME(){return R().date.SHORT_DATE_SHORT_TIME}get SHORT_DATE_FULL_TIME(){return R().date.SHORT_DATE_FULL_TIME}get SHORT_DATE_FULL_TIME_FRACTION(){return R().date.SHORT_DATE_FULL_TIME_FRACTION}get SHORT_DATETIME(){return R().date.SHORT_DATETIME}get SHORT_HALF_YEAR(){return R().date.SHORT_HALF_YEAR}get SHORT_MONTH(){return R().date.SHORT_MONTH}get SHORT_QUARTER(){return R().date.SHORT_QUARTER}get SHORT_TIME(){return R().date.SHORT_TIME}}t.Constants=E;const Y=F;return t.default=Y,Object.getOwnPropertyNames(E.prototype).filter((e=>
50"constructor"!==e)).forEach((e=>{Object.defineProperty(F,e,Object.getOwnPropertyDescriptor(E.prototype,e))})),t}(0,{},a,v,_,d),k=W,q=function(e,t,r,n,o){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=!1){switch(e=String(e),o.controller.currentLang){case"ru":case"kk":return(0,r.default)(e,t);default:return(0,n.default)(e)}},t}(0,{},b,U,a),z=q,Z=function(e,t,r,n,o,a){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.TextShortFormats=t.TextFullFormats=t.Text=t.AccountingShortFormats=t.AccountingFullFormats=t.Accounting=t.DefaultFullFormats=t.DefaultShortFormats=t.Default=t.PeriodConfigurationType=t.PeriodTypes=void 0,Object.defineProperty(t,"PeriodTypes",{enumerable:!0,get:function(){return r.PeriodType}}),Object.defineProperty(t,"PeriodConfigurationType",{enumerable:!0,get:function(){return r.ConfigurationType}}),Object.defineProperty(t,"Default",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"DefaultShortFormats",{enumerable:!0,get:function(){return n.DefaultShortFormats}}),Object.defineProperty(t,"DefaultFullFormats",{enumerable:!0,get:function(){return n.DefaultFullFormats}}),Object.defineProperty(t,"Accounting",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"AccountingFullFormats",{enumerable:!0,get:function(){return o.AccountingFullFormats}}),Object.defineProperty(t,"AccountingShortFormats",{enumerable:!0,get:function(){return o.AccountingShortFormats}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"TextFullFormats",{enumerable:!0,get:function(){return a.TextFullFormats}}),Object.defineProperty(t,"TextShortFormats",{enumerable:!0,get:function(){return a.TextShortFormats}}),t}(0,{},E,R,$,I),G=Z,V=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MODE=void 0,t.MODE={TIME:"time",DATE:"date",DATETIME:"datetime"};const n={time:"HH:mm:ss${ms}Z",date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm:ss${ms}Z"},o=new Date(0);return t.default=function(e,a=t.MODE.DATETIME){let i=n[a];if(a===t.MODE.TIME&&e<o||e.withoutTimeZone)i=i.replace("Z","");const u=e.getMilliseconds()>
500?".SSS":"";return i=i.replace("${ms}",u),(0,r.default)(e,i)},t}(0,{},W),J=V,B=function(e,t,r,n,o,a,i,u){"use strict";function s(e,t,n){if(l(e,t))return f(e,t,O.Default.full);const o=(0,r.default)(e,n),a=(0,r.default)(t,n);if(o===a)return o;else return`${o}${T}${a}`}function l(e,t){return!(e instanceof Date&&t instanceof Date)}function c(e,t,n){if(n===M.Digital)return function(e,t){const n=r.default.FULL_DATE;if(l(e,t))return f(e,t,O.Default.full);else return`${(0,r.default)(e,n)}${T}${(0,r.default)(t,n)}`}(e,t);if(n===M.FullDate||n===M.ShortDate)return function(e,t,n){const o=n===M.FullDate?r.default.FULL_DATE_FULL_MONTH:r.default.FULL_DATE_SHORT_MONTH;if(l(e,t))return f(e,t,O.Default.full);const a=n===M.FullDate?r.default.FULL_DATE_FULL_MONTH:r.default.SHORT_DATE_SHORT_MONTH,i=n===M.FullDate?r.default.FULL_DATE_FULL_MONTH:"D",u=e.getDate(),s=e.getMonth(),c=e.getFullYear(),d=t.getDate(),_=t.getMonth();if(c===t.getFullYear()){if(s===_)if(u===d)return(0,r.default)(e,o);else return`${(0,r.default)(e,i)}${T}${(0,r.default)(t,o)}`;return`${(0,r.default)(e,a)}${T}${(0,r.default)(t,o)}`}return`${(0,r.default)(e,o)}${T}${(0,r.default)(t,o)}`}(e,t,n);if(n===M.FullMonth||n===M.ShortMonth)return function(e,t,n){const o=n===M.FullMonth?r.default.FULL_MONTH:r.default.SHORT_MONTH;if(l(e,t))return f(e,t,O.Default.full);const a=n===M.FullMonth?"MMMM":"MMM",i=e.getMonth(),u=e.getFullYear(),s=t.getMonth();if(u===t.getFullYear())if(i===s)return(0,r.default)(e,o);else return`${(0,r.default)(e,a)}${T}${(0,r.default)(t,o)}`;return`${(0,r.default)(e,o)}${T}${(0,r.default)(t,o)}`}(e,t,n);if(n===M.FullQuarter||n===M.ShortQuarter)return function(e,t,n){return s(e,t,n===M.FullQuarter?r.default.FULL_QUARTER:r.default.SHORT_QUARTER)}(e,t,n);if(n===M.FullHalfYear||n===M.ShortHalfYear)return function(e,t,n){return s(e,t,n===M.FullHalfYear?r.default.FULL_HALF_YEAR:r.default.SHORT_HALF_YEAR)}(e,t,n);else return function(e,t){return s(e,t,"YYYY")}(e,t)}function f(e,t,n){if(!e)return n[i.PeriodType.openStartPeriodTemplate].replace(_,(0,r.default)(t,r.default[n[i.PeriodType.openStartPeriod]]));else return n[i.PeriodType.openFinishPeriodTemplate].replace(_,(0,r.default)(e,r.default[n[i.PeriodType.openFinishPeriod]]))}function d(e,t,n){const o={...g,...n,currentDate:n.currentDate||new Date},a=function(e,t,{configuration:r,short:n,hiddenYearIfCurrentYear:o,currentDate:a}){const i="object"==typeof r?r:O[r||"Default"];if(o){const r=a.getFullYear();if(r===e.getFullYear()&&r===t.getFullYear())return n?i.shortWithoutYear:i.fullWithoutYear}return n?i.short:i.full}(e||o.currentDate,t||o.currentDate,o);if(!e&&!t)return o.undefinedPeriod||a.allPeriod;if(!e||!t)return f(e,t,a);const s=o.type||(0,u.default)(e,t);if(s===i.PeriodType.today||s===i.PeriodType.oneDay&&o.useToday)return a.today;const[l,c]=a[s];if(!c)return(0,r.default)(e,r.default[l]);if(s===i.PeriodType.quartersOneYear)return function(e,t,n){const[o,a]=n[i.PeriodType.quartersOneYear],u=o.startsWith("ONLY")||a.startsWith("ONLY");if("QUARTER"!==o&&"QUARTER"!==a)return`${(0,r.default)(e,r.default[o])}${T}${(0,r.default)(t,r.default[a])}`;const s=n.quartersOneYearsTemplate,l=(0,r.default)(e,r.default.QUARTER),c=(0,r.default)(t,r.default.QUARTER),f=u?"":`'${(0,r.default)(t,"YY")}`;return`${s.replace(_,`${l}${T}${c}`)}${f}`}(e,t,a);else return`${(0,r.default)(e,r.default[l])}${T}${(0,r.default)(t,r.default[c])}`}Object.defineProperty(t,"__esModule",{value:!0}),t.Type=void 0;const T="-",_="$digit$s$",O={Default:n.default,Accounting:o.default,Text:a.default},g={configuration:i.ConfigurationType.Default,short:!1,useToday:!1,hiddenYearIfCurrentYear:!1};var M;return function(e){e[e.Auto=0]="Auto",e[e.Digital=1]="Digital",e[e.FullDate=2]="FullDate",e[e.ShortDate=3]="ShortDate",e[e.FullMonth=4]="FullMonth",e[e.ShortMonth=5]="ShortMonth",e[e.FullQuarter=6]="FullQuarter",e[e.ShortQuarter=7]="ShortQuarter",e[e.FullHalfYear=8]="FullHalfYear",e[e.ShortHalfYear=9]="ShortHalfYear",e[e.Year=10]="Year"}(M||(t.Type=M={})),t.default=function(e,t,r={}){if("number"==typeof r)return c(e,t,r);else return d(e,t,r)},t}(0,{},W,R,$,I,E,M),X=B,K=function(e,t,r,n){"use strict";function o(e,t){const r=t.getFullYear(),n=t.getMonth(),o=t.getDate(),a=e.getFullYear(),i=e.getMonth(),u=e.getDate();return a===r&&i===n&&u===o}var a;
50return Object.defineProperty(t,"__esModule",{value:!0}),t.RetrospectType=void 0,function(e){e[e.Auto=0]="Auto",e[e.Time=1]="Time",e[e.Date=2]="Date"}(a||(t.RetrospectType=a={})),t.default=function(e,t=a.Auto){if(!(e instanceof Date))throw new TypeError('Argument "date" should be an instance of Date');if(t===a.Date){if(o(e,new Date))return n("Today");const t=new Date;if(t.setDate(t.getDate()-1),o(e,t))return n("Yesterday");else return(0,r.default)(e,r.default.FULL_DATE)}return"[Under construction]"},t}(0,{},W,e),ee=K,s.detectPeriodType=s.CurrencyName=s.MoneyDisplayMode=s.money=s.TimeIntervalDisplayMode=s.timeInterval=s.TemplateBuilder=s.template=s.RetrospectType=s.retrospect=s.periodConfiguration=s.PeriodConfigurationType=s.PeriodTypes=s.PeriodType=s.period=s.NotationMode=s.CompactDisplayMode=s.CompactNotationMode=s.RoundingMode=s.number=s.numberWords=s.numberRoman=s.getJsonReviverWithStorage=s.jsonReviver=s.getJsonReplacerWithStorage=s.jsonReplacer=s.TO_SQL_MODE=s.dateToSql=s.dateFromSql=s.DateFormattingStrategyType=s.DateConstants=s.dateFormatter=s.date=s.cyrTranslit=void 0,s.periodConfiguration=G,Object.defineProperty(s,"cyrTranslit",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(s,"date",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(s,"dateFormatter",{enumerable:!0,get:function(){return k.format}}),Object.defineProperty(s,"DateConstants",{enumerable:!0,get:function(){return k.Constants}}),Object.defineProperty(s,"DateFormattingStrategyType",{enumerable:!0,get:function(){return T.DateFormattingStrategyType}}),Object.defineProperty(s,"dateFromSql",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(s,"dateToSql",{enumerable:!0,get:function(){return J.default}}),Object.defineProperty(s,"TO_SQL_MODE",{enumerable:!0,get:function(){return J.MODE}}),Object.defineProperty(s,"jsonReplacer",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(s,"getJsonReplacerWithStorage",{enumerable:!0,get:function(){return L.getReplacerWithStorage}}),Object.defineProperty(s,"jsonReviver",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(s,"getJsonReviverWithStorage",{enumerable:!0,get:function(){return y.getReviverWithStorage}}),Object.defineProperty(s,"numberRoman",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(s,"numberWords",{enumerable:!0,get:function(){return z.default}}),Object.defineProperty(s,"number",{enumerable:!0,get:function(){return F.default}}),Object.defineProperty(s,"RoundingMode",{enumerable:!0,get:function(){return F.RoundingMode}}),Object.defineProperty(s,"CompactNotationMode",{enumerable:!0,get:function(){return F.CompactNotationMode}}),Object.defineProperty(s,"CompactDisplayMode",{enumerable:!0,get:function(){return F.CompactDisplayMode}}),Object.defineProperty(s,"NotationMode",{enumerable:!0,get:function(){return F.NotationMode}}),Object.defineProperty(s,"period",{enumerable:!0,get:function(){return X.default}}),Object.defineProperty(s,"PeriodType",{enumerable:!0,get:function(){return X.Type}}),Object.defineProperty(s,"PeriodTypes",{enumerable:!0,get:function(){return Y.PeriodType}}),Object.defineProperty(s,"PeriodConfigurationType",{enumerable:!0,get:function(){return Y.ConfigurationType}}),Object.defineProperty(s,"retrospect",{enumerable:!0,get:function(){return ee.default}}),Object.defineProperty(s,"RetrospectType",{enumerable:!0,get:function(){return ee.RetrospectType}}),Object.defineProperty(s,"template",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(s,"TemplateBuilder",{enumerable:!0,get:function(){return C.TemplateBuilder}}),Object.defineProperty(s,"timeInterval",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(s,"TimeIntervalDisplayMode",{enumerable:!0,get:function(){return x.DisplayMode}}),Object.defineProperty(s,"money",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(s,"MoneyDisplayMode",{enumerable:!0,get:function(){return w.DisplayMode}}),Object.defineProperty(s,"CurrencyName",{enumerable:!0,get:function(){return w.CurrencyName}}),Object.defineProperty(s,"detectPeriodType",{enumerable:!0,get:function(){return h.default}}),s})); 51define("Types/guards",["require","exports"],(function(e,t){var r,n,i,o,u,s,c,d,l,a,f,b,y,p,_,m,O,j,v,F;
51return Object.defineProperty(t,"__esModule",{value:!0}),r=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.isAdapter=void 0,t.isAdapter=function(e){return!!(null==e?void 0:e["[Types/_entity/adapter/IAdapter]"])},t}(0,{}),n=r,i=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayField=void 0,t.isArrayField=function(e){return e&&!!e["[Types/_entity/format/ArrayField]"]},t}(0,{}),o=i,u=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.isEnum=void 0,t.isEnum=function(e){return e&&!!e["[Types/_collection/Enum]"]},t}(0,{}),s=u,c=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.isFlags=void 0,t.isFlags=function(e){return e&&!!e["[Types/_collection/Flags]"]},t}(0,{}),d=c,l=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.isFormat=void 0,t.isFormat=function(e){return e&&!!e["[Types/_collection/format/Format]"]},t}(0,{}),a=l,f=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.isICloneable=void 0,t.isICloneable=function(e){return e&&!!e["[Types/_entity/ICloneable]"]},t}(0,{}),b=f,y=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.isIObject=void 0,t.isIObject=function(e){return e&&!!e["[Types/_entity/IObject]"]},t}(0,{}),p=y,_=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.isRecord=void 0,t.isRecord=function(e){return e&&!!e["[Types/_entity/Record]"]},t}(0,{}),m=_,O=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.isRecordSet=void 0,t.isRecordSet=function(e){return e&&e["[Types/_collection/RecordSet]"]},t}(0,{}),j=O,v=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.isCowFormat=void 0,t.isCowFormat=function(e){return(0,r.isFormat)(e)&&e.copyOnWrite},t}(0,{},l),F=v,t.isIObject=t.isICloneable=t.isEnum=t.isFlags=t.isArrayField=t.isCowFormat=t.isFormat=t.isAdapter=t.isRecordSet=t.isRecord=void 0,Object.defineProperty(t,"isRecord",{enumerable:!0,get:function(){return m.isRecord}}),Object.defineProperty(t,"isRecordSet",{enumerable:!0,get:function(){return j.isRecordSet}}),Object.defineProperty(t,"isAdapter",{enumerable:!0,get:function(){return n.isAdapter}}),Object.defineProperty(t,"isFormat",{enumerable:!0,get:function(){return a.isFormat}}),Object.defineProperty(t,"isCowFormat",{enumerable:!0,get:function(){return F.isCowFormat}}),Object.defineProperty(t,"isArrayField",{enumerable:!0,get:function(){return o.isArrayField}}),Object.defineProperty(t,"isFlags",{enumerable:!0,get:function(){return d.isFlags}}),Object.defineProperty(t,"isEnum",{enumerable:!0,get:function(){return s.isEnum}}),Object.defineProperty(t,"isICloneable",{enumerable:!0,get:function(){return b.isICloneable}}),Object.defineProperty(t,"isIObject",{enumerable:!0,get:function(){return p.isIObject}}),t})); 52define("Types/object",["Types/shim","require","exports"],(function(e,t,r){var n,u,o,i,c,f,l,s,a,b;return Object.defineProperty(r,"__esModule",{value:!0}),n=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){if(!function(e){if("object"!=typeof e||null===e)return!1;if(Array.isArray(e)||e.constructor===Date)return!0;if(e.constructor===Object)return!("$constructor"in e);else return!1}(t))return t;if(t.constructor===Date)if("function"==typeof t.clone)return t.clone();else return new Date(t.getTime());if(Array.isArray(t))return t.map((t=>e(t)));const r={};for(const[n,u]of Object.entries(t))r[n]=e(u);return r},t}(0,{}),u=n,o=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=Object.prototype.toString;return t.default=function(e){if(null===e||"object"!=typeof e)return!1;if("[object Object]"===r.call(e)||e instanceof Object)return 0===Object.keys(e).length;else return!0},t}(0,{}),i=o,c=function(e,t){"use strict";function r(e){return e&&e["[Types/_entity/IEquatable]"]}function n(e){let t;if(e&&"object"==typeof e){if(e instanceof Date)return!0;
52if(e instanceof String)return!0;else return t=Object.getPrototypeOf(e),null===t||t===Object.prototype}return!1}function u(e,t){if(e===t)return!0;const o=Array.isArray(e),i=Array.isArray(t);if(o!==i)return!1;if(o&&i)return function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!u(e[r],t[r]))return!1;return!0}(e,t);if(n(e)&&n(t)){let r,n;if(e.valueOf&&e.valueOf===t.valueOf)r=e.valueOf(),n=t.valueOf();else r=e,n=t;return r===e&&n===t?function(e,t){const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;if(r.length>0)return r.sort(),n.sort(),!r.some(((r,o)=>!(n[o]===r&&u(e[r],t[r]))));else return Object.getPrototypeOf(e)===Object.getPrototypeOf(t)}(e,t):u(r,n)}if(r(e))return e.isEqual(t);if(r(t))return t.isEqual(e);if(Number.isNaN(e)&&Number.isNaN(t))return!0;else return!1}return Object.defineProperty(t,"__esModule",{value:!0}),t.default=u,t}(0,{}),f=c,l=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=function(e){return!(!e||"[object Object]"!==Object.prototype.toString.call(e)||Object.getPrototypeOf(e)!==Object.prototype)},t}(0,{}),s=l,a=function(e,t,r){"use strict";function n(e){if(null===e||"object"!=typeof e)return!1;else return e.constructor===Object||e.constructor===Array}function u(e,t,...r){if(n(t))r.forEach((r=>{if(n(r)){const o={};Object.keys(r).forEach((i=>{const c=r[i];if(n(c)&&n(t[i])&&!e.has(c))e.add(c),o[i]=u(e,t[i],c),e.delete(c)})),Object.assign(t,r,o)}}));return t}return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e={},...t){return u(new r.Set,e,...t)},t}(0,{},e),b=a,r.isPlainObject=r.isEmpty=r.clone=r.merge=r.isEqual=void 0,Object.defineProperty(r,"isEqual",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(r,"merge",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(r,"clone",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(r,"isEmpty",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(r,"isPlainObject",{enumerable:!0,get:function(){return s.default}}),r})); 53define("Types/shim",["require","exports"],(function(e,t){var s,r,i,o;return Object.defineProperty(t,"__esModule",{value:!0}),s=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SetPolyfill=void 0;class s{constructor(){this.clear()}add(e){const t=this._isObject(e)?this._addObject(e):e;return this._hash[s._getHashedKey(t)]=e,this}clear(){this._hash={},this._objects=[]}delete(e){let t;if(this._isObject(e)){if(t=this._deleteObject(e),!t)return!1}else t=e;const r=s._getHashedKey(t),i=r in this._hash;return delete this._hash[r],i}entries(){throw new Error("Method is not supported")}forEach(e,t){const s=this._hash;for(const r in s)if(s.hasOwnProperty(r))e.call(t,s[r],s[r],this)}has(e){let t;if(this._isObject(e)){if(t=this._getObjectKey(e),!t)return!1}else t=e;return t=s._getHashedKey(t),this._hash.hasOwnProperty(t)}keys(){throw new Error("Method is not supported")}values(){throw new Error("Method is not supported")}_isObject(e){return e&&"object"==typeof e}_addObject(e){let t=this._objects.indexOf(e);if(-1===t)t=this._objects.length,this._objects.push(e);return this._objectPrefix+t}_deleteObject(e){const t=this._objects.indexOf(e);if(t>-1)return this._objects[t]=null,this._objectPrefix+t}_getObjectKey(e){const t=this._objects.indexOf(e);if(-1!==t)return this._objectPrefix+t}static _getHashedKey(e){return typeof e+"@"+e}}t.SetPolyfill=s,Object.assign(s.prototype,{_hash:null,_objectPrefix:"{[object]}:",_objects:null}),Object.defineProperty(s.prototype,"size",{get(){return Object.keys(this._hash).length},enumerable:!0,configurable:!1});const r="undefined"==typeof Set?s:Set;return t.default=r,t}(0,{}),r=s,i=function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MapPolyfill=void 0;class r{constructor(){this.clear()}clear(){this._hash={},this._objects=[]}delete(e){let t;if(this._isObject(e)){if(t=this._addObject(e),!t)return!1}else t=e;const r=s.SetPolyfill._getHashedKey(t),i=r in this._hash;return delete this._hash[r],i}entries(){throw new Error("Method is not supported")}forEach(e,t){const s=this._hash;for(const i in s)if(s.hasOwnProperty(i)){const o=s[i];let h=r._getUnhashedKey(i);if(this._isObjectKey(h))h=this._getObject(h);e.call(t,o,h,this)}}get(e){let t;if(this._isObject(e)){if(t=this._getObjectKey(e),!t)return}else t=e;return this._hash[s.SetPolyfill._getHashedKey(t)]}has(e){let t;if(this._isObject(e)){if(t=this._getObjectKey(e),!t)return!1}else t=e;return t=s.SetPolyfill._getHashedKey(t),this._hash.hasOwnProperty(t)}keys(){throw new Error("Method is not supported")}set(e,t){let r;if(this._isObject(e))r=this._addObject(e);else r=e;return this._hash[s.SetPolyfill._getHashedKey(r)]=t,this}toString(){return"[object Map]"}_isObject(e){return s.SetPolyfill.prototype._isObject.call(this,e)}_addObject(e){return s.SetPolyfill.prototype._addObject.call(this,e)}_deleteObject(e){return s.SetPolyfill.prototype._deleteObject.call(this,e)}_getObjectKey(e){return s.SetPolyfill.prototype._getObjectKey.call(this,e)}_isObjectKey(e){return String(e).substr(0,this._objectPrefix.length)===this._objectPrefix}_getObject(e){const t=parseInt(e.substr(this._objectPrefix.length),10);return this._objects[t]}static _getUnhashedKey(e){const t=String(e),s=t.slice(t.indexOf("@")+1);return"null"===s?null:s}}t.MapPolyfill=r,Object.assign(r.prototype,{_hash:null,_objectPrefix:s.SetPolyfill.prototype._objectPrefix,_objects:null}),Object.defineProperty(r.prototype,"size",{get(){return Object.keys(this._hash).length},enumerable:!0,configurable:!1});const i="undefined"==typeof Map?r:Map;return t.default=i,t}(0,{},s),o=i,t.Set=t.Map=void 0,Object.defineProperty(t,"Map",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"Set",{enumerable:!0,get:function(){return r.default}}),t})); 54define("Types/parser",["I18n/i18n","require","exports"],(function(e,t,n){var r,u;return Object.defineProperty(n,"__esModule",{value:!0}),r=function(e,t,n){"use strict";function r(e,t){const n=Number(t);e.setHours(n)}function u(e,t){const n=Number(t)-1;if(e.setMonth(n),e.getMonth()!==n)e.setMonth(n)}function s(e,t){const n=Number(t);return e.setFullYear(n>=100?n:2e3+n)}function o(e,t,n){if("string"==typeof t)r=t,t=(e,t)=>e[r](t);var r;a[e]={handler:t,valueMatcher:n},f=null}function i(e,t,n){const r={tokenString:t,value:n};if(function(e){return["Y","YY","YYYY"].includes(e)}(t))e.unshift(r);else e.push(r)}
54function c(e,t,n){if(n.valueMatcher){const t=n.valueMatcher.exec(e);if(null===t)return"";else return t[0]}return e.substr(0,t.length)}Object.defineProperty(t,"__esModule",{value:!0});const l=/[0-9]{1,2}/;let f;const a={};return o("D","setDate",l),o("DD","setDate"),o("M",u,l),o("MM",u),o("Y",s,l),o("YY",s),o("YYYY","setFullYear"),o("s","setSeconds",l),o("ss","setSeconds"),o("m","setMinutes",l),o("mm","setMinutes"),o("h",r,l),o("hh",r),o("H","setHours",l),o("HH","setHours"),o("a",(function(e,t){if(t===n.controller.currentLocaleConfig.calendarEntities.pm&&e.getHours()<=12)e.setHours(e.getHours()+12)}),/\w{1,2}/),t.default=function(e,t){const n=String(e),r=String(t),u=function(){if(f)return f;const e=Object.keys(a).sort(((e,t)=>t.length-e.length));return f=new RegExp("\\[[^\\]]+\\]|("+e.join("|")+")","g"),f}(),s=new Date(0),o=[];u.lastIndex=0;let l,d=0;for(;null!==(l=u.exec(r));){const e=l[0];if("["===e[0]&&"]"===e[e.length-1])continue;const t=c(n.substr(d+l.index),e,a[e]);d+=t.length-e.length,i(o,e,t)}for(const{value:e,tokenString:t}of o)h=s,g=e,a[t].handler(h,g);var h,g;return s},t}(0,{},e),u=r,n.date=void 0,Object.defineProperty(n,"date",{enumerable:!0,get:function(){return u.default}}),n})); 55define("Types/util",["Types/guards","Types/formatter","Env/Env","Core/core-extend","require","exports"],(function(e,t,r,n,o,i){var c,u,s,l,a,f,p,d,b,g,y,O,m,j,v,P;Object.defineProperty(i,"__esModule",{value:!0}),c=function(e,t,r,n){"use strict";function o(e,t,r){if(r.has(e))return e;let i;if("[object Array]"===u.call(e))r.add(e),i=e.map((e=>o(e,t,r))),r.delete(e);else if(e&&"object"==typeof e&&!Object.prototype.hasOwnProperty.call(e,"$$typeof"))if(Object.getPrototypeOf(e)===c)r.add(e),i={},Object.entries(e).forEach((([e,n])=>{if(t.keepUndefined||void 0!==n)i[e]=o(n,t,r)})),r.delete(e);else if(t.processCloneable&&(0,n.isICloneable)(e))i=e.clone();else i=e;else i=e;return i}Object.defineProperty(t,"__esModule",{value:!0}),t.clonePlain=t.clone=void 0;const i={keepUndefined:!0,processCloneable:!0},c=Object.prototype,u=Object.prototype.toString;return t.clone=function(e){if(e instanceof Object)if(e["[Types/_entity/ICloneable]"])return e.clone();else{const t=new Map,n=(0,r.getJsonReplacerWithStorage)(t),o=(0,r.getJsonReviverWithStorage)(void 0,t);return JSON.parse(JSON.stringify(e,n),o)}else return e},t.clonePlain=function(e,t){return o(e,{...i,...(!1===t?{processCloneable:!1}:!0===t?{}:t)||{}},new Set)},t}(0,{},t,e),u=function(e,t,r){"use strict";function n(e){return"function"==typeof e}function o(e,t){return t+e.substr(0,1).toUpperCase()+e.substr(1)}function i(e,t="."){if(Array.isArray(e))return[...e];if(!e)return[];else return e.split(t)}function c(e,t,o={}){const c=n(o)?o:null==o?void 0:o.onElementResolve,u=i(t,!n(o)?o.delimiter:void 0);let s=e;for(let e=0;e<u.length;e++){if(null==s)return;const t=u[e];if((0,r.isIObject)(s)&&s.has(t))s=s.get(t);else if("_options"!==t||s[t]){if(c)c(t,s,e);s=s[t]}}return s}return Object.defineProperty(t,"__esModule",{value:!0}),t.hasValue=t.extractValue=t.implantValue=t.setPropertyValue=t.getPropertyValue=void 0,t.getPropertyValue=function(e,t){if(!e||"object"!=typeof e)return;const n=e,i=t||"";if(i in e)return n[i];if((0,r.isIObject)(e))return e.get(i);const c=n[o(i,"get")];if("function"==typeof c&&!c.deprecated)return c.call(e);else return},t.setPropertyValue=function(e,t,n){if(!e||"object"!=typeof e)throw new TypeError("Argument object should be an instance of Object");const i=e,c=t||"";if(c in e)return void(i[c]=n);if((0,r.isIObject)(i)&&i.has(c))return void i.set(c,n);const u=i[o(c,"set")];if("function"!=typeof u||u.deprecated)throw new ReferenceError(`Object doesn't have setter for property "${t}"`);else u.call(e,n)},t.implantValue=function(e,t,n,o={}){const u=i(t,o.delimiter),s=u.pop(),l=c(e,u,o);if(l){const e=null!=s?s:"undefined";if((0,r.isIObject)(l))l.set(e,n);else l[e]=n;return!0}return!1},t.extractValue=c,t.hasValue=function(e,t,n={}){const o=i(t,n.delimiter),u=o.pop(),s=c(e,o,n);if(s){const e=null!=u?u:"undefined";if((0,r.isIObject)(s))return s.has(e);else{return void 0!==s[e]}}return!1},t}(0,{},e),s=function(e,t,r){"use strict";
55Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=void 0;const n=/:[0-9]+:[0-9]+/,o={};class i{log(e,t){if(1===arguments.length)t=e,e="Log";r.IoC.resolve("ILogger").log(e,t||"")}error(e,t){if(1===arguments.length)t=e,e="Critical";if(t instanceof Error)r.IoC.resolve("ILogger").error(e,t.message,t);else r.IoC.resolve("ILogger").error(e,t||"")}info(e,t){if(1===arguments.length)t=e,e="Warning";r.IoC.resolve("ILogger").warn(e,t||"")}stack(e,t,n){t=t||0,n=n||"info";const i=new Error(e),c=this._getStack(i,t),u=e+c||"";if(!o.hasOwnProperty(u))o[u]=!0,r.IoC.resolve("ILogger")[n](i.message,c)}stackToCloud(e,t,n){n=n||"info";const i=new Error(e),c=this._getStack(i,t),u=e+c||"";if(!o.hasOwnProperty(u))if(o[u]=!0,void 0!==(null===window||void 0===window?void 0:window.wsErrorMonitor))window.wsErrorMonitor.onError(new ErrorEvent("ERROR STACK LOG",{message:[e,c].join("\n")}));else r.IoC.resolve("ILogger")[n](i.message,c)}_getStack(e,t){let r=2+(t=t||0),o="";if("stack"in e){const t=String(e.stack).split("\n");if(t[0]&&!n.test(t[0]))r++;o=t.slice(r).join("\n").trim()}return o}}t.Logger=i;const c=new i;return t.default=c,t}(0,{},r),l=s,a=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.observeRecordChanges=void 0,t.observeRecordChanges=function(e,t,r){return e.startObserveSession(),null==t||t(e),e.endObserveSession(r)},t}(0,{}),f=a,p=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r="undefined"!=typeof Symbol?-1===String(Symbol).indexOf("Symbol is not a constructor"):!1;return t.default=function(e){return r?Symbol(e):`$${e}`},t}(0,{}),d=p,b=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=/\{\d+-\d+}/g;return t.default=function(e){const[t,n]=e.split(":::"),o=(n||"").match(r)||[],i=[];let c=0;for(const e of o){const r=e.slice(1,-1).split("-").map((e=>+e));i.push(t.slice(c,r[0])),i.push(t.slice(...r)),c=r[1]}return i.push(t.slice(c,t.length)),i},t}(0,{}),g=b,y=function(e,t,r,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,o,i,c){let u=!1;if(c&&e&&e._moduleName)u=c.indexOf(e._moduleName)>-1;if(!u)r.default.info(i,"Method extend() is deprecated, use ES6 extends or Core/core-extend for inheritance");return n(e,o,t)},t}(0,{},s,n),O=y,m=function(e,t,r){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function o(e,t){const n=Object.getOwnPropertyDescriptor(e,t);if(!n)r.default.error("Types/util:mixin",new Error(`Own property descriptor for "${String(t)}" of "${function(e){var t,r,n;const o=e;return o._moduleName||(null===(t=o.prototype)||void 0===t?void 0:t._moduleName)||(null===(r=o.constructor)||void 0===r?void 0:r._moduleName)||o.name||(null===(n=o.constructor)||void 0===n?void 0:n.name)||"unknown"}(e)}" is undefined.`));return n}function i(e,t){if(e!==Object)Object.getOwnPropertyNames(e).forEach((r=>{switch(r){case"arguments":case"caller":case"length":case"name":case"es5Constructor":case"initMixin":case"prototype":case"toJSON":break;default:if(!n(t,r)){const n=o(e,r);if(n)Object.defineProperty(t,r,n)}}}))}function c(e,...t){if(t.length&&!e.prototype._mixins)e.prototype._mixins=[];const r=Object.create(null);t.forEach((t=>{const c="function"==typeof t,u=c?t.prototype:t;if(c)i(t,e);const s=t=>{if(!n(r,t))r[t]=n(e.prototype,t);if(!r[t]){const r=o(u,t);if(r)Object.defineProperty(e.prototype,t,r)}};if(Object.getOwnPropertyNames(u).forEach(s),Object.getOwnPropertySymbols)Object.getOwnPropertySymbols(u).forEach(s)}))}Object.defineProperty(t,"__esModule",{value:!0}),t.mixin=t.applyMixins=void 0;return t.applyMixins=c,t.mixin=function(e,...t){class r extends e{constructor(...t){if(e!==Object)super(...t)}}return i(e,r),c(r,...t),r},t}(0,{},s),j=m,v=function(e,t,r,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.clonePlain=t.clone=t.hasValue=t.setPropertyValue=t.getPropertyValue=t.implantValue=t.extractValue=void 0,Object.defineProperty(t,"extractValue",{enumerable:!0,get:function(){return r.extractValue}}),Object.defineProperty(t,"implantValue",{enumerable:!0,get:function(){return r.implantValue}}),Object.defineProperty(t,"getPropertyValue",{enumerable:!0,get:function(){return r.getPropertyValue}}),Object.defineProperty(t,"setPropertyValue",{enumerable:!0,get:function(){return r.setPropertyValue}}),Object.defineProperty(t,"hasValue",{enumerable:!0,get:function(){return r.hasValue}}),Object.defineProperty(t,"clone",{enumerable:!0,get:function(){return n.clone}}),Object.defineProperty(t,"clonePlain",{enumerable:!0,get:function(){return n.clonePlain}}),t}(0,{},u,c),P=v,i.observeRecordChanges=i.splitTemplateString=i.deprecateExtend=i.protect=i.object=i.applyMixins=i.mixin=i.Logger=i.logger=i.global=void 0;const h=globalThis;return i.global=h,Object.defineProperty(i,"logger",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(i,"Logger",{enumerable:!0,get:function(){return l.Logger}}),Object.defineProperty(i,"mixin",{enumerable:!0,get:function(){return j.mi
55xin}}),Object.defineProperty(i,"applyMixins",{enumerable:!0,get:function(){return j.applyMixins}}),i.object=P,Object.defineProperty(i,"protect",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(i,"deprecateExtend",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(i,"splitTemplateString",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(i,"observeRecordChanges",{enumerable:!0,get:function(){return f.observeRecordChanges}}),i})); 56define("Core/core-extend",["require","Core/core-extend-initializer","Core/helpers/Function/callAround","Core/helpers/Function/callNext","Core/helpers/Function/callBefore","Core/helpers/Function/callIf","Core/helpers/Object/isEmpty","Core/helpers/Object/find","Core/helpers/Function/forAliveOnly","Core/core-merge","Core/core-hash","Core/property-merge","Core/core-classicExtend","Core/core-simpleExtend","Env/Env"],(function(require,coreInitializer,callAround,callNext,callBefore,callIf,isEmptyObject,objectFind,forAliveOnly,coreMerge,coreHash,propertyMerge,classicExtend,simpleExtend,Env){var isDebug=!!Env.cookie.get("s3debug"),coreExtend={extend:function(){function localExtend(t,e){return coreExtend.extend(this,t,e)}function localExtendPlugin(t){return coreExtend.extendPlugin(this,t)}function localMixin(t){return coreExtend.mixin(this,t)}function mergePropertiesToPrototype(t,e){for(var o in e)if(e.hasOwnProperty(o)&&"$"!=o.charAt(0))t.prototype[o]=e[o]}return function extend(classPrototype,mixinsList,classExtender){function constructorInternal(t){var e,o;if(this._goUp=this._goUp||1,1===this._goUp&&useNativeConstructorFirst)this.constructor.call(this,t);if(parentCtor)this._goUp++,parentCtor.call(this,t);else if(!useNativeConstructorFirst){if(this._initializer(propertyMerge),t&&"object"==typeof t)propertyMerge(t,this._options=this._options||{});if(parentNativeCtor)(parentNativeCtor.hasOwnProperty("es5Constructor")?parentNativeCtor.es5Constructor:parentNativeCtor).call(this,t)}if(childCtor)if(e=childCtor.call(this,t))return e;if(--this._goUp,0===this._goUp)if(!this._useNativeAsMain)if(this.init&&this.init(),this._initComplete&&this._initComplete(),this._isInitialized=!0,this._allowEvents&&this._allowEvents(),this._constructionDone&&this._constructionDone(),!1===this._isAbstractInitialized){if(!(o=this.getName&&this.getName()))o=this._moduleName;Env.IoC.resolve("ILogger").error("core-extend",'ÐÑи иниÑиализаÑии компоненÑа "'+o+'" ÑÑнкÑÐ¸Ñ init не бÑла вÑзвана Ð´Ð»Ñ Ð²ÑÐµÑ Ð¿Ñедков. ÐÑовеÑÑÑе, ÑÑо Ð´Ð»Ñ Ð²ÑÐµÑ init вÑзван init пÑедка.')}}if("[object Array]"===Object.prototype.toString.call(classPrototype))classExtender=mixinsList,mixinsList=classPrototype,classPrototype=void 0;if("[object Array]"!==Object.prototype.toString.call(mixinsList))classExtender=mixinsList,mixinsList=void 0;if(classPrototype&&"function"==typeof classPrototype.beforeExtend)classPrototype.beforeExtend.call(this,classPrototype,mixinsList,classExtender);if(1===arguments.length||simpleExtend.isCompatibleParent(classPrototype)&&simpleExtend.isCompatibleChild(classExtender))return simpleExtend.extend(classPrototype||Object,mixinsList||[],classExtender);if(mixinsList)classPrototype=coreExtend.mixin(classPrototype,mixinsList);if(classExtender&&"_options"in classExtender)throw new Error("ÐÑибка в опÑеделении клаÑÑа: ÑекÑÐ¸Ñ _options в наÑледнике должна бÑÑÑ Ð²Ð½ÑÑÑи ÑекÑии $protected, а не в коÑне");var parentProto=classPrototype.prototype,useNativeConstructorFirst=parentProto&&parentProto._useNativeAsMain,parentCtor=parentProto&&parentProto.$constructor||null,parentNativeCtor=parentProto&&parentProto.constructor||null,childCtor=classExtender.$constructor,constructor=function(){},classResult;if(classResult=classExtender.$constructor=function constructFn(cfg){var result;if(isDebug){if(this instanceof Window)return void Env.IoC.resolve("ILogger").error("core-extend","ÐÑи иниÑиализаÑии компоненÑа вмеÑÑо конÑÑола бÑл пеÑедан window. СледÑÐµÑ Ð¿Ð¾ÑÑавиÑÑ ÑоÑÐºÑ Ð¾ÑÑÐ°Ð½Ð¾Ð²Ñ Ð² меÑÑо оÑибки и изÑÑиÑÑ ÑÑек вÑзова.");if("string"==typeof this._moduleName)result=eval("(function "+this._moduleName.replace(/[/:.\-]/g,"_")+"() { return constructorInternal.apply(this, arguments); })").apply(this,arguments);else result=constructorInternal.apply(this,arguments)}else result=constructorInternal.apply(this,arguments);return result},constructor.prototype=classPrototype.prototype,classResult.prototype=new constructor,coreInitializer.extend(classPrototype.prototype,classExtender),mergePropertiesToPrototype(classResult,classExtender),classExtender.destroy&&"isDestroyed"in classResult.prototype&&"function"==typeof classResult.prototype.isDestroyed)classResult.prototype.destroy=forAliveOnly(classExtender.destroy);
56if(simpleExtend._inheritStatic(classPrototype||Object,classResult),classResult.prototype.$constructor=classExtender.$constructor,classResult.extend=localExtend,classResult.extendPlugin=localExtendPlugin,classResult.mixin=localMixin,"undefined"!=typeof Proxy&&classPrototype.hasOwnProperty("es5Constructor"))classResult.superclass=new Proxy(classPrototype.prototype,{get:function(t,e){if("constructor"===e)return t.constructor.es5Constructor;else return t[e]}});else classResult.superclass=classPrototype.prototype;return classResult}}(),extendPlugin:function(t,e){var o,r,n,i,s,c,l,a,p=t.prototype,u=!!objectFind(p._plugins,(function(t){return t===e}));if(!u){if(!isEmptyObject(e.$protected))p._initializer=callNext.call(p._initializer,coreInitializer.build(e));for(n in e.$withoutCondition=coreHash(e.$withoutCondition||[]),o=function(o,r){var n,i;if(p.hasOwnProperty(o))n=p[o];else if(t.superclass)n=function(){var e=t.superclass[o];if(e)return e.apply(this,arguments)};if(n)if(i="destroy"===o?"callBefore":"callNext",e.$condition&&void 0===e.$withoutCondition[o])p[o]=n[i+"WithCondition"](r,e.$condition);else p[o]=n[i](r)},r=function(t,r){if(p[t])o(t,r);else if(e.$condition)p[t]=void 0===e.$withoutCondition[t]?callIf.call(r,e.$condition):r;else p[t]=r},e)if(e.hasOwnProperty(n)&&!(n in{$constructor:!0,$protected:!0,init:!0,$condition:!0,$withoutCondition:!0}))r(n,e[n]);if(!Env.detection.isModernIE)for(i=["valueOf","toString"],n=0;n<i.length;n++)if(e.hasOwnProperty(i[n]))r(i[n],e[i[n]]);if(e.$constructor)if(o("init",e.$constructor),s=require("Lib/Control/Control").ControlStorage)for(a in c=e.$constructor,l=s.getControls())if(l.hasOwnProperty(a))if(l[a]instanceof t)c.apply(l[a]);p._plugins=(p._plugins||[]).concat(e)}},mixin:function(t,e){function o(t){var e;if(t){if((e=Object.getPrototypeOf(t))&&e.constructor!==Object)o(e);Object.getOwnPropertyNames(t).forEach((function(e){if(void 0===(a=Object.getOwnPropertyDescriptor(t,e)).set&&void 0===a.get&&!i.includes(e))if((p=a.value)&&"[object Object]"===Object.prototype.toString.call(p))for(var o in p)r(o,p[o],e);else r(e,p,"instead")}))}}function r(t,e,o){if("function"==typeof e)if("instead"===o||"function"!=typeof d.prototype[t])d.prototype[t]=e;else{var r=u[o].call(d.prototype[t],e);d.prototype[t]=r}}var n,i,s,c,l,a,p,u,d;if(e&&"[object Object]"===Object.prototype.toString.call(e))e=[e];for(n={},i=["$protected","$constructor","constructor","initMixin","es5Constructor","prototype"],c=e.length,a={},u={around:callAround,after:callNext,before:callBefore},l=0;l<c;l++){if((a=e[l]).$protected)n=coreMerge(n,a.$protected,{clone:!0});if(a.$constructor)s=s?callNext.call(s,a.$constructor):a.$constructor}for(d=coreExtend.extend(t,{$protected:n,$constructor:s||function(){}}),l=0;l<c;l++)o(a=e[l]);return d.prototype._mixins=(d.prototype._mixins||[]).concat(e),d}};return simpleExtend.setInheritedExtend((function(t,e){return coreExtend.extend(this,t,e)})),coreExtend.extend.extend=coreExtend.extend,coreExtend.extend.mixin=coreExtend.mixin,coreExtend.extend.extendPlugin=coreExtend.extendPlugin,coreExtend.extend.classicExtend=classicExtend,coreExtend.extend})); 57define("Core/core-classicExtend",["require","exports"],(function(o,t){return function(o,t){var e=function(){};e.prototype=t.prototype,o.prototype=new e,o.prototype.constructor=o,o.superclass=t.prototype}})); 58define("Core/core-extend-initializer",["require","exports","Types/object","Core/helpers/Function/shallowClone","Core/core-merge","Core/property-merge"],(function(e,t,r,i,n,o){var p=[],s=/"REF\((\d+)\)"/g,l=/"CUSTOMTYPE\((\d+)\)"/g,a=/"\+INF"/g,c=/"\-INF"/g,f=/"UNDEF!"/g,u=/^[_a-zA-Z][_a-zA-Z0-9]*$/,y=function(e){return!("function"!=typeof e&&(!e||"object"!=typeof e||r.isPlainObject(e)||Array.isArray(e)))},g=function(e){if(p[p.length]=e,e.prototype&&e.prototype.isCustomType)return"CUSTOMTYPE("+(p.length-1)+")";else return"REF("+(p.length-1)+")"},h=function(e,t){var r,n,o;if(t&&"object"==typeof t){for(n in t)if(t.hasOwnProperty(n))if(o=t[n],y(o))(r=r||i(t))[n]=g(o);if(r)return r}if(t===1/0)return"+INF";else if(t===-1/0)return"-INF";else if(!isNaN(Number(e))&&Number(e)>=0&&void 0===t)return"UNDEF!";else return t},d=function(e,t,i){var n;if(y(e))n='"'+g(e)+'"';else n=JSON.stringify(e,h);if(n)n=(n=(n=(n=(n=n.replace(s,"storage[$1]")).replace(l,"new storage[$1]()")).replace(a,"Infinity")).replace(c,"-Infinity")).replace(f,"undefined");if(!u.test(t))t='["'+t+'"]';else t="."+t;if(r.isPlainObject(e))if("{}"===n||"[]"===n)i.push("this"+t+"= this"+t+" || "+n+";");else i.push("compVal = "+n+";"),i.push("this"+t+" !== undefined ? propertyMerge(compVal, this"+t+") : this"+t+"= compVal;");else i.push("this"+t+"="+n+";")},N=function(e){var t,r=["var compVal;"];for(t in e.$protected)if(e.$protected.hasOwnProperty(t))d(e.$protected[t],t,r);return new Function("propertyMerge","storage",r.join("\n"))},_=function(e){var t,r;if(e)if(e.prototype._initializer)r={},e.prototype._initializer.call(r,o),t=r;else t=n(F(e.superclass&&e.superclass.$constructor),e.prototype.$protected&&e.prototype.$protected._options||{},{clone:!0});else t={};return t},F=function(e,t){if(e)return m(e,t,_(e));else return{}},m=function(e,t,r){var i=r&&r._options||{};if(o(t,i),e.prototype._contentAliasing)i=e.prototype._contentAliasing.apply(r,[i,i]);return i};return{build:N,extend:function(e,t){var r;t._initializer=function(){if(e&&e._initializer)e._initializer.call(this,o,p);(r=r||N(t)).call(this,o,p)}}
58,call:_,getInstanceOptions:F,getInstanceOptionsByDefaults:m}})); 59define("Core/core-merge",["require","exports"],(function(e,n){"use strict";function t(e){return e&&(e.constructor===Object&&!("$constructor"in e)||e.constructor===Array)}function r(e,n){switch(e){case null:return!n.noOverrideByNull;case void 0:return!n.noOverrideByUndefined;default:return!0}}function o(e,n,o,c,f){if("object"==typeof n[o]&&null!==n[o]&&c.clone)if(t(n[o]))e[o]=i(n[o]instanceof Array?[]:{},n[o],c,o,f);else e[o]=n[o];else if(r(n[o],c))e[o]=n[o]}function i(e,n,c,f,l){if(n instanceof Date)if(c.clone)return new Date(n);else return n;if(null!==e&&"object"==typeof e&&null!==n&&"object"==typeof n){if(l.keys.push(null===f?".":f),l.objects.indexOf(n)>-1)throw new Error(`Recursive traversal detected for path "${l.keys.join(" -> ")}" with ${n}`);l.objects.push(n);for(const r in n)if(n.hasOwnProperty(r))if(!c.ignoreRegExp||!c.ignoreRegExp.test(r))if(void 0===e[r]){if(c.create)if(null===n[r])e[r]=null;else o(e,n,r,c,l)}else if(!c.preferSource)if(e[r]&&"object"==typeof e[r]&&"object"==typeof n[r]){if(e[r]instanceof Date)if(n[r]instanceof Date){if(c.clone)e[r]=new Date(+n[r]);else e[r]=n[r];continue}else e[r]=n[r]instanceof Array?[]:{};else if(n[r]instanceof Date){if(c.clone)e[r]=new Date(+n[r]);else e[r]=n[r];continue}if(c.rec&&(t(n[r])||null===n[r])&&Object.keys(e[r]).length>0)e[r]=i(e[r],n[r],c,r,l);else e[r]=n[r]}else o(e,n,r,c,l);else if("object"==typeof e[r]&&"object"==typeof n[r]&&c.rec)if(t(n[r])||null===n[r])e[r]=i(e[r],n[r],c,r,l);l.keys.pop(),l.objects.pop()}else if(r(n,c)&&!c.preferSource)e=n;return e}const c={preferSource:!1,rec:!0,clone:!1,create:!0,noOverrideByNull:!1,noOverrideByUndefined:!1};return function(e,n,t){return i(e,n,{...c,...t||{}},null,{keys:[],objects:[]})}})); 60define("Core/helpers/Function/shallowClone",["require","exports","Core/core-merge"],(function(e,r,n){"use strict";return function(e){let r;if(Array.isArray(e))r=e.slice(0);else r=n({},e,{clone:!1,rec:!1});return r}})); 61define("Core/property-merge",["require","exports"],(function(e,t){var o=Object.prototype.toString;return function e(t,i){for(var r in t)if(t.hasOwnProperty(r)){if(!i)i={};if(r in i)if("object"==typeof t[r])if("[object Object]"==o.call(t[r])&&t[r])if(!("_goUp"in t[r])&&Object.getPrototypeOf(t[r])===Object.prototype)if("[object Object]"==o.call(i[r])&&i[r])if(!("_goUp"in i[r])&&Object.getPrototypeOf(i[r])===Object.prototype)e(t[r],i[r]);else if("isCustomType"in i[r])i[r].updateProperties(t[r]);else i[r]=t[r];else i[r]=t[r];else i[r]=t[r];else i[r]=t[r];else if("[object Object]"==o.call(i[r])&&i[r]&&"isCustomType"in i[r]);else i[r]=t[r];else i[r]=t[r]}}})); 62define("Core/core-hash",["require","exports"],(function(n,r){return function(){var n,r=arguments.length>1?Array.prototype.slice.call(arguments):arguments[0],e={};if(r instanceof Array||r instanceof Object)for(n in r)if(r.hasOwnProperty(n))if(typeof r[n]in{boolean:null,number:null,string:null})e[""+r[n]]=n;return e}})); 63define("Core/core-simpleExtend",["require","exports","Env/Env"],(function(require,exports,Env){var inheritedExtend=function(e,t){return simpleExtend.extend(this,e,t)},isDebug=!!Env.cookie.get("s3debug"),simpleExtend={isCompatibleParent:function(e){return!e||e instanceof Function&&e.prototype&&!e.prototype.$constructor},isCompatibleChild:function(e){return e&&!e.$constructor&&!e.$protected},setInheritedExtend:function(e){inheritedExtend=e},extend:function(Parent,mixins,overrides){var Child,Foo,i,count;if(!(Parent instanceof Function))overrides=mixins,mixins=Parent,Parent=Object;if(!(mixins instanceof Array))overrides=mixins,mixins=void 0;if(!overrides)overrides={};if(!overrides.hasOwnProperty("constructor"))overrides.constructor=function(){function constructorInternal(){if(Parent!==overrides.constructor)(Parent.hasOwnProperty("es5Constructor")?Parent.es5Constructor:Parent).apply(this,arguments)}if(isDebug)try{var moduleName=overrides.constructor.prototype._moduleName||overrides._moduleName;eval("(function "+moduleName.replace(/[/:.-]/g,"_")+"() { constructorInternal.apply(this, arguments); })").apply(this,arguments)}catch(e){constructorInternal.apply(this,arguments)}else constructorInternal.apply(this,arguments)};if(Child=overrides.constructor,Foo=function(){},Foo.prototype=Parent.prototype,Child.prototype=new Foo,"undefined"!=typeof Proxy&&Parent.hasOwnProperty("es5Constructor"))Child.superclass=new Proxy(Parent.prototype,{get:function(e,t){if("constructor"===t)return e.constructor.es5Constructor;else return e[t]}});else Child.superclass=Parent.prototype;if(mixins)for(i=0,count=mixins.length;i<count;i++)this._mixin(Child.prototype,mixins[i]);return this._override(Child.prototype,overrides),this._inheritStatic(Parent,Child),Child.extend=inheritedExtend,Child},_mixin:function(e,t){if(t instanceof Object){if(!e.hasOwnProperty("_mixins"))e._mixins=e._mixins?e._mixins.slice():[];e._mixins.push(t);var r=function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))};if(Object.getOwnPropertyNames(t).forEach(r),Object.getOwnPropertySymbols)Object.getOwnPropertySymbols(t).forEach(r);this._checkIgnoredPropertiesInIE(e,t)}},_override:function(e,t){if(t instanceof Object){if(Object.getOwnPropertyNames(t).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),Object.getOwnPropertySymbols)Object.getOwnPropertySymbols(t).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}));this._checkIgnoredPropertiesInIE(e,t)}},_inheritStatic:function(e,t){if(e!==Object&&e.constructor!==Object){var r,n,o,i=Object.getOwnPropertyNames(e);for(o=0,n=i.length;o<n;o++)switch(r=i[o]){case"length":case"caller":case"arguments":case"superclass":case"extend":case"beforeExtend":case"toJSON":case"es5Constructor":break;default:if(!t.hasOwnProperty(r))Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}this._inheritStatic(Object.getPrototypeOf(e),t)}},_checkIgnoredPropertiesInIE:function(e,t){if(!Env.detection.isModernIE){var r,n,o=["constructor","valueOf","toString"];for(n=0;n<o.length;n++)if(r=o[n],t.hasOwnProperty(r))e[r]=t[r]}}};return simpleExtend})); 64define("Core/helpers/Function/callAround",["require","exports"],(function(r,e){"use strict";return function(r,e){if(arguments.length<2)e=r,r=this;if(e)return function(){return Array.prototype.unshift.call(arguments,r),e.apply(this,arguments)};else return r}})); 65define("Core/helpers/Function/callBefore",["require","exports"],(function(e,r){"use strict";return function(e,r){if(arguments.length<2)r=e,e=this;if(r)return function(){const t=r.apply(this,arguments);if(void 0!==t)Array.prototype.push.call(arguments,t);return e.apply(this,arguments)};else return e}})); 66define("Core/helpers/Function/callIf",["require","exports"],(function(t,e){"use strict";return function(t,e){if(arguments.length<2)e=t,t=this;return function(){if(e&&e.apply(this,[]))return t.apply(this,arguments)}}})); 67define("Core/helpers/Function/callNext",["require","exports"],(function(t,e){"use strict";return function(t,e){if(arguments.length<2)e=t,t=this;return function(){const r=t.apply(this,arguments);let n;if(e)Array.prototype.push.call(arguments,r),n=e.apply(this,arguments);return void 0===n?r:n}}})); 68define("Core/helpers/Function/forAliveOnly",["require","exports"],(function(n,e){"use strict";return function(n,e){const r=function(){const r=e||this;if(!r.isDestroyed())return n.apply(r,arguments)};return r.wrappedFunction=n,r}})); 69define("Core/helpers/Object/find",["require","exports","Core/helpers/Object/findKey","Core/helpers/Array/findIndex"],(function(e,r,n,i){return function(e,r,t,f){var o,d;if(Array.isArray(e))return-1===(o=i(e,r,t))?f:e[o];else return void 0===(d=n(e,r,t))?f:e[d]}})); 70define("Core/helpers/Array/findIndex",["require","exports"],(function(r,e){"use strict";return function(r,e,i){let n=-1;if(!Array.isArray(r))return n;if(!e)e=r=>!!r;for(let t=0,f=r.length;t<f;t++)if(t in r)if(e.call(i,r[t],t,r)){n=t;break}return n}})); 71define("Core/helpers/Object/findKey",["require","exports"],(function(e,r){return function(e,r,t,n){var i,o=n;if("[object Object]"!==Object.prototype.toString.call(e))return o;if(!r)r=function(e){return!!e};for(i in e)if(e.hasOwnProperty(i))if(r.call(t,e[i],i,e)){o=i;break}return o}})); 72define("Core/helpers/Object/isEmpty",["require","exports"],(function(t,e){"use strict";const r=Object.prototype.toString;return function(t){if(null===t||"object"!=typeof t)return!1;if("[object Object]"===r.call(t)||t instanceof Object)for(const e in t)return!1;return!0}})); 73define("Browser/base64",["require","exports","Browser/iconv"],(function(e,t,i){"use strict";
73Object.defineProperty(t,"__esModule",{value:!0});const o={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",utf8:"UTF-8",win1251:"WINDOWS-1251",auto:"AUTO",noConvert:"NOCONVERT",encode(e,t="UTF-8"){let o;if((t="string"!=typeof t?this.utf8:t.toUpperCase())===this.utf8)e=i.default.unicode2utf(e);else if(t===this.win1251)e=i.default.unicode2win(e);else if(t===this.auto)e=i.default.autoDetect(e,!0);else if(t===this.noConvert);else e=encodeURIComponent(e);if("function"!=typeof btoa||t===this.noConvert)o=this._encode(e);else o=btoa(e);return o},decode(e,t="UTF-8"){let o;if(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,""),"function"!=typeof atob)o=this._decode(e);else o=atob(e);if((t="string"!=typeof t?this.utf8:t.toUpperCase())===this.utf8)o=i.default.utf2unicode(o);else if(t===this.win1251)o=i.default.win2unicode(o);else if(t===this.auto)o=i.default.autoDetect(o);else if(t===this.noConvert);else o=decodeURIComponent(o);return o},_encode(e){let t,i,o,r,n,f,s,a="",h=0;for(;h<e.length;){if(t=e.charCodeAt(h++),i=e.charCodeAt(h++),o=e.charCodeAt(h++),r=t>>2,n=(3&t)<<4|i>>4,f=(15&i)<<2|o>>6,s=63&o,isNaN(i))f=s=64;else if(isNaN(o))s=64;a+=this._keyStr.charAt(r)+this._keyStr.charAt(n)+this._keyStr.charAt(f)+this._keyStr.charAt(s)}return a},_decode(e){let t,i,o,r,n,f,s,a="",h=0;for(;h<e.length;){if(r=this._keyStr.indexOf(e.charAt(h++)),n=this._keyStr.indexOf(e.charAt(h++)),f=this._keyStr.indexOf(e.charAt(h++)),s=this._keyStr.indexOf(e.charAt(h++)),t=r<<2|n>>4,i=(15&n)<<4|f>>2,o=(3&f)<<6|s,a+=String.fromCharCode(t),64!==f)a+=String.fromCharCode(i);if(64!==s)a+=String.fromCharCode(o)}return a}};t.default=o})); 74define("Browser/iconv",["require","exports"],(function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});const o={_CP1251ToUnicode:{128:1026,129:1027,130:8218,131:1107,132:8222,133:8230,134:8224,135:8225,136:8364,137:8240,138:1033,139:8249,140:1034,141:1036,142:1035,143:1039,144:1106,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:65533,153:8482,154:1113,155:8250,156:1114,157:1116,158:1115,159:1119,160:160,161:1038,162:1118,163:1032,164:164,165:1168,166:166,167:167,168:1025,169:169,170:1028,171:171,172:172,173:173,174:174,175:1031,176:176,177:177,178:1030,179:1110,180:1169,181:181,182:182,183:183,184:1105,185:8470,186:1108,187:187,188:1112,189:1029,190:1109,191:1111},_UnicodeToCP1251:{1026:128,1027:129,8218:130,1107:131,8222:132,8230:133,8224:134,8225:135,8364:136,8240:137,1033:138,8249:139,1034:140,1036:141,1035:142,1039:143,1106:144,8216:145,8217:146,8220:147,8221:148,8226:149,8211:150,8212:151,65533:152,8482:153,1113:154,8250:155,1114:156,1116:157,1115:158,1119:159,160:160,1038:161,1118:162,1032:163,164:164,1168:165,166:166,167:167,1025:168,169:169,1028:170,171:171,172:172,173:173,174:174,1031:175,176:176,177:177,1030:178,1110:179,1169:180,181:181,182:182,183:183,1105:184,8470:185,1108:186,187:187,1112:188,1029:189,1109:190,1111:191},unicode2win(e){let r="";for(let o=0;o<e.length;o++){const t=e.charCodeAt(o);if(t<128)r+=String.fromCharCode(t);else if(t>=1040&&t<=1103)r+=String.fromCharCode(t-848);else if(t in this._UnicodeToCP1251)r+=String.fromCharCode(this._UnicodeToCP1251[t]);else r+=""}return r},win2unicode(e){let r="";for(let o=0;o<e.length;o++){const t=e.charCodeAt(o);if(t<128)r+=String.fromCharCode(t);else if(t>=192&&t<=255)r+=String.fromCharCode(t+848);else if(t in this._CP1251ToUnicode)r+=String.fromCharCode(this._CP1251ToUnicode[t]);else r+=""}return r},unicode2utf(e){let r="";for(let o=0;o<e.length;o++){let t=e.charCodeAt(o);if(t<128)r+=String.fromCharCode(t);else if(t<=2047)r+=String.fromCharCode(t>>6|192),r+=String.fromCharCode(63&t|128);else if(t<=65535)r+=String.fromCharCode(t>>12|224),r+=String.fromCharCode(t>>6&63|128),r+=String.fromCharCode(63&t|128);else if(t<=1114111){if(55296!=(64512&t))throw new RangeError(`Unmatched tail surrogate at ${o}`);const i=e.charCodeAt(++o);if(56320!=(64512&i))throw new RangeError("Unmatched lead surrogate at "+(o-1));t=((1023&t)<<10)+(1023&i)+65536,r+=String.fromCharCode(t>>18|240),r+=String.fromCharCode(t>>12&63|128),r+=String.fromCharCode(t>>6&63|128),r+=String.fromCharCode(63&t|128)}else throw new Error("Invalid Unicode code point")}return r},utf2unicode(e){let r="",o=0;if(""===e.substring(0,3))e=e.substring(3);const t=(e,r)=>{throw new Error(`Invalid continuation byte at ${r} (index: ${e})`)};for(;o<e.length;){const i=e.charCodeAt(o);if(i<128)r+=String.fromCharCode(i),o++;else if(i<194)throw new Error("Invalid UTF-8 detected");else if(i<224){const n=e.charCodeAt(o+1);if(128!=(192&n))t(o+1,n);r+=String.fromCharCode((31&i)<<6|63&n),o+=2}else if(i<240){const n=e.charCodeAt(o+1);if(128!=(192&n))t(o+1,n);if(224===i&&n<160)t(o+1,n);const d=e.charCodeAt(o+2);if(128!=(192&d))t(o+2,d);
74r+=String.fromCharCode((15&i)<<12|(63&n)<<6|63&d),o+=3}else if(i<245){const n=e.charCodeAt(o+1);if(128!=(192&n))t(o+1,n);if(240===i&&n<144)t(o+1,n);if(244===i&&n>=144)t(o+1,n);const d=e.charCodeAt(o+2);if(128!=(192&d))t(o+2,d);const f=e.charCodeAt(o+3);if(128!=(192&f))t(o+3,f);let C=(7&i)<<18|(63&n)<<12|(63&d)<<6|63&f;C-=65536,r+=String.fromCharCode(55296|C>>10&1023),r+=String.fromCharCode(56320|1023&C),o+=4}else throw new Error("Invalid UTF-8 detected")}return r},autoDetect(e,r){let t;if(r)try{t=o.unicode2utf(e)}catch{t=o.unicode2win(e)}else try{let r=0,i=0;t=o.utf2unicode(e);for(let e=0;e<t.length;e++){const o=t.charCodeAt(e);if(o>=1040&&o<=1103)r++}for(let r=0;r<e.length;r++){const o=e.charCodeAt(r);if(o>192&&o<255)i++}t=r>=i?t:o.win2unicode(e)}catch{t=o.win2unicode(e)}return t}};r.default=o})); 75!function(){function e(){define("Browser/rpcHeadersBuilder",["require","exports","Types/deferred"],(function(e,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.produce=void 0,r.produce=()=>(new n.Deferred).callback(null)}))}function r(r,c){if(!r)if(c)return e();else e();else!function(r,o){if(r&&r[s]){if(r[s]&&r[s].includes("/"))n=r[s];else n=r[s]+"/"+i.join("/");if(n===t)if(o)e();else e();else if(o){var c=u.requirejs(n);module.exports=c}else define(t,[n],(function(e){return e}))}else e()}(r.modules[o].features,c)}var n,t="Browser/rpcHeadersBuilder",s="Browser/rpcHeadersBuilder",i=t.split("/"),o=i.shift(),u=function(){return this||(0,eval)("this")}();if("function"==typeof defineFeature)defineFeature("Browser/rpcHeadersBuilder",["require","exports","Types/deferred"],(function(e,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.produce=void 0,r.produce=()=>(new n.Deferred).callback(null)}));else if(u.contents)r(u.contents,!1);else if("undefined"==typeof window)r(function(){try{contents=require("json!resources/contents")}catch(e){try{contents=require("json!contents")}catch(e){contents=""}}}()||u.requirejs("Browser/contents.json"),!1)}(); 76define("Types/deferred",["Env/Env","require","exports","optional!SbisUI/polyfill"],(function(e,r,t){var i,s,n,a;return Object.defineProperty(t,"__esModule",{value:!0}),i=function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.DeferredCanceledError=void 0;class t extends Error{constructor(e){var r,i;if(super(e),this.message=e,this.name="DeferredCanceledError",this.canceled=!0,"function"==typeof Error.captureStackTrace)null===(i=(r=Error).captureStackTrace)||void 0===i||i.call(r,this,t);else try{throw new Error}catch(e){this.stack=e.stack}}}return r.DeferredCanceledError=t,r}(0,{}),s=i,n=function(e,r,t,i){"use strict";function s(){var e,r;const t=null===(r=null===(e=globalThis.process)||void 0===e?void 0:e.domain)||void 0===r?void 0:r.req;return t&&t.get?t.get("X-RequestUUID"):null}function n(e,r,t){if(!e)return;const i=s();if(e===i)return;const n=new Error(`Deferred Ñоздан в ÑÐ°Ð¼ÐºÐ°Ñ ÑеквеÑÑа "${e}", но иÑполÑзÑеÑÑÑ Ð² "${i}".\n СÑек ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Deferred-а: ${t}`);r.error("Deferred","ÐопÑÑка взаимодейÑÑÐ²Ð¸Ñ Ñ ÑкземплÑÑом Deferred, ÑозданнÑм в дÑÑгом поÑоке.",n)}function a(e){return e._fired===u}function o(e){return e instanceof Error}function c(e){return Boolean(e&&e.addCallback&&e.addErrback)}function l(e){return function(e){return e instanceof i.DeferredCanceledError}(e)?u:o(e)?f:d}Object.defineProperty(r,"__esModule",{value:!0});const h=-1,d=0,f=1,u=2,_=[d,f,f],g={[h]:"waiting",[d]:"success",[f]:"failed",[u]:"canceled"},k="undefined"==typeof Symbol?"$skipCallbackLog$":Symbol("skipCallbackLog");globalThis.DeferredCanceledError=i.DeferredCanceledError;class b extends Promise{get logger(){return this._logger||t.IoC.resolve("ILogger")}constructor(e){super((()=>{})),this.initDeferred(e)}initDeferred(e){if(e){if(e.cancelCallback)this._cancelCallback=e.cancelCallback;if(e.parentPromise)this._parentPromise=e.parentPromise}if(this._reqUUID=s(),this._reqUUID)this._creationStack=new Error("СÑек ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Deffered-а").stack;this._chained=!1,this._chain=[],this._fired=h,this._paused=0,this._results=[void 0,void 0],this._running=!1,this._hasErrback=!1,this._logger=e&&e.logger,this._loggerAwait=e&&e.loggerAwait||setTimeout}static es5Constructor(e){b.prototype.initDeferred.call(this,e)}cancel(){if(n(this._reqUUID,this.logger,this._creationStack),this._fired===
76h){if(this._fired=u,this._results[_[this._fired]]=new i.DeferredCanceledError("Cancel"),this._parentPromise&&this._parentPromise.abort)this._parentPromise.abort();if(this._cancelCallback){const e=this._cancelCallback;this._cancelCallback=null;try{e()}catch(e){const r=e;this.logger.error("Deferred",`Cancel function throwing an error: ${null==r?void 0:r.message}`,r)}}this._fire()}return this}callback(e){if(n(this._reqUUID,this.logger,this._creationStack),!a(this))this._resback(this._check(e));return this}errback(e){if(n(this._reqUUID,this.logger,this._creationStack),!a(this))this._resback(this._check(e,!0));return this}addBoth(e){if(1!==arguments.length)throw new Error("No extra args supported");return this.addCallbacks(e,e)}addCallback(e){if(1!==arguments.length)throw new Error("No extra args supported");return this.addCallbacks(e,null)}addErrback(e){if(1!==arguments.length)throw new Error("No extra args supported");return this.addCallbacks(null,e)}addCallbacks(e,r){if(n(this._reqUUID,this.logger,this._creationStack),this._chained)throw new Error("Chained Deferreds can not be re-used");if(null!==e&&"function"!=typeof e||null!==r&&"function"!=typeof r)throw new Error("Both arguments required in addCallbacks");if(r)this._hasErrback=!0;const t=this._fired,i=t===h||this._running||this._paused>0;if(i||e&&t===d||r&&(t===f||t===u))if(this._chain.push([e,r]),!i)this._fire();return this}dependOn(e){return n(this._reqUUID,this.logger,this._creationStack),e.addCallbacks((e=>(this.callback(e),e)),(e=>(this.errback(e),e))),this}createDependent(){n(this._reqUUID,this.logger,this._creationStack);return(new b).dependOn(this)}isReady(e){return this._fired!==h&&(e?!this._paused:!0)}isCallbacksLocked(){return n(this._reqUUID,this.logger,this._creationStack),this._chained}isSuccessful(){return n(this._reqUUID,this.logger,this._creationStack),this._fired===d}getResult(){if(n(this._reqUUID,this.logger,this._creationStack),this.isReady())return this._results[_[this._fired]];throw new Error("No result at this moment. Deferred is still not ready")}finally(e){let r,t;const i=new Promise(((e,i)=>{r=e,t=i})).then((r=>(null==e||e(),r)),(r=>{throw null==e||e(),r}));return this.addCallbacks((e=>(null==r||r(e),e)),(e=>(null==t||t(e),e))),i}then(e,r){let t,i;const s=new Promise(((e,r)=>{t=e,i=r})).then(e,r);return this.addCallbacks(b.skipLogExecutionTime((e=>(t(e),e))),b.skipLogExecutionTime((e=>(i(e),e)))),s}catch(e){return this.then(null,e)}_fire(){const e=this._chain;let r=this._fired,i=this._results[_[r]],s=null;for(;e.length>0&&0===this._paused;){const n=e.shift()[_[r]];if(null!==n)try{if(this._running=!0,!n[k])i=t.coreDebug.methodExecutionTime(n,this,[i]);else i=n(i);if(r=l(i),c(i))s=b.skipLogExecutionTime((e=>{this._paused--,this._resback(e)})),this._paused++}catch(e){r=f,i=o(e)?e:new Error(e,{cause:{needShow:!0}
76}),this.logger.error("Deferred",`Callback function throwing an error: ${e.message}`,e)}finally{this._running=!1}}if(this._fired=r,this._results[_[r]]=i,s&&this._paused)i.addBoth(s),i._chained=!0}_resback(e){this._cancelCallback=null,this._fired=l(e),this._results[_[this._fired]]=e,this._fire()}_check(e,r){let i=e;if(this._fired!==h)throw new Error(`Deferred is already fired with state "${g[this._fired]}"`);if(c(i))throw new Error("DeferredLike instances can only be chained if they are the result of a callback");if(r){if(!o(i))i=new Error(String(i||""),{cause:{needShow:!0}});if(!t.constants.isBrowserPlatform){const e=new Error(`"${i.message}"`);(0,this._loggerAwait)((()=>{if(!this._hasErrback)this.logger.error("Deferred","There is no callbacks attached to handle error",e),this.logger.error("Deferred","Unhandled error",i)}))}}return i}static fromTimer(e){const r=new b;return setTimeout(r.callback.bind(r),e),r}static success(e){return(new b).callback(e)}static fail(e){const r=e instanceof Error?e:new Error(e?String(e):"",{cause:{needShow:!0}
76});return(new b).errback(r)}static nearestOf(e){const r=new b;if(e.forEach(((e,t)=>{e.addBoth((e=>{if(!r.isReady())if(e instanceof Error){const i=new Error;i.from=t,i.data=e,r.errback(i)}else r.callback({from:t,data:e});return e}))})),0===e.length)r.callback();return r}static callbackWrapper(e,r){if(e&&e instanceof b)return e.addCallback(r);else return r(e)}static skipLogExecutionTime(e){return e[k]=!0,e}static fromPromise(e){const r=new b({parentPromise:e});return e.then((e=>{r.callback(e)})).catch((e=>{r.errback(e)})),r}static toPromise(e){return new Promise(((r,t)=>{e.createDependent().addCallbacks((e=>{r(e)}),(e=>{t(e)}))}))}}return r.default=b,r}(0,{},e,i,"undefined"==typeof optional_SbisUI_polyfill||optional_SbisUI_polyfill),a=n,t.DeferredCanceledError=t.Deferred=void 0,Object.defineProperty(t,"Deferred",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"DeferredCanceledError",{enumerable:!0,get:function(){return s.DeferredCanceledError}}),t})); 77define("SbisUI/polyfill",function(){var t,e,o,r,p,n,i,a,y=[];if("undefined"==typeof Promise||!Promise.prototype.finally||!Promise.allSettled)y.push("SbisUI/polyfill/Promise");if("undefined"==typeof fetch)y.push("SbisUI/polyfill/fetch");if("undefined"==typeof AbortController)y.push("SbisUI/polyfill/AbortController");if("undefined"==typeof Promise)y.push("SbisUI/polyfill/svgExternalUse");if("undefined"!=typeof window&&"function"!=typeof window.CustomEvent)y.push("SbisUI/polyfill/customEvent");if("undefined"==typeof window||(window.wsConfig||{}).unitTestMode)return y;if(t="undefined"==typeof WeakSet||"undefined"==typeof WeakMap||"undefined"==typeof Set||"undefined"==typeof Map,e="undefined"==typeof Symbol||void 0===Symbol.iterator||void 0===Array.prototype[Symbol.iterator]||void 0===String.prototype[Symbol.iterator],t||e||function(){var t=document.createElement("span");if(!("classList"in t))return!0;else return t.classList.add("a","b"),!t.classList.contains("b")}()||(o=[Array.from,Array.isArray,Array.of,Array.prototype.copyWithin,Array.prototype.entries,Array.prototype.fill,Array.prototype.filter,Array.prototype.find,Array.prototype.findIndex,Array.prototype.flat,Array.prototype.flatMap,Array.prototype.includes,Array.prototype.keys,Array.prototype.values],r=[String.fromCodePoint,String.prototype.anchor,String.prototype.endsWith,String.prototype.includes,String.prototype.normalize,String.prototype.padEnd,String.prototype.padStart,String.prototype.repeat,String.prototype.replaceAll,String.prototype.startsWith,String.prototype.trim,String.prototype.trimEnd,String.prototype.trimStart,String.raw,String.prototype.matchAll],p=[Number.EPSILON,Number.MAX_SAFE_INTEGER,Number.MIN_SAFE_INTEGER,Number.isFinite,Number.isInteger,Number.isNaN,Number.isSafeInteger,Number.parseFloat,Number.parseInt],n=[Math.acosh,Math.asinh,Math.atanh,Math.cbrt,Math.clz32,Math.cosh,Math.expm1,Math.fround,Math.hypot,Math.imul,Math.log10,Math.log1p,Math.log2,Math.sign,Math.sinh,Math.tanh,Math.trunc],i=[Object.assign,Object.create,Object.entries,Object.fromEntries,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.getPrototypeOf,Object.is,Object.keys,Object.setPrototypeOf,Object.values],a=[Element.prototype.after,Element.prototype.animate,Element.prototype.append,Element.prototype.before,Element.prototype.cloneNode,Element.prototype.closest,Element.prototype.getAttributeNames,Element.prototype.matches,Element.prototype.prepend,Element.prototype.replaceWith,Element.prototype.scroll,Element.prototype.scrollBy,Element.prototype.toggleAttribute,Element.prototype.remove],o.concat(r).concat(p).concat(n).concat(i).concat(a).some((function(t){return void 0===t}))))y.push("SbisUI/polyfill/polyfill-ioBundle");return y}(),(function(){return Array.prototype.slice.call(arguments)})); 78define("TransportCore/transport",["i18n!TransportCore","Types/entity","Application/Env","require","exports","Types/di"],(function(e,r,t,n,o,s){var a,i,u,l,d,c,m,p,T,E,h,f,g,P,b,y,R,_,v,O,A,S;return Object.defineProperty(o,"__esModule",{value:!0}),a=function(e,r){"use strict";
78Object.defineProperty(r,"__esModule",{value:!0}),r.GrowingValue=void 0;class t{constructor(e){this.value=0,this.counter=0,this._next=this.getInitialValue,this.options={...t.defaultOptions,...e}}get count(){return this.counter}next(){return this.counter+=1,{value:this._next()}}reset(){this._next=this.getInitialValue}getInitialValue(){if(this.value=this.options.initialValue,this.value>this.options.maxValue)return this._next=this.getMaxValue,this._next();else return this._next=this.getNextValue,this.value}getNextValue(){const e=this.options.minStep,r=this.options.maxStep,t=e+Math.round(Math.random()*(r-e));if(this.value+=t,this.value>this.options.maxValue)return this._next=this.getMaxValue,this._next();else return this.value}getMaxValue(){return this.options.maxValue}}return r.GrowingValue=t,t.defaultOptions={initialValue:0,maxValue:1/0,minStep:0,maxStep:1/0},r}(0,{}),i=a,u=function(e,r){"use strict";var t;return Object.defineProperty(r,"__esModule",{value:!0}),r.isClientError=r.HTTPStatus=void 0,function(e){e[e.OK=200]="OK",e[e.PermanentRedirect=308]="PermanentRedirect",e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.RequestTimeout=408]="RequestTimeout",e[e.PayloadTooLarge=413]="PayloadTooLarge",e[e.TeaPot=418]="TeaPot",e[e.Locked=423]="Locked",e[e.UpgradeRequired=426]="UpgradeRequired",e[e.InternalServerError=500]="InternalServerError",e[e.BadGateway=502]="BadGateway",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout",e[e.Connection=0]="Connection"}(t||(r.HTTPStatus=t={})),r.isClientError=function(e){return e.status>=t.BadRequest&&e.status<t.InternalServerError},r}(0,{}),l=u,d=function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.TransportError=void 0;class t extends Error{set message(e){this.config.message=e}get message(){return this.config.message}constructor(e){super(e.message),this.name="TransportError",this.processed=!1,this._moduleName=t.moduleName,Object.setPrototypeOf(this,new.target.prototype);const{url:r,message:n,details:o,name:s}=e;this.config=e,delete this.message,this.message=n,this.stack=new Error(`${null!=n?n:""}\n${null!=o?o:""}`).stack,this.url=r,this.details=o,this.name=s||this.name}toString(){return`${this.name}: ${this.message}; url: ${this.url}`}toJSON(){return{$serialized$:"inst",id:Math.random().toString(32).slice(2),module:this._moduleName,config:this.config}}static fromJSON(e){return new this(e.config)}}return r.TransportError=t,t.moduleName="TransportCore/transport:TransportError",r}(0,{}),c=d,m=function(e,r,t){"use strict";return Object.defineProperty(r,"__esModule",{value:!0}),r.attemptRequest=void 0,r.attemptRequest=function(e){if("function"!=typeof e.makeRequest)throw new TypeError("attemptRequest(): makeRequest option is required");const r=new t.GrowingValue(e),n=e.maxAttemptCount||0,o=async()=>{const t=Date.now();try{const r=await e.makeRequest.call(null);return{result:r,time:Date.now()-t}}catch(t){if(n>0&&n<=r.count)throw t;if("function"==typeof e.onError&&e.onError.call(null,t,r.count))throw t;if(0===(null==t?void 0:t.httpError))r.reset();return await new Promise((e=>setTimeout(e,r.next().value))),o()}};return o()},r}(0,{},a),p=m,T=function(e,r,t,n,o){"use strict";return Object.defineProperty(r,"__esModule",{value:!0}),r.DETAILS_TEXT=r.ERROR_TEXT=void 0,r.ERROR_TEXT={get timeout(){return t("ТаймаÑÑ Ð·Ð°Ð¿ÑоÑа")},get unknown(){return t("ÐеизвеÑÑÐ½Ð°Ñ Ð¾Ñибка")},get parsererror(){return t("ÐÑибка ÑазбоÑа докÑменÑа")},get abort(){return t("ÐапÑÐ¾Ñ Ð±Ñл пÑеÑван")},get lossOfConnection(){return t("ÐÑоизоÑел ÑазÑÑв ÑоединениÑ")},get[n.HTTPStatus.Unauthorized](){return t("ÐÑибка авÑоÑизаÑии")},get[n.HTTPStatus.Forbidden](){return t("У Ð²Ð°Ñ Ð½ÐµÐ´Ð¾ÑÑаÑоÑно пÑав Ð´Ð»Ñ Ð²ÑÐ¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ð´Ð°Ð½Ð½Ð¾Ð³Ð¾ дейÑÑвиÑ")},get[n.HTTPStatus.NotFound](){return`${t("ÐокÑÐ¼ÐµÐ½Ñ Ð½Ðµ найден")}. Url: ${o.location.href}`},get[n.HTTPStatus.PayloadTooLarge](){return t("ÐÑевÑÑен допÑÑÑимÑй ÑÐ°Ð·Ð¼ÐµÑ Ð·Ð°Ð³ÑÑжаемого Ñайла")},get[n.HTTPStatus.Locked](){return t("Ð¡ÐµÐ°Ð½Ñ Ð·Ð°Ð±Ð»Ð¾ÐºÐ¸Ñован")},get[n.HTTPStatus.InternalServerError](){return t("ÐнÑÑÑеннÑÑ Ð¾Ñибка ÑеÑвеÑа")},get[n.HTTPStatus.BadGateway](){return t("СеÑÐ²Ð¸Ñ Ð½Ð°Ñ
одиÑÑÑ Ð½Ð° ÑеÑ
ниÑеÑком обÑлÑживании")},get[n.HTTPStatus.ServiceUnavailable](){return t("СеÑÐ²Ð¸Ñ Ð½Ð°Ñ
одиÑÑÑ Ð½Ð° ÑеÑ
ниÑеÑком обÑлÑживании")},get[n.HTTPStatus.GatewayTimeout](){return t("СеÑÐ²Ð¸Ñ Ð½Ð°Ñ
одиÑÑÑ Ð½Ð° ÑеÑ
ниÑеÑком обÑлÑживании")}},r.DETAILS_TEXT={get default(){return t("ÐÑ Ð·Ð½Ð°ÐµÐ¼ об ÑÑом и Ñже иÑпÑавлÑем. ÐопÑобÑйÑе заглÑнÑÑÑ ÑÑда ÑеÑез 15 минÑÑ.")},get lossOfConnection(){return t("ÐÑовеÑÑÑе подклÑÑение к инÑеÑнеÑÑ")}},r}(0,{},e,u,t),E=T,h=function(e,r,t,n){"use strict";
78Object.defineProperty(r,"__esModule",{value:!0}),r.AbortError=void 0;class o extends n.TransportError{constructor(e){super({url:e,message:t.ERROR_TEXT.abort}),this.canceled=!0,this._moduleName=o.moduleName}}return r.AbortError=o,o.moduleName="TransportCore/transport:AbortError",r}(0,{},T,d),f=h,g=function(e,r,t,n,o){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.AuthError=void 0;class s extends o.TransportError{constructor(e){super({url:e,message:n.ERROR_TEXT[t.HTTPStatus.Unauthorized]}),this.name="AuthError",this._moduleName=s.moduleName}}return r.AuthError=s,s.moduleName="TransportCore/transport:AuthError",r}(0,{},u,T,d),P=g,b=function(e,r,t,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ConnectionError=void 0;class o extends n.TransportError{constructor(e){super({url:e,message:t.ERROR_TEXT.lossOfConnection,details:t.DETAILS_TEXT.lossOfConnection}),this.name="ConnectionError",this._moduleName=o.moduleName,this._isOfflineMode=!0}}return r.ConnectionError=o,o.moduleName="TransportCore/transport:ConnectionError",r}(0,{},T,d),y=b,R=function(e,r,t,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.HTTPError=void 0;class o extends n.TransportError{constructor(e,r,n,s,a){super("object"==typeof e&&null!==e&&!Array.isArray(e)?e:{message:e,httpError:r,url:n||"",payload:s,details:a}),this.payload="",this._moduleName=o.moduleName;const i=this.config;this.payload=i.payload||"",this.details=this.details||t.DETAILS_TEXT.default,this.xhr=i.xhr;const u=""===i.httpError?void 0:i.httpError;this.status="string"==typeof u?Number(u)||500:u,this.httpError=void 0!==this.status?this.status:""}toString(){return`${this.name}: ${this.message}; httpError: ${this.httpError}; url: ${this.url}`}}return r.HTTPError=o,o.moduleName="TransportCore/transport:HTTPError",r}(0,{},T,d),_=R,v=function(e,r,t,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ParseError=void 0;class o extends n.TransportError{constructor({url:e,details:r}){super({url:e,details:r,message:t.ERROR_TEXT.parsererror}),this.name="ParseError",this._moduleName=o.moduleName}}return r.ParseError=o,o.moduleName="TransportCore/transport:ParseError",r}(0,{},T,d),O=v,A=function(e,r,t,n,o){"use strict";var s;Object.defineProperty(r,"__esModule",{value:!0}),r.createError=r.AccessDeniedError=void 0,function(e){e[e.DENIED=0]="DENIED",e[e.READ=1]="READ",e[e.WRITE=2]="WRITE"}(s||(s={}));class a extends n.HTTPError{constructor(e){super(e),this._moduleName=a.moduleName,this.addinfo=e.addinfo}toString(){return`${this.name}: ${this.message}; AccessDenied: ${this.httpError}; url: ${this.url}`}}return r.AccessDeniedError=a,a.moduleName="TransportCore/transport:AccessDeniedError",r.createError=function(e){var r;let n;if("object"==typeof e&&1===arguments.length){const t={};n=new o.Record({adapter:"adapter.sbis",format:[{name:"IsOrLogic",type:"boolean"}
78,{name:"AccessTable",type:"object"}]}),n.set({IsOrLogic:1===(null==e?void 0:e.mode)||0===(null==e?void 0:e.mode),AccessTable:null!==(r=null==e?void 0:e.rights)&&void 0!==r?r:t})}if("string"==typeof e&&1===arguments.length)n=new o.Record({adapter:"adapter.sbis",format:[{name:"AdminMsg",type:"string"}]}),n.set({AdminMsg:e});if(arguments.length>1){const r={name:"Ids",type:arguments[3]instanceof Array?"Array":"boolean"};if("Array"===r.type)r.kind="number"==typeof arguments[3][0]?"integer":"string";n=new o.Record({adapter:"adapter.sbis",format:[{name:"Zones",type:"Array",kind:"string"},{name:"Constraint",type:"string"},{name:"IsRead",type:"boolean"},r]}),n.set({Zones:e,Constraint:arguments[1],IsRead:arguments[2],Ids:arguments[3]})}const s=new o.Record({adapter:"adapter.sbis",format:[{name:"UserId",type:"integer"},{name:"Comment",type:"string"},{name:"RightsParams",type:"record"}]});return s.set({UserId:"",Comment:"",RightsParams:n}),new a({httpError:t.HTTPStatus.Forbidden,url:"",message:"",details:"",addinfo:new o.Record({rawData:{Handler:"AccessRequest.Send",HandlerParams:s}})})},r}(0,{},u,R,r),S=A,o.createAccessDeniedError=o.AccessDeniedError=o.TransportError=o.ParseError=o.isClientError=o.HTTPStatus=o.HTTPError=o.GrowingValue=o.ERROR_TEXT=o.DETAILS_TEXT=o.ConnectionError=o.AuthError=o.attemptRequest=o.AbortError=void 0,Object.defineProperty(o,"HTTPStatus",{enumerable:!0,get:function(){return l.HTTPStatus}}),Object.defineProperty(o,"isClientError",{enumerable:!0,get:function(){return l.isClientError}}),Object.defineProperty(o,"TransportError",{enumerable:!0,get:function(){return c.TransportError}}),Object.defineProperty(o,"HTTPError",{enumerable:!0,get:function(){return _.HTTPError}}),Object.defineProperty(o,"AccessDeniedError",{enumerable:!0,get:function(){return S.AccessDeniedError}}),Object.defineProperty(o,"createAccessDeniedError",{enumerable:!0,get:function(){return S.createError}}),Object.defineProperty(o,"ParseError",{enumerable:!0,get:function(){return O.ParseError}}),Object.defineProperty(o,"ConnectionError",{enumerable:!0,get:function(){return y.ConnectionError}}),Object.defineProperty(o,"AuthError",{enumerable:!0,get:function(){return P.AuthError}}),Object.defineProperty(o,"AbortError",{enumerable:!0,get:function(){return f.AbortError}}),Object.defineProperty(o,"ERROR_TEXT",{enumerable:!0,get:function(){return E.ERROR_TEXT}}),Object.defineProperty(o,"DETAILS_TEXT",{enumerable:!0,get:function(){return E.DETAILS_TEXT}}),Object.defineProperty(o,"GrowingValue",{enumerable:!0,get:function(){return i.GrowingValue}}),Object.defineProperty(o,"attemptRequest",{enumerable:!0,get:function(){return p.attemptRequest}}),(0,s.register)(_.HTTPError.moduleName,_.HTTPError,{instantiate:!1}),(0,s.register)(O.ParseError.moduleName,_.HTTPError,{instantiate:!1}),(0,s.register)(y.ConnectionError.moduleName,_.HTTPError,{instantiate:!1}),(0,s.register)(P.AuthError.moduleName,_.HTTPError,{instantiate:!1}),(0,s.register)(f.AbortError.moduleName,_.HTTPError,{instantiate:!1}),o})); 79define("Types/PromiseAPIDeferred",["require","exports","Types/deferred"],(function(e,r,n){"use strict";function t(r){new Promise(((r,n)=>{e(["Env/Env"],r,n)})).then((({IoC:e})=>{e.resolve("ILogger").warn("Types/PromiseAPIDeferred",r)})).catch((function(e){requirejs.onError(e)}))}function c(e){if(Promise.skipLogExecutionTime)return Promise.skipLogExecutionTime(e);else return e}function a(e,r){const n=!0;return e.then(c((e=>{if(!r.isReady())if(!(e instanceof Error))r.callback(e,n);else r.errback(e,n)})),c((e=>{if(!r.isReady())r.errback(e,n)}))),r}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperties(Promise.prototype,{addCallback:{value:function(e){return a(this,(new i).addCallback(e))}},addCallbacks:{value:function(e,r){return a(this,(new i).addCallbacks(e,r))}},addErrback:{value:function(e){return a(this,(new i).addErrback(e))}},addBoth:{value:function(e){return a(this,(new i).addBoth(e))}},callback:{value:function(){throw new Error("ÐелÑÐ·Ñ Ð²ÑзваÑÑ Ð¼ÐµÑод callback Ñ Promise")}},cancel:{value:function(){throw new Error("ÐÑзÑван меÑод cancel Ñ Promise")}},createDependent:{value:function(){return this.then((e=>e),(e=>{throw e}))}},dependOn:{value:function(e){if(e instanceof Promise&&!(e instanceof n.Deferred))return Promise.reject(new Error("ÐелÑÐ·Ñ Ð²ÑзваÑÑ Ð¼ÐµÑод dependOn Ñ Promise"));let r,t;const c=new Promise(((e,n)=>{r=e,t=n}));return e.addCallbacks((e=>
79(r(e),e)),(e=>(t(e),e))),c}},errback:{value:function(){throw new Error("ÐелÑÐ·Ñ Ð²ÑзваÑÑ Ð¼ÐµÑод errback Ñ Promise")}},getResult:{value:function(){t("ÐÑзÑван меÑод getResult Ñ Promise")}},isCallbacksLocked:{value:function(){return!1}},isReady:{value:function(){return!0}},isSuccessful:{value:function(){t("ÐÑзÑван меÑод isSuccessful Ñ Promise")}}});class i extends n.Deferred{callback(e,r=!1){if(r)return super.callback(e);else return i.warnForbiddenMethod("callback"),super.callback(e)}errback(e,r=!1){if(r)return super.errback(e);else return i.warnForbiddenMethod("errback"),super.errback(e)}cancel(e=!1){if(e)return super.cancel();else return i.warnForbiddenMethod("cancel"),super.cancel()}static warnForbiddenMethod(e){t(`\n ÐÑзван меÑод ${e} Ñ deferred, полÑÑенного из Promise:\n повлиÑÑÑ Ð½Ð° иÑÑ Ð¾Ð´Ð½Ñй Promise невозможно!\n `)}}})); 80define("Controls-DataEnv/slice",["Types/entity","Application/Env","require","exports"],(function(e,t,s,i){var r,n,o,l;return Object.defineProperty(i,"__esModule",{value:!0}),r=function(e,t,s,i){"use strict";function r(e){return e instanceof Object}Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{get dataContext(){var e;return null===(e=this._$dataContext)||void 0===e?void 0:e.call(this)}constructor(e){var t;this["[ISlice]"]=!0,this._isExecuting=!1,this._queue=[],this._$dataContext=e.dataContext,this._name=e.name||"";try{this.state=this._initState(e.loadResult,e.config)}catch(s){this.state={},null===(t=null==e?void 0:e.onInitError)||void 0===t||t.call(e,s)}if(this.state instanceof Object)Object.keys(this.state).forEach((e=>{Object.defineProperty(this,e,{enumerable:!1,get(){return this.state[e]}})}));this._onChange=e.onChange,this._onCompleteBeforeApplyState=e.onCompleteBeforeApplyState,this._$onNotifySubscribers=e.onNotifySubscribers}destroy(){if(this._beforeApplyReject)this._beforeApplyReject(new s.PromiseCanceledError("slice has been destroyed"));this._onChange=void 0,this._destroyed=!0,this._$dataContext=void 0,this._$onNotifySubscribers=null,this._onCompleteBeforeApplyState=null}isDestroyed(){return this._destroyed}_beforeApplyState(e){return e}_notifySubscribers(e){var t;null===(t=this._$onNotifySubscribers)||void 0===t||t.call(this,e)}_applyState(e){this._setState({...this.state,...e})}_onRejectBeforeApplyState(){}_needRejectBeforeApply(e,t){return!1}_rejectBeforeApplyPromise(){var e;null===(e=this._beforeApplyReject)||void 0===e||e.call(this,new s.PromiseCanceledError(""))}_executeQueueIfNeed(){if(!this._destroyed)if(this._queue.length){let e={};this._queue.forEach((t=>{e={...e,...t}})),this._queue=[],this.setState(e)}}_setState(e){var t;if(this.isDestroyed())i.logger.error("Controls-DataEnv/slice:AbstractSlice::ÐÑоизоÑла попÑÑка ÑÑÑановиÑÑ ÑоÑÑоÑние в ÑниÑÑоженнÑй ÑкземплÑÑ ÑлайÑа");const s=this._onSnapshot(e)||e;this._notifySubscribers(s),this.state=s,null===(t=this._onChange)||void 0===t||t.call(this,this.state)}_onSnapshot(e){return e}_getStateFromQueue(){return this._queue.reduce(((e,t)=>({...e,...t})),{})}setState(e){if(this._destroyed)return;const t="function"==typeof e?e({...this.state,...this._stateForApply,...this._getStateFromQueue()}):e;if(this._isExecuting){let e=t;if(this._beforeApplyReject&&this._needRejectBeforeApply(t,this._stateForApply))e={...this._stateForApply,...t},this._stateForApply=null,this._rejectBeforeApplyPromise();return void this._queue.push(e)}if(0===Object.keys(t).length)return;let s;if(r(this.state)&&r(t))s=Object.keys(t).every((e=>this.state[e]===t[e]));else s=this.state===t;if(s)return this._isExecuting=!1,void this._executeQueueIfNeed();this._isExecuting=!0;const i={...this.state,...t},n=this._beforeApplyState(i);if(n instanceof Promise){this._stateForApply=t;return new Promise(((e,t)=>(this._beforeApplyReject=t,n.then((t=>e(t))).catch((e=>t(e)))))).then((e=>{this._stateForApply=null,this._setState(e)})).catch((e=>{if(!e.isCanceled)return Promise.reject(e);else return Promise.resolve(this._onRejectBeforeApplyState()).then((()=>{})).catch((()=>{}))})).finally((()=>{var e;this._beforeApplyReject=null,this._isExecuting=!1,this._stateForApply=null,null===(e=this._onCompleteBeforeApplyState)||void 0===e||e.call(this),this._executeQueueIfNeed()}))}else if(0)throw new Error("Ðз обÑабоÑÑика _beforeApplyState не веÑнÑлоÑÑ Ð½Ð¾Ð²Ð¾Ðµ ÑоÑÑоÑние");else this._setState(n),this._isExecuting=!1,this._executeQueueIfNeed()}getData(){return this.state}},t}(0,{},e,t),n=r,o=function(e,t,s){"use strict";
80Object.defineProperty(t,"__esModule",{value:!0});class i extends s.default{_initState(e,t){return e}}return t.default=i,t}(0,{},r),l=o,i.AbstractSlice=i.Slice=void 0,Object.defineProperty(i,"Slice",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(i,"AbstractSlice",{enumerable:!0,get:function(){return n.default}}),i})); 81define("Types/chain",["Types/util","Types/shim","Types/entity","Types/di","Types/collection","require","exports"],(function(e,t,r,n,s,i,u){var o,a,c,l,h,d,p,f,m,y,v,_,b,g,x,O,j,w,E,I,T,C,P,M,k,N,A,F,S,q,H,R,U,G,Z,K,z,V,$,D,B,J,L;return Object.defineProperty(u,"__esModule",{value:!0}),o=function(e,t,r,n,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i extends r.DestroyableMixin{get start(){return this._previous?this._previous.start:this}get shouldSaveIndices(){return this._previous?this._previous.shouldSaveIndices:!0}constructor(e){if(super(),this["[Types/_collection/IEnumerable]"]=!0,this["[Types/_chain/Abstract]"]=!0,e["[Types/_chain/Abstract]"])this._previous=e,this._source=this._previous._source;else this._source=e}destroy(){this._source=null,this._previous=null,super.destroy()}getEnumerator(){throw new Error("Not implemented")}each(e,t){const r=this.getEnumerator();for(;r.moveNext();)e.call(t||this,r.getCurrent(),r.getCurrentIndex())}value(e,...t){if(e instanceof Function){return e(...[this,...t])}return this.toArray()}toArray(){const e=[];return this.each((t=>{e.push(t)})),e}toObject(){const e={},t=this.getEnumerator();for(;t.moveNext();)e[t.getCurrentIndex()]=t.getCurrent();return e}reduce(e,t){let r=t,n=arguments.length<2;return this.each(((t,s)=>{if(n)return r=t,void(n=!1);r=e(r,t,s)})),r}reduceRight(e,t){if(arguments.length<2)return this.reverse().reduce(e);else return this.reverse().reduce(e,t)}map(e,t){return new((0,s.resolve)("Types/chain:Mapped"))(this,e,t)}zip(...e){return new((0,s.resolve)("Types/chain:Zipped"))(this,e)}zipObject(e){const t=Object.create(null);return this.zip(e).each((e=>{const[r,n]=e;t[r]=n})),t}pluck(e){return this.map((t=>n.object.getPropertyValue(t,e)))}invoke(e,...t){return this.map((r=>r[e](...t)))}concat(...e){return new((0,s.resolve)("Types/chain:Concatenated"))(this,e)}flatten(){return new((0,s.resolve)("Types/chain:Flattened"))(this)}group(e,t){return new((0,s.resolve)("Types/chain:Grouped"))(this,e,t)}count(e){if(void 0===e)return this.reduce((e=>Number(e)+1),0);return new((0,s.resolve)("Types/chain:Counted"))(this,e)}max(){return this.reduce(((e,t)=>{if(void 0===e)throw new Error("prev argument of .max() function is undefined");if("number"==typeof t)return t>e?t:e;else throw new Error("current argument of .max() function is not a number")}))}min(){return this.reduce(((e,t)=>{if(void 0===e)throw new Error("prev argument of .min() function is undefined");if("number"==typeof t)return t<e?t:e;else throw new Error("current argument of .min() function is not a number")}))}uniq(e){return new((0,s.resolve)("Types/chain:Uniquely"))(this,e)}union(...e){return this.concat(...e).uniq()}filter(e,t){return new((0,s.resolve)("Types/chain:Filtered"))(this,e,t)}reject(e,t){return this.filter(((...r)=>!e.apply(t,r)))}where(e){const t=Object.keys(e);return this.filter((r=>t.reduce(((t,s)=>t&&n.object.getPropertyValue(r,s)===e[s]),!0)))}first(e){if(void 0===e){const e=this.getEnumerator();return e.moveNext()?e.getCurrent():void 0}return new((0,s.resolve)("Types/chain:Sliced"))(this,0,e)}last(e){if(void 0===e)return this.reverse().first();else return this.reverse().first(e).reverse()}reverse(){return new((0,s.resolve)("Types/chain:Reversed"))(this)}sort(e){return new((0,s.resolve)("Types/chain:Sorted"))(this,e)}static propertyMapper(e){if("function"==typeof e)return e;if(void 0===e)return e=>e;else return t=>n.object.getPropertyValue(t,e)}}return t.default=i,Object.assign(i.prototype,{_source:null,_previous:null}),t}(0,{},r,e,n),a=o,c=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(e,t){this["[Types/_collection/IEnumerator]"]=!0,this.previous=e,this.items=t,this.reset()}getCurrent(){return this.current}getCurrentIndex(){return this.index}moveNext(){this.enumerator=this.enumerator||(this.enumerator=this.previous.getEnumerator());let e=this.enumerator.moveNext();if(e)return this.current=this.enumerator.getCurrent(),this.index++,e;if(this.currentItem)if(e=this.currentItem.moveNext(),e)return this.current=this.currentItem.getCurrent(),this.index++,e;if(this.currentItemIndex<this.items.length-1){if(this.currentItemIndex++,this.currentItem=this.items[this.currentItemIndex],this.currentItem instanceof Array)this.currentItem=new r.enumerator.Arraywise(this.currentItem);else if(this.currentItem&&this.currentItem["[Types/_collection/IEnumerable]"])this.currentItem=this.currentItem.getEnumerator();else throw new TypeError(`Collection at argument ${this.currentItemIndex} should implement [Types/collection#IEnumerable]`);return this.moveNext()}return!1}reset(){this.enumerator=null,this.index=-1,this.current=void 0,this.currentItem=null,this.currentItemIndex=-1}}return t.default=n,Object.assign(n.prototype,{previous:null,items:null,enumerator:null,index:null,current:void 0,currentItem:null,currentItemIndex:null}),t}(0,{},s),l=function(e,t){"use strict";
81Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t,r){this["[Types/_collection/IEnumerator]"]=!0,this.previous=e,this.callback=t,this.callbackContext=r,this.reset()}getCurrent(){var e;return null===(e=this.enumerator)||void 0===e?void 0:e.getCurrent()}getCurrentIndex(){var e;return null===(e=this.enumerator)||void 0===e?void 0:e.getCurrentIndex()}moveNext(){for(var e,t;null===(e=this.enumerator)||void 0===e?void 0:e.moveNext();)if(null===(t=this.callback)||void 0===t?void 0:t.call(this.callbackContext,this.enumerator.getCurrent(),this.enumerator.getCurrentIndex()))return!0;return!1}reset(){var e;this.enumerator=null===(e=this.previous)||void 0===e?void 0:e.getEnumerator()}}return t.default=r,Object.assign(r.prototype,{previous:null,callback:null,callbackContext:null,enumerator:null}),t}(0,{}),h=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(e){if(e instanceof Array)this.parent=new r.enumerator.Arraywise(e);else this.parent=e}getCurrent(){if(this.hasOwnProperty("current"))if(this.current instanceof n)return this.current.getCurrent();else return this.current}moveNext(){if(!this.parent)return!1;if(this.hasOwnProperty("current")){if(this.current instanceof n){const e=this.current.moveNext();if(e)return e}delete this.current}if(!this.hasOwnProperty("current"))if(this.parent.moveNext())this.current=this.parent.getCurrent();else return!1;if(this.current instanceof Array)return this.current=new n(this.current),this.moveNext();if(this.current&&this.current["[Types/_collection/IEnumerable]"])return this.current=new n(this.current.getEnumerator()),this.moveNext();else return!0}}return t.default=n,t}(0,{},s),d=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e){this["[Types/_collection/IEnumerator]"]=!0,this.previous=e,this.reset()}getCurrent(){const e=this._getItems()[this.index];return e?e[1]:void 0}getCurrentIndex(){const e=this._getItems()[this.index];return e?e[0]:-1}moveNext(){if(this.index>=this._getItems().length-1)return!1;else return this.index++,!0}reset(){this._items=null,this.index=-1}_getItems(){if(!this._items){this._items=[];const e=this.previous.getEnumerator();for(;e.moveNext();)this._items.push([e.getCurrentIndex(),e.getCurrent()])}return this._items}}return t.default=r,Object.assign(r.prototype,{previous:null,index:-1,_items:null}),t}(0,{}),p=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t,r){this["[Types/_collection/IEnumerator]"]=!0,this.previous=e,this.callback=t,this.callbackContext=r,this.reset()}getCurrent(){return this.current}getCurrentIndex(){return this.enumerator.getCurrentIndex()}moveNext(){var e;if(this.enumerator.moveNext())return this.current=null===(e=this.callback)||void 0===e?void 0:e.call(this.callbackContext,this.enumerator.getCurrent(),this.enumerator.getCurrentIndex()),!0;else return!1}reset(){this.enumerator=this.previous.getEnumerator(),this.current=void 0}}return t.default=r,Object.assign(r.prototype,{previous:null,callback:null,callbackContext:null,enumerator:null,current:null}),t}(0,{}),f=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t,r){this["[Types/_collection/IEnumerator]"]=!0,this.previous=e,this.begin=t,this.end=r,this.reset()}getCurrent(){return this.enumerator.getCurrent()}getCurrentIndex(){return this.enumerator.getCurrentIndex()}moveNext(){for(;this.now<this.begin-1&&this.enumerator.moveNext();)this.now++;const e=this.now+1;if(e>=this.begin&&e<this.end&&this.enumerator.moveNext())return this.now=e,!0;else return!1}reset(){this.enumerator=this.previous.getEnumerator(),this.now=-1}}return t.default=r,Object.assign(r.prototype,{previous:null,now:0,begin:0,end:0,enumerator:null}),t}(0,{}),m=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t){if(e instanceof Object){const n=e;return n[r.indexKey]=t,n}this.item=e,this.index=t}valueOf(){return this.item}indexOf(){return this.index}static valueOf(e){return e instanceof r?e.valueOf():e}static indexOf(e){return e instanceof r?e.indexOf():e[r.indexKey]}static clear(e){if(!(e instanceof r)){delete e[r.indexKey]}}}t.default=r;const n=Symbol("[]");return r.indexKey=n,t}(0,{}),y=function(e,t){"use strict";
81Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t){this["[Types/_collection/IEnumerator]"]=!0,this.previous=e,this.idExtractor=t,this.reset()}getCurrent(){return this.enumerator.getCurrent()}getCurrentIndex(){return this.enumerator.getCurrentIndex()}moveNext(){const e=this.enumerator.moveNext();let t;if(e){if(t=this.enumerator.getCurrent(),this.idExtractor)t=this.idExtractor(t,this.enumerator.getCurrentIndex());if(t instanceof Object){if(this.objectsHash.indexOf(t)>-1)return this.moveNext();this.objectsHash.push(t)}else if(t){if(t in this.keysHash)return this.moveNext();this.keysHash[t]=!0}}return e}reset(){this.enumerator=this.previous.getEnumerator(),this.keysHash={},this.objectsHash=[]}}return t.default=r,Object.assign(r.prototype,{previous:null,enumerator:null,idExtractor:null,keysHash:null,objectsHash:null}),t}(0,{}),v=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t){this["[Types/_collection/IEnumerator]"]=!0,this.previous=e,this.items=t,this.reset()}getCurrent(){return this.current}getCurrentIndex(){return this.index}moveNext(){this.enumerator=this.enumerator||(this.enumerator=this.previous.getEnumerator());const e=this.enumerator.moveNext();let t,r,n;if(e){this.index++,t=[this.enumerator.getCurrent()];for(let e=0;e<this.items.length;e++)if(r=this.items[e],r instanceof Array)t.push(r[this.index]);else if(r&&r["[Types/_collection/IEnumerable]"])if(n=this.itemsEnumerators[e]||(this.itemsEnumerators[e]=r.getEnumerator()),n.moveNext())t.push(n.getCurrent());else t.push(void 0);else throw new TypeError(`Collection at argument ${e} should implement Types/collection#IEnumerable`);this.current=t}return e}reset(){this.enumerator=null,this.index=-1,this.current=void 0,this.itemsEnumerators=[]}}return t.default=r,Object.assign(r.prototype,{previous:null,items:null,itemsEnumerators:null,enumerator:null,index:null,current:void 0}),t}(0,{}),_=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends r.default{constructor(e){if(!(e instanceof Array))throw new TypeError("Source should be an instance of Array");super(e),this["[Types/_chain/Arraywise]"]=!0}getEnumerator(){return new n.enumerator.Arraywise(this._source)}each(e,t){for(let r=0,n=this._source.length;r<n;r++)e.call(t||this,this._source[r],r)}toArray(){return this._source.slice()}}return t.default=s,Object.defineProperty(s.prototype,"shouldSaveIndices",{value:!1}),t}(0,{},o,s),b=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends r.default{constructor(e,t){super(e),this["[Types/_chain/Concatenated]"]=!0,this._items=t}destroy(){this._items=null,super.destroy()}getEnumerator(){return new n.default(this._previous,this._items)}}return t.default=s,Object.assign(s.prototype,{_items:null}),Object.defineProperty(s.prototype,"shouldSaveIndices",{value:!1}),t}(0,{},o,c),g=b,x=function(e,t,r,n,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i extends r.default{constructor(e,t){super(e),this["[Types/_chain/Counted]"]=!0,this._key=t}destroy(){this._key=null,super.destroy()}getEnumerator(){const e=r.default.propertyMapper(this._key);return new n.enumerator.Mapwise(this._previous.reduce(((t,r,n)=>{const s=e(r,n),i=t.has(s)?t.get(s):0;return t.set(s,i+1),t}),new s.Map))}}return t.default=i,Object.assign(i.prototype,{_key:null}),t}(0,{},o,s,t),O=x,j=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends r.default{constructor(e){if(!e||!e["[Types/_collection/IEnumerable]"])throw new TypeError("Source must implement Types/collection:IEnumerable");super(e),this["[Types/_chain/Enumerable]"]=!0}getEnumerator(){return this._source.getEnumerator()}each(e,t){return this._source.each(e,t)}toObject(){if(this._source["[Types/_entity/IObject]"]){const e={};return this.each(((t,r)=>{e[t]=r})),e}return super.toObject()}}return t.default=n,t}(0,{},o),w=j,E=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends r.default{constructor(e,t,r){super(e),this["[Types/_chain/Filtered]"]=!0,this._callback=t,this._callbackContext=r}destroy(){this._callback=null,this._callbackContext=null,super.destroy()}getEnumerator(){return new n.default(this._previous,this._callback,this._callbackContext)}}return t.default=s,t}(0,{},o,l),I=E,T=function(e,t,r){"use strict";
81Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(e){this["[Types/_collection/IEnumerator]"]=!0,this.previous=e,this.reset()}getCurrent(){return this.mover?this.mover.getCurrent():void 0}getCurrentIndex(){return this.index}moveNext(){var e;this.mover=this.mover||(this.mover=new r.default(null===(e=this.previous)||void 0===e?void 0:e.getEnumerator()));const t=this.mover.moveNext();if(t)this.index++;return t}reset(){this.mover=null,this.index=-1}}return t.default=n,Object.assign(n.prototype,{previous:null,mover:null,index:null}),t}(0,{},h),C=function(e,t,r,n,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i extends r.default{constructor(e,t,r){super(e),this["[Types/_chain/Grouped]"]=!0,this._key=t,this._value=r}destroy(){this._key=null,this._value=null,super.destroy()}getEnumerator(){const e=r.default.propertyMapper(this._key),t=r.default.propertyMapper(this._value);return new n.enumerator.Mapwise(this._previous.reduce(((r,n,s)=>{const i=e(n,s),u=t(n,s);let o;if(r.has(i))o=r.get(i);else o=[],r.set(i,o);return o.push(u),r}),new s.Map))}}return t.default=i,Object.assign(i.prototype,{_key:null,_value:null}),t}(0,{},o,s,t),P=C,M=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends r.default{constructor(e,t,r){super(e),this["[Types/_chain/Mapped]"]=!0,this._callback=t,this._callbackContext=r}destroy(){this._callback=null,this._callbackContext=null,super.destroy()}getEnumerator(){return new n.default(this._previous,this._callback,this._callbackContext)}}return t.default=s,Object.assign(s.prototype,{_callback:null,_callbackContext:null}),t}(0,{},o,p),k=M,N=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends r.default{constructor(e){if(!(e instanceof Object))throw new TypeError("Source should be an instance of Object");super(e),this["[Types/_chain/Objectwise]"]=!0}getEnumerator(){return new n.enumerator.Objectwise(this._source)}each(e,t){const r=Object.keys(this._source),n=r.length;let s;for(let i=0;i<n;i++)s=r[i],e.call(t||this,this._source[s],s)}value(e,...t){if(e instanceof Function)return super.value(e);else return this.toObject()}}return t.default=s,t}(0,{},o,s),A=N,F=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends r.default{_getItems(){if(!this._items){const e=super._getItems();if(this._items=e,e.reverse(),!this.previous.shouldSaveIndices)this._items=e.map(((e,t)=>[t,e[1]]),this)}return this._items}}return t.default=n,t}(0,{},d),S=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends r.default{constructor(e,t,r){super(e),this["[Types/_chain/Sliced]"]=!0,this._begin=t,this._end=r}getEnumerator(){return new n.default(this._previous,this._begin,this._end)}}return t.default=s,Object.assign(s.prototype,{_begin:0,_end:0}),t}(0,{},o,f),q=S,H=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends r.default{constructor(e,t){super(e),this.compareFunction=t||s.defaultCompare}_getItems(){if(!this._items){const e=this.previous.shouldSaveIndices;this._items=super._getItems().map((([e,t])=>{if(void 0!==t)return new n.default(t,e)})).sort(this.compareFunction).map(((t,r)=>{const s=[e?n.default.indexOf(t):r,n.default.valueOf(t)];return n.default.clear(t),s}))}return this._items}static defaultCompare(e,t){return e===t?0:e>t?1:-1}}return t.default=s,Object.assign(s.prototype,{compareFunction:null}),t}(0,{},d,m),R=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends r.default{constructor(e,t){super(e),this["[Types/_chain/Uniquely]"]=!0,this._idExtractor=t}destroy(){this._idExtractor=null,super.destroy()}getEnumerator(){return new n.default(this._previous,this._idExtractor)}toArray(){const e=this._previous.toArray();if(this._idExtractor){const t=new Map;return e.forEach(((e,r)=>{const n=this._idExtractor(e,r);if(!t.has(n))t.set(n,e)})),Array.from(t,(([e,t])=>t))}return Array.from(new Set(e))}}return t.default=s,Object.assign(s.prototype,{_idExtractor:null}),t}(0,{},o,y),U=R,G=function(e,t,r,n){"use strict";
81Object.defineProperty(t,"__esModule",{value:!0});class s extends r.default{constructor(e,t){super(e),this["[Types/_chain/Zipped]"]=!0,this._items=t}destroy(){this._items=null,super.destroy()}getEnumerator(){return new n.default(this._previous,this._items)}}return t.default=s,Object.assign(s.prototype,{_items:null}),t}(0,{},o,v),Z=G,K=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends r.default{constructor(){super(...arguments),this["[Types/_chain/Flattened]"]=!0}getEnumerator(){return new n.default(this._previous)}}return t.default=s,t}(0,{},o,T),z=K,V=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends r.default{constructor(){super(...arguments),this["[Types/_chain/Reversed]"]=!0}getEnumerator(){return new n.default(this._previous)}}return t.default=s,t}(0,{},o,F),$=V,D=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends r.default{constructor(e,t){super(e),this["[Types/_chain/Sorted]"]=!0,this._compareFunction=t}destroy(){this._compareFunction=null,super.destroy()}getEnumerator(){return new n.default(this._previous,this._compareFunction)}}return t.default=s,Object.assign(s.prototype,{_compareFunction:null}),t}(0,{},o,H),B=D,J=function(e,t,r,n,s,i,u,o,a,c,l,h,d,p,f,m,y,v){"use strict";function _(){(0,v.register)("Types/chain:DestroyableMixin",r.default,{instantiate:!1}),(0,v.register)("Types/chain:Arraywise",n.default,{instantiate:!1}),(0,v.register)("Types/chain:Concatenated",u.default,{instantiate:!1}),(0,v.register)("Types/chain:Counted",o.default,{instantiate:!1}),(0,v.register)("Types/chain:Enumerable",i.default,{instantiate:!1}),(0,v.register)("Types/chain:Filtered",a.default,{instantiate:!1}),(0,v.register)("Types/chain:Flattened",c.default,{instantiate:!1}),(0,v.register)("Types/chain:Grouped",l.default,{instantiate:!1}),(0,v.register)("Types/chain:Mapped",h.default,{instantiate:!1}),(0,v.register)("Types/chain:Objectwise",s.default,{instantiate:!1}),(0,v.register)("Types/chain:Reversed",d.default,{instantiate:!1}),(0,v.register)("Types/chain:Sliced",p.default,{instantiate:!1}),(0,v.register)("Types/chain:Sorted",f.default,{instantiate:!1}),(0,v.register)("Types/chain:Uniquely",m.default,{instantiate:!1}),(0,v.register)("Types/chain:Zipped",y.default,{instantiate:!1})}return Object.defineProperty(t,"__esModule",{value:!0}),t.registerFactory=void 0,t.registerFactory=_,_(),t.default=function(e){if(e instanceof r.default)return e;else if(e&&e["[Types/_collection/IEnumerable]"])return new i.default(e);else if(e instanceof Array)return new n.default(e);else if(e instanceof Object)return new s.default(e);throw new TypeError(`Unsupported source type "${e}": only Array or Object are supported.`)},t}(0,{},o,_,N,j,b,x,E,K,C,M,V,S,D,R,G,n),L=J,u.Sorted=u.Reversed=u.Sliced=u.Filtered=u.Uniquely=u.Counted=u.Grouped=u.Enumerable=u.Flattened=u.Concatenated=u.Mapped=u.Zipped=u.Objectwise=u.Abstract=u.factory=void 0,Object.defineProperty(u,"factory",{enumerable:!0,get:function(){return L.default}}),(0,L.registerFactory)(),Object.defineProperty(u,"Abstract",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(u,"Objectwise",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(u,"Zipped",{enumerable:!0,get:function(){return Z.default}}),Object.defineProperty(u,"Mapped",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(u,"Concatenated",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(u,"Flattened",{enumerable:!0,get:function(){return z.default}}),Object.defineProperty(u,"Enumerable",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(u,"Grouped",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(u,"Counted",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(u,"Uniquely",{enumerable:!0,get:function(){return U.default}}),Object.defineProperty(u,"Filtered",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(u,"Sliced",{enumerable:!0,get:function(){return q.default}}),Object.defineProperty(u,"Reversed",{enumerable:!0,get:function(){return $.default}}),Object.defineProperty(u,"Sorted",{enumerable:!0,get:function(){return B.default}}),u})); 82define("Types/collection",["Types/util","Types/shim","Types/object","Types/entity","require","exports","Types/di","Types/guards"],(function(e,t,i,s,n,r,a,o){var l,h,c,d,u,_,f,g,p,m,y,I,C,x,b,v,O,A,T,w,E,R,$,D,N,M,P,S,k,F,j,V,L,z,B;
82return Object.defineProperty(r,"__esModule",{value:!0}),l=function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeAction=void 0,function(e){e.ACTION_ADD="a",e.ACTION_REMOVE="rm",e.ACTION_CHANGE="ch",e.ACTION_REPLACE="rp",e.ACTION_MOVE="m",e.ACTION_RESET="rs"}(i||(t.ChangeAction=i={}));class s{}return s.ACTION_ADD=i.ACTION_ADD,s.ACTION_REMOVE=i.ACTION_REMOVE,s.ACTION_CHANGE=i.ACTION_CHANGE,s.ACTION_REPLACE=i.ACTION_REPLACE,s.ACTION_MOVE=i.ACTION_MOVE,s.ACTION_RESET=i.ACTION_RESET,t.default=s,Object.assign(s.prototype,{"[Types/_collection/IObservable]":!0}),t}(0,{}),h=l,c=function(e,t){"use strict";function i(e,t){let i,s=0,n=e.length;for(;(i=n-s)>0;){const r=s+Math.floor(i/2),a=e[r];if(a===t)return r;else if(a>t)n=Math.min(r,n-1);else s=Math.max(r,s+1)}return s}Object.defineProperty(t,"__esModule",{value:!0});class s{constructor(e,t,i,s){this._collection=e,this._count=t,this._at=i,this._prop=s,this.resetIndex()}getIndexByValue(e,t){const i=this.getIndicesByValue(e,t);return i.length?i[0]:-1}getIndicesByValue(e,t){const i=this._getIndex(e);if(i){if(t in i)return i[t].slice();if((t="["+(Array.isArray(t)?t.join(","):t)+"]")in i)return i[t].slice()}return[]}resetIndex(){this._indices=null}updateIndex(e,t){const i=this._indices;if(i)for(const s in i)this._updateIndex(s,e,t)}shiftIndex(e,t,i){const s=e+t;this._eachIndexItem((t=>{for(let n=0;n<t.length;n++)if(t[n]>=e&&t[n]<s)t[n]+=i}))}removeFromIndex(e,t){this._eachIndexItem((i=>{for(let s=0;s<t;s++){const t=i.indexOf(e+s);if(t>-1)i.splice(t,1)}}))}_eachIndexItem(e){const t=this._indices;if(!t)return;let i;for(const s in t){i=t[s];for(const t in i)e(i[t],t,s)}}_getIndex(e){var t;if(e){if(!this._hasIndex(e))this._createIndex(e);return null===(t=this._indices)||void 0===t?void 0:t[e]}}_hasIndex(e){return e&&this._indices?e in this._indices:!1}_deleteIndex(e){var t;null===(t=this._indices)||void 0===t||delete t[e]}_createIndex(e){if(e){if(!this._indices)this._indices=Object.create(null);if(this._indices)this._indices[e]=Object.create(null);this._updateIndex(e,0,this._count(this._collection))}}_updateIndex(e,t,s){var n;const r=null===(n=this._indices)||void 0===n?void 0:n[e];if(!r)return;let a,o,l;for(let n=t;n<t+s;n++){if(a=this._at(this._collection,n),o=this._prop(a,e),Array.isArray(o))o=`[${o.join(",")}]`;if(!(o in r))r[o]=new Array;l=r[o],l.splice(i(l,n),0,n)}}}return t.default=s,Object.assign(s.prototype,{"[Types/_collection/Indexer]":!0,_collection:null,_count:null,_at:null,_prop:null,_indices:null}),t}(0,{}),d=c,u=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s{get _keys(){if(!this._cachedKeys){const e=[];this._items.forEach(((t,i)=>{e.push(i)})),this._cachedKeys=e}return this._cachedKeys}constructor(e){if(this["[Types/_collection/IEnumerator]"]=!0,void 0===e)e=new i.Map;if(!(e instanceof i.Map))throw new Error("Argument items should be an instance of Map");this._items=e}getCurrent(){return-1===this._index?void 0:this._items.get(this._keys[this._index])}moveNext(){const e=this._keys;if(this._index>=e.length-1)return!1;else return this._index++,!0}reset(){this._cachedKeys=void 0,this._index=-1}getCurrentIndex(){return this._keys[this._index]}}return t.default=s,Object.assign(s.prototype,{"[Types/_collection/enumerator/Mapwise]":!0,_items:null,_index:-1,_cachedKeys:void 0}),t}(0,{},t),_=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i{constructor(e){this["[Types/_collection/IEnumerator]"]=!0;let t=e;if(void 0===t)t={};if(!(t instanceof Object))throw new Error("Argument items should be an instance of Object");this._items=t,this._keys=Object.keys(t)}getCurrent(){if(!(this._index<0))return this._items[this._keys[this._index]]}moveNext(){if(1+this._index>=this._keys.length)return!1;this._index++;const e=this.getCurrent();if(this._filter&&!this._filter(e,this.getCurrentIndex()))return this.moveNext();else return!0}reset(){this._index=-1}getCurrentIndex(){return this._keys[this._index]}setFilter(e){this._filter=e}}return t.default=i,Object.assign(i.prototype,{"[Types/_collection/enumerator/Objectwise]":!0,_items:null,_keys:null,_index:-1,_filter:null}),t}(0,{}),f=function(e,t,i){"use strict";
82return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t={}){if(!e||!e["[Types/_collection/IEnumerable]"])throw new TypeError('Argument "items" should implement Types/collection:IEnumerable');delete t.rawData;const s=(0,i.create)("Types/collection:RecordSet",t);return e.each((e=>{s.add(e)})),s},t}(0,{},a),g=function(e,t,i,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(){n.initMixin(this)}static initMixin(e){e._enumeratorIndexes={},e._onCollectionChange=e._onCollectionChange.bind(e)}reIndex(e,t=0,s=0){switch(e){case i.default.ACTION_ADD:this._shiftIndex(t,s),this._addToIndex(t,s);break;case i.default.ACTION_REMOVE:this._removeFromIndex(t,s),this._shiftIndex(t+s,-s);break;case i.default.ACTION_REPLACE:this._replaceInIndex(t,s);break;default:this._resetIndex()}}getIndexByValue(e,t){const i=this._getIndexForPropertyValue(e,t);return i.length?i[0]:-1}getIndicesByValue(e,t){return this._getIndexForPropertyValue(e,t)}setObservableCollection(e){e.subscribe("onCollectionChange",this._onCollectionChange)}unsetObservableCollection(e){e.unsubscribe("onCollectionChange",this._onCollectionChange)}_getIndexForPropertyValue(e,t){const i=this._getIndex(e);return i&&i[t]||[]}_hasIndex(e){if(e)return Object.prototype.hasOwnProperty.call(this._enumeratorIndexes,e);else return 0===Object.keys(this._enumeratorIndexes).length}_getIndex(e){if(e&&!this._hasIndex(e))this._createIndex(e);return this._enumeratorIndexes[e]}_resetIndex(){this._enumeratorIndexes={}}_deleteIndex(e){delete this._enumeratorIndexes[e]}_createIndex(e){const t={};let i=0;this._enumeratorIndexes[e]=t;const s=this;for(s.reset();s.moveNext();)this._setToIndex(t,e,s.getCurrent(),i),i++}_addToIndex(e,t){let i;const s=e+t;let n;const r=this;for(const t in this._enumeratorIndexes)if(this._enumeratorIndexes.hasOwnProperty(t))for(i=this._enumeratorIndexes[t],n=0,r.reset();r.moveNext();){if(n>=e)this._setToIndex(i,t,r.getCurrent(),n);if(n++,n>=s)break}}_removeFromIndex(e,t){let i,s,n,r;for(const a in this._enumeratorIndexes)if(this._enumeratorIndexes.hasOwnProperty(a))for(s in i=this._enumeratorIndexes[a],i)if(i.hasOwnProperty(s)){n=i[s];for(let i=0;i<t;i++)if(r=n.indexOf(e+i),r>-1)n.splice(r,1)}}_replaceInIndex(e,t){this._removeFromIndex(e,t),this._addToIndex(e,t)}_shiftIndex(e,t){let i,s;for(const n in this._enumeratorIndexes)if(this._enumeratorIndexes.hasOwnProperty(n)){i=this._enumeratorIndexes[n];for(const n in i)if(i.hasOwnProperty(n)){s=i[n];for(let i=0;i<s.length;i++)if(s[i]>=e)s[i]+=t}}}_setToIndex(e,t,i,n){let r=s.object.getPropertyValue(i,t);if(void 0===r&&i instanceof Object&&"function"==typeof i.getContents)r=s.object.getPropertyValue(i.getContents(),t);if(!Object.prototype.hasOwnProperty.call(e,r))e[r]=[];e[r].push(n)}_onCollectionChange(e,t,s,n,r,a){switch(t){case i.default.ACTION_ADD:case i.default.ACTION_REPLACE:this.reIndex(t,n,s.length);break;case i.default.ACTION_REMOVE:this.reIndex(t,a,r.length);break;default:this.reIndex(t)}}}return t.default=n,Object.assign(n.prototype,{"[Types/_collection/IndexedEnumeratorMixin]":!0,_enumeratorIndexes:null}),t}(0,{},l,e),p=g,m=function(e,t,i){"use strict";function s(){if(o>65534)o=0;return o++}function n(e,t){const i=e.getEnumerator(),s=[],n=[];let r;for(i.reset();i.moveNext();)if(r=i.getCurrent(),s.push(r),t)n.push(r[t]());return{items:s,contents:t?n:null}}function r(e,t,i,s,n,r){t.addedProcessed=t.addedProcessed||[],t.removedProcessed=t.removedProcessed||{};const a=t.before,o=t.after,l=t.beforeContents,h=t.afterContents,c=t.addedProcessed,d=t.removedProcessed,u=[];let _=0;const f=[];let g,p,m,y,I,C=0,x=!1;const b=Math.max(a.length,o.length);let v,O;for(n=n||0,I=s=s||0;I<b;I++){switch(g=a[I],m=o[I],e){case"added":if(!m)continue;y=I,v=0,O=!0;do{if(p=a.indexOf(m,v),-1===p)O=!1;else if(c.indexOf(p)>-1)v=p+1;else{if(!u.length)c.push(p);O=!1}}while(O);if(-1===p)u.push(m),_=1===u.length?y:_;else if(u.length)x=!0;break;case"removed":if(!g)continue;p=I,v=0,O=!0;do{if(y=o.indexOf(g,v),-1===y)O=!1;else if(d&&d[y])v=y+1;else{if(d&&!f.length)d[y]=!0;O=!1}}while(O);if(-1===y)f.push(g),C=1===f.length?p:C;else if(f.length)x=!0;break;case"replaced":if(!l){I=-1,x=!0;break}if(!m)continue;if(y=I,p=a.indexOf(m),p===y&&l[I]!==(null==h?void 0:h[I]))f.push(i._getItemsStrategy().convertToItem(l[I])),u.push(m),C=_=1===f.length?p:C;else if(f.length)x=!0;break;case"moved":if(a.length!==o.length){if(r)break;throw new Error('The "before" and "after" arrays are not synchronized by the length - "move" can\'t be applied.')}if(g===m){if(0===f.length)continue;x=!0;break}if(y=I,p=a.indexOf(m,I),p!==y)if(f.length&&p!==C+f.length||u.length&&y!==_+u.length)x=!0;else{if(0===f.length)C=p;if(f.push(m),0===u.length)_=y;u.push(m)}}if(x)break}return{newItems:u,newItemsIndex:_,oldItems:f,oldItemsIndex:C,endAt
82:x?I:-1,offset:n}}function a(e,t,i){const s=i.before,n=i.beforeContents,r=i.afterContents;switch(e){case"added":if(s.splice(t.newItemsIndex,0,...t.newItems),i.addedProcessed){const e=t.newItems.length;for(let s=0;s<i.addedProcessed.length;s++)if(i.addedProcessed[s]>=t.newItemsIndex)i.addedProcessed[s]+=e;for(let s=0;s<e;s++)i.addedProcessed.push(t.newItemsIndex+s)}if(null!==n&&r){const e=r.slice(t.newItemsIndex,t.newItemsIndex+t.newItems.length);null==n||n.splice(t.newItemsIndex,0,...e)}break;case"removed":if(s.splice(t.oldItemsIndex,t.oldItems.length),null!==n)null==n||n.splice(t.oldItemsIndex,t.oldItems.length);if(-1!==t.endAt)t.endAt-=t.oldItems.length;break;case"replaced":if(s.splice(t.oldItemsIndex,t.oldItems.length,...t.newItems),null!==n){const e=null==r?void 0:r.slice(t.newItemsIndex,t.newItemsIndex+t.newItems.length);if(e)null==n||n.splice(t.oldItemsIndex,t.oldItems.length,...e)}break;case"moved":const e=t.oldItemsIndex+t.oldItems.length>t.newItemsIndex?t.newItemsIndex:t.newItemsIndex-t.oldItems.length+1;if(s.splice(t.oldItemsIndex,t.oldItems.length),s.splice(e,0,...t.newItems),null!==n){null==n||n.splice(t.oldItemsIndex,t.oldItems.length);const i=null==r?void 0:r.slice(t.newItemsIndex,t.newItemsIndex+t.newItems.length);if(i)null==n||n.splice(e,0,...i)}if(-1!==t.endAt&&t.oldItemsIndex<t.newItemsIndex)t.endAt-=t.oldItems.length}}Object.defineProperty(t,"__esModule",{value:!0});let o=0;const l={"[Types/_collection/enumerableComparator]":!0,startSession(e,t){const i=n(e,t);return{id:s(),before:i.items,beforeContents:i.contents,after:[]}},finishSession(e,t,i){const s=n(t,i);e.after=s.items,e.afterContents=s.contents},analizeSession(e,t,s,n=!1){const o=["removed","added","replaced","moved"];let l,h,c,d,u,_=Math.max(65535,o.length*e.before.length*e.after.length);for(let f=0;f<o.length;f++)for(h=0,c=0,d=o[f];-1!==h;){if(l=r(d,e,t,h,c,n),l.newItems.length||l.oldItems.length){if(s){switch(u="",d){case"added":u=i.default.ACTION_ADD;break;case"removed":u=i.default.ACTION_REMOVE;break;case"replaced":u=i.default.ACTION_REPLACE;break;case"moved":u=i.default.ACTION_MOVE}s(u,l)}a(d,l,e)}if(-1!==l.endAt&&l.endAt<=h)if(_--,0===_)throw new Error("Endless cycle detected.");h=l.endAt,c=l.offset}}};return t.default=l,t}(0,{},l),y=m,I=function(e,t,i,s,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(){r.initMixin(this)}static initMixin(e){n.EventRaisingMixin.initMixin(e)}setEventRaising(e,t){n.EventRaisingMixin.prototype.setEventRaising.call(this,e,t)}isEventRaising(){return n.EventRaisingMixin.prototype.isEventRaising.call(this)}_startUpdateSession(){if(!this._eventRaising)return null;else return i.default.startSession(this,this._sessionItemContentsGetter)}_finishUpdateSession(e,t){if(e)if(t=void 0===t?!0:t,i.default.finishSession(e,this,this._sessionItemContentsGetter),t)this._analizeUpdateSession(e)}_analizeUpdateSession(e){if(e)i.default.analizeSession(e,this,((e,t)=>{this._notifyCollectionChange(e,t.newItems,t.newItemsIndex,t.oldItems,t.oldItemsIndex,"analizeSession")}))}_notifyCollectionChange(e,t,i,n,r,a,o){if(this._isNeedNotifyCollectionChange()){if(this._blockChangesMessage)throw new Error(this._blockChangesMessage);if(e===s.ChangeAction.ACTION_RESET)this._blockChangesMessage=`The instance of '${this._moduleName}' is blocked from changes because reset action is in progress.`;this._notify("onCollectionChange",e,t,i,n,r,a,o),this._blockChangesMessage=""}}_extractPacksByList(e,t,i){const s=(e,t)=>{i(e.slice(),t),e.length=0},n=[];let r,a;for(let i=0;i<t.length;i++)r=t[i],a=e.getIndex(r),n[a]=r;const o=[];let l=0;const h=n.length-1;for(let e=0;e<=h;e++)if(r=n[e],r){if(!o.length)l=e;o.push(r)}else if(o.length)s(o,l);if(o.length)s(o,l)}_isNeedNotifyCollectionChange(){return this._eventRaising&&this.hasEventHandlers("onCollectionChange")}}return t.default=r,Object.assign(r.prototype,{"[Types/_entity/EventRaisingMixin]":!0,_eventRaising:!0,"[Types/_collection/EventRaisingMixin]":!0,_eventRaisingTrigger:function(e,t){if(t)if(e&&this._beforeRaiseOff)this._eventRaising=e,this._finishUpdateSession(this._beforeRaiseOff),this._beforeRaiseOff=null;
82else this._beforeRaiseOff=this._startUpdateSession()},_sessionItemContentsGetter:"",_beforeRaiseOff:null,_blockChangesMessage:""}),t}(0,{},m,l,s),C=I,x=function(e,t,i,s,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends((0,n.mixin)(i.default)){constructor(e){super(),this["[Types/_collection/IEnumerator]"]=!0;let t=e;if(void 0===t)t=[];if(!(t instanceof Array))throw new Error("Argument items should be an instance of Array");this._items=t,i.default.initMixin(this)}getCurrent(){if(!(this._index<0))return this._resolver?this._resolver(this._index):this._items[this._index]}getCurrentIndex(){return this._index}moveNext(){if(1+this._index>=this._items.length)return!1;this._index++;const e=this.getCurrent();if(this._filter&&e&&!this._filter(e,this._index))return this.moveNext();else return!0}reset(){this._index=-1}setResolver(e){this._resolver=e}setFilter(e){this._filter=e}}return t.default=r,Object.assign(r.prototype,{"[Types/_collection/enumerator/Arraywise]":!0,_items:null,_index:-1,_resolver:null,_filter:null}),(0,s.register)("Types/collection:enumerator.Arraywise",r,{instantiate:!1}),t}(0,{},g,a,e),b=function(e,t,i,s,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class a extends((0,r.mixin)(n.DestroyableMixin,n.OptionsToPropertyMixin,n.ObservableMixin)){constructor(e){super(),n.OptionsToPropertyMixin.initMixin(this,e),n.ObservableMixin.initMixin(this,e),this._$dictionary=this._$dictionary||[]}destroy(){n.ObservableMixin.prototype.destroy.call(this),super.destroy()}getEnumerator(e){const t=e&&this._$localeDictionary?this._$localeDictionary:this._$dictionary,n=t instanceof Array?new i.default(t):new s.default(t);return n.setFilter(((e,t)=>"null"!==t)),n}each(e,t,i){t=t||this;const s=this.getEnumerator(i);for(;s.moveNext();)e.call(t,s.getCurrent(),s.getCurrentIndex())}isEqual(e){if(!(e instanceof a))return!1;const t=this.getEnumerator(),i=e.getEnumerator();let s,n,r,o;do{if(n=t.moveNext(),o=i.moveNext(),s=n?t.getCurrent():void 0,r=o?i.getCurrent():void 0,s!==r)return!1;if(t.getCurrentIndex()!==i.getCurrentIndex())return!1}while(n||o);return!0}getDictionary(e){const t=e&&this._$localeDictionary?this._$localeDictionary:this._$dictionary;return t?Array.isArray(t)?t.slice():{...t}:t}_getIndex(e,t){const i=this.getEnumerator(t);for(;i.moveNext();)if(i.getCurrent()===e)return i.getCurrentIndex()}_getValue(e,t){return(t&&this._$localeDictionary?this._$localeDictionary:this._$dictionary)[e]}_getDictionaryByFormat(e){if(!e)return[];else return(e.getDictionary?e.getDictionary():e.meta&&e.meta.dictionary)||[]}_getLocaleDictionaryByFormat(e){if(e)return(e.getLocaleDictionary?e.getLocaleDictionary():e.meta&&e.meta.localeDictionary)||void 0}}return t.default=a,Object.assign(a.prototype,{"[Types/_collection/Dictionary]":!0,"[Types/_collection/IEnumerable]":!0,"[Types/_entity/IEquatable]":!0,_$dictionary:void 0,_$localeDictionary:void 0,_type:void 0}),t}(0,{},x,_,s,e),v=b,O=function(e,t,i,s,n,r,a,o){"use strict";var l;Object.defineProperty(t,"__esModule",{value:!0}),t.ListOperationType=void 0,function(e){e.Add="add",e.Append="append",e.Prepend="prepend",e.Remove="remove",e.RemoveAt="removeAt",e.Replace="replace",e.Assign="assign"}(l||(t.ListOperationType=l={}));class h extends((0,o.mixin)(r.DestroyableMixin,r.OptionsToPropertyMixin,r.SerializableMixin,r.CloneableMixin,r.ManyToManyMixin,r.ReadWriteMixin,r.VersionableMixin,r.ObserveSessionMixin)){constructor(e){h.checkOptions(e),super(),this["[Types/_collection/List]"]=!0,this.initList(e)}initList(e){r.OptionsToPropertyMixin.initMixin(this,e),r.ReadWriteMixin.initMixin(this,e),this._$items=this._$items||[];for(let e=0,t=this._$items.length;e<t;e++)this._addChild(this._$items[e])}destroy(e){this._$items=null,this._indexer=null,r.ReadWriteMixin.prototype.destroy.call(this),super.destroy()}getEnumerator(){return new s.default(this._$items)}each(e,t){for(let i=0,s=this.getCount();i<s;i++)e.call(t||this,this.at(i),i,this)}assign(e){for(let e=0,t=this._$items.length;e<t;e++)this._removeChild(this._$items[e]);this._$items.length=0;for(let t=0,s=(e=this._splice(e||[],0,i.default.ACTION_RESET)).length;t<s;t++)this._addChild(e[t]);
82this._childChanged(e)}append(e){for(let t=0,s=(e=this._splice(e,this.getCount(),i.default.ACTION_ADD)).length;t<s;t++)this._addChild(e[t]);this._childChanged(e)}prepend(e){for(let t=0,s=(e=this._splice(e,0,i.default.ACTION_ADD)).length;t<s;t++)this._addChild(e[t]);this._childChanged(e)}clear(){this._$items.length=0,this._reindex(),this._getMediator().clear(this,r.relation.ManyToManyClearType.Slaves),this._childChanged(),this._nextVersion()}add(e,t){if(void 0===t)t=this._$items.length,this._$items.push(e);else{if(0!==(t=t||0)&&!this._isValidIndex(t,!0))throw new Error("Index is out of bounds");this._$items.splice(t,0,e)}this._addChild(e),this._reindex(i.default.ACTION_ADD,t,1),this._childChanged(e),this._nextVersion()}at(e){return this._$items[e]}remove(e){const t=this.getIndex(e);if(-1!==t)return this.removeAt(t),this._childChanged(e),!0;else return!1}removeAt(e){if(!this._isValidIndex(e))throw new Error("Index is out of bounds");this._removeChild(this._$items[e]);const t=this._$items.splice(e,1);return this._reindex(i.default.ACTION_REMOVE,e,1),this._childChanged(e),this._nextVersion(),t[0]}replace(e,t){if(!this._isValidIndex(t))throw new Error("Index is out of bounds");const s=this._$items[t];if(s!==e)this._removeChild(s),this._$items[t]=e,this._addChild(e),this._reindex(i.default.ACTION_REPLACE,t,1),this._childChanged(e),this._nextVersion()}move(e,t){if(!this._isValidIndex(e))throw new Error(`${this._moduleName}::move: Argument "from" is out of bounds`);if(!this._isValidIndex(t))throw new Error(`${this._moduleName}::move: Argument "to" is out of bounds`);if(e===t)return;const s=this._$items.splice(e,1);if(this._$items.splice(t,0,s[0]),e<t)this._reindex(i.default.ACTION_REPLACE,e,1+t-e);else this._reindex(i.default.ACTION_REPLACE,t,1+e-t);this._childChanged(s[0]),this._nextVersion()}getCount(){return this._$items.length}getIndex(e){return this._$items.indexOf(e)}getIndexByValue(e,t){return this._getIndexer().getIndexByValue(e,t)}getIndicesByValue(e,t){return this._getIndexer().getIndicesByValue(e,t)}isEqual(e){if(e===this)return!0;if(!(e&&e instanceof h))return!1;if(this.getCount()!==e.getCount())return!1;for(let t=0,i=this.getCount();t<i;t++)if(this.at(t)!==e.at(t))return!1;return!0}modify(e){const t=this._getModifiedItems(e);return new h({items:t})}_getSerializableState(e){return r.SerializableMixin.prototype._getSerializableState.call(this,e)}_setSerializableState(e){const t=r.SerializableMixin.prototype._setSerializableState(e);return function(){t.call(this),this._clearIndexer()}}_getModifiedItems(e){const t=[...this._itemsToArray(this._$items)];for(const i of e)switch(i.type){case l.Add:{const e=void 0!==i.at?i.at:t.length;t.splice(e,0,i.item);break}case l.Remove:{const e=t.indexOf(i.item);this._checkIndex(e),t.splice(e,1);break}case l.RemoveAt:{const e=i.at;if(this._checkIndex(e),e>=0&&e<t.length)t.splice(e,1);break}case l.Replace:{const e=i.at;if(this._checkIndex(e),e>=0&&e<t.length)t[e]=i.item;break}case l.Assign:t.length=0,t.push(...i.items);break;case l.Append:t.push(...i.items);break;case l.Prepend:t.unshift(...i.items);break;default:throw new Error(`ÐеизвеÑÑнÑй Ñип опеÑаÑии модиÑикаÑии: ${i.type}`)}return t}_getIndexer(){return this._indexer||(this._indexer=new n.default(this._$items,(e=>e.length),((e,t)=>e[t]),((e,t)=>o.object.getPropertyValue(e,t))))}_clearIndexer(){this._indexer=null}_isValidIndex(e,t){let i=this.getCount();if(t)i++;return e>=0&&e<i}_reindex(e,t=0,s=0){if(!this._indexer)return;const n=this._getIndexer();switch(e){case i.default.ACTION_ADD:n.shiftIndex(t,this.getCount()-t,s),n.updateIndex(t,s);break;case i.default.ACTION_REMOVE:n.removeFromIndex(t,s),n.shiftIndex(t+s,this.getCount()-t,-s);break;case i.default.ACTION_REPLACE:n.removeFromIndex(t,s),n.updateIndex(t,s);break;case i.default.ACTION_RESET:n.resetIndex();break;default:if(s>0)n.removeFromIndex(t,s),n.updateIndex(t,s);else n.resetIndex()}}_splice(e,t,i){return e=this._itemsToArray(e),this._$items.splice(t,0,...e),this._reindex(i,t,e.length),this._nextVersion(),e}_itemsToArray(e){if(e instanceof Array)return e;else if(e&&e["[Types/_collection/IEnumerable]"]){const t=[];return e.each((e=>{t.push(e)})),t}else throw new TypeError('Argument "items" must be an instance of Array or implement Types/collection:IEnumerable.')}_checkIndex(e){if("number"!=typeof e||-1===e)throw new ReferenceError(`${this._moduleName}
82: invalid index ${e} was given`)}static fromJSON(e){return r.SerializableMixin.fromJSON.call(this,e)}static extend(e,t){return(0,o.deprecateExtend)(this,t,e,"Types/_collection/List")}static checkOptions(e){if(e&&"items"in e&&!(e.items instanceof Array))throw new TypeError('Option "items" should be an instance of Array')}static es5Constructor(e){h.checkOptions(e),h.prototype.initList.call(this,e)}}return t.default=h,Object.assign(h.prototype,{"[Types/_collection/List]":!0,"[Types/_collection/IEnumerable]":!0,"[Types/_collection/IIndexedCollection]":!0,"[Types/_collection/IList]":!0,"[Types/_entity/IEquatable]":!0,_moduleName:"Types/collection:List",_$items:null,_indexer:null}),h.prototype.forEach=h.prototype.each,(0,a.register)("Types/collection:List",h,{instantiate:!1}),t}(0,{},l,x,c,s,a,e),A=O,T=function(e,t,i,s,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.Objectwise=t.Mapwise=t.Arraywise=void 0,Object.defineProperty(t,"Arraywise",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"Mapwise",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"Objectwise",{enumerable:!0,get:function(){return n.default}}),t}(0,{},x,u,_),w=T,E=function(e,t,i,s,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a="Changed",o="Unchanged";class l extends((0,r.mixin)(i.default,s.ManyToManyMixin,s.SerializableMixin,s.CloneableMixin)){constructor(e){super(e),this._publish("onChange"),this._checkIndex(),this._$acceptedIndex=this._$index,this._$state=o}destroy(){s.ManyToManyMixin.prototype.destroy.call(this),super.destroy()}get(){return this._$index}set(e){const t=void 0!==this._getValue(e),i=this._valueChanged(e);if(null===e||t)this._setValue(e);else throw new ReferenceError(`${this._moduleName}::set(): the index "${e}" is out of range`);if(i)this._notifyChange(this._$index,this.getAsValue())}getAsValue(e){return this._getValue(this._$index,e)}setByValue(e,t){const i=this._getIndex(e,t),s=this._valueChanged(i);if(null===e)this._$index=null;else if(void 0===i)throw new ReferenceError(`${this._moduleName}::setByValue(): the value "${e}" doesn't found in dictionary`);else this._setValue(i);if(s)this._notifyChange(this._$index,e)}isEqual(e){if(!(e instanceof l))return!1;if(!i.default.prototype.isEqual.call(this,e))return!1;else return this.get()===e.get()}valueOf(){return this.get()}toString(){const e=this.getAsValue();return null==e?"":String(e)}_checkIndex(){if(null!==this._$index)this._$index=parseInt(String(this._$index),10)}_notifyChange(e,t){const i={};i[e]=t,this._childChanged(i),this._notify("onChange",e,t)}acceptChanges(e){if(this.setState(o),this._$acceptedIndex=this._$index,e)this._childChanged(s.Record.prototype.acceptChanges)}rejectChanges(e){if(this.setState(o),this._$index=this._$acceptedIndex,e)this._childChanged(s.Record.prototype.rejectChanges)}setState(e){this._$state=e}getState(){return this._$state}isChanged(){return this._$state!==o}getOriginal(){if(this._$acceptedIndex)return this._$acceptedIndex;else return this._$index}getOriginalAsValue(e){const t=this._$acceptedIndex?this._$acceptedIndex:this._$index;return this._getValue(t,e)}_setValue(e){switch(this.getState()){case o:this._$acceptedIndex=this._$index,this._$index=e,this.setState(a);break;case a:if(this._$index===e)return;if(this._$acceptedIndex===e)this.rejectChanges(!0);else this._$index=e}this._checkIndex()}_valueChanged(e){return e!==this._$index}static produceInstance(e,t){return new this({dictionary:this.prototype._getDictionaryByFormat(t&&t.format),localeDictionary:this.prototype._getLocaleDictionaryByFormat(t&&t.format),index:e})}}return t.default=l,Object.assign(l.prototype,{"[Types/_collection/Enum]":!0,"[Types/_collection/IEnum]":!0,"[Types/_entity/IProducible]":!0,"[Types/_entity/IStateful]":!0,_moduleName:"Types/collection:Enum",_$index:null,_type:"enum"}),(0,n.register)("Types/collection:Enum",l,{instantiate:!1}),t}(0,{},b,s,a,e),R=E,$=function(e,t,i,s,n,r){"use strict";function a(e){return null==e?null:!!e}Object.defineProperty(t,"__esModule",{value:!0});const o="Changed",l="Unchanged";class h extends((0,r.mixin)(i.default,s.ManyToManyMixin,s.SerializableMixin,s.CloneableMixin)){constructor(e){super(e),this.$changedFields={},this._publish("onChange"),this._$values=this._$values||[]}destroy(){s.ManyToManyMixin.prototype.destroy.call(this),super.destroy()}get(e,t){const i=this._getOrdinalIndex(e,t);if(void 0!==i)return a(this._$values[i])}set(e,t,i){const s=this._getOrdinalIndex(e,i);if(void 0===s)throw new ReferenceError(`${this._moduleName}::set(): the value "${e}" doesn't found in dictionary`);if(t=a(t),this._$values[s]===t)return;this._setValue(s,t);const n=this._getIndex(e,i);this._notifyChange(e,n,t)}getByIndex(e){const t=this._getValue(e),i=this._getOrdinalIndex(t);if(void 0!==i)return this._$values[i]}setByIndex(e,t){const i=this._getValue(e);if(void 0===i)throw new ReferenceError(`${this._moduleName}::setByIndex(): the index ${e} doesn't found in dictionary`);const s=this._getOrdinalIndex(i);if(t=a(t),void 0!==s){if(this._$values[s]===t)return;this._setValue(s,t)}this._notifyChange(i,e,t)}fromArray(e){const t=this.getEnumerator();let i=0;const s=[];for(;t.moveNext();){const n=void 0===e[i]?null:e[i];this._setValue(i,n);s[t.getCurrentIndex()]=n,i++}this._notifyChanges(s)}setFalseAll(){this._setAll(!1)}setTrueAll(){this._setAll(!0)}setNullAll(){this._setAll(null)}isEqual(e){if(!(e instanceof h))return!1;if(!i.default.prototype.isEqual.call(this,e))return!1;const t=this.getEnumerator();let s;for(;t.moveNext();)if(s=t.getCurrent(),this.get(s)!==e.get(s))return!1;return!0}toString(){return"["+this._$values.map((e=>null===e?"null":e)).join(",")+"]"}_getOrdinalIndex(e,t){const i=this.getEnumerator(t);let s=0;for(;i.moveNext();){if(i.getCurrent()===e)return s;s++}}_setAll(e){const t=this._$values,i=this.getEnumerator();let s=0;for(;i.moveNext();){if(t[s]!==e){this._setValue(s,e);const t=i.getCurrentIndex();this._notifyChange(this._getValue(t),t,e)}s++}}_notifyChange(e,t,i){const s={};
82if(s[String(e)]=i,this._childChanged(s),!this._hasChangedField())this.rejectChanges(!0);this._notify("onChange",e,t,i)}_notifyChanges(e){if(this._childChanged(e),this._hasChangedField())this._notify("onChange",e);else this.rejectChanges(!0)}acceptChanges(e){if(this.setState(l),this._clearChangedFields(),e)this._childChanged(s.Record.prototype.acceptChanges)}rejectChanges(e){if(Object.entries(this.$changedFields).forEach((([e,t])=>{this._$values[Number(e)]=t})),this._clearChangedFields(),e)this._childChanged(s.Record.prototype.rejectChanges)}setState(e){this._$state=e}getState(){return this._$state}isChanged(){return this._hasChangedField()}getOriginal(e,t){const i=this._getOrdinalIndex(e,t);if(void 0!==i)if(this.$changedFields.hasOwnProperty(i))return this.$changedFields[i];else return a(this._$values[i])}getOriginalByIndex(e){const t=this._getValue(e),i=this._getOrdinalIndex(t);if(void 0!==i)if(this.$changedFields.hasOwnProperty(e))return this.$changedFields[e];else return this._$values[i]}_setValue(e,t){this._setChangedField(e,t),this._$values[e]=t}_setChangedField(e,t){const i=this._$values[e];if(!this.$changedFields.hasOwnProperty(e)||this.$changedFields[e]!==t){if(!this.$changedFields.hasOwnProperty(e))if(this.$changedFields[e]=i,this._$state===l)this.setState(o)}else this._unsetChangedField(e)}_unsetChangedField(e){delete this.$changedFields[e]}_clearChangedFields(){this.$changedFields={},this.setState(l)}_hasChangedField(){const e=this.$changedFields;if(!e)return!1;else return Object.keys(e).length>0}static produceInstance(e,t){return new this({dictionary:this.prototype._getDictionaryByFormat(t&&t.format),localeDictionary:this.prototype._getLocaleDictionaryByFormat(t&&t.format),values:e})}}return t.default=h,Object.assign(h.prototype,{"[Types/_collection/Flags]":!0,"[Types/_collection/IFlags]":!0,"[Types/_entity/IProducible]":!0,"[Types/_entity/IStateful]":!0,_moduleName:"Types/collection:Flags",_$values:void 0,_type:"flags"}),(0,n.register)("Types/collection:Flags",h,{instantiate:!1}),t}(0,{},b,s,a,e),D=$,N=function(e,t,i,s,n,r,a,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const l=Array.prototype.slice;class h extends s.default{constructor(e){super(e),this.initObservableList()}initObservableList(){n.default.initMixin(this),this._publish("onCollectionChange","onCollectionItemChange","onAfterCollectionChange")}assign(e){const t=this._itemsSlice(),s=this._eventRaising;if(this._eventRaising=!1,super.assign(e),this._eventRaising=s,t.length>0||this._$items.length>0)this._notifyCollectionChange(i.default.ACTION_RESET,this._itemsSlice(),0,t,0,"assign"),this._notifyAfterCollectionChange(i.default.ACTION_RESET)}append(e){const t=this._eventRaising;this._eventRaising=!1;const s=this.getCount();super.append(e),this._eventRaising=t,this._notifyCollectionChange(i.default.ACTION_ADD,this._itemsSlice(s),s,[],0,"append"),this._notifyAfterCollectionChange(i.default.ACTION_ADD)}prepend(e){const t=this._eventRaising;this._eventRaising=!1;const s=this.getCount();super.prepend(e),this._eventRaising=t,this._notifyCollectionChange(i.default.ACTION_ADD,this._itemsSlice(0,this.getCount()-s),0,[],0,"prepend"),this._notifyAfterCollectionChange(i.default.ACTION_ADD)}clear(){const e=this._$items.slice(),t=this._eventRaising;this._eventRaising=!1,super.clear(),this._eventRaising=t,this._notifyCollectionChange(i.default.ACTION_RESET,this._itemsSlice(),0,e,0,"clear"),this._notifyAfterCollectionChange(i.default.ACTION_RESET)}add(e,t){super.add(e,t);const s=this._isValidIndex(t)?t:this.getCount()-1;this._notifyCollectionChange(i.default.ACTION_ADD,this._itemsSlice(s,s+1),s,[],0,"add"),this._notifyAfterCollectionChange(i.default.ACTION_ADD)}removeAt(e){const t=super.removeAt(e);return this._notifyCollectionChange(i.default.ACTION_REMOVE,[],0,[t],e,"removeAt"),this._notifyAfterCollectionChange(i.default.ACTION_REMOVE),t}replace(e,t){const s=this._$items[t];if(super.replace(e,t),s!==e)this._notifyCollectionChange(i.default.ACTION_REPLACE,this._itemsSlice(t,t+1),t,[s],t,"replace"),this._notifyAfterCollectionChange(i.default.ACTION_REPLACE)}move(e,t){const s=this._$items[e];if(super.move(e,t),e!==t)this._notifyCollectionChange(i.default.ACTION_MOVE,[s],t,[s],e,"move"),this._notifyAfterCollectionChange(i.default.ACTION_MOVE)}relationChanged(e,t){const i=e.target,s=this.getIndex(i),n={};if(s>-1)this._reindex(void 0,s,1);if(void 0===t[0])this._notifyItemChange(i,e.data||{});return n[s]=i,{target:i,data:n}}setEventRaising(e,t){n.default.prototype.setEventRaising.call(this,e,t);let s=null;if(e&&t&&this._silentChangedItems)if(this._silentChangedItems.size>=Math.min(this._resetChangesCount,this._$items.length))this._notifyCollectionChange(i.default.ACTION_RESET,this._itemsSlice(),0,[],0,"setEventRaising",this._silentChangedPropertyItems),s=i.default.ACTION_RESET;else{const e=[];
82this._silentChangedItems.forEach((t=>e.push(t))),this._extractPacksByList(this,e,((e,t)=>{this._notifyCollectionChange(i.default.ACTION_CHANGE,e,t,e,t,"setEventRaising",this._silentChangedPropertyItems)})),s=i.default.ACTION_CHANGE}this._notifyAfterCollectionChange(s,this._silentChangedPropertyItems),delete this._silentChangedItems,delete this._silentChangedPropertyItems}_notifyItemChange(e,t){if(this._isNeedNotifyCollectionItemChange()){const i=this.getIndex(e);this._notify("onCollectionItemChange",this._$items[i],i,t)}if((this.hasEventHandlers("onCollectionItemChange")||this.hasEventHandlers("onCollectionChange")||this.hasEventHandlers("onAfterCollectionChange"))&&!this._eventRaising){if(!this._silentChangedItems)this._silentChangedItems=new Set;if(!this._silentChangedPropertyItems)this._silentChangedPropertyItems={};this._silentChangedItems.add(e);const i=this.getIndex(e);if(!this._silentChangedPropertyItems[i])this._silentChangedPropertyItems[i]=t;else Object.assign(this._silentChangedPropertyItems[i],t)}}_itemsSlice(e,t){return l.apply(this._$items,[e,t])}_isNeedNotifyCollectionItemChange(){return this._eventRaising&&this.hasEventHandlers("onCollectionItemChange")}_isNeedNotifyAfterCollectionChange(){return this._eventRaising&&this.hasEventHandlers("onAfterCollectionChange")}_notifyAfterCollectionChange(e,t){if(this._isNeedNotifyAfterCollectionChange())this._notify("onAfterCollectionChange",e,t)}static fromJSON(e){return s.default.fromJSON.call(this,e)}static es5Constructor(e){s.default.es5Constructor.call(this,e),h.prototype.initObservableList.call(this)}}return(0,o.applyMixins)(h,r.ObservableMixin,i.default,n.default),Object.assign(h.prototype,{"[Types/_collection/ObservableList]":!0,"[Types/_entity/relation/IReceiver]":!0,_moduleName:"Types/collection:ObservableList",_resetChangesCount:100}),t.default=h,(0,a.register)("Types/collection:ObservableList",h,{instantiate:!1}),t}(0,{},l,O,I,s,a,e),M=N,P=function(e,t,i){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!e||!e["[Types/_collection/IEnumerable]"])throw new TypeError('Argument "items" should implement Types/collection:IEnumerable');const t=[];return e.each((e=>{t.push(e)})),new i.default({items:t})},t}(0,{},O),S=function(e,t,i,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFormat=void 0,t.isFormat=function(e){return!!e["[Types/_collection/format/Format]"]};class n extends s.default{constructor(e){super(e);for(let e=0,t=this._$items.length;e<t;e++)this._checkItem(this._$items[e]),this._checkName(this._$items[e],e)}get copyOnWrite(){return this._$cow}add(e,t){this._checkCow(),this._checkItem(e),this._checkName(e),super.add(e,t)}remove(e){return this._checkCow(),this._checkItem(e),super.remove(e)}replace(e,t){this._checkCow(),this._checkItem(e),this._checkName(e,t),super.replace(e,t)}assign(e){this._checkCow();for(let t=0,i=(e=this._itemsToArray(e)).length;t<i;t++)this._checkItem(e[t]);super.assign(e);for(let e=0,t=this._$items.length;e<t;e++)this._checkName(this._$items[e],e)}append(e){this._checkCow();for(let t=0,i=(e=this._itemsToArray(e)).length;t<i;t++)this._checkItem(e[t]),this._checkName(e[t]);super.append(e)}prepend(e){this._checkCow();for(let t=0,i=(e=this._itemsToArray(e)).length;t<i;t++)this._checkItem(e[t]),this._checkName(e[t]);super.prepend(e)}getCount(){return super.getCount()}at(e){return super.at(e)}getIndexByValue(e,t){return super.getIndexByValue(e,t)}removeAt(e){return this._checkCow(),super.removeAt(e)}isEqual(e){if(e===this)return!0;if(!e)return!1;if(!(e instanceof n))return!1;if(this.getCount()!==e.getCount())return!1;for(let t=0,i=this.getCount();t<i;t++)if(!this.at(t).isEqual(e.at(t)))return!1;return!0}removeField(e){this._checkCow();const t=this.getIndexByValue("name",e);if(-1===t)throw new ReferenceError(`${this._moduleName}::removeField(): field "${e}" doesn't found`);this.removeAt(t)}getFieldIndex(e){return this.getIndexByValue("name",e)}getFieldName(e){return this.at(e).getName()}modify(e){const t=this._getModifiedItems(e);return new n({items:t,cow:this._$cow})}[i.INTERNAL_MODIFY_METHOD](e){const t=this._getModifiedItems(e);return super.assign(t),this}_checkItem(e){if(!(e&&e instanceof i.format.Field))throw new TypeError('Item should be an instance of "Types/entity:format.Field"')}_checkName(e,t){const i=this.getFieldIndex(e.getName());if(i>-1&&i!==t)throw new ReferenceError(`${this._moduleName}: field with name "${e.getName()}" already exists`)}_checkCow(){if(this._$cow)throw new ReferenceError(`${this._moduleName}: нелÑÐ·Ñ Ð¼Ð¾Ð´Ð¸ÑиÑиÑоваÑÑ ÑоÑÐ¼Ð°Ñ Ð·Ð°Ð¿Ð¸Ñи пÑи акÑивном Ñежиме Copy-On-Write (опÑÐ¸Ñ cow)`)}_itemsToArray(e){return super._itemsToArray(e)}}return t.default=n,Object.assign(n.prototype,{"[Types/_collection/format/Format]":!0,"[Types/_entity/IEquatable]":!0,_moduleName:"Types/collection:format.Format",_$cow:!1}),t}(0,{},s,O),k=function(e,t,i,s){"use strict";
82return Object.defineProperty(t,"__esModule",{value:!0}),t.recordSet=t.list=void 0,Object.defineProperty(t,"list",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"recordSet",{enumerable:!0,get:function(){return s.default}}),t}(0,{},P,f),F=k,j=function(e,t,i,s,n){"use strict";function r(e){if(!(e&&e instanceof Array))throw new TypeError("Types/_collection/format/factory: declaration should be an instance of Array");const t=[];for(let i=0;i<e.length;i++)t.push(s.format.fieldsFactory(e[i]));return new i.default({items:t})}return Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,(0,n.register)("Types/collection:format.factory",r,{instantiate:!1}),t}(0,{},S,s,a),V=function(e,t,i,s){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.isFormat=t.Format=t.factory=void 0,Object.defineProperty(t,"factory",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"Format",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"isFormat",{enumerable:!0,get:function(){return s.isFormat}}),t}(0,{},j,S),L=V,z=function(e,t,i,s,n,r,a,o,l,h,c){"use strict";function d(e,t){if(false)if(e&&(0,c.isRecord)(e)&&null===e.get(t))l.logger.info("Types/_collection/RecordSet: Id property must not be null");else if(e instanceof f)e.each((e=>{d(e,t)}))}Object.defineProperty(t,"__esModule",{value:!0});const u="Types/entity:Model",_=a.Record.RecordState;class f extends s.default{constructor(e){f.checkOptions(e),super(e),this["[Types/_collection/RecordSet]"]=!0,this.initRecordSet(e)}initRecordSet(e){if(e){if(!this._$keyProperty&&e.idProperty)this._$keyProperty=e.idProperty;if("meta"in e)this._$metaData=e.meta}if(!this._$format&&this._$model&&"function"==typeof this._$model&&this._$model.prototype&&this._$model.prototype._$format)this._$format=this._$model.prototype._$format;if(a.FormattableMixin.initMixin(this),this._$rawData)this._resetRawDataAdapter(this._getRawDataFromOption()),this._initByRawData();this._publish("onPropertyChange")}destroy(e){this._$model="",this._$metaData=null,this._metaData=null,this._detachedRecords=null,super.destroy()}getEnumerator(e){const t=new n.default(this._$items);if(t.setResolver((e=>this.at(e))),e)t.setFilter((t=>t instanceof a.Record?t.getState()===e:!0));return t}each(e,t,i){if(t instanceof Object)i=t,t=void 0;i=i||this;const s=this.getCount();let n=0;for(let r=0;r<s;r++){const s=this.at(r);let o=!0;if(t)o=s instanceof a.Record?s.getState()===t:!0;if(o)e.call(i,s,n++,this)}}clear(){this._detachItems(),this._clearDetachedRecordList(),this._clearRawData(),super.clear()}add(e,t){const i=this._normalizeItems([e],_.ADDED)[0];return this._getRawDataAdapter().add(i.getRawData(!0),t),super.add(i,t),i}at(e){return this._getRecord(e)}remove(e){return this._checkItem(e),super.remove(e)}removeAt(e){const t=this.at(e);if(t)this._storeDetachedRecord(e,t),t.detach();this._getRawDataAdapter().remove(e);return super.removeAt(e)}replace(e,t){const i=this._normalizeItems([e],_.CHANGED)[0];this._getRawDataAdapter().replace(i.getRawData(!0),t);const s=this._$items[t];if(super.replace(i,t),s)s.detach();return i}move(e,t){this._getRecord(e),this._getRawDataAdapter().move(e,t),super.move(e,t)}assign(e){if(e===this)return[];const t=this.hasDeclaredFormat();if(e instanceof f&&!t){this._detachItems(),this._$adapter=e.getAdapter(),this._assignRawData(e.getRawData(),t);const i=new Array(e.getCount());return super.assign(i),i}if((e=this._itemsToArray(e)).length&&e[0]&&(0,c.isRecord)(e[0]))this._$adapter=e[0].getAdapter();let i=this._normalizeItems(e,_.ADDED);return this._detachItems(),this._clearRawData(),i=this._addItemsToRawData(i),super.assign(i),i}append(e){let t=this._itemsToArray(e);return t=this._normalizeItems(t,_.ADDED,e instanceof f),t=this._addItemsToRawData(t),super.append(t),t}prepend(e){let t=this._itemsToArray(e);return t=this._normalizeItems(t,_.ADDED,e instanceof f),t=this._addItemsToRawData(t,0),super.prepend(t),t}_getIndexer(){if(this._indexer)return this._indexer;let e;if(this._$model===this._defaultModel){const t=this._getAdapter(),i=this._getRawDataAdapter();e=new r.default(this._getRawData(),(()=>i.getCount()),((e,t)=>i.at(t)),((e,i)=>t.forRecord(e).get(i)))}else e=new r.default(this._$items,(e=>e.length),((e,t)=>this.at(t)),((e,t)=>e.get(t)));return this._indexer=e,e}_itemsSlice(e,t){if(this._isNeedNotifyCollectionChange()){if(void 0===e)e=0;if(void 0===t)t=this._$items.length;for(let i=e;i<t;i++)this._getRecord(i)}return super._itemsSlice(e,t)}_detachItems(e){if(!e)e=this._$items;for(let t=0,i=e.length;t<i;t++){const i=e[t];if(i)i.detach()}}_getSerializableState(e){let t=s.default.prototype._getSerializableState.call(this,e);return t=a.FormattableMixin.prototype._getSerializableState.call(this,t),t._instanceId=this.getInstanceId(),delete t.$options.items,t}_setSerializableState(e){const t=super._setSerializableState(e),i=a.FormattableMixin.prototype._setSerializableState(e);return function(){t.call(this),i.call(this),this._instanceId=e._instanceId}}setRawData(e){const t=this._$items.slice(),s=this._eventRaising;this._eventRaising=!1,this.clear(),this._eventRaising=s,this._assignRawData(e),this._initByRawData(),this._notifyCollectionChange(i.default.ACTION_RESET,this._$items,0,t,0,"setRawData"),this._notifyAfterCollectionChange(i.default.ACTION_RESET)}addField(e,t,i){const s=a.FormattableMixin.prototype.addField.call(this,e,t);if(this._parentChanged(a.Record.prototype.addField),void 0!==i){const e=s.getName();this.each((t=>{if(t instanceof a.Record)t.set(e,i)}))}return this._nextVersion(),s}removeField(e){a.FormattableMixin.prototype.removeField.call(this,e),this._nextVersion(),this._parentChanged(a.Record.prototype.removeField)}removeFieldAt(e){a.FormattableMixin.prototype.removeFieldAt.call(this,e),this._nextVersion(),this._parentChanged(a.Record.prototype.removeFieldAt)}_createRawDataAdapter(){return this._getAdapter().forTable(this._getRawDataFromOption())}_assignRawData(e,t){if(a.FormattableMixin.prototype.setRawData.call(this,e),this._clearIndexer(),!t)this._clearFormat();this._nextVersion()}_clearRawData(){if(!this.hasDeclaredFormat())this._clearFormat();this._getRawDataAdapter().clear(),this._resetRawDataFields()}static produceInstance(e,t){const i={rawData:e};if(t){if(t.adapter)i.adapter=t.adapter;if(t.model)i.model=t.model;if(t.keyProperty)i.keyProperty=t.keyProperty;else if(t.idProperty)i.keyProperty=t.idProperty}return new this(i)}relationChanged(e,t){const i=this.getIndex(e.target);if(i>-1){const t=this._getRawDataAdapter(),s=t.at(i),n=e.target.getRawData(!0);if(s!==n)t.replace(n,i)}return super.relationChanged(e,t)}clone(e){const t=super.clone(e);if(e)t._$items=this._$items.slice();return t}isEqual(e){if(e===this)return!0;
82if(!e)return!1;if(!(e instanceof f))return!1;else return(0,h.isEqual)(this._getRawData(),e.getRawData(!0))}getModel(){return this._$model}acceptChanges(e,t){const i=[];this.each(((e,s)=>{if((0,c.isRecord)(e)){if(e.getState()===_.DELETED)i.push(s);e.acceptChanges(!1,t)}}));for(let e=i.length-1;e>=0;e--)this.removeAt(i[e]);if(this._clearDetachedRecordList(),e)this._childChanged(a.Record.prototype.acceptChanges)}rejectChanges(e,t){var i;const s=[];null===(i=this._detachedRecords)||void 0===i||i.forEach((e=>{e.value.rejectChanges(!1,!0);this.add(e.value,e.key).setState(_.UNCHANGED)})),this.each(((e,i)=>{if((0,c.isRecord)(e)){switch(e.getState()){case _.ADDED:s.push(i);break;case _.DELETED:e.setState(_.UNCHANGED)}e.rejectChanges(!1,t)}}));for(let e=s.length-1;e>=0;e--)this.removeAt(s[e]);if(this._clearDetachedRecordList(),e)this._childChanged(a.Record.prototype.rejectChanges)}isChanged(){var e;let t=!1;const i=this._$items,s=i.length;for(let n=0;n<s;n++)if(null===(e=i[n])||void 0===e?void 0:e.isChanged()){t=!0;break}return t}getKeyProperty(){if(!this._$keyProperty){const e=this._getAdapter().getKeyField(this._getRawData());this._$keyProperty=e}return this._$keyProperty}setKeyProperty(e){if(this._$keyProperty!==e)this._$keyProperty=e,this.each((t=>{if(t.setKeyProperty)t.setKeyProperty(e)})),this._notify("onPropertyChange",{keyProperty:this._$keyProperty})}getRecordById(e){return this.at(this.getIndexByValue(this.getKeyProperty(),e))}getMetaData(){if(this._metaData)return this._metaData;const e=(e,t)=>a.factory.cast(e,this._getFieldType(t),{format:t,adapter:this._getAdapter(),keyProperty:this.getKeyProperty()}),t=this._$metaFormat?this._buildFormat(this._$metaFormat):null;let i={};if(this._$metaData)if(this._$metaData instanceof Object&&Object.getPrototypeOf(this._$metaData)===Object.prototype)Object.keys(this._$metaData).forEach((s=>{let n=this._$metaData[s];if(t){let i;const r=t.getFieldIndex(s);if(r>-1)i=t.at(r),n=e(n,i)}i[s]=n}));else i=this._$metaData;else{let s=this._getRawDataAdapter();if(s["[Types/_entity/adapter/IDecorator]"])s=s.getOriginal();if(function(e){return e["[Types/_entity/adapter/IMetaData]"]}(s))s.getMetaDataDescriptor().forEach((n=>{const r=n.getName();let a;if(t){const e=t.getFieldIndex(r);if(e>-1)a=t.at(e)}i[r]=e(s.getMetaData(r),a||n)}))}return this._metaData=i,this._metaData}setMetaData(e,t=!1){if(this._metaData=this._$metaData=e,e instanceof Object){const i=this._getRawDataAdapter();if(i["[Types/_entity/adapter/IMetaData]"]){(t?i.getMetaFieldEnumerator(e):i.getMetaDataDescriptor()).forEach((t=>{const s=t.getName(),n=a.factory.serialize(e[s],{format:t,adapter:this.getAdapter()});i.setMetaData(s,n)}))}}this._notify("onPropertyChange",{metaData:e})}merge(e,t){if(t instanceof Object&&t.hasOwnProperty("merge")&&!t.hasOwnProperty("replace"))t.replace=t.merge;if((t={add:!0,remove:!0,replace:!0,inject:!1,prepend:!1,...t||{}}).add&&t.prepend)throw new TypeError('Types/collection:RecordSet::merge Only one of merge options "add", "prepend" could be set at a time');const i=e.getCount(),s=this.getKeyProperty(),n={},r={},o=[],l=[],h=[];let c,d,u;this.each(((e,t)=>{if(e instanceof a.Record)n[e.get(s)]=t}));for(let a=0;a<i;a++){if(c=e.at(a),d=null==c?void 0:c.get(s),0===a)this._checkItem(c);if(n.hasOwnProperty(d)){if(t.inject){if(u=n[d],!c.isEqual(this.at(u)))h.push([c,u])}else if(t.replace)if(u=n[d],!c.isEqual(this.at(u)))l.push([c,u])}else if(t.add||t.prepend)o.push(c);if(t.remove)r[d]=!0}if(l.length)for(let e=0;e<l.length;e++)this.replace(l[e][0],l[e][1]);if(h.length){this._normalizeItems(h.map((e=>e[0]))).forEach(((e,t)=>{h[t][0]=e}));for(let e=0;e<h.length;e++)c=this.at(h[e][1]),c.setRawData(h[e][0].getRawData())}if(o.length)if(t.prepend)this.prepend(o);else this.append(o);if(t.remove){const e=[];this.each(((t,i)=>{if(t instanceof a.Record&&!r.hasOwnProperty(t.get(s)))e.push(i)}));for(let t=e.length-1;t>=0;t--)this.removeAt(e[t])}}getTypeName(){return this._getRawDataAdapter().getTypeName()}getMetaType(){return this._getRawDataAdapter().getMetaType()}setTypeName(e,t){this._getRawDataAdapter().setTypeRef({name:e,metaType:t})}isTyped(){return this._getRawDataAdapter().isTyped()}_addItemsToRawData(e,t){const i=this._getRawDataAdapter();let s;for(let n=0,r=(e=this._itemsToArray(e)).length;n<r;n++)s=e[n],i.add(s.getRawData(!0),void 0===t?void 0:t+n);return e}_normalizeItems(e,t,i){let s=this.hasDeclaredFormat();const n=[];let r,a,o,l;for(let h=0;h<e.length;h++){if(o=e[h],!i||0===h)this._checkItem(o);if(!s&&0===this.getCount()){if(l=o.getFormat(!0),this._clearFormat(),this._resetRawDataFields(),o.hasDeclaredFormat())this._format=this._$format=l.clone(),s=!0}
82else if(!l)l=this._getFormat(!0);if(i&&void 0===r)r=l.isEqual(o.getFormat(!0));if(a=this._normalizeItem(o,l,r),t)a.setState(t);n.push(a)}return n}_normalizeItem(e,t,i){let s;if((0,c.isCowFormat)(t)&&!t.isEqual(e.getFormat(!0)))throw new Error("ФоÑÐ¼Ð°Ñ Ð´Ð¾Ð±Ð°Ð²Ð»Ñемой запиÑи должен ÑооÑвеÑÑÑвоваÑÑ ÑоÑмаÑÑ ÑекоÑдÑеÑа, коÑоÑÑй бÑл Ñоздан Ñ Ð¾Ð¿Ñией Copy-On-Write.");if(i||t.isEqual(e.getFormat(!0)))s=e.getRawData();else{const i=this.getAdapter().forRecord(null,this._getRawData()),n=e.getAdapter().forRecord(e.getRawData(!0));t.each(((e,t)=>{i.addField(e,t);const s=e.getName();i.set(s,n.get(s))})),s=i.getData()}return this._buildRecord(s,e instanceof a.Model?e.getInstanceState():null)}_checkItem(e){if(!e||!(0,c.isRecord)(e))throw new TypeError("Item should be an instance of Types/entity:Record");d(e,this.getKeyProperty()),this._checkAdapterCompatibility(e.getAdapter())}_buildRecord(e,t){return(0,o.create)(this._$model,{owner:this,writable:this.writable,state:_.UNCHANGED,adapter:this.getAdapter(),rawData:e,instanceState:t,keyProperty:this.getKeyProperty()})}_getRecord(e){if(e<0)return;if(e>=this.getCount()){if(this.getCount()>0)l.logger.info(this._moduleName,`Item index ${e} is out of bounds. Valid range: 0 to ${this.getCount()-1}.`);return}let t=this._$items[e];if(!t){const i=this._getRawDataAdapter();t=this._$items[e]=this._buildRecord((()=>i.at(t?this.getIndex(t):e)),null),this._addChild(t),d(t,this.getKeyProperty())}if(this._isSessionGathering()&&(0,a.isObservableMixin)(t))this._createObservableDependency(t);return t}_initByRawData(){const e=this._getRawDataAdapter();this._$items.length=0,this._$items.length=e.getCount()}_storeDetachedRecord(e,t){if(t.getState()!==_.ADDED){if(!this._detachedRecords)this._detachedRecords=[];this._detachedRecords.unshift({key:e,value:t})}}_clearDetachedRecordList(){this._detachedRecords=null}toJSON(){return super.toJSON()}static fromJSON(e){return s.default.fromJSON.call(this,e)}static checkOptions(e){if(e)if("items"in e)l.logger.stack('Types/_collection/RecordSet: option "items" give no effect, use "rawData" instead',1)}static es5Constructor(e){f.checkOptions(e),s.default.es5Constructor.call(this,e),f.prototype.initRecordSet.call(this,e)}static patch(e,t){t=t||["changed","added","removed"];const i=t=>{const i=new f({adapter:e.getAdapter(),keyProperty:e.getKeyProperty()});return e.each((e=>{i.add(e)}),t),i},s=new a.Record({format:[{name:t[0],type:"recordset"},{name:t[1],type:"recordset"},{name:t[2],type:"array",kind:"string"}],adapter:e.getAdapter()});return s.set(t[0],i(_.CHANGED)),s.set(t[1],i(_.ADDED)),s.set(t[2],(e=>{const t=[],i=e.getKeyProperty();return e.each((e=>{t.push(e.get(i))})),t})(i(_.DELETED))),s.acceptChanges(),s}}return(0,l.applyMixins)(f,a.FormattableMixin,a.InstantiableMixin),Object.assign(f.prototype,{"[Types/_collection/RecordSet]":!0,"[Types/_entity/IObservableObject]":!0,"[Types/_entity/IProducible]":!0,"[Types/_entity/IStateful]":!0,_moduleName:"Types/collection:RecordSet",_instancePrefix:"recordset-",_defaultModel:u,_$model:u,_$keyProperty:"",_$metaData:null,_$metaFormat:null,_metaData:null,getIdProperty:f.prototype.getKeyProperty,setIdProperty:f.prototype.setKeyProperty}),f.prototype.forEach=f.prototype.each,t.default=f,(0,o.register)("Types/collection:RecordSet",f,{instantiate:!1}),t}(0,{},l,N,x,c,s,a,e,i,o),B=z,r.isRecordSet=r.RecordSet=r.ObservableList=r.ListOperationType=r.List=r.IObservable=r.ObservableChangeAction=r.IndexedEnumeratorMixin=r.Indexer=r.Dictionary=r.EventRaisingMixin=r.enumerator=r.format=r.Flags=r.factory=r.Enum=r.enumerableComparator=void 0,Object.defineProperty(r,"enumerableComparator",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(r,"Enum",{enumerable:!0,get:function(){return R.default}}),r.factory=F,r.format=L,Object.defineProperty(r,"Flags",{enumerable:!0,get:function(){return D.default}}),r.enumerator=w,Object.defineProperty(r,"EventRaisingMixin",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(r,"Dictionary",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(r,"Indexer",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(r,"IndexedEnumeratorMixin",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(r,"ObservableChangeAction",{enumerable:!0,get:function(){return h.ChangeAction}}),Object.defineProperty(r,"IObservable",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(r,"List",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(r,"ListOperationType",{enumerable:!0,get:function(){return A.ListOperationType}}),Object.defineProperty(r,"ObservableList",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(r,"RecordSet",{enumerable:!0,get:function(){return B.default}}),Object.defineProperty(r,"isRecordSet",{enumerable:!0,get:function(){return o.isRecordSet}}),(0,a.register)("Types/collection:format.Format",L.Format,{instantiate:!1}),(0,a.register)("Types/collection:format.factory",L.factory,{instantiate:!1}),(0,a.register)("Types/collection:Enum",R.default,{instantiate:!1}),(0,a.register)("Types/collection:Flags",D.default,{instantiate:!1}),(0,a.register)("Types/collection:List",A.default,{instantiate:!1}),(0,a.register)("Types/collection:ObservableList",M.default,{instantiate:!1}),(0,a.register)("Types/collection:RecordSet",B.default,{instantiate:!1}),(0,a.register)("Types/collection:enumerator.Arraywise",w.Arraywise,{instantiate:!1}),r})); 83define("UI/Deps",["require","exports","UICommon/Deps"],(function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.collectDependencies=n.getOptionalBundles=n.addPageDeps=n.executeSyncOrAsync=n.isModuleExists=void 0,Object.defineProperty(n,"isModuleExists",{enumerable:!0,get:function(){return t.isModuleExists}}),Object.defineProperty(n,"executeSyncOrAsync",{enumerable:!0,get:function(){return t.executeSyncOrAsync}}),Object.defineProperty(n,"addPageDeps",{enumerable:!0,get:function(){return t.addPageDeps}}),Object.defineProperty(n,"getOptionalBundles",{enumerable:!0,get:function(){return t.getOptionalBundles}}),Object.defineProperty(n,"collectDependencies",{enumerable:!0,get:function(){return t.collectDependencies}})})); 84define("UICommon/Deps",["WasabyLoader/ModulesLoader","WasabyLoader/Library","UICommon/Utils","Types/object","I18n/i18n","Env/Env","Application/Env","require","exports"],(function(e,s,t,n,o,i,r,l,c){var u,a,p,d,f,g,h,m,P,y,D,k;return Object.defineProperty(c,"__esModule",{value:!0}),u=function(e,s,t,n){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.getOptionalBundles=s.getModulesDependencies=s.isDebug=s.isModuleExists=s.ModulesDependencies=void 0;let o="resources",i={};try{i=e(`json!${o}
84/contents`)||{}}catch{try{o=n.constants.resourceRoot,o="/"===o?"":o,i=e(`json!${o}contents`)||{}}catch{i={}}}const r={nodes:{},links:{},bundles:{},optionalBundles:{},optionalBundlesModuleNames:[]};class l{get nodes(){return this.modulesMeta.nodes}get optionalBundlesModuleNames(){return this.modulesMeta.optionalBundlesModuleNames}constructor(e,s={}){this.rootPath=e,this.modules=s,this.modulesMeta=this.getModulesDeps()}getModulesDeps(){if("undefined"!=typeof window)return r;const e=[],s=[],t={};for(const n of Object.keys(this.modules)){if(this.modules[n].path)e.push(n);if(this.modules[n].hasOptionalBundles)s.push(n);if(this.modules[n].features){const e=this.modules[n].features;for(const s in e){if(!e.hasOwnProperty(s))continue;if(e[s].indexOf("/")>=0){t[s]=e[s];continue}const n=s.split("/");n[0]=e[s],t[s]=n.join("/")}}}const n=[this.rootPath,...e].map(this.requireModuleDeps.bind(this)).reduce(((e,s)=>{for(const t of Object.keys(s.links))e.links[t]=s.links[t];for(const t of Object.keys(s.nodes))e.nodes[t]=s.nodes[t];for(const t of Object.keys(s.bundles))e.bundles[t]=s.bundles[t];return e}));let o={optionalBundles:{}};if(s.length)o=s.map(this.requireModuleOptionalBundles.bind(this)).map((({bundles:e})=>{const s={};for(const t in e)if(e.hasOwnProperty(t))for(const n of e[t])s[n]=t.endsWith(".js")?t:`${t}.js`;return{optionalBundles:s}})).reduce(((e,s)=>({optionalBundles:{...e.optionalBundles,...s.optionalBundles}})));return{...n,...o,optionalBundlesModuleNames:s,features:t}}requireModuleDeps(e){var s;let t;try{t=this.require(`json!${e}/module-dependencies`)}catch{return r}let n={};try{const t=this.require(`json!${e}/contents`),o=null==t?void 0:t.modules;if(o&&(Object.keys(o).length>1||(null===(s=null==o?void 0:o[e])||void 0===s?void 0:s.hasBundles)))n=this.require(`json!${e}/bundlesRoute`)}catch{}if(!t.nodesList)return{links:t.links,nodes:t.nodes,bundles:n};if(this.isStringKeysInLinks(t)){const e=this.convertLinks(t);return{links:e.links,nodes:e.nodes,bundles:n}}const{links:o,nodes:i}=this.convertLinksAndNodes(t);return{links:o,nodes:i,bundles:n}}requireModuleOptionalBundles(e){let s={};try{s=this.require(`json!${e}/optionalBundles`)}catch{}return{bundles:s}}isStringKeysInLinks(e){for(const s in e.links)if(e.links.hasOwnProperty(s))if(/^\d+$/.test(s))return!1;else return!0;return!1}convertLinks(e){const s={};for(const t in e.links)if(e.links.hasOwnProperty(t))s[t]=e.links[t].map((s=>e.nodesList[s]));return{nodes:e.nodes,links:s}}convertLinksAndNodes(e){const s={};for(const t in e.links){if(!e.links.hasOwnProperty(t))continue;s[e.nodesList[t]]=e.links[t].map((s=>e.nodesList[s]))}const t={};for(const s in e.nodes){if(!e.links.hasOwnProperty(s))continue;t[e.nodesList[s]]=e.nodes[s]}return{nodes:t,links:s}}require(s){return e(s)}}s.ModulesDependencies=l;const c=new l(o,i.modules);return s.isModuleExists=function(e){if("debug"===i.buildMode)return!0;else return!!c.nodes[e]},s.isDebug=function(){return"true"===n.cookie.get("s3debug")||"debug"===i.buildMode},s.getModulesDependencies=function(){return c.modulesMeta},s.getOptionalBundles=function(){if(!c.optionalBundlesModuleNames||"true"!==n.cookie.get("optionalBundles")&&"true"!==(0,t.getConfig)("optionalBundles"))return{};const e={};return c.optionalBundlesModuleNames.forEach((s=>{e[s]=`${s}/optionalBundles`})),e},s}(l,{},r,i),a=u,p=function(e,s){"use strict";var t;return Object.defineProperty(s,"__esModule",{value:!0}),s.TYPES=s.DEPTYPES=void 0,function(e){e[e.BUNDLE=1]="BUNDLE",e[e.SINGLE=2]="SINGLE"}(t||(s.DEPTYPES=t={})),s.TYPES={tmpl:{type:"tmpl",plugin:"tmpl",hasDeps:!0,hasPacket:!1,canBePackedInParent:!0},js:{type:"js",plugin:"",hasDeps:!0,hasPacket:!0,packOwnDeps:!0},wml:{type:"wml",plugin:"wml",hasDeps:!0,hasPacket:!1,canBePackedInParent:!0},i18n:{type:"i18n",plugin:"i18n",hasDeps:!1,hasPacket:!1,canBePackedInParent:!1},is:{type:"is",plugin:"is",hasDeps:!1,hasPacket:!1,canBePackedInParent:!1},browser:{type:"browser",plugin:"browser",hasDeps:!0,hasPacket:!0,packOwnDeps:!0},css:{type:"css",plugin:"css",hasDeps:!1,hasPacket:!0},default:{hasDeps:!1}},s}(0,{}),d=function(e,s){"use strict";let t,n;Object.defineProperty(s,"__esModule",{value:!0}),s.packageModules=s.pagesPackages=void 0;try{const o=e("json!resources/page-x-packages")||{};if(o&&o.pages)s.pagesPackages=t=new Map(Object.keys(o.pages).map((e=>[e,o.pages[e]]))),s.packageModules=n=new Map(Object.keys(o.resources).map((e=>[e,new Set(o.resources[e].map((e=>o.modules[e])))])))}catch{}return s}(l,{}),f=function(e,s,t){"use strict";return Object.defineProperty(s,"__esModule",{value:!0}),s.sendPartialHtml=void 0,s.sendPartialHtml=function(){if("undefined"!=typeof window)return;return(0,t.loadSync)("Router/ServerRouting").sendPartialHtml()},s}(0,{},e),g=function(e,s,t,n,o){"use strict";function i(e){const s=function(e){const s=function(e){let s;if(s=e.split("!")[0],s===e)s="";return s}(e),n=Object.values(t.TYPES);for(const e of n)if(e.plugin===s)return e;return null}(e);if(null===s)return null;let n;if(s.plugin)n=e.split(s.plugin+"!")[1];else n=e;return{moduleName:o.parse(n).name,fullName:e,typeInfo:s}}function r(){const e={},s=Object.keys(t.TYPES);for(const t of s)e[t]={};return e}function l(e={},s,n={},o){const i=[],l=r();for(const r of Object.keys(e)){let p=n[r];if(!p&&(c=r,g.hasOwnProperty(c)))p=n[g[r]];if(!p||f(p,o))continue;delete e[r];const d=a(p),h=u(p);if(-1===i.indexOf(h))if(!s(r)&&!s(h))l[d][h]=t.DEPTYPES.BUNDLE;else i.push(h),delete l[d][h]}var c;for(const n of Object.keys(e)){const{plugin:o,type:r}=e[n].typeInfo,c=o?n.split(o+"!").pop():n;
84if(-1===i.indexOf(c))if(!s(n))l[r][c]=t.DEPTYPES.SINGLE;else i.push(c),delete l[r][c]}return l}function c(e,s){const t=Object.keys(s);for(const n of t){if(void 0===e[n])e[n]={};const t=s[n];if(t)for(const s in t)if(t.hasOwnProperty(s))e[n][s]=t[s]}}function u(e){return e.replace(/^(\/resources\/|resources\/)+/,"").replace(/\.min\.(css|js)$/,"")}function a(e){const s=e.match(/\.\w+$/);if(s&&s.length)return s[0].slice(1);const t=`[UICommon/_deps/RecursiveWalker:getExt] Incorrect extension: ${e}`;return n.Logger.error(t),""}function p(e){return e.indexOf("theme?")>=0}function d(e){return e.replace("theme?","")}function f(e,s){if(0===s.length)return!1;for(const t of s)if(e.indexOf(t)>-1)return!0;return!1}Object.defineProperty(s,"__esModule",{value:!0}),s.getPackageName=s.getAllPackagesNames=s.collectDependencies=void 0;const g={i18n:"I18n/i18n"},h="WS.Core",m=["Core/","Lib/","Transport/"];return s.collectDependencies=function e(s,t,n,o,r,l=!1){if(t&&t.length)for(let c=0;c<t.length;c++){let u=t[c];const a=u.split("!");if("optional"===a[0]&&a.length>1)if(a.shift(),u=a.join("!"),!o[u])continue;const p=i(u);if(null===p)continue;const d=p.typeInfo.type;let f=s[d];if(!f)f={},s[d]=f;if(!f[u]){if(!l||!p.typeInfo.canBePackedInParent)f[p.fullName]=p;if(p.typeInfo.hasDeps){let t=n[u]||n[p.moduleName]||[];if(r[u])t=[...t,r[u]];e(s,t,n,o,r,!!p.typeInfo.packOwnDeps)}}}},s.getAllPackagesNames=function(e,s,n,o){const i=r(),a=function(e){const s=(e,s)=>{if(e!==h)return!1;else return m.some((e=>s.startsWith(e)))};return t=>e.some((e=>-1!==t.indexOf(e)||s(e,t)))}(s);return c(i,l(e.js,a,n,o)),c(i,l(e.tmpl,a,n,o)),c(i,l(e.wml,a,n,o)),i.css=function(e={},s,n,o){const i={themedCss:{},simpleCss:{}},r=[];for(const l in e){if(!e.hasOwnProperty(l))continue;const c=n[d(l)];if(!c||f(c,o))continue;delete e[l];const a=u(c);if(-1!==r.indexOf(a))continue;const g=p(l)?"themedCss":"simpleCss";if(!s(l))i[g][a]=t.DEPTYPES.BUNDLE;else r.push(a),delete i[g][a]}for(const n in e)if(e.hasOwnProperty(n)){const e=d(n).split("css!")[1];if(-1!==r.indexOf(e))continue;const o=p(n)?"themedCss":"simpleCss";if(s(n)){r.push(e),delete i[o][e];continue}i[o][e]=t.DEPTYPES.SINGLE}return i}(e.css,a,n,o),i},s.getPackageName=u,s}(0,{},p,t,s),h=function(e,s,t,n,o){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.PagePackagesCollector=void 0;return s.PagePackagesCollector=class{constructor(e,s=new Map,n=new Map){this.pageId=e,this.pagesPackages=s,this.packageModules=n,this.lang=t.controller.currentLang,this._isRtl="rtl"===t.controller.currentLocaleConfig.directionality}get isRtl(){return this._isRtl}hasPagePackages(){return this.pagesPackages.has(this.pageId)}collectPackageNames(e){if(!this.hasPagePackages())return;
84const s=this.getPageMainResources();if(!s)return;const t=this.getUnpackedDeps(e,s);return{packages:{js:s.js.reduce(((e,s)=>(e[(0,o.getPackageName)(s)]=n.DEPTYPES.BUNDLE,e)),{}),css:{simpleCss:s.css.reduce(((e,s)=>(e[(0,o.getPackageName)(s)]=n.DEPTYPES.BUNDLE,e)),{}),themedCss:{}}},unpackedDeps:t}}getPageMainResources(){const e=this.pagesPackages.get(this.pageId);if(!e)return;const s=[],t=[];if(this.isRtl){if(e.hasOwnProperty("stylesRtl"))t.push(...e.stylesRtl)}else if(e.hasOwnProperty("styles"))t.push(...e.styles);if(e.hasOwnProperty("scripts"))s.push(...e.scripts);if(e.hasOwnProperty("locales")&&e.locales.hasOwnProperty(this.lang))s.push(...e.locales[this.lang]);return{js:s,css:t}}getUnpackedDeps(e,s){const t={},n=["js","i18n","css","wml","tmpl"];for(const o of n){if(!e[o])continue;const n=e[o]||{},i="css"===o?s.css:s.js,r={};for(const e of Object.keys(n))if(!this.isPackedModule(e,i))r[e]=n[e];t[o]=r}return t}isPackedModule(e,s){return s.some((s=>{var t;return null===(t=this.packageModules.get(s))||void 0===t?void 0:t.has(e)}))}},s}(0,{},o,p,g),m=function(e,s,t,n,o,i,r){"use strict";function l(){return"true"===n.cookie.get("disableBundles")}Object.defineProperty(s,"__esModule",{value:!0}),s.DepsCollector=void 0;return s.DepsCollector=class{constructor(e,s,t,n,o={},i,r){this.modDeps=e,this.modInfo=s,this.bundlesRoute=t,this.optionalBundles=n,this.features=o,this.pagesPackages=i,this.packageModules=r}collectDependencies(e=[],s=[],t){const i=[];e.filter((e=>!!e&&-1===s.indexOf(e))).forEach((e=>{if(-1===i.indexOf(e))i.push(e)}));const r={js:[],css:{themedCss:[],simpleCss:[]},tmpl:[],wml:[]},l={};let c;(0,o.collectDependencies)(l,i,this.modDeps,this.modInfo,this.features);const u=this.getPagexPackages(l,s,t);if(u)c=u,r.pagexPackages=!0;else{if(l.hasOwnProperty("i18n"))this.collectI18n(r,l);c=(0,o.getAllPackagesNames)(l,s,this.getBundlesRoute(),function(){const e=n.cookie.get("extractBundles");if(!e)return[];else return e.split(",")}())}for(const e in c.js)if(c.js.hasOwnProperty(e))r.js.push(e);for(const e in c.tmpl)if(c.tmpl.hasOwnProperty(e))r.tmpl.push(e);for(const e in c.wml)if(c.wml.hasOwnProperty(e))r.wml.push(e);for(const e in c.css.themedCss)if(c.css.themedCss.hasOwnProperty(e))r.css.themedCss.push(e);for(const e in c.css.simpleCss)if(c.css.simpleCss.hasOwnProperty(e))r.css.simpleCss.push(e);return r}getPagexPackages(e,s=[],t){if(s&&s.length)return;if("false"===n.cookie.get("s3-pagex-packages")||l())return;if(!t)return;const c=new i.PagePackagesCollector(t,this.pagesPackages,this.packageModules);if(!c.hasPagePackages())return;const u=c.collectPackageNames(e);if(!u)return;const a=u.unpackedDeps;return(0,r.merge)(u.packages,(0,o.getAllPackagesNames)(a,s,{},[]))}collectI18n(e,s){const n=t.controller.loadingsHistory.contexts,o=t.controller.currentCountry,i=t.controller.currentLang,r=[],l=this.getBundlesRoute();e.js.push(t.controller.loadingsHistory.languages[i]),e.js.push(t.controller.loadingsHistory.regions[o]);const c=s.i18n;if(c)for(const s of Object.keys(c)){const o=c[s].moduleName.split("/")[0];if(r.includes(o))continue;if(r.push(o),!n.hasOwnProperty(o))continue;const u=n[o];if(t.controller.loadingsHistory.contents.hasOwnProperty(o))e.js.push(t.controller.loadingsHistory.contents[o]);if(u.hasOwnProperty(i))this.addLocalizationResource(l,e,u[i])}}addLocalizationResource(e,s,t){if(t.dictionary&&!e.hasOwnProperty(t.dictionary))s.js.push(t.dictionary);if(t.style&&!e.hasOwnProperty(t.style))s.css.simpleCss.push(t.style)}getBundlesRoute(){if(l())return{};if(this.optionalBundles&&("true"===n.cookie.get("optionalBundles")||"true"===(0,n.getConfig)("optionalBundles")))return{...this.bundlesRoute,...this.optionalBundles};else return this.bundlesRoute}},s}(0,{},o,r,g,h,n),P=function(e,s,t,n,o,i,r,l){"use strict";function c(e,s){if("true"===n.query.get.logDeps)n.logger.info(e,s)}Object.defineProperty(s,"__esModule",{value:!0}),s.addPageDeps=s.collectDependencies=s.PageDependencies=void 0;class u{set pageDeps(e){const s=(0,n.getStore)(this.storageKey);let t=s.get("pageDeps");if(!t||!t.length)t=[];t.push(...this.filterPageDeps(e)),s.set("pageDeps",[...new Set(t)])}get pageDeps(){return(0,n.getStore)(this.storageKey).get("pageDeps")||[]}constructor(e,s="PageDependencies"){this.depsCollector=e,this.storageKey=s}addPageDeps(e){if("undefined"!=typeof window||!e||!e.length)return;const s=[];if(e.forEach((e=>{const n=t.parse(e);s.push(n.name)})),this.pageDeps=s,c("PageDeps|addPageDeps",e),c("PageDeps|addPageDeps",["ÐолиÑеÑÑво завиÑимоÑÑей: "+this.pageDeps.length]),this.pageDeps.length>10)(0,r.sendPartialHtml)()}collectDependencies(e,s=!0,t){const o=[];let i;if(s){const{additionalDeps:e,serialized:s}=function(){const e=Date.now(),s=(0,n.getStateReceiver)().serialize();return n.logger.info(`state serialization completed in ${Date.now()-e} ms`),s}(),t=Object.keys(e);c("PageDeps|additionalDeps ",t),o.push(...t),i=s}c("PageDeps|pageDeps ",this.pageDeps),o.push(...this.pageDeps),this.clear();const{uniqDeps:r,requiredModules:l}=this.getUniqRequireDeps([...new Set(o)]),u=this._collectDeps(r,e,t);c("PageDeps|js ",u.js),c("PageDeps|simpleCss ",u.css.simpleCss),c("PageDeps|themedCss ",u.css.themedCss),c("PageDeps|wml ",u.wml),c("PageDeps|tmpl ",u.tmpl);const a=this.filterResult({js:u.js,css:{simpleCss:u.css.simpleCss,themedCss:u.css.themedCss},tmpl:u.tmpl,wml:u.wml});if(s)a.requiredModules=l;return a.rsSerialized=i,a.pagexPackages=u.pagexPackages,a.requireList=r,a}clear(){(0,n.getStore)(this.storageKey).set("pageDeps",[])}clearPartialData(){const e=(0,n.getStore)(this.storageKey);e.set("prevCollectedDeps",null),e.set("prevRequiredModules",null)}_collectDeps(e=[],s,t){if((0,o.isDebug)())return{js:[],css:{themedCss:[],simpleCss:[]},tmpl:[],wml:[]};const r=function(e){if(!e||"false"===e)return[];const s=e.split(",");if(s.length>0){if(s.includes("WS.Core"))s.push("Core","Lib","Ext","Helpers","Transport");s.push("React","react")}return s}(n.cookie.get("s3debug")||"");if(s&&s.links&&s.nodes&&s.bundles){return new i.DepsCollector(s.links,s.nodes,s.bundles,s.optionalBundles,s.features).collectDependencies(e,r)}return this.depsCollector.collectDependencies(e,r,t)}filterPageDeps(e){const s=(0,n.getStore)(this.storageKey).get("prevRequiredModules");if(!s)return e;else return e.filter((e=>s.indexOf(e)<0))}getUniqRequireDeps(e){const s=(0,n.getStore)(this.storageKey),t=s.get("prevRequiredModules");if(!t)return s.set("prevRequiredModules",e),{uniqDeps:e,requiredModules:e};const o=e.filter((e=>t.indexOf(e)<0)),i=[...new Set([...t,...e])];return s.set("prevRequiredModules",i),{uniqDeps:o,requiredModules:i}}filterResult(e){const s=(0,n.getStore)(this.storageKey),t=s.get("prevCollectedDeps");if(!t)return s.set("prevCollectedDeps",e),e;const o={js:e.js.filter((e=>-1===t.js.indexOf(e))),css:{simpleCss:e.css.simpleCss.filter((e=>-1===t.css.simpleCss.indexOf(e))),themedCss:e.css.themedCss.filter((e=>-1===t.css.themedCss.indexOf(e)))},tmpl:e.tmpl.filter((e=>-1===t.tmpl.indexOf(e))),wml:e.wml.filter((e=>-1===t.wml.indexOf(e)))};return s.set("prevCollectedDeps",{js:[...t.js,...o.js],css:{simpleCss:[...t.css.simpleCss,...o.css.simpleCss],themedCss:[...t.css.themedCss,...o.css.themedCss]},tmpl:[...t.tmpl,...o.tmpl],wml:[...t.wml,...o.wml]}),o}}s.PageDependencies=u;const a=function(){const{links:e,nodes:s,bundles:t,optionalBundles:n,features:r}=(0,o.getModulesDependencies)(),c=new i.DepsCollector(e,s,t,n,r,l.pagesPackages,l.packageModules);return new u(c)}();return s.default=a,s.collectDependencies=function(e,s=!0,t){return a.collectDependencies(e,s,t)},s.addPageDeps=function(e){a.addPageDeps(e)},s}(0,{},s,r,u,m,f,d),y=P,D=function(e,s,t,n){"use strict";return Object.defineProperty(s,"__esModule",{value:!0}),s.default=function(e,s){if("undefined"==typeof window)return n.default.addPageDeps(e),void s.apply(null,e.map(t.loadSync));let o=!1;const i=e.map((e=>{if(t.isLoaded(e))return t.loadSync(e);else return o=!0,t.loadAsync(e)}));if(o)return Promise.all(i).then((e=>{s.apply(null,e)}));s.apply(null,i)},s}(0,{},e,P),k=D,c.collectDependencies=c.addPageDeps=c.executeSyncOrAsync=c.getOptionalBundles=c.isModuleExists=void 0,Object.defineProperty(c,"isModuleExists",{enumerable:!0,get:function(){return a.isModuleExists}}),Object.defineProperty(c,"getOptionalBundles",{enumerable:!0,get:function(){return a.getOptionalBundles}}),Object.defineProperty(c,"executeSyncOrAsync",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(c,"addPageDeps",{enumerable:!0,get:function(){return y.addPageDeps}}),Object.defineProperty(c,"collectDependencies",{enumerable:!0,get:function(){return y.collectDependencies}}),c})); 85define("UI/Focus",["require","exports","UICore/Focus"],(function(e,t,n){"use strict";
85Object.defineProperty(t,"__esModule",{value:!0}),t.FocusRoot=t.FocusArea=t.activate=t.focus=t.findNextElement=t.focusNextElement=t.goUpByControlTree=t.nativeFocus=t.ElementFinder=void 0,Object.defineProperty(t,"ElementFinder",{enumerable:!0,get:function(){return n.ElementFinder}}),Object.defineProperty(t,"nativeFocus",{enumerable:!0,get:function(){return n.nativeFocus}}),Object.defineProperty(t,"goUpByControlTree",{enumerable:!0,get:function(){return n.goUpByControlTree}}),Object.defineProperty(t,"focusNextElement",{enumerable:!0,get:function(){return n.focusNextElement}}),Object.defineProperty(t,"findNextElement",{enumerable:!0,get:function(){return n.findNextElement}}),Object.defineProperty(t,"focus",{enumerable:!0,get:function(){return n.focus}}),Object.defineProperty(t,"activate",{enumerable:!0,get:function(){return n.activate}}),Object.defineProperty(t,"FocusArea",{enumerable:!0,get:function(){return n.FocusArea}}),Object.defineProperty(t,"FocusRoot",{enumerable:!0,get:function(){return n.FocusRoot}})})); 86define("UICore/Focus",["react/jsx-runtime","react","UICore/Ref","UICore/Events","Types/shim","Env/Env","Application/Env","require","exports","UICommon/Focus","UICore/NodeCollector"],(function(e,t,n,o,r,u,s,c,i,a,l){var f,d,v,b,m,y,p,F,O,g,h,P,C,_,j,E,k,R,x,D,w,M,A;return Object.defineProperty(i,"__esModule",{value:!0}),f=function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CreateFocusCallbacksRef=void 0;class r extends n.Responsibility{constructor(e,t){super(),this.type=n.FOCUS_HANDLER_TYPE,this.focusCallbacksObject={isFocusCallbacksObject:!0,_moduleName:"focusCallbacksObject",_container:void 0,onActivated:e,onDeactivated:t},this.handler=this.handler.bind(this)}getOnActivated(){return this.focusCallbacksObject.onActivated}setOnActivated(e){this.focusCallbacksObject.onActivated=e}getOnDeactivated(){return this.focusCallbacksObject.onDeactivated}setOnDeactivated(e){this.focusCallbacksObject.onDeactivated=e}unmountRef(){var e;const t=null===(e=this.focusCallbacksObject._container)||void 0===e?void 0:e[o.focusCallbacksObjectsSetName];if(t)t.delete(this.focusCallbacksObject),this.focusCallbacksObject._container=void 0}mountRef(e){if(!e[o.focusCallbacksObjectsSetName])e[o.focusCallbacksObjectsSetName]=new Set;e[o.focusCallbacksObjectsSetName].add(this.focusCallbacksObject),this.focusCallbacksObject._container=e}handler(e){if(e)return this.mountRef(e);this.unmountRef()}getHandler(){return this.handler}isEqual(e){return!1}}return t.CreateFocusCallbacksRef=r,t}(0,{},n,l),d=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFocusContext=t.FocusContextValue=t.defaultValue=void 0,t.defaultValue={tabIndex:0},Object.freeze(t.defaultValue);class o{constructor(e=t.defaultValue){this.focusProps=e}getFocusProps(){const e=this.focusProps;return this.focusProps=void 0,e}arePropsTaken(){return!this.focusProps}}let r;return t.FocusContextValue=o,t.getFocusContext=function(){if(!r)r=(0,n.createContext)(new o(t.defaultValue));return r},t}(0,{},t),v=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=e._container;if("length"in t)return t[0];else return t},t}(0,{}),b=function(e,t,n){"use strict";function o(e){return!(e._destroyed||e._isDestroyed)&&e._container}return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!e)return[];else return(0,n.goUpByControlTree)(e,void 0,!0).filter(o)},t}(0,{},l),m=function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Activator=void 0;let r=0;return t.Activator=class{constructor(e){this._container=e,this.isFocusActivator=!0,this._instId="activator_"+r++}destroy(){var e;null===(e=this.unmountCallback)||void 0===e||e.call(this)}activate(e){return(0,n.activate)(this._container,e)}_notify(e,t,n){return(0,o.__notifyFromReact)(this._container,e,t,null==n?void 0:n.bubbling)}getInstanceId(){return this._instId}getContainer(){return this._container}},t}(0,{},a,o),y=m,p=function(e,t,n){"use strict";function o(e=!1,t=document.activeElement){let o=t;for(;"BODY"!==o.tagName&&"true"!==o["ws-tab-cycling"];)o=o.parentNode;return n.ElementFinder.findWithContexts(o,t,e)}
86return Object.defineProperty(t,"__esModule",{value:!0}),t.findNextElement=t.focusNextElement=void 0,t.focusNextElement=function(e=!1,t=document.activeElement,r){const u=o(e,t);if(!u)return!1;const s=(0,n.trySetActiveControlOnElement)(u);if(s)return s.isActive;else return(0,n.focus)(u,r)},t.findNextElement=o,t}(0,{},a),F=p,O=function(e,t,n){"use strict";function o(e,t,n){var o,r;if(e.isFocusCallbacksObject)return null===(o=e.onDeactivated)||void 0===o?void 0:o.call(e,n);if(!t||t.isFocusCallbacksObject||t._container!==e._container)null===(r=e._notify)||void 0===r||r.call(e,"deactivated",[n])}function r(e,t,n){var o,r;if(e.isFocusCallbacksObject)return null===(o=e.onActivated)||void 0===o?void 0:o.call(e,n);if(!t||t.isFocusCallbacksObject||t._container!==e._container)null===(r=e._notify)||void 0===r||r.call(e,"activated",[n])}return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,u){if(e===t)return;const s=(0,n.default)(e),c=(0,n.default)(t),i=s.filter((e=>!c.includes(e))),a=c.filter((e=>!s.includes(e))),l={_$to:c.find((e=>!!e._notify)),...u};for(let e=0;e<i.length;e++)o(i[e],i[e-1],u);for(let e=0;e<a.length;e++)r(a[e],a[e-1],l)},t}(0,{},b),g=function(e,t,n,o,r,u){"use strict";function s(e,t){return(0,n.useMemo)((()=>{if(e||t)if(e&&t)return n=>{e(n),t(n)};else return e||t}),[e,t])}function c(e){const t=e.getFocusProps(),o=(0,n.useRef)();return o.current=t||o.current||u.defaultValue,o.current}return Object.defineProperty(t,"__esModule",{value:!0}),t.useFocusAreaProps=t.useFocusContextProps=void 0,t.useFocusContextProps=c,t.useFocusAreaProps=function(e,t){var i,a,l,f,d,v,b;const m=c((0,n.useContext)((0,u.getFocusContext)())),y=s(e.onActivated,m.onActivated),p=s(e.onDeactivated,m.onDeactivated),F=(v=t,b=m.ref,(0,n.useMemo)((()=>{if(v||b)if(v&&b)return(new r.ChainOfRef).add(new r.CreateOriginRef(v)).add(new r.CreateOriginRef(b)).execute();else return v||b}),[v,b]));return function(e,t,r){const u=(0,n.useMemo)(e,t);return(0,n.useEffect)((()=>{if(r&&!u.arePropsTaken())o.logger.error("ÐаÑÑÑойки ÑокÑÑиÑÑемой облаÑÑи не доÑÑигли DOM ÑлеменÑа. ÐÐ»Ñ ÑабоÑоÑпоÑобноÑÑи FocusArea внÑÑÑи должен бÑÑÑ FocusRoot")}),t),u}((()=>{var t,n,o,r,s;return new u.FocusContextValue({onActivated:y,onDeactivated:p,tabIndex:null!==(t=e.tabIndex)&&void 0!==t?t:m.tabIndex,autofocus:null!==(n=e.autofocus)&&void 0!==n?n:m.autofocus,cycling:null!==(o=e.cycling)&&void 0!==o?o:m.cycling,unclickable:null!==(r=e.unclickable)&&void 0!==r?r:m.unclickable,focusParentRef:null!==(s=e.focusParentRef)&&void 0!==s?s:m.focusParentRef,ref:F})}),[y,p,null!==(i=e.tabIndex)&&void 0!==i?i:m.tabIndex,null!==(a=e.autofocus)&&void 0!==a?a:m.autofocus,null!==(l=e.cycling)&&void 0!==l?l:m.cycling,null!==(f=e.unclickable)&&void 0!==f?f:m.unclickable,null!==(d=e.focusParentRef)&&void 0!==d?d:m.focusParentRef,e.noErrorUnusedFocusProps,F],!e.noErrorUnusedFocusProps)},t}(0,{},t,s,n,d),h=function(e,t,n,o,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.useFocusCallbacks=void 0,t.useFocusCallbacks=function(e,t){const u=function(e){const{onActivated:t,onDeactivated:r}=e,u=(0,n.useRef)();if(!u.current)return u.current=new o.CreateFocusCallbacksRef(t,r);const s=u.current;if(s.getOnActivated()!==t)s.setOnActivated(t);if(s.getOnDeactivated()!==r)s.setOnDeactivated(r);return s}(e);return(0,n.useMemo)((()=>{if(!t)return null==u?void 0:u.getHandler();const e=new r.ChainOfRef;if(e.add(new r.CreateOriginRef(t)),u)e.add(u);return e.execute()}),[t,u])},t}(0,{},t,f,n),P=function(e,t,n,o,r){"use strict";function u(){if(document&&document.activeElement&&document.activeElement!==document.body)return void s(document.activeElement);if(!l||document.body.contains(l))return;t.isRestoreFocusInProgress=!0;const e=f;f=[],l=null;for(let t=0;t<e.length;t++){const o=e[t];if(o instanceof Node)if(document.body.contains(o)&&(0,n.focus)(o))break}t.isRestoreFocusInProgress=!1}function s(e){f=(0,o.default)(e).map(r.default)}function c(e){l=e.target,s(l)}Object.defineProperty(t,"__esModule",{value:!0}),t.stopRestoreFocus=t.startRestoreFocus=t.isRestoreFocusInProgress=void 0;let i=null;const a={childList:!0,subtree:!0};let l,f=[];return t.isRestoreFocusInProgress=!1,t.startRestoreFocus=function(){if("undefined"!=typeof MutationObserver&&!i)i=new MutationObserver(u),i.observe(document,a),document.addEventListener("focusin",c,!0),f=[]},t.stopRestoreFocus=function(){if("undefined"!=typeof MutationObserver&&i)i.disconnect(),i=null,document.removeEventListener("focusin",c,!0),f=[]},t}(0,{},a,b,v),C=P,_=function(e,t,n,o,r){"use strict";function u(e){return function(e){return e.hasOwnProperty(s)}(e)&&e[s]}
86Object.defineProperty(t,"__esModule",{value:!0}),t.tabDownController=void 0;const s="_allowNativeEvent";t.default=u;return t.tabDownController=new class{constructor(){this.elementsSet=new r.Set}addTabDownHandler(e){var t;if(!this.elementsSet.has(e))this.elementsSet.add(e),null===(t=e.parentNode)||void 0===t||t.addEventListener("keydown",this.handler)}removeTabDownHandler(e){var t;if(this.elementsSet.has(e))this.elementsSet.delete(e),null===(t=e.parentNode)||void 0===t||t.removeEventListener("keydown",this.handler)}handler(e){if("Tab"!==e.key)return;const t=e.target;if(!(0,n.default)(t).find(u))if((0,o.focusNextElement)(e.shiftKey,t,{enableScrollToElement:"vertical",enableScreenKeyboard:!0}))e.preventDefault(),e.stopImmediatePropagation()}},t}(0,{},b,p,r),j=function(e,t,n,o,r,u){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.focusParentRefName=void 0,t.focusParentRefName="focus-parent-ref",t.default=(0,o.forwardRef)((function(e,t){const{Provider:o}=(0,u.getFocusContext)(),s=(0,r.useFocusAreaProps)(e,t);return(0,n.jsx)(o,{value:s,children:e.children})})),t}(0,{},e,t,g,d),E=j,k=function(e,t,n,o,r,u){"use strict";function s({key:e,target:t,shiftKey:n,ctrlKey:o,altKey:r}){v={key:e,target:t,shiftKey:n,ctrlKey:o,altKey:r},setTimeout((()=>{v=null}))}function c(e){d=e.target;const t={keyPressedData:v,isTabPressed:!!v&&"Tab"===v.key,isShiftKey:!!v&&v.shiftKey};(0,u.default)(l,d,t)}function i(e){l=e.target}function a(e){const t=e.preventDefault;e.preventDefault=function(){if(!(0,o.hasNoFocus)(this.target))n.logger.warn("ÐÑзван preventDefault Ñ ÑобÑÑÐ¸Ñ mousedown в обÑ
од аÑÑибÑÑа ws-no-focus!");if(r.detection.isIE)!function(){const e=document.createElement("input");e.hidden=!0,document.body.appendChild(e),e.click();try{document.body.removeChild(e)}catch(e){n.logger.error(`Ðе ÑдалоÑÑ ÑдалиÑÑ Ð´Ð¾ÑеÑний ÑÐ»ÐµÐ¼ÐµÐ½Ñ Ñ body.\n ÐÑигиналÑÐ½Ð°Ñ Ð¾Ñибка: ${e.message}`,e)}}();return t.apply(this)},(0,o.preventFocus)(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.stopFocusEvents=t.startFocusEvents=void 0;let l,f=!1;t.startFocusEvents=function(){if("undefined"!=typeof document&&!f)f=!0,document.addEventListener("focusin",c,!0),document.addEventListener("focusout",i,!0),document.addEventListener("mousedown",a,!0),document.addEventListener("keydown",s,!0)},t.stopFocusEvents=function(){if("undefined"!=typeof document&&f)f=!1,document.removeEventListener("focusin",c,!0),document.removeEventListener("focusout",i,!0),document.removeEventListener("mousedown",a,!0),document.removeEventListener("keydown",s,!0)};let d=null,v=null;return t}(0,{},s,a,u,O),R=function(e,t,n,o,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.stopDOMFocusSystem=t.startDOMFocusSystem=void 0,t.startDOMFocusSystem=function(e,{focusEvents:t=!0,tabDown:u=!0,restoreFocus:s=!0}={}){if(u)r.tabDownController.addTabDownHandler(e);if(t)(0,o.startFocusEvents)();if(s)(0,n.startRestoreFocus)()},t.stopDOMFocusSystem=function(e,{focusEvents:t=!0,tabDown:u=!0,restoreFocus:s=!0}={}){if(u)r.tabDownController.removeTabDownHandler(e);if(t)(0,o.stopFocusEvents)();if(s)(0,n.stopRestoreFocus)()},t}(0,{},P,k,_),x=R,D=function(e,t,n,o,r,u,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=(0,o.forwardRef)((function(e,t){const{as:c="div",tabIndex:i,onActivated:a,onDeactivated:l,cycling:f,autofocus:d,unclickable:v,focusParentRef:b,children:m,...y}=e,p=(0,u.useFocusAreaProps)(e,t),F=(0,u.useFocusContextProps)(p),O=(0,s.useFocusCallbacks)({onActivated:F.onActivated,onDeactivated:F.onDeactivated},F.ref),g=(0,o.useCallback)((function(e){if(e)e["ws-delegates-tabfocus"]="true",e["ws-creates-context"]="true",e["ws-no-focus"]=F.unclickable,e["ws-tab-cycling"]=function(e){if("true"===e||!0===e)return"true";if("false"===e||!1===e)return"false";else return}(F.cycling),e[r.focusParentRefName]=F.focusParentRef;if(O)O(e)}),[O,F.unclickable,F.cycling,F.focusParentRef]),h=!0===F.autofocus||"true"===F.autofocus,P=-1!==F.tabIndex&&"-1"!==F.tabIndex,C=h&&P?"true":void 0;return(0,n.jsx)(c,{ref:g,"ws-autofocus":C,tabIndex:F.tabIndex,...y,children:m})})),t}(0,{},e,t,j,g,h),w=D,M=function(e,t,n,o,r){"use strict";
86Object.defineProperty(t,"__esModule",{value:!0});const u=e=>{const{as:t="div",children:u,forwardedRef:s,...c}=e,i=(0,o.useRef)(),a=(0,o.useCallback)((e=>{if(s)if("function"!=typeof s)s.current=e;else s(e)}),[s]),l=(0,o.useCallback)((function(e){if(a(e),e){const t=e.parentElement;return(0,r.startDOMFocusSystem)(t),void(i.current=t)}if(i.current)(0,r.stopDOMFocusSystem)(i.current)}),[a]);return(0,n.jsxs)(t,{ref:l,...c,children:[(0,n.jsx)("span",{className:"vdom-focus-in",tabIndex:1}),e.children,(0,n.jsx)("span",{className:"vdom-focus-out",tabIndex:0})]})};return u.displayName="FocusEnvironment",t.default=u,t}(0,{},e,t,R),A=M,i.goUpByControlTree=i.FocusRoot=i.FocusEnvironment=i.FocusArea=i.Activator=i.isRestoreFocusInProgress=i.findNextElement=i.focusNextElement=i.stopDOMFocusSystem=i.startDOMFocusSystem=i.activate=i.hasNoFocus=i.preventFocus=i.nativeFocus=i._FocusAttrs=i._initFocus=i.focus=i.ElementFinder=void 0,Object.defineProperty(i,"ElementFinder",{enumerable:!0,get:function(){return a.ElementFinder}}),Object.defineProperty(i,"focus",{enumerable:!0,get:function(){return a.focus}}),Object.defineProperty(i,"_initFocus",{enumerable:!0,get:function(){return a._initFocus}}),Object.defineProperty(i,"_FocusAttrs",{enumerable:!0,get:function(){return a._FocusAttrs}}),Object.defineProperty(i,"nativeFocus",{enumerable:!0,get:function(){return a.nativeFocus}}),Object.defineProperty(i,"preventFocus",{enumerable:!0,get:function(){return a.preventFocus}}),Object.defineProperty(i,"hasNoFocus",{enumerable:!0,get:function(){return a.hasNoFocus}}),Object.defineProperty(i,"activate",{enumerable:!0,get:function(){return a.activate}}),Object.defineProperty(i,"startDOMFocusSystem",{enumerable:!0,get:function(){return x.startDOMFocusSystem}}),Object.defineProperty(i,"stopDOMFocusSystem",{enumerable:!0,get:function(){return x.stopDOMFocusSystem}}),Object.defineProperty(i,"focusNextElement",{enumerable:!0,get:function(){return F.focusNextElement}}),Object.defineProperty(i,"findNextElement",{enumerable:!0,get:function(){return F.findNextElement}}),Object.defineProperty(i,"isRestoreFocusInProgress",{enumerable:!0,get:function(){return C.isRestoreFocusInProgress}}),Object.defineProperty(i,"Activator",{enumerable:!0,get:function(){return y.Activator}}),Object.defineProperty(i,"FocusArea",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(i,"FocusEnvironment",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(i,"FocusRoot",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(i,"goUpByControlTree",{enumerable:!0,get:function(){return l.goUpByControlTree}}),i})); 87define("UICommon/Focus",["UICommon/Utils","UICommon/NodeCollector","Types/shim","EnvTouch/EnvTouch","Env/Env","require","exports"],(function(e,t,n,o,r,i,c){var s,u,l,a,f,d,b,m,v,p,g,h,y;return Object.defineProperty(c,"__esModule",{value:!0}),s=function(e,t,n){"use strict";function o(e){if(e&&!Object.isFrozen(e)){if(!e["ws-creates-context"])e["ws-creates-context"]="true";if(!e["ws-delegates-tabfocus"])e["ws-delegates-tabfocus"]="true";if(e.hasOwnProperty("ws-autofocus"))e["ws-autofocus"]=""+e["ws-autofocus"]}}Object.defineProperty(t,"__esModule",{value:!0}),t.isSingletonFocusAttrs=t.returnSingletonFocusAttrs=t.hasFocusRootAttributes=t.extractAttributesForFocusArea=t.prepareTabindex=t.prepareAttrsForFocus=t.focusAttrList=void 0,t.focusAttrList=["ws-creates-context","ws-autofocus","ws-tab-cycling","tabindex","tabIndex","ws-delegates-tabfocus","ws-no-focus"];const r={"ws-no-focus":"unclickable","ws-creates-context":void 0,"ws-delegates-tabfocus":void 0,"ws-autofocus":"autofocus","ws-tab-cycling":"cycling",tabindex:"tabIndex",tabIndex:"tabIndex"},i=new n.Set;i.add("tabindex"),i.add("tabIndex"),i.add("ws-autofocus"),t.prepareAttrsForFocus=o,t.prepareTabindex=function(e){if("true"===e["ws-creates-context"])if(!e.hasOwnProperty("tabindex"))e.tabindex="0"},t.extractAttributesForFocusArea=function(e){const n={};for(let o=0;o<t.focusAttrList.length;o++){const i=t.focusAttrList[o];if(!e.hasOwnProperty(i))continue;const c=r[i],s=e[i];if(c&&s)n[c]=s;delete e[i]}return n};const c=["ws-creates-context","ws-delegates-tabfocus","ws-tab-cycling","ws-no-focus","ws-autofocus"];t.hasFocusRootAttributes=function(e){for(const t of c)if(void 0!==e[t])return!0;return!1};const s={};return o(s),Object.freeze(s),t.returnSingletonFocusAttrs=function(){return s},t.isSingletonFocusAttrs=function(e){return e===s},t}(0,{},n),u=s,l=function(e,t,n){"use strict";function o(e){var t;return!!(null===(t=null==e?void 0:e.wsControl)||void 0===t?void 0:t.setActive)}function r(e){var t;return!!(null===(t=null==e?void 0:e.wsControl)||void 0===t?void 0:t.canAcceptFocus())}
87return Object.defineProperty(t,"__esModule",{value:!0}),t.activateClosestAreaAbstractCompatible=t.trySetActiveControlOnElement=t.canAcceptFocusControlOnElement=t.isContainerWithOldControl=void 0,t.isContainerWithOldControl=o,t.canAcceptFocusControlOnElement=r,t.trySetActiveControlOnElement=function(e){if(!o(e))return null;if(!r(e))return null;const t=e.wsControl;return t.setActive(!0),{isActive:!!t.isActive()}},t.activateClosestAreaAbstractCompatible=function(e){const t=(0,n.getClosestControl)(e);if(t&&"_activate"in t)t._activate(t)},t}(0,{},t),a=l,f=function(e,t,n){"use strict";function o(e){const t=document.documentElement;let o=(0,n.getSvgParentNode)(e);for(;o&&o!==t;){if(o["ws-no-focus"]||o.getAttribute("ws-no-focus"))return!0;o=o.parentNode}return!1}return Object.defineProperty(t,"__esModule",{value:!0}),t.preventFocus=t.hasNoFocus=void 0,t.hasNoFocus=o,t.preventFocus=function(e){if(o(e.target))e.preventDefault()},t}(0,{},e),d=f,b=function(e,t,n){"use strict";function o({context:e,label:t="context-to-element",resolveDocument:n,defaultToDocument:o}){let r=function(e){if(!e)return[];if(Array.isArray(e))return e;if("string"==typeof e){const t=document.querySelectorAll(e);return[].slice.call(t)}if("length"in e)return[].slice.call(e);if(void 0!==e.nodeType)return[e];throw new TypeError("unexpected input "+String(e))}(e)[0];if(n&&function(e){return e&&e.nodeType===Node.DOCUMENT_NODE}(r))r=r.documentElement;if(!r&&o)return document.documentElement;if(!r)throw new TypeError(t+" requires valid options.context");if(r.nodeType!==Node.ELEMENT_NODE&&r.nodeType!==Node.DOCUMENT_FRAGMENT_NODE)throw new TypeError(t+" requires options.context to be an Element");return r}Object.defineProperty(t,"__esModule",{value:!0}),t.collectScrollPositions=void 0;const r=()=>{};t.collectScrollPositions=function(e,t={resetVertical:!0,resetHorizontal:!0}){if(n.detection.isMobileIOS&&(n.detection.safari||n.detection.chrome)&&function(e){const t=e.tagName.toLowerCase(),n=e.getAttribute("type"),o="input"===t&&(!n||i.indexOf(n)>=0),r="textarea"===t,c=e.hasAttribute("contenteditable");return o||r||c}(e))return r;const{resetVertical:c,resetHorizontal:s}=t;if(!c&&!s)return r;const u=function({context:e}){const t=[];let n=o({label:"get/parents",context:e,resolveDocument:!1,defaultToDocument:!1});for(;n;)if(t.push(n),n=n.parentNode,n&&n.nodeType!==Node.ELEMENT_NODE)n=null;return t}({context:e}).map((e=>({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft})));return function(){u.forEach((({element:e,scrollTop:t,scrollLeft:n})=>{if(c&&e.scrollTop!==t)e.scrollTop=t;if(s&&e.scrollLeft!==n)e.scrollLeft=n}))}};const i=["text","date","password","email","number"];return t}(0,{},r),m=function(e,t,n,o){"use strict";function r(e,t){let n;if(!e)throw n="function"==typeof t?t():t,new Error(n||"assert")}function i(e,t){return window.getComputedStyle(e)[t]}function c(e){for(let t=0;t<y.length;t++)if(e.matches(y[t]))return!0;return!1}function s(e){const t=e.classList,n=!("none"===i(e,"display")||"hidden"===i(e,"visibility"))&&!t.contains("ws-disabled"),o="true"===e["ws-creates-context"]||"true"===e.getAttribute("ws-creates-context"),r="true"===e["ws-delegates-tabfocus"]||"true"===e.getAttribute("ws-delegates-tabfocus"),s="true"===e["ws-tab-cycling"]||"true"===e.getAttribute("ws-tab-cycling"),u=e.getAttribute("tabindex");let l=null===u?NaN:parseInt(u,10),a=l>=0;const f="true"===e.getAttribute("contenteditable");if(isNaN(l))l=function(e,t){if(t)return 0;const n=e.tagName.toLowerCase();if(-1!==E.indexOf(n))return e.getAttribute("href")?0:-1;if(-1!==x.indexOf(n))return null===e.getAttribute("disabled")?0:-1;else return-1}(e,f),a=f||c(e);return{enabled:n,tabStop:a,createsContext:o,tabIndex:l,delegateFocusToChildren:r&&!f,tabCycling:s}}function u(e){return e.firstElementChild?e.firstElementChild:null}function l(e){return e.lastElementChild?e.lastElementChild:null}function a(e){return e.previousElementSibling?e.previousElementSibling:null}function f(e){return e.nextElementSibling?e.nextElementSibling:null}function d(e,t,n){r("number"==typeof e&&"number"==typeof t);const o=0===e?1/0:e>0?e:-1,i=0===t?1/0:t>0?t:-1;if(-1===i&&-1!==o)return 1;if(-1===o&&-1!==i)return-1;if(o>i)return n?-1:1;if(o<i)return n?1:-1;else return 0}function b(e,t,n,r){let i,c;if(t.enabled&&!t.createsContext)i=n?l(e):u(e);if(!i)if(i=n?a(e):f(e),!i)for(c=e.parentNode;c!==r&&!i;)if(i=n?a(c):f(c),!i||(0,o.isElementVisible)(i)){if(!i)c=c.parentNode}else c=i,i=void 0;return i||r}function m(e,t){return t?l(e):u(e)}function v(e,t,o,i,s,a=!1){function f(e,t){if(t.delegateFocusToChildren&&e.childElementCount)if((0,n.canAcceptFocusControlOnElement)(e))A=e;else A=function(e,t,n,o=!1){return v(e,void 0,t?0:1,t,n,o)}(e,i,s,a);return!(t.delegateFocusToChildren&&!function(e){const t=e.tabIndex;return c(e)||-1!==t&&e.hasAttribute("contenteditable")}(e)&&!A)}let p,g,h;r(e&&(t||void 0!==o)&&!!s&&e!==t);let y,E,x=null,w=null,C=null,A=null,F=null,O=null;if(t)E=s(t,a),O=E.tabIndex,p=b(t,E,i,e);else p=(i?l(e):u(e))||e;const S=null!=O?O:o;let T=!1;for(h=0;2!==h&&!x;h++){for(;p!==e&&p!==t&&!x;
87){if(g=s(p,a),g.enabled&&g.tabStop)if(y=d(g.tabIndex,S,i),0===y&&0===h){if(f(p,g))x=p,F=A}else if(y>0)if(!x)if(0===h){if(null===w||d(g.tabIndex,w.tabIndex,i)<0)if(f(p,g))w=p,C=g.tabIndex,F=A}else if(null===w||d(g.tabIndex,w.tabIndex,i)<0||T&&d(g.tabIndex,w.tabIndex,i)<=0)if(f(p,g))w=p,C=g.tabIndex,F=A,T=!1;if(-1===S&&w)x=w;if(!x)p=b(p,g,i,e)}if(p===e&&0===h)if(t&&(!1===i&&S>0||!0===i&&1!==S&&-1!==S))p=m(e,i);if(0===h)T=!0}if(r(!!x||p===t||p===e),!x&&w)if(C>=0)x=w;if(x&&F)x=F,r(!!x);return x}function p(e,t,n=s,o=!1){return v(e,void 0,t?0:1,t,n,o)}function g(e,t,n,o=!1){let i=e,c=null,s=e;for(;s&&s!==t;){if(!n(s,o).enabled)c=s;s=s.parentNode}r(!!s,"Узел fromElement должен лежаÑÑ Ð²Ð½ÑÑÑи Ñзла rootElement");const u=c||e;if(u!==t){for(s=u.parentNode;s!==t&&!n(s,o).createsContext;)s=s.parentNode;i=s}return{element:e,context:i}}function h(e,t){const n=e===document.documentElement||!!e.parentNode;r(e&&e.ownerDocument&&n&&e.nodeType===Node.ELEMENT_NODE,"ÐлоÑ
ой паÑамеÑÑ "+t)}Object.defineProperty(t,"__esModule",{value:!0}),t.findWithContexts=t.findFirstInContext=t.getElementProps=void 0;const y=["a[href]","link","button","input","select","textarea"],E=["a","area"],x=["input","textarea","select","button"];return t.getElementProps=s,t.findFirstInContext=p,t.findWithContexts=function(e,t,n,o=s,r=!1){h(t,"fromElement"),h(e,"rootElement");let i=g(t,e,o,r),c=i.element;if(c!==e)do{if(c=v(i.context,i.element,void 0,n,o,r),!c)if(o(i.context,r).tabCycling)break;else i=g(i.context,e,o,r)}while(!c&&i.element!==e);if(c===e)c=p(e,n,o,r);if(!c&&o(i.context||e,r).tabCycling)if(c=p(i.context||e,n,o,r),!c)c=t;return c},t}(0,{},l,e),v=m,p=function(e,t,n,o,r,i,c){"use strict";function s(e){const n=function(){var e;const t=document.createElement("div");return t.innerHTML='<svg><foreignObject width="30" height="30"><input type="text"/></foreignObject></svg>',null===(e=null==t?void 0:t.firstChild)||void 0===e?void 0:e.firstChild}();e.appendChild(n);const o=n.querySelector("input");t.nativeFocus.call(o),o.disabled=!0;try{e.removeChild(n)}catch(e){r.Logger.warn(e.message,e)}return!0}function u(e,o){const r=!1===o.enableScrollToElement;if(function(e){return n.detection.isIE&&"setActive"in e}(e)&&r){try{e.setActive()}finally{}return}const i={preventScroll:r};try{if(e.focus&&e.focus!==b&&!o.shouldUseNative)return void e.focus({...i,shouldUseNative:!0});t.nativeFocus.call(e,i)}catch(t){if(e instanceof SVGElement)return void s(e);throw t}}function l(e){return function(e,t){const n=e;return(n.matches||n.matchesSelector||n.msMatchesSelector||n.mozMatchesSelector||n.webkitMatchesSelector||n.oMatchesSelector).call(e,t)}(e,'input[type="text"], textarea, *[contentEditable=true]')}function a(e,t){let o=e;if(!t.enableScreenKeyboard&&(n.detection.isMobilePlatform||v))if(l(e))o=function(e){let t=e;for(;t&&(!c.getElementProps(t).tabStop||l(t));)t=t.parentElement;return t}(e);return o}function f(e,t){var n;p.push(e);const o=function(e,t){const n=!1===t||"horizontal"===t,o=!1===t||"vertical"===t;return(0,i.collectScrollPositions)(e,{resetVertical:n,resetHorizontal:o})}(e,null!==(n=t.enableScrollToElement)&&void 0!==n?n:!1);try{g++,u(e,t)}catch(e){const t=p.map((e=>{const t=e.outerHTML;return t.slice(0,t.indexOf(">")+1)}));r.Logger.error("ÐÑибка ÑокÑÑиÑовки. ÐлеменÑÑ, Ð´Ð»Ñ ÐºÐ¾ÑоÑÑÑ
вÑзÑвалÑÑ ÑокÑÑ:\n"+t.join("\n"),void 0,e)}finally{g--}const c=g===p.length-1,s=0===g;if(s)p.length=0;const l=c?function(e){if(e===document.activeElement)return!0;let t=e;for(;t;){let n;const o=getComputedStyle(t);if(o){if("none"===o.display)n="display: none";if("hidden"===o.visibility)n="visibility: hidden";if(n){const o=`[UICommon/_focus/Focus:checkFocused] - Can't focus element because of this element or it's parent has ${n} style! maybe you need use tw-hidden-important or tw-invisible-important classes for change element visibility (in old ws3 controls case). Please check why invisible element is focusing.Focusing element is ${e.outerHTML.slice(0,e.outerHTML.indexOf(">")+1)}, invisible element is ${t.outerHTML.slice(0,t.outerHTML.indexOf(">")+1)}.`;
87r.Logger.warn(o,t);break}t=t.parentElement}else{const e=t.outerHTML.slice(0,t.outerHTML.indexOf(">")+1);r.Logger.error("ÐепонÑÑÐ½Ð°Ñ Ð¾Ñибка в firefox, поÑемÑ-Ñо getComputedStyle null в "+e,void 0,{}),t=t.parentElement}}return!1}(e):!0;if(l&&s&&c)o();return l}function d(e,t){var n,o,r;const i={enableScreenKeyboard:null!==(n=null==t?void 0:t.enableScreenKeyboard)&&void 0!==n?n:!1,enableScrollToElement:null!==(o=null==t?void 0:t.enableScrollToElement)&&void 0!==o?o:!1,shouldUseNative:null!==(r=null==t?void 0:t.shouldUseNative)&&void 0!==r?r:!1};return f(a(e,i),i)}function b({preventScroll:e=!1,shouldUseNative:t=!1}={}){d(this,{enableScreenKeyboard:!0,enableScrollToElement:!e,shouldUseNative:t})}function m(){if(!t.nativeFocus)if("undefined"!=typeof HTMLElement)t.nativeFocus=HTMLElement.prototype.focus,HTMLElement.prototype.focus=b}Object.defineProperty(t,"__esModule",{value:!0}),t._initFocus=t.focus=t.nativeFocus=void 0;let v=!1;if("undefined"!=typeof window){o.TouchDetect.getInstance().subscribe("touchChanged",((e,t)=>{v=t}))}const p=[];let g=0;return t.focus=d,t._initFocus=m,m(),t}(0,{},r,o,e,b,m),g=p,h=function(e,t,n,o,r,i){"use strict";function c(e,t={}){if(e===document.activeElement)return!0;if((0,i.isContainerWithOldControl)(e)){const t=(0,i.trySetActiveControlOnElement)(e);return!!(null==t?void 0:t.isActive)}if((0,n.getElementProps)(e).tabStop)if((0,o.focus)(e,t))return(0,i.activateClosestAreaAbstractCompatible)(e),!0;return!1}return Object.defineProperty(t,"__esModule",{value:!0}),t.activate=void 0,t.activate=function e(t,o={enableScreenKeyboard:!1,enableScrollToElement:!1}){if(!t)return r.Logger.error("ÐкÑиваÑÐ¸Ñ Ð±ÐµÐ· DOM ÑлеменÑа невозможна. ÐÑовеÑÑÑе ÑоÑÐºÑ Ð²Ñзова. Ðозможно, вÑзÑваÑÑий ÐºÐ¾Ð¼Ð¿Ð¾Ð½ÐµÐ½Ñ ÐµÑÑ Ð½Ðµ замаÑнÑилÑÑ",void 0,new Error),!1;const s=t.querySelectorAll('[ws-autofocus="true"]');let u;for(let t=0;t<s.length;t++){if(u=s[t],(0,i.isContainerWithOldControl)(u)){const e=(0,i.trySetActiveControlOnElement)(u);if(!e)continue;return e.isActive}if(!(l=u)["ws-creates-context"]&&!l.getAttribute("ws-creates-context")){const e=`ÐбнаÑÑжен аÑÑибÑÑ ws-autofocus на DOM ÑлеменÑе ${u.outerHTML.slice(0,u.outerHTML.indexOf(">")+1)}. Ðн бÑÐ´ÐµÑ Ð¿ÑоигноÑиÑован.\nÐ wml и tmpl Ñаблоне ÑледÑÐµÑ Ð·Ð°Ð´Ð°Ð²Ð°ÑÑ Ð°ÑÑибÑÑ ws-autofocus на коÑневом ÑлеменÑе Ñаблона или конÑÑола.\nÐ tsx Ð´Ð»Ñ Ð°Ð²ÑоÑокÑÑиÑовки ÑледÑÐµÑ Ð¸ÑполÑзоваÑÑ ÐºÐ¾Ð¼Ð¾Ð¿Ð½ÐµÐ½Ñ UI/Focus:FocusRoot Ñ Ð¿Ñопом autofocus={true}\nÐодÑобнее пÑо FocusRoot в ÑÑаÑÑе "ФокÑÑÑ Ð½Ð° ÑиÑÑом ÑеакÑе" https://online.sbis.ru/page/knowledge-bases/babadcfb-cc27-4589-9b97-9200c2e399ee?article=ff0c466c-2b19-4e61-9bf1-d44df43802d4`;r.Logger.error(e);continue}if(e(u,o))return!0}var l;let a=(0,n.findFirstInContext)(t,!1);if(a){const e="vdom-focus-in",o="vdom-focus-out";if(a.classList.contains(e))a=(0,n.findWithContexts)(t,a,!1);if(null==a?void 0:a.classList.contains(o))a=null}if(a)return c(a,o);if((0,r.isElementVisible)(t))return c(t,o);else return!1},t}(0,{},m,p,e,l),y=h,c.activate=c.nativeFocus=c._FocusAttrs=c._initFocus=c.focus=c.ElementFinder=c.trySetActiveControlOnElement=c.hasNoFocus=c.preventFocus=void 0,c.ElementFinder=v,Object.defineProperty(c,"focus",{enumerable:!0,get:function(){return g.focus}}),Object.defineProperty(c,"_initFocus",{enumerable:!0,get:function(){return g._initFocus}}),Object.defineProperty(c,"nativeFocus",{enumerable:!0,get:function(){return g.nativeFocus}}),Object.defineProperty(c,"activate",{enumerable:!0,get:function(){return y.activate}}),Object.defineProperty(c,"preventFocus",{enumerable:!0,get:function(){return d.preventFocus}}),Object.defineProperty(c,"hasNoFocus",{enumerable:!0,get:function(){return d.hasNoFocus}}),c._FocusAttrs=u,Object.defineProperty(c,"trySetActiveControlOnElement",{enumerable:!0,get:function(){return a.trySetActiveControlOnElement}}),c})); 88define("EnvTouch/EnvTouch",["Types/entity","Env/Env","require","exports"],(function(t,e,n,i){var s,o,u,r;return Object.defineProperty(i,"__esModule",{value:!0}),s=function(t,e,n,i){"use strict";
88Object.defineProperty(e,"__esModule",{value:!0}),e.TouchDetect=void 0;const s={mousedown:"mouse",mousemove:"mouse",pointerdown:"pointer",pointermove:"pointer",touchstart:"touch",touchend:"touch"},o={2:"touch",3:"touch",4:"mouse"},u=t=>{if("number"==typeof t.pointerType)return o[t.pointerType];else return"pen"===t.pointerType?"touch":t.pointerType};class r extends i.ObservableMixin{constructor(){if(super(),this.currentTimestamp=Date.now(),this.currentInput="initial",this.currentIntent="initial",this.eventOptions={passive:!0},this.lastEvent="intent",this.isBrowser())this.setup(),this.inputType=this.detectTouchscreen()?"touch":"mouse",this._notifyChanges()}isTouch(){if("initial"===this.currentInput&&"initial"===this.currentIntent)return"touch"===this.inputType;else return"touch"===this._getLastAction(this.lastEvent)}getClass(){return this.isTouch()?"ws-is-touch":"ws-is-no-touch"}isBrowser(){const t="object"==typeof document&&null!==document,e="object"==typeof window&&null!==window&&window.self===window;return t&&e}_notifyChanges(){this._notify("touchChanged",this.isTouch())}_getLastAction(t){return"input"===t?this.currentInput:this.currentIntent}validateTouch(t){const e=Date.now(),n="mouse"===t&&"touch"===this.currentInput&&e-this.currentTimestamp<200;return this.currentTimestamp=e,n}detectTouchscreen(){let t=!1;if(!this.isBrowser())return t;if(window.PointerEvent&&"maxTouchPoints"in navigator){if(navigator.maxTouchPoints>0)t=!0}else if(window.matchMedia&&window.matchMedia("(any-pointer:coarse)").matches)t=!0;else if(window.TouchEvent||"ontouchstart"in window)t=!0;return t}setInputType(t){this.inputType="input"===t?this.currentInput:this.currentIntent,this._notifyChanges()}setInput(t){let e=s[t.type];if(this.lastEvent="input","pointer"===e)e=u(t);let n="mouse"===e||"touch"===e;if("touch"===e)this.currentIntent="initial";if(this.validateTouch(e))n=!1;if(n&&this.currentInput!==e)this.currentInput=e,this.setInputType("input")}setIntent(t){let e=s[t.type];if(this.lastEvent="intent","pointer"===e)e=u(t);if(!this.validateTouch(e)&&this.currentIntent!==e)this.currentIntent=e,this.setInputType("intent"),this.currentInput="initial"}setup(){if(window.PointerEvent&&(!n.detection.isUnix||n.detection.isMobileAndroid))window.addEventListener("pointerdown",this.setInput.bind(this)),window.addEventListener("pointermove",this.setIntent.bind(this));else if(window.addEventListener("mousedown",this.setInput.bind(this)),window.addEventListener("mousemove",this.setIntent.bind(this)),window.TouchEvent||"ontouchstart"in window)window.addEventListener("touchstart",this.setInput.bind(this),this.eventOptions),window.addEventListener("touchend",this.setInput.bind(this))}static getInstance(){if(!r.instance)r.instance=new r;return r.instance}}return e.TouchDetect=r,e}(0,{},e,t),o=s,u=function(t,e,n,i){"use strict";return Object.defineProperty(e,"__esModule",{value:!0}),e.default=()=>i.TouchDetect.getInstance().isTouch()&&!n.detection.isMobileIOS&&!n.detection.isMobileAndroid&&!n.detection.isMac,e}(0,{},e,s),r=u,i.isTouchDesktop=i.TouchDetect=void 0,Object.defineProperty(i,"TouchDetect",{enumerable:!0,get:function(){return o.TouchDetect}}),Object.defineProperty(i,"isTouchDesktop",{enumerable:!0,get:function(){return r.default}}),i})); 89define("UICore/Events",["react/jsx-runtime","react","UICore/Contexts","UICommon/Utils","UICommon/Events","Env/Env","Application/Env","require","exports"],(function(e,n,t,o,r,i,s,a,l){var c,u,d,f,v,p,b,y,E,m,g,h,C,_,O,P,w,N;return Object.defineProperty(l,"__esModule",{value:!0}),c=function(e,n,t){"use strict";return Object.defineProperty(n,"__esModule",{value:!0}),n.isCustomEvent=void 0,n.isCustomEvent=function(e){var n;if(t.detection.isIE&&(null===(n=null==e?void 0:e.detail)||void 0===n?void 0:n.control))return!0;else return e instanceof CustomEvent},n}(0,{},i),u=c,d=function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});return n.default=(0,t.memo)((function(e){return(0,t.useEffect)((()=>{for(const n of e.callAfterMount)n()}),[]),e.children})),n}(0,{},n),f=d,v=function(e,n){"use strict";return Object.defineProperty(n,"__esModule",{value:!0}),n.wasabyEventIntersection=n.reactEventList=void 0,n.reactEventList=["onCopy","onCut","onPaste","onCompositionEnd","onCompositionStart","onCompositionUpdate","onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onInvalid","onReset","onSubmit","onError","onLoad","onClick","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onGotPointerCapture","onLostPointerCapture","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onScroll","onWheel","onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting","onLoad","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionEnd","onToggle"],n.wasabyEventIntersection={"on:copy":"onCopy","on:cut":"onCut","on:paste":"onPaste","on:compositionend":"onCompositionEnd","on:compositionstart":"onCompositionStart","on:compositionupdate":"onCompositionUpdate","on:keydown":"onKeyDown","on:keyDown":"onKeyDown","on:keypress":"onKeyPress","on:keyup":"onKeyUp","on:focus":"onFocus","on:focusin":"onFocus","on:blur":"onBlur","on:focusout":"onBlur","on:change":"onChange","on:input":"onInput","on:invalid":"onInvalid","on:reset":"onReset","on:submit":"onSubmit","on:error":"onError","on:click":"onClick","on:contextmenu":"onContextMenu","on:doubleclick":"onDoubleClick","on:dblclick":"onDoubleClick","on:drag":"onDrag","on:dragend":"onDragEnd","on:dragenter":"onDragEnter","on:dragexit":"onDragExit","on:dragleave":"onDragLeave","on:dragover":"onDragOver","on:dragstart":"onDragStart","on:drop":"onDrop","on:mousedown":"onMouseDown","on:mousedowncapture":"onMouseDownCapture","on:mouseenter":"onMouseEnter","on:mouseleave":"onMouseLeave","on:mousemove":"onMouseMove","on:mouseout":"onMouseOut","on:mouseover":"onMouseOver","on:mouseup":"onMouseUp","on:
89pointerdown":"onPointerDown","on:pointermove":"onPointerMove","on:pointerup":"onPointerUp","on:pointercancel":"onPointerCancel","on:gotpointercapture":"onGotPointerCapture","on:lostpointercapture":"onLostPointerCapture","on:pointerenter":"onPointerEnter","on:pointerleave":"onPointerLeave","on:pointerover":"onPointerOver","on:pointerout":"onPointerOut","on:select":"onSelect","on:touchcancel":"onTouchCancel","on:touchend":"onTouchEnd","on:touchmove":"onTouchMove","on:touchstart":"onTouchStart","on:scroll":"onScroll","on:wheel":"onWheel","on:abort":"onAbort","on:canplay":"onCanPlay","on:canplaythrough":"onCanPlayThrough","on:durationchange":"onDurationChange","on:emptied":"onEmptied","on:encrypted":"onEncrypted","on:ended":"onEnded","on:loadeddata":"onLoadedData","on:loadedmetadata":"onLoadedMetadata","on:loadstart":"onLoadStart","on:pause":"onPause","on:play":"onPlay","on:playing":"onPlaying","on:progress":"onProgress","on:ratechange":"onRateChange","on:seeked":"onSeeked","on:seeking":"onSeeking","on:stalled":"onStalled","on:suspend":"onSuspend","on:timeupdate":"onTimeUpdate","on:volumechange":"onVolumeChange","on:waiting":"onWaiting","on:load":"onLoad","on:animationstart":"onAnimationStart","on:animationend":"onAnimationEnd","on:animationiteration":"onAnimationIteration","on:transitionend":"onTransitionEnd","on:toggle":"onToggle"},n}(0,{}),p=v,b=function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const o=new Map;class r{constructor(e){this.wasNotifyList=[],this.lastNotifyEvent="",this.needBlockNotify=!1,this.dontUseParentOnRoot=!0,this.eventListenersRemovers=[],this._rootDOMNode=e,this.capturedEventHandlers={},this._touchHandlers=new t.BuildTouchHandlers,this.initHandlers()}initHandlers(){this.addCaptureProcessingHandler("click",this._touchHandlers.handlerClick),this.addCaptureProcessingHandler("touchstart",this._touchHandlers.handlerTouchstart),this.addCaptureProcessingHandler("touchmove",this._touchHandlers.handlerTouchmove),this.addCaptureProcessingHandler("touchend",this._touchHandlers.handlerTouchend)}addCaptureProcessingHandler(e,n){if(this._rootDOMNode){const t=function(e){n.apply(this,arguments)};this.addHandler(e,t)}}addHandler(e,n){const o=this.dontUseParentOnRoot?this._rootDOMNode:this._rootDOMNode.parentNode,r=t.EventUtils.fixUppercaseDOMEventName(e),i=this.capturedEventHandlers;if(null!==this.getHandlerInfo(e));else{let t={capture:!0};const s={handler:n,bodyEvent:!1,processingHandler:!0,count:0};if(t=this.fixPassiveEventConfig(e,t),s.bodyEvent=!1,!i[e])i[e]=[];i[e].push(s);const a=function(e){n.apply(this,arguments)}.bind(this);if(!o[r+"_subscribed"])this.addNativeListener(o,a,r,t),o[r+"_subscribed"]=!0}}addNativeListener(e,n,t,o){e.addEventListener(t,n,o),this.eventListenersRemovers.push((()=>{e.removeEventListener(t,n,o)}))}removeAllCaptureHandlers(){if(this._rootDOMNode.parentNode&&(!this.dontUseParentOnRoot||this._rootDOMNode))for(const e of this.eventListenersRemovers)e()}getHandlerInfo(e){const n=this.capturedEventHandlers;if(n[e])for(let t=0;t<n[e].length;t++)if(!0===n[e][t].processingHandler&&!1===n[e][t].bodyEvent)return n[e][t];return null}fixPassiveEventConfig(e,n){if(t.EventUtils.checkPassiveFalseEvents(e))n.passive=!1;return n}destroy(){this.removeAllCaptureHandlers(),this.capturedEventHandlers={}}static initInstance(e){if(!o.size||!o.get(e)){const n=e||document.body;o.set(e,new r(n))}return o.get(e)}static destroyInstance(e){if(o.size&&o.get(e))o.get(e).destroy(),o.delete(e)}}return n.default=r,n}(0,{},r),y=b,E=function(e,n,t,o,r,i){"use strict";function s(e){return"function"==typeof e}function a(e){return"bindValue"in e}function l(e){e.fn=e.fn.bind({viewController:e.viewController,data:e.data}),e.fn.control=e.viewController}function c(e,n){if((e=e.bind({viewController:n.viewController,data:n.data})).control=n.viewController,n.saveWasabyEventObject)e.saveWasabyEventObject=n.saveWasabyEventObject;return e}function u(e,o,r,i){const s=function(o,r){const i=[...arguments],s=i.pop(),a=i.pop(),l=this.viewController;i.pop(),i.pop();const c=g(s,a,o.type);if(!(c.blockHandlers.length&&c.blockHandlers.indexOf(e)>-1&&(!o.isBubbling()||o.isBubbling()&&o.nativeEvent.target===o.nativeEvent.currentTarget)))if(!l._unmounted&&!l._destroyed)if(t.EventUtils.checkBindValue(e,e.bindValue),this.viewController!==n.REACT_FAKE_CONTROL){if(!e.handler(this.viewController,r))e.handler(this.data,r)}else e.handler(this.data,r)};return E(e,o,r,c(s,e),i),e.fn=s,l(e),e}function d(e,n,t,o,r){if(!n.__$reactScopeEvents)n.__$reactScopeEvents=new WeakMap;const i=n.__$reactScopeEvents.get(e);if(i&&i!==o&&!r)return;let s="reactCallback$"+(null==o?void 0:o._moduleName)+"$"+(null==o?void 0:o._instId);if("reactCallback$native React component$undefined"===s)s+="$"+C,C+=1;E(s,n,t,e,o),n.__$reactScopeEvents.set(e,o)}function f(e,n,t,s,a,u){const d=i.wasabyEventIntersection[a.toLowerCase()];
89if(d)o.Logger.warn(`ÐаÑивное ÑобÑÑие ÑегиÑÑÑиÑÑеÑÑÑ ÐºÐ°Ðº каÑÑомное: Ð¸Ð¼Ñ ÑобÑÑÐ¸Ñ "${a}", пеÑеÑекаеÑÑÑ Ñ "${d}"`,e.viewController);const f=function(o){let i=[...arguments];const s=i.pop(),a=i.pop(),l=i.pop(),c=i.pop(),u=(e.context||n).apply(this.viewController),d=e.handler?e.handler.apply(this.viewController):t.apply(this.viewController,[e.value]);if(void 0===d)throw new Error(`ÐÑÑÑÑÑÑвÑÐµÑ Ð¾Ð±ÑабоÑÑик ${e.value} ÑобÑÑÐ¸Ñ ${o.type} Ñ ÐºÐ¾Ð½ÑÑола ${e.viewController._moduleName}`);if(void 0===a)throw new Error(`ÐÑÑÑÑÑÑвÑÐµÑ DOM-нода Ð´Ð»Ñ Ð²Ñзова ÑобÑÑÐ¸Ñ ${o.type} Ñ ÐºÐ¾Ð½ÑÑола ${e.viewController._moduleName}`);if((0,r.isCustomEvent)(o))i=o.detail;if(c){const n=n=>{let t=[n.syntheticEvent];if(e.args)t=[n.syntheticEvent,...e.args];return t},t=d.apply(u,n(i));if(void 0!==t)o.result=t;return}const f=n=>{let t=n;if(e.args)t=[...n],t.splice(1,0,...e.args);return t};if(l){const e=d.apply(u,f(i));if(void 0!==e)o.result=e;return}const v=g(s,a,o.type);if(v.blockHandlers.length&&v.blockHandlers.indexOf(e)>-1&&(!o.isBubbling()||o.isBubbling()&&o.nativeEvent.target===o.nativeEvent.currentTarget))return;if(u._unmounted||u._destroyed)return;const p=d.apply(u,f(i));if(void 0!==p)return p;else return};return E(e,s,a,c(f,e),e.viewController||u),e.fn=f,l(e),e}function v(e){return"INVISIBLE-NODE"===e.nodeName?e.parentNode:e}function p(e){return parseInt((e+"").replace("inst_",""),10)}function b(e){return!e.isConnected}function y(e){return!e.parentNode||!e.parentNode.parentNode||!e.parentNode.parentNode.parentNode}function E(e,t,i,s,a){const l=function(e,n){if(!(null==e?void 0:e.originalName))return n.slice(3);const t=e.originalName;if(t.includes("bind:"))return e.value;else return t}(e,i);if(h.indexOf(l)>-1)return;const c=v(t),u=n=>{var t;if(a.__purified)return;const i=a._$firedNotifyEvents;if(i.has(n))return;i.add(n);const l=function(e){if((null==e?void 0:e.length)>0&&(0,r.isCustomEvent)(e[0]))return e[0].detail;if((0,r.isCustomEvent)(e))return e.detail;return arguments}(n);let c;if(!(s.saveWasabyEventObject||s.control&&"native React component"!==s.control._moduleName)){const e=s.isWasabyEventCallback?l:l.slice(1);c=s(...e)}else{if(n.type===(null===(t=null==e?void 0:e.originalName)||void 0===t?void 0:t.toLowerCase())&&n.detail.control&&n.detail.type!==e.originalName)o.Logger.error(`ÐÑибка вÑзова _notify! ÐÑзван _notify("${n.detail.type}"), подпиÑка бÑла добавлена на ÑобÑÑие ${e.originalName}. СледÑÐµÑ Ð¿ÐµÑеименоваÑÑ Ð¿Ð¾Ð´Ð¿Ð¸ÑÐºÑ Ð² Ñаблоне.`,n.detail.control._logicParent);if(l.control!==s.control){let e=l.control,t=l.element;if(n.bubbles&&l.element!==n.currentTarget)e=s.control,t=n.currentTarget;c=s(...l,l.isProcessing,l.fromReact,t,e)}}if(void 0!==c)n.result=c;i.delete(n)};c.addEventListener(l,u,!1),function(e,t,o,r,i){var s;const a=()=>{v(t).removeEventListener(o,r,!1)},l=function(){a();const e=i._$notifyEvents.get(t);if(e)if(e.delete(o),!i._$notifyEvents.get(t).size)i._$notifyEvents.delete(t)},c=function(e){return e.value?e.value+"$"+e.viewController._moduleName+"$"+e.viewController._instId:e.toString()}(e),u=i._$notifyEvents.get(t);if(l.key=c,u){const n=u.get(o);if(n)null===(s=n[c])||void 0===s||s.removeListener(),n[c]={removeListener:a,event:e},u.set(o,n);else u.set(o,{[c]:{removeListener:a,event:e}});i._$notifyEvents.set(t,u)}else{const n=new Map;n.set(o,{[c]:{removeListener:a,event:e}}),i._$notifyEvents.set(t,n)}!function(e,t,o,r){for(const e of r.keys())if(_(e))r.delete(e);if(e.control&&e.control!==n.REACT_FAKE_CONTROL){const n=[];for(const t of e.control._$needRemoveBeforeUnmount)n.push(t.key);if(-1===n.indexOf(t))e.control._$needRemoveBeforeUnmount.push(o)}}(r,c,l,i._$notifyEvents)}(e,c,l,u,a)}function m(e,n,t){const o=e.get(n);if(!o)return;const r=o.get(t);if(r)return r}function g(e,n,t){const o={okHandlers:[],blockHandlers:[]},r=n.controlNodes;if(!r)return o;const i={};for(const e of r){const o=m(e.control._$notifyEvents,n,t);if(o)for(const e in o)if(o.hasOwnProperty(e))i[e]=o[e]}if(!Object.keys(i).length)return o;const s=p(e._instId),a=[];for(const e of Object.keys(i))if(!e.startsWith("reactCallback"))a.push(i[e].event);return a.map((function(e){const t=e.fn.control;return{index:t._container===n?p(t._instId):-1,eventHandler:e}}
89)).forEach((function(e){if(-1===e.index||e.index<s)o.okHandlers.push(e.eventHandler);else o.blockHandlers.push(e.eventHandler)})),o}Object.defineProperty(n,"__esModule",{value:!0}),n.createReactFakeControl=n.getOldReactEventName=n.checkWasabyEvent=n.resolveEventName=n.prepareEvents=n.REACT_FAKE_CONTROL=void 0;const h=["selectstart"];n.REACT_FAKE_CONTROL={_destroyed:!1,_mounted:!0,_moduleName:"native React component",UNSAFE_isReact:!0,_$notifyEvents:new Map,_$firedNotifyEvents:new WeakSet};let C=0,_=function(e){var n;if("undefined"!=typeof document&&"boolean"==typeof(null===(n=document.documentElement)||void 0===n?void 0:n.isConnected))return _=b,b(e);else return _=y,y(e)};return n.prepareEvents=function(e,n,t,o){var r,i,l;for(const c of Object.keys(e)){const v=e[c];for(const p of v)if(p)if(!1!==(null===(r=p.fn)||void 0===r?void 0:r.isControlEvent))if(!a(p))if(!s(p))f(p,null===(i=null==e?void 0:e.meta)||void 0===i?void 0:i.context,null===(l=null==e?void 0:e.meta)||void 0===l?void 0:l.handler,n,c,t);else d(p,n,c,t,o);else u(p,n,c,t)}return e},n.resolveEventName=function(e){if("object"==typeof(n=e)&&null!==n){var n;return Object.keys(e).forEach((n=>{if(n!==n)e[n]=e[n],delete e[n]})),e}},n.checkWasabyEvent=function(e){if(e)if(!e.isWasabyEventCallback)return e},n.getOldReactEventName=function(e){return"on"+e.charAt(2).toUpperCase()+e.slice(3).toLowerCase()},n.createReactFakeControl=function(){return{_destroyed:!1,_mounted:!0,_moduleName:"native React component",UNSAFE_isReact:!0,_$notifyEvents:new Map,_$firedNotifyEvents:new WeakSet}},n}(0,{},r,o,c,v),m=E,g=function(e,n,t,o,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.REACT_FAKE_CONTROL=void 0,Object.defineProperty(n,"REACT_FAKE_CONTROL",{enumerable:!0,get:function(){return r.REACT_FAKE_CONTROL}});const i=new Map;class s{constructor(e){this.wasNotifyList=[],this.lastNotifyEvent="",this.needBlockNotify=!1,this.dontUseParentOnRoot=!0,this.eventListenersRemovers=[],this._rootDOMNode=e,this.initEventSystemFixes()}initEventSystemFixes(){if(t.detection.isIE12&&"undefined"!=typeof window&&"undefined"!=typeof document)if(!window._patchedSelectStart)window._patchedSelectStart=!0,document.body.addEventListener("selectstart",(e=>{const n=getComputedStyle(e.target);if("none"===(n.getPropertyValue("-ms-user-select")||n.getPropertyValue("user-select")))e.preventDefault()}),!0)}setEventHook(e,n,t,r=!1){if(!(((null==n?void 0:n._container)||n)instanceof Element))return;const i={...e.meta};if(delete e.meta,Object.defineProperty(e,"meta",{configurable:!0,value:i}),(0,o.prepareEvents)(e,n,t,r),this.haveEvents(e));}haveEvents(e){return e&&Object.keys(e).length>0}removeReactNativeEvent(e,n){const t=e.__$reactScopeEvents;if(t)for(const e of Object.keys(n))t.delete(n[e])}removeAllCaptureHandlers(){if(this._rootDOMNode.parentNode&&(!this.dontUseParentOnRoot||this._rootDOMNode))for(const e of this.eventListenersRemovers)e()}destroy(){this.removeAllCaptureHandlers()}static initInstance(e){if(!i.size||!i.get(e)){const n=e||document.body;i.set(e,new s(n))}return i.get(e)}static destroyInstance(e){if(i.size&&i.get(e))i.get(e).destroy(),i.delete(e)}static getInstance(e){if(!i.size)return;let n=null;return i.forEach(((t,o)=>{if(o.contains(e))n=t})),n||i.values().next().value}static mergeEvents(e,n){const t=e,o=Object.keys(n);for(const r of o)if(!e.hasOwnProperty(r))t[r]=n[r];let r;if(e&&e.meta&&Object.keys(e.meta).length)r={...e.meta};if(n&&n.meta&&Object.keys(n.meta).length)r={...n.meta};return Object.defineProperty(t,"meta",{configurable:!0,value:r}),t}}return n.default=s,n}(0,{},i,E,E),h=g,C=function(e,n,t){"use strict";function o(e){var n;return e.saveWasabyEventObject=!0,e.control=null!==(n=e.control)&&void 0!==n?n:t.REACT_FAKE_CONTROL,e}return Object.defineProperty(n,"__esModule",{value:!0}),n.withWasabyEventObject=n.useWasabyEventObject=void 0,n.useWasabyEventObject=o,n.withWasabyEventObject=function(e){return o(e)},n}(0,{},E),_=C,O=function(e,n,t,o,r,i,s,a){"use strict";function l(e){return n=>{e.forEach((e=>{if("function"==typeof e)e(n);else if(null!=e)e.current=n}))}}function c(e){return Object.keys(e).sort().map((n=>`${n}:${function(e){let n=v.get(e);if(void 0===n)n=++p,v.set(e,n);return n}(e[n])}`)).join("|")}Object.defineProperty(n,"__esModule",{value:!0}),n.BubblingEventContext=void 0;const u=/on[A-Z_]([A-Za-z0-9_])+/,d=["div","span","a"];n.BubblingEventContext=(0,o.createContext)({});const f=(0,o.forwardRef)((function(e,f){const{children:v,...p}=e,b=new Set(["fakeControl","isolateEventScope","convertName","logInvalidProps"]),y=[],E=[];for(const e of Object.keys(p))if(!b.has(e))if(e.startsWith("on")){if(void 0!==p[e])if("function"==typeof p[e]);else E.push(e)}else y.push(e);if(y.length&&!1!==e.logInvalidProps)a.logger.warn(`Ð EventSubscriber бÑли пеÑÐµÐ´Ð°Ð½Ñ props оÑлиÑнÑе Ð¾Ñ ÑобÑÑÐ¸Ñ (props наз
89ÑваеÑÑÑ Ð½Ðµ Ñ on*).\n ÐÑоблемнÑе props: ${y.join(", ")}.\n ЧÑÐ¾Ð±Ñ Ð½Ð°Ð¹Ñи пÑÐ¾Ð±Ð»ÐµÐ¼Ñ ÑледÑÐµÑ Ð²Ð¾ÑполÑзоваÑÑÑÑ React DevTools, пÑÐ¾Ð±Ð»ÐµÐ¼Ñ ÑледÑÐµÑ Ð¸ÑкаÑÑ Ð² ÑодиÑеÑком конÑÑоле.\n ÐÐ¾Ð·Ð¼Ð¾Ð¶Ð½Ð°Ñ Ð¿ÑиÑина в пеÑедаÑе опÑий Ñкопом (...props) в EventSubscriber.\n `);if(E.length)a.logger.error(`Ð EventSubscriber бÑли пеÑÐµÐ´Ð°Ð½Ñ props, коÑоÑÑе не ÑвлÑÑÑÑÑ ÐºÐ¾Ð»Ð±Ñк-ÑÑнкÑиÑми.\n ÐÑоблемнÑе props: ${E.join(", ")}.\n ЧÑÐ¾Ð±Ñ Ð½Ð°Ð¹Ñи пÑÐ¾Ð±Ð»ÐµÐ¼Ñ ÑледÑÐµÑ Ð²Ð¾ÑполÑзоваÑÑÑÑ React DevTools, пÑÐ¾Ð±Ð»ÐµÐ¼Ñ ÑледÑÐµÑ Ð¸ÑкаÑÑ Ð² ÑодиÑеÑком конÑÑоле.\n `);const m=(0,o.useContext)((0,r.getWasabyContext)()),g={},h=new Map,C=Object.entries(p);for(const[e,n]of C)if(-1!==e.search(u)&&"function"==typeof n){let t=n;if(n.name.includes("bound ")){const o=e+n.name;if(h.has(o))t=h.get(o);else h.set(o,n)}g[e]=t}const _=c(g),O=(0,o.useMemo)((()=>{if(p.isolateEventScope){const e={};for(const n of Object.keys(g))e[n]=[g[n]];return e}if(m.bubblingEvents){const e={...m.bubblingEvents};for(const n of Object.keys(g))if(e[n]){if(!e[n].includes(g[n]))if(!h.has(n+g[n].name))e[n].unshift(g[n])}else e[n]=[g[n]];return e}const e={};for(const n of Object.keys(g))e[n]=[g[n]];return e}),[e.isolateEventScope,_]),P=(0,o.useContext)(n.BubblingEventContext),w=(0,o.useMemo)((()=>{if("undefined"==typeof window)return{};if(p.isolateEventScope){const e={};for(const n of Object.keys(g)){const t=`data${n.slice(2)}`;e[t]=[g[n]],e[n]=function(){for(const n of e[t])n(...arguments)}}return e}const e=P||{};for(const n of Object.keys(g)){const t=`data${n.slice(2)}`;if(!(null==P?void 0:P[t]))e[n]=function(){for(const e of P[t])e(...arguments)},e[t]=[g[n]];else{if(P[t].includes(g[n]))continue;if(h.has(n+g[n].name))continue;e[t].unshift(g[n])}}return e}),[e.isolateEventScope,P,_]),N=(0,o.useRef)(),k=(0,s.createReactFakeControl)(),j={},L=e=>{if(e)i.default.getInstance(e).setEventHook(j,e,k,!0),N.current=e};if((0,o.useEffect)((()=>()=>{var e,n,t;if(k._$notifyEvents.size)k._$notifyEvents.forEach((e=>{e.forEach((e=>{for(const n of Object.keys(e))e[n].removeListener()}))})),k._$notifyEvents.clear();for(const o of Object.keys(g)){const r=`data${o.slice(2)}`,i=null===(e=P[r])||void 0===e?void 0:e.indexOf(g[o]);if((null==P?void 0:P[r])&&-1!==i)P[r].splice(i,1);const s=m.bubblingEvents;if(s)if(s[o]=null===(n=s[o])||void 0===n?void 0:n.filter((e=>{if(h.has(o+g[o].name))return!1;else return e!==g[o]})),0===(null===(t=s[o])||void 0===t?void 0:t.length))delete s[o]}h.clear()})),v&&d.includes(v.type)||p.fakeDOM&&(e=>{if("function"==typeof e.type)if(n=e.type,"Symbol(react.forward_ref)"===(null===(t=null==n?void 0:n.$$typeof)||void 0===t?void 0:t.toString())||(e=>{var n;return"Symbol(react.memo)"===(null===(n=null==e?void 0:e.$$typeof)||void 0===n?void 0:n.toString())})(e.type)||(e=>"function"==typeof e&&e.prototype&&(e.prototype.isReactComponent||e.prototype.isPureReactComponent))(e.type))return!0;else return!1;var n,t;return!0})(v)){for(const e of Object.keys(g)){const n=e.slice(2);j["on:"+e.slice(2)[0].toLowerCase()+n.slice(1)]=[g[e]]}if(p.fakeDOM||p.fakeControl)return(0,t.jsx)(r.WasabyContextManager,{bubblingEvents:O,children:(0,t.jsx)(n.BubblingEventContext.Provider,{value:w,children:(0,o.cloneElement)(v,{ref:p.fakeControl?f:l([f,L])})})});else return(0,t.jsx)(n.BubblingEventContext.Provider,{value:w,children:(0,o.cloneElement)(v,{ref:l([f,L])})})}if(v.props.props){const e={...v.props};return e.props.customEvents=Object.keys(g),e.props.customEventsPreventConvertName=!(!1!==p.convertName),e.props={...e.props,...g},(0,t.jsx)(n.BubblingEventContext.Provider,{value:w,children:(0,o.cloneElement)(v,{...e})})}return(0,t.jsx)(r.WasabyContextManager,{bubblingEvents:O,children:(0,t.jsx)(n.BubblingEventContext.Provider,{value:w,children:v})})}));n.default=f;const v=new WeakMap;let p=0;return n}(0,{},e,n,t,g,E,s),P=O,w=function(e,n,t,o,r,i,s){"use strict";function a(e,n){if(e&&e.length&&e[0]instanceof s.SyntheticEvent&&e[0].type===n.type)return[e[0],e];const t=new s.SyntheticEvent(null,n),o=[t];if(!(e instanceof Array))e=[e];return Array.prototype.push.apply(o,e),[t,o]}return Object.defineProperty(n,"__esModule",{value:!0}),n.notifyFromReact=n.getArgs=n.callNotify=void 0,n.callNotify=function(e,n,o,s){var l,c,u,d;const f=n;if(function(e,n){if(r.wasabyEventIntersection["on:"+e])return i.Logger.error(`ÐÑзван _notify ÑобÑÑÐ¸Ñ "${e}" Ð¸Ð¼Ñ ÐºÐ¾ÑоÑого пеÑеÑекаеÑÑÑ Ñ Ð½Ð°ÑивнÑм. Ðо избежании пÑоблем ÑледÑÐµÑ Ð¿ÐµÑеименоваÑÑ ÑобÑÑие.`,n),!0;else return!1}(f,e))return;if(!t.default.getInstance(e._container))return void i.Logger.error("СиÑÑема ÑобÑÑий не иниÑиализиÑована. СобÑÑÐ¸Ñ ÑабоÑаÑÑ Ð½Ðµ бÑдÑÑ.",e);Array.prototype.splice.call(arguments,0,1);const v=function(e,n){if(e._container)return e._container;else{const t="Controls/Container/Async"===e._moduleName?"Async: "+e.currentTemplateName:e._moduleName;i.Logger.error(`ÐонÑÑол ${t} не бÑл ÑмонÑиÑован в DOM-деÑево. _notify ÑобÑÑÐ¸Ñ ${n} не бÑÐ´ÐµÑ Ð·Ð°Ð¿ÑÑен.\n ÐозможнÑе пÑиÑÐ¸Ð½Ñ Ð¿ÑоблемÑ:\n - ÑеÑез ÑÐµÐ°ÐºÑ Ð½Ðµ пÑокинÑÑ ÑÐµÑ Ð´Ð¾ коÑневого HTML ÑлеменÑа. ÐÑли Ñак, вÑÑе в конÑоли еÑÑÑ Ð±Ð¾Ð»ÐµÐµ подÑÐ¾Ð±Ð½Ð°Ñ Ð¾Ñибка по ÑÑÐ¾Ð¼Ñ Ð¿Ð¾Ð²Ð¾Ð´Ñ.\n - _notify вÑзван до маÑнÑа или поÑле анмаÑнÑа. Такое не поддеÑживаеÑÑÑ.`,e)}}(e,n);if(v){const t={_bubbling:!!(null==s?void 0:s.bubbling),type:n,target:v},[r,i]=a(o,t);let p;i.control=e,i.element=v,i.type=n;const b=()=>new CustomEvent(f,{detail:i,bubbles:!!(null==s?void 0:s.bubbling)}),y=b();y.createEvent=b,r.nativeEvent=y,v.dispatchEvent(y),p=y.resultValue;const E="on"+n.charAt(0).toLocaleUpperCase()+n.slice(1);if((null==s?void 0:s.bubbling)&&(null===(c=null===(l=e.context)||void 0===l?void 0:l.bubblingEvents)||void 0===c?void 0:c[E])&&!y.detail[0].isStopped()){const n=e.context.bubblingEvents[E];for(const e of n){if(y.detail[0].isStopped())break;p=e(...i)}}if(null===(d=(u=e).hasCompatible)||void 0===d?void 0:d.call(u)){if(i.eventName=n,i.originArgs=o,o&&o instanceof Array&&o.indexOf("__initiator")>-1)i.control=o.__initiator;let t=v.parentElement,s=v;for(;t&&!r.isStopped();){const n=s.compatibleNotifier;if(n&&v!==s&&"onactivate"!==f)p=n.notifyVdomEvent(r.type,o,e);p=p||y.result||r.result,s=t,t=t.parentElement}}return p||y.result}if(!e["[Core/Abstract.compatible]"])i.Logger.error(`[WasabyEvents] Ðе ÑдалоÑÑ Ð·Ð°Ð¿ÑÑÑиÑÑ _notify ÑобÑÑÐ¸Ñ ${n}`,e)},n.getArgs=function(e,...n){if((null==e?void 0:e.length)>0&&(0,o.isCustomEvent)(e[0]))return e[0].detail;if((0,o.isCustomEvent)(e))return e.detail;if(!(e instanceof s.SyntheticEvent))return[null,arguments];else return arguments},n.notifyFromReact=function(e,n,t,o,r){var i;if(!e)return;const s=n,l=(null==e?void 0:e._container)||e,c={_bubbling:!!o,type:s,target:l},[u,d]=a(t,c);d.fromReact=!0;const f=new CustomEvent(s,{detail:d,bubbles:!!o});l.dispatchEvent(f);const v="on"+n.charAt(0).toLocaleUpperCase()+n.slice(1);if(o&&(null===(i=null==r?void 0:r.bubblingEvents)||void 0===i?void 0:i[v])&&!f.detail[0].isStopped()){const e=r.bubblingEvents[v];for(const n of e){if(f.detail[0].isStopped())break;f.result=n(...d)}}return f.result},n}(0,{},g,c,v,o,r),N=w,l.withWasabyEventObject=l.useWasabyEventObject=l.wasabyEventIntersection=l.reactEventList=l.getOldReactEventName=l.checkWasabyEvent=l.resolveEventName=l.BubblingEventContext=l.EventSubscriber=l.isCustomEvent=l.NotifyWrapper=l.__notifyFromReact=l.getArgs=l.callNotify=l.TouchEvents=l.REACT_FAKE_CONTROL=l.WasabyEvents=void 0,Object.defineProperty(l,"WasabyEvents",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(l,"REACT_FAKE_CONTROL",{enumerable:!0,get:function(){return h.REACT_FAKE_CONTROL}}),Object.defineProperty(l,"TouchEvents",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(l,"callNotify",{enumerable:!0,get:function(){return N.callNotify}}),Object.defineProperty(l,"getArgs",{enumerable:!0,get:function(){return N.getArgs}}),Object.defineProperty(l,"__notifyFromReact",{enumerable:!0,get:function(){return N.notifyFromReact}}),Object.defineProperty(l,"NotifyWrapper",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(l,"isCustomEvent",{enumerable:!0,get:function(){return u.isCustomEvent}}),Object.defineProperty(l,"EventSubscriber",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(l,"BubblingEventContext",{enumerable:!0,get:function(){return P.BubblingEventContext}}),Object.defineProperty(l,"resolveEventName",{enumerable:!0,get:function(){return m.resolveEventName}}),Object.defineProperty(l,"checkWasabyEvent",{enumerable:!0,get:function(){return m.checkWasabyEvent}}),Object.defineProperty(l,"getOldReactEventName",{enumerable:!0,get:function(){return m.getOldReactEventName}}),Object.defineProperty(l,"reactEventList",{enumerable:!0,get:function(){return p.reactEventList}}),Object.defineProperty(l,"wasabyEventIntersection",{enumerable:!0,get:function(){return p.wasabyEventIntersection}}),Object.defineProperty(l,"useWasabyEventObject",{enumerable:!0,get:function(){return _.useWasabyEventObject}}),Object.defineProperty(l,"withWasabyEventObject",{enumerable:!0,get:function(){return _.withWasabyEventObject}}),l})); 90define("UICommon/Events",["react","UICommon/Utils","UICommon/Focus","Types/entity","Env/Env","require","exports"],(function(t,e,n,i,o,a,s){var r,c,u,l,h,d,v,p,T,f,g,E,S,b,m,y,w,C,_,k,P,O;return Object.defineProperty(s,"__esModule",{value:!0}),r=function(t,e,n,i,o){"use strict";
90Object.defineProperty(e,"__esModule",{value:!0}),e.checkBindValue=e.keysHandler=e.proxyModelEvents=e.tmplNotify=e.fixUppercaseDOMEventName=e.isSpecialBodyEvent=e.checkPassiveFalseEvents=e.getEventName=e.isEvent=void 0;const a={mozmousepixelscroll:"MozMousePixelScroll",domautocomplete:"DOMAutoComplete"},s=["wheel","mousewheel","touchstart","touchmove"],r=["scroll","resize"];return e.isEvent=function(t){return/^(on:[A-z0-9])\w*$/.test(t)},e.getEventName=function(t){return t.slice(3)},e.checkPassiveFalseEvents=function(t){return-1!==s.indexOf(t)},e.isSpecialBodyEvent=function(t){return-1!==r.indexOf(t)},e.fixUppercaseDOMEventName=function(t){return a[t]||t},e.tmplNotify=function(t,e,...n){return this._notify(e,n)},e.proxyModelEvents=function(t,e,n){n.forEach((n=>{e.subscribe(n,((e,i)=>{t._notify(n,i)}))}))},e.keysHandler=function(t,e,n,i,o){for(const a in e)if(e.hasOwnProperty(a))if(t.nativeEvent.keyCode===e[a]||t.nativeEvent.key===e[a]){if(n[a](i,t),!o)if(t.target.closest(".ws-dont-stop-native-event"))t._bubbling=!1;else t.stopImmediatePropagation();return}},e.checkBindValue=function(t,e){if(o.constants.isProduction)return!0;const a=(t,e,i)=>{if(void 0===t)return!1;if(null===t)return!0;const o=e[i];if(o in t&&e.length===i+1)return!0;const s=t[o];if(Array.isArray(s)){let t=[];for(let n=0;n<s.length;n++)t.push(a(s[n],e,i+1));return t.indexOf(!1)<=-1}if(s instanceof n.Record)return!0;else return a(s,e,i+1)},s=e=>{i.Logger.warn(`Bind на неÑÑÑеÑÑвÑÑÑее поле "${e}". Bind Ð¼Ð¾Ð¶ÐµÑ ÑабоÑаÑÑ Ð½Ðµ пÑавилÑно`,t.viewController)};if(!e)return!1;if((e=>{var i,o,a;const r=/record\[(.*)\]/g.exec(e);if(!r)return!1;const c=0===e.indexOf("_options")?null===(o=null===(i=t.data)||void 0===i?void 0:i._options)||void 0===o?void 0:o.record:null===(a=t.data)||void 0===a?void 0:a.record,u=r[1].replace(/['"]/g,"");if(!(c instanceof n.Record))return!1;if(0===u.length||c instanceof n.Record&&void 0===c.get(u))s(e);return!0})(e))return!0;if(/[Ð-Яа-Ñ]/g.exec(e))return!0;const r=t.data,c=e.split("."),u=/\[\s*\S*]/gi;for(const t in c)if(u.test(c[t]))c[t]=c[t].split(u)[0];if(!a(r,c,0))s(e);return!0},e}(0,{},i,e,o),c=r,u=function(t,e){"use strict";function n(t,e){return function(){var n,i=[];for(n=0;n<arguments.length;n++)i.push(arguments[n]);for(n=0;n<e.length;n++)i.push(e[n]);t.apply(void 0,i)}}function i(t,e){var n,i,o;for(n in t)if(t.hasOwnProperty(n))for(i=t[n],o=0;o<i.length;o++)e(n,i[o])}function o(t,e,o){i(o,(function(e,i){if(i.fn)i.bindedFunc=n(i.fn,i.args||[]),t.subscribe(e.split(":")[1],i.bindedFunc)}))}function a(t,e,n){i(n,(function(e,n){if(n.bindedFunc)t.unsubscribe(e.split(":")[1],n.bindedFunc)}))}return Object.defineProperty(e,"__esModule",{value:!0}),e.applyEvents=e.unsubscribeEvents=e.subscribeEvents=e.forEventObjects=e.getEventsListFromOptions=e.getBindFunc=void 0,e.getBindFunc=n,e.getEventsListFromOptions=function(t){var e,n={};for(e in t)if(t.hasOwnProperty(e))if(0===e.indexOf("event:"))n[e]=t[e];return n},e.forEventObjects=i,e.subscribeEvents=o,e.unsubscribeEvents=a,e.applyEvents=function(t,e,n){o(t,0,n),t.once&&t.once("onDestroy",(function(){a(t,0,n)}))},e}(0,{}),l=u,h=function(t,e,n,i,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const a={animationend:!0,blur:!1,error:!1,focus:!1,load:!1,mouseenter:!1,mouseleave:!1,resize:!1,scroll:!1,unload:!1,click:!0,change:!0,compositionend:!0,compositionstart:!0,compositionupdate:!0,copy:!0,cut:!0,paste:!0,dblclick:!0,focusin:!0,focusout:!0,input:!0,keydown:!0,keypress:!0,keyup:!0,mousedown:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,select:!0,wheel:!0,touchstart:!0,touchend:!0,touchmove:!0,contextmenu:!0,swipe:!0,longtap:!0},s="undefined"!=typeof window;return e.default=class{get nativeEvent(){var t;if(!this._nativeEvent||null===this._nativeEvent||!n.detection.isIE&&!Object.keys(this._nativeEvent).length)return null;else return(null===(t=this._nativeEvent)||void 0===t?void 0:t.nativeEvent)||this._nativeEvent}set nativeEvent(t){this._nativeEvent=t}constructor(t,e){const n=t?t:e;this.nativeEvent=t?t:null;const r=n.type;this.type=r;const c=n.target,u=null!=c;if(!u&&s&&-1===window.navigator.userAgent.indexOf("jsdom")&&(null==e?void 0:e._isFakeEvent))o.Logger.w
90arn("ÐеобÑ
одимо ÑказаÑÑ target пÑи Ñоздании ÑинÑеÑиÑеÑкого ÑобÑÑиÑ.");if(u)this.target=(0,i.getSvgParentNode)(c),this.currentTarget=c;this._bubbling=!!(t?a[r]:e&&e._bubbling),this.stopped=!1}stomCustomEventPropagation(){var t;if(s&&this.nativeEvent instanceof CustomEvent||n.detection.isIE&&(null===(t=this._nativeEvent)||void 0===t?void 0:t.target))this.nativeEvent.stopPropagation(),this.nativeEvent.stopImmediatePropagation()}stopPropagation(){this.stopped=!0,this.stomCustomEventPropagation()}stopSyntheticEvent(){this.stopped=!0,this.stomCustomEventPropagation()}isStopped(){return this.stopped}isNativeStopped(){return this.nativeEvent&&this.nativeEvent.stopped}isBubbling(){return this._bubbling}preventDefault(){if(this.nativeEvent)this.nativeEvent.preventDefault()}propagating(){return!0===this._bubbling&&!1===this.stopped}stopImmediatePropagation(){this.stopPropagation(),this.stomCustomEventPropagation()}},e}(0,{},o,e,e),d=h,v=function(t,e){"use strict";return Object.defineProperty(e,"__esModule",{value:!0}),e.createFakeEvent=void 0,e.createFakeEvent=function(t,e,n){return{type:t,bubbles:e.bubbles,cancelable:e.cancelable,view:window,detail:1,screenX:null==n?void 0:n.screenX,screenY:null==n?void 0:n.screenY,clientX:null==n?void 0:n.clientX,clientY:null==n?void 0:n.clientY,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey,button:0,buttons:0,relatedTarget:null,target:e.target,currentTarget:e.currentTarget,eventPhase:1,stopPropagation(){this.bubbles=!1},preventDefault(){}}},e}(0,{}),p=function(t,e){"use strict";return Object.defineProperty(e,"__esModule",{value:!0}),e.getDefaultState=e.SWIPE_THRESHOLD=e.SWIPE_MAX_DISTANCE=e.SWIPE_MIN_DISTANCE=e.LONG_TAP_THRESHOLD=e.LONG_TAP_MIN_DURATION=void 0,e.LONG_TAP_MIN_DURATION=500,e.LONG_TAP_THRESHOLD=25,e.SWIPE_MIN_DISTANCE=50,e.SWIPE_MAX_DISTANCE=600,e.SWIPE_THRESHOLD=25,e.getDefaultState=function(){return{location:{x:0,y:0},minSwipeDistance:e.SWIPE_MIN_DISTANCE,deviationThreshold:e.SWIPE_THRESHOLD,maxSwipeDuration:e.SWIPE_MAX_DISTANCE,longTapDuration:e.LONG_TAP_MIN_DURATION,time:0,target:null,allowSwipe:!0,longTapTask:null}},e}(0,{}),T=function(t,e,n,i,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FastTouchEndController=void 0;const a=["focus"],s=["input","textarea","a"];let r,c=!1;class u{static setClickEmulateState(t){this.needClickEmulate=t}static clickEmulate(t,e,o){if(function(){if(!r)r={touchend:TouchEvent,mouseover:MouseEvent,mousedown:MouseEvent,mouseup:MouseEvent,click:MouseEvent}}(),n.detection.isMobileIOS&&n.detection.safari)return;if(this.wasEventEmulated())return void(c=!1);if(this.useNativeTouchEnd(t,e))return;const s=e.target,u=document.activeElement;e.preventDefault();const l=e.changedTouches[0];let h;for(const n of Object.keys(r))h=new r[n](n,this.createMouseEvent(n,e,l)),h.eventInstance=o,t.dispatchEvent(h);if(!(0,i.hasNoFocus)(s)&&document.activeElement===u){let n;s.focus();for(let i=0;i<a.length;i++)n=new FocusEvent(a[i],this.createMouseEvent(a[i],e,l)),n.eventInstance=o,t.dispatchEvent(n)}c=!0}static wasEventEmulated(){return c}static restoreEventEmulated(){c=!1}static useNativeTouchEnd(t,e){if(!e)return!0;if(!e.preventDefault)return!0;if(!this.needClickEmulate)return!0;if(this.isNativeList(t))return!0;if(this.findContantEditable(t))return!0;if(n.detection.isMobileIOS&&n.detection.safari&&this.findHref(t))return!0;const i=document.activeElement;if(this.isNativeList(i)||this.isContentEditable(i))return!0;if(t.classList.contains("ws-disableFastTouch"))return!0;if(!e.isTrusted)return!0;else return!1}static isNativeList(t){return s.indexOf(t.tagName.toLowerCase())>-1}static findContantEditable(t){if(this.isContentEditable(t))return!0;if(t.parentElement)return this.findContantEditable(t.parentElement);else return!1}static findHref(t){return!!t.closest("[href]")}static isContentEditable(t){return!!(t.hasAttribute("contentEditable")||t.parentElement&&t.parentElement.hasAttribute("contentEditable"))}static createMouseEvent(t,e,n){return(0,o.createFakeEvent)(t,e,n)}}return e.FastTouchEndController=u,u.needClickEmulate=!0,e}(0,{},o,n,v),f=T,g=function(t,e,n,i,o){"use strict";
90return Object.defineProperty(e,"__esModule",{value:!0}),e.useTouches=void 0,e.useTouches=function(t,e){const a=n.useRef((0,o.getDefaultState)()),s=t=>{const e=t.touches?t.touches[0]:t;return{x:e.clientX,y:e.clientY}},r=()=>{a.current.allowSwipe=!1},c=()=>{const t=a.current.longTapTask;if(null!==t)clearTimeout(t)},u=n=>{const i=s(n.nativeEvent);if(!(t=>t.x-a.current.deviationThreshold>=0&&t.x+a.current.deviationThreshold<=window.innerWidth)(i)||!t)r();if(a.current.time=Date.now(),a.current.location=i,a.current.target=n.target,e)(t=>{a.current.longTapTask=setTimeout((()=>{var n;if(null===(n=t.stopPropagation)||void 0===n||n.call(t),e)e(t)}),a.current.longTapDuration)})(n)},l=e=>{if(c(),!a.current.allowSwipe)return;const n=((t,e,n)=>{let i;if(t===a.current.target&&a.current.time-e<a.current.maxSwipeDuration)if(Math.abs(a.current.location.x-n.x)>a.current.minSwipeDistance&&Math.abs(a.current.location.y-n.y)<a.current.deviationThreshold)i=a.current.location.x>n.x?"left":"right";else if(Math.abs(a.current.location.y-n.y)>a.current.minSwipeDistance&&Math.abs(a.current.location.x-n.x)<a.current.deviationThreshold)i=a.current.location.y>n.y?"top":"bottom";return i})(e.target,Date.now(),s(e.nativeEvent));if(n){if(t)t(e,n);r()}},h=()=>{c(),a.current=(0,o.getDefaultState)()};return{handleTouchStart:u,handleTouchMove:l,handleTouchEnd:h,onTouchStart:u,onTouchMove:l,onTouchEnd:h,createWasabySwipeEvent:(t,e)=>{const n=new Event("swipe");return n.direction=e,t.target.dispatchEvent(n),new i.default(n)},createWasabyLongTapEvent:t=>{let e=new Event("longtap");return e=((t,e)=>(t.clientX=e.clientX,t.clientY=e.clientY,t.pageX=e.pageX,t.pageY=e.pageY,t.screenX=e.screenX,t.screenY=e.screenY,t))(e,t.touches[0]),e.__$blockNextEvent={contextmenu:t=>(t.preventDefault(),t.stopPropagation(),!1)},t.target.dispatchEvent(e),new i.default(e)}}},e}(0,{},t,h,p),E=g,S=function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TouchEventPolyfill=void 0;return e.TouchEventPolyfill=class{constructor(t,e){this.touchState=(0,n.getDefaultState)(),this.swipeHandler=t?t.bind(this):()=>{},this.longTapHandler=e?e.bind(this):()=>{},this.getTouchLocation=this.getTouchLocation.bind(this),this.isSwipe=this.isSwipe.bind(this),this.detectSwipe=this.detectSwipe.bind(this),this.preventSwipeEvent=this.preventSwipeEvent.bind(this),this.starLongTapTask=this.starLongTapTask.bind(this),this.resetLongTapTask=this.resetLongTapTask.bind(this),this.onTouchStart=this.onTouchStart.bind(this),this.onTouchMove=this.onTouchMove.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.getTouches=this.getTouches.bind(this)}getTouchLocation(t){const e=t.touches?t.touches[0]:t;return{x:e.clientX,y:e.clientY}}isSwipe(t){return t.x-this.touchState.deviationThreshold>=0&&t.x+this.touchState.deviationThreshold<=window.innerWidth}detectSwipe(t,e,n){let i;if(t===this.touchState.target&&this.touchState.time-e<this.touchState.maxSwipeDuration)if(n.x&&n.y&&Math.abs(this.touchState.location.x-n.x)>this.touchState.minSwipeDistance&&Math.abs(this.touchState.location.y-n.y)<this.touchState.deviationThreshold)i=this.touchState.location.x>n.x?"left":"right";else if(n.x&&n.y&&Math.abs(this.touchState.location.y-n.y)>this.touchState.minSwipeDistance&&Math.abs(this.touchState.location.x-n.x)<this.touchState.deviationThreshold)i=this.touchState.location.y>n.y?"top":"bottom";return i}preventSwipeEvent(){this.touchState.allowSwipe=!1}starLongTapTask(t){this.touchState.longTapTask=setTimeout((()=>{var e;null===(e=t.stopPropagation)||void 0===e||e.call(t),this.longTapHandler(t)}),this.touchState.longTapDuration)}resetLongTapTask(){const t=this.touchState.longTapTask;if(null!==t)clearTimeout(t)}onTouchStart(t){const e=this.getTouchLocation(t.nativeEvent);if(!this.isSwipe(e)||!this.swipeHandler)this.preventSwipeEvent();if(this.touchState.time=Date.now(),this.touchState.location=e,this.touchState.target=t.target,this.longTapHandler)this.starLongTapTask(t)}onTouchMove(t){if(this.resetLongTapTask(),!this.touchState.allowSwipe)return;const e=this.detectSwipe(t.target,Date.now(),this.getTouchLocation(t.nativeEvent));if(e)this.swipeHandler(t,e),this.preventSwipeEvent()}onTouchEnd(){this.resetLongTapTask(),this.touchState=(0,n.getDefaultState)()}getTouches(){return{onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd}}},e}(0,{},p),b=S,m=function(t,e,n){"use strict";
90Object.defineProperty(e,"__esModule",{value:!0}),e.createEventDetails=e.WasabyTouchEvent=void 0;class i{static getTouchLocation(t){const e=t.touches?t.touches[0]:t;return{x:e.clientX,y:e.clientY}}static hasEventData(t){return t&&t.target}static initEventState(t,e,n,i){if(i&&n)this.initEventHandlers[i]=n;return e.time=Date.now(),e.location=this.getTouchLocation(t),e.target=t.target,e}static stopInitializedHandler(){for(const t in this.initEventHandlers)this.initEventHandlers[t].resetState()}}return e.WasabyTouchEvent=i,i.initEventHandlers={},e.createEventDetails=function(t,e){const i=new n.default(t);i.target=e;const o=[i];return o.control=null,o.element=e,o.type=t.type,o},e}(0,{},h),y=function(t,e,n,i,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TouchHandlers=void 0;let a=0;class s{static shouldUseClickByTapOnClick(t){const e=t.target;if(s.shouldUseClickByTap(e)){const t=s.getClickStateIndexForTarget(s.fixSvgElement(e));if(t>-1)s.clickStateTarget.splice(t,1)}}static shouldUseClickByTapOnTouchstart(t){const e=t.target;if(s.shouldUseClickByTap(e)){const t=s.fixSvgElement(e);s.clickStateTarget.push({target:t,touchId:a++})}}static shouldUseClickByTapOnTouchmove(t){const e=t.target;if(s.shouldUseClickByTap(e))if(s.clickState.touchCount++,s.clickState.touchCount>3){const t=s.getClickStateIndexForTarget(s.fixSvgElement(e));if(t>-1)s.clickStateTarget.splice(t,1)}}static shouldUseClickByTapOnTouchend(t){if(s.shouldUseClickByTap(t.target)&&!s.preventShouldUseClickByTap){const e=a;s.clickState.touchCount=0,setTimeout((()=>{const n=s.getClickStateIndexForTarget(s.fixSvgElement(t.target));if(n>-1&&s.clickStateTarget[n].touchId<e){const e=s.generateClickEventFromTouchend.call(this,t);this._touchHandlers.handlerClick(e)}}),s.clickState.timeout)}}static setPreventShouldUseClickByTap(t){s.preventShouldUseClickByTap=t}static shouldUseClickByTap(t){return!!(n.constants.browser.isDesktop&&!t.closest(".wnc-sabyget-composite__shop")||n.constants.compatibility.touch&&n.constants.browser.chrome&&navigator&&navigator.userAgent.indexOf("Windows")>-1)}static generateClickEventFromTouchend(t){let e=t.changedTouches&&t.changedTouches[0];if(!e)e={clientX:0,clientY:0,screenX:0,screenY:0};return(0,i.createFakeEvent)("click",t,e)}static getClickStateIndexForTarget(t){return s.clickStateTarget.findIndex((e=>e.target===t))}static fixSvgElement(t){return t.ownerSVGElement?t.ownerSVGElement:t}}return e.TouchHandlers=s,s.clickStateTarget=[],s.preventShouldUseClickByTap=!1,s.clickState={detected:!1,stage:"",timer:void 0,timeout:o.LONG_TAP_MIN_DURATION,target:null,touchCount:0,timeStart:void 0},e}(0,{},o,v,p),w=function(t,e,n,i){"use strict";let o,a;Object.defineProperty(e,"__esModule",{value:!0}),e.LongTapController=void 0;return e.LongTapController=class{static checkThreshold(t){const e=n.WasabyTouchEvent.getTouchLocation(t);if(o.location){if(!(Math.abs(o.location.x-e.x)<i.LONG_TAP_THRESHOLD&&Math.abs(o.location.y-e.y)<i.LONG_TAP_THRESHOLD))this.resetState()}else this.resetState()}static resetState(){return clearTimeout(this.tapTimeout),o={minTapDuration:i.LONG_TAP_MIN_DURATION},!1}static initState(t,e){if(!n.WasabyTouchEvent.hasEventData(o)&&!this.resetState())return a="LongTap",o=n.WasabyTouchEvent.initEventState(t,o,this,"LongTap"),this.tapTimeout=setTimeout((()=>{this.detectState(t),e()}),o.minTapDuration),o}static eventCoordPatch(t,e){return t.clientX=e.clientX,t.clientY=e.clientY,t.pageX=e.pageX,t.pageY=e.pageY,t.screenX=e.screenX,t.screenY=e.screenY,t}static detectLongTap(t){const e=Date.now();let n=!1;if(t.target===o.target&&e-o.time>=o.minTapDuration)n=!0;return n}static detectState(t){var e,i,a;if(o&&o.target){const o=this.detectLongTap(t);if(o){null===(e=t.stopPropagation)||void 0===e||e.call(t);let o=new Event("longtap");o=this.eventCoordPatch(o,null===(i=t.touches)||void 0===i?void 0:i[0]),o.__$blockNextEvent={contextmenu:t=>(t.preventDefault(),t.stopPropagation(),!1)};const s=new CustomEvent("longtap",{detail:(0,n.createEventDetails)(o,t.target),bubbles:!0});null===(a=t.target)||void 0===a||a.dispatchEvent(s),n.WasabyTouchEvent.stopInitializedHandler()}return o}}},e}(0,{},m,p),C=w,_=function(t,e,n,i){"use strict";let o,a;
90Object.defineProperty(e,"__esModule",{value:!0}),e.SwipeController=void 0;return e.SwipeController=class{static resetState(){return o={minSwipeDistance:i.SWIPE_MIN_DISTANCE,deviationThreshold:i.SWIPE_THRESHOLD,maxSwipeDuration:i.SWIPE_MAX_DISTANCE},!1}static initState(t){const e=n.WasabyTouchEvent.getTouchLocation(t);if(!n.WasabyTouchEvent.hasEventData(o)&&!this.resetState()&&this.isSwipe(e))a="Swipe",o=n.WasabyTouchEvent.initEventState(t,o,this,"Swipe")}static isSwipe(t){return t.x-o.deviationThreshold>=0&&t.x+o.deviationThreshold<=window.innerWidth}static detectSwipe(t){const e=Date.now(),i=n.WasabyTouchEvent.getTouchLocation(t);let a;if(t.target===o.target&&o.time-e<o.maxSwipeDuration)if(Math.abs(o.location.x-i.x)>o.minSwipeDistance&&Math.abs(o.location.y-i.y)<o.deviationThreshold)a=o.location.x>i.x?"left":"right";else if(Math.abs(o.location.y-i.y)>o.minSwipeDistance&&Math.abs(o.location.x-i.x)<o.deviationThreshold)a=o.location.y>i.y?"top":"bottom";return a}static detectState(t){if(o&&o.target){const e=this.detectSwipe(t);if(e){const i=new Event("swipe");i.direction=e;const o=t.target,a=new CustomEvent("swipe",{detail:(0,n.createEventDetails)(i,o),bubbles:!0});o.dispatchEvent(a),this.resetState()}}}},e}(0,{},m,p),k=_,P=function(t,e,n,i,o,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BuildTouchHandlers=void 0;return e.BuildTouchHandlers=class{constructor(){a.TouchHandlers.bind(this)}handlerTouchstart(t){a.TouchHandlers.setPreventShouldUseClickByTap(!1),a.TouchHandlers.shouldUseClickByTapOnTouchstart(t),t.addedToClickState=!0,n.FastTouchEndController.setClickEmulateState(!0),i.SwipeController.initState(t);o.LongTapController.initState(t,(()=>{n.FastTouchEndController.setClickEmulateState.call(n.FastTouchEndController,!1),a.TouchHandlers.setPreventShouldUseClickByTap(!0)}).bind(this))}handlerTouchmove(t){a.TouchHandlers.shouldUseClickByTapOnTouchmove(t),n.FastTouchEndController.setClickEmulateState(!1),i.SwipeController.detectState(t),o.LongTapController.checkThreshold(t)}handlerTouchend(t){a.TouchHandlers.shouldUseClickByTapOnTouchend.call(this,t),t.addedToClickState=!0,this.touchendTarget=t.target,setTimeout((()=>{this.touchendTarget=null}),300),n.FastTouchEndController.clickEmulate(t.target,t,this),i.SwipeController.resetState(),o.LongTapController.resetState()}handlerClick(t){if(a.TouchHandlers.shouldUseClickByTapOnClick(t),2===t.button)return void t.stopPropagation();const e=window&&window.getSelection?window.getSelection():null,n=t.target,i=e&&"Range"===e.type&&n.contains(e.focusNode)&&e.toString().trim().length>0,o=(t=>{if(t===document)return document.body;if(t===window)return window.document.body;else return t})(n);let s;try{s=window&&window.getComputedStyle?"none"===window.getComputedStyle(o).getPropertyValue("user-select"):!0}catch(t){s=!0}const r=window&&(null==n?void 0:n.textContent)&&n.textContent.trim().length>0;if(!i||s||!r);else t.stopImmediatePropagation()}getTouchendTarget(){return this.touchendTarget}setTouchendTarget(t){this.touchendTarget=t}},e}(0,{},T,_,w,y),O=P,s.BuildTouchHandlers=s.SyntheticEvent=s.Subscriber=s.EventUtils=s.TouchEventPolyfill=s.useTouches=s.LongTapController=s.SwipeController=s.FastTouchEndController=void 0,Object.defineProperty(s,"FastTouchEndController",{enumerable:!0,get:function(){return f.FastTouchEndController}}),Object.defineProperty(s,"SwipeController",{enumerable:!0,get:function(){return k.SwipeController}}),Object.defineProperty(s,"LongTapController",{enumerable:!0,get:function(){return C.LongTapController}}),Object.defineProperty(s,"useTouches",{enumerable:!0,get:function(){return E.useTouches}}),Object.defineProperty(s,"TouchEventPolyfill",{enumerable:!0,get:function(){return b.TouchEventPolyfill}}),s.EventUtils=c,s.Subscriber=l,Object.defineProperty(s,"SyntheticEvent",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(s,"BuildTouchHandlers",{enumerable:!0,get:function(){return O.BuildTouchHandlers}}),s})); 91define("UICore/NodeCollector",["require","exports","UICommon/NodeCollector"],(function(e,o,t){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.goUpByControlTree=o.getClosestControl=o.focusCallbacksObjectsSetName=void 0,Object.defineProperty(o,"focusCallbacksObjectsSetName",{enumerable:!0,get:function(){return t.focusCallbacksObjectsSetName}}),Object.defineProperty(o,"getClosestControl",{enumerable:!0,get:function(){return t.getClosestControl}}),Object.defineProperty(o,"goUpByControlTree",{enumerable:!0,get:function(){return t.goUpByControlTree}})})); 92define("UICore/Ref",["require","exports"],(function(e,r){var E,t,n,_,i,N;
92return Object.defineProperty(r,"__esModule",{value:!0}),E=function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ORIGIN_HANDLER_TYPE=r.WHEEL_EVENT_HANDLER_TYPE=r.INVISIBLE_NODE_HANDLER_TYPE=r.FOCUS_HANDLER_TYPE=r.NOTIFY_EVENT_TYPE=r.EVENT_HANDLER_TYPE=r.CLEAR_HANDLER_TYPE=r.CHILDREN_HANDLER_TYPE=r.ATTRIBUTES_HANDLER_TYPE=r.CONTROL_HANDLER_TYPE=r.CONTROL_NODE_HANDLER_TYPE=r.Responsibility=void 0;return r.Responsibility=class{find(e){return e}},r.CONTROL_NODE_HANDLER_TYPE="control-node",r.CONTROL_HANDLER_TYPE="control",r.ATTRIBUTES_HANDLER_TYPE="attributes",r.CHILDREN_HANDLER_TYPE="children",r.CLEAR_HANDLER_TYPE="clear",r.EVENT_HANDLER_TYPE="event",r.NOTIFY_EVENT_TYPE="notify",r.FOCUS_HANDLER_TYPE="focus",r.INVISIBLE_NODE_HANDLER_TYPE="invisible-node",r.WHEEL_EVENT_HANDLER_TYPE="wheel-event",r.ORIGIN_HANDLER_TYPE="origin",r}(0,{}),t=E,n=function(e,r,E){"use strict";function t(){}Object.defineProperty(r,"__esModule",{value:!0}),r.CreateOriginRef=void 0;class n extends E.Responsibility{constructor(e){if(super(),this.type=E.ORIGIN_HANDLER_TYPE,"string"==typeof e)throw new Error("WasabyOverReact не поддеÑÐ¶Ð¸Ð²Ð°Ñ Ref в ÑоÑмаÑе ÑÑÑоки.");if(!e)this.ref=t;else if("current"in e)this.ref=r=>{e.current=r};else this.ref=e}getHandler(){return this.ref}isEqual(e){var r;if(null===(r=this.ref)||void 0===r?void 0:r.isEqual)return this.ref.isEqual(e.ref);else return this.ref===e.ref}}return r.CreateOriginRef=n,r}(0,{},E),_=n,i=function(e,r,E,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ChainOfRef=void 0;class n{constructor(){this.handlers=[]}isEmpty(){return!this.handlers.length}add(e){return this.handlers.push(e),this}execute(){const e=1===this.handlers.length?this.handlers[0].getHandler():e=>this.handlers.forEach((r=>r.getHandler()(e)));return e.origin=this,e.clear=(e,r)=>{this.handlers.forEach((t=>{if(t.type!==E.ORIGIN_HANDLER_TYPE&&t.type===e)return t.clearHandler&&t.clearHandler(r)}))},e.isEqual=e=>{if(this.handlers.length!==e.origin.handlers.length)return!1;return!this.handlers.some(((r,E)=>!r.isEqual(e.origin.handlers[E])))},e}static both(e,r){if(!e)return r;if(!r)return e;const E=new n;return E.add(new t.CreateOriginRef(e)),E.add(new t.CreateOriginRef(r)),E.execute()}}return r.ChainOfRef=n,r}(0,{},E,n),N=i,r.CreateOriginRef=r.ChainOfRef=r.ORIGIN_HANDLER_TYPE=r.WHEEL_EVENT_HANDLER_TYPE=r.INVISIBLE_NODE_HANDLER_TYPE=r.FOCUS_HANDLER_TYPE=r.NOTIFY_EVENT_TYPE=r.EVENT_HANDLER_TYPE=r.CLEAR_HANDLER_TYPE=r.CHILDREN_HANDLER_TYPE=r.ATTRIBUTES_HANDLER_TYPE=r.CONTROL_HANDLER_TYPE=r.CONTROL_NODE_HANDLER_TYPE=r.Responsibility=void 0,Object.defineProperty(r,"Responsibility",{enumerable:!0,get:function(){return t.Responsibility}}),Object.defineProperty(r,"CONTROL_NODE_HANDLER_TYPE",{enumerable:!0,get:function(){return t.CONTROL_NODE_HANDLER_TYPE}}),Object.defineProperty(r,"CONTROL_HANDLER_TYPE",{enumerable:!0,get:function(){return t.CONTROL_HANDLER_TYPE}}),Object.defineProperty(r,"ATTRIBUTES_HANDLER_TYPE",{enumerable:!0,get:function(){return t.ATTRIBUTES_HANDLER_TYPE}}),Object.defineProperty(r,"CHILDREN_HANDLER_TYPE",{enumerable:!0,get:function(){return t.CHILDREN_HANDLER_TYPE}}),Object.defineProperty(r,"CLEAR_HANDLER_TYPE",{enumerable:!0,get:function(){return t.CLEAR_HANDLER_TYPE}}),Object.defineProperty(r,"EVENT_HANDLER_TYPE",{enumerable:!0,get:function(){return t.EVENT_HANDLER_TYPE}}),Object.defineProperty(r,"NOTIFY_EVENT_TYPE",{enumerable:!0,get:function(){return t.NOTIFY_EVENT_TYPE}}),Object.defineProperty(r,"FOCUS_HANDLER_TYPE",{enumerable:!0,get:function(){return t.FOCUS_HANDLER_TYPE}}),Object.defineProperty(r,"INVISIBLE_NODE_HANDLER_TYPE",{enumerable:!0,get:function(){return t.INVISIBLE_NODE_HANDLER_TYPE}}),Object.defineProperty(r,"WHEEL_EVENT_HANDLER_TYPE",{enumerable:!0,get:function(){return t.WHEEL_EVENT_HANDLER_TYPE}}),Object.defineProperty(r,"ORIGIN_HANDLER_TYPE",{enumerable:!0,get:function(){return t.ORIGIN_HANDLER_TYPE}}),Object.defineProperty(r,"ChainOfRef",{enumerable:!0,get:function(){return N.ChainOfRef}}),Object.defineProperty(r,"CreateOriginRef",{enumerable:!0,get:function(){return _.CreateOriginRef}}),r})); 93define("Controls/LoadingIndicator",["react/jsx-runtime","react","clsx","Compiler/IR","require","exports","UI/Base","Controls/event","Core/helpers/Number/randomId","Core/helpers/isNewEnvironment","css!Controls/LoadingIndicator"],(function(e,i,t,n,o,s,r,l,a,d){var c,u,h,_,g,f,p,v,y,m,C,I;let b;Object.defineProperty(s,"__esModule",{value:!0}),c=function(e,i,t,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.Context=void 0;const o=(0,n.createContext)(null);return i.Context=o,i.default=function(e){const i=(0,n.useMemo)((()=>({showIndicator:e.showIndicator,hideIndicator:e.hideIndicator})),[e.showIndicator,e.hideIndicator]),s={...e};return delete s.showIndicator,delete s.hideIndicator,(0,t.jsx)(o.Provider,{value:i,children:(0,n.cloneElement)(e.children,{...s,children:e.children.props.children})})},i}(0,{},e,i),u=c,h=function(e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});return i.default={_setIndicator(e){this.mainIndicator=e},show:function(e={},i){var t;return e.zIndex=1e4,null===(t=this.mainIndicator)||void 0===t?void 0:t.show(e,i)},hide:function(e){var i;if(e)null===(i=this.mainIndicator)||void 0===i||i.hide(e)}},i}(0,{}),_=h,g=h,f=function(e,i,t,n){"use strict";function o(e){const i=(0,n.clsx)("controls-loading-indicator__spinner-beam",e!==r&&`controls-loading-indicator__spinner-beam-${e}`),o=[];for(let e=0;e<12;e++)o.push((0,t.jsx)("div",{className:`${i} controls-loading-indicator__spinner-beam-${e}`},e));return o}Object.defineProperty(i,"__esModule",{value:!0});const s="default",r="large";return i.default=function({spinnerColorStyle:e=s,size:i=r,className:l}){return(0,t.jsx)("div",{className:(0,n.clsx)(l,"controls-loading-indicator__spinner",e===s?"controls-loading-indicator__spinner-color-default":`controls-text-${e}`,i!==r&&`controls-loading-indicator__spinner-${i}`),children:o(i)})},i}(0,{},e,t),p=f,v=function(e,i,t,n,o){"use strict";return Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(e){const i=(0,n.useContext)(o.Context);return(0,t.jsx)(t.Fragment,{children:(0,n.cloneElement)(e.children,{...this.props,showIndicator:i.showIndicator,hideIndicator:i.hideIndicator})})},i}(0,{},e,i,c),y=v,m=function(e,i,t,n,o,s){"use strict";Object.defineProperty(i,"__esModule",{value:!0});const r="default",l="large";class a extends n.Component{constructor(){super(...arguments),this.state={visible:this.props.visible}}show(){this.setState({visible:!0})}hide(){this.setState({visible:!1})}componentDidUpdate(e){if(e.visible!==this.props.visible){const e=!!this.props.visible;if(e!==this.state.visible)this.setState({visible:e})}}
93render(){if(!this.state.visible)return null;const{isGlobal:e,message:i,messageStyle:n,mods:a,overlay:d,spinnerColorStyle:c=r,scroll:u,size:h=l,overlayStyle:_}=this.props,g=(0,o.clsx)("controls-loading-indicator","controls-Popup__isolatedFocusingContext",e?"controls-loading-indicator_global":"controls-loading-indicator_local",i&&"controls-loading-indicator_text",u&&"controls-loading-indicator_scroll",u&&"controls-loading-indicator_sided",u&&`controls-loading-indicator_sided-${u}`,h!==l&&`controls-loading-indicator_${h}`,d&&`controls-loading-indicator_overlay-${d}`,function(e){if(Array.isArray(e))return e.map((e=>`controls-loading-indicator_mod-${e}`));if("string"==typeof e)return[`controls-loading-indicator_mod-${e}`];else return[]}(a));return(0,t.jsx)("div",{className:g,"data-qa":"LoadingIndicator_Indicator",style:_,children:i||d?(0,t.jsxs)("div",{className:"controls-loading-indicator-in",style:n,children:[(0,t.jsx)(s.default,{spinnerColorStyle:c,size:h}),i?(0,t.jsx)("span",{className:"controls-loading-indicator__message","data-qa":"LoadingIndicator_Indicator__message",children:i}):null]}):null})}}return i.default=a,i}(0,{},e,i,t,f),C=function(e){"use strict";function i(){return this}var t=["_showHandler","_hideHandler","_indicatorConfig","messageStyle","_overlayStyle","isGlobal"," qa-LoadingIndicator-global","","content","_options","showIndicator","hideIndicator","message","visible"];return e.g({v:1,m:"wml!Controls/_LoadingIndicator/LoadingIndicator",d:e.d(["Controls/_LoadingIndicator/Indicator"],arguments,1),t:[e.r(((e,n)=>[e.g(n,"div",{K:"0_",A:{class:"controls-LoadingIndicator"+e.e(e.x(n,0))},r:!0,c:!0},[e.P(n,e.m(n,1),{K:"0_0_",A:{class:"controls-loading-indicator_content"},E:{"on:showindicator":[{value:t[0],originalName:t[10],viewController:n.v}],"on:hideindicator":[{value:t[1],originalName:t[11],viewController:n.v}],meta:{isControl:!1,context:i,handler:e.M(n,2)}},O:e.s(n,{message:e.m(n,4)},e.m(n,3)),m:"none",i:0}),e.C(n,"ws:Controls/_LoadingIndicator/Indicator",{K:"0_1_",O:e.S(n,{name:"indicator",visible:e.m(n,6),messageStyle:e.m(n,7),overlayStyle:e.m(n,8)},e.m(n,5)),i:1})])]))],p:t.slice(0,5),e:[(e,i)=>e.g(i,[t[2],t[5]])?t[6]:t[7],(e,i)=>e.g(i,[t[9],t[8]]),function(e,i,t,n,o,s){return e.g(this,[s])},(e,i)=>e.g(i,[t[9]]),(e,i)=>e.g(i,[t[2],t[12]]),(e,i)=>e.g(i,[t[2]]),(e,i)=>e.g(i,[t[9],t[13]]),(e,i)=>e.g(i,[t[3]]),(e,i)=>e.g(i,[t[4]])],i:[[[3]],[[5]]]})}(n,m),I=C,s.ContextConsumer=s.Context=s.ContextProvider=s.Spinner=s.IndicatorOpener=void 0,s.Spinner=p.default;const x="__loading_indicator_visible_prop__",w=["mousedown","mouseup","click","keydown","keyup"];class S extends r.Control{constructor(){super(...arguments),this._template=I,this._isOverlayVisible=!1,this._isMessageVisible=!1,this._indicatorConfig={},this._stack=[],this._defaultDelay=2e3,this._delayTimer=null,this._overlayTimer=null,this._blockedEvents=[],this["[Controls/_LoadingIndicator/interface/ILoadingIndicator]"]=!0,this._eventsHandler=e=>{const i=e.type;if("mouseup"===i||"click"===i)if(!this._blockedEvents.includes("mousedown"))return;this._blockedEvents.push(i),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()},this._recalcMessagePosition=()=>{var e,i,t;if(!("undefined"!=typeof document&&this._container&&this._indicatorConfig.isGlobal&&this._isMessageVisible&&b)){if(this.messageStyle)this.messageStyle=void 0;return}const n=document.querySelector(".controls-Popup__dialog-target-container"),o=this._container.querySelector(".controls-loading-indicator-in"),s=null==n?void 0:n.getBoundingClientRect(),r=b.getContentData(),l=(null==r?void 0:r.width)||(null==s?void 0:s.width),a=(null==r?void 0:r.height)||(null==s?void 0:s.height)||document.body.clientHeight;if(!o||!l||!a)return;const d={left:`${(l-o.clientWidth)/2+this._getOffset(null==r?void 0:r.left,null==s?void 0:s.left)}px`,top:`${(a-o.clientHeight)/2+this._getOffset(null==r?void 0:r.top,null==s?void 0:s.top)}px`,position:"absolute"};if((null===(e=this.messageStyle)||void 0===e?void 0:e.left)!==d.left||(null===(i=this.messageStyle)||void 0===i?void 0:i.top)!==d.top||(null===(t=this.messageStyle)||void 0===t?void 0:t.position)!==d.position)this.messageStyle=d}}_beforeMount(e){this._syncIndicatorConfig(e)}_afterMount(e){if(e.mainIndicator)_.default._setIndicator(this),requirejs(["Controls/popup"],(e=>{b=e.Controller,b.setIndicator(this),this._updateCurrentStyles()}));else requirejs(["Controls/popup"],(e=>{b=e.Controller,this._updateCurrentStyles()}));(0,l.RegisterUtil)(this,"controlResize",this._recalcMessagePosition),this._recalcMessagePosition()}_beforeUpdate(e){this._syncIndicatorConfig(e)}_beforeUnmount(){(0,l.UnregisterUtil)(this,"controlResize"),this._clearDelayTimer(),this._clearOverlayTimer(),this._toggleEvents(!1)}show(e,i){const t=this._prepareConfig(e,i),n=this._getItemIndex(t.id);if(n>-1)this._stack[n]=t;else this._stack.push(t);return this._applyCurrentConfig(),t.id}hide(e){if(!e)return this._stack=[],void this._applyCurrentConfig();const i=this._getItemIndex(e);if(!(i<0))this._stack.splice(i,1),this._applyCurrentConfig()}_showHandler(e,i,t){return e.stopPropagation(),this.show(i,t)}
93_hideHandler(e,i){e.stopPropagation(),this.hide(i)}_prepareConfig(e,i,t=!0){const n=this._normalizeConfig(e),o=this._getOptionsSource(),s=t?{...n}:n;if(!s.id)s.id=a();if(!n.hasOwnProperty("message"))s.message="";if(!n.hasOwnProperty("overlay"))s.overlay=void 0!==o.overlay?o.overlay:"default";if(!n.hasOwnProperty("delay"))s.delay=void 0!==o.delay?o.delay:this._defaultDelay;if(!n.hasOwnProperty("isGlobal"))s.isGlobal=o.isGlobal;if(!n.hasOwnProperty("scroll"))s.scroll=o.scroll;if(!n.hasOwnProperty("small"))s.small=o.small;if(!n.hasOwnProperty("mods"))s.mods=o.mods;if(!n.hasOwnProperty("spinnerColorStyle"))s.spinnerColorStyle=o.spinnerColorStyle;if(!n.hasOwnProperty("mainIndicator"))s.mainIndicator=o.mainIndicator;if(!s.waitPromise&&i){s.waitPromise=i;const e=()=>{this.hide(s.id)};i.then(e).catch(e)}return s}_normalizeConfig(e){if(e&&"object"==typeof e)return e;if(void 0!==e)return{message:e};else return{}}_getOptionsSource(){return this._optionsSource||this._options}_getMergedOptionsSource(e){const i={...this._options};return Object.keys(e).forEach((t=>{if(void 0!==e[t])i[t]=e[t]})),i}_withOptionsSource(e,i){const t=this._optionsSource;this._optionsSource=this._getMergedOptionsSource(e);try{return i()}finally{this._optionsSource=t}}_toIndicatorViewConfig(e){return{...e,size:this._getSpinnerSize(e.small)}}_syncIndicatorViewConfig(e){const i=e||this._prepareConfig(this._options);this._indicatorConfig={...this._toIndicatorViewConfig(i),overlay:this._getOverlay(i.overlay)}}_getControlledConfig(e=this._options){if(!e.visible)return null;else return{...this._withOptionsSource(e,(()=>this._prepareConfig(e))),id:x}}_getCurrentConfig(e=this._options){const i=this._stack[this._stack.length-1];if(i)return this._withOptionsSource(e,(()=>this._prepareConfig(i,void 0,!1)));else return this._getControlledConfig(e)}_syncIndicatorConfig(e=this._options){const i=this._stack[this._stack.length-1],t=this._getCurrentConfig(e),n=this._withOptionsSource(e,(()=>this._prepareConfig(e)));if(!i){if(t)return this._isMessageVisible=!0,this._isOverlayVisible="none"!==t.overlay,this._updateCurrentStyles(t),void this._syncIndicatorViewConfig(t);this._isMessageVisible=!1,this._isOverlayVisible=!1,this._updateCurrentStyles(null),this._syncIndicatorViewConfig(n)}else this._syncIndicatorViewConfig(t||n)}_applyCurrentConfig(){var e,i;const t=this._getCurrentConfig();if(this._clearDelayTimer(),this._clearOverlayTimer(),!t)return this._toggleEvents(!1),void this._toggleIndicatorVisible(!1);const n=t.id===x,o=this._stack.length>1&&this._isOverlayVisible&&"none"!==t.overlay;if(n||0===t.delay||void 0===t.delay)return this._toggleEvents(!1),void this._toggleIndicatorVisible(!0,t);if(t.isGlobal&&!t.fixConsiderPopups&&!o)this._toggleEvents(!0);else this._toggleEvents(!1);if(this._isMessageVisible=!1,this._isOverlayVisible=o,this._updateCurrentStyles(t),this._syncIndicatorViewConfig(t),o)null===(e=this._children.indicator)||void 0===e||e.show();else null===(i=this._children.indicator)||void 0===i||i.hide();if(!t.isGlobal&&"none"!==t.overlay&&!o)this._overlayTimer=setTimeout((()=>{var e,i;if((null===(e=this._getCurrentConfig())||void 0===e?void 0:e.id)===t.id)this._isOverlayVisible=!0,this._updateCurrentStyles(t),this._syncIndicatorViewConfig(t),null===(i=this._children.indicator)||void 0===i||i.show()}),Math.min(t.delay,100));this._delayTimer=setTimeout((()=>{var e;if((null===(e=this._getCurrentConfig())||void 0===e?void 0:e.id)===t.id)this._toggleEvents(!1),this._toggleIndicatorVisible(!0,t)}),t.delay)}_toggleIndicatorVisible(e,i){var t,n;if(e&&i)this._isMessageVisible=!0,this._isOverlayVisible="none"!==i.overlay;else this._isMessageVisible=!1,this._isOverlayVisible=!1;if(this._updateCurrentStyles(i),this._syncIndicatorViewConfig(i),this._recalcMessagePosition(),e)null===(t=this._children.indicator)||void 0===t||t.show();else null===(n=this._children.indicator)||void 0===n||n.hide()}_updateCurrentStyles(e){const i=void 0===e?this._getCurrentConfig():e;if(this._overlayStyle=i?this._getZIndexStyle(i):void 0,!this._isMessageVisible)this.messageStyle=void 0}_getSpinnerSize(e){return"small"===e?"small":void 0}_getOverlay(e){if(!e)return e;if(this._isOverlayVisible&&!this._isMessageVisible)return"default";else return e}_getItemIndex(e){return this._stack.findIndex((i=>i.id===e))}_clearDelayTimer(){if(this._delayTimer)clearTimeout(this._delayTimer),this._delayTimer=null}_clearOverlayTimer(){if(this._overlayTimer)clearTimeout(this._overlayTimer),this._overlayTimer=null}_updateZIndex(e){var i;const t=b&&(null===(i=b.getController())||void 0===i?void 0:i.find(e.popupId));if(e.fixConsiderPopups){const i=this._getFixedZIndex(e);return e.fixedZIndex=i,i}if(e.zIndex)return e.zIndex;if(t)return t.currentZIndex;if(d()&&e.mainIndicator)return 9;else return}_getFixedZIndex(e){var i;if(e.fixedZIndex)return e.fixedZIndex;const t=b&&(null===(i=b.getController())||void 0===i?void 0:i.getPopupItems());let n=9;if(t&&t.getCount())for(let e=t.getCount()-1;e>=0;e--){const i=t.at(e);if("Notification"!==i.controller.TYPE)if(n=i.currentZIndex,i.hasParentPage)n-=1}return n}_getZIndexStyle(e){const i=this._updateZIndex(e);return void 0!==i?{zIndex:i}:void 0}_toggleEvents(e){if("undefined"==typeof window)return;const i=e?"addEventListener":"removeEventListener";this._blockedEvents=[];for(const t of w)if(window[i](t,this._eventsHandler,!0),!e)window[i](t,this._eventsHandler)}_getOffset(e,i){if(null!=e)return e;else return i||0}}return Object.defineProperty(s,"IndicatorOpener",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(s,"ContextProvider",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(s,"Context",{enumerable:!0,get:function(){return u.Context}}),Object.defineProperty(s,"ContextConsumer",{enumerable:!0,get:function(){return y.default}}),s.default=S,s})); 94define("Compiler/IR",["UICommon/Utils","UI/Executor","UI/Adaptive","require","exports"],(function(Utils_1,Executor_1,Adaptive_1,require,exports){function generate(e){return(0,Builder_1.default)().build(e,(0,Closure_1.default)())}function wrapDependencies(e,t,r){const o=Array.isArray(t)&&void 0===r?t:Array.prototype.slice.call(t,r),n={};return e.forEach(((e,t)=>n[e]=o[t])),n}function wrapContentBody(e,t="content"){return new IRTemplateBody_1.IRTemplateBody(e,IRTemplateBody_1.IRTemplateBodyType.CONTENT,t)}function wrapTemplateBody(e,t){return new IRTemplateBody_1.IRTemplateBody(t,IRTemplateBody_1.IRTemplateBodyType.TEMPLATE,e)}function wrapRootBody(e){return new IRTemplateBody_1.IRTemplateBody(e,IRTemplateBody_1.IRTemplateBodyType.ROOT)}
94function createSourceText(e,t){return`(function() {\n ${`var _Compiler_IR = {\n generate: ${generate.name},\n wrapTemplateBody: ${wrapTemplateBody.name},\n wrapContentBody: ${wrapContentBody.name},\n wrapRootBody: ${wrapRootBody.name}\n};var _wrapContentBody = ${wrapContentBody.name};\nvar _wrapTemplateBody = ${wrapTemplateBody.name};\nvar _wrapRootBody = ${wrapRootBody.name};\n`}\n ${(e.n.rk?`var ${e.n.rk} = requirejs("i18n!${e.m.replace(/^tmpl!/g,"").split("/")[0]}");\n`:"")+(e.n.defaultContextGetterFunction?`function ${e.n.defaultContextGetterFunction}() { return this; }\n`:"")+(e.n.debug?`function ${e.n.debug}() { debugger; }\n`:"")}\n var meta = ${`{\n v: ${e.v},\n m: "${e.m}",\n t: [\n${e.t.join(",\n")}\n],\n`+(e.p?` p: ${e.p},\n`:"")+(e.e?` e: [\n${e.e.join(",\n")}\n],\n`:"")+(e.i?` i: ${e.i},\n`:"")+"}"};\n var fn = _Compiler_IR.generate(meta).templates[Number(${t})];\n \n // ÐÑли ÑÑа ÑÑнкÑÐ¸Ñ - конÑенÑÐ½Ð°Ñ Ð¾Ð¿ÑÐ¸Ñ Ð²Ð½ÑÑÑи заголовка ÑаблиÑÑ (напÑимеÑ)\n // Ñо Ñам она вÑзÑваеÑÑÑ Ð¾Ñ window и Ñже над Window делаем Object.create в Ñаблоне\n // на иÑог - FF ÑÑгаеÑÑÑ, ÑÑо кÑо-Ñо ÑÑÐ¾Ð³Ð°ÐµÑ Ð¾Ð±ÑекÑ, коÑоÑÑй как Ð±Ñ Window,\n // но не Window\n var contentOption = function wrappedRepairedFunction() {\n if (this === window) {\n return fn.apply(undefined, arguments);\n }\n\n return fn.apply(this, arguments);\n };\n\n // ÐомеÑим ÑÑнкÑиÑ, как ÑÑ, ÑÑо пÑиÑла Ñ ÑеÑвеÑа\n contentOption.fromSerializer = true;\n\n return contentOption;\n })()`}function deserialize(text){var _a;try{const[,index,data]=/^CONTENT_OPTION,(\d+),(.*)$/im.exec(text),state=JSON.parse(data);return state.n=null!==(_a=state.n)&&void 0!==_a?_a:{},eval(createSourceText(state,index))}catch(e){throw new Error(`ÐÑибка деÑеÑиализаÑии Ñаблона: ${e.message}\n${e.stack}\nÐаннÑе: text=${text}\n`)}}var Compiler__ir_core_Context,Compiler__ir_core_IRTemplateBody,IRTemplateBody_1,Compiler__ir_generator_flow_Iterator,Compiler__ir_generator_impl_Base,Compiler__ir_methods_impl_Base,Compiler__ir_methods_utils_Error,Compiler__ir_methods_utils_Object,Compiler__ir_Serializer,Compiler__ir_methods_impl_Markup,Compiler__ir_builder_Builder,Builder_1,Compiler__ir_methods_impl_Internal,Compiler__ir_generator_impl_Internal,Compiler__ir_generator_impl_Markup,Compiler__ir_builder_Closure,Closure_1;return Object.defineProperty(exports,"__esModule",{value:!0}),Compiler__ir_core_Context=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t,r){if(this.global=e,this.args=t,r)this.key=r.key,this.self=r.self,this.data=r.data,this.pName=r.pName,this.templateCount=r.templateCount,this.defCollection=r.defCollection,this.viewController=r.viewController,this.forceCompatible=r.forceCompatible,this.funcContext=r.funcContext,this.includedTemplates=r.includedTemplates}get d(){return this.data}
94get v(){return this.viewController}spawn(){return new r(this.global,this.args,this)}}return t.default=r,t}(0,{}),Compiler__ir_core_IRTemplateBody=function(e,t){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.IRTemplateBody=t.IRTemplateBodyType=void 0,function(e){e[e.TEMPLATE=0]="TEMPLATE",e[e.CONTENT=1]="CONTENT",e[e.ROOT=2]="ROOT",e[e.INSTANT_EVAL_CONTENT=3]="INSTANT_EVAL_CONTENT"}(r||(t.IRTemplateBodyType=r={}));return t.IRTemplateBody=class{constructor(e,t,r){this.fn=e,this.type=t,this.name=r}invoke(e,t){return this.fn(e,t)}},t}(0,{}),IRTemplateBody_1=Compiler__ir_core_IRTemplateBody,Compiler__ir_generator_flow_Iterator=function(e,t,r){"use strict";function o(e){if("object"==typeof e)Object.defineProperty(e,"for",{value:!0,enumerable:!1})}Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e,t){this.generator=e,this.context=t}for(e,t,r,n,a){let i=[];const l=this.context.spawn();l.self=l.data,l.data.viewController=this.context.viewController||null,l.templateCount=0;const s=`${l.key}_${e}`;let u=0;if("number"==typeof t)this.generator.evalExpression(l,t);for(;this.generator.evalExpression(l,r);)if(l.key=`${s}_for_${u++}_`,i=i.concat(a(this.generator,l)),"number"==typeof n)this.generator.evalExpression(l,n);return o(i),i}foreach(e,t,n,a){let i=[];const l=this.generator.evalExpression(this.context,n),s=r.TClosure.getIterator(l),u=this.context.spawn();if(u.data.viewController=this.context.viewController||null,s){u.self=u.data,u.data=this.generator.methods.createScope(u.self),u.templateCount=0;const r=`${u.key}_${e}`;let o=0;s(l,((e,n)=>{const l=u.data;u.data=Object.create(u.data),this.generator.methods.presetScope(e,u.data,n,{value:t[0],key:t[1]}),u.key=`${r}_for_${o++}_`,i=i.concat(a(this.generator,u)),u.data=l}))}else i.push(this.generator.createText(""));return o(i),i}},t}(0,{},Executor_1),Compiler__ir_generator_impl_Base=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e){this.methods=e}e(e){return this.escape(e)}t(e,t){return this.createText(e,t)}d(e){return this.createDirective(e)}c(e){return this.createComment(e)}g(e,t,r,o){return this.createTag(e,t,r,o)}C(e,t,r){return this.createControl(e,t,r)}P(e,t,r){return this.createPartial(e,t,r)}T(e,t,r){return this.createTemplate(e,t,r)}I(e,t,r){return this.createInline(e,t,r)}D(e,t){return this.evalDefaultScope(e,t)}s(e,t,r){return this.evalOptionsScope(e,t,r)}S(e,t,r){return this.evalScope(e,t,r)}m(e,t){return this.evalExpression(e,t)}x(e,t){return this.evalExpression2(e,t)}M(e,t){return this.closeExpression(e,t)}B(e,t){return this.closeBindExpression(e,t)}o(e,t,r){return this.createContentOption(e,t,r)}O(e,t,r){return this.evalContentOption(e,t,r)}F(e,t,r){return this.createFunction(e,t,r)}r(e,t,r,o,n,a,i){return this.for(e,t,r,o,n,a,i)}h(e,t,r,o,n,a){return this.foreach(e,t,r,o,n,a)}},t}(0,{}),Compiler__ir_methods_impl_Base=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{get viewDecorators(){if(!this.lazyViewDecorators)this.lazyViewDecorators=e("View/decorators");return this.lazyViewDecorators}t(e){return this.sanitize(e)}u(e){return this.wrapUndefined(e)}S(e){return this.wrapString(e)}g(e,t){return this.getter(e,t)}s(e,t,r){return this.setter(e,t,r)}d(e,t){return this.decorate(e,t)}c(e,t,r,o){return this.call(e,t,r,o)}C(e,t,r){return this.call2(e,t,r)}r(e){return this.getResourceURL(e)}D(e){return this.dots(e)}},t}(require,{}),Compiler__ir_methods_utils_Error=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends TypeError{constructor(e,t){super(t),this.code=e}}return r.ERROR_NOT_A_FUNCTION=1,r.ERROR_CANNOT_READ_PROPERTIES=2,r.ERROR_INVALID_INTERNAL_CONTEXT=3,t.default=r,t}(0,{}),Compiler__ir_methods_utils_Object=function(e,t,r){"use strict";function o(e){const t=typeof e;return("object"===t||"function"===t)&&"[Types/_entity/IObject]"in e}function n(e,t){let n,a=e;for(n=0;n<t.length;n++){if(null==a)return;const e=t[n];if(o(a)&&a.has(e))a=a.get(e);else if(a[e])a=a[e];else if("DEFAULT_BREAKPOINTS"===e)a=r.DEFAULT_BREAKPOINTS;else if("_options"!==e||a[e])a=a[e]}if(n!==t.length)throw new Error(`Evaluation error. Path ${t.join(".")} is not reachable`);return a}
94return Object.defineProperty(t,"__esModule",{value:!0}),t.implantValue=t.extractValue=void 0,t.extractValue=n,t.implantValue=function(e,t,r){const o=t.pop(),a=n(e,t);if(a){if(a.set)a.set(o,r);else a[o]=r;return!0}return!1},t}(0,{},Adaptive_1),Compiler__ir_Serializer=function(e,t,r){"use strict";function o(e,t){switch(e){case"d":return;case"t":return t.map((e=>{switch(e.type){case r.IRTemplateBodyType.TEMPLATE:return`_Compiler_IR.wrapTemplateBody("${e.name}", ${e.fn.toString()})`;case r.IRTemplateBodyType.CONTENT:if("content"===e.name)return`_Compiler_IR.wrapContentBody(${e.fn.toString()})`;else return`_Compiler_IR.wrapContentBody(${e.fn.toString()}, "${e.name}")`;default:return`_Compiler_IR.wrapRootBody(${e.fn.toString()})`}})).filter((e=>void 0!==e));case"e":return t.map((e=>e.toString()));case"v":case"p":case"i":return JSON.stringify(t);default:return t}}return Object.defineProperty(t,"__esModule",{value:!0}),t.serialize=void 0,t.serialize=function(e){return JSON.stringify(e,o)},t}(0,{},Compiler__ir_core_IRTemplateBody),Compiler__ir_methods_impl_Markup=function(e,t,r,o,n,a,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class l extends r.default{sanitize(e){return a.TClosure.Sanitize(e)}wrapUndefined(e){return a.TClosure.wrapUndef(e)}wrapString(e){return`${e}`}getResourceURL(e){return a.TClosure.getResourceUrl(e)}getter(e,t){return(0,n.extractValue)(e,t)}setter(e,t,r){var o,a;if("record"===t[0]&&(null===(a=null===(o=null==e?void 0:e.props)||void 0===o?void 0:o.record)||void 0===a?void 0:a.has(t[1])))return(0,n.implantValue)(e.props,t,r);else return(0,n.implantValue)(e,t,r)}decorate(e,t=[]){return this.viewDecorators[e].apply(void 0,t)}call(e,t,r,n=[]){const a=this.getter(t,r);if("function"!=typeof a)throw new o.default(o.default.ERROR_NOT_A_FUNCTION,`${r.slice(-1)} is not a function`);return a.apply(e,n)}call2(e,t,r=[]){const n=this.getter(e,t.slice(0,-1));if(null==n)throw new o.default(o.default.ERROR_CANNOT_READ_PROPERTIES,`Cannot read properties of ${n} (reading '${t.slice(-1)}')`);return this.call(n,n,t.slice(-1),r)}dots(e){return this.uniteScope(e,{parent:void 0,element:void 0})(a.TClosure.plainMerge)}filterOptions(e){return a.TClosure.filterOptions(e)}validateNodeKey(e){return a.TClosure.validateNodeKey(e)}createScope(e){return a.TClosure.createScope(e)}getContext(e){return a.TClosure.getContext(e)}getTypeFunc(e,t){return a.TClosure.getTypeFunc(e,t)}createDataArray(e,t,r,o){return a.TClosure.createDataArray(e,t,r,o)}uniteScope(e,t){return a.TClosure.uniteScope(e,t)}plainMerge(e,t,r){return a.TClosure.plainMerge(e,t,r)}processMergeAttributes(e,t){return a.TClosure.processMergeAttributes(e,t)}plainMergeAttr(e,t){return a.TClosure.plainMergeAttr(e,t)}plainMergeContext(e,t){return a.TClosure.plainMergeContext(e,t)}calcParent(e,t,r){return a.TClosure.calcParent(e,t,r)}presetScope(e,t,r,o){return a.TClosure.presetScope(e,t,r,o)}createGenerator(e,t,r){return a.TClosure.createGenerator(e,t,r)}templateError(e,t,r){i.Logger.templateError("Failed to generate html",e,r,t)}isolateScope(e,t,r){return a.TClosure.isolateScope(e,t,r)}}return t.default=l,t}(0,{},Compiler__ir_methods_impl_Base,Compiler__ir_methods_utils_Error,Compiler__ir_methods_utils_Object,Executor_1,Utils_1),Compiler__ir_builder_Builder=function(e,t,r,o){"use strict";function n(e,t){var r;if(null===(r=Object.getOwnPropertyDescriptor(e,"name"))||void 0===r?void 0:r.configurable)Object.defineProperty(e,"name",{value:t,configurable:!0})}Object.defineProperty(t,"__esModule",{value:!0});class a{build(e,t){var a,i,l,s;const u=null!==(a=e.p)&&void 0!==a?a:[],p=e.m.startsWith("wml!"),c={version:e.v,moduleName:e.m,depsLocal:null!==(i=e.d)&&void 0!==i?i:{},includedTemplates:{},bodies:[],templates:[],expressions:null!==(l=e.e)&&void 0!==l?l:[],internalsMeta:null!==(s=e.i)&&void 0!==s?s:[],isWasabyTemplate:p};let d;if(e.t.forEach(((a,i)=>{const l=t.createTemplateFunction(c,a);switch(c.bodies.push(a),c.templates.push(l),a.type){case r.IRTemplateBodyType.CONTENT:if(n(l,`${a.name}_${i}`),"undefined"==typeof window)Object.defineProperty(l,"templateInfo",{get:()=>'content option "'+i+'" from "'+c.moduleName+'"',configurable:!0});if(!p)l.toJSON=()=>`CONTENT_OPTION,${i}
94,${(0,o.serialize)(e)}`;break;case r.IRTemplateBodyType.TEMPLATE:if(n(l,a.name),"undefined"==typeof window)Object.defineProperty(l,"templateInfo",{get:()=>'inline template "'+i+'" from "'+c.moduleName+'"',configurable:!0});if(c.depsLocal[a.name]=l,!p)c.includedTemplates[a.name]=l;break;case r.IRTemplateBodyType.ROOT:if(n(l,c.moduleName),"undefined"==typeof window)Object.defineProperty(l,"templateInfo",{get:()=>'root template from "'+c.moduleName+'"',configurable:!0});d=l}})),!d)throw new Error("ÐÑибка поÑÑÑÐ¾ÐµÐ½Ð¸Ñ Ñаблона: коÑÐ½ÐµÐ²Ð°Ñ ÑÑнкÑÐ¸Ñ Ð½Ðµ бÑла ÑгенеÑиÑована");if(d.stable=!0,d.reactiveProps=u,d.isWasabyTemplate=p,!p)d.templates=c.templates,d.toJSON=()=>({$serialized$:"func",module:c.moduleName});return d}}let i;return t.default=function(){if(!i)i=new a;return i},t}(0,{},Compiler__ir_core_IRTemplateBody,Compiler__ir_Serializer),Builder_1=Compiler__ir_builder_Builder,Compiler__ir_methods_impl_Internal=function(e,t,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends r.default{getter(e,t){try{return super.getter(e,t)}catch(e){throw new o.default(o.default.ERROR_INVALID_INTERNAL_CONTEXT,e.message)}}setter(e,t,r){try{return super.setter(e,t,r)}catch(e){throw new o.default(o.default.ERROR_INVALID_INTERNAL_CONTEXT,e.message)}}call(e,t,r,n=[]){const a=this.getter(t,r);if("function"!=typeof a)throw new o.default(o.default.ERROR_INVALID_INTERNAL_CONTEXT,`${r.slice(-1)} is not a function`);if(n.some((e=>void 0===e)))throw new o.default(o.default.ERROR_INVALID_INTERNAL_CONTEXT,"Received undefined in arguments");return a.apply(e,n)}call2(e,t,r=[]){const n=this.getter(e,t.slice(0,-1));if(null==n)throw new o.default(o.default.ERROR_INVALID_INTERNAL_CONTEXT,`Cannot read properties of ${n} (reading '${t.slice(-1)}')`);return this.call(n,n,t.slice(-1),r)}}return t.default=n,t}(0,{},Compiler__ir_methods_impl_Markup,Compiler__ir_methods_utils_Error),Compiler__ir_generator_impl_Internal=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(){this.methods=new r.default}evalInternal(e,t){if(!function(e){return e.args.isVdom&&"undefined"!=typeof window}(e)||"number"!=typeof t)return new Map;const r=new Map,o=e.spawn();return o.funcContext=o.data,o.global.internalsMeta[t].forEach((e=>{var t;const n=null!==(t=e[1])&&void 0!==t?t:e[0];for(let t=e[0];t<=n;t++)this.evalExpression(o,r,t)})),r}evalExpression(e,t,r){var o;let n;try{n=e.global.expressions[r].call(e.self,this.methods,e.data,e.funcContext,e.args.context,null===(o=e.self)||void 0===o?void 0:o._children)}catch(e){t.set(-100,!0)}finally{t.set(r,n)}}},t}(0,{},Compiler__ir_methods_impl_Internal),Compiler__ir_generator_impl_Markup=function(e,t,r,o,n,a,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class l extends r.default{constructor(e){super(new n.default),this.uiGenerator=e,this.internal=new a.default}escape(e){return this.uiGenerator.escape(e)}createText(e="",t=void 0){return this.uiGenerator.createText(`${e}`,t)}createDirective(e){return this.uiGenerator.createDirective(e)}createComment(e){}createTag(e,t,r,o=[]){var n,a,i;const l=`${e.key}${r.K}`,s=(null==r?void 0:r.r)?e.args.attr:e.args.attr?{context:e.args.attr.context,key:l}:{},u=(null==r?void 0:r.c)?null===(n=e.args.attr)||void 0===n?void 0:n.isControlTemplate:!1;return this.uiGenerator.createTag(t,{key:l,attributes:null!==(a=r.A)&&void 0!==a?a:{},events:null!==(i=r.E)&&void 0!==i?i:{}},o,s,e.defCollection,e.viewController,u)}createControl(e,t,r){var o,n,a,i,l,s;if("string"==typeof t)return this.uiGenerator.createControlNew("wsControl",t,null!==(o=r.A)&&void 0!==o?o:{},null!==(n=r.E)&&void 0!==n?n:{},null!==(a=r.O)&&void 0!==a?a:{},this.createControlConfiguration(e,r));else return this.uiGenerator.createControlNew("resolver",t,null!==(i=r.A)&&void 0!==i?i:{},null!==(l=r.E)&&void 0!==l?l:{},null!==(s=r.O)&&void 0!==s?s:{},this.createResolverConfiguration(e,r))}createPartial(e,t,r){var o,n,a;return this.uiGenerator.createControlNew("resolver",t,null!==(o=r.A)&&void 0!==o?o:{},null!==(n=r.E)&&void 0!==n?n:{},null!==(a=r.O)&&void 0!==a?a:{},this.createResolverConfiguration(e,r))}createTemplate(e,t,r){var o,n,a;return this.uiGenerator.createControlNew("template",t,null!==(o=r.A)&&void 0!==o?o:{},null!==(n=r.E)&&void 0!==n?n:{},null!==(a=r.O)&&void 0!==a?a:{},this.createControlConfiguration(e,r))}createInline(e,t,r){var o,n,a;const i=this.createInlineAttributes(e,r);if(i.isInline=!0,r.c)i.isContainerNodeInline=null===(o=e.args.attr)||void 0===o?void 0:o.isControlTemplate;if(r.f)if(i.isContainerNodeInline)i.refForContainer=null===(n=e.args.attr)||void 0===n?void 0:n.refForContainer;const l=this.methods.plainMerge(Object.create(e.data||{}),this.prepareDataForCreate("_$inline_template",null!==(a=r.O)&&void 0!==a?a:{},i,{}),!1);if(!e.global.isWasabyTemplate)return e.global.templates[t].call(e.self,l,i,e.args.context,e.args.isVdom,e.args.sets,e.args.forceCompatible,e.args.generatorConfig,e.args.templateExceptionMode);else return e.global.templates[t].call(e.self,l,i,e.args.context,e.args.isVdom,e.args.sets,e.args.forceCompatible,e.args.generatorConfig,e.args.templateExceptionMode)}evalDefaultScope(e,t){return this.methods.uniteScope(this.methods.dots(e.data),t)}evalOptionsScope(e,t,r){return this.methods.uniteScope(this.methods.filterOptions(r),t)}evalScope(e,t,r){return this.methods.uniteScope(r,t)}evalExpression(e,t){var r;return e.global.expressions[t].call(e.self,this.methods,e.data,e.funcContext,e.args.context,null===(r=e.self)||void 0===r?void 0:r._children)}evalExpression2(e,t){return this.methods.wrapUndefined(this.evalExpression(e,t))}closeExpression(e,t){const r=this.methods;return function(...o){return e.global.expressions[t].call(this,r,e.data,e.funcContext,e.args.context,this._children,...o)}}closeBindExpression(e,t){const r=this.methods;return function(o,n){var a;return e.global.expressions[t].call(this,r,o,e.funcContext,e.args.context,null===(a=e.self)||void 0===a?void 0:a._children,n)}}createContentOption(e,t,r){const o=Object.create(e.data);o.viewController=e.viewController||null;const n=e.global.templates[t].bind(o);if(n.isWasabyTemplate=e.global.isWasabyTemplate,"undefined"==typeof window)Object.defineProperty(n,"templateInfo",{get:()=>"bound"+e.global.templates[t].templateInfo,configurable:!0});if(!e.global.isWasabyTemplate){if(n.internal=new Map,n.toString=()=>n(o),"undefined"==typeof window)n.toJSON=e.global.templates[t].toJSON;return n}const a=this.internal.evalInternal(e,r);return a.set(-1,e.global.templates[t]),this.methods.createDataArray([{func:n,internal:a,isWasabyTemplate:e.global.isWasabyTemplate}],e.global.moduleName,e.global.isWasabyTemplate,e.args.isVdom)}evalContentOption(e,t){const r=e.global.bodies[t].type,o=Object.create(e.data);o.viewController=e.viewController||null,e.global.bodies[t].type=i.IRTemplateBodyType.INSTANT_EVAL_CONTENT;try{return e.global.templates[t].call(o,Object.create(e.data),null,e.args.context)}catch(e){throw e}finally{e.global.bodies[t].type=r}}createFunction(e,t,r){return this.methods.getTypeFunc(t,r)}for(e,t,r,n,a,i){return new o.default(this,e).for(t,r,n,a,i)}foreach(e,t,r,n,a){return new o.default(this,e).foreach(t,r,n,a)}prepareDataForCreate(e,t,r,o){return this.uiGenerator.prepareDataForCreate(e,t,r,o)}createInlineAttributes(e,t){var r,o;const n={attributes:null!==(r=t.A)&&void 0!==r?r:{},events:null!==(o=t.E)&&void 0!==o?o:{},key:`${e.key}${t.K}`,inheritOptions:e.args.attr?e.args.attr.inheritOptions:{},internal:e.args.attr?e.args.attr.internal:{}
94,context:e.args.attr?e.args.attr.context:{}};if(t.r)return this.methods.plainMergeAttr(e.args.attr,n);else return this.methods.plainMergeContext(e.args.attr,n)}createControlConfiguration(e,t){var r;const o={key:`${e.key}${t.K}`,internal:new Map,ctx:e.self,defCollection:e.defCollection,viewController:e.viewController,data:e.data,attr:e.args.attr,context:e.args.context,isVdom:e.args.isVdom,depsLocal:e.global.depsLocal,includedTemplates:e.global.includedTemplates};if(e.pName)o.pName=e.pName;if(t.a)o.compositeAttributes=null==t?void 0:t.a;if(t.g)o.isRootTag=null==t?void 0:t.g;if(t.i)o.internal=this.internal.evalInternal(e,t.i);if(t.m)o.mergeType=null==t?void 0:t.m;if(t.b)o.blockOptionNames=t.b;if(t.c)o.isContainerNode=null===(r=e.args.attr)||void 0===r?void 0:r.isControlTemplate;return o}createResolverConfiguration(e,t){const r=this.createControlConfiguration(e,t);return r.context=e.args.isVdom?`${e.args.context}part_${e.templateCount++}`:e.args.context,r}}return t.default=l,t}(0,{},Compiler__ir_generator_impl_Base,Compiler__ir_generator_flow_Iterator,Compiler__ir_methods_impl_Markup,Compiler__ir_generator_impl_Internal,Compiler__ir_core_IRTemplateBody),Compiler__ir_builder_Closure=function(e,t,r,o,n,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i{createTemplateFunction(e,t){return function(i,l,s,u,p,c,d,_="warn"){var m,f,h,C;const g=new o.default(e,{self:this,data:i,attr:l,context:s,isVdom:u,sets:p,forceCompatible:c,generatorConfig:d,templateExceptionMode:_}),T=new n.default;if(g.data=g.args.data,g.self=g.args.self,g.key=T.validateNodeKey(null===(m=g.args.attr)||void 0===m?void 0:m.key),g.templateCount=0,g.defCollection={id:[],def:void 0},t.type===r.IRTemplateBodyType.CONTENT)g.pName=t.name,g.data=T.isolateScope(Object.create(null!==(f=g.self)&&void 0!==f?f:null),g.data,t.name);g.viewController=T.calcParent(g.self,g.pName,g.data),g.forceCompatible=null!==(h=g.args.forceCompatible)&&void 0!==h?h:!1;const y=T.createGenerator(g.args.isVdom,g.forceCompatible,g.args.generatorConfig);if(g.funcContext=T.getContext(g.self),!e.isWasabyTemplate){g.funcContext=g.data,g.includedTemplates=(null==this?void 0:this.includedTemplates)||{};for(const t in e.includedTemplates)if(e.includedTemplates.hasOwnProperty(t))g.includedTemplates[t]=function(r,o,n,a){return e.includedTemplates[t].call(this,r,o,n,a,p,c,d,_)}.bind({includedTemplates:g.includedTemplates})}let v;try{if(v=y.joinElements(t.invoke(new a.default(y),g),g.key,g.defCollection),null===(C=g.defCollection)||void 0===C?void 0:C.def)v=y.chain(v,g.defCollection,g.self),g.defCollection=void 0}catch(e){if("throw"===_)throw e;T.templateError(g.global.moduleName,e,g.data)}return v||y.createText("")}}}let l;return t.default=function(){if(!l)l=new i;return l},t}(0,{},Compiler__ir_core_IRTemplateBody,Compiler__ir_core_Context,Compiler__ir_methods_impl_Markup,Compiler__ir_generator_impl_Markup),Closure_1=Compiler__ir_builder_Closure,exports.r=exports.t=exports.c=exports.d=exports.g=exports.deserialize=exports.wrapRootBody=exports.wrapTemplateBody=exports.wrapContentBody=exports.wrapDependencies=exports.generate=void 0,exports.generate=generate,exports.g=generate,exports.wrapDependencies=wrapDependencies,exports.d=wrapDependencies,exports.wrapContentBody=wrapContentBody,exports.c=wrapContentBody,exports.wrapTemplateBody=wrapTemplateBody,exports.t=wrapTemplateBody,exports.wrapRootBody=wrapRootBody,exports.r=wrapRootBody,exports.deserialize=deserialize,exports})); 95define("UI/Adaptive",["require","exports","UICore/Adaptive"],(function(e,r,o){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ScrollOnBodyContextProvider=r.ScrollOnBodyContext=r.withForceScrollUnfreeze=r.unFreezeBodyScrollManual=r.freezeBodyScrollManual=r.unMoveBodyScroll=r.moveBodyScroll=r.BodyScroll=r.useScrollOnBodyFrozen=r.ScrollOnBodyStore=r.getAdaptiveModeForLoaders=r.withAdaptiveMode=r.useAdaptiveMode=r.AdaptiveInitializerConfig=r.AdaptiveContainer=r.DEFAULT_BREAKPOINTS=void 0,Object.defineProperty(r,"DEFAULT_BREAKPOINTS",{enumerable:!0,get:function(){return o.DEFAULT_BREAKPOINTS}}),Object.defineProperty(r,"AdaptiveContainer",{enumerable:!0,get:function(){return o.AdaptiveContainer}}
95),Object.defineProperty(r,"AdaptiveInitializerConfig",{enumerable:!0,get:function(){return o.AdaptiveInitializerConfig}}),Object.defineProperty(r,"useAdaptiveMode",{enumerable:!0,get:function(){return o.useAdaptiveMode}}),Object.defineProperty(r,"withAdaptiveMode",{enumerable:!0,get:function(){return o.withAdaptiveMode}}),Object.defineProperty(r,"getAdaptiveModeForLoaders",{enumerable:!0,get:function(){return o.getAdaptiveModeForLoaders}}),Object.defineProperty(r,"ScrollOnBodyStore",{enumerable:!0,get:function(){return o.ScrollOnBodyStore}}),Object.defineProperty(r,"useScrollOnBodyFrozen",{enumerable:!0,get:function(){return o.useScrollOnBodyFrozen}}),Object.defineProperty(r,"BodyScroll",{enumerable:!0,get:function(){return o.BodyScroll}}),Object.defineProperty(r,"moveBodyScroll",{enumerable:!0,get:function(){return o.moveBodyScroll}}),Object.defineProperty(r,"unMoveBodyScroll",{enumerable:!0,get:function(){return o.unMoveBodyScroll}}),Object.defineProperty(r,"freezeBodyScrollManual",{enumerable:!0,get:function(){return o.freezeBodyScrollManual}}),Object.defineProperty(r,"unFreezeBodyScrollManual",{enumerable:!0,get:function(){return o.unFreezeBodyScrollManual}}),Object.defineProperty(r,"withForceScrollUnfreeze",{enumerable:!0,get:function(){return o.withForceScrollUnfreeze}}),Object.defineProperty(r,"ScrollOnBodyContext",{enumerable:!0,get:function(){return o.ScrollOnBodyContext}}),Object.defineProperty(r,"ScrollOnBodyContextProvider",{enumerable:!0,get:function(){return o.ScrollOnBodyContextProvider}})})); 96define("UICore/Adaptive",["react/jsx-runtime","react","UICore/Ref","UICore/Contexts","UICommon/Utils","UICommon/NodeCollector","Types/object","Types/function","EnvTouch/EnvTouch","Env/Event","Env/Env","Application/Page","Application/Env","require","exports","css!Tailwind/tailwind"],(function(e,t,i,n,o,r,s,l,d,c,a,u,h,p,v){var f,g,w,b,y,m,_,C,A,M,S,P,O,W,I,H,T,B,E,z,x,k,F,j,V,D,L,N,U,$,R,K,Y,q,X,J,G,Q,Z,ee;return Object.defineProperty(v,"__esModule",{value:!0}),f=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AdaptiveInitializerConfigContext=void 0;const n=i.createContext(void 0);return t.AdaptiveInitializerConfigContext=n,t}(0,{},t),g=f,w=function(e,t,i,n,o){"use strict";function r(e,t,i){return e<=i&&i<t}Object.defineProperty(t,"__esModule",{value:!0}),t.Storage=t.toDefaultBreakpoint=t.between=t.getHeight=t.getWidth=t.DEFAULT_BREAKPOINTS=void 0,t.DEFAULT_BREAKPOINTS=Object.freeze({xs:375,sm:640,md:768,lg:1024,xl:1280}),t.getWidth=function(e,i){const n=null==e?void 0:e[i];if(n)return n;if(o.detection.isMobilePlatform)return o.detection.isPhone?t.DEFAULT_BREAKPOINTS.xs+1:t.DEFAULT_BREAKPOINTS.sm+1;else return t.DEFAULT_BREAKPOINTS.xl+1},t.getHeight=function(e,i){const n=null==e?void 0:e[i];if(n)return n;if(o.detection.isMobilePlatform)return o.detection.isPhone?t.DEFAULT_BREAKPOINTS.sm+1:t.DEFAULT_BREAKPOINTS.md+1;else return t.DEFAULT_BREAKPOINTS.lg+1},t.between=r,t.toDefaultBreakpoint=function(e){const i=t.DEFAULT_BREAKPOINTS,n=Object.keys(i).sort(((e,t)=>i[e]-i[t]));for(let t=0;t<n.length;t++){const o=n[t],s=i[o],l=n[t+1];if(r(s,l?i[l]:1/0,e))return o}if(e<i.xs)return"";else return"xl"};const s=["windowInnerWidth","windowInnerHeight","windowOuterWidth","windowOuterHeight","viewportWidth","viewportHeight","screenWidth","screenHeight","containerClientWidth","containerClientHeight"],l="undefined"!=typeof window,d="s3ac";class c{constructor(){this._commonCookieValueOptions={path:"/",expires:365}}_setCookie(e){if(n.cookie.get("adaptiveAspects"))n.cookie.remove("adaptiveAspects");if(n.cookie.get("s3aa"))n.cookie.remove("s3aa");if(n.cookie.get("s3ab"))n.cookie.remove("s3ab");const t=function(e){var t,i,n,o,r;return s.reduce(((t,i)=>t+(e[i]||"")+"!"),"")+function(e){return e.reduce(((e,t)=>e<<1|(t?1:0)),0)}([null!==(t=e.isTouch)&&void 0!==t?t:!1,null!==(i=e.isVertical)&&void 0!==i?i:!1,null!==(n=e.isPhone)&&void 0!==n?n:!1,null!==(o=e.isTablet)&&void 0!==o?o:!1,null!==(r=e.isMobileApp)&&void 0!==r?r:!1])}(e);if(n.cookie.get(d)!==t)n.cookie.remove(d),n.cookie.set(d,t,this._commonCookieValueOptions);if(e.containerClientWidth){const t=r(0,768,e.containerClientWidth)?"sm":r(768,1024,e.containerClientWidth)?"md":r(1024,1440,e.containerClientWidth)?"lg":"xl";if(n.cookie.get("s3bp")!==t)n.cookie.set("s3bp",t,this._commonCookieValueOptions)}}get(){if(l&&this._cachedValue)return this._cachedValue;const e=n.cookie.get(d);let t;try{t=e?function(e){const t=e.split("!");if(t.length!==s.length+1)throw new Error;const i={};for(let e=0;e<s.length;e++){const n=s[e];if(""===t[e])i[n]=void 0;else if(i[n]=Number.parseFloat(t[e]),Number.isNaN(i[n]))throw new Error}const n=Number.parseInt(t[s.length],10);if(Number.isNaN(n))throw new Error;const o=function(e){const t=e?[]:[!1];for(;e;)t.unshift(!(1&~e)),e>>=1;for(;t.length<4;)t.unshift(!1);return t}(n);return i.isTouch=o[0],i.isVertical=o[1],i.isPhone=o[2],i.isTablet=o[3],i.isMobileApp=o[4],i}(e):{}}catch(e){const i={};if(l)this._cachedValue=i;this._setCookie(i),t=i}
96if(l)this._cachedValue=t;return t}set(e){if(!l)return;if(window.self!==window.top)return;if(!(0,i.isNewEnvironment)())return;const t=this.get(),n={...t,...e};let o=!1;const r=Object.keys(e);for(const i of r)if(e[i]!==t[i])o=!0;if(o)this._cachedValue=n,this._setCookie(n)}_clear(){if(l)this._cachedValue=void 0;this._setCookie({})}static getInstance(){if(!c.instance)c.instance=new c;return c.instance}}return t.Storage=c,t}(0,{},o,h,a),b=w,y=w,m=function(e,t){"use strict";function i(e){return!!e&&"none"!==e&&"100%"!==e&&"auto"!==e&&""!==e}function n(e,t){return("overflow"===e||"overflowX"===e||"overflowY"===e)&&"hidden"===t}function o(e,t){var i;const n=Object.keys(g[t]);if(!n.length)return;const o={},r=e.style;for(const e of n)o[e]=r[e]||(null===(i=f[t])||void 0===i?void 0:i[e]);f[t]=o}function r(e,t,i=!1){const n=Object.keys(g[t]);if(!n.length)return;const o=i?f[t]:g[t],r=e.style;for(const t of n)if(o[t])r[t]=o[t];else e.style.removeProperty(t)}function s(){return{html:document.documentElement,body:document.body,content:document.getElementById("wasaby-content")}}function l(e,t){if(e.startsWith("overflow"))return!!t&&"visible"!==t;if("height"===e)return"auto"!==t;if("maxHeight"===e)return"none"!==t;if("display"===e)return"inline-block"===t;else return!1}function d(e,t){if("display"===e)return"block";if("height"===e||"maxHeight"===e)if(""===t||t.includes("calc"))return t;else return"auto";if("overflow"===e)return"visible";else return t}function c(e){const t=e.getPropertyValue("max-width"),n=e.getPropertyValue("width");return i(t)||i(n)}function a(){const{html:e,body:t,content:i}=s();if(o(e,"html"),r(e,"html"),o(t,"body"),r(t,"body"),i)o(i,"content"),r(i,"content");!function(){const e=Array.from(document.querySelectorAll("*"));for(const t of e){const e=getComputedStyle(t),i={},o=["overflow","overflowX","overflowY","height","maxHeight","display"];let r=!1;const s=c(e);for(const d of o){const o=e.getPropertyValue(d);if(!n(d,o)||!s)if(l(d,o))i[d]=t.style.getPropertyValue(d)||"",r=!0}if(r){h.set(t,i);for(const[e,n]of Object.entries(i)){if(v.includes(t.tagName))continue;const i=d(e,n);t.style.setProperty(e,i)}}}if(p)clearTimeout(p);p=setTimeout((()=>{u()}),1e3)}()}function u(){const{html:e,body:t,content:i}=s();if(r(e,"html",!0),r(t,"body",!0),i)r(i,"content",!0);!function(){for(const[e,t]of h)for(const[i,n]of Object.entries(t))if(void 0!==n)e.style.setProperty(i,n);else e.style.removeProperty(i);h.clear()}()}Object.defineProperty(t,"__esModule",{value:!0}),t.removePrintHandlers=t.addPrintHandlers=void 0;const h=new Map;let p=null;const v=["IMG"],f={html:{overflowY:"hidden",overflowAnchor:"auto"},body:{},content:{}},g={html:{overflowY:"auto",height:"auto",minHeight:"100dvh",overflowAnchor:"none"},body:{height:"auto",overflow:"visible"},content:{height:"auto",minHeight:"100vh",display:"flex",overflowY:"visible"}};return t.addPrintHandlers=function(){window.addEventListener("beforeprint",a),window.addEventListener("afterprint",u)},t.removePrintHandlers=function(){window.removeEventListener("beforeprint",a),window.removeEventListener("afterprint",u)},t}(0,{}),_=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScrollOnBodyContext=void 0;const n=i.createContext(void 0);return t.ScrollOnBodyContext=n,t}(0,{},t),C=_,A=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n="ScrollOnBodyStorage";class o{constructor(){this._store={}}get(e){return this._store[e]}set(e,t){return this._store[e]=t,!0}remove(e){delete this._store[e]}getKeys(){return Object.keys(this._store)}toObject(){return{...this._store}}}return t.default={init(){if(!((0,i.getStore)(n)instanceof o))(0,i.setStore)(n,new o)},read(e){return this.init(),(0,i.getStore)(n).get(e)},write(e,t){this.init(),(0,i.getStore)(n).set(e,t)},delete(e){(0,i.getStore)(n).remove(e)}},t}(0,{},h),M=A,S=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SearchParams=void 0;const i=e=>{let t="";try{t=decodeURIComponent(e.replace(/\+/g," "))}catch(e){}return t};return t.SearchParams=class{constructor(e){this.params=new Map,this.parse(e)}get(e){const t=this.params.get(e);if(!t)return null;if(Array.isArray(t))return t[0]||"";else return t}parse(e){const t=e.indexOf("?"),n=e.substring(t+1);if(!n.length)return;const o=n.split("&");for(const e of o){const[t,n]=e.split("=",2);if(void 0===n){this.addValue(t,"");continue}const o=i(t),r=i(n);this.addValue(o,r)}}addValue(e,t){const i=this.params.get(e);if(void 0!==i)if(Array.isArray(i))i.push(t);else this.params.set(e,[i,t]);else this.params.set(e,t)}},t}(0,{}),P=function(e,t,i,n,o){"use strict";
96return Object.defineProperty(t,"__esModule",{value:!0}),t.AdaptiveInitializerConfig=void 0,t.AdaptiveInitializerConfig=function(e){var t,r;const s=(0,o.useContext)(n.AdaptiveInitializerConfigContext),l=null!==(t=e.domElementWithSizes)&&void 0!==t?t:null==s?void 0:s.domElementWithSizes,d=null!==(r=e.isPhoneForced)&&void 0!==r?r:null==s?void 0:s.isPhoneForced,c=(0,o.useMemo)((()=>({domElementWithSizes:l,isPhoneForced:d})),[l,d]);return(0,i.jsx)(n.AdaptiveInitializerConfigContext.Provider,{value:c,children:e.children})},t}(0,{},e,f,t),O=P,W=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BodySizeTracker=void 0;const n=()=>{};class o{}class r extends o{constructor(e){super(),this.domElementWithSizes=e||document.body}_track(e){const t=getComputedStyle(this.domElementWithSizes),i=parseInt(t.getPropertyValue("padding-top"),10)||0,n=parseInt(t.getPropertyValue("padding-bottom"),10)||0,o=parseInt(t.getPropertyValue("padding-left"),10)||0,s=parseInt(t.getPropertyValue("padding-right"),10)||0,l=this.domElementWithSizes.clientWidth-o-s,d=this.domElementWithSizes.clientHeight-i-n;if(this.domElementWithSizes===document.body)r.getStorage().set({containerClientWidth:l,containerClientHeight:d});if(!this._cachedAspects||this._cachedAspects.containerClientWidth!==l||this._cachedAspects.containerClientHeight!==d)this._cachedAspects={containerClientWidth:l,containerClientHeight:d};e(this._cachedAspects)}check(e,t){if(this._track(e),"undefined"==typeof ResizeObserver)return n;if(!t)return n;const i=this._track.bind(this,e),o=new ResizeObserver(i);return o.observe(this.domElementWithSizes),()=>{o.unobserve(this.domElementWithSizes)}}static getStorage(){var e;return null!==(e=r._$storage)&&void 0!==e?e:i.Storage.getInstance()}}class s extends o{_track(e){const t=s.getStorage().get();e({containerClientWidth:(0,i.getWidth)(t,"containerClientWidth"),containerClientHeight:(0,i.getHeight)(t,"containerClientHeight")})}check(e,t){return this._track(e),n}static getStorage(){var e;return null!==(e=s._$storage)&&void 0!==e?e:i.Storage.getInstance()}}return t.BodySizeTracker="undefined"==typeof window?s:r,t}(0,{},w),I=function(e,t,i){"use strict";function n(){const e=document.activeElement,t="true"===e.getAttribute("contenteditable");if(l&&!d.includes(e.tagName)&&!t)e.blur(),l=!1}function o(){const e=window.visualViewport;if(e.width===s.width){if(e.height<s.height)l=!0}else r()}function r(){var e,t;s={height:null===(e=window.visualViewport)||void 0===e?void 0:e.height,width:null===(t=window.visualViewport)||void 0===t?void 0:t.width}}Object.defineProperty(t,"__esModule",{value:!0}),t.disableMobileKeyboardDetection=t.enableMobileKeyboardDetection=void 0;let s={height:0,width:0},l=!1;const d=["INPUT","TEXTAREA"];return t.enableMobileKeyboardDetection=function(){var e;if(i.default.read("enabled")&&window)r(),document.addEventListener("touchstart",n),null===(e=window.visualViewport)||void 0===e||e.addEventListener("resize",o)},t.disableMobileKeyboardDetection=function(){var e;if(i.default.read("enabled")&&window)document.removeEventListener("touchstart",n),null===(e=window.visualViewport)||void 0===e||e.removeEventListener("resize",o)},t}(0,{},A),H=function(e,t,i,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({children:e}){return(0,i.useEffect)((()=>((0,n.addPrintHandlers)(),()=>{(0,n.removePrintHandlers)()})),[]),e},t}(0,{},t,m),T=H,B=function(e,t,i,n){"use strict";function o(e){if(!e._$isScrollContainer)return;const t=e._container,i=t.firstChild,n=i.firstChild.firstChild;if(s(e,t))t.style.overflowY="auto",setTimeout((()=>{if(t.scrollHeight>window.visualViewport.height||e._isMasterScroll)!function(e){const t=t=>{e._scrollHandler(t)};if(y)return;window.addEventListener("scroll",t);const i=e._beforeUnmount;e._beforeUnmount=()=>{window.removeEventListener("scroll",t),y=!1,i()},y=!0}(e)}),0),r(e);if(s(e,i))i.style.overflowY="auto",r(e);if(s(e,n))n.style.height="auto",n.style.minHeight="100%",r(e)}function r(e){e.__$scrollOnBody=!0}function s(e,t){return t&&!e.__$scrollOnBody}function l(e,t){var i;const n=Object.keys(S[t]);if(!n.length)return;const o={};for(const r of n)o[r]=e.style[r]||(null===(i=M[t])||void 0===i?void 0:i[r]);M[t]=o}function d(e,t,i=!1){const n=Object.keys(S[t]);if(!n.length)return;const o=i?M[t]:S[t];for(const t of n)if(o[t])e.style[t]=o[t];else e.style.removeProperty(t)}function c(e=!1){if(e||!1===t.scrollOnBodyFrozen||!b||m)return!1;return document.documentElement.style.overflow="auto",t.scrollOnBodyFrozen=!1,!0}function a(e=!1){if(e||!0===t.scrollOnBodyFrozen||!b||m)return!1;return document.documentElement.style.overflow="hidden",t.scrollOnBodyFrozen=!0,!0}function u(){const e=document.documentElement,t=_.pop();if(void 0!==t)e.scrollTop=t}function h(e=void 0){if(P=e||P,!P||0===P.getCount())c(),u();else{const e=P.at(P.getCount()-1);if(0)return c(),void function(){const e=document.documentElement;_.push(e.scrollTop),e.scrollTop=0}();if("Notification"===e.controller.TYPE&&!0!==t.scrollOnBodyFrozen)return;if(function(e){let t=!0;return e.each(((e,i)=>{if("Notification"!==e.controller.TYPE)t=!1})),t}(P)&&!0===t.scrollOnBodyFrozen)return c(),void u();a()}}function p(e=!1){const t=a(e);if(t)m=!0;return t}function v(e=!1){m=!1;const t=c(e);if(t)u();return t}function f(e){if(!t.scrollOnBodyFrozen)if(function(){if(!i.detection.isMobileSafari||i.detection.IOSVersion<16)return!1;if(!P||0===(null==P?void 0:P.getCount()))return!1;const e=P.at(P.getCount()-1);return"SlidingPanel"===e.controller.TYPE&&!e.popupOptions.maximize}())if(!function(e){const t=e.touches[0],i=t.clientX-C,n=t.clientY-A;return Math.abs(n)<Math.abs(i)}(e))e.preventDefault()}function g(e){const t=document.querySelector(".controls-Popup");if(!(null==t?void 0:t.contains(e.target)))e.preventDefault()}function w(e){const t=e.touches[0];C=t.clientX,A=t.clientY}
96Object.defineProperty(t,"__esModule",{value:!0}),t.unFreezeBodyScrollManual=t.freezeBodyScrollManual=t.unMoveBodyScroll=t.moveBodyScroll=t.updateBodyScroll=t.applyBodyScroll=t.updateFreeze=t.withForceScrollUnfreeze=t.scrollOnBodyFrozen=void 0;let b=!1,y=!1,m=!1;const _=[];let C=0,A=0;const M={html:{overflowY:"hidden",overflowAnchor:"auto"},body:{},content:{}},S={html:{overflowY:"auto",height:"auto",minHeight:"100dvh",overflowAnchor:"none"},body:{height:"auto",overflow:"clip",paddingTop:"env(safe-area-inset-top)",paddingLeft:"env(safe-area-inset-left)",paddingRight:"env(safe-area-inset-right)",paddingBottom:"env(safe-area-inset-bottom)"},content:{height:"auto",minHeight:i.detection.isMobileSafari&&15===i.detection.IOSVersion?"100vh":"100dvh",display:"flex",overflowY:"clip"}};let P;return t.withForceScrollUnfreeze=function(e){const i=t.scrollOnBodyFrozen;if(i)t.scrollOnBodyFrozen=!1;e(),t.scrollOnBodyFrozen=i},t.updateFreeze=h,t.applyBodyScroll=function(e){!function(e){if(s(e,e._container))r(e)}(e),o(e),function(e){if(!e._$isPopupContainer)return;const t=e._container;if(s(e,t)&&"100%"===t.style.height)t.style.height="100vh",r(e)}(e)},t.updateBodyScroll=function(){if(n.default.read("enabled"))!function(){if(b)return;const e=document.documentElement,t=document.body,i=document.getElementById("wasaby-content");if(l(e,"html"),d(e,"html"),l(t,"body"),d(t,"body"),i)l(i,"content"),d(i,"content");b=!0,document.body.addEventListener("touchstart",w),document.body.addEventListener("touchmove",f,{passive:!1})}(),t.scrollOnBodyFrozen=void 0,h();else c(),function(){if(!b)return;const e=document.documentElement,t=document.body,i=document.getElementById("wasaby-content");d(e,"html",!0),d(t,"body",!0),d(i,"content",!0),document.body.removeEventListener("touchstart",w),document.body.removeEventListener("touchmove",f),b=!1}()},t.moveBodyScroll=p,t.unMoveBodyScroll=v,t.freezeBodyScrollManual=function(){if(p(!0)&&i.detection.IOSVersion<17)document.scrollingElement.addEventListener("touchmove",g,{passive:!1})},t.unFreezeBodyScrollManual=function(){if(v(!0)&&i.detection.IOSVersion<17)document.scrollingElement.remove("touchmove",g)},t}(0,{},a,A),E=B,z=function(e,t,i,n,o){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.ScrollOnBodyContextProvider=void 0,t.ScrollOnBodyContextProvider=function({isScrollOnBody:e,children:t}){const r=(0,n.useMemo)((()=>({isScrollOnBody:e})),[e]);return(0,i.jsx)(o.ScrollOnBodyContext.Provider,{value:r,children:t})},t}(0,{},e,t,_),x=z,k=function(e,t,i,n,o){"use strict";function r(e){return"Notification"===e.controller.TYPE}function s(e,t){if(!e||0===e.getCount())return!1;if(r(e.at(e.getCount()-1))&&!0!==t)return t;if(function(e){let t=!0;return e.each((e=>{if(!r(e))t=!1})),t}(e)&&!0===t)return!1;else return!0}return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=n.default.read("enabled"),[t,r]=(0,i.useState)(!1),l=(0,i.useRef)(void 0);return(0,i.useEffect)((()=>{if(!e)return l.current=!1,void r(!1);const t=o.Bus.channel("popupManager"),i=(e,t,i)=>{l.current=s(i,l.current),r(!!l.current)};return t.subscribe("managerPopupCreated",i),t.subscribe("managerPopupDestroyed",i),()=>{t.unsubscribe("managerPopupCreated",i),t.unsubscribe("managerPopupDestroyed",i)}}),[e]),e&&t},t}(0,{},t,A,c),F=k,j=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WindowSizeTracker=void 0;const n=()=>{};class o{}class r extends o{constructor(e){super(),this.domElementWithSizes=e||document.body}_track(e){var t,i,n,o,s,l,d,c,a,u,h,p,v,f,g,w;const b=null!==(t=r._$unit_width)&&void 0!==t?t:window.innerWidth,y=null!==(i=r._$unit_height)&&void 0!==i?i:window.innerHeight,m=null!==(n=r._$unit_width)&&void 0!==n?n:window.outerWidth,_=null!==(o=r._$unit_height)&&void 0!==o?o:window.outerHeight,C=null!==(d=null!==(s=r._$unit_width)&&void 0!==s?s:null===(l=window.visualViewport)||void 0===l?void 0:l.width)&&void 0!==d?d:0,A=null!==(u=null!==(c=r._$unit_height)&&void 0!==c?c:null===(a=window.visualViewport)||void 0===a?void 0:a.height)&&void 0!==u?u:0,M=null!==(v=null!==(h=r._$unit_width)&&void 0!==h?h:null===(p=window.screen)||void 0===p?void 0:p.width)&&void 0!==v?v:0,S=null!==(w=null!==(f=r._$unit_height)&&void 0!==f?f:null===(g=window.screen)||void 0===g?void 0:g.height)&&void 0!==w?w:0;if(this.domElementWithSizes===document.body)r.getStorage().set({windowInnerWidth:b,windowInnerHeight:y,windowOuterWidth:m,windowOuterHeight:_,viewportWidth:C,viewportHe
96ight:A,screenWidth:M,screenHeight:S});if(!this._cachedAspects||this._cachedAspects.windowInnerWidth!==b||this._cachedAspects.windowInnerHeight!==y||this._cachedAspects.windowOuterWidth!==m||this._cachedAspects.windowOuterHeight!==_||this._cachedAspects.viewportWidth!==C||this._cachedAspects.viewportHeight!==A||this._cachedAspects.screenWidth!==M||this._cachedAspects.screenHeight!==S)this._cachedAspects={windowInnerWidth:b,windowInnerHeight:y,windowOuterWidth:m,windowOuterHeight:_,viewportWidth:C,viewportHeight:A,screenWidth:M,screenHeight:S};e(this._cachedAspects)}check(e,t){if(this._track(e),window.self!==window.top)return n;if(!t)return n;const i=this._track.bind(this,e),o=this._track.bind(this,e);return window.addEventListener("resize",o),window.addEventListener("beforeunload",i),()=>{window.removeEventListener("resize",o),window.removeEventListener("beforeunload",i)}}static getStorage(){var e;return null!==(e=r._$storage)&&void 0!==e?e:i.Storage.getInstance()}}class s extends o{_track(e){const t=s.getStorage().get();e({windowInnerWidth:(0,i.getWidth)(t,"windowInnerWidth"),windowInnerHeight:(0,i.getHeight)(t,"windowInnerHeight"),windowOuterWidth:(0,i.getWidth)(t,"windowOuterWidth"),windowOuterHeight:(0,i.getHeight)(t,"windowOuterHeight"),viewportWidth:(0,i.getWidth)(t,"viewportWidth"),viewportHeight:(0,i.getHeight)(t,"viewportHeight"),screenWidth:(0,i.getWidth)(t,"screenWidth"),screenHeight:(0,i.getHeight)(t,"screenHeight")})}check(e,t){return this._track(e),n}static getStorage(){var e;return null!==(e=s._$storage)&&void 0!==e?e:i.Storage.getInstance()}}return t.WindowSizeTracker="undefined"==typeof window?s:r,t}(0,{},w),V=j,D=function(e,t,i,n,o,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=function(e){const t=new WeakMap,l=null===window||void 0===window?void 0:window.document;let d=!1;const c=(0,i.useCallback)((()=>{const e=r.location.href;let t=!1;return[/class\.sbis\.ru/,/class\.saby\.ru/].find((i=>{if(-1!==e.search(i))return t=!0,!0})),t}),[]),a=(0,i.useCallback)((e=>{var i;if(!o.default.read("enabled")||n.scrollOnBodyFrozen)return;const r=e.detail[0],a=e.detail[1],u=r._nativeEvent.detail.control,h=u._container.querySelector('[name="userContent"]');if(!window.visualViewport||h.scrollHeight<(null===(i=window.visualViewport)||void 0===i?void 0:i.height))return;if((0,s.goUpByControlTree)(u._container.parentElement).some((e=>"Controls/scroll:Container"===e._moduleName)))return;const p={};for(const e of Object.keys(a)){const t=e.split(":")[1],i=function(t){if(n.scrollOnBodyFrozen)return;const i=t.detail?t.detail:arguments;a[e].apply(u,[...i])};l.addEventListener(t,i);const o=e=>{if(e.stopImmediatePropagation(),e.currentTarget instanceof HTMLElement&&e.currentTarget.parentElement&&e.createEvent){e.currentTarget.parentElement.dispatchEvent(e.createEvent())}};u._container.firstChild.addEventListener(t,o,c()),p[t]=i}t.set(u,p),u._container.firstChild._$hasProxyEvent=!0,u.__scrollOnBody=!0,e.stopPropagation(),d=!0}),[]),u=(0,i.useCallback)((e=>{if(!d)return;const i=(e._nativeEvent||e).detail.control;if(!i._container.firstChild._$hasProxyEvent)return;const n=t.get(i);if(n){for(const e of Object.keys(n))l.removeEventListener(e,n[e]);t.delete(i),e.stopPropagation(),d=!1}}),[]);return(0,i.useEffect)((()=>(null==l||l.addEventListener("createChildrenScroll",a),null==l||l.addEventListener("destroyChildrenScroll",u),()=>{null==l||l.removeEventListener("createChildrenScroll",a),null==l||l.removeEventListener("destroyChildrenScroll",u)})),[]),e.children},t}(0,{},t,B,A,h,r),L=D,N=function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SizeTracker=void 0;return t.SizeTracker=class{constructor(e){this.windowSizeTracker=new n.WindowSizeTracker(e),this.bodySizeTracker=new o.BodySizeTracker(e)}check(e,t=!1){const n="undefined"!=typeof window?(0,i.debounce)(e,400):e;let o={},r={};const s=this.windowSizeTracker.check((e=>{o=e,n({...o,...r})}),t),l=this.bodySizeTracker.check((e=>{r=e,n({...o,...r})}),t);return e({...o,...r}),()=>{s(),l()}}},t}(0,{},l,j,W),U=function(e,t,i,n,o,r,s){"use strict";function l(){var e;return i.detection.isMobilePlatform||("undefined"!=typeof window?null==a?void 0:a.isTouch():null===(e=n.Storage.getInstance().get())||void 0===e?void 0:e.isTouch)||!1}
96Object.defineProperty(t,"__esModule",{value:!0}),t.AdaptiveModeClass=t.Size=void 0;class d{constructor(e){var t;this.value=null!==(t=e.value)&&void 0!==t?t:0,this.valueMayBeIncorrect=e.valueMayBeIncorrect}up(e){return e<=this.value}between(e,t){return(0,n.between)(e,t,this.value)}toDefaultBreakpoint(){return(0,n.toDefaultBreakpoint)(this.value)}}t.Size=d;class c{constructor({isVertical:e}){if("boolean"==typeof e)this._isVertical=e;else if("undefined"!=typeof window)this._isVertical="portrait"===i.experimental.Screen.detectOrientation(window),n.Storage.getInstance().set({isVertical:this._isVertical});else this._isVertical=n.Storage.getInstance().get().isVertical}isHorizontal(){return"boolean"==typeof this._isVertical?!this._isVertical:void 0}isVertical(){return this._isVertical}}let a;if("undefined"!=typeof window)a=o.TouchDetect.getInstance();class u{constructor({isPhone:e,isTablet:t,isTouch:o}){const s=i.detection.isMobilePlatform&&i.detection.isPhone,d=i.detection.isMobilePlatform&&!i.detection.isPhone,c=l();if(this._isPhone=null!=e?e:s,this._isPhone=this._isPhone&&"false"!==r.cookie.get("useAdaptive"),this._isTablet=null!=t?t:d,this._isTouch=null!=o?o:c,"undefined"!=typeof window)n.Storage.getInstance().set({isPhone:s,isTablet:d,isTouch:c})}isPhone(){return this._isPhone}isTablet(){return this._isTablet}isTouch(){return this._isTouch}}class h{constructor({isMobileApp:e}){const t=h.regexp.test(i.detection.userAgent);if(this._isMobileApp=null!=e?e:t,"undefined"!=typeof window)n.Storage.getInstance().set({isMobileApp:t})}isMobileApp(){return this._isMobileApp}isBrowser(){return!this._isMobileApp}}h.regexp=/(Sbis|Saby).*Mobile/i;class p{constructor(e){this._aspects=e;const t=n.Storage.getInstance().get(),o=!(!(null==t?void 0:t.hasOwnProperty("windowInnerWidth"))||!(null==t?void 0:t.hasOwnProperty("windowInnerHeight"))),r=!i.constants.isBrowserPlatform&&!o;this.width=new d({value:e.containerClientWidth,valueMayBeIncorrect:r}),this.height=new d({value:e.containerClientHeight,valueMayBeIncorrect:r}),this.container={clientWidth:new d({value:e.containerClientWidth,valueMayBeIncorrect:r}),clientHeight:new d({value:e.containerClientHeight,valueMayBeIncorrect:r})},this.window={innerWidth:new d({value:e.windowInnerWidth,valueMayBeIncorrect:r}),innerHeight:new d({value:e.windowInnerHeight,valueMayBeIncorrect:r}),outerWidth:new d({value:e.windowOuterWidth,valueMayBeIncorrect:r}),outerHeight:new d({value:e.windowOuterHeight,valueMayBeIncorrect:r}),viewportWidth:new d({value:e.viewportWidth,valueMayBeIncorrect:r}),viewportHeight:new d({value:e.viewportHeight,valueMayBeIncorrect:r}),screenWidth:new d({value:e.screenWidth,valueMayBeIncorrect:r}),screenHeight:new d({value:e.screenHeight,valueMayBeIncorrect:r})},this.orientation=new c({isVertical:e.isVertical}),this.device=new u({isPhone:e.isPhone,isTablet:e.isTablet,isTouch:e.isTouch}),this.environment=new h({isMobileApp:e.isMobileApp}),e.isVertical=this.orientation.isVertical(),e.isPhone=this.device.isPhone(),e.isTablet=this.device.isTablet(),e.isTouch=this.device.isTouch(),e.isMobileApp=this.environment.isMobileApp()}_cloneIfNeed(e){var t,i,n,o,r,s,d,c,a,u,h,v,f,g,w;if(!e)return this;const b={windowInnerWidth:null!==(t=e.windowInnerWidth)&&void 0!==t?t:this._aspects.windowInnerWidth,windowInnerHeight:null!==(i=e.windowInnerHeight)&&void 0!==i?i:this._aspects.windowInnerHeight,windowOuterWidth:null!==(n=e.windowOuterWidth)&&void 0!==n?n:this._aspects.windowOuterWidth,windowOuterHeight:null!==(o=e.windowOuterHeight)&&void 0!==o?o:this._aspects.windowOuterHeight,viewportWidth:null!==(r=e.viewportWidth)&&void 0!==r?r:this._aspects.viewportWidth,viewportHeight:null!==(s=e.viewportHeight)&&void 0!==s?s:this._aspects.viewportHeight,screenWidth:null!==(d=e.screenWidth)&&void 0!==d?d:this._aspects.screenWidth,screenHeight:null!==(c=e.screenHeight)&&void 0!==c?c:this._aspects.screenHeight,containerClientWidth:null!==(a=e.containerClientWidth)&&void 0!==a?a:this._aspects.containerClientWidth,containerClientHeight:null!==(u=e.containerClientHeight)&&void 0!==u?u:this._aspects.containerClientHeight,isTouch:null!==(h=e.isTouch)&&void 0!==h?h:this._aspects.isTouch,isVertical:null!==(v=e.isVertical)&&void 0!==v?v:this._aspects.isVertical,isPhone:null!==(f=e.isPhone)&&void 0!==f?f:this._aspects.isPhone,isTablet:null!==(g=e.isTablet)&&void 0!==g?g:this._aspects.isTablet,isMobileApp:null!==(w=e.isMobileApp)&&void 0!==w?w:this._aspects.isMobileApp},y=this._aspects;if(y.windowInnerWidth!==b.windowInnerWidth||y.windowInnerHeight!==b.windowInnerHeight||y.windowOuterWidth!==b.windowOuterWidth||y.windowOuterHeight!==b.windowOuterHeight||y.viewportWidth!==b.viewportWidth||y.viewportHe
96ight!==b.viewportHeight||y.screenWidth!==b.screenWidth||y.screenHeight!==b.screenHeight||y.containerClientWidth!==b.containerClientWidth||y.containerClientHeight!==b.containerClientHeight||y.isVertical!==b.isVertical||y.isPhone!==b.isPhone||y.isTablet!==b.isTablet||y.isTouch!==b.isTouch||void 0===y.isTouch&&this.device.isTouch()!==l()||y.isMobileApp!==b.isMobileApp)return new p(b);else return this}toJSON(){const e=(0,r.getStore)("AdaptiveModeClass").get("count")||"0",t=parseInt(e,10)+1;return(0,r.getStore)("AdaptiveModeClass").set("count",t+""),{$serialized$:"inst",module:"UICore/Adaptive:_AdaptiveModeClass",id:"am_"+t,state:{containerClientWidth:this.container.clientWidth.valueMayBeIncorrect?void 0:this.container.clientWidth.value,containerClientHeight:this.container.clientHeight.valueMayBeIncorrect?void 0:this.container.clientHeight.value}}}static fromJSON(e){var t,i;let n={};(new s.SizeTracker).check((e=>{n=e}))();const o=n;return o.containerClientWidth=null!==(t=e.state.containerClientWidth)&&void 0!==t?t:o.containerClientWidth,o.containerClientHeight=null!==(i=e.state.containerClientHeight)&&void 0!==i?i:o.containerClientHeight,new p(o)}}return t.AdaptiveModeClass=p,t}(0,{},a,w,d,h,N),$=U,R=function(e,t,i,n){"use strict";let o;Object.defineProperty(t,"__esModule",{value:!0}),t.AdaptiveModeContext=t.getDefaultAdaptiveMode=void 0,t.getDefaultAdaptiveMode=function(){if(!o)o=new n.AdaptiveModeClass({});return o};const r=i.createContext(void 0);return t.AdaptiveModeContext=r,t}(0,{},t,U),K=function(e,t,i,n,o){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.AdaptiveModeContextProvider=void 0,t.AdaptiveModeContextProvider=function({adaptiveMode:e,children:t}){const r=(0,n.useMemo)((()=>({adaptiveMode:e})),[e]);return(0,i.jsx)(o.AdaptiveModeContext.Provider,{value:r,children:t})},t}(0,{},e,t,R),Y=function(e,t,i,n,o,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.DeprecatedAdaptiveModeContextProvider=void 0,t.DeprecatedAdaptiveModeContextProvider=function({adaptiveMode:e,children:t}){const s=(0,n.useContext)((0,o.getWasabyContext)()),l=e.device.isPhone()||s.isAdaptive,d=e._cloneIfNeed({isPhone:l}),c=(0,n.useMemo)((()=>({adaptiveMode:d})),[d]);return(0,i.jsx)(o.WasabyContextManager,{isAdaptive:l,children:(0,i.jsx)(r.AdaptiveModeContext.Provider,{value:c,children:t})})},t}(0,{},e,t,n,R),q=function(e,t,i,n,o,r){"use strict";function s(e){if(!e)o.logger.warn("UI/Adaptive warn: конÑекÑÑ Ð½Ðµ бÑл иниÑиализиÑован. Ðак ÑледÑÑвие, адапÑивноÑÑÑ Ð±ÑÐ´ÐµÑ ÑабоÑаÑÑ Ð½ÐµÐºÐ¾ÑÑекÑно. ÐÑо бÑваеÑ, когда на ÑÑÑаниÑе Ð½ÐµÑ UI/Bootstrap (вÑÑалвÑеÑÑÑ Ð² SbisEnvUI/Bootstrap, на pagex-ÑÑÑаниÑаÑ
, либо надо вÑÑÑнÑÑ Ð¾Ð±Ð¾ÑаÑиваÑÑ ÐºÐ¾ÑÐµÐ½Ñ ÑÑÑаниÑÑ, в Ñом ÑиÑле в ÑниÑаÑ
и демкаÑ
). ")}return Object.defineProperty(t,"__esModule",{value:!0}),t.useAdaptiveMode=t.withAdaptiveMode=void 0,t.withAdaptiveMode=function(e){const t=e.displayName||e.name||"Component";class o extends n.Component{constructor(e){super(e),this.ref=this.ref.bind(this)}ref(e){this._$child=e}render(){var t;const n=null===(t=this.context)||void 0===t?void 0:t.adaptiveMode;return s(n),(0,i.jsx)(e,{...this.props,ref:this.ref,adaptiveMode:n})}}return o.contextType=r.AdaptiveModeContext,o.displayName=`withAdaptiveMode(${t})`,o.getDefaultOptions=e.getDefaultOptions,o._getDefaultOptions=e._getDefaultOptions,o.defaultProps=e.defaultProps,o.getOptionTypes=e.getOptionTypes,o._styles=e._styles,o},t.useAdaptiveMode=function(e=!1){var t;const i=null===(t=(0,n.useContext)(r.AdaptiveModeContext))||void 0===t?void 0:t.adaptiveMode;if(!e)s(i);return null!=i?i:(0,r.getDefaultAdaptiveMode)()},t}(0,{},e,t,h,R),X=q,J=function(e,t,i,n,o,r,s,l,d,c,a,u,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AdaptiveContainer=void 0;class p extends n.PureComponent{constructor(e){super(e),this._errorIsShown=!1;const t=u.cookie.get("s3debug");if(this._isDebug=!!t&&"false"!==t,this._isDebug){const t=(0,a.createRef)();
96this._containerRef=t,this._ref=h.ChainOfRef.both(e.forwardedRef,t)}}_switchBiggerFonts(){if(!p._$temp_flag_to_disable_bigger_fonts_for_sabyget_only){if(!this._enableBiggerFontsForPhones&&c.detection.isPhone)d.Body.getInstance().addClass("_enable-bigger-fonts-for-phones"),this._enableBiggerFontsForPhones=!0;if(this._enableBiggerFontsForPhones&&!c.detection.isPhone)d.Body.getInstance().removeClass("_enable-bigger-fonts-for-phones"),this._enableBiggerFontsForPhones=!1}}checkValues(){var e,t,i;const n=this._aspects;if("number"!=typeof n.containerClientWidth||n.containerClientWidth<0)u.logger.error("incorrect value of aspects.containerClientWidth. value = "+n.containerClientWidth);if("number"!=typeof n.containerClientHeight||n.containerClientHeight<0)u.logger.error("incorrect value of aspects.containerClientHeight. value = "+n.containerClientHeight);if("number"!=typeof n.windowInnerWidth||n.windowInnerWidth<0)u.logger.error("incorrect value of aspects.windowInnerWidth. value = "+n.windowInnerWidth);if("number"!=typeof n.windowInnerHeight||n.windowInnerHeight<0)u.logger.error("incorrect value of aspects.windowInnerHeight. value = "+n.windowInnerHeight);if("number"!=typeof n.windowOuterWidth||n.windowOuterWidth<0)u.logger.error("incorrect value of aspects.windowOuterWidth. value = "+n.windowOuterWidth);if("number"!=typeof n.windowOuterHeight||n.windowOuterHeight<0)u.logger.error("incorrect value of aspects.windowOuterHeight. value = "+n.windowOuterHeight);if("number"!=typeof n.viewportWidth||n.viewportWidth<0)u.logger.error("incorrect value of aspects.viewportWidth. value = "+n.viewportWidth);if("number"!=typeof n.viewportHeight||n.viewportHeight<0)u.logger.error("incorrect value of aspects.viewportHeight. value = "+n.viewportHeight);if("boolean"!=typeof n.isTouch&&void 0!==n.isTouch)u.logger.error("incorrect value of aspects.isTouch. value = "+n.isTouch);if("boolean"!=typeof n.isMobileApp&&void 0!==n.isMobileApp)u.logger.error("incorrect value of aspects.isMobileApp. value = "+n.isMobileApp);if("boolean"!=typeof n.isVertical&&void 0!==n.isVertical)u.logger.error("incorrect value of aspects.isVertical. value = "+n.isVertical);if("boolean"!=typeof n.isPhone&&void 0!==n.isPhone)u.logger.error("incorrect value of aspects.isPhone. value = "+n.isPhone);if("boolean"!=typeof n.isTablet&&void 0!==n.isTablet)u.logger.error("incorrect value of aspects.isTablet. value = "+n.isTablet);const o=null===(e=this._containerRef)||void 0===e?void 0:e.current;if(this._isDebug&&(null==o?void 0:o.children.length)&&!this._errorIsShown){const e=this.props.width||this.props.containerClientWidth;if("number"==typeof e){const i=(null===(t=o.parentElement)||void 0===t?void 0:t.clientWidth)||0,n=o.children[0].clientWidth;if(Math.abs(i-e)>1&&Math.abs(n-e)>1)this._errorIsShown=!0,u.logger.warn(`incorrect value of aspects.containerClientWidth.\n value = ${e}\n correct container.clientWidth value = ${i}`);const r=o.getAttribute("data-width"),s=r?parseFloat(r):void 0;if(r&&e!==s)u.logger.warn(`Ðа ÑеÑвеÑе и клиенÑе бÑло вÑÑÑавлено Ñазное знаÑение width.\n ÐÑо Ð¼Ð¾Ð¶ÐµÑ Ð¿Ð¾Ð²Ð»ÐµÑÑ ÑазлиÑÐ¸Ñ Ð² веÑÑÑке и ÑломаÑÑ Ð³Ð¸Ð´ÑаÑаÑиÑ.\n знаÑение на ÑеÑвеÑе = ${s}\n знаÑение на клиенÑе = ${e}`)}const n=this.props.height||this.props.containerClientHeight;if("number"==typeof n){const e=(null===(i=o.parentElement)||void 0===i?void 0:i.clientHeight)||0,t=o.children[0].clientHeight;if(Math.abs(e-n)>1&&Math.abs(t-n)>1)this._errorIsShown=!0,u.logger.warn(`incorrect value of aspects.containerClientHeight.\n value = ${n}\n correct container.clientHeight value = ${e}`);const r=o.getAttribute("data-height"),s=r?parseFloat(r):void 0;if(r&&n!==s)u.logger.warn(`Ðа ÑеÑвеÑе и клиенÑе бÑло вÑÑÑавлено Ñазное знаÑение height.\n ÐÑо Ð¼Ð¾Ð¶ÐµÑ Ð¿Ð¾Ð²Ð»ÐµÑÑ ÑазлиÑÐ¸Ñ Ð² веÑÑÑке и ÑломаÑÑ Ð³Ð¸Ð´ÑаÑаÑиÑ.\n знаÑение на ÑеÑвеÑе = ${s}\n знаÑение на клиенÑе = ${n}`)}}}componentDidMount(){this.checkValues()}componentDidUpdate(){this.checkValues()}_renderWithAdaptiveMode(e){if(void 0!==this.props.deltaWidth||void 0!==this.props.deltaHeight)return(0,i.jsx)(l.AdaptiveModeContextProvider,{adaptiveMode:this._cachedAdaptiveMode,children:e});else return(0,i.jsx)(s.DeprecatedAdaptiveModeContextProvider,{adaptiveMode:this._cachedAdaptiveMode,children:e})}render(){var e,t,n,o,s,l,d,c,u,h,p,v,f,g,w,b,y,m,_,C;if(!this.props.children)return null;const A=null===(e=this.context)||void 0===e?void 0:e.adaptiveMode;if(this._aspects={containerClientWidth:null!==(n=null!==(t=this.props.width)&&void 0!==t?t:this.props.containerClientWidth)&&void 0!==n?n:"number"==typeof(null==A?void 0:A.container.clientWidth.value)?A.container.clientWidth.value+(null!==(o=this.props.deltaWidth)&&void 0!==o?o:0):void 0,containerClientHeight:null!==(l=null!==(s=this.props.height)&&void 0!==s?s:this.props.containerClientHeight)&&void 0!==l?l:"number"==typeof(null==A?void 0:A.container.clientHeight.value)?A.container.clientHeight.value+(null!==(d=this.props.deltaHeight)&&void 0!==d?d:0):void 0,windowInnerWidth:null!==(c=this.props.windowInnerWidth)&&void 0!==c?c:null==A?void 0:A.window.innerWidth.value,windowInnerHeight:null!==(u=this.props.windowInnerHeight)&&void 0!==u?u:null==A?void 0:A.window.innerHeight.value,windowOuterWidth:null!==(h=this.props.windowOuterWidth)&&void 0!==h?h:null==A?void 0:A.window.outerWidth.value,windowOuterHeight:null!==(p=this.props.windowOuterHeight)&&void 0!==p?p:null==A?void 0:A.window.outerHeight.value,viewportWidth:null!==(v=this.props.viewportWidth)&&void 0!==v?v:null==A?void 0:A.window.viewportWidth.value,viewportHe
96ight:null!==(f=this.props.viewportHeight)&&void 0!==f?f:null==A?void 0:A.window.viewportHeight.value,screenWidth:null!==(g=this.props.screenWidth)&&void 0!==g?g:null==A?void 0:A.window.screenWidth.value,screenHeight:null!==(w=this.props.screenHeight)&&void 0!==w?w:null==A?void 0:A.window.screenHeight.value,isTouch:null!==(b=this.props.isTouch)&&void 0!==b?b:null==A?void 0:A.device.isTouch(),isVertical:null!==(y=this.props.isVertical)&&void 0!==y?y:null==A?void 0:A.orientation.isVertical(),isPhone:null!==(m=this.props.isPhone)&&void 0!==m?m:null==A?void 0:A.device.isPhone(),isTablet:null!==(_=this.props.isTablet)&&void 0!==_?_:null==A?void 0:A.device.isTablet(),isMobileApp:null!==(C=this.props.isMobileApp)&&void 0!==C?C:null==A?void 0:A.environment.isMobileApp()},this._cachedAdaptiveMode=this._cachedAdaptiveMode?this._cachedAdaptiveMode._cloneIfNeed(this._aspects):new r.AdaptiveModeClass(this._aspects),this._switchBiggerFonts(),this._isDebug)return(0,i.jsx)("div",{style:{display:"contents",width:"100%",height:"100%"},"data-width":this._aspects.containerClientWidth,"data-height":this._aspects.containerClientHeight,ref:this._ref,children:this._renderWithAdaptiveMode(this.props.children)});const M=this.props.children,S=!(0,a.isValidElement)(M)?M:(0,a.cloneElement)(M,{ref:this.props.forwardedRef});return this._renderWithAdaptiveMode(S)}}return t.AdaptiveContainer=p,p.contextType=o.AdaptiveModeContext,p._$temp_flag_to_disable_bigger_fonts_for_sabyget_only=!1,p.displayName="UI/Adaptive:AdaptiveContainer",t}(0,{},e,t,R,U,Y,K,u,a,t,h,i),G=J,Q=function(e,t,i,n,o,r,s,l,d,c,a,u,h,p,v,f,g,w,b,y,m,_){"use strict";function C(e){if("true"===e)return!0;if("false"===e)return!1;else return}function A(e){var t,i;let n="";try{n=f.location.href}catch(e){d.IoC.resolve("ILogger").error("AdaptiveInitializer. Ðе полÑÑилоÑÑ Ð²ÑÑиÑлиÑÑ Application/Env:location.href",e)}const o={},r=new s.SearchParams(n),l=r.get("width"),c=r.get("height"),a=r.get("isVertical"),u=null!==(i=null!==(t=r.get("isPhone"))&&void 0!==t?t:(0,w.getStore)("AdaptiveInitializer").get("isAdaptive"))&&void 0!==i?i:e+"",h=r.get("isTablet"),p=r.get("isTouch"),v=r.get("isMobileApp");if("string"==typeof l)o.containerClientWidth=parseInt(l,10);if("string"==typeof c)o.containerClientHeight=parseInt(c,10);return o.isVertical=C(a),o.isPhone=C(u),o.isTablet=C(h),o.isTouch=C(p),o.isMobileApp=C(v),o}let M;if(Object.defineProperty(t,"__esModule",{value:!0}),t._clearCache=t.getAdaptiveModeForLoaders=t.AdaptiveInitializer=t.AdaptiveInitializerInner=void 0,"undefined"!=typeof window)M=a.TouchDetect.getInstance();class S extends l.Component{constructor(e,t){super(e),this.unmounted=!1;if(void 0===(0,w.getStore)("AdaptiveInitializer").get("isAdaptive")&&void 0!==t.isAdaptive)(0,w.getStore)("AdaptiveInitializer").set("isAdaptive",t.isAdaptive+"");this._forcedAspects=A(e.isPhoneForced),this.popupManagerChannel=c.Bus.channel("popupManager");const i=new o.SizeTracker(e.domElementWithSizes);let n={};this.stopSizeChecking=i.check((e=>{var t;if(n=e,!1===(null===(t=this.state)||void 0===t?void 0:t.preload)&&!this.unmounted){const e={...this.state.aspects,...n,...this._forcedAspects};if(!(0,_.isEqual)(e,this.state.aspects))this.setState({aspects:e})}}),!0),this.state={preload:!0,aspects:{...n,...this._forcedAspects}}}touchChangedHandler(e,t){var i;if(!1===(null===(i=this.state)||void 0===i?void 0:i.preload))if("boolean"!=typeof this._forcedAspects.isTouch)if(this.state.aspects.isTouch!==t){const e={...this.state.aspects};e.isTouch=t,this.setState({aspects:e})}}subscribeToPopupManager(){if(b.default.read("enabled"))this.popupManagerChannel.subscribe("managerPopupCreated",this.updateFreeze,this),this.popupManagerChannel.subscribe("managerPopupDestroyed",this.updateFreeze,this)}unsubscribeToPopupManager(){if(b.default.read("enabled"))this.popupManagerChannel.unsubscribe("managerPopupCreated",this.updateFreeze,this),this.popupManagerChannel.unsubscribe("managerPopupDestroyed",this.updateFreeze,this)}updateFreeze(e,t,i){(0,p.updateFreeze)(i)}componentDidMount(){this.setState({preload:!1}),(0,p.updateBodyScroll)(),(0,v.enableMobileKeyboardDetection)(),this.touchChangedH
96andler=this.touchChangedHandler.bind(this),null==M||M.subscribe("touchChanged",this.touchChangedHandler),this.subscribeToPopupManager()}componentDidUpdate(){(0,p.updateBodyScroll)()}componentWillUnmount(){null==M||M.unsubscribe("touchChanged",this.touchChangedHandler),(0,v.disableMobileKeyboardDetection)(),this.stopSizeChecking(),this.unsubscribeToPopupManager(),this.unmounted=!0}render(){if((0,w.getStore)("AdaptiveInitializer").set("isScrollOnBody",this.context.isScrollOnBody),"undefined"!=typeof window){if(this._forcedAspects.containerClientWidth)document.body.style.width=this._forcedAspects.containerClientWidth+"px";if(this._forcedAspects.containerClientHeight)document.body.style.height=this._forcedAspects.containerClientHeight+"px"}return(0,i.jsx)(r.AdaptiveContainer,{...this.state.aspects,children:this.props.children})}}return t.AdaptiveInitializerInner=S,S.contextType=(0,g.getWasabyContext)(),t.AdaptiveInitializer=(0,l.forwardRef)((function(e,t){const n=(0,l.useContext)(h.AdaptiveInitializerConfigContext),o=(0,y.useAdaptiveMode)(!0);if(o&&o!==(0,m.getDefaultAdaptiveMode)())return e.children;else return(0,i.jsx)(S,{...e,domElementWithSizes:null==n?void 0:n.domElementWithSizes,isPhoneForced:null==n?void 0:n.isPhoneForced,forwardedRef:t})})),t.getAdaptiveModeForLoaders=function(){const e=(0,w.getStore)("AdaptiveInitializer").get("getAdaptiveModeForLoaders_cache");if(e){const t=n.Storage.getInstance().get(),i=e._cloneIfNeed(t);return(0,w.getStore)("AdaptiveInitializer").set("getAdaptiveModeForLoaders_cache",i),e}let t={};(new o.SizeTracker).check((e=>{t=e}))();const i={...t,...A()},r=new u.AdaptiveModeClass(i);return(0,w.getStore)("AdaptiveInitializer").set("getAdaptiveModeForLoaders_cache",r),r},t._clearCache=function(){(0,w.getStore)("AdaptiveInitializer").set("getAdaptiveModeForLoaders_cache",void 0)},t}(0,{},e,w,N,J,S,t,a,c,d,U,f,B,I,h,n,h,A,q,R,s,"undefined"==typeof css_Tailwind_tailwind||css_Tailwind_tailwind),Z=Q,ee=Q,v._AdaptiveInitializerConfigContext=v.PrintDialog=v.AdaptiveInitializerConfig=v.BodyScroll=v.Storage=v.useScrollOnBodyFrozen=v.ScrollOnBodyStore=v.ScrollOnBodyContextProvider=v.ScrollOnBodyContext=v.withForceScrollUnfreeze=v.unFreezeBodyScrollManual=v.freezeBodyScrollManual=v.unMoveBodyScroll=v.moveBodyScroll=v.applyBodyScroll=v.withAdaptiveMode=v.useAdaptiveMode=v._WindowSizeTracker=v._AdaptiveModeClass=v.getAdaptiveModeForLoaders=v.AdaptiveContainer=v.DEFAULT_BREAKPOINTS=v.AdaptiveInitializerInternal=void 0,Object.defineProperty(v,"AdaptiveInitializerInternal",{enumerable:!0,get:function(){return Z.AdaptiveInitializer}}),Object.defineProperty(v,"DEFAULT_BREAKPOINTS",{enumerable:!0,get:function(){return b.DEFAULT_BREAKPOINTS}}),Object.defineProperty(v,"AdaptiveContainer",{enumerable:!0,get:function(){return G.AdaptiveContainer}}),Object.defineProperty(v,"getAdaptiveModeForLoaders",{enumerable:!0,get:function(){return ee.getAdaptiveModeForLoaders}}),Object.defineProperty(v,"_AdaptiveModeClass",{enumerable:!0,get:function(){return $.AdaptiveModeClass}}),Object.defineProperty(v,"_WindowSizeTracker",{enumerable:!0,get:function(){return V.WindowSizeTracker}}),Object.defineProperty(v,"useAdaptiveMode",{enumerable:!0,get:function(){return X.useAdaptiveMode}}),Object.defineProperty(v,"withAdaptiveMode",{enumerable:!0,get:function(){return X.withAdaptiveMode}}),Object.defineProperty(v,"applyBodyScroll",{enumerable:!0,get:function(){return E.applyBodyScroll}}),Object.defineProperty(v,"moveBodyScroll",{enumerable:!0,get:function(){return E.moveBodyScroll}}),Object.defineProperty(v,"unMoveBodyScroll",{enumerable:!0,get:function(){return E.unMoveBodyScroll}}),Object.defineProperty(v,"freezeBodyScrollManual",{enumerable:!0,get:function(){return E.freezeBodyScrollManual}}),Object.defineProperty(v,"unFreezeBodyScrollManual",{enumerable:!0,get:function(){return E.unFreezeBodyScrollManual}}),Object.defineProperty(v,"withForceScrollUnfreeze",{enumerable:!0,get:function(){return E.withForceScrollUnfreeze}}),Object.defineProperty(v,"ScrollOnBodyContext",{enumerable:!0,get:function(){return C.ScrollOnBodyContext}}),Object.defineProperty(v,"ScrollOnBodyContextProvider",{enumerable:!0,get:function(){return x.ScrollOnBodyContextProvider}}),Object.defineProperty(v,"ScrollOnBodyStore",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(v,"useScrollOnBodyFrozen",{enumerable:!0,get:function(){return F.default}}),Object.defineProperty(v,"Storage",{enumerable:!0,get:function(){return y.Storage}}),Object.defineProperty(v,"BodyScroll",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(v,"AdaptiveInitializerConfig",{enumerable:!0,get:function(){return O.AdaptiveInitializerConfig}}),Object.defineProperty(v,"PrintDialog",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(v,"_AdaptiveInitializerConfigContext",{enumerable:!0,get:function(){return g.AdaptiveInitializerConfigContext}}),v})); 97define("Application/Page",["Application/Env","require","exports","tslib"],(function(e,t,n,r){var s,a,i,o,c,u,l,d,m,h,_,p,f,g,v,E,y,w,D,b,O,P,S,C;return Object.defineProperty(n,"__esModule",{value:!0}),s=function(e,t){"use strict";
97Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(){this._attrs={class:"",dir:""}}containsClass(e){return this._attrs.class.includes(n.escapeHtml(e))}getClasses(){return this._attrs.class}toggleClass(e,t){if(void 0===t?!this.containsClass(e):t)this.updateClasses([],[e]);else this.updateClasses([e],[]);return this.containsClass(e)}updateClasses(e,t){const r=n.prepareTokens(e),s=n.prepareTokens(t);let a=n.prepareTokens(this.getClasses().split(" "));a=a.filter((e=>!r.includes(e))),a=a.concat(s.filter((e=>!a.includes(e))).map((e=>n.escapeHtml(e)))),this._attrs.class=a.join(" ")}setDir(e){this._attrs.dir=n.escapeHtml(e)}getDir(){return this._attrs.dir}static prepareTokens(e){const t=[];return e.forEach((e=>{if(e)t.push(e.trim())})),t}static escapeHtml(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}}return t.default=n,t}(0,{}),a=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultAspect=void 0;const n=[{name:"link",attrsPrior:["href"]},{name:"title",attrsPrior:[]},{name:"script",attrsPrior:["src","data-require-module"]},{name:"meta",attrsPrior:["name","content"]},{name:"style",attrsPrior:[]}];class r{getUniqueKey(){return!1}isEqual(e,t){return s.isEqual(e,t)}getDOMElement({name:e}){return document.createElement(e)}appendDomElement(e,t){if(!t)document.head.appendChild(e);else document.head.prepend(e)}removeDOMElement(e){document.head.removeChild(e)}getData({name:e,attrs:t,content:n,eventHandlers:r}){return s.generateTag({name:e,attrs:t,content:n,eventHandlers:r})}}t.DefaultAspect=r;class s{constructor(e,t,n,s,a=new r,i,o){this._hasBeenUsed=!1,this._name=e,this._attrs={...t},this._content=n?String(n):null,this._eventHandlers=s,this._hydratedElement=i,this._aspect=a,this._prepend=o,this._render()}getUniqueKey(){return this._aspect.getUniqueKey()}getData(e=!0){if(e)this._hasBeenUsed=!0;return this._aspect.getData(this.toPageTag())}hasBeenUsed(){return this._hasBeenUsed}setHasBeenUsed(e){this._hasBeenUsed=e}
97toPageTag(){return{name:this._name,attrs:this._attrs,content:this._content,eventHandlers:this._eventHandlers}}clear(){delete this._attrs,delete this._content,delete this._eventHandlers,delete this._name,this._removeElement()}isEqual(e,t,n){return this._aspect.isEqual({name:this._name,attrs:this._attrs,content:this._content},{name:e,attrs:t,content:n})}isFit(e,t){if(e&&e!==this._name)return!1;for(const e in t)if(t[e]!==this._attrs[e])return!1;return!0}isImportant(){return!1}getAttrs(){return{...this._attrs}}setAttrs(e){this._attrs=e}static generateTag(e){const t=[e.name];if(Object.keys(e.attrs).length)t.push(e.attrs);if(e.content)t.push(e.content);return t}static isEqual(e,t){if(t.content!=e.content||t.name.toLowerCase()!==e.name.toLowerCase())return!1;const r=n.find((e=>e.name===t.name));return function(e,t,n){if(n&&n.attrsPrior.length)if(n.attrsPrior.every((n=>Object.keys(e).some((r=>r===n&&e[r]===t[r])))))return!0;return Object.keys(e).every((n=>Object.keys(t).some((r=>r===n&&t[r]===e[n]))))}(t.attrs,e.attrs,r)}}return s.isServer="undefined"==typeof window,t.default=s,t}(0,{}),i=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.SERVER_ID_FIELD=void 0,t.SERVER_ID_FIELD="sid",t}(0,{}),o=i,c=function(e,t,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.isCrossOriginAnonymous=void 0,t.isCrossOriginAnonymous=function(e){return(e.startsWith("//")||e.startsWith("http"))&&!e.includes(`//${n.location.host}`)},t}(0,{},e),u=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PageTagAPI=void 0;return t.PageTagAPI=class{constructor(){this._elements={}}createComment(e){this._aspect.createComment(e)}createNoScript(e){this._aspect.createNoScript(e)}createTag(e,t,r,s,a){var i;for(const n in this._elements)if(this._elements[n].isEqual(e,t,r))return null===(i=null==s?void 0:s.load)||void 0===i||i.call(s),n;return t[n.SERVER_ID_FIELD]=this._aspect.generateGuid(),this._elements[t[n.SERVER_ID_FIELD]]=this._aspect.createTag(e,t,r,s,this._elements,a),t[n.SERVER_ID_FIELD]}createMergeTag(e,t,n){if("undefined"==typeof window&&n)this._aspect.createMergeTag(e,t,n)}getAttrs(e){if(this._elements[e])return this._elements[e].getAttrs();else return null}changeTag(e,t){if(this._elements[e])this._elements[e].changeTag(t)}deleteTag(e){if(this._elements[e])this._elements[e].clear(),delete this._elements[e]}clear(){for(const e in this._elements)if(this._elements.hasOwnProperty(e))this.deleteTag(e);this._aspect.clear()}getData(e){if(e&&this._elements[e])return this._elements[e].getData(!1);else return this._aspect.getData(this._elements)}getNewData(){return this._aspect.getNewData(this._elements)}getComments(e){return this._aspect.getComments(e)}get(e){return this[e]}set(e,t){try{return this[e]=t,!0}catch(e){return!1}}remove(){}getKeys(){return Object.keys(this)}toObject(){return{...this}}},t}(0,{},i),l=u,d=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends n.default{containsClass(e){return document.body.classList.contains(n.default.escapeHtml(e))}getClasses(){return document.body.classList.toString()}toggleClass(e,t){return document.body.classList.toggle(r.escapeHtml(e),t)}updateClasses(e,t){if(super.updateClasses(e,t),document.body.className!==this._attrs.class)document.body.setAttribute("class",this._attrs.class),this._notifyEventCrunch()}setDir(e){document.body.dir=n.default.escapeHtml(e)}getDir(){return document.body.dir}_notifyEventCrunch(){if("undefined"!=typeof window)!function(){if("function"!=typeof window.CustomEvent)window.CustomEvent=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:null};const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}}(),window.document.body.dispatchEvent(new CustomEvent("_bodyClassesUpdateCrunch",{detail:this.getClasses()}))}}return t.default=r,t}(0,{},s),m=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends n.default{constructor(e,t,n,s,a,i,o){const c=r._restoreElement(i);super(c.name||e,c.attrs||t,c.content||n,s,a,i,o)}changeTag(e){const t=this.getAttrs(),n=Object.getOwnPropertyNames(t),r=Object.getOwnPropertyNames(e);Object.getOwnPropertyNames({...t,...e}
97).forEach((s=>{const a=n.includes(s),i=r.includes(s);if(a&&i){if(t[s]!==e[s])this._element.removeAttribute(s),delete t[s],t[s]=e[s],this._element.setAttribute(s,t[s])}else if(a)this._element.removeAttribute(s),delete t[s];else t[s]=e[s],this._element.setAttribute(s,t[s])})),this.setAttrs(t)}isImportant(){return"true"===this._attrs.important}_render(){if(this._hydratedElement)return void(this._element=this._hydratedElement);const e=this._aspect.getDOMElement(this.toPageTag());if(this._applyAttrs(e),this._content)e.textContent=this._content;this._aspect.appendDomElement(e,this._prepend),this._element=e,this._startEvents()}_applyAttrs(e){for(const[t,n]of Object.entries(this._attrs))e.setAttribute(t,n)}_startEvents(){var e,t;if(null===(e=this._eventHandlers)||void 0===e?void 0:e.load)this._element.addEventListener("load",this._eventHandlers.load);if(null===(t=this._eventHandlers)||void 0===t?void 0:t.error)this._element.addEventListener("error",this._eventHandlers.error)}_removeElement(){this._aspect.removeDOMElement(this._element),delete this._element}static _restoreElement(e){const t={name:"",attrs:null,content:"",element:e};if(e)t.attrs=r.getElementAttrs(e),t.name=e.tagName.toLowerCase(),t.content=e.textContent;return t}static getElementAttrs(e){const t={};if(e)Array.prototype.slice.call(e.attributes).forEach((e=>{t[e.name]=e.value}));return t}}return t.default=r,t}(0,{},a),h=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends n.default{changeTag(e){this.setAttrs(e)}isImportant(){return"true"===this._attrs.important}_render(){var e,t;null===(t=null===(e=this._eventHandlers)||void 0===e?void 0:e.load)||void 0===t||t.call(e)}_removeElement(){}}return t.default=r,t}(0,{},a),_=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e=""){this._sizes=e}getUniqueKey(){return`Favicon${this._sizes}`}isEqual(e,t){return n.default.isEqual(e,t)}getData({name:e,attrs:t,content:r,eventHandlers:s}){return n.default.generateTag({name:e,attrs:t,content:r,eventHandlers:s})}getDOMElement({name:e}){if(this._existingDOMElement)return this._existingDOMElement;let t=e=>{var t;return(null===(t=e.attributes.getNamedItem("sizes"))||void 0===t?void 0:t.value)===this._sizes};if(!this._sizes)t=e=>!e.attributes.getNamedItem("sizes");if(this._existingDOMElement=Array.from(document.head.querySelectorAll("link[rel*='icon']")).find(t),!this._existingDOMElement)this._existingDOMElement=document.createElement(e);return this._existingDOMElement}appendDomElement(e){if(!e.parentNode)document.head.appendChild(e)}removeDOMElement(e){}},t}(0,{},a),p=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{getUniqueKey(){return"Title"}isEqual(e,t){if(n.default.isServer)return n.default.isEqual(e,t);else return document.title===t.content}getDOMElement({name:e,content:t}){return document.title=t||"",document.head.querySelector("title")}appendDomElement(e){}removeDOMElement(e){}getData({name:e,attrs:t,content:r,eventHandlers:s}){return n.default.generateTag({name:e,attrs:{},content:r,eventHandlers:s})}},t}(0,{},a),f=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{getUniqueKey(){return"ViewPort"}isEqual(e,t){return n.default.isEqual(e,t)}getData({name:e,attrs:t,content:r,eventHandlers:s}){return n.default.generateTag({name:e,attrs:t,content:r,eventHandlers:s})}getDOMElement({name:e}){let t=document.head.querySelector("meta[name=viewport]");if(!t)t=document.createElement(e),document.head.appendChild(t);return t}appendDomElement(e){}removeDOMElement(e){}},t}(0,{},a),g=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends n.default{changeTag(e){this.setAttrs(e)}isEqual(e,t,n,r){if("script"!==e)throw new Error('РмеÑоде isEqual клаÑÑа JSLinksElement паÑамеÑÑ name должен ÑавнÑÑÑÑÑ "script"');return super.isEqual(e,t,n)}isFit(e,t){if(e&&"script"!==e)throw new Error('РмеÑоде isFit клаÑÑа JSLinksElement паÑамеÑÑ name должен ÑавнÑÑÑÑÑ "script"');return super.isFit(e,t)}_render(){var e,t;null===(t=null===(e=this._eventHandlers)||void 0===e?void 0:e.load)||void 0===t||t.call(e)}_removeElement(){}}return t.default=r,t}(0,{}
97,a),v=function(e,t,n,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Body=void 0;class a{constructor(){this._element="undefined"==typeof window?new s.default:new r.default}addClass(...e){this._element.updateClasses([],e)}replaceClasses(e,t){this._element.updateClasses(e,t)}removeClass(...e){this._element.updateClasses(e,[])}toggleClass(e,t){return this._element.toggleClass(e,t)}containsClass(e){return this._element.containsClass(e)}getClassString(){return this._element.getClasses()}setDir(e){this._element.setDir(e)}getDir(){return this._element.getDir()}get(e){return this[e]}set(e,t){try{return this[e]=t,!0}catch(e){return!1}}remove(){}getKeys(){return Object.keys(this)}toObject(){return{...this}}static _creator(){return new a}static getInstance(){if("undefined"!=typeof window)return a._instance=a._instance||a._creator(),a._instance;else return n.getStore("BodyAPI",a._creator)}}return t.Body=a,t}(0,{},e,d,s),E=v,y=function(e,t,n,r,s,a,i,o,c,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeadAspect=void 0;const l="undefined"==typeof window?"ps-":"",d=["icon","apple-touch-icon","shortcut icon","apple-touch-icon-precomposed"];class m{constructor(){this._comments=[],this._noScriptUrl=null,this._noScriptHasBeenUsed=!1,this._id=1,this._mergeScripts=[]}createComment(e){if(this._comments.includes(e)){const t=new Error("Application/_Page/_head/Aspect duplicate comment:\n\t"+e);throw new Error(t.stack)}this._comments.push(e)}createNoScript(e){if(!e)throw new Error("ÐолÑÑеннÑй url пÑÑÑой");this._noScriptUrl=e}createTag(e,t,n,r,s,a){let i=t;if(t.href&&!t.crossorigin&&(0,u.isCrossOriginAnonymous)(t.href))i={...t,crossorigin:"anonymous"};const o=this.create(e,i,n,r,void 0,a);return m._ensureUniq(o,s),o}create(e,t,a,i,o,c){const u=this.getAspect(e,t,o);if(n.default.isServer)return new s.default(e,t,a,i,u,o);else return new r.default(e,t,a,i,u,o,c)}getAspect(e,t,n){var s;let c=e,u=t;if(n)c=n.tagName.toLowerCase(),u=r.default.getElementAttrs(n);const l="title"===c,m="meta"===c&&"viewport"===u.name&&!!u.content,h=!("link"!==c||!u.href||!(null===(s=u.rel)||void 0===s?void 0:s.split(" ").some((e=>d.includes(e)))));return l&&new i.default||m&&new o.default||h&&new a.default(u.sizes)||void 0}createMergeTag(e,t,n){this._mergeScripts.push({name:e,attrs:t,content:n})}getComments(e){return e?this._comments.map((e=>`\x3c!--${e}--\x3e`)):this._comments.concat([])}getData(e){return this._getData(e)}getNewData(e){return this._getData(e,!0)}_getData(e,t=!1){this._addMergedScript(e);const n=this._generateNoScript(t),r=m._getHttpEquivId(e),s=[];let a;const i=[];for(const n in e)if(!t||!e[n].hasBeenUsed())if(!e[n].isImportant())if(n!==r)i.push(e[n].getData(t));else a=e[n].getData(t);else s.push(e[n].getData(t));if(a)s.unshift(a);if(n)s.unshift(n);return s.concat(i)}_addMergedScript(e){if(!this._mergeScripts.length)return;let t={[c.SERVER_ID_FIELD]:this.generateGuid()};const n=[];this._mergeScripts.sort(((e,t)=>{if("true"===e.attrs.important&&"true"!==t.attrs.important)return-1;if("true"!==e.attrs.important&&"true"===t.attrs.important)return 1;else return 0})).forEach((e=>{t={...t,...e.attrs},n.push(e.content)})),this._mergeScripts=[],e[t[c.SERVER_ID_FIELD]]=this.createTag("script",t,n.join("\n"),void 0,e)}clear(){delete this._noScriptUrl,this._comments=[],this._mergeScripts=[]}generateGuid(){return`h-${l}${this._id++}`}_generateNoScript(e){if(e&&this._noScriptHasBeenUsed)return null;if(!this._noScriptUrl)return null;else return this._noScriptHasBeenUsed=e?!0:this._noScriptHasBeenUsed,["noscript",n.default.generateTag({name:"meta",attrs:{"http-equiv":"refresh",content:`2; URL=${this._noScriptUrl}`}})]}static _getHttpEquivId(e){for(const t in e)if(e[t].isFit("meta",{"http-equiv":"X-UA-Compatible",content:"IE=edge"}))return t;return null}static _ensureUniq(e,t){const n=e.getUniqueKey();if(n)for(const r in t)if(t.hasOwnProperty(r))if(t[r].getUniqueKey()===n)e.setHasBeenUsed(t[r].hasBeenUsed()),t[r].clear(),delete t[r]}}return t.HeadAspect=m,t}(0,{},a,m,h,_,p,f,i,c),w=function(e,t,n,r,s){"use strict";
97Object.defineProperty(t,"__esModule",{value:!0}),t.JSLinksAspect=void 0;return t.JSLinksAspect=class{constructor(){this._id=1}createComment(e){}createNoScript(e){}createTag(e,t,a,i,o){const c="Application/_Page/_jsLinks/Aspect";if("undefined"!=typeof window)return void n.logger.warn(`${c} ÐÑзÑваÑÑ Ð¼ÐµÑод createTag на клиенÑе запÑеÑено.`);if("script"!==e)throw new Error(`${c} ÐÑзÑваÑÑ Ð¼ÐµÑод createTag Ñ Ð¿Ð°ÑамеÑÑом name, оÑлиÑнÑм Ð¾Ñ script запÑеÑено`);let u=t;if(!a)if(u={...t},!u.hasOwnProperty("defer")&&!u.hasOwnProperty("async"))u.async=void 0;if(u.src&&(0,s.isCrossOriginAnonymous)(u.src))u.crossorigin="anonymous";return new r.default(e,u,a,i)}createMergeTag(e,t,r){n.logger.error(new Error("ÐÐ»Ñ ÑкÑипÑов в JSLinks API ÑÑÐ¾Ñ Ð¼ÐµÑод не Ñеализован"))}getComments(e){return[]}getData(e){const t=[];for(const n of Object.keys(e))t.push(e[n].getData(!1));return t}getNewData(e){const t=[];for(const n of Object.keys(e))if(!e[n].hasBeenUsed())t.push(e[n].getData());return t}clear(){}generateGuid(){return"s-"+this._id++}},t}(0,{},e,g,c),D=function(e,t,n,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSLinks=void 0;class a extends r.PageTagAPI{constructor(){super(...arguments),this._aspect=new s.JSLinksAspect}static _creator(){return new a}static getInstance(e="root"){if("undefined"!=typeof window)return a._instance=a._instance||a._creator(),a._instance;else return n.getStore(`JSLinksAPI_${e}`,a._creator)}}return t.JSLinks=a,t}(0,{},e,u,w),b=D,O=function(e,t,n,r,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Head=void 0;class i extends r.PageTagAPI{constructor(){super(),this._aspect=new s.HeadAspect,this._collectTags()}_collectTags(){if("undefined"!=typeof document)Array.from(document.head.children).forEach((e=>{if("NOSCRIPT"===e.tagName)return;const t=this._aspect.create(null,null,null,null,e);this._elements[t.getAttrs()[a.SERVER_ID_FIELD]||this._aspect.generateGuid()]=t}))}static _creator(){return new i}static getInstance(){if("undefined"!=typeof window)return i._instance=i._instance||i._creator(),i._instance;else return n.getStore("HeadAPI",i._creator)}}return t.Head=i,t}(0,{},e,u,y,i),P=O,S=function(e,t,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.createHttpEquiv=t.createFavicon=t.createScript=t.createFont=t.createCSS=t.createViewPort=t.createMicroData=t.createTitle=void 0,t.createTitle=function(e){return n.Head.getInstance().createTag("title",{},e)},t.createMicroData=function(e){return n.Head.getInstance().createTag("script",{type:"application/ld+json"},e)},t.createViewPort=function(e){return n.Head.getInstance().createTag("meta",{name:"viewport",content:e})},t.createCSS=function(e){return n.Head.getInstance().createTag("link",{rel:"stylesheet",type:"text/css",href:e})},t.createFont=function(e){let t="font";const r=e.match(/\.[0-9a-z]+$/i);if(r)t+=r[0].replace(".","/");return n.Head.getInstance().createTag("link",{rel:"preload",as:"font",type:t,href:e})},t.createScript=function(e,t={}){return n.Head.getInstance().createTag("script",{type:"text/javascript",...t,src:e})},t.createFavicon=function(e,t={}){return n.Head.getInstance().createTag("link",{rel:"shortcut icon",type:"image/x-icon",...t,href:e})},t.createHttpEquiv=function(e,t,r={}){return n.Head.getInstance().createTag("meta",{...r,"http-equiv":e,content:t})},t}(0,{},O),C=S,n.PageTagAPI=n.creators=n.JSLinks=n.Body=n.Head=void 0,Object.defineProperty(n,"Head",{enumerable:!0,get:function(){return P.Head}}),Object.defineProperty(n,"Body",{enumerable:!0,get:function(){return E.Body}}),Object.defineProperty(n,"JSLinks",{enumerable:!0,get:function(){return b.JSLinks}}),r.__exportStar(o,n),n.creators=C,Object.defineProperty(n,"PageTagAPI",{enumerable:!0,get:function(){return l.PageTagAPI}}),n})); 98var __extends,__assign,__rest,__decorate,__param,__esDecorate,__runInitializers,__propKey,__setFunctionName,__metadata,__awaiter,__generator,__exportStar,__values,__read,__spread,__spreadArrays,__spreadArray,__await,__asyncGenerator,__asyncDelegator,__asyncValues,__makeTemplateOb
98ject,__importStar,__importDefault,__classPrivateFieldGet,__classPrivateFieldSet,__classPrivateFieldIn,__createBinding,__addDisposableResource,__disposeResources;!function(e){function t(e,t){if(e!==r)if("function"==typeof Object.create)Object.defineProperty(e,"__esModule",{value:!0});else e.__esModule=!0;return function(r,n){return e[r]=t?t(r,n):n}}var r="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:{};if("function"==typeof define&&define.amd)define("tslib",["exports"],(function(n){e(t(r,t(n)))}));else if("object"==typeof module&&"object"==typeof module.exports)e(t(r,t(module.exports)));else e(t(r))}((function(e){var t,r,n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};__extends=function(e,t){function r(){this.constructor=e}if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},__assign=Object.assign||function(e){var t,r,n,o;for(r=1,n=arguments.length;r<n;r++)for(o in t=arguments[r])if(Object.prototype.hasOwnProperty.call(t,o))e[o]=t[o];return e},__rest=function(e,t){var r,n,o={};for(r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0)o[r]=e[r];if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(n=0,r=Object.getOwnPropertySymbols(e);n<r.length;n++)if(t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n]))o[r[n]]=e[r[n]];return o},__decorate=function(e,t,r,n){var o,a,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,r,n);else for(a=e.length-1;a>=0;a--)if(o=e[a])c=(i<3?o(c):i>3?o(t,r,c):o(t,r))||c;return i>3&&c&&Object.defineProperty(t,r,c),c},__param=function(e,t){return function(r,n){t(r,n,e)}},__esDecorate=function(e,t,r,n,o,a){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}var c,s,_,f,l,u=n.kind,p="getter"===u?"get":"setter"===u?"set":"value",y=!t&&e?n.static?e:e.prototype:null,d=t||(y?Object.getOwnPropertyDescriptor(y,n.name):{}),b=!1;for(s=r.length-1;s>=0;s--){for(f in _={},n)_[f]="access"===f?{}:n[f];for(f in n.access)_.access[f]=n.access[f];if(_.addInitializer=function(e){if(b)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(e||null))},l=(0,r[s])("accessor"===u?{get:d.get,set:d.set}:d[p],_),"accessor"===u){if(void 0===l)continue;if(null===l||"object"!=typeof l)throw new TypeError("Object expected");if(c=i(l.get))d.get=c;if(c=i(l.set))d.set=c;if(c=i(l.init))o.unshift(c)}else if(c=i(l))if("field"===u)o.unshift(c);else d[p]=c}if(y)Object.defineProperty(y,n.name,d);b=!0},__runInitializers=function(e,t,r){var n,o=arguments.length>2;for(n=0;n<t.length;n++)r=o?t[n].call(e,r):t[n].call(e);return o?r:void 0},__propKey=function(e){return"symbol"==typeof e?e:"".concat(e)},__setFunctionName=function(e,t,r){if("symbol"==typeof t)t=t.description?"[".concat(t.description,"]"):"";return Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})},__metadata=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter=function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{s(n.next(e))}catch(e){a(e)}}function c(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,c)}s((n=n.apply(e,t||[])).next())}))},__generator=function(e,t){function r(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,r[0]&&(c=0)),c;)try{if(n=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;
98if(o=0,a)r=[2&r[0],a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:return c.label++,{value:r[1],done:!1};case 5:c.label++,o=r[1],r=[0];continue;case 7:r=c.ops.pop(),c.trys.pop();continue;default:if(!(a=c.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){c=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){c.label=r[1];break}if(6===r[0]&&c.label<a[1]){c.label=a[1],a=r;break}if(a&&c.label<a[2]){c.label=a[2],c.ops.push(r);break}if(a[2])c.ops.pop();c.trys.pop();continue}r=t.call(e,c)}catch(e){r=[6,e],o=0}finally{n=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}var n,o,a,i,c={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i},__exportStar=function(e,t){for(var r in e)if("default"!==r&&!Object.prototype.hasOwnProperty.call(t,r))__createBinding(t,e,r)},__createBinding=Object.create?function(e,t,r,n){if(void 0===n)n=r;var o=Object.getOwnPropertyDescriptor(t,r);if(!o||("get"in o?!t.__esModule:o.writable||o.configurable))o={enumerable:!0,get:function(){return t[r]}};Object.defineProperty(e,n,o)}:function(e,t,r,n){if(void 0===n)n=r;e[n]=t[r]},__values=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__read=function(e,t){var r,n,o,a,i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;r=i.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)o.push(n.value)}catch(e){a={error:e}}finally{try{if(n&&!n.done&&(i=r.return))i.call(r)}finally{if(a)throw a.error}}return o},__spread=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(arguments[t]));return e},__spreadArrays=function(){var e,t,r,n,o,a,i,c;for(e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(n=Array(e),o=0,t=0;t<r;t++)for(i=0,c=(a=arguments[t]).length;i<c;i++,o++)n[o]=a[i];return n},__spreadArray=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)if(n||!(o in t)){if(!n)n=Array.prototype.slice.call(t,0,o);n[o]=t[o]}return e.concat(n||Array.prototype.slice.call(t))},__await=function(e){return this instanceof __await?(this.v=e,this):new __await(e)},__asyncGenerator=function(e,t,r){function n(e,t){if(_[e])if(s[e]=function(t){return new Promise((function(r,n){f.push([e,t,r,n])>1||o(e,t)}))},t)s[e]=t(s[e])}function o(e,t){try{(r=_[e](t)).value instanceof __await?Promise.resolve(r.value.v).then(a,i):c(f[0][2],r)}catch(e){c(f[0][3],e)}var r}function a(e){o("next",e)}function i(e){o("throw",e)}function c(e,t){if(e(t),f.shift(),f.length)o(f[0][0],f[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s,_=r.apply(e,t||[]),f=[];return s={},n("next"),n("throw"),n("return",(function(e){return function(t){return Promise.resolve(t).then(e,i)}})),s[Symbol.asyncIterator]=function(){return this},s},__asyncDelegator=function(e){function t(t,o){r[t]=e[t]?function(r){return(n=!n)?{value:__await(e[t](r)),done:!1}:o?o(r):r}:o}var r,n;return r={},t("next"),t("throw",(function(e){throw e})),t("return"),r[Symbol.iterator]=function(){return this},r},__asyncValues=function(e){function t(t){r[t]=e[t]&&function(r){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(r=e[t](r)).done,r.value)}))}}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),r={},t("next"),t("throw"),t("return"),r[Symbol.asyncIterator]=function(){return this},r)}
98,__makeTemplateObject=function(e,t){if(Object.defineProperty)Object.defineProperty(e,"raw",{value:t});else e.raw=t;return e},t=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},__importStar=function(e){var r,n;if(e&&e.__esModule)return e;if(r={},null!=e)for(n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n))__createBinding(r,e,n);return t(r,e),r},__importDefault=function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},__classPrivateFieldSet=function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},__classPrivateFieldIn=function(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)},__addDisposableResource=function(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n,o;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");if(n=t[Symbol.dispose],r)o=n}if("function"!=typeof n)throw new TypeError("Object not disposable.");if(o)n=function(){try{o.call(this)}catch(e){return Promise.reject(e)}};e.stack.push({value:t,dispose:n,async:r})}else if(r)e.stack.push({async:!0});return t},r="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n},__disposeResources=function(e){function t(t){e.error=e.hasError?new r(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function r(){for(var n,o;e.stack.length;){n=e.stack.pop();try{if(o=n.dispose&&n.dispose.call(n.value),n.async)return Promise.resolve(o).then(r,(function(e){return t(e),r()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()},e("__extends",__extends),e("__assign",__assign),e("__rest",__rest),e("__decorate",__decorate),e("__param",__param),e("__esDecorate",__esDecorate),e("__runInitializers",__runInitializers),e("__propKey",__propKey),e("__setFunctionName",__setFunctionName),e("__metadata",__metadata),e("__awaiter",__awaiter),e("__generator",__generator),e("__exportStar",__exportStar),e("__createBinding",__createBinding),e("__values",__values),e("__read",__read),e("__spread",__spread),e("__spreadArrays",__spreadArrays),e("__spreadArray",__spreadArray),e("__await",__await),e("__asyncGenerator",__asyncGenerator),e("__asyncDelegator",__asyncDelegator),e("__asyncValues",__asyncValues),e("__makeTemplateOb
98ject",__makeTemplateObject),e("__importStar",__importStar),e("__importDefault",__importDefault),e("__classPrivateFieldGet",__classPrivateFieldGet),e("__classPrivateFieldSet",__classPrivateFieldSet),e("__classPrivateFieldIn",__classPrivateFieldIn),e("__addDisposableResource",__addDisposableResource),e("__disposeResources",__disposeResources)})); 99define("Types/function",["Application/Initializer","Application/Env","require","exports"],(function(e,t,n,i){var l,r,u,o,a,s,f,c,d,p,m,y;return Object.defineProperty(i,"__esModule",{value:!0}),l=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=function(e,t,n,i){let l;const r=i||{firstCalled:!1,sequentialCall:!1};return function(...i){if(!r.firstCalled&&n&&!l&&t>5)r.firstCalled=!0,e.apply(this,i);if(l)r.sequentialCall=!0,clearTimeout(l);l=setTimeout((()=>{if(l=null,r.sequentialCall||!r.firstCalled)e.apply(this,i);r.sequentialCall=!1,r.firstCalled=!1}),t)}},t}(0,{}),r=l,u=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=function(e,t,n,i){let l;const r=i||{firstCalled:!1,sequentialCall:!1},u=()=>{if(l)r.sequentialCall=!0,clearTimeout(l)};return{run:(...i)=>{if(!r.firstCalled&&n&&!l&&t>5)r.firstCalled=!0,e.apply(this,i);u(),l=setTimeout((()=>{if(l=null,r.sequentialCall||!r.firstCalled)e.apply(this,i);r.sequentialCall=!1,r.firstCalled=!1}),t)},cancel:u}},t}(0,{}),o=u,a=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=["hidden","msHidden","webkitHidden"],i="undefined"!=typeof window?window:null,l="undefined"!=typeof document?document:null,r=(()=>{if(l)return n.find((e=>void 0!==l[e]))})();return t.default=function(e){if((null==i?void 0:i.requestAnimationFrame)&&(!r||!(null==l?void 0:l[r])))i.requestAnimationFrame(e);else setTimeout(e,0)},t}(0,{}),s=a,f=function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const l="Types_function_storages";const r=new class{memoize(e){return function(...t){if((0,i.isInit)()){const i=JSON.stringify(t),r=(0,n.getStore)(l);let u=r.get("memoize"),o={};if(!u)u=new WeakMap,r.set("memoize",u);if(u.has(e))o=u.get(e);else u.set(e,o);if(o.hasOwnProperty(i))return o[i];const a=e.apply(this,t);return o[i]=a,a}return e.apply(this,t)}}clear(e,...t){const i=(0,n.getStore)(l).get("memoize");if(null==i?void 0:i.has(e)){const n=i.get(e),l=JSON.stringify(t);if(n.hasOwnProperty(l))delete n[l]}}},u=r.memoize.bind(r);return u.clear=r.clear.bind(r),u.prototype={_moduleName:"Types/_function/memoize"},t.default=u,t}(0,{},t,e),c=f,d=function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=function(e){return function(...t){if((0,i.isInit)()){const i=(0,n.getStore)("Types_function_storages");let l=i.get("once");if(!l)l=new WeakMap,i.set("once",l);if(!l.has(e)){const n=e.apply(this,t);l.set(e,n)}return l.get(e)}return e.apply(null,t)}},t}(0,{},t,e),p=d,m=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){let i,l=!0;return function(...r){if(l)e.apply(this,r),l=!1,setTimeout((()=>{if(l=!0,n&&i)i(),i=null}),t);else if(n)i=e.bind(this,...r)}},t}(0,{}),y=m,i.throttle=i.once=i.memoize=i.delay=i.debounceCancellable=i.debounce=void 0,Object.defineProperty(i,"debounce",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(i,"debounceCancellable",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(i,"delay",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(i,"memoize",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(i,"once",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(i,"throttle",{enumerable:!0,get:function(){return y.default}}),i})); 100define("UI/Executor",["require","exports","UICore/Executor","UICommon/Executor"],(function(e,r,t,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.OptionsResolver=r._IGeneratorType=r._IBuilder=r._IGenerator=r.ConfigResolver=r.invisibleNodeTagName=r.CommonUtils=r.createGenerator=r.TClosure=void 0,Object.defineProperty(r,"TClosure",{enumerable:!0,get:function(){return t.TClosure}}),Object.defineProperty(r,"createGenerator",{enumerable:!0,get:function(){return t.createGenerator}}),Object.defineProperty(r,"CommonUtils",{enumerable:!0,get:function(){return n.CommonUtils}}),Object.defineProperty(r,"invisibleNodeTagName",{enumerable:!0,get:function(){return n.invisibleNodeTagName}}),Object.defineProperty(r,"ConfigResolver",{enumerable:!0,get:function(){return n.ConfigResolver}}),Object.defineProperty(r,"_IGenerator",{enumerable:!0,get:function(){return n._IGenerator}}),Object.defineProperty(r,"_IBuilder",{enumerable:!0,get:function(){return n._IBuilder}}),Object.defineProperty(r,"_IGeneratorType",{enumerable:!0,get:function(){return n._IGeneratorType}}),Object.defineProperty(r,"OptionsResolver",{enumerable:!0,get:function(){return n.OptionsResolver}})}
100)); 101define("UICommon/Executor",["react/jsx-runtime","WasabyLoader/ModulesLoader","UICommon/Utils","UICommon/State","Types/util","Env/Env","require","exports"],(function(e,t,r,n,o,i,a,l){var s,u,c,f,p,d,b,g,m,y,v,O,C,P,h,_,j,S,w,A,M;return Object.defineProperty(l,"__esModule",{value:!0}),s=function(e,t){"use strict";function r(e){return e.startsWith("attr:")}return Object.defineProperty(t,"__esModule",{value:!0}),t.checkAttr=t.isAttr=void 0,t.isAttr=r,t.checkAttr=function(e){for(const t in e)if(r(t))return!0;return!1},t}(0,{}),u=s,c=function(e,t){"use strict";function r(e){return"[object Object]"===Object.prototype.toString.call(e)}function n(e,t,r){if(o.indexOf(r)>-1&&e&&t)return e+" "+t;else return t}Object.defineProperty(t,"__esModule",{value:!0}),t.uniteScope=t.presetScope=t.createScope=t.isolateScope=t.calculateScope=t.controlPropMerge=t.UNDEF_FLAG_PREFIX=t.PATCHED_FLAG_PREFIX=t.ORIGIN_FLAG=t.ISOLATED_SCOPE_FLAG=void 0;const o=["className"],i="___$isolatedscope";t.ISOLATED_SCOPE_FLAG=i;const a="__$$__originObject";t.ORIGIN_FLAG=a;const l="___$patched$";t.PATCHED_FLAG_PREFIX=l;const s="___$wasundef$";t.UNDEF_FLAG_PREFIX=s;const u="__$unite";return t.controlPropMerge=function(e,t){if(!e)e={};for(let r in t)if(t.hasOwnProperty(r))e[r]=n(e[r],t[r],r);return e},t.calculateScope=function(e,t){if("function"==typeof e&&e[u])return e(t);else return e},t.isolateScope=function(e,t,n){if(!e[l+n]){let o=e[n];if(void 0!==o)if("content"===n&&(null==o?void 0:o.isChildrenAsContent))if(t.content){if(r(t))t=Object.create(t);t[n]=o}else e[s+n]=!0;else{if(r(t))t=Object.create(t);t[n]=o}else e[s+n]=!0;e[n]=t,e[l+n]=!0}else{if(!e[s+n]){if(r(t))t=Object.create(t);t[n]=e[n][n]}e[n]=t}return e[i]=n,e},t.createScope=function(e){return Object.create(e&&e._getRawData?e._getRawData():e||null)},t.presetScope=function(e,t,r,n){if(n.key)t[n.key]=r;return t[n.value]=e,t},t.uniteScope=function(e,t){let r=function(r){let n;if("object"==typeof e){if(!e)n={};else if(Object.isFrozen(e))n={...e};else{n=Object.create(e);for(let t in e)if(e.hasOwnProperty(t))Object.defineProperty(n,t,{value:e[t],enumerable:!0,writable:!0,configurable:!0})}if(!n[a])Object.defineProperty(n,a,{value:e,enumerable:!1,configurable:!1})}else n=e;if(t&&!t.hasOwnProperty("onAfterMount"))t.onAfterMount=void 0;return r(n,t)};return r[u]=!0,r},t}(0,{}),f=c,p=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.removeClassDuplicates=void 0,t.removeClassDuplicates=function(e){let t=e.split(/\s+/);return t=t.filter((function(e){return""!=e})),t=function(e){var t,r;for(t=0;t<e.length;++t)for(r=t+1;r<e.length;++r)if(e[t]===e[r])e.splice(r--,1);return e}(t),e=t.join(" ")},t}(0,{}),d=function(e,t,r,n){"use strict";function o(e,t){for(var r in t)if(void 0===e[r]&&void 0!==t[r])e[r]=t[r];return e}function i(e,t){if(r.constants.isProduction)return;const o=e.getOptionTypes&&e.getOptionTypes();if(o)!function(e,t,r){Object.keys(r).forEach((o=>{const i=r[o].call(null,t,o,e._moduleName);if(i instanceof Error){const t=`"${o}" option error"`;n.Logger.error(t,e.prototype,i)}}))}(e,t,o)}return Object.defineProperty(t,"__esModule",{value:!0}),t.resolveInheritOptions=t.validateOptions=t.getDefaultOptions=t.resolveOptions=t.resolveDefaultOptions=void 0,t.resolveDefaultOptions=o,t.resolveOptions=function(e,t,r){o(r,t),i(e,r)},t.getDefaultOptions=function(e,t=!1){const r={};if(!t&&e.hasOwnProperty("defaultProps"))o(r,e.defaultProps);if(e.getDefaultOptions)o(r,e.getDefaultOptions());return r},t.validateOptions=i,t.resolveInheritOptions=function(e,t,r,n){var o,i,a,l;if(e){if(o=e._getInheritOptions&&e._getInheritOptions(e)||{},!t.inheritOptions)t.inheritOptions={};for(a in i={},t.inheritOptions)if(t.inheritOptions.hasOwnProperty(a)){if(void 0===r[a])r[a]=t.inheritOptions[a];i[a]=r[a]}for(l in o)if(o.hasOwnProperty(l)&&!i.hasOwnProperty(l)){if(r.hasOwnProperty(l))o[l]=r[l];i[l]=o[l],r[l]=o[l]}t.inheritOptions=i}},t}(0,{},i,r),b=d,g=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=["area","base","basefont","br","col","command","embed","frame","hr","
101img","input","isindex","keygen","link","meta","param","source","track","wbr","path","circle","ellipse","line","rect","use","stop","polyline","polygon"],t}(0,{}),m=function(e,t,r){"use strict";function n(e,t){if(t[e])return t[e];else return""}function o(e,t,r){if(!e||!t)return t||e;if(t[t.length-1]===r)return t+e;else return t+r+e}function i(e,t){return o(n("class",e),n("class",t)," ")}function a(e,t){return o(n("style",e),n("style",t),";")}function l(e,t,r,n=""){const o=null==e?void 0:e[r],i=null==t?void 0:t[r];if(o&&i)return function(e,t,r){const n=e.trim(),o=t.trim();return`${o}${o.endsWith(r)?" ":r+" "}${n}`}(o,i,n);if(i&&"string"==typeof i)return i.trim();if(o&&"string"==typeof o)return o.trim();else return""}function s(e,t,r){if(r)e[t]=r;return e}function u(e){if((null==e?void 0:e.meta)&&Object.keys(e.meta).length){const t={...e.meta};delete e.meta,c(e,t)}}function c(e,t){Object.defineProperty(e,"meta",{configurable:!0,value:t})}Object.defineProperty(t,"__esModule",{value:!0}),t.mergeEvents=t.mergeAttrs=t.joinAttrs=t.processMergeAttributes=t.checkAttr=t.isAttr=void 0,Object.defineProperty(t,"isAttr",{enumerable:!0,get:function(){return r.isAttr}}),Object.defineProperty(t,"checkAttr",{enumerable:!0,get:function(){return r.checkAttr}});const f=["class","style"];return t.processMergeAttributes=function(e,t){const r=e||{};s(t,"class",l(e,t,"class")),s(t,"style",l(e,t,"style",";")),t.key=t.key||r.key,function(e,t){if(!e);else{let r,n;for([r,n]of Object.entries(e))if(void 0!==n&&!f.includes(r))t(n,r)}}(r,((e,r)=>{t[r]=e}));for(let e in t)if(t.hasOwnProperty(e)&&void 0===t[e])delete t[e];return t},t.joinAttrs=function(e,t){var r,n={};for(r in e)if(e.hasOwnProperty(r))n[r]=e[r];for(r in t)if(t.hasOwnProperty(r)&&void 0!==t[r])if("class"===r)n.class=i(n,t);else if("style"===r)n.style=a(n,t);else if("key"===r)n[r]=t[r];else if(!n.hasOwnProperty(r))n[r]=t[r];for(r in n)if(n.hasOwnProperty(r)&&void 0===n[r])delete n[r];return n},t.mergeAttrs=function(e,t){e=e||{},t=t||{};var r,n={};for(r in e)if(e.hasOwnProperty(r)&&void 0!==e[r]&&null!==e[r])n[r]=""!==e[r]?e[r]:void 0;for(r in t)if(t.hasOwnProperty(r)&&void 0!==t[r]&&null!==t[r])if("class"===r)n.class=i(n,t);else if("style"===r)n.style=a(n,t);else if("key"===r)n.key=t[r];else if("alt"===r)n.alt=t[r];else if("value"===r&&""===t[r])n.value=t[r];else if(!n.hasOwnProperty(r))if(t[r])n[r]=t[r];else n[r]=0===t[r]?0:void 0;return n},t.mergeEvents=function(e,t){var r,n={};for(r in u(e),u(t),e)if(e.hasOwnProperty(r))n[r]=e[r];for(r in t)if(t.hasOwnProperty(r))n[r]=n[r]?t[r].concat(n[r]):t[r];if((null==e?void 0:e.meta)&&Object.keys(e.meta).length)c(n,e.meta);if((null==t?void 0:t.meta)&&Object.keys(t.meta).length)c(n,t.meta);return n},t}(0,{},s),y=m,v=m,O=function(e,t,r,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.extendFromViewController=t.fromReactProps=void 0,t.fromReactProps=function(e,t,o){var i,a,l,s,u,c,f,p,d,b,g,m,y,v;const O=void 0!==e._$key;if(O)n.Logger.error("ÐбнаÑÑжено иÑполÑзование опÑии 'key' в "+o._moduleName+". ÐÐ»Ñ Ð¾Ð¿ÑимизаÑии поÑÑÑÐ¾ÐµÐ½Ð¸Ñ Ð½ÐµÐ¾Ð±Ñ
одимо пеÑеименоваÑÑ Ð¾Ð¿ÑиÑ",o);let C;if(e._$preparedProps&&!O)if(Object.keys(t).length)return C={...e},(0,r.resolveDefaultOptions)(C,t),C;else return e;if(C={...e},C.readOnly=null!==(i=e.readOnly)&&void 0!==i?i:null===(a=o.context)||void 0===a?void 0:a.readOnly,C.theme=null!==(l=e.theme)&&void 0!==l?l:null===(s=o.context)||void 0===s?void 0:s.theme,C._registerAsyncChild=null!==(u=e._registerAsyncChild)&&void 0!==u?u:null===(c=o.context)||void 0===c?void 0:c._registerAsyncChild,C._physicParent=null!==(f=e._physicParent)&&void 0!==f?f:null===(p=o.context)||void 0===p?void 0:p._physicParent,C.pageData=null!==(d=e.pageData)&&void 0!==d?d:null===(b=o.context)||void 0===b?void 0:b.pageData,C.Router=null!==(g=e.Router)&&void 0!==g?g:null===(m=o.context)||void 0===m?void 0:m.Router,C.isAdaptive=null!==(y=e.isAdaptive)&&void 0!==y?y:null===(v=o.context)||void 0===v?void 0:v.isAdaptive,O)C.key=C._$key;return(0,r.resolveDefaultOptions)(C,t),C},t.extendFromViewController=function(e,t){var r,n,o,i,a,l;if(!e||!e.viewController)return t;const s=e.viewController;return t.readOnly=null!==(r=t.readOnly)&&void 0!==r?r:null==s?void 0:s.readOnly,t.theme=null!==(n=t.theme)&&void 0!==n?n:null==s?void 0:s.theme,t._registerAsyncChild=null!==(o=t._registerAsyncChild)&&void 0!==o?o:null==s?void 0:s._registerAsyncChild,t._physicParent=null!==(i=t._physicParent)&&void 0!==i?i:null==s?void 0:s._physicParent,t.pageData=null!==(a=t.pageData)&&void 0!==a?a:null===(l=s.context)||void 0===l?void 0:l.pageData,t._$preparedProps=!0,t},t}(0,{},d,r),C=O,P=function(e,t,r,n){"use strict";
101return Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.calculateKey=t.plainMergeContext=t.plainMergeAttr=t.processMergeAttributes=t.uniteScope=void 0,Object.defineProperty(t,"processMergeAttributes",{enumerable:!0,get:function(){return r.processMergeAttributes}}),Object.defineProperty(t,"uniteScope",{enumerable:!0,get:function(){return n.uniteScope}}),t.plainMergeAttr=function(e,t,n){if(!e)e={};if(!t)t={};if(t.attributes&&2===Object.keys(t.attributes).length&&t.attributes.name===t.attributes.sbisname&&void 0!==t.attributes.sbisname)t={};return{inheritOptions:t.inheritOptions,context:e.context,internal:e.internal,systemOptions:{},domNodeProps:{},attributes:(0,r.processMergeAttributes)(e.attributes,t.attributes),events:(0,r.mergeEvents)(e.events,t.events)}},t.plainMergeContext=function(e,t){if(!e)e={};if(!t)t={};return{attributes:t.attributes||{},events:t.events||{},inheritOptions:e.inheritOptions,internal:e.internal,context:e.context}},t.calculateKey=function(e,t){let r;if(e.attributes&&e.attributes.key)r=e.attributes.key;return r||e.key||t.key},t.config={moduleMaxNameLength:4096},t}(0,{},m,c),h=P,_=function(e,t,r,n,o){"use strict";function i(e){return"[object String]"===Object.prototype.toString.call(e)}function a(e){if("string"!=typeof e)return e;else return e.replace(P,((e,t)=>function(e){if(e&&e.indexOf)if(0===e.indexOf("x")){var t=e.split("x")[1];e=parseInt(t,16)}if(e>65535)return e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e));else return String.fromCharCode(e)}(t)))}function l(e,t){for(var r in t)if(t.hasOwnProperty(r))return 0===e.indexOf(r)?r:void 0}function s(e){return 0===e.indexOf("wml!")||0===e.indexOf("tmpl!")||0===e.indexOf("html!")||0===e.indexOf("optional!tmpl!")}function u(e){return 0===e.indexOf("js!")}function c(e){return"string"==typeof e&&0===e.indexOf("optional!")}function f(e){return e.split("/").length>1&&!s(e)&&-1===e.indexOf("<")&&-1===e.indexOf(" ")}function p(e){const t=e&&e.prototype;if(t&&void 0!==t)return t.$constructor||t._template||e.isWasaby;else return!1}function d(e){return e.split("optional!")[1]}function b(e){let t;if(void 0!==e&&0===e.indexOf("ws:"))return t=e.split("ws:"),t[1];else return e}function g(e){return e.prototype.$constructor&&!e.prototype._template||e.prototype._dotTplFn||e.prototype._isCoreCompound}function m(e){if(e&&"object"==typeof e)return e.hasOwnProperty("__esModule")&&e.hasOwnProperty("default");else return!1}var y,v,O,C,P;Object.defineProperty(t,"__esModule",{value:!0}),t.disableCompat=t.isAnonymousFn=t.isCompat=t.isDefaultExport=t.depsTemplateResolver=t.isNewControl=t.isCompound=t.splitWs=t.splitOptional=t.isTplFunction=t.splitModule=t.isLibraryModule=t.isControl=t.isTemplateArray=t.isTemplateClass=t.isTemplateFunction=t.isControlClass=t.isStringModules=t.isSlashedControl=t.isLibraryModuleString=t.isOptionalString=t.isControlString=t.isTemplateString=t.plainMergeContext=t.plainMergeAttr=t.plainMerge=t.findResolverInConfig=t.hasResolver=t.escapeParenthesis=t.unescape=t.unescapeASCII=t.escape=t.isArray=t.isString=void 0,y=function(e){try{const t=o.loadSync(e);if(t)return t}catch(e){}return null},v=function(e,t,r){return t&&t[e]||r&&(r[e]||r["optional!"+e])||y(e)},O=function(e,t,r){return v(e,t,r)},C=function(e,t,r){if(e&&e.length)return O(e,t,r)},t.isString=i,t.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)};const h={"<":"<",">":">","'":"'",'"':""","{{":"{{","}}":"}}"},_=/&/g,j=/({{)|(}})|([<>'"])/g;t.escape=function(e){if(i(e))return(e=e.replace(_,(function(e,t,r){if("#"===r[t+1])return e;else return"&"}))).replace(j,(function(e){return h[e]||e}));else return e},P=/&#(\w*);?/g,t.unescapeASCII=a;const S=/&(nbsp|amp|quot|apos|lt|gt);/g,w={nbsp:String.fromCharCode(160),amp:"&",quot:'"',apos:"'",lt:"<",gt:">"};t.unescape=function(e){if("string"!=typeof e)return e;else return a(e).replace(S,((e,t)=>w[t]))};const A={"{{":"{{","}}":"}}"},M=/({{)|(}})/g;t.escapeParenthesis=function(e){if(i(e))return e.replace(M,(function(e){return A[e]||e}));else return e},t.hasResolver=l,t.findResolverInConfig=function(e,t){var r=l(e,t);if(r)return t[r]},t.plainMerge=function(e,t,r){var n,o={};if("object"!=typeof e&&"function"!=typeof e)e={};if(!t)t={};if(r){for(n in e)if(e.hasOwnProperty(n))o[n]=e[n]}else o=e;for(n in t)if(t.hasOwnProperty(n))o[n]=t[n];return o},t.plainMergeAttr=function(e,t){if(!e)e={};if(!t)t={};if(t.attributes&&2===Object.keys(t.attributes).length&&t.attributes.name===t.attributes.sbisname&&void 0!==t.attributes.sbisname)t={};var r;if(t.attributes&&t.attributes.key)r=t.attributes.key;r=r||t.key||e.key;const o={inheritOptions:t.inheritOptions,context:e.context,internal:e.internal,systemOptions:{},domNodeProps:{},key:r,attributes:n.processMergeAttributes(e.attributes,t.attributes),events:n.mergeEvents(e.events,t.events),_physicParent:e._physicParent,_isRootElement:e._isRootElement,isContainerNodeInline:e.isContainerNodeInline};if(e._isRootElement||e.isContainerNodeInline)o.refForContainer=e.refForContainer;return o},t.plainMergeContext=function(e,t){if(!e)e={};if(!t)t={};var r;if(t.attributes&&t.attributes.key)r=t.attributes.key;return r=r||t.key||e.key,{attributes:t.attributes||{},events:t.events||{},inheritOptions:e.inheritOptions,internal:e.internal,context:e.context,key:r,_physicParent:e._physicParent,_$templateId:e._$templateId,isContainerNodeInline:e.isContainerNodeInline}},t.isTemplateString=s,t.isControlString=u,t.isOptionalString=c,t.isLibraryModuleString=function(e){var t=0===e.indexOf("ws:")?e.replace("ws:",""):e;return/(([-_a-zA-Z0-9]+)[./]([-_a-zA-Z0-9]+)[:]([-_a-zA-Z]+))/.test(t)&&-1===t.indexOf(" ")}
101,t.isSlashedControl=f,t.isStringModules=function(e,t){return c(e)||s(e)||u(e)||f(e)||l(e,t&&t.resolvers)},t.isControlClass=p;t.isTemplateFunction=function(e){return"function"==typeof e&&7===e.length||!0===(null==e?void 0:e.isWasabyTemplate)||!1===(null==e?void 0:e.isWasabyTemplate)},t.isTemplateClass=function(e){const t=e&&e.prototype;if(t&&void 0!==t)return!0===t.isWasabyTemplate||!1===t.isWasabyTemplate||!0===e.isWasabyTemplate||!1===e.isWasabyTemplate;else return!1},t.isTemplateArray=function(e){return Array.isArray(e)&&e.hasOwnProperty("isDataArray")&&e.isDataArray},t.isControl=function(e){return e&&e.constructor&&p(e.constructor)},t.isLibraryModule=function(e){return e&&e.library&&e.module},t.splitModule=function(e){var t=(0===e.indexOf("ws:")?e.replace("ws:",""):e).split(":",2),r=t[0],n=t[1]&&t[1].replace(/\//g,".");return{library:r,module:n.split("."),fullName:`${r}:${n}`}},t.isTplFunction=function(e){return e&&e.hasOwnProperty("func")},t.splitOptional=d,t.splitWs=b,t.isCompound=g,t.isNewControl=function(e){return!g(e)},t.depsTemplateResolver=function(e,t,r){const n=b(e);var o=C(n,t,r);if(c(n)&&!o)o=C(d(n));if(m(o))o=o.default;return o},t.isDefaultExport=m;const E="undefined"==typeof window;let x;return t.isCompat=function(){if(E&&"undefined"!=typeof process)return!process.domain||process.domain.req&&!1!==process.domain.req.compatible;else return r.constants.compat},t.isAnonymousFn=function(e){return"function"==typeof e&&""===e.name},t.disableCompat=function(){let e=process&&process.domain&&process.domain.req&&process.domain.req.disableCompat||x;if(void 0===e)if(e=r.cookie.get("disableCompat"),E&&"undefined"!=typeof process){if(process&&process.domain&&process.domain.req)process.domain.req.disableCompat=e}else x=e;return void 0!==e&&"true"===e},t}(0,{},i,m,t),j=function(e,t,r,n,o,i){"use strict";function a(e,t,r){if(e!==globalThis)if(e&&void 0!==e.viewController)return e.viewController;else return e}function l(e){let t;if(e.data&&e.data[i.ISOLATED_SCOPE_FLAG])t=e.data[e.data[i.ISOLATED_SCOPE_FLAG]];return t}function s(e,t){var n,o;const i=l(t);if("contentTemplate"===t.pName&&!e.editorTemplate&&t.viewController&&("Controls/grid:GridControl"===t.viewController._moduleName||"Controls/grid:GridControl"===(null===(n=t.viewController._logicParent)||void 0===n?void 0:n._moduleName)&&(null===(o=t.viewController._logicParent)||void 0===o?void 0:o._isReactView)))return e;if(i&&!function(e){return null==e?void 0:e._preventMergeOptions}(e))if(!(i.hasOwnProperty("parent")||i.hasOwnProperty("element")&&i.element&&0!==i.element.length))e=r.FunctionUtils.merge(e,i,{rec:!(t.viewController&&t.viewController._template),preferSource:!0,ignoreRegExp:c});return e}Object.defineProperty(t,"__esModule",{value:!0}),t.resolveControlCfg=t.clearedContentOptionScope=t.addContentOptionScope=t.calcParent=void 0,t.calcParent=a;const u=`^${["data(-\\w+)+","forwardedRef","className","\\$wasabyRef","children"].join("$|^")}$`,c=new RegExp(`(${u}|^on:|^content$|^name$)`,"gi");return t.addContentOptionScope=s,t.clearedContentOptionScope=function(e,t){var r;const n=s(e,t);if(!(null===(r=null==t?void 0:t.attr)||void 0===r?void 0:r.events))return n;for(const e of Object.keys(n)){if("attribute"===t.mergeType||t.isRootTag||!/(^on[A-Z]+$)/gi.test(e))continue;const r="on:"+e.slice(2).toLowerCase();if(!t.attr.events[r]);else delete n[e]}return n},t.resolveControlCfg=function(e,t,r){const u=t.internal||{};if(e=s(e=i.calculateScope(e,o.plainMerge),t),u.logicParent=t.viewController,n.constants.compat){let o;const s=l(e);if(s){if("content"!==t.data[i.ISOLATED_SCOPE_FLAG])delete s.enabled;if(s.hasOwnProperty("enabled"))o=s.enabled}u.parent=a(t.ctx,t.pName,t.data),u.parentEnabled=(void 0===o?!0:o)&&function(e,t,r,o,i){const a=!0;if(!n.constants.compat)return a;
101if(e)return!e.isEnabled||e.isEnabled();if(!o)return a;if(r&&o[r]){if(void 0!==o[r].enabled)return o[r].enabled;if(void 0!==o[r].parentEnabled)return o[r].parentEnabled;if(i&&i.internal&&i.internal.hasOwnProperty("parentEnabled"))return i.internal.parentEnabled;else return a}if(void 0!==o.enabled)return o.enabled;if(void 0!==o.parentEnabled)return o.parentEnabled;if(i&&i.internal&&i.internal.hasOwnProperty("parentEnabled"))return i.internal.parentEnabled;else return a}(u.parent,t.ctx,t.pName,t.data,r)}return u.hasOldParent=r&&r.internal&&r.internal.isOldControl,{user:e,internal:u}},t}(0,{},r,i,_,c),S=function(e,t,r,n,o,i,a){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.VoidTags=t.OptionsResolver=t.ConfigResolver=t.Common=t.Class=t.invisibleNodeTagName=void 0,t.Class=r,t.Common=n,t.ConfigResolver=o,t.OptionsResolver=i,t.VoidTags=a.default,t.invisibleNodeTagName="invisible-node",t}(0,{},p,_,j,d,g),w=S,A=function(e,t,r,n,o,i,a,l,s){"use strict";function u(){if(d)return d;else return d=e("View/decorators")}function c(e,t,r){Object.defineProperty(e,"isDataArray",{value:!0,configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(e,"isWasabyTemplate",{value:!!r,configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(e,"toString",{value:function(){return o.Logger.templateError("ÐÑполÑзование конÑенÑной опÑии компоненÑа или Ñаблона в каÑеÑÑве ÑÑÑоки. ÐеобÑ
одимо иÑполÑзоваÑÑ ÐºÐ¾Ð½ÑенÑнÑе опÑии Ñ Ð¿Ð¾Ð¼Ð¾ÑÑÑ ÐºÐ¾Ð½ÑÑÑÑкÑии ws:partial или обÑаÑиÑеÑÑ Ð² оÑдел ÐнÑÑаÑÑÑÑкÑÑÑа пÑедÑÑавлениÑ",t),this.join("")},configurable:!0,enumerable:!1,writable:!0})}function f(e){return Object.defineProperty(e,"__UNREACHABLE_GETTER_PATH__",{value:!0,writable:!0,enumerable:!0,configurable:!0}),e}function p(e){const t=typeof e;return("object"===t||"function"===t)&&"[Types/_entity/IObject]"in e}var d,b,g,m,y,v,O,C,P,h,_,j,S,w,A,M,E,x,F,k;Object.defineProperty(t,"__esModule",{value:!0}),t._isTClosure=t.getContext=t.getRk=t.validateNodeKey=t.getTypeFunc=t.plainMergeContext=t.plainMergeAttr=t.plainMerge=t.setter=t.getter=t.makeFunctionSerializable=t.partialError=t.templateError=t.getIterator=t.iterators=t.Sanitize=t.getDecorators=t.wrapUndef=t.calcParent=t.filterOptions=t.createDataArray=t.uniteScope=t.presetScope=t.createScope=t.isolateScope=t.setUnreachablePathFlag=t.callIFun=t.needGeneratorCompatible=t.getIfNeedGeneratorCompatible=t.getDisableCompatForMarkupDecorator=t.setDisableCompatForMarkupDecorator=void 0;const T=[{type:"recordset",is:function(e){return!(!e||"[object Function]"!==Object.prototype.toString.call(e.each))},iterator:function(e,t){e.each(t)}},{type:"array",is:function(e){return e instanceof Array},iterator:function(e,t){for(let r=0;r!==e.length;r++)t(e[r],r)}},{type:"object",is:function(e){return i.ObjectUtils.isPlainObject(e)},iterator:function(e,t){for(const r in e)if(e.hasOwnProperty(r))t(e[r],r)}},{type:"int",is:function(e){return parseInt(e,10)===e},iterator:function(e,t){for(let r=0;r<e;r++)t(r,r)}}];let D,I;t.iterators=T,t.getIterator=function(e){for(const t of T)if(t.is(e))return t.iterator},t.getDecorators=u,t.setDisableCompatForMarkupDecorator=function(e){I=e},t.getDisableCompatForMarkupDecorator=function(){return I},t.getIfNeedGeneratorCompatible=function(t,r){if(I||s.Common.disableCompat()||!s.Common.isCompat()&&!t)return!1;if(D&&D.generatorConfig===r)return D;if(e.defined("View/ExecutorCompatible"))return D=e("View/ExecutorCompatible").Compatible(r),D;else return!1},t.needGeneratorCompatible=function(e,t){},t.setUnreachablePathFlag=f,t.callIFun=function(e,t,r,n){if("function"==typeof e){if(!r.some((e=>void 0===e)))return e.apply(t,r);else if(n)f(n)}else if(n)f(n)};const R={xs:375,sm:640,md:768,lg:1024,xl:1280};g=function(e,t,r){let n;b=t;try{n=function(e,t){let r,n=e;for(r=0;r<t.length;r++){if(null==n)return;const e=t[r];if(p(n)&&n.has(e))n=n.get(e);else if(n[e])n=n[e];else if("DEFAULT_BREAKPOINTS"===e)n=R;else if("_options"!==e)n=n[e]}if(r!==t.length)throw new Error(`Evaluation error. Path ${t.join(".")} is not reachable`);return n}(e,t)}catch{if(r)f(r)}return n},m=function(e,t,r){var n,o;if("record"===t[0]&&(null===(o=null===(n=null==e?void 0:e.props)||void 0===n?void 0:n.record)||void 0===o?void 0:o.has(t[1])))return a.object.implantValue(e.props,t,r);else return a.object.implantValue(e,t,r)},y=function(e){if(null==e)return"";else if(P(e))return C[e._moduleName](e);else return e},v=function(e,t){var r=n.Serializer.getFuncFromDeclaration(e?e.trim():e);if("function"==typeof r&&Object.keys(t).length)r=r.bind(void 0,t);
101if("function"!=typeof r)o.Logger.error(`Function "${e}" has not been loaded yet! Add this function to the module definition`);return r},C={"Types/collection:Enum":O=function(e){return String(e)},"Data/collection:Enum":O,"Data/_collection/Enum":O,"WS.Data/Type/Enum":O},P=function(e){return e&&e._moduleName&&C.hasOwnProperty(e._moduleName)},h=["name","forwardedRef","$wasabyRef","_$createdFromCode"],_=function(e){return!h.includes(e)},j=function(e){var t,r,n={};if(r=e,"[object Object]"!==Object.prototype.toString.call(r))return e;for(t in e)if(_(t))n[t]=e[t];return n},S=function(e,t,r){if(b&&t.message.indexOf("apply")>-1)t=new Error("Field "+b.toString().replace(/,/g,".")+" is not a function!");o.Logger.templateError("Failed to generate html",e,r,t)},w=function(){try{if("undefined"!=typeof window)throw new Error("[UICore/Executor/TClosure:partialError()]")}catch(e){o.Logger.error("ÐÑполÑзование ÑÑнкÑии в каÑеÑÑве ÑÑÑоковой пеÑеменной! ÐеобÑ
одимо обеÑнÑÑÑ Ð² Ñег ws:partial",null,e)}},A=function(e,t){var r="";if("undefined"==typeof window)r=e.toString();if((e=e.bind(t)).toStringOrigin=e.toString,e.toString=function(){if("undefined"==typeof window&&r.indexOf("createControl")>-1)w();return e(this)}.bind(t),"undefined"==typeof window)e.toJSON=function(){return"TEMPLATEFUNCTOJSON="+r};return e},M=function(e,t,n,o){if(c(e,t,n),!e.length||!e[0])return e;if(!e[0].internal||!0!==o)return e;const i=function(e,t,n){return(0,r.jsx)(i.array,{...e,...t,context:n})};return i.array=e,c(i,t,n),i},E=function(t){var r=e("Core/Sanitize"),n=u()._sanitizeOpts();if("undefined"!=typeof process&&!process.versions)t=s.Common.escapeParenthesis(t);return r(t,n)},x=function(e){if(e||0===e)return e;else return"_"},F=function(e){var t,r=e.split("/")[0];return this.getRkCache=this.getRkCache||{},t=this.getRkCache[r]||requirejs("i18n!"+r),this.getRkCache[r]=t,t},k=function(e){let t=e;for(;t;){if(t.hasOwnProperty("_container"))return t;t=t.__proto__}return e},t.getter=g,t.setter=m,t.wrapUndef=y,t.getTypeFunc=v,t.filterOptions=j,t.templateError=S,t.partialError=w,t.makeFunctionSerializable=A,t.createDataArray=M,t.Sanitize=E,t.validateNodeKey=x,t.getRk=F,t.getContext=k;const N=l.isolateScope;t.isolateScope=N;const $=l.createScope;t.createScope=$;const L=l.presetScope;t.presetScope=L;const G=l.uniteScope;t.uniteScope=G;const U=s.ConfigResolver.calcParent;t.calcParent=U;const z=s.Common.plainMerge;t.plainMerge=z;const V=s.Common.plainMergeAttr;t.plainMergeAttr=V;const W=s.Common.plainMergeContext;t.plainMergeContext=W;return t._isTClosure=!0,t}(a,{},e,n,r,r,o,c,S),M=A,l.extendFromViewController=l.fromReactProps=l._isTClosure=l.getIfNeedGeneratorCompatible=l.getDisableCompatForMarkupDecorator=l.setDisableCompatForMarkupDecorator=l.getContext=l.getRk=l.validateNodeKey=l.getTypeFunc=l.plainMergeContext=l.plainMergeAttr=l.plainMerge=l.setter=l.getter=l.makeFunctionSerializable=l.partialError=l.templateError=l.getIterator=l.iterators=l.Sanitize=l.getDecorators=l.wrapUndef=l.calcParent=l.filterOptions=l.createDataArray=l.uniteScope=l.presetScope=l.createScope=l.isolateScope=l.callIFun=l.setUnreachablePathFlag=l._IGeneratorType=l.Class=l.ConfigResolver=l.VoidTags=l.invisibleNodeTagName=l.CommonUtils=l.Helper=l._IBuilder=l._IGenerator=l.OptionsResolver=l.Scope=l.AttrHelper=l.processMergeAttributes=l.Attr=void 0,l.Attr=y,Object.defineProperty(l,"processMergeAttributes",{enumerable:!0,get:function(){return v.processMergeAttributes}}),l.AttrHelper=u,l.Scope=f,l.OptionsResolver=b,l.Helper=h,Object.defineProperty(l,"CommonUtils",{enumerable:!0,get:function(){return w.Common}}),Object.defineProperty(l,"invisibleNodeTagName",{enumerable:!0,get:function(){return w.invisibleNodeTagName}}),Object.defineProperty(l,"VoidTags",{enumerable:!0,get:function(){return w.VoidTags}}),Object.defineProperty(l,"ConfigResolver",{enumerable:!0,get:function(){return w.ConfigResolver}}),Object.defineProperty(l,"Class",{enumerable:!0,get:function(){return w.Class}}),Object.defineProperty(l,"setUnreachablePathFlag",{enumerable:!0,get:function(){return M.setUnreachablePathFlag}}
101),Object.defineProperty(l,"callIFun",{enumerable:!0,get:function(){return M.callIFun}}),Object.defineProperty(l,"isolateScope",{enumerable:!0,get:function(){return M.isolateScope}}),Object.defineProperty(l,"createScope",{enumerable:!0,get:function(){return M.createScope}}),Object.defineProperty(l,"presetScope",{enumerable:!0,get:function(){return M.presetScope}}),Object.defineProperty(l,"uniteScope",{enumerable:!0,get:function(){return M.uniteScope}}),Object.defineProperty(l,"createDataArray",{enumerable:!0,get:function(){return M.createDataArray}}),Object.defineProperty(l,"filterOptions",{enumerable:!0,get:function(){return M.filterOptions}}),Object.defineProperty(l,"calcParent",{enumerable:!0,get:function(){return M.calcParent}}),Object.defineProperty(l,"wrapUndef",{enumerable:!0,get:function(){return M.wrapUndef}}),Object.defineProperty(l,"getDecorators",{enumerable:!0,get:function(){return M.getDecorators}}),Object.defineProperty(l,"Sanitize",{enumerable:!0,get:function(){return M.Sanitize}}),Object.defineProperty(l,"iterators",{enumerable:!0,get:function(){return M.iterators}}),Object.defineProperty(l,"getIterator",{enumerable:!0,get:function(){return M.getIterator}}),Object.defineProperty(l,"templateError",{enumerable:!0,get:function(){return M.templateError}}),Object.defineProperty(l,"partialError",{enumerable:!0,get:function(){return M.partialError}}),Object.defineProperty(l,"makeFunctionSerializable",{enumerable:!0,get:function(){return M.makeFunctionSerializable}}),Object.defineProperty(l,"getter",{enumerable:!0,get:function(){return M.getter}}),Object.defineProperty(l,"setter",{enumerable:!0,get:function(){return M.setter}}),Object.defineProperty(l,"plainMerge",{enumerable:!0,get:function(){return M.plainMerge}}),Object.defineProperty(l,"plainMergeAttr",{enumerable:!0,get:function(){return M.plainMergeAttr}}),Object.defineProperty(l,"plainMergeContext",{enumerable:!0,get:function(){return M.plainMergeContext}}),Object.defineProperty(l,"getTypeFunc",{enumerable:!0,get:function(){return M.getTypeFunc}}),Object.defineProperty(l,"validateNodeKey",{enumerable:!0,get:function(){return M.validateNodeKey}}),Object.defineProperty(l,"getRk",{enumerable:!0,get:function(){return M.getRk}}),Object.defineProperty(l,"getContext",{enumerable:!0,get:function(){return M.getContext}}),Object.defineProperty(l,"setDisableCompatForMarkupDecorator",{enumerable:!0,get:function(){return M.setDisableCompatForMarkupDecorator}}),Object.defineProperty(l,"getDisableCompatForMarkupDecorator",{enumerable:!0,get:function(){return M.getDisableCompatForMarkupDecorator}}),Object.defineProperty(l,"getIfNeedGeneratorCompatible",{enumerable:!0,get:function(){return M.getIfNeedGeneratorCompatible}}),Object.defineProperty(l,"_isTClosure",{enumerable:!0,get:function(){return M._isTClosure}}),Object.defineProperty(l,"fromReactProps",{enumerable:!0,get:function(){return C.fromReactProps}}),Object.defineProperty(l,"extendFromViewController",{enumerable:!0,get:function(){return C.extendFromViewController}}),l})); 102define("UICommon/State",["WasabyLoader/Library","Types/serializer","require","exports"],(function(e,r,t,i){var n,l,s,a;return Object.defineProperty(i,"__esModule",{value:!0}),n=function(e,r){"use strict";return Object.defineProperty(r,"__esModule",{value:!0}),r.default='\n/*#DELETE IT START#*/\nfunction debug() { debugger; }\nvar thelpers = typeof tclosure === "undefined" || !tclosure ? arguments[arguments.length - 1] : tclosure;\nif (typeof thelpers === "undefined" || !thelpers._isTClosure) {\n eval("var thelpers = null;");\n thelpers = (function(){\n return this || (0, eval)("this")\n })().requirejs("UICore/Executor").TClosure;\n}\nvar depsLocal = typeof _deps === "undefined" ? undefined : _deps;\nif (typeof includedTemplates === "undefined") {\n eval("var includedTemplates = undefined;");\n includedTemplates = (this && this.includedTemplates) ? this.includedTemplates : {};\n}\n/*#DELETE IT END#*/\n\nvar templateCount = 0;\nvar key = thelpers.validateNodeKey(attr && attr.key);\nvar defCollection = {id: [], def: undefined};\nvar viewController = thelpers.calcParent(this, typeof pName === "undefined" ? undefined : pName, data);\n',r}(0,{}),l=function(e){function r(e){return/^\w+$/.test(e)}function t(e,r){var t=r.match(/\w+\.rdi([^(]+)?\(\s*(\w+)\s*,\s*(\w+)\s*,\s*(\w+)\s*\)/);if(t)e.thelpers=t[2],e.depsLocal=t[3],e.viewController=t[4]}function i(i){var n,s,a=function(e){var r=e.indexOf("(")+1,t=e.indexOf(")",r),i=e.slice(r,t),n=i.split(",").map((function(e){return e.trim()})),l=e.indexOf("{")+1,s=e.lastIndexOf("}"),a=e.slice(l,s);return{args:n,stringArgs:i,body:a}}(i),o={data:(s=a.args)[0],attr:s[1],context:s[2],isVdom:s[3],sets:s[4],thelpers:void 0,depsLocal:void 0,viewController:void 0};return t(o,i),n=function(e,r){return e.replace(/data/g,r.data).replace(/attr/g,r.attr)}(n=function(){if(void 0===l)l=(l=e.default)?l.replace(/\r/g,""):"";return l}(),o),n=function(e,t,i){var n,l;if("string"==typeof t.thelpers)return e.replace(/thelpers/g,t.thelpers);if(l=i.match(/\w+\.(templateError|L)\(/g))if(r(n=l.pop().split(".").shift()))return t.thelpers=n,e.replace(/thelpers/g,n);if(l=i.match(/(\w+)\.(validateNodeKey|v)[^(]*\(\w+\s*&&\s*\w+\.key\)/))if(r(n=l[1]))return t.thelpers=n,e.replace(/thelpers/g,n);
102if(l=i.match(/(\w+)\.(validateNodeKey|v)[^(]*\(\w+\?\.key\)/))if(r(n=l[1]))return t.thelpers=n,e.replace(/thelpers/g,n);return e}(n,o,a.body),n=function(e,t,i){var n,l,s,a,o,p;if("string"==typeof t.viewController)return e.replace(/viewController/g,t.viewController);if(l=i.match(/,\s*['"]?viewController['"]?\s*:\s*\w+\s*,/g))if(r(n=l.pop().split(":").pop().replace(",","").trim()))return t.viewController=n,e.replace(/viewController/g,n);if(s=new RegExp("]\\s*,\\s*"+t.attr+"\\s*,\\s*\\w+\\s*,\\s*\\w+\\s*\\,\\s*(true|false)\\s*\\)","g"),l=i.match(s))if(r(n=l.pop().split(",")[3].trim()))return t.viewController=n,e.replace(/viewController/g,n);if(a=i.match(/(\w+)\s*=\s+["']viewController['"][,;]/g),Array.isArray(a))for(o in a)if(p=a[o].split("=")[0].trim(),s=new RegExp("\\["+p+"\\]\\s*:\\s*(\\w+)",""),l=i.match(s))if(r(n=l[1]))return t.viewController=n,e.replace(/viewController/g,n);return e}(n,o,a.body),n=function(e,t,i){var n,l,s,a,o,p;if("string"==typeof t.depsLocal)return e.replace(/depsLocal/g,t.depsLocal);if(l=new RegExp(",\\s*"+t.context+"\\s*,\\s*\\w+\\s*,\\s*\\w+\\s*,\\s*"+t.thelpers+"\\.config\\s*\\)","g"),s=i.match(l))if(r(n=s.pop().split(",")[2].trim()))return t.depsLocal=n,e.replace(/depsLocal/g,n);if(l=new RegExp(",\\s*\\w+\\s*,\\s*\\w+\\s*,\\s*"+t.thelpers+"\\.config\\s*,","g"),s=i.match(l))if(r(n=s.pop().split(",")[1].trim()))return t.depsLocal=n,e.replace(/depsLocal/g,n);if(l=new RegExp(",\\s*['\"]?depsLocal['\"]?:\\s*(\\w+),","g"),s=i.match(l))if(r(n=s.pop().split(",")[1].split(":")[1].trim()))return t.depsLocal=n,e.replace(/depsLocal/g,n);if(a=i.match(/(\w+)\s*=\s+["']depsLocal['"][,;]/g),Array.isArray(a))for(o in a)if(p=a[o].split("=")[0].trim(),l=new RegExp("\\["+p+"\\]\\s*:\\s*(\\w+)",""),s=i.match(l))if(r(n=s[1]))return t.depsLocal=n,e.replace(/depsLocal/g,n);return e}(n,o,a.body),{compatibilityHeader:n,identifiers:o,func:a}}function n(e){var r=i(e),t=function(e,r){var t,i,n;try{return t=new Function(r.stringArgs,e+r.body),n=t,i=function(){if(this===window)return n.apply(void 0,arguments);else return n.apply(this,arguments)},i.fromSerializer=!0,i}catch(e){return}}(r.compatibilityHeader,r.func);if(t)return t;else return e}var l;return n.findRdiFunctionCall=t,n.repairTemplateFunction=i,n}(n),s=function(e,r,t,i,n){"use strict";let l;return Object.defineProperty(r,"__esModule",{value:!0}),r.Serializer=void 0,Object.defineProperty(r,"Serializer",{enumerable:!0,get:function(){return t.Serializer}}),t.Serializer.pushDeserializePattern({patternRegExp:/^TEMPLATEFUNCTOJSON=functio\S\s*\w+/,action:n}),t.Serializer.pushDeserializePattern({patternRegExp:/^CONTENT_OPTION,(\d+),/,action:function(r){return function(){if(!l)l=e("Compiler/IR");return l}().deserialize(r)}}),t.Serializer.parseDeclaration=i.parse,r}(t,{},r,e,l),a=s,i.Serializer=void 0,Object.defineProperty(i,"Serializer",{enumerable:!0,get:function(){return a.Serializer}}),i})); 103define("Types/serializer",["Types/object","Types/di","Env/Env","require","exports"],(function(e,t,r,n,i){var o,a,s,l;return Object.defineProperty(i,"__esModule",{value:!0}),o=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.NEW_TYPE=t.TYPE=t.SERIALIZED_KEY=void 0,t.SERIALIZED_KEY="$serialized$",t.TYPE={INST:"inst",FUNC:"func",LINK:"link",P_INF:"+inf",M_INF:"-inf",UNDEF:"undef",NAN:"NaN"},t.NEW_TYPE={P_INF:"$+i",M_INF:"$-i",UNDEF:"$u",NAN:"$n",DATE:"$d"},t}(0,{}),a=function(e,t,r,n,i){function o(e,t,r){var n,i;if(r&&r.isInstantiable&&!1===r.isInstantiable(e))if((n=r.resolve(e))&&!n.prototype)n=void 0;if(!n&&g.parseDeclaration){if(i=g.parseDeclaration(e),!(n=t(i.name)))throw new Error('The module "$'+i.name+"\" is not loaded yet. Please make sure it's included into application dependencies.");if(n.__esModule&&n.default)n=n.default;i.path.forEach((function(e,t){if(!(e in n)){var r=i.path.join(".");throw new Error('The module "'+i.name+'" doesn\'t export element "'+e+'" which suppose to be found within path "'+r+'" at position '+t+".")}n=n[e]}))}if(!n.prototype)throw new Error('The module "'+e+'" is not a class constructor.');if("function"!=typeof n.fromJSON&&"function"!=typeof n.prototype.fromJSON)throw new Error('The class "'+e+"\" doesn't have fromJSON() method.");return n}function a(e){var r=new Date(e);if(t.detection.isIE&&"Invalid Date"===r.toString())r=Date.fromSQL(e);return r}var s=i.SERIALIZED_KEY,l=i.TYPE.INST,u=i.TYPE.FUNC,c=i.TYPE.LINK,d=i.TYPE.P_INF,f=i.TYPE.M_INF,p=i.TYPE.UNDEF,h=i.TYPE.NA
103N,_=i.NEW_TYPE.P_INF,v=i.NEW_TYPE.M_INF,m=i.NEW_TYPE.UNDEF,N=i.NEW_TYPE.NAN,y=i.NEW_TYPE.DATE,g=function(t,r){if(this.loader=e,this._functionStorage=[],this._instanceStorage={},this._linksStorage={},this._depsStorage={},this._unresolvedLinks=[],this._unresolvedInstances=[],this._unresolvedInstancesId=[],this._isServerSide=r,t)if("object"==typeof t)this._instanceStorage=t;else throw new Error("Storage must be a object");this.serialize=g.serializeWith(this),this.serializeStrict=g.serializeWith(this,!0),this.deserialize=g.deserializeWith(this)};return g.prototype.loader=null,Object.defineProperty(g.prototype,"di",{get:function(){return this._di||r},set:function(e){this._di=e}}),g.prototype._functionStorage=null,g.prototype._instanceStorage=null,g.prototype._linksStorage=null,g.prototype._depsStorage=null,g.prototype._unresolvedLinks=null,g.prototype._unresolvedInstances=null,g.prototype._unresolvedInstancesId=null,g.prototype.setDetectContainers=function(){},g.prototype.isDetectContainers=function(){},g.prototype.serialize=function(){},g.serializeWith=function(e,t){return function(r,i){var o,a,c,d,f,p=typeof i,h=i&&"object"===p,y=h&&n.isPlainObject(i);if(h&&!Array.isArray(i)&&!y){if(e._isServerSide)return;return o=(f||"ws-")+Math.random().toString(36).substr(2)+ +new Date,e._instanceStorage[o]=i,(a={id:o})[s]=l,a}if("function"===p){if(e._isServerSide)return;if(e._functionStorage.push(i),(c={id:e._functionStorage.length-1})[s]=u,!i._moduleName&&t)throw new Error("Ðевозможно ÑеÑиализоваÑÑ ÑÑнкÑÐ¸Ñ (Ñ prototype.moduleName = "+(i.prototype&&i.prototype._moduleName)+", дополниÑелÑÐ½Ð°Ñ Ð¸Ð½ÑоÑмаÑиÑ: "+i.templateInfo+") "+i.toString());if(!i._moduleName)return c;if(i._moduleName.indexOf(":")>-1)d=i._moduleName.split(":"),c.module=d[0],c.path=d[1];else c.module=i._moduleName;return c}if(i===1/0)return _;if(i===-1/0)return v;if("number"===p&&isNaN(i))return N;if(!isNaN(Number(r))&&Number(r)>=0&&void 0===i)return m;if(void 0===i)return m;if(h)if(i[s]===u)e._depsStorage[i.module]=!0;return e._serializeLink(i)}},g.prototype.deserialize=function(){},g._patterns=[{name:"DATE",patternRegExp:/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:[0-9.]+Z$/,action:a}],g.pushDeserializePattern=function(e){g._patterns.push(e)},g._ignorePatternNames=new Set,g.setIgnorePatternName=function(e){g._ignorePatternNames.add(e)},g.deleteIgnorePatternName=function(e){g._ignorePatternNames.delete(e)},g.setMetaHandler=function(e,t){},g.deserializeWith=function(e){return function(r,n){var i,o,E,S,I,w,P=n,T=n instanceof Object;if(T&&n.hasOwnProperty(s))switch(n[s]){case u:if("number"==typeof n.id&&e._functionStorage[n.id])P=e._functionStorage[n.id];else if(!n.module)P=function(){t.IoC.resolve("ILogger").warn("Types/serializer:Serializer",'ÐопÑÑка вÑзваÑÑ Ð½Ð° клиенÑе ÑÑнкÑÐ¸Ñ (название "'+r+'"), коÑоÑÐ°Ñ Ð±Ñла ÑеÑиализована на ÑеÑвеÑе и коÑоÑÐ°Ñ Ð½Ðµ ÑвлÑеÑÑÑ ÑаÑÑÑÑ ÐºÐ°ÐºÐ¾Ð³Ð¾-либо модÑлÑ. То еÑÑÑ Ðº ÑÑой ÑÑнкÑии Ð½ÐµÑ Ð¿ÑÑмого доÑÑÑпа на клиенÑе. ÐодÑобнее ÑÑÑ https://wi.sbis.ru/doc/platform/developmentapl/interface-development/pattern-and-practice/serialization/')},t.IoC.resolve("ILogger").warn("Types/serializer:Serializer",'ÐопÑÑка деÑеÑеализоваÑÑ Ð½Ð° клиенÑе ÑÑнкÑÐ¸Ñ (название "'+r+'"), коÑоÑÐ°Ñ Ð±Ñла ÑеÑиализована на ÑеÑвеÑе и коÑоÑÐ°Ñ Ð½Ðµ ÑвлÑеÑÑÑ ÑаÑÑÑÑ ÐºÐ°ÐºÐ¾Ð³Ð¾-либо модÑлÑ. То еÑÑÑ Ðº ÑÑой ÑÑнкÑии Ð½ÐµÑ Ð¿ÑÑмого доÑÑÑпа на клиенÑе. ÐодÑобнее ÑÑÑ https://wi.sbis.ru/doc/platform/developmentapl/interface-development/pattern-and-practice/serialization/');else{i=n.module+(n.path?":"+n.path:"");try{o=e.loader(n.module)}catch(e){t.IoC.resolve("ILogger").warn("Types/serializer:Serializer",'ÐопÑÑка деÑеÑиализоваÑÑ Ð½Ð° клиенÑе модÑÐ»Ñ (название "'+i+'"), коÑоÑÑй пÑедваÑиÑелÑно не загÑÑжен.')}if(o){try{if(P=o,n.path)for(E=n.path.split(".");S=E.shift();)P=P[S]}catch(e){throw new Error('Parsing function declaration "'+i+'" failed. Original message: '+e.message)}if("function"!=typeof P)throw new Error("Can't transform \""+i+'" declaration to function');else P.wsHandlerPath=i}else P=i}break;case y:P=a(n.state);break;case l:e._unresolvedInstances.push({scope:this,name:r,value:n}),e._unresolvedInstancesId.push(n.id);break;case c:e._unresolvedLinks.push({scope:this,name:r,value:n});break;case d:P=1/0;break;case f:P=-1/0;break;case p:P=void 0;break;case h:P=NaN;break;default:throw new Error('Unknown serialized type "'+n[s]+'" detected')}if("string"==typeof P)switch(P){case m:return;case _:return 1/0;case v:return-1/0;case N:return NaN;default:for(I=0;I<g._patterns.length;I++)if(!(w=g._patterns[I]).name||!g._ignorePatternNames.has(w.name))if(w.patternRegExp.test(P))return w.action(P)}if(""===r&&T&&1===Object.keys(this).length)if(e._resolveLinks(),e._resolveInstances(),P===n)P=this[r];return P}},g.setToJsonForFunction=function(e,t,r){e.toJSON=function(){var e={module:t};if(e[s]=u,r)e.path=r;return e}},g.getFuncFromDeclaration=function(t){var r,n,i,o,a=t.split(":");try{i=e(a[0])}catch(e){}if(i){try{if(n=i,a[1]){for(r=a[1].split(".");o=r.shift();)n=n[o];if("function"==typeof n){if(!n.toJSON)g.setToJsonForFunction(n,a[0],a[1]);n.wsHandlerPath=t}}}catch(e){throw new Error('Parsing function declaration "'+t+'" failed. Original message:'+e.message)}if("function"!=typeof n)throw new Error("Can't transform \""+t+'" declaration to function')}else n=t;return n},g.prototype._serializeLink=function(e){var t,r;if(e&&"object"==typeof e&&e[s]===l&&e.hasOwnProperty("id")){if(t=e.id,this._linksStorage.hasOwnProperty(t))return(r={id:t})[s]=c,r;this._linksStorage[t]=e}return e},g.prototype._resolveLinks=function(){var e,t,r,n;for(e=0;e<this._unresolvedLinks.length;e++)if(!(t=this._unresolvedLinks[e]).linkResolved){if(-1===(r=this._unresolvedInstancesId.indexOf(t.value.id)))throw new Error("Can't resolve link for property \""+t.name+'" with instance id "'+t.value.id+'".');if(n=this._unresolvedInstances[r],t.scope[t.name]=n.value,t.value=n.value,t.linkResolved=!0,!n.instanceResolved)this._unresolvedInstances.splice(1+r,0,t),this._unresolvedInstancesId.splice(1+r,0,t.value.id)}},g.prototype._resolveInstances=function(){var e,r,n,i;for(e=0;e<this._unresolvedInstances.length;e++)if(!(r=this._unresolvedInstances[e]).instanceResolved){if(n=null,this._instanceStorage[r.value.id])n=this._instanceStorage[r.value.id];else if(r.value.module){try{n=(i=o(r.value.module,this.loader,this.di)).fromJSON?i.fromJSON(r.value):i.prototype.fromJSON.call(i,r.value)}catch(e){t.IoC.resolve("ILogger").error("Types/serializer:Serializer",e.stack||e),n=null}this._instanceStorage[r.value.id]=n}r.scope[r.name]=n,r.value=n,r.instanceResolved=!0}},g}(n,r,t,e,o),s=function(e,t,r){"use strict";
103Object.defineProperty(t,"__esModule",{value:!0}),t.Serializer=void 0;return t.Serializer=r,t}(0,{},a),l=s,i.Serializer=void 0,Object.defineProperty(i,"Serializer",{enumerable:!0,get:function(){return l.Serializer}}),i})); 104define("UICore/Executor",["tslib","react/jsx-runtime","react-dom/client","react","WasabyLoader/ModulesLoader","UICore/Ref","UICore/Focus","UICore/Events","UICore/Contexts","UICommon/Vdom","UICommon/Utils","UICommon/Focus","UICommon/Executor","UICommon/Events","Env/Env","Application/Env","require","exports"],(function(e,t,r,n,o,i,a,s,l,c,u,f,d,p,m,y,g,h){var v,b,C,R,_,A,O,P,T,E,k,w,j,x,S,F,N,$,W,M,L,I,D,U,V,B,Y,z,H,G,q,X,K,Q,Z,J,ee,te,re,ne,oe,ie;return Object.defineProperty(h,"__esModule",{value:!0}),v=function(e,t){"use strict";function r(e){return!!e&&e[f]===p}function n(e){return!!e&&(e[f]===d||e[f]===h)}function o(e){let t=e;for(;r(t);)t=t.type;return t}function i(e){const t=o(e);return t&&t[f]===m}function a(e){const r=o(e);return Boolean((null==e?void 0:e[t.WASABY_REF_SYMBOL])||(null==r?void 0:r[t.WASABY_REF_SYMBOL]))}function s(e){const t=o(e),r=null==t?void 0:t.prototype;if(r)return"function"==typeof r.render;else return!1}function l(e){const t=o(e);if("function"!=typeof t)return!1;if(s(t))return!1;else return 0===t.length||1===t.length}function c(e){if(!e)return!1;const t=e;return Boolean(t.isDataArray||t.isWasabyTemplate)}function u(e){return function(e){return"object"==typeof e&&null!==e}(e)&&c(e)&&"function"==typeof e.render}Object.defineProperty(t,"__esModule",{value:!0}),t.isValidChildren=t.isWasabyContentType=t.isWasabyRenderObject=t.isWmlTemplateType=t.isWasabyTemplateType=t.isWasabyControlType=t.isReactComponentType=t.isFunctionComponent=t.isContextProvider=t.isContextConsumer=t.isComponentClass=t.shouldPassRef=t.hasWasabyApiRef=t.hasWasabyRef=t.markWasabyApiRef=t.markWasabyRef=t.isForwardRef=t.isReactElementArray=t.isReactPortal=t.isReactElement=t.WASABY_API_REF_SYMBOL=t.WASABY_REF_SYMBOL=void 0;const f="$$typeof",d=Symbol.for("react.element"),p=Symbol.for("react.memo"),m=Symbol.for("react.forward_ref"),y=Symbol.for("react.context"),g=Symbol.for("react.consumer"),h=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal");t.WASABY_REF_SYMBOL=Symbol.for("wasaby.ref"),t.WASABY_API_REF_SYMBOL=Symbol.for("wasaby.apiRef");return t.isReactElement=n,t.isReactPortal=function(e){return!!e&&e[f]===v},t.isReactElementArray=function(e){return Array.isArray(e)&&e.length>0&&e.every(n)},t.isForwardRef=i,t.markWasabyRef=function(e){return e[t.WASABY_REF_SYMBOL]=!0,e},t.markWasabyApiRef=function(e){return e[t.WASABY_API_REF_SYMBOL]=!0,e},t.hasWasabyRef=a,t.hasWasabyApiRef=function(e){const r=o(e);return Boolean((null==e?void 0:e[t.WASABY_API_REF_SYMBOL])||(null==r?void 0:r[t.WASABY_API_REF_SYMBOL]))},t.shouldPassRef=function(e){return i(e)||a(e)},t.isComponentClass=s,t.isContextConsumer=function(e){const t=o(e);return t&&t[f]===g},t.isContextProvider=function(e){const t=o(e);return t&&t[f]===y},t.isFunctionComponent=l,t.isReactComponentType=function(e){return r(e)||s(e)||i(e)||l(e)},t.isWasabyControlType=function(e,t){return Boolean(e&&e.UNSAFE_isReact&&!(null==t?void 0:t._$attributes)&&!(null==t?void 0:t._$createdFromCode))},t.isWasabyTemplateType=c,t.isWmlTemplateType=function(e){if(!e)return!1;const t=e;return Boolean(t.isDataArray||!0===t.isWasabyTemplate||!1===t.isWasabyTemplate)},t.isWasabyRenderObject=u,t.isWasabyContentType=function(e){return c(e)||u(e)},t.isValidChildren=function(e){if(!e)return!1;if(n(e))return!0;if(Array.isArray(e)){for(const t of e)if(!n(t))return!1;return!0}return!1},t}(0,{}),b=v,C=function(e,t,r,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=(0,n.forwardRef)((function({content:e,children:t,...n},o){return(0,r.jsx)(e,{forwardedRef:o,...n})})),t}(0,{},t,n),R=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=["on:activated","on:deactivated"];return t.default=new class{executeFocusEventsObject(e){const t={};let n;for(const o of r)if(e[o])n=!0,t[o]=e[o],delete e[o];if(n)return t}saveFocusEventsAsFocusCallbacks(e){this.focusCallbacks=e}takeFocusCallbacks(){const e=this.focusCallbacks;return this.focusCallbacks=void 0,e}},t}(0,{}),_=function(e,t,r,n){"use strict";function o(e){return e.hasOwnProperty("data")}
104Object.defineProperty(t,"__esModule",{value:!0}),t.addDataQaEventAttributes=void 0,t.addDataQaEventAttributes=function(e,t,s){var l,c;if(!function(){if(i)return"true"===r.cookie.get("bindToAttribute");if(void 0!==a)return a;return a="true"===r.cookie.get("bindToAttribute"),a}())return;if(!t&&!(null===(l=null==s?void 0:s.attr)||void 0===l?void 0:l.events))return;let u={};if((null===(c=null==s?void 0:s.attr)||void 0===c?void 0:c.events)&&"attribute"===s.mergeType)u=n.Attr.mergeEvents(s.attr.events,t);else u=t;for(const t of Object.keys(u))if(t.startsWith("on:"))for(const r of u[t])if(r)if(o(r)){const n=t.replace("on:","data-qa-").toLowerCase();e[n]=e[n]||r.bindValue}};const i="undefined"==typeof window;let a;return t}(0,{},y,d),A=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CreateInvisibleNodeRef=void 0;class o extends r.Responsibility{constructor(e,t){super(),this.type=r.INVISIBLE_NODE_HANDLER_TYPE,this.control=e,this.isContainerNode=t}transferEvents(e,t){var r;const o=null===(r=this.control)||void 0===r?void 0:r.props._$events;if(o&&Object.keys(o).length)for(const e of Object.keys(o)){const r=e.split(":"),i=o[e];for(const e of i){if(!n.wasabyEventIntersection["on:"+r[1]])continue;const o=t=>{if("function"==typeof e)return void e(t);let r;if((0,n.isCustomEvent)(t))r=t.detail;else r=[t,...e.args||[]];return e.viewController[e.value].apply(e.viewController,r)},i=r[1];t.addEventListener(i,o);const a=function(){t.removeEventListener(i,o)};if(void 0!==e.viewController){if(!e.viewController._$needRemoveBeforeUnmount)e.viewController._$needRemoveBeforeUnmount=[];e.viewController._$needRemoveBeforeUnmount.push(a)}}}}transferControlNodes(e,t){if(e.controlNodes){for(const r of e.controlNodes)this.patchControlNode(r,t),this.patchControl(r,t);if(!t.controlNodes)t.controlNodes=[];for(const r of e.controlNodes.reverse())t.controlNodes.unshift(r)}}transferControls(e,t){if(e._$controls){for(const r of e._$controls)this.patchControl(r,t);if(!t._$controls)t._$controls=[];for(const r of e._$controls.reverse())t._$controls.unshift(r)}}clearNode(e){e.controlNodes=void 0,e._$controls=void 0}patchControlNode(e,t){e.element=t}patchControl(e,t){e.control._container=t}getHandler(){return e=>{if(!e)return;const t=e.parentNode;if(t&&e){if(this.isContainerNode)this.transferEvents(e,t);this.transferControlNodes(e,t),this.transferControls(e,t),this.clearNode(e)}}}isEqual(e){return this.control===e.control&&this.isContainerNode===e.isContainerNode}}return t.CreateInvisibleNodeRef=o,t}(0,{},i,s),O=function(e,t,r,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CreateNotifyRef=void 0;class i extends n.Responsibility{constructor(e,t){super(),this.events=e,this.type=n.NOTIFY_EVENT_TYPE,this.control=t}getHandler(){if(!Object.keys(this.events).length)return()=>{};else return e=>{if(e)try{r.WasabyEvents.getInstance(e).setEventHook(this.events,e,this.control)}catch(t){if("WrongEventArr"===t.message)o.logger.error("ÐепÑавилÑно пеÑÐµÐ´Ð°Ð½Ñ ÑобÑÑиÑ",e)}}}isEqual(e){return this.control===e.control}}return t.CreateNotifyRef=i,t}(0,{},s,i,y),P=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CreateWheelEventRef=void 0;class o extends r.Responsibility{constructor(e){super(),this.handler=e,this.type=r.WHEEL_EVENT_HANDLER_TYPE}getHandler(){if(!this.handler)return()=>{};else return e=>{if(e)try{if(e.__$wheelEvent)e.removeEventListener("wheel",e.__$wheelEvent),delete e.__$wheelEvent;e.addEventListener("wheel",this.handler,{passive:!1}),e.__$wheelEvent=this.handler}catch(t){if("WrongEventArr"===t.message)n.logger.error("ÐепÑавилÑно пеÑÐµÐ´Ð°Ð½Ñ ÑобÑÑиÑ",e)}}}isEqual(e){return this.handler===e.handler}}return t.CreateWheelEventRef=o,t}(0,{},i,y),T=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeoutHandlersQueue=void 0;return t.TimeoutHandlersQueue=class{constructor(e){this.timeout=e,this.handlersQueue=[]}addHandler(e){const t=this.handlersQueue.length;if(this.handlersQueue.push(e),!t)setTimeout((()=>{const e=this.handlersQueue;this.handlersQueue=[],setTimeout((()=>{for(const t of e)t()}),this.timeout)}),0)}},t}(0,{}),E=T,k=function(e,t,r,n){"use strict";
104Object.defineProperty(t,"__esModule",{value:!0});const o="react-dom/server";return t.default=function(e){if(requirejs.defined(o))return requirejs(o).renderToString(e);if("undefined"==typeof window)return r.Logger.error("react-dom/server не загÑÑжен"),"";requirejs([o]);const t=document.createElement("div");t.style.display="none",document.body.appendChild(t);const i=(0,n.createRoot)(t);i.render(e);const a=t.innerHTML;i.unmount();try{document.body.removeChild(t)}catch(e){r.Logger.error(`Ðе ÑдалоÑÑ ÑдалиÑÑ Ð´Ð¾ÑеÑний ÑÐ»ÐµÐ¼ÐµÐ½Ñ Ñ body.\n ÐÑигиналÑÐ½Ð°Ñ Ð¾Ñибка: ${e.message}`,e)}return a},t}(0,{},u,r),w=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.flattenObject=t.stringTemplateResolver=t.resolveControlName=t.joinElements=void 0,t.joinElements=function e(t,r,n){if(Array.isArray(t)){let r="";for(let n of t){if(Array.isArray(n))n=e(n);r+=n||""}return r}else throw new Error("joinElements: elements is not array")},t.resolveControlName=function(e,t){const r=t||{};if(e&&e.name)r.name=e.name;else if(t&&t.name)e.name=t.name;return r},t.stringTemplateResolver=function(e,t,n,o,i){const a=o&&o.resolvers?r.CommonUtils.findResolverInConfig(e,o.resolvers):void 0;if(a)return a(e);else return r.CommonUtils.depsTemplateResolver(e,t,n)},t.flattenObject=function(e){const t={};for(const r in e)t[r]=e[r];return t},t}(0,{},d),j=w,x=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ATTR_DATA_REG_EXP=t.ATTR_STYLE=t.additionalReactAttrNames=t.reactAttrNames=t.reactToWasabyAttrNames=t.wasabyAttrNames=t.wasabyToReactAttrNames=void 0,t.wasabyToReactAttrNames={acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",allowfullscreen:"allowFullScreen",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",cellpadding:"cellPadding",cellspacing:"cellSpacing",charset:"charSet",class:"className",classid:"classID",colspan:"colSpan",contenteditable:"contentEditable",contextmenu:"contextMenu",controlslist:"controlsList",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",datetime:"dateTime",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",enctype:"encType",enterkeyhint:"enterKeyHint",for:"htmlFor",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",innerhtml:"innerHTML",inputmode:"inputMode",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",marginwidth:"marginWidth",marginheight:"marginHeight",maxlength:"maxLength",mediagroup:"mediaGroup",minlength:"minLength",
104nomodule:"noModule",novalidate:"noValidate",playsinline:"playsInline",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rowspan:"rowSpan",spellcheck:"spellCheck",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex",usemap:"useMap",accentheight:"accentHeight","accent-height":"accentHeight",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",arabicform:"arabicForm","arabic-form":"arabicForm",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",diffuseconstant:"diffuseConstant",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",edgemode:"edgeMode",enablebackground:"enableBackground","enable-background":"enableBackground",externalresourcesrequired:"externalResourcesRequired",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",imagerendering:"imageRendering","image-rendering":"imageRendering",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicodebidi:"unicodeBidi","unicode
104-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",vmathematical:"vMathematical","v-mathematical":"vMathematical",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"};const r=Object.keys(t.wasabyToReactAttrNames);return t.wasabyAttrNames=new Set(r),t.reactToWasabyAttrNames=r.reduce(((e,r)=>(e[t.wasabyToReactAttrNames[r]]=r,e)),{}),t.reactAttrNames=new Set(Object.keys(t.reactToWasabyAttrNames)),t.additionalReactAttrNames=new Set(["target"]),t.ATTR_STYLE="style",t.ATTR_DATA_REG_EXP=/^data(-\w+)+$/,t}(0,{}),S=x,F=function(e,t){"use strict";function r(e,t){const r=null==e?void 0:e.className,n=null==t?void 0:t.className;if(r&&n){const e=r.trim();return`${n.trim()} ${e}`}if(n&&"string"==typeof n)return n.trim();if(r)return r.trim();else return""}function n(e,t){const r=null==e?void 0:e.style,n=null==t?void 0:t.style;let o;if(r&&n)o={...r,...n};else if(n)o=n;else if(r)o=r;if(o){const e=Object.keys(o).filter((e=>{if(!(null==e?void 0:e.trim()))return!0;const t=o[e];if(null==t)return!0;if(!t.trim)return!1;else return!t.trim()}));if(e&&Object.isFrozen(o))o={...o};e.forEach((e=>{delete o[e]}))}return o}Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAttrs=t.processMergeAttributes=t.SPECIAL_BOOL_ATTRS=void 0;return t.SPECIAL_BOOL_ATTRS=["checked","readOnly","autoPlay","autoFocus"],t.processMergeAttributes=function(e,t){const o=e||{},i=r(e,t);if(i)t.className=i;const a=n(e,t);if(a)t.style=a;t.key=t.key||o.key;for(const[e,r]of Object.entries(o))if(void 0!==r&&!["className","style"].includes(e))t[e]=r;for(const e in t)if(t.hasOwnProperty(e)&&void 0===t[e])delete t[e];return t},t.mergeAttrs=function(e,o){e=e||{},o=o||{};const i={};let a;for(a in e)if(e.hasOwnProperty(a)&&void 0!==e[a]&&null!==e[a])i[a]=""!==e[a]?e[a]:void 0;for(a in o)if(o.hasOwnProperty(a)&&void 0!==o[a]&&null!==o[a])if("className"===a)i.className=r(i,o);else if("style"===a)i.style=n(o,i);else if("key"===a)i.key=o[a];else if("alt"===a)i.alt=o[a];else if("value"===a&&""===o[a])i.value=o[a];else if(!i.hasOwnProperty(a)){if(o[a])i[a]=o[a];else i[a]=0===o[a]?0:void 0;if("boolean"==typeof i[a]&&!t.SPECIAL_BOOL_ATTRS.includes(a))i[a]=i[a]+""}return i},t}(0,{}),N=F,$=function(e,t,r,n,o){"use strict";function i(e,t){if("undefined"==typeof document)return!0;const r=function(){if(!a)a=document.createElement("div").style;return a}();return r[e]="",r[e]=t,!!r[e]}let a;Object.defineProperty(t,"__esModule",{value:!0}),t.reactAttrsToWasabyDom=t.wasabyAttrsToReactDom=void 0;const s=e=>{if("--"===e.slice(0,2))return e;const t=e.split("-");if(1===t.length)return t[0];let r=0;if(""===t[0])r=1,t[1]=(e=>{const t={webkit:"Webkit",ms:"ms",moz:"Moz",o:"O"};return t[Object.keys(t).find((t=>t===e))]||e})(t[1]);return t[r]+t.slice(r+1).map((e=>e?e[0].toUpperCase()+e.slice(1):"")).join("")},l="data:image/",c=";base64,",u=";";return t.wasabyAttrsToReactDom=function(e,t=!0){if(!e)return e;if(r._FocusAttrs.isSingletonFocusAttrs(e))return e;const a=Object.isFrozen(e)?{...e}:e;for(const r of Object.keys(e)){if(t&&"boolean"==typeof e[r]&&!o.SPECIAL_BOOL_ATTRS.includes(r))e[r]=e[r]+"";
104if(n.wasabyAttrNames.has(r))a[n.wasabyToReactAttrNames[r]]=e[r],delete e[r]}if(e.hasOwnProperty("style"))a.style="string"!=typeof e.style?e.style:(e=>{var t;const{str:r,style:n}=(e=>{const t={str:e,style:{}};let r,n,o=e;for(;o.includes(l)&&o.includes(c);){r=o.indexOf(l),n=o.indexOf(c)+8;const e=r-o.substring(0,r).split(u).pop().length,i=n+o.substring(n).split(u).shift().length,a=o.substring(e,i),f=a.indexOf(":");t.style[s(a.substring(0,f).trim())]=a.substring(f+1).trim(),t.str=o=o.substring(0,e)+o.substring(i)}return t})(e);for(const e of r.split(";")){const r=e.indexOf(":");if(-1===r)continue;let o=e.slice(0,r),a=e.slice(r+1);if(o=o?o.trim():"",a=a?a.trim():"",!o||!a)continue;const l=s(o);if("undefined"!=typeof window&&(null===(t=document.body)||void 0===t?void 0:t.wasabyLoaded)){if(i(l,a))n[l]=a}else n[l]=a}return n})(e.style);return a},t.reactAttrsToWasabyDom=function(e){if(!e)return e;const t=Object.isFrozen(e)?{...e}:e;for(const r of Object.keys(e))if(n.reactAttrNames.has(r))t[n.reactToWasabyAttrNames[r]]=e[r],delete t[r];if(e.style&&"object"==typeof e.style)t.style=Object.entries(e.style).map((([e,t])=>`${e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}:${t}`)).join(";");return t},t}(0,{},f,x,F),W=$,M=function(e,t,r,n,o,i,a,s,l,c,u,f,d,p,m,y,g,h,v){"use strict";function b(e){return!!e&&!0===e.i18n}Object.defineProperty(t,"__esModule",{value:!0}),t.WasabyDOMRefGeneration=void 0;const C=["_$internal","_$events","_$blockOptionNames","_$attributes"];class R{constructor(e,t){this.refForContainer=e,this.forwardedRef=t}generate(e,t,r){var n;const i=new h.ChainOfRef,a={};for(const t of Object.keys(e))if(-1===Object.keys(o.wasabyEventIntersection).indexOf(t))a[t]=e[t];Object.defineProperty(a,"meta",{configurable:!0,value:e.meta||{}});const s=new v.CreateNotifyRef(a,t._logicParent);if(t.customEvents)delete t.customEvents;if(r&&t.name&&(null===(n=t._logicParent)||void 0===n?void 0:n.childrenRefsCreator)){const e=t._logicParent.childrenRefsCreator.getRef(t.name),r=e&&e.getWithActivator()?e:t._logicParent.childrenRefsCreator.createRef(t.name,!0);i.add(r)}if(Object.keys(a).length)i.add(s);if(this.refForContainer)i.add(new h.CreateOriginRef(this.refForContainer));if(this.forwardedRef)i.add(new h.CreateOriginRef(this.forwardedRef));return i.execute()}}t.WasabyDOMRefGeneration=R;class _{isRelevant(e){return(0,d.isReactComponentType)(e)}create(e,t,o){var a,l;this.prepareChildren(t);const c=r.createElement(e,t),u=g._FocusAttrs.extractAttributesForFocusArea(t.attrs),d=p.default.takeFocusCallbacks();if(d)u.onActivated=d.onActivated,u.onDeactivated=d.onDeactivated;u.children=c,u.noErrorUnusedFocusProps=!0;const m=r.createElement(i.FocusArea,u),y=e.displayName||e.name||"unknown",h=t.key+"c_",v=r.createElement(s.WasabyContextManager,{key:h,readOnly:t.readOnly,theme:t.theme,_physicParent:t._physicParent,_logicParent:t._logicParent,_parentKey:t.rskey,pageData:t.pageData,Router:t.Router,isAdaptive:t.isAdaptive,workByKeyboard:t.workByKeyboard,moduleName:y},m);if(!o)try{return(0,f.default)(v)}catch(e){const r=`ÐÑибка пÑи поÑÑÑоении компоненÑа ${y}.\n ФизиÑеÑкий ÑодиÑÐµÐ»Ñ ${null===(a=t._physicParent)||void 0===a?void 0:a._moduleName}\n ÐогиÑеÑкий ÑодиÑÐµÐ»Ñ ${null===(l=t._logicParent)||void 0===l?void 0:l._moduleName}\n props.key = ${h}\n props.className = ${t.className||""}\n props.attrs = ${JSON.stringify(t.attrs)}\n props['data-qa'] = ${t["data-qa"]||""}\nÐ ÑÑеке оÑибки более подÑÐ¾Ð±Ð½Ð°Ñ Ð¸Ð½ÑоÑмаÑÐ¸Ñ Ð¾ ÑеалÑно ÑпавÑем компоненÑе.`;throw n.logger.error(r,e),e}return v}createWasabyRef(e,t,r,n=!1){if(e.isReactWrapper&&r)return r;else return new R(e.refForContainer,r).generate(e.events,t,n)}createWasabyApiRef(e,t){var r;const n=new h.ChainOfRef;if(e.name&&(null===(r=e._logicParent)||void 0===r?void 0:r.childrenRefsCreator)){const t=e._logicParent.childrenRefsCreator.getRef(e.name),r=t&&t.getWithActivator()?t:e._logicParent.childrenRefsCreator.createRef(e.name,!0);n.add(r)}if(t)n.add(new h.CreateOriginRef(t));if(!n.isEmpty())return n.execute()}prepareChildren(e){_.convertStringChildren(e);const t=e.content;if(function(e){const t=typeof e;if("undefined"===t||"object"===t&&!e)return!1;else return"function"===t||"string"===t||e.i18n||(0,d.isWasabyTemplateType)(e)||Array.isArray(e)||(0,d.isReactComponentType)(e)}(t)&&(!e.children||(0,d.isValidChildren)(e.children)&&e.children.type===c.default))e.children=r.createElement(c.default,{content:t})}createChildrenAsContent(e,t,r,n){const o=_.createProps(t,r);return o.forwardedRef=this.createWasabyRef(r,o,t.forwardedRef||t.$wasabyRef),this.create(e,o,n)}createFnComponent(e,t,r,n){if(t.onAfterUpdate)Promise.resolve().then(t.onAfterUpdate);const o=_.createProps(t,r),i=o.ref||o.$wasabyRef;if((0,d.hasWasabyApiRef)(e))o.apiRef=this.createWasabyApiRef(o,o.apiRef),o.$wasabyRef=o.ref=this.createWasabyRef(r,o,i);else o.$wasabyRef=o.ref=this.createWasabyRef(r,o,i,!0);if(!(0,d.shouldPassRef)(e))delete o.ref;return this.create(e,o,n)}createComponent(e,t,r,n){if(t.onAfterUpdate){const e=t.ref;t.ref=r=>{var n;if(null==e||e(r),r)null===(n=null==t?void 0:t.onAfterUpdate)||void 0===n||n.call(t)}}const o=_.createProps(t,r);return delete o.name,o.$wasabyRef=o.forwardedRef=this.createWasabyRef(r,o,t.forwardedRef||t.$wasabyRef),this.create(e,o,n)}createContextProvider(e,t,n){this.prepareChildren(t);const o=t.value,i=r.createElement(e,{value:o},t.children);if(!n)return(0,f.default)(i);else return i}static createProps(e,t){let r=_.copyFromPrototype(e);if(delete r._$key,!r.key)r.key=t.key;for(const e of C)delete r[e];return r.attrs=(0,l.mergeAttrs)(t.attributes,r.attrs),r=_.copyAtributesToProps(r),_.executeFocusEvents(t.events),_.prepareEvents(r,t.events)}static copyFromPrototype(e){const t={};for(const r in e)t[r]=e[r];return t}static copyAtributesToProps(e){if(!e.attrs)return e;const t=Object.keys(e.attrs);if(0===t.length)return e;for(const r of t)if(!s.wasabyContextPropNames.has(r))if(r!==u.ATTR_STYLE){if(u.reactAttrNames.has(r)||u.additionalReactAttr
104Names.has(r)||u.ATTR_DATA_REG_EXP.test(r))e[r]=e.attrs[r]}else if("string"!=typeof e[r])e[r]=e.attrs[r];return e}static isNativeFunction(e){return"function"==typeof e}static executeFocusEvents(e){const t=p.default.executeFocusEventsObject(e);if(!t)return;const r={};_.prepareEvents(r,t),p.default.saveFocusEventsAsFocusCallbacks(r)}static wrongCustomEventArguments(e,t){if(!y.constants.isProduction)if(!this.isNativeEvent(e))m.Logger.warn(`ÐбнаÑÑжен вÑзов wasaby-ÑобÑÑÐ¸Ñ ÐºÐ°Ðº колбÑк-ÑÑнкÑии.\n ÐÑзÑваеÑÑÑ "${e}".\n РодиÑелÑÑкий конÑÑол: ${null==t?void 0:t._moduleName}\n ÐÑовеÑÑÑе пÑавилÑноÑÑÑ Ð¿ÐµÑеданнÑÑ
аÑгÑменÑов.\n ÐеÑвÑм аÑгÑменÑом должен бÑÑÑ Ð¾Ð±ÑÐµÐºÑ ÑобÑÑиÑ`,t)}static isNativeEvent(e){return o.reactEventList.indexOf(e)>-1}static isFakeSyntheticEvent(e){return!(!e||!e._isFakeEvent)}static markFakeEvent(e,t,r){if(y.constants.isProduction)return e;else return e._isFakeEvent=!0,e._warning=`ÐÑ Ð¿ÑÑаеÑеÑÑ Ð¾Ð±ÑаÑиÑÑÑ Ðº обÑекÑÑ ÑобÑÑиÑ, Ñозданного Ð´Ð»Ñ ÑовмеÑÑимоÑÑи.\nÐго ÑÑнкÑионал ÑÑезан. ÐбÑаÑÑение к ÑÑÐ¾Ð¼Ñ Ð¾Ð±ÑекÑÑ Ð¼Ð¾Ð¶ÐµÑ Ð²ÑзÑваÑÑ Ð¾Ñибки.\nÐÑли необÑ
одим обÑÐµÐºÑ ÑобÑÑиÑ, ÑледÑÐµÑ Ð¸ÑполÑзоваÑÑ ÑиÑÑÐµÐ¼Ñ ÑобÑÑий wasaby или ÑеÑÑнÑе колбÑки.\nÐбÑÐµÐºÑ Ñоздан Ð´Ð»Ñ ÑобÑÑÐ¸Ñ "${t}".\nРодиÑелÑÑкий конÑÑол: ${null==r?void 0:r._moduleName}`,e}static prepareEvents(e,t){const r=Object.keys(t);for(const i of r){const r=i.split(":");if("meta"===r[0])continue;let s;if(-1===Object.keys(o.wasabyEventIntersection).indexOf(i))s="on"+r[1].charAt(0).toUpperCase()+r[1].slice(1);else s=o.wasabyEventIntersection["on:"+r[1]];const l=(t,...r)=>{var i,l;const u=t instanceof a.SyntheticEvent;let f;for(const a of c)if(void 0!==a)if(!_.isNativeFunction(a))if(!(null==a?void 0:a.hasOwnProperty("bindValue")))try{const n=this.prepareEventArgs(t,a,r,s,e._physicParent),o=a.context?a.context.apply(a.viewController):a.viewController,d=o[a.value].apply(o,n);if(1===c.length)f=d;if(u)t.result=d;if(n&&(null===(l=null===(i=n[0])||void 0===i?void 0:i.isStopped)||void 0===l?void 0:l.call(i))&&t&&t.stopPropagation){f=d,t.stopPropagation();break}if(n&&"fakeEvent"===n[0].type&&n[0].stopped){f=d;break}}catch(e){n.logger.error(e)}else{let e=u||t&&t.target&&t.type||void 0===t?r[0]:t;if((0,o.isCustomEvent)(t))e=t.detail[1];if(!a.handler(a.viewController,e))a.handler(a.data,e)}else{e[s]=c;a(...[t,...r])}else m.Logger.error(`ÐопÑÑка вÑзова ÑобÑÑÐ¸Ñ "${s}" Ñ ÐºÐ¾ÑоÑого оÑÑÑÑÑÑвÑÐµÑ Ð¾Ð±ÑабоÑÑик. СобÑÑие вÑзвано не бÑдеÑ.\n ÐÐ»Ñ Ð¸ÑпÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ Ð¾Ñибки необÑ
одимо найÑи меÑÑо, где ÑоздаеÑÑÑ ÑÑо ÑобÑÑие и понÑÑÑ Ð¿ÑиÑÐ¸Ð½Ñ Ð¾ÑÑÑÑÑÑÐ²Ð¸Ñ Ð¾Ð±ÑабоÑÑика.\n СкоÑее вÑего пÑоблема в Ñом, ÑÑо обÑабоÑÑик беÑеÑÑÑ Ð±ÐµÐ·ÑÑловно из необÑзаÑелÑной опÑии.`,e._logicParent);return f},c=t[i];if(e[s]&&c.length>1)e[s]=l;if(!e[s]||e[s].isWasabyEventCallback||!o.reactEventList.indexOf(s))e[s]=l,e[s].generatedFromCode=!0,e[s].isWasabyEventCallback=!0;else{const t=(0,o.getOldReactEventName)(s);e[t]=(e,...t)=>{l(e,...t)},e[t].generatedFromCode=!0}}return e}static prepareEventArgs(e,t,r,n,o){const i=t.args;if(!((null==e?void 0:e.target)||e instanceof a.SyntheticEvent)){const t={_bubbling:!1,type:"fakeEvent",target:null},s=new a.SyntheticEvent(null,t),l=this.markFakeEvent(s,n,o);return void 0===e?[l,...this.calculateArgs(i,r)]:[l,...this.calculateArgs(i,[e,...r])]}if(e instanceof a.SyntheticEvent){const t={_bubbling:e.isBubbling(),type:e.type||"fakeEvent",target:e.target||null},s=new a.SyntheticEvent(e.nativeEvent||null,t);if(this.isFakeSyntheticEvent(e))this.markFakeEvent(s,n,o);return[s,...this.calculateArgs(i,r)]}return[this.calculateEventObject(e),...this.calculateArgs(i,r)]}static calculateEventObject(e){let t;if(!e.nativeEvent||e.nativeEvent&&e.type!==e.nativeEvent.type)t=new a.SyntheticEvent(e);else t=new a.SyntheticEvent(e.nativeEvent);
104if(t.currentTarget=e.currentTarget,"mouseenter"===e.type||"mouseout"===e.type)t.target=e.currentTarget;return t}static calculateArgs(e,t){if(!t)return e||[];if(!e)return t;else return[...e,...t]}static convertStringChildren(e){return e}}if(t.default=_,"undefined"==typeof window)_.convertStringChildren=function(e){const t=null==e?void 0:e.children;if(!t)return e;if(b(t))return e.children=t.toLocaleString(),e;if(Array.isArray(t))for(let e=0;e<t.length;e++){const r=t[e];if(b(r))t[e]=r.toLocaleString()}return e};return t}(0,{},n,y,s,a,p,l,F,C,x,k,v,R,u,m,f,i,O),L=M,I=function(e,t,r,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),r.__exportStar(n,t),t}(0,{},e,v),D=function(e,t,r,n,o,i,a){"use strict";function s(e){var t;const r=e._$stateToCompareProps.logicParent,n=e._$stateToCompareProps.physicParent,o=e._$stateToCompareProps.templateAttributes,i=e._$stateToCompareProps.template,a=e._$stateToCompareProps.resolvedScope,s=e._$stateToCompareProps.config,l=a.rskey+e._$stateToCompareProps._$templateKeyPostfix;return[(null==r?void 0:r._instId)||"",(null==n?void 0:n._instId)||"",(null==o?void 0:o._$parentTemplateId)||"",(null==s?void 0:s.pName)||"",e.templateName||"",l||"",(null===(t=i.prototype)||void 0===t?void 0:t._moduleName)||i._moduleName||""]}function l(e){return e.children}function c(e,t){const r=e._$stateToCompareProps.flattenResolvedScope,n=t._$stateToCompareProps.resolvedScope,o=null==e?void 0:e._$stateToCompareProps.optionsVersions;
104return(0,a.getChangedOptions)(n,r,o,n._$blockOptionNames,!1,!1,!0)}function u(e,t){const r=(null==e?void 0:e._$stateToCompareProps.templateAttributes.attributes)||{},n=t._$stateToCompareProps.templateAttributes.attributes||{};return(0,a.getChangedOptions)(n,r,void 0,void 0,!1,!1,!0)}function f(e,t){const r=null==e?void 0:e._$stateToCompareProps.template.internal,n=t._$stateToCompareProps.template.internal,o=null==e?void 0:e._$stateToCompareProps.internalVersions;return(0,a.getChangedInternals)(n,r,o,!1,!1,!0)}function d(e,t,r={}){if(!t)return r;const n=Object.keys(t);for(const t of n)r[e+" "+t]=Math.random();return r}Object.defineProperty(t,"__esModule",{value:!0}),t.createElementForTemplate=t.TemplateWrapperClass=void 0;const p="string"==typeof Function.prototype.name,m=p&&r.Component.name.length>2,y=["logicParentInstId","physicParentInstId","templateParentId","contentOptionName","templateName","key","templateScopeName"];let g=1;class h extends r.Component{constructor(){super(...arguments),this.templateId=g++}shouldComponentUpdateRelease(e){const t=s(this.props),r=s(e);for(let e=0;e<t.length;e++)if(t[e]!==r[e])return!0;if(c(this.props,e))return!0;if(u(this.props,e))return!0;if(f(this.props,e))return!0;else return!1}shouldComponentUpdateDebug(e){const t={},r=s(this.props),n=s(e);let o=!1;for(let e=0;e<r.length;e++)if(r[e]!==n[e])t[y[e]]=Math.random(),o=!0;const i=c(this.props,e);if(i)d("option",i,t);const a=u(this.props,e);if(a)d("attribute",a,t);const l=f(this.props,e);if(l)d("",{dirtyCheckingVars:!0},t);if(o||i||a||l)return this.redrawReasonsForDebug=t,!0;else return!1}shouldComponentUpdate(e){if((0,o.isDebug)()&&m)return this.shouldComponentUpdateDebug(e);else return this.shouldComponentUpdateRelease(e)}render(){var e;const t=this.props._$stateToCompareProps.physicParent,i=this.props._$stateToCompareProps.logicParent,a=this.props._$stateToCompareProps.template,s=this.props._$stateToCompareProps.resolvedScope,c=this.props._$stateToCompareProps.templateAttributes,u=this.props._$stateToCompareProps.context,f=this.props._$stateToCompareProps.config,d=this.props.generatorConfig;if(c._physicParent=t,c._$templateId=this.templateId,c._isRootElement)c.refForContainer=null===(e=f.attr)||void 0===e?void 0:e.refForContainer;s.ref=this.props.forwardedRef||s.ref,s._$templateKeyPostfix=this.props._$stateToCompareProps._$templateKeyPostfix;let p=a.call(i,s,c,u,f.isVdom,void 0,void 0,d);const y=Array.isArray(p);if(y&&1!==p.length&&c._isRootElement&&!f.isNativeReact){let e=`\n Ðазвание Ñаблона: ${a.name}\n \n ÐÑÑÑе оÑлаживаÑÑ ÑÑÑ Ð¿ÑÐ¾Ð±Ð»ÐµÐ¼Ñ Ð¿Ð¾Ð´ дебагом, ÑÑÐ¾Ð±Ñ Ð²ÑвелиÑÑ Ð½Ðµ минимизиÑованÑне имена Ñаблона и модÑлÑ.\n Также пÑедоÑÑавлен ÑпиÑок ÑодиÑелей наÑÐ¸Ð½Ð°Ñ Ñ ÑодиÑелÑ, где ÑÑÐ¾Ñ Ñаблон бÑл ÑизиÑеÑки вÑÑавлен.\n ÐÑли в конÑÑоле вÑÑавлÑеÑÑÑ partial, знаÑÐ¸Ñ Ð¿ÑиÑина оÑибки в ÑодиÑеле - Ñам, где обÑÑвлена ÑеалÑÐ½Ð°Ñ Ð²ÐµÑÑÑка Ñ Ð½ÐµÑколÑкими коÑневÑми ÑлеменÑами.\n \n РкÑайнем ÑлÑÑае вÑегда можно поÑÑавиÑÑ ÑоÑÐºÑ Ð¾ÑÑанова в меÑÑо, где Ð¿Ð°Ð´Ð°ÐµÑ Ð¾Ñибка, и поÑмоÑÑеÑÑ,\n - ÑÑо ÑÑо за Ñаблон (пеÑÐµÐ¼ÐµÐ½Ð½Ð°Ñ template),\n - пÑовеÑиÑÑ, какие ÐµÐ¼Ñ Ð¾ÑдаÑÑÑÑ Ð¾Ð¿Ñии (пеÑÐµÐ¼ÐµÐ½Ð½Ð°Ñ resolvedScope),\n - оÑладиÑÑ Ð¿Ð¾ÑÑÑоение веÑÑÑки (template.call).`;if(p.length>1)e="\n Шаблон поÑÑÑоил болÑÑе одного коÑневого ÑлеменÑа.\n ÐÑи коÑневÑе ÑлеменÑÑ Ð¸ÑполÑзÑÑÑÑÑ Ð´Ð»Ñ Ð¿Ð¾ÑÑÑÐ¾ÐµÐ½Ð¸Ñ ÐºÐ¾Ð½ÑÑола, а Ñ ÐºÐ¾Ð½ÑÑола Ð¼Ð¾Ð¶ÐµÑ Ð±ÑÑÑ ÑолÑко один коÑенÑ.\n ÐеобÑ
одимо оÑкÑÑÑÑ Ð´Ð°Ð½Ð½Ñй Ñаблон и пÑовеÑиÑÑ, поÑÐµÐ¼Ñ Ð¿Ð¾ÑÑÑоилоÑÑ Ð½ÐµÑколÑко коÑней.\n "+e;else if(!p.length)e="\n Шаблон не поÑÑÑоил веÑÑÑкÑ, Ñаблон должен поÑÑÑоиÑÑ Ñ
оÑÑ Ð±Ñ ÑÑо-нибÑдÑ, Ñ
оÑÑ Ð±Ñ <invisible-node/>.\n ÐеобÑ
одимо оÑкÑÑÑÑ Ð´Ð°Ð½Ð½Ñй Ñаблон и пÑовеÑиÑÑ, поÑÐµÐ¼Ñ Ð²ÐµÑÑÑка в нем не поÑÑÑоилаÑÑ.\n "+e;if(o.Logger.error(e,t),(0,o.isDebug)()&&m)n.logger.error(a)}if(y&&1===p.length)p=p[0];if((0,o.isDebug)()&&m){const e=this.redrawReasonsForDebug;return this.redrawReasonsForDebug=void 0,r.createElement(l,e,p)}return p}}return t.TemplateWrapperClass=h,t.createElementForTemplate=function(e,t,n,o,s,l,c,u){var f;if(!p)return l._physicParent=t,n.call(e,s,l,c,u.isVdom,void 0,void 0,o);const d=(s._$templateKeyPostfix||"")+"_tpl"+(null!==(f=n.templateIndex)&&void 0!==f?f:"")+"_",m={_$stateToCompareProps:{logicParent:e,physicParent:t,template:n,resolvedScope:s,flattenResolvedScope:(0,i.flattenObject)(s),templateAttributes:l,context:c,config:u,optionsVersions:(0,a.collectObjectVersions)(s),internalVersions:(0,a.collectInternalsVersions)(n.internal),_$templateKeyPostfix:d},generatorConfig:{...o,isReactWrapper:!1},key:s.rskey+d,templateName:n.name,forwardedRef:s.ref};return r.createElement(h,m)},t}(0,{},n,y,u,w,c),U=function(e,t,r,n){"use strict";function o(e,t){return!!e&&e.hasOwnProperty(t)}
104Object.defineProperty(t,"__esModule",{value:!0}),t.onElementUnmount=t.onElementMount=void 0;const i="__$delete__";t.onElementMount=function(e){var t;try{e[i]=!1}catch(r){n.Logger.error(`ÐÑладоÑÐ½Ð°Ñ Ð¸Ð½ÑоÑмаÑÐ¸Ñ Ð² UICore/Executor Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка ÑеалÑной оÑибки.\n ÐÑзÑваеÑÑÑ Ð¼ÐµÑод onElementMount.\n ÐонÑÑол ${null!==(t=e._moduleName)&&void 0!==t?t:e.displayName}.\n ${r.message}`)}};const a=new r.TimeoutHandlersQueue(100);return t.onElementUnmount=function(e,t){var r;if(o(e,t))try{e[t][i]=!0}catch(o){n.Logger.error(`ÐÑладоÑÐ½Ð°Ñ Ð¸Ð½ÑоÑмаÑÐ¸Ñ Ð² UICore/Executor Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка ÑеалÑной оÑибки.\n ÐÑзÑваеÑÑÑ Ð¼ÐµÑод onElementUnmount.\n ÐонÑÑол ${null!==(r=e[t]._moduleName)&&void 0!==r?r:e[t].displayName}.\n ÐбÑаÑение к доÑеÑÐ½ÐµÐ¼Ñ ÐºÐ¾Ð½ÑÑÐ¾Ð»Ñ Ñ Ð½Ð°Ð·Ð²Ð°Ð½Ð¸ÐµÐ¼ ${t}.\n ${o.message}`)}a.addHandler((()=>{!function(e,t){var r,a,s,l;let c;try{if(o(e,t))c=null===(r=e[t])||void 0===r?void 0:r[i]}catch(r){n.Logger.error(`ÐÑладоÑÐ½Ð°Ñ Ð¸Ð½ÑоÑмаÑÐ¸Ñ Ð² UICore/Executor Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка ÑеалÑной оÑибки.\n ÐÑзÑваеÑÑÑ Ð¼ÐµÑод clearChildren.\n ÐонÑÑол ${null!==(s=null===(a=e[t])||void 0===a?void 0:a._moduleName)&&void 0!==s?s:null===(l=e[t])||void 0===l?void 0:l.displayName}.\n ÐбÑаÑение к доÑеÑÐ½ÐµÐ¼Ñ ÐºÐ¾Ð½ÑÑÐ¾Ð»Ñ Ñ Ð½Ð°Ð·Ð²Ð°Ð½Ð¸ÐµÐ¼ ${t}.\n ${r.message}`)}if(c){if(e[t].isFocusActivator)e[t].destroy();delete e[t]}}(e,t)}))},t}(0,{},T,u),V=function(e,t,r,n){"use strict";function o(e){var t;for(const t of Object.keys(e))try{delete e[t]}catch(e){}if(e.parentNode)null===(t=e.parentNode)||void 0===t||t.removeChild(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.CreateClearElementRef=void 0;const i=new n.TimeoutHandlersQueue(5e3);class a extends r.Responsibility{constructor(){super(...arguments),this.type=r.CLEAR_HANDLER_TYPE}getHandler(){return e=>{if(!e)i.addHandler(function(){const e=this;if(e&&!document.body.contains(e)){o(e);for(let t=0;t<e.childNodes.length;t++){const r=e.childNodes[t];if(r.nodeType===Node.TEXT_NODE)o(r)}}}.bind(e))}}isEqual(e){return!0}}return t.CreateClearElementRef=a,t}(0,{},i,T),B=function(e,t,r,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CreateChildrenRef=void 0;class i extends o.Responsibility{constructor(e,t,r,n){super(),this.parent=e,this.name=t,this.setChildrenDisabled=r,this.withActivator=n,this.type=o.CHILDREN_HANDLER_TYPE}getName(){return this.name}getWithActivator(){return this.withActivator}getDisabled(){return this.disabled}disable(e){this.disabled=e}getHandler(){if(!this.name||!this.parent)return()=>{};const e=e=>{if(!e)return(0,r.onElementUnmount)(this.parent._children,this.name),void this.setChildrenDisabled(this.name,!1);if(this.disabled)return;let t=this.withActivator&&e instanceof HTMLElement?new n.Activator(e):e;const o=this.name+"__transferred";if(t._$child)t=t._$child;if(this.parent._transferChildrenToParent)this.parent._logicParent._children[o]=t;if(this.parent._children[o])this.parent._children[this.name]=this.parent._children[o],delete this.parent._children[o];else this.parent._children[this.name]=t;(0,r.onElementMount)(this.parent._children[this.name]),this.setChildrenDisabled(this.name,!0)};return e.childName=this.name,e}isEqual(e){return this.parent===e.parent&&this.name===e.name&&this.setChildrenDisabled===e.setChildrenDisabled&&this.withActivator===e.withActivator}}return t.CreateChildrenRef=i,t}(0,{},U,a,i),Y=B,z=function(e,t,r,n,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CreateTag=void 0;return t.CreateTag=class{create(e,t,a,s,l){if(!s)s={};if(!t)t={attributes:{}};const c=r.Attr.processMergeAttributes((0,o.reactAttrsToWasabyDom)(s.attributes),(0,o.reactAttrsToWasabyDom)(t.attributes));for(const e of Object.keys(c))if(0===e.indexOf("top:")){const t=e.replace("top:","");c[t]=c[t]||c[e],delete c[e]}const u=n._FocusAttrs.extractAttributesForFocusArea(c);c.tabindex=u.tabIndex,c["ws-autofocus"]=u.autofocus;const f=this.decorateAttrs(c);if(~r.VoidTags.indexOf(e))return"<"+e+f+" />";else return"<"+e+f+">"+(0,i.joinElements)(a)+"</"+e+">"}decorateAttrs(e){let t="";for(const r in e)if(e.hasOwnProperty(r))if(void 0!==e[r]&&null!==e[r]&&""!==e[r])t+=` ${r}="${e[r]}"`;return t}},t}(0,{},d,f,$,w),H=function(e,t,r,n,o){"use strict";
104return Object.defineProperty(t,"__esModule",{value:!0}),t.plainMergeAttr=void 0,t.plainMergeAttr=function(e,t){if(!e)e={};if(!t)t={};if(t.attributes&&2===Object.keys(t.attributes).length&&t.attributes.name===t.attributes.sbisname&&void 0!==t.attributes.sbisname)t={};let i;if(t.attributes&&t.attributes.key)i=t.attributes.key;i=i||t.key||e.key;const a={inheritOptions:t.inheritOptions,context:e.context,internal:e.internal,systemOptions:{},domNodeProps:{},key:i,attributes:(0,o.processMergeAttributes)(e.attributes,(0,n.wasabyAttrsToReactDom)(t.attributes,!1)),events:r.Attr.mergeEvents(e.events,t.events),_physicParent:e._physicParent,_isRootElement:e._isRootElement,isContainerNodeInline:e.isContainerNodeInline};if(e._isRootElement||e.isContainerNodeInline)a.refForContainer=e.refForContainer;return a},t}(0,{},d,$,F),G=function(e,t,r,n,o,i,a,s,l,c,u,f,d,p,m){"use strict";function y(e){if(e.forwardedRef)if(!e.ref)e.ref=e.forwardedRef,delete e.forwardedRef}function g(e,t,r,n){var o,a,s,l,c,u,f,d,p,m;const y={attributes:e,events:t,_$parentTemplateId:null===(o=r.attr)||void 0===o?void 0:o._$templateId,key:i.Helper.calculateKey(e,r),context:r.attr?r.attr.context:{}};if(!E)if(null===(a=r.attr)||void 0===a?void 0:a.isContainerNodeInline){if(r.isRootTag)if(y._isRootElement=!0,null===(s=r.attr)||void 0===s?void 0:s.refForContainer)y.refForContainer=r.attr.refForContainer}else if(r.isContainerNode){if(y._isRootElement=!0,null===(l=r.attr)||void 0===l?void 0:l.refForContainer)y.refForContainer=r.attr.refForContainer}else if(null===(c=r.attr)||void 0===c?void 0:c._isRootElement)if(r.pName){if(r.isRootTag)if(y._isRootElement=!0,null===(u=r.attr)||void 0===u?void 0:u.refForContainer)y.refForContainer=r.attr.refForContainer}else if(null===(f=r.attr)||void 0===f?void 0:f.isInline){if(r.isRootTag)if(y._isRootElement=!0,null===(d=r.attr)||void 0===d?void 0:d.refForContainer)y.refForContainer=r.attr.refForContainer}else if(r.hasOwnProperty("mergeType")){if("none"!==r.mergeType)if(y._isRootElement=!0,null===(p=r.attr)||void 0===p?void 0:p.refForContainer)y.refForContainer=r.attr.refForContainer}else if(y._isRootElement=!0,null===(m=r.attr)||void 0===m?void 0:m.refForContainer)y.refForContainer=r.attr.refForContainer;if(n&&n.prepareAttrsForPartial)n.prepareAttrsForPartial(y);if(n&&n.isReactWrapper)y.isReactWrapper=!0;return y}function h(e,t){return a.loadSync((e=>{const t=e.library+":";if(1===e.module.length)return t+e.module;else return(t+e.module).replace(/,/g,".")})(e))}function v(e,t,r){if("string"==typeof e){if(i.CommonUtils.isLibraryModuleString(e)){return h(i.CommonUtils.splitModule(e))}return i.CommonUtils.depsTemplateResolver(e,t,r)}if(i.CommonUtils.isLibraryModule(e))return h(e);else return e}function b(e,t,r,n,o,a,s,l){let c=[];return r.forEach(((r,u)=>{if(i.CommonUtils.isTplFunction(r))r.func.templateIndex=u;else if("object"==typeof r)r.templateIndex=u;const f=g(o,a,l,s),d=f.context,p=C.call(this,r,e,t,n,f,d,l);if(Array.isArray(p))c=c.concat(p);else if(p)c.push(p)})),c}function C(e,t,r,n,o,a,s){let l;if("function"==typeof e)l=R.call(this,t,r,e,n,o,a,s);else if(i.CommonUtils.isTplFunction(e))e.func.internal=e.internal,l=R.call(this,t,r,e.func,n,o,a,s);else l=e;if(Array.isArray(l)){if(1===l.length)return l[0];if(0===l.length)return null}return l}function R(e,t,r,n,a,s,l){let c=r;if(i.CommonUtils.isTplFunction(r))c=r.func;if(T.isRelevant(c))return y(n),T.createFnComponent(c,n,a,!!l.isVdom);if(i.CommonUtils.isAnonymousFn(r))return f=r,d=e,o.Logger.error(`ÐÑибка поÑÑÑÐ¾ÐµÐ½Ð¸Ñ ÑазмеÑки. ÐÑла пеÑедана ÑÑнкÑиÑ, коÑоÑÐ°Ñ Ð½Ðµ ÑвлÑеÑÑÑ Ñаблонной.\n ФÑнкÑиÑ: ${f.toString()}`,d),null;var f,d;const p=this.config;if(!l.isVdom||E)return a._physicParent=t,r.call(e,n,a,s,l.isVdom,void 0,void 0,p);else return(0,u.createElementForTemplate)(e,t,r,p,n,a,s,l)}function _(e,t,n,a){var s;if(t._$attributes=n,t._$compound=!(e&&e.isWasaby),t._$internal=a.internal,t._$compound){if("Core/CompoundContainer"!==e.prototype._moduleName&&!(0,o.isUnitTestMode)())o.Logger.error(`Ð wasaby-окÑÑжении непÑавилÑно ÑоздаеÑÑÑ ws3-конÑÑол. ÐеобÑ
одимо иÑполÑзоваÑÑ Core/CompoundContainer, а не вÑÑавлÑÑÑ ws3-конÑÑол в Ñаблон wasaby-конÑÑола напÑÑмÑÑ.\n ÐодÑобнее ÑÑÑ https://wi.sbis.ru/doc/platform/developmentapl/ws3/compound-wasaby/\n ÐÑÑавлÑеÑÑÑ ÐºÐ¾Ð½ÑÑол '${e&&e.prototype&&e.prototype._moduleName}' в Ñаблоне конÑÑола `,t._logicParent);return}if(null===(s=n.attributes)||void 0===s?void 0:s.key)t.key=n.attributes.key,delete n.attributes.key;else t.key=a.key;if(!E){const e=new f.ChainOfRef;if(t.ref)e.add(new f.CreateOriginRef(t.ref));t.ref=e.execute()}let l=(0,i.extendFromViewController)(a,t);
104if(a.unitedScope)l=(0,d.flattenObject)(l);return r.createElement(e,l)}function A(e,t,r,n,o,i){var a,s,l,c,u,f;if(void 0===t.readOnly)t.readOnly=null!==(s=null===(a=null==o?void 0:o.props)||void 0===a?void 0:a.readOnly)&&void 0!==s?s:null===(l=null==o?void 0:o.context)||void 0===l?void 0:l.readOnly;if(void 0===t.theme)t.theme=null!==(u=null===(c=null==o?void 0:o.props)||void 0===c?void 0:c.theme)&&void 0!==u?u:null===(f=null==o?void 0:o.context)||void 0===f?void 0:f.theme;return R.call(this,o,i,e,t,r,void 0,n)}function O(e,t){if("string"!=typeof e){let r="ÐÑибка в Ñаблоне! ";if(i.CommonUtils.isLibraryModule(e))r+=`ÐонÑÑол не найден в библиоÑеке.\n ÐиблиоÑека: ${e.library}.\n ÐонÑÑол: ${e.module}`;else r+=`ÐевеÑное знаÑение в ws:partial. Шаблон: ${e} Ð¸Ð¼ÐµÐµÑ Ñип ${typeof e}`;o.Logger.error(r,t)}if("string"==typeof e&&"wml"===e.split("!")[0])o.Logger.error("ÐÑибка пÑи поÑÑÑоение конÑÑола. ÐÑовеÑÑÑе ÑÑÑеÑÑвÑÐµÑ Ð»Ð¸ Ñаблон "+e,t)}function P(e){var t;const r={};if(e){let n=!1;const o=(e,t,r,n)=>{if(e[r])return void e[r].push(...t[n]);const o=n.toLowerCase();if(r!==n.toLowerCase()&&t[r]&&t[o])return e[r]=[...t[o]],t[o].skip=!0,void e[r].push(...t[n]);e[r]=t[n]};for(const i of Object.keys(e)){if("meta"===i)continue;if(e[i].skip)continue;if(n=!0,s.wasabyEventIntersection[i]){r[i]=e[i];continue}if(i.includes("bind:")||(null===(t=e[i][0].originalName)||void 0===t?void 0:t.includes("bind"))){r["on:"+e[i][0].originalName.slice(5)+"Changed"]=e[i];continue}o(r,e,e[i][0].originalName?"on:"+e[i][0].originalName:i,i)}if(n&&e.meta)r.meta=e.meta}return r}Object.defineProperty(t,"__esModule",{value:!0}),t.calcOriginEventName=t.logResolverError=t.resolveTemplateFunction=t.resolveTemplateArray=t.resolveTpl=t.Generator=void 0;const T=new l.default,E="undefined"==typeof window;return t.Generator=class{constructor(e={}){this.config=e,this.reactCreator=T}calcTpl(e,t){const r=v(e,t.includedTemplates,t.depsLocal);if(i.CommonUtils.isDefaultExport(r))return r.default;else return r}createControlNew(e,t,a,s,l,u){var f,d,h,v;const C=a.name;let T=!u.compositeAttributes?(0,n.wasabyAttrsToReactDom)(a,!1):(0,p.processMergeAttributes)((0,n.wasabyAttrsToReactDom)(u.compositeAttributes,!1),(0,n.wasabyAttrsToReactDom)(a,!1));T=!u.attr||"attribute"!==u.mergeType?T:(0,p.processMergeAttributes)((0,n.wasabyAttrsToReactDom)(u.attr.attributes,!1),T),(0,m.addDataQaEventAttributes)(T,s,u);let k={};if(!E){const e=P(s);if((null===(f=null==u?void 0:u.attr)||void 0===f?void 0:f.events)&&"attribute"===u.mergeType)k=i.Attr.mergeEvents(u.attr.events,e);else k=e}let w=this.calcTpl(t,u);u.useApiRef=(0,c.hasWasabyApiRef)(w);let j=l;if("function"==typeof j)j=i.Scope.calculateScope(j,i.plainMerge),u.unitedScope=!0;const x=i.ConfigResolver.clearedContentOptionScope(j,u),S=null!==(d=C)&&void 0!==d?d:x.name,F=j.ref,N=this.calculateOptions(x,u,k,S,F);if(!N._$attributes)N._$attributes={attributes:{}};const $=N._physicParent,W=N._logicParent;if(N.rskey=T.key||u.key,void 0!==N.key&&function(e){if(e&&e.prototype&&"Controls/Container/Async"===e.prototype._moduleName)return!1;else return!0}(w))N._$key=N.key;const M=null==w?void 0:w.isChildrenAsContent,L=null===(h=N.content)||void 0===h?void 0:h.isChildrenAsContent;if(M||L)if(N.children=N.children||u.data.children||(null===(v=u.data.props)||void 0===v?void 0:v.children),M&&!N.children)o.Logger.error("ÐÑи поÑÑÑоении конÑенÑной опÑии wasaby вÑÑавленной в ÑиÑÑом ÑеакÑе должен найÑиÑÑ ÐºÐ¾ÑÑекÑнÑй children",W);if(i.CommonUtils.isControlClass(w)){const e=g(T,k,u,this.config);return this.processControl(_(w,N,e,u))}if(w&&w.isDataArray&&w.array)return b.call(this,W,$,w.array,N,T,k,this.config,u);if(i.CommonUtils.isArray(w))return b.call(this,W,$,w,N,T,k,this.config,u);if(i.CommonUtils.isTemplateClass(w)){const e=g(T,k,u,this.config);return A.call(this,w,N,e,u,W,$)}if(i.CommonUtils.isTplFunction(w)){const e=w.internal;w=w.func,w.internal=e}if((0,c.isReactElement)(w))return w;if((0,c.isContextConsumer)(w))return r.createElement(w,{},l.children);if((0,c.isContextProvider)(w))return this.reactCreator.createContextProvider(w,N,!!u.isVdom);if((0,c.isComponentClass)(w)){const e=g(T,k,u,this.config);return this.reactCreator.createComponent(w,N,e,!!u.isVdom)}const I=g(T,k,u,this.config);if(M)return this.reactCreator.createChildrenAsContent(w,N,I,!!u.isVdom);if(i.CommonUtils.isTemplateFunction(w))return R.call(this,W,$,w,N,I,I.context,u);if("string"==typeof t&&(u.depsLocal[t]||u.includedTemplates[t]))return R.call(this,W,$,w,N,I,I.context,u);if((0,c.isFunctionComponent)(w)||(0,c.isForwardRef)(w))return y(N),this.reactCreator.createFnComponent(w,N,I,!!u.isVdom);if(i.CommonUtils.isOptionalString(t))return null;if("string"==typeof t)return""+t;if(t instanceof String)return t.toString();if(null===t)return null;else return O(t,W),""+t}createWsControl(e,t,r,n){return this.processControl(_(e,t,r,n))}createTemplateNew(e,t,r,n,o,i){return A(e,t,r,n,o,i)}},t.resolveTpl=v,t.resolveTemplateArray=b,t.resolveTemplateFunction=R,t.logResolverError=O,t.calcOriginEventName=P,t}(0,{},n,$,u,d,o,s,M,I,D,i,w,F,_),q=G,X=function(e,t,r,n,o,i,a,s,l,c,u,f,d,p,m,y,g,h){"use strict";function v(e){return"function"==typeof e}function b(e){return"bindValue"in e}function C(e){e.fn=e.fn.bind({viewController:e.viewController,data:e.data}),e.fn.control=e.viewController}function R(e){return e.fn=function(t,r){if(g.EventUtils.checkBindValue(e,e.bindValue),this.viewController!==O){if(!e.handler(this.viewController,r))e.handler(this.data,r)}else e.handler(this.data,r)},C(e),e}function _(e,t,r){return e.fn=function(n){const o=arguments,i=(e.context||t).apply(this.viewController),a=e.handler?e.handler.apply(this.viewController):r.apply(this.viewController,[e.value]);if(void 0===a)throw new Error(`ÐÑÑÑÑÑÑвÑÐµÑ Ð¾Ð±ÑабоÑÑик ${e.value} ÑобÑÑÐ¸Ñ ${n.type} Ñ ÐºÐ¾Ð½ÑÑола ${e.viewController._moduleName}`);const s=a.apply(i,o);if(void 0!==s)n.result=s},C(e),e}
104Object.defineProperty(t,"__esModule",{value:!0}),t.CreateTagVdom=void 0;const A="undefined"==typeof window;t.CreateTagVdom=class{patchInputTag(e,t){if("input"===e)t.onChange=()=>{},t.checked=!!t.checked}create(e,t,o,d,m,g,C){var O,P;if(!d)d={attributes:{},events:{},reactEvent:{}};let T={};if(!A)T=(0,h.calcOriginEventName)(a.Attr.mergeEvents(d.events,t.events))||{};const E=(0,y.mergeAttrs)((0,n.wasabyAttrsToReactDom)(d.attributes,!1),(0,n.wasabyAttrsToReactDom)(t.attributes,!1));for(const e of Object.keys(E))if(void 0===E[e])delete E[e];E.key=E.key||t.key,this.patchInputTag(e,E);const k=E.name;let w;if(!A){if(w=new l.ChainOfRef,"string"==typeof k&&k.length>0&&(null==g?void 0:g.childrenRefsCreator)){const e=null!==(O=g.childrenRefsCreator.getRef(k))&&void 0!==O?O:g.childrenRefsCreator.createRef(k);w.add(e)}const{wasabyEvent:e,nativeEvent:r}=this.delimitEvent(T);!function(e){var t;for(const r of Object.keys(e)){const n=e[r];for(const r of n)if(!1!==(null===(t=r.fn)||void 0===t?void 0:t.isControlEvent))if(!b(r)){if(!v(r))_(r,e.meta.context,e.meta.handler)}else R(r)}}(r),this.createReactCallbacks(E,r,w);const n=new c.CreateNotifyRef(e,g),o=new f.CreateClearElementRef;if(Object.keys(e).length)w.add(n);w.add(o);const i=null===(P=t.attributes)||void 0===P?void 0:P.ref;if(i)w.add(new l.CreateOriginRef(i));if(C||d._isRootElement||d.isContainerNodeInline)if(d.refForContainer)w.add(new l.CreateOriginRef(d.refForContainer))}if("invisible-node"===e){if(!A)w.add(new u.CreateInvisibleNodeRef(g,C));delete E.className,delete E.readOnly,E.tabindex="-1",E.class="tw-hidden-important"}if(!A)E.ref=w.execute();let j=e;if(p._FocusAttrs.hasFocusRootAttributes(E)){const t=p._FocusAttrs.extractAttributesForFocusArea(E);E.as=e,j=s.FocusRoot,E.tabIndex=t.tabIndex,E.unclickable=t.unclickable,E.autofocus=t.autofocus,E.cycling=t.cycling}const x=i.ArrayUtils.flatten(o,!0,!0);if(x.for)return r.createElement(j,E,x);else return r.createElement(j,E,...x)}delimitEvent(e){const t=Object.keys(e),r={},n={};for(const o of t)if(!m.wasabyEventIntersection[o])n[o]=e[o];else r[o]=e[o];if(Object.keys(n).length)Object.defineProperty(n,"meta",{configurable:!0,value:e.meta});if(Object.keys(r).length)Object.defineProperty(r,"meta",{configurable:!0,value:e.meta});return{wasabyEvent:n,nativeEvent:r}}createReactCallbacks(e,t,r){const n=Object.keys(t);for(const o of n){const n=m.wasabyEventIntersection[o];if(!n)return;const a=t[o],s=(e,...t)=>{var r,n,o;for(const s of a){if("function"==typeof s)try{s(e)}catch(t){i.Logger.error(`ÐÑибка пÑи вÑзове ÑобÑÑиÑ. ÐбÑабоÑÑик: ${s.name}. СобÑÑие: ${null==e?void 0:e.type}`,void 0,t)}finally{return}try{const o=this.prepareEventArgs(e,s.args,t);if("__$nativeEvent"===s.value)try{s.handler(...o);continue}catch(t){i.Logger.error(`ÐÑоизоÑла оÑибка пÑи вÑзове наÑивного ÑобÑÑÐ¸Ñ "${null==e?void 0:e.type}".\n ÐопÑÑалиÑÑ Ð²ÑзваÑÑ Ð¾Ð±ÑабоÑÑик "${s.name}".\n ÐÐ»Ñ Ð¾Ñладки надо поÑÑавиÑÑ ÑоÑÐºÑ Ð¾ÑÑнова в меÑÑо Ð¿Ð°Ð´ÐµÐ½Ð¸Ñ Ð¾Ñибки и изÑÑиÑÑ ÑÑек.`,void 0,t)}const a=()=>s.viewController,l=(s.context||a).apply(s.viewController);if(s.handler)try{s.handler.apply(s.viewController).apply(l,o)}catch(t){i.Logger.error(`ÐÑоизоÑла оÑибка пÑи вÑзове обÑабоÑÑика ÑобÑÑÐ¸Ñ "${null==e?void 0:e.type}".\n ÐопÑÑалиÑÑ Ð²ÑзваÑÑ Ð¾Ð±ÑабоÑÑик "${s.handler.name}".\n ÐонÑекÑÑ Ð²Ñзова "${l._moduleName}"\n ÐÐ»Ñ Ð¾Ñладки надо поÑÑавиÑÑ ÑоÑÐºÑ Ð¾ÑÑнова в меÑÑо Ð¿Ð°Ð´ÐµÐ½Ð¸Ñ Ð¾Ñибки и изÑÑиÑÑ ÑÑек.`,void 0,t)}else{const e=()=>s.fn.apply(s.fn.control,o);if(!s.fn)continue;if(!s.fn.control._mounted){s.fn.control._$afterMountDecorator.saveDelayedEvent(e);continue}e()}if(o&&(null===(n=null===(r=o[0])||void 0===r?void 0:r.isStopped)||void 0===n?void 0:n.call(r))){e.stopPropagation();break}}catch(t){i.Logger.error(`ÐÑоизоÑла оÑибка пÑи вÑзове ÑобÑÑÐ¸Ñ "${null==e?void 0:e.type}".\n ÐопÑÑалиÑÑ Ð²ÑзваÑÑ Ð¾Ð±ÑабоÑÑик "${null!==(o=s.value)&&void 0!==o?o:s.name}".\n ÐонÑекÑÑ Ð²Ñзова "${s.viewController._moduleName}"\n ÐÐ»Ñ Ð¾Ñладки надо поÑÑавиÑÑ ÑоÑÐºÑ Ð¾ÑÑнова в меÑÑо Ð¿Ð°Ð´ÐµÐ½Ð¸Ñ Ð¾Ñибки и изÑÑиÑÑ ÑÑек.`,void 0,t)}}};if("onWheel"!==n)e[n]=s;else r.add(new d.CreateWheelEventRef(s))}}prepareEventArgs(e,t,r){let n=e;if((null==n?void 0:n.target)&&!(n instanceof o.SyntheticEvent))n=this.calculateEventObject(n);return[n,...this.calculateArgs(t,r)]}calculateEventObject(e){let t;if(!e.nativeEvent||e.nativeEvent&&e.nativeEvent.type!==e.type)t=new o.SyntheticEvent(e);else t=new o.SyntheticEvent(e.nativeEvent);
104if("mouseenter"===e.type||"mouseout"===e.type)t.target=e.currentTarget;return t.currentTarget=e.currentTarget,t}calculateArgs(e,t){return(null==t?void 0:t.length)?t:(null==e?void 0:e.length)?e:[]}};const O={_destroyed:!1,_mounted:!0,_moduleName:"native React component",UNSAFE_isReact:!0};return t}(0,{},n,$,p,u,d,a,i,O,A,V,P,f,s,F,p,G),K=function(e,t,r,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.CreateTag=t.CreateTagVdom=void 0,Object.defineProperty(t,"CreateTagVdom",{enumerable:!0,get:function(){return r.CreateTagVdom}}),Object.defineProperty(t,"CreateTag",{enumerable:!0,get:function(){return n.CreateTag}}),t}(0,{},X,z),Q=K,Z=function(e,t,r,n,o,i,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GeneratorText=void 0;const s="undefined"==typeof window;class l extends n.Generator{constructor(e){if(super(),e)this.generatorConfig=e;this.createTagComponent=new a.CreateTag}prepareDataForCreate(e,t){return t}calculateOptions(e,t,r,n){if(!s)return{...e,_$events:r};else return e}createText(e){return e}processControl(e){return(0,i.default)(e)}joinElements(e){return(0,o.joinElements)(e)}createTag(e,t,r,n,o){return this.createTagComponent.create(e,t,r,n,o)}createDirective(e){return"<"+e+">"}escape(e){return r.CommonUtils.escape(e)}}return t.GeneratorText=l,t}(0,{},d,G,w,k,K),J=Z,ee=function(e,t,r,n,o,i,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GeneratorVdom=void 0;const l="undefined"==typeof window,c=["onCaption"];class u extends o.Generator{constructor(e){super(e),this.createTagComponent=new s.CreateTagVdom}prepareDataForCreate(e,t,r){const i=n.Scope.calculateScope(t,n.CommonUtils.plainMerge)||{};if("_$inline_template"===e){if(this.config&&this.config.prepareAttrsForPartial)this.config.prepareAttrsForPartial(r);return r.events=(0,o.calcOriginEventName)(r.events),i}}createDirective(e){try{throw new Error("vdomMarkupGenerator createDirective not realized")}catch(t){r.Logger.error("createDirective ... in VDom",e,t)}}calculateOptions(e,t,n,o,s){var u,f;let d;if(!l){const e=new i.ChainOfRef;if(!t.useApiRef&&o&&t.viewController&&t.viewController.childrenRefsCreator){const r=null!==(u=t.viewController.childrenRefsCreator.getRef(o))&&void 0!==u?u:t.viewController.childrenRefsCreator.createRef(o);e.add(r)}if(s)e.add(new i.CreateOriginRef(s));if(!e.isEmpty())d=e.execute()}const p=t.viewController,m=(null===(f=t.attr)||void 0===f?void 0:f._physicParent)||p;if(this.calculateInheritOptions(e,t),!l)e._$events=n,e.ref=d;if(e._physicParent=m,e._logicParent=p,e._registerAsyncChild=null==m?void 0:m._registerAsyncChild,e._$blockOptionNames=t.blockOptionNames,a.constants.isProduction)return e;for(const t of Object.keys(e)){if(/^on[A-Z][A-Za-z]+/g.test(t)&&"function"!=typeof e[t]&&void 0!==e[t]&&null!==e[t]&&-1===c.indexOf(t))r.Logger.warn(`ÐпÑÐ¸Ñ ${t} должен бÑÑÑ ÐºÐ¾Ð»Ð±Ñк-ÑÑнкÑией (ÑейÑÐ°Ñ Ñип - ${typeof e[t]}).\n СледÑÐµÑ Ð¿ÐµÑеименоваÑÑ Ð¾Ð¿ÑиÑ, Ñ.к. подобнÑе опÑии бÑдÑÑ Ð²ÑзÑваÑÑ ÑложноÑÑи пÑи поÑÑиÑовании конÑÑола на ÑеакÑ.`)}return e}calculateInheritOptions(e,t){var r,n,o,i,a,s,l;if(void 0===e.readOnly)e.readOnly=t.data.readOnly||(null===(r=t.data.props)||void 0===r?void 0:r.readOnly)||!1;if(void 0===e.theme)e.theme=t.data.theme||(null===(n=t.data.props)||void 0===n?void 0:n.theme)||"default";if(void 0===e.pageData)e.pageData=t.data.pageData||(null===(o=t.data.props)||void 0===o?void 0:o.pageData)||null;if(void 0===e.Router)e.Router=t.data.Router||(null===(i=t.data.props)||void 0===i?void 0:i.Router)||null;if(void 0===e.isAdaptive)e.isAdaptive=null!==(l=null!==(a=t.data.isAdaptive)&&void 0!==a?a:null===(s=t.data.props)||void 0===s?void 0:s.isAdaptive)&&void 0!==l?l:void 0;return e}createText(e){if("string"!=typeof e)return r.Logger.error("ТÑÑ Ð´Ð¾Ð»Ð¶Ð½Ð° бÑла пÑийÑи ÑÑÑока, нÑжно поднÑÑÑÑÑ Ð¿Ð¾ ÑÑÐµÐºÑ Ð¸ понÑÑÑ Ð¾ÑкÑда здеÑÑ ÑÑо-Ñо дÑÑгое"),"";else return e}processControl(e){return e}joinElements(e){if(Array.isArray(e))return r.ArrayUtils.flatten(e,!0,!0);throw new Error("joinElements: elements is not array")}createTag(e,t,r,n,o,i,a){return this.createTagComponent.create(e,t,r,n,o,i,a)}escape(e){return e}}return t.GeneratorVdom=u,t}(0,{},u,d,G,i,m,K),te=ee,re=function(e,t,r,n){"use strict";let o,i;
104return Object.defineProperty(t,"__esModule",{value:!0}),t.Vdom=t.Text=void 0,t.Text=function(e){if(!o)o=new r.GeneratorText(e);return o},t.Vdom=function(e){if(!i)i=new n.GeneratorVdom(e);return i},t}(0,{},Z,ee),ne=function(e,t,r,n,o,i,a,s,l,c,u,f,d){"use strict";function p(e,t=!1,o){const s=o&&!0===o.isReactWrapper;if(function(e){if((0,i.getDisableCompatForMarkupDecorator)())return!1;else return!i.CommonUtils.disableCompat()&&(i.CommonUtils.isCompat()||e)}(t)&&!s){if(!m)if(a.isLoaded("View/ExecutorCompatible"))m=a.loadSync("View/ExecutorCompatible");else{if(!(0,n.isUnitTestMode)())n.Logger.warn("View/ExecutorCompatible не загÑÑжен. ÐÑовеÑÑÑе загÑÑÐ·ÐºÑ ÑÐ»Ð¾Ñ ÑовмеÑÑимоÑÑи.");return e?(0,r.Vdom)(o):(0,r.Text)(o)}return e?m.CompatibleReactVdom(o):m.CompatibleReactText(o)}return e?(0,r.Vdom)(o):(0,r.Text)(o)}let m;Object.defineProperty(t,"__esModule",{value:!0}),t.n=t.a=t.r=t.z=t.W=t.L=t.x=t.k=t.R=t.e=t.E=t.G=t.v=t.T=t.S=t.F=t.i=t.C=t.A=t.f=t.d=t.p=t.u=t.t=t.w=t.c=t.s=t.g=t.rdi=t.registerDeserializableIdentifiers=t._isTClosure=t.getIterator=t.getContext=t.getRk=t.validateNodeKey=t.getTypeFunc=t.plainMergeContext=t.plainMerge=t.setter=t.getter=t.makeFunctionSerializable=t.partialError=t.templateError=t.iterators=t.Sanitize=t.getDecorators=t.wrapUndef=t.calcParent=t.filterOptions=t.createDataArray=t.uniteScope=t.presetScope=t.createScope=t.isolateScope=t.callIFun=t.setUnreachablePathFlag=t.processMergeAttributes=t.getResourceUrl=t.plainMergeAttr=t.createDataArrayReact=t.createGenerator=void 0,t.createGenerator=p,t.createDataArrayReact=function(e,t,r){let i;if(1===e.length)i=e[0];else i=t=>(0,o.createElement)(o.Fragment,{children:e.map((e=>e(t)))});return Object.defineProperty(i,"isDataArray",{value:!0,configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(i,"isWasabyTemplate",{value:!!r,configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(i,"toString",{value(){return n.Logger.templateError("ÐÑполÑзование конÑенÑной опÑии компоненÑа или Ñаблона в каÑеÑÑве ÑÑÑоки. ÐеобÑ
одимо иÑполÑзоваÑÑ ÐºÐ¾Ð½ÑенÑнÑе опÑии Ñ Ð¿Ð¾Ð¼Ð¾ÑÑÑ ÐºÐ¾Ð½ÑÑÑÑкÑии ws:partial или обÑаÑиÑеÑÑ Ð² оÑдел ÐнÑÑаÑÑÑÑкÑÑÑа пÑедÑÑавлениÑ",t),this.join("")},configurable:!0,enumerable:!1,writable:!0}),i},Object.defineProperty(t,"plainMergeAttr",{enumerable:!0,get:function(){return s.plainMergeAttr}}),Object.defineProperty(t,"getResourceUrl",{enumerable:!0,get:function(){return l.getResourceUrl}}),Object.defineProperty(t,"processMergeAttributes",{enumerable:!0,get:function(){return c.processMergeAttributes}}),Object.defineProperty(t,"setUnreachablePathFlag",{enumerable:!0,get:function(){return c.setUnreachablePathFlag}}),Object.defineProperty(t,"callIFun",{enumerable:!0,get:function(){return c.callIFun}}),Object.defineProperty(t,"isolateScope",{enumerable:!0,get:function(){return c.isolateScope}}),Object.defineProperty(t,"createScope",{enumerable:!0,get:function(){return c.createScope}}),Object.defineProperty(t,"presetScope",{enumerable:!0,get:function(){return c.presetScope}}),Object.defineProperty(t,"uniteScope",{enumerable:!0,get:function(){return c.uniteScope}}),Object.defineProperty(t,"createDataArray",{enumerable:!0,get:function(){return c.createDataArray}}),Object.defineProperty(t,"filterOptions",{enumerable:!0,get:function(){return c.filterOptions}}),Object.defineProperty(t,"calcParent",{enumerable:!0,get:function(){return c.calcParent}}),Object.defineProperty(t,"wrapUndef",{enumerable:!0,get:function(){return c.wrapUndef}}),Object.defineProperty(t,"getDecorators",{enumerable:!0,get:function(){return c.getDecorators}}),Object.defineProperty(t,"Sanitize",{enumerable:!0,get:function(){return c.Sanitize}}),Object.defineProperty(t,"iterators",{enumerable:!0,get:function(){return c.iterators}}),Object.defineProperty(t,"templateError",{enumerable:!0,get:function(){return c.templateError}}),Object.defineProperty(t,"partialError",{enumerable:!0,get:function(){return c.partialError}}),Object.defineProperty(t,"makeFunctionSerializable",{enumerable:!0,get:function(){return c.makeFunctionSerializable}}),Object.defineProperty(t,"getter",{enumerable:!0,get:function(){return c.getter}}),Object.defineProperty(t,"setter",{enumerable:!0,get:function(){return c.setter}}),Object.defineProperty(t,"plainMerge",{enumerable:!0,get:function(){return c.plainMerge}}),Object.defineProperty(t,"plainMergeContext",{enumerable:!0,get:function(){return c.plainMergeContext}}),Object.defineProperty(t,"getTypeFunc",{enumerable:!0,get:function(){return c.getTypeFunc}}),Object.defineProperty(t,"validateNodeKey",{enumerable:!0,get:function(){return c.validateNodeKey}}),Object.defineProperty(t,"getRk",{enumerable:!0,get:function(){return c.getRk}}),Object.defineProperty(t,"getContext",{enumerable:!0,get:function(){return c.getContext}}),Object.defineProperty(t,"getIterator",{enumerable:!0,get:function(){return c.getIterator}}),Object.defineProperty(t,"_isTClosure",{enumerable:!0,get:function(){return c._isTClosure}});const y=(e,t,r)=>{};return t.registerDeserializableIdentifiers=y,t.rdi=y,Object.defineProperty(t,"g",{enumerable:!0,get:function(){return u.getter}}),Object.defineProperty(t,"s",{enumerable:!0,get:function(){return u.setter}}),Object.defineProperty(t,"c",{enumerable:!0,get:function(){return u.createDataArray}}),Object.defineProperty(t,"w",{enumerable:!0,get:function(){return u.wrapUndef}}),Object.defineProperty(t,"t",{enumerable:!0,get:function(){return u.getTypeFunc}}),Object.defineProperty(t,"u",{enumerable:!0,get:function(){return u.uniteScope}}),Object.defineProperty(t,"p",{enumerable:!0,get:function(){return u.plainMerge}}),Object.defineProperty(t,"d",{enumerable:!0,get:function(){return u.getDecorators}}),Object.defineProperty(t,"f",{enumerable:!0,get:function(){return u.filterOptions}}),Object.defineProperty(t,"A",{enumerable:!0,get:function(){return u.processMergeAttributes}}),Object.defineProperty(t,"C",{enumerable:!0,get:function(){return u.plainMergeContext}}),Object.defineProperty(t,"i",{enumerable:!0,get:function(){return u.callIFun}}),Object.defineProperty(t,"F",{enumerable:!0,get:function(){return u.setUnreachablePathFlag}}
104),Object.defineProperty(t,"S",{enumerable:!0,get:function(){return u.Sanitize}}),Object.defineProperty(t,"T",{enumerable:!0,get:function(){return u._isTClosure}}),Object.defineProperty(t,"v",{enumerable:!0,get:function(){return u.validateNodeKey}}),Object.defineProperty(t,"G",{enumerable:!0,get:function(){return u.calcParent}}),Object.defineProperty(t,"E",{enumerable:!0,get:function(){return u.createScope}}),Object.defineProperty(t,"e",{enumerable:!0,get:function(){return u.presetScope}}),Object.defineProperty(t,"R",{enumerable:!0,get:function(){return u.iterators}}),Object.defineProperty(t,"k",{enumerable:!0,get:function(){return u.getRk}}),Object.defineProperty(t,"x",{enumerable:!0,get:function(){return u.getContext}}),Object.defineProperty(t,"L",{enumerable:!0,get:function(){return u.templateError}}),Object.defineProperty(t,"W",{enumerable:!0,get:function(){return u.isolateScope}}),Object.defineProperty(t,"z",{enumerable:!0,get:function(){return u.makeFunctionSerializable}}),Object.defineProperty(t,"r",{enumerable:!0,get:function(){return f.getResourceUrl}}),Object.defineProperty(t,"a",{enumerable:!0,get:function(){return d.plainMergeAttr}}),t.n=p,t}(0,{},re,u,n,d,o,H,u,d,d,u,H),oe=ne,ie=ne,h.mergeAttrs=h.ATTR_DATA_REG_EXP=h.ATTR_STYLE=h.additionalReactAttrNames=h.reactAttrNames=h.wasabyToReactAttrNames=h.TimeoutHandlersQueue=h.CreateChildrenRef=h.WASABY_API_REF_SYMBOL=h.WASABY_REF_SYMBOL=h.isWasabyContentType=h.isWasabyRenderObject=h.shouldPassRef=h.markWasabyApiRef=h.markWasabyRef=h.isWmlTemplateType=h.isWasabyTemplateType=h.isWasabyControlType=h.isReactPortal=h.isReactElementArray=h.isValidChildren=h.isReactElement=h.isReactComponentType=h.isFunctionComponent=h.isForwardRef=h.hasWasabyApiRef=h.hasWasabyRef=h.isComponentClass=h.ReactComponentCreator=h.GeneratorVdom=h.GeneratorText=h.CreateTag=h.CreateTagVdom=h.wasabyAttrsToReactDom=h.MarkupUtils=h.logResolverError=h.resolveTemplateArray=h.resolveTemplateFunction=h.resolveTpl=h.GeneratorBase=h.createGenerator=h.TClosure=void 0,h.TClosure=oe,Object.defineProperty(h,"createGenerator",{enumerable:!0,get:function(){return ie.createGenerator}}),Object.defineProperty(h,"GeneratorBase",{enumerable:!0,get:function(){return q.Generator}}),Object.defineProperty(h,"resolveTpl",{enumerable:!0,get:function(){return q.resolveTpl}}),Object.defineProperty(h,"resolveTemplateFunction",{enumerable:!0,get:function(){return q.resolveTemplateFunction}}),Object.defineProperty(h,"resolveTemplateArray",{enumerable:!0,get:function(){return q.resolveTemplateArray}}),Object.defineProperty(h,"logResolverError",{enumerable:!0,get:function(){return q.logResolverError}}),h.MarkupUtils=j,Object.defineProperty(h,"wasabyAttrsToReactDom",{enumerable:!0,get:function(){return W.wasabyAttrsToReactDom}}),Object.defineProperty(h,"CreateTagVdom",{enumerable:!0,get:function(){return Q.CreateTagVdom}}),Object.defineProperty(h,"CreateTag",{enumerable:!0,get:function(){return Q.CreateTag}}),Object.defineProperty(h,"GeneratorText",{enumerable:!0,get:function(){return J.GeneratorText}}),Object.defineProperty(h,"GeneratorVdom",{enumerable:!0,get:function(){return te.GeneratorVdom}}),Object.defineProperty(h,"ReactComponentCreator",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(h,"isComponentClass",{enumerable:!0,get:function(){return b.isComponentClass}}),Object.defineProperty(h,"hasWasabyRef",{enumerable:!0,get:function(){return b.hasWasabyRef}}),Object.defineProperty(h,"hasWasabyApiRef",{enumerable:!0,get:function(){return b.hasWasabyApiRef}}),Object.defineProperty(h,"isForwardRef",{enumerable:!0,get:function(){return b.isForwardRef}}),Object.defineProperty(h,"isFunctionComponent",{enumerable:!0,get:function(){return b.isFunctionComponent}}),Object.defineProperty(h,"isReactComponentType",{enumerable:!0,get:function(){return b.isReactComponentType}}),Object.defineProperty(h,"isReactElement",{enumerable:!0,get:function(){return b.isReactElement}}),Object.defineProperty(h,"isValidChildren",{enumerable:!0,get:function(){return b.isValidChildren}}),Object.defineProperty(h,"isReactElementArray",{enumerable:!0,get:function(){return b.isReactElementArray}}),Object.defineProperty(h,"isReactPortal",{enumerable:!0,get:function(){return b.isReactPortal}}),Object.defineProperty(h,"isWasabyControlType",{enumerable:!0,get:function(){return b.isWasabyControlType}}),Object.defineProperty(h,"isWasabyTemplateType",{enumerable:!0,get:function(){return b.isWasabyTemplateType}}),Object.defineProperty(h,"isWmlTemplateType",{enumerable:!0,get:function(){return b.isWmlTemplateType}}),Object.defineProperty(h,"markWasabyRef",{enumerable:!0,get:function(){return b.markWasabyRef}}),Object.defineProperty(h,"markWasabyApiRef",{enumerable:!0,get:function(){return b.markWasabyApiRef}}),Object.defineProperty(h,"shouldPassRef",{enumerable:!0,get:function(){return b.shouldPassRef}}),Object.defineProperty(h,"isWasabyRenderObject",{enumerable:!0,get:function(){return b.isWasabyRenderObject}}),Object.defineProperty(h,"isWasabyContentType",{enumerable:!0,get:function(){return b.isWasabyContentType}}),Object.defineProperty(h,"WASABY_REF_SYMBOL",{enumerable:!0,get:function(){return b.WASABY_REF_SYMBOL}}),Object.defineProperty(h,"WASABY_API_REF_SYMBOL",{enumerable:!0,get:function(){return b.WASABY_API_REF_SYMBOL}}),Object.defineProperty(h,"CreateChildrenRef",{enumerable:!0,get:function(){return Y.CreateChildrenRef}}),Object.defineProperty(h,"TimeoutHandlersQueue",{enumerable:!0,get:function(){return E.TimeoutHandlersQueue}}
104),Object.defineProperty(h,"wasabyToReactAttrNames",{enumerable:!0,get:function(){return S.wasabyToReactAttrNames}}),Object.defineProperty(h,"reactAttrNames",{enumerable:!0,get:function(){return S.reactAttrNames}}),Object.defineProperty(h,"additionalReactAttrNames",{enumerable:!0,get:function(){return S.additionalReactAttrNames}}),Object.defineProperty(h,"ATTR_STYLE",{enumerable:!0,get:function(){return S.ATTR_STYLE}}),Object.defineProperty(h,"ATTR_DATA_REG_EXP",{enumerable:!0,get:function(){return S.ATTR_DATA_REG_EXP}}),Object.defineProperty(h,"mergeAttrs",{enumerable:!0,get:function(){return N.mergeAttrs}}),h})); 105define("UICommon/Vdom",["UICommon/Utils","UICommon/Base","Types/shim","require","exports"],(function(n,e,t,r,o){var i,s,u,a,l,c;return Object.defineProperty(o,"__esModule",{value:!0}),i=function(n,e,t){"use strict";function r(n){return!!(n&&"function"==typeof n.hasOwnProperty&&n.hasOwnProperty("func")&&"function"==typeof n.func&&n.hasOwnProperty("internal")&&n.hasOwnProperty("isWasabyTemplate"))}function o(n){return"function"==typeof n&&"function"==typeof n.hasOwnProperty&&n.hasOwnProperty("func")&&n.hasOwnProperty("internal")&&n.hasOwnProperty("isWasabyTemplate")}function i(n){return Array.isArray(n)&&n.isDataArray&&"function"==typeof n.hasOwnProperty&&n.hasOwnProperty("isWasabyTemplate")&&n.every(r)}function s(n){return!!n&&"function"==typeof n&&n.isDataArray&&"function"==typeof n.hasOwnProperty&&n.hasOwnProperty("isWasabyTemplate")&&Array.isArray(n.array)&&n.array.every(r)}function u(n){return i(n)||s(n)}function a(n){return!(!n||"object"!=typeof n||(0,t.isProxyChildren)(n)||"function"!=typeof n.getVersion)}Object.defineProperty(e,"__esModule",{value:!0}),e.isPossiblyScopeObjectOfInternal=e.isBlockOption=e.installBlockOptionProperties=e.shouldLazilyExit=e.shouldCheckVersions=e.shouldCheckDeep=e.shouldIgnoreChanging=e.isChildrenAsContent=e.isVersionableArray=e.isVersionable=e.isContentOption=e.getWS4ContentOptionInternals=e.isWS4ContentOption=e.isWS4VDOMContentOption=e.isWS4NVDOMContentOption=e.getWS3ContentOptionInternals=e.isWS3ContentOption=e.isContentOptionObject=e.areBothNaN=void 0;return e.areBothNaN=function(n,e){return"number"==typeof n&&"number"==typeof e&&isNaN(n)&&isNaN(e)},e.isContentOptionObject=r,e.isWS3ContentOption=o,e.getWS3ContentOptionInternals=function(n){return n.internal},e.isWS4NVDOMContentOption=i,e.isWS4VDOMContentOption=s,e.isWS4ContentOption=u,e.getWS4ContentOptionInternals=function(n){if(i(n))return n[0].internal;else return n.array[0].internal},e.isContentOption=function(n){return u(n)||o(n)},e.isVersionable=a,e.isVersionableArray=function(n){return!(!n||!Array.isArray(n)||"function"!=typeof n.getArrayVersion)},e.isChildrenAsContent=function(n){return!(0,t.isProxyChildren)(n)&&!!n.isChildrenAsContent},e.shouldIgnoreChanging=function(n){return!(!n||!n._ignoreChanging)},e.shouldCheckDeep=function(n){return!(!n||!n._isDeepChecking)},e.shouldCheckVersions=function(n){return!(!n||!n._preferVersionAPI)},e.shouldLazilyExit=function(n){return n.has(-100)},e.installBlockOptionProperties=function(n,e){for(const t of e){if(n[t]&&"object"==typeof n[t])Object.defineProperty(n[t],"_$blockOption",{value:!0,enumerable:!1})}},e.isBlockOption=function(n){return!(!n||!n._$blockOption)},e.isPossiblyScopeObjectOfInternal=function(n){return!(!n||"object"!=typeof n||!n._$internal||n instanceof Date||a(n))},e}(0,{},e),s=i,u=function(n,e,t,r,o,i){"use strict";function s(n,e,t,r,o,s,l,y,O,h){if(l&&h)return!1;const g=r||void 0!==e,C=o||void 0!==t;if(C&&g){if((0,i.areBothNaN)(t,e))return!1;if(e===t){if((0,i.isVersionable)(e)){const t=e.getVersion();if(s.get(O+n)!==t)return!0}if((0,i.isVersionableArray)(e)){const t=e.getArrayVersion(),r=s.get(O+n);if(void 0!==r&&r!==t)return!0}if(e&&(0,i.isChildrenAsContent)(e))return!0;else return!1}if((0,i.shouldIgnoreChanging)(e))return!1;if(!t)return!0;if("validators"===n)return!0;if((0,i.isWS4ContentOption)(t)&&(0,i.isWS4ContentOption)(e)){return!!u((0,i.getWS4ContentOptionInternals)(e),(0,i.getWS4ContentOptionInternals)(t),s,!1,y,!0,`${O}${n};`)}if(Array.isArray(e))if((0,i.isBlockOption)(e))return function(n,e,t,r=!1,o=""){if(n&&!e||!n&&e)return!0;
105if(!n&&!e)return!1;if(n.length!==e.length)return!0;for(let i=0;i<n.length;i++){const s=o+";"+i+";";if(a(n[i],e[i],t,p,!1,r,!0,s))return!0}return!1}(e,t,s,y,O+n);else return!0;if((0,i.isVersionable)(e)&&(0,i.shouldCheckVersions)(e)){const t=e.getVersion();return s.get(O+n)!==t}if(h&&function(n,e){return!("object"!=typeof e||"object"!=typeof n||!n||!e||n instanceof Date||(0,i.isVersionable)(n))}(e,t))return!!a(e,t,s,p,!1,y,!0,c);if((0,i.shouldCheckDeep)(e)&&(0,i.shouldCheckDeep)(t))return!!a(e,t,f,p,!0,y,!0,c);if((0,i.isBlockOption)(e))return!!a(e,t,f,p,!0,y,!0,c);else return!0}if(!C&&g)return r&&!o&&!y||h;if(C&&!g)return!(0,i.shouldIgnoreChanging)(e);else return!1}function u(n,e,r,o=!1,u=!1,a=!1,l=""){if((0,i.shouldLazilyExit)(n))return!0;if(o)return!1;const c=null!=r?r:f,p=new Map;let y=!1;const O=(h=n,g=e,Array.from(new t.Set([...(null!=h?h:f).keys(),...(null!=g?g:f).keys()])));var h,g;for(let t=0;t<O.length;++t){const r=O[t],i=n.get(r);if(s(r,i,e.get(r),n.has(r),e.has(r),c,o,u,l,!0)){if(a)return!0;y=!0,p.set(r,i)}}return y?p:!1}function a(n,e,u,a,l,c,y,O){const h=null!=u?u:f,g=null!=a?a:p,C={};let b=!1;(0,i.installBlockOptionProperties)(n,g);const d=function(n,e){const o=new t.Set(r.ObjectUtils.getKeysWithPrototypes(n)),i=r.ObjectUtils.getKeysWithPrototypes(e);for(let n=0;n<i.length;++n)o.add(i[n]);return Array.from(o)}(n,e);for(let t=0;t<d.length;++t){const r=d[t];if(o.skipChangedOptions.has(r))continue;const i=n[r];if(s(r,i,e[r],n.hasOwnProperty(r),e.hasOwnProperty(r),h,l,c,O,!1)){if(y)return!0;b=!0,C[r]=i}}return b?C:!1}Object.defineProperty(e,"__esModule",{value:!0}),e.getChangedOptions=e.getChangedInternals=void 0;const l=(0,r.isDebug)(),c="",f=new Map,p=[];return e.getChangedInternals=function(n,e,t=f,r=!1,o=!1,i=!1){if(!n&&e||n&&!e||!n&&!e)return!1;if(!(n instanceof Map&&e instanceof Map))return!0;else return u(n,e,t,r,o,i,c)},e.getChangedOptions=function(n,e,t=f,r=p,o=!1,i=!1,s=!1){if(!n&&e||n&&!e||!n&&!e)return!1;else return a(n,e,t,r,o,i,!l&&s,c)},e}(0,{},t,n,e,i),a=u,l=function(n,e,t){"use strict";function r(n,e,r){if("object"!=typeof e&&"function"!=typeof e)return!1;if((0,t.isVersionable)(e))return r.set(n,e.getVersion()),!0;if((0,t.isVersionableArray)(e))return r.set(n,e.getArrayVersion()),!0;if((0,t.isWS4ContentOption)(e)){i((0,t.getWS4ContentOptionInternals)(e),r,`${n};`)}return!1}function o(n,e,t){if("object"!=typeof n||null===n)return e;const o=Object.keys(n);for(let i=0;i<o.length;i++){const s=o[i];r(t+s,n[s],e)}return e}function i(n,e,i){if("object"!=typeof n||null===n)return e;else return n.forEach(((n,s)=>{if(!r(i+s,n,e))if((0,t.isPossiblyScopeObjectOfInternal)(n))o(n,e,"")})),e}Object.defineProperty(e,"__esModule",{value:!0}),e.collectInternalsVersions=e.collectObjectVersions=void 0;return e.collectObjectVersions=function(n){return o(n,new Map,"")},e.collectInternalsVersions=function(n){const e=new Map;if(!(n instanceof Map))return e;else return i(n,e,"")},e}(0,{},i),c=l,o.collectInternalsVersions=o.collectObjectVersions=o.getChangedInternals=o.getChangedOptions=o.isContentOption=void 0,Object.defineProperty(o,"isContentOption",{enumerable:!0,get:function(){return s.isContentOption}}),Object.defineProperty(o,"getChangedOptions",{enumerable:!0,get:function(){return a.getChangedOptions}}),Object.defineProperty(o,"getChangedInternals",{enumerable:!0,get:function(){return a.getChangedInternals}}),Object.defineProperty(o,"collectObjectVersions",{enumerable:!0,get:function(){return c.collectObjectVersions}}),Object.defineProperty(o,"collectInternalsVersions",{enumerable:!0,get:function(){return c.collectInternalsVersions}}),o})); 106define("UICommon/Base",["UICommon/Utils","UICommon/Focus","require","exports"],(function(e,r,t,n){var i,o,s,a,u,f;return Object.defineProperty(n,"__esModule",{value:!0}),i=function(e,r){"use strict";return Object.defineProperty(r,"__esModule",{value:!0}),r.skipChangedOptions=void 0,r.skipChangedOptions=new Set(["_$attributes","_$createdFromCode","_$parentsChildrenPromises","_$blockOptionNames","_$events","_physicParent","_logicParent","_registerAsyncChild","forwardRef","ref","forwardedRef","$wasabyRef","viewController","_$templateKeyPostfix","_$compound","_$internal"]),r}(0,{}),o=i,s=function(e,r,t,n){"use strict";function i(e){return t._FocusAttrs.prepareAttrsForFocus(e.attributes)}
106Object.defineProperty(r,"__esModule",{value:!0}),r.getGeneratorConfig=r.prepareAttrsForPartial=void 0,r.prepareAttrsForPartial=i;const o={prepareAttrsForPartial:i,prepareAttrsForRoot:function(e,r){if(!(0,n.isNewEnvironment)())if(e.attributes.class=e.attributes.class||"","string"==typeof r.theme){const t="controls_theme-"+r.theme;if(-1===e.attributes.class.indexOf(t))e.attributes.class=e.attributes.class+" "+t}}};return r.getGeneratorConfig=function(){return o},r}(0,{},r,e),a=s,u=function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isProxyChildren=r.getProxyChildren=void 0;const n="undefined"!=typeof Proxy,i="undefined"!=typeof Reflect,o="__isProxyChildren";return r.getProxyChildren=function(e){if(!n)return{};else return new Proxy({},{get(r,n,s){if("string"!=typeof n)return;if(n===o)return!0;const a=i?Reflect.get(r,n,s):r[n];if(void 0===a&&!n.includes("__transferred")&&!(n in r)){let r=`ÐопÑÑка обÑаÑÐµÐ½Ð¸Ñ Ðº доÑеÑÐ½ÐµÐ¼Ñ ÐºÐ¾Ð½ÑÑолÑ: "${n.toString()}" коÑоÑого не ÑÑÑеÑÑвÑеÑ. ÐÑли ÑÑо пÑовеÑка налиÑÐ¸Ñ Ð´Ð¾ÑеÑного конÑÑола, ÑекомендÑеÑÑÑ Ð¸ÑполÑзоваÑÑ Ð¾Ð¿ÐµÑаÑÐ¾Ñ in.`;if(e)r=`${r} ÐÑовеÑÑÑе Ñаблон конÑÑола: ${e}`;t.Logger.warn(r)}return a},set(e,r,n){if(null==n?void 0:n._unmounted)t.Logger.error(`ÐопÑÑка задаÑÑ _children ${r} на ÑазмонÑиÑованном конÑÑоле ${n._moduleName}, \n Ðадо вÑÑаÑÑ ÑоÑкой оÑÑÐ°Ð½Ð¾Ð²Ñ Ð² меÑÑо, где задаеÑÑÑ _children и пÑовеÑиÑÑ Ð¿Ð¾ÑÐµÐ¼Ñ ÑÑо пÑоизоÑло. \n ÐÑли ÑÑÑ Ð¾ÑÐ¸Ð±ÐºÑ Ð½Ðµ иÑпÑавиÑÑ - Ñакое поведение Ð¼Ð¾Ð¶ÐµÑ Ð¿ÑивеÑÑи к ÑÑеÑкам памÑÑи!`,n);return Reflect.set(e,r,n)}})},r.isProxyChildren=function(e){return!!e&&e[o]},r}(0,{},e),f=u,n.prepareAttrsForPartial=n.getGeneratorConfig=n.skipChangedOptions=n.isProxyChildren=n.getProxyChildren=void 0,Object.defineProperty(n,"getProxyChildren",{enumerable:!0,get:function(){return f.getProxyChildren}}),Object.defineProperty(n,"isProxyChildren",{enumerable:!0,get:function(){return f.isProxyChildren}}),Object.defineProperty(n,"skipChangedOptions",{enumerable:!0,get:function(){return o.skipChangedOptions}}),Object.defineProperty(n,"getGeneratorConfig",{enumerable:!0,get:function(){return a.getGeneratorConfig}}),Object.defineProperty(n,"prepareAttrsForPartial",{enumerable:!0,get:function(){return a.prepareAttrsForPartial}}),n})); 107define("Controls/event",["UI/Base","Types/entity","Env/Env","Compiler/IR","require","exports"],(function(e,t,r,i,s,n){var o,l,u,g,c,a,f,_,p,d;return Object.defineProperty(n,"__esModule",{value:!0}),o=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unregister=t.register=void 0;const r=["scrollStateChanged","listScroll","virtualScrollMove","customscroll","virtualNavigation","viewportResize"];return t.register=function(e,t,i,s){var n;if(null==s?void 0:s.listenItself)null===(n=e.registerEvent)||void 0===n||n.call(e,null,t,e,i,s);if(e._notify("register",[t,e,i,s],{bubbling:!0}),r.includes(t.toString()))e._notify("registerScroll",[t,e,i,s],{bubbling:!0})},t.unregister=function(e,t,i){var s;if(null==i?void 0:i.listenItself)null===(s=e.unregisterEvent)||void 0===s||s.call(e,null,t,e,i);if(e._notify("unregister",[t,e,i],{bubbling:!0}),r.includes(t.toString()))e._notify("unregisterScroll",[t,e,i],{bubbling:!0})},t}(0,{}),l=o,u=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e){this._registry={},this._register=e.register}register(e,t,r,i,s={}){if(t===this._register){const n=(null==s?void 0:s.id)||r.getInstanceId();this._registry[n]={component:r,callback:i};const o=r.unmountCallback;if(r.unmountCallback=()=>{if("function"==typeof o)o();this.unregister(e,t,r,s)},e&&!s.listenAll)e.stopPropagation();return!0}return!1}unregister(e,t,r,i={}){if(t===this._register)if(delete this._registry[(null==i?void 0:i.id)||r.getInstanceId()],e&&!i.listenAll)e.stopPropagation()}start(...e){if(this._registry)for(const e in this._registry)if(this._registry.hasOwnProperty(e)){const t=this._registry[e];if(t)t.callback.apply(t.component,arguments)}}startOnceTarget(e){let t;if(this._registry)for(const r in this._registry)if(this._registry.hasOwnProperty(r)){const i=this._registry[r];if(i.component===e)if(t=Array.prototype.slice.call(arguments),t.splice(0,1),i)i.callback.apply(i.component,t)}}destroy(){this._registry=null,this._register=null}},t}(0,{}),g=u,c=function(e){"use strict";
107return e.g({v:1,m:"wml!Controls/_event/Listener",t:[e.r(((e,t)=>[e.g(t,"div",{K:"0_",r:!0,c:!0})]))]})}(i),a=function(e){"use strict";function t(){return this}var r=["_registerIt","_unRegisterIt","content","_options","register","unregister"];return e.g({v:1,m:"wml!Controls/_event/Register",t:[e.r(((e,i)=>[e.P(i,e.m(i,0),{K:"0_",E:{"on:register":[{value:r[0],originalName:r[4],viewController:i.v}],"on:unregister":[{value:r[1],originalName:r[5],viewController:i.v}],meta:{isControl:!1,context:t,handler:e.M(i,1)}},O:e.s(i,{},e.m(i,2)),m:"attribute",c:!0,i:0})]))],p:r.slice(0,2),e:[(e,t)=>e.g(t,[r[3],r[2]]),function(e,t,r,i,s,n){return e.g(this,[n])},(e,t)=>e.g(t,[r[3]])],i:[[[2]]]})}(i),f=function(e,t,r,i,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends r.Control{constructor(){super(...arguments),this._template=i,this.config=null}_beforeMount(e){this.config=(e=>({listenAll:!!e.listenAll}))(e)}_afterMount(){this._notify("register",[this._options.event,this,this.callback,this.config],{bubbling:!0})}_beforeUnmount(){this._notify("unregister",[this._options.event,this,this.config],{bubbling:!0})}callback(){this._notify(this._options.event,Array.prototype.slice.call(arguments))}static getOptionTypes(){return{event:(0,s.descriptor)(String).required(),listenAll:(0,s.descriptor)(Boolean)}}}return t.default=n,t}(0,{},e,c,t),_=f,p=function(e,t,r,i,s,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class l extends r.Control{constructor(){super(...arguments),this._template=i,this._register=null}_beforeMount(e){if(o.constants.isBrowserPlatform)this._forceUpdate=()=>{},this._register=new n.default({register:e.register})}_registerIt(e,t,r,i,s={}){this._register.register(e,t,r,i,s)}_unRegisterIt(e,t,r,i={}){if(this._register)this._register.unregister(e,t,r,i)}start(...e){this._register.start.apply(this._register,arguments)}_beforeUnmount(){if(this._register)this._register.destroy(),this._register=null}static getOptionTypes(){return{register:s.descriptor(String).required()}}}return t.default=l,t}(0,{},e,a,t,u,r),d=p,n.UnregisterUtil=n.RegisterUtil=n.Register=n.RegisterClass=n.Listener=void 0,n.Register=d.default,Object.defineProperty(n,"RegisterUtil",{enumerable:!0,get:function(){return l.register}}),Object.defineProperty(n,"UnregisterUtil",{enumerable:!0,get:function(){return l.unregister}}),Object.defineProperty(n,"Listener",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(n,"RegisterClass",{enumerable:!0,get:function(){return g.default}}),n}));
108define("UI/Base",["WasabyLoader/ModulesLoader","UICore/Adaptive","UICommon/Utils","UI/Utils","Env/Env","Application/Page","Application/Initializer","Application/Env","require","exports","UICore/Base","UICommon/Base"],(function(t,e,r,n,a,i,o,s,u,c,d,l){var f,g,h,S,m,p,v,w,y,b,_,I,O,M,P,j;return Object.defineProperty(c,"__esModule",{value:!0}),f=function(t,e,r,n,a,i,o,s,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const c="undefined"!=typeof window;e.default=function(t={},e){t=t||{};const l=a.Storage.getInstance().get();if(c&&window.receivedStates&&r.isInit())(0,s.getStateReceiver)().deserialize(window.receivedStates);let f=e.attributes.application;if(f)f=f.value;(0,n.loadAsync)(f).then((r=>{var n,a;t.application=f,t.buildnumber=window.buildnumber;const g=(0,i.selectRenderDomNode)(e);t.rskey=(null===(a=null===(n=null==g?void 0:g.attributes)||void 0===n?void 0:n.key)||void 0===a?void 0:a.value)||"bd_",function(t,e,r,n){let a=e||{};if(c&&window.wsConfig)a={...a,...window.wsConfig};const l=function(t){var e;if(!c)return!1;if(-1!==(null===(e=o.detection.userAgent)||void 0===e?void 0:e.indexOf("Chrome/109")))return!1;if("true"===s.cookie.get("disableHydrate")||d)return!1;if(!window.visualViewport)return!1;if(t.windowInnerWidth!==window.innerWidth||t.windowInnerHeight!==window.innerHeight||t.windowOuterWidth!==window.outerWidth||t.windowOuterHeight!==window.outerHeight||t.viewportWidth!==window.visualViewport.width||t.viewportHeight!==window.visualViewport.height||t.screenWidth!==window.screen.width||t.screenHeight!==window.screen.height||t.containerClientWidth!==document.body.clientWidth||t.containerClientHeight!==document.body.clientHeight)return!1;if(document.body.querySelectorAll('[name="$$wasaby$async$loading"]').length)return!1;if(document.body.querySelectorAll(".ws-CompoundContainer").length)return!1;if(!function(){if((0,u.isUnitTestMode)())return!0;if(-1!==s.location.hostname.indexOf("autotest")||-1!==s.location.hostname.indexOf("prognix")||-1!==s.location.hostname.indexOf("localhost")||s.cookie.get("autotest"))return!0;if(-1!==s.location.hostname.indexOf("dev-online")||-1!==s.location.hostname.indexOf("test-online")||-1!==s.location.hostname.indexOf("fix-online"))return!0;if("true"===s.query.get.hydrateWithZoom)return!0;return!1}())if(Math.abs(window.outerWidth-window.innerWidth)>20||window.devicePixelRatio%1!=0)return!1;return!0}(n);i.Control.createControl(t,a,r,l)}(r,t,g,l)}))};let d=!1;if("undefined"!=typeof window&&"undefined"!=typeof URLSearchParams){const t=new URLSearchParams(window.location.search);d="true"===t.get("disableHydrate")}return e}(0,{},o,t,e,d,a,s,r),g=f,h=function(t,e,r){"use strict";return Object.defineProperty(e,"__esModule",{value:!0}),e.async=void 0,e.default=r.Control.createControl,e.async=async function(t,e,n){return new Promise(((a,i)=>{try{const i=r.Control.createControl(t,e,n),o=i._afterMount;i._afterMount=function(...t){o.apply(this,t),a(this)}}catch(t){i(t)}}))},e}(0,{},d),S=h,m=function(t,e,r){"use strict";return Object.defineProperty(e,"__esModule",{value:!0}),e.unmountState=e.mountState=void 0,e.mountState=function(t){const{title:e,og:n}=t.getMeta();return Object.entries(n||[]).map((([e,n])=>{return a=e,i=n,o=t.getId(),r.Head.getInstance().createTag("meta",{property:`og:${a}`,content:i,class:o});var a,i,o})).concat([(a=e,i=t.getId(),r.Head.getInstance().createTag("title",{class:i},a))]);var a,i},e.unmountState=function(t){if(!t)return;const e=r.Head.getInstance();t.forEach((t=>{e.deleteTag(t)}))},e}(0,{},i),p=function(t,e){"use strict";function r([t,e,r]){if(!e||e.constructor!==Object)return n([t,{},e]);else return n([t,e,r])}function n([t,e,n]){if(!n)return{tagName:t,attrs:e};if("string"==typeof n)return{tagName:t,attrs:e,children:n};else return{tagName:t,attrs:e,children:r(n)}}return Object.defineProperty(e,"__esModule",{value:!0}),e.fromJML=void 0,e.fromJML=r,e}(0,{}),v=p,w=function(t,e,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createStatesStore=void 0;class a{constructor(t=Object.create(null)){this.data=t}get(t){return this.data[t]}set(t,e){return this.data[t]=e,!0}remove(t){delete this.data[t]}getKeys(){return Object.keys(this.data)}toObject(){return this.data}}return a.label="UI/_base/_meta/Stack#MetaStore",e.createStatesStore=function(t){if(!(0,n.isInit)()){const e=new a(t);return()=>e}const e=t=>new a(t);return(0,r.setStore)(a.label,e(t)),()=>(0,r.getStore)(a.label,e)},e}(0,{},s,o),y=function(t,e,r){"use strict";function n({tagName:t,attrs:e,children:i}={tagName:"no_tag",attrs:{}},o){const s={...e},u=Object.entries(s).map((([t,e])=>{if("href"===t||"src"===t)return`${t}="${function(t,e){return!1===(null==e?void 0:e.getResourceUrl)?t:(0,r.getResourceUrl)(t)}(e,o)}"`;if(void 0===e)return t;else return`${t}="${(0,r.escapeHtml)(e)}"`})).join(" ");if(a[t])return`<${t} ${u}>`;let c="";
108if(i)c="string"==typeof i?i:n(i);return`<${t} ${u}>${c}</${t}>`}Object.defineProperty(e,"__esModule",{value:!0}),e.generateTagMarkup=void 0;const a={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};return e.default=class{constructor(t,e){this.outerHTML="",this.outerHTML=t.map((t=>n(t,e))).join("\n")}},e.generateTagMarkup=n,e}(0,{},n),b=y,_=function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n="undefined"==typeof window?"ps-":"";let a=1;class i extends r.default{constructor(t,e=(()=>`state-${n}${a++}`)(),r=void 0,i=void 0){super(function(t={},e){return Object.entries(t).map((([t,r])=>function(t,e,r){return{tagName:"meta",attrs:{property:`og:${t}`,class:r,content:e}}}(t,r,e)))}(t.og,e)),this._meta=t,this._guid=e,this._nextStateId=r,this._prevStateId=i}getId(){return this._guid}equal(t){return t.getId()===this._guid}serialize(){const{_meta:t,_guid:e,_nextStateId:r,_prevStateId:n}=this;return JSON.stringify({_meta:t,_guid:e,_nextStateId:r,_prevStateId:n})}getMeta(){return this._meta}getNextStateId(){return this._nextStateId}setNextState(t){this._nextStateId=null==t?void 0:t.getId()}getPrevStateId(){return this._prevStateId}setPrevState(t){this._prevStateId=null==t?void 0:t.getId()}static deserialize(t){if(!t)return null;try{const{_meta:e,_guid:r,_nextStateId:n,_prevStateId:a}=JSON.parse(t);return new i(e,r,n,a)}catch{return null}}}return e.default=i,e}(0,{},y),I=function(t,e,r,n,a,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class o{get lastState(){return this._getLastDataStore().get("lastState")}set lastState(t){(0,r.unmountState)(this._getLastDataStore().get("headTagIds")),this._getLastDataStore().set("headTagIds",(0,r.mountState)(t)),this._getLastDataStore().set("lastState",t)}constructor(t,e){if(this.getStore=t,e)this._getLastDataStore().set("lastState",e);this.push=this.push.bind(this),this.remove=this.remove.bind(this)}_getLastDataStore(){return(0,i.getStore)("meta-stack-last-data")}push(t){const e=new n.default(t);return this.linkState(e,(()=>{this.lastState=e})),this.storeState(e),e}remove(t){if(!t)return;const e=this.getStateById(t.getId());if(e)this.unlinkState(e),this.removeState(e)}serialize(){const t=this.getStore().getKeys().map((t=>this.getStateById(t).serialize()));return JSON.stringify(t)}linkState(t,e){if(t.setPrevState(this.lastState),this.lastState)this.lastState.setNextState(t),e();else e()}unlinkState(t){const e=this.getStateById(t.getPrevStateId()),r=this.getStateById(t.getNextStateId());if(!e&&!r)throw new Error("Удаление поÑледнего state!");if(e)if(e.setNextState(r),!r)this.lastState=e;null==r||r.setPrevState(e)}
108getStateById(t){return t&&this.getStore().get(t)||null}removeState(t){this.getStore().remove(t.getId())}storeState(t){this.getStore().set(t.getId(),t)}static getInstance(){if(o.instance)return o.instance;else return o.instance=new o((0,a.createStatesStore)())}static restore(t){if(!t)return null;const e={};try{const r=JSON.parse(t).map((t=>n.default.deserialize(t))).filter((t=>null!==t));return r.forEach((t=>{e[t.getId()]=t})),o.instance=new o((0,a.createStatesStore)(e),r[r.length-1])}catch{return null}}}return e.default=o,e}(0,{},m,_,w,s),O=function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceMeta=void 0;const n=r.default.getInstance;return e.ResourceMeta=class{constructor(t){this.meta=t}enter(){this._metaState=n().push(this.meta)}dispose(){n().remove(this._metaState)}},e}(0,{},I),M=function(t,e,r,n,a){"use strict";return Object.defineProperty(e,"__esModule",{value:!0}),e.getMetaStack=e.ResourceMeta=e.Stack=e.State=void 0,Object.defineProperty(e,"State",{enumerable:!0,get:function(){return r.default}}),e.Stack=n.default,Object.defineProperty(e,"ResourceMeta",{enumerable:!0,get:function(){return a.ResourceMeta}}),e.getMetaStack=n.default.getInstance,e}(0,{},_,I,O),P=M,j=M,c.getMetaStack=c.meta=c.fromJML=c.TagMarkup=c.AsyncCreator=c.Creator=c.BootstrapStart=c.getGeneratorConfig=c.isReact19=c.setScrollOnBody=c.UpdatePreventer=c.Control=void 0,Object.defineProperty(c,"Control",{enumerable:!0,get:function(){return d.Control}}),Object.defineProperty(c,"UpdatePreventer",{enumerable:!0,get:function(){return d.UpdatePreventer}}),Object.defineProperty(c,"setScrollOnBody",{enumerable:!0,get:function(){return d.setScrollOnBody}}),Object.defineProperty(c,"isReact19",{enumerable:!0,get:function(){return d.isReact19}}),Object.defineProperty(c,"getGeneratorConfig",{enumerable:!0,get:function(){return l.getGeneratorConfig}}),Object.defineProperty(c,"BootstrapStart",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(c,"Creator",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(c,"AsyncCreator",{enumerable:!0,get:function(){return S.async}}),Object.defineProperty(c,"TagMarkup",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(c,"fromJML",{enumerable:!0,get:function(){return v.fromJML}}),c.meta=P,Object.defineProperty(c,"getMetaStack",{enumerable:!0,get:function(){return j.getMetaStack}}),c})); 109define("UI/Utils",["require","exports","UICommon/Utils","UICore/Base"],(function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.purifyInstance=t.escapeHtml=t.jsEscape=t.ArrayUtils=t.ObjectUtils=t.FunctionUtils=t.isElementVisible=t.getResourceUrl=t.needToBeCompatible=t.isNewEnvironment=t.Logger=void 0,Object.defineProperty(t,"Logger",{enumerable:!0,get:function(){return n.Logger}}),Object.defineProperty(t,"isNewEnvironment",{enumerable:!0,get:function(){return n.isNewEnvironment}}),Object.defineProperty(t,"needToBeCompatible",{enumerable:!0,get:function(){return n.needToBeCompatible}}),Object.defineProperty(t,"getResourceUrl",{enumerable:!0,get:function(){return n.getResourceUrl}}),Object.defineProperty(t,"isElementVisible",{enumerable:!0,get:function(){return n.isElementVisible}}),Object.defineProperty(t,"FunctionUtils",{enumerable:!0,get:function(){return n.FunctionUtils}}),Object.defineProperty(t,"ObjectUtils",{enumerable:!0,get:function(){return n.ObjectUtils}}),Object.defineProperty(t,"ArrayUtils",{enumerable:!0,get:function(){return n.ArrayUtils}}),Object.defineProperty(t,"jsEscape",{enumerable:!0,get:function(){return n.jsEscape}}),Object.defineProperty(t,"escapeHtml",{enumerable:!0,get:function(){return n.escapeHtml}}),Object.defineProperty(t,"purifyInstance",{enumerable:!0,get:function(){return r.purifyInstance}})})); 110define("UICore/Base",["react/jsx-runtime","react-dom/client","react-dom","react","WasabyLoader/ModulesLoader","UICore/WasabyReactivity","UICore/Ref","UICore/NodeCollector","UICore/Jsx","UICore/Focus","UICore/Executor","UICore/Events","UICore/Contexts","UICore/Adaptive","UICommon/Vdom","UICommon/ThemeInitializer","UICommon/Focus","UICommon/Executor","Types/shim","Types/function","Env/Env","Core/core-extend","Compiler/IR","Application/Initializer","Application/Env","require","exports","UICommon/Base","UICommon/Utils"],(function(e,t,r,n,o,i,s,a,d,l,c,u,h,f,p,_,m,g,v,y,C,b,R,E,O,w,U,S,M){var N,P,D,$,k,T,I,x,A,F,j,L,B,H,V,W,z,G,q,Q,K,Y,J,X,Z,ee,te,re,ne,oe,ie,se,ae,de,le,ce,ue,he,fe,pe,_e,me,ge,ve,ye,Ce;return Object.defineProperty(U,"__esModule",{value:!0}),N=function(e,t){"use strict";
110Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(){this._delayedEvents=[]}saveDelayedEvent(e){this._delayedEvents.push(e)}executeDelayedEvent(){const e=this._delayedEvents;this._delayedEvents=[];for(const t of e)t()}},t}(0,{}),P=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e){this._inst=e,this._childrenRefs=new Map,this.setChildrenDisabled=this.setChildrenDisabled.bind(this)}createRef(e,t){let n=this._childrenRefs.get(e);if(!n)n=[];const o=new r.CreateChildrenRef(this._inst,e,this.setChildrenDisabled,t);return n.push(o),this._childrenRefs.set(e,n),o}getRef(e){var t;return null===(t=this._childrenRefs.get(e))||void 0===t?void 0:t[0]}setChildrenDisabled(e,t){const r=e&&this._childrenRefs.get(e);if(r)for(const e of r)e.disable(t)}clear(){this._childrenRefs.forEach(((e,t)=>{this.setChildrenDisabled(t,!1)}))}},t}(0,{},c),D=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unmountJQueryPatcher=void 0;const n=new r.TimeoutHandlersQueue(5e3);return t.unmountJQueryPatcher=new class{registerStartUnmount(e){if(!this.unmountElement)this.unmountElement=e}registerEndUnmount(e){if(e===this.unmountElement)this.unmountElement=null}patchJQuery(){if(this.isPatched||!requirejs.defined("jquery"))return;this.isPatched=!0;const e=()=>this.unmountElement,t=requirejs("jquery"),r=t.prototype.remove;t.prototype.remove=function(){const t=this[0],o=e();if(o&&t&&o.contains(t)){const e=arguments;return n.addHandler((()=>{r.apply(this,e)})),this}return r.apply(this,arguments)};const o=t.prototype.empty;t.prototype.empty=function(){const t=this[0],r=e();if(r&&t&&r.contains(t)){const e=arguments;return n.addHandler((()=>{o.apply(this,e)})),this}return o.apply(this,arguments)}}},t}(0,{},c),$=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class o extends r.Component{componentDidCatch(e,t){var r;null===(r=(0,n.getStateReceiver)())||void 0===r||r.rollbackHydrationDeferredCleanup()}render(){return this.props.children}}return t.default=o,t}(0,{},n,O),k=function(e,t,r,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.getLoadingComponent=t.ASYNC_LOADING_TEST_INDICATOR=void 0,t.ASYNC_LOADING_TEST_INDICATOR="$$wasaby$async$loading",t.getLoadingComponent=function(e){if((0,n.isDebug)())return(0,r.createElement)("img",{src:(0,n.getResourceUrl)("/cdn/LoaderIndicator/1.0.0/ajax-loader-indicator.gif",!0),style:{maxWidth:"32px",maxHeight:"32px"},name:t.ASYNC_LOADING_TEST_INDICATOR,ref:e});else return(0,r.createElement)("div",{name:t.ASYNC_LOADING_TEST_INDICATOR,ref:e})},t}(0,{},n,M),T=k,I=function(e,t,r,n,o,i){"use strict";function s(e,t){const n="ÐÑ Ð¿ÑÑаеÑеÑÑ Ð¸ÑполÑзоваÑÑ Ð¿Ð¾Ð»Ðµ или меÑод ÑазÑÑÑенного конÑÑола.\n"+(e._moduleName?`ÐонÑÑол: ${e._moduleName}\n`:"")+(void 0!==e._instId?`InstId конÑÑола: ${e._instId}\n`:"")+(void 0!==e._rskey?`rskey: ${e._rskey}\n`:"")+`ÐпеÑаÑиÑ: ${t}\nÐÑжно найÑи по ÑÑÐµÐºÑ ÐºÐ¾Ð´, коÑоÑÑй пÑÐ¾Ð´Ð¾Ð»Ð¶Ð°ÐµÑ Ð¸ÑполÑзоваÑÑ ÐºÐ¾Ð½ÑÑол поÑле его ÑазÑÑÑениÑ.`;r.Logger.error(n)}function a(e,t,r,n){const o=p.get(e);if(o)return o;const i=function(e,t,r){const n=()=>{};if(n._moduleName=e,n._instId=t,n._rskey=r,"undefined"==typeof Proxy)return n;const o=new Proxy(n,{get:function(e,t){if(t===Symbol.toPrimitive)return f;else return s(e,`ÑÑение ÑвойÑÑва "${String(t)}"`),o},set:function(e,t,r){return s(e,`запиÑÑ ÑвойÑÑва "${String(t)}", Ñип знаÑениÑ: ${typeof r}`),!1},apply:function(e,t,r){return s(e,`вÑзов оÑиÑенного знаÑÐµÐ½Ð¸Ñ ÐºÐ°Ðº ÑÑнкÑии, колиÑеÑÑво аÑгÑменÑов: ${r.length} (${r.map(String).join(", ")})`),o}});return o}(t,r,n);return p.set(e,i),i}function d(e){if("string"==typeof e||"number"==typeof e)return e}function l(e,t,r){try{e[t]=r}catch{}}function c(e,t,r){var n;if(e.__purified)return;const o=e._moduleName||t,i=d(e._instId),s=d(null===(n=e._options)||void 0===n?void 0:n.rskey);let c;const u=Object.keys(e);for(const t of u)if(!r||!r[t])if((f=e[t])&&-1!==h.indexOf(typeof f)){if(!c)c=a(e,o,i,s);l(e,t,c)}var f;e.__purified=!0}
110Object.defineProperty(t,"__esModule",{value:!0}),t.isPurifyDisabled=void 0;const u=new n.TimeoutHandlersQueue(1e4),h=["object","function"],f=()=>"",p=new WeakMap,_="undefined"!=typeof window;return t.isPurifyDisabled=_?(0,i.once)((()=>"true"===o.cookie.get("disablePurify"))):()=>!0,t.default=function(e,t="instance",r=!1,n){if(r)u.addHandler((()=>{c(e,t,n)}));else c(e,t,n)},t}(0,{},M,c,O,y),x=I,A=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o="undefined"==typeof window;return t.default=class{constructor(e,t){this._moduleName=e,this._RSKey=t}ejectReceivedState(e=!1){var t,o;if(this.isServerSide()||!this._RSKey||!(0,n.isInit)())return;const i=(0,r.getStateReceiver)();if(!i||!i.register)return;let s;return null===(t=i.unregister)||void 0===t||t.call(i,this._RSKey),i.register(this._RSKey,{getState:()=>({}),setState:e=>{s=e}},e),null===(o=i.unregister)||void 0===o||o.call(i,this._RSKey),s}saveReceivedState(e){if(!this.isServerSide()||!e||!(0,n.isInit)())return;const t={ulid:this._RSKey,moduleName:this._moduleName};if(e instanceof Promise)return(0,r.getStateReceiver)().register(t,e);(0,r.getStateReceiver)().register(t,{getState:()=>e,setState:()=>{}})}isServerSide(){return o}},t}(0,{},O,E),F=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Runner=void 0;return t.Runner=class{constructor(e){this._callback=e}exec(...e){if(!this._didStart)this._callback(...e),this._didStart=!0}reset(){return this._didStart=!1,this._didStart}},t}(0,{}),j=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{reset(e){return delete this._reasonGettersMap,this._mounted=e,this}addReason(e){return this._reasonGettersMap=e,this}fireForceUpdate(e){if(this._optionsChangedDuringMount)this._optionsChangedDuringMount=!1,e()}exec(){var e,t,r,n;const o=null===(e=this._reasonGettersMap)||void 0===e?void 0:e.hasChangesOptions(),i=null===(t=this._reasonGettersMap)||void 0===t?void 0:t.hasChangesState(),s=null===(r=this._reasonGettersMap)||void 0===r?void 0:r.hasChangesAttrs(),a=null===(n=this._reasonGettersMap)||void 0===n?void 0:n.hasChangesInternalOptions();if(!this._mounted&&o)this._optionsChangedDuringMount=!0;if(this._mounted&&this._optionsChangedDuringMount)return this._optionsChangedDuringMount=!1,{needUpdate:!0,canContinueExecute:!0,isOptionsChanged:!!o};if(!(i||s||o||a))return{needUpdate:!1,canContinueExecute:!1,isOptionsChanged:!!o};if(i)return{needUpdate:!0,canContinueExecute:!1,isOptionsChanged:!!o};else return{needUpdate:!0,canContinueExecute:!0,isOptionsChanged:!!o}}},t}(0,{}),L=function(e,t,r,n){"use strict";function o(e){n.Logger.error(e.message)}Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e){this._notLoadThemes=!1,this._notLoadThemes=e.notLoadThemes||!1,this._themeController=(0,r.getThemeController)(),this._themeName=this._themeController.normalizeSelector(e.themeName)}updateTheme(e,t=!1){if(this._themeName===e&&!t)return null;if(void 0!==e)this._themeName=this._themeController.normalizeSelector(e);return this._loadThemeVariables(t),null}getStaticThemeName(){var e;const t=this._themeController.getActiveThemeBySelector(this._themeName);if(null==t?void 0:t.properties)if(void 0===t.properties.get)return"default";else return null===(e=t.properties)||void 0===e?void 0:e.get("staticTheme")}_loadThemeVariables(e=!1){if(!this._themeName||this._notLoadThemes)return;if((0,n.isUnitTestMode)())return;let t;try{t=this._themeController.getActiveTheme({isFallback:!0,selector:this._themeName},!0),this._themeController.getVariables(this._themeName,void 0,e)}catch(e){return void o(e)}if(t&&t.then)t=t.catch(o);return t}},t}(0,{},_,M),B=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VersionStateDecorator=void 0;return t.VersionStateDecorator=class{constructor(){this.changedFieldNames=[],this.setStateUpdater=this.setStateUpdater.bind(this)}addChangedFieldName(e){this.changedFieldNames.push(`$this$ ${e||"$unnamed$"}`)}clearChangedFieldNames(){this.changedFieldNames=[]}setStateUpdater(e){const t={commonVersion:(e.commonVersion||0)+1};for(const r of this.changedFieldNames)t[r]=(e[r]||0)+1;return this.clearChangedFieldNames(),t}hasChangesState(e,t){return e.commonVersion!==t.commonVersion}},t}(0,{}),H=function(e,t){"use strict";
110Object.defineProperty(t,"__esModule",{value:!0}),t.ControlTreeEdge=void 0;return t.ControlTreeEdge=class{constructor(e,t,r){if(this.control=e,this.parent=t,this.unmountHook=r,this.children=new Map,t)t.addChild(this)}destroyTree(e){for(const t of this.eraseEdge([],e))t()}addChild(e){this.children.set(e.control,e)}removeChild(e){this.children.delete(e.control)}eraseEdge(e,t){var r;if(!t&&this.parent)null===(r=this.parent)||void 0===r||r.removeChild(this);for(const t of Array.from(this.children.values()))t.eraseEdge(e);if(!t)e.push(this.unmountHook);return e}},t}(0,{}),V=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e){this.emptySetHandler=e,this.set=new r.Set}add(e){this.set.add(e)}delete(e){if(this.set.delete(e),!this.set.size)this.emptySetHandler()}clearOnError(){if(this.set.size)this.set.clear(),this.emptySetHandler()}get size(){return this.set.size}},t}(0,{},v),W=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=()=>{};return t.default=class{constructor(e,t){this.beforeExecuteCallback=e,this.afterExecuteCallback=t,this.controlsToSkip=new n.Set,this.plannedUpdates=new n.Map}enqueue(e,t,r){if(this.plannedUpdates&&!this.plannedUpdates.has(e))this.plannedUpdates.set(e,{order:t,setStateHandler:r})}dequeue(e){var t;null===(t=this.controlsToSkip)||void 0===t||t.add(e)}executeDelayed(){this.executeDelayed=o,(0,r.delay)((()=>{var e,t;if(!this.plannedUpdates||!this.controlsToSkip)return;null===(e=this.beforeExecuteCallback)||void 0===e||e.call(this);const r=Array.from(this.plannedUpdates);r.sort(this.sortInstancesFunction);for(const[e,{setStateHandler:t}]of r)if(!this.controlsToSkip.has(e))t();this.enqueue=o,this.dequeue=o,this.plannedUpdates=void 0,this.controlsToSkip=void 0,null===(t=this.afterExecuteCallback)||void 0===t||t.call(this)}))}sortInstancesFunction(e,t){return e[1].order-t[1].order}},t}(0,{},y,v),z=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WasabyHooksQueue=void 0;return t.WasabyHooksQueue=class{constructor(){this.hookPlacement=new Map}enqueue(e,t){if(this.hookPlacement.has(e))return;const r=this.createQueueElement(t,e);this.hookPlacement.set(e,r);let n=e.props._physicParent;for(;n&&!this.hookPlacement.has(n);)n=n.props._physicParent;this.insertBefore(r,this.hookPlacement.get(n))}release(){let e=this.head;for(;e;){e.data();const t=e.next;this.dequeue(e.owner),e=t}}dequeue(e){const t=this.hookPlacement.get(e);if(!t)return;this.hookPlacement.delete(e);const r=t.next,n=t.prev;if(!n)if(!r)return this.head=void 0,void(this.tail=void 0);else return r.prev=void 0,void(this.head=r);if(!r)return n.next=void 0,void(this.tail=n);n.next=r,r.prev=n}insertBefore(e,t){if(!this.tail)return this.head=e,void(this.tail=e);if(!t){const t=this.tail;return t.next=e,e.prev=t,void(this.tail=e)}const r=t.prev;if(e.next=t,t.prev=e,r)r.next=e,e.prev=r;else this.head=e}createQueueElement(e,t){return{next:void 0,prev:void 0,data:e,owner:t}}toArray(){const e=[];for(let t=this.head;t;t=t.next)e.push(t);return e}},t}(0,{}),G=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkReactApiRedefined=void 0;const r=["state","setState","props","context","render","shouldComponentUpdate","componentDidMount","componentDidUpdate","componentWillUnmount","getSnapshotBeforeUpdate","forceUpdate"],n=["contextType","UNSAFE_isReact","isWasaby"];return t.checkReactApiRedefined=function(e,t){const o=[];for(const n of r)if(e.constructor.prototype[n]!==t.prototype[n])o.push(n);const i=e.constructor;for(const e of n)if(i[e]!==t[e])o.push(e);return o},t}(0,{}),q=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.injectHook=void 0,t.injectHook=function(){if("undefined"==typeof window||void 0===window.__WASABY_DEV_HOOK_REACT__)return!1;else return window.__WASABY_DEV_HOOK_REACT__.init(),!0},t}(0,{}),Q=q,K=function(e,t,r,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorViewer=void 0;const i=(e,t)=>{const{errorConfig:o,theme:i="default"}=t,s=(0,r.createElement)("div",{key:"e12"},`${null==o?void 0:o._errorMessage}`),a=i.toLowerCase().includes("dark")?"blue":"default";return e?(0,r.createElement)("div",{key:"e1",style:{padding:"50px",maxWidth:"30%",margin:"0 auto",textAlign:"center"}},[(0,r.createElement)("img",{key:"e11",style:{maxWidth:"100%",maxHeight:"200px",marginBottom:"20px"},src:(0,n.getResourceUrl)(`/cdn/Maintenance/1.1.0/img/NOT_FOUND_${a}.svg`,!0)}),s]):s};class s extends r.Component{constructor(e){super(e),this.state={enoughSpace:void 0},this.ref=(0,r.createRef)(),this.fullRef=o.ChainOfRef.both(this.props.forwardedRef,this.ref)}render(){return(0,r.createElement)("div",{key:"e0",ref:this.fullRef},[i(!!this.state.enoughSpace,this.props)])}componentDidMount(){var e,t,r,n;if(null!==(null===(e=this.ref)||void 0===e?void 0:e.current)&&void 0===this.state.enoughSpace){const e=null===(t=this.ref.current)||void 0===t?void 0:t.parentElement,o=null!==(r=null==e?void 0:e.clientHeight)&&void 0!==r?r:0,i=null!==(n=null==e?void 0:e.clientWidth)&&void 0!==n?n:0;if(i<166||i>=275&&o<180||i>=166&&i<274&&o<132)this.setState((e=>{const t={...e};return t.enoughSpace=!1,t}));else this.setState((e=>{const t={...e};return t.enoughSpace=!0,t}))}}static process(e){return{_errorMessage:"ЧÑо-Ñо поÑло Ð
110½Ðµ Ñак",error:e}}}return t.ErrorViewer=s,t}(0,{},n,M,s),Y=K,J=function(e,t,r){"use strict";let n,o;Object.defineProperty(t,"__esModule",{value:!0}),t.setScrollOnBody=t.initIntersectionObserver=void 0;let i=!1;return t.initIntersectionObserver=function(){if(!("undefined"==typeof IntersectionObserver||o&&IntersectionObserver instanceof o))n=IntersectionObserver,o=function(e,t){if(t=t||{},r.detection.isPhone&&i){if(t.root&&t.root.scrollHeight>window.visualViewport.height)t.root=null;t.rootMargin=t.rootMargin||"30% 0% 30% 0%",t.threshold=t.threshold||0}return new n.prototype.constructor(((t,r)=>e(t,r)),t)},o.prototype=n.prototype,IntersectionObserver=o},t.setScrollOnBody=function(e){i=e},t}(0,{},C),X=J,Z=function(e,t,r){"use strict";function n(e){return parseInt((e+"").replace("inst_",""),10)}function o(e,t){const r=e.findIndex((e=>e.control===t.control)),o=e[r];let i=!o;if(o&&o.id!==t.id)i=!0,e.splice(r,1);if(!i)e[r]=t;else!function(e,t){const r=n(t.id);let o=e.length;for(let t=0;t<e.length;++t)if(n(e[t].id)<r){o=t;break}e.splice(o,0,t)}(e,t)}function i(e,t){if(!e)return[];const r=e.findIndex((e=>e.control===t));if(-1!==r)return e.splice(r,1);else return[]}return Object.defineProperty(t,"__esModule",{value:!0}),t.prepareControlNodes=t.extractControlNodeFromContainer=void 0,t.extractControlNodeFromContainer=function(e){const t=e._container;if(!function(e){return e&&"object"==typeof e&&"controlNodes"in e}(t))return[];else return i(t.controlNodes,e)},t.prepareControlNodes=function(e,t){var n;if((null==e?void 0:e._beforeMount)&&!e._container)return;const s=(null==e?void 0:e._container)||e;if(!s)return;s.controlNodes=s.controlNodes||[];const a={control:t,parent:null,element:s,environment:t._getEnvironment(),id:t._instId,events:t.props._$events},d=t._moduleName;if(Object.defineProperty(a,"environment",{get(){return r.Logger.warn(`ÐопÑÑка иÑполÑзоваÑÑ Environment в React окÑÑжении,\n необÑ
одимо ÑбÑаÑÑ Ð·Ð°Ð²Ð¸ÑимоÑÑÑ. ÐÐ¾Ð¼Ð¿Ð¾Ð½ÐµÐ½Ñ - ${d}`),this.control._getEnvironment()}}),function(e,t){const r=e.findIndex((e=>e.control===t.control));if(r>-1)e[r]=t}(s.controlNodes,a),t._container!==s){if(i(null===(n=t._container)||void 0===n?void 0:n.controlNodes,t),o(s.controlNodes,a),t._container){const e=t._container.wsControl;delete t._container.wsControl,s.wsControl=e;const r=t._container.getAttribute("data-component");if(r)s.setAttribute("data-component",r)}t._container=s}},t}(0,{},M),ee=function(e,t){"use strict";function r(e){return e&&"object"==typeof e&&"_$controls"in e}function n(e){return parseInt((e+"").replace("inst_",""),10)}function o(e,t){if(!(-1!==e.indexOf(t)))!function(e,t){const r=n(t.id);let o=e.length;for(let t=0;t<e.length;++t)if(n(e[t].id)<r){o=t;break}e.splice(o,0,t)}(e,t)}function i(e,t){return e.find((e=>e.control===t))}function s(e,t){if(!e)return;const r=i(e,t);if(r)e.splice(e.indexOf(r),1)}return Object.defineProperty(t,"__esModule",{value:!0}),t.prepareControls=t.removeControlObjFromContainer=void 0,t.removeControlObjFromContainer=function(e){const t=e._container;if(r(t))s(t._$controls,e)},t.prepareControls=function(e,t,n){const a=(null==e?void 0:e._container)||e;if(!a)return;if(r(n)&&n!==a)s(n._$controls,t);if(a._$controls=a._$controls||[],!i(a._$controls,t)){const e={control:t,id:t._instId};o(a._$controls,e)}},t}(0,{}),te=function(e,t,r,n,o,i){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.UpdatePreventer=void 0,t.UpdatePreventer=function(e){class t extends n.Component{shouldComponentUpdate(e){const t=(0,o.delimitProps)(e),r=(0,o.delimitProps)(this.props),n=(0,i.getChangedOptions)(t.clearProps,r.clearProps,this.oldVersions,void 0,!1,!1,!0),s=(0,i.getChangedOptions)(t.userAttrs,r.userAttrs,void 0,void 0,!1,!1,!0);return!!n||!!s}render(){this.oldVersions=(0,i.collectObjectVersions)(this.props);const{forwardedRef:t,...n}=this.props;return(0,r.jsx)(e,{ref:t,...n})}}return n.forwardRef(((e,n)=>(0,r.jsx)(t,{...e,forwardedRef:n})))},t}(0,{},e,n,d,p),re=te,ne=function(e){"use strict";return e.g({v:1,m:"wml!UICore/_base/Control/Control",t:[e.r(((e,t)=>[e.g(t,"invisible-node",{K:"0_",A:{"data-warning":"ÐÐÐÐÐÐÐÐ! ÑÑо Ñаблон базового конÑÑола. возможно Ð²Ñ Ð·Ð°Ð±Ñли ÑÑÑановиÑÑ Ð¿Ð¾Ð»Ðµ _template в Ñвоем конÑÑоле."},r:!0,c:!0})]))]})}(R),oe=function(e){"use strict";var t=["data","application","Router","_options"];return e.g({v:1,m:"wml!UICore/_base/RouteCompatible",t:[e.r(((e,t)=>[e.P(t,e.m(t,0),{K:"0_",O:e.S(t,{Router:e.m(t,2)},e.m(t,1)),m:"attribute",c:!0,i:0})]))],p:t.slice(0,1),e:[(e,r)=>e.g(r,[t[0],t[1]]),(e,r)=>e.g(r,[t[0]]),(e,r)=>e.g(r,[t[3],t[2]])],i:[[[1]]]})}(R),ie=function(e,t,r){"use strict";
110Object.defineProperty(t,"__esModule",{value:!0});const n="function"==typeof globalThis.getPromiseState;return t.default=class{constructor(){this._beforeMountPromises=[],this._childrenPromises=[],this.registerAsyncChild=this.registerAsyncChild.bind(this)}initStateReceiver(e,t){this._receivedState=new r.default(e,t)}getReceivedState(e=!1){if(this._receivedState)return this._receivedState.ejectReceivedState(e)}processBeforeMount(e,t){let r=!1;if(this._receivedState)this._receivedState.saveReceivedState(e);if(e&&e.then)if("pending"===function(e){if(e.state_)if("sealed"===e.state_)return"pending";else return e.state_;if(n)return globalThis.getPromiseState(e);else return"pending"}(e))this._beforeMountPromises.push(e.then(t)),r=!0;if(!r)t(null);return r}registerAsyncChild(e){var t;null===(t=this._childrenPromises)||void 0===t||t.push(e)}clearAsyncChild(e){if(!e)this._childrenPromises=[];else delete this._childrenPromises}hasAsync(){return!!this._beforeMountPromises.concat(this._childrenPromises||[]).length}waitMyOwnAsyncMount(){return this._waitAsyncMount(this._beforeMountPromises.concat(this._childrenPromises||[])).then((()=>{this._beforeMountPromises=[],this.clearAsyncChild()}))}waitMyChildrenAsyncMount(){return this._waitAsyncMount(this._childrenPromises||[]).then((()=>{this.clearAsyncChild()}))}_waitAsyncMount(e){if(!e.length)return Promise.resolve();else return new Promise((t=>Promise.all(e).finally((()=>{t()}))))}triggerAfterMount(e){var t;null===(t=e.onAfterMount)||void 0===t||t.call(e)}triggerAfterUpdate(e){var t;null===(t=e.onAfterUpdate)||void 0===t||t.call(e)}},t}(0,{},A),se=function(e,t,r,n,o){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.useEffect)((()=>{var e;null===(e=(0,n.getStateReceiver)())||void 0===e||e.commitHydrationDeferredCleanup()}),[]),(0,r.createElement)(o.default,null,e.children)},t}(0,{},n,O,$),ae=function(e,t,r,n,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenderErrorDecorator=void 0;return t.RenderErrorDecorator=class{constructor(e){this._control=e}_defineConfig(e,t){const{errorViewer:n=r.ErrorViewer}=e;let o=t.errorConfig;if(!o)o=n.process(t.error);if("then"in o)o.then((e=>this._control.setState({errorConfig:e}))),o=r.ErrorViewer.process(t.error);return o}renderError(e,t,s,a){var d,l;if(o.Logger.error(null===(d=t.error)||void 0===d?void 0:d.message,void 0,t.error,"REACT RENDER ERROR"),"undefined"==typeof window)return null;if(void 0!==window.wsErrorMonitor&&!window.wsErrorMonitor.reason&&!i.detection.isIE){const e=new ErrorEvent("REACT RENDER ERROR",{error:t.error,message:null===(l=t.error)||void 0===l?void 0:l.message});window.wsErrorMonitor.onError(e)}const{errorContainer:c=r.ErrorViewer}=e,u=this._defineConfig(e,t);return n.createElement(c,{errorConfig:u,theme:s.theme,forwardedRef:a})}},t}(0,{},K,n,M,C),de=ae,le=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(){this.syncHooks=new n.WasabyHooksQueue,this.asyncHooks=new n.WasabyHooksQueue,this.aliveTreeMap=new WeakMap}registerControl(e,t,n){const o=t&&this.aliveTreeMap.get(t),i=new r.ControlTreeEdge(e,o,(()=>{if(n)n();this.aliveTreeMap.delete(e),this.syncHooks.dequeue(e),this.asyncHooks.dequeue(e)}));this.aliveTreeMap.set(e,i)}registerErrorRenderControl(e){var t;null===(t=this.aliveTreeMap.get(e))||void 0===t||t.destroyTree(!0)}unregisterControl(e){const t=this.aliveTreeMap.get(e);if(t)return t.destroyTree(),!0;else return this.aliveTreeMap.delete(e),this.syncHooks.dequeue(e),this.asyncHooks.dequeue(e),!1}addHook(e,t,r){if(r)this[`${t}Hooks`].enqueue(e,r)}runHooks(e){this[`${e}Hooks`].release()}},t}(0,{},H,z),ce=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CreateControlNodeRef=void 0;class o extends r.Responsibility{constructor(e){super(),this.type=r.CONTROL_NODE_HANDLER_TYPE,this._control=e}getHandler(){return e=>{(0,n.prepareControlNodes)(e,this._control)}}isEqual(e){return this._control===e._control}}return t.CreateControlNodeRef=o,t}(0,{},s,Z),ue=function(e,t,r,n){"use strict";
110Object.defineProperty(t,"__esModule",{value:!0}),t.CreateControlRef=void 0;class o extends r.Responsibility{constructor(e){super(),this._control=e,this.type=r.CONTROL_HANDLER_TYPE}getHandler(){return e=>{if((0,n.prepareControls)(e,this._control,this.lastHTMLElement),e&&!("_container"in e))this.lastHTMLElement="INVISIBLE-NODE"===e.tagName?e.parentNode:e}}clearHandler(){}isEqual(e){return this._control===e._control}}return t.CreateControlRef=o,t}(0,{},s,ee),he=function(e,t,r,n){"use strict";let o,i;return Object.defineProperty(t,"__esModule",{value:!0}),t.initResizeObserver=void 0,t.initResizeObserver=function(){if(!("undefined"==typeof ResizeObserver||i&&ResizeObserver instanceof i))o=ResizeObserver,i=function(e){return new o.prototype.constructor(((t,o)=>{const i=t[0].target.querySelector(`[name="${r.ASYNC_LOADING_TEST_INDICATOR}"]`);if(!i)return e(t,o);const s=(0,n.getClosestControl)(i);if(!s)return e(t,o);s._$observerCallback=()=>{e(t,o),delete s._$observerCallback}}))},i.prototype=o.prototype,ResizeObserver=i},t}(0,{},k,a),fe=function(e,t,r,n,o,i,s,a,d,l,c,u,h,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class p{constructor(e,t){var o,i,s;if(this._$beforeMountAsyncInProgress=!1,this._$blockOptionNames=[],this.inst=e,this._physicParent=null!==(o=e.props._physicParent)&&void 0!==o?o:null==t?void 0:t._physicParent,this._renderErrorDecorator=new l.RenderErrorDecorator(this.inst),this._beforeMountDecorator=new n.default,this.inst._logicParent=null!==(i=e.props._logicParent)&&void 0!==i?i:null==t?void 0:t._logicParent,this._$defaultOptions=d.OptionsResolver.getDefaultOptions(this.inst.constructor,!0),this.rskey=`${(null===(s=this.inst.props._$attributes)||void 0===s?void 0:s.key)||this.inst.props.rskey}`,this.rskey.endsWith(a.DEFAULT_REACT_RSKEY_ENDING)){const e=(0,r.getStore)("rskeyStore",(()=>new Map([["index",1]])));let t=e.get("index");this.rskey+=t+++"_",e.set("index",t)}this._registerAsyncChild=this._beforeMountDecorator.registerAsyncChild,this.inst._children={}}logNotRealizedError(e){if(!(0,c.isUnitTestMode)()){const t=new Error("РконÑÑоле "+this.inst._moduleName+" не Ñеализован меÑод "+e+". Ðибо на ÑеÑвеÑе пÑÑаÑÑÑÑ Ð·Ð°Ð¿ÑÑÑиÑÑ Ð¼ÐµÑод, коÑоÑÑй должен иÑполÑзоваÑÑÑÑ ÑолÑко на клиенÑе, либо наобоÑоÑ. ÐÑовеÑÑÑе, заÑем ÑÑÐ¾Ñ Ð¼ÐµÑод иÑполÑзÑеÑÑÑ Ð² данном окÑÑжении. ");c.Logger.error("",this.inst,t)}}_notify(e,t,r,n){this.logNotRealizedError("_notify")}activate(e={}){return this.logNotRealizedError("activate"),!1}_blur(){this.logNotRealizedError("_blur")}planUpdate(e="_forceUpdate()"){this.logNotRealizedError("_forceUpdate")}componentDidMount(e){this.logNotRealizedError("componentDidMount")}shouldComponentUpdate(e,t,r){return this.logNotRealizedError("shouldComponentUpdate"),!1}componentDidUpdate(e){this.logNotRealizedError("componentDidUpdate")}destroy(){this.logNotRealizedError("destroy")}componentWillUnmount(){this.logNotRealizedError("componentWillUnmount")}_getForwardRefResult(e){return null}beforeRender(e,t){}callBeforeRenderHook(){}extractEvents(e){}calculateAttributes(){}startReactivity(){}initThemeController(e){if(!this._themeController)this._themeController=new f.default(e)}updateTheme(e,t){this._themeController.updateTheme(e,t)}secureOptionsForStateReceiver(e){return this.logNotRealizedError("secureOptionsForStateReceiver"),{}}pauseReactive(e){e()}static _setControlToGuess(e,t){if(p._guessControlsCache[e]=p._guessControlsCache[e]||h.isLoaded(t)&&h.loadSync(t),p._guessControlsCache[e]&&!p._guessControlsCache[e]._$controlToGuessReceivedState)p._guessControlsCache[e]._$controlToGuessReceivedState=t}_whiteListForGuessedReceivedState(){var e,t,r,n;p._controlsToGuess.forEach((e=>p._setControlToGuess(e,p._modulesToGuess[e])));const o=this.inst.constructor._$controlToGuessReceivedState,i=null===(t=null===(e=this.inst)||void 0===e?void 0:e._logicParent)||void 0===t?void 0:t.constructor._$controlToGuessReceivedState;return o===p._modulesToGuess.BaseControl||o===p._modulesToGuess.ItemsView||o===p._modulesToGuess.View||i===p._modulesToGuess.ExporerView&&"explorer"===(null===(n=null===(r=this.inst)||void 0===r?void 0:r.props)||void 0===n?void 0:n.name)}_beforeFirstRender(e){var t;if((null===(t=e._logicParent)||void 0===t?void 0:t._children)&&e.name)e._logicParent._children[e.name]=this.inst;let r;this._beforeFirstRender=void 0,this.initThemeController({themeName:this.inst.props.theme,notLoadThemes:this.inst.props.notLoadThemes}),this._beforeMountDecorator.initStateReceiver(this.inst._moduleName,this.rskey);try{const t=this._beforeMountDecorator.getReceivedState(this._whiteListForGuessedReceivedState());if(null==t?void 0:t._$guessed)delete t._$guessed;r=this.inst._beforeMount(this.secureOptionsForStateReceiver(e),void 0,t)}catch(e){c.Logger.error(e.message,this.inst,e)}this._$beforeMountAsyncInProgress=this._beforeMountDecorator.processBeforeMount(r,(e=>(this.startReactivity(),e))),this.inst.state.loading=!!this._$beforeMountAsyncInProgress}render(e=!1,t,r){var n;let a=this.createWasabyOptions(this.inst.props);this.beforeRender(a,t),this.updateTheme(a.theme,!0);const d=null!==(n=this._themeController.getStaticThemeName())&&void 0!==n?n:a.theme;if(d!==a.theme)a={...a,theme:d};
110if(!a._$attributes){if(Object.isFrozen(a))a={...a};a._$attributes={attributes:{}}}if(a._$createdFromCode&&this.inst._decOptions)a._$attributes.attributes={...a._$attributes.attributes,...this.inst._decOptions};if(this.extractEvents(a),this.inst._options=a,this._$beforeMountAsyncInProgress&&this.inst.state.loading){if("undefined"!=typeof process&&!process.versions)c.Logger.warn(`ÐÑи ÑбоÑке ÑеакÑа найден аÑинÑ
ÑоннÑй конÑÑол ${this.inst._moduleName}. ÐеÑÑÑка на ÑеÑвеÑе не бÑÐ´ÐµÑ Ð¿Ð¾ÑÑÑоена`,this.inst);return(0,u.getLoadingComponent)(this._getForwardRefResult(this.inst.props.forwardedRef))}if(this.inst.state.hasError)return this._renderErrorDecorator.renderError(this.inst.props,this.inst.state,this.inst.context,this._getForwardRefResult());let l;try{this.callBeforeRenderHook();const t=this.calculateAttributes();t.key=this.rskey,t._isRootElement=!1,t.isControlTemplate=!0;const n=(0,o.getGeneratorConfig)();if(this.inst._options._$createdFromCode)if(null==n?void 0:n.prepareAttrsForRoot)n.prepareAttrsForRoot(t,this.inst._options);if(this.pauseReactive((()=>{l=this.inst._template(this.inst,t,void 0,!e,void 0,void 0,n)})),e&&"string"==typeof l)return l;for(;l instanceof Array;){if(!e&&!l.length){const e=`\nÐÑи поÑÑÑоении Ñаблона конÑÑола ${this.inst._moduleName} возникла оÑибка\nÐозможнÑе пÑиÑинÑ:\n- Ñаблон конÑÑола не ÑодеÑÐ¶Ð¸Ñ Ð²ÐµÑÑÑки, ÑледÑÐµÑ Ð¿ÑовеÑиÑÑ Ð¿ÑавилÑно ли напиÑан Ñаблон конÑÑола, Ñаблон должен ÑодеÑжаÑÑ Ð²ÐµÑÑÑÐºÑ Ð¸Ð»Ð¸ Ñ
оÑÑ Ð±Ñ <invisible-node/>\n- оÑибка в пÑоÑеÑÑе поÑÑÑоение конÑенÑнÑÑ
опÑий, ÑледÑÐµÑ Ð¿ÑовиÑÑ Ð»Ð¾Ð³Ð¸ на налиÑии дÑÑгиÑ
оÑибок пÑи поÑÑÑоении доÑеÑниÑ
конÑÑолов`;c.Logger.error(e,this.inst)}if(l.length>1){const e="\nÐ Ñаблоне Ñказанного конÑÑола должен бÑÑÑ Ð¢ÐÐЬÐРодин коÑневой ÑлеменÑ.\nШаблон пÑоÑÑÐ¾Ð¸Ñ ÑолÑко ÐÐÐ ÐЫРкоÑневой ÑлеменÑ.\nÐеобÑ
одимо оÑкÑÑÑÑ Ð´Ð°Ð½Ð½Ñй Ñаблон и пÑовеÑиÑÑ, поÑÐµÐ¼Ñ Ð² Ñаблоне неÑколÑко коÑней.\nÐозможно в коÑне Ñаблоне иÑполÑзÑеÑÑÑ ws:for, в Ñаком ÑлÑÑае его необÑ
одимо обеÑнÑÑÑ Ð² <div></div>";c.Logger.error(e,this.inst)}l=l[0]}return(0,i.createElement)(s.WasabyContextManager,{readOnly:a.readOnly,theme:a.theme,_physicParent:this.inst,_logicParent:this.inst._logicParent,_parentKey:this.rskey,pageData:a.pageData,Router:a.Router,isAdaptive:a.isAdaptive,workByKeyboard:a.workByKeyboard,moduleName:this.inst._moduleName,onErrorBoundary:r},l)}catch(e){return this._renderErrorDecorator.renderError(this.inst.props,{...this.inst.state,error:e},this.inst.context,this._getForwardRefResult())}}mountToDom(e,t){this.logNotRealizedError("mountToDom")}saveOptions(e,t=null){if(this.inst._options=e,t)this.inst._container=t.element;return!0}createWasabyOptions(e){return(0,d.fromReactProps)(e,this._$defaultOptions,this.inst)}static logNotRealizedError(e){if(!(0,c.isUnitTestMode)()){const t=new Error("Ðе Ñеализован ÑÑаÑиÑеÑкий меÑод "+e+" базового конÑÑола. Ðибо на ÑеÑвеÑе пÑÑаÑÑÑÑ Ð·Ð°Ð¿ÑÑÑиÑÑ Ð¼ÐµÑод, коÑоÑÑй должен иÑполÑзоваÑÑÑÑ ÑолÑко на клиенÑе, либо наобоÑоÑ. ÐÑовеÑÑÑе, заÑем ÑÑÐ¾Ñ Ð¼ÐµÑод иÑполÑзÑеÑÑÑ Ð² данном окÑÑжении. ");c.Logger.error("",null,t)}}static createControl(e,t,r,n){p.logNotRealizedError("createControl")}static destroyControl(e,t){p.logNotRealizedError("destroyControl")}static configureCompatibility(e,t,r){return p.logNotRealizedError("configureCompatibility"),!1}static mixCompatible(e,t){p.logNotRealizedError("mixCompatible")}static getDerivedStateFromError(e){return{hasError:!0,error:e}}}return p._guessControlsCache=[],p._modulesToGuess={BaseControl:"Controls/baseList:BaseControl",ItemsView:"Controls/baseList:ItemsView",View:"Controls/baseList:View",ExporerView:"Controls/explorer
110:View"},p._controlsToGuess=Object.keys(p._modulesToGuess),t.default=p,t}(0,{},O,ie,S,n,h,d,g,ae,M,k,o,L),pe=function(e,t,r,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(){this.hooksCaller=new n.default,this.renderStack=new o.default((()=>this.afterUpdateCallback())),this.beforeRenderProcess=this.beforeRenderProcess.bind(this),this.afterRenderProcess=this.afterRenderProcess.bind(this)}planUpdate(e,t){var r;this.createRenderProcess(),null===(r=this.renderProcess)||void 0===r||r.enqueue(e,this.getDepth(e),t)}registerFirstMountControl(e,t,r){this.hooksCaller.registerControl(e,t,(()=>{if(r)r();this.removeControlFromUpdate(e)}))}registerUnmountControl(e){if(!this.hooksCaller.unregisterControl(e))this.removeControlFromUpdate(e)}registerBeginRenderControl(e){if(!e._destroyed&&!e._unmounted)this.renderStack.add(e),this.createRenderProcess()}registerEndRenderControl(e,t,r){var n;this.hooksCaller.addHook(e,"sync",t),this.hooksCaller.addHook(e,"async",r),null===(n=this.runningRenderProcess)||void 0===n||n.dequeue(e),this.renderStack.delete(e)}registerErrorControl(e){this.hooksCaller.registerErrorRenderControl(e)}afterUpdateCallback(){this.hooksCaller.runHooks("sync"),setTimeout((()=>{if(!this.renderStack.size)this.hooksCaller.runHooks("async"),this.startUpdate()}),0)}beforeRenderProcess(){this.runningRenderProcess=this.renderProcess,this.renderProcess=void 0,this.renderStack.add(this.runningRenderProcess)}afterRenderProcess(){this.renderStack.delete(this.runningRenderProcess),this.runningRenderProcess=void 0}createRenderProcess(){if(!this.renderProcess)if(this.renderProcess=new r.default(this.beforeRenderProcess,this.afterRenderProcess),!this.renderStack.size)this.startUpdate()}startUpdate(){if(this.renderProcess)this.renderProcess.executeDelayed()}removeControlFromUpdate(e){var t,r;null===(t=this.renderProcess)||void 0===t||t.dequeue(e),null===(r=this.runningRenderProcess)||void 0===r||r.dequeue(e),this.renderStack.delete(e)}getDepth(e){var t,r;let n=0,o=e;for(;null===(t=null==o?void 0:o.props)||void 0===t?void 0:t._physicParent;)o=null===(r=null==o?void 0:o.props)||void 0===r?void 0:r._physicParent,n++;return n}},t}(0,{},W,le,V),_e=function(e,t,r,n,o,i,s,a,d,l,c,u,h,f,p,_,m,g,v,y,C,b,R,E,O,w,U,S,M,N,P,D,$,k,T,I){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const x=new a.Set,A=new WeakMap;let F;const j=()=>{};class L extends w.default{constructor(e,t){var r;super(e,t),this._wasLogicDestroyCalled=!1,this._shouldComponentUpdateDecorator=new P.default,this.versionStateDecorator=new D.VersionStateDecorator,this.inst._$afterMountDecorator=new O.default,this.inst.childrenRefsCreator=new U.default(this.inst),this.inst._children=(0,d.getProxyChildren)(this.inst._moduleName),this.inst._$wasabyUpdater=(null===(r=this._physicParent)||void 0===r?void 0:r._$wasabyUpdater)||new $.default,this.onErrorBoundary=this.inst._$wasabyUpdater.renderStack.clearOnError.bind(this.inst._$wasabyUpdater.renderStack),this.callForceUpdate=e=>{this.planUpdate(e)},this._beforeUpdateRun=new N.Runner(this._callBeforeUpdate.bind(this))}errorIfNoContainer(){var e,t,r;if(!this.inst._container&&!this.inst._destroyed){this.errorIfNoContainer=j;const n={...null===(e=this.inst._options._$attributes)||void 0===e?void 0:e.attributes};delete n["ws-delegates-tabfocus"],delete n["ws-creates-context"],u.Logger.error(`РконÑÑоле ${null!==(t=this.inst._moduleName)&&void 0!==t?t:""} оÑÑÑÑÑÑвÑÐµÑ _container.\n ÐоÑÑдковÑй Ð½Ð¾Ð¼ÐµÑ ÐºÐ¾Ð½ÑÑола inst._instId = ${this.inst._instId}\n ÐлÑÑ ÐºÐ¾Ð½ÑÑола inst._options.rskey = ${this.inst._options.rskey}\n ÐлÑÑ Ð¿Ñедка logicParent._options.rskey = ${null===(r=this.inst._options._logicParent)||void 0===r?void 0:r._options.rskey}\n inst._options.className = ${this.inst._options.className||""}\n inst._options._$attributes?.attributes = ${JSON.stringify(n)}\n ÐеÑоÑÑнÑе пÑиÑинÑ:\n - в коÑне Ñаблона конÑÑола наÑ
одиÑÑÑ React.Component, коÑоÑÑй не пÑоÑÑавлÑÐµÑ ref на Ñвой коÑневой DOMElement\n - в Ñаблоне конÑенÑной опÑии болÑÑе одного коÑневого ÑлеменÑа (напÑимеÑ, вÑÑÐ°Ð²Ð»ÐµÐ½Ñ ÐºÐ¾Ð½ÑÑÐ¾Ð»Ñ ÑеÑез ws:for), ÑледÑÐµÑ ÑоздаваÑÑ ÑолÑко один коÑневой ÑлеменÑ\n - Ñаблон ÑÑÑÐ¾Ð¸Ñ Ð¿ÑÑÑоÑÑ\n ÐодÑобнее в базе знаний: https://online.sbis.ru/page/knowledge-bases?baseId=babadcfb-cc27-4589-9b97-9200c2e399ee&article=ae49631c-1a0e-4908-90a2-cea13b7a78e1#toc_af5a6612-2c3c-4080-8bb6-91049514f4ed\n`)}}secureOptionsForStateReceiver(e){return e}planUpdate(e="_forceUpdate()"){this.versionStateDecorator.addChangedFieldName(e),this.inst._$w
110asabyUpdater.planUpdate(this.inst,(()=>{if(!this.inst._destroyed)this.inst.setState(this.versionStateDecorator.setStateUpdater)}))}pauseReactive(e){(0,m.pauseReactive)(this.callForceUpdate,e)}_beforeFirstRender(e){if(this.inst._$wasabyUpdater.registerFirstMountControl(this.inst,e._physicParent,(()=>{if(!this.inst._destroyed){const e=this.inst._container;if(S.unmountJQueryPatcher.registerStartUnmount(e),this.inst.destroy(),!this._wasLogicDestroyCalled)u.Logger.error("Ðе бÑл вÑзван базовÑй destroy конÑÑола. УбедиÑеÑÑ, ÑÑо Ð²Ñ Ð½Ðµ пеÑеопÑеделÑеÑе destroy вмеÑÑо иÑполÑÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ _beforeUnmount. https://link.sbis.ru/article/wasaby/542635ee-3064-41da-9433-feb575b68d0c#toc_9d5e8e2a-45e0-4d60-a27d-1117ecc21809",this.inst);S.unmountJQueryPatcher.registerEndUnmount(e)}})),this._optionsVersions=(0,T.collectObjectVersions)(e),this._internalOptionsVersions=(0,T.collectInternalsVersions)(e._$internal),(0,u.needToBeCompatible)(this.inst.constructor,e.parent||e._physicParent,e._$iWantBeWS3))L.mixCompatible(this.inst,e);super._beforeFirstRender.apply(this,arguments),this._beforeMountOptions=e,(0,m.makeWasabyObservable)(this.inst,this.callForceUpdate)}beforeRender(e,t){if(l.OptionsResolver.validateOptions(this.inst.constructor,e),this._beforeFirstRender)this._beforeFirstRender(e);else this.inst._oldOptions=this.inst._options,this._beforeUpdateRun.exec(e,!0),this._beforeUpdateRun.reset();t()}callBeforeRenderHook(){if(this.inst._mounted){this.inst._$wasabyUpdater.registerBeginRenderControl(this.inst);try{this.inst._beforeRender()}catch(e){u.Logger.error(e.message,this.inst,e)}}}extractEvents(e){this.extractReactEvent(e)}calculateAttributes(){var e;const t=new _.ChainOfRef;if(null===(e=this.inst._options._$attributes)||void 0===e?void 0:e.refForContainer)t.add(new _.CreateOriginRef(this.inst._options._$attributes.refForContainer));t.add(new _.CreateOriginRef(this._getForwardRefResult()));const r=t.execute();return{...this.inst._options._$attributes||{},refForContainer:r}}render(e=!1,t){this.inst.childrenRefsCreator.clear(),this.versionStateDecorator.clearChangedFieldNames();const r=(0,p.logExecutionTimeBegin)(),n=super.render.apply(this,[...arguments,this.onErrorBoundary]);return(0,p.logExecutionTimeEnd)(this.inst,r),n}_notify(e,t,r,n){return(0,h.callNotify)(e,t,r,n)}activate(e={}){return(0,c.activate)(this.inst._container,e)}_blur(){const e=this.inst._container,t=document.activeElement;if(!e||!e.contains(t))return;let r;if(-1===document.body.tabIndex)r=document.body.tabIndex,document.body.tabIndex=1;if(document.body.focus(),void 0!==r)document.body.tabIndex=r}__$shouldUpdate(e){return this.inst._shouldUpdate(e)}componentDidMount(e){var t;this.inst._$wasabyUpdater.registerBeginRenderControl(this.inst);const r=this.createWasabyOptions(this.inst.props);try{this.inst._$react_componentDidMount(r)}catch(e){u.Logger.error(e.message,this.inst,e)}if(k.ScrollOnBodyStore.read("enabled"))(0,k.applyBodyScroll)(this.inst);const n=()=>
110{if(!this.inst._destroyed){try{this.inst._afterMount(r)}catch(e){u.Logger.error(e.message,this.inst,e)}this._beforeMountDecorator.triggerAfterMount(r),this.inst._mounted=!0,this.inst._$afterMountDecorator.executeDelayedEvent(),this._shouldComponentUpdateDecorator.reset(this.inst._mounted).fireForceUpdate((()=>{this._delayedUpdateDuringMount=!0,this.planUpdate("_delayedUpdateDuringMount")})),e()}},o=()=>{if(!this.inst._destroyed){this.errorIfNoContainer(),this.inst._options=r;try{if(this.inst._componentDidMount(r),this.inst._$observerCallback)this.inst._$observerCallback()}catch(e){u.Logger.error(e.message,this.inst,e)}this._beforeMountDecorator.clearAsyncChild(!0)}},i=()=>{if(this.inst._$wasabyUpdater.registerEndRenderControl(this.inst,o,n),this.inst.state.hasError)this.inst._$wasabyUpdater.registerErrorControl(this.inst)};if(!this._beforeMountDecorator.hasAsync())return void i();const s=this._beforeMountDecorator.waitMyOwnAsyncMount().then((()=>{if(!this.inst._destroyed)return new Promise((e=>{this.inst.setState({loading:!1},(()=>{if(this._beforeMountDecorator.hasAsync())return this._beforeMountDecorator.waitMyChildrenAsyncMount().then(i).then(e);i(),e()}))}))}));null===(t=r._registerAsyncChild)||void 0===t||t.call(r,s)}shouldComponentUpdate(e,t,r){const{newOptions:n}=this._prepareDataBeforeUpdate(t,r);if(t._$compound){const e=new Error("ÐапÑÑÑилоÑÑ Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ðµ ws3-конÑÑола в окÑÑжении wasaby. ÐÐ»Ñ Ð²ÑÑавки ws3-конÑÑола в wasaby нÑжно иÑполÑзоваÑÑ CompoundContainer.");u.Logger.error(e.message,void 0,e)}const o={hasChangesState:()=>this.versionStateDecorator.hasChangesState(r,this.inst.state)||r.loading!==this.inst.state.loading,hasChangesAttrs:()=>{var e,r;const n=(null===(e=t._$attributes)||void 0===e?void 0:e.attributes)||{},o=(null===(r=this.inst._options._$attributes)||void 0===r?void 0:r.attributes)||{};return!!(0,T.getChangedOptions)(n,o,void 0,void 0,!1,!1,!0)},hasChangesOptions:()=>{const e=this._optionsForBeforeUpdateBeforeMount||this.inst.props;return!!(0,T.getChangedOptions)(t,e,this._optionsVersions,t._$blockOptionNames,t._$compound,t._$compound,!0)},hasChangesInternalOptions:()=>!!(0,T.getChangedInternals)(t._$internal,this.inst._options._$internal,this._internalOptionsVersions,!1,!1,!0)};this._beforeUpdateRun.reset();const i=this._shouldComponentUpdateDecorator.reset(this.inst._mounted).addReason(o).exec();if(i.canContinueExecute){let t=!1;try{if(this.inst._shouldUpdate===e||this.inst._mounted)t=!!this.__$shouldUpdate(n)}catch(e){return u.Logger.error(e.message,this.inst,e),!0}return t}return i.needUpdate}componentDidUpdate(e){if(!this.inst._mounted)return;const t=this.inst._oldOptions;this.inst._oldOptions=void 0,this.inst._options=this.createWasabyOptions(this.inst.props),this._optionsVersions=(0,T.collectObjectVersions)(this.inst._options),this._internalOptionsVersions=(0,T.collectInternalsVersions)(this.inst._options._$internal);try{this.inst._$react_componentDidUpdate(t)}catch(e){u.Logger.error(e.message,this.inst,e)}if(this.inst._$wasabyUpdater.registerEndRenderControl(this.inst,(()=>{if(!this.inst._destroyed){try{if(this.errorIfNoContainer(),this.inst._componentDidUpdate(t),this.inst._afterRender(t),this.inst._$observerCallback)this.inst._$observerCallback()}catch(e){u.Logger.error(e.message,this.inst,e)}e()}}),(()=>{if(!this.inst._destroyed){this._beforeMountDecorator.triggerAfterUpdate(this.inst._options);try{this.inst._afterUpdate(t)}catch(e){u.Logger.error(e.message,this.inst,e)}}})),this.inst.state.hasError)this.inst._$wasabyUpdater.registerErrorControl(this.inst)}componentWillUnmount(){var e,t;try{this.inst._$react_componentWillUnmount()}catch(e){u.Logger.error(e.message,this.inst,e)}this.inst._$wasabyUpdater.registerUnmountControl(this.inst),this.inst._forceUpdate=j,this.inst.componentWillUnmount=j,null===(t=null===(e=this.inst)||void 0===e?void 0:e._container)||void 0===t||(t.__$scopeEvents=null);if(!this.inst.getParent&&!(0,M.isPurifyDisabled)())(0,M.default)(this.inst,this.inst._moduleName,!0)}destroy(){this.inst._destroyed=!0,this._wasLogicDestroyCalled=!0;try{(0,m.releaseProperties)(this.inst)}catch(e){u.Logger.error(e.message,this.inst,e)}
110try{if(this.inst._$needRemoveBeforeUnmount){for(const e of this.inst._$needRemoveBeforeUnmount)e();this.inst._$needRemoveBeforeUnmount=[]}if(this.inst._mounted)this.inst._beforeUnmount.apply(this.inst),this.inst.unmountCallback&&this.inst.unmountCallback();else if(this.inst._beforeUnmount!==function(){if(!F)F=requirejs("UI/Base").Control;return F}().prototype._beforeUnmount){if(!("undefined"!=typeof jest))u.Logger.warn(`Ñ ÐºÐ¾Ð½ÑÑола ${this.inst._moduleName} не бÑл вÑзван _beforeUnmount, поÑÐ¾Ð¼Ñ ÑÑо он ÑазÑÑÑилÑÑ Ð½Ðµ ÑÑпев поÑÑÑоиÑÑÑÑ.\n ÐÑо бÑваеÑ, когда вÑзÑваÑÑ Ð°ÑинÑ
Ñонно дÑÑг за дÑÑгом 2 поÑ
ожиÑ
поÑÑÑÐ¾ÐµÐ½Ð¸Ñ ÐºÐ¾Ð½ÑÑола,\n и на вÑоÑое поÑÑÑоение ÑдалÑеÑÑÑ ÑÑÑоÑÑийÑÑ ÐºÐ¾Ð½ÑÑол из пеÑвого поÑÑÑÐ¾ÐµÐ½Ð¸Ñ (напÑимеÑ, в Ñикле ws:for).\n ÐÑо Ð¼Ð¾Ð¶ÐµÑ Ð±ÑÑÑ Ð¿ÑиÑиной оÑибки. ÐапÑимеÑ, как ÑÑÑ https://online.sbis.ru/opendoc.html?guid=07e9d596-e08c-444e-8e18-b437db6a0fb5&client=3\n ЧÑÐ¾Ð±Ñ ÑÑо ниÑего не ломало, нелÑÐ·Ñ Ð² _beforeMount делаÑÑ Ð¿Ð¾Ð´Ð¿Ð¸Ñки и пÑоÑие опеÑаÑии, коÑоÑÑе поÑом оÑменÑÑÑÑÑ Ð² _beforeUnmount.\n ÐÑе подпиÑки Ð´Ð¾Ð»Ð¶Ð½Ñ Ð±ÑÑÑ Ð² _afterMount, поÑле оÑÑиÑовки конÑÑола. _beforeUnmount гаÑанÑиÑованно ÑÑÑелÑÐµÑ ÑолÑко еÑли до ÑÑого бÑл _afterMount.`,this.inst)}}catch(e){u.Logger.error(e.message,this.inst,e)}this.inst._forceUpdate=j,this.inst._beforeUnmount=j,this.inst._mounted=!1,this.inst._unmounted=!0,(0,R.extractControlNodeFromContainer)(this.inst),(0,E.removeControlObjFromContainer)(this.inst);const e=this.inst._options.name,t=this.inst._options._logicParent;if(t&&!t._destroyed&&t._template&&e)delete t._children[e]}mountToDom(e,t){if(!this.VDOMReady)this.VDOMReady=!0,this.inst._container=e,L.destroyControl(this.inst,e),e.wsControl=void 0,e.controlNodes=void 0,e._$controls=void 0,L.createControl(this.inst.constructor,t,this.inst._container);if(t)this.inst.saveOptions(t)}_getForwardRefResult(e){if(!this._forwardRefResult){const e=new _.ChainOfRef;e.add(new y.CreateControlNodeRef(this.inst)).add(new C.CreateControlRef(this.inst)),this._forwardRefResult=e.execute()}const t=new _.ChainOfRef;if(t.add(new _.CreateOriginRef(this._forwardRefResult)),e)t.add(new _.CreateOriginRef(e));return t.execute()}extractReactEvent(e){const t={};for(const r of h.reactEventList)if(e.hasOwnProperty(r)&&"function"==typeof e[r])t[r]=e[r];if(Object.keys(t).length)e._$attributes.reactEvent=t}_prepareDataBeforeUpdate(e,t){const r=this.createWasabyOptions(e);return this.updateTheme(r.theme),{newOptions:r}}_callBeforeUpdate(e,t){if(this.inst._mounted)try{this.pauseReactive((()=>{const r=this.inst._options;if(void 0!==this._optionsForBeforeUpdateBeforeMount)this.inst._options=this._optionsForBeforeUpdateBeforeMount,delete this._optionsForBeforeUpdateBeforeMount;if(!t)if(!this._delayedUpdateDuringMount)this.inst._options=e;this._delayedUpdateDuringMount=void 0,this.inst._beforeUpdate(e),this.inst._options=r}))}catch(e){u.Logger.error(e.message,this.inst,e)}else if(this._optionsForBeforeUpdateBeforeMount=this._beforeMountOptions,"Controls/grid:View"===this.inst._moduleName){this._beforeUpdateRun.reset();this._shouldComponentUpdateDecorator.reset(this.inst._mounted).addReason({hasChangesOptions:()=>!0,hasChangesState:()=>!0,hasChangesAttrs:()=>!0,hasChangesInternalOptions:()=>!0}).exec()}}static createControl(e,t,a,d){var l,c,p,m,y,C,R;if(a)a=a[0]||a;const E=L.configureCompatibility(a,t,e);let O;if(t._$createdFromCode=!0,t._$iWantBeWS3=E,t.theme=null!==(l=t.theme)&&void 0!==l?l:"default",t.readOnly=null!==(c=t.readOnly)&&void 0!==c?c:!1,h.WasabyEvents.initInstance(a),h.TouchEvents.initInstance(a),(0,b.initResizeObserver)(),(0,v.initIntersectionObserver)(),x.add(a),(0,f.startDOMFocusSystem)(a),(0,g.isForwardRef)(e)||(0,g.isComponentClass)(e))t.ref=_.ChainOfRef.both(t.ref,(e=>{O=e}));if(!i.detection.isIE)a.style.height="100%",a.style.width="100%",a.style.display="contents";const w=null!==(p=a.parentElement)&&void 0!==p?p:document.body,U=e=>d?r.createElement(I.default,null,e):e;let S;if(E){const n=r.createElement(k.AdaptiveInitializerInternal,{children:r.createElement(e,t)});S=r.createElement(k.AdaptiveInitializerConfig,{domElementWithSizes:w,children:U(n)})}else{const n=r.createElement(e,t);S=r.createElement(k.AdaptiveInitializerConfig,{domElementWithSizes:w,children:U(n)})}if(d){const t=3;let r;if(r=a.childNodes.length,r&&a.childNodes[0].nodeType===t&&!a.childNodes[0].textContent.trim())try{a.removeChild(a.childNodes[0])}catch(t){u.Logger.error(`Ðе ÑдалоÑÑ ÑдалиÑÑ Ð´Ð¾ÑеÑний ÑÐ»ÐµÐ¼ÐµÐ½Ñ Ñ ${a.nodeName} Ñ ${a.id?"id: "+a.id:"class: "+a.className}. \n ÐÑибка возникла в конÑÑоле ${e.prototype._moduleName}.\n ÐÑигиналÑÐ½Ð°Ñ Ð¾Ñибка: ${t.message}`,t)}if(r=a.childNodes.length,r&&a.childNodes[r-1].nodeType===t&&!a.childNodes[r-1].textContent.trim())try{a.removeChild(a.childNodes[r-1])}catch(t){u.Logger.error(`Ðе ÑдалоÑÑ ÑдалиÑÑ Ð´Ð¾ÑеÑний ÑÐ»ÐµÐ¼ÐµÐ½Ñ Ñ ${a.nodeName} Ñ ${a.id?"id: "+a.id:"class: "+a.className}. \n ÐÑибка возникла в конÑÑоле ${e.prototype._moduleName}.\n ÐÑигиналÑÐ½Ð°Ñ Ð¾Ñибка: ${t.message}`,t)}null===(m=null===performance||void 0===performance?void 0:performance.mark)||void 0===m||m.call(performance,"HYDRATE START"),null===(y=(0,s.getStateReceiver)())||void 0===y||y.beginHydrationDeferredCleanup();const n=o.hydrateRoot(a,S,{onRecoverableError(e,t){const r=String((null==e?void 0:e.message)||e||""),n=r.includes("Hydration failed because the server rendered HTML didn't match the client")||r.includes("Hydration failed")||r.includes("hydration-mismatch"),o=e.message?r:e;if(!n)u.Logger.error(o,t);
110else u.Logger.warn(o,t)}});return A.set(a,n),void(null===(C=null===performance||void 0===performance?void 0:performance.mark)||void 0===C||C.call(performance,"HYDRATE END"))}null===(R=null===performance||void 0===performance?void 0:performance.mark)||void 0===R||R.call(performance,"RENDER START");const M=o.createRoot(a);if(A.set(a,M),(0,n.flushSync)((()=>{M.render(S)})),null===queueMicrotask||void 0===queueMicrotask||queueMicrotask((()=>{var e;return null===(e=null===performance||void 0===performance?void 0:performance.mark)||void 0===e?void 0:e.call(performance,"RENDER END")})),O&&O.hasOwnProperty("UNSAFE_isReact"))return O}static destroyControl(e,t){const r=t.hasOwnProperty("length")?t[0]:t;if(x.has(r)){x.delete(r);try{if(r.parentNode&&r.firstChild){const n=A.get(r);if(n)n.unmount(),A.delete(r);else for(;r.firstChild;)try{r.removeChild(r.firstChild)}catch(r){u.Logger.error(`Ðе ÑдалоÑÑ ÑдалиÑÑ Ð´Ð¾ÑеÑний ÑÐ»ÐµÐ¼ÐµÐ½Ñ Ñ ${t.nodeName} Ñ ${t.id?"id: "+t.id:"class: "+t.className}. \n ÐÑибка возникла в конÑÑоле ${e._moduleName}.\n ÐÑигиналÑÐ½Ð°Ñ Ð¾Ñибка: ${r.message}`,r)}}}catch{u.Logger.error("Ðе Ñмогли демонÑиÑоваÑÑ ÐºÐ¾Ð½ÑÑол "+e._moduleName,e)}const n="undefined"!=typeof jest;(0,f.stopDOMFocusSystem)(r,{tabDown:!0,focusEvents:n,restoreFocus:n}),h.WasabyEvents.destroyInstance(r),h.TouchEvents.destroyInstance(r),e._$wasabyUpdater.registerUnmountControl(e)}}static configureCompatibility(e,t,r){if(!i.constants.compat)return!1;const n=t.parent||(0,f.goUpByControlTree)(e)[0];if((0,u.needToBeCompatible)(r,n)){if(t.element=e,n&&n._options===t)u.Logger.error("ÐÐ»Ñ ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ ÐºÐ¾Ð½ÑÑола "+r.prototype._moduleName+" в каÑеÑÑве конÑига бÑл пеÑедан обÑÐµÐºÑ Ñ Ð¾Ð¿ÑиÑми его ÑодиÑÐµÐ»Ñ "+n._moduleName+". Ðе нÑжно пеÑедаваÑÑ ÑÑжие опÑии Ð´Ð»Ñ ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ ÐºÐ¾Ð½ÑÑола, поÑÐ¾Ð¼Ñ ÑÑо они могÑÑ Ð¸Ð·Ð¼ÐµÐ½ÑÑÑÑÑ Ð² пÑоÑеÑÑе ÑозданиÑ!",this);else t.parent=t.parent||n;return!0}else return!(0,u.isNewEnvironment)()}static mixCompatible(e,t){if("undefined"!=typeof window)if(requirejs.defined("Core/helpers/Hcontrol/makeInstanceCompatible")){requirejs("Core/helpers/Hcontrol/makeInstanceCompatible")(e,t),S.unmountJQueryPatcher.patchJQuery(),e._options={}}else u.Logger.warn(`ÐопÑÑка подмеÑаÑÑ ÑовмеÑÑимоÑÑÑ ÐºÐ¾Ð½ÑÑолÑ, но makeInstanceCompatible не бÑл подгÑÑжен.\n ÐÐ¾Ð¼Ð¿Ð¾Ð½ÐµÐ½Ñ - ${e._moduleName}`)}}return t.default=L,t}(0,{},n,r,t,C,O,v,S,g,m,M,u,l,d,s,i,c,J,ce,ue,he,Z,ee,N,fe,P,D,I,F,j,B,pe,f,p,se),me=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class o extends n.default{beforeRender(e,t){if(this._beforeFirstRender)this._beforeFirstRender(e)}calculateAttributes(){return this.inst._options._$attributes||{}}render(e,t){const n=(0,r.logExecutionTimeBegin)(),o=super.render(e,t);return(0,r.logExecutionTimeEnd)(this.inst,n),o}secureOptionsForStateReceiver(e){return["_$events","ref","_physicParent","_logicParent","_registerAsyncChild","_$blockOptionNames","_$attributes"].reduce(((e,t)=>(delete e[t],e)),{...e})}}return t.default=o,t}(0,{},d,fe),ge=function(e,t,r,n,o,i,s,a,d,l,c,u,h){"use strict";function f(e){if((0,a.isUnitTestMode)()||!(0,d.isDebug)())return;const t=(0,l.checkReactApiRedefined)(e,m);if(t.length){const r=new Error("ÐонÑÑол "+e._moduleName+" пеÑеопÑеделил api ÑеакÑа "+t+". ÐеобÑ
одимо пеÑеименоваÑÑ ÑÑи меÑÑа, ÑÑÐ¾Ð±Ñ Ð½Ðµ наÑÑÑиÑÑ ÑабоÑÑ ÑеакÑа.");if("contextType"===t[0]){if(!function(e){let t=!1;return g.forEach((r=>{if(r.test(e))t=!0})),t}(e._moduleName))c.Logger.error("ÐÑоблема в "+e._moduleName+"! ÐÑли конÑÑол наÑледÑеÑÑÑ Ð¾Ñ UI/Base:Control, Ñ Ð½ÐµÐ³Ð¾ не должно бÑÑÑ Ð¿Ð¾Ð»Ñ static contextType, инаÑе он пеÑебÑÐµÑ Ð±Ð°Ð·Ð¾Ð²Ñй конÑекÑÑ, наÑÑÑоеннÑй в UI/Base:Control, и Ñаким обÑазом в конÑÑол не бÑдÑÑ Ð¿ÐµÑÐµÐ´Ð°Ð½Ñ Ð¿ÑÐ¾Ð¿Ñ Ð¸Ð· конÑекÑÑа(readOnly, theme, Router, refForContainer и Ñп).ÐÑо Ð¼Ð¾Ð¶ÐµÑ Ð¿Ð¾ÑлÑжиÑÑ Ð¿ÑиÑиной оÑибки ÑейÑÐ°Ñ Ð¸Ð»Ð¸ в бÑдÑÑем.")}else c.Logger.error(r.message,void 0,r)}}
110Object.defineProperty(t,"__esModule",{value:!0});let p=1;const _="undefined"==typeof window?i.default:o.default;class m extends r.Component{get _optionsVersions(){return this.logic._optionsVersions}constructor(e={},t){super(e),this._instId="inst_"+p++,this._container=null,this._options={},this._$needRemoveBeforeUnmount=[],this._$notifyEvents=new Map,this._$firedNotifyEvents=new WeakSet,this.UNSAFE_isReact=!0,this.initControl(e,t)}initControl(e={},t){this.logic=new _(this,t),this.state={loading:!0};const r=this.constructor;if(!r.displayName)r.displayName=this._moduleName}_notify(e,t,r){return this.logic._notify(this,e,t,r)}activate(e={}){return this.logic.activate(e)}_blur(){this.logic._blur()}deactivate(){this.logic._blur()}getInstanceId(){return this._instId}_getEnvironment(){}_forceUpdate(e="_forceUpdate()"){this.logic.planUpdate(e)}_beforeMount(e,t,r){}_afterMount(e){}_componentDidMount(e){}_shouldUpdate(e){return!0}_beforeRender(){}_beforeUpdate(e){}_afterUpdate(e){}_afterRender(e){}_componentDidUpdate(e){}_beforeUnmount(){}_$react_componentDidMount(e){}_$react_componentDidUpdate(e){}_$react_componentWillUnmount(){}componentDidMount(){this.logic.componentDidMount((()=>f(this)))}
110shouldComponentUpdate(e,t){return this.logic.shouldComponentUpdate(m.prototype._shouldUpdate,e,t)}componentDidUpdate(){this.logic.componentDidUpdate((()=>f(this)))}componentWillUnmount(){this.logic.componentWillUnmount()}render(e=!1){return this.logic.render(e,(()=>f(this)))}mountToDom(e,t){this.logic.mountToDom(e,t)}saveOptions(e,t=null){return this.logic.saveOptions(e,t)}destroy(){this.logic.destroy()}static loadCSS(){return Promise.resolve()}static mixCompatible(e,t){s.default.mixCompatible(e,t)}static createControl(e,t,r,n){return _.createControl(e,t,r,n)}static destroyControl(e,t){_.destroyControl(e,t)}static configureCompatibility(e,t,r){return _.configureCompatibility(e,t,r)}static extend(e,t){return u(this,e,t)}static es5Constructor(e={},t){r.Component.call(this,e,t),this._$needRemoveBeforeUnmount=[],this._options={},this._instId="inst_"+p++,this._container=null,this.UNSAFE_isReact=!0,this._$notifyEvents=new Map,this._$firedNotifyEvents=new WeakSet,m.prototype.initControl.call(this,e,t)}static getDerivedStateFromError(e){return s.default.getDerivedStateFromError(e)}}m.UNSAFE_isReact=!0,m.isWasaby=!0,m.contextType=(0,h.getWasabyContext)(),t.default=m,Object.assign(m.prototype,{_template:n}),m.prototype._notify._isVdomNotify=!0;const g=[/^EOCore\//,/^EOComplect\//,/^EOFSRAR\//,/^EOFSS2\//,/^EOAttachments\//,/^FED2UI\//,/^FED2Srv\//,/^Specs\//];return t}(0,{},n,ne,_e,me,fe,M,M,G,M,b,h),ve=ge,ye=function(e,t,r,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i extends n.default{constructor(){super(...arguments),this._template=o}_beforeMount(e,t,n){if("undefined"==typeof window)return this.data=function(e){const t={...e,jsBlock:null,cssBlock:null,jsLinks:null,cssLinks:null,modLinks:null};return delete t.Router,delete t.isAdaptive,delete t.adaptiveMode,Object.keys(t).reduce(((r,n)=>{if("function"!=typeof t[n])r[n]=e[n];return r}),{})}(e),(0,r.setConfig)("renderHTMLforOldRoutes",!0),this.data;this.data=n}}return i.defaultProps={notLoadThemes:!0},t.default=i,t}(0,{},O,ge,oe),Ce=ye,U.isReact19=U.setScrollOnBody=U.getGeneratorConfig=U.AsyncIndicatorName=U.purifyInstance=U.RouteCompatible=U.RenderErrorDecorator=U.ErrorViewer=U.UpdatePreventer=U.Control=U.selectRenderDomNode=void 0,(0,Q.injectHook)(),U.selectRenderDomNode=function(e){return e},Object.defineProperty(U,"Control",{enumerable:!0,get:function(){return ve.default}}),Object.defineProperty(U,"UpdatePreventer",{enumerable:!0,get:function(){return re.UpdatePreventer}}),Object.defineProperty(U,"ErrorViewer",{enumerable:!0,get:function(){return Y.ErrorViewer}}),Object.defineProperty(U,"RenderErrorDecorator",{enumerable:!0,get:function(){return de.RenderErrorDecorator}}),Object.defineProperty(U,"RouteCompatible",{enumerable:!0,get:function(){return Ce.default}}),Object.defineProperty(U,"purifyInstance",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(U,"AsyncIndicatorName",{enumerable:!0,get:function(){return T.ASYNC_LOADING_TEST_INDICATOR}}),Object.defineProperty(U,"getGeneratorConfig",{enumerable:!0,get:function(){return S.getGeneratorConfig}}),Object.defineProperty(U,"setScrollOnBody",{enumerable:!0,get:function(){return X.setScrollOnBody}}),Object.defineProperty(U,"isReact19",{enumerable:!0,get:function(){return M.isReact19}}),U})); 111!function(){function e(){define("UICommon/ThemeInitializer",["require","exports"],(function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getThemeController=void 0;const t={};n.getThemeController=()=>t}))}function n(n,f){if(!n)if(f)return e();else e();else!function(n,s){if(n&&n[i]){if(n[i]&&n[i].includes("/"))t=n[i];else t=n[i]+"/"+r.join("/");if(t===o)if(s)e();else e();else if(s){var f=u.requirejs(t);module.exports=f}else define(o,[t],(function(e){return e}))}else e()}(n.modules[s].features,f)}var t,o="UICommon/ThemeInitializer",i="UICommon/ThemeInitializer",r=o.split("/"),s=r.shift(),u=function(){return this||(0,eval)("this")}();if("function"==typeof defineFeature)defineFeature("UICommon/ThemeInitializer",["require","exports"],(function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getThemeController=void 0;const t={};n.getThemeController=()=>t}));else if(u.contents)n(u.contents,!1);else if("undefined"==typeof window)n(function(){try{contents=require("json!resources/contents")}catch(e){try{contents=require("json!contents")}catch(e){contents=""}}}()||u.requirejs("UICommon/contents.json"),!1)}(); 112define("UICore/Jsx",["use-sync-external-store/with-selector","react/jsx-runtime","react/jsx-dev-runtime","react","WasabyLoader/ModulesLoader","UICore/Ref","UICore/Focus","UICore/Events","UICommon/Utils","UICommon/Focus","UICommon/Base","Env/Env","Application/Env","require","exports","UICore/Contexts","UICore/Executor"],(function(e,t,n,r,o,i,s,u,c,a,f,l,d,p,y,m,g){var E,v,b,h,C,R,_,w,O,P,S,A,T,j,$,x,N,M,L,k,D,I,U;return Object.defineProperty(y,"__esModule",{value:!0}),E=function(e,t){"use strict";
112Object.defineProperty(t,"__esModule",{value:!0}),t.childrenPropsModificatorSingleton=t.ChildrenPropsModificatorStratagy=void 0;t.ChildrenPropsModificatorStratagy=class{constructor(e,t){this.shouldUseIt=e,this.doAction=t}};return t.childrenPropsModificatorSingleton=new class{constructor(){this.strategies=[]}modifyChildrenProps(e,t,n){const r=this.chooseRightAction(e);if(!r)return{};else return r(e,t,n)}pushStrategy(e){this.strategies.push(e)}chooseRightAction(e){for(let t=this.strategies.length-1;t>=0;t--){const n=this.strategies[t];if(n.shouldUseIt(e))return n.doAction}}},t}(0,{}),v=function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertContentToElement=t.calcUseMemoProps=t.useContent=void 0,t.useContent=function(e,t=[]){return n.useMemo((()=>2===e.length?n.forwardRef(e):e),t)};const o=["_$internal","_$events","_$blockOptionNames","_$attributes"];return t.calcUseMemoProps=function(e){const t=[];for(const n in e)if(!o.includes(n))if(e[n])if(!e[n]||!e[n].isDataArray){if(-1===e[n].constructor.toString().indexOf("[native code]"))if(e[n].constructor)t.push(e[n])}else{const r=e[n].array[0].func.toString();if(-1!==r.indexOf("[native code]"))continue;t.push(r)}return t},t.convertContentToElement=function(e){if((0,r.isReactElement)(e))return e;else return n.createElement(e)},t}(0,{},r,g),b=v,h=function(e,t,n,r,o){"use strict";function i(e){return e instanceof String||"[object String]"===Object.prototype.toString.call(e)}function s(e){return null!==e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"default")}function u(e){if(null===e||"object"!=typeof e)return!1;const t=e;if("string"!=typeof t.library)return!1;else return"string"==typeof t.module&&t.module.length>0||Array.isArray(t.module)&&t.module.length>0&&t.module.every((e=>"string"==typeof e))}function c(e){return e?{...e}:{}}function a(e){if(/^[a-z][a-z0-9+.-]*:\/\//i.test(e))return!1;else return/^[A-Za-z_$][\w$-]*(?:[./][A-Za-z_$][\w$-]*)+:[A-Za-z_$][\w$./,-]*$/.test(e)||/^wml![A-Za-z_$][\w$./-]*(?:\/[A-Za-z_$][\w$./-]*)*$/.test(e)||/^[A-Za-z_$][\w$.-]*(?:\/[A-Za-z_$][\w$.-]*)+$/.test(e)}function f(e){const t=i(e)?e.toString():e;let n=t;if("string"==typeof t)n=(0,r.loadSync)(function(e){const t=e.indexOf(":");if(-1===t)return e;else return`${e.slice(0,t)}:${e.slice(t+1).replace(/,/g,".")}`}(t));else if(u(t))n=(0,r.loadSync)(function(e){const t=Array.isArray(e.module)?e.module.join("."):e.module.replace(/,/g,".");return`${e.library}:${t}`}(t));return s(n)?n.default:n}function l(e,t){var r;const i=c(t);if((0,o.isWasabyRenderObject)(e))return null===(r=e.render)||void 0===r?void 0:r.call(e,i);else return(0,n.createElement)(e,i)}function d(e,t){const r=f(e);if((0,n.isValidElement)(r))return function(e,t){if(!t)return e;else return(0,n.cloneElement)(e,c(t))}(r,t);if((0,o.isWasabyRenderObject)(r)||(0,o.isWasabyTemplateType)(r))return l(r,t);else return(0,n.createElement)(r,c(t))}function p(e,t){return"string"==typeof e&&a(e)||i(e)&&a(e.toString())||u(e)||s(e)||(0,n.isValidElement)(e)||(0,o.isComponentClass)(e)||(0,o.isWasabyRenderObject)(e)||(0,o.isWasabyTemplateType)(e)||t&&"function"==typeof e}return Object.defineProperty(t,"__esModule",{value:!0}),t.resolveContentOption=void 0,t.resolveContentOption=function(e,t){if("string"!=typeof t&&!0===t.stringValue){if("string"==typeof e)return e;if(i(e))return e.toString()}if("render"===("string"==typeof t?t:t.mode))return function(e){if(null==e)return e;if(p(e,!1))return function(t){return d(e,t)};if((0,o.isWasabyRenderObject)(e)||(0,o.isWasabyTemplateType)(e))return function(t){return l(e,t)};else return e}(e);else return function(e){if(null==e||!1===e)return e;if(p(e,!0))return d(e);if(i(e))return e.toString();if((0,o.isWasabyRenderObject)(e)||(0,o.isWasabyTemplateType)(e))return l(e);else return e}(e)},t}(0,{},r,o,g),C=function(e,t,n){"use strict";function r(e){var t;if(e.$$typeof&&e[o])return e.displayName||e[o].name;if("function"==typeof e)return e.displayName||e.name;let n=null!==(t=e._moduleName)&&void 0!==t?t:!1;if(!n)return"";if(function(e,t){if("Controls/Container/Async"===t)return!0;else return!1}(0,n))n+=` Ñ templateName ÑавнÑм "${e.props.templateName}"`;return n}
112Object.defineProperty(t,"__esModule",{value:!0}),t.logExecutionTimeEnd=t.logExecutionTimeBegin=void 0;const o="render";t.logExecutionTimeBegin=()=>0;if(t.logExecutionTimeEnd=(e,t)=>{},"undefined"==typeof window){const e="?SBIS_EXEC_TIME_LOG=1",o="&SBIS_EXEC_TIME_LOG=1",i=-1;t.logExecutionTimeBegin=function(){if(!n.location.search.includes(e)&&!n.location.search.includes(o))return i;else return Date.now()},t.logExecutionTimeEnd=function(e,t){if(t!==i)if("string"!=typeof e)if("react.fragment"!==e.description)!function(e,t){const o=r(e),i="_logicParent"in e&&e._logicParent?`ÐонÑÑол ${o}, обÑÑвленнÑй внÑÑÑи конÑÑола ${r(e._logicParent)},`:`ÐонÑÑол ${o}`;n.logger.info(`${i} бÑл поÑÑÑоен за ${t} мÑ`)}(e,Date.now()-t)}}return t}(0,{},d),R=C,_=function(e,t,n,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.clearEvent=t.delimitProps=void 0,t.delimitProps=function(e){const t=e.$wasabyRef,r=e.attrs,o=e.context,i={...e,attrs:void 0,context:void 0};if(function(e){if(e&&e.hasOwnProperty("className"))return!0;return!1}(r))delete i.className;delete i.$wasabyRef,delete i.forwardedRef;const s={};for(const e of n.reactEventList){const t=i[e];if(t)s[e]=t,delete i[e]}return{clearProps:i,$wasabyRef:t,userAttrs:r,context:o,events:s}},t.clearEvent=function(e,t){var n;null===(n=e.$wasabyRef)||void 0===n||n.clear(r.EVENT_HANDLER_TYPE,t)},t}(0,{},u,i),w=_,O=function(e,t,n,r){"use strict";function o(e){const t=e.getSnapshot,n=e.value;try{const e=t();return!Object.is(n,e)}catch(e){return!0}}Object.defineProperty(t,"__esModule",{value:!0});const i="undefined"==typeof window;return t.default=function(e,t,s){if("function"==typeof n.useSyncExternalStore)return n.useSyncExternalStore(e,t,s);else return function(e,t){const n=t();if(i)return n;const[{inst:s},u]=(0,r.useState)({inst:{value:n,getSnapshot:t}});return(0,r.useLayoutEffect)((()=>{if(s.value=n,s.getSnapshot=t,o(s))u({inst:s})}),[e,n,t]),(0,r.useEffect)((()=>{if(o(s))u({inst:s});return e((()=>{if(o(s))u({inst:s})}))}),[e]),(0,r.useDebugValue)(n),n}(e,t)},t}(0,{},r,r),P=O,S=function(e,t,n,r,o){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.ChildrenAsContent=void 0,t.ChildrenAsContent=(0,r.memo)((0,r.forwardRef)((function(e,t){return(0,n.jsx)(n.Fragment,{children:r.Children.map(e.children,(n=>{const i=o.childrenPropsModificatorSingleton.modifyChildrenProps(n,e,t);return(0,r.cloneElement)(n,i)}))})})),(function(e,t){return function(e,t){for(const n in e)if(!(n in t)||e[n]!==t[n])return!1;for(const n in t)if(!(n in e)||e[n]!==t[n])return!1;return!0}({...e,children:void 0},{...t,children:void 0})})),t.ChildrenAsContent.isChildrenAsContent=!0,t.ChildrenAsContent.displayName="ChildrenAsContent",t}(0,{},t,r,E),A=function(e,t,n,r,o){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.defaultStrategy=void 0,t.defaultStrategy=new o.ChildrenPropsModificatorStratagy((function(e){return!!e}),(function(e,t,o){const i={},s=Object.keys(t),u=new Set(Object.keys(e.props));for(const n of s){if("children"===n||"content"===n)continue;const r=t[n];if("className"!==n||!e.props.className){if(!u.has(n))i[n]=r}else i[n]=`${r} ${e.props.className}`}if((0,n.isForwardRef)(e.type)){const n=new r.ChainOfRef;for(const i of[e.ref,e.props.forwardedRef,o,t.forwardedRef])if(i)n.add(new r.CreateOriginRef(i));if(!n.isEmpty())i.ref=n.execute();return i}if((0,n.isComponentClass)(e.type))return i.ref=r.ChainOfRef.both(e.ref,o),i.forwardedRef=r.ChainOfRef.both(e.props.forwardedRef,t.forwardedRef),i;const c=new r.ChainOfRef;for(const n of[e.props.forwardedRef,o,t.forwardedRef])if(n)c.add(new r.CreateOriginRef(n));if(!c.isEmpty())i.forwardedRef=c.execute();return i})),t}(0,{},g,i,E),T=function(e,t,n,r,o,i,s){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.domElementStrategy=void 0,t.domElementStrategy=new s.ChildrenPropsModificatorStratagy((function(e){return e.type===o.FocusRoot||"string"==typeof e.type}),(function(e,t,o){const s=(0,r.mergeAttrs)(e.props,t.attrs);for(const e of n.reactEventList){const n=t[e];if(n)s[e]=n}const u=new i.ChainOfRef;for(const n of[e.ref,o,t.forwardedRef])if(n)u.add(new i.CreateOriginRef(n));if(!u.isEmpty())s.ref=u.execute();return s})),t}(0,{},u,g,s,i,E),j=function(e,t,n,r,o,i){"use strict";function s(e,t,n){const o=function(e,t){if(!t)return e;const n={...e},r=Object.keys(t);for(const o of r){const r=t[o];if(r)n[o]=(0,i.resolveContentOption)(e[o],r)}return n}(e,t.contentOptions);if(!n)return o;else return function(e){const t={...e};for(const e of u)delete t[e];for(const e of r.wasabyContextPropNames)delete t[e];return t}(o)}
112Object.defineProperty(t,"__esModule",{value:!0}),t.withNormalizeProps=void 0;const u=["_$createdFromCode","$wasabyRef","forwardedRef","attrs","context","customEvents","_$key","_$internal","_$events","_$blockOptionNames","_$attributes","rskey","workByKeyboard","moduleName"];return t.withNormalizeProps=function(e={}){return function(t){const r=t,i=(0,n.forwardRef)((function(t,o){const i=function(e){const t=e;return!0===t._$createdFromCode||null!=t._logicParent||null!=t._physicParent||null!=t.$wasabyRef}(t),u=s(t,e,i),c=!i||!0===e.passWasabyRef||!0===e.passApiRef;if(null==o||!c)return(0,n.createElement)(r,u);const a={...u,ref:o};return(0,n.createElement)(r,a)}));if(i.displayName=`withNormalizeProps(${function(e){if(e.displayName)return e.displayName;if("name"in e&&"string"==typeof e.name)return e.name;else return"Component"}(t)})`,!0===e.passWasabyRef||!0===e.passApiRef)(0,o.markWasabyRef)(i);if(!0===e.passApiRef)(0,o.markWasabyApiRef)(i);return i}},t}(0,{},r,m,g,h),$=j,x=function(e,t,n,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.withResolveContentOptions=void 0,t.withResolveContentOptions=function(e){return function(t){const o=t,i=(0,n.forwardRef)((function(t,i){const s=function(e,t){const n={...e},o=Object.keys(t);for(const i of o){const o=t[i];if(o)n[i]=(0,r.resolveContentOption)(e[i],o)}return n}(t,e);if(null==i)return(0,n.createElement)(o,s);const u={...s,ref:i};return(0,n.createElement)(o,u)}));return i.displayName=`withResolveContentOptions(${function(e){if(e.displayName)return e.displayName;if("name"in e&&"string"==typeof e.name)return e.name;else return"Component"}(t)})`,i}},t}(0,{},r,h),N=x,M=function(e,t,n,r,o){"use strict";let i;Object.defineProperty(t,"__esModule",{value:!0});try{i=o.useSyncExternalStoreWithSelector}catch(e){i=void 0}return t.default=function(e,t,o,s,u){if(i)return i(e,t,u,o,s);else return function(e,t,o,i,s){const u=(0,r.useRef)(null);let c;if(null===u.current)c={hasValue:!1,value:null},u.current=c;else c=u.current;const[a,f]=(0,r.useMemo)((()=>{let e,n,r=!1;const u=t=>{if(!r){r=!0,e=t;const o=i(t);if(void 0!==s&&c.hasValue){const e=c.value;if(s(e,o))return n=e,e}return n=o,o}const o=e,u=n;if(Object.is(o,t))return u;const a=i(t);if(void 0!==s&&s(u,a))return e=t,u;else return e=t,n=a,a};return[()=>u(t()),o?()=>u(o()):void 0]}),[t,o,i,s]),l=(0,n.default)(e,a,f);return(0,r.useEffect)((()=>{c.hasValue=!0,c.value=l}),[l]),(0,r.useDebugValue)(l),l}(e,t,u,o,s)},t}(0,{},O,r,e),L=M,k=function(e,t,n,r,o,i,s,u,c,a){"use strict";let f;Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_REACT_RSKEY_ENDING=t.useElement=void 0;const l=o._FocusAttrs.returnSingletonFocusAttrs();return t.useElement=function(e,o={},d=l,p={},y,m){var g;const E=null!=m?m:n.useContext((0,c.getWasabyContext)());let v;if(o.$wasabyRef)v=o.$wasabyRef,o.forwardedRef=o.$wasabyRef,delete o.$wasabyRef;else if(o.forwardedRef)v=o.forwardedRef;if(o.readOnly=null!==(g=o.readOnly)&&void 0!==g?g:E.readOnly,!o.theme)o.theme=E.theme;if(!o.Router)o.Router=E.Router;if(void 0===o.isAdaptive)o.isAdaptive=E.isAdaptive;const b={depsLocal:{},viewController:E._logicParent,includedTemplates:{},data:{},isVdom:!0,isNativeReact:!0,attr:{attributes:l,events:{},key:null,context:y,_isRootElement:!0,refForContainer:v,_physicParent:E._physicParent},key:void 0};if((0,s.resolveEventName)(p),void 0===o._$key)b.key=`${E._parentKey}${function(e,n){if(void 0!==n.key)return n.key;if(n.item&&n.item.key&&n.item.listInstanceName)return n.item.key;if("Controls/Container/Async"===e.displayName&&n.rskey)return n.rskey;return t.DEFAULT_REACT_RSKEY_ENDING}(e,o)}`;if((0,i.isValidChildren)(o.children)&&null!==o.content&&(!o.content||o.content.isChildrenAsContent))o.content=a.ChildrenAsContent;if(!f)f=new u.GeneratorVdom({isReactWrapper:!0,prepareAttrsForPartial:r.prepareAttrsForPartial});return f.createControlNew("template",e,d,p,o,b)},t.DEFAULT_REACT_RSKEY_ENDING="_el_",t}(0,{},r,f,a,g,u,g,m,S),D=k,I=function(e,t,n,r,o,i,s,u){"use strict";function c({type:e,props:t,childrenAsContentProps:n,...s}){var c;const f={...n,...t,...s,forwardedRef:i.ChainOfRef.both((null==n?void 0:n.forwardedRef)||(null==s?void 0:s.forwardedRef),null!==(c=t.forwardedRef)&&void 0!==c?c:t.$wasabyRef),context:void 0,$wasabyRef:void 0},m=function(e){const t={};for(const n of r.reactEventList){const r=e[n];if(r)t[y[n]]=[r]}if(e.customEvents||e.ignoreEventProps)return{...t,...a(e)};const n=Object.keys(e);for(const o of n)if(/^on[A-Z][A-Za-z]+/g.test(o)&&"function"==typeof e[o]&&!e[o].generatedFromCode&&-1===
112p.indexOf(o)&&-1===r.reactEventList.indexOf(o)){const n=o.slice(2);t["on:"+(!e.customEventsPreventConvertName?n[0].toLowerCase():n[0])+n.slice(1)]=[e[o]]}return t}(f),g=function(e,...t){let n={};for(const e of t)if(e){const t=l(e);n=(0,o.mergeAttrs)(t,n)}if(e.attrs&&e.attrs.hasOwnProperty("className"))delete e.className;if(e[o.ATTR_STYLE]&&"string"!=typeof e[o.ATTR_STYLE])delete e[o.ATTR_STYLE];return e.attrs=void 0,n}(f,t,n,s);if(Array.isArray(f.children))f.children=f.children.filter(d);return(0,u.useElement)(e,f,g,m,t.context)}function a(e){const t={};if(!e.customEvents)return t;for(const r of e.customEvents)if(f(r))if(!(r.indexOf(":")>-1)){if(0===r.search("^on[A-Z]")){if(!e[r]){n.Logger.warn('ÐбÑабоÑÑик ÑобÑÑÐ¸Ñ "'+r+'" не бÑл найден ÑÑеди пеÑеданнÑÑ
опÑий');continue}if("function"!=typeof e[r]){n.Logger.error('ÐпÑÐ¸Ñ "'+r+'" не ÑвлÑеÑÑÑ Ð¾Ð±ÑабоÑÑиком ÑÑнкÑии');continue}const o=r.slice(2);t["on:"+(!e.customEventsPreventConvertName?o[0].toLowerCase():o[0])+o.slice(1)]=[e[r]]}}else n.Logger.error("ÐеÑедано не пÑавилÑное Ð¸Ð¼Ñ ÑобÑÑÐ¸Ñ Ð² customEvents ("+r+"), ÑледÑÐµÑ Ð¸ÑполÑзоваÑÑ camelCase");return t}function f(e){return-1===p.indexOf(e)}function l(e){const t=e.attrs?(0,o.wasabyAttrsToReactDom)({...e.attrs}):{};return Object.entries(e).forEach((([e,n])=>{if(e!==o.ATTR_STYLE){if(o.reactAttrNames.has(e)||o.additionalReactAttrNames.has(e)||o.ATTR_DATA_REG_EXP.test(e))t[e]=n}else if("string"!=typeof n)t[e]=n})),t}function d(e){return!!e}Object.defineProperty(t,"__esModule",{value:!0}),t.elementCreatorStrategy=void 0;const p=["onCaption","onEdgesDataChanged"],y=function(e){const t={};for(const n of Object.keys(e)){const r=n.toLowerCase();if(e.hasOwnProperty(r))t[e[r]]=r}return t}(r.wasabyEventIntersection);return t.elementCreatorStrategy=new s.ChildrenPropsModificatorStratagy((function(e){return e.type===c}),(function(e,t,n){const r={...t,ref:n,attrs:void 0};return delete r.children,delete r.content,{childrenAsContentProps:r}})),t.default=c,t}(0,{},c,u,g,i,E,k),U=function(e,t,n,r,o,i,s){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.ElementCreator=void 0,n.childrenPropsModificatorSingleton.pushStrategy(r.defaultStrategy),n.childrenPropsModificatorSingleton.pushStrategy(o.domElementStrategy),n.childrenPropsModificatorSingleton.pushStrategy(i.elementCreatorStrategy),Object.defineProperty(t,"ElementCreator",{enumerable:!0,get:function(){return s.default}}),t}(0,{},E,A,T,I,I),function(e,t,n,r,o,i,s,u,c){"use strict";function a(e,t){const n=e[t];if("function"==typeof n)return e[t]=function(e,r,...o){const a=s.ReactComponentCreator.convertStringChildren(r)||{},d=(0,s.isWasabyControlType)(e,a),p=(0,s.isWmlTemplateType)(e);if(d||p){if("createElement"===t){const t=a.key;return delete a.key,a.children=a.children||o,l(c.ElementCreator,{type:e,props:a,key:t})}return n.apply(this,[c.ElementCreator,{type:e,props:a},...o])}return function(e){if(f&&e instanceof String)i.Logger.error("Тип ÑлеменÑа непÑавилÑнÑй: ожидалаÑÑ ÑÑÑока или клаÑÑ/ÑÑнкÑиÑ, но полÑÑили Ñип "+typeof e+". СкоÑее вÑего в каÑеÑÑве ÑлеменÑа бÑл пеÑедан обÑÐµÐºÑ Ñипа TranslatableString Ñ Ð»Ð¾ÐºÐ°Ð»Ð¸Ð·Ð¾Ð²Ð°Ð½Ð½Ð¾Ð¹ ÑÑÑокой")}(e),function(e){if(u.constants.isProduction)return;if(!e.customEvents)return;for(const t of e.customEvents)if("function"!=typeof e[t]&&void 0!==e[t]&&null!==e[t])i.Logger.warn(`prop ${t} должен бÑÑÑ ÐºÐ¾Ð»Ð±Ñк-ÑÑнкÑией (ÑейÑÐ°Ñ Ñип - ${typeof e[t]}), Ñ.к. вÑе пÑÐ¾Ð¿Ñ Ñ on* ÑÑиÑаÑÑÑÑ Ð´ÐµÐºÐ¾ÑиÑÑемÑми колбÑками.`)}(a),n.apply(this,[e,a,...o])},n;else i.Logger.error("ÐÑÑÑой меÑод ÑендеÑа, пеÑеопÑеделение невозможно!")}Object.defineProperty(t,"__esModule",{value:!0});const f="undefined"==typeof window;if(o&&"function"!=typeof o.jsxDEV&&"function"==typeof(null==r?void 0:r.jsx))o.jsxDEV=function(e,t,n){return r.jsx(e,{...t,key:n})};const l=n.createElement.bind(n);return a(o,"jsxDEV"),a(r,"jsx"),a(r,"jsxs"),a(n,"createElement"),t}(0,{}
112,r,t,n,c,g,l,U),y.useSyncExternalStoreWithSelector=y.useSyncExternalStore=y.clearEvent=y.delimitProps=y.DEFAULT_REACT_RSKEY_ENDING=y.createElement=y.logExecutionTimeEnd=y.logExecutionTimeBegin=y.withResolveContentOptions=y.withNormalizeProps=y.convertContentToElement=y.calcUseMemoProps=y.useContent=y.wasabyAttrsToReactDom=y.useReadonly=y.useTheme=void 0,Object.defineProperty(y,"useTheme",{enumerable:!0,get:function(){return m.useTheme}}),Object.defineProperty(y,"useReadonly",{enumerable:!0,get:function(){return m.useReadonly}}),Object.defineProperty(y,"wasabyAttrsToReactDom",{enumerable:!0,get:function(){return g.wasabyAttrsToReactDom}}),Object.defineProperty(y,"useContent",{enumerable:!0,get:function(){return b.useContent}}),Object.defineProperty(y,"calcUseMemoProps",{enumerable:!0,get:function(){return b.calcUseMemoProps}}),Object.defineProperty(y,"convertContentToElement",{enumerable:!0,get:function(){return b.convertContentToElement}}),Object.defineProperty(y,"withNormalizeProps",{enumerable:!0,get:function(){return $.withNormalizeProps}}),Object.defineProperty(y,"withResolveContentOptions",{enumerable:!0,get:function(){return N.withResolveContentOptions}}),Object.defineProperty(y,"logExecutionTimeBegin",{enumerable:!0,get:function(){return R.logExecutionTimeBegin}}),Object.defineProperty(y,"logExecutionTimeEnd",{enumerable:!0,get:function(){return R.logExecutionTimeEnd}}),Object.defineProperty(y,"createElement",{enumerable:!0,get:function(){return D.useElement}}),Object.defineProperty(y,"DEFAULT_REACT_RSKEY_ENDING",{enumerable:!0,get:function(){return D.DEFAULT_REACT_RSKEY_ENDING}}),Object.defineProperty(y,"delimitProps",{enumerable:!0,get:function(){return w.delimitProps}}),Object.defineProperty(y,"clearEvent",{enumerable:!0,get:function(){return w.clearEvent}}),Object.defineProperty(y,"useSyncExternalStore",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(y,"useSyncExternalStoreWithSelector",{enumerable:!0,get:function(){return L.default}}),y})); 113define("use-sync-external-store/with-selector", ["exports", "react"], function(e,t){"use strict";const n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},u=t.useSyncExternalStore,r=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,o,i,a){const f=r(null);let v;null===f.current?(v={hasValue:!1,value:null},f.current=v):v=f.current;const d=c((()=>{let e,u,r=!1;const s=t=>{if(!r){r=!0,e=t;const n=i(t);if(void 0!==a&&v.hasValue){const e=v.value;if(a(e,n))return u=e,e}return u=n,n}const s=u;if(n(e,t))return s;const c=i(t);return void 0!==a&&a(s,c)?(e=t,s):(e=t,u=c,c)},c=void 0===o?null:o;return[()=>s(t()),null===c?void 0:()=>s(c())]}),[t,o,i,a]),h=d[0],S=d[1],x=u(e,h,S);return s((()=>{v.hasValue=!0,v.value=x}),[x]),l(x),x}}); 114define("UICore/WasabyReactivity",["react","UICore/Jsx","Types/guards","Application/Env","require","exports"],(function(e,r,t,n,o,a){var s,u,i,c,l,f,b,p,d;return Object.defineProperty(a,"__esModule",{value:!0}),s=function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ReactiveUpdateManager=r.pauseErrorWrongUpdater=r.pauseReactive=void 0;const n=new Map;r.pauseReactive=function(e,r){if(!n.has(e))n.set(e,0);n.set(e,n.get(e)+1);try{r()}finally{if(n.set(e,n.get(e)-1),0===n.get(e))n.delete(e)}};let o=!0;r.pauseErrorWrongUpdater=function(e){o=!1;try{e()}finally{o=!0}};return r.ReactiveUpdateManager=class{setUpdater(e,r){if(this.updater){if(o){const e=`ÐÐ¾Ð¼Ð¿Ð¾Ð½ÐµÐ½Ñ ${this.componentName} Ñже бÑÐ´ÐµÑ Ð¿ÐµÑеÑиÑовÑваÑÑÑÑ Ð¿Ñи изменении ÑÑого обÑекÑа. ЧÑÐ¾Ð±Ñ Ð¸Ð·Ð±ÐµÐ¶Ð°ÑÑ ÐºÐ°Ñкада обновлений, далÑнейÑие подпиÑки игноÑиÑÑÑÑÑÑ. ÐÑи Ð½ÐµÐ¾Ð±Ñ Ð¾Ð´Ð¸Ð¼Ð¾ÑÑи пеÑеÑиÑовка Ð¼Ð¾Ð¶ÐµÑ ÑаÑпÑоÑÑÑаниÑÑÑÑ Ð²Ð½Ð¸Ð· ÑеÑез пÑопÑÑ Ð¸Ð»Ð¸ конÑекÑÑ.`;t.logger.error(e,this.updater)}return!1}return this.componentName=r||"[unknown name]",this.updater=e,!0}isCurrentUpdater(e){return!!this.updater&&this.updater===e}unsetUpdater(e){if(!this.isCurrentUpdater(e))return!1;else return this.updater=void 0,this.componentName=void 0,!0}callHandler(...e){if(this.updater&&!n.has(this.updater))this.updater(...e)}},r}(0,{},n),u=s,i=function(e,r,t,n,o){"use strict";
114Object.defineProperty(r,"__esModule",{value:!0});const a=[];return r.default=function(e,r,s=a){const u=(0,n.useRef)(),i=(0,n.useRef)(),c=(0,n.useCallback)((e=>(u.current=e,()=>{u.current=void 0})),[]),l=(0,n.useRef)(null),f=(0,n.useRef)(!0),b=(0,n.useRef)(!0),p=(0,n.useRef)(),d=(0,n.useCallback)((()=>{var e;b.current=!0,null===(e=u.current)||void 0===e||e.call(u)}),[]),v=(0,n.useCallback)((e=>r(e)),[r,...s]),g=(0,n.useRef)(v),y=(0,n.useCallback)((()=>{var r,n;if(!(0,t.isRecord)(e))return null===(r=i.current)||void 0===r||r.call(i),i.current=void 0,l.current=null,g.current=v,p.current;const o=l.current!==e,a=g.current!==v;if(o||f.current){null===(n=i.current)||void 0===n||n.call(i),l.current=e,e.startObserveSession();const r=v(e);return i.current=e.endObserveSession(d),p.current=r,b.current=!1,f.current=!1,r}if(b.current||a)g.current=v,p.current=v(e),b.current=!1;return p.current}),[e,v,d]),h=(0,n.useCallback)((()=>{if(!(0,t.isRecord)(e))return p.current;else return v(e)}),[e,v]);return(0,n.useEffect)((()=>()=>{var e;null===(e=i.current)||void 0===e||e.call(i)}),[]),(0,o.useSyncExternalStore)(c,y,h)},r}(0,{},t,e,r),c=i,l=function(e,r,t){"use strict";function n(e,r){const t=!!e&&o.get(e);if(t)if(t.unsetUpdater(r)){for(const r of a){const t=s[r];Object.defineProperty(e,r,{value:t,enumerable:!1,writable:!0,configurable:!0})}o.delete(e)}}Object.defineProperty(r,"__esModule",{value:!0}),r.unobserveArrayChange=r.unobserveAllArrayChanges=r.observeArrayChange=void 0;const o=new Map,a=["push","pop","shift","unshift","splice","sort","reverse"],s={};for(const e of a)s[e]=Array.prototype[e];return r.observeArrayChange=function(e,r,n,u){if(!e)return;const i=function(e){const r=o.get(e);if(r)return r;const n=new t.ReactiveUpdateManager;return o.set(e,n),n}(e);if(i.setUpdater(r,n)){let r=0;Object.defineProperties(e,{_arrayVersion:{value:r,enumerable:!1,writable:!0,configurable:!0},getArrayVersion:{value:()=>r,enumerable:!1,writable:!1,configurable:!0}});for(const t of a){const n=s[t],o=function(){const e=n.apply(this,arguments);return r++,i.callHandler(u+` .${t}`),e};Object.defineProperty(e,t,{value:o,enumerable:!1,writable:!0,configurable:!0})}}},r.unobserveAllArrayChanges=function(e){for(const[r,t]of Array.from(o.entries()))if(t.isCurrentUpdater(e))n(r,e)},r.unobserveArrayChange=n,r}(0,{},s),f=function(e,r,t,n){"use strict";function o(e,r,t,...o){if(s)return;if(!e)return;const a=function(e){const r=u.get(e);if(r)return r;const t=new n.ReactiveUpdateManager;return u.set(e,t),t}(e),i=t||function(){var e;const r=null===(e=new Error("").stack)||void 0===e?void 0:e.split("\n");if(!r)return"";for(let e=2;e<r.length;e++){const t=r[e];if(!t.includes("/UICore/"))return t}return""}();if(a.setUpdater(r,i)){let r=e._version;Object.defineProperty(e,"_version",{enumerable:!0,configurable:!0,set(e){if(r!==e)r=e,a.callHandler(...o)},get:()=>r})}}function a(e,r){if(s)return;const t=!!e&&u.get(e);if(t)if(t.unsetUpdater(r)){const r=e._version;Object.defineProperty(e,"_version",{enumerable:!0,configurable:!0,writable:!0,value:r}),u.delete(e)}}Object.defineProperty(r,"__esModule",{value:!0}),r.unobserveVersionChange=r.unobserveAllVersionChanges=r.observeVersionChange=r.useObservableOfVersion=void 0;const s="undefined"==typeof window,u=new Map;return r.useObservableOfVersion=function(e){const r=(0,t.useRef)(),n=(0,t.useState)(0)[1],s=(0,t.useRef)((()=>n((e=>e+1))));if((0,t.useEffect)((()=>()=>a(r.current,s.current)),[]),r.current!==e)a(r.current,s.current),o(e,s.current),r.current=e},r.observeVersionChange=o,r.unobserveAllVersionChanges=function(e){if(!s)for(const[r,t]of Array.from(u.entries()))if(t.isCurrentUpdater(e))a(r,e)},r.unobserveVersionChange=a,r}(0,{},e,s),b=f,p=function(e,r,t,n,o){"use strict";function a(e){return e&&"number"==typeof e._version}function s(e){const r=new t.ReactiveUpdateManager;return r.setUpdater(e.controlUpdater,e._moduleName),v.set(e,r),r}function u(e){return v.get(e)||s(e)}function i(e){var r;return(null===(r=null==e?void 0:e._template)||void 0===r?void 0:r.reactiveProps)||[]}function c(e){const r=i(e);for(const t of r)p(e,t)}function l(e,r,s){(0,t.pauseErrorWrongUpdater)((()=>
114{if(!Array.isArray(e)){if(a(e))(0,o.observeVersionChange)(e,r.controlUpdater,r._moduleName,`${s} ._version`)}else(0,n.observeArrayChange)(e,r.controlUpdater,r._moduleName,s)}))}function f(e,r){(0,t.pauseErrorWrongUpdater)((()=>{if(!Array.isArray(e)){if(a(e))(0,o.unobserveVersionChange)(e,r.controlUpdater)}else(0,n.unobserveArrayChange)(e,r.controlUpdater)}))}function b(e){const r=i(e),t=v.get(e);if(t){(0,n.unobserveAllArrayChanges)(e.controlUpdater),(0,o.unobserveAllVersionChanges)(e.controlUpdater),t.unsetUpdater(e.controlUpdater),v.delete(e);for(const t of r)d(e,t);e.reactiveValues={},e.scopeReactiveValues={}}}function p(e,r){const t=e[r];e.reactiveValues[r]=t,l(t,e,r);const n=function(e,r){let t=null,n=e;for(;n&&(t=Object.getOwnPropertyDescriptor(n,r),n=Object.getPrototypeOf(n),!t););return t}(e,r);Object.defineProperty(e,r,{enumerable:!0,configurable:!0,set(t){if(null==n?void 0:n.set)n.set.apply(this,arguments);if(!this.hasOwnProperty("reactiveValues"))this.reactiveValues=Object.create(this.reactiveValues),this.isCloneOfControl=!0;const o=this.reactiveValues[r];if(!(o===t||Number.isNaN(o)&&Number.isNaN(t))){if(f(o,e),this.isCloneOfControl)f(e.scopeReactiveValues[r],e),e.scopeReactiveValues[r]=t;if(this.reactiveValues[r]=t,l(t,e,r),!this.isCloneOfControl)u(e).callHandler(r)}},get(){if(null==n?void 0:n.get)return n.get.apply(this,arguments);else return this.reactiveValues[r]}})}function d(e,r){if(!e.reactiveValues.hasOwnProperty(r))return;const t=e.reactiveValues[r];Object.defineProperty(e,r,{value:t,configurable:!0,writable:!0,enumerable:!0})}Object.defineProperty(r,"__esModule",{value:!0}),r.releaseProperties=r.makeWasabyObservable=void 0;const v=new Map;return r.makeWasabyObservable=function(e,r){if(!e.reactiveValues)e.reactiveValues={},e.scopeReactiveValues={},e.controlUpdater=r,s(e);!function(e){let r=e._template;Object.defineProperty(e,"_template",{enumerable:!0,configurable:!0,get:()=>r,set(t){if(!e._destroyed){if(t!==r&&t&&t.reactiveProps)b(e),r=t,c(e),u(e).callHandler("_template")}else r=t}})}(e),c(e)},r.releaseProperties=b,r}(0,{},s,l,f),d=p,a.useRecordSelector=a.unobserveVersionChange=a.observeVersionChange=a.useObservableOfVersion=a.pauseReactive=a.releaseProperties=a.makeWasabyObservable=void 0,Object.defineProperty(a,"makeWasabyObservable",{enumerable:!0,get:function(){return d.makeWasabyObservable}}),Object.defineProperty(a,"releaseProperties",{enumerable:!0,get:function(){return d.releaseProperties}}),Object.defineProperty(a,"pauseReactive",{enumerable:!0,get:function(){return u.pauseReactive}}),Object.defineProperty(a,"useObservableOfVersion",{enumerable:!0,get:function(){return b.useObservableOfVersion}}),Object.defineProperty(a,"observeVersionChange",{enumerable:!0,get:function(){return b.observeVersionChange}}),Object.defineProperty(a,"unobserveVersionChange",{enumerable:!0,get:function(){return b.unobserveVersionChange}}),Object.defineProperty(a,"useRecordSelector",{enumerable:!0,get:function(){return c.default}}),a})); 115define("Core/helpers/Number/randomId",["require","exports"],(function(r,e){"use strict";return function(r){return(r||"ws-")+Math.random().toString(36).substr(2)+ +new Date}})); 116define("Core/helpers/isNewEnvironment",["require","exports","Application/Initializer","Application/Env"],(function(e,i,n,t){"use strict";return function(){var e;if(n.isInit())return!1!==((e=t.getStore("HeadData"))&&e.get("isNewEnvironment"));else return!1}})); 117define("clsx", ["exports"], function(e){function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function t(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}e.clsx=t,e.default=t,Object.defineProperty(e,"__esModule",{value:!0})}); 118define("Controls/Application/SettingsController",["require","exports","Router/router"],(function(t,e,n){"use strict";function r(t,e){if(g&&g.getSettings){const n=g.getSettings(t,e);if(n instanceof Promise)return n;else return Promise.resolve(n)}return Promise.resolve()}function s(t,e,n,r){let s={};if(t&&(n||r))Object.keys(t).forEach((e=>{const i=o(e,n,r);s[i]=t[e]}));else s=t;if(g&&g.setSettings)g.setSettings(s,e)}async function i(t,e){return new Promise((n=>{r([t]).then((r=>{let s={};if(r&&r[t])if(e)e.forEach((e=>{if(r[t].hasOwnProperty(e))s[e]=r[t][e]}));else s={...r[t]};n(s)}))}))}function o(t,e,r){const s=(0,n.getRootRouter)().maskResolver.calculateUrlParams("page/:pageId").pageId;let i=t;if(e)i=`${i}_${e}`;if(r)i=`${s}_${i}`;return i}let g;var f;
118Object.defineProperty(e,"__esModule",{value:!0}),e.getStorageId=e.saveConfig=e.loadSavedConfig=e.setSettings=e.getSettingsSync=e.getIdWithMask=e.SettingsMasks=e.getSettings=e.hasSettingsController=e.setController=void 0,e.setController=function(t){g=t},e.hasSettingsController=function(){return!!g},e.getSettings=r,function(t){t.masterWidth="masterWidth"}(f||(e.SettingsMasks=f={})),e.getIdWithMask=function(t,e,n){return`${n||t}_${e}_${t}`},e.getSettingsSync=function(t,e,n,r){let s=[];if(t&&t.length&&(e||n))t.forEach(((t,r)=>{s[r]=o(t,e,n)}));else s=t;if(g&&g.getSettingsSync){const i=g.getSettingsSync(s,r);if(e||n){const e={};return t.forEach(((t,n)=>{if(void 0!==i[s[n]])e[t]=i[s[n]]})),e}return i}},e.setSettings=s,e.loadSavedConfig=i,e.saveConfig=function(t,e,n){if(t&&e)return i(t).then((r=>{const i=r||{};e.forEach((t=>{if(n.hasOwnProperty(t))i[t]=n[t]})),s({[t]:i})}));else return Promise.resolve()},e.getStorageId=o})); 119define("Controls/Store",["require","exports","Application/Env"],(function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n="--",o="pageState",r="global";class i{getState(){return i._getState()[i._getContextName(!1)]||{}}get(t,e){const a=null==e?void 0:e.ignoreContext,n=i._getState()[i._getContextName(!1,a)]||{};return n.hasOwnProperty(t)?n[t]:(i._getState()[i._getContextName(!0,a)]||{})[t]}dispatch(t,e,a,n){const o=null==n?void 0:n.ignoreContext;this._setValue(t,e,a,o),this._notifySubscribers(t,void 0,a,o)}sendCommand(t,e){return(i._getState()[i._getContextName(!1)]||{}).hasOwnProperty(t)?this._notifySubscribers(t,e,!1):this._notifySubscribers(t,e,!0)}onPropertyChanged(t,e,a,n){const o=null==n?void 0:n.ignoreContext;return this._addCallback(t,e,a,o)}declareCommand(t,e,a){return this._addCallback(t,e,a)}unsubscribe(t){this._removeCallback(t)}updateStoreContext(t,e){if(t!==i._getActiveContext()){if(i._getState()[i._getContextName(!1)]&&i._getActiveContext()!==r&&!e)delete i._getState()[i._getContextName(!1)];i._setActiveContext(t),this._notifySubscribers("_contextName",void 0,!0,!1)}}setGlobalContextName(t,e){if(i._appContext&&e)delete i._getState()[i._getContextName(!1)],delete i._getState()[i._getContextName(!0)];i._appContext=t}getGlobalContextName(){return i._appContext}_setValue(t,e,a,n){const o=i._getState()[i._getContextName(a,n)]||{};if(!o.hasOwnProperty(t))this._defineProperty(o,t,a,n);o["_"+t].value=e,i._setState(o,i._getContextName(a,n))}_defineProperty(t,e,a,n){Object.defineProperty(t,"_"+e,{value:{value:void 0,callbacks:[]},enumerable:!1}),Object.defineProperty(t,e,{set(){},get(){return this["_"+e].value},enumerable:!0}),i._setState(t,i._getContextName(a,n))}_addCallback(t,e,a,o){const r=i._getContextName(a,o),s=i._getState()[r]||{};if(!s.hasOwnProperty(t))this._defineProperty(s,t,a,o);const _=s["_"+t].callbacks,l=[r,"_"+t,+(_.length>0?_[_.length-1].id.split(n)[2]:0)+1].join(n);return _.push({id:l,callbackFn:e}),i._setState(s,r),l}_removeCallback(t){var e;const a=i._getState(),[o,r]=t.split(n);if(a&&a[o]&&(null===(e=a[o][r])||void 0===e?void 0:e.callbacks))a[o][r].callbacks=a[o][r].callbacks.reduce(((e,a)=>{if(a.id!==t)e.push(a);return e}),[]),i._setState(a[o],o)}_notifySubscribers(t,e,a,n){var o;const r=i._getState()[i._getContextName(a,n)]||{};if(null===(o=r["_"+t])||void 0===o?void 0:o.callbacks)r["_"+t].callbacks.forEach((a=>a.callbackFn(void 0!==e?e:r[t])))}static _getState(){return(0,a.getStore)(o).get("value")||{}}static _setState(t,e){const n=(0,a.getStore)(o).get("value")||{};n[e]=t,(0,a.getStore)(o).set("value",n)}static _getActiveContext(){return(0,a.getStore)(o).get("activeContext")||r}static _setActiveContext(t){const e=(t||"").split("@@")[0];return(0,a.getStore)(o).set("activeContext",e)}static _getContextName(t,e){return(t?r:i._getActiveContext())+(e?"":i._getAppContextName())}static _getAppContextName(){return i._appContext?"@@"+i._appContext:""}}i._appContext="",e.default=new i})); 120define("Controls/dataSource",["react/jsx-runtime","react","WasabyLoader/ModulesLoader","UICore/Contexts","UI/Utils","UI/Base","Types/util","Types/source","Types/serializer","Types/promise","Types/object","Types/entity","Types/collection","Types/chain","TransportCore/trans
120port","ParametersWebAPI/Scope","ErrorHandling/interface","Env/Env","Core/helpers/Number/randomId","Core/core-instance","Controls/error","Controls/Utils/ArraySimpleValuesUtil","Controls/Container/Async","Controls/Application/SettingsController","Compiler/IR","Browser/Transport","Application/Env","require","exports"],(function(e,t,r,o,i,a,s,n,l,d,u,c,h,g,p,_,f,y,m,v,C,P,b,S,I,E,w,M,O){var k,R,L,T,N,x,D,A,B,j,F,Q,K,H,q,U,V,G,z,W,J,$,Y,X,Z,ee,te,re,oe,ie,ae,se,ne,le,de,ue,ce,he,ge,pe,_e,fe,ye,me,ve,Ce,Pe,be,Se,Ie,Ee,we,Me,Oe;return Object.defineProperty(O,"__esModule",{value:!0}),k=function(e,t,r){"use strict";function o(){return(0,r.getStore)("__localSourceState__")}Object.defineProperty(t,"__esModule",{value:!0}),t.getState=t.saveState=void 0;return t.saveState=function(e,t){o().set(e,t)},t.getState=function(e,t){const r=o().get(e);if(t)return t.reduce(((e,t)=>{if(void 0!==(null==r?void 0:r[t]))e[t]=r[t];return e}),{});else return r},t}(0,{},w),R=k,L=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=["source","navigation","navigationParamsChangedCallback","filter","sorting","keyProperty","root","rootHistoryId","parentProperty","nodeProperty","hasChildrenProperty","childrenProperty","nodeTypeProperty","nodeHistoryId","nodeHistoryType","expandedItems","selectedKeys","excludedKeys","groupProperty","collapsedGroups","groupHistoryId","propStorageId","historyIdCollapsedGroups","dataLoadCallback","dataLoadErrback","nodeLoadCallback","displayProperty","error","selectFields","loadTimeout","items","deepScrollLoad","deepReload","id","observeMetaData","task1183145150"];return t.default=function(e){const t={};if(e)for(const o of r)if(e.hasOwnProperty(o))t[o]=e[o];return t},t}(0,{}),T=function(e,t,r,o,i){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;const a=r.URL.getQueryParam("listParams");if(a)try{const r=null===(t=JSON.parse(decodeURIComponent(a.replace(/%(?![0-9][0-9a-fA-F]+)/g,"%25")),(new o.Serializer).deserialize))||void 0===t?void 0:t[e],i={};if(r){if(i.historyItems=r.filterDescription,void 0!==r.root)i.root=r.root;if(void 0!==r.expandedItems)i.expandedItems=r.expandedItems}return i}catch(e){return i.Logger.warn("Ð url пеÑедан невалиднÑй паÑамеÑÑ listParams, он не бÑÐ´ÐµÑ Ð¿Ñименен"),{}}return{}},t}(0,{},E,l,i),N=T,x=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){function r(e){return e["[Types/_source/PrefetchProxy]"]}let o;if(t&&r(t)){if(o=t.getOriginal(),o&&r(o))o=e(o)}else o=t;return o},t}(0,{}),D=x,A=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let t=new r.Query;if(e.filter)t=t.where(e.filter);if(e.offset)t=t.offset(e.offset);if(e.limit)t=t.limit(e.limit);if(e.sorting)t=t.orderBy(e.sorting);if(e.meta)t=t.meta(e.meta);if(e.select)t=t.select(e.select);return t},t}(0,{},n),B=A,j=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Array.isArray(e)&&null===e[0]},t}(0,{}),F=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=(e,t,r)=>r,t}(0,{}),Q=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=(e,t,o,i)=>{let a=o;if(null==e)throw new TypeError;if(null!=i&&o.getRecordById(i))a=o.getRecordById(i).get(e);else o.forEach((o=>{if(!a)a=r(e,t,o.get(e),i)}));return a};return t.default=r,t}(0,{}),K=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e){if(this._more=null,this._page=e.page||0,this._prevPage=this._page-1,this._nextPage=this._page+1,this._initPages(e.page||0),e.pageSize)this._pageSize=e.pageSize;else throw new Error("Option pageSize is undefined in PageNavigation");this._hasMore=!1!==e.hasMore}clone(){const e={page:this._page,hasMore:this._hasMore,pageSize:this._pageSize},t=new r(e);return t._nextPage=this._nextPage,t._prevPage=this._prevPage,t._more=this._more,t}_initPages(e){this._page=e,this._prevPage=this._page-1,this._nextPage=this._page+1}getState(){return{page:this._page,pageSize:this._pageSize,hasMore:this._hasMore,prevPage:this._prevPage,nextPage:this._nextPage}}shiftNextPage(){this._nextPage++}shiftPrevPage(){this._prevPage--}setPrevPage(e){this._prevPage=e}setNextPage(e){this._nextPage=e}setCurrentPage(e){this._initPages(e)}setMetaMore(e){this._more=e}getMetaMore(){return this._more}destroy(){this._nextPage=null,this._prevPage=null,this._more=null,this._page=null,this._pageSize=null,this._hasMore=null}}return t.default=r,t}(0,{}),H=function(e,t,r){"use strict";
120Object.defineProperty(t,"__esModule",{value:!0});class o{getQueryParams(e,t,o,i,a){const s={};s.meta={navigationType:r.QueryNavigationType.Page};const n=e.getState();let l;switch(o){case"forward":l=n.nextPage;break;case"backward":l=n.prevPage;break;default:l="number"==typeof t.page?t.page:n.page}const d=t.pageSize?t.pageSize:n.pageSize;if(s.offset=l*d,a)s.limit=d;else s.limit=d*n.nextPage;if(!1===n.hasMore)s.meta.hasMore=!1;if(i)i({page:l,pageSize:d});return s}updateQueryProperties(e,t,r,i,a){const s=e.getState();switch(o._validateNavigation(r,s.hasMore),e.setMetaMore(r),a){case"forward":e.shiftNextPage();break;case"backward":e.shiftPrevPage();break;default:if(i&&i.pageSize){const t=i.pageSize%s.pageSize,o=(i.pageSize-t)/s.pageSize;if(t)throw new Error("pageSize, пеÑеданнÑй Ð´Ð»Ñ ÐµÐ´Ð¸Ð½Ð¸Ñной пеÑезагÑÑзки ÑпиÑка, должен наÑело делиÑÑÑÑ Ð½Ð° pageSize из опÑии navigation.sourceConfig.");const a="number"==typeof r;let n,l,d,u=(i.page+1)*o;if(a)d=Math.max(1,Math.ceil(r/s.pageSize)),u=Math.min(d,u);if(i.page){if(n=(i.page+1)*o-1,l=i.page*o-1,a)n=Math.min(d,n)}else n=0,l=i.page-1;e.setCurrentPage(n),e.setPrevPage(l),e.setNextPage(u)}}return e.getState()}hasMoreData(e,t){let r;const o=e.getState(),i=e.getMetaMore();if("forward"===t)if(void 0===i)r=!1;else if(!1===o.hasMore)r="boolean"==typeof i?i:o.nextPage*o.pageSize<i;else r=!!i;else if("backward"===t)r=o.prevPage>=0;else throw new Error("Parameter direction is not defined in hasMoreData call");return r}shiftToEdge(e,t,r,o){const i={};if("backward"===t)i.page=0;else if("forward"===t){const t=e.getMetaMore();if("number"==typeof t){if(i.page=Math.ceil(t/e.getState().pageSize)-1,t/e.getState().pageSize%1>0)i.pageSize=e.getState().pageSize*(i.page-1),i.page=1}else i.page=-1}return{...o,...i}}updateQueryRange(e){}getAdditionalMeta(e,t){return{}}destroy(){}static _validateNavigation(e,t){if(!1===t){if(e&&"number"!=typeof e)throw new Error('"more" Parameter has incorrect type. Must be numeric')}else if(e&&"boolean"!=typeof e)throw new Error('"more" Parameter has incorrect type. Must be boolean')}}return t.default=o,t}(0,{},n),q=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e){if(this._iterative=void 0,this._backwardPosition=[null],this._forwardPosition=[null],void 0!==e.field)this._field=e.field instanceof Array?e.field:[e.field];else throw new Error("Option field is undefined in PositionNavigation");if(void 0!==e.position)this._position=e.position instanceof Array?e.position:[e.position];else this._position=[null];if(void 0!==e.direction)this._direction=r.convertDirection(e.direction);else throw new Error("Option direction is undefined in PositionNavigation");this._limit=e.limit,this._more=r._getDefaultMoreMeta()}clone(){const e={field:this._field,position:this._position,direction:this._direction,limit:this._limit},t=new r(e);return t._iterative=this._iterative,t._backwardPosition=[...this._backwardPosition],t._forwardPosition=[...this._forwardPosition],t._more={...this._more},t}getState(){return{field:this._field,position:this._position,direction:this._direction,limit:this._limit,backwardPosition:this._backwardPosition,forwardPosition:this._forwardPosition,iterative:this._iterative}}setForwardPosition(e){this._forwardPosition=e}setBackwardPosition(e){this._backwardPosition=e}setLimit(e){this._limit=e}setPosition(e){this._position=e}setIterative(e){this._iterative=e}setMetaMore(e){if(void 0!==e.before)this._more.backward=e.before;if(void 0!==e.backward)this._more.backward=e.backward;if(void 0!==e.after)this._more.forward=e.after;if(void 0!==e.forward)this._more.forward=e.forward}getMetaMore(){return this._more}updateMetaMoreToDirection(e,t){this._more[e]=t}destroy(){this._field=null,this._position=null,this._direction=null,this._limit=null,this._backwardPosition=null,this._forwardPosition=null,this._more=null}static _getDefaultMoreMeta(){return{backward:!1,forward:!1}}static convertDirection(e){const t={before:"backward",after:"forward",both:"bothways"};return t[e]?t[e]:e}}return t.default=r,t}(0,{}),U=function(e,t,r){"use strict";
120Object.defineProperty(t,"__esModule",{value:!0});return t.default=new class{setPageConfigLoaderModule(e){this._pageConfigLoaderModule=e}setDataLoaderModule(e){this._pageDataLoaderModule=e}getPageConfig(e){const t=this._pageConfigLoaderModule;if(!t)return Promise.reject();else return new Promise(((r,o)=>{this._getModuleByModuleName(t,(t=>{t.getConfigById(e,void 0,void 0,!0).then(r,o)}))}))}loadData(e,t){const r=this._pageDataLoaderModule;if(!r){throw new Error("ÐÑи попÑÑке оÑкÑÑÑÑ ÑÑÑаниÑÑ Ð² окне пÑоизоÑла оÑибка. Ðа пÑиложении не задан модÑÐ»Ñ Ð´Ð»Ñ Ð¿Ð¾Ð»ÑÑÐµÐ½Ð¸Ñ ÐºÐ¾Ð½ÑигÑÑаÑии ÑÑÑаниÑÑ.")}return new Promise(((o,i)=>{this._getModuleByModuleName(r,(r=>{var a;const s=null===(a=null==e?void 0:e.templateOptions)||void 0===a?void 0:a.prefetchConfig;if(s){const e={...s,configLoaderArguments:{...s.configLoaderArguments,...t}};r.loadData(e).then((e=>{if(e.configError)throw new Error(e.configError);o(e.data)})).catch(i)}else i()}))}))}awaitLoadResult(e){return e.then((e=>this.prepareLoadResult(e)))}prepareLoadResult(e){const t={};return Object.keys(e).forEach((r=>{t[r]=e[r].prefetchResult})),t}_getModuleByModuleName(e,t){if((0,r.isLoaded)(e))t((0,r.loadSync)(e));else(0,r.loadAsync)(e).then((e=>{t(e)}))}},t}(0,{},r),V=U,G=function(e,t,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i="LIST_COLLAPSED_GROUP_",a={storeCollapsedGroups(e,t){const r=JSON.stringify(e);return o.USER.set(i+t,r)},restoreCollapsedGroups:e=>new Promise((t=>{const a=i+e;o.USER.load([a]).then((e=>{try{const r=e.get(a);if(void 0!==r)t(JSON.parse(r));else t()}catch(e){r.Logger.error('GroupUtil: In the store by key "'+a+'" value in invalid format.'),t()}})).catch((e=>{r.Logger.warn(`GroupUtil: An error occurred while getting data.\nError: ${e.message}`),t()}))}))};return t.default=a,t}(0,{},i,_),z=G,W=function(e,t,r,o){"use strict";function i(e,t){let r="";if(e&&e.length>=1&&t)r=e[e.length-1].get(t);return r}function a(e){let t;if(e&&e.length>=1)t=e[e.length-1];return t}function s(e){let t=null;if(e&&e.length>1)t=e.slice(0,e.length-1);return t}return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const n=function(e){const t=e instanceof r.RecordSet&&e.getMetaData().path;let i=null;if(t&&t.getCount()>0)i=(0,o.factory)(t).toArray();else if(Array.isArray(e))i=e;return i}(e);return{path:n,pathWithoutItemForBackButton:s(n),backButtonItem:a(n),backButtonCaption:i(n,t)}},t}(0,{},h,g),J=W,$=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e=[],t,{nodeTypeProperty:o,nodeHistoryId:i,nodeHistoryType:a}){if(0===e.length||!o)return e;else{const s=i?function(e){const t=r.USER.getConfig().get(e);return t?JSON.parse(t):void 0}(i):void 0;return e.filter((e=>{const r=t.getRecordById(e);if(!r)return s?-1!==s.indexOf(e):!1;const i=r.get(o);if("node"===a)return"group"!==i;else if("all"===a)return!0;return"group"===i}))}},t}(0,{},_),Y=$,X=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({parentProperty:e,nodeProperty:t,keyProperty:o,key:i,items:a}){return new r.relation.Hierarchy({parentProperty:e,nodeProperty:t,keyProperty:o}).getChildren(i,a).length},t}(0,{},c),Z=X,ee=function(e,t,r){"use strict";function o(e){let t;if("function"==typeof e)t=e.prototype._moduleName;else t=e;return t}return Object.defineProperty(t,"__esModule",{value:!0}),t.isEqualItems=void 0,t.isEqualItems=function(e,t){const i=Object.getPrototypeOf.bind(Object),a=e&&e["[Types/_collection/RecordSet]"]&&e.getModel(),s=t&&t["[Types/_collection/RecordSet]"]&&t.getModel();let n=a===s;if(!n&&o(a)===o(s))n=!0;return e&&r.instanceOfModule(e,"Types/collection:RecordSet")&&n&&t.getKeyProperty()===e.getKeyProperty()&&i(t).constructor==i(t).constructor&&i(t.getAdapter()).constructor==i(e.getAdapter()).constructor&&function(e,t){const r=e&&e["[Types/_entity/FormattableMixin]"]&&e.getFormat(!0),o=t&&t["[Types/_entity/FormattableMixin]"]&&t.getFormat(!0),i=!t.getCount()||!e.getCount();return r&&o&&r.isEqual(o)||i||!r&&!o}(e,t)},t}(0,{},v),te=ee,re=function(e,t,r,o){"use strict";
120return Object.defineProperty(t,"__esModule",{value:!0}),t.nodeHistoryUtil=void 0,t.nodeHistoryUtil={store(e,t){const o=JSON.stringify(e);return r.USER.set(t,o)},getCached(e){const t=r.USER.getConfig().get(e);return void 0!==t?JSON.parse(t):void 0},restore(e){return new Promise(((t,i)=>{r.USER.load([e]).then((r=>{try{const o=r.get(e);if(void 0!==o)t(JSON.parse(o));else t()}catch(t){const r='nodeHistoryUtil: Invalid value format for key "'+e+'"';o.Logger.error(r,this),i(r)}})).catch((e=>{const t=`nodeHistoryUtil: An error occurred while getting data.\nError: ${e.message}`;o.Logger.warn(t),i(t)}))}))}},t}(0,{},_,i),oe=re,ie=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,o){const i={...e};if((null==t?void 0:t.length)&&null!==(null==t?void 0:t[0])){if(i[r]=Array.isArray(i[r])?i[r]:[],-1===i[r].indexOf(o))i[r].push(o);i[r]=i[r].concat(t.filter((e=>-1===i[r].indexOf(e))))}else if(void 0!==o)i[r]=o;return i},t}(0,{}),ae=function(e,t,r,o,i,a,s,n,l,d){"use strict";function u({Component:e,options:t,forwardedRef:o}){if("string"!=typeof e)return(0,r.jsx)(e,{forwardedRef:o,...t});else return(0,r.jsx)(n.default,{forwardedRef:o,templateName:e,templateOptions:t})}Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorBoundary=t.ErrorBoundaryContext=void 0;const c=new s.ErrorController;t.ErrorBoundaryContext=(0,o.createContext)({onError:()=>{}});class h extends o.Component{constructor(e){super(e),this.state={errorViewConfig:void 0,availableWidth:void 0},this.ref=(0,o.createRef)()}render(){var e,t;if(void 0!==this.state.errorViewConfig){null===(t=null===(e=this.context)||void 0===e?void 0:e.onErrorBoundary)||void 0===t||t.call(e);const{template:o,options:i}=this.state.errorViewConfig,a=this.props.onErrorClassName||"tw-contents";if(!this.templateOptions)if(this.templateOptions={...i},this.props.size)this.templateOptions.size=this.props.size;const s={};if(this.props.dataQa)s["data-qa"]=this.props.dataQa;return(0,r.jsx)("div",{className:a,ref:this.ref,...s,children:(0,r.jsx)(u,{forwardedRef:this.props.forwardedRef,Component:o,options:this.templateOptions})})}return this.templateOptions=void 0,this.props.children}componentDidUpdate(e,t,r){var o,i,a,s;if(null!==(null===(o=this.ref)||void 0===o?void 0:o.current)&&void 0===this.state.availableWidth){const e=null===(i=this.ref.current)||void 0===i?void 0:i.parentElement,t=null!==(a=null==e?void 0:e.clientHeight)&&void 0!==a?a:0,r=null!==(s=null==e?void 0:e.clientWidth)&&void 0!==s?s:0;if(r<166||r>=275&&t<180||r>=166&&r<274&&t<132)this.setState((e=>{var t,o;const i={...e};
120return i.availableWidth=r,null===(t=i.errorViewConfig)||void 0===t||delete t.options.action,null===(o=i.errorViewConfig)||void 0===o||delete o.options.image,i}))}}componentDidCatch(e){if(l.Logger.error(`ÐÑибка пÑи ÑендеÑе: ${e.message}`,null,e),this.props.onError)this.props.onError(e);else if(this.context.onError)this.context.onError(e)}reset(){this.setState({errorViewConfig:void 0})}static getDerivedStateFromError(e){const t=new i.HTTPError({message:"",httpError:i.HTTPStatus.InternalServerError,url:""}),r=c.processSync({error:t,mode:a.ErrorViewMode.include});if(r&&!r.options.message)r.options.message=e.message;return{errorViewConfig:r}}}return t.ErrorBoundary=h,h.contextType=(0,d.getWasabyContext)(),t}(0,{},e,t,p,f,C,b,i,o),se=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(t){return new Promise(((t,r)=>{e(["Controls/dataSourceOld"],t,r)})).then((({DataLoader:e})=>(new e).load([t]))).then((e=>e[0])).catch((function(e){requirejs.onError(e)}))},t}(M,{}),ne=se,le=function(e){"use strict";var t=["_viewConfig","_rest","mode","dialog","template","templateName","options","content","_options"];return e.g({v:1,m:"wml!Controls/_dataSource/_error/Container",d:e.d(["Controls/Container/Async"],arguments,1),t:[e.r(((e,t)=>[e.m(t,0)?[e.m(t,1)?[e.C(t,"ws:Controls/Container/Async",{K:"0_0_0_",O:{templateName:e.m(t,1),templateOptions:e.m(t,2)},m:"attribute",c:!0})]:e.m(t,3)?[e.P(t,e.m(t,3),{K:"0_1_0_",O:e.S(t,{},e.m(t,2)),m:"attribute",c:!0,i:0})]:e.t()]:[e.P(t,e.m(t,4),{K:"1_0_",O:e.S(t,{},e.m(t,5)),m:"attribute",c:!0,i:1})]]))],p:t.slice(0,2),e:[(e,r)=>e.g(r,[t[0]])&&e.g(r,[t[0],t[2]])!=t[3]&&(e.g(r,[t[0],t[4]])||e.g(r,[t[0],t[5]])),(e,r)=>e.g(r,[t[0],t[5]]),(e,r)=>e.g(r,[t[0],t[6]])||{},(e,r)=>e.g(r,[t[0],t[4]]),(e,r)=>e.g(r,[t[8],t[7]]),(e,r)=>e.g(r,[t[1]])],i:[[[2]],[[5]]]})}(I,b),de=function(e,t,r,o,i,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CrudWrapper=void 0;class n{constructor(e){if(n._isValidCrudSource(e.source))this._source=e.source;this._errorController=e.errorController||new i.ErrorController({}),this._boundPromiseCatchCallback=this._promiseCatchCallback.bind(this)}create(e){return this._source.create(e).catch(this._boundPromiseCatchCallback)}read(e,t){return this._source.read(e,t).catch(this._boundPromiseCatchCallback)}update(e,t){return this._source.update(e,t).catch(this._boundPromiseCatchCallback)}query(e,t){let o;if(Array.isArray(e)){const t=[];if(e.forEach((e=>{t.push((0,a.default)(e))})),t.length>1)o=t[0].union.apply(t[0],t.slice(1));else o=t[0]}else o=(0,a.default)(e);return this._source.query(o).then((e=>{if(t&&e.getKeyProperty&&t!==e.getKeyProperty())e.setKeyProperty(t);const o=e.getAll?e.getAll():e;if(!(o instanceof r.RecordSet))s.Logger.error("Controls/dataSource:CrudWrapper иÑÑоÑник даннÑÑ
веÑнÑл невалидное знаÑение из меÑода query. РезÑлÑÑаÑом ÑабоÑÑ Ð¼ÐµÑода query должен бÑÑÑ Types/collection:RecordSet.",this);return o}
120)).catch(this._boundPromiseCatchCallback)}destroy(e,t){return this._source.destroy(e,t).catch(this._boundPromiseCatchCallback)}updateOptions(e){if(n._isValidCrudSource(e.source))this._source=e.source}_promiseCatchCallback(e){return Promise.reject(e)}static _isValidCrudSource(e){if(!o.instanceOfModule(e,"Types/_source/ICrud")&&!o.instanceOfMixin(e,"Types/_source/ICrud"))return s.Logger.error("Controls/dataSource:SourceController ÐÑÑоÑник даннÑÑ
должен ÑеализовÑваÑÑ Ð¸Ð½ÑеÑÑÐµÐ¹Ñ Types/source:ICrud.\n ÐодÑобнее можно поÑиÑаÑÑ ÑÑÑ: https://link.sbis.ru/article/wasaby/fd27ab22-bad2-40e2-83b8-367079997115"),!1;else return!0}}return t.CrudWrapper=n,t}(0,{},h,v,C,A,i),ue=de,ce=function(e,t,r,o,i){"use strict";function a(e){return!(null==e?void 0:e.ignoreNavigation)}Object.defineProperty(t,"__esModule",{value:!0});class s{constructor(e){this._props=e}getQuery(){let e={filter:this._props.filter,sorting:this._props.sorting,select:this._props.fields};if(this._props.parentProperty)e=this._prepareHierarchyQueryParams(e);if(this._props.navigationController&&a(this._props.paginationConfig))e=this._preparePaginationQueryParams(e,this._props.navigationController);return this._getQueryInstance(e)}updateQuery(e){var t;const r=this._hasHierarchyRelation()?s.getHierarchyRelation(this._props):void 0;if(this._props.navigationController)null===(t=this._props.navigationController)||void 0===t||t.updateQueryProperties(e,this._props.root,this._props.paginationConfig,this._props.direction,r)}calculatePaginationChanges(e){var t;const r=this._props,o=this._hasHierarchyRelation()?s.getHierarchyRelation(r):void 0;if(r.navigationController){const i=void 0!==r.loadKey?r.loadKey:r.root,a=!r.direction&&!this._isExpandAll()&&this._isQueryForRoot();return null===(t=r.navigationController)||void 0===t?void 0:t.calculateNextQueryProperties(e,i,r.paginationConfig,r.direction,o,a)}}_getQueryInstance(e){let t;if(Array.isArray(e)){const r=e.map((e=>(0,i.default)(e)));if(r.length>1)t=r[0].union.apply(r[0],r.slice(1));else t=r[0]}else t=(0,i.default)(e);return t}_prepareHierarchyQueryParams(e){const{parentProperty:t,loadKey:r,root:o}=this._props,i=void 0!==r?r:o;let a={...e.filter};if(void 0!==i&&t&&!Array.isArray(a[t]))a={...a,[t]:i};return{...e,filter:a}}_preparePaginationQueryParams(e,t){var r;const{expandedItems:o,direction:i,keepPagination:a,paginationConfig:n}=this._props,l=null!==(r=this._props.loadKey)&&void 0!==r?r:this._props.root,d=s.isMultiPagination(n||this._props.pagination)&&(null==o?void 0:o.length)&&!this._isExpandAll()&&(!i||this._props.deepScrollLoad)&&(this._isQueryForRoot()||a||n instanceof Map);let u;if(d&&this._props.parentProperty)u=t.getQueryParamsForHierarchy(e,n,!a,e.filter&&e.filter[this._props.parentProperty],l,i);if(!d||!u||!u.length){const r=!((d&&this._isQueryForRoot()&&!n&&d||a)&&!i);u=t.getQueryParams(e,l,n,i,r)}return u}_isQueryForRoot(){var e;return(null!==(e=this._props.root)&&void 0!==e?e:null)===this._props.loadKey||void 0===this._props.loadKey}_isExpandAll(){return(0,o.default)(this._props.expandedItems)}_hasHierarchyRelation(){var e;return!(!this._props.parentProperty||!s.isMultiPagination(this._props.pagination)&&!(null===(e=this._props.expandedItems)||void 0===e?void 0:e.length))}static isMultiPagination(e){if(null==(t=e)?void 0:t.hasOwnProperty("sourceConfig"))return a(e.sourceConfig)&&!!e.sourceConfig.multiNavigation;else return a(e)&&!!e.multiNavigation;var t}static getHierarchyRelation(e){return new r.relation.Hierarchy({parentProperty:e.parentProperty,nodeProperty:e.nodeProperty,keyProperty:e.keyProperty})}}return t.default=s,t}(0,{},c,j,A),he=function(e,t,r,o,i,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s{constructor(e){this._sourceMethodName=s._getSourceMethodName(e)}getQueryParams(e,t,o,i){const a={};a.meta={navigationType:r.QueryNavigationType.Position};const n=e.getState();a.limit=void 0!==t.limit?t.limit:n.limit;const l=s._resolveField(n.field);let d;switch(o){case"forward":d=n.forwardPosition;break;case"backward":d=n.backwardPosition;break;default:if(d=void 0!==t.position?t.position:n.position,!Array.isArray(d))d=[d]}const u=s._resolveDirection(o,t.direction||n.direction);if("bothways"===u)e.setPosition(d);let c;switch(u){case"forward":c=">=";break;case"backward":c="<=";break;case"bothways":c="~"}const h={};for(let e=0;e<l.length;e++)h[l[e]+c]=d[e];if(a.filter=h,i)i({position:d,limit:a.limit,direction:u});return a}updateQueryProperties(e,t,r,o,i,n=[],l={},d={}){const u=e.getState(),c=s._resolveField(u.field);let h=s._resolveDirection(i,(null==o?void 0:o.direction)||u.direction);if(o&&o.position&&-1===o.position[0])h=s._resolveDirectionForEdge(h,o.position,o);if("boolean"==typeof r)if("bothways"!==h)e.updateMetaMoreToDirection(h,r);else a.Logger.error(this._getErrorMessage('NavigationController: Wrong type of "more" value. Must be Object'));else if(r instanceof Object)if("bothways"===h)e.setMetaMore(r);else a.Logger.error(this._getErrorMessage('NavigationController: Wrong type of "more" value. Must be boolean'));const g=t.getMetaData(),p=void 0!==l.nextPosition?l.nextPosition:g.nextPosition,_=g.iterative;if(e.setIterative(_),u.limit){const r=(null==n?void 0:n.length)||t.getCount();let o;if(i)o=u.limit+r;else o=u.limit>r?Math.max(d.limit||0,r):u.limit;if(o)e.setLimit(o)}if(p)if(p instanceof Array)if("bothways"!==h){if("forward"===h)e.setForwardPosition(p);else if("backward"===h)e.setBackwardPosition(p)}else a.Logger.error(this._getErrorMessage('NavigationController: Wrong type of "nextPosition" value. Must be object'));else if("bothways"===h)if(p.before&&p.before instanceof Array&&p.after&&p.after instanceof Array)e.setBackwardPosition(p.before),e.setForwardPosition(p.after);else if(p.backward&&p.backward instanceof Array&&p.forward&&p.forward instanceof Array)e.setBackwardPosition(p.backward),e.setForwardPosition(p.forward);else a.Logger.error(this._getErrorMessage('QueryParamsController/Position: Wrong type of "nextPosition" value. Must be Object width `before` and `after` properties.Each properties must be Arrays'));else a.Logger.error(this._getErrorMessage('QueryParamsController/Position: Wrong type of "nextPosition" value. Must be Array'));else{let r;const o=void 0!==u.iterative&&_&&_!==u.iterative;if(t.getCount()&&!o){if("forward"!==h)r=n.shift()||t.at(0),e.setBackwardPosition(s._resolvePosition(r,c));if("backward"!==h)r=n.pop()||t.at(t.getCount()-1),e.setForwardPosition(s._resolvePosition(r,c))}else{const r=!t.getCount()&&"bothways"===h,o=e.getMetaMore();if("forward"!==h)e.setBackwardPosition(r&&o.backward?u.position:[null]);if("backward"!==h)e.setForwardPosition(r&&o.forward?u.position:[null])}}return e.getState()}hasMoreData(e,t){let r;const o=e.getMetaMore();if(void 0===o)r=!1;else return o[t];return r}shiftToEdge(e,t,r,o){let i;if("backward"===t)i=[-2];else if("forward"===t)i=[-1];const a=s._resolveDirectionForEdge(t,i,o);return{...o,position:i,direction:a}}updateQueryRange(e,t,r,o){if(!t.getMetaData().nextPosition){const t=e.getState(),i=s._resolveField(t.field),a=t.iterative;if(!a||null!==t.backwardPosition[0])e.setBackwardPosition(s._resolvePosition(r,i));if(!a||null!==t.forwardPosition[0])e.setForwardPosition(s._resolvePosition(o,i))}}destroy(){}getAdditionalMeta(e,t){var r;const o=e.getMetaData().nextPosition;let a;if(o instanceof i.RecordSet&&void 0!==t)a=(null===(r=o.at(o.getIndexByValue("id",t)))||void 0===r?void 0:r.get("nav_result"))||null;else a=o;return{nextPosition:a}}_getErrorMessage(e){return this._sourceMethodName?`ÐеÑод ÐÐ ${this._sourceMethodName}: ${e}`:e}static _getSourceMethodName(e){if(e instanceof r.SbisService)return`${e.getEndpoint().contract}.${e.getBinding().query}`}static _resolveDirection(e,t){let r;if("forward"===e)r="forward";else if("backward"===e)r="backward";else r=o.default.convertDirection(t);return r}static _resolveField(e){return e instanceof Array?e:[e]}static _resolvePosition(e,t){const r=[];for(let o=0;o<t.length;o++)r.push(e.get(t[o]));return r}static _resolveDirectionForEdge(e,t,r){let o;if("forward"===e&&-1===t[0])o="backward";else if("backward"===e&&-2===t[0])o="forward";else o=e;return o}}return t.default=s,t}(0,{},n,q,h,i),ge=function(e,t,r){"use strict";
120return Object.defineProperty(t,"__esModule",{value:!0}),t.calculateBreadcrumbsData=void 0,t.calculateBreadcrumbsData=function(e,t){const{backButtonCaption:o,path:i,pathWithoutItemForBackButton:a}=(0,r.default)(e,t);return{breadCrumbsItems:i,backButtonCaption:o,breadCrumbsItemsWithoutBackButton:a}},t}(0,{},W),pe=ge,_e=function(e,t,r,o,i,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends r.Control{constructor(){super(...arguments),this._popupHelper=new a.Popup,this._template=o}_beforeMount({viewConfig:e,...t}){this._rest=t,this._updateConfig(e)}_beforeUpdate({viewConfig:e,...t}){var r;if(this._rest=t,!(0,s.isEqual)(this._options.viewConfig,e))if(this._updateConfig(e),this._openDialog(this._viewConfig),(null===(r=this._viewConfig)||void 0===r?void 0:r.mode)===a.ErrorViewMode.inlist)this._updateInlistOptions(t)}_afterMount(){this._openDialog(this._viewConfig)}_onDialogClosed(){this._notify("dialogClosed",[]),this._popupId=null}_openDialog(e){if((null==e?void 0:e.mode)===a.ErrorViewMode.dialog&&i.constants.isBrowserPlatform)return this._popupHelper.openDialog(e,{id:this._popupId,opener:this,modal:!0===this._options.isModalDialog,eventHandlers:{onClose:()=>this._onDialogClosed()}}).then((e=>{if(e)this._popupId=e}))}_updateConfig(e){if(e)this._viewConfig={...e,isShown:e.isShown||e.mode!==a.ErrorViewMode.dialog,templateName:"string"==typeof e.template?e.template:void 0};else this._viewConfig=null}_updateInlistOptions(e){this._viewConfig.options={...this._viewConfig.options},this._viewConfig.options.listOptions=e}}return t.default=n,t}(0,{},a,le,y,C,u),fe=function(e,t,r,o){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.getRecordSetByHierarchyStrategy=void 0,t.getRecordSetByHierarchyStrategy=function(e,t,i,a){return(e?r.default:o.default)(e,t,i,a)},t}(0,{},Q,F),ye=function(e,t,r,o,i,a,s,n,l,d,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class c{static resolve(e,t){if(e&&e in this.factorySource)return new this.factorySource[e](t);o.Logger.error('NavigationController: Undefined navigation source type "'+e+'"')}}c.factorySource={page:i.default,position:s.default};class h{constructor(e){if(this._navigationType=e.navigationType,this._navigationConfig=e.navigationConfig,this._source=e.source,this.setNavigationParamsChangedCallback(e.navigationParamsChangedCallback),this._navigationType)this._navigationStores=new r.List;else o.Logger.error("NavigationController: navigationType option is undefined")}getQueryParams(e,t=null,r,o,i=!0){const a=this._getCalculator(),s=this._getNavigationQueryConfig(r,i),n=h._getMainQueryParams(e),l=this._getStore(t),d=a.getQueryParams(l,s,o,this._navigationParamsChangedCallback,i);return h._mergeParams(n,d)}getQueryParamsForHierarchy(e,t,r=!0,o=[],i,a){var s;const n=this._getCalculator(),l=this._getNavigationQueryConfig(t,r),d=h._getMainQueryParams(e),c=[],g=e=>{const t=e.store;if(!o||!o.length||-1!==u.invertTypeIndexOf(o,e.id)){const o=l instanceof Map?l.get(e.id):l;let s,d=r;if(e.id===i&&a)s=a,d=!1;c.push({id:e.id,addParams:n.getQueryParams(t,o,s,this._navigationParamsChangedCallback,d)})}};if(null===(s=this._navigationStores)||void 0===s||s.each((e=>{g(e)})),o&&o.length)o.forEach((e=>{if(!this.hasLoaded(e))g({store:this._getStore(e),id:e})}));if(void 0!==i)c.sort((e=>e.id===i?1:0));return h._mergeParamsHierarchical(d,c)}_getNextNavigationItems(e,t=null,o){const i=e.getMetaData().more,a=[],s=this._getCalculator();if(i instanceof r.RecordSet)i.each((t=>{const r=t.get("id");a.push({storeId:r,store:this._getStore(r).clone(),metaMore:t.get("nav_result"),listForCurrentStore:null==o?void 0:o.getChildren(r,e),additionalMeta:s.getAdditionalMeta(e,r)})}));else a.push({storeId:t,store:this._getStore(t).clone(),metaMore:i});return a}_updateNavigationItems(e,t,r,o){const i=this._getCalculator();return e.map((({metaMore:e,listForCurrentStore:a,additionalMeta:s,store:n})=>i.updateQueryProperties(n,t,e,o,r,a,s,this._navigationConfig)))}applyChanges(e){if(!e)return;const{navigationItems:t,resetNavigation:r}=e;if(t.forEach((({store:e,storeId:t})=>this._setStore(t,e))),r)this._deleteUnprocessedStores(t.map((({storeId:e})=>e)))}calculateNextQueryProperties(e,t=null,r,o,i,a=!0){const s=this._getNextNavigationItems(e,t,i);return{navigationItems:s,updateResult:this._updateNavigationItems(s,e,o,r),resetNavigation:a}}updateQueryProperties(e,t=null,r,o,i,a=!0){const s=this.calculateNextQueryProperties(e,t,r,o,i,a);return this.applyChanges(s),s.updateResult}updateQueryRange(e,t=null,r,o){const i=this._getCalculator(),a=this._getStore(t);i.updateQueryRange(a,e,r,o)}shiftToEdge(e,t=null,r){const o=this._getCalculator(),i=this._getStore(t);return o.shiftToEdge(i,e,r,this._navigationConfig)}hasMoreData(e,t=null){let r=!1;if(this.hasLoaded(t)){const o=this._getStore(t);r=this._getCalculator().hasMoreData(o,e)}return r}hasLoaded(e){var t;return-1!==(null===(t=this._navigationStores)||void 0===t?void 0:t.getIndexByValue("id",e))}reset(e){if(!this._navigationStores)return;const t=this._navigationStores.getIndexByValue("id",e);if(-1!==t)this._navigationStores.removeAt(t)}updateOptions(e){var t,o,i;if(e.source!==this._source)this._source=e.source,null===(t=this._paramsCalculator)||void 0===t||t.destroy(),this._paramsCalculator=void 0;if(e.navigationType!==this._navigationType||!(0,d.isEqual)(e.navigationConfig,this._navigationConfig))null===(o=this._navigationStores)||void 0===o||o.each((e=>{e.store.destroy()})),this._navigationStores=new r.List,null===(i=this._paramsCalculator)||void 0===i||i.destroy(),this._paramsCalculator=void 0,this._navigationType=e.navigationType,this._navigationConfig=e.navigationConfig;this.setNavigationParamsChangedCallback(e.navigationParamsChangedCallback)}setNavigationParamsChangedCallback(e){this._navigationParamsChangedCallback=e}_deleteUnprocessedStores(e){var t;const r=[];null===(t=this._navigationStores)||void 0===t||t.forEach((({id:t})=>{if(-1===u.invertTypeIndexOf(e,t))r.push(t)})),r.forEach((e=>{var t;null===(t=this._navigationStores)||void 0===t||t.removeAt(this._navigationStores.getIndexByValue("id",e))}))}_getStore(e){var t,r;const o=this._navigationStores.getIndexByValue("id",e);let i=null===(t=this._navigationStores)||void 0===t?void 0:t.at(o);if(!i)i={id:e,store:c.resolve(this._navigationType,this._navigationConfig)},null===(r=this._navigationStores)||void 0===r||r.add(i);return i.store}_setStore(e,t){var r,o;const i=null===(r=this._navigationStores)||void 0===r?void 0:r.getIndexByValue("id",e);null===(o=this._navigationStores)||void 0===o||o.replace({id:e,store:t},i)}_getCalculator(){if(!this._paramsCalculator){let e;switch(this._navigationType){case"page":e=a.default;break;case"position":e=n.default}this._paramsCalculator=new e(this._source)}return this._paramsCalculator}_getNavigationQueryConfig(e,t){if(e)return e;else if(t)return this._navigationConfig;else return{}}destroy(){var e;this._navigationStores.each((e=>{e.store.destroy()})),this._navigationStores=void 0,null===(e=this._paramsCalculator)||void 0===e||e.destroy(),this._paramsCalculator=null,this._navigationType=void 0,this._navigationConfig=void 0}
120static _mergeParams(e,t){const r=e;if(r.limit=t.limit,r.offset=t.offset,t.filter){r.filter={...r.filter};const e=t.filter;for(const t in e)if(e.hasOwnProperty(t))r.filter[t]=e[t]}if(t.meta)r.meta=t.meta;return r}static _mergeParamsHierarchical(e,t){const r=[];return t.forEach((t=>{const o=h._mergeParams({...e},t.addParams);o.filter={...o.filter},o.filter.__root=new l.applied.PrimaryKey(t.id),r.push(o)})),r}static _getMainQueryParams(e){return{filter:e.filter||{},sorting:e.sorting,select:e.select,limit:void 0,offset:void 0}}}return t.default=h,t}(0,{},h,i,K,H,q,he,c,u,P),me=ye,ve=function(e){"use strict";var t=["_errorViewConfig","_sources","content","_options"];return e.g({v:1,m:"wml!Controls/_dataSource/_error/DataLoader",d:e.d(["Controls/_dataSource/_error/Container"],arguments,1),t:[e.c(((e,t)=>[e.P(t,e.m(t,1),{K:"0_0_0_",O:e.s(t,{sources:e.m(t,2)},e.m(t,3)),g:!0,m:"attribute",i:0})])),e.r(((e,t)=>[e.C(t,"ws:Controls/_dataSource/_error/Container",{K:"0_",O:{esc:!1,viewConfig:e.m(t,0),content:e.o(t,0,1)},m:"attribute",c:!0})]))],p:t.slice(0,2),e:[(e,r)=>e.g(r,[t[0]]),(e,r)=>e.g(r,[t[3],t[2]]),(e,r)=>e.g(r,[t[1]]),(e,r)=>e.g(r,[t[3]])],i:[[[3]],[[1,3]]]})}(I,_e),Ce=function(e,t,r,o,i,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends r.Control{constructor(){super(...arguments),this._template=i,this._errorController=new o.ErrorController({})}_beforeMount({sources:e,errorHandlingEnabled:t,requestTimeout:r},o,i){if(i)this._sources=e,this._errorViewConfig=i.errorViewConfig;else if(e){const o=s.loadSync(e,r);if(o.length===Object.keys(e).length)return this._sources=o,{errorViewConfig:null};else return s.load(e,r).then((({sources:e,errors:r})=>{const o=r.length;if(o===e.length||t&&0!==o)return this._getErrorViewConfig(r[0]).then((e=>(this._errorViewConfig=e,{errorViewConfig:e})));else return this._sources=e,{errorViewConfig:null}}))}}_getErrorViewConfig(e){return this._getErrorController().process({error:e,theme:this._options.theme,mode:o.ErrorViewMode.include})}_getErrorController(){return this._options.errorController||this._errorController}static loadSync(e,t){let r=[];const o=Array.isArray(e)?e:Object.values(e);if(!o.some((e=>{if(e.sourceController&&e.sourceController.getLoadError())return!0})))r=o.map((e=>s._createSourceConfig(e)));return r}static load(t,r){const o=[],i=[];return new Promise(((t,r)=>{e(["Controls/dataSourceOld"],t,r)})).then((({DataLoader:e})=>(new e).load(t,r))).then((e=>(e.forEach(((e,t)=>{if(e.error)i.push(e.error);o[t]=s._createSourceConfig(e)})),{sources:o,errors:i}))).catch((function(e){requirejs.onError(e)}))}static _createSourceConfig(e){const t={...e};return t.source=new a.PrefetchProxy({target:e.source instanceof a.PrefetchProxy?e.source.getOriginal():e.source,data:{query:e.data}}),t}static getDefaultOptions(){return{errorHandlingEnabled:!0,requestTimeout:5e3}}}return t.default=s,t}(M,{},a,C,ve,n),Pe=function(e,t,r,o,i,a){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorBoundaryContext=t.ErrorBoundary=t.DataLoader=t.Container=t.process=t.Popup=t.Mode=t.Controller=void 0,Object.defineProperty(t,"Controller",{enumerable:!0,get:function(){return r.ErrorController}}),Object.defineProperty(t,"Mode",{enumerable:!0,get:function(){return r.ErrorViewMode}}),Object.defineProperty(t,"Popup",{enumerable:!0,get:function(){return r.Popup}}),Object.defineProperty(t,"process",{enumerable:!0,get:function(){return r.process}}),Object.defineProperty(t,"Container",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"DataLoader",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"ErrorBoundary",{enumerable:!0,get:function(){return a.ErrorBoundary}}),Object.defineProperty(t,"ErrorBoundaryContext",{enumerable:!0,get:function(){return a.ErrorBoundaryContext}}),t}(0,{},C,_e,Ce,ae),be=Pe,Se=function(e,t,r,o,i,a,s,n,l,d,u,c,h,g,p){"use strict";function _(e){return e?f[e]:void 0}var f;Object.defineProperty(t,"__esModule",{value:!0}),t.NAVIGATION_DIRECTION_COMPATIBILITY=void 0,function(e){e.up="backward",e.down="forward",e.backward="backward",e.forward="forward",e.bothways="bothways"}(f||(t.NAVIGATION_DIRECTION_COMPATIBILITY=f={}));class y extends((0,a.mixin)(i.ObservableMixin)){constructor(e){if(super(),this.updateProps(e),e.items)this._items=e.items,this.updateQuery(e.items,{loadKey:this._root})}load(e,t,r){const o="boolean"==typeof e?{keepPagination:e}:{paginationConfig:e};return this._load({...o,...r,updatePaginationAfterLoad:t})}cancelLoading(){if(this._queryPromise)this._queryPromise.cancel(),this._queryPromise=void 0}isLoading(){return!!this._queryPromise}prev(e=this._root,t,r){return this._load({direction:"backward",loadKey:e,updatePaginationAfterLoad:t,...r})}next(e=this._root,t,r){return this._load({direction:"forward",loadKey:e,updatePaginationAfterLoad:t,...r})}changeRoot(e){return this._load({loadKey:e,root:e}).finally((()=>{this._root=e}))}
120expand(e,t){return this._load({loadKey:e,updatePaginationAfterLoad:t})}isExpandAll(){return(0,h.default)(this._props.expandedItems)}updateProps(e){var t;const r=e.pagination;if(r&&this._hasPaginationBySource(r)){if(this._navigationController)this._navigationController.updateOptions(this._getNavigationControllerProps(e))}else this._destroyNavigationController();this._props={...e},this._root=null!==(t=e.root)&&void 0!==t?t:null}getKeyProperty(){const{keyProperty:e}=this._props,t=(0,c.default)(this._props.source);if(e)return e;else if(function(e){return Boolean(e&&void 0!==e.getKeyProperty)}(t))return t.getKeyProperty();else if(this._items)return this._items.getKeyProperty()}setItems(e,t){if(this._hasPaginationBySource()&&e&&(!(null==t?void 0:t.keepPagination)||t.paginationConfig))this._destroyNavigationController(),this.updateQuery(e,{loadKey:this._root,...t});this._items=e}getItems(){return this._items}hasMoreData(e="forward",t=this._root){let r=!1;if(this._hasPaginationBySource())r=this._getNavigationController().hasMoreData(_(e),t);return r}hasLoaded(e){var t;let r=!1;const o=this._props,{hasChildrenProperty:i}=o,a=this._items;if(!a)return!1;if(this._hasPaginationBySource())r=this._getNavigationController().hasLoaded(e);else if(o.parentProperty){const t=(0,u.getRecordSetByHierarchyStrategy)(o.childrenProperty,this._root,a,e);r=Boolean(a&&s.default.getHierarchyRelation(o).getChildren(e,t).length)}if(!r&&i)r=!(null===(t=a.getRecordById(e))||void 0===t?void 0:t.get(i));return r}resetPagination(e){if(void 0!==e&&this._navigationController)this._getNavigationController().reset(e);else this._destroyNavigationController()}updatePaginationRange(e,t){var r;if((null===(r=this._items)||void 0===r?void 0:r.getCount())&&this._hasPaginationBySource())this._getNavigationController().updateQueryRange(this._items,this._root,e,t)}updateQuery(e,{root:t,...r}){if(this._hasPaginationBySource()){const o=void 0!==t?t:this._root;this.applyPaginationChanges(this.calculatePaginationChanges(e,{root:o,loadKey:void 0!==r.loadKey?r.loadKey:o,...r,direction:_(r.direction)}))}}shiftToEdge(e,t,r){if(this._hasPaginationBySource())return this._getNavigationController().shiftToEdge(_(e),t,r)}setPaginationParamsChangedCallback(e){if(this._hasPaginationBySource()&&e)this._props.paginationParamsChangedCallback=e,this._getNavigationController().setNavigationParamsChangedCallback(e)}calculatePaginationChanges(e,t){const{direction:r,keepPagination:o,root:i,loadKey:a}=t,{pagination:n,expandedItems:l}=this._props,d=i===a||void 0===a,u=!r&&d&&!o,c=!s.default.isMultiPagination(n)||d&&!o,g=!!(null==l?void 0:l.length);if(u&&(c||!g||(0,h.default)(l)))this._destroyNavigationController();return this._getQueryBuilder(t,this._getNavigationController()).calculatePaginationChanges(e)}applyPaginationChanges(e){if(!e)return;this._getNavigationController().applyChanges(e)}destroy(){this._destroyNavigationController(),this.cancelLoading(),this._items=void 0}__getRoot(){return this._root}_getQuery(e){let t;if(this._hasPaginationBySource())if(this._getQueryRoot(e)===this._root)t=this._getNavigationController();else t=this._createNavigationController();return this._getQueryBuilder(e,t).getQuery()}_getQueryBuilder(e,t){return new s.default({...this._props,...e,root:this._getQueryRoot(e),navigationController:t,direction:_(null==e?void 0:e.direction)})}_getNavigationController(){return this._navigationController||(this._navigationController=this._createNavigationController())}_createNavigationController(e=this._props){return new n.default(this._getNavigationControllerProps(e))}_getNavigationControllerProps(e){const t=e.pagination;if(!t.source)throw new Error("ÐеобÑ
одимо наÑÑÑоиÑÑ Ñип навигаÑии");return{navigationType:t.source,navigationConfig:t.sourceConfig,source:(0,c.default)(e.source),navigationParamsChangedCallback:e.paginationParamsChangedCallback||this._props.paginationParamsChangedCallback}}_destroyNavigationController(){if(this._navigationController)this._navigationController.destroy(),this._navigationController=void 0}_load(e){return this.cancelLoading(),this._dataLoadStarted(e),(this._queryPromise=new i.CancelablePromise(this._query(e))).promise.then((t=>{if(this._queryPromise=void 0,t instanceof r.RecordSet){if(!this._items)this._items=t;if(!1!==e.updatePaginationAfterLoad)this.updateQuery(t,e)}else d.Logger.error("Controls/DataSet иÑÑоÑник даннÑÑ
должен возвÑаÑаÑÑ Types/collection:RecordSet.");return t})).catch((t=>{if(this._queryPromise=void 0,!e.direction&&!t.isCanceled)this._destroyNavigationController();if(null==t?void 0:t.isCanceled)this._dataLoadCancel(t);else if(t)this._notify("dataLoadError",t,e.direction,e.loadKey);return Promise.reject(t)}))}async _query(e){const t=await this._getSource(_(null==e?void 0:e.direction)),r
120=this._getQuery(e),i=new o.ServicePoolCallHandler,a=t instanceof o.Rpc&&t&&(null==e?void 0:e.useServicePool),s=e=>{if(a)t.callHandlers.remove(i);return this._queryResult(e)};let n;if(a)t.callHandlers.add(i);if(this._props.loadDataTimeout)n=this._wrapQuery(t,r).catch((e=>{return Promise.reject((t=e)instanceof Error?t:new p.fetch.Errors.HTTP({httpError:p.HTTPStatus.GatewayTimeout,message:"",url:""}));var t})).then((e=>s(e)));else n=t.query(r).then((e=>s(e)));return n}_wrapQuery(e,t){return(0,g.wrapTimeout)(e.query(t),this._props.loadDataTimeout)}_queryResult(e){var t,r;const o=this.getKeyProperty();if(o&&o!==(null===(t=e.getKeyProperty)||void 0===t?void 0:t.call(e)))e.setKeyProperty(o);return(null===(r=e.getAll)||void 0===r?void 0:r.call(e))||e}_getSource(e){const{source:t,sourceType:r,sourceOptions:o}=this._props;if(t){const r=e?(0,c.default)(t):t;return Promise.resolve(r)}else if(r)return(0,l.loadAsync)(r).then((e=>new e(o||{})));else throw new Error("Controls/DataSet ÑкажиÑе иÑÑоÑник даннÑÑ
")}_hasPaginationBySource(e=this._props.pagination){return Boolean(e&&e.source&&e.sourceConfig)}_getQueryRoot(e){return void 0!==(null==e?void 0:e.root)?e.root:this._root}_dataLoadStarted(e){if(void 0===(null==e?void 0:e.loadKey)||e.loadKey===this._root)this._notify("dataLoadStarted",null==e?void 0:e.direction)}_itemsChanged(e,t){const{loadKey:r,direction:o}=t||{},i=void 0!==r?r:this._getQueryRoot(t);this._notify("itemsChanged",e,i,o)}_dataLoad(e,t){var r;if((null!==(r=null==t?void 0:t.loadKey)&&void 0!==r?r:this._getQueryRoot(t))===this._root)return this._notify("dataLoad",e,null==t?void 0:t.direction,null==t?void 0:t.paginationConfig)}_dataLoadCancel(e){this._notify("dataLoadCancel",e)}}return t.default=y,t}(0,{},h,n,c,s,ce,ye,r,i,fe,x,j,d,E),Ie=Se,Ee=function(e,t,r,o,i,a){"use strict";function s(e,t){return e.getCount()>0||0===t.getCount()}var n;Object.defineProperty(t,"__esModule",{value:!0}),t.calculateAddItemsChanges=t.RecordSetDiffer=t.RecordSetChangeType=void 0,function(e){e.MERGE_META_DATA="mergeMetaData",e.SET_META_DATA="setMetaData",e.PREPEND_ITEMS="prependItems",e.APPEND_ITEMS="appendItems",e.MERGE_ITEMS="mergeItems",e.ASSIGN_ITEMS="assignItems",e.REPLACE_ITEMS="replaceItems",e.REMOVE_ITEMS="removeItems"}(n||(t.RecordSetChangeType=n={}));class l{constructor(e){this._sideEffects={...e}}applyChanges(e){var t,r;for(const{type:o,params:i}of e)this[o](...i),null===(r=(t=this._sideEffects)[o])||void 0===r||r.call(t,...i)}[n.MERGE_META_DATA](e,t){e.setMetaData((0,r.merge)(e.getMetaData(),t))}[n.SET_META_DATA](e,t){e.setMetaData(t)}[n.PREPEND_ITEMS](e,t,r,o,a){(0,i.getRecordSetByHierarchyStrategy)(e,t,r,a).prepend(o)}[n.APPEND_ITEMS](e,t,r,o,a){(0,i.getRecordSetByHierarchyStrategy)(e,t,r,a).append(o)}[n.MERGE_ITEMS](e,t,r,o,a,s={remove:!1,inject:!0}){(0,i.getRecordSetByHierarchyStrategy)(e,t,r,a).merge(o,s)}[n.ASSIGN_ITEMS](e,t){e.assign(t)}[n.REPLACE_ITEMS](e,t){}[n.REMOVE_ITEMS](e,t,r){e.removeAt(t)}}return t.RecordSetDiffer=l,t.calculateAddItemsChanges=function(e,t,r,i=null,l=null,d,u){const c=[],h=null==t?void 0:t.getMetaData(),g=function(e,t){const r=null==e?void 0:e.mergeStrategy;if(r)return r;if(!t)return"inject";else return}(h,u),p=r&&a.NAVIGATION_DIRECTION_COMPATIBILITY[r];if(e&&i===l&&t)c.push({type:"forward"===p||"backward"===p?n.MERGE_META_DATA:n.SET_META_DATA,params:[e,h]});if("backward"===p){if(s(t,e))if(g){const r={add:!1,prepend:!0,remove:!1,[g]:!0};c.push({type:n.MERGE_ITEMS,params:[d,l,e,t,i,r]})}else c.push({type:n.PREPEND_ITEMS,params:[d,l,e,t,i]})}else if("forward"===p&&e){if(s(t,e))if(g){const r={remove:!1,[g]:!0};c.push({type:n.MERGE_ITEMS,params:[d,l,e,t,i,r]})}else c.push({type:n.APPEND_ITEMS,params:[d,l,e,t,i]})}else if(!r&&i!==l&&e)c.push({type:n.MERGE_ITEMS,params:[d,l,e,t,i]});else if(e&&(0,o.isEqualItems)(e,t))c.push({type:n.ASSIGN_ITEMS,params:[e,t]});else c.push({type:n.REPLACE_ITEMS,params:[e,t]});return c},t}(0,{},u,ee,fe,Se),we=Ee,Me=function(e,t,r,o,i,a,s,n,l,d,u,c,h,g,p,_,f,y,m,v,C){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SORTING_USER_PARAM_POSTFIX=void 0,t.SORTING_USER_PARAM_POSTFIX="-sorting";
120const P=["groupProperty","sorting","nodeProperty","nodeTypeProperty","dataLoadCallback"];class b extends((0,d.mixin)(a.ObservableMixin)){constructor(e){super(),this._processCollectionChangeEvent=!0,this._root=null,this._expandedItems=[],a.EventRaisingMixin.initMixin(this);const t={...e},{root:i,sorting:s,dataLoadCallback:n,error:l,expandedItems:d,groupHistoryId:u,items:c,filter:h,navigation:g,collapsedGroups:p,parentProperty:_,selectedKeys:f,excludedKeys:y}=t;if(this._initRecordSetDiffer(),this._dragRandomId=o(),this._options=(0,r.default)(t),this._setFilter(h||{}),this._setNavigation(g),void 0!==i)this._setRoot(i);if(void 0!==s)this._setSorting(s);if(void 0!==n)this._setDataLoadCallbackFromOptions(n);if(void 0!==d)this.setExpandedItems(d);if(u)this._restoreCollapsedGroups(u,p);if(void 0!==_)this.setParentProperty(_);if(c)this.setItems(c);if(l instanceof Error)this._loadError=l}_initRecordSetDiffer(){const e=()=>{this.__setItems(this._items)};this._recordSetDiffer=new h.RecordSetDiffer({replaceItems:(t,r)=>{var o;this._subscribeItemsCollectionChangeEvent(r),this._items=r,null===(o=this._dataSet)||void 0===o||o.setItems(r),e()},assignItems:()=>{e()}})}load(e,t=this._root,r=void 0,o=!0,i,a,s){return this._load({direction:e,key:t,filter:r,addItemsAfterLoad:o,navigationSourceConfig:i,keepNavigation:a,useServicePool:s})}reload(e,t,r,o){const i=!1!==r;return this._load({key:this._root,navigationSourceConfig:e,isFirstLoad:t,addItemsAfterLoad:i,keepNavigation:o})}reloadItem(e,t={}){var r;const o=this.getItems(),a=this.getKeyProperty();let l,d;const u=()=>a?o.getIndexByValue(a,e):-1,c=e=>{const r=u();if(-1!==r)if(t.replace)o.replace(e,r);else o.at(r).merge(e)};if(-1===u())throw new Error("BaseControl::reloadItem no item with key "+e);if("query"===t.method){const t={...this.getFilter(),[a]:[e]};let o;if(null===(r=this._options.navigation)||void 0===r?void 0:r.sourceConfig)o={...this._options.navigation.sourceConfig,multiNavigation:!1};l=this.executeLoad({filter:t,navigationSourceConfig:o,addItemsAfterLoad:!1}).then((t=>{if(t instanceof i.RecordSet)if(d=t.getCount(),1===d)this._loadFinished(t,this._root),c(t.at(0));else if(d>1)s.Logger.error("Controls/dataSource:Controller reloadItem::query returns wrong amount of items for reloadItem call with key: "+e);else s.Logger.info("Controls/dataSource:Controller: reloadItem::query returns empty recordSet.");return t})),this._addFinallyToLoadPromise(l)}else l=this.read(e,t.readMeta).then((e=>{if(e)c(e);else s.Logger.info("Controls/dataSource:Controller: reloadItem::read do not returns record.");return e}));return this._reloadItemPromise=l,l.finally((()=>{if(l===this._reloadItemPromise)this._reloadItemPromise=void 0})),l.catch((e=>((0,n.process)({error:e}),Promise.reject(e))))}read(e,t){return this._callSourceMethod("read",e,e,t)}update(e){return this._callSourceMethod("update",e.getKey(),e)}create(e){return this._callSourceMethod("create",void 0,e)}setItems(e,t){return this._getDataSet().setItems(e,{keepPagination:t}),this._addItems(e,this._root),this._items}setItemsAfterLoad(e,t,r,o){return this._getDataSet().updateQuery(e,{direction:p.NAVIGATION_DIRECTION_COMPATIBILITY[o],paginationConfig:t,keepPagination:r,root:this._root}),this._processQueryResult(e,{key:this._root,navigationSourceConfig:t,keepNavigation:r,direction:o})}prependItems(e,t=this._root){return this._getDataSet().updateQuery(e,{root:this._root,loadKey:t,direction:"backward"}),this._addItems(e,t,"up"),this._items}appendItems(e,t=this._root){return this._getDataSet().updateQuery(e,{root:this._root,loadKey:t,direction:"forward"}),this._addItems(e,t,"down"),this._items}getItems(){return this._items}getKeyProperty(){return this._getDataSet().getKeyProperty()}getParentProperty(){return this._parentProperty}getLoadError(){return this._loadError}setLoadError(e,t,r){if(!e.isCanceled&&!e.canceled&&!e.isForbiddenRPCJSON)this._processQueryError(e,t,r);else this._notify("dataLoadCancel",e,this._options.id)}setFilter(e){if(!(0,l.isEqual)(e,this._filter))this._notify("filterChanged",e,this._options.id);return this._setFilter(e)}getFilter(){return this._filter}getSorting(){return this._sorting}setNavigation(e){if(this._navigation!==e)this._setNavigation(e),this._notify("navigationChanged",this._navigation)}_setNavigation(e){this._navigation=e}getNavigation(){return this._navigation}setSource(e){this._options.source=e}setRoot(e,t){if(e!==this.getRoot()){if(!t||!this._options.task1183145150)this._setRoot(e);
120if(t&&!this._options.task1183145150)this.setExpandedItems([]),this.reload().catch((e=>e));this._notify("rootChanged",e,this._options.id)}}setSorting(e){const t=this.getSorting(),{propStorageId:r}=this._options;if(!(0,l.isEqual)(e,t)){if(this._setSorting(e),r)(0,f.setSettings)({"list-sorting":JSON.stringify(e)},void 0,r+"-listParams",!0);this._notify("sortingChanged",e)}}getRoot(){return this._root}setParentProperty(e){var t;if(this._parentProperty=e,null===(t=this._hierarchyRelation)||void 0===t||t.setParentProperty(e),this._dataSet)this._dataSet.updateProps(this._getDataSetProps())}updateOptions(e){if(this._destroyed)return!1;const t=this._isOptionChanged("filter",e),o=e.source!==this._options.source,i=!(0,l.isEqual)(e.navigation,this._options.navigation),a=this._isOptionChanged("root",e),s=this._isOptionChanged("sorting",e),n=this._isOptionChanged("expandedItems",e),d=void 0!==e.dataLoadCallback&&e.dataLoadCallback!==this._options.dataLoadCallback;if(i)this.setNavigation(e.navigation);if(t)this.setFilter(e.filter);if(void 0!==e.parentProperty&&e.parentProperty!==this._options.parentProperty)this.setParentProperty(e.parentProperty);if(a&&void 0!==e.root)this.setRoot(e.root);if(s)this.setSorting(e.sorting);if(d)this._setDataLoadCallbackFromOptions(e.dataLoadCallback);if(void 0!==e.expandedItems&&n)this.setExpandedItems(e.expandedItems);if(e.groupHistoryId!==this._options.groupHistoryId)this._restoreCollapsedGroups(e.groupHistoryId,e.collapsedGroups);const u=t||i||o||s||this._parentProperty&&a,c=e.deepReload&&!a;if(u&&!(n||c||this.isExpandAll()))this.setExpandedItems([]);if(e.navigationParamsChangedCallback!==this._options.navigationParamsChangedCallback)this._getDataSet().setPaginationParamsChangedCallback(e.navigationParamsChangedCallback);return this._options=(0,r.default)(e),!!u}getState(){const e=(0,y.default)(this._options.source),t={keyProperty:this.getKeyProperty(),source:e,filter:this._filter,navigation:this._navigation,selectFields:this._options.selectFields,hasChildrenProperty:this._options.hasChildrenProperty,displayProperty:this._options.displayProperty,nodeProperty:this._options.nodeProperty,parentProperty:this._parentProperty,root:this._root,deepReload:this._options.deepReload,items:this._items,breadCrumbsItems:this._breadCrumbsItems,backButtonCaption:this._backButtonCaption,breadCrumbsItemsWithoutBackButton:this._breadCrumbsItemsWithoutBackButton,dragControlId:this._dragRandomId,sourceController:this,expandedItems:this._options.hasOwnProperty("expandedItems")?this._expandedItems:void 0,selectedKeys:this._options.selectedKeys,excludedKeys:this._options.excludedKeys};return P.forEach((e=>{t[e]=this._options[e]})),t}getCollapsedGroups(){return this._collapsedGroups}setExpandedItems(e){this._expandedItems=e}setSelectedKeys(e){this._selectedKeys=e}setExludedKeys(e){this._excludedKeys=e}resetCollapsedNodes(e){const t=this._expandedItems,r=this._items,o=this._parentProperty,i=t instanceof Array&&t.length,a=e instanceof Array&&e.length,s=[];if(r&&i&&(!a||null!==e[0]))if(t.forEach((t=>{if(!a||!e.includes(t))s.push(t)}
120)),s.length)r.setEventRaising(!1,!0),s.forEach((e=>{this.resetNavigation(e),function(e,t,r){const o=t.getIndicesByValue(r,e),i=[];o.forEach((e=>{i.push(t.at(e))})),i.forEach((e=>{t.remove(e)}))}(e,r,o)})),r.setEventRaising(!0,!0)}updateExpandedItemsInUserStorage(){const e=(0,C.default)(this._expandedItems,this.getItems(),this._options);c.nodeHistoryUtil.store(e,this._options.nodeHistoryId)}getExpandedItems(){return this._expandedItems}hasMoreData(e,t=this._root){return this._getDataSet().hasMoreData(p.NAVIGATION_DIRECTION_COMPATIBILITY[e],t)}getDataLoadCallback(){return this._dataLoadCallback}setDataLoadCallback(e){this._dataLoadCallback=e}setNodeLoadCallback(e){this._nodeLoadCallback=e}setNodeDataMoreLoadCallback(e){this._nodeDataMoreLoadCallback=e}resetNavigation(e){this._getDataSet().resetPagination(e)}hasLoaded(e){return this._getDataSet().hasLoaded(e)}isLoading(){return!!this._loadPromise}shiftToEdge(e,t,r){return this._getDataSet().shiftToEdge(p.NAVIGATION_DIRECTION_COMPATIBILITY[e],t,r)}cancelLoading(){if(this._dataSet)this._dataSet.cancelLoading();if(this._loadPromise)this._loadPromise.cancel(),this._loadPromise=void 0;if(this._prepareFilterPromise)this._prepareFilterPromise.cancel(),this._prepareFilterPromise=void 0}getOptions(){return this._options}isExpandAll(){return(0,m.default)(this.getExpandedItems())}getSource(){return this._options.source}destroy(){this.cancelLoading(),this._unsubscribeItemsCollectionChangeEvent(),this._unsubscribeBreadcrumbsChange(),this._destroyDataSet(),this._dataLoadCallback=void 0,this._dataLoadCallbackFromOptions=void 0,this._destroyed=!0,this._options={}}_setRoot(e){this._root=e}_setFilter(e){return this._filter=e}_setSorting(e){if(Array.isArray(e))this._sorting=e.slice();else if(e instanceof Object)this._sorting={...e};else this._sorting=e}applyNavigationChanges(...e){this._getDataSet().applyPaginationChanges(...e)}calculateNavigationChanges(e,t){const{key:r,navigationSourceConfig:o,direction:i,keepNavigation:a}=t;return this._getDataSet().calculatePaginationChanges(e,{direction:p.NAVIGATION_DIRECTION_COMPATIBILITY[i],keepPagination:a,loadKey:r,paginationConfig:o})}_getDataSet(e){if(!this._dataSet)this._dataSet=this._createDataSet(e),this._dataSet.subscribe("dataLoadStarted",this._notifyLoadStarted,this);return this._dataSet}_destroyDataSet(){var e;null===(e=this._dataSet)||void 0===e||e.destroy(),this._dataSet=void 0}_createDataSet(e){return new p.default({...this._getDataSetProps(),...e})}_getDataSetProps(){return{source:this.getSource(),items:this.getItems(),filter:this.getFilter(),keyProperty:this._options.keyProperty,sorting:this.getSorting(),parentProperty:this.getParentProperty(),nodeProperty:this._options.nodeProperty,root:this.getRoot(),expandedItems:this.getExpandedItems(),fields:this._options.selectFields,hasChildrenProperty:this._options.hasChildrenProperty,childrenProperty:this._options.childrenProperty,pagination:this.getNavigation(),paginationParamsChangedCallback:this._options.navigationParamsChangedCallback,deepReload:this._options.deepReload,deepScrollLoad:this._options.deepScrollLoad,loadDataTimeout:this._options.loadTimeout}}_addItems(e,t,r){this._toggleProcessOfCollectionChangeEvent(!1);const{childrenProperty:o}=this._options;return this._recordSetDiffer.applyChanges((0,h.calculateAddItemsChanges)(this._items,e,r,t,this._root,o,!0)),this._toggleProcessOfCollectionChangeEvent(!0),this.__notifyItemsChanged(e,t,r),e}_toggleProcessOfCollectionChangeEvent(e){this._processCollectionChangeEvent=e}_isNeedProcessCollectionChangeEvent(){return this._processCollectionChangeEvent}executeLoad(e){if(this._options.source){const{direction:t,isFirstLoad:r,key:o,filter:i}=e,s=i&&!t?Promise.resolve(i):this._getFilterHierarchy(i||this._filter,o,r,t);return this.cancelLoading(),this._prepareFilterPromise=new a.CancelablePromise(s),this._loadPromise=new a.CancelablePromise(this._prepareFilterPromise.promise.then((t=>this._query({...e,filter:t})))),this._loadPromise.promise}else{const e="Controls/dataSource:SourceController: не задан иÑÑоÑник даннÑÑ
.\n ÐÑовеÑÑÑе, ÑÑо Ð²Ñ Ð¿ÐµÑедали иÑÑоÑник Ð´Ð»Ñ ÑпиÑоÑного конÑÑола.\n ÐÑли SourceController ÑоздаÑÑÑÑ Ð¸Ð· кода, пÑовеÑÑÑе, ÑÑо иÑÑоÑник пеÑедан в конÑÑÑÑкÑоÑ.";return s.Logger.error(e),Promise.reject(new Error(e))}}_load(e){if(this._destroyed)return Promise.reject(new Error("Controls/dataSource:SourceController попÑÑка загÑÑзки даннÑÑ
ÑеÑез ÑазÑÑÑеннÑй SourceController."));const{key:t,direction:r,addItemsAfterLoad:o}=e,a=this.executeLoad(e);if(!1!==o)return a.then((t=>{if(!this._destroyed)if(t instanceof i.RecordSet)return this._processQueryResult(t,e);else return s.Logger.error("source/Controller: query returns incorrect result",this),t})).catch((e=>{if(e)this.setLoadError(e,t,r);return Promise.reject(e)}));else return this._addFinallyToLoadPromise(a)}_query(e){const{direction:t,navigationSourceConfig:r,addItemsAfterLoad:o,key:i,keepNavigation:a}=e;let s;const n=e.filter||this.getFilter(),l={...this._getDataSetProps(),filter:n},d=Array.isArray(null==n?void 0:n[this.getParentProperty()]);if(this._dataSet)this._dataSet.updateProps(l);const u=this._getDataSet(l);if(t)s=u["down"===t?"next":"prev"](i,o,{useServicePool:e.useServicePool});
120else if(i!==this._root&&void 0!==i&&!d)s=u.expand(i,o);else s=u.load(r||a,o);return s}_getFilterHierarchy(t,r=this._root,o,i){const a=this._parentProperty;let s;const{source:n,expandedItems:l,nodeHistoryId:d,deepScrollLoad:u}=this._options,c=this._options.selectedKeys||this._selectedKeys,h=this._options.excludedKeys||this._excludedKeys;if(a)return this._resolveExpandedHierarchyItems({expandedItems:l,nodeHistoryId:d},o).then((o=>{this.setExpandedItems(o),s={...t};const l=(!i||i&&u)&&r===this._root;if((null==o?void 0:o.length)&&null!==(null==o?void 0:o[0])&&l)s=b.prepareFilterWithExpandedItems(s,o,a,r);else if(void 0!==r)s[a]=r;if(c&&c.length&&n)return new Promise(((t,r)=>{e(["Controls/operations"],t,r)})).then((e=>{var t;return s.entries=e.selectionToRecord({selected:c,excluded:h||[]},null===(t=(0,y.default)(n))||void 0===t?void 0:t.getAdapter()),s})).catch((function(e){requirejs.onError(e)}));else return s}));else return Promise.resolve(t)}getItemsCountForRoot(e){return(0,v.default)({...this._options,keyProperty:this.getKeyProperty(),key:e,items:this.getItems()})}_resolveExpandedHierarchyItems(e,t){const r=this._expandedItems||e.expandedItems;if(e.nodeHistoryId&&t)return c.nodeHistoryUtil.restore(e.nodeHistoryId).then((e=>e||r||[])).catch((e=>(s.Logger.warn(e.message),r)));else return Promise.resolve(r)}_processQueryResult(e,t){const{key:r,navigationSourceConfig:o,direction:i}=t,a=r===this._root;let s,n;if(a&&this._dataLoadCallback)n=this._dataLoadCallback(e,i,this._options.id);else if(this._nodeDataMoreLoadCallback)this._nodeDataMoreLoadCallback(r,e);if(a)n=this._notify("dataLoad",e,i,o)||n;if(n instanceof Promise)s=n.then((t=>(this._loadFinished(t||e,r,i,o),this._addItems(t||e,r,i))));else this._loadFinished(e,r,i,o),s=this._addItems(e,r,i);return s}_loadFinished(e,t,r,o){var i;const a=this._options.nodeLoadCallback||this._nodeLoadCallback;if(this._loadPromise=void 0,this._loadError=void 0,this._prepareFilterPromise=void 0,t===this._root)null===(i=this._dataLoadCallbackFromOptions)||void 0===i||i.call(void 0,e,r,this._options.id,o,this.hasMoreData(r||"down",t));else if(a)a(e,t,r)}_processQueryError(e,t,r){if(this._loadPromise=void 0,this._options.dataLoadErrback)this._options.dataLoadErrback(e,this._options.id);if(this._loadError=e,this._notifyLoadError(e,t,r),!e.processed&&!e.hasOwnProperty("httpError"))s.Logger.error("dataSource/Controller load error",this,e);if(e instanceof a.PromiseCanceledError&&t!==this._root&&!r)this._getDataSet().resetPagination(t);return e}_notifyLoadError(e,t,r,o){this._notify("dataLoadError",e,t,r,this._options.id,o)}_callSourceMethod(...e){const t=this._options.source,[r,o]=e;return t[r].apply(t,Array.prototype.slice.call(arguments,2)).catch((e=>{if(this._notifyLoadError(e,o,void 0,r),!(null==e?void 0:e.processed))return Promise.reject(e)}))}_subscribeItemsCollectionChangeEvent(e){if(this._unsubscribeItemsCollectionChangeEvent(),e)e.subscribe("onCollectionChange",this._collectionChange,this),e.subscribe("onPropertyChange",this._collectionPropertyChange,this)}_unsubscribeItemsCollectionChangeEvent(){if(this._items)this._items.unsubscribe("onCollectionChange",this._collectionChange),this._items.unsubscribe("onPropertyChange",this._collectionPropertyChange)}_subscribeBreadcrumbsChange(e){if(e)e.subscribe("onCollectionChange",this._onBreadcrumbsCollectionChanged,this)}_unsubscribeBreadcrumbsChange(){if(this._breadcrumbsRecordSet)this._breadcrumbsRecordSet.unsubscribe("onCollectionChange",this._onBreadcrumbsCollectionChanged)}_notifyLoadStarted(e,t){if(!this._reloadItemPromise)this._notify("dataLoadStarted",t)}_collectionChange(){if(this._isNeedProcessCollectionChangeEvent()){const e=this._getFirstItemFromRoot(),t=this._getLastItemFromRoot();if(e&&t)this._getDataSet().updatePaginationRange(e,t)}}_collectionPropertyChange(e,t){if(this._options.observeMetaData&&this._isNeedProcessCollectionChangeEvent()&&t.metaData)this._getDataSet().setItems(this._items)}_onBreadcrumbsCollectionChanged(){this.__updateBreadcrumbsData(),this._notify("breadcrumbsDataChanged")}_getFirstItemFromRoot(){const e=this._items.getCount();let t;for(let r=0;r<e&&(t=this._getItemFromRootByIndex(r),!t);r++);return t}_getLastItemFromRoot(){let e;for(let t=this._items.getCount()-1;t>0&&(e=this._getItemFromRootByIndex(t),!e);t--);return e}_getItemFromRootByIndex(e){let t;if(this._options.parentProperty&&void 0!==this._root){if(this._items.at(e).get(this._options.parentProperty)===this._root)t=this._items.at(e)}else t=this._items.at(e);return t}_setDataLoadCallbackFromOptions(e){this._dataLoadCallbackFromOptions=e}_restoreCollapsedGroups(e,t){if(e)u.default.restoreCollapsedGroups(e).then((e=>{this._collapsedGroups=e||t}));else this._collapsedGroups=void 0}_isOptionChanged(e,t){return void 0!==t[e]&&!(0,l.isEqual)(t[e],this._options[e])&&!(0,l.isEqual)(t[e],this[`_${e}`])}_addFinallyToLoadPromise(e){return e.catch((e=>{if(e&&e.isCanceled)this._notify("dataLoadCancel",e,this._options.id);return Promise.reject(e)})).finally((()=>{this._loadPromise=void 0}))}__notifyItemsChanged(e,t,r){this._notify("itemsChanged",e,t,r)}__updateBreadcrumbsData(e=this._items){const{breadCrumbsItems:t,backButtonCaption:r,breadCrumbsItemsWithoutBackButton:o}=(0,g.calculateBreadcrumbsData)(e,this._options.displayProperty);this._breadCrumbsItems=t,this._backButtonCaption=r,this._breadCrumbsItemsWithoutBackButton=o}__setItems(e){this._unsubscribeBreadcrumbsChange(),this._breadcrumbsRecordSet=e instanceof i.RecordSet?e.getMetaData().path:null,this._subscribeBreadcrumbsChange(this._breadcrumbsRecordSet),this.__updateBreadcrumbsData(e)}}return b.prepareFilterWithExpandedItems=_.default,t.default=b,t}(M,{},L,m,h,c,i,C,u,s,G,re,Ee,ge,Se,ie,S,x,j,X,$),Oe=Me,O.getOriginalSource=O.DataSet=O.RecordSetDiffer=O.RecordSetChangeType=O.calculateAddItemsChanges=O.calculateBreadcrumbsData=O.saveControllerState=O.getControllerState=O.PageController=O.N
120avigationController=O.getItemsCountForRoot=O.getExpandedItems=O.isEqualItems=O.calculatePath=O.getStateFromUrl=O.SORTING_USER_PARAM_POSTFIX=O.NewSourceController=O.CrudWrapper=O.getQueryInstance=O.nodeHistoryUtil=O.groupUtil=O.requestDataUtil=O.error=void 0,O.error=be,O.requestDataUtil=ne.default,Object.defineProperty(O,"nodeHistoryUtil",{enumerable:!0,get:function(){return oe.nodeHistoryUtil}}),O.groupUtil=z.default,O.getQueryInstance=B.default,Object.defineProperty(O,"CrudWrapper",{enumerable:!0,get:function(){return ue.CrudWrapper}}),Object.defineProperty(O,"NewSourceController",{enumerable:!0,get:function(){return Oe.default}}),Object.defineProperty(O,"SORTING_USER_PARAM_POSTFIX",{enumerable:!0,get:function(){return Oe.SORTING_USER_PARAM_POSTFIX}}),Object.defineProperty(O,"getStateFromUrl",{enumerable:!0,get:function(){return N.default}}),Object.defineProperty(O,"calculatePath",{enumerable:!0,get:function(){return J.default}}),Object.defineProperty(O,"isEqualItems",{enumerable:!0,get:function(){return te.isEqualItems}}),Object.defineProperty(O,"getExpandedItems",{enumerable:!0,get:function(){return Y.default}}),Object.defineProperty(O,"getItemsCountForRoot",{enumerable:!0,get:function(){return Z.default}}),Object.defineProperty(O,"NavigationController",{enumerable:!0,get:function(){return me.default}}),Object.defineProperty(O,"PageController",{enumerable:!0,get:function(){return V.default}}),Object.defineProperty(O,"getControllerState",{enumerable:!0,get:function(){return R.getState}}),Object.defineProperty(O,"saveControllerState",{enumerable:!0,get:function(){return R.saveState}}),Object.defineProperty(O,"calculateBreadcrumbsData",{enumerable:!0,get:function(){return pe.calculateBreadcrumbsData}}),Object.defineProperty(O,"calculateAddItemsChanges",{enumerable:!0,get:function(){return we.calculateAddItemsChanges}}),Object.defineProperty(O,"RecordSetChangeType",{enumerable:!0,get:function(){return we.RecordSetChangeType}}),Object.defineProperty(O,"RecordSetDiffer",{enumerable:!0,get:function(){return we.RecordSetDiffer}}),Object.defineProperty(O,"DataSet",{enumerable:!0,get:function(){return Ie.default}}),Object.defineProperty(O,"getOriginalSource",{enumerable:!0,get:function(){return D.default}}),O})); 121define("Controls/Container/Async",["require","exports","WasabyLoader/ModulesLoader","UICore/Async","i18n!Controls","Env/Env"],(function(r,e,o,s,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class a extends s.Async{constructor(){super(...arguments),this.defaultErrorMessage=t("У %ecosystem_name% возникла пÑоблема").replace("%ecosystem_name%",this.ecosystemName)}_beforeMount(r,e,o){return this.errorCallback=r.errorCallback,super._beforeMount(r,e,o)}_loadAsync(e){return o.loadAsync(e).catch((s=>(n.IoC.resolve("ILogger").error(`Couldn't load module "${e}"`,s),s.cause={needShow:!0}
121,new Promise(((e,o)=>{r(["Controls/error"],e,o)})).then((({ErrorController:r,ErrorViewMode:t})=>(new r).process({error:s,mode:t.include}).then((r=>{var t;if(this.errorCallback&&"function"==typeof this.errorCallback)this.errorCallback(r,s);if(!(null==r?void 0:r.status)||404!==r.status)o.unloadSync(e);const n=null===(t=null==r?void 0:r.options)||void 0===t?void 0:t.message;throw new Error(n||this.defaultErrorMessage)})))).catch((function(r){requirejs.onError(r)})))))}_setErrorState(r,e){if(!this.errorCallback||"function"!=typeof this.errorCallback)super._setErrorState(r,e)}}a.defaultProps={notLoadThemes:!0},e.default=a})); 122define("UICore/Async",["WasabyLoader/ModulesLoader","WasabyLoader/Library","UICore/Base","UICommon/Utils","UICommon/Executor","UICommon/Deps","Types/entity","I18n/i18n","Env/Env","Compiler/IR","require","exports"],(function(e,t,r,o,n,s,i,a,d,l,m,c){var p,h,u;return Object.defineProperty(c,"__esModule",{value:!0}),p=function(e){"use strict";var t=["optionsForComponent","error","userErrorMessage","content","_options","resolvedTemplate","noBubbleEvents"];return e.g({v:1,m:"wml!UICore/_async/Async",t:[e.t("withFakeNode",((e,t)=>[e.g(t,"div",{K:"0_0_",A:{style:"display: 'contents'; width: 100%; height: 100%"},r:!0},[e.P(t,e.m(t,0),{K:"0_0_0_",O:e.S(t,{},e.m(t,1)),m:"none",i:0})])])),e.r(((e,t)=>[e.m(t,2)?[e.g(t,"div",{K:"1_0_",r:!0,c:!0},[e.t(e.e(e.x(t,3)),"1_0_0_")])]:[e.m(t,4)?[e.I(t,0,{K:"2_0_0_",r:!0,m:"attribute",f:!0,c:!0})]:[e.P(t,e.m(t,0),{K:"2_1_0_",O:e.S(t,{},e.m(t,1)),m:"attribute",c:!0,i:0})]]]))],p:t.slice(0,3),e:[(e,r)=>e.g(r,[t[4],t[3]])||e.g(r,[t[0],t[5]]),(e,r)=>e.g(r,[t[0]]),(e,r)=>e.g(r,[t[1]]),(e,r)=>e.g(r,[t[2]]),(e,r)=>e.g(r,[t[4],t[6]])],i:[[[1]]]})}(l),h=function(e,t,r,o,n,s,i,a,d,l,m,c){"use strict";function p(e,t){const r=`ÐÑибка загÑÑзки конÑÑола "${e}"`;return!t?`${r}\nÐÐ¾Ð·Ð¼Ð¾Ð¶Ð½Ñ ÑледÑÑÑие пÑиÑинÑ:\n\t ⢠ÐÑибка в Ñамом конÑÑоле\n\t ⢠Ðолго оÑвеÑал ÐРмеÑод в _beforeUpdate\n\t ⢠ÐонÑÑола не ÑÑÑеÑÑвÑеÑ`:`${r}: ${t}`}Object.defineProperty(t,"__esModule",{value:!0});class h extends i.Control{constructor(){super(...arguments),this._template=c,this.optionsForComponent={},this.asyncLoading=!1,this.loadingErrorOccurred=!1,this.ecosystemName=m.controller.currentLocaleConfig.ecosystem.name,this.defaultErrorMessage=`У ${this.ecosystemName} возникла пÑоблема`,this.needNotifyOnLoad=!1}_beforeMount(e,t,o){if(!e.templateName)return this.error="РмодÑÐ»Ñ Async пеÑедали не коÑÑекÑное Ð¸Ð¼Ñ Ñаблона (templateName=undefined|null|empty)",void d.Logger.error(this.error);if(n.constants.isBrowserPlatform&&!r.isLoaded(e.templateName)){const t=this._loadContentAsync(e.templateName,e.templateOptions);if(e.isDemo){if(o)this.error=o,this.userErrorMessage=this.defaultErrorMessage;return}return t}if(this.error=this._loadContentSync(e.templateName,e.templateOptions),this.error)this.userErrorMessage=this.defaultErrorMessage;if(e.isDemo)return this.error;else return}_componentDidMount(){this._notifyOnLoad()}_beforeUpdate(e){if(!this.asyncLoading)if(e.templateName!==this.currentTemplateName){if(r.isLoaded(e.templateName))this._loadContentSync(e.templateName,e.templateOptions)}else this._insertComponent(this.optionsForComponent.resolvedTemplate,e.templateOptions,e.templateName)}_componentDidUpdate(){if(!this.asyncLoading)if(!this.loadingErrorOccurred)if(this.currentTemplateName!==this._options.templateName)this._loadContentAsync(this._options.templateName,this._options.templateOptions);else this._notifyOnLoad();else this.loadingErrorOccurred=!1}_notifyOnLoad(){if(this.needNotifyOnLoad&&!this.error&&!this.asyncLoading)this.needNotifyOnLoad=!1,this._notify("templateLoad")}_loadContentSync(e,t){const r=this._loadSync(e);if(null===r)return p(e);else return this.needNotifyOnLoad=!0,this._insertComponent(r,t,e),(0,a.addPageDeps)([o.parse(e).name]),!1}_loadSync(e){try{const t=r.loadSync(e);if(t)return t}catch(t){d.Logger.error(`Couldn't load module "${e}"`,t)}return null}_loadContentAsync(e,t){return this.asyncLoading=!0,this.loadingErrorOccurred=!1,this._loadAsync(e).then((r=>{if(this.asyncLoading=!1,!r)return this.loadingErrorOccurred=!0,this.error=p(e),d.Logger.w
122arn(this.error),void(this.userErrorMessage=this.defaultErrorMessage);this.needNotifyOnLoad=!0,this._insertComponent(r,t,e)}),(t=>{this.asyncLoading=!1,this.loadingErrorOccurred=!0,this._setErrorState(t,e)}))}_loadAsync(e){return r.loadAsync(e).catch((t=>{throw d.Logger.error(`Couldn't load module "${e}"`,t),r.unloadSync(e),new Error(this.defaultErrorMessage)}))}_setErrorState(e,t){this.error=p(t),this.userErrorMessage=e.message}_insertComponent(e,t,r){this.error="",this.currentTemplateName=r,this.optionsForComponent={};const o=t||{},n=Object.keys(o);for(const e of n)this.optionsForComponent[e]=o[e];if(!e||!l.CommonUtils.isDefaultExport(e))this.optionsForComponent.resolvedTemplate=e;else this.optionsForComponent.resolvedTemplate=e.default}static getOptionTypes(){return{templateName:(0,s.descriptor)(String).required()}}}return t.default=h,t}(0,{},e,t,d,i,r,s,o,n,a,p),u=h,c.Async=void 0,Object.defineProperty(c,"Async",{enumerable:!0,get:function(){return u.default}}),c})); 123define("Controls/Utils/ArraySimpleValuesUtil",["require","exports"],(function(e,r){"use strict";function n(e,r){return-1!==t(e,r)}function t(e,r){let n=e.indexOf(r);if(-1===n){const t=typeof r;if(i[t])n=e.indexOf(i[t](r))}return n}Object.defineProperty(r,"__esModule",{value:!0}),r.getIntersection=r.invertTypeIndexOf=r.hasInArray=r.getArrayDifference=r.removeSubArray=r.addSubArray=void 0;const i={string:Number,number:String};r.addSubArray=function(e,r){return r.forEach((r=>{if(!n(e,r))e.push(r)})),e},r.removeSubArray=function(e,r){let n;return r.forEach((r=>{if(n=t(e,r),-1!==n)e.splice(n,1)})),e},r.getArrayDifference=function(e,r){return{removed:e.filter((e=>!n(r,e))),added:r.filter((r=>!n(e,r)))}},r.hasInArray=n,r.invertTypeIndexOf=t,r.getIntersection=function(e,r){return e.filter((e=>r.includes(e)))}})); 124define("Controls/error",["WasabyLoader/ModulesLoader","UICommon/Utils","UI/Utils","ErrorHandling/interface","ErrorHandling/ErrorHandling","Env/Env","Browser/Transport","Application/Env","require","exports"],(function(e,r,o,t,n,s,i,l,a,d){var u,p,c,f,h,g,m,P,v,y,w;return Object.defineProperty(d,"__esModule",{value:!0}),u=function(e,r,o){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.HandlerIterator=void 0;return r.HandlerIterator=class{getViewConfigSync([e,...r],t){if(!e)return;let n;try{n=e(t)}catch(e){if(o.Logger.error("ErrorHandler error",null,e),e.isCanceled)return!1}if(n instanceof Promise)o.Logger.error("Ðо вÑÐµÐ¼Ñ ÑÐ¸Ð½Ñ Ñонной обÑабоÑки обÑабоÑÑик веÑнÑл пÑомиÑ!",this,new Error),n=void 0;return n||this.getViewConfigSync(r,t)}getViewConfigAsync([e,...r],t){if(!e)return Promise.resolve();else return new Promise((r=>{const o=e(t);r(o&&o.promise instanceof Promise?o.promise:o)})).catch((e=>{if(e.isCanceled)throw e;o.Logger.error("ErrorHandler error",null,e)})).then((e=>e||this.getViewConfigAsync(r,t)))}},r}(0,{},r),p=function(e,r,o,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});class n{constructor(e=[],r=[]){this.modules=n.POPUP_MODULES.concat(e),this.themes=r}preloadPopup(){if(!this.preloadPromise)this.preloadPromise=n.preload(this.modules,this.themes).then((([e])=>e));return this.preloadPromise}openConfirmation(e){return this.preloadPopup().then((r=>{if(r)return r.Confirmation.openPopup(e);else n.showDefaultDialog(e.message)}))}setDialogId(e){n._id=e}clearPopupId(e,r){if(n._id=null,e&&"function"==typeof e)e(r)}openDialog(e,r={}){const{template:o}=e;if(n._id)return Promise.resolve();if(!e.allowMultiplyDialog)this.setDialogId("singleErrorDialog");if(r.allowAdaptive=!1,void 0===o){const{eventHandlers:o}=r,t={type:"ok",style:"danger",message:e.options.message};return this.openConfirmation(t).then((e=>{if(o&&"function"==typeof o.onResult)o.onResult(e);if(o&&"function"==typeof o.onClose)o.onClose(e)})).finally((()=>{this.clearPopupId()}))}const s="string"==typeof o?(0,t.loadAsync)(o).catch((()=>{})):Promise.resolve(o);return Promise.all([this.preloadPopup(),s,function(e){if(e.options.asyncDataResult)return Promise.resolve(e.options.asyncDataResult);if("function"==typeof e.asyncData)return e.asyncData();else return Promise.resolve()}(e)]).then((([o,t,s])=>{if(!o||!t)return void n.showDefaultDialog(e.options.message,e.options.details);const{eventHandlers:i}=r;if(i&&"function"==typeof i.onClose){const e=i.onClose;i.onClose=this.clearPopupId.bind(this,e)}else if(i)i.onClose=this.clearPopupId;else r.eventHandlers={onClose:this.clearPopupId};return o.Dialog.openPopup({template:t,modal:!0,resizeDirection:void 0,...r,templateOptions:{...r.templateOptions,...e.options,asyncDataResult:{...null!=s?s:{}}}})})).catch((()=>{this.clearPopupId()}))}closeDialog(e){if(!e)return Promise.resolve();else return this.preloadPopup().then((r=>r&&r.Dialog.closePopup(e)))}static preload(r,o){return Promise.all([...r.map((r=>new Promise(((o,t)=>
124{e([r],o,t)})))),n.importThemes(o)]).catch((()=>[]))}static importThemes(r=[]){return new Promise(((r,o)=>{e(["UI/theme/controller"],r,o)})).then((({getThemeController:e})=>{const o=e();r.forEach((e=>{o.get(e)}))})).catch((function(e){requirejs.onError(e)}))}static showDefaultDialog(e,r){if(!o.constants.isBrowserPlatform)return;let t=e;if(r)t+=`\n${r}`;alert(t)}}return n.POPUP_MODULES=["Controls/popup","Controls/popupConfirmation","Controls/popupTemplate","Controls/popupTemplateStrategy","css!Controls/popup","css!Controls/popupConfirmation","css!Controls/buttons"],r.default=n,r}(a,{},s,e),c=p,f=function(e,r,o){"use strict";return Object.defineProperty(r,"__esModule",{value:!0}),r.ErrorType=r.ErrorViewMode=r.ErrorViewSize=void 0,Object.defineProperty(r,"ErrorViewSize",{enumerable:!0,get:function(){return o.ErrorViewSize}}),Object.defineProperty(r,"ErrorViewMode",{enumerable:!0,get:function(){return o.ErrorViewMode}}),Object.defineProperty(r,"ErrorType",{enumerable:!0,get:function(){return o.ErrorType}}),r}(0,{},t),h=f,g=function(e,r,o,t,n,s,i){"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l="undefined"==typeof window;class a{constructor(e){var r,o;this.handlerIterator=new n.HandlerIterator,this.handlers=(null===(r=null==e?void 0:e.handlers)||void 0===r?void 0:r.slice())||[],this.postHandlers=(null===(o=null==e?void 0:e.postHandlers)||void 0===o?void 0:o.slice())||[],this.onProcess=null==e?void 0:e.onProcess}addHandler(e,r){const o=r?this.postHandlers:this.handlers;if(!o.includes(e))o.push(e)}removeHandler(e,r){const o=r=>r.filter((r=>e!==r));if(r)this.postHandlers=o(this.postHandlers);else this.handlers=o(this.handlers)}setOnProcess(e){this.onProcess=e}updateOnProcess(e){if("function"!=typeof this.onProcess)return void this.setOnProcess(e);const r=this.onProcess;this.setOnProcess((o=>{const t=e(o);return r(t)}))}createViewConfig(e,r,t){var n;if(!a.isNeedHandle(r))return;const s=e||((null===(n=r.cause)||void 0===n?void 0:n.needShow)?a.getDefaultViewConfig(r):null);if(s){if(r.processed=!1!==s.processed,!(t instanceof Error)&&t.mode)s.mode=t.mode;else s.mode=s.mode||i.ErrorViewMode.dialog;if("function"==typeof this.onProcess)return this.onProcess(s);if(!(t instanceof Error)&&t.allowMultiplyDialog)s.allowMultiplyDialog=t.allowMultiplyDialog;return s}else if(l&&"isForbiddenRPCJSON"in r&&r.isForbiddenRPCJSON)o.Logger.warn(r.message);else o.Logger.error("",null,r)}process(e){const r=a.getHandlerConfig(e),{error:t}=r;if(!a.isNeedHandle(t))return Promise.resolve();const n=[...this.handlers,...(0,s.getHandlers)(),...this.postHandlers];return this.handlerIterator.getViewConfigAsync(n,r).then((r=>{if(r&&"function"==typeof r.asyncData)return r.asyncData(t,r.message,r.details).then((o=>{var n;const s=null!==(n=r.options)&&void 0!==n?n:{},i=null==o?void 0:o.template;if(r.options={...s,asyncDataResult:o},i)r.template=i;return this.createViewConfig(r,t,e)}));else return this.createViewConfig(r,t,e)})).catch((e=>{if(!e.isCanceled)o.Logger.error("ErrorHandler error",null,e)}))}processSync(e){const r=a.getHandlerConfig(e),{error:o}=r;if(!a.isNeedHandle(o))return;const t=[...this.handlers,...(0,s.getHandlers)(),...this.postHandlers],n=this.handlerIterator.getViewConfigSync(t,r);if(!1!==n)return this.createViewConfig(n,o,e)}static getDefaultViewConfig({message:e}){return{mode:i.ErrorViewMode.dialog,options:{message:e}}}static getHandlerConfig(e){if(e instanceof Error)return{error:e,mode:i.ErrorViewMode.dialog};else return{mode:i.ErrorViewMode.dialog,...e}}static isNeedHandle(e){return!(e instanceof t.fetch.Errors.Abort||e.processed||e.canceled||e.isCanceled)}}return r.default=a,r}(0,{},o,i,u,n,t),m=g,P=function(e,r,o){"use strict";Object.defineProperty(r,"__esModule",{value:!0});return r.default=class{constructor(e){this._popupHelper=(null==e?void 0:e._popupHelper)||new o.default}getDialogOptions(e){const r={...e};if(this._popupId)r.id=this._popupId;return r.eventHandlers={...r.eventHandlers,onClose:()=>{var r;this._popupId=null,null===(r=null==e?void 0:e.eventHandlers)||void 0===r||r.onClose()}},r}open(e,r){if(!e)return Promise.resolve();else return this._popupHelper.openDialog(e,this.getDialogOptions(r)).then((e=>{this._popupId=e}))}close(){return this._popupId?this._popupHelper.closeDialog(this._popupId):Promise.resolve()}destroy(){this.close(),this._popupId=null}},r}(0,{},p),v=P,y=function(e,r,o,t,n,s){"use strict";
124return Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){const{error:r,handlers:i=[],opener:l,dialogEventHandlers:a,dialogOptions:d={},postHandlers:u=[],onProcess:p,_popupHelper:c=new s.default}=e,f=new n.default({handlers:i});for(const e of u)f.addHandler(e,!0);return f.process(r).then((e=>{if(e){if("function"==typeof p)p(e);if(!t.constants.isServerSide)return c.openDialog(e,{opener:l,eventHandlers:a,...d});else if(r.isForbiddenRPCJSON)!function(e,r){var t,n;const s=4;let i="Controls/error:process is being called during server-side rendering!\nUse Controls/dataSource:error.Container to render an error.\nError config:\n"+JSON.stringify({status:r.status,options:{message:null===(t=r.options)||void 0===t?void 0:t.message,details:null===(n=r.options)||void 0===n?void 0:n.details}},null,s);try{i+="\nProcessed error:\n"+JSON.stringify(e,null,s),i+="\nError stack:\n"+e.stack}catch(e){}const l=new Error(i).stack||i,a=e.isForbiddenRPCJSON?"warn":"error";o.logger[a](l)}(r,e)}}))},r}(0,{},l,s,g,p),w=y,d.process=d.Popup=d.ErrorViewSize=d.ErrorViewMode=d.Mode=d.ErrorType=d.ErrorController=d.Controller=d.DialogOpener=void 0,Object.defineProperty(d,"ErrorType",{enumerable:!0,get:function(){return h.ErrorType}}),Object.defineProperty(d,"Mode",{enumerable:!0,get:function(){return h.ErrorViewMode}}),Object.defineProperty(d,"ErrorViewMode",{enumerable:!0,get:function(){return h.ErrorViewMode}}),Object.defineProperty(d,"ErrorViewSize",{enumerable:!0,get:function(){return h.ErrorViewSize}}),d.Controller=m.default,d.ErrorController=m.default,d.process=w.default,d.Popup=c.default,d.DialogOpener=v.default,d})); 125!function(){function n(){define("ErrorHandling/ErrorHandling",["require","exports","ErrorHandling/IErrorHandling"],(function(n,r,e){"use strict";return e.ErrorHandling}))}function r(r,f){if(!r)if(f)return n();else n();else!function(r,s){if(r&&r[t]){if(r[t]&&r[t].includes("/"))e=r[t];else e=r[t]+"/"+o.join("/");if(e===i)if(s)n();else n();else if(s){var f=u.requirejs(e);module.exports=f}else define(i,[e],(function(n){return n}))}else n()}(r.modules[s].features,f)}var e,i="ErrorHandling/ErrorHandling",t="ErrorHandling/ErrorHandling",o=i.split("/"),s=o.shift(),u=function(){return this||(0,eval)("this")}();if("function"==typeof defineFeature)defineFeature("ErrorHandling/ErrorHandling",["require","exports","ErrorHandling/IErrorHandling"],(function(n,r,e){"use strict";return e.ErrorHandling}));else if(u.contents)r(u.contents,!1);else if("undefined"==typeof window)r(function(){try{contents=require("json!resources/contents")}catch(n){try{contents=require("json!contents")}catch(n){contents=""}}}()||u.requirejs("ErrorHandling/contents.json"),!1)}(); 126define("ErrorHandling/IErrorHandling",["require","exports"],(function(r,e){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorHandling=void 0,n||(e.ErrorHandling=n={})})); 127define("ErrorHandling/interface",["require","exports"],(function(e,n){"use strict";var r,i,o;Object.defineProperty(n,"__esModule",{value:!0}),n.ErrorViewMode=n.ErrorViewSize=n.ErrorType=void 0,function(e){e.accessDenied="accessDenied",e.connection="connection",e.internal="internal",e.maintenance="maintenance",e.network="network",e.notFound="notFound",e.require="require",e.rpc="rpc",e.applaied="applied"}(r||(n.ErrorType=r={})),function(e){e.large="large",e.medium="medium",e.normal="normal",e.small="small",e.dialog="dialog"}(i||(n.ErrorViewSize=i={})),function(e){e.dialog="dialog",e.page="page",e.include="include",e.inlist="inlist"}(o||(n.ErrorViewMode=o={}))})); 128define("Core/core-instance",["require","exports","WasabyLoader/Library"],(function(n,e,r){var i={},t={},f="undefined"==typeof window,u=function(e,r){if(r=r||n,f)return r(e);else return i[e]||(i[e]=r(e))},o=function(e,r){if(r=r||n,f)return r.defined(e);else return t[e]||(t[e]=r.defined(e))},a=function(n,e){var r=n&&"object"==typeof n&&Object.getPrototypeOf(n);if(r)return r._moduleName===e||a(r,e);else return!1},c={instanceOfModule:function(n,e,i){var t,f,c="["+e+"]";if(n&&n[c])return!0;if(-1===String(e).indexOf(":")&&n&&void 0!==n._moduleName)return a(n,e);if(t=r.parse(e),o(t.name,i))if(f=u(t.name,i),t.path.forEach((function(n){f=f?f[n]:null})),"function"==typeof f&&n instanceof f)return!0;return!1},instanceOfMixin:function(n,e,i){var t,f;if(!n||!n._mixins)return!1;if(n["["+e+"]"])return!0;
128if(t=r.parse(e),o(t.name,i))return f=u(t.name,i),t.path.forEach((function(n){f=f?f[n]:null})),-1!==n._mixins.indexOf(f);else return!1},classOfMixin:function(n,e){var r=n.prototype;return c.instanceOfMixin(r,e)}};return c})); 129define("ParametersWebAPI/Scope",["ParametersWebAPI/ParametersScope","require","exports"],(function(e,t,r){var n,E;return Object.defineProperty(r,"__esModule",{value:!0}),n=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.parametersMultiGet=t.DEVICE=t.USERDEVICE=t.ACCOUNT=t.PROFILE=t.USER=t.GLOBAL=void 0,t.GLOBAL=r.GLOBAL,t.USER=r.USER,t.PROFILE=r.PROFILE,t.ACCOUNT=r.ACCOUNT,t.USERDEVICE=r.USERDEVICE,t.DEVICE=r.DEVICE,t.parametersMultiGet=r.parametersMultiGet,t}(0,{},e),E=n,r.parametersMultiGet=r.USERDEVICE=r.USER=r.PROFILE=r.GLOBAL=r.ACCOUNT=r.DEVICE=void 0,Object.defineProperty(r,"DEVICE",{enumerable:!0,get:function(){return E.DEVICE}}),Object.defineProperty(r,"ACCOUNT",{enumerable:!0,get:function(){return E.ACCOUNT}}),Object.defineProperty(r,"GLOBAL",{enumerable:!0,get:function(){return E.GLOBAL}}),Object.defineProperty(r,"PROFILE",{enumerable:!0,get:function(){return E.PROFILE}}),Object.defineProperty(r,"USER",{enumerable:!0,get:function(){return E.USER}}),Object.defineProperty(r,"USERDEVICE",{enumerable:!0,get:function(){return E.USERDEVICE}}),Object.defineProperty(r,"parametersMultiGet",{enumerable:!0,get:function(){return E.parametersMultiGet}}),r})); 130!function(){function e(){define("ParametersWebAPI/ParametersScope",["require","exports","ParametersWebAPI/IParametersScope"],(function(e,t,r){"use strict";return r.Scopes}))}function t(t,c){if(!t)if(c)return e();else e();else!function(t,o){if(t&&t[s]){if(t[s]&&t[s].includes("/"))r=t[s];else r=t[s]+"/"+i.join("/");if(r===n)if(o)e();else e();else if(o){var c=a.requirejs(r);module.exports=c}else define(n,[r],(function(e){return e}))}else e()}(t.modules[o].features,c)}var r,n="ParametersWebAPI/ParametersScope",s="ParametersWebAPI/ParametersScope",i=n.split("/"),o=i.shift(),a=function(){return this||(0,eval)("this")}();if("function"==typeof defineFeature)defineFeature("ParametersWebAPI/ParametersScope",["require","exports","ParametersWebAPI/IParametersScope"],(function(e,t,r){"use strict";return r.Scopes}));else if(a.contents)t(a.contents,!1);else if("undefined"==typeof window)t(function(){try{contents=require("json!resources/contents")}catch(e){try{contents=require("json!contents")}catch(e){contents=""}}}()||a.requirejs("ParametersWebAPI/contents.json"),!1)}(); 131define("ParametersWebAPI/IParametersScope",["require","exports"],(function(e,r){"use strict";var o;Object.defineProperty(r,"__esModule",{value:!0}),r.Scopes=void 0,o||(r.Scopes=o={})})); 132define("Types/promise",["WasabyLoader/ModulesLoader","require","exports"],(function(e,t,r){var o,n,i,u;return Object.defineProperty(r,"__esModule",{value:!0}),o=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r="undefined"==typeof window,o=r?5e3:0;return t.default=function(e){var t,n,i,u,l;const s=null!=e?e:o;if(!r)return s;const a=null===(l=null===(i=null===(n=null===(t=(null===globalThis||void 0===globalThis?void 0:globalThis.process)||process)||void 0===t?void 0:t.application)||void 0===n?void 0:n.getCurrentService)||void 0===i?void 0:(u=i.call(n)).getCallTimeout)||void 0===l?void 0:l.call(u);return a>0?a:s},t}(0,{}),n=o,i=function(e,t,r,o){"use strict";function n(e,t,r,o){const n=t.URL.getQueryParam("globalTimeoutForTests");return setTimeout((()=>{o(new t.fetch.Errors.HTTP({httpError:504,url:void 0,message:"Promise timeout",details:r}))}),n?parseInt(n,10):e)}Object.defineProperty(t,"__esModule",{value:!0});const i="Browser/Transport";return t.default=function(e,t){const u=function(e){let t;const o=String(new Error("withTimeout() through:").stack);return{promise:new Promise(((u,l)=>{if((0,r.isLoaded)(i))t=n(e,(0,r.loadSync)(i),o,l);else(0,r.loadAsync)(i).then((r=>{t=n(e,r,o,l)}))})),clear(){clearTimeout(t)}}}((0,o.default)(t));return Promise.race([e,u.promise]).finally((()=>{u.clear()}))},t}(0,{},e,o),u=i,r.getTimeout=r.wrapTimeout=void 0,Object.defineProperty(r,"wrapTimeout",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(r,"getTimeout",{enumerable:!0,get:function(){return n.default}}),r})); 133define("Types/source",["WasabyLoader/ModulesLoader","Types/util","Types/shim","Types/promise","Types/guards","Types/formatter","Types/entity","Types/deferred","Types/collection","Env/Env","require","exports","Types/di","Types/PromiseAPIDeferred"],(function(e,t,r,i,n,s,o,a,l,c,d,u,p){var h,_,f,y,g,b,m,P,v,$,O,T,M,S,w,C,x,j,E,D,A,I,R,k,N,B,L,q,H,Q,K,F,z,J,U,W,V,G,Y,Z,X,ee,te,re,ie,ne,se,oe,ae,le;
133return Object.defineProperty(u,"__esModule",{value:!0}),h=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i{getBinding(){return{...this._$binding}}setBinding(e){this._$binding=e}}return t.default=i,Object.assign(i.prototype,{"[Types/_source/BindingMixin]":!0,_$binding:(0,r.getMergeableProperty)({create:"create",read:"read",update:"update",destroy:"delete",query:"query",copy:"copy",merge:"merge",move:"move"})}),t}(0,{},o),_=h,f=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i extends((0,r.mixin)(Object)){constructor(){super(...arguments),this["[Types/_source/DataCrudMixin]"]=!0}_prepareCreateResult(e){return this._getModelInstance(e)}_prepareReadResult(e){return this._getModelInstance(e)}_prepareUpdateResult(e,t){const r=this.getKeyProperty(),i=(e,t)=>{if(void 0!==t&&r&&!e.get(r))e.set(r,t);e.acceptChanges(!1,!0)};if(e&&e["[Types/_collection/IList]"]){const r=t instanceof Array?t:void 0;e.each(((e,t)=>{i(e,r?r[t]:void 0)}))}else i(e,t instanceof Array?t[0]:t);return t}_prepareQueryResult(e,t){return this._wrapToDataSet(e)}}return t.default=i,Object.assign(i.prototype,{"[Types/_source/DataCrudMixin]":!0}),t}(0,{},t),y=f,g=function(e,t,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(e){n.initMixin(this,e)}static initMixin(e,t){if(t=t||{},!e._$keyProperty&&t.idProperty)e._$keyProperty=t.idProperty;if(t.dataSetMetaProperty)e._dataSetMetaProperty=t.dataSetMetaProperty;if(!e._$model)e._$model="Types/entity:Model"}getAdapter(){if("string"==typeof this._$adapter)this._$adapter=(0,i.create)(this._$adapter);return this._$adapter}getModel(){return this._$model}setModel(e){this._$model=e}getListModule(){return this._$listModule}setListModule(e){this._$listModule=e}getKeyProperty(){return this._$keyProperty}setKeyProperty(e){this._$keyProperty=e}_getKeyPropertyByData(e){return this.getAdapter().getKeyField(e)||""}_getModelInstance(e){return(0,i.create)(this._$model,{cow:this._$cow,writable:this._writable,rawData:e,adapter:this.getAdapter(),keyProperty:this.getKeyProperty()})}_getDataSetInstance(e){return(0,i.create)(this._dataSetModule,{cow:this._$cow,writable:this._writable,adapter:this.getAdapter(),model:this.getModel(),listModule:this.getListModule(),keyProperty:this.getKeyProperty()||this._getKeyPropertyByData(e.rawData||null),...e})}_wrapToDataSet(e){return this._getDataSetInstance({rawData:e,itemsProperty:this._dataSetItemsProperty,metaProperty:this._dataSetMetaProperty})}_each(e,t,r){const i=this.getAdapter().forTable(e);for(let e=0,n=i.getCount();e<n;e++)t.call(r||this,i.at(e),e)}static isModelInstance(e){return e&&e["[Types/_entity/IObject]"]&&e["[Types/_entity/FormattableMixin]"]}static isRecordSetInstance(e){return e&&e["[Types/_collection/IList]"]&&e["[Types/_entity/FormattableMixin]"]}}return t.default=n,Object.assign(n.prototype,{"[Types/_source/DataMixin]":!0,"[Types/_source/IData]":!0,_$adapter:"Types/entity:adapter.Json",_$model:"Types/entity:Model",_$listModule:"Types/collection:RecordSet",_$keyProperty:"",_$cow:!1,_dataSetModule:"Types/source:DataSet",_dataSetItemsProperty:"",_dataSetMetaProperty:"",_writable:r.ReadWriteMixin.prototype.writable,getIdProperty:n.prototype.getKeyProperty,setIdProperty:n.prototype.setKeyProperty}),t}(0,{},o,p),b=g,m=function(e,t,r,i,n){"use strict";function s(e){return function(e){return e&&"object"==typeof e}(e)&&e.hasOwnProperty("total")}Object.defineProperty(t,"__esModule",{value:!0}),t.isInstanceWithMeta=void 0,t.isInstanceWithMeta=function(e){return e["[Types/_entity/adapter/IMetaData]"]};class o extends((0,n.mixin)(r.DestroyableMixin,r.OptionsToPropertyMixin,r.SerializableMixin)){get writable(){return this._$writable}set writable(e){this._$writable=!!e}constructor(e){if(super(),this["[Types/_source/DataSet]"]=!0,r.OptionsToPropertyMixin.initMixin(this,e),!this._$keyProperty&&e&&e.idProperty)this._$keyProperty=e.idProperty}getAdapter(){if("string"==typeof this._$adapter)this._$adapter=(0,i.create)(this._$adapter);return this._$adapter}getModel(){return this._$model}setModel(e){this._$model=e}
133getListModule(){return this._$listModule}setListModule(e){this._$listModule=e}getKeyProperty(){return this._$keyProperty}setKeyProperty(e){this._$keyProperty=e}getItemsProperty(){return this._$itemsProperty}setItemsProperty(e){this._$itemsProperty=e}getAll(e){if(this._checkAdapter(),void 0===e)e=this._$itemsProperty;const t=this._getListInstance(this._getDataProperty(e));if(this._$metaProperty&&t.getMetaData instanceof Function){let e=t.getMetaData(),r=this.getMetaData(),i=Object.keys(r).length>0;if(!i&&this._$rawData&&s(this._$rawData)&&this._$rawData.total)r={total:this._$rawData.total},i=!0;if(i){if(e={...e||{},...r},!e.hasOwnProperty("more")&&s(r))e.more=r.total;t.setMetaData(e)}}return t}getRow(e){if(this._checkAdapter(),void 0===e)e=this._$itemsProperty;const t=this._getDataProperty(e);if("recordset"===this.getAdapter().getProperty(t,"_type")){const e=this.getAdapter().forTable(t);if(e.getCount()>0)return this._getModelInstance(e.at(0))}else return this._getModelInstance(t)}getScalar(e){if(void 0===e)e=this._$itemsProperty;return this._getDataProperty(e)}getMetaProperty(){return this._$metaProperty}getMetaData(){return this._$metaProperty&&this._getDataProperty(this._$metaProperty)||{}}hasProperty(e){return e?void 0!==this._getDataProperty(e):!1}getProperty(e){return this._getDataProperty(e)}getRawData(){return this._$rawData}setRawData(e){this._$rawData=e}_getDataProperty(e){return this._checkAdapter(),e?this.getAdapter().getProperty(this._$rawData,e):this._$rawData}_getModelInstance(e){if(!this._$model)throw new Error("Model is not defined");return(0,i.create)(this._$model,{writable:this._$writable,cow:this._$cow,rawData:e,adapter:this._$adapter,keyProperty:this._$keyProperty})}_getListInstance(e){return(0,i.create)(this._$listModule,{writable:this._$writable,cow:this._$cow,rawData:e,adapter:this._$adapter,model:this._$model,keyProperty:this._$keyProperty})}_checkAdapter(){if(!this.getAdapter())throw new Error("Adapter is not defined")}}return t.default=o,Object.assign(o.prototype,{"[Types/_source/DataSet]":!0,_moduleName:"Types/source:DataSet",_$adapter:"Types/entity:adapter.Json",_$rawData:null,_$model:"Types/entity:Model",_$listModule:"Types/collection:RecordSet",_$keyProperty:"",_$itemsProperty:"",_$metaProperty:"",_$cow:!1,_$writable:!0,getIdProperty:o.prototype.getKeyProperty,setIdProperty:o.prototype.setKeyProperty}),t}(0,{},o,p,t),P=m,v=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i{constructor(){this["[Types/_source/EndpointMixin]"]=!0}getEndpoint(){return{...this._$endpoint}}static _validateOptions(e){if(e&&"string"==typeof e.endpoint)e.endpoint={contract:e.endpoint};return e}}return t.default=i,Object.assign(i.prototype,{"[Types/_source/EndpointMixin]":!0,_$endpoint:(0,r.getMergeableProperty)({})}),t}(0,{},o),$=v,O=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=globalThis.DeferredCanceledError;class n{constructor(){this["[Types/_source/LazyMixin]"]=!0}_loadAdditionalDependencies(e){const t=this._additionalDependencies,n=t.reduce(((e,t)=>e&&requirejs.defined(t)),!0),s=new r.Deferred;if(n)if(e)e.call(this,s);else s.callback();else requirejs(t,(()=>{if(e&&(!s.isReady()||!(s.getResult()instanceof i)))e.call(this,s);else s.callback()}),(e=>s.errback(e)));return s}_connectAdditionalDependencies(e,t){if(!t.isCallbacksLocked())t.addErrback((t=>{if(t instanceof i)e.cancel();return t}));e.addCallbacks((e=>(t.callback(e),e)),(e=>(t.errback(e),e)))}}return t.default=n,Object.assign(n.prototype,{"[Types/_source/LazyMixin]":!0,_additionalDependencies:["Types/source","Types/entity","Types/collection"]}),t}(0,{},a),T=O,M=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i{getOptions(){return{...this._$options}}setOptions(e){this._$options={...this._$options,...e||{}}}static addOptions(e,t){return{...e.prototype._$options,...t}}}return t.default=i,Object.assign(i.prototype,{"[Types/_source/OptionsMixin]":!0,_$options:(0,r.getMergeableProperty)({debug:!1})}),t}(0,{},o),S=M,w=function(e,t,r,i){"use strict";function n(e){return e["[Types/_source/IDecorator]"]}
133Object.defineProperty(t,"__esModule",{value:!0}),t.isDecorator=void 0;const s={read:(e,t)=>{if(e&&t&&!t.read)return t.read=!0,!0;else return!1},query:(e,t)=>{if(e&&t&&!t.query)return t.query=!0,!0;else return!1},copy:(e,t)=>{if(e&&t&&!t.copy)return t.copy=!0,!0;else return!1}};t.isDecorator=n;class o extends((0,i.mixin)(r.OptionsToPropertyMixin,r.SerializableMixin)){constructor(e){if(super(e),this["[Types/_source/PrefetchProxy]"]=!0,this._$target=null,this._$data={read:void 0,query:void 0,copy:void 0},this._validators=s,this._done={},this["[Types/_source/IDecorator]"]=!0,this["[Types/_source/ICrud]"]=!0,this["[Types/_source/ICrudPlus]"]=!0,r.OptionsToPropertyMixin.initMixin(this,e),this._checkOptions(e),this._$validators)this._validators={...this._validators,...this._$validators};if(!this._$target)throw new ReferenceError('Option "target" is required.')}getData(){return{...this._$data}}getOriginal(){const e=this._$target;return n(e)?e.getOriginal():e}create(e){return this._$target.create(e)}read(e,t){if(this._validators.read&&this._$data.read&&this._validators.read(this._$data.read,this._done,e,t))return Promise.resolve(this._$data.read);else return this._$target.read(e,t)}update(e,t){return this._$target.update(e,t)}destroy(e,t){return this._$target.destroy(e,t)}query(e){if(this._validators.query&&this._$data.query&&this._validators.query(this._$data.query,this._done,e))if(this._$data.query instanceof Error)return Promise.reject(this._$data.query);else return Promise.resolve(this._$data.query);return this._$target.query(e)}merge(e,t){return this._$target.merge(e,t)}copy(e,t){if(this._validators.copy&&this._$data.copy&&this._validators.copy(this._$data.copy,this._done,e,t))return Promise.resolve(this._$data.copy);else return this._$target.copy(e,t)}move(e,t,r){return this._$target.move(e,t,r)}getOptions(){if(this._$target&&this._$target.getOptions)return this._$target.getOptions();else return{}}setOptions(e){if(this._$target&&this._$target.setOptions)return this._$target.setOptions(e);throw new TypeError('Option "target" should be an instance of Types/_source/OptionsMixin')}_getSerializableState(e){const t=super._getSerializableState(e);return t._done=this._done,t}_setSerializableState(e){const t=super._setSerializableState(e);return function(){t.call(this),this._done=e._done}}_checkOptions(e){if(e);}}return t.default=o,Object.assign(o.prototype,{"[Types/_source/PrefetchProxy]":!0,_moduleName:"Types/source:PrefetchProxy",_$data:null,_$validators:null}),t}(0,{},o,t),C=w,x=function(e,t,r,i){"use strict";function n(...e){return new u(e)}function s(e,t,r,i,n){if(e instanceof d)t(e.conditions[0],e.conditions[1],e.type);else{if(n.push(e),r)r(e.type,e.conditions);if(e.conditions.forEach((o=>{if(o instanceof c)return s(o,t,r,i,n);const a=Object.keys(o);if("or"===e.type&&a.length>1)return s(new u([o]),t,r,i,n);a.forEach((e=>{const a=o[e];if(a instanceof c)return s(a,t,r,i,n);if(a instanceof Array)return s(new p(a.length?a.map((t=>new d([e,t]))):[new d([e,void 0])]),t,r,i,n);else s(new d([e,a]),t,r,i,n)}))})),n.pop(),i){const t=n.length&&n[n.length-1].type||"";i(e.type,t)}}}function o(e){if("string"==typeof e)e=e.split(/[ ,]/);if(e instanceof Array){const t=e;e={};for(let r=0;r<t.length;r++)e[t[r]]=t[r]}if("object"!=typeof e)throw new TypeError('Invalid argument "expression"');return e}var a,l;Object.defineProperty(t,"__esModule",{value:!0}),t.Order=t.Join=t.playExpression=t.orExpression=t.andExpression=t.OrExpression=t.AndExpression=t.PartialExpression=t.isCloneable=t.NavigationType=t.ExpandMode=void 0,function(e){e[e.None=0]="None",e[e.Nodes=1]="Nodes",e[e.Leaves=2]="Leaves",e[e.All=3]="All"}(a||(t.ExpandMode=a={})),function(e){e.Page="Page",e.Offset="Offset",e.Position="Position"}(l||(t.NavigationType=l={})),t.isCloneable=function(e){return!!e["[Types/_entity/ICloneable]"]};class c{constructor(e){this.conditions=e}}t.PartialExpression=c;class d extends c{constructor(e){super(e),this.conditions=e,this.type="atom"}}class u extends c{constructor(){super(...arguments),this.type="and"}}t.AndExpression=u;class p extends c{constructor(){super(...arguments),this.type="or"}}t.OrExpression=p,t.andExpression=n,t.orExpression=function(...e){return new p(e)},t.playExpression=function(e,t,r,i){s(e instanceof c?e:n(e),t,r,i,[])};class h extends r.OptionsToPropertyMixin{constructor(e){super(),this._$resource="",this._$as="",this._$on={},this._$select={},this._$inner=!0,r.OptionsToPropertyMixin.initMixin(this,e)}getResource(){return this._$resource}getAs(){return this._$as}getOn(){return this._$on}getSelect(){return this._$select}isInner(){return this._$inner}}t.Join=h;class _ extends r.OptionsToPropertyMixin{constructor(e){super(),this._$selector="",this._$order=!1,this._$nullPolicy=void 0,r.OptionsToPropertyMixin.initMixin(this,e);let t=this._$order;if("string"==typeof t)t=t.toUpperCase();switch(t){case _.SORT_DESC:case _.SORT_DESC_STR:this._$order=_.SORT_DESC;break;default:this._$order=_.SORT_ASC}}getSelector(){return this._$selector}getOrder(){return this._$order}getNullPolicy(){return void 0===this._$nullPolicy?!this.getOrder():this._$nullPolicy}static get SORT_ASC(){return!1}static get SORT_DESC(){return!0}static get SORT_ASC_STR(){return"ASC"}static get SORT_DESC_STR(){return"DESC"}static get NULL_POLICY_FIRST(){return!1}static get NULL_POLICY_LAST(){return!0}}t.Order=_;class f{constructor(){this._select={},this._from="",this._as="",this._join=[],this._where={},this._groupBy=[],this._orderBy=[],this._offset=0,this._limit=void 0,this._union=[],this._meta={}}clone(){const e=new f;return e._select=i.object.clonePlain(this._select),e._from=this._from,e._as=this._as,e._join=this._join.slice(),e._where=i.object.clonePlain(this._where),e._groupBy=this._groupBy.slice(),e._orderBy=this._orderBy.slice(),e._offset=this._offset,e._limit=this._limit,e._meta=i.object.clonePlain(this._meta),e._union=i.object.clonePlain(this._union),e}clear(){return this._select={},this._from="",this._as="",this._join=[],this._where={},this._groupBy=[],this._orderBy=[],this._offset=0,this._limit=void 0,this._meta={},this._union=[],this}getSelect(){return this._select}select(e){return this._select=o(e),this}getFrom(){return this._from}getAs(){return this._as}from(e,t=""){return this._from=e,this._as=t,this}getJoin(){return this._join}join(e,t,r,i){let n=[];if("string"==typeof e)n=e.split(" ");else n=e;if(!(n instanceof Array))throw new Error('Invalid argument "name"');return this._join.push(new h({resource:n.shift()||"",as:n.shift()||"",on:t,select:o(r),inner:void 0===i?!0:i})),this}getWhere(){return this._where}where(e){const t=typeof(e=e||{});if("object"!==t&&"function"!==t)throw new TypeError('Invalid argument "expression"');return this._where=e,this}getUnion(){return this._union}union(...e){return e.forEach(((e,t)=>{if(!(e instanceof f))throw new TypeError(`Argument "queries[${t}]" should be an instance of Query.`)})),this._union=e,this}getOrderBy(){return this._orderBy}orderBy(e,t,r){if(void 0===t)t=!0;if(this._orderBy=[],"object"==typeof e){const t=e=>{if(e)for(const t in e)if(e.hasOwnProperty(t))this._orderBy.push(new _({selector:t,order:e[t]}))};if(e instanceof Array)for(let r=0;r<e.length;r++){const i=e[r];if(i instanceof Array){const[e,t,r]=i;this._orderBy.push(new _({selector:e,order:t,nullPolicy:r}))}else t(i)}else t(e)}else if(e)this._orderBy.push(new _({selector:e,order:t,nullPolicy:r}));return this}getGroupBy(){return this._groupBy}groupBy(e){if("string"==typeof e)e=[e];if(!(e instanceof Array))throw new Error("Invalid argument");return this._groupBy=e,this}getOffset(){return this._offset}offset(e){return this._offset=parseInt(e,10)||0,this}getLimit(){return this._limit}limit(e){return this._limit=e,this}getMeta(){return this._meta}meta(e){if("object"!=typeof(e=e||{}))throw new TypeError('Invalid argument "data"');return this._meta=e,this}}return t.default=f,Object.assign(f.prototype,{"[Types/_source/Query]":!0,_moduleName:"Types/source:Query"}),t}(0,{},o,t),j=x,E=function(e,t){"use strict";
133Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(){this.moduleName="Types/source:ServicePoolCallHandler"}handle(e){var t;const{transport:r}=e;if(!r)return e;const i=null===(t=r._options)||void 0===t?void 0:t.url;if(!i)return e;const n=i.indexOf("?")>-1?"&":"?";if(r.setUrl)r.setUrl(i+n+"srv=1");return e}},t}(0,{}),D=E,A=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e){this.moduleName="Types/source:TimeoutCallHandler",this._timeout=e}handle(e){if(this._timeout>0)e.timeout=this._timeout,e.headers["X-Timeout"]=this._timeout;return e}},t}(0,{}),I=A,R=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RootCallChainItem=t.CallChainItem=void 0;t.CallChainItem=class{constructor(e,t){if(this._moduleName="Types/source:CallChainItem",!e||!("handle"in e))throw TypeError('Argument "handler" should implement [Types/source:ICallHandler]');if(this._$handler=e,t)this._$next=t}setNext(e){return this._$next=e,e}getNext(){return this._$next}processRequest(e){try{const t=this._$handler.handle(e);return this._callNext(t)}catch(t){if(t instanceof Error)r.logger.error(this._moduleName,`call handler in chain throws an error "${t.message}". Chain item will be skipped`);return this._callNext(e)}}_callNext(e){if(this._$next)return this._$next.processRequest(e);else return e}};return t.RootCallChainItem=class{setNext(e){throw new Error("RootCallChainItem::setNext(): unable to set next node for root chain item")}getNext(){throw new Error("RootCallChainItem::getNext(): unable to get next node for root chain item")}processRequest(e){return e}},t}(0,{},t),k=R,N=function(e,t,r,i){"use strict";function n(e){if("function"==typeof e.getRawData)return s(e.getRawData(!0));else if(e instanceof Date){let t=i.TO_SQL_MODE.DATETIME;if(e instanceof r.Date)t=i.TO_SQL_MODE.DATE;else if(e instanceof r.Time)t=i.TO_SQL_MODE.TIME;else if(e instanceof r.DateTime)t=i.TO_SQL_MODE.DATETIME;else if(e.getSQLSerializationMode)switch(e.getSQLSerializationMode()){case Date.SQL_SERIALIZE_MODE_DATE:t=i.TO_SQL_MODE.DATE;break;case Date.SQL_SERIALIZE_MODE_TIME:t=i.TO_SQL_MODE.TIME;break;case Date.SQL_SERIALIZE_MODE_DATETIME:t=i.TO_SQL_MODE.DATETIME}return(0,i.dateToSql)(e,t)}else{let t=e;if(e.valueOf)t=e.valueOf();if(t&&"object"==typeof t)t=function(e){var t;const r={},i=Object.getPrototypeOf(e);if(null!==i&&i!==Object.prototype){const r={constructorName:null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name,moduleName:null==e?void 0:e._moduleName};throw new TypeError(`Unsupported object type ${JSON.stringify(r)}. Cannot serialize object for network request. Only plain objects, Records and RecordSets can be serialized`)}const n=Object.keys(e);let o=!1;for(let t=0;t<n.length;t++){const i=n[t],a=e[i],l=s(a);if(a!==l)o=!0;r[i]=l}if(e.hasOwnProperty("toJSON")&&e.toJSON!==r.toJSON)Object.defineProperties(r,{toJSON:{enumerable:!1,value:e.toJSON}});return o?r:e}(t);return t}}function s(e){if(Array.isArray(e))return function(e){let t=!1;const r=e.map((e=>{const r=s(e);if(e!==r)t=!0;return r}));return t?r:e}(e);else if(e&&"object"==typeof e)return n(e);else return e}return Object.defineProperty(t,"__esModule",{value:!0}),t.default=s,t}(0,{},o,s),B=N,L=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e){var t,r;if(this["[Types/_source/provider/IAbstract]"]=!0,this._httpMethodBinding={create:"POST",read:"GET",update:"POST",destroy:"POST",query:"POST",copy:"POST",merge:"POST",move:"POST"},e.transport)this._transport=e.transport;if("object"==typeof e.httpMethodBinding)this._httpMethodBinding={...this._httpMethodBinding,...e.httpMethodBinding};if(this._baseUrl=(null===(t=e.endpoint)||void 0===t?void 0:t.address)||"",null===(r=e.endpoint)||void 0===r?void 0:r.contract)this._baseUrl+=`/${e.endpoint.contract}`}_getTransport(){return this._transport||fetch}_getTransportOptions(e,t={}){const r={method:e};if("GET"!==e)r.body=JSON.stringify(t);return r}_buildUrl(e,t){const r=`${this._baseUrl}/${e}`;if(t&&Object.keys(t).length){const e=[];
133for(const r of Object.keys(t))if(void 0!==t[r])e.push(`${r}=${"string"==typeof t[r]?t[r]:JSON.stringify(t[r])}`);return encodeURI(`${r}?${e.join("&")}`)}return r}call(e,t,r,i,n){const s=i||this._httpMethodBinding[e],o="GET"===s?this._buildUrl(e,t):this._buildUrl(e);return new Promise(((e,r)=>{this._getTransport()(o,this._getTransportOptions(s,t)).then((t=>{if(t.ok)t.json().then(e).catch(r);else r("Error HTTP: "+t.status)})).catch(r)}))}},t}(0,{},"undefined"==typeof Types_PromiseAPIDeferred||Types_PromiseAPIDeferred),q=function(e,t,r,i,n,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o="Browser/Transport",a=(0,s.getTimeout)();let l;class c extends r.OptionsToPropertyMixin{constructor(e){super(),this["[Types/_source/provider/IAbstract]"]=!0,this._$logger=i.logger,this._$callTimeout=a,this._$endpoint={},this._$options={},r.OptionsToPropertyMixin.initMixin(this,e)}getEndpoint(){return this._$endpoint}call(t,r,i,s,a){const c=e=>{const n=this.getEndpoint();let s=t+"";if(!(s.indexOf(this._nameSpaceSeparator)>-1)&&n.contract)s=n.contract+this._nameSpaceSeparator+s;const o=!!this._$callTimeout,l={transportOptions:this._$options.transportOptions,serviceUrl:n.address||""};if(o)l.timeout=this._$callTimeout;let c=new e(l).callMethod(s,r||{},void 0,void 0,i,a,void 0,{});if(o)c=function(e,t,r,i,n){const s=!e.isReady,o=`Timeout of ${t} ms had expired before the method '${r}' at '${i}' returned any results`;let a;const l=()=>{if(a)clearTimeout(a),a=void 0};if(a=setTimeout((()=>{!function(e,t){t.info("Types/_source/provider/SbisBusinessLogic",e.message)}(new Error(o),n),l()}),t),s)return new Promise(((t,r)=>{e.then((e=>{l(),t(e)})).catch((e=>{l(),r(e)}))}));else return e.addCallbacks((e=>(l(),e)),(e=>(l(),e))),e}(c,this._$callTimeout,s,n.address||"",this._$logger);return c},d=function(t){if(t)return t;if(l)return l;if(n.constants.isServerSide){const{RPCJSON:e}=requirejs(o);return l=e,e}return new Promise(((t,r)=>{e([o],t,r)})).then((({RPCJSON:e})=>(l=e,e))).catch((function(e){requirejs.onError(e)}))}(this._$transport);if(d instanceof Promise)return d.then(c);else return c(d)}}return t.default=c,Object.assign(c.prototype,{"[Types/_source/provider/SbisBusinessLogic]":!0,_$transport:null,_nameSpaceSeparator:"."}),t}(d,{},o,t,c,i),H=function(e,t,r,i,n,s,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class a extends((0,o.mixin)(s.OptionsToPropertyMixin,s.SerializableMixin,r.default,i.default,n.default)){constructor(e){super(e={...e||{}}),this.initBaseSource(e)}initBaseSource(e){s.OptionsToPropertyMixin.initMixin(this,e),n.default.initMixin(this,e)}toJSON(e){return s.SerializableMixin.prototype.toJSON.call(this)}static fromJSON(e){return s.SerializableMixin.fromJSON.call(this,e)}static extend(e,t){return(0,o.deprecateExtend)(this,t,e,"Types/_source/Base")}static es5Constructor(e){e={...e||{}},a.prototype.initBaseSource.call(this,e)}}return t.default=a,Object.assign(a.prototype,{"[Types/_source/Base]":!0,_moduleName:"Types/source:Base"}),t}(0,{},M,O,g,o,t),Q=H,K=function(e,t,r,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChainFactory=void 0;class s extends((0,r.mixin)(i.DestroyableMixin)){constructor(e){super(),this._chain=this._generateChain(e)}getChain(e){if(e)this.updateChain(e);return this._chain}updateChain(e){if(function(e){if(!function(e){return e["[Types/_collection/List]"]}(e))throw TypeError('Argument "handlers" should be Types/collection:List of [Types/source:ICallHandler]')}(e),this.isChanged(e))return this._chain=this._generateChain(e),!0;else return!1}_generateChain(e){let t=this._generateChainItem();if(!e)return this._setChainVersion(-1),t;else return e.each((e=>{t=this._generateChainItem(e,t)})),this._setChainVersion(e.getVersion()),t}_generateChainItem(e,t){if(!e&&!t)return new n.RootCallChainItem;else return new n.CallChainItem(e,t)}processRequest(e){return this._chain.processRequest(e)}isChanged(e){return e.getVersion()!==this.getChainVersion()}_setChainVersion(e){if(!e)this._chainVersion=-1;this._chainVersion=e}getChainVersion(){return this._chainVersion}destroy(){this._chain=null,this._chainVersion=null,super.destroy()}}return t.ChainFactory=s,t}(0,{},t,o,R),F=K,z=function(e,t,r,i){"use strict";
133return Object.defineProperty(t,"__esModule",{value:!0}),t.Https=t.SbisBusinessLogic=void 0,Object.defineProperty(t,"SbisBusinessLogic",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"Https",{enumerable:!0,get:function(){return i.default}}),t}(0,{},q,L),J=z,U=function(e,t,r,i,n,s,o,a){"use strict";function l(e,t,r){if(t instanceof Array){for(let i=0;i<t.length;i++)if(l(e,t[i],r))return!0;return!1}if(e instanceof Array){for(let i=0;i<e.length;i++)if(!l(e[i],t,r))return!1;return!0}return e==t}var c;Object.defineProperty(t,"__esModule",{value:!0}),t.LOCAL_MOVE_POSITION=void 0,function(e){e.On="on",e.Before="before",e.After="after"}(c||(t.LOCAL_MOVE_POSITION=c={}));class d extends((0,o.mixin)(r.default,n.default)){get data(){return this._getTableAdapter().getData()}constructor(e){super(e),this["[Types/_source/ICrud]"]=!0,this["[Types/_source/ICrudPlus]"]=!0,this._reIndex()}create(e){return this._loadAdditionalDependencies().addCallback((()=>this._prepareCreateResult(e)))}read(e,t){const r=this._getRecordByKey(e);if(r)return this._loadAdditionalDependencies().addCallback((()=>this._prepareReadResult(r)));else return Promise.reject(new ReferenceError(`Can't perform read() because record with key "${e}" does not exist`))}update(e,t){const r=e=>{const t=e,r=this.getKeyProperty();let i=r?t.get(r):void 0;if(void 0===i)i="k"+Math.random().toString(36).substr(2)+ +new Date,t.set(r,i);const n=this._getTableAdapter(),s=this._getIndexByKey(i);if(-1===s){if(n.add(t.getRawData()),this._index)this._index[i]=n.getCount()-1}else n.replace(t.getRawData(),s);return i};let n;if(i.default.isRecordSetInstance(e))n=[],e.each((e=>{n.push(r(e))}));else n=r(e);return this._loadAdditionalDependencies().addCallback((()=>this._prepareUpdateResult(e,n)))}destroy(e,t){const r=e=>{const t=this._getIndexByKey(e);if(-1!==t)return this._getTableAdapter().remove(t),this._reIndex(),!0;else return!1},i=e instanceof Array?e:[e];for(let e=0,t=i.length;e<t;e++)if(!r(i[e]))return a.Deferred.fail(new ReferenceError(`Can't perform destroy() because record with key "${i[e]}" does not exist`));return a.Deferred.success(void 0)}query(e){let t=this._applyFrom(e?e.getFrom():void 0);const r=this.getAdapter();let i;if(e)t=this._applyJoin(t,e.getJoin()),t=this._applyWhere(t,e.getWhere(),e.getMeta()),t=this._applyOrderBy(t,e.getOrderBy()),t=this._applySelect(t,e.getSelect()),i=r.forTable(t).getCount(),t=this._applyPaging(t,e.getOffset(),e.getLimit());else if(this._$filter)t=this._applyWhere(t);else i=r.forTable(t).getCount();return this._loadAdditionalDependencies().addCallback((()=>this._prepareQueryResult({items:t,meta:{total:i}},e)))}merge(e,t){const r=t instanceof Array?t:[t],i=this._getTableAdapter(),n=this.getKeyProperty();try{r.forEach((t=>{const r=this._getIndexByKey(e);if(-1===r)throw new ReferenceError(`Can't perform merge() because target record with key "${e}" does not exist`);const s=this._getIndexByKey(t);if(-1===s)throw new ReferenceError(`Can't perform merge() because source record with key "${t}" does not exist`);i.merge(r,s,n),this._reIndex()}))}catch(e){return Promise.reject(e)}return Promise.resolve(e)}copy(e,t){const r=this._getIndexByKey(e);if(-1===r)return Promise.reject(new ReferenceError(`Can't perform copy() because record with key "${e}" does not exist`));else{const e=this._getTableAdapter().copy(r);return this._reIndex(),this._loadAdditionalDependencies().addCallback((()=>this._prepareReadResult(e)))}}move(e,t,r){r=r||{};const i=[];if(!(e instanceof Array))e=[e];const n=this._getTableAdapter(),s=this.getAdapter();e.sort(((e,t)=>{const i=this._getIndexByKey(e),n=this._getIndexByKey(t);return(null==r?void 0:r.position)===c.After?n-i:i-n})).forEach((e=>{const t=this._getIndexByKey(e);i.push(s.forRecord(n.at(t)))}));let o=-1,a=null;if(null!==t)if(o=this._getIndexByKey(t),a=s.forRecord(n.at(o)),-1===o)return Promise.reject(new ReferenceError('Can\'t perform move() because target position "${target}" is not found'));if(r.position===c.On)return this._hierarchyMove(i,a,r);else return this._reorderMove(i,a,r)}getAdapter(){if(super.getAdapter(),this._$adapter["[Types/_entity/adapter/IDataHolder]"]&&!this._settingUpDataH
133older)this._settingUpDataHolder=!0,this._$adapter.dataReference=this.data,this._settingUpDataHolder=!1;return this._$adapter}_wrapToDataSet(e){return super._wrapToDataSet(this._detachData(e))}_prepareCreateResult(e){return super._prepareCreateResult.call(this,this._detachData(e))}_prepareReadResult(e){return super._prepareReadResult.call(this,this._detachData(e))}_detachData(e){if(this._$cow)return e;else return o.object.clonePlain(e)}_getRecordByKey(e){return this._getTableAdapter().at(this._getIndexByKey(e))}_getIndexByKey(e){const t=this._index[e];return void 0===t?-1:t}_reIndex(){this._index={};const e=this.getAdapter();this._each(this.data,((t,r)=>{const i=e.forRecord(t).get(this._$keyProperty);this._index[i]=r}))}_applySelect(e,t){const r=Object.keys(t);if(!r.length)return e;const i=this.getAdapter(),n=i.forTable();return this._each(e,(e=>{const s=i.forRecord(e),o=i.forRecord();r.forEach((e=>{const r=t[e];if(!o.has(r)){const t=s.getFormat(e);t.setName(r),o.addField(t)}o.set(r,s.get(e))})),n.add(o.getData())})),n.getData()}_applyWhere(e,t,r){const i=t||{};if(i instanceof s.PartialExpression)throw new TypeError("Filtering by PartialExpression instance is not supported.");if(!this._$filter&&"object"==typeof i&&!Object.keys(i).length)return e;const n=this.getAdapter(),o=n.forTable(),a="function"==typeof i;return this._each(e,((e,t)=>{e=n.forRecord(e);let r=!0;if(this._$filter)r=this._$filter(e,i);else r=a?i(e,t):((e,t)=>{let r=!0;for(const i in e)if(e.hasOwnProperty(i))if(r=l(t.get(i),e[i],"="),!r)break;return r})(i,e);if(r)o.add(e.getData())})),o.getData()}_applyOrderBy(e,t){if(!(t=t||[]).length)return e;const r=[];for(let e=0;e<t.length;e++)r.push({field:t[e].getSelector(),order:t[e].getOrder()});const i=this.getAdapter(),n=[];this._each(e,((e,t)=>{let s;const o=[];for(let t=0;t<r.length;t++)s=i.forRecord(e).get(r[t].field),o.push(void 0===s?null:s);n.push({index:t,values:o})}));const s=(e,t)=>{if(null===e&&null!==t)return-1;if(null!==e&&null===t)return 1;if(e==t)return 0;else return e>t?1:-1};n.sort(((e,t)=>{let i=0;for(let n=0;n<r.length&&(i=(r[n].order?-1:1)*s(e.values[n],t.values[n]),0===i);n++);return i}));const o=i.forTable(e),a=i.forTable();for(let e=0,t=n.length;e<t;e++)a.add(o.at(n[e].index));return a.getData()}_applyPaging(e,t,r){if(0===(t=t||0)&&void 0===r)return e;const i=this.getAdapter().forTable(e);if(void 0===r)r=i.getCount();else r=r||0;const n=this.getAdapter().forTable();let s=0;const o=t,a=Math.min(i.getCount(),o+r);for(let e=o;e<a;e++,s++)n.add(i.at(e));return n.getData()}_reorderMove(e,t,r){let i;if(t){if(r.parentProperty)i=t.get(r.parentProperty);if(!r.position&&r.hasOwnProperty("before"))r.position=r.before?c.Before:c.After;const n=this._getTableAdapter(),s=t.get(this._$keyProperty);e.forEach((e=>{if(r.parentProperty)e.set(r.parentProperty,i);const t=this._getIndexByKey(e.get(this._$keyProperty));let o=this._getIndexByKey(s);if(r.position===c.Before&&o>t)o--;else if(r.position===c.After&&o<t)o++;n.move(t,o),this._reIndex()}))}return Promise.resolve()}_hierarchyMove(e,t,r){if(!r.parentProperty)return Promise.reject(new Error("Parent property is not defined"));const i=t?t.get(this._$keyProperty):null;return e.forEach((e=>{e.set(r.parentProperty,i)})),Promise.resolve()}static es5Constructor(e){r.default.es5Constructor.call(this,e),this["[Types/_source/ICrud]"]=!0,this["[Types/_source/ICrudPlus]"]=!0,d.prototype._reIndex.call(this)}}return t.default=d,Object.assign(d.prototype,{"[Types/_source/Local]":!0,_moduleName:"Types/source:Local",_$filter:null,_index:null}),t}(0,{},H,g,f,x,t,a),W=U,V=function(e,t,r,i,n,s,o,a,l,c,d,u,p,h,_,f){"use strict";function y(e){return null==e}function g(e){return""===e||y(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.NavigationTypes=void 0;const b=globalThis.DeferredCanceledError;var m;!function(e){e.PAGE="Page",e.OFFSET="Offset",e.POSITION="Position"}(m||(t.NavigationTypes=m={}));class P extends((0,p.mixin)(r.default,d.ObservableMixin,n.default,s.default,o.default)){static get NAVIGATION_TYPE(){return m}constructor(e){super(o.default._validateOptions(e)),this["[Types/_source/ICrud]"]=!0,this["[Types/_source/ICrudPlus]"]=!0,this["[Types/_source/IProvider]"]=!0,this.initRemote(e)}initRemote(e){var t;if(d.ObservableMixin.initMixin(this,e),this._$callHandlers)this.callHandlers=this._$callHandlers;if(!this.callHandlers)this.callHandlers=new _.List;if(null===(t=null==e?void 0:e.callbacks)||void 0===t?void 0:t.beforeProviderCall)this._beforeProviderCallCallback=e.callbacks.beforeProviderCall;this._publish("onBeforeProviderCall")}create(e){if(!this._$binding.create)throw new Error("Create binding not defined");return this._callProvider(this._$binding.create,this._$passing.create.call(this,e),this._getHandlerChain()).addCallback((e=>this._loadAdditionalDependencies().addCallback((()=>this._prepareCreateResult(e)))))}read(e,t){if(!this._$binding.read)throw new Error("Read binding not defined");return this._callProvider(this._$binding.read,this._$passing.read.call(this,e,t),this._getHandlerChain()).addCallback((e=>this._loadAdditionalDependencies().addCallback((()=>this._prepareReadResult(e)))))}update(e,t){if(!this._$binding.update)throw new Error("Update binding not defined");return this._callProvider(this._$binding.update,this._$passing.update.call(this,e,t),this._getHandlerChain()).addCallback((t=>this._prepareUpdateResult(e,t)))}destroy(e,t){if(!this._$binding.destroy)throw new Error("Destroy binding not defined");return this._callProvider(this._$binding.destroy,this._$passing.destroy.call(this,e,t),this._getHandlerChain())}query(e){if(!this._$binding.query)throw new Error("Query binding not defined");return this._callProvider(this._$binding.query,this._$passing.query.call(this,e),this._getHandlerChain()).addCallback((e=>this._loadAdditionalDependencies().addCallback((()=>this._prepareQueryResult(e)))))}merge(e,t){if(!this._$binding.merge)throw new Error("Merge binding not defined");return this._callProvider(this._$binding.merge,this._$passing.merge.call(this,e,t),this._getHandlerChain())}copy(e,t){var r;if(!this._$binding.copy)throw new Error("Copy binding not defined");return this._callProvider(this._$binding.copy,null===(r=this._$passing.copy)||void 0===r?void 0:r.call(this,e,t),this._getHandlerChain()).addCallback((e=>this._prepareReadResult(e)))}move(e,t,r){if(!this._$binding.move)throw new Error("Move binding not defined");return this._callProvider(this._$binding.move,this._$passing.move.call(this,e,t,r),this._getHandlerChain())}
133getProvider(){if(!this._provider)this._provider=this._createProvider(this._$provider,{endpoint:this._$endpoint,options:{...this._$options,...this._$transportOptions}});return this._provider}getCallHandlers(){return this.callHandlers}hasCallHandler(e){let t=!1;if(!e.moduleName)return!1;else return this.getCallHandlers().each((r=>{if(r.moduleName===e.moduleName)t=!0})),t}toJSON(e){return super.toJSON()}_createProvider(e,t){if(!e)throw new Error("Remote access provider is not defined");if("string"==typeof e)e=(0,u.create)(e,t);return e}_callProvider(e,t,r,i){const n=this.getProvider(),s=this._notifyBeforeProviderCall(e,t);if(void 0!==s)t=s;const o=n.call(e,this._prepareProviderArguments(t),i,void 0,r);if(this._$options.debug)o.catch((t=>{if(t instanceof b)p.logger.info(this._moduleName,`calling of remote service "${e}" has been cancelled.`);else p.logger.error(this._moduleName,`remote service "${e}" throws an error "${t.message}".`);return t}));return o.catch((t=>{if(function(e){var t,r;return 404===e.httpError&&(null===(t=null==e?void 0:e.details)||void 0===t?void 0:t.startsWith("The method "))&&(null===(r=null==e?void 0:e.details)||void 0===r?void 0:r.endsWith(" is not found or accessible."))}(t)){const t=`Method ${e} was not found on ${JSON.stringify(this.getEndpoint())}`;p.logger.stackToCloud(t,2,"error")}return t})),o}_prepareProviderArguments(e){return(0,c.default)(e)}_getValidKeyProperty(e){const t=this.getKeyProperty();if(!g(t))return t;if("function"==typeof e.getKeyProperty)return e.getKeyProperty();if("function"==typeof e.getIdProperty)return e.getIdProperty();else return t}_getHandlerChain(){if(!this._chainFactory)this._chainFactory=new h.ChainFactory;return this._chainFactory.getChain(this.callHandlers)}_notifyBeforeProviderCall(e,t){let r;if(this._beforeProviderCallCallback)r=this._resolveCallback(this._beforeProviderCallCallback);return r?r(e,t):this._notify("onBeforeProviderCall",e,t)}_resolveCallback(e){const t=(0,f.loadSync)(e);if(t)if("function"==typeof t)return t;else p.logger.info(`${this._moduleName}::callbacks.beforeProviderCall: resolved callback should type of function`);else p.logger.info(`${this._moduleName}::callbacks.beforeProviderCall: resolved empty module ${this._beforeProviderCallCallback}`)}static fromJSON(e){return r.default.fromJSON.call(this,e)}_getSerializableState(e){return{...d.SerializableMixin.prototype._getSerializableState.call(this,e),_beforeProviderCallCallback:this._beforeProviderCallCallback}}_setSerializableState(e){const t=d.SerializableMixin.prototype._setSerializableState(e);return function(){t.call(this),this._beforeProviderCallCallback=e._beforeProviderCallCallback}}static es5Constructor(e){r.default.es5Constructor.call(this,o.default._validateOptions(e)),this["[Types/_source/ICrud]"]=!0,this["[Types/_source/ICrudPlus]"]=!0,this["[Types/_source/IProvider]"]=!0,P.prototype.initRemote.call(this,e)}}return t.default=P,Object.assign(P.prototype,{"[Types/_source/Remote]":!0,_moduleName:"Types/source:Remote",_provider:null,_$provider:null,_$callHandlers:null,_$passing:(0,d.getMergeableProperty)({create:function(e){return{meta:e}},read:function(e,t){return{key:e,meta:t}},update:function(t,r){if(this._$options.updateOnlyChanged){const r=this._getValidKeyProperty(t);if(!g(r)){const n=t;if(i.default.isModelInstance(t)&&!y(n.get(r))){const i=e("Types/entity").Record,s=n.getChanged();s.unshift(r),t=i.filterFields(t,s)}else if(i.default.isRecordSetInstance(t))t=(t=>{const i=new(0,e("Types/collection").RecordSet)({adapter:t.getAdapter(),keyProperty:t.getKeyProperty()});return t.each((e=>{if(y(e.get(r))||e.isChanged())i.add(e)})),i})(t)}}return{data:t,meta:r}},destroy:function(e,t){return{keys:e,meta:t}},query:function(e){return e instanceof l.default?{select:e.getSelect(),from:e.getFrom(),where:e.getWhere(),orderBy:e.getOrderBy(),offset:e.getOffset(),limit:e.getLimit()}:e},copy:function(e,t){return{key:e,meta:t}},merge:function(e,t){return{from:e,to:t}},move:function(e,t,r){return{from:e,to:t,meta:r}}}),_$options:(0,d.getMergeableProperty)(a.default.addOptions(r.default,{updateOnlyChanged:!1,navigationType:m.PAGE}))}),P.prototype._prepareArgumentsForCall=P.prototype._prepareProviderArguments,d.adapter.Abstract.prototype.serialize=c.default,t}(d,{},H,g,f,h,v,M,x,N,o,p,t,K,l,e),G=V,Y=function(e,t,r,i,n,s){"use strict";
133Object.defineProperty(t,"__esModule",{value:!0});const o=Symbol("cachedAdapter"),a={};class l extends r.default{constructor(e){super(e),this.initMemory(e)}initMemory(e){if(e&&e.endpoint&&e.endpoint.contract&&!a.hasOwnProperty(e.endpoint.contract))a[e.endpoint.contract]=this._$data}_prepareQueryResult(e,t){if(e&&void 0===e.items)e.items=this._getEmptyData(t);return super._prepareQueryResult(e)}_getTableAdapter(){if(!this[o])this[o]=this.getAdapter().forTable(this._$data);return this[o]}_applyFrom(e){return e?a[e]:this.data}_applyJoin(e,t){if(t.length)throw new Error("Joins are not supported");return e}_applyWhere(e,t,r){if(t&&"object"==typeof t)delete(t={...t}).РазвоÑоÑ,delete t.ÐидÐеÑева,delete t.usePages;return super._applyWhere(e,t,r)}_getEmptyData(e){this._emptyData=this._emptyData||new s.Map;const t=e?e.getFrom():void 0;if(!this._emptyData.has(t)){const e=n.object.clonePlain(this._applyFrom(t)),r=this.getAdapter().forTable(e);r.clear(),this._emptyData.set(t,r.getData())}return this._emptyData.get(t)}static es5Constructor(e){r.default.es5Constructor.call(this,e),l.prototype.initMemory.call(this,e)}}return t.default=l,Object.assign(l.prototype,{"[Types/_source/Memory]":!0,_moduleName:"Types/source:Memory",_$data:null,_dataSetItemsProperty:"items",_dataSetMetaProperty:"meta",_emptyData:null}),(0,i.register)("Types/source:Memory",l,{instantiate:!1}),t}(0,{},U,p,t,r),Z=Y,X=function(e,t,r,i,n,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class o extends((0,n.mixin)(i.OptionsToPropertyMixin,i.SerializableMixin)){get _keyProperty(){return this._source.getKeyProperty()}get data(){return this._source.data}constructor(e){super(),this["[Types/_source/IDecorator]"]=!0,this["[Types/_source/ICrud]"]=!0,this["[Types/_source/ICrudPlus]"]=!0,i.OptionsToPropertyMixin.initMixin(this,e),this._source=new r.default(e)}getOriginal(){return this._source}getAdapter(){return this._source.getAdapter()}create(e){return this._source.create(e)}read(e,t){return this._source.read(e,t)}update(e,t){return this._source.update(e,t)}destroy(e,t){return this._source.destroy(e,t)}query(t){return new Promise(((r,n)=>{new Promise(((t,r)=>{e(["Types/collection"],t,r)})).then((e=>{const[s,o]=this._prepareQuery(t);this._source.query(s).then((t=>{if(this._$parentProperty){const r=new i.relation.Hierarchy({keyProperty:this._keyProperty,parentProperty:this._$parentProperty}),n=new e.RecordSet({rawData:this._source.data,adapter:this._source.getAdapter(),keyProperty:this._keyProperty}),a=new e.RecordSet({adapter:this._source.getAdapter(),keyProperty:this._keyProperty}),l=s.getWhere();if(this._$parentProperty in l){const e=l[this._$parentProperty];let t=n.getRecordById(e);if(t){let e;for(a.add(t,0);t&&(e=r.getParent(t,n));)a.add(e,0),t=e.get(this._keyProperty)}}const c=t.getRawData();let d;if(o)d=this._calcEntryPath(n,o);if(c){const e=c.meta||{};if(e.path=a,d)e.ENTRY_PATH=d;c.meta=e,t.setRawData(c)}}r(t)})).catch(n)})).catch(n)}))}merge(e,t){return this._source.merge(e,t)}copy(e,t){return this._source.copy(e,t)}move(e,t,r){return this._source.move(e,t,r)}_getSerializableState(e){const t=i.SerializableMixin.prototype._getSerializableState.call(this,e);return t._source=this._source,t}_setSerializableState(e){const t=i.SerializableMixin.prototype._setSerializableState(e);return function(){t.call(this),this._source=e._source}}_calcEntryPath(e,t){if(!(0,s.isRecord)(t))return;const r="marked",n=[],o=new i.relation.Hierarchy({keyProperty:this._keyProperty,parentProperty:this._$parentProperty});if(t.has(r))t.get(r).forEach((t=>{let r,i=e.getRecordById(t);for(;i&&(r=o.getParent(i,e));)n.push({id:i.get(this._keyProperty),parent:r.get(this._keyProperty)}),i=r}));return n}_prepareQuery(e){if(!e)return[e,null];let t,r=e.getWhere();if(r&&"object"==typeof r){if("entries"in r)t=r.entries;r={...r},delete r.entries,delete r.selectionWithPath,delete r.selection}return[e.where(r),t]}}return t.default=o,Object.assign(o.prototype,{"[Types/_source/HierarchicalMemory]":!0,_moduleName:"Types/source:HierarchicalMemory",_$parentProperty:null}),t}(d,{},Y,o,t,n),ee=X,te=function(e,t,r,i){"use strict";
133Object.defineProperty(t,"__esModule",{value:!0});class n extends r.default{constructor(e){super(e)}_createProvider(e,t){return new i.Https({...this.providerOptions,...t})}get providerOptions(){return{httpMethodBinding:this._$httpMethodBinding}}invoke(e,t,r){return this.getProvider().call(e,r,void 0,t)}}return t.default=n,t}(0,{},V,z),re=te,ie=function(e,t,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends r.default{constructor(){super(...arguments),this["[Types/_source/IRpc]"]=!0}call(e,t={},r){const n=this._getHandlerChain();return this._callProvider(e,t,n,r).addCallback(i.Deferred.skipLogExecutionTime((e=>this._loadAdditionalDependencies().addCallback(i.Deferred.skipLogExecutionTime((()=>this._wrapToDataSet(e)))))))}}return t.default=n,Object.assign(n.prototype,{"[Types/_source/Rpc]":!0,_moduleName:"Types/source:Rpc"}),t}(0,{},V,a),ne=ie,se=function(e,t,r,i,n,s,o,a,l){"use strict";function c(e,t){return t.indexOf(".")>-1?t:e+"."+t}function d(e){if((e=String(e||"")).match(O))return e.split(",")[0];else return e}function u(e,t){if((e=String(e||"")).match(O))return e.split(",")[1];else return t}function p(e,t){if((e=String(e||"")).match(O))return e.split(",",2);else return[e,t]}function h(e,t){const r={};let i;for(let n=0,s=e.length;n<s;n++)i=u(e[n],t),r[i]=r[i]||[],r[i].push(d(e[n]));return r}function _(e,t){if(e instanceof o.Record)return e;return(0,a.resolve)("Types/entity:Record").fromObject(e,t)}function f(e,t,r){if(null===e)return null;if(e&&n.default.isRecordSetInstance(e))return e;const i=new((0,a.resolve)("Types/collection:RecordSet"))({adapter:t,keyProperty:r});if(e instanceof Array){const r=e.length;for(let n=0;n<r;n++)i.add(_(e[n],t))}return i}function y(e,t,r){t(e,r),e.getUnion().forEach((r=>{y(r,t,e)}))}function g(e){if(!e)return null;let t=null;return y(e,(e=>{const r=e.getOrderBy();for(let e=0;e<r.length;e++){const i=r[e];if(!t)t=[];t.push({n:i.getSelector(),o:i.getOrder(),l:i.getNullPolicy()})}})),t}function b(e,t,r){const i=[];if(!e)return i;else return y(e,(e=>{const n=e.getOffset(),o=e.getLimit(),a=e.getMeta(),l=t.hasMoreProperty,c=a.hasOwnProperty(l)?a[l]:n>=0,d=0===n,u=null==o;let p=null;switch(a.navigationType||t.navigationType){case s.NavigationType.Page:if(!d||!u){const e=o||0;p={СÑÑаниÑа:e>0?Math.floor(n/e):0,РазмеÑСÑÑаниÑÑ:o,ÐÑÑÑÐÑе:c}}break;case s.NavigationType.Position:if(!u){const t={position:null,direction:null},i=e.getWhere();(0,s.playExpression)(i,((e,r)=>{if(function(e,t,r){if(void 0===t)return!1;const i=e.match(T);if(!i)return!1;const n=i[1],s=i[2];if(null!==t){if(!r.position)r.position={};r.position[n]=t}if(!r.direction)switch(s){case"~":r.direction=M.bothways;break;case"<":case"<=":r.direction=M.backward}return!0}(e,r,t))delete i[e]})),p={HasMore:c,Limit:o,Direction:t.direction||M.forward,Position:t.position instanceof Array?f(t.position,r):_(t.position,r)}}break;default:if(!d||!u)p={Offset:n||0,Limit:o,HasMore:c}}i.push(p)})),i}function m(e){const t=[];if(!e)return t;else return y(e,(e=>{const r=e.getWhere(),i=r instanceof o.Record?r:function(e){const t={};let r="";return(0,s.playExpression)(e,((e,i)=>{if("or"===r){if(t[e]=t[e]||[],void 0!==i)t[e].push(i)}else t[e]=i}),(e=>{r=e}),((e,t)=>{r=t})),t}(r),n=e.getMeta();if(n)switch(n.expand){case s.ExpandMode.None:i.РазвоÑоÑ="Ðез ÑазвоÑоÑа";break;case s.ExpandMode.Nodes:i.РазвоÑоÑ="С ÑазвоÑоÑом",i.ÐидÐеÑева="ТолÑко ÑзлÑ";break;case s.ExpandMode.Leaves:i.РазвоÑоÑ="С ÑазвоÑоÑом",i.ÐидÐеÑева="ТолÑко лиÑÑÑÑ";break;case s.ExpandMode.All:i.РазвоÑоÑ="С ÑазвоÑоÑом",i.ÐидÐеÑева="Ð£Ð·Ð»Ñ Ð¸ лиÑÑÑÑ"}t.push(i)})),t}function P(e){if(!e)return e;return e.reduce(((e,t)=>{if(t instanceof o.Record)if(!e)return t;else return t.each(((t,r)=>{l.object.setPropertyValue(e,r,t)})),e;else if(e instanceof o.Record)return e.set(t),e;return{...e||{},...t}}),null)}function v(e){const t=this._$adapter;let r=b(e,this._$options,t);const i=m(e),n=g(e),s=function(e){const t=[];if(!e)return t;else return y(e,(e=>{let r=e.getSelect();if(r instanceof o.Record){const e={};r.each(((t,r)=>{e[t]=r})),r=e}if(r instanceof Object){const e=[],t=r;for(const i in r)if(r.hasOwnProperty(i))e.push(t[i]);r=e}if(!(r instanceof Array))throw new TypeError("Types/_source/SbisService::getAdditionalParams(): unsupported data type. Only Array, Types/_entity/Record or Object are allowed.");t.push(...r)})),t}(e),a=r.length>1;if(a)r=function(e,t,r){const i=[];return e.forEach(((e,n)=>{const s=t[n]||{},a=Object.entries(s).filter((([e,t])=>t instanceof o.applied.PrimaryKey)).map((([e,t])=>(delete s[e],t)));i.push({id:0===a.length?null:a.length?a[0]:a,nav:_(e,r)})})),i}(r,i,t);return{ФилÑÑÑ:_(P(i),t),СоÑÑиÑовка:f(n,t,this.getKeyProperty()),ÐавигаÑиÑ:a?f(r,t,this.getKeyProperty()):r.length?_(r[0],t):null,ÐопÐолÑ:s}}function $(e,t,r){l.logger.info(this._moduleName,"Move elements through moveAfter and moveBefore methods have been deprecated, please use just move instead.");const i=r.before?this._$binding.moveBefore:this._$binding.moveAfter,n={ÐоÑÑдковÑйÐомеÑ:this._$orderProperty,ÐеÑаÑÑ
иÑ:r.hierField||null,ÐбÑекÑ:this._$endpoint.moveContract,ÐдÐ:p(e,this._$endpoint.contract)},s=this._getHandlerChain();return n[r.before?"ÐдÐÐо":"ÐдÐÐоÑле"]=p(t,this._$endpoint.contract),this._callProvider(this._$endpoint.moveContract+"."+i,n,s)}
133Object.defineProperty(t,"__esModule",{value:!0}),t.getQueryArguments=t.passQuery=void 0;const O=/^[0-9]+,[Ð-ÑA-z0-9]+$/,T=/(.+)([<>]=?|~)$/;var M;!function(e){e.backward="backward",e.forward="forward",e.bothways="bothways"}(M||(M={})),t.passQuery=v,t.getQueryArguments=function(e,t){const r=new S(t);return v.call(r,e)};class S extends r.default{constructor(e){super(e),this.initSbisService()}initSbisService(){if(!this._$endpoint.moveContract)this._$endpoint.moveContract="IndexNumber"}getOrderProperty(){return this._$orderProperty}setOrderProperty(e){this._$orderProperty=e}create(e){return this._loadAdditionalDependencies((t=>{this._connectAdditionalDependencies(super.create(e),t)}))}update(e,t){if(this._$binding.updateBatch&&n.default.isRecordSetInstance(e))return this._loadAdditionalDependencies((t=>{this._connectAdditionalDependencies(this._callProvider(this._$binding.updateBatch,function(e){const t=(0,a.resolve)("Types/collection:RecordSet").patch(e);return{changed:t.get("changed"),added:t.get("added"),removed:t.get("removed")}}(e),this._getHandlerChain()).addCallback((t=>this._prepareUpdateResult(e,t))),t)}));else return super.update(e,t)}destroy(e,t){const r=(e,t,r)=>this._callProvider(this._$endpoint.contract===t?this._$binding.destroy:c(t,this._$binding.destroy),this._$passing.destroy.call(this,e,r),this._getHandlerChain());if(!(e instanceof Array))return r([d(e)],u(e,this._$endpoint.contract),t);const i=h(e,this._$endpoint.contract);return Promise.all(Object.keys(i).map((e=>r(i[e],e,t))))}query(e){return e=l.object.clonePlain(e),this._loadAdditionalDependencies((t=>{this._connectAdditionalDependencies(super.query(e),t)}))}move(e,t,r){const i=r||{};if(this._$binding.moveBefore)return $.call(this,e,t,i);if(null!==t)t=d(t);const n=h(e,this._$endpoint.contract);return Promise.all(Object.keys(n).map((e=>{var r;i.objectName=e;const s=c(this._$endpoint.moveContract,this._$binding.move),o=null===(r=this._$passing.move)||void 0===r?void 0:r.call(this,n[e],t,i),a=this._getHandlerChain();if("IndexNumber.Move"!==s)null==o||delete o.Sorting;return this._callProvider(s,o,a)})))}
133getProvider(){if(!this._provider)this._provider=this._createProvider(this._$provider,{endpoint:this._$endpoint,options:this._$options,service:this._$endpoint.address,resource:this._$endpoint.contract});return this._provider}static es5Constructor(e){r.default.es5Constructor.call(this,e),S.prototype.initSbisService.call(this,e)}}return t.default=S,Object.assign(S.prototype,{"[Types/_source/SbisService]":!0,_moduleName:"Types/source:SbisService",_$binding:(0,o.getMergeableProperty)({create:"СоздаÑÑ",read:"ÐÑоÑиÑаÑÑ",update:"ÐапиÑаÑÑ",updateBatch:"",destroy:"УдалиÑÑ",query:"СпиÑок",copy:"ÐопиÑоваÑÑ",merge:"ÐбÑединиÑÑ",move:"Move",format:""}),_$passing:(0,o.getMergeableProperty)({create:function(e){if(!(e instanceof o.Record))if(!("ÐÑзовÐзÐÑаÑзеÑа"in(e={...e||{}})))e.ÐÑзовÐзÐÑаÑзеÑа=!0;return{ФилÑÑÑ:_(e,this._$adapter),ÐмÑÐеÑода:this._$binding.format||null}},read:function(e,t){const r=this._$binding,i=this._$options.passAddFieldsFromMeta,n={ÐдÐ:e,ÐмÑÐеÑода:r.format||null};if(i&&t&&Object.keys(t).length)n.ÐопÐолÑ=t;return n},update:function(e,t){const i=r.default.prototype._$passing.update.call(this,e,t),s={},o=n.default.isRecordSetInstance(i.data)?"ÐапиÑи":"ÐапиÑÑ",a=this._$options.passAddFieldsFromMeta;if(s[o]=i.data,a&&t&&Object.keys(t).length)s.ÐопÐолÑ=t;return s},destroy:function(e,t){const r={ÐдÐ:e};if(t&&Object.keys(t).length)r.ÐопÐолÑ=t;return r},query:v,copy:function(e,t){const r={ÐдÐ:e,ÐмÑÐеÑода:this._$binding.format};if(t&&Object.keys(t).length)r.ÐопÐолÑ=t;return r},merge:function(e,t){return{ÐдÐ:e,ÐдÐУд:t}},move:function(e,t,r){return{IndexNumber:this._$orderProperty,HierarchyName:(null==r?void 0:r.parentProperty)||null,ObjectName:null==r?void 0:r.objectName,ObjectId:e,DestinationId:t,Order:null==r?void 0:r.position,Sorting:f(g(null==r?void 0:r.query),this._$adapter,this.getKeyProperty()),ReadMethod:c(null==r?void 0:r.objectName,this._$binding.read),UpdateMethod:c(null==r?void 0:r.objectName,this._$binding.update)}}}),_$adapter:"Types/entity:adapter.Sbis",_$provider:"Types/source:provider.SbisBusinessLogic",_$orderProperty:"ÐоÑÐомеÑ",_$options:(0,o.getMergeableProperty)(i.default.addOptions(r.default,{hasMoreProperty:"hasMore",passAddFieldsFromMeta:!1}))}),(0,a.register)("Types/source:SbisService",S,{instantiate:!1}),t}(0,{},ie,M,g,x,o,p,t),oe=se,ae=function(e,t,r,i,n,s,o){"use strict";function a(e,t){const r=Array.isArray(t.fields)&&t.fields.length?t.fields:[this._$keyProperty],i=t.parameters?n.Model.fromObject(t.parameters,new n.adapter.Sbis):null;return{Name:this._$objectName,ID:e||null,Properties:r,Parameters:i}}function l(e){return{Name:this._$objectName,Object:e.object,Fields:e.fields}}Object.defineProperty(t,"__esModule",{value:!0});class c extends((0,i.mixin)(n.OptionsToPropertyMixin,n.SerializableMixin,s.default,o.default)){constructor(e){super(e)}create(e={}){if(!this._$binding.create)throw new Error("Create binding not defined");return this._callProvider(this._$binding.create,l.call(this,e))}destroy(e,t){throw new Error("DataObject does not provide a method for deleting a record yet.")}read(e,t={}){if(!this._$binding.read)throw new Error("Read binding not defined");const r=null!==e?String(e):e;return this._callProvider(this._$binding.read,a.call(this,r,t)).then((e=>this._prepareReadResult(e)))}update(e,t={}){return Promise.resolve()}query(e){if(!this._$binding.query)throw new Error("Query binding not defined");return this._callProvider(this._$binding.query,this.passQuery.call(this,e))}passQuery(e){const t=r.passQuery.call(this.getSource(),e);if(this._$objectName)t["Ðазвание"]=this._$objectName;if(!Object.keys(e.getWhere()).length)t["ФилÑÑÑ"]=null;return t}call(e={}){if(!this._$binding.execute)throw new Error("Execute binding not defined");return this.getSource().call(this._$binding.execute,e)}getSource(){if(this._source)return this._source;else return this._source=new r.default({endpoint:this._$endpoint,binding:this._$binding})}_callProvider(e,t){if(!e)throw new Error("Binding for called method not defined");if(!this._$objectName)throw new Error("objectName not defined");
133return this.getSource().call(e,t)}_prepareReadResult(e){return e.getRow()}}return c._moduleName="Frame-DataEnv/dataLoader:DataObject",t.default=c,Object.assign(c.prototype,{_$objectName:null,_$binding:(0,n.getMergeableProperty)({create:"Create",read:"Read",update:"Write",destroy:"Destroy",query:"List",execute:"Execute"}),_$endpoint:"DataObject",_$keyProperty:"Id"}),t}(0,{},se,t,o,M,g),le=ae,u.DataObject=u.jsonize=u.TimeoutCallHandler=u.ServicePoolCallHandler=u.ChainFactory=u.RootCallChainItem=u.CallChainItem=u.sbisServiceGetQueryArguments=u.SbisService=u.Restful=u.Rpc=u.NavigationTypes=u.Remote=u.QueryOrExpression=u.queryOrExpression=u.QueryOrder=u.QueryNavigationType=u.QueryJoin=u.QueryExpandMode=u.Query=u.QueryAndExpression=u.queryAndExpression=u.QueryPartialExpression=u.provider=u.PrefetchProxy=u.Memory=u.LOCAL_MOVE_POSITION=u.Local=u.HierarchicalMemory=u.DataSet=u.DataMixin=u.EndpointMixin=u.DataCrudMixin=u.LazyMixin=u.OptionsMixin=u.BindingMixin=u.Base=void 0,Object.defineProperty(u,"Base",{enumerable:!0,get:function(){return Q.default}}),Object.defineProperty(u,"BindingMixin",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(u,"OptionsMixin",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(u,"LazyMixin",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(u,"DataCrudMixin",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(u,"EndpointMixin",{enumerable:!0,get:function(){return $.default}}),Object.defineProperty(u,"DataMixin",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(u,"DataSet",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(u,"HierarchicalMemory",{enumerable:!0,get:function(){return ee.default}}),Object.defineProperty(u,"Local",{enumerable:!0,get:function(){return W.default}}),Object.defineProperty(u,"LOCAL_MOVE_POSITION",{enumerable:!0,get:function(){return W.LOCAL_MOVE_POSITION}}),Object.defineProperty(u,"Memory",{enumerable:!0,get:function(){return Z.default}}),Object.defineProperty(u,"PrefetchProxy",{enumerable:!0,get:function(){return C.default}}),u.provider=J,Object.defineProperty(u,"QueryPartialExpression",{enumerable:!0,get:function(){return j.PartialExpression}}),Object.defineProperty(u,"queryAndExpression",{enumerable:!0,get:function(){return j.andExpression}}),Object.defineProperty(u,"QueryAndExpression",{enumerable:!0,get:function(){return j.AndExpression}}),Object.defineProperty(u,"Query",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(u,"QueryExpandMode",{enumerable:!0,get:function(){return j.ExpandMode}}),Object.defineProperty(u,"QueryJoin",{enumerable:!0,get:function(){return j.Join}}),Object.defineProperty(u,"QueryNavigationType",{enumerable:!0,get:function(){return j.NavigationType}}),Object.defineProperty(u,"QueryOrder",{enumerable:!0,get:function(){return j.Order}}),Object.defineProperty(u,"queryOrExpression",{enumerable:!0,get:function(){return j.orExpression}}),Object.defineProperty(u,"QueryOrExpression",{enumerable:!0,get:function(){return j.OrExpression}}),Object.defineProperty(u,"Remote",{enumerable:!0,get:function(){return G.default}}),Object.defineProperty(u,"NavigationTypes",{enumerable:!0,get:function(){return G.NavigationTypes}}),Object.defineProperty(u,"Rpc",{enumerable:!0,get:function(){return ne.default}}),Object.defineProperty(u,"SbisService",{enumerable:!0,get:function(){return oe.default}}),Object.defineProperty(u,"sbisServiceGetQueryArguments",{enumerable:!0,get:function(){return oe.getQueryArguments}}),Object.defineProperty(u,"Restful",{enumerable:!0,get:function(){return re.default}}),Object.defineProperty(u,"CallChainItem",{enumerable:!0,get:function(){return k.CallChainItem}}),Object.defineProperty(u,"RootCallChainItem",{enumerable:!0,get:function(){return k.RootCallChainItem}}),Object.defineProperty(u,"ChainFactory",{enumerable:!0,get:function(){return F.ChainFactory}}),Object.defineProperty(u,"ServicePoolCallHandler",{enumerable:!0,get:function(){return D.default}}),Object.defineProperty(u,"TimeoutCallHandler",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(u,"jsonize",{enumerable:!0,get:function(){return B.default}}),Object.defineProperty(u,"DataObject",{enumerable:!0,get:function(){return le.default}}),(0,p.register)("Types/source:DataSet",P.default,{instantiate:!1}),(0,p.register)("Types/source:provider.SbisBusinessLogic",J.SbisBusinessLogic,{instantiate:!1}),(0,p.register)("Types/source:Memory",Z.default,{instantiate:!1}),(0,p.register)("Types/source:SbisService",oe.default,{instantiate:!1}),u})); 134define("Controls/popup",["react/jsx-runtime","react-dom","react","WasabyLoader/ModulesLoader","UI/Utils","UI/Theme","UI/HotKeys","UI/Focus","UI/Base","UI/Async","UI/Adaptive","Types/deferred","Types/collection","EnvTouch/EnvTouch","Env/Env","Core/helpers/isNewEnvironment","Core/helpers/Number/randomId","Controls/freezeContext","Controls/Pending","Compiler/IR","Browser/Storage","Application/Env","require","exports","Controls/Container/Async","css!Controls/popup"],(function(e,t,o,n,r,i,s,l,p,a,u,d,c,h,f,m,_,g,v,C,P,O,y,b){var I,S,T,w,x,M,k,A,j,B,N,D,H,z,R,L,E,V,F,U,W,$,K,Z,q,X,Y,G,J,Q,ee,te,oe,ne,re,ie,se,le,pe,ae,ue,de,ce,he,fe,me,_e,ge,ve,Ce,Pe,Oe,ye,be,Ie;
134return Object.defineProperty(b,"__esModule",{value:!0}),I=function(e,t,o,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Context=void 0;const r=(0,n.createContext)(null);return t.Context=r,t.default=function(e){const t=(0,n.useMemo)((()=>({sendResult:e.sendResult,close:e.close,forceClose:e.forceClose,maximized:e.maximized,updateProps:e.updateProps,popupDragStart:e.popupDragStart,popupDragEnd:e.popupDragEnd,popupMovingSize:e.popupMovingSize,isPopup:e.isPopup,popupId:e.popupId,closeStackWrapper:e.closeStackWrapper,getLeftContentVisible:e.getLeftContentVisible,recenterVerticalPosition:e.recenterVerticalPosition,allowAdaptive:e.allowAdaptive})),[e.close,e.forceClose,e.sendResult,e.maximized,e.updateProps,e.popupDragStart,e.popupDragEnd,e.popupMovingSize,e.isPopup,e.popupId,e.closeStackWrapper,e.getLeftContentVisible,e.recenterVerticalPosition,e.allowAdaptive]),i={...e};return delete i.children,(0,o.jsx)(r.Provider,{value:t,children:(0,n.cloneElement)(e.children,{...i})})},t}(0,{},e,o),S=I,T=function(e,t,o,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Context=void 0;const r=(0,n.createContext)(null);return t.Context=r,t.default=function(e){const t=(0,n.useMemo)((()=>({onOpenInfoBox:e.onOpenInfoBox,onCloseInfoBox:e.onCloseInfoBox,onForceCloseInfoBox:e.onForceCloseInfoBox,onMouseDown:e.onMouseDown,onMouseMove:e.onMouseMove})),[e.onCloseInfoBox,e.onForceCloseInfoBox,e.onOpenInfoBox,e.onMouseDown,e.onMouseMove]),i={...e};return delete i.children,(0,o.jsx)(r.Provider,{value:t,children:(0,n.cloneElement)(e.children,{...i})})},t}(0,{},e,o),w=T,x=function(e,t,o,n,r,i,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const l="popupAccordionTemplate";class p{setState(e){var t;null===(t=(0,o.getStore)(l))||void 0===t||t.set("accordionTemplate",e)}getState(){var e;return null===(e=(0,o.getStore)(l))||void 0===e?void 0:e.get("accordionTemplate")}}return t.default=new class{constructor(){this._bottomTemplateVisible=!0,this._stackPosition="right",this._openPopupCallbacks=[],this._allowAdaptive=!0}setController(e){this._controller=e}getController(){return this._controller}find(e){return this._controller.find(e)}getManager(){return this._controller}setIndicator(e){this._indicator=e}getIndicator(){return this._indicator}setContainer(e){if(this._container=e,this._containerPromiseResolver)this._containerPromiseResolver(),this._containerPromise=null}getContainer(){return this._container}getContainerPromise(){if(!this._containerPromise)this._containerPromise=new Promise((e=>{this._containerPromiseResolver=e}));return this._containerPromise}setTheme(e){this._theme=e}getTheme(){return this._theme}loadData(e){const t=this.getDataLoaderModule();if(t)return new Promise(((o,n)=>{this._getModuleByModuleName(t,(t=>{t.load(e).then(o,n)}))}));else{const e="Ðа пÑиложении не задан загÑÑзÑик даннÑÑ
. ÐпÑÐ¸Ñ Ð¾ÐºÐ½Ð° dataLoaders бÑÐ´ÐµÑ Ð¿ÑоигноÑиÑована";i.Logger.warn(e,this)}}setContentData(e){this._contentData=e}getContentData(){return this._contentData}updateAllPopups(){var e;null===(e=this._controller)||void 0===e||e.updateAllPopups()}setRightPanelBottomTemplate(e,t=!0){this._rightBottomTemplate=e,this._rightTemplateVisible=t}getRightPanelBottomTemplate(){return this._rightBottomTemplate}setRightPanelBottomTemplateVisible(e){this._bottomTemplateVisible=e}getRightPanelBottomTemplateVisible(){return this._bottomTemplateVisible}setStackPosition(e){this._stackPosition=e}getStackPosition(){return this._stackPosition}hasRightPanel(){const e=!r()&&"default__dark"!==this._theme;return!!this._rightBottomTemplate&&this._rightTemplateVisible||!!this._rightTemplate||e}setRightTemplate(e){this._rightTemplate=e}getRightTemplate(){return this._rightTemplate}getDataLoaderModule(){return this._dataLoaderModule}setDataLoaderModule(e){this._dataLoaderModule=e}setAccordionTemplate(e){if(n.constants.isServerSide){const t=new p;t.setState(e),(0,o.getStateReceiver)().register(l,t)}else this._accordionTemplate=e}getAccordionTemplate(){var e;const t=null===(e=(0,o.getStore)(l))||void 0===e?void 0:e.get("accordionTemplate");if(!t){const e=new p;return(0,o.getStateReceiver)().register(l,e),e.getState()}return t||this._accordionTemplate}_getModuleByModuleName(e,t){(0,s.loadAsync)(e).then((e=>{t(e)}))}setOpenPopupCallback(e){if(-1===this._openPopupCallbacks.indexOf(e))this._openPopupCallbacks.push(e);else i.Logger.error("Controls/popup/Controller: ÐопÑÑка ÑÑÑановиÑÑ Ñже ÑÑÑеÑÑвÑÑÑий коллбек в меÑоде setOpenPopupCallback")}getOpenPopupCallbacks(){return this._openPopupCallbacks}removeOpenPopupCallback(e){const t=this._openPopupCallbacks.indexOf(e);if(-1!==t)this._openPopupCallbacks.splice(t,1);else i.Logger.error("Controls/popup/Controller: ÐопÑÑка ÑдалиÑÑ Ð½ÐµÑÑÑеÑÑвÑÑÑий коллбек в меÑоде removeOpenPopupCallback")}setPageTemplate(e){this._pageTemplate=e}getPageTemplate(){return this._pageTemplate}setIsAdaptive(e){this._allowAdaptive=e}getIsAdaptive(){return this._allowAdaptive}},t}(0,{},O,f,m,r,n),M=x,k=x,A=function(e,t,o,n){"use strict";
134Object.defineProperty(t,"__esModule",{value:!0}),t.getServerSidePopup=t.registerServerSidePopup=void 0;const r="serverSidePopup";class i{setState(e){var t;null===(t=(0,o.getStore)(r))||void 0===t||t.set("item",e)}getState(){var e;return null===(e=(0,o.getStore)(r))||void 0===e?void 0:e.get("item")}}const s=e=>{var t,o,n,r,i;if(e.top)return e.top;let s=(null===(t=e.offset)||void 0===t?void 0:t.vertical)||0;if("top"===(null===(o=e.direction)||void 0===o?void 0:o.vertical))s+=e.height;else if("center"===(null===(n=e.direction)||void 0===n?void 0:n.vertical))s+=e.height/2;if("top"===(null===(r=e.targetPoint)||void 0===r?void 0:r.vertical))return`${s}px`;if("bottom"===(null===(i=e.targetPoint)||void 0===i?void 0:i.vertical))return`calc(100% - ${s}px)`;else return`calc(50% - ${s}px)`},l=e=>{var t,o,n,r,i;if(e.left)return e.left;const s=`${e.workspaceWidth}px`||"100%";let l=(null===(t=e.offset)||void 0===t?void 0:t.horizontal)||0;if("left"===(null===(o=e.direction)||void 0===o?void 0:o.horizontal))l+=e.width;else if("center"===(null===(n=e.direction)||void 0===n?void 0:n.horizontal))l+=e.width/2;if("left"===(null===(r=e.targetPoint)||void 0===r?void 0:r.horizontal))return`${l}px`;if("right"===(null===(i=e.targetPoint)||void 0===i?void 0:i.horizontal))return`calc(${s} - ${l}px)`;return`calc(${e.workspaceWidth?e.workspaceWidth/2+"px":"50%"} - ${l}px)`};t.registerServerSidePopup=e=>{const t={position:{height:e.height,width:e.width,top:s(e),left:l(e)},popupOptions:{template:e.template,content:"Controls/popupTemplateStrategy:DialogContent",templateOptions:e.templateOptions},id:e.id||n("popup-"),modal:e.modal,currentZIndex:1e3},p=new i;p.setState(t),(0,o.getStateReceiver)().register(r,p)};return t.getServerSidePopup=()=>{var e;const t=null===(e=(0,o.getStore)(r))||void 0===e?void 0:e.get("item");if(!t){const e=new i;return(0,o.getStateReceiver)().register(r,e),e.getState()}return t},t}(0,{},O,_),j=A,B=function(e,t){"use strict";var o;return Object.defineProperty(t,"__esModule",{value:!0}),t.InitializingWay=void 0,function(e){e.remote="remote",e.delayedRemote="delayedRemote"}(o||(t.InitializingWay=o={})),t}(0,{}),N=B,D=function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isLeftMouseButton=t.CalmTimer=t.DependencyTimer=void 0;t.DependencyTimer=class{start(e){this._loadDependenciesTimer=setTimeout(e,80)}stop(){clearTimeout(this._loadDependenciesTimer)}};return t.CalmTimer=class{constructor(e){this._callback=e}isStarted(){return!!this._openId}start(e){if(this.stop(),!o.TouchDetect.getInstance().isTouch()){const t=arguments;this._openId=setTimeout((()=>{this._openId=null,this._callback(...t)}),e||80)}else this._callback(...arguments)}stop(){if(this._openId)clearTimeout(this._openId);this._openId=null}},t.isLeftMouseButton=function(e){return 0===e.nativeEvent.button},t}(0,{},h),H=D,z=function(e){"use strict";function t(){return this}var o="undefined"==typeof window,n=["_popupItems","_overlayIndex","_overlayBackgroundStyle","_overlayClickHandler","_overlayWheelHandler","_getItemClassName","_getInvisibleClass","_keyDownHandler","_popupActivated","_onTemplateMounted","_registerPendingHandler","_finishPendingHandler","_cancelFinishingPendingHandler","registerPending","finishPendingOperations","cancelFinishingPending","index","currentZIndex","item","mousedown","touchEnd","wheel","isPortal","popupOptions","id","resolvedTemplate","content","controls-Popup__hidden-closeButton","zoom","position","controls-Zoom","keydown","activated","theme","_options","bind"];return e.g({v:1,m:"wml!Controls/_popup/Popup/Container",d:e.d(["Controls/Container/Async"],arguments,1),t:[e.c(((e,o)=>[e.P(o,e.m(o,8),{K:"1_0_0_0_",A:{class:" "+e.e(e.m(o,9))+" "+e.e(e.m(o,10))+" "+e.e(e.m(o,11))+" "+e.e(e.m(o,12))},E:{"on:keydown":[{value:n[7],originalName:n[31],viewController:o.v}],"on:activated":[{value:n[8],originalName:n[32],viewController:o.v,args:[e.m(o,7)]}],meta:{isControl:!1,context:t,handler:e.M(o,0)}},O:e.S(o,{id:e.m(o,7),__key:e.m(o,7),name:e.m(o,7),theme:e.m(o,13),onAfterMount:e.m(o,14),className:"",position:e.m(o,16),item:e.m(o,5)},e.m(o,15)),g:!0,m:"attribute",i:0})])),e.r(((e,r)=>[e.g(r,"div",{K:"0_",A:{class:"controls-PopupContainer ws-float-area-stack-panel-overflow",id:"popup"},E:o?{}:{"on:registerpending":[{value:n[10],originalName:n[13],viewController:r.v}],"on:finishpendingoperations":[{value:n[11],originalName:n[14],viewController:r.v}],"on:cancelfinishingpending":[{value:n[12],originalName:n[15],viewController:r.v}],meta:{isControl:!1,context:t,handler:e.M(r,0)}},r:!0,c:!0},[e.h(r,0,["item","index"],1,((e,r)=>[e.m(r,2)?[e.g(r,"div",{K:"0_0_",A:{class:"controls-Container__overlay controls-Container__overlay_backgroundStyle-"+e.e(e.x(r,3)),style:"z-index: "+e.e(e.x(r,4))+";"},E:o?{}:{"on:mousedown":[{value:n[3],originalName:n[19],viewController:r.v,args:[e.m(r,5)]}],"on:touchend":[{value:n[3],originalName:n[20],viewController:r.v,args:[e.m(r,5)]}],"on:wheel":[{value:n[4],originalName:n[21],viewController:r.v}],meta:{isControl:!1,context:t,handler:e.M(r,0)}}})]:e.t(),e.m(r,6)?[e.C(r,"ws:Controls/Container/Async",{K:"1_0_",A:{key:e.e(e.m(r,7))},O:{esc:!1,templateName:"Controls/popupTemplateStrategy:Popup",content:e.o(r,0,1)}})]:e.t()]))])]))],p:n.slice(0,13),e:[function(e,t,o,n,r,i){return e.g(this,[i])},(e,t)=>
134e.g(t,[n[0]]),(e,t)=>e.g(t,[n[16]])===e.g(t,[n[1]]),(e,t)=>e.g(t,[n[2]]),(e,t)=>e.g(t,[n[18],n[17]])-1,(e,t)=>e.g(t,[n[18]]),(e,t)=>!e.g(t,[n[18],n[23],n[22]]),(e,t)=>e.g(t,[n[18],n[24]]),(e,t)=>e.g(t,[n[26],n[25]]),(e,t)=>e.g(t,[n[1]])>e.g(t,[n[16]])?n[27]:"",(e,t,o)=>e.c(o,t,[n[5]],[e.g(t,[n[16]])]),(e,t,o)=>e.c(o,t,[n[6]],[e.g(t,[n[18]])]),(e,t)=>void 0!==e.g(t,[n[18],n[29],n[28]])?n[30]:"",(e,t)=>e.g(t,[n[34],n[33]]),(e,t)=>e.C(t,[n[9],n[35]],[null,e.g(t,[n[18],n[24]])]),(e,t)=>e.g(t,[n[18],n[23]]),(e,t)=>e.g(t,[n[18],n[29]])],i:[[[15]],[[5],[7,16]]]})}(C,"undefined"==typeof Controls_Container_Async?null:Controls_Container_Async),R=function(e){"use strict";var t=["_getContextValue","_getFreezeContextValue"];return e.g({v:1,m:"wml!Controls/_popup/WasabyOpeners/BaseOpener",d:e.d(["UI/Theme","Controls/freezeContext"],arguments,1),t:[e.r(((e,t)=>[e.g(t,"div",{K:"0_",r:!0,c:!0},[e.C(t,{library:"UI/Theme",module:["ThemeConsumer"]},{K:"0_0_",O:{getContextValue:e.m(t,0)}}),e.C(t,{library:"Controls/freezeContext",module:["FreezeConsumer"]},{K:"0_1_",O:{getContextValue:e.m(t,1)}})])]))],p:t.slice(0),e:[(e,o)=>e.g(o,[t[0]]),(e,o)=>e.g(o,[t[1]])]})}(C,i,g),L=function(e,t,o,n,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=(0,n.useContext)(r.Context),i={...e};return delete i.children,(0,o.jsx)(o.Fragment,{children:(0,n.cloneElement)(e.children,{...i,sendResult:null==t?void 0:t.sendResult,close:null==t?void 0:t.close,maximized:null==t?void 0:t.maximized})})},t}(0,{},e,o,I),E=L,V=function(e,t,o,n,r,i,s,l,p,a,u,d,c,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const f=(0,c.lazy)((()=>(0,c.importer)("Controls/popupTemplateStrategy:Portal")));class m extends p.Component{constructor(e){if(super(e),this._popupItem=null,this._targetRef=(0,p.createRef)(),this._destroyed=!1,this._getContentProps=this._getContentProps.bind(this),e.template||e.templateOptions)l.Logger.warn("Controls/popup:Opener","ÐÑполÑзÑÑÑÑÑ ÑÑÑаÑевÑие опÑии template или templateOptions.ÐоÑполÑзÑйÑеÑÑ Ð·Ð½Ð°ÑениÑми contentComponent и contentProps.")}componentDidUpdate(e,t,o){var n,r;if(o!==this.context)this._onFreezeContextChange(null===(n=this.context)||void 0===n?void 0:n.isFreeze);if(e.contentProps!==this.props.contentProps&&(null===(r=this.state)||void 0===r?void 0:r.popupItem)){const e=this._popupItem||this.state.popupItem;e.popupOptions.templateOptions=this._getContentProps(this.props.contentProps,this.props.popupType),this._update(e)}}componentWillUnmount(){var e,t;if(null===(e=this._opener)||void 0===e||e.destroy(),null===(t=this._popupItem)||void 0===t?void 0:t._destroyDeferred){const e=this._popupItem._destroyDeferred;if(e instanceof h.Deferred)e.callback()}this._popupItem=null,this._destroyed=!0}_initOpener(e){var t;if(this._popupType!==e)null===(t=this._opener)||void 0===t||t.destroy(),this._opener=new(this._getPopupType(e).opener),this._popupType=e}async open(e={}){await this._loadController(),this._initOpener(e.popupType||this.props.popupType);const t=this._getConfig(e),o=await this._opener.open(t),n=()=>{const e=a.default.getController().find(o);if(e&&t.isPortal)this._popupItem=e,this.setState({popupItem:{...e},className:""});return o};if(a.default.getController())return n()}_getConfig(e={}){var t;return{...this.props,...e,template:{template:this.props.children,...this.props,...e}.contentComponent||{template:this.props.children,...this.props,...e}.template,target:{...this.props,...e}.target||"sticky"===this._opener._type&&this._targetRef.current,opener:{...this.props,...e}.opener||this._targetRef.current,adaptiveOptions:{...this.props.adaptiveOptions,...null==e?void 0:e.adaptiveOptions,viewMode:this._getPopupType(e.popupType).adaptiveViewMode},templateOptions:this._getContentProps(e.contentProps||e.templateOptions,e.popupType),allowAdaptive:null!==(t=e.allowAdaptive)&&void 0!==t?t:!!this._getPopupType(e.popupType).adaptiveViewMode,updateCallback:this._update.bind(this),removeCallback:this._remove.bind(this),updateClassNameCallback:this._updateClassNameC
134allback.bind(this),isPortal:!0}}close(...e){var t;null===(t=this._opener)||void 0===t||t.close(...e)}isOpened(){var e;return!!(null===(e=this.state)||void 0===e?void 0:e.popupItem)}getPopupItem(){var e;return null===(e=this.state)||void 0===e?void 0:e.popupItem}_update(e){var t,o;if(this._popupItem=e,!this._destroyed)this.setState({popupItem:{...e}});else if("previewer"===this.props.popupType)null===(o=null===(t=e._destroyDeferred)||void 0===t?void 0:t.callback)||void 0===o||o.call(t)}_updateClassNameCallback(e){var t,o;if((null===(t=this.state)||void 0===t?void 0:t.popupItem)&&(null===(o=this.state)||void 0===o?void 0:o.className)!==e)this.setState({className:e})}_remove(){if(!this._destroyed)this._popupItem=null,(0,n.flushSync)((()=>{this.setState({popupItem:null})}))}_loadController(){return new Promise(((t,o)=>{e(["Controls/popupTemplateStrategy"],t,o)})).then((({Controller:e})=>{if(!r.default.getController())(new e).init()})).catch((function(e){requirejs.onError(e)}))}_getContentProps(e,t){var o,n,r,i,s,l;if(!e&&(null===(n=null===(o=this.state)||void 0===o?void 0:o.popupItem)||void 0===n?void 0:n.popupOptions.templateOptions))return null===(i=null===(r=this.state)||void 0===r?void 0:r.popupItem)||void 0===i?void 0:i.popupOptions.templateOptions;else return{...null===(l=null===(s=this.state)||void 0===s?void 0:s.popupItem)||void 0===l?void 0:l.popupOptions.templateOptions,...e,...this.props.contentProps||this.props.templateOptions,popupComponentName:this._getComponentName(t||this._popupType),allowAdaptive:!!this._getPopupType(t||this._popupType).adaptiveViewMode}}_getComponentName(e){const t=this._getPopupType(e);if((0,s.getAdaptiveModeForLoaders)().device.isPhone()&&t.adaptiveViewMode)if("sliding"===t.adaptiveViewMode)return"Controls/popupTemplate:Dialog";else return"Controls/popupTemplate:Stack";return t.popupComponentName}_getPopupType(e){const t=(0,d.loadSync)("Controls/popupTemplateStrategy").getPopupType;return this.props.customPopupType||t(e||this.props.popupType)}_onFreezeContextChange(e){var t;if(e)null===(t=this._opener)||void 0===t||t.close()}render(){var e,t,n;return(0,o.jsx)("span",{ref:this._targetRef,className:`tw-block tw-hidden ${this.props.className||""}`,children:(null===(e=this.state)||void 0===e?void 0:e.popupItem)?(0,o.jsx)(u.ThemeConsumer,{children:(0,o.jsx)(f,{popupItem:null===(t=this.state)||void 0===t?void 0:t.popupItem,className:null===(n=this.state)||void 0===n?void 0:n.className,getContentProps:this._getContentProps})}):null})}}return m.contextType=i.Context,m.defaultProps={popupType:"largeCard"},t.default=m,t}(y,{},e,t,x,g,u,r,o,x,i,n,a,d),F=V,U=function(e,t,o,n,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e={}){this._options=e,this._openHandler=this._openHandler.bind(this),this._closeHandler=this._closeHandler.bind(this)}async open(e={}){if(!o.constants.isServerSide){if((0,i.isLoaded)("Controls/popupTemplateStrategy"))this._setBaseOpenerSync();else await this._setBaseOpenerAsync();return this._baseOpener.open(e,{adaptiveOptions:this._isAdaptive({...e,...this._options})?this._adaptiveOptions:null,controller:this._controller,type:this._type,openHandler:this._openHandler,closeHandler:this._closeHandler})}else{const t={...e,...this._options}.template;n.Logger.error(`Controls/popup: запÑеÑено вÑзÑваÑÑ Ð¼ÐµÑод open на СÐ. ÐопÑÑка оÑкÑÑÑÑ Ð¾ÐºÐ½Ð¾ Ñ Ñаблоном ${t}`)}}close(e){var t;if(this._baseOpener)this._baseOpener.close(e);else null===(t=r.default.getController())||void 0===t||t.remove(e)}isOpened(){if(this._baseOpener)return this._baseOpener.isOpened();else return!1}isShowing(){if(this._baseOpener)return this._baseOpener.isShowing();else return!1}destroy(){if(this._baseOpener)this._baseOpener.destroy(),this._baseOpener=null}getPopupId(){if(this._baseOpener)return this._baseOpener.getPopupId();else return null}async _setBaseOpenerAsync(){const t=await new Promise(((t,o)=>{e(["Controls/popupTemplateStrategy"],t,o)}));if(!this._baseOpener){const e=this._getBaseOpener(t);this._baseOpener=new e(this._options)}}_setBaseOpenerSync(){if(!this._baseOpener){const e=(0,i.loadSync)("Controls/popupTemplateStrategy"),t=this._getBaseOpener(e);this._baseOpener=new t(this._options)}}_isAdaptive(e){return!1}_hideIndicator(){if(this._baseOpener)this._baseOpener.hideIndicator()}async _showIndicator(e){if((0,i.isLoaded)("Controls/popupTemplateStrategy"))this._setBaseOpenerSync();else await this._setBaseOpenerAsync();if(this._baseOpener)this._baseOpener.showIndicator(e)}_getBaseOpener(e){return e.BaseOpener}_openHandler(){}_closeHandler(e){}},t}(y,{},f,r,x,n),W=U,$=function(e,t,o,n,r){"use strict";
134Object.defineProperty(t,"__esModule",{value:!0});class i extends n.Control{constructor(){super(...arguments),this._template=r}_beforeMount(){this._getContextValue=this._getContextValue.bind(this),this._getFreezeContextValue=this._getFreezeContextValue.bind(this)}_beforeUnmount(){var e;if(this._options.closePopupBeforeUnmount)null===(e=this._popupOpener)||void 0===e||e.destroy()}_getContextValue(e){this._activeTheme=e}_getFreezeContextValue(e){var t;if(e)null===(t=this._popupOpener)||void 0===t||t.close()}open(e={}){if(this._activeTheme&&e&&!this.isOpened()&&!1!==e.shouldInheritOpenerTheme)e.activeTheme=this._activeTheme;if(!e.hasOwnProperty("opener"))e.opener=this._container;this._popupHandler=this._popupHandler.bind(this),e._events={onOpen:this._popupHandler,onResult:this._popupHandler,onClose:this._popupHandler};const t={...this._options,...e,templateOptions:{...this._options.templateOptions,...e.templateOptions}};return this._popupOpener.open(t)}close(){this._popupOpener.close()}_popupHandler(e,t){if(!this._destroyed&&this._mounted){const o=e.substr(2).toLowerCase();this._notify(o,t)}}isOpened(){return this._popupOpener.isOpened()}isShowing(){return this._popupOpener.isShowing()}static closePopup(e){var t;null===(t=o.default.getController())||void 0===t||t.remove(e)}static isOpenedPopup(e){var t;return e&&!!(null===(t=o.default.getController())||void 0===t?void 0:t.find(e.id))}static showDialog(t,o,n){return new Promise(((t,o)=>{e(["Controls/popupTemplateStrategy"],t,o)})).then((({openPopupCompatible:e})=>e(t,o,n))).catch((function(e){requirejs.onError(e)}))}static getManager(){new Promise(((t,o)=>{e(["Controls/compatiblePopup"],t,o)})).then((({getManager:e})=>e())).catch((function(e){requirejs.onError(e)}))}static getDefaultOptions(){return{showIndicator:!0,closePopupBeforeUnmount:!0}}}return t.default=i,t}(y,{},x,p,R),K=$,Z=function(e,t,o,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i extends o.default{constructor(){super(...arguments),this._type="confirmation",this._controller="Controls/popupTemplateStrategy:DialogController"}async open(e){if(!(0,r.isLoaded)("Controls/markup"))await(0,r.loadAsync)("Controls/markup").catch((()=>{}));return new Promise((t=>{const o={...this._options,...e},n=i._getConfig(o,t);super.open(n)}))}_isAdaptive(e){return!1}static _getConfig(e,t){var o;e.closeHandler=t;const n={template:"Controls/popupTemplate:ConfirmationDialog",isConfirmation:!0,topPopup:!0,closeOnOutsideClick:e.closeOnOutsideClick,closeOnOverlayClick:e.closeOnOverlayClick,modal:null!==(o=e.modal)&&void 0!==o?o:!0,opener:e.opener,autofocus:!0,className:"controls-Confirmation_popup",templateOptions:e,allowAdaptive:!1,overlayBackgroundStyle:e.overlayBackgroundStyle};return i._compatibleOptions(n),n}static _compatibleOptions(e){if(e.zIndex=e.zIndex||e.templateOptions.zIndex,!n())e.zIndex=5e3}}return t.default=i,t}(0,{},U,m,n),q=Z,X=function(e,t,o,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i extends o.default{constructor(){super(...arguments),this._adaptiveOptions={slidingPanelOptions:{autoHeight:!0},defaultMode:"dialog"},this._type="dialog",this._controller="Controls/popupTemplateStrategy:DialogController"}_isAdaptive(e){return(0,n.getAdaptiveModeForLoaders)().device.isPhone()&&!1!==e.allowAdaptive&&r.default.getIsAdaptive()}open(e={}){var t;const o={resizeDirection:{horizontal:"right",vertical:"bottom"},...e};if("bottom"===(null===(t=null==e?void 0:e.resizeDirection)||void 0===t?void 0:t.vertical))o.forceResizeBottom=!0;return super.open(o)}}return t.default=i,t}(0,{},U,u,x),Y=X,G=function(e,t,o,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let i,s,l;class p extends o.default{constructor(){super(...arguments),this._type="sticky",this._controller="Controls/popupTemplateStrategy:InfoBoxController"}_isAdaptive(e){return!1}open(t){const o={...this._options,...t};if(this.isOpened())this.close(0);if(this.isOpened())i=this._baseOpener.getPopupId();else o.id=r("popup-");let l;p._clearTimeout();new Promise((e=>{l=e}));const a=e=>(i=e.id,super.open(e).then((e=>{l(e)}))),u=e=>{const t=e(o,this);if(t.showDelay>0)s=setTimeout((()=>{a(t)}),t.showDelay);else a(t)};if((0,n.isLoaded)("Controls/popupTemplateStrategy")){const e=(0,n.loadSync)("Controls/popupTemplateStrategy").getInfoboxConfig;u(e)}else new Promise(((t,o)=>{e(["Controls/popupTemplateStrategy"],t,o)})).then((({getInfoboxConfig:e})=>{u(e)})).catch((function(e){requirejs.onError(e)}))}close(e){p._close((()=>{super.close(i)}),e)}static _close(e,t=300){if(p._clearTimeout(),t>0)l=setTimeout(e,t);else e()}static _clearTimeout(){if(s)clearTimeout(s);if(l)clearTimeout(l)}}return t.default=p,t}(y,{},U,n,_),J=G,Q=function(e,t,o,n,r){"use strict";
134Object.defineProperty(t,"__esModule",{value:!0});const i={autofocus:!1,autoClose:!0},s=(e,t)=>{const o=e&&e.getIndexByValue("id",t);if(o>-1)return e.at(o);else return null},l=(e,t,o)=>{for(;o&&o.parentId;)if((o=s(e,o.parentId))===t)return!0;return!1};class p extends o.default{constructor(){super(...arguments),this._type="notification",this._controller="Controls/popupTemplateStrategy:NotificationController"}_isAdaptive(e){return!1}open(e){const t={...i,...this._options,...e};if("true"===n.LocalStorageNative.getItem("hideNotificationAutotest"))return r.Logger.warn("Notification не бÑÐ´ÐµÑ Ð¾ÑкÑÑÑ, Ñ.к. в localStorage Ð»ÐµÐ¶Ð¸Ñ hideNotificationAutotest"),Promise.resolve();if(t.autoClose)t.topPopup=!0;if(!t.topPopup)t.zIndexCallback=p.zIndexCallback;return super.open(t)}static zIndexCallback(e,t){const o=t.getCount();for(let n=0;n<o;n++){if("Notification"===t.at(n).type&&t.at(n).popupOptions.topPopup)return 2e3*(t.getIndexByValue("id",e.id)+1);const o=t.at(n).popupOptions.maximize,r=t.at(n).popupOptions.modal,i=l(t,t.at(n),e),s=l(t,e,t.at(n));if((o||r)&&!i&&!s){return 10*(n+1)-1}}return 100}}return t.default=p,t}(0,{},U,P,r),ee=Q,te=function(e,t,o,n,r,i,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const l=e=>{if(e.childClosingIntervalId)clearTimeout(e.childClosingIntervalId),e.childClosingIntervalId=null},p=e=>{if(e.closingTimerId)clearInterval(e.closingTimerId),e.closingTimerId=null},a=e=>{if(e.openingTimerId)clearTimeout(e.openingTimerId),e.eventHandlers.onClose(),e.openingTimerId=null},u=(e,t,o)=>{var r,i,s,d;if(a(t),p(t),l(t),"hover"===o||!o&&"hover"===t.type){const p=null===(r=n.default.getController())||void 0===r?void 0:r.find(t.id);if(null===(i=null==p?void 0:p.childs)||void 0===i?void 0:i.length)return void(t.childClosingIntervalId=setInterval((()=>{if(!(null==p?void 0:p.childs.length))u(e,t,o),l(t)}),1e3));t.closingTimerId=setTimeout((()=>{if(t.closingTimerId=null,p&&"initializing"===p.popupState)u(e,t,o);else e()}),null!==(d=null!==(s=t.closeDelay)&&void 0!==s?s:t.delay)&&void 0!==d?d:1e3)}else e()};class d extends o.default{constructor(){super(...arguments),this._adaptiveOptions={slidingPanelOptions:{autoHeight:!0},defaultMode:"sticky"},this._type="sticky",this._controller="Controls/popupTemplateStrategy:PreviewerController",this._currentConfig={}}open(e,t){return new Promise((async o=>{var n,i,u,d,c,h,f;const m={...this._options,...e},_=null===(n=m.eventHandlers)||void 0===n?void 0:n.onOpen,g=null===(i=m.eventHandlers)||void 0===i?void 0:i.onClose;let v;null===(u=m.eventHandlers)||void 0===u||(u.onOpen=(...e)=>{if("none"!==m.actionOnScroll)(0,s.loadSync)("Controls/popupTemplateStrategy").toggleActionOnScroll(m.target,!0,m.id,(()=>{super.close(m.id)}));if(_)_(...e)}),null===(d=m.eventHandlers)||void 0===d||(d.onClose=(...e)=>{if("none"!==m.actionOnScroll)(0,s.loadSync)("Controls/popupTemplateStrategy").toggleActionOnScroll(m.target,!1,m.id);if(g)g(...e)}),m.closeOnOutsideClick=!0,m.className="controls-PreviewerController",a(m),p(m),l(m);const C=new Promise((e=>{v=e}));if(m.id=m.id||(null===(c=this._baseOpener)||void 0===c?void 0:c.getPopupId())||r("popup-"),this._currentConfig=m,"hover"===t||"hover"===e.type)m.openingTimerId=setTimeout((()=>{m.openingTimerId=null,this._currentConfig=m,super.open(m).then((()=>{v()}))}),m.delay||0);else super.open(m).then((()=>{v()}));if(null===(f=null===(h=e.eventHandlers)||void 0===h?void 0:h.onStartOpening)||void 0===f||f.call(h,m),e.isPortal)C.then((()=>{o(m.id)}));else o(m)}))}close(e,t){u((()=>{var t;super.close(null===(t=e||this._currentConfig)||void 0===t?void 0:t.id)}),e||this._currentConfig,t)}cancel(e,t){d.cancel(e,t||this._currentConfig)}_isAdaptive(e){return(0,i.getAdaptiveModeForLoaders)().device.isPhone()&&!!e.allowAdaptive&&n.default.getIsAdaptive()}destroy(){p(this._currentConfig),a(this._currentConfig),l(this._currentConfig),super.destroy()}static cancel(e,t){if(t)((e,t)=>{switch(t){case"opening":e.isCancelOpening=!0,a(e);break;case"closing":p(e),l(e)}})(t,e)}}return t.default=d,t}(0,{},U,x,_,u,n),oe=te,ne=function(e,t,o){"use strict";
134Object.defineProperty(t,"__esModule",{value:!0});class n extends o.default{constructor(){super(...arguments),this._type="sliding"}_getBaseOpener(e){return e.SlidingPanelOpener}close(){var e;const t=null===(e=this._baseOpener)||void 0===e?void 0:e.getDesktopOpener();if(null==t?void 0:t.isOpened())t.close();else super.close()}isOpened(){var e;const t=null===(e=this._baseOpener)||void 0===e?void 0:e.getDesktopOpener();return super.isOpened()||(null==t?void 0:t.isOpened())||!1}}return t.default=n,t}(0,{},U),re=ne,ie=function(e,t,o,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends o.default{constructor(){super(...arguments),this._adaptiveOptions={slidingPanelOptions:{autoHeight:!0},defaultMode:"stack"},this._type="stack",this._controller="Controls/popupTemplateStrategy:StackController"}open(e={}){const t={showIndicator:!0,...this._options,...e};return super.open(t)}_isAdaptive(e){return(0,n.getAdaptiveModeForLoaders)().device.isPhone()&&e.allowAdaptive}}return t.default=r,t}(0,{},U,u),se=ie,le=function(e,t,o,n,r,i,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class p extends o.default{constructor(e={}){super(e),this._instanceId=r("stickyPopup-"),this._adaptiveOptions={slidingPanelOptions:{autoHeight:!0},defaultMode:"dialog"},this._type="sticky",this._controller="Controls/popupTemplateStrategy:StickyController",this._updateState(e)}async open(e){var t;this._updateState(e);const o={...e};if("bottom"===(null===(t=null==e?void 0:e.resizeDirection)||void 0===t?void 0:t.vertical))o.forceResizeBottom=!0;return super.open(o)}getInstanceId(){return this._instanceId}_isAdaptive(e){return(0,n.getAdaptiveModeForLoaders)().device.isPhone()&&!1!==e.allowAdaptive&&s.default.getIsAdaptive()}_openHandler(){var e;if(this._actionOnScroll)this._targetControl=(0,l.loadSync)("Controls/popupTemplateStrategy").toggleActionOnScroll(this._target,!0,null===(e=this._baseOpener)||void 0===e?void 0:e.getPopupId(),(e=>{this._scrollHandler(e)}))}_closeHandler(e){if(this._actionOnScroll)(0,l.loadSync)("Controls/popupTemplateStrategy").toggleActionOnScroll(this._targetControl||this._target,!1,e);super._closeHandler()}destroy(){super.destroy(),this._target=null}_scrollHandler(e){var t,o,n;if("scroll"===e.type||"customscroll"===e.type){if(i.detection.isMobileIOS&&"close"===this._actionOnScroll&&(e.target===document.body||e.target===document)&&function(){if(i.constants.isBrowserPlatform&&document.activeElement){const e="INPUT"===document.activeElement.tagName,t="TEXTAREA"===document.activeElement.tagName,o="true"===document.activeElement.getAttribute("contenteditable");if(e||t||o)return!0}return!1}())return;if("close"===this._actionOnScroll)null===(t=s.default.getController())||void 0===t||t.remove(this._baseOpener.getPopupId());else if("track"===this._actionOnScroll)null===(o=s.default.getController())||void 0===o||o.eventHandler("pageScrolled",[]);else if("hide"===this._actionOnScroll)null===(n=s.default.getController())||void 0===n||n.eventHandler("hideOnScroll",[this._baseOpener.getPopupId()])}}_updateState(e){if(null==e?void 0:e.actionOnScroll)this._actionOnScroll=e.actionOnScroll;if(null==e?void 0:e.target)this._target=e.target}}return t.default=p,t}(0,{},U,u,_,f,x,n),pe=le,ae=function(e,t,o,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends o.default{constructor(){super(...arguments),this._popupOpener=new n.default}_beforeUnmount(){}static openPopup(e,t){return(new n.default).open({...e,opener:t})}}return t.default=r,t}(0,{},$,Z),ue=ae,de=function(e,t,o,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends o.default{constructor(){super(...arguments),this._popupOpener=new n.default}static openPopup(e){return(new n.default).open(e)}static closePopup(){(new n.default).close(0)}}return t.default=r,t}(0,{},$,G),ce=de,he=function(e,t,o,n,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s={autofocus:!1,autoClose:!0},l=(e,t)=>
134{const o=e.prepareNotificationConfig(t);return o.notHide=!o.autoClose,o.isCompoundNotification=!0,delete o.element,o};class p extends o.default{constructor(){super(...arguments),this._popupOpener=new n.default}open(e){if(r())return super.open(e);else return(e=>{const t={...e};return delete t.id,new Promise((e=>{Promise.all([(0,i.loadAsync)("Controls/compatiblePopup:BaseOpener"),(0,i.loadAsync)("SBIS3.CONTROLS/Utils/InformationPopupManager"),(0,i.loadAsync)("Controls/compatiblePopup:OldNotification"),(()=>{if("string"==typeof t.template)return(0,i.loadAsync)(t.template);else return Promise.resolve(t.template)})()]).then((o=>{const n=o[0],r=o[1];t.template=o[3];const i=l(n,t),s=r.showNotification(i,i.notHide);e(s)}))}))})({...s,...this._options,...e})}static openPopup(e){return(new n.default).open(e)}}return t.default=p,t}(0,{},$,Q,m,n),fe=he,me=function(e,t,o,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends o.default{constructor(){super(...arguments),this._popupOpener=new n.default}static openPopup(e){return(new n.default).open(e)}}return t.default=r,t}(0,{},$,ie),_e=me,ge=function(e,t,o,n,r,i,s,l,p,a,u,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerForTest=void 0;class c extends o.Control{constructor(){super(...arguments),this._template=p,this._popupItems=new n.List,this._removeItems=[]}_beforeMount(){this._mountedPopups=new n.List;const e=(0,d.getServerSidePopup)();if(e)this._popupItems.add(e),this._calcOverlayIndex(this._popupItems,!0);const t={notifyHandler:(e,t)=>this._notify(e,t,{bubbling:!0})};this._pendingController=new l.PendingClass(t),this._onTemplateMounted=this._onTemplateMounted.bind(this)}_afterMount(){const e=(0,d.getServerSidePopup)();if(e){const t={template:e.popupOptions.template,templateOptions:e.popupOptions.templateOptions,modal:e.modal,id:e.id,isServerSidePopup:!0},o=this._popupItems.at(0).id,n=this._children[o]._container.getBoundingClientRect();t.top=n.top,t.left=n.left,new u.default(t).open()}i.default.setContainer(this)}_beforeUnmount(){i.default.setContainer(null)}_afterUpdate(){if(this._removeItems.length)this._removeItems.map((e=>{e.removeCallback(e.removedItem)})),this._removeItems=[];if(this._redrawResolve)this._redrawResolve(),this._redrawResolve=null,this._redrawPromise=null}_onTemplateMounted(e){this._mountedPopups.add(e);const t=this.getPopupById(e);null==t||t.onTemplateMounted()}setPopupItems(e){var t;if(this._popupItems=e,this._syncMountedPopups(),this._calcOverlayIndex(e),null===(t=e.each)||void 0===t||t.call(e,((e,t)=>{var o,n;if(e.popupState===e.controller.POPUP_STATE_CREATED&&(null===(o=e.popupOptions)||void 0===o?void 0:o.updateClassNameCallback)){const o=this._getItemClassName(t);null===(n=e.popupOptions)||void 0===n||n.updateClassNameCallback(o)}})),!this._redrawPromise)this._redrawPromise=new Promise((e=>{this._redrawResolve=e}));return this._redrawPromise}_getItemClassName(e){if(this._popupItems.getCount()-1===e)return"controls-Scroll_webkitOverflowScrollingTouch controls-Popup__lastItem";else return""}_syncMountedPopups(){var e;const t=[];null===(e=this._mountedPopups)||void 0===e||e.each((e=>{var o;if(!(null===(o=i.default.getController())||void 0===o?void 0:o.find(e)))t.push(e)}));for(const e of t)this._mountedPopups.remove(e)}getOverlayIndex(){return this._overlayIndex}_calcOverlayIndex(e,t=!1){var o,n;let r,i;if(e.each(((e,o)=>{if(e.modal&&(t||e.popupState!==e.controller.POPUP_STATE_INITIALIZING||o===this._overlayIndex))if(!r||e.currentZIndex>r.currentZIndex)r=e,i=o})),this._overlayIndex=i,void 0!==i)this._overlayBackgroundStyle=(null===(n=null===(o=e.at(i))||void 0===o?void 0:o.popupOptions)||void 0===n?void 0:n.overlayBackgroundStyle)||"default"}removePopupItem(e,t,o){this._removeItems.push({removedItem:t,removeCallback:o}),this.setPopupItems(e)}getRemovingItems(){return this._removeItems}getPopupById(e){if(this._children.hasOwnProperty(e))return this._children[e]}activatePopup(e){const t=this.getPopupById(e);if(t)(0,s.activate)(t._container)}getPending(){return this._pendingController}_registerPendingHandler(e,t,o){this._pendingController.registerPending(t,o),e.stopPropagation()}_finishPendingHandler(e,t,o){return e.stopPropagation(),this._pendingController.finishPendingOperations(t,o)}_cancelFinishingPendingHandler(e,t){e.stopPropagation(),this._pendingController.cancelFinishingPending(t)}
134_getInvisibleClass(e){if(e.animationState)return"";if(this._mountedPopups&&-1===this._mountedPopups.getIndex(e.id)&&e.popupOptions.asyncShow||e.position.invisible)if("undefined"!=typeof CSS&&(null===CSS||void 0===CSS?void 0:CSS.supports("inset: 0")))return"controls-Popup__react-hidden";else return"controls-Popup__react-hidden_old-browser";return""}_keyDownHandler(e){return(0,r.dispatcherHandler)(e)}_popupActivated(e,t,o){var n;null===(n=i.default.getController())||void 0===n||n.eventHandler("popupActivated",[t,o])}_overlayWheelHandler(e){e.preventDefault(),e.stopPropagation()}_overlayClickHandler(e,t){if(!t.popupOptions.closeOnOverlayClick&&"SlidingPanel"!==t.controller.TYPE||"SlidingPanel"===t.controller.TYPE&&!1===t.popupOptions.closeOnOverlayClick)e.stopPropagation();e.preventDefault()}}return t.ContainerForTest=c,c.POPUP_ZINDEX_STEP=10,t.default=(0,a.withAdaptiveMode)(c),t}(0,{},p,c,s,x,l,v,z,u,X,A,"undefined"==typeof css_Controls_popup||css_Controls_popup),ve=ge,Ce=function(e,t,o,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends o.default{constructor(){super(...arguments),this._popupOpener=new n.default}static openPopup(e){return(new n.default).open(e)}}return t.default=r,t}(0,{},$,X),Pe=Ce,Oe=function(e,t,o,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends o.default{constructor(){super(...arguments),this._popupOpener=new n.default}static openPopup(e,t){return(new n.default).open(e,t)}static cancelPopup(e,t){if(e)(new n.default).cancel(t,e)}static closePopup(e,t){if(e)(new n.default).close(e,t)}}return t.default=r,t}(0,{},$,te),ye=Oe,be=function(e,t,o,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends o.default{constructor(){super(...arguments),this._popupOpener=new n.default}static openPopup(e){return(new n.default).open(e)}}return t.default=r,t}(0,{},$,le),Ie=be,b.PageContextProvider=b.PageContext=b.InfoBoxContext=b.IInfoBoxContext=b.ContextProvider=b.Context=b.ContextConsumer=b.isLeftMouseButton=b.Depen
134dencyTimer=b.CalmTimer=b.TWidth=b.InitializingWay=b.registerServerSidePopup=b.ConfirmationOpener=b.InfoboxOpener=b.StickyOpener=b.StackOpener=b.SlidingPanelOpener=b.PreviewerOpener=b.NotificationOpener=b.DialogOpener=b.BaseHelperOpener=b.Sticky=b.Stack=b.Previewer=b.Infobox=b.Dialog=b.Confirmation=b.Notification=b.BaseOpener=b.Opener=b.PageController=b.Controller=b.ContainerForTest=b.Container=void 0,Object.defineProperty(b,"Container",{enumerable:!0,get:function(){return ve.default}}),Object.defineProperty(b,"ContainerForTest",{enumerable:!0,get:function(){return ve.ContainerForTest}}),Object.defineProperty(b,"Controller",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(b,"PageController",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(b,"Opener",{enumerable:!0,get:function(){return F.default}}),Object.defineProperty(b,"BaseOpener",{enumerable:!0,get:function(){return K.default}}),Object.defineProperty(b,"Notification",{enumerable:!0,get:function(){return fe.default}}),Object.defineProperty(b,"Confirmation",{enumerable:!0,get:function(){return ue.default}}),Object.defineProperty(b,"Dialog",{enumerable:!0,get:function(){return Pe.default}}),Object.defineProperty(b,"Infobox",{enumerable:!0,get:function(){return ce.default}}),Object.defineProperty(b,"Previewer",{enumerable:!0,get:function(){return ye.default}}),Object.defineProperty(b,"Stack",{enumerable:!0,get:function(){return _e.default}}),Object.defineProperty(b,"Sticky",{enumerable:!0,get:function(){return Ie.default}}),Object.defineProperty(b,"BaseHelperOpener",{enumerable:!0,get:function(){return W.default}}),Object.defineProperty(b,"DialogOpener",{enumerable:!0,get:function(){return Y.default}}),Object.defineProperty(b,"NotificationOpener",{enumerable:!0,get:function(){return ee.default}}),Object.defineProperty(b,"PreviewerOpener",{enumerable:!0,get:function(){return oe.default}}),Object.defineProperty(b,"SlidingPanelOpener",{enumerable:!0,get:function(){return re.default}}),Object.defineProperty(b,"StackOpener",{enumerable:!0,get:function(){return se.default}}),Object.defineProperty(b,"StickyOpener",{enumerable:!0,get:function(){return pe.default}}),Object.defineProperty(b,"InfoboxOpener",{enumerable:!0,get:function(){return J.default}}),Object.defineProperty(b,"ConfirmationOpener",{enumerable:!0,get:function(){return q.default}}),Object.defineProperty(b,"registerServerSidePopup",{enumerable:!0,get:function(){return j.registerServerSidePopup}}),Object.defineProperty(b,"InitializingWay",{enumerable:!0,get:function(){return N.InitializingWay}}),Object.defineProperty(b,"CalmTimer",{enumerable:!0,get:function(){return H.CalmTimer}}),Object.defineProperty(b,"DependencyTimer",{enumerable:!0,get:function(){return H.DependencyTimer}}),Object.defineProperty(b,"isLeftMouseButton",{enumerable:!0,get:function(){return H.isLeftMouseButton}}),Object.defineProperty(b,"ContextConsumer",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(b,"Context",{enumerable:!0,get:function(){return S.Context}}),Object.defineProperty(b,"ContextProvider",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(b,"IInfoBoxContext",{enumerable:!0,get:function(){return w.IInfoBoxContext}}),Object.defineProperty(b,"InfoBoxContext",{enumerable:!0,get:function(){return w.Context}}),Object.defineProperty(b,"PageContext",{enumerable:!0,get:function(){return w.Context}}),Object.defineProperty(b,"PageContextProvider",{enumerable:!0,get:function(){return w.default}}),b})); 135define("Controls/Pending",["react/jsx-runtime","react","UI/Utils","Types/ParallelDeferred","Env/Env","Compiler/IR","require","exports","UI/Base"],(function(e,n,i,t,s,r,o,d,l){var a,g,h,c,u,f,p,P;Object.defineProperty(d,"__esModule",{value:!0}),a=function(e,n,i,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Context=void 0;const s=(0,t.createContext)(null);return n.Context=s,n.default=function(e){const n=(0,t.useMemo)((()=>({registerPending:e.registerPending,finishPendingOperations:e.finishPendingOperations,cancelFinishingPending:e.cancelFinishingPending,getHasPendings:e.getHasPendings})),[e.registerPending,e.finishPendingOperations,e.cancelFinishingPending,e.getHasPendings]);return(0,i.jsx)(s.Provider,{value:n,children:(0,t.cloneElement)(e.children,{...e,children:e.children.props.children})})},n}(0,{},e,n),g=a,h=function(e,n,i,t,s){"use strict";Object.defineProperty(n,"__esModule",{value:!0});
135return n.default=class{constructor(e){if(this._pendingsCounter=0,this._pendings={},this._parallelDef={},this._validateStatus={},t.constants.isBrowserPlatform)this._beforeUnloadHandler=e=>{if(this.hasPendings())e.preventDefault(),e.returnValue="";else window.removeEventListener("beforeunload",this._beforeUnloadHandler)},window.addEventListener("beforeunload",this._beforeUnloadHandler);this._notify=e.notifyHandler}registerPending(e,n={}){if(!this._validatePromise(e))s.Logger.error("Controls/Pending","ÐÑи ÑегиÑÑÑаÑии пендинга пÑоизоÑла оÑибка: РпаÑамеÑÑÑобÑÑÐ¸Ñ registerPending пеÑвÑм аÑгÑменÑом пеÑедан не promise.");const i=n.root||null;if(!this._pendings[i])this._pendings[i]={};if(this._pendings[i][this._pendingsCounter]={def:e,validate:n.validate,validateCompatible:n.validateCompatible,onPendingFail:n.onPendingFail,showLoadingIndicator:n.showLoadingIndicator},n.showLoadingIndicator&&!e.isReady()){const e=this._pendings[i][this._pendingsCounter],t={id:e.loadingIndicatorId,fixConsiderPopups:n.fixConsiderPopups};e.loadingIndicatorId=this._notify("showIndicator",[t])}const t=(()=>
135{const e=this._pendingsCounter;return n=>(this.unregisterPending(i,e),n)})();e.then(t).catch(t),this._pendingsCounter++}_validatePromise(e){return e&&(e instanceof Promise||"Types/deferred:Deferred"===e._moduleName)}hideIndicators(e){let n;if(this._pendings)n=this._pendings[e],Object.keys(n).forEach((e=>{const i=n[e].loadingIndicatorId;if(i)this._notify("hideIndicator",[i])}))}unregisterPending(e,n){const i=this._pendings&&this._pendings[e];if(i)if(this.hideIndicators(e),this._pendings){if(delete i[n],0===Object.keys(i).length)delete this._pendings[e];if(!this.hasRegisteredPendings(e))this._notify("pendingsFinished",[]);this._validateStatus={}}}finishPendingOperations(e,n=null,t){let s,r;const o=new Promise(((e,n)=>{s=e,r=n})),d=new i,l=[],a=this._pendings[n]||{};return Object.keys(a).forEach((n=>{const i=a[n];let s=!0;if(i.validate)if(void 0===this._validateStatus[n])s=i.validate(t);else s=this._validateStatus[n];else if(i.validateCompatible)s=i.validateCompatible();if(s){if(i.onPendingFail)i.onPendingFail(e,i.def,t);d.push(i.def)}})),this.cancelFinishingPending(n),this._parallelDef[n]=d.done().getResult(),this._validateStatus={},this._parallelDef[n].then((e=>{if("object"==typeof e)for(const n in e)if(e.hasOwnProperty(n)){const i=e[n];l.push(i)}this._parallelDef[n]=null,s(l)})).catch((e=>(r(e),e))),o}cancelFinishingPending(e=null){if(this._parallelDef&&this._parallelDef[e])this._parallelDef[e]._fired=-1,this._parallelDef[e].cancel()}hasPendings(){let e=!1;return Object.keys(this._pendings).forEach((n=>{if(this.hasRegisteredPendings(n,!1))e=!0})),e}hasRegisteredPendings(e=null,n=!0){let i=!1;const t=this._pendings[e]||{};return Object.keys(t).forEach((e=>{const s=t[e];let r=!0;if(s.validate)r=s.validate(),this._validateStatus[e]=r;else if(s.validateCompatible)r=n?s.validateCompatible():!1;if(r)i=!0})),i}destroy(){if(this._pendings=null,this._parallelDef=null,t.constants.isBrowserPlatform)window.removeEventListener("beforeunload",this._beforeUnloadHandler)}},n}(0,{},t,s,i),c=h,u=function(e){"use strict";function n(){return this}var i=["_registerPendingHandler","_finishPendingHandler","_cancelFinishingPendingHandler","content","_options","registerPending","finishPendingOperations","cancelFinishingPending"];return e.g({v:1,m:"wml!Controls/_Pending/Pending",t:[e.r(((e,t)=>[e.P(t,e.m(t,0),{K:"0_",E:{"on:registerpending":[{value:i[0],originalName:i[5],viewController:t.v}],"on:finishpendingoperations":[{value:i[1],originalName:i[6],viewController:t.v}],"on:cancelfinishingpending":[{value:i[2],originalName:i[7],viewController:t.v}],meta:{isControl:!1,context:n,handler:e.M(t,1)}},m:"attribute",c:!0})]))],p:i.slice(0,3),e:[(e,n)=>e.g(n,[i[4],i[3]]),function(e,n,i,t,s,r){return e.g(this,[r])}]})}(r),f=u,p=function(e,n,i,t,s){"use strict";return Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){const n=(0,t.useContext)(s.Context);return(0,i.jsx)(i.Fragment,{children:(0,t.cloneElement)(e.children,{...e,registerPending:n.registerPending,finishPendingOperations:n.finishPendingOperations,cancelFinishingPending:n.cancelFinishingPending,getHasPendings:n.getHasPendings})})},n}(0,{},e,n,a),P=p,d.ContextConsumer=d.Context=d.ContextProvider=d.PendingClass=void 0,Object.defineProperty(d,"PendingClass",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(d,"ContextProvider",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(d,"Context",{enumerable:!0,get:function(){return g.Context}}),Object.defineProperty(d,"ContextConsumer",{enumerable:!0,get:function(){return P.default}});class _ extends l.Control{constructor(){super(...arguments),this._template=f,this._pendingController=null}_beforeMount(){const e={notifyHandler:(e,n)=>this._notify(e,n,{bubbling:!0})};this._pendingController=new c.default(e)}_beforeUnmount(){this._pendingController.destroy()}_registerPendingHandler(e,n,i={}){this._pendingController.registerPending(n,i)}_unregisterPending(e,n){this._pendingController.unregisterPending(e,n)}_hasPendings(){this._pendingController.hasPendings()}_hasRegisteredPendings(e=null){return this._pendingController.hasRegisteredPendings(e)}_hideIndicators(e){this._pendingController.hideIndicators(e)}_finishPendingHandler(e,n,i){return this._pendingController.finishPendingOperations(n,i)}finishPendingOperations(e,n=null){return this._pendingController.finishPendingOperations(e,n)}_cancelFinishingPendingHandler(e,n){return this._pendingController.cancelFinishingPending(n)}}return d.default=_,d})); 136define("Types/ParallelDeferred",["require","exports","Types/deferred"],(function(s,e,t){"use strict";const r={stopOnFirstError:!0,maxRunningCount:10};return class{constructor(s){if(this._ready=!1,this._locked=!1,this._stepsCount=0,this._stepsFinish=0,this._stepsSuccess=0,this._errors=[],this._results={},this._lazyQueue=[],this._req=globalThis.process&&globalThis.process.domain&&globalThis.process.domain.req,this._dResult=new t.Deferred({silent:!0}),this._options={...r,...s},s&&s.steps)for(const e in s.steps)if(s.steps.hasOwnProperty(e))this.push(s.steps[e],e)}_successHandler(s,e){return this._stepsFinish++,this._stepsSuccess++,this._results[s]=e,this._check(),e}_errorHandler(s,e){if(this._stepsFinish++,this._errors.push(e),!this._options.stopOnFirstError)this._results[s]=e;return this._check(),e}_isFinishedByError(){return this._options.stopOnFirstError&&this._errors.length>0}_runDfr(s,e,r){let i;if(e&&"function"==typeof s)try{i=s()}catch(s){i=new t.Deferred({silent:!0}),i.errback(s)}else i=s;null==i||i.addCallbacks(this._successHandler.bind(this,r),this._errorHandler.bind(this,r))}push(s,e){function r(){if(void 0===e)e=i._stepsCount;if(i._stepsCount++,i._results.hasOwnProperty(e))throw new Error('ÐейÑÑвие Ñ id="'+e+'" Ñже еÑÑÑ Ð² ÑÑом обÑекÑе ParallelDeferred');i._results[e]=void 0}if(this._locked)return this;if(this._req&&s._req&&this._req!==s._req&&s.logger){const e=new Error('ParallelDeferred created in "'+this._req+'" but operation created in "'+s._req+'".');
136s.logger.error("ParallelDeferred","Trying to interact with ParallelDeferred instance created in another thread.",e)}const i=this,n=s instanceof t.Deferred||s instanceof Promise,h="function"==typeof s;if(n||h){if(this._locked)throw new Error("ÐелÑÐ·Ñ Ð²ÑзÑваÑÑ push поÑле done");else if(!this._isFinishedByError())if(n)r(),this._runDfr(s,!1,e);else if(h)if(r(),this._stepsCount-this._stepsFinish-this._lazyQueue.length<=this._options.maxRunningCount)this._runDfr(s,!0,e);else this._lazyQueue.push([s,e])}else throw new Error("ÐевеÑнÑй паÑамеÑÑ dOperation: ÑÑебÑеÑÑÑ Deferred или ÑÑнкÑиÑ, возвÑаÑаÑÑÐ°Ñ ÐµÐ³Ð¾");return this}done(s){return this._locked=!0,this._successResult=s,this._check(),this}_check(){const s=()=>{let s=null;const e=this._lazyQueue.length,t=this._stepsCount-this._stepsFinish-e,r=e>0&&t<this._options.maxRunningCount;if(r)if(s=this._lazyQueue.shift(),s)this._runDfr(s[0],!0,s[1]);return r};if(!this._ready)if(this._ready=this._locked&&(this._stepsFinish===this._stepsCount||this._isFinishedByError()),this._ready)if(this._lazyQueue=[],this._isFinishedByError())this._dResult.errback(this._errors[0]);else this._dResult.callback(void 0!==this._successResult?this._successResult:this._results);else{let e=s.call(this);for(;e;)e=s.call(this)}}getResult(){return this._dResult}getStepsCount(){return this._stepsCount}getStepsDone(){return this._stepsFinish}getStepsSuccess(){return this._stepsSuccess}}})); 137define("Controls/freezeContext",["react/jsx-runtime","react","require","exports"],(function(e,t,n,r){var o,u,i,l;return Object.defineProperty(r,"__esModule",{value:!0}),o=function(e,t,n,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.Context=void 0,t.Context=(0,r.createContext)(null),t.default=function(e){const o=(0,r.useMemo)((()=>({isFreeze:e.isFreeze})),[e.isFreeze]),u={...e};return delete u.children,delete u.isFreeze,(0,n.jsx)(t.Context.Provider,{value:o,children:(0,r.cloneElement)(e.children,{...u})})},t}(0,{},e,t),u=o,i=function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=(0,n.forwardRef)((function({getContextValue:e,children:t,content:o,...u},i){const l=(0,n.useContext)(r.Context);if((0,n.useEffect)((()=>{if(e)e(null==l?void 0:l.isFreeze)}),[null==l?void 0:l.isFreeze,e]),!t)return null;else return(0,n.cloneElement)(t,{ref:i,...u})}));return o.displayName="Controls/freezeContext:Consumer",t.default=o,t}(0,{},t,o),l=i,r.ContextProvider=r.Context=r.FreezeConsumer=void 0,Object.defineProperty(r,"FreezeConsumer",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(r,"Context",{enumerable:!0,get:function(){return u.Context}}),Object.defineProperty(r,"ContextProvider",{enumerable:!0,get:function(){return u.default}}),r})); 138define("UI/Async",["react/jsx-runtime","react","WasabyLoader/ModulesLoader","WasabyLoader/Library","UI/Utils","UI/Executor","UI/Deps","I18n/i18n","require","exports"],(function(e,t,n,o,r,s,a,i,c,d){var u,l,p,m,f,h,y;return Object.defineProperty(d,"__esModule",{value:!0}),u=function(e,t,n,o,r,s,a,i,c,d){"use strict";function u(e){if(e&&c.CommonUtils.isDefaultExport(e))return e.default;else return e}Object.defineProperty(t,"__esModule",{value:!0});const l="undefined"==typeof window;class p extends o.Component{constructor(e){if(super(e),this.asyncLoading=!1,this.loadingErrorOccurred=!1,this.ecosystemName=d.controller.currentLocaleConfig.ecosystem.name,this.defaultErrorMessage=`У ${this.ecosystemName} возникла пÑоблема`,this.needNotifyOnLoad=!1,this.unmounted=!1,!e.componentName){const e="РмодÑÐ»Ñ Async пеÑедали не коÑÑекÑное Ð¸Ð¼Ñ Ñаблона (componentName=undefined|null|empty)";return i.Logger.error(e),void(this.state={})}let t={};if(l||(0,r.isLoaded)(e.componentName)){const n=this._loadContentSync(e.componentName);t={component:n,currentComponentName:e.componentName,error:!n}}if(t.error)t.userErrorMessage=this.defaultErrorMessage;this.state=t}componentDidMount(){if(!this.state.component)this._loadContentAsync(this.props.componentName);else this._callOnComponentLoad()}componentDidUpdate(){if(!this.asyncLoading)if(!this.loadingErrorOccurred)if(this.state.currentComponentName!==this.props.componentName)if(!(0,r.isLoaded)(this.props.componentName))this._loadContentAsync(this.props.componentName);else{const e=this._loadContentSync(this.props.componentName);this.setState({currentComponentName:this.props.componentName,component:e,error:!1})}else this._callOnComponentLoad();else this.loadingErrorOccurred=!1}
138render(){if(this.state.error||!this.state.component)return(0,n.jsx)("div",{ref:this.props.forwardedRef,className:this.props.className,children:this.state.userErrorMessage});if(this.state.currentComponentName===this.props.componentName)this._callOnComponentLoad();if(!this.props.children)return(0,n.jsx)(this.state.component,{ref:this.props.forwardedRef,className:this.props.className,...this.props.componentProps});else return(0,n.jsx)(this.state.component,{ref:this.props.forwardedRef,className:this.props.className,...this.props.componentProps,children:this.props.children})}componentWillUnmount(){this.unmounted=!0}_callOnComponentLoad(){var e,t;if(this.needNotifyOnLoad&&!this.state.error&&!this.asyncLoading)this.needNotifyOnLoad=!1,null===(t=(e=this.props).onComponentLoad)||void 0===t||t.call(e)}_loadContentSync(e){const t=this._loadSync(e);if(t)return this.needNotifyOnLoad=!0,(0,a.addPageDeps)([(0,s.parse)(e).name]),u(t)}_loadSync(e){try{const t=(0,r.loadSync)(e);if(t)return t}catch(t){i.Logger.error(`Couldn't load module "${e}"`,t)}}_loadContentAsync(e){return this.asyncLoading=!0,this.loadingErrorOccurred=!1,this._loadAsync(e).then((t=>{if(!this.unmounted){if(this.asyncLoading=!1,!t){this.loadingErrorOccurred=!0;const t=function(e,t){const n=`ÐÑибка загÑÑзки конÑÑола "${e}"`;return!t?`${n}\nÐÐ¾Ð·Ð¼Ð¾Ð¶Ð½Ñ ÑледÑÑÑие пÑиÑинÑ:\n\t ⢠ÐÑибка в Ñамом конÑÑоле\n\t ⢠Ðолго оÑвеÑал ÐРмеÑод в _beforeUpdate\n\t ⢠ÐонÑÑола не ÑÑÑеÑÑвÑеÑ`:`${n}: ${t}`}(e);return i.Logger.warn(t),void this.setState({error:!0,userErrorMessage:this.defaultErrorMessage})}this.needNotifyOnLoad=!0,this.setState({currentComponentName:e,component:u(t),error:!1})}}),(e=>{if(!this.unmounted)this.asyncLoading=!1,this.loadingErrorOccurred=!0,this.setState({error:!0,userErrorMessage:e.message})}))}_loadAsync(e){return(0,r.loadAsync)(e).catch((t=>{throw i.Logger.error(`Couldn't load module "${e}"`,t),(0,r.unloadSync)(e),new Error(this.defaultErrorMessage)}))}}return p.displayName="UI/Async:Async",t.default=p,t}(0,{},e,t,n,o,a,r,s,i),l=u,p=function(e,t,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,o,r){const s=(0,n.useRef)(t);(0,n.useEffect)((()=>{var t;const n=null!==(t=null==o?void 0:o.current)&&void 0!==t?t:window;if(!n||!n.addEventListener)return;const a=e=>{s.current(e)};return n.addEventListener(e,a,r),()=>{n.removeEventListener(e,a,r)}}),[e,o,r])},t}(0,{},t),m=function(e,t,n,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useHoverLoad=void 0;return t.useHoverLoad=function(e,t,s=350){const a=(0,n.useRef)(0),[i,c]=(0,n.useState)(null);let d;const u=(0,n.useRef)();return(0,r.default)("mouseenter",(()=>{if(a.current=Date.now(),!u.current)d=setTimeout((()=>{const t=e.map((e=>(0,o.loadAsync)(e)));Promise.allSettled(t).then((e=>{const t=e.map((e=>"fulfilled"===e.status?e.value:e.reason));u.current=t,c(t)}))}),s)}),t),(0,r.default)("mouseleave",(()=>{if(Date.now()-a.current<s)clearInterval(d)}),t),{data:i}},t}(0,{},t,n,p),f=m,h=function(e,t,n,o,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.importer=t.lazy=void 0,t.lazy=function(e){return e()},t.importer=function(e){const t=(0,o.forwardRef)((function(t,o){const s={...t};return delete s.children,delete s.onComponentLoad,(0,n.jsx)(r.default,{componentName:e,componentProps:s,onComponentLoad:t.onComponentLoad,forwardedRef:o,children:t.children})}));return t.displayName="UI/Async:lazy",t},t}(0,{},e,t,u),y=h,d.useHoverLoad=d.importer=d.lazy=d.Async=void 0,Object.defineProperty(d,"Async",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(d,"lazy",{enumerable:!0,get:function(){return y.lazy}}),Object.defineProperty(d,"importer",{enumerable:!0,get:function(){return y.importer}}),Object.defineProperty(d,"useHoverLoad",{enumerable:!0,get:function(){return f.useHoverLoad}}),d})); 139define("UI/HotKeys",["require","exports","UICore/HotKeys"],(function(e,t,n){"use strict";
139Object.defineProperty(t,"__esModule",{value:!0}),t.isInputElement=t.isHandledByInput=t.getKeyCaption=t.dispatcherHandler=t.KeyStop=t.Dispatcher=t.KeyHook=void 0,Object.defineProperty(t,"KeyHook",{enumerable:!0,get:function(){return n.KeyHook}}),Object.defineProperty(t,"Dispatcher",{enumerable:!0,get:function(){return n.Dispatcher}}),Object.defineProperty(t,"KeyStop",{enumerable:!0,get:function(){return n.KeyStop}}),Object.defineProperty(t,"dispatcherHandler",{enumerable:!0,get:function(){return n.dispatcherHandler}}),Object.defineProperty(t,"getKeyCaption",{enumerable:!0,get:function(){return n.getKeyCaption}}),Object.defineProperty(t,"isHandledByInput",{enumerable:!0,get:function(){return n.isHandledByInput}}),Object.defineProperty(t,"isInputElement",{enumerable:!0,get:function(){return n.isInputElement}})})); 140define("UICore/HotKeys",["react/jsx-runtime","react","UICore/Base","Env/Env","Compiler/IR","require","exports","UICore/EventCapture"],(function(e,t,n,r,o,i,a,u){var s,c,l,d,p,f,y,m,v,h,K,C;return Object.defineProperty(a,"__esModule",{value:!0}),s=function(e,t,n,r,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a={textarea:[i.constants.key.del,i.constants.key.up,i.constants.key.down],input:[i.constants.key.del]};return t.default=(0,o.forwardRef)((function(e,t){const{defaultActions:u,context:s,children:c,...l}=e,d=(0,o.useCallback)((function(e){var t;const n=null!==(t=e.which)&&void 0!==t?t:e.keyCode;if(n===i.constants.key.tab)return!1;if(!function(e,t){if(!e)return!0;const n=a[e.tagName.toLowerCase()];return!(n&&n.indexOf(t)>-1)}(e.target,n))return!1;else return null==u?void 0:u.some((e=>e.keyCode===n))}),[u]);return(0,n.jsx)(r.EventHook,{ref:t,catchEvent:d,context:s,...l,children:c})})),t}(0,{},e,u,t,r),c=s,l=function(e,t,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.dispatcherHandler=void 0,Object.defineProperty(t,"dispatcherHandler",{enumerable:!0,get:function(){return n.dispatcherHandler}}),t}(0,{},u),d=l,p=function(e,t,n){"use strict";function r(){return{ctrlKey:"Ctrl",altKey:n.detection.isMac?"Opt":"Alt",shiftKey:"Shift",metaKey:"Meta"}}Object.defineProperty(t,"__esModule",{value:!0}),t.getKeyCaption=t.osTranslateKeyCaption=void 0;const o={8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause/Break",20:"CapsLock",27:"Escape",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",91:"MetaLeft",92:"MetaRight",93:"ContextMenu",106:"Multiply",107:"Add",109:"Subtract",110:"Decimal",111:"Divide",144:"NumLock",145:"ScrollLock",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},i={173:"AudioVolumeMute",174:"AudioVolumeDown",175:"AudioVolumeUp",176:"MediaTrackNext",177:"MediaTrackPrevious",178:"MediaStop",179:"MediaPlayPause",181:"AudioVolumeMute",182:"AudioVolumeDown",183:"AudioVolumeUp"},a={Enter:"âµ",Tab:"Tab",Backspace:"â«",Escape:"Esc",Space:"â£",Delete:"Del",Insert:"Ins",ContextMenu:"â°",Home:"Home",End:"End",PageUp:"PgUp",PageDown:"PgDn",ArrowLeft:"â",ArrowUp:"â",ArrowRight:"â",ArrowDown:"â",NumpadEnter:"Numpadâµ",NumpadAdd:"Numpad+",NumpadSubtract:"Numpad-",NumpadMultiply:"Numpad*",NumpadDivide:"Numpad/",NumpadDecimal:"Numpad."};return t.osTranslateKeyCaption=r,t.getKeyCaption=function(e){const t=function(e){const t=r(),n=[];if(e.ctrlKey)n.push(t.ctrlKey);if(e.altKey)n.push(t.altKey);if(e.shiftKey)n.push(t.shiftKey);if(e.metaKey)n.push(t.metaKey);return n}(e);if(e.code)t.push(function(e){var t;if(!e)return"";if(e.startsWith("Key"))return e.slice(3);if(e.startsWith("Digit"))return e.slice(5);else return null!==(t=a[e])&&void 0!==t?t:e}(e.code));else t.push(function(e,t=!1){if(e>=112&&e<=135)return"F"+(e-111);if(e>=96&&e<=105)return"Numpad"+(e-96);if(o[e])return o[e];if(e>=65&&e<=90){const n=String.fromCharCode(e);return t?n:n.toLowerCase()}if(e>=48&&e<=57)return t?[")","!","@","#","$","%","^","&","*","("][e-48]:["0","1","2","3","4","5","6","7","8","9"][e-48];if(i[e])return i[e];else return"Unknown("+e+")"}(e.keyCode,e.shiftKey));return t},t}(0,{},r),f=p,y=function(e){"use strict";function t(){return this}var n=["keyDownHandler","content","_options","keydown"];
140return e.g({v:1,m:"wml!UICore/_hotKeys/Dispatcher",t:[e.r(((e,r)=>[e.P(r,e.m(r,0),{K:"0_",E:{"on:keydown":[{value:n[0],originalName:n[3],viewController:r.v}],meta:{isControl:!1,context:t,handler:e.M(r,1)}},O:e.s(r,{},e.m(r,2)),m:"attribute",c:!0,i:0})]))],p:n.slice(0,1),e:[(e,t)=>e.g(t,[n[2],n[1]]),function(e,t,n,r,o,i){return e.g(this,[i])},(e,t)=>e.g(t,[n[2]])],i:[[[2]]]})}(o),m=function(e){"use strict";function t(){return this}var n=["_keydownHandler","content","_options","keydown"];return e.g({v:1,m:"wml!UICore/_hotKeys/KeyStop",t:[e.r(((e,r)=>[e.P(r,e.m(r,0),{K:"0_",E:{"on:keydown":[{value:n[0],originalName:n[3],viewController:r.v}],meta:{isControl:!1,context:t,handler:e.M(r,1)}},O:e.s(r,{},e.m(r,2)),m:"attribute",c:!0,i:0})]))],p:n.slice(0,1),e:[(e,t)=>e.g(t,[n[2],n[1]]),function(e,t,n,r,o,i){return e.g(this,[i])},(e,t)=>e.g(t,[n[2]])],i:[[[2]]]})}(o),v=function(e,t,n,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i extends n.Control{constructor(){super(...arguments),this._template=o}keyDownHandler(e){return(0,r.dispatcherHandler)(e)}}return t.default=i,t}(0,{},n,l,y),h=v,K=function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class o extends n.Control{constructor(){super(...arguments),this._template=r}_keydownHandler(e){if((this._options.stopKeys||[]).find((t=>{let n=t.code?t.code===e.nativeEvent.code:t.keyCode===e.nativeEvent.keyCode;if(void 0!==t.ctrlKey)n=n&&t.ctrlKey===e.nativeEvent.ctrlKey;if(void 0!==t.altKey)n=n&&t.altKey===e.nativeEvent.altKey;if(void 0!==t.shiftKey)n=n&&t.shiftKey===e.nativeEvent.shiftKey;if(void 0!==t.metaKey)n=n&&t.metaKey===e.nativeEvent.metaKey;return n})))e.stopPropagation()}}return t.default=o,t}(0,{},n,m),C=K,a.isInputElement=a.isHandledByInput=a.osTranslateKeyCaption=a.getKeyCaption=a.dispatcherHandler=a.KeyStop=a.Dispatcher=a.KeyHook=void 0,a.KeyHook=c.default,a.Dispatcher=h.default,a.KeyStop=C.default,Object.defineProperty(a,"dispatcherHandler",{enumerable:!0,get:function(){return d.dispatcherHandler}}),Object.defineProperty(a,"getKeyCaption",{enumerable:!0,get:function(){return f.getKeyCaption}}),Object.defineProperty(a,"osTranslateKeyCaption",{enumerable:!0,get:function(){return f.osTranslateKeyCaption}}),Object.defineProperty(a,"isHandledByInput",{enumerable:!0,get:function(){return u.isHandledByInput}}),Object.defineProperty(a,"isInputElement",{enumerable:!0,get:function(){return u.isInputElement}}),a})); 141define("UICore/EventCapture",["react","UICore/Ref","UICore/Executor","Env/Env","require","exports"],(function(e,t,r,n,i,u){var c,s,a,o,d,l,f,v,p,h;return Object.defineProperty(u,"__esModule",{value:!0}),c=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventCatchers=void 0;return t.EventCatchers=class{constructor(){this.eventCatchers=[]}add(e){if(-1===this.eventCatchers.findIndex((([t,r])=>t===e.catchEvent)))this.eventCatchers.push([e.catchEvent,e.container])}getAll(){return this.eventCatchers}remove(e){const t=this.eventCatchers.findIndex((([t,r])=>t===e));if(-1!==t)this.eventCatchers.splice(t,1)}},t}(0,{}),s=c,a=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.traverseParents=void 0,t.traverseParents=function(e,t,r=""){var n;if(!t)return;const i="global"===r?null:null===(n=t.parentElement)||void 0===n?void 0:n.closest(".controls-Popup");let u=t;for(;u&&u!==i&&u!==document.documentElement&&u!==document.body;){if(e(u))break;u=u.parentElement}},t}(0,{}),o=a,d=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.isInputElement=t.isHandledByInput=void 0,t.isHandledByInput=function(e){const t=null==e?void 0:e.currentTarget;if(!(t&&t instanceof HTMLElement))return!1;if(t.disabled)return!1;if(t.hasAttribute("disabled"))return!1;const n=t.isContentEditable,i="TEXTAREA"===t.tagName||n,u=t,c=u.type||"text",s=r.detection.isMac?e.metaKey:e.ctrlKey;if(n&&s&&["KeyB","KeyI","KeyU"].includes(e.code))return!0;if(!!u.list&&["ArrowUp","ArrowDown"].includes(e.code))return!0;if(u.readOnly){const{code:t}=e;if(["ArrowLeft","ArrowRight","Home","End","Tab"].includes(t))return!0;
141if(["ArrowUp","ArrowDown"].includes(t))return i;else return s&&"KeyC"===t}if("number"===c)return function(e){const{code:t,ctrlKey:n,altKey:i,shiftKey:u,metaKey:c}=e,s=r.detection.isMac?c:n;if(s&&["KeyA","KeyC","KeyV","KeyX","KeyZ"].includes(t))return!0;if(i||r.detection.isMac&&n)return!1;if(["ArrowUp","ArrowDown"].includes(t))return!0;if(["Backspace","Delete","Tab","Escape","ArrowLeft","ArrowRight","Home","End"].includes(t))return!0;if(u&&(t.startsWith("Digit")||t.startsWith("Numpad")))return!1;if(t.startsWith("Digit")||t.startsWith("Numpad"))return!0;return["Minus","NumpadSubtract","Equal","NumpadAdd","Period","Comma","NumpadDecimal","KeyE"].includes(t)}(e);if(["date","time","datetime-local","month","week"].includes(c))return function(e){const{code:t,ctrlKey:n,metaKey:i}=e,u=r.detection.isMac?i:n;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t))return!0;if(u&&["KeyA","KeyC","KeyV","KeyX"].includes(t))return!0;if(["Backspace","Delete","Tab","Escape"].includes(t))return!0;else return t.startsWith("Digit")||t.startsWith("Numpad")}(e);else return function(e,t){const{code:n,ctrlKey:i,altKey:u,metaKey:c}=e;if(["Enter","ArrowUp","ArrowDown"].includes(n))return t;if(["Backspace","Delete","Tab","Escape","ArrowLeft","ArrowRight","Home","End"].includes(n))return!0;const s=r.detection.isMac?c:i;if(s&&["KeyA","KeyC","KeyV","KeyX","KeyZ","KeyY"].includes(n))return!0;if(n.startsWith("Key")||n.startsWith("Digit")||n.startsWith("Numpad")||["Space","Quote","Slash","Backslash","Comma","Period","Semicolon","Equal","Minus"].includes(n))if(r.detection.isMac)return!i&&!c;else if(u&&n.startsWith("Numpad")&&!isNaN(Number(n[n.length-1])))return!0;else return!i&&!u&&!c;return!1}(e,i)},t.isInputElement=function(e){if(e){const t="INPUT"===e.tagName,r="TEXTAREA"===e.tagName,n="true"===e.getAttribute("contenteditable");if(t||r||n)return!0}return!1},t}(0,{},n),l=d,f=function(e,t,r,n,i,u,c){"use strict";function s(e){return!(e&&e instanceof HTMLElement&&document.body.contains(e))}return Object.defineProperty(t,"__esModule",{value:!0}),t.default=(0,i.forwardRef)((function(e,t){const{catchEvent:a,context:o,children:d,forwardedRef:l,...f}=e,v=(0,i.useRef)(),p=(0,i.useCallback)((e=>{if(!s(v.current))(0,r.traverseParents)((t=>{if(!v.current)return!1;else return t._$eventCatchers=t._$eventCatchers||new n.EventCatchers,t._$eventCatchers.add({catchEvent:e,container:v.current}),!1}),v.current,o)}),[v.current,o]),h=(0,i.useCallback)((e=>{(0,r.traverseParents)((t=>{var r;return null===(r=t._$eventCatchers)||void 0===r||r.remove(e),!1}),v.current,o)}),[v.current,o]),y=(0,i.useRef)(),m=(0,i.useCallback)((function(e){if(!s(e))if(v.current=e,y.current!==a){if(y.current)h(y.current);y.current=a,p(a)}}),[a,p,h]),E=(0,i.useMemo)((()=>u.ChainOfRef.both(t,m)),[t]);if((0,i.useLayoutEffect)((()=>()=>{h(a)}),[a]),(0,c.isReactElement)(d))return(0,i.cloneElement)(d,{...f,ref:E});else return(0,i.cloneElement)(d,{...f,ref:E,forwardedRef:l})})),t}(0,{},a,c,e,t,r),v=f,p=function(e,t,r,n,i){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.dispatcherHandler=void 0,t.dispatcherHandler=function(e){var t,u;const c=e.nativeEvent,s=(null==c?void 0:c.constructor)===window.KeyboardEvent;if(c.handledByDispatcher)return;c.handledByDispatcher=!0;let a=!1;if(c.isTrusted||function(e){const t=null==e?void 0:e.target;return null==t?void 0:t.classList.contains("unit-test-input")}(c))if(!(s&&(0,i.isInputElement)(document.activeElement)&&(0,i.isHandledByInput)(c)))if((0,n.traverseParents)((e=>{var t;const r=null===(t=e._$eventCatchers)||void 0===t?void 0:t.getAll();return null==r||r.find((([e,t])=>{if(e(c)){const e=new(r=c).constructor(r.type,r);return t.dispatchEvent(e),a=!0,!0}var r;return!1})),a}),c.target),a)if(e.stopPropagation(),null===(t=e.nativeEvent)||void 0===t||t.stopPropagation(),s){const t=c,n=null!==(u=t.which)&&void 0!==u?u:t.keyCode;if(r.detection.isIE&&n===r.constants.key.backspace)e.preventDefault()}},t}(0,{},n,a,d),h=p,u.isInputElement=u.isHandledByInput=u.dispatcherHandler=u.EventHook=u.EventCatchers=u.traverseParents=void 0,Object.defineProperty(u,"traverseParents",{enumerable:!0,get:function(){return o.traverseParents}}
141),Object.defineProperty(u,"EventCatchers",{enumerable:!0,get:function(){return s.EventCatchers}}),Object.defineProperty(u,"EventHook",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(u,"dispatcherHandler",{enumerable:!0,get:function(){return h.dispatcherHandler}}),Object.defineProperty(u,"isHandledByInput",{enumerable:!0,get:function(){return l.isHandledByInput}}),Object.defineProperty(u,"isInputElement",{enumerable:!0,get:function(){return l.isInputElement}}),u})); 142define("UI/Theme",["react/jsx-runtime","react","UICore/Executor","UICommon/ThemeInitializer","UI/theme/controller","UI/State","UI/Contexts","Types/entity","Types/chain","Env/Env","Application/Page","Application/Env","require","exports","UICommon/theme/controller"],(function(e,t,r,n,o,i,u,l,a,s,c,d,f,g,m){var h,p,T,v,b,_,y,E,S,C,k,A,L,R,O,P,I,M,j,B,N,U,D,x,F,$,G,w,W,H,K,V,z,Y,X,Z,q,J,Q,ee,te,re,ne,oe,ie,ue,le,ae,se,ce,de,fe,ge,me,he,pe,Te,ve,be,_e,ye,Ee,Se,Ce,ke,Ae;return Object.defineProperty(g,"__esModule",{value:!0}),h=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=Object.keys(e.styles).map((t=>{const r=e.styles[t],n=r?Object.entries(r).map((([e,t])=>`${e.replace(/([a-z])([A-Z])/,"$1-$2").toLowerCase()}: ${t}; `)).join(""):!1;return!n?!1:`${t} { ${n} }`})).filter((e=>e));if(0===t.length)return null;else return(0,r.jsx)("style",{children:t.join("\n")})},t}(0,{},e),p=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n="StyleRegistryStorage",o=()=>new Map;return t.default={read:e=>(0,r.getStore)(n,o).get(e),write(e,t){(0,r.getStore)(n,o).set(e,t)},delete(e){(0,r.getStore)(n,o).delete(e)}},t}(0,{},d),T=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=""){let r;try{r=t+"t-"+function(e){let t=0;if(0===e.length)return t;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}(JSON.stringify(e))}catch(e){r=t+"t-wrong-style"}return r},t}(0,{}),v=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class o{constructor(){this._storageUuid=new Map,this._storageSelector=new Map}async loadTheme(e){if("selector"in e&&this._storageSelector.has(e.selector))return this._storageSelector.get(e.selector);if("uuid"in e&&this._storageUuid.has(e.uuid))return this._storageUuid.get(e.uuid);const t=await(0,n.getThemeController)().getActiveTheme(e);if(t)this.saveTheme(t);return t}saveTheme(e){if("uuid"in e&&e.uuid)this._storageUuid.set(e.uuid,e);if(!("error"in e)&&(null==e?void 0:e.selector))this._storageSelector.set(e.selector,e)}saveActiveThemes(e){const t=Array.isArray(e)?e:[e];for(const e of t)if(e&&!(0,n.isErrorTheme)(e))this.saveTheme(e)}getThemeByUuid(e){return this._storageUuid.get(e)}getTheme(e){return this._storageSelector.get(e)}hasTheme(){return this._storageUuid.size>0||this._storageSelector.size>0}clear(){this._storageUuid.clear(),this._storageSelector.clear()}}return t.default=function(){return(0,r.getStore)("theme-store",(()=>new o))},t}(0,{},d,o),b=v,_=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.BackgroundContext=void 0,t.BackgroundContext=(0,r.createContext)(null),t}(0,{},t),y=function(e,t){"use strict";function r(e,r="",n=1,o){var i;if(!(null==o?void 0:o.dominantColorRGB)&&null===r)return t.DEFAULT_LIGHT_DOMINANT_VALUE;if(!r)return null!==(i=null==o?void 0:o.dominantColorRGB)&&void 0!==i?i:r;const u=!!o,l=T(r,void 0,void 0,u),a=1===n;if(l===e&&(a||!u))return r;if(!u){if(a)return e?t.DEFAULT_LIGHT_DOMINANT_VALUE:t.DEFAULT_DARK_DOMINANT_VALUE;if(n<1&&e!==l)return e?t.DEFAULT_DARK_DOMINANT_VALUE:t.DEFAULT_LIGHT_DOMINANT_VALUE}if(n<.5)return(null==o?void 0:o.isLightTheme)?t.DEFAULT_LIGHT_DOMINANT_VALUE:t.DEFAULT_DARK_DOMINANT_VALUE;if(n>=.5&&n<1)return e?t.DEFAULT_LIGHT_DOMINANT_VALUE:t.DEFAULT_DARK_DOMINANT_VALUE;const s=null==o?void 0:o.dominantColorRGB;if(s&&e===o.isLightTheme&&T(s)!==l)return s;else return r}function n(e){let t=e.toLowerCase();t=t.replace(E,((e,t,r,n,o)=>{const i=o||"f";return t+t+r+r+n+n+i+i}));let r=C.exec(t);if(r)return{r:parseInt(r[1],b),g:parseInt(r[2],b),b:parseInt(r[3],b),a:parseInt(r[4]||"ff",b)/v};if(t=t.split(" ").join(""),r=k.exec(t)||A.exec(t),r)return{r:parseInt(r[1],_),g:parseInt(r[2],_),b:parseInt(r[3],_),a:parseFloat(r[4]||"1")};const n=L.exec(t);if(n){const e=n[4]?parseFloat(n[4]):1,t=o(parseInt(n[1],_),parseInt(n[2],_),parseInt(n[3],_),e);if(t)return{r:t.r,g:t.g,b:t.b,a:e}}return{r:v,g:v,b:v,a:1}}function o(e,t,r,n){const o=(t>y?y:t)/y,i=(r>y?y:r)/y,u=(1-Math.abs(2*i-1))*o,l=u*(1-Math.abs(e/60%2-1)),a=i-u/2;let s=0,c=0,d=0;if(0<=e&&e<60)s=u,c=l,d=0;else if(60<=e&&e<120)s=l,c=u,d=0;
142else if(120<=e&&e<180)s=0,c=u,d=l;else if(180<=e&&e<240)s=0,c=l,d=u;else if(240<=e&&e<300)s=l,c=0,d=u;else if(300<=e&&e<360)s=u,c=0,d=l;s=Math.round((s+a)*v),c=Math.round((c+a)*v),d=Math.round((d+a)*v);const f={r:s,g:c,b:d};if(void 0!==n)f.a=n;return f}function i(e){const t=n(e),{h:r,s:o,l:i}=u(e);return{h:r,s:o,l:i,a:t.a}}function u(e){let{r:t,g:r,b:o,a:i}=n(e);t/=v,r/=v,o/=v;const u=Math.min(t,r,o),l=Math.max(t,r,o),a=l-u;let s;if(0===a)s=0;else if(l===t)s=(r-o)/a%6;else if(l===r)s=(o-t)/a+2;else s=(t-r)/a+4;if(s*=60,s<0)s+=360;let c=(l+u)/2,d=0===a?0:a/(1-Math.abs(2*c-1));return d*=y,c*=y,{h:s,s:d,l:c,a:i}}function l(e,t,r,n){let o=`#${a(e)}${a(t)}${a(r)}`;if(void 0!==n)o+=`${s(n)}`;return o}function a(e){const t=e.toString(b);return 1===t.length?"0"+t:t}function s(e){let t=Math.round(+e*v).toString(b);if(1===t.length)t="0"+t;return t}function c(e){const t=l(e.r,e.g,e.b),{a:r,...n}=i(t);return d(n)}function d(e){return e.l<=65}function f(e){if(!e)return 1;else return n(e).a}function g(e){return!!e&&(e.startsWith("linear-gradient")||e.startsWith("radial-gradient"))}function m(e,t,r){if("brightening"===t&&"number"==typeof r)return e*(1-r)+r*v;if("blackout"===t&&"number"==typeof r)return e*(1-r);else return e}function h(e,t){return e*t+(1-t)*v}function p(e){return Math.round(e)}function T(e,t,r,o=!0){try{const{r:i,g:u,b:l,a}=n(e);let s=m(i,t,r),d=m(u,t,r),f=m(l,t,r);if(o)s=h(s,a),d=h(d,a),f=h(f,a);return!c({r:p(s),g:p(d),b:p(f)})}catch(e){return!0}}Object.defineProperty(t,"__esModule",{value:!0}),t.isLightColor=t.isGradient=t.getOpacity=t.isDarkThemeHSL=t.isDarkTheme=t.alphaToHex=t.componentToHex=t.rgbToHex=t.hexToHsl=t.hexToHsla=t.hslToRgb=t.toRgb=t.getDominantColor=t.DEFAULT_DARK_DOMINANT_VALUE=t.DEFAULT_LIGHT_DOMINANT_VALUE=void 0;t.DEFAULT_LIGHT_DOMINANT_VALUE="255, 255, 255",t.DEFAULT_DARK_DOMINANT_VALUE="0, 0, 0";const v=255,b=16,_=10,y=100,E=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d]?)$/i,S=/^#?([A-Fa-f0-9]{3,4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/,C=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,k=/^rgba?\(([\d]+),([\d]+),([\d]+),?([\d.]*)\)$/i,A=/^([\d]+),([\d]+),([\d]+),?([\d.]*)$/i,L=/hsla?\(([\d.]+),([\d.]+)%?,([\d.]+)%?,?([\d.]+)?\)?/i;t.getDominantColor=r,t.toRgb=n,t.hslToRgb=o,t.hexToHsla=i,t.hexToHsl=u,t.rgbToHex=l,t.componentToHex=a,t.alphaToHex=s,t.isDarkTheme=c,t.isDarkThemeHSL=d,t.getOpacity=f,t.isGradient=g,t.isLightColor=T;const R=/(#[0-9A-Fa-f]{3,8}|rgb(a)?\(\s*\d+\s*,\s*\d+\s*,\s*\d+(\s*,\s*\d*\.?\d+)?\s*\)|hsl(a)?\(\s*[\d.]+\s*,\s*[\d.]+%?\s*,\s*[\d.]+%?(\s*,\s*[\d.]+)?\s*\))/;return t.default=function(e,t,n,o=null,i=!0){var u,l;const a=null!=e?e:null==o?void 0:o.backgroundColor;let s=f(null!=a?a:"");if(!1===i)return[!0,s];let c=a||t;const d=g(a),m=!e&&t&&!!n;if(a&&d)c=function(e){if(void 0===e)return e;if(g(e)){const t=e.match(R);return t?t[0]:e}return e}(a);if(m&&!n.opacity)c=t,s=1;if(a&&m)c=t;if(!d&&!function(e){if(!e||"string"!=typeof e)return!1;const t=e.split(" ").join("");return S.test(e)||k.test(t)||A.test(t)||L.test(t)}(c))return[null!==(u=null==o?void 0:o.isLightTheme)&&void 0!==u?u:!0,s];const h=null!==(l=null!=t?t:null==o?void 0:o.dominantColorRGB)&&void 0!==l?l:"",p=T(d||m?h:c,void 0,void 0,m?!1:!!o),v=r(p,t||e||(null==n?void 0:n.dominantColor),s,o);return[v?T(v):p,s]},t}(0,{}),E=y,S=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.LAYER_BLEND_MODE_MAP=t.DEFAULT_LAYER_BLEND_MODE=t.DEFAULT_LAYER_REPEAT=t.DEFAULT_LAYER_SIZE=t.DEFAULT_LAYER_POSITION=t.NEGATIVE_TEMPERATURE_HUE_OFFSET=t.PERCENT=t.DISK_URL=t.PREVIEWER=t.SBIS_DISK_RESOURCE=void 0,t.SBIS_DISK_RESOURCE="sbisDisk",t.PREVIEWER="/previewer",t.DISK_URL="/disk/api/v1/",t.PERCENT=100,t.NEGATIVE_TEMPERATURE_HUE_OFFSET=180,t.DEFAULT_LAYER_POSITION="center",t.DEFAULT_LAYER_SIZE="auto",t.DEFAULT_LAYER_REPEAT="no-repeat",t.DEFAULT_LAYER_BLEND_MODE="normal",t.LAYER_BLEND_MODE_MAP={normal:"normal",multiply:"multiply",screen:"screen",overlay:"overlay",darken:"darken",lighten:"lighten",colordodge:"color-dodge",colorburn:"color-burn",hardlight:"hard-light",softlight:"soft-light",difference:"difference",exclusion:"exclusion",hue:"hue",saturation:"saturation",color:"color",luminosity:"luminosity"},t}(0,{}),C=function(e,t){"use strict";
142return Object.defineProperty(t,"__esModule",{value:!0}),t.getActualBackground=void 0,t.getActualBackground=function(e){const{themeBackground:t,...r}=e;if(!t)return e;else return{...r,...t}},t}(0,{}),k=function(e,t){"use strict";function r(e){return"angle"in e}return Object.defineProperty(t,"__esModule",{value:!0}),t.isColorLayer=t.isGradientLayer=t.isImageLayer=t.isGradientRadial=t.isGradientLinear=void 0,t.isGradientLinear=r,t.isGradientRadial=function(e){return!r(e)},t.isImageLayer=function(e){return!!e&&"object"==typeof e&&"image"in e},t.isGradientLayer=function(e){return!!e&&"object"==typeof e&&"colorStops"in e},t.isColorLayer=function(e){return"string"==typeof e},t}(0,{}),A=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.ensureFontThemeFallback=t.BASE_FONT_THEME=void 0,t.BASE_FONT_THEME={classList:["t-base_font_sabyapp"],selector:"base_font_sabyapp",themeApply:r.THEME_APPLICATIONS.font,isFromDistribution:!0},t.ensureFontThemeFallback=function(e,n,o=!1,i,u=!1){if(u)return e;const l=null==i?void 0:i.includes("retail__");if(!n||o||l)return e;const a=Array.isArray(e)?e:e&&!("error"in e)?[e]:[];return a.some((e=>e.themeApply===r.THEME_APPLICATIONS.font))?e:[...a,t.BASE_FONT_THEME]},t}(0,{},m),L=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.useThemeEffect=void 0,t.useThemeEffect="undefined"==typeof window?function(e){e()}:function(e,t){(0,r.useLayoutEffect)(e,t)},t}(0,{},t),R=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getChildrenProps=t.emptyCallback=void 0;return t.emptyCallback=()=>{},t.getChildrenProps=function(e,r,n,o){var i;const u=[null===(i=null==e?void 0:e.props)||void 0===i?void 0:i.className,r].filter(Boolean).join(" "),l={onWheel:t.emptyCallback,...n,className:u};if(o)l.forwardedRef=o;return l},t}(0,{}),O=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_STATIC_THEME=t.ERROR_FALLBACK_SELECTOR=void 0,t.ERROR_FALLBACK_SELECTOR="ÐÑибка загÑÑзки ÑемÑ",t.DEFAULT_STATIC_THEME="default",t}(0,{}),P=function(e,t,r){"use strict";function n(e){return e===r.ONLINE_NAVIGATION_CONVERTER.oldName?r.ONLINE_NAVIGATION_CONVERTER.newName:e}return Object.defineProperty(t,"__esModule",{value:!0}),t.getSelectorThemeState=t.normalizeSelectors=t.normalizeSelector=void 0,t.normalizeSelector=n,t.normalizeSelectors=function(e){return(Array.isArray(e)?e:[e]).map(n)},t.getSelectorThemeState=function(e,t){return e.reduce(((e,r)=>{const n=t(r);if(n)e.loadedThemes.push(n);else e.selectorsToClientLoad.push(r);return e}),{loadedThemes:[],selectorsToClientLoad:[]})},t}(0,{},m),I=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.isUuid=void 0,t.isUuid=function(e){return"string"==typeof e&&r.UUID_REGEXP.test(e)},t}(0,{},m),M=function(e,t,r,n,o,i){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=(0,n.forwardRef)((function(e,t){var u;if(!(0,o.isReactElement)(e.children))return null;const l={...e.backgroundStyles},a=e.backgroundStylesClassName;if(l)delete l.left,delete l.top,delete l.zIndex;let s=[];const c=null!==(u=e.children.props.className)&&void 0!==u?u:"";if(c.length>0)s.push(c);s=s.concat(e.classList);const d={className:s.join(" ")};if(t)d.ref=t;if(e.onClick)d.onClick=e.onClick;if(l&&!a)d.style=l;if(a)d.className=d.className+" "+a;const f=(0,n.cloneElement)(e.children,d);if(e.withoutContext)return f;else return(0,r.jsx)(i.BackgroundContext.Provider,{value:e.backgroundContextValue,children:f})})),t}(0,{},e,t,r,_),j=function(e,t,r,n,o){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=(0,n.forwardRef)((function(e,t){const n=e.backgroundStyles?(0,r.jsx)("div",{style:{position:"absolute",width:"100%",height:"100%",...e.backgroundStyles}}):null,i=e.withoutContext?(0,r.jsxs)(r.Fragment,{children:[n,e.children]}
142):(0,r.jsxs)(r.Fragment,{children:[n,(0,r.jsx)(o.BackgroundContext.Provider,{value:e.backgroundContextValue,children:e.children})]});return(0,r.jsx)("div",{ref:t,className:e.className,onClick:e.onClick,style:{zIndex:0},children:i})})),t}(0,{},e,t,_),B=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.getEffectsFilter=void 0,t.getEffectsFilter=function(e){if(!e)return;const t=[];if(null!=e.opacity)t.push(`opacity(${Math.round(e.opacity*r.PERCENT)}%)`);if(null!=e.blur)t.push(`blur(${e.blur}px)`);if(null!=e.temperature){const n=e.temperature>0?e.temperature:r.NEGATIVE_TEMPERATURE_HUE_OFFSET+Math.abs(e.temperature);t.push(`hue-rotate(${n}deg)`)}if(null!=e.contrast)t.push(`contrast(${e.contrast*r.PERCENT}%)`);if(null!=e.saturate)t.push(`saturate(${e.saturate*r.PERCENT}%)`);return t.length>0?t.join(" "):void 0},t}(0,{},S),N=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.getResourceUrl=void 0,t.getResourceUrl=function(e){if("string"==typeof e)return e;if(e.type===r.SBIS_DISK_RESOURCE)return`${r.PREVIEWER}${r.DISK_URL}${e.value}`;else return e.value},t}(0,{},S),U=function(e,t,r,n,o,i,u){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.useScopeTheme=t.GENERATED_THEME=void 0,t.GENERATED_THEME="g-",t.useScopeTheme=function(e){const l=(0,r.useMemo)((()=>Array.isArray(e)?e:[e]),[e]),a=(0,r.useRef)(new Set);return(0,n.useThemeEffect)((()=>{const e=(0,o.getThemeController)();for(const r of l){if((0,u.isErrorTheme)(r))continue;const n=null==r?void 0:r.selector;if(!n||n.includes(t.GENERATED_THEME))continue;const o=`${n}:${r.version}`;if(!a.current.has(o))a.current.add(o),e.applyStyles(r)}}),[l]),(0,r.useMemo)((()=>{var e;let t;const r=[];for(const n of l)if(n&&!(0,u.isErrorTheme)(n)){if(!t&&n.themeApply===i.THEME_APPLICATIONS.palette)t=n;if(null===(e=n.classList)||void 0===e?void 0:e.length)for(const e of n.classList)r.push(e)}return[t,r]}),[l])},t}(0,{},t,L,n,m,o),D=function(e,t,r,n,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useThemeBeforeStyleBackground=t.BACKGROUND_CLASS_PREFIX=void 0,t.BACKGROUND_CLASS_PREFIX="ui-Theme__backgroundviewer-";const u=["background","backgroundAttachment","backgroundBlendMode","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPosition","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundSize","boxShadow","filter","border","borderWidth","borderStyle","borderColor","borderRadius","borderTop","borderRight","borderBottom","borderLeft","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],l=[["content","''"],["display","block"],["position","absolute"],["zIndex",-1]],a=[["borderRadius","inherit"]],s={borderRadius:{resetValue:0}},c="undefined"==typeof window;return t.useThemeBeforeStyleBackground=function(e,d,f){const g=(0,o.default)(e||{},t.BACKGROUND_CLASS_PREFIX);if((0,n.useThemeEffect)((()=>{var t,n,o,m,h,p;if(d||!e)return;const T=f,v=e.backgroundImage||"",b=/(?:^|,\s*)url\(/.test(v),_=!!e.backgroundColor&&(!e.backgroundImage||b),y={...e,..._?{backgroundColor:"var(--brandbook_background-color)"}:{}},E=u.reduce(((e,t)=>{const r=y[t];if(null!=r)e.push([t,r]);return e}),[]),S=new Set(E.map((([e])=>e))),C=[];for(const[e,t]of a)if(!S.has(e))C.push([e,t]);const k=null!==(n=null!==(t=y.borderWidth)&&void 0!==t?t:y.borderTopWidth)&&void 0!==n?n:0,A=[["top",`-${null!==(o=y.borderTopWidth)&&void 0!==o?o:k}`],["right",`-${null!==(m=y.borderRightWidth)&&void 0!==m?m:k}`],["bottom",`-${null!==(h=y.borderBottomWidth)&&void 0!==h?h:k}`],["left",`-${null!==(p=y.borderLeftWidth)&&void 0!==p?p:k}`]],L=E.concat(l,A,C).map((([e,t])=>{var r;let n=t;const o=`no${e.charAt(0).toUpperCase()}${e.slice(1)}`;if(null==T?void 0:T[o]){const t=null===(r=s[e])||void 0===r?void 0:r.resetValue;if(void 0===t)return"";n=t}return`${e.replace(/([a-z])([A-Z])/,"$1-$2").toLowerCase()}: ${n}; `})).join(""),R=r.Head.getInstance(),O=i.default.read(g);
142if(O){if(c&&!R.getAttrs(O.tagId)){const e=R.createTag("style",{},`.${g}::before { ${L} }`);O.tagId=e,O.lines=L}else if(O.lines!==L){R.deleteTag(O.tagId);const e=R.createTag("style",{},`.${g}::before { ${L} }`);O.tagId=e,O.lines=L}O.count++}else{const e=R.createTag("style",{},`.${g}::before { ${L} }`);i.default.write(g,{count:1,tagId:e,lines:L})}}),[e,f]),(0,n.useThemeEffect)((()=>()=>{r.Body.getInstance().removeClass(g);const e=r.Head.getInstance(),t=i.default.read(g);if(t)if(t.count--,0===t.count)e.deleteTag(t.tagId),i.default.delete(g)}),[g,e]),!e||d)return;const m=f;if(0!==Object.entries(e).filter((([e])=>{var t;if(!u.includes(e))return!1;const r=`no${e.charAt(0).toUpperCase()}${e.slice(1)}`;return!(null==m?void 0:m[r])||void 0!==(null===(t=s[e])||void 0===t?void 0:t.resetValue)})).length)return g},t}(0,{},c,L,T,p),x=D,F=function(e,t,r,n,o){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.useThemeClassName=void 0,t.useThemeClassName=function(e,t){const i=(0,r.useRef)([]);if((0,o.useThemeEffect)((()=>{if(t){const t=e?[...e]:[];n.Body.getInstance().replaceClasses(i.current,t),i.current=t}}),[e]),(0,r.useLayoutEffect)((()=>()=>n.Body.getInstance().replaceClasses(i.current,[])),[]),!t&&e&&(null==e?void 0:e.length)>0)return e;else return[]},t}(0,{},t,c,L),$=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useThemeScheme=void 0;return t.useThemeScheme=()=>{var e;const t=(0,r.useContext)(n.BackgroundContext);if(!t)return!0;else return null!==(e=t.isLightTheme)&&void 0!==e?e:!0},t}(0,{},t,_),G=$,w=function(e,t,r,n,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useThemeStyleBackground=void 0;const u="ui-Theme__backgroundviewer";return t.useThemeStyleBackground=function(e,t){const l=(0,r.useRef)(),a=(0,r.useCallback)((()=>{if(i.detection.isMobileAndroid)return"100lvh";if(i.detection.isMobileSafari)return"110lvh";else return"100%"}),[i.detection.isMobileAndroid,i.detection.isMobileSafari]);if((0,o.useThemeEffect)((()=>{if(!t||!e)return;n.Body.getInstance().addClass(u);const r=e.backgroundImage||"",o=/(?:^|,\s*)url\(/.test(r),s=!!e.backgroundColor&&(!e.backgroundImage||o),c={...e,...s?{backgroundColor:"var(--brandbook_background-color)"}:{}},d=[["background-position","top center"],...Object.entries(c).filter((([e])=>e.includes("background")||"filter"===e)),["content","''"],["display","block"],["position","fixed"],["width","100%"],["height",a()],["z-index","-1"]];if(i.detection.isMobileSafari)d.push(["overscroll-behavior-y","none"]);const f=d.map((([e,t])=>`${e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}: ${String(t)}; `)).join("");l.current=n.Head.getInstance().createTag("style",{},`.${u}::before { ${f} }`)}),[e]),(0,r.useLayoutEffect)((()=>()=>{if(t)n.Body.getInstance().removeClass(u);if(l.current)n.Head.getInstance().deleteTag(l.current)}),[t]),!t)return e},t}(0,{},t,c,L,s),W=function(e,t,r,n){"use strict";function o(e){if(e&&"string"!=typeof e&&"selector"in e)return e.selector}function i(e){if(!e||"string"==typeof e)return!1;const t=Array.isArray(e)?e:[e];return t.length>0&&t.every((e=>function(e){return"string"!=typeof e&&!!e}(e)&&!a(e)&&e.themeApply===r.THEME_APPLICATIONS.font))}function u(e){const t=(0,n.isUuid)(e),r=s(e),i=Array.isArray(e),u="string"!=typeof e&&!!e&&!t&&!i;return{isFallbackSelector:r||u&&a(e)||i&&(l=e,l.some((e=>a(e)))),hasActiveTheme:r||u&&!!o(e)||i&&e.length>0};var l}function l(e){return!!o(e)||"uuid"in e&&!!e.uuid}function a(e){return"error"in e}function s(e){return"string"==typeof e&&e.length>0&&!(0,n.isUuid)(e)}return Object.defineProperty(t,"__esModule",{value:!0}),t.isSelectorString=t.isOnlyFontTheme=t.getThemeSelector=t.getFallbackSelector=t.isFallbackSelectorTheme=t.hasActiveTheme=t.getFinalActiveTheme=void 0,t.getFinalActiveTheme=function(e,t,r){if(i(e))return null!=t?t:e;if(!r||function(e){if(!e)return!1;if((0,n.isUuid)(e))return!0;if(s(e))return!0;if(Array.isArray(e))return e.some(l);return l(e)}(e))return e;else return null!=t?t:e},t.hasActiveTheme=function(e){return u(e).hasActiveTheme},t.isFallbackSelectorTheme=function(e){return u(e).isFallbackSelector},t.getFallbackSelector=function(e,t,r){if(t)return t;if(s(e))return e;
142if(Array.isArray(e)){const t=e.map(o).filter(Boolean);return t.length?t:r}return o(e)||r},t.getThemeSelector=o,t.isOnlyFontTheme=i,t.isSelectorString=s,t}(0,{},o,I),H=function(e,t,r,n){"use strict";function o(e){if(e&&"string"!=typeof e){if(!Array.isArray(e))return i(e);for(const t of e){if((0,r.isErrorTheme)(t))continue;const e=i(t);if(e)return e}}}function i(e){var t;if(!(0,r.isErrorTheme)(e))if(e.themeApply===r.THEME_APPLICATIONS.palette)return null===(t=e.properties)||void 0===t?void 0:t.get("staticTheme");else return}return Object.defineProperty(t,"__esModule",{value:!0}),t.getStaticThemeFromProperties=t.getBoundStaticTheme=t.getStaticThemeFromActiveTheme=t.getFinalStaticThemeName=t.getStaticThemeBaseName=void 0,t.getStaticThemeBaseName=function(e,t,r){return e||t||(r?n.DEFAULT_STATIC_THEME:void 0)},t.getFinalStaticThemeName=function(e,t,r,i,u,l){const a=(t?o(e):void 0)||i||u||(t?n.DEFAULT_STATIC_THEME:void 0)||(l?n.DEFAULT_STATIC_THEME:void 0);return function(e,t){if((null==t?void 0:t.includes("retail__"))&&t!==e)return t;return e}(null!=r?r:a,a)},t.getStaticThemeFromActiveTheme=function(e){if(e&&"string"!=typeof e)if(Array.isArray(e))return o(e);else return i(e)},t.getBoundStaticTheme=o,t.getStaticThemeFromProperties=i,t}(0,{},o,O),K=function(e,t,r,n,o,i){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.useSelectorThemes=void 0,t.useSelectorThemes=function(e,t){var u,l,a;const s=(0,o.default)(),[c,d]=(0,r.useState)(0),f=(0,r.useRef)(null),g=(0,r.useRef)(null),m=(0,i.normalizeSelectors)(e),h=m.join("|"),{loadedThemes:p,selectorsToClientLoad:T}=(0,i.getSelectorThemeState)(m,s.getTheme.bind(s));if(p.length>0)g.current=p;(0,r.useEffect)((()=>{if(!T.length||f.current===h)return;let e=!1;const r=h;return f.current=r,Promise.all(T.map((e=>s.loadTheme({selector:e,isFallback:t})))).then((e=>{if(e.some((e=>null==e?void 0:e.error)))n.logger.warn(`ÐÑибка пÑи загÑÑзке Ñем: ${T.join(", ")}`)})).catch((e=>{n.logger.error(`Сбой загÑÑзки Ñем (${T.join(", ")}):`,e)})).finally((()=>{if(f.current===r)f.current=null;if(!e)d((e=>e+1))})),()=>{e=!0}}),[s,h,t]);const v=p.length>0?p:null!==(u=g.current)&&void 0!==u?u:[];return{themes:v,staticThemeName:null===(a=null===(l=v[0])||void 0===l?void 0:l.properties)||void 0===a?void 0:a.get("staticTheme")}},t}(0,{},t,d,v,P),V=function(e,t,r,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.useThemeWrapperSideEffects=void 0,t.useThemeWrapperSideEffects=function(e,t){(0,r.useThemeEffect)((()=>{if(e&&t)(0,n.getThemeController)().addToLoadedThemeSet(t)}),[e,t]),(0,r.useThemeEffect)((()=>{if(t)(0,n.getThemeController)().getVariables(t,n.ELEMENT_THEME_ATTR_LAYER.STATIC)}),[t])},t}(0,{},L,o),z=function(e,t,r,n,o){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.useUuidTheme=void 0,t.useUuidTheme=function(e){const t=(0,o.default)(),i=t.getThemeByUuid(e),[u,l]=(0,r.useState)();return(0,r.useEffect)((()=>{if(n.logger.warn("ÐÑполÑзÑеÑÑÑ Ð·Ð°Ð³ÑÑзка ÑÐµÐ¼Ñ Ð¿Ð¾ uuid! ThemeUUID!"),!i)t.loadTheme({uuid:e}).then((e=>{if(e&&!e.error)l(e)}))}),[e]),i||u},t}(0,{},t,d,v),Y=function(e,t,r,n,o,i){"use strict";function u(e){return null==e?void 0:e.toLowerCase()}function l(e){return`${e.color} ${Math.round(e.position*r.PERCENT)}%`}function a(e){const t=e.colorStops.map(l).join(", ");if((0,i.isGradientLinear)(e))return`linear-gradient(${e.angle}deg, ${t})`;if((0,i.isGradientRadial)(e)){return`radial-gradient(circle at ${Math.round(e.position.left*r.PERCENT)}% ${Math.round(e.position.top*r.PERCENT)}%, ${t})`}return""}function s(e){var t;return(null===(t=e.layers)||void 0===t?void 0:t.length)?e.layers:void 0}function c(e){if(!(null==e?void 0:e.length))return[];const t=[],r=[],n=[],o=[];return e.forEach((e=>{if(!Array.isArray(e))if(!(0,i.isGradientLayer)(e))if(!(0,i.isColorLayer)(e))if(!e.isTexture)n.push(e);else t.push(e);else o.push(e);else r.push(e);else r.push(...function(e){const t=[],r=[];return e.forEach((e=>{if(!(0,i.isColorLayer)(e)&&!(0,i.isGradientLayer)(e)&&e.isTexture)t.push(e);else r.push(e)})),[...t,...r]}(e))})),[...t,...r,...n,...o]}function d(e,t,n,o,i,u){t.push(e),n.push(r.DEFAULT_LAYER_SIZE),o.push(r.DEFAULT_LAYER_REPEAT),i.push(r.DEFAULT_LAYER_POSITION),u.push(r.DEFAULT_LAYER_BLEND_MODE)}
142return Object.defineProperty(t,"__esModule",{value:!0}),t.getLayerPrimaryColor=t.getLayerDominantColor=t.getLayerBackgroundStyles=t.getBackgroundLayers=void 0,t.getBackgroundLayers=s,t.getLayerBackgroundStyles=function(e){const t=c(s(e)),l=[],f=[],g=[],m=[],h=[];return t.forEach((e=>{if((0,i.isColorLayer)(e))return void d((t=e,`linear-gradient(${t}, ${t})`),l,f,g,m,h);var t;if((0,i.isGradientLayer)(e))return void d(a(e),l,f,g,m,h);const n=e.image,s="string"==typeof n.original?n.original:(0,o.getResourceUrl)(n.original);l.push(`url(${s})`),f.push(function(e){const t=u(e);if("cover"===t||"contain"===t)return t;if("covermin"===t||"containmax"===t)return"cover";if("repeat"===t)return"auto";else return r.DEFAULT_LAYER_SIZE}(e.fitMode)),g.push("repeat"===u(e.fitMode)?"repeat":r.DEFAULT_LAYER_REPEAT),m.push(r.DEFAULT_LAYER_POSITION),h.push(function(e){var t;if(!e)return r.DEFAULT_LAYER_BLEND_MODE;else return null!==(t=r.LAYER_BLEND_MODE_MAP[e.toLowerCase()])&&void 0!==t?t:r.DEFAULT_LAYER_BLEND_MODE}(e.blendMode))})),{backgroundImage:l.length?l.join(", "):void 0,backgroundSize:f.length?f.join(", "):void 0,backgroundRepeat:g.length?g.join(", "):void 0,backgroundPosition:m.length?m.join(", "):void 0,backgroundBlendMode:h.length?h.join(", "):void 0,filter:(0,n.getEffectsFilter)(e.effects)}},t.getLayerDominantColor=function(e){var t;if(e.dominantColorRGB)return e.dominantColorRGB;const r=s(e);if(null==r?void 0:r.length)for(const n of c(r)){if((0,i.isColorLayer)(n))return e.dominantColorRGB||n;if((0,i.isGradientLayer)(n))return null===(t=n.colorStops[0])||void 0===t?void 0:t.color;if(n.image.dominantColor)return n.image.dominantColor}},t.getLayerPrimaryColor=function(e){const t=s(e);if(!(null==t?void 0:t.length))return;const r=c(t)[0];if((0,i.isColorLayer)(r))return r;if((0,i.isGradientLayer)(r))return a(r);else return},t}(0,{},S,B,N,k),X=function(e,t,r,n){"use strict";function o(e){if(void 0===e||0===e||null===e)return 0;if(e>0)return e;else return r.NEGATIVE_TEMPERATURE_HUE_OFFSET+Math.abs(e)}return Object.defineProperty(t,"__esModule",{value:!0}),t.getLegacyBackgroundStyles=t.getLegacyTemperature=void 0,t.getLegacyTemperature=o,t.getLegacyBackgroundStyles=function(e){var t,i,u,l,a,s;const c={},d=!!(s=e.backgroundColor)&&(-1!==s.indexOf("linear")||-1!==s.indexOf("radial"));if(e.backgroundColor)if(d)c.backgroundImage=e.backgroundColor;else c.backgroundColor=e.backgroundColor;if(e.texture)c.backgroundImage=`url(${e.texture})`+(d?","+e.backgroundColor:""),c.backgroundRepeat="repeat",c.backgroundPosition="center";if(e.image){const s=(0,n.getResourceUrl)(e.image.resource),f=(null===(t=e.image.style)||void 0===t?void 0:t.type)&&"original"!==e.image.style.type&&e.image.style.value||d&&e.backgroundColor;if(c.backgroundImage=(f?f+", ":"")+`url(${s})`,c.backgroundPosition="top center","repeat"===e.image.position)c.backgroundSize="contain",c.backgroundRepeat="repeat";else c.backgroundSize=e.image.position||"cover",c.backgroundRepeat="no-repeat";c.filter=`opacity(${null!==(i=e.image.opacity)&&void 0!==i?i:r.PERCENT}%) blur(${null!==(u=e.image.blur)&&void 0!==u?u:0}px) hue-rotate(${o(e.image.temperature)}deg) contrast(${null!==(l=e.image.contrast)&&void 0!==l?l:r.PERCENT}%) saturate(${null!==(a=e.image.saturate)&&void 0!==a?a:r.PERCENT}%)`}return c},t}(0,{},S,N),Z=function(e,t,r,n,o,i,u){"use strict";function l(e,t,r){const n=function(e,t){if(!t)return e;if(!e)return t;const r=Array.isArray(e)?e:[e],n=Array.isArray(t)?t:[t];return[...r,...n]}(e,r);return{activeTheme:n,staticThemeName:(0,i.getStaticThemeFromActiveTheme)(n)||t}}return Object.defineProperty(t,"__esModule",{value:!0}),t.useThemeWrapperState=void 0,t.useThemeWrapperState=function(e,t,i){const a=`ThemeWrapper_${null!=e?e:""}`;return(0,n.useReceivedData)(a,(()=>{if(t&&!(0,u.isOnlyFontTheme)(t))return{activeTheme:t,staticThemeName:i};if(!e)return t?{activeTheme:t,staticThemeName:i}:{};const n=(0,o.getThemeController)().getActiveTheme({isFallback:!0,selector:e});if((0,r.isPromise)(n))return n.then((r=>l(r,e,t)));else return l(n,e,t)}))},t}(0,{},i,i,o,H,W),q=function(e,t,r,n,o,i,u,l){"use strict";
142return Object.defineProperty(t,"__esModule",{value:!0}),t.useThemeWrapperData=void 0,t.useThemeWrapperData=function(e,t,a){const{activeTheme:s,staticTheme:c,className:d,children:f,theme:g,_$isKiosk:m,...h}=e,p=!e.noBackground88221033455786?g:void 0,T=a,v=(0,i.getStaticThemeBaseName)(c,p,T),b=(0,u.useThemeWrapperState)(v,s,c),_=(0,o.getFinalActiveTheme)(s,null==b?void 0:b.activeTheme,a),y=(0,o.hasActiveTheme)(_),E=(0,i.getFinalStaticThemeName)(_,y,null==b?void 0:b.staticThemeName,c,p,T);(0,l.useThemeWrapperSideEffects)(y,E);const S=(0,r.cloneElement)(f,(0,n.getChildrenProps)(f,d,h,t));return{preparedData:{activeTheme:_,staticThemeName:E,isUpperScope:a,_$isKiosk:m,noBackground88221033455786:e.noBackground88221033455786,calcOnlyClassess:!s,legacyTheme:p},children:S}},t}(0,{},t,R,W,H,Z,V),J=function(e,t,r,n){"use strict";function o(e){return!!(0,n.getBackgroundLayers)(e)}function i(e){if(o(e))return(0,n.getLayerBackgroundStyles)(e);else return(0,r.getLegacyBackgroundStyles)(e)}return Object.defineProperty(t,"__esModule",{value:!0}),t.getBackgroundLayers=t.getBackgroundCssValue=t.getLegacyTexture=t.getLegacyImage=t.getBackgroundPrimaryColor=t.getBackgroundDominantColor=t.getBackgroundStyles=void 0,Object.defineProperty(t,"getBackgroundLayers",{enumerable:!0,get:function(){return n.getBackgroundLayers}}),t.getBackgroundStyles=i,t.getBackgroundDominantColor=function(e){var t;if(o(e))return(0,n.getLayerDominantColor)(e);if(e.dominantColorRGB)return e.dominantColorRGB;if(e.backgroundColor)return e.backgroundColor;else return null===(t=e.image)||void 0===t?void 0:t.dominantColor},t.getBackgroundPrimaryColor=function(e){if(o(e))return(0,n.getLayerPrimaryColor)(e);if(e.backgroundColor)return e.backgroundColor;else return},t.getLegacyImage=function(e){return e.image},t.getLegacyTexture=function(e){return e.texture},t.getBackgroundCssValue=function(e){const t=i(e);return t.backgroundImage||t.backgroundColor},t}(0,{},X,Y),Q=function(e,t,r,n){"use strict";function o(e,t){if(!(null==e?void 0:e.length))return"";const r=/^(https?:\/\/[^\/]+\/)/;if(/^(https?:\/\/[^\/]+)?\/previewer\//.test(e)||/^(https?:\/\/[^\/]+)?\/cdn\//.test(e))return e;if(!e.match(r))return t?"/previewer/r/100/100/"+e:"/previewer"+e;else return e.replace(r,t?"$1previewer/r/100/100/":"$1previewer/")}Object.defineProperty(t,"__esModule",{value:!0}),t.calculateVaribalesFromThemeProperties=t.getFirstColor=void 0;const i=/(#\w+)|((rgb|rgba|hsl|hsla|var)\([^)]+\))/;return t.getFirstColor=function(e){var t;return null===(t=e.match(i))||void 0===t?void 0:t[0]},t.calculateVaribalesFromThemeProperties=function(e){const t=(0,n.getActualBackground)(e),i=(u=t,Array.isArray(u.layers)&&u.layers.length>0)?function(e){const{backgroundColor:t,dominantColorRGB:n}={...e},o={},i=(0,r.getBackgroundStyles)(e),u=i.backgroundColor||(0,r.getBackgroundDominantColor)(e)||t||(n?n:void 0);if(u)o["--brandbook_background-color"]=function(e){const t=e.trim();if(t.startsWith("#")||t.includes("("))return t;if(/^\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}$/.test(t))return`rgb(${t})`;return t}(u);if(i.backgroundImage)o["--brandbook_background-image"]=i.backgroundImage;return o}(t):function(e){var t;const{backgroundColor:r,url_full:n,texture:o,dominantColorRGB:i}={...e},u={},l=r||(i?`rgb(${i})`:void 0);if(l)u["--brandbook_background-color"]=l;const a=o&&(null===(t=null==n?void 0:n.texture)||void 0===t?void 0:t.includes(o))?n.texture:o,s=!!r&&(-1!==r.indexOf("linear")||-1!==r.indexOf("radial")),c=a?`url("${a}")`:"",d=s?r:"",f=c.length&&d.length?", ":"",g=`${c}${f}${d}`;if(g)u["--brandbook_background-image"]=g;return u}(t);var u;return function(e,t){var r,n;const{url_full:i,logo:u,picture:l}={...t},a=(null==l?void 0:l.url)&&(null===(r=null==i?void 0:i.picture)||void 0===r?void 0:r.includes(null==l?void 0:l.url))?i.picture:null==l?void 0:l.url,s=(null==u?void 0:u.url)&&(null===(n=null==i?void 0:i.logo)||void 0===n?void 0:n.includes(null==u?void 0:u.url))?i.logo:null==u?void 0:u.url;if(a)e["--brandbook_picture-url"]=`url("${o(a)}");`;if(s)e["--brandbook_logo-url"]=`url("${o(s,!0)}");`}(i,t),Object.keys(i).length>0?i:void 0},t}(0,{},J,C),ee=function(e,t,r,n,o,i,u,l,a,s,c,d,f,g,m,h,p){"use strict";function T(e){var t,r,n;return e.left=null!==(t=e.left)&&void 0!==t?t:0,e.top=null!==(r=e.top)&&void 0!==r?r:0,e.zIndex=null!==(n=e.zIndex)&&void 0!==n?n:-1,e}
142Object.defineProperty(t,"__esModule",{value:!0}),t.DARK_CLASS=t.LIGHT_CLASS=void 0;const v="tw-h-full",b="tw-relative";t.LIGHT_CLASS="t-light",t.DARK_CLASS="t-dark";const _="controls_themes__wrapper";t.default=(0,n.forwardRef)((function(e,E){var S,C,k,A,L;const R=(0,n.useMemo)((()=>(0,p.getActualBackground)(e.background)),[e.background]),O=(0,s.getBackgroundDominantColor)(R),P=(0,s.getLegacyTexture)(R),I=(0,s.getLegacyImage)(R),M=(0,s.getBackgroundPrimaryColor)(R),j=null!==(S=e.isUpperScope)&&void 0!==S?S:!1,B=(0,n.useContext)(g.BackgroundContext),N=(0,o.getStore)("uiThemeBackgroundViewer"),U=R.isLightTheme,D=null===(C=e.additionalParams)||void 0===C?void 0:C.backgroundAsSimpleColor,x=null===(k=e.additionalParams)||void 0===k?void 0:k.multiColorSchemeSupport;if(j)N.set("background",R);const F=(0,n.useMemo)((()=>{var e,t;let r=0;if("blackout"===(null===(e=null==I?void 0:I.style)||void 0===e?void 0:e.type)||"brightening"===(null===(t=null==I?void 0:I.style)||void 0===t?void 0:t.type))r=(0,m.getOpacity)(I.style.value);return r}),[I]),$=j?null:B||N.get("background"),[G,w]=(0,n.useMemo)((()=>{const[e,t]=(0,m.default)(M,O,I,B,x);return[void 0!==U?U:e,t]}),[M,B,O,I,x,U]),W=(0,n.useMemo)((()=>!!$&&function(e,t){for(const r of y)if(e[r]!==t[r])return!1;return!0}($,R)),[$,R]);let H=(0,n.useMemo)((()=>{const t={...e.style};if(W)return t;if(D){if((0,m.isGradient)(M))t.background=M;else t.backgroundColor=M;return T(t)}return Object.assign(t,(0,s.getBackgroundStyles)(R)),T(t)}),[R,P,I,e.style,W,D,M]);H=(0,u.useThemeStyleBackground)(H,j);const K=(0,c.useThemeBeforeStyleBackground)(H,j,e.additionalParams),V=null!==(A=e.schemeStyleLight)&&void 0!==A?A:t.LIGHT_CLASS,z=null!==(L=e.schemeStyleDark)&&void 0!==L?L:t.DARK_CLASS,Y=(0,m.getDominantColor)(G,O||M||(null==I?void 0:I.dominantColor),w,B),X=(0,n.useMemo)((()=>{var e,t;if(!Y)return"";if((0,m.isGradient)(Y)){const t=(0,a.getFirstColor)(Y);if(!t)return V;else return(0,m.isLightColor)(t,null===(e=null==I?void 0:I.style)||void 0===e?void 0:e.type,F,!!B)?V:z}return(0,m.isLightColor)(Y,null===(t=null==I?void 0:I.style)||void 0===t?void 0:t.type,F,!!B)?V:z}),[Y,V,z,I]),Z=(0,n.useMemo)((()=>{var t;const r=e.className?[e.className]:[];if(e.themeStyleSelector)r.push(e.themeStyleSelector);if(X.length>0)if(r.push(X),!(null===(t=e.className)||void 0===t?void 0:t.includes(_)))r.push(_);return r}),[e.className,e.themeStyleSelector,X]),q=(0,l.useThemeClassName)(Z,j),J=(0,n.useMemo)((()=>({...R,isLightTheme:G})),[R,G]),Q=(0,n.useMemo)((()=>{if(!R)return null;const e=(0,a.calculateVaribalesFromThemeProperties)(R);if(!e)return null;const t=`.${K}`,n={[t]:e};return(0,r.jsx)(h.default,{styles:n})}),[R,K]),ee=t=>{if(e.hasCreatedStyle)return t;else return(0,r.jsxs)(r.Fragment,{children:[Q,t]})},te=!M&&!O?e.children:(0,r.jsx)(g.BackgroundContext.Provider,{value:J,children:e.children});if(e.forEmail)return ee((0,r.jsx)(f.default,{children:e.children,className:q.join(" "),backgroundContextValue:J,onClick:e.onClick,backgroundStyles:H,withoutContext:!M}));if(e.noBackground88221033455786)return ee((0,r.jsx)("div",{ref:E,className:q.join(" "),onClick:e.onClick,children:te}));if(e.useChildrenContainer&&(0,i.isReactElement)(e.children))return ee((0,r.jsx)(d.default,{children:e.children,classList:q,backgroundContextValue:J,onClick:e.onClick,backgroundStyles:H,backgroundStylesClassName:K,withoutContext:!M&&!O}));let re=q.join(" ");if(!re.includes(b))re+=" "+b;if(!re.includes(v))re+=" "+v;if(K)re+=" "+K,H={};return ee((0,r.jsx)("div",{ref:E,className:re,onClick:e.onClick,style:{zIndex:0},children:te}))}));const y=["backgroundColor","dominantColorRGB","image","texture","layers","effects"];return t}(0,{},e,t,d,r,w,F,Q,J,D,M,j,_,y,h,C),te=ee,re=function(e,t,r,n,o,i,u,l){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;const a=(0,n.useMemo)((()=>{let t={};if(e.properties){t=(0,l.factory)(e.properties).toObject();
142if(!!!t.themeBackground&&t.background&&!t.backgroundColor)t.backgroundColor=t.background}return t}),[e.properties]),s=null!==(t=e.classList)&&void 0!==t?t:[],c=(0,n.useMemo)((()=>{if(s.length)return"."+s.join(".")}),[s]),d=(0,n.useMemo)((()=>{if(!c)return null;const e=(0,u.calculateVaribalesFromThemeProperties)(a);if(!e)return null;const t={[c]:e};return(0,r.jsx)(i.default,{styles:t})}),[a,c]),f=(null==a?void 0:a.staticTheme)||"default";return s.push(`controls_theme-${f}`),(0,r.jsxs)(r.Fragment,{children:[d,(0,r.jsx)(o.default,{background:a,additionalParams:e.additionalParams,themeStyleSelector:!e.isUpperScope?s.join(" "):void 0,isUpperScope:e.isUpperScope,noBackground88221033455786:e.noBackground88221033455786,hasCreatedStyle:!0,children:e.children})]})},t}(0,{},e,t,ee,h,Q,a),ne=re,oe=function(e,t,r,n,o,i,u,l,a,s){"use strict";function c(e){var c,f,g,m,h;const p=(0,n.useContext)(t.ThemeContext),T=(0,l.default)(),v=(0,n.useMemo)((()=>{var t,r;return(0,s.ensureFontThemeFallback)(e.activeTheme,null!==(t=e.isUpperScope)&&void 0!==t?t:!1,null!==(r=e.isWindowTheme)&&void 0!==r?r:!1,e.staticThemeName,e._$isKiosk)}),[e.activeTheme,e.isUpperScope,e.isWindowTheme,e.staticThemeName,e._$isKiosk]),[b,_]=(0,u.useScopeTheme)(v),y=!e.calcOnlyClassess?b:void 0;T.saveActiveThemes(e.activeTheme);const E=p===d,S=(0,n.useMemo)((()=>{if(!y)return E?d:p;else return{properties:null==y?void 0:y.properties,theme:null==y?void 0:y.selector,cacheId:null==y?void 0:y.version}}),[y]);if(e.staticThemeName&&!_.includes("controls_theme-"+e.staticThemeName))_.unshift("controls_theme-"+e.staticThemeName);const C=(0,i.useThemeClassName)(_,e.isWindowTheme?!1:null!==(c=e.isUpperScope)&&void 0!==c?c:!1);let k=!1;if(y)k=(null===(f=y.properties)||void 0===f?void 0:f.has("background"))||(null===(g=y.properties)||void 0===g?void 0:g.has("themeBackgroun
142d"))||!!(null===(m=y.properties)||void 0===m?void 0:m.get("image"))||!1;const A=(0,n.useMemo)((()=>{if(!y)return{};else return{...null==y?void 0:y.additionalParams}}),[y]);if(y&&k&&!e.noBackground1193214061)return(0,r.jsx)(t.ThemeContext.Provider,{value:S,children:(0,r.jsx)(o.default,{properties:y.properties,additionalParams:A,classList:_,isUpperScope:null!==(h=e.isUpperScope)&&void 0!==h?h:!1,noBackground88221033455786:e.noBackground88221033455786,children:e.children})});let L=(0,a.isReactElement)(e.children)?[e.children.props.className]:[];if(C.length>0)L=L.concat(C);if(C.length>0&&!(null==L?void 0:L.includes("controls_themes__wrapper")))L.push("controls_themes__wrapper");const R=(0,a.isReactElement)(e.children)?(0,n.cloneElement)(e.children,{className:L.join(" ")}):e.children;return(0,r.jsx)(t.ThemeContext.Provider,{value:S,children:R})}Object.defineProperty(t,"__esModule",{value:!0}),t.ThemeScope=t.useIsUpperScope=t.ThemeContext=void 0;const d={};return t.ThemeContext=(0,n.createContext)(d),t.useIsUpperScope=function(){return(0,n.useContext)(t.ThemeContext)===d},t.ThemeScope=c,c.displayName="UI/Theme:Context.Scope",t.default=function(){return c},t}(0,{},e,t,re,F,U,v,r,A),ie=oe,ue=function(e,t,r,n,o){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.useActiveTheme=void 0,t.useActiveTheme=function(){const e=(0,r.useContext)(n.ThemeContext).theme;return e?(0,o.default)().getTheme(e):void 0},t}(0,{},t,oe,v),le=ue,ae=function(e,t,r,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.useStaticTheme=void 0,t.useStaticTheme=function(){var e;const t=(0,r.useContext)(n.ThemeContext);return null===(e=null==t?void 0:t.properties)||void 0===e?void 0:e.get("staticTheme")},t}(0,{},t,oe),se=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=(0,n.default)(),i=(0,r.memo)(o);return t.default=i,t}(0,{},t,oe),ce=function(e,t,r,n,o,i,u,l,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const c="ui_theme-background",d=(0,n.forwardRef)((function(e,t){const d=e.background,f=(0,l.getBackgroundPrimaryColor)(e.background),g=(0,l.getLegacyTexture)(e.background),m=(0,l.getBackgroundDominantColor)(e.background),h=(0,l.getLegacyImage)(e.background),p=(0,n.useMemo)((()=>{var t,r,n,o,i,l;return{background:(0,u.calculateVaribalesFromThemeProperties)({logo:void 0,picture:void 0,texture:g,backgroundColor:f,image:h,dominantColorRGB:m,url_full:{logo:null===(t=null==e?void 0:e.properties)||void 0===t?void 0:t.logo,picture:null===(r=null==e?void 0:e.properties)||void 0===r?void 0:r.picture,texture:g}}),light:null!==(o=null===(n=e.colorSchemes)||void 0===n?void 0:n.light)&&void 0!==o?o:void 0,dark:null!==(l=null===(i=e.colorSchemes)||void 0===i?void 0:i.dark)&&void 0!==l?l:void 0}}),[e.colorSchemes,null==e?void 0:e.properties,null==e?void 0:e.background]),T=(0,n.useMemo)((()=>{var t;return null!==(t=e.selector)&&void 0!==t?t:(0,i.default)(p)}),[p,e.selector]),v=(0,s.useStaticTheme)()||"default",{stylesObject:b,guidLight:_,guidDark:y}=(0,n.useMemo)((()=>function(e,t,r,n){const i=r?"":o.LIGHT_CLASS,u=r?"":o.DARK_CLASS,l={["."+t]:e.background,[`.${t}.${o.LIGHT_CLASS}.${c}, .${t}.${c} .${o.LIGHT_CLASS}`]:e.light,[`.${t}.${o.DARK_CLASS}.${c}, .${t}.${c} .${o.DARK_CLASS}`]:e.dark,...n};if(e.background||e.light||e.dark)l[`.${t}.${c}`]={...e.background,isolation:"isolate"};return{stylesObject:l,guidLight:i,guidDark:u}}(p,T,e.skipColorSheme,e.font)),[p,T,e.skipColorSheme,e.font]);if(!e.children)return null;const E=[];if(p.background||p.light||p.dark)E.push(`controls_theme-${v}`),E.push(T),E.push(c);const S=Object.keys(b).length>0?(0,r.jsx)(a.default,{styles:b}):null;return(0,r.jsxs)(r.Fragment,{children:[S,(0,r.jsx)(o.default,{className:e.className,background:d,themeStyleSelector:E.length>0?E.join(" "):void 0,style:e.style,schemeStyleLight:_,schemeStyleDark:y,useChildrenContainer:e.useChildrenContainer,noBackground88221033455786:e.noBackground88221033455786,ref:t,hasCreatedStyle:!0,additionalParams:e.additionalParams,children:e.children})]})}));
142return d.displayName="UI/Theme:Background",t.default=d,t}(0,{},e,t,ee,T,Q,J,h,ae),de=ce,fe=function(e,t,r,n,o,i){"use strict";function u({selector:e,isFallbackSelector:t,children:u,isUpperScope:l,_$isKiosk:a,noBackground88221033455786:s}){const{themes:c,staticThemeName:d}=(0,i.useSelectorThemes)(e,t);if(0===c.length)n.logger.warn(`Ðе ÑдалоÑÑ Ð¿Ð¾Ð»ÑÑиÑÑ Ð°ÐºÑивнÑÑ ÑÐµÐ¼Ñ Ð¿Ð¾ ÑелекÑоÑÑ. СкоÑее вÑего бÑл пеÑедан непÑавилÑнÑй ÑелекÑоÑ. ТекÑÑий ÑелекÑÐ¾Ñ ${e}`);return(0,r.jsx)(o.default,{activeTheme:c,staticThemeName:d,isUpperScope:l,_$isKiosk:a,noBackground88221033455786:s,children:u})}return Object.defineProperty(t,"__esModule",{value:!0}),t.default=u,u.displayName="UI/Theme:ThemeWrapperSelector",t}(0,{},e,d,se,K),ge=function(e,t,r,n,o){"use strict";function i({uuid:e,children:t,isUpperScope:i,_$isKiosk:u,noBackground88221033455786:l}){const a=(0,o.useUuidTheme)(e);return(0,r.jsx)(n.default,{activeTheme:a,isUpperScope:i,_$isKiosk:u,noBackground88221033455786:l,children:t})}return Object.defineProperty(t,"__esModule",{value:!0}),t.default=i,i.displayName="UI/Theme:ThemeWrapperUuid",t}(0,{},e,se,z),me=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=(0,r.forwardRef)((function({getContextValue:e,children:t,content:o,...i},u){const l=(0,n.useActiveTheme)();if((0,r.useEffect)((()=>{if(e)e(l)}),[l]),(0,r.useEffect)((()=>()=>{if(e)e(void 0)}),[]),!t)return null;const a=u?{forwardedRef:u}:{};return(0,r.cloneElement)(t,{activeTheme:l,...i,...a})}));return o.displayName="UI/Theme:ThemeConsumer",t.default=o,t}(0,{},t,ue),he=me,pe=function(e,t,r,n,o,i,u,l,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderThemeWrapperScope=void 0;const c=[{isMatched:({activeTheme:e})=>(0,s.isUuid)(e),render:function({activeTheme:e,isUpperScope:t,_$isKiosk:n,noBackground88221033455786:o},u){return(0,r.jsx)(i.default,{uuid:e,isUpperScope:t,_$isKiosk:n,noBackground88221033455786:o,children:u})}},{isMatched:({activeTheme:e,legacyTheme:t})=>!!t||(0,a.isSelectorString)(e)||(0,a.isFallbackSelectorTheme)(e),render:function({activeTheme:e,isUpperScope:t,_$isKiosk:n,noBackground88221033455786:o,legacyTheme:i},s){return(0,r.jsx)(u.default,{selector:(0,a.getFallbackSelector)(e,i,l.ERROR_FALLBACK_SELECTOR),isFallbackSelector:!0,isUpperScope:t,_$isKiosk:n,noBackground88221033455786:o,children:s})}},{isMatched:()=>!0,render:function({activeTheme:e,staticThemeName:t,isUpperScope:n,_$isKiosk:i,noBackground88221033455786:u,calcOnlyClassess:l},a){return(0,r.jsx)(o.default,{staticThemeName:t,activeTheme:e,isUpperScope:n,_$isKiosk:i,noBackground88221033455786:u,calcOnlyClassess:l,children:a})}}];return t.renderThemeWrapperScope=function(e,t){const o=c.find((t=>t.isMatched(e)));return function(e,t){return(0,r.jsx)(n.WasabyContextManager,{theme:e,children:t})}(e.staticThemeName,o.render(e,t))},t}(0,{},e,u,se,ge,fe,O,W,I),Te=function(e,t,r,n,o,i){"use strict";function u(e,t){const r=(0,n.useIsUpperScope)(),{preparedData:u,children:l}=(0,o.useThemeWrapperData)(e,t,r);return(0,i.renderThemeWrapperScope)(u,l)}return Object.defineProperty(t,"__esModule",{value:!0}),u.displayName="UI/Theme:BodyThemeWrapper",t.default=(0,r.memo)((0,r.forwardRef)(u)),t}(0,{},t,oe,q,pe),ve=Te,be=function(e,t,r,n,o,i,u,l){"use strict";function a(e,t){const{preparedData:r,children:n}=(0,o.useThemeWrapperData)(e,t,!1);return(0,i.renderThemeWrapperScope)(r,n)}return Object.defineProperty(t,"__esModule",{value:!0}),t.getStaticThemeFromProperties=t.emptyCallback=t.ERROR_FALLBACK_SELECTOR=void 0,Object.defineProperty(t,"getStaticThemeFromProperties",{enumerable:!0,get:function(){return n.getStaticThemeFromProperties}}),Object.defineProperty(t,"ERROR_FALLBACK_SELECTOR",{enumerable:!0,get:function(){return u.ERROR_FALLBACK_SELECTOR}}),Object.defineProperty(t,"emptyCallback",{enumerable:!0,get:function(){return l.emptyCallback}}),a.displayName="UI/Theme:ThemeWrapper",t.default=(0,r.memo)((0,r.forwardRef)(a)),t}(0,{},t,H,q,pe,O,R),_e=be,ye=function(e,t,r,n,o,i,u,l){"use strict";function a({children:e,theme:t}
142,a){const[s,c]=(0,n.useState)(t);return(0,n.useLayoutEffect)((()=>{if(!t)return;const e=e=>{if(!e)return;const t=(0,o.getStaticThemeFromProperties)(e);if(t)(0,u.getThemeController)().getVariables(t),c(t)},r=(0,u.getThemeController)().getActiveTheme({selector:t});if((0,l.isPromise)(r))r.then((t=>{e(t)}));else e(r)}),[t]),(0,r.jsx)(i.WasabyContextManager,{theme:s,children:(0,n.cloneElement)(e,{ref:a})})}return Object.defineProperty(t,"__esModule",{value:!0}),a.displayName="UI/Theme:LegacyWrapper",t.default=(0,n.forwardRef)(a),t}(0,{},e,t,be,u,n,i),Ee=ye,Se=function(e,t,r,n,o,i,u,l){"use strict";function a(e,t){const{staticTheme:o,children:a,...s}=e,f={onWheel:u.emptyCallback,...s},g={...d};if(g.properties=l.Model.fromObject({staticTheme:e.staticTheme}),t)f.forwardedRef=t;const m=(0,n.cloneElement)(a,f);return(0,r.jsx)(i.WasabyContextManager,{theme:e.staticTheme,children:(0,r.jsx)(c,{staticThemeName:e.staticTheme,activeTheme:g,isUpperScope:!0,isWindowTheme:!0,noBackground88221033455786:e.noBackground88221033455786,children:m})})}Object.defineProperty(t,"__esModule",{value:!0});const s=(0,o.default)(),c=(0,n.memo)(s),d={selector:"null-theme",themeApply:"PALETTE",uuid:"null-theme",version:-1};return a.displayName="UI/Theme:WindowWrapper",t.default=(0,n.memo)((0,n.forwardRef)(a)),t}(0,{},e,t,oe,u,be,l),Ce=Se,ke=function(e,t,r,n,o,i,u,l,a,s,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const f=(0,a.default)(),g=(0,n.forwardRef)((function(e,t){const a=(0,l.default)(),g=(0,n.useMemo)((()=>{const t={logo:null==e?void 0:e.properties.logo,picture:null==e?void 0:e.properties.picture,background:null==e?void 0:e.background.backgroundColor,image:null==e?void 0:e.background.image,backgroundColor:null==e?void 0:e.background.backgroundColor,dominantColorRGB:null==e?void 0:e.background.dominantColorRGB,texture:null==e?void 0:e.background.texture},r={...t,...e.colorSchemes,skipColorSheme:void 0===e.colorSchemes},n={properties:o.Model.fromObject(t),themeApply:s.THEME_APPLICATIONS.palette},i=!e.selector||e.selector.startsWith(c.GENERATED_THEME)?(0,u.default)(r,c.GENERATED_THEME):e.selector;return n.selector=i,n.version=Math.random(),a.saveTheme(n),n}),[null==e?void 0:e.properties,null==e?void 0:e.background]),m=(0,n.useMemo)((()=>(0,r.jsx)(f,{activeTheme:g,noBackground1193214061:!0,children:(0,r.jsx)(i.default,{...e,selector:g.selector,ref:t,children:e.children})})),[e,g,t,e.children]);if(!e.children)return null;if(e.staticTheme)return(0,r.jsx)(d.default,{theme:e.staticTheme,children:m});else return m}));return g.displayName="UI/Theme:ThemeDesigner",t.default=g,t}(0,{},e,t,l,ce,T,v,oe,m,U,ye),Ae=ke,g.UUID_REGEXP=g.BACKGROUND_CLASS_PREFIX=g.useThemeScheme=g.useActiveTheme=g.WindowWrapper=g.BodyThemeWrapper=g.ERROR_FALLBACK_SELECTOR=g.ThemeWrapper=g.LegacyWrapper=g.getThemeStorage=g.ThemeDesigner=g.ThemeConsumer=g.ThemeContext=g.Background=g.isLight=g.isLightTheme=g.DARK_CLASS=g.LIGHT_CLASS=g.BackgroundViewer=g.ThemeBackgroun
142d=void 0,Object.defineProperty(g,"ThemeBackground",{enumerable:!0,get:function(){return ne.default}}),Object.defineProperty(g,"BackgroundViewer",{enumerable:!0,get:function(){return te.default}}),Object.defineProperty(g,"LIGHT_CLASS",{enumerable:!0,get:function(){return te.LIGHT_CLASS}}),Object.defineProperty(g,"DARK_CLASS",{enumerable:!0,get:function(){return te.DARK_CLASS}}),Object.defineProperty(g,"isLightTheme",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(g,"isLight",{enumerable:!0,get:function(){return E.isLightColor}}),Object.defineProperty(g,"Background",{enumerable:!0,get:function(){return de.default}}),Object.defineProperty(g,"ThemeContext",{enumerable:!0,get:function(){return ie.ThemeContext}}),Object.defineProperty(g,"ThemeConsumer",{enumerable:!0,get:function(){return he.default}}),Object.defineProperty(g,"ThemeDesigner",{enumerable:!0,get:function(){return Ae.default}}),Object.defineProperty(g,"getThemeStorage",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(g,"LegacyWrapper",{enumerable:!0,get:function(){return Ee.default}}),Object.defineProperty(g,"ThemeWrapper",{enumerable:!0,get:function(){return _e.default}}),Object.defineProperty(g,"ERROR_FALLBACK_SELECTOR",{enumerable:!0,get:function(){return _e.ERROR_FALLBACK_SELECTOR}}),Object.defineProperty(g,"BodyThemeWrapper",{enumerable:!0,get:function(){return ve.default}}),Object.defineProperty(g,"WindowWrapper",{enumerable:!0,get:function(){return Ce.default}}),Object.defineProperty(g,"useActiveTheme",{enumerable:!0,get:function(){return le.useActiveTheme}}),Object.defineProperty(g,"useThemeScheme",{enumerable:!0,get:function(){return G.useThemeScheme}}),Object.defineProperty(g,"BACKGROUND_CLASS_PREFIX",{enumerable:!0,get:function(){return x.BACKGROUND_CLASS_PREFIX}}),Object.defineProperty(g,"UUID_REGEXP",{enumerable:!0,get:function(){return m.UUID_REGEXP}}),g})); 143define("UI/State",["react","Application/Env","require","exports","UICommon/State"],(function(e,t,r,i,n){var u,o,s,c;return Object.defineProperty(i,"__esModule",{value:!0}),u=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=void 0,t.isPromise=function(e){return!!e&&"function"==typeof e.then},t}(0,{}),o=u,s=function(e,t,r,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useReceivedData=void 0;class u{getState(){return this._state}setState(e){this._state=e}}return t.useReceivedData=function(e,t,o){const s=(0,r.useRef)(null);if(null===s.current){const t=new u;s.current=t;(0,i.getStateReceiver)().register(e,t)}const[c,a]=(0,r.useState)((()=>{var e,r,i;if("undefined"==typeof window){const i=t();if((0,n.isPromise)(i)){if(void 0!==o)null===(e=s.current)||void 0===e||e.setState(o);return o}return null===(r=s.current)||void 0===r||r.setState(i),i}let u;try{u=null===(i=s.current)||void 0===i?void 0:i.getState()}catch{u=void 0}if(void 0!==u)return u;else return o}));return(0,r.useEffect)((()=>{var e,r;let i,u=!1;try{i=null===(e=s.current)||void 0===e?void 0:e.getState()}catch{i=void 0}if(void 0!==i){if(i!==c)a(i);return}const o=t();if((0,n.isPromise)(o))return o.then((e=>{var t;if(!u)null===(t=s.current)||void 0===t||t.setState(e),a(e)})).catch((()=>{})),()=>{u=!0};else if(!u){const e=o;null===(r=s.current)||void 0===r||r.setState(e),a(e)}}),[e,t]),c},t}(0,{},e,t,u),c=s,i.isPromise=i.useReceivedData=i.Serializer=void 0,Object.defineProperty(i,"Serializer",{enumerable:!0,get:function(){return n.Serializer}}),Object.defineProperty(i,"useReceivedData",{enumerable:!0,get:function(){return c.useReceivedData}}),Object.defineProperty(i,"isPromise",{enumerable:!0,get:function(){return o.isPromise}}),i})); 144define("UI/theme/controller",["require","exports","UICommon/ThemeInitializer","UICommon/theme/controller"],(function(e,r,E,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ELEMENT_THEME_ATTR_LAYER=r.ELEMENT_THEME_ATTR=r.ONLINE_NAVIGATION_CONVERTER=r.THEME_APPLICATIONS=r.isErrorTheme=r.DEFAULT_THEME=r.EMPTY_THEME=r.THEME_TYPE=r.LinkResolver=r.getThemeController=void 0,Object.defineProperty(r,"getThemeController",{enumerable:!0,get:function(){return E.getThemeController}}),Object.defineProperty(r,"LinkResolver",{enumerable:!0,get:function(){return t.LinkResolver}}),Object.defineProperty(r,"THEME_TYPE",{enumerable:!0,get:function(){return t.THEME_TYPE}}),Object.defineProperty(r,"EMPTY_THEME",{enumerable:!0,get:function(){return t.EMPTY_THEME}}),Object.defineProperty(r,"DEFAULT_THEME",{enumerable:!0,get:function(){return t.DEFAULT_THEME}}),Object.defineProperty(r,"isErrorTheme",{enumerable:!0,get:function(){return t.isErrorTheme}}),Object.defineProperty(r,"THEME_APPLICATIONS",{enumerable:!0,get:function(){return t.THEME_APPLICATIONS}}),Object.defineProperty(r,"ONLINE_NAVIGATION_CONVERTER",{enumerable:!0,get:function(){return t.ONLINE_NAVIGATION_CONVERTER}}),Object.defineProperty(r,"ELEMENT_THEME_ATTR",{enumerable:!0,get:function(){return t.ELEMENT_THEME_ATTR}}),Object.defineProperty(r,"ELEMENT_THEME_ATTR_LAYER",{enumerable:!0,get:function(){return t.ELEMENT_THEME_ATTR_LAYER}})})); 145define("UICommon/theme/controller",["WasabyLoader/ModulesLoader","UICommon/Utils","Types/function","Types/entity","I18n/i18n","Env/Env","Application/Page","Application/Env","require","exports","Types/collection"],(function(e,t,r,s,i,a,o,n,l,c){var u,d,h,E,T,m,f,_,g,p,R,b,M,L,v,A;return Object.defineProperty(c,"__esModule",{value:!0}),u=function(e,t,r,s){"use strict";
145Object.defineProperty(t,"__esModule",{value:!0});const i={"dark-large":"retail__dark-large","dark-lmedium":"retail__dark-lmedium","dark-medium":"retail__dark-medium","dark-xlarge":"retail__dark-xlarge","dark-xxlarge":"retail__dark-xxlarge","header-dark-large":"retail__header-dark-large","header-dark-lmedium":"retail__header-dark-lmedium","header-dark-medium":"retail__header-dark-medium","header-dark-xlarge":"retail__header-dark-xlarge","header-dark-xxlarge":"retail__header-dark-xxlarge","header-light-large":"retail__header-light-large","header-light-lmedium":"retail__header-light-lmedium","header-light-medium":"retail__header-light-medium","header-light-xlarge":"retail__header-light-xlarge","header-light-xxlarge":"retail__header-light-xxlarge","light-large":"retail__light-large","light-lmedium":"retail__light-lmedium","light-medium":"retail__light-medium","light-xlarge":"retail__light-xlarge","light-xxlarge":"retail__light-xxlarge"},a={Controls:{_all:!0}};return t.default=class{constructor(e,t,r,s,i){this.resourceRootTemplated=!1,this.buildNumber=t||"";let a="";if(s&&(!i||-1===i.indexOf(s)))a+="/"+s+"/";if(i)a+="/"+i+"/";if(this.resourceRoot=("/"+a).replace(/[\/]+/g,"/"),this.originResourceRoot=i,-1!==i.indexOf("%"))this.resourceRootTemplated=!0;this.initPaths()}initPathsServerSide(){const e={WS:"WS.Core",Lib:"WS.Core/lib",Ext:"WS.Core/lib/Ext",Deprecated:"WS.Deprecated",Helpers:"WS.Core/core/helpers",Transport:"WS.Core/transport",bootup:"WS.Core/res/js/bootup","bootup-min":"WS.Core/res/js/bootup-min","old-bootup":"WS.Core/res/js/old-bootup",tslib:"WS.Core/ext/tslib",Resources:"",Core:"WS.Core/core",css:"RequireJsLoader/plugins/css","native-css":"RequireJsLoader/plugins/native-css",normalize:"RequireJsLoader/plugins/normalize",html:"RequireJsLoader/plugins/html",tmpl:"RequireJsLoader/plugins/tmpl",wml:"RequireJsLoader/plugins/wml",text:"RequireJsLoader/plugins/text",is:"RequireJsLoader/plugins/is","is-api":"RequireJsLoader/plugins/is-api",i18n:"I18n/i18n",json:"RequireJsLoader/plugins/json",order:"RequireJsLoader/plugins/order",template:"RequireJsLoader/plugins/template",cdn:"RequireJsLoader/plugins/cdn",datasource:"RequireJsLoader/plugins/datasource",xml:"RequireJsLoader/plugins/xml",preload:"RequireJsLoader/plugins/preload",browser:"RequireJsLoader/plugins/browser",optional:"RequireJsLoader/plugins/optional",remote:"RequireJsLoader/plugins/remote",router:"router",jquery:"/cdn/JQuery/jquery/3.3.1/jquery-min",react:"React/third-party/react/react.production.min","react-dom":"React/third-party/react-dom/react-dom.production.min","react-dom/server":"React/third-party/react-dom/server/react-dom-server.browser.production.min","react/jsx-runtime":"React/third-party/react/jsx-runtime/react-jsx-runtime.production.min","react/jsx-dev-runtime":"React/third-party/jsx-dev-runtime/react-jsx-dev-runtime.production.min"};this.paths=e}getConstantsModulesInfo(){if(s.constants.modules)return s.constants.modules;else return{}}hasServicePath(e){const t=this.getConstantsModulesInfo();if(t&&t[e]&&t[e].path)return!0;else return!1}getIModuleServicePath(e){return this.getConstantsModulesInfo()[e].path.split(e)[0]}initPaths(){this.paths={WS:"WS.Core",Lib:"WS.Core/lib",Ext:"WS.Core/lib/Ext",Deprecated:"WS.Deprecated",Helpers:"WS.Core/core/helpers",Transport:"WS.Core/transport",bootup:"WS.Core/res/js/bootup","bootup-min":"WS.Core/res/js/bootup-min","old-bootup":"WS.Core/res/js/old-bootup",tslib:"WS.Core/ext/tslib",Resources:"",Core:"WS.Core/core",css:"RequireJsLoader/plugins/css","native-css":"RequireJsLoader/plugins/native-css",normalize:"RequireJsLoader/plugins/normalize",html:"RequireJsLoader/plugins/html",tmpl:"RequireJsLoader/plugins/tmpl",wml:"RequireJsLoader/plugins/wml",text:"RequireJsLoader/plugins/text",is:"RequireJsLoader/plugins/is","is-api":"RequireJsLoader/plugins/is-api",i18n:"I18n/i18n",json:"RequireJsLoader/plugins/json",order:"RequireJsLoader/plugins/order",template:"RequireJsLoader/plugins/template",cdn:"RequireJsLoader/plugins/cdn",datasource:"RequireJsLoader/plugins/datasource",xml:"RequireJsLoader/plugins/xml",preload:"RequireJsLoader/plugins/preload",browser:"RequireJsLoader/plugins/browser",optional:"RequireJsLoader/plugins/optional",remote:"RequireJsLoader/plugins/remote",router:"router",jquery:"/cdn/JQuery/jquery/3.3.1/jquery-min",react:"React/third-party/react/react.production.min","react-dom":"React/third-party/react-dom/react-dom.production.min","react-dom/server":"React/third-party/react-dom/server/react-dom-server.browser.production.min","react/jsx-runtime":"React/third-party/react/jsx-runtime/react-jsx-runtime.production.min","react/jsx-dev-runtime":"React/third-party/jsx-dev-runtime/react-jsx-dev-runtime.production.min"}}_getLinkResourceRoot(e,t){let r=this.resourceRoot;if(this.resourceRootTemplated)r=this.originResourceRoot;else if(this.hasServicePath(t))r=this.getIModuleServicePath(t);return r}getIModule(e){return e.split("/")[0]}isAbsolute(e){return 0===e.indexOf("/")?!0:!1}isPackage(e){return-1!==e.indexOf(".package")}isMinified(e){return".min"===e.slice(-4)}fixOld(e){let t=e,r="";const s=this.getIModule(e);if(this.paths[s]&&0===t.indexOf(s))r=s;if(r.length&&this.paths[r])t=t.replace(r,this.paths[r]);return t}getThemeCompatibleName(e){if(i.hasOwnProperty(e))return i[e];else return e}resolveLink(e,t){if("string"==typeof t)t={ext:t};const r=this.generateFullConfig(e,t);let s=this.getFullLink(r);return s=this.postProcessing(s,r),s}resolveCssWithTheme(e,t){const r=function(e,t){let r=!1;if(a[e]&&(a[e]._all||a[e][t]))r=!0;return r}(this.getIModule(e),t)?t:this.getThemeCompatibleName(t);return this.resolvePathToCss(e,r)}resolvePathToCss(e,t){const r=this.getIModule(e),s=t.split("__"),i=s[0],a=2===s.length?s[1]:null,o=e.split("/").splice(1).join("/");let n;if(a)n=r+"-"+i+"-theme/"+a+"/"+o;else n=r+"-"+i+"-theme/"+o;return this.resolveLink(n,{ext:"css"})}getFullLink(e){return(e.resourceRoot?e.resourceRoot:"")+e.moduleName+(e.needTheme?"_"+e.theme:"")+"."+e.extension}postProcessing(e,t){let r=e;if(t.theme&&t.isPackage&&!t.isVdomSuperbundle){const s=e.split(".package");s[0]=s[0]+"_"+t.theme,r=s.join(".package")}return r=this.getResourceUrl(r),r}getResourceUrl(e){return(0,r.getResourceUrl)(e)}isNewTheme(e,t){const r=this.getConstantsModulesInfo()[this.getIModule(e)],s=t.replace("__",":");if(r&&r.newThemes&&r.newThemes[e])return-1!==r.newThemes[e].indexOf(s);else return!1}isVdomSuperbundle(e){if(-1!==e.indexOf("vdom-superbundle"))return!0;else return!1}generateFullConfig(e,t){let r;const s=this.isAbsolute(e),i=this.getIModule(e);if(!s)r=this._getLinkResourceRoot(e,i);const a=this.isPackage(e),o=t.theme&&"css"===t.ext&&!a,n=this.fixOld(e),l=this.isVdomSuperbundle(e);return{moduleName:n,relative:!s,resourceRoot:r,extension:t.ext,needTheme:o,theme:t.theme,isVdomSuperbundle:l,isPackage:a}}},t}(0,{},t,a),d=u,h=function(e,t,r,s){"use strict";function i(e,t,i){const a=e(i);if(s.constants.isBrowserPlatform)return()=>a;else return(0,r.setStore)(t,e(i)),()=>(0,r.getStore)(t,(()=>e(i)))}
145Object.defineProperty(t,"__esModule",{value:!0}),t.AliasStorage=t.EntityStorage=void 0;const a=()=>new n,o=()=>i(a,n.label);class n{constructor(e=Object.create(null)){this.data=e}get(e){return this.data[e]}set(e,t){return this.data[e]=t,!0}remove(e){delete this.data[e]}getKeys(){return Object.keys(this.data)}toObject(){return this.data}}n.label="UICommon/theme/_controller/Storage#CssEntityStore";t.EntityStorage=class{constructor(e=o()){this.getStore=e}set(e){const t=this.getStore();if(0!==this.getThemeNamesFor(e.cssName).length)t.set(e.cssName,{...t.get(e.cssName),[e.themeName]:e});else t.set(e.cssName,{[e.themeName]:e})}has(e,t){var r;return void 0!==(null===(r=this.getStore().get(e))||void 0===r?void 0:r[t])}get(e,t){const r=this.getStore().get(e),s=null==r?void 0:r[t];if(!r||void 0===s)throw new Error(`CSS ${e} for ${t} theme is not exists!`);return s}async remove(e,t){const r=await this.get(e,t).remove();if(r){const r=this.getStore().get(e);if(r)delete r[t],this.getStore().set(e,r)}return r}clear(){this.getStore=o()}getAllCssNames(){return this.getStore().getKeys()}getThemeNamesFor(e){return Object.keys(this.getStore().get(e)||[])}getEntitiesBy(e){return this.getThemeNamesFor(e).map((t=>this.get(e,t)))}};const l=e=>new c(e);class c{constructor(e=Object.create(null)){this.data=e}get(e){return this.data[e]}set(e,t){return this.data[e]=t,!0}remove(e){delete this.data[e]}getKeys(){return Object.keys(this.data)}toObject(){return this.data}}c.label="UICommon/theme/_controller/Storage#AliasStore";return t.AliasStorage=class{set(e){this.getStore=(e=>i(l,c.label,e))(e)}get(e){if(!this.getStore)return e;else return this.getStore().get(e)||e}},t}(0,{},n,a),E=function(e,t){"use strict";var r,s,i,a,o,n;return Object.defineProperty(t,"__esModule",{value:!0}),t.THEMED_CSS_MODULE_PREFIX=t.CSS_MODULE_PREFIX=t.DEFAULT_THEME_TYPE=t.EMPTY_THEME=t.DEFAULT_THEME=t.DEPRECATED_THEME_TYPE=t.THEME_TYPE=t.DEPRECATED_ELEMENT_ATTR=t.ELEMENT_THEME_ATTR_LAYER=t.ELEMENT_THEME_ATTR=t.ELEMENT_ATTR=void 0,function(e){e.HREF="href",e.THEME="css-theme",e.THEME_TYPE="theme-type"}(r||(t.ELEMENT_ATTR=r={})),function(e){e.SELECTOR="data-theme-selector",e.LAYER="data-theme-layer"}(s||(t.ELEMENT_THEME_ATTR=s={})),function(e){e.SERVICE="service",e.FALLBACK="fallback",e.STATIC="static"}(i||(t.ELEMENT_THEME_ATTR_LAYER=i={})),function(e){e.HREF="href",e.NAME="css-name",e.THEME="theme-name",e.THEME_TYPE="class"}(a||(t.DEPRECATED_ELEMENT_ATTR=a={})),function(e){e.MULTI="m",e.SINGLE="s"}(o||(t.THEME_TYPE=o={})),function(e){e.MULTI="new-styles",e.SINGLE="css-bundles"}(n||(t.DEPRECATED_THEME_TYPE=n={})),t.DEFAULT_THEME="default",t.EMPTY_THEME="no_theme",t.DEFAULT_THEME_TYPE=o.MULTI,t.CSS_MODULE_PREFIX="css!",t.THEMED_CSS_MODULE_PREFIX="css!ThemesModule",t}(0,{}),T=E,m=function(e,t,r,s,i,a,o,n,l){"use strict";function c(){return!u&&window.wsConfig}Object.defineProperty(t,"__esModule",{value:!0});const u="undefined"==typeof window;return t.default=class{constructor(e=!1){const{buildnumber:t,wsRoot:i,appRoot:a,resourceRoot:o}=s.constants;if(u)return void(this.lr=new r.default(e,t,i,a,o));const l=c()||{};this.lr=new r.default(e,l.buildnumber||t,l.wsRoot||i,l.appRoot||a,l.resourceRoot||o),this.getHref=(0,n.memoize)(this.getHref)}getHref(e,t){let r=e;const s=l.controller.currentLocaleConfig.directionality;if(!r&&t!==i.EMPTY_THEME)return a.getModuleUrl(`${i.THEMED_CSS_MODULE_PREFIX}/${t}`,(0,o.gets3debug)(),s,!0);if(-1!==r.indexOf(".css"))return r;if(t===i.EMPTY_THEME){if(!r.includes("/")&&r.endsWith(".package")){r=`${(c()||{}).resourceRoot}${r}`}return a.getModuleUrl(i.CSS_MODULE_PREFIX+r,(0,o.gets3debug)(),s,!0)}return this.lr.resolveCssWithTheme(r,t)}},t}(0,{},u,a,E,e,t,r,i),f=m,_=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Base=void 0;return t.Base=class{constructor(e,t,s=r.DEFAULT_THEME,i=r.THEME_TYPE.MULTI){if(this.href=e,this.cssName=t,this.themeName=s,this.themeType=i,this.isMounted=!1,this.requirement=0,!e||!t)throw new Error(`Invalid arguments href - ${e} or cssName - ${t}`);this.remove=this.remove.bind(this)}require(){this.requirement++}remove(){if(0===this.requirement)return this.isMounted=!1,Promise.resolve(!0);else return this.requirement--,Promise.resolve(!1)}},t}(0,{},E),g=function(e,t,r,s,i,a){"use strict";
145Object.defineProperty(t,"__esModule",{value:!0});class o extends s.Base{constructor(e,t,r,s,a=i.THEME_TYPE.MULTI){if(super(e,t,r,a),this.themeType=a,this.loading=Promise.resolve(),s)this.href=this.href||s.getAttribute(i.ELEMENT_ATTR.HREF),this.cssName=this.cssName||this.href,this.themeName=this.themeName||s.getAttribute(i.ELEMENT_ATTR.THEME),this.themeType=this.themeType||s.getAttribute(i.ELEMENT_ATTR.THEME_TYPE)}load(e,t){if(this.themeName===i.EMPTY_THEME&&r.isLoaded(i.CSS_MODULE_PREFIX+this.cssName))return new Promise((e=>{this.isMounted=!0,e()}));else return this.loading=this.mountElement(e,t).then((()=>{this.isMounted=!0})).catch((e=>{if(this.headTagId)a.Head.getInstance().deleteTag(this.headTagId);throw e})),this.loading}getLoading(){return this.loading.then((()=>this))}remove(){return super.remove().then((e=>{if(e)a.Head.getInstance().deleteTag(this.headTagId);return e}))}mountElement(e,t){return new Promise(((r,s)=>{const i=Date.now(),o=()=>{const e=Date.now()-i,t=`Couldn't load ${this.href} in ${e} ms.\n\t${this.themeType} css ${this.cssName} for ${this.themeName} theme.`;s(new Error(t))},n=setTimeout(o,29e3),l=this.generateAttrs(e);this.headTagId=a.Head.getInstance().createTag("link",l,null,{load:()=>{clearTimeout(n),r()},error:o},t)}))}generateAttrs(e){let t={rel:"stylesheet",[i.ELEMENT_ATTR.HREF]:this.href,[i.ELEMENT_ATTR.THEME]:this.themeName,[i.ELEMENT_ATTR.THEME_TYPE]:this.themeType};if(e)t={...t,...e};return t}}return t.default=o,t}(0,{},e,_,E,o),p=function(e,t,r,s,i,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class o extends s.Base{constructor(e,t,s,a=i.THEME_TYPE.MULTI){super(e,t,s,a),this.themeType=a,this.generateAttrs=r.default.prototype.generateAttrs.bind(this)}load(e){try{const t=this.generateAttrs(e);this.headTagId=a.Head.getInstance().createTag("link",t,null,{load:()=>{}}),this.isMounted=!0}catch(e){if(this.headTagId)a.Head.getInstance().deleteTag(this.headTagId);throw e}}getLoading(){return this}}return t.default=o,t}(0,{},g,_,E,o),R=function(e,t,r,s,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class a extends s.default{constructor(e,t,r,s){if(super(e,t,r,s,i.THEME_TYPE.SINGLE),s)this.href=this.href||s.getAttribute(i.DEPRECATED_ELEMENT_ATTR.HREF),this.cssName=this.cssName||s.getAttribute(i.DEPRECATED_ELEMENT_ATTR.NAME),this.themeName=this.themeName||s.getAttribute(i.DEPRECATED_ELEMENT_ATTR.THEME),this.themeType=this.themeType||s.getAttribute(i.DEPRECATED_ELEMENT_ATTR.THEME_TYPE)}removeForce(){if(this.isMounted=!1,this.requirement=0,this.headTagId)r.Head.getInstance().deleteTag(this.headTagId);return Promise.resolve()}}return t.default=a,t}(0,{},o,g,E),b=function(e,t,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i extends r.default{constructor(e,t,r){super(e,t,r,s.THEME_TYPE.SINGLE)}removeForce(){return this.isMounted=!1,this.requirement=0,Promise.resolve()}}return t.default=i,t}(0,{},p,E),M=function(e,t,r,s,i,a,o,n){"use strict";function l(e){const t=e.getAttribute(s.DEPRECATED_ELEMENT_ATTR.HREF),i=e.getAttribute(s.DEPRECATED_ELEMENT_ATTR.NAME)||function(e){if(!e)return null;const t=e.indexOf(r.constants.resourceRoot);if(-1===t)return e;return e.slice(t)}(t),o=e.getAttribute(s.DEPRECATED_ELEMENT_ATTR.THEME)||s.EMPTY_THEME,l=e.getAttribute(s.DEPRECATED_ELEMENT_ATTR.THEME_TYPE)===s.DEPRECATED_THEME_TYPE.MULTI?s.THEME_TYPE.MULTI:s.THEME_TYPE.SINGLE;if(c(i)||c(t)||c(o)||c(l))return null;const u=new(l===s.THEME_TYPE.SINGLE?a.default:n.default)(t,i,o,e);return u.isMounted=!0,u}Object.defineProperty(t,"__esModule",{value:!0}),t.isSingleEntity=t.isLinkEntity=t.restoreDeprecatedEntity=t.restoreEntity=t.createEntity=void 0;const c=e=>null==e,u="undefined"==typeof window;t.createEntity=function(e,t,r,l){if(l===s.THEME_TYPE.MULTI){return new(u?o.default:n.default)(e,t,r)}return new(u?i.default:a.default)(e,t,r)},t.restoreEntity=function(e){const t=e.getAttribute(s.ELEMENT_ATTR.HREF),r=t,i=e.getAttribute(s.ELEMENT_ATTR.THEME),o=e.getAttribute(s.ELEMENT_ATTR.THEME_TYPE);if(c(r)||c(t)||c(i)||c(o))return l(e);const u=new(o===s.THEME_TYPE.SINGLE?a.default:n.default)(t,r,i,e);return u.isMounted=!0,u},t.restoreDeprecatedEntity=l;t.isLinkEntity=e=>e instanceof n.default;return t.isSingleEntity=e=>e instanceof a.default||e instanceof i.default,t}(0,{},a,E,b,R,p,g),L=function(e,t,r,s,i,a,o,n,l,c,u){"use strict";function d(e){if("default__dark"===e)return"default__dark";if("retail__dark"===e)return"retail__dark-medium";if("retail__light"===e)return"retail__light-medium";else return"default"}
145Object.defineProperty(t,"__esModule",{value:!0}),t.Controller=t.isErrorTheme=t.RETAIL_CONVERTER=t.ONLINE_NAVIGATION_CONVERTER=t.UUID_REGEXP=t.THEME_APPLICATIONS=void 0;class h{constructor(){this._state={}}getState(){return this._state}setState(e){this._state=e||{}}}const E="UICommon_ThemeController_activeTheme";t.THEME_APPLICATIONS={palette:"PALETTE",font:"FONT"};const T="ThemesModule",m=`${T}/sabythemes`;t.UUID_REGEXP=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5,7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;const f=new Map([["9ba4e73e-c289-4e59-9f79-dd4428452921","base"],["0efcb54e-32f1-4760-bbcd-1a97045cf74e","base_font"],["be749d51-5165-4ac5-9aee-d178f69be826","base_font2"],["c35b534d-4c28-4fc4-b0ae-9cdf4ec694f8","brandbookdouble"],["3a1539ba-0a0d-405e-b470-36bb496f282e","default"],["0e933fad-3426-496d-8a90-ac67047c3c04","default__blackblue"],["b1021a76-a5f1-48c7-952d-cbdcd4c1c21d","default__cola"],["aba03102-8699-4048-9089-9b2dd3ba15f3","default__dark"],["993c31e5-f271-429b-b4ae-efb06240c8d3","default__darkv3"],["f03c7fcb-bd7b-4193-8df8-8992cdb4e976","default__green"],["bddcdfd4-611b-4159-b7c3-af4a09502439","default__meet"],["1cb91fc8-56b0-41b9-9802-c92dfb910be3","default__onlinenavigation"],["f34fb435-5c2d-4d2a-9f1d-22ea24fc36bb","default__papirus"],["bf4a138a-314f-4a99-8687-b65faf673c24","default__pink"],["5e57bae8-4974-49d0-ae14-f44350686d45","default__tbank"],["18e9ed51-060e-4617-b3db-6b7182ff7bd7","default__trade"],["c6c9a958-3477-4c9a-a385-1a27b42a5b7b","default__ubrr"],["651382f8-de61-4ae9-9acb-d40cd5080915","onlineform"],["adb6ce43-c54a-4684-8f16-e50724a6579a","onlineform__font"],["b2a3fef8-0469-415c-b147-14d6b14c8ed4","retail__dark"],["13b4d225-e16b-43ef-b185-953c761a7a7a","retail__light"],["251e6cc3-856e-4a45-b5ce-d91c0b38d3eb","site__berry"],["912d0693-2237-487a-8c36-cdad20662762","site__chestnut"],["98b6b4b4-f43f-4c8f-9565-ef807c75acf5","site__cornflower"],["b6d4562b-356c-44e1-ad6e-ac38f382232d","site__forest"],["904c24fe-b513-4523-ad8f-03e8945318f5","site__hazelnut"],["5ba125f3-6ea9-4209-a427-f00af5402033","site__honey"],["96151e02-223e-4787-a0a1-22b8e1c5b57c","site__mandarin"],["3a4be9a9-0eb3-4b32-82d6-f17c39bb3122","site__marine"],["256110d0-3405-453d-9a03-6741ec7d4a88","site__meadow"],["18abe152-7a44-45eb-8f69-da6cd6701920","site__orange"],["8d5b9e43-dc0c-46ad-8eb5-cca16b9d6678","site__orchid"],["f3a2ca26-aace-4f81-b295-dfbfa9d1cee6","site__pumpkin"],["c9c76f54-8bcb-41c2-bc2a-11f94486021f","site__purple"],["b7dc0ebe-e2cf-41da-9a21-969e966a8baa","site__royal"],["568f8c20-ec6a-4e00-a2a2-0490c41a4e7d","site__ruby"],["4f4dee3c-e7d7-4ae4-9181-4c9daab24d47","site__sand"],["6a18f4b4-13d8-4ea2-9ffc-46109fa3cdd3","site__tropical"]]);t.ONLINE_NAVIGATION_CONVERTER={newName:"default__onlinenavigation",oldName:"onlinenavigation"},t.RETAIL_CONVERTER={light:"retail__light",dark:"retail__dark"},t.isErrorTheme=function(e){return!!(null==e?void 0:e.error)};class _{constructor(e){this.cssLoader=e,this.themeReceiverData=null,this.storage=new l.EntityStorage,this.aliases=new l.AliasStorage,this.loadedThemeSet=new Set,this.activeThemeJsonCache=new Map,this.activeThemeCache=new Map,this.registeredReceiverKeys=new Set,this.hydratedReceiverKeys=new Set,this.currentStateReceiver=null,this.themeReceiverDataMap=new Map,this.appTheme=o.DEFAULT_THEME,this.set=this.set.bind(this),this.has=this.has.bind(this),this.clear=this.clear.bind(this),this.collectCssLinks()}addToLoadedThemeSet(e){this.loadedThemeSet.add(e)}hasLoadedTheme(e){return this.loadedThemeSet.has(e)}get(e,t,r=o.THEME_TYPE.MULTI){if((0,i.isUnitTestMode)())return Promise.resolve();const s=(0,i.escapeHtml)(this.aliases.get(e)),a=(0,i.escapeHtml)(t||this.appTheme),n=this.cssLoader.getHref(s,a);return Promise.resolve(this._get(s,a,n,r))}getVariables(e,t,r=!1){if((0,i.isUnitTestMode)())return;if(r&&this.hasLoadedTheme(e))return;const s=(0,i.escapeHtml)(e),a=this.cssLoader.getHref(null,s),n=this._get(s,s,a,o.THEME_TYPE.MULTI,t,r);if(this.addToLoadedThemeSet(s),n&&n.then)return n.then((()=>{}));else return}getActiveTheme(e,t){var r,s;if(void 0===e)return void i.Logger.error('ÐпÑÐ¸Ñ "config" не Ð¼Ð¾Ð¶ÐµÑ Ð±ÑÑÑ Ð¿ÑÑÑой!');if("object"!=typeof e)return void i.Logger.error('РопÑÐ¸Ñ "config" пеÑедан не валиднÑй обÑекÑ');const a=this.calculateSelector("selector"in e?e.selector:e.uuid);this.hydrateCachesFromReceiver(a);const o=this.activeThemeCache.get(a);if(o)return this.applyStyles(o),this.saveThemeToReceiver(a,o),o;const n=this.activeThemeJsonCache.get(a);if(n){this.saveThemeToReceiver(a,n);const e=this.buildActiveThemeFromJson(a,n);return this.activeThemeCache.set(a,e),this.applyStyles(e),e}
145if(!t&&"undefined"==typeof document&&"isFallback"in e&&e.isFallback)try{const e=`json!${this.prepareStaticPath(a)}`,t=(0,c.loadSync)(e);this.activeThemeJsonCache.set(a,t),this.saveThemeToReceiver(a,t);const i=(null===(r=this.themeReceiverData)||void 0===r?void 0:r.getState())||{};if(!i[a])i[a]=t,null===(s=this.themeReceiverData)||void 0===s||s.setState(i);const o=this.buildActiveThemeFromJson(a,t);return this.activeThemeCache.set(a,o),this.applyStyles(o),o}catch(e){return{isFromDistribution:!0,error:e,selector:a}}return this.getActiveThemeFallbackAsync(a)}async getActiveThemeFallbackAsync(e){let t;try{const r=this.activeThemeJsonCache.get(e);if(r)t=r;else{const r=`json!${this.prepareStaticPath(e)}`,s=await(0,c.loadAsync)(r);this.activeThemeJsonCache.set(e,s),t=s}}catch(t){return{isFromDistribution:!0,error:t,selector:e}}const r=this.buildActiveThemeFromJson(e,t);return this.activeThemeCache.set(e,r),this.applyStyles(r),r}buildActiveThemeFromJson(e,r){if(r.isFromDistribution)return r;const a={isFromDistribution:!0,themeApply:t.THEME_APPLICATIONS.palette,selector:e,uuid:e,classList:(null==r?void 0:r.styles_list)||[`t-${e}`]},o=(null==r?void 0:r.properties)||{staticTheme:d(e)},n=s.Model.fromObject(o);if(!n||"function"!=typeof n.get){const t=new Error("Model.fromObject веÑнÑл не Model");t.selector=e,t.source=o,t.result=n,t.Model=s.Model,t.responseJson=r,i.Logger.error(`Model.fromObject веÑнÑл не Model Ð´Ð»Ñ "${e}"`,void 0,t)}return a.properties=n,a}applyStyles({selector:e,properties:t}){if(!e)return;const r=(0,i.getResourceUrl)(`/${this.prepareStaticPath(e)}.css`);let s;if(this._get(e,r,r,o.THEME_TYPE.MULTI,o.ELEMENT_THEME_ATTR_LAYER.FALLBACK),t)if(void 0===t.get)i.Logger.error('Ð "properties" ÑÐµÐ¼Ñ Ð½Ð°Ñ
одиÑÑÑ Ð½ÐµÐ²Ð°Ð»Ð¸Ð´Ð½Ñй обÑекÑ! ÐÑÐ´ÐµÑ Ð¿Ñименена Ñема по-ÑмолÑаниÑ.\n ÐÐ»Ñ Ð¾Ñладки оÑибки надо вÑÑаÑÑ ÑоÑкой оÑÑанова в меÑÑо Ð¿Ð°Ð´ÐµÐ½Ð¸Ñ Ð¾Ñибки и поÑмоÑÑеÑÑ ÑÑо наÑ
одиÑÑÑ Ð² "properties"\n ÐоднÑÑÑÑÑ Ð¿Ð¾ ÑÑÐµÐºÑ Ð¸ обÑаÑиÑÑÑ Ðº оÑвеÑÑвеннÑм Ñ ÑÑой инÑоÑмаÑией.'),s="default";else s=t.get("staticTheme");if(s){const t=(0,i.getResourceUrl)(`/${T}/${s}.css`);this._get(s,e,t,o.THEME_TYPE.MULTI,o.ELEMENT_THEME_ATTR_LAYER.STATIC)}}prepareStaticPath(e){let r=`${m}/`;if(t.UUID_REGEXP.test(e))r+=`${f.get(e)}`;else r+=`${e}`;return r}_get(e,t,r,s,n,l){const c=(0,i.escapeHtml)(e),u=(0,i.escapeHtml)(t),d=this.has(c,u)&&c||this.has(r,u)&&r||null;if(d){const e=this.storage.get(d,u);if(e.require(),!this.hasLoadedTheme(u)&&d.includes(T))this.addToLoadedThemeSet(u);return e.getLoading()}const h=(0,a.createEntity)(r,c,u,s);this.set(h);const E=()=>{if(u===o.EMPTY_THEME)return h;else return this.removeSingleEntities(h.cssName,h.themeName),h},m=e=>this.remove(c,u).then((()=>{throw function(e){return new Error(`UICommon/theme/controller\n ${e.message}\n It's probably an error with internet connection or CORS settings.`)}(e)}));let f;if(n)f={[o.ELEMENT_THEME_ATTR.SELECTOR]:t,[o.ELEMENT_THEME_ATTR.LAYER]:n};const _=h.load(f,l);if(_&&_.then)return _.then(E).catch(m);else return E()}getAll(){return this.storage.getAllCssNames().map((e=>this.storage.getEntitiesBy(e))).reduce(((e,t)=>e.concat(t)),[])}has(e,t){const r=this.aliases.get(e),s=t||this.appTheme;return this.storage.has(r,s)}isMounted(e,t){const r=(0,i.escapeHtml)(this.aliases.get(e)),s=(0,i.escapeHtml)(t||this.appTheme);if(!this.storage.has(r,s))return!1;else return this.storage.get(r,s).isMounted}setTheme(e){if(!e||e===this.appTheme)return Promise.resolve();const t=(0,i.escapeHtml)(e);return this.appTheme=t,Promise.resolve(this.getVariables(t)).then((()=>{}))}remove(e,t){const r=(0,i.escapeHtml)(this.aliases.get(e)),s=(0,i.escapeHtml)(t||this.appTheme);if(!this.storage.has(r,s))return Promise.resolve(!0);else return this.storage.remove(r,s)}clear(){this.storage.clear()}define(e){this.aliases.set(e)}getActiveThemeBySelector(e){if(e)return this.activeThemeCache.get(this.calculateSelector(e))}set(e){this.storage.set(e)}removeSingleEntities(e,t){this.storage.getEntitiesBy(e).filter(a.isSingleEntity).filter((e=>
145e.themeName!==t)).forEach((e=>e.removeForce().then((()=>this.storage.remove(e.cssName,e.themeName))).catch((e=>{i.Logger.error(e.stack)}))))}collectCssLinks(){if("undefined"==typeof document)return;const e=document.getElementsByTagName("link");for(let t=0;t<e.length;t++){const r=(0,a.restoreEntity)(e[t]);if(r)this.set(r)}}normalizeSelector(e){if(!e)return"";let t=e.trim().split("#",1)[0].split("?",1)[0].replace(/^.*[\\/]/,"");for(;;){const e=t.replace(/(\.css|\.min)$/i,"");if(e===t)break;t=e}return t}calculateSelector(e){if(e===t.ONLINE_NAVIGATION_CONVERTER.oldName)return t.ONLINE_NAVIGATION_CONVERTER.newName;if(e.includes(t.RETAIL_CONVERTER.light))return t.RETAIL_CONVERTER.light;if(e.includes(t.RETAIL_CONVERTER.dark))return t.RETAIL_CONVERTER.dark;else return e}saveThemeToReceiver(e,t){if("undefined"!=typeof window)return;this.ensureRequestState();const r=`${E}_${e}`;this.ensureReceiverRegistered(e);const s=this.themeReceiverDataMap.get(r);if(!s)return;const i=s.getState()||{};if(!i[e])i[e]=t,s.setState(i)}ensureRequestState(){const e=(0,u.getStateReceiver)();if(this.currentStateReceiver!==e)this.currentStateReceiver=e,this.themeReceiverDataMap=new Map,this.registeredReceiverKeys=new Set,this.hydratedReceiverKeys=new Set}ensureReceiverRegistered(e){this.ensureRequestState();const t=`${E}_${e}`;if(this.registeredReceiverKeys.has(t))return;const r=new h;this.themeReceiverDataMap.set(t,r);(0,u.getStateReceiver)().register(t,r),this.registeredReceiverKeys.add(t)}hydrateCachesFromReceiver(e){if("undefined"==typeof window)return;this.ensureRequestState();const t=`${E}_${e}`;if(this.hydratedReceiverKeys.has(t))return;this.ensureReceiverRegistered(e);const r=this.themeReceiverDataMap.get(t),s=null==r?void 0:r.getState();if(s){for(const e of Object.keys(s)){const t=s[e];if(t){if(!this.activeThemeJsonCache.has(e))this.activeThemeJsonCache.set(e,t);if(!this.activeThemeCache.has(e))this.activeThemeCache.set(e,this.buildActiveThemeFromJson(e,t))}}this.hydratedReceiverKeys.add(t)}}static getInstance(){var e;if(void 0!==_.instance)return _.instance;const t="debug"===(null===(e=globalThis.contents)||void 0===e?void 0:e.buildMode)||"true"===r.cookie.get("s3debug"),s=new _(new n.default(t));return _.instance=s,s}}return t.Controller=_,t}(0,{},a,s,t,M,E,m,h,e,n,"undefined"==typeof Types_collection||Types_collection),v=L,A=L,c.isErrorTheme=c.Loader=c.Controller=c.LinkResolver=c.ELEMENT_THEME_ATTR_LAYER=c.ELEMENT_THEME_ATTR=c.DEFAULT_THEME=c.EMPTY_THEME=c.THEME_TYPE=c.UUID_REGEXP=c.RETAIL_CONVERTER=c.ONLINE_NAVIGATION_CONVERTER=c.THEME_APPLICATIONS=c.getThemeController=void 0,Object.defineProperty(c,"Controller",{enumerable:!0,get:function(){return v.Controller}}),Object.defineProperty(c,"isErrorTheme",{enumerable:!0,get:function(){return v.isErrorTheme}}),c.LinkResolver=d.default,c.Loader=f.default,c.getThemeController=v.Controller.getInstance,Object.defineProperty(c,"THEME_APPLICATIONS",{enumerable:!0,get:function(){return A.THEME_APPLICATIONS}}),Object.defineProperty(c,"ONLINE_NAVIGATION_CONVERTER",{enumerable:!0,get:function(){return A.ONLINE_NAVIGATION_CONVERTER}}),Object.defineProperty(c,"RETAIL_CONVERTER",{enumerable:!0,get:function(){return A.RETAIL_CONVERTER}}),Object.defineProperty(c,"UUID_REGEXP",{enumerable:!0,get:function(){return A.UUID_REGEXP}}),Object.defineProperty(c,"THEME_TYPE",{enumerable:!0,get:function(){return T.THEME_TYPE}}),Object.defineProperty(c,"EMPTY_THEME",{enumerable:!0,get:function(){return T.EMPTY_THEME}}),Object.defineProperty(c,"DEFAULT_THEME",{enumerable:!0,get:function(){return T.DEFAULT_THEME}}),Object.defineProperty(c,"ELEMENT_THEME_ATTR",{enumerable:!0,get:function(){return T.ELEMENT_THEME_ATTR}}),Object.defineProperty(c,"ELEMENT_THEME_ATTR_LAYER",{enumerable:!0,get:function(){return T.ELEMENT_THEME_ATTR_LAYER}}),c})); 146!function(){function e(){define("Feature/feature",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})}))}function t(t,o){if(!t)if(o)return e();else e();else!function(t,s){if(t&&t[i]){if(t[i]&&t[i].includes("/"))n=t[i];else n=t[i]+"/"+u.join("/");if(n===r)if(s)e();else e();else if(s){var o=f.requirejs(n);module.exports=o}else define(r,[n],(function(e){return e}))}else e()}(t.modules[s].features,o)}var n,r="Feature/feature",i="Feature/feature",u=r.split("/"),s=u.shift(),f=function(){return this||(0,eval)("this")}();if("function"==typeof defineFeature)defineFeature("Feature/feature",["require","exports"],(function(e,t){"use strict";
146Object.defineProperty(t,"__esModule",{value:!0})}));else if(f.contents)t(f.contents,!1);else if("undefined"==typeof window)t(function(){try{contents=require("json!resources/contents")}catch(e){try{contents=require("json!contents")}catch(e){contents=""}}}()||f.requirejs("Feature/contents.json"),!1)}(); 147define("Page/base",["react/jsx-runtime","react","i18n!Page","WasabyLoader/ModulesLoader","UICore/Jsx","UICore/Events","UICommon/Utils","UICommon/Deps","UI/theme/controller","UI/Utils","UI/HotKeys","UI/Head","UI/Events","UI/Bootstrap","UI/Base","UI/Async","UI/Adaptive","UI/Actions","Types/util","Types/source","Types/object","Types/function","Types/entity","Types/collection","Types/chain","TransportCore/transport","SbisEnvUI/Maintains","SbisEnvUI/Bootstrap","Router/router","RequireJsLoader/conduct","Page/theme","Page/PageFactories","I18n/i18n","Env/Event","Env/Env","Core/helpers/Number/randomId","Core/PromiseLib/PromiseLib","Controls/popup","Controls/error","Controls/Store","Controls/Pending","Controls/Container/Async","Controls-DataEnv/slice","Controls-DataEnv/context","Controls-Actions/dispatcher","Compiler/IR","Browser/Window","Browser/Transport","Browser/Storage","Application/Page","Application/Env","require","exports","css!Page/base","Controls/buttons"],(function(e,t,o,i,n,a,r,l,s,d,c,u,g,p,f,v,m,h,C,y,P,b,_,S,k,A,I,E,O,w,T,R,L,N,F,D,x,M,B,j,U,H,V,G,$,K,Y,q,W,z,Q,X,J){var Z,ee,te,oe,ie,ne,ae,re,le,se,de,ce,ue,ge,pe,fe,ve,me,he,Ce,ye,Pe,be,_e,Se,ke,Ae,Ie,Ee,Oe,we,Te,Re,Le,Ne,Fe,De,xe,Me,Be,je,Ue,He,Ve,Ge,$e,Ke,Ye,qe,We,ze,Qe,Xe,Je,Ze,et,tt,ot,it,nt,at,rt,lt,st,dt,ct,ut,gt,pt,ft,vt,mt,ht,Ct,yt,Pt,bt,_t,St,kt,At,It,Et,Ot,wt;return Object.defineProperty(J,"__esModule",{value:!0}),Z=function(e,t,o,i,n,a){"use strict";function r(e){const t=(0,n.useSlice)("applicationSettings"),o=(0,i.useMemo)((()=>{const e={sidebarSettings:null==t?void 0:t.getFinalValue("sidebarSettings"),floatingAreaConfig:null==t?void 0:t.getFinalValue("floatingAreaConfig"),logo:null==t?void 0:t.getFinalValue("logo"),logoType:null==t?void 0:t.getFinalValue("logoType"),favicon:null==t?void 0:t.getFinalValue("favicon"),contentLogo:null==t?void 0:t.getFinalValue("contentLogo"),quickAddSource:null==t?void 0:t.getFinalValue("quickAddSource"),quickAddSettings:null==t?void 0:t.getFinalValue("quickAddSettings"),noticeCenterConfig:null==t?void 0:t.getFinalValue("noticeCenterConfig")};return o=e,Object.fromEntries(Object.entries(o).filter((([e,t])=>void 0!==t)));var o}),[t]);return(0,i.cloneElement)(e.children,{...e.children.props,...o})}return Object.defineProperty(t,"__esModule",{value:!0}),t.connectApplicationSettings=t.ApplicationSettingsProvider=void 0,t.ApplicationSettingsProvider=r,t.connectApplicationSettings=function(e){const t=e.displayName||e.name||"Component";class i extends a.Component{constructor(e){super(e),this.ref=this.ref.bind(this)}ref(e){this._$child=e}render(){return(0,o.jsx)(r,{children:(0,o.jsx)(e,{...this.props})})}}return i.displayName=`withApplicationSettings(${t})`,i.isReact=!0,i.getDefaultOptions=e.getDefaultOptions,i._getDefaultOptions=e._getDefaultOptions,i.defaultProps=e.defaultProps,i.getOptionTypes=e.getOptionTypes,i},t}(0,{},e,t,G,t),ee=Z,te=function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBuildingContext=void 0;const i=(0,o.createContext)(void 0);return i.displayName="BuildingContext",t.getBuildingContext=function(){return i},t}(0,{},t),oe=te,ie=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.DASHBOARD_MIN_WIDTH=t.PAGE_TYPES=void 0,t.PAGE_TYPES={card:"card",headings:"headings",entity:"entity",entityNew:"entityNew",landing:"landing",popup:"popup",dashboard:"dashboard",main:"main",custom:"custom",sabyEntity:"sabyEntity",adaptive:"adaptive",frame:"frame",form:"form",dialog:"dialog"},t.DASHBOARD_MIN_WIDTH=400,t}(0,{}),ne=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getHotKeyMustBePrevented=t.setHotKeyMustBePrevented=void 0;const o=Symbol("hotkeyMustBePrevented");return t.setHotKeyMustBePrevented=function(e,t){e[o]=t},t.getHotKeyMustBePrevented=function(e){return e[o]},t}(0,{}),ae=ne,re=function(e,t){"use strict";
147return Object.defineProperty(t,"__esModule",{value:!0}),t.getRouteMask=void 0,t.getRouteMask=function(e,t,o){if(e)return e;else return`/${o?o+"/:scope/":""}${t}/:page?showDetails=:showDetails&v=:v`},t}(0,{}),le=function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default={init:()=>{if(!o.LocalStorageNative.getItem("deviceVerified"))new Promise(((t,o)=>{e(["AuthControls/Additional/DeviceHandler"],t,o)})).then((e=>{e.init()})).catch((function(e){requirejs.onError(e)}))}},t}(X,{},W),se=le,de=function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Manifest=t.EXTENSIONS=t.LOADERS=t.META=t.FACTORIES=void 0,t.FACTORIES={applicationSettings:{dataFactoryName:"Page/loaders:ApplicationSettingsFactory",dataFactoryArguments:{},afterLoadCallback:"Page/loaders:ApplicationSettingsLoadCallback"},userInfo:{dataFactoryName:"EngineUser/Info:Factory",dataFactoryArguments:{},afterLoadCallback:"EngineUser/Info:afterLoadCallback"},isGuest:{dataFactoryName:"EngineUser/Info:IsGuest",dataFactoryArguments:{}},rightPanel:{dataFactoryName:"SabyPage/factory:RightPanel",dataFactoryArguments:{}},formFactory:{dataFactoryName:"SabyPage/form:FormFactory",dataFactoryArguments:{}},sitesRender:{dataFactoryName:"FrameRouting/sitesRender:siteFactory",dataFactoryArguments:{}},feature:{dataFactoryName:"FeatureAccess/feature:Factory",dataFactoryArguments:{}},featureCompatible:{dataFactoryName:"Page/loaders:FeatureCompatible",dataFactoryArguments:{},dependencies:["userInfo"]},addButtonFactory:{dataFactoryName:"SabyPage/factory:AddButton",dataFactoryArguments:{}},metaFactory:{dataFactoryName:"Page/loaders:Meta",dataFactoryArguments:{}},metaDataFactory:{dataFactoryName:"Page/loaders:MetaData",dataFactoryArguments:{}},metaCanonicalFactory:{dataFactoryName:"Page/loaders:MetaCanonical",dataFactoryArguments:{}},permission:{dataFactoryName:"Page/loaders:Permission",dataFactoryArguments:{},afterLoadCallback:"Page/loaders:PermissionLoadCallback"},helpSystemFactory:{dataFactoryName:"Hint/HelpRoutesFactory",dataFactoryArguments:{},dependencies:["permission","userInfo","applicationSettings","viewSettings"]},informers:{dataFactoryName:"Informers/base:Factory",dataFactoryArguments:{},dependencies:["permission","userInfo"],afterLoadCallback:"Informers/base:InformersLoadCallback",wakeUpReload:!0},navigation:{dataFactoryName:"Page/loaders:Navigation",dataFactoryArguments:{},dependencies:["applicationSettings"],afterLoadCallback:"Page/loaders:NavigationLoadCallback"},viewSettingsData:{dataFactoryName:"ViewSettings/Loader:DataFactory",dataFactoryArguments:{},dependencies:["isGuest"]},viewSettings:{dataFactoryName:"ViewSettings/Loader:Factory",dataFactoryArguments:{},dependencies:["navigation","applicationSettings","viewSettingsData","isGuest"],afterLoadCallback:"ViewSettings/Loader:afterLoadCallback"},noticeCenter:{dataFactoryName:"NoticeCenterRoute/common:Factory",dataFactoryArguments:{},dependencies:["dashboards","viewSettings","userInfo","applicationSettings"],afterLoadCallback:"NoticeCenterRoute/common:NoticeLoadCallback"},dashboards:{dataFactoryName:"Page/loaders:Dashboards",dataFactoryArguments:{},dependencies:["userInfo"]},activeTheme:{dataFactoryName:"Page/loaders:ActiveTheme",dataFactoryArguments:{},dependencies:["applicationSettings"]},entityChoice:{dataFactoryName:"EntityChoice/global:Factory",dataFactoryArguments:{},dependencies:["userInfo"]},userStatus:{dataFactoryName:"EngineUser/UserStatus:Factory",dataFactoryArguments:{}},configurationVisibility:{dataFactoryName:"Page/loaders:ConfigurationVisibility",dataFactoryArguments:{},dependencies:["permission"]},statistics:{dataFactoryName:"Page/loaders:Statistics",dataFactoryArguments:{},dependencies:["applicationSettings"]},componentAccess:{dataFactoryName:"ComponentAccess/Component:Factory",dataFactoryArguments:{},afterLoadCallback:"ComponentAccess/Component:afterLoadCallback"},_toolbar:{dataFactoryName:"SabyPage/base:ToolbarFactory",dataFactoryArguments:{}}},t.META={formatDetectionTelephoneNo:{name:"format-detection",content:"telephone=no"},appleMobileWebAppCapableYes:{name:"apple-mobile-web-app-capable",content:"yes"}},t.LOADERS={userInfo:{key:"userInfo",module:"EngineUser/Info:Info",reloadable:!1},activeTheme:{key:"activeTheme"},permission:{key:"permission",module:"Permission/access:Loader",reloadable:!1}
147,componentAccess:{key:"componentAccess"},informers:{key:"informers",module:"Informers/base:Loader",reloadable:!1,dependencies:["permission","userInfo"]},noticeCenter:{key:"noticeCenter",module:"NoticeCenterRoute/common:Loader",reloadable:!0,dependencies:["viewSettings","userInfo","dashboards"]},dashboards:{key:"dashboards",module:"Page/loaders:Dashboards",reloadable:!0,dependencies:["applicationSettings","userInfo"]},userStatus:{key:"userStatus",module:"EngineUser/UserStatus:Loader",reloadable:!1},entity:{key:"entity",module:"EntityChoice/global:Info",reloadable:!0,dependencies:["userInfo"]},form:{key:"form",module:"SabyPage/form:FormLoader",reloadable:!0},viewSettings:{key:"viewSettings",module:"ViewSettings/Loader",reloadable:!0,dependencies:["navigation","applicationSettings","userInfo"]},navigation:{key:"navigation",module:"Page/loaders:NavigationLoader",reloadable:!0,dependencies:["applicationSettings"]},configuration:{key:"configuration"},prefetch:{key:"prefetch",module:"Page/loaders:PrefetchLoaderClass",reloadable:!0},addButton:{key:"addButtonConfig"},applicationSettings:{key:"applicationSettings",module:"Page/loaders:ApplicationSettings",reloadable:!1},statistics:{key:"statistics"},featureFactory:{key:"featureFactory",module:"FeatureAccess/feature"},feature:{key:"feature",module:"Page/loaders:FeatureLoader",reloadable:!0,dependencies:["userInfo"]},helpSystem:{key:"helpSystem",module:"Hint/HelpRoutesLoader",reloadable:!0,dependencies:["applicationSettings","userInfo","viewSettings","permission"]}},t.EXTENSIONS={calculator:{key:"calculator",moduleName:"Controls-Calculator/InitHotKeys"},longOperations:{key:"longOperations",moduleName:"LongOperations/StarterController"},linkSafetyChecker:{key:"linkSafetyChecker",moduleName:"EngineLink/SafetyChecker"},deviceChecker:{key:"deviceChecker",moduleName:"Page/base:DeviceChecker"},serviceUpdateNotifier:{key:"serviceUpdateNotifier",moduleName:"ServiceUpdateNotifier/notifier:PopupController"},noticeCenterPopupNotifications:{key:"noticeCenterPopupNotifications",moduleName:"NoticeCenterRoute/common:PopupNotificationsController"},authError:{key:"authError",moduleName:"AuthControls/Additional/AuthErrorController"},notes:{key:"notes",moduleName:"Notes/VDOM/Mount:Init"},fsrarWorker:{key:"fsrarWorker",moduleName:"OnlineSbisRu/VDOM/FsrarWorkerController"},userActivity:{key:"userActivity",moduleName:"ActivityMonitoring/watcher"},smartScanner:{key:"smartScanner",moduleName:"WHDScanner/smartScanner:Watcher"},triggers:{key:"triggers",moduleName:"Triggers/sabyPage:Watcher"},trackingScript:{key:"trackingScript",moduleName:"TrackingScript/base:Init"},helpSystem:{key:"helpSystem",moduleName:"HelpBase/routesAutorunBase:Initializer",priority:40},statistics:{key:"statistics",moduleName:"SabyPage/base:Statistics"},shortcut:{key:"shortcut",moduleName:"OnlineSbisRu/extensions/Label",priority:50}};const i={path:"/cdn/OnlineCDN/manifest/1.0.12/manifest.json",papirusPath:"/cdn/OnlineCDN/papirusManifest/1.0.4/manifest.json"};return t.Manifest={constants:i,getPath:function(e){if((()=>{const e=o.constants.product;return-1!==(null==e?void 0:e.indexOf("tm"))})())return i.papirusPath;else return null!=e?e:i.path}},t}(0,{},F),ce=de,ue=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(){this._pageCount=0}addNewPage(){this._pageCount++}shouldReload(){var e,t;const o=null===(t=null===(e=null===window||void 0===window?void 0:window.performance)||void 0===e?void 0:e.memory)||void 0===t?void 0:t.usedJSHeapSize;if(o)return o>419430400&&this._pageCount>5;else return this._pageCount>20}},t}(0,{}),ge=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default={},t}(0,{}),pe=ge,fe=function(e,t,o,i){"use strict";function n(e){return e+(i.default.getGlobalContextName()||"")}Object.defineProperty(t,"__esModule",{value:!0}),t.setPageConfigCacheValue=t.getPageConfigCacheValue=void 0;const a="PageConfigLoader";return t.getPageConfigCacheValue=function(e,t){return((0,o.getStore)(a).get(n(e))||{})[t]},t.setPageConfigCacheValue=function(e,t,i){const r=n(e),l=(0,o.getStore)(a).get(r)||{};l[t]=i,(0,o.getStore)(a).set(r,l)},t}(0,{},Q,j),ve=function(e,t,o,i){"use strict";
147Object.defineProperty(t,"__esModule",{value:!0});class n extends((0,i.mixin)(o.ObservableMixin)){constructor(e){super(),this._router=e}notifySubscribers(e,t){this._notify(e,t)}}return t.default=n,t}(0,{},_,C),me=ve,he=function(e,t,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={_hasTimeoutErrors:(e,t)=>{let i=(null==t?void 0:t.status)===o.HTTPStatus.GatewayTimeout;if(e)n._iteratePreloadData(e,(e=>{const t=null==e?void 0:e.error;i=i||(null==t?void 0:t.status)===o.HTTPStatus.GatewayTimeout}));return i},_iteratePreloadData:(e,t)=>{if(!e)i.logger.error("Ðе пеÑедано поле data. Ðозможно пÑоизоÑла оÑибка во вÑÐµÐ¼Ñ Ð¿ÑедзагÑÑзки даннÑÑ
.");if(Array.isArray(e))e.forEach(t);else if(e&&"object"==typeof e)Object.keys(e).forEach((o=>{t(e[o],o)}))},getPrefetchResult:(e,t)=>{const o=null==e?void 0:e.data,i=!o||o instanceof Array?[]:{};if(e&&!(e instanceof Promise))n._iteratePreloadData(o,(({dependentArea:e,prefetchResult:o},n)=>{if(e&&e.includes(t)||"backbutton"===t||!t)if(void 0!==o)if(i instanceof Array)i.push(o);else if(Number.isInteger(parseInt(n,10))){const e=Object.keys(i).length;i[e]=o}else i[n]=o}));return i}};return t.default=n,t}(0,{},q,Q),Ce=he,ye=function(e,t,o,i,n,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r,l;return t.default=function(e){const t=(0,a.useSlice)("statistics"),s=(0,a.useSlice)("permission"),d=(0,a.useSlice)("applicationSettings"),c=(0,a.useSlice)("userInfo"),u=n.query.get.dataMode,g=(0,o.useMemo)((()=>{const e=(null==s?void 0:s.checkRights(["AppStatistics"],0,"Read"))||!!u;return{applicationId:null==d?void 0:d.state.applicationId,configurationId:null==d?void 0:d.state.configurationId,canDisplayStatistics:e,personId:null==c?void 0:c.state["ЧаÑÑноеÐиÑо"]}}),[s,u,d,c]);if(void 0===r)r=!!n.query.get.showStatistics;if(void 0===l)l=!!n.query.get.showStatisticsFull;const p=(0,o.useRef)(!0);return(0,o.useEffect)((()=>{if((r||l)&&!p.current)(0,i.loadAsync)("SabyPage/base").then((e=>{null==t||t.loadData().then((()=>{e.Statistics.init({},void 0,g,t)}))}))}),[p,e.pageId,t]),(0,o.useEffect)((()=>{(0,i.loadAsync)("SabyPage/base").then((e=>{setTimeout((()=>{e.Statistics.init({},void 0,g,t)}),2e3)})),p.current=!1}),[]),e.children},t}(0,{},t,i,Q,G),Pe=function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.openFullVersion=t.openMobileVersion=t.isAdaptive=void 0;t.isAdaptive=e=>"false"!==o.cookie.get("useAdaptive")&&e;t.openMobileVersion=()=>{o.cookie.set("useAdaptive","true"),location.reload()};return t.openFullVersion=()=>{o.cookie.set("useAdaptive","false"),location.reload()},t}(0,{},Q),be=Pe,_e=function(e,t,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addOnLoadResourceErrorScript=void 0,t.addOnLoadResourceErrorScript=async function(e){if(!e||"string"!=typeof e)return;const t=await(0,o.loadAsync)(e),r=`try{${l=t.toString(),l.replace(n,"").trim().replace(a," ")}}catch(err){console.error(err);}`;var l;i.Head.getInstance().createMergeTag("script",{},r)};const n=/(\r\n|\n|\r|)/gm,a=/\s+/g;return t}(0,{},i,z),Se=function(e,t,o){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.getLoaderTimeout=void 0,t.getLoaderTimeout=function(e){const t=(0,o.getConfig)("callTimeout");if(t)return t;else return e},t}(0,{},Q),ke=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t={},o={}){const i=[];if(t.beforeNavigateCallback)i.push(t.beforeNavigateCallback);if(t.afterRenderCallback)i.push(t.afterRenderCallback);if(t.afterNavigateCallback)i.push(t.afterNavigateCallback);return[...e.prefetchModules||[],...t.prefetchModules||[],...o.prefetchModules||[]]},t}(0,{}),Ae=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.getToolbarPreloadModules=void 0,t.getToolbarPreloadModules=function(e){const t=["SabyPage/actionsToolbar:View"];if(e.actions){const o=e.actions;if(o)t.push(o)}if(null==e?void 0:e.getOperationsPanelVisibilityCallback)t.push(null==e?void 0:e.getOperationsPanelVisibilityCallback);if(e.items||e._serviceItems){[...e._serviceItems||[],...e.items||[]].forEac
147h((e=>{if(e.getIconCallback)t.push(e.getIconCallback);if(e.getIconStyleCallback)t.push(e.getIconStyleCallback);if(e.getTooltipCallback)t.push(e.getTooltipCallback);if(e.getSelectedKeysCallback)t.push(e.getSelectedKeysCallback);if(e.getVisibilityCallback)t.push(e.getVisibilityCallback);if(e.getReadOnlyCallback)t.push(e.getReadOnlyCallback);if(e.getSourceCallback)t.push(e.getSourceCallback);if(e.getTitleCallback)t.push(e.getTitleCallback);if(e.getCaptionCallback)t.push(e.getCaptionCallback)}))}if(null==e?void 0:e.popupFooterTemplate)t.push(e.popupFooterTemplate);return t},t}(0,{}),Ie=Ae,Ee=function(e,t,o){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return"demo"===o.query.get.dataMode},t}(0,{},Q),Oe=function(e,t,o,i,n){"use strict";function a(){return window.self!==window.top}function r(e){if(a())return{needResize:!1};const t=[...l(),window.innerWidth,window.innerHeight,window.outerWidth,window.outerHeight],i=location.hostname.split(".").reverse(),n=o.cookie.get("s3ds"),r=t.join("|");if(o.cookie.set("s3ds",null,{path:"/",expires:new Date(0)}),o.cookie.set("s3ds",r,{path:"/",expires:365,domain:`${i[1]}.${i[0]}`}),n!==r&&e)return window.dispatchEvent(new Event("resize")),{needResize:!0};else return{needResize:!1}}function l(){let e=window.screen.width,t=window.screen.height;if(o.detection.isMobileSafari){if(0===window.orientation||180===window.orientation)if(e>t)[e,t]=[t,e];if(90===window.orientation||-90===window.orientation)if(t>e)[e,t]=[t,e]}return[e,t]}return Object.defineProperty(t,"__esModule",{value:!0}),t.initCookie=t.setS3DSCookie=void 0,t.setS3DSCookie=r,t.initCookie=function(){let e;if("undefined"!=typeof window){if(!a()){e=r(!0),document.addEventListener("visibilitychange",(()=>{if("visible"===document.visibilityState)r(!0)})),window.addEventListener("focus",(function(){r(!0)}),!1),window.addEventListener("pageshow",(function(){r(!0)})),n.Bus.globalChannel().subscribe("onWakeUp",(function(){window.dispatchEvent(new Event("resize"))}));const t=function(){r(!1)};window.addEventListener("resize",(0,i.debounce)(t,200)),window.addEventListener("beforeunload",t)}o.cookie.set("tz",null,{}),o.cookie.set("tz",Math.round((new Date).getTimezoneOffset()),{path:"/",expires:30});const t=document.cookie.match(/fileDownloadToken_\d+=\d+/g);if(t)t.forEach((e=>{o.cookie.set(e.substr(0,e.indexOf("=")),null,{path:"/"})}))}return e||{needResize:!1}},t}(0,{},F,b,N),we=Oe,Te=function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMask=t.getScope=t.getScopeId=void 0;t.getScopeId=(e,t)=>(null==t?void 0:t.get("scopeId"))||o.default.get("_scopeId");t.getScope=e=>(null==e?void 0:e.get("scope"))||"group";return t.getMask=()=>"page/:pageId/",t}(0,{},j),Re=Te,Le=function(e,t,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSource=t.getSiteNavigationSource=void 0;t.getSiteNavigationSource=async(e={query:"ListAll"})=>(0,t.getSource)("SiteNavigation",e);return t.getSource=async(e,t)=>{const{getAppRoot:n,useNavigationOnPS:a}=await(0,i.loadAsync)("SbisUI/appConfigInfo"),r=a()?{contract:e,address:n()}:e;return new o.SbisService({binding:t,endpoint:r})},t}(0,{},y,i),Ne=Le,Fe=function(e,t,o){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(o.query.get.log){const i=new Date,n=`${i.toLocaleTimeString()}.${i.getMilliseconds()}`;o.logger.warn(`${e}: ${t} ${n}`)}},t}(0,{},Q),De=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cleanUrl=void 0;return t.cleanUrl=e=>{let t=e;if(t.includes("#"))t=t.slice(0,t.indexOf("#"));if(t.includes("?"))t=t.slice(0,t.indexOf("?"));return t},t}(0,{}),xe=De,Me=function(e){"use strict";function t(){return this}var o=["_bannerVisible","_openMobileVersion","_closeBanner","click"];return e.g({v:1,m:"wml!Page/_base/AdaptiveBanner/AdaptiveBanner",d:e.d(["Controls/buttons"],arguments,1),t:[e.r(((e,i)=>[e.m(i,0)?[e.g(i,"div",{K:"0_0_",A:{class:"page-AdaptiveBanner tw-flex"},r:!0,c:!0},[e.g(i,"div",{K:"0_0_0_",A:{class:"page-AdaptiveBanner__wrapper"}},[e.g(i,"div",{K:"0_0_0_0_",A:{class:"page-AdaptiveBanner_center"}},[e.C(i,{library:"Controls/buttons",module:["Button"]},{K:"0_0_0_0_0_",E:{"on:click":[{value:o[1],originalName:o[3],viewController:i.v}],meta:{isControl:!1,context:t,handler:e.M(i,1)}},O:{icon:"icon-PhoneCell",iconSize:"l",inlineHeight:"l",fontSize:"xl",caption:"ÐеÑейÑи в мобилÑнÑÑ Ð²ÐµÑÑиÑ",viewM
147ode:"link"}})]),e.C(i,{library:"Controls/buttons",module:["Button"]},{K:"0_0_0_1_",A:{class:"page-AdaptiveBanner_close","data-qa":"controls-stack-Button__close"},E:{"on:click":[{value:o[2],originalName:o[3],viewController:i.v}],meta:{isControl:!1,context:t,handler:e.M(i,1)}},O:{icon:"icon-CloseNew",iconSize:"l",viewMode:"link",inlineHeight:"l"}}),e.g(i,"div",{K:"0_0_0_2_"})])])]:[e.g(i,"div",{K:"1_0_",r:!0,c:!0})]]))],p:o.slice(0,3),e:[(e,t)=>e.g(t,[o[0]]),function(e,t,o,i,n,a){return e.g(this,[a])}]})}(K,"undefined"==typeof Controls_buttons?null:Controls_buttons),Be=function(e){"use strict";function t(){return this}var o=["_mouseEnter","_mouseLeave","_mouseMove","content","_options","pageId","mouseenter","mouseleave","mousemove"];return e.g({v:1,m:"wml!Page/_base/Preloader/Preloader",t:[e.r(((e,i)=>[e.P(i,e.m(i,0),{K:"0_",E:{"on:mouseenter":[{value:o[0],originalName:o[6],viewController:i.v,args:[e.m(i,1)]}],"on:mouseleave":[{value:o[1],originalName:o[7],viewController:i.v}],"on:mousemove":[{value:o[2],originalName:o[8],viewController:i.v,args:[e.m(i,1)]}],meta:{isControl:!1,context:t,handler:e.M(i,2)}},O:e.s(i,{},e.m(i,3)),m:"attribute",c:!0,i:0})]))],p:o.slice(0,3),e:[(e,t)=>e.g(t,[o[4],o[3]]),(e,t)=>e.g(t,[o[4],o[5]]),function(e,t,o,i,n,a){return e.g(this,[a])},(e,t)=>e.g(t,[o[4]])],i:[[[3]]]})}(K),je=function(e){"use strict";var t=["_loadingStarted","_loadingEnding","_loadingEnded","sabyPage-ProgressBar_complete","sabyPage-ProgressBar_startProgress","sabyPage-ProgressBar_endProgress"];return e.g({v:1,m:"wml!Page/_base/ProgressBar/ProgressBar",t:[e.r(((e,t)=>[e.g(t,"div",{K:"0_",A:{class:"sabyPage-ProgressBar "+e.e(e.x(t,0))},r:!0,c:!0},[e.g(t,"div",{K:"0_0_",A:{class:e.e(e.x(t,1)),name:"progressBarStart"}}),e.g(t,"div",{K:"0_1_",A:{class:e.e(e.x(t,2)),name:"progressBarEnd"}})])]))],p:t.slice(0,3),e:[(e,o)=>e.g(o,[t[2]])?t[3]:"",(e,o)=>e.g(o,[t[0]])?t[4]:"",(e,o)=>e.g(o,[t[1]])?t[5]:""]})}(K),Ue=function(e,t,o,i,n,a,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class l extends o.Control{constructor(){super(...arguments),this._template=i,this._bannerVisible=!1,this._bannerClosed=!1}_beforeMount(e){this._updateBannerVisible(e.pageConfig)}_afterMount(e){this._resizeHandler=(0,a.debounce)((()=>{this._updateBannerVisible(e.pageConfig)}),100),window.addEventListener("resize",this._resizeHandler)}_beforeUpdate(e){if(!0!==this._bannerClosed)this._updateBannerVisible(e.pageConfig)}_beforeUnmount(){window.removeEventListener("resize",this._resizeHandler)}_closeBanner(){this._bannerVisible=!1,this._bannerClosed=!0}_openMobileVersion(){(0,n.openMobileVersion)()}_updateBannerVisible(e){this._bannerVisible=r.detection.isPhone&&"custom"!==e.type&&!(null==e?void 0:e.isAdaptive)}}return t.default=l,t}(0,{},f,Me,Pe,b,F),He=function(e,t,o,i,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=i.useContext((0,n.getBuildingContext)());return(0,o.jsx)(e.contextOptionsInnerComponent,{...e,...t,controllers:t})},t}(0,{},e,t,te),Ve=He,Ge=function(e,t,o,i,n,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends i.Component{render(){const{clearProps:e}=(0,a.delimitProps)(this.props),t=(0,n.getBuildingContext)();return(0,o.jsx)(t.Provider,{value:this.props.controllers,children:(0,o.jsx)(this.props.content,{...e})})}}return t.default=r,t}(0,{},e,t,te,n),$e=Ge,Ke=function(e,t,o,i,n,a,r,l,s){"use strict";function d(e,t){const o={actionName:e.actionName,actionProps:e.actionProps};return new n.ActionStarter(o).execute({},void 0,void 0,t)}function c(e){return!(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)}function u(e,t){if("NumpadAdd"===e.code&&c(e)&&("NumpadAdd"===(i=t.code)||"Equal"===i)&&(!(o=t).ctrlKey&&!o.altKey&&!o.metaKey))return!0;var o,i;if("NumpadSubtract"===e.code&&c(e)&&function(e){return"NumpadSubtract"===e||"Minus"===e}(t.code)&&c(t))return!0;else return(e.code?e.code===t.code:e.keyCode===t.keyCode)&&e.ctrlKey===t.ctrlKey&&e.altKey===t.altKey&&e.shiftKey===t.shiftKey&&e.metaKey===t.metaKey}async function g(e,t){let o;try{const e=await(0,s.loadAsync)("HotKeys/helpers");o=e.filterActions,f=e.hiddenHotkeysMap}catch(e){o=void 0,f=void 0}if(o){const i=new l.RecordSet({keyProperty:"ActionName",rawData:e.map((e=>({ActionName:e.actionName,Props:e.actionProps})))});await o(i,t)}}
147Object.defineProperty(t,"__esModule",{value:!0}),t.HotKeysHandler=void 0;const p="HANDLED";let f;return t.HotKeysHandler=function(t){const n=(0,o.useSlice)("hotkeys"),l=null==n?void 0:n.getHotKeysByPage(),s=(0,o.useContextActionExecutor)(),c=(0,i.useMemo)((()=>({})),[]),v=(0,i.useCallback)((async t=>{if(!l||!t.code)return;const o=(0,r.getHotKeyMustBePrevented)(t);if(!1===o)return;if(void 0===o&&(0,a.isInputElement)(document.activeElement)&&(0,a.isHandledByInput)(t))return;for(const e of l)if(u(e.keys,t))t.preventDefault();const i=function(e){let t="";if(e.ctrlKey)t+="Ctrl+";if(e.shiftKey)t+="Shift+";if(e.altKey)t+="Alt+";if(e.metaKey)t+="Meta+";const o=e.code;if(!["Control","Shift","Alt","Meta"].includes(o))t+=o;return t}(t);if(!c[i]){c[i]=!0;try{await async function(t,o,i){for(const e of t)if(u(e.keys,o))await g(t,i);for(const n of t)if(u(n.keys,o))if(!o[p])if(!(null==f?void 0:f.get(n.actionName)))if(o[p]=!0,await d(n,i))new Promise(((t,o)=>{e(["BrowserStatistics/activityUsage"],t,o)})).then((({sendActivityUsage:e})=>{e({activityId:"HOTKEYS_ACTION",source:"HOTKEYS_ACTION_HANDLED"})})).catch((function(e){requirejs.onError(e)}))}(l,t,s)}finally{c[i]=!1}}}),[s,l]);return(0,i.useEffect)((()=>(document.body.addEventListener("keydown",v),()=>{document.body.removeEventListener("keydown",v)})),[v]),t.children},t}(X,{},G,t,h,c,ne,S,i),Ye=function(e,t,o,i,n,a,r,l,s){"use strict";function d(e){const{children:t}=e,o=(0,n.useContextNode)(),a=i.useCallback(((e,t)=>{const i=Date.now()-t;s.logger.info('Page/base/Controller: "onWakeUp" event. Sleep time: '+i),o.reloadElement("informers",{reload:!0})}),[o]),d=i.useCallback((()=>{s.logger.info('Page/base/Controller: "Соединение воÑÑÑановлено"'),o.reloadElement("informers",{reload:!0})}),[o]);return i.useEffect((()=>{if(r.Bus.globalChannel().subscribe("onWakeUp",a),l.constants.isBrowserPlatform)window.addEventListener("online",d);return()=>{if(r.Bus.globalChannel().unsubscribe("onWakeUp",a),l.constants.isBrowserPlatform)window.removeEventListener("online",d)}}),[a,d]),t}Object.defineProperty(t,"__esModule",{value:!0}),t.WakeUpObserver=t.LayoutContent=void 0;const c={configs:{},loadResults:{}};return t.LayoutContent=function(e){var t,r;const{pageId:l,templateOptions:s,useStatisticExtension:u=!1,children:g,contextData:p}=e;if(!l)return null;let f=(null===(t=s.prefetch)||void 0===t?void 0:t.prefetchResult)||c;const v=s.workspaceErrorConfig?void 0:null===(r=null==s?void 0:s.prefetchConfig)||void 0===r?void 0:r.getSlicesConfig;if(s.workspaceErrorConfig)f=function(e,t){var o,i;const n=null===(o=e.configs)||void 0===o?void 0:o.prefetch;if(!n)return e;const a=null===(i=n.configGetterArgumentsArray)||void 0===i?void 0:i[0];if(a)a.workspaceErrorConfig=t;return e}(f,s.workspaceErrorConfig);return(0,o.jsx)(n.RootContextProvider,{dataConfigs:f,getSlicesConfig:v,getSlicesContextNodeName:"prefetch",children:(0,o.jsx)(n.Provider,{dataLayoutId:"prefetch",children:(0,o.jsx)(d,{children:u?(0,o.jsx)(a.default,{pageId:l,children:i.cloneElement(g,{contextData:p})}):i.cloneElement(g,{contextData:p})})})})},t.WakeUpObserver=d,t}(0,{},e,t,G,ye,N,F,Q),qe=function(e,t,o,i,n,a,r,l){"use strict";function s(e,t,i,a,r,s){return(0,l.default)("Page/DataLoader",`ÐаÑало обÑабоÑки модÑÐ»Ñ Ð·Ð°Ð³ÑÑзÑика ${e.module}`),function(e,t){if(o.isLoaded(e)){const i=o.loadSync(e);return t(i)}else return o.loadAsync(e).then((e=>t(e)))}(e.module,(o=>{let c,u=o;if(d(u))u=new u({...e.params,loadStartedCallback:s});if(u.init instanceof Function)(0,l.default)("Page/DataLoader",`ÐниÑиализаÑÐ¸Ñ Ð¼Ð¾Ð´ÑÐ»Ñ ${e.module}`),u.init();if((0,l.default)("Page/DataLoader",`Ðобавление модÑÐ»Ñ Ð² завиÑимоÑÑи ${e.module}`),(0,n.addPageDeps)([e.module]),i){const o=e.dependencies||[],i={};t.forEach(((e,t)=>{i[o[t]]=e})),c=i}else c=t;(0,l.default)("Page/DataLoader",`СÑаÑÑ Ð·Ð°Ð³ÑÑзки ${e.module}`);const g=u.loadData(e.params,c,a,r).catch((t=>e.catchError?null:Promise.reject(t)));if(!u.IPrefetchLoader)null==s||s();return g}))}function d(e){return e instanceof Function}
147Object.defineProperty(t,"__esModule",{value:!0});const c=(e,t)=>{e.forEach((e=>{const o=e.dependencies;if(null==o?void 0:o.length)o.forEach((o=>{if(!t.includes(o))i.Logger.warn(`Ðе найдена завиÑимоÑÑÑ ${o} Ð´Ð»Ñ Ð·Ð°Ð³ÑÑзÑика ${e.key} (${e.module}). Ðозможно ÑÑа завиÑимоÑÑÑ Ð½Ðµ иÑполÑзÑеÑÑÑ, либо не пеÑедан нÑжнÑй загÑÑзÑик.`)}))}))},u=(e,t,o,i,n)=>Promise.all(t).then((t=>s(e,t,!0,o,i,n))).catch((e=>Promise.reject(e)));return t.default={getReceivedData:(e,t,n)=>{const a={},r=e=>{let i=o.loadSync(e.module);if(d(i))i=new i(e.params);if(i.init instanceof Function)i.init();if(i.getReceivedData instanceof Function){const o=i.getReceivedData(e.params,t,n),r=e.key||e.module;a[r]=o}},l=[];for(;e.length!==l.length;){const t=l.length;if(e.forEach((t=>{var o;if(!l.includes(t.key)){const i=!t.dependencies,n=!!(null===(o=t.dependencies)||void 0===o?void 0:o.every((t=>e.find((e=>e.key===t))?l.includes(t):!0)));if(i||n)r(t),l.push(t.key)}})),t===l.length){i.Logger.info("Page/base:DataLoader - couldn't get data.");break}}return a},load:(e,t,o,n)=>{if(!t){const e=new Error("ÐÑи вÑзове DataLoader.load не пеÑедан Router");a.logger.warn(e)}return(e=>e&&e[0]instanceof Array)(e)?((e,t)=>{const o={},i=[];return e.forEach(((e,n)=>{const a=[];e.forEach((e=>{const r=e.dependencies||[],l=e.key||e.module,d=Promise.all(r.map((e=>o[e])));o[l]=Promise.all([d,i[n-1]]).then((([o])=>s(e,o,!1,t))).catch((e=>Promise.resolve(e)));const c=o[l];a.push(c),Promise.resolve(c).then((e=>{o[l]=Promise.resolve(e)}))})),i[n]=Promise.all(a)})),Promise.all(i).then((()=>o))})(e,t):((e,t,o,n)=>{(0,l.default)("Page/DataLoader","ÐаÑало загÑÑзки даннÑÑ
");const a={},s=[],d=e.map((e=>e.key));if(r.constants.isServerSide)c(e,d);for(;Object.keys(a).length!==e.length;){const r=Object.keys(a).length;if(e.forEach((e=>{if(!a[e.key]){const i=e.dependencies||[];if(i.every((e=>!!a[e]||!d.includes(e)))){const r=i.map((e=>a[e]));a[e.key]=u(e,r,t,o,n);const l=a[e.key];s.push(l.then((t=>{a[e.key]=t})))}}})),r===Object.keys(a).length){i.Logger.info("Page/base:DataLoader - couldn't get data.");break}}return Promise.all(s).then((()=>a))})(e,t,o,n)},cleanUpData:(e,t)=>{e.forEach((e=>{const i=o.loadSync(e.module);if(i.cleanUp instanceof Function)i.cleanUp(t)}))}},t}(0,{},i,d,l,Q,F,Fe),We=qe,ze=function(e,t,o,i,n,a,r,l,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const d="value";return t.default=class{constructor(e){if(this._timeout=1e4,!e)i.Logger.error('Option "uid" is required',this);else this._uid=e}isInit(){return void 0!==this.getState()}init(){(0,o.getStateReceiver)().register(this._uid,this)}getState(e){return(0,o.getStore)(this._uid).get(this._getStoreKey(e))}setState(e,t){(0,o.getStore)(this._uid).set(this._getStoreKey(t),e)}cleanUp(e){(0,o.getStore)(this._uid).set(this._getStoreKey(e),void 0)}getReceivedData(e,t,o){return this.getState()}loadData(e,t,o,i){let a;const s=this.getTimeout();if(s)a=(0,n.wrapTimeoutCallback)((()=>this.load(e,t,o,i)),s);else a=this.load(e,t,o,i);return a.catch((t=>{if((null==t?void 0:t.status)===l.HTTPStatus.Connection)(0,r.process)({error:t});return this.loadErrback(t,e)}))}loadErrback(e,t){return i.Logger.error(`ÐÑибка загÑÑзки даннÑÑ
. ÐлÑÑ Ð·Ð°Ð³ÑÑзÑика: ${this._uid}. \n Error: ${e}`),Promise.resolve({})}load(e,t,o,n){return i.Logger.error(`ÐеÑод "load" должен бÑÑÑ Ð¿ÐµÑеопÑеделÑн в загÑÑзÑике ${this._uid}`,this),Promise.resolve({loaderConfig:e,dependencies:t,Router:o,controllers:n})}_getStoreKey(e){return e?d+("default"===e?"":e):d+(a.default.getGlobalContextName()||"")}getTimeout(){return(0,s.getLoaderTimeout)(this._timeout)}},t}(0,{},Q,r,x,j,B,q,Se),Qe=ze,Xe=function(e,t,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends o.Control{constructor(){super(...arguments),this._template=i}show(){if(this._showProgressBarTimeoutId)clearTimeout(this._showProgressBarTimeoutId);this._showProgressBarTimeoutId=setTimeout((()=>{this._loadingStarted=!0,this._children.progressBarStart.className="sabyPage-ProgressBar_startProgress"}),this._options.isAdaptive?1e3:3e3)}
147hide(){if(this._loadingStarted&&!this._loadingEnded)this._endLoading();clearTimeout(this._showProgressBarTimeoutId)}_beforeUnmount(){if(this._showProgressBarTimeoutId)clearTimeout(this._showProgressBarTimeoutId)}_endLoading(){this._loadingEnding=!0,this._children.progressBarEnd.className="sabyPage-ProgressBar_endProgress",setTimeout((()=>{this._hideProgressBar()}),1e3)}_hideProgressBar(){this._loadingEnded=!0,setTimeout((()=>{this._loadingEnded=!1,this._loadingStarted=!1,this._loadingEnding=!1}),200)}}return t.default=n,t}(0,{},f,je),Je=Xe,Ze=function(e,t,o,i,n,a,r,l,s,d,c,u){"use strict";function g(e){var o,i,n,a;let r=[];const l=null===(o=null==e?void 0:e.logo)||void 0===o?void 0:o.favicon,d=null===(i=null==e?void 0:e.logo)||void 0===i?void 0:i.logo,c=null===(n=null==e?void 0:e.logo)||void 0===n?void 0:n.logoType;if(l)if("string"==typeof l)r.push({rel:"shortcut icon",href:l});else if("object"==typeof l)Object.keys(l).forEach((e=>{const t=p(l[e]);r.push({...t,sizes:e})}));if("textLogo"===c||"default"===c){const e=[null===(a=s.constants.maisonNeueExtendedBook)||void 0===a?void 0:a.MaisonSABYSBI];if(d&&"textLogo"===c)e.push(s.constants.maisonNeueExtendedDemi.MaisonSABYSBI,s.constants.maisonNeueExtendedDemi.MaisonRUEN,s.constants.maisonNeueExtendedBook.MaisonRUEN);r=r.concat((0,t.createLinks)(e))}return r}function p(e){let t,o="shortcut icon",i="image/x-icon";if("object"==typeof e)o=e.rel||o,t=e.href,i=e.type||i;else t=e;return{href:t,type:i,rel:o}}function f(e,t,o="root"){var i,n,a,r,l;return null===(l=null===(r=null===(a=null===(n=null===(i=e.loadersData)||void 0===i?void 0:i.prefetch)||void 0===n?void 0:n.prefetchResult)||void 0===a?void 0:a.loadResults)||void 0===r?void 0:r[o])||void 0===l?void 0:l[t]}Object.defineProperty(t,"__esModule",{value:!0}),t.getPrefetchData=t.pageHasNavigation=t.prepareBreadCrumbsData=t.hasQueryParam=t.prepareBreadCrumbsDataInner=t.setTheme=t.loadTheme=t.getThemeWebParamsKey=t.checkMemoryLeaks=t.preloadModules=t.parseQueryParams=t.fillUrlWithGroupId=t.updateByConfigLoader=t.createAppConfig=t.getFaviconAttrs=t.getHeadLinksByApplication=t.createLinks=t.getPageId=t.getTitle=t.getActiveTitle=void 0;t.getActiveTitle=e=>{let t="";if(e&&e.main&&e.mainSelected){const o=e.main.getRecordById(e.mainSelected);t=o?o.get("activeTitle")||o.get("title"):""}return t};t.getTitle=(e,t)=>
147{var o,i,n;const r=f(e,"userInfo");let l;if(e.getHeadingCallback){l=(0,a.loadSync)(e.getHeadingCallback)((e=>{var t;const o=null===(t=e.loadersData.prefetch)||void 0===t?void 0:t.data,i={};if(o)Object.entries(o).map((([e,t])=>{i[e]=t.prefetchResult}));return i})(e),(e=>{var t,o,i,n,a;return null===(a=null===(n=null===(i=null===(o=null===(t=e.loadersData.prefetch)||void 0===t?void 0:t.prefetchResult)||void 0===o?void 0:o.loadResults)||void 0===i?void 0:i.prefetch)||void 0===n?void 0:n.formFactory)||void 0===a?void 0:a.record})(e),"title",e.title)}if(!l&&(null==t?void 0:t.children))l=null===(o=t.children.at(0))||void 0===o?void 0:o.get("title");if(!l){const o=t&&t.main&&t.mainSelected?t.main.getRecordById(t.mainSelected):null;if(!(null===(n=null===(i=e.templateOptions)||void 0===i?void 0:i.pageTitle)||void 0===n?void 0:n.toString())||(null==o?void 0:o.get("renamed")))l=o?o.get("activeTitle")||o.get("title"):""}if(l=l||e.title,r){const t=r.mainCompanyName,o=r.customTitle;if(t)l=`${l} / ${t}`;else if(o&&e.mainPageId===e.id)l=o}return l};t.getPageId=(e,t,o)=>o.maskResolver.calculateUrlParams(e+"/:pageId",t).pageId;t.createLinks=(e=[])=>{const t=[];for(let i=0;i<e.length;++i)t.push({rel:"preload",as:"font",href:(0,o.getResourceUrl)(e[i]),type:"font/woff2",crossorigin:"anonymous"});return t},t.getHeadLinksByApplication=g,t.getFaviconAttrs=p;t.createAppConfig=(e,n,a,r,l)=>{var d,p,f,v,m;const h=!!e.loadersData,{metaData:C={},canonicalUrl:y}=n||{},P={title:h?(0,t.getTitle)(e,a):void 0,links:(0,t.createLinks)(e.preloadFonts),meta:C.meta?[...e.meta,...C.meta]:e.meta,microdata:JSON.stringify(C.microdata,null,""),servicesPath:e.servicesPath,noscript:void 0,isAdaptive:e.isAdaptive,adaptiveMode:e.adaptiveMode,contentClass:e.contentClass||"",bodyClass:e.bodyClass||"",stylesConfig:null,interVersionClass:null,scripts:[]};if(P.links=[...P.links,...g({logo:{favicon:e.favicon||(null===(d=null==r?void 0:r.logo)||void 0===d?void 0:d.favicon),logo:e.logo||(null===(p=null==r?void 0:r.logo)||void 0===p?void 0:p.logo),logoType:e.logoType||(null===(f=null==r?void 0:r.logo)||void 0===f?void 0:f.logoType)}})],e.manifest)P.links.push({rel:"manifest",href:c.Manifest.getPath(e.manifest)});if(e.scripts)P.scripts=e.scripts;if(e.noscript)P.noscript=(0,o.getResourceUrl)(e.noscript+"?ret="+i.location.href);if(y)P.links.push({rel:"canonical",href:y});P.meta=[...P.meta||[],{name:"mobile-web-app-capable",content:"yes"},{name:"apple-mobile-web-app-capable",content:"yes"},{name:"apple-mobile-web-app-status-bar-style",content:"black-translucent"}];let b="width=device-width,initial-scale=1.0, user-scalable=no";if("false"===i.cookie.get("useAdaptive"))b="width=1024";if("true"===i.query.get.viewportWidthDesktop&&(null===(v=e.adaptiveMode)||void 0===v?void 0:v.device.isTablet()))b="width=1024";if((null===(m=e.adaptiveMode)||void 0===m?void 0:m.device.isTablet())||(0,u.isBodyScrollAllowed)(e.isAdaptive,e.allowAdaptive,l)||s.detection.isWebView)b+=", viewport-fit=cover";if(P.meta=[{name:"viewport",content:b},...P.meta],i.query.get.injectedStyles)P.stylesConfig={styles:[["style",{},decodeURIComponent(i.query.get.injectedStyles)]],validHtml:{validNodes:{style:!0,div:!0}}};return P};t.updateByConfigLoader=(e,t)=>{const o={...e};if("function"==typeof t.isEmptyViewVisible)o.isEmptyView=t.isEmptyViewVisible(o);if("function"==typeof t.isRedirectVisible)o.isRedirectEmptyView=t.isRedirectVisible(o);if(!o.templateOptions.workspaceErrorConfig&&"function"==typeof t.getPrefetchError){const e=t.getPrefetchError(o);if(e)o.templateOptions.workspaceErrorConfig=e}if(!o.templateOptions.workspaceErrorConfig&&"function"==typeof t.getFormError){const e=t.getFormError(o);if(e)o.templateOptions.workspaceErrorConfig=e}if(o.wrapperTemplateName&&"function"==typeof t.getPrefetchResult)o.wrapperTemplateOptions={prefetchResult:t.getPrefetchResult(o)};return o};t.fillUrlWithGroupId=({id:e,scopeId:t,mainPageId:o,mainPageUrl:n,scope:a},r)=>{var l;if(!t||!a||"uuid"!==a)return;const s=e;if((null===(l=r.maskResolver.calculateUrlParams("uuid/:scopeId"))||void 0===l?void 0:l.scopeId)===t)return;let d=r.maskResolver.calculateState("uuid/:scopeId/page/:pageId",{scopeId:t,pageId:s},"/");if(i.query.get.backButtonId)d+=i.location.search;r.history.replaceState({state:d,href:r.url.getRealUrl(s===o?n:d)})};t.parseQueryParams=e=>{let t=e.url.location.search;const o={};return t=t.replace(/^\?/,""),t.split("&").reduce(((e,t)=>{const o=t.split("=");if(o[1])try{e[o[0]]=decodeURIComponent(o[1])}catch(t){i.logger.warn(`ÐÑибка пÑи обÑабоÑке query паÑамеÑÑа "${o[1]}"`,t),e[o[0]]=o[1]}return e}),o),o};t.preloadModules=e=>((0,d.addPageDeps)(e),Promise.all(e.map((e=>(0,a.loadAsync)(e)))));t.checkMemoryLeaks=e=>{let t=!1;if(e)if(e.addNewPage(),e.shouldReload())t=!0;return t},t.getThemeWebParamsKey=function(e){const t=`custom__${e}`,o=new RegExp("default/|default__");return t.replace(o,"")};t.loadTheme=t=>new Promise(((t,o)=>{e(["UI/theme/controller"],t,o)})).then((e=>{const o=t.split("/"),i=[e.getThemeController().setTheme(o[0])];if(o[1])i.push(e.getThemeController().getVariables(o[1]));return Promise.all(i)})).catch((function(e){requirejs.onError(e)}));t.setTheme=e=>(0,t.loadTheme)(e).then((()=>{r.default.sendCommand("setTheme",e)}));t.prepareBreadCrumbsDataInner=(e,t,o,i)=>{var a,r,s,d;let c=!1,{path:u}=e.getMetaData();if(!u)u=new l.RecordSet({keyProperty:"id",rawData:[]}),e.setMetaData({...e.getMetaData(),path:u});const g=t.parentProperty,p=o.getCount()-1||0;if(0===u.getCount()||(null===(a=u.at(0))||void 0===a?void 0:a.get("navigationHierarchy"))!==o.at(p).get("id")){const a=e.getKeyProperty(),l=e.getFormat(),f=l.getFieldIndex(a),v=-1!==f?"integer"===l.at(f).getType():!1;let m=(null===(r=u.at(0))||void 0===r?void 0:r.get(g))||null;if(u.getFormat().getCount()&&!(null===(s=u.at(0))||void 0===s?void 0:s.has("pageId")))u.addField({name:"pageId",type:"string"});if(u.getFormat().getCount()&&!(null===(d=u.at(0))||void 0===d?void 0:d.has("navigationHierarchy")))u.addField({name:"navigationHierarchy",type:"string"});o.each(((e,o)=>{const r=-1*(o+100),l=-1*(o+100+1),s=n.Model.fromObject({[a]:v?r:e.get("id"),navigationHierarchy:e.get("id"),[t.displayProperty]:e.get("title")||i,pageId:e.get("parentPageId"),[g]:o!==p?m:null},u.getAdapter());s.setKeyProperty(a),u.add(s,0),c=!0,m=v?l:e.get("parentPageId")}))}return c?e:null};t.hasQueryParam=(e,o)=>{if(-1!==o.history.getCurrentState().state.indexOf(e))return!0;return!!(0,t.parseQueryParams)(o)[e]};t.prepareBreadCrumbsData=(e,o,i)=>{var n,a,r,l,s,d,c,u,g;const p=f({loadersData:o},"navigation");if(!(0,t.hasQueryParam)("no_hierarchy",i)&&(null==p?void 0:p.children)&&!(null===(n=e.backButtonConfig)||void 0===n?void 0:n.ignoreHierarchy)&&(null===(a=e.backButtonConfig)||void 0===a?void 0:a.storeId)&&(null===(r=o.prefetch)||void 0===r?void 0:r.data)){const i=null===(l=e.backButtonConfig)||void 0===l?void 0:l.storeId,n=null===(c=null===(d=null===(s=o.prefetch)||void 0===s?void 0:s.data)||void 0===d?void 0:d[i])||void 0===c?void 0:c.prefetchResult,a=null==n?void 0:n.sourceController,r=(null==a?void 0:a.getItems())||(null==n?void 0:n.items);if(n&&r){const o=(0,t.prepareBreadCrumbsDataInner)(r,{displayProperty:n.displayProperty||(null===(u=e.backButtonConfig)||void 0===u?void 0:u.displayProperty),parentProperty:n.parentProperty||(null===(g=e.backButtonConfig)||void 0===g?void 0:g.parentProperty)},p.children,e.pageTitle);
147if(o)null==a||a.setItems(o)}}};return t.pageHasNavigation=()=>!s.constants.modules.Billing&&!i.query.get.hidenav,t.getPrefetchData=f,t}(X,{},w,Q,_,i,j,S,F,l,de,E),et=Ze,tt=Ze,ot=function(e,t,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDefaultLoaders=void 0;return t.getDefaultLoaders=e=>{const t=[i.LOADERS.userInfo,i.LOADERS.informers,i.LOADERS.permission,i.LOADERS.componentAccess,i.LOADERS.viewSettings,i.LOADERS.applicationSettings,i.LOADERS.featureFactory,i.LOADERS.helpSystem,i.LOADERS.statistics,i.LOADERS.activeTheme];let n;switch(e||o.PAGE_TYPES.main){case o.PAGE_TYPES.entityNew:case o.PAGE_TYPES.entity:n=t;break;case o.PAGE_TYPES.frame:n=t,n.unshift(i.LOADERS.navigation);break;case o.PAGE_TYPES.dialog:case o.PAGE_TYPES.form:n=t;break;case o.PAGE_TYPES.landing:n=[i.LOADERS.userInfo,i.LOADERS.permission,i.LOADERS.componentAccess,i.LOADERS.viewSettings,i.LOADERS.applicationSettings,i.LOADERS.userStatus,i.LOADERS.featureFactory];break;case o.PAGE_TYPES.popup:n=[];break;case o.PAGE_TYPES.card:case o.PAGE_TYPES.headings:case o.PAGE_TYPES.main:n=t.concat([i.LOADERS.userStatus,i.LOADERS.configuration,i.LOADERS.noticeCenter]),n.unshift(i.LOADERS.navigation)}return n},t}(0,{},ie,de),it=function(e,t,o,i,n,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBreakWithStatusResult=void 0;const r="undefined"==typeof window;return t.getBreakWithStatusResult=async function(t){var l,s,d,c,u;if(!r)return;const g=null===(l=t.loadersData)||void 0===l?void 0:l.prefetch,p=null===(d=null===(s=t.templateOptions)||void 0===s?void 0:s.prefetchConfig)||void 0===d?void 0:d.breakWithStatusCallback;if(!p)return;const f=(0,o.loadSync)(p)(i.default.getPrefetchResult(g));if(!f)return;const v="error"in f?f.error:void 0;let m="statusCode"in f?f.statusCode:void 0;if(!m)m=v?function(e){var t;if(e instanceof Error)return e.httpError||e.error_code||(null===(t=e.data)||void 0===t?void 0:t.error_code)}(v):n.HTTPStatus.InternalServerError;if(a.logger.warn(f.message,v),f.redirectUrl)return null===(u=null===(c=null===process||void 0===process?void 0:process.domain)||void 0===c?void 0:c.res)||void 0===u||u.redirect(m,f.redirectUrl),{stopRender:!0};else return new Promise(((t,o)=>{e(["SbisEnvUI/Maintains"],t,o)})).then((e=>(e.Parking.routing({status:m}),{stopRender:!0}))).catch((function(e){requirejs.onError(e)}))},t}(X,{},i,he,A,Q),nt=function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i="SabyPage/mainLayout:PageConfig",n="SabyPage/entityLayout:PageConfig",a="SabyPage/entityNewLayout:PageConfig",r="SabyPage/frameLayout:PageConfig",l="SabyPage/cardLayout:PageConfig",s="SabyPage/headingsLayout:PageConfig",d="SabyPage/landingLayout:PageConfig",c="SabyPage/base:PageConfig",u="SabyPage/formLayout:PageConfig";return t.default=function(e){let t;switch(e){case o.PAGE_TYPES.entity:t=n;break;case o.PAGE_TYPES.entityNew:t=a;break;case o.PAGE_TYPES.frame:t=r;break;case o.PAGE_TYPES.dialog:case o.PAGE_TYPES.form:t=u;break;case o.PAGE_TYPES.landing:t=d;break;case o.PAGE_TYPES.card:t=l;break;case o.PAGE_TYPES.headings:t=s;break;case o.PAGE_TYPES.custom:t=c;break;default:t=i}return t},t}(0,{},ie),at=function(e,t,o,i,n){"use strict";function a(e,t={},a){var r,l,s,d,c,u,g,p,f,v,m,h,C,y,P,b,_,S,k,A,I,E,O,w,T,R,L,N,F,D,x,M,B,j,U,H,V,G,$,K,Y,q,W,z,Q,X,J;const Z=(null==a?void 0:a.contentConfig)||{},ee=[...e.preloadModules||[],...t.preloadModules||[],...Z.preloadModules||[],...a.preloadModules||[]],te=(null===(r=t.footerConfig)||void 0===r?void 0:r.templateName)||(null===(s=null===(l=t.sidebarSettings)||void 0===l?void 0:l.footerConfig)||void 0===s?void 0:s.templateName)||(null===(d=Z.footerConfig)||void 0===d?void 0:d.templateName)||(null===(c=a.footerConfig)||void 0===c?void 0:c.templateName);if(Z.filterConfig){if(Z.filterConfig.filterTemplateName)ee.push(Z.filterConfig.filterTemplateName);if(Z.filterConfig.searchTemplateName)if(ee.push(Z.filterConfig.searchTemplateName),!(null===(u=Z.filterConfig.searchTemplateOptions)||void 0===u?void 0:u.storeId))ee.push("SabyPage/contentLayoutSearch:SearchController");if(Z.filterConfig.sortingTemplateName)ee.push(Z.filterConfig.sortingTemplateName)}if(null===(g=Z.beforeTabsConfig)||void 0===g?void 0:g.templateName)ee.push(Z.beforeTabsConfig.templateName);if(null===(p=Z.subTitleConfig)||void 0===p?void 0:p.templateName)ee.push(Z.subTitleConfig.templateName);if(Z.getHeadingCallback)ee.push(Z.getHeadingCallback);else if(e.getHeadingCallback)ee.push(e.getHeadingCallback);if(Z.formMethodConfig){if(ee.push("Controls/validate"),Z.formMethodConfig.getReadOnlyCallback)ee.push(Z.formMethodConfig.getReadOnlyCallback);if(Z.formMethodConfig.afterReadCallback)ee.push(Z.formMethodConfig.afterReadCallback);if(Z.formMethodConfig.defaultStateCallback)ee.push(Z.formMethodConfig.defaultStateCallback);if(Z.formMethodConfig.isErrorCallback)ee.push(Z.formMethodConfig.isErrorCallback);if(Z.formMethodConfig.afterSaveErrorCallback)ee.push(Z.formMethodConfig.afterSaveErrorCallback);if(Z.formMethodConfig.savePanelTemplateName)ee.push(Z.formMethodConfig.savePanelTemplateName)}if(null===(f=Z.workspaceConfig)||void 0===f?void 0:f.templateName)ee.push(Z.workspaceConfig.templateName);if(Z.wrapperTemplateName)ee.push(Z.wrapperTemplateName);if(null===(v=Z.emptyViewConfig)||void 0===v?void 0:v.isEmptyCallback)ee.push(Z.emptyViewConfig.isEmptyCallback);if(null===(m=Z.emptyViewConfig)||void 0===m?void 0:m.emptyTemplateOptionsGetter)ee.push(Z.emptyViewConfig.emptyTemplateOptionsGetter);if(null===(h=Z.redirectConfig)||void 0===h?void 0:h.isRedirectCallback)ee.push(Z.redirectConfig.isRedirectCallback);if(null===(y=null===(C=Z.redirectConfig)||void 0===C?void 0:C.emptyViewConfig)||void 0===y?void 0:y.emptyTemplateOptionsGetter)ee.push(null===(P=Z.redirectConfig)||void 0===P?void 0:P.emptyViewConfig.emptyTemplateOptionsGetter);if(null===(b=Z.topTemplateConfig)||void 0===b?void 0:b.templateName)ee.push(Z.topTemplateConfig.templateName);if(null===(_=Z.topLeftTemplateConfig)||void 0===_?void 0:_.templateName)ee.push(Z.topLeftTemplateConfig.templateName);if(null===(S=Z.topRightTemplateConfig)||void 0===S?void 0:S.templateName)ee.push(Z.topRightTemplateConfig.templateName);if(null===(k=Z.beforeLogoTemplateConfig)||void 0===k?void 0:k.templateName)ee.push(Z.beforeLogoTemplateConfig.templateName);if(null===(A=Z.masterConfig)||void 0===A?void 0:A.bottomTemplateName)ee.push(Z.masterConfig.bottomTemplateName);if(null===(I=Z.masterConfig)||void 0===I?void 0:I.masterExpandProperty)ee.push("Controls-ListEnv/masterActions:ToggleMaster");if(Z.toolbarConfig)ee.push(...(0,n.getToolbarPreloadModules)(Z.toolbarConfig));if(Z.getPageSizeCallback)ee.push(Z.getPageSizeCallback);if(null===(E=Z.configurationConfig)||void 0===E?void 0:E.getVisibilityCallback)ee.push(null===(O=Z.configurationConfig)||void 0===O?void 0:O.getVisibilityCallback);if(Z.langDictionary)ee.push(Z.langDictionary);if(Z.addButtonConfig){if(ee.push("SabyPage/widgets/AddButton"),ee.push("ExtControls/dropdown"),Z.addButtonConfig.activateHandler)ee.push(Z.addButtonConfig.activateHandler);if(Z.addButtonConfig.selectCompleteHandler)ee.push(Z.addButtonConfig.selectCompleteHandler);if(Z.addButtonConfig.getReadOnlyCallback)ee.push(Z.addButtonConfig.getReadOnlyCallback);if(Z.addButtonConfig.getVisibilityCallback)ee.push(Z.addButtonConfig.getVisibilityCallback);if(Z.addButtonConfig.rightTemplateActivateHandler)ee.push(Z.addButtonConfig.rightTemplateActivateHandler);if(Z.addButtonConfig.menuConfigGetter)ee.push(Z.addButtonConfig.menuConfigGetter)}if(null===(w=Z.backButtonConfig)||void 0===w?void 0:w.showArrowHandler)ee.push(Z.backButtonConfig.showArrowHandler);if(null===(T=Z.backButtonConfig)||void 0===T?void 0:T.getVisibilityCallback)ee.push(Z.backButtonConfig.getVisibilityCallback);if(null===(R=Z.backButtonConfig)||void 0===R?void 0:R.pathButtonConfigGetter)ee.push(Z.backButtonConfig.pathButtonConfigGetter);if(null===(L=Z.backButtonConfig)||void 0===L?void 0:L.afterBackButtonTemplate)ee.push(Z.backButtonConfig.afterBackButtonTemplate);
147if(null===(N=Z.metaConfig)||void 0===N?void 0:N.canonicalGetter)ee.push(Z.metaConfig.canonicalGetter);if(null===(F=Z.metaConfig)||void 0===F?void 0:F.getMetaCallback)ee.push(Z.metaConfig.getMetaCallback);if(null===(D=Z.prefetchConfig)||void 0===D?void 0:D.isErrorCallback)ee.push(null===(x=Z.prefetchConfig)||void 0===x?void 0:x.isErrorCallback);if(null===(M=Z.prefetchConfig)||void 0===M?void 0:M.breakWithStatusCallback)ee.push(null===(B=Z.prefetchConfig)||void 0===B?void 0:B.breakWithStatusCallback);if(null===(j=Z.prefetchConfig)||void 0===j?void 0:j.configLoader)ee.push(null===(U=Z.prefetchConfig)||void 0===U?void 0:U.configLoader);if(null===(H=Z.prefetchConfig)||void 0===H?void 0:H.getSlicesConfig)ee.push(Z.prefetchConfig.getSlicesConfig);if((null===(V=Z.prefetchConfig)||void 0===V?void 0:V.demoConfigLoader)&&(0,i.default)())ee.push(null===(G=Z.prefetchConfig)||void 0===G?void 0:G.demoConfigLoader);if(null===($=Z.bannerConfig)||void 0===$?void 0:$.templateName)ee.push(null===(K=Z.bannerConfig)||void 0===K?void 0:K.templateName);if(te)ee.push("SabyPage/widgets/FooterTemplate"),ee.push(te);if((null===(Y=e.templateOptions)||void 0===Y?void 0:Y.userStatusConfig)&&null!==(null===(q=t.templateOptions)||void 0===q?void 0:q.userStatusConfig))ee.push("EngineUser/UserStatus");if(Z.siteIdResolver)ee.push(Z.siteIdResolver);if(Z.layout)ee.push(Z.layout);if(t.pageConfigLoader)ee.push(t.pageConfigLoader);if(t.applicationConfigLoader)ee.push(t.applicationConfigLoader);if(t.getPageToRedirect)ee.push(t.getPageToRedirect);if("string"==typeof(null===(W=t.contentConfig)||void 0===W?void 0:W.contextConfig))ee.push(t.contentConfig.contextConfig);if("string"==typeof t.contextConfigArguments)ee.push(t.contextConfigArguments);if(null===(z=null==a?void 0:a.footerConfig)||void 0===z?void 0:z.additionalTemplateName)ee.push(null===(Q=null==a?void 0:a.footerConfig)||void 0===Q?void 0:Q.additionalTemplateName);if(!1!==(null===(X=null==a?void 0:a.sidebarSettings)||void 0===X?void 0:X.visible)&&(null==a?void 0:a.type)!==o.PAGE_TYPES.entity&&(null==a?void 0:a.type)!==o.PAGE_TYPES.entityNew&&(null==a?void 0:a.type)!==o.PAGE_TYPES.custom)ee.push("NavigationPanels/sidebars:Sidebar");if(null===(J=null==a?void 0:a.rightSideConfig)||void 0===J?void 0:J.templateName)ee.push(a.rightSideConfig.templateName);return ee}return Object.defineProperty(t,"__esModule",{value:!0}),t.getContentPreloadModules=t.getPreloadModules=void 0,t.getPreloadModules=function(e,t={},o,i,n){const r=[i,...e.templateName?[e.templateName]:[]];if(null==n?void 0:n.templateContentName)r.push(n.templateContentName);return r.push(...a(e,t,o)),r},t.getContentPreloadModules=a,t}(0,{},ie,Ee,Ae),rt=function(e,t,o,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.patchPageConfig=void 0;const a="Dashboard/new/isErrorCallback:isErrorCallback";t.patchPageConfig=e=>{let t={...e};if([o.PAGE_TYPES.dashboard,o.PAGE_TYPES.sabyEntity,o.PAGE_TYPES.frame,o.PAGE_TYPES.entityNew].includes(e.type))switch(e.type){case o.PAGE_TYPES.dashboard:t=l(t),t.typeBeforePatch=t.type,t.type=o.PAGE_TYPES.main;break;case o.PAGE_TYPES.sabyEntity:t=r(t),t.typeBeforePatch=t.type,t.type=o.PAGE_TYPES.main;break;case o.PAGE_TYPES.entityNew:t=r(t);case o.PAGE_TYPES.frame:t.sidebarSettings={...t.sidebarSettings,visible:!1};default:t.typeBeforePatch=t.type}return t};const r=e=>{var t,o,i;return e.sidebarSettings={...e.sidebarSettings,visible:!1},e.contentConfig=null!==(t=e.contentConfig)&&void 0!==t?t:{},e.contentConfig.noticeCenterConfig=null!==(null===(o=e.contentConfig)||void 0===o?void 0:o.noticeCenterConfig)?{...null===(i=e.contentConfig)||void 0===i?void 0:i.noticeCenterConfig,visibilityMode:"panel"}:null,e},l=e=>{var t,o,a,r,l,c,u,g,p,f,v,m,h,C,y,P,b,_,S,k,A,I,E,O,w,T,R;const L=null===(o=null===(t=e.contentConfig)||void 0===t?void 0:t.dashboardConfig)||void 0===o?void 0:o.editDashboardRights,N=null===(r=null===(a=e.contentConfig)||void 0===a?void 0:a.dashboardConfig)||void 0===r?void 0:r.allowEditDashboard,F=null===(c=null===(l=e.contentConfig)||void 0===l?void 0:l.dashboardConfig)||void 0===c?void 0:c.useFilterConfig,D=!!(null===(g=null===(u=e.contentConfig)||void 0===u?void 0:u.filterConfig)||void 0===g?void 0:g.searchTemplateName),x=(null==L?void 0:L.length)?L:["Dashboards"],M=null===(p=e.contentConfig)||void 0===p?void 0:p.dashboards,B=e.noticeFrame,j=[{id:"edit",icon:"FONT:Dashboard-icons/designtime:icon-DashboardEditor",activateHandler:"Dashboard/new/dashboardEditorOpener:startEditFromToolbar",activateHandlerArguments:{constructorId:null===(v=null===(f=e.contentConfig)||void 0===f?void 0:f.dashboardConfig)||void 0===v?void 0:v.constructorId,dashboardIds:M,noticeFrame:B,useFilterConfig:!1!==F,allowEditDashboard:N,hasPageSearchConfig:D,pageRights:x},rights:x,requiredLevel:"Modify",visibilityMode:"desktop",tooltip:i("ÐаÑÑÑоиÑÑ ÑÑÑаниÑÑ"),className:"sitesEditor-hideWidgetsTarget",emptyViewVisibility:!0,getVisibilityCallback:"Dashboard/Page:visibilityCallback"}];if(e.contentConfig={allowAdaptive:!0,blockLayout:!0,...e.contentConfig,hideTabs:!0===(null===(m=e.contentConfig)||void 0===m?void 0:m.hideTabs)||"empty",contrastBackgroun
147d:!0,workspaceConfig:{templateName:(null===(h=e.contentConfig.workspaceConfig)||void 0===h?void 0:h.templateName)||"Dashboard/Page",templateOptions:{groups:null===(y=null===(C=e.contentConfig)||void 0===C?void 0:C.dashboardConfig)||void 0===y?void 0:y.groups,...(null===(P=e.contentConfig.workspaceConfig)||void 0===P?void 0:P.templateOptions)||{}},masterOptions:null===(b=e.contentConfig.workspaceConfig)||void 0===b?void 0:b.masterOptions},prefetchConfig:d(e),toolbarConfig:{_serviceItems:j,items:null===(S=null===(_=e.contentConfig)||void 0===_?void 0:_.toolbarConfig)||void 0===S?void 0:S.items,actions:null===(A=null===(k=e.contentConfig)||void 0===k?void 0:k.toolbarConfig)||void 0===A?void 0:A.actions,allowCopyPageUrl:null===(E=null===(I=e.contentConfig)||void 0===I?void 0:I.toolbarConfig)||void 0===E?void 0:E.allowCopyPageUrl},emptyViewConfig:{emptyTemplateOptionsGetter:"Dashboard/new/emptyViewCallbacks:getEmptyTemplateOptions",emptyTemplateOptionsGetterArguments:{constructorId:null===(w=null===(O=e.contentConfig)||void 0===O?void 0:O.dashboardConfig)||void 0===w?void 0:w.constructorId,dashboardIds:M,noticeFrame:B,editDashboardRights:L,allowEditDashboard:N,hasPageSearchConfig:D},isEmptyCallback:"Dashboard/new/emptyViewCallbacks:checkViewEmpty",...e.contentConfig.emptyViewConfig||{}},isDashboard:!0,preloadModules:s(e)},!D&&n.constants.modules.GeneralSearch)e.contentConfig.filterConfig={...e.contentConfig.filterConfig,searchTemplateName:"GeneralSearch/searchTemplate:Template",searchEmptyViewVisible:!0,searchTemplateOptions:{storeId:"dashboardData"}};if(!1!==F)e.contentConfig.filterConfig={...e.contentConfig.filterConfig,filterTemplateName:"Controls-ListEnv/filterConnected:View",filterPosition:"right",filterTemplateOptions:{...null===(T=e.contentConfig.filterConfig)||void 0===T?void 0:T.filterTemplateOptions,storeId:"dashboardData"},searchPosition:"left"},e.contentConfig.beforeTabsConfig={templateName:"Dashboard/filter:LeftFilter",templateOptions:{...null===(R=e.contentConfig.filterConfig)||void 0===R?void 0:R.filterTemplateOptions,storeId:"dashboardData",contentConfig:{...e.contentConfig.beforeTabsConfig}},emptyViewVisibility:!1};return e},s=e=>{var t,o,i;const n=[...(null===(t=e.contentConfig)||void 0===t?void 0:t.preloadModules)||[],a,"Dashboard/new/dashboard"];if(null===(i=null===(o=e.contentConfig)||void 0===o?void 0:o.prefetchConfig)||void 0===i?void 0:i.isErrorCallback)n.push(e.contentConfig.prefetchConfig.isErrorCallback);return n},d=e=>{var t,o,i,n,r,l,s,d,c;const u=e.rights?Object.keys(e.rights):[];e.rights=u;const g=(null===(t=e.contentConfig)||void 0===t?void 0:t.dashboardConfig)||{},p=null===(o=e.contentConfig)||void 0===o?void 0:o.dashboards,f=e.noticeFrame,v=[a];if(null===(n=null===(i=e.contentConfig)||void 0===i?void 0:i.prefetchConfig)||void 0===n?void 0:n.isErrorCallback)v.push(e.contentConfig.prefetchConfig.isErrorCallback);const m=[...(null===(l=null===(r=e.contentConfig)||void 0===r?void 0:r.prefetchConfig)||void 0===l?void 0:l.dependencies)||[],"permission","viewSettings","userInfo","dashboards"];return{...null===(s=e.contentConfig)||void 0===s?void 0:s.prefetchConfig,dependencies:m,isErrorCallback:"Page/loaders:isErrorCallback",isErrorCallbackOptions:{isErrorCallbackList:v},_dashboardFactory:{dataFactoryName:"Dashboard/Factory",dataFactoryArguments:{...g,dashboardIds:p,noticeFrame:f,viewMode:null==g?void 0:g.defaultMode,historyIds:null===(c=null===(d=e.contentConfig)||void 0===d?void 0:d.filterConfig)||void 0===c?void 0:c.historyIds,pageRights:u},dependentArea:["workspace","filter","search","beforeTabs"],afterLoadCallback:"Dashboard/new/loader:afterLoadDashboardCallback"}}};return t}(0,{},ie,o,F),lt=function(e,t,o,i,n,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initExtensions=void 0;return t.initExtensions=async(e,t,r)=>{const[l,s]=function(e){const t=[],o=[];for(const i of e)if(void 0===i.priority||null===i.priority)t.push(i);else o.push(i);return[t,o.sort(((e,t)=>t.priority-e.priority))]}(e),d=({moduleName:e,initConfig:l})=>(0,o.loadAsync)(e).then((o=>((e,t,o,i,r)=>{var l;if(t===a.EXTENSIONS.helpSystem.moduleName)return e.init(null===(l=(0,n.getPrefetchData)(i,"helpSystemFactory"))||void 0===l?void 0:l.result,r);else return e.init({pageId:i.id,adaptiveMode:i.adaptiveMode,...o},r)})(o,e,l,t,r))).catch((t=>{i.logger.error(`ÐÑибка пÑи иниÑиализаÑии extension ${e}: ${t}`)}));l.forEach((e=>{d(e)}));for(const e of s)await d(e)},t}(0,{},i,Q,Ze,de),st=function(e,t,o,i,n,a,r,l,s){"use strict";
147Object.defineProperty(t,"__esModule",{value:!0}),t.PageContent=void 0;const d=function(e){const t=i.useMemo((()=>(0,l.lazy)((()=>(0,l.importer)(e.config.templateName)))),[e.config.templateName]),[n,a]=i.useState((()=>!e.config.visibilityCallback));return i.useEffect((()=>{if(e.config.visibilityCallback)(0,s.loadAsync)(e.config.visibilityCallback).then((e=>{Promise.resolve(null==e?void 0:e()).then((e=>{a(!!e)}))}))}),[e.config.visibilityCallback]),n?(0,o.jsx)(t,{...e.config.templateOptions,isAdaptive:e.isAdaptive}):null};return t.PageContent=function(e){const{controllers:t,demoBannerConfig:l,isAdaptive:s,isConstructorPage:c,children:u,contextData:g}=e,p=(0,r.getBuildingContext)(),f=(0,o.jsxs)(p.Provider,{value:t,children:[(0,o.jsx)(a.HotKeysHandler,{children:g?i.cloneElement(u,{contextData:g}):u}),(null==l?void 0:l.templateName)?(0,o.jsx)(d,{config:l,isAdaptive:s}):(0,o.jsx)("span",{className:"tw-hidden-important"})]});return c?(0,o.jsx)(n.Provider,{dataLayoutId:"FrameRoot",children:f}):f},t}(0,{},e,t,G,Ke,te,v,i),dt=function(e,t,o,i,n,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NavigationControllerClass=t.PAGE_PREFIX=void 0,t.PAGE_PREFIX="page";return t.NavigationControllerClass=class{constructor({buildingContext:e,scope:o,mainPageId:i,Router:n}={}){this.SABY_PAGE_PREFIX=t.PAGE_PREFIX,this.PAGE_PREFIX=t.PAGE_PREFIX,this._buildingContext=e,this._scope=o||"group",this._Router=n,this._mainPageId=i}async navigate(i,a,r,l){const s=this._Router||l||(0,o.getRootRouter)(!0);let d,c,u=i&&"string"!=typeof i?i:{pageId:i};if("uuid"!==this._scope)u={...u},delete u.scopeId;let g=!1,p=!1;if(u.routeMask){p=!!u.pushState;const e=this.getNavigateState(u,a,s);c=e.state,d=e.href}else c=this.getHrefByPageId(u,a,s),d=s.url.getRealUrl(c),g=u.pageId===s.maskResolver.calculateUrlParams(t.PAGE_PREFIX+"/:pageId",this.getPageHref(s.url)).pageId;if(!r)if(!u.redirect){if(g)c=this.getHrefByPageId(u,{...a,usePending:!0},s);if(!p){if(u.forceReload)await new Promise(((t,o)=>{e(["Page/loaders"],t,o)})).then((({NavigationLoader:e})=>{e.forceReload()}));s.navigate({state:c,href:d},(()=>{if(g)n.default.sendCommand("reloadPage");return!0}))}else s.navigatePushState({state:c,href:d})}else window.location.href=d;else setTimeout((()=>{window.open(d,"_blank")}),0)}getNavigateState(e,t=void 0,o){const i=this.getStateByPageId(e,t,o,e.routeMask);let n;if(e.hrefMask)n=this.getStateByPageId(e,t,o,e.hrefMask),n=o.urlRewriter.getReverse(n);else n=o.urlRewriter.getReverse(i);return{state:i,href:o.url.getServiceUrl(n)}}getHrefByPageId(e,n={},a,r){const l=e&&"string"!=typeof e?e:{pageId:e},s=a||this._Router||(0,o.getRootRouter)(!0),d=l.service||(0,i.getConfig)("appRoot");let c=this.getStateByPageId({...l,service:d},n,s,l.hrefMask);const u=()=>c.indexOf("/"+t.PAGE_PREFIX+"/");let g=u();const p=c.indexOf(`/${this._scope}/`);if(-1===p&&-1===g){const e=c.indexOf("?");c="/"+(-1!==e?c.substring(e):"")}else c=c.substring(-1!==p&&p<g?p:g);if(g=u(),r)c=-1===g?"/":c.substring(g);return this._prepareUrl(c,l)}getStateByPageId(e,t={},o,i){const n={...t,replace:!0};let r={};if(n.backButtonId&&!1!==e.saveQuery)if(r=(0,a.parseQueryParams)(o),Object.keys(r).length)r.saveQuery=!0;r={...r,...n,saveAcc:e.saveAcc||n.saveAcc};const l=this._getUrl(e.pageId,e.scopeId,e.service,o.maskResolver,{params:e.pageParams,paramsObj:e.pageParamsObj,replace:e.replaceUrl},i);return o.maskResolver.calculateQueryHref({clearFragment:!0,...r},l)}getPageHref(e){var n;const a=(null===(n=this._Router)||void 0===n?void 0:n.url)||e||(0,o.getRootRouter)(!0).url,r=(0,i.getConfig)("appRoot");let l="";if(r&&"/"!==r){const e=function(e,t){const o=t.replace(/\//g,""),i=e.replace(/^\//,"").split("/");if(i[0]===o)i.splice(0,1);return"/"+i.join("/")}(a.getUrl(),r);l=this._Router.urlRewriter.get(e)}else l=a.getStateUrl();const s=l.substring(l.indexOf("/"+t.PAGE_PREFIX+"/"));return a.getServiceUrl(s)}getPageId(e){const t=e||this._Router||(0,o.getRootRouter)(!0);return this.getPageIdByUrl(t.url.getStateUrl(),this._mainPageId,t)}getPageIdByUrl(e,i,n){const a=(this._Router||n||(0,o.getRootRouter)(!0)).maskResolver.calculateUrlParams(t.PAGE_PREFIX+"/:pageId",e).pageId;return i&&!a?i:a}_getUrl(e,t,o,i,n,a){var r,l,s;const d=!!i.calculateUrlParams("tab/:tabId/").tabId,c=a||this._getMask(),u=i.calculateUrlParams(c),g=t||u.scopeId,p=u.pageId,f=null===(r=null==n?void 0:n.params)||void 0===r?void 0:r.map(((e,t)=>`:${t}`)).join("/");let v=c;if(f){const[e,t]=v.split("?");v=e,v+="/"!==v.slice(-1)?"/":"",v+=f,v+=t?"?"+t:""}const m=e&&p&&e!==p;return i.calculateHref(v,{pageId:e,scopeId:g,...n.paramsObj,...n.params,replace:!!(null!==(s=null!==(l=null==n?void 0:n.replace)&&void 0!==l?l:null==n?void 0:n.params)&&void 0!==s?s:m)},d?"/":"")}_prepareUrl(e,t){const{addPagePrefix:o=!0}=t;let n=e;if(t.host){const e=t.host.replace(/\/$/,"");n=i.location.protocol+"//"+e+n}if(!o)n=n.replace(`/${this.PAGE_PREFIX}`,"");return n}_getMask(){return"uuid"===this._scope?`${this._scope}/:scopeId/page/:pageId/`:"page/:pageId/"}},t}(X,{},O,Q,j,Ze),ct=dt,ut=function(e,t,o,i,n,a,r,l,s,d,c,u,g,p,f,v){"use strict";async function m(e,t,o,n){return(await(0,i.loadAsync)(e))({routeMask:t},o,n).catch((e=>({error:e})))}function h(e,t){return t?!!t.find((t=>t.key===e)):!0}
147Object.defineProperty(t,"__esModule",{value:!0}),t.loadPageConfig=t.loadApplicationConfigStandart=t.loadPageConfigStandart=void 0;const C=r.constants.isServerSide?5e3:1e4,y=r.constants.isServerSide?1500:5e3,P="value",b="pageData",_=async(e,t,o)=>{const i=await async function(e,t){const o=(0,u.getAdaptiveModeForLoaders)(),{siteId:i,pageId:n,routeMask:a,siteIdResolver:r}=e.contentConfig;if(r){const e={siteId:i,pageId:n};if(a)e.pageUrl=t.maskResolver.calculateUrlParams(a).pageUrl;return{...e,...await m(r,a,t,o)}}if(!i&&a){const e=t.maskResolver.calculateUrlParams(a);return{siteId:e.siteId,pageId:e.pageId,pageUrl:e.pageUrl}}return{siteId:i,pageId:n}}(e,t),n=(null==i?void 0:i.pageId)||i.siteId;let a;if(!i.error)a=await S(n,[],t,{},o);return(0,c.merge)({},e,a,{contentConfig:{siteIdResolverResult:i},originalPageId:e.id})},S=async(e,t,o,l,s)=>{var d,u;const m=((e,t)=>`${e||""}:${[...t].sort().join(",")}`)(e,t);let h;if(null===r.constants||void 0===r.constants?void 0:r.constants.isBrowserPlatform)h=(0,v.getPageConfigCacheValue)(b,m),h=h?(0,c.clone)(h):void 0;if(!h){const o=await(await(0,g.getSource)("Site")).call("GetPage",{Params:f.Record.fromObject({Page:e||null,DataSources:t},"adapter.sbis")});h=(0,p.factory)(o.getRow()).toObject(),(0,v.setPageConfigCacheValue)(b,m,h)}if(null===(d=h.contentConfig)||void 0===d?void 0:d.changePageIdHandler){let t;try{t=await(0,i.loadAsync)(h.contentConfig.changePageIdHandler)}catch(t){const o=t instanceof Error?t.message:String(t);return a.Logger.error("Ðе ÑдалоÑÑ Ð·Ð°Ð³ÑÑзиÑÑ Ð¾Ð±ÑабоÑÑик ÑказаннÑй в поле changePageIdHandler, Ð´Ð»Ñ ÑÑÑаниÑÑ "+e+": "+o),h}try{const i=t(e,o,s),a=await(0,n.wrapTimeoutCallback)((()=>i),y);if(!a)return{...h,...l};const r="object"==typeof a;if(r&&"stopRender"in a&&!0===a.stopRender)return{...h,...l,stopRender:!0};let d,c,u,g;if(r){const e=a;if(g=e.id,u=!1!==e.changeUrl,e.query)if(d=e.query,d.backButtonId&&!("no_hierarchy"in d))d.no_hierarchy=1;if(e.path&&Array.isArray(e.path))c=e.path}else g=a,u=!0;if(g!==h.id)return S(g,[],o,{changedQuery:d,changedPath:c,pageIdChanged:u},s);else return{...h,changedQuery:d,changedPath:c,pageIdChanged:u}}catch(t){const o=t instanceof Error?t.message:String(t);return a.Logger.error("ÐÑибка пÑи вÑполнении обÑабоÑÑика changePageIdHandler Ð´Ð»Ñ ÑÑÑаниÑÑ "+e+": "+o),h}}if("frame"===h.type&&(null===(u=h.contentConfig)||void 0===u?void 0:u.loadFramePagex))return _({...h,...l},o,s);else return{...h,...l}};t.loadPageConfigStandart=(e,t,o,c,u,g,p,f)=>{var v;if(f&&!l.query.get.mockBLMethods)!function(e,t={},o,n,a){const{loaders:r,activeThemeSelector:l}=t,s={userInfo:{dataFactoryName:"EngineUser/Info:Factory",allowed:h("userInfo",r)},permission:{dataFactoryName:"Page/loaders:Permission",allowed:h("permission",r)},applicationSettings:{dataFactoryName:"Page/loaders:ApplicationSettingsFactory",dataFactoryArguments:{additionalData:{applicationId:null==o?void 0:o.applicationId,scopeId:null==o?void 0:o.scopeId,isPreload:!0},_buildingContext:a,callBlMethod:h("applicationSettings",r)},afterLoadCallback:"Page/loaders:ApplicationSettingsLoadCallback",allowed:!0},activeTheme:{dataFactoryName:"Page/loaders:ActiveTheme",dependencies:["applicationSettings"],dataFactoryArguments:{selector:l},allowed:h("activeTheme",r)},feature:{dataFactoryName:"FeatureAccess/feature:Factory",allowed:h("featureFactory",r)},isGuest:{dataFactoryName:"EngineUser/Info:IsGuest",allowed:h("userInfo",r)},viewSettingsData:{dataFactoryName:"ViewSettings/Loader:DataFactory",dataFactoryArguments:{pageId:e,applicationId:null==o?void 0:o.applicationId,mainPageId:null==o?void 0:o.mainPage,isPreload:!0},dependencies:["isGuest"],allowed:h("viewSettings",r)}},d={root:{configGetter:"Page/loaders:RootDataConfigGetter",configGetterArguments:{factories:Object.fromEntries(Object.entries(s).filter((([e,t])=>t.allowed)))},children:{prefetch:{}}}};(0,i.loadAsync)("Controls-DataEnv/dataLoader").then((({DataContextLoader:e})=>new e({configs:d,router:n}).load()))}(e,g,u,c,p);const m=[];if(null===(v=null==g?void 0:g.additionalFactories)||void 0===v?void 0:v.hotkeys)m.push("HotKeys");return(0,n.wrapTimeoutCallback)((()=>S(e,m,c,{},u)),o||C).then((e=>{var t;if(r.constants.isServerSide&&e.authRedirect){e.access=!1,process.domain.res.set("x-tosso",1);const t=new Error("ÐавеÑÑение поÑÑÑÐ¾ÐµÐ½Ð¸Ñ ÑÑÑаниÑÑ Ñ ÐºÐ¾Ð´Ð¾Ð¼ 401");
147a.Logger.info(t.stack),s.Parking.routing({status:d.HTTPStatus.Unauthorized}),e.stopRender=!0}if(r.constants.isServerSide&&(null===(t=null==e?void 0:e.contentConfig)||void 0===t?void 0:t.availableInIFrame))process.domain.res.set("X-Frame-Options","none");return e})).catch((e=>(e.message=`ÐÑибка пÑи вÑполнении меÑода Site.GetPage: ${e.message}`,a.Logger.info(e.message),Promise.reject(e))))};t.loadApplicationConfigStandart=async(e,t,o,r,l,s)=>{let d;if(!r){const n=(await(0,i.loadAsync)("SbisUI/appConfigInfo")).getConfigurationInfo({pageId:s||null,scopeId:e||null,applicationId:t||null});d=Promise.all([n]).then((([t])=>{var i,n,a,r,l;if(!t.scopeId&&t.scope&&"uuid"===t.scope&&o)t.scopeId=null===(i=o.maskResolver.calculateUrlParams("uuid/:scopeId"))||void 0===i?void 0:i.scopeId;return{logoDesc:t.name,applicationTitle:t.title,scopeId:t.scopeId||e,allowChangeConfiguration:t.hasSwitch,showAppSelector:t.showAppSelector,showSchemeSelector:t.showSchemeSelector,profilePageId:null===(n=t.appSettings)||void 0===n?void 0:n.profilePageId,scope:t.scope,mainPage:t.mainPage,templateName:t.templateName,applicationId:t.applicationId,applicationUrl:t.applicationUrl,configurationId:t.configurationId,nameClickHandler:null===(a=t.appSettings)||void 0===a?void 0:a.nameClickHandler,firstEntry:t.firstEntry,redirectUrl:t.redirectUrl,footerConfig:t.footerConfig,checkShortCut:null===(r=t.appSettings)||void 0===r?void 0:r.checkShortCut,applicationContextId:null===(l=t.appSettings)||void 0===l?void 0:l.contextId,appSett
147ings:t.appSettings,nomenclature:t.nomenclature,sidebarSettings:t.interfaceSettings,quickAddSource:t.quickAddSource,quickAddSettings:t.quickAddSettings}}))}else d=Promise.resolve({});return(0,n.wrapTimeoutCallback)((()=>d),C).catch((e=>(a.Logger.info(`ÐÑибка пÑи вÑполнении меÑода NavConfiguration.GetCurrentInfo: ${e.message}. СÑÑаниÑа: ${null==o?void 0:o.url.getUrl()}`),e.message=`ÐÑибка пÑи ÑÑении конÑигÑÑаÑии пÑиложениÑ. ${e.message}`,Promise.reject(e))))};return t.loadPageConfig=function(e,t,n,a,r,s=!1,d,c,u,g,p,f,m,h){let C,y=e;const b=(({applicationConfigLoader:e,scopeId:t,applicationId:o,Router:n,isLoadedPageConfig:a,buildingContext:r,pageId:l})=>{let s;if(e)if((0,i.isLoaded)(e)){s=(0,i.loadSync)(e)(t,o,n,a,r,l)}else s=(0,i.loadAsync)(e).then((e=>e(t,o,n,a,r,l)));else s={};return s})({applicationConfigLoader:d,applicationId:c,Router:f,isLoadedPageConfig:p,buildingContext:m,scopeId:t,pageId:e});if(u)C=(0,i.loadAsync)(u);return Promise.all([b,C]).then((([t,o])=>((e,t,o,i,n)=>{var a;let r,s=Promise.resolve();if((null===(a=t.redirectUrl)||void 0===a?void 0:a.value)&&!n&&!l.query.get.isSnapshot)switch(t.redirectUrl.type){case"spa":s=Promise.resolve(t.redirectUrl.value);break;case"app":const e=t.redirectUrl.value+`${i.url.location.pathname}${i.url.location.search}${i.url.location.hash}`;l.location.replace(e),r=!0;break;case"url":l.location.replace(t.redirectUrl.value),r=!0}else if(e)s=Promise.resolve(e(t,o));return s.then((e=>{if(e)t.pageIdToRedirect=e;return t.appRedirect=r,t}))})(o,t,y,f,s).then((o=>{const l=(null==h?void 0:h.mainPageId)||o.mainPage;if(o.pageIdToRedirect)y=t.pageIdToRedirect;else if(!e&&l)y=l;const s=(null==o?void 0:o.appRedirect)?Promise.resolve({}):(({currentPageId:e,pageConfigLoader:t,pageConfigLoaderArguments:o,pageConfigLoaderTimeout:n,Router:a,applicationConfig:r,customPageConfig:l,buildingContext:s,needPreloadData:d})=>{let c;if(t){const u=(0,v.getPageConfigCacheValue)(P,e);if(u)c=u;else if((0,i.isLoaded)(t)){c=(0,i.loadSync)(t)(e,o,n,a,r,l,s,d)}else c=(0,i.loadAsync)(t).then((t=>t(e,o,n,a,r,l,s,d)))}else c=Promise.resolve({});return Promise.resolve(c)})({currentPageId:y,pageConfigLoader:n,pageConfigLoaderArguments:a,pageConfigLoaderTimeout:r,Router:f,applicationConfig:o,customPageConfig:g,buildingContext:m,needPreloadData:!p});return s.then((e=>({applicationConfig:o,pageConfig:e})))})))).then((({applicationConfig:e,pageConfig:t})=>{var i;const n=(0,o.patchPageConfig)(t),a=!(y!==n.id||(null===(i=n.contentConfig)||void 0===i?void 0:i.changePageIdHandler)||m&&"default"!==m);if(a)(0,v.setPageConfigCacheValue)(P,y,n);return{...e,...n,allowSaveConfig:a}}))},t}(0,{},rt,i,x,d,F,Q,I,q,P,m,Le,k,_,fe),gt=ut,pt=function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i extends o.NavigationControllerClass{setController(e){this._controller=e}getController(){if(!this._controller)this.setController(new o.NavigationControllerClass({buildingContext:"default"}));return this._controller}navigate(e,t,o,i){this.getController().navigate(e,t,o,i)}getPageId(e){return this.getController().getPageId(e)}getPageHref(e){return this.getController().getPageHref(e)}getPageIdByUrl(e,t,o){return this.getController().getPageIdByUrl(e,t,o)}getHrefByPageId(e,t,o,i){return this.getController().getHrefByPageId(e,t,o,i)}}return t.default=new i({}),t}(0,{},dt),ft=pt,vt=function(e,t,o,i,n,a,r,l,s,d,c,u,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLoaders=void 0;const p=(e,t)=>({dataFactoryName:"Page/loaders:LoaderCompatible",dataFactoryArguments:{...e,pageId:t},dependencies:e.dependencies});return t.getLoaders=(e,t,f={},v,m,h,C,y,P,b,_,S)=>{var k,A,I,E,O,w,T,R,L,N,F,D;const{id:x,rights:M,type:B,typeBeforePatch:j}=e,U=e.contentConfig,H=null==U?void 0:U.metaConfig,V=C,G=null==f?void 0:f.forceReload,$=(f.loaders?[...f.loaders]:(0,c.getDefaultLoaders)(B)||[]).map((e=>({...e}))),K=null!==(null===(k=f.templateOptions)||void 0===k?void 0:k.noticeCenterConfig)&&null!==(null==U?void 0:U.noticeCenterConfig),Y=[s.LOADERS.featureFactory.key],q=j===g.PAGE_TYPES.dashboard;let W=!1,z=!1;const Q=!!(null===(I=null===(A=U.prefetchConfig)||void 0===A?void 0:A.dependencies)||void 0===I?void 0:I.includes("form"));let X=!1,J=!1,Z=!1,ee=!1,te=!1,oe=!1,ie=!1,ne=!1,ae=!1,re=!1,le=!1,se=!1,de=!1;const ce=B===g.PAGE_TYPES.entity||B===g.PAGE_TYPES.entityNew,ue=!1!==(null==U?void 0:U.showNavigation),ge=ce?(e=>(0,d.pageHasNavigation)()&&e)(null==U?void 0:U.showNavigation):!1,pe=(e=>{const{key:t,module:o}=s.LOADERS.navigation;return e.some((e=>e.key===t&&e.module===o))})($),fe=ue&&(ge||pe);if((null===(E=f.templateOptions)||void 0===E?void 0:E.hasOwnProperty("informers"))&&(null===f.templateOptions.informers||void 0===f.templateOptions.informers))Y.push(s.LOADERS.informers.key);if(pe)Y.push(s.LOADERS.navigation.key);const ve={},me={};
147if(!v&&(null==U?void 0:U.customLoaders))n.Logger.warn(`ÐÑполÑзование ÑÑÑаÑевÑий опÑии "customLoaders" в pagex на ÑÑÑаниÑе ${x}. ÐеобÑ
одимо опиÑаÑÑ ÑабÑÐ¸ÐºÑ Ð² пÑедзагÑÑзке.`),U.customLoaders.forEach((e=>{ve[e.key]=p({...e,reloadable:!0},x)}));const he=[...null!==(O=U.features)&&void 0!==O?O:[]],Ce=m?U.features:((e=[],t=[])=>[...e,...t])(he,t.features),ye={[s.LOADERS.prefetch.key]:e=>{e.params={pageId:x}},[s.LOADERS.viewSettings.key]:()=>te=!0,[s.LOADERS.activeTheme.key]:()=>ie=!0,[s.LOADERS.applicationSettings.key]:()=>ee=!0,[s.LOADERS.informers.key]:()=>Z=!0,[s.LOADERS.configuration.key]:()=>re=!0,[s.LOADERS.noticeCenter.key]:()=>oe=!y.emptyLayout,[s.LOADERS.featureFactory.key]:()=>X=!0,[s.LOADERS.helpSystem.key]:()=>J=!0,[s.LOADERS.permission.key]:()=>z=!0,[s.LOADERS.userInfo.key]:()=>W=!0,[s.LOADERS.userStatus.key]:()=>{var e;ne=!!(null===(e=null==y?void 0:y.templateOptions)||void 0===e?void 0:e.userStatusConfig)},[s.LOADERS.componentAccess.key]:()=>de=!0,[s.LOADERS.statistics.key]:()=>le=!0};if(!v){if(U.entityConfig)ae=!0;if(U.formMethodConfig&&Q){const e={...s.LOADERS.form};e.params={...U.formMethodConfig,pageId:x,buildingContext:null==S?void 0:S.buildingContext},e.dependencies=U.formMethodConfig.dependencies,$.push(e)}if(U.addButtonConfig)se=!0}$.forEach((e=>{if(ye.hasOwnProperty(e.key))ye[e.key](e);else{const t=e.key===s.LOADERS.form.key;if(!(e=>{const t=s.LOADERS[e.key];return t&&t.module===e.module})(e)||t)me[e.key]=p(e,x)}}));const Pe={...s.LOADERS.prefetch};Pe.dependencies=((e=[],t=[])=>{const o=new Set(e);return t.forEach((e=>{if("prefetch"!==e)o.add(e)})),Array.from(o)})(null===(w=U.prefetchConfig)||void 0===w?void 0:w.dependencies,null===(T=U.formMethodConfig)||void 0===T?void 0:T.dependencies);const be=(null===(R=U.prefetchConfig)||void 0===R?void 0:R.demoConfigLoader)&&(0,u.default)()?{...U.prefetchConfig,configLoader:U.prefetchConfig.demoConfigLoader,configLoaderArguments:U.prefetchConfig.demoConfigLoaderArguments}:{...U.prefetchConfig,configLoader:!v?null===(L=U.prefetchConfig)||void 0===L?void 0:L.configLoader:void 0};let _e={};if(Object.keys(s.FACTORIES).filter((e=>{var t;switch(e){case"userInfo":case"isGuest":return W;case"navigation":return fe;case"formFactory":return B===g.PAGE_TYPES.entity||B===g.PAGE_TYPES.entityNew||B===g.PAGE_TYPES.landing?null==U?void 0:U.formMethodConfig:(null===(t=null==U?void 0:U.workspaceConfig)||void 0===t?void 0:t.templateName)||(null==U?void 0:U.templateContentName);case"feature":return X;case"featureCompatible":return!X&&W&&(null==Ce?void 0:Ce.length);case"sitesRender":return B===g.PAGE_TYPES.frame||B===g.PAGE_TYPES.form||B===g.PAGE_TYPES.dialog;case"addButtonFactory":return!v&&se;case"metaFactory":return!!H;case"metaDataFactory":return(null==H?void 0:H.readMethod)||(null==H?void 0:H.getMetaCallback);case"metaCanonicalFactory":return null==H?void 0:H.canonicalGetter;case"helpSystemFactory":return J;case"informers":return Z;case"viewSettingsData":case"viewSettings":return te;case"noticeCenter":return oe;case"dashboards":return q||oe;case"activeTheme":return ie;case"userStatus":return ne;case"entityChoice":return ae;case"configurationVisibility":return re;case"statistics":return le;case"componentAccess":return de;default:return!0}})).forEach((o=>{var n,d,c,u,p,v,C,k,A,I,E,O,w,T,R,L,N,F,D,j,G,$,Y,W,X,J,Z,te,ie,ne,ae,re,le;const se=(0,a.clone)(s.FACTORIES[o]);switch(o){case"formFactory":se.dataFactoryArguments={...se.dataFactoryArguments,formMethodConfig:U.formMethodConfig?{...U.formMethodConfig,dependencies:null===(n=U.formMethodConfig)||void 0===n?void 0:n.dependencies}:void 0,pageId:x,buildingContext:null==S?void 0:S.buildingContext,useLoaderResult:Q},se.dependencies=null===(d=U.formMethodConfig)||void 0===d?void 0:d.dependencies;break;case"addButtonFactory":se.dataFactoryArguments={addButtonConfig:null==U?void 0:U.addButtonConfig,pageId:x},se.dependencies=(null===(c=U.addButtonConfig)||void 0===c?void 0:c.dependencies)||[],se.factoryDependencies=null===(u=U.addButtonConfig)||void 0===u?void 0:u.factoryDependencies;break;case"_toolbar":se.dataFactoryArguments={toolbarConfig:null==U?void 0:U.toolbarConfig};break;case"sitesRender":se.dataFactoryArguments={routeMask:null==U?void 0:U.routeMask,hrefMask:null==U?void 0:U.hrefMask,siteId:null!==(p=U.siteId)&&void 0!==p?p:U.frameId,pageId:null!==(v=U.pageId)&&void 0!==v?v:U.frameId,siteIdResolver:U.siteIdResolver,siteIdResolverResult:U.siteIdResolverResult,contextData:null!==(k=null===(C=f.contentConfig)||void 0===C?void 0:C.contextData)&&void 0!==k?k:null==U?void 0:U.contextData,installationType:null==U?void 0:U.installationType,adaptiveMode:(0,i.getAdaptiveModeForLoaders)(),createContext:null==U?void 0:U.createContext};break;case"metaFactory":se.dataFactoryArguments={metaConfig:H};break;case"metaDataFactory":se.dataFactoryArguments={metaConfig:H}
147,se.dependencies=(null==H?void 0:H.dependencies)||[];break;case"metaCanonicalFactory":se.dataFactoryArguments={canonicalGetter:null==H?void 0:H.canonicalGetter};break;case"helpSystemFactory":se.dataFactoryArguments={pageId:x,useContentType:null===(A=null==U?void 0:U.helpButtonConfig)||void 0===A?void 0:A.useContentType,useServerSideContentType:null===(I=null==U?void 0:U.helpButtonConfig)||void 0===I?void 0:I.useServerSideContentType,title:(null==S?void 0:S.title)||"",isAdaptive:_,applicationId:P,buildingContext:null==S?void 0:S.buildingContext};break;case"informers":se.dataFactoryArguments={isAdaptive:_,hideInformers:null===(E=null==y?void 0:y.interfaceSettings)||void 0===E?void 0:E.hideInformers,filter:null==U?void 0:U.informersFilter};break;case"navigation":se.dataFactoryArguments={pageId:x,scopeId:h,mainPageId:V,forceReload:!m,layoutInterfaceSettings:null==y?void 0:y.interfaceSettings,isAdaptive:_,applicationId:P,_buildingContext:null==S?void 0:S.buildingContext};break;case"isGuest":se.dependencies=l.constants.isServerSide?[]:["userInfo"];break;case"applicationSettings":se.dataFactoryArguments={additionalData:{applicationId:e.applicationId,applicationUrl:e.applicationUrl,applicationName:e.logoDesc,configurationId:e.configurationId,scopeId:e.scopeId,groupId:e.scopeId,scope:e.scope,mainPage:"default"!==e.mainPage?e.mainPage:void 0,companyType:null===(O=e.appSettings)||void 0===O?void 0:O.companyType,helpUrl:null===(w=e.appSettings)||void 0===w?void 0:w.helpUrl,helpButton:null===(T=e.appSettings)||void 0===T?void 0:T.helpButton,knowledgeBaseInfo:null===(R=e.appSettings)||void 0===R?void 0:R.knowledgeBaseInfo,title:e.applicationTitle,isFirstEntry:e.firstEntry,nomenclature:e.nomenclature},layoutSettings:{interfaceSettings:null==y?void 0:y.interfaceSettings,logo:null==y?void 0:y.templateOptions.logo,logoType:null==y?void 0:y.templateOptions.logoType,favicon:null==y?void 0:y.templateOptions.favicon,contentLogo:null==y?void 0:y.templateOptions.contentLogo,floatingAreaConfig:null==y?void 0:y.templateOptions.floatingAreaConfig,noticeCenterConfig:null==y?void 0:y.templateOptions.noticeCenterConfig,quickAddSource:(null===(L=null==e?void 0:e.templateOptions)||void 0===L?void 0:L.quickAddSource)||e.quickAddSource||(null===(N=null==f?void 0:f.templateOptions)||void 0===N?void 0:N.quickAddSource)||(null===(F=null==t?void 0:t.templateOptions)||void 0===F?void 0:F.quickAddSource),quickAddSettings:(null===(D=null==e?void 0:e.templateOptions)||void 0===D?void 0:D.quickAddSettings)||e.quickAddSettings||(null===(j=null==f?void 0:f.templateOptions)||void 0===j?void 0:j.quickAddSettings)||(null===(G=null==t?void 0:t.templateOptions)||void 0===G?void 0:G.quickAddSettings)},callBlMethod:!!ee,_buildingContext:null==S?void 0:S.buildingContext};break;case"viewSettingsData":se.dataFactoryArguments={pageId:x,mainPageId:V,applicationId:P};break;case"viewSettings":const a=(0,i.getAdaptiveModeForLoaders)(),s=!_&&(a.environment.isMobileApp()||"true"===r.query.get.isMobileApp),de=s?"max":(null===($=null==U?void 0:U.workspaceConfig)||void 0===$?void 0:$.minWidth)||null,ce=(null===(Y=null==U?void 0:U.workspaceConfig)||void 0===Y?void 0:Y.maxWidth)||null,ue=!!(null===(X=null===(W=U.workspaceConfig)||void 0===W?void 0:W.masterOptions)||void 0===X?void 0:X.masterWidthProperty);if(q)se.dependencies=se.dependencies.concat("dashboards");if(!fe||ue)se.dependencies=se.dependencies.filter((e=>"navigation"!==e));se.dataFactoryArguments={url:x,pageId:x,pageType:B||g.PAGE_TYPES.main,mainPageId:V,minWorkspaceWidth:de,maxWorkspaceWidth:ce,workspaceWidthCorrection:U.blockLayout?4:!(null==U?void 0:U.contrastBackgroun
147d)&&!(null==U?void 0:U.highlightContentArea)?-3:0,noticeCenterConfig:U.noticeCenterConfig,layoutInterfaceSettings:s?{...null==y?void 0:y.interfaceSettings,visible:!1,rightPanelVisible:!1}:null==y?void 0:y.interfaceSettings,masterOptions:{...null===(J=U.workspaceConfig)||void 0===J?void 0:J.masterOptions,masterExpandProperty:null===(Z=U.masterConfig)||void 0===Z?void 0:Z.masterExpandProperty},searchPosition:null===(te=U.filterConfig)||void 0===te?void 0:te.searchPosition,hasMasterBottomTemplate:!!(null===(ie=U.masterConfig)||void 0===ie?void 0:ie.bottomTemplateName),applicationId:P,noticeDefaultVisible:!!(null===(ne=U.noticeCenterConfig)||void 0===ne?void 0:ne.defaultVisible),isAdaptive:_,adaptiveMode:a,noticeVisible:K,width:null===(ae=U.interfaceSettings)||void 0===ae?void 0:ae.width,alignment:null===(re=U.interfaceSettings)||void 0===re?void 0:re.alignment,isDashboard:U.isDashboard,_buildingContext:null==S?void 0:S.buildingContext};break;case"dashboards":if(se.dataFactoryArguments={loadMainFrame:q,loadNoticeFrame:oe&&K,applicationId:P,configurationId:b,mainFrameId:null===(le=U.dashboards)||void 0===le?void 0:le[0],noticeFrameId:e.noticeFrame},!P&&!b)se.dependencies=se.dependencies.concat("applicationSettings");break;case"noticeCenter":se.dataFactoryArguments={...U.noticeCenterConfig||{},layoutInterfaceSettings:y,pageRights:M,noticeFrameId:e.noticeFrame};break;case"activeTheme":se.dataFactoryArguments={selector:f.activeThemeSelector,forceChangeTheme:f.forceChangeTheme};break;case"featureCompatible":case"featureCompatible":se.dataFactoryArguments={features:Ce},o="feature";break;case"entityChoice":se.dataFactoryArguments={...U.entityConfig};break;case"permission":se.dataFactoryArguments={loadPermissionData:z};break;case"configurationVisibility":se.dataFactoryArguments={...U.configurationConfig};break;case"statistics":se.dataFactoryArguments={applicationId:e.applicationId,configurationId:e.configurationId,pageId:x};break;case"componentAccess":se.dataFactoryArguments={applicationId:e.applicationId,configurationId:e.configurationId}}_e[o]=se})),null==f?void 0:f.additionalFactories)_e={..._e,...f.additionalFactories};if(_e={...(0,o.getDefaults)(),..._e,...ve,...me},_e.navigation&&_e.userInfo)_e.navigation={..._e.navigation,dependencies:Array.from(new Set([..._e.navigation.dependencies||[],"userInfo"]))};const Se=[...be.dependencies||[],...(null===(N=U.formMethodConfig)||void 0===N?void 0:N.dependencies)||[],...(null===(F=U.addButtonConfig)||void 0===F?void 0:F.dependencies)||[]],ke=Array.from(new Set(Se));return Pe.params={...!v?be:void 0,prefetchFactoryDependencies:ke.filter((e=>!!_e[e])),pageContext:{contextDescription:U.context,contextInstance:e.context,contextConfig:null==U?void 0:U.contextConfig,contextConfigArguments:U.contextConfigArguments,contextData:U.contextData,contextActions:null==U?void 0:U.contextActions},applicationContext:{contextId:e.applicationContextId,contextDescription:f.context,contextConfig:null===(D=f.contentConfig)||void 0===D?void 0:D.contextConfig,contextConfigArguments:f.contextConfigArguments},forceReload:G,scopeId:h,pageId:x,isAdaptive:_,adaptiveMode:(0,i.getAdaptiveModeForLoaders)(),preloadOptions:null==f?void 0:f.preloadOptions,factories:_e,_formMethodConfig:U.formMethodConfig},Pe.dependencies=[],[Pe]},t}(0,{},R,m,d,P,Q,F,de,Ze,ot,Ee,ie),mt=function(e,t,o,i,n,a,r,l,s,d,c,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPageError=void 0;return t.getPageError=(e,t,g)=>{var p,f;let v;if(!1===e.access)v=((e="",t,o)=>{let a;try{a=JSON.parse(t)}catch(r){}const r=t&&a?new c.AccessDeniedError({url:"",message:e,httpError:403,addinfo:new u.Record({rawData:JSON.parse(t),adapter:new u.adapter.Sbis})}):void 0,l="accessDenied"===e?n.Parking.options.getAccessDenied(i.ErrorViewMode.include,r):n.Parking.options[e];let s=l.details;if("component"===e&&o){const e=o.split(","),t=n.Parking.Const.DETAILS.COMPONENTS_DISABLED;s=1===e.length?l.details:t,s=`${s}: ${o}`}return{template:n.Parking.templates.getBaseTemplateForMode(i.ErrorViewMode.include),mode:i.ErrorViewMode.include,options:{...l,size:n.Parking.Const.Size.large,error:r,details:s}}})(e.error,e.errorRec,e.errorComponentNames);else if(!e.id)v=(()=>{const e=n.Parking.handlers.notFound({error:new a.fetch.Errors.HTTP({httpError:a.HTTPStatus.NotFound,message:"",url:""}),mode:i.ErrorViewMode.include});if(e.options)e.options.size=n.Parking.Const.Size.large;return e})();else if(!g&&((e,t,{maskResolver:i,url:n})=>{let a=!1;if("entity"===e||"landing"===e||!0!==t)return a;const l=n.getStateUrl(),s=n.getLogicUrl(),c=(0,d.cleanUrl)(s),u=`/${r.PAGE_PREFIX}/`,g=i.calculateUrlParams(`${u}/:pageId`,s).pageId,p=i.calculateUrlParams(`${u}/:pageId`,l).pageId,f=l.includes(u)&&!s.includes(u),v=g&&p&&g!==p;if(a=!(!f&&!v||"/"===c||0===l.indexOf(c)),a)o.logger.info("pageIsTransferred","Ðокажем заглÑÑÐºÑ Ð½Ð° ÑÑÑаниÑÑ, о Ñом, ÑÑо ÑÑÑаниÑа пеÑемеÑена.",`${f}, ${v}, ${c}, ${l}`);return a})(e.type,null===(p=e.contentConfig)||void 0===p?void 0:p.showTransferError,t))m=e.title,v={template:n.Parking.templates.Include,options:{image:n.Parking.Const.IMAGE.NOT_FOUND,message:s('ÐдÑÐµÑ ÑÑÑаниÑÑ "$pageName" изменилÑÑ').replace("$pageName",s(m)),action:"SabyPage/errorActions:RedirectLink",size:n.Parking.Const.Size.large}};else if(!1===(null===(f=e.contentConfig)||void 0===f?void 0:f.supportIE)&&l.detection.isIE&&!l.detection.isIE12)v=(e=>{const t=e?` "${s(e)}" `:" ";return{template:n.Parking.templates.Include,options:{image:n.Parking.Const.IMAGE.ACCESS_DENIED,message:s("ÐÐ°Ñ Ð±ÑаÑÐ·ÐµÑ ÑÑÑаÑел"),details:`${s("ÐÐ»Ñ ÑабоÑÑ Ñ Ñазделом")}${t}${s("ÑÑÑановиÑе более ÑовÑеменнÑй бÑаÑзеÑ")}`,action:"SabyPage/errorActions:BrowserUpdateLink",size:n.Parking.Const.Size.large}}})(e.title);var m;return v},t}(0,{},Q,B,I,q,dt,F,o,De,A,_),ht=function(e,t,o,i,n,a,r,l,s,d,c,u,g,p,f,v,m,h,C,y,P,b,_,S,k,A,I,E,O,w,T,R,L,N,F,D,x,M,B,j,U,H,V){"use strict";function G(e){const n=(0,i.useContext)(b.Context),a=(0,i.useContext)(I.Context),r=(0,i.useMemo)((()=>({close:()=>{var t;null===(t=e.close)||void 0===t||t.call(e,n)},reloadPage:t=>{var o;null===(o=e.reloadPage)||void 0===o||o.call(e,t)},reloadData:(t=["prefetch"])=>{var o;null===(o=e.reloadData)||void 0===o||o.call(e,t)},setTheme:t=>{var o;null===(o=e.setTheme)||void 0===o||o.call(e,t)},setActiveTheme:t=>{var o;null===(o=e.setActiveTheme)||void 0===o||o.call(e,t)},registerPending:(t=[])=>{var o,i;null===(o=e.registerPending)||void 0===o||o.call(e,t),null===(i=null==a?void 0:a.registerPending)||void 0===i||i.call(a,...t)},cancelFinishingPending:(t=[])=>{var o,i;null===(o=e.cancelFinishingPending)||void 0===o||o.call(e,t),null===(i=null==a?void 0:a.cancelFinishingPending)||void 0===i||i.call(a,...t)},startPreload:t=>{var o;null===(o=e.startPreload)||void 0===o||o.call(e,t)},toggleLogo:()=>{var t;null===(t=e.toggleLogo)||void 0===t||t.call(e)},logoVisible:e.logoVisible})),[n,e.close,e.reloadPage,e.reloadData,e.setTheme,e.setActiveTheme,e.registerPending,e.cancelFinishingPending,e.startPreload,e.toggleLogo,e.logoVisible]);return(0,o.jsx)(t.pageContext.Provider,{value:r,children:e.children})}
147Object.defineProperty(t,"__esModule",{value:!0}),t.withPageContext=t.PageControllerContextConsumer=t.getPageControllerContext=t.pageContext=void 0;const $=(0,n.lazy)((()=>(0,n.importer)("Controls/markup:Decorator"))),K="themeEditorColors",Y="SbisEnvUI/ParkingTemplates:Page",q=["frame","form","dialog"];t.pageContext=(0,i.createContext)({startPreload:()=>{}}),t.pageContext.displayName="PageBaseContext",t.getPageControllerContext=function(){return t.pageContext},t.PageControllerContextConsumer=function(e){const n=(0,i.useContext)(t.pageContext);return(0,o.jsx)(e.contextOptionsInnerComponent,{...e,pageContext:n})},t.withPageContext=function(e){const n=e.displayName||e.name||"Component";class a extends i.Component{constructor(e){super(e),this.ref=this.ref.bind(this)}ref(e){this._$child=e}render(){return(0,o.jsx)(e,{...this.props,ref:this.ref,pageContext:this.context})}}return a.contextType=t.pageContext,a.displayName=`withPageContext(${n})`,a.isReact=!0,a.getDefaultOptions=e.getDefaultOptions,a._getDefaultOptions=e._getDefaultOptions,a.defaultProps=e.defaultProps,a.getOptionTypes=e.getOptionTypes,a};class W{getState(){return this._state}setState(e){this._state=e}}const z=new class{constructor(){this._pageConfigPromises={},this._savedConfigs={}}setPageConfigPromise(e,t){this._pageConfigPromises[e]=t.then((t=>(z.savePageConfig(e,t),setTimeout((()=>{this.removePageConfigPromise(e)}),2e3),t)))}getPageConfigPromise(e){return this._savedConfigs[e]?Promise.resolve(this._savedConfigs[e]):this._pageConfigPromises[e]}removePageConfig(e){this.removePageConfigPromise(e),delete this._savedConfigs[e]}removePageConfigPromise(e){delete this._pageConfigPromises[e]}clearPageConfig(){this.clearPageConfigPromise(),this._savedConfigs={}}clearPageConfigPromise(){this._pageConfigPromises={}}savePageConfig(e,t){if(t.allowSaveConfig&&(!t.buildingContext||"default"===t.buildingContext))this._savedConfigs[e]=t,delete this._pageConfigPromises[e]}};class Q extends i.Component{constructor(e){var t,o,n;if(super(e),this._isExtensionLoaded=!1,this._isStoreCommandsInit=!1,this._closeFromContext=e=>{this._closeAppHandler(null,e)},this._closeAppHandler=(e,t)=>{var o;null==e||e.stopPropagation();const i=this.state._pageConfig.id;null===(o=this._pendingController)||void 0===o||o.finishPendingOperations(void 0,null,{pageId:i,newState:{}}).then((e=>{var o,i;const n=Array.isArray(e)?null===(o=e.find((e=>null!=(null==e?void 0:e.confirmResult))))||void 0===o?void 0:o.confirmResult:void 0;null===(i=null==t?void 0:t.forceClose)||void 0===i||i.call(t,n)})).catch((()=>!1))},this._serializePageConfig=e=>{if(S.constants.isServerSide)delete e.loadersData,this._receivedPageConfig.setState({...e,controllers:void 0})},this._registerFromStore=e=>{var t;
147null===(t=this._pendingController)||void 0===t||t.registerPending.apply(this._pendingController,e)},this._cancelFromStore=e=>{var t;null===(t=this._pendingController)||void 0===t||t.cancelFinishingPending.apply(this._pendingController,e)},this._startPreload=e=>{if(!z.getPageConfigPromise(e)){const t=(0,E.loadSync)(this.props.configLoader),o=Q._controllers[this.state._pageConfig.buildingContext].NavigationController.getHrefByPageId({pageId:e},void 0,this.props.Router),i=this.props.Router.urlRewriter.get(o);z.setPageConfigPromise(e,t.getConfig(i,this.props.configLoaderArguments,!0,this.state._pageConfig,this.props.Router,this.state._pageConfig.buildingContext,void 0,!0).then((e=>((0,g.preloadModules)(e.preloadModules),e))))}},this._pageHide=()=>{document.body.classList.add("page-Controller__disabled")},this._pageShow=()=>{document.body.classList.remove("page-Controller__disabled")},this._beforeNavigateCallback=e=>{var t,o,i;const n=this.state._pageConfig.beforeNavigateCallback,a=(0,g.getPageId)(this.state._pageConfig.pagePrefix,e.state,this.props.Router);let r=Promise.resolve(!0);const l=this.props.Router.maskResolver.calculateUrlParams("?usePending=:usePending",e.state).usePending,s="frame"===(null===(t=this.state._pageConfig)||void 0===t?void 0:t.type)?a!==this.state._pageConfig.originalPageId:a!==(null===(o=this.state._pageConfig)||void 0===o?void 0:o.id);if(s||l)this._pageChangingProcess=s,r=null===(i=this._pendingController)||void 0===i?void 0:i.finishPendingOperations(void 0,null,{pageId:a,newState:e}).then((t=>{if(this._pageRouter.notifySubscribers("beforeNavigate",a),n){const t=(0,E.loadSync)(n);this._beforeNavigateCallbackHandler(e,t)}return!0})).catch((()=>!1));else if(n){const t=(0,E.loadSync)(n);this._beforeNavigateCallbackHandler(e,t)}return r},this._beforeNavigateCallbackHandler=(e,t)=>{const o=(0,g.getPageId)(this.state._pageConfig.pagePrefix,e.state,this.props.Router);return Promise.resolve(t(o)).then((t=>{if(t instanceof Object)e.href=this.props.Router.maskResolver.calculateQueryHref(t,e.href),e.state=this.props.Router.maskResolver.calculateQueryHref(t,e.state);return!1!==t}))},this._afterNavigateCallback=()=>{var e;const t=(0,u.cleanUrl)(this.props.Router.url.getStateUrl());this._pageUrl=t;const o=!(null===(e=this.state._pageConfig)||void 0===e?void 0:e.buildingContext)||"default"===this.state._pageConfig.buildingContext;if(o&&(0,g.checkMemoryLeaks)(this._leaksController))return(0,C.reload)("memory"),Promise.resolve(!0);else return(0,E.loadAsync)("ServiceUpdateNotifier/notifier:isVersionOutdated").then((e=>{if(o&&e())return(0,C.reload)("versionOutdated"),!0;else return this._reloadPage(t).then((()=>{this._pageChangingProcess=!1,Q._userAfterNavigateCallback(this.state._pageConfig.afterNavigateCallback,this.state._pageConfig)})),!0}))},this._reloadPageCommand=e=>{var t;if(!this._pageChangingProcess){if(this._progressBar.show(),null==e?void 0:e.reloadLoaders)z.removePageConfig(null===(t=this.state._pageConfig)||void 0===t?void 0:t.id);this._reloadPage(void 0,null==e?void 0:e.reloadLoaders,null==e?void 0:e.reloadApp)}},this._reloadDataCommand=(e=["prefetch"])=>{this._reloadData(e)},this._setTheme=e=>{const t=e.split("/");this.setState({_pageConfig:{...this.state._pageConfig,fullThemeName:e},_templateOptions:{...this.state._templateOptions,sidebarTheme:t[1]||t[0]},_themeName:t[0]})},this._setActiveTheme=e=>{var t;this._activeTheme=e;const o=null===(t=e.properties)||void 0===t?void 0:t.get("staticTheme"),i=e.selector;if(i)(0,g.loadTheme)(i).then((()=>{this._setTheme(i)})).catch((()=>{if(o)this._setTheme(o)}))},this._setThemeFromContext=e=>{(0,g.loadTheme)(e).then((()=>{this._setTheme(e)}))},this._setActiveThemeFromContext=e=>{this._setActiveTheme(e)},this._toggleLogoCommand=()=>{this.setState({_logoVisible:!this.state._logoVisible})},this._reloadPage=(e,t,o)=>{var i;const n=this._pageUrl;return Q._getPageConfig(this.props.configLoader,{...this.props.configLoaderArguments||{},forceReload:t},this._pageUrl,!t,!o?this.state._pageConfig:{},this.props.Router,void 0,null===(i=this.state._pageConfig)||void 0===i?void 0:i.buildingContext).then((t=>{if(this._setNewPageConfig(t,e||n),t.pageIdChanged)this._pageUrl=(0,u.cleanUrl)(this.props.Router.url.getStateUrl())})).catch((e=>{if((null==e?void 0:e.status)===h.HTTPStatus.Connection)(0,P.process)({error:e,dialogOptions:{id:this._errorPopupId}}).then((e=>{this._errorPopupId=e})),this._progressBar.hide();else return(0,E.loadAsync)(Y).then((()=>{this._showError(e)}))}))},this._reloadData=e=>{var t;const{loaders:o,loadersData:i}=this.state._pageConfig,n=i.prefetch.prefetchResult.loadResults,a=o.find((e=>"prefetch"===e.key)),r={...n.root};if(e.forEach((e=>{r[e]=void 0})),a.params)a.params.forceReload=!0;const s={...a,params:{...null==a?void 0:a.params,data:{root:r,prefetch:e.includes("prefetch")?void 0:n.prefetch}}},d=l.default.load([s],this.props.Router,Q._controllers[this.state._pageConfig.buildingContext]),c=null===(t=this.state._pageConfig)||void 0===t?void 0:t.id;return d.then((e=>{if(this.state._pageConfig.id!==c||this._pageChangingProcess)return;const t={...this.state._pageConfig,loadersData:{...this.state._pageConfig.loadersData,...e}},o=(0,E.loadSync)(this.props.configLoader);this._setNewPageConfig((0,g.updateByConfigLoader)(t,o),this._pageUrl)}))},!S.constants.isServerSide&&!e.isPopup&&!Q.configLoaderArguments)Q.configLoaderArguments=(0,D.clone)(e.configLoaderArguments);if(this.state={_themeName:"",_themeEditor:{},_pageConfig:{},_pagePrefix:"page",_appConfig:{},_templateOptions:{},_logoVisible:!0,_errorTemplateOptions:null},this._pageUrl=(0,u.cleanUrl)(e.Router.url.getStateUrl()),this._progressBarRef=(0,i.createRef)(),this._progressBar={show:()=>{this._progressBarRef.current.show()},hide:()=>{var e;null===(e=this._progressBarRef.current)||void 0===e||e.hide()}},this._initCookieResult=(0,f.initCookie)(),this._receivedPageConfig=new W,(0,_.getStateReceiver)().register(e.receivedStateKey||"PageConfig",this._receivedPageConfig),S.constants.isServerSide&&(null===(t=null==e?void 0:e.configLoaderArguments)||void 0===t?void 0:t.language)&&e.configLoaderArguments.language!==d.controller.currentLang)if(d.controller.setLang(e.configLoaderArguments.language),process.domain.req.cookies)process.domain.req.cookies.lang=e.configLoaderArguments.language;
147if(!e.Router&&S.constants.isServerSide)v.Logger.warn(`Page.base:Controller - Ðе пеÑедана опÑÐ¸Ñ Router: ${e.Router}`);const a=this._receivedPageConfig.getState()||e.pageConfig;if(this._pendingController=this._createPendingController(),this._pageRouter=new s.default(e.Router),S.constants.isBrowserPlatform&&(null===(o=null==a?void 0:a.error)||void 0===o?void 0:o.status)===h.HTTPStatus.GatewayTimeout&&(null===(n=e.configLoaderArguments)||void 0===n?void 0:n.pageConfigLoaderTimeout))Q._getPageConfig(e.configLoader,e.configLoaderArguments,this._pageUrl,!1,{},e.Router).catch((e=>(0,E.loadAsync)(Y).then((()=>({error:e}))))).then((t=>{this._updatePageConfig(t,this._pageUrl,e.Router),this._serializePageConfig(t)}));if(a){if(Q._initEnvironment(a,e.Router),S.constants.isBrowserPlatform)z.savePageConfig(a.id,a);if(this.state={...this.state,...this._updatePageConfig(a,this._pageUrl,e.Router,!1)},this._serializePageConfig(a),a.changedQuery||a.pageIdChanged||a.changedPath){const t=Q._controllers[a.buildingContext].NavigationController;Q.updateRouterState(a,e.Router,t),this._pageUrl=(0,u.cleanUrl)(e.Router.url.getStateUrl())}}else if(S.constants.isBrowserPlatform)this._reloadPage(this._pageUrl,!0,!0);this._registerPendingHandlerWithEvent=this._registerPendingHandlerWithEvent.bind(this),this._registerPendingHandler=this._registerPendingHandler.bind(this),this._finishPendingHandler=this._finishPendingHandler.bind(this),this._cancelFinishingPendingHandler=this._cancelFinishingPendingHandler.bind(this)}_createPendingController(){return new I.PendingClass({notifyHandler:(e,t)=>{}})}_registerPendingHandlerWithEvent(e,...t){if(this.props.onRegisterPending)e.stopSyntheticEvent();this._registerPendingHandler(...t)}_registerPendingHandler(...e){var t;
147if(this.props.isApp||!this.props.isPopup)null===(t=this._pendingController)||void 0===t||t.registerPending.apply(this._pendingController,e);else if(this.props.onRegisterPending)this.props.onRegisterPending(...e)}_finishPendingHandler(...e){var t;if(this.props.isApp||!this.props.isPopup)return null===(t=this._pendingController)||void 0===t?void 0:t.finishPendingOperations.apply(this._pendingController,e);else if(this.props.onFinishPendingOperations)this.props.onFinishPendingOperations(...e)}_cancelFinishingPendingHandler(...e){var t;if(this.props.isApp||!this.props.isPopup)null===(t=this._pendingController)||void 0===t||t.cancelFinishingPending.apply(this._pendingController,e);else if(this.props.onCancelFinishingPending)this.props.onCancelFinishingPending(...e)}_getForcedAdaptive(){var e;if("false"===_.cookie.get("useAdaptive"))return!1;if(!1===(null===(e=this.state._pageConfig)||void 0===e?void 0:e.allowAdaptive))return!1;else return}_updatePageConfig(e,t,o,i=!0){var n,a,r,l,s,d;let u=null;if(this._pageUrl===t){if(Q._controllers[e.buildingContext]&&!e.controllers)e.controllers=Q._controllers[e.buildingContext];if(function(e,t=[]){const o=["permission","userInfo","navigation"],i=null==t?void 0:t.filter((e=>!0===e.catchError)).map((e=>e.key));for(const t of o){const o=(0,g.getPrefetchData)(e,t);if(o instanceof Error&&!i.includes(t)){e.error=o,e.error.message=`ÐÑоизоÑла оÑибка во вÑÐµÐ¼Ñ Ð²ÑÐ¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ð¼ÐµÑода loadData Ñ ÑабÑики: ${t}`;break}}}(e,null===(n=this.props.configLoaderArguments)||void 0===n?void 0:n.loaders),e.hasOwnProperty("error")&&e.error)u=this._showError(e.error,i);else{if(e.scopeId){const t=null===(a=e.templateOptions)||void 0===a?void 0:a.logoUrl;if(t)e.templateOptions.logoUrl=t.replace(`/group/${e.scopeId}/`,"/")}(0,g.fillUrlWithGroupId)(e,o||this.props.Router);const t=(0,g.getPrefetchData)(e,"activeTheme");let n=this.state._themeName||e.themeName;if(t){this._activeTheme=t;const e=Array.isArray(t)?t.find((e=>"PALETTE"===(null==e?void 0:e.themeApply))):t;n=null!==(l=null===(r=null==e?void 0:e.properties)||void 0===r?void 0:r.get("staticTheme"))&&void 0!==l?l:n}if(u={_pagePrefix:e.pagePrefix,_pageConfig:e,_appConfig:(0,g.createAppConfig)(e,(0,g.getPrefetchData)(e,"metaFactory","prefetch"),(0,g.getPrefetchData)(e,"navigation"),(0,g.getPrefetchData)(e,"applicationSettings"),this.props.ignoreScrollOnBody),_templateOptions:this._updateTemplateOptions(e),_themeName:n,_themeEditor:this._getCustomTheme(e,n)||c.default.get(K)||{},_errorTemplateOptions:null},i)this.setState(u),null===(d=(s=this.props).onConfigReady)||void 0===d||d.call(s)}}else this._progressBar.hide();return u}_getCustomTheme(e,t){var o,i;const n=null===(i=null===(o=null==e?void 0:e.templateOptions)||void 0===o?void 0:o.interfaceSettings)||void 0===i?void 0:i.customTheme;return n?n[(0,g.getThemeWebParamsKey)(t)]:void 0}_initExtensions(){var e;if(this._isExtensionLoaded)return;if((0,D.isEmpty)(this.state._pageConfig))return;const t=null===(e=this.state._pageConfig)||void 0===e?void 0:e.extensions;if(t&&!_.cookie.get("pageWithoutPrefetch"))this._isExtensionLoaded=!0,(0,j.initExtensions)(t,this.state._pageConfig,this._pageRouter)}_initStoreCommands(){var e;if(!this._isStoreCommandsInit)if("default"===(null===(e=this.state._pageConfig)||void 0===e?void 0:e.buildingContext))this._isStoreCommandsInit=!0,this._reloadCallbackId=c.default.declareCommand("reloadPage",this._reloadPageCommand,!0),this._reloadDataCallbackId=c.default.declareCommand("reloadData",this._reloadDataCommand,!0),this._setThemeCallbackId=c.default.declareCommand("setTheme",this._setTheme,!0),this._setActiveThemeCallbackId=c.default.declareCommand("setActiveTheme",this._setActiveTheme,!0),this._registerPendingId=c.default.declareCommand("registerPending",this._registerFromStore,!0),this._cancelPendingId=c.default.declareCommand("cancelFinishingPending",this._cancelFromStore,!0),this._startPreloadId=c.default.declareCommand("startPreload",this._startPreload,!0)}componentDidMount(){var e,t,o,i,n,a;if(this._initStoreCommands(),Q._userAfterNavigateCallback(null===(e=this.state._pageConfig)||void 0===e?void 0:e.afterNavigateCallback,this.state._pageConfig),!this.state._errorTemplateOptions)this._leaksController=new p.default,setTimeout((()=>{this._initExtensions()}),0);if(null===(o=null===(t=this.state._templateOptions)||void 0===t?void 0:t.prefetch)||void 0===o?void 0:o.loadDataPromise)null===(i=this.state._templateOptions)||void 0===i||i.prefetch.loadDataPromise.then((e=>{const t=(0,E.loadSync)(this.props.configLoader);let o={...this.state._pageConfig};o.loadersData.prefetch=e,o=(0,g.updateByConfigLoader)(o,t),this.setState({_pageConfig:{...o},_appConfig:(0,g.createAppConfig)(o,(0,g.getPrefetchData)(o,"metaFactory","prefetch"),(0,g.getPrefetchData)(o,"navigation"),(0,g.getPrefetchData)(o,"applicationSettings"),this.props.ignoreScrollOnBody),_templateOptions:this._updateTemplateOptions(o)})}));if(this._themeEditorCallbackId=c.default.onPropertyChanged(K,(e=>{this.setState({_themeEditor:e})}),!0),null===(n=this._initCookieResult)||void 0===n?void 0:n.needResize)window.dispatchEvent(new Event("resize"));if(setTimeout((()=>{(0,E.loadAsync)("ServiceUpdateNotifier/notifier:isVersionOutdated")}),0),(!(null===(a=this.state._pageConfig)||void 0===a?void 0:a.buildingContext)||"default"===this.state._pageConfig.buildingContext)&&S.detection.isMobileIOS)window.addEventListener("pagehide",this._pageHide),window.addEventListener("pageshow",this._pageShow)}_translateValue(e,t){return e?(0,E.loadSync)(t)(e):void 0}_translateFilterConfig(e,t){var o,i,n,a;if(t&&e)e.filterTemplateOptions={...e.filterTemplateOptions,placeholder:this._translateValue(null===(o=e.filterTemplateOptions)||void 0===o?void 0:o.placeholder,t),emptyText:this._translateValue(null===(i=e.filterTemplateOptions)||void 0===i?void 0:i.emptyText,t)},e.searchTemplateOptions={...e.searchTemplateOptions,placeholder:this._translateValue(null===(n=e.searchTemplateOptions)||void 0===n?void 0:n.placeholder,t),tooltip:this._translateValue(null===(a=e.searchTemplateOptions)||void 0===a?void 0:a.tooltip,t)}}_updateTemplateOptions(e){var t,o,i;return this._translateFilterConfig(null===(t=null==e?void 0:e.templateOptions)||void 0===t?void 0:t.filterConfig,null===(o=null==e?void 0:e.templateOptions)||void 0===o?void 0:o.langDictionary),(0,g.prepareBreadCrumbsData)(e.templateOptions||{},e.loadersData||{},this.props.Router),{...e.templateOptions,...e.loadersData,navigation:(0,g.getPrefetchData)(e,"navigation")||(null===(i=e.loadersData)||void 0===i?void 0:i.navigation),viewSettings:(0,g.getPrefetchData)(e,"viewSettings"),noticeCenter:(0,g.getPrefetchData)(e,"noticeCenter"),form:this._getFormLoaderData(e),controllers:e.controllers,pageRouter:this._pageRouter,isEmptyView:e.isEmptyView,isRedirectEmptyView:e.isRedirectEmptyView}}_getFormLoaderData(e){const t=(0,g.getPrefetchData)(e,"form");if(t instanceof Error)return{errorConfig:t};else return t}componentWillUnmount(){var e,t,o,i;if(b.Dialog.closePopup(this._errorPopupId),this._reloadCallbackId)c.default.unsubscribe(this._reloadCallbackId);if(this._reloadDataCallbackId)c.default.unsubscribe(this._reloadDataCallbackId);if(this._setThemeCallbackId)c.default.unsubscribe(this._setThemeCallbackId);if(this._themeEditorCallbackId)c.default.unsubscribe(this._themeEditorCallbackId);if(this._registerPendingId)c.default.unsubscribe(this._registerPendingId);if(this._cancelPendingId)c.default.unsubscribe(this._cancelPendingId);if(this._startPreloadId)c.default.unsubscribe(this._startPreloadId);
147if(null===(e=this._pendingController)||void 0===e||e.destroy(),null===(t=this._pageRouter)||void 0===t||t.destroy(),"default"!==(null===(o=this.state._pageConfig)||void 0===o?void 0:o.buildingContext))l.default.cleanUpData(this.state._pageConfig.loaders||[],this.state._pageConfig.buildingContext),delete Q._controllers[this.state._pageConfig.buildingContext];if(!(null===(i=this.state._pageConfig)||void 0===i?void 0:i.buildingContext)||"default"===this.state._pageConfig.buildingContext)window.removeEventListener("pagehide",this._pageHide),window.removeEventListener("pageshow",this._pageShow)}componentDidUpdate(){var e;if(null===(e=this.state._pageConfig)||void 0===e?void 0:e.afterRenderCallback){(0,E.loadSync)(this.state._pageConfig.afterRenderCallback)(this.state._pageConfig.id)}this._initStoreCommands(),this._initExtensions()}_showError(e,t=!0){const o={_errorTemplateOptions:m.Parking.options[(null==e?void 0:e.status)===h.HTTPStatus.NotFound?"notFound":"internal"]};if(t)this.setState(o);return v.Logger.error(null==e?void 0:e.message),c.default.dispatch("pageLoadError",!0),(0,a.addPageDeps)([Y]),m.Parking.routing({status:(null==e?void 0:e.status)||(null==e?void 0:e.error_code)||h.HTTPStatus.InternalServerError}),o}_setNewPageConfig(e,t){if(this._updatePageConfig(e,t))this._progressBar.hide()}render(){var e,t,i,n,a,l,s,c,u,p,f,m,h,C,y;let P=null,_=null,S=null;const k=q.includes(null===(e=this.state._pageConfig)||void 0===e?void 0:e.type),A=null===(t=(0,g.getPrefetchData)(this.state._pageConfig,"userInfo"))||void 0===t?void 0:t.guest;if(this.state._errorTemplateOptions)P=(0,E.loadSync)(Y);else{if(this.state._pageConfig.wrapperTemplateName)_=(0,E.loadSync)(this.state._pageConfig.wrapperTemplateName);if(this.state._pageConfig.templateName)S=(0,E.loadSync)(this.state._pageConfig.templateName)}const D=null===(n=null===(i=this.state._pageConfig)||void 0===i?void 0:i.extensions)||void 0===n?void 0:n.some((e=>"statistics"===e.key)),B=(0,o.jsx)(U.LayoutContent,{pageId:null===(a=this.state._pageConfig)||void 0===a?void 0:a.id,templateOptions:this.state._templateOptions,useStatisticExtension:D,children:(0,o.jsx)(H.PageContent,{controllers:null===(l=this.state._pageConfig)||void 0===l?void 0:l.controllers,demoBannerConfig:null===(c=null===(s=this.state._pageConfig)||void 0===s?void 0:s.templateOptions)||void 0===c?void 0:c.demoBannerConfig,isAdaptive:null===(u=this.state._pageConfig)||void 0===u?void 0:u.isAdaptive,Router:this.props.Router,isConstructorPage:k,children:(null===(p=this.state._pageConfig)||void 0===p?void 0:p.templateName)&&S?(0,o.jsx)(S,{className:"page-Controller__content "+(null===(f=this.state._pageConfig)||void 0===f?void 0:f.contentClass),Router:this.props.Router,...this.state._templateOptions}):(0,o.jsx)("span",{className:"tw-hidden-important"})})}),j=this.state._pageConfig.wrapperTemplateName&&!this.state._templateOptions.workspaceErrorConfig?(0,o.jsx)(_,{...this.state._pageConfig.wrapperTemplateOptions,children:B}):B,K=this.props.isApp?(0,o.jsx)(I.ContextProvider,{registerPending:this._registerPendingHandler,finishPendingOperations:this._finishPendingHandler,cancelFinishingPending:this._cancelFinishingPendingHandler,children:j}):j,W=(0,o.jsx)(b.Context.Consumer,{children:e=>{var t,i,n,a,l;return(0,o.jsx)(G,{close:this._closeFromContext,reloadPage:this._reloadPageCommand,reloadData:this._reloadDataCommand,setTheme:this._setThemeFromContext,setActiveTheme:this._setActiveThemeFromContext,registerPending:this._registerFromStore,cancelFinishingPending:this._cancelFromStore,startPreload:this._startPreload,toggleLogo:this._toggleLogoCommand,logoVisible:this.state._logoVisible,children:(0,o.jsx)(L.Route,{mask:(0,M.getRouteMask)(null===(t=this.state._pageConfig)||void 0===t?void 0:t.routeMask,this.state._pagePrefix,null===(i=this.state._pageConfig)||void 0===i?void 0:i.scope),initialUri:"/",progressBar:this._progressBar,getDataToRender:this._afterNavigateCallback,onBeforeChange:this._beforeNavigateCallback,children:(0,o.jsx)(O.EventSubscriber,{onClose:(0,r.withWasabyEventObject)((t=>{this._closeAppHandler(t,e)})),onRegisterPending:(0,r.withWasabyEventObject)(((e,...t)=>{this._registerPendingHandlerWithEvent(e,...t)})),onFinishPendingOperations:this._finishPendingHandler,onCancelFinishingPending:this._cancelFinishingPendingHandler,children:(0,o.jsxs)("div",{className:"page-Controller","data-entity-id":this.state._pageConfig.id,"data-entity-title":null===(n=this.state._pageConfig.title)||void 0===n?void 0:n.trim(),"data-entity-content-type":this.state._appConfig.title,children:[(null===(a=this.state._appConfig)||void 0===a?void 0:a.stylesConfig)?(0,o.jsx)($,{value:this.state._appConfig.stylesConfig.styles,validHtml:this.state._appConfig.stylesConfig.validHtml}):null,(0,o.jsx)(N.default,{ref:this._progressBarRef,isLoading:null,className:"page-Controller__progressBar"}),A&&(null===(l=this.state._pageConfig.templateOptions)||void 0===l?void 0:l._fix_1191526856)?(0,o.jsx)(x.default,{templateName:"Guest/VDOM/Header"}):null,(0,o.jsx)(F.default,{pageConfig:this.state._pageConfig}),this.state._errorTemplateOptions?(0,o.jsx)(P,{...this.state._errorTemplateOptions}):K]})})})})}}),z=(0,o.jsx)(V.CommandArea,{children:W}),Q=(0,g.getFaviconAttrs)(null!==(C=null!==(h=null===(m=this.state._pageConfig.favicon)||void 0===m?void 0:m["64x64"])&&void 0!==h?h:"string"==typeof this.state._pageConfig.favicon?this.state._pageConfig.favicon:void 0)&&void 0!==C?C:(0,v.getResourceUrl)("/cdn/SabyLogo/1.0.7/favicon/favicon.ico?v=1")),X=this.props.withoutBootstrap?(0,o.jsx)(R.default,{children:z}):(0,o.jsx)(T.default,{title:this.state._errorTemplateOptions?this.state._errorTemplateOptions.message:this.state._appConfig.title,bodyClass:`${d.controller.currentLang} ${d.controller.currentLocale} `+this.state._pageConfig.bodyClass+" "+(this.state._appConfig.interVersionClass?this.state._appConfig.interVersionClass:""),links:this.state._appConfig.links,meta:this.state._appConfig.meta,favicon:Q,isAdaptive:this._getForcedAdaptive(),allowAdaptive:this.state._pageConfig.allowAdaptive,microdata:this.state._appConfig.microdata,noscript:this.state._appConfig.noscript,scripts:this.state._appConfig.scripts,servicesPath:this.state._appConfig.servicesPath,pageName:this.props.pageName,styles:this.props.styles,rtpackCssModuleNames:this.props._rtpackCssModuleNames,rtpackJsModuleNames:this.props._rtpackJsModuleNames,dataLoaderModule:"Page/base:DataLoader",settingsController:this.props.settingsController,ignoreScrollOnBody:this.props.ignoreScrollOnBody||this.state._pageConfig.ignoreScrollOnBody,content:z});return(0,o.jsx)("div",{ref:this.props.forwardedRef,style:{display:"contents",width:"inherit",height:"inherit"},children:(0,o.jsx)(w.Wrapper,{variables:this.state._themeEditor,isOnlyStatic:null===(y=this.state._pageConfig)||void 0===y?void 0:y.isOnlyStatic,activeTheme:this._activeTheme,staticTheme:this.state._themeName,isU
147pperScope:this.props.isPopup?!1:void 0,_$isKiosk:this.props.isKiosk,children:X})})}static _createControllers(e,t){if(e.createControllersFunction)if(!Q._controllers[e.buildingContext])Q._controllers[e.buildingContext]=(0,E.loadSync)(e.createControllersFunction)({buildingContext:e.buildingContext,Router:t,scope:e.scope,mainPageId:e.mainPageId})}static _userAfterNavigateCallback(e,t){if(e)(0,E.loadAsync)(e).then((e=>{e(t)}))}static _initEnvironment(e,t){var o;if(!(null===(o=e.templateOptions)||void 0===o?void 0:o._ignoreUpdateStoreContext))Q._updateStoreContext(e.id);if(c.default.dispatch("useAdaptive",e.isAdaptive&&e.allowAdaptive,!0),e.scopeId)c.default.dispatch("_scopeId",e.scopeId,!0);if(!e.controllers)Q._createControllers(e,t);else Q._controllers[e.buildingContext]=e.controllers;if(!e.loadersData)e.loadersData=l.default.getReceivedData(e.loaders||[],t,Q._controllers[e.buildingContext]);else Q._updateNavigationChildren(e)}static _updateStoreContext(e,t){c.default.updateStoreContext(e,t)}static getPageConfig(e,t,o,i,n,a,r,l){return Q._getPageConfig(e,t,o,!!n,{},i,a,r,l)}static _getPageConfigPromise({pageUrl:e,configLoader:t,configLoaderArguments:o,isSpa:i,currentPageConfig:n,Router:a,buildingContext:r,scopeId:l}){var s;let d;const c=null===(s=t.getPageId)||void 0===s?void 0:s.call(t,e,a,n),u=z.getPageConfigPromise(c);if(u&&"default"===r)d=u;else d=t.getConfig(e,o,i,n,a,r,l);return d}static updateRouterState(e,t,o){const i=o.getHrefByPageId({pageId:e.id,pageParams:e.changedPath},e.changedQuery||{},t,!0);t.navigateReplaceState({state:i,href:t.url.getRealUrl(i)})}static _getPageConfig(e,t,o,i,n,a,r,s,d){let u;const p=(0,E.loadAsync)(e).then((e=>(u=e,Q._getPageConfigPromise({pageUrl:o,configLoader:e,configLoaderArguments:t,isSpa:i,currentPageConfig:n,Router:a,buildingContext:s,scopeId:d}).then((e=>{const t={...n};return delete t.pageIdChanged,delete t.changedQuery,delete t.changedPath,{...t,...e}})))));return(0,y.wrapTimeoutCallback)((()=>p),(0,B.getLoaderTimeout)((null==t?void 0:t.pageConfigLoaderTimeout)||15e3)).then((e=>{var t;if(!(null===(t=e.templateOptions)||void 0===t?void 0:t._ignoreUpdateStoreContext))Q._updateStoreContext(e.id,r);if(e.preloadFonts){const t=e.preloadFonts;(0,k.createMetaScriptsAndLinks)({links:(0,g.createLinks)(t)})}if(!Q._controllers[e.buildingContext])Q._createControllers(e,a);if(e.scopeId)c.default.dispatch("_scopeId",e.scopeId,!0);if(!Q._controllers[e.buildingContext])v.Logger.info(`Ðе ÑÐ¾Ð·Ð´Ð°Ð½Ñ ÐºÐ¾Ð½ÑÑоллеÑÑ Ð´Ð»Ñ ÐºÐ¾Ð½ÑекÑÑа ${e.buildingContext}`);if(e.changedQuery||e.pageIdChanged||e.changedPath){const t=Q._controllers[e.buildingContext].NavigationController;Q.updateRouterState(e,a,t)}const o=l.default.load((e.loaders.filter((e=>!i||!0===e.reloadable))||[]).map((e=>{var t,o;const i={...e.params,currentPrefetchResult:null===(o=null===(t=null==n?void 0:n.loadersData)||void 0===t?void 0:t.prefetch)||void 0===o?void 0:o.prefetchResult};return{...e,params:i}})),a,Q._controllers[e.buildingContext]),s=(0,g.preloadModules)(e.preloadModules);return Promise.all([o,s]).then((([t])=>{const o={...e,loadersData:t,controllers:Q._controllers[e.buildingContext]};return Q._updateNavigationChildren(o),(0,g.updateByConfigLoader)(o,u)}))}))}static _updateNavigationChildren(e){var t,o;const i=(0,g.getPrefetchData)(e,"navigation");if(i&&e.templateOptions.parentId){const n=e.templateOptions.parentId;if(!i.children)i.children=new A.RecordSet({keyProperty:"id",rawData:[{id:e.templateOptions.pageId,title:null===(o=null===(t=i.main)||void 0===t?void 0:t.getRecordById(n))||void 0===o?void 0:o.get("title"),pageId:e.templateOptions.pageId,parentPageId:n}]})}}static changeThemeInConfigLoaderArguments(e,t){Q.configLoaderArguments.themeName=e,Q.configLoaderArguments.activeThemeSelector=t,Q.configLoaderArguments.forceChangeTheme=!0,z.clearPageConfig()}}return Q.displayName="Page/base:Controller",Q.defaultProps={notLoadThemes:!0},Q._controllers={},t.default=Q,t}(0,{},e,t,v,l,a,qe,ve,L,j,De,Ze,ue,Oe,d,I,q,Y,x,B,M,Q,F,u,S,U,i,g,T,E,p,O,Xe,Ue,P,H,re,Se,lt,Ye,st,$),Ct=ht,yt=function(e,t,o,i,n,a,r,l,s,d){"use strict";async function c(e,t){if(!e)return;const c=await async function(e){if(!e)return{};const t=await(0,o.loadAsync)(e+`:${u}`).catch((()=>(d.logger.warn(`Ðе ÑдалоÑÑ Ð¿Ð¾Ð»ÑÑиÑÑ Ð¿Ð°ÑамеÑÑÑ Ð¸Ð· ${e}. ÐÑовеÑÑÑе ÑкÑпоÑÑиÑÑеÑÑÑ Ð»Ð¸ ${u}`),Promise.resolve())));return t||{}}(t),g=e.type,p=(0,n.patchPageConfig)(e),f=(0,r.default)(p.type),v=await(0,o.loadAsync)(f),m=(0,a.getContentPreloadModules)(v,c,p),h=function(e,t,o){const n=(o.loaders?[...o.loaders]:(0,l.getDefaultLoaders)(e)||[]).map((e=>({...e}))),a={[s.LOADERS.viewSettings.key]:s.FACTORIES.viewSettings.dataFactoryName,[s.LOADERS.informers.key]:s.FACTORIES.informers.dataFactoryName,[s.LOADERS.applicationSettings.key]:s.FACTORIES.applicationSettings.dataFactoryName,[s.LOADERS.activeTheme.key]:s.FACTORIES.activeTheme.dataFactoryName,[s.LOADERS.configuration.key]:s.FACTORIES.configurationVisibility.dataFactoryName,[s.LOADERS.featureFactory.key]:s.FACTORIES.feature.dataFactoryName,[s.LOADERS.helpSystem.key]:s.FACTORIES.helpSystemFactory.dataFactoryName,[s.LOADERS.permission.key]:s.FACTORIES.permission.dataFactoryName,[s.LOADERS.userInfo.key]:s.FACTORIES.userInfo.dataFactoryName,[s.LOADERS.statistics.key]:s.FACTORIES.statistics.dataFactoryName},r=n.filter((e=>a.hasOwnProperty(e.key))).map((e=>a[e.key]));if(t===i.PAGE_TYPES.dashboard)r.push("Dashboard/Factory");return r}(p.type,g,c);if(!g&&(null==c?void 0:c.templateName))m.push(c.templateName);return{id:p.id,type:g||i.PAGE_TYPES.main,modules:[...m||[],...h]}}
147Object.defineProperty(t,"__esModule",{value:!0}),t.getPageContentModules=t.getContentModules=t.getLayoutModules=void 0;const u="CONFIG_LOADER_ARGUMENTS";return t.getLayoutModules=async function(){var e;const t={};for(const n in i.PAGE_TYPES){if(!i.PAGE_TYPES.hasOwnProperty(n))continue;const a=i.PAGE_TYPES[n],l=(0,r.default)(a),s=await(0,o.loadAsync)(l),d=[];if(s.templateName)d.push(s.templateName);if(null===(e=s.templateOptions)||void 0===e?void 0:e.templateContentName)d.push(s.templateOptions.templateContentName);t[a]=d}return t},t.getContentModules=async function(e){if(!e)return[];const t=[];for(const o of e){const e=await c(o);if(e)t.push(e)}return t},t.getPageContentModules=c,t}(0,{},i,ie,rt,at,nt,ot,de,Q),Pt=yt,bt=function(e,t,o,i,n,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PageConfigLoader=void 0;return t.PageConfigLoader=class{constructor(e,t){this.pageId=e,this.scopeId=t}loadConfigLoader(){return(0,a.loadAsync)("SabyPage/base:ConfigLoader")}async load(e,t){var r,l;const s=await this.loadConfigLoader(),d=await s.getConfigById(this.pageId,this.scopeId,{contentConfig:e},!0,{},void 0,t,o("context-")),c=await n.default.load(d.loaders.filter((e=>!0===e.reloadable))||[],t,i.default._controllers[d.buildingContext]),u=[];if(null===(r=c.navigation)||void 0===r?void 0:r.tabs)u.push((0,a.loadAsync)("SabyPage/widgets/Tabs")),u.push((0,a.loadAsync)("Controls/tabs"));if(null===(l=c.navigation)||void 0===l?void 0:l.master)u.push((0,a.loadAsync)("SabyPage/widgets/MasterView"));return await Promise.all(u),{...d,loadersData:c,controllers:i.default._controllers[d.buildingContext]}}},t}(0,{},D,ht,qe,i),_t=function(e,t,o,i,n,a,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const l={loadData:async(e,t,i)=>(0,r.loadAsync)("SabyPage/base:ConfigLoader").then((async t=>{var i,l;const s=await t.getConfigById(e.pageId,e.scopeId,{contentConfig:e.customContentConfig},!0,{},void 0,e.router,o("context-")),d=await a.default.load(s.loaders.filter((e=>!0===e.reloadable))||[],e.router,n.default._controllers[s.buildingContext]),c=[];if(null===(i=d.navigation)||void 0===i?void 0:i.tabs)c.push((0,r.loadAsync)("SabyPage/widgets/Tabs")),c.push((0,r.loadAsync)("Controls/tabs"));if(null===(l=d.navigation)||void 0===l?void 0:l.master)c.push((0,r.loadAsync)("SabyPage/widgets/MasterView"));return await Promise.all(c),{...s,loadersData:d,controllers:n.default._controllers[s.buildingContext]}})),slice:i.Slice};return t.default=l,t}(0,{},D,V,ht,qe,i),St=_t,kt=function(e,t,o,i,n,a,r,l,s,d,c,u,g,p,f,v,m,h,C,y,P,b,_,S,k,A,I,E,O,w,T,R,L,N,F){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const D=(e,t)=>{const o=e=>"object"==typeof e&&null!==e;if(o(e)&&o(t))return{...e,...t};else return null!=e?e:t},x={interFont:!0,interFontBold:!0,interFontBoldItalic:!0,interFontMedium:!0,interFontMediumItalic:!0,interFontItalic:!0},M=(e,t,o={},i)=>{var n,a,r;let l=[];if(v.detection.isMac)l=[...o.preloadFontsMac||e.preloadFontsMac||[],...(null===(n=t.contentConfig)||void 0===n?void 0:n.preloadFonts)||[],...t.preloadFonts||[]];else l=[...o.preloadFonts||e.preloadFonts||[],...(null===(a=t.contentConfig)||void 0===a?void 0:a.preloadFonts)||[],...t.preloadFonts||[]];if(null===(r=t.contentConfig)||void 0===r?void 0:r.preloadTensorFontItalic)l.push("interFontItalic");if(l=l.map((e=>{if(x[e])return v.constants[e+(v.detection.isMac?"Mac":"")];else return e})),!1!==t.preloadSbisIconsFont)l.push(v.constants.cbucIcons),l.push(v.constants.cbucIcons24);return l},B=(e,t,o)=>{let i=j(e,t);if(!i&&o.mainPageId)i=o.mainPageId;return i},j=(e,t)=>{const o="page/:pageId";return t.maskResolver.calculateUrlParams(o,e).pageId||t.maskResolver.calculateUrlParams(o,t.urlRewriter.get(t.url.getLogicUrl())).pageId||t.maskResolver.calculateUrlParams(o,t.urlRewriter.get("/")).pageId},U=(e={},t,o,i,n)=>{var a,r;const l="landing"===(null==t?void 0:t.type)?null:o.footerConfig,s="landing"===(null==t?void 0:t.type)?null:n,d=e.footerConfig||(null===(a=t.contentConfig)||void 0===a?void 0:a.footerConfig)||l?{...e.footerConfig,...null===(r=t.contentConfig)||void 0===r?void 0:r.footerConfig,...l}:void 0;return i||d||s?{templateName:"SabyPage/widgets/FooterTemplate",templateOptions:{useAdaptiveTemplate:i,footerConfig:d,additionalConfig:s}}:void 0},H=(e,t)=>{var o,i,n;let a={};if(e&&(null===(o=null==t?void 0:t.contentConfig)||void 0===o?void 0:o.allowAdaptive)&&(null===(i=t.contentConfig)||void 0===i?void 0:i.adaptiveTemplateContentName))a=t.contentConfig.adaptiveTemplateContentOptions;else if(null===(n=t.contentConfig)||void 0===n?void 0:n.templateContentName)a=t.contentConfig.templateContentOptions;return{...a}},V=(e,t={})=>{const o=[];if(e.meta)o.push(...e.meta);if(t.meta)o.push(...t.meta);return o},G=(e,t,o,i)=>{var n,a;let r=t.extensions||e.extensions||i.extensions||[];if(null===(n=o.contentConfig)||void 0===n?void 0:n.extensions)r=r.concat(o.contentConfig.extensions);if(o.checkShortCut)r=r.concat([y.EXTENSIONS.shortcut]);const l=null===(a=o.contentConfig)||void 0===a?void 0:a.disableExtensions;
147if(l)r=r.filter((e=>l.indexOf(e.key)<0));return r},$=(e,t,o,i,n,a,r)=>{const l=n?"sabyPage-AdaptiveLayout__body":o===A.PAGE_TYPES.entity&&null===i?i:e;let s=t?l+" "+t:l;if(o===A.PAGE_TYPES.entity&&a)s+=" sabyPage-EntityLayout__body_fix1186012036";if(o===A.PAGE_TYPES.landing||o===A.PAGE_TYPES.form)s+=" _forced_disable-bigger-fonts-for-phones";if(o===A.PAGE_TYPES.entity&&!1!==r)s+=" sabyPage-EntityLayout__unaccented-background";if(s+=" ws-is-sabypage",o!==A.PAGE_TYPES.frame)s+=(()=>{if(v.detection.isMobilePlatform&&!v.detection.isPhone&&"true"===P.query.get.bodyWidthNative)return"";else return!v.detection.isPhone?" sabyPage-MainLayout__body_width":""})();return s},K=(e,t={},o=!1,i={},n=(0,d.getRootRouter)(!0),a,r,l)=>{var s;const c=B(e,n,i),u=r||(0,g.getScopeId)(n,null===(s=i.controllers)||void 0===s?void 0:s.ApplicationSettingsController);return Y(c,u,t,o,i,e,n,a,l)},Y=(e,t,i={},n=!1,r={},l,s=(0,d.getRootRouter)(!0),c,g)=>{const f=(0,p.loadPageConfig)(e,t,void 0!==i.pageConfigLoader?i.pageConfigLoader:"Page/base:PageConfigLoader",i.pageConfigLoaderArguments||{},i.pageConfigLoaderTimeout,i.ignoreRedirectUrl,void 0!==i.applicationConfigLoader?i.applicationConfigLoader:"Page/base:ApplicationConfigLoader",i.applicationId,i.getPageToRedirect,i,!(0,b.isEmpty)(r)||n,s,c,r);let h=!1;return f.then((e=>{var n;e.scopeId=e.scopeId||t,e.scope=e.scope||r.scope,e.groupId=e.scopeId,e.applicationContextId=e.applicationContextId||r.applicationContextId;const l=(0,E.default)(e.type);if(e.type===A.PAGE_TYPES.custom||i.disableAdaptive)h=!1;else{const e=i.adaptiveMode||(0,k.getAdaptiveModeForLoaders)(),t=v.detection.isPhone&&e.device.isPhone();h=(0,a.isAdaptive)(t)}return m.default.dispatch("useAdaptive",h&&(null===(n=null==e?void 0:e.contentConfig)||void 0===n?void 0:n.allowAdaptive),!0),m.default.dispatch("hotKeysFromPageConfig",e.hotKeys,!0),(0,o.loadAsync)(l).then((t=>({pageConfig:e,pageConfigByType:t})))})).then((({pageConfig:t,pageConfigByType:o})=>{var a,l,d,p,f,v,m,C,y,b,S,A,E,w,R,L,N,F,x,B,j,K,Y;if(t.stopRender)return t;if(t.contentConfig={...t.contentConfig,...i.contentConfig,contextConfig:D(null===(a=t.contentConfig)||void 0===a?void 0:a.contextConfig,null===(l=i.contentConfig)||void 0===l?void 0:l.contextConfig),formConfig:{...null===(d=t.contentConfig)||void 0===d?void 0:d.formConfig,...null===(p=i.contentConfig)||void 0===p?void 0:p.formConfig}},t.contentConfig&&!("allowAdaptive"in t.contentConfig))t.contentConfig.allowAdaptive=null===(f=o.contentConfig)||void 0===f?void 0:f.allowAdaptive;const W=(0,O.default)(o,i,t.contentConfig),z=(0,u.getPageError)(t,s,g);if(t.mainPage&&"default"!==t.mainPage&&t.scopeId)t.mainPageUrl=`page/${t.mainPage}`;if(t.scopeId)t.mainPageUrl=`group/${t.scopeId}/`+(t.mainPageUrl||"");t.mainPageUrl=((0,P.getConfig)("appRoot")||"/")+(t.mainPageUrl||"");const Q=i.themeName||t.themeName||(null==r?void 0:r.fullThemeName),X=r.applicationTitle||t.applicationTitle,J=r.mainPageId||t.mainPage,Z=!i.disableNoScriptRedirect?o.noscript||i.noscript:void 0;if(!t.id)t.id=e||J;const ee=(null===(v=null==t?void 0:t.contentConfig)||void 0===v?void 0:v.emptyLayout)?"":((e,t,o,i,n)=>{let a;if(!o.type&&(e.templateName||o.templateName)){if(n)a=e.adaptiveTemplateName||o.adaptiveTemplateName;if(!a)a=e.templateName||o.templateName}else{if(n)a=i.adaptiveTemplateName||t.adaptiveTemplateName||o.adaptiveTemplateName||e.adaptiveTemplateName;if(!a)a=i.templateName||t.templateName||o.templateName||e.templateName}return a})(i,r,t,o,h),te=(null===(m=null==t?void 0:t.contentConfig)||void 0===m?void 0:m.emptyLayout)?{}:((e,t,o={},i,n,a,r,l,s,d,c)=>{var u,g,p,f,v,m,h,C,y,P,b,S,k,A,I,E,O,w,T,R,L,N,F,D,x,M,B,j,V,G,$,K,Y,W,z,Q,X,J,Z,ee,te,oe,ie,ne,ae,re,le,se,de,ce,ue,ge,pe,fe,ve;const me=null===(u=e.contentConfig)||void 0===u?void 0:u.workspaceConfig,he=null===(g=e.contentConfig)||void 0===g?void 0:g.toolbarConfig,Ce=(null==i?void 0:i.applicationTitle)||e.applicationTitle,ye={...null===(p=null==t?void 0:t.templateOptions)||void 0===p?void 0:p.sidebarSettings,...null===(f=null==o?void 0:o.templateOptions)||void 0===f?void 0:f.sidebarSettings,...null===(v=null==i?void 0:i.templateOptions)||void 0===v?void 0:v.sidebarSettings,...null===(m=e.contentConfig)||void 0===m?void 0:m.interfaceSettings,...e.sidebarSettings},Pe=e.id===s,be=e.footerConfig||(null===(h=null==i?void 0:i.templateOptions)||void 0===h?void 0:h.additionalConfig);return{pageId:e.id,...t.templateOptions,...!a?e.contentConfig:{emptyViewConfig:null===(C=e.contentConfig)||void 0===C?void 0:C.emptyViewConfig,contrastBackgroun
147d:null===(y=e.contentConfig)||void 0===y?void 0:y.contrastBackground,allowAdaptive:null===(P=e.contentConfig)||void 0===P?void 0:P.allowAdaptive},langDictionary:null===(b=e.contentConfig)||void 0===b?void 0:b.langDictionary,buildingContext:c,workspaceConfig:!a?me:void 0,toolbarConfig:!a?he:void 0,hideTabs:null===(S=e.contentConfig)||void 0===S?void 0:S.hideTabs,workspaceErrorConfig:a,licenseConfig:e.licenseConfig||(null===(k=e.contentConfig)||void 0===k?void 0:k.licenseConfig),redirectConfig:null===(A=e.contentConfig)||void 0===A?void 0:A.redirectConfig,pageTitle:_(e.title),pageRights:e.rights,headingTitle:Pe?"":_(e.title),isMainPage:Pe,parentId:e.parentId,formConfig:!a?null===(I=e.contentConfig)||void 0===I?void 0:I.formConfig:void 0,prefetchModules:n,logo:(null===(E=null==i?void 0:i.templateOptions)||void 0===E?void 0:E.logo)||(null===(O=null==ye?void 0:ye.logoData)||void 0===O?void 0:O.logo),logoType:(null===(w=null==i?void 0:i.templateOptions)||void 0===w?void 0:w.logoType)||(null===(T=null==ye?void 0:ye.logoData)||void 0===T?void 0:T.logoType),logoDesc:(null===(R=null==i?void 0:i.templateOptions)||void 0===R?void 0:R.logoDesc)||(null===(L=null==ye?void 0:ye.logoData)||void 0===L?void 0:L.logoDesc)||e.logoDesc,favicon:(null==o?void 0:o.favicon)||(null==i?void 0:i.favicon)||(null==t?void 0:t.favicon),logoUrl:(null===(N=null==i?void 0:i.templateOptions)||void 0===N?void 0:N.logoUrl)||e.logoUrl||e.mainPageUrl,contentLogo:null===(F=null==i?void 0:i.templateOptions)||void 0===F?void 0:F.contentLogo,applicationTitle:Ce,sidebarTheme:q(l).sidebarTheme,allowChangeConfiguration:(null===(D=null==i?void 0:i.templateOptions)||void 0===D?void 0:D.allowChangeConfiguration)||e.allowChangeConfiguration,showAppSelector:(null===(x=null==i?void 0:i.templateOptions)||void 0===x?void 0:x.showAppSelector)||e.showAppSelector,showSchemeSelector:(null===(M=null==i?void 0:i.templateOptions)||void 0===M?void 0:M.showSchemeSelector)||e.showSchemeSelector,sidebarMode:(null===(B=null==i?void 0:i.templateOptions)||void 0===B?void 0:B.sidebarMode)||e.sidebarMode,groupId:r,scopeId:r,profilePageId:(null===(j=null==i?void 0:i.templateOptions)||void 0===j?void 0:j.profilePageId)||e.profilePageId,nameClickHandler:(null===(V=null==i?void 0:i.templateOptions)||void 0===V?void 0:V.nameClickHandler)||e.nameClickHandler,...o.templateOptions||{},helpButtonConfig:{...null===(G=null==o?void 0:o.templateOptions)||void 0===G?void 0:G.helpButtonConfig,...null===($=e.contentConfig)||void 0===$?void 0:$.helpButtonConfig},footerConfig:U(o,e,ye,d,be),additionalConfig:be,informersConfig:{...null===(K=null==t?void 0:t.templateOptions)||void 0===K?void 0:K.informersConfig,...null===(Y=null==o?void 0:o.templateOptions)||void 0===Y?void 0:Y.informersConfig,...null===(W=e.contentConfig)||void 0===W?void 0:W.informersConfig},sidebarSettings:{...ye,showLogo:ye.showLogo&&d},rightPanelConfig:{...null===(z=e.contentConfig)||void 0===z?void 0:z.rightPanelConfig,...null===(Q=null==o?void 0:o.templateOptions)||void 0===Q?void 0:Q.rightPanelConfig},noticeCenterConfig:null===(null===(X=e.contentConfig)||void 0===X?void 0:X.noticeCenterConfig)||null===(null===(J=null==o?void 0:o.templateOptions)||void 0===J?void 0:J.noticeCenterConfig)||!1===ye.noticeCenterVisible?null:{...null===(Z=e.contentConfig)||void 0===Z?void 0:Z.noticeCenterConfig,...null===(ee=null==o?void 0:o.templateOptions)||void 0===ee?void 0:ee.noticeCenterConfig},floatingAreaConfig:(null===(te=e.contentConfig)||void 0===te?void 0:te.floatingAreaConfig)||ye.floatingAreaConfig,demoBannerConfig:ye.demoBannerConfig,quickAddSource:(null===(oe=null==i?void 0:i.templateOptions)||void 0===oe?void 0:oe.quickAddSource)||(null===(ie=null==o?void 0:o.templateOptions)||void 0===ie?void 0:ie.quickAddSource)||(null===(ne=null==t?void 0:t.templateOptions)||void 0===ne?void 0:ne.quickAddSource),quickAddSettings:(null===(ae=null==i?void 0:i.templateOptions)||void 0===ae?void 0:ae.quickAddSettings)||(null===(re=null==o?void 0:o.templateOptions)||void 0===re?void 0:re.quickAddSettings)||(null===(le=null==t?void 0:t.templateOptions)||void 0===le?void 0:le.quickAddSettings),templateContentName:(d&&(null===(se=null==e?void 0:e.contentConfig)||void 0===se?void 0:se.allowAdaptive)?(null===(de=e.contentConfig)||void 0===de?void 0:de.adaptiveTemplateContentName)||(null===(ce=null==o?void 0:o.templateOptions)||void 0===ce?void 0:ce.adaptiveTemplateContentName)||(null===(ue=t.templateOptions)||void 0===ue?void 0:ue.adaptiveTemplateContentName):"")||(null===(ge=e.contentConfig)||void 0===ge?void 0:ge.templateContentName)||(null===(pe=null==o?void 0:o.templateOptions)||void 0===pe?void 0:pe.templateContentName)||(null===(fe=null==t?void 0:t.templateOptions)||void 0===fe?void 0:fe.templateContentName),templateContentOptions:H(d,e),_ignoreUpdateStoreContext:(null===(ve=e.contentConfig)||void 0===ve?void 0:ve._ignoreUpdateStoreContext)||o._ignoreUpdateStoreContext}})(t,o,i,r,W,z,t.scopeId,Q,J,h,c),oe={...null===(C=null==o?void 0:o.templateOptions)||void 0===C?void 0:C.sidebarSettings,...null===(y=t.contentConfig)||void 0===y?void 0:y.interfaceSettings,...null===(b=null==r?void 0:r.templateOptions)||void 0===b?void 0:b.sidebarSettings,...null===(S=null==i?void 0:i.templateOptions)||void 0===S?void 0:S.sidebarSettings,...t.sidebarSettings}
147,ie=!(null==t?void 0:t.title)&&X?X:_((null==i?void 0:i.title)||(null==t?void 0:t.title)||(null==o?void 0:o.title)),ne={id:t.id,originalPageId:t.originalPageId,buildingContext:c||"default",createControllersFunction:"Page/loaders:createControllers",groupId:t.scopeId,allowSaveConfig:t.allowSaveConfig,scope:t.scope,scopeId:t.scopeId,pageIdChanged:t.pageIdChanged,changedQuery:t.changedQuery,changedPath:t.changedPath,mainPageId:J,applicationId:r.applicationId||t.applicationId,configurationId:r.configurationId||t.configurationId,applicationContextId:t.applicationContextId,mainPageUrl:r.mainPageUrl||t.mainPageUrl||void 0,appRedirect:t.appRedirect,applicationTitle:X,...o,...i,extensions:G(i,r,t,o),templateName:ee,wrapperTemplateName:null===(A=t.contentConfig)||void 0===A?void 0:A.wrapperTemplateName,meta:V(o,i),scripts:i.scripts,favicon:(null==i?void 0:i.favicon)||(null==r?void 0:r.favicon)||(null==t?void 0:t.favicon)||(null==o?void 0:o.favicon),preloadFonts:M(o,t,i),title:ie,prefetchModules:W,bodyClass:$(o.bodyClass,i.bodyClass,t.type,null===(E=t.contentConfig)||void 0===E?void 0:E.backgroundStyle,h,null===(w=t.contentConfig)||void 0===w?void 0:w.fix1186012036,null===(R=t.contentConfig)||void 0===R?void 0:R.showNavigation),contentClass:o.contentClass,preloadModules:(null===(L=null==t?void 0:t.contentConfig)||void 0===L?void 0:L.emptyLayout)?[]:(0,I.getPreloadModules)(o,i,t,ee,te),loaders:(0,T.getLoaders)(t,o,i,z,n,t.scopeId,r.mainPageId||t.mainPage,{interfaceSettings:oe,templateOptions:te,emptyLayout:!!(null===(N=null==t?void 0:t.contentConfig)||void 0===N?void 0:N.emptyLayout)},r.applicationId||t.applicationId,r.configurationId||t.configurationId,h,{buildingContext:c,title:ie}),noscript:Z,templateOptions:te,fullThemeName:Q,getHeadingCallback:(null===(F=null==t?void 0:t.contentConfig)||void 0===F?void 0:F.getHeadingCallback)||o.getHeadingCallback||null,titleVisibility:null===(x=null==t?void 0:t.contentConfig)||void 0===x?void 0:x.titleVisibility,themeName:q(Q).theme,isAdaptive:h,adaptiveMode:(0,k.getAdaptiveModeForLoaders)(),type:t.type,allowAdaptive:i.disableAdaptive?!1:null===(B=t.contentConfig)||void 0===B?void 0:B.allowAdaptive,ignoreScrollOnBody:null===(j=t.contentConfig)||void 0===j?void 0:j.ignoreScrollOnBody,isOnlyStatic:null===(K=t.contentConfig)||void 0===K?void 0:K.isOnlyStatic};if(ne.routeMask=t.contentConfig.routeMask,null===(Y=t.contentConfig)||void 0===Y?void 0:Y.onLoadResourceError)ne.onLoadResourceError=t.contentConfig.onLoadResourceError;return ne}))},q=(e="")=>{const t=e.split("/");return{theme:t[0],sidebarTheme:t[0]||"default"}},W=e=>{var t,i,n,a;const{redirectConfig:r}=e.templateOptions;let l=!1;if(null==r?void 0:r.isRedirectCallback){const{prefetch:s}=e.loadersData||{},d=(0,o.loadSync)(null==r?void 0:r.isRedirectCallback),{applicationId:c,id:u,configurationId:g}=e;l=d(s,null===(a=null===(n=null===(i=null===(t=null==s?void 0:s.prefetchResult)||void 0===t?void 0:t.loadResults)||void 0===i?void 0:i.prefetch)||void 0===n?void 0:n.formFactory)||void 0===a?void 0:a.record,{applicationId:c,pageId:u,configurationId:g})}return l},z=e=>{var t,i,n,a,r;let l=!1;const{emptyViewConfig:s,workspaceErrorConfig:d,licenseConfig:c}=e.templateOptions;if(e.isAdaptive&&c)l=!0;else if(e.templateOptions.emptyViewConfig){const{prefetch:c}=e.loadersData||{};if(Q(c),d)l=!!d.license;else if((null==s?void 0:s.isEmptyCallback)&&!(c instanceof Promise)){if(l=(0,o.loadSync)(s.isEmptyCallback)(c,null===(a=null===(n=null===(i=null===(t=null==c?void 0:c.prefetchResult)||void 0===t?void 0:t.loadResults)||void 0===i?void 0:i.prefetch)||void 0===n?void 0:n.formFactory)||void 0===a?void 0:a.record),l&&s)s.emptyTemplateOptionsGetterArguments={...null!==(r=s.emptyTemplateOptionsGetterArguments)&&void 0!==r?r:{},prefetch:null==c?void 0:c.data}}}else if(c)l=!0;return l},Q=e=>{var t,i,n;const a=null===(i=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.dashboardData)||void 0===i?void 0:i.prefetchResult;if(a){const t=(0,o.loadSync)("Frame-DataEnv/dataLoader");e.data.dashboardData.prefetchResult={...a,widgetsData:t.convertDataMap(null===(n=null==a?void 0:a.sources)||void 0===n?void 0:n.datamap)}}},X=e=>{var t,i,n;let a;const r=null===(t=e.loadersData)||void 0===t?void 0:t.prefetch,l=null===(n=null===(i=e.templateOptions)||void 0===i?void 0:i.prefetchConfig)||void 0===n?void 0:n.isErrorCallback;if(l&&!(r instanceof Promise)&&!(null==r?void 0:r.configError)){a=(0,o.loadSync)(l)(c.default.getPrefetchResult(r),e.templateOptions.prefetchConfig.isErrorCallbackOptions)||null}return a},J=e=>{var t,i,n,a,r,l,s;let d;const c=null===(r=null===(a=null===(n=null===(i=null===(t=e.loadersData)||void 0===t?void 0:t.prefetch)||void 0===i?void 0:i.prefetchResult)||void 0===n?void 0:n.loadResults)||void 0===a?void 0:a.prefetch)||void 0===r?void 0:r.formFactory,u=null===(s=null===(l=e.templateOptions)||void 0===l?void 0:l.formMethodConfig)||void 0===s?void 0:s.isErrorCallback;if(u){d=(0,o.loadSync)(u)((null==c?void 0:c.record)||(null==c?void 0:c.errorConfig))||null}return d},Z=e=>{var t;const o=null===(t=e.loadersData)||void 0===t?void 0:t.prefetch;let i;if(o)i=c.default.getPrefetchResult(o);return i};return t.default={getConfig:K,getDataToRender:async(e,t,a)=>
147{const c=(0,R.getLoaderTimeout)((null==t?void 0:t.pageConfigLoaderTimeout)?null==t?void 0:t.pageConfigLoaderTimeout:7500),u=a||(0,d.getRootRouter)(!0);if((0,N.disablePartialSend)(),null==t?void 0:t.themeName){const e=null==t?void 0:t.themeName.split("/"),o=[(0,i.getThemeController)().getActiveTheme({isFallback:!0,selector:e[0]})];if(e[1])o.push((0,i.getThemeController)().getActiveTheme({isFallback:!0,selector:e[1]}))}return(0,f.wrapTimeoutCallback)((()=>K(e,t,!1,{},u)),c).then((e=>{var i,d;if(e.stopRender)return Promise.resolve({title:e.title,isRenderingAborted:!0,stopRender:!0});if(t.prerender)return S.Logger.info(`ÐÑеÑÐµÐ½Ð´ÐµÑ ÑÑÑаниÑÑ ${e.id} Ñ Ð¼Ð¸Ð½Ð¸Ð¼Ð°Ð»Ñной инÑоÑмаÑией.`),Promise.resolve({title:e.title,favicon:e.favicon,isRenderingAborted:!0});if(e.appRedirect)return Promise.resolve({title:e.title,isRenderingAborted:!0});const c=Promise.all(e.preloadModules.map((e=>{(0,h.addPageDeps)([e]),(0,o.loadAsync)(e)})));if(!(null===(i=e.templateOptions)||void 0===i?void 0:i._ignoreUpdateStoreContext))m.default.updateStoreContext(e.id);if(e.createControllersFunction)e.controllers=(0,o.loadSync)(e.createControllersFunction)({buildingContext:e.buildingContext,Router:a,scope:e.scope,mainPageId:e.mainPageId});if(!e.controllers)S.Logger.info(`Ðе ÑÐ¾Ð·Ð´Ð°Ð½Ñ ÐºÐ¾Ð½ÑÑоллеÑÑ Ð´Ð»Ñ ÐºÐ¾Ð½ÑекÑÑа ${e.buildingContext}`);if(e.scopeId)m.default.dispatch("_scopeId",e.scopeId,!0);if(e.changedQuery||e.pageIdChanged||e.changedPath)r.default.updateRouterState(e,u,C.default);const g=n.default.load(e.loaders||[],u,e.controllers);if(!1!==(null===(d=e.templateOptions)||void 0===d?void 0:d.partialRender)&&!1!==(null==t?void 0:t.partialRender))(0,l.default)("ConfigLoader","ÐаÑало вклÑÑÐµÐ½Ð¸Ñ ÑаÑÑиÑной оÑдаÑи ÑÑаÑики"),(0,N.enablePartialSend)(),(0,l.default)("ConfigLoader","ÐавеÑÑение вклÑÑÐµÐ½Ð¸Ñ ÑаÑÑиÑной оÑдаÑи ÑÑаÑики");const p=(0,s.createAppConfig)(e);return(0,l.default)("ConfigLoader","ÐаÑало оÑпÑавки пеÑвой паÑки html"),(0,L.createBaseHeadTags)({links:p.links,meta:p.meta,noscript:p.noscript,scripts:p.scripts}),(0,F.addOnLoadResourceErrorScript)(e.onLoadResourceError),(0,l.default)("ConfigLoader","ÐавеÑÑение оÑпÑавки пеÑвой паÑки html"),Promise.all([g,c]).then((async([t])=>{const o={...e,loadersData:t},i=(0,s.getTitle)(o,(0,s.getPrefetchData)(e,"navigation"));(0,L.createBaseHeadTags)({title:i});const n=await(0,w.getBreakWithStatusResult)(o);if(n)return n;if(o.isEmptyView=z(o),o.isRedirectEmptyView=W(o),!o.templateOptions.workspaceErrorConfig){const e=X(o);if(e)o.templateOptions.workspaceErrorConfig=e}if(!o.templateOptions.workspaceErrorConfig){const e=J(o);if(e)o.templateOptions.workspaceErrorConfig=e}if(o.wrapperTemplateName)o.wrapperTemplateOptions={prefetchResult:Z(o)};return o}
147))}))},getConfigById:Y,isEmptyViewVisible:z,isRedirectVisible:W,getPrefetchError:X,getFormError:J,getPrefetchResult:Z,getPageId:B},t}(0,{},i,s,qe,Pe,ht,Fe,Ze,O,he,mt,Te,ut,x,F,j,l,pt,de,Q,P,o,d,m,ie,at,nt,ke,it,vt,Se,E,O,_e),At=kt,It=function(e,t,o,i,n,a,r,l,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.usePreloadCallback=void 0;class d extends i.Control{constructor(){super(...arguments),this._template=a}_beforeMount(e){this._startPreloadDebounce=(0,r.debounce)((()=>{if(this._isActive&&"true"!==l.cookie.get("disablePreload"))n.default.sendCommand("startPreload",this._options.pageId)}),50)}_mouseMove(){this._startPreloadDebounce()}_mouseEnter(){var e;this._isActive=!0,null===(e=this._startPreloadDebounce)||void 0===e||e.call(this)}_mouseLeave(){this._isActive=!1}}return t.default=d,t.usePreloadCallback=function(){return(0,o.useContext)(s.pageContext).startPreload},t}(0,{},t,f,j,Be,b,Q,ht),Et=It,Ot=function(e,t,o,i,n,a,r){"use strict";function l(e){var t;const l=(0,r.useSlice)(null!==(t=e.storeId)&&void 0!==t?t:"page"),[s,d]=(0,i.useState)(),c=null!=s?s:null==l?void 0:l.state;if((0,i.useEffect)((()=>{if(!e.pageId)return;if((null==c?void 0:c.id)===e.pageId)return;new a.PageConfigLoader(e.pageId,e.scopeId).load(e.contentConfig||{},e.Router).then((e=>{d(e)})).catch((e=>{}))}),[e.pageId]),!c)return null;else return(0,o.jsx)(n.default,{Router:e.Router,pageConfig:c,receivedStateKey:"pageRC_"+c.id,configLoader:"SabyPage/base:ConfigLoader",withoutBootstrap:!0})}Object.defineProperty(t,"__esModule",{value:!0});return t.default=l,l.displayName="Page/base:Area",t}(0,{},e,t,ht,bt,G),wt=Ot,J.getSiteNavigationSource=J.getHeadLinksByApplication=J.ApplicationSettingsProvider=J.connectApplicationSettings=J.pageAreaFabric=J.Area=J.PrefetchHelper=J.getMask=J.getScope=J.getScopeId=J.getToolbarPreloadModules=J.getPageContentModules=J.getContentModules=J.getLayoutModules=J.ConfigLoader=J.PageConfigLoader=J.ApplicationConfigLoader=J.Manifest=J.META=J.EXTENSIONS=J.LOADERS=J.FACTORIES=J.DeviceChecker=J.getBuildingContext=J.ContextOptionsProvider=J.ContextOptionsConsumer=J.usePreloadCallback=J.Preloader=J.getPrefetchData=J.prepareBreadCrumbsData=J.getThemeWebParamsKey=J.hasQueryParam=J.parseQueryParams=J.setTheme=J.loadTheme=J.getActiveTitle=J.pageHasNavigation=J.PAGE_PREFIX=J.NavigationControllerClass=J.NavigationController=J.PageRouter=J.BaseLoader=J.setS3DSCookie=J.initCookie=J.PageConfig=J.openMobileVersion=J.openFullVersion=J.isAdaptive=J.cleanUrl=J.ProgressBar=J.getHotKeyMustBePrevented=J.setHotKeyMustBePrevented=J.withPageContext=J.PageControllerContextConsumer=J.getPageControllerContext=J.Controller=J.DataLoader=void 0,Object.defineProperty(J,"ApplicationConfigLoader",{enumerable:!0,get:function(){return gt.loadApplicationConfigStandart}}),Object.defineProperty(J,"PageConfigLoader",{enumerable:!0,get:function(){return gt.loadPageConfigStandart}}),Object.defineProperty(J,"DataLoader",{enumerable:!0,get:function(){return We.default}}),Object.defineProperty(J,"Controller",{enumerable:!0,get:function(){return Ct.default}}),Object.defineProperty(J,"getPageControllerContext",{enumerable:!0,get:function(){return Ct.getPageControllerContext}}),Object.defineProperty(J,"PageControllerContextConsumer",{enumerable:!0,get:function(){return Ct.PageControllerContextConsumer}}),Object.defineProperty(J,"withPageContext",{enumerable:!0,get:function(){return Ct.withPageContext}}),Object.defineProperty(J,"setHotKeyMustBePrevented",{enumerable:!0,get:function(){return ae.setHotKeyMustBePrevented}}),Object.defineProperty(J,"getHotKeyMustBePrevented",{enumerable:!0,get:function(){return ae.getHotKeyMustBePrevented}}),Object.defineProperty(J,"ProgressBar",{enumerable:!0,get:function(){return Je.default}}),Object.defineProperty(J,"cleanUrl",{enumerable:!0,get:function(){return xe.cleanUrl}}),Object.defineProperty(J,"isAdaptive",{enumerable:!0,get:function(){return be.isAdaptive}}),Object.defineProperty(J,"openFullVersion",{enumerable:!0,get:function(){return be.openFullVersion}}),Object.defineProperty(J,"openMobileVersion",{enumerable:!0,get:function(){return be.openMobileVersion}}),Object.defineProperty(J,"PageConfig",{enumerable:!0,get:function(){return pe.default}}),Object.defineProperty(J,"initCookie",{enumerable:!0,get:function(){return we.initCookie}}),Object.defineProperty(J,"setS3DSCookie",{enumerable:!0,get:function(){return we.setS3DSCookie}}),Object.defineProperty(J,"BaseLoader",{enumerable:!0,get:function(){return Qe.default}}),Object.defineProperty(J,"PageRouter",{enumerable:!0,get:function(){return me.default}}),Object.defineProperty(J,"NavigationController",{enumerable:!0,get:function(){return ft.default}}),Object.defineProperty(J,"NavigationControllerClass",{enumerable:!0,get:function(){return ct.NavigationControllerClass}}),Object.defineProperty(J,"PAGE_PREFIX",{enumerable:!0,get:function(){return ct.PAGE_PREFIX}}),Object.defineProperty(J,"pageHasNavigation",{enumerable:!0,get:function(){return et.pageHasNavigation}}),Object.defineProperty(J,"getActiveTitle",{enumerable:!0,get:function(){return et.getActiveTitle}}),Object.defineProperty(J,"loadTheme",{enumerable:!0,get:function(){return et.loadTheme}}),Object.defineProperty(J,"setTheme",{enumerable:!0,get:function(){return et.setTheme}}),Object.defineProperty(J,"parseQueryParams",{enumerable:!0,get:function(){return et.parseQueryParams}}),Object.defineProperty(J,"hasQueryParam",{enumerable:!0,get:function(){return et.hasQueryParam}}),Object.defineProperty(J,"getThemeWebParamsKey",{enumerable:!0,get:function(){return et.getThemeWebParamsKey}}),Object.defineProperty(J,"prepareBreadCrumbsData",{enumerable:!0,get:function(){return et.prepareBreadCrumbsDataInner}}),Object.defineProperty(J,"getPrefetchData",{enumerable:!0,get:function(){return et.getPrefetchData}}),Object.defineProperty(J,"Preloader",{enumerable:!0,get:function(){return Et.default}}),Object.defineProperty(J,"usePreloadCallback",{enumerable:!0,get:function(){return Et.usePreloadCallback}}),Object.defineProperty(J,"ContextOptionsConsumer",{enumerable:!0,get:function(){return Ve.default}}),Object.defineProperty(J,"ContextOptionsProvider",{enumerable:!0,get:function(){return $e.default}}),Object.defineProperty(J,"getBuildingContext",{enumerable:!0,get:function(){return oe.getBuildingContext}}),Object.defineProperty(J,"DeviceChecker",{enumerable:!0,get:function(){return se.default}}),Object.defineProperty(J,"FACTORIES",{enumerable:!0,get:function(){return ce.FACTORIES}}),Object.defineProperty(J,"LOADERS",{enumerable:!0,get:function(){return ce.LOADERS}}),Object.defineProperty(J,"EXTENSIONS",{enumerable:!0,get:function(){return ce.EXTENSIONS}}),Object.defineProperty(J,"META",{enumerable:!0,get:function(){return ce.META}}),Object.defineProperty(J,"Manifest",{enumerable:!0,get:function(){return ce.Manifest}}),Object.defineProperty(J,"ConfigLoader",{enumerable:!0,get:function(){return At.default}}),Object.defineProperty(J,"getLayoutModules",{enumerable:!0,get:function(){return Pt.getLayoutModules}}),Object.defineProperty(J,"getContentModules",{enumerable:!0,get:function(){return Pt.getContentModules}}),Object.defineProperty(J,"getPageContentModules",{enumerable:!0,get:function(){return Pt.getPageContentModules}}),Object.defineProperty(J,"getToolbarPreloadModules",{enumerable:!0,get:function(){return Ie.getToolbarPreloadModules}}),Object.defineProperty(J,"getScopeId",{enumerable:!0,get:function(){return Re.getScopeId}}),Object.defineProperty(J,"getScope",{enumerable:!0,get:function(){return Re.getScope}}),Object.defineProperty(J,"getMask",{enumerable:!0,get:function(){return Re.getMask}}),Object.defineProperty(J,"PrefetchHelper",{enumerable:!0,get:function(){return Ce.default}}),Object.defineProperty(J,"Area",{enumerable:!0,get:function(){return wt.default}}),Object.defineProperty(J,"pageAreaFabric",{enumerable:!0,get:function(){return St.default}}),Object.defineProperty(J,"connectApplicationSettings",{enumerable:!0,get:function(){return ee.connectApplicationSettings}}
147),Object.defineProperty(J,"ApplicationSettingsProvider",{enumerable:!0,get:function(){return ee.ApplicationSettingsProvider}}),Object.defineProperty(J,"getHeadLinksByApplication",{enumerable:!0,get:function(){return tt.getHeadLinksByApplication}}),Object.defineProperty(J,"getSiteNavigationSource",{enumerable:!0,get:function(){return Ne.getSiteNavigationSource}}),J})); 148define("Browser/Window",["require","exports","BrowserAPI/Window"],(function(e,r,o){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.unloadController=r.reload=void 0,Object.defineProperty(r,"reload",{enumerable:!0,get:function(){return o.reload}}),Object.defineProperty(r,"unloadController",{enumerable:!0,get:function(){return o.unloadController}})})); 149define("BrowserAPI/Window",["BrowserAPI/Storage","require","exports","Env/Env"],(function(e,t,r,s){var o,n,i,a,l,c,u;if(Object.defineProperty(r,"__esModule",{value:!0}),o=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(){return this}subscribe(){}unsubscribe(){}unsubscribeAll(){}mainHandler(){}stopListeners(){}},t}(0,{}),n=function(e,t,r,s){"use strict";function o(){return new r.LocalStorage("BrowserAPI/Window",!0)}Object.defineProperty(t,"__esModule",{value:!0}),t.ReloadLog=void 0;class n{constructor(e=o(),t=n.maxLength){this.storage=e,this.maxLength=t,this.items=[],this.items=n.readItems(this.storage)}getItems(){return this.items}push(e,t){const r=Date.now(),s=this.items[this.items.length-1];if(!s||s[1]!==e||s[2]!==t){for(;this.items.length>=this.maxLength;)this.items.shift();this.items.push([r,e,t])}else{if(s[0]===r)return;s.push(r)}}save(){try{const e=JSON.stringify(this.items);this.storage.setItem(n.storageKey,e)}catch(e){}}static readItems(e=o()){try{const t=e.getItem(n.storageKey);return t?JSON.parse(t):[]}catch(e){return[]}}static createPrintItems(e){const t=[];for(const[r,s,o,...n]of e)for(const e of[r,...n]){const r=new Date(e),n=`${r.toLocaleString()}:${r.getMilliseconds()}`;t.push({time:n,reason:s,url:o})}return t}static printLog(e=o()){if(!s.constants.isBrowserPlatform)return;const t=n.readItems(e),r=n.createPrintItems(t);if(!console.table)r.forEach((e=>{console.log(e.time,e.reason,e.url)}));else console.table(r)}}return t.ReloadLog=n,n.maxLength=100,n.storageKey="ReloadLog",t}(0,{},e,s),i=n,a=function(e,t,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r.constants.isBrowserPlatform?new class{constructor(e){this.eventName=e,this.handlers=[],this.stopEvent=!1,this.handler=this.mainHandler.bind(this),window.addEventListener(this.eventName,this.handler)}subscribe(e,t){window.addEventListener(this.eventName,e,t),this.handlers.push(e)}unsubscribe(e){window.removeEventListener(this.eventName,e);const t=this.handlers.indexOf(e);if(t>-1)this.handlers.splice(t,1)}unsubscribeAll(){this.handlers.forEach((e=>window.removeEventListener(this.eventName,e))),this.handlers=[]}mainHandler(e){if(this.stopEvent)e.stopImmediatePropagation()}stopListeners(e=!1){this.stopEvent=e}}("beforeunload"):new s.default;return t.default=o,t}(0,{},s,o),l=a,c=function(e,t,r,s,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=-1/0;return t.default=function(e,t,i){if(!r.constants.isBrowserPlatform||Date.now()<n)return;const a=function(e,t){const r={};if(e&&"object"==typeof e)Object.assign(r,e);else if("string"==typeof e)r.newUrl=e,r.replace=!!t;else if(!0===e)r.force=!0;if(!Number.isFinite(r.throttle)||r.throttle&&r.throttle<0)r.throttle=function(){const e=6e4,t=18e4;return e+Math.round(Math.random()*(t-e))}();if(!r.logger)r.logger=new s.ReloadLog;return{logger:r.logger,force:!!r.force,replace:!!r.force,throttle:r.throttle||0,newUrl:r.newUrl||""}}(t,i);a.throttle=a.throttle||0,n=Date.now()+a.throttle,a.logger.push(e,location.pathname),a.logger.save(),function({force:e,newUrl:t,replace:r},s){if(e)o.default.stopListeners(!0);if(t)if(r)return void s.replace(t);else return void(s.href=t);s.reload()}(a,location)},t}(0,{},s,n,a),u=c,r.unloadController=r.reload=r.ReloadLog=void 0,r.reload=u.default,Object.defineProperty(r,"ReloadLog",{enumerable:!0,get:function(){return i.ReloadLog}}),r.unloadController=l.default,s.constants.isBrowserPlatform)window.printReloadLog=i.ReloadLog.printLog;return r})); 150define("Controls-Actions/dispatcher",["react/jsx-runtime","react","Application/Env","require","exports"],(function(e,t,n,r,o){var i,s,a,u,d,c,l,m,f;return Object.defineProperty(o,"__esModule",{value:!0}),i=function(e,t,n){"use strict";
150return Object.defineProperty(t,"__esModule",{value:!0}),t.CommandContext=void 0,t.CommandContext=(0,n.createContext)(void 0),t.CommandContext.displayName="Controls-Actions/dispatcher:CommandContext",t}(0,{},t),s=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommandStore=void 0;class r{constructor(){this._nodes=new Map}register(e){var t;if(!e.target)return n.logger.error("[Controls-Actions/dispatcher] Ðе Ñказан target пÑи ÑегиÑÑÑаÑии команд в диÑпеÑÑеÑ"),()=>{};const o=r._getTargetKey(e.target);if(!this._nodes.has(o))this._nodes.set(o,{target:e.target,parent:e.parent});const i=this._nodes.get(o);return i.apiRef=null!==(t=e.apiRef)&&void 0!==t?t:i.apiRef,()=>{this._nodes.delete(o)}}dispatch(e,{target:t,searchParents:n},o){var i;let s=t;for(;s;){const t=this._nodes.get(r._getTargetKey(s)),a=null===(i=null==t?void 0:t.apiRef)||void 0===i?void 0:i.current,u=null==a?void 0:a[e];if("function"==typeof u)return u.call(a,o),{handled:!0,handlerTarget:s};s=n?null==t?void 0:t.parent:void 0}return{handled:!1}}static _getTargetKey(e){return JSON.stringify(e)}}return t.CommandStore=r,t}(0,{},n),a=function(e,t,n,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.useCommandDispatch=void 0,t.useCommandDispatch=function(){const e=(0,n.useContext)(r.CommandContext);return(0,n.useCallback)(((t,n)=>{if(!e)return{handled:!1};const r=t.split("."),o=r.pop(),i=r.length>0,s=i?r:e.parent;return e.commandStore.dispatch(o,{target:s,searchParents:!i},n)}),[null==e?void 0:e.commandStore,null==e?void 0:e.parent])},t}(0,{},t,i),u=a,d=function(e,t,n,r,o){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.useTarget=void 0,t.useTarget=function(e){if(null==e?void 0:e.includes("."))o.logger.error(`[Controls-Actions/dispatcher] ÐденÑиÑикаÑÐ¾Ñ '${e}' не должен ÑодеÑжаÑÑ '.'. ТоÑка иÑполÑзÑеÑÑÑ ÐºÐ°Ðº ÑазделиÑÐµÐ»Ñ ÑегменÑов абÑолÑÑного адÑеÑа командÑ.`),e=e.replace(/\./g,"%2E");const t=(0,n.useContext)(r.CommandContext),i=null==t?void 0:t.parent;return(0,n.useMemo)((()=>i?e?[...i,e]:i:e?[e]:void 0),[i,e])},t}(0,{},t,i,n),c=function(e,t,n,r,o,i,s){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.CommandArea=void 0,t.CommandArea=function({id:e,children:t}){const a=(0,r.useContext)(o.CommandContext),u=(0,r.useMemo)((()=>{var e;return null!==(e=null==a?void 0:a.commandStore)&&void 0!==e?e:new i.CommandStore}),[null==a?void 0:a.commandStore]),d=null==a?void 0:a.parent,c=(0,s.useTarget)(e);(0,r.useEffect)((()=>{if(c)return u.register({target:c,parent:d})}),[u,d,c]);const l=(0,r.useMemo)((()=>({commandStore:u,parent:c})),[u,c]);return(0,n.jsx)(o.CommandContext.Provider,{value:l,children:t})},t}(0,{},e,t,i,s,d),l=c,m=function(e,t,n,r,o,i){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.useRegisterCommands=void 0,t.useRegisterCommands=function(e){const t=(0,n.useContext)(o.CommandContext),s=null==t?void 0:t.commandStore,a=null==t?void 0:t.parent,u=(0,i.useTarget)(e),d=(0,n.useRef)(null),c=(0,n.useMemo)((()=>function(e){return new Proxy({},{get(t,n){if(e&&"string"==typeof n)return[...e,n].join(".")}})}(u)),[u]);return(0,n.useEffect)((()=>{var e;if(!u)return;const t=Object.keys(null!==(e=null==d?void 0:d.current)&&void 0!==e?e:{}).find((e=>e.includes(".")));if(!t)return null==s?void 0:s.register({target:u,parent:a,apiRef:d});else r.logger.error(`[Controls-Actions/dispatcher] ÐÐ¼Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñ '${t}' не должно ÑодеÑжаÑÑ '.'. ТоÑка иÑполÑзÑеÑÑÑ ÐºÐ°Ðº ÑазделиÑÐµÐ»Ñ ÑегменÑов абÑолÑÑного адÑеÑа командÑ.`)}),[s,a,d,u]),{apiRef:d,commands:c}},t}(0,{},t,n,i,d),f=m,o.CommandArea=o.useRegisterCommands=o.useCommandDispatch=void 0,Object.defineProperty(o,"useCommandDispatch",{enumerable:!0,get:function(){return u.useCommandDispatch}}),Object.defineProperty(o,"useRegisterCommands",{enumerable:!0,get:function(){return f.useRegisterCommands}}),Object.defineProperty(o,"CommandArea",{enumerable:!0,get:function(){return l.CommandArea}
150}),o})); 151define("Controls/buttons",["react/jsx-runtime","react","clsx","UI/Focus","UI/Contexts","Env/Env","Controls/icon","Controls/Utils/Icon","Controls/LoadingIndicator","require","exports","css!Controls/CommonClasses","css!Controls/buttons"],(function(t,o,n,e,i,s,l,r,c,a,u){var d,_,f,p,y,v,h,g;return Object.defineProperty(u,"__esModule",{value:!0}),d=function(t,o,n,e,i,s){"use strict";function l(t){const o={};return Object.keys(t).forEach((n=>{if(0===n.indexOf("data-"))o[n]=t[n]})),o}Object.defineProperty(o,"__esModule",{value:!0});const r=(0,e.forwardRef)((function(t,o){const{children:e,buttonStyle:r,viewMode:c,buttonSize:a,href:u,contrastBackground:d,translucent:_}=t,f=void 0===d?"filled"===c:d,p=(0,i.useReadonly)(t),y="empty"!==c?"link"===c||"linkButton"===c?"linkButton":"button":"empty";let v="controls-BaseButton controls-Button_"+(p||t.loading?"readonly":"clickable")+" controls-Button_bg-"+(f?"contrast":"same")+(t.toggled?" controls-Button_toggled":"")+` controls-${y}-style controls-button_${c}-style ${a?`controls-button_size-${a}`:""}`;if(_&&!p)v+=` controls-button_mode-${"ghost"===t.viewMode?"ghost":"button"}_style-translucent-${_}`;else v+=` controls-${y}_${c}-${p?"readonly":r}-style${t.toggled?"_toggled":""}`;if(t.className)v+=` ${t.className}`;return(0,n.jsx)(s.FocusRoot,{...l(t),"data-qa":t["data-qa"]||t.dataQa,name:t.name,id:t.id,style:t.style,autofocus:t["ws-autofocus"]||t.autofocus,tabIndex:t.tabIndex,as:u?"a":"span",href:u,target:u?t.target:void 0,className:v,ref:o,title:t.tooltip,onClick:t.onClick,onTouchStart:t.onTouchStart,onTouchMove:t.onTouchMove,onTouchEnd:t.onTouchEnd,onMouseDown:t.onMouseDown,onMouseUp:t.onMouseUp,onMouseEnter:t.onMouseEnter,onMouseOver:t.onMouseOver,onMouseMove:t.onMouseMove,onMouseLeave:t.onMouseLeave,onKeyPress:t.onKeyPress,onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,onFocus:t.onFocus,onDeactivated:t.onDeactivated,onContextMenu:t.onContextMenu,children:e})}));return o.default=r,o}(0,{},t,o,i,e),_=d,f=function(t,o,n,e,i,s){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.SimpleButton=void 0;const l=(0,e.forwardRef)((function(t,o){return(0,n.jsx)("span",{ref:o,className:(0,i.clsx)(["controls-BaseButton controls-SimpleButton controls-Button_clickable",t.className]),title:t.title,onClick:t.onClick,onKeyDown:t.onKeyDown,style:t.style,children:(0,n.jsx)("span",{className:`controls-SimpleButton__wrapper controls-Button_${t.orientation||"horizontal"}`,children:t.contentTemplate?t.contentTemplate:(0,n.jsxs)(n.Fragment,{children:[t.icon&&(0,n.jsx)(s.Icon,{className:"controls-BaseButton__icon tw-self-center",icon:t.icon,iconSize:"empty"}),t.caption&&(0,n.jsx)("span",{className:"controls-BaseButton__text"+(t.icon?` controls-button__text_captionPosition_${t.captionPosition||"start"}`:""),children:t.caption})]})})})}));return o.SimpleButton=l,o}(0,{},t,o,n,l),p=f,y=function(t,o,n,e,i,s,l,r,c){"use strict";function a(t){return!(!t||"none"===t)}function u(t){if(t._loading){const o=`controls-icon_size-${t._iconSize||"s"}`;if(t._loadingIndicator)return(0,n.jsx)("span",{className:"controls-BaseButton__loadingIndicator-wrapper",children:(0,n.jsx)(t._loadingIndicator,{className:`${t._iconStyle?"controls-icon_style-"+t._iconStyle:""} ${o}`})});else return(0,n.jsx)("span",{className:"controls-BaseButton__loadingIndicator-wrapper",children:(0,n.jsx)("span",{className:"controls-BaseButton__icon controls-BaseButton__loadingIndicator "+o,tabIndex:0,children:(0,n.jsx)(r.Spinner,{size:"small"})})})}return null}function d(t){const o=t._loading?" controls-Button__content-hidden":"";if(t._iconTemplate)return(0,n.jsx)(t._iconTemplate,{...t._iconOptions,className:`controls-BaseButton__icon controls-icon controls-icon_size-${t._iconSize||"s"} controls-icon_style-${t._iconStyle||""}${o}`,tabIndex:null});else if(t._icon)return(0,n.jsx)(c.Icon,{className:`controls-BaseButton__icon ${o}`,icon:t._icon,iconSize:t._iconSize,tabIndex:t._caption?-1:0});return null}function _(t,o){var e;const i=t._loading?"center":t._textAlign||"center";let s=`controls-BaseButton__wrapper controls-Button__wrapper_viewMode-${t._viewMode} controls-BaseButton__wrapper_captionPosition_${t._captionPosition} controls-Button_textAlign-${i}`;if(t._loading)s+=" controls-Button__wrapper_loading";let l="controls-BaseButton__text";if(o)l+=" controls-Button__text_readonly_"+t._viewMode;
151if(t._hasIcon)l+=` controls-button__text_captionPosition_${t._captionPosition}`;if(t._loading)l+=" controls-Button__content-hidden";l+=` controls-Button__text_viewMode-${t._viewMode}`;let r=t._fontSize;if(!r&&t.className){const o=t.className.match(/controls-button_size-([\w+])/);if(o&&o[1])r=function(t){switch(t){case"5xl":return"3xl";case"m":case"default":return"m";case"xl":return"xl";default:return t}}(o[1])}return(0,n.jsxs)("span",{className:s,children:[u(t),d(t),t._caption?(0,n.jsx)("span",{className:l,tabIndex:0,ref:t.captionRef,children:t._stringCaption?t._caption:t._caption.isWasabyTemplate||"function"==typeof t._caption||"function"==typeof(null===(e=t._caption)||void 0===e?void 0:e.render)?(0,n.jsx)(t._caption,{}):t._caption}):null]})}return Object.defineProperty(o,"__esModule",{value:!0}),o.default=(0,e.forwardRef)((function(t,o){var r,c,u,d,f;let p=(0,i.useReadonly)(t);if(null===(r=t._options)||void 0===r?void 0:r.readOnly)p=null===(c=t._options)||void 0===c?void 0:c.readOnly;const y="empty"!==t._viewMode?"link"===t._viewMode||"linkButton"===t._viewMode?"linkButton":"button":"empty";let v=(t._fontColorStyle?` controls-${y}_fontColorStyle-${t._fontColorStyle}-style`:"")+` ${function(t){if(!t._caption)return" controls-Button_circle"+("linkButton"===t._viewMode||"link"===t._viewMode?" controls-Button_linkButton_onlyIcon":"");else return" controls-Button_notCircle"}(t)} controls-button_fontsize-${t._fontSize}`;if(t._hasIcon){const o=p?"readonly":t._iconStyle;if(o)v+=` controls-button_icon-style-${o} controls-button_hover_icon-style-${o}`;if(t._iconSize)v+=` controls-button_icon-size-${t._iconSize}`}if(l.detection.chrome&&l.detection.chromeVersion<=110||l.detection.opera&&l.detection.operaVersion<=96||l.detection.isWin7&&l.detection.yandex)v+=" controls-button-old-browser";if(t._underlineVisible)v+=" controls-text-decoration-underline";if(t._requiredIndicatorVisible)v+=" tw-relative";v+=` controls-notFocusOnEnter ${t.className||""}`;const h=(null===(u=t._options)||void 0===u?void 0:u.tooltip)||t._tooltip,g=null===(d=t._options)||void 0===d?void 0:d.href,m=(0,e.useRef)(!1);return(0,n.jsxs)(s.default,{...t._options,...t,className:v,ref:o,tooltip:h,href:g,buttonSize:t._height,readOnly:p,loading:null===(f=t._options)||void 0===f?void 0:f.loading,onKeyUp:o=>{var n,e;if(o.nativeEvent.keyCode===l.constants.key.enter&&!p&&!t._loading&&m.current)m.current=!1,null===(n=t.onClick)||void 0===n||n.call(t,o);null===(e=t.onKeyUp)||void 0===e||e.call(t,o)},onKeyDown:o=>{var n;m.current=!0,null===(n=t.onKeyDown)||void 0===n||n.call(t,o)},buttonStyle:"linkButton"===y&&!p?t._fontColorStyle||t._buttonStyle:t._buttonStyle,toggled:!(a(t._translucent)&&!p)&&t._toggled,contrastBackgroun
151d:t._contrastBackground,viewMode:t._viewMode,translucent:a(t._translucent)?"boolean"==typeof t._translucent?"dark":t._translucent:void 0,children:[_(t,p),t._requiredIndicatorVisible&&(0,n.jsx)("span",{"data-qa":"controls-BaseButton__requiredIndicator",className:"controls-requiredIndicator controls-requiredIndicator_padding_null tw-left-0"})]})})),o}(0,{},t,o,i,d,s,c,l),v=y,h=function(t,o,n,e,i,s,l,r){"use strict";function c(t,o=!1){if(o&&"link"!==t&&"linkButton"!==t)return"l";if("filled"===t||"filled-same"===t||"outlined"===t||"outlined-same"===t)return"default";if("ghost"===t||"toolButton"===t||"pushButton"===t)return"l";else return}function a(t,o={}){const n=function(t,o={}){const n={...t};if(n.contrastBackground&&"outlined"===n.viewMode)n.viewMode="filled";if(void 0===n.readOnly&&(null==o?void 0:o.readOnly))n.readOnly=o.readOnly;return n}(t,o);this._buttonStyle=n.readOnly?"readonly":n.buttonStyle,this._contrastBackground=void 0===n.contrastBackground?"filled"===n.viewMode:n.contrastBackground,this._viewMode=n.viewMode;const e=(n.icon||n.iconTemplate)&&!n.caption;if(this._height=n.inlineHeight?n.inlineHeight:c(this._viewMode,e),this._translucent=function(t){if("string"==typeof t)return t;else return t?"dark":"none"}(n.translucent),this._hasIcon=!!n.icon||!!n.iconTemplate,!["filled","filled-same","outlined","outlined-same","ghost"].includes(this._viewMode))this._textAlign="none";else this._textAlign=n.textAlign;if(e||"ghost"===this._viewMode&&!n.textAlign)this._textAlign="center";if(this._caption=n.caption,this._stringCaption="string"==typeof n.caption||n.caption instanceof String,this._captionPosition=n.captionPosition||"end",this._isSVGIcon=(0,s.isSVGIcon)(n.icon),this._icon=n.icon,n.icon||n.iconTemplate)this._iconSize=n.iconSize,this._iconStyle=n.readOnly?"readonly":"contrast"===n.iconStyle&&"filled"===this._viewMode&&"primary"===this._buttonStyle?"empty":n.iconStyle;if("linkButton"===this._viewMode)if(this._viewMode="link",!this._height)this._height="default"}Object.defineProperty(o,"__esModule",{value:!0}),o.getDefaultOptions=o.simpleCssStyleGeneration=o.defaultHeight=void 0,o.defaultHeight=c,o.simpleCssStyleGeneration=a,o.getDefaultOptions=function(){return{viewMode:"outlined",fontSize:"m",iconSize:"m",textAlign:"center",captionPosition:"end",translucent:"none"}};const u=(0,e.forwardRef)((function({viewMode:o="outlined",fontSize:s="m",iconSize:c="m",textAlign:u="center",captionPosition:d="end",translucent:_="none",...f},p){var y,v;const h={viewMode:o,fontSize:s,iconSize:c,textAlign:u,captionPosition:d,translucent:_,...f},g=p||h.forwardedRef,m=(0,e.useContext)((0,r.getWasabyContext)()),B=(0,r.useReadonly)(h),M=(0,e.useRef)(),b=(0,e.useRef)(),S=(0,e.useMemo)((()=>{const t={_hoverIcon:!0,_isSVGIcon:!1,_tooltip:h.tooltip};return a.call(t,h,{readOnly:B}),t}),[h,B]),[w,x]=(0,e.useState)(S._tooltip),[C,k]=(0,e.useState)(!1);(0,e.useEffect)((()=>()=>{k(!0)}),[]),(0,e.useEffect)((()=>{let t=w;if(w!==h.tooltip)t=h.tooltip;if(S._caption!==h.caption&&!h.tooltip)t="";x(t)}),[h.caption,h.tooltip]);const I=()=>B||h.loading||!1,O="object"==typeof h.style?h.style:void 0;let j="";if(m)j+=(t=>{if(t&&!I())if("link"!==S._viewMode)return"controls-focused-item_shadow";else return"controls-focused-item_background controls-focused-item_text-decoration";return""})(!!m.workByKeyboard);if(h.className){if(j)j+=" ";j+=h.className}const $="filled"===S._viewMode&&"contrast"===h.fontColorStyle&&"primary"===S._buttonStyle?"empty":h.fontColorStyle;return(0,n.jsx)(i.default,{name:null===(y=h.attrs)||void 0===y?void 0:y.name,id:null===(v=h.attrs)||void 0===v?void 0:v.id,"data-qa":h["data-qa"],"data-name":h["data-name"],"ws-autofocus":h["ws-autofocus"],target:h.target,style:O,tabIndex:h.tabIndex,readOnly:h.readOnly,_viewMode:S._viewMode,_options:h,_buttonStyle:"none"!==S._translucent&&!I()?"translucent":B?"readonly":h.buttonStyle?h.buttonStyle:"link"===o||"linkButton"===o?"empty":"secondary",_contrastBackgroun
151d:S._contrastBackground,_height:S._height,_icon:S._icon,_iconSize:S._iconSize,_hoverIcon:S._hoverIcon,_caption:S._caption,_fontSize:s,_fontColorStyle:$,_hasIcon:S._hasIcon,_stringCaption:S._stringCaption,_iconStyle:S._iconStyle,_iconOptions:h.iconOptions,_captionPosition:S._captionPosition,_iconTemplate:h.iconTemplate,_isSVGIcon:S._isSVGIcon,_textAlign:S._textAlign,_translucent:_,_loading:h.loading,_loadingIndicator:h.loadingIndicator,_underlineVisible:h.underlineVisible,_tooltip:w,ref:t=>{if(t)M.current=t;if(g)if("function"==typeof g)g(t);else g.current=t},captionRef:b,className:j,onClick:t=>{var o;if(I())t.stopPropagation();else null===(o=h.onClick)||void 0===o||o.call(h,t)},onMouseEnter:o=>{var n;if(!I()){if(!w&&!S.hasOwnProperty("tooltip")&&"string"==typeof h.caption&&w!==h.caption)new Promise(((o,n)=>{t(["Controls/Utils/getFontWidth"],o,n)})).then((({getFontWidth:t,loadFontWidthConstants:o})=>{o().then((()=>{var o;if(!C)if(b.current){if(b.current.clientWidth<b.current.scrollWidth)x(h.caption)}else{const n=Math.floor(t(h.caption,s||"m"));if(M.current&&n>(null===(o=M.current)||void 0===o?void 0:o.clientWidth))x(h.caption)}}))})).catch((function(t){requirejs.onError(t)}));null===(n=h.onMouseEnter)||void 0===n||n.call(h,o)}},onKeyPress:t=>{var o;if(t.nativeEvent.keyCode===l.constants.key.enter&&!I())null===(o=h.onKeyPress)||void 0===o||o.call(h,t)},onTouchStart:h.onTouchStart,onTouchEnd:h.onTouchEnd,onTouchMove:h.onTouchMove,onMouseDown:h.onMouseDown,onMouseUp:h.onMouseUp,onMouseOver:h.onMouseOver,onMouseMove:h.onMouseMove,onMouseLeave:h.onMouseLeave,onKeyDown:h.onKeyDown,onFocus:h.onFocus,onDeactivated:h.onDeactivated,onContextMenu:h.onContextMenu})}));return o.default=u,o}(a,{},t,o,y,r,s,i,"undefined"==typeof css_Controls_buttons||css_Controls_buttons,"undefined"==typeof css_Controls_CommonClasses||css_Controls_CommonClasses),g=h,u.SimpleButton=u.getDefaultOptions=u.defaultHeight=u.simpleCssStyleGeneration=u.Button=u.BasicButton=u.ButtonTemplate=void 0,Object.defineProperty(u,"ButtonTemplate",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(u,"BasicButton",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(u,"Button",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(u,"simpleCssStyleGeneration",{enumerable:!0,get:function(){return g.simpleCssStyleGeneration}}),Object.defineProperty(u,"defaultHeight",{enumerable:!0,get:function(){return g.defaultHeight}}),Object.defineProperty(u,"getDefaultOptions",{enumerable:!0,get:function(){return g.getDefaultOptions}}),Object.defineProperty(u,"SimpleButton",{enumerable:!0,get:function(){return p.SimpleButton}}),u})); 152define("Controls/Utils/Icon",["require","exports","RequireJsLoader/conduct","Env/Env"],(function(o,n,e,c){"use strict";function s(o){const n={icon:o,iconModule:null,isSvg:!1};if(o)if(o.includes("?x_module=")&&o.includes("#"))n.isSvg=!0,n.svgUrl=o;else{const[e,c]=o.split("/",2);if(o.includes("/")&&e&&c){const[o,s]=c.split(":");n.isSvg=!0,n.iconPackage=o,n.iconModule=e,n.icon=s}else n.icon=o}return n}Object.defineProperty(n,"__esModule",{value:!0}),n.getIconData=n.getClasses=n.isSVGIcon=n.getIcon=void 0,n.getIcon=function(o){const n=s(o);if(n.isSvg){const o=`${c.constants.resourceRoot}${n.iconModule}/${n.iconPackage}.svg`;return`${(0,e.getResourceUrl)(o,void 0,!0,void 0,!0)}#${n.icon}`}else return n.icon},n.isSVGIcon=function(o=""){return!(!o||!s(o).isSvg)},n.getClasses=function(o,n,e,c){return`${o?"controls-icon_size-"+o:""} ${n?"controls-icon_style-"+n:""} ${e?"controls-icon_svg":c+" controls-icon"}`},n.getIconData=s})); 153define("Controls/icon",["react/jsx-runtime","react","RequireJsLoader/loadFont","RequireJsLoader/conduct","Env/Env","Controls/Utils/Icon","Application/Page","require","exports","css!Controls/CommonClasse
153s","css!Controls/icon"],(function(e,o,n,t,a,s,i,l,c){var r,d;return Object.defineProperty(c,"__esModule",{value:!0}),r=function(e,o,n,t,a,s,i,l,c){"use strict";function r(e){if("undefined"==typeof window)i.Head.getInstance().createTag("link",{rel:"preload",type:"image/svg+xml",as:"image",href:e,crossorigin:"anonymous"})}function d(e){if(e&&-1!==f.indexOf(e))return e;else return"s"}Object.defineProperty(o,"__esModule",{value:!0});const u="FONT:",f=["s","st","m"],v={SVG:function(e){const o=t.useMemo((()=>{const o=(0,a.getIconData)(e.icon);if(o.svgUrl)return r(o.svgUrl),o.svgUrl;const n=`${s.constants.resourceRoot}${o.iconModule}/${o.iconPackage}.svg`,t=(0,l.getResourceUrl)(n,void 0,!0,void 0,!0);return r(t),`${t}#${o.icon}`}),[e.icon]);return(0,n.jsxs)("svg",{tabIndex:e.tabIndex,...e.eventHandlers,"data-qa":e["data-qa"],"data-qa-key":e["data-qa-key"],ref:e.forwardedRef,className:`controls-icon_svg ${e.className||""}`,fillRule:"evenodd",children:[e.title?(0,n.jsx)("title",{children:e.title}):null,(0,n.jsx)("use",{xlinkHref:o})]})},OLD_FONT:function(e){return(0,n.jsx)("span",{tabIndex:e.tabIndex,...e.eventHandlers,"data-qa":e["data-qa"],"data-qa-key":e["data-qa-key"],title:e.title,ref:e.forwardedRef,className:`${e.className||""} ${e.icon} controls-icon`})},FONT:function(e){const o=t.useMemo((()=>{const o=(0,a.getIconData)(e.icon.split(u)[1]),n=`${o.iconModule}/${o.iconPackage}`,t=(0,c.isCompatibleMode)();return{...(0,a.getIconData)(e.icon.split(u)[1]),loadPath:n,isCompatibleMode:t}}),[e.icon]),s=t.useRef(""),i=t.useRef(e.iconSize);if(s.current!==o.loadPath||i.current!==e.iconSize)(0,c.default)(o.loadPath,e.iconSize),s.current=o.loadPath,i.current=e.iconSize;return(0,n.jsx)("span",{tabIndex:e.tabIndex,translate:"no",...e.eventHandlers,"data-qa":e["data-qa"],"data-qa-key":e["data-qa-key"],title:e.title,ref:e.forwardedRef,className:`${e.className} controls-icon_font_visibility controls-icon controls-icon_lineHeight-strict ${o.isCompatibleMode?o.icon:""} ${o.iconPackage}_${d(e.iconSize)}`,children:!o.isCompatibleMode?o.icon:""})}},m=t.forwardRef((function({iconSize:e="m",...o},s){const i=t.useMemo((()=>{var e;if(null===(e=o.icon)||void 0===e?void 0:e.startsWith(u))return"FONT";else return(0,a.isSVGIcon)(o.icon)?"SVG":"OLD_FONT"}),[o.icon]),l=v[i],c=t.useMemo((()=>({onClick:e=>{var n;null===(n=o.onClick)||void 0===n||n.call(o,e)},onMouseEnter:e=>{var n;null===(n=o.onMouseEnter)||void 0===n||n.call(o,e)},onMouseDown:e=>{var n;null===(n=o.onMouseDown)||void 0===n||n.call(o,e)},onMouseUp:e=>{var n;null===(n=o.onMouseUp)||void 0===n||n.call(o,e)},onMouseLeave:e=>{var n;null===(n=o.onMouseLeave)||void 0===n||n.call(o,e)},onMouseMove:e=>{var n;null===(n=o.onMouseMove)||void 0===n||n.call(o,e)},onTouchStart:e=>{var n;null===(n=o.onTouchStart)||void 0===n||n.call(o,e)}})),[o.onClick,o.onMouseEnter,o.onMouseDown,o.onMouseUp,o.onMouseLeave,o.onMouseMove,o.onTouchStart]),r=o.attrs||{},d=`${e?"controls-icon_size-"+e:""} ${o.iconStyle?"controls-icon_style-"+o.iconStyle:""} ${r.className||o.className||""}`;if(!r.title)r.title=o.tooltip;return r["data-qa"]=r["data-qa"]||o.dataQa,(0,n.jsx)(l,{icon:o.icon,attrs:r,title:r.title,className:d,"data-qa":r["data-qa"],"data-qa-key":o.dataQaKey,eventHandlers:c,forwardedRef:s,iconSize:e,tabIndex:o.tabIndex})}));return o.default=m,o}(0,{},e,o,s,a,i,t,n,"undefined"==typeof css_Controls_CommonClasses||css_Controls_CommonClasses,"undefined"==typeof css_Controls_icon||css_Controls_icon),d=r,c.Icon=void 0,Object.defineProperty(c,"Icon",{enumerable:!0,get:function(){return d.default}}),c})); 154define("RequireJsLoader/loadFont",["require","exports","Application/Page","optional!Env/Env","RequireJsLoader/conduct"],(function(e,o,t,n,r){"use strict";function s(){try{return(n.constants.browser.chrome?n.constants.browser.userAgent.includes("SbisCefConverter"):!1)||n.detection.chrome&&n.detection.chromeVersion<80}catch(e){return!0}}Object.defineProperty(o,"__esModule",{value:!0}),o.isCompatibleMode=void 0;const i=["s","st","m"];o.isCompatibleMode=s,o.default=function(e,o,n,c){const a=n||(()=>{}),[l,u]=function(e,o){const t=s()?`${e}_${o}_compatible`:`${e}_${o}`;return[(0,r.getModuleUrl)(`${t}.woff2`),(0,r.getModuleUrl)(`${t}.css`)]}(e,function(e){if(e&&-1!==i.indexOf(e))return e;else return"s"}(o));t.Head.getInstance().createTag("link",{rel:"preload",type:"font/woff2",as:"font",href:l,crossorigin:"anonymous"},null,{load:()=>{t.Head.getInstance().createTag("link",{rel:"stylesheet",type:"text/css",href:u,crossorigin:"anonymous"},null,{load:a,error:c})},error:c})}})); 155define("Core/PromiseLib/PromiseLib",["require","exports","optional!SbisUI/PromiseLib"],(function(i,o,e){if("undefined"!=typeof window&&window.wsConfig&&!0!==window.wsConfig.unitTestMode)console.warn("Core/PromiseLib/PromiseLib пеÑемеÑен в SbisUI/PromiseLib.");return e})); 156define("SbisUI/PromiseLib",["Browser/Transport","Types/promise"],(function(r,e){"use strict";function t(e){var t,n=String(new Error("withTimeout() through:").stack),o=r.URL.getQueryParam("globalTimeoutForTests");return{promise:new Promise((function(i,u){t=setTimeout((function(){u(new r.fetch.Errors.HTTP({httpError:504,url:void 0,message:"Promise timeout",details:n}))}),o?parseInt(o,10):e)})),clear:function(){clearTimeout(t)}}}return{reflect:function(r){return r.then((function(r){return{result:r,status:"resolved"}}),(function(r){return{error:r,status:"rejected"}}))},wrapTimeout:function(r,n){var o=t(e.getTimeout(n));return Promise.race([r,o.promise]).finally((function(){o.clear()}
156))},wrapTimeoutCallback:function(r,n,o,i){var u=t(e.getTimeout(n));return Promise.race([u.promise,r.apply(o,i)]).finally((function(){u.clear()}))}}})); 157define("Page/PageFactories",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDefaults=void 0,t.getDefaults=function(){return{}}})); 158define("Page/theme",["react/jsx-runtime","react","Controls/themes","require","exports","UI/Theme"],(function(e,a,n,t,o,r){var i,c,_,l;return Object.defineProperty(o,"__esModule",{value:!0}),i=function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.calculatePageTheme=void 0;const n={"--navigation_bg":"--navigation_background-color","--navigation_bg_hover":"--navigation_hover_background-color","--navigation_bg_selected":"--navigation_active_background-color","--navigation_marker":"--navigation_marker-color","--group_background-color_NavigationPanels-Accordion":"--separator-color_NavigationPanels-Accordion","--navigation_counter_hover":"--navigation_counter_hover_background-color","--navigation_counter_on_menu_hover":"--navigation_counter_on_menu_hover_background-color","--navigation_icons":"--navigation_icon-color","--navigation_arrow_unaccented":"--navigation_unaccented_icon-color","--navigation_secondary_icon-color":"--navigation_unaccented_icon-color","--navigation_text":"--navigation_text-color","--navigation_text_active":"--navigation_active_text-color","--navigation_accented":"--navigation_primary_text-color","--navigation_accented_hover":"--navigation_primary_hover_text-color","--navigation_accented_text":"--contrast_text-color","--navigation_accented_fill":"--navigation_primary_background-color","--navigation_unaccented":"--navigation_unaccented_text-color","--navigation_unaccented_hover":"--navigation_unaccented_hover_text-color","--navigation_unaccented_fill":"--navigation_unaccented_background-color"};return a.calculatePageTheme=e=>(((e,a)=>{for(const n in a)if(a.hasOwnProperty(n))if(e[n])e[a[n]]=e[n],delete e[n]})(e,n),{...e}),a}(0,{}),c=i,_=function(e,a,n,t,o,r,i){"use strict";function c(e,a){const t=e.variables,o=!!t&&Object.keys(t).length>0;let i,c=e.children;if(o){const o=e.staticTheme?"controls_theme-"+e.staticTheme:void 0;c=(0,n.jsx)(_,{variables:t,className:e.className||o,readOnly:e.readOnly,ref:a,children:c})}if(Array.isArray(e.activeTheme))i=e.activeTheme;else if(e.activeTheme)i=[e.activeTheme];else i=void 0;const l=i,g=!1===e.isUpperScope?r.ThemeWrapper:r.BodyThemeWrapper;return(0,n.jsx)(g,{ref:o?void 0:a,isUpperScope:e.isUpperScope,_$isKiosk:e._$isKiosk,activeTheme:l,staticTheme:e.staticTheme,theme:e.theme,children:c})}Object.defineProperty(a,"__esModule",{value:!0});const _=(0,t.forwardRef)((function({variables:e,children:a,className:r,readOnly:c},_){const l=(0,t.useMemo)((()=>(0,i.calculatePageTheme)({...e})),[e]);return(0,n.jsx)(o.Wrapper,{ref:_,variables:l,className:r,readOnly:c,children:a})}));return c.displayName="Page/theme:Wrapper",a.default=(0,t.memo)((0,t.forwardRef)(c)),a}(0,{},e,a,n,r,i),l=_,o.calculatePageTheme=o.Wrapper=o.getThemeStorage=o.ThemeDesigner=void 0,Object.defineProperty(o,"ThemeDesigner",{enumerable:!0,get:function(){return r.ThemeDesigner}}),Object.defineProperty(o,"getThemeStorage",{enumerable:!0,get:function(){return r.getThemeStorage}}),Object.defineProperty(o,"Wrapper",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(o,"calculatePageTheme",{enumerable:!0,get:function(){return c.calculatePageTheme}}),o})); 159define("Controls/themes",["react","UICore/Jsx","require","exports","css!Controls/themes"],(function(e,o,n,r){var l,t;return Object.defineProperty(r,"__esModule",{value:!0}),l=function(e,o,n,r){"use strict";Object.defineProperty(o,"__esModule",{value:!0});const l=n.forwardRef((function(e,o){var l,t;const s=e.attrs?(0,r.wasabyAttrsToReactDom)(e.attrs)||{}:{};if(e.content&&!e.children)throw new Error("ÐелÑÐ·Ñ Ð¿ÐµÑедаваÑÑ Ñвно опÑÐ¸Ñ content в tsx. ÐÐµÐ¾Ð±Ñ Ð¾Ð´Ð¸Ð¼Ð¾ вÑÑавлÑÑÑ ÐºÐ¾Ð½ÑÐµÐ½Ñ Ð² React-ÑÑиле\nhttps://dev.sbis.ru/page/knowledge-bases/babadcfb-cc27-4589-9b97-9200c2e399ee?article=19468b19-627e-4c36-a725-d98e391dc8b7");const a=`controls_themes__wrapper ${e.className||s.className} ${(null===(t=null===(l=e.children)||void 0===l?void 0:l.props)||void 0===t?void 0:t.className)||""}`;let u=e.variables;if(s.style)u={...u,...s.style};if(e.style)u={...u,...e.style};const c={ref:o,...e.contentOptions,...s,className:a,readOnly:e.readOnly,style:u,attrs:{style:u,className:a},onClick:o=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,o)},onContextMenu:o=>{var n;return null===(n=e.onContextMenu)||void 0===n?void 0:n.call(e,o)},onMouseDown:o=>{var n;return null===(n=e.onMouseDown)||void 0===n?void 0:n.call(e,o)},onMouseEnter:o=>{var n;return null===(n=e.onMouseEnter)||void 0===n?void 0:n.call(e,o)},onMouseLeave:o=>{var n;return null===(n=e.onMouseLeave)||void 0===n?void 0:n.call(e,o)},onMouseMove:o=>{var n;return null===(n=e.onMouseMove)||void 0===n?void 0:n.call(e,o)},onMouseUp:o=>{var n;return null===(n=e.onMouseUp)||void 0===n?void 0:n.call(e,o)},onTouchMove:o=>{var n;return null===(n=e.onTouchMove)||void 0===n?void 0:n.call(e,o)},onWheel:o=>{var n;return null===(n=e.onWheel)||void 0===n?void 0:n.call(e,o)},onKeyDown:o=>{var n;return null===(n=e.onKeyDown)||void 0===n?void 0:n.call(e,o)}};return n.cloneElement(e.children,c)}));return l.displayName="Controls/themes:Wrapper",o.default=l,o}(0,{},e,o,"undefined"==typeof css_Controls_themes||css_Controls_themes),t=l,r.Wrapper=void 0,Object.defineProperty(r,"Wrapper",{enumerable:!0,get:function(){return t.default}}),r})); 160define("SbisEnvUI/Bootstrap",["react/jsx-runtime","react","UICore/Contexts","UICommon/Utils","UI/Utils","UI/Head","UI/Bootstrap","UI/Base","UI/Adaptive","Router/router","I18n/i18n","Env/Env","Controls/Application","Application/Page","Application/Env","require","exports"],(function(e,t,o,r,n,i,a,s,c,l,d,u,f,p,g,v,m){var w,h,y,R,B,b;
160return Object.defineProperty(m,"__esModule",{value:!0}),w=function(e,t,o,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isBodyScrollAllowed=void 0;const i=["/page/calendar","/page/month","/page/year","/page/timesheet","/page/chats","/page/meetings","/page/interviews","/page/milestones","/page/staff-chats","/page/candidate-chats","/page/claim-chats","/page/crm-activities-plan","/page/internal-docs","/page/purchases","/page/bookkeeping-reports","/page/ereport_calendar","/page/outflows","/page/queue-schedule-list","/page/group-queue-schedule-list","/page/electronic-queue-ca-schedule",/sabyget\.ru/],a=[/site\.{domain}\/booking/,/site\.{domain}\/group-widget/,/booking\.{domain}/,/n\.{domain}\/[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}/,/n\.{domain}\/group-adaptive-meetings\/[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}/,/n\.{domain}\/page\/group-adaptive-meetings\/[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}/],s=["saby\\.ru","sbis\\.ru","setty\\.kz","saby\\.uz"].flatMap((e=>a.map((t=>new RegExp(t.source.replace("{domain}",e))))));return i.push(...s),t.isBodyScrollAllowed=function(e,t,a){const s=o.detection.isPhone&&!o.detection.isIE&&!1!==e&&!0===t&&!0!==a&&!function(){const e=process&&process.domain&&process.domain.req,t=e?e.originalUrl:r.location.href;let o=!1;return i.find((e=>{if(-1!==t.search(e))return o=!0,!0})),o}()&&!(o.detection.isMobileIOS&&o.detection.safari&&(void 0===o.detection.safariVersion||null===o.detection.safariVersion));return n.ScrollOnBodyStore.write("enabled",s),s},t}(0,{},u,g,c),h=w,y=function(e,t,o,r,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.createBaseHeadTags=void 0,t.createBaseHeadTags=function(e){var t;if("undefined"==typeof window){const r=o.Head.getInstance();if(e.microdata)r.createTag("script",{type:"application/ld+json"},e.microdata);if(e.viewport)r.createTag("meta",{content:e.viewport,name:"viewport"});const i=e.fromBootstrap?{rel:"shortcut icon",href:(0,n.getResourceUrl)("/cdn/SabyLogo/1.0.7/favicon/favicon.ico?v=1"),type:"image/x-icon"}:{},a=null===(t=e.links)||void 0===t?void 0:t.find((e=>e.href&&e.rel&&e.rel.includes("icon"))),s={...i,...e.favicon};if(s.href)r.createTag("link",s);if(a&&e.favicon&&e.favicon.href)a.href=s.href}if((0,r.createMetaScriptsAndLinks)(e),(0,r.createDefaultTags)(e),e.title)(0,r.createTitle)(e.title)},t}(0,{},p,i,n),R=y,B=function(e,t,o,r,n,i,a,s,c,l,d,u,f,p,g,v,m){"use strict";function w(...e){const t=(0,n.useRef)(e),o=(0,n.useRef)(null),r=(0,n.useRef)(null);if(e.length!==t.current.length||e.some(((e,o)=>e!==t.current[o])))t.current=e;if(!o.current)o.current=e=>{if(e!==r.current)r.current=e,t.current.forEach((t=>{if(t)if("function"==typeof t)t(e);else if("current"in t)t.current=e}))};return o.current}Object.defineProperty(t,"__esModule",{value:!0}),t.useMergeRefs=void 0;let h,y=!1;const R="undefined"!=typeof window?new Promise((e=>{h=e})):Promise.resolve();t.useMergeRefs=w;const B=r.forwardRef((function(e,t){const r=(0,v.isBodyScrollAllowed)(e.isAdaptive,e.allowAdaptive,e.ignoreScrollOnBody);(0,l.setScrollOnBody)(r);const R=(0,n.useMemo)((()=>{if(e.viewport)return e.viewport;let t="width=device-width, initial-scale=1.0";if(r)t+=", viewport-fit=cover";return t}),[e.viewport,r]);if("undefined"==typeof window){a.Head.getInstance().createMergeTag("script",{},["var cfg = window.wsConfig = window.wsConfig || {};",e.wsRoot?`cfg.wsRoot = cfg.wsRoot || '${e.wsRoot}';`:"",e.resourceRoot?`cfg.resourceRoot = cfg.resourceRoot || '${e.resourceRoot}';`:"",e.servicesPath?`cfg.defaultServiceUrl = cfg.defaultServiceUrl || '${e.servicesPath}';`:""].filter((e=>!!e)).join("\n"));const t=a.JSLinks.getInstance("timeTesterScripts");[{key:"boomerang",src:(0,f.getResourceUrl)("/cdn/Boomerang/v.0.0.4.js")},{key:"timetester",src:(0,f.getResourceUrl)(`${e.resourceRoot||(0,i.getConfig)("resourceRoot")||"/"}SbisUI/callTimeTester.js`)}].forEach((e=>t.createTag("script",e)))}const B=(0,n.useRef)(null),b=(0,n.useRef)(!1),A=(0,n.useContext)((0,p.getWasabyContext)()),S=(0,n.useRef)(e.content);if(a.Body.getInstance().setDir(c.controller.currentLocaleConfig.directionality),e.title&&e.title!==B.current)B.current=e.title,(0,l.getMetaStack)().push({title:e.title});(0,m.createBaseHeadTags)({...e,viewport:R,title:void 0,fromBootstrap:!0});const U=(0,n.useCallback)(((e,t)=>{if(r)b.current=!0}),[r]),j=(0,n.useRef)({mask:"/*traverse",onBeforeChange:U});(0,n.useEffect)((()=>(y=!0,null==h||h(),()=>{y=!1})),[]),(0,n.useLayoutEffect)((()=>
160{if(b.current&&S.current!==e.content)document.documentElement.scrollTop=0,b.current=!1;S.current=e.content}),[e.content]);const I=e.isAdaptive,T=e.theme||A.theme;return(0,o.jsx)(p.WasabyContextManager,{isScrollOnBody:r,isAdaptive:I,theme:T,children:(0,o.jsx)(u.ScrollOnBodyContextProvider,{isScrollOnBody:r,children:(0,o.jsx)(d.default,{forwardedRef:w(t,e.forwardedRef),children:(0,o.jsx)(g.Route,{...j.current,children:(0,o.jsx)(u.BodyScroll,{children:(0,o.jsx)(s.default,{...e,theme:T,_fromBootstrap:!0,forwardedRef:void 0,$wasabyRef:void 0,_$createdFromCode:void 0})})})})})})}));return B.displayName="SbisEnvUI/Bootstrap",B.isMounted=()=>y,B.onAfterMountPromise=()=>R,t.default=B,t}(0,{},e,t,t,g,p,f,d,s,a,c,r,o,l,w,y),b=B,m.createBaseHeadTags=m.isBodyScrollAllowed=void 0,m.default=b.default,Object.defineProperty(m,"isBodyScrollAllowed",{enumerable:!0,get:function(){return h.isBodyScrollAllowed}}),Object.defineProperty(m,"createBaseHeadTags",{enumerable:!0,get:function(){return R.createBaseHeadTags}}),m})); 161define("Controls/Application",["require","exports","Controls/Application/ApplicationReact"],(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i.Application})); 162define("Controls/Application/ApplicationReact",["require","exports","react/jsx-runtime","react","Controls/Application/withPendingContextProvider","Controls/Application/withLoadingContextProvider","Controls/Application/withPopupManagerActions","Controls/Application/withRegisters","Controls/Application/withWhiteSpaceOnRotationHack","Controls/Application/withBodyClasses","Controls/Application/Utils","UI/Events","UI/Utils","Application/Env","Env/Env","UI/HotKeys","UI/Events","Controls/popup","Controls/Application/SettingsController","Application/Page","RequireJsLoader/conduct","UICore/Executor","UI/Focus","Controls/Application/ScrollOnRotateHack","Controls/Application/VisualViewportFix","css!Controls/Application/oldCss","css!Controls/application","css!Controls/dragnDrop","css!Controls/CommonClasse
162s"],(function(e,t,o,n,s,r,i,a,l,c,d,p,u,h,g,C,m,v,f,w,H,y,I,P,x){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Application=void 0;const E="ws-is-fonts-ready";class R extends n.Component{constructor(e){if(super(e),this._checkCompat(e),w.Body.getInstance().addClass(E),!g.constants.isServerSide)if("fonts"in document&&"loading"===document.fonts.status)w.Body.getInstance().removeClass(E),document.fonts.ready.then((()=>{w.Body.getInstance().addClass(E)}));if(g.constants.loadDataProviders=e.loadDataProviders,(0,f.setController)(e.settingsController),this.getCustomHandler=this.getCustomHandler.bind(this),this.bodyRef=(0,n.createRef)(),g.constants.isServerSide&&g.constants.browser.isMac)w.Head.getInstance().createTag("link",{rel:"stylesheet",type:"text/css",href:(0,H.getResourceUrl)("/Controls-default-theme/fonts/TensorInterMac.css")});P.default.init(),(0,x.default)()}checkErrors(){var e;if(null===(e=this.bodyRef.current)||void 0===e?void 0:e.parentElement.closest(".bodyContent"))u.Logger.error("Ðайдена дÑблиÑÑÑÑÐ°Ñ Ð²ÑÑавка конÑÑола Controls/Application в пÑиложении! ÐÑо пÑÐ¸Ð²Ð¾Ð´Ð¸Ñ Ðº ÑвелиÑÐµÐ½Ð¸Ñ Ð»Ð¸Ñнего кода и ÑазлиÑнÑм оÑибкам, напÑÐ¸Ð¼ÐµÑ Ð² двойном ÑÑабаÑÑвании ÑобÑÑий",this)}componentDidMount(){this.checkErrors()}componentDidUpdate(){this.checkErrors()}componentWillUnmount(){const e=document.getElementsByClassName("head-title-tag");if(1===e.length){if(g.detection.isMobileIOS&&g.detection.chrome)e[0].textContent="";e[0].textContent=this.props.title||null}}getCustomHandler(e){return this.props[e]}_keyDownHandler(e){(0,C.dispatcherHandler)(new p.SyntheticEvent(e))}_checkCompat(e){if(e.compat)g.IoC.resolve("ILogger").warn("ÐпÑÐ¸Ñ compat ÑвлÑеÑÑÑ ÑÑÑаÑевÑей. ÐÐ»Ñ Ð²ÑÑавки ÑÑаÑÑÑ ÐºÐ¾Ð½ÑÑолов внÑÑÑи VDOM-ного окÑÑÐ¶ÐµÐ½Ð¸Ñ Ð¸ÑполÑзÑйÑе один из ÑпоÑобов, опиÑаннÑÑ Ð² ÑÑой ÑÑаÑÑе: https://wi.sbis.ru/doc/platform/developmentapl/ws3/compound-wasaby/")}render(){var e,t;const s=this.props.children||this.props.content,r=null!==(e=null==s?void 0:s.props.className)&&void 0!==e?e:"",i=s?(0,y.isReactElement)(s)?(0,n.cloneElement)(s,{className:"bodyContent__zIndex-context "+r}):(0,n.cloneElement)(s,{className:"bodyContent__zIndex-context "+r,RUMEnabled:(0,h.getConfig)("RUMEnabled")||!1,pageName:this.props.pageName||"",resourceRoot:this.props.resourceRoot||g.constants.resourceRoot}):null;return(0,o.jsx)(m.EventSubscriber,{onSuggestStateChanged:this.getCustomHandler("suggestStateChanged"),on_updateDraggingTemplate:this.getCustomHandler("_updateDraggingTemplate"),on_removeDraggingTemplate:this.getCustomHandler("_removeDraggingTemplate"),on_documentDragStart:this.getCustomHandler("_documentDragStart"),on_documentDragEnd:this.getCustomHandler("_documentDragEnd"),onRegister:this.getCustomHandler("register"),onUnregister:this.getCustomHandler("unregister"),onShowIndicator:this.getCustomHandler("showIndicator"),onHideIndicator:this.getCustomHandler("hideIndicator"),onRegisterPending:this.getCustomHandler("registerPending"),onFinishPendingOperations:this.getCustomHandler("finishPendingOperations"),onCancelFinishingPending:this.getCustomHandler("cancelFinishingPending"),onOpenInfoBox:this.getCustomHandler("openInfoBox"),onServiceError:this.getCustomHandler("serviceError"),onCloseInfoBox:this.getCustomHandler("closeInfoBox"),onForceCloseInfoBox:this.getCustomHandler("forceCloseInfoBox"),onOpenPreviewer:this.getCustomHandler("openPreviewer"),onCancelPreviewer:this.getCustomHandler("cancelPreviewer"),onIsPreviewerOpened:this.getCustomHandler("isPreviewerOpened"),onClosePreviewer:this.getCustomHandler("closePreviewer"),onPageScrolled:this.getCustomHandler("pageScrolled"),onWorkspaceResize:this.getCustomHandler("workspaceResize"),onResize:this.getCustomHandler("resize"),ref:(0,d.mergeRefs)([this.props.forwardedRef,this.bodyRef]),children:(0,o.jsx)("div",{className:"tw-contents",onKeyDown:(0,d.mergeHandlers)(this._keyDownHandler.bind(this),this.props.onKeyDown),onKeyPress:this.props.onKeyPress,onScroll:this.props.onScroll,onMouseDown:this.props.onMouseDown,onPointerDown:this.props.onPointerDown,onMouseMove:this.props.onMouseMove,onMouseUp:this.props.onMouseUp,onMouseLeave:this.props.onMouseLeave,onTouchStart:this.props.onTouchStart,onTouchMove:this.props.onTouchMove,onTouchEnd:this.props.onTouchEnd,children:(0,o.jsx)(I.FocusRoot,{as:"div",className:"bodyContent "+(null!==(t=this.props.className)&&void 0!==t?t:""),style:this.props.style,onActivated:()=>{},children:!this.props.builder?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(v.Container,{}),i,this.props.loadingIndicator()]}):null})})})}}R.defaultProps={title:"",pagingVisible:!1};const S=(0,c.default)(R),D=(0,i.default)(S),M=(0,a.default)(D),b=(0,l.default)(M),A=(0,r.default)(b),_=(0,s.default)(A);t.Application=_})); 163define("Controls/Application/ScrollOnRotateHack",["require","exports","Env/Env"],(function(e,t,i){"use strict";
163Object.defineProperty(t,"__esModule",{value:!0});t.default=new class{constructor(){this.initialized=!1}init(){var e;if(i.detection.isMobilePlatform&&i.constants.isBrowserPlatform&&!this.initialized)null===(e=window.visualViewport)||void 0===e||e.addEventListener("resize",this.handleResize.bind(this)),this.initialized=!0}handleResize(){if(this.isInputElement())this.scrollToElement()}isInputElement(){if(document.activeElement){const e="INPUT"===document.activeElement.tagName,t="TEXTAREA"===document.activeElement.tagName,i="true"===document.activeElement.getAttribute("contenteditable");if(e||t||i)return!0}return!1}scrollToElement(){var e;if(document.activeElement){const t=document.activeElement.getBoundingClientRect(),i=(null===(e=window.visualViewport)||void 0===e?void 0:e.height)||window.innerHeight;if(t.bottom>i-100)document.activeElement.scrollIntoView({behavior:"smooth",block:"center"})}}}})); 164define("Controls/Application/Utils",["require","exports","UI/Events"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.utilHandler=t.mergeRefs=t.mergeHandlers=void 0,t.mergeHandlers=function(e,t,r){if(!e)return r?(0,n.withWasabyEventObject)(t):t;if(!t)return r?(0,n.withWasabyEventObject)(e):e;const i=(...n)=>{e(...n),t(...n)};return r?(0,n.withWasabyEventObject)(i):i},t.mergeRefs=function(e){return t=>{e.forEach((e=>{if("function"==typeof e)e(t);else if(null!=e)e.current=t}))}},t.utilHandler=function(e){return function(t){const n=e(...t.detail);return t.resultValue=n,n}}})); 165define("UI/Events",["require","exports","UICore/Events","UICommon/Events"],(function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TouchEventPolyfill=t.useTouches=t.SyntheticEvent=t.EventUtils=t.Subscriber=t.checkWasabyEvent=t.BubblingEventContext=t.EventSubscriber=t.withWasabyEventObject=t.useWasabyEventObject=t.__notifyFromReact=t.getArgs=t.WasabyEvents=void 0,Object.defineProperty(t,"WasabyEvents",{enumerable:!0,get:function(){return n.WasabyEvents}}),Object.defineProperty(t,"getArgs",{enumerable:!0,get:function(){return n.getArgs}}),Object.defineProperty(t,"__notifyFromReact",{enumerable:!0,get:function(){return n.__notifyFromReact}}),Object.defineProperty(t,"useWasabyEventObject",{enumerable:!0,get:function(){return n.useWasabyEventObject}}),Object.defineProperty(t,"withWasabyEventObject",{enumerable:!0,get:function(){return n.withWasabyEventObject}}),Object.defineProperty(t,"EventSubscriber",{enumerable:!0,get:function(){return n.EventSubscriber}}),Object.defineProperty(t,"BubblingEventContext",{enumerable:!0,get:function(){return n.BubblingEventContext}}),Object.defineProperty(t,"checkWasabyEvent",{enumerable:!0,get:function(){return n.checkWasabyEvent}}),Object.defineProperty(t,"Subscriber",{enumerable:!0,get:function(){return r.Subscriber}}),Object.defineProperty(t,"EventUtils",{enumerable:!0,get:function(){return r.EventUtils}}),Object.defineProperty(t,"SyntheticEvent",{enumerable:!0,get:function(){return r.SyntheticEvent}}),Object.defineProperty(t,"useTouches",{enumerable:!0,get:function(){return r.useTouches}}),Object.defineProperty(t,"TouchEventPolyfill",{enumerable:!0,get:function(){return r.TouchEventPolyfill}})})); 166define("Controls/Application/VisualViewportFix",["require","exports","Env/Env"],(function(t,e,n){"use strict";function r(t){if(!t)return;let e=10;requestAnimationFrame((function n(){if(t){if(document.body.offsetHeight,--e>0)return requestAnimationFrame(n);t.style.willChange="transform",t.style.transform="translateZ(0) translateY(0.001px)",requestAnimationFrame((()=>{t.style.transform="translateZ(0) translateY(0)",t.style.willChange=""}))}}))}Object.defineProperty(e,"__esModule",{value:!0});let o=!1;e.default=function(){if(n.detection.isMobilePlatform&&n.constants.isBrowserPlatform&&!o)document.body.addEventListener("blur",(t=>{if(function(t){if(n.detection.isMobilePlatform&&n.constants.isBrowserPlatform&&t){const e="INPUT"===t.tagName,n="TEXTAREA"===t.tagName,r="true"===t.getAttribute("contenteditable");if(e||n||r)return!0}return!1}(t.relatedTarget)){const t=document.getElementsByClassName("controls-Popup");for(let e=0;e<t.length;e+=1)r(t[e])}}),!0),o=!0}})); 167define("Controls/Application/withBodyClasses",["require","exports","react/jsx-runtime","react","Controls/Application/Interfaces","Env/Env","Application/Page","Env/Event","Controls/dragnDrop","EnvTouch/EnvTouch","Controls/Application/Utils","Controls/Application/BodyClasses"],(function(s,e,t,a,i,o,r,l,n,d,h,p){"use strict";
167Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(s){var e;return(e=class extends a.Component{constructor(s,e){super(s),this._bodyClasses={...i.BODY_CLASSES},this._bodyClassesState={...i.BODY_CLASSES_STATE},this.BodyAPI=r.Body.getInstance(),this._createDragnDropController(),this._initIsAdaptiveClass(s,null==e?void 0:e.isScrollOnBody),this._createTouchDetector(),this._updateTouchClassesState();const[t,a]=this._getInitialClasses();this._updateClasses(t,a)}componentDidMount(){const s=l.Bus.channel("popupManager");s.subscribe("managerPopupCreated",this._popupCreatedHandler,this),s.subscribe("managerPopupDestroyed",this._popupDestroyedHandler,this)}componentWillUnmount(){const s=l.Bus.channel("popupManager");s.unsubscribe("managerPopupCreated",this._popupCreatedHandler,this),s.unsubscribe("managerPopupDestroyed",this._popupDestroyedHandler,this),this._dragnDropController.destroy()}_updateDraggingTemplate(s,e,t){this._dragnDropController.updateDraggingTemplate(e,t)}_removeDraggingTemplate(s){this._dragnDropController.removeDraggingTemplate()}_registerHandler(s,e,t,a,i){return this._dragnDropController.registerHandler(s,e,t,a,i)}_unregisterHandler(s,e,t,a){this._dragnDropController.unregisterHandler(s,e,t,a)}_mousemovePage(){if(!this._shouldNotUpdateBodyClass)this._updateTouchClassesState(),this._updateClasses()}_touchStartPage(){this._updateTouchClassesState(),this._updateClasses()}_setDragType(s){var e,t;if(!(null===(e=null==s?void 0:s.entity)||void 0===e?void 0:e.cursorType))return void(this._bodyClassesState.drag=!0);const a=null===(t=null==s?void 0:s.entity)||void 0===t?void 0:t.cursorType;if("scroll"===a)this._bodyClassesState.scroll=!0;else if("horizontalResize"===a)this._bodyClassesState.horizontalResize=!0;else if("verticalResize"===a)this._bodyClassesState.verticalResize=!0;else if("diagonalUpRightResize"===a)this._bodyClassesState.diagonalUpRightResize=!0;else if("diagonalUpLeftResize"===a)this._bodyClassesState.diagonalUpLeftResize=!0;else if("verticalHorizontalResize"===a)this._bodyClassesState.verticalHorizontalResize=!0;else if("horizontalVerticalResize"===a)this._bodyClassesState.horizontalVerticalResize=!0}_dragStartHandler(s){var e;if(this._setDragType(s),this._shouldNotUpdateBodyClass=!!(null===(e=null==s?void 0:s.entity)||void 0===e?void 0:e.shouldNotUpdateBodyClass),!this._shouldNotUpdateBodyClass)this._updateTouchClassesState(),this._updateClasses()}_dragEndHandler(s){var e;if(this._bodyClassesState.drag=!1,this._bodyClassesState.verticalResize=!1,this._bodyClassesState.horizontalResize=!1,this._bodyClassesState.diagonalUpRightResize=!1,this._bodyClassesState.diagonalUpLeftResize=!1,this._bodyClassesState.verticalHorizontalResize=!1,this._bodyClassesState.horizontalVerticalResize=!1,this._bodyClassesState.scroll=!1,this._shouldNotUpdateBodyClass=!1,!(null===(e=null==s?void 0:s.entity)||void 0===e?void 0:e.shouldNotUpdateBodyClass))this._updateTouchClassesState(),this._updateClasses()}_isHover(){return!(this._bodyClassesState.touch||this._bodyClassesState.drag||this._bodyClassesState.scroll||this._bodyClassesState.verticalResize||this._bodyClassesState.horizontalResize||this._bodyClassesState.diagonalUpRightResize||this._bodyClassesState.diagonalUpLeftResize||this._bodyClassesState.verticalHorizontalResize||this._bodyClassesState.horizontalVerticalResize)}_createDragnDropController(){this._dragnDropController=new n.ControllerClass}_documentDragStart(s,e){this._dragnDropController.documentDragStart(e),this._dragStartHandler(e)}_documentDragEnd(s,e){this._dragnDropController.documentDragEnd(e),this._dragEndHandler(e)}_createTouchDetector(){this._touchController=d.TouchDetect.getInstance()}_popupCreatedHandler(){this._isPopupShow=!0,this._updateScrollingClass()}_popupDestroyedHandler(s,e,t){if(0===t.getCount())this._isPopupShow=!1;this._updateScrollingClass()}_keyPressHandler(s){if(this._isPopupShow)if(o.constants.browser.safari)if(27===(null==s?void 0:s.keyCode))s.preventDefault()}_initIsAdaptiveClass(s,e){if(s.isAdaptive){let s="width=device-width, initial-scale=1.0, user-scalable=no";if(e)s+=", viewport-fit=cover";if(r.Head.getInstance().createTag("meta",{name:"viewport",content:s}),o.constants.isBrowserPlatform)document.addEventListener("touchmove",(s=>{if(void 0!==s.scale&&1!==s.scale)s.preventDefault()}),{passive:!1})}}_suggestStateChangedHandler(s,e){this._isSuggestShow=e,this._updateScrollingClass()}_updateScrollingClass(){let s;if(o.detection.isMobileIOS)if(this._isPopupShow||this._isSuggestShow)s="controls-Scroll_webkitOverflowScrollingAuto";else s="controls-Scroll_webkitOverflowScrollingTouch";else s="";
167const[e,t]=this._getUpdateClasses({scrollingClass:s});this._updateClasses(e,t)}_updateClasses(s=[],e=[]){let t,a;if(Object.keys(this._bodyClassesState).forEach((i=>{if(t=`ws-is-${this._bodyClassesState[i]?"":"no-"}${i}`,a=`ws-is-${!this._bodyClassesState[i]?"":"no-"}${i}`,!e.includes(t))e.push(t);if(!s.includes(a))s.push(a)})),e.length||s.length)this.BodyAPI.replaceClasses(s,e)}_getInitialClasses(){var s;const e=(0,p.default)();if(o.detection.isMobileIOS&&(null===(s=this.props.bodyClass)||void 0===s?void 0:s.includes("ws-is-sabypage")))e.push("fixIosPaddings");if(o.detection.isPhone)e.push("familyFontsForPhones");for(const s in this._bodyClasses)if(this._bodyClasses.hasOwnProperty(s))if(Boolean(this._bodyClasses[s]))this._bodyClasses[s].split(" ").forEach((s=>e.push(s)));return[[],e]}_getUpdateClasses(s){let e=[],t=[];for(const a in s)if(s.hasOwnProperty(a)){if(s[a]===this._bodyClasses[a])continue;t=t.concat(s[a].split(" ").filter(Boolean)),e=e.concat(this._bodyClasses[a].split(" ").filter(Boolean)),this._bodyClasses[a]=s[a]||""}return e=e.filter((s=>!t.includes(s))),[e,t]}_updateTouchClassesState(){if(this._touchController)this._bodyClassesState.touch=this._touchController.isTouch();else this._bodyClassesState.touch=!!o.detection.isMultiTouch;this._bodyClassesState.hover=this._isHover()}render(){this._updateTouchClassesState();const[e,a]=this._getUpdateClasses({themeClass:"Application-body",bodyThemeClass:`controls_theme-${this.props.theme}`,fromOptions:this.props.bodyClass||""});return this._updateClasses(e,a),(0,t.jsx)(s,{...this.props,onMouseMove:(0,h.mergeHandlers)(this._mousemovePage.bind(this),this.props.onMouseMove),onTouchStart:(0,h.mergeHandlers)(this._touchStartPage.bind(this),this.props.onTouchStart),onKeyPress:(0,h.mergeHandlers)(this._keyPressHandler.bind(this),this.props.onKeyPress),suggestStateChanged:(0,h.mergeHandlers)(this._suggestStateChangedHandler.bind(this),this.props.suggestStateChanged,!0),_updateDraggingTemplate:(0,h.mergeHandlers)(this._updateDraggingTemplate.bind(this),this.props._updateDraggingTemplate,!0),_removeDraggingTemplate:(0,h.mergeHandlers)(this._removeDraggingTemplate.bind(this),this.props._removeDraggingTemplate,!0),_documentDragStart:(0,h.mergeHandlers)(this._documentDragStart.bind(this),this.props._documentDragStart,!0),_documentDragEnd:(0,h.mergeHandlers)(this._documentDragEnd.bind(this),this.props._documentDragEnd,!0),register:(0,h.mergeHandlers)(this._registerHandler.bind(this),this.props.register,!0),unregister:(0,h.mergeHandlers)(this._unregisterHandler.bind(this),this.props.unregister,!0)})}}).displayName="withBodyClasses",e}})); 168define("Controls/Application/BodyClasses",["require","exports","Env/Env"],(function(i,s,e){"use strict";Object.defineProperty(s,"__esModule",{value:!0});const o={isIE:"ws-is-ie",isIE10:"ws-is-ie10",isRealIE10:"ws-is-real-ie10",isIE11:"ws-is-ie11",isIE12:"ws-is-ie12",firefox:"ws-is-firefox",opera:"ws-is-opera",chrome:"ws-is-chrome",isNotFullGridSupport:"ws-is-not-full-grid-support",safari11:"ws-is-safari11",isMobileAndroid:"ws-is-mobile-android",isMobileSafari:"ws-is-mobile-safari",isOldWebKit:"ws-is-old-webkit",isWin10:"ws-is-windows-10",isWin8:"ws-is-windows-8",isWin7:"ws-is-windows-7",isWinVista:"ws-is-windows-vista",isWinXP:"ws-is-windows-xp",isUnix:"ws-is-unix",isMac:"ws-is-mac",isDesktop:"ws-is-sbis-desktop"};s.default=function(){const i=[];for(const s in o)if(e.detection[s])i.push(o[s]);if(e.detection.chrome&&e.detection.isMobileIOS)i.push("ws-is-mobile-chrome-ios");if(e.detection.isMobileSafari)if((e.detection.IOSVersion||0)<8)i.push("ws-is-mobile-safari-ios-below-8");if(i.push(e.detection.isMobilePlatform?"ws-is-mobile-platform":"ws-is-desktop-platform"),e.detection.isPhone)i.push("ws-is-phone");if(e.detection.isMacOSDesktop&&e.detection.safari)i.push("ws-is-desktop-safari");if(e.detection.isWinXP&&e.detection.chrome)i.push("ws-is-chrome-xp");if((e.detection.isWin7||e.detection.isWinVista||e.detection.isWinXP)&&!e.detection.firefox||e.detection.isUnix&&!e.detection.isMobilePlatform||e.detection.isWin10&&e.detection.isIE&&!e.detection.isIE12)i.push("ws-fix-emoji");if(e.detection.webkit&&!e.constants.isServerSide)i.push("ws-is-webkit");return i.push("zIndex-context"),i}})); 169define("Controls/Application/Interfaces",["require","exports","Env/Env"],(function(e,o,l){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.BODY_CLASSES_STATE=o.BODY_CLASSES=void 0,o.BODY_CLASSES={scrollingClass:l.detection.isMobileIOS?"controls-Scroll_webkitOverflowScrollingTouch":"",fromOptions:"",themeClass:"",bodyThemeClass:""},o.BODY_CLASSES_STATE={touch:!1,drag:!1,hover:!1,verticalResize:!1,horizontalResize:!1,scroll:!1}})); 170define("Controls/dragnDrop",["i18n!Controls","UI/Events","UI/Base","Types/entity","Env/Event","Env/Env","Controls/sizeUtils","Controls/popup","Controls/event","Compiler/IR","require","exports","css!Controls/dragnDrop"],(function(t,e,
170i,n,r,o,s,a,g,l,_,u){var d,c,h,m,f,p,v,D,b,y,T,O,E,C,L,M,S,w,R,x,P,A,N,H,I,j,z,K,U;return Object.defineProperty(u,"__esModule",{value:!0}),d=function(t,e,i,n,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});return e.default=class{constructor(){this._registers={},this.createRegisters(),this._dialogOpener=new n.DialogOpener}createRegisters(){["documentDragEnd","documentDragStart"].forEach((t=>{this._registers[t]=new i.RegisterClass({register:t})}))}registerHandler(t,e,i,n,r){if(this._registers[e]){if(this._registers[e].register(t,e,i,n,r)&&"documentDragStart"===e)return this._dragObject}}unregisterHandler(t,e,i,n){if(this._registers[e])this._registers[e].unregister(t,e,i,n)}destroy(){var t;for(const t in this._registers)if(this._registers[t])this._registers[t].destroy();null===(t=this._dialogOpener)||void 0===t||t.destroy(),this._dialogOpener=null}documentDragStart(t){this._dragObject=t,this._initialPosition=null==t?void 0:t.position,this._registers.documentDragStart.start(t)}documentDragEnd(t){var e;this._dragObject=null,this._initialPosition=null,this._registers.documentDragEnd.start(t),null===(e=this._dialogOpener)||void 0===e||e.close()}updateDraggingTemplate(t,e){var i,n;const o=r.DimensionsMeasurer.getZoomValue(null===(i=null==t?void 0:t.domEvent)||void 0===i?void 0:i.target)||1;null===(n=this._dialogOpener)||void 0===n||n.open({topPopup:!0,fittingMode:"overflow",opener:null,autofocus:!1,template:"Controls/dragnDrop:DraggingTemplateWrapper",className:"controls-DragNDrop__draggingTemplatePopup",templateOptions:{draggingTemplateOptions:{...t,initialPosition:this._initialPosition},draggingTemplate:e},top:(t.position.y+t.draggingTemplateOffset)*o,left:(t.position.x+t.draggingTemplateOffset)*o,restrictiveContainer:"body"})}removeDraggingTemplate(){var t;null===(t=this._dialogOpener)||void 0===t||t.close()}static _dragStart(){this._isDragging=!0}static _dragEnd(){this._isDragging=!1}static isDragging(){return this._isDragging}},e}(0,{},g,a,s),c=d,h=function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});return e.default=class{constructor(t){this.allowAutoscroll=!1,this._options=t}getOptions(){return this._options}},e}(0,{}),m=h,f=function(t,e,i,n,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class o extends n.Control{constructor(){super(...arguments),this._styleArea=null,this._dragging=!1,this._fakeDragging=!1,this._isStopedClick=!1}_beforeMount(){this._isMobilePlatform=r.detection.isMobilePlatform,this._handleClick=this._handleClick.bind(this)}_handleClick(t){if(this._isStopedClick)t.stopPropagation(),t.preventDefault();this._isStopedClick=!1,document.removeEventListener("click",this._handleClick,!0)}_beginDragHandler(t){var e,i;if("touchstart"!==t.type)t.preventDefault();if(r.constants.isBrowserPlatform&&document)document.addEventListener("click",this._handleClick,!0);this.activate(),this._children.dragNDrop.startDragNDrop({...this._options.entity,cursorType:`${this._options.orientation}Resize`,offset:0},t,{immediately:!0}),null===(i=null===(e=t.nativeEvent)||void 0===e?void 0:e.stopPropagation)||void 0===i||i.call(e)}_onStartDragHandler(t,e){this.startDrag(),this._dragObject=e}startDrag(){this._dragging=!0,this._notify("customdragStart")}endDrag(t){if(this._dragging){if(this._clearStyleArea(),this._dragging=!1,t)this._isStopedClick=!0;this._notify("offset",[t,this._options.position])}if(r.constants.isBrowserPlatform&&document)setTimeout((()=>{document.removeEventListener("click",this._handleClick,!0)}),0);if(this._fakeDragging)this._clearStyleArea(),this._fakeDragging=!1}_onEndDragHandler(t,e){if(this._dragging||this._fakeDragging)this.endDrag(this._getEntityOffset(e));this._dragObject=null}_isResizing(t,e){return 0!==t||0!==e}static getDefaultTypes(){return{minOffset:(0,i.descriptor)(Number),maxOffset:(0,i.descriptor)(Number)}}static getDefaultOptions(){return{minOffset:1e3,maxOffset:1e3,areaStyle:"default"}}}return e.default=o,e}(0,{},n,i,o),p=f,v=function(t){"use strict";function e(){return this}var i=["_mouseEnter","_mouseLeave","content","_options","mouseenter","mouseleave"];
170return t.g({v:1,m:"wml!Controls/_dragnDrop/Container/Container",t:[t.r(((t,n)=>[t.P(n,t.m(n,0),{K:"0_",E:{"on:mouseenter":[{value:i[0],originalName:i[4],viewController:n.v}],"on:mouseleave":[{value:i[1],originalName:i[5],viewController:n.v}],meta:{isControl:!1,context:e,handler:t.M(n,1)}},O:t.s(n,{},t.m(n,2)),m:"attribute",c:!0,i:0})]))],p:i.slice(0,2),e:[(t,e)=>t.g(e,[i[3],i[2]]),function(t,e,i,n,r,o){return t.g(this,[o])},(t,e)=>t.g(e,[i[3]])],i:[[[2]]]})}(l),D=function(t){"use strict";function e(){return this}var i=["_updateDraggingTemplate","_documentDragStart","_documentDragEnd","_registerHandler","_unregisterHandler","_draggingTemplateOptions","_draggingTemplate","content","_options","register","unregister"];return t.g({v:1,m:"wml!Controls/_dragnDrop/Controller/Controller",t:[t.r(((t,n)=>[t.P(n,t.m(n,0),{K:"0_",A:{class:"controls-DragNDrop"},E:{"on:_updatedraggingtemplate":[{value:i[0],originalName:i[0],viewController:n.v}],"on:_documentdragstart":[{value:i[1],originalName:i[1],viewController:n.v}],"on:_documentdragend":[{value:i[2],originalName:i[2],viewController:n.v}],"on:register":[{value:i[3],originalName:i[9],viewController:n.v}],"on:unregister":[{value:i[4],originalName:i[10],viewController:n.v}],meta:{isControl:!1,context:e,handler:t.M(n,1)}},O:t.s(n,{draggingTemplateOptions:t.m(n,3),draggingTemplate:t.m(n,4)},t.m(n,2)),m:"attribute",c:!0,i:0})]))],p:i.slice(0,7),e:[(t,e)=>t.g(e,[i[8],i[7]]),function(t,e,i,n,r,o){return t.g(this,[o])},(t,e)=>t.g(e,[i[8]]),(t,e)=>t.g(e,[i[5]]),(t,e)=>t.g(e,[i[6]])],i:[[[2]]]})}(l),b=function(t,e){"use strict";var i=["_itemsCount","theme","_options","imageTemplate","image","logo","icon-DocumentUnknownType","mainText","ÐапиÑÑ ÑееÑÑÑа","additionalText"];return t.g({v:1,m:"wml!Controls/_dragnDrop/DraggingTemplate/DraggingTemplate",t:[t.r(((t,e)=>[t.g(e,"div",{K:"0_",A:{class:"controls-DragNDrop__draggingTemplate controls_dragnDrop_theme-"+t.e(t.x(e,0))},r:!0,c:!0},[t.m(e,1)?[t.P(e,t.m(e,1),{K:"0_0_0_",A:{class:"controls-DragNDrop__draggingTemplate-image"},O:t.s(e,{},t.m(e,2)),m:"none",i:0})]:t.m(e,3)?[t.g(e,"img",{K:"0_1_0_",A:{class:"controls-DragNDrop__draggingTemplate-icon",src:t.e(t.x(e,3))}})]:[t.g(e,"div",{K:"0_2_0_",A:{class:"controls-DragNDrop__draggingTemplate-icon"}},[t.g(e,"span",{K:"0_2_0_0_",A:{class:"controls-DragNDrop__draggingTemplate-icon-size icon-size "+t.e(t.x(e,4))}})])],t.g(e,"div",{K:"0_3_",A:{class:"controls-DragNDrop__draggingTemplate-text"}},[t.g(e,"div",{K:"0_3_0_",A:{class:"controls-DragNDrop__draggingTemplate-mainText"}}
170,[t.t(t.e(t.x(e,5)),"0_3_0_0_")]),t.g(e,"div",{K:"0_3_1_",A:{class:"controls-DragNDrop__draggingTemplate-additionalText"}},[t.t(t.e(t.x(e,6)),"0_3_1_0_")])]),t.m(e,7)?[t.g(e,"span",{K:"0_4_0_",A:{class:"controls-DragNDrop__draggingTemplate-counter"}},[t.t(t.e(t.x(e,8)),"0_4_0_0_")])]:t.t()])]))],p:i.slice(0,1),e:[(t,e)=>t.g(e,[i[2],i[1]]),(t,e)=>t.g(e,[i[2],i[3]]),(t,e)=>t.g(e,[i[2]]),(t,e)=>t.g(e,[i[2],i[4]]),(t,e)=>t.g(e,[i[2],i[5]])||i[6],(t,n)=>t.g(n,[i[2],i[7]])||e(i[8]),(t,e)=>t.g(e,[i[2],i[9]]),(t,e)=>t.g(e,[i[0]])>1,(t,e)=>t.g(e,[i[0]])],i:[[[2]]]})}(l,t),y=function(t){"use strict";var e=["draggingTemplateOptions","draggingTemplate","theme","_options"];return t.g({v:1,m:"wml!Controls/_dragnDrop/DraggingTemplateWrapper",t:[t.r(((t,e)=>[t.P(e,t.m(e,0),{K:"0_",A:{class:"controls-DragNDrop__draggingTemplate-wrapper controls_dragnDrop_theme-"+t.e(t.m(e,1))},O:t.S(e,{},t.m(e,2)),m:"attribute",c:!0,i:0})]))],p:e.slice(0,2),e:[(t,i)=>t.g(i,[e[1]]),(t,i)=>t.g(i,[e[3],e[2]]),(t,i)=>t.g(i,[e[0]])],i:[[[2]]]})}(l),T=y,O=function(t,e,i,n,r,o,s,a,g,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NOT_DRAGGABLE_JS_SELECTOR=void 0,e.NOT_DRAGGABLE_JS_SELECTOR="controls-DragNDrop__notDraggable";class _ extends s.Control{constructor(){super(...arguments),this._dragEntity=null,this._startEvent=null,this._currentEvent=null,this._startImmediately=null,this._startOnPointerDown=!1,this._documentDragging=!1,this._insideDragging=!1,this._draggedKey=null,this._dragObject=null,this._template=l,this.thisDocumentOverflow=""}_registerMouseMove(){this._notify("register",["mousemove",this,this._onMouseMove],{bubbling:!0})}_registerTouchMove(){this._notify("register",["touchmove",this,this._onTouchMove],{bubbling:!0})}_unregisterMouseMove(){this._notify("unregister",["mousemove",this],{bubbling:!0}),this._notify("unregister",["touchmove",this],{bubbling:!0})}_registerMouseUp(){this._notify("register",["mouseup",this,this._onMouseUp],{bubbling:!0}),this._notify("register",["touchend",this,this._onMouseUp],{bubbling:!0})}_unregisterMouseUp(){this._notify("unregister",["mouseup",this],{bubbling:!0}),this._notify("unregister",["touchend",this],{bubbling:!0})}_onMouseMove(t){if(t.nativeEvent){if(!t.nativeEvent.buttons)this._dragNDropEnded(t);if(t.nativeEvent.buttons)this._onMove(t.nativeEvent)}}_onTouchMove(t){this._onMove(t.nativeEvent)}_onMouseUp(t){if(this._startEvent)this._dragNDropEnded(t),this._resetLongTouch()}_onMove(t){if(this._startEvent){const e=this._initialDragStart(t,this._startEvent,!1);if(this._documentDragging)this._currentEvent=t,this._notify("dragMove",[e]),this._showDraggingTemplate(e)}}_showDraggingTemplate(t){if(this._options.draggingTemplate)this._notify("_updateDraggingTemplate",[t,this._options.draggingTemplate],{bubbling:!0})}_documentDragStart(t){var e;if(this._insideDragging)this._notify("customdragStart",[t,this._draggedKey]);else this._dragEntity=t.entity;const n=null===(e=null==t?void 0:t.domEvent)||void 0===e?void 0:e.target;this._draggingZoom=g.DimensionsMeasurer.getZoomValue(n),this._documentDragging=!0,this._dragObject=t,this._notifyDragEvent("documentDragStart",[t]),i.default._dragStart()}_documentDragEnd(t){if(this._insideDragging)this._notify("customdragEnd",[t]);this._insideDragging=!1,this._documentDragging=!1,this._dragObject=null,i.default._dragEnd(),this._notifyDragEvent("documentDragEnd",[t])}_notifyDragEvent(t,e){this._notify(t,e),r.Bus.channel("dragnDrop").notify(t,...e)}_getDragObject(t,e){const i={entity:this._dragEntity,domEvent:null,position:null,offset:null,draggingTemplateOffset:null};if(t&&e)i.domEvent=t,i.position=_._getPageXY(t,this._draggingZoom),i.offset=_._getDragOffset(t,e,this._draggingZoom),i.draggingTemplateOffset=this._options.draggingTemplateOffset;return i}_dragNDropEnded(t){if(this._documentDragging){const e=[this._getDragObject(t.nativeEvent,this._startEvent)];this._notify("_documentDragEnd",e,{bubbling:!0})}if(this._startEvent&&this._startEvent.target)this._startEvent.target.classList.remove("controls-DragNDrop__dragTarget");this._unregisterMouseMove(),this._unregisterMouseUp(),this._toggleFixIoSDragBug(!1),this._dragEntity=null,this._startEvent=null,this._currentEvent=null}_toggleFixIoSDragBug(t){if(n.detection.isMobileSafari){if(t)this.thisDocumentOverflow=document.documentElement.style.overflow;document.documentElement.style.overflow=t?"hidden":this.thisDocumentOverflow||""}}_afterMount(t){super._afterMount(t),this._notify("register",["documentDragStart",this,this._documentDragStart],{bubbling:!0}),this._notify("register",["documentDragEnd",this,this._documentDragEnd],{bubbling:!0})}_beforeUnmount(){super._beforeUnmount();const t=this._startEvent||this._currentEvent;if(t)this._onMouseUp(new a.SyntheticEvent(t));this._notify("unregister",["documentDragStart",this],{bubbling:!0}),this._notify("unregister",["documentDragEnd",this],{bubbling:!0}),clearTimeout(this._longTouchTimer)}_mouseEnter(t){if(this._documentDragging)this._insideDragging=!0,this._notify("customdragEnter",[this._getDragObject()])}_mouseLeave(t){if(this._dragEntity&&!this._documentDragging)this._startImmediately=!0,this._onMove(t.nativeEvent);if(this._documentDragging)this._insideDragging=!1,this._notify("customdragLeave",[this._getDragObject()])}_onLongTouchMove(t){if(this._startEvent&&_._getIsShifted(this._startEvent,t))this._resetLongTouch()}_resetLongTouch(){if(this._longTouchTimer)clearTimeout(this._longTouchTimer),this._longTouchTimer=null,this._notify("unregister",["touchmove",this,this._onLongTouchMove],{bubbling:!0})}_onLongTouch(){this._registerTouchMove(),this._initialDragStart(this._startEvent,this._startEvent)}_initialDragStart(t,e,i=!0){const n=this._getDragObject(t,e),r=_._isDragStarted(e,t,this._startImmediately,this._startOnPointerDown);if(!this._documentDragging&&r)if(this._insideDragging=!0,this._notify("_documentDragStart",[n],{bubbling:!0}),i)this._showDraggingTemplate(n);return n}_onPointerDown(t){if("touchstart"===t.type)return this._longTouchTimer=setTimeout(this._onLongTouch.bind(this),_.LONG_PRESS_DELAY),void this._notify("register",["touchmove",this,this._onLongTouchMove],{bubbling:!0});if("mousedown"===t.type)return this._registerMouseMove(),void this._initialDragStart(t,t);else return}startDragNDrop(t,i,n={immediately:!1,startOnPointerDown:!1},r){var o,s;if(i.target.closest(`.${e.NOT_DRAGGABLE_JS_SELECTOR}`))return;if(this._documentDragging)this._documentDragEnd(this._dragObject);if(this._dragEntity=t,this._draggedKey=r,this._startEvent=null!==(o=i.nativeEvent)&&void 0!==o?o:i,this._startImmediately=n.immediately,this._startOnPointerDown=n.startOnPointerDown,this._options.resetTextSelection)_._clearSelection(this._startEvent);const a=null===(s=this._startEvent)||void 0===s?void 0:s.target;if(this._startEvent&&a)a.classList.add("controls-DragNDrop__dragTarget");if(this._startOnPointerDown)this._onPointerDown(this._startEvent);else this._registerMouseMove(),this._registerTouchMove();this._registerMouseUp(),this._toggleFixIoSDragBug(!0)}static _getPageXY(t,e){return g.DimensionsMeasurer.getRelativeMouseCoordsByMouseEvent(t,e)}
170static _isDragStarted(t,e,i,n){if(i||n)return!0;else return _._getIsShifted(t,e)}static _getIsShifted(t,e){const i=_._getDragOffset(t,e);return Math.abs(i.x)>_.SHIFT_LIMIT||Math.abs(i.y)>_.SHIFT_LIMIT}static _getSelection(){return window.getSelection()}static _clearSelection(t){if("mousedown"===t.type){const t=_._getSelection();if(t)if(t.removeAllRanges)t.removeAllRanges();else if(t.empty)t.empty()}}static _getDragOffset(t,e,i){const n=_._getPageXY(t,i),r=_._getPageXY(e,i);return{y:n.y-r.y,x:n.x-r.x}}static getDefaultOptions(){return{draggingTemplateOffset:10,resetTextSelection:!0}}static getOptionTypes(){return{resetTextSelection:(0,o.descriptor)(Boolean),draggingTemplateOffset:(0,o.descriptor)(Number)}}}return _.LONG_PRESS_DELAY=500,_.SHIFT_LIMIT=4,e.default=_,e}(0,{},d,o,r,n,i,e,s,v,"undefined"==typeof css_Controls_dragnDrop||css_Controls_dragnDrop),E=O,C=function(t,e,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class r extends i.Control{constructor(){super(...arguments),this._template=n}_beforeMount(t){var e,i;this._itemsCount=this._getCounterText(null===(i=null===(e=t.entity)||void 0===e?void 0:e.getItems)||void 0===i?void 0:i.call(e).length)}_getCounterText(t){if(!t)return;let e;if(t>999)e="999+";else if(t>1)e=t;return e}}return e.default=r,e}(0,{},i,b,"undefined"==typeof css_Controls_dragnDrop||css_Controls_dragnDrop),L=C,M=function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class n extends i.default{getItem(){return this._options.item}}return e.default=n,e}(0,{},h),S=M,w=function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class n extends i.default{constructor(){super(...arguments),this.allowAutoscroll=!0}getItems(){return this._options.items}}return e.default=n,e}(0,{},h),R=w,x=function(t,e,i,n,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class o extends i.Control{constructor(){super(...arguments),this._template=n}_documentDragStart(t,e){this._controllerClass.documentDragStart(e)}_documentDragEnd(t,e){this._controllerClass.documentDragEnd(e)}_updateDraggingTemplate(t,e,i){this._controllerClass.updateDraggingTemplate(e,i)}_beforeMount(){this._controllerClass=new r.default}_beforeUnmount(){this._controllerClass.destroy()}_registerHandler(t,e,i,n,r){this._controllerClass.registerHandler(t,e,i,n,r)}_unregisterHandler(t,e,i,n){this._controllerClass.unregisterHandler(t,e,i,n)}}return e.default=o,e}(0,{},i,D,d,"undefined"==typeof css_Controls_dragnDrop||css_Controls_dragnDrop),P=x,A=function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class n extends i.default{getMainText(){return null}getLogo(){return null}getAdditionalText(){return null}getImage(){return null}}return e.default=n,e}(0,{},w),N=A,H=function(t){"use strict";function e(){return this}var i="undefined"==typeof window,n=["_isResizing","_dragging","_fakeDragging","_styleArea","_getLogicOrientation","_getCursorOrientation","_isMobilePlatform","_onDragHandler","_onStartDragHandler","_onEndDragHandler","_beginDragHandler","minOffset","_options","maxOffset","theme","_mobile","","direction","areaStyle","dragMove","customdragStart","documentDragEnd","mousedown","touchstart"];return t.g({v:1,m:"wml!Controls/_dragnDrop/ResizingLine/ResizingLine",d:t.d(["Controls/_dragnDrop/Container"],arguments,1),t:[t.c(((t,r)=>[t.g(r,"div",{K:"0_0_0_1_0_0_",A:{class:"controls-ResizingLine__border controls-ResizingLine__border_"+t.e(t.x(r,8))},E:i?{}:{"on:mousedown":[{value:n[10],originalName:n[22],viewController:r.v}],"on:touchstart":[{value:n[10],originalName:n[23],viewController:r.v}],meta:{isControl:!1,context:e,handler:t.M(r,9)}},r:!0})])),t.r(((t,i)=>[t.m(i,0)?[t.g(i,"div",{K:"0_0_",A:{class:"controls-ResizingLine controls_dragnDrop_theme-"+t.e(t.x(i,1)),"data-qa":"controls-ResizingLine"},r:!0,c:!0},[t.g(i,"div",{K:"0_0_0_",A:{class:"controls-ResizingLine__wrapper"}},[t.g(i,"div",{K:"0_0_0_0_",A:{class:"controls-ResizingLine__areaWrapper controls-ResizingLine"+t.e(t.x(i,2))+"__areaWrapper_"+t.e(t.x(i,3))+" controls-ResizingLine__areaWrapper_"+t.e(t.x(i,3))+"_direction-"+t.e(t.x(i,4))}},[t.m(i,5)?[t.g(i,"div",{K:"0_0_0_0_0_0_",A:{style:t.e(t.x(i,6)),class:"controls-ResizingLine__area controls-ResizingLine__area_"+t.e(t.x(i,3))+" controls-ResizingLine__area controls-ResizingLine__area_style-"+t.e(t.x(i,7))}}),t.g(i,"div",{K:"0_0_0_0_0_1_",A:{class:"controls-ResizingLine__cursor controls-ResizingLine__cursor_"+t.e
170(t.x(i,8))}})]:t.t()]),t.C(i,"ws:Controls/_dragnDrop/Container",{K:"0_0_0_1_",E:{"on:dragmove":[{value:n[7],originalName:n[19],viewController:i.v}],"on:customdragstart":[{value:n[8],originalName:n[20],viewController:i.v}],"on:documentdragend":[{value:n[9],originalName:n[21],viewController:i.v}],meta:{isControl:!0,context:e,handler:t.M(i,9)}},O:{esc:!1,name:"dragNDrop",content:t.o(i,0,0)}})])])]:[t.g(i,"invisible-node",{K:"1_0_",r:!0,c:!0})]]))],p:n.slice(0,11),e:[(t,e,i)=>t.c(i,e,[n[0]],[t.g(e,[n[12],n[11]]),t.g(e,[n[12],n[13]])]),(t,e)=>t.g(e,[n[12],n[14]]),(t,e)=>t.g(e,[n[6]])?n[15]:n[16],(t,e,i)=>t.c(i,e,[n[4]]),(t,e)=>t.g(e,[n[12],n[17]]),(t,e)=>t.g(e,[n[1]])||t.g(e,[n[2]]),(t,e)=>t.g(e,[n[3]]),(t,e)=>t.g(e,[n[12],n[18]]),(t,e,i)=>t.c(i,e,[n[5]]),function(t,e,i,n,r,o){return t.g(this,[o])}],i:[[[8]]]})}(l,O),I=function(t,e,i,n,r,o){"use strict";var s;Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal",t.DIAGONAL_UP_RIGHT="diagonalUpRight",t.DIAGONAL_UP_LEFT="diagonalUpLeft",t.VERTICAL_HORIZONTAL="verticalHorizontal",t.HORIZONTAL_VERTICAL="horizontalVertical"}(s||(s={}));class a extends r.default{constructor(){super(...arguments),this._template=i,this._styleArea="",this._offsetValue={}}_afterMount(){(0,o.RegisterUtil)(this,"customscroll",this._scrollHandler.bind(this))}_beforeUnmount(){(0,o.UnregisterUtil)(this,"customscroll")}_scrollHandler(t){if(this._dragging&&this._dragObject)this._dragObject.offset=this._offsetValue,this._onDragHandler(t,this._dragObject)}_onDragHandler(t,e){const i=this._options.orientation===s.HORIZONTAL?e.offset.x:e.offset.y;this.drag(i),this._offsetValue=e.offset,e.entity.offset=this._validateOffset(i),this._notify("dragMove",[e])}_clearStyleArea(){this._styleArea=""}_isLogicHorizontal(){return this._options.orientation===s.HORIZONTAL||this._options.orientation===s.HORIZONTAL_VERTICAL}_getLogicOrientation(){return this._isLogicHorizontal()?s.HORIZONTAL:s.VERTICAL}_getCursorOrientation(){return this._options.orientation}_getEntityOffset(t){return t.entity.offset.value}_setOffsets(){var t;const e=(null===(t=this._container)||void 0===t?void 0:t.getBoundingClientRect())||{};this._offsetTop=e.top,this._offsetLeft=e.left}startDrag(){super.startDrag(),this._setOffsets()}fakeDrag(t){this._setOffsets(),this._fakeDragging=!0,this.drag(t)}drag(t){const e=this._isLogicHorizontal()?"width":"height",i=this._validateOffset(t),n=`${Math.abs(i.value)}px`;this._styleArea=`${e}:${n};${i.style};`}_validateOffset(t){var e;const i=this._offset(t),n=(null===(e=this._container)||void 0===e?void 0:e.getBoundingClientRect())||{};if(this._isLogicHorizontal()&&this._offsetLeft!==n.left)i.value+=this._offsetLeft-n.left;if(!this._isLogicHorizontal()&&this._offsetTop!==n.top)i.value+=this._offsetTop-n.top;return i}_offset(t){const{direction:e,minOffset:i,maxOffset:n,step:r=1}=this._options,o=t-t%r;let s;if(this._isLogicHorizontal())s=["left","right"];else s=["top","bottom"];if(o>0&&"direct"===e)return{style:`${s[0]}: 100%`,value:Math.min(o,Math.abs(n))};if(o>0&&"reverse"===e)return{style:`${s[0]}: 0`,value:-Math.min(o,Math.abs(i))};if(o<0&&"direct"===e)return{style:`${s[1]}: 0`,value:-Math.min(-o,Math.abs(i))};if(o<0&&"reverse"===e)return{style:`${s[1]}: 100%`,value:Math.min(-o,Math.abs(n))};else return{style:"",value:0}}static getDefaultTypes(){return{...r.default.getDefaultTypes(),direction:(0,n.descriptor)(String).oneOf(["direct","reverse"]),orientation:(0,n.descriptor)(String).oneOf(["vertical","horizontal","diagonalUpRight","diagonalUpLeft","horizontalVertical","verticalHorizontal"])}}}return a.defaultProps={...r.default.getDefaultOptions(),direction:"direct",orientation:s.HORIZONTAL,step:1},e.default=a,e}(0,{},H,n,f,g,"undefined"==typeof css_Controls_dragnDrop||css_Controls_dragnDrop),j=I,z=function(t){"use strict";function e(){return this}var i=["_updateDraggingTemplate","_documentDragStart","_documentDragEnd","_onRegisterHandler","content","_options","register","unregister"];return t.g({v:1,m:"wml!Controls/_dragnDrop/Controller/Compound/Compound",d:t.d(["Controls/_dragnDrop/Controller"],arguments,1
170),t:[t.c(((t,n)=>[t.P(n,t.m(n,1),{K:"0_0_0_",E:{"on:register":[{value:i[3],originalName:i[6],viewController:n.v}],"on:unregister":[{value:i[3],originalName:i[7],viewController:n.v}],meta:{isControl:!1,context:e,handler:t.M(n,0)}},O:t.s(n,{},t.m(n,2)),g:!0,m:"attribute",i:0})])),t.r(((t,n)=>[t.C(n,"ws:Controls/_dragnDrop/Controller",{K:"0_",E:{"on:_updatedraggingtemplate":[{value:i[0],originalName:i[0],viewController:n.v}],"on:_documentdragstart":[{value:i[1],originalName:i[1],viewController:n.v}],"on:_documentdragend":[{value:i[2],originalName:i[2],viewController:n.v}],meta:{isControl:!0,context:e,handler:t.M(n,0)}},O:{esc:!1,content:t.o(n,0,1)},m:"attribute",c:!0})]))],p:i.slice(0,4),e:[function(t,e,i,n,r,o){return t.g(this,[o])},(t,e)=>t.g(e,[i[5],i[4]]),(t,e)=>t.g(e,[i[5]])],i:[[[2]],[[1,2]]]})}(l,x),K=function(t,e,i,n,r,o,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class a extends i.Control{constructor(){super(...arguments),this._template=n}_onRegisterHandler(t,e,i,n){var r,o,a;if(-1!==["mousemove","touchmove","mouseup","touchend"].indexOf(e))if(n)this._compoundHandlers=this._compoundHandlers||{},this._compoundHandlers[e]=t=>{n.apply(i,[new s.SyntheticEvent(t)])},null===(o=null===(r=document.body)||void 0===r?void 0:r.addEventListener)||void 0===o||o.call(r,e,this._compoundHandlers[e]);else if(this._compoundHandlers&&this._compoundHandlers[e])null===(a=document.body)||void 0===a||a.removeEventListener(e,this._compoundHandlers[e]),this._compoundHandlers[e]=null}_updateDraggingTemplate(t,e,i){if(i)if(!this._draggingTemplate)this._draggingTemplate=Promise.resolve(r({draggingTemplateOptions:e,draggingTemplate:i})).then((t=>{let e;if(t instanceof HTMLElement)e=t;else{const i=document.createElement("div");i.innerHTML=String(t),e=i.firstElementChild}if(!e)throw new Error("Controls/dragnDrop: Failed to create dragging template");return document.body.appendChild(e),e.style.zIndex=String(1e4),e}));else this._updatePosition(e);else this._removeDraggingTemplate()}_documentDragStart(){o.Bus.globalChannel().notify("_compoundDragStart")}_documentDragEnd(){this._removeDraggingTemplate(),o.Bus.globalChannel().notify("_compoundDragEnd")}_removeDraggingTemplate(){if(this._draggingTemplate)this._draggingTemplate.then((t=>{null==t||t.remove()})),this._draggingTemplate=null}_updatePosition(t){var e;null===(e=this._draggingTemplate)||void 0===e||e.then((e=>{e.style.top=`${t.position.y+t.draggingTemplateOffset}px`,e.style.left=`${t.position.x+t.draggingTemplateOffset}px`}))}}return e.default=a,e}(0,{},i,z,y,r,e),U=K,u.DraggingTemplateWrapper=u.ItemEntity=u.ItemsEntity=u.Entity=u.ListItems=u.Compound=u.ResizingBase=u.ResizingLine=u.Controller=u.DraggingTemplate=u.NOT_DRAGGABLE_JS_SELECTOR=u.Container=u.ControllerClass=void 0,Object.defineProperty(u,"ControllerClass",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(u,"Container",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(u,"NOT_DRAGGABLE_JS_SELECTOR",{enumerable:!0,get:function(){return E.NOT_DRAGGABLE_JS_SELECTOR}}),Object.defineProperty(u,"DraggingTemplate",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(u,"Controller",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(u,"ResizingLine",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(u,"ResizingBase",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(u,"Compound",{enumerable:!0,get:function(){return U.default}}),Object.defineProperty(u,"ListItems",{enumerable:!0,get:function(){return N.default}}),Object.defineProperty(u,"Entity",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(u,"ItemsEntity",{enumerable:!0,get:function(){return R.default}}),Object.defineProperty(u,"ItemEntity",{enumerable:!0,get:function(){return S.default}}),u.DraggingTemplateWrapper=T,u})); 171define("Controls/sizeUtils",["UI/Utils","Env/Env","Controls/event","require","exports"],(function(e,t,i,o,n){var r,s,l,u,c,d,f,a,h,g;return Object.defineProperty(n,"__esModule",{value:!0}),r=function(e,t,i,o){"use strict";
171Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_ZOOM_VALUE=void 0,t.DEFAULT_ZOOM_VALUE=1;const n=["clientHeight","clientLeft","clientTop","clientWidth","scrollLeft","scrollTop","offsetHeight","offsetLeft","offsetTop","offsetWidth","scrollWidth","scrollHeight"],r=["offsetLeft","offsetTop","pageLeft","pageTop","width","height"],s=["innerHeight","innerWidth","scrollX","scrollY","pageXOffset","pageYOffset"],l=["height","width","top","bottom","right","left","x","y"],u="controls-Zoom";return t.default=new class{constructor(){this._zoomCache=new Map,this._enableNewZoom=!1,this._setEnableNewZoom()}_setEnableNewZoom(){if(o.detection.chromeVersion>=128||o.detection.EdgeVersion>=128)return void(this._enableNewZoom=!0);const e=e=>{const t=e.getBoundingClientRect().width,i=e.clientWidth;this._enableNewZoom=t-1>=i||t+1<=i},t=null===document||void 0===document?void 0:document.createElement("div");if(null===document||void 0===document?void 0:document.body)Object.assign(t.style,{width:"250px",position:"absolute",visibility:"hidden",zoom:2}),document.body.append(t),e(t),t.remove()}getBoundingClientRect(e){return this._getBoundingClientRect(e,!0)}getRelativeBoundingClientRect(e){return this._getBoundingClientRect(e,!1)}getElementDimensions(e,t){return this._getElementDimensions(e,!0,t)}getRelativeElementDimensions(e,t){return this._getElementDimensions(e,!1,t)}getWindowDimensions(e){const i=this.getZoomValue(e);if(i!==t.DEFAULT_ZOOM_VALUE)return this._getScaledElementDimensions(window,s,i);else return window}getMouseCoordsByMouseEvent(e){return this._getMouseCoordsByMouseEvent(e,!0)}getRelativeMouseCoordsByMouseEvent(e,t){return this._getMouseCoordsByMouseEvent(e,!1,t)}getVisualViewportDimensions(e,i){const o=void 0===i?this.getZoomValue(e):i,n=this._getVisualViewport();if(o!==t.DEFAULT_ZOOM_VALUE)return this._getScaledElementDimensions(n,r,o);else return n}getZoomValue(e){var i,n;let r=e;if(o.constants.isServerSide)return 1;if(!(e instanceof HTMLElement))r=document.body;let s=t.DEFAULT_ZOOM_VALUE,l=r.closest(`.${u}`);if(this._zoomCache.has(l))return this._zoomCache.get(l);const c=l;for(;l;){const e=null===(i=null===window||void 0===window?void 0:window.getComputedStyle(l))||void 0===i?void 0:i.zoom;if(e)s*=parseFloat(e);l=null===(n=null==l?void 0:l.parentElement)||void 0===n?void 0:n.closest(`.${u}`)}if(c&&-1===c.className.indexOf("controls-Popup"))this._zoomCache.set(c,s);return s}resetCache(){this._zoomCache.clear(),this._setEnableNewZoom()}_getScaledElementDimensions(e,t,i,o,n=!0){return t.reduce(((t,r)=>{if(this._enableNewZoom&&n){if(t[r]=e[r]/i,o&&"width"!==r&&"height"!==r)t[r]=this._calcScaledValue(t[r],i,o)}else t[r]=this._calcScaledValue(t[r]||e[r],i,o);return t}),{})}_getVisualViewport(){if(null===window||void 0===window?void 0:window.visualViewport)return window.visualViewport;else return{offsetLeft:0,offsetTop:0,pageLeft:o.constants.isBrowserPlatform&&window.pageXOffset,pageTop:o.constants.isBrowserPlatform&&window.pageYOffset,width:o.constants.isBrowserPlatform&&document.body.clientWidth,height:o.constants.isBrowserPlatform&&document.body.clientHeight}}_getMouseCoordsByMouseEvent(e,t,o){const n=e.type,r=t?null===document||void 0===document?void 0:document.body:e.target,s=o||this.getZoomValue(r);if(e.touches||e.changedTouches){let t=e.touches;if("touchend"===n)t=e.changedTouches;return{x:t[0].pageX/s,y:t[0].pageY/s}}else if("number"==typeof e.pageX)return{x:e.pageX/s,y:e.pageY/s};else i.Logger.error("DimensionsMeasurer: Event type must be must be mouse or touch event.")}_getBoundingClientRect(e,t){if(!e)return;const i=e.getBoundingClientRect(),o=this.getZoomValue(e);if(this._needScaleByZoom(e,o,t))return this._getScaledElementDimensions(i,l,o,t);else return i}_getElementDimensions(e,t,i){const o=void 0===i?this.getZoomValue(e):i,r=t||void 0!==i;if(this._needScaleByZoom(e,o,r))return this._getScaledElementDimensions(e,n,o,t,!1);else return e}_calcScaledValue(e,t,i){let o=t;if(i)o=this._getMainZoom()/t;return e/o}_needScaleByZoom(e,i,o){return o||i!==t.DEFAULT_ZOOM_VALUE&&(e===document.documentElement||!e.closest("body"))}_getMainZoom(){return this.getZoomValue(null===document||void 0===document?void 0:document.body)}},t}(0,{},e,t),s=r,l=function(e,t,i){"use strict";
171if(Object.defineProperty(t,"__esModule",{value:!0}),i.constants.isBrowserPlatform)(t=>{if(i.detection.isIE12||!("IntersectionObserver"in t)||!("IntersectionObserverEntry"in t)||!("intersectionRatio"in t.IntersectionObserverEntry.prototype))new Promise(((t,i)=>{e(["Controls/polyfills"],t,i)}));else if(!("isIntersecting"in t.IntersectionObserverEntry.prototype))Object.defineProperty(t.IntersectionObserverEntry.prototype,"isIntersecting",{get(){return this.intersectionRatio>0}})})(window,document);return t.default=void 0,t}(o,{},t),u=l,c=function(e,t,i,o){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.RESIZE_OBSERVER_BOX=void 0,function(e){e.contentBox="content-box",e.borderBox="border-box",e.devicePixelContentBox="device-pixel-content-box"}(n||(t.RESIZE_OBSERVER_BOX=n={}));return t.default=class{constructor(e,t,i){if(this._resizeObserverSupported=!1,this._control=e,this._resizeObserverSupported=o.constants.isBrowserPlatform&&window.ResizeObserver,this._resizeObserverCallback=t.bind(this._control),!i)this._controlResizeCallback=this._resizeObserverCallback;else this._controlResizeCallback=i.bind(this._control)}initialize(){if(this._resizeObserverSupported)this._initResizeObserver();else if(this._control)(0,i.RegisterUtil)(this._control,"controlResize",this._controlResizeCallback,{listenAll:!0})}_initResizeObserver(){if(!this._resizeObserver)this._resizeObserver=new ResizeObserver(this._resizeObserverCallback)}isResizeObserverSupported(){return this._resizeObserverSupported}terminate(){var e;if(this._resizeObserverSupported)null===(e=this._resizeObserver)||void 0===e||e.disconnect(),this._resizeObserver=null;else if(this._control)(0,i.UnregisterUtil)(this._control,"controlResize",{listenAll:!0})}observe(e,t){if(this._resizeObserverSupported)this._initResizeObserver(),this._resizeObserver.observe(e,t)}unobserve(e){if(this._resizeObserverSupported&&this._resizeObserver)this._resizeObserver.unobserve(e)}controlResizeHandler(){this._controlResizeCallback()}},t}(0,{},i,t),d=c,f=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.getTextWidth=void 0,t.getTextWidth=function(e,t,i){const o="left:-10000px;top:-10000px;height:auto;width:auto;position:absolute;"+(t?"font-size: "+t+"px;":""),n=document.createElement("div");if(document.all)n.style.setAttribute("cssText",o);else n.setAttribute("style",o);if(i)n.innerText=e;else n.innerHTML=e;document.body.appendChild(n);const r=n.clientWidth;return document.body.removeChild(n),r},t}(0,{}),a=f,h=function(e,t,i){"use strict";function o(e){return Array.prototype.filter.call(e.children,(e=>{if(null!==e.offsetParent)return e;if("none"!==window.getComputedStyle(e).display)return e;else return}))}function n(e,t,o){let n,s=null;if(t||o)s=getComputedStyle(e);if(t&&"sticky"===(null==s?void 0:s.position))n=e.style.position,e.style.position="static";const l=o&&"contents"===(null==s?void 0:s.display)?r(e,t):i.default.getBoundingClientRect(e);if(t&&void 0!==n)e.style.position=n;return l}function r(e,t,i){let r,s,l=n(e,t);if(0!==l.width||0!==l.height)return l;const u=o(e);if(i){for(let e=0;e<=u.length-1;e++)if(0!==u[e].offsetHeight&&0!==u[e].offsetWidth){r=u[e];break}for(let e=u.length-1;e>=0;e--)if(0!==u[e].offsetHeight&&0!==u[e].offsetWidth){s=u[e];break}}else r=u[0],s=u[u.length-1];if(0===u.length||!s||!r)return l;const c=n(r,t,!0),d=n(s,t,!0);return l={width:d.right-c.left,height:d.height,top:c.top,right:d.right,bottom:c.bottom,left:c.left},l}function s(e){if("contents"!==window.getComputedStyle(e).display)return e.offsetTop;const t=o(e);return t.length?t[0].offsetTop:0}return Object.defineProperty(t,"__esModule",{value:!0}),t.getOffsetTop=void 0,t.default=r,t.getOffsetTop=s,t}(0,{},r),g=h,n.DOMUtil=n.IntersectionObserver=n.DEFAULT_ZOOM_VALUE=n.DimensionsMeasurer=n.RESIZE_OBSERVER_BOX=n.ResizeObserverUtil=n.getTextWidth=n.getOffsetTop=n.getDimensions=void 0,Object.defineProperty(n,"getDimensions",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(n,"getOffsetTop",{enumerable:!0,get:function(){return g.getOffsetTop}}),Object.defineProperty(n,"getTextWidth",{enumerable:!0,get:function(){return a.getTextWidth}}),Object.defineProperty(n,"ResizeObserverUtil",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(n,"RESIZE_OBSERVER_BOX",{enumerable:!0,get:function(){return d.RESIZE_OBSERVER_BOX}}),Object.defineProperty(n,"DimensionsMeasurer",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(n,"DEFAULT_ZOOM_VALUE",{enumerable:!0,get:function(){return s.DEFAULT_ZOOM_VALUE}}),Object.defineProperty(n,"IntersectionObserver",{enumerable:!0,get:function(){return u.default}}),n})); 172define("Controls/Application/withLoadingContextProvider",["require","exports","react/jsx-runtime","react","Controls/LoadingIndicator","UI/Events"],(function(t,i,n,d,o,e){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(t){var i;return(i=class extends d.Component{constructor(t){super(t),this._loadingIndicatorRef=t=>{if(t)this._showHandler=t._showHandler.bind(t),this._hideHandler=t._hideHandler.bind(t),this._showHandlerContext=t.show.bind(t),this._hideHandlerContext=t.hide.bind(t)},this.showIndicator=(0,e.withWasabyEventObject)(this.showIndicator.bind(this)),this.hideIndicator=(0,e.withWasabyEventObject)(this.hideIndicator.bind(this)),this.showIndicatorContext=this.showIndicatorContext.bind(this),this.hideIndicatorContext=this.hideIndicatorContext.bind(this)}
172renderLoadingIndicator(){return(0,n.jsx)(o.default,{ref:this._loadingIndicatorRef,mainIndicator:!0,isGlobal:!0,children:(0,n.jsx)("div",{})})}showIndicator(...t){var i;return null===(i=this._showHandler)||void 0===i?void 0:i.call(this,...t)}hideIndicator(...t){var i;return null===(i=this._hideHandler)||void 0===i?void 0:i.call(this,...t)}showIndicatorContext(...t){var i;return null===(i=this._showHandlerContext)||void 0===i?void 0:i.call(this,...t)}hideIndicatorContext(...t){var i;return null===(i=this._hideHandlerContext)||void 0===i?void 0:i.call(this,...t)}render(){return(0,n.jsx)(o.ContextProvider,{showIndicator:this.showIndicatorContext,hideIndicator:this.hideIndicatorContext,children:(0,n.jsx)(t,{...this.props,loadingIndicator:this.renderLoadingIndicator.bind(this),showIndicator:this.showIndicator,hideIndicator:this.hideIndicator})})}}).displayName="withLoadingContextProvider",i}})); 173define("Controls/Application/withPendingContextProvider",["require","exports","react/jsx-runtime","react","Controls/Pending","Controls/Application/Utils"],(function(n,i,e,r,s,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(n){var i;return(i=class extends r.Component{constructor(n){super(n);this._pendingController=new s.PendingClass({notifyHandler:()=>{}}),this._registerPendingHandler=this._registerPendingHandler.bind(this),this._registerPendingEventHandler=this._registerPendingEventHandler.bind(this),this._finishPendingHandler=this._finishPendingHandler.bind(this),this._cancelFinishingPendingHandler=this._cancelFinishingPendingHandler.bind(this),this._hasPendingHandler=this._hasPendingHandler.bind(this),this._cancelFinishingPendingEventHandler=this._cancelFinishingPendingEventHandler.bind(this)}_registerPendingEventHandler(n,i,e){n.stopPropagation(),this._registerPendingHandler(i,e)}_registerPendingHandler(n,i){this._pendingController.registerPending(n,i)}_finishPendingHandler(n,i,e){return n.stopPropagation(),this._pendingController.finishPendingOperations(i,e)}_cancelFinishingPendingEventHandler(n,i){n.stopPropagation(),this._cancelFinishingPendingHandler(i)}_cancelFinishingPendingHandler(n){this._pendingController.cancelFinishingPending(n)}_hasPendingHandler(){return this._pendingController.hasPendings()}render(){return(0,e.jsx)(s.ContextProvider,{registerPending:this._registerPendingHandler,finishPendingOperations:this._finishPendingHandler,cancelFinishingPending:this._cancelFinishingPendingHandler,getHasPendings:this._hasPendingHandler,children:(0,e.jsx)(n,{...this.props,registerPending:(0,t.mergeHandlers)(this._registerPendingEventHandler,this.props.registerPending,!0),finishPendingOperations:(0,t.mergeHandlers)(this._finishPendingHandler,this.props.finishPendingOperations,!0),cancelFinishingPending:(0,t.mergeHandlers)(this._cancelFinishingPendingEventHandler,this.props.cancelFinishingPending,!0)})})}}).displayName="withPendingContextProvider",i}})); 174define("Controls/Application/withPopupManagerActions",["require","exports","react/jsx-runtime","Controls/popup","Controls/sizeUtils","Env/Env","Env/Event","react","Controls/Application/Utils","UI/Events"],(function(e,o,n,r,l,s,i,t,a,p){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(o){var d;return(d=class extends t.Component{constructor(e){super(e),this._stopTouchEnd=!1,this.onOpenInfoBox=(0,a.mergeHandlers)(this._openInfoBoxHandler.bind(this),this.props.openInfoBox,!0),this.onCloseInfoBox=(0,a.mergeHandlers)(this._closeInfoBoxHandler.bind(this),this.props.closeInfoBox,!0),this.onForceCloseInfoBox=(0,a.mergeHandlers)(this._forceCloseInfoBoxHandler.bind(this),this.props.forceCloseInfoBox,!0),r.Controller.setTheme(e.theme),r.Controller.setDataLoaderModule(e.dataLoaderModule),this._longTapEvent=new p.TouchEventPolyfill(!1,this._longTapPage.bind(this)),this._mousedownPage=this._mousedownPage.bind(this),this._mousemovePage=this._mousemovePage.bind(this)}componentDidMount(){if(i.Bus.channel("popupManager").subscribe("managerPopupBeforeDestroyed",this._popupBeforeDestroyedHandler,this),window.document.addEventListener("scroll",this._scrollPage.bind(this)),s.detection.isMobileIOS&&s.detection.IOSVersion>
17412)window.visualViewport.addEventListener("resize",this._resizePage.bind(this));window.addEventListener("resize",this._resizePage.bind(this))}componentWillUnmount(){var e;if(this._globalPopup)this._globalPopup.registerGlobalPopupEmpty();null===(e=r.Controller.getController())||void 0===e||e.destroy();i.Bus.channel("popupManager").unsubscribe("managerPopupBeforeDestroyed",this._popupBeforeDestroyedHandler,this)}componentDidUpdate(e){if(e.theme!==this.props.theme)r.Controller.setTheme(this.props.theme)}_popupBeforeDestroyedHandler(e,o,n,r){this._initPopupGlobalController().then((()=>{this._globalPopup.popupBeforeDestroyedHandler(e,o,n,r)}))}_openInfoBoxHandler(e,o,n){this._initPopupGlobalController().then((()=>{this._globalPopup.openInfoBoxHandler(e,o,n)}))}_openDialogHandler(e,o,n,r){return this._globalPopup.openDialogHandler(e,o,n,r)}_closeInfoBoxHandler(e,o){var n;null===(n=this._globalPopup)||void 0===n||n.closeInfoBoxHandler(e,o)}_forceCloseInfoBoxHandler(e){var o;null===(o=this._globalPopup)||void 0===o||o.forceCloseInfoBoxHandler()}_openPreviewerHandler(e,o,n){return this._initPopupGlobalController().then((()=>{var r;return null===(r=this._globalPopup)||void 0===r?void 0:r.openPreviewerHandler(e,o,n)}))}_cancelPreviewerHandler(e,o){var n;null===(n=this._globalPopup)||void 0===n||n.cancelPreviewerHandler(e,o)}_isPreviewerOpenedHandler(e){if(!this._globalPopup)return!1;else return this._globalPopup.isPreviewerOpenedHandler(e)}_closePreviewerHandler(e,o){var n;null===(n=this._globalPopup)||void 0===n||n.closePreviewerHandler(e,o)}_loadPopupGlobalController(){return new Promise(((o,n)=>{e(["Controls/popupTemplateStrategy"],o,n)})).then((({GlobalController:e})=>{this._globalPopup=new e,this._globalPopup.registerGlobalPopup()})).catch((function(e){requirejs.onError(e)}))}_initPopupGlobalController(){if(this._globalPopup)return Promise.resolve();else return this._loadPopupGlobalController()}_scrollPage(){var e;null===(e=r.Controller.getController())||void 0===e||e.eventHandler("pageScrolled",[])}_resizePage(){var e;null===(e=r.Controller.getController())||void 0===e||e.eventHandler("popupResizeOuter",[])}_mousedownPage(e){var o,n;if(!s.detection.isMobilePlatform)null===(n=null===(o=r.Controller.getController())||void 0===o?void 0:o.mouseDownHandler)||void 0===n||n.call(o,e)}_mousemovePage(e){var o,n;null===(n=(o=this.props).onMouseMove)||void 0===n||n.call(o,e)}_pointerDownPage(e){var o,n;if(s.detection.isMobilePlatform&&"mouse"===e.pointerType)null===(n=null===(o=r.Controller.getController())||void 0===o?void 0:o.mouseDownHandler)||void 0===n||n.call(o,e)}_touchEndPage(e){var o,n,l,s;if(null===(n=null===(o=this._longTapEvent)||void 0===o?void 0:o.getTouches())||void 0===n||n.onTouchEnd(),!this._stopTouchEnd)null===(s=null===(l=r.Controller.getController())||void 0===l?void 0:l.mouseDownHandler)||void 0===s||s.call(l,e);this._stopTouchEnd=!1}_touchMovePage(e){var o,n,r,l;null===(n=(o=this.props).onTouchMove)||void 0===n||n.call(o,e),null===(l=null===(r=this._longTapEvent)||void 0===r?void 0:r.getTouches())||void 0===l||l.onTouchMove(e)}_longTapPage(){this._stopTouchEnd=!0}_pageScrolledHandler(e,...o){var n;null===(n=r.Controller.getController())||void 0===n||n.eventHandler.apply(r.Controller.getController(),["pageScrolled",o])}_workspaceResizeHandler(e,...o){var n;l.DimensionsMeasurer.resetCache(),null===(n=r.Controller.getController())||void 0===n||n.eventHandler.apply(r.Controller.getController(),["workspaceResize",o])}render(){return(0,n.jsx)(r.PageContextProvider,{onOpenInfoBox:this.onOpenInfoBox,onCloseInfoBox:this.onCloseInfoBox,onForceCloseInfoBox:this.onForceCloseInfoBox,onMouseDown:this._mousedownPage,onMouseMove:this._mousemovePage,children:(0,n.jsx)(o,{...this.props,onScroll:(0,a.mergeHandlers)(this._scrollPage.bind(this),this.props.onScroll),onMouseDown:(0,a.mergeHandlers)(this._mousedownPage,this.props.onMouseDown),onPointerDown:(0,a.mergeHandlers)(this._pointerDownPage.bind(this),this.props.onPointerDown),...this._longTapEvent.getTouches(),onTouchMove:this._touchMovePage.bind(this),onTouchEnd:(0,a.mergeHandlers)(this._touchEndPage.bind(this),this.props.onTouchEnd),openInfoBox:this.onOpenInfoBox,closeInfoBox:this.onCloseInfoBox,forceCloseInfoBox:this.onForceCloseInfoBox,serviceError:(0,a.mergeHandlers)(this._openDialogHandler.bind(this),this.props.serviceError,!0),openPreviewer:(0,a.mergeHandlers)(this._openPreviewerHandler.bind(this),this.props.openPreviewer,!0),cancelPreviewer:(0,a.mergeHandlers)(this._cancelPreviewerHandler.bind(this),this.props.cancelPreviewer,!0),isPreviewerOpened:(0,a.mergeHandlers)(this._isPreviewerOpenedHandler.bind(this),this.props.isPreviewerOpened,!0),closePreviewer:(0,a.mergeHandlers)(this._closePreviewerHandler.bind(this),this.props.closePreviewer,!0),pageScrolled:(0,a.mergeHandlers)(this._pageScrolledHandler.bind(this),this.props.pageScrolled,!0),workspaceResize:(0,a.mergeHandlers)(this._workspaceResizeHandler.bind(this),this.props.workspaceResize,!0),resize:(0,a.mergeHandlers)(this._resizePage.bind(this),this.props.resize,!0)})})}}).displayName="withPopupManagerActions",d}}));
175define("Controls/Application/withRegisters",["require","exports","react/jsx-runtime","react","Controls/event","Env/Env","Controls/Application/Utils"],(function(e,s,r,t,i,o,n){"use strict";Object.defineProperty(s,"__esModule",{value:!0});const a=["customscroll","controlResize","mousemove","mouseup","touchmove","touchend","mousedown"];s.default=function(e){var s;return(s=class extends t.Component{constructor(e){super(e),this._createRegisters()}componentDidMount(){if(o.detection.isMobileIOS&&o.detection.IOSVersion>12)window.visualViewport.addEventListener("resize",this._resizePage.bind(this));window.addEventListener("resize",this._resizePage.bind(this))}componentWillUnmount(){for(const e in this._registers)if(this._registers.hasOwnProperty(e))this._registers[e].destroy()}_createRegisters(){this._registers={},a.forEach((e=>{this._registers[e]=new i.RegisterClass({register:e})}))}_registerHandler(e,s,r,t,i){if(!this._registers[s]);else this._registers[s].register(e,s,r,t,i)}_unregisterHandler(e,s,r,t){if(!this._registers[s]);else this._registers[s].unregister(e,s,r,t)}_scrollPage(e){var s;null===(s=this._registers.customscroll)||void 0===s||s.start(e)}_resizePage(e){var s;null===(s=this._registers.controlResize)||void 0===s||s.start(e)}_mousedownPage(e){var s;null===(s=this._registers.mousedown)||void 0===s||s.start(e)}_mousemovePage(e){var s;null===(s=this._registers.mousemove)||void 0===s||s.start(e)}_mouseupPage(e){var s;null===(s=this._registers.mouseup)||void 0===s||s.start(e)}_touchmovePage(e){var s;null===(s=this._registers.touchmove)||void 0===s||s.start(e)}_touchendPage(e){var s;null===(s=this._registers.touchend)||void 0===s||s.start(e)}_mouseleavePage(e){var s;null===(s=this._registers.mousemove)||void 0===s||s.start(e)}render(){return(0,r.jsx)(e,{...this.props,onScroll:(0,n.mergeHandlers)(this._scrollPage.bind(this),this.props.onScroll),onMouseDown:(0,n.mergeHandlers)(this._mousedownPage.bind(this),this.props.onMouseDown),onMouseMove:(0,n.mergeHandlers)(this._mousemovePage.bind(this),this.props.onMouseMove),onMouseUp:(0,n.mergeHandlers)(this._mouseupPage.bind(this),this.props.onMouseUp),onTouchMove:(0,n.mergeHandlers)(this._touchmovePage.bind(this),this.props.onTouchMove),onTouchEnd:(0,n.mergeHandlers)(this._touchendPage.bind(this),this.props.onTouchEnd),onMouseLeave:(0,n.mergeHandlers)(this._mouseleavePage.bind(this),this.props.onMouseLeave),register:(0,n.mergeHandlers)(this._registerHandler.bind(this),this.props.register,!0),unregister:(0,n.mergeHandlers)(this._unregisterHandler.bind(this),this.props.unregister,!0),resize:(0,n.mergeHandlers)(this._resizePage.bind(this),this.props.resize,!0)})}}).displayName="withRegisters",s}})); 176define("Controls/Application/withWhiteSpaceOnRotationHack",["require","exports","react/jsx-runtime","react","Env/Env"],(function(e,t,i,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return t=class extends n.Component{constructor(){super(...arguments),this._prevOrientationChangeState=0}componentDidMount(){if(r.detection.isMobileIOS&&r.detection.IOSVersion>12)if(window.visualViewport.addEventListener("resize",this._resizePage.bind(this)),this.props.isAdaptive)this._prevInnerHeight=window.innerHeight,window.addEventListener("orientationchange",this._orientationChange.bind(this));window.addEventListener("resize",this._resizePage.bind(this))}_resizePage(e){this._prevInnerHeight=e.target.height||e.target.innerHeight}_orientationChange(e){if(!e||!e.target)return;const t=e.target.orientation;if(e.target.innerHeight!==this._prevInnerHeight&&this._prevOrientationChangeState!==t)document.documentElement.style.height="initial",setTimeout((()=>{document.documentElement.style.height="100%"}),500),this._prevOrientationChangeState=t,this._prevInnerHeight=e.target.innerHeight}render(){return(0,i.jsx)(e,{...this.props})}},t.displayName="withWhiteSpaceOnRotationHack",t}})); 177define("UI/Bootstrap",["react/jsx-runtime","react","UICore/Focus","UICore/Adaptive","UI/HotKeys","UI/Events","Env/Env","Application/Env","require","exports"],(function(e,t,r,i,o,n,a,s,d,l){var c,p,h;
177return Object.defineProperty(l,"__esModule",{value:!0}),c=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BootstrapContext=void 0;const i=r.createContext(void 0);return t.BootstrapContext=i,t}(0,{},t),p=function(e,t,r,i,o,n,a,s,d,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const p={initialized:!0};class h extends i.Component{constructor(e){super(e),this.rootStyle={width:"inherit",height:"inherit"},this.ariaHidden=n.detection.firefox?!0:void 0,this._keyDownHandler=this._keyDownHandler.bind(this),this.state={preload:!o.query.get.isCanceledRevive}}componentDidMount(){var e;this.setState({preload:!1}),document.body.wasabyLoaded=!0,null===(e=null===performance||void 0===performance?void 0:performance.mark)||void 0===e||e.call(performance,"UI/Bootstrap DidMount")}_keyDownHandler(e){(0,d.dispatcherHandler)(new l.SyntheticEvent(e))}render(){var e;let t=a.ScrollOnBodyStore.read("enabled")?"adaptiveOverrides__bodyScroll":"";if(t+=this.state.preload?"pre-load ":"",this.props.className)t+=" "+this.props.className;if(null===(e=this.context)||void 0===e?void 0:e.initialized)return(0,r.jsx)("div",{"aria-hidden":this.ariaHidden,style:{width:"inherit",height:"inherit"},className:t,ref:this.props.forwardedRef,children:this.props.children});else return(0,r.jsx)(c.BootstrapContext.Provider,{value:p,children:(0,r.jsx)(s.FocusEnvironment,{as:"div","aria-hidden":this.ariaHidden,style:this.rootStyle,className:t,forwardedRef:this.props.forwardedRef,onKeyDown:this._keyDownHandler,children:(0,r.jsx)(a.AdaptiveInitializerInternal,{children:(0,r.jsx)(a.PrintDialog,{children:(0,r.jsxs)(r.Fragment,{children:[this.props.children,this.state.preload&&(0,r.jsx)("div",{className:"preload-overlay",name:"loadingOverlay"})]})})})})})}}return h.contextType=c.BootstrapContext,h.displayName="UI/Bootstrap",t.default=h,t}(0,{},e,t,s,a,i,r,o,n,c),h=p,l.default=h.default,l})); 178define("UI/Head",["UI/theme/controller","UI/Utils","Env/Env","Application/Page","Application/Env","require","exports"],(function(e,t,n,r,o,a,c){var i,s,f,g;return Object.defineProperty(c,"__esModule",{value:!0}),i=function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.applyHeadJson=t.createMetaScriptsAndLinks=t.createDefaultTags=t.createViewPort=t.createTitle=void 0;const o="canonical",a="shortcut icon";t.createTitle=function(e){n.Head.getInstance().createTag("title",{},e)},t.createViewPort=function(){n.Head.getInstance().createTag("meta",{content:"width=1024",name:"viewport"})},t.createDefaultTags=function(e){const t=n.Head.getInstance();if(e.noscript)t.createNoScript(e.noscript);[{"http-equiv":"X-UA-Compatible",content:"IE=edge"},{charset:"utf-8",class:"head-server-block"}].forEach((e=>{t.createTag("meta",e)}))};const c=(e,t)=>({tag:e,attrs:t});return t.createMetaScriptsAndLinks=function(e){const t=n.Head.getInstance(),i=n.JSLinks.getInstance();[].concat((e.meta||[]).map((e=>c("meta",e)))).concat((e.scripts||[]).map((e=>c("script",e)))).concat((e.links||[]).map((e=>c("link",e)))).forEach((e=>{if(["href","src"].forEach((t=>{const n=e.attrs[t];if(n&&![o,a].includes(e.attrs.rel))e.attrs[t]=(0,r.getResourceUrl)(n)})),"script"!==e.tag||!e.attrs.src)t.createTag(e.tag,e.attrs);else if("undefined"==typeof window)i.createTag(e.tag,e.attrs)}))},t.applyHeadJson=function(e){if(!(e&&e instanceof Array))return;const t=n.Head.getInstance();e.forEach((e=>{const n=e[0];let o="object"==typeof e[1]?e[1]:{};const a="string"==typeof e[1]?e[1]:null;if(!o)o={};const c=Object.keys(o);for(const e of c){const t=o[e];if(t){if("href"===e||"src"===e){o[e]=(0,r.getResourceUrl)(t);continue}o[e]=(0,r.escapeHtml)(t)}}t.createTag(n,o,a)}))},t}(0,{},r,t),s=i,f=function(e,t,n,r,o,a,c){"use strict";function i(e){if("warning"===e)return r.LogLevel.warning;if("error"===e)return r.LogLevel.error;else return r.LogLevel.info}function s(e){return e.replace(g,"").trim().replace(l," ")}Object.defineProperty(t,"__esModule",{value:!0}),t.prepareScript=t.createWsConfig=void 0;const f=`(()=>{const e=document.head,t=['${c.ELEMENT_THEME_ATTR_LAYER.FALLBACK}','${c.ELEMENT_THEME_ATTR_LAYER.STATIC}','${c.ELEMENT_THEME_ATTR_LAYER.SERVICE}'];let r=document.readyState=='complete',o=!1,n=()=>Array.from(e.querySelectorAll('link[rel="stylesheet"][${c.ELEMENT_THEME_ATTR.SELECTOR}][${c.ELEMENT_THEME_ATTR.LAYER}]')),a=()=>{let r=n();if(!r.length)return!1;let o=new Map;r.forEach((e,t)=>o.set(e,t));let a=[...r].sort((e,r)=>(t.indexOf(e.getAttribute('${c.ELEMENT_THEME_ATTR.LAYER}'))+1||t.length+1)-(t.indexOf(r.getAttribute('${c.ELEMENT_THEME_ATTR.LAYER}'))+1||t.length+1)||o.get(e)-o.get(r));for(let t=0;t<r.length;t++)if(r[t]!==a[t]){let r=document.createDocumentFragment();o=!0;
178try{a.forEach(e=>r.appendChild(e)),e.insertBefore(r,e.firstChild)}finally{o=!1}return!0}return!1},l=new MutationObserver(e=>{if(r||o)return;for(let t of e)for(let e of t.addedNodes)if(e.nodeType==1&&e.tagName=='LINK'&&e.rel=='stylesheet'&&e.hasAttribute('${c.ELEMENT_THEME_ATTR.SELECTOR}')&&e.hasAttribute('${c.ELEMENT_THEME_ATTR.LAYER}'))return void a()});l.observe(e,{childList:!0}),a(),addEventListener('load',()=>{r=!0,l.disconnect()})})();`;t.createWsConfig=function(e){if(o.constants.isBrowserPlatform)return;const t=n.Head.getInstance(),c=function(e){let t;if(t=e.staticDomains||o.constants.staticDomains||"[]","string"!=typeof t)t="[]";if("string"==typeof e.staticDomains)t=e.staticDomains;if(e.staticDomains instanceof Array)t=JSON.stringify(e.staticDomains);return t}(e),g=e.servicesPath||o.constants.defaultServiceUrl||"/service/",l=e.product||o.constants.product,d=e.buildnumber||o.constants.buildnumber,u=e.preInitScript?e.preInitScript:"",p=(0,r.getConfig)("appAlias"),E=(0,r.getConfig)("xSabyAppId"),m=(0,r.getConfig)("xSabyCfgId"),T=(0,r.getConfig)("xSabyAppVersion"),R=(0,r.getConfig)("callTimeout"),b=e.isDebugReact||!1,M=f+"\n";t.createMergeTag("script",{},s(M));let y="";if(e.isStatelessPage){y=" || getQP()";const e=["function getQP() {",' var sD = ["wsRoot", "resourceRoot", "metaRoot", "defaultServiceUrl", "appRoot", "staticDomains", "shardDomain", "product", "cdnRoot"];'," var r = {};"," var f = [];",' var items = location.search.substring(1).split("&");'," for (var index = 0; index < items.length; index++) {",' f = items[index].split("=");'," if (sD.indexOf(f[0]) !== -1) {"," var decoded = decodeURIComponent(f[1]);",' r[f[0]] = f[0] === "staticDomains" ? JSON.parse(decoded) : decoded;'," }"," }"," return r;","}"].join("\n");t.createMergeTag("script",{},s(e))}t.createMergeTag("script",{},[`var cfg = window.wsConfig = window.wsConfig${y} || {};`,`cfg.wsRoot = cfg.wsRoot || '${e.wsRoot||o.constants.wsRoot}';`,`cfg.resourceRoot = cfg.resourceRoot || '${e.resourceRoot||o.constants.resourceRoot}';`,`cfg.metaRoot = cfg.metaRoot || '${e.metaRoot||o.constants.metaRoot}';`,`cfg.cdnRoot = cfg.cdnRoot || '${e.cdnRoot||o.constants.cdnRoot}';`,`cfg.defaultServiceUrl = cfg.defaultServiceUrl || '${g}';`,`cfg.appRoot = cfg.appRoot || '${e.appRoot||o.constants.appRoot}';`,`cfg.RUMJsHeapMonitoringEnabled = ${e.RUMJsHeapMonitoringEnabled||!1};`,`cfg.RUMJsHeapMonitoringPollingInterval = ${e.RUMJsHeapMonitoringPollingInterval||600};`,`cfg.RUMJsHeapMonitoringThreshold = ${e.RUMJsHeapMonitoringThreshold||1073741824};`,`cfg.RUMEnabled = ${e.RUMEnabled||!1};`,`cfg.pageName = '${e.pageName||""}';`,`cfg.isDebugReact = ${b};`,e.theme?`cfg.theme = '${e.theme}';`:"",`cfg.useNavigationOnPS = ${!!e.useNavigationOnPS};`,"cfg.userConfigSupport = true;","cfg.trackErrors = true;",`cfg.staticDomains = cfg.staticDomains || ${c};`,`cfg.shardDomain = '${e.shardDomain||""}';`,"cfg.compatible = false;",`cfg.product = cfg.product || '${l}';`,`cfg.xDomainSystemname = '${(0,r.getConfig)("xDomainSystemname")||""}';`,`cfg.logLevel = ${i(e.logLevel)};`,p?`cfg.appAlias = '${p}';`:"",E?`cfg.xSabyAppId = '${E}';`:"",m?`cfg.xSabyCfgId = '${m}';`:"",T?`cfg.xSabyAppVersion = '${T}';`:"",R?`cfg.callTimeout = ${R};`:"",e.pagexPackages?`cfg.pagexPackages = ${e.pagexPackages};`:"",`cfg.UseNewSystemOfTypeCustomization = ${e.UseNewSystemOfTypeCustomization};`,d?`window.buildnumber = '${d}';`:"window.buildnumber = cfg.buildnumber || undefined;",`window['X-UNIQ-ID'] = '${(0,a.jsEscape)((0,r.getConfig)("X-UNIQ-ID")||"")}';`,`window['X-REQUESTUUID'] = '${(0,a.jsEscape)((0,r.getConfig)("X-REQUESTUUID")||"")}';`,`window['X-CURRENTMETHOD'] = '${(0,r.getConfig)("X-CURRENTMETHOD")||""}';`,"window.history.scrollRestoration = 'manual';",u?u:""].filter((e=>!!e)).join(""))};const g=/(\r\n|\n|\r|)/gm,l=/\s+/g;return t.prepareScript=s,t}(0,{},r,o,n,t,e),g=f,c.applyHeadJson=c.createMetaScriptsAndLinks=c.createDefaultTags=c.createViewPort=c.createTitle=c.createWsConfig=void 0,Object.defineProperty(c,"createWsConfig",{enumerable:!0,get:function(){return g.createWsConfig}}),Object.defineProperty(c,"createTitle",{enumerable:!0,get:function(){return s.createTitle}}),Object.defineProperty(c,"createViewPort",{enumerable:!0,get:function(){return s.createViewPort}}),Object.defineProperty(c,"createDefaultTags",{enumerable:!0,get:function(){return s.createDefaultTags}}),Object.defineProperty(c,"createMetaScriptsAndLinks",{enumerable:!0,get:function(){return s.createMetaScriptsAndLinks}}),Object.defineProperty(c,"applyHeadJson",{enumerable:!0,get:function(){return s.applyHeadJson}}),c})); 179define("SbisEnvUI/Maintains",["optional!EngineUser/Info","i18n!SbisEnvUI","UI/Utils","Types/source","Types/entity","TransportCore/trans
179port","RequireJsLoader/conduct","ErrorHandling/interface","Env/Env","Browser/Transport","require","exports"],(function(e,t,r,n,o,a,i,s,u,c,l,d){var E,f,g,p,m,S,_,A,O,T,I,M,C,N,P,R,b,D,v,y,U,j,k,F,G,L,w,H,h,V,B,q,z;return Object.defineProperty(d,"__esModule",{value:!0}),E=function(e,t,r,n,o){"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.APPLIED_ERROR_CODE=t.Size=t.THEME_IMAGE=t.IMAGE=t.DETAILS=t.ACTION=t.MESSAGE=t.HEADER=t.ButtonSize=t.LOAD_DELAY=void 0,t.LOAD_DELAY=15e3,t.ButtonSize={[r.ErrorViewSize.large]:"l",[r.ErrorViewSize.medium]:"xs",[r.ErrorViewSize.normal]:"xs",[r.ErrorViewSize.small]:"xs",[r.ErrorViewSize.dialog]:"l"},t.HEADER={get ORGANIZATION(){return o("СеÑÑ Ð´ÐµÐ»Ð¾Ð²ÑÑ
коммÑникаÑий")},get SUPPORT(){return o("ÐоддеÑжка")}},t.MESSAGE={get REMOVED_TASK(){return o("Сожалеем, но ÑÑа задаÑа бÑла Ñдалена")},get REMOVED_DIALOG(){return o("Сожалеем, но ÑÑÐ¾Ñ Ð´Ð¸Ð°Ð»Ð¾Ð³ бÑл Ñдален")},get REMOVED_DOCUMENT(){return o("Сожалеем, но ÑÑÐ¾Ñ Ð´Ð¾ÐºÑÐ¼ÐµÐ½Ñ Ð±Ñл Ñдален")},get NOT_FOUND(){return o("Ðозможно, докÑÐ¼ÐµÐ½Ñ Ð±Ñл Ñдален или Ð²Ñ Ð¿ÐµÑеÑли по непÑавилÑной ÑÑÑлке")},get ACCESS_DENIED(){return o("ÐедоÑÑаÑоÑно пÑав")},get ACCESS_DENIED_TASK(){return o("У Ð²Ð°Ñ Ð½ÐµÑ Ð´Ð¾ÑÑÑпа")},get ACCESS_DENIED_DOCUMENT(){return o("У Ð²Ð°Ñ Ð½ÐµÑ Ð¿Ñав на доÑÑÑп к докÑменÑÑ")},get ACCESS_DENIED_MESSAGE(){return o("Ð ÑожалениÑ, диалог вам недоÑÑÑпен")},get ACCESS_DENIED_OBJECT(){return o("ÐÐµÑ Ð¿Ñав на пÑоÑмоÑÑ Ð¾Ð±ÑекÑа")},get ACCESS_DENIED_PAGE(){return o("СÑÑаниÑа недоÑÑÑпна")},get SERVICE_FOR_MAINTENANCE(){return o("ÐзвиниÑе, Ð¼Ñ Ð½Ð° ÑеÑ
ниÑеÑком обÑлÑживании")},get ACCOUNT_MANAGEMENT(){return o("ÐÐ´ÐµÑ Ð¼Ð¾Ð´ÐµÑнизаÑÐ¸Ñ ÐºÐ°Ð±Ð¸Ð½ÐµÑа")},get CONNECTION_ERROR(){return o("ÐÑоизоÑел ÑазÑÑв ÑоединениÑ")},get UPDATE(){return o("Saby обновлÑеÑÑÑ Ð´Ð¾ веÑÑии")},get INTERNAL(){return o("ЧÑо-Ñо поÑло не Ñак")},get EXCLUSIVE(){return o("ÐÐ´ÐµÑ Ð¼Ð¾Ð´ÐµÑнизаÑÐ¸Ñ ÐºÐ°Ð±Ð¸Ð½ÐµÑа")},get NOSCRIPT(){return o("РнаÑÑÑойкаÑ
ваÑего бÑаÑзеÑа заблокиÑовано иÑполÑзование JavaScript")},get NETWORK(){return o("ÐоÑÑÑп к ÑÐ°Ð·Ð´ÐµÐ»Ñ ÑазÑеÑен ÑолÑко из внÑÑÑенниÑ
ÑеÑей компании")}},t.ACTION={get RELOAD(){return o("ÐбновиÑÑ ÑÑÑаниÑÑ")},get MAIN_PAGE(){return o("ÐеÑейÑи на главнÑÑ")},get ASK_ACCESS_AUTHOR(){return o("ÐÑпÑавиÑÑ Ð·Ð°Ð¿ÑÐ¾Ñ ÐµÐ³Ð¾ авÑоÑÑ")},get REQUESTED(){return o("ÐапÑÐ¾Ñ Ð¾ÑпÑавлен, ожидайÑе")},get ASK_ACCESS_GROUP(){return o("ÐÑпÑавÑÑе запÑÐ¾Ñ ÐµÐ³Ð¾ ÑÑаÑÑникам")},get ASK_SUPPORT(){return o("ÐбÑаÑиÑÑÑÑ Ð² ÑеÑ
. поддеÑжкÑ")},get ASK_ADMIN(){return o("ÐбÑаÑиÑеÑÑ Ðº админиÑÑÑаÑоÑÑ")},get ACCESS_DENIED(){return""},get HELP_PAGE(){return o("ÐеÑейÑи на ÑÑÑаниÑÑ Ð¿Ð¾Ð¼Ð¾Ñи")},get TRY_AGAIN(){return o("ÐопÑобоваÑÑ ÐµÑе Ñаз")}},t.DETAILS={get ASK_ADMIN(){return o("ÐбÑаÑиÑеÑÑ Ðº админиÑÑÑаÑоÑÑ")},get ACCOUNT_MANAGEMENT(){return o("СкоÑо вам бÑдÑÑ Ð´Ð¾ÑÑÑÐ¿Ð½Ñ Ð´Ð¾Ð¿Ð¾Ð»Ð½Ð¸ÑелÑнÑе возможноÑÑи Saby")},get CONNECTION_ERROR(){return o("ÐÑовеÑÑÑе подклÑÑение к инÑеÑнеÑÑ")},get RESOURCE_CONNECTION_ERROR(){return o("ÐÑовеÑÑÑе подклÑÑение к инÑеÑнеÑÑ Ð¸ обновиÑе ÑÑÑаниÑÑ")},get INTERNAL(){return""},get NOT_FOUND(){return""},get SERVICE_FOR_MAINTENANCE(){return""},get ACCESS_DENIED(){return""},get EXCLUSIVE(){return o("СкоÑо вам бÑдÑÑ Ð´Ð¾ÑÑÑÐ¿Ð½Ñ Ð´Ð¾Ð¿Ð¾Ð»Ð½Ð¸ÑелÑнÑе возможноÑÑи Saby")},get FEATURE_DISABLED(){return o("ÐÑклÑÑен пеÑеклÑÑаÑÐµÐ»Ñ ÑÑнкÑионала")},get COMPONENT_DISABLED(){return o("ÐеобÑ
одимо вклÑÑиÑÑ ÐºÐ¾Ð¼Ð¿Ð¾Ð½ÐµÐ½Ñ")},get COMPONENTS_DISABLED(){return o("ÐеобÑ
одимо вклÑÑиÑÑ ÐºÐ¾Ð¼Ð¿Ð¾Ð½ÐµÐ½ÑÑ")}},t.IMAGE={get SERVICE_FOR_MAINTENANCE(){return(0,n.getResourceUrl)("/cdn/Maintenance/1.1.3/img/SERVICE_FOR_MAINTENANCE_default.svg")},DIAGNOSTICS:(0,n.getResourceUrl)("/cdn/Maintenance/1.1.0/img/DIAGNOSTICS.png"),get NOT_FOUND(){return(0,n.getResourceUrl)("/cdn/Maintenance/1.1.2/img/NOT_FOUND_default.svg")},get ACCESS_DENIED(){return(0,n.getResourceUrl)("/cdn/Maintenance/1.1.5/img/NO_ACCESS_default.svg")},get EXCLUSIVE(){return(0,n.getResourceUrl)("/cdn/Maintenance/1.1.0/img/EXCLUSIVE_default.svg")},get UPDATE(){return(0,n.getResourceUrl)("/cdn/Maintenance/1.1.2/img/UPDATE_default.svg")},get INTERNAL(){return(0,n.getResourceUrl)("/cdn/Maintenance/1.1.1/img/CUP_default.svg")},get NETWORK(){return(0,n.getResourceUrl)("/cdn/Maintenance/1.1.2/img/NOT_FOUND_default.svg")},get CONNECTION_ERROR(){return(0,n.getResourceUrl)("/cdn/Maintenance/1.1.3/img/CONNECTION_ERROR_default.svg")}},function(e){e.default="default",e.dark="blue"}(a||(a={}));const i={};
179return t.THEME_IMAGE=i,Object.keys(t.IMAGE).forEach((e=>{Object.defineProperty(i,e,{enumerable:!0,get:()=>({default:t.IMAGE[e],dark:t.IMAGE[e].includes(a.default)?t.IMAGE[e].replace(a.default,a.dark):t.IMAGE[e]})})})),t.Size=r.ErrorViewSize,t.APPLIED_ERROR_CODE=45334,t}(0,{},s,i,t),f=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=({error:e})=>{if(e instanceof ReferenceError||e instanceof TypeError||e instanceof SyntaxError||e instanceof RangeError||e instanceof URIError||"function"==typeof InternalError&&e instanceof InternalError)throw r.Logger.error(e.message,null,e),new n.PromiseCanceledError(e.message)},t}(0,{},r,o),g=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.getMessageDetails=void 0,t.getMessageDetails=function(e,t){return{message:e.message||t.message,details:(e instanceof r.RPC.Error?e.user_hint:void 0)||t.details}},t}(0,{},c),p=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.Maintenance=t.ComponentsConfig=t.NetworkRestriction=t.Support=t.Reload=t.MainPage=t.HelpPage=t.RepeatAction=t.LinkAction=t.AskAdmin=void 0,t.AskAdmin="SbisEnvUI/ParkingTemplates:actions.AskAdmin",t.LinkAction="SbisEnvUI/ParkingTemplates:actions.LinkAction",t.RepeatAction="SbisEnvUI/ParkingTemplates:actions.RepeatAction",t.HelpPage="SbisEnvUI/ParkingTemplates:actions.HelpPage",t.MainPage="SbisEnvUI/ParkingTemplates:actions.MainPage",t.Reload="SbisEnvUI/ParkingTemplates:actions.Reload",t.Support="SbisEnvUI/ParkingTemplates:actions.Support",t.NetworkRestriction="SbisEnvUI/ParkingTemplates:actions.NetworkRestriction",t.ComponentsConfig="SbisEnvUI/ParkingTemplates:actions.ComponentsConfig",t.Maintenance="SbisEnvUI/ParkingTemplates:actions.Maintenance",t}(0,{}),m=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(r.constants.isServerSide&&e&&e.status>0&&"undefined"!=typeof process&&process.domain&&process.domain.res)return process.domain.res.sendStatus(e.status),!0;else return!1},t}(0,{},u),S=function(e,t,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.getBaseTemplateForMode=t.templates=void 0,t.templates={dialog:"SbisEnvUI/ParkingTemplates:Dialog",page:"SbisEnvUI/ParkingTemplates:Page",include:"SbisEnvUI/ParkingTemplates:Include",inlist:"SbisEnvUI/ParkingTemplates:InList"},t.getBaseTemplateForMode=function(e){return t.templates[e]||t.templates[r.ErrorViewMode.dialog]},t}(0,{},s),_=function(e,t,r,n,o,a,i,s,u){"use strict";function c(e){var t;return e&&(null===(t=null==e?void 0:e.addinfo)||void 0===t?void 0:t.get("RequestStatus"))}function l(t,n,i){if(!t.addinfo)return;const c=f(t.addinfo),l=t.addinfo instanceof s.Record?t.addinfo:t.addinfo=new s.Record({rawData:c,adapter:new s.adapter.Sbis}),d=l.get("Handler"),[E,g]=d.split("."),p=l.get("HandlerParams");if(p.set({Comment:n,UserId:(null===u.Info||void 0===u.Info?void 0:u.Info.isInit())?u.Info.get("UserId"):""}
179),i&&!p.has("RequestParams"))i.href=i.href||t.url,p.addField({name:"RequestParams",type:"object"}),p.set("RequestParams",i);let m=!1,S="",_="";new o.SbisService({endpoint:E}).call(g,{Params:p}).then((()=>{m=!0,S=a("ÐапÑÐ¾Ñ Ð¾ÑпÑавлен админиÑÑÑаÑоÑÑ ÑиÑÑемÑ."),_=a("Ðогда он бÑÐ´ÐµÑ Ð¾Ð±ÑабоÑан, Ð²Ñ Ð¿Ð¾Ð»ÑÑиÑе Ñведомление")})).catch((e=>{m=!1,S=e.message||r.MESSAGE.SERVICE_FOR_MAINTENANCE})).finally((()=>new Promise(((t,r)=>{e(["Controls/popup"],t,r)})).then((({Confirmation:e})=>{e.openPopup({type:"ok",markerStyle:m?"default":"danger",message:S,details:_.length?_:null})}))))}function d(e){const t=e.addinfo instanceof s.Record?e.addinfo:e.addinfo=new s.Record({rawData:f(e.addinfo),adapter:new s.adapter.Sbis});if(!t.has("Handler"))return null;if(t.has("HandlerParams")&&t.get("HandlerParams").has("RightsParams")&&t.get("HandlerParams").get("RightsParams"))return t;else return e.url?t:null}Object.defineProperty(t,"__esModule",{value:!0}),t.getAccessDenied=t.prepareError=t.loadDataForRequest=t.requestCallback=void 0;const E={message:r.MESSAGE.ACCESS_DENIED,image:r.THEME_IMAGE.ACCESS_DENIED,action:i.AskAdmin};t.default=E;const f=function(e){if("string"==typeof e){if(!e)return e;try{return JSON.parse(e)}catch(e){throw new Error("addInfo must be valid JSON-string")}}else return e};return t.requestCallback=l,t.loadDataForRequest=async function(){const t=[new Promise(((t,r)=>{e(["Controls/buttons"],t,r)})),new Promise(((t,r)=>{e(["Controls/input"],t,r)}))],r=await Promise.all(t),[n,o]=r;return{Button:n.Button,Area:o.Area}},t.prepareError=d,t.getAccessDenied=function(e,t){if(t)t.addinfo=d(t);const r=null==t?void 0:t.addinfo,o=e===n.ErrorViewMode.dialog;return{...E,details:c(t)?a("ÐапÑÐ¾Ñ Ð¾ÑпÑавлен админиÑÑÑаÑоÑÑ, дождиÑеÑÑ ÐµÐ³Ð¾ обÑабоÑки"):o?a("ÐапÑоÑиÑе доÑÑÑп"):void 0,mode:e,buttons:o&&c(t)?[{caption:a("OK"),value:void 0}]:o&&r?[{caption:a("ÐÑпÑавиÑÑ Ð·Ð°Ð¿ÑоÑ"),buttonStyle:"primary",value:!0,readOnly:!0},{caption:a("ÐÑмена"),value:void 0}]:void 0,dialogSize:r?"e":void 0,requestCallback:r?l:void 0,error:t}},t}(l,{},E,s,n,t,p,o,e),A=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={message:r.MESSAGE.INTERNAL};return t.default=n,t}(0,{},E),O=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o={message:r.MESSAGE.ACCESS_DENIED_PAGE,details:r.DETAILS.COMPONENT_DISABLED,image:r.THEME_IMAGE.ACCESS_DENIED,action:n.ComponentsConfig};return t.default=o,t}(0,{},E,p),T=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={message:r.MESSAGE.CONNECTION_ERROR,image:r.THEME_IMAGE.CONNECTION_ERROR,details:r.DETAILS.CONNECTION_ERROR};return t.default=n,t}(0,{},E),I=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={message:r.MESSAGE.EXCLUSIVE,image:r.THEME_IMAGE.EXCLUSIVE,details:r.DETAILS.EXCLUSIVE};return t.default=n,t}(0,{},E),M=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={message:r.MESSAGE.ACCESS_DENIED_PAGE,details:r.DETAILS.FEATURE_DISABLED,image:r.THEME_IMAGE.ACCESS_DENIED};return t.default=n,t}(0,{},E),C=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o={message:r.MESSAGE.INTERNAL,image:r.THEME_IMAGE.INTERNAL,details:r.DETAILS.INTERNAL,action:n.Maintenance};return t.default=o,t}(0,{},E,p),N=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMaintenance=void 0;const o={message:r.MESSAGE.SERVICE_FOR_MAINTENANCE,image:r.THEME_IMAGE.SERVICE_FOR_MAINTENANCE,action:n.Reload,details:r.DETAILS.SERVICE_FOR_MAINTENANCE};return t.default=o,t.getMaintenance=function(){return{message:r.MESSAGE.SERVICE_FOR_MAINTENANCE,image:r.THEME_IMAGE.SERVICE_FOR_MAINTENANCE,action:n.Reload,details:r.DETAILS.SERVICE_FOR_MAINTENANCE}},t}(0,{},E,p),P=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o={message:r.MESSAGE.NETWORK,image:r.THEME_IMAGE.NETWORK,action:n.NetworkRestriction};return t.default=o,t}(0,{},E,p),R=function(e,t,r,n){"use strict";
179Object.defineProperty(t,"__esModule",{value:!0});const o={message:r.MESSAGE.NOSCRIPT,image:r.THEME_IMAGE.NOT_FOUND,action:n.HelpPage};return t.default=o,t}(0,{},E,p),b=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o={message:r.MESSAGE.NOT_FOUND,image:r.THEME_IMAGE.NOT_FOUND,details:r.DETAILS.NOT_FOUND,action:n.MainPage};return t.default=o,t}(0,{},E,p),D=function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o={message:r.MESSAGE.ACCESS_DENIED_OBJECT,image:r.THEME_IMAGE.ACCESS_DENIED,action:n.AskAdmin};return t.default=o,t}(0,{},E,p),v=function(e,t,r,n,o,a,i,s,u,c,l,d,E,f){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.accessDeniedRequestCallback=t.loadDataForRequest=t.getAccessDenied=t.accessDenied=t.scope=t.feature=t.component=t.network=t.connection=t.internal=t.getMaintenance=t.maintenance=t.applied=t.exclusive=t.notFound=t.noscript=void 0,Object.defineProperty(t,"noscript",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"notFound",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"exclusive",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"applied",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"maintenance",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"getMaintenance",{enumerable:!0,get:function(){return i.getMaintenance}}),Object.defineProperty(t,"internal",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"connection",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"network",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"component",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"feature",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"scope",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(t,"accessDenied",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"getAccessDenied",{enumerable:!0,get:function(){return f.getAccessDenied}}),Object.defineProperty(t,"loadDataForRequest",{enumerable:!0,get:function(){return f.loadDataForRequest}}),Object.defineProperty(t,"accessDeniedRequestCallback",{enumerable:!0,get:function(){return f.requestCallback}}),t}(0,{},R,b,I,A,N,C,T,P,O,M,D,_),y=function(e,t,r,n,o,a,i,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=({error:e,mode:t})=>{const u=r.RPC.Error.checkErrorStatus(e,[n.HTTPStatus.Forbidden]);if(u){const r=(0,a.getAccessDenied)(t,e);return{type:s.ErrorType.accessDenied,status:u,template:(0,o.getBaseTemplateForMode)(t),options:{...r,...(0,i.getMessageDetails)(e,r),error:e}}}},t}(0,{},c,a,S,v,g,s),U=function(e,t,r,n,o,a,i,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const u=(t,r,n)=>new Promise(((t,r)=>{e(["optional!CustomizableError/handlers"],t,r)})).then((e=>{if(!e)return!1;else return e.getData(t,r,n).then((e=>({template:"CustomizableError/handlers:Template",...e})))})).catch((function(e){requirejs.onError(e)}));return t.default=({error:e})=>{const t=r.RPC.Error.checkErrorStatus(e,[a.APPLIED_ERROR_CODE]),c=(0,i.getMessageDetails)(e,o.applied);if(t)return{type:n.ErrorType.applaied,status:t,mode:n.ErrorViewMode.dialog,asyncData:u.bind(this,e,c.message,c.details),template:(0,s.getBaseTemplateForMode)(n.ErrorViewMode.dialog),options:{...o.applied,error:e,closeButtonVisible:!0,...c}}},t}(l,{},c,s,v,E,g,S),j=function(e,t,r,n,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=({error:e,mode:t})=>{if(e instanceof r.ConnectionError||0===e.status)return{type:a.ErrorType.connection,template:(0,n.getBaseTemplateForMode)(t),options:{...o.connection,error:e}}},t}(0,{},a,S,v,s),k=function(e,t,r,n,o,a,i,s,u){"use strict";function c(e){return{type:s.ErrorType.internal,status:n.HTTPStatus.InternalServerError,template:(0,o.getBaseTemplateForMode)(e),options:a.internal}}Object.defineProperty(t,"__esModule",{value:!0}),t.getInternalViewConfig=void 0;t.getInternalViewConfig=c;return t.default=({error:e,mode:t})=>{const o=(e=>e instanceof r.RPC.Error&&String(e.message).toLowerCase().includes(u("ÐнÑÑÑеннÑÑ Ð¾Ñибка ÑеÑвеÑа").toLowerCase()))(e);
179if((e=>r.RPC.Error.checkErrorStatus(e,[n.HTTPStatus.InternalServerError])>0)(e)||o){const r=c(t);if(!o)r.options={...r.options,...(0,i.getMessageDetails)(e,a.internal),error:e};return r}},t}(0,{},c,a,S,v,g,s,t),F=function(e,t,r,n,o,a,i){"use strict";var s;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.ServiceInChainUnavailable="{ba9eed08-16fb-43ab-8f8b-6e5b39900009}"}(s||(s={}));return t.default=({error:e,mode:t})=>{let u=r.RPC.Error.checkErrorStatus(e,[n.HTTPStatus.ServiceUnavailable,n.HTTPStatus.BadGateway,n.HTTPStatus.GatewayTimeout]);if(!u&&e instanceof r.RPC.Error&&e.classid===s.ServiceInChainUnavailable)u=n.HTTPStatus.ServiceUnavailable;if(u)return{type:i.ErrorType.maintenance,status:u,template:(0,o.getBaseTemplateForMode)(t),options:{...(0,a.getMaintenance)(),error:e}}},t}(0,{},c,a,S,v,s),G=function(e,t,r,n,o,a){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.AccessOnlyFromInnerNetwork="{711dd44c-8b3b-11ec-a8a3-0242ac120002}"}(i||(i={}));return t.default=({error:e,mode:t})=>{if(e instanceof r.RPC.Error&&"string"==typeof e.classid&&e.classid===i.AccessOnlyFromInnerNetwork)return{type:a.ErrorType.network,template:(0,n.getBaseTemplateForMode)(t),options:{...o.network,error:e}}},t}(0,{},c,S,v,s),L=function(e,t,r,n,o,a,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=({error:e,mode:t})=>
179{const s=r.RPC.Error.checkErrorStatus(e,[i.HTTPStatus.NotFound]);if(s)return{type:a.ErrorType.notFound,status:s,template:(0,n.getBaseTemplateForMode)(t),options:{...o.notFound,action:t===a.ErrorViewMode.dialog?void 0:o.notFound.action,error:e}}},t}(0,{},c,S,v,s,a),w=function(e,t,r,n,o,a,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=({error:e,mode:t})=>{const s=r.RPC.Error.checkErrorStatus(e,[n.HTTPStatus.NotFound]);if(s)return{type:o.ErrorType.internal,status:s,template:(0,a.getBaseTemplateForMode)(t),options:{...i.internal,error:e}}},t}(0,{},c,a,s,S,v),H=function(e,t,r,n,o,a,i,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=({error:e,mode:t})=>{const u=(0,i.getMessageDetails)(e,s.internal);if(e instanceof r.RPC.Error)return{type:o.ErrorType.rpc,template:(0,n.getBaseTemplateForMode)(t),options:{image:a.THEME_IMAGE.INTERNAL,...u,error:e}}},t}(0,{},c,S,s,E,g,v),h=function(e,t,r,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=e=>{const t=(0,n.default)(e);if(t){if(t.options)t.options.details=o.DETAILS.RESOURCE_CONNECTION_ERROR;t.type=r.ErrorType.connection}return t},t}(0,{},s,j,E),V=function(e,t,r,n,o,a,i,s,u,c,l){"use strict";function d(t=[n.default,o.default,a.default,i.default,s.default]){return({error:n,mode:o})=>{const i=n,s=i.originalError&&i.originalError.target&&i.originalError.target.src;if("timeout"===i.requireType)return{options:u.internal,template:(0,c.getBaseTemplateForMode)(o),processed:!1};if("scripterror"!==i.requireType||!s){try{!function(t){if(void 0!==e&&"function"==typeof e.onError)e.onError(t)}(i)}catch(e){}return}const d=r.IoC.resolve("ITransport",{url:s}).execute().then((()=>({options:u.internal,template:(0,c.getBaseTemplateForMode)(o),processed:!1})),(e=>{let r;for(const n of t)if(r=n({error:e,mode:o}),r)return r.processed=!1,r.type=l.ErrorType.require,r}));return{...(0,a.getInternalViewConfig)(o),promise:d}}}Object.defineProperty(t,"__esModule",{value:!0}),t.factory=void 0,t.factory=d;const E=d();return t.default=E,t}(l,{},u,y,h,k,F,w,v,S,s),B=function(e,t,r,n,o,a,i,s,u,c,l,d){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.network=t.javaScript=t.require=t.rpc=t.accessDenied=t.connection=t.internal=t.maintenance=t.applied=t.notFound=void 0,Object.defineProperty(t,"notFound",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"applied",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"maintenance",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"internal",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"connection",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"accessDenied",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"rpc",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"require",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"javaScript",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"network",{enumerable:!0,get:function(){return d.default}}),t}(0,{},L,U,F,k,j,y,H,V,f,G),q=function(e,t,r,n,o,a,i,s,u,c){"use strict";if(Object.defineProperty(t,"__esModule",{value:!0}),t.options=t.handlers=t.action=t.routing=t.templates=t.Const=void 0,t.routing=n.default,a.constants.isBrowserPlatform){const t="SbisEnvUI/ParkingTemplates",r=a.cookie.get("performance_testing")?0:o.LOAD_DELAY;setTimeout((()=>{var r;const n=null===document||void 0===document?void 0:document.createElement("img");n.src=o.THEME_IMAGE.CONNECTION_ERROR.default,n.style.display="none",n.onload=()=>n.remove(),n.onerror=()=>n.remove(),null===(r=null===document||void 0===document?void 0:document.body)||void 0===r||r.appendChild(n),new Promise(((r,n)=>{e([t],r,n)}))}),r)}const l={Dialog:r.templates.dialog,Include:r.templates.include,Inlist:r.templates.inlist,Page:r.templates.page,getBaseTemplateForMode:r.getBaseTemplateForMode};return t.templates=l,t.Const=i,t.handlers=s,t.options=u,t.action=c,t}(l,{},S,m,E,u,E,B,v,p),z=q,d.Parking=void 0,d.Parking=z,d})); 180define("EngineUser/Info",["UI/Utils","UI/Base","Types/source","Types/promise","Types/object","Types/entity","Types/chain","Env/UserInfo","Env/Env","Env/Constants","Controls-DataEnv/slice","Compiler/IR","Application/Env","require","exports"],(function(e,t,o,r,s,n,i,a,l,d,u,c,f,v,p){var g,m,I,S,b,y,U;return Object.defineProperty(p,"__esModule",{value:!0}),g=function(e,t,o,r,s,n,i,a,l,d,u,c){"use strict";
180Object.defineProperty(t,"__esModule",{value:!0}),t.FIELD_ALIASES=void 0;const f="UserInfo",v="value",p=d.constants.isServerSide?5e3:1e4;t.FIELD_ALIASES={UserId:"ÐденÑиÑикаÑоÑÐолÑзоваÑелÑ",User:"ÐолÑзоваÑелÑ",CompanyStructureId:"СÑÑÑкÑÑÑаÐÑедпÑиÑÑиÑ",PrivatePersonId:"ЧаÑÑноеÐиÑо",RelationsId:"СвÑзиÐолÑзоваÑелÑ",PhotoId:"ФоÑо",Surname:"ФамилиÑ",Name:"ÐмÑ",Patronymic:"ÐÑÑеÑÑво",SubdivisionName:"ÐодÑазделение",UserName:"ÐмÑÐолÑзоваÑелÑ",DisplayName:"ÐÑводимоеÐмÑ",UserLogin:"ÐогинÐолÑзоваÑелÑ",UserEMail:"ÐÑлоÐолÑзоваÑелÑ",ProfileServiceId:"ÐденÑиÑикаÑоÑСеÑвиÑаÐÑоÑилей",IsService:"isService",ClientId:"ÐденÑиÑикаÑоÑÐлиенÑа",ClientName:"ÐмÑÐлиенÑа",ClientLogin:"ÐогинÐлиенÑа",UserClass:"ÐлаÑÑÐолÑзоваÑелÑ",CompanyLogo:"company_logo",IsClient:"isClient",Guest:"guest",IsDemo:"isDemo",IsPersonalAccount:"isPersonalAccount",UserInitials:"UserInitials",RealEnter:"real_enter",NotMyComputer:"not_my_computer",Access:"access",PersonalizedGuest:"personalizedGuest",FioViewMode:"fio_view_mode",IsBilling:"isBilling",AccountLanguage:"accountLanguage"};return t.default=new class{getState(){return(0,r.getStore)(f).get(v)}setState(e){(0,r.getStore)(f).set(v,(0,c.clone)(e))}clear(){(0,r.getStore)(f).remove(v)}init(){if(!this.getState()){(0,r.getStateReceiver)().register(f,this)}}loadData(e){if(e)return this.setState(e),Promise.resolve(e);else{const e=new s.SbisService({endpoint:{contract:"User"}}).call("GetCurrentUserInfo",{}).then((e=>{const t=(0,i.factory)(e.getRow()).toObject();return this.setState(t),t}));return(0,l.wrapTimeout)(e,p).catch((e=>(a.Logger.error(`ÐолÑзоваÑелÑ.GetCurrentUserInfo - couldn't get user info. \n Error: ${e}`),e.message=`ÐÑибка пÑи вÑполнении меÑода: ÐолÑзоваÑелÑ.GetCurrentUserInfo. ${e.message}`,Promise.reject(e))))}}get(e){const s=t.FIELD_ALIASES[e]||e;let n=o.get(s);if(void 0===n&&(0,a.isNewEnvironment)()){const e=this.getState();if(!e)a.Logger.error(`ÐнÑоÑмаÑÐ¸Ñ Ð¾ полÑзоваÑеле не доÑÑÑпна. \n ÐÐ»Ñ ÑеÑÐµÐ½Ð¸Ñ Ð¿ÑÐ¾Ð±Ð»ÐµÐ¼Ñ Ð¾Ð±ÑаÑиÑеÑÑ Ðº ÑÑаÑÑе: https://link.sbis.ru/article/wasaby/ea2bb42e-7120-4811-883c-e6f5546e6d65#toc_55f7d860-1487-4698-8061-2dd257867fec. \n ÐÑибка на ÑÑÑаниÑе: ${r.location.href}.`);n=e&&e[s]}return n}isInit(){return r.App.isInit()&&this.getState()||o.isInit()}getAccountModel(e){if(e){return new n.Model({format:[{name:"Id",type:"string",defaultValue:String(e)}],typeName:"Account",adapter:"adapter.sbis"})}return new n.Model({})}getUserModel(e){if(e){return new n.Model({format:[{name:"Id",type:"string",defaultValue:String(e)}],typeName:"Employee",adapter:"adapter.sbis"})}return new n.Model({})}getSessionValue(){var e,t,o,r,s,n,i,l,c,f,v,p,g,m,I,S,b;let y=[];const U=u.cookie.get("s3su");if(U)y=U.split("-").map((e=>parseInt(e,16)));else if(d.constants.isServerSide&&"undefined"!=typeof process)if((null===(o=null===(t=null===(e=null===process||void 0===process?void 0:process.domain)||void 0===e?void 0:e.req)||void 0===t?void 0:t.headers)||void 0===o?void 0:o["x-cid"])&&(null===(n=null===(s=null===(r=null===process||void 0===process?void 0:process.domain)||void 0===r?void 0:r.req)||void 0===s?void 0:s.headers)||void 0===n?void 0:n["x-uid"]))y=[parseInt(null===(c=null===(l=null===(i=null===process||void 0===process?void 0:process.domain)||void 0===i?void 0:i.req)||void 0===l?void 0:l.headers)||void 0===c?void 0:c["x-cid"],16),parseInt(null===(p=null===(v=null===(f=null===process||void 0===process?void 0:process.domain)||void 0===f?void 0:f.req)||void 0===v?void 0:v.headers)||void 0===p?void 0:p["x-uid"],16)];else if(null===(I=null===(m=null===(g=null===process||void 0===process?void 0:process.domain)||void 0===g?void 0:g.req)||void 0===m?void 0:m.headers)||void 0===I?void 0:I["x-sbissessionid"]){a.Logger.w
180arn(`Ðе вÑÑÑÐ°Ð²Ð»ÐµÐ½Ñ Ð·Ð°Ð³Ð¾Ð»Ð¾Ð²ÐºÐ¸ x-cid и x-uid.\n Ðаголовки ÑÑÑаниÑÑ: ${JSON.stringify(null===(b=null===(S=null===process||void 0===process?void 0:process.domain)||void 0===S?void 0:S.req)||void 0===b?void 0:b.headers)}`);const e=process.domain.req.headers["x-sbissessionid"],t=0,o=8,r=e.substr(t,o),s=9,n=8,i=e.substr(s,n);y=[parseInt(r,16),parseInt(i,16)]}return y}},t}(0,{},a,f,o,n,i,e,r,d,f,s),m=g,I=function(e){"use strict";var t=["content","_options","theme"];return e.g({v:1,m:"wml!EngineUser/_info/Loader/Loader",t:[e.r(((e,t)=>[e.P(t,e.m(t,0),{K:"0_",A:{class:"controls_EngineUser_theme-"+e.e(e.m(t,1))},m:"attribute",c:!0})]))],e:[(e,o)=>e.g(o,[t[1],t[0]]),(e,o)=>e.g(o,[t[1],t[2]])]})}(c),S=function(e,t,o,r,s,n){"use strict";function i(e,t){const o=e instanceof Error;if(!(void 0!==r.default.getState()&&!(null==t?void 0:t.forceReload))&&!o&&e)r.default.setState(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.IsGuest=t.afterLoadCallback=t.EngineUserInfoSlice=void 0;class a extends o.Slice{_initState(e){return i(e),e}}return t.EngineUserInfoSlice=a,t.default={loadData({forceReload:e}={}){let t;if(void 0!==r.default.getState()&&!e)t=Promise.resolve(r.default.getState());else t=function(){const e=(0,n.getStore)("UserInfo_load_promise"),t=e.get("value");if(t)return e.remove("value"),t;const o=r.default.loadData().then((e=>e));return e.set("value",o),o}();return t},slice:a},t.afterLoadCallback=function(e){i(e)},t.IsGuest={loadData(e,t){var o;return s.constants.isServerSide?process.domain.req.isAnonymousUser:null===(o=t.userInfo)||void 0===o?void 0:o.guest},slice:o.Slice},t}(0,{},u,g,l,f),b=S,y=function(e,t,o,r,s,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class a extends o.Control{constructor(){super(...arguments),this._template=r}_beforeMount({data:e,forceLoadUserInfo:t}){if(i.default.init(),!e){if(s.constants.isBrowserPlatform&&!i.default.getState()){if(t)return i.default.loadData().catch((e=>{n.Logger.warn(null==e?void 0:e.message)}));n.Logger.error("Ðа ÑеÑвеÑе не оÑÑабоÑал меÑод SbisUI/ServerUserInfo:loadUserInfoData. ÐÐ»Ñ Ð¸ÑпÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ Ð¾Ñибки обÑаÑиÑеÑÑ Ðº ÑÑаÑÑе https://link.sbis.ru/article/wasaby/44a72224-d794-4a4c-a3a0-c43daf81d340")}}else i.default.setState(e)}}return a.defaultProps={notLoadThemes:!0},t.default=a,t}(0,{},t,I,l,e,g),U=y,p.afterLoadCallback=p.Slice=p.IsGuest=p.Factory=p.Loader=p.Info=void 0,p.Info=m.default,Object.defineProperty(p,"Factory",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(p,"Slice",{enumerable:!0,get:function(){return b.EngineUserInfoSlice}}),Object.defineProperty(p,"afterLoadCallback",{enumerable:!0,get:function(){return b.afterLoadCallback}}),Object.defineProperty(p,"IsGuest",{enumerable:!0,get:function(){return b.IsGuest}}),p.Loader=U.default,p})); 181define("UI/Actions",["require","exports","UICore/Actions"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDeviceId=t.isRetail=t.isActionsAvailable=t.isOnline=t.findAction=t.JsMethod=t.ActionStarter=void 0,Object.defineProperty(t,"ActionStarter",{enumerable:!0,get:function(){return n.ActionStarter}}),Object.defineProperty(t,"JsMethod",{enumerable:!0,get:function(){return n.JsMethod}}),Object.defineProperty(t,"findAction",{enumerable:!0,get:function(){return n.findAction}}),Object.defineProperty(t,"isOnline",{enumerable:!0,get:function(){return n.isOnline}}),Object.defineProperty(t,"isActionsAvailable",{enumerable:!0,get:function(){return n.isActionsAvailable}}),Object.defineProperty(t,"isRetail",{enumerable:!0,get:function(){return n.isRetail}}),Object.defineProperty(t,"getDeviceId",{enumerable:!0,get:function(){return n.getDeviceId}})})); 182define("UICore/Actions",["i18n!UICore","WasabyLoader/ModulesLoader","Application/Env","require","exports"],(function(e,t,n,i,o){var r,a,c,s,l,u,d,f;return Object.defineProperty(o,"__esModule",{value:!0}),r=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JsMethod=void 0;return t.JsMethod=class{constructor(e){this.actionName=e.actionName}_getUnresolvedParams(e,t){const n=[];return e.forEach(((e,i)=>{if(e.is_required&&void 0===t[i])n.push(e.name)})),n}canExecute(e){return!0}async getParams(e,t={}){if(this._getUnresolvedParams(e,t).length)return Promise.resolve(t);else return Promise.resolve(t)}execute(e,t,n,i){return i.execute(this.actionName,e)}afterExecute(e){}},t}(0,{}),a=r,c=function(e,t,n,i,o){"use strict";function r(){const e=(0,n.getConfig)("xDomainSystemname");return l.includes(e)}function a(){if(requirejs.defined("Page/loaders")){const e=requirejs("Page/loaders").ApplicationSettings.get("companyType");return"shop"===e||"restaurant"===e||"salon"===e}return!1}function c(e){const t=(0,n.getStore)(u).get(d);if("boolean"==typeof t)return t;let o=!0;if(-1!==i.location.hostname.indexOf("autotest")||-1!==i.location.hostname.indexOf("prognix")||-1!==i.location.hostname.indexOf("localhost"))o=!1;return o=o&&(r()||a())&&!(0,n.getStore)("RetailApplicationConfig").get("isOffline"),(0,n.getStore)(u).set(d,o),o}function s(){var e;return!!(null===(e=(0,n.getStore)("RetailApplicationConfig"))||void 0===e?void 0:e.get("productId"))}
182Object.defineProperty(t,"__esModule",{value:!0}),t.HOTKEY_MENU_ITEM=t.getDeviceId=t.isRetail=t.isActionsAvailable=t.hasWorkplace=t.isOnline=void 0;const l=["online-saby","online","online-top","online-sabytest"];t.isOnline=r,t.hasWorkplace=a;const u="Actions",d="isActionsAvailableCached";return t.isActionsAvailable=c,t.isRetail=s,t.getDeviceId=function(){var e,t,n,i;return s()?null!==(i=null===(n=null===(t=null===(e=requirejs("RetailCore/base"))||void 0===e?void 0:e.getStoreState())||void 0===t?void 0:t.workplaceRecord)||void 0===n?void 0:n.get("Company"))&&void 0!==i?i:null:null},t.HOTKEY_MENU_ITEM={id:"hotkeys",key:"hotkeys",title:o("ÐоÑÑÑие клавиÑи"),rights:["Hotkeys"],rightMode:0,requiredLevel:"Read",icon:"HotKeys-icons/helpMenu:icon-HotKeys",accessCheck:()=>c()},t}(0,{},n,n,e),s=c,l=function(e,t,n){"use strict";function i(e){var t,i;let o=null!==(i=null===(t=e.getCurrentDataContext())||void 0===t?void 0:t.getDescription())&&void 0!==i?i:[];if((0,n.isOnline)())o=o.concat([{name:"CurrentUser",type:"Employee",value:void 0},{name:"CurrentAccount",type:"Account",value:void 0},{name:"Note",type:"Note"}]);if((0,n.hasWorkplace)())o=o.concat([{name:"Workplace",type:"Workplace",value:void 0}]);return o}return Object.defineProperty(t,"__esModule",{value:!0}),t.findAction=t.getContextDescription=void 0,t.getContextDescription=i,t.findAction=async function(e,t){const n=i(t);return new Promise(((t,i)=>{requirejs(["FrameEditor/dataContextSelector"],function(e){e.findPropertyDescription(this.fullPath,n).then((e=>{if(!e)return void t({});const n=e=>{const t={};e.get("MetaAttributes").forEach((e=>{t[e.get("Type")]=e.get("Value").get("value")}));const n=t;let i;if(n.MethodImplementation)i={title:n.Title,icon:n.Icon,blMethod:n.MethodImplementation.Method,jsMethod:n.MethodImplementation.JsMethod,isStatic:n.Static};else{const e=[],n=t.parameters;null==n||n.forEach((t=>{e.push({name:t.name,type:t.type,title:t.title,description:t.description,is_array:t.is_array,is_required:t.is_required,fields:t.fields,kind:t.kind,default_value:t.default_value,editor:t.editor,editor_options:t.editor_options})})),i={title:t.title,icon:t.icon,blMethod:t.method,params:e,jsMethod:t.js_method,isStatic:t.isStatic}}return i},i=e,o={};for(const[e,t]of Object.entries(i))o[e]=t?n(t):null;t(o)}),i)}.bind({fullPath:e}))}))},t}(0,{},c),u=l,d=function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionStarter=void 0;return t.ActionStarter=class{constructor(e){this.actionOptions=e}async execute(e,t,n,i){return this._execute(e,(async(e,o,r)=>{if(e.canExecute(r)){const a=await e.getParams(o,r),c=await e.execute(a,t,n,i);return e.afterExecute(c),!0}return!1}),(async(e,t)=>{try{await i.execute(this.actionOptions.actionName,t)}catch(e){return o.logger.error("UI/Actions:ActionStarter: бл-меÑод не Ñмог вÑполниÑÑÑÑ",e),!1}return!0}),(()=>(o.logger.error("UI/Actions:ActionStarter: Ðевозможно вÑполниÑÑ Ð´ÐµÐ¹ÑÑвие, Ð½ÐµÑ Ð½Ð¸ js-ÑеализаÑии дейÑÑвиÑ, ни бл-меÑода"),!1)),i)}async canExecute(e,t){return this._execute(e,(async(e,t,n)=>e.canExecute(n)),((e,t)=>!0),(()=>!1),t)}async _execute(e,t,o,a,c){var s,l;const u=(await(0,r.findAction)(this.actionOptions.actionName,c))[this.actionOptions.actionName];if(!u)return!1;if(u.jsMethod){const o=await n.loadAsync(u.jsMethod).catch((e=>{n.unloadSync(u.jsMethod)}));if((null==o?void 0:o.prototype)&&o.prototype instanceof i.JsMethod){const n=new o({actionName:this.actionOptions.actionName}),i=null!==(s=o.jsParams)&&void 0!==s?s:[],r=this._calcParamValues(i,this.actionOptions.actionProps);return t(n,i,{...e,...r})}return!1}if(u.blMethod){const t=null!==(l=u.params)&&void 0!==l?l:[],n=this._calcParamValues(t,this.actionOptions.actionProps);return o(t,{...e,...n})}return a()}_calcParamValues(e,t){const n=null!=t?t:{};return e.forEach(((e,i)=>{var o;n[e.name]=null!==(o=null==t?void 0:t[e.name])&&void 0!==o?o:e.default_value})),n}},t}(0,{},t,r,n,l),f=d,o.HOTKEY_MENU_ITEM=o.getDeviceId=o.isRetail=o.isActionsAvailable=o.isOnline=o.getContextDescription=o.findAction=o.JsMethod=o.ActionStarter=void 0,Object.defineProperty(o,"ActionStarter",{enumerable:!0,get:function(){return f.ActionStarter}}),Object.defineProperty(o,"JsMethod",{enumerable:!0,get:function(){return a.JsMethod}}),Object.defineProperty(o,"findAction",{enumerable:!0,get:function(){return u.findAction}}),Object.defineProperty(o,"getContextDescription",{enumerable:!0,get:function(){return u.getContextDescription}}),Object.defineProperty(o,"isOnline",{enumerable:!0,get:function(){return s.isOnline}}),Object.defineProperty(o,"isActionsAvailable",{enumerable:!0,get:function(){return s.isActionsAvailable}}),Object.defineProperty(o,"isRetail",{enumerable:!0,get:function(){return s.isRetail}}),Object.defineProperty(o,"getDeviceId",{enumerable:!0,get:function(){return s.getDeviceId}}),Object.defineProperty(o,"HOTKEY_MENU_ITEM",{enumerable:!0,get:function(){return s.HOTKEY_MENU_ITEM}}),o})); 183define("Page/loaders",["i18n!SabyPage","WasabyLoader/ModulesLoader","ViewSettings/controller","UICommon/Utils","UICommon/Deps","UI/Utils","UI/Theme","UI/Actions","Types/util","Types/source","Types/object","Types/guards","Types/formatter","Types/entity","Types/collection","Types/chain","SbisEnvUI/Bootstrap","Router/router","Permission/access","ParametersWebAPI/Scope","Page/theme","Page/base","Feature/feature","Env/Env","Core/PromiseLib/PromiseLib","Controls/dataSource","Controls/Store","Controls-DataEnv/slice","Controls-DataEnv/dataFactory","Controls-DataEnv/context","Browser/Transport","Application/Env","require","exports"],(function(e,t,n,a,o,i,r,s,l,c,d,u,f,g,p,v,m,h,y,b,S,C,_,P,D,A,I,x,R,L,O,F,w,M){var j,E,N,T,k,G,B,U,H,$,q,V,K,z,Q,J,W,X,Y,Z,ee,te,ne,ae,oe,ie,re,se,le,ce,de,ue,fe,ge,pe,ve,me,he,ye,be,Se,Ce,_e,Pe,De,Ae,Ie,xe,Re,Le,Oe;return Object.defineProperty(M,"__esModule",{value:!0}),j=function(e,t,n,a,o){"use strict";
183Object.defineProperty(t,"__esModule",{value:!0});class i extends a.BaseLoader{constructor(){super(...arguments),this._timeout=3e3}load(e,t,a,i){return new n.SbisService({endpoint:"SettingsInterface"}).call("GetSettings",{}).then((e=>{const t={...(0,o.factory)(e.getRow()).toObject(),...this.getState(null==i?void 0:i.buildingContext)};return this.setState(t,null==i?void 0:i.buildingContext),t}))}}return t.default=new i("ApplicationSettings"),t}(0,{},c,C,v),E=j,N=function(e,t,n,a,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=o.constants.isServerSide?1e3:5e3;class s extends i.BaseLoader{constructor(){super(...arguments),this._timeout=r}load(e){let t;if(Array.isArray(e)&&e.length)t=n.Feature.require(e);return t}loadErrback(e){a.Logger.info(`Feature/feature - couldn't get data. Error: ${e}`)}}return t.default=new s("FeatureLoader"),t}(0,{},_,i,P,C),T=N,k=function(e,t,n,a,o,i){"use strict";function r(e){if(e!==v)return[];else return d(m,v)}function s(e){return e instanceof Error?e.message:String(e)}function l(e,t){if(e&&"object"==typeof e)try{const t=(0,a.isRecord)(e)?e:new n.Model({adapter:new n.adapter.Sbis,rawData:e}),o=t.get("InplaceContext");return(0,a.isRecord)(o)?o:t}catch(e){!function(e,t){i.Logger.error(`Ðе ÑдалоÑÑ ÑазобÑаÑÑ ${e} Ð´Ð»Ñ ÐºÐ¾Ð½ÑекÑÑа даннÑÑ
: ${s(t)}`)}(t,e)}}function c(e,t){const n=l(e,t),o=n?function(e){const t=e.get("Properties");if((0,a.isRecordSet)(t))return t;const n=e.get("data");if(!(0,a.isRecord)(n))return;const o=n.get("value"),i=((0,a.isRecord)(o)?o:n).get("Properties");return(0,a.isRecordSet)(i)?i:void 0}(n):void 0;if(!o)return[];const i=[];return o.each((e=>{const t=e.get("Name"),n=e.get("Title"),o=e.get("Type"),r=(0,a.isRecord)(o)?function(e){const t=e.get("element_id"),n=e.get("data"),o=(0,a.isRecord)(n)?(0,a.isRecord)(n.get("value"))?n.get("value"):n:void 0,i=null==o?void 0:o.get("TypeName"),r=null==o?void 0:o.get("DefaultValue");if("Reference"===t)return i?{type:i,metatype:"applicationobject",defaultValue:r}:{};else return t?{type:t.toLowerCase(),metatype:"primitive",defaultValue:r}:{}}(o):{};if(t&&r.type)i.push({name:t,...n?{title:n}:{},type:r.type,metatype:r.metatype,defaultValue:r.defaultValue})})),i}function d(e,t){if(!Array.isArray(e)){if(null!=e)i.Logger.error(`ÐÑÑоÑник ${t} веÑнÑл некоÑÑекÑное опиÑание конÑекÑÑа даннÑÑ
`);return[]}return e.reduce(((e,t)=>{if(t&&"string"==typeof t.name&&"string"==typeof t.type)e.push({...t});return e}),[])}async function u(e,t){if(Array.isArray(e))return d(e,t);if("string"!=typeof e)return[];try{const n=await o.loadAsync("Meta/types:loadContextInstanceAsync");return d(await n(e),t)}catch(t){return i.Logger.error(`ÐÑоизоÑла оÑибка пÑи полÑÑении инÑÑанÑа конÑекÑÑа Ñ Ð¸Ð´ÐµÐ½ÑиÑикаÑоÑом ${e}: ${s(t)}`),[]}}async function f(e,...t){if("string"!=typeof e)return e;const n=await o.loadAsync(e);if("function"!=typeof n)return n;else return n(...t)}async function g(e,t,...n){const[a,o]=await Promise.all([f(e,...n),f(t,...n)]);if(a||o)return{...a,...o}}async function p({pageContext:e={},applicationContext:t={}},n){const[a,o]=await Promise.all([g(t.contextConfig,e.contextConfig),g(t.contextConfigArguments,e.contextConfigArguments,n)]);return{contextConfig:a,contextConfigArguments:o}}Object.defineProperty(t,"__esModule",{value:!0}),t.resolvePageDataContext=t.getMergedContextData=void 0;const v="SabyAppContext",m=[{name:"CurrentAccount",order:20,type:"Account"},{title:"ÐолÑзоваÑелÑ",name:"CurrentUser",order:30,type:"Employee"}];return t.getMergedContextData=p,t.resolvePageDataContext=async function(e,t){const{pageContext:n={},applicationContext:a={}}=e,[o,i,s]=await Promise.all([u(n.contextDescription,"contentConfig.context"),u(a.contextDescription,"CONFIG_LOADER_ARGUMENTS.context"),p(e,t)]),l=function(e){const t=[],n=new Set;return e.forEach((e=>{e.forEach((e=>{if(!n.has(e.name))n.add(e.name),t.push(e)}))})),t}([o,i,c(n.contextInstance,"Site.GetPage.context"),r(a.contextId)]),d={...a.contextData||{},...n.contextData||{}};return{contextDescription:l,...s,contextData:Object.keys(d).length?d:void 0}},t}(0,{},g,u,t,a),G=function(e,t){"use strict";
183return Object.defineProperty(t,"__esModule",{value:!0}),t.default={getConfig(e){const t={},{contextDescription:n,contextConfigArguments:a,controllers:o,prefetchKeys:i}=e,r={...e.factories};return null==i||i.forEach((e=>{delete r[e]})),Object.keys(r||{}).forEach((i=>{const s=r[i];if(t[i]={dataFactoryName:s.dataFactoryName,dataFactoryArguments:{...s.dataFactoryArguments,forceReload:null==e?void 0:e.forceReload},dependencies:s.dependencies,afterLoadCallback:s.afterLoadCallback},"viewSettings"===i||"dashboards"===i)t[i].dataFactoryArguments.controllers=o;if("navigation"===i)t[i].dataFactoryArguments.contextData={context:n,contextConfigArguments:a}})),t}},t}(0,{}),B=G,U=function(e,t,n,a,o,i,r){"use strict";function s(e,t){let n=function(e){const t=i.cookie.get(e);if("string"!=typeof t)return null;else return t}("s3online-theme")||e||t||"default";if("default/onlinenavigation"===n)n="default__onlinenavigation";return n}async function l(e,t=!1){try{const n=await function(e,t=!1){if(t)return c(e);const n=(0,i.getStore)(f+e),a=n.get("value");if(a)return n.remove("value"),a;return c(e)}(e,t);return n}catch(t){return{error:o.ERROR_FALLBACK_SELECTOR,selector:e}}}function c(e){const t=(0,i.getStore)(f+e),n=r.UUID_REGEXP.test(e)?{uuid:e}:{selector:e},o=(0,a.getThemeStorage)().loadTheme(n);return t.set("value",o),o}Object.defineProperty(t,"__esModule",{value:!0});const d={classList:["t-base_font_sabyapp"],selector:"base_font_sabyapp",themeApply:"FONT",isFromDistribution:!0};class u extends n.Slice{}t.default={async loadData(e,t={}){var n,a;const o=function(e){if(Array.isArray(e.selector))return e.selector;else return[e.selector,void 0]}(e);let i=o[0];const r=o[1]||(null===(n=t.applicationSettings)||void 0===n?void 0:n.themeFont);i=s(i,null===(a=t.applicationSettings)||void 0===a?void 0:a.theme);const c=[l(i,e.forceChangeTheme)];if(!r)return c[0];else return c.push(l(r,e.forceChangeTheme)),Promise.all(c).then((e=>!e.some((e=>"themeApply"in e&&"FONT"===e.themeApply))?e.concat(d):e))},slice:u};const f="ActiveTheme_load_promise_";return t}(0,{},x,S,r,F,r),H=U,$=function(e,t,n,a,o,i,r){"use strict";function s(e,t={},o=!1){const{id:i,additionalData:r}=t;if("CurrentUser"===e.name)return function(){var e;const t=(0,a.loadSync)("EngineUser/Info"),o=null===(e=t.Info)||void 0===e?void 0:e.get("ЧаÑÑноеÐиÑо");if(o)return t.Info.getUserModel(o);else return new n.Model({adapter:new n.adapter.Sbis})}();if("CurrentAccount"===e.name)return function(){var e;const t=(0,a.loadSync)("EngineUser/Info"),o=null===(e=t.Info)||void 0===e?void 0:e.get("ÐденÑиÑикаÑоÑÐлиенÑа");if(o)return t.Info.getAccountModel(o);else return new n.Model({adapter:new n.adapter.Sbis})}();let s;if(!e.metatype||"applicationobject"===e.metatype)s=n.Record.fromObject({...r,Id:i||null},"adapter.sbis");else s=n.Record.fromObject({value:o?e.value:e.value||e.defaultValue||t.value||t.defaultValue},"adapter.sbis");return new n.Model({adapter:"adapter.sbis",typeName:e.metatype?`${e.metatype}:${e.type}`:e.type,format:s.getFormat(),rawData:s.getRawData()})}function l(e,t,n,a){return e.map((e=>{const o=null==t?void 0:t[e.name],i=Object.prototype.hasOwnProperty.call(n||{},e.name),l=Object.prototype.hasOwnProperty.call(a||{},e.name),c=i?n[e.name]:l?a[e.name]:void 0,d=i||l?function(e,t,n){if((0,r.isRecord)(t)||"primitive"!==e.metatype)return t;return s({...e,value:t},n,!0)}(e,c,o):s(e,o);return{...e,value:d}}))}return Object.defineProperty(t,"__esModule",{value:!0}),t.getContextRs=void 0,t.getContextRs=function(e,t){const a=l(e,t);return(0,i.factory)(a).map((e=>n.Record.fromObject(e,new n.adapter.Sbis))).value(o.factory.recordSet,{adapter:new n.adapter.Sbis})},t.default={async loadData(e,t){const{context:n,contextArgs:o,contextData:i,currentResults:r}=e,s=l(n,o,i,r),c=function(e,t={}){const n=[];return Object.entries(t).forEach((([e,t])=>{const a=null==t?void 0:t.fields;if(a&&a.length)a.forEach((t=>{n.push(`${e}.${t}`)}))})),n}(0,o),d=t.hotkeys;if(d)Object.values(d).forEach((e=>{c.push({name:e.actionName,type:"Action"})}));const{DataContextServiceAPI:u}=await(0,a.loadAsync)("Controls-DataEnv/dataLoader");return u.fillContextFields(c,s)}},t}(0,{},g,t,p,v,u),q=$,V=function(e,t,n,a){"use strict";
183Object.defineProperty(t,"__esModule",{value:!0}),t.PageAppObject=void 0;class o extends n.Form{static getDataFactoryArguments({name:e},{context:t=[]}){const n=t.find((t=>t.name===e));return{source:a.DataObject,record:n.value}}}return t.PageAppObject=o,t}(0,{},R,c),K=V,z=function(e,t,n,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class o extends n.Slice{_initState(){return{}}}return t.default={async loadData({features:e}){let t;if(Array.isArray(e)&&e.length)t=a.Feature.require(e);return null==t?void 0:t.then((()=>{}))},slice:o},t}(0,{},x,_),Q=z,J=function(e,t,n,a,o,i,r,s,l,c,d,u,f,g){"use strict";function p(e){if((0,r.isUnitTestMode)())return Promise.resolve([]);if(-1!==c.location.hostname.indexOf("autotest")||-1!==c.location.hostname.indexOf("prognix")||-1!==c.location.hostname.indexOf("localhost"))return Promise.resolve([]);if(!d.Permission.checkRights(["Hotkeys"],0,"Read"))return Promise.resolve([]);const t=g.default.get("hotKeysFromPageConfig");if(t&&!e){const e=v(t);return Promise.resolve(e)}return function(){const e=new n.Record({format:{Device:"string",Page:"string",Version:"string"},adapter:"adapter.sbis"});e.set({Device:(0,f.getDeviceId)(),Page:l.NavigationController.getPageId((0,s.getRootRouter)()),Version:o.constants.buildnumber});const t=new i.Query;return t.where(e),new i.SbisService({endpoint:{contract:"HotKey",address:"/site-builder/service/"},binding:{query:"ListForUser"}}).query(t)}().then((e=>v(new a.RecordSet({rawData:e.getRawData(),adapter:e.getAdapter()}))))}function v(e){const t=[];if(!e)return t;else return e.each((e=>{const n=e.get("Keys"),a={actionName:e.get("ActionName"),actionProps:e.get("Params"),keys:n};if("GLOBAL"===e.get("ScopeType"))t.push(a);else t.unshift(a)})),t}Object.defineProperty(t,"__esModule",{value:!0}),t.HotKeysSlice=void 0;class m extends u.Slice{_initState(e){return{data:e}}async reload(){return p(!0).then((e=>this.setState({data:e})))}getHotKeysByPage(){return this.state.data}}return t.HotKeysSlice=m,t.default={loadData:async()=>p(),slice:m},t}(0,{},g,p,P,c,a,h,C,F,y,x,s,I),W=J,X=function(e,t,n,a,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.afterLoadCallback=void 0;class r extends n.Slice{_initState(e,t){const n=o.loadSync(t.module);if(a.constants.isBrowserPlatform){if(n.init instanceof Function)n.init();if(n.getReceivedData instanceof Function)n.getReceivedData({pageId:t.pageId,...t.params},t.Router,t.controllers)}return e}}return t.default={async loadData(e,t,n){var a;if(!e.module)return Promise.resolve(void 0);const r=await o.loadAsync(e.module);if((0,i.addPageDeps)([e.module]),r.init instanceof Function)r.init();if(!e.reloadable&&void 0!==(null===(a=r.getState)||void 0===a?void 0:a.call(r)))return Promise.resolve(void 0);else return r.loadData({pageId:e.pageId,...e.params},t,n,e.controllers)},getDataFactoryArguments:(e,t,n)=>({...e,Router:n}),slice:r,isHandlingTimeoutError:!0},t.afterLoadCallback=function(){},t}(0,{},x,P,t,o),Y=X,Z=function(e,t,n,a,o,i){"use strict";function r(e=[],t=[]){return e.concat(t)}function s(e,t){return e||t.url.getStateUrl()}return Object.defineProperty(t,"__esModule",{value:!0}),t.Meta=t.MetaCanonical=t.MetaData=void 0,t.MetaData={async loadData(e,t,n){const i=e.metaConfig;let r;if(i.readMethod){const[e,t]=i.readMethod.split("."),a={url:s(i.url,n)};r=new o.SbisService({endpoint:e}).call(t,a).then((e=>{const t=e.getRow();return{meta:t.get("meta")||[],microdata:t.get("microdata")||{}}}))}else if(i.getMetaCallback){const e=await(0,a.loadAsync)(i.getMetaCallback);r=Promise.resolve(e(i,t))}else r=Promise.resolve({});return r},slice:n.Slice},t.MetaCanonical={async loadData(e,t){var n;return(await(0,a.loadAsync)(e.canonicalGetter))(t,null===(n=null==t?void 0:t.formFactory)||void 0===n?void 0:n.record)},slice:n.Slice},t.Meta={async loadData({metaConfig:e},{metaDataFactory:t,metaCanonicalFactory:n}){const a={meta:r(e.meta,null==t?void 0:t.meta),microdata:(null==t?void 0:t.microdata)||{}};return(0,i.createBaseHeadTags)({meta:a.meta,microdata:JSON.stringify(a.microdata,null,""),links:n?[{rel:"canonical",href:n}]:[]}),{metaData:a,canonicalUrl:n}},slice:n.Slice},t}(0,{},x,t,c,m),ee=Z,te=function(e,t,n,a,o,i){"use strict";
183Object.defineProperty(t,"__esModule",{value:!0}),t.afterLoadCallback=t.PermissionSlice=void 0;class r extends n.Slice{_initState(e){if(this._state=e,!o.Loader.isInit())o.Loader.setState(e);const t={};return Object.freeze(t),t}get(e){return o.Permission.get(e)}checkRights(e,t,n){return o.Permission.checkRights(e,t,n)}}return t.PermissionSlice=r,t.default={loadData(e={}){let t;const{loadPermissionData:n=!0}=e;if(!n)return Promise.resolve(void 0);if(o.Loader.isInit())t=Promise.resolve(o.Loader.getState());else t=function(){const e=(0,i.getStore)("Permission_load_promise"),t=e.get("value");if(t)return e.remove("value"),t;const n=new a.SbisService({endpoint:"CheckRights"}).call("AccessAreasJSON").then((e=>e.getScalar()));return e.set("value",n),n}();return t},slice:r},t.afterLoadCallback=function(e){if(e)o.Loader.setState(e)},t}(0,{},x,c,y,F),ne=te,ae=function(e,t,n,a){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.default={loadData:async({configLoader:e})=>(0,a.loadAsync)(e).then((()=>({}))),slice:n.Slice},t}(0,{},x,t),oe=ae,ie=function(e,t,n,a,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i extends n.Slice{_initState(e){return e}}return t.default={async loadData(e){let t;if(e.configurationId&&((null==(n=e.rights)?void 0:n.length)?a.Permission.checkRights(n,0,"FullControl"):1))t=(0,o.getSiteNavigationSource)().then((t=>t.call("HasConfiguration",{configurationId:e.configurationId}))).then((e=>({visible:e.getScalar()})));else t=Promise.resolve({visible:!1});var n;return t},slice:i},t}(0,{},x,y,C),re=ie,se=function(e,t,n,a,o){"use strict";function i(e){var t;if(!e)return;if(e instanceof Error)return e;const n=e.getRow(),a=null==n?void 0:n.get("Dashboards"),o=null==n?void 0:n.get("DashboardsOrder"),i=null==n?void 0:n.get("ChosenDashboard");return{Dashboards:a,DashboardsOrder:o,ChosenDashboard:i,Settings:null===(t=a[i])||void 0===t?void 0:t.Settings}}Object.defineProperty(t,"__esModule",{value:!0});const r="Notice_cache_key",s={set(e){(0,o.getStore)(r).set("value",e)},get:()=>(0,o.getStore)(r).get("value")};class l extends n.Slice{_initState(e){if(!s.get()&&e.noticeDashboard)s.set(e.noticeDashboard);return e}}return t.default={async loadData(e,t,n){var o;const{controllers:r,loadMainFrame:l,loadNoticeFrame:c,applicationId:d,configurationId:u,forceReload:f,mainFrameId:g,noticeFrameId:p}=e,v=c&&!1!==(null===(o=t.applicationSettings)||void 0===o?void 0:o.noticeCenterVisible),m=await(0,a.loadAsync)("Dashboard/new/loader"),h=l?m.loadDashboardLayout({loadParams:{applicationId:d,configurationId:u,frameId:g},Router:n,controllers:r}):Promise.resolve(void 0);let y=Promise.resolve();if(v){const e=s.get();if(e&&!f)y=Promise.resolve(e);else y=m.loadDashboardLayout({loadParams:{pageId:"notice-frame",chosenOnly:!0,applicationId:d,configurationId:u,frameId:p},Router:n,controllers:r}).then((e=>{const t=i(e);if(t)s.set(t);return t}))}return Promise.all([h,y]).then((([e,t])=>({contentDashboard:i(e),noticeDashboard:t})))},slice:l},t}(0,{},x,t,F),le=se,ce=function(e,t,n,a,o,i,r,s){"use strict";function l(e,t={}){const n=new Date,a=new r.Record({adapter:"adapter.sbis"});return a.addField({name:"applicationId",type:"string"}),a.addField({name:"configurationId",type:"string"}),a.addField({name:"pageId",type:"string"}),a.addField({name:"startDate",type:"date"}),a.addField({name:"endDate",type:"date"}),a.addField({name:"clickType",type:"string"}),a.addField({name:"accountId",type:"integer"}),a.set("applicationId",e.applicationId),a.set("configurationId",e.configurationId),a.set("pageId",e.pageId),a.set("startDate",t.startDate||(0,i.dateToSql)(new Date(n.getFullYear(),n.getMonth()-1,n.getDate()),i.TO_SQL_MODE.DATE)),a.set("endDate",t.endDate||(0,i.dateToSql)(new Date(n.getFullYear(),n.getMonth(),n.getDate()),i.TO_SQL_MODE.DATE)),a.set("clickType",t.clickType||"local"),a.set("accountId",t.accountId||null),a}function c(e,t={}){return new a.SbisService({endpoint:{contract:"PageElement",address:"/stats-cloud-app/service/"}}).call("GetStatistics",{_filter:l(e,t)}).then((e=>e.getAll())).catch((e=>(s.Logger.warn(`Page.factory:Statistics - ÐÑибка вÑзова: ${e}`),Promise.resolve(void 0))))}
183Object.defineProperty(t,"__esModule",{value:!0}),t.StatisticsSlice=void 0;let d={};class u extends n.Slice{constructor(){super(...arguments),this._highlighters=[]}_initState(e,t){return this._loadParams=t,{data:e}}setFilter(e){d=e}loadData(){return c(this._loadParams,d).then((e=>{this.setState({data:e})}))}}return t.StatisticsSlice=u,t.default={loadData(e){let t;if(o.query.get.showStatisticsFull||o.query.get.showStatistics)t=c(e);else t=Promise.resolve(void 0);return t},getDataFactoryArguments(e,t){const n=t.applicationSettings||{};return{...e,configurationId:n.configurationId,applicationId:n.applicationId}},slice:u},t}(0,{},x,c,F,f,g,i),de=ce,ue=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isErrorCallback=void 0;return t.isErrorCallback=(e,t)=>{let a;const o=null==t?void 0:t.isErrorCallbackList;return null==o||o.forEach((t=>{const o=(0,n.loadSync)(t)(e)||null;if(o)a=o})),a},t}(0,{},t),fe=ue,ge=function(e,t,n,a,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApplicationSettingsController=void 0;class i extends((0,a.mixin)(o.SerializableMixin,o.OptionsToPropertyMixin)){constructor({buildingContext:e}={}){super(),o.OptionsToPropertyMixin.initMixin(this),this._$buildingContext=e}getState(e){return n.default.getState(e||this._$buildingContext)}setState(e,t){n.default.setState(e,t||this._$buildingContext)}cleanUp(e){n.default.cleanUp(e||this._$buildingContext)}get(e){return(this.getState()||{})[e]}set(e,t){this.setState({...this.getState()||{},[e]:t})}}return t.ApplicationSettingsController=i,Object.assign(i.prototype,{_moduleName:"Page/loaders:ApplicationSettingsController"}),t}(0,{},j,l,g),pe=ge,ve=function(e,t,n,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class o extends n.ApplicationSettingsController{setController(e){this._controller=e}getController(){if(!this._controller)this.setController(new n.ApplicationSettingsController("default"));return this._controller}get(e){return this.getController().get(e)}set(e,t){this.getController().set(e,t)}setState(e,t){this.getController().setState(e,t)}cleanUp(e){var t,n;null===(n=(t=this.getController()).cleanUp)||void 0===n||n.call(t,e)}getState(e){return this.getController().getState(e)}init(){a.default.init()}isInit(e){return void 0!==this.getState(e)}loadData(e,t,n,o){return a.default.loadData(e,t,n,o)}}return t.default=new o,t}(0,{},ge,j),me=ve,he=function(e,t,n,a,o,i,r,s,l,c,d,u,f,g,p,v,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filterNavigationData=void 0;const h="CONTROLS_HIDDEN_GROUP",y=l.constants.isServerSide?1e4:2e4,b=l.constants.isServerSide?2e3:5e3,S="master",C="tabs",_="full",P="savedNavigationData",D="navigationMenuUpdate";class A extends u.BaseLoader{constructor(){super(...arguments),this._timeout=y,this._forceReload=!1}getReceivedData({scopeId:e,isAdaptive:t,applicationId:n,sidebarSettings:a,layoutInterfaceSettings:o},i,r){var s;const d=this.getState(null==r?void 0:r.buildingContext),u=null!==(s=null==o?void 0:o.visible)&&void 0!==s?s:!0;if(!l.constants.isServerSide&&u)setTimeout((()=>{this._loadSubmenu(d,t,e,n,null==a?void 0:a.usePageUrl,null==r?void 0:r.buildingContext)}),2e3),c.default.declareCommand(D,(()=>{const o=this.getState(null==r?void 0:r.buildingContext);this._loadSubmenu(o,t,e,n,null==a?void 0:a.usePageUrl,null==r?void 0:r.buildingContext)}),!0);return d}_loadSubmenu(e,t,n,i,r,d){const u=new a.Query;u.where({region:"left",options:{rightsNeeded:!l.constants.modules.PersonalOffice,useHiddenSections:!1,isAdaptive:t,scopeId:n,applicationId:i}});const f=async e=>{if(!e)return;if(r)this._setItemsPageUrl(e);let t;if(-1!==e.getIndexByValue("hidden",!0)||-1!==e.getIndexByValue("type",S)||-1!==e.getIndexByValue("type",C))t=await this._filterHiddenItems(e);else t={visibleItems:e};const n=this.getState(d);n.mainMenu=t.visibleItems,n.mainMenuHidden=t.hiddenItems,c.default.dispatch("navigationMenu",n.mainMenu,!0)};(0,v.getSiteNavigationSource)().then((e=>e.query(u))).then((async e=>{const t=e.getAll();if(t)await f(t);else await f(new o.RecordSet),s.Logger.error("ÐÑибка пÑи вÑполнении меÑода SiteNavigation.ListAll")})).catch((async e=>{if("DeferredCanceledError"!==e.name)await f(new o.RecordSet),s.Logger.error(`ÐÑибка пÑи вÑполнении меÑода SiteNavigation.ListAll: ${e}`,null,e)}))}_loadData(e,t,a,o,r,s,l,c){var d;const u=null===(d=null===n.query||void 0===n.query?void 0:n.query.get)||void 0===d?void 0:d.id,p=(0,v.getSiteNavigationSource)().then((n=>n.call("ListNew",{Filter:f.Record.fromObject({region:"left",options:{pageId:e,entityId:u,scopeId:a,isAdaptive:t,applicationId:s},context:c},"adapter.sbis")}))).then((async n=>{var a,s,c,d,u,p;const v={...await this._filterNavigation((0,i.factory)(n.getRow()).toObject())};if(this._checkGroupId(v.master),(null===(s=null===(a=v.accData)||void 0===a?void 0:a.configuration)||void 0===s?void 0:s.name)&&!m.default.get("configurationName"))m.default.set("configurationName",v.accData.configuration.name);if(r&&t&&(null==v?void 0:v.main)){if(-1===v.main.getFormat().getFieldIndex("showOnlyHorizontal"))v.main.addField({name:"showOnlyHorizontal",type:"boolean"});
183const t=f.Model.fromObject({id:o,type:"main",level:1,parent:null,"parent@":!0,title:g("ÐлавнаÑ"),activeTitle:g("ÐлавнаÑ"),href:"",activeHolder:o===e,action:!0,icon:"",showOnlyHorizontal:!0,groupId:null===(d=null===(c=v.main)||void 0===c?void 0:c.at(0))||void 0===d?void 0:d.get("groupId"),group:null===(p=null===(u=v.main)||void 0===u?void 0:u.at(0))||void 0===p?void 0:p.get("group"),pageId:o},v.main.getAdapter());if(t.setKeyProperty("id"),v.main.add(t,0),o===e)v.mainSelected=o}if(l&&(null==v?void 0:v.main))this._setItemsPageUrl(v.main);return v}));return p}_setItemsPageUrl(e){const t=(0,n.getConfig)("appRoot")||"/";if(-1===e.getFormat().getFieldIndex("pageUrl"))e.addField({name:"pageUrl",type:"string"});e.each((e=>{e.set("pageUrl",t+e.get("pageId"))}))}_getNavigationSaveKey(e){var t,n;return(null===(n=null===(t=null==e?void 0:e.accData)||void 0===t?void 0:t.configuration)||void 0===n?void 0:n.id)?`${P}_${e.accData.configuration.id}`:P+(c.default.getGlobalContextName()||"")}_updateParentData(e,t){if(t&&!e.children){if(e.tabs)this._updatePageIds(e.tabs,t);if(e.main)this._updatePageIds(e.main,t);if(e.mainMenu)this._updatePageIds(e.mainMenu,t)}return e}_updatePageIds(e,t){e.forEach((e=>{const n=e.get("id");if(t[n]&&!e.get("navxPage"))e.set("pageId",t[n].pageId)}))}_checkGroupId(e){if(e){const t=[];if(e.forEach((e=>{const n=e.get("groupId");if(!t.includes(n))t.push(n)})),1===t.length&&t[0]!==h)e.forEach((e=>{e.set("groupId",h)}))}}_getNavigationByChangeType(e,t,n,a){switch(t){case S:return Promise.resolve({...e,masterSelected:a.masterSelected,tabs:a.tabs});case C:const t=this._getIndex(e.tabs,n);return Promise.resolve({...e,master:a.master,masterSelected:a.masterSelected,tabsSelected:e.tabs.at(t).get("id")});case _:return Promise.resolve({mainMenu:null==e?void 0:e.mainMenu,...a})}}_getChangeType(e,t,n){if(e&&!n){const n=this._getIndex(e.master,t)>-1||this._getIndex(e.masterGroup,t)>-1;if(e.master&&n&&t!==(null==e?void 0:e.masterSelected))return S;else if(e.tabs&&this._getIndex(e.tabs,t)>-1)return C;else return _}else return _}_getIndex(e,t){return e?e.getIndexByValue("pageId",t):-1}_saveLastNavigation(e,t){const n=this._getlastNavigationConfig(e,t),a=this._getNavigationSaveKey(e);this._saveLastNavigationBL(n,a)}saveLastNavigation(e){const t=this._getNavigationSaveKey(this.getState());this._saveLastNavigationBL(e,t),this._updatePageIds(this.getState().mainMenu,e)}_saveLastNavigationBL(e,t){if(e&&!(0,p.isEmpty)(e))(0,v.getSiteNavigationSource)().then((n=>n.call("SaveNavData",{NavKey:t,NavData:e}))).catch((e=>{s.Logger.info(`ÐÑибка пÑи вÑполнении меÑода SiteNavigation.SaveNavData. \n Error: ${e}`)}))}_isGroupItem(e,t){return(null==e?void 0:e.getIndexByValue("id",null==t?void 0:t.get("id")))>-1||(null==e?void 0:e.getIndexByValue("id",null==t?void 0:t.get("parent")))>-1}_getlastNavigationConfig(e,t){var n,a,o;let i;switch(t){case S:const t=e.tabsSelected||e.mainSelected,r=e.master.getRecordById(e.masterSelected),s=this._isGroupItem(e.masterGroup,r),l=null==r?void 0:r.get("pageId");if(l&&!s)i={[t]:{id:e.masterSelected,pageId:l}};if(e&&e.tabsSelected&&e.mainSelected)i[e.mainSelected]={id:e.tabsSelected,pageId:l};break;case C:if(e.mainSelected&&!1===(null===(a=null===(n=e.main)||void 0===n?void 0:n.getRecordById(e.mainSelected))||void 0===a?void 0:a.get("saveLastTab")))break;const c=e.tabsSelected;i={[e.mainSelected]:{id:c,pageId:null===(o=e.tabs.getRecordById(c))||void 0===o?void 0:o.get("pageId")}}}return i}forceReload(){this._forceReload=!0}load({pageId:e,scopeId:t,forceReload:n,isAdaptive:a,mainPageId:o,layoutInterfaceSettings:i,applicationId:r,context:s},d,u,f){var g,p;const{visible:v,showHome:m,usePageUrl:h}=null!=i?i:{},y=null!=v?v:!0,b={...this.getState(null==f?void 0:f.buildingContext)},_=this._getChangeType(b,e,this._forceReload||n);let P;if(this._forceReload=!1,_===S){const t=this._getIndex(b.master,e),n=(null===(g=b.master.at(t))||void 0===g?void 0:g.get("id"))||(null===(p=b.masterGroup.at(this._getIndex(b.masterGroup,e)))||void 0===p?void 0:p.get("id"));b.masterSelected=n,P=Promise.resolve(this._updateParentData(b,this._getlastNavigationConfig(b,S))).then((t=>this._getNavigationByChangeType(b,_,e,t)))}else if(_===C)P=this._loadData(e,a,t,o,m,r,h,s).then((t=>{const n={...t,mainMenu:b.mainMenu,tabs:b.tabs},a=this._updateParentData(n,this._getlastNavigationConfig(n,C));return this._getNavigationByChangeType(n,_,e,a)}));else P=this._loadData(e,a,t,o,m,r,h,s).then((t=>this._getNavigationByChangeType(b,_,e,t)));return P.then((e=>{var o,i,s,d,g,p;if(!l.constants.isServerSide&&!e.children)this._saveLastNavigation(e,_);if(!l.constants.isServerSide){const l=(null===(i=null===(o=b.accData)||void 0===o?void 0:o.configuration)||void 0===i?void 0:i.id)?(null===(d=null===(s=b.accData)||void 0===s?void 0:s.configuration)||void 0===d?void 0:d.id)!==(null===(p=null===(g=e.accData)||void 0===g?void 0:g.configuration)||void 0===p?void 0:p.id):!1;if(!e.mainMenu&&y)this._loadSubmenu(e,a,t,r,h,null==f?void 0:f.buildingContext),c.default.declareCommand(D,(()=>{const e=this.getState(null==f?void 0:f.buildingContext);this._loadSubmenu(e,a,t,r,h,null==f?void 0:f.buildingContext)}),!0);else if(y&&(n||l))this._loadSubmenu(e,a,t,r,h,null==f?void 0:f.buildingContext)}if(u.maskResolver.calculateUrlParams("saveAcc=:saveAcc").saveAcc&&(null==b?void 0:b.main))e.main=b.main,e.mainSelected=b.mainSelected;return this.setState(e,null==f?void 0:f.buildingContext),e}))}loadErrback(e){return e.message=`ÐÑибка пÑи вÑполнении меÑода SiteNavigation.ListNew: ${e.message}`,s.Logger.error(e.message),Promise.reject(e)}_getSavedNavigationPromise(e){return(0,r.wrapTimeoutCallback)((()=>d.USER.load([e]).then((t=>JSON.parse(t.get(e)||null)))),b).catch((e=>(s.Logger.error(`Page/loaders:NavigationLoader - couldn't get saved navigation data. \n Error: ${e}`),Promise.resolve(null))))}
183getNavigation(){return this.getState()}async _filterNavigation(e){var t,n;const a={...e};if(e.master){const n=await this._filterHiddenItems(e.master);a.master=(null===(t=n.visibleItems)||void 0===t?void 0:t.getCount())?n.visibleItems:void 0,a.masterHidden=n.hiddenItems}if(e.tabs){const t=await this._filterHiddenItems(e.tabs,!0);a.tabs=(null===(n=t.visibleItems)||void 0===n?void 0:n.getCount())?t.visibleItems:void 0,a.tabsHidden=t.hiddenItems}if(e.main){const t=await this._filterHiddenItems(e.main);a.main=t.visibleItems,a.mainHidden=t.hiddenItems}return a}async _filterHiddenItems(e,t=!1){const i=[];return null==e||e.each((e=>{i.push(async function(e){const t=e.get("hidden"),o=e.get("type");if(o!==S&&o!==C)return{item:e,hidden:t};const i=e.get("handler");if(!i)return{item:e,hidden:t};const[r,s]=i.split(".");return new a.SbisService({endpoint:r}).call(s,{}).then((t=>({item:e,hidden:!t.getScalar()}))).catch((a=>(n.logger.error("ÐÑибка пÑи вÑзове обÑабоÑÑика пÑнкÑа аккоÑдеона "+e.get("id"),a),{item:e,hidden:t})))}(e))})),Promise.all(i).then((n=>{const a=new o.RecordSet({keyProperty:"id",adapter:null==e?void 0:e.getAdapter()}),i=new o.RecordSet({keyProperty:"id",adapter:null==e?void 0:e.getAdapter()});let r=!1;if(t)r=1===n.filter((({hidden:e})=>!1===e)).length;for(const e of n)if(r||e.hidden)i.add(e.item);else a.add(e.item);return{visibleItems:a,hiddenItems:i}}))}}t.default=new A("Navigation");return t.filterNavigationData=(e,t={})=>{if(t&&e){const n=new o.RecordSet({keyProperty:"id",adapter:null==e?void 0:e.getAdapter()});return e.forEach((e=>{if(!1!==t[e.getId()])n.add(e)})),n}return e},t}(0,{},F,c,p,v,D,i,P,I,b,C,g,e,d,C,ve),ye=he,be=function(e,t,n,a,o,i,r,s,l,c,d,u,f,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Singleton=t.getMergedContextData=t.PrefetchLoader=t.GET_CONFIG_TIMEOUT=void 0,Object.defineProperty(t,"getMergedContextData",{enumerable:!0,get:function(){return u.getMergedContextData}});const p="PrefetchLoader",v=n.constants.isServerSide?8e3:6e4;t.GET_CONFIG_TIMEOUT=n.constants.isServerSide?3e3:15e3;const m=["workspace"];class h extends l.BaseLoader{constructor(e={}){let t=null==e?void 0:e.pageId;if(t)t="_"+t;t=p+t,super(t),this._timeout=0,this.IPrefetchLoader=!0,this._loadStartedCallback=null==e?void 0:e.loadStartedCallback}getReceivedData(e,t,n){var a,o,i,r,s,l;const c=this.getState(),d=null===(i=null===(o=null===(a=null==c?void 0:c.prefetchResult)||void 0===a?void 0:a.configs)||void 0===o?void 0:o.root)||void 0===i?void 0:i.configGetterArguments;if(d)d.controllers=n,d.factories=e.factories;let u;if("client"===e.loadType)c.data=this._buildReceivedData(c,e),u={...c,loadDataPromise:this.loadData({...e,data:null===(r=null==c?void 0:c.prefetchResult)||void 0===r?void 0:r.loadResults},void 0,t,n)};else if(c){c.data=this._buildReceivedData(c,e);const a=this._hasTimeoutError(c.data,c.configError);if(null===(l=null===(s=null==c?void 0:c.prefetchResult)||void 0===s?void 0:s.configs)||void 0===l?void 0:l.prefetch){const e=[...c.prefetchResult.configs.prefetch.configGetterArgumentsArray],a=3;e[2]=t,e[a]=n,c.prefetchResult.configs.prefetch.configGetterArgumentsArray=e}if(a)u={...c,loadDataPromise:this.reloadFallenData(e,c,t)};else u=this._getReceivedData(e,c,t)}else u=Promise.resolve(this._createResultObject({}));return this._initCustomLoaders(e.factories),u}_initCustomLoaders(e={}){Object.values(e).forEach((e=>{var t;if("Page/loaders:LoaderCompatible"===e.dataFactoryName){const n=e.dataFactoryArguments.module,a=r.loadSync(n);null===(t=a.init)||void 0===t||t.call(a)}}))}_buildReceivedData(e){const t={};return Object.keys(null==e?void 0:e.configsData).forEach((n=>{var a;t[n]={...null==e?void 0:e.configsData[n],prefetchResult:null===(a=e.prefetchResult.loadResults.prefetch)||void 0===a?void 0:a[n]}})),t}_getReceivedData(e,t){const n=t.data;return this._iteratePreloadData(n,(e=>{const t=e.prefetchResult;if("list"===(null==t?void 0:t.type)||(null==t?void 0:t.source)&&null===t.sourceController){const e=t.source instanceof i.PrefetchProxy?t.source.getOriginal():t.source;if(t.sourceController=new a.NewSourceController({...t,source:e}),t.source instanceof i.PrefetchProxy){const e=t.source.getData();if(e&&e.query instanceof s.RecordSet)t.sourceController.setItems(e.query)}if(t.filterController&&t.filterButtonSource)t.filterButtonSource=t.filterController.getFilterButtonItems()}})),this._initSingletons(t),this._iteratePreloadData(n,(e=>{if(e.afterLoadCallback&&!(e.prefetchResult instanceof Error)){r.loadSync(e.afterLoadCallback)(e.prefetchResult)}})),{...this._createResultObject(n,t.configError),prefetchResult:t.prefetchResult}}_initSingletons(e){var t,n,a;const o=null===(a=null===(n=null===(t=null==e?void 0:e.prefetchResult)||void 0===t?void 0:t.loadResults)||void 0===n?void 0:n.root)||void 0===a?void 0:a.applicationSettings;if(o&&!d.default.isInit())d.default.setState(o)}async load(e,t,a,o){if(n.constants.isServerSide&&"client"===e.loadT
183ype)return this._loadData({...e,configLoader:void 0},a,o,t);else return this._loadData(e,a,o,t)}async _loadData(e,t,a,o){var i,s,l,d,f,p,m,h,b,S,C,_,P;const D=await(0,u.resolvePageDataContext)(e,t),{contextDescription:A,contextConfig:I,contextConfigArguments:x,contextData:R}=D,L=g.query.get.mockBLMethods?await y(Object.keys(e.factories||{})):void 0,O={...e.factories},F=e.prefetchFactoryDependencies||[],w=e.currentPrefetchResult;if(A.length){if(O.hotkeys)F.push("hotkeys");if(A.find((e=>"CurrentAccount"===e.name)))F.push("userInfo")}if(e.configLoader)O.prefetchModules={dataFactoryName:"Page/loaders:PrefetchModules",dataFactoryArguments:{configLoader:e.configLoader}},F.push("prefetchModules");const M={formFactory:null===(i=e.factories)||void 0===i?void 0:i.formFactory,addButtonFactory:this._prepareAddButtonFactory(null===(s=e.factories)||void 0===s?void 0:s.addButtonFactory,F),sitesRender:null===(l=e.factories)||void 0===l?void 0:l.sitesRender,dashboardData:e._dashboardFactory,metaFactory:null===(d=e.factories)||void 0===d?void 0:d.metaFactory,metaDataFactory:null===(f=e.factories)||void 0===f?void 0:f.metaDataFactory,metaCanonicalFactory:null===(p=e.factories)||void 0===p?void 0:p.metaCanonicalFactory},j={root:{configGetter:"Page/loaders:RootDataConfigGetter",priority:1,configGetterArguments:{forceReload:e.forceReload,factories:O,contextDescription:A,contextConfig:I,contextConfigArguments:x,controllers:a,prefetchKeys:Object.keys(M)},data:L||(null===(m=e.data)||void 0===m?void 0:m.root)},prefetch:{configGetter:"Page/loaders:BaseConfigGetter",priority:2,[c.CONTEXT_DATA_CONFIG_FIELD]:{fields:A,bindings:void 0},configGetterArgumentsArray:[{...e.configLoaderArguments,...e.preloadOptions,dashboards:o&&"dashboards"in o?o.dashboards:void 0,originalConfigLoader:e.configLoader,formMethodConfig:e._formMethodConfig,factories:M,controllers:a,contextDescription:A,contextConfig:I,contextConfigArguments:x,contextData:R,contextActions:null===(h=e.pageContext)||void 0===h?void 0:h.contextActions,currentResults:null===(b=null==w?void 0:w.loadResults)||void 0===b?void 0:b.prefetch},{groupId:e.scopeId,scopeId:e.scopeId,isAdaptive:e.isAdaptive,adaptiveMode:e.adaptiveMode},t,a],parentId:"root",rootDependencies:F,data:L||(null===(S=e.data)||void 0===S?void 0:S.prefetch)}},E=Date.now(),{Loader:N}=await r.loadAsync("Controls-DataEnv/dataLoader"),T=await N.loadByConfigs(j,e.loadDataTimeout||v,t,!0,this._loadStartedCallback);if(L){const e=Date.now()-E,t=Number(g.query.get.timeout)||50;if(e<t)await new Promise((n=>setTimeout(n,t-e)))}if(null===(C=T.loadResults)||void 0===C?void 0:C.prefetch.configError)T.configs.prefetch.error=T.loadResults.prefetch.configError;if(n.constants.isServerSide)this._setReceivedData(T);return{data:this._prepareReceivedData(T.loadResults.prefetch,T.dataConfigs.prefetch)||{},configError:null===(P=null===(_=null==T?void 0:T.configs)||void 0===_?void 0:_.prefetch)||void 0===P?void 0:P.error,prefetchResult:{...T,dataConfigs:null}}}_prepareAddButtonFactory(e,t){if(e)return{...e,dependencies:this._getBaseDependencies(e.dependencies,t)}}_getBaseDependencies(e=[],t=[]){return e.filter((e=>!t.includes(e)))}_buildOldFormat(e){return{configs:{root:{...e.root,children:void 0,data:void 0},prefetch:{...e.root.children.prefetch,data:void 0}},dataConfigs:{},loadResults:{root:e.root.data,prefetch:e.root.children.prefetch.data}}}_setReceivedData(e){var t,n,a,o,i,r;const s=(0,f.clone)(e.configs);null===(n=null===(t=null==s?void 0:s.root)||void 0===t?void 0:t.configGetterArguments)||void 0===n||delete n.factories,null===(o=null===(a=null==s?void 0:s.root)||void 0===a?void 0:a.configGetterArguments)||void 0===o||delete o.controllers;const l={configError:null===(r=null===(i=null==e?void 0:e.configs)||void 0===i?void 0:i.prefetch)||void 0===r?void 0:r.error,prefetchResult:{...e,configs:s,dataConfigs:null},configsData:this._prepareReceivedData({},e.dataConfigs.prefetch)};this.setState(l)}_prepareReceivedData(e={},t={}){const n={};return Object.keys(t).forEach((a=>{var o;n[a]={key:t[a].key||a,prefetchResult:e[a],dependentArea:t[a].dependentArea||(null===(o=t[a].dataFactoryArguments)||void 0===o?void 0:o.dependentArea)||m,afterLoadCallback:t[a].afterLoadCallback}})),n}_iteratePreloadData(e,t){Object.keys(e).forEach((n=>{t(e[n],n)}))}_filterDataFunction(e){const t={};return Object.keys(e).forEach((n=>{const a=e[n],i=this._getError(a);if((null==i?void 0:i.status)!==o.HTTPStatus.GatewayTimeout)t[n]=a})),t}_createResultObject(e,t=null,n=!1){return{data:e,configError:t,isSync:n}}_hasTimeoutError(e,t){let n=(null==t?void 0:t.status)===o.HTTPStatus.GatewayTimeout;if(e)this._iteratePreloadData(e,(e=>{const t=this._getError(e.prefetchResult);n=n||(null==t?void 0:t.status)===o.HTTPStatus.GatewayTimeout}));return n}_getError(e){if((null==e?void 0:e.error)instanceof Error)return e.error;if(e instanceof Error)return e;else return null}reloadFallenData(e,t,n){const a={root:{children:{prefetch:{...null==t?void 0:t.prefetchResult.configs.prefetch,data:this._filterDataFunction(null==t?void 0:t.prefetchResult.loadResults.prefetch)}},...null==t?void 0:t.prefetchResult.configs.root,data:this._filterDataFunction(null==t?void 0:t.prefetchResult.loadResults.root)}};return r.loadAsync("Controls-DataEnv/dataLoader").then((({DataContextLoader:t})=>new t({configs:a,router:n,loadTimeout:e.loadDataTimeout||v}).load())).then((e=>({configError:t.configError,data:this._prepareReceivedData(e.root.children.prefetch.data,t.data),isSync:t.isSync,prefetchResult:{configs:t.prefetchResult.configs,loadResults:{prefetch:e.root.children.prefetch.data,root:e.root.data}}})))}}t.PrefetchLoader=h;const y=async function(e){return(await r.loadAsync("Page/mocks")).getDemoData(e)};return t.Singleton=new h(p),t}(0,{},P,A,O,c,t,p,C,L,ve,k,d,F),Se=be,Ce=function(e,t,n,a,o,i){"use strict";
183Object.defineProperty(t,"__esModule",{value:!0}),t.createControllers=void 0;return t.createControllers=({buildingContext:e,Router:t,scope:r,mainPageId:s})=>{const l=new n.ControllerClass(e),c=new a.ApplicationSettingsController({buildingContext:e}),d=new i.NavigationControllerClass({buildingContext:e,scope:r,Router:t,mainPageId:s});if("default"===e)n.Controller.setController(l),o.default.setController(c),i.NavigationController.setController(d);return{ApplicationSettingsController:c,NavigationController:d,ViewSettingsController:l,buildingContext:e}},t}(0,{},n,ge,ve,C),_e=Ce,Pe=function(e,t,n,a,o,i,r,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.afterLoadCallback=t.ApplicationSettingsSlice=void 0;class c extends n.Slice{_initState(e,t){if(!a.default.isInit())a.default.setState(e);return{...e,_mergedSettings:this._getMergedSettings(e,t.layoutSettings),_layoutSettings:t.layoutSettings}}_getMergedSettings(e,t){var n,a,o,i;const r={...e.interfaceSettings,...t.interfaceSettings};return{sidebarSettings:r,floatingAreaConfig:t.floatingAreaConfig||(null===(n=e.interfaceSettings)||void 0===n?void 0:n.floatingAreaConfig),logo:t.logo||(null===(a=e.logo)||void 0===a?void 0:a.logo),logoType:t.logoType||(null===(o=e.logo)||void 0===o?void 0:o.logoType),favicon:t.favicon||(null===(i=e.logo)||void 0===i?void 0:i.favicon),contentLogo:t.contentLogo||e.logoContent,noticeCenterConfig:!1!==r.noticeCenterVisible?t.noticeCenterConfig:null,quickAddSource:t.quickAddSource||e.quickAddSource,quickAddSettings:t.quickAddSettings||e.quickAddSettings}}getFinalValue(e){return this.state._mergedSettings[e]}get(e){return(this.state||{})[e]}_getInterfaceSettings(){var e;return{...this.state.interfaceSettings,...null===(e=this.state._layoutSettings)||void 0===e?void 0:e.interfaceSettings}}}return t.ApplicationSettingsSlice=c,t.default={loadData(e){if(a.default.isInit(e._buildingContext))return Promise.resolve({...a.default.getState(e._buildingContext),_buildingContext:e._buildingContext});if(!e.callBlMethod){const t={...e.additionalData||{},_buildingContext:e._buildingContext};return(0,s.createBaseHeadTags)({links:(0,r.getHeadLinksByApplication)(t)}),Promise.resolve(t)}return function(e){var t,n;const a=(0,l.getStore)("ApplicationSettings_load_promise"),r=`value_${e._buildingContext}`,s=a.get(r);if(s)return a.remove(r),s;const c=new o.SbisService({endpoint:"SettingsInterface"}).call("GetSettingsByAppId",{appId:(null===(t=e.additionalData)||void 0===t?void 0:t.applicationId)||null,scopeId:(null===(n=e.additionalData)||void 0===n?void 0:n.scopeId)||null}).then((e=>(0,i.factory)(e.getRow()).toObject()));return a.set(r,c),c}(e).then((t=>{const n={...e.additionalData||{},...t,_buildingContext:e._buildingContext,_isPreload:e.isPreload};return(0,s.createBaseHeadTags)({links:(0,r.getHeadLinksByApplication)(n)}),n}))},slice:c},t.afterLoadCallback=function(e){if(!e.isPreload)a.default.setState(e,e._buildingContext)},t}(0,{},x,ve,c,v,C,m,F),De=Pe,Ae=function(e,t,n,a,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.afterLoadCallback=void 0;class r extends n.Slice{_initState(e,t){if(!a.default.isInit())a.default.setState(e);if(e.mainMenu)return e;else return a.default.getReceivedData(t,void 0,{buildingContext:t._buildingContext||"default"})}}return t.default={loadData(e,t,n){var r;const s=function({context:e,contextConfigArguments:t}){if(null==e?void 0:e.length)return(0,i.getContextRs)(e,t)}(e.contextData);return a.default.load({...e,layoutInterfaceSettings:{...null===(r=t.applicationSettings)||void 0===r?void 0:r.sidebarSettings,...e.layoutInterfaceSettings},context:s},void 0,n,{buildingContext:e._buildingContext}).then((t=>{const n=[];if(null==t?void 0:t.tabs)n.push((0,o.loadAsync)("Controls-Layout/routingTabs:Buttons")),n.push((0,o.loadAsync)("Controls/tabs"));if(null==t?void 0:t.master)n.push((0,o.loadAsync)("SabyPage/widgets/MasterView"));return Promise.all(n).then((()=>({...t,buildingContext:e._buildingContext})))})).catch((e=>(e.message=`ÐÑибка пÑи вÑполнении меÑода SiteNavigation.ListNew: ${e.message}`,Promise.reject(e))))},slice:r},t.afterLoadCallback=function(e){a.default.setState(e,e.buildingContext)},t}(0,{},x,he,t,$),Ie=Ae,xe=function(e,t,n,a,o,i,r){"use strict";function s({configLoaderResult:e,baseGetterArguments:t,configError:n,Router:a}){var o,i,s;const c=function(e){if(e instanceof Array)return e.reduce(((e,t,n)=>(e[n]=t,e)),{});else return{...e}}(e),d=Object.keys(c),{factories:u={},contextDescription:f=[],contextConfig:g,contextConfigArguments:p,contextData:v,contextActions:m,currentResults:h}=t,{formFactory:y,addButtonFactory:b,sitesRender:S,metaFactory:C,metaDataFactory:_,metaCanonicalFactory:P}=u,D=f.filter((e=>!c[e.name]));if(y)c.formFactory=l(y,d);const A=[];
183if(_)c.metaDataFactory={..._},A.push("metaDataFactory");if(P){const e=[...d];if(y)e.push("formFactory");c.metaCanonicalFactory={...P,dependencies:e},A.push("metaCanonicalFactory")}if(C){const e=C.dependencies||[];c.metaFactory={...C,dependencies:e.concat(A)}}if(b){const e=(b.dependencies||[]).concat(b.factoryDependencies||[]);c.addButtonFactory=l(b,d,e)}if(S)if(c.sitesRender={...S},g)c.sitesRender.dataFactoryArguments.contextConfig=g,c.sitesRender.dataFactoryArguments.contextConfigArguments=p;if(n)c.configError={loadDataMethod:()=>n};if(D.length)c.context={dataFactoryName:"Page/loaders:ContextFactory",dataFactoryArguments:{context:D,contextArgs:t.contextConfigArguments,contextData:v,currentResults:h}},D.forEach((e=>{c[e.name]={dataFactoryName:"Page/loaders:PageAppObject",dataFactoryArguments:{name:e.name},dependencies:["context"]}}));if(f.length)c[r.DEFAULT_FORM_SLICE_NAME]={dataFactoryName:"Controls-DataEnv/dataFactory:NewFactory",dataFactoryArguments:{...m,router:a}};const I=null===(o=t.factories)||void 0===o?void 0:o.dashboardData;if(I){const e=f.map((e=>e.name)).filter((e=>e in c));c.dashboardData={...I,dataFactoryArguments:{...I.dataFactoryArguments,loadedData:null===(s=null===(i=t.dependenciesData)||void 0===i?void 0:i.dashboards)||void 0===s?void 0:s.contentDashboard,contextDescription:f,controllers:t.controllers},dependencies:Array.from(new Set([...I.dependencies||[],...e]))}}return c}function l(e,t,n){return function(e,t=[],n=[]){var a;if(null===(a=e.dependencies)||void 0===a?void 0:a.includes("prefetch"))e.dependencies=t;else e.dependencies=n}(e,t,n),{...e}}return Object.defineProperty(t,"__esModule",{value:!0}),t.default={getConfig(e,{scopeId:t,isAdaptive:r,adaptiveMode:l},c,d){var u,f;if(e.workspaceErrorConfig)return(null===(u=e.factories)||void 0===u?void 0:u.formFactory)?{formFactory:{...null===(f=e.factories)||void 0===f?void 0:f.formFactory,dependencies:[]}}:{};if(!e.originalConfigLoader)return s({configLoaderResult:{},baseGetterArguments:e,Router:c});const g=n.loadSync(e.originalConfigLoader).getConfig({...e,currentResults:void 0,factories:void 0},{groupId:t,scopeId:t,isAdaptive:r,adaptiveMode:l},c,d);if(!((p=g)&&p instanceof Promise))return s({configLoaderResult:g,baseGetterArguments:e,Router:c});else return(0,o.wrapTimeout)(g.then((t=>s({configLoaderResult:t,baseGetterArguments:e,Router:c}))),a.GET_CONFIG_TIMEOUT).catch((t=>(i.logger.error(`ÐÑибка пÑи полÑÑении конÑигÑÑаÑии пÑедзагÑÑзки из ${e.originalConfigLoader}. \n Error: ${t}`),s({configLoaderResult:{},baseGetterArguments:e,configError:t,Router:c}))));var p}},t}(0,{},t,be,D,F,R),Re=xe,Le=function(e,t,n,a,o,i){"use strict";function r(e){if(!e.configLoaderArguments||e.configLoaderArguments instanceof Object)return{...e.configLoaderArguments,...e.preloadOptions};else return i.Logger.error("Page/loaders:PrefetchConfigLoader: в pagex в поле prefetchConfig.configLoaderArguments бÑл пеÑедан не обÑекÑ!"),e.configLoaderArguments}function s(e,t,n){return{config:(0,a.loadSync)(e.configLoader).getConfig(r(e),{groupId:e.scopeId,scopeId:e.scopeId,isAdaptive:e.isAdaptive,adaptiveMode:e.adaptiveMode},t,n),isSync:!0}}function l(e,t,s){return Promise.resolve(function(e,t){if((0,a.isLoaded)(e)){const n=(0,a.loadSync)(e);return t(n)}else return(0,a.loadAsync)(e).then((e=>t(e)))}(e.configLoader,(a=>{if("function"==typeof a.getConfig)return(0,o.wrapTimeoutCallback)((()=>{let n;const o=a.getConfig(r(e),{groupId:e.scopeId,scopeId:e.scopeId,isAdaptive:e.isAdaptive,adaptiveMode:e.adaptiveMode},t,s);if(o instanceof Promise)i.Logger.warn(`ÐÑинÑ
ÑоннÑй getConfig в модÑле ${e.configLoader}.ÐеобÑ
одимо оÑказаÑÑÑÑ Ð¾Ñ Ð¸ÑполÑÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ð°ÑинÑ
Ñонного getConfig в пÑедзагÑÑзке. Ðожно наÑÑÑоиÑÑ Ð·Ð°Ð²Ð¸ÑимоÑÑÑ Ð¼ÐµÐ¶Ð´Ñ ÑлеменÑами пÑедзагÑÑзки Ñ Ð¿Ð¾Ð¼Ð¾ÑÑÑ Ð¿Ð¾Ð»Ñ dependencies. ÐодÑобнее: https://wi.sbis.ru/doc/platform/developmentapl/interface-development/application-configuration/create-page/accordion/content/prefetch-config/`),n=Promise.resolve(o).then((e=>({config:e,isSync:!1})));else n={config:o,isSync:!0};return n}),n.GET_CONFIG_TIMEOUT).then((({config:e,isSync:t})=>({config:e,isSync:t}))).catch((t=>(i.Logger.error(`ÐÑибка пÑи полÑÑении конÑигÑÑаÑии пÑедзагÑÑзки из ${e.configLoader}. \n Error: ${t}`),{error:t})));else i.Logger.error(`ÐодÑÐ»Ñ ${e.configLoader} должен ÑеализоваÑÑ Ð¼ÐµÑод getConfig`)})))}function c(e,t,n,a){return n?s(e,t,a):l(e,t,a)}
183return Object.defineProperty(t,"__esModule",{value:!0}),t.callGetConfig=t.callGetConfigAsync=t.callGetConfigSync=t.getConfig=void 0,t.getConfig=function({prefetchConfigList:e,dashboards:t}={},{scopeId:n,isAdaptive:a,adaptiveMode:o},i,r){const s=[];return e.forEach((e=>{const l=Promise.resolve(c({...{...e,configLoaderArguments:{...e.configLoaderArguments,dashboards:t}},scopeId:n,isAdaptive:a,adaptiveMode:o},i,void 0,r)).then((e=>(null==e?void 0:e.config)||{}));s.push(l)})),Promise.all(s).then((e=>{let t={},n=[];return e.forEach((e=>{if(e instanceof Array)n=n.concat(e);else t={...t,...e}})),n.forEach(((e,n)=>{t[n]=e})),t}))},t.callGetConfigSync=s,t.callGetConfigAsync=l,t.callGetConfig=c,t}(0,{},be,t,D,i),Oe=Le,M.PrefetchModules=M.HotKeysSlice=M.HotKeys=M.LoaderCompatible=M.PageAppObject=M.StatisticsSlice=M.Statistics=M.ConfigurationVisibility=M.ContextFactory=M.FeatureCompatible=M.ActiveTheme=M.Dashboards=M.ApplicationSettingsLoadCallback=M.ApplicationSettingsFactory=M.ApplicationSettingsSlice=M.NavigationLoadCallback=M.Navigation=M.PermissionLoadCallback=M.PermissionSlice=M.Permission=M.MetaCanonical=M.MetaData=M.Meta=M.createControllers=M.ApplicationSettingsController=M.ApplicationSettings=M.ApplicationSettingsLoader=M.BaseConfigGetter=M.RootDataConfigGetter=M.isErrorCallback=M.PrefetchConfigLoader=M.getMergedContextData=M.PrefetchLoaderClass=M.PrefetchLoader=M.filterNavigationData=M.NavigationLoader=M.FeatureLoader=void 0,Object.defineProperty(M,"FeatureLoader",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(M,"NavigationLoader",{enumerable:!0,get:function(){return ye.default}}),Object.defineProperty(M,"filterNavigationData",{enumerable:!0,get:function(){return ye.filterNavigationData}}),Object.defineProperty(M,"PrefetchLoader",{enumerable:!0,get:function(){return Se.Singleton}}),Object.defineProperty(M,"PrefetchLoaderClass",{enumerable:!0,get:function(){return Se.PrefetchLoader}}),Object.defineProperty(M,"getMergedContextData",{enumerable:!0,get:function(){return Se.getMergedContextData}}),M.PrefetchConfigLoader=Oe,Object.defineProperty(M,"isErrorCallback",{enumerable:!0,get:function(){return fe.isErrorCallback}}),Object.defineProperty(M,"RootDataConfigGetter",{enumerable:!0,get:function(){return B.default}}),Object.defineProperty(M,"BaseConfigGetter",{enumerable:!0,get:function(){return Re.default}}),Object.defineProperty(M,"ApplicationSettingsLoader",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(M,"ApplicationSettings",{enumerable:!0,get:function(){return me.default}}),Object.defineProperty(M,"ApplicationSettingsController",{enumerable:!0,get:function(){return pe.ApplicationSettingsController}}),Object.defineProperty(M,"createControllers",{enumerable:!0,get:function(){return _e.createControllers}}),Object.defineProperty(M,"Meta",{enumerable:!0,get:function(){return ee.Meta}}),Object.defineProperty(M,"MetaData",{enumerable:!0,get:function(){return ee.MetaData}}),Object.defineProperty(M,"MetaCanonical",{enumerable:!0,get:function(){return ee.MetaCanonical}}),Object.defineProperty(M,"Permission",{enumerable:!0,get:function(){return ne.default}}),Object.defineProperty(M,"PermissionSlice",{enumerable:!0,get:function(){return ne.PermissionSlice}}),Object.defineProperty(M,"PermissionLoadCallback",{enumerable:!0,get:function(){return ne.afterLoadCallback}}),Object.defineProperty(M,"Navigation",{enumerable:!0,get:function(){return Ie.default}}),Object.defineProperty(M,"NavigationLoadCallback",{enumerable:!0,get:function(){return Ie.afterLoadCallback}}),Object.defineProperty(M,"ApplicationSettingsSlice",{enumerable:!0,get:function(){return De.ApplicationSettingsSlice}}),Object.defineProperty(M,"ApplicationSettingsFactory",{enumerable:!0,get:function(){return De.default}}),Object.defineProperty(M,"ApplicationSettingsLoadCallback",{enumerable:!0,get:function(){return De.afterLoadCallback}}),Object.defineProperty(M,"Dashboards",{enumerable:!0,get:function(){return le.default}}),Object.defineProperty(M,"ActiveTheme",{enumerable:!0,get:function(){return H.default}}),Object.defineProperty(M,"FeatureCompatible",{enumerable:!0,get:function(){return Q.default}}),Object.defineProperty(M,"ContextFactory",{enumerable:!0,get:function(){return q.default}}),Object.defineProperty(M,"ConfigurationVisibility",{enumerable:!0,get:function(){return re.default}}),Object.defineProperty(M,"Statistics",{enumerable:!0,get:function(){return de.default}}),Object.defineProperty(M,"StatisticsSlice",{enumerable:!0,get:function(){return de.StatisticsSlice}}),Object.defineProperty(M,"PageAppObject",{enumerable:!0,get:function(){return K.PageAppObject}}),Object.defineProperty(M,"LoaderCompatible",{enumerable:!0,get:function(){return Y.default}}),Object.defineProperty(M,"HotKeys",{enumerable:!0,get:function(){return W.default}}),Object.defineProperty(M,"HotKeysSlice",{enumerable:!0,get:function(){return W.HotKeysSlice}}),Object.defineProperty(M,"PrefetchModules",{enumerable:!0,get:function(){return oe.default}}),M})); 184define("Permission/access",["react/jsx-runtime","react","UI/Base","Types/source","Types/object","Types/entity","Env/Env","Core/PromiseLib/PromiseLib","Compiler/IR","Application/Env","require","exports"],(function(e,t,s,r,i,n,a,o,l,u,c,d){var f,_,S,A,g,E,h,M,O,I,m,D,P,C,R,L,p,K,N,y,v,w,b;return Object.defineProperty(d,"__esModule",{value:!0}),f=function(e,t,s){"use strict";var r;
184return Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.ACCESS_WRITE=2,e.ACCESS_READ=1,e.ACCESS_DENIED=0,e.DENIED_MASK=0,e.SUB_ALLOW_MASK=1,e.READ_MASK=2,e.WRITE_MASK=4,e.ADMIN_MASK=8,e.MODIFY_MASK=e.READ_MASK|e.WRITE_MASK,e.ALLOW_MASK=e.READ_MASK|e.WRITE_MASK|e.ADMIN_MASK,e.FULL_CONTROL=e.READ_MASK|e.WRITE_MASK|e.ADMIN_MASK|e.SUB_ALLOW_MASK,e.IS_PRESENTATION_SERVICE=!s.constants.isBrowserPlatform,e.ACCESS_HASH="access_hash",e.FAKE_HASH="fake_hash",e.PERMISSION_ACCESSS_UUID="PermissionAccessData",e.PERMISSION_STORAGE_KEY="permissionStorage",e.STORE_KEY="value",e.PERMISSION_ENABLED=!1,e.ZONE_DENIED={flags:e.ACCESS_DENIED,restrictions:{}},e.ZONE_FLAG_DENIED={flags:e.ACCESS_DENIED}}(r||(r={})),t.default=r,t}(0,{},a),_=f,S=function(e){"use strict";var t=["_access","_readOnly","content","_options"];return e.g({v:1,m:"wml!Permission/_access/Container/Container",t:[e.r(((e,t)=>[e.m(t,0)?[e.P(t,e.m(t,1),{K:"0_0_",O:{readOnly:e.m(t,2)},m:"attribute",c:!0})]:[e.g(t,"invisible-node",{K:"1_0_",r:!0,c:!0})]]))],p:t.slice(0,2),e:[(e,s)=>e.g(s,[t[0]]),(e,s)=>e.g(s,[t[3],t[2]]),(e,s)=>e.g(s,[t[1]])]})}(l),A=function(e){"use strict";var t=["content","_options"];return e.g({v:1,m:"wml!Permission/_access/Controller",t:[e.r(((e,t)=>[e.P(t,e.m(t,0),{K:"0_",m:"attribute",c:!0})]))],e:[(e,s)=>e.g(s,[t[1],t[0]])]})}(l),g=function(e,t,s,r,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=i.default.STORE_KEY;return t.default=new class{init(){if(!this.isInit()){this.setState(null);(0,s.getStateReceiver)().register(i.default.PERMISSION_ACCESSS_UUID,this)}}getState(){return(0,s.getStore)(i.default.PERMISSION_ACCESSS_UUID).get(a)}setState(e){(0,s.getStore)(i.default.PERMISSION_ACCESSS_UUID).set(a,e)}loadData(e){return(0,n.wrapTimeoutCallback)((()=>{if(e)return this.setState(e),e;else return new r.SbisService({endpoint:"CheckRights"}).call("AccessAreasJSON").then((e=>{const t=e.getScalar();return this.setState(t),t}))}),5e3).catch((e=>(e.message=`ÐÑибка пÑи вÑполнении меÑода SiteNavigation.ListNew: ${e.message}`,Promise.reject(e))))}isInit(){return void 0!==this.getState()}static getStore(){return(0,s.getStore)(i.default.PERMISSION_ACCESSS_UUID).get(a)}static setStore(e){(0,s.getStore)(i.default.PERMISSION_ACCESSS_UUID).set(a,e)}},t}(0,{},u,r,f,o),E=g,h=function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e=0){this.flags=e}_getFlags(){return this.flags}isModify(){return!!(this._getFlags()&s.default.WRITE_MASK)}isRead(){return!!(this._getFlags()&s.default.READ_MASK)}},t}(0,{},f),M=function(e,t,s){"use strict";return new class{getRights(){return window?window.rights:null}hasPermission(){const e=this.getRights();return e?!!Object.keys(e).length:!1}get(e){const t=this.getRights();if(t){const r=t[e];if(!r)return s.default.ZONE_DENIED;else return{flags:r.flags?r.flags:r,restrictions:r.restrictions?r.restrictions:{}}}return s.default.ZONE_DENIED}}}(0,0,f),O=function(e,t,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e,t=!0){this.rawData=e,this.enabledPermission=t}get(e){const t=!this.enabledPermission?r.default.MODIFY_MASK:this.rawData[e]||r.default.ACCESS_DENIED;return new s.default(t)}each(e){for(const t in this.rawData)if(this.rawData.hasOwnProperty(t))e(t,!this.enabledPermission?r.default.MODIFY_MASK:this.rawData[t])}},t}(0,{},h,f),I=function(e,t,s,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends s.Control{constructor(){super(...arguments),this._template=i}_beforeMount(){if(!r.default.isInit())r.default.init()}}return t.default=n,t}(0,{},s,g,A),m=I,D=function(e,t,s,r){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.loadPermissionData=void 0,t.loadPermissionData=function(e){return r.default.init(),r.default.loadData().then((()=>e)).catch((t=>(s.logger.error("ÐÑибка пÑи загÑÑзке даннÑÑ
в Permission/access.data; ÐÑибка: "+t.message),e)))},t}(0,{},u,g),P=D,C=function(e,t,s,r,i){"use strict";
184Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e,t=!0){this.enabledPermission=t,this.flags=!t?s.default.FULL_CONTROL:e.flags,this.restrictions=e.restrictions||{}}getValueAccess(e){return!!(this.flags&e)}isModify(){return this.getValueAccess(s.default.WRITE_MASK)}isRead(){return this.getValueAccess(s.default.READ_MASK)}isFullControl(){return this.getValueAccess(s.default.ADMIN_MASK)}isDenied(){return!this.getValueAccess(s.default.ALLOW_MASK)}isPartial(){return this.getValueAccess(s.default.SUB_ALLOW_MASK)}getConstraints(){return new i.default(this.restrictions,this.enabledPermission)}getRestriction(e){const t=!this.enabledPermission?s.default.MODIFY_MASK:this.restrictions[e]||s.default.ACCESS_DENIED;return new r.default(t)}},t}(0,{},f,h,O),R=function(e,t,s,r,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class a{get(e){const t=r.default.getState();return e.map((e=>{if(n.hasPermission())return new i.default(n.get(e));if(!t)return new i.default({flags:null,restrictions:{}},!1);if(t[e])return new i.default(t[e]);else return new i.default(s.default.ZONE_DENIED)}))}checkRights(e,t,s){if(-1===["Read","Modify","FullControl"].indexOf(s))return!1;const r=`is${s}`;let i=!0;const n=this.get(e),a=e=>{if(11===t||1===t)return e.isPartial();else return e[r]()};if(n.length)i=11===t||10===t?n.every(a):n.some(a);return i}static getChildren(e){var t;if(Array.isArray(e)){let t=[];return e.forEach((e=>{t=t.concat(a.getChildren(e))})),t}const s=r.default.getState(),i=[];for(const r of Object.keys(s)){if(null===(t=s[r].parent)||void 0===t?void 0:t.some((t=>t===e)))i.push(r)}return i.concat(a.getChildren(i))}}return t.default=new a,t}(0,{},f,g,C,M),L=R,p=function(e,t,s,r,i,n){"use strict";return{ALLOW_MASK:1,READ_MASK:2,WRITE_MASK:4,ADMIN_MASK:8,getMaxAccess(e){let t=0;if(!(r.default.getState()||(n.constants.isBrowserPlatform&&window.rights&&Object.keys(window.rights).length?window.rights:!1)))t=i.default.FULL_CONTROL;else for(let r=0,i=e.length;r<i;r++){let i,n,a,o,l,u=e[r];if(u="string"==typeof u?u.trim():u,o=this._parseZoneName(u),i=o.zone,n=o.restrictions,[a]=s.default.get([i]),l=a.flags,!n)t|=l;else t|=a.getRestriction(n).flags}return t},cutRestriction(e){const t=[];for(let s=0,r=e.length;s<r;s++)t.push(e[s].split("|")[0]);return t},_parseZoneName(e){const t=e.split("|");return{zone:t[0],restrictions:t[1]}}}}(0,0,R,g,f,a),K=function(e,t,s,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=new class{require(e){return s.IoC.resolve("ILogger").warn("Permission/_access/Loader","ÐеÑод require ÑÑÑаÑел и в ÑкоÑом вÑемени пеÑеÑÑÐ°Ð½ÐµÑ Ð¿Ð¾Ð´Ð´ÐµÑживаÑÑÑÑ. ÐÐ»Ñ Ð¿Ð¾Ð»ÑÑÐµÐ½Ð¸Ñ Ð¿Ñав необÑ
одимо иÑполÑзоваÑÑ ÐºÐ¾Ð¼Ð¿Ð¾Ð½ÐµÐ½Ñ Permission/access:Permission и меÑод get."),new Promise((t=>{t(i.default.get(e))}))}load(e){s.IoC.resolve("ILogger").error("Permission/_access/Loader","ÐеÑод load ÑÑÑаÑел и в ÑкоÑом вÑемени пеÑеÑÑÐ°Ð½ÐµÑ Ð¿Ð¾Ð´Ð´ÐµÑживаÑÑÑÑ. ÐÐ»Ñ Ð¿Ð¾Ð»ÑÑÐµÐ½Ð¸Ñ Ð¿Ñав необÑ
одимо иÑполÑзоваÑÑ ÐºÐ¾Ð¼Ð¿Ð¾Ð½ÐµÐ½Ñ Permission/access:Permission и меÑод get.");const t=new r.Record;return i.default.get(e).forEach(((s,r)=>{t.set(e[r],s)})),new Promise((e=>{e(t)}))}},t}(0,{},a,n,R),N=K,y=function(e,t,s,r,i,n,a,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class l extends s.Control{constructor(){super(...arguments),this._template=o}_beforeMount(e){this._setAccess(e)}_beforeUpdate(e){if(!(0,i.isEqual)(e.area,this._options.area)||e.requiredLevel!==this._options.requiredLevel||e.readOnly!==this._options.readOnly)this._setAccess(e)}_setAccess(e){const t=e.area;let s;switch(e.requiredLevel){case"Modify":s=n.default.WRITE_MASK;break;case"FullControl":s=n.default.ADMIN_MASK}let r=t?a.getMaxAccess(t):n.default.FULL_CONTROL;if(s&&!(s&r)||!(r&n.default.ALLOW_MASK))r=n.default.DENIED_MASK;if(this._access=r,!(this._access&n.default.WRITE_MASK)||e.readOnly)this._readOnly=!0;else this._readOnly=!1}}return l.getOptionTypes=()=>({area:(0,r.descriptor)(Array).required()}),t.default=l,t}(0,{},s,n,i,f,p,S),v=y,w=function(e,t,s,r,i,n){"use strict";
184Object.defineProperty(t,"__esModule",{value:!0});return t.default=r.memo((function(e){const t=r.useMemo((()=>((e,t,s)=>{let r={};const a=e;let o;switch(t){case"Modify":o=i.default.WRITE_MASK;break;case"FullControl":o=i.default.ADMIN_MASK}let l=a?n.getMaxAccess(a):i.default.FULL_CONTROL;if(o&&!(o&l)||!(l&i.default.ALLOW_MASK))l=i.default.DENIED_MASK;if(r.access=l,!(r.access&i.default.WRITE_MASK)||s)r.readOnly=!0;else r.readOnly=!1;return r})(e.area,e.requiredLevel,e.readOnly)),[e.area,e.requiredLevel,e.readOnly]);return t.access?r.cloneElement(e.children,{readOnly:t.readOnly}):(0,s.jsx)(s.Fragment,{})})),t}(0,{},e,t,f,p),b=w,d.loadPermissionData=d.Permission=d.ContainerReact=d.Container=d.Const=d.Loader=d.Controller=d.PermissionLoader=void 0,d.Controller=m.default,d.PermissionLoader=N.default,d.Container=v.default,d.ContainerReact=b.default,d.Loader=E.default,d.Const=_.default,d.Permission=L.default,Object.defineProperty(d,"loadPermissionData",{enumerable:!0,get:function(){return P.loadPermissionData}}),d})); 185define("ViewSettings/controller",["react/jsx-runtime","react","UI/Utils","UI/Events","Types/util","Types/source","Types/object","Types/entity","Feature/feature","Env/Env","EngineUser/Info","Controls/dragnDrop","Controls/Store","Controls/Application/SettingsController","Browser/Transport","Browser/Storage","Application/Env","require","exports","tslib","css!ViewSettings/controller"],(function(t,e,i,n,o,r,s,a,_,d,c,l,h,W,I,g,T,u,N,A){var O,D,C,M,E,f,p,R,S,m,P,H,L,v,b,y,x,w,F;return Object.defineProperty(N,"__esModule",{value:!0}),O=function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Cache=void 0;return e.Cache={getValue(t){const e=this._getValue(t);if(!e)return null;else return Promise.resolve(e)},setValue(t,e){if(e instanceof Promise)e.then((e=>(this._setValue(t,e),e))).catch((()=>{this._setValue(t,void 0)}));this._setValue(t,e)},_getValue(t){const e=this._getKey(t);return(this.store.get(t.applicationId)||{})[e]},_setValue(t,e){const i=this.store.get(t.applicationId);this.store.set(t.applicationId,{...i,[this._getKey(t)]:e})}
185,updateValue(t,e){if(!e)return;const{globalSettings:i,localSettings:n}=this._splitSettings(e),o=this._getValue(t);this._applySettings(o,n),this._applyGlobalSettings(t.applicationId,i)},clearByApplicationId(t){this.store.remove(t)},get store(){return(0,i.getStore)("viewSettings_cache")},_applySettings(t,e){if(t&&!(t instanceof Promise))Object.entries(e).forEach((([e,i])=>{if(void 0!==i&&t.has(e)){const n=t.get(e);t.set(e,n instanceof Object?{...n,...i}:i)}}))},_applyGlobalSettings(t,e){if(0===Object.keys(e).length)return;const i=this.store.get(t)||{};Object.entries(i).forEach((([t,i])=>{this._applySettings(i,e)}))},_splitSettings(t){const e={},i={};return Object.entries(t).forEach((([t,n])=>{if(this._isLocalOption(t))i[t]=n;else e[t]=n})),{globalSettings:e,localSettings:i}},_isLocalOption:t=>["isNoticeVisible","noticeVisibility"].includes(t),_getKey:({url:t})=>t||"default"},e}(0,{},T),D=O,C=function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_NOTICE_MODE=e.M_PORTAL_WIDTH=e.DEFAULT_SETTINGS_RECORD=e.MAX_EXPANDED_ACCORDION_WIDTH=e.ACCORDION_WIDTHS=e.MIN_ACCORDION_WIDTH=e.MIN_EXPANDED_ACCORDION_WIDTH=e.MAX_COMPACT_ACCORDION_WIDTH=e.MAX_ACCORDION_WIDTH=e.MAX_PERCENT_VALUE=e.DEFAULT_MASTER_PERCENT=e.STORE_KEY=e.UID=e.DEFAULT_MIN_WORKSPACE_ADAPTIVE_WIDTH=e.ACCORDION_PANEL_MODE=e.NOTICE_PANEL_PARAM_NAME=e.SAVED_WIDTH_PARAM_NAME=e.MAX_PORTAL_WIDTH=e.WORKSPACE_CORRECTION=e.MIN_RIGHT_PANEL_WIDTH_MAIN=e.MIN_RIGHT_PANEL_WIDTH=e.DEFAULT_MIN_WORKSPACE_WIDTH=e.MIN_WORKSPACE_WIDTH=e.DEFAULT_RIGHT_PANEL_MAX_WIDTH=e.DEFAULT_RIGHT_PANEL_MIN_WIDTH=e.DEFAULT_RIGHT_PANEL_WIDTH=e.DEFAULT_MAX_PORTAL_WIDTH=e.DEFAULT_MIN_PORTAL_WIDTH=e.NOTICE_SHOW_PARAM_NAME=e.WIDTH_PARAM_NAME=e.CLASS_NAME_INCREMENT=e.MIN_WORCSPACE_WIDTH=e.MIN_WIDTH_FOR_S_LAYOUT_NEW=e.MIN_WIDTH_FOR_S_LAYOUT=e.MIN_WIDTH_FOR_M_LAYOUT_NEW=e.MIN_WIDTH_FOR_M_LAYOUT=e.MIN_WIDTH_FOR_L_LAYOUT_NEW=e.MIN_WIDTH_FOR_L_LAYOUT=e.MASTER_COLLAPSED_WIDTH=e.MIN_WIDTH_FOR_MASTER=e.MIN_WIDTH_FOR_NOTICE=e.MIN_RESIZING_OFFSET=e.MIN_PORTAL_WIDTH=e.DEFAULT_NOTICECENTER_MAX_WIDTH=e.DEFAULT_NOTICECENTER_MIN_WIDTH=e.MAX_NOTICE_WIDTH=e.MIN_NOTICE_WIDTH=e.ACCORDION_WIDTH=e.WORKSPACE_CLASS_NAME=e.CONTENT_CLASS_NAME=void 0;e.CONTENT_CLASS_NAME="ws-site-width-";e.WORKSPACE_CLASS_NAME="ws-workspace-width-";e.MAX_EXPANDED_ACCORDION_WIDTH=250;e.MIN_EXPANDED_ACCORDION_WIDTH=200;e.MAX_COMPACT_ACCORDION_WIDTH=100;e.MAX_ACCORDION_WIDTH=250;e.MIN_ACCORDION_WIDTH=56;const n={min:56,max:200};e.ACCORDION_WIDTH=n;const o={min:{min:56,max:100},max:{min:200,max:250}};e.ACCORDION_WIDTHS=o;e.ACCORDION_PANEL_MODE="panel";e.MIN_NOTICE_WIDTH=250;e.MAX_NOTICE_WIDTH=400;e.DEFAULT_NOTICECENTER_MIN_WIDTH=300;e.DEFAULT_NOTICECENTER_MAX_WIDTH=360;e.MIN_PORTAL_WIDTH=1024;e.MIN_RESIZING_OFFSET=200;e.DEFAULT_MIN_PORTAL_WIDTH=1920;e.M_PORTAL_WIDTH=1600;e.DEFAULT_MAX_PORTAL_WIDTH="max";e.MIN_WIDTH_FOR_L_LAYOUT=1632;e.MIN_WIDTH_FOR_L_LAYOUT_NEW=1440;e.MIN_WIDTH_FOR_NOTICE=1400;e.MIN_WIDTH_FOR_MASTER=1280;e.MASTER_COLLAPSED_WIDTH=52;e.MIN_WIDTH_FOR_M_LAYOUT=1200;e.MIN_WIDTH_FOR_M_LAYOUT_NEW=1280;e.MIN_WIDTH_FOR_S_LAYOUT=824;e.MIN_WIDTH_FOR_S_LAYOUT_NEW=768;e.MIN_WORCSPACE_WIDTH=824;e.CLASS_NAME_INCREMENT=64;e.WIDTH_PARAM_NAME="width";e.SAVED_WIDTH_PARAM_NAME="savedWidth";e.MAX_PORTAL_WIDTH="max";e.NOTICE_SHOW_PARAM_NAME="noticeVisibility";e.NOTICE_PANEL_PARAM_NAME="panel";e.MIN_WORKSPACE_WIDTH=772;e.DEFAULT_MIN_WORKSPACE_WIDTH=600;e.DEFAULT_MIN_WORKSPACE_ADAPTIVE_WIDTH=600;e.MIN_RIGHT_PANEL_WIDTH=52;e.MIN_RIGHT_PANEL_WIDTH_MAIN=60;e.DEFAULT_RIGHT_PANEL_WIDTH=52;e.DEFAULT_RIGHT_PANEL_MIN_WIDTH=52;e.DEFAULT_RIGHT_PANEL_MAX_WIDTH=110;e.WORKSPACE_CORRECTION=3;e.UID="viewSettings";e.STORE_KEY="viewSettingsData";e.DEFAULT_MASTER_PERCENT=.27;e.MAX_PERCENT_VALUE=100;const r=new i.Record({rawData:{width:1920,accordion:"max",noticeVisibility:!0,controlSettings:{}}});return e.DEFAULT_SETTINGS_RECORD=r,e.DEFAULT_NOTICE_MODE={l:"page",m:"page",s:"panel",xs:"panel"},e}(0,{},a),M=C,E=C,f=function(t,e,i,n,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getAdditionalPaddings=e.getNoticeMode=e.applySavedWidth=e.applyRightPanelWidth=e.applyNoticeCenterWidth=e.applyNavigationWidth=e.applyAccordionWidth=e.getNavigationWidth=e.getAverageWidth=e.decreaseWidths=e.applyWidth=e.getResultWorkspaceWidth=e.getWidthValue=e.getDefaultMasterWidth=e.getMinPortalWidthForNotice=e.getIsNoticeLeft=e.getMasterWidth=e.getAllowWidth=e.getNoticeMinOffset=e.getAllowNoticeWidth=e.getRightPanelMinWidth=e.getRightPanelWidth=e.getAccordionWidth=e.isNoticeShow=e.isAccordionExpanded=e.convertSavedWidth=e.getLayout=void 0;e.applyWidth=(t,e)=>{let i={};const n=s();if(t.isNoticeLeft){if(e.rightPanelCurrentWidth)n.rightPanelCurrentWidth.params.push("noticeCenterWidth");if(e.noticeCenterWidth)n.noticeCenterWidth.params=["accordionWidth"]}else n.noticeCenterWidth.params=["rightPanelCurrentWidth"];const o=Object.keys(e)[0],a="savedWidth"===o?"width":o,_=t.centerWidth-(e[o]-t[a]);if(_<t.centerWidth)i=T(n[o].params,t,_,r(t));return n[o].method(t,e[o],i)};const r=t=>({accordionWidth:i.ACCORDION_WIDTHS[t.accordion].min,rightPanelWidth:i.MIN_RIGHT_PANEL_WIDTH,noticeCenterWidth:i.MIN_NOTICE_WIDTH}),s=()=>({accordionWidth:{method:_,params:[]},navigationWidth:{method:d,params:[]},noticeCenterWidth:{method:c,params:["rightPanelWidth"]},rightPanelCurrentWidth:{method:l,params:[]},savedWidth:{method:h,params:["accordionWidth","rightPanelWidth","noticeCenterWidth"]}}),a=(t,e)=>{let i={...e,rightPanelWidth:t.rightPanelCurrentWidth,noticeCenterWidth:t.noticeCenterWidth};if((t.masterWidth?t.masterWidth+t.centerWidth:t.centerWidth)<=t.minWorkspaceWidth){const n=e.accordionWidth-t.accordionWidth,o=["rightPanelWidth","noticeCenterWidth"];if(t.isNoticeLeft)o.reverse();const r=g(o,i,n);i={...i,...r}}return i},_=(t,e,n)=>{const o=(i.MIN_EXPANDED_ACCORDION_WIDTH+i.MAX_COMPACT_ACCORDION_WIDTH)/2,r=Number(e);if(n.navigationWidth=u(r,t.accordion,t,!1),n.accordion=r<o?"min":W(n.navigationWidth),n.accordionWidth=r,n.accordionWidth>t.accordionWidth)return a(t,n);if(t.accordion!==n.accordion)n.accordionExpanded="max"===n.accordion;return n};e.applyAccordionWidth=_;const d=(t,e,i)=>{const n=Number(e);if(i.accordion=W(n),i.navigationWidth=n,t.accordionWidth<n)return i.accordionWidth=n,a(t,i);else return i};e.applyNavigationWidth=d;const c=(t,e,n)=>{if(n.noticeCenterWidth=Math.max(Number(e),i.MIN_NOTICE_WIDTH),t.isNoticeLeft)n.rightPanelCurrentWidth=Math.max(t.rightPanelCurrentWidth-(t.noticeCenterWidth-Number(e)),i.MIN_RIGHT_PANEL_WIDTH);else n.rightPanelCurrentWidth=Math.max(t.rightPanelCurrentWidth+(t.noticeCenterWidth-Number(n.noticeCenterWidth)),i.MIN_RIGHT_PANEL_WIDTH);return n};e.applyNoticeCenterWidth=c;const l=(t,e,n)=>{n.navigationWidth=u(n.accordionWidth||t.accordionWidth,t.accordion,t);const o=t.rightPanelCurrentWidth;if(n.rightPanelWidth=Math.max(Number(e),i.MIN_RIGHT_PANEL_WIDTH),n.rightPanelCurrentWidth=n.rightPanelWidth,t.isNoticeLeft)n.noticeCenterWidth=t.noticeCenterWidth-(n.rightPanelWidth-o);else if(n.rightPanelCurrentWidth<=i.MIN_RIGHT_PANEL_WIDTH)n.noticeCenterWidth=Math.max(t.noticeCenterWidth-Math.abs(Number(e)-i.MIN_RIGHT_PANEL_WIDTH),i.MIN_NOTICE_WIDTH);return n};e.applyRightPanelWidth=l;const h=(t,e)=>{let i={};if(e<t.width)i=I(t,t.width-e);return i.savedWidth=e,i.width=e,i.navigationWidth=u(i.accordionWidth||t.accordionWidth,t.accordion,t),i};e.applySavedWidth=h;e.getAverageWidth=(t,e)=>t<e?e-t:0;const W=t=>t<(i.MIN_EXPANDED_ACCORDION_WIDTH+i.MAX_COMPACT_ACCORDION_WIDTH)/2?"min":"max",I=(t,e)=>{const i=s().savedWidth.params;return g(i,t,e)};e.decreaseWidths=I;const g=(t,e,i)=>{const n={},o=r(e);return t.forEach((t=>{if(i>0){const r=e[t]-o[t],s=i>r?r:i;i=i>r?i-r:0,n[t]=e[t]-s}else n[t]=e[t]})),n},T=(t,e,i,n)=>{const o={};return t.forEach((t=>{if(e.centerWidth>i){const r=Math.max(e[t]-(e.centerWidth-i),n[t]);i=i+e[t]-r,o[t]=r}})),o},u=(t,e,n,o=!0)=>{let r=n.navigationWidth;
185if(n.accordionViewMode===i.ACCORDION_PANEL_MODE||!1===n.expandSidebarPanel)r=i.MIN_ACCORDION_WIDTH;else if(o&&t>n.accordionWidth&&n.accordionWidth===n.navigationWidth)r=i.ACCORDION_WIDTHS[e].max;return Math.min(t,r)};e.getNavigationWidth=u;e.convertSavedWidth=(t,e)=>"max"===e||t-i.MIN_RESIZING_OFFSET<=i.MIN_PORTAL_WIDTH?t:Number(e);const N=t=>{const e=i.MIN_WIDTH_FOR_L_LAYOUT_NEW,n=i.MIN_WIDTH_FOR_M_LAYOUT_NEW,o=i.MIN_WIDTH_FOR_S_LAYOUT_NEW;let r="xs";if(t>=e)r="l";else if(t>=n)r="m";else if(t>=o)r="s";return r};e.getLayout=N;e.getNoticeMode=(t,e)=>{const n=N(e);return t&&(t[n]||i.DEFAULT_NOTICE_MODE[n])};e.isAccordionExpanded=(t,e,n)=>n&&t.accordionViewMode===i.ACCORDION_PANEL_MODE||!1===t.expandSidebarPanel&&t.accordionViewMode!==i.ACCORDION_PANEL_MODE?!1:"max"===t.accordion&&t.accordionViewMode!==i.ACCORDION_PANEL_MODE;e.getAccordionWidth=(t,e,n)=>{const o=Number(e);if((n.accordionViewMode===i.ACCORDION_PANEL_MODE||!1===n.expandSidebarPanel)&&!1!==n.accordionVisible)return i.MIN_ACCORDION_WIDTH;else if(!1!==n.accordionVisible){if(Number(n.navigationWidth)<o&&Number(n.accordionWidth)===o)return Math.max(o,i.MIN_ACCORDION_WIDTH);if(o<i.MIN_EXPANDED_ACCORDION_WIDTH&&o>i.MAX_COMPACT_ACCORDION_WIDTH){return o<(i.MIN_EXPANDED_ACCORDION_WIDTH+i.MAX_COMPACT_ACCORDION_WIDTH)/2?i.MAX_COMPACT_ACCORDION_WIDTH:i.MIN_EXPANDED_ACCORDION_WIDTH}return Math.max(o,i.MIN_ACCORDION_WIDTH)}return 0};e.getIsNoticeLeft=(t,e)=>e&&"panel"!==e&&t<i.MIN_WIDTH_FOR_NOTICE;e.getMinPortalWidthForNotice=(t,e)=>(t?i.MIN_WIDTH_FOR_S_LAYOUT:i.MIN_WIDTH_FOR_M_LAYOUT)+i.ACCORDION_WIDTH[e?"max":"min"];e.isNoticeShow=(t,e,i,r)=>{const s=o.URL.getQueryParam("hideNotice");if("true"===s||"false"===s)return"false"===s;const a=n.cookie.get("noticeDisable");if("true"===a||"false"===a)return"false"===a;else return t&&(r?"panel"!==r:e>=i)};e.getRightPanelWidth=(t,e,n)=>e&&!n?Number(t)+(i.MIN_RIGHT_PANEL_WIDTH_MAIN-i.MIN_RIGHT_PANEL_WIDTH):Number(t);e.getRightPanelMinWidth=(t,e,n)=>t&&!n||t&&"panel"===n?i.MIN_RIGHT_PANEL_WIDTH_MAIN:i.MIN_RIGHT_PANEL_WIDTH;e.getAllowNoticeWidth=(t,e,i)=>Math.max(t-e-i,0);e.getNoticeMinOffset=(t,e,n,o)=>{if(t)return Math.max(e-i.MIN_NOTICE_WIDTH+o,0);else return Math.max(e-i.MIN_NOTICE_WIDTH,0)};e.getAllowWidth=(t,e,i,n)=>t-e-n;e.getMasterWidth=t=>{let e=t.masterWidth||0;if(e>0&&t.masterMinWidth&&"number"==typeof t.masterMinWidth)e=Math.max(e,t.masterMinWidth);return e};e.getDefaultMasterWidth=(t,e)=>{let n=0;if(e.width)n=e.width;else if(e.initialWidth)n=e.initialWidth;else if(t){const o=A(e.minWidth,t),r=A(e.maxWidth,t);n=Math.round(t*i.DEFAULT_MASTER_PERCENT),n=Math.max(n,o),n=Math.min(n,r)}return n};const A=(t,e)=>{let n;if("string"==typeof t){if(`${t}`.includes("%"))n=Math.round(e*parseFloat(t)/i.MAX_PERCENT_VALUE);else if(`${t}`.includes("px"))n=parseInt(t.replace("px",""),10)}else n=t;return n};e.getWidthValue=A;e.getResultWorkspaceWidth=(t,e,n)=>t.isAdaptive?i.DEFAULT_MIN_WORKSPACE_WIDTH-e:n;return e.getAdditionalPaddings=(t,e,n)=>{if(!n&&-1!==["main","dashboard","sabyEntity"].indexOf(t)){if(e>=i.MIN_WIDTH_FOR_NOTICE&&e<i.DEFAULT_MIN_PORTAL_WIDTH)return{value:16,padding:"s"};if(e>=i.DEFAULT_MIN_PORTAL_WIDTH)return{value:24,padding:"m"};else return{value:12,padding:"xs"}}return{value:0,padding:""}},e}(0,{},C,T,I),p=f,R=function(t,e,i,n,o,r,s,a,_,d,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.prepareEditorSettings=e.prepareOnlineSettings=e.prepareSettings=e.getPath=e.getResolutionHeight=e.getViewSize=e.getResolution=e.getCookieWidth=e.setState=e.getState=void 0;const l=t=>(0,s.getStore)(_.UID).get(`${_.STORE_KEY}_${t||"default"}`)||{};e.getState=l;e.setState=(t,e)=>{(0,s.getStore)(_.UID).set(`${_.STORE_KEY}_${e||"default"}`,t)};const h=()=>{const t=i.cookie.get("s3ds");return t?Number(t.split("|")[2]):_.DEFAULT_MIN_PORTAL_WIDTH};e.getCookieWidth=h;const W=(t=!1,e="default",n)=>{const r=i.cookie.get("s3ds");let s=_.DEFAULT_MIN_PORTAL_WIDTH;const a=h();try{const t=l(e);if(t.documentWidth&&("default"!==e||t.fix06231189)&&Number(t.documentWidth))s=Number(t.documentWidth);else if(i.detection.isMobilePlatform)s=document?document.documentElement.clientWidth:a;else s=window?window.innerWidth:a}catch(t){i.IoC.resolve("ILogger").info("ViewSettings/Window: getResolution - оÑибка пÑи полÑÑении ÑазÑеÑÐµÐ½Ð¸Ñ ÑкÑана полÑзоваÑелÑ:",t)}if(o.default.get("useAdaptive"))return r?Number(r.split("|")[0]):_.DEFAULT_MIN_WORKSPACE_ADAPTIVE_WIDTH;else if(n)return _.DEFAULT_MIN_WORKSPACE_WIDTH+_.MIN_RIGHT_PANEL_WIDTH;if(i.detection.isPhone)return s;else return s<_.MIN_PORTAL_WIDTH&&!t?_.MIN_PORTAL_WIDTH:s};e.getResolution=W;e.getViewSize=()=>{const t=W();let e="s";if(t>=_.MIN_WIDTH_FOR_L_LAYOUT+_.ACCORDION_WIDTH.max)e="l";else if(t>=_.MIN_WIDTH_FOR_M_LAYOUT+_.ACCORDION_WIDTH.max)e="m";return e};e.getResolutionHeight=()=>{const t=i.cookie.get("s3ds");let e=0;try{e=window?window.innerHeight:Number(t.split("|")[3])}catch(t){i.IoC.resolve("ILogger").info("ViewSettings/Window: getResolutionHeight - оÑибка пÑи полÑÑении вÑÑоÑÑ ÑкÑана полÑзоваÑелÑ:",t)}return e};e.getPath=()=>{const t=process&&process.domain&&process.domain.req;return t?t.path:n.location.pathname};e.prepareSettings=(t,e="default")=>{const i="default"!==e,n=W(!!t.documentWidth,e),o=t.width===_.MAX_PORTAL_WIDTH?n:t.width,r=o&&o>n?n:o,s=(0,d.isAccordionExpanded)(t,r,i),a=r-(0,d.getAccordionWidth)(s,t.accordionWidth,t);return t.portalWidth=r,t.centerWidth=a,t.accordionExpanded=s,t.allowWorkspaceWidth=Math.max(a-t.minWorkspaceWidth,0),t.contentClassName=u(t.width,e),t.workspaceClassName=N(t.centerWidth,e),t};e.prepareOnlineSettings=(t,e="default")=>{const i=W(!!t.documentWidth,e,t.isAdaptive),n="default"!==e;let o,r=(0,d.convertSavedWidth)(i,t[_.SAVED_WIDTH_PARAM_NAME]);if(r<_.MIN_PORTAL_WIDTH)r=_.MIN_PORTAL_WIDTH;if("max"===t.minWorkspaceWidthConfig)o=i,r=i;else o=t.minWorkspaceWidthConfig;const s=r&&r>i?i:Number(r);return I(t,o,s,r,n,e,i)};e.prepareEditorSettings=(t,e="default")=>{const i=Number(t.portalWidth);return I(t,0,i,i,!1,e)};const I=(t,e,i,n,r,s,l)=>{var h;const I=null!==(h=t.workspaceWidthCorrection)&&void 0!==h?h:0;
185let A=Math.max(Number(t.noticeCenterWidth),_.MIN_NOTICE_WIDTH);const M=(0,d.isAccordionExpanded)(t,i,r);let E=(0,d.getAccordionWidth)(M,t.accordionWidth,t),f=(0,d.getAccordionWidth)(M,t.navigationWidth,t);const p=(0,d.getMinPortalWidthForNotice)(t.noticeMode,M);let R=i-E;const S=(0,d.getNoticeMode)(t.noticeMode,R);let m=(0,d.isNoticeShow)(t.isNoticeVisible,i,p,S);const P=(0,d.getIsNoticeLeft)(i,S),H=(0,d.getRightPanelMinWidth)(m,P,S);let L=r||!1===t.rightPanelVisible?0:Number(t.rightPanelWidth||0),v=O(L,A,P,m),b=D(E),y=i;if(m)y-=A;let x=y-E-(0,d.getRightPanelWidth)(L,m,P)+(L?I:0);if(isNaN(x))a.Logger.error(`ViewSettings._calculateSettings: centerWidthWithMaster is NaN. centerWidth: ${y}, rightPanelWidth: ${(0,d.getRightPanelWidth)(L,m,P)}, separatorWidth: ${I}`),x=y-E-L-(L?I||0:0);g(t),T(t,Math.max(x,e),i);const w=(0,d.getMasterWidth)(t),F=(0,d.getResultWorkspaceWidth)(t,t.masterMinWidth||w,e);y=t.maxWorkspaceWidth?Math.min(x,t.maxWorkspaceWidth):x;const U=(0,d.getAverageWidth)(y,F);if(U&&!r){const e=(0,d.decreaseWidths)({accordionWidth:E,rightPanelWidth:L,noticeCenterWidth:A,accordion:M?"max":"min"},U);E=e.accordionWidth,L=e.rightPanelWidth,A=e.noticeCenterWidth,f=(0,d.getNavigationWidth)(E,t.accordion,t),b=D(E),v=O(L,A,P,m),R=i-E;const n=(0,d.getNoticeMode)(t.noticeMode,R);if(n!==S)L-="page"===n?A:0,m=(0,d.isNoticeShow)(t.isNoticeVisible,i,p,n);if(x=i-E-(0,d.getRightPanelWidth)(L,m,P)+(L?I:0),m)x-=A;y=t.maxWorkspaceWidth?Math.min(x,t.maxWorkspaceWidth):x}if((c.Feature.get(["enable_paddings"])[0]||t.isGuest)&&!t.maxWorkspaceWidth){const e=(0,d.getAdditionalPaddings)(t.pageType,i,r);t.additionalPaddings=e,y=y-w-e.value}else y-=w;return t.centerWidth=o.default.get("useAdaptive")?i:y,t.centerWidthWithMaster=x,t.accordionExpanded=M,t.accordionWidth=E,t.navigationWidth=Math.min(f,E),t.allowNavigationWidth=_.MAX_ACCORDION_WIDTH-t.navigationWidth,t.navigationMinOffset=t.navigationWidth-_.MIN_ACCORDION_WIDTH,t.accordionMinOffset=b,t.allowAccordionWidth=r?0:Math.max(i-_.MIN_WORKSPACE_WIDTH-(m?_.MIN_NOTICE_WIDTH:0)-H-E,Math.max(_.ACCORDION_WIDTHS.max.min-E,0)),t.noticeCenterWidth=A,t.allowWorkspaceWidth=Math.max(y-F,0),t.allowNoticeWidth=Math.max(i-e-(P?L:H)-(L?I:0)-_.ACCORDION_WIDTHS[t.accordion].min-A,0),t.noticeMinOffset=P?A-_.MIN_NOTICE_WIDTH+L-_.MIN_RIGHT_PANEL_WIDTH:Math.max(A-_.MIN_NOTICE_WIDTH,0),t.allowRightPanelWidth=Math.max(i-F-(m?P?_.MIN_NOTICE_WIDTH:A:0)+(L?I:0)-(0,d.getRightPanelWidth)(L,m,P)-_.ACCORDION_WIDTHS[t.accordion].min,0),t.allowMinOffsetRightResizeLine=r?0:C(l,n),t.allowPortalWidth=Math.max(W(!!t.documentWidth,s)-n,0),t.contentClassName=u(n,s),t.workspaceClassName=N(y,s),t.noticeShow=m,t.width=n,t.portalWidth=i,t.isNoticeStack=S?"panel"===S:i<p,t.isNoticeLeft=P,t.minWorkspaceWidth=F,t.rightPanelCurrentWidth=L,t.rightPanelMinWidth=H,t.rightPanelMinOffset=v,t.widthWithoutAccordion=R,t._resizeDiff=0,t._resolution=l,t.layout=(0,d.getLayout)(R),t},g=t=>{const e=t.controlSettings;if(!e)return;const i=`_${r.SettingsMasks.masterWidth}_`;for(const[t,n]of Object.entries(e)){const[o,r]=t.split(i);if(o&&o===r)e[o]=n}},T=(t,e,i)=>{var n,o;const r=e||(t.centerWidth?t.centerWidth:t.width-_.ACCORDION_WIDTH[t.accordion]),s=null===(n=t._masterOptions)||void 0===n?void 0:n.masterWidthProperty,a=null===(o=t._masterOptions)||void 0===o?void 0:o.masterExpandProperty,c=t.controlSettings;if(a){let e;if(void 0===(null==c?void 0:c[a]))e=i>=_.MIN_WIDTH_FOR_MASTER;else e=c[a];if(!e)return t.masterWidth=_.MASTER_COLLAPSED_WIDTH,t.masterMinWidth=_.MASTER_COLLAPSED_WIDTH,void(t.masterWidthProperty=s)}if(s&&!(null==c?void 0:c[s])){const e=(0,d.getDefaultMasterWidth)(r,t._masterOptions);if(c)c[s]=e;else t.controlSettings={[s]:e};if(t._masterPage)t.masterWidth=e,t.masterMinWidth=t._masterOptions.minWidth,t.masterWidthProperty=s}else if(t._masterPage){let e=(null==c?void 0:c[s])||0;e=(0,d.getWidthValue)(e,r),e=Math.max(e,(0,d.getWidthValue)(t._masterOptions.minWidth,r)),e=Math.min(e,(0,d.getWidthValue)(t._masterOptions.maxWidth,r)),t.masterWidth=e,t.masterMinWidth=t._masterOptions.minWidth,t.masterWidthProperty=s}},u=(t,e)=>{const i=W(!1,e);return A(t>i?i:t,_.CONTENT_CLASS_NAME,e)},N=(t,e)=>A(t,_.WORKSPACE_CLASS_NAME,e),A=(t,e,i)=>e+Math.floor((Number(t)||W(!1,i))/_.CLASS_NAME_INCREMENT)*_.CLASS_NAME_INCREMENT,O=(t,e,i,n)=>i?t-_.MIN_RIGHT_PANEL_WIDTH:Math.max((n?e-_.MIN_NOTICE_WIDTH:0)+t-_.MIN_RIGHT_PANEL_WIDTH,0),D=t=>t-_.MIN_ACCORDION_WIDTH,C=(t,e)=>Math.max(t-_.MIN_RESIZING_OFFSET<=_.MIN_PORTAL_WIDTH?0:e-_.MIN_PORTAL_WIDTH,0);return e}(0,{}
185,d,T,h,W,T,i,C,f,_),S=R,m=function(t,e,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getDefaultOnlineSettings=e.getDefaultSettings=void 0;e.getDefaultSettings=t=>{const e=(0,n.getCookieWidth)()<i.DEFAULT_MIN_PORTAL_WIDTH?i.DEFAULT_MAX_PORTAL_WIDTH:i.DEFAULT_MIN_PORTAL_WIDTH,o=(0,n.getCookieWidth)()<i.DEFAULT_MIN_PORTAL_WIDTH?i.DEFAULT_RIGHT_PANEL_MIN_WIDTH:i.DEFAULT_RIGHT_PANEL_MAX_WIDTH,r="panel"===(null==t?void 0:t.sidebarMode)?"min":"max";return{width:e,savedWidth:e,accordion:r,accordionWidth:i.ACCORDION_WIDTH[r],controlSettings:{},centerWidth:1242,rightPanelWidth:o,rightPanelCurrentWidth:o,rightPanelMinOffset:0,minWorkspaceWidth:i.DEFAULT_MIN_WORKSPACE_WIDTH}};return e.getDefaultOnlineSettings=t=>{const o=(0,n.getCookieWidth)()<i.DEFAULT_MIN_PORTAL_WIDTH?i.DEFAULT_NOTICECENTER_MIN_WIDTH:i.DEFAULT_NOTICECENTER_MAX_WIDTH;return{...(0,e.getDefaultSettings)(t),noticeVisibility:!0,noticeCenterWidth:o,noticeSavedWidth:o,isNoticeVisible:!0,noticeCenterVisibilityMode:"auto",url:"default"}},e}(0,{},C,R),P=m,H=function(t,e,i,n,o,r,s,a,_,d,c,l,h,W){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.helpers=e.Controller=void 0;let I=0;class g extends((0,n.mixin)(i.ObservableMixin)){constructor(t){super(t),this._serviceAvailable=!1,this._prepareMethod=r.prepareOnlineSettings,this._defaultSettings=(0,_.getDefaultOnlineSettings)(),this._isInit=!1,this._buildingContext=t}isInit(){return this._isInit}init(t,e){this._serviceAvailable=!!t;const i=t?t:this._defaultSettings;if(this._prepareMethod=i.url?r.prepareOnlineSettings:r.prepareSettings,e)(0,r.setState)(t,this._buildingContext);else this.set(i,!0);this._isInit=!0}getSettings(){const t=(0,r.getState)(this._buildingContext);if(!(0,l.isEmpty)(t))return t;else return this._prepareMethod(this._defaultSettings,this._buildingContext)}isNoticeVisible(){return this.getSettings()[s.NOTICE_SHOW_PARAM_NAME]}updateWidth(){const t=this._prepareMethod(this.getSettings(),this._buildingContext);t.windowResize=!0,this.set(t)}saveWidth(t){this._updateSettings((0,a.applyWidth)(this.getSettings(),t),!0)}setPortalWidth(t){if(u(t))this._updateSettings((0,a.applyWidth)(this.getSettings(),{savedWidth:t}),!0)}toggleAccordion(t){const e=T(this.getSettings(),t);this._updateSettings(e)}toggleNoticeCenter(){const t=!this.getSettings()[s.NOTICE_SHOW_PARAM_NAME];this._updateSettings({noticeVisibility:t,isNoticeVisible:t})}applyConfigurationSettings(t){const e=this.getSettings();Object.keys(t).forEach((i=>{e[i]=t[i]})),this.set(e)}saveControlSettings(t){this._updateSettings(t)}_updateSettings(t,e){const i=M(this.getSettings(),t,e);this.set(i),i.windowResize=!1}set(t,e=!1){const i=this._prepareMethod(t,this._buildingContext),n=N({...i},(0,r.getState)(this._buildingContext));if((0,r.setState)(n,this._buildingContext),!e)this._notify("viewSettingsChanged",n)}save(t,e){O(t,e)}saveGuestSettings(t){D(t)}reset(t,e){return A(t,e)}}e.Controller=g;const T=(t,e)=>{const i=e?"max":"min",n=s.ACCORDION_WIDTHS[i][t.accordionWidth>=s.ACCORDION_WIDTHS.max.max?"max":"min"];return{accordionExpanded:e,accordion:i,navigationWidth:n,accordionWidth:t.accordionWidth===t.navigationWidth?n:Math.max(t.accordionWidth,n)}},u=t=>{if(!t)return!1;if(t<s.MIN_PORTAL_WIDTH)return c.Logger.error("ViewSettings/controller setPortalWidth - ÑиÑина поÑÑала не Ð¼Ð¾Ð¶ÐµÑ Ð±ÑÑÑ Ð¼ÐµÐ½ÑÑе минималÑной "+s.MIN_PORTAL_WIDTH+" \n"),!1;else return!0},N=(t,e)=>(t.controlSettings={...t.controlSettings},t.documentWidth=e.documentWidth,{...t}),A=(t,e)=>new o.SbisService({endpoint:{contract:"ViewSettings"}}).call("Reset",{url:e,keys:t}),O=(e,n)=>{const r=new i.Record({adapter:"adapter.sbis"});Object.keys(e).forEach((t=>{if(void 0!==e[t])r.addField({name:t,type:"number"==typeof e[t]?"string":typeof e[t]}),r.set(t,e[t])}));let s={diff:r};new Promise(((e,i)=>{t(["Page/loaders"],e,i)})).then((({ApplicationSettings:t})=>{const i=t.get("applicationId");s={...s,...i&&{applicationId:i},url:n},new o.SbisService({endpoint:{contract:"ViewSettings"}}).call("WriteDiff",s).then((()=>{W.Cache.updateValue({url:n,applicationId:i},e)})).finally((()=>I=0))})).catch((function(t){requirejs.onError(t)}))},D=t=>{const e=h.cookie.get("viewSettings")?JSON.parse(h.cookie.get("viewSettings")):{};Object.keys(t).forEach((i=>{e[i]=t[i]})),h.cookie.set("viewSettings",JSON.stringify(e),{path:"/",expires:30})},C=t=>t.pageId&&t.pageId===t.mainPageId?t.pageId:null,M=(t,e,i)=>
185{if(e.noticeCenterWidth)e.noticeSavedWidth=e.noticeCenterWidth;if(i)if(e.rightPanelCurrentWidth)e.rightPanelWidth=e.rightPanelCurrentWidth;if(Object.keys(e).forEach((i=>{if("controlSettings"===i)t.controlSettings={...t.controlSettings,...e.controlSettings};else t[i]=e[i]})),!d.Info.get("guest")){const i=C(t);I+=200,setTimeout((()=>{O(e,i),I-=200}),I)}else if(d.Info.get("guest"))D(e);return t};return e.helpers={getToggleAccordionSettings:T,validateSavedWidth:u,prepareBeforeSet:N,reset:A,save:O,saveGuestSettings:D,resolveUrl:C,updateSettings:M},e}(u,{},a,o,r,R,C,f,m,c,i,s,d,O),L=H,v=function(t,e,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class o extends i.Controller{constructor(){super(...arguments),this._keysToReset={}}setController(t){this._controller=t}getController(){if(!this._controller)this.setController(new i.Controller("default"));return this._controller}init(t){this.getController().init(t)}getSettings(){return this.getController().getSettings()}isNoticeVisible(){return this.getController().isNoticeVisible()}updateWidth(){this.getController().updateWidth()}saveWidth(t){this.getController().saveWidth(t)}toggleAccordion(t){this.getController().toggleAccordion(t)}toggleNoticeCenter(){this.getController().toggleNoticeCenter()}applyConfigurationSettings(t){this.getController().applyConfigurationSettings(t)}saveControlSettings(t){this.getController().saveControlSettings(t)}set(t){this.getController().set(t)}save(t,e){this.getController().save(t,e)}reset(t,e){return this.getController().reset(t,e)}subscribe(t,e,i){this.getController().subscribe(t,e,i)}unsubscribe(t,e,i){this.getController().unsubscribe(t,e,i)}setKeysToReset(t){if(n.constants.isServerSide)return;const e=this.getSettings().url;if(!e)return;const i=[];if(t.forEach((t=>{if(!(this._keysToReset[e]&&-1!==this._keysToReset[e].indexOf(t)||-1===t.indexOf("masterWidth")&&-1===t.indexOf("list-sorting")&&-1===t.indexOf("list-viewMode")))i.push(t)})),!this._keysToReset[e])this._keysToReset[e]=[];this._keysToReset[e]=[...this._keysToReset[e],...i]}getKeysToReset(){return this._keysToReset[this.getSettings().url]||[]}}return e.default=new o,e}(0,{},H,d),b=v,y=function(t,e,i,n,o,r,s,a,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const d={val:0},c=function(t){const e=(0,n.useContext)(_.BubblingEventContext),[c,l]=(0,n.use
185State)((()=>{var e;const i=t.width||0;return(0,r.getResolution)(!1,null===(e=t.controllers)||void 0===e?void 0:e.buildingContext)>=a.MIN_PORTAL_WIDTH&&!!i})),[h,W]=(0,n.useState)((()=>{const e=t.width||0;let i=t.minOffsetWidth>=0?t.minOffsetWidth:e-a.MIN_PORTAL_WIDTH;if(t.centerAlignment)i/=2;return i})),[I,g]=(0,n.useState)((()=>{var e;const i=t.width||0;let n=t.maxOffsetWidth>=0?t.maxOffsetWidth:(0,r.getResolution)(!1,null===(e=t.controllers)||void 0===e?void 0:e.buildingContext)-i;if(t.centerAlignment)n/=2;return n})),[T,u]=(0,n.useState)(0);(0,n.useEffect)((()=>{var e,i;const n=t.width||0;let o=t.maxOffsetWidth>=0?t.maxOffsetWidth:(0,r.getResolution)(!1,null===(e=t.controllers)||void 0===e?void 0:e.buildingContext)-n,s=t.minOffsetWidth>=0?t.minOffsetWidth:n-a.MIN_PORTAL_WIDTH;if(t.centerAlignment)o/=2,s/=2;g(o),W(s),l((0,r.getResolution)(!1,null===(i=t.controllers)||void 0===i?void 0:i.buildingContext)>=a.MIN_PORTAL_WIDTH&&!!n)}),[T,t.width,t.maxOffsetWidth,t.minOffsetWidth,t.controllers,t.centerAlignment]);
185const[N,A]=(0,n.useState)((()=>"ResizingLineInstance-"+ ++d.val)),O=(0,n.useCallback)((()=>({getInstanceId:()=>N})),[]);(0,n.useEffect)((()=>{if(c){const t=()=>{u((t=>t+1))};return e.onRegister(new CustomEvent("register"),"controlResize",O(),t),()=>{e.onUnregister(new CustomEvent("unregister"),"controlResize",O(),t)}}}),[e,O,c]);const D=(0,n.useCallback)((e=>{var i,n;const o=t.paramName||a.SAVED_WIDTH_PARAM_NAME,_=t.centerAlignment||!1,d=t.width||0;if(Math.abs(e)>0){const c=Math.min(_?2*e:e,t.maxOffsetWidth);let l;if(t.isMaxWidthAvailable){const e=_?20:10,n=(0,r.getResolution)(!1,null===(i=t.controllers)||void 0===i?void 0:i.buildingContext);if(l=(Number(d)||n)+c,n-l<=e)l=o===a.SAVED_WIDTH_PARAM_NAME?"max":n}else l=Number(d)+c;if(t.storeAvailable)((null===(n=t.controllers)||void 0===n?void 0:n.ViewSettingsController)||s.default).saveWidth({[o]:String(l)})}}),[t.centerAlignment,t.maxOffsetWidth,t.isMaxWidthAvailable,t.width,t.controllers,t.paramName,t.storeAvailable]);if(c)return(0,i.jsx)("div",{className:t.className+" viewSettings-ResizingLine__container",children:(0,i.jsx)(o.ResizingLine,{className:"viewSettings-ResizingLine__resizer viewSettings-ResizingLine__"+(t.align||t.direction||"direct"),direction:t.direction||"direct",minOffset:h,maxOffset:I,onOffset:D,customEvents:["onOffset"]})});else return(0,i.jsx)(i.Fragment,{})};return c.displayName="ViewSettings/controller:ResizingLineReact",e.default=c,e}(0,{},t,e,l,R,v,C,n,"undefined"==typeof css_ViewSettings_controller||css_ViewSettings_controller),x=y,w=function(t,e,i,n,o,r,s,a,_,d,c){"use strict";function l(){if(!C)C=new o.LocalStorage;return C}function h(e){const i=(0,s.getPath)(),o=new n.Record({adapter:"adapter.sbis"});if(Object.keys(e).forEach((t=>{o.addField({name:t,type:"number"==typeof e[t]?"string":typeof e[t]}),o.set(t,e[t])})),!d.Info.get("guest"))new Promise(((e,i)=>{t(["Page/loaders"],e,i)})).then((({ApplicationSettings:t})=>{D.call("WriteDiff",{diff:o,url:i,applicationId:t.get("applicationId")||"default"}).finally((()=>O=0))})).catch((function(t){requirejs.onError(t)}))}async function W(t,e,i){return new Promise((n=>{n(I(t,e,i))}))}function I(t,e,i){if(e)a.default.setKeysToReset(e);const n=T(t,i);if(n)return n;else return r.DEFAULT_SETTINGS_RECORD.get(t)}function g(t,e){l().setItem(t,e)}function T(t,e){const i=e||a.default,n=(0,s.getState)(i._buildingContext);if(!(0,c.isEmpty)(n))return{...n.controlSettings};if(A)return l().getItem(t);else return}Object.defineProperty(e,"__esModule",{value:!0});const u="viewSettings",N="controlSettings",A="undefined"!=typeof window;let O=0;const D=new i.SbisService({endpoint:{contract:"ViewSettings"}});let C;const M={init(t,e){const i={};t.each(((t,e)=>{if("controlSettings"===t)g(t,e);else i[t]=e})),g("viewSettings",i),i.url=(0,s.getPath)(),i.minWorkspaceWidth=e,(0,_.setController)(this)},setViewSettings(t){!function(t,e){const i=T(t);Object.keys(e).forEach((t=>{i[t]=e[t]})),g(t,i)}(u,t[u])},saveViewSettings:async t=>function(t,e){const i=T(t)||{};Object.keys(e).forEach((t=>{i[t]=e[t]})),g(t,i),h(e)}(u,t),setSettings(t,e){!function(t,e,i){const n={};n[t]=e;const o=T(t,i)||{};Object.keys(e).forEach((t=>{a.default.setKeysToReset([t]),o[t]=e[t]}));const r=i||a.default,_=(0,s.getState)(r._buildingContext);if(!(0,c.isEmpty)(_))r.saveControlSettings({controlSettings:n.controlSettings});else O+=200,setTimeout((()=>{h(n),O-=200}),O);g(t,o)}(N,t,e)},readViewSettings:async()=>async function(){const e=(0,s.getPath)();return new Promise(((e,i)=>{t(["Page/loaders"],e,i)})).then((({ApplicationSettings:t})=>{if(d.Info.isInit()&&d.Info.get("guest"))return new Promise((t=>(t(r.DEFAULT_SETTINGS_RECORD),r.DEFAULT_SETTINGS_RECORD)));else return D.call("Read",{url:e,applicationId:t.get("applicationId")||"default"}).then((t=>t.getRow()),(()=>r.DEFAULT_SETTINGS_RECORD))})).catch((function(t){requirejs.onError(t)}))}(),getViewSettings:t=>W(u,t),getSettings:async(t,e)=>W(N,t,e),getSettingsSync:(t,e)=>I(N,t,e)};return e.default=M,e}(u,{},r,a,g,C,R,v,W,c,s),F=w,N.Cache=N.DEFAULT_NOTICE_MODE=N.ACCORDION_WIDTH=N.MIN_WORKSPACE_WIDTH=N.DEFAULT_MIN_WORKSPACE_WIDTH=N.MIN_WIDTH_FOR_S_LAYOUT=N.MIN_WIDTH_FOR_M_LAYOUT=N.MIN_WIDTH_FOR_L_LAYOUT=N.ResizingLineReact=N.applyWidth=N.Controller=N.helpers=N.ControllerClass=N.Settings=void 0,A.__exportStar(M,N),A.__exportStar(S,N),A.__exportStar(P,N),Object.defineProperty(N,"Settings",{enumerable:!0,get:function(){return F.default}}),Object.defineProperty(N,"ControllerClass",{enumerable:!0,get:function(){return L.Controller}}),Object.defineProperty(N,"helpers",{enumerable:!0,get:function(){return L.helpers}}),Object.defineProperty(N,"Controller",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(N,"applyWidth",{enumerable:!0,get:function(){return p.applyWidth}}),Object.defineProperty(N,"ResizingLineReact",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(N,"MIN_WIDTH_FOR_L_LAYOUT",{enumerable:!0,get:function(){return E.MIN_WIDTH_FOR_L_LAYOUT}}),Object.defineProperty(N,"MIN_WIDTH_FOR_M_LAYOUT",{enumerable:!0,get:function(){return E.MIN_WIDTH_FOR_M_LAYOUT}}),Object.defineProperty(N,"MIN_WIDTH_FOR_S_LAYOUT",{enumerable:!0,get:function(){return E.MIN_WIDTH_FOR_S_LAYOUT}}),Object.defineProperty(N,"DEFAULT_MIN_WORKSPACE_WIDTH",{enumerable:!0,get:function(){return E.DEFAULT_MIN_WORKSPACE_WIDTH}}),Object.defineProperty(N,"MIN_WORKSPACE_WIDTH",{enumerable:!0,get:function(){return E.MIN_WORKSPACE_WIDTH}}),Object.defineProperty(N,"ACCORDION_WIDTH",{enumerable:!0,get:function(){return E.ACCORDION_WIDTH}}),Object.defineProperty(N,"DEFAULT_NOTICE_MODE",{enumerable:!0,get:function(){return E.DEFAULT_NOTICE_MODE}}),Object.defineProperty(N,"Cache",{enumerable:!0,get:function(){return D.Cache}}),N})); 186define("SabyPage/base",["react/jsx-runtime","react","WasabyLoader/ModulesLoader","UICommon/Utils","UI/Deps","UI/Async","Types/util","Types/source","Types/entity","Router/router","RequireJsLoader/conduct","I18n/i18n","Feature/feature","Env/Event","Env/Env","Controls-DataEnv/slice","Browser/Storage","Browser/Event","Application/Env","require","exports","Page/base","Page/base","Page/loaders","Page/base","Page/base","Page/base","Page/base"],(function(e,t,n,i,r,s,a,o,c,l,u,g,d,h,f,p,b,v,C,S,y,_,m,P,E,O,I,A){var D,N,w,R,M,k,T,j,L,W,F,U,B,x,X,H,G,$;return Object.defineProperty(y,"__esModule",{value:!0}),D=function(e,t,n,i,r){"use strict";
186Object.defineProperty(t,"__esModule",{value:!0});const s="AddButtonLoader";class a extends n.BaseLoader{constructor(){super(...arguments),this._timeout=5e3}getReceivedData(e){const t=this.getState();return this.prepareResultConfig((null==t?void 0:t.buttonOptions)?void 0:t,e,null==t?void 0:t.buttonOptions)}prepareResultConfig(e,t,n){return{menuConfig:e,activateHandler:t.activateHandler,selectCompleteHandler:t.selectCompleteHandler,rightTemplateActivateHandler:t.rightTemplateActivateHandler,rights:t.rights,requiredLevel:t.requiredLevel,getVisibilityCallback:t.getVisibilityCallback,getReadOnlyCallback:t.getReadOnlyCallback,getCaptionCallback:t.getCaptionCallback,storeId:t.storeId,position:t.position,buttonOptions:n,pageId:t.pageId}}load(e,t,n){if(e.menuConfigGetter)return(0,i.loadAsync)(e.menuConfigGetter).then((t=>{const r=t(e.menuConfigGetterArguments,n);if(r instanceof Promise)return r.then((t=>{if(t.caption)(0,i.loadAsync)("ExtControls/buttons:SingleButton");return this.setState(t),this.prepareResultConfig(t,e)}));else{if(r.caption)(0,i.loadAsync)("ExtControls/buttons:SingleButton");return this.setState(r),this.prepareResultConfig(r,e)}})).catch((t=>(r.logger.error(`ÐÐ¾Ð°Ð´ÐµÑ ${s}: оÑибка внÑÑÑи menuConfigGetter ${e.menuConfigGetter}. Error: ${t.message}`),t)));else if(e.buttonConfigGetter)return(0,i.loadAsync)(e.buttonConfigGetter).then((t=>{const n=t();return this.setState({buttonOptions:n}),this.prepareResultConfig(void 0,e,n)})).catch((t=>(r.logger.error(`ÐÐ¾Ð°Ð´ÐµÑ ${s}: оÑибка внÑÑÑи buttonConfigGetter ${e.buttonConfigGetter}. Error: ${t.message}`),t)));else return Promise.resolve(this.prepareResultConfig(void 0,e))}}return t.default=new a(s),t}(0,{},_,n,C),N=D,w=function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormControllerClass=void 0;const s=function(){r.Logger.error("SabyPage/base:FormController: ÑÑнкÑионал более не поддеÑживаеÑÑÑ, нÑжно иÑполÑзоваÑÑ ÐºÐ¾Ð½ÑÑÐ¾Ð»Ð»ÐµÑ Ð¸Ð· ÑлайÑа. ÐодÑобнее ÑÑÑ https://wi.sbis.ru/doc/platform/developmentapl/interface-development/application-configuration/create-page/accordion/content/form-method-config/#use-slice")};class a extends((0,i.mixin)(n.ObservableMixin)){constructor(){super()}setState(){s()}setRouter(){s()}restoreRouter(){s()}getState(){return s(),{}}applyChanges(){return Promise.resolve(!0)}rejectChanges(){s()}resetToDefault(){return s(),Promise.resolve(!0)}setSwitcherState(){s()}getSwitcherState(){return s(),!0}changeSwitcherState(e){s()}validate(){return s(),Promise.resolve(!0)}setValidatorCallback(){s()}setLoadDataMethod(e){s()}setChangeEditingCallback(e){s()}setChangeEditingTitleCallback(e){s()}hasChanges(){return s(),!1}commitEdit(e=!1){return s(),Promise.resolve(!0)}callAfterCancelCallback(){s()}initPending(){s()}cancelPending(){s()}changeEditing(e){s()}changeEditingTitle(e){s()}}return t.FormControllerClass=a,t.default=new a,t}(0,{},c,a,i),R=w,M=function(e,t,n,i,r,s){"use strict";var a;return Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.MasterInstallation="MasterInstallation",e.AccountInstallation="AccountInstallation",e.UserInstallation="UserInstallation"}(a||(a={})),t.default={...i.PageConfig,preloadFonts:[n.constants.interFont,n.constants.interFontBold],preloadFontsMac:[n.constants.interFontMac,n.constants.interFontBoldMac],noscript:(0,s.getResourceUrl)("/cdn/Maintenance/1.0.23/html/"+r.controller.currentLocale+"/noscript.html"),pagePrefix:"page",title:"СÐÐС",extensions:[i.EXTENSIONS.authError,i.EXTENSIONS.calculator,i.EXTENSIONS.deviceChecker,i.EXTENSIONS.fsrarWorker,i.EXTENSIONS.linkSafetyChecker,i.EXTENSIONS.longOperations,i.EXTENSIONS.notes,i.EXTENSIONS.noticeCenterPopupNotifications,i.EXTENSIONS.serviceUpdateNotifier,i.EXTENSIONS.userActivity,i.EXTENSIONS.smartScanner,i.EXTENSIONS.triggers,i.EXTENSIONS.trackingScript,i.EXTENSIONS.helpSystem],applicationConfigLoader:"Page/base:ApplicationConfigLoader",pageConfigLoader:"Page/base:PageConfigLoader",prefetchModules:["Controls/popupTemplate","Page/loaders:createControllers","Controls/popupTemplateStrategy"]},t}(0,{},f,_,g,u),k=M,T=function(e,t,n,i,r,s,a,o){"use strict";function c(e,t){var r,c;const d=(0,i.useMemo)((()=>{var t,n;const i=null===(t=e.prefetchResult)||void 0===t?void 0:t.configError;return(null===(n=e.prefetchResult)||void 0===n?void 0:n.loadDataPromise)||s.constants.isServerSide&&(a.PrefetchHelper._hasTimeoutErrors(a.PrefetchHelper.getPrefetchResult(e.prefetchResult),i)||"client"===e.loadT
186ype)}),[e.prefetchResult,e.loadType]),h=(0,i.useMemo)((()=>a.PrefetchHelper.getPrefetchResult(e.prefetchResult,e.type)),[e.prefetchResult,e.type]),f=(0,i.useMemo)((()=>{var t;return{templateName:e.templateName,templateOptions:{...e.templateOptions,prefetchResult:h,prefetchConfigError:null===(t=e.prefetchResult)||void 0===t?void 0:t.configError,stateRecord:e.stateRecord,controllers:e.controllers,...e.controllers}}}),[e.prefetchResult,h,e.templateName,e.templateOptions,e.stateRecord,e.controllers]),p=(0,o.useRouter)();if(d)if("workspace"===e.type)return(0,n.jsx)(l,{visible:!0,children:(0,n.jsx)(n.Fragment,{})});else return(0,n.jsx)("div",{});const b={"data-templatename":e["data-templatename"]};return(0,n.jsx)(n.Fragment,{children:e.isCompound?(0,n.jsx)(u,{className:(e.className||"")+" "+((null===(r=f.templateOptions)||void 0===r?void 0:r.className)||""),Router:p,redrawOnOptionsChange:!1,attrs:{key:f.templateName},component:f.templateName,childControlWithoutParent:!0,componentOptions:f.templateOptions}):(0,n.jsx)(g,{className:(e.className||"")+" "+((null===(c=f.templateOptions)||void 0===c?void 0:c.className)||""),templateName:f.templateName,templateOptions:f.templateOptions,Router:p,...b})})}Object.defineProperty(t,"__esModule",{value:!0});const l=(0,r.lazy)((()=>(0,r.importer)("Controls/LoadingIndicator"))),u=(0,r.lazy)((()=>(0,r.importer)("Core/CompoundContainer"))),g=(0,i.memo)((e=>{const t=(0,i.useMemo)((()=>(0,r.lazy)((()=>(0,r.importer)(e.templateName)))),[e.templateName]),s={},a={};if(e["data-templatename"])s["data-templatename"]=e["data-templatename"],a.templatename=e["data-templatename"];return(0,n.jsx)(t,{...e.templateOptions,className:e.className,Router:e.Router,attrs:a,...s})}));return c.displayName="SabyPage/base:PrefetchAwaiterReact",t.default=(0,i.forwardRef)(c),t}(0,{},e,t,s,f,_,l),j=T,L=function(e,t,n,i,r,s){"use strict";function a(e,t,n){let i=e||"";const r="page/:pageId";if(-1===i.indexOf(r))i=("/"!==t?"":"/")+r+(i&&"/"!==i[0]?"/"+i:i);if(n)i=`${i}${i.includes("?")?"&":"?"}${n}`;return i}return Object.defineProperty(t,"__esModule",{value:!0}),t.resolveMask=void 0,t.resolveMask=a,t.default=(0,i.forwardRef)((function(e,t){const i=e.clear?e.state:a(e.state,(0,r.getConfig)("appRoot"),e.queryMask);return(0,n.jsx)(s.Reference,{...e,ref:t,state:i})})),t}(0,{},e,t,C,l),W=L,F=function(e,t,n,i,r,s){"use strict";function a(e,t){if(function(e){return e.some((e=>Object.keys(e).some((e=>c.includes(e)))))}(t)&&!e.includes(o))e.push(o)}Object.defineProperty(t,"__esModule",{value:!0});const o="SabyPage/actionsToolbarCompatible:CompatibleAction",c=["getIconCallback","getSourceCallback","getIconStyleCallback","getReadOnlyCallback","getVisibilityCallback","getTooltipCallback","activateHandler","activateHandlerArguments","rights","dropdownType"],l={async loadData({toolbarConfig:e},t,r){if(!e)return;const o=(0,s.getToolbarPreloadModules)(e);if(a(o,[...e._serviceItems||[],...e.items||[]]),e.actions){const t=await(0,n.loadAsync)(e.actions);if(null==t?void 0:t.length){a(o,t);const e=t.filter((e=>e.actionName)).map((e=>e.actionName));o.push(...e)}}return await Promise.all(o.map((e=>((0,i.addPageDeps)([e]),(0,n.loadAsync)(e))))),e},slice:r.Slice};return t.default=l,t}(0,{},n,r,p,_),U=F,B=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(){this._isSubscriptionActive=!1,this._onPluginConnect=this._onPluginConnect.bind(this),this._onPluginDisconnect=this._onPluginDisconnect.bind(this)}async subscribeOnActivityEvents(e){if(!this._isSubscriptionActive){const[t,i,r]=await Promise.all([(0,n.loadAsync)("SabyPage/activityStatistics:EventAggregator"),(0,n.loadAsync)("SabyPage/activityStatistics:FocusEventWatcher"),(0,n.loadAsync)("SabyPage/activityStatistics:InputEventWatcher")]);this._eventAggregator=new t(e),this._focusEventWatcher=new i(this._eventAggregator),this._activityWatcher=new r(this._eventAggregator),this._isSubscriptionActive=!0;try{const{LocalService:e}=await(0,n.loadAsync)("SBIS3.Plugin/base");if(!e.isRunning())this._startWatchingEvents();e.subscribe("onConnect",this._onPluginConnect),e.subscribe("onDisconnect",this._onPluginDisconnect)}catch{this._startWatchingEvents()}}}async unsubscribeFromActivityEvents(){if(this._isSubscriptionActive){this._isSubscriptionActive=!1;try{const{LocalService:e}=await(0,n.loadAsync)("SBIS3.Plugin/base");e.unsubscribe("onConnect",this._onPluginConnect),e.unsubscribe("onDisconnect",this._onPluginDisconnect)}catch{}if(this._eventAggregator)this._eventAggregator.stopEventsRecording(),this._eventAggregator.destroy(),this._eventAggregator=null;this._stopWatchingEvents()}}_onPluginConnect(e,t){const{constants:i}=(0,n.loadSync)("SBIS3.Plugin/base");if(t===i.APPLICATION_ID.SABY_PLUGIN)this._stopWatchingEvents()}_onPluginDisconnect(e,t){const{constants:i}=(0,n.loadSync)("SBIS3.Plugin/base");if(t===i.APPLICATION_ID.SABY_PLUGIN)this._startWatchingEvents()}_startWatchingEvents(){this._focusEventWatcher.startWatching(),this._activityWatcher.startWatching()}_stopWatchingEvents(){this._focusEventWatcher.stopWatching(),this._activityWatcher.stopWatching()}},t}(0,{},n),x=function(e,t,n,i,r,s,a){"use strict";
186Object.defineProperty(t,"__esModule",{value:!0});const o="check_time",c="deviceStatusEvent";return t.default=class{constructor(){this._statiscticsLS=new r.LocalStorage("statistics"),this._serverChannel=s.Server.serverChannel("user-devices.change-ownence-status"),this._channel=a.Bus.channel(),this._serverSubActive=!1,this._onDeviceStatusChanged=this._onDeviceStatusChanged.bind(this)}async isWorkingDevice(){const e=i.cookie.get("s3wd"),t=this._statiscticsLS.getItem(o),n=t?parseInt(t,10):null,r=n?Date.now()-n<864e5:!1;let s;if(e&&r)s=1===parseInt(e,10);else try{s=(await this._getDeviceInfoForActivity()).get("WorkingDevice"),this._statiscticsLS.setItem(o,Date.now())}catch(e){i.logger.error("SabyPage/statisctics:isWorkingDevice",e),s=!1}return s}async isWorkingStatusOnDevice(){let e=!1;try{e=(await this._loadDeviceInfo()).get("IsStartWorktime")}catch{e=!1}return e}async isCorporateDevice(){let e=!1;if(void 0===this._corporateDevice)try{e=(await this._loadDeviceInfo()).get("IsCorporate"),this._corporateDevice=e}catch{e=!1}else e=this._corporateDevice;return e}subscribeDeviceStatusChange(e){if(!this._serverSubActive)this._serverSubActive=!0,this._serverChannel.subscribe("onReady",(()=>{this._serverChannel.subscribe("onMessage",this._onDeviceStatusChanged)}));this._channel.subscribe(c,e)}unsubscribeDeviceStatusChange(e){this._channel.unsubscribe(c,e)}destroy(){this._serverSubActive=!1,this._serverChannel.destroy(),this._channel.destroy()}async _loadDeviceInfo(){if(!this._loadPromise)this._loadPromise=new Promise(((e,t)=>new n.SbisService({endpoint:"UserDevice"}).call("GetCurrentDevice",{}).then((t=>e(t.getRow()))).catch((e=>{this._loadPromise=void 0,i.logger.error("SabyPage/statisctics:loadDeviceInfo",e),t(e)}))));return this._loadPromise}async _getDeviceInfoForActivity(){try{return(await new n.SbisService({endpoint:"UserDevice"}).call("GetCurrentDeviceForActivity",{})).getRow()}catch(e){throw i.logger.error("SabyPage/statisctics:getDeviceInfo",e),e}}async _onDeviceStatusChanged(e,t){const n=(await this._loadDeviceInfo()).get("CloudDeviceId");if(t.get("CloudDeviceIds").indexOf(n)>-1)this._corporateDevice=t.get("IsCorporate"),this._channel.notify(c,this._corporateDevice)}},t}(0,{},o,C,b,v,h),X=function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s="undsettings";return t.default=class{constructor(){this._channel=i.Bus.channel(),this._serverChannel=r.Server.serverChannel("unproductiveactivity.plugin.reloadsettings"),this._onUNDSettingsChanged=this._onUNDSettingsChanged.bind(this),this._serverChannel.subscribe("onReady",(()=>{this._serverChannel.subscribe("onMessage",this._onUNDSettingsChanged)}))}async isUNDEnabled(e){const t=new n.SbisService({endpoint:{address:"/activity/service/",contract:"UnproductiveLog"}});let i=!1;try{if(e){i=(await t.call("GetSettingsForPerson",{Person:e})).getRow().get("IsEnabled")}}catch{i=!1}return i}subscribeUNDEnabledChange(e){this._channel.subscribe(s,e)}unsubscribeUNDEnabledChange(e){this._channel.unsubscribe(s,e)}destroy(){this._serverChannel.destroy(),this._channel.destroy()}_onUNDSettingsChanged(e,t){this._channel.notify(s,t.get("IsEnabled"))}},t}(0,{},o,h,v),H=function(e,t,n,i,r,s,a,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const c="collectingState";class l{constructor(e,{deviceController:t,undController:n}={}){this._featureEnabled=i.Feature.get(["workplace_status"])[0],this._statusChannel=r.Server.serverChannel("lastactivity.userstatus"),this._channel=a.Bus.channel(),this._deviceController=t||new s.default,this._undController=n||new o.default,this._personId=e,this._onStatusChanged=this._onStatusChanged.bind(this),this._onUNDStateChange=this._onUNDStateChange.bind(this),this._onDeviceStatusChange=this._onDeviceStatusChange.bind(this)}
186async init(){const e=await this._undController.isUNDEnabled(this._personId);this._undController.subscribeUNDEnabledChange(this._onUNDStateChange),this._setUNDEnalbed(e),this._notifyState()}subscribeStateChanged(e){this._channel.subscribe(c,e)}unsubscribeStateChanged(e){this._channel.unsubscribe(c,e)}_setUNDEnalbed(e){if(this._featureEnabled&&this._isUndEnabled!==e)if(e)this._statusChannel.subscribe("onMessage",this._onStatusChanged),this._deviceController.subscribeDeviceStatusChange(this._onDeviceStatusChange);else this._statusChannel.unsubscribe("onMessage",this._onStatusChanged),this._deviceController.unsubscribeDeviceStatusChange(this._onDeviceStatusChange);this._isUndEnabled=e}async _isCollectingEnabled(){let e=!1;try{if(this._isUndEnabled&&n.constants.isBrowserPlatform)if(this._featureEnabled){const[t,n]=await Promise.all([this._getWorkingStatus(),this._deviceController.isCorporateDevice()]);e=t||n}else e=await this._deviceController.isWorkingDevice()}catch{e=!1}return e}async _onStatusChanged(e,t){if(t.IsWorking)this._isWorkingStatus=!0;else{const e=await this._deviceController.isCorporateDevice();this._isWorkingStatus=e}this._notifyState()}async _notifyState(){const e=await this._isCollectingEnabled();if(this._lastState!==e)this._lastState=e,this._channel.notify(c,e)}async _getWorkingStatus(){if(void 0===this._isWorkingStatus)this._isWorkingStatus=await this._deviceController.isWorkingStatusOnDevice();return this._isWorkingStatus}async _onUNDStateChange(e,t){this._setUNDEnalbed(t),this._notifyState()}_onDeviceStatusChange(){this._notifyState()}static getInstance(e){if(!this._instance)this._instance=new l(e);return this._instance}}return t.default=l,t}(0,{},f,d,v,x,h,X),G=function(e,t,n,i,r,s,a){"use strict";let o,c,l,u;Object.defineProperty(t,"__esModule",{value:!0});const g=(e,t,d,h)=>{if(d){if(void 0===l)l=!!r.query.get.showStatistics;if(void 0===u)u=!!r.query.get.showStatisticsFull;Promise.all([(0,n.loadAsync)("HintManager/targetSelectorBase"),(0,n.loadAsync)("Page/base"),(0,n.loadAsync)("AppUsageWebLog/AppUsageLogger")]).then((([e,t,f])=>{const p=t.NavigationController,b=e.Controller;if(o=o||new b({targetSearchAreaSelector:"body",highlightEnabled:!1,stopEventPropagation:!1,listTargetOnlyFirstRow:!1}),u||l){if(d.canDisplayStatistics)Promise.all([(0,n.loadAsync)("HintManager/targetSelector"),(0,n.loadAsync)("SabyPage/showStatistics")]).then((([e,t])=>{const n=e.Controller,i=t.showStatistics;c=c||new n({targetSearchAreaSelector:"body",highlightEnabled:!1,stopEventPropagation:!1,listTargetOnlyFirstRow:!1}),i({hintController:c,settings:d,statisticSlice:h,showFull:u,initStatistics:g})}))}else{const e=()=>({app:d.applicationId,conf:d.configurationId,page:p.getPageId(),version:i.constants.buildnumber||"default"}),t=()=>(null==f?void 0:f.Logger)&&d.applicationId&&d.configurationId;o.activateTargetSelection(((n,i)=>{var r;const s=null===(r=null==i?void 0:i.closest("[data-click-type]"))||void 0===r?void 0:r.getAttribute("data-click-type");if(n&&s&&t())f.Logger.log({target:n,clickType:s,logEvent:"userClick",...e()})}),void 0);const n=new s.default,c=async(i,s)=>{if(s)n.subscribeOnActivityEvents((n=>{if(t())f.Logger.log({activityStartTime:n.time,activityDuration:n.duration,activityIntensityMouse:n.intensityMouse,activityIntensityKeyboard:n.intensityKeyboard,activitySource:0,activityResourceName:r.location.host,activityResourceType:0,logEvent:"activity",...e()})}));else n.unsubscribeFromActivityEvents()},l=a.default.getInstance(d.personId);l.subscribeStateChanged(c),l.init()}}))}};return t.default={init:g},t}(0,{},n,f,C,B,H),$=G,y.getPageContentModules=y.getContentModules=y.getLayoutModules=y.ToolbarFactory=y.Reference=y.getMask=y.getScope=y.getScopeId=y.AddButtonLoader=y.Manifest=y.META=y.FACTORIES=y.LOADERS=y.EXTENSIONS=y.Statistics=y.FormController=y.FormControllerClass=y.PrefetchHelper=y.PrefetchAwaiterReact=y.PrefetchAwaiter=y.createControllers=y.ConfigLoader=y.PageConfig=y.PageConfigLoader=y.ApplicationConfigLoader=void 0,Object.defineProperty(y,"ApplicationConfigLoader",{enumerable:!0,get:function(){return _.ApplicationConfigLoader}}),Object.defineProperty(y,"PageConfigLoader",{enumerable:!0,get:function(){return _.PageConfigLoader}}),Object.defineProperty(y,"PageConfig",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(y,"ConfigLoader",{enumerable:!0,get:function(){return m.ConfigLoader}}),Object.defineProperty(y,"createControllers",{enumerable:!0,get:function(){return P.createControllers}}),Object.defineProperty(y,"PrefetchAwaiter",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(y,"PrefetchAwaiterReact",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(y,"PrefetchHelper",{enumerable:!0,get:function(){return E.PrefetchHelper}}),Object.defineProperty(y,"FormControllerClass",{enumerable:!0,get:function(){return R.FormControllerClass}}),Object.defineProperty(y,"FormController",{enumerable:!0,get:function(){return R.default}}),Object.defineProperty(y,"Statistics",{enumerable:!0,get:function(){return $.default}}),Object.defineProperty(y,"EXTENSIONS",{enumerable:!0,get:function(){return O.EXTENSIONS}}),Object.defineProperty(y,"LOADERS",{enumerable:!0,get:function(){return O.LOADERS}}),Object.defineProperty(y,"FACTORIES",{enumerable:!0,get:function(){return O.FACTORIES}}),Object.defineProperty(y,"META",{enumerable:!0,get:function(){return O.META}}),Object.defineProperty(y,"Manifest",{enumerable:!0,get:function(){return O.Manifest}}),Object.defineProperty(y,"AddButtonLoader",{enumerable:!0,get:function(){return N.default}}),Object.defineProperty(y,"getScopeId",{enumerable:!0,get:function(){return I.get
186ScopeId}}),Object.defineProperty(y,"getScope",{enumerable:!0,get:function(){return I.getScope}}),Object.defineProperty(y,"getMask",{enumerable:!0,get:function(){return I.getMask}}),Object.defineProperty(y,"Reference",{enumerable:!0,get:function(){return W.default}}),Object.defineProperty(y,"ToolbarFactory",{enumerable:!0,get:function(){return U.default}}),Object.defineProperty(y,"getLayoutModules",{enumerable:!0,get:function(){return A.getLayoutModules}}),Object.defineProperty(y,"getContentModules",{enumerable:!0,get:function(){return A.getContentModules}}),Object.defineProperty(y,"getPageContentModules",{enumerable:!0,get:function(){return A.getPageContentModules}}),y})); 187define("Browser/Event",["react","UICommon/Utils","Types/entity","Types/collection","TransportCore/transport","SAP/GuestAccess","Env/UserInfo","Env/Event","Env/Env","Env/Constants","BrowserAPI/Storage","Browser/Storage","Application/Initializer","Application/Env","require","exports","BrowserAPI/Event","Browser/stomp"],(function(e,t,s,r,n,i,o,a,c,u,h,l,d,b,g,v,p){var f,m,S,y,E,w,C,_,O,D,M,P,T,N,I,B,L,R,k,A,x,W,j,H,q,$,U,F,K,G,V,Q,Y,z,J,X,Z,ee,te,se,re,ne,ie,oe,ae,ce,ue,he,le,de,be,ge,ve,pe,fe,me,Se,ye,Ee,we,Ce,_e,Oe,De,Me,Pe,Te,Ne;return Object.defineProperty(v,"__esModule",{value:!0}),f=function(e,t,s,r){"use strict";function n(e){if(e instanceof Array)return e.map(n);if(e&&e.s&&e.d){if("record"===e._type)return new s.Record({rawData:e,adapter:"adapter.sbis"});if("recordset"===e._type)return new r.RecordSet({rawData:e,adapter:"adapter.sbis"})}return e}return Object.defineProperty(t,"__esModule",{value:!0}),t.convert=void 0,t.convert=function(e){return n(JSON.parse(e))},t}(0,{},s,r),m=function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectOptions=void 0;class r{constructor(e,t,s,r,n,i,o,a,c=!1){this.sid=e,this.hash=t,this.protocol=s,this.domain=r,this.stompPath=n,this.exchange=i,this.cid=o,this.uid=a,this._isDesktop=c,this.routingVer=1,this.requireSubscribe=!1}isDesktop(){return this._isDesktop}getWebSocketUrl(){const e="http:"===this.protocol?"ws:":"wss:",t=s.LocalStorageNative.getItem("seb-no-sid")?"":`s-${this.sid}/`;return`${e}//${this.domain}${this.stompPath}${t}`}getStompPath(){return this.stompPath}static createForDesktop(e,t,s,n,i){const o=s.indexOf("https://")>-1?"https:":"http:",a=s.replace("https://","").replace("http://","");return new r(e,t,o,a,"/stomp/",a,n,i,!0)}static createByLocation(e,t,s,n,i){let o="stomp-";if(location.host.split(".").length<3)o="stomp.";return new r(e,t,location.protocol,`${o}${location.host}`,s,location.hostname,n,i)}}return t.ConnectOptions=r,t}(0,{},h),S=function(e,t){"use strict";var s;Object.defineProperty(t,"__esModule",{value:!0}),t.NOOP=t.ERR_MSG_HASH_401=t.ERR_MSG_EMPTY_SID=t.DELIVERY_EXCLUSIVE_PAGE=t.DELIVERY_COMMON=t.CHANNEL_SCOPE=void 0,function(e){e.GLOBAL="global",e.CLIENT="client",e.USER="user"}(s||(t.CHANNEL_SCOPE=s={})),t.DELIVERY_COMMON="common",t.DELIVERY_EXCLUSIVE_PAGE="page",t.ERR_MSG_EMPTY_SID="sid not found",t.ERR_MSG_HASH_401="!hash not found";return t.NOOP=()=>{},t}(0,{}),y=function(e,t){"use strict";function s(e){try{return new Event(e)}catch(t){if("undefined"==typeof document)return new r(e);const s=document.createEvent("Event");return s.initEvent(e,!1,!1),s}}Object.defineProperty(t,"__esModule",{value:!0}),t.EVENT_UNLOAD_WINDOW=t.EVENT_RECONNECT_SLAVE=t.EVENT_LOST_MAIN_TRANSPORT=t.EVENT_LATER_MAIN_TRANSPORT=t.EVENT_DISABLE_SEB=t.createME=t.create=void 0;class r{constructor(e,t={}){this.bubbles=!1,this.cancelBubble=!1,this.cancelable=!1,this.type=e;for(const e in t)this[e]=t[e]}composedPath(){return[]}initEvent(e,t,s){}preventDefault(){}stopImmediatePropagation(){}stopPropagation(){}}class n extends r{initMessageEvent(){}}return t.create=s,t.createME=function(e,t={}){try{return new MessageEvent(e,t)}catch(t){if("undefined"==typeof document)return new n(e);const s=document.createEvent("MessageEvent");return s.initEvent(e,!1,!1),s}},t.EVENT_DISABLE_SEB=s("disableservereventbus"),t.EVENT_LATER_MAIN_TRANSPORT=s("detectlatermain"),t.EVENT_LOST_MAIN_TRANSPORT=s("detectlostmain"),t.EVENT_RECONNECT_SLAVE=s("needreconnectslave"),t.EVENT_UNLOAD_WINDOW=s("unloadwindow"),t}(0,{}),E=function(e,t){"use strict";
187Object.defineProperty(t,"__esModule",{value:!0}),t.isLocksQuerySettledInstantly=void 0;let s;return t.isLocksQuerySettledInstantly=async function(){if(!s)s=async function(){const e=navigator.locks;if(!(null==e?void 0:e.query))return!1;let t;try{const s=Promise.resolve(e.query()),r=new Promise(((e,s)=>{t=window.setTimeout((()=>{s(new Error("locks.query timeout"))}),500)}));return await Promise.race([s,r]),!0}catch{return!1}finally{if(void 0!==t)window.clearTimeout(t)}}();return s},t}(0,{}),w=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PageDelivery=void 0;return t.PageDelivery=class{constructor(e){this.notifier=e}deliver(e,t,s){var r;null===(r=this.notifier)||void 0===r||r.fire(e,t,s)}destroy(){this.notifier=null}},t}(0,{}),C=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectWatchDog=void 0;return t.ConnectWatchDog=class{logConnect(e){const t=e||{},s=t.connectOptions||{getWebSocketUrl:void 0},r=s.getWebSocketUrl&&s.getWebSocketUrl()||"",n=t.transport||"";console.log(`[STOMP][Connect][${(new Date).toLocaleString()}]`,`transport: ${n}; url: ${r}`)}logDisconnect(e){console.log(`[STOMP][Disconnect][${(new Date).toLocaleString()}]`,e)}},t}(0,{}),_=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConsoleWatchDog=void 0;return t.ConsoleWatchDog=class{logStomp(e){console.log("[STOMP]",e)}logEvent(e,t,s){console.log(`[ServerEvent][${e}][${t}]`,s)}},t}(0,{}),O=_,D=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WatchDogAggregator=void 0;return t.WatchDogAggregator=class{constructor(e=[]){this.stompWatchdogs=[],this.eventWatchdogs=[],this.connectWatchdogs=[];for(const t of e)this.reg(t)}reg(e){if(e.logStomp)this.stompWatchdogs.push(e);if(function(e){return!!e.logEvent}(e))this.eventWatchdogs.push(e);if(function(e){return!!e.logConnect}(e))this.connectWatchdogs.push(e)}logStomp(e){for(const t of this.stompWatchdogs)try{t.logStomp(e)}catch(e){}}logEvent(e,t,s,r){for(const n of this.eventWatchdogs)try{n.logEvent(e,t,s,r)}catch(e){}}logConnect(e){for(const t of this.connectWatchdogs)try{t.logConnect(e)}catch(e){}}logDisconnect(e){for(const t of this.connectWatchdogs)try{t.logDisconnect(e)}catch(e){}}},t}(0,{}),M=function(e,t){"use strict";var s,r;return Object.defineProperty(t,"__esModule",{value:!0}),t.MessageFromSlave=t.MessageFromMaster=void 0,function(e){e.NewMaster="newMaster"}(s||(t.MessageFromMaster=s={})),function(e){e.NewSlave="SEB.newpage",e.Subscribe="toMasterSubscribe",e.Unsubscribe="toMasterUnsubscribe"}(r||(t.MessageFromSlave=r={})),t}(0,{}),P=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Counter=void 0;return t.Counter=class{constructor(){this.counters=new Map}inc(e){let t=this.counters.get(e);return t=(t||0)+1,this.counters.set(e,t),1===t}dec(e){let t=this.counters.get(e);if(t)return this.counters.set(e,--t),!t;else return!1}},t}(0,{}),T=function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConstDeviceHash=t.DeviceHash=void 0;class r{constructor(e="SEB.GUID",t=s.LocalStorageNative){const n=t.getItem(e);if(!n)this.id=r.generateGUID(),t.setItem(e,this.id);else this.id=n}get(e){return this.id+(e?String(Math.floor(1e4*Math.random())):"")}static generateGUID(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return`${e()}${e()}-${e()}-${e()}-${e()}-${e()}${e()}${e()}`}}t.DeviceHash=r;return t.ConstDeviceHash=class{constructor(e){this.hash=e}get(){return this.hash}},t}(0,{},l),N=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeaderBuilderFactory=void 0;class s{constructor(e){this.clientId=e.clientId,this.userId=e.userId,this.userHash=e.userHash,this.deviceHash=e.deviceHash,this.exchange=`${this.userHash}`,this.queue=`ver2-${this.deviceHash}-${this.userHash}`,this.routingVer=String(e.routingVer),this.useUnified=e.useUnified}getDestination(e){const t=["/exchange",this.exchange],s=this.getRoutingKey(e);if(s)t.push(s);return t.join("/")}getId(e){return e.getId()}getSharedSubscribeHeaders(e){return{id:this.getId(e),"x-queue-name":this.queue,routing_ver:this.routingVer}}getRoutingKey(e){let t;if("function"==typeof e.getApplication)t=e.getApplication();else if(e.isChanneled())t="channel";else if(!this.useUnified)return"";else t="main";return`${t}$${e.getChannelName()}`}
187getSubscribeHeaders(e){return this.getSharedSubscribeHeaders(e)}getInitialSubscribeHeaders(e){return{...this.getSharedSubscribeHeaders(e)}}getUnsubscribeHeaders(e){return{id:this.getId(e)}}}return t.HeaderBuilderFactory=class{constructor(e,t=!1){this.createHeaderBuilderOptions=e,this.useUnified=t}getHeaderBuilder(){const e={...this.createHeaderBuilderOptions(),useUnified:this.useUnified};return new s(e)}},t}(0,{}),I=function(e,t,s){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.isExtendedLogs=t.isSharedBusDebug=t.isSharedBusAck=t.isEventStatistics=t.isExclusiveMode=t.isRequireSubscribe=void 0,t.isRequireSubscribe=function(){if(s.LocalStorageNative.getItem("SEB/RequireSubscribe"))return Promise.resolve(!0);else return Promise.resolve(!1)},t.isExclusiveMode=function(){return!!s.LocalStorageNative.getItem("forceExclusiveMode")},t.isEventStatistics=function(){return!!s.LocalStorageNative.getItem("SEB/WriteStatistics")},t.isSharedBusAck=function(){return"true"===s.LocalStorageNative.getItem("shared-bus-ack")},t.isSharedBusDebug=function(){return"true"===s.LocalStorageNative.getItem("shared-bus-debug")},t.isExtendedLogs=function(){return"true"===s.LocalStorageNative.getItem("shared-bus-full-logs")},t}(0,{},h),B=function(e,t,s){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.handleServerTimeout=void 0,t.handleServerTimeout=function(e,t,r){return(0,s.handleTimeout)(e,"onmessage",t,r)},t}(0,{},a),L=B,R=function(e,t){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.send2Cloud=t.isMainPageContext=void 0,t.isMainPageContext=function(){if("undefined"==typeof window||"undefined"==typeof document)return!1;try{return self===top&&window.parent===window&&"Window"===window.constructor.name}catch(e){return!1}},t.send2Cloud=async function(e){return Promise.resolve()},t}(0,{}),k=R,A=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AckSender=void 0;class s{push(){}start(){}stop(){}}class r{constructor(){this.queueLen=0,this.send=this.send.bind(this)}send(){if(this.lastMessage)this.lastMessage.ack(),this.lastMessage=void 0,this.queueLen=0}push(e){if(this.lastMessage=e,this.queueLen+=1,this.queueLen>=r.LIMIT_ACK)setTimeout(this.send,0)}start(){this.timer=setInterval(this.send,r.INTERVAL)}stop(){this.send(),clearInterval(this.timer)}static createAckSender(e){return e?new r:new s}}return t.AckSender=r,r.LIMIT_ACK=9,r.INTERVAL=2e3,t}(0,{}),x=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashedCounter=void 0;return t.HashedCounter=class{constructor(e,t){this.allowCopies=e,this.hash=t,this.counter=Object.create(null),this.list=[]}add(e){const t=this.hash(e),s=this.counter[t]||0;if(this.allowCopies||!(s>0))this.counter[t]=s+1,this.list.push(e)}remove(e){const t=this.hash(e);let s=this.counter[t]||0;if(0===s)return;if(s-=1,this.counter[t]=s,0===s)return this.list=this.list.filter((e=>this.hash(e)!==t)),void delete this.counter[t];const r=this.list.indexOf(e);if(r>-1)return void this.list.splice(r,1);const n=this.list.findIndex((e=>this.hash(e)===t));if(n>-1)this.list.splice(n,1)}has(e){return!!this.counter[this.hash(e)]}all(){return this.list.slice()}filter(e){return this.list.filter(e)}get length(){return this.list.length}getCount(e){return this.counter[this.hash(e)]||0}clear(){this.list=[],this.counter=Object.create(null)}},t}(0,{}),W=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{get binaryType(){return this.ws.binaryType}set binaryType(e){this.ws.binaryType=e}get bufferedAmount(){return this.ws.bufferedAmount}get extensions(){return this.ws.extensions}get onclose(){return this.ws.onclose}set onclose(e){this.ws.onclose=e}get onerror(){return this.ws.onerror}set onerror(e){this.ws.onerror=e}get onmessage(){return this.ws.onmessage}set onmessage(e){if(e)this.ws.onmessage=t=>{if(t.data)e.call(this,Object.create(t,{data:{value:t.data}}))};else this.ws.onmessage=e}get onopen(){return this.ws.onopen}set onopen(e){this.ws.onopen=e}get protocol(){return this.ws.protocol}get readyState(){return this.ws.readyState}get url(){return this.ws.url}get CLOSED(){return this.ws.CLOSED}get CLOSING(){return this.ws.CLOSING}get CONNECTING(){return this.ws.CONNECTING}get OPEN(){return this.ws.OPEN}constructor(e,t){this.ws=new WebSocket(e,t)}send(e){this.ws.send(e)}close(){this.ws.close()}addEventListener(e,t,s=!1){this.ws.addEventListener(e,t,s)}dispatchEvent(e){return this.ws.dispatchEvent(e)}removeEventListener(e,t){this.ws.removeEventListener(e,t)}},t}(0,{}),j=function(e,t){"use strict";
187Object.defineProperty(t,"__esModule",{value:!0}),t.AdapterEvent=void 0;const s="timestamp",r="perf";class n{constructor(e){this.keyBound=IDBKeyRange.lowerBound([e],!0)}getKeyRange(){return this.keyBound}getFilter(){}}return t.AdapterEvent=class{constructor(e=1){this.version=e}getStoreParameters(){return{keyPath:[s,r],autoIncrement:!1}}prepare(e,t,n){return{channelName:e,eventName:t,body:n,[s]:Date.now(),[r]:1e6*Math.random()}}query(e){return new n(e)}getGCLimit(){return 150}getGCKeyBound(){return IDBKeyRange.upperBound([Date.now()-6e4])}getVersion(){return this.version}},t}(0,{}),H=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AdapterStomp=t.UniqueKey=void 0;class s{getKeyRange(){}getFilter(e){return t=>{var s;const r=null===(s=t.headers)||void 0===s?void 0:s["event-type"];if(r)return r.match(e)}}}class r{constructor(){this.lastKeys=[],this.lastTimestamp=0}getKey(e){let t=this.createRandomKey(e);if(e===this.lastTimestamp){let s=0;for(;s++<=r.maxKeyIndex&&this.lastKeys.includes(t);)t=this.createRandomKey(e)}else this.lastTimestamp=e,this.lastKeys.length=0;return this.lastKeys.push(t),t}createRandomKey(e){return r.getKey(e)+Math.floor(Math.random()*r.maxKeyIndex)}static getKey(e){return e*r.maxKeyIndex}static getTimestamp(e){const t=Math.ceil(Math.log(e)/Math.log(10));if(13===t)return e;else if(t<13)return e*10**(13-t);return Math.floor(e/this.maxKeyIndex)}}t.UniqueKey=r,r.maxKeyIndex=100;class n{getStoreParameters(){return{keyPath:"timestamp",autoIncrement:!1}}prepare(e){return{headers:e.headers,body:e.body,command:e.command,timestamp:n.key.getKey(Date.now())}}query(){return new s}getGCLimit(){return 150}getGCKeyBound(){return IDBKeyRange.upperBound(r.getKey(Date.now()-6e4))}getVersion(){return 1}}return t.AdapterStomp=n,n.key=new r,t}(0,{}),q=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Reader=void 0;return t.Reader=class{constructor(e,t,s){this.db=e,this.storeName=t,this.adapter=s}query(...e){const t=this.adapter.query(...e);return new Promise(((e,s)=>{const r=this.db.transaction(this.storeName,"readonly").objectStore(this.storeName).openCursor(t.getKeyRange()),n=[];r.onsuccess=()=>{const t=r.result;if(!t)return e(n);if(t.value)n.push(t.value);t.continue()},r.onerror=s})).then((e=>{const s=t.getFilter();if(!s)return e;else return e.filter(s)}))}},t}(0,{}),$=function(e,t){"use strict";function s(e){return e.hasOwnProperty("tid")}var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.EventsDB=t.FakeEventsDB=t.StoreName=void 0,function(e){e.eventTypes="event-types",e.tabs="tabs",e.connection="connectionLogs",e.events="events",e.stompErrors="stompErrors"}(r||(t.StoreName=r={}));const i={[r.tabs]:"tid",[r.eventTypes]:"et"};t.FakeEventsDB=class{constructor(){this.getTabId=()=>"",this.getTabIdKey=()=>"",this.clearCache=()=>{},this.isInCache=()=>!1,this.getFirstRecord=()=>Promise.resolve(void 0),this.getCount=()=>Promise.resolve(0),this.onEach=()=>Promise.resolve(),this.delete=()=>Promise.resolve(),this.read=()=>Promise.resolve(null),this.writeDelayed=()=>Promise.resolve(),this.write=()=>Promise.resolve("")}isOpened(){return!1}isOpening(){return!1}getDB(){}};let o;!function(e){e.opened="opened",e.closed="closed",e.opening="opening"}(n||(n={}));class a{constructor(){this.idxCache={[r.eventTypes]:new Map,[r.tabs]:new Map},this.idCache={[r.eventTypes]:new Map,[r.tabs]:new Map},this.writeQueue=[],this.dbState=n.closed}init(e,t){this.db=e,this.tabId=t;const s=()=>this.saveTabIdKey().then(this.writeDelayed.bind(this));s().catch((e=>{if("ConstraintError"!==e.name)this.writeDelayedTimeout=setTimeout((()=>{s().catch((()=>{}))}),a.WRITE_DELAYED_TIMEOUT)}))}isOpened(){return this.dbState===n.opened}isOpening(){return this.dbState===n.opening}getDB(){return this.db}setDBOpened(){this.dbState=n.opened}setDBClosed(){this.dbState=n.closed}setDBOpening(){this.dbState=n.opening}getTabId(){return this.tabId}getTabIdKey(){return this.tabIdKey}clearCache(){this.idxCache[r.eventTypes].clear(),this.idxCache[r.tabs].clear(),this.idCache[r.eventTypes].clear(),this.idCache[r.tabs].clear()}isInCache(e,t){return this.idxCache[e].has(t)}isIndexedDBAvailable(){const e=this.db.objectStoreNames;if(!e.length)return!1;try{this.db.transaction(e[0]).abort()}catch(e){return!1}return!0}accessToDB(){return new Promise(((e,t)=>{if(this.dbState===n.opened&&!this.isIndexedDBAvailable())this.resetInstance(),this.reopen(0);switch(this.dbState){case n.opened:return void e();case n.opening:return void t(new Error("IndexedDB is opening..."));case n.closed:t(new Error("IndexedDB is closed"))}}))}getStore(e,t){return this.db.transaction(e,t).objectStore(e)}reopen(e){if(this.dbState===n.closed)setTimeout((()=>{a.open().then((e=>{this.init(e,this.tabId)})).catch((()=>{}))}),e)}resetInstance(){clearTimeout(this.writeDelayedTimeout),this.db=void 0,this.tabIdKey=void 0,this.clearCache(),this.setDBClosed()}onAbnormalClose(){this.resetInstance(),this.reopen(5e3)}getFirstRecord(e){return this.accessToDB().then((()=>new Promise(((t,s)=>{const r=this.getStore(e).openCursor();r.onsuccess=()=>{const e=r.result;t(e&&e.value)},r.onerror=()=>s(r.error)}))))}getCount(e){return this.accessToDB().then((()=>new Promise(((t,s)=>{const r=this.getStore(e).count();r.onsuccess=()=>t(r.result),r.onerror=()=>s(r.error)}))))}onEach(e,t,s){return this.accessToDB().then((()=>new Promise(((r,n)=>{const i=this.getStore(e).openCursor(null,t);i.onsuccess=()=>{const e=i.result;if(e)s(e.value),e.continue();else r()},i.onerror=()=>n(i.error)}))))}delete(e,t){return this.accessToDB().then((()=>new Promise(((s,r)=>
187{const n=t?this.getStore(e,"readwrite").delete(t):this.getStore(e,"readwrite").clear();n.onsuccess=()=>{const r=this.idxCache[e],n=this.idCache[e];if(!t&&r)r.clear();if(!t&&n)n.clear();if(t&&r)r.delete(t.lower);s()},n.onerror=()=>r(n.error)}))))}read(e,t,s){return this.accessToDB().then((()=>new Promise(((r,n)=>{var i,o;const a="id"===t?null===(i=this.idCache[e])||void 0===i?void 0:i.get(s):null===(o=this.idxCache[e])||void 0===o?void 0:o.get(s);if(a)return r(a);const c=this.getStore(e),u=t===c.keyPath?c.get(s):c.index(`${t}_idx`).get(s);u.onsuccess=()=>{const n=u.result;if(n&&this.idCache[e]){if(t!==c.keyPath)this.idxCache[e].set(s,n);if("id"===t)this.idCache[e].set(s,n)}r(n)},u.onerror=()=>n(u.error)}))))}writeDelayed(){if(!this.writeQueue.length)return Promise.resolve();else return Promise.all(this.writeQueue.map(((e,t)=>{if(!e)return Promise.resolve();const[r,n]=e;if(s(n)&&void 0===n.tid)n.tid=this.tabIdKey;return this.write(r,n).then((()=>{this.writeQueue[t]=void 0}))})))}write(e,t){return this.accessToDB().then((()=>new Promise(((s,r)=>{const n=this.getStore(e,"readwrite").add(t);n.onsuccess=()=>{if(this.idxCache[e])this.idxCache[e].set(t[i[e]],{...t,id:n.result});s(n.result)},n.onerror=()=>r(n.error)}))),(()=>(this.writeQueue.push([e,t]),"")))}saveTabIdKey(){if(this.tabIdKey)return Promise.resolve();const e={tid:this.tabId,url:location.href};return this.write(r.tabs,e).catch((e=>{if("ConstraintError"===e.name)return this.read(r.tabs,"tid",this.tabId);else throw e})).then((e=>{this.tabIdKey=s(e)?e.id:e}))}static open(){return o=new Promise(((e,t)=>{if("object"!=typeof indexedDB||null===indexedDB)return t(new Error("РокÑÑжении Ð½ÐµÑ indexedDB"));let s;const n=a.getInstance();if(n.isOpening())return e(o);if(n.isOpened()){const t=n.getDB();if(t)return e(t)}try{n.setDBOpening(),s=indexedDB.open(a.NAME,2)}catch(e){return t(e)}s.onupgradeneeded=()=>{const e=s.result;e.onerror=()=>{};try{e.deleteObjectStore(r.events),e.deleteObjectStore(r.connection),e.deleteObjectStore(r.eventTypes),e.deleteObjectStore(r.tabs),e.deleteObjectStore(r.stompErrors)}catch(e){}try{e.createObjectStore(r.events,{keyPath:"t"}),e.createObjectStore(r.connection,{keyPath:"t"}),e.createObjectStore(r.stompErrors,{keyPath:"t"});const t=i[r.eventTypes],s=i[r.tabs];e.createObjectStore(r.eventTypes,{keyPath:"id",autoIncrement:!0}).createIndex(`${t}_idx`,t,{unique:!0}),e.createObjectStore(r.tabs,{keyPath:"id",autoIncrement:!0}).createIndex(`${s}_idx`,s,{unique:!0})}catch(e){}},s.onsuccess=()=>{const t=s.result;t.onclose=n.onAbnormalClose.bind(n),n.setDBOpened(),e(t)},s.onerror=()=>{const e=s.error?`${s.error.name}: ${s.error.message}`:"You have no rights to use IndexDB.";return t(e),null==n||n.setDBClosed(),!0}})),o}static getInstance(){if(!a.instance)a.instance=new a;return a.instance}}return t.EventsDB=a,a.NAME="sbis.seb.events",a.WRITE_DELAYED_TIMEOUT=5e3,t}(0,{}),U=$,F=function(e,t,s,r,n){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.Notifier=void 0,function(e){e.READY="onready",e.DISCONNECT="ondisconnect"}(i||(i={}));return t.Notifier=class{constructor(e=new n.WatchDogAggregator){this.watcher=e,this.readyStatuses={}}setWatcher(e){this.watcher=e}fire(e,t,n,o){if(this.isSkip(e,t))return;let a;if(s.Bus.hasChannel(e)&&s.Bus.channel(e).hasEventHandlers(t)||t===i.READY){if(n)a=(0,r.convert)(n);s.Bus.channel(e).notify(t,a,n)}this.watcher.logEvent(e,t,a||n,o)}isSkip(e,t){if(t===i.READY){if(this.readyStatuses[e])return!0;this.readyStatuses[e]=!0,s.Bus.channel(e).setEventQueueSize(i.READY,1)}if(t===i.DISCONNECT)this.readyStatuses[e]=!1,s.Bus.channel(e).setEventQueueSize(i.READY,0);return!1}},t}(0,{},a,f,D),K=function(e,t,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSubscription=t.ChanneledSubscribe=t.Subscribe=void 0;class n{constructor(e,t,r=!1){this.channelName=e,this.type=t,this.channeled=r,this.id=s.Guid.create()}isChanneled(){return this.channeled}hash(){const e=this.isChanneled()?"ch":"cm";return`${this.channelName}::${e}::${this.getDeliveryType()}`}getDeliveryType(){return this.type}getChannelName(){return this.channelName}toJSON(){return{channelName:this.channelName,channeled:this.channeled}}getId(){return this.id}}t.Subscribe=n;class i extends n{constructor(e,t,s){super(e,t,!0),this.application=s}hash(){return`${super.hash()}::null::${this.getApplication()}`}getApplication(){return"mobile"}toJSON(){return{...super.toJSON(),application:this.application}}}return t.ChanneledSubscribe=i,t.createSubscription=function(e,t=!1,s=!1,o=""){const a=s?r.DELIVERY_EXCLUSIVE_PAGE:r.DELIVERY_COMMON;if(!t)return new n(e,a);else return new i(e,a,o)},t}(0,{},s,S),G=function(e,t,s){"use strict";
187Object.defineProperty(t,"__esModule",{value:!0}),t.createSubscribeContainer=void 0;class r{constructor(){this.common=new s.HashedCounter(!1,r.hash),this.channeled=new s.HashedCounter(!0,r.hash)}add(e){if(e.isChanneled())return this.channeled.add(e);this.common.add(e)}remove(e){if(e.isChanneled())return this.channeled.remove(e);this.common.remove(e)}has(e){return this.common.has(e)||this.channeled.has(e)}all(){return this.common.all().concat(this.channeled.all())}clear(){this.common.clear(),this.channeled.clear()}removeByName(e){const t=this.removeByNameFromHash(this.common,e),s=this.removeByNameFromHash(this.channeled,e);return t.concat(s)}getByName(e){const t=this.common.filter((t=>t.getChannelName()===e)),s=this.channeled.filter((t=>t.getChannelName()===e));return t.concat(s)}removeByNameFromHash(e,t){const s=e.filter((e=>e.getChannelName()===t));for(const t of s)e.remove(t);return s}hasChanneled(){return this.channeled.length>0}addOnce(e){if(this.has(e))return!1;else return this.add(e),!0}static hash(e){return e.hash()}}class n{constructor(){this.counter=new s.HashedCounter(!1,n.hash),this.removed=new s.HashedCounter(!1,n.hash)}add(e){this.counter.add(e)}remove(e){this.removed.add(e),this.counter.remove(e)}has(e){return this.counter.has(e)}all(){return this.counter.all()}clear(){this.counter.clear()}removeByName(e){const t=this.counter.filter((t=>t.getChannelName()===e));for(const e of t)this.counter.remove(e),this.removed.add(e);return t}getByName(e){const t=this.removed.filter((t=>t.getChannelName()===e)),s=this.counter.filter((t=>t.getChannelName()===e));return t.concat(s)}hasChanneled(){return this.counter.length>0}addOnce(e){if(this.has(e))return!1;else return this.add(e),!0}static hash(e){return e.hash()}}return t.createSubscribeContainer=function(e){return!e?new n:new r},t}(0,{},x),V=function(e,t,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectWriterWatchDog=void 0;class n{constructor(){this.connected=!1}logConnect(e={}){this.connected=!0;const t=n.key.getKey(Date.now()),s=e.connectOptions||{getWebSocketUrl:void 0},i=e.transport||"";this.url=s.getWebSocketUrl&&s.getWebSocketUrl()||"",this.transportId=n.TRANSPORT_NAMES.findIndex((e=>e===i));const o=r.EventsDB.getInstance(),a={tid:o.getTabIdKey(),t,url:this.url,tr:this.transportId,c:1,r:-1};o.write(r.StoreName.connection,a)}logDisconnect(e){if(!this.connected&&e===n.DISCONNECTION_REASONS[0])return;this.connected=!1;const t=n.key.getKey(Date.now()),s=r.EventsDB.getInstance(),i=s.getTabIdKey();let o;if("string"==typeof e)o=n.DISCONNECTION_REASONS.findIndex((t=>t===e));else o=`${e.code}: ${e.reason}`;const a={tid:i,t,url:this.url,tr:this.transportId,c:0,r:o};s.write(r.StoreName.connection,a)}}return t.ConnectWriterWatchDog=n,n.key=new s.UniqueKey,n.TRANSPORT_NAMES=["LocalPageTransport","LocalMainTransport","LocalSlaveTransport"],n.DISCONNECTION_REASONS=["Wake Up","Manual disconnect"],t}(0,{},H,$),Q=function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExclusiveProxy=void 0;class r extends Error{constructor(){super("Need subscribe connect to subscribe"),this.name="SubscribeExclusiveError"}}return t.ExclusiveProxy=class{constructor(e,t){this.transport=e,this.isExclusive=t}subscribe(e){if(e.getDeliveryType()!==s.DELIVERY_COMMON&&!this.isExclusive)throw new r;this.transport.subscribe(e)}unsubscribe(e){this.transport.unsubscribe(e)}setDelivery(e){this.transport.setDelivery(e)}destroy(){this.transport.destroy()}setWatchDog(e){this.transport.setWatchDog(e)}},t}(0,{},S),Y=function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Transport=void 0;return t.Transport=class{constructor(){this.watcher=new s.WatchDogAggregator}setDelivery(e){this.delivery=e}setWatchDog(e){this.watcher=e}destroy(){var e;null===(e=this.delivery)||void 0===e||e.destroy()}deliver(e,t,s,r){if(this.delivery)this.delivery.deliver(e,t,s,r)}},t}(0,{},D),z=function(e,t,s,r,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.desktopLogger=void 0,t.default=function(e,t){if(!(0,i.isExtendedLogs)())return Promise.resolve();else return(0,r.getReadyPromise)().then((()=>{s.logger[e](t)}))};return t.desktopLogger=(e,t)=>{if(n.detection.isDesktop)(0,r.getReadyPromise)().then((()=>{s.logger[e](t)}))},t}(0,{},b,d,c,I),J=function(e,t,s,r,n,i,o){"use strict";function a(e){return null===e||"string"==typeof e||"number"==typeof e||void 0===e||e instanceof Date||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||Array.isArray(e)&&e.every(a)}
187Object.defineProperty(t,"__esModule",{value:!0}),t.EventLogWriter=void 0;const c=36e5,u=new o.FakeEventsDB;class h{constructor(e){this.db=e,this.broadcast=new i.Broadcast,this.clearStorage=this.clearStorage.bind(this),n.Bus.channel("errors").subscribe("onAuthError",this.clearStorage).subscribe("authLogout",this.clearStorage),this.broadcast.subscribe("authError",this.clearStorage).subscribe("authLogout",this.clearStorage),this.garbageCollection(),this.garbageCollection=this.garbageCollection.bind(this),this.gcIntervalId=setInterval(this.garbageCollection,h.GC_INTERVAL)}getKey(e,t,r){if(!this.db)return Promise.reject();else return this.db.read(e,t,r).then((t=>{if(void 0===t){let t;if(e===o.StoreName.eventTypes)t={et:r};else t={tid:r,url:s.location.href};return this.db.write(e,t)}return t.id}))}garbageCollection(){let e;Promise.all([this.db.getFirstRecord("events"),this.db.getCount("events")]).then((([t,s])=>{if(s&&s>h.GC_COUNT_LIMIT)e=IDBKeyRange.upperBound(r.UniqueKey.getKey(Date.now()-h.GC_INTERVAL));if(t){const{t:s}=t;if(Date.now()-r.UniqueKey.getTimestamp(s)>h.GC_TIME_LIMIT)e=IDBKeyRange.upperBound(r.UniqueKey.getKey(Date.now()-h.GC_TIME_LIMIT))}if(e)this.deleteLogs(e)})).catch((()=>{}))}deleteLogs(e){const t=new Set,s=new Set,r=[],n=[];return this.db.delete(o.StoreName.events,e).then((()=>this.db.delete(o.StoreName.connection,e))).then((()=>this.db.delete(o.StoreName.stompErrors,e))).then((()=>(this.db.clearCache(),Promise.all([this.db.onEach(o.StoreName.events,"prev",(({tid:e,et:r})=>{t.add(e),s.add(r)})),this.db.onEach(o.StoreName.connection,"prev",(({tid:e})=>t.add(e))),this.db.onEach(o.StoreName.stompErrors,"prev",(({tid:e})=>t.add(e))),this.db.onEach(o.StoreName.tabs,"next",(e=>r.push(e))),this.db.onEach(o.StoreName.eventTypes,"next",(e=>n.push(e)))])))).then((()=>
187{if(r.length)for(const e of r)if(e){const{id:s,tid:r}=e;if(s&&!t.has(s)&&!this.db.isInCache(o.StoreName.tabs,r)){if("string"!=typeof r)return;this.db.delete(o.StoreName.tabs,IDBKeyRange.only(r)).catch((()=>{}))}}if(n.length)for(const e of n)if(e){const{id:t,et:r}=e;if(t&&!s.has(t)&&!this.db.isInCache(o.StoreName.eventTypes,r)){if(!a(t))return;this.db.delete(o.StoreName.eventTypes,IDBKeyRange.only(t)).catch((()=>{}))}}}))}clearStorage(){h.STORE_NAMES.forEach((e=>this.db.delete(e)))}write(e){const t=Date.now(),s=h.DELIVERY.findIndex((t=>t===e.headers.delivery)),{timestamp:r,"X-Uniq-ID":n,"event-type":i}=e.headers,a=this.db.getTabIdKey(),c=a?Promise.resolve(a):this.getKey(o.StoreName.tabs,"tid",this.db.getTabId()),u=this.getKey(o.StoreName.eventTypes,"et",i);return Promise.all([c,u]).then((([e,i])=>{const a={t,st:Number(r),tid:e,et:i,d:s,uid:n};this.writeTillSuccess(t,(e=>(a.t=e,this.db.write(o.StoreName.events,a))))})).catch((()=>{}))}writeTillSuccess(e,t,s=100){if(0===s)return;const r=h.key.getKey(e);t(r).catch((r=>{if("ConstraintError"===r.name)this.writeTillSuccess(e,t,s-1)}))}destructor(){clearInterval(this.gcIntervalId),this.write=()=>Promise.resolve(),this.db=u,n.Bus.channel("errors").unsubscribe("onAuthError",this.clearStorage).unsubscribe("authLogout",this.clearStorage),this.broadcast.unsubscribe("authError",this.clearStorage).unsubscribe("authLogout",this.clearStorage)}}return t.EventLogWriter=h,h.GC_INTERVAL=4*c,h.GC_TIME_LIMIT=24*c,h.GC_COUNT_LIMIT=1e9,h.STORE_NAMES=["events","connectionLogs","stompErrors","event-types","tabs"],h.DELIVERY=["global","client","user"],h.key=new r.UniqueKey,t}(0,{},b,H,a,p,$),X=function(e,t,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.writeStompErrorToDB=void 0;const n=new r.UniqueKey;return t.writeStompErrorToDB=function(e,t=""){try{const r=s.EventsDB.getInstance(),i=r.getTabIdKey(),o=n.getKey(Date.now()),a=e,c={tid:i,t:o,url:t,n:e.name,m:e.message,s:e.stack,d:null==a?void 0:a.details};r.write(s.StoreName.stompErrors,c)}catch(e){}},t}(0,{},$,H),Z=function(e,t,s,r,n,i,o){"use strict";function a(){let e,t;return{promise:new Promise(((s,r)=>{e=s,t=r})),resolve:e,reject:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.MasterSlaveManager=void 0;const c="stealMaster";class u{get isMaster(){return"master"===this.status}get isStopped(){return this._isStopped}constructor(e=navigator.locks){this.locks=e,this.lockName="masterslave",this._isStopped=!1,this.channel=new s.Channel,this._statusChannel=new BroadcastChannel("pingMaster"),this.onBeginMaster=()=>{if(this.abortController=void 0,this.masterLifetime=a(),this.setStatus("master"),this._setDetector(),this.statusRequest){const e=this.statusRequest;this.statusRequest=void 0,e.resolve(this.status)}return this.masterLifetime.promise},this.onEndMaster=()=>(this.status=void 0,this.masterLifetime=void 0,this._removeDetector(),this.requestMasterStatus()),this.onRequestError=e=>{if(this.status=void 0,this.masterLifetime=void 0,this.abortController=void 0,this.statusRequest){const t=this.statusRequest;this.statusRequest=void 0,t.reject(e)}if("AbortError"!==(null==e?void 0:e.name))throw e},this.onFreeze=()=>{if(this.isMaster)this.releaseMasterStatus()}}requestMasterStatus(){this.abortController=new AbortController;const e=!!sessionStorage.getItem(c);sessionStorage.removeItem(c);const t=e?{steal:e}:{signal:this.abortController.signal};return this.locks.request(this.lockName,t,this.onBeginMaster).then(this.onEndMaster,this.onRequestError)}async masterExists(){return this.locks.query().then((e=>{var t;return Boolean(null===(t=e.held)||void 0===t?void 0:t.some((({name:e})=>e===this.lockName)))})).catch((e=>{i.Logger.error(null==e?void 0:e.message,void 0,e,"SEB_ERROR"),(0,o.send2Cloud)({context:"оÑибка пÑи обнаÑÑжении маÑÑеÑа!",action:"masterSlave"});const t=new Date;throw(0,n.default)("error",`[SEB_LOGS]:: ${t.getHours()}-${t.getMinutes()}-${t.getSeconds()}\n оÑибка пÑи обнаÑÑжении маÑÑеÑа! ${e.message} ${e.details}`),e}))}setStatus(e){if(this.status!==e)if(this.status=e,e)window.dispatchEvent(new CustomEvent("roleChanged",{detail:{role:e}})),this.channel.notify("statusChanged",e,this.prevStatus),this.prevStatus=e}subscribe(e){this.channel.subscribe("statusChanged",e)}unsubscribe(e){this.channel.unsubscribe("statusChanged",e)}releaseMasterStatus(){var e;null===(e=this.masterLifetime)||void 0===e||e.resolve(void 0)}getStatus(){if(this.isStopped)return Promise.reject(this.error);if(this.status)return Promise.resolve(this.status);if(this.statusRequest)return this.statusRequest.promise;else return this.masterExists().then((e=>{if(this.isStopped)throw this.error;if(!e)return this.statusRequest=a(),this.statusRequest.promise;if(!this.status)this.setStatus("slave");return this.status}))}bindFreezeListener(){this.unbindFreezeListener(),this.unbindPageFreeze=(0,r.onPageFreeze)(this.onFreeze,{capture:!0})}unbindFreezeListener(){var e;null===(e=this.unbindPageFreeze)||void 0===e||e.call(this),this.unbindPageFreeze=void 0}start(){this.error=void 0,this._isStopped=!1,this.bindFreezeListener(),this.requestMasterStatus().catch((e=>{this.error=e||new Error("Ðевозможно ÑÑÑановиÑÑ Ð³Ð»Ð°Ð²Ð½ÑÑ Ð²ÐºÐ»Ð°Ð´ÐºÑ."),this._isStopped=!0}))}stop(e){var t,s;if(this._isStopped=!0,this.error=e,null===(t=this.abortController)||void 0===t||t.abort(),null===(s=this.masterLifetime)||void 0===s||s.reject(),this.unbindFreezeListener(),e)(0,n.default)("error",e)}_setDetector(){this._statusChannel.addEventListener("message",(()=>{alert("im a master")}))}_removeDetector(){this._statusChannel.close()}static get instance(){if(!u._instance)u._instance=new u,u._instance.start();return u._instance}static stealMaster(){sessionStorage.setItem(c,"true")}}return t.MasterSlaveManager=u,t}(0,{},a,a,z,t,R),ee=Z,te=function(e,t,s,r){"use strict";
187Object.defineProperty(t,"__esModule",{value:!0}),t.ChannelManager=void 0;return t.ChannelManager=class{constructor(){this.channels=new Map}get(e){let t=this.channels.get(e);if(!t)t={channel:(0,s.createBroadcastChannel)(e),handlers:[]},this.channels.set(e,t);return t}send(e,t){return this.get(e).channel.postMessage(t),this}close(){this.channels.forEach((({channel:e,handlers:t})=>{for(const s of t)e.removeEventListener("message",s);e.close()})),(0,r.default)("log","[SEB_LOGS]:: BroadCastChannelManager close"),this.channels.clear()}subscribe(e,t){const{channel:s,handlers:n}=this.get(e);return(0,r.default)("log",`[SEB_LOGS]:: BroadCastChannelManager subscribe ${e} `),s.addEventListener("message",t),n.push(t),this}closeChannel(e){const{channel:t}=this.get(e);return(0,r.default)("log",`[SEB_LOGS]:: BroadCastChannelManager closeChannel ${e} `),this.channels.delete(e),t.onmessage=null,t.close(),this}},t}(0,{},p,z),se=function(e,t,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Writer=void 0;class n{constructor(e,t,s){this.db=e,this.storeName=t,this.adapter=s,this.garbageCollection=this.garbageCollection.bind(this),this.gcIntervalId=setInterval(this.garbageCollection,n.GC_INTERVAL)}write(e,t=10){const r=this.adapter.prepare(...e);try{const n=this.store.add(r);n.onerror=i=>{var o;if(i.preventDefault(),"ConstraintError"===(null===(o=n.error)||void 0===o?void 0:o.name))if(t<=0)this.logConstraintError(r);else this.write(e,t-1);else(0,s.default)("error",`[STOMP][Writer] ${n.error}`)}}catch(e){return!1}return!0}createStore(){try{this.db.deleteObjectStore(this.storeName)}catch(e){}try{this.db.createObjectStore(this.storeName,this.adapter.getStoreParameters())}catch(e){return!1}return!0}get store(){return this.db.transaction(this.storeName,"readwrite").objectStore(this.storeName)}garbageCollection(){try{const e=this.store,t=e.count();t.onsuccess=()=>{if(!this.adapter)return;if(t.result<=this.adapter.getGCLimit())return;if(!(t.result>1e3))e.delete(this.adapter.getGCKeyBound());else try{e.clear()}catch{}},t.onerror=r.NOOP}catch(e){return!1}return!0}logConstraintError(e){var t;if(!this.adapter)return;let r="";const n=null===(t=this.adapter)||void 0===t?void 0:t.getStoreParameters().keyPath;if(n)r=(Array.isArray(n)?n:[n]).map((t=>e[t])).toString();(0,s.default)("error",`[STOMP][Writer] ConstraintError key=${r}`)}destructor(){clearInterval(this.gcIntervalId),this.write=()=>!1,this.createStore=()=>!1,this.db=void 0,this.adapter=void 0}}return t.Writer=n,n.GC_INTERVAL=1e4,t}(0,{},z,S),re=function(e,t,s,r,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequestAttempt=void 0;class a{constructor(e){this.requestStartTime=0,this.maxCount=0,this.delay=new n.GrowingValue({...a.defaultDelayOptions,...e}),this.url=e.url||"",this.maxCount=e.maxCount||0}start(){this.requestStartTime=Date.now()}success(){this.logTimeout(),a.notifyResult()}waitAfterError(e){const t=this.delay.count;if(401===e.status)r.Bus.channel("errors").notify("onAuthError");if(this.maxCount>0&&this.maxCount<=t)return Promise.reject(e);if(t>0&&!(t%a.TRY_COUNT_BEFORE_REPORT))a.notifyResult(e);if(0===e.httpError)this.delay.reset();const s=this.delay.next().value;return new Promise((e=>setTimeout(e,s)))}logTimeout(){const e=Date.now()-(this.requestStartTime||0);if(e>a.REQUEST_LIMIT)(0,s.default)("warn",`[STOMP][timeout] ${this.url} request took ${e}ms`)}static notifyResult(e){if(r.Bus.channel("errors").notify("onStompError",e),e)(0,o.writeStompErrorToDB)(e);if(e)(0,i.send2Cloud)({context:"fail after all try",action:`${e.name} ${e.message}`})}}return t.RequestAttempt=a,a.REQUEST_LIMIT=2e3,a.TRY_COUNT_BEFORE_REPORT=5,a.defaultDelayOptions={initialValue:1e3,maxValue:6e4,minStep:0,maxStep:1e4},t}(0,{},z,a,n,R,X),ne=re,ie=function(e,t,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MasterDelivery=void 0;return t.MasterDelivery=class{constructor(e,t=new r.ChannelManager){this.notifier=e,this.broadcast=t}deliver(e,t,r,n){this.notifier.fire(e,t,r,n),(0,s.default)("log",`[SEB_LOGS]:: masterDelivery send to ${e} ${t}`),this.broadcast.send(e,{channelName:e,eventName:t,rawData:r,eventInfo:n})}destroy(){this.broadcast.close()}},t}(0,{},z,te),oe=function(e,t,s,r,n){"use strict";
187Object.defineProperty(t,"__esModule",{value:!0}),t.SlaveDelivery=void 0;return t.SlaveDelivery=class{constructor(e,t=new r.ChannelManager){this.notifier=e,this.broadcast=t,this.onmessageHandler=e=>{(0,n.default)("log",`[SEB_LOGS]:: slaveDelivery got messega from master ${e.data.channelName} ${e.data.eventName} `),this.notifier.fire(e.data.channelName,e.data.eventName,e.data.rawData,e.data.eventInfo)}}subscribe(e){(0,n.default)("log",`[SEB_LOGS]:: slaveDelivery subscribe ${e.getChannelName()}`),this.broadcast.subscribe(e.getChannelName(),this.onmessageHandler).send(s.MessageFromSlave.Subscribe,e)}unsubscribe(e){if((0,n.default)("log",`[SEB_LOGS]:: slaveDelivery unsubscribe ${e.getChannelName()}`),e.isChanneled())this.broadcast.send(s.MessageFromSlave.Unsubscribe,e);else this.broadcast.closeChannel(e.getChannelName())}deliver(e,t,s,r){(0,n.default)("log",`[SEB_LOGS]:: slaveDelivery to current tab ${e} ${t}`),this.notifier.fire(e,t,s,r)}destroy(){this.broadcast.close()}},t}(0,{},M,te,z),ae=function(e,t,s,r,n,i,o,a,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocalSlaveTransport=void 0;class u extends n.Transport{constructor(e){super(),this.broadcast=new a.ChannelManager,this.disconnectCallback=s.NOOP,this.onNewMaster=()=>{if(this.subscribes.hasChanneled())this.subscribes.all().forEach((e=>{var t,s;if(this.requireSubscribe||e.isChanneled())null===(s=null===(t=this.delivery)||void 0===t?void 0:t.subscribe)||void 0===s||s.call(t,e)}))},this.onPageHide=e=>{if(!e.persisted)this.sendUnsubscribeAll(),this.disconnectCallback(i.EVENT_UNLOAD_WINDOW)},this.requireSubscribe=Boolean(e.requireSubscribe),this.subscribes=(0,o.createSubscribeContainer)(this.requireSubscribe),this.broadcast.subscribe(r.MessageFromMaster.NewMaster,this.onNewMaster).send(r.MessageFromSlave.NewSlave,""),window.addEventListener("pagehide",this.onPageHide)}getLocalName(){return u.getLocalName()}subscribe(e){var t,s;this.subscribes.add(e),null===(s=null===(t=this.delivery)||void 0===t?void 0:t.subscribe)||void 0===s||s.call(t,e),(0,c.default)("log",`[SEB_LOGS]:: Slave subscribe ${e.getChannelName()}`)}unsubscribe(e){var t,s;this.subscribes.remove(e),null===(s=null===(t=this.delivery)||void 0===t?void 0:t.unsubscribe)||void 0===s||s.call(t,e),(0,c.default)("log",`[SEB_LOGS]:: Slave unsubscribe ${e.getChannelName()}`)}setDisconnectHandler(e){this.disconnectCallback=e}sendUnsubscribeAll(){var e;if(null===(e=this.delivery)||void 0===e?void 0:e.unsubscribe)for(const e of this.subscribes.all())this.delivery.unsubscribe(e);this.subscribes.clear(),this.broadcast.close()}destroy(){this.sendUnsubscribeAll(),this.broadcast.close(),window.removeEventListener("pagehide",this.onPageHide),this.disconnectCallback=s.NOOP,super.destroy()}disconnect(e){this.disconnectCallback(e)}static getLocalName(){return"LocalSlaveTransport"}}return t.LocalSlaveTransport=u,t}(0,{},S,M,Y,y,G,te,z),ce=function(e,t,s,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatWatchdog=void 0;class i{logEvent(e,t,o,a){if("onmessage"!==t||!a)return;const c=indexedDB.open(i.dbName);c.onsuccess=()=>{const t=s.Bus.hasChannel(e)&&s.Bus.channel(e).hasEventHandlers("onmessage"),r={...a,n:e,ms:n.MasterSlaveManager.instance.isMaster?1:0,u:t?1:0};c.result.transaction([i.storeName],"readwrite").objectStore(i.storeName).add(r)},c.onerror=()=>{(0,r.default)("error",c.error)},c.onupgradeneeded=()=>{c.result.createObjectStore(i.storeName,{autoIncrement:!0})}}}return t.StatWatchdog=i,i.dbName="stompData",i.storeName="messages",t}(0,{},a,z,Z),ue=function(e,t,s,r,n,i,o){"use strict";if(Object.defineProperty(t,"__esModule",{value:!0}),t.Connector=void 0,"undefined"!=typeof indexedDB&&null!==indexedDB&&indexedDB instanceof IDBFactory)try{const e=indexedDB.deleteDatabase("sbis.seb");e.onerror=t=>{t.preventDefault();const s=e.error?`${e.error.name}: ${e.error.message}`:"You have no rights to use IndexDB.";console.warn(`[STOMP][Connector] Cannot remove old DB. ${s}`)}}catch(e){console.warn(`[STOMP][Connector] Cannot remove old DB. ${(null==e?void 0:e.message)||""}`)}class a{constructor(e,t,s){function r(){e.transaction([t],"readwrite").objectStore(t).clear()}this.db=e,this.storeName=t,this.adapter=s,i.Bus.channel("errors").subscribe("onAuthError",r).subscribe("authLogout",r),
187(new n.Broadcast).subscribe("authError",r).subscribe("authLogout",r)}createWriter(){return new s.Writer(this.db,this.storeName,this.adapter)}createReader(){return new r.Reader(this.db,this.storeName,this.adapter)}static connect(e,t,r){return new Promise(((n,i)=>{if("object"!=typeof indexedDB||null===indexedDB)return i(new Error("РокÑÑжении Ð½ÐµÑ indexedDB"));let c;try{c=indexedDB.open(e,r.getVersion())}catch(e){return i(e)}c.onupgradeneeded=function(){const e=this.result;e.onerror=o.NOOP,new s.Writer(e,t,r).createStore()},c.onsuccess=function(){const e=this.result;n(new a(e,t,r))},c.onerror=()=>{const e=c.error?`${c.error.name}: ${c.error.message}`:"You have no rights to use IndexDB.";return i(e),!0}}))}}return t.Connector=a,a.DB_DEBUG="sbis.seb.debug",a.DB_DELIVER="sbis.seb.deliver",a.DEBUG_STORE_NAME="logs",a.EVENTS_STORE_NAME="events",t}(0,{},se,q,p,a,S),he=function(e,t,s,r,n,i,o,a,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeviceEnv=void 0;class u{static isAnonymous(){if(!s.detection.isDesktop&&"boolean"==typeof u.isUserAnonymous)return Promise.resolve(u.isUserAnonymous);else return(0,i.isUserAnonymous)()}static getConnectData(e){return u.isAnonymous().then((t=>{if(t===u.isUserAnonymous&&u.hashData)return Promise.resolve(u.hashData);u.hashData=void 0,u.isUserAnonymous=t,u.url=t?"/!hash/?set_guest=1":"/!hash/";const r=e||new c.RequestAttempt({url:u.url,initialValue:Math.round(3e4*Math.random()),maxValue:6e5,maxStep:3e5,minStep:3e4});return r.start(),s.IoC.resolve("ITransport",{url:u.url,method:"GET",notifyAuthError:!1,dataType:"json"}).execute().then((e=>(r.success(),u.hashData=e.result,e.result)),(e=>{if(e.httpError===n.HTTPStatus.NotFound)throw e;return r.waitAfterError(e).then((()=>u.getConnectData(r)))}))}))}static parseSID(e){const t=e.sid||r.cookie.get("sid");if(!t)return;const s=e.cid||t.substr(0,8),n=e.uid||t.substr(9,8);return{sid:t,cid:s,uid:n}}static getOptions(){return u.getConnectData().then((e=>{const t=u.parseSID(e);if(!t)throw new Error(o.ERR_MSG_EMPTY_SID);if(!e.user)throw new Error(o.ERR_MSG_HASH_401);const{sid:s,cid:r,uid:n}=t;let i;if(e.url)i=a.ConnectOptions.createForDesktop(s,e.user,e.url,r,n);const c=e.path||"/stomp/";if(e.domain)i=new a.ConnectOptions(s,e.user,location.protocol,e.domain,c,e.exchange,r,n);if(!i)i=a.ConnectOptions.createByLocation(s,e.user,c,r,n);const h=Number(e.routing_ver);if(h)i.routingVer=h;return i}))}static clearHash(){u.hashData=null}}return t.DeviceEnv=u,t}(0,{},c,b,n,i,S,m,re),le=function(e,t,s,r,n,i,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SockJSFactory=t.NativeWebSocketFactory=t.isNeedUseSockjs=void 0;t.isNeedUseSockjs=()=>"true"===localStorage.getItem("useSockJS");t.NativeWebSocketFactory=class{constructor(e=new i.LocalStorage("SEB/WEBSocket",!0),t=n.default){this.storage=e,this.wsConstructor=t}create(e){return this.connect(e)}prepareUrl(e){return e+("/"===e[e.length-1]?"":"/")+"websocket"}connect(e,t){return new Promise(((s,n)=>{function i(t){if((0,r.isClientError)(t))n(t);else o.waitAfterError(t).then((()=>{this.connect(e,o).then(s,n)})).catch((e=>{this.storage.removeItem("usedWS"),n(e)}))}const o=t||this.createAttempt(e);o.start();try{const t=new this.wsConstructor(this.prepareUrl(e));t.addEventListener("open",(()=>{o.success(),this.storage.setItem("usedWS",Date.now()),s(t)}),{once:!0}),t.addEventListener("error",(()=>{i.call(this,new r.HTTPError({url:e,message:`Error connecting to ${e}`}))}),{once:!0})}catch(e){i.call(this,e)}}))}createAttempt(e){return new s.RequestAttempt({url:e,initialValue:Math.round(6e4*Math.random()),maxValue:6e5,maxStep:3e5,maxCount:a.detection.isDesktop||a.detection.isWebView?0:2,minStep:3e4})}};return t.SockJSFactory=class{createSockJSObject(e,t){return new Promise(((s,n)=>{try{s(new e(t.replace("wss:","https:").replace("ws:","http:"),null,{transports:["xhr-streaming"],debug:o.NOOP,stompLogger:o.NOOP}))}catch(e){n(new r.HTTPError({url:t,message:r.ERROR_TEXT.unknown,httpError:r.HTTPStatus.TeaPot}))}}))}importLibrary(){return new Promise(((t,s)=>{e(["Browser/stomp","Browser/_Event/Server/resources/sockjs-1.0.3"],((e,r)=>{if(!r)return s("Can't load Browser/_Event/Server/resources/sockjs-1.0.3");t(r)}),(()=>{s("Can't load Browser/_Event/Server/resources/sockjs-1.0.3")}))}))}create(e){return this.importLibrary().then((t=>this.createSockJSObject(t,e)))}},t}(g,{},re,n,W,l,S,c),de=function(e,t,s,r,n,i,o,a){"use strict";
187Object.defineProperty(t,"__esModule",{value:!0}),t.DeliveryChooser=void 0;const c=new n.Notifier,u=new r.ChannelManager;return t.DeliveryChooser=class{constructor(e){c.setWatcher(e)}choose(e){if(s.detection.isMobileIOS||s.detection.isMobileAndroid)return Promise.resolve(new a.PageDelivery(c));let t;switch(e.getLocalName()){case"LocalMainTransport":t=i.MasterDelivery;break;case"LocalSlaveTransport":t=o.SlaveDelivery;break;default:t=a.PageDelivery}return Promise.resolve(new t(c,u))}},t}(0,{},c,te,F,ie,oe,w),be=function(e,t,s,r,n,i,o,a,c,u,h,l,d,b){"use strict";function g(e){if(!(0,b.isInit)())(0,b.getReadyPromise)().then((()=>{(0,r.default)("warn",e)}));else(0,r.default)("warn",e)}Object.defineProperty(t,"__esModule",{value:!0}),t.LocalPageTransport=void 0;class v extends n.Transport{constructor(e){super(),this.persistent=!0,this.hasCommon=!1,this.isSubscribed=!1,this.messageHandler=e=>{const{headers:t}=e;if(!("event-type"in t))return;const s=t["event-type"].toLocaleLowerCase(),r=new Date;g(`[SEB_LOGS]:: ${r.getHours()}-${r.getMinutes()}-${r.getSeconds()} Page messageHandler\n ${s} ${e.body}`),this.watcher.logStomp(e);const n={id:t["message-id"],l:Number(t["content-length"])||0,s:"client"===t.scope?0:1,ct:Date.now(),st:1e3*Number(t.timestamp)||0};this.deliver(s,"onmessage",e.body,n),this.ackSender.push(e),this.withWriter((t=>t.write([e]))),this.withLogWriter((t=>t.write(e))),this.checkDoubleMessage(e)},this.onclose=()=>{},this.stomp=e.stomp,this.persistent="boolean"==typeof e.persistent?e.persistent:!0;const t=e.deviceHashGetter||new h.DeviceHash;if(this.deviceHash=t.get(!this.persistent),this.hash=e.connectOptions.hash,this.clientId=e.connectOptions.cid,this.userId=e.connectOptions.uid,this.routingVer=e.connectOptions.routingVer,this.requireSubscribe=Boolean(e.connectOptions.requireSubscribe),this.subscribes=(0,i.createSubscribeContainer)(this.requireSubscribe),this.isAck=Boolean(!this.requireSubscribe&&e.isAck),this.ackSender=o.AckSender.createAckSender(this.isAck),this.ackSender.start(),this.headerBuilderFactory=new u.HeaderBuilderFactory(this.createHeaderBuilderOptions.bind(this),this.requireSubscribe),this.closeWsHandler=e=>{this.onclose(e)},this.stomp.ws.addEventListener("close",this.closeWsHandler),this.logWriterPromise=d.EventsDB.open().then((e=>{const t=d.EventsDB.getInstance();t.init(e,this.deviceHash),this.logWriter=new l.EventLogWriter(t)}),(e=>{g(`[STOMP][EventLogWriter] ${e}`)})),!s.detection.isMobilePlatform&&!s.detection.safari)this.writerPromise=a.Connector.connect(a.Connector.DB_DEBUG,a.Connector.DEBUG_STORE_NAME,new c.AdapterStomp).then((e=>{this.writer=e.createWriter()}),(e=>{g(`[STOMP][Writer] ${e}`)}))}getLocalName(){return v.getLocalName()}createHeaderBuilderOptions(){return{clientId:this.clientId,deviceHash:this.deviceHash,isAck:this.isAck,persistent:this.persistent,routingVer:this.routingVer,userHash:this.hash,userId:this.userId}}subscribe(e){if(!(0,b.isInit)())null===console||void 0===console||console.warn(`[STOMP][SubscribeError] call subscribe before Application initialization for\n ${e.getChannelName()}`,(new Error).stack);if(this.requireSubscribe||e.isChanneled())return this.subscribeChanneled(e);if(!this.hasCommon)this.hasCommon=!0,this.sendSubscribeFrame(e);this.subscribes.add(e),this.deliver(e.getChannelName(),"onready"),g(`[SEB_LOGS]:: Page subscribe ${e.getChannelName()}`)}withWriter(e){if(this.writer)e(this.writer);else if(this.writerPromise)this.writerPromise.then((()=>
187{if(this.writer)e(this.writer)}))}withLogWriter(e){if(this.logWriter)e(this.logWriter);else if(this.logWriterPromise)this.logWriterPromise.then((()=>{if(this.logWriter)e(this.logWriter)}))}subscribeChanneled(e){const t=e.getChannelName();if(this.subscribes.has(e))return this.subscribes.add(e),void this.deliver(t,"onready");this.subscribes.add(e),this.sendSubscribeFrame(e),this.deliver(t,"onready")}unsubscribe(e){if(this.subscribes.remove(e),this.requireSubscribe||e.isChanneled())if(!this.subscribes.has(e))this.sendUnsubscribeFrame(e),this.deliver(e.getChannelName(),"ondisconnect")}setDisconnectHandler(e){this.onclose=t=>{e(t)}}destroy(){this.callDisconnect(),super.destroy(),this.ackSender.stop(),this.withWriter((e=>e.destructor())),this.withLogWriter((e=>e.destructor()));const{ws:e}=this.stomp;if(e.removeEventListener("close",this.closeWsHandler),e.readyState===e.CLOSED||e.readyState===e.CLOSING)return;this.stomp.ws.close(1e3)}callDisconnect(){this.subscribes.all().forEach((e=>{this.deliver(e.getChannelName(),"ondisconnect")}))}sendSubscribeFrame(e){const t=this.headerBuilderFactory.getHeaderBuilder(),s=t.getDestination(e),r=this.isSubscribed?t.getSubscribeHeaders(e):t.getInitialSubscribeHeaders(e);this.stomp.subscribe(s,this.messageHandler,r),this.isSubscribed=!0}sendUnsubscribeFrame(e){const t=this.headerBuilderFactory.getHeaderBuilder();this.stomp.unsubscribe(t.getId(e),t.getUnsubscribeHeaders(e))}checkDoubleMessage(e){var t;const s=null===(t=this.lastMessage)||void 0===t?void 0:t.headers;if(s){const t=e.headers["message-id"];if(t===s["message-id"]&&"function"==typeof window.reportError)window.reportError(new Error(`[STOMP][DUPLICATE]::${t}`))}this.lastMessage=e}static getLocalName(){return"LocalPageTransport"}}return t.LocalPageTransport=v,t}(0,{},c,z,Y,G,A,ue,H,N,T,J,$,d),ge=function(e,t,s,r,n,i,o){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.Connector=t.AdapterEvent=t.UniqueKey=t.AdapterStomp=t.Reader=t.Writer=void 0,Object.defineProperty(t,"Writer",{enumerable:!0,get:function(){return s.Writer}}),Object.defineProperty(t,"Reader",{enumerable:!0,get:function(){return r.Reader}}),Object.defineProperty(t,"AdapterStomp",{enumerable:!0,get:function(){return n.AdapterStomp}}),Object.defineProperty(t,"UniqueKey",{enumerable:!0,get:function(){return n.UniqueKey}}),Object.defineProperty(t,"AdapterEvent",{enumerable:!0,get:function(){return i.AdapterEvent}}),Object.defineProperty(t,"Connector",{enumerable:!0,get:function(){return o.Connector}}),t}(0,{},se,q,H,j,ue),ve=ge,pe=function(e,t,s,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StompConnect=void 0;class i{constructor(e=new s.NativeWebSocketFactory){this.webSocketFactory=e}initStomp(e){return new Promise(((t,s)=>{const n=Stomp.over(e);n.heartbeat.outgoing=i.outgoingHeartbeat,n.heartbeat.incoming=i.incomingHeartbeat,n.debug=r.NOOP,n.connect(i.login,i.passcode,(()=>t(n)),(e=>s(e)))}))}connect(e){const t=e.getWebSocketUrl();return(0,n.desktopLogger)("info","Создаем подклÑÑение (StompConnect)"),this.webSocketFactory.create(t).then((e=>this.initStomp(e)))}}return t.StompConnect=i,i.login="stomp_user",i.passcode="stomp_user",i.outgoingHeartbeat=6e4,i.incomingHeartbeat=6e4,t}(0,{},le,S,z,"undefined"==typeof Browser_stomp||Browser_stomp),fe=function(e,t,s,r){"use strict";function n(){if(!i)i=!0,new Promise(((t,s)=>{e(["Browser/Event"],t,s)})).then((({Server:e,ConsoleWatchDog:t})=>{e.serverChannel.addWatchDog(new t)})).catch((function(e){requirejs.onError(e)}))}Object.defineProperty(t,"__esModule",{value:!0}),t.attachDebugFn=void 0;let i=!1;return t.attachDebugFn=function(){if("undefined"!=typeof window)!function(){if("function"!=typeof Promise)return;const t=e=>{const t=e.headers&&e.headers["event-type"]||"",s=r.UniqueKey.getTimestamp(e.timestamp);console.log("[EventLog]",new Date(s).toLocaleString(),t,e)},n=(e,s)=>{e.query(s).then((e=>{e.forEach(t)}))};let i;window.sharedBusLog=t=>{if(!i)new Promise(((t,s)=>{e(["Browser/Event"],t,s)})).then((({IndexedDB:e})=>{const r=e.Connector,o=e.AdapterStomp;s.Connector.connect(r.DB_DEBUG,r.DEBUG_STORE_NAME,new o).then((e=>{i=e.createReader(),n(i,t)}))})).catch((function(e){requirejs.onError(e)}));else n(i,t)}}(),window.sharedBusWatch=n},t}(g,{},ge,H),me=function(e,t,s,r,n,i,o){"use strict";
187Object.defineProperty(t,"__esModule",{value:!0}),t.initDebugUtils=void 0;let a=!1,c=!1;return t.initDebugUtils=function(){var t;if(s.constants.isBrowserPlatform){try{if((0,r.attachDebugFn)(),(0,o.isSharedBusDebug)())null===(t=window.sharedBusWatch)||void 0===t||t.call(window)}catch(e){}try{const t=!a&&(0,o.isEventStatistics)(),s=!c;if(!t&&!s)return;const{serverChannel:r}=e("Browser/Event").Server;if(s)r.addWatchDog(new n.ConnectWriterWatchDog),c=!0;if(t)r.addWatchDog(new i.StatWatchdog),a=!0}catch(e){}}},t}(g,{},c,fe,V,ce,I),Se=function(e,t,s,r,n,i,o,a,c,u,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CreatorExclusive=void 0;return t.CreatorExclusive=class{constructor(e,t=new i.StompConnect){this.connectOptions=e,this.stompConnect=t}async isAvailableInEnv(e){if(e||this.connectOptions.isDesktop()||s.detection.isMobilePlatform||s.detection.isMacOSDesktop&&s.detection.safari||!window.LockManager&&s.detection.isIE&&!(0,c.isNeedUseSockjs)()||!(0,h.isMainPageContext)())return!0;try{return!await(0,o.isLocksQuerySettledInstantly)()}catch{return!0}}build(){(0,u.desktopLogger)("info","Создаем подклÑÑение (CreatorExclusive)");const e=this.stompConnect.connect(this.connectOptions),t=r.TabIdentifier.getInstance().getId().then((e=>new n.ConstDeviceHash(e)));return Promise.all([e,t]).then((([e,t])=>((0,h.send2Cloud)({context:"LocalPageTransport",action:"LocalPageTransport connect"}),new a.LocalPageTransport({stomp:e,connectOptions:this.connectOptions,persistent:!1,isAck:!1,deviceHashGetter:t}))))}},t}(0,{},c,p,T,pe,E,be,le,z,R),ye=function(e,t,s,r,n,i,o,a,c,u,h,l,d,b){"use strict";function g(e){const{data:t}=e;return(0,n.createSubscription)(t.channelName,t.channeled,!1,t.application)}Object.defineProperty(t,"__esModule",{value:!0}),t.LocalMainTransport=void 0;class v{constructor(e){this.broadcast=new a.ChannelManager,this.created=Date.now(),this.subscriptionCount=new h.Counter,this.disconnectCallback=c.NOOP,this.handlerSwitchToSlave=(e,t)=>{var s;if(d.Bus.id===t){const e=Error("got message from yourself");return b.Logger.error(null==e?void 0:e.message,void 0,e,"SEB_ERROR"),void(0,l.default)("log",`[SEB_LOGS]:: got message from yourself ${d.Bus.id}`)}if(!(e<this.created))null===(s=this.disconnectCallback)||void 0===s||s.call(this,i.EVENT_LATER_MAIN_TRANSPORT)},this.onPageHide=e=>{var t;if(!e.persisted)null===(t=this.disconnectCallback)||void 0===t||t.call(this,i.EVENT_UNLOAD_WINDOW)},this.requireSubscribe=Boolean(e.connectOptions.requireSubscribe),(0,l.default)("log",`[SEB_LOGS]:: New master! ${d.Bus.id}`),this.broadcast.send(o.MessageFromMaster.NewMaster,{createTime:this.created,id:d.Bus.id}).subscribe(o.MessageFromMaster.NewMaster,(e=>{this.handlerSwitchToSlave(e.data.createTime,e.data.id)})).subscribe(o.MessageFromSlave.NewSlave,(()=>{var e;if(!s.isValid())u.MasterSlaveManager.instance.stop(new Error("Invalid session, server events disabled")),null===(e=this.disconnectCallback)||void 0===e||e.call(this,i.EVENT_DISABLE_SEB)})).subscribe(o.MessageFromSlave.Subscribe,(e=>{(0,l.default)("log",`[SEB_LOGS]:: Main salve-subscribe ${g(e).getChannelName()}`),this.subscribe(g(e))})).subscribe(o.MessageFromSlave.Unsubscribe,(e=>{(0,l.default)("log",`[SEB_LOGS]:: Main salve-unsubscribe ${g(e).getChannelName()}`),this.unsubscribe(g(e))})),this.transport=new r.LocalPageTransport({...e,isAck:!1}),window.addEventListener("pagehide",this.onPageHide)}getLocalName(){return v.getLocalName()}subscribe(e){if(this.requireSubscribe)this.subscriptionCount.inc(e.hash());(0,l.default)("log",`[SEB_LOGS]:: Main subscribe ${e.getChannelName()}`),this.transport.subscribe(e)}unsubscribe(e){if(!this.requireSubscribe||this.subscriptionCount.dec(e.hash()))this.transport.unsubscribe(e)}setDisconnectHandler(e){this.disconnectCallback=e,this.transport.setDisconnectHandler((e=>{this.disconnectCallback(e)}))}destroy(){this.transport.destroy(),this.broadcast.close(),this.disconnectCallback=c.NOOP,window.removeEventListener("pagehide",this.onPageHide)}setDelivery(e){this.transport.setDelivery(e)}setWatchDog(e){this.transport.setWatchDog(e)}disconnect(e){this.disconnectCallback(e)}static getLocalName(){return"LocalMainTransport"}}return t.LocalMainTransport=v,t}(0,{},o,be,K,y,M,te,S,Z,P,z,a,t),Ee=function(e,t,s,r,n,i,o,a,c,u,h,l,d,b,g){"use strict";
187Object.defineProperty(t,"__esModule",{value:!0}),t.CreatorWebSocket=void 0;return t.CreatorWebSocket=class{constructor(e,t=new i.StompConnect){this.connectOptions=e,this.stompConnect=t,this.onPageStatusChanged=(e,t,s)=>{var r,n;if(s)if(c.MasterSlaveManager.instance.unsubscribe(this.onPageStatusChanged),this.transport){const e=(0,u.create)("master"===t?"switchtomaster":"switchtoslave");null===(n=(r=this.transport).disconnect)||void 0===n||n.call(r,e),this.transport=void 0}};const r=s.get("ÐогинÐолÑзоваÑелÑ")||"";this.isGuestAccess=r.indexOf("__ÑбиÑ__гоÑÑÑ__")>-1}async isAvailableInEnv(e){if(e||this.connectOptions.isDesktop()||r.detection.isMobilePlatform||r.detection.safari||r.detection.isIE||(0,h.isNeedUseSockjs)()&&!d.LocalStorageNative.getItem("seb_force_ws")||!window.LockManager||!(0,g.isMainPageContext)())return!1;return await(0,l.isLocksQuerySettledInstantly)()}async build(){(0,b.desktopLogger)("info","Создаем подклÑÑение (CreatorWebSocket)"),c.MasterSlaveManager.instance.subscribe(this.onPageStatusChanged);try{const e=await c.MasterSlaveManager.instance.getStatus();if((0,b.desktopLogger)("info",`СÑаÑÑÑ Ð²ÐºÐ»Ð°Ð´ÐºÐ¸ ${e}`),"slave"===e)return this.transport=new a.LocalSlaveTransport({requireSubscribe:this.connectOptions.requireSubscribe});const t=await this.stompConnect.connect(this.connectOptions);return(0,g.send2Cloud)({context:"LocalMainTransport",action:"LocalMainTransport connect"}),this.transport=new o.LocalMainTransport({stomp:t,connectOptions:this.connectOptions,persistent:!this.isGuestAccess})}catch(e){if(c.MasterSlaveManager.instance.unsubscribe(this.onPageStatusChanged),"string"==typeof e)throw new n.HTTPError({url:this.connectOptions.getWebSocketUrl(),message:e,httpError:n.HTTPStatus.TeaPot});throw e}}},t}(0,{},o,c,n,pe,ye,ae,Z,y,le,E,h,z,R),we=function(e,t,s,r,n,i,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CreatorExclusiveSockJs=void 0;class c extends r.CreatorExclusive{constructor(e){super(e,new n.StompConnect(new i.SockJSFactory))}async isAvailableInEnv(e){if(e||o.detection.isIE&&(0,i.isNeedUseSockjs)()||!window.LockManager||!(0,s.isMainPageContext)())return!0;try{return!await(0,a.isLocksQuerySettledInstantly)()}catch{return!0}}}return t.CreatorExclusiveSockJs=c,t}(0,{},R,Se,pe,le,c,E),Ce=function(e,t,s,r,n,i,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CreatorSockJs=void 0;class c extends r.CreatorWebSocket{constructor(e){super(e,new i.StompConnect(new o.SockJSFactory))}async isAvailableInEnv(e){if(!(!e&&!this.connectOptions.isDesktop()&&!a.detection.isMobilePlatform&&!a.detection.safari&&!a.detection.isIE&&!!window.LockManager&&(0,s.isMainPageContext)()))return!1;return await(0,n.isLocksQuerySettledInstantly)()}}return t.CreatorSockJs=c,t}(0,{},R,Ee,E,pe,le,c),_e=function(e,t,s,r,n,i,o,a,c,u,h,l,d,b){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransportChooser=void 0;return t.TransportChooser=class{constructor(e,t=e=>e,c=!1,h=new s.WatchDogAggregator,d=new a.DeliveryChooser(h),b=[r.CreatorWebSocket,n.CreatorSockJs,i.
187CreatorExclusive,o.CreatorExclusiveSockJs]){this.onclose=t,this.watcher=h,this.deliveryChooser=d,this.builders=[];const g=c||!u.utils.isNativeLocalStorageAvailable();this.initPromise=(async()=>{this.builders=await(async t=>{const s=[];for(const r of b){const n=new r(e);if(await n.isAvailableInEnv(t))s.push(n)}return s})(g),(0,l.desktopLogger)("info",`ÐоÑÑÑпнÑÑ
ÑÑанÑпоÑÑов: ${this.builders.length}`)})()}whenReady(){return this.initPromise}destructor(){if(this.transportPromise)this.transportPromise.then((e=>{if(this.watcher)this.watcher.logDisconnect("Manual disconnect"),e.destroy()}))}choose(){if(this.transportPromise)return this.transportPromise;else return this.transportPromise=this.initPromise.then((()=>this.build().then((e=>{if(e)return e.setDisconnectHandler((e=>{this.transportPromise=void 0,this.onclose(e)})),e.setWatchDog(this.watcher),this.deliveryChooser.choose(e).then((t=>(e.setDelivery(t),e)))}))))}build(){return this.builders.reduce(((e,t)=>e.catch((e=>{if(!e||e.status===c.HTTPStatus.UpgradeRequired||!(0,c.isClientError)(e))return t.build()}))),Promise.reject()).catch((e=>{if(e.status!==c.HTTPStatus.TeaPot){if(401===e.status)h.Bus.channel("errors").notify("onAuthError");if(h.Bus.channel("errors").notify("onStompError",e),e instanceof Error)(0,b.writeStompErrorToDB)(e);throw(0,d.send2Cloud)({context:"All STOMP transports failed",action:"fail connect"}),new Error("All STOMP transports failed.")}}))}},t}(0,{},D,Ee,Ce,Se,we,de,n,l,a,z,R,X),Oe=function(e,t,s,r,n,i,o,a){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.defaultTransportFactory=void 0,t.defaultTransportFactory=async function e(t,c=0,u=3){(0,a.desktopLogger)("info",`Создаем ÑÑанÑпоÑÑ. ÐопÑÑка ${c}/${u}`);const{isExclusive:h,onCloseHandler:l,watcher:d,requireSubscribe:b}=t,g=await s.DeviceEnv.getOptions();g.requireSubscribe=b;const v=h||(0,i.isExclusiveMode)(),p=new r.TransportChooser(g,l,v,d),f=await p.choose();if(!f){if((0,a.desktopLogger)("warn","Ðе ÑдалоÑÑ ÑоздаÑÑ ÑÑанÑпоÑÑ"),u>c)return s.DeviceEnv.clearHash(),e(t,c+1,u);throw new Error("All STOMP transports failed.")}return(0,a.desktopLogger)("info","ТÑанÑпоÑÑ Ñоздан"),(0,n.initDebugUtils)(),d.logConnect({connectOptions:g,transport:f.constructor.getLocalName()}),new o.ExclusiveProxy(f,v)},t}(0,{},he,_e,me,I,Q,z),De=function(e,t,s,r,n,i,o,a,c,u,h,l,d,b,g,v,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServerEventBus=void 0;class m{constructor(e="ÐÑо пÑиложение не Ð¸Ð¼ÐµÐµÑ ÑеÑвеÑнÑÑ
ÑобÑÑий"){this.message=e}}var S;!function(e){e[e.notInitialized=0]="notInitialized",e[e.connecting=1]="connecting",e[e.ready=2]="ready",e[e.reconnecting=3]="reconnecting",e[e.error=4]="error"}(S||(S={}));return t.ServerEventBus=class{constructor(e=u.defaultTransportFactory){this.transportFactory=e,this.state=S.notInitialized,this.subscribes=(0,n.createSubscribeContainer)(),this.subscriptionQueue=[],this.subscriptionQueueForManualReconnect=[],this.isExclusive=!1,this._manualRecconect=!1,this._url="",this.watcher=new i.WatchDogAggregator([new o.ConnectWatchDog]),this.broadCastManager=new b.ChannelManager,this.channelsToClose=[],this.onTransportDisconnect=e=>{var t;if((0,l.desktopLogger)("info","onTransportDisconnect"),this.watcher.logDisconnect(e),(0,p.send2Cloud)({context:"onTransportDisconnect",action:e.type}),e===c.EVENT_DISABLE_SEB||e===c.EVENT_UNLOAD_WINDOW)this.state=S.reconnecting,null===(t=this.transport)||void 0===t||t.destroy(),this.transport=void 0;else this.reconnect()},this.onTransportReady=e=>{var t,s;(0,l.desktopLogger)("info","onTransportReady"),this.transport=e,this._url=null===(s=null===(t=null==e?void 0:e.transport)||void 0===t?void 0:t.transport)||void 0===s?void 0:s.stomp.ws.url,this.state=S.ready;const r=this.subscriptionQueue;if(this.subscriptionQueue=[],this.subscriptionQueueForManualReconnect=[],this._manualRecconect)(0,p.send2Cloud)({context:"onTransporonTransportReadytError",action:"подклÑÑилиÑÑ Ð¿Ð¾Ñле ÑÑÑного ÑекконекÑа"});this._manualRecconect=!1;for(const e of r)this.subscribe(e)},this.onTransportError=e=>{if((0,l.desktopLogger)("warn",`onTransportError ${e.httpError} ${e.message}`),e.httpError===r.HTTPStatus.NotFound)return(0,l.default)("warn",(new m).message),this.state=S.error,void(this.subscriptionQueue.length=0);if(this.state=S.notInitialized,this.sendError(e),this._manualRecconect)(0,p.send2Cloud)({context:"onTransportError",action:"не Ñмогли подклÑÑиÑÑÑÑ Ð¿Ð¾Ñле ÑÑÑного ÑекконекÑа"});this._manualRecconect=!1,this.subscriptionQueueForManualReconnect=this.subscriptionQueue.concat([]),this.subscriptionQueue.forEach((e=>{(0,l.default)("warn",`Ðе ÑдалоÑÑ Ð¿Ð¾Ð´Ð¿Ð¸ÑаÑÑÑÑ Ð½Ð° ${e.getChannelName()}`)})),this.subscriptionQueue=[]},s.Bus.globalChannel().subscribe("onWakeUp",(()=>{this.watcher.logDisconnect("Wake Up"),this.reconnect()})),this.broadCastManager.subscribe("stompError",(e=>{const{error:t}=e.data;if(t instanceof Error)return s.Bus.channel("errors").notify("onStompError",t),void(0,f.writeStompErrorToDB)(t,this._url);if(null==t?void 0:t.firefoxWorkAround){const e=new r.ConnectionError(t);return s.Bus.channel("errors").notify("onStompError",e),void(0,f.writeStompErrorToDB)(e,this._url)}if(s.Bus.channel("errors").notify("onStompError"),g.MasterSlaveManager.instance.isMaster)this.reconnect(!0,!0)}))}getRequireSubscribe(){if(this.requireSubscribePromise)return this.requireSubscribePromise;else return this.requireSubscribePromise=(0,h.isRequireSubscribe)().then((e=>{const t=this.subscribes.all();return this.subscribes=(0,n.createSubscribeContainer)(!0),t.forEach((e=>this.subscribes.addOnce(e))),this.onSubscribeHandlerRemove=this.closeChannel,e}))}isSubscribeRequired(e){return this.state!==S.ready||!this.subscribes.has(e)}subscribe(e){switch(this.channelsToClose=this.channelsToClose.filter((t=>t!==e.getChannelName())),this.state){case S.notInitialized:this.firstSubscribe(e);break;case S.connecting:this.subscriptionQueue.push(e);break;case S.ready:this.subscribeIfReady(e);break;case S.reconnecting:this.subscribes.addOnce(e)}}firstSubscribe(e){this.state=S.connecting,this.subscriptionQueue.push(e);try{this.getRequireSubscribe().then((t=>this.transportFactory({isExclusive:this.isExclusive||e.getDeliveryType()!==a.DELIVERY_COMMON,onCloseHandler:this.onTransportDisconnect,watcher:this.watcher,requireSubscribe:t}))).then(this.onTransportReady,this.onTransportError)}catch(e){this.state=S.error,this.subscriptionQueue.forEach((t=>{(0,l.default)("warn",`Ðе ÑдалоÑÑ Ð¿Ð¾Ð´Ð¿Ð¸ÑаÑÑÑÑ Ð½Ð° ${t.getChannelName()}`),(0,l.desktopLogger)("warn",e.message)})),(0,p.send2Cloud)({context:"firstSubscribe catch error",action:e.message}),this.subscriptionQueueForManualReconnect=this.subscriptionQueue.concat([]),this.subscriptionQueue.length=0}}subscribeIfReady(e){if(this.subscribes.addOnce(e))try{this.transport.subscribe(e)}catch(e){if("SubscribeExclusiveError"!==e.name)throw e;this.isExclusive=!0,this.reconnect()}}addWatchDog(e){this.watcher.reg(e)}reInit(e){this.state=S.notInitialized;const t=this.subscribes.all(),s=t.length?t:e;this.subscribes.clear(),(0,l.desktopLogger)("info",`Ðозобновление подпиÑок. ÐÑего ${s.length}`);for(const e of s)this.subscribe(e)}reconnect(e,t){var s;if(t&&!g.MasterSlaveManager.instance.isMaster)this.broadCastManager.send("stompError",{});if(this.state=S.reconnecting,null===(s=this.transport)||void 0===s||s.destroy(),this.transport=void 0,e)d.DeviceEnv.clearHash();this._manualRecconect=!!t,this.reInit(t?this.subscriptionQueueForManualReconnect:[])}closeChannel(e){this.subscriptionQueue=this.subscriptionQueue.filter((t=>t.getChannelName()!==e));const t=this.subscribes.removeByName(e);
187if(this.transport)for(const e of t)this.transport.unsubscribe(e)}onSubscribeHandlerRemove(e){this.channelsToClose.push(e),this.getRequireSubscribe().then((()=>{this.channelsToClose.forEach((e=>this.onSubscribeHandlerRemove(e))),this.channelsToClose.length=0}))}onSubscribeHandlerChanged(e){this.getRequireSubscribe().then((()=>{this.subscribes.getByName(e).forEach((e=>{this.subscribe(e)}))}))}getTransport(){return this._url}sendError(e){const t=v.detection.firefox&&v.detection.firefoxVersion<99?{message:e.message,details:e.details,name:e.name,url:e.url,firefoxWorkAround:!0,status:0}:e;this.broadCastManager.send("stompError",{error:t})}},t}(0,{},a,n,G,D,C,S,y,Oe,I,z,he,te,Z,c,R,X),Me=function(e,t,s,r,n,i,o,a){"use strict";function c(e,t,s){if("onmessage"===t)if(!s)u.onSubscribeHandlerRemove(e);else u.onSubscribeHandlerChanged(e)}Object.defineProperty(t,"__esModule",{value:!0}),n.LocalStorageNative.setItem("shared-bus-ack","true");const u=new a.ServerEventBus;let h=(e,t={})=>{const s=e.toLocaleLowerCase(),n=c.bind(null,s),i=Boolean(t.application||t.isChanneled),a=r.Bus.channel(s,{subscribeCallback:n}),h=(0,o.createSubscription)(s,i,t.exclusive,t.application);if(u.isSubscribeRequired(h))setTimeout((()=>u.subscribe(h)),0);return a};if(!s.constants.isBrowserPlatform)h=e=>r.Bus.channel(e);const l=Object.assign(h,{addWatchDog(e){u.addWatchDog(e)},reconnect(e,t){u.reconnect(e,t)},close(e){u.closeChannel(e)},SCOPE:i.CHANNEL_SCOPE,geTransport:u.getTransport.bind(u)}),d=Object.assign(r.Bus,{serverChannel:l});return t.default=d,t}(0,{},u,a,l,S,K,De),Pe=Me,Te=function(e,t,s,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Subscribe=t.useServerEventChannel=void 0,t.useServerEventChannel=function(e,t){const s=(0,r.useRef)(new i(e,t));return(0,r.useEffect)((()=>()=>{s.current.onWillUnmount()}),[]),s.current};class i{constructor(e,t={}){this.stopServerTimeOut=()=>{},this._serverChannel=s.default.serverChannel(e,t);const{handleServerTimeout:r}=t;if(r){const{timeout:e,hander:t}=r;this.stopServerTimeOut=(0,n.handleServerTimeout)(this._serverChannel,e,t)}this._internalOnDisconnectHandler=this._internalOnDisconnect.bind(this),this._internalOnMessageHandler=this._internalOnMessage.bind(this),this._internalOnReadyHandler=this._internalOnReady.bind(this)}_internalOnReadyHandler(e,t){}_internalOnDisconnectHandler(e,t){}_internalOnMessageHandler(e,t){}onReady(e){if(!this._onReady)this._onReady=e,this._serverChannel.subscribe("onReady",this._internalOnReadyHandler)}onDisconnect(e){if(!this._onDisconnect)this._onDisconnect=e,this._serverChannel.subscribe("onDisconnect",this._internalOnDisconnectHandler)}onMessage(e){if(!this._onMessage)this._serverChannel.subscribe("onMessage",this._internalOnMessageHandler),this._onMessage=e}_internalOnMessage(e,t){this._onMessage(e,t)}_internalOnReady(e,t){this._onReady(e,t)}_internalOnDisconnect(e,t){this._onDisconnect(e,t)}onWillUnmount(){this._serverChannel.unsubscribe("onReady",this._internalOnReadyHandler),this._serverChannel.unsubscribe("onMessage",this._internalOnMessageHandler),this._serverChannel.unsubscribe("onDisconnect",this._internalOnDisconnectHandler),this.stopServerTimeOut(),this._internalOnReadyHandler=null,this._internalOnMessageHandler=null,this._internalOnDisconnectHandler=null}}return t.Subscribe=i,t}(0,{},Me,e,B),Ne=Te,v.RequestAttempt=v.send2Cloud=v.Subscribe=v.useServerEventChannel=v.ConsoleWatchDog=v.MasterSlaveManager=v.EventsDB=v.IndexedDB=v.Server=v.handleServerTimeout=v.Broadcast=void 0,v.Server=Pe.default,Object.defineProperty(v,"handleServerTimeout",{enumerable:!0,get:function(){return L.handleServerTimeout}}),Object.defineProperty(v,"Broadcast",{enumerable:!0,get:function(){return p.Broadcast}}),v.IndexedDB=ve,v.EventsDB=U,Object.defineProperty(v,"ConsoleWatchDog",{enumerable:!0,get:function(){return O.ConsoleWatchDog}}),Object.defineProperty(v,"MasterSlaveManager",{enumerable:!0,get:function(){return ee.MasterSlaveManager}}),Object.defineProperty(v,"useServerEventChannel",{enumerable:!0,get:function(){return Ne.useServerEventChannel}}),Object.defineProperty(v,"Subscribe",{enumerable:!0,get:function(){return Ne.Subscribe}}),Object.defineProperty(v,"send2Cloud",{enumerable:!0,get:function(){return k.send2Cloud}}),Object.defineProperty(v,"RequestAttempt",{enumerable:!0,get:function(){return ne.RequestAttempt}}),v})); 188define("Browser/stomp",[],(function(){return function(){var t,e,n,i,r={}.hasOwnProperty,s=[].slice;
188if(t={LF:"\n",NULL:"\0"},n=function(){function e(t,e,n){this.command=t,this.headers=null!=e?e:{},this.body=null!=n?n:""}var n;return e.prototype.toString=function(){var n,i,s,o,a;if(n=[this.command],s=!1===this.headers["content-length"])delete this.headers["content-length"];for(i in a=this.headers)if(r.call(a,i))o=a[i],n.push(i+":"+o);if(this.body&&!s)n.push("content-length:"+e.sizeOfUTF8(this.body));return n.push(t.LF+this.body),n.join(t.LF)},e.sizeOfUTF8=function(t){if(t)return encodeURI(t).match(/%..|./g).length;else return 0},n=function(n){function i(t){var e,n,i,r,s;if("string"==typeof t){for(e=[],n=0,i=t.length;n<i;n++)if("\\"==(r=t.charAt(n))){switch(s=t.charAt(n+1)){case"c":e.push(":");break;case"n":e.push("\n");break;case"r":e.push("\r");break;case"\\":e.push("\\");break;default:e.push(r,s)}n++}else e.push(r);return e.join("")}return t}var r,s,o,a,u,c,f,h,l,p,d,g,b,m,y,v,w;for(a=n.search(RegExp(""+t.LF+t.LF)),o=(u=n.substring(0,a).split(t.LF)).shift(),c={},g=function(t){return t.replace(/^\s+|\s+$/g,"")},b=0,y=(v=u.reverse()).length;b<y;b++)h=(p=v[b]).indexOf(":"),c[g(p.substring(0,h))]=i(g(p.substring(h+1)));if(r="",d=a+2,c["content-length"])l=parseInt(c["content-length"]),r=(""+n).substring(d,d+l);else for(s=null,f=m=d,w=n.length;(d<=w?m<w:m>w)&&(s=n.charAt(f))!==t.NULL;f=d<=w?++m:--m)r+=s;return new e(o,c,r)},e.unmarshall=function(e){var i,r,s,o;if(r=e.split(RegExp(""+t.NULL+t.LF+"*")),(o={frames:[],partial:""}).frames=function(){var t,e,s,o;for(o=[],t=0,e=(s=r.slice(0,-1)).length;t<e;t++)i=s[t],o.push(n(i));return o}(),(s=r.slice(-1)[0])===t.LF||-1!==s.search(RegExp(""+t.NULL+t.LF+"*$")))o.frames.push(n(s));else o.partial=s;return o},e.marshall=function(n,i,r){return new e(n,i,r).toString()+t.NULL},e}(),e=function(){function e(t){this.ws=t,this.ws.binaryType="arraybuffer",this.counter=0,this.connected=!1,this.heartbeat={outgoing:1e4,incoming:1e4},this.maxWebSocketFrameSize=16384,this.subscriptions={},this.partialData=""}var r;return e.prototype.debug=function(t){var e;return"undefined"!=typeof window&&null!==window?null!=(e=window.console)?e.log(t):void 0:void 0},r=function(){if(Date.now)return Date.now();else return(new Date).valueOf},e.prototype._transmit=function(t,e,i){var r;if(r=n.marshall(t,e,i),"function"==typeof this.debug)this.debug(">>> "+r);for(;;)if(r.length>this.maxWebSocketFrameSize){if(this.ws.send(r.substring(0,this.maxWebSocketFrameSize)),r=r.substring(this.maxWebSocketFrameSize),"function"==typeof this.debug)this.debug("remaining = "+r.length)}else return this.ws.send(r)},e.prototype._setupHeartbeat=function(e){var n,s,o,a,u,c;if((u=e.version)===i.VERSIONS.V1_1||u===i.VERSIONS.V1_2){if(s=(c=function(){var t,n,i,r;for(r=[],t=0,n=(i=e["heart-beat"].split(",")).length;t<n;t++)a=i[t],r.push(parseInt(a));return r}())[0],n=c[1],0!==this.heartbeat.outgoing&&0!==n){if(o=Math.max(this.heartbeat.outgoing,n),"function"==typeof this.debug)this.debug("send PING every "+o+"ms");this.pinger=i.setInterval(o,(f=this,function(){try{return f.ws.send(t.LF),"function"==typeof f.debug?f.debug(">>> PING"):void 0}catch(t){f.debug("WARNING: can't send heartbeat. Reason: "+t.message)}}))}var f;if(0!==this.heartbeat.incoming&&0!==s){if(o=Math.max(this.heartbeat.incoming,s),"function"==typeof this.debug)this.debug("check PONG every "+o+"ms");return this.ponger=i.setInterval(o,function(t){return function(){var e;if((e=r()-t.serverActivity)>2*o){if("function"==typeof t.debug)t.debug("did not receive server activity for the last "+e+"ms");return t.ws.close()}}}(this))}}},e.prototype._parseConnect=function(){var t,e,n,i;switch(i={},(t=1<=arguments.length?s.call(arguments,0):[]).length){case 2:i=t[0],e=t[1];break;case 3:if(t[1]instanceof Function)i=t[0],e=t[1],n=t[2];else i.login=t[0],i.passcode=t[1],e=t[2];break;case 4:i.login=t[0],i.passcode=t[1],e=t[2],n=t[3];break;default:i.login=t[0],i.passcode=t[1],e=t[2],n=t[3],i.host=t[4]}return[i,e,n]},e.prototype.connect=function(){var e,o,a,u,c=1<=arguments.length?s.call(arguments,0):[],f=this._parseConnect.apply(this,c),h=f[0];if(this.connectCallback=f[1],e=f[2],"function"==typeof this.debug)this.debug("Opening Web Socket...");if(this.ws.onmessage=(u=this,function(i){var s,o,a,c,f,h,l,p,d,g,b,m,y;if(c="undefined"!=typeof ArrayBuffer&&i.data instanceof ArrayBuffer?(s=new Uint8Array(i.data),"function"==typeof u.debug&&u.debug("--- got data length: "+s.length),function(){var t,e,n;for(n=[],t=0,e=s.length;t<e;t++)o=s[t],n.push(String.fromCharCode(o));return n}().join("")):i.data,u.serverActivity=r(),c!==t.LF){if("function"==typeof u.debug)u.debug("<<< "+c);
188for(d=n.unmarshall(u.partialData+c),u.partialData=d.partial,y=[],g=0,b=(m=d.frames).length;g<b;g++)switch((f=m[g]).command){case"CONNECTED":if("function"==typeof u.debug)u.debug("connected to server "+f.headers.server);u.connected=!0,u._setupHeartbeat(f.headers),y.push("function"==typeof u.connectCallback?u.connectCallback(f):void 0);break;case"MESSAGE":p=f.headers.subscription,l=u.subscriptions[p]||u.onreceive,a=u,h=f.headers["message-id"],f.ack=function(t){if(null==t)t={};return a.ack(h,p,t)},f.nack=function(t){if(null==t)t={};return a.nack(h,p,t)},y.push(l(f));break;case"RECEIPT":y.push("function"==typeof u.onreceipt?u.onreceipt(f):void 0);break;case"ERROR":y.push("function"==typeof e?e(f):void 0);break;default:y.push("function"==typeof u.debug?u.debug("Unhandled frame: "+f):void 0)}return y}else if("function"==typeof u.debug)u.debug("<<< PONG")}),o=function(t){return function(){var n;if(n="Whoops! Lost connection to "+t.ws.url,"function"==typeof t.debug)t.debug(n);return t._cleanUp(),"function"==typeof e?e(n):void 0}}(this),a=function(t){return function(){if("function"==typeof t.debug)t.debug("Web Socket Opened...");return h["accept-version"]=i.VERSIONS.supportedVersions(),h["heart-beat"]=[t.heartbeat.outgoing,t.heartbeat.incoming].join(","),t._transmit("CONNECT",h)}}(this),this.ws.readyState>=this.ws.OPEN)a();else this.ws.onopen=a;if(this.ws.readyState>=this.ws.CLOSING)o();else this.ws.onclose=o},e.prototype.disconnect=function(t,e){if(null==e)e={};try{this._transmit("DISCONNECT",e)}catch(t){}return this.ws.onclose=null,this.ws.close(),this._cleanUp(),"function"==typeof t?t():void 0},e.prototype._cleanUp=function(){if(this.connected=!1,this.pinger)i.clearInterval(this.pinger);if(this.ponger)return i.clearInterval(this.ponger)},e.prototype.send=function(t,e,n){if(null==e)e={};if(null==n)n="";return e.destination=t,this._transmit("SEND",e,n)},e.prototype.subscribe=function(t,e,n){var i;if(null==n)n={};
188if(!n.id)n.id="sub-"+this.counter++;return n.destination=t,this.subscriptions[n.id]=e,this._transmit("SUBSCRIBE",n),i=this,{id:n.id,unsubscribe:function(t){return i.unsubscribe(n.id,t)}}},e.prototype.unsubscribe=function(t,e){if(null==e)e={};return e.id=t,this._transmit("UNSUBSCRIBE",e)},e.prototype.begin=function(t){var e,n;return n=t||"tx-"+this.counter++,this._transmit("BEGIN",{transaction:n}),e=this,{id:n,commit:function(){return e.commit(n)},abort:function(){return e.abort(n)}}},e.prototype.commit=function(t){return this._transmit("COMMIT",{transaction:t})},e.prototype.abort=function(t){return this._transmit("ABORT",{transaction:t})},e.prototype.ack=function(t,e,n){if(null==n)n={};return n["message-id"]=t,n.id=t,n.subscription=e,this._transmit("ACK",n)},e.prototype.nack=function(t,e,n){if(null==n)n={};return n["message-id"]=t,n.subscription=e,this._transmit("NACK",n)},e}(),i={VERSIONS:{V1_0:"1.0",V1_1:"1.1",V1_2:"1.2",supportedVersions:function(){return"1.2,1.1,1.0"}},client:function(t,n){var r;if(null==n)n=["v10.stomp","v11.stomp"];return r=new(i.WebSocketClass||WebSocket)(t,n),new e(r)},over:function(t){return new e(t)},Frame:n},"undefined"!=typeof exports&&null!==exports)exports.Stomp=i;if("undefined"!=typeof window&&null!==window)i.setInterval=function(t,e){return window.setInterval(e,t)},i.clearInterval=function(t){return window.clearInterval(t)},window.Stomp=i;else if("undefined"!=typeof self&&null!==self)self.Stomp=i;return i}.call(this)})); 189define("BrowserAPI/Event",["Types/entity","Env/Event","Env/Env","Env/Constants","BrowserAPI/Window","BrowserAPI/Storage","require","exports"],(function(e,t,s,r,n,i,o,a){var u,c,d,h,l,f,m,v,g,b,p,T,y,_;return Object.defineProperty(a,"__esModule",{value:!0}),u=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{unsubscribe(){return this}subscribe(){return this}once(){return this}destroy(){}notify(){}},t}(0,{}),c=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FakeTransport=void 0;return t.FakeTransport=class{notify(){}destroy(){}},t}(0,{}),d=function(e,t,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocalStorageTransport=void 0;class n{constructor(e){this.channel=e,this.storage=new s.LocalStorage(n.storagePrefix,void 0,!1),this.storage.subscribe("onChange",((e,t,s)=>{this.channel.notify(t,s)}))}notify(e,t){if(this.storage.setItem(e,t),!r.detection.isIE)return this.storage.removeItem(e);if(n.removeTimers[e])clearTimeout(n.removeTimers[e]);n.removeTimers[e]=setTimeout((()=>{this.storage.removeItem(e)}),n.IERemoveTimeout)}destroy(){this.storage.destroy()}}return t.LocalStorageTransport=n,n.IERemoveTimeout=500,n.removeTimers={},n.storagePrefix="TabMessage",t}(0,{},i,s),h=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MockBroadcastChannel=void 0;return t.MockBroadcastChannel=class{constructor(e){this.onmessage=null,this.onmessageerror=null,this.name=e}close(){}postMessage(e){}addEventListener(e,t,s){}removeEventListener(e,t,s){}dispatchEvent(e){return!1}},t}(0,{}),l=function(e,t,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StorageBroadcastChannel=void 0;class n{constructor(e){this.onmessage=null,this.onmessageerror=null,this.name=e,this.storage=new s.LocalStorage(e,void 0,!1)}close(){this.storage.destroy()}postMessage(e){if(this.storage.setItem(this.name,e),!r.detection.isIE)return this.storage.removeItem(this.name);if(n.removeTimers[this.name])clearTimeout(n.removeTimers[this.name]);n.removeTimers[this.name]=setTimeout((()=>{this.storage.removeItem(this.name)}),n.IERemoveTimeout)}addEventListener(e,t,s){this.storage.subscribe("onChange",t)}removeEventListener(e,t,s){this.storage.unsubscribe("onChange",t)}dispatchEvent(e){return r.IoC.resolve("ILogger").err("Method StorageBroadcastChannel#dispatchEvent dont supported"),!1}}return t.StorageBroadcastChannel=n,n.IERemoveTimeout=500,n.removeTimers={},t}(0,{},i,s),f=function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=class{constructor(e,t=2,r=4e3){if(this.processFn=e,this.minProcessingInterval=t,this.maxRunTime=r,this.queue=[],this.startProcessing=0,this.endProcessing=0,this.isRun=!1,this.lastTabAcivity=Date.now(),this.run=this.run.bind(this),null===document||void 0===document||document.addEventListener("visibilitychange",(()=>{if("visible"===document.visibilityState)this.lastTabAcivity=Date.now()})),"undefined"!=typeof location&&!location.hostname.match(/autotest|dev\d+\.(.+)\.tensor\.ru/)&&"localhost"!==location.hostname)this.addToQueue=()=>(0,s.reload)("queue on wakeUp")}process(e){if(!this.shouldUseQueue())this.processFn(e),this.endProcessing=Date.now();else this.addToQueue(e)}shouldUseQueue(){if(this.isRun)return!0;const e=Date.now();if(e-this.endProcessing<this.minProcessingInterval){const t=e-this.startProcessing>this.maxRunTime;if("visible"!==(null===document||void 0===document?void 0:document.visibilityState))return t;else return t&&e-this.lastTabAcivity<5e3}return this.startProcessing=e,!1}addToQueue(e){if(this.queue.push(e),!this.isRun)this.isRun=!0,setTimeout(this.run)}run(){const e=Date.now();for(;this.queue.length&&Date.now()-e<this.maxRunTime;)this.processFn(this.queue.shift());if(this.queue.length)setTimeout(this.run);else this.isRun=!1}},t}(0,{},n),m=function(e,t,s,r,n){"use strict";
189Object.defineProperty(t,"__esModule",{value:!0}),t.BroadcastTransport=t.processor=t.messageHandler=void 0;const i=Object.create(null);t.messageHandler=({data:e})=>{t.processor.process({data:e})};let o;t.processor=new n.default((({data:e})=>{const t=e.message,r=s.utils.item.deserialize(e.data);for(const e in i)i[e](t,r)}));const a=()=>{if(!o)o=new BroadcastChannel("TabMessage"),o.addEventListener("message",t.messageHandler);return o};return t.BroadcastTransport=class{constructor(e){this.uid=r.Guid.create(),i[this.uid]=(t,s)=>{e.notify(t,s)},a()}notify(e,t){a().postMessage({message:e,data:s.utils.item.serialize(t)})}destroy(){delete i[this.uid]}},t}(0,{},i,e,f),v=function(e,t,s,r,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.createBroadcastChannel=void 0,t.createBroadcastChannel=function(e){if(!s.constants.isBrowserPlatform)return new r.MockBroadcastChannel(e);if("undefined"!=typeof BroadcastChannel)return new BroadcastChannel(e);else return new n.StorageBroadcastChannel(e)},t}(0,{},s,h,l),g=v,b=function(e,t,s,r,n,i){"use strict";let o;return Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!o)o=function(){if(!s.constants.isBrowserPlatform)return i.FakeTransport;if("undefined"!=typeof BroadcastChannel)return n.BroadcastTransport;else return r.LocalStorageTransport}();return new o(e)},t}(0,{},s,d,m,c),p=function(e,t,s,r,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r.constants.isBrowserPlatform?class{constructor(){this._channel=s.Bus.channel(`TabMessage-${n.Guid.create()}`),this._transport=(0,i.default)(this._channel)}destroy(){this._transport.destroy(),this._channel.unsubscribeAll(),this._channel.destroy()}subscribe(e,t){return this._channel.subscribe(e,t,this),this}once(e,t){return this._channel.once(e,t,this),this}unsubscribe(e,t){return this._channel.unsubscribe(e,t),this}notify(e,t){const s=null==t?""+t:t;this._transport.notify(e,s)}}:o.default;return t.default=a,t}(0,{},t,r,e,b,u),T=p,y=function(e,t,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TabIdentifier=void 0;const n="check-tab-id",i="recreate-tab-id",o="browser-tab-id";let a;class u{constructor(e=new s.default,t=sessionStorage){this.transport=e,this.storage=t,this.id="",a=this.storage.getItem(o),this.transport.subscribe(n,((e,t)=>{if(t===a)this.transport.notify(i,a)}))}getId(){if(this.id)return Promise.resolve(this.id);else return new Promise((e=>{const t=()=>{this.id=a,e(this.id)},s=()=>{a=r.Guid.create(),this.storage.setItem(o,a),t()},u=(e,t)=>{if(t===a)s(),this.transport.unsubscribe(i,u)};if(!a)return void s();this.transport.subscribe(i,u),this.transport.notify(n,a);setTimeout((()=>{if(!this.id)t()}),1e3)}))}static getInstance(){if(!u.instance)u.instance=new u;return u.instance}}return t.TabIdentifier=u,t}(0,{},p,e),_=y,a.createBroadcastChannel=a.TabIdentifier=a.Broadcast=void 0,a.Broadcast=T.default,Object.defineProperty(a,"TabIdentifier",{enumerable:!0,get:function(){return _.TabIdentifier}}),Object.defineProperty(a,"createBroadcastChannel",{enumerable:!0,get:function(){return g.createBroadcastChannel}}),a})); 190!function(){function e(){define("SAP/GuestAccess",["require","exports"],(function(e,s){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.isUserAnonymous=void 0}))}function s(s,c){if(!s)if(c)return e();else e();else!function(s,u){if(s&&s[i]){if(s[i]&&s[i].includes("/"))n=s[i];else n=s[i]+"/"+o.join("/");if(n===t)if(u)e();else e();else if(u){var c=r.requirejs(n);module.exports=c}else define(t,[n],(function(e){return e}))}else e()}(s.modules[u].features,c)}var n,t="SAP/GuestAccess",i="SAP/GuestAccess",o=t.split("/"),u=o.shift(),r=function(){return this||(0,eval)("this")}();if("function"==typeof defineFeature)defineFeature("SAP/GuestAccess",["require","exports"],(function(e,s){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.isUserAnonymous=void 0}));else if(r.contents)s(r.contents,!1);else if("undefined"==typeof window)s(function(){try{contents=require("json!resources/contents")}catch(e){try{contents=require("json!contents")}catch(e){contents=""}}}()||r.requirejs("SAP/contents.json"),!1)}();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.