@emailmaker/filemanager 0.10.0 → 0.10.1

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.
@@ -6,7 +6,7 @@ import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import*as r from
6
6
  * Released under MIT license <https://lodash.com/license>
7
7
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
8
8
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
9
- */var Pr=(Ir||(Ir=1,function(e,t){(function(){var n,r="Expected a function",i="__lodash_hash_undefined__",o="__lodash_placeholder__",a=32,s=128,l=256,c=1/0,u=9007199254740991,h=NaN,d=4294967295,f=[["ary",s],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",a],["partialRight",64],["rearg",l]],p="[object Arguments]",g="[object Array]",m="[object Boolean]",v="[object Date]",b="[object Error]",y="[object Function]",w="[object GeneratorFunction]",x="[object Map]",_="[object Number]",C="[object Object]",S="[object Promise]",A="[object RegExp]",k="[object Set]",T="[object String]",I="[object Symbol]",O="[object WeakMap]",E="[object ArrayBuffer]",P="[object DataView]",M="[object Float32Array]",F="[object Float64Array]",j="[object Int8Array]",R="[object Int16Array]",D="[object Int32Array]",L="[object Uint8Array]",N="[object Uint8ClampedArray]",z="[object Uint16Array]",B="[object Uint32Array]",V=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,$=RegExp(W.source),G=RegExp(Y.source),X=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,q=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ee=/[\\^$.*+?()[\]{}|]/g,te=RegExp(ee.source),ne=/^\s+/,re=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oe=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,se=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,ue=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,fe=/^0b[01]+$/i,pe=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,ye=/['\n\r\u2028\u2029\\]/g,we="\\ud800-\\udfff",xe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",_e="\\u2700-\\u27bf",Ce="a-z\\xdf-\\xf6\\xf8-\\xff",Se="A-Z\\xc0-\\xd6\\xd8-\\xde",Ae="\\ufe0e\\ufe0f",ke="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Te="['’]",Ie="["+we+"]",Oe="["+ke+"]",Ee="["+xe+"]",Pe="\\d+",Me="["+_e+"]",Fe="["+Ce+"]",je="[^"+we+ke+Pe+_e+Ce+Se+"]",Re="\\ud83c[\\udffb-\\udfff]",De="[^"+we+"]",Le="(?:\\ud83c[\\udde6-\\uddff]){2}",Ne="[\\ud800-\\udbff][\\udc00-\\udfff]",ze="["+Se+"]",Be="\\u200d",Ve="(?:"+Fe+"|"+je+")",Ue="(?:"+ze+"|"+je+")",He="(?:['’](?:d|ll|m|re|s|t|ve))?",We="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ye="(?:"+Ee+"|"+Re+")?",$e="["+Ae+"]?",Ge=$e+Ye+"(?:"+Be+"(?:"+[De,Le,Ne].join("|")+")"+$e+Ye+")*",Xe="(?:"+[Me,Le,Ne].join("|")+")"+Ge,Ke="(?:"+[De+Ee+"?",Ee,Le,Ne,Ie].join("|")+")",qe=RegExp(Te,"g"),Ze=RegExp(Ee,"g"),Je=RegExp(Re+"(?="+Re+")|"+Ke+Ge,"g"),Qe=RegExp([ze+"?"+Fe+"+"+He+"(?="+[Oe,ze,"$"].join("|")+")",Ue+"+"+We+"(?="+[Oe,ze+Ve,"$"].join("|")+")",ze+"?"+Ve+"+"+He,ze+"+"+We,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Pe,Xe].join("|"),"g"),et=RegExp("["+Be+we+xe+Ae+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,it={};it[M]=it[F]=it[j]=it[R]=it[D]=it[L]=it[N]=it[z]=it[B]=!0,it[p]=it[g]=it[E]=it[m]=it[P]=it[v]=it[b]=it[y]=it[x]=it[_]=it[C]=it[A]=it[k]=it[T]=it[O]=!1;var ot={};ot[p]=ot[g]=ot[E]=ot[P]=ot[m]=ot[v]=ot[M]=ot[F]=ot[j]=ot[R]=ot[D]=ot[x]=ot[_]=ot[C]=ot[A]=ot[k]=ot[T]=ot[I]=ot[L]=ot[N]=ot[z]=ot[B]=!0,ot[b]=ot[y]=ot[O]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},st=parseFloat,lt=parseInt,ct="object"==typeof nr&&nr&&nr.Object===Object&&nr,ut="object"==typeof self&&self&&self.Object===Object&&self,ht=ct||ut||Function("return this")(),dt=t&&!t.nodeType&&t,ft=dt&&e&&!e.nodeType&&e,pt=ft&&ft.exports===dt,gt=pt&&ct.process,mt=function(){try{var e=ft&&ft.require&&ft.require("util").types;return e||gt&&gt.binding&&gt.binding("util")}catch(e){}}(),vt=mt&&mt.isArrayBuffer,bt=mt&&mt.isDate,yt=mt&&mt.isMap,wt=mt&&mt.isRegExp,xt=mt&&mt.isSet,_t=mt&&mt.isTypedArray;function Ct(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function St(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function At(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function kt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Tt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function It(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Ot(e,t){return!(null==e||!e.length)&&zt(e,t,0)>-1}function Et(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Pt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Mt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Ft(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function jt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Rt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Dt=Ht("length");function Lt(e,t,n){var r;return n(e,function(e,n,i){if(t(e,n,i))return r=n,!1}),r}function Nt(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function zt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Nt(e,Vt,n)}function Bt(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Vt(e){return e!=e}function Ut(e,t){var n=null==e?0:e.length;return n?$t(e,t)/n:h}function Ht(e){return function(t){return null==t?n:t[e]}}function Wt(e){return function(t){return null==e?n:e[t]}}function Yt(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}function $t(e,t){for(var r,i=-1,o=e.length;++i<o;){var a=t(e[i]);a!==n&&(r=r===n?a:r+a)}return r}function Gt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Xt(e){return e?e.slice(0,dn(e)+1).replace(ne,""):e}function Kt(e){return function(t){return e(t)}}function qt(e,t){return Pt(t,function(t){return e[t]})}function Zt(e,t){return e.has(t)}function Jt(e,t){for(var n=-1,r=e.length;++n<r&&zt(t,e[n],0)>-1;);return n}function Qt(e,t){for(var n=e.length;n--&&zt(t,e[n],0)>-1;);return n}var en=Wt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),tn=Wt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function nn(e){return"\\"+at[e]}function rn(e){return et.test(e)}function on(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function an(e,t){return function(n){return e(t(n))}}function sn(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var s=e[n];s!==t&&s!==o||(e[n]=o,a[i++]=n)}return a}function ln(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function cn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function un(e){return rn(e)?function(e){for(var t=Je.lastIndex=0;Je.test(e);)++t;return t}(e):Dt(e)}function hn(e){return rn(e)?function(e){return e.match(Je)||[]}(e):function(e){return e.split("")}(e)}function dn(e){for(var t=e.length;t--&&re.test(e.charAt(t)););return t}var fn=Wt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),pn=function e(t){var re,we=(t=null==t?ht:pn.defaults(ht.Object(),t,pn.pick(ht,nt))).Array,xe=t.Date,_e=t.Error,Ce=t.Function,Se=t.Math,Ae=t.Object,ke=t.RegExp,Te=t.String,Ie=t.TypeError,Oe=we.prototype,Ee=Ce.prototype,Pe=Ae.prototype,Me=t["__core-js_shared__"],Fe=Ee.toString,je=Pe.hasOwnProperty,Re=0,De=(re=/[^.]+$/.exec(Me&&Me.keys&&Me.keys.IE_PROTO||""))?"Symbol(src)_1."+re:"",Le=Pe.toString,Ne=Fe.call(Ae),ze=ht._,Be=ke("^"+Fe.call(je).replace(ee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ve=pt?t.Buffer:n,Ue=t.Symbol,He=t.Uint8Array,We=Ve?Ve.allocUnsafe:n,Ye=an(Ae.getPrototypeOf,Ae),$e=Ae.create,Ge=Pe.propertyIsEnumerable,Xe=Oe.splice,Ke=Ue?Ue.isConcatSpreadable:n,Je=Ue?Ue.iterator:n,et=Ue?Ue.toStringTag:n,at=function(){try{var e=uo(Ae,"defineProperty");return e({},"",{}),e}catch(e){}}(),ct=t.clearTimeout!==ht.clearTimeout&&t.clearTimeout,ut=xe&&xe.now!==ht.Date.now&&xe.now,dt=t.setTimeout!==ht.setTimeout&&t.setTimeout,ft=Se.ceil,gt=Se.floor,mt=Ae.getOwnPropertySymbols,Dt=Ve?Ve.isBuffer:n,Wt=t.isFinite,gn=Oe.join,mn=an(Ae.keys,Ae),vn=Se.max,bn=Se.min,yn=xe.now,wn=t.parseInt,xn=Se.random,_n=Oe.reverse,Cn=uo(t,"DataView"),Sn=uo(t,"Map"),An=uo(t,"Promise"),kn=uo(t,"Set"),Tn=uo(t,"WeakMap"),In=uo(Ae,"create"),On=Tn&&new Tn,En={},Pn=Lo(Cn),Mn=Lo(Sn),Fn=Lo(An),jn=Lo(kn),Rn=Lo(Tn),Dn=Ue?Ue.prototype:n,Ln=Dn?Dn.valueOf:n,Nn=Dn?Dn.toString:n;function zn(e){if(es(e)&&!Ha(e)&&!(e instanceof Hn)){if(e instanceof Un)return e;if(je.call(e,"__wrapped__"))return No(e)}return new Un(e)}var Bn=function(){function e(){}return function(t){if(!Qa(t))return{};if($e)return $e(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function Vn(){}function Un(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function Hn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Yn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $n(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new $n;++t<n;)this.add(e[t])}function Xn(e){var t=this.__data__=new Yn(e);this.size=t.size}function Kn(e,t){var n=Ha(e),r=!n&&Ua(e),i=!n&&!r&&Ga(e),o=!n&&!r&&!i&&ls(e),a=n||r||i||o,s=a?Gt(e.length,Te):[],l=s.length;for(var c in e)!t&&!je.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||bo(c,l))||s.push(c);return s}function qn(e){var t=e.length;return t?e[Gr(0,t-1)]:n}function Zn(e,t){return jo(Ii(e),ar(t,0,e.length))}function Jn(e){return jo(Ii(e))}function Qn(e,t,r){(r!==n&&!za(e[t],r)||r===n&&!(t in e))&&ir(e,t,r)}function er(e,t,r){var i=e[t];je.call(e,t)&&za(i,r)&&(r!==n||t in e)||ir(e,t,r)}function tr(e,t){for(var n=e.length;n--;)if(za(e[n][0],t))return n;return-1}function nr(e,t,n,r){return hr(e,function(e,i,o){t(r,e,n(e),o)}),r}function rr(e,t){return e&&Oi(t,Es(t),e)}function ir(e,t,n){"__proto__"==t&&at?at(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function or(e,t){for(var r=-1,i=t.length,o=we(i),a=null==e;++r<i;)o[r]=a?n:As(e,t[r]);return o}function ar(e,t,r){return e==e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function sr(e,t,r,i,o,a){var s,l=1&t,c=2&t,u=4&t;if(r&&(s=o?r(e,i,o,a):r(e)),s!==n)return s;if(!Qa(e))return e;var h=Ha(e);if(h){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&je.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!l)return Ii(e,s)}else{var d=po(e),f=d==y||d==w;if(Ga(e))return _i(e,l);if(d==C||d==p||f&&!o){if(s=c||f?{}:mo(e),!l)return c?function(e,t){return Oi(e,fo(e),t)}(e,function(e,t){return e&&Oi(t,Ps(t),e)}(s,e)):function(e,t){return Oi(e,ho(e),t)}(e,rr(s,e))}else{if(!ot[d])return o?e:{};s=function(e,t,n){var r,i=e.constructor;switch(t){case E:return Ci(e);case m:case v:return new i(+e);case P:return function(e,t){var n=t?Ci(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case M:case F:case j:case R:case D:case L:case N:case z:case B:return Si(e,n);case x:return new i;case _:case T:return new i(e);case A:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case k:return new i;case I:return r=e,Ln?Ae(Ln.call(r)):{}}}(e,d,l)}}a||(a=new Xn);var g=a.get(e);if(g)return g;a.set(e,s),os(e)?e.forEach(function(n){s.add(sr(n,t,r,n,e,a))}):ts(e)&&e.forEach(function(n,i){s.set(i,sr(n,t,r,i,e,a))});var b=h?n:(u?c?ro:no:c?Ps:Es)(e);return At(b||e,function(n,i){b&&(n=e[i=n]),er(s,i,sr(n,t,r,i,e,a))}),s}function lr(e,t,r){var i=r.length;if(null==e)return!i;for(e=Ae(e);i--;){var o=r[i],a=t[o],s=e[o];if(s===n&&!(o in e)||!a(s))return!1}return!0}function cr(e,t,i){if("function"!=typeof e)throw new Ie(r);return Eo(function(){e.apply(n,i)},t)}function ur(e,t,n,r){var i=-1,o=Ot,a=!0,s=e.length,l=[],c=t.length;if(!s)return l;n&&(t=Pt(t,Kt(n))),r?(o=Et,a=!1):t.length>=200&&(o=Zt,a=!1,t=new Gn(t));e:for(;++i<s;){var u=e[i],h=null==n?u:n(u);if(u=r||0!==u?u:0,a&&h==h){for(var d=c;d--;)if(t[d]===h)continue e;l.push(u)}else o(t,h,r)||l.push(u)}return l}zn.templateSettings={escape:X,evaluate:K,interpolate:q,variable:"",imports:{_:zn}},zn.prototype=Vn.prototype,zn.prototype.constructor=zn,Un.prototype=Bn(Vn.prototype),Un.prototype.constructor=Un,Hn.prototype=Bn(Vn.prototype),Hn.prototype.constructor=Hn,Wn.prototype.clear=function(){this.__data__=In?In(null):{},this.size=0},Wn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Wn.prototype.get=function(e){var t=this.__data__;if(In){var r=t[e];return r===i?n:r}return je.call(t,e)?t[e]:n},Wn.prototype.has=function(e){var t=this.__data__;return In?t[e]!==n:je.call(t,e)},Wn.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=In&&t===n?i:t,this},Yn.prototype.clear=function(){this.__data__=[],this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=tr(t,e);return!(n<0||(n==t.length-1?t.pop():Xe.call(t,n,1),--this.size,0))},Yn.prototype.get=function(e){var t=this.__data__,r=tr(t,e);return r<0?n:t[r][1]},Yn.prototype.has=function(e){return tr(this.__data__,e)>-1},Yn.prototype.set=function(e,t){var n=this.__data__,r=tr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},$n.prototype.clear=function(){this.size=0,this.__data__={hash:new Wn,map:new(Sn||Yn),string:new Wn}},$n.prototype.delete=function(e){var t=lo(this,e).delete(e);return this.size-=t?1:0,t},$n.prototype.get=function(e){return lo(this,e).get(e)},$n.prototype.has=function(e){return lo(this,e).has(e)},$n.prototype.set=function(e,t){var n=lo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Gn.prototype.add=Gn.prototype.push=function(e){return this.__data__.set(e,i),this},Gn.prototype.has=function(e){return this.__data__.has(e)},Xn.prototype.clear=function(){this.__data__=new Yn,this.size=0},Xn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Xn.prototype.get=function(e){return this.__data__.get(e)},Xn.prototype.has=function(e){return this.__data__.has(e)},Xn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Yn){var r=n.__data__;if(!Sn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new $n(r)}return n.set(e,t),this.size=n.size,this};var hr=Mi(yr),dr=Mi(wr,!0);function fr(e,t){var n=!0;return hr(e,function(e,r,i){return n=!!t(e,r,i)}),n}function pr(e,t,r){for(var i=-1,o=e.length;++i<o;){var a=e[i],s=t(a);if(null!=s&&(l===n?s==s&&!ss(s):r(s,l)))var l=s,c=a}return c}function gr(e,t){var n=[];return hr(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function mr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=vo),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?mr(s,t-1,n,r,i):Mt(i,s):r||(i[i.length]=s)}return i}var vr=Fi(),br=Fi(!0);function yr(e,t){return e&&vr(e,t,Es)}function wr(e,t){return e&&br(e,t,Es)}function xr(e,t){return It(t,function(t){return qa(e[t])})}function _r(e,t){for(var r=0,i=(t=bi(t,e)).length;null!=e&&r<i;)e=e[Do(t[r++])];return r&&r==i?e:n}function Cr(e,t,n){var r=t(e);return Ha(e)?r:Mt(r,n(e))}function Sr(e){return null==e?e===n?"[object Undefined]":"[object Null]":et&&et in Ae(e)?function(e){var t=je.call(e,et),r=e[et];try{e[et]=n;var i=!0}catch(e){}var o=Le.call(e);return i&&(t?e[et]=r:delete e[et]),o}(e):function(e){return Le.call(e)}(e)}function Ar(e,t){return e>t}function kr(e,t){return null!=e&&je.call(e,t)}function Tr(e,t){return null!=e&&t in Ae(e)}function Ir(e,t,r){for(var i=r?Et:Ot,o=e[0].length,a=e.length,s=a,l=we(a),c=1/0,u=[];s--;){var h=e[s];s&&t&&(h=Pt(h,Kt(t))),c=bn(h.length,c),l[s]=!r&&(t||o>=120&&h.length>=120)?new Gn(s&&h):n}h=e[0];var d=-1,f=l[0];e:for(;++d<o&&u.length<c;){var p=h[d],g=t?t(p):p;if(p=r||0!==p?p:0,!(f?Zt(f,g):i(u,g,r))){for(s=a;--s;){var m=l[s];if(!(m?Zt(m,g):i(e[s],g,r)))continue e}f&&f.push(g),u.push(p)}}return u}function Or(e,t,r){var i=null==(e=To(e,t=bi(t,e)))?e:e[Do(Ko(t))];return null==i?n:Ct(i,e,r)}function Er(e){return es(e)&&Sr(e)==p}function Pr(e,t,r,i,o){return e===t||(null==e||null==t||!es(e)&&!es(t)?e!=e&&t!=t:function(e,t,r,i,o,a){var s=Ha(e),l=Ha(t),c=s?g:po(e),u=l?g:po(t),h=(c=c==p?C:c)==C,d=(u=u==p?C:u)==C,f=c==u;if(f&&Ga(e)){if(!Ga(t))return!1;s=!0,h=!1}if(f&&!h)return a||(a=new Xn),s||ls(e)?eo(e,t,r,i,o,a):function(e,t,n,r,i,o,a){switch(n){case P:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case E:return!(e.byteLength!=t.byteLength||!o(new He(e),new He(t)));case m:case v:case _:return za(+e,+t);case b:return e.name==t.name&&e.message==t.message;case A:case T:return e==t+"";case x:var s=on;case k:var l=1&r;if(s||(s=ln),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=eo(s(e),s(t),r,i,o,a);return a.delete(e),u;case I:if(Ln)return Ln.call(e)==Ln.call(t)}return!1}(e,t,c,r,i,o,a);if(!(1&r)){var y=h&&je.call(e,"__wrapped__"),w=d&&je.call(t,"__wrapped__");if(y||w){var S=y?e.value():e,O=w?t.value():t;return a||(a=new Xn),o(S,O,r,i,a)}}return!!f&&(a||(a=new Xn),function(e,t,r,i,o,a){var s=1&r,l=no(e),c=l.length,u=no(t),h=u.length;if(c!=h&&!s)return!1;for(var d=c;d--;){var f=l[d];if(!(s?f in t:je.call(t,f)))return!1}var p=a.get(e),g=a.get(t);if(p&&g)return p==t&&g==e;var m=!0;a.set(e,t),a.set(t,e);for(var v=s;++d<c;){var b=e[f=l[d]],y=t[f];if(i)var w=s?i(y,b,f,t,e,a):i(b,y,f,e,t,a);if(!(w===n?b===y||o(b,y,r,i,a):w)){m=!1;break}v||(v="constructor"==f)}if(m&&!v){var x=e.constructor,_=t.constructor;x==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof x&&x instanceof x&&"function"==typeof _&&_ instanceof _||(m=!1)}return a.delete(e),a.delete(t),m}(e,t,r,i,o,a))}(e,t,r,i,Pr,o))}function Mr(e,t,r,i){var o=r.length,a=o,s=!i;if(null==e)return!a;for(e=Ae(e);o--;){var l=r[o];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<a;){var c=(l=r[o])[0],u=e[c],h=l[1];if(s&&l[2]){if(u===n&&!(c in e))return!1}else{var d=new Xn;if(i)var f=i(u,h,c,e,t,d);if(!(f===n?Pr(h,u,3,i,d):f))return!1}}return!0}function Fr(e){return!(!Qa(e)||(t=e,De&&De in t))&&(qa(e)?Be:pe).test(Lo(e));var t}function jr(e){return"function"==typeof e?e:null==e?nl:"object"==typeof e?Ha(e)?Br(e[0],e[1]):zr(e):hl(e)}function Rr(e){if(!Co(e))return mn(e);var t=[];for(var n in Ae(e))je.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Dr(e){if(!Qa(e))return function(e){var t=[];if(null!=e)for(var n in Ae(e))t.push(n);return t}(e);var t=Co(e),n=[];for(var r in e)("constructor"!=r||!t&&je.call(e,r))&&n.push(r);return n}function Lr(e,t){return e<t}function Nr(e,t){var n=-1,r=Ya(e)?we(e.length):[];return hr(e,function(e,i,o){r[++n]=t(e,i,o)}),r}function zr(e){var t=co(e);return 1==t.length&&t[0][2]?Ao(t[0][0],t[0][1]):function(n){return n===e||Mr(n,e,t)}}function Br(e,t){return wo(e)&&So(t)?Ao(Do(e),t):function(r){var i=As(r,e);return i===n&&i===t?ks(r,e):Pr(t,i,3)}}function Vr(e,t,r,i,o){e!==t&&vr(t,function(a,s){if(o||(o=new Xn),Qa(a))!function(e,t,r,i,o,a,s){var l=Io(e,r),c=Io(t,r),u=s.get(c);if(u)Qn(e,r,u);else{var h=a?a(l,c,r+"",e,t,s):n,d=h===n;if(d){var f=Ha(c),p=!f&&Ga(c),g=!f&&!p&&ls(c);h=c,f||p||g?Ha(l)?h=l:$a(l)?h=Ii(l):p?(d=!1,h=_i(c,!0)):g?(d=!1,h=Si(c,!0)):h=[]:rs(c)||Ua(c)?(h=l,Ua(l)?h=ms(l):Qa(l)&&!qa(l)||(h=mo(c))):d=!1}d&&(s.set(c,h),o(h,c,i,a,s),s.delete(c)),Qn(e,r,h)}}(e,t,s,r,Vr,i,o);else{var l=i?i(Io(e,s),a,s+"",e,t,o):n;l===n&&(l=a),Qn(e,s,l)}},Ps)}function Ur(e,t){var r=e.length;if(r)return bo(t+=t<0?r:0,r)?e[t]:n}function Hr(e,t,n){t=t.length?Pt(t,function(e){return Ha(e)?function(t){return _r(t,1===e.length?e[0]:e)}:e}):[nl];var r=-1;t=Pt(t,Kt(so()));var i=Nr(e,function(e,n,i){var o=Pt(t,function(t){return t(e)});return{criteria:o,index:++r,value:e}});return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;++r<a;){var l=Ai(i[r],o[r]);if(l)return r>=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)})}function Wr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=_r(e,a);n(s,a)&&Jr(o,bi(a,e),s)}return o}function Yr(e,t,n,r){var i=r?Bt:zt,o=-1,a=t.length,s=e;for(e===t&&(t=Ii(t)),n&&(s=Pt(e,Kt(n)));++o<a;)for(var l=0,c=t[o],u=n?n(c):c;(l=i(s,u,l,r))>-1;)s!==e&&Xe.call(s,l,1),Xe.call(e,l,1);return e}function $r(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;bo(i)?Xe.call(e,i,1):ui(e,i)}}return e}function Gr(e,t){return e+gt(xn()*(t-e+1))}function Xr(e,t){var n="";if(!e||t<1||t>u)return n;do{t%2&&(n+=e),(t=gt(t/2))&&(e+=e)}while(t);return n}function Kr(e,t){return Po(ko(e,t,nl),e+"")}function qr(e){return qn(zs(e))}function Zr(e,t){var n=zs(e);return jo(n,ar(t,0,n.length))}function Jr(e,t,r,i){if(!Qa(e))return e;for(var o=-1,a=(t=bi(t,e)).length,s=a-1,l=e;null!=l&&++o<a;){var c=Do(t[o]),u=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var h=l[c];(u=i?i(h,c,l):n)===n&&(u=Qa(h)?h:bo(t[o+1])?[]:{})}er(l,c,u),l=l[c]}return e}var Qr=On?function(e,t){return On.set(e,t),e}:nl,ei=at?function(e,t){return at(e,"toString",{configurable:!0,enumerable:!1,value:Qs(t),writable:!0})}:nl;function ti(e){return jo(zs(e))}function ni(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=we(i);++r<i;)o[r]=e[r+t];return o}function ri(e,t){var n;return hr(e,function(e,r,i){return!(n=t(e,r,i))}),!!n}function ii(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!ss(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return oi(e,t,nl,n)}function oi(e,t,r,i){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=r(t))!=t,l=null===t,c=ss(t),u=t===n;o<a;){var h=gt((o+a)/2),d=r(e[h]),f=d!==n,p=null===d,g=d==d,m=ss(d);if(s)var v=i||g;else v=u?g&&(i||f):l?g&&f&&(i||!p):c?g&&f&&!p&&(i||!m):!p&&!m&&(i?d<=t:d<t);v?o=h+1:a=h}return bn(a,4294967294)}function ai(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!za(s,l)){var l=s;o[i++]=0===a?0:a}}return o}function si(e){return"number"==typeof e?e:ss(e)?h:+e}function li(e){if("string"==typeof e)return e;if(Ha(e))return Pt(e,li)+"";if(ss(e))return Nn?Nn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ci(e,t,n){var r=-1,i=Ot,o=e.length,a=!0,s=[],l=s;if(n)a=!1,i=Et;else if(o>=200){var c=t?null:Xi(e);if(c)return ln(c);a=!1,i=Zt,l=new Gn}else l=t?[]:s;e:for(;++r<o;){var u=e[r],h=t?t(u):u;if(u=n||0!==u?u:0,a&&h==h){for(var d=l.length;d--;)if(l[d]===h)continue e;t&&l.push(h),s.push(u)}else i(l,h,n)||(l!==s&&l.push(h),s.push(u))}return s}function ui(e,t){return null==(e=To(e,t=bi(t,e)))||delete e[Do(Ko(t))]}function hi(e,t,n,r){return Jr(e,t,n(_r(e,t)),r)}function di(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ni(e,r?0:o,r?o+1:i):ni(e,r?o+1:0,r?i:o)}function fi(e,t){var n=e;return n instanceof Hn&&(n=n.value()),Ft(t,function(e,t){return t.func.apply(t.thisArg,Mt([e],t.args))},n)}function pi(e,t,n){var r=e.length;if(r<2)return r?ci(e[0]):[];for(var i=-1,o=we(r);++i<r;)for(var a=e[i],s=-1;++s<r;)s!=i&&(o[i]=ur(o[i]||a,e[s],t,n));return ci(mr(o,1),t,n)}function gi(e,t,r){for(var i=-1,o=e.length,a=t.length,s={};++i<o;){var l=i<a?t[i]:n;r(s,e[i],l)}return s}function mi(e){return $a(e)?e:[]}function vi(e){return"function"==typeof e?e:nl}function bi(e,t){return Ha(e)?e:wo(e,t)?[e]:Ro(vs(e))}var yi=Kr;function wi(e,t,r){var i=e.length;return r=r===n?i:r,!t&&r>=i?e:ni(e,t,r)}var xi=ct||function(e){return ht.clearTimeout(e)};function _i(e,t){if(t)return e.slice();var n=e.length,r=We?We(n):new e.constructor(n);return e.copy(r),r}function Ci(e){var t=new e.constructor(e.byteLength);return new He(t).set(new He(e)),t}function Si(e,t){var n=t?Ci(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ai(e,t){if(e!==t){var r=e!==n,i=null===e,o=e==e,a=ss(e),s=t!==n,l=null===t,c=t==t,u=ss(t);if(!l&&!u&&!a&&e>t||a&&s&&c&&!l&&!u||i&&s&&c||!r&&c||!o)return 1;if(!i&&!a&&!u&&e<t||u&&r&&o&&!i&&!a||l&&r&&o||!s&&o||!c)return-1}return 0}function ki(e,t,n,r){for(var i=-1,o=e.length,a=n.length,s=-1,l=t.length,c=vn(o-a,0),u=we(l+c),h=!r;++s<l;)u[s]=t[s];for(;++i<a;)(h||i<o)&&(u[n[i]]=e[i]);for(;c--;)u[s++]=e[i++];return u}function Ti(e,t,n,r){for(var i=-1,o=e.length,a=-1,s=n.length,l=-1,c=t.length,u=vn(o-s,0),h=we(u+c),d=!r;++i<u;)h[i]=e[i];for(var f=i;++l<c;)h[f+l]=t[l];for(;++a<s;)(d||i<o)&&(h[f+n[a]]=e[i++]);return h}function Ii(e,t){var n=-1,r=e.length;for(t||(t=we(r));++n<r;)t[n]=e[n];return t}function Oi(e,t,r,i){var o=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var l=t[a],c=i?i(r[l],e[l],l,r,e):n;c===n&&(c=e[l]),o?ir(r,l,c):er(r,l,c)}return r}function Ei(e,t){return function(n,r){var i=Ha(n)?St:nr,o=t?t():{};return i(n,e,so(r,2),o)}}function Pi(e){return Kr(function(t,r){var i=-1,o=r.length,a=o>1?r[o-1]:n,s=o>2?r[2]:n;for(a=e.length>3&&"function"==typeof a?(o--,a):n,s&&yo(r[0],r[1],s)&&(a=o<3?n:a,o=1),t=Ae(t);++i<o;){var l=r[i];l&&e(t,l,i,a)}return t})}function Mi(e,t){return function(n,r){if(null==n)return n;if(!Ya(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Ae(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Fi(e){return function(t,n,r){for(var i=-1,o=Ae(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===n(o[l],l,o))break}return t}}function ji(e){return function(t){var r=rn(t=vs(t))?hn(t):n,i=r?r[0]:t.charAt(0),o=r?wi(r,1).join(""):t.slice(1);return i[e]()+o}}function Ri(e){return function(t){return Ft(qs(Us(t).replace(qe,"")),e,"")}}function Di(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Bn(e.prototype),r=e.apply(n,t);return Qa(r)?r:n}}function Li(e){return function(t,r,i){var o=Ae(t);if(!Ya(t)){var a=so(r,3);t=Es(t),r=function(e){return a(o[e],e,o)}}var s=e(t,r,i);return s>-1?o[a?t[s]:s]:n}}function Ni(e){return to(function(t){var i=t.length,o=i,a=Un.prototype.thru;for(e&&t.reverse();o--;){var s=t[o];if("function"!=typeof s)throw new Ie(r);if(a&&!l&&"wrapper"==oo(s))var l=new Un([],!0)}for(o=l?o:i;++o<i;){var c=oo(s=t[o]),u="wrapper"==c?io(s):n;l=u&&xo(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?l[oo(u[0])].apply(l,u[3]):1==s.length&&xo(s)?l[c]():l.thru(s)}return function(){var e=arguments,n=e[0];if(l&&1==e.length&&Ha(n))return l.plant(n).value();for(var r=0,o=i?t[r].apply(this,e):n;++r<i;)o=t[r].call(this,o);return o}})}function zi(e,t,r,i,o,a,l,c,u,h){var d=t&s,f=1&t,p=2&t,g=24&t,m=512&t,v=p?n:Di(e);return function s(){for(var b=arguments.length,y=we(b),w=b;w--;)y[w]=arguments[w];if(g)var x=ao(s),_=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(y,x);if(i&&(y=ki(y,i,o,g)),a&&(y=Ti(y,a,l,g)),b-=_,g&&b<h){var C=sn(y,x);return $i(e,t,zi,s.placeholder,r,y,C,c,u,h-b)}var S=f?r:this,A=p?S[e]:e;return b=y.length,c?y=function(e,t){for(var r=e.length,i=bn(t.length,r),o=Ii(e);i--;){var a=t[i];e[i]=bo(a,r)?o[a]:n}return e}(y,c):m&&b>1&&y.reverse(),d&&u<b&&(y.length=u),this&&this!==ht&&this instanceof s&&(A=v||Di(A)),A.apply(S,y)}}function Bi(e,t){return function(n,r){return function(e,t,n,r){return yr(e,function(e,i,o){t(r,n(e),i,o)}),r}(n,e,t(r),{})}}function Vi(e,t){return function(r,i){var o;if(r===n&&i===n)return t;if(r!==n&&(o=r),i!==n){if(o===n)return i;"string"==typeof r||"string"==typeof i?(r=li(r),i=li(i)):(r=si(r),i=si(i)),o=e(r,i)}return o}}function Ui(e){return to(function(t){return t=Pt(t,Kt(so())),Kr(function(n){var r=this;return e(t,function(e){return Ct(e,r,n)})})})}function Hi(e,t){var r=(t=t===n?" ":li(t)).length;if(r<2)return r?Xr(t,e):t;var i=Xr(t,ft(e/un(t)));return rn(t)?wi(hn(i),0,e).join(""):i.slice(0,e)}function Wi(e){return function(t,r,i){return i&&"number"!=typeof i&&yo(t,r,i)&&(r=i=n),t=ds(t),r===n?(r=t,t=0):r=ds(r),function(e,t,n,r){for(var i=-1,o=vn(ft((t-e)/(n||1)),0),a=we(o);o--;)a[r?o:++i]=e,e+=n;return a}(t,r,i=i===n?t<r?1:-1:ds(i),e)}}function Yi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=gs(t),n=gs(n)),e(t,n)}}function $i(e,t,r,i,o,s,l,c,u,h){var d=8&t;t|=d?a:64,4&(t&=~(d?64:a))||(t&=-4);var f=[e,t,o,d?s:n,d?l:n,d?n:s,d?n:l,c,u,h],p=r.apply(n,f);return xo(e)&&Oo(p,f),p.placeholder=i,Mo(p,e,t)}function Gi(e){var t=Se[e];return function(e,n){if(e=gs(e),(n=null==n?0:bn(fs(n),292))&&Wt(e)){var r=(vs(e)+"e").split("e");return+((r=(vs(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Xi=kn&&1/ln(new kn([,-0]))[1]==c?function(e){return new kn(e)}:sl;function Ki(e){return function(t){var n=po(t);return n==x?on(t):n==k?cn(t):function(e,t){return Pt(t,function(t){return[t,e[t]]})}(t,e(t))}}function qi(e,t,i,c,u,h,d,f){var p=2&t;if(!p&&"function"!=typeof e)throw new Ie(r);var g=c?c.length:0;if(g||(t&=-97,c=u=n),d=d===n?d:vn(fs(d),0),f=f===n?f:fs(f),g-=u?u.length:0,64&t){var m=c,v=u;c=u=n}var b=p?n:io(e),y=[e,t,i,c,u,m,v,h,d,f];if(b&&function(e,t){var n=e[1],r=t[1],i=n|r,a=i<131,c=r==s&&8==n||r==s&&n==l&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!a&&!c)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var u=t[3];if(u){var h=e[3];e[3]=h?ki(h,u,t[4]):u,e[4]=h?sn(e[3],o):t[4]}(u=t[5])&&(h=e[5],e[5]=h?Ti(h,u,t[6]):u,e[6]=h?sn(e[5],o):t[6]),(u=t[7])&&(e[7]=u),r&s&&(e[8]=null==e[8]?t[8]:bn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(y,b),e=y[0],t=y[1],i=y[2],c=y[3],u=y[4],!(f=y[9]=y[9]===n?p?0:e.length:vn(y[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||16==t?function(e,t,r){var i=Di(e);return function o(){for(var a=arguments.length,s=we(a),l=a,c=ao(o);l--;)s[l]=arguments[l];var u=a<3&&s[0]!==c&&s[a-1]!==c?[]:sn(s,c);return(a-=u.length)<r?$i(e,t,zi,o.placeholder,n,s,u,n,n,r-a):Ct(this&&this!==ht&&this instanceof o?i:e,this,s)}}(e,t,f):t!=a&&33!=t||u.length?zi.apply(n,y):function(e,t,n,r){var i=1&t,o=Di(e);return function t(){for(var a=-1,s=arguments.length,l=-1,c=r.length,u=we(c+s),h=this&&this!==ht&&this instanceof t?o:e;++l<c;)u[l]=r[l];for(;s--;)u[l++]=arguments[++a];return Ct(h,i?n:this,u)}}(e,t,i,c);else var w=function(e,t,n){var r=1&t,i=Di(e);return function t(){return(this&&this!==ht&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,i);return Mo((b?Qr:Oo)(w,y),e,t)}function Zi(e,t,r,i){return e===n||za(e,Pe[r])&&!je.call(i,r)?t:e}function Ji(e,t,r,i,o,a){return Qa(e)&&Qa(t)&&(a.set(t,e),Vr(e,t,n,Ji,a),a.delete(t)),e}function Qi(e){return rs(e)?n:e}function eo(e,t,r,i,o,a){var s=1&r,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var u=a.get(e),h=a.get(t);if(u&&h)return u==t&&h==e;var d=-1,f=!0,p=2&r?new Gn:n;for(a.set(e,t),a.set(t,e);++d<l;){var g=e[d],m=t[d];if(i)var v=s?i(m,g,d,t,e,a):i(g,m,d,e,t,a);if(v!==n){if(v)continue;f=!1;break}if(p){if(!Rt(t,function(e,t){if(!Zt(p,t)&&(g===e||o(g,e,r,i,a)))return p.push(t)})){f=!1;break}}else if(g!==m&&!o(g,m,r,i,a)){f=!1;break}}return a.delete(e),a.delete(t),f}function to(e){return Po(ko(e,n,Wo),e+"")}function no(e){return Cr(e,Es,ho)}function ro(e){return Cr(e,Ps,fo)}var io=On?function(e){return On.get(e)}:sl;function oo(e){for(var t=e.name+"",n=En[t],r=je.call(En,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function ao(e){return(je.call(zn,"placeholder")?zn:e).placeholder}function so(){var e=zn.iteratee||rl;return e=e===rl?jr:e,arguments.length?e(arguments[0],arguments[1]):e}function lo(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function co(e){for(var t=Es(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,So(i)]}return t}function uo(e,t){var r=function(e,t){return null==e?n:e[t]}(e,t);return Fr(r)?r:n}var ho=mt?function(e){return null==e?[]:(e=Ae(e),It(mt(e),function(t){return Ge.call(e,t)}))}:pl,fo=mt?function(e){for(var t=[];e;)Mt(t,ho(e)),e=Ye(e);return t}:pl,po=Sr;function go(e,t,n){for(var r=-1,i=(t=bi(t,e)).length,o=!1;++r<i;){var a=Do(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Ja(i)&&bo(a,i)&&(Ha(e)||Ua(e))}function mo(e){return"function"!=typeof e.constructor||Co(e)?{}:Bn(Ye(e))}function vo(e){return Ha(e)||Ua(e)||!!(Ke&&e&&e[Ke])}function bo(e,t){var n=typeof e;return!!(t=null==t?u:t)&&("number"==n||"symbol"!=n&&me.test(e))&&e>-1&&e%1==0&&e<t}function yo(e,t,n){if(!Qa(n))return!1;var r=typeof t;return!!("number"==r?Ya(n)&&bo(t,n.length):"string"==r&&t in n)&&za(n[t],e)}function wo(e,t){if(Ha(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ss(e))||J.test(e)||!Z.test(e)||null!=t&&e in Ae(t)}function xo(e){var t=oo(e),n=zn[t];if("function"!=typeof n||!(t in Hn.prototype))return!1;if(e===n)return!0;var r=io(n);return!!r&&e===r[0]}(Cn&&po(new Cn(new ArrayBuffer(1)))!=P||Sn&&po(new Sn)!=x||An&&po(An.resolve())!=S||kn&&po(new kn)!=k||Tn&&po(new Tn)!=O)&&(po=function(e){var t=Sr(e),r=t==C?e.constructor:n,i=r?Lo(r):"";if(i)switch(i){case Pn:return P;case Mn:return x;case Fn:return S;case jn:return k;case Rn:return O}return t});var _o=Me?qa:gl;function Co(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Pe)}function So(e){return e==e&&!Qa(e)}function Ao(e,t){return function(r){return null!=r&&r[e]===t&&(t!==n||e in Ae(r))}}function ko(e,t,r){return t=vn(t===n?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=vn(n.length-t,0),a=we(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=we(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),Ct(e,this,s)}}function To(e,t){return t.length<2?e:_r(e,ni(t,0,-1))}function Io(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Oo=Fo(Qr),Eo=dt||function(e,t){return ht.setTimeout(e,t)},Po=Fo(ei);function Mo(e,t,n){var r=t+"";return Po(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return At(f,function(n){var r="_."+n[0];t&n[1]&&!Ot(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(oe);return t?t[1].split(ae):[]}(r),n)))}function Fo(e){var t=0,r=0;return function(){var i=yn(),o=16-(i-r);if(r=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function jo(e,t){var r=-1,i=e.length,o=i-1;for(t=t===n?i:t;++r<t;){var a=Gr(r,o),s=e[a];e[a]=e[r],e[r]=s}return e.length=t,e}var Ro=function(e){var t=Fa(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Q,function(e,n,r,i){t.push(r?i.replace(ce,"$1"):n||e)}),t});function Do(e){if("string"==typeof e||ss(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Lo(e){if(null!=e){try{return Fe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function No(e){if(e instanceof Hn)return e.clone();var t=new Un(e.__wrapped__,e.__chain__);return t.__actions__=Ii(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var zo=Kr(function(e,t){return $a(e)?ur(e,mr(t,1,$a,!0)):[]}),Bo=Kr(function(e,t){var r=Ko(t);return $a(r)&&(r=n),$a(e)?ur(e,mr(t,1,$a,!0),so(r,2)):[]}),Vo=Kr(function(e,t){var r=Ko(t);return $a(r)&&(r=n),$a(e)?ur(e,mr(t,1,$a,!0),n,r):[]});function Uo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:fs(n);return i<0&&(i=vn(r+i,0)),Nt(e,so(t,3),i)}function Ho(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var o=i-1;return r!==n&&(o=fs(r),o=r<0?vn(i+o,0):bn(o,i-1)),Nt(e,so(t,3),o,!0)}function Wo(e){return null!=e&&e.length?mr(e,1):[]}function Yo(e){return e&&e.length?e[0]:n}var $o=Kr(function(e){var t=Pt(e,mi);return t.length&&t[0]===e[0]?Ir(t):[]}),Go=Kr(function(e){var t=Ko(e),r=Pt(e,mi);return t===Ko(r)?t=n:r.pop(),r.length&&r[0]===e[0]?Ir(r,so(t,2)):[]}),Xo=Kr(function(e){var t=Ko(e),r=Pt(e,mi);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?Ir(r,n,t):[]});function Ko(e){var t=null==e?0:e.length;return t?e[t-1]:n}var qo=Kr(Zo);function Zo(e,t){return e&&e.length&&t&&t.length?Yr(e,t):e}var Jo=to(function(e,t){var n=null==e?0:e.length,r=or(e,t);return $r(e,Pt(t,function(e){return bo(e,n)?+e:e}).sort(Ai)),r});function Qo(e){return null==e?e:_n.call(e)}var ea=Kr(function(e){return ci(mr(e,1,$a,!0))}),ta=Kr(function(e){var t=Ko(e);return $a(t)&&(t=n),ci(mr(e,1,$a,!0),so(t,2))}),na=Kr(function(e){var t=Ko(e);return t="function"==typeof t?t:n,ci(mr(e,1,$a,!0),n,t)});function ra(e){if(!e||!e.length)return[];var t=0;return e=It(e,function(e){if($a(e))return t=vn(e.length,t),!0}),Gt(t,function(t){return Pt(e,Ht(t))})}function ia(e,t){if(!e||!e.length)return[];var r=ra(e);return null==t?r:Pt(r,function(e){return Ct(t,n,e)})}var oa=Kr(function(e,t){return $a(e)?ur(e,t):[]}),aa=Kr(function(e){return pi(It(e,$a))}),sa=Kr(function(e){var t=Ko(e);return $a(t)&&(t=n),pi(It(e,$a),so(t,2))}),la=Kr(function(e){var t=Ko(e);return t="function"==typeof t?t:n,pi(It(e,$a),n,t)}),ca=Kr(ra),ua=Kr(function(e){var t=e.length,r=t>1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,ia(e,r)});function ha(e){var t=zn(e);return t.__chain__=!0,t}function da(e,t){return t(e)}var fa=to(function(e){var t=e.length,r=t?e[0]:0,i=this.__wrapped__,o=function(t){return or(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Hn&&bo(r)?((i=i.slice(r,+r+(t?1:0))).__actions__.push({func:da,args:[o],thisArg:n}),new Un(i,this.__chain__).thru(function(e){return t&&!e.length&&e.push(n),e})):this.thru(o)}),pa=Ei(function(e,t,n){je.call(e,n)?++e[n]:ir(e,n,1)}),ga=Li(Uo),ma=Li(Ho);function va(e,t){return(Ha(e)?At:hr)(e,so(t,3))}function ba(e,t){return(Ha(e)?kt:dr)(e,so(t,3))}var ya=Ei(function(e,t,n){je.call(e,n)?e[n].push(t):ir(e,n,[t])}),wa=Kr(function(e,t,n){var r=-1,i="function"==typeof t,o=Ya(e)?we(e.length):[];return hr(e,function(e){o[++r]=i?Ct(t,e,n):Or(e,t,n)}),o}),xa=Ei(function(e,t,n){ir(e,n,t)});function _a(e,t){return(Ha(e)?Pt:Nr)(e,so(t,3))}var Ca=Ei(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),Sa=Kr(function(e,t){if(null==e)return[];var n=t.length;return n>1&&yo(e,t[0],t[1])?t=[]:n>2&&yo(t[0],t[1],t[2])&&(t=[t[0]]),Hr(e,mr(t,1),[])}),Aa=ut||function(){return ht.Date.now()};function ka(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,qi(e,s,n,n,n,n,t)}function Ta(e,t){var i;if("function"!=typeof t)throw new Ie(r);return e=fs(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=n),i}}var Ia=Kr(function(e,t,n){var r=1;if(n.length){var i=sn(n,ao(Ia));r|=a}return qi(e,r,t,n,i)}),Oa=Kr(function(e,t,n){var r=3;if(n.length){var i=sn(n,ao(Oa));r|=a}return qi(t,r,e,n,i)});function Ea(e,t,i){var o,a,s,l,c,u,h=0,d=!1,f=!1,p=!0;if("function"!=typeof e)throw new Ie(r);function g(t){var r=o,i=a;return o=a=n,h=t,l=e.apply(i,r)}function m(e){var r=e-u;return u===n||r>=t||r<0||f&&e-h>=s}function v(){var e=Aa();if(m(e))return b(e);c=Eo(v,function(e){var n=t-(e-u);return f?bn(n,s-(e-h)):n}(e))}function b(e){return c=n,p&&o?g(e):(o=a=n,l)}function y(){var e=Aa(),r=m(e);if(o=arguments,a=this,u=e,r){if(c===n)return function(e){return h=e,c=Eo(v,t),d?g(e):l}(u);if(f)return xi(c),c=Eo(v,t),g(u)}return c===n&&(c=Eo(v,t)),l}return t=gs(t)||0,Qa(i)&&(d=!!i.leading,s=(f="maxWait"in i)?vn(gs(i.maxWait)||0,t):s,p="trailing"in i?!!i.trailing:p),y.cancel=function(){c!==n&&xi(c),h=0,o=u=a=c=n},y.flush=function(){return c===n?l:b(Aa())},y}var Pa=Kr(function(e,t){return cr(e,1,t)}),Ma=Kr(function(e,t,n){return cr(e,gs(t)||0,n)});function Fa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ie(r);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Fa.Cache||$n),n}function ja(e){if("function"!=typeof e)throw new Ie(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Fa.Cache=$n;var Ra=yi(function(e,t){var n=(t=1==t.length&&Ha(t[0])?Pt(t[0],Kt(so())):Pt(mr(t,1),Kt(so()))).length;return Kr(function(r){for(var i=-1,o=bn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return Ct(e,this,r)})}),Da=Kr(function(e,t){var r=sn(t,ao(Da));return qi(e,a,n,t,r)}),La=Kr(function(e,t){var r=sn(t,ao(La));return qi(e,64,n,t,r)}),Na=to(function(e,t){return qi(e,l,n,n,n,t)});function za(e,t){return e===t||e!=e&&t!=t}var Ba=Yi(Ar),Va=Yi(function(e,t){return e>=t}),Ua=Er(function(){return arguments}())?Er:function(e){return es(e)&&je.call(e,"callee")&&!Ge.call(e,"callee")},Ha=we.isArray,Wa=vt?Kt(vt):function(e){return es(e)&&Sr(e)==E};function Ya(e){return null!=e&&Ja(e.length)&&!qa(e)}function $a(e){return es(e)&&Ya(e)}var Ga=Dt||gl,Xa=bt?Kt(bt):function(e){return es(e)&&Sr(e)==v};function Ka(e){if(!es(e))return!1;var t=Sr(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!rs(e)}function qa(e){if(!Qa(e))return!1;var t=Sr(e);return t==y||t==w||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Za(e){return"number"==typeof e&&e==fs(e)}function Ja(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=u}function Qa(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function es(e){return null!=e&&"object"==typeof e}var ts=yt?Kt(yt):function(e){return es(e)&&po(e)==x};function ns(e){return"number"==typeof e||es(e)&&Sr(e)==_}function rs(e){if(!es(e)||Sr(e)!=C)return!1;var t=Ye(e);if(null===t)return!0;var n=je.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Fe.call(n)==Ne}var is=wt?Kt(wt):function(e){return es(e)&&Sr(e)==A},os=xt?Kt(xt):function(e){return es(e)&&po(e)==k};function as(e){return"string"==typeof e||!Ha(e)&&es(e)&&Sr(e)==T}function ss(e){return"symbol"==typeof e||es(e)&&Sr(e)==I}var ls=_t?Kt(_t):function(e){return es(e)&&Ja(e.length)&&!!it[Sr(e)]},cs=Yi(Lr),us=Yi(function(e,t){return e<=t});function hs(e){if(!e)return[];if(Ya(e))return as(e)?hn(e):Ii(e);if(Je&&e[Je])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Je]());var t=po(e);return(t==x?on:t==k?ln:zs)(e)}function ds(e){return e?(e=gs(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function fs(e){var t=ds(e),n=t%1;return t==t?n?t-n:t:0}function ps(e){return e?ar(fs(e),0,d):0}function gs(e){if("number"==typeof e)return e;if(ss(e))return h;if(Qa(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Qa(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Xt(e);var n=fe.test(e);return n||ge.test(e)?lt(e.slice(2),n?2:8):de.test(e)?h:+e}function ms(e){return Oi(e,Ps(e))}function vs(e){return null==e?"":li(e)}var bs=Pi(function(e,t){if(Co(t)||Ya(t))Oi(t,Es(t),e);else for(var n in t)je.call(t,n)&&er(e,n,t[n])}),ys=Pi(function(e,t){Oi(t,Ps(t),e)}),ws=Pi(function(e,t,n,r){Oi(t,Ps(t),e,r)}),xs=Pi(function(e,t,n,r){Oi(t,Es(t),e,r)}),_s=to(or),Cs=Kr(function(e,t){e=Ae(e);var r=-1,i=t.length,o=i>2?t[2]:n;for(o&&yo(t[0],t[1],o)&&(i=1);++r<i;)for(var a=t[r],s=Ps(a),l=-1,c=s.length;++l<c;){var u=s[l],h=e[u];(h===n||za(h,Pe[u])&&!je.call(e,u))&&(e[u]=a[u])}return e}),Ss=Kr(function(e){return e.push(n,Ji),Ct(Fs,n,e)});function As(e,t,r){var i=null==e?n:_r(e,t);return i===n?r:i}function ks(e,t){return null!=e&&go(e,t,Tr)}var Ts=Bi(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),e[t]=n},Qs(nl)),Is=Bi(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),je.call(e,t)?e[t].push(n):e[t]=[n]},so),Os=Kr(Or);function Es(e){return Ya(e)?Kn(e):Rr(e)}function Ps(e){return Ya(e)?Kn(e,!0):Dr(e)}var Ms=Pi(function(e,t,n){Vr(e,t,n)}),Fs=Pi(function(e,t,n,r){Vr(e,t,n,r)}),js=to(function(e,t){var n={};if(null==e)return n;var r=!1;t=Pt(t,function(t){return t=bi(t,e),r||(r=t.length>1),t}),Oi(e,ro(e),n),r&&(n=sr(n,7,Qi));for(var i=t.length;i--;)ui(n,t[i]);return n}),Rs=to(function(e,t){return null==e?{}:function(e,t){return Wr(e,t,function(t,n){return ks(e,n)})}(e,t)});function Ds(e,t){if(null==e)return{};var n=Pt(ro(e),function(e){return[e]});return t=so(t),Wr(e,n,function(e,n){return t(e,n[0])})}var Ls=Ki(Es),Ns=Ki(Ps);function zs(e){return null==e?[]:qt(e,Es(e))}var Bs=Ri(function(e,t,n){return t=t.toLowerCase(),e+(n?Vs(t):t)});function Vs(e){return Ks(vs(e).toLowerCase())}function Us(e){return(e=vs(e))&&e.replace(ve,en).replace(Ze,"")}var Hs=Ri(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Ws=Ri(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Ys=ji("toLowerCase"),$s=Ri(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Gs=Ri(function(e,t,n){return e+(n?" ":"")+Ks(t)}),Xs=Ri(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Ks=ji("toUpperCase");function qs(e,t,r){return e=vs(e),(t=r?n:t)===n?function(e){return tt.test(e)}(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.match(se)||[]}(e):e.match(t)||[]}var Zs=Kr(function(e,t){try{return Ct(e,n,t)}catch(e){return Ka(e)?e:new _e(e)}}),Js=to(function(e,t){return At(t,function(t){t=Do(t),ir(e,t,Ia(e[t],e))}),e});function Qs(e){return function(){return e}}var el=Ni(),tl=Ni(!0);function nl(e){return e}function rl(e){return jr("function"==typeof e?e:sr(e,1))}var il=Kr(function(e,t){return function(n){return Or(n,e,t)}}),ol=Kr(function(e,t){return function(n){return Or(e,n,t)}});function al(e,t,n){var r=Es(t),i=xr(t,r);null!=n||Qa(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=xr(t,Es(t)));var o=!(Qa(n)&&"chain"in n&&!n.chain),a=qa(e);return At(i,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Ii(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Mt([this.value()],arguments))})}),e}function sl(){}var ll=Ui(Pt),cl=Ui(Tt),ul=Ui(Rt);function hl(e){return wo(e)?Ht(Do(e)):function(e){return function(t){return _r(t,e)}}(e)}var dl=Wi(),fl=Wi(!0);function pl(){return[]}function gl(){return!1}var ml,vl=Vi(function(e,t){return e+t},0),bl=Gi("ceil"),yl=Vi(function(e,t){return e/t},1),wl=Gi("floor"),xl=Vi(function(e,t){return e*t},1),_l=Gi("round"),Cl=Vi(function(e,t){return e-t},0);return zn.after=function(e,t){if("function"!=typeof t)throw new Ie(r);return e=fs(e),function(){if(--e<1)return t.apply(this,arguments)}},zn.ary=ka,zn.assign=bs,zn.assignIn=ys,zn.assignInWith=ws,zn.assignWith=xs,zn.at=_s,zn.before=Ta,zn.bind=Ia,zn.bindAll=Js,zn.bindKey=Oa,zn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ha(e)?e:[e]},zn.chain=ha,zn.chunk=function(e,t,r){t=(r?yo(e,t,r):t===n)?1:vn(fs(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,a=0,s=we(ft(i/t));o<i;)s[a++]=ni(e,o,o+=t);return s},zn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},zn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=we(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Mt(Ha(n)?Ii(n):[n],mr(t,1))},zn.cond=function(e){var t=null==e?0:e.length,n=so();return e=t?Pt(e,function(e){if("function"!=typeof e[1])throw new Ie(r);return[n(e[0]),e[1]]}):[],Kr(function(n){for(var r=-1;++r<t;){var i=e[r];if(Ct(i[0],this,n))return Ct(i[1],this,n)}})},zn.conforms=function(e){return function(e){var t=Es(e);return function(n){return lr(n,e,t)}}(sr(e,1))},zn.constant=Qs,zn.countBy=pa,zn.create=function(e,t){var n=Bn(e);return null==t?n:rr(n,t)},zn.curry=function e(t,r,i){var o=qi(t,8,n,n,n,n,n,r=i?n:r);return o.placeholder=e.placeholder,o},zn.curryRight=function e(t,r,i){var o=qi(t,16,n,n,n,n,n,r=i?n:r);return o.placeholder=e.placeholder,o},zn.debounce=Ea,zn.defaults=Cs,zn.defaultsDeep=Ss,zn.defer=Pa,zn.delay=Ma,zn.difference=zo,zn.differenceBy=Bo,zn.differenceWith=Vo,zn.drop=function(e,t,r){var i=null==e?0:e.length;return i?ni(e,(t=r||t===n?1:fs(t))<0?0:t,i):[]},zn.dropRight=function(e,t,r){var i=null==e?0:e.length;return i?ni(e,0,(t=i-(t=r||t===n?1:fs(t)))<0?0:t):[]},zn.dropRightWhile=function(e,t){return e&&e.length?di(e,so(t,3),!0,!0):[]},zn.dropWhile=function(e,t){return e&&e.length?di(e,so(t,3),!0):[]},zn.fill=function(e,t,r,i){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&yo(e,t,r)&&(r=0,i=o),function(e,t,r,i){var o=e.length;for((r=fs(r))<0&&(r=-r>o?0:o+r),(i=i===n||i>o?o:fs(i))<0&&(i+=o),i=r>i?0:ps(i);r<i;)e[r++]=t;return e}(e,t,r,i)):[]},zn.filter=function(e,t){return(Ha(e)?It:gr)(e,so(t,3))},zn.flatMap=function(e,t){return mr(_a(e,t),1)},zn.flatMapDeep=function(e,t){return mr(_a(e,t),c)},zn.flatMapDepth=function(e,t,r){return r=r===n?1:fs(r),mr(_a(e,t),r)},zn.flatten=Wo,zn.flattenDeep=function(e){return null!=e&&e.length?mr(e,c):[]},zn.flattenDepth=function(e,t){return null!=e&&e.length?mr(e,t=t===n?1:fs(t)):[]},zn.flip=function(e){return qi(e,512)},zn.flow=el,zn.flowRight=tl,zn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},zn.functions=function(e){return null==e?[]:xr(e,Es(e))},zn.functionsIn=function(e){return null==e?[]:xr(e,Ps(e))},zn.groupBy=ya,zn.initial=function(e){return null!=e&&e.length?ni(e,0,-1):[]},zn.intersection=$o,zn.intersectionBy=Go,zn.intersectionWith=Xo,zn.invert=Ts,zn.invertBy=Is,zn.invokeMap=wa,zn.iteratee=rl,zn.keyBy=xa,zn.keys=Es,zn.keysIn=Ps,zn.map=_a,zn.mapKeys=function(e,t){var n={};return t=so(t,3),yr(e,function(e,r,i){ir(n,t(e,r,i),e)}),n},zn.mapValues=function(e,t){var n={};return t=so(t,3),yr(e,function(e,r,i){ir(n,r,t(e,r,i))}),n},zn.matches=function(e){return zr(sr(e,1))},zn.matchesProperty=function(e,t){return Br(e,sr(t,1))},zn.memoize=Fa,zn.merge=Ms,zn.mergeWith=Fs,zn.method=il,zn.methodOf=ol,zn.mixin=al,zn.negate=ja,zn.nthArg=function(e){return e=fs(e),Kr(function(t){return Ur(t,e)})},zn.omit=js,zn.omitBy=function(e,t){return Ds(e,ja(so(t)))},zn.once=function(e){return Ta(2,e)},zn.orderBy=function(e,t,r,i){return null==e?[]:(Ha(t)||(t=null==t?[]:[t]),Ha(r=i?n:r)||(r=null==r?[]:[r]),Hr(e,t,r))},zn.over=ll,zn.overArgs=Ra,zn.overEvery=cl,zn.overSome=ul,zn.partial=Da,zn.partialRight=La,zn.partition=Ca,zn.pick=Rs,zn.pickBy=Ds,zn.property=hl,zn.propertyOf=function(e){return function(t){return null==e?n:_r(e,t)}},zn.pull=qo,zn.pullAll=Zo,zn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Yr(e,t,so(n,2)):e},zn.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Yr(e,t,n,r):e},zn.pullAt=Jo,zn.range=dl,zn.rangeRight=fl,zn.rearg=Na,zn.reject=function(e,t){return(Ha(e)?It:gr)(e,ja(so(t,3)))},zn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=so(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return $r(e,i),n},zn.rest=function(e,t){if("function"!=typeof e)throw new Ie(r);return Kr(e,t=t===n?t:fs(t))},zn.reverse=Qo,zn.sampleSize=function(e,t,r){return t=(r?yo(e,t,r):t===n)?1:fs(t),(Ha(e)?Zn:Zr)(e,t)},zn.set=function(e,t,n){return null==e?e:Jr(e,t,n)},zn.setWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:Jr(e,t,r,i)},zn.shuffle=function(e){return(Ha(e)?Jn:ti)(e)},zn.slice=function(e,t,r){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&yo(e,t,r)?(t=0,r=i):(t=null==t?0:fs(t),r=r===n?i:fs(r)),ni(e,t,r)):[]},zn.sortBy=Sa,zn.sortedUniq=function(e){return e&&e.length?ai(e):[]},zn.sortedUniqBy=function(e,t){return e&&e.length?ai(e,so(t,2)):[]},zn.split=function(e,t,r){return r&&"number"!=typeof r&&yo(e,t,r)&&(t=r=n),(r=r===n?d:r>>>0)?(e=vs(e))&&("string"==typeof t||null!=t&&!is(t))&&!(t=li(t))&&rn(e)?wi(hn(e),0,r):e.split(t,r):[]},zn.spread=function(e,t){if("function"!=typeof e)throw new Ie(r);return t=null==t?0:vn(fs(t),0),Kr(function(n){var r=n[t],i=wi(n,0,t);return r&&Mt(i,r),Ct(e,this,i)})},zn.tail=function(e){var t=null==e?0:e.length;return t?ni(e,1,t):[]},zn.take=function(e,t,r){return e&&e.length?ni(e,0,(t=r||t===n?1:fs(t))<0?0:t):[]},zn.takeRight=function(e,t,r){var i=null==e?0:e.length;return i?ni(e,(t=i-(t=r||t===n?1:fs(t)))<0?0:t,i):[]},zn.takeRightWhile=function(e,t){return e&&e.length?di(e,so(t,3),!1,!0):[]},zn.takeWhile=function(e,t){return e&&e.length?di(e,so(t,3)):[]},zn.tap=function(e,t){return t(e),e},zn.throttle=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new Ie(r);return Qa(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),Ea(e,t,{leading:i,maxWait:t,trailing:o})},zn.thru=da,zn.toArray=hs,zn.toPairs=Ls,zn.toPairsIn=Ns,zn.toPath=function(e){return Ha(e)?Pt(e,Do):ss(e)?[e]:Ii(Ro(vs(e)))},zn.toPlainObject=ms,zn.transform=function(e,t,n){var r=Ha(e),i=r||Ga(e)||ls(e);if(t=so(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Qa(e)&&qa(o)?Bn(Ye(e)):{}}return(i?At:yr)(e,function(e,r,i){return t(n,e,r,i)}),n},zn.unary=function(e){return ka(e,1)},zn.union=ea,zn.unionBy=ta,zn.unionWith=na,zn.uniq=function(e){return e&&e.length?ci(e):[]},zn.uniqBy=function(e,t){return e&&e.length?ci(e,so(t,2)):[]},zn.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?ci(e,n,t):[]},zn.unset=function(e,t){return null==e||ui(e,t)},zn.unzip=ra,zn.unzipWith=ia,zn.update=function(e,t,n){return null==e?e:hi(e,t,vi(n))},zn.updateWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:hi(e,t,vi(r),i)},zn.values=zs,zn.valuesIn=function(e){return null==e?[]:qt(e,Ps(e))},zn.without=oa,zn.words=qs,zn.wrap=function(e,t){return Da(vi(t),e)},zn.xor=aa,zn.xorBy=sa,zn.xorWith=la,zn.zip=ca,zn.zipObject=function(e,t){return gi(e||[],t||[],er)},zn.zipObjectDeep=function(e,t){return gi(e||[],t||[],Jr)},zn.zipWith=ua,zn.entries=Ls,zn.entriesIn=Ns,zn.extend=ys,zn.extendWith=ws,al(zn,zn),zn.add=vl,zn.attempt=Zs,zn.camelCase=Bs,zn.capitalize=Vs,zn.ceil=bl,zn.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=gs(r))==r?r:0),t!==n&&(t=(t=gs(t))==t?t:0),ar(gs(e),t,r)},zn.clone=function(e){return sr(e,4)},zn.cloneDeep=function(e){return sr(e,5)},zn.cloneDeepWith=function(e,t){return sr(e,5,t="function"==typeof t?t:n)},zn.cloneWith=function(e,t){return sr(e,4,t="function"==typeof t?t:n)},zn.conformsTo=function(e,t){return null==t||lr(e,t,Es(t))},zn.deburr=Us,zn.defaultTo=function(e,t){return null==e||e!=e?t:e},zn.divide=yl,zn.endsWith=function(e,t,r){e=vs(e),t=li(t);var i=e.length,o=r=r===n?i:ar(fs(r),0,i);return(r-=t.length)>=0&&e.slice(r,o)==t},zn.eq=za,zn.escape=function(e){return(e=vs(e))&&G.test(e)?e.replace(Y,tn):e},zn.escapeRegExp=function(e){return(e=vs(e))&&te.test(e)?e.replace(ee,"\\$&"):e},zn.every=function(e,t,r){var i=Ha(e)?Tt:fr;return r&&yo(e,t,r)&&(t=n),i(e,so(t,3))},zn.find=ga,zn.findIndex=Uo,zn.findKey=function(e,t){return Lt(e,so(t,3),yr)},zn.findLast=ma,zn.findLastIndex=Ho,zn.findLastKey=function(e,t){return Lt(e,so(t,3),wr)},zn.floor=wl,zn.forEach=va,zn.forEachRight=ba,zn.forIn=function(e,t){return null==e?e:vr(e,so(t,3),Ps)},zn.forInRight=function(e,t){return null==e?e:br(e,so(t,3),Ps)},zn.forOwn=function(e,t){return e&&yr(e,so(t,3))},zn.forOwnRight=function(e,t){return e&&wr(e,so(t,3))},zn.get=As,zn.gt=Ba,zn.gte=Va,zn.has=function(e,t){return null!=e&&go(e,t,kr)},zn.hasIn=ks,zn.head=Yo,zn.identity=nl,zn.includes=function(e,t,n,r){e=Ya(e)?e:zs(e),n=n&&!r?fs(n):0;var i=e.length;return n<0&&(n=vn(i+n,0)),as(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&zt(e,t,n)>-1},zn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:fs(n);return i<0&&(i=vn(r+i,0)),zt(e,t,i)},zn.inRange=function(e,t,r){return t=ds(t),r===n?(r=t,t=0):r=ds(r),function(e,t,n){return e>=bn(t,n)&&e<vn(t,n)}(e=gs(e),t,r)},zn.invoke=Os,zn.isArguments=Ua,zn.isArray=Ha,zn.isArrayBuffer=Wa,zn.isArrayLike=Ya,zn.isArrayLikeObject=$a,zn.isBoolean=function(e){return!0===e||!1===e||es(e)&&Sr(e)==m},zn.isBuffer=Ga,zn.isDate=Xa,zn.isElement=function(e){return es(e)&&1===e.nodeType&&!rs(e)},zn.isEmpty=function(e){if(null==e)return!0;if(Ya(e)&&(Ha(e)||"string"==typeof e||"function"==typeof e.splice||Ga(e)||ls(e)||Ua(e)))return!e.length;var t=po(e);if(t==x||t==k)return!e.size;if(Co(e))return!Rr(e).length;for(var n in e)if(je.call(e,n))return!1;return!0},zn.isEqual=function(e,t){return Pr(e,t)},zn.isEqualWith=function(e,t,r){var i=(r="function"==typeof r?r:n)?r(e,t):n;return i===n?Pr(e,t,n,r):!!i},zn.isError=Ka,zn.isFinite=function(e){return"number"==typeof e&&Wt(e)},zn.isFunction=qa,zn.isInteger=Za,zn.isLength=Ja,zn.isMap=ts,zn.isMatch=function(e,t){return e===t||Mr(e,t,co(t))},zn.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,Mr(e,t,co(t),r)},zn.isNaN=function(e){return ns(e)&&e!=+e},zn.isNative=function(e){if(_o(e))throw new _e("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Fr(e)},zn.isNil=function(e){return null==e},zn.isNull=function(e){return null===e},zn.isNumber=ns,zn.isObject=Qa,zn.isObjectLike=es,zn.isPlainObject=rs,zn.isRegExp=is,zn.isSafeInteger=function(e){return Za(e)&&e>=-9007199254740991&&e<=u},zn.isSet=os,zn.isString=as,zn.isSymbol=ss,zn.isTypedArray=ls,zn.isUndefined=function(e){return e===n},zn.isWeakMap=function(e){return es(e)&&po(e)==O},zn.isWeakSet=function(e){return es(e)&&"[object WeakSet]"==Sr(e)},zn.join=function(e,t){return null==e?"":gn.call(e,t)},zn.kebabCase=Hs,zn.last=Ko,zn.lastIndexOf=function(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var o=i;return r!==n&&(o=(o=fs(r))<0?vn(i+o,0):bn(o,i-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Nt(e,Vt,o,!0)},zn.lowerCase=Ws,zn.lowerFirst=Ys,zn.lt=cs,zn.lte=us,zn.max=function(e){return e&&e.length?pr(e,nl,Ar):n},zn.maxBy=function(e,t){return e&&e.length?pr(e,so(t,2),Ar):n},zn.mean=function(e){return Ut(e,nl)},zn.meanBy=function(e,t){return Ut(e,so(t,2))},zn.min=function(e){return e&&e.length?pr(e,nl,Lr):n},zn.minBy=function(e,t){return e&&e.length?pr(e,so(t,2),Lr):n},zn.stubArray=pl,zn.stubFalse=gl,zn.stubObject=function(){return{}},zn.stubString=function(){return""},zn.stubTrue=function(){return!0},zn.multiply=xl,zn.nth=function(e,t){return e&&e.length?Ur(e,fs(t)):n},zn.noConflict=function(){return ht._===this&&(ht._=ze),this},zn.noop=sl,zn.now=Aa,zn.pad=function(e,t,n){e=vs(e);var r=(t=fs(t))?un(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Hi(gt(i),n)+e+Hi(ft(i),n)},zn.padEnd=function(e,t,n){e=vs(e);var r=(t=fs(t))?un(e):0;return t&&r<t?e+Hi(t-r,n):e},zn.padStart=function(e,t,n){e=vs(e);var r=(t=fs(t))?un(e):0;return t&&r<t?Hi(t-r,n)+e:e},zn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),wn(vs(e).replace(ne,""),t||0)},zn.random=function(e,t,r){if(r&&"boolean"!=typeof r&&yo(e,t,r)&&(t=r=n),r===n&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=ds(e),t===n?(t=e,e=0):t=ds(t)),e>t){var i=e;e=t,t=i}if(r||e%1||t%1){var o=xn();return bn(e+o*(t-e+st("1e-"+((o+"").length-1))),t)}return Gr(e,t)},zn.reduce=function(e,t,n){var r=Ha(e)?Ft:Yt,i=arguments.length<3;return r(e,so(t,4),n,i,hr)},zn.reduceRight=function(e,t,n){var r=Ha(e)?jt:Yt,i=arguments.length<3;return r(e,so(t,4),n,i,dr)},zn.repeat=function(e,t,r){return t=(r?yo(e,t,r):t===n)?1:fs(t),Xr(vs(e),t)},zn.replace=function(){var e=arguments,t=vs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},zn.result=function(e,t,r){var i=-1,o=(t=bi(t,e)).length;for(o||(o=1,e=n);++i<o;){var a=null==e?n:e[Do(t[i])];a===n&&(i=o,a=r),e=qa(a)?a.call(e):a}return e},zn.round=_l,zn.runInContext=e,zn.sample=function(e){return(Ha(e)?qn:qr)(e)},zn.size=function(e){if(null==e)return 0;if(Ya(e))return as(e)?un(e):e.length;var t=po(e);return t==x||t==k?e.size:Rr(e).length},zn.snakeCase=$s,zn.some=function(e,t,r){var i=Ha(e)?Rt:ri;return r&&yo(e,t,r)&&(t=n),i(e,so(t,3))},zn.sortedIndex=function(e,t){return ii(e,t)},zn.sortedIndexBy=function(e,t,n){return oi(e,t,so(n,2))},zn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ii(e,t);if(r<n&&za(e[r],t))return r}return-1},zn.sortedLastIndex=function(e,t){return ii(e,t,!0)},zn.sortedLastIndexBy=function(e,t,n){return oi(e,t,so(n,2),!0)},zn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ii(e,t,!0)-1;if(za(e[n],t))return n}return-1},zn.startCase=Gs,zn.startsWith=function(e,t,n){return e=vs(e),n=null==n?0:ar(fs(n),0,e.length),t=li(t),e.slice(n,n+t.length)==t},zn.subtract=Cl,zn.sum=function(e){return e&&e.length?$t(e,nl):0},zn.sumBy=function(e,t){return e&&e.length?$t(e,so(t,2)):0},zn.template=function(e,t,r){var i=zn.templateSettings;r&&yo(e,t,r)&&(t=n),e=vs(e),t=ws({},t,i,Zi);var o,a,s=ws({},t.imports,i.imports,Zi),l=Es(s),c=qt(s,l),u=0,h=t.interpolate||be,d="__p += '",f=ke((t.escape||be).source+"|"+h.source+"|"+(h===q?ue:be).source+"|"+(t.evaluate||be).source+"|$","g"),p="//# sourceURL="+(je.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rt+"]")+"\n";e.replace(f,function(t,n,r,i,s,l){return r||(r=i),d+=e.slice(u,l).replace(ye,nn),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+t.length,t}),d+="';\n";var g=je.call(t,"variable")&&t.variable;if(g){if(le.test(g))throw new _e("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace(V,""):d).replace(U,"$1").replace(H,"$1;"),d="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var m=Zs(function(){return Ce(l,p+"return "+d).apply(n,c)});if(m.source=d,Ka(m))throw m;return m},zn.times=function(e,t){if((e=fs(e))<1||e>u)return[];var n=d,r=bn(e,d);t=so(t),e-=d;for(var i=Gt(r,t);++n<e;)t(n);return i},zn.toFinite=ds,zn.toInteger=fs,zn.toLength=ps,zn.toLower=function(e){return vs(e).toLowerCase()},zn.toNumber=gs,zn.toSafeInteger=function(e){return e?ar(fs(e),-9007199254740991,u):0===e?e:0},zn.toString=vs,zn.toUpper=function(e){return vs(e).toUpperCase()},zn.trim=function(e,t,r){if((e=vs(e))&&(r||t===n))return Xt(e);if(!e||!(t=li(t)))return e;var i=hn(e),o=hn(t);return wi(i,Jt(i,o),Qt(i,o)+1).join("")},zn.trimEnd=function(e,t,r){if((e=vs(e))&&(r||t===n))return e.slice(0,dn(e)+1);if(!e||!(t=li(t)))return e;var i=hn(e);return wi(i,0,Qt(i,hn(t))+1).join("")},zn.trimStart=function(e,t,r){if((e=vs(e))&&(r||t===n))return e.replace(ne,"");if(!e||!(t=li(t)))return e;var i=hn(e);return wi(i,Jt(i,hn(t))).join("")},zn.truncate=function(e,t){var r=30,i="...";if(Qa(t)){var o="separator"in t?t.separator:o;r="length"in t?fs(t.length):r,i="omission"in t?li(t.omission):i}var a=(e=vs(e)).length;if(rn(e)){var s=hn(e);a=s.length}if(r>=a)return e;var l=r-un(i);if(l<1)return i;var c=s?wi(s,0,l).join(""):e.slice(0,l);if(o===n)return c+i;if(s&&(l+=c.length-l),is(o)){if(e.slice(l).search(o)){var u,h=c;for(o.global||(o=ke(o.source,vs(he.exec(o))+"g")),o.lastIndex=0;u=o.exec(h);)var d=u.index;c=c.slice(0,d===n?l:d)}}else if(e.indexOf(li(o),l)!=l){var f=c.lastIndexOf(o);f>-1&&(c=c.slice(0,f))}return c+i},zn.unescape=function(e){return(e=vs(e))&&$.test(e)?e.replace(W,fn):e},zn.uniqueId=function(e){var t=++Re;return vs(e)+t},zn.upperCase=Xs,zn.upperFirst=Ks,zn.each=va,zn.eachRight=ba,zn.first=Yo,al(zn,(ml={},yr(zn,function(e,t){je.call(zn.prototype,t)||(ml[t]=e)}),ml),{chain:!1}),zn.VERSION="4.17.21",At(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){zn[e].placeholder=zn}),At(["drop","take"],function(e,t){Hn.prototype[e]=function(r){r=r===n?1:vn(fs(r),0);var i=this.__filtered__&&!t?new Hn(this):this.clone();return i.__filtered__?i.__takeCount__=bn(r,i.__takeCount__):i.__views__.push({size:bn(r,d),type:e+(i.__dir__<0?"Right":"")}),i},Hn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),At(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;Hn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:so(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),At(["head","last"],function(e,t){var n="take"+(t?"Right":"");Hn.prototype[e]=function(){return this[n](1).value()[0]}}),At(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Hn.prototype[e]=function(){return this.__filtered__?new Hn(this):this[n](1)}}),Hn.prototype.compact=function(){return this.filter(nl)},Hn.prototype.find=function(e){return this.filter(e).head()},Hn.prototype.findLast=function(e){return this.reverse().find(e)},Hn.prototype.invokeMap=Kr(function(e,t){return"function"==typeof e?new Hn(this):this.map(function(n){return Or(n,e,t)})}),Hn.prototype.reject=function(e){return this.filter(ja(so(e)))},Hn.prototype.slice=function(e,t){e=fs(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Hn(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=fs(t))<0?r.dropRight(-t):r.take(t-e)),r)},Hn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Hn.prototype.toArray=function(){return this.take(d)},yr(Hn.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=zn[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);o&&(zn.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,l=t instanceof Hn,c=s[0],u=l||Ha(t),h=function(e){var t=o.apply(zn,Mt([e],s));return i&&d?t[0]:t};u&&r&&"function"==typeof c&&1!=c.length&&(l=u=!1);var d=this.__chain__,f=!!this.__actions__.length,p=a&&!d,g=l&&!f;if(!a&&u){t=g?t:new Hn(this);var m=e.apply(t,s);return m.__actions__.push({func:da,args:[h],thisArg:n}),new Un(m,d)}return p&&g?e.apply(this,s):(m=this.thru(h),p?i?m.value()[0]:m.value():m)})}),At(["pop","push","shift","sort","splice","unshift"],function(e){var t=Oe[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);zn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Ha(i)?i:[],e)}return this[n](function(n){return t.apply(Ha(n)?n:[],e)})}}),yr(Hn.prototype,function(e,t){var n=zn[t];if(n){var r=n.name+"";je.call(En,r)||(En[r]=[]),En[r].push({name:t,func:n})}}),En[zi(n,2).name]=[{name:"wrapper",func:n}],Hn.prototype.clone=function(){var e=new Hn(this.__wrapped__);return e.__actions__=Ii(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ii(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ii(this.__views__),e},Hn.prototype.reverse=function(){if(this.__filtered__){var e=new Hn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Hn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ha(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=bn(t,e+a);break;case"takeRight":e=vn(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,l=s-a,c=r?s:a-1,u=this.__iteratees__,h=u.length,d=0,f=bn(l,this.__takeCount__);if(!n||!r&&i==l&&f==l)return fi(e,this.__actions__);var p=[];e:for(;l--&&d<f;){for(var g=-1,m=e[c+=t];++g<h;){var v=u[g],b=v.iteratee,y=v.type,w=b(m);if(2==y)m=w;else if(!w){if(1==y)continue e;break e}}p[d++]=m}return p},zn.prototype.at=fa,zn.prototype.chain=function(){return ha(this)},zn.prototype.commit=function(){return new Un(this.value(),this.__chain__)},zn.prototype.next=function(){this.__values__===n&&(this.__values__=hs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},zn.prototype.plant=function(e){for(var t,r=this;r instanceof Vn;){var i=No(r);i.__index__=0,i.__values__=n,t?o.__wrapped__=i:t=i;var o=i;r=r.__wrapped__}return o.__wrapped__=e,t},zn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Hn){var t=e;return this.__actions__.length&&(t=new Hn(this)),(t=t.reverse()).__actions__.push({func:da,args:[Qo],thisArg:n}),new Un(t,this.__chain__)}return this.thru(Qo)},zn.prototype.toJSON=zn.prototype.valueOf=zn.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},zn.prototype.first=zn.prototype.head,Je&&(zn.prototype[Je]=function(){return this}),zn}();ft?((ft.exports=pn)._=pn,dt._=pn):ht._=pn}).call(Er)}(Or,Or.exports)),Or.exports);const Mr=({onSearch:t,placeholder:n="Поиск файлов...",className:r})=>{const[i,s]=o(""),l=u(null);a(()=>(l.current=Pr.debounce(e=>{t(e)},500),()=>{var e;null===(e=l.current)||void 0===e||e.cancel()}),[t]);return e(E,{value:i,onChange:e=>{var t;const n=e.target.value;s(n),null===(t=l.current)||void 0===t||t.call(l,n)},placeholder:n,prefix:e(se,{}),className:r,allowClear:!0,onClear:()=>{s(""),t("")}})},Fr=({className:n,style:r,customIcon:i})=>i?e("img",{src:i,alt:"Upload",className:n,style:Object.assign(Object.assign({},r),{width:"64px",height:"64px",objectFit:"contain"})}):t("svg",{className:n,style:Object.assign(Object.assign({},r),{width:"64px",height:"64px"}),viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("circle",{cx:"32",cy:"32",r:"30",fill:"none",stroke:"#1890ff",strokeWidth:"2",opacity:"0.3"}),e("circle",{cx:"32",cy:"32",r:"20",fill:"none",stroke:"#1890ff",strokeWidth:"2"}),e("path",{d:"M32 12L32 28M24 20L32 12L40 20",stroke:"#1890ff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e("circle",{cx:"20",cy:"40",r:"2",fill:"#1890ff",opacity:"0.6"}),e("circle",{cx:"32",cy:"40",r:"2",fill:"#1890ff",opacity:"0.6"}),e("circle",{cx:"44",cy:"40",r:"2",fill:"#1890ff",opacity:"0.6"})]}),jr="my_files",Rr="gif",Dr="stock_images",Lr="ai",Nr="editor",zr=!1,Br=["jpg","jpeg","png","gif","bmp","webp","svg","ico","tiff","tif"],Vr="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQABLAEsAAD/4QCMRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAAEsAAAAAQAAASwAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAQOgAwAEAAAAAQAAAMoAAAAA/+EJ2Wh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8APD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1wTU06RG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6c3RvY2s6Mzk2MmU4NTQtNjA1NC00MGZmLWEwYzMtYjJkNjcwMzQ2OWFhIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOmE5M2NiZTgyLWI5NjEtNGUzNS1iYmQ0LWJjZWE1Zjc1YTQwZiIvPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw/eHBhY2tldCBlbmQ9InciPz4A/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlAAAAAAAQ1B2M2Y8AsgTpgAmY7PhCfv/AABEIAMoBAwMBIgACEQADEQD/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2wBDAAUDBAQEAwUEBAQFBQUGBwwIBwcHBw8LCwkMEQ8SEhEPERETFhwXExQaFRERGCEYGh0dHx8fExciJCIeJBweHx7/3QAEABH/2gAMAwEAAhEDEQA/APsuiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAoqG7uIbWB55nCooyTS208VxCssLh0boRQBLRRRQAUUUUAFFFFAH/9D7LooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAqG7uIrWBppnCoo5Jou7iK1gaaZwqKM5NcRq2oXOsXqxQq2wnEcYPX3NABq2oXOr3qwxK3l5xHGO/ua6nw7pzadZ7ZJGaR+WBPA9hUfh7R49Pi82TDXDDkkfd9hWxQAUUUUAFFFFABRRRQB//9H7LooooAKKKKACiiuOv/EOpQX88KNDsSQqMp6H60AdjRXD/wDCTapn70P/AH7/APr0f8JPqn96H/v3/wDXoA7iiuH/AOEn1T+9D/37/wDr0f8ACT6p/eh/79//AF6AO4orh/8AhJ9U/vQ/9+//AK9H/CT6p/eh/wC/f/16AO4orh/+En1T+9D/AN+//r0f8JPqn96H/v3/APXoA7iiuH/4SfVP70P/AH7/APr0f8JPqn96H/v3/wDXoA7iiuH/AOEn1T+9D/37/wDr0f8ACT6p/eh/79//AF6AO4orh/8AhJ9U/vQ/9+//AK9H/CT6p/eh/wC/f/16AO4orh/+En1T+9D/AN+//r0f8JPqn96H/v3/APXoA7iobq4itYHmncIijJJrE0jUdQlt2v8AUJIYrNVyMJgv9Oaw9X1C51e8WGJWMecRxr39zQAatqNzq94kUasELYjjB6/Wul8P6NHp8Qlkw1ww5P8Ad9hWRmDw9bfwTajIv4Riqw8Tap6wf98f/XoA7elrh/8AhJtU/vQ/9+//AK9avhnWL3UL94bgx7BGWG1cdwPX3oA6OiiigAooooAKKKKAP//S+y6KKKACiiigArgHAbxSVYAg3mCD3+eu/rgT/wAjV/2+f+z0Adt9jtMf8esH/fsUfY7T/n1g/wC/Yqeh2CIWY4AGSaAK7WlmqktbQADkkxr/AIVUe50JJPLZ7EN6YWuX17WJr+dkRylurYVQfve5rKJoA9Ghh0+Zd0MVtIvqqKaf9jtP+fWD/v2K89sry4sphLbyFD3HY/Wu+0e9TULFLhQATww9DQBJ9jtP+fWD/v2KattZM7ILe3LL94bF4p99cx2lpJcS/dRc/X2rjdG1eSLWmuZ2Oy4bEnoPQ/hQB2P2O0/59YP+/Yo+x2n/AD6wf9+xU4IPSloAr/Y7T/n1g/79ij7Haf8APrB/37FWKKAK/wBjtP8An1g/79ij7Haf8+sH/fsVYooAr/Y7T/n1g/79ioruPTrWBppoLdUUckxj/Cp7u4itYGnmcKijJJriNX1C61i9EUKtsziOMHr7mgBNVv7jVrxYII/3YOIYl/ma6bw9o8enxCSTD3DDkn+H2FHh/R49Pi8yTDXDDkkfd9hWxQBC9rbOxZ7eJmPUlATTfsdp/wA+sH/fsVYooAztXtbVdLumW3hBELkEIOPlNc74H/5Csv8A1xP8xXUaz/yCbz/ri/8A6Ca5fwP/AMhaX/rif5igDs6KKKACiiigAooooA//0/suiiigAooooAK4E/8AI1f9vn/s9d9XAn/kav8At8/9noA72s/xI7R6HdMpwdmPzODWhUN/ALqymt26SIVoA816UlS3ML207wSrtdCQai+lAC11HgN2xdx4+XKH6Hn/AArl++K6jSv+JN4flvJhiWfBRe/Tj+ZNAEHjLUfOnFjEw2R/NJju3Yfl/Oudp0jtJIzucsxJJ96bQB2/hLUftdkLeRh50OF+q9jW3XnOkXrWF/HcDJUHDjPUV6HDIssSSIQVYAg0APooooAKhu7iK1gaeZwqKM5NF3cQ2sDTTOFRRk5riNW1C51i9WKJW8vOI4x39zQAavqF1rF6IYVbZnEcYPX3NdL4e0ePT4hLIA1w45JH3fYUeHtHj0+LzJcNcMOTj7vsK2KACiiigAooooAqaz/yCbz/AK4v/wCgmuX8D/8AIWl/64n+YrqNZ/5BN5/1xf8A9BNcv4H/AOQtL/1xP8xQB2dFFFABRRRQAUUUUAf/1PsuiiigAooooAK4E/8AI1f9vn/s9d9XAn/kav8At8/9noA72lpKWgDO1bSLXUQDKCsg6OvX/wCvWFJ4Tn3fJdxFc8FkOa66igDC0zw3a2riadzPIOeRhR+FYXinUPtl+Yoz+5h+VcdCe5/p+FdH4n1H7DYFYziaX5U9vU1wn40AFFFFABXW+DNR3xtp8x+ZPmjyeo7j/PrXJVNZzva3UdxG2HjbP/1qAPTKhu7iK2gaaZwqKOSahTULf+zFv3bZEybsmuP1XULnV70QxK3l7sRxr39zQAmrahc6xerFEreXnEcY7+5rpfD2jx6fF5suGuGHJx932FHh7R49PiEkuGuGHJ/u+wrYoAKKKKACiiigAooooAqaz/yCbz/ri/8A6Ca5fwP/AMhaX/rif5iuo1n/AJBN5/1xf/0E1y/gf/kLS/8AXE/zFAHZ0UUUAFFFFABRRRQB/9X7LooooAKKKKACuBP/ACNX/b5/7PXfVwJ/5Gr/ALfP/Z6AO9paSloAKazBVZicBRkmnVz3jHUfs9qLOJsSy/ex2XvQBzuu351DUXlDfu1+WMewqhRRQAUUUv40AFbGi6ZG8TahqB8uzTkA9ZP/AK1Gi6ZG8TajqJ2WcfIB/wCWn/1qi1W+uNWu0hhQiIHbFEv86ADU7+fVbpIIU2xZ2xRL/M103h7R00+LzZcPcMOTj7vsKyCYfD9sQNsupSr+EY/z+ddDot8uoWCTj7/Rx6N3oAvUUUUAFZ17rFta6jDZydZPvNnhPTNSaxqEWn2bTv8AM3RF9TXntxLJPK8sp3O5yx9TQB6dmlrA8Kar9qg+yzt+/jHBP8QrfoAKKKKAKms/8gm8/wCuL/8AoJrl/A//ACFpf+uJ/mK6jWf+QTef9cX/APQTXL+B/wDkLS/9cT/MUAdnRRRQAUUUUAFFFFAH/9b7LooooAKKKKACuBP/ACNX/b5/7PXfVwJ/5Gr/ALfP/Z6AO9paSloAjuZo7eB5pThEGSa851G6e9vJLl+rngeg7Ct/xpqOWXT4m6fNLj9B/X8q5mgBKKKO9AADzWzoumRvEdQ1A7LOPkA/8tP/AK1JoulxvE2oagQlnHyAf+Wn/wBaotVv59WukhhjIizthiX+dABql/catdJBDGRHnbDEv86vkweH7bHyy6jKv4Rj/P8An0UmDw/bEfLLqMq/hGP8/n/Ln5JHlkaSRi7scsx70AEkjySNLIxd2OWY961fCuo/Y78RSNiGY7T7Hsax6WgD1EGmyuscbSOwVVBJPoKy/DGofbrABzmaLCvk9fQ1k+MNU3MdPgY4X/WkevpQBla7qLajel84iTiMe3rWdS0lAEtrPJbXMdxC2HQ5HvXoWlXsd/ZpPGevDD0PevOK0/D2pHTr0FiTBJgOP60Ad/RTUYOoZSCCMg06gCprP/IJvP8Ari//AKCa5fwP/wAhaX/rif5iuo1n/kE3n/XF/wD0E1y/gf8A5C0v/XE/zFAHZ0UUUAFFFFABRRRQB//X+y6KKKACiiigArgT/wAjV/2+f+z131cCf+Rq/wC3z/2egDvarapeJY2Mlw/8I+UZ6nsKs1xni7UftN39ljb91Eecd2/z/WgDFnlknmeaRsu5JJqOigdeKAFrX0XS43iOoagQlnHyAf8Alp/9al0XTI3ibUNQISzj5Ab/AJaf/WqHVb+41a6SGGMrEDtiiX+dAC6rfT6tdJBChEWdsMS/zq+TB4ftj92XUZV/CMf5/P8AkhMPh+2x8suoyr+EY/z+f8sCSR5ZGlkYu7HLMe9ABJI8sjSSMXdjlmPemUUUAFLSUUAWtOvp7CZ5YD8zIVOenNVmJZixJJPUmkooAKKKKAClFJRQB1Pg/VOBp87Dj/VEn9K6jPFeYRs0bh0JDqQQR2Nd7oGpJqNkGJxKnEg/rQBY1n/kE3n/AFxf/wBBNcv4H/5C0v8A1xP8xXUaz/yCbz/ri/8A6Ca5fwP/AMhaX/rif5igDs6KKKACiiigAooooA//0PsuiiigAooooAK4E/8AI1f9vn/s9d8a89u5RB4hlnYEiO5LkDvhs0Adtq808Ni7W0TyTEbUCjkE964c6TqhJJspyTySVroB4stsY+xzf99Cj/hK7X/nzl/76FAHPnSdTx/x4z/981d0zRvL33eqr5NtFztbq5/wro7PVo5rF72SB7eBfutIcbvpXLatqFzq94IokYpnEca859zQAmq31xq12sEEZEQOIol/nWxBYzaPZeZBavc30oxlVyIxUVsbLw6i+epuL1wCyp/AP6VY/wCEstv+fSb/AL6FAGBLpmrSyNJJZ3DuxyzFetN/sjU/+fGf/vmug/4Su1/585f++hR/wldr/wA+cv8A30KAOf8A7I1P/nxn/wC+aP7I1P8A58Z/++a6D/hK7X/nzl/76FH/AAldr/z5y/8AfQoA5/8AsjU/+fGf/vmj+yNT/wCfGf8A75roP+Ertf8Anzl/76FH/CV2v/PnL/30KAOf/sjU/wDnxn/75o/sjU/+fGf/AL5roP8AhK7X/nzl/wC+hR/wldr/AM+cv/fQoA5/+yNT/wCfGf8A75o/sjU/+fGf/vmug/4Su1/585f++hR/wldr/wA+cv8A30KAOf8A7I1P/nxn/wC+aP7I1P8A58Z/++a6D/hK7X/nzl/76FH/AAldr/z5y/8AfQoA5/8AsjU/+fGf/vmrmkW+r6ferOllPtzh12n5hWp/wldr/wA+cv8A30KP+Ertf+fOX/voUAa+rNu0a6bBGYGOD1HymuZ8D/8AIWl/64n+YqzfeJre4spoBayqZI2UEkcZGKreB/8AkKyn/pif5igDs6KKKACiiigAooooA//R+y6KKKACiiigArHn8OadPO80nm73YscNjknNbFFAGJ/wjGmf9N/+/lRXGg6NZxG4nMnlpyQ0mQfatq7uIrWBppnCoozk1xGrajdaxeLFCh2E4jjHf3NACapfT6tdpBDGfKU4hjUfrXTeH9HTT4vNkw1yw5JH3fYUeHtHj0+LzZMNcMOSR932FbFAGNL4b0+WRpJXuHdjks0nJNN/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTPSf/v5VrTNGs9PnM1v5m4qVO5s8ZB/pWjRQAUUUUAFFFFABRRRQB//0vsuiiigAooooAKhu7mK1t2nmYKijkmpq5fxda6jNcReXukgYgBVHQ+9AGVq2oXOsXqxRK2zdiNB39zXS+H9Hj0+ISSYa4Ycn+77Cjw/o8enxebLhrhhySPu+wrYoAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAP/9P7LooooAKKKKACkxS0UAFFFFABRRTW6D6igB1FN7n8KQE+YRQA+iiigAopsnEZI64pR90UALRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAH//2Q==",Ur=s({state:{},actions:{},options:{}}),Hr=()=>l(Ur),Wr=({children:t,options:n})=>{const[r,s]=o([]),[l,u]=o([]),[h,d]=o(null),[f,p]=o(n.searchQuery||""),[g,m]=o(n.sortBySize||"name"),{config:v}=n,[b,y]=o("date"),[w,x]=o("desc"),[_,C]=o([{id:"folders",name:"Папки"}]),[S,A]=o(new Set);i.useEffect(()=>{A(new Set)},[]);const k=i.useRef(null);i.useEffect(()=>{if(n.onChangeSelection&&k.current!==S){if(null!==k.current){const e=(Array.isArray(l)?l:[]).filter(e=>S.has(e.id));n.onChangeSelection(e)}k.current=S}},[l,S,n.onChangeSelection,n]);const[T,I]=o(!1),[O,E]=o(jr);a(()=>{(null==v?void 0:v.activeLibraryItem)&&E&&E(null==v?void 0:v.activeLibraryItem)},[null==v?void 0:v.activeLibraryItem,E]);const[M,F]=o({current:1,pageSize:12,total:0}),[j]=P.useForm(),[R]=P.useForm(),[D]=P.useForm(),[L]=P.useForm(),[N]=P.useForm(),[z]=P.useForm(),[B,V]=o(!1),[U,H]=o(!1),[W,Y]=o(!1),[$,G]=o(!1),[X,K]=o(!1),[q,Z]=o(!1),[J,Q]=o(!1),[ee,te]=o(null),[ne,re]=o(null),ie=c(e=>{F(t=>Object.assign(Object.assign({},t),e))},[F]),oe={setFolders:s,setFiles:u,setSelectedFolder:d,setSearchTerm:p,setSortField:m,setSortBy:y,setSortOrder:x,setPathHistory:C,setSelectedFiles:A,setLoading:I,setPagination:ie,setIsModalVisible:V,setIsUrlModalVisible:H,setIsRenameModalVisible:Y,setIsMoveModalVisible:G,setIsRenameFolderModalVisible:K,setIsCopyModalVisible:Z,setIsDeleteConfirmVisible:Q,setFileToRename:te,setFolderToRename:re,updatePathHistoryOnFolderRename:(e,t)=>{C(n=>n.map(n=>n.id===e?Object.assign(Object.assign({},n),{name:t}):n))},setActiveLibraryItem:E},ae={state:{folders:r,files:l,selectedFolder:h,searchTerm:f,sortField:g,sortBy:b,sortOrder:w,pathHistory:_,selectedFiles:S,loading:T,pagination:M,isModalVisible:B,isUrlModalVisible:U,isRenameModalVisible:W,isMoveModalVisible:$,isRenameFolderModalVisible:X,isCopyModalVisible:q,isDeleteConfirmVisible:J,form:j,urlForm:R,renameForm:D,moveForm:L,renameFolderForm:N,copyForm:z,fileToRename:ee,folderToRename:ne,activeLibraryItem:O},actions:oe,options:n};return e(Ur.Provider,{value:ae,children:t})},Yr=e=>null===e.parentId||"null"===e.parentId||!e.parentId,$r=async(e,t,n)=>{var r;if(console.log("📁 addSubfoldersToFiles: params:",JSON.stringify(t,null,2)),null===(r=null==t?void 0:t.search)||void 0===r?void 0:r.trim())return console.log("🔍 Поиск активен, папки не добавляются"),e;let i=[];if(!n)return console.warn("🔍 getFolders не доступен!"),e;{const e=await n();i=Array.isArray(e)?e:[],console.log("📁 Получено папок от dataProvider:",i.length,"тип данных:",typeof e,"данные:",e)}const o=((e,t)=>{const n=Array.isArray(e)?e:[];return(r=t.folderId)&&"root"!==r&&"folders"!==r&&"null"!==r&&null!==r?n.filter(e=>e.parentId===t.folderId):n.filter(Yr);var r})(i,t);if(console.log("📁 Найдено подпапок для добавления:",o.length),0===o.length)return e;const a=o.map(e=>({id:e.id,name:e.name,size:"-",date:"-",isFolder:!0,folderId:e.parentId||"",type:"",selected:!1,extension:""})),s=[...a,...e];return console.log("📁 РЕЗУЛЬТАТ: папок:",a.length,"файлов:",e.length,"всего:",s.length),s},Gr=e=>{const{state:t,actions:n}=Hr(),{searchTerm:r,sortBy:i,sortOrder:o,selectedFolder:s,pagination:l}=t,{setSearchTerm:h,setSortBy:d,setSortOrder:f,setPagination:p}=n,g=e||n.fetchFiles,m=u(null),v=u(Pr.debounce(e=>{const t=JSON.stringify(e);m.current!==t?(m.current=t,console.log("✅ Выполняется запрос:",e),null==g||g(e)):console.log("🚫 Дублированный запрос пропущен:",e)},150)).current,b=c(()=>({folderId:null===s?"root":s||void 0,search:(null==r?void 0:r.trim())||void 0,page:l.current,limit:l.pageSize,sortBy:i,sortOrder:o}),[s,r,l.current,l.pageSize,i,o]),y=c(e=>{if(console.log("🔎 useSortAndFilter: handleSearch вызван с:",e),h&&(console.log("🔎 useSortAndFilter: Обновляем searchTerm в стейте"),h(e)),p&&(console.log("🔎 useSortAndFilter: Сбрасываем пагинацию"),p({current:1,pageSize:l.pageSize,total:0})),console.log("🔎 useSortAndFilter: Проверяем fetchFiles:",!!g),g){console.log("🔎 useSortAndFilter: Вызываем fetchFiles с параметрами поиска");const t={folderId:null===s?"root":s||void 0,search:(null==e?void 0:e.trim())||void 0,page:1,limit:l.pageSize,sortBy:i,sortOrder:o};console.log("🔎 useSortAndFilter: Параметры запроса:",t),g(t),console.log("🔎 useSortAndFilter: fetchFiles вызван!")}else console.error("🔎 useSortAndFilter: fetchFiles НЕ ОПРЕДЕЛЕНА!")},[h,p,l.pageSize,g,s,i,o]),w=c((e,t)=>{null==d||d(e),null==f||f(t),g&&v({folderId:null===s?"root":s||void 0,search:(null==r?void 0:r.trim())||void 0,page:l.current,limit:l.pageSize,sortBy:e,sortOrder:t})},[d,f,v,s,r,l.current,l.pageSize]),x=c((e,t)=>{p&&p({current:e,pageSize:t||l.pageSize,total:l.total}),g&&v({folderId:null===s?"root":s||void 0,search:(null==r?void 0:r.trim())||void 0,page:e,limit:t||l.pageSize,sortBy:i,sortOrder:o})},[p,l.pageSize,l.total,v,s,r,i,o]);return a(()=>{if(g){console.log("🔄 useSortAndFilter: изменение selectedFolder, загрузка файлов для папки:",s);const e=b();v(Object.assign(Object.assign({},e),{page:1}))}},[s]),a(()=>{g&&(console.log("🔄 useSortAndFilter: начальная загрузка файлов, selectedFolder:",s),v(b()))},[]),a(()=>()=>{var e;null===(e=v.cancel)||void 0===e||e.call(v)},[v]),{state:{searchTerm:r||"",sortBy:i||"name",sortOrder:o||"asc"},actions:{setSearchTerm:h||(()=>{}),setSortBy:d||(()=>{}),setSortOrder:f||(()=>{}),handleSearch:y,handleSort:w,handlePaginationChange:x,getCurrentQueryParams:b}}},Xr=()=>{const{state:e,actions:t,options:n}=Hr(),r=Gr(),{sortBy:i,sortOrder:o}=r.state,{t:a}=br(),{message:s}=O.useApp(),{selectedFolder:l,urlForm:u,pagination:h,files:d}=e,{setFiles:f,setLoading:p,setIsUrlModalVisible:g,setSelectedFiles:m,setActiveLibraryItem:v,setPagination:b}=t,{dataProviders:y}=n,w=c(async e=>{var t;if(!(null==y?void 0:y.getFiles))return[];const{files:n,pagination:r}=await y.getFiles({folderId:"folders"!==(null==e?void 0:e.folderId)?null==e?void 0:e.folderId:void 0,search:(null===(t=null==e?void 0:e.search)||void 0===t?void 0:t.trim())||void 0,sortBy:null==e?void 0:e.sortBy,sortOrder:null==e?void 0:e.sortOrder,page:null==e?void 0:e.page,limit:null==e?void 0:e.limit});return console.log("🔍 fetchFilesFromDataProvider результат:",n,"с параметрами сортировки:",{sortBy:null==e?void 0:e.sortBy,sortOrder:null==e?void 0:e.sortOrder}),r&&b&&b({current:r.page,pageSize:r.limit,total:r.total}),n},[y]),x=c(async e=>{try{null==p||p(!0),console.log("fetchFiles вызван с параметрами:",e);let t=[];if(!(null==y?void 0:y.getFiles))return void console.error("DataProvider для получения файлов не определен");t=await w(e),console.log("Получены файлы:",t),e&&(t=await $r(t,e,null==y?void 0:y.getFolders)),null==f||f(t),null==m||m(new Set)}catch(e){console.error("Ошибка при загрузке файлов:",e),s.error("Не удалось загрузить файлы")}finally{null==p||p(!1)}},[y,f,p,m,w,s]),_=c(async e=>{try{if(!(null==y?void 0:y.deleteFile))return void s.error("DataProvider для удаления файлов не настроен");if(!await y.deleteFile(e))throw new Error("Не удалось удалить файл");s.success(a("File deleted"));await x({folderId:null===l?"root":l||void 0,page:d.length>=1?h.current:h.current-1,sortBy:i,sortOrder:o})}catch(e){console.error("Ошибка при удалении файла:",e),s.error(a("Error when deleting a file"))}},[y,x,l,a,s,h,d,i,o]),C=c(async e=>{try{if(!(null==y?void 0:y.deleteFolder))return void s.error("DataProvider для удаления папок не настроен");if(!await y.deleteFolder(e))throw new Error("Не удалось удалить папку");s.success(a("Folder deleted"));l===e?await x({sortBy:i,sortOrder:o}):await x({folderId:null===l?"root":l||void 0,sortBy:i,sortOrder:o})}catch(e){console.error("Ошибка при удалении папки:",e),s.error(a("Error when deleting a folder"))}},[y,l,s,a,x,i,o]),S=c(async e=>{try{if(null==y?void 0:y.getFile){const t=await y.getFile(e);if(t)return t;throw new Error("Не удалось загрузить файл")}{const t=await fetch(`/api/files/${e}/content`);if(!t.ok)throw new Error("Ошибка загрузки файла");return await t.blob()}}catch(e){console.error("Ошибка при загрузке файла:",e)}},[y,s]),A=c(async e=>{if(!(null==y?void 0:y.uploadFile))return;const t=e.name.split(".").pop()||"";await y.uploadFile({name:e.name,size:`${(e.size/1024).toFixed(0)} КБ`,type:e.type,folderId:l||"root",data:e,extension:t}),v&&v(jr)},[y,l,v]),k=c(async e=>{try{if(null==y?void 0:y.getFolders){const t=await y.getFolders(),n=(Array.isArray(t)?t:[]).some(t=>t.id===e);return console.log(n?"✅ Папка найдена:":"❌ Папка не найдена:",e),n}}catch(e){console.warn("⚠️ Ошибка проверки папки:",e)}return!1},[null==y?void 0:y.getFolders]),T=c(async e=>{if(!(null==y?void 0:y.uploadFile))return void s.error("DataProvider для загрузки файлов не настроен");if(l)try{if(!await k(l))return console.error("❌ Выбранная папка не найдена на сервере:",l),void s.error("Выбранная папка не найдена. Попробуйте обновить список папок или создать папку заново.")}catch(e){console.warn("⚠️ Не удалось проверить существование папки, продолжаем загрузку:",e)}const t=document.createElement("input");t.type="file",t.accept="image/*",t.onchange=async t=>{var n;const r=null===(n=t.target.files)||void 0===n?void 0:n[0];if(r)if(r.type.startsWith("image/"))try{if(null==p||p(!0),null==e||e.onStart(r),null==e?void 0:e.onProgress){let t=0;const n=setInterval(()=>{t=Math.min(t+10+Math.floor(Date.now()%10),90),e.onProgress(r.name,t)},200);await A(r),clearInterval(n),e.onProgress(r.name,100)}else await A(r);null==e||e.onComplete(r.name),s.success(`${a("File")} ${r.name} ${a("has been successfully uploaded")}`),await x({folderId:null===l?"root":l||void 0,sortBy:i,sortOrder:o})}catch(t){console.error("Ошибка при загрузке файла:",t),null==e||e.onError(r.name,"Ошибка при загрузке файла"),s.error("Ошибка при загрузке файла")}finally{null==p||p(!1)}else s.error(a("Please select an image file"))},t.click()},[null==y?void 0:y.uploadFile,l,s,k,a,p,x,i,o,A]),I=c(async(e,t)=>{try{let n;const r=await(null==u?void 0:u.validateFields()),c=e||(null==r?void 0:r.fileUrl);return c?(null==p||p(!0),(null==y?void 0:y.uploadFileByUrl)?(n=await y.uploadFileByUrl({url:c,folderId:null===l?"root":l||void 0,noFolder:t}),s.success(`${a("File")} ${(null==r?void 0:r.name)||"unnamed file"} ${a("successfully uploaded")}`),null==g||g(!1),null==u||u.resetFields(),v&&v(jr),await x({folderId:null===l?"root":l||void 0,sortBy:i,sortOrder:o}),n):void s.error("Загрузка по URL не поддерживается")):void s.error("Заполните все поля")}catch(e){console.error("Ошибка при загрузке файла по URL:",e),s.error(a("Error when downloading a file by URL"))}finally{null==p||p(!1)}},[u,p,y,s,a,g,v,x,l,i,o]),E=c(async e=>{if(e.type.startsWith("image/"))try{await A(e),s.success(`${a("File")} ${e.name} ${a("has been successfully uploaded")}`)}catch(t){console.error(`Ошибка при загрузке файла ${e.name}:`,t),s.error(`Ошибка при загрузке файла ${e.name}`)}else s.warning(`Файл ${e.name} не является изображением и будет пропущен`)},[s,a,A]),P=c(async e=>{for(const t of e)await E(t);await x({folderId:null===l?"root":l||void 0,sortBy:i,sortOrder:o})},[x,l,i,o,E]);return{fetchFiles:x,handleDeleteFile:_,handleDeleteFolder:C,handleAddFile:T,handleAddFileByUrl:I,handleDroppedFiles:P,getFileData:S,uploadFileWithProvider:A}},Kr=()=>{var e;const{state:t,actions:n,options:i}=Hr(),{t:o}=br(),{message:a}=O.useApp(),{folders:s,selectedFolder:l,form:u,loading:h,isModalVisible:d}=t,{setFolders:f,setLoading:p,setIsModalVisible:g}=n,{dataProviders:m}=i,v=c(async()=>{console.log("Запрос папок..."),null==p||p(!0);try{let e=[];if(!(null==m?void 0:m.getFolders))return void console.error("DataProvider для папок не определен");e=await m.getFolders(),console.log("Полученные папки:",e);const t=Array.isArray(e)?e:[];null==f||f(t);const n=t.filter(e=>e.id===e.parentId);n.length>0&&console.warn("Обнаружены папки с циклическими зависимостями:",n)}catch(e){console.error("Ошибка при загрузке папок:",e),a.error("Ошибка при загрузке папок")}finally{null==p||p(!1)}},[null==m?void 0:m.getFolders,f,p,a]),b=c(()=>{u.setFieldsValue({folderName:"Новая папка"}),null==g||g(!0)},[u,g]),y=c(e=>{const r=[...(Array.isArray(s)?s:[]).filter(t=>t.id!==e.id),e];if(null==f||f(r),console.log("📂 Обновлен список папок, новая папка:",e),n.setSelectedFolder&&(n.setSelectedFolder(e.id),console.log("🎯 Выбрана созданная папка как активная:",e.id)),n.setPathHistory){const r=[...t.pathHistory||[],{id:e.id,name:e.name}];n.setPathHistory(r),console.log("🧭 Обновлен путь навигации:",r)}},[s,f,n,t.pathHistory]),w=c(async e=>{try{if(null==m?void 0:m.getFolders){const t=await m.getFolders(),n=(Array.isArray(t)?t:[]).some(t=>t.id===e);return console.log(n?"✅ Папка найдена:":"❌ Папка не найдена:",e),n}}catch(e){console.warn("⚠️ Ошибка проверки папки:",e)}return!1},[null==m?void 0:m.getFolders]),x=c(async()=>{try{const e=(await u.validateFields()).folderName.trim();if(!e)return void a.error("Имя папки не может быть пустым");const t=l&&"folders"!==l?l:null;let n;if(console.log("🆕 Создание новой папки:",{folderName:e,parentId:t,selectedFolder:l}),!(null==m?void 0:m.createFolder))return void a.error("DataProvider для создания папок не настроен");n=await m.createFolder({name:e,parentId:t}),(e=>{if(!e||!e.id)throw new Error("Некорректный ответ от сервера: отсутствует ID папки");if(e.id===e.parentId&&e.parentId)throw console.error("Обнаружена циклическая зависимость: папка является родителем сама для себя"),new Error("Ошибка: папка не может быть родителем самой себя")})(n),y(n),await v(),await new Promise(e=>setTimeout(e,200));await w(n.id)||console.warn("⚠️ Не удалось подтвердить создание папки на сервере, но продолжаем..."),a.success(`Папка "${e}" создана и выбрана`),null==g||g(!1)}catch(e){console.error("❌ Ошибка при создании папки:",e),a.error(e instanceof Error?e.message:o("Failed to create folder"))}},[u,l,null==m?void 0:m.createFolder,y,g,o,v,w,a]),_=c(()=>{null==g||g(!1)},[g]),C=c((e,t=new Set)=>{const n=Array.isArray(s)?s:[];return e.map(e=>{if(t.has(e.id))return console.warn(`Обнаружен цикл в структуре папок с id=${e.id}. Пропускаем обработку дочерних элементов.`),{key:e.id,label:e.name+" (ошибка)",icon:r.createElement(le,{style:{color:"red"}})};const i=new Set(t);i.add(e.id);const o=n.filter(t=>t.parentId===e.id&&t.id!==e.id);return{key:e.id,label:e.name,children:o.length>0?C(o,i):void 0}})},[s]),S=c(()=>{const e=Array.isArray(s)?s:[],t={key:"folders",label:o("Folders"),children:[]},n=e.filter(e=>null===e.parentId||!e.parentId);return t.children=C(n),[t]},[s,o,C]),A=c(async(e,t)=>{var r;try{if(!t||""===t.trim())return void a.error("Имя папки не может быть пустым");if(!(null===(r=i.dataProviders)||void 0===r?void 0:r.renameFolder))return void a.error("DataProvider для переименования папок не настроен");const o=await i.dataProviders.renameFolder(e,t.trim());if(!(null==o?void 0:o.id))return void a.error("Некорректный ответ при переименовании папки");await v(),e!==o.id&&n.setSelectedFolder&&n.setSelectedFolder(o.id),a.success(`Папка переименована на "${t.trim()}"`)}catch(e){console.error("Ошибка при переименовании папки:",e),a.error(e instanceof Error?e.message:"Ошибка при переименовании папки")}},[v,a,null===(e=i.dataProviders)||void 0===e?void 0:e.renameFolder]);return{state:{folders:s,isCreatingFolder:d,loading:h},actions:{fetchFolders:v,handleCreateFolder:b,handleModalOk:x,handleModalCancel:_,generateMenuItems:S,renameFolder:A}}},qr=new Map,Zr=(e,t)=>{qr.set(e,t),console.log("Изображение сохранено в кеш:",e),qr.size>350&&(Array.from(qr.keys()).slice(0,50).forEach(e=>qr.delete(e)),console.warn("Очищен кеш изображений. Удалено 50 самых старых записей."))},Jr=e=>{if(e.type&&e.type.startsWith("image/"))return!0;if(e.name){const t=e.name.toLowerCase().split(".").pop();return Br.includes(t||"")}return!1},Qr=({src:t,alt:n,className:r,width:i,height:s,preview:l=!1,file:u})=>{const h=Xr(),[d,f]=o(!1),[p,g]=o(t),[m,v]=o(!1),b=c(e=>{g(e),f(!1),v(!1)},[]),y=c(e=>{console.warn("Не удалось загрузить изображение:",e),g(void 0),f(!0),v(!1)},[]),w=c(()=>{g(Vr),f(!0)},[]),x=c(e=>{g(e),f(!1)},[]),_=c(e=>{const t=e.split(",")[1];t&&t.length>20?g(e):(console.warn("Некорректные base64 данные:",e.substring(0,50)+"..."),w())},[w]),C=c(async e=>{if(console.log("loadImageFromFile",e),(e=>qr.has(e))(e))return console.log("Изображение найдено в кеше:",e),(e=>qr.get(e))(e);if(!u||!Jr(u))return console.warn("Файл не является изображением:",null==u?void 0:u.name,null==u?void 0:u.type),w(),Vr;try{const t=await h.getFileData(e);if(!t)throw new Error("Ошибка загрузки файла");return new Promise((n,r)=>{const i=new FileReader;i.onload=()=>{const t=i.result;Zr(e,t),n(t)},i.onerror=()=>r(new Error("Ошибка чтения файла")),i.readAsDataURL(t)})}catch(e){throw console.error("Ошибка загрузки изображения:",e),e}},[u,w,h]),S=c(()=>{(null==u?void 0:u.id)&&Jr(u)?C(u.id).then(b).catch(y):u&&!Jr(u)&&(console.warn("Файл не является изображением, показываем fallback:",u.name,u.type),w())},[u,C,b,y,w]),A=c(e=>{console.log("HandleBlobSrc:",{blobSrc:e,file:u?{id:u.id,name:u.name,type:u.type,extension:u.extension,folderId:u.folderId}:null}),u&&Jr(u)?(console.log("Blob файл является изображением, устанавливаем src:",u.name,u.type),g(e),f(!1)):(console.warn("Blob файл не является изображением, показываем fallback:",null==u?void 0:u.name,null==u?void 0:u.type),w())},[u,w,Jr]),k=c(()=>{(null==u?void 0:u.id)&&Jr(u)?(v(!0),C(u.id).then(b).catch(y)):u&&!Jr(u)?(console.warn("Файл не является изображением, показываем fallback:",u.name,u.type),w()):(console.warn("Неподдерживаемый формат изображения:",t),g(void 0))},[u,t,C,b,y,w]);a(()=>{v(!1),t?t.startsWith("data:image/")?_(t):t.startsWith("blob:")?A(t):t.startsWith("http://")||t.startsWith("https://")||t.startsWith("/")?x(t):(console.log("setImageError 1"),k()):S()},[t,S,_,A,x,k]);return e(F,{className:r,src:p,alt:n,width:i,height:s,preview:l&&!d&&{src:p,toolbarRender:()=>null,destroyOnHidden:!0},onError:()=>{console.warn("Ошибка загрузки изображения:",(null==p?void 0:p.substring(0,50))+"..."),f(!0)},fallback:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAiIGhlaWdodD0iODAiIHZpZXdCb3g9IjAgMCA4MCA4MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjgwIiBoZWlnaHQ9IjgwIiBmaWxsPSIjRjVGNUY1Ii8+CjxwYXRoIGQ9Ik0yNCAzMkw0MCA0OEw1NiAzMkw2NCA0MEw2NCA2NEgyNFYzMloiIGZpbGw9IiNEOUQ5RDkiLz4KPC9zdmc+",loading:m?"lazy":void 0})},ei="filemanager_view_mode",ti=()=>{const{state:e}=Hr(),{files:t,loading:n,isUrlModalVisible:r}=e,i=Xr(),o=(()=>{const{state:e,actions:t}=Hr(),{selectedFiles:n}=e,{setSelectedFiles:r}=t,i=c(e=>{if(!n||!r)return;const t=new Set(n);t.has(e)?t.delete(e):t.add(e),r(t)},[n,r]);return{state:{selectedFiles:n||new Set},actions:{toggleFileSelection:i}}})(),a=(e=>{const{state:t,actions:n,options:r}=Hr(),{t:i}=br(),o=Kr(),{fetchFolders:a}=o.actions,{files:s,selectedFolder:l,selectedFiles:u,fileToRename:h,renameForm:d,isRenameModalVisible:f,moveForm:p,copyForm:g}=t,{setFileToRename:m,setIsRenameModalVisible:v,setIsMoveModalVisible:b,setIsCopyModalVisible:y,setSelectedFiles:w,setIsDeleteConfirmVisible:x}=n,{apiEndpoints:_,dataProviders:C}=r,S=c(e=>{null==m||m(e),null==v||v(!0);const t=null==s?void 0:s.find(t=>t.id===e);t&&d&&d.setFieldsValue({newFileName:t.name})},[m,v,s,d]),A=c(()=>{null==v||v(!1),null==m||m(null),null==d||d.resetFields()},[v,m,d]),k=c(async()=>{if(h&&d)try{const t=await d.validateFields();if(!(null==t?void 0:t.newFileName))return;const r=null==s?void 0:s.find(e=>e.id===h);if((null==r?void 0:r.isFolder)||h.startsWith("folder_")){if(!(null==C?void 0:C.renameFolder))return void M.error("DataProvider для переименования папок не настроен");{const e=await C.renameFolder(h,t.newFileName.trim());if(!(null==e?void 0:e.id))return void M.error("Некорректный ответ при переименовании папки");M.success(`${i("Folder renamed to")} ${t.newFileName}`),await a(),h!==e.id&&n.setSelectedFolder&&n.setSelectedFolder(e.id)}}else{if(!(null==C?void 0:C.renameFile))return void M.error("DataProvider для переименования файлов не настроен");await C.renameFile(h,t.newFileName),M.success(`${i("File renamed to")} ${t.newFileName}`)}A(),await e({folderId:l||void 0})}catch(e){console.error("Ошибка при переименовании:",e),M.error(e instanceof Error?e.message:"Ошибка при переименовании")}},[h,d,s,C,_,A,e,l,i]),T=c(()=>{null==b||b(!0)},[b]),I=c(()=>{null==b||b(!1),null==p||p.resetFields()},[b,p]),O=c(async()=>{if(u&&0!==u.size&&p)try{const t=await p.validateFields(),n=null==t?void 0:t.targetFolder;if(!n)return void M.error("Выберите папку назначения");const r=Array.from(u);let i=0,o=0,c=!1;for(const e of r)try{const t=null==s?void 0:s.find(t=>t.id===e),r=(null==t?void 0:t.isFolder)||e.startsWith("folder_");r&&(c=!0),(null==C?void 0:C.moveItem)?(await C.moveItem({itemId:e,targetFolderId:n,isFolder:r}),i++):(console.warn(`DataProvider для перемещения не настроен для ${r?"папки":"файла"} ${e}`),o++)}catch(t){console.error(`Ошибка при перемещении объекта ${e}:`,t),o++}i>0&&M.success(`Успешно перемещено ${i} из ${r.length} объектов`),o>0&&M.error(`Не удалось переместить ${o} из ${r.length} объектов`),I(),null==w||w(new Set),c&&await a(),await e({folderId:l||void 0})}catch(e){console.error("Ошибка при перемещении:",e),M.error("Ошибка при перемещении")}},[u,p,s,C,_,I,w,e,l]),E=c(()=>{null==y||y(!0)},[y]),P=c(()=>{null==y||y(!1),null==g||g.resetFields()},[y,g]),F=c(async()=>{if(u&&0!==u.size&&g)try{const t=await g.validateFields(),n=null==t?void 0:t.targetFolder;if(!n)return void M.error("Выберите папку назначения");const r=Array.from(u);let i=0,o=0,c=!1;for(const e of r)try{const t=null==s?void 0:s.find(t=>t.id===e),r=(null==t?void 0:t.isFolder)||e.startsWith("folder_");r&&(c=!0),(null==C?void 0:C.copyItem)?(await C.copyItem({itemId:e,targetFolderId:n,isFolder:r}),i++):(console.warn(`DataProvider для перемещения не настроен для ${r?"папки":"файла"} ${e}`),o++)}catch(t){console.error(`Ошибка при копировании объекта ${e}:`,t),o++}i>0&&M.success(`Успешно скопировано ${i} из ${r.length} объектов`),o>0&&M.error(`Не удалось скопировать ${o} из ${r.length} объектов`),P(),null==w||w(new Set),c&&await a(),await e({folderId:l||void 0})}catch(e){console.error("Ошибка при копировании:",e),M.error("Ошибка при копировании")}},[u,g,s,_,P,w,e,l]),j=c(()=>{null==x||x(!0)},[x]),R=c(()=>{null==x||x(!1)},[x]),D=c(async()=>{var t;if(u&&0!==u.size)try{const r=Array.from(u);let i=0,o=0;for(const e of r)try{const t=null==s?void 0:s.find(t=>t.id===e);(null==t?void 0:t.isFolder)||e.startsWith("folder_")?(null==C?void 0:C.deleteFolder)?await C.deleteFolder(e)?i++:o++:(console.warn("DataProvider для удаления папок не настроен"),o++):(null==C?void 0:C.deleteFile)?await C.deleteFile(e)?i++:o++:(console.warn("DataProvider для удаления файлов не настроен"),o++)}catch(t){console.error(`Ошибка при удалении объекта ${e}:`,t),o++}i>0&&M.success(`Успешно удалено ${i} из ${r.length} объектов`),o>0&&M.error(`Не удалось удалить ${o} из ${r.length} объектов`),null==w||w(new Set),null==x||x(!1),await(null===(t=n.fetchFolders)||void 0===t?void 0:t.call(n)),await e({folderId:l||void 0})}catch(e){console.error("Ошибка при удалении:",e),M.error("Ошибка при удалении")}else null==x||x(!1)},[u,s,C,n,e,l,w,x]);return{state:{isRenamingFile:f||!1,fileToRename:h},actions:{showRenameModal:S,handleRenameCancel:A,handleRenameOk:k,showMoveModal:T,handleMoveCancel:I,handleMoveOk:O,showCopyModal:E,handleCopyCancel:P,handleCopyOk:F,showDeleteConfirm:j,handleDeleteConfirmCancel:R,handleDeleteConfirmOk:D}}})(i.fetchFiles);return{state:{files:t||[],selectedFiles:o.state.selectedFiles,loading:n||!1,isAddingFileByUrl:r||!1,isRenamingFile:a.state.isRenamingFile,fileToRename:a.state.fileToRename},actions:{fetchFiles:i.fetchFiles,handleDeleteFile:i.handleDeleteFile,handleDeleteFolder:i.handleDeleteFolder,handleAddFile:i.handleAddFile,handleAddFileByUrl:i.handleAddFileByUrl,handleDroppedFiles:i.handleDroppedFiles,uploadFileWithProvider:i.uploadFileWithProvider,toggleFileSelection:o.actions.toggleFileSelection,showRenameModal:a.actions.showRenameModal,handleRenameCancel:a.actions.handleRenameCancel,handleRenameOk:a.actions.handleRenameOk,showMoveModal:a.actions.showMoveModal,handleMoveCancel:a.actions.handleMoveCancel,handleMoveOk:a.actions.handleMoveOk,showCopyModal:a.actions.showCopyModal,handleCopyCancel:a.actions.handleCopyCancel,handleCopyOk:a.actions.handleCopyOk,showDeleteConfirm:a.actions.showDeleteConfirm,handleDeleteConfirmCancel:a.actions.handleDeleteConfirmCancel,handleDeleteConfirmOk:a.actions.handleDeleteConfirmOk}}},ni=()=>{const{notification:e}=O.useApp(),t=Hr().options.notification;return h(()=>Object.assign(Object.assign({},e),t),[e,t])},ri="filemanager_sidebar_width",ii=()=>{const{options:e}=Hr(),{customIcons:t}=e,n=(e,n,r)=>{const o=null==t?void 0:t[e];return o?i.createElement(o,r):i.createElement(n,r)};return{RootFolderIcon:e=>n("rootFolder",le,e),FolderIcon:e=>n("folder",le,e),FolderOpenIcon:e=>n("folderOpen",ve,e),AddFolderIcon:e=>n("addFolder",me,e),FileIcon:e=>n("file",ge,e),UploadIcon:e=>n("upload",pe,e),UploadByUrlIcon:e=>n("uploadByUrl",fe,e),ExpandArrowIcon:e=>n("expandArrow",de,e),CollapseArrowIcon:e=>n("collapseArrow",he,e),FolderPreviewIcon:e=>n("folderPreview",le,e),GridViewIcon:e=>n("gridView",ue,e),ListViewIcon:e=>n("listView",ce,e),getCustomIcon:n}};var oi={headerContainer:"headerContainer",actionsContainer:"actionsContainer",filesContainer:"filesContainer",paginationContainer:"paginationContainer",uploadZone:"uploadZone",active:"active",uploadIcon:"uploadIcon",uploadText:"uploadText",uploadSubtext:"uploadSubtext",tableContainer:"tableContainer",imagePreview:"imagePreview",fileManagerTableFolder:"fileManagerTableFolder",fileManagerTableFolderInner:"fileManagerTableFolderInner",sortSelect:"sortSelect",fileName:"fileName",fileNameClickable:"fileNameClickable",fileItemCount:"fileItemCount",fileSize:"fileSize",fileDate:"fileDate",tableImagePreview:"tableImagePreview",tableFolderIcon:"tableFolderIcon",gridRow:"gridRow",gridCard:"gridCard",gridCardContent:"gridCardContent",gridCheckbox:"gridCheckbox",gridPreviewContainer:"gridPreviewContainer",gridPreviewContainerFolder:"gridPreviewContainerFolder",gridFolderIcon:"gridFolderIcon",gridFolderIconImage:"gridFolderIconImage",gridFileName:"gridFileName",gridFileInfo:"gridFileInfo",actionsBox:"actionsBox"};const{Option:ai}=j,si=({files:r,handleSearch:i,handleSort:s,sortBy:l,sortOrder:h,handleSortOptionChange:d,pagination:f,setPagination:p,loading:g,handleItemClick:m,selectedFiles:v,toggleFileSelection:b,handleDroppedFiles:y,fileUpload:w})=>{const{t:x}=br(),{FolderPreviewIcon:_}=ii(),{options:C}=Hr(),{dataProviders:S}=C,{viewMode:A,setViewMode:k}=(()=>{const[e,t]=o(()=>{try{return localStorage.getItem(ei)||"table"}catch(e){return"table"}}),n=c(e=>{t(e);try{localStorage.setItem(ei,e)}catch(e){console.warn("Не удалось сохранить режим отображения:",e)}},[]),r=c(()=>{n("table"===e?"grid":"table")},[e,n]);return{viewMode:e,setViewMode:n,toggleViewMode:r}})(),[T,I]=o(!1),[O,E]=o({}),P=u(0),F=`${l}-${h}`,H=c(async e=>{try{if(null==S?void 0:S.getFiles){const{files:t,pagination:n}=await S.getFiles({folderId:"folders"===e?void 0:e});return(null==n?void 0:n.total)||t.filter(e=>!e.isFolder).length}return 0}catch(t){return console.error(`Ошибка при получении количества файлов для папки ${e}:`,t),0}},[S]),W=c(async()=>{const e=r.filter(e=>e.isFolder);if(0===e.length)return;const t={},n=e.map(async e=>{t[e.id]=await H(e.id)});await Promise.all(n),E(t)},[r,H]);a(()=>{W()},[W]);const Y=c(e=>{e.preventDefault(),e.stopPropagation(),P.current+=1,e.dataTransfer.items&&e.dataTransfer.items.length>0&&I(!0)},[]),$=c(e=>{e.preventDefault(),e.stopPropagation(),P.current-=1,0===P.current&&I(!1)},[]),G=c(e=>{e.preventDefault(),e.stopPropagation()},[]),X=c(e=>{if(e.preventDefault(),e.stopPropagation(),I(!1),P.current=0,e.dataTransfer.files&&e.dataTransfer.files.length>0){const t=Array.from(e.dataTransfer.files);y(t).catch(e=>{console.error("Ошибка при загрузке файлов:",e),M.error("Произошла ошибка при загрузке файлов")})}},[y]),K=[{key:"selection",width:60,render:(t,n)=>e(R,{checked:v.has(n.id),onChange:()=>b(n.id)})},{key:"preview",width:100,render:(t,n)=>n.isFolder?e("div",{className:oi.fileManagerTableFolder,children:e("div",{className:oi.fileManagerTableFolderInner,children:e(_,{className:oi.tableFolderIcon})})}):e(Qr,{className:`${oi.imagePreview} ${oi.tableImagePreview}`,src:n.thumbnail||n.thumbnailUrl||n.url,alt:n.name,width:100,height:60,preview:!0,file:n})},{title:x("Name"),dataIndex:"name",key:"name",render:(e,n)=>{const r=n.isFolder&&O[n.id]||0,i=1===r?"item":"items";return t("div",{className:n.isFolder?oi.fileNameClickable:oi.fileName,children:[e||"Без названия",n.isFolder&&t("div",{className:oi.fileItemCount,children:[r," ",i]})]})}},{title:x("Dimensions"),key:"dimensions",width:100,render:(t,n)=>e("div",{className:oi.fileSize,children:n.isFolder?"Папка":n.dimensions||"600×300"})},{title:x("Size"),key:"size",width:100,render:(t,n)=>e("div",{className:oi.fileSize,children:n.isFolder?"-":`${n.size||350} КБ`})},{title:x("Date"),dataIndex:"date",key:"date",width:180,render:(t,n)=>{const r=function(e){const t=new Date(e);return!isNaN(t.getTime())}(n.date)?new Date(n.date):new Date;return e("div",{className:oi.fileDate,children:x("date_of_add",{date:(e=>`${e.getDate()} ${[x("months.january"),x("months.february"),x("months.march"),x("months.april"),x("months.may"),x("months.june"),x("months.july"),x("months.august"),x("months.september"),x("months.october"),x("months.november"),x("months.december")][e.getMonth()]} ${e.getFullYear()}`)(r)})})}}];return t("div",{className:"content-layout",onDragEnter:Y,onDragLeave:$,onDragOver:G,onDrop:X,children:[T&&t("div",{className:`${oi.uploadZone} ${T?oi.active:""}`,children:[e(Fr,{className:oi.uploadIcon,customIcon:null==C?void 0:C.dragDropIcon}),e("div",{className:oi.uploadText,children:x("Drag files to upload")}),e("div",{className:oi.uploadSubtext,children:x("Drop files here to upload")})]}),e("h1",{children:"My files"}),t("div",{className:oi.headerContainer,children:[e("div",{className:"search-container",children:e(Mr,{placeholder:x("Image search..."),onSearch:i,className:oi.searchInput})}),t("div",{className:oi.actionsBox,children:[t("div",{className:"sort-container",children:[e("div",{className:"sort-label",children:x("Sort by")}),t(j,{value:F,onChange:d,className:oi.sortSelect,popupMatchSelectWidth:!1,children:[e(ai,{value:"date-desc",children:x("Newest first")}),e(ai,{value:"date-asc",children:x("Oldest first")}),e(ai,{value:"size-desc",children:x("Largest first")}),e(ai,{value:"size-asc",children:x("Smallest first")}),e(ai,{value:"name-asc",children:x("A-Z")}),e(ai,{value:"name-desc",children:x("Z-A")}),e(ai,{value:"type-asc",children:x("By type")})]})]}),e("div",{className:oi.actionsContainer,children:e(D,{options:[{value:"grid",icon:e(ue,{})},{value:"table",icon:e(ce,{})}],value:A,onChange:e=>k(e)})})]})]}),e("div",{className:oi.filesContainer,children:t(n,"table"===A?{children:[g||r&&0!==r.length?e("div",{className:oi.tableContainer,children:e(N,{dataSource:r,columns:K,rowKey:"id",pagination:!1,loading:g,onRow:e=>({onClick:t=>{const n=t.target;n.closest(".ant-checkbox-wrapper")||n.closest(".ant-checkbox")||n.classList.contains("ant-checkbox-input")||m(e)}}),showHeader:!1})}):e(L,{description:x("No data to display"),style:{margin:"40px 0"}}),f.total>f.pageSize&&e("div",{className:oi.paginationContainer,children:e(z,{current:f.current,pageSize:f.pageSize,total:f.total,onChange:(e,t)=>p({current:e,pageSize:t,total:f.total}),showSizeChanger:!0,showTotal:e=>x("total pages",{total:e})})})]}:{children:[e(()=>r&&0!==r.length?e(B,{gutter:[16,16],className:oi.gridRow,style:{gap:32,padding:"0 16px 16px"},children:r.map(r=>e(V,{className:oi.gridCard_col,style:{padding:0},children:t(U,{hoverable:!0,cover:e("div",{className:r.isFolder?oi.gridPreviewContainerFolder:oi.gridPreviewContainer,onClick:e=>{e.stopPropagation(),r.isFolder&&m(r)},children:r.isFolder?e("div",{className:oi.gridFolderIcon,children:e(_,{className:oi.gridFolderIconImage})}):e(Qr,{src:r.thumbnail||r.thumbnailUrl||r.url,alt:r.name,className:oi.gridImagePreview,preview:!0,file:r})}),className:`${oi.gridCard} ${v.has(r.id)?oi.gridCardSelected:""}`,onClick:e=>{e.stopPropagation(),b(r.id)},children:[t("div",{className:oi.gridCardContent,children:[e("div",{className:oi.gridFileName,children:r.name||x("Untitled")}),e("div",{className:oi.gridFileInfo,children:r.isFolder?(()=>{const e=O[r.id]||0;return`${e} ${1===e?"item":"items"}`})():t(n,{children:[r.dimensions||"1440 × 900"," • ",r.size||"120.54 КБ"," • jpg"]})})]}),e("div",{onClick:e=>{e.stopPropagation()},className:oi.gridCheckbox,children:e(R,{checked:v.has(r.id),onChange:e=>{e.stopPropagation(),b(r.id)}})})]})},r.id))}):e(L,{description:x("No data to display"),style:{margin:"40px 0"}}),{}),f.total>f.pageSize&&e("div",{className:oi.paginationContainer,children:e(z,{current:f.current,pageSize:f.pageSize,total:f.total,onChange:(e,t)=>p({current:e,pageSize:t,total:f.total}),showSizeChanger:!0,showTotal:e=>x("total pages",{total:e})})})]})})]})},li=({isModalVisible:r,handleModalOk:i,handleModalCancel:o,form:a,selectedFolder:s,folders:l,isUrlModalVisible:c,setIsUrlModalVisible:u,handleAddFileByUrl:h,urlForm:d,isRenameModalVisible:f,handleRenameOk:p,handleRenameCancel:g,renameForm:m,fileToRename:v,files:b,isMoveModalVisible:y,handleMoveOk:w,handleMoveCancel:x,moveForm:_,selectedFiles:C,isRenameFolderModalVisible:S,handleRenameFolderOk:A,handleRenameFolderCancel:k,renameFolderForm:T,folderToRename:I,isCopyModalVisible:O,handleCopyOk:M,handleCopyCancel:F,copyForm:j,isDeleteConfirmVisible:R,handleDeleteConfirmOk:D,handleDeleteConfirmCancel:L})=>{var N,z,B;const{t:V}=br(),U=Array.isArray(b)?b:[],Y=v?null===(N=U.find(e=>e.id===v))||void 0===N?void 0:N.name:"",$=Array.isArray(l)?l:[],G=I?null===(z=$.find(e=>e.id===I))||void 0===z?void 0:z.name:"",X=v?U.find(e=>e.id===v):null,K=(null==X?void 0:X.isFolder)||(null==v?void 0:v.startsWith("folder_")),q=()=>{const t=(n=null,r=new Set)=>l.filter(e=>{const t=null===n&&!e.parentId,r=e.parentId===n;return t||r}).map(n=>{if(r.has(n.id))return{key:n.id,title:`${n.name} (циклическая ссылка)`,icon:e(le,{style:{color:"red"}}),disabled:!0,isLeaf:!0};const i=Array.from(C).includes(n.id),o=new Set(r);o.add(n.id);const a=t(n.id,o);return{key:n.id,title:n.name,icon:e(le,{}),disabled:i,children:a.length>0?a:void 0,isLeaf:0===a.length}}),n=t();return[{key:"root",title:V("Folders"),icon:e(le,{}),children:n}]};return t(n,{children:[e(H,{title:e("div",{className:"modal-title",children:V("Creating a new folder")}),open:r,onOk:i,onCancel:o,okText:V("Create"),cancelText:V("Cancel"),children:t(P,{form:a,layout:"vertical",children:[e(P.Item,{name:"folderName",label:e("div",{className:"form-label",children:V("Folder name")}),rules:[{required:!0,message:V("Enter the name of the folder")}],initialValue:V("New folder"),className:"form-item",children:e(E,{autoFocus:!0,className:"form-input"})}),e("div",{children:s&&"folders"!==s?t("p",{children:[V("A folder will be created inside:")," ",(null===(B=$.find(e=>e.id===s))||void 0===B?void 0:B.name)||V("selected folder")]}):e("p",{children:V("The folder will be created in the root directory")})})]})}),e(H,{title:e("div",{className:"modal-title",children:V("Upload image by URL")}),open:c,onOk:()=>h(null),onCancel:()=>u(!1),okText:V("Download"),cancelText:V("Cancel"),children:t(P,{form:d,layout:"vertical",children:[e(P.Item,{name:"fileUrl",label:e("div",{className:"form-label",children:V("image URL")}),rules:[{required:!0,message:V("Enter the URL of the image")}],className:"form-item",children:e(E,{autoFocus:!0,placeholder:"https://example.com/image.jpg",className:"form-input"})}),e("p",{children:V("Supported formats: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP")})]})}),e(H,{title:e("div",{className:"modal-title",children:K?`${V("Rename folder")} ${Y}`:V("Rename file",{currentFileName:Y})}),open:f,onOk:p,onCancel:g,okText:V("Rename"),cancelText:V("Cancel"),children:e(P,{form:m,layout:"vertical",children:e(P.Item,{name:"newFileName",label:e("div",{className:"form-label",children:V(K?"New folder name":"New file name")}),rules:[{required:!0,message:V(K?"Enter a new folder name":"Enter a new file name")}],className:"form-item",children:e(E,{autoFocus:!0,className:"form-input"})})})}),e(H,{title:e("div",{className:"modal-title",children:V("Move to folder")}),open:y,onOk:w,onCancel:x,okText:"Переместить",cancelText:V("Cancel"),children:t(P,{form:_,layout:"vertical",children:[e("div",{className:"file-name-label",children:V("Selected files:",{count:C.size})}),e(P.Item,{name:"targetFolder",label:e("div",{className:"form-label",children:V("Select the destination folder")}),rules:[{required:!0,message:V("Select the destination folder")}],className:"form-item",children:e(W,{defaultExpandAll:!0,treeData:q(),selectable:!0,onSelect:e=>{e.length>0&&_.setFieldsValue({targetFolder:e[0]})}})})]})}),e(H,{title:t("div",{className:"modal-title",children:[V("Rename folder")," ",G]}),open:S,onOk:A,onCancel:k,okText:V("Rename"),cancelText:V("Cancel"),children:e(P,{form:T,layout:"vertical",children:e(P.Item,{name:"newFolderName",label:e("div",{className:"form-label",children:V("New folder name")}),rules:[{required:!0,message:V("Enter a new folder name")}],className:"form-item",children:e(E,{autoFocus:!0,className:"form-input"})})})}),e(H,{title:e("div",{className:"modal-title",children:V("Copy to folder")}),open:O,onOk:M,onCancel:F,okText:V("Copy"),cancelText:V("Cancel"),children:t(P,{form:j,layout:"vertical",children:[e("div",{className:"file-name-label",children:V("Selected files:",{count:C.size})}),e(P.Item,{name:"targetFolder",label:e("div",{className:"form-label",children:V("Select the destination folder")}),rules:[{required:!0,message:V("Select the destination folder")}],className:"form-item",children:e(W,{defaultExpandAll:!0,treeData:q(),selectable:!0,onSelect:e=>{e.length>0&&j.setFieldsValue({targetFolder:e[0]})}})})]})}),e(H,{title:e("div",{className:"modal-title",children:V("Confirm deletion")}),open:!!R,onOk:()=>D&&D(),onCancel:()=>L&&L(),okText:V("Delete"),cancelText:V("Cancel"),okButtonProps:{danger:!0},children:e("div",{children:V("Are you sure you want to delete the selected items?")})})]})},ci=e=>{const{state:t,actions:n,options:r}=Hr(),{t:i}=br(),{folders:o,folderToRename:a,renameFolderForm:s,isRenameFolderModalVisible:l}=t,{setFolderToRename:u,setIsRenameFolderModalVisible:h}=n,{apiEndpoints:d,dataProviders:f}=r,p=c(e=>{null==u||u(e),null==h||h(!0);const t=null==o?void 0:o.find(t=>t.id===e);t&&s&&s.setFieldsValue({newFolderName:t.name})},[u,h,o,s]),g=c(()=>{null==h||h(!1),null==u||u(null),null==s||s.resetFields()},[h,u,s]),m=c(async()=>{if(a&&s)try{const t=await s.validateFields();if(!(null==t?void 0:t.newFolderName))return;if(!(null==f?void 0:f.renameFolder))return void M.error("DataProvider для переименования папок не настроен");const r=await f.renameFolder(a,t.newFolderName.trim());if(!(null==r?void 0:r.id))return void M.error("Некорректный ответ при переименовании папки");M.success(`${i("Folder renamed to")} ${t.newFolderName}`),g(),await e(),a!==r.id&&n.setSelectedFolder&&n.setSelectedFolder(r.id)}catch(e){console.error("Ошибка при переименовании папки:",e),M.error("Ошибка при переименовании папки")}},[a,s,d,g,e,i]);return{state:{isRenamingFolder:l||!1,folderToRename:a},actions:{showRenameFolderModal:p,handleRenameFolderCancel:g,handleRenameFolderOk:m}}},ui=()=>e("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"mixed-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:e("path",{d:"M1 1h2v2H1V1zm0 4h2v2H1V5zm0 4h2v2H1V9zm4-8h2v2H5V1zm0 4h2v2H5V5zm0 4h2v2H5V9zm4-8h2v2H9V1zm0 4h2v2H9V5zm0 4h2v2H9V9z"})}),hi=()=>e("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"landscape-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:e("path",{d:"M1 3h10v6H1V3zm1 1v4h8V4H2z"})}),di=()=>e("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"portrait-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:e("path",{d:"M3 1h6v10H3V1zm1 1v8h4V2H4z"})}),fi=()=>e("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"square-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:e("path",{d:"M1 1h10v10H1V1zm1 1v8h8V2H2z"})}),pi=()=>e("svg",{width:"20",height:"20",style:{verticalAlign:"-0.35em",marginRight:10},viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M7.49984 11.668H15.8332L12.9582 7.91797L11.0415 10.418L9.74984 8.7513L7.49984 11.668ZM6.6665 15.0013C6.20817 15.0013 5.81581 14.8381 5.48942 14.5117C5.16303 14.1853 4.99984 13.793 4.99984 13.3346V3.33464C4.99984 2.8763 5.16303 2.48394 5.48942 2.15755C5.81581 1.83116 6.20817 1.66797 6.6665 1.66797H16.6665C17.1248 1.66797 17.5172 1.83116 17.8436 2.15755C18.17 2.48394 18.3332 2.8763 18.3332 3.33464V13.3346C18.3332 13.793 18.17 14.1853 17.8436 14.5117C17.5172 14.8381 17.1248 15.0013 16.6665 15.0013H6.6665ZM6.6665 13.3346H16.6665V3.33464H6.6665V13.3346ZM3.33317 18.3346C2.87484 18.3346 2.48248 18.1714 2.15609 17.8451C1.8297 17.5187 1.6665 17.1263 1.6665 16.668V5.0013H3.33317V16.668H14.9998V18.3346H3.33317Z",fill:"currentColor"})}),gi=()=>e("svg",{width:"20",height:"20",style:{verticalAlign:"-0.35em",marginRight:10},viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M3.33317 14.1654C2.87484 14.1654 2.48248 14.0022 2.15609 13.6758C1.8297 13.3494 1.6665 12.957 1.6665 12.4987V7.4987C1.6665 7.04036 1.8297 6.648 2.15609 6.32161C2.48248 5.99523 2.87484 5.83203 3.33317 5.83203H6.6665C7.12484 5.83203 7.5172 5.99523 7.84359 6.32161C8.16998 6.648 8.33317 7.04036 8.33317 7.4987H3.33317V12.4987H6.6665V10.832H4.99984V9.16536H8.33317V12.4987C8.33317 12.957 8.16998 13.3494 7.84359 13.6758C7.5172 14.0022 7.12484 14.1654 6.6665 14.1654H3.33317ZM9.99984 14.1654V5.83203H11.6665V14.1654H9.99984ZM13.3332 14.1654V5.83203H19.1665V7.4987H14.9998V9.16536H18.3332V10.832H14.9998V14.1654H13.3332Z",fill:"currentColor"})}),mi=()=>e("svg",{width:"20",height:"20",style:{verticalAlign:"-0.35em",marginRight:10},viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M0.833496 15.8346V4.16797H2.50016V15.8346H0.833496ZM4.16683 15.8346V4.16797H5.8335V15.8346H4.16683ZM9.16683 15.8346C8.7085 15.8346 8.31614 15.6714 7.98975 15.3451C7.66336 15.0187 7.50016 14.6263 7.50016 14.168V5.83464C7.50016 5.3763 7.66336 4.98394 7.98975 4.65755C8.31614 4.33116 8.7085 4.16797 9.16683 4.16797H17.5002C17.9585 4.16797 18.3509 4.33116 18.6772 4.65755C19.0036 4.98394 19.1668 5.3763 19.1668 5.83464V14.168C19.1668 14.6263 19.0036 15.0187 18.6772 15.3451C18.3509 15.6714 17.9585 15.8346 17.5002 15.8346H9.16683ZM9.16683 14.168H17.5002V5.83464H9.16683V14.168ZM10.0002 12.5013H16.6668L14.5002 9.58464L12.9168 11.668L11.7502 10.1263L10.0002 12.5013Z",fill:"currentColor"})}),vi=()=>t("svg",{width:"20",height:"20",style:{verticalAlign:"-0.35em",marginRight:10},viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{d:"M5.9471 17.4987C5.9471 17.4987 5.5606 15.9327 4.87018 15.2423C4.17976 14.5519 2.61377 14.1653 2.61377 14.1653C2.61377 14.1653 4.17976 13.7788 4.87018 13.0884C5.5606 12.398 5.9471 10.832 5.9471 10.832C5.9471 10.832 6.3336 12.398 7.02402 13.0884C7.71443 13.7788 9.28044 14.1653 9.28044 14.1653C9.28044 14.1653 7.71443 14.5519 7.02402 15.2423C6.3336 15.9327 5.9471 17.4987 5.9471 17.4987Z",fill:"currentColor"}),e("path",{d:"M13.0304 14.9987C13.0304 14.9987 12.4024 12.2582 11.2804 11.05C10.1585 9.84174 7.61377 9.16536 7.61377 9.16536C7.61377 9.16536 10.1585 8.48899 11.2804 7.28074C12.4024 6.07251 13.0304 3.33203 13.0304 3.33203C13.0304 3.33203 13.6585 6.07251 14.7804 7.28074C15.9023 8.48899 18.4471 9.16536 18.4471 9.16536C18.4471 9.16536 15.9023 9.84174 14.7804 11.05C13.6585 12.2582 13.0304 14.9987 13.0304 14.9987Z",fill:"currentColor"}),e("path",{d:"M4.6971 7.4987C4.6971 7.4987 4.45554 6.51995 4.02402 6.08844C3.59251 5.65693 2.61377 5.41537 2.61377 5.41537C2.61377 5.41537 3.59251 5.1738 4.02402 4.74228C4.45554 4.31077 4.6971 3.33203 4.6971 3.33203C4.6971 3.33203 4.93866 4.31077 5.37017 4.74228C5.80169 5.1738 6.78044 5.41537 6.78044 5.41537C6.78044 5.41537 5.80169 5.65693 5.37017 6.08844C4.93866 6.51995 4.6971 7.4987 4.6971 7.4987Z",fill:"currentColor"}),e("path",{d:"M15.947 17.5C15.947 17.5 15.7536 16.9127 15.4085 16.6538C15.0633 16.395 14.2803 16.25 14.2803 16.25C14.2803 16.25 15.0633 16.105 15.4085 15.8461C15.7536 15.5872 15.947 15 15.947 15C15.947 15 16.1402 15.5872 16.4854 15.8461C16.8306 16.105 17.6136 16.25 17.6136 16.25C17.6136 16.25 16.8306 16.395 16.4854 16.6538C16.1402 16.9127 15.947 17.5 15.947 17.5Z",fill:"currentColor"})]}),bi=()=>t("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"ai-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:[e("path",{d:"M2.45454 11.7273C2.45454 11.7273 2.16994 10.446 1.66154 9.88113C1.15314 9.31625 0 9 0 9C0 9 1.15314 8.68374 1.66154 8.11887C2.16994 7.554 2.45454 6.27273 2.45454 6.27273C2.45454 6.27273 2.73915 7.554 3.24755 8.11887C3.75594 8.68374 4.90909 9 4.90909 9C4.90909 9 3.75594 9.31625 3.24755 9.88113C2.73915 10.446 2.45454 11.7273 2.45454 11.7273Z"}),e("path",{d:"M7.63636 9C7.63636 9 7.1304 6.94996 6.22658 6.04614C5.32276 5.14233 3.27273 4.63636 3.27273 4.63636C3.27273 4.63636 5.32276 4.1304 6.22658 3.22657C7.1304 2.32275 7.63636 0.272728 7.63636 0.272728C7.63636 0.272728 8.14233 2.32275 9.04615 3.22657C9.94996 4.1304 12 4.63636 12 4.63636C12 4.63636 9.94996 5.14233 9.04615 6.04614C8.14233 6.94996 7.63636 9 7.63636 9Z"}),e("path",{d:"M1.63636 4.09091C1.63636 4.09091 1.44663 3.19402 1.10769 2.7986C0.768758 2.40318 0 2.18182 0 2.18182C0 2.18182 0.768758 1.96046 1.10769 1.56503C1.44663 1.16961 1.63636 0.272728 1.63636 0.272728C1.63636 0.272728 1.8261 1.16961 2.16503 1.56503C2.50397 1.96046 3.27273 2.18182 3.27273 2.18182C3.27273 2.18182 2.50397 2.40318 2.16503 2.7986C1.8261 3.19402 1.63636 4.09091 1.63636 4.09091Z"}),e("path",{d:"M10.6364 11.7273C10.6364 11.7273 10.4782 11.0866 10.1958 10.8042C9.91336 10.5218 9.27273 10.3636 9.27273 10.3636C9.27273 10.3636 9.91336 10.2055 10.1958 9.92307C10.4782 9.64064 10.6364 9 10.6364 9C10.6364 9 10.7945 9.64064 11.0769 9.92307C11.3594 10.2055 12 10.3636 12 10.3636C12 10.3636 11.3594 10.5218 11.0769 10.8042C10.7945 11.0866 10.6364 11.7273 10.6364 11.7273Z"})]}),yi=t=>e(ae,Object.assign({component:ui},t)),wi=t=>e(ae,Object.assign({component:hi},t)),xi=t=>e(ae,Object.assign({component:di},t)),_i=t=>e(ae,Object.assign({component:fi},t)),Ci=t=>e(ae,Object.assign({component:vi},t)),Si=t=>e(ae,Object.assign({component:bi},t)),Ai=t=>e(ae,Object.assign({component:mi},t)),ki=t=>e(ae,Object.assign({component:gi},t)),Ti=t=>e(ae,Object.assign({component:pi},t));var Ii="button",Oi="foldersTitle",Ei="folderActions",Pi="fileCount",Mi="uploadButton",Fi="folderMenu",ji="folderIcon",Ri="folderLabelItem",Di="foldersTitleItem",Li="folderLabel",Ni="foldersContainer",zi="divider",Bi="buttonWrapper",Vi="uploadButtonTitle",Ui="emptyFolderContainer";const Hi=f(p(({selectedFolder:n,generateMenuItems:r,onFolderSelect:i,folders:s,fetchFolders:l,handleAddFile:u,setIsUrlModalVisible:d,handleCreateFolder:f,activeLibraryItem:p,setActiveLibraryItem:m},v)=>{const b=Array.isArray(s)?s:[],{t:y}=br(),[w,x]=o({}),{options:_}=Hr(),{dataProviders:C,config:S}=_,A=ci(l),{FolderIcon:k,AddFolderIcon:T,UploadByUrlIcon:I,ExpandArrowIcon:O,CollapseArrowIcon:E}=ii(),P=c(e=>{const t=["folders"],n=e=>{e.forEach(e=>{t.push(e.key),e.children&&n(e.children)})};return n(e),t},[]),[M,F]=o(()=>{const e=r();return P(e)});a(()=>{const e=r(),t=P(e);F(t)},[b,r,P]);const j=c(async e=>{try{if(null==C?void 0:C.getFiles){const{files:t,pagination:n}=await C.getFiles({folderId:"folders"===e?void 0:e});return(null==n?void 0:n.total)||t.filter(e=>!e.isFolder).length}return 0}catch(t){return console.error(`Ошибка при получении количества файлов для папки ${e}:`,t),0}},[C]),R=c(async()=>{if(0===b.length)return;const e={};e.folders=await j("folders");const t=b.map(async t=>{const n=await j(t.id);e[t.id]=n});await Promise.all(t),x(e)},[b,j]),D=c(async e=>{const t=await j(e);x(n=>Object.assign(Object.assign({},n),{[e]:t}))},[j]);g(v,()=>({refreshFileCounts:R}),[R]),a(()=>{R()},[R]);const L=c(async()=>{await u(),n?await D(n):await D("folders")},[u,n,D]),N=h(()=>({items:[{key:"upload-url",label:y("Upload image by URL"),icon:e(I,{}),onClick:()=>null==d?void 0:d(!0)}]}),[I,d,y]),z=[{key:jr,label:y("My files"),icon:e(Ti,{})},{key:Rr,label:y("GIF"),icon:e(ki,{})},{key:Dr,label:y("Stock images"),icon:e(Ai,{})},{key:Lr,label:y("AI"),icon:e(Ci,{}),disabled:!(null==S?void 0:S.sseQuery)}],B=c(e=>{const t=e[0];t&&"empty"!==t&&(p!==jr&&m(jr),null==i||i(t))},[i,p,m]),V=c(({key:e})=>{console.log("key",e),m(e)},[m]),U=c(e=>{F(e)},[]),H=c(()=>{var n;const i=r();if(0===i.length||1===i.length&&(!i[0].children||0===i[0].children.length))return[{key:"empty",title:e("div",{className:Ui,children:y("No data to display")})}];const o=n=>{var r;const i=b.find(e=>e.id===n.key),a=w[n.key]||0,s={items:[{key:"rename",label:y("Rename"),icon:e(ye,{}),onClick:e=>{i&&e.domEvent&&(e.domEvent.stopPropagation(),A.actions.showRenameFolderModal(i.id))}}]},l=e(Y,{menu:s,trigger:["contextMenu"],children:t("div",{className:"folder-item-container",children:[t("div",{className:Li,children:[e(k,{className:ji}),e("span",{className:Ri,children:n.label})]}),e("div",{className:Pi,title:`${a} ${1===a?"файл":"файлов"}`,children:a})]})});return{key:n.key,title:l,children:null===(r=n.children)||void 0===r?void 0:r.map(o)}},a=e("div",{className:Oi,children:t("div",{className:Di,children:[e(ve,{className:ji}),e("span",{className:Ri,children:y("Folders")})]})});return i.length>0&&"folders"===i[0].key?[{key:"folders",title:a,children:null===(n=i[0].children)||void 0===n?void 0:n.map(o)}]:i.map(o)},[r,y,b,w,k,A.actions]),K=h(()=>H(),[H]);return t("div",{className:"sidebar-container",children:[e("div",{className:Bi,children:t(Y.Button,{type:"primary",size:"large",icon:e(E,{}),onClick:L,menu:N,className:Mi,children:[e(be,{})," ",e("span",{className:Vi,children:y("Upload image")})]})}),e("div",{className:"sidebar__sections-title",children:y("Library")}),e($,{className:"folder-menu",items:z,defaultSelectedKeys:[jr],onSelect:({key:e})=>V({key:e}),selectedKeys:[p]}),e(G,{className:zi}),t("div",{className:Ni,children:[e(W,{className:`${Fi} folder-tree`,selectedKeys:n?[n]:["folders"],expandedKeys:M,onSelect:B,onExpand:U,treeData:K,switcherIcon:({expanded:t})=>e(t?E:O,{}),showLine:!1}),e("div",{className:Ei,children:e(X,{onClick:e=>{e.stopPropagation(),f()},className:Ii,icon:e(T,{}),size:"middle"})})]})]})}));Hi.displayName="FolderSidebar";var Wi=Object.defineProperty,Yi=(e,t,n)=>(((e,t,n)=>{t in e?Wi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),$i=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Xi(e){var t=e.default;if("function"==typeof t){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var Ki=function(e){return!(t=e,!t||"object"!=typeof t||function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===qi}(e)}(e));var t};var qi="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function Zi(e,t){return!1!==t.clone&&t.isMergeableObject(e)?no(function(e){return Array.isArray(e)?[]:{}}(e),e,t):e}function Ji(e,t,n){return e.concat(t).map(function(e){return Zi(e,n)})}function Qi(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return e.propertyIsEnumerable(t)}):[]}(e))}function eo(e,t){try{return t in e}catch{return!1}}function to(e,t,n){var r={};return n.isMergeableObject(e)&&Qi(e).forEach(function(t){r[t]=Zi(e[t],n)}),Qi(t).forEach(function(i){(function(e,t){return eo(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(eo(e,i)&&n.isMergeableObject(t[i])?r[i]=function(e,t){if(!t.customMerge)return no;var n=t.customMerge(e);return"function"==typeof n?n:no}(i,n)(e[i],t[i],n):r[i]=Zi(t[i],n))}),r}function no(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Ji,n.isMergeableObject=n.isMergeableObject||Ki,n.cloneUnlessOtherwiseSpecified=Zi;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):to(e,t,n):Zi(t,n)}no.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return no(e,n,t)},{})};var ro=no;function io(e,t){return void 0===t&&(t=15),+parseFloat(Number(e).toPrecision(t))}function oo(e){var t=e.toString().split(/[eE]/),n=(t[0].split(".")[1]||"").length-+(t[1]||0);return n>0?n:0}function ao(e){if(-1===e.toString().indexOf("e"))return Number(e.toString().replace(".",""));var t=oo(e);return t>0?io(Number(e)*Math.pow(10,t)):Number(e)}function so(e){ho&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&console.warn(e+" is beyond boundary when transfer to integer, the results may not be accurate")}function lo(e,t){var n=e[0],r=e[1],i=e.slice(2),o=t(n,r);return i.forEach(function(e){o=t(o,e)}),o}function co(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length>2)return lo(e,co);var n=e[0],r=e[1],i=ao(n),o=ao(r),a=oo(n)+oo(r),s=i*o;return so(s),s/Math.pow(10,a)}function uo(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length>2)return lo(e,uo);var n=e[0],r=e[1],i=ao(n),o=ao(r);return so(i),so(o),co(i/o,io(Math.pow(10,oo(r)-oo(n))))}var ho=!0;var fo={strip:io,plus:function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t.length>2)return lo(t,e);var r=t[0],i=t[1],o=Math.pow(10,Math.max(oo(r),oo(i)));return(co(r,o)+co(i,o))/o},minus:function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t.length>2)return lo(t,e);var r=t[0],i=t[1],o=Math.pow(10,Math.max(oo(r),oo(i)));return(co(r,o)-co(i,o))/o},times:co,divide:uo,round:function(e,t){var n=Math.pow(10,t),r=uo(Math.round(Math.abs(co(e,n))),n);return e<0&&0!==r&&(r=co(r,-1)),r},digitLength:oo,float2Fixed:ao,enableBoundaryChecking:function(e){void 0===e&&(e=!0),ho=e}};function po(e){return e&&e.Math==Math?e:void 0}var go="object"==typeof globalThis&&po(globalThis)||"object"==typeof window&&po(window)||"object"==typeof self&&po(self)||"object"==typeof global&&po(global)||function(){return this}()||{};function mo(){return go}function vo(e,t,n){var r=n||go,i=r.__SENTRY__=r.__SENTRY__||{};return i[e]||(i[e]=t())}var bo=Object.prototype.toString;function yo(e){switch(bo.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Io(e,Error)}}function wo(e,t){return bo.call(e)===`[object ${t}]`}function xo(e){return wo(e,"ErrorEvent")}function _o(e){return wo(e,"DOMError")}function Co(e){return wo(e,"String")}function So(e){return null===e||"object"!=typeof e&&"function"!=typeof e}function Ao(e){return wo(e,"Object")}function ko(e){return typeof Event<"u"&&Io(e,Event)}function To(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function Io(e,t){try{return e instanceof t}catch{return!1}}function Oo(e,t){try{let r=e;var n=[];let i=0,o=0;let a;for(;r&&i++<5&&(a=Eo(r,t),!("html"===a||i>1&&o+3*n.length+a.length>=80));)n.push(a),o+=a.length,r=r.parentNode;return n.reverse().join(" > ")}catch{return"<unknown>"}}function Eo(e,t){var n=e,r=[];let i,o,a,s,l;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());var c=t&&t.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(c&&c.length)c.forEach(e=>{r.push(`[${e[0]}="${e[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),i=n.className,i&&Co(i))for(o=i.split(/\s+/),l=0;l<o.length;l++)r.push(`.${o[l]}`);var u=["type","name","title","alt"];for(l=0;l<u.length;l++)a=u[l],s=n.getAttribute(a),s&&r.push(`[${a}="${s}"]`);return r.join("")}class Po extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}var Mo=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Fo(e,t=!1){const{host:n,path:r,pass:i,port:o,projectId:a,protocol:s,publicKey:l}=e;return`${s}://${l}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${a}`}function jo(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Ro(e){var t="string"==typeof e?function(e){var t=Mo.exec(e);if(!t)throw new Po(`Invalid Sentry Dsn: ${e}`);const[n,r,i="",o,a="",s]=t.slice(1);let l="",c=s;var u=c.split("/");if(u.length>1&&(l=u.slice(0,-1).join("/"),c=u.pop()),c){var h=c.match(/^\d+/);h&&(c=h[0])}return jo({host:o,pass:i,path:l,projectId:c,port:a,protocol:n,publicKey:r})}(e):jo(e);return function(e){if(!(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__))return;const{port:t,projectId:n,protocol:r}=e;if(["protocol","publicKey","host","projectId"].forEach(t=>{if(!e[t])throw new Po(`Invalid Sentry Dsn: ${t} missing`)}),!n.match(/^\d+$/))throw new Po(`Invalid Sentry Dsn: Invalid projectId ${n}`);if(!function(e){return"http"===e||"https"===e}(r))throw new Po(`Invalid Sentry Dsn: Invalid protocol ${r}`);if(t&&isNaN(parseInt(t,10)))throw new Po(`Invalid Sentry Dsn: Invalid port ${t}`)}(t),t}var Do=mo(),Lo=["debug","info","warn","error","log","assert","trace"];function No(e){var t=mo();if(!("console"in t))return e();var n=t.console,r={};Lo.forEach(e=>{var i=n[e]&&n[e].__sentry_original__;e in t.console&&i&&(r[e]=n[e],n[e]=i)});try{return e()}finally{Object.keys(r).forEach(e=>{n[e]=r[e]})}}function zo(){let e=!1;var t={enable:()=>{e=!0},disable:()=>{e=!1}};return typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?Lo.forEach(n=>{t[n]=(...t)=>{e&&No(()=>{Do.console[n](`Sentry Logger [${n}]:`,...t)})}}):Lo.forEach(e=>{t[e]=()=>{}}),t}let Bo;function Vo(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.substr(0,t)}...`}function Uo(e,t){if(!Array.isArray(e))return"";var n=[];for(let t=0;t<e.length;t++){var r=e[t];try{n.push(String(r))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Ho(e,t){return!!Co(e)&&(function(e){return wo(e,"RegExp")}(t)?t.test(e):"string"==typeof t&&-1!==e.indexOf(t))}function Wo(e,t,n){if(t in e){var r=e[t],i=n(r);if("function"==typeof i)try{$o(i,r)}catch{}e[t]=i}}function Yo(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}function $o(e,t){var n=t.prototype||{};e.prototype=t.prototype=n,Yo(e,"__sentry_original__",t)}function Go(e){return e.__sentry_original__}function Xo(e){if(yo(e))return{message:e.message,name:e.name,stack:e.stack,...qo(e)};if(ko(e)){var t={type:e.type,target:Ko(e.target),currentTarget:Ko(e.currentTarget),...qo(e)};return typeof CustomEvent<"u"&&Io(e,CustomEvent)&&(t.detail=e.detail),t}return e}function Ko(e){try{return function(e){return typeof Element<"u"&&Io(e,Element)}(e)?Oo(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function qo(e){if("object"==typeof e&&null!==e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function Zo(e,t=40){var n=Object.keys(Xo(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return Vo(n[0],t);for(let e=n.length;e>0;e--){var r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:Vo(r,t)}return""}function Jo(e){return Qo(e,new Map)}function Qo(e,t){if(Ao(e)){if(void 0!==(i=t.get(e)))return i;var n={};for(var r of(t.set(e,n),Object.keys(e)))typeof e[r]<"u"&&(n[r]=Qo(e[r],t));return n}if(Array.isArray(e)){var i;if(void 0!==(i=t.get(e)))return i;n=[];return t.set(e,n),e.forEach(e=>{n.push(Qo(e,t))}),n}return e}Bo=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?vo("logger",zo):zo();function ea(...e){var t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0)=>{var r=[];for(var i of e.split("\n").slice(n)){var o=i.replace(/\(error: (.*)\)/,"$1");for(var a of t){var s=a(o);if(s){r.push(s);break}}}return function(e){if(!e.length)return[];let t=e;var n=t[0].function||"",r=t[t.length-1].function||"";return(-1!==n.indexOf("captureMessage")||-1!==n.indexOf("captureException"))&&(t=t.slice(1)),-1!==r.indexOf("sentryWrapped")&&(t=t.slice(0,-1)),t.slice(0,50).map(e=>({...e,filename:e.filename||t[0].filename,function:e.function||"?"})).reverse()}(r)}}function ta(e){return Array.isArray(e)?ea(...e):e}var na="<anonymous>";function ra(e){try{return e&&"function"==typeof e&&e.name||na}catch{return na}}function ia(){if(!("fetch"in mo()))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function oa(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}var aa=mo(),sa={},la={};function ca(e){if(!la[e])switch(la[e]=!0,e){case"console":"console"in aa&&Lo.forEach(function(e){e in aa.console&&Wo(aa.console,e,function(t){return function(...n){ha("console",{args:n,level:e}),t&&t.apply(aa.console,n)}})});break;case"dom":!function(){if("document"in aa){var e=ha.bind(null,"dom"),t=ba(e,!0);aa.document.addEventListener("click",t,!1),aa.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{var n=aa[t]&&aa[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Wo(n,"addEventListener",function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{var o=this,a=o.__sentry_instrumentation_handlers__=o.__sentry_instrumentation_handlers__||{},s=a[n]=a[n]||{refCount:0};if(!s.handler){var l=ba(e);s.handler=l,t.call(this,n,l,i)}s.refCount+=1}catch{}return t.call(this,n,r,i)}}),Wo(n,"removeEventListener",function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{var i=this,o=i.__sentry_instrumentation_handlers__||{},a=o[t];a&&(a.refCount-=1,a.refCount<=0&&(e.call(this,t,a.handler,r),a.handler=void 0,delete o[t]),0===Object.keys(o).length&&delete i.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}}();break;case"xhr":!function(){if("XMLHttpRequest"in aa){var e=XMLHttpRequest.prototype;Wo(e,"open",function(e){return function(...t){var n=this,r=t[1],i=n.__sentry_xhr__={method:Co(t[0])?t[0].toUpperCase():t[0],url:t[1]};Co(r)&&"POST"===i.method&&r.match(/sentry_key/)&&(n.__sentry_own_request__=!0);var o=function(){if(4===n.readyState){try{i.status_code=n.status}catch{}ha("xhr",{args:t,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:n})}};return"onreadystatechange"in n&&"function"==typeof n.onreadystatechange?Wo(n,"onreadystatechange",function(e){return function(...t){return o(),e.apply(n,t)}}):n.addEventListener("readystatechange",o),e.apply(n,t)}}),Wo(e,"send",function(e){return function(...t){return this.__sentry_xhr__&&void 0!==t[0]&&(this.__sentry_xhr__.body=t[0]),ha("xhr",{args:t,startTimestamp:Date.now(),xhr:this}),e.apply(this,t)}})}}();break;case"fetch":!function(){if(!ia())return!1;var e=mo();if(oa(e.fetch))return!0;let t=!1;var n=e.document;if(n&&"function"==typeof n.createElement)try{var r=n.createElement("iframe");r.hidden=!0,n.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(t=oa(r.contentWindow.fetch)),n.head.removeChild(r)}catch(e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return t}()||Wo(aa,"fetch",function(e){return function(...t){var n={args:t,fetchData:{method:da(t),url:fa(t)},startTimestamp:Date.now()};return ha("fetch",{...n}),e.apply(aa,t).then(e=>(ha("fetch",{...n,endTimestamp:Date.now(),response:e}),e),e=>{throw ha("fetch",{...n,endTimestamp:Date.now(),error:e}),e})}});break;case"history":!function(){if(!function(){var e=mo(),t=e.chrome,n=t&&t.app&&t.app.runtime,r="history"in e&&!!e.history.pushState&&!!e.history.replaceState;return!n&&r}())return;var e=aa.onpopstate;function t(e){return function(...t){var n=t.length>2?t[2]:void 0;if(n){var r=pa,i=String(n);pa=i,ha("history",{from:r,to:i})}return e.apply(this,t)}}aa.onpopstate=function(...t){var n=aa.location.href,r=pa;if(pa=n,ha("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch{}},Wo(aa.history,"pushState",t),Wo(aa.history,"replaceState",t)}();break;case"error":ya=aa.onerror,aa.onerror=function(e,t,n,r,i){return ha("error",{column:r,error:i,line:n,msg:e,url:t}),!!ya&&ya.apply(this,arguments)};break;case"unhandledrejection":wa=aa.onunhandledrejection,aa.onunhandledrejection=function(e){return ha("unhandledrejection",e),!wa||wa.apply(this,arguments)};break;default:return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn("unknown instrumentation type:",e))}}function ua(e,t){sa[e]=sa[e]||[],sa[e].push(t),ca(e)}function ha(e,t){if(e&&sa[e])for(var n of sa[e]||[])try{n(t)}catch(t){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${ra(n)}\nError:`,t)}}function da(e=[]){return"Request"in aa&&Io(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}function fa(e=[]){return"string"==typeof e[0]?e[0]:"Request"in aa&&Io(e[0],Request)?e[0].url:String(e[0])}let pa;var ga=1e3;let ma,va;function ba(e,t=!1){return n=>{if(n&&va!==n&&!function(e){if("keypress"!==e.type)return!1;try{var t=e.target;if(!t||!t.tagName)return!0;if("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable)return!1}catch{}return!0}(n)){var r="keypress"===n.type?"input":n.type;(void 0===ma||function(e,t){if(!e||e.type!==t.type)return!0;try{if(e.target!==t.target)return!0}catch{}return!1}(va,n))&&(e({event:n,name:r,global:t}),va=n),clearTimeout(ma),ma=aa.setTimeout(()=>{ma=void 0},ga)}}}let ya=null;let wa=null;function xa(){var e=mo(),t=e.crypto||e.msCrypto;if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");var n=t&&t.getRandomValues?()=>t.getRandomValues(new Uint8Array(1))[0]:()=>16*Math.random();return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,e=>(e^(15&n())>>e/4).toString(16))}function _a(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Ca(e){const{message:t,event_id:n}=e;if(t)return t;var r=_a(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Sa(e,t,n){var r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type="Error")}function Aa(e,t){var n=_a(e);if(n){var r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){var i={...r&&r.data,...t.data};n.mechanism.data=i}}}function ka(e){if(e&&e.__sentry_captured__)return!0;try{Yo(e,"__sentry_captured__",!0)}catch{}return!1}function Ta(e){return Array.isArray(e)?e:[e]}function Ia(){return!(typeof __SENTRY_BROWSER_BUNDLE__<"u"&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call(typeof process<"u"?process:0)}function Oa(e,t=1/0,n=1/0){try{return Pa("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Ea(e,t=3,n=102400){var r=Oa(e,t);return function(e){return function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(e))}(r)>n?Ea(e,t-1,n):r}function Pa(e,t,n=1/0,r=1/0,i=function(){var e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}()){const[o,a]=i;if(null===t||["number","boolean","string"].includes(typeof t)&&!function(e){return"number"==typeof e&&e!=e}(t))return t;var s=function(e,t){try{return"domain"===e&&t&&"object"==typeof t&&t._events?"[Domain]":"domainEmitter"===e?"[DomainEmitter]":typeof global<"u"&&t===global?"[Global]":typeof window<"u"&&t===window?"[Window]":typeof document<"u"&&t===document?"[Document]":function(e){return Ao(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}(t)?"[SyntheticEvent]":"number"==typeof t&&t!=t?"[NaN]":void 0===t?"[undefined]":"function"==typeof t?`[Function: ${ra(t)}]`:"symbol"==typeof t?`[${String(t)}]`:"bigint"==typeof t?`[BigInt: ${String(t)}]`:`[object ${Object.getPrototypeOf(t).constructor.name}]`}catch(e){return`**non-serializable** (${e})`}}(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;if(0===n)return s.replace("object ","");if(o(t))return"[Circular ~]";var l=t;if(l&&"function"==typeof l.toJSON)try{return Pa("",l.toJSON(),n-1,r,i)}catch{}var c=Array.isArray(t)?[]:{};let u=0;var h=Xo(t);for(var d in h)if(Object.prototype.hasOwnProperty.call(h,d)){if(u>=r){c[d]="[MaxProperties ~]";break}var f=h[d];c[d]=Pa(d,f,n-1,r,i),u+=1}return a(t),c}var Ma;function Fa(e){return new Ra(t=>{t(e)})}function ja(e){return new Ra((t,n)=>{n(e)})}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(Ma||(Ma={}));class Ra{__init(){this._state=Ma.PENDING}__init2(){this._handlers=[]}constructor(e){Ra.prototype.__init.call(this),Ra.prototype.__init2.call(this),Ra.prototype.__init3.call(this),Ra.prototype.__init4.call(this),Ra.prototype.__init5.call(this),Ra.prototype.__init6.call(this);try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new Ra((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new Ra((t,n)=>{let r,i;return this.then(t=>{i=!1,r=t,e&&e()},t=>{i=!0,r=t,e&&e()}).then(()=>{i?n(r):t(r)})})}__init3(){this._resolve=e=>{this._setResult(Ma.RESOLVED,e)}}__init4(){this._reject=e=>{this._setResult(Ma.REJECTED,e)}}__init5(){this._setResult=(e,t)=>{if(this._state===Ma.PENDING){if(To(t))return void t.then(this._resolve,this._reject);this._state=e,this._value=t,this._executeHandlers()}}}__init6(){this._executeHandlers=()=>{if(this._state!==Ma.PENDING){var e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(this._state===Ma.RESOLVED&&e[1](this._value),this._state===Ma.REJECTED&&e[2](this._value),e[0]=!0)})}}}}function Da(e){var t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return ja(new Po("Not adding Promise because buffer limit was reached."));var i=r();return-1===t.indexOf(i)&&t.push(i),i.then(()=>n(i)).then(null,()=>n(i).then(null,()=>{})),i},drain:function(e){return new Ra((n,r)=>{let i=t.length;if(!i)return n(!0);var o=setTimeout(()=>{e&&e>0&&n(!1)},e);t.forEach(e=>{Fa(e).then(()=>{--i||(clearTimeout(o),n(!0))},r)})})}}}function La(e){if(!e)return{};var t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};var n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}}var Na=["fatal","error","warning","log","info","debug"];function za(e){return"warn"===e?"warning":Na.includes(e)?e:"log"}var Ba={nowSeconds:()=>Date.now()/1e3};var Va=Ia()?function(){try{return function(e,t){return e.require(t)}(module,"perf_hooks").performance}catch{return}}():function(){const{performance:e}=mo();if(e&&e.now)return{now:()=>e.now(),timeOrigin:Date.now()-e.now()}}(),Ua=void 0===Va?Ba:{nowSeconds:()=>(Va.timeOrigin+Va.now())/1e3},Ha=Ba.nowSeconds.bind(Ba),Wa=Ua.nowSeconds.bind(Ua);function Ya(e,t=[]){return[e,t]}function $a(e,t){const[n,r]=e;return[n,[...r,t]]}function Ga(e,t){e[1].forEach(e=>{var n=e[0].type;t(e,n)})}function Xa(e,t){return(t||new TextEncoder).encode(e)}function Ka(e,t){const[n,r]=e;let i=JSON.stringify(n);function o(e){"string"==typeof i?i="string"==typeof e?i+e:[Xa(i,t),e]:i.push("string"==typeof e?Xa(e,t):e)}for(var a of r){const[e,t]=a;o(`\n${JSON.stringify(e)}\n`),o("string"==typeof t||t instanceof Uint8Array?t:JSON.stringify(t))}return"string"==typeof i?i:function(e){var t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t);let r=0;for(var i of e)n.set(i,r),r+=i.length;return n}(i)}function qa(e,t){var n="string"==typeof e.data?Xa(e.data,t):e.data;return[Jo({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}(()=>{const{performance:e}=mo();if(e&&e.now){var t=36e5,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=i<t,a=e.timing&&e.timing.navigationStart,s="number"==typeof a?Math.abs(a+n-r):t;(o||s<t)&&(i<=s&&e.timeOrigin)}})();var Za={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default"};function Ja(e){return Za[e]}function Qa(e,{statusCode:t,headers:n},r=Date.now()){var i={...e},o=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(o)for(var s of o.trim().split(",")){const[e,t]=s.split(":",2);var l=parseInt(e,10),c=1e3*(isNaN(l)?60:l);if(t)for(var u of t.split(";"))i[u]=r+c;else i.all=r+c}else a?i.all=r+function(e,t=Date.now()){var n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;var r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(a,r):429===t&&(i.all=r+6e4);return i}function es(e){var t=Wa(),n={sid:xa(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return Jo({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&ts(n,e),n}function ts(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Wa(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:xa()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{var n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}class ns{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(e){var t=new ns;return e&&(t._breadcrumbs=[...e._breadcrumbs],t._tags={...e._tags},t._extra={...e._extra},t._contexts={...e._contexts},t._user=e._user,t._level=e._level,t._span=e._span,t._session=e._session,t._transactionName=e._transactionName,t._fingerprint=e._fingerprint,t._eventProcessors=[...e._eventProcessors],t._requestSession=e._requestSession,t._attachments=[...e._attachments]),t}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&ts(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts={...this._contexts,[e]:t},this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){var e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if("function"==typeof e){var t=e(this);return t instanceof ns?t:this}return e instanceof ns?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):Ao(e)&&(this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(e,t){var n="number"==typeof t?Math.min(t,100):100;if(n<=0)return this;var r={timestamp:Ha(),...e};return this._breadcrumbs=[...this._breadcrumbs,r].slice(-n),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,t={}){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};var n=this._span.transaction&&this._span.transaction.name;n&&(e.tags={transaction:n,...e.tags})}return this._applyFingerprint(e),e.breadcrumbs=[...e.breadcrumbs||[],...this._breadcrumbs],e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...rs(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}_notifyEventProcessors(e,t,n,r=0){return new Ra((i,o)=>{var a=e[r];if(null===t||"function"!=typeof a)i(t);else{var s=a({...t},n);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&a.id&&null===s&&Bo.log(`Event processor "${a.id}" dropped event`),To(s)?s.then(t=>this._notifyEventProcessors(e,t,n,r+1).then(i)).then(null,o):this._notifyEventProcessors(e,s,n,r+1).then(i).then(null,o)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?Ta(e.fingerprint):[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}}function rs(){return vo("globalEventProcessors",()=>[])}function is(e){rs().push(e)}var os=100;class as{__init(){this._stack=[{}]}constructor(e,t=new ns,n=4){this._version=n,as.prototype.__init.call(this),this.getStackTop().scope=t,e&&this.bindClient(e)}isOlderThan(e){return this._version<e}bindClient(e){this.getStackTop().client=e,e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){var e=ns.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(e){var t=this.pushScope();try{e(t)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){var n=this._lastEventId=t&&t.event_id?t.event_id:xa(),r=new Error("Sentry syntheticException");return this._withClient((i,o)=>{i.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},o)}),n}captureMessage(e,t,n){var r=this._lastEventId=n&&n.event_id?n.event_id:xa(),i=new Error(e);return this._withClient((o,a)=>{o.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},a)}),r}captureEvent(e,t){var n=t&&t.event_id?t.event_id:xa();return"transaction"!==e.type&&(this._lastEventId=n),this._withClient((r,i)=>{r.captureEvent(e,{...t,event_id:n},i)}),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:n,client:r}=this.getStackTop();if(!n||!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=os}=r.getOptions&&r.getOptions()||{};if(!(o<=0)){var a={timestamp:Ha(),...e},s=i?No(()=>i(a,t)):a;null!==s&&n.addBreadcrumb(s,o)}}setUser(e){var t=this.getScope();t&&t.setUser(e)}setTags(e){var t=this.getScope();t&&t.setTags(e)}setExtras(e){var t=this.getScope();t&&t.setExtras(e)}setTag(e,t){var n=this.getScope();n&&n.setTag(e,t)}setExtra(e,t){var n=this.getScope();n&&n.setExtra(e,t)}setContext(e,t){var n=this.getScope();n&&n.setContext(e,t)}configureScope(e){const{scope:t,client:n}=this.getStackTop();t&&n&&e(t)}run(e){var t=ls(this);try{e(this)}finally{ls(t)}}getIntegration(e){var t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){return this._callExtensionMethod("startTransaction",e,t)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){var e=this.getStackTop(),t=e&&e.scope,n=t&&t.getSession();n&&function(e){let t={};"ok"===e.status&&(t={status:"exited"}),ts(e,t)}(n),this._sendSessionUpdate(),t&&t.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:r,environment:i}=n&&n.getOptions()||{};var o=mo();const{userAgent:a}=o.navigator||{};var s=es({release:r,environment:i,...t&&{user:t.getUser()},...a&&{userAgent:a},...e});if(t){var l=t.getSession&&t.getSession();l&&"ok"===l.status&&ts(l,{status:"exited"}),this.endSession(),t.setSession(s)}return s}shouldSendDefaultPii(){var e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop();if(e){var n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}}_withClient(e){const{scope:t,client:n}=this.getStackTop();n&&e(n,t)}_callExtensionMethod(e,...t){var n=ss().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[e])return n.extensions[e].apply(this,t);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function ss(){var e=mo();return e.__SENTRY__=e.__SENTRY__||{extensions:{},hub:void 0},e}function ls(e){var t=ss(),n=hs(t);return ds(t,e),n}function cs(){var e=ss();return(!us(e)||hs(e).isOlderThan(4))&&ds(e,new as),Ia()?function(e){try{var t=ss().__SENTRY__,n=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!n)return hs(e);if(!us(n)||hs(n).isOlderThan(4)){var r=hs(e).getStackTop();ds(n,new as(r.client,ns.clone(r.scope)))}return hs(n)}catch{return hs(e)}}(e):hs(e)}function us(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function hs(e){return vo("hub",()=>new as,e)}function ds(e,t){return!!e&&((e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0)}function fs(e,t){return function(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}({sentry_key:e.publicKey,sentry_version:"7",...t&&{sentry_client:`${t.name}/${t.version}`}})}function ps(e,t={}){var n="string"==typeof t?t:t.tunnel,r="string"!=typeof t&&t._metadata?t._metadata.sdk:void 0;return n||`${function(e){return`${function(e){var t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/`}(e)}?${fs(e,r)}`}function gs(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function ms(e,t,n,r){var i=gs(n),o=e.type||"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,n&&n.sdk);var a=function(e,t,n,r){var i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&{dsn:Fo(r)},..."transaction"===e.type&&i&&{trace:Jo({...i})}}}(e,i,r,t);return delete e.sdkProcessingMetadata,Ya(a,[[{type:o},e]])}var vs=[];function bs(e){var t=e.defaultIntegrations||[],n=e.integrations;let r;t.forEach(e=>{e.isDefaultInstance=!0}),r=Array.isArray(n)?[...t,...n]:"function"==typeof n?Ta(n(t)):t;var i=function(e){var t={};return e.forEach(e=>{const{name:n}=e;var r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}(r),o=i.findIndex(e=>"Debug"===e.name);if(-1!==o){const[e]=i.splice(o,1);i.push(e)}return i}var ys="Not capturing exception because it's already been captured.";class ws{__init(){this._integrations={}}__init2(){this._integrationsInitialized=!1}__init3(){this._numProcessing=0}__init4(){this._outcomes={}}constructor(e){if(ws.prototype.__init.call(this),ws.prototype.__init2.call(this),ws.prototype.__init3.call(this),ws.prototype.__init4.call(this),this._options=e,e.dsn){this._dsn=Ro(e.dsn);var t=ps(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn("No DSN provided, client will not do anything.")}captureException(e,t,n){if(ka(e))return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.log(ys));let r=t&&t.event_id;return this._process(this.eventFromException(e,t).then(e=>this._captureEvent(e,t,n)).then(e=>{r=e})),r}captureMessage(e,t,n,r){let i=n&&n.event_id;var o=So(e)?this.eventFromMessage(String(e),t,n):this.eventFromException(e,n);return this._process(o.then(e=>this._captureEvent(e,n,r)).then(e=>{i=e})),i}captureEvent(e,t,n){if(t&&t.originalException&&ka(t.originalException))return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.log(ys));let r=t&&t.event_id;return this._process(this._captureEvent(e,t,n).then(e=>{r=e})),r}captureSession(e){this._isEnabled()?"string"!=typeof e.release?(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),ts(e,{init:!1})):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn("SDK not enabled, will not capture session.")}getDsn(){return this._dsn}getOptions(){return this._options}getTransport(){return this._transport}flush(e){var t=this._transport;return t?this._isClientDoneProcessing(e).then(n=>t.flush(e).then(e=>n&&e)):Fa(!0)}close(e){return this.flush(e).then(e=>(this.getOptions().enabled=!1,e))}setupIntegrations(){var e,t;this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=(e=this._options.integrations,t={},e.forEach(e=>{t[e.name]=e,-1===vs.indexOf(e.name)&&(e.setupOnce(is,cs),vs.push(e.name),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.log(`Integration installed: ${e.name}`))}),t),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}sendEvent(e,t={}){if(this._dsn){let r=ms(e,this._dsn,this._options._metadata,this._options.tunnel);for(var n of t.attachments||[])r=$a(r,qa(n,this._options.transportOptions&&this._options.transportOptions.textEncoder));this._sendEnvelope(r)}}sendSession(e){if(this._dsn){var t=function(e,t,n,r){var i=gs(n);return Ya({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&{dsn:Fo(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}}recordDroppedEvent(e,t){if(this._options.sendClientReports){var n=`${e}:${t}`;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.log(`Adding outcome: "${n}"`),this._outcomes[n]=this._outcomes[n]+1||1}}_updateSessionFromEvent(e,t){let n=!1,r=!1;var i=t.exception&&t.exception.values;if(i)for(var o of(r=!0,i)){var a=o.mechanism;if(a&&!1===a.handled){n=!0;break}}var s="ok"===e.status;(s&&0===e.errors||s&&n)&&(ts(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new Ra(t=>{let n=0;var r=setInterval(()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._dsn}_prepareEvent(e,t,n){const{normalizeDepth:r=3,normalizeMaxBreadth:i=1e3}=this.getOptions();var o={...e,event_id:e.event_id||t.event_id||xa(),timestamp:e.timestamp||Ha()};this._applyClientOptions(o),this._applyIntegrationsMetadata(o);let a=n;t.captureContext&&(a=ns.clone(a).update(t.captureContext));let s=Fa(o);if(a){var l=[...t.attachments||[],...a.getAttachments()];l.length&&(t.attachments=l),s=a.applyToEvent(o,t)}return s.then(e=>"number"==typeof r&&r>0?this._normalizeEvent(e,r,i):e)}_normalizeEvent(e,t,n){if(!e)return null;var r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:Oa(e.data,t,n)}}))},...e.user&&{user:Oa(e.user,t,n)},...e.contexts&&{contexts:Oa(e.contexts,t,n)},...e.extra&&{extra:Oa(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Oa(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>(e.data&&(e.data=Oa(e.data,t,n)),e))),r}_applyClientOptions(e){var t=this.getOptions();const{environment:n,release:r,dist:i,maxValueLength:o=250}=t;"environment"in e||(e.environment="environment"in t?n:"production"),void 0===e.release&&void 0!==r&&(e.release=r),void 0===e.dist&&void 0!==i&&(e.dist=i),e.message&&(e.message=Vo(e.message,o));var a=e.exception&&e.exception.values&&e.exception.values[0];a&&a.value&&(a.value=Vo(a.value,o));var s=e.request;s&&s.url&&(s.url=Vo(s.url,o))}_applyIntegrationsMetadata(e){var t=Object.keys(this._integrations);t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(e=>e.event_id,e=>{if(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__){var t=e;"log"===t.logLevel?Bo.log(t.message):Bo.warn(t)}})}_processEvent(e,t,n){const{beforeSend:r,sampleRate:i}=this.getOptions();if(!this._isEnabled())return ja(new Po("SDK not enabled, will not capture event.","log"));var o="transaction"===e.type;return!o&&"number"==typeof i&&Math.random()>i?(this.recordDroppedEvent("sample_rate","error"),ja(new Po(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"))):this._prepareEvent(e,t,n).then(n=>{if(null===n)throw this.recordDroppedEvent("event_processor",e.type||"error"),new Po("An event processor returned null, will not send event.","log");return t.data&&!0===t.data.__sentry__||o||!r?n:function(e){var t="`beforeSend` method has to return `null` or a valid event.";if(To(e))return e.then(e=>{if(!Ao(e)&&null!==e)throw new Po(t);return e},e=>{throw new Po(`beforeSend rejected with ${e}`)});if(!Ao(e)&&null!==e)throw new Po(t);return e}(r(n,t))}).then(r=>{if(null===r)throw this.recordDroppedEvent("before_send",e.type||"error"),new Po("`beforeSend` returned `null`, will not send event.","log");var i=n&&n.getSession();!o&&i&&this._updateSessionFromEvent(i,r);var a=r.transaction_info;if(o&&a&&r.transaction!==e.transaction){var s="custom";r.transaction_info={...a,source:s,changes:[...a.changes,{source:s,timestamp:r.timestamp,propagations:a.propagations}]}}return this.sendEvent(r,t),r}).then(null,e=>{throw e instanceof Po?e:(this.captureException(e,{data:{__sentry__:!0},originalException:e}),new Po(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`))})}_process(e){this._numProcessing+=1,e.then(e=>(this._numProcessing-=1,e),e=>(this._numProcessing-=1,e))}_sendEnvelope(e){this._transport&&this._dsn?this._transport.send(e).then(null,e=>{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.error("Error while sending event:",e)}):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.error("Transport disabled")}_clearOutcomes(){var e=this._outcomes;return this._outcomes={},Object.keys(e).map(t=>{const[n,r]=t.split(":");return{reason:n,category:r,quantity:e[t]}})}}function xs(e,t,n=Da(e.bufferSize||30)){let r={};return{send:function(i){var o=[];if(Ga(i,(t,n)=>{var i=Ja(n);!function(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,i)?o.push(t):e.recordDroppedEvent("ratelimit_backoff",i)}),0===o.length)return Fa();var a=Ya(i[0],o),s=t=>{Ga(a,(n,r)=>{e.recordDroppedEvent(t,Ja(r))})};return n.add(()=>t({body:Ka(a,e.textEncoder)}).then(e=>{void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=Qa(r,e)},e=>{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.error("Failed while sending event:",e),s("network_error")})).then(e=>e,e=>{if(e instanceof Po)return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.error("Skipped sending event because buffer is full."),s("queue_overflow"),Fa();throw e})},flush:e=>n.drain(e)}}var _s="7.14.0";let Cs;class Ss{constructor(){Ss.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=Ss.id}setupOnce(){Cs=Function.prototype.toString,Function.prototype.toString=function(...e){var t=Go(this)||this;return Cs.apply(t,e)}}}Ss.__initStatic();var As=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/];class ks{static __initStatic(){this.id="InboundFilters"}__init(){this.name=ks.id}constructor(e={}){this._options=e,ks.prototype.__init.call(this)}setupOnce(e,t){var n=e=>{var n=t();if(n){var r=n.getIntegration(ks);if(r){var i=n.getClient(),o=i?i.getOptions():{},a=function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...As],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(r._options,o);return function(e,t){return t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch{}return!1}(e)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${Ca(e)}`),!0):function(e,t){return!(!t||!t.length)&&function(e){if(e.message)return[e.message];if(e.exception)try{const{type:t="",value:n=""}=e.exception.values&&e.exception.values[0]||{};return[`${n}`,`${t}: ${n}`]}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.error(`Cannot extract message for event ${Ca(e)}`),[]}return[]}(e).some(e=>t.some(t=>Ho(e,t)))}(e,t.ignoreErrors)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${Ca(e)}`),!0):function(e,t){if(!t||!t.length)return!1;var n=Ts(e);return!!n&&t.some(e=>Ho(n,e))}(e,t.denyUrls)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${Ca(e)}.\nUrl: ${Ts(e)}`),!0):!function(e,t){if(!t||!t.length)return!0;var n=Ts(e);return!n||t.some(e=>Ho(n,e))}(e,t.allowUrls)&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${Ca(e)}.\nUrl: ${Ts(e)}`),!0)}(e,a)?null:e}}return e};n.id=this.name,e(n)}}function Ts(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?function(e=[]){for(let n=e.length-1;n>=0;n--){var t=e[n];if(t&&"<anonymous>"!==t.filename&&"[native code]"!==t.filename)return t.filename||null}return null}(t):null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.error(`Cannot extract url for event ${Ca(e)}`),null}}function Is(e,t){var n=Es(e,t),r={type:t&&t.name,value:Ms(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Os(e,t){return{exception:{values:[Is(e,t)]}}}function Es(e,t){var n=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"==typeof e.framesToPop)return e.framesToPop;if(Ps.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch{}return[]}ks.__initStatic();var Ps=/Minified React error #\d+;/i;function Ms(e){var t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function Fs(e,t,n,r,i){let o;if(xo(t)&&t.error)return Os(e,t.error);if(_o(t)||function(e){return wo(e,"DOMException")}(t)){var a=t;if("stack"in t)o=Os(e,t);else{var s=a.name||(_o(a)?"DOMError":"DOMException"),l=a.message?`${s}: ${a.message}`:s;o=js(e,l,n,r),Sa(o,l)}return"code"in a&&(o.tags={...o.tags,"DOMException.code":`${a.code}`}),o}return yo(t)?Os(e,t):Ao(t)||ko(t)?(o=function(e,t,n,r){var i=cs().getClient(),o=i&&i.getOptions().normalizeDepth,a={exception:{values:[{type:ko(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${Zo(t)}`}]},extra:{__serialized__:Ea(t,o)}};if(n){var s=Es(e,n);s.length&&(a.exception.values[0].stacktrace={frames:s})}return a}(e,t,n,i),Aa(o,{synthetic:!0}),o):(o=js(e,t,n,r),Sa(o,`${t}`),Aa(o,{synthetic:!0}),o)}function js(e,t,n,r){var i={message:t};if(r&&n){var o=Es(e,n);o.length&&(i.exception={values:[{value:t,stacktrace:{frames:o}}]})}return i}var Rs="Breadcrumbs";class Ds{static __initStatic(){this.id=Rs}__init(){this.name=Ds.id}constructor(e){Ds.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){this.options.console&&ua("console",Ls),this.options.dom&&ua("dom",function(e){function t(t){let n,r="object"==typeof e?e.serializeAttribute:void 0;"string"==typeof r&&(r=[r]);try{n=t.event.target?Oo(t.event.target,r):Oo(t.event,r)}catch{n="<unknown>"}0!==n.length&&cs().addBreadcrumb({category:`ui.${t.name}`,message:n},{event:t.event,name:t.name,global:t.global})}return t}(this.options.dom)),this.options.xhr&&ua("xhr",Ns),this.options.fetch&&ua("fetch",zs),this.options.history&&ua("history",Bs)}}function Ls(e){var t={category:"console",data:{arguments:e.args,logger:"console"},level:za(e.level),message:Uo(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;t.message=`Assertion failed: ${Uo(e.args.slice(1)," ")||"console.assert"}`,t.data.arguments=e.args.slice(1)}cs().addBreadcrumb(t,{input:e.args,level:e.level})}function Ns(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;const{method:t,url:n,status_code:r,body:i}=e.xhr.__sentry_xhr__||{};return void cs().addBreadcrumb({category:"xhr",data:{method:t,url:n,status_code:r},type:"http"},{xhr:e.xhr,input:i})}}function zs(e){!e.endTimestamp||e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?cs().addBreadcrumb({category:"fetch",data:e.fetchData,level:"error",type:"http"},{data:e.error,input:e.args}):cs().addBreadcrumb({category:"fetch",data:{...e.fetchData,status_code:e.response.status},type:"http"},{input:e.args,response:e.response}))}function Bs(e){var t=mo();let n=e.from,r=e.to;var i=La(t.location.href);let o=La(n);var a=La(r);o.path||(o=i),i.protocol===a.protocol&&i.host===a.host&&(r=a.relative),i.protocol===o.protocol&&i.host===o.host&&(n=o.relative),cs().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}Ds.__initStatic();var Vs=mo();class Us extends ws{constructor(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:_s}],version:_s},super(e),e.sendClientReports&&Vs.document&&Vs.document.addEventListener("visibilitychange",()=>{"hidden"===Vs.document.visibilityState&&this._flushOutcomes()})}eventFromException(e,t){return function(e,t,n,r){var i=Fs(e,t,n&&n.syntheticException||void 0,r);return Aa(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Fa(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,i){var o=js(e,t,r&&r.syntheticException||void 0,i);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Fa(o)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}sendEvent(e,t){var n=this.getIntegrationById(Rs);n&&n.options&&n.options.sentry&&cs().addBreadcrumb({category:"sentry."+("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:Ca(e)},{event:e}),super.sendEvent(e,t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){var e=this._clearOutcomes();if(0!==e.length)if(this._dsn){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.log("Sending outcomes:",e);var t=ps(this._dsn,this._options),n=function(e,t){return Ya(t?{dsn:t}:{},[[{type:"client_report"},{timestamp:Ha(),discarded_events:e}]])}(e,this._options.tunnel&&Fo(this._dsn));try{var r=mo();if("[object Navigator]"===Object.prototype.toString.call(r&&r.navigator)&&"function"==typeof r.navigator.sendBeacon&&!this._options.transportOptions)r.navigator.sendBeacon.bind(r.navigator)(t,Ka(n));else this._sendEnvelope(n)}catch(e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.error(e)}}else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.log("No dsn provided, will not send outcomes");else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.log("No outcomes to send")}}var Hs=mo();let Ws;function Ys(e,t=function(){if(Ws)return Ws;if(oa(Hs.fetch))return Ws=Hs.fetch.bind(Hs);var e=Hs.document;let t=Hs.fetch;if(e&&"function"==typeof e.createElement)try{var n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);var r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return Ws=t.bind(Hs)}()){return xs(e,function(n){var r={body:n.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n.body.length<=65536,...e.fetchOptions};return t(e.url,r).then(e=>({statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}}))})}function $s(e){return xs(e,function(t){return new Ra((n,r)=>{var i=new XMLHttpRequest;for(var o in i.onerror=r,i.onreadystatechange=()=>{4===i.readyState&&n({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",e.url),e.headers)Object.prototype.hasOwnProperty.call(e.headers,o)&&i.setRequestHeader(o,e.headers[o]);i.send(t.body)})})}var Gs="?";function Xs(e,t,n,r){var i={filename:e,function:t,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}var Ks=/^\s*at (?:(.*\).*?|.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,qs=/\((\S*)(?::(\d+))(?::(\d+))\)/,Zs=[30,e=>{var t=Ks.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){var n=qs.exec(t[2]);n&&(t[2]=n[1],t[3]=n[2],t[4]=n[3])}const[e,r]=il(t[1]||Gs,t[2]);return Xs(r,e,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],Js=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|safari-extension|safari-web-extension|capacitor)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Qs=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,el=[50,e=>{var t=Js.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){var n=Qs.exec(t[3]);n&&(t[1]=t[1]||"eval",t[3]=n[1],t[4]=n[2],t[5]="")}let e=t[3],r=t[1]||Gs;return[r,e]=il(r,e),Xs(e,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],tl=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,nl=[40,e=>{var t=tl.exec(e);return t?Xs(t[2],t[1]||Gs,+t[3],t[4]?+t[4]:void 0):void 0}],rl=ea(...[Zs,el,nl]),il=(e,t)=>{var n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:Gs,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};let ol=0;function al(){return ol>0}function sl(e,t={},n){if("function"!=typeof e)return e;try{var r=e.__sentry_wrapped__;if(r)return r;if(Go(e))return e}catch{return e}var i=function(){var r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);var i=r.map(e=>sl(e,t));return e.apply(this,i)}catch(e){throw ol+=1,setTimeout(()=>{ol-=1}),function(e){cs().withScope(e)}(n=>{n.addEventProcessor(e=>(t.mechanism&&(Sa(e,void 0),Aa(e,t.mechanism)),e.extra={...e.extra,arguments:r},e)),function(e,t){cs().captureException(e,{captureContext:t})}(e)}),e}};try{for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(i[o]=e[o])}catch{}$o(i,e),Yo(e,"__sentry_wrapped__",i);try{Object.getOwnPropertyDescriptor(i,"name").configurable&&Object.defineProperty(i,"name",{get:()=>e.name})}catch{}return i}class ll{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=ll.id}__init2(){this._installFunc={onerror:cl,onunhandledrejection:ul}}constructor(e){ll.prototype.__init.call(this),ll.prototype.__init2.call(this),this._options={onerror:!0,onunhandledrejection:!0,...e}}setupOnce(){Error.stackTraceLimit=50;var e=this._options;for(var t in e){var n=this._installFunc[t];n&&e[t]&&(dl(t),n(),this._installFunc[t]=void 0)}}}function cl(){ua("error",e=>{const[t,n,r]=pl();if(!t.getIntegration(ll))return;const{msg:i,url:o,line:a,column:s,error:l}=e;if(!(al()||l&&l.__sentry_own_request__)){var c=void 0===l&&Co(i)?function(e,t,n,r){var i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let o=xo(e)?e.message:e,a="Error";var s=o.match(i);s&&(a=s[1],o=s[2]);var l={exception:{values:[{type:a,value:o}]}};return hl(l,t,n,r)}(i,o,a,s):hl(Fs(n,l||i,void 0,r,!1),o,a,s);c.level="error",fl(t,l,c,"onerror")}})}function ul(){ua("unhandledrejection",e=>{const[t,n,r]=pl();if(!t.getIntegration(ll))return;let i=e;try{"reason"in e?i=e.reason:"detail"in e&&"reason"in e.detail&&(i=e.detail.reason)}catch{}if(al()||i&&i.__sentry_own_request__)return!0;var o=So(i)?function(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}(i):Fs(n,i,void 0,r,!0);o.level="error",fl(t,i,o,"onunhandledrejection")})}function hl(e,t,n,r){var i=e.exception=e.exception||{},o=i.values=i.values||[],a=o[0]=o[0]||{},s=a.stacktrace=a.stacktrace||{},l=s.frames=s.frames||[],c=isNaN(parseInt(r,10))?void 0:r,u=isNaN(parseInt(n,10))?void 0:n,h=Co(t)&&t.length>0?t:function(){var e=mo();try{return e.document.location.href}catch{return""}}();return 0===l.length&&l.push({colno:c,filename:h,function:"?",in_app:!0,lineno:u}),e}function dl(e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.log(`Global Handler attached: ${e}`)}function fl(e,t,n,r){Aa(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function pl(){var e=cs(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}ll.__initStatic();var gl=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class ml{static __initStatic(){this.id="TryCatch"}__init(){this.name=ml.id}constructor(e){ml.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){var e=mo();this._options.setTimeout&&Wo(e,"setTimeout",vl),this._options.setInterval&&Wo(e,"setInterval",vl),this._options.requestAnimationFrame&&Wo(e,"requestAnimationFrame",bl),this._options.XMLHttpRequest&&"XMLHttpRequest"in e&&Wo(XMLHttpRequest.prototype,"send",yl);var t=this._options.eventTarget;t&&(Array.isArray(t)?t:gl).forEach(wl)}}function vl(e){return function(...t){var n=t[0];return t[0]=sl(n,{mechanism:{data:{function:ra(e)},handled:!0,type:"instrument"}}),e.apply(this,t)}}function bl(e){return function(t){return e.apply(this,[sl(t,{mechanism:{data:{function:"requestAnimationFrame",handler:ra(e)},handled:!0,type:"instrument"}})])}}function yl(e){return function(...t){var n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&Wo(n,e,function(t){var n={mechanism:{data:{function:e,handler:ra(t)},handled:!0,type:"instrument"}},r=Go(t);return r&&(n.mechanism.data.handler=ra(r)),sl(t,n)})}),e.apply(this,t)}}function wl(e){var t=mo(),n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Wo(n,"addEventListener",function(t){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=sl(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:ra(r),target:e},handled:!0,type:"instrument"}}))}catch{}return t.apply(this,[n,sl(r,{mechanism:{data:{function:"addEventListener",handler:ra(r),target:e},handled:!0,type:"instrument"}}),i])}}),Wo(n,"removeEventListener",function(e){return function(t,n,r){var i=n;try{var o=i&&i.__sentry_wrapped__;o&&e.call(this,t,o,r)}catch{}return e.call(this,t,i,r)}}))}ml.__initStatic();class xl{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=xl.id}constructor(e={}){xl.prototype.__init.call(this),this._key=e.key||"cause",this._limit=e.limit||5}setupOnce(){var e=cs().getClient();!e||is((t,n)=>{var r=cs().getIntegration(xl);return r?function(e,t,n,r,i){if(!(r.exception&&r.exception.values&&i&&Io(i.originalException,Error)))return r;var o=_l(e,n,i.originalException,t);return r.exception.values=[...o,...r.exception.values],r}(e.getOptions().stackParser,r._key,r._limit,t,n):t})}}function _l(e,t,n,r,i=[]){if(!Io(n[r],Error)||i.length+1>=t)return i;var o=Is(e,n[r]);return _l(e,t,n[r],r,[o,...i])}xl.__initStatic();var Cl=mo();class Sl{constructor(){Sl.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=Sl.id}setupOnce(){is(e=>{if(cs().getIntegration(Sl)){if(!Cl.navigator&&!Cl.location&&!Cl.document)return e;var t=e.request&&e.request.url||Cl.location&&Cl.location.href;const{referrer:r}=Cl.document||{},{userAgent:i}=Cl.navigator||{};var n={...t&&{url:t},headers:{...e.request&&e.request.headers,...r&&{Referer:r},...i&&{"User-Agent":i}}};return{...e,request:n}}return e})}}Sl.__initStatic();class Al{constructor(){Al.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=Al.id}setupOnce(e,t){var n=e=>{var n=t().getIntegration(Al);if(n){try{if(function(e,t){return!!t&&!(!function(e,t){var n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Tl(e,t)||!kl(e,t))}(e,t)&&!function(e,t){var n=Il(t),r=Il(e);return!!(n&&r&&n.type===r.type&&n.value===r.value&&Tl(e,t)&&kl(e,t))}(e,t))}(e,n._previousEvent))return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{return n._previousEvent=e}return n._previousEvent=e}return e};n.id=this.name,e(n)}}function kl(e,t){let n=Ol(e),r=Ol(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let e=0;e<r.length;e++){var i=r[e],o=n[e];if(i.filename!==o.filename||i.lineno!==o.lineno||i.colno!==o.colno||i.function!==o.function)return!1}return!0}function Tl(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return n.join("")===r.join("")}catch{return!1}}function Il(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Ol(e){var t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}Al.__initStatic();var El=[new ks,new Ss,new ml,new Ds,new ll,new xl,new Al,new Sl];function Pl(e={}){if(void 0===e.defaultIntegrations&&(e.defaultIntegrations=El),void 0===e.release){var t=mo();t.SENTRY_RELEASE&&t.SENTRY_RELEASE.id&&(e.release=t.SENTRY_RELEASE.id)}void 0===e.autoSessionTracking&&(e.autoSessionTracking=!0),void 0===e.sendClientReports&&(e.sendClientReports=!0);var n={...e,stackParser:ta(e.stackParser||rl),integrations:bs(e),transport:e.transport||(ia()?Ys:$s)};(function(e,t){!0===t.debug&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?Bo.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));var n=cs(),r=n.getScope();r&&r.update(t.initialScope);var i=new e(t);n.bindClient(i)})(Us,n),e.autoSessionTracking&&function(){var e=mo(),t=e.document;if(typeof t>"u")return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn("Session tracking in non-browser environment with @sentry/browser is not supported."));var n=cs();!n.captureSession||(Ml(n),ua("history",({from:e,to:t})=>{void 0===e||e===t||Ml(cs())}))}()}function Ml(e){e.startSession({ignoreDuration:!0}),e.captureSession()}var Fl={exports:{}},jl={},Rl=i,Dl=Symbol.for("react.element"),Ll=Symbol.for("react.fragment"),Nl=Object.prototype.hasOwnProperty,zl=Rl.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Bl={key:!0,ref:!0,__self:!0,__source:!0};
9
+ */var Pr=(Ir||(Ir=1,function(e,t){(function(){var n,r="Expected a function",i="__lodash_hash_undefined__",o="__lodash_placeholder__",a=32,s=128,l=256,c=1/0,u=9007199254740991,h=NaN,d=4294967295,f=[["ary",s],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",a],["partialRight",64],["rearg",l]],p="[object Arguments]",g="[object Array]",m="[object Boolean]",v="[object Date]",b="[object Error]",y="[object Function]",w="[object GeneratorFunction]",x="[object Map]",_="[object Number]",C="[object Object]",S="[object Promise]",A="[object RegExp]",k="[object Set]",T="[object String]",I="[object Symbol]",O="[object WeakMap]",E="[object ArrayBuffer]",P="[object DataView]",M="[object Float32Array]",F="[object Float64Array]",j="[object Int8Array]",R="[object Int16Array]",D="[object Int32Array]",L="[object Uint8Array]",N="[object Uint8ClampedArray]",z="[object Uint16Array]",B="[object Uint32Array]",V=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,$=RegExp(W.source),G=RegExp(Y.source),X=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,q=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ee=/[\\^$.*+?()[\]{}|]/g,te=RegExp(ee.source),ne=/^\s+/,re=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oe=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,se=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,ue=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,fe=/^0b[01]+$/i,pe=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,ye=/['\n\r\u2028\u2029\\]/g,we="\\ud800-\\udfff",xe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",_e="\\u2700-\\u27bf",Ce="a-z\\xdf-\\xf6\\xf8-\\xff",Se="A-Z\\xc0-\\xd6\\xd8-\\xde",Ae="\\ufe0e\\ufe0f",ke="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Te="['’]",Ie="["+we+"]",Oe="["+ke+"]",Ee="["+xe+"]",Pe="\\d+",Me="["+_e+"]",Fe="["+Ce+"]",je="[^"+we+ke+Pe+_e+Ce+Se+"]",Re="\\ud83c[\\udffb-\\udfff]",De="[^"+we+"]",Le="(?:\\ud83c[\\udde6-\\uddff]){2}",Ne="[\\ud800-\\udbff][\\udc00-\\udfff]",ze="["+Se+"]",Be="\\u200d",Ve="(?:"+Fe+"|"+je+")",Ue="(?:"+ze+"|"+je+")",He="(?:['’](?:d|ll|m|re|s|t|ve))?",We="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ye="(?:"+Ee+"|"+Re+")?",$e="["+Ae+"]?",Ge=$e+Ye+"(?:"+Be+"(?:"+[De,Le,Ne].join("|")+")"+$e+Ye+")*",Xe="(?:"+[Me,Le,Ne].join("|")+")"+Ge,Ke="(?:"+[De+Ee+"?",Ee,Le,Ne,Ie].join("|")+")",qe=RegExp(Te,"g"),Ze=RegExp(Ee,"g"),Je=RegExp(Re+"(?="+Re+")|"+Ke+Ge,"g"),Qe=RegExp([ze+"?"+Fe+"+"+He+"(?="+[Oe,ze,"$"].join("|")+")",Ue+"+"+We+"(?="+[Oe,ze+Ve,"$"].join("|")+")",ze+"?"+Ve+"+"+He,ze+"+"+We,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Pe,Xe].join("|"),"g"),et=RegExp("["+Be+we+xe+Ae+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,it={};it[M]=it[F]=it[j]=it[R]=it[D]=it[L]=it[N]=it[z]=it[B]=!0,it[p]=it[g]=it[E]=it[m]=it[P]=it[v]=it[b]=it[y]=it[x]=it[_]=it[C]=it[A]=it[k]=it[T]=it[O]=!1;var ot={};ot[p]=ot[g]=ot[E]=ot[P]=ot[m]=ot[v]=ot[M]=ot[F]=ot[j]=ot[R]=ot[D]=ot[x]=ot[_]=ot[C]=ot[A]=ot[k]=ot[T]=ot[I]=ot[L]=ot[N]=ot[z]=ot[B]=!0,ot[b]=ot[y]=ot[O]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},st=parseFloat,lt=parseInt,ct="object"==typeof nr&&nr&&nr.Object===Object&&nr,ut="object"==typeof self&&self&&self.Object===Object&&self,ht=ct||ut||Function("return this")(),dt=t&&!t.nodeType&&t,ft=dt&&e&&!e.nodeType&&e,pt=ft&&ft.exports===dt,gt=pt&&ct.process,mt=function(){try{var e=ft&&ft.require&&ft.require("util").types;return e||gt&&gt.binding&&gt.binding("util")}catch(e){}}(),vt=mt&&mt.isArrayBuffer,bt=mt&&mt.isDate,yt=mt&&mt.isMap,wt=mt&&mt.isRegExp,xt=mt&&mt.isSet,_t=mt&&mt.isTypedArray;function Ct(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function St(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function At(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function kt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Tt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function It(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Ot(e,t){return!(null==e||!e.length)&&zt(e,t,0)>-1}function Et(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Pt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Mt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Ft(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function jt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Rt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Dt=Ht("length");function Lt(e,t,n){var r;return n(e,function(e,n,i){if(t(e,n,i))return r=n,!1}),r}function Nt(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function zt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Nt(e,Vt,n)}function Bt(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Vt(e){return e!=e}function Ut(e,t){var n=null==e?0:e.length;return n?$t(e,t)/n:h}function Ht(e){return function(t){return null==t?n:t[e]}}function Wt(e){return function(t){return null==e?n:e[t]}}function Yt(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}function $t(e,t){for(var r,i=-1,o=e.length;++i<o;){var a=t(e[i]);a!==n&&(r=r===n?a:r+a)}return r}function Gt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Xt(e){return e?e.slice(0,dn(e)+1).replace(ne,""):e}function Kt(e){return function(t){return e(t)}}function qt(e,t){return Pt(t,function(t){return e[t]})}function Zt(e,t){return e.has(t)}function Jt(e,t){for(var n=-1,r=e.length;++n<r&&zt(t,e[n],0)>-1;);return n}function Qt(e,t){for(var n=e.length;n--&&zt(t,e[n],0)>-1;);return n}var en=Wt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),tn=Wt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function nn(e){return"\\"+at[e]}function rn(e){return et.test(e)}function on(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function an(e,t){return function(n){return e(t(n))}}function sn(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var s=e[n];s!==t&&s!==o||(e[n]=o,a[i++]=n)}return a}function ln(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function cn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function un(e){return rn(e)?function(e){for(var t=Je.lastIndex=0;Je.test(e);)++t;return t}(e):Dt(e)}function hn(e){return rn(e)?function(e){return e.match(Je)||[]}(e):function(e){return e.split("")}(e)}function dn(e){for(var t=e.length;t--&&re.test(e.charAt(t)););return t}var fn=Wt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),pn=function e(t){var re,we=(t=null==t?ht:pn.defaults(ht.Object(),t,pn.pick(ht,nt))).Array,xe=t.Date,_e=t.Error,Ce=t.Function,Se=t.Math,Ae=t.Object,ke=t.RegExp,Te=t.String,Ie=t.TypeError,Oe=we.prototype,Ee=Ce.prototype,Pe=Ae.prototype,Me=t["__core-js_shared__"],Fe=Ee.toString,je=Pe.hasOwnProperty,Re=0,De=(re=/[^.]+$/.exec(Me&&Me.keys&&Me.keys.IE_PROTO||""))?"Symbol(src)_1."+re:"",Le=Pe.toString,Ne=Fe.call(Ae),ze=ht._,Be=ke("^"+Fe.call(je).replace(ee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ve=pt?t.Buffer:n,Ue=t.Symbol,He=t.Uint8Array,We=Ve?Ve.allocUnsafe:n,Ye=an(Ae.getPrototypeOf,Ae),$e=Ae.create,Ge=Pe.propertyIsEnumerable,Xe=Oe.splice,Ke=Ue?Ue.isConcatSpreadable:n,Je=Ue?Ue.iterator:n,et=Ue?Ue.toStringTag:n,at=function(){try{var e=uo(Ae,"defineProperty");return e({},"",{}),e}catch(e){}}(),ct=t.clearTimeout!==ht.clearTimeout&&t.clearTimeout,ut=xe&&xe.now!==ht.Date.now&&xe.now,dt=t.setTimeout!==ht.setTimeout&&t.setTimeout,ft=Se.ceil,gt=Se.floor,mt=Ae.getOwnPropertySymbols,Dt=Ve?Ve.isBuffer:n,Wt=t.isFinite,gn=Oe.join,mn=an(Ae.keys,Ae),vn=Se.max,bn=Se.min,yn=xe.now,wn=t.parseInt,xn=Se.random,_n=Oe.reverse,Cn=uo(t,"DataView"),Sn=uo(t,"Map"),An=uo(t,"Promise"),kn=uo(t,"Set"),Tn=uo(t,"WeakMap"),In=uo(Ae,"create"),On=Tn&&new Tn,En={},Pn=Lo(Cn),Mn=Lo(Sn),Fn=Lo(An),jn=Lo(kn),Rn=Lo(Tn),Dn=Ue?Ue.prototype:n,Ln=Dn?Dn.valueOf:n,Nn=Dn?Dn.toString:n;function zn(e){if(es(e)&&!Ha(e)&&!(e instanceof Hn)){if(e instanceof Un)return e;if(je.call(e,"__wrapped__"))return No(e)}return new Un(e)}var Bn=function(){function e(){}return function(t){if(!Qa(t))return{};if($e)return $e(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function Vn(){}function Un(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function Hn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Yn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $n(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new $n;++t<n;)this.add(e[t])}function Xn(e){var t=this.__data__=new Yn(e);this.size=t.size}function Kn(e,t){var n=Ha(e),r=!n&&Ua(e),i=!n&&!r&&Ga(e),o=!n&&!r&&!i&&ls(e),a=n||r||i||o,s=a?Gt(e.length,Te):[],l=s.length;for(var c in e)!t&&!je.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||bo(c,l))||s.push(c);return s}function qn(e){var t=e.length;return t?e[Gr(0,t-1)]:n}function Zn(e,t){return jo(Ii(e),ar(t,0,e.length))}function Jn(e){return jo(Ii(e))}function Qn(e,t,r){(r!==n&&!za(e[t],r)||r===n&&!(t in e))&&ir(e,t,r)}function er(e,t,r){var i=e[t];je.call(e,t)&&za(i,r)&&(r!==n||t in e)||ir(e,t,r)}function tr(e,t){for(var n=e.length;n--;)if(za(e[n][0],t))return n;return-1}function nr(e,t,n,r){return hr(e,function(e,i,o){t(r,e,n(e),o)}),r}function rr(e,t){return e&&Oi(t,Es(t),e)}function ir(e,t,n){"__proto__"==t&&at?at(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function or(e,t){for(var r=-1,i=t.length,o=we(i),a=null==e;++r<i;)o[r]=a?n:As(e,t[r]);return o}function ar(e,t,r){return e==e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function sr(e,t,r,i,o,a){var s,l=1&t,c=2&t,u=4&t;if(r&&(s=o?r(e,i,o,a):r(e)),s!==n)return s;if(!Qa(e))return e;var h=Ha(e);if(h){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&je.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!l)return Ii(e,s)}else{var d=po(e),f=d==y||d==w;if(Ga(e))return _i(e,l);if(d==C||d==p||f&&!o){if(s=c||f?{}:mo(e),!l)return c?function(e,t){return Oi(e,fo(e),t)}(e,function(e,t){return e&&Oi(t,Ps(t),e)}(s,e)):function(e,t){return Oi(e,ho(e),t)}(e,rr(s,e))}else{if(!ot[d])return o?e:{};s=function(e,t,n){var r,i=e.constructor;switch(t){case E:return Ci(e);case m:case v:return new i(+e);case P:return function(e,t){var n=t?Ci(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case M:case F:case j:case R:case D:case L:case N:case z:case B:return Si(e,n);case x:return new i;case _:case T:return new i(e);case A:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case k:return new i;case I:return r=e,Ln?Ae(Ln.call(r)):{}}}(e,d,l)}}a||(a=new Xn);var g=a.get(e);if(g)return g;a.set(e,s),os(e)?e.forEach(function(n){s.add(sr(n,t,r,n,e,a))}):ts(e)&&e.forEach(function(n,i){s.set(i,sr(n,t,r,i,e,a))});var b=h?n:(u?c?ro:no:c?Ps:Es)(e);return At(b||e,function(n,i){b&&(n=e[i=n]),er(s,i,sr(n,t,r,i,e,a))}),s}function lr(e,t,r){var i=r.length;if(null==e)return!i;for(e=Ae(e);i--;){var o=r[i],a=t[o],s=e[o];if(s===n&&!(o in e)||!a(s))return!1}return!0}function cr(e,t,i){if("function"!=typeof e)throw new Ie(r);return Eo(function(){e.apply(n,i)},t)}function ur(e,t,n,r){var i=-1,o=Ot,a=!0,s=e.length,l=[],c=t.length;if(!s)return l;n&&(t=Pt(t,Kt(n))),r?(o=Et,a=!1):t.length>=200&&(o=Zt,a=!1,t=new Gn(t));e:for(;++i<s;){var u=e[i],h=null==n?u:n(u);if(u=r||0!==u?u:0,a&&h==h){for(var d=c;d--;)if(t[d]===h)continue e;l.push(u)}else o(t,h,r)||l.push(u)}return l}zn.templateSettings={escape:X,evaluate:K,interpolate:q,variable:"",imports:{_:zn}},zn.prototype=Vn.prototype,zn.prototype.constructor=zn,Un.prototype=Bn(Vn.prototype),Un.prototype.constructor=Un,Hn.prototype=Bn(Vn.prototype),Hn.prototype.constructor=Hn,Wn.prototype.clear=function(){this.__data__=In?In(null):{},this.size=0},Wn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Wn.prototype.get=function(e){var t=this.__data__;if(In){var r=t[e];return r===i?n:r}return je.call(t,e)?t[e]:n},Wn.prototype.has=function(e){var t=this.__data__;return In?t[e]!==n:je.call(t,e)},Wn.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=In&&t===n?i:t,this},Yn.prototype.clear=function(){this.__data__=[],this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=tr(t,e);return!(n<0||(n==t.length-1?t.pop():Xe.call(t,n,1),--this.size,0))},Yn.prototype.get=function(e){var t=this.__data__,r=tr(t,e);return r<0?n:t[r][1]},Yn.prototype.has=function(e){return tr(this.__data__,e)>-1},Yn.prototype.set=function(e,t){var n=this.__data__,r=tr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},$n.prototype.clear=function(){this.size=0,this.__data__={hash:new Wn,map:new(Sn||Yn),string:new Wn}},$n.prototype.delete=function(e){var t=lo(this,e).delete(e);return this.size-=t?1:0,t},$n.prototype.get=function(e){return lo(this,e).get(e)},$n.prototype.has=function(e){return lo(this,e).has(e)},$n.prototype.set=function(e,t){var n=lo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Gn.prototype.add=Gn.prototype.push=function(e){return this.__data__.set(e,i),this},Gn.prototype.has=function(e){return this.__data__.has(e)},Xn.prototype.clear=function(){this.__data__=new Yn,this.size=0},Xn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Xn.prototype.get=function(e){return this.__data__.get(e)},Xn.prototype.has=function(e){return this.__data__.has(e)},Xn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Yn){var r=n.__data__;if(!Sn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new $n(r)}return n.set(e,t),this.size=n.size,this};var hr=Mi(yr),dr=Mi(wr,!0);function fr(e,t){var n=!0;return hr(e,function(e,r,i){return n=!!t(e,r,i)}),n}function pr(e,t,r){for(var i=-1,o=e.length;++i<o;){var a=e[i],s=t(a);if(null!=s&&(l===n?s==s&&!ss(s):r(s,l)))var l=s,c=a}return c}function gr(e,t){var n=[];return hr(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function mr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=vo),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?mr(s,t-1,n,r,i):Mt(i,s):r||(i[i.length]=s)}return i}var vr=Fi(),br=Fi(!0);function yr(e,t){return e&&vr(e,t,Es)}function wr(e,t){return e&&br(e,t,Es)}function xr(e,t){return It(t,function(t){return qa(e[t])})}function _r(e,t){for(var r=0,i=(t=bi(t,e)).length;null!=e&&r<i;)e=e[Do(t[r++])];return r&&r==i?e:n}function Cr(e,t,n){var r=t(e);return Ha(e)?r:Mt(r,n(e))}function Sr(e){return null==e?e===n?"[object Undefined]":"[object Null]":et&&et in Ae(e)?function(e){var t=je.call(e,et),r=e[et];try{e[et]=n;var i=!0}catch(e){}var o=Le.call(e);return i&&(t?e[et]=r:delete e[et]),o}(e):function(e){return Le.call(e)}(e)}function Ar(e,t){return e>t}function kr(e,t){return null!=e&&je.call(e,t)}function Tr(e,t){return null!=e&&t in Ae(e)}function Ir(e,t,r){for(var i=r?Et:Ot,o=e[0].length,a=e.length,s=a,l=we(a),c=1/0,u=[];s--;){var h=e[s];s&&t&&(h=Pt(h,Kt(t))),c=bn(h.length,c),l[s]=!r&&(t||o>=120&&h.length>=120)?new Gn(s&&h):n}h=e[0];var d=-1,f=l[0];e:for(;++d<o&&u.length<c;){var p=h[d],g=t?t(p):p;if(p=r||0!==p?p:0,!(f?Zt(f,g):i(u,g,r))){for(s=a;--s;){var m=l[s];if(!(m?Zt(m,g):i(e[s],g,r)))continue e}f&&f.push(g),u.push(p)}}return u}function Or(e,t,r){var i=null==(e=To(e,t=bi(t,e)))?e:e[Do(Ko(t))];return null==i?n:Ct(i,e,r)}function Er(e){return es(e)&&Sr(e)==p}function Pr(e,t,r,i,o){return e===t||(null==e||null==t||!es(e)&&!es(t)?e!=e&&t!=t:function(e,t,r,i,o,a){var s=Ha(e),l=Ha(t),c=s?g:po(e),u=l?g:po(t),h=(c=c==p?C:c)==C,d=(u=u==p?C:u)==C,f=c==u;if(f&&Ga(e)){if(!Ga(t))return!1;s=!0,h=!1}if(f&&!h)return a||(a=new Xn),s||ls(e)?eo(e,t,r,i,o,a):function(e,t,n,r,i,o,a){switch(n){case P:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case E:return!(e.byteLength!=t.byteLength||!o(new He(e),new He(t)));case m:case v:case _:return za(+e,+t);case b:return e.name==t.name&&e.message==t.message;case A:case T:return e==t+"";case x:var s=on;case k:var l=1&r;if(s||(s=ln),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=eo(s(e),s(t),r,i,o,a);return a.delete(e),u;case I:if(Ln)return Ln.call(e)==Ln.call(t)}return!1}(e,t,c,r,i,o,a);if(!(1&r)){var y=h&&je.call(e,"__wrapped__"),w=d&&je.call(t,"__wrapped__");if(y||w){var S=y?e.value():e,O=w?t.value():t;return a||(a=new Xn),o(S,O,r,i,a)}}return!!f&&(a||(a=new Xn),function(e,t,r,i,o,a){var s=1&r,l=no(e),c=l.length,u=no(t),h=u.length;if(c!=h&&!s)return!1;for(var d=c;d--;){var f=l[d];if(!(s?f in t:je.call(t,f)))return!1}var p=a.get(e),g=a.get(t);if(p&&g)return p==t&&g==e;var m=!0;a.set(e,t),a.set(t,e);for(var v=s;++d<c;){var b=e[f=l[d]],y=t[f];if(i)var w=s?i(y,b,f,t,e,a):i(b,y,f,e,t,a);if(!(w===n?b===y||o(b,y,r,i,a):w)){m=!1;break}v||(v="constructor"==f)}if(m&&!v){var x=e.constructor,_=t.constructor;x==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof x&&x instanceof x&&"function"==typeof _&&_ instanceof _||(m=!1)}return a.delete(e),a.delete(t),m}(e,t,r,i,o,a))}(e,t,r,i,Pr,o))}function Mr(e,t,r,i){var o=r.length,a=o,s=!i;if(null==e)return!a;for(e=Ae(e);o--;){var l=r[o];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<a;){var c=(l=r[o])[0],u=e[c],h=l[1];if(s&&l[2]){if(u===n&&!(c in e))return!1}else{var d=new Xn;if(i)var f=i(u,h,c,e,t,d);if(!(f===n?Pr(h,u,3,i,d):f))return!1}}return!0}function Fr(e){return!(!Qa(e)||(t=e,De&&De in t))&&(qa(e)?Be:pe).test(Lo(e));var t}function jr(e){return"function"==typeof e?e:null==e?nl:"object"==typeof e?Ha(e)?Br(e[0],e[1]):zr(e):hl(e)}function Rr(e){if(!Co(e))return mn(e);var t=[];for(var n in Ae(e))je.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Dr(e){if(!Qa(e))return function(e){var t=[];if(null!=e)for(var n in Ae(e))t.push(n);return t}(e);var t=Co(e),n=[];for(var r in e)("constructor"!=r||!t&&je.call(e,r))&&n.push(r);return n}function Lr(e,t){return e<t}function Nr(e,t){var n=-1,r=Ya(e)?we(e.length):[];return hr(e,function(e,i,o){r[++n]=t(e,i,o)}),r}function zr(e){var t=co(e);return 1==t.length&&t[0][2]?Ao(t[0][0],t[0][1]):function(n){return n===e||Mr(n,e,t)}}function Br(e,t){return wo(e)&&So(t)?Ao(Do(e),t):function(r){var i=As(r,e);return i===n&&i===t?ks(r,e):Pr(t,i,3)}}function Vr(e,t,r,i,o){e!==t&&vr(t,function(a,s){if(o||(o=new Xn),Qa(a))!function(e,t,r,i,o,a,s){var l=Io(e,r),c=Io(t,r),u=s.get(c);if(u)Qn(e,r,u);else{var h=a?a(l,c,r+"",e,t,s):n,d=h===n;if(d){var f=Ha(c),p=!f&&Ga(c),g=!f&&!p&&ls(c);h=c,f||p||g?Ha(l)?h=l:$a(l)?h=Ii(l):p?(d=!1,h=_i(c,!0)):g?(d=!1,h=Si(c,!0)):h=[]:rs(c)||Ua(c)?(h=l,Ua(l)?h=ms(l):Qa(l)&&!qa(l)||(h=mo(c))):d=!1}d&&(s.set(c,h),o(h,c,i,a,s),s.delete(c)),Qn(e,r,h)}}(e,t,s,r,Vr,i,o);else{var l=i?i(Io(e,s),a,s+"",e,t,o):n;l===n&&(l=a),Qn(e,s,l)}},Ps)}function Ur(e,t){var r=e.length;if(r)return bo(t+=t<0?r:0,r)?e[t]:n}function Hr(e,t,n){t=t.length?Pt(t,function(e){return Ha(e)?function(t){return _r(t,1===e.length?e[0]:e)}:e}):[nl];var r=-1;t=Pt(t,Kt(so()));var i=Nr(e,function(e,n,i){var o=Pt(t,function(t){return t(e)});return{criteria:o,index:++r,value:e}});return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;++r<a;){var l=Ai(i[r],o[r]);if(l)return r>=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)})}function Wr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=_r(e,a);n(s,a)&&Jr(o,bi(a,e),s)}return o}function Yr(e,t,n,r){var i=r?Bt:zt,o=-1,a=t.length,s=e;for(e===t&&(t=Ii(t)),n&&(s=Pt(e,Kt(n)));++o<a;)for(var l=0,c=t[o],u=n?n(c):c;(l=i(s,u,l,r))>-1;)s!==e&&Xe.call(s,l,1),Xe.call(e,l,1);return e}function $r(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;bo(i)?Xe.call(e,i,1):ui(e,i)}}return e}function Gr(e,t){return e+gt(xn()*(t-e+1))}function Xr(e,t){var n="";if(!e||t<1||t>u)return n;do{t%2&&(n+=e),(t=gt(t/2))&&(e+=e)}while(t);return n}function Kr(e,t){return Po(ko(e,t,nl),e+"")}function qr(e){return qn(zs(e))}function Zr(e,t){var n=zs(e);return jo(n,ar(t,0,n.length))}function Jr(e,t,r,i){if(!Qa(e))return e;for(var o=-1,a=(t=bi(t,e)).length,s=a-1,l=e;null!=l&&++o<a;){var c=Do(t[o]),u=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var h=l[c];(u=i?i(h,c,l):n)===n&&(u=Qa(h)?h:bo(t[o+1])?[]:{})}er(l,c,u),l=l[c]}return e}var Qr=On?function(e,t){return On.set(e,t),e}:nl,ei=at?function(e,t){return at(e,"toString",{configurable:!0,enumerable:!1,value:Qs(t),writable:!0})}:nl;function ti(e){return jo(zs(e))}function ni(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=we(i);++r<i;)o[r]=e[r+t];return o}function ri(e,t){var n;return hr(e,function(e,r,i){return!(n=t(e,r,i))}),!!n}function ii(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!ss(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return oi(e,t,nl,n)}function oi(e,t,r,i){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=r(t))!=t,l=null===t,c=ss(t),u=t===n;o<a;){var h=gt((o+a)/2),d=r(e[h]),f=d!==n,p=null===d,g=d==d,m=ss(d);if(s)var v=i||g;else v=u?g&&(i||f):l?g&&f&&(i||!p):c?g&&f&&!p&&(i||!m):!p&&!m&&(i?d<=t:d<t);v?o=h+1:a=h}return bn(a,4294967294)}function ai(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!za(s,l)){var l=s;o[i++]=0===a?0:a}}return o}function si(e){return"number"==typeof e?e:ss(e)?h:+e}function li(e){if("string"==typeof e)return e;if(Ha(e))return Pt(e,li)+"";if(ss(e))return Nn?Nn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ci(e,t,n){var r=-1,i=Ot,o=e.length,a=!0,s=[],l=s;if(n)a=!1,i=Et;else if(o>=200){var c=t?null:Xi(e);if(c)return ln(c);a=!1,i=Zt,l=new Gn}else l=t?[]:s;e:for(;++r<o;){var u=e[r],h=t?t(u):u;if(u=n||0!==u?u:0,a&&h==h){for(var d=l.length;d--;)if(l[d]===h)continue e;t&&l.push(h),s.push(u)}else i(l,h,n)||(l!==s&&l.push(h),s.push(u))}return s}function ui(e,t){return null==(e=To(e,t=bi(t,e)))||delete e[Do(Ko(t))]}function hi(e,t,n,r){return Jr(e,t,n(_r(e,t)),r)}function di(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ni(e,r?0:o,r?o+1:i):ni(e,r?o+1:0,r?i:o)}function fi(e,t){var n=e;return n instanceof Hn&&(n=n.value()),Ft(t,function(e,t){return t.func.apply(t.thisArg,Mt([e],t.args))},n)}function pi(e,t,n){var r=e.length;if(r<2)return r?ci(e[0]):[];for(var i=-1,o=we(r);++i<r;)for(var a=e[i],s=-1;++s<r;)s!=i&&(o[i]=ur(o[i]||a,e[s],t,n));return ci(mr(o,1),t,n)}function gi(e,t,r){for(var i=-1,o=e.length,a=t.length,s={};++i<o;){var l=i<a?t[i]:n;r(s,e[i],l)}return s}function mi(e){return $a(e)?e:[]}function vi(e){return"function"==typeof e?e:nl}function bi(e,t){return Ha(e)?e:wo(e,t)?[e]:Ro(vs(e))}var yi=Kr;function wi(e,t,r){var i=e.length;return r=r===n?i:r,!t&&r>=i?e:ni(e,t,r)}var xi=ct||function(e){return ht.clearTimeout(e)};function _i(e,t){if(t)return e.slice();var n=e.length,r=We?We(n):new e.constructor(n);return e.copy(r),r}function Ci(e){var t=new e.constructor(e.byteLength);return new He(t).set(new He(e)),t}function Si(e,t){var n=t?Ci(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ai(e,t){if(e!==t){var r=e!==n,i=null===e,o=e==e,a=ss(e),s=t!==n,l=null===t,c=t==t,u=ss(t);if(!l&&!u&&!a&&e>t||a&&s&&c&&!l&&!u||i&&s&&c||!r&&c||!o)return 1;if(!i&&!a&&!u&&e<t||u&&r&&o&&!i&&!a||l&&r&&o||!s&&o||!c)return-1}return 0}function ki(e,t,n,r){for(var i=-1,o=e.length,a=n.length,s=-1,l=t.length,c=vn(o-a,0),u=we(l+c),h=!r;++s<l;)u[s]=t[s];for(;++i<a;)(h||i<o)&&(u[n[i]]=e[i]);for(;c--;)u[s++]=e[i++];return u}function Ti(e,t,n,r){for(var i=-1,o=e.length,a=-1,s=n.length,l=-1,c=t.length,u=vn(o-s,0),h=we(u+c),d=!r;++i<u;)h[i]=e[i];for(var f=i;++l<c;)h[f+l]=t[l];for(;++a<s;)(d||i<o)&&(h[f+n[a]]=e[i++]);return h}function Ii(e,t){var n=-1,r=e.length;for(t||(t=we(r));++n<r;)t[n]=e[n];return t}function Oi(e,t,r,i){var o=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var l=t[a],c=i?i(r[l],e[l],l,r,e):n;c===n&&(c=e[l]),o?ir(r,l,c):er(r,l,c)}return r}function Ei(e,t){return function(n,r){var i=Ha(n)?St:nr,o=t?t():{};return i(n,e,so(r,2),o)}}function Pi(e){return Kr(function(t,r){var i=-1,o=r.length,a=o>1?r[o-1]:n,s=o>2?r[2]:n;for(a=e.length>3&&"function"==typeof a?(o--,a):n,s&&yo(r[0],r[1],s)&&(a=o<3?n:a,o=1),t=Ae(t);++i<o;){var l=r[i];l&&e(t,l,i,a)}return t})}function Mi(e,t){return function(n,r){if(null==n)return n;if(!Ya(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Ae(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Fi(e){return function(t,n,r){for(var i=-1,o=Ae(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===n(o[l],l,o))break}return t}}function ji(e){return function(t){var r=rn(t=vs(t))?hn(t):n,i=r?r[0]:t.charAt(0),o=r?wi(r,1).join(""):t.slice(1);return i[e]()+o}}function Ri(e){return function(t){return Ft(qs(Us(t).replace(qe,"")),e,"")}}function Di(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Bn(e.prototype),r=e.apply(n,t);return Qa(r)?r:n}}function Li(e){return function(t,r,i){var o=Ae(t);if(!Ya(t)){var a=so(r,3);t=Es(t),r=function(e){return a(o[e],e,o)}}var s=e(t,r,i);return s>-1?o[a?t[s]:s]:n}}function Ni(e){return to(function(t){var i=t.length,o=i,a=Un.prototype.thru;for(e&&t.reverse();o--;){var s=t[o];if("function"!=typeof s)throw new Ie(r);if(a&&!l&&"wrapper"==oo(s))var l=new Un([],!0)}for(o=l?o:i;++o<i;){var c=oo(s=t[o]),u="wrapper"==c?io(s):n;l=u&&xo(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?l[oo(u[0])].apply(l,u[3]):1==s.length&&xo(s)?l[c]():l.thru(s)}return function(){var e=arguments,n=e[0];if(l&&1==e.length&&Ha(n))return l.plant(n).value();for(var r=0,o=i?t[r].apply(this,e):n;++r<i;)o=t[r].call(this,o);return o}})}function zi(e,t,r,i,o,a,l,c,u,h){var d=t&s,f=1&t,p=2&t,g=24&t,m=512&t,v=p?n:Di(e);return function s(){for(var b=arguments.length,y=we(b),w=b;w--;)y[w]=arguments[w];if(g)var x=ao(s),_=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(y,x);if(i&&(y=ki(y,i,o,g)),a&&(y=Ti(y,a,l,g)),b-=_,g&&b<h){var C=sn(y,x);return $i(e,t,zi,s.placeholder,r,y,C,c,u,h-b)}var S=f?r:this,A=p?S[e]:e;return b=y.length,c?y=function(e,t){for(var r=e.length,i=bn(t.length,r),o=Ii(e);i--;){var a=t[i];e[i]=bo(a,r)?o[a]:n}return e}(y,c):m&&b>1&&y.reverse(),d&&u<b&&(y.length=u),this&&this!==ht&&this instanceof s&&(A=v||Di(A)),A.apply(S,y)}}function Bi(e,t){return function(n,r){return function(e,t,n,r){return yr(e,function(e,i,o){t(r,n(e),i,o)}),r}(n,e,t(r),{})}}function Vi(e,t){return function(r,i){var o;if(r===n&&i===n)return t;if(r!==n&&(o=r),i!==n){if(o===n)return i;"string"==typeof r||"string"==typeof i?(r=li(r),i=li(i)):(r=si(r),i=si(i)),o=e(r,i)}return o}}function Ui(e){return to(function(t){return t=Pt(t,Kt(so())),Kr(function(n){var r=this;return e(t,function(e){return Ct(e,r,n)})})})}function Hi(e,t){var r=(t=t===n?" ":li(t)).length;if(r<2)return r?Xr(t,e):t;var i=Xr(t,ft(e/un(t)));return rn(t)?wi(hn(i),0,e).join(""):i.slice(0,e)}function Wi(e){return function(t,r,i){return i&&"number"!=typeof i&&yo(t,r,i)&&(r=i=n),t=ds(t),r===n?(r=t,t=0):r=ds(r),function(e,t,n,r){for(var i=-1,o=vn(ft((t-e)/(n||1)),0),a=we(o);o--;)a[r?o:++i]=e,e+=n;return a}(t,r,i=i===n?t<r?1:-1:ds(i),e)}}function Yi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=gs(t),n=gs(n)),e(t,n)}}function $i(e,t,r,i,o,s,l,c,u,h){var d=8&t;t|=d?a:64,4&(t&=~(d?64:a))||(t&=-4);var f=[e,t,o,d?s:n,d?l:n,d?n:s,d?n:l,c,u,h],p=r.apply(n,f);return xo(e)&&Oo(p,f),p.placeholder=i,Mo(p,e,t)}function Gi(e){var t=Se[e];return function(e,n){if(e=gs(e),(n=null==n?0:bn(fs(n),292))&&Wt(e)){var r=(vs(e)+"e").split("e");return+((r=(vs(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Xi=kn&&1/ln(new kn([,-0]))[1]==c?function(e){return new kn(e)}:sl;function Ki(e){return function(t){var n=po(t);return n==x?on(t):n==k?cn(t):function(e,t){return Pt(t,function(t){return[t,e[t]]})}(t,e(t))}}function qi(e,t,i,c,u,h,d,f){var p=2&t;if(!p&&"function"!=typeof e)throw new Ie(r);var g=c?c.length:0;if(g||(t&=-97,c=u=n),d=d===n?d:vn(fs(d),0),f=f===n?f:fs(f),g-=u?u.length:0,64&t){var m=c,v=u;c=u=n}var b=p?n:io(e),y=[e,t,i,c,u,m,v,h,d,f];if(b&&function(e,t){var n=e[1],r=t[1],i=n|r,a=i<131,c=r==s&&8==n||r==s&&n==l&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!a&&!c)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var u=t[3];if(u){var h=e[3];e[3]=h?ki(h,u,t[4]):u,e[4]=h?sn(e[3],o):t[4]}(u=t[5])&&(h=e[5],e[5]=h?Ti(h,u,t[6]):u,e[6]=h?sn(e[5],o):t[6]),(u=t[7])&&(e[7]=u),r&s&&(e[8]=null==e[8]?t[8]:bn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(y,b),e=y[0],t=y[1],i=y[2],c=y[3],u=y[4],!(f=y[9]=y[9]===n?p?0:e.length:vn(y[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||16==t?function(e,t,r){var i=Di(e);return function o(){for(var a=arguments.length,s=we(a),l=a,c=ao(o);l--;)s[l]=arguments[l];var u=a<3&&s[0]!==c&&s[a-1]!==c?[]:sn(s,c);return(a-=u.length)<r?$i(e,t,zi,o.placeholder,n,s,u,n,n,r-a):Ct(this&&this!==ht&&this instanceof o?i:e,this,s)}}(e,t,f):t!=a&&33!=t||u.length?zi.apply(n,y):function(e,t,n,r){var i=1&t,o=Di(e);return function t(){for(var a=-1,s=arguments.length,l=-1,c=r.length,u=we(c+s),h=this&&this!==ht&&this instanceof t?o:e;++l<c;)u[l]=r[l];for(;s--;)u[l++]=arguments[++a];return Ct(h,i?n:this,u)}}(e,t,i,c);else var w=function(e,t,n){var r=1&t,i=Di(e);return function t(){return(this&&this!==ht&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,i);return Mo((b?Qr:Oo)(w,y),e,t)}function Zi(e,t,r,i){return e===n||za(e,Pe[r])&&!je.call(i,r)?t:e}function Ji(e,t,r,i,o,a){return Qa(e)&&Qa(t)&&(a.set(t,e),Vr(e,t,n,Ji,a),a.delete(t)),e}function Qi(e){return rs(e)?n:e}function eo(e,t,r,i,o,a){var s=1&r,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var u=a.get(e),h=a.get(t);if(u&&h)return u==t&&h==e;var d=-1,f=!0,p=2&r?new Gn:n;for(a.set(e,t),a.set(t,e);++d<l;){var g=e[d],m=t[d];if(i)var v=s?i(m,g,d,t,e,a):i(g,m,d,e,t,a);if(v!==n){if(v)continue;f=!1;break}if(p){if(!Rt(t,function(e,t){if(!Zt(p,t)&&(g===e||o(g,e,r,i,a)))return p.push(t)})){f=!1;break}}else if(g!==m&&!o(g,m,r,i,a)){f=!1;break}}return a.delete(e),a.delete(t),f}function to(e){return Po(ko(e,n,Wo),e+"")}function no(e){return Cr(e,Es,ho)}function ro(e){return Cr(e,Ps,fo)}var io=On?function(e){return On.get(e)}:sl;function oo(e){for(var t=e.name+"",n=En[t],r=je.call(En,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function ao(e){return(je.call(zn,"placeholder")?zn:e).placeholder}function so(){var e=zn.iteratee||rl;return e=e===rl?jr:e,arguments.length?e(arguments[0],arguments[1]):e}function lo(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function co(e){for(var t=Es(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,So(i)]}return t}function uo(e,t){var r=function(e,t){return null==e?n:e[t]}(e,t);return Fr(r)?r:n}var ho=mt?function(e){return null==e?[]:(e=Ae(e),It(mt(e),function(t){return Ge.call(e,t)}))}:pl,fo=mt?function(e){for(var t=[];e;)Mt(t,ho(e)),e=Ye(e);return t}:pl,po=Sr;function go(e,t,n){for(var r=-1,i=(t=bi(t,e)).length,o=!1;++r<i;){var a=Do(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Ja(i)&&bo(a,i)&&(Ha(e)||Ua(e))}function mo(e){return"function"!=typeof e.constructor||Co(e)?{}:Bn(Ye(e))}function vo(e){return Ha(e)||Ua(e)||!!(Ke&&e&&e[Ke])}function bo(e,t){var n=typeof e;return!!(t=null==t?u:t)&&("number"==n||"symbol"!=n&&me.test(e))&&e>-1&&e%1==0&&e<t}function yo(e,t,n){if(!Qa(n))return!1;var r=typeof t;return!!("number"==r?Ya(n)&&bo(t,n.length):"string"==r&&t in n)&&za(n[t],e)}function wo(e,t){if(Ha(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ss(e))||J.test(e)||!Z.test(e)||null!=t&&e in Ae(t)}function xo(e){var t=oo(e),n=zn[t];if("function"!=typeof n||!(t in Hn.prototype))return!1;if(e===n)return!0;var r=io(n);return!!r&&e===r[0]}(Cn&&po(new Cn(new ArrayBuffer(1)))!=P||Sn&&po(new Sn)!=x||An&&po(An.resolve())!=S||kn&&po(new kn)!=k||Tn&&po(new Tn)!=O)&&(po=function(e){var t=Sr(e),r=t==C?e.constructor:n,i=r?Lo(r):"";if(i)switch(i){case Pn:return P;case Mn:return x;case Fn:return S;case jn:return k;case Rn:return O}return t});var _o=Me?qa:gl;function Co(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Pe)}function So(e){return e==e&&!Qa(e)}function Ao(e,t){return function(r){return null!=r&&r[e]===t&&(t!==n||e in Ae(r))}}function ko(e,t,r){return t=vn(t===n?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=vn(n.length-t,0),a=we(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=we(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),Ct(e,this,s)}}function To(e,t){return t.length<2?e:_r(e,ni(t,0,-1))}function Io(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Oo=Fo(Qr),Eo=dt||function(e,t){return ht.setTimeout(e,t)},Po=Fo(ei);function Mo(e,t,n){var r=t+"";return Po(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return At(f,function(n){var r="_."+n[0];t&n[1]&&!Ot(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(oe);return t?t[1].split(ae):[]}(r),n)))}function Fo(e){var t=0,r=0;return function(){var i=yn(),o=16-(i-r);if(r=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function jo(e,t){var r=-1,i=e.length,o=i-1;for(t=t===n?i:t;++r<t;){var a=Gr(r,o),s=e[a];e[a]=e[r],e[r]=s}return e.length=t,e}var Ro=function(e){var t=Fa(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Q,function(e,n,r,i){t.push(r?i.replace(ce,"$1"):n||e)}),t});function Do(e){if("string"==typeof e||ss(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Lo(e){if(null!=e){try{return Fe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function No(e){if(e instanceof Hn)return e.clone();var t=new Un(e.__wrapped__,e.__chain__);return t.__actions__=Ii(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var zo=Kr(function(e,t){return $a(e)?ur(e,mr(t,1,$a,!0)):[]}),Bo=Kr(function(e,t){var r=Ko(t);return $a(r)&&(r=n),$a(e)?ur(e,mr(t,1,$a,!0),so(r,2)):[]}),Vo=Kr(function(e,t){var r=Ko(t);return $a(r)&&(r=n),$a(e)?ur(e,mr(t,1,$a,!0),n,r):[]});function Uo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:fs(n);return i<0&&(i=vn(r+i,0)),Nt(e,so(t,3),i)}function Ho(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var o=i-1;return r!==n&&(o=fs(r),o=r<0?vn(i+o,0):bn(o,i-1)),Nt(e,so(t,3),o,!0)}function Wo(e){return null!=e&&e.length?mr(e,1):[]}function Yo(e){return e&&e.length?e[0]:n}var $o=Kr(function(e){var t=Pt(e,mi);return t.length&&t[0]===e[0]?Ir(t):[]}),Go=Kr(function(e){var t=Ko(e),r=Pt(e,mi);return t===Ko(r)?t=n:r.pop(),r.length&&r[0]===e[0]?Ir(r,so(t,2)):[]}),Xo=Kr(function(e){var t=Ko(e),r=Pt(e,mi);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?Ir(r,n,t):[]});function Ko(e){var t=null==e?0:e.length;return t?e[t-1]:n}var qo=Kr(Zo);function Zo(e,t){return e&&e.length&&t&&t.length?Yr(e,t):e}var Jo=to(function(e,t){var n=null==e?0:e.length,r=or(e,t);return $r(e,Pt(t,function(e){return bo(e,n)?+e:e}).sort(Ai)),r});function Qo(e){return null==e?e:_n.call(e)}var ea=Kr(function(e){return ci(mr(e,1,$a,!0))}),ta=Kr(function(e){var t=Ko(e);return $a(t)&&(t=n),ci(mr(e,1,$a,!0),so(t,2))}),na=Kr(function(e){var t=Ko(e);return t="function"==typeof t?t:n,ci(mr(e,1,$a,!0),n,t)});function ra(e){if(!e||!e.length)return[];var t=0;return e=It(e,function(e){if($a(e))return t=vn(e.length,t),!0}),Gt(t,function(t){return Pt(e,Ht(t))})}function ia(e,t){if(!e||!e.length)return[];var r=ra(e);return null==t?r:Pt(r,function(e){return Ct(t,n,e)})}var oa=Kr(function(e,t){return $a(e)?ur(e,t):[]}),aa=Kr(function(e){return pi(It(e,$a))}),sa=Kr(function(e){var t=Ko(e);return $a(t)&&(t=n),pi(It(e,$a),so(t,2))}),la=Kr(function(e){var t=Ko(e);return t="function"==typeof t?t:n,pi(It(e,$a),n,t)}),ca=Kr(ra),ua=Kr(function(e){var t=e.length,r=t>1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,ia(e,r)});function ha(e){var t=zn(e);return t.__chain__=!0,t}function da(e,t){return t(e)}var fa=to(function(e){var t=e.length,r=t?e[0]:0,i=this.__wrapped__,o=function(t){return or(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Hn&&bo(r)?((i=i.slice(r,+r+(t?1:0))).__actions__.push({func:da,args:[o],thisArg:n}),new Un(i,this.__chain__).thru(function(e){return t&&!e.length&&e.push(n),e})):this.thru(o)}),pa=Ei(function(e,t,n){je.call(e,n)?++e[n]:ir(e,n,1)}),ga=Li(Uo),ma=Li(Ho);function va(e,t){return(Ha(e)?At:hr)(e,so(t,3))}function ba(e,t){return(Ha(e)?kt:dr)(e,so(t,3))}var ya=Ei(function(e,t,n){je.call(e,n)?e[n].push(t):ir(e,n,[t])}),wa=Kr(function(e,t,n){var r=-1,i="function"==typeof t,o=Ya(e)?we(e.length):[];return hr(e,function(e){o[++r]=i?Ct(t,e,n):Or(e,t,n)}),o}),xa=Ei(function(e,t,n){ir(e,n,t)});function _a(e,t){return(Ha(e)?Pt:Nr)(e,so(t,3))}var Ca=Ei(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),Sa=Kr(function(e,t){if(null==e)return[];var n=t.length;return n>1&&yo(e,t[0],t[1])?t=[]:n>2&&yo(t[0],t[1],t[2])&&(t=[t[0]]),Hr(e,mr(t,1),[])}),Aa=ut||function(){return ht.Date.now()};function ka(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,qi(e,s,n,n,n,n,t)}function Ta(e,t){var i;if("function"!=typeof t)throw new Ie(r);return e=fs(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=n),i}}var Ia=Kr(function(e,t,n){var r=1;if(n.length){var i=sn(n,ao(Ia));r|=a}return qi(e,r,t,n,i)}),Oa=Kr(function(e,t,n){var r=3;if(n.length){var i=sn(n,ao(Oa));r|=a}return qi(t,r,e,n,i)});function Ea(e,t,i){var o,a,s,l,c,u,h=0,d=!1,f=!1,p=!0;if("function"!=typeof e)throw new Ie(r);function g(t){var r=o,i=a;return o=a=n,h=t,l=e.apply(i,r)}function m(e){var r=e-u;return u===n||r>=t||r<0||f&&e-h>=s}function v(){var e=Aa();if(m(e))return b(e);c=Eo(v,function(e){var n=t-(e-u);return f?bn(n,s-(e-h)):n}(e))}function b(e){return c=n,p&&o?g(e):(o=a=n,l)}function y(){var e=Aa(),r=m(e);if(o=arguments,a=this,u=e,r){if(c===n)return function(e){return h=e,c=Eo(v,t),d?g(e):l}(u);if(f)return xi(c),c=Eo(v,t),g(u)}return c===n&&(c=Eo(v,t)),l}return t=gs(t)||0,Qa(i)&&(d=!!i.leading,s=(f="maxWait"in i)?vn(gs(i.maxWait)||0,t):s,p="trailing"in i?!!i.trailing:p),y.cancel=function(){c!==n&&xi(c),h=0,o=u=a=c=n},y.flush=function(){return c===n?l:b(Aa())},y}var Pa=Kr(function(e,t){return cr(e,1,t)}),Ma=Kr(function(e,t,n){return cr(e,gs(t)||0,n)});function Fa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ie(r);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Fa.Cache||$n),n}function ja(e){if("function"!=typeof e)throw new Ie(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Fa.Cache=$n;var Ra=yi(function(e,t){var n=(t=1==t.length&&Ha(t[0])?Pt(t[0],Kt(so())):Pt(mr(t,1),Kt(so()))).length;return Kr(function(r){for(var i=-1,o=bn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return Ct(e,this,r)})}),Da=Kr(function(e,t){var r=sn(t,ao(Da));return qi(e,a,n,t,r)}),La=Kr(function(e,t){var r=sn(t,ao(La));return qi(e,64,n,t,r)}),Na=to(function(e,t){return qi(e,l,n,n,n,t)});function za(e,t){return e===t||e!=e&&t!=t}var Ba=Yi(Ar),Va=Yi(function(e,t){return e>=t}),Ua=Er(function(){return arguments}())?Er:function(e){return es(e)&&je.call(e,"callee")&&!Ge.call(e,"callee")},Ha=we.isArray,Wa=vt?Kt(vt):function(e){return es(e)&&Sr(e)==E};function Ya(e){return null!=e&&Ja(e.length)&&!qa(e)}function $a(e){return es(e)&&Ya(e)}var Ga=Dt||gl,Xa=bt?Kt(bt):function(e){return es(e)&&Sr(e)==v};function Ka(e){if(!es(e))return!1;var t=Sr(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!rs(e)}function qa(e){if(!Qa(e))return!1;var t=Sr(e);return t==y||t==w||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Za(e){return"number"==typeof e&&e==fs(e)}function Ja(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=u}function Qa(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function es(e){return null!=e&&"object"==typeof e}var ts=yt?Kt(yt):function(e){return es(e)&&po(e)==x};function ns(e){return"number"==typeof e||es(e)&&Sr(e)==_}function rs(e){if(!es(e)||Sr(e)!=C)return!1;var t=Ye(e);if(null===t)return!0;var n=je.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Fe.call(n)==Ne}var is=wt?Kt(wt):function(e){return es(e)&&Sr(e)==A},os=xt?Kt(xt):function(e){return es(e)&&po(e)==k};function as(e){return"string"==typeof e||!Ha(e)&&es(e)&&Sr(e)==T}function ss(e){return"symbol"==typeof e||es(e)&&Sr(e)==I}var ls=_t?Kt(_t):function(e){return es(e)&&Ja(e.length)&&!!it[Sr(e)]},cs=Yi(Lr),us=Yi(function(e,t){return e<=t});function hs(e){if(!e)return[];if(Ya(e))return as(e)?hn(e):Ii(e);if(Je&&e[Je])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Je]());var t=po(e);return(t==x?on:t==k?ln:zs)(e)}function ds(e){return e?(e=gs(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function fs(e){var t=ds(e),n=t%1;return t==t?n?t-n:t:0}function ps(e){return e?ar(fs(e),0,d):0}function gs(e){if("number"==typeof e)return e;if(ss(e))return h;if(Qa(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Qa(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Xt(e);var n=fe.test(e);return n||ge.test(e)?lt(e.slice(2),n?2:8):de.test(e)?h:+e}function ms(e){return Oi(e,Ps(e))}function vs(e){return null==e?"":li(e)}var bs=Pi(function(e,t){if(Co(t)||Ya(t))Oi(t,Es(t),e);else for(var n in t)je.call(t,n)&&er(e,n,t[n])}),ys=Pi(function(e,t){Oi(t,Ps(t),e)}),ws=Pi(function(e,t,n,r){Oi(t,Ps(t),e,r)}),xs=Pi(function(e,t,n,r){Oi(t,Es(t),e,r)}),_s=to(or),Cs=Kr(function(e,t){e=Ae(e);var r=-1,i=t.length,o=i>2?t[2]:n;for(o&&yo(t[0],t[1],o)&&(i=1);++r<i;)for(var a=t[r],s=Ps(a),l=-1,c=s.length;++l<c;){var u=s[l],h=e[u];(h===n||za(h,Pe[u])&&!je.call(e,u))&&(e[u]=a[u])}return e}),Ss=Kr(function(e){return e.push(n,Ji),Ct(Fs,n,e)});function As(e,t,r){var i=null==e?n:_r(e,t);return i===n?r:i}function ks(e,t){return null!=e&&go(e,t,Tr)}var Ts=Bi(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),e[t]=n},Qs(nl)),Is=Bi(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),je.call(e,t)?e[t].push(n):e[t]=[n]},so),Os=Kr(Or);function Es(e){return Ya(e)?Kn(e):Rr(e)}function Ps(e){return Ya(e)?Kn(e,!0):Dr(e)}var Ms=Pi(function(e,t,n){Vr(e,t,n)}),Fs=Pi(function(e,t,n,r){Vr(e,t,n,r)}),js=to(function(e,t){var n={};if(null==e)return n;var r=!1;t=Pt(t,function(t){return t=bi(t,e),r||(r=t.length>1),t}),Oi(e,ro(e),n),r&&(n=sr(n,7,Qi));for(var i=t.length;i--;)ui(n,t[i]);return n}),Rs=to(function(e,t){return null==e?{}:function(e,t){return Wr(e,t,function(t,n){return ks(e,n)})}(e,t)});function Ds(e,t){if(null==e)return{};var n=Pt(ro(e),function(e){return[e]});return t=so(t),Wr(e,n,function(e,n){return t(e,n[0])})}var Ls=Ki(Es),Ns=Ki(Ps);function zs(e){return null==e?[]:qt(e,Es(e))}var Bs=Ri(function(e,t,n){return t=t.toLowerCase(),e+(n?Vs(t):t)});function Vs(e){return Ks(vs(e).toLowerCase())}function Us(e){return(e=vs(e))&&e.replace(ve,en).replace(Ze,"")}var Hs=Ri(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Ws=Ri(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Ys=ji("toLowerCase"),$s=Ri(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Gs=Ri(function(e,t,n){return e+(n?" ":"")+Ks(t)}),Xs=Ri(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Ks=ji("toUpperCase");function qs(e,t,r){return e=vs(e),(t=r?n:t)===n?function(e){return tt.test(e)}(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.match(se)||[]}(e):e.match(t)||[]}var Zs=Kr(function(e,t){try{return Ct(e,n,t)}catch(e){return Ka(e)?e:new _e(e)}}),Js=to(function(e,t){return At(t,function(t){t=Do(t),ir(e,t,Ia(e[t],e))}),e});function Qs(e){return function(){return e}}var el=Ni(),tl=Ni(!0);function nl(e){return e}function rl(e){return jr("function"==typeof e?e:sr(e,1))}var il=Kr(function(e,t){return function(n){return Or(n,e,t)}}),ol=Kr(function(e,t){return function(n){return Or(e,n,t)}});function al(e,t,n){var r=Es(t),i=xr(t,r);null!=n||Qa(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=xr(t,Es(t)));var o=!(Qa(n)&&"chain"in n&&!n.chain),a=qa(e);return At(i,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Ii(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Mt([this.value()],arguments))})}),e}function sl(){}var ll=Ui(Pt),cl=Ui(Tt),ul=Ui(Rt);function hl(e){return wo(e)?Ht(Do(e)):function(e){return function(t){return _r(t,e)}}(e)}var dl=Wi(),fl=Wi(!0);function pl(){return[]}function gl(){return!1}var ml,vl=Vi(function(e,t){return e+t},0),bl=Gi("ceil"),yl=Vi(function(e,t){return e/t},1),wl=Gi("floor"),xl=Vi(function(e,t){return e*t},1),_l=Gi("round"),Cl=Vi(function(e,t){return e-t},0);return zn.after=function(e,t){if("function"!=typeof t)throw new Ie(r);return e=fs(e),function(){if(--e<1)return t.apply(this,arguments)}},zn.ary=ka,zn.assign=bs,zn.assignIn=ys,zn.assignInWith=ws,zn.assignWith=xs,zn.at=_s,zn.before=Ta,zn.bind=Ia,zn.bindAll=Js,zn.bindKey=Oa,zn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ha(e)?e:[e]},zn.chain=ha,zn.chunk=function(e,t,r){t=(r?yo(e,t,r):t===n)?1:vn(fs(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,a=0,s=we(ft(i/t));o<i;)s[a++]=ni(e,o,o+=t);return s},zn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},zn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=we(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Mt(Ha(n)?Ii(n):[n],mr(t,1))},zn.cond=function(e){var t=null==e?0:e.length,n=so();return e=t?Pt(e,function(e){if("function"!=typeof e[1])throw new Ie(r);return[n(e[0]),e[1]]}):[],Kr(function(n){for(var r=-1;++r<t;){var i=e[r];if(Ct(i[0],this,n))return Ct(i[1],this,n)}})},zn.conforms=function(e){return function(e){var t=Es(e);return function(n){return lr(n,e,t)}}(sr(e,1))},zn.constant=Qs,zn.countBy=pa,zn.create=function(e,t){var n=Bn(e);return null==t?n:rr(n,t)},zn.curry=function e(t,r,i){var o=qi(t,8,n,n,n,n,n,r=i?n:r);return o.placeholder=e.placeholder,o},zn.curryRight=function e(t,r,i){var o=qi(t,16,n,n,n,n,n,r=i?n:r);return o.placeholder=e.placeholder,o},zn.debounce=Ea,zn.defaults=Cs,zn.defaultsDeep=Ss,zn.defer=Pa,zn.delay=Ma,zn.difference=zo,zn.differenceBy=Bo,zn.differenceWith=Vo,zn.drop=function(e,t,r){var i=null==e?0:e.length;return i?ni(e,(t=r||t===n?1:fs(t))<0?0:t,i):[]},zn.dropRight=function(e,t,r){var i=null==e?0:e.length;return i?ni(e,0,(t=i-(t=r||t===n?1:fs(t)))<0?0:t):[]},zn.dropRightWhile=function(e,t){return e&&e.length?di(e,so(t,3),!0,!0):[]},zn.dropWhile=function(e,t){return e&&e.length?di(e,so(t,3),!0):[]},zn.fill=function(e,t,r,i){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&yo(e,t,r)&&(r=0,i=o),function(e,t,r,i){var o=e.length;for((r=fs(r))<0&&(r=-r>o?0:o+r),(i=i===n||i>o?o:fs(i))<0&&(i+=o),i=r>i?0:ps(i);r<i;)e[r++]=t;return e}(e,t,r,i)):[]},zn.filter=function(e,t){return(Ha(e)?It:gr)(e,so(t,3))},zn.flatMap=function(e,t){return mr(_a(e,t),1)},zn.flatMapDeep=function(e,t){return mr(_a(e,t),c)},zn.flatMapDepth=function(e,t,r){return r=r===n?1:fs(r),mr(_a(e,t),r)},zn.flatten=Wo,zn.flattenDeep=function(e){return null!=e&&e.length?mr(e,c):[]},zn.flattenDepth=function(e,t){return null!=e&&e.length?mr(e,t=t===n?1:fs(t)):[]},zn.flip=function(e){return qi(e,512)},zn.flow=el,zn.flowRight=tl,zn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},zn.functions=function(e){return null==e?[]:xr(e,Es(e))},zn.functionsIn=function(e){return null==e?[]:xr(e,Ps(e))},zn.groupBy=ya,zn.initial=function(e){return null!=e&&e.length?ni(e,0,-1):[]},zn.intersection=$o,zn.intersectionBy=Go,zn.intersectionWith=Xo,zn.invert=Ts,zn.invertBy=Is,zn.invokeMap=wa,zn.iteratee=rl,zn.keyBy=xa,zn.keys=Es,zn.keysIn=Ps,zn.map=_a,zn.mapKeys=function(e,t){var n={};return t=so(t,3),yr(e,function(e,r,i){ir(n,t(e,r,i),e)}),n},zn.mapValues=function(e,t){var n={};return t=so(t,3),yr(e,function(e,r,i){ir(n,r,t(e,r,i))}),n},zn.matches=function(e){return zr(sr(e,1))},zn.matchesProperty=function(e,t){return Br(e,sr(t,1))},zn.memoize=Fa,zn.merge=Ms,zn.mergeWith=Fs,zn.method=il,zn.methodOf=ol,zn.mixin=al,zn.negate=ja,zn.nthArg=function(e){return e=fs(e),Kr(function(t){return Ur(t,e)})},zn.omit=js,zn.omitBy=function(e,t){return Ds(e,ja(so(t)))},zn.once=function(e){return Ta(2,e)},zn.orderBy=function(e,t,r,i){return null==e?[]:(Ha(t)||(t=null==t?[]:[t]),Ha(r=i?n:r)||(r=null==r?[]:[r]),Hr(e,t,r))},zn.over=ll,zn.overArgs=Ra,zn.overEvery=cl,zn.overSome=ul,zn.partial=Da,zn.partialRight=La,zn.partition=Ca,zn.pick=Rs,zn.pickBy=Ds,zn.property=hl,zn.propertyOf=function(e){return function(t){return null==e?n:_r(e,t)}},zn.pull=qo,zn.pullAll=Zo,zn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Yr(e,t,so(n,2)):e},zn.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Yr(e,t,n,r):e},zn.pullAt=Jo,zn.range=dl,zn.rangeRight=fl,zn.rearg=Na,zn.reject=function(e,t){return(Ha(e)?It:gr)(e,ja(so(t,3)))},zn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=so(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return $r(e,i),n},zn.rest=function(e,t){if("function"!=typeof e)throw new Ie(r);return Kr(e,t=t===n?t:fs(t))},zn.reverse=Qo,zn.sampleSize=function(e,t,r){return t=(r?yo(e,t,r):t===n)?1:fs(t),(Ha(e)?Zn:Zr)(e,t)},zn.set=function(e,t,n){return null==e?e:Jr(e,t,n)},zn.setWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:Jr(e,t,r,i)},zn.shuffle=function(e){return(Ha(e)?Jn:ti)(e)},zn.slice=function(e,t,r){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&yo(e,t,r)?(t=0,r=i):(t=null==t?0:fs(t),r=r===n?i:fs(r)),ni(e,t,r)):[]},zn.sortBy=Sa,zn.sortedUniq=function(e){return e&&e.length?ai(e):[]},zn.sortedUniqBy=function(e,t){return e&&e.length?ai(e,so(t,2)):[]},zn.split=function(e,t,r){return r&&"number"!=typeof r&&yo(e,t,r)&&(t=r=n),(r=r===n?d:r>>>0)?(e=vs(e))&&("string"==typeof t||null!=t&&!is(t))&&!(t=li(t))&&rn(e)?wi(hn(e),0,r):e.split(t,r):[]},zn.spread=function(e,t){if("function"!=typeof e)throw new Ie(r);return t=null==t?0:vn(fs(t),0),Kr(function(n){var r=n[t],i=wi(n,0,t);return r&&Mt(i,r),Ct(e,this,i)})},zn.tail=function(e){var t=null==e?0:e.length;return t?ni(e,1,t):[]},zn.take=function(e,t,r){return e&&e.length?ni(e,0,(t=r||t===n?1:fs(t))<0?0:t):[]},zn.takeRight=function(e,t,r){var i=null==e?0:e.length;return i?ni(e,(t=i-(t=r||t===n?1:fs(t)))<0?0:t,i):[]},zn.takeRightWhile=function(e,t){return e&&e.length?di(e,so(t,3),!1,!0):[]},zn.takeWhile=function(e,t){return e&&e.length?di(e,so(t,3)):[]},zn.tap=function(e,t){return t(e),e},zn.throttle=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new Ie(r);return Qa(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),Ea(e,t,{leading:i,maxWait:t,trailing:o})},zn.thru=da,zn.toArray=hs,zn.toPairs=Ls,zn.toPairsIn=Ns,zn.toPath=function(e){return Ha(e)?Pt(e,Do):ss(e)?[e]:Ii(Ro(vs(e)))},zn.toPlainObject=ms,zn.transform=function(e,t,n){var r=Ha(e),i=r||Ga(e)||ls(e);if(t=so(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Qa(e)&&qa(o)?Bn(Ye(e)):{}}return(i?At:yr)(e,function(e,r,i){return t(n,e,r,i)}),n},zn.unary=function(e){return ka(e,1)},zn.union=ea,zn.unionBy=ta,zn.unionWith=na,zn.uniq=function(e){return e&&e.length?ci(e):[]},zn.uniqBy=function(e,t){return e&&e.length?ci(e,so(t,2)):[]},zn.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?ci(e,n,t):[]},zn.unset=function(e,t){return null==e||ui(e,t)},zn.unzip=ra,zn.unzipWith=ia,zn.update=function(e,t,n){return null==e?e:hi(e,t,vi(n))},zn.updateWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:hi(e,t,vi(r),i)},zn.values=zs,zn.valuesIn=function(e){return null==e?[]:qt(e,Ps(e))},zn.without=oa,zn.words=qs,zn.wrap=function(e,t){return Da(vi(t),e)},zn.xor=aa,zn.xorBy=sa,zn.xorWith=la,zn.zip=ca,zn.zipObject=function(e,t){return gi(e||[],t||[],er)},zn.zipObjectDeep=function(e,t){return gi(e||[],t||[],Jr)},zn.zipWith=ua,zn.entries=Ls,zn.entriesIn=Ns,zn.extend=ys,zn.extendWith=ws,al(zn,zn),zn.add=vl,zn.attempt=Zs,zn.camelCase=Bs,zn.capitalize=Vs,zn.ceil=bl,zn.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=gs(r))==r?r:0),t!==n&&(t=(t=gs(t))==t?t:0),ar(gs(e),t,r)},zn.clone=function(e){return sr(e,4)},zn.cloneDeep=function(e){return sr(e,5)},zn.cloneDeepWith=function(e,t){return sr(e,5,t="function"==typeof t?t:n)},zn.cloneWith=function(e,t){return sr(e,4,t="function"==typeof t?t:n)},zn.conformsTo=function(e,t){return null==t||lr(e,t,Es(t))},zn.deburr=Us,zn.defaultTo=function(e,t){return null==e||e!=e?t:e},zn.divide=yl,zn.endsWith=function(e,t,r){e=vs(e),t=li(t);var i=e.length,o=r=r===n?i:ar(fs(r),0,i);return(r-=t.length)>=0&&e.slice(r,o)==t},zn.eq=za,zn.escape=function(e){return(e=vs(e))&&G.test(e)?e.replace(Y,tn):e},zn.escapeRegExp=function(e){return(e=vs(e))&&te.test(e)?e.replace(ee,"\\$&"):e},zn.every=function(e,t,r){var i=Ha(e)?Tt:fr;return r&&yo(e,t,r)&&(t=n),i(e,so(t,3))},zn.find=ga,zn.findIndex=Uo,zn.findKey=function(e,t){return Lt(e,so(t,3),yr)},zn.findLast=ma,zn.findLastIndex=Ho,zn.findLastKey=function(e,t){return Lt(e,so(t,3),wr)},zn.floor=wl,zn.forEach=va,zn.forEachRight=ba,zn.forIn=function(e,t){return null==e?e:vr(e,so(t,3),Ps)},zn.forInRight=function(e,t){return null==e?e:br(e,so(t,3),Ps)},zn.forOwn=function(e,t){return e&&yr(e,so(t,3))},zn.forOwnRight=function(e,t){return e&&wr(e,so(t,3))},zn.get=As,zn.gt=Ba,zn.gte=Va,zn.has=function(e,t){return null!=e&&go(e,t,kr)},zn.hasIn=ks,zn.head=Yo,zn.identity=nl,zn.includes=function(e,t,n,r){e=Ya(e)?e:zs(e),n=n&&!r?fs(n):0;var i=e.length;return n<0&&(n=vn(i+n,0)),as(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&zt(e,t,n)>-1},zn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:fs(n);return i<0&&(i=vn(r+i,0)),zt(e,t,i)},zn.inRange=function(e,t,r){return t=ds(t),r===n?(r=t,t=0):r=ds(r),function(e,t,n){return e>=bn(t,n)&&e<vn(t,n)}(e=gs(e),t,r)},zn.invoke=Os,zn.isArguments=Ua,zn.isArray=Ha,zn.isArrayBuffer=Wa,zn.isArrayLike=Ya,zn.isArrayLikeObject=$a,zn.isBoolean=function(e){return!0===e||!1===e||es(e)&&Sr(e)==m},zn.isBuffer=Ga,zn.isDate=Xa,zn.isElement=function(e){return es(e)&&1===e.nodeType&&!rs(e)},zn.isEmpty=function(e){if(null==e)return!0;if(Ya(e)&&(Ha(e)||"string"==typeof e||"function"==typeof e.splice||Ga(e)||ls(e)||Ua(e)))return!e.length;var t=po(e);if(t==x||t==k)return!e.size;if(Co(e))return!Rr(e).length;for(var n in e)if(je.call(e,n))return!1;return!0},zn.isEqual=function(e,t){return Pr(e,t)},zn.isEqualWith=function(e,t,r){var i=(r="function"==typeof r?r:n)?r(e,t):n;return i===n?Pr(e,t,n,r):!!i},zn.isError=Ka,zn.isFinite=function(e){return"number"==typeof e&&Wt(e)},zn.isFunction=qa,zn.isInteger=Za,zn.isLength=Ja,zn.isMap=ts,zn.isMatch=function(e,t){return e===t||Mr(e,t,co(t))},zn.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,Mr(e,t,co(t),r)},zn.isNaN=function(e){return ns(e)&&e!=+e},zn.isNative=function(e){if(_o(e))throw new _e("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Fr(e)},zn.isNil=function(e){return null==e},zn.isNull=function(e){return null===e},zn.isNumber=ns,zn.isObject=Qa,zn.isObjectLike=es,zn.isPlainObject=rs,zn.isRegExp=is,zn.isSafeInteger=function(e){return Za(e)&&e>=-9007199254740991&&e<=u},zn.isSet=os,zn.isString=as,zn.isSymbol=ss,zn.isTypedArray=ls,zn.isUndefined=function(e){return e===n},zn.isWeakMap=function(e){return es(e)&&po(e)==O},zn.isWeakSet=function(e){return es(e)&&"[object WeakSet]"==Sr(e)},zn.join=function(e,t){return null==e?"":gn.call(e,t)},zn.kebabCase=Hs,zn.last=Ko,zn.lastIndexOf=function(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var o=i;return r!==n&&(o=(o=fs(r))<0?vn(i+o,0):bn(o,i-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Nt(e,Vt,o,!0)},zn.lowerCase=Ws,zn.lowerFirst=Ys,zn.lt=cs,zn.lte=us,zn.max=function(e){return e&&e.length?pr(e,nl,Ar):n},zn.maxBy=function(e,t){return e&&e.length?pr(e,so(t,2),Ar):n},zn.mean=function(e){return Ut(e,nl)},zn.meanBy=function(e,t){return Ut(e,so(t,2))},zn.min=function(e){return e&&e.length?pr(e,nl,Lr):n},zn.minBy=function(e,t){return e&&e.length?pr(e,so(t,2),Lr):n},zn.stubArray=pl,zn.stubFalse=gl,zn.stubObject=function(){return{}},zn.stubString=function(){return""},zn.stubTrue=function(){return!0},zn.multiply=xl,zn.nth=function(e,t){return e&&e.length?Ur(e,fs(t)):n},zn.noConflict=function(){return ht._===this&&(ht._=ze),this},zn.noop=sl,zn.now=Aa,zn.pad=function(e,t,n){e=vs(e);var r=(t=fs(t))?un(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Hi(gt(i),n)+e+Hi(ft(i),n)},zn.padEnd=function(e,t,n){e=vs(e);var r=(t=fs(t))?un(e):0;return t&&r<t?e+Hi(t-r,n):e},zn.padStart=function(e,t,n){e=vs(e);var r=(t=fs(t))?un(e):0;return t&&r<t?Hi(t-r,n)+e:e},zn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),wn(vs(e).replace(ne,""),t||0)},zn.random=function(e,t,r){if(r&&"boolean"!=typeof r&&yo(e,t,r)&&(t=r=n),r===n&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=ds(e),t===n?(t=e,e=0):t=ds(t)),e>t){var i=e;e=t,t=i}if(r||e%1||t%1){var o=xn();return bn(e+o*(t-e+st("1e-"+((o+"").length-1))),t)}return Gr(e,t)},zn.reduce=function(e,t,n){var r=Ha(e)?Ft:Yt,i=arguments.length<3;return r(e,so(t,4),n,i,hr)},zn.reduceRight=function(e,t,n){var r=Ha(e)?jt:Yt,i=arguments.length<3;return r(e,so(t,4),n,i,dr)},zn.repeat=function(e,t,r){return t=(r?yo(e,t,r):t===n)?1:fs(t),Xr(vs(e),t)},zn.replace=function(){var e=arguments,t=vs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},zn.result=function(e,t,r){var i=-1,o=(t=bi(t,e)).length;for(o||(o=1,e=n);++i<o;){var a=null==e?n:e[Do(t[i])];a===n&&(i=o,a=r),e=qa(a)?a.call(e):a}return e},zn.round=_l,zn.runInContext=e,zn.sample=function(e){return(Ha(e)?qn:qr)(e)},zn.size=function(e){if(null==e)return 0;if(Ya(e))return as(e)?un(e):e.length;var t=po(e);return t==x||t==k?e.size:Rr(e).length},zn.snakeCase=$s,zn.some=function(e,t,r){var i=Ha(e)?Rt:ri;return r&&yo(e,t,r)&&(t=n),i(e,so(t,3))},zn.sortedIndex=function(e,t){return ii(e,t)},zn.sortedIndexBy=function(e,t,n){return oi(e,t,so(n,2))},zn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ii(e,t);if(r<n&&za(e[r],t))return r}return-1},zn.sortedLastIndex=function(e,t){return ii(e,t,!0)},zn.sortedLastIndexBy=function(e,t,n){return oi(e,t,so(n,2),!0)},zn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ii(e,t,!0)-1;if(za(e[n],t))return n}return-1},zn.startCase=Gs,zn.startsWith=function(e,t,n){return e=vs(e),n=null==n?0:ar(fs(n),0,e.length),t=li(t),e.slice(n,n+t.length)==t},zn.subtract=Cl,zn.sum=function(e){return e&&e.length?$t(e,nl):0},zn.sumBy=function(e,t){return e&&e.length?$t(e,so(t,2)):0},zn.template=function(e,t,r){var i=zn.templateSettings;r&&yo(e,t,r)&&(t=n),e=vs(e),t=ws({},t,i,Zi);var o,a,s=ws({},t.imports,i.imports,Zi),l=Es(s),c=qt(s,l),u=0,h=t.interpolate||be,d="__p += '",f=ke((t.escape||be).source+"|"+h.source+"|"+(h===q?ue:be).source+"|"+(t.evaluate||be).source+"|$","g"),p="//# sourceURL="+(je.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rt+"]")+"\n";e.replace(f,function(t,n,r,i,s,l){return r||(r=i),d+=e.slice(u,l).replace(ye,nn),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+t.length,t}),d+="';\n";var g=je.call(t,"variable")&&t.variable;if(g){if(le.test(g))throw new _e("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace(V,""):d).replace(U,"$1").replace(H,"$1;"),d="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var m=Zs(function(){return Ce(l,p+"return "+d).apply(n,c)});if(m.source=d,Ka(m))throw m;return m},zn.times=function(e,t){if((e=fs(e))<1||e>u)return[];var n=d,r=bn(e,d);t=so(t),e-=d;for(var i=Gt(r,t);++n<e;)t(n);return i},zn.toFinite=ds,zn.toInteger=fs,zn.toLength=ps,zn.toLower=function(e){return vs(e).toLowerCase()},zn.toNumber=gs,zn.toSafeInteger=function(e){return e?ar(fs(e),-9007199254740991,u):0===e?e:0},zn.toString=vs,zn.toUpper=function(e){return vs(e).toUpperCase()},zn.trim=function(e,t,r){if((e=vs(e))&&(r||t===n))return Xt(e);if(!e||!(t=li(t)))return e;var i=hn(e),o=hn(t);return wi(i,Jt(i,o),Qt(i,o)+1).join("")},zn.trimEnd=function(e,t,r){if((e=vs(e))&&(r||t===n))return e.slice(0,dn(e)+1);if(!e||!(t=li(t)))return e;var i=hn(e);return wi(i,0,Qt(i,hn(t))+1).join("")},zn.trimStart=function(e,t,r){if((e=vs(e))&&(r||t===n))return e.replace(ne,"");if(!e||!(t=li(t)))return e;var i=hn(e);return wi(i,Jt(i,hn(t))).join("")},zn.truncate=function(e,t){var r=30,i="...";if(Qa(t)){var o="separator"in t?t.separator:o;r="length"in t?fs(t.length):r,i="omission"in t?li(t.omission):i}var a=(e=vs(e)).length;if(rn(e)){var s=hn(e);a=s.length}if(r>=a)return e;var l=r-un(i);if(l<1)return i;var c=s?wi(s,0,l).join(""):e.slice(0,l);if(o===n)return c+i;if(s&&(l+=c.length-l),is(o)){if(e.slice(l).search(o)){var u,h=c;for(o.global||(o=ke(o.source,vs(he.exec(o))+"g")),o.lastIndex=0;u=o.exec(h);)var d=u.index;c=c.slice(0,d===n?l:d)}}else if(e.indexOf(li(o),l)!=l){var f=c.lastIndexOf(o);f>-1&&(c=c.slice(0,f))}return c+i},zn.unescape=function(e){return(e=vs(e))&&$.test(e)?e.replace(W,fn):e},zn.uniqueId=function(e){var t=++Re;return vs(e)+t},zn.upperCase=Xs,zn.upperFirst=Ks,zn.each=va,zn.eachRight=ba,zn.first=Yo,al(zn,(ml={},yr(zn,function(e,t){je.call(zn.prototype,t)||(ml[t]=e)}),ml),{chain:!1}),zn.VERSION="4.17.21",At(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){zn[e].placeholder=zn}),At(["drop","take"],function(e,t){Hn.prototype[e]=function(r){r=r===n?1:vn(fs(r),0);var i=this.__filtered__&&!t?new Hn(this):this.clone();return i.__filtered__?i.__takeCount__=bn(r,i.__takeCount__):i.__views__.push({size:bn(r,d),type:e+(i.__dir__<0?"Right":"")}),i},Hn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),At(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;Hn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:so(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),At(["head","last"],function(e,t){var n="take"+(t?"Right":"");Hn.prototype[e]=function(){return this[n](1).value()[0]}}),At(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Hn.prototype[e]=function(){return this.__filtered__?new Hn(this):this[n](1)}}),Hn.prototype.compact=function(){return this.filter(nl)},Hn.prototype.find=function(e){return this.filter(e).head()},Hn.prototype.findLast=function(e){return this.reverse().find(e)},Hn.prototype.invokeMap=Kr(function(e,t){return"function"==typeof e?new Hn(this):this.map(function(n){return Or(n,e,t)})}),Hn.prototype.reject=function(e){return this.filter(ja(so(e)))},Hn.prototype.slice=function(e,t){e=fs(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Hn(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=fs(t))<0?r.dropRight(-t):r.take(t-e)),r)},Hn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Hn.prototype.toArray=function(){return this.take(d)},yr(Hn.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=zn[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);o&&(zn.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,l=t instanceof Hn,c=s[0],u=l||Ha(t),h=function(e){var t=o.apply(zn,Mt([e],s));return i&&d?t[0]:t};u&&r&&"function"==typeof c&&1!=c.length&&(l=u=!1);var d=this.__chain__,f=!!this.__actions__.length,p=a&&!d,g=l&&!f;if(!a&&u){t=g?t:new Hn(this);var m=e.apply(t,s);return m.__actions__.push({func:da,args:[h],thisArg:n}),new Un(m,d)}return p&&g?e.apply(this,s):(m=this.thru(h),p?i?m.value()[0]:m.value():m)})}),At(["pop","push","shift","sort","splice","unshift"],function(e){var t=Oe[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);zn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Ha(i)?i:[],e)}return this[n](function(n){return t.apply(Ha(n)?n:[],e)})}}),yr(Hn.prototype,function(e,t){var n=zn[t];if(n){var r=n.name+"";je.call(En,r)||(En[r]=[]),En[r].push({name:t,func:n})}}),En[zi(n,2).name]=[{name:"wrapper",func:n}],Hn.prototype.clone=function(){var e=new Hn(this.__wrapped__);return e.__actions__=Ii(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ii(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ii(this.__views__),e},Hn.prototype.reverse=function(){if(this.__filtered__){var e=new Hn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Hn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ha(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=bn(t,e+a);break;case"takeRight":e=vn(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,l=s-a,c=r?s:a-1,u=this.__iteratees__,h=u.length,d=0,f=bn(l,this.__takeCount__);if(!n||!r&&i==l&&f==l)return fi(e,this.__actions__);var p=[];e:for(;l--&&d<f;){for(var g=-1,m=e[c+=t];++g<h;){var v=u[g],b=v.iteratee,y=v.type,w=b(m);if(2==y)m=w;else if(!w){if(1==y)continue e;break e}}p[d++]=m}return p},zn.prototype.at=fa,zn.prototype.chain=function(){return ha(this)},zn.prototype.commit=function(){return new Un(this.value(),this.__chain__)},zn.prototype.next=function(){this.__values__===n&&(this.__values__=hs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},zn.prototype.plant=function(e){for(var t,r=this;r instanceof Vn;){var i=No(r);i.__index__=0,i.__values__=n,t?o.__wrapped__=i:t=i;var o=i;r=r.__wrapped__}return o.__wrapped__=e,t},zn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Hn){var t=e;return this.__actions__.length&&(t=new Hn(this)),(t=t.reverse()).__actions__.push({func:da,args:[Qo],thisArg:n}),new Un(t,this.__chain__)}return this.thru(Qo)},zn.prototype.toJSON=zn.prototype.valueOf=zn.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},zn.prototype.first=zn.prototype.head,Je&&(zn.prototype[Je]=function(){return this}),zn}();ft?((ft.exports=pn)._=pn,dt._=pn):ht._=pn}).call(Er)}(Or,Or.exports)),Or.exports);const Mr=({onSearch:t,placeholder:n="Поиск файлов...",className:r})=>{const[i,s]=o(""),l=u(null);a(()=>(l.current=Pr.debounce(e=>{t(e)},500),()=>{var e;null===(e=l.current)||void 0===e||e.cancel()}),[t]);return e(E,{value:i,onChange:e=>{var t;const n=e.target.value;s(n),null===(t=l.current)||void 0===t||t.call(l,n)},placeholder:n,prefix:e(se,{}),className:r,allowClear:!0,onClear:()=>{s(""),t("")}})},Fr=({className:n,style:r,customIcon:i})=>i?e("img",{src:i,alt:"Upload",className:n,style:Object.assign(Object.assign({},r),{width:"64px",height:"64px",objectFit:"contain"})}):t("svg",{className:n,style:Object.assign(Object.assign({},r),{width:"64px",height:"64px"}),viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("circle",{cx:"32",cy:"32",r:"30",fill:"none",stroke:"#1890ff",strokeWidth:"2",opacity:"0.3"}),e("circle",{cx:"32",cy:"32",r:"20",fill:"none",stroke:"#1890ff",strokeWidth:"2"}),e("path",{d:"M32 12L32 28M24 20L32 12L40 20",stroke:"#1890ff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e("circle",{cx:"20",cy:"40",r:"2",fill:"#1890ff",opacity:"0.6"}),e("circle",{cx:"32",cy:"40",r:"2",fill:"#1890ff",opacity:"0.6"}),e("circle",{cx:"44",cy:"40",r:"2",fill:"#1890ff",opacity:"0.6"})]}),jr="my_files",Rr="gif",Dr="stock_images",Lr="ai",Nr="editor",zr=!1,Br=["jpg","jpeg","png","gif","bmp","webp","svg","ico","tiff","tif"],Vr="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQABLAEsAAD/4QCMRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAAEsAAAAAQAAASwAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAQOgAwAEAAAAAQAAAMoAAAAA/+EJ2Wh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8APD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1wTU06RG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6c3RvY2s6Mzk2MmU4NTQtNjA1NC00MGZmLWEwYzMtYjJkNjcwMzQ2OWFhIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOmE5M2NiZTgyLWI5NjEtNGUzNS1iYmQ0LWJjZWE1Zjc1YTQwZiIvPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw/eHBhY2tldCBlbmQ9InciPz4A/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlAAAAAAAQ1B2M2Y8AsgTpgAmY7PhCfv/AABEIAMoBAwMBIgACEQADEQD/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2wBDAAUDBAQEAwUEBAQFBQUGBwwIBwcHBw8LCwkMEQ8SEhEPERETFhwXExQaFRERGCEYGh0dHx8fExciJCIeJBweHx7/3QAEABH/2gAMAwEAAhEDEQA/APsuiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAoqG7uIbWB55nCooyTS208VxCssLh0boRQBLRRRQAUUUUAFFFFAH/9D7LooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAqG7uIrWBppnCoo5Jou7iK1gaaZwqKM5NcRq2oXOsXqxQq2wnEcYPX3NABq2oXOr3qwxK3l5xHGO/ua6nw7pzadZ7ZJGaR+WBPA9hUfh7R49Pi82TDXDDkkfd9hWxQAUUUUAFFFFABRRRQB//9H7LooooAKKKKACiiuOv/EOpQX88KNDsSQqMp6H60AdjRXD/wDCTapn70P/AH7/APr0f8JPqn96H/v3/wDXoA7iiuH/AOEn1T+9D/37/wDr0f8ACT6p/eh/79//AF6AO4orh/8AhJ9U/vQ/9+//AK9H/CT6p/eh/wC/f/16AO4orh/+En1T+9D/AN+//r0f8JPqn96H/v3/APXoA7iiuH/4SfVP70P/AH7/APr0f8JPqn96H/v3/wDXoA7iiuH/AOEn1T+9D/37/wDr0f8ACT6p/eh/79//AF6AO4orh/8AhJ9U/vQ/9+//AK9H/CT6p/eh/wC/f/16AO4orh/+En1T+9D/AN+//r0f8JPqn96H/v3/APXoA7iobq4itYHmncIijJJrE0jUdQlt2v8AUJIYrNVyMJgv9Oaw9X1C51e8WGJWMecRxr39zQAatqNzq94kUasELYjjB6/Wul8P6NHp8Qlkw1ww5P8Ad9hWRmDw9bfwTajIv4Riqw8Tap6wf98f/XoA7elrh/8AhJtU/vQ/9+//AK9avhnWL3UL94bgx7BGWG1cdwPX3oA6OiiigAooooAKKKKAP//S+y6KKKACiiigArgHAbxSVYAg3mCD3+eu/rgT/wAjV/2+f+z0Adt9jtMf8esH/fsUfY7T/n1g/wC/Yqeh2CIWY4AGSaAK7WlmqktbQADkkxr/AIVUe50JJPLZ7EN6YWuX17WJr+dkRylurYVQfve5rKJoA9Ghh0+Zd0MVtIvqqKaf9jtP+fWD/v2K89sry4sphLbyFD3HY/Wu+0e9TULFLhQATww9DQBJ9jtP+fWD/v2KattZM7ILe3LL94bF4p99cx2lpJcS/dRc/X2rjdG1eSLWmuZ2Oy4bEnoPQ/hQB2P2O0/59YP+/Yo+x2n/AD6wf9+xU4IPSloAr/Y7T/n1g/79ij7Haf8APrB/37FWKKAK/wBjtP8An1g/79ij7Haf8+sH/fsVYooAr/Y7T/n1g/79ioruPTrWBppoLdUUckxj/Cp7u4itYGnmcKijJJriNX1C61i9EUKtsziOMHr7mgBNVv7jVrxYII/3YOIYl/ma6bw9o8enxCSTD3DDkn+H2FHh/R49Pi8yTDXDDkkfd9hWxQBC9rbOxZ7eJmPUlATTfsdp/wA+sH/fsVYooAztXtbVdLumW3hBELkEIOPlNc74H/5Csv8A1xP8xXUaz/yCbz/ri/8A6Ca5fwP/AMhaX/rif5igDs6KKKACiiigAooooA//0/suiiigAooooAK4E/8AI1f9vn/s9d9XAn/kav8At8/9noA72s/xI7R6HdMpwdmPzODWhUN/ALqymt26SIVoA816UlS3ML207wSrtdCQai+lAC11HgN2xdx4+XKH6Hn/AArl++K6jSv+JN4flvJhiWfBRe/Tj+ZNAEHjLUfOnFjEw2R/NJju3Yfl/Oudp0jtJIzucsxJJ96bQB2/hLUftdkLeRh50OF+q9jW3XnOkXrWF/HcDJUHDjPUV6HDIssSSIQVYAg0APooooAKhu7iK1gaeZwqKM5NF3cQ2sDTTOFRRk5riNW1C51i9WKJW8vOI4x39zQAavqF1rF6IYVbZnEcYPX3NdL4e0ePT4hLIA1w45JH3fYUeHtHj0+LzJcNcMOTj7vsK2KACiiigAooooAqaz/yCbz/AK4v/wCgmuX8D/8AIWl/64n+YrqNZ/5BN5/1xf8A9BNcv4H/AOQtL/1xP8xQB2dFFFABRRRQAUUUUAf/1PsuiiigAooooAK4E/8AI1f9vn/s9d9XAn/kav8At8/9noA72lpKWgDO1bSLXUQDKCsg6OvX/wCvWFJ4Tn3fJdxFc8FkOa66igDC0zw3a2riadzPIOeRhR+FYXinUPtl+Yoz+5h+VcdCe5/p+FdH4n1H7DYFYziaX5U9vU1wn40AFFFFABXW+DNR3xtp8x+ZPmjyeo7j/PrXJVNZzva3UdxG2HjbP/1qAPTKhu7iK2gaaZwqKOSahTULf+zFv3bZEybsmuP1XULnV70QxK3l7sRxr39zQAmrahc6xerFEreXnEcY7+5rpfD2jx6fF5suGuGHJx932FHh7R49PiEkuGuGHJ/u+wrYoAKKKKACiiigAooooAqaz/yCbz/ri/8A6Ca5fwP/AMhaX/rif5iuo1n/AJBN5/1xf/0E1y/gf/kLS/8AXE/zFAHZ0UUUAFFFFABRRRQB/9X7LooooAKKKKACuBP/ACNX/b5/7PXfVwJ/5Gr/ALfP/Z6AO9paSloAKazBVZicBRkmnVz3jHUfs9qLOJsSy/ex2XvQBzuu351DUXlDfu1+WMewqhRRQAUUUv40AFbGi6ZG8TahqB8uzTkA9ZP/AK1Gi6ZG8TajqJ2WcfIB/wCWn/1qi1W+uNWu0hhQiIHbFEv86ADU7+fVbpIIU2xZ2xRL/M103h7R00+LzZcPcMOTj7vsKyCYfD9sQNsupSr+EY/z+ddDot8uoWCTj7/Rx6N3oAvUUUUAFZ17rFta6jDZydZPvNnhPTNSaxqEWn2bTv8AM3RF9TXntxLJPK8sp3O5yx9TQB6dmlrA8Kar9qg+yzt+/jHBP8QrfoAKKKKAKms/8gm8/wCuL/8AoJrl/A//ACFpf+uJ/mK6jWf+QTef9cX/APQTXL+B/wDkLS/9cT/MUAdnRRRQAUUUUAFFFFAH/9b7LooooAKKKKACuBP/ACNX/b5/7PXfVwJ/5Gr/ALfP/Z6AO9paSloAjuZo7eB5pThEGSa851G6e9vJLl+rngeg7Ct/xpqOWXT4m6fNLj9B/X8q5mgBKKKO9AADzWzoumRvEdQ1A7LOPkA/8tP/AK1JoulxvE2oagQlnHyAf+Wn/wBaotVv59WukhhjIizthiX+dABql/catdJBDGRHnbDEv86vkweH7bHyy6jKv4Rj/P8An0UmDw/bEfLLqMq/hGP8/n/Ln5JHlkaSRi7scsx70AEkjySNLIxd2OWY961fCuo/Y78RSNiGY7T7Hsax6WgD1EGmyuscbSOwVVBJPoKy/DGofbrABzmaLCvk9fQ1k+MNU3MdPgY4X/WkevpQBla7qLajel84iTiMe3rWdS0lAEtrPJbXMdxC2HQ5HvXoWlXsd/ZpPGevDD0PevOK0/D2pHTr0FiTBJgOP60Ad/RTUYOoZSCCMg06gCprP/IJvP8Ari//AKCa5fwP/wAhaX/rif5iuo1n/kE3n/XF/wD0E1y/gf8A5C0v/XE/zFAHZ0UUUAFFFFABRRRQB//X+y6KKKACiiigArgT/wAjV/2+f+z131cCf+Rq/wC3z/2egDvarapeJY2Mlw/8I+UZ6nsKs1xni7UftN39ljb91Eecd2/z/WgDFnlknmeaRsu5JJqOigdeKAFrX0XS43iOoagQlnHyAf8Alp/9al0XTI3ibUNQISzj5Ab/AJaf/WqHVb+41a6SGGMrEDtiiX+dAC6rfT6tdJBChEWdsMS/zq+TB4ftj92XUZV/CMf5/P8AkhMPh+2x8suoyr+EY/z+f8sCSR5ZGlkYu7HLMe9ABJI8sjSSMXdjlmPemUUUAFLSUUAWtOvp7CZ5YD8zIVOenNVmJZixJJPUmkooAKKKKAClFJRQB1Pg/VOBp87Dj/VEn9K6jPFeYRs0bh0JDqQQR2Nd7oGpJqNkGJxKnEg/rQBY1n/kE3n/AFxf/wBBNcv4H/5C0v8A1xP8xXUaz/yCbz/ri/8A6Ca5fwP/AMhaX/rif5igDs6KKKACiiigAooooA//0PsuiiigAooooAK4E/8AI1f9vn/s9d8a89u5RB4hlnYEiO5LkDvhs0Adtq808Ni7W0TyTEbUCjkE964c6TqhJJspyTySVroB4stsY+xzf99Cj/hK7X/nzl/76FAHPnSdTx/x4z/981d0zRvL33eqr5NtFztbq5/wro7PVo5rF72SB7eBfutIcbvpXLatqFzq94IokYpnEca859zQAmq31xq12sEEZEQOIol/nWxBYzaPZeZBavc30oxlVyIxUVsbLw6i+epuL1wCyp/AP6VY/wCEstv+fSb/AL6FAGBLpmrSyNJJZ3DuxyzFetN/sjU/+fGf/vmug/4Su1/585f++hR/wldr/wA+cv8A30KAOf8A7I1P/nxn/wC+aP7I1P8A58Z/++a6D/hK7X/nzl/76FH/AAldr/z5y/8AfQoA5/8AsjU/+fGf/vmj+yNT/wCfGf8A75roP+Ertf8Anzl/76FH/CV2v/PnL/30KAOf/sjU/wDnxn/75o/sjU/+fGf/AL5roP8AhK7X/nzl/wC+hR/wldr/AM+cv/fQoA5/+yNT/wCfGf8A75o/sjU/+fGf/vmug/4Su1/585f++hR/wldr/wA+cv8A30KAOf8A7I1P/nxn/wC+aP7I1P8A58Z/++a6D/hK7X/nzl/76FH/AAldr/z5y/8AfQoA5/8AsjU/+fGf/vmrmkW+r6ferOllPtzh12n5hWp/wldr/wA+cv8A30KP+Ertf+fOX/voUAa+rNu0a6bBGYGOD1HymuZ8D/8AIWl/64n+YqzfeJre4spoBayqZI2UEkcZGKreB/8AkKyn/pif5igDs6KKKACiiigAooooA//R+y6KKKACiiigArHn8OadPO80nm73YscNjknNbFFAGJ/wjGmf9N/+/lRXGg6NZxG4nMnlpyQ0mQfatq7uIrWBppnCoozk1xGrajdaxeLFCh2E4jjHf3NACapfT6tdpBDGfKU4hjUfrXTeH9HTT4vNkw1yw5JH3fYUeHtHj0+LzZMNcMOSR932FbFAGNL4b0+WRpJXuHdjks0nJNN/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTPSf/v5VrTNGs9PnM1v5m4qVO5s8ZB/pWjRQAUUUUAFFFFABRRRQB//0vsuiiigAooooAKhu7mK1t2nmYKijkmpq5fxda6jNcReXukgYgBVHQ+9AGVq2oXOsXqxRK2zdiNB39zXS+H9Hj0+ISSYa4Ycn+77Cjw/o8enxebLhrhhySPu+wrYoAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAP/9P7LooooAKKKKACkxS0UAFFFFABRRTW6D6igB1FN7n8KQE+YRQA+iiigAopsnEZI64pR90UALRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAH//2Q==",Ur=s({state:{},actions:{},options:{}}),Hr=()=>l(Ur),Wr=({children:t,options:n})=>{const[r,s]=o([]),[l,u]=o([]),[h,d]=o(null),[f,p]=o(n.searchQuery||""),[g,m]=o(n.sortBySize||"name"),{config:v}=n,[b,y]=o("date"),[w,x]=o("desc"),[_,C]=o([{id:"folders",name:"Папки"}]),[S,A]=o(new Set);i.useEffect(()=>{A(new Set)},[]);const k=i.useRef(null);i.useEffect(()=>{if(n.onChangeSelection&&k.current!==S){if(null!==k.current){const e=(Array.isArray(l)?l:[]).filter(e=>S.has(e.id));n.onChangeSelection(e)}k.current=S}},[l,S,n.onChangeSelection,n]);const[T,I]=o(!1),[O,E]=o(jr);a(()=>{(null==v?void 0:v.activeLibraryItem)&&E&&E(null==v?void 0:v.activeLibraryItem)},[null==v?void 0:v.activeLibraryItem,E]);const[M,F]=o({current:1,pageSize:12,total:0}),[j]=P.useForm(),[R]=P.useForm(),[D]=P.useForm(),[L]=P.useForm(),[N]=P.useForm(),[z]=P.useForm(),[B,V]=o(!1),[U,H]=o(!1),[W,Y]=o(!1),[$,G]=o(!1),[X,K]=o(!1),[q,Z]=o(!1),[J,Q]=o(!1),[ee,te]=o(null),[ne,re]=o(null),ie=c(e=>{F(t=>Object.assign(Object.assign({},t),e))},[F]),oe={setFolders:s,setFiles:u,setSelectedFolder:d,setSearchTerm:p,setSortField:m,setSortBy:y,setSortOrder:x,setPathHistory:C,setSelectedFiles:A,setLoading:I,setPagination:ie,setIsModalVisible:V,setIsUrlModalVisible:H,setIsRenameModalVisible:Y,setIsMoveModalVisible:G,setIsRenameFolderModalVisible:K,setIsCopyModalVisible:Z,setIsDeleteConfirmVisible:Q,setFileToRename:te,setFolderToRename:re,updatePathHistoryOnFolderRename:(e,t)=>{C(n=>n.map(n=>n.id===e?Object.assign(Object.assign({},n),{name:t}):n))},setActiveLibraryItem:E},ae={state:{folders:r,files:l,selectedFolder:h,searchTerm:f,sortField:g,sortBy:b,sortOrder:w,pathHistory:_,selectedFiles:S,loading:T,pagination:M,isModalVisible:B,isUrlModalVisible:U,isRenameModalVisible:W,isMoveModalVisible:$,isRenameFolderModalVisible:X,isCopyModalVisible:q,isDeleteConfirmVisible:J,form:j,urlForm:R,renameForm:D,moveForm:L,renameFolderForm:N,copyForm:z,fileToRename:ee,folderToRename:ne,activeLibraryItem:O},actions:oe,options:n};return e(Ur.Provider,{value:ae,children:t})},Yr=e=>null===e.parentId||"null"===e.parentId||!e.parentId,$r=async(e,t,n)=>{var r;if(console.log("📁 addSubfoldersToFiles: params:",JSON.stringify(t,null,2)),null===(r=null==t?void 0:t.search)||void 0===r?void 0:r.trim())return console.log("🔍 Поиск активен, папки не добавляются"),e;let i=[];if(!n)return console.warn("🔍 getFolders не доступен!"),e;{const e=await n();i=Array.isArray(e)?e:[],console.log("📁 Получено папок от dataProvider:",i.length,"тип данных:",typeof e,"данные:",e)}const o=((e,t)=>{const n=Array.isArray(e)?e:[];return(r=t.folderId)&&"root"!==r&&"folders"!==r&&"null"!==r&&null!==r?n.filter(e=>e.parentId===t.folderId):n.filter(Yr);var r})(i,t);if(console.log("📁 Найдено подпапок для добавления:",o.length),0===o.length)return e;const a=o.map(e=>({id:e.id,name:e.name,size:"-",date:"-",isFolder:!0,folderId:e.parentId||"",type:"",selected:!1,extension:""})),s=[...a,...e];return console.log("📁 РЕЗУЛЬТАТ: папок:",a.length,"файлов:",e.length,"всего:",s.length),s},Gr=e=>{const{state:t,actions:n}=Hr(),{searchTerm:r,sortBy:i,sortOrder:o,selectedFolder:s,pagination:l}=t,{setSearchTerm:h,setSortBy:d,setSortOrder:f,setPagination:p}=n,g=e||n.fetchFiles,m=u(null),v=u(Pr.debounce(e=>{const t=JSON.stringify(e);m.current!==t?(m.current=t,console.log("✅ Выполняется запрос:",e),null==g||g(e)):console.log("🚫 Дублированный запрос пропущен:",e)},150)).current,b=c(()=>({folderId:s||"",search:(null==r?void 0:r.trim())||void 0,page:l.current,limit:l.pageSize,sortBy:i,sortOrder:o}),[s,r,l.current,l.pageSize,i,o]),y=c(e=>{if(console.log("🔎 useSortAndFilter: handleSearch вызван с:",e),h&&(console.log("🔎 useSortAndFilter: Обновляем searchTerm в стейте"),h(e)),p&&(console.log("🔎 useSortAndFilter: Сбрасываем пагинацию"),p({current:1,pageSize:l.pageSize,total:0})),console.log("🔎 useSortAndFilter: Проверяем fetchFiles:",!!g),g){console.log("🔎 useSortAndFilter: Вызываем fetchFiles с параметрами поиска");const t={folderId:s||"",search:(null==e?void 0:e.trim())||void 0,page:1,limit:l.pageSize,sortBy:i,sortOrder:o};console.log("🔎 useSortAndFilter: Параметры запроса:",t),g(t),console.log("🔎 useSortAndFilter: fetchFiles вызван!")}else console.error("🔎 useSortAndFilter: fetchFiles НЕ ОПРЕДЕЛЕНА!")},[h,p,l.pageSize,g,s,i,o]),w=c((e,t)=>{null==d||d(e),null==f||f(t),g&&v({folderId:s||"",search:(null==r?void 0:r.trim())||void 0,page:l.current,limit:l.pageSize,sortBy:e,sortOrder:t})},[d,f,v,s,r,l.current,l.pageSize]),x=c((e,t)=>{p&&p({current:e,pageSize:t||l.pageSize,total:l.total}),g&&v({folderId:s||"",search:(null==r?void 0:r.trim())||void 0,page:e,limit:t||l.pageSize,sortBy:i,sortOrder:o})},[p,l.pageSize,l.total,v,s,r,i,o]);return a(()=>{if(g){console.log("🔄 useSortAndFilter: изменение selectedFolder, загрузка файлов для папки:",s);const e=b();v(Object.assign(Object.assign({},e),{page:1}))}},[s]),a(()=>{g&&(console.log("🔄 useSortAndFilter: начальная загрузка файлов, selectedFolder:",s),v(b()))},[]),a(()=>()=>{var e;null===(e=v.cancel)||void 0===e||e.call(v)},[v]),{state:{searchTerm:r||"",sortBy:i||"name",sortOrder:o||"asc"},actions:{setSearchTerm:h||(()=>{}),setSortBy:d||(()=>{}),setSortOrder:f||(()=>{}),handleSearch:y,handleSort:w,handlePaginationChange:x,getCurrentQueryParams:b}}},Xr=()=>{const{state:e,actions:t,options:n}=Hr(),r=Gr(),{sortBy:i,sortOrder:o}=r.state,{t:a}=br(),{message:s}=O.useApp(),{selectedFolder:l,urlForm:u,pagination:h,files:d}=e,{setFiles:f,setLoading:p,setIsUrlModalVisible:g,setSelectedFiles:m,setActiveLibraryItem:v,setPagination:b}=t,{dataProviders:y}=n,w=c(async e=>{var t;if(!(null==y?void 0:y.getFiles))return[];const{files:n,pagination:r}=await y.getFiles({folderId:"folders"!==(null==e?void 0:e.folderId)?null==e?void 0:e.folderId:void 0,search:(null===(t=null==e?void 0:e.search)||void 0===t?void 0:t.trim())||void 0,sortBy:null==e?void 0:e.sortBy,sortOrder:null==e?void 0:e.sortOrder,page:null==e?void 0:e.page,limit:null==e?void 0:e.limit});return console.log("🔍 fetchFilesFromDataProvider результат:",n,"с параметрами сортировки:",{sortBy:null==e?void 0:e.sortBy,sortOrder:null==e?void 0:e.sortOrder}),r&&b&&b({current:r.page,pageSize:r.limit,total:r.total}),n},[y]),x=c(async e=>{try{null==p||p(!0),console.log("fetchFiles вызван с параметрами:",e);let t=[];if(!(null==y?void 0:y.getFiles))return void console.error("DataProvider для получения файлов не определен");t=await w(e),console.log("Получены файлы:",t),e&&(t=await $r(t,e,null==y?void 0:y.getFolders)),null==f||f(t),null==m||m(new Set)}catch(e){console.error("Ошибка при загрузке файлов:",e),s.error("Не удалось загрузить файлы")}finally{null==p||p(!1)}},[y,f,p,m,w,s]),_=c(async e=>{try{if(!(null==y?void 0:y.deleteFile))return void s.error("DataProvider для удаления файлов не настроен");if(!await y.deleteFile(e))throw new Error("Не удалось удалить файл");s.success(a("File deleted"));await x({folderId:l||"",page:d.length>=1?h.current:h.current-1,sortBy:i,sortOrder:o})}catch(e){console.error("Ошибка при удалении файла:",e),s.error(a("Error when deleting a file"))}},[y,x,l,a,s,h,d,i,o]),C=c(async e=>{try{if(!(null==y?void 0:y.deleteFolder))return void s.error("DataProvider для удаления папок не настроен");if(!await y.deleteFolder(e))throw new Error("Не удалось удалить папку");s.success(a("Folder deleted"));l===e?await x({sortBy:i,sortOrder:o}):await x({folderId:l||"",sortBy:i,sortOrder:o})}catch(e){console.error("Ошибка при удалении папки:",e),s.error(a("Error when deleting a folder"))}},[y,l,s,a,x,i,o]),S=c(async e=>{try{if(null==y?void 0:y.getFile){const t=await y.getFile(e);if(t)return t;throw new Error("Не удалось загрузить файл")}{const t=await fetch(`/api/files/${e}/content`);if(!t.ok)throw new Error("Ошибка загрузки файла");return await t.blob()}}catch(e){console.error("Ошибка при загрузке файла:",e)}},[y,s]),A=c(async e=>{if(!(null==y?void 0:y.uploadFile))return;const t=e.name.split(".").pop()||"";await y.uploadFile({name:e.name,size:`${(e.size/1024).toFixed(0)} КБ`,type:e.type,folderId:l||"",data:e,extension:t}),v&&v(jr)},[y,l,v]),k=c(async e=>{try{if(null==y?void 0:y.getFolders){const t=await y.getFolders(),n=(Array.isArray(t)?t:[]).some(t=>t.id===e);return console.log(n?"✅ Папка найдена:":"❌ Папка не найдена:",e),n}}catch(e){console.warn("⚠️ Ошибка проверки папки:",e)}return!1},[null==y?void 0:y.getFolders]),T=c(async e=>{if(!(null==y?void 0:y.uploadFile))return void s.error("DataProvider для загрузки файлов не настроен");if(l)try{if(!await k(l))return console.error("❌ Выбранная папка не найдена на сервере:",l),void s.error("Выбранная папка не найдена. Попробуйте обновить список папок или создать папку заново.")}catch(e){console.warn("⚠️ Не удалось проверить существование папки, продолжаем загрузку:",e)}const t=document.createElement("input");t.type="file",t.accept="image/*",t.onchange=async t=>{var n;const r=null===(n=t.target.files)||void 0===n?void 0:n[0];if(r)if(r.type.startsWith("image/"))try{if(null==p||p(!0),null==e||e.onStart(r),null==e?void 0:e.onProgress){let t=0;const n=setInterval(()=>{t=Math.min(t+10+Math.floor(Date.now()%10),90),e.onProgress(r.name,t)},200);await A(r),clearInterval(n),e.onProgress(r.name,100)}else await A(r);null==e||e.onComplete(r.name),s.success(`${a("File")} ${r.name} ${a("has been successfully uploaded")}`),await x({folderId:l||"",sortBy:i,sortOrder:o})}catch(t){console.error("Ошибка при загрузке файла:",t),null==e||e.onError(r.name,"Ошибка при загрузке файла"),s.error("Ошибка при загрузке файла")}finally{null==p||p(!1)}else s.error(a("Please select an image file"))},t.click()},[null==y?void 0:y.uploadFile,l,s,k,a,p,x,i,o,A]),I=c(async(e,t)=>{try{let n;const r=await(null==u?void 0:u.validateFields()),c=e||(null==r?void 0:r.fileUrl);return c?(null==p||p(!0),(null==y?void 0:y.uploadFileByUrl)?(n=await y.uploadFileByUrl({url:c,folderId:l||"",noFolder:t}),s.success(`${a("File")} ${(null==r?void 0:r.name)||"unnamed file"} ${a("successfully uploaded")}`),null==g||g(!1),null==u||u.resetFields(),v&&v(jr),await x({folderId:l||"",sortBy:i,sortOrder:o}),n):void s.error("Загрузка по URL не поддерживается")):void s.error("Заполните все поля")}catch(e){console.error("Ошибка при загрузке файла по URL:",e),s.error(a("Error when downloading a file by URL"))}finally{null==p||p(!1)}},[u,p,y,s,a,g,v,x,l,i,o]),E=c(async e=>{if(e.type.startsWith("image/"))try{await A(e),s.success(`${a("File")} ${e.name} ${a("has been successfully uploaded")}`)}catch(t){console.error(`Ошибка при загрузке файла ${e.name}:`,t),s.error(`Ошибка при загрузке файла ${e.name}`)}else s.warning(`Файл ${e.name} не является изображением и будет пропущен`)},[s,a,A]),P=c(async e=>{for(const t of e)await E(t);await x({folderId:l||"",sortBy:i,sortOrder:o})},[x,l,i,o,E]);return{fetchFiles:x,handleDeleteFile:_,handleDeleteFolder:C,handleAddFile:T,handleAddFileByUrl:I,handleDroppedFiles:P,getFileData:S,uploadFileWithProvider:A}},Kr=()=>{var e;const{state:t,actions:n,options:i}=Hr(),{t:o}=br(),{message:a}=O.useApp(),{folders:s,selectedFolder:l,form:u,loading:h,isModalVisible:d}=t,{setFolders:f,setLoading:p,setIsModalVisible:g}=n,{dataProviders:m}=i,v=c(async()=>{console.log("Запрос папок..."),null==p||p(!0);try{let e=[];if(!(null==m?void 0:m.getFolders))return void console.error("DataProvider для папок не определен");e=await m.getFolders(),console.log("Полученные папки:",e);const t=Array.isArray(e)?e:[];null==f||f(t);const n=t.filter(e=>e.id===e.parentId);n.length>0&&console.warn("Обнаружены папки с циклическими зависимостями:",n)}catch(e){console.error("Ошибка при загрузке папок:",e),a.error("Ошибка при загрузке папок")}finally{null==p||p(!1)}},[null==m?void 0:m.getFolders,f,p,a]),b=c(()=>{u.setFieldsValue({folderName:"Новая папка"}),null==g||g(!0)},[u,g]),y=c(e=>{const r=[...(Array.isArray(s)?s:[]).filter(t=>t.id!==e.id),e];if(null==f||f(r),console.log("📂 Обновлен список папок, новая папка:",e),n.setSelectedFolder&&(n.setSelectedFolder(e.id),console.log("🎯 Выбрана созданная папка как активная:",e.id)),n.setPathHistory){const r=[...t.pathHistory||[],{id:e.id,name:e.name}];n.setPathHistory(r),console.log("🧭 Обновлен путь навигации:",r)}},[s,f,n,t.pathHistory]),w=c(async e=>{try{if(null==m?void 0:m.getFolders){const t=await m.getFolders(),n=(Array.isArray(t)?t:[]).some(t=>t.id===e);return console.log(n?"✅ Папка найдена:":"❌ Папка не найдена:",e),n}}catch(e){console.warn("⚠️ Ошибка проверки папки:",e)}return!1},[null==m?void 0:m.getFolders]),x=c(async()=>{try{const e=(await u.validateFields()).folderName.trim();if(!e)return void a.error("Имя папки не может быть пустым");const t=l&&"folders"!==l?l:null;let n;if(console.log("🆕 Создание новой папки:",{folderName:e,parentId:t,selectedFolder:l}),!(null==m?void 0:m.createFolder))return void a.error("DataProvider для создания папок не настроен");n=await m.createFolder({name:e,parentId:t}),(e=>{if(!e||!e.id)throw new Error("Некорректный ответ от сервера: отсутствует ID папки");if(e.id===e.parentId&&e.parentId)throw console.error("Обнаружена циклическая зависимость: папка является родителем сама для себя"),new Error("Ошибка: папка не может быть родителем самой себя")})(n),y(n),await v(),await new Promise(e=>setTimeout(e,200));await w(n.id)||console.warn("⚠️ Не удалось подтвердить создание папки на сервере, но продолжаем..."),a.success(`Папка "${e}" создана и выбрана`),null==g||g(!1)}catch(e){console.error("❌ Ошибка при создании папки:",e),a.error(e instanceof Error?e.message:o("Failed to create folder"))}},[u,l,null==m?void 0:m.createFolder,y,g,o,v,w,a]),_=c(()=>{null==g||g(!1)},[g]),C=c((e,t=new Set)=>{const n=Array.isArray(s)?s:[];return e.map(e=>{if(t.has(e.id))return console.warn(`Обнаружен цикл в структуре папок с id=${e.id}. Пропускаем обработку дочерних элементов.`),{key:e.id,label:e.name+" (ошибка)",icon:r.createElement(le,{style:{color:"red"}})};const i=new Set(t);i.add(e.id);const o=n.filter(t=>t.parentId===e.id&&t.id!==e.id);return{key:e.id,label:e.name,children:o.length>0?C(o,i):void 0}})},[s]),S=c(()=>{const e=Array.isArray(s)?s:[],t={key:"folders",label:o("Folders"),children:[]},n=e.filter(e=>null===e.parentId||!e.parentId);return t.children=C(n),[t]},[s,o,C]),A=c(async(e,t)=>{var r;try{if(!t||""===t.trim())return void a.error("Имя папки не может быть пустым");if(!(null===(r=i.dataProviders)||void 0===r?void 0:r.renameFolder))return void a.error("DataProvider для переименования папок не настроен");const o=await i.dataProviders.renameFolder(e,t.trim());if(!(null==o?void 0:o.id))return void a.error("Некорректный ответ при переименовании папки");await v(),e!==o.id&&n.setSelectedFolder&&n.setSelectedFolder(o.id),a.success(`Папка переименована на "${t.trim()}"`)}catch(e){console.error("Ошибка при переименовании папки:",e),a.error(e instanceof Error?e.message:"Ошибка при переименовании папки")}},[v,a,null===(e=i.dataProviders)||void 0===e?void 0:e.renameFolder]);return{state:{folders:s,isCreatingFolder:d,loading:h},actions:{fetchFolders:v,handleCreateFolder:b,handleModalOk:x,handleModalCancel:_,generateMenuItems:S,renameFolder:A}}},qr=new Map,Zr=(e,t)=>{qr.set(e,t),console.log("Изображение сохранено в кеш:",e),qr.size>350&&(Array.from(qr.keys()).slice(0,50).forEach(e=>qr.delete(e)),console.warn("Очищен кеш изображений. Удалено 50 самых старых записей."))},Jr=e=>{if(e.type&&e.type.startsWith("image/"))return!0;if(e.name){const t=e.name.toLowerCase().split(".").pop();return Br.includes(t||"")}return!1},Qr=({src:t,alt:n,className:r,width:i,height:s,preview:l=!1,file:u})=>{const h=Xr(),[d,f]=o(!1),[p,g]=o(t),[m,v]=o(!1),b=c(e=>{g(e),f(!1),v(!1)},[]),y=c(e=>{console.warn("Не удалось загрузить изображение:",e),g(void 0),f(!0),v(!1)},[]),w=c(()=>{g(Vr),f(!0)},[]),x=c(e=>{g(e),f(!1)},[]),_=c(e=>{const t=e.split(",")[1];t&&t.length>20?g(e):(console.warn("Некорректные base64 данные:",e.substring(0,50)+"..."),w())},[w]),C=c(async e=>{if(console.log("loadImageFromFile",e),(e=>qr.has(e))(e))return console.log("Изображение найдено в кеше:",e),(e=>qr.get(e))(e);if(!u||!Jr(u))return console.warn("Файл не является изображением:",null==u?void 0:u.name,null==u?void 0:u.type),w(),Vr;try{const t=await h.getFileData(e);if(!t)throw new Error("Ошибка загрузки файла");return new Promise((n,r)=>{const i=new FileReader;i.onload=()=>{const t=i.result;Zr(e,t),n(t)},i.onerror=()=>r(new Error("Ошибка чтения файла")),i.readAsDataURL(t)})}catch(e){throw console.error("Ошибка загрузки изображения:",e),e}},[u,w,h]),S=c(()=>{(null==u?void 0:u.id)&&Jr(u)?C(u.id).then(b).catch(y):u&&!Jr(u)&&(console.warn("Файл не является изображением, показываем fallback:",u.name,u.type),w())},[u,C,b,y,w]),A=c(e=>{console.log("HandleBlobSrc:",{blobSrc:e,file:u?{id:u.id,name:u.name,type:u.type,extension:u.extension,folderId:u.folderId}:null}),u&&Jr(u)?(console.log("Blob файл является изображением, устанавливаем src:",u.name,u.type),g(e),f(!1)):(console.warn("Blob файл не является изображением, показываем fallback:",null==u?void 0:u.name,null==u?void 0:u.type),w())},[u,w,Jr]),k=c(()=>{(null==u?void 0:u.id)&&Jr(u)?(v(!0),C(u.id).then(b).catch(y)):u&&!Jr(u)?(console.warn("Файл не является изображением, показываем fallback:",u.name,u.type),w()):(console.warn("Неподдерживаемый формат изображения:",t),g(void 0))},[u,t,C,b,y,w]);a(()=>{v(!1),t?t.startsWith("data:image/")?_(t):t.startsWith("blob:")?A(t):t.startsWith("http://")||t.startsWith("https://")||t.startsWith("/")?x(t):(console.log("setImageError 1"),k()):S()},[t,S,_,A,x,k]);return e(F,{className:r,src:p,alt:n,width:i,height:s,preview:l&&!d&&{src:p,toolbarRender:()=>null,destroyOnHidden:!0},onError:()=>{console.warn("Ошибка загрузки изображения:",(null==p?void 0:p.substring(0,50))+"..."),f(!0)},fallback:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAiIGhlaWdodD0iODAiIHZpZXdCb3g9IjAgMCA4MCA4MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjgwIiBoZWlnaHQ9IjgwIiBmaWxsPSIjRjVGNUY1Ii8+CjxwYXRoIGQ9Ik0yNCAzMkw0MCA0OEw1NiAzMkw2NCA0MEw2NCA2NEgyNFYzMloiIGZpbGw9IiNEOUQ5RDkiLz4KPC9zdmc+",loading:m?"lazy":void 0})},ei="filemanager_view_mode",ti=()=>{const{state:e}=Hr(),{files:t,loading:n,isUrlModalVisible:r}=e,i=Xr(),o=(()=>{const{state:e,actions:t}=Hr(),{selectedFiles:n}=e,{setSelectedFiles:r}=t,i=c(e=>{if(!n||!r)return;const t=new Set(n);t.has(e)?t.delete(e):t.add(e),r(t)},[n,r]);return{state:{selectedFiles:n||new Set},actions:{toggleFileSelection:i}}})(),a=(e=>{const{state:t,actions:n,options:r}=Hr(),{t:i}=br(),o=Kr(),{fetchFolders:a}=o.actions,{files:s,selectedFolder:l,selectedFiles:u,fileToRename:h,renameForm:d,isRenameModalVisible:f,moveForm:p,copyForm:g}=t,{setFileToRename:m,setIsRenameModalVisible:v,setIsMoveModalVisible:b,setIsCopyModalVisible:y,setSelectedFiles:w,setIsDeleteConfirmVisible:x}=n,{apiEndpoints:_,dataProviders:C}=r,S=c(e=>{null==m||m(e),null==v||v(!0);const t=null==s?void 0:s.find(t=>t.id===e);t&&d&&d.setFieldsValue({newFileName:t.name})},[m,v,s,d]),A=c(()=>{null==v||v(!1),null==m||m(null),null==d||d.resetFields()},[v,m,d]),k=c(async()=>{if(h&&d)try{const t=await d.validateFields();if(!(null==t?void 0:t.newFileName))return;const r=null==s?void 0:s.find(e=>e.id===h);if((null==r?void 0:r.isFolder)||h.startsWith("folder_")){if(!(null==C?void 0:C.renameFolder))return void M.error("DataProvider для переименования папок не настроен");{const e=await C.renameFolder(h,t.newFileName.trim());if(!(null==e?void 0:e.id))return void M.error("Некорректный ответ при переименовании папки");M.success(`${i("Folder renamed to")} ${t.newFileName}`),await a(),h!==e.id&&n.setSelectedFolder&&n.setSelectedFolder(e.id)}}else{if(!(null==C?void 0:C.renameFile))return void M.error("DataProvider для переименования файлов не настроен");await C.renameFile(h,t.newFileName),M.success(`${i("File renamed to")} ${t.newFileName}`)}A(),await e({folderId:l||""})}catch(e){console.error("Ошибка при переименовании:",e),M.error(e instanceof Error?e.message:"Ошибка при переименовании")}},[h,d,s,C,_,A,e,l,i]),T=c(()=>{null==b||b(!0)},[b]),I=c(()=>{null==b||b(!1),null==p||p.resetFields()},[b,p]),O=c(async()=>{if(u&&0!==u.size&&p)try{const t=await p.validateFields(),n=null==t?void 0:t.targetFolder;if(!n)return void M.error("Выберите папку назначения");const r=Array.from(u);let i=0,o=0,c=!1;for(const e of r)try{const t=null==s?void 0:s.find(t=>t.id===e),r=(null==t?void 0:t.isFolder)||e.startsWith("folder_");r&&(c=!0),(null==C?void 0:C.moveItem)?(await C.moveItem({itemId:e,targetFolderId:n,isFolder:r}),i++):(console.warn(`DataProvider для перемещения не настроен для ${r?"папки":"файла"} ${e}`),o++)}catch(t){console.error(`Ошибка при перемещении объекта ${e}:`,t),o++}i>0&&M.success(`Успешно перемещено ${i} из ${r.length} объектов`),o>0&&M.error(`Не удалось переместить ${o} из ${r.length} объектов`),I(),null==w||w(new Set),c&&await a(),await e({folderId:l||""})}catch(e){console.error("Ошибка при перемещении:",e),M.error("Ошибка при перемещении")}},[u,p,s,C,_,I,w,e,l]),E=c(()=>{null==y||y(!0)},[y]),P=c(()=>{null==y||y(!1),null==g||g.resetFields()},[y,g]),F=c(async()=>{if(u&&0!==u.size&&g)try{const t=await g.validateFields(),n=null==t?void 0:t.targetFolder;if(!n)return void M.error("Выберите папку назначения");const r=Array.from(u);let i=0,o=0,c=!1;for(const e of r)try{const t=null==s?void 0:s.find(t=>t.id===e),r=(null==t?void 0:t.isFolder)||e.startsWith("folder_");r&&(c=!0),(null==C?void 0:C.copyItem)?(await C.copyItem({itemId:e,targetFolderId:n,isFolder:r}),i++):(console.warn(`DataProvider для перемещения не настроен для ${r?"папки":"файла"} ${e}`),o++)}catch(t){console.error(`Ошибка при копировании объекта ${e}:`,t),o++}i>0&&M.success(`Успешно скопировано ${i} из ${r.length} объектов`),o>0&&M.error(`Не удалось скопировать ${o} из ${r.length} объектов`),P(),null==w||w(new Set),c&&await a(),await e({folderId:l||""})}catch(e){console.error("Ошибка при копировании:",e),M.error("Ошибка при копировании")}},[u,g,s,_,P,w,e,l]),j=c(()=>{null==x||x(!0)},[x]),R=c(()=>{null==x||x(!1)},[x]),D=c(async()=>{var t;if(u&&0!==u.size)try{const r=Array.from(u);let i=0,o=0;for(const e of r)try{const t=null==s?void 0:s.find(t=>t.id===e);(null==t?void 0:t.isFolder)||e.startsWith("folder_")?(null==C?void 0:C.deleteFolder)?await C.deleteFolder(e)?i++:o++:(console.warn("DataProvider для удаления папок не настроен"),o++):(null==C?void 0:C.deleteFile)?await C.deleteFile(e)?i++:o++:(console.warn("DataProvider для удаления файлов не настроен"),o++)}catch(t){console.error(`Ошибка при удалении объекта ${e}:`,t),o++}i>0&&M.success(`Успешно удалено ${i} из ${r.length} объектов`),o>0&&M.error(`Не удалось удалить ${o} из ${r.length} объектов`),null==w||w(new Set),null==x||x(!1),await(null===(t=n.fetchFolders)||void 0===t?void 0:t.call(n)),await e({folderId:l||""})}catch(e){console.error("Ошибка при удалении:",e),M.error("Ошибка при удалении")}else null==x||x(!1)},[u,s,C,n,e,l,w,x]);return{state:{isRenamingFile:f||!1,fileToRename:h},actions:{showRenameModal:S,handleRenameCancel:A,handleRenameOk:k,showMoveModal:T,handleMoveCancel:I,handleMoveOk:O,showCopyModal:E,handleCopyCancel:P,handleCopyOk:F,showDeleteConfirm:j,handleDeleteConfirmCancel:R,handleDeleteConfirmOk:D}}})(i.fetchFiles);return{state:{files:t||[],selectedFiles:o.state.selectedFiles,loading:n||!1,isAddingFileByUrl:r||!1,isRenamingFile:a.state.isRenamingFile,fileToRename:a.state.fileToRename},actions:{fetchFiles:i.fetchFiles,handleDeleteFile:i.handleDeleteFile,handleDeleteFolder:i.handleDeleteFolder,handleAddFile:i.handleAddFile,handleAddFileByUrl:i.handleAddFileByUrl,handleDroppedFiles:i.handleDroppedFiles,uploadFileWithProvider:i.uploadFileWithProvider,toggleFileSelection:o.actions.toggleFileSelection,showRenameModal:a.actions.showRenameModal,handleRenameCancel:a.actions.handleRenameCancel,handleRenameOk:a.actions.handleRenameOk,showMoveModal:a.actions.showMoveModal,handleMoveCancel:a.actions.handleMoveCancel,handleMoveOk:a.actions.handleMoveOk,showCopyModal:a.actions.showCopyModal,handleCopyCancel:a.actions.handleCopyCancel,handleCopyOk:a.actions.handleCopyOk,showDeleteConfirm:a.actions.showDeleteConfirm,handleDeleteConfirmCancel:a.actions.handleDeleteConfirmCancel,handleDeleteConfirmOk:a.actions.handleDeleteConfirmOk}}},ni=()=>{const{notification:e}=O.useApp(),t=Hr().options.notification;return h(()=>Object.assign(Object.assign({},e),t),[e,t])},ri="filemanager_sidebar_width",ii=()=>{const{options:e}=Hr(),{customIcons:t}=e,n=(e,n,r)=>{const o=null==t?void 0:t[e];return o?i.createElement(o,r):i.createElement(n,r)};return{RootFolderIcon:e=>n("rootFolder",le,e),FolderIcon:e=>n("folder",le,e),FolderOpenIcon:e=>n("folderOpen",ve,e),AddFolderIcon:e=>n("addFolder",me,e),FileIcon:e=>n("file",ge,e),UploadIcon:e=>n("upload",pe,e),UploadByUrlIcon:e=>n("uploadByUrl",fe,e),ExpandArrowIcon:e=>n("expandArrow",de,e),CollapseArrowIcon:e=>n("collapseArrow",he,e),FolderPreviewIcon:e=>n("folderPreview",le,e),GridViewIcon:e=>n("gridView",ue,e),ListViewIcon:e=>n("listView",ce,e),getCustomIcon:n}};var oi={headerContainer:"headerContainer",actionsContainer:"actionsContainer",filesContainer:"filesContainer",paginationContainer:"paginationContainer",uploadZone:"uploadZone",active:"active",uploadIcon:"uploadIcon",uploadText:"uploadText",uploadSubtext:"uploadSubtext",tableContainer:"tableContainer",imagePreview:"imagePreview",fileManagerTableFolder:"fileManagerTableFolder",fileManagerTableFolderInner:"fileManagerTableFolderInner",sortSelect:"sortSelect",fileName:"fileName",fileNameClickable:"fileNameClickable",fileItemCount:"fileItemCount",fileSize:"fileSize",fileDate:"fileDate",tableImagePreview:"tableImagePreview",tableFolderIcon:"tableFolderIcon",gridRow:"gridRow",gridCard:"gridCard",gridCardContent:"gridCardContent",gridCheckbox:"gridCheckbox",gridPreviewContainer:"gridPreviewContainer",gridPreviewContainerFolder:"gridPreviewContainerFolder",gridFolderIcon:"gridFolderIcon",gridFolderIconImage:"gridFolderIconImage",gridFileName:"gridFileName",gridFileInfo:"gridFileInfo",actionsBox:"actionsBox"};const{Option:ai}=j,si=({files:r,handleSearch:i,handleSort:s,sortBy:l,sortOrder:h,handleSortOptionChange:d,pagination:f,setPagination:p,loading:g,handleItemClick:m,selectedFiles:v,toggleFileSelection:b,handleDroppedFiles:y,fileUpload:w})=>{const{t:x}=br(),{FolderPreviewIcon:_}=ii(),{options:C}=Hr(),{dataProviders:S}=C,{viewMode:A,setViewMode:k}=(()=>{const[e,t]=o(()=>{try{return localStorage.getItem(ei)||"table"}catch(e){return"table"}}),n=c(e=>{t(e);try{localStorage.setItem(ei,e)}catch(e){console.warn("Не удалось сохранить режим отображения:",e)}},[]),r=c(()=>{n("table"===e?"grid":"table")},[e,n]);return{viewMode:e,setViewMode:n,toggleViewMode:r}})(),[T,I]=o(!1),[O,E]=o({}),P=u(0),F=`${l}-${h}`,H=c(async e=>{try{if(null==S?void 0:S.getFiles){const{files:t,pagination:n}=await S.getFiles({folderId:"folders"===e?void 0:e});return(null==n?void 0:n.total)||t.filter(e=>!e.isFolder).length}return 0}catch(t){return console.error(`Ошибка при получении количества файлов для папки ${e}:`,t),0}},[S]),W=c(async()=>{const e=r.filter(e=>e.isFolder);if(0===e.length)return;const t={},n=e.map(async e=>{t[e.id]=await H(e.id)});await Promise.all(n),E(t)},[r,H]);a(()=>{W()},[W]);const Y=c(e=>{e.preventDefault(),e.stopPropagation(),P.current+=1,e.dataTransfer.items&&e.dataTransfer.items.length>0&&I(!0)},[]),$=c(e=>{e.preventDefault(),e.stopPropagation(),P.current-=1,0===P.current&&I(!1)},[]),G=c(e=>{e.preventDefault(),e.stopPropagation()},[]),X=c(e=>{if(e.preventDefault(),e.stopPropagation(),I(!1),P.current=0,e.dataTransfer.files&&e.dataTransfer.files.length>0){const t=Array.from(e.dataTransfer.files);y(t).catch(e=>{console.error("Ошибка при загрузке файлов:",e),M.error("Произошла ошибка при загрузке файлов")})}},[y]),K=[{key:"selection",width:60,render:(t,n)=>e(R,{checked:v.has(n.id),onChange:()=>b(n.id)})},{key:"preview",width:100,render:(t,n)=>n.isFolder?e("div",{className:oi.fileManagerTableFolder,children:e("div",{className:oi.fileManagerTableFolderInner,children:e(_,{className:oi.tableFolderIcon})})}):e(Qr,{className:`${oi.imagePreview} ${oi.tableImagePreview}`,src:n.thumbnail||n.thumbnailUrl||n.url,alt:n.name,width:100,height:60,preview:!0,file:n})},{title:x("Name"),dataIndex:"name",key:"name",render:(e,n)=>{const r=n.isFolder&&O[n.id]||0,i=1===r?"item":"items";return t("div",{className:n.isFolder?oi.fileNameClickable:oi.fileName,children:[e||"Без названия",n.isFolder&&t("div",{className:oi.fileItemCount,children:[r," ",i]})]})}},{title:x("Dimensions"),key:"dimensions",width:100,render:(t,n)=>e("div",{className:oi.fileSize,children:n.isFolder?"Папка":n.dimensions||"600×300"})},{title:x("Size"),key:"size",width:100,render:(t,n)=>e("div",{className:oi.fileSize,children:n.isFolder?"-":`${n.size||350} КБ`})},{title:x("Date"),dataIndex:"date",key:"date",width:180,render:(t,n)=>{const r=function(e){const t=new Date(e);return!isNaN(t.getTime())}(n.date)?new Date(n.date):new Date;return e("div",{className:oi.fileDate,children:x("date_of_add",{date:(e=>`${e.getDate()} ${[x("months.january"),x("months.february"),x("months.march"),x("months.april"),x("months.may"),x("months.june"),x("months.july"),x("months.august"),x("months.september"),x("months.october"),x("months.november"),x("months.december")][e.getMonth()]} ${e.getFullYear()}`)(r)})})}}];return t("div",{className:"content-layout",onDragEnter:Y,onDragLeave:$,onDragOver:G,onDrop:X,children:[T&&t("div",{className:`${oi.uploadZone} ${T?oi.active:""}`,children:[e(Fr,{className:oi.uploadIcon,customIcon:null==C?void 0:C.dragDropIcon}),e("div",{className:oi.uploadText,children:x("Drag files to upload")}),e("div",{className:oi.uploadSubtext,children:x("Drop files here to upload")})]}),e("h1",{children:"My files"}),t("div",{className:oi.headerContainer,children:[e("div",{className:"search-container",children:e(Mr,{placeholder:x("Image search..."),onSearch:i,className:oi.searchInput})}),t("div",{className:oi.actionsBox,children:[t("div",{className:"sort-container",children:[e("div",{className:"sort-label",children:x("Sort by")}),t(j,{value:F,onChange:d,className:oi.sortSelect,popupMatchSelectWidth:!1,children:[e(ai,{value:"date-desc",children:x("Newest first")}),e(ai,{value:"date-asc",children:x("Oldest first")}),e(ai,{value:"size-desc",children:x("Largest first")}),e(ai,{value:"size-asc",children:x("Smallest first")}),e(ai,{value:"name-asc",children:x("A-Z")}),e(ai,{value:"name-desc",children:x("Z-A")}),e(ai,{value:"type-asc",children:x("By type")})]})]}),e("div",{className:oi.actionsContainer,children:e(D,{options:[{value:"grid",icon:e(ue,{})},{value:"table",icon:e(ce,{})}],value:A,onChange:e=>k(e)})})]})]}),e("div",{className:oi.filesContainer,children:t(n,"table"===A?{children:[g||r&&0!==r.length?e("div",{className:oi.tableContainer,children:e(N,{dataSource:r,columns:K,rowKey:"id",pagination:!1,loading:g,onRow:e=>({onClick:t=>{const n=t.target;n.closest(".ant-checkbox-wrapper")||n.closest(".ant-checkbox")||n.classList.contains("ant-checkbox-input")||m(e)}}),showHeader:!1})}):e(L,{description:x("No data to display"),style:{margin:"40px 0"}}),f.total>f.pageSize&&e("div",{className:oi.paginationContainer,children:e(z,{current:f.current,pageSize:f.pageSize,total:f.total,onChange:(e,t)=>p({current:e,pageSize:t,total:f.total}),showSizeChanger:!0,showTotal:e=>x("total pages",{total:e})})})]}:{children:[e(()=>r&&0!==r.length?e(B,{gutter:[16,16],className:oi.gridRow,style:{gap:32,padding:"0 16px 16px"},children:r.map(r=>e(V,{className:oi.gridCard_col,style:{padding:0},children:t(U,{hoverable:!0,cover:e("div",{className:r.isFolder?oi.gridPreviewContainerFolder:oi.gridPreviewContainer,onClick:e=>{e.stopPropagation(),r.isFolder&&m(r)},children:r.isFolder?e("div",{className:oi.gridFolderIcon,children:e(_,{className:oi.gridFolderIconImage})}):e(Qr,{src:r.thumbnail||r.thumbnailUrl||r.url,alt:r.name,className:oi.gridImagePreview,preview:!0,file:r})}),className:`${oi.gridCard} ${v.has(r.id)?oi.gridCardSelected:""}`,onClick:e=>{e.stopPropagation(),b(r.id)},children:[t("div",{className:oi.gridCardContent,children:[e("div",{className:oi.gridFileName,children:r.name||x("Untitled")}),e("div",{className:oi.gridFileInfo,children:r.isFolder?(()=>{const e=O[r.id]||0;return`${e} ${1===e?"item":"items"}`})():t(n,{children:[r.dimensions||"1440 × 900"," • ",r.size||"120.54 КБ"," • jpg"]})})]}),e("div",{onClick:e=>{e.stopPropagation()},className:oi.gridCheckbox,children:e(R,{checked:v.has(r.id),onChange:e=>{e.stopPropagation(),b(r.id)}})})]})},r.id))}):e(L,{description:x("No data to display"),style:{margin:"40px 0"}}),{}),f.total>f.pageSize&&e("div",{className:oi.paginationContainer,children:e(z,{current:f.current,pageSize:f.pageSize,total:f.total,onChange:(e,t)=>p({current:e,pageSize:t,total:f.total}),showSizeChanger:!0,showTotal:e=>x("total pages",{total:e})})})]})})]})},li=({isModalVisible:r,handleModalOk:i,handleModalCancel:o,form:a,selectedFolder:s,folders:l,isUrlModalVisible:c,setIsUrlModalVisible:u,handleAddFileByUrl:h,urlForm:d,isRenameModalVisible:f,handleRenameOk:p,handleRenameCancel:g,renameForm:m,fileToRename:v,files:b,isMoveModalVisible:y,handleMoveOk:w,handleMoveCancel:x,moveForm:_,selectedFiles:C,isRenameFolderModalVisible:S,handleRenameFolderOk:A,handleRenameFolderCancel:k,renameFolderForm:T,folderToRename:I,isCopyModalVisible:O,handleCopyOk:M,handleCopyCancel:F,copyForm:j,isDeleteConfirmVisible:R,handleDeleteConfirmOk:D,handleDeleteConfirmCancel:L})=>{var N,z,B;const{t:V}=br(),U=Array.isArray(b)?b:[],Y=v?null===(N=U.find(e=>e.id===v))||void 0===N?void 0:N.name:"",$=Array.isArray(l)?l:[],G=I?null===(z=$.find(e=>e.id===I))||void 0===z?void 0:z.name:"",X=v?U.find(e=>e.id===v):null,K=(null==X?void 0:X.isFolder)||(null==v?void 0:v.startsWith("folder_")),q=()=>{const t=(n=null,r=new Set)=>l.filter(e=>{const t=null===n&&!e.parentId,r=e.parentId===n;return t||r}).map(n=>{if(r.has(n.id))return{key:n.id,title:`${n.name} (циклическая ссылка)`,icon:e(le,{style:{color:"red"}}),disabled:!0,isLeaf:!0};const i=Array.from(C).includes(n.id),o=new Set(r);o.add(n.id);const a=t(n.id,o);return{key:n.id,title:n.name,icon:e(le,{}),disabled:i,children:a.length>0?a:void 0,isLeaf:0===a.length}}),n=t();return[{key:"root",title:V("Folders"),icon:e(le,{}),children:n}]};return t(n,{children:[e(H,{title:e("div",{className:"modal-title",children:V("Creating a new folder")}),open:r,onOk:i,onCancel:o,okText:V("Create"),cancelText:V("Cancel"),children:t(P,{form:a,layout:"vertical",children:[e(P.Item,{name:"folderName",label:e("div",{className:"form-label",children:V("Folder name")}),rules:[{required:!0,message:V("Enter the name of the folder")}],initialValue:V("New folder"),className:"form-item",children:e(E,{autoFocus:!0,className:"form-input"})}),e("div",{children:s&&"folders"!==s?t("p",{children:[V("A folder will be created inside:")," ",(null===(B=$.find(e=>e.id===s))||void 0===B?void 0:B.name)||V("selected folder")]}):e("p",{children:V("The folder will be created in the root directory")})})]})}),e(H,{title:e("div",{className:"modal-title",children:V("Upload image by URL")}),open:c,onOk:()=>h(null),onCancel:()=>u(!1),okText:V("Download"),cancelText:V("Cancel"),children:t(P,{form:d,layout:"vertical",children:[e(P.Item,{name:"fileUrl",label:e("div",{className:"form-label",children:V("image URL")}),rules:[{required:!0,message:V("Enter the URL of the image")}],className:"form-item",children:e(E,{autoFocus:!0,placeholder:"https://example.com/image.jpg",className:"form-input"})}),e("p",{children:V("Supported formats: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP")})]})}),e(H,{title:e("div",{className:"modal-title",children:K?`${V("Rename folder")} ${Y}`:V("Rename file",{currentFileName:Y})}),open:f,onOk:p,onCancel:g,okText:V("Rename"),cancelText:V("Cancel"),children:e(P,{form:m,layout:"vertical",children:e(P.Item,{name:"newFileName",label:e("div",{className:"form-label",children:V(K?"New folder name":"New file name")}),rules:[{required:!0,message:V(K?"Enter a new folder name":"Enter a new file name")}],className:"form-item",children:e(E,{autoFocus:!0,className:"form-input"})})})}),e(H,{title:e("div",{className:"modal-title",children:V("Move to folder")}),open:y,onOk:w,onCancel:x,okText:"Переместить",cancelText:V("Cancel"),children:t(P,{form:_,layout:"vertical",children:[e("div",{className:"file-name-label",children:V("Selected files:",{count:C.size})}),e(P.Item,{name:"targetFolder",label:e("div",{className:"form-label",children:V("Select the destination folder")}),rules:[{required:!0,message:V("Select the destination folder")}],className:"form-item",children:e(W,{defaultExpandAll:!0,treeData:q(),selectable:!0,onSelect:e=>{e.length>0&&_.setFieldsValue({targetFolder:e[0]})}})})]})}),e(H,{title:t("div",{className:"modal-title",children:[V("Rename folder")," ",G]}),open:S,onOk:A,onCancel:k,okText:V("Rename"),cancelText:V("Cancel"),children:e(P,{form:T,layout:"vertical",children:e(P.Item,{name:"newFolderName",label:e("div",{className:"form-label",children:V("New folder name")}),rules:[{required:!0,message:V("Enter a new folder name")}],className:"form-item",children:e(E,{autoFocus:!0,className:"form-input"})})})}),e(H,{title:e("div",{className:"modal-title",children:V("Copy to folder")}),open:O,onOk:M,onCancel:F,okText:V("Copy"),cancelText:V("Cancel"),children:t(P,{form:j,layout:"vertical",children:[e("div",{className:"file-name-label",children:V("Selected files:",{count:C.size})}),e(P.Item,{name:"targetFolder",label:e("div",{className:"form-label",children:V("Select the destination folder")}),rules:[{required:!0,message:V("Select the destination folder")}],className:"form-item",children:e(W,{defaultExpandAll:!0,treeData:q(),selectable:!0,onSelect:e=>{e.length>0&&j.setFieldsValue({targetFolder:e[0]})}})})]})}),e(H,{title:e("div",{className:"modal-title",children:V("Confirm deletion")}),open:!!R,onOk:()=>D&&D(),onCancel:()=>L&&L(),okText:V("Delete"),cancelText:V("Cancel"),okButtonProps:{danger:!0},children:e("div",{children:V("Are you sure you want to delete the selected items?")})})]})},ci=e=>{const{state:t,actions:n,options:r}=Hr(),{t:i}=br(),{folders:o,folderToRename:a,renameFolderForm:s,isRenameFolderModalVisible:l}=t,{setFolderToRename:u,setIsRenameFolderModalVisible:h}=n,{apiEndpoints:d,dataProviders:f}=r,p=c(e=>{null==u||u(e),null==h||h(!0);const t=null==o?void 0:o.find(t=>t.id===e);t&&s&&s.setFieldsValue({newFolderName:t.name})},[u,h,o,s]),g=c(()=>{null==h||h(!1),null==u||u(null),null==s||s.resetFields()},[h,u,s]),m=c(async()=>{if(a&&s)try{const t=await s.validateFields();if(!(null==t?void 0:t.newFolderName))return;if(!(null==f?void 0:f.renameFolder))return void M.error("DataProvider для переименования папок не настроен");const r=await f.renameFolder(a,t.newFolderName.trim());if(!(null==r?void 0:r.id))return void M.error("Некорректный ответ при переименовании папки");M.success(`${i("Folder renamed to")} ${t.newFolderName}`),g(),await e(),a!==r.id&&n.setSelectedFolder&&n.setSelectedFolder(r.id)}catch(e){console.error("Ошибка при переименовании папки:",e),M.error("Ошибка при переименовании папки")}},[a,s,d,g,e,i]);return{state:{isRenamingFolder:l||!1,folderToRename:a},actions:{showRenameFolderModal:p,handleRenameFolderCancel:g,handleRenameFolderOk:m}}},ui=()=>e("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"mixed-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:e("path",{d:"M1 1h2v2H1V1zm0 4h2v2H1V5zm0 4h2v2H1V9zm4-8h2v2H5V1zm0 4h2v2H5V5zm0 4h2v2H5V9zm4-8h2v2H9V1zm0 4h2v2H9V5zm0 4h2v2H9V9z"})}),hi=()=>e("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"landscape-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:e("path",{d:"M1 3h10v6H1V3zm1 1v4h8V4H2z"})}),di=()=>e("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"portrait-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:e("path",{d:"M3 1h6v10H3V1zm1 1v8h4V2H4z"})}),fi=()=>e("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"square-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:e("path",{d:"M1 1h10v10H1V1zm1 1v8h8V2H2z"})}),pi=()=>e("svg",{width:"20",height:"20",style:{verticalAlign:"-0.35em",marginRight:10},viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M7.49984 11.668H15.8332L12.9582 7.91797L11.0415 10.418L9.74984 8.7513L7.49984 11.668ZM6.6665 15.0013C6.20817 15.0013 5.81581 14.8381 5.48942 14.5117C5.16303 14.1853 4.99984 13.793 4.99984 13.3346V3.33464C4.99984 2.8763 5.16303 2.48394 5.48942 2.15755C5.81581 1.83116 6.20817 1.66797 6.6665 1.66797H16.6665C17.1248 1.66797 17.5172 1.83116 17.8436 2.15755C18.17 2.48394 18.3332 2.8763 18.3332 3.33464V13.3346C18.3332 13.793 18.17 14.1853 17.8436 14.5117C17.5172 14.8381 17.1248 15.0013 16.6665 15.0013H6.6665ZM6.6665 13.3346H16.6665V3.33464H6.6665V13.3346ZM3.33317 18.3346C2.87484 18.3346 2.48248 18.1714 2.15609 17.8451C1.8297 17.5187 1.6665 17.1263 1.6665 16.668V5.0013H3.33317V16.668H14.9998V18.3346H3.33317Z",fill:"currentColor"})}),gi=()=>e("svg",{width:"20",height:"20",style:{verticalAlign:"-0.35em",marginRight:10},viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M3.33317 14.1654C2.87484 14.1654 2.48248 14.0022 2.15609 13.6758C1.8297 13.3494 1.6665 12.957 1.6665 12.4987V7.4987C1.6665 7.04036 1.8297 6.648 2.15609 6.32161C2.48248 5.99523 2.87484 5.83203 3.33317 5.83203H6.6665C7.12484 5.83203 7.5172 5.99523 7.84359 6.32161C8.16998 6.648 8.33317 7.04036 8.33317 7.4987H3.33317V12.4987H6.6665V10.832H4.99984V9.16536H8.33317V12.4987C8.33317 12.957 8.16998 13.3494 7.84359 13.6758C7.5172 14.0022 7.12484 14.1654 6.6665 14.1654H3.33317ZM9.99984 14.1654V5.83203H11.6665V14.1654H9.99984ZM13.3332 14.1654V5.83203H19.1665V7.4987H14.9998V9.16536H18.3332V10.832H14.9998V14.1654H13.3332Z",fill:"currentColor"})}),mi=()=>e("svg",{width:"20",height:"20",style:{verticalAlign:"-0.35em",marginRight:10},viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M0.833496 15.8346V4.16797H2.50016V15.8346H0.833496ZM4.16683 15.8346V4.16797H5.8335V15.8346H4.16683ZM9.16683 15.8346C8.7085 15.8346 8.31614 15.6714 7.98975 15.3451C7.66336 15.0187 7.50016 14.6263 7.50016 14.168V5.83464C7.50016 5.3763 7.66336 4.98394 7.98975 4.65755C8.31614 4.33116 8.7085 4.16797 9.16683 4.16797H17.5002C17.9585 4.16797 18.3509 4.33116 18.6772 4.65755C19.0036 4.98394 19.1668 5.3763 19.1668 5.83464V14.168C19.1668 14.6263 19.0036 15.0187 18.6772 15.3451C18.3509 15.6714 17.9585 15.8346 17.5002 15.8346H9.16683ZM9.16683 14.168H17.5002V5.83464H9.16683V14.168ZM10.0002 12.5013H16.6668L14.5002 9.58464L12.9168 11.668L11.7502 10.1263L10.0002 12.5013Z",fill:"currentColor"})}),vi=()=>t("svg",{width:"20",height:"20",style:{verticalAlign:"-0.35em",marginRight:10},viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{d:"M5.9471 17.4987C5.9471 17.4987 5.5606 15.9327 4.87018 15.2423C4.17976 14.5519 2.61377 14.1653 2.61377 14.1653C2.61377 14.1653 4.17976 13.7788 4.87018 13.0884C5.5606 12.398 5.9471 10.832 5.9471 10.832C5.9471 10.832 6.3336 12.398 7.02402 13.0884C7.71443 13.7788 9.28044 14.1653 9.28044 14.1653C9.28044 14.1653 7.71443 14.5519 7.02402 15.2423C6.3336 15.9327 5.9471 17.4987 5.9471 17.4987Z",fill:"currentColor"}),e("path",{d:"M13.0304 14.9987C13.0304 14.9987 12.4024 12.2582 11.2804 11.05C10.1585 9.84174 7.61377 9.16536 7.61377 9.16536C7.61377 9.16536 10.1585 8.48899 11.2804 7.28074C12.4024 6.07251 13.0304 3.33203 13.0304 3.33203C13.0304 3.33203 13.6585 6.07251 14.7804 7.28074C15.9023 8.48899 18.4471 9.16536 18.4471 9.16536C18.4471 9.16536 15.9023 9.84174 14.7804 11.05C13.6585 12.2582 13.0304 14.9987 13.0304 14.9987Z",fill:"currentColor"}),e("path",{d:"M4.6971 7.4987C4.6971 7.4987 4.45554 6.51995 4.02402 6.08844C3.59251 5.65693 2.61377 5.41537 2.61377 5.41537C2.61377 5.41537 3.59251 5.1738 4.02402 4.74228C4.45554 4.31077 4.6971 3.33203 4.6971 3.33203C4.6971 3.33203 4.93866 4.31077 5.37017 4.74228C5.80169 5.1738 6.78044 5.41537 6.78044 5.41537C6.78044 5.41537 5.80169 5.65693 5.37017 6.08844C4.93866 6.51995 4.6971 7.4987 4.6971 7.4987Z",fill:"currentColor"}),e("path",{d:"M15.947 17.5C15.947 17.5 15.7536 16.9127 15.4085 16.6538C15.0633 16.395 14.2803 16.25 14.2803 16.25C14.2803 16.25 15.0633 16.105 15.4085 15.8461C15.7536 15.5872 15.947 15 15.947 15C15.947 15 16.1402 15.5872 16.4854 15.8461C16.8306 16.105 17.6136 16.25 17.6136 16.25C17.6136 16.25 16.8306 16.395 16.4854 16.6538C16.1402 16.9127 15.947 17.5 15.947 17.5Z",fill:"currentColor"})]}),bi=()=>t("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"ai-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:[e("path",{d:"M2.45454 11.7273C2.45454 11.7273 2.16994 10.446 1.66154 9.88113C1.15314 9.31625 0 9 0 9C0 9 1.15314 8.68374 1.66154 8.11887C2.16994 7.554 2.45454 6.27273 2.45454 6.27273C2.45454 6.27273 2.73915 7.554 3.24755 8.11887C3.75594 8.68374 4.90909 9 4.90909 9C4.90909 9 3.75594 9.31625 3.24755 9.88113C2.73915 10.446 2.45454 11.7273 2.45454 11.7273Z"}),e("path",{d:"M7.63636 9C7.63636 9 7.1304 6.94996 6.22658 6.04614C5.32276 5.14233 3.27273 4.63636 3.27273 4.63636C3.27273 4.63636 5.32276 4.1304 6.22658 3.22657C7.1304 2.32275 7.63636 0.272728 7.63636 0.272728C7.63636 0.272728 8.14233 2.32275 9.04615 3.22657C9.94996 4.1304 12 4.63636 12 4.63636C12 4.63636 9.94996 5.14233 9.04615 6.04614C8.14233 6.94996 7.63636 9 7.63636 9Z"}),e("path",{d:"M1.63636 4.09091C1.63636 4.09091 1.44663 3.19402 1.10769 2.7986C0.768758 2.40318 0 2.18182 0 2.18182C0 2.18182 0.768758 1.96046 1.10769 1.56503C1.44663 1.16961 1.63636 0.272728 1.63636 0.272728C1.63636 0.272728 1.8261 1.16961 2.16503 1.56503C2.50397 1.96046 3.27273 2.18182 3.27273 2.18182C3.27273 2.18182 2.50397 2.40318 2.16503 2.7986C1.8261 3.19402 1.63636 4.09091 1.63636 4.09091Z"}),e("path",{d:"M10.6364 11.7273C10.6364 11.7273 10.4782 11.0866 10.1958 10.8042C9.91336 10.5218 9.27273 10.3636 9.27273 10.3636C9.27273 10.3636 9.91336 10.2055 10.1958 9.92307C10.4782 9.64064 10.6364 9 10.6364 9C10.6364 9 10.7945 9.64064 11.0769 9.92307C11.3594 10.2055 12 10.3636 12 10.3636C12 10.3636 11.3594 10.5218 11.0769 10.8042C10.7945 11.0866 10.6364 11.7273 10.6364 11.7273Z"})]}),yi=t=>e(ae,Object.assign({component:ui},t)),wi=t=>e(ae,Object.assign({component:hi},t)),xi=t=>e(ae,Object.assign({component:di},t)),_i=t=>e(ae,Object.assign({component:fi},t)),Ci=t=>e(ae,Object.assign({component:vi},t)),Si=t=>e(ae,Object.assign({component:bi},t)),Ai=t=>e(ae,Object.assign({component:mi},t)),ki=t=>e(ae,Object.assign({component:gi},t)),Ti=t=>e(ae,Object.assign({component:pi},t));var Ii="button",Oi="foldersTitle",Ei="folderActions",Pi="fileCount",Mi="uploadButton",Fi="folderMenu",ji="folderIcon",Ri="folderLabelItem",Di="foldersTitleItem",Li="folderLabel",Ni="foldersContainer",zi="divider",Bi="buttonWrapper",Vi="uploadButtonTitle",Ui="emptyFolderContainer";const Hi=f(p(({selectedFolder:n,generateMenuItems:r,onFolderSelect:i,folders:s,fetchFolders:l,handleAddFile:u,setIsUrlModalVisible:d,handleCreateFolder:f,activeLibraryItem:p,setActiveLibraryItem:m},v)=>{const b=Array.isArray(s)?s:[],{t:y}=br(),[w,x]=o({}),{options:_}=Hr(),{dataProviders:C,config:S}=_,A=ci(l),{FolderIcon:k,AddFolderIcon:T,UploadByUrlIcon:I,ExpandArrowIcon:O,CollapseArrowIcon:E}=ii(),P=c(e=>{const t=["folders"],n=e=>{e.forEach(e=>{t.push(e.key),e.children&&n(e.children)})};return n(e),t},[]),[M,F]=o(()=>{const e=r();return P(e)});a(()=>{const e=r(),t=P(e);F(t)},[b,r,P]);const j=c(async e=>{try{if(null==C?void 0:C.getFiles){const{files:t,pagination:n}=await C.getFiles({folderId:"folders"===e?void 0:e});return(null==n?void 0:n.total)||t.filter(e=>!e.isFolder).length}return 0}catch(t){return console.error(`Ошибка при получении количества файлов для папки ${e}:`,t),0}},[C]),R=c(async()=>{if(0===b.length)return;const e={};e.folders=await j("folders");const t=b.map(async t=>{const n=await j(t.id);e[t.id]=n});await Promise.all(t),x(e)},[b,j]),D=c(async e=>{const t=await j(e);x(n=>Object.assign(Object.assign({},n),{[e]:t}))},[j]);g(v,()=>({refreshFileCounts:R}),[R]),a(()=>{R()},[R]);const L=c(async()=>{await u(),n?await D(n):await D("folders")},[u,n,D]),N=h(()=>({items:[{key:"upload-url",label:y("Upload image by URL"),icon:e(I,{}),onClick:()=>null==d?void 0:d(!0)}]}),[I,d,y]),z=[{key:jr,label:y("My files"),icon:e(Ti,{})},{key:Rr,label:y("GIF"),icon:e(ki,{})},{key:Dr,label:y("Stock images"),icon:e(Ai,{})},{key:Lr,label:y("AI"),icon:e(Ci,{}),disabled:!(null==S?void 0:S.sseQuery)}],B=c(e=>{const t=e[0];t&&"empty"!==t&&(p!==jr&&m(jr),null==i||i(t))},[i,p,m]),V=c(({key:e})=>{console.log("key",e),m(e)},[m]),U=c(e=>{F(e)},[]),H=c(()=>{var n;const i=r();if(0===i.length||1===i.length&&(!i[0].children||0===i[0].children.length))return[{key:"empty",title:e("div",{className:Ui,children:y("No data to display")})}];const o=n=>{var r;const i=b.find(e=>e.id===n.key),a=w[n.key]||0,s={items:[{key:"rename",label:y("Rename"),icon:e(ye,{}),onClick:e=>{i&&e.domEvent&&(e.domEvent.stopPropagation(),A.actions.showRenameFolderModal(i.id))}}]},l=e(Y,{menu:s,trigger:["contextMenu"],children:t("div",{className:"folder-item-container",children:[t("div",{className:Li,children:[e(k,{className:ji}),e("span",{className:Ri,children:n.label})]}),e("div",{className:Pi,title:`${a} ${1===a?"файл":"файлов"}`,children:a})]})});return{key:n.key,title:l,children:null===(r=n.children)||void 0===r?void 0:r.map(o)}},a=e("div",{className:Oi,children:t("div",{className:Di,children:[e(ve,{className:ji}),e("span",{className:Ri,children:y("Folders")})]})});return i.length>0&&"folders"===i[0].key?[{key:"folders",title:a,children:null===(n=i[0].children)||void 0===n?void 0:n.map(o)}]:i.map(o)},[r,y,b,w,k,A.actions]),K=h(()=>H(),[H]);return t("div",{className:"sidebar-container",children:[e("div",{className:Bi,children:t(Y.Button,{type:"primary",size:"large",icon:e(E,{}),onClick:L,menu:N,className:Mi,children:[e(be,{})," ",e("span",{className:Vi,children:y("Upload image")})]})}),e("div",{className:"sidebar__sections-title",children:y("Library")}),e($,{className:"folder-menu",items:z,defaultSelectedKeys:[jr],onSelect:({key:e})=>V({key:e}),selectedKeys:[p]}),e(G,{className:zi}),t("div",{className:Ni,children:[e(W,{className:`${Fi} folder-tree`,selectedKeys:n?[n]:["folders"],expandedKeys:M,onSelect:B,onExpand:U,treeData:K,switcherIcon:({expanded:t})=>e(t?E:O,{}),showLine:!1}),e("div",{className:Ei,children:e(X,{onClick:e=>{e.stopPropagation(),f()},className:Ii,icon:e(T,{}),size:"middle"})})]})]})}));Hi.displayName="FolderSidebar";var Wi=Object.defineProperty,Yi=(e,t,n)=>(((e,t,n)=>{t in e?Wi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),$i=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Xi(e){var t=e.default;if("function"==typeof t){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var Ki=function(e){return!(t=e,!t||"object"!=typeof t||function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===qi}(e)}(e));var t};var qi="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function Zi(e,t){return!1!==t.clone&&t.isMergeableObject(e)?no(function(e){return Array.isArray(e)?[]:{}}(e),e,t):e}function Ji(e,t,n){return e.concat(t).map(function(e){return Zi(e,n)})}function Qi(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return e.propertyIsEnumerable(t)}):[]}(e))}function eo(e,t){try{return t in e}catch{return!1}}function to(e,t,n){var r={};return n.isMergeableObject(e)&&Qi(e).forEach(function(t){r[t]=Zi(e[t],n)}),Qi(t).forEach(function(i){(function(e,t){return eo(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(eo(e,i)&&n.isMergeableObject(t[i])?r[i]=function(e,t){if(!t.customMerge)return no;var n=t.customMerge(e);return"function"==typeof n?n:no}(i,n)(e[i],t[i],n):r[i]=Zi(t[i],n))}),r}function no(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Ji,n.isMergeableObject=n.isMergeableObject||Ki,n.cloneUnlessOtherwiseSpecified=Zi;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):to(e,t,n):Zi(t,n)}no.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return no(e,n,t)},{})};var ro=no;function io(e,t){return void 0===t&&(t=15),+parseFloat(Number(e).toPrecision(t))}function oo(e){var t=e.toString().split(/[eE]/),n=(t[0].split(".")[1]||"").length-+(t[1]||0);return n>0?n:0}function ao(e){if(-1===e.toString().indexOf("e"))return Number(e.toString().replace(".",""));var t=oo(e);return t>0?io(Number(e)*Math.pow(10,t)):Number(e)}function so(e){ho&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&console.warn(e+" is beyond boundary when transfer to integer, the results may not be accurate")}function lo(e,t){var n=e[0],r=e[1],i=e.slice(2),o=t(n,r);return i.forEach(function(e){o=t(o,e)}),o}function co(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length>2)return lo(e,co);var n=e[0],r=e[1],i=ao(n),o=ao(r),a=oo(n)+oo(r),s=i*o;return so(s),s/Math.pow(10,a)}function uo(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length>2)return lo(e,uo);var n=e[0],r=e[1],i=ao(n),o=ao(r);return so(i),so(o),co(i/o,io(Math.pow(10,oo(r)-oo(n))))}var ho=!0;var fo={strip:io,plus:function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t.length>2)return lo(t,e);var r=t[0],i=t[1],o=Math.pow(10,Math.max(oo(r),oo(i)));return(co(r,o)+co(i,o))/o},minus:function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t.length>2)return lo(t,e);var r=t[0],i=t[1],o=Math.pow(10,Math.max(oo(r),oo(i)));return(co(r,o)-co(i,o))/o},times:co,divide:uo,round:function(e,t){var n=Math.pow(10,t),r=uo(Math.round(Math.abs(co(e,n))),n);return e<0&&0!==r&&(r=co(r,-1)),r},digitLength:oo,float2Fixed:ao,enableBoundaryChecking:function(e){void 0===e&&(e=!0),ho=e}};function po(e){return e&&e.Math==Math?e:void 0}var go="object"==typeof globalThis&&po(globalThis)||"object"==typeof window&&po(window)||"object"==typeof self&&po(self)||"object"==typeof global&&po(global)||function(){return this}()||{};function mo(){return go}function vo(e,t,n){var r=n||go,i=r.__SENTRY__=r.__SENTRY__||{};return i[e]||(i[e]=t())}var bo=Object.prototype.toString;function yo(e){switch(bo.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Io(e,Error)}}function wo(e,t){return bo.call(e)===`[object ${t}]`}function xo(e){return wo(e,"ErrorEvent")}function _o(e){return wo(e,"DOMError")}function Co(e){return wo(e,"String")}function So(e){return null===e||"object"!=typeof e&&"function"!=typeof e}function Ao(e){return wo(e,"Object")}function ko(e){return typeof Event<"u"&&Io(e,Event)}function To(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function Io(e,t){try{return e instanceof t}catch{return!1}}function Oo(e,t){try{let r=e;var n=[];let i=0,o=0;let a;for(;r&&i++<5&&(a=Eo(r,t),!("html"===a||i>1&&o+3*n.length+a.length>=80));)n.push(a),o+=a.length,r=r.parentNode;return n.reverse().join(" > ")}catch{return"<unknown>"}}function Eo(e,t){var n=e,r=[];let i,o,a,s,l;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());var c=t&&t.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(c&&c.length)c.forEach(e=>{r.push(`[${e[0]}="${e[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),i=n.className,i&&Co(i))for(o=i.split(/\s+/),l=0;l<o.length;l++)r.push(`.${o[l]}`);var u=["type","name","title","alt"];for(l=0;l<u.length;l++)a=u[l],s=n.getAttribute(a),s&&r.push(`[${a}="${s}"]`);return r.join("")}class Po extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}var Mo=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Fo(e,t=!1){const{host:n,path:r,pass:i,port:o,projectId:a,protocol:s,publicKey:l}=e;return`${s}://${l}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${a}`}function jo(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Ro(e){var t="string"==typeof e?function(e){var t=Mo.exec(e);if(!t)throw new Po(`Invalid Sentry Dsn: ${e}`);const[n,r,i="",o,a="",s]=t.slice(1);let l="",c=s;var u=c.split("/");if(u.length>1&&(l=u.slice(0,-1).join("/"),c=u.pop()),c){var h=c.match(/^\d+/);h&&(c=h[0])}return jo({host:o,pass:i,path:l,projectId:c,port:a,protocol:n,publicKey:r})}(e):jo(e);return function(e){if(!(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__))return;const{port:t,projectId:n,protocol:r}=e;if(["protocol","publicKey","host","projectId"].forEach(t=>{if(!e[t])throw new Po(`Invalid Sentry Dsn: ${t} missing`)}),!n.match(/^\d+$/))throw new Po(`Invalid Sentry Dsn: Invalid projectId ${n}`);if(!function(e){return"http"===e||"https"===e}(r))throw new Po(`Invalid Sentry Dsn: Invalid protocol ${r}`);if(t&&isNaN(parseInt(t,10)))throw new Po(`Invalid Sentry Dsn: Invalid port ${t}`)}(t),t}var Do=mo(),Lo=["debug","info","warn","error","log","assert","trace"];function No(e){var t=mo();if(!("console"in t))return e();var n=t.console,r={};Lo.forEach(e=>{var i=n[e]&&n[e].__sentry_original__;e in t.console&&i&&(r[e]=n[e],n[e]=i)});try{return e()}finally{Object.keys(r).forEach(e=>{n[e]=r[e]})}}function zo(){let e=!1;var t={enable:()=>{e=!0},disable:()=>{e=!1}};return typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?Lo.forEach(n=>{t[n]=(...t)=>{e&&No(()=>{Do.console[n](`Sentry Logger [${n}]:`,...t)})}}):Lo.forEach(e=>{t[e]=()=>{}}),t}let Bo;function Vo(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.substr(0,t)}...`}function Uo(e,t){if(!Array.isArray(e))return"";var n=[];for(let t=0;t<e.length;t++){var r=e[t];try{n.push(String(r))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Ho(e,t){return!!Co(e)&&(function(e){return wo(e,"RegExp")}(t)?t.test(e):"string"==typeof t&&-1!==e.indexOf(t))}function Wo(e,t,n){if(t in e){var r=e[t],i=n(r);if("function"==typeof i)try{$o(i,r)}catch{}e[t]=i}}function Yo(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}function $o(e,t){var n=t.prototype||{};e.prototype=t.prototype=n,Yo(e,"__sentry_original__",t)}function Go(e){return e.__sentry_original__}function Xo(e){if(yo(e))return{message:e.message,name:e.name,stack:e.stack,...qo(e)};if(ko(e)){var t={type:e.type,target:Ko(e.target),currentTarget:Ko(e.currentTarget),...qo(e)};return typeof CustomEvent<"u"&&Io(e,CustomEvent)&&(t.detail=e.detail),t}return e}function Ko(e){try{return function(e){return typeof Element<"u"&&Io(e,Element)}(e)?Oo(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function qo(e){if("object"==typeof e&&null!==e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function Zo(e,t=40){var n=Object.keys(Xo(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return Vo(n[0],t);for(let e=n.length;e>0;e--){var r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:Vo(r,t)}return""}function Jo(e){return Qo(e,new Map)}function Qo(e,t){if(Ao(e)){if(void 0!==(i=t.get(e)))return i;var n={};for(var r of(t.set(e,n),Object.keys(e)))typeof e[r]<"u"&&(n[r]=Qo(e[r],t));return n}if(Array.isArray(e)){var i;if(void 0!==(i=t.get(e)))return i;n=[];return t.set(e,n),e.forEach(e=>{n.push(Qo(e,t))}),n}return e}Bo=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?vo("logger",zo):zo();function ea(...e){var t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0)=>{var r=[];for(var i of e.split("\n").slice(n)){var o=i.replace(/\(error: (.*)\)/,"$1");for(var a of t){var s=a(o);if(s){r.push(s);break}}}return function(e){if(!e.length)return[];let t=e;var n=t[0].function||"",r=t[t.length-1].function||"";return(-1!==n.indexOf("captureMessage")||-1!==n.indexOf("captureException"))&&(t=t.slice(1)),-1!==r.indexOf("sentryWrapped")&&(t=t.slice(0,-1)),t.slice(0,50).map(e=>({...e,filename:e.filename||t[0].filename,function:e.function||"?"})).reverse()}(r)}}function ta(e){return Array.isArray(e)?ea(...e):e}var na="<anonymous>";function ra(e){try{return e&&"function"==typeof e&&e.name||na}catch{return na}}function ia(){if(!("fetch"in mo()))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function oa(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}var aa=mo(),sa={},la={};function ca(e){if(!la[e])switch(la[e]=!0,e){case"console":"console"in aa&&Lo.forEach(function(e){e in aa.console&&Wo(aa.console,e,function(t){return function(...n){ha("console",{args:n,level:e}),t&&t.apply(aa.console,n)}})});break;case"dom":!function(){if("document"in aa){var e=ha.bind(null,"dom"),t=ba(e,!0);aa.document.addEventListener("click",t,!1),aa.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{var n=aa[t]&&aa[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Wo(n,"addEventListener",function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{var o=this,a=o.__sentry_instrumentation_handlers__=o.__sentry_instrumentation_handlers__||{},s=a[n]=a[n]||{refCount:0};if(!s.handler){var l=ba(e);s.handler=l,t.call(this,n,l,i)}s.refCount+=1}catch{}return t.call(this,n,r,i)}}),Wo(n,"removeEventListener",function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{var i=this,o=i.__sentry_instrumentation_handlers__||{},a=o[t];a&&(a.refCount-=1,a.refCount<=0&&(e.call(this,t,a.handler,r),a.handler=void 0,delete o[t]),0===Object.keys(o).length&&delete i.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}}();break;case"xhr":!function(){if("XMLHttpRequest"in aa){var e=XMLHttpRequest.prototype;Wo(e,"open",function(e){return function(...t){var n=this,r=t[1],i=n.__sentry_xhr__={method:Co(t[0])?t[0].toUpperCase():t[0],url:t[1]};Co(r)&&"POST"===i.method&&r.match(/sentry_key/)&&(n.__sentry_own_request__=!0);var o=function(){if(4===n.readyState){try{i.status_code=n.status}catch{}ha("xhr",{args:t,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:n})}};return"onreadystatechange"in n&&"function"==typeof n.onreadystatechange?Wo(n,"onreadystatechange",function(e){return function(...t){return o(),e.apply(n,t)}}):n.addEventListener("readystatechange",o),e.apply(n,t)}}),Wo(e,"send",function(e){return function(...t){return this.__sentry_xhr__&&void 0!==t[0]&&(this.__sentry_xhr__.body=t[0]),ha("xhr",{args:t,startTimestamp:Date.now(),xhr:this}),e.apply(this,t)}})}}();break;case"fetch":!function(){if(!ia())return!1;var e=mo();if(oa(e.fetch))return!0;let t=!1;var n=e.document;if(n&&"function"==typeof n.createElement)try{var r=n.createElement("iframe");r.hidden=!0,n.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(t=oa(r.contentWindow.fetch)),n.head.removeChild(r)}catch(e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return t}()||Wo(aa,"fetch",function(e){return function(...t){var n={args:t,fetchData:{method:da(t),url:fa(t)},startTimestamp:Date.now()};return ha("fetch",{...n}),e.apply(aa,t).then(e=>(ha("fetch",{...n,endTimestamp:Date.now(),response:e}),e),e=>{throw ha("fetch",{...n,endTimestamp:Date.now(),error:e}),e})}});break;case"history":!function(){if(!function(){var e=mo(),t=e.chrome,n=t&&t.app&&t.app.runtime,r="history"in e&&!!e.history.pushState&&!!e.history.replaceState;return!n&&r}())return;var e=aa.onpopstate;function t(e){return function(...t){var n=t.length>2?t[2]:void 0;if(n){var r=pa,i=String(n);pa=i,ha("history",{from:r,to:i})}return e.apply(this,t)}}aa.onpopstate=function(...t){var n=aa.location.href,r=pa;if(pa=n,ha("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch{}},Wo(aa.history,"pushState",t),Wo(aa.history,"replaceState",t)}();break;case"error":ya=aa.onerror,aa.onerror=function(e,t,n,r,i){return ha("error",{column:r,error:i,line:n,msg:e,url:t}),!!ya&&ya.apply(this,arguments)};break;case"unhandledrejection":wa=aa.onunhandledrejection,aa.onunhandledrejection=function(e){return ha("unhandledrejection",e),!wa||wa.apply(this,arguments)};break;default:return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn("unknown instrumentation type:",e))}}function ua(e,t){sa[e]=sa[e]||[],sa[e].push(t),ca(e)}function ha(e,t){if(e&&sa[e])for(var n of sa[e]||[])try{n(t)}catch(t){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${ra(n)}\nError:`,t)}}function da(e=[]){return"Request"in aa&&Io(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}function fa(e=[]){return"string"==typeof e[0]?e[0]:"Request"in aa&&Io(e[0],Request)?e[0].url:String(e[0])}let pa;var ga=1e3;let ma,va;function ba(e,t=!1){return n=>{if(n&&va!==n&&!function(e){if("keypress"!==e.type)return!1;try{var t=e.target;if(!t||!t.tagName)return!0;if("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable)return!1}catch{}return!0}(n)){var r="keypress"===n.type?"input":n.type;(void 0===ma||function(e,t){if(!e||e.type!==t.type)return!0;try{if(e.target!==t.target)return!0}catch{}return!1}(va,n))&&(e({event:n,name:r,global:t}),va=n),clearTimeout(ma),ma=aa.setTimeout(()=>{ma=void 0},ga)}}}let ya=null;let wa=null;function xa(){var e=mo(),t=e.crypto||e.msCrypto;if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");var n=t&&t.getRandomValues?()=>t.getRandomValues(new Uint8Array(1))[0]:()=>16*Math.random();return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,e=>(e^(15&n())>>e/4).toString(16))}function _a(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Ca(e){const{message:t,event_id:n}=e;if(t)return t;var r=_a(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Sa(e,t,n){var r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type="Error")}function Aa(e,t){var n=_a(e);if(n){var r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){var i={...r&&r.data,...t.data};n.mechanism.data=i}}}function ka(e){if(e&&e.__sentry_captured__)return!0;try{Yo(e,"__sentry_captured__",!0)}catch{}return!1}function Ta(e){return Array.isArray(e)?e:[e]}function Ia(){return!(typeof __SENTRY_BROWSER_BUNDLE__<"u"&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call(typeof process<"u"?process:0)}function Oa(e,t=1/0,n=1/0){try{return Pa("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Ea(e,t=3,n=102400){var r=Oa(e,t);return function(e){return function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(e))}(r)>n?Ea(e,t-1,n):r}function Pa(e,t,n=1/0,r=1/0,i=function(){var e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}()){const[o,a]=i;if(null===t||["number","boolean","string"].includes(typeof t)&&!function(e){return"number"==typeof e&&e!=e}(t))return t;var s=function(e,t){try{return"domain"===e&&t&&"object"==typeof t&&t._events?"[Domain]":"domainEmitter"===e?"[DomainEmitter]":typeof global<"u"&&t===global?"[Global]":typeof window<"u"&&t===window?"[Window]":typeof document<"u"&&t===document?"[Document]":function(e){return Ao(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}(t)?"[SyntheticEvent]":"number"==typeof t&&t!=t?"[NaN]":void 0===t?"[undefined]":"function"==typeof t?`[Function: ${ra(t)}]`:"symbol"==typeof t?`[${String(t)}]`:"bigint"==typeof t?`[BigInt: ${String(t)}]`:`[object ${Object.getPrototypeOf(t).constructor.name}]`}catch(e){return`**non-serializable** (${e})`}}(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;if(0===n)return s.replace("object ","");if(o(t))return"[Circular ~]";var l=t;if(l&&"function"==typeof l.toJSON)try{return Pa("",l.toJSON(),n-1,r,i)}catch{}var c=Array.isArray(t)?[]:{};let u=0;var h=Xo(t);for(var d in h)if(Object.prototype.hasOwnProperty.call(h,d)){if(u>=r){c[d]="[MaxProperties ~]";break}var f=h[d];c[d]=Pa(d,f,n-1,r,i),u+=1}return a(t),c}var Ma;function Fa(e){return new Ra(t=>{t(e)})}function ja(e){return new Ra((t,n)=>{n(e)})}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(Ma||(Ma={}));class Ra{__init(){this._state=Ma.PENDING}__init2(){this._handlers=[]}constructor(e){Ra.prototype.__init.call(this),Ra.prototype.__init2.call(this),Ra.prototype.__init3.call(this),Ra.prototype.__init4.call(this),Ra.prototype.__init5.call(this),Ra.prototype.__init6.call(this);try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new Ra((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new Ra((t,n)=>{let r,i;return this.then(t=>{i=!1,r=t,e&&e()},t=>{i=!0,r=t,e&&e()}).then(()=>{i?n(r):t(r)})})}__init3(){this._resolve=e=>{this._setResult(Ma.RESOLVED,e)}}__init4(){this._reject=e=>{this._setResult(Ma.REJECTED,e)}}__init5(){this._setResult=(e,t)=>{if(this._state===Ma.PENDING){if(To(t))return void t.then(this._resolve,this._reject);this._state=e,this._value=t,this._executeHandlers()}}}__init6(){this._executeHandlers=()=>{if(this._state!==Ma.PENDING){var e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(this._state===Ma.RESOLVED&&e[1](this._value),this._state===Ma.REJECTED&&e[2](this._value),e[0]=!0)})}}}}function Da(e){var t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return ja(new Po("Not adding Promise because buffer limit was reached."));var i=r();return-1===t.indexOf(i)&&t.push(i),i.then(()=>n(i)).then(null,()=>n(i).then(null,()=>{})),i},drain:function(e){return new Ra((n,r)=>{let i=t.length;if(!i)return n(!0);var o=setTimeout(()=>{e&&e>0&&n(!1)},e);t.forEach(e=>{Fa(e).then(()=>{--i||(clearTimeout(o),n(!0))},r)})})}}}function La(e){if(!e)return{};var t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};var n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}}var Na=["fatal","error","warning","log","info","debug"];function za(e){return"warn"===e?"warning":Na.includes(e)?e:"log"}var Ba={nowSeconds:()=>Date.now()/1e3};var Va=Ia()?function(){try{return function(e,t){return e.require(t)}(module,"perf_hooks").performance}catch{return}}():function(){const{performance:e}=mo();if(e&&e.now)return{now:()=>e.now(),timeOrigin:Date.now()-e.now()}}(),Ua=void 0===Va?Ba:{nowSeconds:()=>(Va.timeOrigin+Va.now())/1e3},Ha=Ba.nowSeconds.bind(Ba),Wa=Ua.nowSeconds.bind(Ua);function Ya(e,t=[]){return[e,t]}function $a(e,t){const[n,r]=e;return[n,[...r,t]]}function Ga(e,t){e[1].forEach(e=>{var n=e[0].type;t(e,n)})}function Xa(e,t){return(t||new TextEncoder).encode(e)}function Ka(e,t){const[n,r]=e;let i=JSON.stringify(n);function o(e){"string"==typeof i?i="string"==typeof e?i+e:[Xa(i,t),e]:i.push("string"==typeof e?Xa(e,t):e)}for(var a of r){const[e,t]=a;o(`\n${JSON.stringify(e)}\n`),o("string"==typeof t||t instanceof Uint8Array?t:JSON.stringify(t))}return"string"==typeof i?i:function(e){var t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t);let r=0;for(var i of e)n.set(i,r),r+=i.length;return n}(i)}function qa(e,t){var n="string"==typeof e.data?Xa(e.data,t):e.data;return[Jo({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}(()=>{const{performance:e}=mo();if(e&&e.now){var t=36e5,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=i<t,a=e.timing&&e.timing.navigationStart,s="number"==typeof a?Math.abs(a+n-r):t;(o||s<t)&&(i<=s&&e.timeOrigin)}})();var Za={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default"};function Ja(e){return Za[e]}function Qa(e,{statusCode:t,headers:n},r=Date.now()){var i={...e},o=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(o)for(var s of o.trim().split(",")){const[e,t]=s.split(":",2);var l=parseInt(e,10),c=1e3*(isNaN(l)?60:l);if(t)for(var u of t.split(";"))i[u]=r+c;else i.all=r+c}else a?i.all=r+function(e,t=Date.now()){var n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;var r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(a,r):429===t&&(i.all=r+6e4);return i}function es(e){var t=Wa(),n={sid:xa(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return Jo({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&ts(n,e),n}function ts(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Wa(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:xa()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{var n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}class ns{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(e){var t=new ns;return e&&(t._breadcrumbs=[...e._breadcrumbs],t._tags={...e._tags},t._extra={...e._extra},t._contexts={...e._contexts},t._user=e._user,t._level=e._level,t._span=e._span,t._session=e._session,t._transactionName=e._transactionName,t._fingerprint=e._fingerprint,t._eventProcessors=[...e._eventProcessors],t._requestSession=e._requestSession,t._attachments=[...e._attachments]),t}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&ts(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts={...this._contexts,[e]:t},this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){var e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if("function"==typeof e){var t=e(this);return t instanceof ns?t:this}return e instanceof ns?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):Ao(e)&&(this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(e,t){var n="number"==typeof t?Math.min(t,100):100;if(n<=0)return this;var r={timestamp:Ha(),...e};return this._breadcrumbs=[...this._breadcrumbs,r].slice(-n),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,t={}){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};var n=this._span.transaction&&this._span.transaction.name;n&&(e.tags={transaction:n,...e.tags})}return this._applyFingerprint(e),e.breadcrumbs=[...e.breadcrumbs||[],...this._breadcrumbs],e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...rs(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}_notifyEventProcessors(e,t,n,r=0){return new Ra((i,o)=>{var a=e[r];if(null===t||"function"!=typeof a)i(t);else{var s=a({...t},n);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&a.id&&null===s&&Bo.log(`Event processor "${a.id}" dropped event`),To(s)?s.then(t=>this._notifyEventProcessors(e,t,n,r+1).then(i)).then(null,o):this._notifyEventProcessors(e,s,n,r+1).then(i).then(null,o)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?Ta(e.fingerprint):[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}}function rs(){return vo("globalEventProcessors",()=>[])}function is(e){rs().push(e)}var os=100;class as{__init(){this._stack=[{}]}constructor(e,t=new ns,n=4){this._version=n,as.prototype.__init.call(this),this.getStackTop().scope=t,e&&this.bindClient(e)}isOlderThan(e){return this._version<e}bindClient(e){this.getStackTop().client=e,e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){var e=ns.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(e){var t=this.pushScope();try{e(t)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){var n=this._lastEventId=t&&t.event_id?t.event_id:xa(),r=new Error("Sentry syntheticException");return this._withClient((i,o)=>{i.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},o)}),n}captureMessage(e,t,n){var r=this._lastEventId=n&&n.event_id?n.event_id:xa(),i=new Error(e);return this._withClient((o,a)=>{o.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},a)}),r}captureEvent(e,t){var n=t&&t.event_id?t.event_id:xa();return"transaction"!==e.type&&(this._lastEventId=n),this._withClient((r,i)=>{r.captureEvent(e,{...t,event_id:n},i)}),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:n,client:r}=this.getStackTop();if(!n||!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=os}=r.getOptions&&r.getOptions()||{};if(!(o<=0)){var a={timestamp:Ha(),...e},s=i?No(()=>i(a,t)):a;null!==s&&n.addBreadcrumb(s,o)}}setUser(e){var t=this.getScope();t&&t.setUser(e)}setTags(e){var t=this.getScope();t&&t.setTags(e)}setExtras(e){var t=this.getScope();t&&t.setExtras(e)}setTag(e,t){var n=this.getScope();n&&n.setTag(e,t)}setExtra(e,t){var n=this.getScope();n&&n.setExtra(e,t)}setContext(e,t){var n=this.getScope();n&&n.setContext(e,t)}configureScope(e){const{scope:t,client:n}=this.getStackTop();t&&n&&e(t)}run(e){var t=ls(this);try{e(this)}finally{ls(t)}}getIntegration(e){var t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){return this._callExtensionMethod("startTransaction",e,t)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){var e=this.getStackTop(),t=e&&e.scope,n=t&&t.getSession();n&&function(e){let t={};"ok"===e.status&&(t={status:"exited"}),ts(e,t)}(n),this._sendSessionUpdate(),t&&t.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:r,environment:i}=n&&n.getOptions()||{};var o=mo();const{userAgent:a}=o.navigator||{};var s=es({release:r,environment:i,...t&&{user:t.getUser()},...a&&{userAgent:a},...e});if(t){var l=t.getSession&&t.getSession();l&&"ok"===l.status&&ts(l,{status:"exited"}),this.endSession(),t.setSession(s)}return s}shouldSendDefaultPii(){var e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop();if(e){var n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}}_withClient(e){const{scope:t,client:n}=this.getStackTop();n&&e(n,t)}_callExtensionMethod(e,...t){var n=ss().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[e])return n.extensions[e].apply(this,t);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function ss(){var e=mo();return e.__SENTRY__=e.__SENTRY__||{extensions:{},hub:void 0},e}function ls(e){var t=ss(),n=hs(t);return ds(t,e),n}function cs(){var e=ss();return(!us(e)||hs(e).isOlderThan(4))&&ds(e,new as),Ia()?function(e){try{var t=ss().__SENTRY__,n=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!n)return hs(e);if(!us(n)||hs(n).isOlderThan(4)){var r=hs(e).getStackTop();ds(n,new as(r.client,ns.clone(r.scope)))}return hs(n)}catch{return hs(e)}}(e):hs(e)}function us(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function hs(e){return vo("hub",()=>new as,e)}function ds(e,t){return!!e&&((e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0)}function fs(e,t){return function(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}({sentry_key:e.publicKey,sentry_version:"7",...t&&{sentry_client:`${t.name}/${t.version}`}})}function ps(e,t={}){var n="string"==typeof t?t:t.tunnel,r="string"!=typeof t&&t._metadata?t._metadata.sdk:void 0;return n||`${function(e){return`${function(e){var t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/`}(e)}?${fs(e,r)}`}function gs(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function ms(e,t,n,r){var i=gs(n),o=e.type||"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,n&&n.sdk);var a=function(e,t,n,r){var i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&{dsn:Fo(r)},..."transaction"===e.type&&i&&{trace:Jo({...i})}}}(e,i,r,t);return delete e.sdkProcessingMetadata,Ya(a,[[{type:o},e]])}var vs=[];function bs(e){var t=e.defaultIntegrations||[],n=e.integrations;let r;t.forEach(e=>{e.isDefaultInstance=!0}),r=Array.isArray(n)?[...t,...n]:"function"==typeof n?Ta(n(t)):t;var i=function(e){var t={};return e.forEach(e=>{const{name:n}=e;var r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}(r),o=i.findIndex(e=>"Debug"===e.name);if(-1!==o){const[e]=i.splice(o,1);i.push(e)}return i}var ys="Not capturing exception because it's already been captured.";class ws{__init(){this._integrations={}}__init2(){this._integrationsInitialized=!1}__init3(){this._numProcessing=0}__init4(){this._outcomes={}}constructor(e){if(ws.prototype.__init.call(this),ws.prototype.__init2.call(this),ws.prototype.__init3.call(this),ws.prototype.__init4.call(this),this._options=e,e.dsn){this._dsn=Ro(e.dsn);var t=ps(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn("No DSN provided, client will not do anything.")}captureException(e,t,n){if(ka(e))return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.log(ys));let r=t&&t.event_id;return this._process(this.eventFromException(e,t).then(e=>this._captureEvent(e,t,n)).then(e=>{r=e})),r}captureMessage(e,t,n,r){let i=n&&n.event_id;var o=So(e)?this.eventFromMessage(String(e),t,n):this.eventFromException(e,n);return this._process(o.then(e=>this._captureEvent(e,n,r)).then(e=>{i=e})),i}captureEvent(e,t,n){if(t&&t.originalException&&ka(t.originalException))return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.log(ys));let r=t&&t.event_id;return this._process(this._captureEvent(e,t,n).then(e=>{r=e})),r}captureSession(e){this._isEnabled()?"string"!=typeof e.release?(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),ts(e,{init:!1})):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn("SDK not enabled, will not capture session.")}getDsn(){return this._dsn}getOptions(){return this._options}getTransport(){return this._transport}flush(e){var t=this._transport;return t?this._isClientDoneProcessing(e).then(n=>t.flush(e).then(e=>n&&e)):Fa(!0)}close(e){return this.flush(e).then(e=>(this.getOptions().enabled=!1,e))}setupIntegrations(){var e,t;this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=(e=this._options.integrations,t={},e.forEach(e=>{t[e.name]=e,-1===vs.indexOf(e.name)&&(e.setupOnce(is,cs),vs.push(e.name),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.log(`Integration installed: ${e.name}`))}),t),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}sendEvent(e,t={}){if(this._dsn){let r=ms(e,this._dsn,this._options._metadata,this._options.tunnel);for(var n of t.attachments||[])r=$a(r,qa(n,this._options.transportOptions&&this._options.transportOptions.textEncoder));this._sendEnvelope(r)}}sendSession(e){if(this._dsn){var t=function(e,t,n,r){var i=gs(n);return Ya({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&{dsn:Fo(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}}recordDroppedEvent(e,t){if(this._options.sendClientReports){var n=`${e}:${t}`;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.log(`Adding outcome: "${n}"`),this._outcomes[n]=this._outcomes[n]+1||1}}_updateSessionFromEvent(e,t){let n=!1,r=!1;var i=t.exception&&t.exception.values;if(i)for(var o of(r=!0,i)){var a=o.mechanism;if(a&&!1===a.handled){n=!0;break}}var s="ok"===e.status;(s&&0===e.errors||s&&n)&&(ts(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new Ra(t=>{let n=0;var r=setInterval(()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._dsn}_prepareEvent(e,t,n){const{normalizeDepth:r=3,normalizeMaxBreadth:i=1e3}=this.getOptions();var o={...e,event_id:e.event_id||t.event_id||xa(),timestamp:e.timestamp||Ha()};this._applyClientOptions(o),this._applyIntegrationsMetadata(o);let a=n;t.captureContext&&(a=ns.clone(a).update(t.captureContext));let s=Fa(o);if(a){var l=[...t.attachments||[],...a.getAttachments()];l.length&&(t.attachments=l),s=a.applyToEvent(o,t)}return s.then(e=>"number"==typeof r&&r>0?this._normalizeEvent(e,r,i):e)}_normalizeEvent(e,t,n){if(!e)return null;var r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:Oa(e.data,t,n)}}))},...e.user&&{user:Oa(e.user,t,n)},...e.contexts&&{contexts:Oa(e.contexts,t,n)},...e.extra&&{extra:Oa(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Oa(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>(e.data&&(e.data=Oa(e.data,t,n)),e))),r}_applyClientOptions(e){var t=this.getOptions();const{environment:n,release:r,dist:i,maxValueLength:o=250}=t;"environment"in e||(e.environment="environment"in t?n:"production"),void 0===e.release&&void 0!==r&&(e.release=r),void 0===e.dist&&void 0!==i&&(e.dist=i),e.message&&(e.message=Vo(e.message,o));var a=e.exception&&e.exception.values&&e.exception.values[0];a&&a.value&&(a.value=Vo(a.value,o));var s=e.request;s&&s.url&&(s.url=Vo(s.url,o))}_applyIntegrationsMetadata(e){var t=Object.keys(this._integrations);t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(e=>e.event_id,e=>{if(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__){var t=e;"log"===t.logLevel?Bo.log(t.message):Bo.warn(t)}})}_processEvent(e,t,n){const{beforeSend:r,sampleRate:i}=this.getOptions();if(!this._isEnabled())return ja(new Po("SDK not enabled, will not capture event.","log"));var o="transaction"===e.type;return!o&&"number"==typeof i&&Math.random()>i?(this.recordDroppedEvent("sample_rate","error"),ja(new Po(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"))):this._prepareEvent(e,t,n).then(n=>{if(null===n)throw this.recordDroppedEvent("event_processor",e.type||"error"),new Po("An event processor returned null, will not send event.","log");return t.data&&!0===t.data.__sentry__||o||!r?n:function(e){var t="`beforeSend` method has to return `null` or a valid event.";if(To(e))return e.then(e=>{if(!Ao(e)&&null!==e)throw new Po(t);return e},e=>{throw new Po(`beforeSend rejected with ${e}`)});if(!Ao(e)&&null!==e)throw new Po(t);return e}(r(n,t))}).then(r=>{if(null===r)throw this.recordDroppedEvent("before_send",e.type||"error"),new Po("`beforeSend` returned `null`, will not send event.","log");var i=n&&n.getSession();!o&&i&&this._updateSessionFromEvent(i,r);var a=r.transaction_info;if(o&&a&&r.transaction!==e.transaction){var s="custom";r.transaction_info={...a,source:s,changes:[...a.changes,{source:s,timestamp:r.timestamp,propagations:a.propagations}]}}return this.sendEvent(r,t),r}).then(null,e=>{throw e instanceof Po?e:(this.captureException(e,{data:{__sentry__:!0},originalException:e}),new Po(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`))})}_process(e){this._numProcessing+=1,e.then(e=>(this._numProcessing-=1,e),e=>(this._numProcessing-=1,e))}_sendEnvelope(e){this._transport&&this._dsn?this._transport.send(e).then(null,e=>{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.error("Error while sending event:",e)}):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.error("Transport disabled")}_clearOutcomes(){var e=this._outcomes;return this._outcomes={},Object.keys(e).map(t=>{const[n,r]=t.split(":");return{reason:n,category:r,quantity:e[t]}})}}function xs(e,t,n=Da(e.bufferSize||30)){let r={};return{send:function(i){var o=[];if(Ga(i,(t,n)=>{var i=Ja(n);!function(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,i)?o.push(t):e.recordDroppedEvent("ratelimit_backoff",i)}),0===o.length)return Fa();var a=Ya(i[0],o),s=t=>{Ga(a,(n,r)=>{e.recordDroppedEvent(t,Ja(r))})};return n.add(()=>t({body:Ka(a,e.textEncoder)}).then(e=>{void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=Qa(r,e)},e=>{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.error("Failed while sending event:",e),s("network_error")})).then(e=>e,e=>{if(e instanceof Po)return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.error("Skipped sending event because buffer is full."),s("queue_overflow"),Fa();throw e})},flush:e=>n.drain(e)}}var _s="7.14.0";let Cs;class Ss{constructor(){Ss.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=Ss.id}setupOnce(){Cs=Function.prototype.toString,Function.prototype.toString=function(...e){var t=Go(this)||this;return Cs.apply(t,e)}}}Ss.__initStatic();var As=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/];class ks{static __initStatic(){this.id="InboundFilters"}__init(){this.name=ks.id}constructor(e={}){this._options=e,ks.prototype.__init.call(this)}setupOnce(e,t){var n=e=>{var n=t();if(n){var r=n.getIntegration(ks);if(r){var i=n.getClient(),o=i?i.getOptions():{},a=function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...As],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(r._options,o);return function(e,t){return t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch{}return!1}(e)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${Ca(e)}`),!0):function(e,t){return!(!t||!t.length)&&function(e){if(e.message)return[e.message];if(e.exception)try{const{type:t="",value:n=""}=e.exception.values&&e.exception.values[0]||{};return[`${n}`,`${t}: ${n}`]}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.error(`Cannot extract message for event ${Ca(e)}`),[]}return[]}(e).some(e=>t.some(t=>Ho(e,t)))}(e,t.ignoreErrors)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${Ca(e)}`),!0):function(e,t){if(!t||!t.length)return!1;var n=Ts(e);return!!n&&t.some(e=>Ho(n,e))}(e,t.denyUrls)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${Ca(e)}.\nUrl: ${Ts(e)}`),!0):!function(e,t){if(!t||!t.length)return!0;var n=Ts(e);return!n||t.some(e=>Ho(n,e))}(e,t.allowUrls)&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${Ca(e)}.\nUrl: ${Ts(e)}`),!0)}(e,a)?null:e}}return e};n.id=this.name,e(n)}}function Ts(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?function(e=[]){for(let n=e.length-1;n>=0;n--){var t=e[n];if(t&&"<anonymous>"!==t.filename&&"[native code]"!==t.filename)return t.filename||null}return null}(t):null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.error(`Cannot extract url for event ${Ca(e)}`),null}}function Is(e,t){var n=Es(e,t),r={type:t&&t.name,value:Ms(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Os(e,t){return{exception:{values:[Is(e,t)]}}}function Es(e,t){var n=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"==typeof e.framesToPop)return e.framesToPop;if(Ps.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch{}return[]}ks.__initStatic();var Ps=/Minified React error #\d+;/i;function Ms(e){var t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function Fs(e,t,n,r,i){let o;if(xo(t)&&t.error)return Os(e,t.error);if(_o(t)||function(e){return wo(e,"DOMException")}(t)){var a=t;if("stack"in t)o=Os(e,t);else{var s=a.name||(_o(a)?"DOMError":"DOMException"),l=a.message?`${s}: ${a.message}`:s;o=js(e,l,n,r),Sa(o,l)}return"code"in a&&(o.tags={...o.tags,"DOMException.code":`${a.code}`}),o}return yo(t)?Os(e,t):Ao(t)||ko(t)?(o=function(e,t,n,r){var i=cs().getClient(),o=i&&i.getOptions().normalizeDepth,a={exception:{values:[{type:ko(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${Zo(t)}`}]},extra:{__serialized__:Ea(t,o)}};if(n){var s=Es(e,n);s.length&&(a.exception.values[0].stacktrace={frames:s})}return a}(e,t,n,i),Aa(o,{synthetic:!0}),o):(o=js(e,t,n,r),Sa(o,`${t}`),Aa(o,{synthetic:!0}),o)}function js(e,t,n,r){var i={message:t};if(r&&n){var o=Es(e,n);o.length&&(i.exception={values:[{value:t,stacktrace:{frames:o}}]})}return i}var Rs="Breadcrumbs";class Ds{static __initStatic(){this.id=Rs}__init(){this.name=Ds.id}constructor(e){Ds.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){this.options.console&&ua("console",Ls),this.options.dom&&ua("dom",function(e){function t(t){let n,r="object"==typeof e?e.serializeAttribute:void 0;"string"==typeof r&&(r=[r]);try{n=t.event.target?Oo(t.event.target,r):Oo(t.event,r)}catch{n="<unknown>"}0!==n.length&&cs().addBreadcrumb({category:`ui.${t.name}`,message:n},{event:t.event,name:t.name,global:t.global})}return t}(this.options.dom)),this.options.xhr&&ua("xhr",Ns),this.options.fetch&&ua("fetch",zs),this.options.history&&ua("history",Bs)}}function Ls(e){var t={category:"console",data:{arguments:e.args,logger:"console"},level:za(e.level),message:Uo(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;t.message=`Assertion failed: ${Uo(e.args.slice(1)," ")||"console.assert"}`,t.data.arguments=e.args.slice(1)}cs().addBreadcrumb(t,{input:e.args,level:e.level})}function Ns(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;const{method:t,url:n,status_code:r,body:i}=e.xhr.__sentry_xhr__||{};return void cs().addBreadcrumb({category:"xhr",data:{method:t,url:n,status_code:r},type:"http"},{xhr:e.xhr,input:i})}}function zs(e){!e.endTimestamp||e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?cs().addBreadcrumb({category:"fetch",data:e.fetchData,level:"error",type:"http"},{data:e.error,input:e.args}):cs().addBreadcrumb({category:"fetch",data:{...e.fetchData,status_code:e.response.status},type:"http"},{input:e.args,response:e.response}))}function Bs(e){var t=mo();let n=e.from,r=e.to;var i=La(t.location.href);let o=La(n);var a=La(r);o.path||(o=i),i.protocol===a.protocol&&i.host===a.host&&(r=a.relative),i.protocol===o.protocol&&i.host===o.host&&(n=o.relative),cs().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}Ds.__initStatic();var Vs=mo();class Us extends ws{constructor(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:_s}],version:_s},super(e),e.sendClientReports&&Vs.document&&Vs.document.addEventListener("visibilitychange",()=>{"hidden"===Vs.document.visibilityState&&this._flushOutcomes()})}eventFromException(e,t){return function(e,t,n,r){var i=Fs(e,t,n&&n.syntheticException||void 0,r);return Aa(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Fa(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,i){var o=js(e,t,r&&r.syntheticException||void 0,i);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Fa(o)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}sendEvent(e,t){var n=this.getIntegrationById(Rs);n&&n.options&&n.options.sentry&&cs().addBreadcrumb({category:"sentry."+("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:Ca(e)},{event:e}),super.sendEvent(e,t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){var e=this._clearOutcomes();if(0!==e.length)if(this._dsn){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.log("Sending outcomes:",e);var t=ps(this._dsn,this._options),n=function(e,t){return Ya(t?{dsn:t}:{},[[{type:"client_report"},{timestamp:Ha(),discarded_events:e}]])}(e,this._options.tunnel&&Fo(this._dsn));try{var r=mo();if("[object Navigator]"===Object.prototype.toString.call(r&&r.navigator)&&"function"==typeof r.navigator.sendBeacon&&!this._options.transportOptions)r.navigator.sendBeacon.bind(r.navigator)(t,Ka(n));else this._sendEnvelope(n)}catch(e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.error(e)}}else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.log("No dsn provided, will not send outcomes");else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.log("No outcomes to send")}}var Hs=mo();let Ws;function Ys(e,t=function(){if(Ws)return Ws;if(oa(Hs.fetch))return Ws=Hs.fetch.bind(Hs);var e=Hs.document;let t=Hs.fetch;if(e&&"function"==typeof e.createElement)try{var n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);var r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return Ws=t.bind(Hs)}()){return xs(e,function(n){var r={body:n.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n.body.length<=65536,...e.fetchOptions};return t(e.url,r).then(e=>({statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}}))})}function $s(e){return xs(e,function(t){return new Ra((n,r)=>{var i=new XMLHttpRequest;for(var o in i.onerror=r,i.onreadystatechange=()=>{4===i.readyState&&n({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",e.url),e.headers)Object.prototype.hasOwnProperty.call(e.headers,o)&&i.setRequestHeader(o,e.headers[o]);i.send(t.body)})})}var Gs="?";function Xs(e,t,n,r){var i={filename:e,function:t,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}var Ks=/^\s*at (?:(.*\).*?|.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,qs=/\((\S*)(?::(\d+))(?::(\d+))\)/,Zs=[30,e=>{var t=Ks.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){var n=qs.exec(t[2]);n&&(t[2]=n[1],t[3]=n[2],t[4]=n[3])}const[e,r]=il(t[1]||Gs,t[2]);return Xs(r,e,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],Js=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|safari-extension|safari-web-extension|capacitor)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Qs=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,el=[50,e=>{var t=Js.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){var n=Qs.exec(t[3]);n&&(t[1]=t[1]||"eval",t[3]=n[1],t[4]=n[2],t[5]="")}let e=t[3],r=t[1]||Gs;return[r,e]=il(r,e),Xs(e,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],tl=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,nl=[40,e=>{var t=tl.exec(e);return t?Xs(t[2],t[1]||Gs,+t[3],t[4]?+t[4]:void 0):void 0}],rl=ea(...[Zs,el,nl]),il=(e,t)=>{var n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:Gs,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};let ol=0;function al(){return ol>0}function sl(e,t={},n){if("function"!=typeof e)return e;try{var r=e.__sentry_wrapped__;if(r)return r;if(Go(e))return e}catch{return e}var i=function(){var r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);var i=r.map(e=>sl(e,t));return e.apply(this,i)}catch(e){throw ol+=1,setTimeout(()=>{ol-=1}),function(e){cs().withScope(e)}(n=>{n.addEventProcessor(e=>(t.mechanism&&(Sa(e,void 0),Aa(e,t.mechanism)),e.extra={...e.extra,arguments:r},e)),function(e,t){cs().captureException(e,{captureContext:t})}(e)}),e}};try{for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(i[o]=e[o])}catch{}$o(i,e),Yo(e,"__sentry_wrapped__",i);try{Object.getOwnPropertyDescriptor(i,"name").configurable&&Object.defineProperty(i,"name",{get:()=>e.name})}catch{}return i}class ll{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=ll.id}__init2(){this._installFunc={onerror:cl,onunhandledrejection:ul}}constructor(e){ll.prototype.__init.call(this),ll.prototype.__init2.call(this),this._options={onerror:!0,onunhandledrejection:!0,...e}}setupOnce(){Error.stackTraceLimit=50;var e=this._options;for(var t in e){var n=this._installFunc[t];n&&e[t]&&(dl(t),n(),this._installFunc[t]=void 0)}}}function cl(){ua("error",e=>{const[t,n,r]=pl();if(!t.getIntegration(ll))return;const{msg:i,url:o,line:a,column:s,error:l}=e;if(!(al()||l&&l.__sentry_own_request__)){var c=void 0===l&&Co(i)?function(e,t,n,r){var i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let o=xo(e)?e.message:e,a="Error";var s=o.match(i);s&&(a=s[1],o=s[2]);var l={exception:{values:[{type:a,value:o}]}};return hl(l,t,n,r)}(i,o,a,s):hl(Fs(n,l||i,void 0,r,!1),o,a,s);c.level="error",fl(t,l,c,"onerror")}})}function ul(){ua("unhandledrejection",e=>{const[t,n,r]=pl();if(!t.getIntegration(ll))return;let i=e;try{"reason"in e?i=e.reason:"detail"in e&&"reason"in e.detail&&(i=e.detail.reason)}catch{}if(al()||i&&i.__sentry_own_request__)return!0;var o=So(i)?function(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}(i):Fs(n,i,void 0,r,!0);o.level="error",fl(t,i,o,"onunhandledrejection")})}function hl(e,t,n,r){var i=e.exception=e.exception||{},o=i.values=i.values||[],a=o[0]=o[0]||{},s=a.stacktrace=a.stacktrace||{},l=s.frames=s.frames||[],c=isNaN(parseInt(r,10))?void 0:r,u=isNaN(parseInt(n,10))?void 0:n,h=Co(t)&&t.length>0?t:function(){var e=mo();try{return e.document.location.href}catch{return""}}();return 0===l.length&&l.push({colno:c,filename:h,function:"?",in_app:!0,lineno:u}),e}function dl(e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.log(`Global Handler attached: ${e}`)}function fl(e,t,n,r){Aa(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function pl(){var e=cs(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}ll.__initStatic();var gl=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class ml{static __initStatic(){this.id="TryCatch"}__init(){this.name=ml.id}constructor(e){ml.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){var e=mo();this._options.setTimeout&&Wo(e,"setTimeout",vl),this._options.setInterval&&Wo(e,"setInterval",vl),this._options.requestAnimationFrame&&Wo(e,"requestAnimationFrame",bl),this._options.XMLHttpRequest&&"XMLHttpRequest"in e&&Wo(XMLHttpRequest.prototype,"send",yl);var t=this._options.eventTarget;t&&(Array.isArray(t)?t:gl).forEach(wl)}}function vl(e){return function(...t){var n=t[0];return t[0]=sl(n,{mechanism:{data:{function:ra(e)},handled:!0,type:"instrument"}}),e.apply(this,t)}}function bl(e){return function(t){return e.apply(this,[sl(t,{mechanism:{data:{function:"requestAnimationFrame",handler:ra(e)},handled:!0,type:"instrument"}})])}}function yl(e){return function(...t){var n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&Wo(n,e,function(t){var n={mechanism:{data:{function:e,handler:ra(t)},handled:!0,type:"instrument"}},r=Go(t);return r&&(n.mechanism.data.handler=ra(r)),sl(t,n)})}),e.apply(this,t)}}function wl(e){var t=mo(),n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Wo(n,"addEventListener",function(t){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=sl(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:ra(r),target:e},handled:!0,type:"instrument"}}))}catch{}return t.apply(this,[n,sl(r,{mechanism:{data:{function:"addEventListener",handler:ra(r),target:e},handled:!0,type:"instrument"}}),i])}}),Wo(n,"removeEventListener",function(e){return function(t,n,r){var i=n;try{var o=i&&i.__sentry_wrapped__;o&&e.call(this,t,o,r)}catch{}return e.call(this,t,i,r)}}))}ml.__initStatic();class xl{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=xl.id}constructor(e={}){xl.prototype.__init.call(this),this._key=e.key||"cause",this._limit=e.limit||5}setupOnce(){var e=cs().getClient();!e||is((t,n)=>{var r=cs().getIntegration(xl);return r?function(e,t,n,r,i){if(!(r.exception&&r.exception.values&&i&&Io(i.originalException,Error)))return r;var o=_l(e,n,i.originalException,t);return r.exception.values=[...o,...r.exception.values],r}(e.getOptions().stackParser,r._key,r._limit,t,n):t})}}function _l(e,t,n,r,i=[]){if(!Io(n[r],Error)||i.length+1>=t)return i;var o=Is(e,n[r]);return _l(e,t,n[r],r,[o,...i])}xl.__initStatic();var Cl=mo();class Sl{constructor(){Sl.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=Sl.id}setupOnce(){is(e=>{if(cs().getIntegration(Sl)){if(!Cl.navigator&&!Cl.location&&!Cl.document)return e;var t=e.request&&e.request.url||Cl.location&&Cl.location.href;const{referrer:r}=Cl.document||{},{userAgent:i}=Cl.navigator||{};var n={...t&&{url:t},headers:{...e.request&&e.request.headers,...r&&{Referer:r},...i&&{"User-Agent":i}}};return{...e,request:n}}return e})}}Sl.__initStatic();class Al{constructor(){Al.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=Al.id}setupOnce(e,t){var n=e=>{var n=t().getIntegration(Al);if(n){try{if(function(e,t){return!!t&&!(!function(e,t){var n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Tl(e,t)||!kl(e,t))}(e,t)&&!function(e,t){var n=Il(t),r=Il(e);return!!(n&&r&&n.type===r.type&&n.value===r.value&&Tl(e,t)&&kl(e,t))}(e,t))}(e,n._previousEvent))return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{return n._previousEvent=e}return n._previousEvent=e}return e};n.id=this.name,e(n)}}function kl(e,t){let n=Ol(e),r=Ol(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let e=0;e<r.length;e++){var i=r[e],o=n[e];if(i.filename!==o.filename||i.lineno!==o.lineno||i.colno!==o.colno||i.function!==o.function)return!1}return!0}function Tl(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return n.join("")===r.join("")}catch{return!1}}function Il(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Ol(e){var t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}Al.__initStatic();var El=[new ks,new Ss,new ml,new Ds,new ll,new xl,new Al,new Sl];function Pl(e={}){if(void 0===e.defaultIntegrations&&(e.defaultIntegrations=El),void 0===e.release){var t=mo();t.SENTRY_RELEASE&&t.SENTRY_RELEASE.id&&(e.release=t.SENTRY_RELEASE.id)}void 0===e.autoSessionTracking&&(e.autoSessionTracking=!0),void 0===e.sendClientReports&&(e.sendClientReports=!0);var n={...e,stackParser:ta(e.stackParser||rl),integrations:bs(e),transport:e.transport||(ia()?Ys:$s)};(function(e,t){!0===t.debug&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?Bo.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));var n=cs(),r=n.getScope();r&&r.update(t.initialScope);var i=new e(t);n.bindClient(i)})(Us,n),e.autoSessionTracking&&function(){var e=mo(),t=e.document;if(typeof t>"u")return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bo.warn("Session tracking in non-browser environment with @sentry/browser is not supported."));var n=cs();!n.captureSession||(Ml(n),ua("history",({from:e,to:t})=>{void 0===e||e===t||Ml(cs())}))}()}function Ml(e){e.startSession({ignoreDuration:!0}),e.captureSession()}var Fl={exports:{}},jl={},Rl=i,Dl=Symbol.for("react.element"),Ll=Symbol.for("react.fragment"),Nl=Object.prototype.hasOwnProperty,zl=Rl.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Bl={key:!0,ref:!0,__self:!0,__source:!0};
10
10
  /**
11
11
  * @license React
12
12
  * react-jsx-runtime.production.min.js
@@ -77,7 +77,7 @@ var t,n,r,i,o,a,s=s||{version:"5.2.4"};if(e.fabric=s,typeof document<"u"&&typeof
77
77
  *
78
78
  * @license MIT
79
79
  */
80
- function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&(i[n]=e[n]);return i}(e,RI),d=function(e,t){let{relative:n}=void 0===t?{}:t;OI()||wI();let{basename:i,navigator:o}=r.useContext(kI),{hash:a,pathname:s,search:l}=MI(e,{relative:n}),c=s;return"/"!==i&&(c="/"===s?i:CI([i,s])),o.createHref({pathname:c,search:l,hash:a})}(c,{relative:i}),f=function(e,t){let{target:n,replace:i,state:o,preventScrollReset:a,relative:s}=void 0===t?{}:t,l=function(){OI()||wI();let{basename:e,navigator:t}=r.useContext(kI),{matches:n}=r.useContext(II),{pathname:i}=EI(),o=JSON.stringify(PI(n).map(e=>e.pathnameBase)),a=r.useRef(!1);return r.useEffect(()=>{a.current=!0}),r.useCallback(function(n,r){if(void 0===r&&(r={}),!a.current)return;if("number"==typeof n)return void t.go(n);let s=_I(n,JSON.parse(o),i,"path"===r.relative);"/"!==e&&(s.pathname="/"===s.pathname?e:CI([e,s.pathname])),(r.replace?t.replace:t.push)(s,r.state,r)},[e,t,o,i])}(),c=EI(),u=MI(e,{relative:s});return r.useCallback(t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==i?i:bI(c)===bI(u);l(e,{replace:n,state:o,preventScrollReset:a,relative:s})}},[c,l,u,i,o,n,e,a,s])}(c,{replace:a,state:s,target:l,preventScrollReset:u,relative:i});return Hl("a",{...h,href:d,onClick:o?n:function(e){n&&n(e),e.defaultPrevented||f(e)},ref:t,target:l})});const LI=oc(Hl("path",{d:"M11 15h2v2h-2v-2zm0-8h2v6h-2V7zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutlineOutlined"),NI=oc(Hl("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm4.59-12.42L10 14.17l-2.59-2.58L6 13l4 4 8-8z"}),"CheckCircleOutlined");function zI(){const e=_d(e=>e.toasts);return Hl("div",{className:"relative pointer-events-none",children:Hl(tb,{initial:!1,children:e.map(e=>Hl("div",{"data-toast":!0,className:nc("fixed mx-auto p-20 z-toast","bottom-center"===e.position?"left-0 right-0 bottom-0":"right-0 bottom-0"),children:Wl(Xv.div,{initial:{opacity:0,y:50,scale:.3},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.5,transition:{duration:.2}},className:nc("flex items-center gap-10 min-w-288 max-w-500 shadow-lg w-min rounded-lg pl-16 pr-6 py-6 text-sm pointer-events-auto max-h-100 bg-paper text-main bg-paper border mx-auto"),onPointerEnter:()=>{var t;return null==(t=e.timer)?void 0:t.pause()},onPointerLeave:()=>{var t;return null==(t=e.timer)?void 0:t.resume()},role:"alert","aria-live":"danger"===e.type?"assertive":"polite",children:["danger"===e.type&&Hl(LI,{className:"text-danger flex-shrink-0",size:"md"}),"positive"===e.type&&Hl(NI,{className:"text-positive flex-shrink-0",size:"md"}),Hl("div",{className:"overflow-hidden overflow-ellipsis w-max mr-auto",children:Hl(__,{value:e.message})}),e.action&&Hl(Ky,{variant:"text",color:"primary",size:"sm",className:"flex-shrink-0",onFocus:()=>{var t;return null==(t=e.timer)?void 0:t.pause()},onBlur:()=>{var t;return null==(t=e.timer)?void 0:t.resume()},onClick:()=>Cd().remove(e.id),elementType:DI,to:e.action.action,children:Hl(__,{value:e.action.label})}),Hl(w_,{onFocus:()=>{var t;return null==(t=e.timer)?void 0:t.pause()},onBlur:()=>{var t;return null==(t=e.timer)?void 0:t.resume()},type:"button",className:"flex-shrink-0",onClick:()=>{Cd().remove(e.id)},size:"sm",children:Hl(R_,{})})]})},e.id))})})}function BI(e){switch(e.key){case"z":(function(e){return Sb()?e.metaKey:e.ctrlKey})(e)&&(e.preventDefault(),e.stopPropagation(),e.shiftKey?hd().history.redo():hd().history.undo());break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),hd().objects.move("up");break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),hd().objects.move("right");break;case"ArrowDown":e.preventDefault(),e.stopPropagation(),hd().objects.move("down");break;case"ArrowLeft":e.preventDefault(),e.stopPropagation(),hd().objects.move("left");break;case"Delete":e.preventDefault(),e.stopPropagation(),hd().objects.delete()}}const VI=new Map,UI=new Map,HI={};async function*WI(e){const t=e.createReader();let n;do{n=await new Promise((e,n)=>{t.readEntries(e,n)});for(const e of n)if(e.isFile){if(".DS_Store"===e.name)continue;const t=await YI(e);yield new Cy(t,e.fullPath)}else e.isDirectory&&(yield*WI(e))}while(n.length>0)}function YI(e){return new Promise((t,n)=>e.file(t,n))}function $I(e){return null!=HI.dragTargetId?VI.get(HI.dragTargetId):e.dataTransfer.types.includes("Files")?{type:"nativeFile",el:null,ref:null,getData:()=>async function(e){const t=[];for await(const n of e)t.push(n);return t}(async function*(e){for(const t of e.items)if("file"===t.kind)if("function"==typeof t.webkitGetAsEntry){const e=t.webkitGetAsEntry();if(!e)continue;if(e.isFile){if(".DS_Store"===e.name)continue;yield new Cy(t.getAsFile(),e.fullPath)}else e.isDirectory&&(yield*WI(e))}else{const e=t.getAsFile();if(!e||".DS_Store"===e.name)continue;yield new Cy(e,t.fullPath)}}(e.dataTransfer))}:void 0}function GI({children:e}){const t=cd(e=>e.bootstrapData),n=h(()=>({data:t,setBootstrapData:()=>{},mergeBootstrapData:()=>{},invalidateBootstrapData:()=>{}}),[t]);return Hl(o_.Provider,{value:n,children:e})}function XI(){var e,t,n,r;const i=null==(e=cd(e=>{var t;return null==(t=e.config.ui)?void 0:t.visible}))||e,o=null!=(t=cd(e=>{var t,n;return null==(n=null==(t=e.config.ui)?void 0:t.nav)?void 0:n.position}))?t:"bottom",s=null!=(n=cd(e=>{var t,n;return null==(n=null==(t=e.config.ui)?void 0:t.menubar)?void 0:n.position}))?n:"top",l=null==(r=cd(e=>{var t;return null==(t=e.config.ui)?void 0:t.allowEditorClose}))||r,h=u(null),d=u(null),{isModal:f,isMobile:p}=D_(),g=c(async e=>{var t,n,r;if(ud().activeTool||ud().dirty||"nativeFile"!==e.type)return;const i=await e.getData();!hd().import.fileIsValid(i[0])||(null!=(r=null==(n=null==(t=ud().config.tools)?void 0:t.import)?void 0:n.openDroppedImageAsBackground)&&r?await hd().import.openBackgroundImage(i[0]):await hd().import.openUploadedFile(i[0]))},[]),{droppableProps:m}=function({id:e,disabled:t,ref:n,...r}){const i=u({dragOverElements:new Set,dropActivateTimer:void 0}).current,o=u(r);o.current=r,_(()=>(UI.set(e,{...UI.get(e),disabled:t,id:e,ref:n}),()=>{UI.delete(e)}),[e,o,t,n]);const a=e=>{var t;const r=o.current;return!(!(null==e?void 0:e.type)||n.current===(null==(t=e.ref)?void 0:t.current)||!r.types.includes(e.type)||r.acceptsDrop&&!r.acceptsDrop(e))},s=e=>{var t,n;const r=$I(e);r&&(null==(n=(t=o.current).onDragLeave)||n.call(t,r))};return{droppableProps:t?{}:{onDragOver:e=>{e.preventDefault(),e.stopPropagation()},onDragEnter:e=>{var t,n;if(e.stopPropagation(),i.dragOverElements.add(e.target),i.dragOverElements.size>1)return;const r=$I(e);r&&a(r)&&(null==(n=(t=o.current).onDragEnter)||n.call(t,r),clearTimeout(i.dropActivateTimer),"function"==typeof o.current.onDropActivate&&(i.dropActivateTimer=setTimeout(()=>{var e,t;r&&(null==(t=(e=o.current).onDropActivate)||t.call(e,r))},400)))},onDragLeave:e=>{e.stopPropagation(),i.dragOverElements.delete(e.target);for(const t of i.dragOverElements)e.currentTarget.contains(t)||i.dragOverElements.delete(t);if(i.dragOverElements.size>0)return;const t=$I(e);t&&a(t)&&(s(e),clearTimeout(i.dropActivateTimer))},onDrop:async e=>{var t,n,r,l;e.preventDefault(),e.stopPropagation(),i.dragOverElements.clear(),s(e),clearTimeout(i.dropActivateTimer);const c=$I(e);c&&(null==(n=(t=o.current).onDragLeave)||n.call(t,c),a(c)&&(null==(l=(r=o.current).onDrop)||l.call(r,c)))}}}}({id:"pixie-root",ref:d,types:["nativeFile"],onDrop:g});a(()=>{var e,t;ud().fabric||(cd.setState({canvasRef:h}),zy(h.current),null!=(e=ud().config.ui)&&e.defaultTool&&ud().setActiveTool(null==(t=ud().config.ui)?void 0:t.defaultTool,null),hd().canvas.loadInitialContent().then(()=>{var e,t;null==(t=(e=ud().config).onLoad)||t.call(e,ud().editor)}));const n=By(d,()=>{ud().setStageSize(Vy(d.current))}),r=By(h,()=>{ud().setCanvasSize(Vy(h.current))});return()=>{n(),r()}},[d]);const v=nc("pixie-root flex flex-col overflow-hidden bg-background text-main no-tap-highlight w-full h-full",{relative:!f,"fixed inset-0 w-full h-full z-20":f,"shadow-lg border rounded-md m-auto max-h-[calc(100vh-90px)] max-w-[calc(100vw-90px)]":f&&!p});return Hl(nb,{features:ib,strict:!0,children:Wl(GI,{children:[f&&i&&!p&&l&&Hl(w_,{className:"z-20 fixed right-2 top-2 text-white",size:"lg",onClick:()=>{ud().editor.close()},children:Hl(R_,{})}),f&&i&&Hl(n_,{position:"fixed",disableInitialTransition:!0}),Wl(Xv.div,{initial:!1,variants:{visible:{opacity:1,scale:1,display:"flex"},hidden:{opacity:0,transitionEnd:{display:"none"}}},animate:i?"visible":"hidden",className:v,children:["top"===s&&Hl(H_,{}),"top"===o&&Hl(qT,{className:"pt-14"}),Wl("main",{className:"relative flex-auto my-20 overflow-hidden outline-none",tabIndex:-1,...pb(m,{onKeyDownCapture:BI}),ref:d,children:[Hl(Y_,{}),Hl(_S,{ref:h})]}),Hl(Hk,{}),"bottom"===o&&Hl(qT,{}),"bottom"===s&&Hl(H_,{}),Hl(pI,{}),Hl(zI,{})]})]})})}fo.enableBoundaryChecking(!1);const KI=class{constructor(e){if(Yi(this,"tools",{}),Yi(this,"fabric",null),e.sentryDsn&&function(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.react",packages:[{name:"npm:@sentry/react",version:_s}],version:_s},Pl(e)}({dsn:e.sentryDsn}),function(e,t){void 0===t&&(t={});var n=t.insertAt;if(!(typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}('/*! tailwindcss v3.1.8 | MIT License | https://tailwindcss.com*/.pi *,.pi :after,.pi :before{border-color:rgb(var(--be-foreground-base)/var(--be-divider-opacity));border-style:solid;border-width:0;box-sizing:border-box}.pi :after,.pi :before{--tw-content:""}.pi hr{border-top-width:1px;color:inherit;height:0}.pi abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.pi h1,.pi h2,.pi h3,.pi h4,.pi h5,.pi h6{font-size:inherit;font-weight:inherit}.pi a{color:inherit;text-decoration:inherit}.pi b,.pi strong{font-weight:bolder}.pi code,.pi kbd,.pi pre,.pi samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}.pi small{font-size:80%}.pi sub,.pi sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.pi sub{bottom:-.25em}.pi sup{top:-.5em}.pi table{border-collapse:collapse;border-color:inherit;text-indent:0}.pi button,.pi input,.pi optgroup,.pi select,.pi textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}.pi button,.pi select{text-transform:none}.pi [type=button],.pi [type=reset],.pi [type=submit],.pi button{-webkit-appearance:button;background-color:transparent;background-image:none}.pi :-moz-focusring{outline:auto}.pi :-moz-ui-invalid{box-shadow:none}.pi progress{vertical-align:baseline}.pi ::-webkit-inner-spin-button,.pi ::-webkit-outer-spin-button{height:auto}.pi [type=search]{-webkit-appearance:textfield;outline-offset:-2px}.pi ::-webkit-search-decoration{-webkit-appearance:none}.pi ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.pi summary{display:list-item}.pi blockquote,.pi dd,.pi dl,.pi figure,.pi h1,.pi h2,.pi h3,.pi h4,.pi h5,.pi h6,.pi hr,.pi p,.pi pre{margin:0}.pi fieldset{margin:0;padding:0}.pi legend{padding:0}.pi menu,.pi ol,.pi ul{list-style:none;margin:0;padding:0}.pi textarea{resize:vertical}.pi input::-moz-placeholder,.pi textarea::-moz-placeholder{color:#9ca3af;opacity:1}.pi input::placeholder,.pi textarea::placeholder{color:#9ca3af;opacity:1}.pi [role=button],.pi button{cursor:pointer}.pi :disabled{cursor:default}.pi audio,.pi canvas,.pi embed,.pi iframe,.pi img,.pi object,.pi svg,.pi video{display:block;vertical-align:middle}.pi img,.pi video{height:auto;max-width:100%}.pi *,.pi :after,.pi :before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.pi ::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.pi .container{width:100%}.pi .\\!container{width:100%!important}@media (min-width:640px){.pi .container{max-width:640px}.pi .\\!container{max-width:640px!important}}@media (min-width:768px){.pi .container{max-width:768px}.pi .\\!container{max-width:768px!important}}@media (min-width:1024px){.pi .container{max-width:1024px}.pi .\\!container{max-width:1024px!important}}@media (min-width:1280px){.pi .container{max-width:1280px}.pi .\\!container{max-width:1280px!important}}@media (min-width:1536px){.pi .container{max-width:1536px}.pi .\\!container{max-width:1536px!important}}.pi .sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pi .pointer-events-none{pointer-events:none}.pi .pointer-events-auto{pointer-events:auto}.pi .visible{visibility:visible}.pi .\\!visible{visibility:visible!important}.pi .invisible{visibility:hidden}.pi .static{position:static}.pi .fixed{position:fixed}.pi .absolute{position:absolute}.pi .relative{position:relative}.pi .sticky{position:sticky}.pi .inset-0{bottom:0;top:0}.pi .inset-0,.pi .inset-x-0{left:0;right:0}.pi .right-2{right:2px}.pi .top-2{top:2px}.pi .top-0{top:0}.pi .left-0{left:0}.pi .left-16{left:16px}.pi .top-26{top:26px}.pi .-left-5{left:-5px}.pi .-top-5{top:-5px}.pi .bottom-0{bottom:0}.pi .-bottom-5{bottom:-5px}.pi .right-0{right:0}.pi .-right-5{right:-5px}.pi .bottom-20{bottom:20px}.pi .right-20{right:20px}.pi .top-24{top:24px}.pi .-bottom-14{bottom:-14px}.pi .left-30{left:30px}.pi .right-4{right:4px}.pi .top-1\\/2{top:50%}.pi .-bottom-20{bottom:-20px}.pi .left-1\\/2{left:50%}.pi .-bottom-10{bottom:-10px}.pi .-left-8{left:-8px}.pi .-left-80{left:-80px}.pi .-bottom-2{bottom:-2px}.pi .-right-2{right:-2px}.pi .isolate{isolation:isolate}.pi .z-20{z-index:20}.pi .z-modal{z-index:110}.pi .z-10{z-index:10}.pi .z-obj-box{z-index:20}.pi .z-navbar{z-index:40}.pi .z-tool-overlay{z-index:30}.pi .z-50,.pi .z-loading-indicator{z-index:50}.pi .z-popover{z-index:130}.pi .z-tray{z-index:120}.pi .z-toast{z-index:160}.pi .z-tooltip{z-index:150}.pi .z-cropzone{z-index:10}.pi .col-auto{grid-column:auto}.pi .m-auto{margin:auto}.pi .m-10{margin:10px}.pi .my-20{margin-bottom:20px;margin-top:20px}.pi .my-12{margin-bottom:12px;margin-top:12px}.pi .mx-auto{margin-left:auto;margin-right:auto}.pi .my-50{margin-bottom:50px;margin-top:50px}.pi .mx-14{margin-left:14px;margin-right:14px}.pi .my-30{margin-bottom:30px;margin-top:30px}.pi .my-24{margin-bottom:24px;margin-top:24px}.pi .my-80{margin-bottom:80px;margin-top:80px}.pi .my-32{margin-bottom:32px;margin-top:32px}.pi .my-40{margin-bottom:40px;margin-top:40px}.pi .my-8{margin-bottom:8px;margin-top:8px}.pi .my-10{margin-bottom:10px;margin-top:10px}.pi .my-100{margin-bottom:6.25rem;margin-top:6.25rem}.pi .mx-4{margin-left:4px;margin-right:4px}.pi .my-4{margin-bottom:4px;margin-top:4px}.pi .mx-8{margin-left:8px;margin-right:8px}.pi .mx-20{margin-left:20px;margin-right:20px}.pi .my-auto{margin-bottom:auto;margin-top:auto}.pi .mr-5{margin-right:5px}.pi .ml-auto{margin-left:auto}.pi .mr-20{margin-right:20px}.pi .mb-16{margin-bottom:16px}.pi .mr-10{margin-right:10px}.pi .mt-auto{margin-top:auto}.pi .mt-80{margin-top:80px}.pi .mt-30{margin-top:30px}.pi .mt-4{margin-top:4px}.pi .mb-30{margin-bottom:30px}.pi .mb-20{margin-bottom:20px}.pi .mr-auto{margin-right:auto}.pi .mr-24{margin-right:24px}.pi .mb-24{margin-bottom:24px}.pi .mb-14{margin-bottom:14px}.pi .mt-6{margin-top:6px}.pi .mt-12{margin-top:12px}.pi .mb-4{margin-bottom:4px}.pi .mt-14{margin-top:14px}.pi .ml-6{margin-left:6px}.pi .mr-14{margin-right:14px}.pi .mt-8{margin-top:8px}.pi .mb-10{margin-bottom:10px}.pi .mb-8{margin-bottom:8px}.pi .mt-20{margin-top:20px}.pi .mb-1{margin-bottom:1px}.pi .ml-10{margin-left:10px}.pi .mt-10{margin-top:10px}.pi .mt-2{margin-top:2px}.pi .mb-12{margin-bottom:12px}.pi .mb-40{margin-bottom:40px}.pi .mt-40{margin-top:40px}.pi .mb-32{margin-bottom:32px}.pi .mb-64{margin-bottom:64px}.pi .mt-32{margin-top:32px}.pi .mb-48{margin-bottom:48px}.pi .mt-50{margin-top:50px}.pi .mb-6{margin-bottom:6px}.pi .mt-60{margin-top:60px}.pi .-ml-1{margin-left:-1px}.pi .-ml-4{margin-left:-4px}.pi .mr-8{margin-right:8px}.pi .-mr-4{margin-right:-4px}.pi .ml-8{margin-left:8px}.pi .mt-16{margin-top:16px}.pi .mb-2{margin-bottom:2px}.pi .mt-24{margin-top:24px}.pi .-mt-2{margin-top:-2px}.pi .mt-36{margin-top:36px}.pi .mb-110{margin-bottom:110px}.pi .mt-18{margin-top:18px}.pi .mr-6{margin-right:6px}.pi .mr-16{margin-right:16px}.pi .ml-12{margin-left:12px}.pi .mr-4{margin-right:4px}.pi .mr-12{margin-right:12px}.pi .mr-2{margin-right:2px}.pi .mb-18{margin-bottom:18px}.pi .-ml-3{margin-left:-3px}.pi .-ml-12{margin-left:-12px}.pi .-ml-6{margin-left:-6px}.pi .box-content{box-sizing:content-box}.pi .block{display:block}.pi .inline-block{display:inline-block}.pi .inline{display:inline}.pi .flex{display:flex}.pi .inline-flex{display:inline-flex}.pi .table{display:table}.pi .table-cell{display:table-cell}.pi .table-row{display:table-row}.pi .grid{display:grid}.pi .\\!grid{display:grid!important}.pi .contents{display:contents}.pi .hidden{display:none}.pi .aspect-square{aspect-ratio:1/1}.pi .h-2\\/4{height:50%}.pi .h-full{height:100%}.pi .h-font{height:1em}.pi .h-1{height:1px}.pi .h-80{height:80px}.pi .h-400{height:25rem}.pi .h-50{height:50px}.pi .h-42{height:42px}.pi .h-54{height:3.375rem}.pi .h-8{height:8px}.pi .h-24{height:24px}.pi .h-36{height:36px}.pi .h-40{height:40px}.pi .h-20{height:20px}.pi .h-30{height:30px}.pi .h-84{height:84px}.pi .h-68{height:68px}.pi .h-32{height:32px}.pi .h-\\[54px\\]{height:54px}.pi .h-\\[186px\\]{height:186px}.pi .h-60{height:60px}.pi .h-18{height:18px}.pi .h-12{height:12px}.pi .h-26{height:26px}.pi .h-90{height:5.625rem}.pi .h-128{height:128px}.pi .h-6{height:6px}.pi .h-4{height:4px}.pi .h-48{height:48px}.pi .h-2{height:2px}.pi .h-16{height:16px}.pi .h-56{height:56px}.pi .h-64{height:64px}.pi .h-144{height:144px}.pi .h-100{height:6.25rem}.pi .h-max{height:-moz-max-content;height:max-content}.pi .h-px{height:1px}.pi .h-28{height:28px}.pi .h-92{height:92px}.pi .h-14{height:14px}.pi .h-38{height:2.375rem}.pi .h-22{height:22px}.pi .max-h-\\[calc\\(100vh-90px\\)\\]{max-height:calc(100vh - 90px)}.pi .max-h-\\[calc\\(100\\%-40px\\)\\]{max-height:calc(100% - 40px)}.pi .max-h-620{max-height:38.75rem}.pi .max-h-100{max-height:6.25rem}.pi .max-h-\\[36px\\]{max-height:36px}.pi .max-h-8{max-height:8px}.pi .max-h-tray{max-height:calc(var(--be-viewport-height, 100vh)*.9)}.pi .max-h-\\[calc\\(100\\%-30px\\)\\]{max-height:calc(100% - 30px)}.pi .max-h-40{max-height:40px}.pi .max-h-inherit{max-height:inherit}.pi .max-h-\\[583px\\]{max-height:583px}.pi .max-h-full{max-height:100%}.pi .max-h-26{max-height:26px}.pi .max-h-36{max-height:36px}.pi .max-h-dialog{max-height:calc(var(--be-viewport-height, 100vh)*.9)}.pi .max-h-240{max-height:240px}.pi .min-h-440{min-height:27.5rem}.pi .min-h-full{min-height:100%}.pi .min-h-\\[238px\\]{min-height:238px}.pi .min-h-86{min-height:86px}.pi .min-h-90{min-height:5.625rem}.pi .min-h-36{min-height:36px}.pi .min-h-42{min-height:42px}.pi .min-h-dialog{min-height:calc(var(--be-viewport-height, 100vh)*.9)}.pi .min-h-50{min-height:50px}.pi .min-h-\\[228px\\]{min-height:228px}.pi .min-h-30{min-height:30px}.pi .min-h-60{min-height:60px}.pi .w-max{width:-moz-max-content;width:max-content}.pi .w-full{width:100%}.pi .w-font{width:1em}.pi .w-80{width:80px}.pi .w-50{width:50px}.pi .w-8{width:8px}.pi .w-24{width:24px}.pi .w-36{width:36px}.pi .w-20{width:20px}.pi .w-30{width:30px}.pi .w-224{width:224px}.pi .w-68{width:68px}.pi .w-96{width:96px}.pi .w-144{width:144px}.pi .w-auto{width:auto}.pi .w-1{width:1px}.pi .w-240{width:240px}.pi .w-\\[168px\\]{width:168px}.pi .w-1\\/2{width:50%}.pi .w-384{width:384px}.pi .w-min{width:-moz-min-content;width:min-content}.pi .w-256{width:256px}.pi .w-18{width:18px}.pi .w-12{width:12px}.pi .w-42{width:42px}.pi .w-60{width:60px}.pi .\\!w-auto{width:auto!important}.pi .w-26{width:26px}.pi .w-32{width:32px}.pi .w-850{width:53.125rem}.pi .w-288{width:288px}.pi .w-320{width:320px}.pi .w-440{width:27.5rem}.pi .w-40{width:40px}.pi .w-64{width:64px}.pi .w-1\\/3{width:33.333333%}.pi .w-16{width:16px}.pi .w-56{width:56px}.pi .w-2{width:2px}.pi .w-110{width:110px}.pi .w-\\[4ch\\]{width:4ch}.pi .w-\\[233px\\]{width:233px}.pi .w-46{width:2.875rem}.pi .w-38{width:2.375rem}.pi .w-\\[210px\\]{width:210px}.pi .w-100{width:6.25rem}.pi .w-620{width:38.75rem}.pi .w-780{width:48.75rem}.pi .w-\\[calc\\(100\\%-40px\\)\\]{width:calc(100% - 40px)}.pi .w-px{width:1px}.pi .w-28{width:28px}.pi .w-90{width:5.625rem}.pi .w-14{width:14px}.pi .w-22{width:22px}.pi .w-280{width:17.5rem}.pi .min-w-0{min-width:0}.pi .min-w-320{min-width:320px}.pi .min-w-80{min-width:80px}.pi .min-w-224{min-width:224px}.pi .min-w-288{min-width:288px}.pi .min-w-240{min-width:240px}.pi .min-w-42{min-width:42px}.pi .min-w-90{min-width:5.625rem}.pi .min-w-180{min-width:11.25rem}.pi .min-w-128{min-width:128px}.pi .min-w-4{min-width:4px}.pi .min-w-192{min-width:192px}.pi .max-w-\\[calc\\(100vw-90px\\)\\]{max-width:calc(100vw - 90px)}.pi .max-w-max{max-width:-moz-max-content;max-width:max-content}.pi .max-w-280{max-width:17.5rem}.pi .max-w-620{max-width:38.75rem}.pi .max-w-440{max-width:27.5rem}.pi .max-w-\\[calc\\(100\\%-40px\\)\\]{max-width:calc(100% - 40px)}.pi .max-w-\\[90\\%\\]{max-width:90%}.pi .max-w-full{max-width:100%}.pi .max-w-500{max-width:31.25rem}.pi .max-w-\\[464px\\]{max-width:464px}.pi .max-w-180{max-width:11.25rem}.pi .max-w-400{max-width:25rem}.pi .max-w-780{max-width:48.75rem}.pi .max-w-375{max-width:375px}.pi .max-w-240{max-width:240px}.pi .max-w-320{max-width:320px}.pi .max-w-288{max-width:288px}.pi .max-w-112{max-width:112px}.pi .max-w-80{max-width:80px}.pi .max-w-850{max-width:53.125rem}.pi .max-w-580{max-width:36.25rem}.pi .max-w-dialog{max-width:calc(var(--be-viewport-width, 100vw)*.9)}.pi .max-w-950{max-width:59.375rem}.pi .flex-auto{flex:1 1 auto}.pi .flex-shrink-0,.pi .shrink-0{flex-shrink:0}.pi .flex-grow-0{flex-grow:0}.pi .origin-\\[100\\%\\]{transform-origin:100%}.pi .-translate-y-1\\/2{--tw-translate-y:-50%}.pi .-translate-x-1\\/2,.pi .-translate-y-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .-translate-x-1\\/2{--tw-translate-x:-50%}.pi .rotate-180{--tw-rotate:180deg}.pi .rotate-0,.pi .rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .rotate-0{--tw-rotate:0deg}.pi .rotate-45{--tw-rotate:45deg}.pi .rotate-45,.pi .rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .rotate-90{--tw-rotate:90deg}.pi .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .cursor-pointer{cursor:pointer}.pi .cursor-nwse-resize{cursor:nwse-resize}.pi .cursor-nesw-resize{cursor:nesw-resize}.pi .cursor-se-resize{cursor:se-resize}.pi .cursor-sw-resize{cursor:sw-resize}.pi .cursor-zoom-in{cursor:zoom-in}.pi .cursor-default{cursor:default}.pi .cursor-move{cursor:move}.pi .cursor-not-allowed{cursor:not-allowed}.pi .touch-none{touch-action:none}.pi .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.pi .resize-none{resize:none}.pi .resize{resize:both}.pi .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.pi .break-inside-avoid{-moz-column-break-inside:avoid;break-inside:avoid}.pi .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.pi .grid-cols-5-min-content{grid-template-columns:repeat(5,min-content)}.pi .flex-row{flex-direction:row}.pi .flex-col{flex-direction:column}.pi .flex-col-reverse{flex-direction:column-reverse}.pi .flex-wrap{flex-wrap:wrap}.pi .flex-nowrap{flex-wrap:nowrap}.pi .items-start{align-items:flex-start}.pi .items-center{align-items:center}.pi .items-stretch{align-items:stretch}.pi .justify-start{justify-content:flex-start}.pi .justify-end{justify-content:flex-end}.pi .justify-center{justify-content:center}.pi .justify-between{justify-content:space-between}.pi .gap-16{gap:16px}.pi .gap-20{gap:20px}.pi .gap-8{gap:8px}.pi .gap-14{gap:14px}.pi .gap-24{gap:24px}.pi .gap-6{gap:6px}.pi .gap-30{gap:30px}.pi .gap-10{gap:10px}.pi .gap-12{gap:12px}.pi .gap-4{gap:4px}.pi .gap-18{gap:18px}.pi .gap-32{gap:32px}.pi .gap-40{gap:40px}.pi .gap-64{gap:64px}.pi .gap-36{gap:36px}.pi .gap-x-10{-moz-column-gap:10px;column-gap:10px}.pi .space-y-10>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(10px*var(--tw-space-y-reverse));margin-top:calc(10px*(1 - var(--tw-space-y-reverse)))}.pi .self-stretch{align-self:stretch}.pi .overflow-auto{overflow:auto}.pi .overflow-hidden{overflow:hidden}.pi .overflow-visible{overflow:visible}.pi .overflow-scroll{overflow:scroll}.pi .overflow-x-auto{overflow-x:auto}.pi .overflow-y-auto{overflow-y:auto}.pi .overflow-x-hidden{overflow-x:hidden}.pi .overflow-y-hidden{overflow-y:hidden}.pi .truncate{overflow:hidden;white-space:nowrap}.pi .overflow-ellipsis,.pi .text-ellipsis,.pi .truncate{text-overflow:ellipsis}.pi .whitespace-normal{white-space:normal}.pi .whitespace-nowrap{white-space:nowrap}.pi .whitespace-pre-wrap{white-space:pre-wrap}.pi .break-words{overflow-wrap:break-word}.pi .rounded{border-radius:4px}.pi .rounded-md{border-radius:6px}.pi .rounded-full{border-radius:9999px}.pi .rounded-lg{border-radius:8px}.pi .rounded-none{border-radius:0}.pi .rounded-2xl{border-radius:16px}.pi .rounded-sm{border-radius:2px}.pi .rounded-\\[16px\\]{border-radius:16px}.pi .rounded-\\[64px\\]{border-radius:64px}.pi .rounded-\\[32px\\]{border-radius:32px}.pi .rounded-3xl{border-radius:24px}.pi .rounded-xl{border-radius:12px}.pi .rounded-t{border-top-left-radius:4px;border-top-right-radius:4px}.pi .rounded-l{border-bottom-left-radius:4px;border-top-left-radius:4px}.pi .rounded-r-md{border-bottom-right-radius:6px;border-top-right-radius:6px}.pi .rounded-l-md{border-bottom-left-radius:6px;border-top-left-radius:6px}.pi .rounded-r{border-bottom-right-radius:4px;border-top-right-radius:4px}.pi .rounded-l-none{border-bottom-left-radius:0;border-top-left-radius:0}.pi .rounded-r-none{border-bottom-right-radius:0;border-top-right-radius:0}.pi .rounded-l-full{border-bottom-left-radius:9999px;border-top-left-radius:9999px}.pi .rounded-r-full{border-bottom-right-radius:9999px;border-top-right-radius:9999px}.pi .rounded-tr-none{border-top-right-radius:0}.pi .rounded-br-none{border-bottom-right-radius:0}.pi .rounded-tl-none{border-top-left-radius:0}.pi .rounded-bl-none{border-bottom-left-radius:0}.pi .border{border-width:1px}.pi .border-2{border-width:2px}.pi .border-4{border-width:4px}.pi .border-\\[3px\\]{border-width:3px}.pi .border-y{border-bottom-width:1px;border-top-width:1px}.pi .border-r{border-right-width:1px}.pi .border-l-4{border-left-width:4px}.pi .border-b{border-bottom-width:1px}.pi .border-t-4{border-top-width:4px}.pi .border-r-4{border-right-width:4px}.pi .border-b-4{border-bottom-width:4px}.pi .border-t{border-top-width:1px}.pi .border-l{border-left-width:1px}.pi .border-dotted{border-style:dotted}.pi .border-none{border-style:none}.pi .border-divider{border-color:rgb(var(--be-foreground-base)/var(--be-divider-opacity))}.pi .border-white{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}.pi .border-primary\\/50{border-color:rgb(var(--be-primary)/.5)}.pi .border-danger\\/50{border-color:#ef444480}.pi .border-transparent{border-color:transparent}.pi .border-primary{--tw-border-opacity:1;border-color:rgb(var(--be-primary)/var(--tw-border-opacity))}.pi .border-danger{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.pi .border-chip{--tw-border-opacity:1;border-color:rgb(var(--be-background-chip)/var(--tw-border-opacity))}.pi .border-paper{--tw-border-opacity:1;border-color:rgb(var(--be-paper)/var(--tw-border-opacity))}.pi .border-background{--tw-border-opacity:1;border-color:rgb(var(--be-background)/var(--tw-border-opacity))}.pi .border-text-muted{border-color:rgb(var(--be-foreground-base)/var(--be-text-muted-opacity))}.pi .border-white\\/50{border-color:#ffffff80}.pi .border-l-primary{--tw-border-opacity:1;border-left-color:rgb(var(--be-primary)/var(--tw-border-opacity))}.pi .border-l-transparent{border-left-color:transparent}.pi .border-l-positive{--tw-border-opacity:1;border-left-color:rgb(34 197 94/var(--tw-border-opacity))}.pi .border-l-warning{--tw-border-opacity:1;border-left-color:rgb(243 164 50/var(--tw-border-opacity))}.pi .border-l-danger{--tw-border-opacity:1;border-left-color:rgb(239 68 68/var(--tw-border-opacity))}.pi .border-r-transparent{border-right-color:transparent}.pi .border-r-primary-light{--tw-border-opacity:1;border-right-color:rgb(var(--be-primary-light)/var(--tw-border-opacity))}.pi .border-b-primary{--tw-border-opacity:1;border-bottom-color:rgb(var(--be-primary)/var(--tw-border-opacity))}.pi .bg-background{--tw-bg-opacity:1;background-color:rgb(var(--be-background)/var(--tw-bg-opacity))}.pi .bg-divider{background-color:rgb(var(--be-foreground-base)/var(--be-divider-opacity))}.pi .bg-paper{--tw-bg-opacity:1;background-color:rgb(var(--be-paper)/var(--tw-bg-opacity))}.pi .bg{--tw-bg-opacity:1;background-color:rgb(var(--be-background)/var(--tw-bg-opacity))}.pi .bg-alt{--tw-bg-opacity:1;background-color:rgb(var(--be-background-alt)/var(--tw-bg-opacity))}.pi .bg-primary\\/hover{background-color:rgb(var(--be-primary)/var(--be-hover-opacity))}.pi .bg-primary{--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity))}.pi .bg-positive\\/focus{background-color:rgb(34 197 94/var(--be-focus-opacity))}.pi .bg-warning\\/focus{background-color:rgb(243 164 50/var(--be-focus-opacity))}.pi .bg-danger\\/focus{background-color:rgb(239 68 68/var(--be-focus-opacity))}.pi .bg-primary\\/focus{background-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .bg-primary\\/5{background-color:rgb(var(--be-primary)/.05)}.pi .bg-controls{--tw-bg-opacity:1;background-color:rgb(50 50 50/var(--tw-bg-opacity))}.pi .bg-chip{--tw-bg-opacity:1;background-color:rgb(var(--be-background-chip)/var(--tw-bg-opacity))}.pi .bg-primary-light\\/20{background-color:rgb(var(--be-primary-light)/.2)}.pi .bg-primary\\/selected{background-color:rgb(var(--be-primary)/var(--be-selected-opacity))}.pi .bg-warning{--tw-bg-opacity:1;background-color:rgb(243 164 50/var(--tw-bg-opacity))}.pi .bg-transparent{background-color:transparent}.pi .bg-danger{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}.pi .bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.pi .bg-toast{--tw-bg-opacity:1;background-color:rgb(50 50 50/var(--tw-bg-opacity))}.pi .bg-focus{background-color:rgb(var(--be-foreground-base)/var(--be-focus-opacity))}.pi .bg-black\\/30{background-color:#0000004d}.pi .bg-primary-light{--tw-bg-opacity:1;background-color:rgb(var(--be-primary-light)/var(--tw-bg-opacity))}.pi .bg-fg-base\\/4{background-color:rgb(var(--be-foreground-base)/4%)}.pi .bg-positive{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity))}.pi .bg-inherit{background-color:inherit}.pi .bg-background\\/70{background-color:rgb(var(--be-background)/.7)}.pi .bg-envato{--tw-bg-opacity:1;background-color:rgb(108 161 43/var(--tw-bg-opacity))}.pi .bg-disabled{background-color:rgb(var(--be-foreground-base)/var(--be-disabled-bg-opacity))}.pi .bg-disabled-fg{background-color:rgb(var(--be-foreground-base)/var(--be-disabled-fg-opacity))}.pi .bg-slider-disabled{--tw-bg-opacity:1;background-color:rgb(189 189 189/var(--tw-bg-opacity))}.pi .bg-primary-dark{--tw-bg-opacity:1;background-color:rgb(var(--be-primary-dark)/var(--tw-bg-opacity))}.pi .bg-white\\/50{background-color:#ffffff80}.pi .bg-black\\/50{background-color:#00000080}.pi .bg-primary-light\\/40{background-color:rgb(var(--be-primary-light)/.4)}.pi .bg-positive-lighter{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity))}.pi .bg-danger-lighter{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity))}.pi .bg-opacity-95{--tw-bg-opacity:.95}.pi .bg-no-repeat{background-repeat:no-repeat}.pi .fill-current{fill:currentColor}.pi .fill-transparent{fill:transparent}.pi .stroke-current{stroke:currentColor}.pi .object-contain{-o-object-fit:contain;object-fit:contain}.pi .object-cover{-o-object-fit:cover;object-fit:cover}.pi .p-0{padding:0}.pi .p-14{padding:14px}.pi .p-16{padding:16px}.pi .p-24{padding:24px}.pi .p-10{padding:10px}.pi .p-8{padding:8px}.pi .p-6{padding:6px}.pi .p-12{padding:12px}.pi .p-20{padding:20px}.pi .p-4{padding:4px}.pi .p-18{padding:18px}.pi .p-40{padding:40px}.pi .p-2{padding:2px}.pi .px-24{padding-left:24px;padding-right:24px}.pi .py-20{padding-bottom:20px;padding-top:20px}.pi .px-6{padding-left:6px;padding-right:6px}.pi .px-8{padding-left:8px;padding-right:8px}.pi .py-12{padding-bottom:12px;padding-top:12px}.pi .px-16{padding-left:16px;padding-right:16px}.pi .py-14{padding-bottom:14px;padding-top:14px}.pi .px-14{padding-left:14px;padding-right:14px}.pi .px-20{padding-left:20px;padding-right:20px}.pi .px-32{padding-left:32px;padding-right:32px}.pi .py-10{padding-bottom:10px;padding-top:10px}.pi .px-4{padding-left:4px;padding-right:4px}.pi .px-10{padding-left:10px;padding-right:10px}.pi .py-2{padding-bottom:2px;padding-top:2px}.pi .px-5vw{padding-left:5vw;padding-right:5vw}.pi .px-12{padding-left:12px;padding-right:12px}.pi .py-\\[9px\\]{padding-bottom:9px;padding-top:9px}.pi .px-40{padding-left:40px;padding-right:40px}.pi .py-32{padding-bottom:32px;padding-top:32px}.pi .px-28{padding-left:28px;padding-right:28px}.pi .py-56{padding-bottom:56px;padding-top:56px}.pi .py-28{padding-bottom:28px;padding-top:28px}.pi .py-90{padding-bottom:5.625rem;padding-top:5.625rem}.pi .py-4{padding-bottom:4px;padding-top:4px}.pi .px-18{padding-left:18px;padding-right:18px}.pi .px-22{padding-left:22px;padding-right:22px}.pi .px-26{padding-left:26px;padding-right:26px}.pi .py-8{padding-bottom:8px;padding-top:8px}.pi .py-96{padding-bottom:96px;padding-top:96px}.pi .py-6{padding-bottom:6px;padding-top:6px}.pi .py-3{padding-bottom:3px;padding-top:3px}.pi .py-5{padding-bottom:5px;padding-top:5px}.pi .py-40{padding-bottom:40px;padding-top:40px}.pi .pt-14{padding-top:14px}.pi .pt-24{padding-top:24px}.pi .pb-12{padding-bottom:12px}.pi .pt-26{padding-top:26px}.pi .pb-16{padding-bottom:16px}.pi .pb-24{padding-bottom:24px}.pi .pt-50{padding-top:50px}.pi .pt-20{padding-top:20px}.pi .pb-10{padding-bottom:10px}.pi .pb-4{padding-bottom:4px}.pi .pr-10{padding-right:10px}.pi .pl-10{padding-left:10px}.pi .pb-20{padding-bottom:20px}.pi .pb-30{padding-bottom:30px}.pi .pt-30{padding-top:30px}.pi .pl-8{padding-left:8px}.pi .pb-14{padding-bottom:14px}.pi .pl-14{padding-left:14px}.pi .pt-54{padding-top:3.375rem}.pi .pb-28{padding-bottom:28px}.pi .pb-48{padding-bottom:48px}.pi .pb-safe-area{padding-bottom:env(safe-area-inset-bottom)}.pi .pl-24{padding-left:24px}.pi .pr-16{padding-right:16px}.pi .pr-24{padding-right:24px}.pi .pl-16{padding-left:16px}.pi .pr-6{padding-right:6px}.pi .pb-18{padding-bottom:18px}.pi .pt-6{padding-top:6px}.pi .pt-16{padding-top:16px}.pi .pt-10{padding-top:10px}.pi .pl-12{padding-left:12px}.pi .pr-12{padding-right:12px}.pi .pb-6{padding-bottom:6px}.pi .pt-42{padding-top:42px}.pi .pb-32{padding-bottom:32px}.pi .pt-70{padding-top:70px}.pi .pt-40{padding-top:40px}.pi .pr-8{padding-right:8px}.pi .pl-46{padding-left:2.875rem}.pi .pr-46{padding-right:2.875rem}.pi .pl-6{padding-left:6px}.pi .pl-18{padding-left:18px}.pi .pr-18{padding-right:18px}.pi .text-left{text-align:left}.pi .text-center{text-align:center}.pi .text-right{text-align:right}.pi .align-top{vertical-align:top}.pi .align-middle{vertical-align:middle}.pi .text-sm{font-size:14px;line-height:20px}.pi .text-xs{font-size:12px;line-height:16px}.pi .text-xl{font-size:20px;line-height:28px}.pi .text-6xl{font-size:60px;line-height:1}.pi .text-2xl{font-size:24px;line-height:32px}.pi .text-3xl{font-size:30px;line-height:36px}.pi .text-base{font-size:16px;line-height:24px}.pi .text-lg{font-size:18px;line-height:28px}.pi .text-4xl{font-size:36px;line-height:40px}.pi .font-medium{font-weight:500}.pi .font-semibold{font-weight:600}.pi .font-light{font-weight:300}.pi .font-bold{font-weight:700}.pi .font-normal{font-weight:400}.pi .uppercase{text-transform:uppercase}.pi .capitalize{text-transform:capitalize}.pi .italic{font-style:italic}.pi .tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.pi .leading-none{line-height:1}.pi .leading-5{line-height:1.25rem}.pi .tracking-wide{letter-spacing:.025em}.pi .text,.pi .text-main{color:rgb(var(--be-foreground-base)/var(--be-text-main-opacity))}.pi .text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.pi .text-muted{color:rgb(var(--be-foreground-base)/var(--be-text-muted-opacity))}.pi .text-positive{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity))}.pi .text-danger{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}.pi .text-primary{--tw-text-opacity:1;color:rgb(var(--be-primary)/var(--tw-text-opacity))}.pi .\\!text{color:rgb(var(--be-foreground-base)/var(--be-text-main-opacity))!important}.pi .text-facebook{--tw-text-opacity:1;color:rgb(59 89 152/var(--tw-text-opacity))}.pi .text-twitter{--tw-text-opacity:1;color:rgb(29 161 242/var(--tw-text-opacity))}.pi .text-positive-darker{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity))}.pi .text-disabled{color:rgb(var(--be-foreground-base)/var(--be-disabled-fg-opacity))}.pi .text-on-primary{--tw-text-opacity:1;color:rgb(var(--be-on-primary)/var(--tw-text-opacity))}.pi .text-primary-light{--tw-text-opacity:1;color:rgb(var(--be-primary-light)/var(--tw-text-opacity))}.pi .text-primary\\/40{color:rgb(var(--be-primary)/.4)}.pi .text-black\\/30{color:#0000004d}.pi .text-danger-darker{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity))}.pi .underline{text-decoration-line:underline}.pi .no-underline{text-decoration-line:none}.pi .caret-transparent{caret-color:transparent}.pi .opacity-0{opacity:0}.pi .opacity-100{opacity:1}.pi .opacity-80{opacity:.8}.pi .opacity-90{opacity:.9}.pi .shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.pi .shadow,.pi .shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.pi .shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.pi .shadow-\\[15px_0_30px_0_rgb\\(0_0_0_\\/_18\\%\\)\\],.pi .shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .shadow-\\[15px_0_30px_0_rgb\\(0_0_0_\\/_18\\%\\)\\]{--tw-shadow:15px 0 30px 0 rgba(0,0,0,.18);--tw-shadow-colored:15px 0 30px 0 var(--tw-shadow-color)}.pi .shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.pi .shadow-md,.pi .shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.pi .shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .outline-none{outline:2px solid transparent;outline-offset:2px}.pi .outline{outline-color:rgb(var(--be-primary-lighter)/1);outline-style:solid;outline-width:2px}.pi .ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .ring-inset{--tw-ring-inset:inset}.pi .ring-offset-4{--tw-ring-offset-width:4px}.pi .blur{--tw-blur:blur(8px)}.pi .blur,.pi .grayscale{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.pi .grayscale{--tw-grayscale:grayscale(100%)}.pi .invert{--tw-invert:invert(100%)}.pi .invert,.pi .sepia{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.pi .sepia{--tw-sepia:sepia(100%)}.pi .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.pi .transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-shadow{transition-duration:.15s;transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-bg-color{transition-duration:.15s;transition-property:background-color;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-button{transition-duration:.15s;transition-property:background-color,box-shadow,border-color,color;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-width{transition-duration:.15s;transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .duration-200{transition-duration:.2s}.pi .duration-100{transition-duration:.1s}.pi .will-change-\\[width\\]{will-change:width}.pi .will-change-transform{will-change:transform}.pi .icon-2xs{font-size:.75rem}.pi .icon-xs{font-size:1rem}.pi .icon-sm{font-size:1.25rem}.pi .icon-md{font-size:1.5rem}.pi .icon-lg{font-size:2.1875rem}.pi .icon-xl{font-size:2.6875rem}.pi .col-w-1{flex:1 0 0px}.pi .col-w-2{flex:2 0 0px}.pi .col-w-3{flex:3 0 0px}.pi .no-tap-highlight{-webkit-tap-highlight-color:transparent}@media only screen and (min-device-width:768px){.pi .tiny-scrollbar{scrollbar-color:rgba(0,0,0,.2) transparent;scrollbar-width:thin}.pi .tiny-scrollbar::-webkit-scrollbar{background-color:transparent;height:6px;width:6px}.pi .tiny-scrollbar::-webkit-scrollbar-thumb{background-color:rgb(var(--be-foreground-base)/.2);border-radius:10px}.pi .tiny-scrollbar::-webkit-scrollbar-track-piece:start{background:transparent}.pi .tiny-scrollbar::-webkit-scrollbar-track-piece:end{background:transparent}}.pi .hide-scrollbar{scrollbar-width:none}.pi .hide-scrollbar::-webkit-scrollbar{background:transparent;height:0;width:0}.pi .svg-icon{fill:currentColor;display:inline-block;flex-shrink:0;transition-duration:.15s;transition-property:transform,fill;transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-user-select:none;-moz-user-select:none;user-select:none}.pi .cropzone:not(.moving) .cropzone-transition{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .first-letter\\:capitalize:first-letter{text-transform:capitalize}.pi .file\\:mr-10::file-selector-button{margin-right:10px}.pi .file\\:h-24::file-selector-button{height:24px}.pi .file\\:rounded::file-selector-button{border-radius:4px}.pi .file\\:border-none::file-selector-button{border-style:none}.pi .file\\:bg-primary::file-selector-button{--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity))}.pi .file\\:px-10::file-selector-button{padding-left:10px;padding-right:10px}.pi .file\\:text-sm::file-selector-button{font-size:14px;line-height:20px}.pi .file\\:font-semibold::file-selector-button{font-weight:600}.pi .file\\:text-on-primary::file-selector-button{--tw-text-opacity:1;color:rgb(var(--be-on-primary)/var(--tw-text-opacity))}.pi .before\\:absolute:before{content:var(--tw-content);position:absolute}.pi .before\\:left-0:before{content:var(--tw-content);left:0}.pi .before\\:top-1\\/2:before{content:var(--tw-content);top:50%}.pi .before\\:z-10:before{content:var(--tw-content);z-index:10}.pi .before\\:block:before{content:var(--tw-content);display:block}.pi .before\\:h-1:before{content:var(--tw-content);height:1px}.pi .before\\:h-full:before{content:var(--tw-content);height:100%}.pi .before\\:h-28:before{content:var(--tw-content);height:28px}.pi .before\\:h-22:before{content:var(--tw-content);height:22px}.pi .before\\:h-18:before{content:var(--tw-content);height:18px}.pi .before\\:h-12:before{content:var(--tw-content);height:12px}.pi .before\\:h-14:before{content:var(--tw-content);height:14px}.pi .before\\:w-full:before{content:var(--tw-content);width:100%}.pi .before\\:w-28:before{content:var(--tw-content);width:28px}.pi .before\\:w-22:before{content:var(--tw-content);width:22px}.pi .before\\:w-18:before{content:var(--tw-content);width:18px}.pi .before\\:w-12:before{content:var(--tw-content);width:12px}.pi .before\\:w-14:before{content:var(--tw-content);width:14px}.pi .before\\:-translate-y-1\\/2:before{--tw-translate-y:-50%}.pi .before\\:-translate-y-1\\/2:before,.pi .before\\:translate-x-2:before{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .before\\:translate-x-2:before{--tw-translate-x:2px}.pi .before\\:scale-10:before{--tw-scale-x:.1;--tw-scale-y:.1;content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .before\\:rounded-full:before{border-radius:9999px;content:var(--tw-content)}.pi .before\\:rounded-3xl:before{border-radius:24px;content:var(--tw-content)}.pi .before\\:border:before{border-width:1px;content:var(--tw-content)}.pi .before\\:bg-divider:before{background-color:rgb(var(--be-foreground-base)/var(--be-divider-opacity));content:var(--tw-content)}.pi .before\\:bg-primary:before{--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity));content:var(--tw-content)}.pi .before\\:bg-white:before{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));content:var(--tw-content)}.pi .before\\:opacity-0:before{content:var(--tw-content);opacity:0}.pi .before\\:transition:before{content:var(--tw-content);transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .before\\:transition-transform:before{content:var(--tw-content);transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .before\\:duration-200:before{content:var(--tw-content);transition-duration:.2s}.pi .before\\:content-\\[\\\\\\\\00a0\\]:before{--tw-content:\\\\00a0;content:var(--tw-content)}.pi .after\\:pointer-events-none:after{content:var(--tw-content);pointer-events:none}.pi .after\\:absolute:after{content:var(--tw-content);position:absolute}.pi .after\\:inset-0:after{bottom:0;content:var(--tw-content);left:0;right:0;top:0}.pi .first\\:capitalize:first-child{text-transform:capitalize}.pi .checked\\:border-primary:checked{--tw-border-opacity:1;border-color:rgb(var(--be-primary)/var(--tw-border-opacity))}.pi .checked\\:border-danger:checked{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.pi .checked\\:bg-primary:checked{--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity))}.pi .checked\\:bg-danger:checked{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}.pi .checked\\:before\\:translate-x-36:checked:before{--tw-translate-x:36px}.pi .checked\\:before\\:translate-x-30:checked:before,.pi .checked\\:before\\:translate-x-36:checked:before{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .checked\\:before\\:translate-x-30:checked:before{--tw-translate-x:30px}.pi .checked\\:before\\:translate-x-24:checked:before{--tw-translate-x:24px}.pi .checked\\:before\\:translate-x-16:checked:before,.pi .checked\\:before\\:translate-x-24:checked:before{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .checked\\:before\\:translate-x-16:checked:before{--tw-translate-x:16px}.pi .checked\\:before\\:translate-x-20:checked:before{--tw-translate-x:20px}.pi .checked\\:before\\:scale-\\[\\.65\\]:checked:before,.pi .checked\\:before\\:translate-x-20:checked:before{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .checked\\:before\\:scale-\\[\\.65\\]:checked:before{--tw-scale-x:.65;--tw-scale-y:.65}.pi .checked\\:before\\:border-white:checked:before{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity));content:var(--tw-content)}.pi .checked\\:before\\:opacity-100:checked:before{content:var(--tw-content);opacity:1}.pi .focus-within\\:border-primary\\/60:focus-within{border-color:rgb(var(--be-primary)/.6)}.pi .focus-within\\:ring:focus-within{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .focus-within\\:ring-primary\\/focus:focus-within{--tw-ring-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .focus-within\\:ring-primary-light:focus-within{--tw-ring-opacity:1;--tw-ring-color:rgb(var(--be-primary-light)/var(--tw-ring-opacity))}.pi .hover\\:scale-105:hover{--tw-scale-x:1.05;--tw-scale-y:1.05}.pi .hover\\:scale-105:hover,.pi .hover\\:scale-110:hover{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .hover\\:scale-110:hover{--tw-scale-x:1.1;--tw-scale-y:1.1}.pi .hover\\:cursor-move:hover{cursor:move}.pi .hover\\:border-primary:hover{--tw-border-opacity:1;border-color:rgb(var(--be-primary)/var(--tw-border-opacity))}.pi .hover\\:border-danger:hover{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.pi .hover\\:border-primary-dark:hover{--tw-border-opacity:1;border-color:rgb(var(--be-primary-dark)/var(--tw-border-opacity))}.pi .hover\\:border-danger\\/90:hover{border-color:#ef4444e6}.pi .hover\\:border-chip\\/90:hover{border-color:rgb(var(--be-background-chip)/.9)}.pi .hover\\:bg-hover:hover{background-color:rgb(var(--be-foreground-base)/var(--be-hover-opacity))}.pi .hover\\:bg-primary\\/10:hover{background-color:rgb(var(--be-primary)/.1)}.pi .hover\\:bg-white\\/hover:hover{background-color:rgb(255 255 255/var(--be-hover-opacity))}.pi .hover\\:bg-primary\\/hover:hover{background-color:rgb(var(--be-primary)/var(--be-hover-opacity))}.pi .hover\\:bg-danger\\/4:hover{background-color:#ef44440a}.pi .hover\\:bg-primary\\/4:hover{background-color:rgb(var(--be-primary)/4%)}.pi .hover\\:bg-primary-dark:hover{--tw-bg-opacity:1;background-color:rgb(var(--be-primary-dark)/var(--tw-bg-opacity))}.pi .hover\\:bg-danger\\/90:hover{background-color:#ef4444e6}.pi .hover\\:bg-chip\\/90:hover{background-color:rgb(var(--be-background-chip)/.9)}.pi .hover\\:bg-paper\\/90:hover{background-color:rgb(var(--be-paper)/.9)}.pi .hover\\:bg-primary\\/focus:hover{background-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .hover\\:bg-fg-base\\/15:hover{background-color:rgb(var(--be-foreground-base)/15%)}.pi .hover\\:text-primary-dark:hover{--tw-text-opacity:1;color:rgb(var(--be-primary-dark)/var(--tw-text-opacity))}.pi .hover\\:text-main:hover{color:rgb(var(--be-foreground-base)/var(--be-text-main-opacity))}.pi .hover\\:text-fg-base:hover{--tw-text-opacity:1;color:rgb(var(--be-foreground-base)/var(--tw-text-opacity))}.pi .hover\\:underline:hover{text-decoration-line:underline}.pi .hover\\:opacity-100:hover{opacity:1}.pi .hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .before\\:hover\\:bg-primary-dark:hover:before{--tw-bg-opacity:1;background-color:rgb(var(--be-primary-dark)/var(--tw-bg-opacity));content:var(--tw-content)}.pi .hover\\:after\\:bg-black\\/5:hover:after{background-color:#0000000d;content:var(--tw-content)}.pi .checked\\:hover\\:border-primary-dark:hover:checked{--tw-border-opacity:1;border-color:rgb(var(--be-primary-dark)/var(--tw-border-opacity))}.pi .focus\\:border-danger\\/60:focus{border-color:#ef444499}.pi .focus\\:border-primary\\/60:focus{border-color:rgb(var(--be-primary)/.6)}.pi .focus\\:bg-primary:focus{--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity))}.pi .focus\\:text-on-primary:focus{--tw-text-opacity:1;color:rgb(var(--be-on-primary)/var(--tw-text-opacity))}.pi .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.pi .focus\\:ring:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.pi .focus\\:ring-2:focus,.pi .focus\\:ring:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .focus\\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.pi .focus\\:ring-danger\\/focus:focus{--tw-ring-color:rgb(239 68 68/var(--be-focus-opacity))}.pi .focus\\:ring-primary\\/focus:focus{--tw-ring-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px}.pi .focus\\:after\\:bg-black\\/10:focus:after{background-color:#0000001a;content:var(--tw-content)}.pi .focus-visible\\:bg-primary\\/focus:focus-visible{background-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .focus-visible\\:bg-focus:focus-visible{background-color:rgb(var(--be-foreground-base)/var(--be-focus-opacity))}.pi .focus-visible\\:outline:focus-visible{outline-style:solid;outline-width:2px}.pi .focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.pi .focus-visible\\:outline:focus-visible{outline-color:rgb(var(--be-primary-lighter)/1)}.pi .focus-visible\\:outline-primary-light:focus-visible{outline-color:rgb(var(--be-primary-light)/1)}.pi .focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .focus-visible\\:ring:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .disabled\\:pointer-events-none:disabled{pointer-events:none}.pi .disabled\\:cursor-default:disabled{cursor:default}.pi .disabled\\:border-disabled-bg:disabled{border-color:rgb(var(--be-foreground-base)/var(--be-disabled-bg-opacity))}.pi .disabled\\:border-transparent:disabled{border-color:transparent}.pi .disabled\\:border-disabled-fg:disabled{border-color:rgb(var(--be-foreground-base)/var(--be-disabled-fg-opacity))}.pi .disabled\\:border-r-transparent:disabled{border-right-color:transparent}.pi .disabled\\:bg-transparent:disabled{background-color:transparent}.pi .disabled\\:bg-disabled:disabled{background-color:rgb(var(--be-foreground-base)/var(--be-disabled-bg-opacity))}.pi .disabled\\:text-disabled:disabled{color:rgb(var(--be-foreground-base)/var(--be-disabled-fg-opacity))}.pi .disabled\\:shadow-none:disabled{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .disabled\\:before\\:bg-disabled-fg:disabled:before{background-color:rgb(var(--be-foreground-base)/var(--be-disabled-fg-opacity));content:var(--tw-content)}.pi .dark .dark\\:bg-alt{--tw-bg-opacity:1;background-color:rgb(var(--be-background-alt)/var(--tw-bg-opacity))}.pi .dark .dark\\:bg-none{background-image:none}.pi .dark .dark\\:text-white\\/50{color:#ffffff80}.pi .dark .dark\\:opacity-5{opacity:.05}.pi .dark .dark\\:opacity-80{opacity:.8}.pi .dark .dark\\:checked\\:border-primary-dark:checked{--tw-border-opacity:1;border-color:rgb(var(--be-primary-dark)/var(--tw-border-opacity))}.pi .dark .dark\\:checked\\:bg-primary-dark:checked{--tw-bg-opacity:1;background-color:rgb(var(--be-primary-dark)/var(--tw-bg-opacity))}@media (min-width:640px){.pi .sm\\:justify-start{justify-content:flex-start}.pi .sm\\:text-sm{font-size:14px;line-height:20px}}@media (min-width:768px){.pi .md\\:invisible{visibility:hidden}.pi .md\\:my-24{margin-bottom:24px;margin-top:24px}.pi .md\\:mx-40{margin-left:40px;margin-right:40px}.pi .md\\:my-64{margin-bottom:64px;margin-top:64px}.pi .md\\:my-100{margin-bottom:6.25rem;margin-top:6.25rem}.pi .md\\:mr-0{margin-right:0}.pi .md\\:mb-0{margin-bottom:0}.pi .md\\:mr-10{margin-right:10px}.pi .md\\:mb-40{margin-bottom:40px}.pi .md\\:mb-24{margin-bottom:24px}.pi .md\\:mt-60{margin-top:60px}.pi .md\\:mb-70{margin-bottom:70px}.pi .md\\:mt-0{margin-top:0}.pi .md\\:mr-24{margin-right:24px}.pi .md\\:mr-80{margin-right:80px}.pi .md\\:block{display:block}.pi .md\\:flex{display:flex}.pi .md\\:h-0{height:0}.pi .md\\:w-min{width:-moz-min-content;width:min-content}.pi .md\\:w-320{width:320px}.pi .md\\:w-400{width:25rem}.pi .md\\:min-w-440{min-width:27.5rem}.pi .md\\:max-w-950{max-width:59.375rem}.pi .md\\:max-w-350{max-width:21.875rem}.pi .md\\:flex-row{flex-direction:row}.pi .md\\:items-start{align-items:flex-start}.pi .md\\:gap-12{gap:12px}.pi .md\\:gap-24{gap:24px}.pi .md\\:gap-80{gap:80px}.pi .md\\:gap-112{gap:112px}.pi .md\\:overflow-hidden{overflow:hidden}.pi .md\\:p-24{padding:24px}.pi .md\\:px-24{padding-left:24px;padding-right:24px}.pi .md\\:px-30{padding-left:30px;padding-right:30px}.pi .md\\:px-0{padding-left:0;padding-right:0}.pi .md\\:px-20{padding-left:20px;padding-right:20px}.pi .md\\:py-80{padding-bottom:80px;padding-top:80px}.pi .md\\:px-176{padding-left:176px;padding-right:176px}.pi .md\\:px-10vw{padding-left:10vw;padding-right:10vw}.pi .md\\:pt-128{padding-top:128px}.pi .md\\:pl-20{padding-left:20px}.pi .md\\:pb-0{padding-bottom:0}.pi .md\\:pb-54{padding-bottom:3.375rem}.pi .md\\:text-left{text-align:left}.pi .md\\:text-3xl{font-size:30px;line-height:36px}.pi .md\\:text-4xl{font-size:36px;line-height:40px}.pi .md\\:text-lg{font-size:18px;line-height:28px}.pi .md\\:text-base{font-size:16px;line-height:24px}.pi .md\\:font-medium{font-weight:500}.pi .md\\:font-normal{font-weight:400}.pi .md\\:shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}}@media (min-width:1024px){.pi .lg\\:min-w-500{min-width:31.25rem}.pi .lg\\:flex-row{flex-direction:row}.pi .lg\\:items-center{align-items:center}.pi .lg\\:px-96{padding-left:96px;padding-right:96px}.pi .lg\\:py-96{padding-bottom:96px;padding-top:96px}.pi .lg\\:pb-0{padding-bottom:0}}@media (min-width:1280px){.pi .xl\\:w-1\\/2{width:50%}.pi .xl\\:pt-96{padding-top:96px}}.pi .\\[\\&\\>\\.tree-label\\]\\:focus-visible\\:ring:focus-visible>.tree-label{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .\\[\\&\\>\\.tree-label\\]\\:focus-visible\\:ring-2:focus-visible>.tree-label{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .\\[\\&\\>\\.tree-label\\]\\:focus-visible\\:ring-inset:focus-visible>.tree-label{--tw-ring-inset:inset}\n'),!e.selector)throw new Error('Pixie required "selector" option.');const t=document.querySelector(e.selector);t&&(t.classList.add("pi"),function(e){ad=e}(t),this.setConfig(e),cd.setState({editor:this}),Ad(t).render(Hl(i.StrictMode,{children:Hl(XI,{})})))}get state(){return ud()}get defaultConfig(){return KI.defaultConfig}open(e={}){var t;null!=(t=ud().config.ui)&&t.visible||(this.setConfig(ro(e,{ui:{visible:!0}})),requestAnimationFrame(()=>{var e,t,n,r;hd().zoom.fitToScreen(),hd().history.addInitial(),yd()&&(null==(t=null==(e=ud().config.ui)?void 0:e.openImageDialog)?void 0:t.show)&&this.togglePanel("newImage",!0),null==(r=(n=ud().config).onOpen)||r.call(n)}))}close(){var e,t,n;null==(e=ud().config.ui)||!e.visible||(this.setConfig({ui:{visible:!1}}),null==(n=(t=ud().config).onClose)||n.call(t))}setConfig(e){ud().setConfig(e)}uploadAndAddImage(){return hd().import.uploadAndAddImage()}uploadAndReplaceMainImage(){return hd().import.uploadAndReplaceMainImage()}uploadAndOpenStateFile(){return hd().import.uploadAndOpenStateFile()}newCanvas(e,t,n){return hd().canvas.openNew(e,t,n)}getState(e){return JSON.stringify(md(e))}setState(e){return hd().import.loadState(e)}async setStateFromUrl(e){const t=await pd(e);return hd().import.loadState(t)}openTool(e){vd(e)}applyChanges(){ud().applyChanges()}cancelChanges(){ud().cancelChanges()}async resetEditor(e){await fd(e),await hd().canvas.loadInitialContent()}togglePanel(e,t){"objects"===e&&ud().togglePanel("history",!1),"history"===e&&ud().togglePanel("objects",!1),ud().togglePanel(e,t)}on(e,t){var n;null==(n=this.fabric)||n.on(e,t)}isDirty(){return ud().dirty}get(e){return this.tools[e]}notify(e){return Sd(e)}static init(e){return new Promise(t=>{const n=e.onLoad;e.onLoad=e=>{null==n||n(e),t(e)},new this(e)})}};let qI=KI;Yi(qI,"defaultConfig",Ic),Yi(qI,"version",Tc);const ZI="fm-pixie-editor";const JI=new class{constructor(){this._container=document.createElement("div"),this._instance=null,this._container.classList.add(ZI),this._container.style.width="100%",this._container.style.height="85vh",this._container.style.minHeight="400px"}get className(){return`.${ZI}`}get canvas(){var e,t;return null===(t=null===(e=this._instance)||void 0===e?void 0:e.state.canvasRef)||void 0===t?void 0:t.current}get tools(){var e;return null===(e=this._instance)||void 0===e?void 0:e.tools}isLoaded(){return!!this._instance}async _setConfig(e){this._instance?await this._instance.resetEditor(e):this._instance=await qI.init(Object.assign(Object.assign({},e),{selector:this.className}))}async show(e,t,n=t.firstChild){t.insertBefore(this._container,n),await this._setConfig(e),this._instance.open()}close(){var e;null===(e=this._container.parentNode)||void 0===e||e.removeChild(this._container)}},QI=(e,t="image/png")=>fetch(`data:${t};base64,${e}`).then(e=>e.blob());const eO=({visible:t,onClose:n,file:i,onSave:o})=>{const a=r.useRef(null),[s,l]=r.useState(null),[c,u]=r.useState(""),[h,d]=r.useState(!1),[f,p]=r.useState(!1),g=Xr(),m=r.useRef(!1),v=r.useRef(),b=r.useRef(void 0),[y,w]=r.useState(null);r.useEffect(()=>{i&&(async()=>{if(b.current!==i)if("object"!=typeof i)try{if(b.current=i,i.startsWith("data:"))w({thumbnail:i});else{const e=await g.handleAddFileByUrl(i,!0);if(!e)throw new Error("Не удалось загрузить файл");b.current===i&&w(e)}}finally{b.current===i&&(b.current=null)}else w(i)})()},[i,w]),v.current=o;const x=r.useCallback(async e=>{try{if(e.thumbnail&&e.thumbnail.startsWith("data:"))return e.thumbnail;const t=await g.getFileData(e.id);if(!t)throw new Error("Ошибка загрузки файла");return new Promise(e=>{const n=new FileReader;n.onload=()=>e(n.result),n.readAsDataURL(t)})}catch(e){throw console.error("Ошибка получения данных изображения:",e),e}},[g.getFileData]);r.useEffect(()=>{(async()=>{try{const e=y?await x(y):null;l(e);const t=y?y.type:"";u(t||"image/png")}catch(e){console.error("🎨 Ошибка загрузки изображения:",e),M.error("Ошибка загрузки изображения"),null==n||n()}})()},[t,y,x,n]);const _=r.useCallback(async(e,t,r)=>{if(y&&v.current)try{const t=await function(e,t){if("json"===e)return new Blob([t],{type:"application/json"});if("svg"===e)return new Blob([t],{type:"image/svg+xml"});let n=`image/${e}`;if("jpg"===e&&(n="image/jpeg"),t.startsWith("data:")){const e=t.match(/^data:([^;]+)/);e&&e[1].startsWith("image/")&&(n=e[1]);const r=t.replace(/data:image\/[^;]+;base64,/,"");return QI(r,n)}return QI(t,n)}(r,e);let i=t.type||`image/${r}`;"jpg"===r&&(i="image/jpeg");const o=e.startsWith("data:")?e:`data:${i};base64,${e}`,a=Object.assign(Object.assign({},y),{thumbnail:o,size:t.size.toString(),date:(new Date).toISOString().split("T")[0],type:i,folderId:y.folderId||"",name:y.name,extension:y.extension});await v.current(a),null==n||n()}catch(e){console.error("Ошибка сохранения:",e),M.error("Ошибка при сохранении изображения")}},[y,n]),C=r.useCallback(async()=>{var e;if(!JI.isLoaded()||!y)return void console.error("❌ Pixie instance или file отсутствует");const t=y.name||"edited-image",n=y.extension||c.split("/")[1]||"png";try{await(null===(e=JI.tools)||void 0===e?void 0:e.export.save(t.replace(/\.[^/.]+$/,""),n))}catch(e){console.error("🎨 Ошибка при сохранении через кнопку:",e);try{const e=JI.canvas,r=e?e.toDataURL(`image/${n}`):null;r&&await _(r,t,n)}catch(e){console.error("🎨 Альтернативный способ тоже не сработал:",e)}}},[y,c,_]),S=r.useCallback(async()=>{if(s&&t&&h&&!m.current)try{m.current=!0;const e=a.current;let t=0;for(;t<20&&(0===e.clientWidth||0===e.clientHeight);)await new Promise(e=>setTimeout(e,50)),t++;const n={selector:"#pixie-editor",image:s,activeLanguage:"ru-RU",ui:{mode:"inline",forceOverlayModeOnMobile:!1,visible:!0},tools:{filter:{items:["crop","resize","draw","text","shapes","frame","export","import"]}},onSave:async function(e,t,n){try{return await _(e,t,n)}catch(e){throw console.error("🎨 PIXIE onSave ERROR:",e),e}}};try{p(!1),await JI.show(n,a.current);const e=JI.canvas;e&&e.focus(),p(!0)}catch(e){console.error("init pixie failed:",e)}}catch(e){console.error("Ошибка инициализации Pixie:",e),M.error("Ошибка инициализации редактора"),m.current=!1,null==n||n()}},[s,t,h,n,_]);return r.useEffect(()=>{t&&s&&h&&S()},[t,s,h,null==y?void 0:y.id,S]),r.useEffect(()=>{if(!t){try{JI.close()}catch(e){console.warn("Ошибка при закрытии Pixie:",e)}l(null),u(""),m.current=!1,d(!1),p(!1)}return()=>{try{JI.close()}catch(e){console.warn("Ошибка при закрытии Pixie при размонтировании:",e)}}},[t]),e(H,{title:`Редактирование: ${(null==y?void 0:y.name)||"Изображение"}`,open:t,onCancel:n,afterOpenChange:e=>d(e),forceRender:!0,width:"95vw",style:{top:20},styles:{body:{height:"85vh",padding:0}},footer:[e(X,{onClick:n,children:"Отмена"},"cancel"),e(X,{type:"primary",onClick:C,children:"Сохранить"},"save")],maskClosable:!1,destroyOnClose:!1,children:e("div",{ref:a,style:{position:"relative",width:"100%",height:"100%"},children:t&&!f?e("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255,255,255,0.45)",backdropFilter:"blur(1px)",pointerEvents:"all",zIndex:10},children:e("span",{style:{fontSize:14,color:"#555"},children:"Загрузка редактора…"})}):null})})};var tO="container",nO="uploadCard",rO="header",iO="headerButton",oO="fileList",aO="fileItem",sO="fileAvatar",lO="fileInfo",cO="fileName",uO="fileSize",hO="progressBar",dO="errorNote",fO="minimizedContainer",pO="minimizedButton";const{Text:gO}=K,mO=({visible:n,files:r,totalFiles:i,completedFiles:o,onClose:a,onMinimize:s,onInsert:l,minimized:c=!1})=>{if(!n)return null;const{token:u}=T.useToken(),h=t=>{switch(t){case"success":return e(Se,{style:{color:u.colorSuccess}});case"error":return e(Ce,{style:{color:u.colorError}});default:return e(_e,{style:{color:"#1890ff"}})}},d=e=>{if(e.includes("КБ")||e.includes("MB")||e.includes("KB"))return e;const t=parseInt(e);return isNaN(t)?e:`${(t/1024).toFixed(2)} КБ`},f=t=>"success"===t.status?[e(X,{type:"primary",size:"small",onClick:()=>l(t.id),children:"Insert"},"insert")]:"error"===t.status?[e(gO,{type:"danger",style:{fontSize:"12px"},children:t.error||"Error"},"error")]:[];return e("div",c?{className:fO,children:t(X,{type:"primary",size:"small",onClick:s,className:pO,children:["Загрузка ",o,"/",i]})}:{className:tO,children:t(U,{className:nO,size:"small",title:t("div",{className:rO,children:[t(gO,{strong:!0,children:["Uploaded ",o,"/",i," files"]}),t(Q,{children:[e(X,{type:"text",size:"small",icon:e(we,{}),onClick:s,className:iO}),e(X,{type:"text",size:"small",icon:e(xe,{}),onClick:a,className:iO})]})]}),bodyStyle:{padding:"12px"},children:[e(q,{className:oO,size:"small",dataSource:r,renderItem:n=>e(q.Item,{className:aO,actions:f(n),children:e(q.Item.Meta,{avatar:e(J,{size:"small",icon:h(n.status),className:sO}),title:t("div",{className:lO,children:[e(gO,{ellipsis:!0,className:cO,children:n.name}),e(gO,{type:"secondary",className:uO,children:d(n.size)})]}),description:"uploading"===n.status&&e(Z,{percent:n.progress,size:"small",status:"active",showInfo:!1,className:hO})})})}),r.some(e=>"error"===e.status)&&e("div",{className:dO,children:e(gO,{type:"danger",style:{fontSize:"12px"},children:"Некоторые файлы не удалось загрузить. Проверьте размер и формат файлов."})})]})})},{Header:vO}=ee,{Text:bO,Title:yO}=K,wO=({selectedFiles:i,onClearSelection:o,onRename:a,onDelete:s,onCopy:l,onMove:c,onEdit:u,files:h})=>{const{t:d}=br(),f=i.size,p=r.useMemo(()=>{var e,t;if(1!==f)return!1;const n=Array.from(i)[0],r=h.find(e=>e.id===n);if(!r||r.isFolder)return!1;let o=!1;if(r.type&&r.type.startsWith("image/"))o=!0;else if(r.extension){const e=r.extension.toLowerCase();o=Br.includes(e)}else{const t=null===(e=r.name.split(".").pop())||void 0===e?void 0:e.toLowerCase();o=!!t&&Br.includes(t)}return console.log("isImageSelected проверка:",{fileName:r.name,fileType:r.type,fileExtension:r.extension,nameExtension:null===(t=r.name.split(".").pop())||void 0===t?void 0:t.toLowerCase(),isImage:o,IMAGE_EXTENSIONS:Br}),o},[f,i,h]);return t(vO,{className:"actions-header",children:[t("div",{className:"header-title-container",children:[e(yO,{level:5,className:"header-title",children:d("Files")}),f>0&&t(bO,{type:"secondary",className:"selected-text",children:[f," ",d("selected")]})]}),e(Q,{children:f>0?t(n,{children:[e(X,{icon:e(xe,{}),onClick:o,children:d("Deselected")}),e(X,{icon:e(ye,{}),onClick:a,disabled:1!==f,children:d("Rename")}),e(X,{icon:e(Ae,{}),onClick:u,disabled:!p,title:p?"Редактировать изображение":"Выберите одно изображение для редактирования",children:d("Edit")}),e(X,{icon:e(ke,{}),onClick:l,children:d("Copy")}),e(X,{icon:e(ve,{}),onClick:c,children:d("Move to folder")}),e(X,{danger:!0,icon:e(Te,{}),onClick:s,children:d("Delete")})]}):null})]})};
80
+ function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&(i[n]=e[n]);return i}(e,RI),d=function(e,t){let{relative:n}=void 0===t?{}:t;OI()||wI();let{basename:i,navigator:o}=r.useContext(kI),{hash:a,pathname:s,search:l}=MI(e,{relative:n}),c=s;return"/"!==i&&(c="/"===s?i:CI([i,s])),o.createHref({pathname:c,search:l,hash:a})}(c,{relative:i}),f=function(e,t){let{target:n,replace:i,state:o,preventScrollReset:a,relative:s}=void 0===t?{}:t,l=function(){OI()||wI();let{basename:e,navigator:t}=r.useContext(kI),{matches:n}=r.useContext(II),{pathname:i}=EI(),o=JSON.stringify(PI(n).map(e=>e.pathnameBase)),a=r.useRef(!1);return r.useEffect(()=>{a.current=!0}),r.useCallback(function(n,r){if(void 0===r&&(r={}),!a.current)return;if("number"==typeof n)return void t.go(n);let s=_I(n,JSON.parse(o),i,"path"===r.relative);"/"!==e&&(s.pathname="/"===s.pathname?e:CI([e,s.pathname])),(r.replace?t.replace:t.push)(s,r.state,r)},[e,t,o,i])}(),c=EI(),u=MI(e,{relative:s});return r.useCallback(t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==i?i:bI(c)===bI(u);l(e,{replace:n,state:o,preventScrollReset:a,relative:s})}},[c,l,u,i,o,n,e,a,s])}(c,{replace:a,state:s,target:l,preventScrollReset:u,relative:i});return Hl("a",{...h,href:d,onClick:o?n:function(e){n&&n(e),e.defaultPrevented||f(e)},ref:t,target:l})});const LI=oc(Hl("path",{d:"M11 15h2v2h-2v-2zm0-8h2v6h-2V7zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutlineOutlined"),NI=oc(Hl("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm4.59-12.42L10 14.17l-2.59-2.58L6 13l4 4 8-8z"}),"CheckCircleOutlined");function zI(){const e=_d(e=>e.toasts);return Hl("div",{className:"relative pointer-events-none",children:Hl(tb,{initial:!1,children:e.map(e=>Hl("div",{"data-toast":!0,className:nc("fixed mx-auto p-20 z-toast","bottom-center"===e.position?"left-0 right-0 bottom-0":"right-0 bottom-0"),children:Wl(Xv.div,{initial:{opacity:0,y:50,scale:.3},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.5,transition:{duration:.2}},className:nc("flex items-center gap-10 min-w-288 max-w-500 shadow-lg w-min rounded-lg pl-16 pr-6 py-6 text-sm pointer-events-auto max-h-100 bg-paper text-main bg-paper border mx-auto"),onPointerEnter:()=>{var t;return null==(t=e.timer)?void 0:t.pause()},onPointerLeave:()=>{var t;return null==(t=e.timer)?void 0:t.resume()},role:"alert","aria-live":"danger"===e.type?"assertive":"polite",children:["danger"===e.type&&Hl(LI,{className:"text-danger flex-shrink-0",size:"md"}),"positive"===e.type&&Hl(NI,{className:"text-positive flex-shrink-0",size:"md"}),Hl("div",{className:"overflow-hidden overflow-ellipsis w-max mr-auto",children:Hl(__,{value:e.message})}),e.action&&Hl(Ky,{variant:"text",color:"primary",size:"sm",className:"flex-shrink-0",onFocus:()=>{var t;return null==(t=e.timer)?void 0:t.pause()},onBlur:()=>{var t;return null==(t=e.timer)?void 0:t.resume()},onClick:()=>Cd().remove(e.id),elementType:DI,to:e.action.action,children:Hl(__,{value:e.action.label})}),Hl(w_,{onFocus:()=>{var t;return null==(t=e.timer)?void 0:t.pause()},onBlur:()=>{var t;return null==(t=e.timer)?void 0:t.resume()},type:"button",className:"flex-shrink-0",onClick:()=>{Cd().remove(e.id)},size:"sm",children:Hl(R_,{})})]})},e.id))})})}function BI(e){switch(e.key){case"z":(function(e){return Sb()?e.metaKey:e.ctrlKey})(e)&&(e.preventDefault(),e.stopPropagation(),e.shiftKey?hd().history.redo():hd().history.undo());break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),hd().objects.move("up");break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),hd().objects.move("right");break;case"ArrowDown":e.preventDefault(),e.stopPropagation(),hd().objects.move("down");break;case"ArrowLeft":e.preventDefault(),e.stopPropagation(),hd().objects.move("left");break;case"Delete":e.preventDefault(),e.stopPropagation(),hd().objects.delete()}}const VI=new Map,UI=new Map,HI={};async function*WI(e){const t=e.createReader();let n;do{n=await new Promise((e,n)=>{t.readEntries(e,n)});for(const e of n)if(e.isFile){if(".DS_Store"===e.name)continue;const t=await YI(e);yield new Cy(t,e.fullPath)}else e.isDirectory&&(yield*WI(e))}while(n.length>0)}function YI(e){return new Promise((t,n)=>e.file(t,n))}function $I(e){return null!=HI.dragTargetId?VI.get(HI.dragTargetId):e.dataTransfer.types.includes("Files")?{type:"nativeFile",el:null,ref:null,getData:()=>async function(e){const t=[];for await(const n of e)t.push(n);return t}(async function*(e){for(const t of e.items)if("file"===t.kind)if("function"==typeof t.webkitGetAsEntry){const e=t.webkitGetAsEntry();if(!e)continue;if(e.isFile){if(".DS_Store"===e.name)continue;yield new Cy(t.getAsFile(),e.fullPath)}else e.isDirectory&&(yield*WI(e))}else{const e=t.getAsFile();if(!e||".DS_Store"===e.name)continue;yield new Cy(e,t.fullPath)}}(e.dataTransfer))}:void 0}function GI({children:e}){const t=cd(e=>e.bootstrapData),n=h(()=>({data:t,setBootstrapData:()=>{},mergeBootstrapData:()=>{},invalidateBootstrapData:()=>{}}),[t]);return Hl(o_.Provider,{value:n,children:e})}function XI(){var e,t,n,r;const i=null==(e=cd(e=>{var t;return null==(t=e.config.ui)?void 0:t.visible}))||e,o=null!=(t=cd(e=>{var t,n;return null==(n=null==(t=e.config.ui)?void 0:t.nav)?void 0:n.position}))?t:"bottom",s=null!=(n=cd(e=>{var t,n;return null==(n=null==(t=e.config.ui)?void 0:t.menubar)?void 0:n.position}))?n:"top",l=null==(r=cd(e=>{var t;return null==(t=e.config.ui)?void 0:t.allowEditorClose}))||r,h=u(null),d=u(null),{isModal:f,isMobile:p}=D_(),g=c(async e=>{var t,n,r;if(ud().activeTool||ud().dirty||"nativeFile"!==e.type)return;const i=await e.getData();!hd().import.fileIsValid(i[0])||(null!=(r=null==(n=null==(t=ud().config.tools)?void 0:t.import)?void 0:n.openDroppedImageAsBackground)&&r?await hd().import.openBackgroundImage(i[0]):await hd().import.openUploadedFile(i[0]))},[]),{droppableProps:m}=function({id:e,disabled:t,ref:n,...r}){const i=u({dragOverElements:new Set,dropActivateTimer:void 0}).current,o=u(r);o.current=r,_(()=>(UI.set(e,{...UI.get(e),disabled:t,id:e,ref:n}),()=>{UI.delete(e)}),[e,o,t,n]);const a=e=>{var t;const r=o.current;return!(!(null==e?void 0:e.type)||n.current===(null==(t=e.ref)?void 0:t.current)||!r.types.includes(e.type)||r.acceptsDrop&&!r.acceptsDrop(e))},s=e=>{var t,n;const r=$I(e);r&&(null==(n=(t=o.current).onDragLeave)||n.call(t,r))};return{droppableProps:t?{}:{onDragOver:e=>{e.preventDefault(),e.stopPropagation()},onDragEnter:e=>{var t,n;if(e.stopPropagation(),i.dragOverElements.add(e.target),i.dragOverElements.size>1)return;const r=$I(e);r&&a(r)&&(null==(n=(t=o.current).onDragEnter)||n.call(t,r),clearTimeout(i.dropActivateTimer),"function"==typeof o.current.onDropActivate&&(i.dropActivateTimer=setTimeout(()=>{var e,t;r&&(null==(t=(e=o.current).onDropActivate)||t.call(e,r))},400)))},onDragLeave:e=>{e.stopPropagation(),i.dragOverElements.delete(e.target);for(const t of i.dragOverElements)e.currentTarget.contains(t)||i.dragOverElements.delete(t);if(i.dragOverElements.size>0)return;const t=$I(e);t&&a(t)&&(s(e),clearTimeout(i.dropActivateTimer))},onDrop:async e=>{var t,n,r,l;e.preventDefault(),e.stopPropagation(),i.dragOverElements.clear(),s(e),clearTimeout(i.dropActivateTimer);const c=$I(e);c&&(null==(n=(t=o.current).onDragLeave)||n.call(t,c),a(c)&&(null==(l=(r=o.current).onDrop)||l.call(r,c)))}}}}({id:"pixie-root",ref:d,types:["nativeFile"],onDrop:g});a(()=>{var e,t;ud().fabric||(cd.setState({canvasRef:h}),zy(h.current),null!=(e=ud().config.ui)&&e.defaultTool&&ud().setActiveTool(null==(t=ud().config.ui)?void 0:t.defaultTool,null),hd().canvas.loadInitialContent().then(()=>{var e,t;null==(t=(e=ud().config).onLoad)||t.call(e,ud().editor)}));const n=By(d,()=>{ud().setStageSize(Vy(d.current))}),r=By(h,()=>{ud().setCanvasSize(Vy(h.current))});return()=>{n(),r()}},[d]);const v=nc("pixie-root flex flex-col overflow-hidden bg-background text-main no-tap-highlight w-full h-full",{relative:!f,"fixed inset-0 w-full h-full z-20":f,"shadow-lg border rounded-md m-auto max-h-[calc(100vh-90px)] max-w-[calc(100vw-90px)]":f&&!p});return Hl(nb,{features:ib,strict:!0,children:Wl(GI,{children:[f&&i&&!p&&l&&Hl(w_,{className:"z-20 fixed right-2 top-2 text-white",size:"lg",onClick:()=>{ud().editor.close()},children:Hl(R_,{})}),f&&i&&Hl(n_,{position:"fixed",disableInitialTransition:!0}),Wl(Xv.div,{initial:!1,variants:{visible:{opacity:1,scale:1,display:"flex"},hidden:{opacity:0,transitionEnd:{display:"none"}}},animate:i?"visible":"hidden",className:v,children:["top"===s&&Hl(H_,{}),"top"===o&&Hl(qT,{className:"pt-14"}),Wl("main",{className:"relative flex-auto my-20 overflow-hidden outline-none",tabIndex:-1,...pb(m,{onKeyDownCapture:BI}),ref:d,children:[Hl(Y_,{}),Hl(_S,{ref:h})]}),Hl(Hk,{}),"bottom"===o&&Hl(qT,{}),"bottom"===s&&Hl(H_,{}),Hl(pI,{}),Hl(zI,{})]})]})})}fo.enableBoundaryChecking(!1);const KI=class{constructor(e){if(Yi(this,"tools",{}),Yi(this,"fabric",null),e.sentryDsn&&function(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.react",packages:[{name:"npm:@sentry/react",version:_s}],version:_s},Pl(e)}({dsn:e.sentryDsn}),function(e,t){void 0===t&&(t={});var n=t.insertAt;if(!(typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}('/*! tailwindcss v3.1.8 | MIT License | https://tailwindcss.com*/.pi *,.pi :after,.pi :before{border-color:rgb(var(--be-foreground-base)/var(--be-divider-opacity));border-style:solid;border-width:0;box-sizing:border-box}.pi :after,.pi :before{--tw-content:""}.pi hr{border-top-width:1px;color:inherit;height:0}.pi abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.pi h1,.pi h2,.pi h3,.pi h4,.pi h5,.pi h6{font-size:inherit;font-weight:inherit}.pi a{color:inherit;text-decoration:inherit}.pi b,.pi strong{font-weight:bolder}.pi code,.pi kbd,.pi pre,.pi samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}.pi small{font-size:80%}.pi sub,.pi sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.pi sub{bottom:-.25em}.pi sup{top:-.5em}.pi table{border-collapse:collapse;border-color:inherit;text-indent:0}.pi button,.pi input,.pi optgroup,.pi select,.pi textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}.pi button,.pi select{text-transform:none}.pi [type=button],.pi [type=reset],.pi [type=submit],.pi button{-webkit-appearance:button;background-color:transparent;background-image:none}.pi :-moz-focusring{outline:auto}.pi :-moz-ui-invalid{box-shadow:none}.pi progress{vertical-align:baseline}.pi ::-webkit-inner-spin-button,.pi ::-webkit-outer-spin-button{height:auto}.pi [type=search]{-webkit-appearance:textfield;outline-offset:-2px}.pi ::-webkit-search-decoration{-webkit-appearance:none}.pi ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.pi summary{display:list-item}.pi blockquote,.pi dd,.pi dl,.pi figure,.pi h1,.pi h2,.pi h3,.pi h4,.pi h5,.pi h6,.pi hr,.pi p,.pi pre{margin:0}.pi fieldset{margin:0;padding:0}.pi legend{padding:0}.pi menu,.pi ol,.pi ul{list-style:none;margin:0;padding:0}.pi textarea{resize:vertical}.pi input::-moz-placeholder,.pi textarea::-moz-placeholder{color:#9ca3af;opacity:1}.pi input::placeholder,.pi textarea::placeholder{color:#9ca3af;opacity:1}.pi [role=button],.pi button{cursor:pointer}.pi :disabled{cursor:default}.pi audio,.pi canvas,.pi embed,.pi iframe,.pi img,.pi object,.pi svg,.pi video{display:block;vertical-align:middle}.pi img,.pi video{height:auto;max-width:100%}.pi *,.pi :after,.pi :before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.pi ::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.pi .container{width:100%}.pi .\\!container{width:100%!important}@media (min-width:640px){.pi .container{max-width:640px}.pi .\\!container{max-width:640px!important}}@media (min-width:768px){.pi .container{max-width:768px}.pi .\\!container{max-width:768px!important}}@media (min-width:1024px){.pi .container{max-width:1024px}.pi .\\!container{max-width:1024px!important}}@media (min-width:1280px){.pi .container{max-width:1280px}.pi .\\!container{max-width:1280px!important}}@media (min-width:1536px){.pi .container{max-width:1536px}.pi .\\!container{max-width:1536px!important}}.pi .sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pi .pointer-events-none{pointer-events:none}.pi .pointer-events-auto{pointer-events:auto}.pi .visible{visibility:visible}.pi .\\!visible{visibility:visible!important}.pi .invisible{visibility:hidden}.pi .static{position:static}.pi .fixed{position:fixed}.pi .absolute{position:absolute}.pi .relative{position:relative}.pi .sticky{position:sticky}.pi .inset-0{bottom:0;top:0}.pi .inset-0,.pi .inset-x-0{left:0;right:0}.pi .right-2{right:2px}.pi .top-2{top:2px}.pi .top-0{top:0}.pi .left-0{left:0}.pi .left-16{left:16px}.pi .top-26{top:26px}.pi .-left-5{left:-5px}.pi .-top-5{top:-5px}.pi .bottom-0{bottom:0}.pi .-bottom-5{bottom:-5px}.pi .right-0{right:0}.pi .-right-5{right:-5px}.pi .bottom-20{bottom:20px}.pi .right-20{right:20px}.pi .top-24{top:24px}.pi .-bottom-14{bottom:-14px}.pi .left-30{left:30px}.pi .right-4{right:4px}.pi .top-1\\/2{top:50%}.pi .-bottom-20{bottom:-20px}.pi .left-1\\/2{left:50%}.pi .-bottom-10{bottom:-10px}.pi .-left-8{left:-8px}.pi .-left-80{left:-80px}.pi .-bottom-2{bottom:-2px}.pi .-right-2{right:-2px}.pi .isolate{isolation:isolate}.pi .z-20{z-index:20}.pi .z-modal{z-index:110}.pi .z-10{z-index:10}.pi .z-obj-box{z-index:20}.pi .z-navbar{z-index:40}.pi .z-tool-overlay{z-index:30}.pi .z-50,.pi .z-loading-indicator{z-index:50}.pi .z-popover{z-index:130}.pi .z-tray{z-index:120}.pi .z-toast{z-index:160}.pi .z-tooltip{z-index:150}.pi .z-cropzone{z-index:10}.pi .col-auto{grid-column:auto}.pi .m-auto{margin:auto}.pi .m-10{margin:10px}.pi .my-20{margin-bottom:20px;margin-top:20px}.pi .my-12{margin-bottom:12px;margin-top:12px}.pi .mx-auto{margin-left:auto;margin-right:auto}.pi .my-50{margin-bottom:50px;margin-top:50px}.pi .mx-14{margin-left:14px;margin-right:14px}.pi .my-30{margin-bottom:30px;margin-top:30px}.pi .my-24{margin-bottom:24px;margin-top:24px}.pi .my-80{margin-bottom:80px;margin-top:80px}.pi .my-32{margin-bottom:32px;margin-top:32px}.pi .my-40{margin-bottom:40px;margin-top:40px}.pi .my-8{margin-bottom:8px;margin-top:8px}.pi .my-10{margin-bottom:10px;margin-top:10px}.pi .my-100{margin-bottom:6.25rem;margin-top:6.25rem}.pi .mx-4{margin-left:4px;margin-right:4px}.pi .my-4{margin-bottom:4px;margin-top:4px}.pi .mx-8{margin-left:8px;margin-right:8px}.pi .mx-20{margin-left:20px;margin-right:20px}.pi .my-auto{margin-bottom:auto;margin-top:auto}.pi .mr-5{margin-right:5px}.pi .ml-auto{margin-left:auto}.pi .mr-20{margin-right:20px}.pi .mb-16{margin-bottom:16px}.pi .mr-10{margin-right:10px}.pi .mt-auto{margin-top:auto}.pi .mt-80{margin-top:80px}.pi .mt-30{margin-top:30px}.pi .mt-4{margin-top:4px}.pi .mb-30{margin-bottom:30px}.pi .mb-20{margin-bottom:20px}.pi .mr-auto{margin-right:auto}.pi .mr-24{margin-right:24px}.pi .mb-24{margin-bottom:24px}.pi .mb-14{margin-bottom:14px}.pi .mt-6{margin-top:6px}.pi .mt-12{margin-top:12px}.pi .mb-4{margin-bottom:4px}.pi .mt-14{margin-top:14px}.pi .ml-6{margin-left:6px}.pi .mr-14{margin-right:14px}.pi .mt-8{margin-top:8px}.pi .mb-10{margin-bottom:10px}.pi .mb-8{margin-bottom:8px}.pi .mt-20{margin-top:20px}.pi .mb-1{margin-bottom:1px}.pi .ml-10{margin-left:10px}.pi .mt-10{margin-top:10px}.pi .mt-2{margin-top:2px}.pi .mb-12{margin-bottom:12px}.pi .mb-40{margin-bottom:40px}.pi .mt-40{margin-top:40px}.pi .mb-32{margin-bottom:32px}.pi .mb-64{margin-bottom:64px}.pi .mt-32{margin-top:32px}.pi .mb-48{margin-bottom:48px}.pi .mt-50{margin-top:50px}.pi .mb-6{margin-bottom:6px}.pi .mt-60{margin-top:60px}.pi .-ml-1{margin-left:-1px}.pi .-ml-4{margin-left:-4px}.pi .mr-8{margin-right:8px}.pi .-mr-4{margin-right:-4px}.pi .ml-8{margin-left:8px}.pi .mt-16{margin-top:16px}.pi .mb-2{margin-bottom:2px}.pi .mt-24{margin-top:24px}.pi .-mt-2{margin-top:-2px}.pi .mt-36{margin-top:36px}.pi .mb-110{margin-bottom:110px}.pi .mt-18{margin-top:18px}.pi .mr-6{margin-right:6px}.pi .mr-16{margin-right:16px}.pi .ml-12{margin-left:12px}.pi .mr-4{margin-right:4px}.pi .mr-12{margin-right:12px}.pi .mr-2{margin-right:2px}.pi .mb-18{margin-bottom:18px}.pi .-ml-3{margin-left:-3px}.pi .-ml-12{margin-left:-12px}.pi .-ml-6{margin-left:-6px}.pi .box-content{box-sizing:content-box}.pi .block{display:block}.pi .inline-block{display:inline-block}.pi .inline{display:inline}.pi .flex{display:flex}.pi .inline-flex{display:inline-flex}.pi .table{display:table}.pi .table-cell{display:table-cell}.pi .table-row{display:table-row}.pi .grid{display:grid}.pi .\\!grid{display:grid!important}.pi .contents{display:contents}.pi .hidden{display:none}.pi .aspect-square{aspect-ratio:1/1}.pi .h-2\\/4{height:50%}.pi .h-full{height:100%}.pi .h-font{height:1em}.pi .h-1{height:1px}.pi .h-80{height:80px}.pi .h-400{height:25rem}.pi .h-50{height:50px}.pi .h-42{height:42px}.pi .h-54{height:3.375rem}.pi .h-8{height:8px}.pi .h-24{height:24px}.pi .h-36{height:36px}.pi .h-40{height:40px}.pi .h-20{height:20px}.pi .h-30{height:30px}.pi .h-84{height:84px}.pi .h-68{height:68px}.pi .h-32{height:32px}.pi .h-\\[54px\\]{height:54px}.pi .h-\\[186px\\]{height:186px}.pi .h-60{height:60px}.pi .h-18{height:18px}.pi .h-12{height:12px}.pi .h-26{height:26px}.pi .h-90{height:5.625rem}.pi .h-128{height:128px}.pi .h-6{height:6px}.pi .h-4{height:4px}.pi .h-48{height:48px}.pi .h-2{height:2px}.pi .h-16{height:16px}.pi .h-56{height:56px}.pi .h-64{height:64px}.pi .h-144{height:144px}.pi .h-100{height:6.25rem}.pi .h-max{height:-moz-max-content;height:max-content}.pi .h-px{height:1px}.pi .h-28{height:28px}.pi .h-92{height:92px}.pi .h-14{height:14px}.pi .h-38{height:2.375rem}.pi .h-22{height:22px}.pi .max-h-\\[calc\\(100vh-90px\\)\\]{max-height:calc(100vh - 90px)}.pi .max-h-\\[calc\\(100\\%-40px\\)\\]{max-height:calc(100% - 40px)}.pi .max-h-620{max-height:38.75rem}.pi .max-h-100{max-height:6.25rem}.pi .max-h-\\[36px\\]{max-height:36px}.pi .max-h-8{max-height:8px}.pi .max-h-tray{max-height:calc(var(--be-viewport-height, 100vh)*.9)}.pi .max-h-\\[calc\\(100\\%-30px\\)\\]{max-height:calc(100% - 30px)}.pi .max-h-40{max-height:40px}.pi .max-h-inherit{max-height:inherit}.pi .max-h-\\[583px\\]{max-height:583px}.pi .max-h-full{max-height:100%}.pi .max-h-26{max-height:26px}.pi .max-h-36{max-height:36px}.pi .max-h-dialog{max-height:calc(var(--be-viewport-height, 100vh)*.9)}.pi .max-h-240{max-height:240px}.pi .min-h-440{min-height:27.5rem}.pi .min-h-full{min-height:100%}.pi .min-h-\\[238px\\]{min-height:238px}.pi .min-h-86{min-height:86px}.pi .min-h-90{min-height:5.625rem}.pi .min-h-36{min-height:36px}.pi .min-h-42{min-height:42px}.pi .min-h-dialog{min-height:calc(var(--be-viewport-height, 100vh)*.9)}.pi .min-h-50{min-height:50px}.pi .min-h-\\[228px\\]{min-height:228px}.pi .min-h-30{min-height:30px}.pi .min-h-60{min-height:60px}.pi .w-max{width:-moz-max-content;width:max-content}.pi .w-full{width:100%}.pi .w-font{width:1em}.pi .w-80{width:80px}.pi .w-50{width:50px}.pi .w-8{width:8px}.pi .w-24{width:24px}.pi .w-36{width:36px}.pi .w-20{width:20px}.pi .w-30{width:30px}.pi .w-224{width:224px}.pi .w-68{width:68px}.pi .w-96{width:96px}.pi .w-144{width:144px}.pi .w-auto{width:auto}.pi .w-1{width:1px}.pi .w-240{width:240px}.pi .w-\\[168px\\]{width:168px}.pi .w-1\\/2{width:50%}.pi .w-384{width:384px}.pi .w-min{width:-moz-min-content;width:min-content}.pi .w-256{width:256px}.pi .w-18{width:18px}.pi .w-12{width:12px}.pi .w-42{width:42px}.pi .w-60{width:60px}.pi .\\!w-auto{width:auto!important}.pi .w-26{width:26px}.pi .w-32{width:32px}.pi .w-850{width:53.125rem}.pi .w-288{width:288px}.pi .w-320{width:320px}.pi .w-440{width:27.5rem}.pi .w-40{width:40px}.pi .w-64{width:64px}.pi .w-1\\/3{width:33.333333%}.pi .w-16{width:16px}.pi .w-56{width:56px}.pi .w-2{width:2px}.pi .w-110{width:110px}.pi .w-\\[4ch\\]{width:4ch}.pi .w-\\[233px\\]{width:233px}.pi .w-46{width:2.875rem}.pi .w-38{width:2.375rem}.pi .w-\\[210px\\]{width:210px}.pi .w-100{width:6.25rem}.pi .w-620{width:38.75rem}.pi .w-780{width:48.75rem}.pi .w-\\[calc\\(100\\%-40px\\)\\]{width:calc(100% - 40px)}.pi .w-px{width:1px}.pi .w-28{width:28px}.pi .w-90{width:5.625rem}.pi .w-14{width:14px}.pi .w-22{width:22px}.pi .w-280{width:17.5rem}.pi .min-w-0{min-width:0}.pi .min-w-320{min-width:320px}.pi .min-w-80{min-width:80px}.pi .min-w-224{min-width:224px}.pi .min-w-288{min-width:288px}.pi .min-w-240{min-width:240px}.pi .min-w-42{min-width:42px}.pi .min-w-90{min-width:5.625rem}.pi .min-w-180{min-width:11.25rem}.pi .min-w-128{min-width:128px}.pi .min-w-4{min-width:4px}.pi .min-w-192{min-width:192px}.pi .max-w-\\[calc\\(100vw-90px\\)\\]{max-width:calc(100vw - 90px)}.pi .max-w-max{max-width:-moz-max-content;max-width:max-content}.pi .max-w-280{max-width:17.5rem}.pi .max-w-620{max-width:38.75rem}.pi .max-w-440{max-width:27.5rem}.pi .max-w-\\[calc\\(100\\%-40px\\)\\]{max-width:calc(100% - 40px)}.pi .max-w-\\[90\\%\\]{max-width:90%}.pi .max-w-full{max-width:100%}.pi .max-w-500{max-width:31.25rem}.pi .max-w-\\[464px\\]{max-width:464px}.pi .max-w-180{max-width:11.25rem}.pi .max-w-400{max-width:25rem}.pi .max-w-780{max-width:48.75rem}.pi .max-w-375{max-width:375px}.pi .max-w-240{max-width:240px}.pi .max-w-320{max-width:320px}.pi .max-w-288{max-width:288px}.pi .max-w-112{max-width:112px}.pi .max-w-80{max-width:80px}.pi .max-w-850{max-width:53.125rem}.pi .max-w-580{max-width:36.25rem}.pi .max-w-dialog{max-width:calc(var(--be-viewport-width, 100vw)*.9)}.pi .max-w-950{max-width:59.375rem}.pi .flex-auto{flex:1 1 auto}.pi .flex-shrink-0,.pi .shrink-0{flex-shrink:0}.pi .flex-grow-0{flex-grow:0}.pi .origin-\\[100\\%\\]{transform-origin:100%}.pi .-translate-y-1\\/2{--tw-translate-y:-50%}.pi .-translate-x-1\\/2,.pi .-translate-y-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .-translate-x-1\\/2{--tw-translate-x:-50%}.pi .rotate-180{--tw-rotate:180deg}.pi .rotate-0,.pi .rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .rotate-0{--tw-rotate:0deg}.pi .rotate-45{--tw-rotate:45deg}.pi .rotate-45,.pi .rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .rotate-90{--tw-rotate:90deg}.pi .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .cursor-pointer{cursor:pointer}.pi .cursor-nwse-resize{cursor:nwse-resize}.pi .cursor-nesw-resize{cursor:nesw-resize}.pi .cursor-se-resize{cursor:se-resize}.pi .cursor-sw-resize{cursor:sw-resize}.pi .cursor-zoom-in{cursor:zoom-in}.pi .cursor-default{cursor:default}.pi .cursor-move{cursor:move}.pi .cursor-not-allowed{cursor:not-allowed}.pi .touch-none{touch-action:none}.pi .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.pi .resize-none{resize:none}.pi .resize{resize:both}.pi .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.pi .break-inside-avoid{-moz-column-break-inside:avoid;break-inside:avoid}.pi .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.pi .grid-cols-5-min-content{grid-template-columns:repeat(5,min-content)}.pi .flex-row{flex-direction:row}.pi .flex-col{flex-direction:column}.pi .flex-col-reverse{flex-direction:column-reverse}.pi .flex-wrap{flex-wrap:wrap}.pi .flex-nowrap{flex-wrap:nowrap}.pi .items-start{align-items:flex-start}.pi .items-center{align-items:center}.pi .items-stretch{align-items:stretch}.pi .justify-start{justify-content:flex-start}.pi .justify-end{justify-content:flex-end}.pi .justify-center{justify-content:center}.pi .justify-between{justify-content:space-between}.pi .gap-16{gap:16px}.pi .gap-20{gap:20px}.pi .gap-8{gap:8px}.pi .gap-14{gap:14px}.pi .gap-24{gap:24px}.pi .gap-6{gap:6px}.pi .gap-30{gap:30px}.pi .gap-10{gap:10px}.pi .gap-12{gap:12px}.pi .gap-4{gap:4px}.pi .gap-18{gap:18px}.pi .gap-32{gap:32px}.pi .gap-40{gap:40px}.pi .gap-64{gap:64px}.pi .gap-36{gap:36px}.pi .gap-x-10{-moz-column-gap:10px;column-gap:10px}.pi .space-y-10>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(10px*var(--tw-space-y-reverse));margin-top:calc(10px*(1 - var(--tw-space-y-reverse)))}.pi .self-stretch{align-self:stretch}.pi .overflow-auto{overflow:auto}.pi .overflow-hidden{overflow:hidden}.pi .overflow-visible{overflow:visible}.pi .overflow-scroll{overflow:scroll}.pi .overflow-x-auto{overflow-x:auto}.pi .overflow-y-auto{overflow-y:auto}.pi .overflow-x-hidden{overflow-x:hidden}.pi .overflow-y-hidden{overflow-y:hidden}.pi .truncate{overflow:hidden;white-space:nowrap}.pi .overflow-ellipsis,.pi .text-ellipsis,.pi .truncate{text-overflow:ellipsis}.pi .whitespace-normal{white-space:normal}.pi .whitespace-nowrap{white-space:nowrap}.pi .whitespace-pre-wrap{white-space:pre-wrap}.pi .break-words{overflow-wrap:break-word}.pi .rounded{border-radius:4px}.pi .rounded-md{border-radius:6px}.pi .rounded-full{border-radius:9999px}.pi .rounded-lg{border-radius:8px}.pi .rounded-none{border-radius:0}.pi .rounded-2xl{border-radius:16px}.pi .rounded-sm{border-radius:2px}.pi .rounded-\\[16px\\]{border-radius:16px}.pi .rounded-\\[64px\\]{border-radius:64px}.pi .rounded-\\[32px\\]{border-radius:32px}.pi .rounded-3xl{border-radius:24px}.pi .rounded-xl{border-radius:12px}.pi .rounded-t{border-top-left-radius:4px;border-top-right-radius:4px}.pi .rounded-l{border-bottom-left-radius:4px;border-top-left-radius:4px}.pi .rounded-r-md{border-bottom-right-radius:6px;border-top-right-radius:6px}.pi .rounded-l-md{border-bottom-left-radius:6px;border-top-left-radius:6px}.pi .rounded-r{border-bottom-right-radius:4px;border-top-right-radius:4px}.pi .rounded-l-none{border-bottom-left-radius:0;border-top-left-radius:0}.pi .rounded-r-none{border-bottom-right-radius:0;border-top-right-radius:0}.pi .rounded-l-full{border-bottom-left-radius:9999px;border-top-left-radius:9999px}.pi .rounded-r-full{border-bottom-right-radius:9999px;border-top-right-radius:9999px}.pi .rounded-tr-none{border-top-right-radius:0}.pi .rounded-br-none{border-bottom-right-radius:0}.pi .rounded-tl-none{border-top-left-radius:0}.pi .rounded-bl-none{border-bottom-left-radius:0}.pi .border{border-width:1px}.pi .border-2{border-width:2px}.pi .border-4{border-width:4px}.pi .border-\\[3px\\]{border-width:3px}.pi .border-y{border-bottom-width:1px;border-top-width:1px}.pi .border-r{border-right-width:1px}.pi .border-l-4{border-left-width:4px}.pi .border-b{border-bottom-width:1px}.pi .border-t-4{border-top-width:4px}.pi .border-r-4{border-right-width:4px}.pi .border-b-4{border-bottom-width:4px}.pi .border-t{border-top-width:1px}.pi .border-l{border-left-width:1px}.pi .border-dotted{border-style:dotted}.pi .border-none{border-style:none}.pi .border-divider{border-color:rgb(var(--be-foreground-base)/var(--be-divider-opacity))}.pi .border-white{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}.pi .border-primary\\/50{border-color:rgb(var(--be-primary)/.5)}.pi .border-danger\\/50{border-color:#ef444480}.pi .border-transparent{border-color:transparent}.pi .border-primary{--tw-border-opacity:1;border-color:rgb(var(--be-primary)/var(--tw-border-opacity))}.pi .border-danger{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.pi .border-chip{--tw-border-opacity:1;border-color:rgb(var(--be-background-chip)/var(--tw-border-opacity))}.pi .border-paper{--tw-border-opacity:1;border-color:rgb(var(--be-paper)/var(--tw-border-opacity))}.pi .border-background{--tw-border-opacity:1;border-color:rgb(var(--be-background)/var(--tw-border-opacity))}.pi .border-text-muted{border-color:rgb(var(--be-foreground-base)/var(--be-text-muted-opacity))}.pi .border-white\\/50{border-color:#ffffff80}.pi .border-l-primary{--tw-border-opacity:1;border-left-color:rgb(var(--be-primary)/var(--tw-border-opacity))}.pi .border-l-transparent{border-left-color:transparent}.pi .border-l-positive{--tw-border-opacity:1;border-left-color:rgb(34 197 94/var(--tw-border-opacity))}.pi .border-l-warning{--tw-border-opacity:1;border-left-color:rgb(243 164 50/var(--tw-border-opacity))}.pi .border-l-danger{--tw-border-opacity:1;border-left-color:rgb(239 68 68/var(--tw-border-opacity))}.pi .border-r-transparent{border-right-color:transparent}.pi .border-r-primary-light{--tw-border-opacity:1;border-right-color:rgb(var(--be-primary-light)/var(--tw-border-opacity))}.pi .border-b-primary{--tw-border-opacity:1;border-bottom-color:rgb(var(--be-primary)/var(--tw-border-opacity))}.pi .bg-background{--tw-bg-opacity:1;background-color:rgb(var(--be-background)/var(--tw-bg-opacity))}.pi .bg-divider{background-color:rgb(var(--be-foreground-base)/var(--be-divider-opacity))}.pi .bg-paper{--tw-bg-opacity:1;background-color:rgb(var(--be-paper)/var(--tw-bg-opacity))}.pi .bg{--tw-bg-opacity:1;background-color:rgb(var(--be-background)/var(--tw-bg-opacity))}.pi .bg-alt{--tw-bg-opacity:1;background-color:rgb(var(--be-background-alt)/var(--tw-bg-opacity))}.pi .bg-primary\\/hover{background-color:rgb(var(--be-primary)/var(--be-hover-opacity))}.pi .bg-primary{--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity))}.pi .bg-positive\\/focus{background-color:rgb(34 197 94/var(--be-focus-opacity))}.pi .bg-warning\\/focus{background-color:rgb(243 164 50/var(--be-focus-opacity))}.pi .bg-danger\\/focus{background-color:rgb(239 68 68/var(--be-focus-opacity))}.pi .bg-primary\\/focus{background-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .bg-primary\\/5{background-color:rgb(var(--be-primary)/.05)}.pi .bg-controls{--tw-bg-opacity:1;background-color:rgb(50 50 50/var(--tw-bg-opacity))}.pi .bg-chip{--tw-bg-opacity:1;background-color:rgb(var(--be-background-chip)/var(--tw-bg-opacity))}.pi .bg-primary-light\\/20{background-color:rgb(var(--be-primary-light)/.2)}.pi .bg-primary\\/selected{background-color:rgb(var(--be-primary)/var(--be-selected-opacity))}.pi .bg-warning{--tw-bg-opacity:1;background-color:rgb(243 164 50/var(--tw-bg-opacity))}.pi .bg-transparent{background-color:transparent}.pi .bg-danger{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}.pi .bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.pi .bg-toast{--tw-bg-opacity:1;background-color:rgb(50 50 50/var(--tw-bg-opacity))}.pi .bg-focus{background-color:rgb(var(--be-foreground-base)/var(--be-focus-opacity))}.pi .bg-black\\/30{background-color:#0000004d}.pi .bg-primary-light{--tw-bg-opacity:1;background-color:rgb(var(--be-primary-light)/var(--tw-bg-opacity))}.pi .bg-fg-base\\/4{background-color:rgb(var(--be-foreground-base)/4%)}.pi .bg-positive{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity))}.pi .bg-inherit{background-color:inherit}.pi .bg-background\\/70{background-color:rgb(var(--be-background)/.7)}.pi .bg-envato{--tw-bg-opacity:1;background-color:rgb(108 161 43/var(--tw-bg-opacity))}.pi .bg-disabled{background-color:rgb(var(--be-foreground-base)/var(--be-disabled-bg-opacity))}.pi .bg-disabled-fg{background-color:rgb(var(--be-foreground-base)/var(--be-disabled-fg-opacity))}.pi .bg-slider-disabled{--tw-bg-opacity:1;background-color:rgb(189 189 189/var(--tw-bg-opacity))}.pi .bg-primary-dark{--tw-bg-opacity:1;background-color:rgb(var(--be-primary-dark)/var(--tw-bg-opacity))}.pi .bg-white\\/50{background-color:#ffffff80}.pi .bg-black\\/50{background-color:#00000080}.pi .bg-primary-light\\/40{background-color:rgb(var(--be-primary-light)/.4)}.pi .bg-positive-lighter{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity))}.pi .bg-danger-lighter{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity))}.pi .bg-opacity-95{--tw-bg-opacity:.95}.pi .bg-no-repeat{background-repeat:no-repeat}.pi .fill-current{fill:currentColor}.pi .fill-transparent{fill:transparent}.pi .stroke-current{stroke:currentColor}.pi .object-contain{-o-object-fit:contain;object-fit:contain}.pi .object-cover{-o-object-fit:cover;object-fit:cover}.pi .p-0{padding:0}.pi .p-14{padding:14px}.pi .p-16{padding:16px}.pi .p-24{padding:24px}.pi .p-10{padding:10px}.pi .p-8{padding:8px}.pi .p-6{padding:6px}.pi .p-12{padding:12px}.pi .p-20{padding:20px}.pi .p-4{padding:4px}.pi .p-18{padding:18px}.pi .p-40{padding:40px}.pi .p-2{padding:2px}.pi .px-24{padding-left:24px;padding-right:24px}.pi .py-20{padding-bottom:20px;padding-top:20px}.pi .px-6{padding-left:6px;padding-right:6px}.pi .px-8{padding-left:8px;padding-right:8px}.pi .py-12{padding-bottom:12px;padding-top:12px}.pi .px-16{padding-left:16px;padding-right:16px}.pi .py-14{padding-bottom:14px;padding-top:14px}.pi .px-14{padding-left:14px;padding-right:14px}.pi .px-20{padding-left:20px;padding-right:20px}.pi .px-32{padding-left:32px;padding-right:32px}.pi .py-10{padding-bottom:10px;padding-top:10px}.pi .px-4{padding-left:4px;padding-right:4px}.pi .px-10{padding-left:10px;padding-right:10px}.pi .py-2{padding-bottom:2px;padding-top:2px}.pi .px-5vw{padding-left:5vw;padding-right:5vw}.pi .px-12{padding-left:12px;padding-right:12px}.pi .py-\\[9px\\]{padding-bottom:9px;padding-top:9px}.pi .px-40{padding-left:40px;padding-right:40px}.pi .py-32{padding-bottom:32px;padding-top:32px}.pi .px-28{padding-left:28px;padding-right:28px}.pi .py-56{padding-bottom:56px;padding-top:56px}.pi .py-28{padding-bottom:28px;padding-top:28px}.pi .py-90{padding-bottom:5.625rem;padding-top:5.625rem}.pi .py-4{padding-bottom:4px;padding-top:4px}.pi .px-18{padding-left:18px;padding-right:18px}.pi .px-22{padding-left:22px;padding-right:22px}.pi .px-26{padding-left:26px;padding-right:26px}.pi .py-8{padding-bottom:8px;padding-top:8px}.pi .py-96{padding-bottom:96px;padding-top:96px}.pi .py-6{padding-bottom:6px;padding-top:6px}.pi .py-3{padding-bottom:3px;padding-top:3px}.pi .py-5{padding-bottom:5px;padding-top:5px}.pi .py-40{padding-bottom:40px;padding-top:40px}.pi .pt-14{padding-top:14px}.pi .pt-24{padding-top:24px}.pi .pb-12{padding-bottom:12px}.pi .pt-26{padding-top:26px}.pi .pb-16{padding-bottom:16px}.pi .pb-24{padding-bottom:24px}.pi .pt-50{padding-top:50px}.pi .pt-20{padding-top:20px}.pi .pb-10{padding-bottom:10px}.pi .pb-4{padding-bottom:4px}.pi .pr-10{padding-right:10px}.pi .pl-10{padding-left:10px}.pi .pb-20{padding-bottom:20px}.pi .pb-30{padding-bottom:30px}.pi .pt-30{padding-top:30px}.pi .pl-8{padding-left:8px}.pi .pb-14{padding-bottom:14px}.pi .pl-14{padding-left:14px}.pi .pt-54{padding-top:3.375rem}.pi .pb-28{padding-bottom:28px}.pi .pb-48{padding-bottom:48px}.pi .pb-safe-area{padding-bottom:env(safe-area-inset-bottom)}.pi .pl-24{padding-left:24px}.pi .pr-16{padding-right:16px}.pi .pr-24{padding-right:24px}.pi .pl-16{padding-left:16px}.pi .pr-6{padding-right:6px}.pi .pb-18{padding-bottom:18px}.pi .pt-6{padding-top:6px}.pi .pt-16{padding-top:16px}.pi .pt-10{padding-top:10px}.pi .pl-12{padding-left:12px}.pi .pr-12{padding-right:12px}.pi .pb-6{padding-bottom:6px}.pi .pt-42{padding-top:42px}.pi .pb-32{padding-bottom:32px}.pi .pt-70{padding-top:70px}.pi .pt-40{padding-top:40px}.pi .pr-8{padding-right:8px}.pi .pl-46{padding-left:2.875rem}.pi .pr-46{padding-right:2.875rem}.pi .pl-6{padding-left:6px}.pi .pl-18{padding-left:18px}.pi .pr-18{padding-right:18px}.pi .text-left{text-align:left}.pi .text-center{text-align:center}.pi .text-right{text-align:right}.pi .align-top{vertical-align:top}.pi .align-middle{vertical-align:middle}.pi .text-sm{font-size:14px;line-height:20px}.pi .text-xs{font-size:12px;line-height:16px}.pi .text-xl{font-size:20px;line-height:28px}.pi .text-6xl{font-size:60px;line-height:1}.pi .text-2xl{font-size:24px;line-height:32px}.pi .text-3xl{font-size:30px;line-height:36px}.pi .text-base{font-size:16px;line-height:24px}.pi .text-lg{font-size:18px;line-height:28px}.pi .text-4xl{font-size:36px;line-height:40px}.pi .font-medium{font-weight:500}.pi .font-semibold{font-weight:600}.pi .font-light{font-weight:300}.pi .font-bold{font-weight:700}.pi .font-normal{font-weight:400}.pi .uppercase{text-transform:uppercase}.pi .capitalize{text-transform:capitalize}.pi .italic{font-style:italic}.pi .tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.pi .leading-none{line-height:1}.pi .leading-5{line-height:1.25rem}.pi .tracking-wide{letter-spacing:.025em}.pi .text,.pi .text-main{color:rgb(var(--be-foreground-base)/var(--be-text-main-opacity))}.pi .text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.pi .text-muted{color:rgb(var(--be-foreground-base)/var(--be-text-muted-opacity))}.pi .text-positive{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity))}.pi .text-danger{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}.pi .text-primary{--tw-text-opacity:1;color:rgb(var(--be-primary)/var(--tw-text-opacity))}.pi .\\!text{color:rgb(var(--be-foreground-base)/var(--be-text-main-opacity))!important}.pi .text-facebook{--tw-text-opacity:1;color:rgb(59 89 152/var(--tw-text-opacity))}.pi .text-twitter{--tw-text-opacity:1;color:rgb(29 161 242/var(--tw-text-opacity))}.pi .text-positive-darker{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity))}.pi .text-disabled{color:rgb(var(--be-foreground-base)/var(--be-disabled-fg-opacity))}.pi .text-on-primary{--tw-text-opacity:1;color:rgb(var(--be-on-primary)/var(--tw-text-opacity))}.pi .text-primary-light{--tw-text-opacity:1;color:rgb(var(--be-primary-light)/var(--tw-text-opacity))}.pi .text-primary\\/40{color:rgb(var(--be-primary)/.4)}.pi .text-black\\/30{color:#0000004d}.pi .text-danger-darker{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity))}.pi .underline{text-decoration-line:underline}.pi .no-underline{text-decoration-line:none}.pi .caret-transparent{caret-color:transparent}.pi .opacity-0{opacity:0}.pi .opacity-100{opacity:1}.pi .opacity-80{opacity:.8}.pi .opacity-90{opacity:.9}.pi .shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.pi .shadow,.pi .shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.pi .shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.pi .shadow-\\[15px_0_30px_0_rgb\\(0_0_0_\\/_18\\%\\)\\],.pi .shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .shadow-\\[15px_0_30px_0_rgb\\(0_0_0_\\/_18\\%\\)\\]{--tw-shadow:15px 0 30px 0 rgba(0,0,0,.18);--tw-shadow-colored:15px 0 30px 0 var(--tw-shadow-color)}.pi .shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.pi .shadow-md,.pi .shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.pi .shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .outline-none{outline:2px solid transparent;outline-offset:2px}.pi .outline{outline-color:rgb(var(--be-primary-lighter)/1);outline-style:solid;outline-width:2px}.pi .ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .ring-inset{--tw-ring-inset:inset}.pi .ring-offset-4{--tw-ring-offset-width:4px}.pi .blur{--tw-blur:blur(8px)}.pi .blur,.pi .grayscale{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.pi .grayscale{--tw-grayscale:grayscale(100%)}.pi .invert{--tw-invert:invert(100%)}.pi .invert,.pi .sepia{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.pi .sepia{--tw-sepia:sepia(100%)}.pi .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.pi .transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-shadow{transition-duration:.15s;transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-bg-color{transition-duration:.15s;transition-property:background-color;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-button{transition-duration:.15s;transition-property:background-color,box-shadow,border-color,color;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-width{transition-duration:.15s;transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .duration-200{transition-duration:.2s}.pi .duration-100{transition-duration:.1s}.pi .will-change-\\[width\\]{will-change:width}.pi .will-change-transform{will-change:transform}.pi .icon-2xs{font-size:.75rem}.pi .icon-xs{font-size:1rem}.pi .icon-sm{font-size:1.25rem}.pi .icon-md{font-size:1.5rem}.pi .icon-lg{font-size:2.1875rem}.pi .icon-xl{font-size:2.6875rem}.pi .col-w-1{flex:1 0 0px}.pi .col-w-2{flex:2 0 0px}.pi .col-w-3{flex:3 0 0px}.pi .no-tap-highlight{-webkit-tap-highlight-color:transparent}@media only screen and (min-device-width:768px){.pi .tiny-scrollbar{scrollbar-color:rgba(0,0,0,.2) transparent;scrollbar-width:thin}.pi .tiny-scrollbar::-webkit-scrollbar{background-color:transparent;height:6px;width:6px}.pi .tiny-scrollbar::-webkit-scrollbar-thumb{background-color:rgb(var(--be-foreground-base)/.2);border-radius:10px}.pi .tiny-scrollbar::-webkit-scrollbar-track-piece:start{background:transparent}.pi .tiny-scrollbar::-webkit-scrollbar-track-piece:end{background:transparent}}.pi .hide-scrollbar{scrollbar-width:none}.pi .hide-scrollbar::-webkit-scrollbar{background:transparent;height:0;width:0}.pi .svg-icon{fill:currentColor;display:inline-block;flex-shrink:0;transition-duration:.15s;transition-property:transform,fill;transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-user-select:none;-moz-user-select:none;user-select:none}.pi .cropzone:not(.moving) .cropzone-transition{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .first-letter\\:capitalize:first-letter{text-transform:capitalize}.pi .file\\:mr-10::file-selector-button{margin-right:10px}.pi .file\\:h-24::file-selector-button{height:24px}.pi .file\\:rounded::file-selector-button{border-radius:4px}.pi .file\\:border-none::file-selector-button{border-style:none}.pi .file\\:bg-primary::file-selector-button{--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity))}.pi .file\\:px-10::file-selector-button{padding-left:10px;padding-right:10px}.pi .file\\:text-sm::file-selector-button{font-size:14px;line-height:20px}.pi .file\\:font-semibold::file-selector-button{font-weight:600}.pi .file\\:text-on-primary::file-selector-button{--tw-text-opacity:1;color:rgb(var(--be-on-primary)/var(--tw-text-opacity))}.pi .before\\:absolute:before{content:var(--tw-content);position:absolute}.pi .before\\:left-0:before{content:var(--tw-content);left:0}.pi .before\\:top-1\\/2:before{content:var(--tw-content);top:50%}.pi .before\\:z-10:before{content:var(--tw-content);z-index:10}.pi .before\\:block:before{content:var(--tw-content);display:block}.pi .before\\:h-1:before{content:var(--tw-content);height:1px}.pi .before\\:h-full:before{content:var(--tw-content);height:100%}.pi .before\\:h-28:before{content:var(--tw-content);height:28px}.pi .before\\:h-22:before{content:var(--tw-content);height:22px}.pi .before\\:h-18:before{content:var(--tw-content);height:18px}.pi .before\\:h-12:before{content:var(--tw-content);height:12px}.pi .before\\:h-14:before{content:var(--tw-content);height:14px}.pi .before\\:w-full:before{content:var(--tw-content);width:100%}.pi .before\\:w-28:before{content:var(--tw-content);width:28px}.pi .before\\:w-22:before{content:var(--tw-content);width:22px}.pi .before\\:w-18:before{content:var(--tw-content);width:18px}.pi .before\\:w-12:before{content:var(--tw-content);width:12px}.pi .before\\:w-14:before{content:var(--tw-content);width:14px}.pi .before\\:-translate-y-1\\/2:before{--tw-translate-y:-50%}.pi .before\\:-translate-y-1\\/2:before,.pi .before\\:translate-x-2:before{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .before\\:translate-x-2:before{--tw-translate-x:2px}.pi .before\\:scale-10:before{--tw-scale-x:.1;--tw-scale-y:.1;content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .before\\:rounded-full:before{border-radius:9999px;content:var(--tw-content)}.pi .before\\:rounded-3xl:before{border-radius:24px;content:var(--tw-content)}.pi .before\\:border:before{border-width:1px;content:var(--tw-content)}.pi .before\\:bg-divider:before{background-color:rgb(var(--be-foreground-base)/var(--be-divider-opacity));content:var(--tw-content)}.pi .before\\:bg-primary:before{--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity));content:var(--tw-content)}.pi .before\\:bg-white:before{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));content:var(--tw-content)}.pi .before\\:opacity-0:before{content:var(--tw-content);opacity:0}.pi .before\\:transition:before{content:var(--tw-content);transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .before\\:transition-transform:before{content:var(--tw-content);transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .before\\:duration-200:before{content:var(--tw-content);transition-duration:.2s}.pi .before\\:content-\\[\\\\\\\\00a0\\]:before{--tw-content:\\\\00a0;content:var(--tw-content)}.pi .after\\:pointer-events-none:after{content:var(--tw-content);pointer-events:none}.pi .after\\:absolute:after{content:var(--tw-content);position:absolute}.pi .after\\:inset-0:after{bottom:0;content:var(--tw-content);left:0;right:0;top:0}.pi .first\\:capitalize:first-child{text-transform:capitalize}.pi .checked\\:border-primary:checked{--tw-border-opacity:1;border-color:rgb(var(--be-primary)/var(--tw-border-opacity))}.pi .checked\\:border-danger:checked{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.pi .checked\\:bg-primary:checked{--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity))}.pi .checked\\:bg-danger:checked{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}.pi .checked\\:before\\:translate-x-36:checked:before{--tw-translate-x:36px}.pi .checked\\:before\\:translate-x-30:checked:before,.pi .checked\\:before\\:translate-x-36:checked:before{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .checked\\:before\\:translate-x-30:checked:before{--tw-translate-x:30px}.pi .checked\\:before\\:translate-x-24:checked:before{--tw-translate-x:24px}.pi .checked\\:before\\:translate-x-16:checked:before,.pi .checked\\:before\\:translate-x-24:checked:before{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .checked\\:before\\:translate-x-16:checked:before{--tw-translate-x:16px}.pi .checked\\:before\\:translate-x-20:checked:before{--tw-translate-x:20px}.pi .checked\\:before\\:scale-\\[\\.65\\]:checked:before,.pi .checked\\:before\\:translate-x-20:checked:before{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .checked\\:before\\:scale-\\[\\.65\\]:checked:before{--tw-scale-x:.65;--tw-scale-y:.65}.pi .checked\\:before\\:border-white:checked:before{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity));content:var(--tw-content)}.pi .checked\\:before\\:opacity-100:checked:before{content:var(--tw-content);opacity:1}.pi .focus-within\\:border-primary\\/60:focus-within{border-color:rgb(var(--be-primary)/.6)}.pi .focus-within\\:ring:focus-within{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .focus-within\\:ring-primary\\/focus:focus-within{--tw-ring-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .focus-within\\:ring-primary-light:focus-within{--tw-ring-opacity:1;--tw-ring-color:rgb(var(--be-primary-light)/var(--tw-ring-opacity))}.pi .hover\\:scale-105:hover{--tw-scale-x:1.05;--tw-scale-y:1.05}.pi .hover\\:scale-105:hover,.pi .hover\\:scale-110:hover{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .hover\\:scale-110:hover{--tw-scale-x:1.1;--tw-scale-y:1.1}.pi .hover\\:cursor-move:hover{cursor:move}.pi .hover\\:border-primary:hover{--tw-border-opacity:1;border-color:rgb(var(--be-primary)/var(--tw-border-opacity))}.pi .hover\\:border-danger:hover{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.pi .hover\\:border-primary-dark:hover{--tw-border-opacity:1;border-color:rgb(var(--be-primary-dark)/var(--tw-border-opacity))}.pi .hover\\:border-danger\\/90:hover{border-color:#ef4444e6}.pi .hover\\:border-chip\\/90:hover{border-color:rgb(var(--be-background-chip)/.9)}.pi .hover\\:bg-hover:hover{background-color:rgb(var(--be-foreground-base)/var(--be-hover-opacity))}.pi .hover\\:bg-primary\\/10:hover{background-color:rgb(var(--be-primary)/.1)}.pi .hover\\:bg-white\\/hover:hover{background-color:rgb(255 255 255/var(--be-hover-opacity))}.pi .hover\\:bg-primary\\/hover:hover{background-color:rgb(var(--be-primary)/var(--be-hover-opacity))}.pi .hover\\:bg-danger\\/4:hover{background-color:#ef44440a}.pi .hover\\:bg-primary\\/4:hover{background-color:rgb(var(--be-primary)/4%)}.pi .hover\\:bg-primary-dark:hover{--tw-bg-opacity:1;background-color:rgb(var(--be-primary-dark)/var(--tw-bg-opacity))}.pi .hover\\:bg-danger\\/90:hover{background-color:#ef4444e6}.pi .hover\\:bg-chip\\/90:hover{background-color:rgb(var(--be-background-chip)/.9)}.pi .hover\\:bg-paper\\/90:hover{background-color:rgb(var(--be-paper)/.9)}.pi .hover\\:bg-primary\\/focus:hover{background-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .hover\\:bg-fg-base\\/15:hover{background-color:rgb(var(--be-foreground-base)/15%)}.pi .hover\\:text-primary-dark:hover{--tw-text-opacity:1;color:rgb(var(--be-primary-dark)/var(--tw-text-opacity))}.pi .hover\\:text-main:hover{color:rgb(var(--be-foreground-base)/var(--be-text-main-opacity))}.pi .hover\\:text-fg-base:hover{--tw-text-opacity:1;color:rgb(var(--be-foreground-base)/var(--tw-text-opacity))}.pi .hover\\:underline:hover{text-decoration-line:underline}.pi .hover\\:opacity-100:hover{opacity:1}.pi .hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .before\\:hover\\:bg-primary-dark:hover:before{--tw-bg-opacity:1;background-color:rgb(var(--be-primary-dark)/var(--tw-bg-opacity));content:var(--tw-content)}.pi .hover\\:after\\:bg-black\\/5:hover:after{background-color:#0000000d;content:var(--tw-content)}.pi .checked\\:hover\\:border-primary-dark:hover:checked{--tw-border-opacity:1;border-color:rgb(var(--be-primary-dark)/var(--tw-border-opacity))}.pi .focus\\:border-danger\\/60:focus{border-color:#ef444499}.pi .focus\\:border-primary\\/60:focus{border-color:rgb(var(--be-primary)/.6)}.pi .focus\\:bg-primary:focus{--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity))}.pi .focus\\:text-on-primary:focus{--tw-text-opacity:1;color:rgb(var(--be-on-primary)/var(--tw-text-opacity))}.pi .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.pi .focus\\:ring:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.pi .focus\\:ring-2:focus,.pi .focus\\:ring:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .focus\\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.pi .focus\\:ring-danger\\/focus:focus{--tw-ring-color:rgb(239 68 68/var(--be-focus-opacity))}.pi .focus\\:ring-primary\\/focus:focus{--tw-ring-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px}.pi .focus\\:after\\:bg-black\\/10:focus:after{background-color:#0000001a;content:var(--tw-content)}.pi .focus-visible\\:bg-primary\\/focus:focus-visible{background-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .focus-visible\\:bg-focus:focus-visible{background-color:rgb(var(--be-foreground-base)/var(--be-focus-opacity))}.pi .focus-visible\\:outline:focus-visible{outline-style:solid;outline-width:2px}.pi .focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.pi .focus-visible\\:outline:focus-visible{outline-color:rgb(var(--be-primary-lighter)/1)}.pi .focus-visible\\:outline-primary-light:focus-visible{outline-color:rgb(var(--be-primary-light)/1)}.pi .focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .focus-visible\\:ring:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .disabled\\:pointer-events-none:disabled{pointer-events:none}.pi .disabled\\:cursor-default:disabled{cursor:default}.pi .disabled\\:border-disabled-bg:disabled{border-color:rgb(var(--be-foreground-base)/var(--be-disabled-bg-opacity))}.pi .disabled\\:border-transparent:disabled{border-color:transparent}.pi .disabled\\:border-disabled-fg:disabled{border-color:rgb(var(--be-foreground-base)/var(--be-disabled-fg-opacity))}.pi .disabled\\:border-r-transparent:disabled{border-right-color:transparent}.pi .disabled\\:bg-transparent:disabled{background-color:transparent}.pi .disabled\\:bg-disabled:disabled{background-color:rgb(var(--be-foreground-base)/var(--be-disabled-bg-opacity))}.pi .disabled\\:text-disabled:disabled{color:rgb(var(--be-foreground-base)/var(--be-disabled-fg-opacity))}.pi .disabled\\:shadow-none:disabled{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .disabled\\:before\\:bg-disabled-fg:disabled:before{background-color:rgb(var(--be-foreground-base)/var(--be-disabled-fg-opacity));content:var(--tw-content)}.pi .dark .dark\\:bg-alt{--tw-bg-opacity:1;background-color:rgb(var(--be-background-alt)/var(--tw-bg-opacity))}.pi .dark .dark\\:bg-none{background-image:none}.pi .dark .dark\\:text-white\\/50{color:#ffffff80}.pi .dark .dark\\:opacity-5{opacity:.05}.pi .dark .dark\\:opacity-80{opacity:.8}.pi .dark .dark\\:checked\\:border-primary-dark:checked{--tw-border-opacity:1;border-color:rgb(var(--be-primary-dark)/var(--tw-border-opacity))}.pi .dark .dark\\:checked\\:bg-primary-dark:checked{--tw-bg-opacity:1;background-color:rgb(var(--be-primary-dark)/var(--tw-bg-opacity))}@media (min-width:640px){.pi .sm\\:justify-start{justify-content:flex-start}.pi .sm\\:text-sm{font-size:14px;line-height:20px}}@media (min-width:768px){.pi .md\\:invisible{visibility:hidden}.pi .md\\:my-24{margin-bottom:24px;margin-top:24px}.pi .md\\:mx-40{margin-left:40px;margin-right:40px}.pi .md\\:my-64{margin-bottom:64px;margin-top:64px}.pi .md\\:my-100{margin-bottom:6.25rem;margin-top:6.25rem}.pi .md\\:mr-0{margin-right:0}.pi .md\\:mb-0{margin-bottom:0}.pi .md\\:mr-10{margin-right:10px}.pi .md\\:mb-40{margin-bottom:40px}.pi .md\\:mb-24{margin-bottom:24px}.pi .md\\:mt-60{margin-top:60px}.pi .md\\:mb-70{margin-bottom:70px}.pi .md\\:mt-0{margin-top:0}.pi .md\\:mr-24{margin-right:24px}.pi .md\\:mr-80{margin-right:80px}.pi .md\\:block{display:block}.pi .md\\:flex{display:flex}.pi .md\\:h-0{height:0}.pi .md\\:w-min{width:-moz-min-content;width:min-content}.pi .md\\:w-320{width:320px}.pi .md\\:w-400{width:25rem}.pi .md\\:min-w-440{min-width:27.5rem}.pi .md\\:max-w-950{max-width:59.375rem}.pi .md\\:max-w-350{max-width:21.875rem}.pi .md\\:flex-row{flex-direction:row}.pi .md\\:items-start{align-items:flex-start}.pi .md\\:gap-12{gap:12px}.pi .md\\:gap-24{gap:24px}.pi .md\\:gap-80{gap:80px}.pi .md\\:gap-112{gap:112px}.pi .md\\:overflow-hidden{overflow:hidden}.pi .md\\:p-24{padding:24px}.pi .md\\:px-24{padding-left:24px;padding-right:24px}.pi .md\\:px-30{padding-left:30px;padding-right:30px}.pi .md\\:px-0{padding-left:0;padding-right:0}.pi .md\\:px-20{padding-left:20px;padding-right:20px}.pi .md\\:py-80{padding-bottom:80px;padding-top:80px}.pi .md\\:px-176{padding-left:176px;padding-right:176px}.pi .md\\:px-10vw{padding-left:10vw;padding-right:10vw}.pi .md\\:pt-128{padding-top:128px}.pi .md\\:pl-20{padding-left:20px}.pi .md\\:pb-0{padding-bottom:0}.pi .md\\:pb-54{padding-bottom:3.375rem}.pi .md\\:text-left{text-align:left}.pi .md\\:text-3xl{font-size:30px;line-height:36px}.pi .md\\:text-4xl{font-size:36px;line-height:40px}.pi .md\\:text-lg{font-size:18px;line-height:28px}.pi .md\\:text-base{font-size:16px;line-height:24px}.pi .md\\:font-medium{font-weight:500}.pi .md\\:font-normal{font-weight:400}.pi .md\\:shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}}@media (min-width:1024px){.pi .lg\\:min-w-500{min-width:31.25rem}.pi .lg\\:flex-row{flex-direction:row}.pi .lg\\:items-center{align-items:center}.pi .lg\\:px-96{padding-left:96px;padding-right:96px}.pi .lg\\:py-96{padding-bottom:96px;padding-top:96px}.pi .lg\\:pb-0{padding-bottom:0}}@media (min-width:1280px){.pi .xl\\:w-1\\/2{width:50%}.pi .xl\\:pt-96{padding-top:96px}}.pi .\\[\\&\\>\\.tree-label\\]\\:focus-visible\\:ring:focus-visible>.tree-label{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .\\[\\&\\>\\.tree-label\\]\\:focus-visible\\:ring-2:focus-visible>.tree-label{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .\\[\\&\\>\\.tree-label\\]\\:focus-visible\\:ring-inset:focus-visible>.tree-label{--tw-ring-inset:inset}\n'),!e.selector)throw new Error('Pixie required "selector" option.');const t=document.querySelector(e.selector);t&&(t.classList.add("pi"),function(e){ad=e}(t),this.setConfig(e),cd.setState({editor:this}),Ad(t).render(Hl(i.StrictMode,{children:Hl(XI,{})})))}get state(){return ud()}get defaultConfig(){return KI.defaultConfig}open(e={}){var t;null!=(t=ud().config.ui)&&t.visible||(this.setConfig(ro(e,{ui:{visible:!0}})),requestAnimationFrame(()=>{var e,t,n,r;hd().zoom.fitToScreen(),hd().history.addInitial(),yd()&&(null==(t=null==(e=ud().config.ui)?void 0:e.openImageDialog)?void 0:t.show)&&this.togglePanel("newImage",!0),null==(r=(n=ud().config).onOpen)||r.call(n)}))}close(){var e,t,n;null==(e=ud().config.ui)||!e.visible||(this.setConfig({ui:{visible:!1}}),null==(n=(t=ud().config).onClose)||n.call(t))}setConfig(e){ud().setConfig(e)}uploadAndAddImage(){return hd().import.uploadAndAddImage()}uploadAndReplaceMainImage(){return hd().import.uploadAndReplaceMainImage()}uploadAndOpenStateFile(){return hd().import.uploadAndOpenStateFile()}newCanvas(e,t,n){return hd().canvas.openNew(e,t,n)}getState(e){return JSON.stringify(md(e))}setState(e){return hd().import.loadState(e)}async setStateFromUrl(e){const t=await pd(e);return hd().import.loadState(t)}openTool(e){vd(e)}applyChanges(){ud().applyChanges()}cancelChanges(){ud().cancelChanges()}async resetEditor(e){await fd(e),await hd().canvas.loadInitialContent()}togglePanel(e,t){"objects"===e&&ud().togglePanel("history",!1),"history"===e&&ud().togglePanel("objects",!1),ud().togglePanel(e,t)}on(e,t){var n;null==(n=this.fabric)||n.on(e,t)}isDirty(){return ud().dirty}get(e){return this.tools[e]}notify(e){return Sd(e)}static init(e){return new Promise(t=>{const n=e.onLoad;e.onLoad=e=>{null==n||n(e),t(e)},new this(e)})}};let qI=KI;Yi(qI,"defaultConfig",Ic),Yi(qI,"version",Tc);const ZI="fm-pixie-editor";const JI=new class{constructor(){this._container=document.createElement("div"),this._instance=null,this._container.classList.add(ZI),this._container.style.width="100%",this._container.style.height="85vh",this._container.style.minHeight="400px"}get className(){return`.${ZI}`}get canvas(){var e,t;return null===(t=null===(e=this._instance)||void 0===e?void 0:e.state.canvasRef)||void 0===t?void 0:t.current}get tools(){var e;return null===(e=this._instance)||void 0===e?void 0:e.tools}isLoaded(){return!!this._instance}async _setConfig(e){this._instance?await this._instance.resetEditor(e):this._instance=await qI.init(Object.assign(Object.assign({},e),{selector:this.className}))}async show(e,t,n=t.firstChild){t.insertBefore(this._container,n),await this._setConfig(e),this._instance.open()}close(){var e;null===(e=this._container.parentNode)||void 0===e||e.removeChild(this._container)}},QI=(e,t="image/png")=>fetch(`data:${t};base64,${e}`).then(e=>e.blob());const eO=({visible:t,onClose:n,file:i,onSave:o})=>{const a=r.useRef(null),[s,l]=r.useState(null),[c,u]=r.useState(""),[h,d]=r.useState(!1),[f,p]=r.useState(!1),g=Xr(),m=r.useRef(!1),v=r.useRef(),b=r.useRef(void 0),[y,w]=r.useState(null);r.useEffect(()=>{i&&(async()=>{if(b.current!==i)if("object"!=typeof i)try{if(b.current=i,i.startsWith("data:"))w({thumbnail:i});else{const e=await g.handleAddFileByUrl(i,!0);if(!e)throw new Error("Не удалось загрузить файл");b.current===i&&w(e)}}finally{b.current===i&&(b.current=null)}else w(i)})()},[i,w]),v.current=o;const x=r.useCallback(async e=>{try{if(e.thumbnail&&e.thumbnail.startsWith("data:"))return e.thumbnail;const t=await g.getFileData(e.id);if(!t)throw new Error("Ошибка загрузки файла");return new Promise(e=>{const n=new FileReader;n.onload=()=>e(n.result),n.readAsDataURL(t)})}catch(e){throw console.error("Ошибка получения данных изображения:",e),e}},[g.getFileData]);r.useEffect(()=>{(async()=>{try{const e=y?await x(y):null;l(e);const t=y?y.type:"";u(t||"image/png")}catch(e){console.error("🎨 Ошибка загрузки изображения:",e),M.error("Ошибка загрузки изображения"),null==n||n()}})()},[t,y,x,n]);const _=r.useCallback(async(e,t,r)=>{if(y&&v.current)try{const t=await function(e,t){if("json"===e)return new Blob([t],{type:"application/json"});if("svg"===e)return new Blob([t],{type:"image/svg+xml"});let n=`image/${e}`;if("jpg"===e&&(n="image/jpeg"),t.startsWith("data:")){const e=t.match(/^data:([^;]+)/);e&&e[1].startsWith("image/")&&(n=e[1]);const r=t.replace(/data:image\/[^;]+;base64,/,"");return QI(r,n)}return QI(t,n)}(r,e);let i=t.type||`image/${r}`;"jpg"===r&&(i="image/jpeg");const o=e.startsWith("data:")?e:`data:${i};base64,${e}`,a=Object.assign(Object.assign({},y),{thumbnail:o,size:t.size.toString(),date:(new Date).toISOString().split("T")[0],type:i,folderId:y.folderId||"",name:y.name,extension:y.extension||y.name.split(".").pop()||""});await v.current(a),null==n||n()}catch(e){console.error("Ошибка сохранения:",e),M.error("Ошибка при сохранении изображения")}},[y,n]),C=r.useCallback(async()=>{var e;if(!JI.isLoaded()||!y)return void console.error("❌ Pixie instance или file отсутствует");const t=y.name||"edited-image",n=y.extension||c.split("/")[1]||"png";try{await(null===(e=JI.tools)||void 0===e?void 0:e.export.save(t.replace(/\.[^/.]+$/,""),n))}catch(e){console.error("🎨 Ошибка при сохранении через кнопку:",e);try{const e=JI.canvas,r=e?e.toDataURL(`image/${n}`):null;r&&await _(r,t,n)}catch(e){console.error("🎨 Альтернативный способ тоже не сработал:",e)}}},[y,c,_]),S=r.useCallback(async()=>{if(s&&t&&h&&!m.current)try{m.current=!0;const e=a.current;let t=0;for(;t<20&&(0===e.clientWidth||0===e.clientHeight);)await new Promise(e=>setTimeout(e,50)),t++;const n={selector:"#pixie-editor",image:s,activeLanguage:"ru-RU",ui:{mode:"inline",forceOverlayModeOnMobile:!1,visible:!0},tools:{filter:{items:["crop","resize","draw","text","shapes","frame","export","import"]}},onSave:async function(e,t,n){try{return await _(e,t,n)}catch(e){throw console.error("🎨 PIXIE onSave ERROR:",e),e}}};try{p(!1),await JI.show(n,a.current);const e=JI.canvas;e&&e.focus(),p(!0)}catch(e){console.error("init pixie failed:",e)}}catch(e){console.error("Ошибка инициализации Pixie:",e),M.error("Ошибка инициализации редактора"),m.current=!1,null==n||n()}},[s,t,h,n,_]);return r.useEffect(()=>{t&&s&&h&&S()},[t,s,h,null==y?void 0:y.id,S]),r.useEffect(()=>{if(!t){try{JI.close()}catch(e){console.warn("Ошибка при закрытии Pixie:",e)}l(null),u(""),m.current=!1,d(!1),p(!1)}return()=>{try{JI.close()}catch(e){console.warn("Ошибка при закрытии Pixie при размонтировании:",e)}}},[t]),e(H,{title:`Редактирование: ${(null==y?void 0:y.name)||"Изображение"}`,open:t,onCancel:n,afterOpenChange:e=>d(e),forceRender:!0,width:"95vw",style:{top:20},styles:{body:{height:"85vh",padding:0}},footer:[e(X,{onClick:n,children:"Отмена"},"cancel"),e(X,{type:"primary",onClick:C,children:"Сохранить"},"save")],maskClosable:!1,destroyOnClose:!1,children:e("div",{ref:a,style:{position:"relative",width:"100%",height:"100%"},children:t&&!f?e("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255,255,255,0.45)",backdropFilter:"blur(1px)",pointerEvents:"all",zIndex:10},children:e("span",{style:{fontSize:14,color:"#555"},children:"Загрузка редактора…"})}):null})})};var tO="container",nO="uploadCard",rO="header",iO="headerButton",oO="fileList",aO="fileItem",sO="fileAvatar",lO="fileInfo",cO="fileName",uO="fileSize",hO="progressBar",dO="errorNote",fO="minimizedContainer",pO="minimizedButton";const{Text:gO}=K,mO=({visible:n,files:r,totalFiles:i,completedFiles:o,onClose:a,onMinimize:s,onInsert:l,minimized:c=!1})=>{if(!n)return null;const{token:u}=T.useToken(),h=t=>{switch(t){case"success":return e(Se,{style:{color:u.colorSuccess}});case"error":return e(Ce,{style:{color:u.colorError}});default:return e(_e,{style:{color:"#1890ff"}})}},d=e=>{if(e.includes("КБ")||e.includes("MB")||e.includes("KB"))return e;const t=parseInt(e);return isNaN(t)?e:`${(t/1024).toFixed(2)} КБ`},f=t=>"success"===t.status?[e(X,{type:"primary",size:"small",onClick:()=>l(t.id),children:"Insert"},"insert")]:"error"===t.status?[e(gO,{type:"danger",style:{fontSize:"12px"},children:t.error||"Error"},"error")]:[];return e("div",c?{className:fO,children:t(X,{type:"primary",size:"small",onClick:s,className:pO,children:["Загрузка ",o,"/",i]})}:{className:tO,children:t(U,{className:nO,size:"small",title:t("div",{className:rO,children:[t(gO,{strong:!0,children:["Uploaded ",o,"/",i," files"]}),t(Q,{children:[e(X,{type:"text",size:"small",icon:e(we,{}),onClick:s,className:iO}),e(X,{type:"text",size:"small",icon:e(xe,{}),onClick:a,className:iO})]})]}),bodyStyle:{padding:"12px"},children:[e(q,{className:oO,size:"small",dataSource:r,renderItem:n=>e(q.Item,{className:aO,actions:f(n),children:e(q.Item.Meta,{avatar:e(J,{size:"small",icon:h(n.status),className:sO}),title:t("div",{className:lO,children:[e(gO,{ellipsis:!0,className:cO,children:n.name}),e(gO,{type:"secondary",className:uO,children:d(n.size)})]}),description:"uploading"===n.status&&e(Z,{percent:n.progress,size:"small",status:"active",showInfo:!1,className:hO})})})}),r.some(e=>"error"===e.status)&&e("div",{className:dO,children:e(gO,{type:"danger",style:{fontSize:"12px"},children:"Некоторые файлы не удалось загрузить. Проверьте размер и формат файлов."})})]})})},{Header:vO}=ee,{Text:bO,Title:yO}=K,wO=({selectedFiles:i,onClearSelection:o,onRename:a,onDelete:s,onCopy:l,onMove:c,onEdit:u,files:h})=>{const{t:d}=br(),f=i.size,p=r.useMemo(()=>{var e,t;if(1!==f)return!1;const n=Array.from(i)[0],r=h.find(e=>e.id===n);if(!r||r.isFolder)return!1;let o=!1;if(r.type&&r.type.startsWith("image/"))o=!0;else if(r.extension){const e=r.extension.toLowerCase();o=Br.includes(e)}else{const t=null===(e=r.name.split(".").pop())||void 0===e?void 0:e.toLowerCase();o=!!t&&Br.includes(t)}return console.log("isImageSelected проверка:",{fileName:r.name,fileType:r.type,fileExtension:r.extension,nameExtension:null===(t=r.name.split(".").pop())||void 0===t?void 0:t.toLowerCase(),isImage:o,IMAGE_EXTENSIONS:Br}),o},[f,i,h]);return t(vO,{className:"actions-header",children:[t("div",{className:"header-title-container",children:[e(yO,{level:5,className:"header-title",children:d("Files")}),f>0&&t(bO,{type:"secondary",className:"selected-text",children:[f," ",d("selected")]})]}),e(Q,{children:f>0?t(n,{children:[e(X,{icon:e(xe,{}),onClick:o,children:d("Deselected")}),e(X,{icon:e(ye,{}),onClick:a,disabled:1!==f,children:d("Rename")}),e(X,{icon:e(Ae,{}),onClick:u,disabled:!p,title:p?"Редактировать изображение":"Выберите одно изображение для редактирования",children:d("Edit")}),e(X,{icon:e(ke,{}),onClick:l,children:d("Copy")}),e(X,{icon:e(ve,{}),onClick:c,children:d("Move to folder")}),e(X,{danger:!0,icon:e(Te,{}),onClick:s,children:d("Delete")})]}):null})]})};
81
81
  /*! *****************************************************************************
82
82
  Copyright (c) Microsoft Corporation. All rights reserved.
83
83
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
@@ -92,5 +92,5 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
92
92
  See the Apache Version 2.0 License for specific language governing permissions
93
93
  and limitations under the License.
94
94
  ***************************************************************************** */
95
- var xO=function(e,t){return xO=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},xO(e,t)};var _O=function(){return _O=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_O.apply(this,arguments)};var CO="Pixel",SO="Percent",AO={unit:SO,value:.8};function kO(e){return"number"==typeof e?{unit:SO,value:100*e}:"string"==typeof e?e.match(/^(\d*(\.\d+)?)px$/)?{unit:CO,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:SO,value:parseFloat(e)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),AO):(console.warn("scrollThreshold should be string or number"),AO)}var TO=function(e){function t(t){var n=e.call(this,t)||this;return n.lastScrollTop=0,n.actionTriggered=!1,n.startY=0,n.currentY=0,n.dragging=!1,n.maxPullDownDistance=0,n.getScrollableTarget=function(){return n.props.scrollableTarget instanceof HTMLElement?n.props.scrollableTarget:"string"==typeof n.props.scrollableTarget?document.getElementById(n.props.scrollableTarget):(null===n.props.scrollableTarget&&console.warn("You are trying to pass scrollableTarget but it is null. This might\n happen because the element may not have been added to DOM yet.\n See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.\n "),null)},n.onStart=function(e){n.lastScrollTop||(n.dragging=!0,e instanceof MouseEvent?n.startY=e.pageY:e instanceof TouchEvent&&(n.startY=e.touches[0].pageY),n.currentY=n.startY,n._infScroll&&(n._infScroll.style.willChange="transform",n._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},n.onMove=function(e){n.dragging&&(e instanceof MouseEvent?n.currentY=e.pageY:e instanceof TouchEvent&&(n.currentY=e.touches[0].pageY),n.currentY<n.startY||(n.currentY-n.startY>=Number(n.props.pullDownToRefreshThreshold)&&n.setState({pullToRefreshThresholdBreached:!0}),n.currentY-n.startY>1.5*n.maxPullDownDistance||n._infScroll&&(n._infScroll.style.overflow="visible",n._infScroll.style.transform="translate3d(0px, "+(n.currentY-n.startY)+"px, 0px)")))},n.onEnd=function(){n.startY=0,n.currentY=0,n.dragging=!1,n.state.pullToRefreshThresholdBreached&&(n.props.refreshFunction&&n.props.refreshFunction(),n.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame(function(){n._infScroll&&(n._infScroll.style.overflow="auto",n._infScroll.style.transform="none",n._infScroll.style.willChange="unset")})},n.onScrollListener=function(e){"function"==typeof n.props.onScroll&&setTimeout(function(){return n.props.onScroll&&n.props.onScroll(e)},0);var t=n.props.height||n._scrollableNode?e.target:document.documentElement.scrollTop?document.documentElement:document.body;n.actionTriggered||((n.props.inverse?n.isElementAtTop(t,n.props.scrollThreshold):n.isElementAtBottom(t,n.props.scrollThreshold))&&n.props.hasMore&&(n.actionTriggered=!0,n.setState({showLoader:!0}),n.props.next&&n.props.next()),n.lastScrollTop=t.scrollTop)},n.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:t.dataLength},n.throttledOnScrollListener=function(e,t,n,r){var i,o=!1,a=0;function s(){i&&clearTimeout(i)}function l(){var l=this,c=Date.now()-a,u=arguments;function h(){a=Date.now(),n.apply(l,u)}o||(r&&!i&&h(),s(),void 0===r&&c>e?h():!0!==t&&(i=setTimeout(r?function(){i=void 0}:h,void 0===r?e-c:e)))}return"boolean"!=typeof t&&(r=n,n=t,t=void 0),l.cancel=function(){s(),o=!0},l}(150,n.onScrollListener).bind(n),n.onStart=n.onStart.bind(n),n.onMove=n.onMove.bind(n),n.onEnd=n.onEnd.bind(n),n}return function(e,t){function n(){this.constructor=e}xO(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){if(void 0===this.props.dataLength)throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),"number"==typeof this.props.initialScrollY&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),"function"!=typeof this.props.refreshFunction))throw new Error('Mandatory prop "refreshFunction" missing.\n Pull Down To Refresh functionality will not work\n as expected. Check README.md for usage\'')},t.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},t.prototype.componentDidUpdate=function(e){this.props.dataLength!==e.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},t.getDerivedStateFromProps=function(e,t){return e.dataLength!==t.prevDataLength?_O(_O({},t),{prevDataLength:e.dataLength}):null},t.prototype.isElementAtTop=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,r=kO(t);return r.unit===CO?e.scrollTop<=r.value+n-e.scrollHeight+1:e.scrollTop<=r.value/100+n-e.scrollHeight+1},t.prototype.isElementAtBottom=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,r=kO(t);return r.unit===CO?e.scrollTop+n>=e.scrollHeight-r.value:e.scrollTop+n>=r.value/100*e.scrollHeight},t.prototype.render=function(){var e=this,t=_O({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),n=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),r=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return i.createElement("div",{style:r,className:"infinite-scroll-component__outerdiv"},i.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(t){return e._infScroll=t},style:t},this.props.pullDownToRefresh&&i.createElement("div",{style:{position:"relative"},ref:function(t){return e._pullDown=t}},i.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!n&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},t}(S),IO={gifTab:"gifTab",gifSearchInput:"gifSearchInput",scrollableDiv:"scrollableDiv",listItem:"listItem",loaded:"loaded",loadedImage:"loadedImage"};const OO=e(Ie,{style:{fontSize:20},spin:!0}),EO=({setImageGifList:n,imageGifList:r=[],currentReqGif:i,setCurrentReqGif:a,inputRef:s,customRequest:l})=>{const{t:c}=br(),{options:u}=Hr(),{config:h}=u,[d,f]=o(null),[p,g]=o(!1),[m,v]=o(25),b=async function({query:e,page:t}){const n=e.keywords.replace(/[^\w\sа-яёА-ЯЁ]|_/g,"").replace(/[\s_-]+/g," ");try{const e=`https://api.giphy.com/v1/gifs/search?api_key=${null==h?void 0:h.REACT_APP_GIPHY_KEY}&q=${n}&limit=25&offset=${t}&lang=en`,r=await fetch(e);return{data:await r.json()}}catch(e){console.log(e)}},y=async()=>{var e,t;const r=await b({query:i,page:0});(null===(t=null===(e=null==r?void 0:r.data)||void 0===e?void 0:e.data)||void 0===t?void 0:t.length)&&r.data.data.length>0&&n(r.data.data)};return t("div",{className:IO.gifTab,children:[t(P,{onValuesChange:y,className:r.length>0?IO.searchResults:"",children:[e(P.Item,{className:IO.gifSearchInput,children:e(E,{onKeyDown:e=>"Space"===e.code&&y(),onPressEnter:e=>y(),allowClear:!0,placeholder:c("Search GIFs"),value:null==i?void 0:i.keywords,onChange:e=>a(t=>Object.assign(Object.assign({},t),{keywords:e.target.value})),ref:s,spellCheck:"false",suffix:e(se,{onClick:y,className:"cards-search__search-icon, input-icon",style:{fontSize:"16px",cursor:"pointer"}})})}),r.length>0&&e("div",{className:"ant-divider blocks-search__divider",role:"separator"})]}),e("div",{className:"serach-output-wrapper",children:r.length>0&&e("div",{id:"scrollableDiv",className:IO.scrollableDiv,children:e(TO,{dataLength:r&&r.length,next:async()=>{p||(g(!0),b({query:i,page:m}).then(e=>{e&&e.data&&e.data.data&&n(t=>[...t,...e.data.data]),g(!1),v(e=>e+25)}).catch(()=>{g(!1)}))},hasMore:!!r,endMessage:t(G,{plain:!0,children:[c("That`s all we could find.")," 🤐"]}),scrollableTarget:"scrollableDiv",style:{overflow:"visible"},loader:e(te,{indicator:OO}),children:r.map((n,r)=>t("div",{className:IO.listItem,onClick:()=>((e,t)=>{f(t),setTimeout(()=>{f(null)},2e3),l(e)})(n.images.downsized.url,n.id),children:[e("img",{className:d===n.id?IO.loadedImage:"",width:"322px",src:`${n.images.downsized.url}`,alt:n.title,onLoad:e=>{const t=e.target.parentNode;t&&t instanceof HTMLElement&&t.classList.add(IO.loaded)}}),e("a",{rel:"noreferrer",href:"https://giphy.com/",target:"_blank",onClick:e=>e.stopPropagation()}),d===n.id&&e(te,{className:"ant-spin",indicator:e(Ie,{spin:!0})})]},n.id+r))})})})]})};var PO="stockTab",MO="stockSearchInput",FO="searchResults",jO="blocksSearchDividerWrapper",RO="scrollableDiv",DO="listItem",LO="loaded",NO="loadedImage",zO="creatorInfo",BO="stockColorFilter",VO="allColors",UO="blackColor",HO="bwColor",WO="whiteColor",YO="orangeColor",$O="redColor",GO="purpleColor",XO="magentaColor",KO="greenColor",qO="tealColor",ZO="blueColor";const JO=e(Ie,{style:{fontSize:20},spin:!0}),QO=({imageStockList:r,setImageStockList:i,currentReq:s,setCurrentReq:l,inputRef:c,customRequest:u})=>{const[h,d]=o(!1),[f,p]=o(2),{t:g}=br(),{options:m}=Hr(),{config:v}=m,b=async function({query:e,page:t}){const n=e.keywords.replace(/[^\w\sа-яёА-ЯЁ]|_/g,"").replace(/[\s_-]+/g," ");try{let r=`https://api.unsplash.com/search/photos?client_id=${null==v?void 0:v.UNSPLASH_KEY}&lang=ru&per_page=18&query=${n}&page=${t}`;""!==e.color&&(r+=`&color=${e.color}`),""!==e.orientation&&(r+=`&orientation=${e.orientation}`);const i=await fetch(r);return{data:await i.json()}}catch(e){console.log(e)}};a(()=>{""!==s.keywords&&y()},[s.color,s.orientation]);const y=async()=>{var e,t;const n=await b({query:s,page:1});(null===(t=null===(e=null==n?void 0:n.data)||void 0===e?void 0:e.results)||void 0===t?void 0:t.length)&&n.data.results.length>0&&i(n.data.results)},[w,x]=o(null),_=(e,t,n)=>{!async function(e){try{const t=await fetch(`${e}&client_id=${null==v?void 0:v.UNSPLASH_KEY}`);return{data:await t.json()}}catch(e){console.log(e)}}(t.download_location),x(n),setTimeout(()=>x(null),2e3),u(`${e.raw}&w=1200&q=96`)};return t("div",{className:PO,children:[t(P,{onValuesChange:y,className:r.length>0?FO:"",children:[t(B,{gutter:24,children:[e(V,{span:r.length>0?void 0:24,children:e(P.Item,{className:MO,children:e(E,{onKeyDown:e=>"Space"===e.code&&y(),onPressEnter:e=>y(),allowClear:!0,placeholder:g("Search image"),value:s.keywords,onChange:e=>l(t=>Object.assign(Object.assign({},t),{keywords:e.target.value})),ref:c,spellCheck:"false",suffix:e(se,{onClick:y,className:"cards-search__search-icon, input-icon",style:{fontSize:"16px",cursor:"pointer"}})})})}),r.length>0&&t(n,{children:[e(V,{children:t(ne.Group,{defaultValue:"",onChange:e=>l(t=>Object.assign(Object.assign({},t),{orientation:e.target.value})),children:[e(re,{title:g("All"),placement:"top",children:e(ne.Button,{value:"",children:e(yi,{})})}),e(re,{title:g("Landscape"),placement:"top",children:e(ne.Button,{value:"landscape",children:e(wi,{})})}),e(re,{title:g("Portrait"),placement:"top",children:e(ne.Button,{value:"portrait",children:e(xi,{})})}),e(re,{title:g("Squarish"),placement:"top",children:e(ne.Button,{value:"squarish",children:e(_i,{})})})]})}),e(V,{children:t(ne.Group,{defaultValue:"",className:BO,onChange:e=>l(t=>Object.assign(Object.assign({},t),{color:e.target.value})),children:[e(re,{title:g("All"),placement:"top",children:e(ne.Button,{className:VO,value:"",children:"All"})}),e(re,{title:g("Black"),placement:"top",children:e(ne.Button,{className:UO,value:"black",children:"B"})}),e(re,{title:g("Black and White"),placement:"top",children:e(ne.Button,{className:HO,value:"black_and_white",children:"B&W"})}),e(re,{title:g("White"),placement:"top",children:e(ne.Button,{className:WO,value:"white",children:"W"})}),e(re,{title:g("Orange"),placement:"top",children:e(ne.Button,{className:YO,value:"orange",children:"O"})}),e(re,{title:g("Red"),placement:"top",children:e(ne.Button,{className:$O,value:"red",children:"R"})}),e(re,{title:g("Purple"),placement:"top",children:e(ne.Button,{className:GO,value:"purple",children:"P"})}),e(re,{title:g("Magenta"),placement:"top",children:e(ne.Button,{className:XO,value:"magenta",children:"M"})}),e(re,{title:g("Green"),placement:"top",children:e(ne.Button,{className:KO,value:"green",children:"G"})}),e(re,{title:g("Teal"),placement:"top",children:e(ne.Button,{className:qO,value:"teal",children:"T"})}),e(re,{title:g("Blue"),placement:"top",children:e(ne.Button,{className:ZO,value:"blue",children:"B"})})]})})]})]}),r.length>0&&e("div",{className:jO,children:e(G,{className:"zero-divider"})})]}),e("div",{className:"serach-output-wrapper",children:r.length>0&&e("div",{id:"scrollableDiv",className:RO,children:e(TO,{dataLength:r&&r.length,next:async()=>{h||(d(!0),b({query:s,page:f}).then(e=>{e&&e.data&&e.data.results&&i(t=>[...t,...e.data.results]),d(!1),p(e=>e+1)}).catch(()=>{d(!1)}))},hasMore:!!r,endMessage:t(G,{plain:!0,children:[g("That`s all we could find.")," 🤐"]}),scrollableTarget:"scrollableDiv",style:{overflow:"visible"},loader:e(te,{indicator:JO}),children:r.map((n,r)=>t("div",{className:DO,onClick:()=>_(n.urls,n.links,n.id),children:[e("img",{className:w===n.id?NO:"",width:"310px",src:`${n.urls.raw}&w=644&q=96`,alt:n.description,onLoad:e=>{const t=e.target.parentNode;t&&t instanceof HTMLElement&&t.classList.add(LO)}}),t("p",{className:zO,onClick:e=>e.stopPropagation(),children:[g("Photo by")," ",e("a",{target:"_blank",href:`${n.user.links.html}?utm_source=${null==v?void 0:v.APP_NAME_UNSPLASH}&utm_medium=referral`,rel:"noreferrer",children:n.user.name})," ",g("on")," ",e("a",{target:"_blank",href:`https://unsplash.com/?utm_source=${null==v?void 0:v.APP_NAME_UNSPLASH}&utm_medium=referral`,rel:"noreferrer",children:"Unsplash"})]}),w===n.id&&e(te,{className:"ant-spin",indicator:e(Ie,{spin:!0})})]},n.id+r))})})})]})},eE=()=>{const{options:e}=Hr(),t=e.config;return c((e,n)=>{!1!==(null==t?void 0:t.pushToGTM)&&((e,t)=>{const n=()=>{try{const t=Object.assign(Object.assign({},e),{appLabel:"blocks_app"});window.dataLayer&&"function"==typeof window.dataLayer.push?window.dataLayer.push(t):console.log("Attempting to add to the dataLayer:",e)}catch(e){console.error("Ошибка при вызове GTM:",e)}};t?setTimeout(n,t):n()})(e,n)},[null==t?void 0:t.pushToGTM])};var tE="slideshowContainer",nE="slideshowImage";const rE=({images:t,transitionDuration:n=1e3,frameHeight:r})=>{const[i,s]=o([]),l=()=>{s(e=>e.map((t,n)=>n===e.length-1?Object.assign(Object.assign({},t),{opacity:1}):t))};return a(()=>{if(t.length>0){const e=t[t.length-1];s(t=>[...t,{src:e,opacity:0}]),setTimeout(l,1e3)}else s([])},[t]),e("div",{className:tE,style:{height:r,minHeight:130},children:i.map((t,r)=>e("img",{src:`data:image/jpeg;base64, ${t.src}`,alt:`Slide ${r+1}`,className:nE,style:{opacity:t.opacity,transition:`opacity ${n}ms linear`,display:"block"}},r))})};const iE=t=>{var{className:n,style:r,color:i,text:o,bordered:a}=t,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(t,["className","style","color","text","bordered"]);const l=o||"";return e(ie,Object.assign({style:r,color:i,bordered:a,className:n},s,{children:l}))},oE=({text:n,counter:r,limits:i,wrapperStyles:o})=>{const{t:a}=br(),{options:s}=Hr(),l=s.config,{token:c}=T.useToken(),u=+i>0,h=!u||r<+i,d=(null==l?void 0:l.billingPageUrl)||"/billing",f=r+" "+a("of")+" "+(u?i:"∞")+" "+(n||a("tests",{count:i}))+" "+a("was used",{count:r});return t("div",{className:"limits-couter-wrapper",style:o,children:[e(iE,{bordered:!1,text:f,className:"limit-counter",style:{color:h?c.colorText:"white"},color:h?c.colorFillSecondary:"rgb(255, 77, 79)"}),u&&e("div",{style:{fontSize:14,textDecoration:"underline",cursor:"pointer"},onClick:()=>window.location.assign(d),children:a("Need more?")})]})};var aE={imageAi:"imageAi",imageItem:"imageItem",textAreaInputHybrid:"textAreaInputHybrid",loading:"loading",carousel:"carousel",arrow:"arrow",arrowNext:"arrowNext",arrowPrev:"arrowPrev",arrowBtn:"arrowBtn",arrowBtnNext:"arrowBtnNext",arrowBtnPrev:"arrowBtnPrev",row:"row",inputAffixWrapper:"inputAffixWrapper",textarea:"textarea",inputIcon:"inputIcon"};const sE=f(({className:t,onClick:n})=>e("div",{className:`${aE.arrow} ${aE.arrowNext} ${t||""}`,onClick:n,children:e(X,{className:`${aE.arrowBtn} ${aE.arrowBtnNext}`,size:"large",icon:e(Oe,{})})}));sE.displayName="SampleNextArrow";const lE=f(({className:t,onClick:n})=>e("div",{className:`${aE.arrow} ${aE.arrowPrev} ${t||""}`,onClick:n,children:e(X,{className:`${aE.arrowBtn} ${aE.arrowBtnPrev}`,size:"large",icon:e(Ee,{})})}));lE.displayName="SamplePrevArrow";const cE=({customRequest:n,aiTabRef:r,inputAiRef:i,isImageUploaded:s,setIsImageUploaded:l,aiImageRequest:u,setAiImageRequest:d,imageAiList:f,setImageAiList:p,isLoadingAi:g,setIsLoadingAi:m})=>{const{t:v}=br(),[b,y]=o("auto"),{aiImageCounter:w,currentAiImgLimits:x,loadingDuringGeneration:_,requestStatus:C,handleGenerate:S,convertBase64ToFile:A,isShiftPressed:k,setIsShiftPressed:T,limitsInPlugin:I}=function({setFrameHeight:e,customRequest:t,aiTabRef:n,isImageUploaded:r,setIsImageUploaded:i,aiImageRequest:s,imageAiList:l,setImageAiList:u,isLoadingAi:d,setIsLoadingAi:f}){const{t:p}=br(),{options:g}=Hr(),m=g.config,v=ni(),b=eE(),{messages:y}=g.config,[w,x]=o([]),[_,C]=o(0),[S,A]=o(null),[k,T]=o(!1),[I,O]=o(p("Evaluating the task")),[E,P]=o(!1);a(()=>{x(y)},[y]),a(()=>{l.length||S||x([])},[l,S]);const M=h(()=>(console.log("sendAIImageRequest"),m&&"function"==typeof(null==m?void 0:m.sendAIImageRequest)?null==m?void 0:m.sendAIImageRequest:()=>Promise.resolve({})),[m]),F=c(e=>{"error"!==e.status&&"Canceled"!==e.status?e.images?(O(String(e.status)),100===e.progress&&(f(!1),u(e.images),A(null),P(!1))):(u([String(e.data)]),100===e.progress&&f(!1)):(f(!1),P(!1),v.error({message:p("Something went wrong, please try again"),placement:"bottomRight",description:String(S)||void 0}))},[u,O,p,f,S,v,P]);a(()=>{w.length>1&&F(w[w.length-1])},[F,w]);const j=h(()=>{if(m&&"function"==typeof(null==m?void 0:m.sseQuery)){const e=null==m?void 0:m.sseQuery;return t=>e(t)}return e=>{}},[m]),R=h(()=>m&&"object"==typeof(null==m?void 0:m.handleLimitUsageEmitter)?null==m?void 0:m.handleLimitUsageEmitter:{fire:()=>{}},[m]),D=null==m?void 0:m.elementId,{projectId:L}=m,{limits:N}=(null==m?void 0:m.limits)?m:{limits:{ai_img_limit:0}},{ai_img_limit:z}=N,B=z>0&&_>=z,V=!(!(null==m?void 0:m.limits)||!m.counters)&&zr,U=c(()=>{R.fire({name:"AiImgCount",count:_+1})},[R,_]),H=h(()=>!B&&!V,[B,V,_,z]),W=c(async()=>{console.log("generateImage"),O(p("Evaluating the task")),""===s||d||(f(!0),P(!0),u([]),b({event:"submit_form",action:"ai_image_generation",entity_id:D,project_id:L}),M({body:{project_id:L,request:"create-image",connection:"midjourney",message:s}}).then(e=>{var t,n,r;const{data:i,error:o}=e||{};if(o)throw o;const a=i;if(401===(null==a?void 0:a.status)||401===(null===(t=null==a?void 0:a.data)||void 0===t?void 0:t.status))throw new Error("ERROR");if(200===(null==a?void 0:a.status)||200===(null===(n=null==a?void 0:a.data)||void 0===n?void 0:n.status)){const e=(null==a?void 0:a.task)||(null===(r=null==a?void 0:a.data)||void 0===r?void 0:r.task);(null==e?void 0:e.id)&&(O(e.message),A(e.id)),(null==a?void 0:a.message)&&v.success({message:a.message,placement:"bottomRight",description:s}),j({task_id:null==e?void 0:e.id,entity_id:D})}else f(!1),P(!1),v.error({message:(null==a?void 0:a.message)||p("Something went wrong, please try again"),placement:"bottomRight",description:s})}).catch(e=>{f(!1),P(!1);const t=e;return((null==t?void 0:t.error)||(null==t?void 0:t.data))&&(null==v||v.error({message:p("Something went wrong, please try again"),placement:"bottomRight",description:s})),t}))},[s,d,f,P,u,b,D,L,M,v,j,p]),Y=c(()=>{H&&W()},[H,V,C,U,W,v,p]);a(()=>{},[m,V]);const $=c(e=>{if(!r){i(!0);const n=e.match(/^data:image\/([A-Za-z-+/]+);base64,(.+)$/);if(!n)return;const r=n[1],o=n[2],a=atob(o),s=new Array(a.length);for(let e=0;e<a.length;e++)s[e]=a.charCodeAt(e);const l=new Uint8Array(s),c=new Blob([l],{type:`image/${r}`}),u=new File([c],"image.jpeg",{type:c.type,lastModified:Date.now()});t({file:u})}},[r,i,t]);return a(()=>{(d||l.length>0)&&setTimeout(()=>{let t=350;n.current&&(t=n.current.offsetHeight-120),e(t)},0)},[n,l.length,d,e]),{aiImageCounter:_,setAiImageCounter:C,currentAiImgLimits:z,isFieldsDisabled:B,canGenerateImage:H,aiImageRequest:s,imageAiList:l,setImageAiList:u,isLoadingAi:d,setIsLoadingAi:f,loadingDuringGeneration:E,setLoadingDuringGeneration:P,requestStatus:I,setRequestStatus:O,handleGenerate:Y,handleLimitAiImgCount:U,convertBase64ToFile:$,isShiftPressed:k,setIsShiftPressed:T,currentReqId:S,setCurrentReqId:A,limitsInPlugin:V}}({setFrameHeight:y,customRequest:n,aiTabRef:r,isImageUploaded:s,setIsImageUploaded:l,aiImageRequest:u,imageAiList:f,setImageAiList:p,isLoadingAi:g,setIsLoadingAi:m}),[O,M]=o(!1),F=c(()=>M(!0),[]),j=c(()=>M(!1),[]),R=c(e=>d(e.target.value),[d]),D=c(e=>{"Shift"===e.key?T(!0):"Enter"!==e.key||k||(e.preventDefault(),S())},[k,S,T]),L=c(e=>{"Shift"===e.key&&T(!1)},[T]);return t("div",{className:aE.imageAi,children:[I&&e(oE,{text:"images",counter:w,limits:x,wrapperStyles:{marginTop:-25}}),e(B,{gutter:24,className:aE.row,children:e(V,{span:24,children:e(P.Item,{children:t("span",{className:`ant-input-affix-wrapper ant-input-affix-wrapper-lg ${aE.inputAffixWrapper}${O?" ant-input-affix-wrapper-focused":""}`,children:[e(E.TextArea,{ref:i,onKeyDown:D,onKeyUp:L,onFocus:F,onBlur:j,autoSize:!0,allowClear:!0,className:`${aE.textAreaInputHybrid} ${aE.textarea}`,placeholder:"Generate image",value:u,onChange:R,spellCheck:"false"}),e("span",{className:`ant-input-suffix ${aE.inputSuffix}`,children:g||_?e(Ie,{className:`${aE.inputIcon} input-icon`,spin:!0}):e(Si,{className:`${aE.inputIcon} input-icon`,onClick:S})})]})})})}),(g||f.length>0)&&t(oe,{dotPosition:"top",arrows:!0,nextArrow:e(sE,{}),prevArrow:e(lE,{}),className:aE.carousel,children:[g&&!f.length&&e("div",{className:aE.loading,children:t("div",{className:"spin",children:[e(Ie,{style:{fontSize:48},spin:!0}),e("p",{className:"status",children:C})]})}),f.length>0&&f.map((n,r)=>t("div",{className:aE.imageItem,children:[e(rE,{images:f,frameHeight:b}),e("div",{className:"buttons",children:f.length>0&&!g&&e(X,{onClick:()=>A(`data:image/jpeg;base64, ${n}`),icon:e(Pe,{}),children:v("Use this variant")})})]},r))]})]})};let uE=!1;const hE=()=>{if(uE)return;window.addEventListener("error",e=>!(!e.message||!e.message.includes("ResizeObserver loop completed with undelivered notifications"))&&(e.stopImmediatePropagation(),e.preventDefault(),!0),!0);const e=window.onerror;window.onerror=(t,n,r,i,o)=>!("string"!=typeof t||!t.includes("ResizeObserver loop completed with undelivered notifications"))||!!e&&e(t,n,r,i,o),window.addEventListener("unhandledrejection",e=>{var t,n;(null===(n=null===(t=e.reason)||void 0===t?void 0:t.message)||void 0===n?void 0:n.includes("ResizeObserver loop completed with undelivered notifications"))&&e.preventDefault()});const t=console.error;if(console.error=(...e)=>{var n;((null===(n=e[0])||void 0===n?void 0:n.toString())||"").includes("ResizeObserver loop completed with undelivered notifications")||t.apply(console,e)},"undefined"!=typeof window){const e=()=>{try{["webpackHotUpdate","__webpack_require__","__webpack_hash__"].forEach(e=>{if(window[e]){const e=window.__webpack_require__;e&&"object"==typeof e&&null!==e&&"cache"in e&&console.warn("✅ Webpack обнаружен, активирована дополнительная защита от ResizeObserver ошибок")}})}catch(e){console.warn("Ошибка при поиске webpack объектов:",e)}};e(),setTimeout(e,1e3)}uE=!0},dE=()=>{uE=!1},fE=e=>{(null==e?void 0:e.customTheme)&&((e={})=>{const t=document.querySelector("head");if(!t)return;const n=document.createElement("style");if(n.type="text/css",n.dataset.themeVariablesFm="true",n.setAttribute("data-file-manager","true"),Object.entries(e).length){let r="";Object.entries(e).forEach(([e,t])=>{"object"!=typeof t&&(r+=`\t--${e}: ${t};\n`)}),r=`.em-filemanager {\n${r}}`,n.appendChild(document.createTextNode(r));const i=t.querySelector('[data-theme-variables-fm="true"]');i?t.replaceChild(n,i):t.insertBefore(n,t.firstChild)}})(null==e?void 0:e.customTheme)},{Sider:pE,Content:gE}=ee,mE={keywords:"",color:"",orientation:""},vE={keywords:""},bE=()=>{const s=Kr(),l=ti(),h=(()=>{const{state:e,actions:t,options:n}=Hr(),{selectedFolder:r,pathHistory:i,folders:o}=e,{t:a}=br(),{setSelectedFolder:s,setPathHistory:l}=t,u=c((e,t=new Set)=>{if(t.has(e))return console.warn(`Обнаружен цикл в пути к папке с id=${e}`),[];const n=(Array.isArray(o)?o:[]).find(t=>t.id===e);if(!n)return[];const r=new Set(t);return r.add(e),n.parentId?n.parentId===n.id?(console.warn(`Обнаружена циклическая зависимость: папка ${n.id} является родителем самой себя`),[{id:n.id,name:n.name+" (ошибка)"}]):[...u(n.parentId,r),{id:n.id,name:n.name}]:[{id:n.id,name:n.name}]},[o]),h=c(e=>{console.log("🎯 handleFolderSelect:",e);const t="folders"===e?null:e;if(t!==r)if(null==s||s(t),"folders"===e){const e=[{id:"folders",name:a("Folders")}];null==l||l(e),n.onPathChange&&n.onPathChange([])}else if((Array.isArray(o)?o:[]).find(t=>t.id===e)){const t=u(e),r=[{id:"folders",name:a("Folders")},...t];null==l||l(r),n.onPathChange&&n.onPathChange(r.map(e=>e.name))}else console.warn("⚠️ Папка не найдена:",e);else console.log("🚫 Папка уже выбрана, пропускаем обновление:",e)},[n,l,s,a,o,u,r]),d=c(e=>{if(console.log("handleBreadcrumbClick вызван с index:",e),-1===e)null==s||s(null),null==l||l([{id:"folders",name:a("Folders")}]),n.onPathChange&&n.onPathChange([]);else{const t=i.slice(0,e+1),r=t[t.length-1],o="folders"===r.id?void 0:r.id;null==s||s(o||null),null==l||l(t),n.onPathChange&&n.onPathChange(t.map(e=>e.name))}},[n,i,l,s,a]),f=c(e=>{if(!e.isFolder)return;null==s||s(e.id);const t={id:e.id,name:e.name};if(l){const e=[...i,t];l(e)}if(n.onPathChange){const t=[...i.map(e=>e.name),e.name];n.onPathChange(t)}},[n,i,l,s]);return{state:{selectedFolder:r,pathHistory:i},actions:{handleFolderSelect:h,handleBreadcrumbClick:d,handleItemClick:f},selectedFolder:r,pathHistory:i,handleFolderSelect:h,handleBreadcrumbClick:d,handleItemClick:f}})(),d=(()=>{const{state:e,actions:t}=Hr(),{pagination:n}=e,{setPagination:r}=t,i=c((e,t)=>{const i=t||n.pageSize;null==r||r({current:e,pageSize:i,total:n.total})},[n.pageSize,n.total,r]);return{state:{pagination:n},actions:{handlePaginationChange:i}}})(),f=(()=>{const[e,t]=r.useState(()=>{const e=localStorage.getItem(ri);return e?Math.max(290,parseInt(e,10)):298}),[n,i]=r.useState(!1),[o,a]=r.useState(!1),[s,l]=r.useState(0),c=r.useCallback(()=>{console.log("Double click: Resetting to default width"),t(298),localStorage.setItem(ri,298..toString())},[]),u=r.useCallback(n=>{n.preventDefault(),n.stopPropagation(),i(!0),document.body.classList.add("resizing");const r=n.clientX,o=e;let s=o;const c=e=>{e.preventDefault();const n=Math.max(Math.min(o+e.clientX-r,600),290);s=n,t(n),l(e.clientX),a(!0)},u=()=>{i(!1),document.body.classList.remove("resizing"),a(!1),localStorage.setItem(ri,s.toString()),document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",u)};document.addEventListener("mousemove",c),document.addEventListener("mouseup",u)},[e]);return r.useEffect(()=>()=>{document.body.classList.remove("resizing")},[]),{sidebarWidth:e,isResizing:n,showResizeGuide:o,resizeGuidePosition:s,handleResizeStart:u,handleDoubleClick:c}})(),p=(()=>{const[e,t]=o([]),[n,r]=o(!1),[i,a]=o(!1),s=u(0),l=c(()=>(s.current+=1,`upload_${s.current}_${Date.now()}`),[]),h=c(e=>`${(e.size/1024).toFixed(2)} КБ`,[]),d=c(e=>{const n=e.map(e=>({id:l(),name:e.name,size:h(e),status:"uploading",progress:0}));return t(n),r(!0),a(!1),n.map(e=>e.id)},[l,h]),f=c((e,n)=>{t(t=>t.map(t=>t.id===e?Object.assign(Object.assign({},t),{progress:Math.min(100,Math.max(0,n))}):t))},[]),p=c(e=>{t(t=>t.map(t=>t.id===e?Object.assign(Object.assign({},t),{status:"success",progress:100}):t))},[]),g=c((e,n)=>{t(t=>t.map(t=>t.id===e?Object.assign(Object.assign({},t),{status:"error",error:n}):t))},[]),m=c(()=>{r(!1),a(!1),setTimeout(()=>{t([])},300)},[]),v=c(()=>{a(e=>!e)},[]),b=c(e=>{t(t=>t.filter(t=>t.id!==e)),t(t=>(t.length<=1&&setTimeout(()=>{r(!1),a(!1)},100),t.filter(t=>t.id!==e)))},[]),y=e.length,w=e.filter(e=>"success"===e.status||"error"===e.status).length;return{uploadFiles:e,isUploadVisible:n,isUploadMinimized:i,totalFiles:y,completedFiles:w,startUpload:d,updateProgress:f,markAsSuccess:p,markAsError:g,closeUpload:m,minimizeUpload:v,insertFile:b}})(),g=Xr(),m=i.useRef(null),{folders:v,loading:b}=s.state,{fetchFolders:y,handleCreateFolder:w,handleModalOk:x,handleModalCancel:_,generateMenuItems:C}=s.actions,S=ci(y),{files:A,selectedFiles:k,loading:T,isRenamingFile:I,fileToRename:O}=l.state,{fetchFiles:E,handleDeleteFile:P,handleDeleteFolder:M,handleAddFile:F,handleAddFileByUrl:j,uploadFileWithProvider:R,toggleFileSelection:D,showRenameModal:L,handleRenameCancel:N,handleRenameOk:z,handleDroppedFiles:B,showMoveModal:V,handleMoveCancel:U,handleMoveOk:H,showDeleteConfirm:W,handleDeleteConfirmCancel:Y,handleDeleteConfirmOk:$}=l.actions,{selectedFolder:X,pathHistory:K}=h.state,{handleFolderSelect:q,handleBreadcrumbClick:Z,handleItemClick:J}=h.actions,{pagination:Q}=d.state,te=Gr(E),{searchTerm:ne,sortBy:re,sortOrder:ie}=te.state,{handleSearch:oe,handleSort:ae,handlePaginationChange:se}=te.actions,le=(({files:e,selectedFiles:t,fetchFiles:n,selectedFolder:i})=>{const o=ni(),{options:a,actions:s,state:l}=r.useContext(Ur),{setActiveLibraryItem:c}=s,{activeLibraryItem:u}=l,[h,d]=r.useState(!1),[f,p]=r.useState(null);r.useEffect(()=>{console.log(h)},[h]);const g=r.useCallback(e=>{var t;if(e.type&&e.type.startsWith("image/"))return!0;if(e.extension){const t=e.extension.toLowerCase();return Br.includes(t)}const n=null===(t=e.name.split(".").pop())||void 0===t?void 0:t.toLowerCase();return!!n&&Br.includes(n)},[]),m=r.useCallback(async e=>{const{dataProviders:t}=a;if(console.log("🔧 saveFileToServer: dataProviders доступны:",{hasUpdateFile:!!(null==t?void 0:t.updateFile),hasUploadFile:!!(null==t?void 0:t.uploadFile),hasThumbnail:!!e.thumbnail,fileId:e.id}),(null==t?void 0:t.updateFile)&&e.thumbnail)try{let n=e.type||"image/png";if(e.thumbnail.startsWith("data:")){const t=e.thumbnail.match(/^data:([^;]+)/);t&&t[1].startsWith("image/")&&(n=t[1])}const r=e.thumbnail.split(",")[1],i=atob(r),o=new Array(i.length);for(let e=0;e<i.length;e++)o[e]=i.charCodeAt(e);const a=new Uint8Array(o),s=new Blob([a],{type:n});return console.log("Using updateFile method with:",{fileId:e.id,mimeType:n,blobType:s.type}),await t.updateFile(e.id,{name:e.name,type:n,data:s,thumbnail:e.thumbnail,extension:e.extension})}catch(e){return console.error("Ошибка при обновлении файла через updateFile:",e),null}else if((null==t?void 0:t.uploadFile)&&e.thumbnail)try{let n=e.type||"image/png";if(e.thumbnail.startsWith("data:")){const t=e.thumbnail.match(/^data:([^;]+)/);t&&t[1].startsWith("image/")&&(n=t[1])}const r=e.thumbnail.split(",")[1],i=atob(r),o=new Array(i.length);for(let e=0;e<i.length;e++)o[e]=i.charCodeAt(e);const a=new Uint8Array(o),s=new Blob([a],{type:n});console.log("Using uploadFile method as fallback with:",{mimeType:n,blobType:s.type}),await t.uploadFile(Object.assign(Object.assign({},e),{type:n,data:s}))}catch(e){return console.error("Ошибка при сохранении файла через uploadFile:",e),null}else if(null==t?void 0:t.renameFile)try{return await t.renameFile(e.id,e.name)}catch(e){return console.error("Ошибка при переименовании файла:",e),null}return console.warn("DataProvider для обновления файлов не настроен"),null},[a]),v=r.useCallback(n=>{let r;if(console.log("🎨 handleEdit ВЫЗВАНА!",{fileForEdit:n,selectedFilesSize:t.size}),n)r=n;else{if(1!==t.size)return;const n=Array.from(t)[0];if(r=e.find(e=>e.id===n),!r||r.isFolder||!g(r))return}console.log("🎨 usePixieEditor: Открываем редактор для файла:",r),c&&c(Nr),console.log("🎨 usePixieEditor: Устанавливаем editingFile"),p(r),console.log("🎨 usePixieEditor: Устанавливаем isPixieEditorVisible = true"),d(!0),console.log("🎨 usePixieEditor: Редактор должен открыться")},[t,e,g,d,c]),b=r.useCallback(()=>{console.log("🎨 usePixieEditor: Закрываем редактор"),c&&u===Nr&&c(jr),d(!1),p(null),console.log("🎨 usePixieEditor: Редактор закрыт")},[u,c]),y=r.useCallback(async e=>{console.log("Файл обновлен:",e);try{const t=await m(e);if(t)return await n({folderId:i||void 0}),o.success({message:"Успех",description:"Изображение успешно обновлено"}),b(),a.onEditorOk&&a.onEditorOk(t),t}catch(e){console.error("Ошибка при сохранении файла:",e),o.error({message:"Ошибка",description:`Не удалось сохранить изменения: ${e instanceof Error?e.message:"Неизвестная ошибка"}`})}},[m,n,i,o,b]);return{isPixieEditorVisible:h,editingFile:f,handleEdit:v,handlePixieEditorSave:y,handlePixieEditorClose:b}})({files:A||[],selectedFiles:k||new Set,fetchFiles:E,selectedFolder:X||null}),ce=i.useCallback(async()=>{let e=null;await F({onStart:t=>{const n=p.startUpload([t]);e=n[0],console.log("🚀 onStart: файл запущен",{fileName:t.name,fileId:e})},onProgress:(t,n)=>{e&&(p.updateProgress(e,n),console.log("🔍 onProgress:",{fileName:t,fileId:e,progress:n}))},onComplete:async t=>{var n;e?(p.markAsSuccess(e),console.log("✅ onComplete: markAsSuccess вызван",{fileName:t,fileId:e}),await(null===(n=m.current)||void 0===n?void 0:n.refreshFileCounts())):console.error("❌ currentFileId отсутствует для onComplete:",t)},onError:(t,n)=>{e&&(p.markAsError(e,n),console.log("❌ onError: markAsError вызван",{fileName:t,fileId:e,error:n}))}})},[F,p]),ue=i.useCallback(async()=>{var e;await j(),await(null===(e=m.current)||void 0===e?void 0:e.refreshFileCounts())},[j]),he=i.useCallback(async e=>{var t;await P(e),await(null===(t=m.current)||void 0===t?void 0:t.refreshFileCounts())},[P]),de=i.useCallback(async e=>{var t;if(B){const n=p.startUpload(e);console.log("🚀 Drag&Drop: файлы запущены",{fileCount:e.length,fileIds:n}),e.forEach(async(e,t)=>{const r=n[t];if(!r)return;let i=0;const o=setInterval(()=>{i=Math.min(i+10+Math.floor(Date.now()%10),85),p.updateProgress(r,i)},200);setTimeout(()=>{clearInterval(o)},2e3)}),await B(e),n.forEach(e=>{p.updateProgress(e,100),p.markAsSuccess(e)}),await(null===(t=m.current)||void 0===t?void 0:t.refreshFileCounts())}},[B,p]),fe=i.useCallback(async e=>{var t;await M(e),await y(),await(null===(t=m.current)||void 0===t?void 0:t.refreshFileCounts())},[M,y]),pe=(({files:e,selectedFiles:t,toggleFileSelection:n,showRenameModal:i,showMoveModal:o,showCopyModal:a,handleDeleteFile:s,handleDeleteFolder:l,showDeleteConfirm:c,onEdit:u})=>({handleClearSelection:r.useCallback(()=>{t&&t.size>0&&t.forEach(e=>{n(e)})},[t,n]),handleRename:r.useCallback(()=>{if(t&&1===t.size){const e=Array.from(t)[0];i(e)}},[t,i]),handleDeleteSelected:r.useCallback(()=>{if(t&&t.size>0){if(c)return void c();t.forEach(t=>{const n=e.find(e=>e.id===t);n?n.isFolder?l(t):s(t):console.warn(`Объект с ID ${t} не найден в списке файлов`)})}},[t,e,s,l,c]),handleCopy:r.useCallback(()=>{a()},[a]),handleMove:r.useCallback(()=>{o()},[o]),handleEdit:r.useCallback(()=>{u()},[u])}))({files:A||[],selectedFiles:k||new Set,toggleFileSelection:D,showRenameModal:L,showMoveModal:V,showCopyModal:l.actions.showCopyModal||(()=>{}),handleDeleteFile:P,handleDeleteFolder:fe,showDeleteConfirm:W,onEdit:le.handleEdit}),ge=b||T;a(()=>{hE(),y()},[y]),i.useEffect(()=>{!X&&q&&v.length>0&&(console.log("✅ Инициализация: автоматический выбор корневой папки"),q("folders"))},[X,q,v.length]);const{state:me,actions:ve,options:be}=i.useContext(Ur),{form:ye,urlForm:we,renameForm:xe,moveForm:_e,renameFolderForm:Ce,copyForm:Se,isModalVisible:Ae,isUrlModalVisible:ke,isMoveModalVisible:Te,isRenameFolderModalVisible:Ie,isCopyModalVisible:Oe,isDeleteConfirmVisible:Ee,folderToRename:Pe,activeLibraryItem:Me}=me,{setIsUrlModalVisible:Fe,setSortField:je,setActiveLibraryItem:Re}=ve,{config:De}=be,{handleRenameFolderCancel:Le,handleRenameFolderOk:Ne}=S.actions,ze=c(e=>{se(e.current||Q.current,e.pageSize||Q.pageSize)},[se,Q.current,Q.pageSize]),Be=i.useCallback(e=>{const{sortBy:t,sortOrder:n}=(e=>{const[t,n]=e.split("-");return{sortBy:t,sortOrder:n}})(e);ae(t,n)},[ae]),[Ve,Ue]=o(vE),[He,We]=o([]),Ye=u(null),[$e,Ge]=o(mE),[Xe,Ke]=o([]),qe=u(null),[Ze,Je]=o(""),[Qe,et]=o([]),tt=i.useRef(void 0),[nt,rt]=o(!1),[it,ot]=o(!1),at=i.useRef(null),st=i.useRef(null);return a(()=>{(async()=>{const e=null==De?void 0:De.fileForEdit;if(tt.current!==e)try{if(tt.current=e,Me===Nr&&e&&!le.editingFile&&"string"==typeof e)if(e.startsWith("data:"))null==le||le.handleEdit({thumbnail:e});else{const t=await g.handleAddFileByUrl(e,!0);if(!t)throw new Error("Не удалось загрузить файл");tt.current===e&&(null==le||le.handleEdit(t))}}finally{tt.current===e&&(tt.current=null)}})()},[Me,null==De?void 0:De.fileForEdit]),a(()=>{var e,t,n;Me===jr?(console.log("reset requests"),We([]),Ue(vE),Ke([]),Ge(mE),et([]),Je(""),ot(!1),rt(!1)):Me===Lr?null===(e=st.current)||void 0===e||e.focus():Me===Rr?null===(t=Ye.current)||void 0===t||t.focus():Me===Dr&&(null===(n=qe.current)||void 0===n||n.focus())},[Me]),t(ee,{className:"file-manager__layout",children:[f.showResizeGuide&&e("div",{className:"resize-guide",style:{left:`${f.resizeGuidePosition}px`}}),e(wO,{selectedFiles:k||new Set,onClearSelection:pe.handleClearSelection,onRename:pe.handleRename,onDelete:pe.handleDeleteSelected,onCopy:pe.handleCopy,onMove:pe.handleMove,onEdit:pe.handleEdit,files:A||[]}),e(G,{className:"zero-divider"}),t(ee,{className:"file-manager__content",children:[t(pE,{width:f.sidebarWidth,theme:"light",className:"file-manager-sider",children:[e(Hi,{ref:m,selectedFolder:X||null,generateMenuItems:C,onFolderSelect:e=>null==q?void 0:q(e),folders:v||[],fetchFolders:y,handleAddFile:ce,setIsUrlModalVisible:e=>null==Fe?void 0:Fe(e),handleDeleteFolder:fe,handleCreateFolder:w,activeLibraryItem:Me,setActiveLibraryItem:e=>null==Re?void 0:Re(e)}),e("div",{className:"sidebar-resizer "+(f.isResizing?"resizing":""),onMouseDown:f.handleResizeStart,onDoubleClick:f.handleDoubleClick,children:e("div",{className:"sidebar-resizer-indicator"})})]}),e(ee,{className:"file-manager__main-content",children:t(gE,{className:"main-content",ref:at,children:[Me===jr&&e(si,{searchTerm:ne,sortField:me.sortField||"name",setSortField:e=>null==je?void 0:je(e),pathHistory:K||[],handleBreadcrumbClick:e=>null==Z?void 0:Z(e),handleAddFile:ce,setIsUrlModalVisible:e=>null==Fe?void 0:Fe(e),files:A||[],handleSearch:oe,handleSort:ae,sortBy:re,sortOrder:ie,handleSortOptionChange:Be,pagination:Q,setPagination:ze,loading:ge,handleItemClick:e=>null==J?void 0:J(e),handleDeleteFile:he,selectedFiles:k||new Set,toggleFileSelection:e=>null==D?void 0:D(e),handleDroppedFiles:de,fileUpload:p}),Me===Rr&&e(EO,{imageGifList:He,setImageGifList:We,currentReqGif:Ve,setCurrentReqGif:Ue,inputRef:Ye,customRequest:j}),Me===Dr&&e(QO,{imageStockList:Xe,setImageStockList:Ke,currentReq:$e,setCurrentReq:Ge,inputRef:qe,customRequest:j}),Me===Lr&&!!(null==De?void 0:De.sseQuery)&&e(cE,{imageAiList:Qe,setImageAiList:et,aiImageRequest:Ze,setAiImageRequest:Je,inputAiRef:st,customRequest:e=>R(e.file),isLoadingAi:nt,setIsLoadingAi:rt,isImageUploaded:it,setIsImageUploaded:ot,aiTabRef:at}),Me===Nr&&e(n,{})]})})]}),e(li,{isModalVisible:Ae,handleModalOk:x,handleModalCancel:_,form:ye,selectedFolder:X||null,folders:v||[],isUrlModalVisible:ke,setIsUrlModalVisible:e=>null==Fe?void 0:Fe(e),handleAddFileByUrl:ue,urlForm:we,isRenameModalVisible:I,handleRenameOk:()=>null==z?void 0:z(),handleRenameCancel:()=>null==N?void 0:N(),renameForm:xe,fileToRename:O,files:A||[],isMoveModalVisible:Te,handleMoveOk:H,handleMoveCancel:U,moveForm:_e,selectedFiles:k||new Set,isRenameFolderModalVisible:Ie,handleRenameFolderOk:Ne,handleRenameFolderCancel:Le,renameFolderForm:Ce,folderToRename:Pe,isCopyModalVisible:Oe,handleCopyOk:l.actions.handleCopyOk||(()=>Promise.resolve()),handleCopyCancel:l.actions.handleCopyCancel||(()=>{}),copyForm:Se,isDeleteConfirmVisible:Ee,handleDeleteConfirmOk:async()=>{var e;await(null==$?void 0:$()),await(null===(e=m.current)||void 0===e?void 0:e.refreshFileCounts())},handleDeleteConfirmCancel:()=>null==Y?void 0:Y()}),e(eO,{visible:le.isPixieEditorVisible,onClose:le.handlePixieEditorClose,file:le.editingFile,onSave:le.handlePixieEditorSave}),e(mO,{files:p.uploadFiles,visible:p.isUploadVisible,minimized:p.isUploadMinimized,totalFiles:p.totalFiles,completedFiles:p.completedFiles,onClose:p.closeUpload,onMinimize:p.minimizeUpload,onInsert:p.insertFile})]})},yE=f(({config:r={},onPathChange:o,onChangeSelection:s,onEditorOk:l,searchQuery:c="",sortBySize:h="name",apiEndpoints:d={},customIcons:f,dragDropIcon:p,dataProviders:g,notification:m})=>{i.useEffect(()=>{r.theme&&(e=>{document.documentElement.setAttribute("data-theme",e)})(r.theme),fE(r)},[r]),a(()=>{r.locale&&r.locale!==tr.language&&(console.log("FileManagerApp: меняем локаль с",tr.language,"на",r.locale),tr.changeLanguage(r.locale)),r.customLocale&&r.locale&&tr.addResourceBundle(r.locale,"translation",r.customLocale,!0,!0)},[r.locale,r.customLocale]);const v=u(null);return e(O,{className:"em-filemanager",children:t(n,{children:[e(I,{getPopupContainer:()=>v.current||document.body,children:e(Wr,{options:{apiEndpoints:d,searchQuery:c,sortBySize:h,onPathChange:o,onChangeSelection:s,onEditorOk:l,config:r,customIcons:f,dragDropIcon:p,dataProviders:g,notification:m},children:e(bE,{})})}),e("div",{ref:v,className:"file-manager-modal-root"})]})})});yE.displayName="FileManagerApp";const wE=t=>{var n,r,i;return e(yr,{i18n:tr,children:e(cn,{externalTheme:null!==(r=null===(n=t.config)||void 0===n?void 0:n.theme)&&void 0!==r?r:"light",customThemeToken:null===(i=t.config)||void 0===i?void 0:i.customTheme,children:e(k,{children:e(yE,Object.assign({},t))})})})},xE=new Map,_E=(t,n)=>{var r;let i;hE();let o={};const a=e=>{const t=!e||"fileManager"!==e.mode&&"imageCenter"!==e.mode&&"plugin"!==e.mode?void 0:e.mode;return"imageCenter"===t?hn("imageCenter",e):hn(t)};if(t instanceof HTMLElement){i=t;o={config:a(n),apiEndpoints:null==n?void 0:n.apiEndpoints}}else{i=t.element;const e=a(t.config),n=Object.assign(Object.assign({},null===(r=t.config)||void 0===r?void 0:r.apiEndpoints),t.apiEndpoints);o={config:e,currentPath:t.currentPath,onPathChange:t.onPathChange,onChangeSelection:t.onChangeSelection,searchQuery:t.searchQuery,sortBySize:t.sortBySize,apiEndpoints:n,dataProviders:t.dataProviders,customIcons:t.customIcons,dragDropIcon:t.dragDropIcon}}const s=A(i);s.render(e(wE,Object.assign({},o))),xE.set(i.id||`container_${Date.now()}`,s)},CE=e=>{const t=e.id||Object.keys(xE).find(e=>e.startsWith("container_"));if(t&&xE.has(t)){const e=xE.get(t);null==e||e.unmount(),xE.delete(t)}else{console.warn("Не удалось найти корень для размонтирования");try{A(e).unmount()}catch(e){console.error("Ошибка при размонтировании компонента:",e)}}},SE=new Map,AE=r=>{const{onClose:o,onSave:a,dataProviders:s,theme:l}=r,c=i.useMemo(()=>{if(r.file)return r.file;const e=r.name||"edited-image",t=r.extension||(r.type?r.type.split("/")[1]:"png"),n=r.type||`image/${t}`;return{thumbnail:r.imageDataUrl||"",name:e,id:void 0,type:n,extension:t}},[r.file,r.imageDataUrl,r.name,r.extension,r.type]),h=i.useCallback(async e=>{if((null==s?void 0:s.updateFile)&&e.id&&e.thumbnail)try{let t=e.type||"image/png";if(e.thumbnail.startsWith("data:")){const n=e.thumbnail.match(/^data:([^;]+)/);n&&n[1].startsWith("image/")&&(t=n[1])}const n=e.thumbnail.split(",")[1],r=atob(n),i=new Array(r.length);for(let e=0;e<r.length;e++)i[e]=r.charCodeAt(e);const o=new Uint8Array(i),a=new Blob([o],{type:t});e=await s.updateFile(e.id,{name:e.name,type:t,data:a,thumbnail:e.thumbnail,extension:e.extension})}catch(e){console.error("Standalone Pixie: updateFile error",e)}return a&&await a(e),e},[a,s]),d=u(null);return e(O,{className:"em-filemanager",children:t(n,{children:[e(I,{getPopupContainer:()=>d.current||document.body,children:e(yr,{i18n:tr,children:e(cn,{externalTheme:null!=l?l:"light",children:e(k,{children:e(Wr,{options:{dataProviders:s,config:{theme:null!=l?l:"light",locale:r.locale}},children:e(eO,{visible:!0,onClose:o,file:c,onSave:h})})})})})}),e("div",{ref:d,className:"file-manager-modal-root"})]})})},kE=t=>{hE();const n=t.element,r=A(n);r.render(e(AE,Object.assign({},t))),SE.set(n.id||`pixie_container_${Date.now()}`,r)},TE=e=>{const t=Array.from(SE.keys()).find(e=>e.startsWith("pixie_container_")),n=e.id||t;if(n&&SE.has(n)){const e=SE.get(n);null==e||e.unmount(),SE.delete(n)}else{console.warn("Не удалось найти корень Pixie для размонтирования");try{A(e).unmount()}catch(e){console.error("Ошибка при размонтировании Pixie:",e)}}},IE=e=>{var t,n;const{mode:r,element:i,fileManager:o,pixieEditor:a,theme:s,dataProviders:l}=e;let c,u;const h={unmount:()=>{c&&CE(c),u&&TE(u)},unmountFileManager:void 0,unmountPixieEditor:void 0};switch(r){case"fileManager":c=i,_E(i,Object.assign(Object.assign({},null==o?void 0:o.config),{theme:s||(null===(t=null==o?void 0:o.config)||void 0===t?void 0:t.theme),apiEndpoints:null==o?void 0:o.apiEndpoints})),h.unmountFileManager=()=>CE(c);break;case"pixieEditor":u=i,kE(Object.assign({element:i,theme:s||(null==a?void 0:a.theme),dataProviders:l||(null==a?void 0:a.dataProviders)},a)),h.unmountPixieEditor=()=>TE(u);break;case"both":{const e=document.createElement("div");e.id="file-manager-container",e.style.cssText="height: 50%; border-bottom: 1px solid #d9d9d9;";const t=document.createElement("div");t.id="pixie-editor-container",t.style.cssText="height: 50%;",i.appendChild(e),i.appendChild(t),c=e,u=t,_E(c,Object.assign(Object.assign({},null==o?void 0:o.config),{theme:s||(null===(n=null==o?void 0:o.config)||void 0===n?void 0:n.theme),apiEndpoints:null==o?void 0:o.apiEndpoints})),kE(Object.assign({element:u,theme:s||(null==a?void 0:a.theme),dataProviders:l||(null==a?void 0:a.dataProviders)},a)),h.unmountFileManager=()=>CE(c),h.unmountPixieEditor=()=>TE(u);break}}return h};var OE={init:_E,unmount:CE,initPixieEditor:kE,unmountPixieEditor:TE,initFileManager:IE};export{si as FileContent,yE as FileManagerApp,wE as FileManagerAppWithContext,li as FileModals,Hi as FolderSidebar,AE as PixieOnlyApp,OE as default,_E as init,IE as initFileManager,kE as initPixieEditor,hE as installResizeObserverErrorHandler,dE as uninstallResizeObserverErrorHandler,CE as unmount,TE as unmountPixieEditor};
95
+ var xO=function(e,t){return xO=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},xO(e,t)};var _O=function(){return _O=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_O.apply(this,arguments)};var CO="Pixel",SO="Percent",AO={unit:SO,value:.8};function kO(e){return"number"==typeof e?{unit:SO,value:100*e}:"string"==typeof e?e.match(/^(\d*(\.\d+)?)px$/)?{unit:CO,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:SO,value:parseFloat(e)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),AO):(console.warn("scrollThreshold should be string or number"),AO)}var TO=function(e){function t(t){var n=e.call(this,t)||this;return n.lastScrollTop=0,n.actionTriggered=!1,n.startY=0,n.currentY=0,n.dragging=!1,n.maxPullDownDistance=0,n.getScrollableTarget=function(){return n.props.scrollableTarget instanceof HTMLElement?n.props.scrollableTarget:"string"==typeof n.props.scrollableTarget?document.getElementById(n.props.scrollableTarget):(null===n.props.scrollableTarget&&console.warn("You are trying to pass scrollableTarget but it is null. This might\n happen because the element may not have been added to DOM yet.\n See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.\n "),null)},n.onStart=function(e){n.lastScrollTop||(n.dragging=!0,e instanceof MouseEvent?n.startY=e.pageY:e instanceof TouchEvent&&(n.startY=e.touches[0].pageY),n.currentY=n.startY,n._infScroll&&(n._infScroll.style.willChange="transform",n._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},n.onMove=function(e){n.dragging&&(e instanceof MouseEvent?n.currentY=e.pageY:e instanceof TouchEvent&&(n.currentY=e.touches[0].pageY),n.currentY<n.startY||(n.currentY-n.startY>=Number(n.props.pullDownToRefreshThreshold)&&n.setState({pullToRefreshThresholdBreached:!0}),n.currentY-n.startY>1.5*n.maxPullDownDistance||n._infScroll&&(n._infScroll.style.overflow="visible",n._infScroll.style.transform="translate3d(0px, "+(n.currentY-n.startY)+"px, 0px)")))},n.onEnd=function(){n.startY=0,n.currentY=0,n.dragging=!1,n.state.pullToRefreshThresholdBreached&&(n.props.refreshFunction&&n.props.refreshFunction(),n.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame(function(){n._infScroll&&(n._infScroll.style.overflow="auto",n._infScroll.style.transform="none",n._infScroll.style.willChange="unset")})},n.onScrollListener=function(e){"function"==typeof n.props.onScroll&&setTimeout(function(){return n.props.onScroll&&n.props.onScroll(e)},0);var t=n.props.height||n._scrollableNode?e.target:document.documentElement.scrollTop?document.documentElement:document.body;n.actionTriggered||((n.props.inverse?n.isElementAtTop(t,n.props.scrollThreshold):n.isElementAtBottom(t,n.props.scrollThreshold))&&n.props.hasMore&&(n.actionTriggered=!0,n.setState({showLoader:!0}),n.props.next&&n.props.next()),n.lastScrollTop=t.scrollTop)},n.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:t.dataLength},n.throttledOnScrollListener=function(e,t,n,r){var i,o=!1,a=0;function s(){i&&clearTimeout(i)}function l(){var l=this,c=Date.now()-a,u=arguments;function h(){a=Date.now(),n.apply(l,u)}o||(r&&!i&&h(),s(),void 0===r&&c>e?h():!0!==t&&(i=setTimeout(r?function(){i=void 0}:h,void 0===r?e-c:e)))}return"boolean"!=typeof t&&(r=n,n=t,t=void 0),l.cancel=function(){s(),o=!0},l}(150,n.onScrollListener).bind(n),n.onStart=n.onStart.bind(n),n.onMove=n.onMove.bind(n),n.onEnd=n.onEnd.bind(n),n}return function(e,t){function n(){this.constructor=e}xO(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){if(void 0===this.props.dataLength)throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),"number"==typeof this.props.initialScrollY&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),"function"!=typeof this.props.refreshFunction))throw new Error('Mandatory prop "refreshFunction" missing.\n Pull Down To Refresh functionality will not work\n as expected. Check README.md for usage\'')},t.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},t.prototype.componentDidUpdate=function(e){this.props.dataLength!==e.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},t.getDerivedStateFromProps=function(e,t){return e.dataLength!==t.prevDataLength?_O(_O({},t),{prevDataLength:e.dataLength}):null},t.prototype.isElementAtTop=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,r=kO(t);return r.unit===CO?e.scrollTop<=r.value+n-e.scrollHeight+1:e.scrollTop<=r.value/100+n-e.scrollHeight+1},t.prototype.isElementAtBottom=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,r=kO(t);return r.unit===CO?e.scrollTop+n>=e.scrollHeight-r.value:e.scrollTop+n>=r.value/100*e.scrollHeight},t.prototype.render=function(){var e=this,t=_O({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),n=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),r=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return i.createElement("div",{style:r,className:"infinite-scroll-component__outerdiv"},i.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(t){return e._infScroll=t},style:t},this.props.pullDownToRefresh&&i.createElement("div",{style:{position:"relative"},ref:function(t){return e._pullDown=t}},i.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!n&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},t}(S),IO={gifTab:"gifTab",gifSearchInput:"gifSearchInput",scrollableDiv:"scrollableDiv",listItem:"listItem",loaded:"loaded",loadedImage:"loadedImage"};const OO=e(Ie,{style:{fontSize:20},spin:!0}),EO=({setImageGifList:n,imageGifList:r=[],currentReqGif:i,setCurrentReqGif:a,inputRef:s,customRequest:l})=>{const{t:c}=br(),{options:u}=Hr(),{config:h}=u,[d,f]=o(null),[p,g]=o(!1),[m,v]=o(25),b=async function({query:e,page:t}){const n=e.keywords.replace(/[^\w\sа-яёА-ЯЁ]|_/g,"").replace(/[\s_-]+/g," ");try{const e=`https://api.giphy.com/v1/gifs/search?api_key=${null==h?void 0:h.REACT_APP_GIPHY_KEY}&q=${n}&limit=25&offset=${t}&lang=en`,r=await fetch(e);return{data:await r.json()}}catch(e){console.log(e)}},y=async()=>{var e,t;const r=await b({query:i,page:0});(null===(t=null===(e=null==r?void 0:r.data)||void 0===e?void 0:e.data)||void 0===t?void 0:t.length)&&r.data.data.length>0&&n(r.data.data)};return t("div",{className:IO.gifTab,children:[t(P,{onValuesChange:y,className:r.length>0?IO.searchResults:"",children:[e(P.Item,{className:IO.gifSearchInput,children:e(E,{onKeyDown:e=>"Space"===e.code&&y(),onPressEnter:e=>y(),allowClear:!0,placeholder:c("Search GIFs"),value:null==i?void 0:i.keywords,onChange:e=>a(t=>Object.assign(Object.assign({},t),{keywords:e.target.value})),ref:s,spellCheck:"false",suffix:e(se,{onClick:y,className:"cards-search__search-icon, input-icon",style:{fontSize:"16px",cursor:"pointer"}})})}),r.length>0&&e("div",{className:"ant-divider blocks-search__divider",role:"separator"})]}),e("div",{className:"serach-output-wrapper",children:r.length>0&&e("div",{id:"scrollableDiv",className:IO.scrollableDiv,children:e(TO,{dataLength:r&&r.length,next:async()=>{p||(g(!0),b({query:i,page:m}).then(e=>{e&&e.data&&e.data.data&&n(t=>[...t,...e.data.data]),g(!1),v(e=>e+25)}).catch(()=>{g(!1)}))},hasMore:!!r,endMessage:t(G,{plain:!0,children:[c("That`s all we could find.")," 🤐"]}),scrollableTarget:"scrollableDiv",style:{overflow:"visible"},loader:e(te,{indicator:OO}),children:r.map((n,r)=>t("div",{className:IO.listItem,onClick:()=>((e,t)=>{f(t),setTimeout(()=>{f(null)},2e3),l(e)})(n.images.downsized.url,n.id),children:[e("img",{className:d===n.id?IO.loadedImage:"",width:"322px",src:`${n.images.downsized.url}`,alt:n.title,onLoad:e=>{const t=e.target.parentNode;t&&t instanceof HTMLElement&&t.classList.add(IO.loaded)}}),e("a",{rel:"noreferrer",href:"https://giphy.com/",target:"_blank",onClick:e=>e.stopPropagation()}),d===n.id&&e(te,{className:"ant-spin",indicator:e(Ie,{spin:!0})})]},n.id+r))})})})]})};var PO="stockTab",MO="stockSearchInput",FO="searchResults",jO="blocksSearchDividerWrapper",RO="scrollableDiv",DO="listItem",LO="loaded",NO="loadedImage",zO="creatorInfo",BO="stockColorFilter",VO="allColors",UO="blackColor",HO="bwColor",WO="whiteColor",YO="orangeColor",$O="redColor",GO="purpleColor",XO="magentaColor",KO="greenColor",qO="tealColor",ZO="blueColor";const JO=e(Ie,{style:{fontSize:20},spin:!0}),QO=({imageStockList:r,setImageStockList:i,currentReq:s,setCurrentReq:l,inputRef:c,customRequest:u})=>{const[h,d]=o(!1),[f,p]=o(2),{t:g}=br(),{options:m}=Hr(),{config:v}=m,b=async function({query:e,page:t}){const n=e.keywords.replace(/[^\w\sа-яёА-ЯЁ]|_/g,"").replace(/[\s_-]+/g," ");try{let r=`https://api.unsplash.com/search/photos?client_id=${null==v?void 0:v.UNSPLASH_KEY}&lang=ru&per_page=18&query=${n}&page=${t}`;""!==e.color&&(r+=`&color=${e.color}`),""!==e.orientation&&(r+=`&orientation=${e.orientation}`);const i=await fetch(r);return{data:await i.json()}}catch(e){console.log(e)}};a(()=>{""!==s.keywords&&y()},[s.color,s.orientation]);const y=async()=>{var e,t;const n=await b({query:s,page:1});(null===(t=null===(e=null==n?void 0:n.data)||void 0===e?void 0:e.results)||void 0===t?void 0:t.length)&&n.data.results.length>0&&i(n.data.results)},[w,x]=o(null),_=(e,t,n)=>{!async function(e){try{const t=await fetch(`${e}&client_id=${null==v?void 0:v.UNSPLASH_KEY}`);return{data:await t.json()}}catch(e){console.log(e)}}(t.download_location),x(n),setTimeout(()=>x(null),2e3),u(`${e.raw}&w=1200&q=96`)};return t("div",{className:PO,children:[t(P,{onValuesChange:y,className:r.length>0?FO:"",children:[t(B,{gutter:24,children:[e(V,{span:r.length>0?void 0:24,children:e(P.Item,{className:MO,children:e(E,{onKeyDown:e=>"Space"===e.code&&y(),onPressEnter:e=>y(),allowClear:!0,placeholder:g("Search image"),value:s.keywords,onChange:e=>l(t=>Object.assign(Object.assign({},t),{keywords:e.target.value})),ref:c,spellCheck:"false",suffix:e(se,{onClick:y,className:"cards-search__search-icon, input-icon",style:{fontSize:"16px",cursor:"pointer"}})})})}),r.length>0&&t(n,{children:[e(V,{children:t(ne.Group,{defaultValue:"",onChange:e=>l(t=>Object.assign(Object.assign({},t),{orientation:e.target.value})),children:[e(re,{title:g("All"),placement:"top",children:e(ne.Button,{value:"",children:e(yi,{})})}),e(re,{title:g("Landscape"),placement:"top",children:e(ne.Button,{value:"landscape",children:e(wi,{})})}),e(re,{title:g("Portrait"),placement:"top",children:e(ne.Button,{value:"portrait",children:e(xi,{})})}),e(re,{title:g("Squarish"),placement:"top",children:e(ne.Button,{value:"squarish",children:e(_i,{})})})]})}),e(V,{children:t(ne.Group,{defaultValue:"",className:BO,onChange:e=>l(t=>Object.assign(Object.assign({},t),{color:e.target.value})),children:[e(re,{title:g("All"),placement:"top",children:e(ne.Button,{className:VO,value:"",children:"All"})}),e(re,{title:g("Black"),placement:"top",children:e(ne.Button,{className:UO,value:"black",children:"B"})}),e(re,{title:g("Black and White"),placement:"top",children:e(ne.Button,{className:HO,value:"black_and_white",children:"B&W"})}),e(re,{title:g("White"),placement:"top",children:e(ne.Button,{className:WO,value:"white",children:"W"})}),e(re,{title:g("Orange"),placement:"top",children:e(ne.Button,{className:YO,value:"orange",children:"O"})}),e(re,{title:g("Red"),placement:"top",children:e(ne.Button,{className:$O,value:"red",children:"R"})}),e(re,{title:g("Purple"),placement:"top",children:e(ne.Button,{className:GO,value:"purple",children:"P"})}),e(re,{title:g("Magenta"),placement:"top",children:e(ne.Button,{className:XO,value:"magenta",children:"M"})}),e(re,{title:g("Green"),placement:"top",children:e(ne.Button,{className:KO,value:"green",children:"G"})}),e(re,{title:g("Teal"),placement:"top",children:e(ne.Button,{className:qO,value:"teal",children:"T"})}),e(re,{title:g("Blue"),placement:"top",children:e(ne.Button,{className:ZO,value:"blue",children:"B"})})]})})]})]}),r.length>0&&e("div",{className:jO,children:e(G,{className:"zero-divider"})})]}),e("div",{className:"serach-output-wrapper",children:r.length>0&&e("div",{id:"scrollableDiv",className:RO,children:e(TO,{dataLength:r&&r.length,next:async()=>{h||(d(!0),b({query:s,page:f}).then(e=>{e&&e.data&&e.data.results&&i(t=>[...t,...e.data.results]),d(!1),p(e=>e+1)}).catch(()=>{d(!1)}))},hasMore:!!r,endMessage:t(G,{plain:!0,children:[g("That`s all we could find.")," 🤐"]}),scrollableTarget:"scrollableDiv",style:{overflow:"visible"},loader:e(te,{indicator:JO}),children:r.map((n,r)=>t("div",{className:DO,onClick:()=>_(n.urls,n.links,n.id),children:[e("img",{className:w===n.id?NO:"",width:"310px",src:`${n.urls.raw}&w=644&q=96`,alt:n.description,onLoad:e=>{const t=e.target.parentNode;t&&t instanceof HTMLElement&&t.classList.add(LO)}}),t("p",{className:zO,onClick:e=>e.stopPropagation(),children:[g("Photo by")," ",e("a",{target:"_blank",href:`${n.user.links.html}?utm_source=${null==v?void 0:v.APP_NAME_UNSPLASH}&utm_medium=referral`,rel:"noreferrer",children:n.user.name})," ",g("on")," ",e("a",{target:"_blank",href:`https://unsplash.com/?utm_source=${null==v?void 0:v.APP_NAME_UNSPLASH}&utm_medium=referral`,rel:"noreferrer",children:"Unsplash"})]}),w===n.id&&e(te,{className:"ant-spin",indicator:e(Ie,{spin:!0})})]},n.id+r))})})})]})},eE=()=>{const{options:e}=Hr(),t=e.config;return c((e,n)=>{!1!==(null==t?void 0:t.pushToGTM)&&((e,t)=>{const n=()=>{try{const t=Object.assign(Object.assign({},e),{appLabel:"blocks_app"});window.dataLayer&&"function"==typeof window.dataLayer.push?window.dataLayer.push(t):console.log("Attempting to add to the dataLayer:",e)}catch(e){console.error("Ошибка при вызове GTM:",e)}};t?setTimeout(n,t):n()})(e,n)},[null==t?void 0:t.pushToGTM])};var tE="slideshowContainer",nE="slideshowImage";const rE=({images:t,transitionDuration:n=1e3,frameHeight:r})=>{const[i,s]=o([]),l=()=>{s(e=>e.map((t,n)=>n===e.length-1?Object.assign(Object.assign({},t),{opacity:1}):t))};return a(()=>{if(t.length>0){const e=t[t.length-1];s(t=>[...t,{src:e,opacity:0}]),setTimeout(l,1e3)}else s([])},[t]),e("div",{className:tE,style:{height:r,minHeight:130},children:i.map((t,r)=>e("img",{src:`data:image/jpeg;base64, ${t.src}`,alt:`Slide ${r+1}`,className:nE,style:{opacity:t.opacity,transition:`opacity ${n}ms linear`,display:"block"}},r))})};const iE=t=>{var{className:n,style:r,color:i,text:o,bordered:a}=t,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(t,["className","style","color","text","bordered"]);const l=o||"";return e(ie,Object.assign({style:r,color:i,bordered:a,className:n},s,{children:l}))},oE=({text:n,counter:r,limits:i,wrapperStyles:o})=>{const{t:a}=br(),{options:s}=Hr(),l=s.config,{token:c}=T.useToken(),u=+i>0,h=!u||r<+i,d=(null==l?void 0:l.billingPageUrl)||"/billing",f=r+" "+a("of")+" "+(u?i:"∞")+" "+(n||a("tests",{count:i}))+" "+a("was used",{count:r});return t("div",{className:"limits-couter-wrapper",style:o,children:[e(iE,{bordered:!1,text:f,className:"limit-counter",style:{color:h?c.colorText:"white"},color:h?c.colorFillSecondary:"rgb(255, 77, 79)"}),u&&e("div",{style:{fontSize:14,textDecoration:"underline",cursor:"pointer"},onClick:()=>window.location.assign(d),children:a("Need more?")})]})};var aE={imageAi:"imageAi",imageItem:"imageItem",textAreaInputHybrid:"textAreaInputHybrid",loading:"loading",carousel:"carousel",arrow:"arrow",arrowNext:"arrowNext",arrowPrev:"arrowPrev",arrowBtn:"arrowBtn",arrowBtnNext:"arrowBtnNext",arrowBtnPrev:"arrowBtnPrev",row:"row",inputAffixWrapper:"inputAffixWrapper",textarea:"textarea",inputIcon:"inputIcon"};const sE=f(({className:t,onClick:n})=>e("div",{className:`${aE.arrow} ${aE.arrowNext} ${t||""}`,onClick:n,children:e(X,{className:`${aE.arrowBtn} ${aE.arrowBtnNext}`,size:"large",icon:e(Oe,{})})}));sE.displayName="SampleNextArrow";const lE=f(({className:t,onClick:n})=>e("div",{className:`${aE.arrow} ${aE.arrowPrev} ${t||""}`,onClick:n,children:e(X,{className:`${aE.arrowBtn} ${aE.arrowBtnPrev}`,size:"large",icon:e(Ee,{})})}));lE.displayName="SamplePrevArrow";const cE=({customRequest:n,aiTabRef:r,inputAiRef:i,isImageUploaded:s,setIsImageUploaded:l,aiImageRequest:u,setAiImageRequest:d,imageAiList:f,setImageAiList:p,isLoadingAi:g,setIsLoadingAi:m})=>{const{t:v}=br(),[b,y]=o("auto"),{aiImageCounter:w,currentAiImgLimits:x,loadingDuringGeneration:_,requestStatus:C,handleGenerate:S,convertBase64ToFile:A,isShiftPressed:k,setIsShiftPressed:T,limitsInPlugin:I}=function({setFrameHeight:e,customRequest:t,aiTabRef:n,isImageUploaded:r,setIsImageUploaded:i,aiImageRequest:s,imageAiList:l,setImageAiList:u,isLoadingAi:d,setIsLoadingAi:f}){const{t:p}=br(),{options:g}=Hr(),m=g.config,v=ni(),b=eE(),{messages:y}=g.config,[w,x]=o([]),[_,C]=o(0),[S,A]=o(null),[k,T]=o(!1),[I,O]=o(p("Evaluating the task")),[E,P]=o(!1);a(()=>{x(y)},[y]),a(()=>{l.length||S||x([])},[l,S]);const M=h(()=>(console.log("sendAIImageRequest"),m&&"function"==typeof(null==m?void 0:m.sendAIImageRequest)?null==m?void 0:m.sendAIImageRequest:()=>Promise.resolve({})),[m]),F=c(e=>{"error"!==e.status&&"Canceled"!==e.status?e.images?(O(String(e.status)),100===e.progress&&(f(!1),u(e.images),A(null),P(!1))):(u([String(e.data)]),100===e.progress&&f(!1)):(f(!1),P(!1),v.error({message:p("Something went wrong, please try again"),placement:"bottomRight",description:String(S)||void 0}))},[u,O,p,f,S,v,P]);a(()=>{w.length>1&&F(w[w.length-1])},[F,w]);const j=h(()=>{if(m&&"function"==typeof(null==m?void 0:m.sseQuery)){const e=null==m?void 0:m.sseQuery;return t=>e(t)}return e=>{}},[m]),R=h(()=>m&&"object"==typeof(null==m?void 0:m.handleLimitUsageEmitter)?null==m?void 0:m.handleLimitUsageEmitter:{fire:()=>{}},[m]),D=null==m?void 0:m.elementId,{projectId:L}=m,{limits:N}=(null==m?void 0:m.limits)?m:{limits:{ai_img_limit:0}},{ai_img_limit:z}=N,B=z>0&&_>=z,V=!(!(null==m?void 0:m.limits)||!m.counters)&&zr,U=c(()=>{R.fire({name:"AiImgCount",count:_+1})},[R,_]),H=h(()=>!B&&!V,[B,V,_,z]),W=c(async()=>{console.log("generateImage"),O(p("Evaluating the task")),""===s||d||(f(!0),P(!0),u([]),b({event:"submit_form",action:"ai_image_generation",entity_id:D,project_id:L}),M({body:{project_id:L,request:"create-image",connection:"midjourney",message:s}}).then(e=>{var t,n,r;const{data:i,error:o}=e||{};if(o)throw o;const a=i;if(401===(null==a?void 0:a.status)||401===(null===(t=null==a?void 0:a.data)||void 0===t?void 0:t.status))throw new Error("ERROR");if(200===(null==a?void 0:a.status)||200===(null===(n=null==a?void 0:a.data)||void 0===n?void 0:n.status)){const e=(null==a?void 0:a.task)||(null===(r=null==a?void 0:a.data)||void 0===r?void 0:r.task);(null==e?void 0:e.id)&&(O(e.message),A(e.id)),(null==a?void 0:a.message)&&v.success({message:a.message,placement:"bottomRight",description:s}),j({task_id:null==e?void 0:e.id,entity_id:D})}else f(!1),P(!1),v.error({message:(null==a?void 0:a.message)||p("Something went wrong, please try again"),placement:"bottomRight",description:s})}).catch(e=>{f(!1),P(!1);const t=e;return((null==t?void 0:t.error)||(null==t?void 0:t.data))&&(null==v||v.error({message:p("Something went wrong, please try again"),placement:"bottomRight",description:s})),t}))},[s,d,f,P,u,b,D,L,M,v,j,p]),Y=c(()=>{H&&W()},[H,V,C,U,W,v,p]);a(()=>{},[m,V]);const $=c(e=>{if(!r){i(!0);const n=e.match(/^data:image\/([A-Za-z-+/]+);base64,(.+)$/);if(!n)return;const r=n[1],o=n[2],a=atob(o),s=new Array(a.length);for(let e=0;e<a.length;e++)s[e]=a.charCodeAt(e);const l=new Uint8Array(s),c=new Blob([l],{type:`image/${r}`}),u=new File([c],"image.jpeg",{type:c.type,lastModified:Date.now()});t({file:u})}},[r,i,t]);return a(()=>{(d||l.length>0)&&setTimeout(()=>{let t=350;n.current&&(t=n.current.offsetHeight-120),e(t)},0)},[n,l.length,d,e]),{aiImageCounter:_,setAiImageCounter:C,currentAiImgLimits:z,isFieldsDisabled:B,canGenerateImage:H,aiImageRequest:s,imageAiList:l,setImageAiList:u,isLoadingAi:d,setIsLoadingAi:f,loadingDuringGeneration:E,setLoadingDuringGeneration:P,requestStatus:I,setRequestStatus:O,handleGenerate:Y,handleLimitAiImgCount:U,convertBase64ToFile:$,isShiftPressed:k,setIsShiftPressed:T,currentReqId:S,setCurrentReqId:A,limitsInPlugin:V}}({setFrameHeight:y,customRequest:n,aiTabRef:r,isImageUploaded:s,setIsImageUploaded:l,aiImageRequest:u,imageAiList:f,setImageAiList:p,isLoadingAi:g,setIsLoadingAi:m}),[O,M]=o(!1),F=c(()=>M(!0),[]),j=c(()=>M(!1),[]),R=c(e=>d(e.target.value),[d]),D=c(e=>{"Shift"===e.key?T(!0):"Enter"!==e.key||k||(e.preventDefault(),S())},[k,S,T]),L=c(e=>{"Shift"===e.key&&T(!1)},[T]);return t("div",{className:aE.imageAi,children:[I&&e(oE,{text:"images",counter:w,limits:x,wrapperStyles:{marginTop:-25}}),e(B,{gutter:24,className:aE.row,children:e(V,{span:24,children:e(P.Item,{children:t("span",{className:`ant-input-affix-wrapper ant-input-affix-wrapper-lg ${aE.inputAffixWrapper}${O?" ant-input-affix-wrapper-focused":""}`,children:[e(E.TextArea,{ref:i,onKeyDown:D,onKeyUp:L,onFocus:F,onBlur:j,autoSize:!0,allowClear:!0,className:`${aE.textAreaInputHybrid} ${aE.textarea}`,placeholder:"Generate image",value:u,onChange:R,spellCheck:"false"}),e("span",{className:`ant-input-suffix ${aE.inputSuffix}`,children:g||_?e(Ie,{className:`${aE.inputIcon} input-icon`,spin:!0}):e(Si,{className:`${aE.inputIcon} input-icon`,onClick:S})})]})})})}),(g||f.length>0)&&t(oe,{dotPosition:"top",arrows:!0,nextArrow:e(sE,{}),prevArrow:e(lE,{}),className:aE.carousel,children:[g&&!f.length&&e("div",{className:aE.loading,children:t("div",{className:"spin",children:[e(Ie,{style:{fontSize:48},spin:!0}),e("p",{className:"status",children:C})]})}),f.length>0&&f.map((n,r)=>t("div",{className:aE.imageItem,children:[e(rE,{images:f,frameHeight:b}),e("div",{className:"buttons",children:f.length>0&&!g&&e(X,{onClick:()=>A(`data:image/jpeg;base64, ${n}`),icon:e(Pe,{}),children:v("Use this variant")})})]},r))]})]})};let uE=!1;const hE=()=>{if(uE)return;window.addEventListener("error",e=>!(!e.message||!e.message.includes("ResizeObserver loop completed with undelivered notifications"))&&(e.stopImmediatePropagation(),e.preventDefault(),!0),!0);const e=window.onerror;window.onerror=(t,n,r,i,o)=>!("string"!=typeof t||!t.includes("ResizeObserver loop completed with undelivered notifications"))||!!e&&e(t,n,r,i,o),window.addEventListener("unhandledrejection",e=>{var t,n;(null===(n=null===(t=e.reason)||void 0===t?void 0:t.message)||void 0===n?void 0:n.includes("ResizeObserver loop completed with undelivered notifications"))&&e.preventDefault()});const t=console.error;if(console.error=(...e)=>{var n;((null===(n=e[0])||void 0===n?void 0:n.toString())||"").includes("ResizeObserver loop completed with undelivered notifications")||t.apply(console,e)},"undefined"!=typeof window){const e=()=>{try{["webpackHotUpdate","__webpack_require__","__webpack_hash__"].forEach(e=>{if(window[e]){const e=window.__webpack_require__;e&&"object"==typeof e&&null!==e&&"cache"in e&&console.warn("✅ Webpack обнаружен, активирована дополнительная защита от ResizeObserver ошибок")}})}catch(e){console.warn("Ошибка при поиске webpack объектов:",e)}};e(),setTimeout(e,1e3)}uE=!0},dE=()=>{uE=!1},fE=e=>{(null==e?void 0:e.customTheme)&&((e={})=>{const t=document.querySelector("head");if(!t)return;const n=document.createElement("style");if(n.type="text/css",n.dataset.themeVariablesFm="true",n.setAttribute("data-file-manager","true"),Object.entries(e).length){let r="";Object.entries(e).forEach(([e,t])=>{"object"!=typeof t&&(r+=`\t--${e}: ${t};\n`)}),r=`.em-filemanager {\n${r}}`,n.appendChild(document.createTextNode(r));const i=t.querySelector('[data-theme-variables-fm="true"]');i?t.replaceChild(n,i):t.insertBefore(n,t.firstChild)}})(null==e?void 0:e.customTheme)},{Sider:pE,Content:gE}=ee,mE={keywords:"",color:"",orientation:""},vE={keywords:""},bE=()=>{const s=Kr(),l=ti(),h=(()=>{const{state:e,actions:t,options:n}=Hr(),{selectedFolder:r,pathHistory:i,folders:o}=e,{t:a}=br(),{setSelectedFolder:s,setPathHistory:l}=t,u=c((e,t=new Set)=>{if(t.has(e))return console.warn(`Обнаружен цикл в пути к папке с id=${e}`),[];const n=(Array.isArray(o)?o:[]).find(t=>t.id===e);if(!n)return[];const r=new Set(t);return r.add(e),n.parentId?n.parentId===n.id?(console.warn(`Обнаружена циклическая зависимость: папка ${n.id} является родителем самой себя`),[{id:n.id,name:n.name+" (ошибка)"}]):[...u(n.parentId,r),{id:n.id,name:n.name}]:[{id:n.id,name:n.name}]},[o]),h=c(e=>{console.log("🎯 handleFolderSelect:",e);const t="folders"===e?null:e;if(t!==r)if(null==s||s(t),"folders"===e){const e=[{id:"folders",name:a("Folders")}];null==l||l(e),n.onPathChange&&n.onPathChange([])}else if((Array.isArray(o)?o:[]).find(t=>t.id===e)){const t=u(e),r=[{id:"folders",name:a("Folders")},...t];null==l||l(r),n.onPathChange&&n.onPathChange(r.map(e=>e.name))}else console.warn("⚠️ Папка не найдена:",e);else console.log("🚫 Папка уже выбрана, пропускаем обновление:",e)},[n,l,s,a,o,u,r]),d=c(e=>{if(console.log("handleBreadcrumbClick вызван с index:",e),-1===e)null==s||s(null),null==l||l([{id:"folders",name:a("Folders")}]),n.onPathChange&&n.onPathChange([]);else{const t=i.slice(0,e+1),r=t[t.length-1],o="folders"===r.id?void 0:r.id;null==s||s(o||null),null==l||l(t),n.onPathChange&&n.onPathChange(t.map(e=>e.name))}},[n,i,l,s,a]),f=c(e=>{if(!e.isFolder)return;null==s||s(e.id);const t={id:e.id,name:e.name};if(l){const e=[...i,t];l(e)}if(n.onPathChange){const t=[...i.map(e=>e.name),e.name];n.onPathChange(t)}},[n,i,l,s]);return{state:{selectedFolder:r,pathHistory:i},actions:{handleFolderSelect:h,handleBreadcrumbClick:d,handleItemClick:f},selectedFolder:r,pathHistory:i,handleFolderSelect:h,handleBreadcrumbClick:d,handleItemClick:f}})(),d=(()=>{const{state:e,actions:t}=Hr(),{pagination:n}=e,{setPagination:r}=t,i=c((e,t)=>{const i=t||n.pageSize;null==r||r({current:e,pageSize:i,total:n.total})},[n.pageSize,n.total,r]);return{state:{pagination:n},actions:{handlePaginationChange:i}}})(),f=(()=>{const[e,t]=r.useState(()=>{const e=localStorage.getItem(ri);return e?Math.max(290,parseInt(e,10)):298}),[n,i]=r.useState(!1),[o,a]=r.useState(!1),[s,l]=r.useState(0),c=r.useCallback(()=>{console.log("Double click: Resetting to default width"),t(298),localStorage.setItem(ri,298..toString())},[]),u=r.useCallback(n=>{n.preventDefault(),n.stopPropagation(),i(!0),document.body.classList.add("resizing");const r=n.clientX,o=e;let s=o;const c=e=>{e.preventDefault();const n=Math.max(Math.min(o+e.clientX-r,600),290);s=n,t(n),l(e.clientX),a(!0)},u=()=>{i(!1),document.body.classList.remove("resizing"),a(!1),localStorage.setItem(ri,s.toString()),document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",u)};document.addEventListener("mousemove",c),document.addEventListener("mouseup",u)},[e]);return r.useEffect(()=>()=>{document.body.classList.remove("resizing")},[]),{sidebarWidth:e,isResizing:n,showResizeGuide:o,resizeGuidePosition:s,handleResizeStart:u,handleDoubleClick:c}})(),p=(()=>{const[e,t]=o([]),[n,r]=o(!1),[i,a]=o(!1),s=u(0),l=c(()=>(s.current+=1,`upload_${s.current}_${Date.now()}`),[]),h=c(e=>`${(e.size/1024).toFixed(2)} КБ`,[]),d=c(e=>{const n=e.map(e=>({id:l(),name:e.name,size:h(e),status:"uploading",progress:0}));return t(n),r(!0),a(!1),n.map(e=>e.id)},[l,h]),f=c((e,n)=>{t(t=>t.map(t=>t.id===e?Object.assign(Object.assign({},t),{progress:Math.min(100,Math.max(0,n))}):t))},[]),p=c(e=>{t(t=>t.map(t=>t.id===e?Object.assign(Object.assign({},t),{status:"success",progress:100}):t))},[]),g=c((e,n)=>{t(t=>t.map(t=>t.id===e?Object.assign(Object.assign({},t),{status:"error",error:n}):t))},[]),m=c(()=>{r(!1),a(!1),setTimeout(()=>{t([])},300)},[]),v=c(()=>{a(e=>!e)},[]),b=c(e=>{t(t=>{const n=t.filter(t=>t.id!==e);return 0===n.length&&setTimeout(()=>{r(!1),a(!1)},100),n})},[]),y=e.length,w=e.filter(e=>"success"===e.status||"error"===e.status).length;return{uploadFiles:e,isUploadVisible:n,isUploadMinimized:i,totalFiles:y,completedFiles:w,startUpload:d,updateProgress:f,markAsSuccess:p,markAsError:g,closeUpload:m,minimizeUpload:v,insertFile:b}})(),g=Xr(),m=i.useRef(null),{folders:v,loading:b}=s.state,{fetchFolders:y,handleCreateFolder:w,handleModalOk:x,handleModalCancel:_,generateMenuItems:C}=s.actions,S=ci(y),{files:A,selectedFiles:k,loading:T,isRenamingFile:I,fileToRename:O}=l.state,{fetchFiles:E,handleDeleteFile:P,handleDeleteFolder:M,handleAddFile:F,handleAddFileByUrl:j,uploadFileWithProvider:R,toggleFileSelection:D,showRenameModal:L,handleRenameCancel:N,handleRenameOk:z,handleDroppedFiles:B,showMoveModal:V,handleMoveCancel:U,handleMoveOk:H,showDeleteConfirm:W,handleDeleteConfirmCancel:Y,handleDeleteConfirmOk:$}=l.actions,{selectedFolder:X,pathHistory:K}=h.state,{handleFolderSelect:q,handleBreadcrumbClick:Z,handleItemClick:J}=h.actions,{pagination:Q}=d.state,te=Gr(E),{searchTerm:ne,sortBy:re,sortOrder:ie}=te.state,{handleSearch:oe,handleSort:ae,handlePaginationChange:se}=te.actions,le=(({files:e,selectedFiles:t,fetchFiles:n,selectedFolder:i})=>{const o=ni(),{options:a,actions:s,state:l}=r.useContext(Ur),{setActiveLibraryItem:c}=s,{activeLibraryItem:u}=l,[h,d]=r.useState(!1),[f,p]=r.useState(null);r.useEffect(()=>{console.log(h)},[h]);const g=r.useCallback(e=>{var t;if(e.type&&e.type.startsWith("image/"))return!0;if(e.extension){const t=e.extension.toLowerCase();return Br.includes(t)}const n=null===(t=e.name.split(".").pop())||void 0===t?void 0:t.toLowerCase();return!!n&&Br.includes(n)},[]),m=r.useCallback(async e=>{const{dataProviders:t}=a;if(console.log("🔧 saveFileToServer: dataProviders доступны:",{hasUpdateFile:!!(null==t?void 0:t.updateFile),hasUploadFile:!!(null==t?void 0:t.uploadFile),hasThumbnail:!!e.thumbnail,fileId:e.id}),(null==t?void 0:t.updateFile)&&e.thumbnail)try{let n=e.type||"image/png";if(e.thumbnail.startsWith("data:")){const t=e.thumbnail.match(/^data:([^;]+)/);t&&t[1].startsWith("image/")&&(n=t[1])}const r=e.thumbnail.split(",")[1],i=atob(r),o=new Array(i.length);for(let e=0;e<i.length;e++)o[e]=i.charCodeAt(e);const a=new Uint8Array(o),s=new Blob([a],{type:n});return console.log("Using updateFile method with:",{fileId:e.id,mimeType:n,blobType:s.type}),await t.updateFile(e.id,{name:e.name,type:n,data:s,thumbnail:e.thumbnail,extension:e.extension})}catch(e){return console.error("Ошибка при обновлении файла через updateFile:",e),null}else if((null==t?void 0:t.uploadFile)&&e.thumbnail)try{let n=e.type||"image/png";if(e.thumbnail.startsWith("data:")){const t=e.thumbnail.match(/^data:([^;]+)/);t&&t[1].startsWith("image/")&&(n=t[1])}const r=e.thumbnail.split(",")[1],i=atob(r),o=new Array(i.length);for(let e=0;e<i.length;e++)o[e]=i.charCodeAt(e);const a=new Uint8Array(o),s=new Blob([a],{type:n});console.log("Using uploadFile method as fallback with:",{mimeType:n,blobType:s.type}),await t.uploadFile(Object.assign(Object.assign({},e),{type:n,data:s}))}catch(e){return console.error("Ошибка при сохранении файла через uploadFile:",e),null}else if(null==t?void 0:t.renameFile)try{return await t.renameFile(e.id,e.name)}catch(e){return console.error("Ошибка при переименовании файла:",e),null}return console.warn("DataProvider для обновления файлов не настроен"),null},[a]),v=r.useCallback(n=>{let r;if(console.log("🎨 handleEdit ВЫЗВАНА!",{fileForEdit:n,selectedFilesSize:t.size}),n)r=n;else{if(1!==t.size)return;const n=Array.from(t)[0];if(r=e.find(e=>e.id===n),!r||r.isFolder||!g(r))return}console.log("🎨 usePixieEditor: Открываем редактор для файла:",r),c&&c(Nr),console.log("🎨 usePixieEditor: Устанавливаем editingFile"),p(r),console.log("🎨 usePixieEditor: Устанавливаем isPixieEditorVisible = true"),d(!0),console.log("🎨 usePixieEditor: Редактор должен открыться")},[t,e,g,d,c]),b=r.useCallback(()=>{console.log("🎨 usePixieEditor: Закрываем редактор"),c&&u===Nr&&c(jr),d(!1),p(null),console.log("🎨 usePixieEditor: Редактор закрыт")},[u,c]),y=r.useCallback(async e=>{console.log("Файл обновлен:",e);try{const t=await m(e);if(t)return await n({folderId:i||void 0}),o.success({message:"Успех",description:"Изображение успешно обновлено"}),b(),a.onEditorOk&&a.onEditorOk(t),await n({folderId:i||""}),b(),t}catch(e){console.error("Ошибка при сохранении файла:",e),o.error({message:"Ошибка",description:`Не удалось сохранить изменения: ${e instanceof Error?e.message:"Неизвестная ошибка"}`})}},[m,a,n,i,o,b]);return{isPixieEditorVisible:h,editingFile:f,handleEdit:v,handlePixieEditorSave:y,handlePixieEditorClose:b}})({files:A||[],selectedFiles:k||new Set,fetchFiles:E,selectedFolder:X||null}),ce=i.useCallback(async()=>{let e=null;await F({onStart:t=>{const n=p.startUpload([t]);e=n[0],console.log("🚀 onStart: файл запущен",{fileName:t.name,fileId:e})},onProgress:(t,n)=>{e&&(p.updateProgress(e,n),console.log("🔍 onProgress:",{fileName:t,fileId:e,progress:n}))},onComplete:async t=>{var n;e?(p.markAsSuccess(e),console.log("✅ onComplete: markAsSuccess вызван",{fileName:t,fileId:e}),await(null===(n=m.current)||void 0===n?void 0:n.refreshFileCounts())):console.error("❌ currentFileId отсутствует для onComplete:",t)},onError:(t,n)=>{e&&(p.markAsError(e,n),console.log("❌ onError: markAsError вызван",{fileName:t,fileId:e,error:n}),e=null)}})},[F,p]),ue=i.useCallback(async()=>{var e;await j(),await(null===(e=m.current)||void 0===e?void 0:e.refreshFileCounts())},[j]),he=i.useCallback(async e=>{var t;await P(e),await(null===(t=m.current)||void 0===t?void 0:t.refreshFileCounts())},[P]),de=i.useCallback(async e=>{var t;if(B){const n=p.startUpload(e);console.log("🚀 Drag&Drop: файлы запущены",{fileCount:e.length,fileIds:n}),e.forEach(async(e,t)=>{const r=n[t];if(!r)return;let i=0;const o=setInterval(()=>{i=Math.min(i+10+Math.floor(Date.now()%10),85),p.updateProgress(r,i)},200);setTimeout(()=>{clearInterval(o)},2e3)}),await B(e),n.forEach(e=>{p.updateProgress(e,100),p.markAsSuccess(e)}),await(null===(t=m.current)||void 0===t?void 0:t.refreshFileCounts())}},[B,p]),fe=i.useCallback(async e=>{var t;await M(e),await y(),await(null===(t=m.current)||void 0===t?void 0:t.refreshFileCounts())},[M,y]),pe=(({files:e,selectedFiles:t,toggleFileSelection:n,showRenameModal:i,showMoveModal:o,showCopyModal:a,handleDeleteFile:s,handleDeleteFolder:l,showDeleteConfirm:c,onEdit:u})=>({handleClearSelection:r.useCallback(()=>{t&&t.size>0&&t.forEach(e=>{n(e)})},[t,n]),handleRename:r.useCallback(()=>{if(t&&1===t.size){const e=Array.from(t)[0];i(e)}},[t,i]),handleDeleteSelected:r.useCallback(()=>{if(t&&t.size>0){if(c)return void c();t.forEach(t=>{const n=e.find(e=>e.id===t);n?n.isFolder?l(t):s(t):console.warn(`Объект с ID ${t} не найден в списке файлов`)})}},[t,e,s,l,c]),handleCopy:r.useCallback(()=>{a()},[a]),handleMove:r.useCallback(()=>{o()},[o]),handleEdit:r.useCallback(()=>{u()},[u])}))({files:A||[],selectedFiles:k||new Set,toggleFileSelection:D,showRenameModal:L,showMoveModal:V,showCopyModal:l.actions.showCopyModal||(()=>{}),handleDeleteFile:P,handleDeleteFolder:fe,showDeleteConfirm:W,onEdit:le.handleEdit}),ge=b||T;a(()=>{hE(),y()},[y]),i.useEffect(()=>{!X&&q&&v.length>0&&(console.log("✅ Инициализация: автоматический выбор корневой папки"),q("folders"))},[X,q,v.length]);const{state:me,actions:ve,options:be}=i.useContext(Ur),{form:ye,urlForm:we,renameForm:xe,moveForm:_e,renameFolderForm:Ce,copyForm:Se,isModalVisible:Ae,isUrlModalVisible:ke,isMoveModalVisible:Te,isRenameFolderModalVisible:Ie,isCopyModalVisible:Oe,isDeleteConfirmVisible:Ee,folderToRename:Pe,activeLibraryItem:Me}=me,{setIsUrlModalVisible:Fe,setSortField:je,setActiveLibraryItem:Re}=ve,{config:De}=be,{handleRenameFolderCancel:Le,handleRenameFolderOk:Ne}=S.actions,ze=c(e=>{se(e.current||Q.current,e.pageSize||Q.pageSize)},[se,Q.current,Q.pageSize]),Be=i.useCallback(e=>{const{sortBy:t,sortOrder:n}=(e=>{const[t,n]=e.split("-");return{sortBy:t,sortOrder:n}})(e);ae(t,n)},[ae]),[Ve,Ue]=o(vE),[He,We]=o([]),Ye=u(null),[$e,Ge]=o(mE),[Xe,Ke]=o([]),qe=u(null),[Ze,Je]=o(""),[Qe,et]=o([]),tt=i.useRef(void 0),[nt,rt]=o(!1),[it,ot]=o(!1),at=i.useRef(null),st=i.useRef(null);return a(()=>{(async()=>{const e=null==De?void 0:De.fileForEdit;if(tt.current!==e)try{if(tt.current=e,Me===Nr&&e&&!le.editingFile&&"string"==typeof e)if(e.startsWith("data:"))null==le||le.handleEdit({thumbnail:e});else{const t=await g.handleAddFileByUrl(e,!0);if(!t)throw new Error("Не удалось загрузить файл");tt.current===e&&(null==le||le.handleEdit(t))}}finally{tt.current===e&&(tt.current=null)}})()},[Me,null==De?void 0:De.fileForEdit]),a(()=>{var e,t,n;Me===jr?(console.log("reset requests"),We([]),Ue(vE),Ke([]),Ge(mE),et([]),Je(""),ot(!1),rt(!1)):Me===Lr?null===(e=st.current)||void 0===e||e.focus():Me===Rr?null===(t=Ye.current)||void 0===t||t.focus():Me===Dr&&(null===(n=qe.current)||void 0===n||n.focus())},[Me]),t(ee,{className:"file-manager__layout",children:[f.showResizeGuide&&e("div",{className:"resize-guide",style:{left:`${f.resizeGuidePosition}px`}}),e(wO,{selectedFiles:k||new Set,onClearSelection:pe.handleClearSelection,onRename:pe.handleRename,onDelete:pe.handleDeleteSelected,onCopy:pe.handleCopy,onMove:pe.handleMove,onEdit:pe.handleEdit,files:A||[]}),e(G,{className:"zero-divider"}),t(ee,{className:"file-manager__content",children:[t(pE,{width:f.sidebarWidth,theme:"light",className:"file-manager-sider",children:[e(Hi,{ref:m,selectedFolder:X||null,generateMenuItems:C,onFolderSelect:e=>null==q?void 0:q(e),folders:v||[],fetchFolders:y,handleAddFile:ce,setIsUrlModalVisible:e=>null==Fe?void 0:Fe(e),handleDeleteFolder:fe,handleCreateFolder:w,activeLibraryItem:Me,setActiveLibraryItem:e=>null==Re?void 0:Re(e)}),e("div",{className:"sidebar-resizer "+(f.isResizing?"resizing":""),onMouseDown:f.handleResizeStart,onDoubleClick:f.handleDoubleClick,children:e("div",{className:"sidebar-resizer-indicator"})})]}),e(ee,{className:"file-manager__main-content",children:t(gE,{className:"main-content",ref:at,children:[Me===jr&&e(si,{searchTerm:ne,sortField:me.sortField||"name",setSortField:e=>null==je?void 0:je(e),pathHistory:K||[],handleBreadcrumbClick:e=>null==Z?void 0:Z(e),handleAddFile:ce,setIsUrlModalVisible:e=>null==Fe?void 0:Fe(e),files:A||[],handleSearch:oe,handleSort:ae,sortBy:re,sortOrder:ie,handleSortOptionChange:Be,pagination:Q,setPagination:ze,loading:ge,handleItemClick:e=>null==J?void 0:J(e),handleDeleteFile:he,selectedFiles:k||new Set,toggleFileSelection:e=>null==D?void 0:D(e),handleDroppedFiles:de,fileUpload:p}),Me===Rr&&e(EO,{imageGifList:He,setImageGifList:We,currentReqGif:Ve,setCurrentReqGif:Ue,inputRef:Ye,customRequest:j}),Me===Dr&&e(QO,{imageStockList:Xe,setImageStockList:Ke,currentReq:$e,setCurrentReq:Ge,inputRef:qe,customRequest:j}),Me===Lr&&!!(null==De?void 0:De.sseQuery)&&e(cE,{imageAiList:Qe,setImageAiList:et,aiImageRequest:Ze,setAiImageRequest:Je,inputAiRef:st,customRequest:e=>R(e.file),isLoadingAi:nt,setIsLoadingAi:rt,isImageUploaded:it,setIsImageUploaded:ot,aiTabRef:at}),Me===Nr&&e(n,{})]})})]}),e(li,{isModalVisible:Ae,handleModalOk:x,handleModalCancel:_,form:ye,selectedFolder:X||null,folders:v||[],isUrlModalVisible:ke,setIsUrlModalVisible:e=>null==Fe?void 0:Fe(e),handleAddFileByUrl:ue,urlForm:we,isRenameModalVisible:I,handleRenameOk:()=>null==z?void 0:z(),handleRenameCancel:()=>null==N?void 0:N(),renameForm:xe,fileToRename:O,files:A||[],isMoveModalVisible:Te,handleMoveOk:H,handleMoveCancel:U,moveForm:_e,selectedFiles:k||new Set,isRenameFolderModalVisible:Ie,handleRenameFolderOk:Ne,handleRenameFolderCancel:Le,renameFolderForm:Ce,folderToRename:Pe,isCopyModalVisible:Oe,handleCopyOk:l.actions.handleCopyOk||(()=>Promise.resolve()),handleCopyCancel:l.actions.handleCopyCancel||(()=>{}),copyForm:Se,isDeleteConfirmVisible:Ee,handleDeleteConfirmOk:async()=>{var e;await(null==$?void 0:$()),await(null===(e=m.current)||void 0===e?void 0:e.refreshFileCounts())},handleDeleteConfirmCancel:()=>null==Y?void 0:Y()}),e(eO,{visible:le.isPixieEditorVisible,onClose:le.handlePixieEditorClose,file:le.editingFile,onSave:le.handlePixieEditorSave}),e(mO,{files:p.uploadFiles,visible:p.isUploadVisible,minimized:p.isUploadMinimized,totalFiles:p.totalFiles,completedFiles:p.completedFiles,onClose:p.closeUpload,onMinimize:p.minimizeUpload,onInsert:p.insertFile})]})},yE=f(({config:r={},onPathChange:o,onChangeSelection:s,onEditorOk:l,searchQuery:c="",sortBySize:h="name",apiEndpoints:d={},customIcons:f,dragDropIcon:p,dataProviders:g,notification:m})=>{i.useEffect(()=>{r.theme&&(e=>{document.documentElement.setAttribute("data-theme",e)})(r.theme),fE(r)},[r]),a(()=>{r.locale&&r.locale!==tr.language&&(console.log("FileManagerApp: меняем локаль с",tr.language,"на",r.locale),tr.changeLanguage(r.locale)),r.customLocale&&r.locale&&tr.addResourceBundle(r.locale,"translation",r.customLocale,!0,!0)},[r.locale,r.customLocale]);const v=u(null);return e(O,{className:"em-filemanager",children:t(n,{children:[e(I,{getPopupContainer:()=>v.current||document.body,children:e(Wr,{options:{apiEndpoints:d,searchQuery:c,sortBySize:h,onPathChange:o,onChangeSelection:s,onEditorOk:l,config:r,customIcons:f,dragDropIcon:p,dataProviders:g,notification:m},children:e(bE,{})})}),e("div",{ref:v,className:"file-manager-modal-root"})]})})});yE.displayName="FileManagerApp";const wE=t=>{var n,r,i;return e(yr,{i18n:tr,children:e(cn,{externalTheme:null!==(r=null===(n=t.config)||void 0===n?void 0:n.theme)&&void 0!==r?r:"light",customThemeToken:null===(i=t.config)||void 0===i?void 0:i.customTheme,children:e(k,{children:e(yE,Object.assign({},t))})})})},xE=new Map,_E=(t,n)=>{var r;let i;hE();let o={};const a=e=>{const t=!e||"fileManager"!==e.mode&&"imageCenter"!==e.mode&&"plugin"!==e.mode?void 0:e.mode;return"imageCenter"===t?hn("imageCenter",e):hn(t)};if(t instanceof HTMLElement){i=t;o={config:a(n),apiEndpoints:null==n?void 0:n.apiEndpoints}}else{i=t.element;const e=a(t.config),n=Object.assign(Object.assign({},null===(r=t.config)||void 0===r?void 0:r.apiEndpoints),t.apiEndpoints);o={config:e,currentPath:t.currentPath,onPathChange:t.onPathChange,onChangeSelection:t.onChangeSelection,searchQuery:t.searchQuery,sortBySize:t.sortBySize,apiEndpoints:n,dataProviders:t.dataProviders,customIcons:t.customIcons,dragDropIcon:t.dragDropIcon}}const s=A(i);s.render(e(wE,Object.assign({},o))),xE.set(i.id||`container_${Date.now()}`,s)},CE=e=>{const t=e.id||Object.keys(xE).find(e=>e.startsWith("container_"));if(t&&xE.has(t)){const e=xE.get(t);null==e||e.unmount(),xE.delete(t)}else{console.warn("Не удалось найти корень для размонтирования");try{A(e).unmount()}catch(e){console.error("Ошибка при размонтировании компонента:",e)}}},SE=new Map,AE=r=>{const{onClose:o,onSave:a,dataProviders:s,theme:l}=r,c=i.useMemo(()=>{if(r.file)return r.file;const e=r.name||"edited-image",t=r.extension||(r.type?r.type.split("/")[1]:"png"),n=r.type||`image/${t}`;return{thumbnail:r.imageDataUrl||"",name:e,id:void 0,type:n,extension:t}},[r.file,r.imageDataUrl,r.name,r.extension,r.type]),h=i.useCallback(async e=>{if((null==s?void 0:s.updateFile)&&e.id&&e.thumbnail)try{let t=e.type||"image/png";if(e.thumbnail.startsWith("data:")){const n=e.thumbnail.match(/^data:([^;]+)/);n&&n[1].startsWith("image/")&&(t=n[1])}const n=e.thumbnail.split(",")[1],r=atob(n),i=new Array(r.length);for(let e=0;e<r.length;e++)i[e]=r.charCodeAt(e);const o=new Uint8Array(i),a=new Blob([o],{type:t});e=await s.updateFile(e.id,{name:e.name,type:t,data:a,thumbnail:e.thumbnail,extension:e.extension})}catch(e){console.error("Standalone Pixie: updateFile error",e)}return a&&await a(e),e},[a,s]),d=u(null);return e(O,{className:"em-filemanager",children:t(n,{children:[e(I,{getPopupContainer:()=>d.current||document.body,children:e(yr,{i18n:tr,children:e(cn,{externalTheme:null!=l?l:"light",children:e(k,{children:e(Wr,{options:{dataProviders:s,config:{theme:null!=l?l:"light",locale:r.locale}},children:e(eO,{visible:!0,onClose:o,file:c,onSave:h})})})})})}),e("div",{ref:d,className:"file-manager-modal-root"})]})})},kE=t=>{hE();const n=t.element,r=A(n);r.render(e(AE,Object.assign({},t))),SE.set(n.id||`pixie_container_${Date.now()}`,r)},TE=e=>{const t=Array.from(SE.keys()).find(e=>e.startsWith("pixie_container_")),n=e.id||t;if(n&&SE.has(n)){const e=SE.get(n);null==e||e.unmount(),SE.delete(n)}else{console.warn("Не удалось найти корень Pixie для размонтирования");try{A(e).unmount()}catch(e){console.error("Ошибка при размонтировании Pixie:",e)}}},IE=e=>{var t,n;const{mode:r,element:i,fileManager:o,pixieEditor:a,theme:s,dataProviders:l}=e;let c,u;const h={unmount:()=>{c&&CE(c),u&&TE(u)},unmountFileManager:void 0,unmountPixieEditor:void 0};switch(r){case"fileManager":c=i,_E(i,Object.assign(Object.assign({},null==o?void 0:o.config),{theme:s||(null===(t=null==o?void 0:o.config)||void 0===t?void 0:t.theme),apiEndpoints:null==o?void 0:o.apiEndpoints})),h.unmountFileManager=()=>CE(c);break;case"pixieEditor":u=i,kE(Object.assign({element:i,theme:s||(null==a?void 0:a.theme),dataProviders:l||(null==a?void 0:a.dataProviders)},a)),h.unmountPixieEditor=()=>TE(u);break;case"both":{const e=document.createElement("div");e.id="file-manager-container",e.style.cssText="height: 50%; border-bottom: 1px solid #d9d9d9;";const t=document.createElement("div");t.id="pixie-editor-container",t.style.cssText="height: 50%;",i.appendChild(e),i.appendChild(t),c=e,u=t,_E(c,Object.assign(Object.assign({},null==o?void 0:o.config),{theme:s||(null===(n=null==o?void 0:o.config)||void 0===n?void 0:n.theme),apiEndpoints:null==o?void 0:o.apiEndpoints})),kE(Object.assign({element:u,theme:s||(null==a?void 0:a.theme),dataProviders:l||(null==a?void 0:a.dataProviders)},a)),h.unmountFileManager=()=>CE(c),h.unmountPixieEditor=()=>TE(u);break}}return h};var OE={init:_E,unmount:CE,initPixieEditor:kE,unmountPixieEditor:TE,initFileManager:IE};export{si as FileContent,yE as FileManagerApp,wE as FileManagerAppWithContext,li as FileModals,Hi as FolderSidebar,AE as PixieOnlyApp,OE as default,_E as init,IE as initFileManager,kE as initPixieEditor,hE as installResizeObserverErrorHandler,dE as uninstallResizeObserverErrorHandler,CE as unmount,TE as unmountPixieEditor};
96
96
  //# sourceMappingURL=file-manager.esm.js.map