sprof 0.0.74 → 0.0.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sprof.js +66 -64
- package/dist/sprof.umd.cjs +7 -7
- package/package.json +1 -1
package/dist/sprof.umd.cjs
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
13
|
and limitations under the License.
|
|
14
|
-
***************************************************************************** */var uo;(function(t){(function(e){var n=typeof globalThis=="object"?globalThis:typeof co=="object"?co:typeof self=="object"?self:typeof this=="object"?this:c(),o=r(t);typeof n.Reflect<"u"&&(o=r(n.Reflect,o)),e(o,n),typeof n.Reflect>"u"&&(n.Reflect=t);function r(l,u){return function(h,f){Object.defineProperty(l,h,{configurable:!0,writable:!0,value:f}),u&&u(h,f)}}function s(){try{return Function("return this;")()}catch{}}function a(){try{return(0,eval)("(function() { return this; })()")}catch{}}function c(){return s()||a()}})(function(e,n){var o=Object.prototype.hasOwnProperty,r=typeof Symbol=="function",s=r&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",a=r&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",c=typeof Object.create=="function",l={__proto__:[]}instanceof Array,u=!c&&!l,h={create:c?function(){return Ii(Object.create(null))}:l?function(){return Ii({__proto__:null})}:function(){return Ii({})},has:u?function(y,b){return o.call(y,b)}:function(y,b){return b in y},get:u?function(y,b){return o.call(y,b)?y[b]:void 0}:function(y,b){return y[b]}},f=Object.getPrototypeOf(Function),m=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Um(),g=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Wm(),p=typeof WeakMap=="function"?WeakMap:jm(),E=r?Symbol.for("@reflect-metadata:registry"):void 0,w=_m(),M=Hm(w);function O(y,b,k,B){if(z(k)){if(!ua(y))throw new TypeError;if(!ha(b))throw new TypeError;return Pm(y,b)}else{if(!ua(y))throw new TypeError;if(!ee(b))throw new TypeError;if(!ee(B)&&!z(B)&&!gt(B))throw new TypeError;return gt(B)&&(B=void 0),k=ze(k),Tm(y,b,k,B)}}e("decorate",O);function L(y,b){function k(B,P){if(!ee(B))throw new TypeError;if(!z(P)&&!Om(P))throw new TypeError;sa(y,b,B,P)}return k}e("metadata",L);function F(y,b,k,B){if(!ee(k))throw new TypeError;return z(B)||(B=ze(B)),sa(y,b,k,B)}e("defineMetadata",F);function T(y,b,k){if(!ee(b))throw new TypeError;return z(k)||(k=ze(k)),ia(y,b,k)}e("hasMetadata",T);function we(y,b,k){if(!ee(b))throw new TypeError;return z(k)||(k=ze(k)),xi(y,b,k)}e("hasOwnMetadata",we);function ke(y,b,k){if(!ee(b))throw new TypeError;return z(k)||(k=ze(k)),oa(y,b,k)}e("getMetadata",ke);function je(y,b,k){if(!ee(b))throw new TypeError;return z(k)||(k=ze(k)),ra(y,b,k)}e("getOwnMetadata",je);function pt(y,b){if(!ee(y))throw new TypeError;return z(b)||(b=ze(b)),aa(y,b)}e("getMetadataKeys",pt);function Sn(y,b){if(!ee(y))throw new TypeError;return z(b)||(b=ze(b)),la(y,b)}e("getOwnMetadataKeys",Sn);function Nm(y,b,k){if(!ee(b))throw new TypeError;if(z(k)||(k=ze(k)),!ee(b))throw new TypeError;z(k)||(k=ze(k));var B=Tt(b,k,!1);return z(B)?!1:B.OrdinaryDeleteMetadata(y,b,k)}e("deleteMetadata",Nm);function Pm(y,b){for(var k=y.length-1;k>=0;--k){var B=y[k],P=B(b);if(!z(P)&&!gt(P)){if(!ha(P))throw new TypeError;b=P}}return b}function Tm(y,b,k,B){for(var P=y.length-1;P>=0;--P){var oe=y[P],te=oe(b,k,B);if(!z(te)&&!gt(te)){if(!ee(te))throw new TypeError;B=te}}return B}function ia(y,b,k){var B=xi(y,b,k);if(B)return!0;var P=Mi(b);return gt(P)?!1:ia(y,P,k)}function xi(y,b,k){var B=Tt(b,k,!1);return z(B)?!1:da(B.OrdinaryHasOwnMetadata(y,b,k))}function oa(y,b,k){var B=xi(y,b,k);if(B)return ra(y,b,k);var P=Mi(b);if(!gt(P))return oa(y,P,k)}function ra(y,b,k){var B=Tt(b,k,!1);if(!z(B))return B.OrdinaryGetOwnMetadata(y,b,k)}function sa(y,b,k,B){var P=Tt(k,B,!0);P.OrdinaryDefineOwnMetadata(y,b,k,B)}function aa(y,b){var k=la(y,b),B=Mi(y);if(B===null)return k;var P=aa(B,b);if(P.length<=0)return k;if(k.length<=0)return P;for(var oe=new g,te=[],q=0,I=k;q<I.length;q++){var R=I[q],$=oe.has(R);$||(oe.add(R),te.push(R))}for(var A=0,U=P;A<U.length;A++){var R=U[A],$=oe.has(R);$||(oe.add(R),te.push(R))}return te}function la(y,b){var k=Tt(y,b,!1);return k?k.OrdinaryOwnMetadataKeys(y,b):[]}function ca(y){if(y===null)return 1;switch(typeof y){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return y===null?1:6;default:return 6}}function z(y){return y===void 0}function gt(y){return y===null}function zm(y){return typeof y=="symbol"}function ee(y){return typeof y=="object"?y!==null:typeof y=="function"}function Vm(y,b){switch(ca(y)){case 0:return y;case 1:return y;case 2:return y;case 3:return y;case 4:return y;case 5:return y}var k="string",B=fa(y,s);if(B!==void 0){var P=B.call(y,k);if(ee(P))throw new TypeError;return P}return Fm(y)}function Fm(y,b){var k,B;{var P=y.toString;if(kn(P)){var B=P.call(y);if(!ee(B))return B}var k=y.valueOf;if(kn(k)){var B=k.call(y);if(!ee(B))return B}}throw new TypeError}function da(y){return!!y}function Dm(y){return""+y}function ze(y){var b=Vm(y);return zm(b)?b:Dm(b)}function ua(y){return Array.isArray?Array.isArray(y):y instanceof Object?y instanceof Array:Object.prototype.toString.call(y)==="[object Array]"}function kn(y){return typeof y=="function"}function ha(y){return typeof y=="function"}function Om(y){switch(ca(y)){case 3:return!0;case 4:return!0;default:return!1}}function Bi(y,b){return y===b||y!==y&&b!==b}function fa(y,b){var k=y[b];if(k!=null){if(!kn(k))throw new TypeError;return k}}function ma(y){var b=fa(y,a);if(!kn(b))throw new TypeError;var k=b.call(y);if(!ee(k))throw new TypeError;return k}function pa(y){return y.value}function ga(y){var b=y.next();return b.done?!1:b}function ya(y){var b=y.return;b&&b.call(y)}function Mi(y){var b=Object.getPrototypeOf(y);if(typeof y!="function"||y===f||b!==f)return b;var k=y.prototype,B=k&&Object.getPrototypeOf(k);if(B==null||B===Object.prototype)return b;var P=B.constructor;return typeof P!="function"||P===y?b:P}function Lm(){var y;!z(E)&&typeof n.Reflect<"u"&&!(E in n.Reflect)&&typeof n.Reflect.defineMetadata=="function"&&(y=qm(n.Reflect));var b,k,B,P=new p,oe={registerProvider:te,getProvider:I,setProvider:$};return oe;function te(A){if(!Object.isExtensible(oe))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case y===A:break;case z(b):b=A;break;case b===A:break;case z(k):k=A;break;case k===A:break;default:B===void 0&&(B=new g),B.add(A);break}}function q(A,U){if(!z(b)){if(b.isProviderFor(A,U))return b;if(!z(k)){if(k.isProviderFor(A,U))return b;if(!z(B))for(var Z=ma(B);;){var J=ga(Z);if(!J)return;var $e=pa(J);if($e.isProviderFor(A,U))return ya(Z),$e}}}if(!z(y)&&y.isProviderFor(A,U))return y}function I(A,U){var Z=P.get(A),J;return z(Z)||(J=Z.get(U)),z(J)&&(J=q(A,U),z(J)||(z(Z)&&(Z=new m,P.set(A,Z)),Z.set(U,J))),J}function R(A){if(z(A))throw new TypeError;return b===A||k===A||!z(B)&&B.has(A)}function $(A,U,Z){if(!R(Z))throw new Error("Metadata provider not registered.");var J=I(A,U);if(J!==Z){if(!z(J))return!1;var $e=P.get(A);z($e)&&($e=new m,P.set(A,$e)),$e.set(U,Z)}return!0}}function _m(){var y;return!z(E)&&ee(n.Reflect)&&Object.isExtensible(n.Reflect)&&(y=n.Reflect[E]),z(y)&&(y=Lm()),!z(E)&&ee(n.Reflect)&&Object.isExtensible(n.Reflect)&&Object.defineProperty(n.Reflect,E,{enumerable:!1,configurable:!1,writable:!1,value:y}),y}function Hm(y){var b=new p,k={isProviderFor:function(R,$){var A=b.get(R);return z(A)?!1:A.has($)},OrdinaryDefineOwnMetadata:te,OrdinaryHasOwnMetadata:P,OrdinaryGetOwnMetadata:oe,OrdinaryOwnMetadataKeys:q,OrdinaryDeleteMetadata:I};return w.registerProvider(k),k;function B(R,$,A){var U=b.get(R),Z=!1;if(z(U)){if(!A)return;U=new m,b.set(R,U),Z=!0}var J=U.get($);if(z(J)){if(!A)return;if(J=new m,U.set($,J),!y.setProvider(R,$,k))throw U.delete($),Z&&b.delete(R),new Error("Wrong provider for target.")}return J}function P(R,$,A){var U=B($,A,!1);return z(U)?!1:da(U.has(R))}function oe(R,$,A){var U=B($,A,!1);if(!z(U))return U.get(R)}function te(R,$,A,U){var Z=B(A,U,!0);Z.set(R,$)}function q(R,$){var A=[],U=B(R,$,!1);if(z(U))return A;for(var Z=U.keys(),J=ma(Z),$e=0;;){var wa=ga(J);if(!wa)return A.length=$e,A;var Gm=pa(wa);try{A[$e]=Gm}catch(Zm){try{ya(J)}finally{throw Zm}}$e++}}function I(R,$,A){var U=B($,A,!1);if(z(U)||!U.delete(R))return!1;if(U.size===0){var Z=b.get($);z(Z)||(Z.delete(A),Z.size===0&&b.delete(Z))}return!0}}function qm(y){var b=y.defineMetadata,k=y.hasOwnMetadata,B=y.getOwnMetadata,P=y.getOwnMetadataKeys,oe=y.deleteMetadata,te=new p,q={isProviderFor:function(I,R){var $=te.get(I);return!z($)&&$.has(R)?!0:P(I,R).length?(z($)&&($=new g,te.set(I,$)),$.add(R),!0):!1},OrdinaryDefineOwnMetadata:b,OrdinaryHasOwnMetadata:k,OrdinaryGetOwnMetadata:B,OrdinaryOwnMetadataKeys:P,OrdinaryDeleteMetadata:oe};return q}function Tt(y,b,k){var B=w.getProvider(y,b);if(!z(B))return B;if(k){if(w.setProvider(y,b,M))return M;throw new Error("Illegal state.")}}function Um(){var y={},b=[],k=function(){function q(I,R,$){this._index=0,this._keys=I,this._values=R,this._selector=$}return q.prototype["@@iterator"]=function(){return this},q.prototype[a]=function(){return this},q.prototype.next=function(){var I=this._index;if(I>=0&&I<this._keys.length){var R=this._selector(this._keys[I],this._values[I]);return I+1>=this._keys.length?(this._index=-1,this._keys=b,this._values=b):this._index++,{value:R,done:!1}}return{value:void 0,done:!0}},q.prototype.throw=function(I){throw this._index>=0&&(this._index=-1,this._keys=b,this._values=b),I},q.prototype.return=function(I){return this._index>=0&&(this._index=-1,this._keys=b,this._values=b),{value:I,done:!0}},q}(),B=function(){function q(){this._keys=[],this._values=[],this._cacheKey=y,this._cacheIndex=-2}return Object.defineProperty(q.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),q.prototype.has=function(I){return this._find(I,!1)>=0},q.prototype.get=function(I){var R=this._find(I,!1);return R>=0?this._values[R]:void 0},q.prototype.set=function(I,R){var $=this._find(I,!0);return this._values[$]=R,this},q.prototype.delete=function(I){var R=this._find(I,!1);if(R>=0){for(var $=this._keys.length,A=R+1;A<$;A++)this._keys[A-1]=this._keys[A],this._values[A-1]=this._values[A];return this._keys.length--,this._values.length--,Bi(I,this._cacheKey)&&(this._cacheKey=y,this._cacheIndex=-2),!0}return!1},q.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=y,this._cacheIndex=-2},q.prototype.keys=function(){return new k(this._keys,this._values,P)},q.prototype.values=function(){return new k(this._keys,this._values,oe)},q.prototype.entries=function(){return new k(this._keys,this._values,te)},q.prototype["@@iterator"]=function(){return this.entries()},q.prototype[a]=function(){return this.entries()},q.prototype._find=function(I,R){if(!Bi(this._cacheKey,I)){this._cacheIndex=-1;for(var $=0;$<this._keys.length;$++)if(Bi(this._keys[$],I)){this._cacheIndex=$;break}}return this._cacheIndex<0&&R&&(this._cacheIndex=this._keys.length,this._keys.push(I),this._values.push(void 0)),this._cacheIndex},q}();return B;function P(q,I){return q}function oe(q,I){return I}function te(q,I){return[q,I]}}function Wm(){var y=function(){function b(){this._map=new m}return Object.defineProperty(b.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),b.prototype.has=function(k){return this._map.has(k)},b.prototype.add=function(k){return this._map.set(k,k),this},b.prototype.delete=function(k){return this._map.delete(k)},b.prototype.clear=function(){this._map.clear()},b.prototype.keys=function(){return this._map.keys()},b.prototype.values=function(){return this._map.keys()},b.prototype.entries=function(){return this._map.entries()},b.prototype["@@iterator"]=function(){return this.keys()},b.prototype[a]=function(){return this.keys()},b}();return y}function jm(){var y=16,b=h.create(),k=B();return function(){function I(){this._key=B()}return I.prototype.has=function(R){var $=P(R,!1);return $!==void 0?h.has($,this._key):!1},I.prototype.get=function(R){var $=P(R,!1);return $!==void 0?h.get($,this._key):void 0},I.prototype.set=function(R,$){var A=P(R,!0);return A[this._key]=$,this},I.prototype.delete=function(R){var $=P(R,!1);return $!==void 0?delete $[this._key]:!1},I.prototype.clear=function(){this._key=B()},I}();function B(){var I;do I="@@WeakMap@@"+q();while(h.has(b,I));return b[I]=!0,I}function P(I,R){if(!o.call(I,k)){if(!R)return;Object.defineProperty(I,k,{value:h.create()})}return I[k]}function oe(I,R){for(var $=0;$<R;++$)I[$]=Math.random()*255|0;return I}function te(I){if(typeof Uint8Array=="function"){var R=new Uint8Array(I);return typeof crypto<"u"?crypto.getRandomValues(R):typeof msCrypto<"u"?msCrypto.getRandomValues(R):oe(R,I),R}return oe(new Array(I),I)}function q(){var I=te(y);I[6]=I[6]&79|64,I[8]=I[8]&191|128;for(var R="",$=0;$<y;++$){var A=I[$];($===4||$===6||$===8)&&(R+="-"),A<16&&(R+="0"),R+=A.toString(16).toLowerCase()}return R}}function Ii(y){return y.__=void 0,delete y.__,y}})})(uo||(uo={}));class ve{static UUID(){return De()}static GUID(){const e=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}}const mt=class mt{static BuildClass(e,n){n&&Object.keys(n).forEach(o=>{const r=n[o];if(this.isPrimitive(r))e[o]instanceof Date?e[o]=new Date(r):e[o]=r;else if(r!=null&&!Array.isArray(r))if(e[o]&&e[o].constructor)e[o]=new e[o].constructor(r);else{const s=Reflect.getMetadata(o,e);s&&(e[o]=new s[o](r))}if(Array.isArray(r)){const s=Reflect.getMetadata(o,e);s&&(e[o]=r.map(a=>new s[o](a)))}})}static isPrimitive(e){return e!==null&&typeof e<"u"&&e!==Object(e)}static RemoveFromClassByIndex(e,n,o){mt.RemoveFromClass(e,n,o)}static RemoveFromClassById(e,n,o){if(!e)return;const r=n.findIndex(s=>s.id===e);mt.RemoveFromClass(r,n,o)}static RemoveFromClass(e,n,o){if(e<0)return;const r=n[e].id;r&&o&&o.push(r),n.splice(e,1)}static GetPropertyName(e){const n=new e;return new Proxy(n,{get(o,r){return r}})}static InitClassInstance(e,n){const o=e.constructor(n);return mt.BuildClass(o),o.id=ve.UUID(),o}static ExistsWithId(e,n){return e.some(o=>o.id===n)}};d(mt,"GetClassConstructor",e=>(n,o)=>{const r=Reflect.getMetadata(`property:${o}`,n)||{};r[o]=e,Reflect.defineMetadata(o,r,n)});let V=mt;class ne{static Capitalize(e){return e?e[0].toUpperCase()+e.slice(1):""}static ToCamelCase(e){const n=new RegExp(["[А-Я][а-я][A-Z][a-z]+","[А-Я]+(?=[А-Я][а-я])","[A-Z]+(?=[A-Z][a-z])","[А-Я]+","[A-Z]+","[а-я]+","[a-z]+","[0-9]+"].join("|"),"g");return e.match(n).map((r,s)=>s===0?r.toLowerCase():ne.Capitalize(r.toLowerCase())).join("")}static ToKebabCase(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}static GetStringBetweenChars(e,n,o){return e.substring(e.indexOf(n)+2,e.lastIndexOf(o))}static Translit(e,n){const o={q:"й",w:"ц",e:"у",r:"к",t:"е",y:"н",u:"г",i:"ш",o:"щ",p:"з","[":"х","]":"ъ",a:"ф",s:"ы",d:"в",f:"а",g:"п",h:"р",j:"о",k:"л",l:"д",";":"ж","'":"э",z:"я",x:"ч",c:"с",v:"м",b:"и",n:"т",m:"ь",",":"б",".":"ю","/":"."};return n&&/[а-яА-Я]/g.test(e)?e.replace(/[А-я/,.;'\][]/g,r=>{if(r===r.toLowerCase()){const a=Object.keys(o).find(c=>o[c]===r);return a||""}const s=Object.keys(o).find(a=>o[a]===r.toLowerCase());return s?s.toUpperCase():""}):e.replace(/[A-z/,.;'\][]/g,r=>r===r.toLowerCase()?o[r]:o[r.toLowerCase()].toUpperCase())}static RemoveEmoji(e){const n=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;return e.replace(n,"")}static CanBeTranslited(e){return/^[~`!@#$%^&*()_+=[\]\\{}|;':",.\/<>?a-zA-Z0-9-]+$/.test(e)}static StringsEquals(e,n){const o=e.toLowerCase().replaceAll(/\s/g,""),r=n.toLowerCase().replaceAll(/\s/g,""),s=ne.Translit(o),a=ne.Translit(r);return o.includes(r)||s.includes(r)||o.includes(a)}static SearchIn(e,n){return ne.StringsEquals(e,n)}static FormatToPercentage(e){return`${e}%`}static WrapSubStr(e,n){const o=new RegExp(ne.GetVariants(n).join("|"),"gi");return e.replace(o,`<span class="search-text">${n}</span>`)}static GetVariants(e){const n=ne.Translit(e);return[e,ne.Capitalize(e),e.toLowerCase(),e.toUpperCase(),n,ne.Capitalize(n),n.toLowerCase(),n.toUpperCase()]}static ContainsNum(e){return/\d/.test(e)}static JoinSnake(...e){return e.join("_")}static GetDynamicCountName(e,n){const o=[2,0,1,1,1,2];return e.length+" "+n[e.length%100>4&&e.length%100<20?2:o[e.length%10<5?e.length%10:5]]}}var Y=(t=>(t.Date="date",t.String="string",t.Boolean="boolean",t.Number="number",t.Set="set",t.Join="join",t))(Y||{}),de=(t=>(t.Eq="=",t.Ne="!=",t.Gt=">",t.Lt="<",t.Btw="between",t.In="in",t.Like="like",t.Null="is null",t.NotNull="is not null",t))(de||{}),Vl=Object.defineProperty,Fl=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&Vl(e,n,r),r};const ho=class yt{constructor(e){d(this,"id");d(this,"model","");d(this,"label","");d(this,"col","");d(this,"operator",de.Eq);d(this,"date1");d(this,"date2");d(this,"value1","");d(this,"boolean",!1);d(this,"number",0);d(this,"type",Y.String);d(this,"set",[]);d(this,"isSet",!1);d(this,"joinTable","");d(this,"joinTableModel","");d(this,"joinTableFk","");d(this,"joinTablePk","");d(this,"joinTableId","");d(this,"joinTableIdCol","");V.BuildClass(this,e)}eq(e){if(!e)return!1;if(this.type===Y.Join){const n=e.model===this.model&&e.operator===this.operator&&this.joinTableModel===e.joinTableModel;return e.operator===de.In?n&&He.Eq(this.set,e.set):n}return e.model===this.model&&e.col===this.col&&e.operator===this.operator}valueEq(e){return!this||!e||!this.eq(e)?!1:this.type===Y.Boolean?this.boolean===(e==null?void 0:e.boolean):this.type===Y.String?this.value1===(e==null?void 0:e.value1):this.type===Y.Join&&this.set.length?He.Eq(this.set,e.set):!1}toUrlQuery(){const e=this.type?`"type":"${this.type}"`:"",n=this.model?`"model":"${this.model}"`:"",o=this.col?`"col":"${this.col}"`:"",r=this.operator?`"operator":"${this.operator}"`:"",s=this.value1?`"value1":"${this.value1}"`:"",a=this.type===Y.Boolean?`"boolean":${this.boolean}`:"",c=this.type===Y.Date&&this.date1?`"date1":"${this.date1.toISOString()}"`:"",l=this.type===Y.Date&&this.date2?`"date2":"${this.date2.toISOString()}"`:"",u=this.type===Y.Number?`"number":${this.number}`:"",h=this.type===Y.Set||this.operator===de.In?`"set":${JSON.stringify(this.set)}`:"",f=this.type===Y.Join?`"joinTableModel":"${this.joinTableModel}"`:"";return[e,n,o,r,s,a,c,l,u,h,f].filter(m=>m!=="").toString()}fromUrlQuery(e){this.model=e.get("model")??"",this.col=e.get("col")??"",this.label=e.get("label")??"",this.operator=e.get("operator")??"",this.value1=e.get("value1")??"",this.type=e.get("type")??"",this.boolean=!!(e.get("boolean")??""),this.joinTableModel=e.get("joinTableModel")??"",this.joinTableId=e.get("joinTableId")??"",this.joinTableFk=e.get("joinTableFk")??"",this.joinTableIdCol=e.get("joinTableIdCol")??"",this.joinTablePk=e.get("joinTablePk")??""}isUnaryFilter(){return this.operator===de.Eq||this.operator===de.Gt||this.operator===de.Lt}isBetweenFilter(){return this.operator===de.Btw}isSetFilter(){return this.operator===de.In}static Create(e,n,o){const r=new yt;return r.model=e.GetClassName(),r.col=n??"",r.type=o,r.type===Y.Number&&(r.value1="0"),r.type===Y.String&&(r.value1=""),r.type===Y.Boolean&&(r.value1="false",r.operator=de.Eq),r}static CreateFilterModel(e,n,o){const r=new yt;return r.id=De(),r.model=typeof e=="string"?e:e.GetClassName(),r.col=n??"",r.type=o,r.type===Y.Number&&(r.value1="0"),r.type===Y.String&&(r.value1=""),r.type===Y.Boolean&&(r.value1="false"),r}static CreateFilterModelWithJoin(e,n,o,r,s,a,c,l){const u=new yt;return u.id=De(),u.joinTable=o,u.joinTablePk=r,u.joinTableFk=s,u.col=n,u.type=a,c&&(u.joinTableId=c),l&&(u.joinTableIdCol=l),u}static CreateFilterModelWithJoinV2(e,n,o,r,s,a,c){const l=new yt;return l.model=e,l.joinTableModel=o,l.joinTablePk=r,l.joinTableFk=s,l.col=n,l.type=Y.Join,a&&(l.joinTableId=a),c&&(l.joinTableIdCol=c),l}static OnlyIfSecondModelExists(e,n){const o=new yt;return o.id=De(),o.model=ne.ToCamelCase(e.GetClassName()),o.joinTableModel=ne.ToCamelCase(n.GetClassName()),o.type=Y.Join,o}addToSet(...e){e.forEach(n=>{if(this.set.indexOf(n)===-1){this.set.push(n);return}this.set=this.set.filter(o=>o!==n)})}pushToSet(...e){e.forEach(n=>{this.set.indexOf(n)===-1&&this.set.push(n)})}replaceSet(...e){this.set=e}setBoolean(e){this.boolean=e}toRef(){return i.ref(this)}setDate1(e){this.date1=e}setDate2(e){this.date2=e}dropDates(){this.setDate1(),this.setDate2()}setDatesRange(e,n){if(!e&&!n){this.dropDates();return}if(!n){this.setDate1(e),this.operator=de.Eq;return}this.setDate2(n),this.operator=de.Btw}};Fl([V.GetClassConstructor(String)],ho.prototype,"set");let fo=ho;const mo=x(i.defineComponent({__name:"FilterCheckbox",props:{model:{type:Object,default:()=>new fo,required:!0}},emits:["load"],setup(t,{emit:e}){const n=t,o=i.ref(!1),r=e,s=()=>{n.model.setBoolean(o.value),o.value?S.H.FTSP.Get().setF(n.model):S.H.FTSP.Get().removeF(n.model),r("load")};return(a,c)=>{const l=i.resolveComponent("PCheckBox");return i.openBlock(),i.createBlock(l,{modelValue:i.unref(o),"onUpdate:modelValue":c[0]||(c[0]=u=>i.isRef(o)?o.value=u:null),label:t.model.label,size:"mini",onChange:s},null,8,["modelValue","label"])}}}),[["__scopeId","data-v-9eaa1f25"]]),po=x(i.defineComponent({__name:"FiltersButtonsSelect",props:{models:{type:Array,default:()=>[]},defaultLabel:{type:String,default:"Все"},inverse:{type:Boolean,required:!1,default:!1}},emits:["load"],setup(t,{emit:e}){const n=e,o=i.ref(void 0),r=async a=>{S.H.FTSP.Get().replaceF(a,o.value),o.value=a,S.H.FTSP.Get().p.drop()},s=async a=>{await r(a),n("load")};return(a,c)=>{const l=i.resolveComponent("PString"),u=i.resolveComponent("PButton"),h=i.resolveComponent("GridContainer"),f=i.resolveComponent("InfoItem");return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(l,{string:t.defaultLabel,"font-size":"14px",padding:"0",margin:"20px 0 0 10px"},null,8,["string"]),i.createVNode(f,{margin:"5px 0 0 0px","with-open-window":!1,height:"auto",background:"#F5F5F5","border-color":"#C4C4C4",padding:"7px","with-hover":!1},{title:i.withCtx(()=>c[0]||(c[0]=[])),default:i.withCtx(()=>[i.createVNode(h,{"max-width":"100%","grid-gap":"7px","grid-template-columns":"repeat(auto-fit, minmax(100%, 1fr))",margin:"0px"},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.models,(m,g)=>(i.openBlock(),i.createBlock(u,{key:g,color:"blue",height:"auto",text:m.label,"is-toggle":m.valueEq(i.unref(o)),"toggle-mode":!0,inverse:t.inverse,onClick:p=>s(m.valueEq(i.unref(o))?void 0:m)},null,8,["text","is-toggle","inverse","onClick"]))),128))]),_:1})]),_:1})],64)}}}),[["__scopeId","data-v-77b88c24"]]),Dl=["value","label"],go=x(i.defineComponent({__name:"FilterSelect",props:{models:{type:Array,default:()=>[]},defaultLabel:{type:String,default:"Все"},inverse:{type:Boolean,required:!1,default:!1}},emits:["load"],setup(t,{emit:e}){const n=e,o=S.H.FTSP.Get(),r=i.ref(void 0),s=async c=>{o.replaceF(c,r.value),r.value=c},a=async c=>{c?await s(r.value):await s(void 0),n("load")};return(c,l)=>{const u=i.resolveComponent("PSelect");return i.openBlock(),i.createBlock(u,{modelValue:i.unref(r),"onUpdate:modelValue":l[0]||(l[0]=h=>i.isRef(r)?r.value=h:null),clearable:i.unref(r),placeholder:t.defaultLabel,onChange:a},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.models,(h,f)=>(i.openBlock(),i.createElementBlock("option",{key:f,value:h,label:h.label},null,8,Dl))),128))]),_:1},8,["modelValue","clearable","placeholder"])}}}),[["__scopeId","data-v-7b102249"]]),yo=x(i.defineComponent({__name:"FTSPPanel",setup(t){return i.onBeforeMount(async()=>{}),(e,n)=>(i.openBlock(),i.createElementBlock("div"))}}),[["__scopeId","data-v-799d5edf"]]),wo=x(i.defineComponent({__name:"GeneralItem",props:{background:{type:String,required:!1,default:"#ffffff"},height:{type:String,required:!1,default:"40px"},width:{type:String,required:!1,default:"auto"},ready:{type:String,required:!1,default:"0%"},padding:{type:String,required:!1,default:"10px"},borderColor:{type:String,required:!1,default:"#343D5C"},margin:{type:String,required:!1,default:"5px"},scale:{type:Boolean,required:!1,default:!0},fontSize:{type:String,required:!1,default:"14px"},withIcon:{type:Boolean,required:!1,default:!1}},setup(t){const e=i.ref(!1);return(n,o)=>(i.openBlock(),i.createElementBlock("div",{class:"general-block-item",style:i.normalizeStyle({background:t.background,height:t.height,width:t.width,borderColor:t.borderColor,padding:t.padding,margin:t.margin,transform:t.scale&&i.unref(e)?"scale(1.03, 1.03)":""}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},[i.createElementVNode("div",{class:"green",style:i.normalizeStyle({width:`${t.ready}`})},null,4),i.createElementVNode("div",{class:"general-block-item-title",style:i.normalizeStyle({fontSize:t.fontSize})},[i.renderSlot(n.$slots,"general-item",{},void 0,!0)],4),i.createElementVNode("div",{class:"tools-icon",style:i.normalizeStyle({display:t.withIcon?"flex":"none"})},o[2]||(o[2]=[i.createElementVNode("svg",{class:"icon-del"},[i.createElementVNode("use",{"xlink:href":"#del"})],-1)]),4),o[3]||(o[3]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"del",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10"},[i.createElementVNode("path",{d:"M2.91797 8.75C2.6888 8.75 2.49255 8.66833 2.32922 8.505C2.16589 8.34167 2.08436 8.14556 2.08464 7.91667V2.5H1.66797V1.66667H3.7513V1.25H6.2513V1.66667H8.33464V2.5H7.91797V7.91667C7.91797 8.14583 7.8363 8.34208 7.67297 8.50542C7.50964 8.66875 7.31352 8.75028 7.08464 8.75H2.91797ZM7.08464 2.5H2.91797V7.91667H7.08464V2.5ZM3.7513 7.08333H4.58464V3.33333H3.7513V7.08333ZM5.41797 7.08333H6.2513V3.33333H5.41797V7.08333Z"})])],-1))],36))}}),[["__scopeId","data-v-1056443d"]]),bo=x(i.defineComponent({__name:"IconDownload",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){const e=i.ref(!1);return(n,o)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size,fill:t.hoverColor?i.unref(e)?t.hoverColor:t.color:(i.unref(e),t.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},o[2]||(o[2]=[i.createElementVNode("use",{"xlink:href":"#download"},null,-1)]),38)),o[3]||(o[3]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"download",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[i.createElementVNode("path",{d:"M15.6443 5.06141C15.0797 5.29331 15.0998 5.06141 15.0998 12.1393C15.0998 15.7388 15.0696 18.6728 15.0293 18.6728C14.9889 18.6728 14.1521 17.8763 13.1842 16.9083C11.6819 15.4061 11.3592 15.1338 11.0467 15.0733C10.724 15.0229 10.6333 15.0632 10.3611 15.3254C10.1292 15.5573 10.0586 15.7186 10.0586 16.0211C10.0586 16.3941 10.1594 16.5151 12.8615 19.2071C15.4326 21.7681 15.6947 22 16.0073 22C16.3198 22 16.582 21.7681 19.153 19.2071C21.9156 16.4546 21.9559 16.4042 21.9559 15.9908C21.9559 15.4867 21.6535 15.1641 21.109 15.0733C20.736 15.0128 20.7259 15.0229 18.8808 16.868C17.0357 18.6929 17.0155 18.7131 17.0155 18.3703C17.0054 18.1787 16.9953 15.2145 16.9853 11.7965L16.9651 5.56554L16.713 5.31348C16.4307 5.03117 15.9669 4.92026 15.6443 5.06141Z"}),i.createElementVNode("path",{d:"M5.30247 20.3872L5 20.6997L5.04033 22.081C5.07058 23.4321 5.08066 23.4825 5.44363 24.2488C6.09899 25.6099 7.17782 26.5173 8.59945 26.8904C9.47663 27.1122 22.5335 27.1223 23.4006 26.8904C25.044 26.4669 26.3245 25.2671 26.8084 23.7043C26.9496 23.2506 27 22.7868 27 21.8794C27 20.6796 27 20.6695 26.7076 20.3771C26.3144 19.9839 25.901 19.9839 25.4675 20.3771L25.1347 20.6695L25.1045 21.8189C25.0843 22.8776 25.0541 23.0086 24.7516 23.6035C24.3987 24.3093 23.7938 24.8235 23.088 25.0251C22.5839 25.1663 9.4363 25.1663 8.93217 25.0251C8.30706 24.8436 7.64161 24.3093 7.29881 23.7144C7.00642 23.2002 6.98625 23.0691 6.93584 21.9197L6.88543 20.6695L6.5527 20.3771C6.11916 19.9839 5.70577 19.9839 5.30247 20.3872Z"})])],-1))],64))}}),[["__scopeId","data-v-94c18208"]]),Co=x(i.defineComponent({__name:"IconFilter",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){const e=i.ref(!1);return(n,o)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size,fill:t.hoverColor?i.unref(e)?t.hoverColor:t.color:(i.unref(e),t.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},o[2]||(o[2]=[i.createElementVNode("use",{"xlink:href":"#filter"},null,-1)]),38)),o[3]||(o[3]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"filter",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[i.createElementVNode("path",{d:"M8.58216 5.14236C6.22884 5.77558 4.70721 8.02494 5.04745 10.3688C5.61452 14.2627 10.3684 15.8127 13.0714 12.9962C13.6385 12.4103 14.319 11.2194 14.319 10.8225C14.319 10.6902 14.9428 10.6713 20.3771 10.6713H26.4353L26.7094 10.3972C27.0969 10.0097 27.0969 9.44261 26.7094 9.05511L26.4353 8.78103H20.396H14.3662L14.1867 8.23287C13.4589 5.9646 10.8599 4.52803 8.58216 5.14236ZM10.9638 7.21215C13.0525 8.24232 13.0336 11.2194 10.9355 12.2496C10.2172 12.5993 9.20593 12.6276 8.54436 12.2968C6.21939 11.1533 6.43676 7.81702 8.8846 7.01368C9.45166 6.8341 10.3495 6.91916 10.9638 7.21215Z"}),i.createElementVNode("path",{d:"M21.5953 17.6266C21.1133 17.7211 20.2155 18.0519 19.8752 18.2599C18.9868 18.7986 18.0322 20.0083 17.8054 20.8778L17.6826 21.3504H12.3616C6.66257 21.3504 6.63422 21.3504 6.37904 21.8135C6.20892 22.1443 6.26562 22.6452 6.51135 22.9287L6.73818 23.1933L12.1915 23.2406L17.6448 23.2878L17.8621 23.8738C18.4292 25.4427 19.7334 26.6052 21.2929 26.936C22.1057 27.1061 23.3154 27.0021 24.062 26.6997C25.3379 26.1799 26.4059 25.0174 26.8029 23.7037C26.9635 23.165 27.0013 22.8625 26.9635 22.0781C26.9352 21.1991 26.8974 21.0479 26.5855 20.3864C25.8105 18.7513 24.2794 17.7117 22.5499 17.6172C22.1529 17.5983 21.7276 17.6077 21.5953 17.6266ZM23.5517 19.8004C24.081 20.0556 24.5913 20.5754 24.8748 21.1519C24.9977 21.4071 25.045 21.7095 25.045 22.3427C25.045 23.1555 25.0261 23.2311 24.7236 23.7415C23.5611 25.6412 20.8014 25.5656 19.7902 23.5997C19.5066 23.0421 19.4405 22.0119 19.6484 21.3787C20.1682 19.8004 22.0206 19.0537 23.5517 19.8004Z"})])],-1))],64))}}),[["__scopeId","data-v-d11e6069"]]),So=x(i.defineComponent({__name:"IconArrowLeft",props:{size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"arrow-left",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},[i.createElementVNode("path",{d:"M13.4323 2.0816C13.3788 2.0909 13.2951 2.12113 13.2462 2.14904C13.1997 2.17462 11.5439 3.85601 9.56715 5.8816C6.70668 8.81648 5.96017 9.59322 5.90436 9.69787C5.84622 9.8095 5.83691 9.85601 5.83691 9.99787C5.83691 10.1397 5.84622 10.1886 5.90436 10.2979C6.00436 10.4886 13.102 17.7746 13.2764 17.8653C13.3695 17.9142 13.423 17.9258 13.5555 17.9258C13.916 17.9235 14.1788 17.6583 14.1788 17.2932C14.1788 17.0374 14.1392 16.9769 13.623 16.4467C13.3695 16.1862 11.8555 14.6328 10.2555 12.9909C8.65552 11.349 7.35087 9.99787 7.35552 9.9909C7.36017 9.9816 8.86715 8.43276 10.7044 6.54904C12.5416 4.66532 14.0671 3.08392 14.0951 3.03508C14.2392 2.79555 14.1951 2.45834 13.9927 2.25834C13.8462 2.1095 13.6323 2.04206 13.4323 2.0816Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-ca16a90c"]]),ko=x(i.defineComponent({__name:"IconCheckDefault",props:{size:{type:String,default:"22px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#check_on"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"check_on",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[i.createElementVNode("path",{d:"M29.3678 7.25259C29.2732 7.3128 28.8775 7.6999 28.5076 8.13001C27.7076 9.02463 16.2409 22.0483 16.2065 22.0999C16.1549 22.1601 15.6732 21.73 13.9786 20.1042C8.31835 14.6934 8.5334 14.8827 8.03448 14.8827C7.69899 14.8827 7.59577 14.9257 7.3463 15.1752C7.09684 15.4246 7.05383 15.5279 7.05383 15.8547C7.05383 16.3365 6.98501 16.259 10.1506 19.2354C11.5011 20.4999 13.256 22.1601 14.056 22.9171C15.6302 24.4225 15.9485 24.6461 16.3872 24.5687C16.7399 24.4999 16.7743 24.4569 20.0947 20.6891C21.5485 19.0289 23.2689 17.0762 23.914 16.3451C29.4624 10.0655 30.6495 8.69775 30.77 8.48269C30.942 8.14721 30.8474 7.6999 30.5377 7.38162C30.3399 7.19237 30.2194 7.14076 29.9183 7.14076C29.7119 7.14936 29.471 7.19237 29.3678 7.25259Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-48c8e6e2"]]),Eo=x(i.defineComponent({__name:"IconEdit",props:{size:{type:String,default:""},margin:{type:String,default:"0 15px 0 0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#edit"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"edit",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[i.createElementVNode("path",{d:"M21.993 4.16087C21.6831 4.26049 21.2404 4.48185 20.9969 4.64787C20.1778 5.22342 4.60489 20.9402 4.39459 21.4051C4.11789 22.0138 3 25.8434 3 26.1865C3 26.5961 3.30991 27.1938 3.65302 27.4373C4.2507 27.8689 4.58275 27.8468 6.88493 27.1716C8.06923 26.8174 9.23138 26.4411 9.47488 26.3194C10.0062 26.0537 25.4795 10.6468 26.0772 9.79458C26.8519 8.67669 26.9626 7.32637 26.3871 6.10887C25.6234 4.48185 23.6754 3.61853 21.993 4.16087ZM24.0406 6.25276C24.7379 6.70655 25.0035 7.69162 24.6272 8.44426C24.4501 8.78737 9.331 24.0393 8.73332 24.471C8.48982 24.6481 5.2247 25.6995 5.13616 25.6331C5.11402 25.611 5.42393 24.5042 5.82239 23.1871L6.12123 22.1909L14.1125 14.1886C22.5243 5.76576 22.4911 5.79896 23.3101 5.94285C23.4983 5.97605 23.8192 6.11994 24.0406 6.25276Z",fill:"currentColor"}),i.createElementVNode("path",{d:"M15.098 25.9216C14.5446 26.1872 14.4118 27.1169 14.8656 27.5265C15.0759 27.7146 15.4743 27.7257 21.1302 27.7589C25.325 27.781 27.273 27.7478 27.4722 27.6703C28.0367 27.4268 28.1806 26.6521 27.7489 26.154L27.4833 25.8441L21.4069 25.822C17.2674 25.8109 15.264 25.833 15.098 25.9216Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-55ea5a5c"]]),vo=x(i.defineComponent({__name:"IconEmail",props:{size:{type:String,default:""},margin:{type:String,default:"0 10px 0 0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#email"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"email",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[i.createElementVNode("path",{d:"M20 20H4C3.46957 20 2.96086 19.7893 2.58579 19.4142C2.21071 19.0391 2 18.5304 2 18V5.913C2.02243 5.39779 2.24301 4.91116 2.61568 4.5547C2.98835 4.19824 3.4843 3.99951 4 4H20C20.5304 4 21.0391 4.21071 21.4142 4.58579C21.7893 4.96086 22 5.46957 22 6V18C22 18.5304 21.7893 19.0391 21.4142 19.4142C21.0391 19.7893 20.5304 20 20 20ZM4 7.868V18H20V7.868L12 13.2L4 7.868ZM4.8 6L12 10.8L19.2 6H4.8Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-99358e0a"]]),xo=x(i.defineComponent({__name:"IconMove",props:{size:{type:String,default:"24px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#icon-move"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"icon-move",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 22"},[i.createElementVNode("path",{d:"M8.91736 3.08529L6.83471 5.17059H8.0843H9.33058V7.25588V9.34117H7.24793H5.16529L5.15868 8.09993L5.14876 6.85868L3.07273 8.93404L1 11.0127L3.08264 13.098L5.16529 15.1833V13.9321V12.6843H7.24793H9.33058V14.7696V16.8548H7.89256C7.10248 16.8548 6.45455 16.8648 6.45785 16.878C6.45785 16.8946 6.60992 17.0402 6.79504 17.2057C7.16529 17.5367 8.90744 19.1189 9.38017 19.5525C10.7058 20.7639 10.9967 21.0188 11.0331 20.999C11.0562 20.9857 12.0876 20.0523 13.3273 18.9236L15.5785 16.8714L14.124 16.8615L12.6694 16.8548V14.7696V12.6843H14.7521H16.8347V13.9255C16.8347 14.6074 16.8446 15.1668 16.8612 15.1668C16.8975 15.1668 21 11.0491 21 11.0127C21 10.9763 16.8975 6.85868 16.8612 6.85868C16.8446 6.85868 16.8347 7.41807 16.8347 8.09993V9.34117H14.7521H12.6694V7.25588V5.17059H13.9091C14.5901 5.17059 15.1488 5.16066 15.1488 5.14411C15.1488 5.12094 11.043 1 11.0165 1C11.0066 1 10.0612 1.93673 8.91736 3.08529ZM12.081 3.24086C12.6595 3.82011 13.1322 4.30337 13.1322 4.31661C13.1322 4.33316 12.8413 4.34309 12.4876 4.34309H11.843V7.25588V10.1687H14.7686H17.6942V9.53646C17.6909 9.18891 17.6975 8.89763 17.7041 8.89101C17.7074 8.88439 18.1934 9.36103 18.7785 9.9469L19.843 11.0127L18.7686 12.0885L17.6942 13.1642V12.9325C17.6909 12.8034 17.6876 12.5155 17.6843 12.2871L17.6777 11.8733L14.762 11.8634L11.843 11.8568V14.7696V17.6823L12.6331 17.689L13.4264 17.6989L12.2165 18.7978L11.0066 19.9L10.7223 19.6419C10.5669 19.5028 10.4314 19.3804 10.4215 19.3704C10.405 19.3539 9.92893 18.917 9.28099 18.3311C9.09917 18.1656 8.86777 17.9538 8.7686 17.8578L8.58678 17.6823H9.37355H10.157V14.7696V11.8568H7.24793H4.33884L4.33223 12.5022L4.32231 13.1477L3.25455 12.0785L2.19008 11.0127L3.25455 9.94359L4.32231 8.87446L4.33223 9.52322L4.33884 10.1687H7.24793H10.157V7.25588V4.34309L9.5124 4.33647L8.86446 4.32654L9.93223 3.25741C10.5174 2.67154 11.0066 2.1916 11.0165 2.1916C11.0264 2.1916 11.5058 2.66492 12.081 3.24086Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-05547f14"]]),Bo=x(i.defineComponent({__name:"IconPhone",props:{size:{type:String,default:""},margin:{type:String,default:"0 10px 0 0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#phone"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"phone",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[i.createElementVNode("path",{d:"M19.4998 21.75H19.3723C4.63482 20.9025 2.54232 8.4675 2.24982 4.6725C2.22625 4.37744 2.26114 4.08062 2.35248 3.79906C2.44382 3.5175 2.58981 3.25673 2.78211 3.03169C2.9744 2.80665 3.20921 2.62177 3.47308 2.48763C3.73695 2.35349 4.02469 2.27274 4.31982 2.25H8.45232C8.75274 2.24971 9.04632 2.33963 9.29504 2.50812C9.54377 2.67661 9.73617 2.9159 9.84732 3.195L10.9873 6C11.0971 6.27266 11.1243 6.57156 11.0657 6.85957C11.007 7.14758 10.865 7.412 10.6573 7.62L9.05982 9.2325C9.30936 10.6506 9.98846 11.9578 11.0052 12.9772C12.022 13.9967 13.3274 14.6792 14.7448 14.9325L16.3723 13.32C16.5834 13.1146 16.8504 12.9759 17.1398 12.9213C17.4292 12.8666 17.7283 12.8983 17.9998 13.0125L20.8273 14.145C21.1022 14.2597 21.3367 14.4536 21.501 14.702C21.6653 14.9504 21.7519 15.2422 21.7498 15.54V19.5C21.7498 20.0967 21.5128 20.669 21.0908 21.091C20.6689 21.5129 20.0966 21.75 19.4998 21.75ZM4.49982 3.75C4.30091 3.75 4.11014 3.82902 3.96949 3.96967C3.82884 4.11032 3.74982 4.30109 3.74982 4.5V4.56C4.09482 9 6.30732 19.5 19.4548 20.25C19.5534 20.2561 19.6521 20.2427 19.7454 20.2105C19.8388 20.1783 19.9248 20.1281 19.9987 20.0626C20.0726 19.9971 20.1328 19.9176 20.1759 19.8288C20.219 19.74 20.2441 19.6436 20.2498 19.545V15.54L17.4223 14.4075L15.2698 16.545L14.9098 16.5C8.38482 15.6825 7.49982 9.1575 7.49982 9.09L7.45482 8.73L9.58482 6.5775L8.45982 3.75H4.49982Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-131f6ba1"]]),Mo=x(i.defineComponent({__name:"IconSearch",props:{size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#search"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"search",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[i.createElementVNode("path",{d:"M11 19C12.775 18.9996 14.4988 18.4054 15.897 17.312L20.293 21.708L21.707 20.294L17.311 15.898C18.405 14.4997 18.9996 12.7754 19 11C19 6.589 15.411 3 11 3C6.589 3 3 6.589 3 11C3 15.411 6.589 19 11 19ZM11 5C14.309 5 17 7.691 17 11C17 14.309 14.309 17 11 17C7.691 17 5 14.309 5 11C5 7.691 7.691 5 11 5Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-64e76eb7"]]),Io=x(i.defineComponent({__name:"IconSelectArrow",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"arrow-down",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20"},[i.createElementVNode("path",{d:"M3.08417 4.43062C2.86268 4.4769 2.70731 4.56285 2.52549 4.74467C2.29408 4.97607 2.20152 5.2174 2.22136 5.55459C2.25111 6.0207 1.96681 5.70996 6.78995 10.5397C9.18995 12.9463 11.2263 14.9662 11.309 15.029C11.5238 15.1843 11.7123 15.2471 11.99 15.2505C12.4693 15.2538 12.109 15.581 17.1106 10.5728C22.0891 5.58764 21.7288 5.98103 21.7255 5.505C21.7255 5.37607 21.7023 5.21078 21.6726 5.13145C21.5106 4.68186 21.0511 4.38434 20.5817 4.4174C20.1519 4.44715 20.4263 4.19591 16.0164 8.60252L11.9833 12.629L8.06598 8.71161C5.91061 6.55624 4.0726 4.73475 3.98003 4.66202C3.71227 4.45376 3.38499 4.36781 3.08417 4.43062Z",fill:"currentColor"}),i.createElementVNode("path",{d:"M9.69602 16.8994C9.70593 16.9292 9.72577 17.0184 9.73569 17.1044C9.76213 17.2664 9.7985 17.2994 9.83486 17.1903C9.84478 17.154 9.89106 17.1143 9.93734 17.1044C10.0464 17.078 10.0365 17.0548 9.87453 16.9589C9.6861 16.8465 9.67288 16.8432 9.69602 16.8994Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-4d8b581f"]]),Ro=x(i.defineComponent({__name:"ArrowLeft",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){const e=i.ref(!1);return(n,o)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size,fill:t.hoverColor?i.unref(e)?t.hoverColor:t.color:(i.unref(e),t.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},o[2]||(o[2]=[i.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)]),38)),o[3]||(o[3]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"arrow-left",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[i.createElementVNode("path",{d:"M656.733 149.806C659.446 147.019 662.69 144.804 666.274 143.292C669.857 141.779 673.707 141 677.597 141C681.486 141 685.337 141.779 688.92 143.292C692.503 144.804 695.748 147.019 698.461 149.806C704.024 155.518 707.138 163.176 707.138 171.15C707.138 179.123 704.024 186.782 698.461 192.494L386.589 512.366L698.461 832.302C701.269 835.176 703.483 838.575 704.976 842.305C706.47 846.035 707.215 850.022 707.167 854.04C707.119 858.057 706.281 862.026 704.699 865.72C703.118 869.413 700.824 872.759 697.949 875.566C695.211 878.242 691.972 880.351 688.417 881.774C684.863 883.197 681.063 883.904 677.235 883.857C673.407 883.809 669.625 883.007 666.107 881.497C662.589 879.986 659.404 877.797 656.733 875.054L325.085 534.702C319.26 528.726 316 520.711 316 512.366C316 504.021 319.26 496.006 325.085 490.03L656.733 149.806Z"})])],-1))],64))}}),[["__scopeId","data-v-ec3439ce"]]),$o=x(i.defineComponent({__name:"ArrowRight",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){const e=i.ref(!1);return(n,o)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size,fill:t.hoverColor?i.unref(e)?t.hoverColor:t.color:(i.unref(e),t.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},o[2]||(o[2]=[i.createElementVNode("use",{"xlink:href":"#arrow-right"},null,-1)]),38)),o[3]||(o[3]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"arrow-right",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[i.createElementVNode("path",{d:"M366.436 875.054C363.723 877.84 360.479 880.055 356.895 881.568C353.312 883.08 349.462 883.859 345.572 883.859C341.683 883.859 337.832 883.08 334.249 881.568C330.666 880.055 327.421 877.84 324.708 875.054C319.145 869.342 316.031 861.683 316.031 853.71C316.031 845.736 319.145 838.077 324.708 832.366L636.58 512.494L324.708 192.558C321.9 189.684 319.686 186.284 318.193 182.555C316.699 178.825 315.954 174.837 316.002 170.82C316.049 166.802 316.888 162.833 318.47 159.14C320.051 155.446 322.345 152.1 325.22 149.294C327.958 146.618 331.197 144.508 334.752 143.086C338.306 141.663 342.106 140.955 345.934 141.003C349.762 141.05 353.544 141.852 357.062 143.363C360.58 144.873 363.765 147.063 366.436 149.806L698.084 490.158C703.909 496.134 707.169 504.148 707.169 512.494C707.169 520.839 703.909 528.854 698.084 534.83L366.436 875.054Z"})])],-1))],64))}}),[["__scopeId","data-v-cd0d3c21"]]),Ao=x(i.defineComponent({__name:"DoubleArrowLeft",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){const e=i.ref(!1);return(n,o)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size,fill:t.hoverColor?i.unref(e)?t.hoverColor:t.color:(i.unref(e),t.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},o[2]||(o[2]=[i.createElementVNode("use",{"xlink:href":"#double-arrow-left"},null,-1)]),38)),o[3]||(o[3]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"double-arrow-left",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[i.createElementVNode("path",{d:"M529.408 149.376C532.121 146.589 535.365 144.374 538.949 142.862C542.532 141.35 546.382 140.57 550.272 140.57C554.161 140.57 558.011 141.35 561.595 142.862C565.178 144.374 568.422 146.589 571.136 149.376C576.699 155.088 579.813 162.746 579.813 170.72C579.813 178.694 576.699 186.352 571.136 192.064L259.264 511.936L571.136 831.872C573.943 834.746 576.157 838.145 577.651 841.875C579.145 845.605 579.889 849.593 579.842 853.61C579.794 857.628 578.956 861.597 577.374 865.29C575.792 868.984 573.499 872.329 570.624 875.136C567.886 877.812 564.647 879.922 561.092 881.344C557.538 882.767 553.738 883.475 549.91 883.427C546.081 883.38 542.3 882.578 538.782 881.067C535.264 879.556 532.079 877.367 529.408 874.624L197.76 534.272C191.935 528.296 188.675 520.281 188.675 511.936C188.675 503.591 191.935 495.576 197.76 489.6L529.408 149.376ZM785.408 149.376C788.121 146.589 791.365 144.374 794.949 142.862C798.532 141.35 802.382 140.57 806.272 140.57C810.161 140.57 814.011 141.35 817.595 142.862C821.178 144.374 824.422 146.589 827.136 149.376C832.699 155.088 835.813 162.746 835.813 170.72C835.813 178.694 832.699 186.352 827.136 192.064L515.264 511.936L827.136 831.872C829.943 834.746 832.157 838.145 833.651 841.875C835.145 845.605 835.889 849.593 835.842 853.61C835.794 857.628 834.956 861.597 833.374 865.29C831.792 868.984 829.499 872.329 826.624 875.136C823.886 877.812 820.647 879.922 817.092 881.344C813.538 882.767 809.738 883.475 805.91 883.427C802.081 883.38 798.3 882.578 794.782 881.067C791.264 879.556 788.079 877.367 785.408 874.624L453.76 534.272C447.935 528.296 444.675 520.281 444.675 511.936C444.675 503.591 447.935 495.576 453.76 489.6L785.408 149.376Z"})])],-1))],64))}}),[["__scopeId","data-v-98099ad2"]]),No=x(i.defineComponent({__name:"DoubleArrowRight",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){const e=i.ref(!1);return(n,o)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size,fill:t.hoverColor?i.unref(e)?t.hoverColor:t.color:(i.unref(e),t.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},o[2]||(o[2]=[i.createElementVNode("use",{"xlink:href":"#double-arrow-right"},null,-1)]),38)),o[3]||(o[3]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"double-arrow-right",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[i.createElementVNode("path",{d:"M495.111 874.624C492.397 877.411 489.153 879.626 485.57 881.138C481.987 882.65 478.136 883.43 474.247 883.43C470.357 883.43 466.507 882.65 462.924 881.138C459.34 879.626 456.096 877.411 453.383 874.624C447.819 868.912 444.706 861.254 444.706 853.28C444.706 845.306 447.819 837.648 453.383 831.936L765.255 512.064L453.383 192.128C450.575 189.254 448.361 185.855 446.867 182.125C445.374 178.395 444.629 174.407 444.677 170.39C444.724 166.372 445.563 162.403 447.145 158.71C448.726 155.016 451.02 151.671 453.895 148.864C456.633 146.188 459.872 144.078 463.426 142.656C466.981 141.233 470.781 140.525 474.609 140.573C478.437 140.62 482.219 141.422 485.737 142.933C489.254 144.444 492.44 146.633 495.111 149.376L826.759 489.728C832.584 495.704 835.844 503.719 835.844 512.064C835.844 520.409 832.584 528.424 826.759 534.4L495.111 874.624ZM239.111 874.624C236.397 877.411 233.153 879.626 229.57 881.138C225.987 882.65 222.136 883.43 218.247 883.43C214.357 883.43 210.507 882.65 206.924 881.138C203.34 879.626 200.096 877.411 197.383 874.624C191.819 868.912 188.706 861.254 188.706 853.28C188.706 845.306 191.819 837.648 197.383 831.936L509.255 512.064L197.383 192.128C194.575 189.254 192.361 185.855 190.867 182.125C189.374 178.395 188.629 174.407 188.677 170.39C188.724 166.372 189.563 162.403 191.145 158.71C192.726 155.016 195.02 151.671 197.895 148.864C200.633 146.188 203.872 144.078 207.426 142.656C210.981 141.233 214.781 140.525 218.609 140.573C222.437 140.62 226.219 141.422 229.737 142.933C233.254 144.444 236.44 146.633 239.111 149.376L570.759 489.728C576.584 495.704 579.844 503.719 579.844 512.064C579.844 520.409 576.584 528.424 570.759 534.4L239.111 874.624Z"})])],-1))],64))}}),[["__scopeId","data-v-053c9917"]]),Po=x(i.defineComponent({__name:"EllipsisSvg",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){const e=i.ref(!1);return(n,o)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size,fill:t.hoverColor?i.unref(e)?t.hoverColor:t.color:(i.unref(e),t.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},o[2]||(o[2]=[i.createElementVNode("use",{"xlink:href":"#ellipsis"},null,-1)]),38)),o[3]||(o[3]=i.createStaticVNode('<svg width="0" height="0" class="hidden" data-v-1798f31d><symbol id="ellipsis" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" data-v-1798f31d><path d="M65 135C73.2843 135 80 128.284 80 120C80 111.716 73.2843 105 65 105C56.7157 105 50 111.716 50 120C50 128.284 56.7157 135 65 135Z" data-v-1798f31d></path><path d="M120 135C128.284 135 135 128.284 135 120C135 111.716 128.284 105 120 105C111.716 105 105 111.716 105 120C105 128.284 111.716 135 120 135Z" data-v-1798f31d></path><path d="M175 135C183.284 135 190 128.284 190 120C190 111.716 183.284 105 175 105C166.716 105 160 111.716 160 120C160 128.284 166.716 135 175 135Z" data-v-1798f31d></path></symbol></svg>',1))],64))}}),[["__scopeId","data-v-1798f31d"]]);function To(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,o)}return n}function W(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?To(Object(n),!0).forEach(function(o){be(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):To(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function be(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ol(t,e){if(t==null)return{};var n,o,r=function(a,c){if(a==null)return{};var l,u,h={},f=Object.keys(a);for(u=0;u<f.length;u++)l=f[u],c.indexOf(l)>=0||(h[l]=a[l]);return h}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(o=0;o<s.length;o++)n=s[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Ge(t){return function(e){if(Array.isArray(e))return Mn(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||function(e,n){if(e){if(typeof e=="string")return Mn(e,n);var o=Object.prototype.toString.call(e).slice(8,-1);if(o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set")return Array.from(e);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return Mn(e,n)}}(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
14
|
+
***************************************************************************** */var uo;(function(t){(function(e){var n=typeof globalThis=="object"?globalThis:typeof co=="object"?co:typeof self=="object"?self:typeof this=="object"?this:c(),o=r(t);typeof n.Reflect<"u"&&(o=r(n.Reflect,o)),e(o,n),typeof n.Reflect>"u"&&(n.Reflect=t);function r(l,u){return function(h,f){Object.defineProperty(l,h,{configurable:!0,writable:!0,value:f}),u&&u(h,f)}}function s(){try{return Function("return this;")()}catch{}}function a(){try{return(0,eval)("(function() { return this; })()")}catch{}}function c(){return s()||a()}})(function(e,n){var o=Object.prototype.hasOwnProperty,r=typeof Symbol=="function",s=r&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",a=r&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",c=typeof Object.create=="function",l={__proto__:[]}instanceof Array,u=!c&&!l,h={create:c?function(){return Ii(Object.create(null))}:l?function(){return Ii({__proto__:null})}:function(){return Ii({})},has:u?function(y,b){return o.call(y,b)}:function(y,b){return b in y},get:u?function(y,b){return o.call(y,b)?y[b]:void 0}:function(y,b){return y[b]}},f=Object.getPrototypeOf(Function),m=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Um(),g=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Wm(),p=typeof WeakMap=="function"?WeakMap:jm(),E=r?Symbol.for("@reflect-metadata:registry"):void 0,w=_m(),M=Hm(w);function O(y,b,k,B){if(z(k)){if(!ua(y))throw new TypeError;if(!ha(b))throw new TypeError;return Pm(y,b)}else{if(!ua(y))throw new TypeError;if(!ee(b))throw new TypeError;if(!ee(B)&&!z(B)&&!gt(B))throw new TypeError;return gt(B)&&(B=void 0),k=ze(k),Tm(y,b,k,B)}}e("decorate",O);function L(y,b){function k(B,P){if(!ee(B))throw new TypeError;if(!z(P)&&!Om(P))throw new TypeError;sa(y,b,B,P)}return k}e("metadata",L);function F(y,b,k,B){if(!ee(k))throw new TypeError;return z(B)||(B=ze(B)),sa(y,b,k,B)}e("defineMetadata",F);function T(y,b,k){if(!ee(b))throw new TypeError;return z(k)||(k=ze(k)),ia(y,b,k)}e("hasMetadata",T);function we(y,b,k){if(!ee(b))throw new TypeError;return z(k)||(k=ze(k)),xi(y,b,k)}e("hasOwnMetadata",we);function ke(y,b,k){if(!ee(b))throw new TypeError;return z(k)||(k=ze(k)),oa(y,b,k)}e("getMetadata",ke);function We(y,b,k){if(!ee(b))throw new TypeError;return z(k)||(k=ze(k)),ra(y,b,k)}e("getOwnMetadata",We);function pt(y,b){if(!ee(y))throw new TypeError;return z(b)||(b=ze(b)),aa(y,b)}e("getMetadataKeys",pt);function Sn(y,b){if(!ee(y))throw new TypeError;return z(b)||(b=ze(b)),la(y,b)}e("getOwnMetadataKeys",Sn);function Nm(y,b,k){if(!ee(b))throw new TypeError;if(z(k)||(k=ze(k)),!ee(b))throw new TypeError;z(k)||(k=ze(k));var B=Tt(b,k,!1);return z(B)?!1:B.OrdinaryDeleteMetadata(y,b,k)}e("deleteMetadata",Nm);function Pm(y,b){for(var k=y.length-1;k>=0;--k){var B=y[k],P=B(b);if(!z(P)&&!gt(P)){if(!ha(P))throw new TypeError;b=P}}return b}function Tm(y,b,k,B){for(var P=y.length-1;P>=0;--P){var oe=y[P],te=oe(b,k,B);if(!z(te)&&!gt(te)){if(!ee(te))throw new TypeError;B=te}}return B}function ia(y,b,k){var B=xi(y,b,k);if(B)return!0;var P=Mi(b);return gt(P)?!1:ia(y,P,k)}function xi(y,b,k){var B=Tt(b,k,!1);return z(B)?!1:da(B.OrdinaryHasOwnMetadata(y,b,k))}function oa(y,b,k){var B=xi(y,b,k);if(B)return ra(y,b,k);var P=Mi(b);if(!gt(P))return oa(y,P,k)}function ra(y,b,k){var B=Tt(b,k,!1);if(!z(B))return B.OrdinaryGetOwnMetadata(y,b,k)}function sa(y,b,k,B){var P=Tt(k,B,!0);P.OrdinaryDefineOwnMetadata(y,b,k,B)}function aa(y,b){var k=la(y,b),B=Mi(y);if(B===null)return k;var P=aa(B,b);if(P.length<=0)return k;if(k.length<=0)return P;for(var oe=new g,te=[],q=0,I=k;q<I.length;q++){var R=I[q],$=oe.has(R);$||(oe.add(R),te.push(R))}for(var A=0,U=P;A<U.length;A++){var R=U[A],$=oe.has(R);$||(oe.add(R),te.push(R))}return te}function la(y,b){var k=Tt(y,b,!1);return k?k.OrdinaryOwnMetadataKeys(y,b):[]}function ca(y){if(y===null)return 1;switch(typeof y){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return y===null?1:6;default:return 6}}function z(y){return y===void 0}function gt(y){return y===null}function zm(y){return typeof y=="symbol"}function ee(y){return typeof y=="object"?y!==null:typeof y=="function"}function Vm(y,b){switch(ca(y)){case 0:return y;case 1:return y;case 2:return y;case 3:return y;case 4:return y;case 5:return y}var k="string",B=fa(y,s);if(B!==void 0){var P=B.call(y,k);if(ee(P))throw new TypeError;return P}return Fm(y)}function Fm(y,b){var k,B;{var P=y.toString;if(kn(P)){var B=P.call(y);if(!ee(B))return B}var k=y.valueOf;if(kn(k)){var B=k.call(y);if(!ee(B))return B}}throw new TypeError}function da(y){return!!y}function Dm(y){return""+y}function ze(y){var b=Vm(y);return zm(b)?b:Dm(b)}function ua(y){return Array.isArray?Array.isArray(y):y instanceof Object?y instanceof Array:Object.prototype.toString.call(y)==="[object Array]"}function kn(y){return typeof y=="function"}function ha(y){return typeof y=="function"}function Om(y){switch(ca(y)){case 3:return!0;case 4:return!0;default:return!1}}function Bi(y,b){return y===b||y!==y&&b!==b}function fa(y,b){var k=y[b];if(k!=null){if(!kn(k))throw new TypeError;return k}}function ma(y){var b=fa(y,a);if(!kn(b))throw new TypeError;var k=b.call(y);if(!ee(k))throw new TypeError;return k}function pa(y){return y.value}function ga(y){var b=y.next();return b.done?!1:b}function ya(y){var b=y.return;b&&b.call(y)}function Mi(y){var b=Object.getPrototypeOf(y);if(typeof y!="function"||y===f||b!==f)return b;var k=y.prototype,B=k&&Object.getPrototypeOf(k);if(B==null||B===Object.prototype)return b;var P=B.constructor;return typeof P!="function"||P===y?b:P}function Lm(){var y;!z(E)&&typeof n.Reflect<"u"&&!(E in n.Reflect)&&typeof n.Reflect.defineMetadata=="function"&&(y=qm(n.Reflect));var b,k,B,P=new p,oe={registerProvider:te,getProvider:I,setProvider:$};return oe;function te(A){if(!Object.isExtensible(oe))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case y===A:break;case z(b):b=A;break;case b===A:break;case z(k):k=A;break;case k===A:break;default:B===void 0&&(B=new g),B.add(A);break}}function q(A,U){if(!z(b)){if(b.isProviderFor(A,U))return b;if(!z(k)){if(k.isProviderFor(A,U))return b;if(!z(B))for(var Z=ma(B);;){var J=ga(Z);if(!J)return;var $e=pa(J);if($e.isProviderFor(A,U))return ya(Z),$e}}}if(!z(y)&&y.isProviderFor(A,U))return y}function I(A,U){var Z=P.get(A),J;return z(Z)||(J=Z.get(U)),z(J)&&(J=q(A,U),z(J)||(z(Z)&&(Z=new m,P.set(A,Z)),Z.set(U,J))),J}function R(A){if(z(A))throw new TypeError;return b===A||k===A||!z(B)&&B.has(A)}function $(A,U,Z){if(!R(Z))throw new Error("Metadata provider not registered.");var J=I(A,U);if(J!==Z){if(!z(J))return!1;var $e=P.get(A);z($e)&&($e=new m,P.set(A,$e)),$e.set(U,Z)}return!0}}function _m(){var y;return!z(E)&&ee(n.Reflect)&&Object.isExtensible(n.Reflect)&&(y=n.Reflect[E]),z(y)&&(y=Lm()),!z(E)&&ee(n.Reflect)&&Object.isExtensible(n.Reflect)&&Object.defineProperty(n.Reflect,E,{enumerable:!1,configurable:!1,writable:!1,value:y}),y}function Hm(y){var b=new p,k={isProviderFor:function(R,$){var A=b.get(R);return z(A)?!1:A.has($)},OrdinaryDefineOwnMetadata:te,OrdinaryHasOwnMetadata:P,OrdinaryGetOwnMetadata:oe,OrdinaryOwnMetadataKeys:q,OrdinaryDeleteMetadata:I};return w.registerProvider(k),k;function B(R,$,A){var U=b.get(R),Z=!1;if(z(U)){if(!A)return;U=new m,b.set(R,U),Z=!0}var J=U.get($);if(z(J)){if(!A)return;if(J=new m,U.set($,J),!y.setProvider(R,$,k))throw U.delete($),Z&&b.delete(R),new Error("Wrong provider for target.")}return J}function P(R,$,A){var U=B($,A,!1);return z(U)?!1:da(U.has(R))}function oe(R,$,A){var U=B($,A,!1);if(!z(U))return U.get(R)}function te(R,$,A,U){var Z=B(A,U,!0);Z.set(R,$)}function q(R,$){var A=[],U=B(R,$,!1);if(z(U))return A;for(var Z=U.keys(),J=ma(Z),$e=0;;){var wa=ga(J);if(!wa)return A.length=$e,A;var Gm=pa(wa);try{A[$e]=Gm}catch(Zm){try{ya(J)}finally{throw Zm}}$e++}}function I(R,$,A){var U=B($,A,!1);if(z(U)||!U.delete(R))return!1;if(U.size===0){var Z=b.get($);z(Z)||(Z.delete(A),Z.size===0&&b.delete(Z))}return!0}}function qm(y){var b=y.defineMetadata,k=y.hasOwnMetadata,B=y.getOwnMetadata,P=y.getOwnMetadataKeys,oe=y.deleteMetadata,te=new p,q={isProviderFor:function(I,R){var $=te.get(I);return!z($)&&$.has(R)?!0:P(I,R).length?(z($)&&($=new g,te.set(I,$)),$.add(R),!0):!1},OrdinaryDefineOwnMetadata:b,OrdinaryHasOwnMetadata:k,OrdinaryGetOwnMetadata:B,OrdinaryOwnMetadataKeys:P,OrdinaryDeleteMetadata:oe};return q}function Tt(y,b,k){var B=w.getProvider(y,b);if(!z(B))return B;if(k){if(w.setProvider(y,b,M))return M;throw new Error("Illegal state.")}}function Um(){var y={},b=[],k=function(){function q(I,R,$){this._index=0,this._keys=I,this._values=R,this._selector=$}return q.prototype["@@iterator"]=function(){return this},q.prototype[a]=function(){return this},q.prototype.next=function(){var I=this._index;if(I>=0&&I<this._keys.length){var R=this._selector(this._keys[I],this._values[I]);return I+1>=this._keys.length?(this._index=-1,this._keys=b,this._values=b):this._index++,{value:R,done:!1}}return{value:void 0,done:!0}},q.prototype.throw=function(I){throw this._index>=0&&(this._index=-1,this._keys=b,this._values=b),I},q.prototype.return=function(I){return this._index>=0&&(this._index=-1,this._keys=b,this._values=b),{value:I,done:!0}},q}(),B=function(){function q(){this._keys=[],this._values=[],this._cacheKey=y,this._cacheIndex=-2}return Object.defineProperty(q.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),q.prototype.has=function(I){return this._find(I,!1)>=0},q.prototype.get=function(I){var R=this._find(I,!1);return R>=0?this._values[R]:void 0},q.prototype.set=function(I,R){var $=this._find(I,!0);return this._values[$]=R,this},q.prototype.delete=function(I){var R=this._find(I,!1);if(R>=0){for(var $=this._keys.length,A=R+1;A<$;A++)this._keys[A-1]=this._keys[A],this._values[A-1]=this._values[A];return this._keys.length--,this._values.length--,Bi(I,this._cacheKey)&&(this._cacheKey=y,this._cacheIndex=-2),!0}return!1},q.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=y,this._cacheIndex=-2},q.prototype.keys=function(){return new k(this._keys,this._values,P)},q.prototype.values=function(){return new k(this._keys,this._values,oe)},q.prototype.entries=function(){return new k(this._keys,this._values,te)},q.prototype["@@iterator"]=function(){return this.entries()},q.prototype[a]=function(){return this.entries()},q.prototype._find=function(I,R){if(!Bi(this._cacheKey,I)){this._cacheIndex=-1;for(var $=0;$<this._keys.length;$++)if(Bi(this._keys[$],I)){this._cacheIndex=$;break}}return this._cacheIndex<0&&R&&(this._cacheIndex=this._keys.length,this._keys.push(I),this._values.push(void 0)),this._cacheIndex},q}();return B;function P(q,I){return q}function oe(q,I){return I}function te(q,I){return[q,I]}}function Wm(){var y=function(){function b(){this._map=new m}return Object.defineProperty(b.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),b.prototype.has=function(k){return this._map.has(k)},b.prototype.add=function(k){return this._map.set(k,k),this},b.prototype.delete=function(k){return this._map.delete(k)},b.prototype.clear=function(){this._map.clear()},b.prototype.keys=function(){return this._map.keys()},b.prototype.values=function(){return this._map.keys()},b.prototype.entries=function(){return this._map.entries()},b.prototype["@@iterator"]=function(){return this.keys()},b.prototype[a]=function(){return this.keys()},b}();return y}function jm(){var y=16,b=h.create(),k=B();return function(){function I(){this._key=B()}return I.prototype.has=function(R){var $=P(R,!1);return $!==void 0?h.has($,this._key):!1},I.prototype.get=function(R){var $=P(R,!1);return $!==void 0?h.get($,this._key):void 0},I.prototype.set=function(R,$){var A=P(R,!0);return A[this._key]=$,this},I.prototype.delete=function(R){var $=P(R,!1);return $!==void 0?delete $[this._key]:!1},I.prototype.clear=function(){this._key=B()},I}();function B(){var I;do I="@@WeakMap@@"+q();while(h.has(b,I));return b[I]=!0,I}function P(I,R){if(!o.call(I,k)){if(!R)return;Object.defineProperty(I,k,{value:h.create()})}return I[k]}function oe(I,R){for(var $=0;$<R;++$)I[$]=Math.random()*255|0;return I}function te(I){if(typeof Uint8Array=="function"){var R=new Uint8Array(I);return typeof crypto<"u"?crypto.getRandomValues(R):typeof msCrypto<"u"?msCrypto.getRandomValues(R):oe(R,I),R}return oe(new Array(I),I)}function q(){var I=te(y);I[6]=I[6]&79|64,I[8]=I[8]&191|128;for(var R="",$=0;$<y;++$){var A=I[$];($===4||$===6||$===8)&&(R+="-"),A<16&&(R+="0"),R+=A.toString(16).toLowerCase()}return R}}function Ii(y){return y.__=void 0,delete y.__,y}})})(uo||(uo={}));class ve{static UUID(){return De()}static GUID(){const e=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}}const mt=class mt{static BuildClass(e,n){n&&Object.keys(n).forEach(o=>{const r=n[o];if(this.isPrimitive(r))e[o]instanceof Date?e[o]=new Date(r):e[o]=r;else if(r!=null&&!Array.isArray(r))if(e[o]&&e[o].constructor)e[o]=new e[o].constructor(r);else{const s=Reflect.getMetadata(o,e);s&&(e[o]=new s[o](r))}if(Array.isArray(r)){const s=Reflect.getMetadata(o,e);s&&(e[o]=r.map(a=>new s[o](a)))}})}static isPrimitive(e){return e!==null&&typeof e<"u"&&e!==Object(e)}static RemoveFromClassByIndex(e,n,o){mt.RemoveFromClass(e,n,o)}static RemoveFromClassById(e,n,o){if(!e)return;const r=n.findIndex(s=>s.id===e);mt.RemoveFromClass(r,n,o)}static RemoveFromClass(e,n,o){if(e<0)return;const r=n[e].id;r&&o&&o.push(r),n.splice(e,1)}static GetPropertyName(e){const n=new e;return new Proxy(n,{get(o,r){return r}})}static InitClassInstance(e,n){const o=e.constructor(n);return mt.BuildClass(o),o.id=ve.UUID(),o}static ExistsWithId(e,n){return e.some(o=>o.id===n)}};d(mt,"GetClassConstructor",e=>(n,o)=>{const r=Reflect.getMetadata(`property:${o}`,n)||{};r[o]=e,Reflect.defineMetadata(o,r,n)});let V=mt;class ne{static Capitalize(e){return e?e[0].toUpperCase()+e.slice(1):""}static ToCamelCase(e){const n=new RegExp(["[А-Я][а-я][A-Z][a-z]+","[А-Я]+(?=[А-Я][а-я])","[A-Z]+(?=[A-Z][a-z])","[А-Я]+","[A-Z]+","[а-я]+","[a-z]+","[0-9]+"].join("|"),"g");return e.match(n).map((r,s)=>s===0?r.toLowerCase():ne.Capitalize(r.toLowerCase())).join("")}static ToKebabCase(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}static GetStringBetweenChars(e,n,o){return e.substring(e.indexOf(n)+2,e.lastIndexOf(o))}static Translit(e,n){const o={q:"й",w:"ц",e:"у",r:"к",t:"е",y:"н",u:"г",i:"ш",o:"щ",p:"з","[":"х","]":"ъ",a:"ф",s:"ы",d:"в",f:"а",g:"п",h:"р",j:"о",k:"л",l:"д",";":"ж","'":"э",z:"я",x:"ч",c:"с",v:"м",b:"и",n:"т",m:"ь",",":"б",".":"ю","/":"."};return n&&/[а-яА-Я]/g.test(e)?e.replace(/[А-я/,.;'\][]/g,r=>{if(r===r.toLowerCase()){const a=Object.keys(o).find(c=>o[c]===r);return a||""}const s=Object.keys(o).find(a=>o[a]===r.toLowerCase());return s?s.toUpperCase():""}):e.replace(/[A-z/,.;'\][]/g,r=>r===r.toLowerCase()?o[r]:o[r.toLowerCase()].toUpperCase())}static RemoveEmoji(e){const n=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;return e.replace(n,"")}static CanBeTranslited(e){return/^[~`!@#$%^&*()_+=[\]\\{}|;':",.\/<>?a-zA-Z0-9-]+$/.test(e)}static StringsEquals(e,n){const o=e.toLowerCase().replaceAll(/\s/g,""),r=n.toLowerCase().replaceAll(/\s/g,""),s=ne.Translit(o),a=ne.Translit(r);return o.includes(r)||s.includes(r)||o.includes(a)}static SearchIn(e,n){return ne.StringsEquals(e,n)}static FormatToPercentage(e){return`${e}%`}static WrapSubStr(e,n){const o=new RegExp(ne.GetVariants(n).join("|"),"gi");return e.replace(o,`<span class="search-text">${n}</span>`)}static GetVariants(e){const n=ne.Translit(e);return[e,ne.Capitalize(e),e.toLowerCase(),e.toUpperCase(),n,ne.Capitalize(n),n.toLowerCase(),n.toUpperCase()]}static ContainsNum(e){return/\d/.test(e)}static JoinSnake(...e){return e.join("_")}static GetDynamicCountName(e,n){const o=[2,0,1,1,1,2];return e.length+" "+n[e.length%100>4&&e.length%100<20?2:o[e.length%10<5?e.length%10:5]]}}var Y=(t=>(t.Date="date",t.String="string",t.Boolean="boolean",t.Number="number",t.Set="set",t.Join="join",t))(Y||{}),de=(t=>(t.Eq="=",t.Ne="!=",t.Gt=">",t.Lt="<",t.Btw="between",t.In="in",t.Like="like",t.Null="is null",t.NotNull="is not null",t))(de||{}),Vl=Object.defineProperty,Fl=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&Vl(e,n,r),r};const ho=class yt{constructor(e){d(this,"id");d(this,"model","");d(this,"label","");d(this,"col","");d(this,"operator",de.Eq);d(this,"date1");d(this,"date2");d(this,"value1","");d(this,"boolean",!1);d(this,"number",0);d(this,"type",Y.String);d(this,"set",[]);d(this,"isSet",!1);d(this,"joinTable","");d(this,"joinTableModel","");d(this,"joinTableFk","");d(this,"joinTablePk","");d(this,"joinTableId","");d(this,"joinTableIdCol","");V.BuildClass(this,e)}eq(e){if(!e)return!1;if(this.type===Y.Join){const n=e.model===this.model&&e.operator===this.operator&&this.joinTableModel===e.joinTableModel;return e.operator===de.In?n&&He.Eq(this.set,e.set):n}return e.model===this.model&&e.col===this.col&&e.operator===this.operator}valueEq(e){return!this||!e||!this.eq(e)?!1:this.type===Y.Boolean?this.boolean===(e==null?void 0:e.boolean):this.type===Y.String?this.value1===(e==null?void 0:e.value1):this.type===Y.Join&&this.set.length?He.Eq(this.set,e.set):!1}toUrlQuery(){const e=this.type?`"type":"${this.type}"`:"",n=this.model?`"model":"${this.model}"`:"",o=this.col?`"col":"${this.col}"`:"",r=this.operator?`"operator":"${this.operator}"`:"",s=this.value1?`"value1":"${this.value1}"`:"",a=this.type===Y.Boolean?`"boolean":${this.boolean}`:"",c=this.type===Y.Date&&this.date1?`"date1":"${this.date1.toISOString()}"`:"",l=this.type===Y.Date&&this.date2?`"date2":"${this.date2.toISOString()}"`:"",u=this.type===Y.Number?`"number":${this.number}`:"",h=this.type===Y.Set||this.operator===de.In?`"set":${JSON.stringify(this.set)}`:"",f=this.type===Y.Join?`"joinTableModel":"${this.joinTableModel}"`:"";return[e,n,o,r,s,a,c,l,u,h,f].filter(m=>m!=="").toString()}fromUrlQuery(e){this.model=e.get("model")??"",this.col=e.get("col")??"",this.label=e.get("label")??"",this.operator=e.get("operator")??"",this.value1=e.get("value1")??"",this.type=e.get("type")??"",this.boolean=!!(e.get("boolean")??""),this.joinTableModel=e.get("joinTableModel")??"",this.joinTableId=e.get("joinTableId")??"",this.joinTableFk=e.get("joinTableFk")??"",this.joinTableIdCol=e.get("joinTableIdCol")??"",this.joinTablePk=e.get("joinTablePk")??""}isUnaryFilter(){return this.operator===de.Eq||this.operator===de.Gt||this.operator===de.Lt}isBetweenFilter(){return this.operator===de.Btw}isSetFilter(){return this.operator===de.In}static Create(e,n,o){const r=new yt;return r.model=e.GetClassName(),r.col=n??"",r.type=o,r.type===Y.Number&&(r.value1="0"),r.type===Y.String&&(r.value1=""),r.type===Y.Boolean&&(r.value1="false",r.operator=de.Eq),r}static CreateFilterModel(e,n,o){const r=new yt;return r.id=De(),r.model=typeof e=="string"?e:e.GetClassName(),r.col=n??"",r.type=o,r.type===Y.Number&&(r.value1="0"),r.type===Y.String&&(r.value1=""),r.type===Y.Boolean&&(r.value1="false"),r}static CreateFilterModelWithJoin(e,n,o,r,s,a,c,l){const u=new yt;return u.id=De(),u.joinTable=o,u.joinTablePk=r,u.joinTableFk=s,u.col=n,u.type=a,c&&(u.joinTableId=c),l&&(u.joinTableIdCol=l),u}static CreateFilterModelWithJoinV2(e,n,o,r,s,a,c){const l=new yt;return l.model=e,l.joinTableModel=o,l.joinTablePk=r,l.joinTableFk=s,l.col=n,l.type=Y.Join,a&&(l.joinTableId=a),c&&(l.joinTableIdCol=c),l}static OnlyIfSecondModelExists(e,n){const o=new yt;return o.id=De(),o.model=ne.ToCamelCase(e.GetClassName()),o.joinTableModel=ne.ToCamelCase(n.GetClassName()),o.type=Y.Join,o}addToSet(...e){e.forEach(n=>{if(this.set.indexOf(n)===-1){this.set.push(n);return}this.set=this.set.filter(o=>o!==n)})}pushToSet(...e){e.forEach(n=>{this.set.indexOf(n)===-1&&this.set.push(n)})}replaceSet(...e){this.set=e}setBoolean(e){this.boolean=e}toRef(){return i.ref(this)}setDate1(e){this.date1=e}setDate2(e){this.date2=e}dropDates(){this.setDate1(),this.setDate2()}setDatesRange(e,n){if(!e&&!n){this.dropDates();return}if(!n){this.setDate1(e),this.operator=de.Eq;return}this.setDate2(n),this.operator=de.Btw}};Fl([V.GetClassConstructor(String)],ho.prototype,"set");let fo=ho;const mo=x(i.defineComponent({__name:"FilterCheckbox",props:{model:{type:Object,default:()=>new fo,required:!0}},emits:["load"],setup(t,{emit:e}){const n=t,o=i.ref(!1),r=e,s=()=>{n.model.setBoolean(o.value),o.value?S.H.FTSP.Get().setF(n.model):S.H.FTSP.Get().removeF(n.model),r("load")};return(a,c)=>{const l=i.resolveComponent("PCheckBox");return i.openBlock(),i.createBlock(l,{modelValue:i.unref(o),"onUpdate:modelValue":c[0]||(c[0]=u=>i.isRef(o)?o.value=u:null),label:t.model.label,size:"mini",onChange:s},null,8,["modelValue","label"])}}}),[["__scopeId","data-v-9eaa1f25"]]),po=x(i.defineComponent({__name:"FiltersButtonsSelect",props:{models:{type:Array,default:()=>[]},defaultLabel:{type:String,default:"Все"},inverse:{type:Boolean,required:!1,default:!1}},emits:["load"],setup(t,{emit:e}){const n=e,o=i.ref(void 0),r=async a=>{S.H.FTSP.Get().replaceF(a,o.value),o.value=a,S.H.FTSP.Get().p.drop()},s=async a=>{await r(a),n("load")};return(a,c)=>{const l=i.resolveComponent("PString"),u=i.resolveComponent("PButton"),h=i.resolveComponent("GridContainer"),f=i.resolveComponent("InfoItem");return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(l,{string:t.defaultLabel,"font-size":"14px",padding:"0",margin:"20px 0 0 10px"},null,8,["string"]),i.createVNode(f,{margin:"5px 0 0 0px","with-open-window":!1,height:"auto",background:"#F5F5F5","border-color":"#C4C4C4",padding:"7px","with-hover":!1},{title:i.withCtx(()=>c[0]||(c[0]=[])),default:i.withCtx(()=>[i.createVNode(h,{"max-width":"100%","grid-gap":"7px","grid-template-columns":"repeat(auto-fit, minmax(100%, 1fr))",margin:"0px"},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.models,(m,g)=>(i.openBlock(),i.createBlock(u,{key:g,color:"blue",height:"auto",text:m.label,"is-toggle":m.valueEq(i.unref(o)),"toggle-mode":!0,inverse:t.inverse,onClick:p=>s(m.valueEq(i.unref(o))?void 0:m)},null,8,["text","is-toggle","inverse","onClick"]))),128))]),_:1})]),_:1})],64)}}}),[["__scopeId","data-v-77b88c24"]]),Dl=["value","label"],go=x(i.defineComponent({__name:"FilterSelect",props:{models:{type:Array,default:()=>[]},defaultLabel:{type:String,default:"Все"},inverse:{type:Boolean,required:!1,default:!1}},emits:["load"],setup(t,{emit:e}){const n=e,o=S.H.FTSP.Get(),r=i.ref(void 0),s=async c=>{o.replaceF(c,r.value),r.value=c},a=async c=>{c?await s(r.value):await s(void 0),n("load")};return(c,l)=>{const u=i.resolveComponent("PSelect");return i.openBlock(),i.createBlock(u,{modelValue:i.unref(r),"onUpdate:modelValue":l[0]||(l[0]=h=>i.isRef(r)?r.value=h:null),clearable:i.unref(r),placeholder:t.defaultLabel,onChange:a},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.models,(h,f)=>(i.openBlock(),i.createElementBlock("option",{key:f,value:h,label:h.label},null,8,Dl))),128))]),_:1},8,["modelValue","clearable","placeholder"])}}}),[["__scopeId","data-v-7b102249"]]),yo=x(i.defineComponent({__name:"FTSPPanel",setup(t){return i.onBeforeMount(async()=>{}),(e,n)=>(i.openBlock(),i.createElementBlock("div"))}}),[["__scopeId","data-v-799d5edf"]]),wo=x(i.defineComponent({__name:"GeneralItem",props:{background:{type:String,required:!1,default:"#ffffff"},height:{type:String,required:!1,default:"40px"},width:{type:String,required:!1,default:"auto"},ready:{type:String,required:!1,default:"0%"},padding:{type:String,required:!1,default:"10px"},borderColor:{type:String,required:!1,default:"#343D5C"},margin:{type:String,required:!1,default:"5px"},scale:{type:Boolean,required:!1,default:!0},fontSize:{type:String,required:!1,default:"14px"},withIcon:{type:Boolean,required:!1,default:!1}},setup(t){const e=i.ref(!1);return(n,o)=>(i.openBlock(),i.createElementBlock("div",{class:"general-block-item",style:i.normalizeStyle({background:t.background,height:t.height,width:t.width,borderColor:t.borderColor,padding:t.padding,margin:t.margin,transform:t.scale&&i.unref(e)?"scale(1.03, 1.03)":""}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},[i.createElementVNode("div",{class:"green",style:i.normalizeStyle({width:`${t.ready}`})},null,4),i.createElementVNode("div",{class:"general-block-item-title",style:i.normalizeStyle({fontSize:t.fontSize})},[i.renderSlot(n.$slots,"general-item",{},void 0,!0)],4),i.createElementVNode("div",{class:"tools-icon",style:i.normalizeStyle({display:t.withIcon?"flex":"none"})},o[2]||(o[2]=[i.createElementVNode("svg",{class:"icon-del"},[i.createElementVNode("use",{"xlink:href":"#del"})],-1)]),4),o[3]||(o[3]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"del",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10"},[i.createElementVNode("path",{d:"M2.91797 8.75C2.6888 8.75 2.49255 8.66833 2.32922 8.505C2.16589 8.34167 2.08436 8.14556 2.08464 7.91667V2.5H1.66797V1.66667H3.7513V1.25H6.2513V1.66667H8.33464V2.5H7.91797V7.91667C7.91797 8.14583 7.8363 8.34208 7.67297 8.50542C7.50964 8.66875 7.31352 8.75028 7.08464 8.75H2.91797ZM7.08464 2.5H2.91797V7.91667H7.08464V2.5ZM3.7513 7.08333H4.58464V3.33333H3.7513V7.08333ZM5.41797 7.08333H6.2513V3.33333H5.41797V7.08333Z"})])],-1))],36))}}),[["__scopeId","data-v-1056443d"]]),bo=x(i.defineComponent({__name:"IconDownload",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){const e=i.ref(!1);return(n,o)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size,fill:t.hoverColor?i.unref(e)?t.hoverColor:t.color:(i.unref(e),t.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},o[2]||(o[2]=[i.createElementVNode("use",{"xlink:href":"#download"},null,-1)]),38)),o[3]||(o[3]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"download",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[i.createElementVNode("path",{d:"M15.6443 5.06141C15.0797 5.29331 15.0998 5.06141 15.0998 12.1393C15.0998 15.7388 15.0696 18.6728 15.0293 18.6728C14.9889 18.6728 14.1521 17.8763 13.1842 16.9083C11.6819 15.4061 11.3592 15.1338 11.0467 15.0733C10.724 15.0229 10.6333 15.0632 10.3611 15.3254C10.1292 15.5573 10.0586 15.7186 10.0586 16.0211C10.0586 16.3941 10.1594 16.5151 12.8615 19.2071C15.4326 21.7681 15.6947 22 16.0073 22C16.3198 22 16.582 21.7681 19.153 19.2071C21.9156 16.4546 21.9559 16.4042 21.9559 15.9908C21.9559 15.4867 21.6535 15.1641 21.109 15.0733C20.736 15.0128 20.7259 15.0229 18.8808 16.868C17.0357 18.6929 17.0155 18.7131 17.0155 18.3703C17.0054 18.1787 16.9953 15.2145 16.9853 11.7965L16.9651 5.56554L16.713 5.31348C16.4307 5.03117 15.9669 4.92026 15.6443 5.06141Z"}),i.createElementVNode("path",{d:"M5.30247 20.3872L5 20.6997L5.04033 22.081C5.07058 23.4321 5.08066 23.4825 5.44363 24.2488C6.09899 25.6099 7.17782 26.5173 8.59945 26.8904C9.47663 27.1122 22.5335 27.1223 23.4006 26.8904C25.044 26.4669 26.3245 25.2671 26.8084 23.7043C26.9496 23.2506 27 22.7868 27 21.8794C27 20.6796 27 20.6695 26.7076 20.3771C26.3144 19.9839 25.901 19.9839 25.4675 20.3771L25.1347 20.6695L25.1045 21.8189C25.0843 22.8776 25.0541 23.0086 24.7516 23.6035C24.3987 24.3093 23.7938 24.8235 23.088 25.0251C22.5839 25.1663 9.4363 25.1663 8.93217 25.0251C8.30706 24.8436 7.64161 24.3093 7.29881 23.7144C7.00642 23.2002 6.98625 23.0691 6.93584 21.9197L6.88543 20.6695L6.5527 20.3771C6.11916 19.9839 5.70577 19.9839 5.30247 20.3872Z"})])],-1))],64))}}),[["__scopeId","data-v-94c18208"]]),Co=x(i.defineComponent({__name:"IconFilter",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){const e=i.ref(!1);return(n,o)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size,fill:t.hoverColor?i.unref(e)?t.hoverColor:t.color:(i.unref(e),t.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},o[2]||(o[2]=[i.createElementVNode("use",{"xlink:href":"#filter"},null,-1)]),38)),o[3]||(o[3]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"filter",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[i.createElementVNode("path",{d:"M8.58216 5.14236C6.22884 5.77558 4.70721 8.02494 5.04745 10.3688C5.61452 14.2627 10.3684 15.8127 13.0714 12.9962C13.6385 12.4103 14.319 11.2194 14.319 10.8225C14.319 10.6902 14.9428 10.6713 20.3771 10.6713H26.4353L26.7094 10.3972C27.0969 10.0097 27.0969 9.44261 26.7094 9.05511L26.4353 8.78103H20.396H14.3662L14.1867 8.23287C13.4589 5.9646 10.8599 4.52803 8.58216 5.14236ZM10.9638 7.21215C13.0525 8.24232 13.0336 11.2194 10.9355 12.2496C10.2172 12.5993 9.20593 12.6276 8.54436 12.2968C6.21939 11.1533 6.43676 7.81702 8.8846 7.01368C9.45166 6.8341 10.3495 6.91916 10.9638 7.21215Z"}),i.createElementVNode("path",{d:"M21.5953 17.6266C21.1133 17.7211 20.2155 18.0519 19.8752 18.2599C18.9868 18.7986 18.0322 20.0083 17.8054 20.8778L17.6826 21.3504H12.3616C6.66257 21.3504 6.63422 21.3504 6.37904 21.8135C6.20892 22.1443 6.26562 22.6452 6.51135 22.9287L6.73818 23.1933L12.1915 23.2406L17.6448 23.2878L17.8621 23.8738C18.4292 25.4427 19.7334 26.6052 21.2929 26.936C22.1057 27.1061 23.3154 27.0021 24.062 26.6997C25.3379 26.1799 26.4059 25.0174 26.8029 23.7037C26.9635 23.165 27.0013 22.8625 26.9635 22.0781C26.9352 21.1991 26.8974 21.0479 26.5855 20.3864C25.8105 18.7513 24.2794 17.7117 22.5499 17.6172C22.1529 17.5983 21.7276 17.6077 21.5953 17.6266ZM23.5517 19.8004C24.081 20.0556 24.5913 20.5754 24.8748 21.1519C24.9977 21.4071 25.045 21.7095 25.045 22.3427C25.045 23.1555 25.0261 23.2311 24.7236 23.7415C23.5611 25.6412 20.8014 25.5656 19.7902 23.5997C19.5066 23.0421 19.4405 22.0119 19.6484 21.3787C20.1682 19.8004 22.0206 19.0537 23.5517 19.8004Z"})])],-1))],64))}}),[["__scopeId","data-v-d11e6069"]]),So=x(i.defineComponent({__name:"IconArrowLeft",props:{size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"arrow-left",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},[i.createElementVNode("path",{d:"M13.4323 2.0816C13.3788 2.0909 13.2951 2.12113 13.2462 2.14904C13.1997 2.17462 11.5439 3.85601 9.56715 5.8816C6.70668 8.81648 5.96017 9.59322 5.90436 9.69787C5.84622 9.8095 5.83691 9.85601 5.83691 9.99787C5.83691 10.1397 5.84622 10.1886 5.90436 10.2979C6.00436 10.4886 13.102 17.7746 13.2764 17.8653C13.3695 17.9142 13.423 17.9258 13.5555 17.9258C13.916 17.9235 14.1788 17.6583 14.1788 17.2932C14.1788 17.0374 14.1392 16.9769 13.623 16.4467C13.3695 16.1862 11.8555 14.6328 10.2555 12.9909C8.65552 11.349 7.35087 9.99787 7.35552 9.9909C7.36017 9.9816 8.86715 8.43276 10.7044 6.54904C12.5416 4.66532 14.0671 3.08392 14.0951 3.03508C14.2392 2.79555 14.1951 2.45834 13.9927 2.25834C13.8462 2.1095 13.6323 2.04206 13.4323 2.0816Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-ca16a90c"]]),ko=x(i.defineComponent({__name:"IconCheckDefault",props:{size:{type:String,default:"22px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#check_on"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"check_on",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[i.createElementVNode("path",{d:"M29.3678 7.25259C29.2732 7.3128 28.8775 7.6999 28.5076 8.13001C27.7076 9.02463 16.2409 22.0483 16.2065 22.0999C16.1549 22.1601 15.6732 21.73 13.9786 20.1042C8.31835 14.6934 8.5334 14.8827 8.03448 14.8827C7.69899 14.8827 7.59577 14.9257 7.3463 15.1752C7.09684 15.4246 7.05383 15.5279 7.05383 15.8547C7.05383 16.3365 6.98501 16.259 10.1506 19.2354C11.5011 20.4999 13.256 22.1601 14.056 22.9171C15.6302 24.4225 15.9485 24.6461 16.3872 24.5687C16.7399 24.4999 16.7743 24.4569 20.0947 20.6891C21.5485 19.0289 23.2689 17.0762 23.914 16.3451C29.4624 10.0655 30.6495 8.69775 30.77 8.48269C30.942 8.14721 30.8474 7.6999 30.5377 7.38162C30.3399 7.19237 30.2194 7.14076 29.9183 7.14076C29.7119 7.14936 29.471 7.19237 29.3678 7.25259Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-48c8e6e2"]]),Eo=x(i.defineComponent({__name:"IconEdit",props:{size:{type:String,default:""},margin:{type:String,default:"0 15px 0 0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#edit"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"edit",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[i.createElementVNode("path",{d:"M21.993 4.16087C21.6831 4.26049 21.2404 4.48185 20.9969 4.64787C20.1778 5.22342 4.60489 20.9402 4.39459 21.4051C4.11789 22.0138 3 25.8434 3 26.1865C3 26.5961 3.30991 27.1938 3.65302 27.4373C4.2507 27.8689 4.58275 27.8468 6.88493 27.1716C8.06923 26.8174 9.23138 26.4411 9.47488 26.3194C10.0062 26.0537 25.4795 10.6468 26.0772 9.79458C26.8519 8.67669 26.9626 7.32637 26.3871 6.10887C25.6234 4.48185 23.6754 3.61853 21.993 4.16087ZM24.0406 6.25276C24.7379 6.70655 25.0035 7.69162 24.6272 8.44426C24.4501 8.78737 9.331 24.0393 8.73332 24.471C8.48982 24.6481 5.2247 25.6995 5.13616 25.6331C5.11402 25.611 5.42393 24.5042 5.82239 23.1871L6.12123 22.1909L14.1125 14.1886C22.5243 5.76576 22.4911 5.79896 23.3101 5.94285C23.4983 5.97605 23.8192 6.11994 24.0406 6.25276Z",fill:"currentColor"}),i.createElementVNode("path",{d:"M15.098 25.9216C14.5446 26.1872 14.4118 27.1169 14.8656 27.5265C15.0759 27.7146 15.4743 27.7257 21.1302 27.7589C25.325 27.781 27.273 27.7478 27.4722 27.6703C28.0367 27.4268 28.1806 26.6521 27.7489 26.154L27.4833 25.8441L21.4069 25.822C17.2674 25.8109 15.264 25.833 15.098 25.9216Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-55ea5a5c"]]),vo=x(i.defineComponent({__name:"IconEmail",props:{size:{type:String,default:""},margin:{type:String,default:"0 10px 0 0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#email"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"email",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[i.createElementVNode("path",{d:"M20 20H4C3.46957 20 2.96086 19.7893 2.58579 19.4142C2.21071 19.0391 2 18.5304 2 18V5.913C2.02243 5.39779 2.24301 4.91116 2.61568 4.5547C2.98835 4.19824 3.4843 3.99951 4 4H20C20.5304 4 21.0391 4.21071 21.4142 4.58579C21.7893 4.96086 22 5.46957 22 6V18C22 18.5304 21.7893 19.0391 21.4142 19.4142C21.0391 19.7893 20.5304 20 20 20ZM4 7.868V18H20V7.868L12 13.2L4 7.868ZM4.8 6L12 10.8L19.2 6H4.8Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-99358e0a"]]),xo=x(i.defineComponent({__name:"IconMove",props:{size:{type:String,default:"24px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#icon-move"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"icon-move",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 22"},[i.createElementVNode("path",{d:"M8.91736 3.08529L6.83471 5.17059H8.0843H9.33058V7.25588V9.34117H7.24793H5.16529L5.15868 8.09993L5.14876 6.85868L3.07273 8.93404L1 11.0127L3.08264 13.098L5.16529 15.1833V13.9321V12.6843H7.24793H9.33058V14.7696V16.8548H7.89256C7.10248 16.8548 6.45455 16.8648 6.45785 16.878C6.45785 16.8946 6.60992 17.0402 6.79504 17.2057C7.16529 17.5367 8.90744 19.1189 9.38017 19.5525C10.7058 20.7639 10.9967 21.0188 11.0331 20.999C11.0562 20.9857 12.0876 20.0523 13.3273 18.9236L15.5785 16.8714L14.124 16.8615L12.6694 16.8548V14.7696V12.6843H14.7521H16.8347V13.9255C16.8347 14.6074 16.8446 15.1668 16.8612 15.1668C16.8975 15.1668 21 11.0491 21 11.0127C21 10.9763 16.8975 6.85868 16.8612 6.85868C16.8446 6.85868 16.8347 7.41807 16.8347 8.09993V9.34117H14.7521H12.6694V7.25588V5.17059H13.9091C14.5901 5.17059 15.1488 5.16066 15.1488 5.14411C15.1488 5.12094 11.043 1 11.0165 1C11.0066 1 10.0612 1.93673 8.91736 3.08529ZM12.081 3.24086C12.6595 3.82011 13.1322 4.30337 13.1322 4.31661C13.1322 4.33316 12.8413 4.34309 12.4876 4.34309H11.843V7.25588V10.1687H14.7686H17.6942V9.53646C17.6909 9.18891 17.6975 8.89763 17.7041 8.89101C17.7074 8.88439 18.1934 9.36103 18.7785 9.9469L19.843 11.0127L18.7686 12.0885L17.6942 13.1642V12.9325C17.6909 12.8034 17.6876 12.5155 17.6843 12.2871L17.6777 11.8733L14.762 11.8634L11.843 11.8568V14.7696V17.6823L12.6331 17.689L13.4264 17.6989L12.2165 18.7978L11.0066 19.9L10.7223 19.6419C10.5669 19.5028 10.4314 19.3804 10.4215 19.3704C10.405 19.3539 9.92893 18.917 9.28099 18.3311C9.09917 18.1656 8.86777 17.9538 8.7686 17.8578L8.58678 17.6823H9.37355H10.157V14.7696V11.8568H7.24793H4.33884L4.33223 12.5022L4.32231 13.1477L3.25455 12.0785L2.19008 11.0127L3.25455 9.94359L4.32231 8.87446L4.33223 9.52322L4.33884 10.1687H7.24793H10.157V7.25588V4.34309L9.5124 4.33647L8.86446 4.32654L9.93223 3.25741C10.5174 2.67154 11.0066 2.1916 11.0165 2.1916C11.0264 2.1916 11.5058 2.66492 12.081 3.24086Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-05547f14"]]),Bo=x(i.defineComponent({__name:"IconPhone",props:{size:{type:String,default:""},margin:{type:String,default:"0 10px 0 0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#phone"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"phone",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[i.createElementVNode("path",{d:"M19.4998 21.75H19.3723C4.63482 20.9025 2.54232 8.4675 2.24982 4.6725C2.22625 4.37744 2.26114 4.08062 2.35248 3.79906C2.44382 3.5175 2.58981 3.25673 2.78211 3.03169C2.9744 2.80665 3.20921 2.62177 3.47308 2.48763C3.73695 2.35349 4.02469 2.27274 4.31982 2.25H8.45232C8.75274 2.24971 9.04632 2.33963 9.29504 2.50812C9.54377 2.67661 9.73617 2.9159 9.84732 3.195L10.9873 6C11.0971 6.27266 11.1243 6.57156 11.0657 6.85957C11.007 7.14758 10.865 7.412 10.6573 7.62L9.05982 9.2325C9.30936 10.6506 9.98846 11.9578 11.0052 12.9772C12.022 13.9967 13.3274 14.6792 14.7448 14.9325L16.3723 13.32C16.5834 13.1146 16.8504 12.9759 17.1398 12.9213C17.4292 12.8666 17.7283 12.8983 17.9998 13.0125L20.8273 14.145C21.1022 14.2597 21.3367 14.4536 21.501 14.702C21.6653 14.9504 21.7519 15.2422 21.7498 15.54V19.5C21.7498 20.0967 21.5128 20.669 21.0908 21.091C20.6689 21.5129 20.0966 21.75 19.4998 21.75ZM4.49982 3.75C4.30091 3.75 4.11014 3.82902 3.96949 3.96967C3.82884 4.11032 3.74982 4.30109 3.74982 4.5V4.56C4.09482 9 6.30732 19.5 19.4548 20.25C19.5534 20.2561 19.6521 20.2427 19.7454 20.2105C19.8388 20.1783 19.9248 20.1281 19.9987 20.0626C20.0726 19.9971 20.1328 19.9176 20.1759 19.8288C20.219 19.74 20.2441 19.6436 20.2498 19.545V15.54L17.4223 14.4075L15.2698 16.545L14.9098 16.5C8.38482 15.6825 7.49982 9.1575 7.49982 9.09L7.45482 8.73L9.58482 6.5775L8.45982 3.75H4.49982Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-131f6ba1"]]),Mo=x(i.defineComponent({__name:"IconSearch",props:{size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#search"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"search",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[i.createElementVNode("path",{d:"M11 19C12.775 18.9996 14.4988 18.4054 15.897 17.312L20.293 21.708L21.707 20.294L17.311 15.898C18.405 14.4997 18.9996 12.7754 19 11C19 6.589 15.411 3 11 3C6.589 3 3 6.589 3 11C3 15.411 6.589 19 11 19ZM11 5C14.309 5 17 7.691 17 11C17 14.309 14.309 17 11 17C7.691 17 5 14.309 5 11C5 7.691 7.691 5 11 5Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-64e76eb7"]]),Io=x(i.defineComponent({__name:"IconSelectArrow",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"arrow-down",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20"},[i.createElementVNode("path",{d:"M3.08417 4.43062C2.86268 4.4769 2.70731 4.56285 2.52549 4.74467C2.29408 4.97607 2.20152 5.2174 2.22136 5.55459C2.25111 6.0207 1.96681 5.70996 6.78995 10.5397C9.18995 12.9463 11.2263 14.9662 11.309 15.029C11.5238 15.1843 11.7123 15.2471 11.99 15.2505C12.4693 15.2538 12.109 15.581 17.1106 10.5728C22.0891 5.58764 21.7288 5.98103 21.7255 5.505C21.7255 5.37607 21.7023 5.21078 21.6726 5.13145C21.5106 4.68186 21.0511 4.38434 20.5817 4.4174C20.1519 4.44715 20.4263 4.19591 16.0164 8.60252L11.9833 12.629L8.06598 8.71161C5.91061 6.55624 4.0726 4.73475 3.98003 4.66202C3.71227 4.45376 3.38499 4.36781 3.08417 4.43062Z",fill:"currentColor"}),i.createElementVNode("path",{d:"M9.69602 16.8994C9.70593 16.9292 9.72577 17.0184 9.73569 17.1044C9.76213 17.2664 9.7985 17.2994 9.83486 17.1903C9.84478 17.154 9.89106 17.1143 9.93734 17.1044C10.0464 17.078 10.0365 17.0548 9.87453 16.9589C9.6861 16.8465 9.67288 16.8432 9.69602 16.8994Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-4d8b581f"]]),Ro=x(i.defineComponent({__name:"ArrowLeft",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){const e=i.ref(!1);return(n,o)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size,fill:t.hoverColor?i.unref(e)?t.hoverColor:t.color:(i.unref(e),t.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},o[2]||(o[2]=[i.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)]),38)),o[3]||(o[3]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"arrow-left",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[i.createElementVNode("path",{d:"M656.733 149.806C659.446 147.019 662.69 144.804 666.274 143.292C669.857 141.779 673.707 141 677.597 141C681.486 141 685.337 141.779 688.92 143.292C692.503 144.804 695.748 147.019 698.461 149.806C704.024 155.518 707.138 163.176 707.138 171.15C707.138 179.123 704.024 186.782 698.461 192.494L386.589 512.366L698.461 832.302C701.269 835.176 703.483 838.575 704.976 842.305C706.47 846.035 707.215 850.022 707.167 854.04C707.119 858.057 706.281 862.026 704.699 865.72C703.118 869.413 700.824 872.759 697.949 875.566C695.211 878.242 691.972 880.351 688.417 881.774C684.863 883.197 681.063 883.904 677.235 883.857C673.407 883.809 669.625 883.007 666.107 881.497C662.589 879.986 659.404 877.797 656.733 875.054L325.085 534.702C319.26 528.726 316 520.711 316 512.366C316 504.021 319.26 496.006 325.085 490.03L656.733 149.806Z"})])],-1))],64))}}),[["__scopeId","data-v-ec3439ce"]]),$o=x(i.defineComponent({__name:"ArrowRight",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){const e=i.ref(!1);return(n,o)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size,fill:t.hoverColor?i.unref(e)?t.hoverColor:t.color:(i.unref(e),t.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},o[2]||(o[2]=[i.createElementVNode("use",{"xlink:href":"#arrow-right"},null,-1)]),38)),o[3]||(o[3]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"arrow-right",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[i.createElementVNode("path",{d:"M366.436 875.054C363.723 877.84 360.479 880.055 356.895 881.568C353.312 883.08 349.462 883.859 345.572 883.859C341.683 883.859 337.832 883.08 334.249 881.568C330.666 880.055 327.421 877.84 324.708 875.054C319.145 869.342 316.031 861.683 316.031 853.71C316.031 845.736 319.145 838.077 324.708 832.366L636.58 512.494L324.708 192.558C321.9 189.684 319.686 186.284 318.193 182.555C316.699 178.825 315.954 174.837 316.002 170.82C316.049 166.802 316.888 162.833 318.47 159.14C320.051 155.446 322.345 152.1 325.22 149.294C327.958 146.618 331.197 144.508 334.752 143.086C338.306 141.663 342.106 140.955 345.934 141.003C349.762 141.05 353.544 141.852 357.062 143.363C360.58 144.873 363.765 147.063 366.436 149.806L698.084 490.158C703.909 496.134 707.169 504.148 707.169 512.494C707.169 520.839 703.909 528.854 698.084 534.83L366.436 875.054Z"})])],-1))],64))}}),[["__scopeId","data-v-cd0d3c21"]]),Ao=x(i.defineComponent({__name:"DoubleArrowLeft",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){const e=i.ref(!1);return(n,o)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size,fill:t.hoverColor?i.unref(e)?t.hoverColor:t.color:(i.unref(e),t.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},o[2]||(o[2]=[i.createElementVNode("use",{"xlink:href":"#double-arrow-left"},null,-1)]),38)),o[3]||(o[3]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"double-arrow-left",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[i.createElementVNode("path",{d:"M529.408 149.376C532.121 146.589 535.365 144.374 538.949 142.862C542.532 141.35 546.382 140.57 550.272 140.57C554.161 140.57 558.011 141.35 561.595 142.862C565.178 144.374 568.422 146.589 571.136 149.376C576.699 155.088 579.813 162.746 579.813 170.72C579.813 178.694 576.699 186.352 571.136 192.064L259.264 511.936L571.136 831.872C573.943 834.746 576.157 838.145 577.651 841.875C579.145 845.605 579.889 849.593 579.842 853.61C579.794 857.628 578.956 861.597 577.374 865.29C575.792 868.984 573.499 872.329 570.624 875.136C567.886 877.812 564.647 879.922 561.092 881.344C557.538 882.767 553.738 883.475 549.91 883.427C546.081 883.38 542.3 882.578 538.782 881.067C535.264 879.556 532.079 877.367 529.408 874.624L197.76 534.272C191.935 528.296 188.675 520.281 188.675 511.936C188.675 503.591 191.935 495.576 197.76 489.6L529.408 149.376ZM785.408 149.376C788.121 146.589 791.365 144.374 794.949 142.862C798.532 141.35 802.382 140.57 806.272 140.57C810.161 140.57 814.011 141.35 817.595 142.862C821.178 144.374 824.422 146.589 827.136 149.376C832.699 155.088 835.813 162.746 835.813 170.72C835.813 178.694 832.699 186.352 827.136 192.064L515.264 511.936L827.136 831.872C829.943 834.746 832.157 838.145 833.651 841.875C835.145 845.605 835.889 849.593 835.842 853.61C835.794 857.628 834.956 861.597 833.374 865.29C831.792 868.984 829.499 872.329 826.624 875.136C823.886 877.812 820.647 879.922 817.092 881.344C813.538 882.767 809.738 883.475 805.91 883.427C802.081 883.38 798.3 882.578 794.782 881.067C791.264 879.556 788.079 877.367 785.408 874.624L453.76 534.272C447.935 528.296 444.675 520.281 444.675 511.936C444.675 503.591 447.935 495.576 453.76 489.6L785.408 149.376Z"})])],-1))],64))}}),[["__scopeId","data-v-98099ad2"]]),No=x(i.defineComponent({__name:"DoubleArrowRight",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){const e=i.ref(!1);return(n,o)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size,fill:t.hoverColor?i.unref(e)?t.hoverColor:t.color:(i.unref(e),t.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},o[2]||(o[2]=[i.createElementVNode("use",{"xlink:href":"#double-arrow-right"},null,-1)]),38)),o[3]||(o[3]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"double-arrow-right",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[i.createElementVNode("path",{d:"M495.111 874.624C492.397 877.411 489.153 879.626 485.57 881.138C481.987 882.65 478.136 883.43 474.247 883.43C470.357 883.43 466.507 882.65 462.924 881.138C459.34 879.626 456.096 877.411 453.383 874.624C447.819 868.912 444.706 861.254 444.706 853.28C444.706 845.306 447.819 837.648 453.383 831.936L765.255 512.064L453.383 192.128C450.575 189.254 448.361 185.855 446.867 182.125C445.374 178.395 444.629 174.407 444.677 170.39C444.724 166.372 445.563 162.403 447.145 158.71C448.726 155.016 451.02 151.671 453.895 148.864C456.633 146.188 459.872 144.078 463.426 142.656C466.981 141.233 470.781 140.525 474.609 140.573C478.437 140.62 482.219 141.422 485.737 142.933C489.254 144.444 492.44 146.633 495.111 149.376L826.759 489.728C832.584 495.704 835.844 503.719 835.844 512.064C835.844 520.409 832.584 528.424 826.759 534.4L495.111 874.624ZM239.111 874.624C236.397 877.411 233.153 879.626 229.57 881.138C225.987 882.65 222.136 883.43 218.247 883.43C214.357 883.43 210.507 882.65 206.924 881.138C203.34 879.626 200.096 877.411 197.383 874.624C191.819 868.912 188.706 861.254 188.706 853.28C188.706 845.306 191.819 837.648 197.383 831.936L509.255 512.064L197.383 192.128C194.575 189.254 192.361 185.855 190.867 182.125C189.374 178.395 188.629 174.407 188.677 170.39C188.724 166.372 189.563 162.403 191.145 158.71C192.726 155.016 195.02 151.671 197.895 148.864C200.633 146.188 203.872 144.078 207.426 142.656C210.981 141.233 214.781 140.525 218.609 140.573C222.437 140.62 226.219 141.422 229.737 142.933C233.254 144.444 236.44 146.633 239.111 149.376L570.759 489.728C576.584 495.704 579.844 503.719 579.844 512.064C579.844 520.409 576.584 528.424 570.759 534.4L239.111 874.624Z"})])],-1))],64))}}),[["__scopeId","data-v-053c9917"]]),Po=x(i.defineComponent({__name:"EllipsisSvg",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){const e=i.ref(!1);return(n,o)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size,fill:t.hoverColor?i.unref(e)?t.hoverColor:t.color:(i.unref(e),t.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},o[2]||(o[2]=[i.createElementVNode("use",{"xlink:href":"#ellipsis"},null,-1)]),38)),o[3]||(o[3]=i.createStaticVNode('<svg width="0" height="0" class="hidden" data-v-1798f31d><symbol id="ellipsis" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" data-v-1798f31d><path d="M65 135C73.2843 135 80 128.284 80 120C80 111.716 73.2843 105 65 105C56.7157 105 50 111.716 50 120C50 128.284 56.7157 135 65 135Z" data-v-1798f31d></path><path d="M120 135C128.284 135 135 128.284 135 120C135 111.716 128.284 105 120 105C111.716 105 105 111.716 105 120C105 128.284 111.716 135 120 135Z" data-v-1798f31d></path><path d="M175 135C183.284 135 190 128.284 190 120C190 111.716 183.284 105 175 105C166.716 105 160 111.716 160 120C160 128.284 166.716 135 175 135Z" data-v-1798f31d></path></symbol></svg>',1))],64))}}),[["__scopeId","data-v-1798f31d"]]);function To(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,o)}return n}function W(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?To(Object(n),!0).forEach(function(o){be(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):To(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function be(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ol(t,e){if(t==null)return{};var n,o,r=function(a,c){if(a==null)return{};var l,u,h={},f=Object.keys(a);for(u=0;u<f.length;u++)l=f[u],c.indexOf(l)>=0||(h[l]=a[l]);return h}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(o=0;o<s.length;o++)n=s[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function je(t){return function(e){if(Array.isArray(e))return Mn(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||function(e,n){if(e){if(typeof e=="string")return Mn(e,n);var o=Object.prototype.toString.call(e).slice(8,-1);if(o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set")return Array.from(e);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return Mn(e,n)}}(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
15
15
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Mn(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}var zo,Ll,Ot,K=(zo=function(t){/*!
|
|
16
16
|
Copyright (c) 2018 Jed Watson.
|
|
17
17
|
Licensed under the MIT License (MIT), see
|
|
@@ -29,14 +29,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
29
29
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
30
30
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
31
31
|
PERFORMANCE OF THIS SOFTWARE.
|
|
32
|
-
***************************************************************************** */function Vo(t,e){var n,o;return t&&e?(n=""+t+e[0].toUpperCase()+e.slice(1),o=t+"-"+e):(n=t||e,o=t||e),{name:n,classname:o}}function Fo(t){return/^blob:/.test(t)}function Do(t){return Fo(t)||function(e){return/^data:/.test(e)}(t)}function it(t){return!!(t&&t.constructor&&t.call&&t.apply)}function ie(t){return t===void 0}function Lt(t){return typeof t=="object"&&t!==null}function $n(t,e,n){var o={};return Lt(t)?(Object.keys(e).forEach(function(r){ie(t[r])?o[r]=e[r]:Lt(e[r])?Lt(t[r])?o[r]=$n(t[r],e[r],n[r]):o[r]=t[r]?e[r]:n[r]:e[r]===!0||e[r]===!1?o[r]=!!t[r]:o[r]=t[r]}),o):t?e:n}function _t(t){var e=Number(t);return Number.isNaN(e)?t:e}function Oo(t){return typeof(t=="number"||function(e){return typeof e=="object"&&e!==null}(t)&&toString.call(t)=="[object Number]")&&!Lo(t)}function Lo(t){return t!=t}function _o(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}var wt=function(t,e){t===void 0&&(t={}),e===void 0&&(e={}),this.type="manipulateImage",this.move=t,this.scale=e},_l=function(t,e){e===void 0&&(e={}),this.type="resize",this.directions=t,this.params=e},An=function(t){this.type="move",this.directions=t},Hl=function(){function t(e,n,o,r,s){this.type="drag",this.nativeEvent=e,this.position=o,this.previousPosition=r,this.element=n,this.anchor=s}return t.prototype.shift=function(){var e=this,n=e.element,o=e.anchor,r=e.position;if(n){var s=n.getBoundingClientRect(),a=s.left,c=s.top;return{left:r.left-a-o.left,top:r.top-c-o.top}}return{left:0,top:0}},t}(),Nn={name:"DraggableElement",props:{classname:{type:String}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){if(!this.$refs.draggable)throw new Error('You should add ref "draggable" to your root element to use draggable mixin');this.touches=[],this.hovered=!1},methods:{onMouseOver:function(){this.hovered||(this.hovered=!0,this.$emit("enter"))},onMouseLeave:function(){this.hovered&&!this.touches.length&&(this.hovered=!1,this.$emit("leave"))},onTouchStart:function(t){t.cancelable&&!this.disabled&&t.touches.length===1&&(this.touches=Ge(t.touches),this.hovered||(this.$emit("enter"),this.hovered=!0),t.touches.length&&this.initAnchor(this.touches.reduce(function(e,n){return{clientX:e.clientX+n.clientX/t.touches.length,clientY:e.clientY+n.clientY/t.touches.length}},{clientX:0,clientY:0})),t.preventDefault&&t.preventDefault(),t.stopPropagation())},onTouchEnd:function(){this.processEnd()},onTouchMove:function(t){this.touches.length&&(this.processMove(t,t.touches),t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation())},onMouseDown:function(t){if(!this.disabled){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.initAnchor(e),t.stopPropagation()}},onMouseMove:function(t){this.touches.length&&(this.processMove(t,[{fake:!0,clientX:t.clientX,clientY:t.clientY}]),t.preventDefault&&t.preventDefault())},onMouseUp:function(){this.processEnd()},initAnchor:function(t){var e=this.$refs.draggable.getBoundingClientRect(),n=e.left,o=e.right,r=e.bottom,s=e.top;this.anchor={left:t.clientX-n,top:t.clientY-s,bottom:r-t.clientY,right:o-t.clientX}},processMove:function(t,e){var n=Ge(e);if(this.touches.length){if(this.touches.length===1&&n.length===1){var o=this.$refs.draggable;this.$emit("drag",new Hl(t,o,{left:n[0].clientX,top:n[0].clientY},{left:this.touches[0].clientX,top:this.touches[0].clientY},this.anchor))}this.touches=n}},processEnd:function(){this.touches.length&&this.$emit("drag-end"),this.hovered&&(this.$emit("leave"),this.hovered=!1),this.touches=[]}},emits:["drag","drag-end","leave","enter"]};Nn.render=function(t,e,n,o,r,s){return i.openBlock(),i.createBlock("div",{ref:"draggable",class:n.classname,onTouchstart:e[1]||(e[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:e[2]||(e[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)}),onMouseover:e[3]||(e[3]=function(){return s.onMouseOver&&s.onMouseOver.apply(s,arguments)}),onMouseleave:e[4]||(e[4]=function(){return s.onMouseLeave&&s.onMouseLeave.apply(s,arguments)})},[i.renderSlot(t.$slots,"default")],34)};var Pn=xe("vue-handler-wrapper"),Ho={name:"HandlerWrapper",components:{DraggableElement:Nn},props:{horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},computed:{classes:function(){var t;if(this.horizontalPosition||this.verticalPosition){var e,n=Vo(this.horizontalPosition,this.verticalPosition);t=Pn((be(e={},n.classname,!0),be(e,"disabled",this.disabled),e))}else t=Pn({disabled:this.disabled});return{root:t,draggable:Pn("draggable")}}},emits:["leave","enter","drag","drag-end"]};Ho.render=function(t,e,n,o,r,s){var a=i.resolveComponent("DraggableElement");return i.openBlock(),i.createBlock("div",{class:s.classes.root},[i.createVNode(a,{class:s.classes.draggable,onDrag:e[1]||(e[1]=function(c){return t.$emit("drag",c)}),onDragEnd:e[2]||(e[2]=function(c){return t.$emit("drag-end")}),onLeave:e[3]||(e[3]=function(c){return t.$emit("leave")}),onEnter:e[4]||(e[4]=function(c){return t.$emit("enter")})},{default:i.withCtx(function(){return[i.renderSlot(t.$slots,"default")]}),_:3},8,["class"])],2)};var ql=xe("vue-line-wrapper"),qo={name:"LineWrapper",components:{DraggableElement:Nn},props:{position:{type:String,required:!0},disabled:{type:Boolean,default:!1}},computed:{classname:function(){var t;return ql((be(t={},this.position,!0),be(t,"disabled",this.disabled),t))}},emits:["leave","enter","drag","drag-end"]};qo.render=function(t,e,n,o,r,s){var a=i.resolveComponent("DraggableElement");return i.openBlock(),i.createBlock(a,{class:s.classname,onDrag:e[1]||(e[1]=function(c){return t.$emit("drag",c)}),onDragEnd:e[2]||(e[2]=function(c){return t.$emit("drag-end")}),onLeave:e[3]||(e[3]=function(c){return t.$emit("leave")}),onEnter:e[4]||(e[4]=function(c){return t.$emit("enter")})},{default:i.withCtx(function(){return[i.renderSlot(t.$slots,"default")]}),_:3},8,["class"])};var Ae=["left","right","top","bottom"],Ul=["left","right"],Wl=["top","bottom"],jl=["left","top"],Gl=["fill-area","fit-area","stencil","none"],Uo={left:0,top:0,width:0,height:0};function Wo(t,e,n){return!(n=n||["width","height","left","top"]).some(function(o){return t[o]!==e[o]})}function Ne(t){return{left:t.left,top:t.top,right:t.left+t.width,bottom:t.top+t.height}}function ot(t,e){return{left:t.left-e.left,top:t.top-e.top}}function se(t){return{left:t.left+t.width/2,top:t.top+t.height/2}}function bt(t,e){var n={left:0,top:0,right:0,bottom:0};return Ae.forEach(function(o){var r=e[o],s=Ne(t)[o];n[o]=r!==void 0&&s!==void 0?o==="left"||o==="top"?Math.max(0,r-s):Math.max(0,s-r):0}),n}function Pe(t,e){return{left:t.left-e.left,top:t.top-e.top,width:t.width+e.left+e.right,height:t.height+e.top+e.bottom}}function Ht(t){return{left:-t.left,top:-t.top}}function he(t,e){return N(N({},t),{left:t.left+e.left,top:t.top+e.top})}function Ce(t,e,n,o){if(e!==1){if(n){var r=se(t);return{width:t.width*e,height:t.height*e,left:t.left+t.width*(1-e)/2+(n.left-r.left)*(1-e),top:t.top+t.height*(1-e)/2+(n.top-r.top)*(1-e)}}return{width:t.width*e,height:t.height*e,left:t.left+t.width*(1-e)/2,top:t.top+t.height*(1-e)/2}}return t}function j(t){return t.width/t.height}function rt(t,e){return Math.min(e.right!==void 0&&e.left!==void 0?(e.right-e.left)/t.width:1/0,e.bottom!==void 0&&e.top!==void 0?(e.bottom-e.top)/t.height:1/0)}function st(t,e){var n={left:0,top:0},o=bt(t,e);return o.left&&o.left>0?n.left=o.left:o.right&&o.right>0&&(n.left=-o.right),o.top&&o.top>0?n.top=o.top:o.bottom&&o.bottom>0&&(n.top=-o.bottom),n}function Tn(t,e){var n;return e.minimum&&t<e.minimum?n=e.minimum:e.maximum&&t>e.maximum&&(n=e.maximum),n}function jo(t,e){var n=j(t),o=j(e);return e.width<1/0&&e.height<1/0?n>o?{width:e.width,height:e.width/n}:{width:e.height*n,height:e.height}:e.width<1/0?{width:e.width,height:e.width/n}:e.height<1/0?{width:e.height*n,height:e.height}:t}function Go(t,e){var n=e*Math.PI/180;return{width:Math.abs(t.width*Math.cos(n))+Math.abs(t.height*Math.sin(n)),height:Math.abs(t.width*Math.sin(n))+Math.abs(t.height*Math.cos(n))}}function qe(t,e){var n=e*Math.PI/180;return{left:t.left*Math.cos(n)-t.top*Math.sin(n),top:t.left*Math.sin(n)+t.top*Math.cos(n)}}function qt(t,e){var n=bt(ae(t,e),e);return n.left+n.right+n.top+n.bottom?n.left+n.right>n.top+n.bottom?Math.min((t.width+n.left+n.right)/t.width,rt(t,e)):Math.min((t.height+n.top+n.bottom)/t.height,rt(t,e)):1}function ae(t,e,n){n===void 0&&(n=!1);var o=st(t,e);return he(t,n?Ht(o):o)}function zn(t){return{width:t.right!==void 0&&t.left!==void 0?t.right-t.left:1/0,height:t.bottom!==void 0&&t.top!==void 0?t.bottom-t.top:1/0}}function Zl(t,e){return N(N({},t),{minWidth:Math.min(e.width,t.minWidth),minHeight:Math.min(e.height,t.minHeight),maxWidth:Math.min(e.width,t.maxWidth),maxHeight:Math.min(e.height,t.maxHeight)})}function Zo(t,e,n){n===void 0&&(n=!0);var o={};return Ae.forEach(function(r){var s=t[r],a=e[r];s!==void 0&&a!==void 0?o[r]=r==="left"||r==="top"?n?Math.max(s,a):Math.min(s,a):n?Math.min(s,a):Math.max(s,a):a!==void 0?o[r]=a:s!==void 0&&(o[r]=s)}),o}function Ut(t,e){return Zo(t,e,!0)}function Xo(t){var e=t.size,n=t.aspectRatio,o=t.ignoreMinimum,r=t.sizeRestrictions;return!!((e.correctRatio||j(e)>=n.minimum&&j(e)<=n.maximum)&&e.height<=r.maxHeight&&e.width<=r.maxWidth&&e.width&&e.height&&(o||e.height>=r.minHeight&&e.width>=r.minWidth))}function Jo(t,e){return Math.pow(t.width-e.width,2)+Math.pow(t.height-e.height,2)}function Oe(t){var e=t.width,n=t.height,o=t.sizeRestrictions,r={minimum:t.aspectRatio&&t.aspectRatio.minimum||0,maximum:t.aspectRatio&&t.aspectRatio.maximum||1/0},s={width:Math.max(o.minWidth,Math.min(o.maxWidth,e)),height:Math.max(o.minHeight,Math.min(o.maxHeight,n))};function a(u,h){return h===void 0&&(h=!1),u.reduce(function(f,m){return Xo({size:m,aspectRatio:r,sizeRestrictions:o,ignoreMinimum:h})&&(!f||Jo(m,{width:e,height:n})<Jo(f,{width:e,height:n}))?m:f},null)}var c=[];r&&[r.minimum,r.maximum].forEach(function(u){u&&c.push({width:s.width,height:s.width/u,correctRatio:!0},{width:s.height*u,height:s.height,correctRatio:!0})}),Xo({size:s,aspectRatio:r,sizeRestrictions:o})&&c.push(s);var l=a(c)||a(c,!0);return l&&{width:l.width,height:l.height}}function Vn(t){var e=t.event,n=t.coordinates,o=t.positionRestrictions,r=o===void 0?{}:o,s=he(n,e.directions);return he(s,st(s,r))}function Xl(t){var e=t.coordinates,n=t.transform,o=t.imageSize,r=t.sizeRestrictions,s=t.positionRestrictions,a=t.aspectRatio,c=t.visibleArea,l=function(h,f){return Vn({coordinates:h,positionRestrictions:s,event:new An({left:f.left-h.left,top:f.top-h.top})})},u=N({},e);return(Array.isArray(n)?n:[n]).forEach(function(h){var f={};ie((f=typeof h=="function"?h({coordinates:u,imageSize:o,visibleArea:c}):h).width)&&ie(f.height)||(u=function(m,g){var p=N(N(N({},m),Oe({width:g.width,height:g.height,sizeRestrictions:r,aspectRatio:a})),{left:0,top:0});return l(p,{left:m.left,top:m.top})}(u,N(N({},u),f))),ie(f.left)&&ie(f.top)||(u=l(u,N(N({},u),f)))}),u}function Jl(t){t.event;var e=t.getAreaRestrictions,n=t.boundaries,o=t.coordinates,r=t.visibleArea;t.aspectRatio;var s=t.stencilSize,a=t.sizeRestrictions,c=t.positionRestrictions;t.stencilReference;var l,u,h,f=N({},o),m=N({},r),g=N({},s);l=j(g),u=j(f),h===void 0&&(h=.001),(l===0||u===0?Math.abs(u-l)<h:Math.abs(u/l)<1+h&&Math.abs(u/l)>1-h)||(f=N(N({},f),Oe({sizeRestrictions:a,width:f.width,height:f.height,aspectRatio:{minimum:j(g),maximum:j(g)}})));var p=qt(m=Ce(m,f.width*n.width/(m.width*g.width)),e({visibleArea:m,type:"resize"}));return p!==1&&(m=Ce(m,p),f=Ce(f,p)),m=ae(m=he(m,ot(se(f),se(m))),e({visibleArea:m,type:"move"})),{coordinates:f=ae(f,Ut(Ne(m),c)),visibleArea:m}}function Yl(t){var e=t.event,n=t.getAreaRestrictions,o=t.boundaries,r=t.coordinates,s=t.visibleArea;t.aspectRatio,t.stencilSize,t.sizeRestrictions;var a=t.positionRestrictions;t.stencilReference;var c=N({},r),l=N({},s);if(r&&s&&e.type!=="manipulateImage"){var u={width:0,height:0};l.width,o.width,j(o)>j(c)?(u.height=.8*o.height,u.width=u.height*j(c)):(u.width=.8*o.width,u.height=u.width*j(c));var h=qt(l=Ce(l,c.width*o.width/(l.width*u.width)),n({visibleArea:l,type:"resize"}));l=Ce(l,h),h!==1&&(u.height/=h,u.width/=h),l=ae(l=he(l,ot(se(c),se(l))),n({visibleArea:l,type:"move"})),c=ae(c,Ut(Ne(l),a))}return{coordinates:c,visibleArea:l}}function Ql(t){var e=t.event,n=t.coordinates,o=t.visibleArea,r=t.getAreaRestrictions,s=N({},o),a=N({},n);if(e.type==="setCoordinates"){var c=Math.max(0,a.width-s.width),l=Math.max(0,a.height-s.height);c>l?s=Ce(s,Math.min(a.width/s.width,rt(s,r({visibleArea:s,type:"resize"})))):l>c&&(s=Ce(s,Math.min(a.height/s.height,rt(s,r({visibleArea:s,type:"resize"}))))),s=ae(s=he(s,Ht(st(a,Ne(s)))),r({visibleArea:s,type:"move"}))}return{visibleArea:s,coordinates:a}}function Kl(t){var e=t.imageSize,n=t.visibleArea,o=t.coordinates,r=n||e;return{left:(n?n.left:0)+r.width/2-o.width/2,top:(n?n.top:0)+r.height/2-o.height/2}}function ec(t){var e=t.imageSize,n=t.visibleArea,o=t.aspectRatio,r=t.sizeRestrictions,s=n||e,a=Math.min(o.maximum||1/0,Math.max(o.minimum||0,j(s))),c=s.width<s.height?{width:.8*s.width,height:.8*s.width/a}:{height:.8*s.height,width:.8*s.height*a};return Oe(N(N({},c),{aspectRatio:o,sizeRestrictions:r}))}function tc(t){var e,n,o=t.imageSize,r=t.visibleArea,s=t.boundaries,a=t.aspectRatio,c=t.sizeRestrictions,l=t.stencilSize,u=r||o;return j(u)>j(s)?n=(e=l.height*u.height/s.height)*j(l):e=(n=l.width*u.width/s.width)/j(l),Oe({width:n,height:e,aspectRatio:a,sizeRestrictions:c})}function nc(t){var e=t.getAreaRestrictions,n=t.coordinates,o=t.imageSize,r=j(t.boundaries);if(n){var s={height:Math.max(n.height,o.height),width:Math.max(n.width,o.width)},a=jo({width:j(s)>r?s.width:s.height*r,height:j(s)>r?s.width/r:s.height},zn(e())),c={left:n.left+n.width/2-a.width/2,top:n.top+n.height/2-a.height/2,width:a.width,height:a.height},l=bt(n,Ne(N({left:0,top:0},o))),u={};return!l.left&&!l.right&&c.width<=o.width&&(u.left=0,u.right=o.width),!l.top&&!l.bottom&&c.height<=o.height&&(u.top=0,u.bottom=o.height),ae(c,u)}var h=j(o);return a={height:h>r?o.height:o.width/r,width:h>r?o.height*r:o.width},{left:o.width/2-a.width/2,top:o.height/2-a.height/2,width:a.width,height:a.height}}function Wt(t,e){return Zo(t,Ne(e))}function ic(t){var e=t.event,n=t.coordinates,o=t.visibleArea,r=t.sizeRestrictions,s=t.getAreaRestrictions,a=t.positionRestrictions,c=t.adjustStencil,l=e.scale,u=e.move,h=N({},o),f=N({},n),m=1,g=1,p=l.factor&&Math.abs(l.factor-1)>.001;h=he(h,{left:u.left||0,top:u.top||0});var E={stencil:{minimum:Math.max(r.minWidth?r.minWidth/f.width:0,r.minHeight?r.minHeight/f.height:0),maximum:Math.min(r.maxWidth?r.maxWidth/f.width:1/0,r.maxHeight?r.maxHeight/f.height:1/0,rt(f,a))},area:{maximum:rt(h,s({visibleArea:h,type:"resize"}))}};l.factor&&p&&(l.factor<1?(g=Math.max(l.factor,E.stencil.minimum))>1&&(g=1):l.factor>1&&(g=Math.min(l.factor,Math.min(E.area.maximum,E.stencil.maximum)))<1&&(g=1)),g&&(h=Ce(h,g,l.center));var w=n.left-o.left,M=o.width+o.left-(n.width+n.left),O=n.top-o.top,L=o.height+o.top-(n.height+n.top);return h=ae(h=he(h,st(h,{left:a.left!==void 0?a.left-w*g:void 0,top:a.top!==void 0?a.top-O*g:void 0,bottom:a.bottom!==void 0?a.bottom+L*g:void 0,right:a.right!==void 0?a.right+M*g:void 0})),s({visibleArea:h,type:"move"})),f.width=f.width*g,f.height=f.height*g,f.left=h.left+w*g,f.top=h.top+O*g,f=ae(f,Ut(Ne(h),a)),l.factor&&p&&c&&(l.factor>1?m=Math.min(E.area.maximum,l.factor)/g:l.factor<1&&(m=Math.max(f.height/h.height,f.width/h.width,l.factor/g)),m!==1&&(h=he(h=ae(h=Ce(h,m,l.factor>1?l.center:se(f)),s({visibleArea:h,type:"move"})),Ht(st(f,Ne(h)))))),{coordinates:f,visibleArea:h}}function oc(t){var e=t.aspectRatio,n=t.getAreaRestrictions,o=t.coordinates,r=t.visibleArea,s=t.sizeRestrictions,a=t.positionRestrictions,c=t.imageSize,l=t.previousImageSize,u=t.angle,h=N({},o),f=N({},r),m=qe(se(N({left:0,top:0},l)),u);return(h=N(N({},Oe({sizeRestrictions:s,aspectRatio:e,width:h.width,height:h.height})),qe(se(h),u))).left-=m.left-c.width/2+h.width/2,h.top-=m.top-c.height/2+h.height/2,f=Ce(f,qt(f,n({visibleArea:f,type:"resize"}))),{coordinates:h=ae(h,a),visibleArea:f=ae(f=he(f,ot(se(h),se(o))),n({visibleArea:f,type:"move"}))}}function rc(t){var e=t.flip,n=t.previousFlip,o=t.rotate,r=t.getAreaRestrictions,s=t.coordinates,a=t.visibleArea,c=t.imageSize,l=N({},s),u=N({},a),h=n.horizontal!==e.horizontal,f=n.vertical!==e.vertical;if(h||f){var m=qe({left:c.width/2,top:c.height/2},-o),g=qe(se(l),-o),p=qe({left:h?m.left-(g.left-m.left):g.left,top:f?m.top-(g.top-m.top):g.top},o);l=he(l,ot(p,se(l))),g=qe(se(u),-o),u=ae(u=he(u,ot(p=qe({left:h?m.left-(g.left-m.left):g.left,top:f?m.top-(g.top-m.top):g.top},o),se(u))),r({visibleArea:u,type:"move"}))}return{coordinates:l,visibleArea:u}}function Yo(t){var e=t.directions,n=t.coordinates,o=t.positionRestrictions,r=o===void 0?{}:o,s=t.sizeRestrictions,a=t.preserveRatio,c=t.compensate,l=N({},e),u=Pe(n,l).width,h=Pe(n,l).height;u<0&&(l.left<0&&l.right<0?(l.left=-(n.width-s.minWidth)/(l.left/l.right),l.right=-(n.width-s.minWidth)/(l.right/l.left)):l.left<0?l.left=-(n.width-s.minWidth):l.right<0&&(l.right=-(n.width-s.minWidth))),h<0&&(l.top<0&&l.bottom<0?(l.top=-(n.height-s.minHeight)/(l.top/l.bottom),l.bottom=-(n.height-s.minHeight)/(l.bottom/l.top)):l.top<0?l.top=-(n.height-s.minHeight):l.bottom<0&&(l.bottom=-(n.height-s.minHeight)));var f=bt(Pe(n,l),r);c&&(f.left&&f.left>0&&f.right===0?(l.right+=f.left,l.left-=f.left):f.right&&f.right>0&&f.left===0&&(l.left+=f.right,l.right-=f.right),f.top&&f.top>0&&f.bottom===0?(l.bottom+=f.top,l.top-=f.top):f.bottom&&f.bottom>0&&f.top===0&&(l.top+=f.bottom,l.bottom-=f.bottom),f=bt(Pe(n,l),r));var m={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if(Ae.forEach(function(E){var w=f[E];w&&l[E]&&(m[E]=Math.max(0,1-w/l[E]))}),a){var g=Math.min.apply(null,Ae.map(function(E){return m[E]}));g!==1/0&&Ae.forEach(function(E){l[E]*=g})}else Ae.forEach(function(E){m[E]!==1/0&&(l[E]*=m[E])});if(u=Pe(n,l).width,h=Pe(n,l).height,l.right+l.left&&(u>s.maxWidth?m.width=(s.maxWidth-n.width)/(l.right+l.left):u<s.minWidth&&(m.width=(s.minWidth-n.width)/(l.right+l.left))),l.bottom+l.top&&(h>s.maxHeight?m.height=(s.maxHeight-n.height)/(l.bottom+l.top):h<s.minHeight&&(m.height=(s.minHeight-n.height)/(l.bottom+l.top))),a){var p=Math.min(m.width,m.height);p!==1/0&&Ae.forEach(function(E){l[E]*=p})}else m.width!==1/0&&Ul.forEach(function(E){l[E]*=m.width}),m.height!==1/0&&Wl.forEach(function(E){l[E]*=m.height});return l}function jt(t,e,n){return e==0&&n==0?t/2:e==0?0:n==0?t:t*Math.abs(e/(e+n))}var sc=xe("vue-simple-handler"),ac=xe("vue-simple-handler-wrapper"),Fn={name:"SimpleHandler",components:{HandlerWrapper:Ho},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){var t,e=(be(t={},this.horizontalPosition,!!this.horizontalPosition),be(t,this.verticalPosition,!!this.verticalPosition),be(t,"".concat(this.horizontalPosition,"-").concat(this.verticalPosition),!!(this.verticalPosition&&this.horizontalPosition)),be(t,"hover",this.hover),t);return{default:K(sc(e),this.defaultClass,this.hover&&this.hoverClass),wrapper:K(ac(e),this.wrapperClass)}}},methods:{onDrag:function(t){this.$emit("drag",t)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};Fn.render=function(t,e,n,o,r,s){var a=i.resolveComponent("HandlerWrapper");return i.openBlock(),i.createBlock(a,{class:s.classes.wrapper,"vertical-position":n.verticalPosition,"horizontal-position":n.horizontalPosition,disabled:n.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:i.withCtx(function(){return[i.createVNode("div",{class:s.classes.default},null,2)]}),_:1},8,["class","vertical-position","horizontal-position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var lc=xe("vue-simple-line"),cc=xe("vue-simple-line-wrapper"),Dn={name:"SimpleLine",components:{LineWrapper:qo},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},position:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){return{root:K(lc(be({},this.position,!0)),this.defaultClass,this.hover&&this.hoverClass),wrapper:K(cc(be({},this.position,!0)),this.wrapperClass)}}},methods:{onDrag:function(t){this.$emit("drag",t)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};Dn.render=function(t,e,n,o,r,s){var a=i.resolveComponent("LineWrapper");return i.openBlock(),i.createBlock(a,{class:s.classes.wrapper,position:n.position,disabled:n.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:i.withCtx(function(){return[i.createVNode("div",{class:s.classes.root},null,2)]}),_:1},8,["class","position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var On=xe("vue-bounding-box"),dc=["east","west",null],uc=["south","north",null],Qo={name:"BoundingBox",props:{width:{type:Number},height:{type:Number},transitions:{type:Object},handlers:{type:Object,default:function(){return{eastNorth:!0,north:!0,westNorth:!0,west:!0,westSouth:!0,south:!0,eastSouth:!0,east:!0}}},handlersComponent:{type:[Object,String],default:function(){return Fn}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}},lines:{type:Object,default:function(){return{west:!0,north:!0,east:!0,south:!0}}},linesComponent:{type:[Object,String],default:function(){return Dn}},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},resizable:{type:Boolean,default:!0}},data:function(){var t=[];return dc.forEach(function(e){uc.forEach(function(n){if(e!==n){var o=Vo(e,n),r=o.name,s=o.classname;t.push({name:r,classname:s,verticalDirection:n,horizontalDirection:e})}})}),{points:t}},computed:{style:function(){var t={};return this.width&&this.height&&(t.width="".concat(this.width,"px"),t.height="".concat(this.height,"px"),this.transitions&&this.transitions.enabled&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction))),t},classes:function(){var t=this.handlersClasses,e=this.handlersWrappersClasses,n=this.linesClasses,o=this.linesWrappersClasses;return{root:On(),handlers:t,handlersWrappers:e,lines:n,linesWrappers:o}},lineNodes:function(){var t=this,e=[];return this.points.forEach(function(n){n.horizontalDirection&&n.verticalDirection||!t.lines[n.name]||e.push({name:n.name,component:t.linesComponent,class:K(t.classes.lines.default,t.classes.lines[n.name],!t.resizable&&t.classes.lines.disabled),wrapperClass:K(t.classes.linesWrappers.default,t.classes.linesWrappers[n.name],!t.resizable&&t.classes.linesWrappers.disabled),hoverClass:t.classes.lines.hover,verticalDirection:n.verticalDirection,horizontalDirection:n.horizontalDirection,disabled:!t.resizable})}),e},handlerNodes:function(){var t=this,e=[],n=this.width,o=this.height;return this.points.forEach(function(r){if(t.handlers[r.name]){var s={name:r.name,component:t.handlersComponent,class:K(t.classes.handlers.default,t.classes.handlers[r.name]),wrapperClass:K(t.classes.handlersWrappers.default,t.classes.handlersWrappers[r.name]),hoverClass:t.classes.handlers.hover,verticalDirection:r.verticalDirection,horizontalDirection:r.horizontalDirection,disabled:!t.resizable};if(n&&o){var a=r.horizontalDirection,c=r.verticalDirection,l=a==="east"?n:a==="west"?0:n/2,u=c==="south"?o:c==="north"?0:o/2;s.wrapperClass=On("handler"),s.wrapperStyle={transform:"translate(".concat(l,"px, ").concat(u,"px)")},t.transitions&&t.transitions.enabled&&(s.wrapperStyle.transition="".concat(t.transitions.time,"ms ").concat(t.transitions.timingFunction))}else s.wrapperClass=On("handler",be({},r.classname,!0));e.push(s)}}),e}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[]},methods:{onEnd:function(){this.$emit("resize-end")},onHandlerDrag:function(t,e,n){var o,r=t.shift(),s=r.left,a=r.top,c={left:0,right:0,top:0,bottom:0};e==="west"?c.left-=s:e==="east"&&(c.right+=s),n==="north"?c.top-=a:n==="south"&&(c.bottom+=a),!n&&e?o="width":n&&!e&&(o="height"),this.resizable&&this.$emit("resize",new _l(c,{allowedDirections:{left:e==="west"||!e,right:e==="east"||!e,bottom:n==="south"||!n,top:n==="north"||!n},preserveAspectRatio:t.nativeEvent&&t.nativeEvent.shiftKey,respectDirection:o}))}},emits:["resize","resize-end"]};Qo.render=function(t,e,n,o,r,s){return i.openBlock(),i.createBlock("div",{ref:"box",class:s.classes.root,style:s.style},[i.renderSlot(t.$slots,"default"),i.createVNode("div",null,[(i.openBlock(!0),i.createBlock(i.Fragment,null,i.renderList(s.lineNodes,function(a){return i.openBlock(),i.createBlock(i.resolveDynamicComponent(a.component),{key:a.name,"default-class":a.class,"hover-class":a.hoverClass,"wrapper-class":a.wrapperClass,position:a.name,disabled:a.disabled,onDrag:function(c){return s.onHandlerDrag(c,a.horizontalDirection,a.verticalDirection)},onDragEnd:e[1]||(e[1]=function(c){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","position","disabled","onDrag"])}),128))]),(i.openBlock(!0),i.createBlock(i.Fragment,null,i.renderList(s.handlerNodes,function(a){return i.openBlock(),i.createBlock("div",{key:a.name,style:a.wrapperStyle,class:a.wrapperClass},[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(a.component),{"default-class":a.class,"hover-class":a.hoverClass,"wrapper-class":a.wrapperClass,"horizontal-position":a.horizontalDirection,"vertical-position":a.verticalDirection,disabled:a.disabled,onDrag:function(c){return s.onHandlerDrag(c,a.horizontalDirection,a.verticalDirection)},onDragEnd:e[2]||(e[2]=function(c){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","horizontal-position","vertical-position","disabled","onDrag"]))],6)}),128))],6)};var hc=xe("vue-draggable-area"),Ko={name:"DraggableArea",props:{movable:{type:Boolean,default:!0},activationDistance:{type:Number,default:20}},computed:{classnames:function(){return{default:hc()}}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[],this.touchStarted=!1},methods:{onTouchStart:function(t){if(t.cancelable){var e=this.movable&&t.touches.length===1;e&&(this.touches=Ge(t.touches)),(this.touchStarted||e)&&(t.preventDefault(),t.stopPropagation())}},onTouchEnd:function(){this.touchStarted=!1,this.processEnd()},onTouchMove:function(t){this.touches.length>=1&&(this.touchStarted?(this.processMove(t,t.touches),t.preventDefault(),t.stopPropagation()):_o({x:this.touches[0].clientX,y:this.touches[0].clientY},{x:t.touches[0].clientX,y:t.touches[0].clientY})>this.activationDistance&&(this.initAnchor({clientX:t.touches[0].clientX,clientY:t.touches[0].clientY}),this.touchStarted=!0))},onMouseDown:function(t){if(this.movable&&t.button===0){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.initAnchor(e),t.stopPropagation()}},onMouseMove:function(t){this.touches.length&&(this.processMove(t,[{fake:!0,clientX:t.clientX,clientY:t.clientY}]),t.preventDefault&&t.cancelable&&t.preventDefault(),t.stopPropagation())},onMouseUp:function(){this.processEnd()},initAnchor:function(t){var e=this.$refs.container.getBoundingClientRect(),n=e.left,o=e.top;this.anchor={x:t.clientX-n,y:t.clientY-o}},processMove:function(t,e){var n=Ge(e);if(this.touches.length){var o=this.$refs.container.getBoundingClientRect(),r=o.left,s=o.top;this.touches.length===1&&n.length===1&&this.$emit("move",new An({left:n[0].clientX-(r+this.anchor.x),top:n[0].clientY-(s+this.anchor.y)}))}},processEnd:function(){this.touches.length&&this.$emit("move-end"),this.touches=[]}},emits:["move","move-end"]};Ko.render=function(t,e,n,o,r,s){return i.openBlock(),i.createBlock("div",{ref:"container",onTouchstart:e[1]||(e[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:e[2]||(e[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)})},[i.renderSlot(t.$slots,"default")],544)};function Ln(t){var e,n;return{rotate:t.rotate||0,flip:{horizontal:((e=t==null?void 0:t.flip)===null||e===void 0?void 0:e.horizontal)||!1,vertical:((n=t==null?void 0:t.flip)===null||n===void 0?void 0:n.vertical)||!1}}}function fc(t){return new Promise(function(e,n){try{if(t)if(/^data:/i.test(t))e(function(l){l=l.replace(/^data:([^;]+);base64,/gim,"");for(var u=atob(l),h=u.length,f=new ArrayBuffer(h),m=new Uint8Array(f),g=0;g<h;g++)m[g]=u.charCodeAt(g);return f}(t));else if(/^blob:/i.test(t)){var o=new FileReader;o.onload=function(l){e(l.target.result)},s=t,a=function(l){o.readAsArrayBuffer(l)},(c=new XMLHttpRequest).open("GET",s,!0),c.responseType="blob",c.onload=function(){this.status!=200&&this.status!==0||a(this.response)},c.send()}else{var r=new XMLHttpRequest;r.onreadystatechange=function(){r.readyState===4&&(r.status===200||r.status===0?e(r.response):n("Warning: could not load an image to parse its orientation"),r=null)},r.onprogress=function(){r.getResponseHeader("content-type")!=="image/jpeg"&&r.abort()},r.withCredentials=!1,r.open("GET",t,!0),r.responseType="arraybuffer",r.send(null)}else n("Error: the image is empty")}catch(l){n(l)}var s,a,c})}function er(t){var e=t.rotate,n=t.flip,o=t.scaleX,r=t.scaleY,s="";return s+=" rotate("+e+"deg) ",s+=" scaleX("+o*(n.horizontal?-1:1)+") ",s+=" scaleY("+r*(n.vertical?-1:1)+") "}function mc(t){try{var e,n=new DataView(t),o=void 0,r=void 0,s=void 0,a=void 0;if(n.getUint8(0)===255&&n.getUint8(1)===216)for(var c=n.byteLength,l=2;l+1<c;){if(n.getUint8(l)===255&&n.getUint8(l+1)===225){s=l;break}l++}if(s&&(o=s+10,function(g,p,E){var w,M="";for(w=p,E+=p;w<E;w++)M+=String.fromCharCode(g.getUint8(w));return M}(n,s+4,4)==="Exif")){var u=n.getUint16(o);if(((r=u===18761)||u===19789)&&n.getUint16(o+2,r)===42){var h=n.getUint32(o+4,r);h>=8&&(a=o+h)}}if(a){for(var f=n.getUint16(a,r),m=0;m<f;m++)if(l=a+12*m+2,n.getUint16(l,r)===274){l+=8,e=n.getUint16(l,r),n.setUint16(l,1,r);break}}return e}catch{return null}}function tr(t,e){var n=e.getBoundingClientRect(),o=n.left,r=n.top,s={left:0,top:0},a=0;return t.forEach(function(c){s.left+=(c.clientX-o)/t.length,s.top+=(c.clientY-r)/t.length}),t.forEach(function(c){a+=_o({x:s.left,y:s.top},{x:c.clientX-o,y:c.clientY-r})}),{centerMass:s,spread:a,count:t.length}}var nr={props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0},eventsFilter:{type:Function,required:!1}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},created:function(){this.transforming=!1,this.debouncedProcessEnd=Rn(this.processEnd),this.touches=[]},methods:{processMove:function(t,e){if(this.touches.length){if(this.touches.length===1&&e.length===1)this.$emit("move",new wt({left:this.touches[0].clientX-e[0].clientX,top:this.touches[0].clientY-e[0].clientY}));else if(this.touches.length>1&&this.touchResize){var n=tr(e,this.$refs.container),o=this.oldGeometricProperties;o.count===n.count&&o.count>1&&this.$emit("resize",new wt({left:o.centerMass.left-n.centerMass.left,top:o.centerMass.top-n.centerMass.top},{factor:o.spread/n.spread,center:n.centerMass})),this.oldGeometricProperties=n}this.touches=e}},processEnd:function(){this.transforming&&(this.transforming=!1,this.$emit("transform-end"))},processStart:function(){this.transforming=!0,this.debouncedProcessEnd.clear()},processEvent:function(t){return this.eventsFilter?this.eventsFilter(t,this.transforming)!==!1:(t.preventDefault(),t.stopPropagation(),!0)},onTouchStart:function(t){if(t.cancelable&&(this.touchMove||this.touchResize&&t.touches.length>1)&&this.processEvent(t)){var e=this.$refs.container,n=e.getBoundingClientRect(),o=n.left,r=n.top,s=n.bottom,a=n.right;this.touches=Ge(t.touches).filter(function(c){return c.clientX>o&&c.clientX<a&&c.clientY>r&&c.clientY<s}),this.oldGeometricProperties=tr(this.touches,e)}},onTouchEnd:function(t){t.touches.length===0&&(this.touches=[],this.processEnd())},onTouchMove:function(t){var e=this;if(this.touches.length){var n=Ge(t.touches).filter(function(o){return!o.identifier||e.touches.find(function(r){return r.identifier===o.identifier})});this.processEvent(t)&&(this.processMove(t,n),this.processStart())}},onMouseDown:function(t){if(this.mouseMove&&"buttons"in t&&t.buttons===1&&this.processEvent(t)){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.processStart()}},onMouseMove:function(t){this.touches.length&&this.processEvent(t)&&this.processMove(t,[{clientX:t.clientX,clientY:t.clientY}])},onMouseUp:function(){this.touches=[],this.processEnd()},onWheel:function(t){if(this.wheelResize&&this.processEvent(t)){var e=this.$refs.container.getBoundingClientRect(),n=e.left,o=e.top,r=1+this.wheelResize.ratio*(a=t.deltaY||t.detail||t.wheelDelta,(c=+a)==0||Lo(c)?c:c>0?1:-1),s={left:t.clientX-n,top:t.clientY-o};this.$emit("resize",new wt({},{factor:r,center:s})),this.touches.length||this.debouncedProcessEnd()}var a,c}},emits:["resize","move","transform-end"]};nr.render=function(t,e,n,o,r,s){return i.openBlock(),i.createBlock("div",{ref:"container",onTouchstart:e[1]||(e[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:e[2]||(e[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)}),onWheel:e[3]||(e[3]=function(){return s.onWheel&&s.onWheel.apply(s,arguments)})},[i.renderSlot(t.$slots,"default")],544)};var _n={components:{TransformableImage:nr},props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0}},emits:["resize","move"]};_n.render=function(t,e,n,o,r,s){var a=i.resolveComponent("transformable-image");return i.openBlock(),i.createBlock(a,{"touch-move":n.touchMove,"touch-resize":n.touchResize,"mouse-move":n.mouseMove,"wheel-resize":n.wheelResize,onMove:e[1]||(e[1]=function(c){return t.$emit("move",c)}),onResize:e[2]||(e[2]=function(c){return t.$emit("resize",c)})},{default:i.withCtx(function(){return[i.renderSlot(t.$slots,"default")]}),_:3},8,["touch-move","touch-resize","mouse-move","wheel-resize"])};var Gt=xe("vue-preview"),ir={props:{coordinates:{type:Object},transitions:{type:Object},image:{type:Object,default:function(){return{}}},imageClass:{type:String},width:{type:Number},height:{type:Number},fill:{type:Boolean}},data:function(){return{calculatedImageSize:{width:0,height:0},calculatedSize:{width:0,height:0}}},computed:{classes:function(){return{root:Gt({fill:this.fill}),wrapper:Gt("wrapper"),imageWrapper:Gt("image-wrapper"),image:K(Gt("image"),this.imageClass)}},style:function(){if(this.fill)return{};var t={};return this.width&&(t.width="".concat(this.size.width,"px")),this.height&&(t.height="".concat(this.size.height,"px")),this.transitions&&this.transitions.enabled&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),t},wrapperStyle:function(){var t={width:"".concat(this.size.width,"px"),height:"".concat(this.size.height,"px"),left:"calc(50% - ".concat(this.size.width/2,"px)"),top:"calc(50% - ".concat(this.size.height/2,"px)")};return this.transitions&&this.transitions.enabled&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),t},imageStyle:function(){if(this.coordinates&&this.image){var t=this.coordinates.width/this.size.width,e=W(W({rotate:0,flip:{horizontal:!1,vertical:!1}},this.image.transforms),{},{scaleX:1/t,scaleY:1/t}),n=this.imageSize.width,o=this.imageSize.height,r=Go({width:n,height:o},e.rotate),s={width:"".concat(n,"px"),height:"".concat(o,"px"),left:"0px",top:"0px"},a={rotate:{left:(n-r.width)*e.scaleX/2,top:(o-r.height)*e.scaleY/2},scale:{left:(1-e.scaleX)*n/2,top:(1-e.scaleY)*o/2}};return s.transform=`translate(
|
|
33
|
-
`.concat(-this.coordinates.left/t-a.rotate.left-a.scale.left,"px,").concat(-this.coordinates.top/t-a.rotate.top-a.scale.top,"px) ")+er(e),this.transitions&&this.transitions.enabled&&(s.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),s}return{}},size:function(){return{width:this.width||this.calculatedSize.width,height:this.height||this.calculatedSize.height}},imageSize:function(){return{width:this.image.width||this.calculatedImageSize.width,height:this.image.height||this.calculatedImageSize.height}}},watch:{image:function(t){(t.width||t.height)&&this.onChangeImage()}},mounted:function(){var t=this;this.onChangeImage(),this.$refs.image.addEventListener("load",function(){t.refreshImage()}),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh)},methods:{refreshImage:function(){var t=this.$refs.image;this.calculatedImageSize.height=t.naturalHeight,this.calculatedImageSize.width=t.naturalWidth},refresh:function(){var t=this.$refs.root;this.width||(this.calculatedSize.width=t.clientWidth),this.height||(this.calculatedSize.height=t.clientHeight)},onChangeImage:function(){var t=this.$refs.image;t&&t.complete&&this.refreshImage(),this.refresh()}}};ir.render=function(t,e,n,o,r,s){return i.openBlock(),i.createBlock("div",{ref:"root",class:s.classes.root,style:s.style},[i.createVNode("div",{ref:"wrapper",class:s.classes.wrapper,style:s.wrapperStyle},[i.withDirectives(i.createVNode("img",{ref:"image",src:n.image&&n.image.src,class:s.classes.image,style:s.imageStyle},null,14,["src"]),[[i.vShow,n.image&&n.image.src]])],6)],6)};var or={components:{Preview:ir},inheritAttrs:!1};or.render=function(t,e,n,o,r,s){var a=i.resolveComponent("preview");return i.openBlock(),i.createBlock(a,i.mergeProps(t.$attrs,{fill:!0}),null,16)};var Hn=xe("vue-rectangle-stencil"),rr={name:"RectangleStencil",components:{StencilPreview:or,BoundingBox:Qo,DraggableArea:Ko},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return Fn}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return Dn}},aspectRatio:{type:[Number,String]},minAspectRatio:{type:[Number,String]},maxAspectRatio:{type:[Number,String]},movable:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},transitions:{type:Object},movingClass:{type:String},resizingClass:{type:String},previewClass:{type:String},boundingBoxClass:{type:String},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}}},data:function(){return{moving:!1,resizing:!1}},computed:{classes:function(){return{stencil:K(Hn({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:K(Hn("preview"),this.previewClass),boundingBox:K(Hn("bounding-box"),this.boundingBoxClass)}},style:function(){var t=this.stencilCoordinates,e=t.height,n=t.width,o=t.left,r=t.top,s={width:"".concat(n,"px"),height:"".concat(e,"px"),transform:"translate(".concat(o,"px, ").concat(r,"px)")};return this.transitions&&this.transitions.enabled&&(s.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),s}},methods:{onMove:function(t){this.$emit("move",t),this.moving=!0},onMoveEnd:function(){this.$emit("move-end"),this.moving=!1},onResize:function(t){this.$emit("resize",t),this.resizing=!0},onResizeEnd:function(){this.$emit("resize-end"),this.resizing=!1},aspectRatios:function(){return{minimum:this.aspectRatio||this.minAspectRatio,maximum:this.aspectRatio||this.maxAspectRatio}}},emits:["resize","resize-end","move","move-end"]};rr.render=function(t,e,n,o,r,s){var a=i.resolveComponent("stencil-preview"),c=i.resolveComponent("draggable-area"),l=i.resolveComponent("bounding-box");return i.openBlock(),i.createBlock("div",{class:s.classes.stencil,style:s.style},[i.createVNode(l,{width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,transitions:n.transitions,class:s.classes.boundingBox,handlers:n.handlers,"handlers-component":n.handlersComponent,"handlers-classes":n.handlersClasses,"handlers-wrappers-classes":n.handlersWrappersClasses,lines:n.lines,"lines-component":n.linesComponent,"lines-classes":n.linesClasses,"lines-wrappers-classes":n.linesWrappersClasses,resizable:n.resizable,onResize:s.onResize,onResizeEnd:s.onResizeEnd},{default:i.withCtx(function(){return[i.createVNode(c,{movable:n.movable,onMove:s.onMove,onMoveEnd:s.onMoveEnd},{default:i.withCtx(function(){return[i.createVNode(a,{image:n.image,coordinates:n.coordinates,width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,class:s.classes.preview,transitions:n.transitions},null,8,["image","coordinates","width","height","class","transitions"])]}),_:1},8,["movable","onMove","onMoveEnd"])]}),_:1},8,["width","height","transitions","class","handlers","handlers-component","handlers-classes","handlers-wrappers-classes","lines","lines-component","lines-classes","lines-wrappers-classes","resizable","onResize","onResizeEnd"])],6)};var pc=["transitions"],Le=xe("vue-advanced-cropper"),sr={name:"Cropper",components:{BackgroundWrapper:_n},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return rr}},backgroundWrapperComponent:{type:[Object,String],default:function(){return _n}},stencilProps:{type:Object,default:function(){return{}}},autoZoom:{type:Boolean,default:!1},imageClass:{type:String},boundariesClass:{type:String},backgroundClass:{type:String},foregroundClass:{type:String},minWidth:{type:[Number,String]},minHeight:{type:[Number,String]},maxWidth:{type:[Number,String]},maxHeight:{type:[Number,String]},debounce:{type:[Boolean,Number],default:500},transitions:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},canvas:{type:[Object,Boolean],default:!0},crossOrigin:{type:[Boolean,String],default:void 0},transitionTime:{type:Number,default:300},imageRestriction:{type:String,default:"fit-area",validator:function(t){return Gl.indexOf(t)!==-1}},roundResult:{type:Boolean,default:!0},defaultSize:{type:[Function,Object]},defaultPosition:{type:[Function,Object]},defaultVisibleArea:{type:[Function,Object]},defaultTransforms:{type:[Function,Object]},defaultBoundaries:{type:[Function,String],validator:function(t){return!(typeof t=="string"&&t!=="fill"&&t!=="fit")}},priority:{type:String,default:"coordinates"},stencilSize:{type:[Object,Function]},resizeImage:{type:[Boolean,Object],default:!0},moveImage:{type:[Boolean,Object],default:!0},autoZoomAlgorithm:{type:Function},resizeAlgorithm:{type:Function,default:function(t){var e=t.event,n=t.coordinates,o=t.aspectRatio,r=t.positionRestrictions,s=t.sizeRestrictions,a=N(N({},n),{right:n.left+n.width,bottom:n.top+n.height}),c=e.params||{},l=N({},e.directions),u=c.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};s.widthFrozen&&(l.left=0,l.right=0),s.heightFrozen&&(l.top=0,l.bottom=0),Ae.forEach(function(F){u[F]||(l[F]=0)});var h=Pe(a,l=Yo({coordinates:a,directions:l,sizeRestrictions:s,positionRestrictions:r})).width,f=Pe(a,l).height,m=c.preserveRatio?j(a):Tn(h/f,o);if(m){var g=c.respectDirection;if(g||(g=a.width>=a.height||m===1?"width":"height"),g==="width"){var p=h/m-a.height;if(u.top&&u.bottom){var E=l.top,w=l.bottom;l.bottom=jt(p,w,E),l.top=jt(p,E,w)}else u.bottom?l.bottom=p:u.top?l.top=p:u.right?l.right=0:u.left&&(l.left=0)}else if(g==="height"){var M=a.width-f*m;if(u.left&&u.right){var O=l.left,L=l.right;l.left=-jt(M,O,L),l.right=-jt(M,L,O)}else u.left?l.left=-M:u.right?l.right=-M:u.top?l.top=0:u.bottom&&(l.bottom=0)}l=Yo({directions:l,coordinates:a,sizeRestrictions:s,positionRestrictions:r,preserveRatio:!0,compensate:c.compensate})}return h=Pe(a,l).width,f=Pe(a,l).height,(m=c.preserveRatio?j(a):Tn(h/f,o))&&Math.abs(m-h/f)>.001&&Ae.forEach(function(F){u[F]||(l[F]=0)}),Vn({event:new An({left:-l.left,top:-l.top}),coordinates:{width:n.width+l.right+l.left,height:n.height+l.top+l.bottom,left:n.left,top:n.top},positionRestrictions:r})}},moveAlgorithm:{type:Function,default:Vn},initStretcher:{type:Function,default:function(t){var e=t.stretcher,n=t.imageSize,o=j(n);e.style.width=n.width+"px",e.style.height=e.clientWidth/o+"px",e.style.width=e.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(t){var e=t.visibleArea,n=t.coordinates,o=t.aspectRatio,r=t.sizeRestrictions,s=t.positionRestrictions,a=N(N({},n),Oe({width:n.width,height:n.height,aspectRatio:o,sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minHeight:Math.min(e.height,r.minHeight),minWidth:Math.min(e.width,r.minWidth)}}));return a=ae(a=he(a,ot(se(n),se(a))),Ut(Ne(e),s))}},fitVisibleArea:{type:Function,default:function(t){var e=t.visibleArea,n=t.boundaries,o=t.getAreaRestrictions,r=t.coordinates,s=N({},e);s.height=s.width/j(n),s.top+=(e.height-s.height)/2,(r.height-s.height>0||r.width-s.width>0)&&(s=Ce(s,Math.max(r.height/s.height,r.width/s.width)));var a=Ht(st(r,Ne(s=Ce(s,qt(s,o({visibleArea:s,type:"resize"}))))));return s.width<r.width&&(a.left=0),s.height<r.height&&(a.top=0),s=ae(s=he(s,a),o({visibleArea:s,type:"move"}))}},areaRestrictionsAlgorithm:{type:Function,default:function(t){var e=t.visibleArea,n=t.boundaries,o=t.imageSize,r=t.imageRestriction,s=t.type,a={};return r==="fill-area"?a={left:0,top:0,right:o.width,bottom:o.height}:r==="fit-area"&&(j(n)>j(o)?(a={top:0,bottom:o.height},e&&s==="move"&&(e.width>o.width?(a.left=-(e.width-o.width)/2,a.right=o.width-a.left):(a.left=0,a.right=o.width))):(a={left:0,right:o.width},e&&s==="move"&&(e.height>o.height?(a.top=-(e.height-o.height)/2,a.bottom=o.height-a.top):(a.top=0,a.bottom=o.height)))),a}},sizeRestrictionsAlgorithm:{type:Function,default:function(t){return{minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight}}},positionRestrictionsAlgorithm:{type:Function,default:function(t){var e=t.imageSize,n={};return t.imageRestriction!=="none"&&(n={left:0,top:0,right:e.width,bottom:e.height}),n}}},data:function(){return{transitionsActive:!1,imageLoaded:!1,imageAttributes:{width:null,height:null,crossOrigin:null,src:null},defaultImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},appliedImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},boundaries:{width:0,height:0},visibleArea:null,coordinates:W({},Uo)}},computed:{image:function(){return{src:this.imageAttributes.src,width:this.imageAttributes.width,height:this.imageAttributes.height,transforms:this.imageTransforms}},imageTransforms:function(){return{rotate:this.appliedImageTransforms.rotate,flip:{horizontal:this.appliedImageTransforms.flip.horizontal,vertical:this.appliedImageTransforms.flip.vertical},translateX:this.visibleArea?this.visibleArea.left/this.coefficient:0,translateY:this.visibleArea?this.visibleArea.top/this.coefficient:0,scaleX:1/this.coefficient,scaleY:1/this.coefficient}},imageSize:function(){var t=function(e){return e*Math.PI/180}(this.imageTransforms.rotate);return{width:Math.abs(this.imageAttributes.width*Math.cos(t))+Math.abs(this.imageAttributes.height*Math.sin(t)),height:Math.abs(this.imageAttributes.width*Math.sin(t))+Math.abs(this.imageAttributes.height*Math.cos(t))}},initialized:function(){return!!(this.visibleArea&&this.imageLoaded)},settings:function(){var t=$n(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:$n(this.moveImage,{touch:!0,mouse:!0},{touch:!1,mouse:!1}),resizeImage:t}},coefficient:function(){return this.visibleArea?this.visibleArea.width/this.boundaries.width:0},areaRestrictions:function(){return this.imageLoaded?this.areaRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction,boundaries:this.boundaries}):{}},transitionsOptions:function(){return{enabled:this.transitionsActive,timingFunction:"ease-in-out",time:350}},sizeRestrictions:function(){if(this.boundaries.width&&this.boundaries.height&&this.imageSize.width&&this.imageSize.height){var t=this.sizeRestrictionsAlgorithm({imageSize:this.imageSize,minWidth:ie(this.minWidth)?0:_t(this.minWidth),minHeight:ie(this.minHeight)?0:_t(this.minHeight),maxWidth:ie(this.maxWidth)?1/0:_t(this.maxWidth),maxHeight:ie(this.maxHeight)?1/0:_t(this.maxHeight)});if(t=function(o){var r=o.areaRestrictions,s=o.sizeRestrictions,a=o.boundaries,c=o.positionRestrictions,l=N(N({},s),{minWidth:s.minWidth!==void 0?s.minWidth:0,minHeight:s.minHeight!==void 0?s.minHeight:0,maxWidth:s.maxWidth!==void 0?s.maxWidth:1/0,maxHeight:s.maxHeight!==void 0?s.maxHeight:1/0});c.left!==void 0&&c.right!==void 0&&(l.maxWidth=Math.min(l.maxWidth,c.right-c.left)),c.bottom!==void 0&&c.top!==void 0&&(l.maxHeight=Math.min(l.maxHeight,c.bottom-c.top));var u=zn(r),h=jo(a,u);return u.width<1/0&&(!l.maxWidth||l.maxWidth>h.width)&&(l.maxWidth=Math.min(l.maxWidth,h.width)),u.height<1/0&&(!l.maxHeight||l.maxHeight>h.height)&&(l.maxHeight=Math.min(l.maxHeight,h.height)),l.minWidth>l.maxWidth&&(l.minWidth=l.maxWidth,l.widthFrozen=!0),l.minHeight>l.maxHeight&&(l.minHeight=l.maxHeight,l.heightFrozen=!0),l}({sizeRestrictions:t,areaRestrictions:this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}),imageSize:this.imageSize,boundaries:this.boundaries,positionRestrictions:this.positionRestrictions,imageRestriction:this.imageRestriction,visibleArea:this.visibleArea,stencilSize:this.getStencilSize()}),this.visibleArea&&this.stencilSize){var e=this.getStencilSize(),n=zn(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));t.maxWidth=Math.min(t.maxWidth,n.width*e.width/this.boundaries.width),t.maxHeight=Math.min(t.maxHeight,n.height*e.height/this.boundaries.height),t.maxWidth<t.minWidth&&(t.minWidth=t.maxWidth),t.maxHeight<t.minHeight&&(t.minHeight=t.maxHeight)}return t}return{minWidth:0,minHeight:0,maxWidth:0,maxHeight:0}},positionRestrictions:function(){return this.positionRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction})},classes:function(){return{cropper:Le(),image:K(Le("image"),this.imageClass),stencil:Le("stencil"),boundaries:K(Le("boundaries"),this.boundariesClass),stretcher:K(Le("stretcher")),background:K(Le("background"),this.backgroundClass),foreground:K(Le("foreground"),this.foregroundClass),imageWrapper:K(Le("image-wrapper")),cropperWrapper:K(Le("cropper-wrapper"))}},stencilCoordinates:function(){if(this.initialized){var t=this.coordinates,e=t.width,n=t.height,o=t.left,r=t.top;return{width:e/this.coefficient,height:n/this.coefficient,left:(o-this.visibleArea.left)/this.coefficient,top:(r-this.visibleArea.top)/this.coefficient}}return this.defaultCoordinates()},boundariesStyle:function(){var t={width:this.boundaries.width?"".concat(Math.round(this.boundaries.width),"px"):"auto",height:this.boundaries.height?"".concat(Math.round(this.boundaries.height),"px"):"auto",transition:"opacity ".concat(this.transitionTime,"ms"),pointerEvents:this.imageLoaded?"all":"none"};return this.imageLoaded||(t.opacity="0"),t},imageStyle:function(){var t=this.imageAttributes.width>this.imageAttributes.height?{width:Math.min(1024,this.imageAttributes.width),height:Math.min(1024,this.imageAttributes.width)/(this.imageAttributes.width/this.imageAttributes.height)}:{height:Math.min(1024,this.imageAttributes.height),width:Math.min(1024,this.imageAttributes.height)*(this.imageAttributes.width/this.imageAttributes.height)},e={left:(t.width-this.imageSize.width)/(2*this.coefficient),top:(t.height-this.imageSize.height)/(2*this.coefficient)},n={left:(1-1/this.coefficient)*t.width/2,top:(1-1/this.coefficient)*t.height/2},o=W(W({},this.imageTransforms),{},{scaleX:this.imageTransforms.scaleX*(this.imageAttributes.width/t.width),scaleY:this.imageTransforms.scaleY*(this.imageAttributes.height/t.height)}),r={width:"".concat(t.width,"px"),height:"".concat(t.height,"px"),left:"0px",top:"0px",transform:"translate(".concat(-e.left-n.left-this.imageTransforms.translateX,"px, ").concat(-e.top-n.top-this.imageTransforms.translateY,"px)")+er(o)};return this.transitionsOptions.enabled&&(r.transition="".concat(this.transitionsOptions.time,"ms ").concat(this.transitionsOptions.timingFunction)),r}},watch:{src:function(){this.onChangeImage()},stencilComponent:function(){var t=this;this.$nextTick(function(){t.resetCoordinates(),t.runAutoZoom("setCoordinates"),t.onChange()})},minWidth:function(){this.onPropsChange()},maxWidth:function(){this.onPropsChange()},minHeight:function(){this.onPropsChange()},maxHeight:function(){this.onPropsChange()},imageRestriction:function(){this.reset()},stencilProps:function(t,e){["aspectRatio","minAspectRatio","maxAspectRatio"].find(function(n){return t[n]!==e[n]})&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=Rn(this.update,this.debounce),this.debouncedDisableTransitions=Rn(this.disableTransitions,this.transitionsOptions.time),this.awaiting=!1},mounted:function(){this.$refs.image.addEventListener("load",this.onSuccessLoadImage),this.$refs.image.addEventListener("error",this.onFailLoadImage),this.onChangeImage(),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh),this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.debouncedUpdate.clear(),this.debouncedDisableTransitions.clear()},methods:{getResult:function(){var t=this.initialized?this.prepareResult(W({},this.coordinates)):this.defaultCoordinates(),e={rotate:this.imageTransforms.rotate%360,flip:W({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var n=this;return{image:this.image,coordinates:t,visibleArea:this.visibleArea?W({},this.visibleArea):null,imageTransforms:e,get canvas(){return n.canvas?n.getCanvas():void 0}}}return{image:this.image,coordinates:t,visibleArea:this.visibleArea?W({},this.visibleArea):null,canvas:void 0,imageTransforms:e}},zoom:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.transitions,r=o===void 0||o;this.onManipulateImage(new wt({},{factor:1/t,center:e}),{normalize:!1,transitions:r})},move:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.transitions,r=o===void 0||o;this.onManipulateImage(new wt({left:t||0,top:e||0}),{normalize:!1,transitions:r})},setCoordinates:function(t){var e=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=n.autoZoom,r=o===void 0||o,s=n.transitions,a=s===void 0||s;this.$nextTick(function(){e.imageLoaded?(e.transitionsActive||(a&&e.enableTransitions(),e.coordinates=e.applyTransform(t),r&&e.runAutoZoom("setCoordinates"),a&&e.debouncedDisableTransitions()),e.onChange()):e.delayedTransforms=t})},refresh:function(){var t=this,e=this.$refs.image;if(this.src&&e)return this.initialized?this.updateVisibleArea().then(function(){t.onChange()}):this.resetVisibleArea().then(function(){t.onChange()})},reset:function(){var t=this;return this.resetVisibleArea().then(function(){t.onChange(!1)})},awaitRender:function(t){var e=this;this.awaiting||(this.awaiting=!0,this.$nextTick(function(){t(),e.awaiting=!1}))},prepareResult:function(t){return this.roundResult?function(e){var n=e.coordinates,o=e.sizeRestrictions,r=e.positionRestrictions,s={width:Math.round(n.width),height:Math.round(n.height),left:Math.round(n.left),top:Math.round(n.top)};return s.width>o.maxWidth?s.width=Math.floor(n.width):s.width<o.minWidth&&(s.width=Math.ceil(n.width)),s.height>o.maxHeight?s.height=Math.floor(n.height):s.height<o.minHeight&&(s.height=Math.ceil(n.height)),ae(s,r)}(W(W({},this.getPublicProperties()),{},{positionRestrictions:Wt(this.positionRestrictions,this.visibleArea),coordinates:t})):t},processAutoZoom:function(t,e,n,o){var r=this.autoZoomAlgorithm;r||(r=this.stencilSize?Jl:this.autoZoom?Yl:Ql);var s=r({event:{type:t,params:o},visibleArea:e,coordinates:n,boundaries:this.boundaries,aspectRatio:this.getAspectRatio(),positionRestrictions:this.positionRestrictions,getAreaRestrictions:this.getAreaRestrictions,sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize()});return W(W({},s),{},{changed:!Wo(s.visibleArea,e)||!Wo(s.coordinates,n)})},runAutoZoom:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.transitions,o=n!==void 0&&n,r=Ol(e,pc),s=this.processAutoZoom(t,this.visibleArea,this.coordinates,r),a=s.visibleArea,c=s.coordinates,l=s.changed;o&&l&&this.enableTransitions(),this.visibleArea=a,this.coordinates=c,o&&l&&this.debouncedDisableTransitions()},normalizeEvent:function(t){return function(e){var n=e.event,o=e.visibleArea,r=e.coefficient;if(n.type==="manipulateImage")return N(N({},n),{move:{left:n.move&&n.move.left?r*n.move.left:0,top:n.move&&n.move.top?r*n.move.top:0},scale:{factor:n.scale&&n.scale.factor?n.scale.factor:1,center:n.scale&&n.scale.center?{left:n.scale.center.left*r+o.left,top:n.scale.center.top*r+o.top}:null}});if(n.type==="resize"){var s=N(N({},n),{directions:N({},n.directions)});return Ae.forEach(function(c){s.directions[c]*=r}),s}if(n.type==="move"){var a=N(N({},n),{directions:N({},n.directions)});return jl.forEach(function(c){a.directions[c]*=r}),a}return n}(W(W({},this.getPublicProperties()),{},{event:t}))},getCanvas:function(){if(this.$refs.canvas){var t=this.$refs.canvas,e=this.$refs.image,n=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?function(c,l,u){var h=u.rotate,f=u.flip,m={width:l.naturalWidth,height:l.naturalHeight},g=Go(m,h),p=c.getContext("2d");c.height=g.height,c.width=g.width,p.save();var E=qe(se(N({left:0,top:0},m)),h);return p.translate(-(E.left-g.width/2),-(E.top-g.height/2)),p.rotate(h*Math.PI/180),p.translate(f.horizontal?m.width:0,f.vertical?m.height:0),p.scale(f.horizontal?-1:1,f.vertical?-1:1),p.drawImage(l,0,0,m.width,m.height),p.restore(),c}(this.$refs.sourceCanvas,e,this.imageTransforms):e,o=W({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),r=function(c){return c.find(function(l){return u=l,!Number.isNaN(parseFloat(u))&&isFinite(u);var u})},s=Oe({sizeRestrictions:{minWidth:r([o.width,o.minWidth])||0,minHeight:r([o.height,o.minHeight])||0,maxWidth:r([o.width,o.maxWidth])||1/0,maxHeight:r([o.height,o.maxHeight])||1/0},width:this.coordinates.width,height:this.coordinates.height,aspectRatio:{minimum:this.coordinates.width/this.coordinates.height,maximum:this.coordinates.width/this.coordinates.height}});if(o.maxArea&&s.width*s.height>o.maxArea){var a=Math.sqrt(o.maxArea/(s.width*s.height));s={width:Math.round(a*s.width),height:Math.round(a*s.height)}}return function(c,l,u,h,f){c.width=h?h.width:u.width,c.height=h?h.height:u.height;var m=c.getContext("2d");m.clearRect(0,0,c.width,c.height),f&&(f.imageSmoothingEnabled&&(m.imageSmoothingEnabled=f.imageSmoothingEnabled),f.imageSmoothingQuality&&(m.imageSmoothingQuality=f.imageSmoothingQuality),f.fillColor&&(m.fillStyle=f.fillColor,m.fillRect(0,0,c.width,c.height),m.save()));var g=u.left<0?-u.left:0,p=u.top<0?-u.top:0;m.drawImage(l,u.left+g,u.top+p,u.width,u.height,g*(c.width/u.width),p*(c.height/u.height),c.width,c.height)}(t,n,this.coordinates,s,o),t}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(t){var e=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.visibleArea&&e?Zl(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,o=this.visibleArea&&e?Wt(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return Xl({transform:t,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:n,positionRestrictions:o,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var t=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var e=this.defaultSize;e||(e=this.stencilSize?tc:ec);var n=this.sizeRestrictions;n.minWidth,n.minHeight,n.maxWidth,n.maxHeight;var o=it(e)?e({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):e,r=this.defaultPosition||Kl,s=[o,function(a){var c=a.coordinates;return W({},it(r)?r({coordinates:c,imageSize:t.imageSize,visibleArea:t.visibleArea}):t.defaultPosition)}];this.delayedTransforms&&s.push.apply(s,Ge(Array.isArray(this.delayedTransforms)?this.delayedTransforms:[this.delayedTransforms])),this.coordinates=this.applyTransform(s,!0),this.delayedTransforms=null}},clearImage:function(){var t=this;this.imageLoaded=!1,setTimeout(function(){var e=t.$refs.stretcher;e&&(e.style.height="auto",e.style.width="auto"),t.coordinates=t.defaultCoordinates(),t.boundaries={width:0,height:0}},this.transitionTime)},enableTransitions:function(){this.transitions&&(this.transitionsActive=!0)},disableTransitions:function(){this.transitionsActive=!1},updateBoundaries:function(){var t=this,e=this.$refs.stretcher,n=this.$refs.cropper;return this.initStretcher({cropper:n,stretcher:e,imageSize:this.imageSize}),this.$nextTick().then(function(){var o={cropper:n,imageSize:t.imageSize};if(it(t.defaultBoundaries)?t.boundaries=t.defaultBoundaries(o):t.defaultBoundaries==="fit"?t.boundaries=function(r){var s=r.cropper,a=r.imageSize,c=s.clientHeight,l=s.clientWidth,u=c,h=a.width*c/a.height;return h>l&&(h=l,u=a.height*l/a.width),{width:h,height:u}}(o):t.boundaries=function(r){var s=r.cropper;return{width:s.clientWidth,height:s.clientHeight}}(o),!t.boundaries.width||!t.boundaries.height)throw new Error("It's impossible to fit the cropper in the current container")})},resetVisibleArea:function(){var t=this;return this.appliedImageTransforms=W(W({},this.defaultImageTransforms),{},{flip:W({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then(function(){t.priority!=="visible-area"&&(t.visibleArea=null,t.resetCoordinates());var e,n,o,r,s,a,c=t.defaultVisibleArea||nc;t.visibleArea=it(c)?c({imageSize:t.imageSize,boundaries:t.boundaries,coordinates:t.priority!=="visible-area"?t.coordinates:null,getAreaRestrictions:t.getAreaRestrictions,stencilSize:t.getStencilSize()}):t.defaultVisibleArea,t.visibleArea=(e={visibleArea:t.visibleArea,boundaries:t.boundaries,getAreaRestrictions:t.getAreaRestrictions},n=e.visibleArea,o=e.boundaries,r=e.getAreaRestrictions,s=N({},n),a=j(o),s.width/s.height!==a&&(s.height=s.width/a),ae(s,r({visibleArea:s,type:"move"}))),t.priority==="visible-area"?t.resetCoordinates():t.coordinates=t.fitCoordinates({visibleArea:t.visibleArea,coordinates:t.coordinates,aspectRatio:t.getAspectRatio(),positionRestrictions:t.positionRestrictions,sizeRestrictions:t.sizeRestrictions}),t.runAutoZoom("resetVisibleArea")}).catch(function(){t.visibleArea=null})},updateVisibleArea:function(){var t=this;return this.updateBoundaries().then(function(){t.visibleArea=t.fitVisibleArea({imageSize:t.imageSize,boundaries:t.boundaries,visibleArea:t.visibleArea,coordinates:t.coordinates,getAreaRestrictions:t.getAreaRestrictions}),t.coordinates=t.fitCoordinates({visibleArea:t.visibleArea,coordinates:t.coordinates,aspectRatio:t.getAspectRatio(),positionRestrictions:t.positionRestrictions,sizeRestrictions:t.sizeRestrictions}),t.runAutoZoom("updateVisibleArea")}).catch(function(){t.visibleArea=null})},onChange:function(){var t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];t&&this.debounce?this.debouncedUpdate():this.update()},onChangeImage:function(){var t,e=this;if(this.imageLoaded=!1,this.delayedTransforms=null,this.src){if(function(r){if(Do(r))return!1;var s=window.location,a=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(r)||[],c={protocol:a[1]||"",host:a[2]||"",port:a[3]||""},l=function(u){return u.port||((u.protocol||s.protocol)==="http"?80:433)};return!(!c.protocol&&!c.host&&!c.port||c.protocol&&c.protocol==s.protocol&&c.host&&c.host==s.host&&c.host&&l(c)==l(s))}(this.src)){var n=ie(this.crossOrigin)?this.canvas:this.crossOrigin;n===!0&&(n="anonymous"),this.imageAttributes.crossOrigin=n||null}if(this.checkOrientation){var o=(t=this.src,new Promise(function(r){fc(t).then(function(s){var a=mc(s);r(s?{source:t,arrayBuffer:s,orientation:a}:{source:t,arrayBuffer:null,orientation:null})}).catch(function(s){console.warn(s),r({source:t,arrayBuffer:null,orientation:null})})}));setTimeout(function(){o.then(e.onParseImage)},this.transitionTime)}else setTimeout(function(){e.onParseImage({source:e.src})},this.transitionTime)}else this.clearImage()},onFailLoadImage:function(){this.imageAttributes.src&&(this.clearImage(),this.$emit("error"))},onSuccessLoadImage:function(){var t=this,e=this.$refs.image;e&&!this.imageLoaded&&(this.imageAttributes.height=e.naturalHeight,this.imageAttributes.width=e.naturalWidth,this.imageLoaded=!0,this.resetVisibleArea().then(function(){t.$emit("ready"),t.onChange(!1)}))},onParseImage:function(t){var e=this,n=t.source,o=t.arrayBuffer,r=t.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,o&&r&&r>1?Fo(n)||!Do(n)?(this.imageAttributes.src=URL.createObjectURL(new Blob([o])),this.imageAttributes.revoke=!0):this.imageAttributes.src=function(s){for(var a=[],c=new Uint8Array(s);c.length>0;){var l=c.subarray(0,8192);a.push(String.fromCharCode.apply(null,Array.from?Array.from(l):l.slice())),c=c.subarray(8192)}return"data:image/jpeg;base64,"+btoa(a.join(""))}(o):this.imageAttributes.src=n,it(this.defaultTransforms)?this.appliedImageTransforms=Ln(this.defaultTransforms()):Lt(this.defaultTransforms)?this.appliedImageTransforms=Ln(this.defaultTransforms):this.appliedImageTransforms=function(s){var a=Ln({});if(s)switch(s){case 2:a.flip.horizontal=!0;break;case 3:a.rotate=-180;break;case 4:a.flip.vertical=!0;break;case 5:a.rotate=90,a.flip.vertical=!0;break;case 6:a.rotate=90;break;case 7:a.rotate=90,a.flip.horizontal=!0;break;case 8:a.rotate=-90}return a}(r),this.defaultImageTransforms=W(W({},this.appliedImageTransforms),{},{flip:W({},this.appliedImageTransforms.flip)}),this.$nextTick(function(){var s=e.$refs.image;s&&s.complete&&(function(a){return!!a.naturalWidth}(s)?e.onSuccessLoadImage():e.onFailLoadImage())})},onResizeEnd:function(){this.runAutoZoom("resize",{transitions:!0})},onMoveEnd:function(){this.runAutoZoom("move",{transitions:!0})},onMove:function(t){var e=this;this.transitionsOptions.enabled||this.awaitRender(function(){e.coordinates=e.moveAlgorithm(W(W({},e.getPublicProperties()),{},{positionRestrictions:Wt(e.positionRestrictions,e.visibleArea),coordinates:e.coordinates,event:e.normalizeEvent(t)})),e.onChange()})},onResize:function(t){var e=this;this.transitionsOptions.enabled||this.stencilSize&&!this.autoZoom||this.awaitRender(function(){var n=e.sizeRestrictions,o=Math.min(e.coordinates.width,e.coordinates.height,20*e.coefficient);e.coordinates=e.resizeAlgorithm(W(W({},e.getPublicProperties()),{},{positionRestrictions:Wt(e.positionRestrictions,e.visibleArea),sizeRestrictions:{maxWidth:Math.min(n.maxWidth,e.visibleArea.width),maxHeight:Math.min(n.maxHeight,e.visibleArea.height),minWidth:Math.max(n.minWidth,o),minHeight:Math.max(n.minHeight,o)},event:e.normalizeEvent(t)})),e.onChange(),e.ticking=!1})},onManipulateImage:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.transitionsOptions.enabled){var n=e.transitions,o=n!==void 0&&n,r=e.normalize,s=r===void 0||r;o&&this.enableTransitions();var a=ic(W(W({},this.getPublicProperties()),{},{event:s?this.normalizeEvent(t):t,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),c=a.visibleArea,l=a.coordinates;this.visibleArea=c,this.coordinates=l,this.runAutoZoom("manipulateImage"),this.onChange(),o&&this.debouncedDisableTransitions()}},onPropsChange:function(){this.coordinates=this.applyTransform(this.coordinates,!0),this.onChange(!1)},getAreaRestrictions:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.visibleArea,n=t.type,o=n===void 0?"move":n;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:e,type:o})},getAspectRatio:function(t){var e,n,o=this.stencilProps,r=o.aspectRatio,s=o.minAspectRatio,a=o.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var c=this.$refs.stencil.aspectRatios();e=c.minimum,n=c.maximum}if(ie(e)&&(e=ie(r)?s:r),ie(n)&&(n=ie(r)?a:r),!t&&(ie(e)||ie(n))){var l=this.getStencilSize(),u=l?j(l):null;ie(e)&&(e=Oo(u)?u:void 0),ie(n)&&(n=Oo(u)?u:void 0)}return{minimum:e,maximum:n}},getStencilSize:function(){if(this.stencilSize)return t={currentStencilSize:{width:this.stencilCoordinates.width,height:this.stencilCoordinates.height},stencilSize:this.stencilSize,boundaries:this.boundaries,coefficient:this.coefficient,coordinates:this.coordinates,aspectRatio:this.getAspectRatio(!0)},e=t.boundaries,n=t.stencilSize,o=t.aspectRatio,Tn(j(r=it(n)?n({boundaries:e,aspectRatio:o}):n),o)&&(r=Oe({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:o.minimum,maximum:o.maximum}})),(r.width>e.width||r.height>e.height)&&(r=Oe({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:j(r),maximum:j(r)}})),r;var t,e,n,o,r},getPublicProperties:function(){return{coefficient:this.coefficient,visibleArea:this.visibleArea,coordinates:this.coordinates,boundaries:this.boundaries,sizeRestrictions:this.sizeRestrictions,positionRestrictions:this.positionRestrictions,aspectRatio:this.getAspectRatio(),imageRestriction:this.imageRestriction}},defaultCoordinates:function(){return W({},Uo)},flip:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.transitions,r=o===void 0||o;if(!this.transitionsActive){r&&this.enableTransitions();var s=W({},this.imageTransforms.flip),a=rc({flip:{horizontal:t?!s.horizontal:s.horizontal,vertical:e?!s.vertical:s.vertical},previousFlip:s,rotate:this.imageTransforms.rotate,visibleArea:this.visibleArea,coordinates:this.coordinates,imageSize:this.imageSize,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),c=a.visibleArea,l=a.coordinates;t&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),e&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=c,this.coordinates=l,this.onChange(),r&&this.debouncedDisableTransitions()}},rotate:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.transitions,o=n===void 0||n;if(!this.transitionsActive){o&&this.enableTransitions();var r=W({},this.imageSize);this.appliedImageTransforms.rotate+=t;var s=oc({visibleArea:this.visibleArea,coordinates:this.coordinates,previousImageSize:r,imageSize:this.imageSize,angle:t,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),a=s.visibleArea,c=s.coordinates,l=this.processAutoZoom("rotateImage",a,c);a=l.visibleArea,c=l.coordinates,this.visibleArea=a,this.coordinates=c,this.onChange(),o&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},gc={key:0,ref:"canvas",style:{display:"none"}},yc={key:1,ref:"sourceCanvas",style:{display:"none"}};sr.render=function(t,e,n,o,r,s){return i.openBlock(),i.createBlock("div",{ref:"cropper",class:s.classes.cropper},[i.createVNode("div",{ref:"stretcher",class:s.classes.stretcher},null,2),i.createVNode("div",{class:s.classes.boundaries,style:s.boundariesStyle},[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.backgroundWrapperComponent),{class:s.classes.cropperWrapper,"wheel-resize":s.settings.resizeImage.wheel,"touch-resize":s.settings.resizeImage.touch,"touch-move":s.settings.moveImage.touch,"mouse-move":s.settings.moveImage.mouse,onMove:s.onManipulateImage,onResize:s.onManipulateImage},{default:i.withCtx(function(){return[i.createVNode("div",{class:s.classes.background,style:s.boundariesStyle},null,6),i.createVNode("div",{class:s.classes.imageWrapper},[i.createVNode("img",{ref:"image",crossorigin:r.imageAttributes.crossOrigin,src:r.imageAttributes.src,class:s.classes.image,style:s.imageStyle,onMousedown:e[1]||(e[1]=i.withModifiers(function(){},["prevent"]))},null,46,["crossorigin","src"])],2),i.createVNode("div",{class:s.classes.foreground,style:s.boundariesStyle},null,6),i.withDirectives((i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.stencilComponent),i.mergeProps({ref:"stencil",image:s.image,coordinates:r.coordinates,"stencil-coordinates":s.stencilCoordinates,transitions:s.transitionsOptions},n.stencilProps,{onResize:s.onResize,onResizeEnd:s.onResizeEnd,onMove:s.onMove,onMoveEnd:s.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[i.vShow,r.imageLoaded]]),n.canvas?(i.openBlock(),i.createBlock("canvas",gc,null,512)):i.createCommentVNode("",!0),n.canvas?(i.openBlock(),i.createBlock("canvas",yc,null,512)):i.createCommentVNode("",!0)]}),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const wc={class:"background-container"},bc={class:"tools-line"},Cc={class:"line-block"},Sc={class:"dialog-footer"},ar=x(i.defineComponent({__name:"ImageCropper",props:{open:{type:Boolean,required:!0},defaultRatio:{type:Number,required:!1,default:1}},emits:["crop","close"],setup(t,{emit:e}){const n=t,o=e,r=S.S.Cropper.Cropper(),s=i.ref(n.defaultRatio);r.ratio=s.value;const a=async()=>{s.value===0?r.ratio=0:r.ratio=s.value},c=i.ref({width:0,height:0,left:0,top:0}),l=i.ref(!1),u=i.ref(""),h=i.ref(),f=async()=>{l.value=!0;const g=h.value.getResult();r.ratio===0&&(s.value=c.value.width/c.value.height),g&&g.canvas.toBlob(p=>{var E;o("crop",{blob:p,src:(E=g.canvas)==null?void 0:E.toDataURL()})}),l.value=!1},m=g=>{var p;c.value=g.coordinates,u.value=(p=g.canvas)==null?void 0:p.toDataURL()};return(g,p)=>{const E=i.resolveComponent("PSelect"),w=i.resolveComponent("el-form-item"),M=i.resolveComponent("el-form"),O=i.resolveComponent("el-button"),L=i.resolveComponent("PModal");return i.openBlock(),i.createBlock(L,{show:t.open,title:"Настройка изображения","close-on-click-modal":!1,"close-on-press-escape":!1,"show-close":!1},{default:i.withCtx(()=>[i.createElementVNode("div",wc,[i.createElementVNode("div",bc,[i.createElementVNode("div",Cc,[i.createVNode(M,null,{default:i.withCtx(()=>[i.createVNode(w,{label:"Задайте пропорции фото:"},{default:i.withCtx(()=>[i.createVNode(E,{modelValue:i.unref(s),"onUpdate:modelValue":p[0]||(p[0]=F=>i.isRef(s)?s.value=F:null),label:"Пропорции изображения",onChange:a},{default:i.withCtx(()=>p[1]||(p[1]=[i.createElementVNode("option",{label:"2:3 (формат A4)",value:2/3},null,-1),i.createElementVNode("option",{label:"4:3 (для карточек новостей)",value:4/3},null,-1),i.createElementVNode("option",{label:"1:1 (для фото сотрудников)",value:1},null,-1),i.createElementVNode("option",{label:"3:2",value:3/2},null,-1),i.createElementVNode("option",{label:"16:9",value:16/9},null,-1),i.createElementVNode("option",{label:"3:4 (вертикальное изображение)",value:3/4},null,-1),i.createElementVNode("option",{label:"Задать пропорции вручную",value:0},null,-1)])),_:1},8,["modelValue"])]),_:1})]),_:1})])]),i.createVNode(i.unref(sr),{ref_key:"cropperRef",ref:h,src:i.unref(r).src,"stencil-props":{aspectRatio:i.unref(r).ratio},style:{"max-height":"50vh","min-height":"50vh"},onChange:m},null,8,["src","stencil-props"]),i.createElementVNode("div",Sc,[i.createVNode(O,{loading:i.unref(l),type:"success",onClick:f},{default:i.withCtx(()=>p[2]||(p[2]=[i.createTextVNode(" Сохранить ")])),_:1},8,["loading"])])])]),_:1},8,["show"])}}}),[["__scopeId","data-v-b2600930"]]),kc={key:0,class:"blur"},Ec={style:{display:"flex","justify-content":"center"}},Zt=x(i.defineComponent({__name:"InfoItem",props:{background:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},width:{type:String,required:!1,default:""},openWidth:{type:String,required:!1,default:"auto"},openHeight:{type:String,required:!1,default:"auto"},maxWidth:{type:String,required:!1,default:""},minWidth:{type:String,required:!1,default:""},margin:{type:String,required:!1,default:""},height:{type:String,required:!1,default:""},withOpenWindow:{type:Boolean,required:!1,default:!0},colorSelected:{type:String,required:!1,default:"#1979CF"},borderColor:{type:String,required:!1,default:"#E3E3E3"},withHover:{type:Boolean,required:!1,default:!0},title:{type:String,required:!1,default:""},customClass:{type:String,required:!1,default:""},close:{type:Boolean,required:!1,default:!0},baseBoxMargin:{type:String,required:!1,default:""},closeWindowOverflow:{type:String,required:!1,default:""},showSaveDialog:{type:Boolean,required:!1,default:!1}},emits:["click","keyup-enter","after-close"],setup(t,{emit:e}){const n=t,o=e,r=n.customClass!==""?n.customClass:"inside-class",s=i.ref(!1),a=i.ref(!1),c=i.ref(!1),l=i.ref(n.close);i.watch(()=>n.close,()=>{a.value=!1});const u=F=>{F.stopPropagation(),F.key==="Escape"&&(n.showSaveDialog?c.value=!0:a.value=!1)};i.watch(a,async()=>{var F,T;await i.nextTick(),a.value?((T=(F=document.getElementById("info-item-opened-content"))==null?void 0:F.querySelector("input"))==null||T.focus(),document.body.addEventListener("keydown",u)):document.body.removeEventListener("keydown",u,!1),a.value===!1&&o("after-close")});const h=()=>{o("click"),a.value=!!n.withOpenWindow,l.value!==n.close&&(a.value=!1,l.value=!l.value)},f=i.computed(()=>n.customClass===""?{width:n.width,minHeight:"40px",height:"auto",maxWidth:n.maxWidth,minWidth:n.minWidth,margin:n.baseBoxMargin}:void 0),m=i.computed(()=>a.value&&n.withOpenWindow),g=i.computed(()=>({background:n.background?n.background:void 0,zIndex:m.value?"2":"0",padding:m.value?"0":n.padding,margin:n.margin,width:m.value?n.openWidth:n.width,height:m.value?n.openHeight:n.height,minHeight:"40px",maxWidth:n.maxWidth,minWidth:n.minWidth,borderColor:s.value||a.value?n.colorSelected:n.borderColor,color:s.value?n.colorSelected:"#343E5C",boxShadow:s.value||a.value?`0px 0px 1px 1px ${n.colorSelected}`:"none",alignItems:m.value?"end":"center",cursor:(n.withHover,"pointer")})),p=i.computed(()=>({height:m.value?"0":"",overflow:n.closeWindowOverflow,width:n.width})),E=i.computed(()=>({height:m.value?"auto":"0"})),w=i.computed(()=>({color:s.value?n.colorSelected:"#343E5C",fill:s.value?n.colorSelected:"#343E5C",background:n.background})),M=()=>{n.showSaveDialog?c.value=!0:a.value=!1},O=async()=>{await o("keyup-enter"),n.close&&(a.value=!1),c.value=!1},L=()=>{a.value=!1,c.value=!1};return(F,T)=>{const we=i.resolveComponent("PString"),ke=i.resolveComponent("PButton"),je=i.resolveComponent("PModal"),pt=i.resolveDirective("click-outside");return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.unref(a)?(i.openBlock(),i.createElementBlock("div",kc)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"base-box",style:i.normalizeStyle(i.unref(f)),onClick:T[2]||(T[2]=i.withModifiers(Sn=>h(),["prevent","stop"]))},[i.createElementVNode("div",{class:i.normalizeClass(["body",i.unref(r)]),style:i.normalizeStyle(i.unref(g)),onMouseenter:T[0]||(T[0]=Sn=>t.withHover?s.value=!0:s.value=!1),onMouseleave:T[1]||(T[1]=Sn=>s.value=!1)},[i.unref(a)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["close-window",t.customClass]),style:i.normalizeStyle(i.unref(p))},[i.renderSlot(F.$slots,"default",{},void 0,!0)],6)),i.unref(a)?i.withDirectives((i.openBlock(),i.createElementBlock("div",{key:1,id:"info-item-opened-content",class:"open-window",style:i.normalizeStyle(i.unref(E))},[i.renderSlot(F.$slots,"open-inside-content",{},void 0,!0)],4)),[[pt,M,void 0,{prevent:!0}]]):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"top-title",style:i.normalizeStyle(i.unref(w))},[i.renderSlot(F.$slots,"title",{},()=>[i.createVNode(we,{string:t.title,"font-size":"10px",padding:"0 0 0 3px",style:i.normalizeStyle({color:i.unref(s)?"#006BB4":"#c4c4c4",transition:"0.2s"})},null,8,["string","style"])],!0)],4)],38)],4),i.createVNode(je,{show:i.unref(c),title:"У вас остались несохраненные изменения, вы уверены что хотите закрыть окно?"},{default:i.withCtx(()=>[i.createElementVNode("div",Ec,[i.createVNode(ke,{text:"Не сохранять",onClick:L}),i.createVNode(ke,{text:"Сохранять",onClick:O})])]),_:1},8,["show"])],64)}}}),[["__scopeId","data-v-e8e8f1a1"]]),lr=x(i.defineComponent({__name:"InfoItemSelectButtons",props:{selected:{type:String,required:!0},title:{type:String,required:!0},list:{type:Array,required:!0}},emits:["select","reset"],setup(t,{emit:e}){const n=i.ref(!1),o=e,r=s=>{n.value=!n.value,o("select",s)};return(s,a)=>{const c=i.resolveComponent("PString"),l=i.resolveComponent("PButton"),u=i.resolveComponent("InfoItem");return i.openBlock(),i.createBlock(u,{close:i.unref(n),title:t.title,"close-window-overflow":"hidden","with-hover":!0,"with-open-window":!0},{"open-inside-content":i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.list,h=>(i.openBlock(),i.createBlock(l,{key:h,type:"admin",color:"blue",text:h,onClick:f=>r(h)},null,8,["text","onClick"]))),128)),i.createVNode(l,{type:"admin",color:"blue",text:"Сбросить",onClick:a[0]||(a[0]=h=>r(void 0))})]),default:i.withCtx(()=>[i.createVNode(c,{string:t.selected,"font-size":"14px",width:"100%"},null,8,["string"])]),_:1},8,["close","title"])}}}),[["__scopeId","data-v-973addd1"]]),vc={class:"mainblock"},xc={class:"mainline"},cr=x(i.defineComponent({__name:"LeftRightContainer",props:{leftWidth:{type:String,required:!1,default:"0px"},background:{type:String,required:!1,default:"inherit"}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",vc,[i.createElementVNode("div",xc,[i.createElementVNode("div",{class:"mainblock-left",style:i.normalizeStyle({minWidth:t.leftWidth,maxWidth:t.leftWidth,background:t.background,display:t.leftWidth!=="0px"?"block":"none"})},[i.renderSlot(e.$slots,"left",{},void 0,!0)],4),i.createElementVNode("div",{class:"mainblock-right",style:i.normalizeStyle({background:t.background})},[i.renderSlot(e.$slots,"right",{},void 0,!0)],4)])]))}}),[["__scopeId","data-v-42fa7104"]]),Bc={class:"message-title"},Mc={class:"message-text"},dr=x(i.defineComponent({__name:"MessageBody",props:{title:{type:String,default:"",required:!1},text:{type:String,default:"",required:!1}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",null,[i.createElementVNode("div",Bc,i.toDisplayString(t.title),1),i.createElementVNode("div",Mc,i.toDisplayString(t.text),1)]))}}),[["__scopeId","data-v-182d0640"]]),Ic=i.defineComponent({name:"CollapseContainer",props:{initActiveIdx:{type:Number,default:0}},setup(t){const e=i.ref(t.initActiveIdx),n=o=>{e.value=o};return i.watch(()=>t.initActiveIdx,()=>{n(t.initActiveIdx)}),{changeActiveId:n,activeIdx:e}}});function Rc(t,e,n,o,r,s){return i.openBlock(),i.createElementBlock("div",null,[i.renderSlot(t.$slots,"default",{activeIdx:t.activeIdx,changeActiveId:t.changeActiveId})])}const ur=x(Ic,[["render",Rc]]),$c=i.defineComponent({name:"CollapseItem",props:{tabId:{type:String,required:!1,default:""},activeId:{type:String,default:""},isCollaps:{type:Boolean,default:!0},title:{type:String,default:""},showToolsOnHover:{type:Boolean,default:!0},background:{type:String,required:!1,default:"#ffffff"},backgroundAttention:{type:String,required:!1,default:"#ffffff"},changeColor:{type:Boolean,default:!1},margin:{type:String,default:"10px 8px 2px 2px"},padding:{type:String,default:"0 10px"},selectable:{type:Boolean,default:!1}},emits:["changeActiveId"],setup(t,{emit:e}){const n=i.ref(t.activeId==="0"),o=()=>{n.value=!n.value,e("changeActiveId",t.tabId)};return i.onUpdated(()=>{t.activeId&&t.activeId!==t.tabId&&(n.value=!0)}),i.onBeforeMount(()=>{t.activeId&&t.activeId!==t.tabId&&(n.value=!1)}),{collapsed:n,handleItemClick:o}}}),Ac=["for"],Nc={class:"inside-icon"};function Pc(t,e,n,o,r,s){return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",{class:"tab",style:i.normalizeStyle({margin:t.margin,height:t.isCollaps&&t.collapsed?"60px":"","box-shadow":t.selectable&&t.activeId===t.tabId?"0px 0px 1px 2px #1979cf":""})},[t.isCollaps&&t.collapsed?(i.openBlock(),i.createElementBlock("svg",{key:0,class:"icon-arrow",onClick:e[0]||(e[0]=(...a)=>t.handleItemClick&&t.handleItemClick(...a))},e[3]||(e[3]=[i.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)]))):t.isCollaps&&!t.collapsed?(i.openBlock(),i.createElementBlock("svg",{key:1,class:"icon-arrow",onClick:e[1]||(e[1]=(...a)=>t.handleItemClick&&t.handleItemClick(...a))},e[4]||(e[4]=[i.createElementVNode("use",{"xlink:href":"#arrow-up"},null,-1)]))):i.createCommentVNode("",!0),i.createElementVNode("label",{for:t.tabId,onClick:e[2]||(e[2]=(...a)=>t.handleItemClick&&t.handleItemClick(...a))},[i.createElementVNode("div",{style:i.normalizeStyle({cursor:t.isCollaps?"pointer":"default",background:t.changeColor?t.background:t.backgroundAttention,padding:t.padding,borderRadius:"5px"}),class:"tab-name"},[i.createElementVNode("div",Nc,[i.renderSlot(t.$slots,"icon",{},void 0,!0)]),t.title?(i.openBlock(),i.createElementBlock("div",{key:0,class:"title-in",style:i.normalizeStyle({marginRight:t.isCollaps?"50px":"0",width:t.isCollaps?"calc(100% - 50px)":"100%"})},i.toDisplayString(t.title),5)):(i.openBlock(),i.createElementBlock("div",{key:1,class:"title-in",style:i.normalizeStyle({marginRight:t.isCollaps?"50px":"0",width:t.isCollaps?"calc(100% - 50px)":"100%"})},[i.renderSlot(t.$slots,"inside-title",{},void 0,!0)],4)),i.createElementVNode("div",{class:i.normalizeClass(["tools-bar",{"hidden-part":t.showToolsOnHover}])},[i.renderSlot(t.$slots,"tools",{},void 0,!0)],2)],4)],8,Ac),i.createElementVNode("div",{style:i.normalizeStyle({maxHeight:t.isCollaps?"":"1000000vh",background:t.changeColor?t.background:t.backgroundAttention}),class:i.normalizeClass(t.collapsed?"tab-content-down":"tab-content-up")},[i.renderSlot(t.$slots,"inside-content",{},void 0,!0)],6)],4),e[5]||(e[5]=i.createStaticVNode('<svg width="0" height="0" class="hidden" data-v-0ea9a95f><symbol id="arrow-down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-0ea9a95f><path d="M5 6L10 11L15 6L17 7L10 14L3 7L5 6Z" fill="currentColor" data-v-0ea9a95f></path></symbol><symbol id="arrow-up" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-0ea9a95f><path d="M15 14L10 9L5 14L3 13L10 6L17 13L15 14Z" fill="currentColor" data-v-0ea9a95f></path></symbol></svg>',1))],64)}const hr=x($c,[["render",Pc],["__scopeId","data-v-0ea9a95f"]]),Tc={class:"tab"},zc={class:"rotate"},fr=x(i.defineComponent({__name:"VerticalCollapseContainer",setup(t){const e=i.ref(!1),n=async()=>{e.value=!e.value};return(o,r)=>{const s=i.resolveComponent("ArrowRight"),a=i.resolveComponent("ArrowLeft");return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",Tc,[i.renderSlot(o.$slots,"main",{},void 0,!0),i.createElementVNode("div",{style:i.normalizeStyle({width:i.unref(e)?"50%":"20px",transition:"0.3s"}),class:"left"},[i.createElementVNode("div",{style:i.normalizeStyle({width:i.unref(e)?"100%":"0",transition:"0.3s"}),class:"left-content"},[i.renderSlot(o.$slots,"inside-content-left",{},void 0,!0)],4),i.createElementVNode("div",{class:"arrow-bar",onClick:n},[i.createElementVNode("div",zc,[i.renderSlot(o.$slots,"inside-title",{},void 0,!0)]),i.unref(e)?(i.openBlock(),i.createBlock(s,{key:0,"icon-class":"icon-arrow"})):(i.openBlock(),i.createBlock(a,{key:1,"icon-class":"icon-arrow"}))])],4),i.createElementVNode("div",{style:i.normalizeStyle({width:i.unref(e)?"50%":"100%",transition:"0.3s"}),class:"right"},[i.renderSlot(o.$slots,"inside-content-right",{},void 0,!0)],4)]),i.createVNode(a),i.createVNode(s)],64)}}}),[["__scopeId","data-v-4ccaade5"]]),Vc={class:"add-block_body"},mr=x(i.defineComponent({__name:"PAdd",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"0"},padding:{type:String,required:!1,default:"0"},top:{type:String,required:!1,default:"0"},zIndex:{type:Number,required:!1,default:0}},setup(t){return(e,n)=>{const o=i.resolveComponent("PSticky");return i.openBlock(),i.createElementBlock("div",{class:"add-block",style:i.normalizeStyle({margin:t.margin,background:t.background,padding:t.padding})},[i.createVNode(o,{top:t.top,"z-index":t.zIndex},{default:i.withCtx(()=>[i.renderSlot(e.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),i.createElementVNode("div",Vc,[i.renderSlot(e.$slots,"default",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-338720bc"]]),pr=x(i.defineComponent({__name:"PContainer",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"0"},padding:{type:String,required:!1,default:"0"}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:"add-block",style:i.normalizeStyle({margin:t.margin,background:t.background,padding:t.padding})},[i.renderSlot(e.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-b2b43a38"]]),Fc={class:"add-block_body"},gr=x(i.defineComponent({__name:"PContainerStickyHead",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"0"},padding:{type:String,required:!1,default:"0"},top:{type:String,required:!1,default:"0"},zIndex:{type:Number,required:!1,default:0}},setup(t){return(e,n)=>{const o=i.resolveComponent("PSticky"),r=i.resolveComponent("PContainer");return i.openBlock(),i.createBlock(r,{background:t.background,margin:t.margin,padding:t.padding},{default:i.withCtx(()=>[i.createVNode(o,{top:t.top,"z-index":t.zIndex},{default:i.withCtx(()=>[i.renderSlot(e.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),i.createElementVNode("div",Fc,[i.renderSlot(e.$slots,"default",{},void 0,!0)])]),_:3},8,["background","margin","padding"])}}}),[["__scopeId","data-v-9464e4a8"]]),Dc={class:"del-block_title"},Oc={class:"del-block_body"},yr=x(i.defineComponent({__name:"PDel",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"10px 10px 10px 50px"},padding:{type:String,required:!1,default:"10px"}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:"del-block",style:i.normalizeStyle({margin:t.margin,background:t.background,padding:t.padding})},[i.createElementVNode("div",Dc,[i.renderSlot(e.$slots,"title",{},void 0,!0)]),i.createElementVNode("div",Oc,[i.renderSlot(e.$slots,"default",{},void 0,!0)])],4))}}),[["__scopeId","data-v-58d048aa"]]),Lc={class:"btn-group"},wr=x(i.defineComponent({__name:"AuthForm",props:{width:{type:String,default:"300px"},margin:{type:String,default:"auto"},padding:{type:String,default:"60px 100px"}},emits:["submit"],setup(t,{emit:e}){const n=S.Auth.Form,o=i.ref(!1),r=e,s=i.computed(()=>n.GetButtons()),a=async c=>{await S.Auth.Form.Block(async()=>{if(!c.submit)return n.SetStatus(c.GetStatus());const l=n.Validate();if(l.length>0){S.UI.Notify.Error(l.join(", "));return}r("submit")})};return i.onBeforeUnmount(()=>{n.Reset()}),(c,l)=>{const u=i.resolveComponent("PInput"),h=i.resolveComponent("PButton");return i.openBlock(),i.createElementBlock("div",{class:"auth-card",style:i.normalizeStyle({width:t.width,margin:t.margin,padding:t.padding})},[i.createElementVNode("div",null,i.toDisplayString(("PF"in c?c.PF:i.unref(S)).Auth.Form.GetTitle()),1),i.createElementVNode("div",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(("PF"in c?c.PF:i.unref(S)).Auth.Form.GetFields(),f=>(i.openBlock(),i.createBlock(u,{id:f.id,key:f,modelValue:f.value,"onUpdate:modelValue":m=>f.value=m,placeholder:f.label,margin:"10px 0 0 0"},null,8,["id","modelValue","onUpdate:modelValue","placeholder"]))),128)),i.createVNode(h,{type:"primary",skin:"text_ano",text:"Забыли пароль?",width:"124px",margin:"0 0 0 5px"}),i.createElementVNode("div",Lc,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(s),f=>(i.openBlock(),i.createBlock(h,{id:f.id,key:f.GetStatus(),disabled:i.unref(o),type:"primary",skin:"base",text:f.text,color:f.submit?"blue":"grey",margin:"10px 0 0 0",width:"100%",height:"52px",onClick:m=>a(f)},null,8,["id","disabled","text","color","onClick"]))),128))])])],4)}}}),[["__scopeId","data-v-6625500f"]]),br=x(i.defineComponent({__name:"PModal",props:{showCloseDialog:{type:Boolean,required:!1,default:!1},closable:{type:Boolean,required:!1,default:!1},show:{type:Boolean,default:!1},title:{type:String,default:""},width:{type:String,default:"760px"},margin:{type:String,default:"auto"},top:{type:String,default:"20vh"},padding:{type:String,default:"var(--modal-window-padding)"},showClose:{type:Boolean,default:!1}},emits:["save","close"],setup(t,{emit:e}){const n=t,o=e,r=a=>{a.key==="Escape"&&s()};i.onMounted(()=>{document.body.addEventListener("keydown",r)}),i.onBeforeUnmount(()=>{document.body.removeEventListener("keydown",r)});const s=()=>{n.closable&&o("close")};return(a,c)=>{const l=i.resolveComponent("IconClose");return i.openBlock(),i.createElementBlock(i.Fragment,null,[t.show?(i.openBlock(),i.createElementBlock("div",{key:0,class:"blur",onClick:s})):i.createCommentVNode("",!0),t.show?(i.openBlock(),i.createElementBlock("div",{key:1,class:"modal-w",style:i.normalizeStyle({maxWidth:t.width,width:t.width,margin:t.margin,padding:t.padding,top:t.top})},[t.closable?(i.openBlock(),i.createElementBlock("div",{key:0,class:"icon-box",onClick:s},[i.createVNode(l,{size:"20px"})])):i.createCommentVNode("",!0),i.renderSlot(a.$slots,"default",{},void 0,!0)],4)):i.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-5082ab52"]]),_c=["onClick"],Cr=x(i.defineComponent({__name:"PTabs",props:{store:{type:Object,required:!0},tabHeight:{type:String,required:!1,default:"40px"},height:{type:String,required:!1,default:""},minMenuItemWidth:{type:String,required:!1,default:"150px"},outTopMargin:{type:String,required:!1,default:"40px"},background:{type:String,required:!1,default:"#ffffff"}},emits:["select"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(window.innerWidth),s=i.ref(),a=i.ref(Number(n.tabHeight.replace(/[^+\d]/g,""))),c=()=>{r.value=window.innerWidth,a.value=s.value?s.value.clientHeight:Number(n.tabHeight.replace(/[^+\d]/g,""))};i.onMounted(()=>window.addEventListener("resize",c)),i.onUnmounted(()=>window.removeEventListener("resize",c));const l=i.computed(()=>`calc(100% - ${a.value}px + 1px)`);i.onBeforeMount(()=>{n.store.preSelectTab()});const u=(h,f)=>{n.store.select(h,f),o("select",h)};return(h,f)=>(i.openBlock(),i.createElementBlock("div",{class:"mainblock",style:i.normalizeStyle({height:`calc(100% - ${t.outTopMargin} - ${t.tabHeight}`})},[i.createElementVNode("div",{ref_key:"menuRef",ref:s,class:"top-menu",style:i.normalizeStyle({gridTemplateColumns:`repeat(auto-fit, minmax(${t.minMenuItemWidth}, 1fr))`})},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.store.tabs,(m,g)=>(i.openBlock(),i.createElementBlock("div",{key:g},[i.createElementVNode("div",{class:i.normalizeClass({"selected-tab":g===t.store.activeIdx,tab:g!==t.store.activeIdx}),style:i.normalizeStyle({minHeight:t.tabHeight,maxHeight:t.tabHeight}),onClick:p=>u(m,g)},i.toDisplayString(m.name),15,_c)]))),128))],4),i.createElementVNode("div",{class:"body-container",style:i.normalizeStyle({background:t.background,height:i.unref(l)})},[i.renderSlot(h.$slots,"default",{},()=>[t.store.activeTab?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(t.store.activeTab.component),{key:0})):i.createCommentVNode("",!0)],!0)],4)],4))}}),[["__scopeId","data-v-e4035dcf"]]);class qn{static Setup(e){this.staticUrl=e}static get StaticUrl(){return this.staticUrl}}d(qn,"staticUrl","");class Be{constructor(e){d(this,"name","");d(this,"url","");d(this,"src","");d(this,"raw");d(this,"blob");d(this,"file");d(this,"id");d(this,"originalName","");d(this,"fileSystemPath","");V.BuildClass(this,e)}getFileUrl(){const e=this.url?this.url:`${qn.StaticUrl}/${this.fileSystemPath}`;return new URL(e,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Ee&&Ee.tagName.toUpperCase()==="SCRIPT"&&Ee.src||new URL("sprof.umd.cjs",document.baseURI).href)}getFileListObject(){return{name:this.originalName,url:this.url}}static CreatePreviewFile(e,n){const o=new Be;return o.id=n??ve.UUID(),o.originalName=e.name,o.file=e.blob,o.fileSystemPath=ve.UUID(),o}uploadNewFile(e){this.id||(this.id=ve.UUID()),this.originalName=e.name,this.file=e.blob,this.fileSystemPath=ve.UUID()}setFile(e){this.file=e,this.url=e.src}uploadAndSetFile(e){this.uploadNewFile(e),this.setFile(e),this.url=e.url}clearFile(){this.url="",this.file=void 0,this.fileSystemPath="",this.originalName=""}errorImg(e,n){if(e.target){let o="";return n&&(o=`@/assets/img/${n}`),new URL(o,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Ee&&Ee.tagName.toUpperCase()==="SCRIPT"&&Ee.src||new URL("sprof.umd.cjs",document.baseURI).href)}}getFileInfos(){return[this]}isPdf(){return this.getExtension(this.originalName)===""}getExtension(e){const n=e.split(".");return n[n.length-1]}}const Hc=["id"],qc=["for"],Uc={class:"left-field"},Wc=["href","download"],jc={key:1,class:"text-field__input"},Gc={class:"right-field"},Zc=i.defineComponent({__name:"UploaderFile",props:{fileInfo:{type:Object,required:!1,default:new Be},formats:{type:Array,default:()=>["pdf","jpeg","jpg"]},label:{type:String,default:"Label",required:!1},margin:{type:String,required:!1,default:"10px 0 0 0"},disabled:{type:Boolean,required:!1,default:!1},padding:{type:String,default:"",required:!1},mask:{type:String,required:!1,default:void 0},borderColor:{type:String,default:"var(--input-border-color)",required:!1},color:{type:String,default:"var(--input-font-color)",required:!1},placeholder:{type:String,required:!1,default:""}},emits:["upload","remove"],setup(t,{emit:e}){const n=t,o=e,r=S.H.Id.GUID(),s=S.H.Id.GUID(),a=()=>{const u=document.getElementById(r);if(!u.files)return;const h=u.files[0];if(h){if(!l(h.name)){S.UI.Notify.Error("Загруженный файл должен быть в формате pdf, jpg или jpeg");return}n.fileInfo.uploadAndSetFile(h),o("upload",n.fileInfo)}},c=()=>{n.fileInfo.clearFile(),o("remove",n.fileInfo)};i.onMounted(()=>{const u=document.getElementById(s);u&&(u.onclick=()=>{var h;return(h=document.getElementById(r))==null?void 0:h.click()})});const l=u=>{let h=S.H.Extension.Get(u);return!!n.formats.includes(h.toLowerCase())};return(u,h)=>{const f=i.resolveComponent("PString"),m=i.resolveComponent("PFlex"),g=i.resolveComponent("PButton");return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("input",{id:i.unref(r),type:"file",hidden:"",onChange:a},null,40,Hc),i.createElementVNode("div",{class:"text-field",style:i.normalizeStyle({margin:t.margin,padding:t.padding})},[t.label?(i.openBlock(),i.createElementBlock("label",{key:0,class:"text-field__label",for:t.label},i.toDisplayString(t.label),9,qc)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"field",style:i.normalizeStyle({borderColor:t.borderColor})},[i.createElementVNode("div",Uc,[i.createVNode(m,null,{default:i.withCtx(()=>[i.renderSlot(u.$slots,"default",{},void 0,!0),i.createVNode(f,{string:t.placeholder,"font-size":"var(--font-size-default:)",color:"var(--input-label-color)",margin:"0 10px 0 0"},null,8,["string"])]),_:3})]),t.fileInfo&&t.fileInfo.originalName?(i.openBlock(),i.createElementBlock("div",{key:0,class:"text-field__input",style:i.normalizeStyle({color:t.color})},[i.createElementVNode("a",{href:t.fileInfo.getFileUrl(),target:"_blank",download:t.fileInfo.originalName},[i.createElementVNode("div",null,i.toDisplayString(t.fileInfo.originalName),1)],8,Wc),i.createVNode(g,{skin:"text",type:"del",onClick:c},{default:i.withCtx(()=>[i.createVNode(Ft,{size:"20px",margin:"0 5px"})]),_:1})],4)):(i.openBlock(),i.createElementBlock("div",jc,[i.createVNode(f,{string:"Файл не загружен","font-size":"var(--inpur-font-size-default)",color:"var(--palette-warning)",margin:"0 10px 0 0"})])),i.createElementVNode("div",Gc,[i.createVNode(g,{id:i.unref(s),skin:"text",type:"success","data-test":"upload-btn",text:t.fileInfo&&t.fileInfo.originalName?"Обновить":"Загрузить",margin:"0"},null,8,["id","text"])])],4)],4)],64)}}}),Sr=x(Zc,[["__scopeId","data-v-cacad4ae"]]),Xc={class:"bg"},Un=x(i.defineComponent({__name:"AuthPage",setup(t){const e=()=>{S.Auth.Form.IsLogin()&&S.H.Router.ToHome()};return(n,o)=>{const r=i.resolveComponent("AuthForm");return i.openBlock(),i.createElementBlock("div",Xc,[i.createVNode(r,{width:"760px",margin:"0 auto",onAction:e})])}}}),[["__scopeId","data-v-c3e2f5bc"]]),Jc={},Yc={style:{"text-align":"center"}};function Qc(t,e){return i.openBlock(),i.createElementBlock("div",Yc,e[0]||(e[0]=[i.createElementVNode("h1",null,"Страница не найдена",-1)]))}const Wn=x(Jc,[["render",Qc]]),Kc={class:"container"},ed={key:0,class:"result"},td={class:"list"},nd=["onClick"],kr=x(i.defineComponent({inheritAttrs:!1,__name:"PAutocomplete",props:{modelValue:{type:String,default:""},searchFunc:{type:Function,default:()=>{}},suggestions:{type:Array,default:[]}},emits:["select","input"],setup(t,{emit:e}){const n=e,o=t,r=i.ref(o.modelValue),s=i.ref([]);async function a(){n("input",r.value),await c()}async function c(){o.searchFunc&&(s.value=await o.searchFunc(r.value))}async function l(u){n("select",u)}return(u,h)=>{const f=i.resolveComponent("IconSearch"),m=i.resolveComponent("PInput");return i.openBlock(),i.createElementBlock("div",Kc,[i.createVNode(m,{modelValue:i.unref(r),"onUpdate:modelValue":h[0]||(h[0]=g=>i.isRef(r)?r.value=g:null),placeholder:"Найти",onInput:a},{right:i.withCtx(()=>[i.createVNode(f)]),_:1},8,["modelValue"]),i.unref(r)?(i.openBlock(),i.createElementBlock("div",ed,[i.createElementVNode("ul",td,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(s),g=>(i.openBlock(),i.createElementBlock("li",{key:g.value,onClick:p=>l(g)},i.toDisplayString(g.label),9,nd))),128))])])):i.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-67b698bb"]]),id={class:"footer"},Er=x(i.defineComponent({__name:"PDialog",setup(t){const e=i.computed(()=>{switch(S.UI.Dialog.GetType()){case"info":return"message primary";case"success":return"message success";case"warning":return"message warning";case"error":return"message danger";default:return"message neutral"}});return(n,o)=>{const r=i.resolveComponent("MessageBody"),s=i.resolveComponent("PButton");return i.openBlock(),i.createBlock(i.Transition,{name:"fade"},{default:i.withCtx(()=>[("PF"in n?n.PF:i.unref(S)).UI.Dialog.IsVisible()?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(i.unref(e))},[i.createVNode(r,{title:("PF"in n?n.PF:i.unref(S)).UI.Dialog.GetTitle(),text:("PF"in n?n.PF:i.unref(S)).UI.Dialog.GetText()},null,8,["title","text"]),i.createElementVNode("div",id,[i.createVNode(s,{type:"primary",text:("PF"in n?n.PF:i.unref(S)).UI.Dialog.GetConfirmButtonText(),margin:"10px 0 0 0",onClick:o[0]||(o[0]=a=>("PF"in n?n.PF:i.unref(S)).UI.Dialog.Submit())},null,8,["text"]),i.createVNode(s,{type:"warning",text:("PF"in n?n.PF:i.unref(S)).UI.Dialog.GetCancelButtonText(),margin:"10px 0 0 0",onClick:o[1]||(o[1]=a=>("PF"in n?n.PF:i.unref(S)).UI.Dialog.Cancel())},null,8,["text"])])],2)):i.createCommentVNode("",!0)]),_:1})}}}),[["__scopeId","data-v-bf4d379c"]]),vr=x(i.defineComponent({__name:"PhoneForm",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(t){const e=i.useModel(t,"modelValue"),n=async()=>{await S.S.Phones.Update(e.value)};return(o,r)=>{const s=i.resolveComponent("PInput");return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(s,{modelValue:e.value.number,"onUpdate:modelValue":r[0]||(r[0]=a=>e.value.number=a),onBlur:n},null,8,["modelValue"]),i.createVNode(s,{modelValue:e.value.description,"onUpdate:modelValue":r[1]||(r[1]=a=>e.value.description=a),onBlur:n},null,8,["modelValue"])],64)}}}),[["__scopeId","data-v-f801a76e"]]),od={};function rd(t,e){return i.openBlock(),i.createElementBlock(i.Fragment,null,[e[0]||(e[0]=i.createElementVNode("div",{class:"blur"},null,-1)),e[1]||(e[1]=i.createElementVNode("div",{class:"loader-container"},[i.createElementVNode("div",{class:"loader",style:{"--b":"20px",width:"200px","--n":"10"}})],-1))],64)}const xr=x(od,[["render",rd],["__scopeId","data-v-0f1f2f84"]]),Br=x(i.defineComponent({__name:"PNotification",setup(t){const e=i.computed(()=>{switch(S.UI.Notify.GetType()){case"info":return"message info";case"success":return"message success";case"warning":return"message warning";case"error":return"message error";default:return"message neutral"}});return(n,o)=>{const r=i.resolveComponent("MessageBody");return i.openBlock(),i.createBlock(i.Transition,{name:"fade"},{default:i.withCtx(()=>[("PF"in n?n.PF:i.unref(S)).UI.Notify.IsVisible()?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(i.unref(e))},[i.createVNode(r,{title:("PF"in n?n.PF:i.unref(S)).UI.Notify.GetTitle(),text:("PF"in n?n.PF:i.unref(S)).UI.Notify.GetText()},null,8,["title","text"])],2)):i.createCommentVNode("",!0)]),_:1})}}}),[["__scopeId","data-v-6d245bd5"]]),sd={style:{display:"flex","justify-content":"center",width:"100%"}},ad={class:"pag-number"},ld={class:"pag-ul"},cd={key:2},Mr=x(i.defineComponent({__name:"PPagination",props:{showConfirm:{type:Boolean,default:!1},justifyContent:{type:String,default:"center"},store:{type:Object,required:!0}},emits:["cancel","save"],setup(t,{emit:e}){const n=t,o=g=>g?"active":"neutral",r=g=>g?"not-active":"neutral",s=S.Paginator,a=i.ref(!1),c=i.ref(!1),l=e;s.count=n.store.Count().value;const u=async g=>{if(g!==s.curPage){if(g<1&&(g=1),g>s.pagesCount()&&(g=s.pagesCount()),!n.showConfirm)return await h(g);S.UI.Dialog.Save().then(async()=>{l("save"),await h(g)}).catch(async()=>{S.UI.Notify.Warning("Изменения не были сохранены"),l("cancel"),await h(g)})}},h=async(g,p)=>{s.setCurPage(g),S.H.FTSP.Get().p.offset=(g-1)*s.limit,await n.store.FTSP(),m()},f=i.computed(()=>{const g=s.pagesCount();return g<8?S.H.Arrays.GenerateNumsRange(2,g-1).filter(p=>p<g&&p>1):S.H.Arrays.GenerateNumsRange(s.curPage-2,s.curPage+3).filter(p=>p<g&&p>1)}),m=()=>{const g=document.querySelector(".el-table__body-wrapper"),p=document.querySelector("#list");g?g.scrollTo({top:0}):p&&p.scrollTo({top:0})};return i.onBeforeUnmount(()=>{S.H.FTSP.Get().p.drop()}),(g,p)=>{const E=i.resolveComponent("ArrowLeft"),w=i.resolveComponent("PButton"),M=i.resolveComponent("DoubleArrowLeft"),O=i.resolveComponent("EllipsisSvg"),L=i.resolveComponent("DoubleArrowRight"),F=i.resolveComponent("ArrowRight");return i.openBlock(),i.createElementBlock("div",sd,[i.createElementVNode("div",{class:"pag-container",style:i.normalizeStyle({justifyContent:t.justifyContent})},[i.createElementVNode("div",ad,[i.createVNode(w,{skin:"pag",type:r(i.unref(s).curPage===1),onClick:p[0]||(p[0]=T=>u(i.unref(s).curPage-1))},{default:i.withCtx(()=>[i.createVNode(E)]),_:1},8,["type"]),i.createElementVNode("ul",ld,[i.createElementVNode("li",null,[i.createVNode(w,{skin:"pag",type:o(i.unref(s).curPage===1),text:"1",onClick:p[1]||(p[1]=T=>u(1))},null,8,["type"])]),i.unref(s).pagesCount()>8&&i.unref(s).curPage>4?(i.openBlock(),i.createElementBlock("li",{key:0,onMouseenter:p[3]||(p[3]=T=>a.value=!0),onMouseleave:p[4]||(p[4]=T=>a.value=!1)},[i.createVNode(w,{skin:"pag",type:"neutral",onClick:p[2]||(p[2]=T=>u(i.unref(s).curPage-5))},{default:i.withCtx(()=>[i.unref(a)?(i.openBlock(),i.createBlock(M,{key:0})):(i.openBlock(),i.createBlock(O,{key:1}))]),_:1})],32)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(f),T=>(i.openBlock(),i.createElementBlock("li",{key:T},[i.createVNode(w,{skin:"pag",type:o(T===i.unref(s).curPage),text:T,onClick:we=>u(T)},null,8,["type","text","onClick"])]))),128)),i.unref(s).pagesCount()>=8&&i.unref(s).curPage<i.unref(s).pagesCount()-3?(i.openBlock(),i.createElementBlock("li",{key:1,onMouseenter:p[6]||(p[6]=T=>c.value=!0),onMouseleave:p[7]||(p[7]=T=>c.value=!1)},[i.createVNode(w,{skin:"pag",type:"neutral",onClick:p[5]||(p[5]=T=>u(i.unref(s).curPage+5))},{default:i.withCtx(()=>[i.unref(c)?(i.openBlock(),i.createBlock(L,{key:0})):(i.openBlock(),i.createBlock(O,{key:1}))]),_:1})],32)):i.createCommentVNode("",!0),i.unref(s).pagesCount()>1?(i.openBlock(),i.createElementBlock("li",cd,[i.createVNode(w,{skin:"pag",type:o(i.unref(s).pagesCount()===i.unref(s).curPage),text:i.unref(s).pagesCount(),onClick:p[8]||(p[8]=T=>u(i.unref(s).pagesCount()))},null,8,["type","text"])])):i.createCommentVNode("",!0)]),i.createVNode(w,{skin:"pag",type:r(i.unref(s).curPage===i.unref(s).pagesCount()),onClick:p[9]||(p[9]=T=>u(i.unref(s).curPage+1))},{default:i.withCtx(()=>[i.createVNode(F)]),_:1},8,["type"])])],4)])}}}),[["__scopeId","data-v-1dc3c2c2"]]),Ir=x(i.defineComponent({__name:"RemoteSearch",props:{keyValue:{type:String,default:""},modelValue:{type:String,default:""},storeModule:{type:String,default:""},placeholder:{type:String,default:"Начните вводить запрос"},showSuggestions:{type:Boolean,default:!0},maxWidth:{type:[Number,String],default:350},focus:{type:Boolean,default:!1}},emits:["select","load","input"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(n.modelValue),s=i.ref(),a=S.S.Search.SearchModel();i.watch(()=>n.focus,()=>{n.focus&&setTimeout(()=>{s.value.focus(),r.value=""},500)});const c=async h=>{if(h.length<2)return;s.value.activated=!0,a.searchObjects=[],a.query=h,a.key=n.keyValue;const f=a.searchGroups.find(m=>m.key===n.keyValue);return f&&(a.searchGroup=f),await S.S.Search.Search(a),a.searchObjects},l=async h=>{o("select",h),r.value=""},u=h=>{o("input",h),h.length===0&&o("input","")};return(h,f)=>{const m=i.resolveComponent("PAutocomplete");return i.openBlock(),i.createBlock(m,{ref_key:"searchForm",ref:s,modelValue:i.unref(r),"onUpdate:modelValue":f[0]||(f[0]=g=>i.isRef(r)?r.value=g:null),"value-key":"label",style:{width:"100%","margin-right":"10px"},placeholder:t.placeholder,"search-func":c,"trigger-on-focus":t.showSuggestions,suggestions:i.unref(a).searchObjects,onSelect:l,onInput:u},{suffix:i.withCtx(()=>f[1]||(f[1]=[i.createElementVNode("i",{class:"el-icon-search"},null,-1)])),_:1},8,["modelValue","placeholder","trigger-on-focus","suggestions"])}}}),[["__scopeId","data-v-d3138f3a"]]),dd={class:"mainblock-body"},ud={class:"mainblock-footer"},Rr=x(i.defineComponent({__name:"ResearcheContainer",props:{background:{type:String,required:!1,default:"inherit"},padding:{type:String,required:!1,default:"0px 10px"}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:"mainblock",style:i.normalizeStyle({background:t.background,padding:t.padding})},[i.createElementVNode("div",{class:"mainblock-header",style:i.normalizeStyle({background:t.background})},[i.renderSlot(e.$slots,"header",{},void 0,!0)],4),i.createElementVNode("div",dd,[i.renderSlot(e.$slots,"body",{},void 0,!0)]),i.createElementVNode("div",ud,[i.renderSlot(e.$slots,"footer",{},void 0,!0)])],4))}}),[["__scopeId","data-v-367c3367"]]),hd={class:"right-slider-content"},fd={class:"right-slider-content-header"},md={class:"right-slider-content-box"},pd={class:"right-slider-button"},$r=x(i.defineComponent({__name:"RightSliderContainer",props:{sliderOffWidth:{type:String,required:!1,default:"30px"},sliderOnWidth:{type:String,required:!1,default:"260px"},background:{type:String,required:!1,default:"inherit"},toggle:{type:Boolean,default:!1},titleOpen:{type:String,required:!1,default:"Скрыть список исследований"},titleClose:{type:String,required:!1,default:"Показать список исследований"}},emits:["toggle"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(!1);i.watch(()=>n.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("toggle",a)};return(a,c)=>{const l=i.resolveComponent("PString");return i.openBlock(),i.createElementBlock("div",{class:"right-slider",style:i.normalizeStyle({marginRight:i.unref(r)?`calc(${t.sliderOffWidth} - ${t.sliderOnWidth})`:"0",width:t.sliderOnWidth})},[i.createElementVNode("div",{class:"click-line",onClick:c[0]||(c[0]=u=>s(!i.unref(r)))},[i.unref(r)?(i.openBlock(),i.createBlock(l,{key:0,string:t.titleClose,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"])):i.createCommentVNode("",!0),i.unref(r)?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(l,{key:1,string:t.titleOpen,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"]))]),i.createElementVNode("div",hd,[i.createElementVNode("div",fd,[i.renderSlot(a.$slots,"header",{},void 0,!0)]),i.createElementVNode("div",md,[i.renderSlot(a.$slots,"default",{},void 0,!0)])]),i.createElementVNode("div",pd,[i.renderSlot(a.$slots,"button",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-262b1c53"]]),gd={class:"mainblock"},yd={class:"body-block"},wd={class:"tab-block"},Ar=x(i.defineComponent({__name:"RightTabsContainer",props:{sliderOffWidth:{type:String,required:!1,default:"101px"},sliderOnWidth:{type:String,required:!1,default:"332px"},background:{type:String,required:!1,default:"inherit"},isToggle:{type:Boolean,required:!1,default:!1},mobileWidth:{type:String,required:!1,default:"768px"}},emits:["toggle"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(!1),s=i.ref(window.matchMedia("(max-width: 768px)").matches),a=l=>{o("toggle",l)},c=i.ref(!1);return i.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(n.mobileWidth){case"1330px":return s.value=window.matchMedia("(max-width: 1330px)").matches;case"1215px":return s.value=window.matchMedia("(max-width: 1215px)").matches;case"1024px":return s.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return s.value=window.matchMedia("(max-width: 768px)").matches}return s.value=window.matchMedia("(max-width: 1330px)").matches}),r.value=!0}),(l,u)=>(i.openBlock(),i.createElementBlock("div",gd,[i.createElementVNode("div",{class:"slider-block",style:i.normalizeStyle({marginRight:i.unref(s)?t.isToggle?"49px":`calc(49px - ${t.sliderOnWidth})`:t.isToggle?t.sliderOffWidth:`calc(${t.sliderOffWidth} - ${t.sliderOnWidth})`,width:t.sliderOnWidth,minHeight:t.sliderOffWidth,height:t.isToggle?"auto":"100px"})},[i.createElementVNode("div",{class:"slider-icon",style:i.normalizeStyle({border:t.isToggle?"1px solid #379FFF":"1px solid #00B5A4",background:t.isToggle?"#ffffff":"#C7ECEA"}),onClick:u[0]||(u[0]=h=>a(!t.isToggle)),onMouseenter:u[1]||(u[1]=h=>c.value=!0),onMouseleave:u[2]||(u[2]=h=>c.value=!1)},[i.createElementVNode("div",{class:"icon-block",style:i.normalizeStyle({transform:i.unref(c)?t.isToggle?"rotate(-225deg) scale(1.2, 1.2)":"rotate(0deg) scale(1.2, 1.2)":t.isToggle?"rotate(-225deg)":"rotate(0deg)",fill:t.isToggle?"#379FFF":"#00B5A4"})},[i.renderSlot(l.$slots,"icon",{},void 0,!0)],4)],36),i.createElementVNode("div",{class:"slider-info",style:i.normalizeStyle({width:`calc(${t.sliderOnWidth} - ${t.sliderOffWidth})`})},[i.renderSlot(l.$slots,"slider-body",{},void 0,!0)],4)],4),i.createElementVNode("div",yd,[i.renderSlot(l.$slots,"body",{},void 0,!0)]),i.createElementVNode("div",wd,[i.renderSlot(l.$slots,"tabs",{},void 0,!0)])]))}}),[["__scopeId","data-v-0cfd77ce"]]);var ue=(t=>(t.String="string",t.Text="text",t.Number="number",t.Date="date",t.DateTime="dateTime",t.Radio="radio",t.Set="set",t.Boolean="boolean",t.Files="files",t.File="file",t.MatrixRadio="matrixRadio",t.MatrixSet="matrixSet",t))(ue||{});const bd=["label","value"],Nr=x(i.defineComponent({__name:"SelectValueType",props:{selectedType:{type:String,required:!0}},emits:["select"],setup(t,{emit:e}){const n={[ue.String]:"Текстовый ответ",[ue.Text]:"Развёрнутый текстовый ответ",[ue.Number]:"Числовой ответ",[ue.Date]:"Ответ в виде даты",[ue.Radio]:"Выбор одного из вариантов",[ue.Set]:"Выбор нескольких вариантов",[ue.File]:"Ответ в виде файла",[ue.MatrixRadio]:"Матрица с одним выбором",[ue.MatrixSet]:"Матрица с несколькими выборами"},o=e,r=s=>{o("select",s)};return(s,a)=>{const c=i.resolveComponent("PString"),l=i.resolveComponent("PSelect");return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(c,{string:"Выберите вид ответа:","font-size":"14px",padding:"0","justify-content":"left",margin:"10px 0"}),i.createVNode(l,{"model-value":t.selectedType,placeholder:"Вид ответа",onChange:r},{default:i.withCtx(()=>[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(n,(u,h)=>i.createElementVNode("option",{key:u,label:u,value:h},null,8,bd)),64))]),_:1},8,["model-value"])],64)}}}),[["__scopeId","data-v-36a59e2b"]]),Cd={class:"field"},Pr=x(i.defineComponent({__name:"SingleNameToggleForm",props:{withName:{type:Object,required:!0}},emits:["submit"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(!1),s=i.ref(),a=i.ref(n.withName.name),c=i.ref(!1),l=()=>{c.value=!1},u=async()=>{a.value.trim(),n.withName.setName&&n.withName.setName(a.value),r.value=!r.value,o("submit")};return(h,f)=>{const m=i.resolveComponent("PString"),g=i.resolveComponent("el-input"),p=i.resolveComponent("el-form-item"),E=i.resolveComponent("el-form"),w=i.resolveComponent("PButton");return i.openBlock(),i.createBlock(E,{ref_key:"form",ref:s,style:{width:"100%"}},{default:i.withCtx(()=>[i.createVNode(Zt,{title:"Название","show-save-dialog":c.value,icon:"edit-title","with-hover":!0,close:r.value,width:"100%",onKeyupEnter:u,onAfterClose:l},{"open-inside-content":i.withCtx(()=>[i.createVNode(Zt,{title:"",icon:"edit-title","with-open-window":!1,"with-hover":!1,"border-color":"#ffffff","base-box-margin":"0 0 15px 0",padding:"0",width:"100%","custom-class":"test","open-width":"100%"},{default:i.withCtx(()=>[i.createElementVNode("div",Cd,[i.createVNode(E,null,{default:i.withCtx(()=>[i.createVNode(p,{style:{width:"100%"},prop:"surname"},{default:i.withCtx(()=>[i.createVNode(g,{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=M=>a.value=M),style:{width:"100%"},autosize:!0,type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1}),i.createVNode(w,{type:"admin",color:"blue",text:"Сохранить",onClick:u})]),default:i.withCtx(()=>[a.value.length?(i.openBlock(),i.createBlock(m,{key:0,string:a.value.length>60?a.value.slice(0,60)+"...":a.value},null,8,["string"])):(i.openBlock(),i.createBlock(m,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:1},8,["show-save-dialog","close"])]),_:1},512)}}}),[["__scopeId","data-v-cc488c49"]]);var Me=(t=>(t.Asc="asc",t.Desc="desc",t))(Me||{});function Tr(t,e){const n=[],o=e||Me.Asc,r=o===Me.Asc?Me.Desc:Me.Asc;return Object.values(t).forEach(s=>{n.push(s(o)),n.push(s(r))}),n.length>0&&!n.some(s=>s.default)&&(n[0].default=!0),e&&n.forEach(s=>{s.default&&(s.default=s.order===e)}),n}class Sd{constructor(){d(this,"list",[]);d(this,"defaultSortModel");d(this,"changeFlag",!1)}Set(e){this.Reset(),e&&(Array.isArray(e)?this.list=e:this.list=Tr(e),this.SetDefault())}SetDefault(){this.defaultSortModel=this.list.find(e=>e.default)??this.list[0],this.changeFlag=!this.changeFlag}Get(){return this.list}GetDefault(){return this.defaultSortModel}Reset(){this.list=[],this.defaultSortModel=void 0}}const Te=new Sd,kd=["label","value"],zr=x(i.defineComponent({__name:"SortList",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(t,{emit:e}){const n=i.ref(!1),o=e,r=i.ref();i.onBeforeMount(()=>{n.value=!0,r.value=Te.GetDefault(),S.H.FTSP.Get().setSortModel(r.value)});const s=async c=>{r.value=c??Te.GetDefault(),S.H.FTSP.Get().setSortModel(r.value),S.H.FTSP.Get().p.drop(),o("load")},a=async c=>{S.H.FTSP.Get().p.drop(),await s(c)};return(c,l)=>{var h;const u=i.resolveComponent("PSelect");return i.unref(n)?(i.openBlock(),i.createBlock(u,{key:0,modelValue:i.unref(r),"onUpdate:modelValue":l[0]||(l[0]=f=>i.isRef(r)?r.value=f:null),"popper-append-to-body":!1,clearable:!((h=i.unref(r))!=null&&h.default),"value-key":"label",onChange:a,onClear:l[1]||(l[1]=f=>a())},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Te).Get(),(f,m)=>(i.openBlock(),i.createElementBlock("option",{key:m,label:f.label,value:f},null,8,kd))),128))]),_:1},8,["modelValue","clearable"])):i.createCommentVNode("",!0)}}}),[["__scopeId","data-v-09845b7b"]]),Ed=["label","value"],Vr=x(i.defineComponent({__name:"SortSelect",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(t,{emit:e}){const n=e,o=i.ref();i.onBeforeMount(()=>{o.value=Te.GetDefault()});const r=async a=>{a||(o.value=Te.GetDefault()),S.H.FTSP.Get().setSortModel(o.value),S.H.FTSP.Get().p.drop(),n("load")},s=async a=>{await r(a)};return(a,c)=>{var u;const l=i.resolveComponent("PSelect");return i.openBlock(),i.createBlock(l,{modelValue:i.unref(o),"onUpdate:modelValue":c[0]||(c[0]=h=>i.isRef(o)?o.value=h:null),"popper-append-to-body":!1,clearable:!((u=i.unref(o))!=null&&u.default),"value-key":"label",onChange:s},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Te).Get(),(h,f)=>(i.openBlock(),i.createElementBlock("option",{key:f,label:h.label,value:h},null,8,Ed))),128))]),_:1},8,["modelValue","clearable"])}}}),[["__scopeId","data-v-a1820654"]]),vd={class:"switch-container"},xd={class:"line"},Bd={class:"line"},Fr=x(i.defineComponent({__name:"Switch3Pos",props:{firstModel:{type:Object,required:!0},secondModel:{type:Object,required:!0},defaultLabel:{type:String,default:"Все"}},emits:["load"],setup(t,{emit:e}){const n=t,o={background:"inherit",border:"1px solid #c4c4c4"},r=()=>n.firstModel.valueEq(u.value)?void 0:o,s=()=>u.value?o:void 0,a=()=>n.secondModel.valueEq(u.value)?void 0:o,c=f=>{var g;return{color:(g=u.value)!=null&&g.valueEq(f)?"#006bb4":"#B0A4C0"}},l=e,u=i.ref(void 0),h=async f=>{var m;(m=u.value)!=null&&m.valueEq(f)||(S.H.FTSP.Get().replaceF(f,u.value),u.value=f,l("load"))};return(f,m)=>{const g=i.resolveComponent("PString");return i.openBlock(),i.createElementBlock("div",vd,[i.createElementVNode("div",xd,[i.createVNode(g,{string:t.firstModel.label,"font-size":"12px",padding:"0",style:i.normalizeStyle(c(t.firstModel)),onClick:m[0]||(m[0]=p=>h(t.firstModel))},null,8,["string","style"]),i.createVNode(g,{string:"Все","font-size":"12px",padding:"0",style:i.normalizeStyle(c()),onClick:m[1]||(m[1]=p=>h())},null,8,["style"]),i.createVNode(g,{string:t.secondModel.label,"font-size":"12px",padding:"0",style:i.normalizeStyle(c(t.secondModel)),onClick:m[2]||(m[2]=p=>h(t.secondModel))},null,8,["string","style"])]),i.createElementVNode("div",Bd,[i.createElementVNode("div",{class:i.normalizeClass(["switch-knob1",{active:t.firstModel.valueEq(i.unref(u))}]),style:i.normalizeStyle(r()),onClick:m[3]||(m[3]=p=>h(t.firstModel))},null,6),i.createElementVNode("div",{class:i.normalizeClass(["switch-knob2",{active:!i.unref(u)}]),style:i.normalizeStyle(s()),onClick:m[4]||(m[4]=p=>h())},null,6),i.createElementVNode("div",{class:i.normalizeClass(["switch-knob3",{active:t.secondModel.valueEq(i.unref(u))}]),style:i.normalizeStyle(a()),onClick:m[5]||(m[5]=p=>h(t.secondModel))},null,6),m[6]||(m[6]=i.createElementVNode("div",{class:"switch-axis"},null,-1)),m[7]||(m[7]=i.createElementVNode("div",{class:"switch-axis-dash1"},null,-1)),m[8]||(m[8]=i.createElementVNode("div",{class:"switch-axis-dash2"},null,-1)),m[9]||(m[9]=i.createElementVNode("div",{class:"switch-axis-dash3"},null,-1))])])}}}),[["__scopeId","data-v-78475d54"]]),Md={},Id={class:"flex"};function Rd(t,e){return i.openBlock(),i.createElementBlock("div",Id,[i.renderSlot(t.$slots,"default",{},void 0,!0)])}const Dr=x(Md,[["render",Rd],["__scopeId","data-v-5023d414"]]),Or=x(i.defineComponent({__name:"ToggleInfoItem",props:{title:{type:String,required:!0},content:{type:String,required:!0}},emits:["submit"],setup(t,{emit:e}){const n=i.ref(!1),o=e,r=async()=>{o("submit"),n.value=!n.value};return(s,a)=>{const c=i.resolveComponent("PString"),l=i.resolveComponent("PButton"),u=i.resolveComponent("GridContainer"),h=i.resolveComponent("InfoItem");return i.openBlock(),i.createBlock(h,{title:t.title,icon:"edit-title","with-hover":!0,close:i.unref(n),width:"100%",onKeyupEnter:r},{"open-inside-content":i.withCtx(()=>[i.createVNode(u,{"custom-class":"grid"},{default:i.withCtx(()=>[i.renderSlot(s.$slots,"default",{},void 0,!0),i.createVNode(l,{type:"admin",color:"blue",text:"Сохранить",onClick:r})]),_:3})]),default:i.withCtx(()=>[t.content.length>0?(i.openBlock(),i.createBlock(c,{key:0,string:t.content},null,8,["string"])):(i.openBlock(),i.createBlock(c,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:3},8,["title","close"])}}}),[["__scopeId","data-v-0794596f"]]),$d={class:"top-slider-content"},Ad={class:"center"},Lr=x(i.defineComponent({__name:"TopSliderContainer",props:{sliderOffHeight:{type:String,required:!1,default:"53px"},sliderOnHeight:{type:String,required:!1,default:"220px"},background:{type:String,required:!1,default:"inherit"},toggle:{type:Boolean,default:!1}},emits:["toggle"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(!0);i.watch(()=>n.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("toggle",a)};return(a,c)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.unref(r)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",{key:0,class:"blur",onClick:[c[0]||(c[0]=i.withModifiers(l=>r.value=!0,["prevent"])),c[1]||(c[1]=i.withModifiers(()=>{},["stop"]))]})),i.createElementVNode("div",{class:"top-slider",style:i.normalizeStyle({marginTop:i.unref(r)?`calc(${t.sliderOffHeight} - ${t.sliderOnHeight})`:"0",height:t.sliderOnHeight}),onClick:c[3]||(c[3]=i.withModifiers(()=>{},["stop"]))},[i.createElementVNode("div",$d,[i.createElementVNode("div",Ad,[i.renderSlot(a.$slots,"default",{},void 0,!0)])]),i.createElementVNode("div",{class:"click-line",style:i.normalizeStyle({height:t.sliderOffHeight}),onClick:c[2]||(c[2]=l=>s(!i.unref(r)))},[i.renderSlot(a.$slots,"title",{},void 0,!0)],4)],4)],64))}}),[["__scopeId","data-v-683131f5"]]);class Xt{constructor(e){d(this,"id");d(this,"ratio",0);d(this,"src","");d(this,"store","");V.BuildClass(this,e)}static CreateCropper(e,n,o){const r=new Xt;return r.src=e,r.id=o,n&&(r.ratio=n),r}}const Nd={id:"drop-area",class:"img-container"},Pd={key:0},Td=["src"],zd={class:"tools-button"},Vd={class:"ins"},Fd={key:1},Dd=["id"],_r=x(i.defineComponent({__name:"UploaderImage",props:{withCrop:{type:Boolean,default:!0},fileInfo:{type:Be,required:!0},height:{type:Number,default:150},width:{type:Number,default:150},cropRatio:{type:Boolean,default:!0},emitCrop:{type:Boolean,default:!1},defaultRatio:{type:Number,required:!1,default:1}},emits:["crop","removeFile"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(void 0),s=S.H.Id.GUID(),a=i.ref(!1),c=i.ref(),l=w=>{const M=n.cropRatio?n.defaultRatio:0;S.S.Cropper.Open(Xt.CreateCropper(w.url,M,n.fileInfo.id)),a.value=!0},u=()=>{S.UI.Dialog.Show({text:"Вы хотите удалить изображение",confirmButtonText:"Удалить",cancelButtonText:"Не удалять"}).then(()=>{r.value=void 0,c.value.clearFiles(),o("removeFile")})},h=w=>{n.fileInfo.setFile(w),n.fileInfo.fileSystemPath&&(r.value=n.fileInfo),a.value=!1,o("crop")};i.onBeforeMount(()=>{n.fileInfo.fileSystemPath&&(r.value=n.fileInfo,r.value.url=n.fileInfo.getFileUrl())});let f=null;i.onMounted(()=>{const w=document.getElementById("drop-area");w&&(w.addEventListener("dragover",M=>{m(M),w.classList.add("drag-over")}),w.addEventListener("dragleave",M=>{m(M),w.classList.remove("drag-over")}),w.addEventListener("dragenter",m),w.addEventListener("dragleave",m),w.addEventListener("drop",p),f=document.getElementById(s))});function m(w){w.preventDefault(),w.stopPropagation()}const g=()=>{f&&f.click()};function p(w){if(w.preventDefault(),!w.dataTransfer)return;const M=w.dataTransfer.files;M.length&&f&&(f.files=M,E())}const E=()=>{if(!f||!f.files||!f.files.length)return;const w=f.files[0];w.url=URL.createObjectURL(w),r.value=w,n.fileInfo.uploadNewFile(w),l(r.value)};return(w,M)=>{const O=i.resolveComponent("PButton"),L=i.resolveComponent("ImageCropper");return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",Nd,[i.unref(r)?(i.openBlock(),i.createElementBlock("div",Pd,[i.createElementVNode("div",{class:"img-block",style:i.normalizeStyle({width:t.height*t.defaultRatio-2+"px",height:t.height+"px"})},[i.createElementVNode("img",{class:"el-upload-list__item-thumbnail",src:i.unref(r).url,alt:"upload-image"},null,8,Td)],4),i.createElementVNode("div",zd,[i.createElementVNode("div",Vd,[i.createVNode(O,{skin:"text",text:"Изменить","font-size":"20px",width:"300px",margin:"100px 0 0 0",onClick:M[0]||(M[0]=F=>l(i.unref(r)))}),i.createVNode(O,{skin:"text",text:"Удалить","font-size":"20px",width:"300px",margin:"50px 0 0 0",onClick:M[1]||(M[1]=F=>u())})])])])):(i.openBlock(),i.createElementBlock("div",Fd,[i.createElementVNode("div",{class:"add-button",style:i.normalizeStyle({width:t.height*t.defaultRatio-2+"px",height:t.height+"px"})},[i.createVNode(O,{skin:"text",text:"Добавить","font-size":"20px",onClick:g})],4)]))]),i.createElementVNode("input",{id:i.unref(s),type:"file",hidden:"",onChange:E},null,40,Dd),t.withCrop?(i.openBlock(),i.createBlock(L,{key:0,open:i.unref(a),"default-ratio":t.defaultRatio,onCrop:h,onClose:M[2]||(M[2]=F=>a.value=!1)},null,8,["open","default-ratio"])):i.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-4119c534"]]);var pe=(t=>(t.Login="login",t.Register="register",t.Restore="restore",t.Refresh="refresh",t))(pe||{});class Ze{constructor(e,n,o,r){d(this,"text","Сохранить");d(this,"type",ce.Success);d(this,"condition",!0);d(this,"action");d(this,"id","button");d(this,"disabled",!1);this.text=e,this.type=o,this.action=n,r!==void 0&&(this.condition=r)}static Primary(e,n,o){return new Ze(e,n,ce.Primary,o)}static Success(e,n,o){return new Ze(e,n,ce.Success,o)}static Warning(e,n,o){return new Ze(e,n,ce.Warning,o)}static Error(e,n,o){return new Ze(e,n,ce.Error,o)}}class Hr extends Ze{constructor(){super(...arguments);d(this,"id","auth-button");d(this,"status",pe.Login);d(this,"submit",!1)}GetStatus(){return this.status}}let jn=class extends Hr{constructor(){super(...arguments);d(this,"id","auth-button-login");d(this,"text","Войти");d(this,"isSubmit",!1);d(this,"disabled",!1)}};class Gn extends Hr{constructor(){super(...arguments);d(this,"id","auth-button-register");d(this,"text","Зарегистрироваться");d(this,"isSubmit",!1);d(this,"disabled",!1)}}class Od{constructor(){d(this,"value","");d(this,"label","");d(this,"placeholder","");d(this,"validator")}Validate(){return this.validator?(this.validator.validate(this.value),this.validator.errors):[]}Reset(){this.value=""}}class Jt extends Od{constructor(){super(...arguments);d(this,"method");d(this,"id","field-auth");d(this,"name","")}}var at=(t=>(t.Login="login",t.Email="email",t.Phone="phone",t.VK="vk",t.ESIA="esia",t))(at||{});const Ld=/\S+@\S+\.\S+/;class qr{constructor(){d(this,"errors",[])}validate(e){return(e===""||!e)&&this.errors.push("Введите email"),Ld.test(e)||this.errors.push("Некорректный email"),this.errors}}class Yt extends Jt{constructor(){super(...arguments);d(this,"id","field-auth-email");d(this,"label","Email");d(this,"name","email");d(this,"placeholder","Введите email");d(this,"validator",new qr);d(this,"method",at.Email)}}class _d{constructor(){d(this,"errors",[]);d(this,"length",6)}validate(e){return e===""||!e?(this.errors.push("Введите пароль"),this.errors):(e.length<this.length&&this.errors.push("Пароль недостаточной длины"),this.errors)}}class Qt extends Jt{constructor(){super(...arguments);d(this,"label","Пароль");d(this,"validator",new _d);d(this,"name","password");d(this,"placeholder","Введите пароль");d(this,"id","field-auth-password")}}class Ur extends Jt{constructor(){super(...arguments);d(this,"label","Повторите пароль");d(this,"id","field-auth-password-repeat")}}const Wr={[pe.Login]:{methods:[at.Email],title:"Вход в систему",action:"login",buttons:[new jn,new Gn],fields:[new Yt,new Qt],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно вошли в систему"},[pe.Register]:{methods:[],title:"Регистрация",action:"register",buttons:[new Gn,new jn],fields:[new Yt,new Qt,new Ur],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно зарегистрировались в системе, войдите под своим паролем"},[pe.Restore]:{title:"Восстановление пароля",methods:[],action:"restorePassword",successMessage:"Ссылка для восстановления пароля отправлена на Вашу почту",errorMessage:"Неверно указан email",buttons:[],fields:[new Yt]},[pe.Refresh]:{methods:[],title:"Создание нового пароля",action:"passwordChange",successMessage:"Воспользуйтесь новым паролем для входа",errorMessage:"Неверно указан email",buttons:[],fields:[new Qt]}};class Hd{constructor(){d(this,"settings",Wr);d(this,"status",pe.Login);d(this,"selectedMethod",at.Email)}async Block(e){await e()}GetValues(){const e=this.GetFields(),n=new Map;return e.forEach(o=>{o.value&&n.set(o.name,o.value)}),n}Validate(){return[]}GetFields(){return this.GetCurSet().fields.filter(e=>!e.method||e.method===this.selectedMethod)}GetMethods(){return this.GetCurSet().methods}Status(){return this.status}GetCurSet(){return this.settings[this.status]}IsLogin(){return this.status===pe.Login}IsRegister(){return this.status===pe.Register}IsRestore(){return this.status===pe.Restore}IsRefresh(){return this.status===pe.Refresh}SetStatus(e){this.status=e}GetTitle(){return this.GetCurSet().title}GetButtons(){const e=this.GetCurSet().buttons;return e.forEach(n=>{n.submit=!1}),e.length>0&&(e[0].submit=!0),e}GetSuccessMessage(){return this.GetCurSet().successMessage}GetErrorMessage(){return this.GetCurSet().errorMessage}GetAction(){return this.GetCurSet().action}ResetFields(){this.GetCurSet().fields.forEach(e=>e.Reset())}Reset(){this.status=pe.Login}}class qd{constructor(){d(this,"visible",!1);d(this,"closable",!1)}IsClosable(){return this.closable}IsVisible(){return this.visible}Close(){this.visible=!1}Open(e){e&&(this.closable=!0),this.visible=!0}}class jr{constructor(){d(this,"visible",!1)}hide(){this.visible=!1}show(){this.hide(),this.visible=!0}IsVisible(){return this.visible}}class Gr extends jr{constructor(){super(...arguments);d(this,"type",ce.Success);d(this,"text","");d(this,"title","")}showMessage(n,o){this.hide(),this.type=o,typeof n=="string"?this.text=n:(this.text=n.text,this.title=n.title??""),super.show()}GetText(){return this.text}GetTitle(){return this.title}GetType(){return this.type}Info(n){this.showMessage(n,ce.Info)}Success(n){this.showMessage(n,ce.Success)}Error(n){this.showMessage(n,ce.Error)}Warning(n){this.showMessage(n,ce.Warning)}FormMessage(n){let o="<strong>Проверьте правильность введенных данных:</strong><ul>";for(const r of Object.keys(n))n[r][0]&&n[r][0].message&&(o+=`<li>${n[r][0].message}</li>`);return o+="</ul>",o}}class Zn{static Get(e,n,o="-"){return!e||!n?"":`${e}${o}${n}`}static In(e,n,o){return e>=n&&e<=o}static Intersects(e,n,o,r){return e===o||n===r||e>o&&e<r||n>o&&n<r||n>r&&e<o}}const Zr=1e3,Xr=60*Zr,Xn=60*Xr;var Ct=(t=>(t.FiveMinutes="5",t.HourQuarter="15",t.HourHalf="30",t.Hour="60",t))(Ct||{});const Kt={5:["00","05","10","15","20","25","30","35","40","45","50","55"],15:["00","15","30","45"],30:["00","30"],60:["00"]};class H{static S(e){return Zr*e}static M(e){return Xr*e}static H(e){return Xn*e}static D(e){return Xn*e}static W(e){return Xn*e}static NormalizeTime(e){return String(e).padStart(2,"0")}static HMtoM(e){const n=H.SplitHM(e);return n.length>1?H.HtoM(n[0])+n[1]:H.HtoM(n[0])}static HtoM(e){return Number(e)*60}static SplitHM(e){if(!e)return[];const n=e.split(":");return[Number(n[0]),Number(n[1])]}static HmsToHm(e){const n=H.SplitHM(e);return H.ConcatHM(n[0],n[1])}static AddMtoHM(e,n){const o=new Date,r=H.SplitHM(e);o.setHours(r[0],r[1],0,0);const s=new Date(o.getTime()+n*6e4),a=s.getHours(),c=s.getMinutes();return H.ConcatHM(a,c)}static ConcatHM(e,n){return`${e}:${H.NormalizeTime(n)}`}static DiffM(e,n){return H.Gt(n,e)?H.HMtoM(n)-H.HMtoM(e):H.HMtoM(e)-H.HMtoM(n)}static GetPeriod(e,n){return Zn.Get(e,n)}static Gt(e,n){return H.HMtoM(e)>H.HMtoM(n)}static GtOrEq(e,n){return H.Gt(e,n)||H.Eq(e,n)}static Eq(e,n){return H.HMtoM(e)===H.HMtoM(n)}static PeriodInPeriod(e,n,o,r){return H.HMtoM(e)>=H.HMtoM(o)&&H.HMtoM(n)<=H.HMtoM(r)}static PeriodsIntersects(e,n,o,r){return Zn.Intersects(H.HMtoM(e),H.HMtoM(n),H.HMtoM(o),H.HMtoM(r))}}class St{static Wait(e,n){return new Promise(o=>setTimeout(()=>o(n),e))}static WaitS(e,n){return St.Wait(H.S(e),n)}static WaitM(e,n){return St.Wait(H.M(e),n)}}class Ud extends Gr{constructor(){super(...arguments);d(this,"duration",H.S(3))}showMessage(n,o){super.showMessage(n,o),typeof n!="string"&&(this.duration=n.duration??this.duration),St.Wait(this.GetDuration()).then(()=>super.hide())}GetDuration(){return this.duration}Dev(){const n="В режиме разработки",o=ce.Warning;super.showMessage(n,o)}Save(){const n="Изменения успешно сохранены",o=ce.Success;super.showMessage(n,o)}}const kt=new Ud;class Ie{static Get(e){const n=localStorage.getItem(e);if(n)return JSON.parse(n)}static Set(e,n){n&&localStorage.setItem(e,JSON.stringify(n))}static Remove(e){localStorage.removeItem(e)}}var Se=(t=>(t.User="user",t.AccessToken="accessToken",t.RefreshToken="refreshToken",t))(Se||{});class Wd{set(e){this.setAccessToken(e.accessToken),this.setRefreshToken(e.refreshToken)}getAccessToken(){return Ie.Get(Se.AccessToken)}getRefreshToken(){return Ie.Get(Se.RefreshToken)}setAccessToken(e){Ie.Set(Se.AccessToken,e)}setRefreshToken(e){Ie.Set(Se.RefreshToken,e)}reset(){Ie.Remove(Se.AccessToken),Ie.Remove(Se.RefreshToken)}actualize(){this.setAccessToken(this.getAccessToken()),this.setRefreshToken(this.getAccessToken())}}class jd{constructor(){d(this,"user");d(this,"userConstructor")}AssignTo(e){e.user=this.get()}setUserConstructor(e){this.userConstructor=e}get(){if(this.userConstructor)return this.user=new this.userConstructor(Ie.Get(Se.User)),this.user}set(e){this.userConstructor&&(this.user=new this.userConstructor(e),Ie.Set(Se.User,this.user))}reset(){this.user=void 0,Ie.Remove(Se.User)}actualize(){const e=Ie.Get(Se.User);e&&this.set(e)}}class Gd{constructor(){d(this,"isAuth",!1);d(this,"user",new jd);d(this,"tokens",new Wd);d(this,"preventLogout",!1)}DeprecateLogout(){this.preventLogout=!0}AllowLogout(){this.preventLogout=!1}get IsAuth(){return this.isAuth}get User(){return this.user.get()}SetUserConstructor(e){this.user.setUserConstructor(e)}SetState(e){this.user.set(e.user),this.tokens.set(e.tokens),this.isAuth=!0}Logout(){if(this.preventLogout){kt.Warning("В текущий момент Вы не можете выйти из системы");return}this.user.reset(),this.tokens.reset(),this.isAuth=!1}Actualize(){if(this.user.actualize(),this.tokens.actualize(),this.user.get()&&this.tokens.getAccessToken()&&this.tokens.getRefreshToken()){this.isAuth=!0;return}this.Logout()}}class Zd{constructor(){d(this,"form",new Hd);d(this,"status",new Gd);d(this,"modal",new qd)}get Form(){return this.form}get Status(){return this.status}get Modal(){return this.modal}}const Jr=new Zd;class Xd extends Jt{constructor(){super(...arguments);d(this,"label","Логин");d(this,"name","login");d(this,"validator",new qr);d(this,"method",at.Login);d(this,"id","field-auth-login")}}class Xe{constructor(e){d(this,"id");d(this,"address");d(this,"description");d(this,"contactId");V.BuildClass(this,e)}static Create(){const e=new Xe;return e.id=ve.UUID(),e}}class Yr{constructor(e){d(this,"id");d(this,"name","");d(this,"surname","");d(this,"patronymic","");d(this,"isMale",!0);d(this,"dateBirth",new Date);d(this,"contactId");d(this,"slug","");d(this,"postIndex","");d(this,"address","");d(this,"editNameMode",!1);V.BuildClass(this,e)}setEditNameMode(e){this.editNameMode=e}getFullName(){return!this.surname.length&&!this.name.length&&!this.patronymic.length?"":`${this.surname} ${this.name} ${this.patronymic}`}getInitialsName(){return`${this.name.slice(0,1)}.${this.patronymic.slice(0,1)}. ${this.surname}`}getGender(e){return e?this.isMale?"Мужской":"Женский":this.isMale?"М":"Ж"}capitalizeName(){this.name=ne.Capitalize(this.name),this.surname=ne.Capitalize(this.surname),this.patronymic=ne.Capitalize(this.patronymic)}trimName(){this.name=this.name.trim(),this.surname=this.surname.trim(),this.patronymic=this.patronymic.trim()}sanitizeName(){this.trimName(),this.capitalizeName()}setFullName(e){this.surname=e.surname,this.name=e.name,this.patronymic=e.patronymic}}class en{constructor(e){d(this,"model","");d(this,"col","");d(this,"order");d(this,"label","");d(this,"default",!1);d(this,"selected",!1);V.BuildClass(this,e)}static Create(e,n,o=Me.Asc,r,s){const a=new en;return a.model=e.GetClassName(),a.col=n??"",a.order=o??Me.Asc,a.label=r??"",a.default=s??!1,a}isAsc(){return this.order===Me.Asc}isDesc(){return this.order===Me.Desc}eq(e){return e.model===this.model&&e.col===this.col&&e.order===this.order}toUrlQuery(){const e=this.model?`"model":"${this.model}"`:"",n=this.col?`"col":"${this.col}"`:"",o=this.order?`"order":"${this.order}"`:"";return[e,n,o].toString()}async fromUrlQuery(){const e=window.location.search,n=e.substring(e.indexOf("s=")+2,e.indexOf("|")),o=new URLSearchParams(decodeURIComponent(n));this.model=o.get("model")??"",this.col=o.get("col")??"",this.label=o.get("label")??"",this.default=!!o.get("default"),this.order=o.get("order")??""}asc(){this.order=Me.Asc}desc(){this.order=Me.Desc}}const Jd=Object.freeze(Object.defineProperty({__proto__:null,Auth:Jr,AuthButtonLogin:jn,AuthButtonRegister:Gn,AuthFormSettings:Wr,AuthFormStatuses:pe,AuthMethods:at,Email:Xe,EmailField:Yt,FileInfo:Be,Human:Yr,LoginField:Xd,PasswordField:Qt,PasswordRepeatField:Ur,SortModel:en},Symbol.toStringTag,{value:"Module"}));class Yd{constructor(){d(this,"operation",de.Lt);d(this,"column","");d(this,"value");d(this,"initial",!0);d(this,"tableName","");d(this,"version","");d(this,"model","")}toUrlQuery(){const e=this.operation?`"operation":"${this.operation}"`:"",n=this.column?`"column":"${this.column}"`:"",o=this.value&&typeof this.value.toISOString=="function"?this.value.toISOString():this.value,r=o?`"value":"${o}"`:"",s=this.model?`"model":"${this.model}"`:"",a=`"initial":${this.initial}`;return[e,n,r,s,a].filter(c=>c!=="").toString()}fromUrlQuery(e){e.cursvalue&&(this.value=e.cursvalue),e.curscolumn&&(this.column=String(e.curscolumn)),e.cursinitial!==void 0&&(this.initial=!!e.cursinitial),e.curstableName&&(this.tableName=String(e.curstableName)),e.cursoperation&&(this.operation=e.cursoperation)}}class tn{constructor(e){d(this,"offset",0);d(this,"limit",25);d(this,"cursor",new Yd);d(this,"cursorMode",!1);d(this,"append",!1);d(this,"allLoaded",!1);d(this,"version","");V.BuildClass(this,e)}setLoadMore(e,n,o){this.cursor.value=e,this.cursor.initial=!1,this.cursor.operation=de.Gt,this.cursor.column=n,this.cursor.tableName=o,this.cursorMode=!0}setLoadMoreV2(e,n,o){this.cursor.value=e,this.cursor.initial=!1,this.cursor.operation=de.Gt,this.cursor.column=n,this.cursor.model=o,this.cursorMode=!0,this.version="v2"}setOffset(e){this.offset=e}toUrlQuery(){const e=`"offset":${this.offset}`,n=`"limit":${this.limit}`,o=`"cursorMode":${this.cursorMode}`,r=`"append":${this.append}`,s=`"allLoaded":${this.allLoaded}`,a=`"cursor":{${this.cursor.toUrlQuery()}}`;return[e,n,o,r,s,a].toString()}fromUrlQuery(){const e=window.location.search,n=e.substring(e.indexOf("p=")+2,e.lastIndexOf("|")),o=new URLSearchParams(decodeURIComponent(n));this.offset=Number(o.get("offset")),this.limit=Number(o.get("col"))}setAllLoaded(e){this.allLoaded=!(e>=this.limit)}resetAllLoaded(){this.allLoaded=!1}getPageNum(){return this.offset/this.limit+1}drop(){this.offset=0,this.limit=25,V.BuildClass(this)}}class nn{constructor(){d(this,"model","");d(this,"cols",[]);d(this,"models",[])}static Create(e,n){const o=new nn;return o.model=e.GetClassName(),o.cols=n,o}}var Qd=Object.defineProperty,on=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&Qd(e,n,r),r};const Et=(ye=class{constructor(e){d(this,"id");d(this,"f",[]);d(this,"s",[]);d(this,"p",new tn);d(this,"t",new nn);V.BuildClass(this,e)}static Get(){return this.instance||(this.instance=new ye),this.instance}createFrom(e){const n=new ye(JSON.parse(e));this.f=n.f}clearForHTTP(){const e=new ye(this);return e.f=this.f.map(n=>ye.EmptyEntiries(n)),e.s=this.s.map(n=>ye.EmptyEntiries(n)),e.p=ye.EmptyEntiries(this.p),e.t=ye.EmptyEntiries(this.t),e}static EmptyEntiries(e){if(!e)return;const o=Object.entries(e).filter(([r,s])=>r!=="label"&&s!==""&&s!==null);return Object.fromEntries(o)}findFilterModel(e){return this.f.find(n=>e.id===n.id)}getFirstSortModel(){return He.GetLast(this.s)}setSortModel(e){e&&(this.s[0]=e)}setS(e){this.s[0]=e}setF(e){this.f.push(e)}replaceF(e,n){this.removeF(n),e&&this.setF(e)}removeF(e){const n=this.f.findIndex(o=>o.eq(e));V.RemoveFromClassByIndex(n,this.f)}reset(){this.f=[],this.s=[],this.p=new tn}resetF(){this.f=[]}},d(ye,"instance"),ye);on([V.GetClassConstructor(fo)],Et.prototype,"f"),on([V.GetClassConstructor(en)],Et.prototype,"s"),on([V.GetClassConstructor(tn)],Et.prototype,"p"),on([V.GetClassConstructor(nn)],Et.prototype,"t");let Qr=Et;class Je{constructor(e){d(this,"id");d(this,"number");d(this,"description");d(this,"contactId");V.BuildClass(this,e)}static Create(){const e=new Je;return e.id=ve.UUID(),e}}function Kr(t,e){return function(){return t.apply(e,arguments)}}const{toString:Kd}=Object.prototype,{getPrototypeOf:Jn}=Object,rn=(t=>e=>{const n=Kd.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Re=t=>(t=t.toLowerCase(),e=>rn(e)===t),sn=t=>e=>typeof e===t,{isArray:lt}=Array,vt=sn("undefined");function eu(t){return t!==null&&!vt(t)&&t.constructor!==null&&!vt(t.constructor)&&ge(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const es=Re("ArrayBuffer");function tu(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&es(t.buffer),e}const nu=sn("string"),ge=sn("function"),ts=sn("number"),an=t=>t!==null&&typeof t=="object",iu=t=>t===!0||t===!1,ln=t=>{if(rn(t)!=="object")return!1;const e=Jn(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},ou=Re("Date"),ru=Re("File"),su=Re("Blob"),au=Re("FileList"),lu=t=>an(t)&&ge(t.pipe),cu=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||ge(t.append)&&((e=rn(t))==="formdata"||e==="object"&&ge(t.toString)&&t.toString()==="[object FormData]"))},du=Re("URLSearchParams"),[uu,hu,fu,mu]=["ReadableStream","Request","Response","Headers"].map(Re),pu=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function xt(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let o,r;if(typeof t!="object"&&(t=[t]),lt(t))for(o=0,r=t.length;o<r;o++)e.call(null,t[o],o,t);else{const s=n?Object.getOwnPropertyNames(t):Object.keys(t),a=s.length;let c;for(o=0;o<a;o++)c=s[o],e.call(null,t[c],c,t)}}function ns(t,e){e=e.toLowerCase();const n=Object.keys(t);let o=n.length,r;for(;o-- >0;)if(r=n[o],e===r.toLowerCase())return r;return null}const Ye=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,is=t=>!vt(t)&&t!==Ye;function Yn(){const{caseless:t}=is(this)&&this||{},e={},n=(o,r)=>{const s=t&&ns(e,r)||r;ln(e[s])&&ln(o)?e[s]=Yn(e[s],o):ln(o)?e[s]=Yn({},o):lt(o)?e[s]=o.slice():e[s]=o};for(let o=0,r=arguments.length;o<r;o++)arguments[o]&&xt(arguments[o],n);return e}const gu=(t,e,n,{allOwnKeys:o}={})=>(xt(e,(r,s)=>{n&&ge(r)?t[s]=Kr(r,n):t[s]=r},{allOwnKeys:o}),t),yu=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),wu=(t,e,n,o)=>{t.prototype=Object.create(e.prototype,o),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},bu=(t,e,n,o)=>{let r,s,a;const c={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),s=r.length;s-- >0;)a=r[s],(!o||o(a,t,e))&&!c[a]&&(e[a]=t[a],c[a]=!0);t=n!==!1&&Jn(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Cu=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const o=t.indexOf(e,n);return o!==-1&&o===n},Su=t=>{if(!t)return null;if(lt(t))return t;let e=t.length;if(!ts(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},ku=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Jn(Uint8Array)),Eu=(t,e)=>{const o=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=o.next())&&!r.done;){const s=r.value;e.call(t,s[0],s[1])}},vu=(t,e)=>{let n;const o=[];for(;(n=t.exec(e))!==null;)o.push(n);return o},xu=Re("HTMLFormElement"),Bu=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,r){return o.toUpperCase()+r}),os=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Mu=Re("RegExp"),rs=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),o={};xt(n,(r,s)=>{let a;(a=e(r,s,t))!==!1&&(o[s]=a||r)}),Object.defineProperties(t,o)},Iu=t=>{rs(t,(e,n)=>{if(ge(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=t[n];if(ge(o)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Ru=(t,e)=>{const n={},o=r=>{r.forEach(s=>{n[s]=!0})};return lt(t)?o(t):o(String(t).split(e)),n},$u=()=>{},Au=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,Qn="abcdefghijklmnopqrstuvwxyz",ss="0123456789",as={DIGIT:ss,ALPHA:Qn,ALPHA_DIGIT:Qn+Qn.toUpperCase()+ss},Nu=(t=16,e=as.ALPHA_DIGIT)=>{let n="";const{length:o}=e;for(;t--;)n+=e[Math.random()*o|0];return n};function Pu(t){return!!(t&&ge(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Tu=t=>{const e=new Array(10),n=(o,r)=>{if(an(o)){if(e.indexOf(o)>=0)return;if(!("toJSON"in o)){e[r]=o;const s=lt(o)?[]:{};return xt(o,(a,c)=>{const l=n(a,r+1);!vt(l)&&(s[c]=l)}),e[r]=void 0,s}}return o};return n(t,0)},zu=Re("AsyncFunction"),Vu=t=>t&&(an(t)||ge(t))&&ge(t.then)&&ge(t.catch),ls=((t,e)=>t?setImmediate:e?((n,o)=>(Ye.addEventListener("message",({source:r,data:s})=>{r===Ye&&s===n&&o.length&&o.shift()()},!1),r=>{o.push(r),Ye.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ge(Ye.postMessage)),Fu=typeof queueMicrotask<"u"?queueMicrotask.bind(Ye):typeof process<"u"&&process.nextTick||ls,C={isArray:lt,isArrayBuffer:es,isBuffer:eu,isFormData:cu,isArrayBufferView:tu,isString:nu,isNumber:ts,isBoolean:iu,isObject:an,isPlainObject:ln,isReadableStream:uu,isRequest:hu,isResponse:fu,isHeaders:mu,isUndefined:vt,isDate:ou,isFile:ru,isBlob:su,isRegExp:Mu,isFunction:ge,isStream:lu,isURLSearchParams:du,isTypedArray:ku,isFileList:au,forEach:xt,merge:Yn,extend:gu,trim:pu,stripBOM:yu,inherits:wu,toFlatObject:bu,kindOf:rn,kindOfTest:Re,endsWith:Cu,toArray:Su,forEachEntry:Eu,matchAll:vu,isHTMLForm:xu,hasOwnProperty:os,hasOwnProp:os,reduceDescriptors:rs,freezeMethods:Iu,toObjectSet:Ru,toCamelCase:Bu,noop:$u,toFiniteNumber:Au,findKey:ns,global:Ye,isContextDefined:is,ALPHABET:as,generateString:Nu,isSpecCompliantForm:Pu,toJSONObject:Tu,isAsyncFn:zu,isThenable:Vu,setImmediate:ls,asap:Fu};function D(t,e,n,o,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),o&&(this.request=o),r&&(this.response=r,this.status=r.status?r.status:null)}C.inherits(D,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:C.toJSONObject(this.config),code:this.code,status:this.status}}});const cs=D.prototype,ds={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{ds[t]={value:t}}),Object.defineProperties(D,ds),Object.defineProperty(cs,"isAxiosError",{value:!0}),D.from=(t,e,n,o,r,s)=>{const a=Object.create(cs);return C.toFlatObject(t,a,function(l){return l!==Error.prototype},c=>c!=="isAxiosError"),D.call(a,t.message,e,n,o,r),a.cause=t,a.name=t.name,s&&Object.assign(a,s),a};const Du=null;function Kn(t){return C.isPlainObject(t)||C.isArray(t)}function us(t){return C.endsWith(t,"[]")?t.slice(0,-2):t}function hs(t,e,n){return t?t.concat(e).map(function(r,s){return r=us(r),!n&&s?"["+r+"]":r}).join(n?".":""):e}function Ou(t){return C.isArray(t)&&!t.some(Kn)}const Lu=C.toFlatObject(C,{},null,function(e){return/^is[A-Z]/.test(e)});function cn(t,e,n){if(!C.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=C.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,w){return!C.isUndefined(w[E])});const o=n.metaTokens,r=n.visitor||h,s=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&C.isSpecCompliantForm(e);if(!C.isFunction(r))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(C.isDate(p))return p.toISOString();if(!l&&C.isBlob(p))throw new D("Blob is not supported. Use a Buffer instead.");return C.isArrayBuffer(p)||C.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function h(p,E,w){let M=p;if(p&&!w&&typeof p=="object"){if(C.endsWith(E,"{}"))E=o?E:E.slice(0,-2),p=JSON.stringify(p);else if(C.isArray(p)&&Ou(p)||(C.isFileList(p)||C.endsWith(E,"[]"))&&(M=C.toArray(p)))return E=us(E),M.forEach(function(L,F){!(C.isUndefined(L)||L===null)&&e.append(a===!0?hs([E],F,s):a===null?E:E+"[]",u(L))}),!1}return Kn(p)?!0:(e.append(hs(w,E,s),u(p)),!1)}const f=[],m=Object.assign(Lu,{defaultVisitor:h,convertValue:u,isVisitable:Kn});function g(p,E){if(!C.isUndefined(p)){if(f.indexOf(p)!==-1)throw Error("Circular reference detected in "+E.join("."));f.push(p),C.forEach(p,function(M,O){(!(C.isUndefined(M)||M===null)&&r.call(e,M,C.isString(O)?O.trim():O,E,m))===!0&&g(M,E?E.concat(O):[O])}),f.pop()}}if(!C.isObject(t))throw new TypeError("data must be an object");return g(t),e}function fs(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(o){return e[o]})}function ei(t,e){this._pairs=[],t&&cn(t,this,e)}const ms=ei.prototype;ms.append=function(e,n){this._pairs.push([e,n])},ms.toString=function(e){const n=e?function(o){return e.call(this,o,fs)}:fs;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function _u(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ps(t,e,n){if(!e)return t;const o=n&&n.encode||_u,r=n&&n.serialize;let s;if(r?s=r(e,n):s=C.isURLSearchParams(e)?e.toString():new ei(e,n).toString(o),s){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class gs{constructor(){this.handlers=[]}use(e,n,o){return this.handlers.push({fulfilled:e,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){C.forEach(this.handlers,function(o){o!==null&&e(o)})}}const ys={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Hu={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:ei,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},ti=typeof window<"u"&&typeof document<"u",ni=typeof navigator=="object"&&navigator||void 0,qu=ti&&(!ni||["ReactNative","NativeScript","NS"].indexOf(ni.product)<0),Uu=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Wu=ti&&window.location.href||"http://localhost",fe={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ti,hasStandardBrowserEnv:qu,hasStandardBrowserWebWorkerEnv:Uu,navigator:ni,origin:Wu},Symbol.toStringTag,{value:"Module"})),...Hu};function ju(t,e){return cn(t,new fe.classes.URLSearchParams,Object.assign({visitor:function(n,o,r,s){return fe.isNode&&C.isBuffer(n)?(this.append(o,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function Gu(t){return C.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Zu(t){const e={},n=Object.keys(t);let o;const r=n.length;let s;for(o=0;o<r;o++)s=n[o],e[s]=t[s];return e}function ws(t){function e(n,o,r,s){let a=n[s++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),l=s>=n.length;return a=!a&&C.isArray(r)?r.length:a,l?(C.hasOwnProp(r,a)?r[a]=[r[a],o]:r[a]=o,!c):((!r[a]||!C.isObject(r[a]))&&(r[a]=[]),e(n,o,r[a],s)&&C.isArray(r[a])&&(r[a]=Zu(r[a])),!c)}if(C.isFormData(t)&&C.isFunction(t.entries)){const n={};return C.forEachEntry(t,(o,r)=>{e(Gu(o),r,n,0)}),n}return null}function Xu(t,e,n){if(C.isString(t))try{return(e||JSON.parse)(t),C.trim(t)}catch(o){if(o.name!=="SyntaxError")throw o}return(0,JSON.stringify)(t)}const Bt={transitional:ys,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const o=n.getContentType()||"",r=o.indexOf("application/json")>-1,s=C.isObject(e);if(s&&C.isHTMLForm(e)&&(e=new FormData(e)),C.isFormData(e))return r?JSON.stringify(ws(e)):e;if(C.isArrayBuffer(e)||C.isBuffer(e)||C.isStream(e)||C.isFile(e)||C.isBlob(e)||C.isReadableStream(e))return e;if(C.isArrayBufferView(e))return e.buffer;if(C.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1)return ju(e,this.formSerializer).toString();if((c=C.isFileList(e))||o.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return cn(c?{"files[]":e}:e,l&&new l,this.formSerializer)}}return s||r?(n.setContentType("application/json",!1),Xu(e)):e}],transformResponse:[function(e){const n=this.transitional||Bt.transitional,o=n&&n.forcedJSONParsing,r=this.responseType==="json";if(C.isResponse(e)||C.isReadableStream(e))return e;if(e&&C.isString(e)&&(o&&!this.responseType||r)){const a=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(c){if(a)throw c.name==="SyntaxError"?D.from(c,D.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:fe.classes.FormData,Blob:fe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};C.forEach(["delete","get","head","post","put","patch"],t=>{Bt.headers[t]={}});const Ju=C.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Yu=t=>{const e={};let n,o,r;return t&&t.split(`
|
|
32
|
+
***************************************************************************** */function Vo(t,e){var n,o;return t&&e?(n=""+t+e[0].toUpperCase()+e.slice(1),o=t+"-"+e):(n=t||e,o=t||e),{name:n,classname:o}}function Fo(t){return/^blob:/.test(t)}function Do(t){return Fo(t)||function(e){return/^data:/.test(e)}(t)}function it(t){return!!(t&&t.constructor&&t.call&&t.apply)}function ie(t){return t===void 0}function Lt(t){return typeof t=="object"&&t!==null}function $n(t,e,n){var o={};return Lt(t)?(Object.keys(e).forEach(function(r){ie(t[r])?o[r]=e[r]:Lt(e[r])?Lt(t[r])?o[r]=$n(t[r],e[r],n[r]):o[r]=t[r]?e[r]:n[r]:e[r]===!0||e[r]===!1?o[r]=!!t[r]:o[r]=t[r]}),o):t?e:n}function _t(t){var e=Number(t);return Number.isNaN(e)?t:e}function Oo(t){return typeof(t=="number"||function(e){return typeof e=="object"&&e!==null}(t)&&toString.call(t)=="[object Number]")&&!Lo(t)}function Lo(t){return t!=t}function _o(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}var wt=function(t,e){t===void 0&&(t={}),e===void 0&&(e={}),this.type="manipulateImage",this.move=t,this.scale=e},_l=function(t,e){e===void 0&&(e={}),this.type="resize",this.directions=t,this.params=e},An=function(t){this.type="move",this.directions=t},Hl=function(){function t(e,n,o,r,s){this.type="drag",this.nativeEvent=e,this.position=o,this.previousPosition=r,this.element=n,this.anchor=s}return t.prototype.shift=function(){var e=this,n=e.element,o=e.anchor,r=e.position;if(n){var s=n.getBoundingClientRect(),a=s.left,c=s.top;return{left:r.left-a-o.left,top:r.top-c-o.top}}return{left:0,top:0}},t}(),Nn={name:"DraggableElement",props:{classname:{type:String}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){if(!this.$refs.draggable)throw new Error('You should add ref "draggable" to your root element to use draggable mixin');this.touches=[],this.hovered=!1},methods:{onMouseOver:function(){this.hovered||(this.hovered=!0,this.$emit("enter"))},onMouseLeave:function(){this.hovered&&!this.touches.length&&(this.hovered=!1,this.$emit("leave"))},onTouchStart:function(t){t.cancelable&&!this.disabled&&t.touches.length===1&&(this.touches=je(t.touches),this.hovered||(this.$emit("enter"),this.hovered=!0),t.touches.length&&this.initAnchor(this.touches.reduce(function(e,n){return{clientX:e.clientX+n.clientX/t.touches.length,clientY:e.clientY+n.clientY/t.touches.length}},{clientX:0,clientY:0})),t.preventDefault&&t.preventDefault(),t.stopPropagation())},onTouchEnd:function(){this.processEnd()},onTouchMove:function(t){this.touches.length&&(this.processMove(t,t.touches),t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation())},onMouseDown:function(t){if(!this.disabled){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.initAnchor(e),t.stopPropagation()}},onMouseMove:function(t){this.touches.length&&(this.processMove(t,[{fake:!0,clientX:t.clientX,clientY:t.clientY}]),t.preventDefault&&t.preventDefault())},onMouseUp:function(){this.processEnd()},initAnchor:function(t){var e=this.$refs.draggable.getBoundingClientRect(),n=e.left,o=e.right,r=e.bottom,s=e.top;this.anchor={left:t.clientX-n,top:t.clientY-s,bottom:r-t.clientY,right:o-t.clientX}},processMove:function(t,e){var n=je(e);if(this.touches.length){if(this.touches.length===1&&n.length===1){var o=this.$refs.draggable;this.$emit("drag",new Hl(t,o,{left:n[0].clientX,top:n[0].clientY},{left:this.touches[0].clientX,top:this.touches[0].clientY},this.anchor))}this.touches=n}},processEnd:function(){this.touches.length&&this.$emit("drag-end"),this.hovered&&(this.$emit("leave"),this.hovered=!1),this.touches=[]}},emits:["drag","drag-end","leave","enter"]};Nn.render=function(t,e,n,o,r,s){return i.openBlock(),i.createBlock("div",{ref:"draggable",class:n.classname,onTouchstart:e[1]||(e[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:e[2]||(e[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)}),onMouseover:e[3]||(e[3]=function(){return s.onMouseOver&&s.onMouseOver.apply(s,arguments)}),onMouseleave:e[4]||(e[4]=function(){return s.onMouseLeave&&s.onMouseLeave.apply(s,arguments)})},[i.renderSlot(t.$slots,"default")],34)};var Pn=xe("vue-handler-wrapper"),Ho={name:"HandlerWrapper",components:{DraggableElement:Nn},props:{horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},computed:{classes:function(){var t;if(this.horizontalPosition||this.verticalPosition){var e,n=Vo(this.horizontalPosition,this.verticalPosition);t=Pn((be(e={},n.classname,!0),be(e,"disabled",this.disabled),e))}else t=Pn({disabled:this.disabled});return{root:t,draggable:Pn("draggable")}}},emits:["leave","enter","drag","drag-end"]};Ho.render=function(t,e,n,o,r,s){var a=i.resolveComponent("DraggableElement");return i.openBlock(),i.createBlock("div",{class:s.classes.root},[i.createVNode(a,{class:s.classes.draggable,onDrag:e[1]||(e[1]=function(c){return t.$emit("drag",c)}),onDragEnd:e[2]||(e[2]=function(c){return t.$emit("drag-end")}),onLeave:e[3]||(e[3]=function(c){return t.$emit("leave")}),onEnter:e[4]||(e[4]=function(c){return t.$emit("enter")})},{default:i.withCtx(function(){return[i.renderSlot(t.$slots,"default")]}),_:3},8,["class"])],2)};var ql=xe("vue-line-wrapper"),qo={name:"LineWrapper",components:{DraggableElement:Nn},props:{position:{type:String,required:!0},disabled:{type:Boolean,default:!1}},computed:{classname:function(){var t;return ql((be(t={},this.position,!0),be(t,"disabled",this.disabled),t))}},emits:["leave","enter","drag","drag-end"]};qo.render=function(t,e,n,o,r,s){var a=i.resolveComponent("DraggableElement");return i.openBlock(),i.createBlock(a,{class:s.classname,onDrag:e[1]||(e[1]=function(c){return t.$emit("drag",c)}),onDragEnd:e[2]||(e[2]=function(c){return t.$emit("drag-end")}),onLeave:e[3]||(e[3]=function(c){return t.$emit("leave")}),onEnter:e[4]||(e[4]=function(c){return t.$emit("enter")})},{default:i.withCtx(function(){return[i.renderSlot(t.$slots,"default")]}),_:3},8,["class"])};var Ae=["left","right","top","bottom"],Ul=["left","right"],Wl=["top","bottom"],jl=["left","top"],Gl=["fill-area","fit-area","stencil","none"],Uo={left:0,top:0,width:0,height:0};function Wo(t,e,n){return!(n=n||["width","height","left","top"]).some(function(o){return t[o]!==e[o]})}function Ne(t){return{left:t.left,top:t.top,right:t.left+t.width,bottom:t.top+t.height}}function ot(t,e){return{left:t.left-e.left,top:t.top-e.top}}function se(t){return{left:t.left+t.width/2,top:t.top+t.height/2}}function bt(t,e){var n={left:0,top:0,right:0,bottom:0};return Ae.forEach(function(o){var r=e[o],s=Ne(t)[o];n[o]=r!==void 0&&s!==void 0?o==="left"||o==="top"?Math.max(0,r-s):Math.max(0,s-r):0}),n}function Pe(t,e){return{left:t.left-e.left,top:t.top-e.top,width:t.width+e.left+e.right,height:t.height+e.top+e.bottom}}function Ht(t){return{left:-t.left,top:-t.top}}function he(t,e){return N(N({},t),{left:t.left+e.left,top:t.top+e.top})}function Ce(t,e,n,o){if(e!==1){if(n){var r=se(t);return{width:t.width*e,height:t.height*e,left:t.left+t.width*(1-e)/2+(n.left-r.left)*(1-e),top:t.top+t.height*(1-e)/2+(n.top-r.top)*(1-e)}}return{width:t.width*e,height:t.height*e,left:t.left+t.width*(1-e)/2,top:t.top+t.height*(1-e)/2}}return t}function j(t){return t.width/t.height}function rt(t,e){return Math.min(e.right!==void 0&&e.left!==void 0?(e.right-e.left)/t.width:1/0,e.bottom!==void 0&&e.top!==void 0?(e.bottom-e.top)/t.height:1/0)}function st(t,e){var n={left:0,top:0},o=bt(t,e);return o.left&&o.left>0?n.left=o.left:o.right&&o.right>0&&(n.left=-o.right),o.top&&o.top>0?n.top=o.top:o.bottom&&o.bottom>0&&(n.top=-o.bottom),n}function Tn(t,e){var n;return e.minimum&&t<e.minimum?n=e.minimum:e.maximum&&t>e.maximum&&(n=e.maximum),n}function jo(t,e){var n=j(t),o=j(e);return e.width<1/0&&e.height<1/0?n>o?{width:e.width,height:e.width/n}:{width:e.height*n,height:e.height}:e.width<1/0?{width:e.width,height:e.width/n}:e.height<1/0?{width:e.height*n,height:e.height}:t}function Go(t,e){var n=e*Math.PI/180;return{width:Math.abs(t.width*Math.cos(n))+Math.abs(t.height*Math.sin(n)),height:Math.abs(t.width*Math.sin(n))+Math.abs(t.height*Math.cos(n))}}function qe(t,e){var n=e*Math.PI/180;return{left:t.left*Math.cos(n)-t.top*Math.sin(n),top:t.left*Math.sin(n)+t.top*Math.cos(n)}}function qt(t,e){var n=bt(ae(t,e),e);return n.left+n.right+n.top+n.bottom?n.left+n.right>n.top+n.bottom?Math.min((t.width+n.left+n.right)/t.width,rt(t,e)):Math.min((t.height+n.top+n.bottom)/t.height,rt(t,e)):1}function ae(t,e,n){n===void 0&&(n=!1);var o=st(t,e);return he(t,n?Ht(o):o)}function zn(t){return{width:t.right!==void 0&&t.left!==void 0?t.right-t.left:1/0,height:t.bottom!==void 0&&t.top!==void 0?t.bottom-t.top:1/0}}function Zl(t,e){return N(N({},t),{minWidth:Math.min(e.width,t.minWidth),minHeight:Math.min(e.height,t.minHeight),maxWidth:Math.min(e.width,t.maxWidth),maxHeight:Math.min(e.height,t.maxHeight)})}function Zo(t,e,n){n===void 0&&(n=!0);var o={};return Ae.forEach(function(r){var s=t[r],a=e[r];s!==void 0&&a!==void 0?o[r]=r==="left"||r==="top"?n?Math.max(s,a):Math.min(s,a):n?Math.min(s,a):Math.max(s,a):a!==void 0?o[r]=a:s!==void 0&&(o[r]=s)}),o}function Ut(t,e){return Zo(t,e,!0)}function Xo(t){var e=t.size,n=t.aspectRatio,o=t.ignoreMinimum,r=t.sizeRestrictions;return!!((e.correctRatio||j(e)>=n.minimum&&j(e)<=n.maximum)&&e.height<=r.maxHeight&&e.width<=r.maxWidth&&e.width&&e.height&&(o||e.height>=r.minHeight&&e.width>=r.minWidth))}function Jo(t,e){return Math.pow(t.width-e.width,2)+Math.pow(t.height-e.height,2)}function Oe(t){var e=t.width,n=t.height,o=t.sizeRestrictions,r={minimum:t.aspectRatio&&t.aspectRatio.minimum||0,maximum:t.aspectRatio&&t.aspectRatio.maximum||1/0},s={width:Math.max(o.minWidth,Math.min(o.maxWidth,e)),height:Math.max(o.minHeight,Math.min(o.maxHeight,n))};function a(u,h){return h===void 0&&(h=!1),u.reduce(function(f,m){return Xo({size:m,aspectRatio:r,sizeRestrictions:o,ignoreMinimum:h})&&(!f||Jo(m,{width:e,height:n})<Jo(f,{width:e,height:n}))?m:f},null)}var c=[];r&&[r.minimum,r.maximum].forEach(function(u){u&&c.push({width:s.width,height:s.width/u,correctRatio:!0},{width:s.height*u,height:s.height,correctRatio:!0})}),Xo({size:s,aspectRatio:r,sizeRestrictions:o})&&c.push(s);var l=a(c)||a(c,!0);return l&&{width:l.width,height:l.height}}function Vn(t){var e=t.event,n=t.coordinates,o=t.positionRestrictions,r=o===void 0?{}:o,s=he(n,e.directions);return he(s,st(s,r))}function Xl(t){var e=t.coordinates,n=t.transform,o=t.imageSize,r=t.sizeRestrictions,s=t.positionRestrictions,a=t.aspectRatio,c=t.visibleArea,l=function(h,f){return Vn({coordinates:h,positionRestrictions:s,event:new An({left:f.left-h.left,top:f.top-h.top})})},u=N({},e);return(Array.isArray(n)?n:[n]).forEach(function(h){var f={};ie((f=typeof h=="function"?h({coordinates:u,imageSize:o,visibleArea:c}):h).width)&&ie(f.height)||(u=function(m,g){var p=N(N(N({},m),Oe({width:g.width,height:g.height,sizeRestrictions:r,aspectRatio:a})),{left:0,top:0});return l(p,{left:m.left,top:m.top})}(u,N(N({},u),f))),ie(f.left)&&ie(f.top)||(u=l(u,N(N({},u),f)))}),u}function Jl(t){t.event;var e=t.getAreaRestrictions,n=t.boundaries,o=t.coordinates,r=t.visibleArea;t.aspectRatio;var s=t.stencilSize,a=t.sizeRestrictions,c=t.positionRestrictions;t.stencilReference;var l,u,h,f=N({},o),m=N({},r),g=N({},s);l=j(g),u=j(f),h===void 0&&(h=.001),(l===0||u===0?Math.abs(u-l)<h:Math.abs(u/l)<1+h&&Math.abs(u/l)>1-h)||(f=N(N({},f),Oe({sizeRestrictions:a,width:f.width,height:f.height,aspectRatio:{minimum:j(g),maximum:j(g)}})));var p=qt(m=Ce(m,f.width*n.width/(m.width*g.width)),e({visibleArea:m,type:"resize"}));return p!==1&&(m=Ce(m,p),f=Ce(f,p)),m=ae(m=he(m,ot(se(f),se(m))),e({visibleArea:m,type:"move"})),{coordinates:f=ae(f,Ut(Ne(m),c)),visibleArea:m}}function Yl(t){var e=t.event,n=t.getAreaRestrictions,o=t.boundaries,r=t.coordinates,s=t.visibleArea;t.aspectRatio,t.stencilSize,t.sizeRestrictions;var a=t.positionRestrictions;t.stencilReference;var c=N({},r),l=N({},s);if(r&&s&&e.type!=="manipulateImage"){var u={width:0,height:0};l.width,o.width,j(o)>j(c)?(u.height=.8*o.height,u.width=u.height*j(c)):(u.width=.8*o.width,u.height=u.width*j(c));var h=qt(l=Ce(l,c.width*o.width/(l.width*u.width)),n({visibleArea:l,type:"resize"}));l=Ce(l,h),h!==1&&(u.height/=h,u.width/=h),l=ae(l=he(l,ot(se(c),se(l))),n({visibleArea:l,type:"move"})),c=ae(c,Ut(Ne(l),a))}return{coordinates:c,visibleArea:l}}function Ql(t){var e=t.event,n=t.coordinates,o=t.visibleArea,r=t.getAreaRestrictions,s=N({},o),a=N({},n);if(e.type==="setCoordinates"){var c=Math.max(0,a.width-s.width),l=Math.max(0,a.height-s.height);c>l?s=Ce(s,Math.min(a.width/s.width,rt(s,r({visibleArea:s,type:"resize"})))):l>c&&(s=Ce(s,Math.min(a.height/s.height,rt(s,r({visibleArea:s,type:"resize"}))))),s=ae(s=he(s,Ht(st(a,Ne(s)))),r({visibleArea:s,type:"move"}))}return{visibleArea:s,coordinates:a}}function Kl(t){var e=t.imageSize,n=t.visibleArea,o=t.coordinates,r=n||e;return{left:(n?n.left:0)+r.width/2-o.width/2,top:(n?n.top:0)+r.height/2-o.height/2}}function ec(t){var e=t.imageSize,n=t.visibleArea,o=t.aspectRatio,r=t.sizeRestrictions,s=n||e,a=Math.min(o.maximum||1/0,Math.max(o.minimum||0,j(s))),c=s.width<s.height?{width:.8*s.width,height:.8*s.width/a}:{height:.8*s.height,width:.8*s.height*a};return Oe(N(N({},c),{aspectRatio:o,sizeRestrictions:r}))}function tc(t){var e,n,o=t.imageSize,r=t.visibleArea,s=t.boundaries,a=t.aspectRatio,c=t.sizeRestrictions,l=t.stencilSize,u=r||o;return j(u)>j(s)?n=(e=l.height*u.height/s.height)*j(l):e=(n=l.width*u.width/s.width)/j(l),Oe({width:n,height:e,aspectRatio:a,sizeRestrictions:c})}function nc(t){var e=t.getAreaRestrictions,n=t.coordinates,o=t.imageSize,r=j(t.boundaries);if(n){var s={height:Math.max(n.height,o.height),width:Math.max(n.width,o.width)},a=jo({width:j(s)>r?s.width:s.height*r,height:j(s)>r?s.width/r:s.height},zn(e())),c={left:n.left+n.width/2-a.width/2,top:n.top+n.height/2-a.height/2,width:a.width,height:a.height},l=bt(n,Ne(N({left:0,top:0},o))),u={};return!l.left&&!l.right&&c.width<=o.width&&(u.left=0,u.right=o.width),!l.top&&!l.bottom&&c.height<=o.height&&(u.top=0,u.bottom=o.height),ae(c,u)}var h=j(o);return a={height:h>r?o.height:o.width/r,width:h>r?o.height*r:o.width},{left:o.width/2-a.width/2,top:o.height/2-a.height/2,width:a.width,height:a.height}}function Wt(t,e){return Zo(t,Ne(e))}function ic(t){var e=t.event,n=t.coordinates,o=t.visibleArea,r=t.sizeRestrictions,s=t.getAreaRestrictions,a=t.positionRestrictions,c=t.adjustStencil,l=e.scale,u=e.move,h=N({},o),f=N({},n),m=1,g=1,p=l.factor&&Math.abs(l.factor-1)>.001;h=he(h,{left:u.left||0,top:u.top||0});var E={stencil:{minimum:Math.max(r.minWidth?r.minWidth/f.width:0,r.minHeight?r.minHeight/f.height:0),maximum:Math.min(r.maxWidth?r.maxWidth/f.width:1/0,r.maxHeight?r.maxHeight/f.height:1/0,rt(f,a))},area:{maximum:rt(h,s({visibleArea:h,type:"resize"}))}};l.factor&&p&&(l.factor<1?(g=Math.max(l.factor,E.stencil.minimum))>1&&(g=1):l.factor>1&&(g=Math.min(l.factor,Math.min(E.area.maximum,E.stencil.maximum)))<1&&(g=1)),g&&(h=Ce(h,g,l.center));var w=n.left-o.left,M=o.width+o.left-(n.width+n.left),O=n.top-o.top,L=o.height+o.top-(n.height+n.top);return h=ae(h=he(h,st(h,{left:a.left!==void 0?a.left-w*g:void 0,top:a.top!==void 0?a.top-O*g:void 0,bottom:a.bottom!==void 0?a.bottom+L*g:void 0,right:a.right!==void 0?a.right+M*g:void 0})),s({visibleArea:h,type:"move"})),f.width=f.width*g,f.height=f.height*g,f.left=h.left+w*g,f.top=h.top+O*g,f=ae(f,Ut(Ne(h),a)),l.factor&&p&&c&&(l.factor>1?m=Math.min(E.area.maximum,l.factor)/g:l.factor<1&&(m=Math.max(f.height/h.height,f.width/h.width,l.factor/g)),m!==1&&(h=he(h=ae(h=Ce(h,m,l.factor>1?l.center:se(f)),s({visibleArea:h,type:"move"})),Ht(st(f,Ne(h)))))),{coordinates:f,visibleArea:h}}function oc(t){var e=t.aspectRatio,n=t.getAreaRestrictions,o=t.coordinates,r=t.visibleArea,s=t.sizeRestrictions,a=t.positionRestrictions,c=t.imageSize,l=t.previousImageSize,u=t.angle,h=N({},o),f=N({},r),m=qe(se(N({left:0,top:0},l)),u);return(h=N(N({},Oe({sizeRestrictions:s,aspectRatio:e,width:h.width,height:h.height})),qe(se(h),u))).left-=m.left-c.width/2+h.width/2,h.top-=m.top-c.height/2+h.height/2,f=Ce(f,qt(f,n({visibleArea:f,type:"resize"}))),{coordinates:h=ae(h,a),visibleArea:f=ae(f=he(f,ot(se(h),se(o))),n({visibleArea:f,type:"move"}))}}function rc(t){var e=t.flip,n=t.previousFlip,o=t.rotate,r=t.getAreaRestrictions,s=t.coordinates,a=t.visibleArea,c=t.imageSize,l=N({},s),u=N({},a),h=n.horizontal!==e.horizontal,f=n.vertical!==e.vertical;if(h||f){var m=qe({left:c.width/2,top:c.height/2},-o),g=qe(se(l),-o),p=qe({left:h?m.left-(g.left-m.left):g.left,top:f?m.top-(g.top-m.top):g.top},o);l=he(l,ot(p,se(l))),g=qe(se(u),-o),u=ae(u=he(u,ot(p=qe({left:h?m.left-(g.left-m.left):g.left,top:f?m.top-(g.top-m.top):g.top},o),se(u))),r({visibleArea:u,type:"move"}))}return{coordinates:l,visibleArea:u}}function Yo(t){var e=t.directions,n=t.coordinates,o=t.positionRestrictions,r=o===void 0?{}:o,s=t.sizeRestrictions,a=t.preserveRatio,c=t.compensate,l=N({},e),u=Pe(n,l).width,h=Pe(n,l).height;u<0&&(l.left<0&&l.right<0?(l.left=-(n.width-s.minWidth)/(l.left/l.right),l.right=-(n.width-s.minWidth)/(l.right/l.left)):l.left<0?l.left=-(n.width-s.minWidth):l.right<0&&(l.right=-(n.width-s.minWidth))),h<0&&(l.top<0&&l.bottom<0?(l.top=-(n.height-s.minHeight)/(l.top/l.bottom),l.bottom=-(n.height-s.minHeight)/(l.bottom/l.top)):l.top<0?l.top=-(n.height-s.minHeight):l.bottom<0&&(l.bottom=-(n.height-s.minHeight)));var f=bt(Pe(n,l),r);c&&(f.left&&f.left>0&&f.right===0?(l.right+=f.left,l.left-=f.left):f.right&&f.right>0&&f.left===0&&(l.left+=f.right,l.right-=f.right),f.top&&f.top>0&&f.bottom===0?(l.bottom+=f.top,l.top-=f.top):f.bottom&&f.bottom>0&&f.top===0&&(l.top+=f.bottom,l.bottom-=f.bottom),f=bt(Pe(n,l),r));var m={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if(Ae.forEach(function(E){var w=f[E];w&&l[E]&&(m[E]=Math.max(0,1-w/l[E]))}),a){var g=Math.min.apply(null,Ae.map(function(E){return m[E]}));g!==1/0&&Ae.forEach(function(E){l[E]*=g})}else Ae.forEach(function(E){m[E]!==1/0&&(l[E]*=m[E])});if(u=Pe(n,l).width,h=Pe(n,l).height,l.right+l.left&&(u>s.maxWidth?m.width=(s.maxWidth-n.width)/(l.right+l.left):u<s.minWidth&&(m.width=(s.minWidth-n.width)/(l.right+l.left))),l.bottom+l.top&&(h>s.maxHeight?m.height=(s.maxHeight-n.height)/(l.bottom+l.top):h<s.minHeight&&(m.height=(s.minHeight-n.height)/(l.bottom+l.top))),a){var p=Math.min(m.width,m.height);p!==1/0&&Ae.forEach(function(E){l[E]*=p})}else m.width!==1/0&&Ul.forEach(function(E){l[E]*=m.width}),m.height!==1/0&&Wl.forEach(function(E){l[E]*=m.height});return l}function jt(t,e,n){return e==0&&n==0?t/2:e==0?0:n==0?t:t*Math.abs(e/(e+n))}var sc=xe("vue-simple-handler"),ac=xe("vue-simple-handler-wrapper"),Fn={name:"SimpleHandler",components:{HandlerWrapper:Ho},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){var t,e=(be(t={},this.horizontalPosition,!!this.horizontalPosition),be(t,this.verticalPosition,!!this.verticalPosition),be(t,"".concat(this.horizontalPosition,"-").concat(this.verticalPosition),!!(this.verticalPosition&&this.horizontalPosition)),be(t,"hover",this.hover),t);return{default:K(sc(e),this.defaultClass,this.hover&&this.hoverClass),wrapper:K(ac(e),this.wrapperClass)}}},methods:{onDrag:function(t){this.$emit("drag",t)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};Fn.render=function(t,e,n,o,r,s){var a=i.resolveComponent("HandlerWrapper");return i.openBlock(),i.createBlock(a,{class:s.classes.wrapper,"vertical-position":n.verticalPosition,"horizontal-position":n.horizontalPosition,disabled:n.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:i.withCtx(function(){return[i.createVNode("div",{class:s.classes.default},null,2)]}),_:1},8,["class","vertical-position","horizontal-position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var lc=xe("vue-simple-line"),cc=xe("vue-simple-line-wrapper"),Dn={name:"SimpleLine",components:{LineWrapper:qo},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},position:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){return{root:K(lc(be({},this.position,!0)),this.defaultClass,this.hover&&this.hoverClass),wrapper:K(cc(be({},this.position,!0)),this.wrapperClass)}}},methods:{onDrag:function(t){this.$emit("drag",t)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};Dn.render=function(t,e,n,o,r,s){var a=i.resolveComponent("LineWrapper");return i.openBlock(),i.createBlock(a,{class:s.classes.wrapper,position:n.position,disabled:n.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:i.withCtx(function(){return[i.createVNode("div",{class:s.classes.root},null,2)]}),_:1},8,["class","position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var On=xe("vue-bounding-box"),dc=["east","west",null],uc=["south","north",null],Qo={name:"BoundingBox",props:{width:{type:Number},height:{type:Number},transitions:{type:Object},handlers:{type:Object,default:function(){return{eastNorth:!0,north:!0,westNorth:!0,west:!0,westSouth:!0,south:!0,eastSouth:!0,east:!0}}},handlersComponent:{type:[Object,String],default:function(){return Fn}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}},lines:{type:Object,default:function(){return{west:!0,north:!0,east:!0,south:!0}}},linesComponent:{type:[Object,String],default:function(){return Dn}},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},resizable:{type:Boolean,default:!0}},data:function(){var t=[];return dc.forEach(function(e){uc.forEach(function(n){if(e!==n){var o=Vo(e,n),r=o.name,s=o.classname;t.push({name:r,classname:s,verticalDirection:n,horizontalDirection:e})}})}),{points:t}},computed:{style:function(){var t={};return this.width&&this.height&&(t.width="".concat(this.width,"px"),t.height="".concat(this.height,"px"),this.transitions&&this.transitions.enabled&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction))),t},classes:function(){var t=this.handlersClasses,e=this.handlersWrappersClasses,n=this.linesClasses,o=this.linesWrappersClasses;return{root:On(),handlers:t,handlersWrappers:e,lines:n,linesWrappers:o}},lineNodes:function(){var t=this,e=[];return this.points.forEach(function(n){n.horizontalDirection&&n.verticalDirection||!t.lines[n.name]||e.push({name:n.name,component:t.linesComponent,class:K(t.classes.lines.default,t.classes.lines[n.name],!t.resizable&&t.classes.lines.disabled),wrapperClass:K(t.classes.linesWrappers.default,t.classes.linesWrappers[n.name],!t.resizable&&t.classes.linesWrappers.disabled),hoverClass:t.classes.lines.hover,verticalDirection:n.verticalDirection,horizontalDirection:n.horizontalDirection,disabled:!t.resizable})}),e},handlerNodes:function(){var t=this,e=[],n=this.width,o=this.height;return this.points.forEach(function(r){if(t.handlers[r.name]){var s={name:r.name,component:t.handlersComponent,class:K(t.classes.handlers.default,t.classes.handlers[r.name]),wrapperClass:K(t.classes.handlersWrappers.default,t.classes.handlersWrappers[r.name]),hoverClass:t.classes.handlers.hover,verticalDirection:r.verticalDirection,horizontalDirection:r.horizontalDirection,disabled:!t.resizable};if(n&&o){var a=r.horizontalDirection,c=r.verticalDirection,l=a==="east"?n:a==="west"?0:n/2,u=c==="south"?o:c==="north"?0:o/2;s.wrapperClass=On("handler"),s.wrapperStyle={transform:"translate(".concat(l,"px, ").concat(u,"px)")},t.transitions&&t.transitions.enabled&&(s.wrapperStyle.transition="".concat(t.transitions.time,"ms ").concat(t.transitions.timingFunction))}else s.wrapperClass=On("handler",be({},r.classname,!0));e.push(s)}}),e}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[]},methods:{onEnd:function(){this.$emit("resize-end")},onHandlerDrag:function(t,e,n){var o,r=t.shift(),s=r.left,a=r.top,c={left:0,right:0,top:0,bottom:0};e==="west"?c.left-=s:e==="east"&&(c.right+=s),n==="north"?c.top-=a:n==="south"&&(c.bottom+=a),!n&&e?o="width":n&&!e&&(o="height"),this.resizable&&this.$emit("resize",new _l(c,{allowedDirections:{left:e==="west"||!e,right:e==="east"||!e,bottom:n==="south"||!n,top:n==="north"||!n},preserveAspectRatio:t.nativeEvent&&t.nativeEvent.shiftKey,respectDirection:o}))}},emits:["resize","resize-end"]};Qo.render=function(t,e,n,o,r,s){return i.openBlock(),i.createBlock("div",{ref:"box",class:s.classes.root,style:s.style},[i.renderSlot(t.$slots,"default"),i.createVNode("div",null,[(i.openBlock(!0),i.createBlock(i.Fragment,null,i.renderList(s.lineNodes,function(a){return i.openBlock(),i.createBlock(i.resolveDynamicComponent(a.component),{key:a.name,"default-class":a.class,"hover-class":a.hoverClass,"wrapper-class":a.wrapperClass,position:a.name,disabled:a.disabled,onDrag:function(c){return s.onHandlerDrag(c,a.horizontalDirection,a.verticalDirection)},onDragEnd:e[1]||(e[1]=function(c){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","position","disabled","onDrag"])}),128))]),(i.openBlock(!0),i.createBlock(i.Fragment,null,i.renderList(s.handlerNodes,function(a){return i.openBlock(),i.createBlock("div",{key:a.name,style:a.wrapperStyle,class:a.wrapperClass},[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(a.component),{"default-class":a.class,"hover-class":a.hoverClass,"wrapper-class":a.wrapperClass,"horizontal-position":a.horizontalDirection,"vertical-position":a.verticalDirection,disabled:a.disabled,onDrag:function(c){return s.onHandlerDrag(c,a.horizontalDirection,a.verticalDirection)},onDragEnd:e[2]||(e[2]=function(c){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","horizontal-position","vertical-position","disabled","onDrag"]))],6)}),128))],6)};var hc=xe("vue-draggable-area"),Ko={name:"DraggableArea",props:{movable:{type:Boolean,default:!0},activationDistance:{type:Number,default:20}},computed:{classnames:function(){return{default:hc()}}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[],this.touchStarted=!1},methods:{onTouchStart:function(t){if(t.cancelable){var e=this.movable&&t.touches.length===1;e&&(this.touches=je(t.touches)),(this.touchStarted||e)&&(t.preventDefault(),t.stopPropagation())}},onTouchEnd:function(){this.touchStarted=!1,this.processEnd()},onTouchMove:function(t){this.touches.length>=1&&(this.touchStarted?(this.processMove(t,t.touches),t.preventDefault(),t.stopPropagation()):_o({x:this.touches[0].clientX,y:this.touches[0].clientY},{x:t.touches[0].clientX,y:t.touches[0].clientY})>this.activationDistance&&(this.initAnchor({clientX:t.touches[0].clientX,clientY:t.touches[0].clientY}),this.touchStarted=!0))},onMouseDown:function(t){if(this.movable&&t.button===0){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.initAnchor(e),t.stopPropagation()}},onMouseMove:function(t){this.touches.length&&(this.processMove(t,[{fake:!0,clientX:t.clientX,clientY:t.clientY}]),t.preventDefault&&t.cancelable&&t.preventDefault(),t.stopPropagation())},onMouseUp:function(){this.processEnd()},initAnchor:function(t){var e=this.$refs.container.getBoundingClientRect(),n=e.left,o=e.top;this.anchor={x:t.clientX-n,y:t.clientY-o}},processMove:function(t,e){var n=je(e);if(this.touches.length){var o=this.$refs.container.getBoundingClientRect(),r=o.left,s=o.top;this.touches.length===1&&n.length===1&&this.$emit("move",new An({left:n[0].clientX-(r+this.anchor.x),top:n[0].clientY-(s+this.anchor.y)}))}},processEnd:function(){this.touches.length&&this.$emit("move-end"),this.touches=[]}},emits:["move","move-end"]};Ko.render=function(t,e,n,o,r,s){return i.openBlock(),i.createBlock("div",{ref:"container",onTouchstart:e[1]||(e[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:e[2]||(e[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)})},[i.renderSlot(t.$slots,"default")],544)};function Ln(t){var e,n;return{rotate:t.rotate||0,flip:{horizontal:((e=t==null?void 0:t.flip)===null||e===void 0?void 0:e.horizontal)||!1,vertical:((n=t==null?void 0:t.flip)===null||n===void 0?void 0:n.vertical)||!1}}}function fc(t){return new Promise(function(e,n){try{if(t)if(/^data:/i.test(t))e(function(l){l=l.replace(/^data:([^;]+);base64,/gim,"");for(var u=atob(l),h=u.length,f=new ArrayBuffer(h),m=new Uint8Array(f),g=0;g<h;g++)m[g]=u.charCodeAt(g);return f}(t));else if(/^blob:/i.test(t)){var o=new FileReader;o.onload=function(l){e(l.target.result)},s=t,a=function(l){o.readAsArrayBuffer(l)},(c=new XMLHttpRequest).open("GET",s,!0),c.responseType="blob",c.onload=function(){this.status!=200&&this.status!==0||a(this.response)},c.send()}else{var r=new XMLHttpRequest;r.onreadystatechange=function(){r.readyState===4&&(r.status===200||r.status===0?e(r.response):n("Warning: could not load an image to parse its orientation"),r=null)},r.onprogress=function(){r.getResponseHeader("content-type")!=="image/jpeg"&&r.abort()},r.withCredentials=!1,r.open("GET",t,!0),r.responseType="arraybuffer",r.send(null)}else n("Error: the image is empty")}catch(l){n(l)}var s,a,c})}function er(t){var e=t.rotate,n=t.flip,o=t.scaleX,r=t.scaleY,s="";return s+=" rotate("+e+"deg) ",s+=" scaleX("+o*(n.horizontal?-1:1)+") ",s+=" scaleY("+r*(n.vertical?-1:1)+") "}function mc(t){try{var e,n=new DataView(t),o=void 0,r=void 0,s=void 0,a=void 0;if(n.getUint8(0)===255&&n.getUint8(1)===216)for(var c=n.byteLength,l=2;l+1<c;){if(n.getUint8(l)===255&&n.getUint8(l+1)===225){s=l;break}l++}if(s&&(o=s+10,function(g,p,E){var w,M="";for(w=p,E+=p;w<E;w++)M+=String.fromCharCode(g.getUint8(w));return M}(n,s+4,4)==="Exif")){var u=n.getUint16(o);if(((r=u===18761)||u===19789)&&n.getUint16(o+2,r)===42){var h=n.getUint32(o+4,r);h>=8&&(a=o+h)}}if(a){for(var f=n.getUint16(a,r),m=0;m<f;m++)if(l=a+12*m+2,n.getUint16(l,r)===274){l+=8,e=n.getUint16(l,r),n.setUint16(l,1,r);break}}return e}catch{return null}}function tr(t,e){var n=e.getBoundingClientRect(),o=n.left,r=n.top,s={left:0,top:0},a=0;return t.forEach(function(c){s.left+=(c.clientX-o)/t.length,s.top+=(c.clientY-r)/t.length}),t.forEach(function(c){a+=_o({x:s.left,y:s.top},{x:c.clientX-o,y:c.clientY-r})}),{centerMass:s,spread:a,count:t.length}}var nr={props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0},eventsFilter:{type:Function,required:!1}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},created:function(){this.transforming=!1,this.debouncedProcessEnd=Rn(this.processEnd),this.touches=[]},methods:{processMove:function(t,e){if(this.touches.length){if(this.touches.length===1&&e.length===1)this.$emit("move",new wt({left:this.touches[0].clientX-e[0].clientX,top:this.touches[0].clientY-e[0].clientY}));else if(this.touches.length>1&&this.touchResize){var n=tr(e,this.$refs.container),o=this.oldGeometricProperties;o.count===n.count&&o.count>1&&this.$emit("resize",new wt({left:o.centerMass.left-n.centerMass.left,top:o.centerMass.top-n.centerMass.top},{factor:o.spread/n.spread,center:n.centerMass})),this.oldGeometricProperties=n}this.touches=e}},processEnd:function(){this.transforming&&(this.transforming=!1,this.$emit("transform-end"))},processStart:function(){this.transforming=!0,this.debouncedProcessEnd.clear()},processEvent:function(t){return this.eventsFilter?this.eventsFilter(t,this.transforming)!==!1:(t.preventDefault(),t.stopPropagation(),!0)},onTouchStart:function(t){if(t.cancelable&&(this.touchMove||this.touchResize&&t.touches.length>1)&&this.processEvent(t)){var e=this.$refs.container,n=e.getBoundingClientRect(),o=n.left,r=n.top,s=n.bottom,a=n.right;this.touches=je(t.touches).filter(function(c){return c.clientX>o&&c.clientX<a&&c.clientY>r&&c.clientY<s}),this.oldGeometricProperties=tr(this.touches,e)}},onTouchEnd:function(t){t.touches.length===0&&(this.touches=[],this.processEnd())},onTouchMove:function(t){var e=this;if(this.touches.length){var n=je(t.touches).filter(function(o){return!o.identifier||e.touches.find(function(r){return r.identifier===o.identifier})});this.processEvent(t)&&(this.processMove(t,n),this.processStart())}},onMouseDown:function(t){if(this.mouseMove&&"buttons"in t&&t.buttons===1&&this.processEvent(t)){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.processStart()}},onMouseMove:function(t){this.touches.length&&this.processEvent(t)&&this.processMove(t,[{clientX:t.clientX,clientY:t.clientY}])},onMouseUp:function(){this.touches=[],this.processEnd()},onWheel:function(t){if(this.wheelResize&&this.processEvent(t)){var e=this.$refs.container.getBoundingClientRect(),n=e.left,o=e.top,r=1+this.wheelResize.ratio*(a=t.deltaY||t.detail||t.wheelDelta,(c=+a)==0||Lo(c)?c:c>0?1:-1),s={left:t.clientX-n,top:t.clientY-o};this.$emit("resize",new wt({},{factor:r,center:s})),this.touches.length||this.debouncedProcessEnd()}var a,c}},emits:["resize","move","transform-end"]};nr.render=function(t,e,n,o,r,s){return i.openBlock(),i.createBlock("div",{ref:"container",onTouchstart:e[1]||(e[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:e[2]||(e[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)}),onWheel:e[3]||(e[3]=function(){return s.onWheel&&s.onWheel.apply(s,arguments)})},[i.renderSlot(t.$slots,"default")],544)};var _n={components:{TransformableImage:nr},props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0}},emits:["resize","move"]};_n.render=function(t,e,n,o,r,s){var a=i.resolveComponent("transformable-image");return i.openBlock(),i.createBlock(a,{"touch-move":n.touchMove,"touch-resize":n.touchResize,"mouse-move":n.mouseMove,"wheel-resize":n.wheelResize,onMove:e[1]||(e[1]=function(c){return t.$emit("move",c)}),onResize:e[2]||(e[2]=function(c){return t.$emit("resize",c)})},{default:i.withCtx(function(){return[i.renderSlot(t.$slots,"default")]}),_:3},8,["touch-move","touch-resize","mouse-move","wheel-resize"])};var Gt=xe("vue-preview"),ir={props:{coordinates:{type:Object},transitions:{type:Object},image:{type:Object,default:function(){return{}}},imageClass:{type:String},width:{type:Number},height:{type:Number},fill:{type:Boolean}},data:function(){return{calculatedImageSize:{width:0,height:0},calculatedSize:{width:0,height:0}}},computed:{classes:function(){return{root:Gt({fill:this.fill}),wrapper:Gt("wrapper"),imageWrapper:Gt("image-wrapper"),image:K(Gt("image"),this.imageClass)}},style:function(){if(this.fill)return{};var t={};return this.width&&(t.width="".concat(this.size.width,"px")),this.height&&(t.height="".concat(this.size.height,"px")),this.transitions&&this.transitions.enabled&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),t},wrapperStyle:function(){var t={width:"".concat(this.size.width,"px"),height:"".concat(this.size.height,"px"),left:"calc(50% - ".concat(this.size.width/2,"px)"),top:"calc(50% - ".concat(this.size.height/2,"px)")};return this.transitions&&this.transitions.enabled&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),t},imageStyle:function(){if(this.coordinates&&this.image){var t=this.coordinates.width/this.size.width,e=W(W({rotate:0,flip:{horizontal:!1,vertical:!1}},this.image.transforms),{},{scaleX:1/t,scaleY:1/t}),n=this.imageSize.width,o=this.imageSize.height,r=Go({width:n,height:o},e.rotate),s={width:"".concat(n,"px"),height:"".concat(o,"px"),left:"0px",top:"0px"},a={rotate:{left:(n-r.width)*e.scaleX/2,top:(o-r.height)*e.scaleY/2},scale:{left:(1-e.scaleX)*n/2,top:(1-e.scaleY)*o/2}};return s.transform=`translate(
|
|
33
|
+
`.concat(-this.coordinates.left/t-a.rotate.left-a.scale.left,"px,").concat(-this.coordinates.top/t-a.rotate.top-a.scale.top,"px) ")+er(e),this.transitions&&this.transitions.enabled&&(s.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),s}return{}},size:function(){return{width:this.width||this.calculatedSize.width,height:this.height||this.calculatedSize.height}},imageSize:function(){return{width:this.image.width||this.calculatedImageSize.width,height:this.image.height||this.calculatedImageSize.height}}},watch:{image:function(t){(t.width||t.height)&&this.onChangeImage()}},mounted:function(){var t=this;this.onChangeImage(),this.$refs.image.addEventListener("load",function(){t.refreshImage()}),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh)},methods:{refreshImage:function(){var t=this.$refs.image;this.calculatedImageSize.height=t.naturalHeight,this.calculatedImageSize.width=t.naturalWidth},refresh:function(){var t=this.$refs.root;this.width||(this.calculatedSize.width=t.clientWidth),this.height||(this.calculatedSize.height=t.clientHeight)},onChangeImage:function(){var t=this.$refs.image;t&&t.complete&&this.refreshImage(),this.refresh()}}};ir.render=function(t,e,n,o,r,s){return i.openBlock(),i.createBlock("div",{ref:"root",class:s.classes.root,style:s.style},[i.createVNode("div",{ref:"wrapper",class:s.classes.wrapper,style:s.wrapperStyle},[i.withDirectives(i.createVNode("img",{ref:"image",src:n.image&&n.image.src,class:s.classes.image,style:s.imageStyle},null,14,["src"]),[[i.vShow,n.image&&n.image.src]])],6)],6)};var or={components:{Preview:ir},inheritAttrs:!1};or.render=function(t,e,n,o,r,s){var a=i.resolveComponent("preview");return i.openBlock(),i.createBlock(a,i.mergeProps(t.$attrs,{fill:!0}),null,16)};var Hn=xe("vue-rectangle-stencil"),rr={name:"RectangleStencil",components:{StencilPreview:or,BoundingBox:Qo,DraggableArea:Ko},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return Fn}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return Dn}},aspectRatio:{type:[Number,String]},minAspectRatio:{type:[Number,String]},maxAspectRatio:{type:[Number,String]},movable:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},transitions:{type:Object},movingClass:{type:String},resizingClass:{type:String},previewClass:{type:String},boundingBoxClass:{type:String},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}}},data:function(){return{moving:!1,resizing:!1}},computed:{classes:function(){return{stencil:K(Hn({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:K(Hn("preview"),this.previewClass),boundingBox:K(Hn("bounding-box"),this.boundingBoxClass)}},style:function(){var t=this.stencilCoordinates,e=t.height,n=t.width,o=t.left,r=t.top,s={width:"".concat(n,"px"),height:"".concat(e,"px"),transform:"translate(".concat(o,"px, ").concat(r,"px)")};return this.transitions&&this.transitions.enabled&&(s.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),s}},methods:{onMove:function(t){this.$emit("move",t),this.moving=!0},onMoveEnd:function(){this.$emit("move-end"),this.moving=!1},onResize:function(t){this.$emit("resize",t),this.resizing=!0},onResizeEnd:function(){this.$emit("resize-end"),this.resizing=!1},aspectRatios:function(){return{minimum:this.aspectRatio||this.minAspectRatio,maximum:this.aspectRatio||this.maxAspectRatio}}},emits:["resize","resize-end","move","move-end"]};rr.render=function(t,e,n,o,r,s){var a=i.resolveComponent("stencil-preview"),c=i.resolveComponent("draggable-area"),l=i.resolveComponent("bounding-box");return i.openBlock(),i.createBlock("div",{class:s.classes.stencil,style:s.style},[i.createVNode(l,{width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,transitions:n.transitions,class:s.classes.boundingBox,handlers:n.handlers,"handlers-component":n.handlersComponent,"handlers-classes":n.handlersClasses,"handlers-wrappers-classes":n.handlersWrappersClasses,lines:n.lines,"lines-component":n.linesComponent,"lines-classes":n.linesClasses,"lines-wrappers-classes":n.linesWrappersClasses,resizable:n.resizable,onResize:s.onResize,onResizeEnd:s.onResizeEnd},{default:i.withCtx(function(){return[i.createVNode(c,{movable:n.movable,onMove:s.onMove,onMoveEnd:s.onMoveEnd},{default:i.withCtx(function(){return[i.createVNode(a,{image:n.image,coordinates:n.coordinates,width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,class:s.classes.preview,transitions:n.transitions},null,8,["image","coordinates","width","height","class","transitions"])]}),_:1},8,["movable","onMove","onMoveEnd"])]}),_:1},8,["width","height","transitions","class","handlers","handlers-component","handlers-classes","handlers-wrappers-classes","lines","lines-component","lines-classes","lines-wrappers-classes","resizable","onResize","onResizeEnd"])],6)};var pc=["transitions"],Le=xe("vue-advanced-cropper"),sr={name:"Cropper",components:{BackgroundWrapper:_n},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return rr}},backgroundWrapperComponent:{type:[Object,String],default:function(){return _n}},stencilProps:{type:Object,default:function(){return{}}},autoZoom:{type:Boolean,default:!1},imageClass:{type:String},boundariesClass:{type:String},backgroundClass:{type:String},foregroundClass:{type:String},minWidth:{type:[Number,String]},minHeight:{type:[Number,String]},maxWidth:{type:[Number,String]},maxHeight:{type:[Number,String]},debounce:{type:[Boolean,Number],default:500},transitions:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},canvas:{type:[Object,Boolean],default:!0},crossOrigin:{type:[Boolean,String],default:void 0},transitionTime:{type:Number,default:300},imageRestriction:{type:String,default:"fit-area",validator:function(t){return Gl.indexOf(t)!==-1}},roundResult:{type:Boolean,default:!0},defaultSize:{type:[Function,Object]},defaultPosition:{type:[Function,Object]},defaultVisibleArea:{type:[Function,Object]},defaultTransforms:{type:[Function,Object]},defaultBoundaries:{type:[Function,String],validator:function(t){return!(typeof t=="string"&&t!=="fill"&&t!=="fit")}},priority:{type:String,default:"coordinates"},stencilSize:{type:[Object,Function]},resizeImage:{type:[Boolean,Object],default:!0},moveImage:{type:[Boolean,Object],default:!0},autoZoomAlgorithm:{type:Function},resizeAlgorithm:{type:Function,default:function(t){var e=t.event,n=t.coordinates,o=t.aspectRatio,r=t.positionRestrictions,s=t.sizeRestrictions,a=N(N({},n),{right:n.left+n.width,bottom:n.top+n.height}),c=e.params||{},l=N({},e.directions),u=c.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};s.widthFrozen&&(l.left=0,l.right=0),s.heightFrozen&&(l.top=0,l.bottom=0),Ae.forEach(function(F){u[F]||(l[F]=0)});var h=Pe(a,l=Yo({coordinates:a,directions:l,sizeRestrictions:s,positionRestrictions:r})).width,f=Pe(a,l).height,m=c.preserveRatio?j(a):Tn(h/f,o);if(m){var g=c.respectDirection;if(g||(g=a.width>=a.height||m===1?"width":"height"),g==="width"){var p=h/m-a.height;if(u.top&&u.bottom){var E=l.top,w=l.bottom;l.bottom=jt(p,w,E),l.top=jt(p,E,w)}else u.bottom?l.bottom=p:u.top?l.top=p:u.right?l.right=0:u.left&&(l.left=0)}else if(g==="height"){var M=a.width-f*m;if(u.left&&u.right){var O=l.left,L=l.right;l.left=-jt(M,O,L),l.right=-jt(M,L,O)}else u.left?l.left=-M:u.right?l.right=-M:u.top?l.top=0:u.bottom&&(l.bottom=0)}l=Yo({directions:l,coordinates:a,sizeRestrictions:s,positionRestrictions:r,preserveRatio:!0,compensate:c.compensate})}return h=Pe(a,l).width,f=Pe(a,l).height,(m=c.preserveRatio?j(a):Tn(h/f,o))&&Math.abs(m-h/f)>.001&&Ae.forEach(function(F){u[F]||(l[F]=0)}),Vn({event:new An({left:-l.left,top:-l.top}),coordinates:{width:n.width+l.right+l.left,height:n.height+l.top+l.bottom,left:n.left,top:n.top},positionRestrictions:r})}},moveAlgorithm:{type:Function,default:Vn},initStretcher:{type:Function,default:function(t){var e=t.stretcher,n=t.imageSize,o=j(n);e.style.width=n.width+"px",e.style.height=e.clientWidth/o+"px",e.style.width=e.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(t){var e=t.visibleArea,n=t.coordinates,o=t.aspectRatio,r=t.sizeRestrictions,s=t.positionRestrictions,a=N(N({},n),Oe({width:n.width,height:n.height,aspectRatio:o,sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minHeight:Math.min(e.height,r.minHeight),minWidth:Math.min(e.width,r.minWidth)}}));return a=ae(a=he(a,ot(se(n),se(a))),Ut(Ne(e),s))}},fitVisibleArea:{type:Function,default:function(t){var e=t.visibleArea,n=t.boundaries,o=t.getAreaRestrictions,r=t.coordinates,s=N({},e);s.height=s.width/j(n),s.top+=(e.height-s.height)/2,(r.height-s.height>0||r.width-s.width>0)&&(s=Ce(s,Math.max(r.height/s.height,r.width/s.width)));var a=Ht(st(r,Ne(s=Ce(s,qt(s,o({visibleArea:s,type:"resize"}))))));return s.width<r.width&&(a.left=0),s.height<r.height&&(a.top=0),s=ae(s=he(s,a),o({visibleArea:s,type:"move"}))}},areaRestrictionsAlgorithm:{type:Function,default:function(t){var e=t.visibleArea,n=t.boundaries,o=t.imageSize,r=t.imageRestriction,s=t.type,a={};return r==="fill-area"?a={left:0,top:0,right:o.width,bottom:o.height}:r==="fit-area"&&(j(n)>j(o)?(a={top:0,bottom:o.height},e&&s==="move"&&(e.width>o.width?(a.left=-(e.width-o.width)/2,a.right=o.width-a.left):(a.left=0,a.right=o.width))):(a={left:0,right:o.width},e&&s==="move"&&(e.height>o.height?(a.top=-(e.height-o.height)/2,a.bottom=o.height-a.top):(a.top=0,a.bottom=o.height)))),a}},sizeRestrictionsAlgorithm:{type:Function,default:function(t){return{minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight}}},positionRestrictionsAlgorithm:{type:Function,default:function(t){var e=t.imageSize,n={};return t.imageRestriction!=="none"&&(n={left:0,top:0,right:e.width,bottom:e.height}),n}}},data:function(){return{transitionsActive:!1,imageLoaded:!1,imageAttributes:{width:null,height:null,crossOrigin:null,src:null},defaultImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},appliedImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},boundaries:{width:0,height:0},visibleArea:null,coordinates:W({},Uo)}},computed:{image:function(){return{src:this.imageAttributes.src,width:this.imageAttributes.width,height:this.imageAttributes.height,transforms:this.imageTransforms}},imageTransforms:function(){return{rotate:this.appliedImageTransforms.rotate,flip:{horizontal:this.appliedImageTransforms.flip.horizontal,vertical:this.appliedImageTransforms.flip.vertical},translateX:this.visibleArea?this.visibleArea.left/this.coefficient:0,translateY:this.visibleArea?this.visibleArea.top/this.coefficient:0,scaleX:1/this.coefficient,scaleY:1/this.coefficient}},imageSize:function(){var t=function(e){return e*Math.PI/180}(this.imageTransforms.rotate);return{width:Math.abs(this.imageAttributes.width*Math.cos(t))+Math.abs(this.imageAttributes.height*Math.sin(t)),height:Math.abs(this.imageAttributes.width*Math.sin(t))+Math.abs(this.imageAttributes.height*Math.cos(t))}},initialized:function(){return!!(this.visibleArea&&this.imageLoaded)},settings:function(){var t=$n(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:$n(this.moveImage,{touch:!0,mouse:!0},{touch:!1,mouse:!1}),resizeImage:t}},coefficient:function(){return this.visibleArea?this.visibleArea.width/this.boundaries.width:0},areaRestrictions:function(){return this.imageLoaded?this.areaRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction,boundaries:this.boundaries}):{}},transitionsOptions:function(){return{enabled:this.transitionsActive,timingFunction:"ease-in-out",time:350}},sizeRestrictions:function(){if(this.boundaries.width&&this.boundaries.height&&this.imageSize.width&&this.imageSize.height){var t=this.sizeRestrictionsAlgorithm({imageSize:this.imageSize,minWidth:ie(this.minWidth)?0:_t(this.minWidth),minHeight:ie(this.minHeight)?0:_t(this.minHeight),maxWidth:ie(this.maxWidth)?1/0:_t(this.maxWidth),maxHeight:ie(this.maxHeight)?1/0:_t(this.maxHeight)});if(t=function(o){var r=o.areaRestrictions,s=o.sizeRestrictions,a=o.boundaries,c=o.positionRestrictions,l=N(N({},s),{minWidth:s.minWidth!==void 0?s.minWidth:0,minHeight:s.minHeight!==void 0?s.minHeight:0,maxWidth:s.maxWidth!==void 0?s.maxWidth:1/0,maxHeight:s.maxHeight!==void 0?s.maxHeight:1/0});c.left!==void 0&&c.right!==void 0&&(l.maxWidth=Math.min(l.maxWidth,c.right-c.left)),c.bottom!==void 0&&c.top!==void 0&&(l.maxHeight=Math.min(l.maxHeight,c.bottom-c.top));var u=zn(r),h=jo(a,u);return u.width<1/0&&(!l.maxWidth||l.maxWidth>h.width)&&(l.maxWidth=Math.min(l.maxWidth,h.width)),u.height<1/0&&(!l.maxHeight||l.maxHeight>h.height)&&(l.maxHeight=Math.min(l.maxHeight,h.height)),l.minWidth>l.maxWidth&&(l.minWidth=l.maxWidth,l.widthFrozen=!0),l.minHeight>l.maxHeight&&(l.minHeight=l.maxHeight,l.heightFrozen=!0),l}({sizeRestrictions:t,areaRestrictions:this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}),imageSize:this.imageSize,boundaries:this.boundaries,positionRestrictions:this.positionRestrictions,imageRestriction:this.imageRestriction,visibleArea:this.visibleArea,stencilSize:this.getStencilSize()}),this.visibleArea&&this.stencilSize){var e=this.getStencilSize(),n=zn(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));t.maxWidth=Math.min(t.maxWidth,n.width*e.width/this.boundaries.width),t.maxHeight=Math.min(t.maxHeight,n.height*e.height/this.boundaries.height),t.maxWidth<t.minWidth&&(t.minWidth=t.maxWidth),t.maxHeight<t.minHeight&&(t.minHeight=t.maxHeight)}return t}return{minWidth:0,minHeight:0,maxWidth:0,maxHeight:0}},positionRestrictions:function(){return this.positionRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction})},classes:function(){return{cropper:Le(),image:K(Le("image"),this.imageClass),stencil:Le("stencil"),boundaries:K(Le("boundaries"),this.boundariesClass),stretcher:K(Le("stretcher")),background:K(Le("background"),this.backgroundClass),foreground:K(Le("foreground"),this.foregroundClass),imageWrapper:K(Le("image-wrapper")),cropperWrapper:K(Le("cropper-wrapper"))}},stencilCoordinates:function(){if(this.initialized){var t=this.coordinates,e=t.width,n=t.height,o=t.left,r=t.top;return{width:e/this.coefficient,height:n/this.coefficient,left:(o-this.visibleArea.left)/this.coefficient,top:(r-this.visibleArea.top)/this.coefficient}}return this.defaultCoordinates()},boundariesStyle:function(){var t={width:this.boundaries.width?"".concat(Math.round(this.boundaries.width),"px"):"auto",height:this.boundaries.height?"".concat(Math.round(this.boundaries.height),"px"):"auto",transition:"opacity ".concat(this.transitionTime,"ms"),pointerEvents:this.imageLoaded?"all":"none"};return this.imageLoaded||(t.opacity="0"),t},imageStyle:function(){var t=this.imageAttributes.width>this.imageAttributes.height?{width:Math.min(1024,this.imageAttributes.width),height:Math.min(1024,this.imageAttributes.width)/(this.imageAttributes.width/this.imageAttributes.height)}:{height:Math.min(1024,this.imageAttributes.height),width:Math.min(1024,this.imageAttributes.height)*(this.imageAttributes.width/this.imageAttributes.height)},e={left:(t.width-this.imageSize.width)/(2*this.coefficient),top:(t.height-this.imageSize.height)/(2*this.coefficient)},n={left:(1-1/this.coefficient)*t.width/2,top:(1-1/this.coefficient)*t.height/2},o=W(W({},this.imageTransforms),{},{scaleX:this.imageTransforms.scaleX*(this.imageAttributes.width/t.width),scaleY:this.imageTransforms.scaleY*(this.imageAttributes.height/t.height)}),r={width:"".concat(t.width,"px"),height:"".concat(t.height,"px"),left:"0px",top:"0px",transform:"translate(".concat(-e.left-n.left-this.imageTransforms.translateX,"px, ").concat(-e.top-n.top-this.imageTransforms.translateY,"px)")+er(o)};return this.transitionsOptions.enabled&&(r.transition="".concat(this.transitionsOptions.time,"ms ").concat(this.transitionsOptions.timingFunction)),r}},watch:{src:function(){this.onChangeImage()},stencilComponent:function(){var t=this;this.$nextTick(function(){t.resetCoordinates(),t.runAutoZoom("setCoordinates"),t.onChange()})},minWidth:function(){this.onPropsChange()},maxWidth:function(){this.onPropsChange()},minHeight:function(){this.onPropsChange()},maxHeight:function(){this.onPropsChange()},imageRestriction:function(){this.reset()},stencilProps:function(t,e){["aspectRatio","minAspectRatio","maxAspectRatio"].find(function(n){return t[n]!==e[n]})&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=Rn(this.update,this.debounce),this.debouncedDisableTransitions=Rn(this.disableTransitions,this.transitionsOptions.time),this.awaiting=!1},mounted:function(){this.$refs.image.addEventListener("load",this.onSuccessLoadImage),this.$refs.image.addEventListener("error",this.onFailLoadImage),this.onChangeImage(),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh),this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.debouncedUpdate.clear(),this.debouncedDisableTransitions.clear()},methods:{getResult:function(){var t=this.initialized?this.prepareResult(W({},this.coordinates)):this.defaultCoordinates(),e={rotate:this.imageTransforms.rotate%360,flip:W({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var n=this;return{image:this.image,coordinates:t,visibleArea:this.visibleArea?W({},this.visibleArea):null,imageTransforms:e,get canvas(){return n.canvas?n.getCanvas():void 0}}}return{image:this.image,coordinates:t,visibleArea:this.visibleArea?W({},this.visibleArea):null,canvas:void 0,imageTransforms:e}},zoom:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.transitions,r=o===void 0||o;this.onManipulateImage(new wt({},{factor:1/t,center:e}),{normalize:!1,transitions:r})},move:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.transitions,r=o===void 0||o;this.onManipulateImage(new wt({left:t||0,top:e||0}),{normalize:!1,transitions:r})},setCoordinates:function(t){var e=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=n.autoZoom,r=o===void 0||o,s=n.transitions,a=s===void 0||s;this.$nextTick(function(){e.imageLoaded?(e.transitionsActive||(a&&e.enableTransitions(),e.coordinates=e.applyTransform(t),r&&e.runAutoZoom("setCoordinates"),a&&e.debouncedDisableTransitions()),e.onChange()):e.delayedTransforms=t})},refresh:function(){var t=this,e=this.$refs.image;if(this.src&&e)return this.initialized?this.updateVisibleArea().then(function(){t.onChange()}):this.resetVisibleArea().then(function(){t.onChange()})},reset:function(){var t=this;return this.resetVisibleArea().then(function(){t.onChange(!1)})},awaitRender:function(t){var e=this;this.awaiting||(this.awaiting=!0,this.$nextTick(function(){t(),e.awaiting=!1}))},prepareResult:function(t){return this.roundResult?function(e){var n=e.coordinates,o=e.sizeRestrictions,r=e.positionRestrictions,s={width:Math.round(n.width),height:Math.round(n.height),left:Math.round(n.left),top:Math.round(n.top)};return s.width>o.maxWidth?s.width=Math.floor(n.width):s.width<o.minWidth&&(s.width=Math.ceil(n.width)),s.height>o.maxHeight?s.height=Math.floor(n.height):s.height<o.minHeight&&(s.height=Math.ceil(n.height)),ae(s,r)}(W(W({},this.getPublicProperties()),{},{positionRestrictions:Wt(this.positionRestrictions,this.visibleArea),coordinates:t})):t},processAutoZoom:function(t,e,n,o){var r=this.autoZoomAlgorithm;r||(r=this.stencilSize?Jl:this.autoZoom?Yl:Ql);var s=r({event:{type:t,params:o},visibleArea:e,coordinates:n,boundaries:this.boundaries,aspectRatio:this.getAspectRatio(),positionRestrictions:this.positionRestrictions,getAreaRestrictions:this.getAreaRestrictions,sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize()});return W(W({},s),{},{changed:!Wo(s.visibleArea,e)||!Wo(s.coordinates,n)})},runAutoZoom:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.transitions,o=n!==void 0&&n,r=Ol(e,pc),s=this.processAutoZoom(t,this.visibleArea,this.coordinates,r),a=s.visibleArea,c=s.coordinates,l=s.changed;o&&l&&this.enableTransitions(),this.visibleArea=a,this.coordinates=c,o&&l&&this.debouncedDisableTransitions()},normalizeEvent:function(t){return function(e){var n=e.event,o=e.visibleArea,r=e.coefficient;if(n.type==="manipulateImage")return N(N({},n),{move:{left:n.move&&n.move.left?r*n.move.left:0,top:n.move&&n.move.top?r*n.move.top:0},scale:{factor:n.scale&&n.scale.factor?n.scale.factor:1,center:n.scale&&n.scale.center?{left:n.scale.center.left*r+o.left,top:n.scale.center.top*r+o.top}:null}});if(n.type==="resize"){var s=N(N({},n),{directions:N({},n.directions)});return Ae.forEach(function(c){s.directions[c]*=r}),s}if(n.type==="move"){var a=N(N({},n),{directions:N({},n.directions)});return jl.forEach(function(c){a.directions[c]*=r}),a}return n}(W(W({},this.getPublicProperties()),{},{event:t}))},getCanvas:function(){if(this.$refs.canvas){var t=this.$refs.canvas,e=this.$refs.image,n=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?function(c,l,u){var h=u.rotate,f=u.flip,m={width:l.naturalWidth,height:l.naturalHeight},g=Go(m,h),p=c.getContext("2d");c.height=g.height,c.width=g.width,p.save();var E=qe(se(N({left:0,top:0},m)),h);return p.translate(-(E.left-g.width/2),-(E.top-g.height/2)),p.rotate(h*Math.PI/180),p.translate(f.horizontal?m.width:0,f.vertical?m.height:0),p.scale(f.horizontal?-1:1,f.vertical?-1:1),p.drawImage(l,0,0,m.width,m.height),p.restore(),c}(this.$refs.sourceCanvas,e,this.imageTransforms):e,o=W({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),r=function(c){return c.find(function(l){return u=l,!Number.isNaN(parseFloat(u))&&isFinite(u);var u})},s=Oe({sizeRestrictions:{minWidth:r([o.width,o.minWidth])||0,minHeight:r([o.height,o.minHeight])||0,maxWidth:r([o.width,o.maxWidth])||1/0,maxHeight:r([o.height,o.maxHeight])||1/0},width:this.coordinates.width,height:this.coordinates.height,aspectRatio:{minimum:this.coordinates.width/this.coordinates.height,maximum:this.coordinates.width/this.coordinates.height}});if(o.maxArea&&s.width*s.height>o.maxArea){var a=Math.sqrt(o.maxArea/(s.width*s.height));s={width:Math.round(a*s.width),height:Math.round(a*s.height)}}return function(c,l,u,h,f){c.width=h?h.width:u.width,c.height=h?h.height:u.height;var m=c.getContext("2d");m.clearRect(0,0,c.width,c.height),f&&(f.imageSmoothingEnabled&&(m.imageSmoothingEnabled=f.imageSmoothingEnabled),f.imageSmoothingQuality&&(m.imageSmoothingQuality=f.imageSmoothingQuality),f.fillColor&&(m.fillStyle=f.fillColor,m.fillRect(0,0,c.width,c.height),m.save()));var g=u.left<0?-u.left:0,p=u.top<0?-u.top:0;m.drawImage(l,u.left+g,u.top+p,u.width,u.height,g*(c.width/u.width),p*(c.height/u.height),c.width,c.height)}(t,n,this.coordinates,s,o),t}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(t){var e=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.visibleArea&&e?Zl(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,o=this.visibleArea&&e?Wt(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return Xl({transform:t,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:n,positionRestrictions:o,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var t=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var e=this.defaultSize;e||(e=this.stencilSize?tc:ec);var n=this.sizeRestrictions;n.minWidth,n.minHeight,n.maxWidth,n.maxHeight;var o=it(e)?e({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):e,r=this.defaultPosition||Kl,s=[o,function(a){var c=a.coordinates;return W({},it(r)?r({coordinates:c,imageSize:t.imageSize,visibleArea:t.visibleArea}):t.defaultPosition)}];this.delayedTransforms&&s.push.apply(s,je(Array.isArray(this.delayedTransforms)?this.delayedTransforms:[this.delayedTransforms])),this.coordinates=this.applyTransform(s,!0),this.delayedTransforms=null}},clearImage:function(){var t=this;this.imageLoaded=!1,setTimeout(function(){var e=t.$refs.stretcher;e&&(e.style.height="auto",e.style.width="auto"),t.coordinates=t.defaultCoordinates(),t.boundaries={width:0,height:0}},this.transitionTime)},enableTransitions:function(){this.transitions&&(this.transitionsActive=!0)},disableTransitions:function(){this.transitionsActive=!1},updateBoundaries:function(){var t=this,e=this.$refs.stretcher,n=this.$refs.cropper;return this.initStretcher({cropper:n,stretcher:e,imageSize:this.imageSize}),this.$nextTick().then(function(){var o={cropper:n,imageSize:t.imageSize};if(it(t.defaultBoundaries)?t.boundaries=t.defaultBoundaries(o):t.defaultBoundaries==="fit"?t.boundaries=function(r){var s=r.cropper,a=r.imageSize,c=s.clientHeight,l=s.clientWidth,u=c,h=a.width*c/a.height;return h>l&&(h=l,u=a.height*l/a.width),{width:h,height:u}}(o):t.boundaries=function(r){var s=r.cropper;return{width:s.clientWidth,height:s.clientHeight}}(o),!t.boundaries.width||!t.boundaries.height)throw new Error("It's impossible to fit the cropper in the current container")})},resetVisibleArea:function(){var t=this;return this.appliedImageTransforms=W(W({},this.defaultImageTransforms),{},{flip:W({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then(function(){t.priority!=="visible-area"&&(t.visibleArea=null,t.resetCoordinates());var e,n,o,r,s,a,c=t.defaultVisibleArea||nc;t.visibleArea=it(c)?c({imageSize:t.imageSize,boundaries:t.boundaries,coordinates:t.priority!=="visible-area"?t.coordinates:null,getAreaRestrictions:t.getAreaRestrictions,stencilSize:t.getStencilSize()}):t.defaultVisibleArea,t.visibleArea=(e={visibleArea:t.visibleArea,boundaries:t.boundaries,getAreaRestrictions:t.getAreaRestrictions},n=e.visibleArea,o=e.boundaries,r=e.getAreaRestrictions,s=N({},n),a=j(o),s.width/s.height!==a&&(s.height=s.width/a),ae(s,r({visibleArea:s,type:"move"}))),t.priority==="visible-area"?t.resetCoordinates():t.coordinates=t.fitCoordinates({visibleArea:t.visibleArea,coordinates:t.coordinates,aspectRatio:t.getAspectRatio(),positionRestrictions:t.positionRestrictions,sizeRestrictions:t.sizeRestrictions}),t.runAutoZoom("resetVisibleArea")}).catch(function(){t.visibleArea=null})},updateVisibleArea:function(){var t=this;return this.updateBoundaries().then(function(){t.visibleArea=t.fitVisibleArea({imageSize:t.imageSize,boundaries:t.boundaries,visibleArea:t.visibleArea,coordinates:t.coordinates,getAreaRestrictions:t.getAreaRestrictions}),t.coordinates=t.fitCoordinates({visibleArea:t.visibleArea,coordinates:t.coordinates,aspectRatio:t.getAspectRatio(),positionRestrictions:t.positionRestrictions,sizeRestrictions:t.sizeRestrictions}),t.runAutoZoom("updateVisibleArea")}).catch(function(){t.visibleArea=null})},onChange:function(){var t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];t&&this.debounce?this.debouncedUpdate():this.update()},onChangeImage:function(){var t,e=this;if(this.imageLoaded=!1,this.delayedTransforms=null,this.src){if(function(r){if(Do(r))return!1;var s=window.location,a=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(r)||[],c={protocol:a[1]||"",host:a[2]||"",port:a[3]||""},l=function(u){return u.port||((u.protocol||s.protocol)==="http"?80:433)};return!(!c.protocol&&!c.host&&!c.port||c.protocol&&c.protocol==s.protocol&&c.host&&c.host==s.host&&c.host&&l(c)==l(s))}(this.src)){var n=ie(this.crossOrigin)?this.canvas:this.crossOrigin;n===!0&&(n="anonymous"),this.imageAttributes.crossOrigin=n||null}if(this.checkOrientation){var o=(t=this.src,new Promise(function(r){fc(t).then(function(s){var a=mc(s);r(s?{source:t,arrayBuffer:s,orientation:a}:{source:t,arrayBuffer:null,orientation:null})}).catch(function(s){console.warn(s),r({source:t,arrayBuffer:null,orientation:null})})}));setTimeout(function(){o.then(e.onParseImage)},this.transitionTime)}else setTimeout(function(){e.onParseImage({source:e.src})},this.transitionTime)}else this.clearImage()},onFailLoadImage:function(){this.imageAttributes.src&&(this.clearImage(),this.$emit("error"))},onSuccessLoadImage:function(){var t=this,e=this.$refs.image;e&&!this.imageLoaded&&(this.imageAttributes.height=e.naturalHeight,this.imageAttributes.width=e.naturalWidth,this.imageLoaded=!0,this.resetVisibleArea().then(function(){t.$emit("ready"),t.onChange(!1)}))},onParseImage:function(t){var e=this,n=t.source,o=t.arrayBuffer,r=t.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,o&&r&&r>1?Fo(n)||!Do(n)?(this.imageAttributes.src=URL.createObjectURL(new Blob([o])),this.imageAttributes.revoke=!0):this.imageAttributes.src=function(s){for(var a=[],c=new Uint8Array(s);c.length>0;){var l=c.subarray(0,8192);a.push(String.fromCharCode.apply(null,Array.from?Array.from(l):l.slice())),c=c.subarray(8192)}return"data:image/jpeg;base64,"+btoa(a.join(""))}(o):this.imageAttributes.src=n,it(this.defaultTransforms)?this.appliedImageTransforms=Ln(this.defaultTransforms()):Lt(this.defaultTransforms)?this.appliedImageTransforms=Ln(this.defaultTransforms):this.appliedImageTransforms=function(s){var a=Ln({});if(s)switch(s){case 2:a.flip.horizontal=!0;break;case 3:a.rotate=-180;break;case 4:a.flip.vertical=!0;break;case 5:a.rotate=90,a.flip.vertical=!0;break;case 6:a.rotate=90;break;case 7:a.rotate=90,a.flip.horizontal=!0;break;case 8:a.rotate=-90}return a}(r),this.defaultImageTransforms=W(W({},this.appliedImageTransforms),{},{flip:W({},this.appliedImageTransforms.flip)}),this.$nextTick(function(){var s=e.$refs.image;s&&s.complete&&(function(a){return!!a.naturalWidth}(s)?e.onSuccessLoadImage():e.onFailLoadImage())})},onResizeEnd:function(){this.runAutoZoom("resize",{transitions:!0})},onMoveEnd:function(){this.runAutoZoom("move",{transitions:!0})},onMove:function(t){var e=this;this.transitionsOptions.enabled||this.awaitRender(function(){e.coordinates=e.moveAlgorithm(W(W({},e.getPublicProperties()),{},{positionRestrictions:Wt(e.positionRestrictions,e.visibleArea),coordinates:e.coordinates,event:e.normalizeEvent(t)})),e.onChange()})},onResize:function(t){var e=this;this.transitionsOptions.enabled||this.stencilSize&&!this.autoZoom||this.awaitRender(function(){var n=e.sizeRestrictions,o=Math.min(e.coordinates.width,e.coordinates.height,20*e.coefficient);e.coordinates=e.resizeAlgorithm(W(W({},e.getPublicProperties()),{},{positionRestrictions:Wt(e.positionRestrictions,e.visibleArea),sizeRestrictions:{maxWidth:Math.min(n.maxWidth,e.visibleArea.width),maxHeight:Math.min(n.maxHeight,e.visibleArea.height),minWidth:Math.max(n.minWidth,o),minHeight:Math.max(n.minHeight,o)},event:e.normalizeEvent(t)})),e.onChange(),e.ticking=!1})},onManipulateImage:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.transitionsOptions.enabled){var n=e.transitions,o=n!==void 0&&n,r=e.normalize,s=r===void 0||r;o&&this.enableTransitions();var a=ic(W(W({},this.getPublicProperties()),{},{event:s?this.normalizeEvent(t):t,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),c=a.visibleArea,l=a.coordinates;this.visibleArea=c,this.coordinates=l,this.runAutoZoom("manipulateImage"),this.onChange(),o&&this.debouncedDisableTransitions()}},onPropsChange:function(){this.coordinates=this.applyTransform(this.coordinates,!0),this.onChange(!1)},getAreaRestrictions:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.visibleArea,n=t.type,o=n===void 0?"move":n;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:e,type:o})},getAspectRatio:function(t){var e,n,o=this.stencilProps,r=o.aspectRatio,s=o.minAspectRatio,a=o.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var c=this.$refs.stencil.aspectRatios();e=c.minimum,n=c.maximum}if(ie(e)&&(e=ie(r)?s:r),ie(n)&&(n=ie(r)?a:r),!t&&(ie(e)||ie(n))){var l=this.getStencilSize(),u=l?j(l):null;ie(e)&&(e=Oo(u)?u:void 0),ie(n)&&(n=Oo(u)?u:void 0)}return{minimum:e,maximum:n}},getStencilSize:function(){if(this.stencilSize)return t={currentStencilSize:{width:this.stencilCoordinates.width,height:this.stencilCoordinates.height},stencilSize:this.stencilSize,boundaries:this.boundaries,coefficient:this.coefficient,coordinates:this.coordinates,aspectRatio:this.getAspectRatio(!0)},e=t.boundaries,n=t.stencilSize,o=t.aspectRatio,Tn(j(r=it(n)?n({boundaries:e,aspectRatio:o}):n),o)&&(r=Oe({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:o.minimum,maximum:o.maximum}})),(r.width>e.width||r.height>e.height)&&(r=Oe({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:j(r),maximum:j(r)}})),r;var t,e,n,o,r},getPublicProperties:function(){return{coefficient:this.coefficient,visibleArea:this.visibleArea,coordinates:this.coordinates,boundaries:this.boundaries,sizeRestrictions:this.sizeRestrictions,positionRestrictions:this.positionRestrictions,aspectRatio:this.getAspectRatio(),imageRestriction:this.imageRestriction}},defaultCoordinates:function(){return W({},Uo)},flip:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.transitions,r=o===void 0||o;if(!this.transitionsActive){r&&this.enableTransitions();var s=W({},this.imageTransforms.flip),a=rc({flip:{horizontal:t?!s.horizontal:s.horizontal,vertical:e?!s.vertical:s.vertical},previousFlip:s,rotate:this.imageTransforms.rotate,visibleArea:this.visibleArea,coordinates:this.coordinates,imageSize:this.imageSize,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),c=a.visibleArea,l=a.coordinates;t&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),e&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=c,this.coordinates=l,this.onChange(),r&&this.debouncedDisableTransitions()}},rotate:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.transitions,o=n===void 0||n;if(!this.transitionsActive){o&&this.enableTransitions();var r=W({},this.imageSize);this.appliedImageTransforms.rotate+=t;var s=oc({visibleArea:this.visibleArea,coordinates:this.coordinates,previousImageSize:r,imageSize:this.imageSize,angle:t,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),a=s.visibleArea,c=s.coordinates,l=this.processAutoZoom("rotateImage",a,c);a=l.visibleArea,c=l.coordinates,this.visibleArea=a,this.coordinates=c,this.onChange(),o&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},gc={key:0,ref:"canvas",style:{display:"none"}},yc={key:1,ref:"sourceCanvas",style:{display:"none"}};sr.render=function(t,e,n,o,r,s){return i.openBlock(),i.createBlock("div",{ref:"cropper",class:s.classes.cropper},[i.createVNode("div",{ref:"stretcher",class:s.classes.stretcher},null,2),i.createVNode("div",{class:s.classes.boundaries,style:s.boundariesStyle},[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.backgroundWrapperComponent),{class:s.classes.cropperWrapper,"wheel-resize":s.settings.resizeImage.wheel,"touch-resize":s.settings.resizeImage.touch,"touch-move":s.settings.moveImage.touch,"mouse-move":s.settings.moveImage.mouse,onMove:s.onManipulateImage,onResize:s.onManipulateImage},{default:i.withCtx(function(){return[i.createVNode("div",{class:s.classes.background,style:s.boundariesStyle},null,6),i.createVNode("div",{class:s.classes.imageWrapper},[i.createVNode("img",{ref:"image",crossorigin:r.imageAttributes.crossOrigin,src:r.imageAttributes.src,class:s.classes.image,style:s.imageStyle,onMousedown:e[1]||(e[1]=i.withModifiers(function(){},["prevent"]))},null,46,["crossorigin","src"])],2),i.createVNode("div",{class:s.classes.foreground,style:s.boundariesStyle},null,6),i.withDirectives((i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.stencilComponent),i.mergeProps({ref:"stencil",image:s.image,coordinates:r.coordinates,"stencil-coordinates":s.stencilCoordinates,transitions:s.transitionsOptions},n.stencilProps,{onResize:s.onResize,onResizeEnd:s.onResizeEnd,onMove:s.onMove,onMoveEnd:s.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[i.vShow,r.imageLoaded]]),n.canvas?(i.openBlock(),i.createBlock("canvas",gc,null,512)):i.createCommentVNode("",!0),n.canvas?(i.openBlock(),i.createBlock("canvas",yc,null,512)):i.createCommentVNode("",!0)]}),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const wc={class:"background-container"},bc={class:"tools-line"},Cc={class:"line-block"},Sc={class:"dialog-footer"},ar=x(i.defineComponent({__name:"ImageCropper",props:{open:{type:Boolean,required:!0},defaultRatio:{type:Number,required:!1,default:1}},emits:["crop","close"],setup(t,{emit:e}){const n=t,o=e,r=S.S.Cropper.Cropper(),s=i.ref(n.defaultRatio);r.ratio=s.value;const a=async()=>{s.value===0?r.ratio=0:r.ratio=s.value},c=i.ref({width:0,height:0,left:0,top:0}),l=i.ref(!1),u=i.ref(""),h=i.ref(),f=async()=>{l.value=!0;const g=h.value.getResult();r.ratio===0&&(s.value=c.value.width/c.value.height),g&&g.canvas.toBlob(p=>{var E;o("crop",{blob:p,src:(E=g.canvas)==null?void 0:E.toDataURL()})}),l.value=!1},m=g=>{var p;c.value=g.coordinates,u.value=(p=g.canvas)==null?void 0:p.toDataURL()};return(g,p)=>{const E=i.resolveComponent("PSelect"),w=i.resolveComponent("el-form-item"),M=i.resolveComponent("el-form"),O=i.resolveComponent("el-button"),L=i.resolveComponent("PModal");return i.openBlock(),i.createBlock(L,{show:t.open,title:"Настройка изображения","close-on-click-modal":!1,"close-on-press-escape":!1,"show-close":!1},{default:i.withCtx(()=>[i.createElementVNode("div",wc,[i.createElementVNode("div",bc,[i.createElementVNode("div",Cc,[i.createVNode(M,null,{default:i.withCtx(()=>[i.createVNode(w,{label:"Задайте пропорции фото:"},{default:i.withCtx(()=>[i.createVNode(E,{modelValue:i.unref(s),"onUpdate:modelValue":p[0]||(p[0]=F=>i.isRef(s)?s.value=F:null),label:"Пропорции изображения",onChange:a},{default:i.withCtx(()=>p[1]||(p[1]=[i.createElementVNode("option",{label:"2:3 (формат A4)",value:2/3},null,-1),i.createElementVNode("option",{label:"4:3 (для карточек новостей)",value:4/3},null,-1),i.createElementVNode("option",{label:"1:1 (для фото сотрудников)",value:1},null,-1),i.createElementVNode("option",{label:"3:2",value:3/2},null,-1),i.createElementVNode("option",{label:"16:9",value:16/9},null,-1),i.createElementVNode("option",{label:"3:4 (вертикальное изображение)",value:3/4},null,-1),i.createElementVNode("option",{label:"Задать пропорции вручную",value:0},null,-1)])),_:1},8,["modelValue"])]),_:1})]),_:1})])]),i.createVNode(i.unref(sr),{ref_key:"cropperRef",ref:h,src:i.unref(r).src,"stencil-props":{aspectRatio:i.unref(r).ratio},style:{"max-height":"50vh","min-height":"50vh"},onChange:m},null,8,["src","stencil-props"]),i.createElementVNode("div",Sc,[i.createVNode(O,{loading:i.unref(l),type:"success",onClick:f},{default:i.withCtx(()=>p[2]||(p[2]=[i.createTextVNode(" Сохранить ")])),_:1},8,["loading"])])])]),_:1},8,["show"])}}}),[["__scopeId","data-v-b2600930"]]),kc={key:0,class:"blur"},Ec={style:{display:"flex","justify-content":"center"}},Zt=x(i.defineComponent({__name:"InfoItem",props:{background:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},width:{type:String,required:!1,default:""},openWidth:{type:String,required:!1,default:"auto"},openHeight:{type:String,required:!1,default:"auto"},maxWidth:{type:String,required:!1,default:""},minWidth:{type:String,required:!1,default:""},margin:{type:String,required:!1,default:""},height:{type:String,required:!1,default:""},withOpenWindow:{type:Boolean,required:!1,default:!0},colorSelected:{type:String,required:!1,default:"#1979CF"},borderColor:{type:String,required:!1,default:"#E3E3E3"},withHover:{type:Boolean,required:!1,default:!0},title:{type:String,required:!1,default:""},customClass:{type:String,required:!1,default:""},close:{type:Boolean,required:!1,default:!0},baseBoxMargin:{type:String,required:!1,default:""},closeWindowOverflow:{type:String,required:!1,default:""},showSaveDialog:{type:Boolean,required:!1,default:!1}},emits:["click","keyup-enter","after-close"],setup(t,{emit:e}){const n=t,o=e,r=n.customClass!==""?n.customClass:"inside-class",s=i.ref(!1),a=i.ref(!1),c=i.ref(!1),l=i.ref(n.close);i.watch(()=>n.close,()=>{a.value=!1});const u=F=>{F.stopPropagation(),F.key==="Escape"&&(n.showSaveDialog?c.value=!0:a.value=!1)};i.watch(a,async()=>{var F,T;await i.nextTick(),a.value?((T=(F=document.getElementById("info-item-opened-content"))==null?void 0:F.querySelector("input"))==null||T.focus(),document.body.addEventListener("keydown",u)):document.body.removeEventListener("keydown",u,!1),a.value===!1&&o("after-close")});const h=()=>{o("click"),a.value=!!n.withOpenWindow,l.value!==n.close&&(a.value=!1,l.value=!l.value)},f=i.computed(()=>n.customClass===""?{width:n.width,minHeight:"40px",height:"auto",maxWidth:n.maxWidth,minWidth:n.minWidth,margin:n.baseBoxMargin}:void 0),m=i.computed(()=>a.value&&n.withOpenWindow),g=i.computed(()=>({background:n.background?n.background:void 0,zIndex:m.value?"2":"0",padding:m.value?"0":n.padding,margin:n.margin,width:m.value?n.openWidth:n.width,height:m.value?n.openHeight:n.height,minHeight:"40px",maxWidth:n.maxWidth,minWidth:n.minWidth,borderColor:s.value||a.value?n.colorSelected:n.borderColor,color:s.value?n.colorSelected:"#343E5C",boxShadow:s.value||a.value?`0px 0px 1px 1px ${n.colorSelected}`:"none",alignItems:m.value?"end":"center",cursor:(n.withHover,"pointer")})),p=i.computed(()=>({height:m.value?"0":"",overflow:n.closeWindowOverflow,width:n.width})),E=i.computed(()=>({height:m.value?"auto":"0"})),w=i.computed(()=>({color:s.value?n.colorSelected:"#343E5C",fill:s.value?n.colorSelected:"#343E5C",background:n.background})),M=()=>{n.showSaveDialog?c.value=!0:a.value=!1},O=async()=>{await o("keyup-enter"),n.close&&(a.value=!1),c.value=!1},L=()=>{a.value=!1,c.value=!1};return(F,T)=>{const we=i.resolveComponent("PString"),ke=i.resolveComponent("PButton"),We=i.resolveComponent("PModal"),pt=i.resolveDirective("click-outside");return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.unref(a)?(i.openBlock(),i.createElementBlock("div",kc)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"base-box",style:i.normalizeStyle(i.unref(f)),onClick:T[2]||(T[2]=i.withModifiers(Sn=>h(),["prevent","stop"]))},[i.createElementVNode("div",{class:i.normalizeClass(["body",i.unref(r)]),style:i.normalizeStyle(i.unref(g)),onMouseenter:T[0]||(T[0]=Sn=>t.withHover?s.value=!0:s.value=!1),onMouseleave:T[1]||(T[1]=Sn=>s.value=!1)},[i.unref(a)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["close-window",t.customClass]),style:i.normalizeStyle(i.unref(p))},[i.renderSlot(F.$slots,"default",{},void 0,!0)],6)),i.unref(a)?i.withDirectives((i.openBlock(),i.createElementBlock("div",{key:1,id:"info-item-opened-content",class:"open-window",style:i.normalizeStyle(i.unref(E))},[i.renderSlot(F.$slots,"open-inside-content",{},void 0,!0)],4)),[[pt,M,void 0,{prevent:!0}]]):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"top-title",style:i.normalizeStyle(i.unref(w))},[i.renderSlot(F.$slots,"title",{},()=>[i.createVNode(we,{string:t.title,"font-size":"10px",padding:"0 0 0 3px",style:i.normalizeStyle({color:i.unref(s)?"#006BB4":"#c4c4c4",transition:"0.2s"})},null,8,["string","style"])],!0)],4)],38)],4),i.createVNode(We,{show:i.unref(c),title:"У вас остались несохраненные изменения, вы уверены что хотите закрыть окно?"},{default:i.withCtx(()=>[i.createElementVNode("div",Ec,[i.createVNode(ke,{text:"Не сохранять",onClick:L}),i.createVNode(ke,{text:"Сохранять",onClick:O})])]),_:1},8,["show"])],64)}}}),[["__scopeId","data-v-e8e8f1a1"]]),lr=x(i.defineComponent({__name:"InfoItemSelectButtons",props:{selected:{type:String,required:!0},title:{type:String,required:!0},list:{type:Array,required:!0}},emits:["select","reset"],setup(t,{emit:e}){const n=i.ref(!1),o=e,r=s=>{n.value=!n.value,o("select",s)};return(s,a)=>{const c=i.resolveComponent("PString"),l=i.resolveComponent("PButton"),u=i.resolveComponent("InfoItem");return i.openBlock(),i.createBlock(u,{close:i.unref(n),title:t.title,"close-window-overflow":"hidden","with-hover":!0,"with-open-window":!0},{"open-inside-content":i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.list,h=>(i.openBlock(),i.createBlock(l,{key:h,type:"admin",color:"blue",text:h,onClick:f=>r(h)},null,8,["text","onClick"]))),128)),i.createVNode(l,{type:"admin",color:"blue",text:"Сбросить",onClick:a[0]||(a[0]=h=>r(void 0))})]),default:i.withCtx(()=>[i.createVNode(c,{string:t.selected,"font-size":"14px",width:"100%"},null,8,["string"])]),_:1},8,["close","title"])}}}),[["__scopeId","data-v-973addd1"]]),vc={class:"mainblock"},xc={class:"mainline"},cr=x(i.defineComponent({__name:"LeftRightContainer",props:{leftWidth:{type:String,required:!1,default:"0px"},background:{type:String,required:!1,default:"inherit"}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",vc,[i.createElementVNode("div",xc,[i.createElementVNode("div",{class:"mainblock-left",style:i.normalizeStyle({minWidth:t.leftWidth,maxWidth:t.leftWidth,background:t.background,display:t.leftWidth!=="0px"?"block":"none"})},[i.renderSlot(e.$slots,"left",{},void 0,!0)],4),i.createElementVNode("div",{class:"mainblock-right",style:i.normalizeStyle({background:t.background})},[i.renderSlot(e.$slots,"right",{},void 0,!0)],4)])]))}}),[["__scopeId","data-v-42fa7104"]]),Bc={class:"message-title"},Mc={class:"message-text"},dr=x(i.defineComponent({__name:"MessageBody",props:{title:{type:String,default:"",required:!1},text:{type:String,default:"",required:!1}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",null,[i.createElementVNode("div",Bc,i.toDisplayString(t.title),1),i.createElementVNode("div",Mc,i.toDisplayString(t.text),1)]))}}),[["__scopeId","data-v-182d0640"]]),Ic=i.defineComponent({name:"CollapseContainer",props:{initActiveIdx:{type:Number,default:0}},setup(t){const e=i.ref(t.initActiveIdx),n=o=>{e.value=o};return i.watch(()=>t.initActiveIdx,()=>{n(t.initActiveIdx)}),{changeActiveId:n,activeIdx:e}}});function Rc(t,e,n,o,r,s){return i.openBlock(),i.createElementBlock("div",null,[i.renderSlot(t.$slots,"default",{activeIdx:t.activeIdx,changeActiveId:t.changeActiveId})])}const ur=x(Ic,[["render",Rc]]),$c=i.defineComponent({name:"CollapseItem",props:{tabId:{type:String,required:!1,default:""},activeId:{type:String,default:""},isCollaps:{type:Boolean,default:!0},title:{type:String,default:""},showToolsOnHover:{type:Boolean,default:!0},background:{type:String,required:!1,default:"#ffffff"},backgroundAttention:{type:String,required:!1,default:"#ffffff"},changeColor:{type:Boolean,default:!1},margin:{type:String,default:"10px 8px 2px 2px"},padding:{type:String,default:"0 10px"},selectable:{type:Boolean,default:!1}},emits:["changeActiveId"],setup(t,{emit:e}){const n=i.ref(t.activeId==="0"),o=()=>{n.value=!n.value,e("changeActiveId",t.tabId)};return i.onUpdated(()=>{t.activeId&&t.activeId!==t.tabId&&(n.value=!0)}),i.onBeforeMount(()=>{t.activeId&&t.activeId!==t.tabId&&(n.value=!1)}),{collapsed:n,handleItemClick:o}}}),Ac=["for"],Nc={class:"inside-icon"};function Pc(t,e,n,o,r,s){return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",{class:"tab",style:i.normalizeStyle({margin:t.margin,height:t.isCollaps&&t.collapsed?"60px":"","box-shadow":t.selectable&&t.activeId===t.tabId?"0px 0px 1px 2px #1979cf":""})},[t.isCollaps&&t.collapsed?(i.openBlock(),i.createElementBlock("svg",{key:0,class:"icon-arrow",onClick:e[0]||(e[0]=(...a)=>t.handleItemClick&&t.handleItemClick(...a))},e[3]||(e[3]=[i.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)]))):t.isCollaps&&!t.collapsed?(i.openBlock(),i.createElementBlock("svg",{key:1,class:"icon-arrow",onClick:e[1]||(e[1]=(...a)=>t.handleItemClick&&t.handleItemClick(...a))},e[4]||(e[4]=[i.createElementVNode("use",{"xlink:href":"#arrow-up"},null,-1)]))):i.createCommentVNode("",!0),i.createElementVNode("label",{for:t.tabId,onClick:e[2]||(e[2]=(...a)=>t.handleItemClick&&t.handleItemClick(...a))},[i.createElementVNode("div",{style:i.normalizeStyle({cursor:t.isCollaps?"pointer":"default",background:t.changeColor?t.background:t.backgroundAttention,padding:t.padding,borderRadius:"5px"}),class:"tab-name"},[i.createElementVNode("div",Nc,[i.renderSlot(t.$slots,"icon",{},void 0,!0)]),t.title?(i.openBlock(),i.createElementBlock("div",{key:0,class:"title-in",style:i.normalizeStyle({marginRight:t.isCollaps?"50px":"0",width:t.isCollaps?"calc(100% - 50px)":"100%"})},i.toDisplayString(t.title),5)):(i.openBlock(),i.createElementBlock("div",{key:1,class:"title-in",style:i.normalizeStyle({marginRight:t.isCollaps?"50px":"0",width:t.isCollaps?"calc(100% - 50px)":"100%"})},[i.renderSlot(t.$slots,"inside-title",{},void 0,!0)],4)),i.createElementVNode("div",{class:i.normalizeClass(["tools-bar",{"hidden-part":t.showToolsOnHover}])},[i.renderSlot(t.$slots,"tools",{},void 0,!0)],2)],4)],8,Ac),i.createElementVNode("div",{style:i.normalizeStyle({maxHeight:t.isCollaps?"":"1000000vh",background:t.changeColor?t.background:t.backgroundAttention}),class:i.normalizeClass(t.collapsed?"tab-content-down":"tab-content-up")},[i.renderSlot(t.$slots,"inside-content",{},void 0,!0)],6)],4),e[5]||(e[5]=i.createStaticVNode('<svg width="0" height="0" class="hidden" data-v-0ea9a95f><symbol id="arrow-down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-0ea9a95f><path d="M5 6L10 11L15 6L17 7L10 14L3 7L5 6Z" fill="currentColor" data-v-0ea9a95f></path></symbol><symbol id="arrow-up" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-0ea9a95f><path d="M15 14L10 9L5 14L3 13L10 6L17 13L15 14Z" fill="currentColor" data-v-0ea9a95f></path></symbol></svg>',1))],64)}const hr=x($c,[["render",Pc],["__scopeId","data-v-0ea9a95f"]]),Tc={class:"tab"},zc={class:"rotate"},fr=x(i.defineComponent({__name:"VerticalCollapseContainer",setup(t){const e=i.ref(!1),n=async()=>{e.value=!e.value};return(o,r)=>{const s=i.resolveComponent("ArrowRight"),a=i.resolveComponent("ArrowLeft");return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",Tc,[i.renderSlot(o.$slots,"main",{},void 0,!0),i.createElementVNode("div",{style:i.normalizeStyle({width:i.unref(e)?"50%":"20px",transition:"0.3s"}),class:"left"},[i.createElementVNode("div",{style:i.normalizeStyle({width:i.unref(e)?"100%":"0",transition:"0.3s"}),class:"left-content"},[i.renderSlot(o.$slots,"inside-content-left",{},void 0,!0)],4),i.createElementVNode("div",{class:"arrow-bar",onClick:n},[i.createElementVNode("div",zc,[i.renderSlot(o.$slots,"inside-title",{},void 0,!0)]),i.unref(e)?(i.openBlock(),i.createBlock(s,{key:0,"icon-class":"icon-arrow"})):(i.openBlock(),i.createBlock(a,{key:1,"icon-class":"icon-arrow"}))])],4),i.createElementVNode("div",{style:i.normalizeStyle({width:i.unref(e)?"50%":"100%",transition:"0.3s"}),class:"right"},[i.renderSlot(o.$slots,"inside-content-right",{},void 0,!0)],4)]),i.createVNode(a),i.createVNode(s)],64)}}}),[["__scopeId","data-v-4ccaade5"]]),Vc={class:"add-block_body"},mr=x(i.defineComponent({__name:"PAdd",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"0"},padding:{type:String,required:!1,default:"0"},top:{type:String,required:!1,default:"0"},zIndex:{type:Number,required:!1,default:0}},setup(t){return(e,n)=>{const o=i.resolveComponent("PSticky");return i.openBlock(),i.createElementBlock("div",{class:"add-block",style:i.normalizeStyle({margin:t.margin,background:t.background,padding:t.padding})},[i.createVNode(o,{top:t.top,"z-index":t.zIndex},{default:i.withCtx(()=>[i.renderSlot(e.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),i.createElementVNode("div",Vc,[i.renderSlot(e.$slots,"default",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-338720bc"]]),pr=x(i.defineComponent({__name:"PContainer",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"0"},padding:{type:String,required:!1,default:"0"}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:"add-block",style:i.normalizeStyle({margin:t.margin,background:t.background,padding:t.padding})},[i.renderSlot(e.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-b2b43a38"]]),Fc={class:"add-block_body"},gr=x(i.defineComponent({__name:"PContainerStickyHead",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"0"},padding:{type:String,required:!1,default:"0"},top:{type:String,required:!1,default:"0"},zIndex:{type:Number,required:!1,default:0}},setup(t){return(e,n)=>{const o=i.resolveComponent("PSticky"),r=i.resolveComponent("PContainer");return i.openBlock(),i.createBlock(r,{background:t.background,margin:t.margin,padding:t.padding},{default:i.withCtx(()=>[i.createVNode(o,{top:t.top,"z-index":t.zIndex},{default:i.withCtx(()=>[i.renderSlot(e.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),i.createElementVNode("div",Fc,[i.renderSlot(e.$slots,"default",{},void 0,!0)])]),_:3},8,["background","margin","padding"])}}}),[["__scopeId","data-v-9464e4a8"]]),Dc={class:"del-block_title"},Oc={class:"del-block_body"},yr=x(i.defineComponent({__name:"PDel",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"10px 10px 10px 50px"},padding:{type:String,required:!1,default:"10px"}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:"del-block",style:i.normalizeStyle({margin:t.margin,background:t.background,padding:t.padding})},[i.createElementVNode("div",Dc,[i.renderSlot(e.$slots,"title",{},void 0,!0)]),i.createElementVNode("div",Oc,[i.renderSlot(e.$slots,"default",{},void 0,!0)])],4))}}),[["__scopeId","data-v-58d048aa"]]),Lc={class:"btn-group"},wr=x(i.defineComponent({__name:"AuthForm",props:{width:{type:String,default:"300px"},margin:{type:String,default:"auto"},padding:{type:String,default:"60px 100px"}},emits:["submit"],setup(t,{emit:e}){const n=S.Auth.Form,o=i.ref(!1),r=e,s=i.computed(()=>n.GetButtons()),a=async c=>{await S.Auth.Form.Block(async()=>{if(!c.submit)return n.SetStatus(c.GetStatus());const l=n.Validate();if(l.length>0){S.UI.Notify.Error(l.join(", "));return}r("submit")})};return i.onBeforeUnmount(()=>{n.Reset()}),(c,l)=>{const u=i.resolveComponent("PInput"),h=i.resolveComponent("PButton");return i.openBlock(),i.createElementBlock("div",{class:"auth-card",style:i.normalizeStyle({width:t.width,margin:t.margin,padding:t.padding})},[i.createElementVNode("div",null,i.toDisplayString(("PF"in c?c.PF:i.unref(S)).Auth.Form.GetTitle()),1),i.createElementVNode("div",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(("PF"in c?c.PF:i.unref(S)).Auth.Form.GetFields(),f=>(i.openBlock(),i.createBlock(u,{id:f.id,key:f,modelValue:f.value,"onUpdate:modelValue":m=>f.value=m,placeholder:f.label,margin:"10px 0 0 0"},null,8,["id","modelValue","onUpdate:modelValue","placeholder"]))),128)),i.createVNode(h,{type:"primary",skin:"text_ano",text:"Забыли пароль?",width:"124px",margin:"0 0 0 5px"}),i.createElementVNode("div",Lc,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(s),f=>(i.openBlock(),i.createBlock(h,{id:f.id,key:f.GetStatus(),disabled:i.unref(o),type:"primary",skin:"base",text:f.text,color:f.submit?"blue":"grey",margin:"10px 0 0 0",width:"100%",height:"52px",onClick:m=>a(f)},null,8,["id","disabled","text","color","onClick"]))),128))])])],4)}}}),[["__scopeId","data-v-6625500f"]]),br=x(i.defineComponent({__name:"PModal",props:{showCloseDialog:{type:Boolean,required:!1,default:!1},closable:{type:Boolean,required:!1,default:!1},show:{type:Boolean,default:!1},title:{type:String,default:""},width:{type:String,default:"760px"},margin:{type:String,default:"auto"},top:{type:String,default:"20vh"},padding:{type:String,default:"var(--modal-window-padding)"},showClose:{type:Boolean,default:!1}},emits:["save","close"],setup(t,{emit:e}){const n=t,o=e,r=a=>{a.key==="Escape"&&s()};i.onMounted(()=>{document.body.addEventListener("keydown",r)}),i.onBeforeUnmount(()=>{document.body.removeEventListener("keydown",r)});const s=()=>{n.closable&&o("close")};return(a,c)=>{const l=i.resolveComponent("IconClose");return i.openBlock(),i.createElementBlock(i.Fragment,null,[t.show?(i.openBlock(),i.createElementBlock("div",{key:0,class:"blur",onClick:s})):i.createCommentVNode("",!0),t.show?(i.openBlock(),i.createElementBlock("div",{key:1,class:"modal-w",style:i.normalizeStyle({maxWidth:t.width,width:t.width,margin:t.margin,padding:t.padding,top:t.top})},[t.closable?(i.openBlock(),i.createElementBlock("div",{key:0,class:"icon-box",onClick:s},[i.createVNode(l,{size:"20px"})])):i.createCommentVNode("",!0),i.renderSlot(a.$slots,"default",{},void 0,!0)],4)):i.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-5082ab52"]]),_c=["onClick"],Cr=x(i.defineComponent({__name:"PTabs",props:{store:{type:Object,required:!0},tabHeight:{type:String,required:!1,default:"40px"},height:{type:String,required:!1,default:""},minMenuItemWidth:{type:String,required:!1,default:"150px"},outTopMargin:{type:String,required:!1,default:"40px"},background:{type:String,required:!1,default:"#ffffff"}},emits:["select"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(window.innerWidth),s=i.ref(),a=i.ref(Number(n.tabHeight.replace(/[^+\d]/g,""))),c=()=>{r.value=window.innerWidth,a.value=s.value?s.value.clientHeight:Number(n.tabHeight.replace(/[^+\d]/g,""))};i.onMounted(()=>window.addEventListener("resize",c)),i.onUnmounted(()=>window.removeEventListener("resize",c));const l=i.computed(()=>`calc(100% - ${a.value}px + 1px)`);i.onBeforeMount(()=>{n.store.preSelectTab()});const u=(h,f)=>{n.store.select(h,f),o("select",h)};return(h,f)=>(i.openBlock(),i.createElementBlock("div",{class:"mainblock",style:i.normalizeStyle({height:`calc(100% - ${t.outTopMargin} - ${t.tabHeight}`})},[i.createElementVNode("div",{ref_key:"menuRef",ref:s,class:"top-menu",style:i.normalizeStyle({gridTemplateColumns:`repeat(auto-fit, minmax(${t.minMenuItemWidth}, 1fr))`})},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.store.tabs,(m,g)=>(i.openBlock(),i.createElementBlock("div",{key:g},[i.createElementVNode("div",{class:i.normalizeClass({"selected-tab":g===t.store.activeIdx,tab:g!==t.store.activeIdx}),style:i.normalizeStyle({minHeight:t.tabHeight,maxHeight:t.tabHeight}),onClick:p=>u(m,g)},i.toDisplayString(m.name),15,_c)]))),128))],4),i.createElementVNode("div",{class:"body-container",style:i.normalizeStyle({background:t.background,height:i.unref(l)})},[i.renderSlot(h.$slots,"default",{},()=>[t.store.activeTab?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(t.store.activeTab.component),{key:0})):i.createCommentVNode("",!0)],!0)],4)],4))}}),[["__scopeId","data-v-e4035dcf"]]);class qn{static Setup(e){this.staticUrl=e}static get StaticUrl(){return this.staticUrl}}d(qn,"staticUrl","");class Be{constructor(e){d(this,"name","");d(this,"url","");d(this,"src","");d(this,"raw");d(this,"blob");d(this,"file");d(this,"id");d(this,"originalName","");d(this,"fileSystemPath","");V.BuildClass(this,e)}getFileUrl(){const e=this.url?this.url:`${qn.StaticUrl}/${this.fileSystemPath}`;return new URL(e,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Ee&&Ee.tagName.toUpperCase()==="SCRIPT"&&Ee.src||new URL("sprof.umd.cjs",document.baseURI).href)}getFileListObject(){return{name:this.originalName,url:this.url}}static CreatePreviewFile(e,n){const o=new Be;return o.id=n??ve.UUID(),o.originalName=e.name,o.file=e.blob,o.fileSystemPath=ve.UUID(),o}uploadNewFile(e){this.id||(this.id=ve.UUID()),this.originalName=e.name,this.file=e.blob,this.fileSystemPath=ve.UUID()}setFile(e){this.file=e,this.url=e.src}uploadAndSetFile(e){this.uploadNewFile(e),this.setFile(e),this.url=e.url}clearFile(){this.url="",this.file=void 0,this.fileSystemPath="",this.originalName=""}errorImg(e,n){if(e.target){let o="";return n&&(o=`@/assets/img/${n}`),new URL(o,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Ee&&Ee.tagName.toUpperCase()==="SCRIPT"&&Ee.src||new URL("sprof.umd.cjs",document.baseURI).href)}}getFileInfos(){return[this]}isPdf(){return this.getExtension(this.originalName)===""}getExtension(e){const n=e.split(".");return n[n.length-1]}}const Hc=["id"],qc=["for"],Uc={class:"left-field"},Wc=["href","download"],jc={key:1,class:"text-field__input"},Gc={class:"right-field"},Zc=i.defineComponent({__name:"UploaderFile",props:{fileInfo:{type:Object,required:!1,default:new Be},formats:{type:Array,default:()=>["pdf","jpeg","jpg"]},label:{type:String,default:"Label",required:!1},margin:{type:String,required:!1,default:"10px 0 0 0"},disabled:{type:Boolean,required:!1,default:!1},padding:{type:String,default:"",required:!1},mask:{type:String,required:!1,default:void 0},borderColor:{type:String,default:"var(--input-border-color)",required:!1},color:{type:String,default:"var(--input-font-color)",required:!1},placeholder:{type:String,required:!1,default:""}},emits:["upload","remove"],setup(t,{emit:e}){const n=t,o=e,r=S.H.Id.GUID(),s=S.H.Id.GUID(),a=()=>{const u=document.getElementById(r);if(!u.files)return;const h=u.files[0];if(h){if(!l(h.name)){S.UI.Notify.Error("Загруженный файл должен быть в формате pdf, jpg или jpeg");return}n.fileInfo.uploadAndSetFile(h),o("upload",n.fileInfo)}},c=()=>{n.fileInfo.clearFile(),o("remove",n.fileInfo)};i.onMounted(()=>{const u=document.getElementById(s);u&&(u.onclick=()=>{var h;return(h=document.getElementById(r))==null?void 0:h.click()})});const l=u=>{let h=S.H.Extension.Get(u);return!!n.formats.includes(h.toLowerCase())};return(u,h)=>{const f=i.resolveComponent("PString"),m=i.resolveComponent("PFlex"),g=i.resolveComponent("PButton");return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("input",{id:i.unref(r),type:"file",hidden:"",onChange:a},null,40,Hc),i.createElementVNode("div",{class:"text-field",style:i.normalizeStyle({margin:t.margin,padding:t.padding})},[t.label?(i.openBlock(),i.createElementBlock("label",{key:0,class:"text-field__label",for:t.label},i.toDisplayString(t.label),9,qc)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"field",style:i.normalizeStyle({borderColor:t.borderColor})},[i.createElementVNode("div",Uc,[i.createVNode(m,null,{default:i.withCtx(()=>[i.renderSlot(u.$slots,"default",{},void 0,!0),i.createVNode(f,{string:t.placeholder,"font-size":"var(--font-size-default:)",color:"var(--input-label-color)",margin:"0 10px 0 0"},null,8,["string"])]),_:3})]),t.fileInfo&&t.fileInfo.originalName?(i.openBlock(),i.createElementBlock("div",{key:0,class:"text-field__input",style:i.normalizeStyle({color:t.color})},[i.createElementVNode("a",{href:t.fileInfo.getFileUrl(),target:"_blank",download:t.fileInfo.originalName},[i.createElementVNode("div",null,i.toDisplayString(t.fileInfo.originalName),1)],8,Wc),i.createVNode(g,{skin:"text",type:"del",onClick:c},{default:i.withCtx(()=>[i.createVNode(Ft,{size:"20px",margin:"0 5px"})]),_:1})],4)):(i.openBlock(),i.createElementBlock("div",jc,[i.createVNode(f,{string:"Файл не загружен","font-size":"var(--inpur-font-size-default)",color:"var(--palette-warning)",margin:"0 10px 0 0"})])),i.createElementVNode("div",Gc,[i.createVNode(g,{id:i.unref(s),skin:"text",type:"success","data-test":"upload-btn",text:t.fileInfo&&t.fileInfo.originalName?"Обновить":"Загрузить",margin:"0"},null,8,["id","text"])])],4)],4)],64)}}}),Sr=x(Zc,[["__scopeId","data-v-cacad4ae"]]),Xc={class:"bg"},Un=x(i.defineComponent({__name:"AuthPage",setup(t){const e=()=>{S.Auth.Form.IsLogin()&&S.H.Router.ToHome()};return(n,o)=>{const r=i.resolveComponent("AuthForm");return i.openBlock(),i.createElementBlock("div",Xc,[i.createVNode(r,{width:"760px",margin:"0 auto",onAction:e})])}}}),[["__scopeId","data-v-c3e2f5bc"]]),Jc={},Yc={style:{"text-align":"center"}};function Qc(t,e){return i.openBlock(),i.createElementBlock("div",Yc,e[0]||(e[0]=[i.createElementVNode("h1",null,"Страница не найдена",-1)]))}const Wn=x(Jc,[["render",Qc]]),Kc={class:"container"},ed={key:0,class:"result"},td={class:"list"},nd=["onClick"],kr=x(i.defineComponent({inheritAttrs:!1,__name:"PAutocomplete",props:{modelValue:{type:String,default:""},searchFunc:{type:Function,default:()=>{}},suggestions:{type:Array,default:[]}},emits:["select","input"],setup(t,{emit:e}){const n=e,o=t,r=i.ref(o.modelValue),s=i.ref([]);async function a(){n("input",r.value),await c()}async function c(){o.searchFunc&&(s.value=await o.searchFunc(r.value))}async function l(u){n("select",u)}return(u,h)=>{const f=i.resolveComponent("IconSearch"),m=i.resolveComponent("PInput");return i.openBlock(),i.createElementBlock("div",Kc,[i.createVNode(m,{modelValue:i.unref(r),"onUpdate:modelValue":h[0]||(h[0]=g=>i.isRef(r)?r.value=g:null),placeholder:"Найти",onInput:a},{right:i.withCtx(()=>[i.createVNode(f)]),_:1},8,["modelValue"]),i.unref(r)?(i.openBlock(),i.createElementBlock("div",ed,[i.createElementVNode("ul",td,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(s),g=>(i.openBlock(),i.createElementBlock("li",{key:g.value,onClick:p=>l(g)},i.toDisplayString(g.label),9,nd))),128))])])):i.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-67b698bb"]]),id={class:"footer"},Er=x(i.defineComponent({__name:"PDialog",setup(t){const e=i.computed(()=>{switch(S.UI.Dialog.GetType()){case"info":return"message primary";case"success":return"message success";case"warning":return"message warning";case"error":return"message danger";default:return"message neutral"}});return(n,o)=>{const r=i.resolveComponent("MessageBody"),s=i.resolveComponent("PButton");return i.openBlock(),i.createBlock(i.Transition,{name:"fade"},{default:i.withCtx(()=>[("PF"in n?n.PF:i.unref(S)).UI.Dialog.IsVisible()?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(i.unref(e))},[i.createVNode(r,{title:("PF"in n?n.PF:i.unref(S)).UI.Dialog.GetTitle(),text:("PF"in n?n.PF:i.unref(S)).UI.Dialog.GetText()},null,8,["title","text"]),i.createElementVNode("div",id,[i.createVNode(s,{type:"primary",text:("PF"in n?n.PF:i.unref(S)).UI.Dialog.GetConfirmButtonText(),margin:"10px 0 0 0",onClick:o[0]||(o[0]=a=>("PF"in n?n.PF:i.unref(S)).UI.Dialog.Submit())},null,8,["text"]),i.createVNode(s,{type:"warning",text:("PF"in n?n.PF:i.unref(S)).UI.Dialog.GetCancelButtonText(),margin:"10px 0 0 0",onClick:o[1]||(o[1]=a=>("PF"in n?n.PF:i.unref(S)).UI.Dialog.Cancel())},null,8,["text"])])],2)):i.createCommentVNode("",!0)]),_:1})}}}),[["__scopeId","data-v-bf4d379c"]]),vr=x(i.defineComponent({__name:"PhoneForm",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(t){const e=i.useModel(t,"modelValue"),n=async()=>{await S.S.Phones.Update(e.value)};return(o,r)=>{const s=i.resolveComponent("PInput");return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(s,{modelValue:e.value.number,"onUpdate:modelValue":r[0]||(r[0]=a=>e.value.number=a),onBlur:n},null,8,["modelValue"]),i.createVNode(s,{modelValue:e.value.description,"onUpdate:modelValue":r[1]||(r[1]=a=>e.value.description=a),onBlur:n},null,8,["modelValue"])],64)}}}),[["__scopeId","data-v-f801a76e"]]),od={};function rd(t,e){return i.openBlock(),i.createElementBlock(i.Fragment,null,[e[0]||(e[0]=i.createElementVNode("div",{class:"blur"},null,-1)),e[1]||(e[1]=i.createElementVNode("div",{class:"loader-container"},[i.createElementVNode("div",{class:"loader",style:{"--b":"20px",width:"200px","--n":"10"}})],-1))],64)}const xr=x(od,[["render",rd],["__scopeId","data-v-0f1f2f84"]]),Br=x(i.defineComponent({__name:"PNotification",setup(t){const e=i.computed(()=>{switch(S.UI.Notify.GetType()){case"info":return"message info";case"success":return"message success";case"warning":return"message warning";case"error":return"message error";default:return"message neutral"}});return(n,o)=>{const r=i.resolveComponent("MessageBody");return i.openBlock(),i.createBlock(i.Transition,{name:"fade"},{default:i.withCtx(()=>[("PF"in n?n.PF:i.unref(S)).UI.Notify.IsVisible()?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(i.unref(e))},[i.createVNode(r,{title:("PF"in n?n.PF:i.unref(S)).UI.Notify.GetTitle(),text:("PF"in n?n.PF:i.unref(S)).UI.Notify.GetText()},null,8,["title","text"])],2)):i.createCommentVNode("",!0)]),_:1})}}}),[["__scopeId","data-v-6d245bd5"]]),sd={style:{display:"flex","justify-content":"center",width:"100%"}},ad={class:"pag-number"},ld={class:"pag-ul"},cd={key:2},Mr=x(i.defineComponent({__name:"PPagination",props:{showConfirm:{type:Boolean,default:!1},justifyContent:{type:String,default:"center"},store:{type:Object,required:!0}},emits:["cancel","save"],setup(t,{emit:e}){const n=t,o=g=>g?"active":"neutral",r=g=>g?"not-active":"neutral",s=S.Paginator,a=i.ref(!1),c=i.ref(!1),l=e;s.count=n.store.Count().value;const u=async g=>{if(g!==s.curPage){if(g<1&&(g=1),g>s.pagesCount()&&(g=s.pagesCount()),!n.showConfirm)return await h(g);S.UI.Dialog.Save().then(async()=>{l("save"),await h(g)}).catch(async()=>{S.UI.Notify.Warning("Изменения не были сохранены"),l("cancel"),await h(g)})}},h=async(g,p)=>{s.setCurPage(g),S.H.FTSP.Get().p.offset=(g-1)*s.limit,await n.store.FTSP(),m()},f=i.computed(()=>{const g=s.pagesCount();return g<8?S.H.Arrays.GenerateNumsRange(2,g-1).filter(p=>p<g&&p>1):S.H.Arrays.GenerateNumsRange(s.curPage-2,s.curPage+3).filter(p=>p<g&&p>1)}),m=()=>{const g=document.querySelector(".el-table__body-wrapper"),p=document.querySelector("#list");g?g.scrollTo({top:0}):p&&p.scrollTo({top:0})};return i.onBeforeUnmount(()=>{S.H.FTSP.Get().p.drop()}),(g,p)=>{const E=i.resolveComponent("ArrowLeft"),w=i.resolveComponent("PButton"),M=i.resolveComponent("DoubleArrowLeft"),O=i.resolveComponent("EllipsisSvg"),L=i.resolveComponent("DoubleArrowRight"),F=i.resolveComponent("ArrowRight");return i.openBlock(),i.createElementBlock("div",sd,[i.createElementVNode("div",{class:"pag-container",style:i.normalizeStyle({justifyContent:t.justifyContent})},[i.createElementVNode("div",ad,[i.createVNode(w,{skin:"pag",type:r(i.unref(s).curPage===1),onClick:p[0]||(p[0]=T=>u(i.unref(s).curPage-1))},{default:i.withCtx(()=>[i.createVNode(E)]),_:1},8,["type"]),i.createElementVNode("ul",ld,[i.createElementVNode("li",null,[i.createVNode(w,{skin:"pag",type:o(i.unref(s).curPage===1),text:"1",onClick:p[1]||(p[1]=T=>u(1))},null,8,["type"])]),i.unref(s).pagesCount()>8&&i.unref(s).curPage>4?(i.openBlock(),i.createElementBlock("li",{key:0,onMouseenter:p[3]||(p[3]=T=>a.value=!0),onMouseleave:p[4]||(p[4]=T=>a.value=!1)},[i.createVNode(w,{skin:"pag",type:"neutral",onClick:p[2]||(p[2]=T=>u(i.unref(s).curPage-5))},{default:i.withCtx(()=>[i.unref(a)?(i.openBlock(),i.createBlock(M,{key:0})):(i.openBlock(),i.createBlock(O,{key:1}))]),_:1})],32)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(f),T=>(i.openBlock(),i.createElementBlock("li",{key:T},[i.createVNode(w,{skin:"pag",type:o(T===i.unref(s).curPage),text:T,onClick:we=>u(T)},null,8,["type","text","onClick"])]))),128)),i.unref(s).pagesCount()>=8&&i.unref(s).curPage<i.unref(s).pagesCount()-3?(i.openBlock(),i.createElementBlock("li",{key:1,onMouseenter:p[6]||(p[6]=T=>c.value=!0),onMouseleave:p[7]||(p[7]=T=>c.value=!1)},[i.createVNode(w,{skin:"pag",type:"neutral",onClick:p[5]||(p[5]=T=>u(i.unref(s).curPage+5))},{default:i.withCtx(()=>[i.unref(c)?(i.openBlock(),i.createBlock(L,{key:0})):(i.openBlock(),i.createBlock(O,{key:1}))]),_:1})],32)):i.createCommentVNode("",!0),i.unref(s).pagesCount()>1?(i.openBlock(),i.createElementBlock("li",cd,[i.createVNode(w,{skin:"pag",type:o(i.unref(s).pagesCount()===i.unref(s).curPage),text:i.unref(s).pagesCount(),onClick:p[8]||(p[8]=T=>u(i.unref(s).pagesCount()))},null,8,["type","text"])])):i.createCommentVNode("",!0)]),i.createVNode(w,{skin:"pag",type:r(i.unref(s).curPage===i.unref(s).pagesCount()),onClick:p[9]||(p[9]=T=>u(i.unref(s).curPage+1))},{default:i.withCtx(()=>[i.createVNode(F)]),_:1},8,["type"])])],4)])}}}),[["__scopeId","data-v-1dc3c2c2"]]),Ir=x(i.defineComponent({__name:"RemoteSearch",props:{keyValue:{type:String,default:""},modelValue:{type:String,default:""},storeModule:{type:String,default:""},placeholder:{type:String,default:"Начните вводить запрос"},showSuggestions:{type:Boolean,default:!0},maxWidth:{type:[Number,String],default:350},focus:{type:Boolean,default:!1}},emits:["select","load","input"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(n.modelValue),s=i.ref(),a=S.S.Search.SearchModel();i.watch(()=>n.focus,()=>{n.focus&&setTimeout(()=>{s.value.focus(),r.value=""},500)});const c=async h=>{if(h.length<2)return;s.value.activated=!0,a.searchObjects=[],a.query=h,a.key=n.keyValue;const f=a.searchGroups.find(m=>m.key===n.keyValue);return f&&(a.searchGroup=f),await S.S.Search.Search(a),a.searchObjects},l=async h=>{o("select",h),r.value=""},u=h=>{o("input",h),h.length===0&&o("input","")};return(h,f)=>{const m=i.resolveComponent("PAutocomplete");return i.openBlock(),i.createBlock(m,{ref_key:"searchForm",ref:s,modelValue:i.unref(r),"onUpdate:modelValue":f[0]||(f[0]=g=>i.isRef(r)?r.value=g:null),"value-key":"label",style:{width:"100%","margin-right":"10px"},placeholder:t.placeholder,"search-func":c,"trigger-on-focus":t.showSuggestions,suggestions:i.unref(a).searchObjects,onSelect:l,onInput:u},{suffix:i.withCtx(()=>f[1]||(f[1]=[i.createElementVNode("i",{class:"el-icon-search"},null,-1)])),_:1},8,["modelValue","placeholder","trigger-on-focus","suggestions"])}}}),[["__scopeId","data-v-d3138f3a"]]),dd={class:"mainblock-body"},ud={class:"mainblock-footer"},Rr=x(i.defineComponent({__name:"ResearcheContainer",props:{background:{type:String,required:!1,default:"inherit"},padding:{type:String,required:!1,default:"0px 10px"}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:"mainblock",style:i.normalizeStyle({background:t.background,padding:t.padding})},[i.createElementVNode("div",{class:"mainblock-header",style:i.normalizeStyle({background:t.background})},[i.renderSlot(e.$slots,"header",{},void 0,!0)],4),i.createElementVNode("div",dd,[i.renderSlot(e.$slots,"body",{},void 0,!0)]),i.createElementVNode("div",ud,[i.renderSlot(e.$slots,"footer",{},void 0,!0)])],4))}}),[["__scopeId","data-v-367c3367"]]),hd={class:"right-slider-content"},fd={class:"right-slider-content-header"},md={class:"right-slider-content-box"},pd={class:"right-slider-button"},$r=x(i.defineComponent({__name:"RightSliderContainer",props:{sliderOffWidth:{type:String,required:!1,default:"30px"},sliderOnWidth:{type:String,required:!1,default:"260px"},background:{type:String,required:!1,default:"inherit"},toggle:{type:Boolean,default:!1},titleOpen:{type:String,required:!1,default:"Скрыть список исследований"},titleClose:{type:String,required:!1,default:"Показать список исследований"}},emits:["toggle"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(!1);i.watch(()=>n.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("toggle",a)};return(a,c)=>{const l=i.resolveComponent("PString");return i.openBlock(),i.createElementBlock("div",{class:"right-slider",style:i.normalizeStyle({marginRight:i.unref(r)?`calc(${t.sliderOffWidth} - ${t.sliderOnWidth})`:"0",width:t.sliderOnWidth})},[i.createElementVNode("div",{class:"click-line",onClick:c[0]||(c[0]=u=>s(!i.unref(r)))},[i.unref(r)?(i.openBlock(),i.createBlock(l,{key:0,string:t.titleClose,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"])):i.createCommentVNode("",!0),i.unref(r)?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(l,{key:1,string:t.titleOpen,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"]))]),i.createElementVNode("div",hd,[i.createElementVNode("div",fd,[i.renderSlot(a.$slots,"header",{},void 0,!0)]),i.createElementVNode("div",md,[i.renderSlot(a.$slots,"default",{},void 0,!0)])]),i.createElementVNode("div",pd,[i.renderSlot(a.$slots,"button",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-262b1c53"]]),gd={class:"mainblock"},yd={class:"body-block"},wd={class:"tab-block"},Ar=x(i.defineComponent({__name:"RightTabsContainer",props:{sliderOffWidth:{type:String,required:!1,default:"101px"},sliderOnWidth:{type:String,required:!1,default:"332px"},background:{type:String,required:!1,default:"inherit"},isToggle:{type:Boolean,required:!1,default:!1},mobileWidth:{type:String,required:!1,default:"768px"}},emits:["toggle"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(!1),s=i.ref(window.matchMedia("(max-width: 768px)").matches),a=l=>{o("toggle",l)},c=i.ref(!1);return i.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(n.mobileWidth){case"1330px":return s.value=window.matchMedia("(max-width: 1330px)").matches;case"1215px":return s.value=window.matchMedia("(max-width: 1215px)").matches;case"1024px":return s.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return s.value=window.matchMedia("(max-width: 768px)").matches}return s.value=window.matchMedia("(max-width: 1330px)").matches}),r.value=!0}),(l,u)=>(i.openBlock(),i.createElementBlock("div",gd,[i.createElementVNode("div",{class:"slider-block",style:i.normalizeStyle({marginRight:i.unref(s)?t.isToggle?"49px":`calc(49px - ${t.sliderOnWidth})`:t.isToggle?t.sliderOffWidth:`calc(${t.sliderOffWidth} - ${t.sliderOnWidth})`,width:t.sliderOnWidth,minHeight:t.sliderOffWidth,height:t.isToggle?"auto":"100px"})},[i.createElementVNode("div",{class:"slider-icon",style:i.normalizeStyle({border:t.isToggle?"1px solid #379FFF":"1px solid #00B5A4",background:t.isToggle?"#ffffff":"#C7ECEA"}),onClick:u[0]||(u[0]=h=>a(!t.isToggle)),onMouseenter:u[1]||(u[1]=h=>c.value=!0),onMouseleave:u[2]||(u[2]=h=>c.value=!1)},[i.createElementVNode("div",{class:"icon-block",style:i.normalizeStyle({transform:i.unref(c)?t.isToggle?"rotate(-225deg) scale(1.2, 1.2)":"rotate(0deg) scale(1.2, 1.2)":t.isToggle?"rotate(-225deg)":"rotate(0deg)",fill:t.isToggle?"#379FFF":"#00B5A4"})},[i.renderSlot(l.$slots,"icon",{},void 0,!0)],4)],36),i.createElementVNode("div",{class:"slider-info",style:i.normalizeStyle({width:`calc(${t.sliderOnWidth} - ${t.sliderOffWidth})`})},[i.renderSlot(l.$slots,"slider-body",{},void 0,!0)],4)],4),i.createElementVNode("div",yd,[i.renderSlot(l.$slots,"body",{},void 0,!0)]),i.createElementVNode("div",wd,[i.renderSlot(l.$slots,"tabs",{},void 0,!0)])]))}}),[["__scopeId","data-v-0cfd77ce"]]);var ue=(t=>(t.String="string",t.Text="text",t.Number="number",t.Date="date",t.DateTime="dateTime",t.Radio="radio",t.Set="set",t.Boolean="boolean",t.Files="files",t.File="file",t.MatrixRadio="matrixRadio",t.MatrixSet="matrixSet",t))(ue||{});const bd=["label","value"],Nr=x(i.defineComponent({__name:"SelectValueType",props:{selectedType:{type:String,required:!0}},emits:["select"],setup(t,{emit:e}){const n={[ue.String]:"Текстовый ответ",[ue.Text]:"Развёрнутый текстовый ответ",[ue.Number]:"Числовой ответ",[ue.Date]:"Ответ в виде даты",[ue.Radio]:"Выбор одного из вариантов",[ue.Set]:"Выбор нескольких вариантов",[ue.File]:"Ответ в виде файла",[ue.MatrixRadio]:"Матрица с одним выбором",[ue.MatrixSet]:"Матрица с несколькими выборами"},o=e,r=s=>{o("select",s)};return(s,a)=>{const c=i.resolveComponent("PString"),l=i.resolveComponent("PSelect");return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(c,{string:"Выберите вид ответа:","font-size":"14px",padding:"0","justify-content":"left",margin:"10px 0"}),i.createVNode(l,{"model-value":t.selectedType,placeholder:"Вид ответа",onChange:r},{default:i.withCtx(()=>[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(n,(u,h)=>i.createElementVNode("option",{key:u,label:u,value:h},null,8,bd)),64))]),_:1},8,["model-value"])],64)}}}),[["__scopeId","data-v-36a59e2b"]]),Cd={class:"field"},Pr=x(i.defineComponent({__name:"SingleNameToggleForm",props:{withName:{type:Object,required:!0}},emits:["submit"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(!1),s=i.ref(),a=i.ref(n.withName.name),c=i.ref(!1),l=()=>{c.value=!1},u=async()=>{a.value.trim(),n.withName.setName&&n.withName.setName(a.value),r.value=!r.value,o("submit")};return(h,f)=>{const m=i.resolveComponent("PString"),g=i.resolveComponent("el-input"),p=i.resolveComponent("el-form-item"),E=i.resolveComponent("el-form"),w=i.resolveComponent("PButton");return i.openBlock(),i.createBlock(E,{ref_key:"form",ref:s,style:{width:"100%"}},{default:i.withCtx(()=>[i.createVNode(Zt,{title:"Название","show-save-dialog":c.value,icon:"edit-title","with-hover":!0,close:r.value,width:"100%",onKeyupEnter:u,onAfterClose:l},{"open-inside-content":i.withCtx(()=>[i.createVNode(Zt,{title:"",icon:"edit-title","with-open-window":!1,"with-hover":!1,"border-color":"#ffffff","base-box-margin":"0 0 15px 0",padding:"0",width:"100%","custom-class":"test","open-width":"100%"},{default:i.withCtx(()=>[i.createElementVNode("div",Cd,[i.createVNode(E,null,{default:i.withCtx(()=>[i.createVNode(p,{style:{width:"100%"},prop:"surname"},{default:i.withCtx(()=>[i.createVNode(g,{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=M=>a.value=M),style:{width:"100%"},autosize:!0,type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1}),i.createVNode(w,{type:"admin",color:"blue",text:"Сохранить",onClick:u})]),default:i.withCtx(()=>[a.value.length?(i.openBlock(),i.createBlock(m,{key:0,string:a.value.length>60?a.value.slice(0,60)+"...":a.value},null,8,["string"])):(i.openBlock(),i.createBlock(m,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:1},8,["show-save-dialog","close"])]),_:1},512)}}}),[["__scopeId","data-v-cc488c49"]]);var Me=(t=>(t.Asc="asc",t.Desc="desc",t))(Me||{});function Tr(t,e){const n=[],o=e||Me.Asc,r=o===Me.Asc?Me.Desc:Me.Asc;return Object.values(t).forEach(s=>{n.push(s(o)),n.push(s(r))}),n.length>0&&!n.some(s=>s.default)&&(n[0].default=!0),e&&n.forEach(s=>{s.default&&(s.default=s.order===e)}),n}class Sd{constructor(){d(this,"list",[]);d(this,"defaultSortModel");d(this,"changeFlag",!1)}Set(e){this.Reset(),e&&(Array.isArray(e)?this.list=e:this.list=Tr(e),this.SetDefault())}SetDefault(){this.defaultSortModel=this.list.find(e=>e.default)??this.list[0],this.changeFlag=!this.changeFlag}Get(){return this.list}GetDefault(){return this.defaultSortModel}Reset(){this.list=[],this.defaultSortModel=void 0}}const Te=new Sd,kd=["label","value"],zr=x(i.defineComponent({__name:"SortList",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(t,{emit:e}){const n=i.ref(!1),o=e,r=i.ref();i.onBeforeMount(()=>{n.value=!0,r.value=Te.GetDefault(),S.H.FTSP.Get().setSortModel(r.value)});const s=async c=>{r.value=c??Te.GetDefault(),S.H.FTSP.Get().setSortModel(r.value),S.H.FTSP.Get().p.drop(),o("load")},a=async c=>{S.H.FTSP.Get().p.drop(),await s(c)};return(c,l)=>{var h;const u=i.resolveComponent("PSelect");return i.unref(n)?(i.openBlock(),i.createBlock(u,{key:0,modelValue:i.unref(r),"onUpdate:modelValue":l[0]||(l[0]=f=>i.isRef(r)?r.value=f:null),"popper-append-to-body":!1,clearable:!((h=i.unref(r))!=null&&h.default),"value-key":"label",onChange:a,onClear:l[1]||(l[1]=f=>a())},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Te).Get(),(f,m)=>(i.openBlock(),i.createElementBlock("option",{key:m,label:f.label,value:f},null,8,kd))),128))]),_:1},8,["modelValue","clearable"])):i.createCommentVNode("",!0)}}}),[["__scopeId","data-v-09845b7b"]]),Ed=["label","value"],Vr=x(i.defineComponent({__name:"SortSelect",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(t,{emit:e}){const n=e,o=i.ref();i.onBeforeMount(()=>{o.value=Te.GetDefault()});const r=async a=>{a||(o.value=Te.GetDefault()),S.H.FTSP.Get().setSortModel(o.value),S.H.FTSP.Get().p.drop(),n("load")},s=async a=>{await r(a)};return(a,c)=>{var u;const l=i.resolveComponent("PSelect");return i.openBlock(),i.createBlock(l,{modelValue:i.unref(o),"onUpdate:modelValue":c[0]||(c[0]=h=>i.isRef(o)?o.value=h:null),"popper-append-to-body":!1,clearable:!((u=i.unref(o))!=null&&u.default),"value-key":"label",onChange:s},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Te).Get(),(h,f)=>(i.openBlock(),i.createElementBlock("option",{key:f,label:h.label,value:h},null,8,Ed))),128))]),_:1},8,["modelValue","clearable"])}}}),[["__scopeId","data-v-a1820654"]]),vd={class:"switch-container"},xd={class:"line"},Bd={class:"line"},Fr=x(i.defineComponent({__name:"Switch3Pos",props:{firstModel:{type:Object,required:!0},secondModel:{type:Object,required:!0},defaultLabel:{type:String,default:"Все"}},emits:["load"],setup(t,{emit:e}){const n=t,o={background:"inherit",border:"1px solid #c4c4c4"},r=()=>n.firstModel.valueEq(u.value)?void 0:o,s=()=>u.value?o:void 0,a=()=>n.secondModel.valueEq(u.value)?void 0:o,c=f=>{var g;return{color:(g=u.value)!=null&&g.valueEq(f)?"#006bb4":"#B0A4C0"}},l=e,u=i.ref(void 0),h=async f=>{var m;(m=u.value)!=null&&m.valueEq(f)||(S.H.FTSP.Get().replaceF(f,u.value),u.value=f,l("load"))};return(f,m)=>{const g=i.resolveComponent("PString");return i.openBlock(),i.createElementBlock("div",vd,[i.createElementVNode("div",xd,[i.createVNode(g,{string:t.firstModel.label,"font-size":"12px",padding:"0",style:i.normalizeStyle(c(t.firstModel)),onClick:m[0]||(m[0]=p=>h(t.firstModel))},null,8,["string","style"]),i.createVNode(g,{string:"Все","font-size":"12px",padding:"0",style:i.normalizeStyle(c()),onClick:m[1]||(m[1]=p=>h())},null,8,["style"]),i.createVNode(g,{string:t.secondModel.label,"font-size":"12px",padding:"0",style:i.normalizeStyle(c(t.secondModel)),onClick:m[2]||(m[2]=p=>h(t.secondModel))},null,8,["string","style"])]),i.createElementVNode("div",Bd,[i.createElementVNode("div",{class:i.normalizeClass(["switch-knob1",{active:t.firstModel.valueEq(i.unref(u))}]),style:i.normalizeStyle(r()),onClick:m[3]||(m[3]=p=>h(t.firstModel))},null,6),i.createElementVNode("div",{class:i.normalizeClass(["switch-knob2",{active:!i.unref(u)}]),style:i.normalizeStyle(s()),onClick:m[4]||(m[4]=p=>h())},null,6),i.createElementVNode("div",{class:i.normalizeClass(["switch-knob3",{active:t.secondModel.valueEq(i.unref(u))}]),style:i.normalizeStyle(a()),onClick:m[5]||(m[5]=p=>h(t.secondModel))},null,6),m[6]||(m[6]=i.createElementVNode("div",{class:"switch-axis"},null,-1)),m[7]||(m[7]=i.createElementVNode("div",{class:"switch-axis-dash1"},null,-1)),m[8]||(m[8]=i.createElementVNode("div",{class:"switch-axis-dash2"},null,-1)),m[9]||(m[9]=i.createElementVNode("div",{class:"switch-axis-dash3"},null,-1))])])}}}),[["__scopeId","data-v-78475d54"]]),Md={},Id={class:"flex"};function Rd(t,e){return i.openBlock(),i.createElementBlock("div",Id,[i.renderSlot(t.$slots,"default",{},void 0,!0)])}const Dr=x(Md,[["render",Rd],["__scopeId","data-v-5023d414"]]),Or=x(i.defineComponent({__name:"ToggleInfoItem",props:{title:{type:String,required:!0},content:{type:String,required:!0}},emits:["submit"],setup(t,{emit:e}){const n=i.ref(!1),o=e,r=async()=>{o("submit"),n.value=!n.value};return(s,a)=>{const c=i.resolveComponent("PString"),l=i.resolveComponent("PButton"),u=i.resolveComponent("GridContainer"),h=i.resolveComponent("InfoItem");return i.openBlock(),i.createBlock(h,{title:t.title,icon:"edit-title","with-hover":!0,close:i.unref(n),width:"100%",onKeyupEnter:r},{"open-inside-content":i.withCtx(()=>[i.createVNode(u,{"custom-class":"grid"},{default:i.withCtx(()=>[i.renderSlot(s.$slots,"default",{},void 0,!0),i.createVNode(l,{type:"admin",color:"blue",text:"Сохранить",onClick:r})]),_:3})]),default:i.withCtx(()=>[t.content.length>0?(i.openBlock(),i.createBlock(c,{key:0,string:t.content},null,8,["string"])):(i.openBlock(),i.createBlock(c,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:3},8,["title","close"])}}}),[["__scopeId","data-v-0794596f"]]),$d={class:"top-slider-content"},Ad={class:"center"},Lr=x(i.defineComponent({__name:"TopSliderContainer",props:{sliderOffHeight:{type:String,required:!1,default:"53px"},sliderOnHeight:{type:String,required:!1,default:"220px"},background:{type:String,required:!1,default:"inherit"},toggle:{type:Boolean,default:!1}},emits:["toggle"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(!0);i.watch(()=>n.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("toggle",a)};return(a,c)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.unref(r)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",{key:0,class:"blur",onClick:[c[0]||(c[0]=i.withModifiers(l=>r.value=!0,["prevent"])),c[1]||(c[1]=i.withModifiers(()=>{},["stop"]))]})),i.createElementVNode("div",{class:"top-slider",style:i.normalizeStyle({marginTop:i.unref(r)?`calc(${t.sliderOffHeight} - ${t.sliderOnHeight})`:"0",height:t.sliderOnHeight}),onClick:c[3]||(c[3]=i.withModifiers(()=>{},["stop"]))},[i.createElementVNode("div",$d,[i.createElementVNode("div",Ad,[i.renderSlot(a.$slots,"default",{},void 0,!0)])]),i.createElementVNode("div",{class:"click-line",style:i.normalizeStyle({height:t.sliderOffHeight}),onClick:c[2]||(c[2]=l=>s(!i.unref(r)))},[i.renderSlot(a.$slots,"title",{},void 0,!0)],4)],4)],64))}}),[["__scopeId","data-v-683131f5"]]);class Xt{constructor(e){d(this,"id");d(this,"ratio",0);d(this,"src","");d(this,"store","");V.BuildClass(this,e)}static CreateCropper(e,n,o){const r=new Xt;return r.src=e,r.id=o,n&&(r.ratio=n),r}}const Nd={id:"drop-area",class:"img-container"},Pd={key:0},Td=["src"],zd={class:"tools-button"},Vd={class:"ins"},Fd={key:1},Dd=["id"],_r=x(i.defineComponent({__name:"UploaderImage",props:{withCrop:{type:Boolean,default:!0},fileInfo:{type:Be,required:!0},height:{type:Number,default:150},width:{type:Number,default:150},cropRatio:{type:Boolean,default:!0},emitCrop:{type:Boolean,default:!1},defaultRatio:{type:Number,required:!1,default:1}},emits:["crop","removeFile"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(void 0),s=S.H.Id.GUID(),a=i.ref(!1),c=i.ref(),l=w=>{const M=n.cropRatio?n.defaultRatio:0;S.S.Cropper.Open(Xt.CreateCropper(w.url,M,n.fileInfo.id)),a.value=!0},u=()=>{S.UI.Dialog.Show({text:"Вы хотите удалить изображение",confirmButtonText:"Удалить",cancelButtonText:"Не удалять"}).then(()=>{r.value=void 0,c.value.clearFiles(),o("removeFile")})},h=w=>{n.fileInfo.setFile(w),n.fileInfo.fileSystemPath&&(r.value=n.fileInfo),a.value=!1,o("crop")};i.onBeforeMount(()=>{n.fileInfo.fileSystemPath&&(r.value=n.fileInfo,r.value.url=n.fileInfo.getFileUrl())});let f=null;i.onMounted(()=>{const w=document.getElementById("drop-area");w&&(w.addEventListener("dragover",M=>{m(M),w.classList.add("drag-over")}),w.addEventListener("dragleave",M=>{m(M),w.classList.remove("drag-over")}),w.addEventListener("dragenter",m),w.addEventListener("dragleave",m),w.addEventListener("drop",p),f=document.getElementById(s))});function m(w){w.preventDefault(),w.stopPropagation()}const g=()=>{f&&f.click()};function p(w){if(w.preventDefault(),!w.dataTransfer)return;const M=w.dataTransfer.files;M.length&&f&&(f.files=M,E())}const E=()=>{if(!f||!f.files||!f.files.length)return;const w=f.files[0];w.url=URL.createObjectURL(w),r.value=w,n.fileInfo.uploadNewFile(w),l(r.value)};return(w,M)=>{const O=i.resolveComponent("PButton"),L=i.resolveComponent("ImageCropper");return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",Nd,[i.unref(r)?(i.openBlock(),i.createElementBlock("div",Pd,[i.createElementVNode("div",{class:"img-block",style:i.normalizeStyle({width:t.height*t.defaultRatio-2+"px",height:t.height+"px"})},[i.createElementVNode("img",{class:"el-upload-list__item-thumbnail",src:i.unref(r).url,alt:"upload-image"},null,8,Td)],4),i.createElementVNode("div",zd,[i.createElementVNode("div",Vd,[i.createVNode(O,{skin:"text",text:"Изменить","font-size":"20px",width:"300px",margin:"100px 0 0 0",onClick:M[0]||(M[0]=F=>l(i.unref(r)))}),i.createVNode(O,{skin:"text",text:"Удалить","font-size":"20px",width:"300px",margin:"50px 0 0 0",onClick:M[1]||(M[1]=F=>u())})])])])):(i.openBlock(),i.createElementBlock("div",Fd,[i.createElementVNode("div",{class:"add-button",style:i.normalizeStyle({width:t.height*t.defaultRatio-2+"px",height:t.height+"px"})},[i.createVNode(O,{skin:"text",text:"Добавить","font-size":"20px",onClick:g})],4)]))]),i.createElementVNode("input",{id:i.unref(s),type:"file",hidden:"",onChange:E},null,40,Dd),t.withCrop?(i.openBlock(),i.createBlock(L,{key:0,open:i.unref(a),"default-ratio":t.defaultRatio,onCrop:h,onClose:M[2]||(M[2]=F=>a.value=!1)},null,8,["open","default-ratio"])):i.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-4119c534"]]);var pe=(t=>(t.Login="login",t.Register="register",t.Restore="restore",t.Refresh="refresh",t))(pe||{});class Ge{constructor(e,n,o,r){d(this,"text","Сохранить");d(this,"type",ce.Success);d(this,"condition",!0);d(this,"action");d(this,"id","button");d(this,"disabled",!1);this.text=e,this.type=o,this.action=n,r!==void 0&&(this.condition=r)}static Primary(e,n,o){return new Ge(e,n,ce.Primary,o)}static Success(e,n,o){return new Ge(e,n,ce.Success,o)}static Warning(e,n,o){return new Ge(e,n,ce.Warning,o)}static Error(e,n,o){return new Ge(e,n,ce.Error,o)}}class Hr extends Ge{constructor(){super(...arguments);d(this,"id","auth-button");d(this,"status",pe.Login);d(this,"submit",!1)}GetStatus(){return this.status}}let jn=class extends Hr{constructor(){super(...arguments);d(this,"id","auth-button-login");d(this,"text","Войти");d(this,"isSubmit",!1);d(this,"disabled",!1)}};class Gn extends Hr{constructor(){super(...arguments);d(this,"id","auth-button-register");d(this,"text","Зарегистрироваться");d(this,"isSubmit",!1);d(this,"disabled",!1)}}class Od{constructor(){d(this,"value","");d(this,"label","");d(this,"placeholder","");d(this,"validator")}Validate(){return this.validator?(this.validator.validate(this.value),this.validator.errors):[]}Reset(){this.value=""}}class Jt extends Od{constructor(){super(...arguments);d(this,"method");d(this,"id","field-auth");d(this,"name","")}}var at=(t=>(t.Login="login",t.Email="email",t.Phone="phone",t.VK="vk",t.ESIA="esia",t))(at||{});const Ld=/\S+@\S+\.\S+/;class qr{constructor(){d(this,"errors",[])}validate(e){return(e===""||!e)&&this.errors.push("Введите email"),Ld.test(e)||this.errors.push("Некорректный email"),this.errors}}class Yt extends Jt{constructor(){super(...arguments);d(this,"id","field-auth-email");d(this,"label","Email");d(this,"name","email");d(this,"placeholder","Введите email");d(this,"validator",new qr);d(this,"method",at.Email)}}class _d{constructor(){d(this,"errors",[]);d(this,"length",6)}validate(e){return e===""||!e?(this.errors.push("Введите пароль"),this.errors):(e.length<this.length&&this.errors.push("Пароль недостаточной длины"),this.errors)}}class Qt extends Jt{constructor(){super(...arguments);d(this,"label","Пароль");d(this,"validator",new _d);d(this,"name","password");d(this,"placeholder","Введите пароль");d(this,"id","field-auth-password")}}class Ur extends Jt{constructor(){super(...arguments);d(this,"label","Повторите пароль");d(this,"id","field-auth-password-repeat")}}const Wr={[pe.Login]:{methods:[at.Email],title:"Вход в систему",action:"login",buttons:[new jn,new Gn],fields:[new Yt,new Qt],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно вошли в систему"},[pe.Register]:{methods:[],title:"Регистрация",action:"register",buttons:[new Gn,new jn],fields:[new Yt,new Qt,new Ur],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно зарегистрировались в системе, войдите под своим паролем"},[pe.Restore]:{title:"Восстановление пароля",methods:[],action:"restorePassword",successMessage:"Ссылка для восстановления пароля отправлена на Вашу почту",errorMessage:"Неверно указан email",buttons:[],fields:[new Yt]},[pe.Refresh]:{methods:[],title:"Создание нового пароля",action:"passwordChange",successMessage:"Воспользуйтесь новым паролем для входа",errorMessage:"Неверно указан email",buttons:[],fields:[new Qt]}};class Hd{constructor(){d(this,"settings",Wr);d(this,"status",pe.Login);d(this,"selectedMethod",at.Email)}async Block(e){await e()}GetValues(){const e=this.GetFields(),n=new Map;return e.forEach(o=>{o.value&&n.set(o.name,o.value)}),n}Validate(){return[]}GetFields(){return this.GetCurSet().fields.filter(e=>!e.method||e.method===this.selectedMethod)}GetMethods(){return this.GetCurSet().methods}Status(){return this.status}GetCurSet(){return this.settings[this.status]}IsLogin(){return this.status===pe.Login}IsRegister(){return this.status===pe.Register}IsRestore(){return this.status===pe.Restore}IsRefresh(){return this.status===pe.Refresh}SetStatus(e){this.status=e}GetTitle(){return this.GetCurSet().title}GetButtons(){const e=this.GetCurSet().buttons;return e.forEach(n=>{n.submit=!1}),e.length>0&&(e[0].submit=!0),e}GetSuccessMessage(){return this.GetCurSet().successMessage}GetErrorMessage(){return this.GetCurSet().errorMessage}GetAction(){return this.GetCurSet().action}ResetFields(){this.GetCurSet().fields.forEach(e=>e.Reset())}Reset(){this.status=pe.Login}}class qd{constructor(){d(this,"visible",!1);d(this,"closable",!1)}IsClosable(){return this.closable}IsVisible(){return this.visible}Close(){this.visible=!1}Open(e){e&&(this.closable=!0),this.visible=!0}}class jr{constructor(){d(this,"visible",!1)}hide(){this.visible=!1}show(){this.hide(),this.visible=!0}IsVisible(){return this.visible}}class Gr extends jr{constructor(){super(...arguments);d(this,"type",ce.Success);d(this,"text","");d(this,"title","")}showMessage(n,o){this.hide(),this.type=o,typeof n=="string"?this.text=n:(this.text=n.text,this.title=n.title??""),super.show()}GetText(){return this.text}GetTitle(){return this.title}GetType(){return this.type}Info(n){this.showMessage(n,ce.Info)}Success(n){this.showMessage(n,ce.Success)}Error(n){this.showMessage(n,ce.Error)}Warning(n){this.showMessage(n,ce.Warning)}FormMessage(n){let o="<strong>Проверьте правильность введенных данных:</strong><ul>";for(const r of Object.keys(n))n[r][0]&&n[r][0].message&&(o+=`<li>${n[r][0].message}</li>`);return o+="</ul>",o}}class Zn{static Get(e,n,o="-"){return!e||!n?"":`${e}${o}${n}`}static In(e,n,o){return e>=n&&e<=o}static Intersects(e,n,o,r){return e===o||n===r||e>o&&e<r||n>o&&n<r||n>r&&e<o}}const Zr=1e3,Xr=60*Zr,Xn=60*Xr;var Ct=(t=>(t.FiveMinutes="5",t.HourQuarter="15",t.HourHalf="30",t.Hour="60",t))(Ct||{});const Kt={5:["00","05","10","15","20","25","30","35","40","45","50","55"],15:["00","15","30","45"],30:["00","30"],60:["00"]};class H{static S(e){return Zr*e}static M(e){return Xr*e}static H(e){return Xn*e}static D(e){return Xn*e}static W(e){return Xn*e}static NormalizeTime(e){return String(e).padStart(2,"0")}static HMtoM(e){const n=H.SplitHM(e);return n.length>1?H.HtoM(n[0])+n[1]:H.HtoM(n[0])}static HtoM(e){return Number(e)*60}static SplitHM(e){if(!e)return[];const n=e.split(":");return[Number(n[0]),Number(n[1])]}static HmsToHm(e){const n=H.SplitHM(e);return H.ConcatHM(n[0],n[1])}static AddMtoHM(e,n){const o=new Date,r=H.SplitHM(e);o.setHours(r[0],r[1],0,0);const s=new Date(o.getTime()+n*6e4),a=s.getHours(),c=s.getMinutes();return H.ConcatHM(a,c)}static ConcatHM(e,n){return`${e}:${H.NormalizeTime(n)}`}static DiffM(e,n){return H.Gt(n,e)?H.HMtoM(n)-H.HMtoM(e):H.HMtoM(e)-H.HMtoM(n)}static GetPeriod(e,n){return Zn.Get(e,n)}static Gt(e,n){return H.HMtoM(e)>H.HMtoM(n)}static GtOrEq(e,n){return H.Gt(e,n)||H.Eq(e,n)}static Eq(e,n){return H.HMtoM(e)===H.HMtoM(n)}static PeriodInPeriod(e,n,o,r){return H.HMtoM(e)>=H.HMtoM(o)&&H.HMtoM(n)<=H.HMtoM(r)}static PeriodsIntersects(e,n,o,r){return Zn.Intersects(H.HMtoM(e),H.HMtoM(n),H.HMtoM(o),H.HMtoM(r))}}class St{static Wait(e,n){return new Promise(o=>setTimeout(()=>o(n),e))}static WaitS(e,n){return St.Wait(H.S(e),n)}static WaitM(e,n){return St.Wait(H.M(e),n)}}class Ud extends Gr{constructor(){super(...arguments);d(this,"duration",H.S(3))}showMessage(n,o){super.showMessage(n,o),typeof n!="string"&&(this.duration=n.duration??this.duration),St.Wait(this.GetDuration()).then(()=>super.hide())}GetDuration(){return this.duration}Dev(){const n="В режиме разработки",o=ce.Warning;super.showMessage(n,o)}Save(){const n="Изменения успешно сохранены",o=ce.Success;super.showMessage(n,o)}}const kt=new Ud;class Ie{static Get(e){const n=localStorage.getItem(e);if(n)return JSON.parse(n)}static Set(e,n){n&&localStorage.setItem(e,JSON.stringify(n))}static Remove(e){localStorage.removeItem(e)}}var Se=(t=>(t.User="user",t.AccessToken="accessToken",t.RefreshToken="refreshToken",t))(Se||{});class Wd{set(e){this.setAccessToken(e.accessToken),this.setRefreshToken(e.refreshToken)}getAccessToken(){return Ie.Get(Se.AccessToken)}getRefreshToken(){return Ie.Get(Se.RefreshToken)}setAccessToken(e){Ie.Set(Se.AccessToken,e)}setRefreshToken(e){Ie.Set(Se.RefreshToken,e)}reset(){Ie.Remove(Se.AccessToken),Ie.Remove(Se.RefreshToken)}actualize(){this.setAccessToken(this.getAccessToken()),this.setRefreshToken(this.getAccessToken())}}class jd{constructor(){d(this,"user");d(this,"userConstructor")}AssignTo(e){e.user=this.get()}setUserConstructor(e){this.userConstructor=e}get(){if(this.userConstructor)return this.user=new this.userConstructor(Ie.Get(Se.User)),this.user}set(e){this.userConstructor&&(this.user=new this.userConstructor(e),Ie.Set(Se.User,this.user))}reset(){this.user=void 0,Ie.Remove(Se.User)}actualize(){const e=Ie.Get(Se.User);e&&this.set(e)}}class Gd{constructor(){d(this,"isAuth",!1);d(this,"user",new jd);d(this,"tokens",new Wd);d(this,"preventLogout",!1)}DeprecateLogout(){this.preventLogout=!0}AllowLogout(){this.preventLogout=!1}get IsAuth(){return this.isAuth}get User(){return this.user.get()}SetUserConstructor(e){this.user.setUserConstructor(e)}SetState(e){this.user.set(e.user),this.tokens.set(e.tokens),this.isAuth=!0}Logout(){if(this.preventLogout){kt.Warning("В текущий момент Вы не можете выйти из системы");return}this.user.reset(),this.tokens.reset(),this.isAuth=!1}Actualize(){if(this.user.actualize(),this.tokens.actualize(),this.user.get()&&this.tokens.getAccessToken()&&this.tokens.getRefreshToken()){this.isAuth=!0;return}this.Logout()}}class Zd{constructor(){d(this,"form",new Hd);d(this,"status",new Gd);d(this,"modal",new qd)}get Form(){return this.form}get Status(){return this.status}get Modal(){return this.modal}}const Jr=new Zd;class Xd extends Jt{constructor(){super(...arguments);d(this,"label","Логин");d(this,"name","login");d(this,"validator",new qr);d(this,"method",at.Login);d(this,"id","field-auth-login")}}class Ze{constructor(e){d(this,"id");d(this,"address");d(this,"description");d(this,"contactId");V.BuildClass(this,e)}static Create(){const e=new Ze;return e.id=ve.UUID(),e}}class Yr{constructor(e){d(this,"id");d(this,"name","");d(this,"surname","");d(this,"patronymic","");d(this,"isMale",!0);d(this,"dateBirth",new Date);d(this,"contactId");d(this,"slug","");d(this,"postIndex","");d(this,"address","");d(this,"editNameMode",!1);V.BuildClass(this,e)}setEditNameMode(e){this.editNameMode=e}getFullName(){return!this.surname.length&&!this.name.length&&!this.patronymic.length?"":`${this.surname} ${this.name} ${this.patronymic}`}getInitialsName(){return`${this.name.slice(0,1)}.${this.patronymic.slice(0,1)}. ${this.surname}`}getGender(e){return e?this.isMale?"Мужской":"Женский":this.isMale?"М":"Ж"}capitalizeName(){this.name=ne.Capitalize(this.name),this.surname=ne.Capitalize(this.surname),this.patronymic=ne.Capitalize(this.patronymic)}trimName(){this.name=this.name.trim(),this.surname=this.surname.trim(),this.patronymic=this.patronymic.trim()}sanitizeName(){this.trimName(),this.capitalizeName()}setFullName(e){this.surname=e.surname,this.name=e.name,this.patronymic=e.patronymic}}class en{constructor(e){d(this,"model","");d(this,"col","");d(this,"order");d(this,"label","");d(this,"default",!1);d(this,"selected",!1);V.BuildClass(this,e)}static Create(e,n,o=Me.Asc,r,s){const a=new en;return a.model=e.GetClassName(),a.col=n??"",a.order=o??Me.Asc,a.label=r??"",a.default=s??!1,a}isAsc(){return this.order===Me.Asc}isDesc(){return this.order===Me.Desc}eq(e){return e.model===this.model&&e.col===this.col&&e.order===this.order}toUrlQuery(){const e=this.model?`"model":"${this.model}"`:"",n=this.col?`"col":"${this.col}"`:"",o=this.order?`"order":"${this.order}"`:"";return[e,n,o].toString()}async fromUrlQuery(){const e=window.location.search,n=e.substring(e.indexOf("s=")+2,e.indexOf("|")),o=new URLSearchParams(decodeURIComponent(n));this.model=o.get("model")??"",this.col=o.get("col")??"",this.label=o.get("label")??"",this.default=!!o.get("default"),this.order=o.get("order")??""}asc(){this.order=Me.Asc}desc(){this.order=Me.Desc}}const Jd=Object.freeze(Object.defineProperty({__proto__:null,Auth:Jr,AuthButtonLogin:jn,AuthButtonRegister:Gn,AuthFormSettings:Wr,AuthFormStatuses:pe,AuthMethods:at,Email:Ze,EmailField:Yt,FileInfo:Be,Human:Yr,LoginField:Xd,PasswordField:Qt,PasswordRepeatField:Ur,SortModel:en},Symbol.toStringTag,{value:"Module"}));class Yd{constructor(){d(this,"operation",de.Lt);d(this,"column","");d(this,"value");d(this,"initial",!0);d(this,"tableName","");d(this,"version","");d(this,"model","")}toUrlQuery(){const e=this.operation?`"operation":"${this.operation}"`:"",n=this.column?`"column":"${this.column}"`:"",o=this.value&&typeof this.value.toISOString=="function"?this.value.toISOString():this.value,r=o?`"value":"${o}"`:"",s=this.model?`"model":"${this.model}"`:"",a=`"initial":${this.initial}`;return[e,n,r,s,a].filter(c=>c!=="").toString()}fromUrlQuery(e){e.cursvalue&&(this.value=e.cursvalue),e.curscolumn&&(this.column=String(e.curscolumn)),e.cursinitial!==void 0&&(this.initial=!!e.cursinitial),e.curstableName&&(this.tableName=String(e.curstableName)),e.cursoperation&&(this.operation=e.cursoperation)}}class tn{constructor(e){d(this,"offset",0);d(this,"limit",25);d(this,"cursor",new Yd);d(this,"cursorMode",!1);d(this,"append",!1);d(this,"allLoaded",!1);d(this,"version","");V.BuildClass(this,e)}setLoadMore(e,n,o){this.cursor.value=e,this.cursor.initial=!1,this.cursor.operation=de.Gt,this.cursor.column=n,this.cursor.tableName=o,this.cursorMode=!0}setLoadMoreV2(e,n,o){this.cursor.value=e,this.cursor.initial=!1,this.cursor.operation=de.Gt,this.cursor.column=n,this.cursor.model=o,this.cursorMode=!0,this.version="v2"}setOffset(e){this.offset=e}toUrlQuery(){const e=`"offset":${this.offset}`,n=`"limit":${this.limit}`,o=`"cursorMode":${this.cursorMode}`,r=`"append":${this.append}`,s=`"allLoaded":${this.allLoaded}`,a=`"cursor":{${this.cursor.toUrlQuery()}}`;return[e,n,o,r,s,a].toString()}fromUrlQuery(){const e=window.location.search,n=e.substring(e.indexOf("p=")+2,e.lastIndexOf("|")),o=new URLSearchParams(decodeURIComponent(n));this.offset=Number(o.get("offset")),this.limit=Number(o.get("col"))}setAllLoaded(e){this.allLoaded=!(e>=this.limit)}resetAllLoaded(){this.allLoaded=!1}getPageNum(){return this.offset/this.limit+1}drop(){this.offset=0,this.limit=25,V.BuildClass(this)}}class nn{constructor(){d(this,"model","");d(this,"cols",[]);d(this,"models",[])}static Create(e,n){const o=new nn;return o.model=e.GetClassName(),o.cols=n,o}}var Qd=Object.defineProperty,on=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&Qd(e,n,r),r};const Et=(ye=class{constructor(e){d(this,"id");d(this,"f",[]);d(this,"s",[]);d(this,"p",new tn);d(this,"t",new nn);V.BuildClass(this,e)}static Get(){return this.instance||(this.instance=new ye),this.instance}createFrom(e){const n=new ye(JSON.parse(e));this.f=n.f}clearForHTTP(){const e=new ye(this);return e.f=this.f.map(n=>ye.EmptyEntiries(n)),e.s=this.s.map(n=>ye.EmptyEntiries(n)),e.p=ye.EmptyEntiries(this.p),e.t=ye.EmptyEntiries(this.t),e}static EmptyEntiries(e){if(!e)return;const o=Object.entries(e).filter(([r,s])=>r!=="label"&&s!==""&&s!==null);return Object.fromEntries(o)}findFilterModel(e){return this.f.find(n=>e.id===n.id)}getFirstSortModel(){return He.GetLast(this.s)}setSortModel(e){e&&(this.s[0]=e)}setS(e){this.s[0]=e}setF(e){this.f.push(e)}replaceF(e,n){this.removeF(n),e&&this.setF(e)}removeF(e){const n=this.f.findIndex(o=>o.eq(e));V.RemoveFromClassByIndex(n,this.f)}reset(){this.f=[],this.s=[],this.p=new tn}resetF(){this.f=[]}},d(ye,"instance"),ye);on([V.GetClassConstructor(fo)],Et.prototype,"f"),on([V.GetClassConstructor(en)],Et.prototype,"s"),on([V.GetClassConstructor(tn)],Et.prototype,"p"),on([V.GetClassConstructor(nn)],Et.prototype,"t");let Qr=Et;class Xe{constructor(e){d(this,"id");d(this,"number");d(this,"description");d(this,"contactId");V.BuildClass(this,e)}static Create(){const e=new Xe;return e.id=ve.UUID(),e}}function Kr(t,e){return function(){return t.apply(e,arguments)}}const{toString:Kd}=Object.prototype,{getPrototypeOf:Jn}=Object,rn=(t=>e=>{const n=Kd.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Re=t=>(t=t.toLowerCase(),e=>rn(e)===t),sn=t=>e=>typeof e===t,{isArray:lt}=Array,vt=sn("undefined");function eu(t){return t!==null&&!vt(t)&&t.constructor!==null&&!vt(t.constructor)&&ge(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const es=Re("ArrayBuffer");function tu(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&es(t.buffer),e}const nu=sn("string"),ge=sn("function"),ts=sn("number"),an=t=>t!==null&&typeof t=="object",iu=t=>t===!0||t===!1,ln=t=>{if(rn(t)!=="object")return!1;const e=Jn(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},ou=Re("Date"),ru=Re("File"),su=Re("Blob"),au=Re("FileList"),lu=t=>an(t)&&ge(t.pipe),cu=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||ge(t.append)&&((e=rn(t))==="formdata"||e==="object"&&ge(t.toString)&&t.toString()==="[object FormData]"))},du=Re("URLSearchParams"),[uu,hu,fu,mu]=["ReadableStream","Request","Response","Headers"].map(Re),pu=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function xt(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let o,r;if(typeof t!="object"&&(t=[t]),lt(t))for(o=0,r=t.length;o<r;o++)e.call(null,t[o],o,t);else{const s=n?Object.getOwnPropertyNames(t):Object.keys(t),a=s.length;let c;for(o=0;o<a;o++)c=s[o],e.call(null,t[c],c,t)}}function ns(t,e){e=e.toLowerCase();const n=Object.keys(t);let o=n.length,r;for(;o-- >0;)if(r=n[o],e===r.toLowerCase())return r;return null}const Je=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,is=t=>!vt(t)&&t!==Je;function Yn(){const{caseless:t}=is(this)&&this||{},e={},n=(o,r)=>{const s=t&&ns(e,r)||r;ln(e[s])&&ln(o)?e[s]=Yn(e[s],o):ln(o)?e[s]=Yn({},o):lt(o)?e[s]=o.slice():e[s]=o};for(let o=0,r=arguments.length;o<r;o++)arguments[o]&&xt(arguments[o],n);return e}const gu=(t,e,n,{allOwnKeys:o}={})=>(xt(e,(r,s)=>{n&&ge(r)?t[s]=Kr(r,n):t[s]=r},{allOwnKeys:o}),t),yu=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),wu=(t,e,n,o)=>{t.prototype=Object.create(e.prototype,o),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},bu=(t,e,n,o)=>{let r,s,a;const c={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),s=r.length;s-- >0;)a=r[s],(!o||o(a,t,e))&&!c[a]&&(e[a]=t[a],c[a]=!0);t=n!==!1&&Jn(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Cu=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const o=t.indexOf(e,n);return o!==-1&&o===n},Su=t=>{if(!t)return null;if(lt(t))return t;let e=t.length;if(!ts(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},ku=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Jn(Uint8Array)),Eu=(t,e)=>{const o=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=o.next())&&!r.done;){const s=r.value;e.call(t,s[0],s[1])}},vu=(t,e)=>{let n;const o=[];for(;(n=t.exec(e))!==null;)o.push(n);return o},xu=Re("HTMLFormElement"),Bu=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,r){return o.toUpperCase()+r}),os=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Mu=Re("RegExp"),rs=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),o={};xt(n,(r,s)=>{let a;(a=e(r,s,t))!==!1&&(o[s]=a||r)}),Object.defineProperties(t,o)},Iu=t=>{rs(t,(e,n)=>{if(ge(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=t[n];if(ge(o)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Ru=(t,e)=>{const n={},o=r=>{r.forEach(s=>{n[s]=!0})};return lt(t)?o(t):o(String(t).split(e)),n},$u=()=>{},Au=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,Qn="abcdefghijklmnopqrstuvwxyz",ss="0123456789",as={DIGIT:ss,ALPHA:Qn,ALPHA_DIGIT:Qn+Qn.toUpperCase()+ss},Nu=(t=16,e=as.ALPHA_DIGIT)=>{let n="";const{length:o}=e;for(;t--;)n+=e[Math.random()*o|0];return n};function Pu(t){return!!(t&&ge(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Tu=t=>{const e=new Array(10),n=(o,r)=>{if(an(o)){if(e.indexOf(o)>=0)return;if(!("toJSON"in o)){e[r]=o;const s=lt(o)?[]:{};return xt(o,(a,c)=>{const l=n(a,r+1);!vt(l)&&(s[c]=l)}),e[r]=void 0,s}}return o};return n(t,0)},zu=Re("AsyncFunction"),Vu=t=>t&&(an(t)||ge(t))&&ge(t.then)&&ge(t.catch),ls=((t,e)=>t?setImmediate:e?((n,o)=>(Je.addEventListener("message",({source:r,data:s})=>{r===Je&&s===n&&o.length&&o.shift()()},!1),r=>{o.push(r),Je.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ge(Je.postMessage)),Fu=typeof queueMicrotask<"u"?queueMicrotask.bind(Je):typeof process<"u"&&process.nextTick||ls,C={isArray:lt,isArrayBuffer:es,isBuffer:eu,isFormData:cu,isArrayBufferView:tu,isString:nu,isNumber:ts,isBoolean:iu,isObject:an,isPlainObject:ln,isReadableStream:uu,isRequest:hu,isResponse:fu,isHeaders:mu,isUndefined:vt,isDate:ou,isFile:ru,isBlob:su,isRegExp:Mu,isFunction:ge,isStream:lu,isURLSearchParams:du,isTypedArray:ku,isFileList:au,forEach:xt,merge:Yn,extend:gu,trim:pu,stripBOM:yu,inherits:wu,toFlatObject:bu,kindOf:rn,kindOfTest:Re,endsWith:Cu,toArray:Su,forEachEntry:Eu,matchAll:vu,isHTMLForm:xu,hasOwnProperty:os,hasOwnProp:os,reduceDescriptors:rs,freezeMethods:Iu,toObjectSet:Ru,toCamelCase:Bu,noop:$u,toFiniteNumber:Au,findKey:ns,global:Je,isContextDefined:is,ALPHABET:as,generateString:Nu,isSpecCompliantForm:Pu,toJSONObject:Tu,isAsyncFn:zu,isThenable:Vu,setImmediate:ls,asap:Fu};function D(t,e,n,o,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),o&&(this.request=o),r&&(this.response=r,this.status=r.status?r.status:null)}C.inherits(D,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:C.toJSONObject(this.config),code:this.code,status:this.status}}});const cs=D.prototype,ds={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{ds[t]={value:t}}),Object.defineProperties(D,ds),Object.defineProperty(cs,"isAxiosError",{value:!0}),D.from=(t,e,n,o,r,s)=>{const a=Object.create(cs);return C.toFlatObject(t,a,function(l){return l!==Error.prototype},c=>c!=="isAxiosError"),D.call(a,t.message,e,n,o,r),a.cause=t,a.name=t.name,s&&Object.assign(a,s),a};const Du=null;function Kn(t){return C.isPlainObject(t)||C.isArray(t)}function us(t){return C.endsWith(t,"[]")?t.slice(0,-2):t}function hs(t,e,n){return t?t.concat(e).map(function(r,s){return r=us(r),!n&&s?"["+r+"]":r}).join(n?".":""):e}function Ou(t){return C.isArray(t)&&!t.some(Kn)}const Lu=C.toFlatObject(C,{},null,function(e){return/^is[A-Z]/.test(e)});function cn(t,e,n){if(!C.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=C.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,w){return!C.isUndefined(w[E])});const o=n.metaTokens,r=n.visitor||h,s=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&C.isSpecCompliantForm(e);if(!C.isFunction(r))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(C.isDate(p))return p.toISOString();if(!l&&C.isBlob(p))throw new D("Blob is not supported. Use a Buffer instead.");return C.isArrayBuffer(p)||C.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function h(p,E,w){let M=p;if(p&&!w&&typeof p=="object"){if(C.endsWith(E,"{}"))E=o?E:E.slice(0,-2),p=JSON.stringify(p);else if(C.isArray(p)&&Ou(p)||(C.isFileList(p)||C.endsWith(E,"[]"))&&(M=C.toArray(p)))return E=us(E),M.forEach(function(L,F){!(C.isUndefined(L)||L===null)&&e.append(a===!0?hs([E],F,s):a===null?E:E+"[]",u(L))}),!1}return Kn(p)?!0:(e.append(hs(w,E,s),u(p)),!1)}const f=[],m=Object.assign(Lu,{defaultVisitor:h,convertValue:u,isVisitable:Kn});function g(p,E){if(!C.isUndefined(p)){if(f.indexOf(p)!==-1)throw Error("Circular reference detected in "+E.join("."));f.push(p),C.forEach(p,function(M,O){(!(C.isUndefined(M)||M===null)&&r.call(e,M,C.isString(O)?O.trim():O,E,m))===!0&&g(M,E?E.concat(O):[O])}),f.pop()}}if(!C.isObject(t))throw new TypeError("data must be an object");return g(t),e}function fs(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(o){return e[o]})}function ei(t,e){this._pairs=[],t&&cn(t,this,e)}const ms=ei.prototype;ms.append=function(e,n){this._pairs.push([e,n])},ms.toString=function(e){const n=e?function(o){return e.call(this,o,fs)}:fs;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function _u(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ps(t,e,n){if(!e)return t;const o=n&&n.encode||_u,r=n&&n.serialize;let s;if(r?s=r(e,n):s=C.isURLSearchParams(e)?e.toString():new ei(e,n).toString(o),s){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class gs{constructor(){this.handlers=[]}use(e,n,o){return this.handlers.push({fulfilled:e,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){C.forEach(this.handlers,function(o){o!==null&&e(o)})}}const ys={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Hu={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:ei,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},ti=typeof window<"u"&&typeof document<"u",ni=typeof navigator=="object"&&navigator||void 0,qu=ti&&(!ni||["ReactNative","NativeScript","NS"].indexOf(ni.product)<0),Uu=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Wu=ti&&window.location.href||"http://localhost",fe={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ti,hasStandardBrowserEnv:qu,hasStandardBrowserWebWorkerEnv:Uu,navigator:ni,origin:Wu},Symbol.toStringTag,{value:"Module"})),...Hu};function ju(t,e){return cn(t,new fe.classes.URLSearchParams,Object.assign({visitor:function(n,o,r,s){return fe.isNode&&C.isBuffer(n)?(this.append(o,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function Gu(t){return C.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Zu(t){const e={},n=Object.keys(t);let o;const r=n.length;let s;for(o=0;o<r;o++)s=n[o],e[s]=t[s];return e}function ws(t){function e(n,o,r,s){let a=n[s++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),l=s>=n.length;return a=!a&&C.isArray(r)?r.length:a,l?(C.hasOwnProp(r,a)?r[a]=[r[a],o]:r[a]=o,!c):((!r[a]||!C.isObject(r[a]))&&(r[a]=[]),e(n,o,r[a],s)&&C.isArray(r[a])&&(r[a]=Zu(r[a])),!c)}if(C.isFormData(t)&&C.isFunction(t.entries)){const n={};return C.forEachEntry(t,(o,r)=>{e(Gu(o),r,n,0)}),n}return null}function Xu(t,e,n){if(C.isString(t))try{return(e||JSON.parse)(t),C.trim(t)}catch(o){if(o.name!=="SyntaxError")throw o}return(0,JSON.stringify)(t)}const Bt={transitional:ys,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const o=n.getContentType()||"",r=o.indexOf("application/json")>-1,s=C.isObject(e);if(s&&C.isHTMLForm(e)&&(e=new FormData(e)),C.isFormData(e))return r?JSON.stringify(ws(e)):e;if(C.isArrayBuffer(e)||C.isBuffer(e)||C.isStream(e)||C.isFile(e)||C.isBlob(e)||C.isReadableStream(e))return e;if(C.isArrayBufferView(e))return e.buffer;if(C.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1)return ju(e,this.formSerializer).toString();if((c=C.isFileList(e))||o.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return cn(c?{"files[]":e}:e,l&&new l,this.formSerializer)}}return s||r?(n.setContentType("application/json",!1),Xu(e)):e}],transformResponse:[function(e){const n=this.transitional||Bt.transitional,o=n&&n.forcedJSONParsing,r=this.responseType==="json";if(C.isResponse(e)||C.isReadableStream(e))return e;if(e&&C.isString(e)&&(o&&!this.responseType||r)){const a=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(c){if(a)throw c.name==="SyntaxError"?D.from(c,D.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:fe.classes.FormData,Blob:fe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};C.forEach(["delete","get","head","post","put","patch"],t=>{Bt.headers[t]={}});const Ju=C.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Yu=t=>{const e={};let n,o,r;return t&&t.split(`
|
|
34
34
|
`).forEach(function(a){r=a.indexOf(":"),n=a.substring(0,r).trim().toLowerCase(),o=a.substring(r+1).trim(),!(!n||e[n]&&Ju[n])&&(n==="set-cookie"?e[n]?e[n].push(o):e[n]=[o]:e[n]=e[n]?e[n]+", "+o:o)}),e},bs=Symbol("internals");function Mt(t){return t&&String(t).trim().toLowerCase()}function dn(t){return t===!1||t==null?t:C.isArray(t)?t.map(dn):String(t)}function Qu(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(t);)e[o[1]]=o[2];return e}const Ku=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ii(t,e,n,o,r){if(C.isFunction(o))return o.call(this,e,n);if(r&&(e=n),!!C.isString(e)){if(C.isString(o))return e.indexOf(o)!==-1;if(C.isRegExp(o))return o.test(e)}}function eh(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,o)=>n.toUpperCase()+o)}function th(t,e){const n=C.toCamelCase(" "+e);["get","set","has"].forEach(o=>{Object.defineProperty(t,o+n,{value:function(r,s,a){return this[o].call(this,e,r,s,a)},configurable:!0})})}class me{constructor(e){e&&this.set(e)}set(e,n,o){const r=this;function s(c,l,u){const h=Mt(l);if(!h)throw new Error("header name must be a non-empty string");const f=C.findKey(r,h);(!f||r[f]===void 0||u===!0||u===void 0&&r[f]!==!1)&&(r[f||l]=dn(c))}const a=(c,l)=>C.forEach(c,(u,h)=>s(u,h,l));if(C.isPlainObject(e)||e instanceof this.constructor)a(e,n);else if(C.isString(e)&&(e=e.trim())&&!Ku(e))a(Yu(e),n);else if(C.isHeaders(e))for(const[c,l]of e.entries())s(l,c,o);else e!=null&&s(n,e,o);return this}get(e,n){if(e=Mt(e),e){const o=C.findKey(this,e);if(o){const r=this[o];if(!n)return r;if(n===!0)return Qu(r);if(C.isFunction(n))return n.call(this,r,o);if(C.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Mt(e),e){const o=C.findKey(this,e);return!!(o&&this[o]!==void 0&&(!n||ii(this,this[o],o,n)))}return!1}delete(e,n){const o=this;let r=!1;function s(a){if(a=Mt(a),a){const c=C.findKey(o,a);c&&(!n||ii(o,o[c],c,n))&&(delete o[c],r=!0)}}return C.isArray(e)?e.forEach(s):s(e),r}clear(e){const n=Object.keys(this);let o=n.length,r=!1;for(;o--;){const s=n[o];(!e||ii(this,this[s],s,e,!0))&&(delete this[s],r=!0)}return r}normalize(e){const n=this,o={};return C.forEach(this,(r,s)=>{const a=C.findKey(o,s);if(a){n[a]=dn(r),delete n[s];return}const c=e?eh(s):String(s).trim();c!==s&&delete n[s],n[c]=dn(r),o[c]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return C.forEach(this,(o,r)=>{o!=null&&o!==!1&&(n[r]=e&&C.isArray(o)?o.join(", "):o)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
|
|
35
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const o=new this(e);return n.forEach(r=>o.set(r)),o}static accessor(e){const o=(this[bs]=this[bs]={accessors:{}}).accessors,r=this.prototype;function s(a){const c=Mt(a);o[c]||(th(r,a),o[c]=!0)}return C.isArray(e)?e.forEach(s):s(e),this}}me.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),C.reduceDescriptors(me.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(o){this[n]=o}}}),C.freezeMethods(me);function oi(t,e){const n=this||Bt,o=e||n,r=me.from(o.headers);let s=o.data;return C.forEach(t,function(c){s=c.call(n,s,r.normalize(),e?e.status:void 0)}),r.normalize(),s}function Cs(t){return!!(t&&t.__CANCEL__)}function ct(t,e,n){D.call(this,t??"canceled",D.ERR_CANCELED,e,n),this.name="CanceledError"}C.inherits(ct,D,{__CANCEL__:!0});function Ss(t,e,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?t(n):e(new D("Request failed with status code "+n.status,[D.ERR_BAD_REQUEST,D.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function nh(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function ih(t,e){t=t||10;const n=new Array(t),o=new Array(t);let r=0,s=0,a;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),h=o[s];a||(a=u),n[r]=l,o[r]=u;let f=s,m=0;for(;f!==r;)m+=n[f++],f=f%t;if(r=(r+1)%t,r===s&&(s=(s+1)%t),u-a<e)return;const g=h&&u-h;return g?Math.round(m*1e3/g):void 0}}function oh(t,e){let n=0,o=1e3/e,r,s;const a=(u,h=Date.now())=>{n=h,r=null,s&&(clearTimeout(s),s=null),t.apply(null,u)};return[(...u)=>{const h=Date.now(),f=h-n;f>=o?a(u,h):(r=u,s||(s=setTimeout(()=>{s=null,a(r)},o-f)))},()=>r&&a(r)]}const un=(t,e,n=3)=>{let o=0;const r=ih(50,250);return oh(s=>{const a=s.loaded,c=s.lengthComputable?s.total:void 0,l=a-o,u=r(l),h=a<=c;o=a;const f={loaded:a,total:c,progress:c?a/c:void 0,bytes:l,rate:u||void 0,estimated:u&&c&&h?(c-a)/u:void 0,event:s,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(f)},n)},ks=(t,e)=>{const n=t!=null;return[o=>e[0]({lengthComputable:n,total:t,loaded:o}),e[1]]},Es=t=>(...e)=>C.asap(()=>t(...e)),rh=fe.hasStandardBrowserEnv?function(){const e=fe.navigator&&/(msie|trident)/i.test(fe.navigator.userAgent),n=document.createElement("a");let o;function r(s){let a=s;return e&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return o=r(window.location.href),function(a){const c=C.isString(a)?r(a):a;return c.protocol===o.protocol&&c.host===o.host}}():function(){return function(){return!0}}(),sh=fe.hasStandardBrowserEnv?{write(t,e,n,o,r,s){const a=[t+"="+encodeURIComponent(e)];C.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),C.isString(o)&&a.push("path="+o),C.isString(r)&&a.push("domain="+r),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ah(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function lh(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function vs(t,e){return t&&!ah(e)?lh(t,e):e}const xs=t=>t instanceof me?{...t}:t;function Qe(t,e){e=e||{};const n={};function o(u,h,f){return C.isPlainObject(u)&&C.isPlainObject(h)?C.merge.call({caseless:f},u,h):C.isPlainObject(h)?C.merge({},h):C.isArray(h)?h.slice():h}function r(u,h,f){if(C.isUndefined(h)){if(!C.isUndefined(u))return o(void 0,u,f)}else return o(u,h,f)}function s(u,h){if(!C.isUndefined(h))return o(void 0,h)}function a(u,h){if(C.isUndefined(h)){if(!C.isUndefined(u))return o(void 0,u)}else return o(void 0,h)}function c(u,h,f){if(f in e)return o(u,h);if(f in t)return o(void 0,u)}const l={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(u,h)=>r(xs(u),xs(h),!0)};return C.forEach(Object.keys(Object.assign({},t,e)),function(h){const f=l[h]||r,m=f(t[h],e[h],h);C.isUndefined(m)&&f!==c||(n[h]=m)}),n}const Bs=t=>{const e=Qe({},t);let{data:n,withXSRFToken:o,xsrfHeaderName:r,xsrfCookieName:s,headers:a,auth:c}=e;e.headers=a=me.from(a),e.url=ps(vs(e.baseURL,e.url),t.params,t.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let l;if(C.isFormData(n)){if(fe.hasStandardBrowserEnv||fe.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[u,...h]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([u||"multipart/form-data",...h].join("; "))}}if(fe.hasStandardBrowserEnv&&(o&&C.isFunction(o)&&(o=o(e)),o||o!==!1&&rh(e.url))){const u=r&&s&&sh.read(s);u&&a.set(r,u)}return e},ch=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,o){const r=Bs(t);let s=r.data;const a=me.from(r.headers).normalize();let{responseType:c,onUploadProgress:l,onDownloadProgress:u}=r,h,f,m,g,p;function E(){g&&g(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(h),r.signal&&r.signal.removeEventListener("abort",h)}let w=new XMLHttpRequest;w.open(r.method.toUpperCase(),r.url,!0),w.timeout=r.timeout;function M(){if(!w)return;const L=me.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),T={data:!c||c==="text"||c==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:L,config:t,request:w};Ss(function(ke){n(ke),E()},function(ke){o(ke),E()},T),w=null}"onloadend"in w?w.onloadend=M:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(M)},w.onabort=function(){w&&(o(new D("Request aborted",D.ECONNABORTED,t,w)),w=null)},w.onerror=function(){o(new D("Network Error",D.ERR_NETWORK,t,w)),w=null},w.ontimeout=function(){let F=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const T=r.transitional||ys;r.timeoutErrorMessage&&(F=r.timeoutErrorMessage),o(new D(F,T.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,t,w)),w=null},s===void 0&&a.setContentType(null),"setRequestHeader"in w&&C.forEach(a.toJSON(),function(F,T){w.setRequestHeader(T,F)}),C.isUndefined(r.withCredentials)||(w.withCredentials=!!r.withCredentials),c&&c!=="json"&&(w.responseType=r.responseType),u&&([m,p]=un(u,!0),w.addEventListener("progress",m)),l&&w.upload&&([f,g]=un(l),w.upload.addEventListener("progress",f),w.upload.addEventListener("loadend",g)),(r.cancelToken||r.signal)&&(h=L=>{w&&(o(!L||L.type?new ct(null,t,w):L),w.abort(),w=null)},r.cancelToken&&r.cancelToken.subscribe(h),r.signal&&(r.signal.aborted?h():r.signal.addEventListener("abort",h)));const O=nh(r.url);if(O&&fe.protocols.indexOf(O)===-1){o(new D("Unsupported protocol "+O+":",D.ERR_BAD_REQUEST,t));return}w.send(s||null)})},dh=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let o=new AbortController,r;const s=function(u){if(!r){r=!0,c();const h=u instanceof Error?u:this.reason;o.abort(h instanceof D?h:new ct(h instanceof Error?h.message:h))}};let a=e&&setTimeout(()=>{a=null,s(new D(`timeout ${e} of ms exceeded`,D.ETIMEDOUT))},e);const c=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),t=null)};t.forEach(u=>u.addEventListener("abort",s));const{signal:l}=o;return l.unsubscribe=()=>C.asap(c),l}},uh=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let o=0,r;for(;o<n;)r=o+e,yield t.slice(o,r),o=r},hh=async function*(t,e){for await(const n of fh(t))yield*uh(n,e)},fh=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:o}=await e.read();if(n)break;yield o}}finally{await e.cancel()}},Ms=(t,e,n,o)=>{const r=hh(t,e);let s=0,a,c=l=>{a||(a=!0,o&&o(l))};return new ReadableStream({async pull(l){try{const{done:u,value:h}=await r.next();if(u){c(),l.close();return}let f=h.byteLength;if(n){let m=s+=f;n(m)}l.enqueue(new Uint8Array(h))}catch(u){throw c(u),u}},cancel(l){return c(l),r.return()}},{highWaterMark:2})},hn=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Is=hn&&typeof ReadableStream=="function",mh=hn&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Rs=(t,...e)=>{try{return!!t(...e)}catch{return!1}},ph=Is&&Rs(()=>{let t=!1;const e=new Request(fe.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),$s=64*1024,ri=Is&&Rs(()=>C.isReadableStream(new Response("").body)),fn={stream:ri&&(t=>t.body)};hn&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!fn[e]&&(fn[e]=C.isFunction(t[e])?n=>n[e]():(n,o)=>{throw new D(`Response type '${e}' is not supported`,D.ERR_NOT_SUPPORT,o)})})})(new Response);const gh=async t=>{if(t==null)return 0;if(C.isBlob(t))return t.size;if(C.isSpecCompliantForm(t))return(await new Request(fe.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(C.isArrayBufferView(t)||C.isArrayBuffer(t))return t.byteLength;if(C.isURLSearchParams(t)&&(t=t+""),C.isString(t))return(await mh(t)).byteLength},yh=async(t,e)=>{const n=C.toFiniteNumber(t.getContentLength());return n??gh(e)},si={http:Du,xhr:ch,fetch:hn&&(async t=>{let{url:e,method:n,data:o,signal:r,cancelToken:s,timeout:a,onDownloadProgress:c,onUploadProgress:l,responseType:u,headers:h,withCredentials:f="same-origin",fetchOptions:m}=Bs(t);u=u?(u+"").toLowerCase():"text";let g=dh([r,s&&s.toAbortSignal()],a),p;const E=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let w;try{if(l&&ph&&n!=="get"&&n!=="head"&&(w=await yh(h,o))!==0){let T=new Request(e,{method:"POST",body:o,duplex:"half"}),we;if(C.isFormData(o)&&(we=T.headers.get("content-type"))&&h.setContentType(we),T.body){const[ke,je]=ks(w,un(Es(l)));o=Ms(T.body,$s,ke,je)}}C.isString(f)||(f=f?"include":"omit");const M="credentials"in Request.prototype;p=new Request(e,{...m,signal:g,method:n.toUpperCase(),headers:h.normalize().toJSON(),body:o,duplex:"half",credentials:M?f:void 0});let O=await fetch(p);const L=ri&&(u==="stream"||u==="response");if(ri&&(c||L&&E)){const T={};["status","statusText","headers"].forEach(pt=>{T[pt]=O[pt]});const we=C.toFiniteNumber(O.headers.get("content-length")),[ke,je]=c&&ks(we,un(Es(c),!0))||[];O=new Response(Ms(O.body,$s,ke,()=>{je&&je(),E&&E()}),T)}u=u||"text";let F=await fn[C.findKey(fn,u)||"text"](O,t);return!L&&E&&E(),await new Promise((T,we)=>{Ss(T,we,{data:F,headers:me.from(O.headers),status:O.status,statusText:O.statusText,config:t,request:p})})}catch(M){throw E&&E(),M&&M.name==="TypeError"&&/fetch/i.test(M.message)?Object.assign(new D("Network Error",D.ERR_NETWORK,t,p),{cause:M.cause||M}):D.from(M,M&&M.code,t,p)}})};C.forEach(si,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const As=t=>`- ${t}`,wh=t=>C.isFunction(t)||t===null||t===!1,Ns={getAdapter:t=>{t=C.isArray(t)?t:[t];const{length:e}=t;let n,o;const r={};for(let s=0;s<e;s++){n=t[s];let a;if(o=n,!wh(n)&&(o=si[(a=String(n)).toLowerCase()],o===void 0))throw new D(`Unknown adapter '${a}'`);if(o)break;r[a||"#"+s]=o}if(!o){const s=Object.entries(r).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=e?s.length>1?`since :
|
|
35
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const o=new this(e);return n.forEach(r=>o.set(r)),o}static accessor(e){const o=(this[bs]=this[bs]={accessors:{}}).accessors,r=this.prototype;function s(a){const c=Mt(a);o[c]||(th(r,a),o[c]=!0)}return C.isArray(e)?e.forEach(s):s(e),this}}me.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),C.reduceDescriptors(me.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(o){this[n]=o}}}),C.freezeMethods(me);function oi(t,e){const n=this||Bt,o=e||n,r=me.from(o.headers);let s=o.data;return C.forEach(t,function(c){s=c.call(n,s,r.normalize(),e?e.status:void 0)}),r.normalize(),s}function Cs(t){return!!(t&&t.__CANCEL__)}function ct(t,e,n){D.call(this,t??"canceled",D.ERR_CANCELED,e,n),this.name="CanceledError"}C.inherits(ct,D,{__CANCEL__:!0});function Ss(t,e,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?t(n):e(new D("Request failed with status code "+n.status,[D.ERR_BAD_REQUEST,D.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function nh(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function ih(t,e){t=t||10;const n=new Array(t),o=new Array(t);let r=0,s=0,a;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),h=o[s];a||(a=u),n[r]=l,o[r]=u;let f=s,m=0;for(;f!==r;)m+=n[f++],f=f%t;if(r=(r+1)%t,r===s&&(s=(s+1)%t),u-a<e)return;const g=h&&u-h;return g?Math.round(m*1e3/g):void 0}}function oh(t,e){let n=0,o=1e3/e,r,s;const a=(u,h=Date.now())=>{n=h,r=null,s&&(clearTimeout(s),s=null),t.apply(null,u)};return[(...u)=>{const h=Date.now(),f=h-n;f>=o?a(u,h):(r=u,s||(s=setTimeout(()=>{s=null,a(r)},o-f)))},()=>r&&a(r)]}const un=(t,e,n=3)=>{let o=0;const r=ih(50,250);return oh(s=>{const a=s.loaded,c=s.lengthComputable?s.total:void 0,l=a-o,u=r(l),h=a<=c;o=a;const f={loaded:a,total:c,progress:c?a/c:void 0,bytes:l,rate:u||void 0,estimated:u&&c&&h?(c-a)/u:void 0,event:s,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(f)},n)},ks=(t,e)=>{const n=t!=null;return[o=>e[0]({lengthComputable:n,total:t,loaded:o}),e[1]]},Es=t=>(...e)=>C.asap(()=>t(...e)),rh=fe.hasStandardBrowserEnv?function(){const e=fe.navigator&&/(msie|trident)/i.test(fe.navigator.userAgent),n=document.createElement("a");let o;function r(s){let a=s;return e&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return o=r(window.location.href),function(a){const c=C.isString(a)?r(a):a;return c.protocol===o.protocol&&c.host===o.host}}():function(){return function(){return!0}}(),sh=fe.hasStandardBrowserEnv?{write(t,e,n,o,r,s){const a=[t+"="+encodeURIComponent(e)];C.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),C.isString(o)&&a.push("path="+o),C.isString(r)&&a.push("domain="+r),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ah(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function lh(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function vs(t,e){return t&&!ah(e)?lh(t,e):e}const xs=t=>t instanceof me?{...t}:t;function Ye(t,e){e=e||{};const n={};function o(u,h,f){return C.isPlainObject(u)&&C.isPlainObject(h)?C.merge.call({caseless:f},u,h):C.isPlainObject(h)?C.merge({},h):C.isArray(h)?h.slice():h}function r(u,h,f){if(C.isUndefined(h)){if(!C.isUndefined(u))return o(void 0,u,f)}else return o(u,h,f)}function s(u,h){if(!C.isUndefined(h))return o(void 0,h)}function a(u,h){if(C.isUndefined(h)){if(!C.isUndefined(u))return o(void 0,u)}else return o(void 0,h)}function c(u,h,f){if(f in e)return o(u,h);if(f in t)return o(void 0,u)}const l={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(u,h)=>r(xs(u),xs(h),!0)};return C.forEach(Object.keys(Object.assign({},t,e)),function(h){const f=l[h]||r,m=f(t[h],e[h],h);C.isUndefined(m)&&f!==c||(n[h]=m)}),n}const Bs=t=>{const e=Ye({},t);let{data:n,withXSRFToken:o,xsrfHeaderName:r,xsrfCookieName:s,headers:a,auth:c}=e;e.headers=a=me.from(a),e.url=ps(vs(e.baseURL,e.url),t.params,t.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let l;if(C.isFormData(n)){if(fe.hasStandardBrowserEnv||fe.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[u,...h]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([u||"multipart/form-data",...h].join("; "))}}if(fe.hasStandardBrowserEnv&&(o&&C.isFunction(o)&&(o=o(e)),o||o!==!1&&rh(e.url))){const u=r&&s&&sh.read(s);u&&a.set(r,u)}return e},ch=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,o){const r=Bs(t);let s=r.data;const a=me.from(r.headers).normalize();let{responseType:c,onUploadProgress:l,onDownloadProgress:u}=r,h,f,m,g,p;function E(){g&&g(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(h),r.signal&&r.signal.removeEventListener("abort",h)}let w=new XMLHttpRequest;w.open(r.method.toUpperCase(),r.url,!0),w.timeout=r.timeout;function M(){if(!w)return;const L=me.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),T={data:!c||c==="text"||c==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:L,config:t,request:w};Ss(function(ke){n(ke),E()},function(ke){o(ke),E()},T),w=null}"onloadend"in w?w.onloadend=M:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(M)},w.onabort=function(){w&&(o(new D("Request aborted",D.ECONNABORTED,t,w)),w=null)},w.onerror=function(){o(new D("Network Error",D.ERR_NETWORK,t,w)),w=null},w.ontimeout=function(){let F=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const T=r.transitional||ys;r.timeoutErrorMessage&&(F=r.timeoutErrorMessage),o(new D(F,T.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,t,w)),w=null},s===void 0&&a.setContentType(null),"setRequestHeader"in w&&C.forEach(a.toJSON(),function(F,T){w.setRequestHeader(T,F)}),C.isUndefined(r.withCredentials)||(w.withCredentials=!!r.withCredentials),c&&c!=="json"&&(w.responseType=r.responseType),u&&([m,p]=un(u,!0),w.addEventListener("progress",m)),l&&w.upload&&([f,g]=un(l),w.upload.addEventListener("progress",f),w.upload.addEventListener("loadend",g)),(r.cancelToken||r.signal)&&(h=L=>{w&&(o(!L||L.type?new ct(null,t,w):L),w.abort(),w=null)},r.cancelToken&&r.cancelToken.subscribe(h),r.signal&&(r.signal.aborted?h():r.signal.addEventListener("abort",h)));const O=nh(r.url);if(O&&fe.protocols.indexOf(O)===-1){o(new D("Unsupported protocol "+O+":",D.ERR_BAD_REQUEST,t));return}w.send(s||null)})},dh=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let o=new AbortController,r;const s=function(u){if(!r){r=!0,c();const h=u instanceof Error?u:this.reason;o.abort(h instanceof D?h:new ct(h instanceof Error?h.message:h))}};let a=e&&setTimeout(()=>{a=null,s(new D(`timeout ${e} of ms exceeded`,D.ETIMEDOUT))},e);const c=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),t=null)};t.forEach(u=>u.addEventListener("abort",s));const{signal:l}=o;return l.unsubscribe=()=>C.asap(c),l}},uh=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let o=0,r;for(;o<n;)r=o+e,yield t.slice(o,r),o=r},hh=async function*(t,e){for await(const n of fh(t))yield*uh(n,e)},fh=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:o}=await e.read();if(n)break;yield o}}finally{await e.cancel()}},Ms=(t,e,n,o)=>{const r=hh(t,e);let s=0,a,c=l=>{a||(a=!0,o&&o(l))};return new ReadableStream({async pull(l){try{const{done:u,value:h}=await r.next();if(u){c(),l.close();return}let f=h.byteLength;if(n){let m=s+=f;n(m)}l.enqueue(new Uint8Array(h))}catch(u){throw c(u),u}},cancel(l){return c(l),r.return()}},{highWaterMark:2})},hn=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Is=hn&&typeof ReadableStream=="function",mh=hn&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Rs=(t,...e)=>{try{return!!t(...e)}catch{return!1}},ph=Is&&Rs(()=>{let t=!1;const e=new Request(fe.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),$s=64*1024,ri=Is&&Rs(()=>C.isReadableStream(new Response("").body)),fn={stream:ri&&(t=>t.body)};hn&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!fn[e]&&(fn[e]=C.isFunction(t[e])?n=>n[e]():(n,o)=>{throw new D(`Response type '${e}' is not supported`,D.ERR_NOT_SUPPORT,o)})})})(new Response);const gh=async t=>{if(t==null)return 0;if(C.isBlob(t))return t.size;if(C.isSpecCompliantForm(t))return(await new Request(fe.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(C.isArrayBufferView(t)||C.isArrayBuffer(t))return t.byteLength;if(C.isURLSearchParams(t)&&(t=t+""),C.isString(t))return(await mh(t)).byteLength},yh=async(t,e)=>{const n=C.toFiniteNumber(t.getContentLength());return n??gh(e)},si={http:Du,xhr:ch,fetch:hn&&(async t=>{let{url:e,method:n,data:o,signal:r,cancelToken:s,timeout:a,onDownloadProgress:c,onUploadProgress:l,responseType:u,headers:h,withCredentials:f="same-origin",fetchOptions:m}=Bs(t);u=u?(u+"").toLowerCase():"text";let g=dh([r,s&&s.toAbortSignal()],a),p;const E=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let w;try{if(l&&ph&&n!=="get"&&n!=="head"&&(w=await yh(h,o))!==0){let T=new Request(e,{method:"POST",body:o,duplex:"half"}),we;if(C.isFormData(o)&&(we=T.headers.get("content-type"))&&h.setContentType(we),T.body){const[ke,We]=ks(w,un(Es(l)));o=Ms(T.body,$s,ke,We)}}C.isString(f)||(f=f?"include":"omit");const M="credentials"in Request.prototype;p=new Request(e,{...m,signal:g,method:n.toUpperCase(),headers:h.normalize().toJSON(),body:o,duplex:"half",credentials:M?f:void 0});let O=await fetch(p);const L=ri&&(u==="stream"||u==="response");if(ri&&(c||L&&E)){const T={};["status","statusText","headers"].forEach(pt=>{T[pt]=O[pt]});const we=C.toFiniteNumber(O.headers.get("content-length")),[ke,We]=c&&ks(we,un(Es(c),!0))||[];O=new Response(Ms(O.body,$s,ke,()=>{We&&We(),E&&E()}),T)}u=u||"text";let F=await fn[C.findKey(fn,u)||"text"](O,t);return!L&&E&&E(),await new Promise((T,we)=>{Ss(T,we,{data:F,headers:me.from(O.headers),status:O.status,statusText:O.statusText,config:t,request:p})})}catch(M){throw E&&E(),M&&M.name==="TypeError"&&/fetch/i.test(M.message)?Object.assign(new D("Network Error",D.ERR_NETWORK,t,p),{cause:M.cause||M}):D.from(M,M&&M.code,t,p)}})};C.forEach(si,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const As=t=>`- ${t}`,wh=t=>C.isFunction(t)||t===null||t===!1,Ns={getAdapter:t=>{t=C.isArray(t)?t:[t];const{length:e}=t;let n,o;const r={};for(let s=0;s<e;s++){n=t[s];let a;if(o=n,!wh(n)&&(o=si[(a=String(n)).toLowerCase()],o===void 0))throw new D(`Unknown adapter '${a}'`);if(o)break;r[a||"#"+s]=o}if(!o){const s=Object.entries(r).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=e?s.length>1?`since :
|
|
36
36
|
`+s.map(As).join(`
|
|
37
|
-
`):" "+As(s[0]):"as no adapter specified";throw new D("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return o},adapters:si};function ai(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ct(null,t)}function Ps(t){return ai(t),t.headers=me.from(t.headers),t.data=oi.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Ns.getAdapter(t.adapter||Bt.adapter)(t).then(function(o){return ai(t),o.data=oi.call(t,t.transformResponse,o),o.headers=me.from(o.headers),o},function(o){return Cs(o)||(ai(t),o&&o.response&&(o.response.data=oi.call(t,t.transformResponse,o.response),o.response.headers=me.from(o.response.headers))),Promise.reject(o)})}const Ts="1.7.7",li={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{li[t]=function(o){return typeof o===t||"a"+(e<1?"n ":" ")+t}});const zs={};li.transitional=function(e,n,o){function r(s,a){return"[Axios v"+Ts+"] Transitional option '"+s+"'"+a+(o?". "+o:"")}return(s,a,c)=>{if(e===!1)throw new D(r(a," has been removed"+(n?" in "+n:"")),D.ERR_DEPRECATED);return n&&!zs[a]&&(zs[a]=!0,console.warn(r(a," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,a,c):!0}};function bh(t,e,n){if(typeof t!="object")throw new D("options must be an object",D.ERR_BAD_OPTION_VALUE);const o=Object.keys(t);let r=o.length;for(;r-- >0;){const s=o[r],a=e[s];if(a){const c=t[s],l=c===void 0||a(c,s,t);if(l!==!0)throw new D("option "+s+" must be "+l,D.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new D("Unknown option "+s,D.ERR_BAD_OPTION)}}const ci={assertOptions:bh,validators:li},Ue=ci.validators;class
|
|
38
|
-
`+s):o.stack=s}catch{}}throw o}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Qe(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:s}=n;o!==void 0&&ci.assertOptions(o,{silentJSONParsing:Ue.transitional(Ue.boolean),forcedJSONParsing:Ue.transitional(Ue.boolean),clarifyTimeoutError:Ue.transitional(Ue.boolean)},!1),r!=null&&(C.isFunction(r)?n.paramsSerializer={serialize:r}:ci.assertOptions(r,{encode:Ue.function,serialize:Ue.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&C.merge(s.common,s[n.method]);s&&C.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),n.headers=me.concat(a,s);const c=[];let l=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(n)===!1||(l=l&&E.synchronous,c.unshift(E.fulfilled,E.rejected))});const u=[];this.interceptors.response.forEach(function(E){u.push(E.fulfilled,E.rejected)});let h,f=0,m;if(!l){const p=[Ps.bind(this),void 0];for(p.unshift.apply(p,c),p.push.apply(p,u),m=p.length,h=Promise.resolve(n);f<m;)h=h.then(p[f++],p[f++]);return h}m=c.length;let g=n;for(f=0;f<m;){const p=c[f++],E=c[f++];try{g=p(g)}catch(w){E.call(this,w);break}}try{h=Ps.call(this,g)}catch(p){return Promise.reject(p)}for(f=0,m=u.length;f<m;)h=h.then(u[f++],u[f++]);return h}getUri(e){e=Qe(this.defaults,e);const n=vs(e.baseURL,e.url);return ps(n,e.params,e.paramsSerializer)}}C.forEach(["delete","get","head","options"],function(e){Ke.prototype[e]=function(n,o){return this.request(Qe(o||{},{method:e,url:n,data:(o||{}).data}))}}),C.forEach(["post","put","patch"],function(e){function n(o){return function(s,a,c){return this.request(Qe(c||{},{method:e,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}Ke.prototype[e]=n(),Ke.prototype[e+"Form"]=n(!0)});class di{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const a=new Promise(c=>{o.subscribe(c),s=c}).then(r);return a.cancel=function(){o.unsubscribe(s)},a},e(function(s,a,c){o.reason||(o.reason=new ct(s,a,c),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=o=>{e.abort(o)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new di(function(r){e=r}),cancel:e}}}function Ch(t){return function(n){return t.apply(null,n)}}function Sh(t){return C.isObject(t)&&t.isAxiosError===!0}const ui={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ui).forEach(([t,e])=>{ui[e]=t});function Vs(t){const e=new Ke(t),n=Kr(Ke.prototype.request,e);return C.extend(n,Ke.prototype,e,{allOwnKeys:!0}),C.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return Vs(Qe(t,r))},n}const Q=Vs(Bt);Q.Axios=Ke,Q.CanceledError=ct,Q.CancelToken=di,Q.isCancel=Cs,Q.VERSION=Ts,Q.toFormData=cn,Q.AxiosError=D,Q.Cancel=Q.CanceledError,Q.all=function(e){return Promise.all(e)},Q.spread=Ch,Q.isAxiosError=Sh,Q.mergeConfig=Qe,Q.AxiosHeaders=me,Q.formToJSON=t=>ws(C.isHTMLForm(t)?new FormData(t):t),Q.getAdapter=Ns.getAdapter,Q.HttpStatusCode=ui,Q.default=Q;var It=(t=>(t.GET="get",t.POST="post",t.PUT="put",t.DELETE="delete",t))(It||{});const Rt=(()=>{function t(){const l=r();return!(!l||l==="undefined")}function e(l){l.accessToken&&localStorage.setItem("access_token",l.accessToken),l.refreshToken&&localStorage.setItem("refresh_token",l.refreshToken)}function n(){const l=localStorage.getItem("user");return l?JSON.parse(l).id:""}function o(){const l=localStorage.getItem("user");if(l)return JSON.parse(l)}function r(){return localStorage.getItem("access_token")}function s(){return localStorage.getItem("refresh_token")}function a(){localStorage.removeItem("access_token"),localStorage.removeItem("refresh_token")}function c(l){if(!t())return;const u=Rt.getUser();u&&(u.human=l,localStorage.setItem("user",JSON.stringify(u)))}return{isAuth:t,setTokens:e,getAccessToken:r,getRefreshToken:s,getUserId:n,clearTokens:a,getUser:o,updateHuman:c}})();class hi{constructor(e){d(this,"code",400);d(this,"err","");V.BuildClass(this,e)}getErr(){return this.capitalizedErr()}capitalizedErr(){return this.err.charAt(0).toUpperCase()+this.err.slice(1)}static async Handle(e,n){const o=e.config;if(e.response){if(e.response.status===401&&!o._retry)return o._retry=!0,n.defaults.headers.common.token=Rt.getAccessToken(),e.config.headers.token=Rt.getAccessToken(),e.config.baseURL=void 0,n.request(o);if(e.response.status>=500){if(e.response.data==="неверный логин или пароль"){kt.Error("Неверный логин или пароль");return}kt.Error("Ошибка на сервере, попробуйте позже")}if(e.response.status>=400&&e.response.status<500){const r=new hi(e.response.data).getErr();r&&kt.Error(r)}return Promise.reject(e)}}}const dt=Q.create();dt.interceptors.response.use(t=>t,async t=>await hi.Handle(t,dt));class $t{static async Get(e,n,o){return await dt({method:It.GET,url:e,headers:n,responseType:o})}static async Post(e,n,o,r){return n["Content-Type"]="multipart/form-data",await dt({method:It.POST,url:e,headers:n,responseType:o,data:r})}static async Put(e,n,o){return n["Content-Type"]="multipart/form-data",await dt({method:It.PUT,url:e,headers:n,data:o})}static async Delete(e,n){return await dt({method:It.DELETE,url:e,headers:n})}}class mn{constructor(e){d(this,"name","");V.BuildClass(this,e)}static Set(){}static Get(e,n){const o=sessionStorage.getItem(e);if(o){const r=JSON.parse(o),s=new Date,a=new Date(r.time),c=s.getTime()-a.getTime();return Math.round(c/6e4)>(n||10)?null:r.data}else return null}static async TryGet(e,n,o){let r;return r=mn.Get(e,o),r||(r=await n()),r}}var fi=(t=>(t.ContentType="Content-Type",t.Token="token",t))(fi||{}),Fs=(t=>(t.ApplicationJson="application/json",t.MultipartFormData="multipart/form-data",t))(Fs||{});const G=class G{static Setup(e,n,o){this.baseUrl=e,this.apiVersion=n,this.apiHost=o}static newWebSocket(e){const n=this.apiHost.replace("http","ws")+"/ws/"+e;return new WebSocket(n)}static download(e,n){const o=G.getDownloadFileName(e,n.headers),r=URL.createObjectURL(n.data),s=document.createElement("a");s.href=r,s.setAttribute("download",o),s.setAttribute("target","_blank"),document.body.appendChild(s),s.click()}static getDownloadFileName(e,n){if(e)return e;const o=n["content-disposition"],r=o.indexOf('"')+1,s=o.lastIndexOf('"'),a=o.substring(r,s);return a||"file"}static getHeaders(e){const n=Ie.Get(Se.AccessToken);return e||(e=G.headers),n&&(e[fi.Token]=n),e??G.headers}static returnResponse(e,n){if(n)return e!=null&&e.isBlob?G.download(e.downloadFileName,n):n.data}static async Get(e){return G.returnResponse(e,await $t.Get(G.buildUrl((e==null?void 0:e.query)??""),G.getHeaders(e==null?void 0:e.headers),G.getResponseType(e==null?void 0:e.isBlob)))}static async Post(e){return G.returnResponse(e,await $t.Post(G.buildUrl(e==null?void 0:e.query),G.getHeaders(e==null?void 0:e.headers),G.getResponseType(e.isBlob),G.createFormDataPayload(e==null?void 0:e.payload,e==null?void 0:e.fileInfos)))}static async Put(e){return G.returnResponse(e,await $t.Put(G.buildUrl(e==null?void 0:e.query),G.getHeaders(e==null?void 0:e.headers),G.createFormDataPayload(e==null?void 0:e.payload,e==null?void 0:e.fileInfos)))}static async Delete(e){return G.returnResponse(e,await $t.Delete(G.buildUrl(e==null?void 0:e.query),G.getHeaders(e==null?void 0:e.headers)))}static async Subscribe(e){const{query:n}=e;return new EventSource(G.buildUrl(n))}static buildUrl(e){const n=e??"";return this.baseUrl+this.apiVersion+n}static getResponseType(e){return e?"blob":"json"}static createFormDataPayload(e,n){const o=new FormData;if(o.append("form",JSON.stringify(e)),n)for(const r of n)r.file&&o.append(r.id??"files",r.file,r.originalName);return o}};d(G,"baseUrl",""),d(G,"apiVersion",""),d(G,"apiHost",""),d(G,"headers",{[fi.ContentType]:Fs.ApplicationJson});let le=G;const kh=[{path:"/",redirect:"/login"},{path:"/login",component:Un,meta:{layout:"LoginLayout"}},{path:"/:pathMatch(.*)*",name:"NotFound",component:Wn}],_e=class _e{static SetRouter(e){this.router=e,this.AddRoutes(kh)}static GetRouter(){return this.router}static AddRoutes(e){e.forEach(n=>{this.GetRouter().addRoute(n)})}static async To(e){await this.GetRouter().push(e)}static async ToHome(){}static async Replace(e){await this.GetRouter().replace(e)}static Id(){return _e.GetStringParam("id")}static Slug(){return _e.GetStringParam("slug")}static async Back(){this.GetRouter().go(-1)}static GetQid(){return _e.GetStringQueryParam("qid")}static Route(){return this.GetRouter().currentRoute.value}static RouterPushBlank(e){const n=this.GetRouter().resolve({path:e});window.open(n==null?void 0:n.href,"_blank")}static GetPath(){var n;const e=(n=_e.Route())==null?void 0:n.path.split("/");return!e||e.length<=0?"":e[e.length-1]}static async ToAdmin(e){if(!e){await this.GetRouter().push("/admin");return}let n=e;n[0]==="/"&&(n=e.substring(1)),await _e.To(`/admin/${n}`)}static GetStringQueryParam(e){return String(this.Route().query[e])}static GetNumberQueryParam(e){return Number(this.Route().query[e]??0)}static GetStringParam(e){return this.Route().params[e]}static SetQueryParam(e,n){return this.GetRouter().replace({path:_e.Route().path,query:{[e]:n}})}static Resolve(e){return this.GetRouter().resolve(e)}};d(_e,"router");let We=_e;class X{constructor(e,n){d(this,"items",i.reactive([]));d(this,"item");d(this,"count",i.ref(0));d(this,"classConstructor");d(this,"url","");this.classConstructor=e,this.item=i.reactive(new this.classConstructor),this.url=n}Set(e){Object.assign(this.item,new this.classConstructor(e))}Item(){return this.item}getUrl(e){return e?`${this.url}/${e}`:this.url}async GetAll(e){let n;const o=le.Get;e&&e.withCache?n=await mn.TryGet(this.getUrl(),o):n=await o({query:this.getUrl()}),Array.isArray(n)?this.SetAll(n):this.SetAllWithCount(n)}async Get(e){e||(e=We.Id()),this.Set(await le.Get({query:this.getUrl(e)}))}async FTSP(e){var a;const o=((e==null?void 0:e.ftsp)??Qr.Get()).clearForHTTP(),r={payload:{ftsp:o},query:this.getUrl("ftsp")},s=await le.Post(r);if(!(!s||!s.ftsp))if(Array.isArray(s.data))this.SetAll(s.data);else{if(o.p.append){this.AppendToAll((a=s.data)==null?void 0:a.items);return}this.SetAllWithCount(s.data)}}async Create(e){const n=e??this.item,o={payload:n,query:this.getUrl()};return n.getFileInfos&&(o.fileInfos=n.getFileInfos(),o.fileInfos.forEach(r=>r.url="")),await le.Post(o)}async CreateAndSet(e){const n=await this.Create(e);this.Set(n)}async CreateMany(e){if(!e)return;const n=[];e.forEach(o=>{n.push(new Promise(()=>this.Create(o)))}),Promise.all(n)}async Update(e){const n=e??this.item,o={query:this.getUrl(`${n.id}`),payload:n};return n.getFileInfos&&(o.fileInfos=n.getFileInfos(),o.fileInfos.forEach(r=>r.url="")),await le.Put(o)}async UpdateAndSet(e){const n=await this.Update(e);this.Set(n)}async UpdateAndReset(e){await this.Update(e??this.item),this.Set()}async Remove(e){if(!e){console.warn("BaseStore/Remove. id is undefined");return}await le.Delete({query:this.getUrl(`${e}`)}),this.RemoveItem(e)}async UpdateMany(e){if(e||(e=this.items),!e)return;const n=[];e.forEach(o=>{n.push(new Promise(()=>this.Update(o)))}),Promise.all(n)}SetAll(e){e&&(this.items.splice(0,this.items.length),this.items.push(...e.map(n=>new this.classConstructor(n))))}SetAllWithCount(e){e&&(this.SetAll(e.items),this.count.value=e.count)}RemoveItem(e){const n=this.items.findIndex(o=>o.id===e);this.items.splice(n,1)}AppendToAll(e){if(e){if(Array.isArray(e)){const n=e.map(o=>new this.classConstructor(o));this.items.push(...n);return}this.items.push(new this.classConstructor(e))}}ResetState(){this.ResetItem(),this.ClearItems(),this.count.value=0}ResetItem(){V.BuildClass(this.item,new this.classConstructor)}ClearItems(){this.items.splice(0,this.items.length)}UnshiftToAll(e){if(e){if(Array.isArray(e)){const n=e.map(o=>new this.classConstructor(o));this.items.unshift(...n);return}this.items.unshift(new this.classConstructor(e))}}Items(){return this.items}Count(){return this.count}}function Eh(t,e){t=="left"&&e.next(),t=="right"&&e.prev()}const vh=["#31af5e","#ff4d3b","#006BB5","#f3911c"];class xh{static GetRandColor(e){return He.GetRandEL(e??vh)}}let Bh=class{constructor(){d(this,"startHour",9);d(this,"endHour",19);d(this,"timelinePxHeight",50);d(this,"timelineStep",Ct.FiveMinutes);d(this,"activeTime","");d(this,"activeObjectId","");d(this,"dragged",!1);d(this,"draggedStartTime","");d(this,"draggedEndTime","");d(this,"timelines",Kt[Ct.FiveMinutes])}startDrag(e,n){this.draggedStartTime=e,this.draggedEndTime=n,this.dragged=!0}endDrag(){this.activeTime="",this.dragged=!1}setTimelineStep(e){this.timelineStep=e,this.setTimelines()}setTimelines(){this.timelines=Kt[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return He.GenerateNumsRange(this.startHour,this.endHour)}};const mi=t=>t===8||t===46,Mh=t=>t>46&&t<58,Ih=t=>t>34&&t<41,Rh=t=>t+".",$h=(t,e,n)=>{mi(e)||Ih(e)||(!Mh(e)||n>9)&&t.preventDefault()};function Ah(t,e){if(e>8){let n=t.substring(0,2).replace(".","1");Number(n)>31&&(n="31");let o=t.substring(3,5).replace(".","1");Number(o)>12&&(o="12");let r=t.substring(6,10).replace(".","1");Number(r)>2100&&(r="2100"),t=n+"."+o+"."+r}return t}function Nh(t){const e=t.keyCode;let n=t.srcElement.value;const o=n.length;$h(t,e,o),!mi(e)&&(o===2||o===5)&&(n=Rh(n));const r=t.srcElement.value+String.fromCharCode(t.which);if(mi(e)){t.srcElement.value=n;return}n.length===0&&Number(r)>3&&(n="3",t.preventDefault()),n.length===1&&Number(r)>31&&(n="31",t.preventDefault()),r.length===5&&Number(r.substring(3,5))>12&&(n=n.substring(0,3)+"12",t.preventDefault()),n=Ah(n,o),t.srcElement.value=n}class Ph{constructor(){d(this,"dragged",!1);d(this,"dragImg",new Image);this.dragImg.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="}start(e){this.dragged=!0,e&&e.dataTransfer&&e.dataTransfer.setDragImage(this.dragImg,0,0)}end(){this.dragged=!1}isDragged(){return this.dragged}}class Th{static Get(e){const n=e.split(".");return n[n.length-1]}}const zh=(()=>{function t(s,a){localStorage.setItem(`${s}_favourite`,a.toString())}function e(s,a){const c=localStorage.getItem(`${s}_favourite`);return c?c.split(",").includes(a):!1}function n(s,a){const c=localStorage.getItem(`${s}_favourite`);if(!c){t(s,[a]);return}const l=c.split(",");l.push(a),t(s,l)}function o(s,a){const c=localStorage.getItem(`${s}_favourite`);if(!c)return;const l=c.split(",").filter(u=>u!==a);t(s,l)}function r(){for(const s in localStorage)s.includes("_favourite")&&localStorage.removeItem(s)}return{addToFavourite:n,removeFromFavourite:o,setFavourite:t,isFavourite:e,clearFavourite:r}})();/*!
|
|
37
|
+
`):" "+As(s[0]):"as no adapter specified";throw new D("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return o},adapters:si};function ai(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ct(null,t)}function Ps(t){return ai(t),t.headers=me.from(t.headers),t.data=oi.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Ns.getAdapter(t.adapter||Bt.adapter)(t).then(function(o){return ai(t),o.data=oi.call(t,t.transformResponse,o),o.headers=me.from(o.headers),o},function(o){return Cs(o)||(ai(t),o&&o.response&&(o.response.data=oi.call(t,t.transformResponse,o.response),o.response.headers=me.from(o.response.headers))),Promise.reject(o)})}const Ts="1.7.7",li={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{li[t]=function(o){return typeof o===t||"a"+(e<1?"n ":" ")+t}});const zs={};li.transitional=function(e,n,o){function r(s,a){return"[Axios v"+Ts+"] Transitional option '"+s+"'"+a+(o?". "+o:"")}return(s,a,c)=>{if(e===!1)throw new D(r(a," has been removed"+(n?" in "+n:"")),D.ERR_DEPRECATED);return n&&!zs[a]&&(zs[a]=!0,console.warn(r(a," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,a,c):!0}};function bh(t,e,n){if(typeof t!="object")throw new D("options must be an object",D.ERR_BAD_OPTION_VALUE);const o=Object.keys(t);let r=o.length;for(;r-- >0;){const s=o[r],a=e[s];if(a){const c=t[s],l=c===void 0||a(c,s,t);if(l!==!0)throw new D("option "+s+" must be "+l,D.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new D("Unknown option "+s,D.ERR_BAD_OPTION)}}const ci={assertOptions:bh,validators:li},Ue=ci.validators;class Qe{constructor(e){this.defaults=e,this.interceptors={request:new gs,response:new gs}}async request(e,n){try{return await this._request(e,n)}catch(o){if(o instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;const s=r.stack?r.stack.replace(/^.+\n/,""):"";try{o.stack?s&&!String(o.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(o.stack+=`
|
|
38
|
+
`+s):o.stack=s}catch{}}throw o}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Ye(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:s}=n;o!==void 0&&ci.assertOptions(o,{silentJSONParsing:Ue.transitional(Ue.boolean),forcedJSONParsing:Ue.transitional(Ue.boolean),clarifyTimeoutError:Ue.transitional(Ue.boolean)},!1),r!=null&&(C.isFunction(r)?n.paramsSerializer={serialize:r}:ci.assertOptions(r,{encode:Ue.function,serialize:Ue.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&C.merge(s.common,s[n.method]);s&&C.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),n.headers=me.concat(a,s);const c=[];let l=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(n)===!1||(l=l&&E.synchronous,c.unshift(E.fulfilled,E.rejected))});const u=[];this.interceptors.response.forEach(function(E){u.push(E.fulfilled,E.rejected)});let h,f=0,m;if(!l){const p=[Ps.bind(this),void 0];for(p.unshift.apply(p,c),p.push.apply(p,u),m=p.length,h=Promise.resolve(n);f<m;)h=h.then(p[f++],p[f++]);return h}m=c.length;let g=n;for(f=0;f<m;){const p=c[f++],E=c[f++];try{g=p(g)}catch(w){E.call(this,w);break}}try{h=Ps.call(this,g)}catch(p){return Promise.reject(p)}for(f=0,m=u.length;f<m;)h=h.then(u[f++],u[f++]);return h}getUri(e){e=Ye(this.defaults,e);const n=vs(e.baseURL,e.url);return ps(n,e.params,e.paramsSerializer)}}C.forEach(["delete","get","head","options"],function(e){Qe.prototype[e]=function(n,o){return this.request(Ye(o||{},{method:e,url:n,data:(o||{}).data}))}}),C.forEach(["post","put","patch"],function(e){function n(o){return function(s,a,c){return this.request(Ye(c||{},{method:e,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}Qe.prototype[e]=n(),Qe.prototype[e+"Form"]=n(!0)});class di{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const a=new Promise(c=>{o.subscribe(c),s=c}).then(r);return a.cancel=function(){o.unsubscribe(s)},a},e(function(s,a,c){o.reason||(o.reason=new ct(s,a,c),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=o=>{e.abort(o)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new di(function(r){e=r}),cancel:e}}}function Ch(t){return function(n){return t.apply(null,n)}}function Sh(t){return C.isObject(t)&&t.isAxiosError===!0}const ui={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ui).forEach(([t,e])=>{ui[e]=t});function Vs(t){const e=new Qe(t),n=Kr(Qe.prototype.request,e);return C.extend(n,Qe.prototype,e,{allOwnKeys:!0}),C.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return Vs(Ye(t,r))},n}const Q=Vs(Bt);Q.Axios=Qe,Q.CanceledError=ct,Q.CancelToken=di,Q.isCancel=Cs,Q.VERSION=Ts,Q.toFormData=cn,Q.AxiosError=D,Q.Cancel=Q.CanceledError,Q.all=function(e){return Promise.all(e)},Q.spread=Ch,Q.isAxiosError=Sh,Q.mergeConfig=Ye,Q.AxiosHeaders=me,Q.formToJSON=t=>ws(C.isHTMLForm(t)?new FormData(t):t),Q.getAdapter=Ns.getAdapter,Q.HttpStatusCode=ui,Q.default=Q;var It=(t=>(t.GET="get",t.POST="post",t.PUT="put",t.DELETE="delete",t))(It||{});const Rt=(()=>{function t(){const l=r();return!(!l||l==="undefined")}function e(l){l.accessToken&&localStorage.setItem("access_token",l.accessToken),l.refreshToken&&localStorage.setItem("refresh_token",l.refreshToken)}function n(){const l=localStorage.getItem("user");return l?JSON.parse(l).id:""}function o(){const l=localStorage.getItem("user");if(l)return JSON.parse(l)}function r(){return localStorage.getItem("access_token")}function s(){return localStorage.getItem("refresh_token")}function a(){localStorage.removeItem("access_token"),localStorage.removeItem("refresh_token")}function c(l){if(!t())return;const u=Rt.getUser();u&&(u.human=l,localStorage.setItem("user",JSON.stringify(u)))}return{isAuth:t,setTokens:e,getAccessToken:r,getRefreshToken:s,getUserId:n,clearTokens:a,getUser:o,updateHuman:c}})();class hi{constructor(e){d(this,"code",400);d(this,"err","");V.BuildClass(this,e)}getErr(){return this.capitalizedErr()}capitalizedErr(){return this.err.charAt(0).toUpperCase()+this.err.slice(1)}static async Handle(e,n){const o=e.config;if(e.response){if(e.response.status===401&&!o._retry)return o._retry=!0,n.defaults.headers.common.token=Rt.getAccessToken(),e.config.headers.token=Rt.getAccessToken(),e.config.baseURL=void 0,n.request(o);if(e.response.status>=500){if(e.response.data==="неверный логин или пароль"){kt.Error("Неверный логин или пароль");return}kt.Error("Ошибка на сервере, попробуйте позже")}if(e.response.status>=400&&e.response.status<500){const r=new hi(e.response.data).getErr();r&&kt.Error(r)}return Promise.reject(e)}}}const dt=Q.create();dt.interceptors.response.use(t=>t,async t=>await hi.Handle(t,dt));class $t{static async Get(e,n,o){return await dt({method:It.GET,url:e,headers:n,responseType:o})}static async Post(e,n,o,r){return n["Content-Type"]="multipart/form-data",await dt({method:It.POST,url:e,headers:n,responseType:o,data:r})}static async Put(e,n,o){return n["Content-Type"]="multipart/form-data",await dt({method:It.PUT,url:e,headers:n,data:o})}static async Delete(e,n){return await dt({method:It.DELETE,url:e,headers:n})}}class mn{constructor(e){d(this,"name","");V.BuildClass(this,e)}static Set(){}static Get(e,n){const o=sessionStorage.getItem(e);if(o){const r=JSON.parse(o),s=new Date,a=new Date(r.time),c=s.getTime()-a.getTime();return Math.round(c/6e4)>(n||10)?null:r.data}else return null}static async TryGet(e,n,o){let r;return r=mn.Get(e,o),r||(r=await n()),r}}var fi=(t=>(t.ContentType="Content-Type",t.Token="token",t))(fi||{}),Fs=(t=>(t.ApplicationJson="application/json",t.MultipartFormData="multipart/form-data",t))(Fs||{});const G=class G{static Setup(e,n,o){this.baseUrl=e,this.apiVersion=n,this.apiHost=o}static newWebSocket(e){const n=this.apiHost.replace("http","ws")+"/ws/"+e;return new WebSocket(n)}static download(e,n){const o=G.getDownloadFileName(e,n.headers),r=URL.createObjectURL(n.data),s=document.createElement("a");s.href=r,s.setAttribute("download",o),s.setAttribute("target","_blank"),document.body.appendChild(s),s.click()}static getDownloadFileName(e,n){if(e)return e;const o=n["content-disposition"],r=o.indexOf('"')+1,s=o.lastIndexOf('"'),a=o.substring(r,s);return a||"file"}static getHeaders(e){const n=Ie.Get(Se.AccessToken);return e||(e=G.headers),n&&(e[fi.Token]=n),e??G.headers}static returnResponse(e,n){if(n)return e!=null&&e.isBlob?G.download(e.downloadFileName,n):n.data}static async Get(e){return G.returnResponse(e,await $t.Get(G.buildUrl((e==null?void 0:e.query)??""),G.getHeaders(e==null?void 0:e.headers),G.getResponseType(e==null?void 0:e.isBlob)))}static async Post(e){return G.returnResponse(e,await $t.Post(G.buildUrl(e==null?void 0:e.query),G.getHeaders(e==null?void 0:e.headers),G.getResponseType(e.isBlob),G.createFormDataPayload(e==null?void 0:e.payload,e==null?void 0:e.fileInfos)))}static async Put(e){return G.returnResponse(e,await $t.Put(G.buildUrl(e==null?void 0:e.query),G.getHeaders(e==null?void 0:e.headers),G.createFormDataPayload(e==null?void 0:e.payload,e==null?void 0:e.fileInfos)))}static async Delete(e){return G.returnResponse(e,await $t.Delete(G.buildUrl(e==null?void 0:e.query),G.getHeaders(e==null?void 0:e.headers)))}static async Subscribe(e){const{query:n}=e;return new EventSource(G.buildUrl(n))}static buildUrl(e){const n=e??"";return this.baseUrl+this.apiVersion+n}static getResponseType(e){return e?"blob":"json"}static createFormDataPayload(e,n){const o=new FormData;if(o.append("form",JSON.stringify(e)),n)for(const r of n)r.file&&o.append(r.id??"files",r.file,r.originalName);return o}};d(G,"baseUrl",""),d(G,"apiVersion",""),d(G,"apiHost",""),d(G,"headers",{[fi.ContentType]:Fs.ApplicationJson});let le=G;const kh=[{path:"/",redirect:"/login"},{path:"/login",component:Un,meta:{layout:"LoginLayout"}},{path:"/:pathMatch(.*)*",name:"NotFound",component:Wn}],_e=class _e{static SetRouter(e){this.router=e,this.AddRoutes(kh)}static GetRouter(){return this.router}static AddRoutes(e){e.forEach(n=>{this.GetRouter().addRoute(n)})}static async To(e){await this.GetRouter().push(e)}static async ToHome(){}static async Replace(e){await this.GetRouter().replace(e)}static Id(){return _e.GetStringParam("id")}static Slug(){return _e.GetStringParam("slug")}static async Back(){this.GetRouter().go(-1)}static GetQid(){return _e.GetStringQueryParam("qid")}static Route(){return this.GetRouter().currentRoute.value}static RouterPushBlank(e){const n=this.GetRouter().resolve({path:e});window.open(n==null?void 0:n.href,"_blank")}static GetPath(){var n;const e=(n=_e.Route())==null?void 0:n.path.split("/");return!e||e.length<=0?"":e[e.length-1]}static async ToAdmin(e){if(!e){await this.GetRouter().push("/admin");return}let n=e;n[0]==="/"&&(n=e.substring(1)),await _e.To(`/admin/${n}`)}static GetStringQueryParam(e){return String(this.Route().query[e])}static GetNumberQueryParam(e){return Number(this.Route().query[e]??0)}static GetStringParam(e){return this.Route().params[e]}static SetQueryParam(e,n){return this.GetRouter().replace({path:_e.Route().path,query:{[e]:n}})}static Resolve(e){return this.GetRouter().resolve(e)}};d(_e,"router");let Ke=_e;class X{constructor(e,n){d(this,"items",i.reactive([]));d(this,"item");d(this,"count",i.ref(0));d(this,"classConstructor");d(this,"url","");this.classConstructor=e,this.item=i.reactive(new this.classConstructor),this.url=n}Set(e){Object.assign(this.item,new this.classConstructor(e))}Item(){return this.item}getUrl(e){return e?`${this.url}/${e}`:this.url}async GetAll(e){let n;const o=le.Get;e&&e.withCache?n=await mn.TryGet(this.getUrl(),o):n=await o({query:this.getUrl()}),Array.isArray(n)?this.SetAll(n):this.SetAllWithCount(n)}async Get(e){e||(e=Ke.Id()),this.Set(await le.Get({query:this.getUrl(e)}))}async FTSP(e){var a;const o=((e==null?void 0:e.ftsp)??Qr.Get()).clearForHTTP(),r={payload:{ftsp:o},query:this.getUrl("ftsp")},s=await le.Post(r);if(!(!s||!s.ftsp))if(Array.isArray(s.data))this.SetAll(s.data);else{if(o.p.append){this.AppendToAll((a=s.data)==null?void 0:a.items);return}this.SetAllWithCount(s.data)}}async Create(e){const n=e??this.item,o={payload:n,query:this.getUrl()};return n.getFileInfos&&(o.fileInfos=n.getFileInfos(),o.fileInfos.forEach(r=>r.url="")),await le.Post(o)}async CreateAndSet(e){const n=await this.Create(e);this.Set(n)}async CreateMany(e){if(!e)return;const n=[];e.forEach(o=>{n.push(new Promise(()=>this.Create(o)))}),Promise.all(n)}async Update(e){const n=e??this.item,o={query:this.getUrl(`${n.id}`),payload:n};return n.getFileInfos&&(o.fileInfos=n.getFileInfos(),o.fileInfos.forEach(r=>r.url="")),await le.Put(o)}async UpdateAndSet(e){const n=await this.Update(e);this.Set(n)}async UpdateAndReset(e){await this.Update(e??this.item),this.Set()}async Remove(e){if(!e){console.warn("BaseStore/Remove. id is undefined");return}await le.Delete({query:this.getUrl(`${e}`)}),this.RemoveItem(e)}async UpdateMany(e){if(e||(e=this.items),!e)return;const n=[];e.forEach(o=>{n.push(new Promise(()=>this.Update(o)))}),Promise.all(n)}SetAll(e){e&&(this.items.splice(0,this.items.length),this.items.push(...e.map(n=>new this.classConstructor(n))))}SetAllWithCount(e){e&&(this.SetAll(e.items),this.count.value=e.count)}RemoveItem(e){const n=this.items.findIndex(o=>o.id===e);this.items.splice(n,1)}AppendToAll(e){if(e){if(Array.isArray(e)){const n=e.map(o=>new this.classConstructor(o));this.items.push(...n);return}this.items.push(new this.classConstructor(e))}}ResetState(){this.ResetItem(),this.ClearItems(),this.count.value=0}ResetItem(){V.BuildClass(this.item,new this.classConstructor)}ClearItems(){this.items.splice(0,this.items.length)}UnshiftToAll(e){if(e){if(Array.isArray(e)){const n=e.map(o=>new this.classConstructor(o));this.items.unshift(...n);return}this.items.unshift(new this.classConstructor(e))}}Items(){return this.items}Count(){return this.count}}function Eh(t,e){t=="left"&&e.next(),t=="right"&&e.prev()}const vh=["#31af5e","#ff4d3b","#006BB5","#f3911c"];class xh{static GetRandColor(e){return He.GetRandEL(e??vh)}}let Bh=class{constructor(){d(this,"startHour",9);d(this,"endHour",19);d(this,"timelinePxHeight",50);d(this,"timelineStep",Ct.FiveMinutes);d(this,"activeTime","");d(this,"activeObjectId","");d(this,"dragged",!1);d(this,"draggedStartTime","");d(this,"draggedEndTime","");d(this,"timelines",Kt[Ct.FiveMinutes])}startDrag(e,n){this.draggedStartTime=e,this.draggedEndTime=n,this.dragged=!0}endDrag(){this.activeTime="",this.dragged=!1}setTimelineStep(e){this.timelineStep=e,this.setTimelines()}setTimelines(){this.timelines=Kt[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return He.GenerateNumsRange(this.startHour,this.endHour)}};const mi=t=>t===8||t===46,Mh=t=>t>46&&t<58,Ih=t=>t>34&&t<41,Rh=t=>t+".",$h=(t,e,n)=>{mi(e)||Ih(e)||(!Mh(e)||n>9)&&t.preventDefault()};function Ah(t,e){if(e>8){let n=t.substring(0,2).replace(".","1");Number(n)>31&&(n="31");let o=t.substring(3,5).replace(".","1");Number(o)>12&&(o="12");let r=t.substring(6,10).replace(".","1");Number(r)>2100&&(r="2100"),t=n+"."+o+"."+r}return t}function Nh(t){const e=t.keyCode;let n=t.srcElement.value;const o=n.length;$h(t,e,o),!mi(e)&&(o===2||o===5)&&(n=Rh(n));const r=t.srcElement.value+String.fromCharCode(t.which);if(mi(e)){t.srcElement.value=n;return}n.length===0&&Number(r)>3&&(n="3",t.preventDefault()),n.length===1&&Number(r)>31&&(n="31",t.preventDefault()),r.length===5&&Number(r.substring(3,5))>12&&(n=n.substring(0,3)+"12",t.preventDefault()),n=Ah(n,o),t.srcElement.value=n}class Ph{constructor(){d(this,"dragged",!1);d(this,"dragImg",new Image);this.dragImg.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="}start(e){this.dragged=!0,e&&e.dataTransfer&&e.dataTransfer.setDragImage(this.dragImg,0,0)}end(){this.dragged=!1}isDragged(){return this.dragged}}class Th{static Get(e){const n=e.split(".");return n[n.length-1]}}const zh=(()=>{function t(s,a){localStorage.setItem(`${s}_favourite`,a.toString())}function e(s,a){const c=localStorage.getItem(`${s}_favourite`);return c?c.split(",").includes(a):!1}function n(s,a){const c=localStorage.getItem(`${s}_favourite`);if(!c){t(s,[a]);return}const l=c.split(",");l.push(a),t(s,l)}function o(s,a){const c=localStorage.getItem(`${s}_favourite`);if(!c)return;const l=c.split(",").filter(u=>u!==a);t(s,l)}function r(){for(const s in localStorage)s.includes("_favourite")&&localStorage.removeItem(s)}return{addToFavourite:n,removeFromFavourite:o,setFavourite:t,isFavourite:e,clearFavourite:r}})();/*!
|
|
39
39
|
* vue-router v4.4.5
|
|
40
40
|
* (c) 2024 Eduardo San Martin Morote
|
|
41
41
|
* @license MIT
|
|
42
|
-
*/function Ds(t){const e=Array.from(arguments).slice(1);console.warn.apply(console,["[Vue Router warn]: "+t].concat(e))}var Os;(function(t){t.pop="pop",t.push="push"})(Os||(Os={}));var Ls;(function(t){t.back="back",t.forward="forward",t.unknown=""})(Ls||(Ls={})),Symbol(process.env.NODE_ENV!=="production"?"navigation failure":"");var _s;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(_s||(_s={}));const Vh=Symbol(process.env.NODE_ENV!=="production"?"router view location matched":"");Symbol(process.env.NODE_ENV!=="production"?"router view depth":""),Symbol(process.env.NODE_ENV!=="production"?"router":""),Symbol(process.env.NODE_ENV!=="production"?"route location":""),Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function Fh(t,e,n){const o=()=>{t[e].delete(n)};i.onUnmounted(o),i.onDeactivated(o),i.onActivated(()=>{t[e].add(n)}),t[e].add(n)}function Dh(t){if(process.env.NODE_ENV!=="production"&&!i.getCurrentInstance()){Ds("getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function");return}const e=i.inject(Vh,{}).value;if(!e){process.env.NODE_ENV!=="production"&&Ds("No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?");return}Fh(e,"leaveGuards",t)}function Oh(){const t=i.ref(!1),e=i.ref(!1);return{confirmLeave:t,saveButtonClick:e,beforeWindowUnload:s=>{t.value&&s.preventDefault()},formUpdated:()=>{t.value=!0},showConfirmModal:(s,a)=>{t.value&&!e.value?s():a()}}}const Lh=(()=>{const t=(s,a)=>i.onBeforeMount(async()=>{var c;S.H.FTSP.Get().reset(),Te.Set(a==null?void 0:a.sortsLib),S.H.FTSP.Get().setSortModel(Te.GetDefault()),Te.Set(a==null?void 0:a.sortsLib),S.H.FTSP.Get().setSortModel(Te.GetDefault()),S.Paginator.storeModule=(c=a==null?void 0:a.pagination)==null?void 0:c.storeModule,await s()}),{saveButtonClick:e,showConfirmModal:n}=Oh(),o=s=>Dh((a,c,l)=>{n((s||r)(),l)}),r=s=>async()=>{e.value=!0;try{s&&await s(),S.UI.Notify.Success("Сохранено")}catch(a){S.UI.Notify.Success("Что-то пошло не так. "+a);return}};return{onBeforeMount:t,onBeforeRouteLeave:o,submit:r}})(),Cn=class Cn{static Format(e){let n=e;if(!n)e=n;else{(n[0]==="7"||n[0]==="8")&&n.length!==1&&(n=n.slice(1));const o=n.replace(/\+7|[^\d]/g,""),r=o.length;switch(!0){case r===0:e="";break;case(r===1&&n.length===1&&o==="7"):case(r===1&&n.length===1&&o==="8"):e="+7 (";break;case r<4:e=`+7 (${o}`;break;case r<7:e=`+7 (${o.slice(0,3)}) ${o.slice(3)}`;break;case r<9:e=`+7 (${o.slice(0,3)}) ${o.slice(3,6)}-${o.slice(6,8)}`;break;default:e=`+7 (${o.slice(0,3)}) ${o.slice(3,6)}-${o.slice(6,8)}-${o.slice(8,10)}`;break}}return e}static getPhoneRegExp(){return/^(\s*)?(\+)?([- _():=+]?\d[- _():=+]?){10,14}(\s*)?$/}};d(Cn,"validatePhone",(e,n,o)=>{Cn.getPhoneRegExp().test(n)||!n?o():o(new Error("Пожалуйста, введите корректный номер телефона"))});let pi=Cn;class _h{static Count(e){const n=e.filter(s=>s.rating!==0);let o=0;n.forEach(s=>o=o+s.rating);const r=o/n.length;return isNaN(r)?0:Number((o/n.length).toFixed(2))}}class Hh{static async Auth(e){e&&e()}static Dev(){}}class qh{constructor(){d(this,"startHour",9);d(this,"startHM",`${this.startHour}:00`);d(this,"endHour",19);d(this,"endHM",`${this.endHour}:00`);d(this,"timelinePxHeight",50);d(this,"timelineStep",Ct.FiveMinutes);d(this,"timelines",Kt[Ct.FiveMinutes])}periodIsCorrect(e,n){return H.GtOrEq(e,this.startHM)&&H.GtOrEq(this.endHM,n)}setTimelineStep(e){this.timelineStep=e,this.setTimelines()}setTimelines(){this.timelines=Kt[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return He.GenerateNumsRange(this.startHour,this.endHour)}timeIsFree(e,n,o,r){return r.filter(s=>s.id!==o).every(s=>!H.PeriodsIntersects(e,n,s.startTime,s.endTime))}sortByStartTime(e){e.sort((n,o)=>H.HMtoM(n.startTime)-H.HMtoM(o.startTime))}}const Uh=-68;function Wh(t,e){if(!t){document.body.scrollTo({top:0,behavior:"smooth"});return}const n=document.querySelector(t),o=e??Uh;let r=0;n&&(r=n.getBoundingClientRect().top+o+document.body.scrollTop),r&&document.body.scrollTo({top:r,behavior:"smooth"})}class jh{static Sort(e){e.forEach((n,o)=>n.order=o)}}class gi{constructor(){d(this,"tabs",[]);d(this,"activeTab");d(this,"activeIdx",0);d(this,"key","")}preSelectTab(){const e=We.GetStringQueryParam(this.key),n=this.tabs.findIndex(o=>o.slug===e);n>-1&&(this.activeTab=this.tabs[n],this.activeIdx=n)}static Create(e,n){const o=new gi;return o.key=e,o.tabs=n,o}select(e,n){this.activeTab=e,this.activeIdx=n,We.SetQueryParam(this.key,e.slug)}}function Gh(t,e){let n=!0;return t.value.validate(o=>(o||(n=!1),n)),n}const Zh=t=>new Promise(e=>{if(document.querySelector(t))return e(document.querySelector(t));const n=new MutationObserver(()=>{document.querySelector(t)&&(n.disconnect(),e(document.querySelector(t)))});n.observe(document.body,{childList:!0,subtree:!0})});class pn{constructor(e){d(this,"id");d(this,"message","");d(this,"userName");d(this,"createdOn",new Date);d(this,"chatId");d(this,"type","message");V.BuildClass(this,e)}static Create(e,n,o,r){const s=new pn;return s.id=De(),s.chatId=e,s.message=o,s.userName=r,s}static CreatePingMessage(){const e=new pn;return e.type="ping",e.id=De(),e}isMessage(){return this.type==="message"||this.type===""}}const Xh="";class Jh{constructor(e="",n="",o="set"){d(this,"client");d(this,"endpoint","");d(this,"query","");d(this,"period",2e4);V.BuildClass(this,{endpoint:e,query:n,mutation:o}),this.connect(),this.ping()}send(e){!this.client||this.client.readyState!==1||this.client.send(e)}ping(){setInterval(this.sendPing.bind(this),this.period)}sendPing(){!this.client||this.client.readyState!==1||this.send(JSON.stringify(pn.CreatePingMessage()))}setOnMessage(){this.client&&(this.client.onmessage=e=>{e.data})}buildUrl(){const e=`ws/${this.endpoint}/${this.query}`;return new URL(e,Xh.replace("http","ws")).toString()}connect(){this.client=new WebSocket(this.buildUrl()),this.client.onclose=this.reconnect,this.client.onerror=this.reconnect}reconnect(){setTimeout(this.connect,3e3)}}class _{}d(_,"Arrays",He),d(_,"Axios",$t),d(_,"BaseStore",X),d(_,"Phone",Je),d(_,"Cache",mn),d(_,"Classes",V),d(_,"CarouselSwipe",Eh),d(_,"Color",xh),d(_,"CreateSortModels",Tr),d(_,"Cursor",Bh),d(_,"DateMask",Nh),d(_,"Dates",Ve),d(_,"Dragger",Ph),d(_,"Extension",Th),d(_,"Favourite",zh),d(_,"FTSP",Qr),d(_,"Hooks",Lh),d(_,"HttpClient",le),d(_,"Id",ve),d(_,"MakeCarousel",no),d(_,"Period",Zn),d(_,"PhoneService",pi),d(_,"Rating",_h),d(_,"Router",We),d(_,"RouterGuard",Hh),d(_,"Scheduler",qh),d(_,"Scroll",Wh),d(_,"Sizes",vn),d(_,"Sorter",jh),d(_,"Static",qn),d(_,"Statuses",ce),d(_,"Strings",ne),d(_,"Time",H),d(_,"Timer",St),d(_,"Token",Rt),d(_,"TabsStore",gi),d(_,"validate",Gh),d(_,"WaitElement",Zh),d(_,"WebSocketClient",Jh);class Yh{constructor(){d(this,"limit",25);d(this,"count",0);d(this,"curPage",1);d(this,"storeModule","")}setCurPage(e){this.curPage=e}pagesCount(){return Math.ceil(this.count/this.limit)??1}reset(){this.count=0,this.curPage=1}}const Qh=new Yh;class Kh{constructor(){d(this,"title","");d(this,"buttons",[])}Set(e="",n){typeof e=="function"?this.title=e():typeof e=="string"?this.title=e:this.title=e.value,this.buttons=n}}const ef=new Kh;class tf{constructor(){d(this,"menu",[]);d(this,"path","");d(this,"isOpen",!0);d(this,"filterString","")}Set(e){this.menu=e}Get(){return this.filterString?this.filterMenu():this.menu}filterMenu(){return this.menu.filter(e=>{var n;return ne.SearchIn(e.name,this.filterString)||((n=e.children)==null?void 0:n.some(o=>ne.SearchIn(o.name,this.filterString)))})}IsOpen(){return this.isOpen}Toggle(){this.isOpen=!this.isOpen}SetPath(e){this.path=e}GetPath(){return this.path}SetFilter(e){this.filterString=e}GetChildren(e){var n;return this.filterString?(n=e.children)==null?void 0:n.filter(o=>ne.SearchIn(o.name,this.filterString)):e.children}}const nf=new tf;class of{constructor(){d(this,"Menu",i.reactive(nf));d(this,"Head",i.reactive(ef))}}const rf=new of;class sf extends Gr{constructor(){super(...arguments);d(this,"confirmButtonText","Да");d(this,"cancelButtonText","Нет");d(this,"resolve");d(this,"reject")}GetConfirmButtonText(){return this.confirmButtonText}GetCancelButtonText(){return this.cancelButtonText}Show(n){return super.show(),typeof n!="string"&&(this.confirmButtonText=n.confirmButtonText,this.cancelButtonText=n.cancelButtonText),new Promise((o,r)=>{this.resolve=o,this.reject=r})}Save(){return this.Show({text:"У вас есть несохранённые изменения",confirmButtonText:"Сохранить",cancelButtonText:"Не сохранять"})}Submit(){this.resolve(!0),this.hide()}Cancel(){this.reject(),this.hide()}hide(){this.resolve=void 0,this.reject=void 0,super.hide()}}const af=new sf;class lf extends jr{Show(){super.show()}Hide(){super.hide()}}const cf=new lf,df=Object.freeze(Object.defineProperty({__proto__:null,Admin:rf,Btn:Ze,Dialog:af,Loading:cf,Notify:kt},Symbol.toStringTag,{value:"Module"}));let uf=class{async Login(e){const n=e??S.Auth.Form.GetValues(),o=await le.Post({query:"auth/login",payload:n});if(!o)throw S.UI.Notify.Error("Ошибка авторизации"),"Ошибка авторизации";S.Auth.Status.SetState(o)}async LoginAs(e){if(!await le.Post({query:"auth/login-as",payload:{email:e}})){S.UI.Notify.Error("Ошибка авторизации");return}}async Register(){}async RestorePassword(){}async passwordChange(){await le.Put({query:"auth/password-change"})}async RefreshToken(){await le.Post({query:"auth/refresh-token",payload:{refreshToken:Rt.getRefreshToken()}})}async CheckUuid(e){await le.Get({query:`auth/check-uuid/${e.userId}/${e.uniqueId}`})}};const hf=new uf;class yi{constructor(e){d(this,"id");d(this,"address");d(this,"description");V.BuildClass(this,e)}}class Hs{constructor(e){d(this,"id");d(this,"address");d(this,"description");V.BuildClass(this,e)}}var ff=Object.defineProperty,gn=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&ff(e,n,r),r};const At=class ba{constructor(e){d(this,"id");d(this,"description","");d(this,"time","");d(this,"latitude","");d(this,"longitude","");d(this,"emails",[]);d(this,"postAddresses",[new yi]);d(this,"phones",[]);d(this,"websites",[]);V.BuildClass(this,e)}addEmail(){const e=Xe.Create();return e.contactId=this.id,this.emails.push(e),e}addPhone(){const e=Je.Create();return e.contactId=this.id,this.phones.push(e),e}static Create(){const e=new ba;return e.id=ve.UUID(),e}removeEmail(e){V.RemoveFromClassById(e,this.emails)}removePhone(e){V.RemoveFromClassById(e,this.phones)}addPostAddress(){this.postAddresses.push(new yi)}addWebsite(){this.websites.push(new Hs)}pushFirst(){this.emails.length||this.emails.push(new Xe),this.phones.length||this.phones.push(new Je)}getCoords(){return[Number(this.latitude),Number(this.longitude)]}updateDescription(e){this.description=e}updateTime(e){this.time=e}updateLatitude(e){this.latitude=e}updateLongitutde(e){this.longitude=e}};gn([V.GetClassConstructor(Xe)],At.prototype,"emails"),gn([V.GetClassConstructor(yi)],At.prototype,"postAddresses"),gn([V.GetClassConstructor(Je)],At.prototype,"phones"),gn([V.GetClassConstructor(Hs)],At.prototype,"websites");let mf=At,pf=class extends X{constructor(){super(mf,"contacts")}};const gf=new pf;let yf=class{constructor(){d(this,"cropper",new Xt)}Open(e){this.cropper=e}Cropper(){return this.cropper}Ratio(){return this.cropper.ratio}};const wf=new yf;let bf=class extends X{constructor(){super(Xe,"emails")}};const Cf=new bf;let Sf=class extends X{constructor(){super(Be,"file-infos")}};const kf=new Sf;class wi{constructor(e){d(this,"id");d(this,"ftsp");d(this,"name","");V.BuildClass(this,e)}static Create(e){const n=new wi;return n.id=ve.UUID(),n.ftsp=JSON.stringify(e),n}}let Ef=class extends X{constructor(){super(wi,"ftsp-presets")}};const vf=new Ef;let xf=class extends X{constructor(){super(Yr,"humans")}};const Bf=new xf;let Mf=class extends X{constructor(){super(Je,"phones")}};const If=new Mf;class Rf{constructor(e){d(this,"id");d(this,"nameRus","");V.BuildClass(this,e)}}var $f=Object.defineProperty,Af=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&$f(e,n,r),r};class qs{constructor(e){d(this,"id");d(this,"nameRus","");d(this,"fields",[]);V.BuildClass(this,e)}}Af([V.GetClassConstructor(Rf)],qs.prototype,"fields");let Nf=class extends X{constructor(){super(qs,"schemas")}};const Pf=new Nf;class Us{constructor(e){d(this,"id","");d(this,"value","");d(this,"label","");d(this,"key","");d(this,"description","");d(this,"route","");d(this,"searchElementMetas",[]);V.BuildClass(this,e)}}class Tf{constructor(e){d(this,"id");d(this,"name","");d(this,"label","");V.BuildClass(this,e)}}var zf=Object.defineProperty,Ws=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&zf(e,n,r),r};class ut{constructor(e){d(this,"id");d(this,"key","");d(this,"label","");d(this,"order",0);d(this,"route","");d(this,"table","");d(this,"active",!0);d(this,"searchColumn","");d(this,"descriptionColumn","");d(this,"labelColumn","");d(this,"valueColumn","");d(this,"options",[]);d(this,"searchGroupMetaColumns",[]);V.BuildClass(this,e)}}Ws([V.GetClassConstructor(Us)],ut.prototype,"options"),Ws([V.GetClassConstructor(Tf)],ut.prototype,"searchGroupMetaColumns");class bi{constructor(e){d(this,"query","");d(this,"key","");d(this,"params","");d(this,"suggester",!1);d(this,"mustBeTranslated",!0);d(this,"options",[]);d(this,"searchGroupId","");d(this,"searchGroups",[]);d(this,"searchGroup",new ut);d(this,"searchObjects",[]);d(this,"pagination",new tn);d(this,"count",0);e&&(this.query=e.query,e.searchGroups&&(this.searchGroups=e.searchGroups.map(n=>new ut(n))),e.searchGroup&&(this.searchGroup=new ut(e.searchGroup)),e.options&&(this.options=e.options.map(n=>new Us(n))),this.count=e.count)}toUrl(){return JSON.stringify(this)}async setSearchGroup(e){const n=this.searchGroups.find(o=>o.id===e);n?this.searchGroup=n:this.searchGroup=new ut}async reproduceFromRoute(){this.setQuery(),await this.setSearchGroup(We.Route().query.groupId)}setQuery(){const e=We.Route().query.query;e&&(this.query=e)}}let Vf=class{constructor(){d(this,"isSearchDrawerOpen",i.ref(!1));d(this,"searchModel",i.reactive(new bi));d(this,"searchGroups",i.reactive([]));d(this,"count",0)}async Search(e){const n=await le.Get({query:`?key=${e.key}&query=${e.query}`});n&&n.searchGroup&&n.searchGroup.options.forEach(o=>{e.searchObjects.push({id:o.id,value:o.value,label:o.label,description:o.description})})}async mainSearch(e){this.SetSearchModel(await le.Get({query:`/main?searchModel=${e.toUrl()}`}))}async Full(e){e.options=[],e.searchGroups.forEach(o=>{o.options=[]});const n=await le.Get({query:`main?searchModel=${e.toUrl()}`});this.SetSearchModel(n)}ToggleDrawer(e){this.isSearchDrawerOpen.value=e,this.searchModel=new bi}SetSearchModel(e){e&&(this.searchModel=new bi(e))}SetSearchGroups(){}IsSearchDrawerOpen(){return this.isSearchDrawerOpen}SearchModel(){return this.searchModel}SearchGroups(){return this.searchGroups}Count(){return this.count}};const Ff=new Vf;class Ci{constructor(e){d(this,"id");d(this,"login","");d(this,"email","");d(this,"password","");V.BuildClass(this,e)}static Create(){const e=new Ci;return e.id=ve.UUID(),e}}let Df=class extends X{constructor(){super(Ci,"users-accounts")}};const Of=new Df;var js=(t=>(t.simple="simple",t.oneToMany="oneToMany",t.manyToMany="manyToMany",t))(js||{});class Gs{constructor(e){d(this,"id");d(this,"name",ue.String);d(this,"valueRelation",js.simple);V.BuildClass(this,e)}isString(){return this.name==="string"}isNumber(){return this.name==="number"}isDate(){return this.name==="date"}isDateTime(){return this.name==="dateTime"}isRadio(){return this.name==="radio"}isSet(){return this.name==="set"}isText(){return this.name==="text"}isBoolean(){return this.name==="boolean"}isFile(){return this.name==="file"}isFiles(){return this.name==="files"}getComponentType(){if(this.name===ue.Radio)return"RadioProp";if(this.name===ue.Set)return"SetProp";if(this.name===ue.Number)return"NumberProp";if(this.name===ue.String)return"StringProp"}}let Lf=class extends X{constructor(){super(Gs,"value-types")}};const _f=new Lf,Hf=Object.freeze(Object.defineProperty({__proto__:null,Auth:hf,Contacts:gf,Cropper:wf,Emails:Cf,FTSPPresets:vf,FileInfos:kf,Humans:Bf,Phones:If,Schemas:Pf,Search:Ff,UserAccounts:Of,ValueTypes:_f},Symbol.toStringTag,{value:"Module"}));class S{}d(S,"Auth",i.reactive(Jr)),d(S,"UI",i.reactive(df)),d(S,"Paginator",i.reactive(Qh)),d(S,"S",Hf),d(S,"H",_),d(S,"C",Jd);class Zs{constructor(e){d(this,"id");d(this,"num","");d(this,"fileInfoId");d(this,"fileInfo",new Be);S.H.Classes.BuildClass(this,e)}}class Nt{constructor(e){d(this,"id");d(this,"passportId");d(this,"fileInfoId");d(this,"fileInfo",new Be);d(this,"order",0);S.H.Classes.BuildClass(this,e)}static Create(e){const n=new Nt;return n.id=S.H.Id.UUID(),n.passportId=e,n}}var qf=Object.defineProperty,Uf=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&qf(e,n,r),r};class Si{constructor(e){d(this,"id");d(this,"num","");d(this,"seria","");d(this,"division","");d(this,"divisionCode","");d(this,"citzenship","");d(this,"date",new Date);d(this,"address","");d(this,"passportScans",[]);S.H.Classes.BuildClass(this,e)}}Uf([S.H.Classes.GetClassConstructor(Nt)],Si.prototype,"passportScans");class Xs{constructor(e){d(this,"id");d(this,"num","");d(this,"fileInfoId");d(this,"fileInfo",new Be);S.H.Classes.BuildClass(this,e)}}const Wf=Object.freeze(Object.defineProperty({__proto__:null,Inn:Zs,Passport:Si,PassportScan:Nt,Snils:Xs},Symbol.toStringTag,{value:"Module"}));let jf=class extends X{constructor(){super(Zs,"inns")}};const Gf=new jf;let Zf=class extends X{constructor(){super(Nt,"passport-scans")}};const Xf=new Zf;let Jf=class extends X{constructor(){super(Si,"passports")}};const Yf=new Jf;let Qf=class extends X{constructor(){super(Xs,"snilss")}};const Kf=new Qf,em=Object.freeze(Object.defineProperty({__proto__:null,C:Wf,S:Object.freeze(Object.defineProperty({__proto__:null,Inns:Gf,PassportScans:Xf,Passports:Yf,Snilss:Kf},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class et{constructor(e){d(this,"id");d(this,"name","");d(this,"score",0);d(this,"order",0);d(this,"showMoreQuestions",!1);d(this,"showOther",!1);d(this,"fieldId");d(this,"isMatrixY",!1);S.H.Classes.BuildClass(this,e)}static Create(e){const n=new et;return n.id=S.H.Id.UUID(),n.fieldId=e,n}}class Js{constructor(e){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"fieldId");S.H.Classes.BuildClass(this,e)}}class ki{constructor(e){d(this,"id");d(this,"name","");d(this,"order",0);S.H.Classes.BuildClass(this,e)}}class ht{constructor(e){d(this,"id");d(this,"name","");d(this,"fieldId");S.H.Classes.BuildClass(this,e)}static Create(e){const n=new ht;return n.id=S.H.Id.UUID(),n.fieldId=e,n}}var tm=Object.defineProperty,Pt=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&tm(e,n,r),r};const tt=class En{constructor(e){d(this,"id");d(this,"name","");d(this,"code","");d(this,"valueTypeId");d(this,"order",0);d(this,"ageCompare",!1);d(this,"answerVariants",[]);d(this,"answerVariantsForDelete",[]);d(this,"fieldExamples",[]);d(this,"fieldVariants",[]);d(this,"valueType",new Gs);d(this,"fieldMeasures",[]);d(this,"showSet",!1);d(this,"showRadio",!1);d(this,"isEdit",!1);d(this,"children",[]);d(this,"parentId");d(this,"formSectionId");d(this,"selected",!1);S.H.Classes.BuildClass(this,e),this.changeRelation([this.valueType])}getMatrixX(){return this.answerVariants.filter(e=>!e.isMatrixY)}getMatrixY(){return this.answerVariants.filter(e=>e.isMatrixY)}static Create(e){const n=new En;return n.id=S.H.Id.UUID(),n.formSectionId=e,n}getRegisterPropertyRadioOriginalValue(e){const n=this.answerVariants.find(o=>o.id===e);return n?n.name:""}addRadioItem(e){const n=new et(e);n.order=this.answerVariants.length,this.answerVariants.push(n)}removeRadioItem(e){const n=this.answerVariants[e].id;n&&this.answerVariantsForDelete.push(n),this.answerVariants.splice(e,1)}changeRelation(e){const n=e.find(o=>o.id===this.valueTypeId);if(n){if(n.isRadio()){this.showRadio=!0,this.showSet=!1;return}if(n.isSet()){this.showSet=!0,this.showRadio=!1;return}this.showSet=!1,this.showRadio=!1,this.valueType=n}}editRegisterProperty(e){this.isEdit=e??!this.isEdit}sortExamples(){this.fieldExamples.forEach((e,n)=>e.order=n)}addRegisterPropertyMeasure(e){this.fieldMeasures.push(new ki(e))}addRegisterPropertyVariant(){this.fieldVariants.push(new ht)}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}static GetClassName(){return"Field"}setType(e){this.valueType=e,this.valueTypeId=e.id}setName(e){this.name=e}addAnswerVariant(){const e=et.Create(this.id);return e.name="Вариант",e.order=this.answerVariants.length,this.answerVariants.push(e),e}addChild(){const e=En.Create();return e.parentId=this.id,e.name="Вопрос",e.order=this.children.length,this.children.push(e),e}addFieldVariant(){const e=ht.Create(this.id);return this.fieldVariants.push(e),e}copy(){const e=new En(this);return e.id=S.H.Id.UUID(),e.answerVariants.forEach(n=>{n.id=S.H.Id.UUID(),n.fieldId=e.id}),e.children=e.children.map(n=>{const o=n.copy();return o.parentId=e.id,o}),e}};Pt([S.H.Classes.GetClassConstructor(et)],tt.prototype,"answerVariants"),Pt([S.H.Classes.GetClassConstructor(Js)],tt.prototype,"fieldExamples"),Pt([S.H.Classes.GetClassConstructor(ht)],tt.prototype,"fieldVariants"),Pt([S.H.Classes.GetClassConstructor(ki)],tt.prototype,"fieldMeasures"),Pt([S.H.Classes.GetClassConstructor(tt)],tt.prototype,"children");let yn=tt;class Ei{constructor(e){d(this,"id");d(this,"answerId");d(this,"comment","");d(this,"fileInfoId");d(this,"fileInfo",new Be);S.H.Classes.BuildClass(this,e)}}class nt{constructor(e){d(this,"id");d(this,"answerVariantId");d(this,"answerVariantIdY");d(this,"fieldFillId");S.H.Classes.BuildClass(this,e)}static Create(e,n){const o=new nt;return o.id=De(),o.fieldFillId=e,o.answerVariantId=n,o}static GetClassName(){return"selectedAnswerVariant"}}var nm=Object.defineProperty,Ys=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&nm(e,n,r),r};const vi=class Ri{constructor(e){d(this,"id");d(this,"valueString");d(this,"valueOther");d(this,"valueNumber");d(this,"valueDate");d(this,"fileInfo",new Be);d(this,"fileInfoId");d(this,"order",0);d(this,"selectedAnswerVariants",[]);d(this,"patientId");d(this,"fieldId");d(this,"formFillId");d(this,"answerVariantId");d(this,"filled",!1);d(this,"researchResultId");d(this,"answerFiles",[]);d(this,"answerFilesForDelete",[]);S.H.Classes.BuildClass(this,e)}setFilled(e){this.filled=e}static Create(e,n){const o=new Ri;return o.id=De(),o.fieldId=e.id,o.formFillId=n,o.order=e.order,o.valueNumber=0,o.valueString="",o.valueDate=new Date,o}setString(e){this.valueString=e,this.valueString&&(this.filled=this.valueString.length>0)}setNumber(e){this.valueNumber=e,this.valueNumber&&(this.filled=!0)}setOther(e){this.valueOther=e,this.valueOther&&(this.filled=this.valueOther.length>0)}setDate(e){this.valueDate=e,this.filled=!0}setRadio(e){this.answerVariantId=e,this.filled=!!this.answerVariantId}static CreateMany(e,n){return e.map(o=>Ri.Create(o,n))}addFile(){const e=new Ei;return e.id=De(),e.answerId=this.id,this.answerFiles.push(e),e}getFileInfos(){const e=[];return this.answerFiles.forEach(n=>e.push(n.fileInfo)),e}getSelectedAnswerVariant(){return!0}setMatrixRadioValue(e,n){const o=nt.Create(this.id,e);return o.answerVariantIdY=n,this.selectedAnswerVariants.push(o),this.filled=!0,o}getMatrixValue(e,n){return this.selectedAnswerVariants.find(o=>o.answerVariantId===e&&o.answerVariantIdY===n)}addSelectedAnswerVariant(e){const n=nt.Create(this.id,e);return this.selectedAnswerVariants.push(n),this.filled=!0,n}static GetClassName(){return"answer"}showOther(e){const n=e.find(o=>o.showOther);return n?this.answerVariantId===n.id||this.selectedAnswerVariants.some(o=>o.answerVariantId===n.id):!1}};Ys([S.H.Classes.GetClassConstructor(nt)],vi.prototype,"selectedAnswerVariants"),Ys([S.H.Classes.GetClassConstructor(Ei)],vi.prototype,"answerFiles");let ft=vi;class im{constructor(e){d(this,"id");d(this,"fieldId");S.H.Classes.BuildClass(this,e)}static GetClassName(){return"fieldFilter"}}var om=Object.defineProperty,rm=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&om(e,n,r),r};const Qs=class Ca{constructor(e){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"fields",[]);d(this,"formId");S.H.Classes.BuildClass(this,e)}static GetClassName(){return"formSection"}getN(){return`${this.order+1}`}getFieldN(e){return`${this.getN()}.${e+1}`}getSubFieldN(e,n){return`${this.getFieldN(e)}.${n+1}`}static Create(e){const n=new Ca;return n.id=S.H.Id.UUID(),n.formId=e,n}addField(){const e=yn.Create(this.id);return this.fields.push(e),this.sortFields(),e}sortFields(){this.fields.forEach((e,n)=>e.order=n)}getAnswerVariants(){const e=[];return this.fields.forEach(n=>e.push(...n.answerVariants)),e}};rm([S.H.Classes.GetClassConstructor(yn)],Qs.prototype,"fields");let wn=Qs;var sm=Object.defineProperty,am=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&sm(e,n,r),r};const Ks=class Sa{constructor(e){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"isLaboratory",!1);d(this,"formSections",[]);d(this,"isEdit",!1);d(this,"withDates",!1);d(this,"withScores",!1);d(this,"selectedForExport",!1);d(this,"filterString","");d(this,"showOnlyNotFilled",!1);d(this,"showOnlyFilled",!1);S.H.Classes.BuildClass(this,e)}static GetClassName(){return"Form"}static Create(){const e=new Sa;return e.id=S.H.Id.UUID(),e}editRegisterGroup(e){this.isEdit=e??!this.isEdit}addFormSection(){const e=wn.Create(this.id);return this.formSections.push(e),S.H.Sorter.Sort(this.formSections),e}getFields(){const e=this.formSections.map(o=>o.fields).flat(),n=e.map(o=>o.children).flat();return e.concat(n).filter(o=>o.children.length===0)}};am([S.H.Classes.GetClassConstructor(wn)],Ks.prototype,"formSections");let ea=Ks;var lm=Object.defineProperty,cm=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&lm(e,n,r),r};const ta=class ka{constructor(e){d(this,"id");d(this,"date",new Date);d(this,"editMode",!1);d(this,"userFormId");d(this,"fillingPercentage",0);d(this,"fieldFills",[]);d(this,"num","");d(this,"formId");S.H.Classes.BuildClass(this,e)}static Create(e){const n=new ka;return n.id=S.H.Id.UUID(),n.formId=e.id,n.fieldFills.push(...ft.CreateMany(e.getFields(),n.id)),n}addFieldFill(e){this.fieldFills.push(e)}getFieldFill(e){var n;return(n=this.fieldFills)==null?void 0:n.find(o=>o.fieldId===e)}pushRegisterProperty(e){const n=new ft;n.researchResultId=e,this.fieldFills.push(n)}getRegisterPropertyToPatient(e){return this.fieldFills.filter(n=>n.researchResultId===e)}getOrCreateFieldFill(e){let n=this.getFieldFill(e.id);return n||(n=ft.Create(e),this.addFieldFill(n)),n}getFileInfos(){const e=[];return this.fieldFills.forEach(n=>e.push(...n.getFileInfos())),e}calculateFilling(){const e=this.fieldFills.filter(o=>o.filled).length,n=this.fieldFills.length;this.fillingPercentage=Math.round(e/n*100)}getFieldFillByFieldId(e){return this.fieldFills.find(n=>n.fieldId===e)}getFieldVariantFieldFill(e){return this.fieldFills.find(n=>n.answerVariantId===e)}getFieldsFieldFillsMap(e){const n={};return e.forEach(o=>{var r;if(o.code){const s=(r=this.getFieldFillByFieldId(o.id))==null?void 0:r.valueNumber;n[o.code]=s}}),n}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}};cm([S.H.Classes.GetClassConstructor(ft)],ta.prototype,"fieldFills");let na=ta;const dm=Object.freeze(Object.defineProperty({__proto__:null,AnswerVariant:et,Field:yn,FieldExample:Js,FieldFill:ft,FieldFillFile:Ei,FieldFilter:im,FieldMeasure:ki,FieldVariant:ht,Form:ea,FormFill:na,FormSection:wn,SelectedAnswerVariant:nt},Symbol.toStringTag,{value:"Module"}));let um=class extends X{constructor(){super(et,"answer-variants")}};const hm=new um;let fm=class extends X{constructor(){super(ft,"field-fills")}};const mm=new fm;let pm=class extends X{constructor(){super(yn,"fields")}};const gm=new pm;let ym=class extends X{constructor(){super(na,"form-fills")}};const wm=new ym;let bm=class extends X{constructor(){super(wn,"form-sections")}};const Cm=new bm;let Sm=class extends X{constructor(){super(ea,"forms")}};const km=new Sm;let Em=class extends X{constructor(){super(nt,"selected-answer-variants")}};const vm=new Em,xm=Object.freeze(Object.defineProperty({__proto__:null,C:dm,S:Object.freeze(Object.defineProperty({__proto__:null,AnswerVariants:hm,FieldFills:mm,Fields:gm,FormFills:wm,FormSections:Cm,Forms:km,SelectedAnswerVariants:vm},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class bn{constructor(e){d(this,"id");d(this,"name","");d(this,"label","");S.H.Classes.BuildClass(this,e)}static Create(e,n){const o=new bn;return o.id=S.H.Id.UUID(),o.name=e,o.label=n,o}}const Bm=Object.freeze(Object.defineProperty({__proto__:null,ColorTheme:bn},Symbol.toStringTag,{value:"Module"}));class Mm extends X{constructor(){super(bn,"color-themes")}}const Im=new Mm,Rm=Object.freeze(Object.defineProperty({__proto__:null,Docs:em,Forms:xm,Settings:Object.freeze(Object.defineProperty({__proto__:null,C:Bm,S:Object.freeze(Object.defineProperty({__proto__:null,ColorThemes:Im},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),$m={install:function(t){t.component("PButton",Pi),t.component("PCheckBox",Ti),t.component("PDatePicker",zi),t.component("PFlex",Vi),t.component("PInput",Hi),t.component("PInputDate",qi),t.component("PInputNumber",Ui),t.component("PLeftSlider",Wi),t.component("PList",ji),t.component("PListItem",Gi),t.component("PRadio",Zi),t.component("PRightSlider",Xi),t.component("PSelect",Ji),t.component("PSticky",Yi),t.component("PString",Qi),t.component("PTextarea",Ki),t.component("PTopSlider",eo),t.component("IconDownload",bo),t.component("IconFilter",Co),t.component("ArrowLeft",Ro),t.component("ArrowRight",$o),t.component("DoubleArrowLeft",Ao),t.component("DoubleArrowRight",No),t.component("EllipsisSvg",Po),t.component("IconArrowLeft",So),t.component("IconCheckDefault",ko),t.component("IconClose",Ft),t.component("IconEdit",Eo),t.component("IconEmail",vo),t.component("IconMove",xo),t.component("IconPhone",Bo),t.component("IconSearch",Mo),t.component("IconSelectArrow",Io),t.component("CollapseContainer",ur),t.component("CollapseItem",hr),t.component("VerticalCollapseContainer",fr),t.component("PAdd",mr),t.component("PContainer",pr),t.component("PContainerStickyHead",gr),t.component("PDel",yr),t.component("PTabs",Cr),t.component("UploaderFile",Sr),t.component("AuthForm",wr),t.component("PModal",br),t.component("AuthPage",Un),t.component("PageNotFound",Wn),t.component("AdaptiveContainer",$i),t.component("AdaptiveContainerHorizontal",Ai),t.component("AdminGallery",Ni),t.component("AuthModal",to),t.component("CarouselImages",io),t.component("ContextWindow",oo),t.component("DateInputRangeV2",so),t.component("DateInputRange",ro),t.component("DropList",ao),t.component("FilterCheckbox",mo),t.component("FiltersButtonsSelect",po),t.component("FilterSelect",go),t.component("FTSPPanel",yo),t.component("GeneralItem",wo),t.component("GridContainer",Bn),t.component("ImageCropper",ar),t.component("InfoItem",Zt),t.component("InfoItemSelectButtons",lr),t.component("LeftRightContainer",cr),t.component("MessageBody",dr),t.component("PAutocomplete",kr),t.component("PDialog",Er),t.component("PhoneForm",vr),t.component("PLoader",xr),t.component("PNotification",Br),t.component("PPagination",Mr),t.component("RemoteSearch",Ir),t.component("ResearcheContainer",Rr),t.component("RightSliderContainer",$r),t.component("RightTabsContainer",Ar),t.component("SelectValueType",Nr),t.component("SingleNameToggleForm",Pr),t.component("SortList",zr),t.component("SortSelect",Vr),t.component("Switch3Pos",Fr),t.component("ThemeWrapper",Dr),t.component("ToggleInfoItem",Or),t.component("TopSliderContainer",Lr),t.component("UploaderImage",_r)}},Am=["PF","PFM"];v.AdaptiveContainer=$i,v.AdaptiveContainerHorizontal=Ai,v.AdminGallery=Ni,v.ArrowLeft=Ro,v.ArrowRight=$o,v.AuthForm=wr,v.AuthModal=to,v.AuthPage=Un,v.CarouselImages=io,v.CollapseContainer=ur,v.CollapseItem=hr,v.ContextWindow=oo,v.DateInputRange=ro,v.DateInputRange_v2=so,v.DoubleArrowLeft=Ao,v.DoubleArrowRight=No,v.DropList=ao,v.EllipsisSvg=Po,v.FTSPPanel=yo,v.FilterCheckbox=mo,v.FilterSelect=go,v.FiltersButtonsSelect=po,v.GeneralItem=wo,v.GridContainer=Bn,v.IconArrowLeft=So,v.IconCheckDefault=ko,v.IconClose=Ft,v.IconDownload=bo,v.IconEdit=Eo,v.IconEmail=vo,v.IconFilter=Co,v.IconMove=xo,v.IconPhone=Bo,v.IconSearch=Mo,v.IconSelectArrow=Io,v.ImageCropper=ar,v.InfoItem=Zt,v.InfoItemSelectButtons=lr,v.LeftRightContainer=cr,v.MessageBody=dr,v.PAdd=mr,v.PAutocomplete=kr,v.PButton=Pi,v.PCheckBox=Ti,v.PContainer=pr,v.PContainerStickyHead=gr,v.PDatePicker=zi,v.PDel=yr,v.PDialog=Er,v.PF=S,v.PFM=Rm,v.PFlex=Vi,v.PInput=Hi,v.PInputDate=qi,v.PInputNumber=Ui,v.PLeftSlider=Wi,v.PList=ji,v.PListItem=Gi,v.PLoader=xr,v.PModal=br,v.PNotification=Br,v.PPagination=Mr,v.PRadio=Zi,v.PRightSlider=Xi,v.PSelect=Ji,v.PSticky=Yi,v.PString=Qi,v.PTabs=Cr,v.PTextarea=Ki,v.PTopSlider=eo,v.PageNotFound=Wn,v.PhoneForm=vr,v.RemoteSearch=Ir,v.ResearcheContainer=Rr,v.RightSliderContainer=$r,v.RightTabsContainer=Ar,v.SelectValueType=Nr,v.SingleNameToggleForm=Pr,v.SortList=zr,v.SortSelect=Vr,v.Switch3Pos=Fr,v.ThemeWrapper=Dr,v.ToggleInfoItem=Or,v.TopSliderContainer=Lr,v.UploaderFile=Sr,v.UploaderImage=_r,v.VerticalCollapseContainer=fr,v.pfName=Am,v.servicesComponents=$m,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
|
|
42
|
+
*/function Ds(t){const e=Array.from(arguments).slice(1);console.warn.apply(console,["[Vue Router warn]: "+t].concat(e))}var Os;(function(t){t.pop="pop",t.push="push"})(Os||(Os={}));var Ls;(function(t){t.back="back",t.forward="forward",t.unknown=""})(Ls||(Ls={})),Symbol(process.env.NODE_ENV!=="production"?"navigation failure":"");var _s;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(_s||(_s={}));const Vh=Symbol(process.env.NODE_ENV!=="production"?"router view location matched":"");Symbol(process.env.NODE_ENV!=="production"?"router view depth":""),Symbol(process.env.NODE_ENV!=="production"?"router":""),Symbol(process.env.NODE_ENV!=="production"?"route location":""),Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function Fh(t,e,n){const o=()=>{t[e].delete(n)};i.onUnmounted(o),i.onDeactivated(o),i.onActivated(()=>{t[e].add(n)}),t[e].add(n)}function Dh(t){if(process.env.NODE_ENV!=="production"&&!i.getCurrentInstance()){Ds("getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function");return}const e=i.inject(Vh,{}).value;if(!e){process.env.NODE_ENV!=="production"&&Ds("No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?");return}Fh(e,"leaveGuards",t)}function Oh(){const t=i.ref(!1),e=i.ref(!1);return{confirmLeave:t,saveButtonClick:e,beforeWindowUnload:s=>{t.value&&s.preventDefault()},formUpdated:()=>{t.value=!0},showConfirmModal:(s,a)=>{t.value&&!e.value?s():a()}}}const Lh=(()=>{const t=(s,a)=>i.onBeforeMount(async()=>{var c;S.H.FTSP.Get().reset(),Te.Set(a==null?void 0:a.sortsLib),S.H.FTSP.Get().setSortModel(Te.GetDefault()),Te.Set(a==null?void 0:a.sortsLib),S.H.FTSP.Get().setSortModel(Te.GetDefault()),S.Paginator.storeModule=(c=a==null?void 0:a.pagination)==null?void 0:c.storeModule,await s()}),{saveButtonClick:e,showConfirmModal:n}=Oh(),o=s=>Dh((a,c,l)=>{n((s||r)(),l)}),r=s=>async()=>{e.value=!0;try{s&&await s(),S.UI.Notify.Success("Сохранено")}catch(a){S.UI.Notify.Success("Что-то пошло не так. "+a);return}};return{onBeforeMount:t,onBeforeRouteLeave:o,submit:r}})(),Cn=class Cn{static Format(e){let n=e;if(!n)e=n;else{(n[0]==="7"||n[0]==="8")&&n.length!==1&&(n=n.slice(1));const o=n.replace(/\+7|[^\d]/g,""),r=o.length;switch(!0){case r===0:e="";break;case(r===1&&n.length===1&&o==="7"):case(r===1&&n.length===1&&o==="8"):e="+7 (";break;case r<4:e=`+7 (${o}`;break;case r<7:e=`+7 (${o.slice(0,3)}) ${o.slice(3)}`;break;case r<9:e=`+7 (${o.slice(0,3)}) ${o.slice(3,6)}-${o.slice(6,8)}`;break;default:e=`+7 (${o.slice(0,3)}) ${o.slice(3,6)}-${o.slice(6,8)}-${o.slice(8,10)}`;break}}return e}static getPhoneRegExp(){return/^(\s*)?(\+)?([- _():=+]?\d[- _():=+]?){10,14}(\s*)?$/}};d(Cn,"validatePhone",(e,n,o)=>{Cn.getPhoneRegExp().test(n)||!n?o():o(new Error("Пожалуйста, введите корректный номер телефона"))});let pi=Cn;class _h{static Count(e){const n=e.filter(s=>s.rating!==0);let o=0;n.forEach(s=>o=o+s.rating);const r=o/n.length;return isNaN(r)?0:Number((o/n.length).toFixed(2))}}class Hh{static async Auth(e){e&&e()}static Dev(){}}class qh{constructor(){d(this,"startHour",9);d(this,"startHM",`${this.startHour}:00`);d(this,"endHour",19);d(this,"endHM",`${this.endHour}:00`);d(this,"timelinePxHeight",50);d(this,"timelineStep",Ct.FiveMinutes);d(this,"timelines",Kt[Ct.FiveMinutes])}periodIsCorrect(e,n){return H.GtOrEq(e,this.startHM)&&H.GtOrEq(this.endHM,n)}setTimelineStep(e){this.timelineStep=e,this.setTimelines()}setTimelines(){this.timelines=Kt[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return He.GenerateNumsRange(this.startHour,this.endHour)}timeIsFree(e,n,o,r){return r.filter(s=>s.id!==o).every(s=>!H.PeriodsIntersects(e,n,s.startTime,s.endTime))}sortByStartTime(e){e.sort((n,o)=>H.HMtoM(n.startTime)-H.HMtoM(o.startTime))}}const Uh=-68;function Wh(t,e){if(!t){document.body.scrollTo({top:0,behavior:"smooth"});return}const n=document.querySelector(t),o=e??Uh;let r=0;n&&(r=n.getBoundingClientRect().top+o+document.body.scrollTop),r&&document.body.scrollTo({top:r,behavior:"smooth"})}class jh{static Sort(e){e.forEach((n,o)=>n.order=o)}}class gi{constructor(){d(this,"tabs",[]);d(this,"activeTab");d(this,"activeIdx",0);d(this,"key","")}preSelectTab(){const e=Ke.GetStringQueryParam(this.key),n=this.tabs.findIndex(o=>o.slug===e);n>-1&&(this.activeTab=this.tabs[n],this.activeIdx=n)}static Create(e,n){const o=new gi;return o.key=e,o.tabs=n,o}select(e,n){this.activeTab=e,this.activeIdx=n;const o=new URL(window.location);o.searchParams.set(this.key,e.slug),history.pushState(null,"",o)}}function Gh(t,e){let n=!0;return t.value.validate(o=>(o||(n=!1),n)),n}const Zh=t=>new Promise(e=>{if(document.querySelector(t))return e(document.querySelector(t));const n=new MutationObserver(()=>{document.querySelector(t)&&(n.disconnect(),e(document.querySelector(t)))});n.observe(document.body,{childList:!0,subtree:!0})});class pn{constructor(e){d(this,"id");d(this,"message","");d(this,"userName");d(this,"createdOn",new Date);d(this,"chatId");d(this,"type","message");V.BuildClass(this,e)}static Create(e,n,o,r){const s=new pn;return s.id=De(),s.chatId=e,s.message=o,s.userName=r,s}static CreatePingMessage(){const e=new pn;return e.type="ping",e.id=De(),e}isMessage(){return this.type==="message"||this.type===""}}const Xh="";class Jh{constructor(e="",n="",o="set"){d(this,"client");d(this,"endpoint","");d(this,"query","");d(this,"period",2e4);V.BuildClass(this,{endpoint:e,query:n,mutation:o}),this.connect(),this.ping()}send(e){!this.client||this.client.readyState!==1||this.client.send(e)}ping(){setInterval(this.sendPing.bind(this),this.period)}sendPing(){!this.client||this.client.readyState!==1||this.send(JSON.stringify(pn.CreatePingMessage()))}setOnMessage(){this.client&&(this.client.onmessage=e=>{e.data})}buildUrl(){const e=`ws/${this.endpoint}/${this.query}`;return new URL(e,Xh.replace("http","ws")).toString()}connect(){this.client=new WebSocket(this.buildUrl()),this.client.onclose=this.reconnect,this.client.onerror=this.reconnect}reconnect(){setTimeout(this.connect,3e3)}}class _{}d(_,"Arrays",He),d(_,"Axios",$t),d(_,"BaseStore",X),d(_,"Phone",Xe),d(_,"Cache",mn),d(_,"Classes",V),d(_,"CarouselSwipe",Eh),d(_,"Color",xh),d(_,"CreateSortModels",Tr),d(_,"Cursor",Bh),d(_,"DateMask",Nh),d(_,"Dates",Ve),d(_,"Dragger",Ph),d(_,"Extension",Th),d(_,"Favourite",zh),d(_,"FTSP",Qr),d(_,"Hooks",Lh),d(_,"HttpClient",le),d(_,"Id",ve),d(_,"MakeCarousel",no),d(_,"Period",Zn),d(_,"PhoneService",pi),d(_,"Rating",_h),d(_,"Router",Ke),d(_,"RouterGuard",Hh),d(_,"Scheduler",qh),d(_,"Scroll",Wh),d(_,"Sizes",vn),d(_,"Sorter",jh),d(_,"Static",qn),d(_,"Statuses",ce),d(_,"Strings",ne),d(_,"Time",H),d(_,"Timer",St),d(_,"Token",Rt),d(_,"TabsStore",gi),d(_,"validate",Gh),d(_,"WaitElement",Zh),d(_,"WebSocketClient",Jh);class Yh{constructor(){d(this,"limit",25);d(this,"count",0);d(this,"curPage",1);d(this,"storeModule","")}setCurPage(e){this.curPage=e}pagesCount(){return Math.ceil(this.count/this.limit)??1}reset(){this.count=0,this.curPage=1}}const Qh=new Yh;class Kh{constructor(){d(this,"title","");d(this,"buttons",[])}Set(e="",n){typeof e=="function"?this.title=e():typeof e=="string"?this.title=e:this.title=e.value,this.buttons=n}}const ef=new Kh;class tf{constructor(){d(this,"menu",[]);d(this,"path","");d(this,"isOpen",!0);d(this,"filterString","")}Set(e){this.menu=e}Get(){return this.filterString?this.filterMenu():this.menu}filterMenu(){return this.menu.filter(e=>{var n;return ne.SearchIn(e.name,this.filterString)||((n=e.children)==null?void 0:n.some(o=>ne.SearchIn(o.name,this.filterString)))})}IsOpen(){return this.isOpen}Toggle(){this.isOpen=!this.isOpen}SetPath(e){this.path=e}GetPath(){return this.path}SetFilter(e){this.filterString=e}GetChildren(e){var n;return this.filterString?(n=e.children)==null?void 0:n.filter(o=>ne.SearchIn(o.name,this.filterString)):e.children}}const nf=new tf;class of{constructor(){d(this,"Menu",i.reactive(nf));d(this,"Head",i.reactive(ef))}}const rf=new of;class sf extends Gr{constructor(){super(...arguments);d(this,"confirmButtonText","Да");d(this,"cancelButtonText","Нет");d(this,"resolve");d(this,"reject")}GetConfirmButtonText(){return this.confirmButtonText}GetCancelButtonText(){return this.cancelButtonText}Show(n){return super.show(),typeof n!="string"&&(this.confirmButtonText=n.confirmButtonText,this.cancelButtonText=n.cancelButtonText),new Promise((o,r)=>{this.resolve=o,this.reject=r})}Save(){return this.Show({text:"У вас есть несохранённые изменения",confirmButtonText:"Сохранить",cancelButtonText:"Не сохранять"})}Submit(){this.resolve(!0),this.hide()}Cancel(){this.reject(),this.hide()}hide(){this.resolve=void 0,this.reject=void 0,super.hide()}}const af=new sf;class lf extends jr{Show(){super.show()}Hide(){super.hide()}}const cf=new lf,df=Object.freeze(Object.defineProperty({__proto__:null,Admin:rf,Btn:Ge,Dialog:af,Loading:cf,Notify:kt},Symbol.toStringTag,{value:"Module"}));let uf=class{async Login(e){const n=e??S.Auth.Form.GetValues(),o=await le.Post({query:"auth/login",payload:n});if(!o)throw S.UI.Notify.Error("Ошибка авторизации"),"Ошибка авторизации";S.Auth.Status.SetState(o)}async LoginAs(e){if(!await le.Post({query:"auth/login-as",payload:{email:e}})){S.UI.Notify.Error("Ошибка авторизации");return}}async Register(){}async RestorePassword(){}async passwordChange(){await le.Put({query:"auth/password-change"})}async RefreshToken(){await le.Post({query:"auth/refresh-token",payload:{refreshToken:Rt.getRefreshToken()}})}async CheckUuid(e){await le.Get({query:`auth/check-uuid/${e.userId}/${e.uniqueId}`})}};const hf=new uf;class yi{constructor(e){d(this,"id");d(this,"address");d(this,"description");V.BuildClass(this,e)}}class Hs{constructor(e){d(this,"id");d(this,"address");d(this,"description");V.BuildClass(this,e)}}var ff=Object.defineProperty,gn=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&ff(e,n,r),r};const At=class ba{constructor(e){d(this,"id");d(this,"description","");d(this,"time","");d(this,"latitude","");d(this,"longitude","");d(this,"emails",[]);d(this,"postAddresses",[new yi]);d(this,"phones",[]);d(this,"websites",[]);V.BuildClass(this,e)}addEmail(){const e=Ze.Create();return e.contactId=this.id,this.emails.push(e),e}addPhone(){const e=Xe.Create();return e.contactId=this.id,this.phones.push(e),e}static Create(){const e=new ba;return e.id=ve.UUID(),e}removeEmail(e){V.RemoveFromClassById(e,this.emails)}removePhone(e){V.RemoveFromClassById(e,this.phones)}addPostAddress(){this.postAddresses.push(new yi)}addWebsite(){this.websites.push(new Hs)}pushFirst(){this.emails.length||this.emails.push(new Ze),this.phones.length||this.phones.push(new Xe)}getCoords(){return[Number(this.latitude),Number(this.longitude)]}updateDescription(e){this.description=e}updateTime(e){this.time=e}updateLatitude(e){this.latitude=e}updateLongitutde(e){this.longitude=e}};gn([V.GetClassConstructor(Ze)],At.prototype,"emails"),gn([V.GetClassConstructor(yi)],At.prototype,"postAddresses"),gn([V.GetClassConstructor(Xe)],At.prototype,"phones"),gn([V.GetClassConstructor(Hs)],At.prototype,"websites");let mf=At,pf=class extends X{constructor(){super(mf,"contacts")}};const gf=new pf;let yf=class{constructor(){d(this,"cropper",new Xt)}Open(e){this.cropper=e}Cropper(){return this.cropper}Ratio(){return this.cropper.ratio}};const wf=new yf;let bf=class extends X{constructor(){super(Ze,"emails")}};const Cf=new bf;let Sf=class extends X{constructor(){super(Be,"file-infos")}};const kf=new Sf;class wi{constructor(e){d(this,"id");d(this,"ftsp");d(this,"name","");V.BuildClass(this,e)}static Create(e){const n=new wi;return n.id=ve.UUID(),n.ftsp=JSON.stringify(e),n}}let Ef=class extends X{constructor(){super(wi,"ftsp-presets")}};const vf=new Ef;let xf=class extends X{constructor(){super(Yr,"humans")}};const Bf=new xf;let Mf=class extends X{constructor(){super(Xe,"phones")}};const If=new Mf;class Rf{constructor(e){d(this,"id");d(this,"nameRus","");V.BuildClass(this,e)}}var $f=Object.defineProperty,Af=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&$f(e,n,r),r};class qs{constructor(e){d(this,"id");d(this,"nameRus","");d(this,"fields",[]);V.BuildClass(this,e)}}Af([V.GetClassConstructor(Rf)],qs.prototype,"fields");let Nf=class extends X{constructor(){super(qs,"schemas")}};const Pf=new Nf;class Us{constructor(e){d(this,"id","");d(this,"value","");d(this,"label","");d(this,"key","");d(this,"description","");d(this,"route","");d(this,"searchElementMetas",[]);V.BuildClass(this,e)}}class Tf{constructor(e){d(this,"id");d(this,"name","");d(this,"label","");V.BuildClass(this,e)}}var zf=Object.defineProperty,Ws=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&zf(e,n,r),r};class ut{constructor(e){d(this,"id");d(this,"key","");d(this,"label","");d(this,"order",0);d(this,"route","");d(this,"table","");d(this,"active",!0);d(this,"searchColumn","");d(this,"descriptionColumn","");d(this,"labelColumn","");d(this,"valueColumn","");d(this,"options",[]);d(this,"searchGroupMetaColumns",[]);V.BuildClass(this,e)}}Ws([V.GetClassConstructor(Us)],ut.prototype,"options"),Ws([V.GetClassConstructor(Tf)],ut.prototype,"searchGroupMetaColumns");class bi{constructor(e){d(this,"query","");d(this,"key","");d(this,"params","");d(this,"suggester",!1);d(this,"mustBeTranslated",!0);d(this,"options",[]);d(this,"searchGroupId","");d(this,"searchGroups",[]);d(this,"searchGroup",new ut);d(this,"searchObjects",[]);d(this,"pagination",new tn);d(this,"count",0);e&&(this.query=e.query,e.searchGroups&&(this.searchGroups=e.searchGroups.map(n=>new ut(n))),e.searchGroup&&(this.searchGroup=new ut(e.searchGroup)),e.options&&(this.options=e.options.map(n=>new Us(n))),this.count=e.count)}toUrl(){return JSON.stringify(this)}async setSearchGroup(e){const n=this.searchGroups.find(o=>o.id===e);n?this.searchGroup=n:this.searchGroup=new ut}async reproduceFromRoute(){this.setQuery(),await this.setSearchGroup(Ke.Route().query.groupId)}setQuery(){const e=Ke.Route().query.query;e&&(this.query=e)}}let Vf=class{constructor(){d(this,"isSearchDrawerOpen",i.ref(!1));d(this,"searchModel",i.reactive(new bi));d(this,"searchGroups",i.reactive([]));d(this,"count",0)}async Search(e){const n=await le.Get({query:`?key=${e.key}&query=${e.query}`});n&&n.searchGroup&&n.searchGroup.options.forEach(o=>{e.searchObjects.push({id:o.id,value:o.value,label:o.label,description:o.description})})}async mainSearch(e){this.SetSearchModel(await le.Get({query:`/main?searchModel=${e.toUrl()}`}))}async Full(e){e.options=[],e.searchGroups.forEach(o=>{o.options=[]});const n=await le.Get({query:`main?searchModel=${e.toUrl()}`});this.SetSearchModel(n)}ToggleDrawer(e){this.isSearchDrawerOpen.value=e,this.searchModel=new bi}SetSearchModel(e){e&&(this.searchModel=new bi(e))}SetSearchGroups(){}IsSearchDrawerOpen(){return this.isSearchDrawerOpen}SearchModel(){return this.searchModel}SearchGroups(){return this.searchGroups}Count(){return this.count}};const Ff=new Vf;class Ci{constructor(e){d(this,"id");d(this,"login","");d(this,"email","");d(this,"password","");V.BuildClass(this,e)}static Create(){const e=new Ci;return e.id=ve.UUID(),e}}let Df=class extends X{constructor(){super(Ci,"users-accounts")}};const Of=new Df;var js=(t=>(t.simple="simple",t.oneToMany="oneToMany",t.manyToMany="manyToMany",t))(js||{});class Gs{constructor(e){d(this,"id");d(this,"name",ue.String);d(this,"valueRelation",js.simple);V.BuildClass(this,e)}isString(){return this.name==="string"}isNumber(){return this.name==="number"}isDate(){return this.name==="date"}isDateTime(){return this.name==="dateTime"}isRadio(){return this.name==="radio"}isSet(){return this.name==="set"}isText(){return this.name==="text"}isBoolean(){return this.name==="boolean"}isFile(){return this.name==="file"}isFiles(){return this.name==="files"}getComponentType(){if(this.name===ue.Radio)return"RadioProp";if(this.name===ue.Set)return"SetProp";if(this.name===ue.Number)return"NumberProp";if(this.name===ue.String)return"StringProp"}}let Lf=class extends X{constructor(){super(Gs,"value-types")}};const _f=new Lf,Hf=Object.freeze(Object.defineProperty({__proto__:null,Auth:hf,Contacts:gf,Cropper:wf,Emails:Cf,FTSPPresets:vf,FileInfos:kf,Humans:Bf,Phones:If,Schemas:Pf,Search:Ff,UserAccounts:Of,ValueTypes:_f},Symbol.toStringTag,{value:"Module"}));class S{}d(S,"Auth",i.reactive(Jr)),d(S,"UI",i.reactive(df)),d(S,"Paginator",i.reactive(Qh)),d(S,"S",Hf),d(S,"H",_),d(S,"C",Jd);class Zs{constructor(e){d(this,"id");d(this,"num","");d(this,"fileInfoId");d(this,"fileInfo",new Be);S.H.Classes.BuildClass(this,e)}}class Nt{constructor(e){d(this,"id");d(this,"passportId");d(this,"fileInfoId");d(this,"fileInfo",new Be);d(this,"order",0);S.H.Classes.BuildClass(this,e)}static Create(e){const n=new Nt;return n.id=S.H.Id.UUID(),n.passportId=e,n}}var qf=Object.defineProperty,Uf=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&qf(e,n,r),r};class Si{constructor(e){d(this,"id");d(this,"num","");d(this,"seria","");d(this,"division","");d(this,"divisionCode","");d(this,"citzenship","");d(this,"date",new Date);d(this,"address","");d(this,"passportScans",[]);S.H.Classes.BuildClass(this,e)}}Uf([S.H.Classes.GetClassConstructor(Nt)],Si.prototype,"passportScans");class Xs{constructor(e){d(this,"id");d(this,"num","");d(this,"fileInfoId");d(this,"fileInfo",new Be);S.H.Classes.BuildClass(this,e)}}const Wf=Object.freeze(Object.defineProperty({__proto__:null,Inn:Zs,Passport:Si,PassportScan:Nt,Snils:Xs},Symbol.toStringTag,{value:"Module"}));let jf=class extends X{constructor(){super(Zs,"inns")}};const Gf=new jf;let Zf=class extends X{constructor(){super(Nt,"passport-scans")}};const Xf=new Zf;let Jf=class extends X{constructor(){super(Si,"passports")}};const Yf=new Jf;let Qf=class extends X{constructor(){super(Xs,"snilss")}};const Kf=new Qf,em=Object.freeze(Object.defineProperty({__proto__:null,C:Wf,S:Object.freeze(Object.defineProperty({__proto__:null,Inns:Gf,PassportScans:Xf,Passports:Yf,Snilss:Kf},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class et{constructor(e){d(this,"id");d(this,"name","");d(this,"score",0);d(this,"order",0);d(this,"showMoreQuestions",!1);d(this,"showOther",!1);d(this,"fieldId");d(this,"isMatrixY",!1);S.H.Classes.BuildClass(this,e)}static Create(e){const n=new et;return n.id=S.H.Id.UUID(),n.fieldId=e,n}}class Js{constructor(e){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"fieldId");S.H.Classes.BuildClass(this,e)}}class ki{constructor(e){d(this,"id");d(this,"name","");d(this,"order",0);S.H.Classes.BuildClass(this,e)}}class ht{constructor(e){d(this,"id");d(this,"name","");d(this,"fieldId");S.H.Classes.BuildClass(this,e)}static Create(e){const n=new ht;return n.id=S.H.Id.UUID(),n.fieldId=e,n}}var tm=Object.defineProperty,Pt=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&tm(e,n,r),r};const tt=class En{constructor(e){d(this,"id");d(this,"name","");d(this,"code","");d(this,"valueTypeId");d(this,"order",0);d(this,"ageCompare",!1);d(this,"answerVariants",[]);d(this,"answerVariantsForDelete",[]);d(this,"fieldExamples",[]);d(this,"fieldVariants",[]);d(this,"valueType",new Gs);d(this,"fieldMeasures",[]);d(this,"showSet",!1);d(this,"showRadio",!1);d(this,"isEdit",!1);d(this,"children",[]);d(this,"parentId");d(this,"formSectionId");d(this,"selected",!1);S.H.Classes.BuildClass(this,e),this.changeRelation([this.valueType])}getMatrixX(){return this.answerVariants.filter(e=>!e.isMatrixY)}getMatrixY(){return this.answerVariants.filter(e=>e.isMatrixY)}static Create(e){const n=new En;return n.id=S.H.Id.UUID(),n.formSectionId=e,n}getRegisterPropertyRadioOriginalValue(e){const n=this.answerVariants.find(o=>o.id===e);return n?n.name:""}addRadioItem(e){const n=new et(e);n.order=this.answerVariants.length,this.answerVariants.push(n)}removeRadioItem(e){const n=this.answerVariants[e].id;n&&this.answerVariantsForDelete.push(n),this.answerVariants.splice(e,1)}changeRelation(e){const n=e.find(o=>o.id===this.valueTypeId);if(n){if(n.isRadio()){this.showRadio=!0,this.showSet=!1;return}if(n.isSet()){this.showSet=!0,this.showRadio=!1;return}this.showSet=!1,this.showRadio=!1,this.valueType=n}}editRegisterProperty(e){this.isEdit=e??!this.isEdit}sortExamples(){this.fieldExamples.forEach((e,n)=>e.order=n)}addRegisterPropertyMeasure(e){this.fieldMeasures.push(new ki(e))}addRegisterPropertyVariant(){this.fieldVariants.push(new ht)}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}static GetClassName(){return"Field"}setType(e){this.valueType=e,this.valueTypeId=e.id}setName(e){this.name=e}addAnswerVariant(){const e=et.Create(this.id);return e.name="Вариант",e.order=this.answerVariants.length,this.answerVariants.push(e),e}addChild(){const e=En.Create();return e.parentId=this.id,e.name="Вопрос",e.order=this.children.length,this.children.push(e),e}addFieldVariant(){const e=ht.Create(this.id);return this.fieldVariants.push(e),e}copy(){const e=new En(this);return e.id=S.H.Id.UUID(),e.answerVariants.forEach(n=>{n.id=S.H.Id.UUID(),n.fieldId=e.id}),e.children=e.children.map(n=>{const o=n.copy();return o.parentId=e.id,o}),e}};Pt([S.H.Classes.GetClassConstructor(et)],tt.prototype,"answerVariants"),Pt([S.H.Classes.GetClassConstructor(Js)],tt.prototype,"fieldExamples"),Pt([S.H.Classes.GetClassConstructor(ht)],tt.prototype,"fieldVariants"),Pt([S.H.Classes.GetClassConstructor(ki)],tt.prototype,"fieldMeasures"),Pt([S.H.Classes.GetClassConstructor(tt)],tt.prototype,"children");let yn=tt;class Ei{constructor(e){d(this,"id");d(this,"answerId");d(this,"comment","");d(this,"fileInfoId");d(this,"fileInfo",new Be);S.H.Classes.BuildClass(this,e)}}class nt{constructor(e){d(this,"id");d(this,"answerVariantId");d(this,"answerVariantIdY");d(this,"fieldFillId");S.H.Classes.BuildClass(this,e)}static Create(e,n){const o=new nt;return o.id=De(),o.fieldFillId=e,o.answerVariantId=n,o}static GetClassName(){return"selectedAnswerVariant"}}var nm=Object.defineProperty,Ys=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&nm(e,n,r),r};const vi=class Ri{constructor(e){d(this,"id");d(this,"valueString");d(this,"valueOther");d(this,"valueNumber");d(this,"valueDate");d(this,"fileInfo",new Be);d(this,"fileInfoId");d(this,"order",0);d(this,"selectedAnswerVariants",[]);d(this,"patientId");d(this,"fieldId");d(this,"formFillId");d(this,"answerVariantId");d(this,"filled",!1);d(this,"researchResultId");d(this,"answerFiles",[]);d(this,"answerFilesForDelete",[]);S.H.Classes.BuildClass(this,e)}setFilled(e){this.filled=e}static Create(e,n){const o=new Ri;return o.id=De(),o.fieldId=e.id,o.formFillId=n,o.order=e.order,o.valueNumber=0,o.valueString="",o.valueDate=new Date,o}setString(e){this.valueString=e,this.valueString&&(this.filled=this.valueString.length>0)}setNumber(e){this.valueNumber=e,this.valueNumber&&(this.filled=!0)}setOther(e){this.valueOther=e,this.valueOther&&(this.filled=this.valueOther.length>0)}setDate(e){this.valueDate=e,this.filled=!0}setRadio(e){this.answerVariantId=e,this.filled=!!this.answerVariantId}static CreateMany(e,n){return e.map(o=>Ri.Create(o,n))}addFile(){const e=new Ei;return e.id=De(),e.answerId=this.id,this.answerFiles.push(e),e}getFileInfos(){const e=[];return this.answerFiles.forEach(n=>e.push(n.fileInfo)),e}getSelectedAnswerVariant(){return!0}setMatrixRadioValue(e,n){const o=nt.Create(this.id,e);return o.answerVariantIdY=n,this.selectedAnswerVariants.push(o),this.filled=!0,o}getMatrixValue(e,n){return this.selectedAnswerVariants.find(o=>o.answerVariantId===e&&o.answerVariantIdY===n)}addSelectedAnswerVariant(e){const n=nt.Create(this.id,e);return this.selectedAnswerVariants.push(n),this.filled=!0,n}static GetClassName(){return"answer"}showOther(e){const n=e.find(o=>o.showOther);return n?this.answerVariantId===n.id||this.selectedAnswerVariants.some(o=>o.answerVariantId===n.id):!1}};Ys([S.H.Classes.GetClassConstructor(nt)],vi.prototype,"selectedAnswerVariants"),Ys([S.H.Classes.GetClassConstructor(Ei)],vi.prototype,"answerFiles");let ft=vi;class im{constructor(e){d(this,"id");d(this,"fieldId");S.H.Classes.BuildClass(this,e)}static GetClassName(){return"fieldFilter"}}var om=Object.defineProperty,rm=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&om(e,n,r),r};const Qs=class Ca{constructor(e){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"fields",[]);d(this,"formId");S.H.Classes.BuildClass(this,e)}static GetClassName(){return"formSection"}getN(){return`${this.order+1}`}getFieldN(e){return`${this.getN()}.${e+1}`}getSubFieldN(e,n){return`${this.getFieldN(e)}.${n+1}`}static Create(e){const n=new Ca;return n.id=S.H.Id.UUID(),n.formId=e,n}addField(){const e=yn.Create(this.id);return this.fields.push(e),this.sortFields(),e}sortFields(){this.fields.forEach((e,n)=>e.order=n)}getAnswerVariants(){const e=[];return this.fields.forEach(n=>e.push(...n.answerVariants)),e}};rm([S.H.Classes.GetClassConstructor(yn)],Qs.prototype,"fields");let wn=Qs;var sm=Object.defineProperty,am=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&sm(e,n,r),r};const Ks=class Sa{constructor(e){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"isLaboratory",!1);d(this,"formSections",[]);d(this,"isEdit",!1);d(this,"withDates",!1);d(this,"withScores",!1);d(this,"selectedForExport",!1);d(this,"filterString","");d(this,"showOnlyNotFilled",!1);d(this,"showOnlyFilled",!1);S.H.Classes.BuildClass(this,e)}static GetClassName(){return"Form"}static Create(){const e=new Sa;return e.id=S.H.Id.UUID(),e}editRegisterGroup(e){this.isEdit=e??!this.isEdit}addFormSection(){const e=wn.Create(this.id);return this.formSections.push(e),S.H.Sorter.Sort(this.formSections),e}getFields(){const e=this.formSections.map(o=>o.fields).flat(),n=e.map(o=>o.children).flat();return e.concat(n).filter(o=>o.children.length===0)}};am([S.H.Classes.GetClassConstructor(wn)],Ks.prototype,"formSections");let ea=Ks;var lm=Object.defineProperty,cm=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&lm(e,n,r),r};const ta=class ka{constructor(e){d(this,"id");d(this,"date",new Date);d(this,"editMode",!1);d(this,"userFormId");d(this,"fillingPercentage",0);d(this,"fieldFills",[]);d(this,"num","");d(this,"formId");S.H.Classes.BuildClass(this,e)}static Create(e){const n=new ka;return n.id=S.H.Id.UUID(),n.formId=e.id,n.fieldFills.push(...ft.CreateMany(e.getFields(),n.id)),n}addFieldFill(e){this.fieldFills.push(e)}getFieldFill(e){var n;return(n=this.fieldFills)==null?void 0:n.find(o=>o.fieldId===e)}pushRegisterProperty(e){const n=new ft;n.researchResultId=e,this.fieldFills.push(n)}getRegisterPropertyToPatient(e){return this.fieldFills.filter(n=>n.researchResultId===e)}getOrCreateFieldFill(e){let n=this.getFieldFill(e.id);return n||(n=ft.Create(e),this.addFieldFill(n)),n}getFileInfos(){const e=[];return this.fieldFills.forEach(n=>e.push(...n.getFileInfos())),e}calculateFilling(){const e=this.fieldFills.filter(o=>o.filled).length,n=this.fieldFills.length;this.fillingPercentage=Math.round(e/n*100)}getFieldFillByFieldId(e){return this.fieldFills.find(n=>n.fieldId===e)}getFieldVariantFieldFill(e){return this.fieldFills.find(n=>n.answerVariantId===e)}getFieldsFieldFillsMap(e){const n={};return e.forEach(o=>{var r;if(o.code){const s=(r=this.getFieldFillByFieldId(o.id))==null?void 0:r.valueNumber;n[o.code]=s}}),n}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}};cm([S.H.Classes.GetClassConstructor(ft)],ta.prototype,"fieldFills");let na=ta;const dm=Object.freeze(Object.defineProperty({__proto__:null,AnswerVariant:et,Field:yn,FieldExample:Js,FieldFill:ft,FieldFillFile:Ei,FieldFilter:im,FieldMeasure:ki,FieldVariant:ht,Form:ea,FormFill:na,FormSection:wn,SelectedAnswerVariant:nt},Symbol.toStringTag,{value:"Module"}));let um=class extends X{constructor(){super(et,"answer-variants")}};const hm=new um;let fm=class extends X{constructor(){super(ft,"field-fills")}};const mm=new fm;let pm=class extends X{constructor(){super(yn,"fields")}};const gm=new pm;let ym=class extends X{constructor(){super(na,"form-fills")}};const wm=new ym;let bm=class extends X{constructor(){super(wn,"form-sections")}};const Cm=new bm;let Sm=class extends X{constructor(){super(ea,"forms")}};const km=new Sm;let Em=class extends X{constructor(){super(nt,"selected-answer-variants")}};const vm=new Em,xm=Object.freeze(Object.defineProperty({__proto__:null,C:dm,S:Object.freeze(Object.defineProperty({__proto__:null,AnswerVariants:hm,FieldFills:mm,Fields:gm,FormFills:wm,FormSections:Cm,Forms:km,SelectedAnswerVariants:vm},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class bn{constructor(e){d(this,"id");d(this,"name","");d(this,"label","");S.H.Classes.BuildClass(this,e)}static Create(e,n){const o=new bn;return o.id=S.H.Id.UUID(),o.name=e,o.label=n,o}}const Bm=Object.freeze(Object.defineProperty({__proto__:null,ColorTheme:bn},Symbol.toStringTag,{value:"Module"}));class Mm extends X{constructor(){super(bn,"color-themes")}}const Im=new Mm,Rm=Object.freeze(Object.defineProperty({__proto__:null,Docs:em,Forms:xm,Settings:Object.freeze(Object.defineProperty({__proto__:null,C:Bm,S:Object.freeze(Object.defineProperty({__proto__:null,ColorThemes:Im},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),$m={install:function(t){t.component("PButton",Pi),t.component("PCheckBox",Ti),t.component("PDatePicker",zi),t.component("PFlex",Vi),t.component("PInput",Hi),t.component("PInputDate",qi),t.component("PInputNumber",Ui),t.component("PLeftSlider",Wi),t.component("PList",ji),t.component("PListItem",Gi),t.component("PRadio",Zi),t.component("PRightSlider",Xi),t.component("PSelect",Ji),t.component("PSticky",Yi),t.component("PString",Qi),t.component("PTextarea",Ki),t.component("PTopSlider",eo),t.component("IconDownload",bo),t.component("IconFilter",Co),t.component("ArrowLeft",Ro),t.component("ArrowRight",$o),t.component("DoubleArrowLeft",Ao),t.component("DoubleArrowRight",No),t.component("EllipsisSvg",Po),t.component("IconArrowLeft",So),t.component("IconCheckDefault",ko),t.component("IconClose",Ft),t.component("IconEdit",Eo),t.component("IconEmail",vo),t.component("IconMove",xo),t.component("IconPhone",Bo),t.component("IconSearch",Mo),t.component("IconSelectArrow",Io),t.component("CollapseContainer",ur),t.component("CollapseItem",hr),t.component("VerticalCollapseContainer",fr),t.component("PAdd",mr),t.component("PContainer",pr),t.component("PContainerStickyHead",gr),t.component("PDel",yr),t.component("PTabs",Cr),t.component("UploaderFile",Sr),t.component("AuthForm",wr),t.component("PModal",br),t.component("AuthPage",Un),t.component("PageNotFound",Wn),t.component("AdaptiveContainer",$i),t.component("AdaptiveContainerHorizontal",Ai),t.component("AdminGallery",Ni),t.component("AuthModal",to),t.component("CarouselImages",io),t.component("ContextWindow",oo),t.component("DateInputRangeV2",so),t.component("DateInputRange",ro),t.component("DropList",ao),t.component("FilterCheckbox",mo),t.component("FiltersButtonsSelect",po),t.component("FilterSelect",go),t.component("FTSPPanel",yo),t.component("GeneralItem",wo),t.component("GridContainer",Bn),t.component("ImageCropper",ar),t.component("InfoItem",Zt),t.component("InfoItemSelectButtons",lr),t.component("LeftRightContainer",cr),t.component("MessageBody",dr),t.component("PAutocomplete",kr),t.component("PDialog",Er),t.component("PhoneForm",vr),t.component("PLoader",xr),t.component("PNotification",Br),t.component("PPagination",Mr),t.component("RemoteSearch",Ir),t.component("ResearcheContainer",Rr),t.component("RightSliderContainer",$r),t.component("RightTabsContainer",Ar),t.component("SelectValueType",Nr),t.component("SingleNameToggleForm",Pr),t.component("SortList",zr),t.component("SortSelect",Vr),t.component("Switch3Pos",Fr),t.component("ThemeWrapper",Dr),t.component("ToggleInfoItem",Or),t.component("TopSliderContainer",Lr),t.component("UploaderImage",_r)}},Am=["PF","PFM"];v.AdaptiveContainer=$i,v.AdaptiveContainerHorizontal=Ai,v.AdminGallery=Ni,v.ArrowLeft=Ro,v.ArrowRight=$o,v.AuthForm=wr,v.AuthModal=to,v.AuthPage=Un,v.CarouselImages=io,v.CollapseContainer=ur,v.CollapseItem=hr,v.ContextWindow=oo,v.DateInputRange=ro,v.DateInputRange_v2=so,v.DoubleArrowLeft=Ao,v.DoubleArrowRight=No,v.DropList=ao,v.EllipsisSvg=Po,v.FTSPPanel=yo,v.FilterCheckbox=mo,v.FilterSelect=go,v.FiltersButtonsSelect=po,v.GeneralItem=wo,v.GridContainer=Bn,v.IconArrowLeft=So,v.IconCheckDefault=ko,v.IconClose=Ft,v.IconDownload=bo,v.IconEdit=Eo,v.IconEmail=vo,v.IconFilter=Co,v.IconMove=xo,v.IconPhone=Bo,v.IconSearch=Mo,v.IconSelectArrow=Io,v.ImageCropper=ar,v.InfoItem=Zt,v.InfoItemSelectButtons=lr,v.LeftRightContainer=cr,v.MessageBody=dr,v.PAdd=mr,v.PAutocomplete=kr,v.PButton=Pi,v.PCheckBox=Ti,v.PContainer=pr,v.PContainerStickyHead=gr,v.PDatePicker=zi,v.PDel=yr,v.PDialog=Er,v.PF=S,v.PFM=Rm,v.PFlex=Vi,v.PInput=Hi,v.PInputDate=qi,v.PInputNumber=Ui,v.PLeftSlider=Wi,v.PList=ji,v.PListItem=Gi,v.PLoader=xr,v.PModal=br,v.PNotification=Br,v.PPagination=Mr,v.PRadio=Zi,v.PRightSlider=Xi,v.PSelect=Ji,v.PSticky=Yi,v.PString=Qi,v.PTabs=Cr,v.PTextarea=Ki,v.PTopSlider=eo,v.PageNotFound=Wn,v.PhoneForm=vr,v.RemoteSearch=Ir,v.ResearcheContainer=Rr,v.RightSliderContainer=$r,v.RightTabsContainer=Ar,v.SelectValueType=Nr,v.SingleNameToggleForm=Pr,v.SortList=zr,v.SortSelect=Vr,v.Switch3Pos=Fr,v.ThemeWrapper=Dr,v.ToggleInfoItem=Or,v.TopSliderContainer=Lr,v.UploaderFile=Sr,v.UploaderImage=_r,v.VerticalCollapseContainer=fr,v.pfName=Am,v.servicesComponents=$m,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
|