@emailmaker/filemanager 0.10.1 → 0.10.2

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.
@@ -1,4 +1,4 @@
1
- import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import*as r from"react";import i,{useState as o,useEffect as a,createContext as s,useContext as l,useCallback as c,useRef as u,useMemo as h,createElement as d,memo as f,forwardRef as p,useImperativeHandle as g,Children as m,isValidElement as v,Fragment as b,cloneElement as y,useId as w,useDebugValue as x,useLayoutEffect as _,useInsertionEffect as C,Component as S}from"react";import{createRoot as A}from"react-dom/client";import k from"antd/es/alert/ErrorBoundary";import{theme as T,ConfigProvider as I,App as O,Input as E,Form as P,message as M,Image as F,Select as j,Checkbox as R,Segmented as D,Empty as L,Table as N,Pagination as z,Row as B,Col as V,Card as U,Modal as H,Tree as W,Dropdown as Y,Menu as $,Divider as G,Button as X,Typography as K,List as q,Progress as Z,Avatar as J,Space as Q,Layout as ee,Spin as te,Radio as ne,Tooltip as re,Tag as ie,Carousel as oe}from"antd";import ae,{SearchOutlined as se,FolderOutlined as le,BarsOutlined as ce,AppstoreOutlined as ue,DownOutlined as he,RightOutlined as de,LinkOutlined as fe,UploadOutlined as pe,FileOutlined as ge,FolderAddOutlined as me,FolderOpenOutlined as ve,PlusCircleOutlined as be,EditOutlined as ye,MinusOutlined as we,CloseOutlined as xe,FileImageOutlined as _e,ExclamationCircleOutlined as Ce,CheckCircleOutlined as Se,PictureOutlined as Ae,CopyOutlined as ke,DeleteOutlined as Te,LoadingOutlined as Ie,ArrowRightOutlined as Oe,ArrowLeftOutlined as Ee,CheckOutlined as Pe}from"@ant-design/icons";import*as Me from"react-dom";import Fe,{createPortal as je}from"react-dom";import"antd/dist/reset.css";function Re(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function De(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Re(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Re(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Le(e){return Le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Le(e)}function Ne(e){var t=function(e,t){if("object"!=Le(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Le(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Le(t)?t:t+""}function ze(e,t,n){return(t=Ne(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(n),!0).forEach(function(t){ze(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Be(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Ue={},He=[];function We(e,t){if("production"!==process.env.NODE_ENV&&!e&&void 0!==console){var n=He.reduce(function(e,t){return t(null!=e?e:"","warning")},t);n&&console.error("Warning: ".concat(n))}}function Ye(e,t){if("production"!==process.env.NODE_ENV&&!e&&void 0!==console){var n=He.reduce(function(e,t){return t(null!=e?e:"","note")},t);n&&console.warn("Note: ".concat(n))}}function $e(e,t,n){t||Ue[n]||(e(!1,n),Ue[n]=!0)}function Ge(e,t){$e(We,e,t)}function Xe(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=new Set;return function e(t,i){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=r.has(t);if(Ge(!a,"Warning: There may be circular references"),a)return!1;if(t===i)return!0;if(n&&o>1)return!1;r.add(t);var s=o+1;if(Array.isArray(t)){if(!Array.isArray(i)||t.length!==i.length)return!1;for(var l=0;l<t.length;l++)if(!e(t[l],i[l],s))return!1;return!0}if(t&&i&&"object"===Le(t)&&"object"===Le(i)){var c=Object.keys(t);return c.length===Object.keys(i).length&&c.every(function(n){return e(t[n],i[n],s)})}return!1}(e,t)}function Ke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qe(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ne(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}Ge.preMessage=function(e){He.push(e)},Ge.resetWarned=function(){Ue={}},Ge.noteOnce=function(e,t){$e(Ye,e,t)};function Ze(e){return e.join("%")}var Je=function(){function e(t){Ke(this,e),ze(this,"instanceId",void 0),ze(this,"cache",new Map),ze(this,"extracted",new Set),this.instanceId=t}return qe(e,[{key:"get",value:function(e){return this.opGet(Ze(e))}},{key:"opGet",value:function(e){return this.cache.get(e)||null}},{key:"update",value:function(e,t){return this.opUpdate(Ze(e),t)}},{key:"opUpdate",value:function(e,t){var n=t(this.cache.get(e));null===n?this.cache.delete(e):this.cache.set(e,n)}}]),e}(),Qe=["children"],et="data-css-hash",tt="__cssinjs_instance__";function nt(){var e=Math.random().toString(12).slice(2);if("undefined"!=typeof document&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(et,"]"))||[],n=document.head.firstChild;Array.from(t).forEach(function(t){t[tt]=t[tt]||e,t[tt]===e&&document.head.insertBefore(t,n)});var r={};Array.from(document.querySelectorAll("style[".concat(et,"]"))).forEach(function(t){var n,i=t.getAttribute(et);r[i]?t[tt]===e&&(null===(n=t.parentNode)||void 0===n||n.removeChild(t)):r[i]=!0})}return new Je(e)}var rt=r.createContext({hashPriority:"low",cache:nt(),defaultCache:!0}),it=function(e){var t,n,i,o,a=e.children,s=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,Qe),l=r.useContext(rt),c=(t=function(){var e=Ve({},l);Object.keys(s).forEach(function(t){var n=s[t];void 0!==s[t]&&(e[t]=n)});var t=s.cache;return e.cache=e.cache||nt(),e.defaultCache=!t&&l.defaultCache,e},n=[l,s],i=function(e,t){return!Xe(e[0],t[0],!0)||!Xe(e[1],t[1],!0)},"value"in(o=r.useRef({})).current&&!i(o.current.condition,n)||(o.current.value=t(),o.current.condition=n),o.current.value);return r.createElement(rt.Provider,{value:c},a)};var ot=function(){function e(){Ke(this,e),ze(this,"cache",void 0),ze(this,"keys",void 0),ze(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return qe(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i={map:this.cache};return e.forEach(function(e){var t;i?i=null===(t=i)||void 0===t||null===(t=t.map)||void 0===t?void 0:t.get(e):i=void 0}),null!==(t=i)&&void 0!==t&&t.value&&r&&(i.value[1]=this.cacheCallTimes++),null===(n=i)||void 0===n?void 0:n.value}},{key:"get",value:function(e){var t;return null===(t=this.internalGet(e,!0))||void 0===t?void 0:t[0]}},{key:"has",value:function(e){return!!this.internalGet(e)}},{key:"set",value:function(t,n){var r=this;if(!this.has(t)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var i=this.keys.reduce(function(e,t){var n=De(e,2)[1];return r.internalGet(t)[1]<n?[t,r.internalGet(t)[1]]:e},[this.keys[0],this.cacheCallTimes]),o=De(i,1)[0];this.delete(o)}this.keys.push(t)}var a=this.cache;t.forEach(function(e,i){if(i===t.length-1)a.set(e,{value:[n,r.cacheCallTimes++]});else{var o=a.get(e);o?o.map||(o.map=new Map):a.set(e,{map:new Map}),a=a.get(e).map}})}},{key:"deleteByPath",value:function(e,t){var n,r=e.get(t[0]);if(1===t.length)return r.map?e.set(t[0],{map:r.map}):e.delete(t[0]),null===(n=r.value)||void 0===n?void 0:n[0];var i=this.deleteByPath(r.map,t.slice(1));return r.map&&0!==r.map.size||r.value||e.delete(t[0]),i}},{key:"delete",value:function(e){if(this.has(e))return this.keys=this.keys.filter(function(t){return!function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,e)}),this.deleteByPath(this.cache,e)}}]),e}();function at(e,t,n){if(arguments.length>4&&void 0!==arguments[4]&&arguments[4])return e;var r=Ve(Ve({},arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}),{},ze(ze({},"data-token-hash",t),et,n)),i=Object.keys(r).map(function(e){var t=r[e];return t?"".concat(e,'="').concat(t,'"'):null}).filter(function(e){return e}).join(" ");return"<style ".concat(i,">").concat(e,"</style>")}ze(ot,"MAX_CACHE_SIZE",20),ze(ot,"MAX_CACHE_OFFSET",5),new ot,"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&window.document&&window.document.createElement?r.useLayoutEffect:r.useEffect,Ve({},r).useInsertionEffect,Ve({},r).useInsertionEffect;if(process.env.NODE_ENV,"production"!==process.env.NODE_ENV&&"undefined"!=typeof module&&module&&module.hot&&"undefined"!=typeof window){var st="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:null;if(st&&"function"==typeof st.webpackHotUpdate){var lt=st.webpackHotUpdate;st.webpackHotUpdate=function(){return setTimeout(function(){0},0),lt.apply(void 0,arguments)}}}process.env.NODE_ENV;var ct="comm",ut="rule",ht="decl",dt=Math.abs,ft=String.fromCharCode;function pt(e){return e.trim()}function gt(e,t,n){return e.replace(t,n)}function mt(e,t,n){return e.indexOf(t,n)}function vt(e,t){return 0|e.charCodeAt(t)}function bt(e,t,n){return e.slice(t,n)}function yt(e){return e.length}function wt(e,t){return t.push(e),e}var xt=1,_t=1,Ct=0,St=0,At=0,kt="";function Tt(e,t,n,r,i,o,a,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:xt,column:_t,length:a,return:"",siblings:s}}function It(){return At=St>0?vt(kt,--St):0,_t--,10===At&&(_t=1,xt--),At}function Ot(){return At=St<Ct?vt(kt,St++):0,_t++,10===At&&(_t=1,xt++),At}function Et(){return vt(kt,St)}function Pt(){return St}function Mt(e,t){return bt(kt,e,t)}function Ft(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function jt(e){return pt(Mt(St-1,Lt(91===e?e+2:40===e?e+1:e)))}function Rt(e){for(;(At=Et())&&At<33;)Ot();return Ft(e)>2||Ft(At)>3?"":" "}function Dt(e,t){for(;--t&&Ot()&&!(At<48||At>102||At>57&&At<65||At>70&&At<97););return Mt(e,Pt()+(t<6&&32==Et()&&32==Ot()))}function Lt(e){for(;Ot();)switch(At){case e:return St;case 34:case 39:34!==e&&39!==e&&Lt(At);break;case 40:41===e&&Lt(e);break;case 92:Ot()}return St}function Nt(e,t){for(;Ot()&&e+At!==57&&(e+At!==84||47!==Et()););return"/*"+Mt(t,St-1)+"*"+ft(47===e?e:Ot())}function zt(e){for(;!Ft(Et());)Ot();return Mt(e,St)}function Bt(e){return function(e){return kt="",e}(Vt("",null,null,null,[""],e=function(e){return xt=_t=1,Ct=yt(kt=e),St=0,[]}(e),0,[0],e))}function Vt(e,t,n,r,i,o,a,s,l){for(var c=0,u=0,h=a,d=0,f=0,p=0,g=1,m=1,v=1,b=0,y="",w=i,x=o,_=r,C=y;m;)switch(p=b,b=Ot()){case 40:if(108!=p&&58==vt(C,h-1)){-1!=mt(C+=gt(jt(b),"&","&\f"),"&\f",dt(c?s[c-1]:0))&&(v=-1);break}case 34:case 39:case 91:C+=jt(b);break;case 9:case 10:case 13:case 32:C+=Rt(p);break;case 92:C+=Dt(Pt()-1,7);continue;case 47:switch(Et()){case 42:case 47:wt(Ht(Nt(Ot(),Pt()),t,n,l),l),5!=Ft(p||1)&&5!=Ft(Et()||1)||!yt(C)||" "===bt(C,-1,void 0)||(C+=" ");break;default:C+="/"}break;case 123*g:s[c++]=yt(C)*v;case 125*g:case 59:case 0:switch(b){case 0:case 125:m=0;case 59+u:-1==v&&(C=gt(C,/\f/g,"")),f>0&&(yt(C)-h||0===g&&47===p)&&wt(f>32?Wt(C+";",r,n,h-1,l):Wt(gt(C," ","")+";",r,n,h-2,l),l);break;case 59:C+=";";default:if(wt(_=Ut(C,t,n,c,u,i,s,y,w=[],x=[],h,o),o),123===b)if(0===u)Vt(C,t,_,_,w,o,h,s,x);else{switch(d){case 99:if(110===vt(C,3))break;case 108:if(97===vt(C,2))break;default:u=0;case 100:case 109:case 115:}u?Vt(e,_,_,r&&wt(Ut(e,_,_,0,0,i,s,y,i,w=[],h,x),x),i,x,h,s,r?w:x):Vt(C,_,_,_,[""],x,0,s,x)}}c=u=f=0,g=v=1,y=C="",h=a;break;case 58:h=1+yt(C),f=p;default:if(g<1)if(123==b)--g;else if(125==b&&0==g++&&125==It())continue;switch(C+=ft(b),b*g){case 38:v=u>0?1:(C+="\f",-1);break;case 44:s[c++]=(yt(C)-1)*v,v=1;break;case 64:45===Et()&&(C+=jt(Ot())),d=Et(),u=h=yt(y=C+=zt(Pt())),b++;break;case 45:45===p&&2==yt(C)&&(g=0)}}return o}function Ut(e,t,n,r,i,o,a,s,l,c,u,h){for(var d=i-1,f=0===i?o:[""],p=function(e){return e.length}(f),g=0,m=0,v=0;g<r;++g)for(var b=0,y=bt(e,d+1,d=dt(m=a[g])),w=e;b<p;++b)(w=pt(m>0?f[b]+" "+y:gt(y,/&\f/g,f[b])))&&(l[v++]=w);return Tt(e,t,n,0===i?ut:s,l,c,u,h)}function Ht(e,t,n,r){return Tt(e,t,n,ct,ft(At),bt(e,2,-2),0,r)}function Wt(e,t,n,r,i){return Tt(e,t,n,ht,bt(e,0,r),bt(e,r+1,-1),r,i)}function Yt(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function $t(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case ht:return e.return=e.return||e.value;case ct:return"";case"@keyframes":return e.return=e.value+"{"+Yt(e.children,r)+"}";case ut:if(!yt(e.value=e.props.join(",")))return""}return yt(n=Yt(e.children,r))?e.return=e.value+"{"+n+"}":""}function Gt(e){return e.notSplit=!0,e}ze(ze(ze({},"style",function(e,t,n){var r=De(e,6),i=r[0],o=r[1],a=r[2],s=r[3],l=r[4],c=r[5],u=(n||{}).plain;if(l)return null;var h=i,d={"data-rc-order":"prependQueue","data-rc-priority":"".concat(c)};return h=at(i,o,a,d,u),s&&Object.keys(s).forEach(function(e){if(!t[e]){t[e]=!0;var n=function(e){return Yt(Bt(e),$t).replace(/\{%%%\:[^;];}/g,";")}(s[e]),r=at(n,o,"_effect-".concat(e),d,u);e.startsWith("@layer")?h=r+h:h+=r}}),[c,a,h]}),"token",function(e,t,n){var r=De(e,5),i=r[2],o=r[3],a=r[4],s=(n||{}).plain;if(!o)return null;var l=i._tokenKey;return[-999,l,at(o,a,l,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},s)]}),"cssVar",function(e,t,n){var r=De(e,4),i=r[1],o=r[2],a=r[3],s=(n||{}).plain;if(!i)return null;return[-999,o,at(i,a,o,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},s)]}),Gt(["borderTop","borderBottom"]),Gt(["borderTop"]),Gt(["borderBottom"]),Gt(["borderLeft","borderRight"]),Gt(["borderLeft"]),Gt(["borderRight"]);const Xt={defaultMerge:Symbol("deepmerge-ts: default merge"),skip:Symbol("deepmerge-ts: skip")};function Kt(e,t){return t}function qt(e,t){return e.filter(e=>void 0!==e)}var Zt;function Jt(e){return"object"!=typeof e||null===e?0:Array.isArray(e)?2:function(e){if(!tn.includes(Object.prototype.toString.call(e)))return!1;const{constructor:t}=e;if(void 0===t)return!0;const n=t.prototype;if(null===n||"object"!=typeof n||!tn.includes(Object.prototype.toString.call(n)))return!1;if(!n.hasOwnProperty("isPrototypeOf"))return!1;return!0}(e)?1:e instanceof Set?3:e instanceof Map?4:5}function Qt(e,t){return"object"==typeof e&&Object.prototype.propertyIsEnumerable.call(e,t)}function en(e){let t=0,n=e[0]?.[Symbol.iterator]();return{[Symbol.iterator]:()=>({next(){for(;;){if(void 0===n)return{done:!0,value:void 0};const r=n.next();if(!0!==r.done)return{done:!1,value:r.value};t+=1,n=e[t]?.[Symbol.iterator]()}}})}}!function(e){e[e.NOT=0]="NOT",e[e.RECORD=1]="RECORD",e[e.ARRAY=2]="ARRAY",e[e.SET=3]="SET",e[e.MAP=4]="MAP",e[e.OTHER=5]="OTHER"}(Zt||(Zt={}));const tn=["[object Object]","[object Module]"];const nn={mergeRecords:function(e,t,n){const r={};for(const i of function(e){const t=new Set;for(const n of e)for(const e of[...Object.keys(n),...Object.getOwnPropertySymbols(n)])t.add(e);return t}(e)){const o=[];for(const t of e)Qt(t,i)&&o.push(t[i]);if(0===o.length)continue;const a=t.metaDataUpdater(n,{key:i,parents:e}),s=on(o,t,a);s!==Xt.skip&&("__proto__"===i?Object.defineProperty(r,i,{value:s,configurable:!0,enumerable:!0,writable:!0}):r[i]=s)}return r},mergeArrays:function(e){return e.flat()},mergeSets:function(e){return new Set(en(e))},mergeMaps:function(e){return new Map(en(e))},mergeOthers:function(e){return e.at(-1)}};function rn(...e){return function(e,t){const n=function(e,t){return{defaultMergeFunctions:nn,mergeFunctions:{...nn,...Object.fromEntries(Object.entries(e).filter(([e,t])=>Object.hasOwn(nn,e)).map(([e,t])=>!1===t?[e,nn.mergeOthers]:[e,t]))},metaDataUpdater:e.metaDataUpdater??Kt,deepmerge:t,useImplicitDefaultMerging:e.enableImplicitDefaultMerging??!1,filterValues:!1===e.filterValues?void 0:e.filterValues??qt,actions:Xt}}(e,r);function r(...e){return on(e,n,t)}return r}({})(...e)}function on(e,t,n){const r=t.filterValues?.(e,n)??e;if(0===r.length)return;if(1===r.length)return an(r,t,n);const i=Jt(r[0]);if(0!==i&&5!==i)for(let e=1;e<r.length;e++)if(Jt(r[e])!==i)return an(r,t,n);switch(i){case 1:return function(e,t,n){const r=t.mergeFunctions.mergeRecords(e,t,n);if(r===Xt.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeRecords!==t.defaultMergeFunctions.mergeRecords)return t.defaultMergeFunctions.mergeRecords(e,t,n);return r}(r,t,n);case 2:return function(e,t,n){const r=t.mergeFunctions.mergeArrays(e,t,n);if(r===Xt.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeArrays!==t.defaultMergeFunctions.mergeArrays)return t.defaultMergeFunctions.mergeArrays(e);return r}(r,t,n);case 3:return function(e,t,n){const r=t.mergeFunctions.mergeSets(e,t,n);if(r===Xt.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeSets!==t.defaultMergeFunctions.mergeSets)return t.defaultMergeFunctions.mergeSets(e);return r}(r,t,n);case 4:return function(e,t,n){const r=t.mergeFunctions.mergeMaps(e,t,n);if(r===Xt.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeMaps!==t.defaultMergeFunctions.mergeMaps)return t.defaultMergeFunctions.mergeMaps(e);return r}(r,t,n);default:return an(r,t,n)}}function an(e,t,n){const r=t.mergeFunctions.mergeOthers(e,t,n);return r===Xt.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeOthers!==t.defaultMergeFunctions.mergeOthers?t.defaultMergeFunctions.mergeOthers(e):r}const sn={hashed:!1,algorithm:T.defaultAlgorithm,token:{colorLink:"#1677ff",colorInfo:"#722ed1",colorTextBase:"#000000",colorBgLayout:"#f0f2f5",borderRadiusXL:16,borderRadiusLG:12,borderRadius:8,borderRadiusSM:6,colorDarken1:"rgba(0, 0, 0, 0.08)",colorFillSecondaryDarken:"rgba(0, 0, 0, 0.1)",formControlHeight:34,borderWidth:1,borderColorHover:"#C5C5C5",formItemMarginBottomMD:20,formItemMarginBottomXS:8,colorSecondaryH:265.03,colorSecondaryS:"63.92%",colorSecondaryL:"50%",colorSecondaryBgH:273,colorSecondaryBgS:"100%",colorSecondaryBgL:"93%",appZoom:1},components:{Progress:{colorFillSecondary:"#ffffff"},Tabs:{titleFontSize:16,titleFontSizeSM:16,fontSize:16,fontSizeLG:16}}},ln={hashed:!1,algorithm:T.darkAlgorithm,token:{colorBgBase:"#1F1F1F",colorInfo:"#9254de",colorLink:"#1890ff",colorLinkHover:"#69c0ff",wireframe:!1,borderRadiusXL:16,borderRadiusLG:12,borderRadius:8,borderRadiusSM:6,borderWidth:1,colorDarken1:"rgba(0, 0, 0, 0.9)",colorFillSecondaryDarken:"rgba(255, 255, 255, 0.16)",formControlHeight:34,borderColorHover:"rgba(255, 255, 255, 0.3)",formItemMarginBottomMD:20,formItemMarginBottomXS:8,appZoom:1},components:{Tabs:{titleFontSize:16,titleFontSizeSM:16,fontSize:16,fontSizeLG:16}}},cn=({externalTheme:t,children:n,customThemeToken:r})=>{const[i]=o(t||"light"),[s,l]=o("light"===i?sn:ln);return a(()=>{const e="light"===i?sn:ln,t=r?rn(e.token,r):e.token;l(Object.assign(Object.assign({},e),{token:t}))},[l,i,r]),e("div",{id:"file-manager-element-id",style:{height:"100%"},children:e(I,{theme:s,children:e(it,{transformers:[],children:e(O,{style:{height:"100%"},children:n})})})})},un={fileManager:{locale:"en_US",mode:"fileManager",theme:"light",enabledTabs:["editor"]},imageCenter:{locale:"en_US",mode:"imageCenter",theme:"light",enabledTabs:["stock","gif","editor"]},plugin:{locale:"en_US",mode:"plugin",theme:"light",enabledTabs:["editor","stock","gif","ai"]}},hn=(e="fileManager",t)=>"imageCenter"===e&&t?t:Object.assign({},un[e]),dn=e=>"string"==typeof e,fn=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},pn=e=>null==e?"":""+e,gn=/###/g,mn=e=>e&&e.indexOf("###")>-1?e.replace(gn,"."):e,vn=e=>!e||dn(e),bn=(e,t,n)=>{const r=dn(t)?t.split("."):t;let i=0;for(;i<r.length-1;){if(vn(e))return{};const t=mn(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return vn(e)?{}:{obj:e,k:mn(r[i])}},yn=(e,t,n)=>{const{obj:r,k:i}=bn(e,t,Object);if(void 0!==r||1===t.length)return void(r[i]=n);let o=t[t.length-1],a=t.slice(0,t.length-1),s=bn(e,a,Object);for(;void 0===s.obj&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),s=bn(e,a,Object),s?.obj&&void 0!==s.obj[`${s.k}.${o}`]&&(s.obj=void 0);s.obj[`${s.k}.${o}`]=n},wn=(e,t)=>{const{obj:n,k:r}=bn(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},xn=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?dn(e[r])||e[r]instanceof String||dn(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):xn(e[r],t[r],n):e[r]=t[r]);return e},_n=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Cn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Sn=e=>dn(e)?e.replace(/[&<>"'\/]/g,e=>Cn[e]):e;const An=[" ",",","?","!",";"],kn=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),Tn=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const r=t.split(n);let i=e;for(let e=0;e<r.length;){if(!i||"object"!=typeof i)return;let t,o="";for(let a=e;a<r.length;++a)if(a!==e&&(o+=n),o+=r[a],t=i[o],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<r.length-1)continue;e+=a-e+1;break}i=t}return i},In=e=>e?.replace("_","-"),On={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class En{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||On,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(dn(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new En(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new En(this.logger,e)}}var Pn=new En;class Mn{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e,...t){if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n.apply(n,[e,...t])})}}}class Fn extends Mn{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){const i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):dn(n)&&i?a.push(...n.split(i)):a.push(n)));const s=wn(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&o&&dn(n)?Tn(this.data?.[e]?.[t],n,i):s}addResource(e,t,n,r,i={silent:!1}){const o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),yn(this.data,a,r),i.silent||this.emit("added",e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(const r in n)(dn(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,i,o={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=wn(this.data,a)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?xn(s,n,i):s={...s,...n},yn(this.data,a,s),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var jn={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}};const Rn=Symbol("i18next/PATH_KEY");function Dn(e,t){const{[Rn]:n}=e(function(){const e=[],t=Object.create(null);let n;return t.get=(r,i)=>(n?.revoke?.(),i===Rn?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}());return n.join(t?.keySeparator??".")}const Ln={},Nn=e=>!dn(e)&&"boolean"!=typeof e&&"number"!=typeof e;class zn extends Mn{constructor(e,t={}){var n,r;super(),n=e,r=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach(e=>{n[e]&&(r[e]=n[e])}),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=Pn.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(null==e)return!1;const r=this.resolve(e,n);return void 0!==r?.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let i=t.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=An.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;const i=kn.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`);let o=!i.test(e);if(!o){const t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(o=!0)}return o})(e,n,r));if(o&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:dn(i)?[i]:i};const o=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),e=o.join(r)}return{key:e,namespaces:dn(i)?[i]:i}}translate(e,t,n){let r="object"==typeof t?{...t}:t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof r&&(r={...r}),r||(r={}),null==e)return"";"function"==typeof e&&(e=Dn(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]);const i=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],r),l=s[s.length-1];let c=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");const u=r.lng||this.language,h=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===u?.toLowerCase())return h?i?{res:`${l}${c}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${c}${a}`:i?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:a;const d=this.resolve(e,r);let f=d?.res;const p=d?.usedKey||a,g=d?.exactUsedKey||a,m=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==r.count&&!dn(r.count),y=zn.hasDefaultValue(r),w=b?this.pluralResolver.getSuffix(u,r.count,r):"",x=r.ordinal&&b?this.pluralResolver.getSuffix(u,r.count,{ordinal:!1}):"",_=b&&!r.ordinal&&0===r.count,C=_&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${w}`]||r[`defaultValue${x}`]||r.defaultValue;let S=f;v&&!f&&y&&(S=C);const A=Nn(S),k=Object.prototype.toString.apply(S);if(!(v&&S&&A&&["[object Number]","[object Function]","[object RegExp]"].indexOf(k)<0)||dn(m)&&Array.isArray(S))if(v&&dn(m)&&Array.isArray(f))f=f.join(m),f&&(f=this.extendTranslation(f,e,r,n));else{let t=!1,i=!1;!this.isValidLookup(f)&&y&&(t=!0,f=C),this.isValidLookup(f)||(i=!0,f=a);const s=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&i?void 0:f,h=y&&C!==f&&this.options.updateMissing;if(i||t||h){if(this.logger.log(h?"updateKey":"missingKey",u,l,a,h?C:f),o){const e=this.resolve(a,{...r,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(r.lng||this.language):e.push(r.lng||this.language);const n=(e,t,n)=>{const i=y&&n!==f?n:s;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,i,h,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,i,h,r),this.emit("missingKey",e,l,t,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,r);_&&r[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],a+t,r[`defaultValue${t}`]||C)})}):n(e,a,C))}f=this.extendTranslation(f,e,r,d,n),i&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}${c}${a}`),(i||t)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${c}${a}`:a,t?f:void 0,r))}else{if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,S,{...r,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(d.res=e,d.usedParams=this.getUsedParamsDetails(r),d):e}if(o){const e=Array.isArray(S),t=e?[]:{},n=e?g:p;for(const e in S)if(Object.prototype.hasOwnProperty.call(S,e)){const i=`${n}${o}${e}`;t[e]=y&&!f?this.translate(i,{...r,defaultValue:Nn(C)?C[e]:void 0,joinArrays:!1,ns:s}):this.translate(i,{...r,joinArrays:!1,ns:s}),t[e]===i&&(t[e]=S[e])}f=t}}return i?(d.res=f,d.usedParams=this.getUsedParamsDetails(r),d):f}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const o=dn(e)&&(void 0!==n?.interpolation?.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(o){const t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let s=n.replace&&!dn(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),o){const t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>i?.[0]!==e[0]||n.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),n)),n.interpolation&&this.interpolator.reset()}const o=n.postProcess||this.options.postProcess,a=dn(o)?[o]:o;return null!=e&&a?.length&&!1!==n.applyPostProcessor&&(e=jn.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,o,a;return dn(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(n))return;const s=this.extractFromKey(e,t),l=s.key;r=l;let c=s.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const u=void 0!==t.count&&!dn(t.count),h=u&&!t.ordinal&&0===t.count,d=void 0!==t.context&&(dn(t.context)||"number"==typeof t.context)&&""!==t.context,f=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);c.forEach(e=>{this.isValidLookup(n)||(a=e,Ln[`${f[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(a)||(Ln[`${f[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${f.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach(r=>{if(this.isValidLookup(n))return;o=r;const a=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(a,l,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));const n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&0===e.indexOf(i)&&a.push(l+e.replace(i,this.options.pluralSeparator)),a.push(l+e),h&&a.push(l+n)),d){const r=`${l}${this.options.contextSeparator||"_"}${t.context}`;a.push(r),u&&(t.ordinal&&0===e.indexOf(i)&&a.push(r+e.replace(i,this.options.pluralSeparator)),a.push(r+e),h&&a.push(r+n))}}let s;for(;s=a.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:o,usedNS:a}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!dn(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}class Bn{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Pn.create("languageUtils")}getScriptPartFromCode(e){if(!(e=In(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=In(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(dn(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;const r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:e.indexOf("-")>0&&r.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),dn(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return dn(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):dn(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}}const Vn={zero:0,one:1,two:2,few:3,many:4,other:5},Un={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Hn{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Pn.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=In("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(n,{type:r})}catch(n){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Un;if(!e.match(/-|_/))return Un;const r=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(r,t)}return this.pluralRulesCache[i]=o,o}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>Vn[e]-Vn[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){const r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const Wn=(e,t,n,r=".",i=!0)=>{let o=((e,t,n)=>{const r=wn(e,n);return void 0!==r?r:wn(t,n)})(e,t,n);return!o&&i&&dn(n)&&(o=Tn(e,n,r),void 0===o&&(o=Tn(t,n,r))),o},Yn=e=>e.replace(/\$/g,"$$$$");class $n{constructor(e={}){this.logger=Pn.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:s,formatSeparator:l,unescapeSuffix:c,unescapePrefix:u,nestingPrefix:h,nestingPrefixEscaped:d,nestingSuffix:f,nestingSuffixEscaped:p,nestingOptionsSeparator:g,maxReplaces:m,alwaysFormat:v}=e.interpolation;this.escape=void 0!==t?t:Sn,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=i?_n(i):o||"{{",this.suffix=a?_n(a):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=h?_n(h):d||_n("$t("),this.nestingSuffix=f?_n(f):p||_n(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==v&&v,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,o,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const i=Wn(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}const i=e.split(this.formatSeparator),o=i.shift().trim(),a=i.join(this.formatSeparator).trim();return this.format(Wn(t,s,o,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:o})};this.resetRegExp();const c=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=void 0!==r?.interpolation?.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Yn(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Yn(this.escape(e)):Yn(e)}].forEach(t=>{for(a=0;i=t.regex.exec(e);){const n=i[1].trim();if(o=l(n),void 0===o)if("function"==typeof c){const t=c(e,i,r);o=dn(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))o="";else{if(u){o=i[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),o=""}else dn(o)||this.useRawValueToEscape||(o=pn(o));const s=t.safeValue(o);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,o;const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;e=r[0],i=this.interpolate(i,o);const a=i.match(/'/g),s=i.match(/"/g);((a?.length??0)%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];o={...n},o=o.replace&&!dn(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const l=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==l&&(s=r[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,l)),i=t(a.call(this,r[1].trim(),o),o),i&&r[0]===e&&!dn(i))return i;dn(i)||(i=pn(i)),i||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),i=""),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}}const Gn=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const a=r+JSON.stringify(o);let s=t[a];return s||(s=e(In(r),i),t[a]=s),s(n)}},Xn=e=>(t,n,r)=>e(In(n),r)(t);class Kn{constructor(e={}){this.logger=Pn.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?Gn:Xn;this.formats={number:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:n((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Gn(t)}format(e,t,n,r={}){const i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(e=>e.indexOf(")")>-1)){const e=i.findIndex(e=>e.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}const o=i.reduce((e,t)=>{const{formatName:i,formatOptions:o}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);"currency"===t&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):"relativetime"===t&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(e=>{if(e){const[t,...r]=e.split(":"),i=r.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();n[o]||(n[o]=i),"false"===i&&(n[o]=!1),"true"===i&&(n[o]=!0),isNaN(i)||(n[o]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[i]){let t=e;try{const a=r?.formatParams?.[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...o,...r,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e);return o}}class qn extends Mn{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Pn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){const i={},o={},a={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===o[a]&&(o[a]=!0):(this.state[a]=1,r=!1,void 0===o[a]&&(o[a]=!0),void 0===i[a]&&(i[a]=!0),void 0===s[t]&&(s[t]=!0)))}),r||(a[e]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),!t&&n&&this.store.addResourceBundle(i,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:r,k:i}=bn(e,t,Object);r[i]=r[i]||[],r[i].push(n)})(n.loaded,[i],o),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:o});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*i,o)},i):o(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then(e=>a(null,e)).catch(a):a(null,n)}catch(e){a(e)}}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();dn(e)&&(e=this.languageUtils.toResolveHierarchy(e)),dn(t)&&(t=[t]);const i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),r=n[0],i=n[1];this.read(r,i,"read",void 0,void 0,(n,o)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,o),this.loaded(e,n,o)})}saveMissing(e,t,n,r,i,o={},a=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(this.backend?.create){const s={...o,isUpdate:i},l=this.backend.create.bind(this.backend);if(l.length<6)try{let i;i=5===l.length?l(e,t,n,r,s):l(e,t,n,r),i&&"function"==typeof i.then?i.then(e=>a(null,e)).catch(a):a(null,i)}catch(e){a(e)}else l(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}else this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const Zn=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),dn(e[1])&&(t.defaultValue=e[1]),dn(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Jn=e=>(dn(e.ns)&&(e.ns=[e.ns]),dn(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),dn(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),Qn=()=>{};class er extends Mn{constructor(e={},t){var n;if(super(),this.options=Jn(e),this.services={},this.logger=Pn,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(dn(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=Zn();this.options={...n,...this.options,...Jn(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator);const r=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?Pn.init(r(this.modules.logger),this.options):Pn.init(null,this.options),e=this.modules.formatter?this.modules.formatter:Kn;const t=new Bn(this.options);this.store=new Fn(this.options.resources,this.options);const i=this.services;i.logger=Pn,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new Hn(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix});this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!e||this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format||(i.formatter=r(e),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new $n(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new qn(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new zn(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=Qn),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});const i=fn(),o=()=>{const e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?o():setTimeout(o,0),i}loadResources(e,t=Qn){let n=t;const r=dn(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===r?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return n();const e=[],t=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};if(r)t(r);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e))}this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){const r=fn();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=Qn),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&jn.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=fn();this.emit("languageChanging",e);const r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,o)=>{o?this.isLanguageChangingTo===e&&(r(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},o=t=>{e||t||!this.services.languageDetector||(t=[]);const n=dn(t)?t:t&&t[0],o=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(dn(t)?[t]:t);o&&(this.language||r(o),this.translator.language||this.translator.changeLanguage(o),this.services.languageDetector?.cacheUserLanguage?.(o)),this.loadResources(o,e=>{i(e,o)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),n}getFixedT(e,t,n){const r=(e,t,...i)=>{let o;o="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(i)):{...t},o.lng=o.lng||r.lng,o.lngs=o.lngs||r.lngs,o.ns=o.ns||r.ns,""!==o.keyPrefix&&(o.keyPrefix=o.keyPrefix||n||r.keyPrefix);const a=this.options.keySeparator||".";let s;return o.keyPrefix&&Array.isArray(e)?s=e.map(e=>("function"==typeof e&&(e=Dn(e,{...this.options,...t})),`${o.keyPrefix}${a}${e}`)):("function"==typeof e&&(e=Dn(e,{...this.options,...t})),s=o.keyPrefix?`${o.keyPrefix}${a}${e}`:e),this.t(s,o)};return dn(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const o=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,o);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!o(n,e)||r&&!o(i,e)))}loadNamespaces(e,t){const n=fn();return this.options.ns?(dn(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=fn();dn(e)&&(e=[e]);const r=this.options.preload||[],i=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}const t=this.services?.languageUtils||new Bn(Zn());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new er(e,t)}cloneInstance(e={},t=Qn){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},i=new er(r);void 0===e.debug&&void 0===e.prefix||(i.logger=i.logger.clone(e));if(["store","services","language"].forEach(e=>{i[e]=this[e]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{});i.store=new Fn(e,r),i.services.resourceStore=i.store}return i.translator=new zn(i.services,r),i.translator.on("*",(e,...t)=>{i.emit(e,...t)}),i.init(r,t),i.translator.options=r,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const tr=er.createInstance();tr.createInstance=er.createInstance,tr.createInstance,tr.dir,tr.init,tr.loadResources,tr.reloadResources,tr.use,tr.changeLanguage,tr.getFixedT,tr.t,tr.exists,tr.setDefaultNamespace,tr.hasLoadedNamespace,tr.loadNamespaces,tr.loadLanguages;var nr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};const rr={},ir=(e,t,n,r)=>{lr(n)&&rr[n]||(lr(n)&&(rr[n]=new Date),((e,t,n,r)=>{const i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);lr(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)})(e,t,n,r))},or=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},ar=(e,t,n)=>{e.loadNamespaces(t,or(e,n))},sr=(e,t,n,r)=>{if(lr(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return ar(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,or(e,r))},lr=e=>"string"==typeof e,cr=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ur={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},hr=e=>ur[e];let dr={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(cr,hr)};let fr;const pr={type:"3rdParty",init(e){((e={})=>{dr={...dr,...e}})(e.options.react),(e=>{fr=e})(e)}},gr=s();class mr{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const vr=(e,t,n,r)=>e.getFixedT(t,n,r),br=(e,t={})=>{const{i18n:n}=t,{i18n:r,defaultNS:i}=l(gr)||{},s=n||r||fr;if(s&&!s.reportNamespaces&&(s.reportNamespaces=new mr),!s){ir(s,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const e=(e,t)=>{return lr(t)?t:"object"==typeof(n=t)&&null!==n&&lr(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e;var n},t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}s.options.react?.wait&&ir(s,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const h={...dr,...s.options.react,...t},{useSuspense:d,keyPrefix:f}=h;let p=i||s.options?.defaultNS;p=lr(p)?[p]:p||["translation"],s.reportNamespaces.addUsedNamespaces?.(p);const g=(s.isInitialized||s.initializedStoreOnce)&&p.every(e=>((e,t,n={})=>t.languages&&t.languages.length?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):(ir(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0))(e,s,h)),m=((e,t,n,r)=>c(vr(e,t,n,r),[e,t,n,r]))(s,t.lng||null,"fallback"===h.nsMode?p:p[0],f),v=()=>m,b=()=>vr(s,t.lng||null,"fallback"===h.nsMode?p:p[0],f),[y,w]=o(v);let x=p.join();t.lng&&(x=`${t.lng}${x}`);const _=((e,t)=>{const n=u();return a(()=>{n.current=e},[e,t]),n.current})(x),C=u(!0);a(()=>{const{bindI18n:e,bindI18nStore:n}=h;C.current=!0,g||d||(t.lng?sr(s,t.lng,p,()=>{C.current&&w(b)}):ar(s,p,()=>{C.current&&w(b)})),g&&_&&_!==x&&C.current&&w(b);const r=()=>{C.current&&w(b)};return e&&s?.on(e,r),n&&s?.store.on(n,r),()=>{C.current=!1,s&&e&&e?.split(" ").forEach(e=>s.off(e,r)),n&&s&&n.split(" ").forEach(e=>s.store.off(e,r))}},[s,x]),a(()=>{C.current&&g&&w(v)},[s,f,g]);const S=[y,s,g];if(S.t=y,S.i18n=s,S.ready=g,g)return S;if(!g&&!d)return S;throw new Promise(e=>{t.lng?sr(s,t.lng,p,()=>e()):ar(s,p,()=>e())})};function yr({i18n:e,defaultNS:t,children:n}){const r=h(()=>({i18n:e,defaultNS:t}),[e,t]);return d(gr.Provider,{value:r},n)}var wr,xr,_r,Cr,Sr,Ar={};function kr(){if(xr)return wr;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,n(i.key),i)}}function n(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function r(e,t){return function(e,t){if(t.get)return t.get.call(e);return t.value}(e,o(e,t,"get"))}function i(e,t,n){return function(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}(e,o(e,t,"set"),n),n}function o(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function a(e,t,n){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,n)}xr=1;var s=function(t){if(!t)return[];Array.isArray(t)||(t=[t]);for(var n={},r=0;r<t.length;++r){var i,o=t[r];if(o&&"object"===e(o)&&(o=String(o)),"string"!=typeof o){var a="Locales should be strings, ".concat(JSON.stringify(o)," isn't.");throw new TypeError(a)}var s=o.split("-");if(!s.every(function(e){return/[a-z0-9]+/i.test(e)})){var l=JSON.stringify(o),c="The locale ".concat(l," is not a structurally valid BCP 47 language tag.");throw new RangeError(c)}var u=s[0].toLowerCase();s[0]=null!==(i={in:"id",iw:"he",ji:"yi"}[u])&&void 0!==i?i:u,n[s.join("-")]=!0}return Object.keys(n)};function l(t){switch(e(t)){case"number":return t;case"bigint":throw new TypeError("Cannot convert a BigInt value to a number");default:return Number(t)}}return wr=function(e,n,o,c){var u=function(e){do{if(n(e))return e;e=e.replace(/-?[^-]*$/,"")}while(e);return null},h=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,g=new WeakMap,m=function(){function m(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),a(this,h,{writable:!0,value:void 0}),a(this,d,{writable:!0,value:void 0}),a(this,f,{writable:!0,value:void 0}),a(this,p,{writable:!0,value:void 0}),a(this,g,{writable:!0,value:void 0}),i(this,h,function(t){for(var n=s(t),r=0;r<n.length;++r){var i=u(n[r]);if(i)return i}var o=(new e).resolvedOptions().locale;return u(o)}(t)),i(this,f,n(r(this,h))),i(this,d,c(r(this,h))),i(this,p,function(e){var t=Object.prototype.hasOwnProperty.call(e,"type")&&e.type;if(!t)return"cardinal";if("cardinal"===t||"ordinal"===t)return t;throw new RangeError("Not a valid plural type: "+JSON.stringify(t))}(o)),i(this,g,new e("en",o))}var v,b,y;return v=m,y=[{key:"supportedLocalesOf",value:function(e){return s(e).filter(u)}}],(b=[{key:"resolvedOptions",value:function(){var e=r(this,g).resolvedOptions(),t=e.minimumIntegerDigits,n=e.minimumFractionDigits,i=e.maximumFractionDigits,a=e.minimumSignificantDigits,s=e.maximumSignificantDigits,l=e.roundingPriority,c={locale:r(this,h),type:r(this,p),minimumIntegerDigits:t,minimumFractionDigits:n,maximumFractionDigits:i};return"number"==typeof a&&(c.minimumSignificantDigits=a,c.maximumSignificantDigits=s),c.pluralCategories=o(r(this,h),"ordinal"===r(this,p)).slice(0),c.roundingPriority=l||"auto",c}},{key:"select",value:function(e){if(!(this instanceof m))throw new TypeError("select() called on incompatible ".concat(this));if("number"!=typeof e&&(e=Number(e)),!isFinite(e))return"other";var t=r(this,g).format(Math.abs(e));return r(this,f).call(this,t,"ordinal"===r(this,p))}},{key:"selectRange",value:function(e,t){if(!(this instanceof m))throw new TypeError("selectRange() called on incompatible ".concat(this));if(void 0===e)throw new TypeError("start is undefined");if(void 0===t)throw new TypeError("end is undefined");var n=l(e),i=l(t);if(!isFinite(n))throw new RangeError("start must be finite");if(!isFinite(i))throw new RangeError("end must be finite");return r(this,d).call(this,this.select(n),this.select(i))}}])&&t(v.prototype,b),y&&t(v,y),Object.defineProperty(v,"prototype",{writable:!1}),m}();return"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(m.prototype,Symbol.toStringTag,{value:"Intl.PluralRules",writable:!1,configurable:!0}),Object.defineProperty(m,"prototype",{writable:!1}),m},wr}!function(){if(Sr)return Ar;Sr=1;var e=function(){if(Cr)return _r;function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function t(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}Cr=1;var n=e(kr());function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==nr||"undefined"!=typeof self&&self;var i={exports:{}};!function(e){var t=function(e,t){return t?"other":1==e?"one":"other"},n=function(e,t){return t?"other":0==e||1==e?"one":"other"},r=function(e,t){return t?"other":e>=0&&e<=1?"one":"other"},i=function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},o=function(e,t){return"other"},a=function(e,t){return t?"other":1==e?"one":2==e?"two":"other"};!function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),e.exports=n}(0,{af:t,ak:n,am:r,an:t,ar:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":0==e?"zero":1==e?"one":2==e?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},ars:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":0==e?"zero":1==e?"one":2==e?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},as:function(e,t){return t?1==e||5==e||7==e||8==e||9==e||10==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},asa:t,ast:i,az:function(e,t){var n=String(e).split(".")[0],r=n.slice(-1),i=n.slice(-2),o=n.slice(-3);return t?1==r||2==r||5==r||7==r||8==r||20==i||50==i||70==i||80==i?"one":3==r||4==r||100==o||200==o||300==o||400==o||500==o||600==o||700==o||800==o||900==o?"few":0==n||6==r||40==i||60==i||90==i?"many":"other":1==e?"one":"other"},bal:function(e,t){return 1==e?"one":"other"},be:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1),o=r&&n[0].slice(-2);return t?2!=i&&3!=i||12==o||13==o?"other":"few":1==i&&11!=o?"one":i>=2&&i<=4&&(o<12||o>14)?"few":r&&0==i||i>=5&&i<=9||o>=11&&o<=14?"many":"other"},bem:t,bez:t,bg:t,bho:n,bm:o,bn:function(e,t){return t?1==e||5==e||7==e||8==e||9==e||10==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},bo:o,br:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1),o=r&&n[0].slice(-2),a=r&&n[0].slice(-6);return t?"other":1==i&&11!=o&&71!=o&&91!=o?"one":2==i&&12!=o&&72!=o&&92!=o?"two":(3==i||4==i||9==i)&&(o<10||o>19)&&(o<70||o>79)&&(o<90||o>99)?"few":0!=e&&r&&0==a?"many":"other"},brx:t,bs:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==l&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},ca:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?1==e||3==e?"one":2==e?"two":4==e?"few":"other":1==e&&i?"one":0!=r&&0==o&&i?"many":"other"},ce:t,ceb:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=i.slice(-1);return t?"other":o&&(1==r||2==r||3==r)||o&&4!=a&&6!=a&&9!=a||!o&&4!=s&&6!=s&&9!=s?"one":"other"},cgg:t,chr:t,ckb:t,cs:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1];return t?"other":1==e&&i?"one":r>=2&&r<=4&&i?"few":i?"other":"many"},cy:function(e,t){return t?0==e||7==e||8==e||9==e?"zero":1==e?"one":2==e?"two":3==e||4==e?"few":5==e||6==e?"many":"other":0==e?"zero":1==e?"one":2==e?"two":3==e?"few":6==e?"many":"other"},da:function(e,t){var n=String(e).split("."),r=n[0],i=Number(n[0])==e;return t||1!=e&&(i||0!=r&&1!=r)?"other":"one"},de:i,doi:r,dsb:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-2),s=i.slice(-2);return t?"other":o&&1==a||1==s?"one":o&&2==a||2==s?"two":o&&(3==a||4==a)||3==s||4==s?"few":"other"},dv:t,dz:o,ee:t,el:t,en:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2);return t?1==o&&11!=a?"one":2==o&&12!=a?"two":3==o&&13!=a?"few":"other":1==e&&r?"one":"other"},eo:t,es:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?"other":1==e?"one":0!=r&&0==o&&i?"many":"other"},et:i,eu:t,fa:r,ff:function(e,t){return t?"other":e>=0&&e<2?"one":"other"},fi:i,fil:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=i.slice(-1);return t?1==e?"one":"other":o&&(1==r||2==r||3==r)||o&&4!=a&&6!=a&&9!=a||!o&&4!=s&&6!=s&&9!=s?"one":"other"},fo:t,fr:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?1==e?"one":"other":e>=0&&e<2?"one":0!=r&&0==o&&i?"many":"other"},fur:t,fy:i,ga:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?1==e?"one":"other":1==e?"one":2==e?"two":r&&e>=3&&e<=6?"few":r&&e>=7&&e<=10?"many":"other"},gd:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?1==e||11==e?"one":2==e||12==e?"two":3==e||13==e?"few":"other":1==e||11==e?"one":2==e||12==e?"two":r&&e>=3&&e<=10||r&&e>=13&&e<=19?"few":"other"},gl:i,gsw:t,gu:function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},guw:n,gv:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-1),a=r.slice(-2);return t?"other":i&&1==o?"one":i&&2==o?"two":!i||0!=a&&20!=a&&40!=a&&60!=a&&80!=a?i?"other":"many":"few"},ha:t,haw:t,he:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1];return t?"other":1==r&&i||0==r&&!i?"one":2==r&&i?"two":"other"},hi:function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},hnj:o,hr:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==l&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},hsb:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-2),s=i.slice(-2);return t?"other":o&&1==a||1==s?"one":o&&2==a||2==s?"two":o&&(3==a||4==a)||3==s||4==s?"few":"other"},hu:function(e,t){return t?1==e||5==e?"one":"other":1==e?"one":"other"},hy:function(e,t){return t?1==e?"one":"other":e>=0&&e<2?"one":"other"},ia:i,id:o,ig:o,ii:o,io:i,is:function(e,t){var n=String(e).split("."),r=n[0],i=(n[1]||"").replace(/0+$/,""),o=Number(n[0])==e,a=r.slice(-1),s=r.slice(-2);return t?"other":o&&1==a&&11!=s||i%10==1&&i%100!=11?"one":"other"},it:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&i?"one":0!=r&&0==o&&i?"many":"other"},iu:a,ja:o,jbo:o,jgo:t,jmc:t,jv:o,jw:o,ka:function(e,t){var n=String(e).split(".")[0],r=n.slice(-2);return t?1==n?"one":0==n||r>=2&&r<=20||40==r||60==r||80==r?"many":"other":1==e?"one":"other"},kab:function(e,t){return t?"other":e>=0&&e<2?"one":"other"},kaj:t,kcg:t,kde:o,kea:o,kk:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1);return t?6==i||9==i||r&&0==i&&0!=e?"many":"other":1==e?"one":"other"},kkj:t,kl:t,km:o,kn:r,ko:o,ks:t,ksb:t,ksh:function(e,t){return t?"other":0==e?"zero":1==e?"one":"other"},ku:t,kw:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-2),o=r&&n[0].slice(-3),a=r&&n[0].slice(-5),s=r&&n[0].slice(-6);return t?r&&e>=1&&e<=4||i>=1&&i<=4||i>=21&&i<=24||i>=41&&i<=44||i>=61&&i<=64||i>=81&&i<=84?"one":5==e||5==i?"many":"other":0==e?"zero":1==e?"one":2==i||22==i||42==i||62==i||82==i||r&&0==o&&(a>=1e3&&a<=2e4||4e4==a||6e4==a||8e4==a)||0!=e&&1e5==s?"two":3==i||23==i||43==i||63==i||83==i?"few":1==e||1!=i&&21!=i&&41!=i&&61!=i&&81!=i?"other":"many"},ky:t,lag:function(e,t){var n=String(e).split(".")[0];return t?"other":0==e?"zero":0!=n&&1!=n||0==e?"other":"one"},lb:t,lg:t,lij:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e;return t?11==e||8==e||i&&e>=80&&e<=89||i&&e>=800&&e<=899?"many":"other":1==e&&r?"one":"other"},lkt:o,ln:n,lo:function(e,t){return t&&1==e?"one":"other"},lt:function(e,t){var n=String(e).split("."),r=n[1]||"",i=Number(n[0])==e,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2);return t?"other":1==o&&(a<11||a>19)?"one":o>=2&&o<=9&&(a<11||a>19)?"few":0!=r?"many":"other"},lv:function(e,t){var n=String(e).split("."),r=n[1]||"",i=r.length,o=Number(n[0])==e,a=o&&n[0].slice(-1),s=o&&n[0].slice(-2),l=r.slice(-2),c=r.slice(-1);return t?"other":o&&0==a||s>=11&&s<=19||2==i&&l>=11&&l<=19?"zero":1==a&&11!=s||2==i&&1==c&&11!=l||2!=i&&1==c?"one":"other"},mas:t,mg:n,mgo:t,mk:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?1==a&&11!=s?"one":2==a&&12!=s?"two":7!=a&&8!=a||17==s||18==s?"other":"many":o&&1==a&&11!=s||1==l&&11!=c?"one":"other"},ml:t,mn:t,mo:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e&&n[0].slice(-2);return t?1==e?"one":"other":1==e&&r?"one":!r||0==e||1!=e&&i>=1&&i<=19?"few":"other"},mr:function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":"other":1==e?"one":"other"},ms:function(e,t){return t&&1==e?"one":"other"},mt:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":1==e?"one":2==e?"two":0==e||r>=3&&r<=10?"few":r>=11&&r<=19?"many":"other"},my:o,nah:t,naq:a,nb:t,nd:t,ne:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?r&&e>=1&&e<=4?"one":"other":1==e?"one":"other"},nl:i,nn:t,nnh:t,no:t,nqo:o,nr:t,nso:n,ny:t,nyn:t,om:t,or:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?1==e||5==e||r&&e>=7&&e<=9?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":1==e?"one":"other"},os:t,osa:o,pa:n,pap:t,pcm:r,pl:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-1),a=r.slice(-2);return t?"other":1==e&&i?"one":i&&o>=2&&o<=4&&(a<12||a>14)?"few":i&&1!=r&&(0==o||1==o)||i&&o>=5&&o<=9||i&&a>=12&&a<=14?"many":"other"},prg:function(e,t){var n=String(e).split("."),r=n[1]||"",i=r.length,o=Number(n[0])==e,a=o&&n[0].slice(-1),s=o&&n[0].slice(-2),l=r.slice(-2),c=r.slice(-1);return t?"other":o&&0==a||s>=11&&s<=19||2==i&&l>=11&&l<=19?"zero":1==a&&11!=s||2==i&&1==c&&11!=l||2!=i&&1==c?"one":"other"},ps:t,pt:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?"other":0==r||1==r?"one":0!=r&&0==o&&i?"many":"other"},pt_PT:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?"other":1==e&&i?"one":0!=r&&0==o&&i?"many":"other"},rm:t,ro:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e&&n[0].slice(-2);return t?1==e?"one":"other":1==e&&r?"one":!r||0==e||1!=e&&i>=1&&i<=19?"few":"other"},rof:t,ru:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-1),a=r.slice(-2);return t?"other":i&&1==o&&11!=a?"one":i&&o>=2&&o<=4&&(a<12||a>14)?"few":i&&0==o||i&&o>=5&&o<=9||i&&a>=11&&a<=14?"many":"other"},rwk:t,sah:o,saq:t,sat:a,sc:function(e,t){var n=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&n?"one":"other"},scn:function(e,t){var n=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&n?"one":"other"},sd:t,sdh:t,se:a,seh:t,ses:o,sg:o,sh:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==l&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},shi:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?"other":e>=0&&e<=1?"one":r&&e>=2&&e<=10?"few":"other"},si:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"";return t?"other":0==e||1==e||0==r&&1==i?"one":"other"},sk:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1];return t?"other":1==e&&i?"one":r>=2&&r<=4&&i?"few":i?"other":"many"},sl:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-2);return t?"other":i&&1==o?"one":i&&2==o?"two":i&&(3==o||4==o)||!i?"few":"other"},sma:a,smi:a,smj:a,smn:a,sms:a,sn:t,so:t,sq:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1),o=r&&n[0].slice(-2);return t?1==e?"one":4==i&&14!=o?"many":"other":1==e?"one":"other"},sr:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==l&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},ss:t,ssy:t,st:t,su:o,sv:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2);return t?1!=o&&2!=o||11==a||12==a?"other":"one":1==e&&r?"one":"other"},sw:i,syr:t,ta:t,te:t,teo:t,th:o,ti:n,tig:t,tk:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-1);return t?6==r||9==r||10==e?"few":"other":1==e?"one":"other"},tl:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=i.slice(-1);return t?1==e?"one":"other":o&&(1==r||2==r||3==r)||o&&4!=a&&6!=a&&9!=a||!o&&4!=s&&6!=s&&9!=s?"one":"other"},tn:t,to:o,tpi:o,tr:t,ts:t,tzm:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?"other":0==e||1==e||r&&e>=11&&e<=99?"one":"other"},ug:t,uk:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=Number(n[0])==e,a=o&&n[0].slice(-1),s=o&&n[0].slice(-2),l=r.slice(-1),c=r.slice(-2);return t?3==a&&13!=s?"few":"other":i&&1==l&&11!=c?"one":i&&l>=2&&l<=4&&(c<12||c>14)?"few":i&&0==l||i&&l>=5&&l<=9||i&&c>=11&&c<=14?"many":"other"},und:o,ur:i,uz:t,ve:t,vec:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&i?"one":0!=r&&0==o&&i?"many":"other"},vi:function(e,t){return t&&1==e?"one":"other"},vo:t,vun:t,wa:n,wae:t,wo:o,xh:t,xog:t,yi:i,yo:o,yue:o,zh:o,zu:r})}(i);var o=r(i.exports),a=t({__proto__:null,default:o},[i.exports]),s={exports:{}};!function(e){var t="zero",n="one",r="two",i="few",o="many",a="other",s={cardinal:[n,a],ordinal:[a]},l={cardinal:[n,a],ordinal:[n,a]},c={cardinal:[a],ordinal:[a]},u={cardinal:[n,r,a],ordinal:[a]};!function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),e.exports=n}(0,{af:s,ak:s,am:s,an:s,ar:{cardinal:[t,n,r,i,o,a],ordinal:[a]},ars:{cardinal:[t,n,r,i,o,a],ordinal:[a]},as:{cardinal:[n,a],ordinal:[n,r,i,o,a]},asa:s,ast:s,az:{cardinal:[n,a],ordinal:[n,i,o,a]},bal:l,be:{cardinal:[n,i,o,a],ordinal:[i,a]},bem:s,bez:s,bg:s,bho:s,bm:c,bn:{cardinal:[n,a],ordinal:[n,r,i,o,a]},bo:c,br:{cardinal:[n,r,i,o,a],ordinal:[a]},brx:s,bs:{cardinal:[n,i,a],ordinal:[a]},ca:{cardinal:[n,o,a],ordinal:[n,r,i,a]},ce:s,ceb:s,cgg:s,chr:s,ckb:s,cs:{cardinal:[n,i,o,a],ordinal:[a]},cy:{cardinal:[t,n,r,i,o,a],ordinal:[t,n,r,i,o,a]},da:s,de:s,doi:s,dsb:{cardinal:[n,r,i,a],ordinal:[a]},dv:s,dz:c,ee:s,el:s,en:{cardinal:[n,a],ordinal:[n,r,i,a]},eo:s,es:{cardinal:[n,o,a],ordinal:[a]},et:s,eu:s,fa:s,ff:s,fi:s,fil:l,fo:s,fr:{cardinal:[n,o,a],ordinal:[n,a]},fur:s,fy:s,ga:{cardinal:[n,r,i,o,a],ordinal:[n,a]},gd:{cardinal:[n,r,i,a],ordinal:[n,r,i,a]},gl:s,gsw:s,gu:{cardinal:[n,a],ordinal:[n,r,i,o,a]},guw:s,gv:{cardinal:[n,r,i,o,a],ordinal:[a]},ha:s,haw:s,he:u,hi:{cardinal:[n,a],ordinal:[n,r,i,o,a]},hnj:c,hr:{cardinal:[n,i,a],ordinal:[a]},hsb:{cardinal:[n,r,i,a],ordinal:[a]},hu:l,hy:l,ia:s,id:c,ig:c,ii:c,io:s,is:s,it:{cardinal:[n,o,a],ordinal:[o,a]},iu:u,ja:c,jbo:c,jgo:s,jmc:s,jv:c,jw:c,ka:{cardinal:[n,a],ordinal:[n,o,a]},kab:s,kaj:s,kcg:s,kde:c,kea:c,kk:{cardinal:[n,a],ordinal:[o,a]},kkj:s,kl:s,km:c,kn:s,ko:c,ks:s,ksb:s,ksh:{cardinal:[t,n,a],ordinal:[a]},ku:s,kw:{cardinal:[t,n,r,i,o,a],ordinal:[n,o,a]},ky:s,lag:{cardinal:[t,n,a],ordinal:[a]},lb:s,lg:s,lij:{cardinal:[n,a],ordinal:[o,a]},lkt:c,ln:s,lo:{cardinal:[a],ordinal:[n,a]},lt:{cardinal:[n,i,o,a],ordinal:[a]},lv:{cardinal:[t,n,a],ordinal:[a]},mas:s,mg:s,mgo:s,mk:{cardinal:[n,a],ordinal:[n,r,o,a]},ml:s,mn:s,mo:{cardinal:[n,i,a],ordinal:[n,a]},mr:{cardinal:[n,a],ordinal:[n,r,i,a]},ms:{cardinal:[a],ordinal:[n,a]},mt:{cardinal:[n,r,i,o,a],ordinal:[a]},my:c,nah:s,naq:u,nb:s,nd:s,ne:l,nl:s,nn:s,nnh:s,no:s,nqo:c,nr:s,nso:s,ny:s,nyn:s,om:s,or:{cardinal:[n,a],ordinal:[n,r,i,o,a]},os:s,osa:c,pa:s,pap:s,pcm:s,pl:{cardinal:[n,i,o,a],ordinal:[a]},prg:{cardinal:[t,n,a],ordinal:[a]},ps:s,pt:{cardinal:[n,o,a],ordinal:[a]},pt_PT:{cardinal:[n,o,a],ordinal:[a]},rm:s,ro:{cardinal:[n,i,a],ordinal:[n,a]},rof:s,ru:{cardinal:[n,i,o,a],ordinal:[a]},rwk:s,sah:c,saq:s,sat:u,sc:{cardinal:[n,a],ordinal:[o,a]},scn:{cardinal:[n,a],ordinal:[o,a]},sd:s,sdh:s,se:u,seh:s,ses:c,sg:c,sh:{cardinal:[n,i,a],ordinal:[a]},shi:{cardinal:[n,i,a],ordinal:[a]},si:s,sk:{cardinal:[n,i,o,a],ordinal:[a]},sl:{cardinal:[n,r,i,a],ordinal:[a]},sma:u,smi:u,smj:u,smn:u,sms:u,sn:s,so:s,sq:{cardinal:[n,a],ordinal:[n,o,a]},sr:{cardinal:[n,i,a],ordinal:[a]},ss:s,ssy:s,st:s,su:c,sv:l,sw:s,syr:s,ta:s,te:s,teo:s,th:c,ti:s,tig:s,tk:{cardinal:[n,a],ordinal:[i,a]},tl:l,tn:s,to:c,tpi:c,tr:s,ts:s,tzm:s,ug:s,uk:{cardinal:[n,i,o,a],ordinal:[i,a]},und:c,ur:s,uz:s,ve:s,vec:{cardinal:[n,o,a],ordinal:[o,a]},vi:{cardinal:[a],ordinal:[n,a]},vo:s,vun:s,wa:s,wae:s,wo:c,xh:s,xog:s,yi:s,yo:c,yue:c,zh:c,zu:s})}(s);var l=r(s.exports),c=t({__proto__:null,default:l},[s.exports]),u={exports:{}};!function(e){var t,n=function(e,t){return"other"},r=function(e,t){return"other"===e&&"one"===t?"one":"other"},i=function(e,t){return t||"other"};t={af:n,ak:r,am:i,an:n,ar:function(e,t){return"few"===t?"few":"many"===t?"many":"zero"===e&&"one"===t||"zero"===e&&"two"===t?"zero":"other"},as:i,az:i,be:i,bg:n,bn:i,bs:i,ca:n,cs:i,cy:i,da:i,de:i,el:i,en:n,es:n,et:n,eu:n,fa:r,fi:n,fil:i,fr:i,ga:i,gl:i,gsw:i,gu:i,he:n,hi:i,hr:i,hu:i,hy:i,ia:n,id:n,io:n,is:i,it:i,ja:n,ka:function(e,t){return e||"other"},kk:i,km:n,kn:i,ko:n,ky:i,lij:i,lo:n,lt:i,lv:function(e,t){return"one"===t?"one":"other"},mk:n,ml:i,mn:i,mr:i,ms:n,my:n,nb:n,ne:i,nl:i,no:n,or:r,pa:i,pcm:n,pl:i,ps:i,pt:i,ro:function(e,t){return"few"===t||"one"===t?"few":"other"},ru:i,sc:i,scn:i,sd:r,si:function(e,t){return"one"===e&&"one"===t?"one":"other"},sk:i,sl:function(e,t){return"few"===t||"one"===t?"few":"two"===t?"two":"other"},sq:i,sr:i,sv:n,sw:i,ta:i,te:i,th:n,tk:i,tr:i,ug:i,uk:i,ur:n,uz:i,vi:n,yue:n,zh:n,zu:i},Object.defineProperty(t,"__esModule",{value:!0}),e.exports=t}(u);var h=r(u.exports),d=o||a,f=l||c,p=h||t({__proto__:null,default:h},[u.exports]),g=function(e){return"pt-PT"===e?"pt_PT":e},m=n.default(Intl.NumberFormat,function(e){return d[g(e)]},function(e,t){return f[g(e)][t?"ordinal":"cardinal"]},function(e){return p[g(e)]});return _r=m}();function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);if("undefined"==typeof Intl)void 0!==nr?nr.Intl={PluralRules:n.default}:"undefined"!=typeof window?window.Intl={PluralRules:n.default}:Ar.Intl={PluralRules:n.default},n.default.polyfill=!0;else if(Intl.PluralRules&&Intl.PluralRules.prototype.selectRange){var r=["en","es","ru","zh"];Intl.PluralRules.supportedLocalesOf(r).length<r.length&&(Intl.PluralRules=n.default,n.default.polyfill=!0)}else Intl.PluralRules=n.default,n.default.polyfill=!0}();const Tr={en:{translation:{"File Manager":"File Manager","Selected files:":"Selected files:",Folders:"Folders",Files:"Files",File:"File","Select the destination folder":"Select the destination folder","Filter by type":"Filter by type","All types":"All types","File name":"File name",Size:"Size",Date:"Date",Actions:"Actions",Delete:"Delete",Move:"Move",Copy:"Copy","Add folder":"Add folder","Add file":"Add file","Add file by URL":"Add file by URL","Please select an image file":"Please select an image file","File deleted":"File deleted","Error when deleting a file":"Error when deleting a file","Folder deleted":"Folder deleted","Error when deleting a folder":"Error when deleting a folder","Delete folder":"Delete folder","Are you sure you want to delete this folder? This action will also delete all files and subfolders.":"Are you sure you want to delete this folder? This action will also delete all files and subfolders.","File moved":"File moved","Error when moving a file":"Error when moving a file","has been successfully uploaded":"has been successfully uploaded","File uploaded successfully":"File uploaded successfully","Error when uploading a file":"Error when uploading a file","successfully uploaded":"successfully uploaded","Error when downloading a file by URL":"Error when downloading a file by URL","Error loading files":"Error loading files","File Manager not configured":"File Manager not configured","Type to search...":"Type to search...","Failed to create folder":"Failed to create folder",Cancel:"Cancel",Submit:"Submit",months:{january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},files:"files",Library:"Library","No available folders":"No available folders","My files":"My files",GIF:"GIF","Stock images":"Stock images",AI:"AI","Search GIFs":"Search GIFs","That`s all we could find.":"That`s all we could find.","Search image":"Search image",All:"All",Landscape:"Landscape",Portrait:"Portrait",Squarish:"Squarish",Black:"Black","Black and White":"Black and White",White:"White",Orange:"Orange",Red:"Red",Purple:"Purple",Magenta:"Magenta",Green:"Green",Teal:"Teal",Blue:"Blue","Photo by":"Photo by",on:"on",selected:"selected",Deselected:"Deselected",Rename:"Rename","Rename file":"Rename file {{currentFileName}}","Selected files":"Selected files: {{count}}",Edit:"Edit","Move to folder":"Move to folder","New folder":"New folder","Image search...":"Image search...","By name":"By name","By size":"By size","By date":"By date",List:"List",Grid:"Grid",Main:"Main","total pages":"Total {{total}} items",Name:"Name",Untitled:"Untitled",Dimensions:"Dimensions",error:"error",created:"created","API-endpoint for file upload is not configured":"API-endpoint for file upload is not configured","The URL must point to an image":"The URL must point to an image","Image upload...":"Image upload...",Unknown:"Unknown","Error downloading file by URL":"Error downloading file by URL","File not found":"File not found","File renamed to":"File renamed to {{newFileName}}","Failed to rename the file":"Failed to rename the file","Folder renamed to":"Folder renamed to","Rename folder":"Rename folder","New folder name":"New folder name","Enter a new folder name":"Enter a new folder name","Please drag and drop image files only":"Please drag and drop image files only","Upload image by URL":"Upload image by URL","Upload image":"Upload image","Creating a new folder":"Creating a new folder",Create:"Create","Folder name":"Folder name","Enter the name of the folder":"Enter the name of the folder","A folder will be created inside:":"A folder will be created inside:","selected folder":"selected folder","The folder will be created in the root directory":"The folder will be created in the root directory",Download:"Download","image URL":"image URL","Enter the URL of the image":"Enter the URL of the image","Supported formats: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP":"Supported formats: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP","New file name":"New file name","Enter a new file name":"Enter a new file name","Copy to folder":"Copy to folder",date_of_add:"Added {{date}}",file_add_complete:"File {{fileName}} uploaded successfully",success_download_one:"Successfully uploaded {{successCount}} of {{count}} file",success_download_other:"Successfully uploaded {{successCount}} of {{count}} files",error_download_one:"Failed to upload {{failCount}} of {{count}} file",error_download_other:"Failed to upload {{failCount}} of {{count}} files","No data to display":"No data to display","Drag files to upload":"Drag files to upload","Drop files here to upload":"Drop files here to upload","Newest first":"Newest first","Oldest first":"Oldest first","Largest first":"Largest first","Smallest first":"Smallest first","A-Z":"A-Z","Z-A":"Z-A","By type":"By type","Evaluating the task":"Evaluating the task","Something went wrong, please try again":"Something went wrong, please try again","Sort by":"Sort by","preview text":"The image preview is trying to load ...","Use this variant":"Use this variant","Confirm deletion":"Confirm deletion","Are you sure you want to delete the selected items?":"Are you sure you want to delete the selected items?"}},ru:{translation:{Files:"Файлы",selected:"выбрано",Deselected:"Отменить выбор",Rename:"Переименовать","Rename file":"Переименовать файл {{currentFileName}}","Select the destination folder":"Выберите папку назначения","Selected files:":"Выбрано файлов:","Selected files":"Выбрано файлов: {{count}}",Copy:"Копировать",Edit:"Редактировать","Move to folder":"Переместить в папку",Delete:"Удалить","New folder":"Новая папка","Image search...":"Поиск изображений...","By name":"По имени","By size":"По размеру","By date":"По дате",List:"Список",Grid:"Плитки",Main:"Главная",Folders:"Папки","total pages":"Всего {{total}} элементов",Name:"Имя",Untitled:"Без названия",Size:"Объём",Dimensions:"Размер",Date:"Дата",error:"ошибка",Folder:"Папка",created:"создана","Failed to create folder":"Не удалось создать папку","File deleted":"Файл удален","Error when deleting a file":"Ошибка при удалении файла","Folder deleted":"Папка удалена","Error when deleting a folder":"Ошибка при удалении папки","Delete folder":"Удалить папку","Are you sure you want to delete this folder? This action will also delete all files and subfolders.":"Вы уверены, что хотите удалить эту папку? Это действие также удалит все файлы и подпапки.","API-endpoint for file upload is not configured":"API-endpoint для загрузки файлов не настроен","Please select an image file":"Пожалуйста, выберите файл изображения",File:"Файл","has been successfully uploaded":"успешно загружен","The URL must point to an image":"URL должен указывать на изображение","Image upload...":"Загрузка изображения...",Unknown:"Неизвестно","Error downloading file by URL":"Ошибка загрузки файла по URL","successfully uploaded":"успешно загружен","Error when downloading a file by URL":"Ошибка при загрузке файла по URL","File not found":"Файл не найден","File renamed to":"Файл переименован на {{newFileName}}","Failed to rename the file":"Не удалось переименовать файл","Folder renamed to":"Папка переименована на","Rename folder":"Переименовать папку","New folder name":"Новое название папки","Enter a new folder name":"Введите новое название папки","Please drag and drop image files only":"Пожалуйста, перетащите только файлы изображений","Upload image by URL":"Загрузить изображение по URL","Upload image":"Загрузить изображение","Creating a new folder":"Создание новой папки",Create:"Создать",Cancel:"Отмена","Folder name":"Название папки","Enter the name of the folder":"Введите название папки","A folder will be created inside:":"Папка будет создана внутри:","selected folder":"выбранной папки","The folder will be created in the root directory":"Папка будет создана в корневом каталоге",Download:"Загрузить","image URL":"URL изображения","Enter the URL of the image":"Введите URL изображения","Supported formats: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP":"Поддерживаемые форматы: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP","New file name":"Новое имя файла","Enter a new file name":"Введите новое имя файла","Copy to folder":"Копировать в папку",date_of_add:"Добавлено {{date}}",file_add_complete:"Файл {{fileName}} успешно загружен",success_download_one:"Успешно загружено {{successCount}} из {{count}} файла",success_download_other:"Успешно загружено {{successCount}} из {{count}} файлов",error_download_one:"Не удалось загрузить {{failCount}} из {{count}} файла",error_download_other:"Не удалось загрузить {{failCount}} из {{count}} файлов",months:{january:"января",february:"февраля",march:"марта",april:"апреля",may:"мая",june:"июня",july:"июля",august:"августа",september:"сентября",october:"октября",november:"ноября",december:"декабря"},files:"файлов",Library:"Библиотека","No available folders":"Нет доступных папок","My files":"Мои файлы",GIF:"GIF","Stock images":"Стоковые изображения",AI:"AI","Search GIFs":"Поиск GIF","That`s all we could find.":"Это все, что мы смогли найти.","Search image":"Поиск изображений",All:"Все",Landscape:"Горизонтальные",Portrait:"Вертикальные",Squarish:"Квадратные",Black:"Черный","Black and White":"Черно-белый",White:"Белый",Orange:"Оранжевый",Red:"Красный",Purple:"Фиолетовый",Magenta:"Пурпурный",Green:"Зеленый",Teal:"Бирюзовый",Blue:"Синий","Photo by":"Фото",on:"на","File Manager":"Файловый менеджер","File Manager not configured":"Файловый менеджер не настроен","Filter by type":"Фильтр по типу","All types":"Все типы","File name":"Имя файла",Actions:"Действия","Add file":"Добавить файл","Add folder":"Добавить папку","Add file by URL":"Добавить файл по URL","File moved":"Файл перемещён","Error when moving a file":"Ошибка при перемещении файла","File uploaded successfully":"Файл успешно загружен","Type to search...":"Введите для поиска...",Submit:"Отправить","No data to display":"Нет данных для отображения","Drag files to upload":"Перетащите файлы для загрузки","Drop files here to upload":"Отпустите файлы здесь, чтобы загрузить их","Newest first":"Вначале новые","Oldest first":"Вначале старые","Largest first":"Вначале большие","Smallest first":"Вначале маленькие","A-Z":"По алфавиту А-Я","Z-A":"По алфавиту Я-А","By type":"По типу","Evaluating the task":"Оценка задания","Something went wrong, please try again":"Что-то пошло не так, пожалуйста, попробуйте еще раз","Sort by":"Сортировать по","preview text":"Изображение загружается ...","Use this variant":"Использовать этот вариант","Confirm deletion":"Подтвердить удаление","Are you sure you want to delete the selected items?":"Вы уверены, что хотите удалить выбранные элементы?"}}};tr.use(pr).init({resources:Tr,debug:!0,lng:"en",fallbackLng:"en",interpolation:{escapeValue:!1}});var Ir,Or={exports:{}},Er=Or.exports;
1
+ import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import*as r from"react";import i,{useState as o,useEffect as a,createContext as s,useContext as l,useCallback as c,useRef as u,useMemo as h,createElement as d,memo as f,forwardRef as p,useImperativeHandle as g,Children as m,isValidElement as v,Fragment as b,cloneElement as y,useId as w,useDebugValue as x,useLayoutEffect as _,useInsertionEffect as C,Component as S}from"react";import{createRoot as A}from"react-dom/client";import k from"antd/es/alert/ErrorBoundary";import{theme as T,ConfigProvider as I,App as O,Input as E,Form as P,message as M,Image as F,Select as j,Checkbox as R,Segmented as D,Empty as L,Table as N,Pagination as z,Row as B,Col as V,Card as U,Modal as H,Tree as W,Dropdown as Y,Menu as $,Divider as G,Button as X,Typography as K,List as q,Progress as Z,Avatar as J,Space as Q,Layout as ee,Spin as te,Radio as ne,Tooltip as re,Tag as ie,Carousel as oe}from"antd";import ae,{SearchOutlined as se,FolderOutlined as le,BarsOutlined as ce,AppstoreOutlined as ue,DownOutlined as he,RightOutlined as de,LinkOutlined as fe,UploadOutlined as pe,FileOutlined as ge,FolderAddOutlined as me,FolderOpenOutlined as ve,PlusCircleOutlined as be,EditOutlined as ye,MinusOutlined as we,CloseOutlined as xe,FileImageOutlined as _e,ExclamationCircleOutlined as Ce,CheckCircleOutlined as Se,PictureOutlined as Ae,CopyOutlined as ke,DeleteOutlined as Te,LoadingOutlined as Ie,ArrowRightOutlined as Oe,ArrowLeftOutlined as Ee,CheckOutlined as Pe}from"@ant-design/icons";import*as Me from"react-dom";import Fe,{createPortal as je}from"react-dom";import"antd/dist/reset.css";function Re(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function De(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Re(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Re(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Le(e){return Le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Le(e)}function Ne(e){var t=function(e,t){if("object"!=Le(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Le(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Le(t)?t:t+""}function ze(e,t,n){return(t=Ne(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(n),!0).forEach(function(t){ze(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Be(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Ue={},He=[];function We(e,t){if("production"!==process.env.NODE_ENV&&!e&&void 0!==console){var n=He.reduce(function(e,t){return t(null!=e?e:"","warning")},t);n&&console.error("Warning: ".concat(n))}}function Ye(e,t){if("production"!==process.env.NODE_ENV&&!e&&void 0!==console){var n=He.reduce(function(e,t){return t(null!=e?e:"","note")},t);n&&console.warn("Note: ".concat(n))}}function $e(e,t,n){t||Ue[n]||(e(!1,n),Ue[n]=!0)}function Ge(e,t){$e(We,e,t)}function Xe(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=new Set;return function e(t,i){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=r.has(t);if(Ge(!a,"Warning: There may be circular references"),a)return!1;if(t===i)return!0;if(n&&o>1)return!1;r.add(t);var s=o+1;if(Array.isArray(t)){if(!Array.isArray(i)||t.length!==i.length)return!1;for(var l=0;l<t.length;l++)if(!e(t[l],i[l],s))return!1;return!0}if(t&&i&&"object"===Le(t)&&"object"===Le(i)){var c=Object.keys(t);return c.length===Object.keys(i).length&&c.every(function(n){return e(t[n],i[n],s)})}return!1}(e,t)}function Ke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qe(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ne(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}Ge.preMessage=function(e){He.push(e)},Ge.resetWarned=function(){Ue={}},Ge.noteOnce=function(e,t){$e(Ye,e,t)};function Ze(e){return e.join("%")}var Je=function(){function e(t){Ke(this,e),ze(this,"instanceId",void 0),ze(this,"cache",new Map),ze(this,"extracted",new Set),this.instanceId=t}return qe(e,[{key:"get",value:function(e){return this.opGet(Ze(e))}},{key:"opGet",value:function(e){return this.cache.get(e)||null}},{key:"update",value:function(e,t){return this.opUpdate(Ze(e),t)}},{key:"opUpdate",value:function(e,t){var n=t(this.cache.get(e));null===n?this.cache.delete(e):this.cache.set(e,n)}}]),e}(),Qe=["children"],et="data-css-hash",tt="__cssinjs_instance__";function nt(){var e=Math.random().toString(12).slice(2);if("undefined"!=typeof document&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(et,"]"))||[],n=document.head.firstChild;Array.from(t).forEach(function(t){t[tt]=t[tt]||e,t[tt]===e&&document.head.insertBefore(t,n)});var r={};Array.from(document.querySelectorAll("style[".concat(et,"]"))).forEach(function(t){var n,i=t.getAttribute(et);r[i]?t[tt]===e&&(null===(n=t.parentNode)||void 0===n||n.removeChild(t)):r[i]=!0})}return new Je(e)}var rt=r.createContext({hashPriority:"low",cache:nt(),defaultCache:!0}),it=function(e){var t,n,i,o,a=e.children,s=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,Qe),l=r.useContext(rt),c=(t=function(){var e=Ve({},l);Object.keys(s).forEach(function(t){var n=s[t];void 0!==s[t]&&(e[t]=n)});var t=s.cache;return e.cache=e.cache||nt(),e.defaultCache=!t&&l.defaultCache,e},n=[l,s],i=function(e,t){return!Xe(e[0],t[0],!0)||!Xe(e[1],t[1],!0)},"value"in(o=r.useRef({})).current&&!i(o.current.condition,n)||(o.current.value=t(),o.current.condition=n),o.current.value);return r.createElement(rt.Provider,{value:c},a)};var ot=function(){function e(){Ke(this,e),ze(this,"cache",void 0),ze(this,"keys",void 0),ze(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return qe(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i={map:this.cache};return e.forEach(function(e){var t;i?i=null===(t=i)||void 0===t||null===(t=t.map)||void 0===t?void 0:t.get(e):i=void 0}),null!==(t=i)&&void 0!==t&&t.value&&r&&(i.value[1]=this.cacheCallTimes++),null===(n=i)||void 0===n?void 0:n.value}},{key:"get",value:function(e){var t;return null===(t=this.internalGet(e,!0))||void 0===t?void 0:t[0]}},{key:"has",value:function(e){return!!this.internalGet(e)}},{key:"set",value:function(t,n){var r=this;if(!this.has(t)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var i=this.keys.reduce(function(e,t){var n=De(e,2)[1];return r.internalGet(t)[1]<n?[t,r.internalGet(t)[1]]:e},[this.keys[0],this.cacheCallTimes]),o=De(i,1)[0];this.delete(o)}this.keys.push(t)}var a=this.cache;t.forEach(function(e,i){if(i===t.length-1)a.set(e,{value:[n,r.cacheCallTimes++]});else{var o=a.get(e);o?o.map||(o.map=new Map):a.set(e,{map:new Map}),a=a.get(e).map}})}},{key:"deleteByPath",value:function(e,t){var n,r=e.get(t[0]);if(1===t.length)return r.map?e.set(t[0],{map:r.map}):e.delete(t[0]),null===(n=r.value)||void 0===n?void 0:n[0];var i=this.deleteByPath(r.map,t.slice(1));return r.map&&0!==r.map.size||r.value||e.delete(t[0]),i}},{key:"delete",value:function(e){if(this.has(e))return this.keys=this.keys.filter(function(t){return!function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,e)}),this.deleteByPath(this.cache,e)}}]),e}();function at(e,t,n){if(arguments.length>4&&void 0!==arguments[4]&&arguments[4])return e;var r=Ve(Ve({},arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}),{},ze(ze({},"data-token-hash",t),et,n)),i=Object.keys(r).map(function(e){var t=r[e];return t?"".concat(e,'="').concat(t,'"'):null}).filter(function(e){return e}).join(" ");return"<style ".concat(i,">").concat(e,"</style>")}ze(ot,"MAX_CACHE_SIZE",20),ze(ot,"MAX_CACHE_OFFSET",5),new ot,"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&window.document&&window.document.createElement?r.useLayoutEffect:r.useEffect,Ve({},r).useInsertionEffect,Ve({},r).useInsertionEffect;if(process.env.NODE_ENV,"production"!==process.env.NODE_ENV&&"undefined"!=typeof module&&module&&module.hot&&"undefined"!=typeof window){var st="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:null;if(st&&"function"==typeof st.webpackHotUpdate){var lt=st.webpackHotUpdate;st.webpackHotUpdate=function(){return setTimeout(function(){0},0),lt.apply(void 0,arguments)}}}process.env.NODE_ENV;var ct="comm",ut="rule",ht="decl",dt=Math.abs,ft=String.fromCharCode;function pt(e){return e.trim()}function gt(e,t,n){return e.replace(t,n)}function mt(e,t,n){return e.indexOf(t,n)}function vt(e,t){return 0|e.charCodeAt(t)}function bt(e,t,n){return e.slice(t,n)}function yt(e){return e.length}function wt(e,t){return t.push(e),e}var xt=1,_t=1,Ct=0,St=0,At=0,kt="";function Tt(e,t,n,r,i,o,a,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:xt,column:_t,length:a,return:"",siblings:s}}function It(){return At=St>0?vt(kt,--St):0,_t--,10===At&&(_t=1,xt--),At}function Ot(){return At=St<Ct?vt(kt,St++):0,_t++,10===At&&(_t=1,xt++),At}function Et(){return vt(kt,St)}function Pt(){return St}function Mt(e,t){return bt(kt,e,t)}function Ft(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function jt(e){return pt(Mt(St-1,Lt(91===e?e+2:40===e?e+1:e)))}function Rt(e){for(;(At=Et())&&At<33;)Ot();return Ft(e)>2||Ft(At)>3?"":" "}function Dt(e,t){for(;--t&&Ot()&&!(At<48||At>102||At>57&&At<65||At>70&&At<97););return Mt(e,Pt()+(t<6&&32==Et()&&32==Ot()))}function Lt(e){for(;Ot();)switch(At){case e:return St;case 34:case 39:34!==e&&39!==e&&Lt(At);break;case 40:41===e&&Lt(e);break;case 92:Ot()}return St}function Nt(e,t){for(;Ot()&&e+At!==57&&(e+At!==84||47!==Et()););return"/*"+Mt(t,St-1)+"*"+ft(47===e?e:Ot())}function zt(e){for(;!Ft(Et());)Ot();return Mt(e,St)}function Bt(e){return function(e){return kt="",e}(Vt("",null,null,null,[""],e=function(e){return xt=_t=1,Ct=yt(kt=e),St=0,[]}(e),0,[0],e))}function Vt(e,t,n,r,i,o,a,s,l){for(var c=0,u=0,h=a,d=0,f=0,p=0,g=1,m=1,v=1,b=0,y="",w=i,x=o,_=r,C=y;m;)switch(p=b,b=Ot()){case 40:if(108!=p&&58==vt(C,h-1)){-1!=mt(C+=gt(jt(b),"&","&\f"),"&\f",dt(c?s[c-1]:0))&&(v=-1);break}case 34:case 39:case 91:C+=jt(b);break;case 9:case 10:case 13:case 32:C+=Rt(p);break;case 92:C+=Dt(Pt()-1,7);continue;case 47:switch(Et()){case 42:case 47:wt(Ht(Nt(Ot(),Pt()),t,n,l),l),5!=Ft(p||1)&&5!=Ft(Et()||1)||!yt(C)||" "===bt(C,-1,void 0)||(C+=" ");break;default:C+="/"}break;case 123*g:s[c++]=yt(C)*v;case 125*g:case 59:case 0:switch(b){case 0:case 125:m=0;case 59+u:-1==v&&(C=gt(C,/\f/g,"")),f>0&&(yt(C)-h||0===g&&47===p)&&wt(f>32?Wt(C+";",r,n,h-1,l):Wt(gt(C," ","")+";",r,n,h-2,l),l);break;case 59:C+=";";default:if(wt(_=Ut(C,t,n,c,u,i,s,y,w=[],x=[],h,o),o),123===b)if(0===u)Vt(C,t,_,_,w,o,h,s,x);else{switch(d){case 99:if(110===vt(C,3))break;case 108:if(97===vt(C,2))break;default:u=0;case 100:case 109:case 115:}u?Vt(e,_,_,r&&wt(Ut(e,_,_,0,0,i,s,y,i,w=[],h,x),x),i,x,h,s,r?w:x):Vt(C,_,_,_,[""],x,0,s,x)}}c=u=f=0,g=v=1,y=C="",h=a;break;case 58:h=1+yt(C),f=p;default:if(g<1)if(123==b)--g;else if(125==b&&0==g++&&125==It())continue;switch(C+=ft(b),b*g){case 38:v=u>0?1:(C+="\f",-1);break;case 44:s[c++]=(yt(C)-1)*v,v=1;break;case 64:45===Et()&&(C+=jt(Ot())),d=Et(),u=h=yt(y=C+=zt(Pt())),b++;break;case 45:45===p&&2==yt(C)&&(g=0)}}return o}function Ut(e,t,n,r,i,o,a,s,l,c,u,h){for(var d=i-1,f=0===i?o:[""],p=function(e){return e.length}(f),g=0,m=0,v=0;g<r;++g)for(var b=0,y=bt(e,d+1,d=dt(m=a[g])),w=e;b<p;++b)(w=pt(m>0?f[b]+" "+y:gt(y,/&\f/g,f[b])))&&(l[v++]=w);return Tt(e,t,n,0===i?ut:s,l,c,u,h)}function Ht(e,t,n,r){return Tt(e,t,n,ct,ft(At),bt(e,2,-2),0,r)}function Wt(e,t,n,r,i){return Tt(e,t,n,ht,bt(e,0,r),bt(e,r+1,-1),r,i)}function Yt(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function $t(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case ht:return e.return=e.return||e.value;case ct:return"";case"@keyframes":return e.return=e.value+"{"+Yt(e.children,r)+"}";case ut:if(!yt(e.value=e.props.join(",")))return""}return yt(n=Yt(e.children,r))?e.return=e.value+"{"+n+"}":""}function Gt(e){return e.notSplit=!0,e}ze(ze(ze({},"style",function(e,t,n){var r=De(e,6),i=r[0],o=r[1],a=r[2],s=r[3],l=r[4],c=r[5],u=(n||{}).plain;if(l)return null;var h=i,d={"data-rc-order":"prependQueue","data-rc-priority":"".concat(c)};return h=at(i,o,a,d,u),s&&Object.keys(s).forEach(function(e){if(!t[e]){t[e]=!0;var n=function(e){return Yt(Bt(e),$t).replace(/\{%%%\:[^;];}/g,";")}(s[e]),r=at(n,o,"_effect-".concat(e),d,u);e.startsWith("@layer")?h=r+h:h+=r}}),[c,a,h]}),"token",function(e,t,n){var r=De(e,5),i=r[2],o=r[3],a=r[4],s=(n||{}).plain;if(!o)return null;var l=i._tokenKey;return[-999,l,at(o,a,l,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},s)]}),"cssVar",function(e,t,n){var r=De(e,4),i=r[1],o=r[2],a=r[3],s=(n||{}).plain;if(!i)return null;return[-999,o,at(i,a,o,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},s)]}),Gt(["borderTop","borderBottom"]),Gt(["borderTop"]),Gt(["borderBottom"]),Gt(["borderLeft","borderRight"]),Gt(["borderLeft"]),Gt(["borderRight"]);const Xt={defaultMerge:Symbol("deepmerge-ts: default merge"),skip:Symbol("deepmerge-ts: skip")};function Kt(e,t){return t}function qt(e,t){return e.filter(e=>void 0!==e)}var Zt;function Jt(e){return"object"!=typeof e||null===e?0:Array.isArray(e)?2:function(e){if(!tn.includes(Object.prototype.toString.call(e)))return!1;const{constructor:t}=e;if(void 0===t)return!0;const n=t.prototype;if(null===n||"object"!=typeof n||!tn.includes(Object.prototype.toString.call(n)))return!1;if(!n.hasOwnProperty("isPrototypeOf"))return!1;return!0}(e)?1:e instanceof Set?3:e instanceof Map?4:5}function Qt(e,t){return"object"==typeof e&&Object.prototype.propertyIsEnumerable.call(e,t)}function en(e){let t=0,n=e[0]?.[Symbol.iterator]();return{[Symbol.iterator]:()=>({next(){for(;;){if(void 0===n)return{done:!0,value:void 0};const r=n.next();if(!0!==r.done)return{done:!1,value:r.value};t+=1,n=e[t]?.[Symbol.iterator]()}}})}}!function(e){e[e.NOT=0]="NOT",e[e.RECORD=1]="RECORD",e[e.ARRAY=2]="ARRAY",e[e.SET=3]="SET",e[e.MAP=4]="MAP",e[e.OTHER=5]="OTHER"}(Zt||(Zt={}));const tn=["[object Object]","[object Module]"];const nn={mergeRecords:function(e,t,n){const r={};for(const i of function(e){const t=new Set;for(const n of e)for(const e of[...Object.keys(n),...Object.getOwnPropertySymbols(n)])t.add(e);return t}(e)){const o=[];for(const t of e)Qt(t,i)&&o.push(t[i]);if(0===o.length)continue;const a=t.metaDataUpdater(n,{key:i,parents:e}),s=on(o,t,a);s!==Xt.skip&&("__proto__"===i?Object.defineProperty(r,i,{value:s,configurable:!0,enumerable:!0,writable:!0}):r[i]=s)}return r},mergeArrays:function(e){return e.flat()},mergeSets:function(e){return new Set(en(e))},mergeMaps:function(e){return new Map(en(e))},mergeOthers:function(e){return e.at(-1)}};function rn(...e){return function(e,t){const n=function(e,t){return{defaultMergeFunctions:nn,mergeFunctions:{...nn,...Object.fromEntries(Object.entries(e).filter(([e,t])=>Object.hasOwn(nn,e)).map(([e,t])=>!1===t?[e,nn.mergeOthers]:[e,t]))},metaDataUpdater:e.metaDataUpdater??Kt,deepmerge:t,useImplicitDefaultMerging:e.enableImplicitDefaultMerging??!1,filterValues:!1===e.filterValues?void 0:e.filterValues??qt,actions:Xt}}(e,r);function r(...e){return on(e,n,t)}return r}({})(...e)}function on(e,t,n){const r=t.filterValues?.(e,n)??e;if(0===r.length)return;if(1===r.length)return an(r,t,n);const i=Jt(r[0]);if(0!==i&&5!==i)for(let e=1;e<r.length;e++)if(Jt(r[e])!==i)return an(r,t,n);switch(i){case 1:return function(e,t,n){const r=t.mergeFunctions.mergeRecords(e,t,n);if(r===Xt.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeRecords!==t.defaultMergeFunctions.mergeRecords)return t.defaultMergeFunctions.mergeRecords(e,t,n);return r}(r,t,n);case 2:return function(e,t,n){const r=t.mergeFunctions.mergeArrays(e,t,n);if(r===Xt.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeArrays!==t.defaultMergeFunctions.mergeArrays)return t.defaultMergeFunctions.mergeArrays(e);return r}(r,t,n);case 3:return function(e,t,n){const r=t.mergeFunctions.mergeSets(e,t,n);if(r===Xt.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeSets!==t.defaultMergeFunctions.mergeSets)return t.defaultMergeFunctions.mergeSets(e);return r}(r,t,n);case 4:return function(e,t,n){const r=t.mergeFunctions.mergeMaps(e,t,n);if(r===Xt.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeMaps!==t.defaultMergeFunctions.mergeMaps)return t.defaultMergeFunctions.mergeMaps(e);return r}(r,t,n);default:return an(r,t,n)}}function an(e,t,n){const r=t.mergeFunctions.mergeOthers(e,t,n);return r===Xt.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeOthers!==t.defaultMergeFunctions.mergeOthers?t.defaultMergeFunctions.mergeOthers(e):r}const sn={hashed:!1,algorithm:T.defaultAlgorithm,token:{colorLink:"#1677ff",colorInfo:"#722ed1",colorTextBase:"#000000",colorBgLayout:"#f0f2f5",borderRadiusXL:16,borderRadiusLG:12,borderRadius:8,borderRadiusSM:6,colorDarken1:"rgba(0, 0, 0, 0.08)",colorFillSecondaryDarken:"rgba(0, 0, 0, 0.1)",formControlHeight:34,borderWidth:1,borderColorHover:"#C5C5C5",formItemMarginBottomMD:20,formItemMarginBottomXS:8,colorSecondaryH:265.03,colorSecondaryS:"63.92%",colorSecondaryL:"50%",colorSecondaryBgH:273,colorSecondaryBgS:"100%",colorSecondaryBgL:"93%",appZoom:1},components:{Progress:{colorFillSecondary:"#ffffff"},Tabs:{titleFontSize:16,titleFontSizeSM:16,fontSize:16,fontSizeLG:16}}},ln={hashed:!1,algorithm:T.darkAlgorithm,token:{colorBgBase:"#1F1F1F",colorInfo:"#9254de",colorLink:"#1890ff",colorLinkHover:"#69c0ff",wireframe:!1,borderRadiusXL:16,borderRadiusLG:12,borderRadius:8,borderRadiusSM:6,borderWidth:1,colorDarken1:"rgba(0, 0, 0, 0.9)",colorFillSecondaryDarken:"rgba(255, 255, 255, 0.16)",formControlHeight:34,borderColorHover:"rgba(255, 255, 255, 0.3)",formItemMarginBottomMD:20,formItemMarginBottomXS:8,appZoom:1},components:{Tabs:{titleFontSize:16,titleFontSizeSM:16,fontSize:16,fontSizeLG:16}}},cn=({externalTheme:t,children:n,customThemeToken:r})=>{const[i]=o(t||"light"),[s,l]=o("light"===i?sn:ln);return a(()=>{const e="light"===i?sn:ln,t=r?rn(e.token,r):e.token;l(Object.assign(Object.assign({},e),{token:t}))},[l,i,r]),e("div",{id:"file-manager-element-id",style:{height:"100%"},children:e(I,{theme:s,children:e(it,{transformers:[],children:e(O,{style:{height:"100%"},children:n})})})})},un={fileManager:{locale:"en_US",mode:"fileManager",theme:"light",enabledTabs:["editor"]},imageCenter:{locale:"en_US",mode:"imageCenter",theme:"light",enabledTabs:["stock","gif","editor"]},plugin:{locale:"en_US",mode:"plugin",theme:"light",enabledTabs:["editor","stock","gif","ai"]}},hn=(e="fileManager",t)=>"imageCenter"===e&&t?t:Object.assign({},un[e]),dn=e=>"string"==typeof e,fn=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},pn=e=>null==e?"":""+e,gn=/###/g,mn=e=>e&&e.indexOf("###")>-1?e.replace(gn,"."):e,vn=e=>!e||dn(e),bn=(e,t,n)=>{const r=dn(t)?t.split("."):t;let i=0;for(;i<r.length-1;){if(vn(e))return{};const t=mn(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return vn(e)?{}:{obj:e,k:mn(r[i])}},yn=(e,t,n)=>{const{obj:r,k:i}=bn(e,t,Object);if(void 0!==r||1===t.length)return void(r[i]=n);let o=t[t.length-1],a=t.slice(0,t.length-1),s=bn(e,a,Object);for(;void 0===s.obj&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),s=bn(e,a,Object),s?.obj&&void 0!==s.obj[`${s.k}.${o}`]&&(s.obj=void 0);s.obj[`${s.k}.${o}`]=n},wn=(e,t)=>{const{obj:n,k:r}=bn(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},xn=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?dn(e[r])||e[r]instanceof String||dn(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):xn(e[r],t[r],n):e[r]=t[r]);return e},_n=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Cn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Sn=e=>dn(e)?e.replace(/[&<>"'\/]/g,e=>Cn[e]):e;const An=[" ",",","?","!",";"],kn=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),Tn=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const r=t.split(n);let i=e;for(let e=0;e<r.length;){if(!i||"object"!=typeof i)return;let t,o="";for(let a=e;a<r.length;++a)if(a!==e&&(o+=n),o+=r[a],t=i[o],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<r.length-1)continue;e+=a-e+1;break}i=t}return i},In=e=>e?.replace("_","-"),On={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class En{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||On,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(dn(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new En(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new En(this.logger,e)}}var Pn=new En;class Mn{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e,...t){if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n.apply(n,[e,...t])})}}}class Fn extends Mn{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){const i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):dn(n)&&i?a.push(...n.split(i)):a.push(n)));const s=wn(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&o&&dn(n)?Tn(this.data?.[e]?.[t],n,i):s}addResource(e,t,n,r,i={silent:!1}){const o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),yn(this.data,a,r),i.silent||this.emit("added",e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(const r in n)(dn(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,i,o={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=wn(this.data,a)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?xn(s,n,i):s={...s,...n},yn(this.data,a,s),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var jn={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}};const Rn=Symbol("i18next/PATH_KEY");function Dn(e,t){const{[Rn]:n}=e(function(){const e=[],t=Object.create(null);let n;return t.get=(r,i)=>(n?.revoke?.(),i===Rn?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}());return n.join(t?.keySeparator??".")}const Ln={},Nn=e=>!dn(e)&&"boolean"!=typeof e&&"number"!=typeof e;class zn extends Mn{constructor(e,t={}){var n,r;super(),n=e,r=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach(e=>{n[e]&&(r[e]=n[e])}),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=Pn.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(null==e)return!1;const r=this.resolve(e,n);return void 0!==r?.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let i=t.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=An.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;const i=kn.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`);let o=!i.test(e);if(!o){const t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(o=!0)}return o})(e,n,r));if(o&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:dn(i)?[i]:i};const o=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),e=o.join(r)}return{key:e,namespaces:dn(i)?[i]:i}}translate(e,t,n){let r="object"==typeof t?{...t}:t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof r&&(r={...r}),r||(r={}),null==e)return"";"function"==typeof e&&(e=Dn(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]);const i=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],r),l=s[s.length-1];let c=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");const u=r.lng||this.language,h=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===u?.toLowerCase())return h?i?{res:`${l}${c}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${c}${a}`:i?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:a;const d=this.resolve(e,r);let f=d?.res;const p=d?.usedKey||a,g=d?.exactUsedKey||a,m=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==r.count&&!dn(r.count),y=zn.hasDefaultValue(r),w=b?this.pluralResolver.getSuffix(u,r.count,r):"",x=r.ordinal&&b?this.pluralResolver.getSuffix(u,r.count,{ordinal:!1}):"",_=b&&!r.ordinal&&0===r.count,C=_&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${w}`]||r[`defaultValue${x}`]||r.defaultValue;let S=f;v&&!f&&y&&(S=C);const A=Nn(S),k=Object.prototype.toString.apply(S);if(!(v&&S&&A&&["[object Number]","[object Function]","[object RegExp]"].indexOf(k)<0)||dn(m)&&Array.isArray(S))if(v&&dn(m)&&Array.isArray(f))f=f.join(m),f&&(f=this.extendTranslation(f,e,r,n));else{let t=!1,i=!1;!this.isValidLookup(f)&&y&&(t=!0,f=C),this.isValidLookup(f)||(i=!0,f=a);const s=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&i?void 0:f,h=y&&C!==f&&this.options.updateMissing;if(i||t||h){if(this.logger.log(h?"updateKey":"missingKey",u,l,a,h?C:f),o){const e=this.resolve(a,{...r,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(r.lng||this.language):e.push(r.lng||this.language);const n=(e,t,n)=>{const i=y&&n!==f?n:s;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,i,h,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,i,h,r),this.emit("missingKey",e,l,t,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,r);_&&r[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],a+t,r[`defaultValue${t}`]||C)})}):n(e,a,C))}f=this.extendTranslation(f,e,r,d,n),i&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}${c}${a}`),(i||t)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${c}${a}`:a,t?f:void 0,r))}else{if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,S,{...r,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(d.res=e,d.usedParams=this.getUsedParamsDetails(r),d):e}if(o){const e=Array.isArray(S),t=e?[]:{},n=e?g:p;for(const e in S)if(Object.prototype.hasOwnProperty.call(S,e)){const i=`${n}${o}${e}`;t[e]=y&&!f?this.translate(i,{...r,defaultValue:Nn(C)?C[e]:void 0,joinArrays:!1,ns:s}):this.translate(i,{...r,joinArrays:!1,ns:s}),t[e]===i&&(t[e]=S[e])}f=t}}return i?(d.res=f,d.usedParams=this.getUsedParamsDetails(r),d):f}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const o=dn(e)&&(void 0!==n?.interpolation?.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(o){const t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let s=n.replace&&!dn(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),o){const t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>i?.[0]!==e[0]||n.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),n)),n.interpolation&&this.interpolator.reset()}const o=n.postProcess||this.options.postProcess,a=dn(o)?[o]:o;return null!=e&&a?.length&&!1!==n.applyPostProcessor&&(e=jn.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,o,a;return dn(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(n))return;const s=this.extractFromKey(e,t),l=s.key;r=l;let c=s.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const u=void 0!==t.count&&!dn(t.count),h=u&&!t.ordinal&&0===t.count,d=void 0!==t.context&&(dn(t.context)||"number"==typeof t.context)&&""!==t.context,f=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);c.forEach(e=>{this.isValidLookup(n)||(a=e,Ln[`${f[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(a)||(Ln[`${f[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${f.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach(r=>{if(this.isValidLookup(n))return;o=r;const a=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(a,l,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));const n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&0===e.indexOf(i)&&a.push(l+e.replace(i,this.options.pluralSeparator)),a.push(l+e),h&&a.push(l+n)),d){const r=`${l}${this.options.contextSeparator||"_"}${t.context}`;a.push(r),u&&(t.ordinal&&0===e.indexOf(i)&&a.push(r+e.replace(i,this.options.pluralSeparator)),a.push(r+e),h&&a.push(r+n))}}let s;for(;s=a.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:o,usedNS:a}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!dn(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}class Bn{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Pn.create("languageUtils")}getScriptPartFromCode(e){if(!(e=In(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=In(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(dn(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;const r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:e.indexOf("-")>0&&r.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),dn(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return dn(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):dn(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}}const Vn={zero:0,one:1,two:2,few:3,many:4,other:5},Un={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Hn{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Pn.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=In("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(n,{type:r})}catch(n){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Un;if(!e.match(/-|_/))return Un;const r=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(r,t)}return this.pluralRulesCache[i]=o,o}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>Vn[e]-Vn[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){const r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const Wn=(e,t,n,r=".",i=!0)=>{let o=((e,t,n)=>{const r=wn(e,n);return void 0!==r?r:wn(t,n)})(e,t,n);return!o&&i&&dn(n)&&(o=Tn(e,n,r),void 0===o&&(o=Tn(t,n,r))),o},Yn=e=>e.replace(/\$/g,"$$$$");class $n{constructor(e={}){this.logger=Pn.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:s,formatSeparator:l,unescapeSuffix:c,unescapePrefix:u,nestingPrefix:h,nestingPrefixEscaped:d,nestingSuffix:f,nestingSuffixEscaped:p,nestingOptionsSeparator:g,maxReplaces:m,alwaysFormat:v}=e.interpolation;this.escape=void 0!==t?t:Sn,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=i?_n(i):o||"{{",this.suffix=a?_n(a):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=h?_n(h):d||_n("$t("),this.nestingSuffix=f?_n(f):p||_n(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==v&&v,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,o,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const i=Wn(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}const i=e.split(this.formatSeparator),o=i.shift().trim(),a=i.join(this.formatSeparator).trim();return this.format(Wn(t,s,o,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:o})};this.resetRegExp();const c=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=void 0!==r?.interpolation?.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Yn(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Yn(this.escape(e)):Yn(e)}].forEach(t=>{for(a=0;i=t.regex.exec(e);){const n=i[1].trim();if(o=l(n),void 0===o)if("function"==typeof c){const t=c(e,i,r);o=dn(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))o="";else{if(u){o=i[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),o=""}else dn(o)||this.useRawValueToEscape||(o=pn(o));const s=t.safeValue(o);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,o;const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;e=r[0],i=this.interpolate(i,o);const a=i.match(/'/g),s=i.match(/"/g);((a?.length??0)%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];o={...n},o=o.replace&&!dn(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const l=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==l&&(s=r[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,l)),i=t(a.call(this,r[1].trim(),o),o),i&&r[0]===e&&!dn(i))return i;dn(i)||(i=pn(i)),i||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),i=""),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}}const Gn=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const a=r+JSON.stringify(o);let s=t[a];return s||(s=e(In(r),i),t[a]=s),s(n)}},Xn=e=>(t,n,r)=>e(In(n),r)(t);class Kn{constructor(e={}){this.logger=Pn.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?Gn:Xn;this.formats={number:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:n((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Gn(t)}format(e,t,n,r={}){const i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(e=>e.indexOf(")")>-1)){const e=i.findIndex(e=>e.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}const o=i.reduce((e,t)=>{const{formatName:i,formatOptions:o}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);"currency"===t&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):"relativetime"===t&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(e=>{if(e){const[t,...r]=e.split(":"),i=r.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();n[o]||(n[o]=i),"false"===i&&(n[o]=!1),"true"===i&&(n[o]=!0),isNaN(i)||(n[o]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[i]){let t=e;try{const a=r?.formatParams?.[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...o,...r,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e);return o}}class qn extends Mn{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Pn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){const i={},o={},a={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===o[a]&&(o[a]=!0):(this.state[a]=1,r=!1,void 0===o[a]&&(o[a]=!0),void 0===i[a]&&(i[a]=!0),void 0===s[t]&&(s[t]=!0)))}),r||(a[e]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),!t&&n&&this.store.addResourceBundle(i,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:r,k:i}=bn(e,t,Object);r[i]=r[i]||[],r[i].push(n)})(n.loaded,[i],o),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:o});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*i,o)},i):o(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then(e=>a(null,e)).catch(a):a(null,n)}catch(e){a(e)}}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();dn(e)&&(e=this.languageUtils.toResolveHierarchy(e)),dn(t)&&(t=[t]);const i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),r=n[0],i=n[1];this.read(r,i,"read",void 0,void 0,(n,o)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,o),this.loaded(e,n,o)})}saveMissing(e,t,n,r,i,o={},a=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(this.backend?.create){const s={...o,isUpdate:i},l=this.backend.create.bind(this.backend);if(l.length<6)try{let i;i=5===l.length?l(e,t,n,r,s):l(e,t,n,r),i&&"function"==typeof i.then?i.then(e=>a(null,e)).catch(a):a(null,i)}catch(e){a(e)}else l(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}else this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const Zn=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),dn(e[1])&&(t.defaultValue=e[1]),dn(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Jn=e=>(dn(e.ns)&&(e.ns=[e.ns]),dn(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),dn(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),Qn=()=>{};class er extends Mn{constructor(e={},t){var n;if(super(),this.options=Jn(e),this.services={},this.logger=Pn,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(dn(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=Zn();this.options={...n,...this.options,...Jn(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator);const r=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?Pn.init(r(this.modules.logger),this.options):Pn.init(null,this.options),e=this.modules.formatter?this.modules.formatter:Kn;const t=new Bn(this.options);this.store=new Fn(this.options.resources,this.options);const i=this.services;i.logger=Pn,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new Hn(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix});this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!e||this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format||(i.formatter=r(e),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new $n(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new qn(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new zn(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=Qn),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});const i=fn(),o=()=>{const e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?o():setTimeout(o,0),i}loadResources(e,t=Qn){let n=t;const r=dn(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===r?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return n();const e=[],t=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};if(r)t(r);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e))}this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){const r=fn();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=Qn),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&jn.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=fn();this.emit("languageChanging",e);const r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,o)=>{o?this.isLanguageChangingTo===e&&(r(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},o=t=>{e||t||!this.services.languageDetector||(t=[]);const n=dn(t)?t:t&&t[0],o=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(dn(t)?[t]:t);o&&(this.language||r(o),this.translator.language||this.translator.changeLanguage(o),this.services.languageDetector?.cacheUserLanguage?.(o)),this.loadResources(o,e=>{i(e,o)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),n}getFixedT(e,t,n){const r=(e,t,...i)=>{let o;o="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(i)):{...t},o.lng=o.lng||r.lng,o.lngs=o.lngs||r.lngs,o.ns=o.ns||r.ns,""!==o.keyPrefix&&(o.keyPrefix=o.keyPrefix||n||r.keyPrefix);const a=this.options.keySeparator||".";let s;return o.keyPrefix&&Array.isArray(e)?s=e.map(e=>("function"==typeof e&&(e=Dn(e,{...this.options,...t})),`${o.keyPrefix}${a}${e}`)):("function"==typeof e&&(e=Dn(e,{...this.options,...t})),s=o.keyPrefix?`${o.keyPrefix}${a}${e}`:e),this.t(s,o)};return dn(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const o=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,o);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!o(n,e)||r&&!o(i,e)))}loadNamespaces(e,t){const n=fn();return this.options.ns?(dn(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=fn();dn(e)&&(e=[e]);const r=this.options.preload||[],i=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}const t=this.services?.languageUtils||new Bn(Zn());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new er(e,t)}cloneInstance(e={},t=Qn){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},i=new er(r);void 0===e.debug&&void 0===e.prefix||(i.logger=i.logger.clone(e));if(["store","services","language"].forEach(e=>{i[e]=this[e]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{});i.store=new Fn(e,r),i.services.resourceStore=i.store}return i.translator=new zn(i.services,r),i.translator.on("*",(e,...t)=>{i.emit(e,...t)}),i.init(r,t),i.translator.options=r,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const tr=er.createInstance();tr.createInstance=er.createInstance,tr.createInstance,tr.dir,tr.init,tr.loadResources,tr.reloadResources,tr.use,tr.changeLanguage,tr.getFixedT,tr.t,tr.exists,tr.setDefaultNamespace,tr.hasLoadedNamespace,tr.loadNamespaces,tr.loadLanguages;var nr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};const rr={},ir=(e,t,n,r)=>{lr(n)&&rr[n]||(lr(n)&&(rr[n]=new Date),((e,t,n,r)=>{const i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);lr(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)})(e,t,n,r))},or=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},ar=(e,t,n)=>{e.loadNamespaces(t,or(e,n))},sr=(e,t,n,r)=>{if(lr(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return ar(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,or(e,r))},lr=e=>"string"==typeof e,cr=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ur={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},hr=e=>ur[e];let dr={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(cr,hr)};let fr;const pr={type:"3rdParty",init(e){((e={})=>{dr={...dr,...e}})(e.options.react),(e=>{fr=e})(e)}},gr=s();class mr{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const vr=(e,t,n,r)=>e.getFixedT(t,n,r),br=(e,t={})=>{const{i18n:n}=t,{i18n:r,defaultNS:i}=l(gr)||{},s=n||r||fr;if(s&&!s.reportNamespaces&&(s.reportNamespaces=new mr),!s){ir(s,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const e=(e,t)=>{return lr(t)?t:"object"==typeof(n=t)&&null!==n&&lr(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e;var n},t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}s.options.react?.wait&&ir(s,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const h={...dr,...s.options.react,...t},{useSuspense:d,keyPrefix:f}=h;let p=i||s.options?.defaultNS;p=lr(p)?[p]:p||["translation"],s.reportNamespaces.addUsedNamespaces?.(p);const g=(s.isInitialized||s.initializedStoreOnce)&&p.every(e=>((e,t,n={})=>t.languages&&t.languages.length?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):(ir(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0))(e,s,h)),m=((e,t,n,r)=>c(vr(e,t,n,r),[e,t,n,r]))(s,t.lng||null,"fallback"===h.nsMode?p:p[0],f),v=()=>m,b=()=>vr(s,t.lng||null,"fallback"===h.nsMode?p:p[0],f),[y,w]=o(v);let x=p.join();t.lng&&(x=`${t.lng}${x}`);const _=((e,t)=>{const n=u();return a(()=>{n.current=e},[e,t]),n.current})(x),C=u(!0);a(()=>{const{bindI18n:e,bindI18nStore:n}=h;C.current=!0,g||d||(t.lng?sr(s,t.lng,p,()=>{C.current&&w(b)}):ar(s,p,()=>{C.current&&w(b)})),g&&_&&_!==x&&C.current&&w(b);const r=()=>{C.current&&w(b)};return e&&s?.on(e,r),n&&s?.store.on(n,r),()=>{C.current=!1,s&&e&&e?.split(" ").forEach(e=>s.off(e,r)),n&&s&&n.split(" ").forEach(e=>s.store.off(e,r))}},[s,x]),a(()=>{C.current&&g&&w(v)},[s,f,g]);const S=[y,s,g];if(S.t=y,S.i18n=s,S.ready=g,g)return S;if(!g&&!d)return S;throw new Promise(e=>{t.lng?sr(s,t.lng,p,()=>e()):ar(s,p,()=>e())})};function yr({i18n:e,defaultNS:t,children:n}){const r=h(()=>({i18n:e,defaultNS:t}),[e,t]);return d(gr.Provider,{value:r},n)}var wr,xr,_r,Cr,Sr,Ar={};function kr(){if(xr)return wr;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,n(i.key),i)}}function n(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function r(e,t){return function(e,t){if(t.get)return t.get.call(e);return t.value}(e,o(e,t,"get"))}function i(e,t,n){return function(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}(e,o(e,t,"set"),n),n}function o(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function a(e,t,n){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,n)}xr=1;var s=function(t){if(!t)return[];Array.isArray(t)||(t=[t]);for(var n={},r=0;r<t.length;++r){var i,o=t[r];if(o&&"object"===e(o)&&(o=String(o)),"string"!=typeof o){var a="Locales should be strings, ".concat(JSON.stringify(o)," isn't.");throw new TypeError(a)}var s=o.split("-");if(!s.every(function(e){return/[a-z0-9]+/i.test(e)})){var l=JSON.stringify(o),c="The locale ".concat(l," is not a structurally valid BCP 47 language tag.");throw new RangeError(c)}var u=s[0].toLowerCase();s[0]=null!==(i={in:"id",iw:"he",ji:"yi"}[u])&&void 0!==i?i:u,n[s.join("-")]=!0}return Object.keys(n)};function l(t){switch(e(t)){case"number":return t;case"bigint":throw new TypeError("Cannot convert a BigInt value to a number");default:return Number(t)}}return wr=function(e,n,o,c){var u=function(e){do{if(n(e))return e;e=e.replace(/-?[^-]*$/,"")}while(e);return null},h=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,g=new WeakMap,m=function(){function m(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),a(this,h,{writable:!0,value:void 0}),a(this,d,{writable:!0,value:void 0}),a(this,f,{writable:!0,value:void 0}),a(this,p,{writable:!0,value:void 0}),a(this,g,{writable:!0,value:void 0}),i(this,h,function(t){for(var n=s(t),r=0;r<n.length;++r){var i=u(n[r]);if(i)return i}var o=(new e).resolvedOptions().locale;return u(o)}(t)),i(this,f,n(r(this,h))),i(this,d,c(r(this,h))),i(this,p,function(e){var t=Object.prototype.hasOwnProperty.call(e,"type")&&e.type;if(!t)return"cardinal";if("cardinal"===t||"ordinal"===t)return t;throw new RangeError("Not a valid plural type: "+JSON.stringify(t))}(o)),i(this,g,new e("en",o))}var v,b,y;return v=m,y=[{key:"supportedLocalesOf",value:function(e){return s(e).filter(u)}}],(b=[{key:"resolvedOptions",value:function(){var e=r(this,g).resolvedOptions(),t=e.minimumIntegerDigits,n=e.minimumFractionDigits,i=e.maximumFractionDigits,a=e.minimumSignificantDigits,s=e.maximumSignificantDigits,l=e.roundingPriority,c={locale:r(this,h),type:r(this,p),minimumIntegerDigits:t,minimumFractionDigits:n,maximumFractionDigits:i};return"number"==typeof a&&(c.minimumSignificantDigits=a,c.maximumSignificantDigits=s),c.pluralCategories=o(r(this,h),"ordinal"===r(this,p)).slice(0),c.roundingPriority=l||"auto",c}},{key:"select",value:function(e){if(!(this instanceof m))throw new TypeError("select() called on incompatible ".concat(this));if("number"!=typeof e&&(e=Number(e)),!isFinite(e))return"other";var t=r(this,g).format(Math.abs(e));return r(this,f).call(this,t,"ordinal"===r(this,p))}},{key:"selectRange",value:function(e,t){if(!(this instanceof m))throw new TypeError("selectRange() called on incompatible ".concat(this));if(void 0===e)throw new TypeError("start is undefined");if(void 0===t)throw new TypeError("end is undefined");var n=l(e),i=l(t);if(!isFinite(n))throw new RangeError("start must be finite");if(!isFinite(i))throw new RangeError("end must be finite");return r(this,d).call(this,this.select(n),this.select(i))}}])&&t(v.prototype,b),y&&t(v,y),Object.defineProperty(v,"prototype",{writable:!1}),m}();return"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(m.prototype,Symbol.toStringTag,{value:"Intl.PluralRules",writable:!1,configurable:!0}),Object.defineProperty(m,"prototype",{writable:!1}),m},wr}!function(){if(Sr)return Ar;Sr=1;var e=function(){if(Cr)return _r;function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function t(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}Cr=1;var n=e(kr());function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==nr||"undefined"!=typeof self&&self;var i={exports:{}};!function(e){var t=function(e,t){return t?"other":1==e?"one":"other"},n=function(e,t){return t?"other":0==e||1==e?"one":"other"},r=function(e,t){return t?"other":e>=0&&e<=1?"one":"other"},i=function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},o=function(e,t){return"other"},a=function(e,t){return t?"other":1==e?"one":2==e?"two":"other"};!function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),e.exports=n}(0,{af:t,ak:n,am:r,an:t,ar:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":0==e?"zero":1==e?"one":2==e?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},ars:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":0==e?"zero":1==e?"one":2==e?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},as:function(e,t){return t?1==e||5==e||7==e||8==e||9==e||10==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},asa:t,ast:i,az:function(e,t){var n=String(e).split(".")[0],r=n.slice(-1),i=n.slice(-2),o=n.slice(-3);return t?1==r||2==r||5==r||7==r||8==r||20==i||50==i||70==i||80==i?"one":3==r||4==r||100==o||200==o||300==o||400==o||500==o||600==o||700==o||800==o||900==o?"few":0==n||6==r||40==i||60==i||90==i?"many":"other":1==e?"one":"other"},bal:function(e,t){return 1==e?"one":"other"},be:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1),o=r&&n[0].slice(-2);return t?2!=i&&3!=i||12==o||13==o?"other":"few":1==i&&11!=o?"one":i>=2&&i<=4&&(o<12||o>14)?"few":r&&0==i||i>=5&&i<=9||o>=11&&o<=14?"many":"other"},bem:t,bez:t,bg:t,bho:n,bm:o,bn:function(e,t){return t?1==e||5==e||7==e||8==e||9==e||10==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},bo:o,br:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1),o=r&&n[0].slice(-2),a=r&&n[0].slice(-6);return t?"other":1==i&&11!=o&&71!=o&&91!=o?"one":2==i&&12!=o&&72!=o&&92!=o?"two":(3==i||4==i||9==i)&&(o<10||o>19)&&(o<70||o>79)&&(o<90||o>99)?"few":0!=e&&r&&0==a?"many":"other"},brx:t,bs:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==l&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},ca:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?1==e||3==e?"one":2==e?"two":4==e?"few":"other":1==e&&i?"one":0!=r&&0==o&&i?"many":"other"},ce:t,ceb:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=i.slice(-1);return t?"other":o&&(1==r||2==r||3==r)||o&&4!=a&&6!=a&&9!=a||!o&&4!=s&&6!=s&&9!=s?"one":"other"},cgg:t,chr:t,ckb:t,cs:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1];return t?"other":1==e&&i?"one":r>=2&&r<=4&&i?"few":i?"other":"many"},cy:function(e,t){return t?0==e||7==e||8==e||9==e?"zero":1==e?"one":2==e?"two":3==e||4==e?"few":5==e||6==e?"many":"other":0==e?"zero":1==e?"one":2==e?"two":3==e?"few":6==e?"many":"other"},da:function(e,t){var n=String(e).split("."),r=n[0],i=Number(n[0])==e;return t||1!=e&&(i||0!=r&&1!=r)?"other":"one"},de:i,doi:r,dsb:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-2),s=i.slice(-2);return t?"other":o&&1==a||1==s?"one":o&&2==a||2==s?"two":o&&(3==a||4==a)||3==s||4==s?"few":"other"},dv:t,dz:o,ee:t,el:t,en:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2);return t?1==o&&11!=a?"one":2==o&&12!=a?"two":3==o&&13!=a?"few":"other":1==e&&r?"one":"other"},eo:t,es:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?"other":1==e?"one":0!=r&&0==o&&i?"many":"other"},et:i,eu:t,fa:r,ff:function(e,t){return t?"other":e>=0&&e<2?"one":"other"},fi:i,fil:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=i.slice(-1);return t?1==e?"one":"other":o&&(1==r||2==r||3==r)||o&&4!=a&&6!=a&&9!=a||!o&&4!=s&&6!=s&&9!=s?"one":"other"},fo:t,fr:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?1==e?"one":"other":e>=0&&e<2?"one":0!=r&&0==o&&i?"many":"other"},fur:t,fy:i,ga:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?1==e?"one":"other":1==e?"one":2==e?"two":r&&e>=3&&e<=6?"few":r&&e>=7&&e<=10?"many":"other"},gd:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?1==e||11==e?"one":2==e||12==e?"two":3==e||13==e?"few":"other":1==e||11==e?"one":2==e||12==e?"two":r&&e>=3&&e<=10||r&&e>=13&&e<=19?"few":"other"},gl:i,gsw:t,gu:function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},guw:n,gv:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-1),a=r.slice(-2);return t?"other":i&&1==o?"one":i&&2==o?"two":!i||0!=a&&20!=a&&40!=a&&60!=a&&80!=a?i?"other":"many":"few"},ha:t,haw:t,he:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1];return t?"other":1==r&&i||0==r&&!i?"one":2==r&&i?"two":"other"},hi:function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},hnj:o,hr:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==l&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},hsb:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-2),s=i.slice(-2);return t?"other":o&&1==a||1==s?"one":o&&2==a||2==s?"two":o&&(3==a||4==a)||3==s||4==s?"few":"other"},hu:function(e,t){return t?1==e||5==e?"one":"other":1==e?"one":"other"},hy:function(e,t){return t?1==e?"one":"other":e>=0&&e<2?"one":"other"},ia:i,id:o,ig:o,ii:o,io:i,is:function(e,t){var n=String(e).split("."),r=n[0],i=(n[1]||"").replace(/0+$/,""),o=Number(n[0])==e,a=r.slice(-1),s=r.slice(-2);return t?"other":o&&1==a&&11!=s||i%10==1&&i%100!=11?"one":"other"},it:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&i?"one":0!=r&&0==o&&i?"many":"other"},iu:a,ja:o,jbo:o,jgo:t,jmc:t,jv:o,jw:o,ka:function(e,t){var n=String(e).split(".")[0],r=n.slice(-2);return t?1==n?"one":0==n||r>=2&&r<=20||40==r||60==r||80==r?"many":"other":1==e?"one":"other"},kab:function(e,t){return t?"other":e>=0&&e<2?"one":"other"},kaj:t,kcg:t,kde:o,kea:o,kk:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1);return t?6==i||9==i||r&&0==i&&0!=e?"many":"other":1==e?"one":"other"},kkj:t,kl:t,km:o,kn:r,ko:o,ks:t,ksb:t,ksh:function(e,t){return t?"other":0==e?"zero":1==e?"one":"other"},ku:t,kw:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-2),o=r&&n[0].slice(-3),a=r&&n[0].slice(-5),s=r&&n[0].slice(-6);return t?r&&e>=1&&e<=4||i>=1&&i<=4||i>=21&&i<=24||i>=41&&i<=44||i>=61&&i<=64||i>=81&&i<=84?"one":5==e||5==i?"many":"other":0==e?"zero":1==e?"one":2==i||22==i||42==i||62==i||82==i||r&&0==o&&(a>=1e3&&a<=2e4||4e4==a||6e4==a||8e4==a)||0!=e&&1e5==s?"two":3==i||23==i||43==i||63==i||83==i?"few":1==e||1!=i&&21!=i&&41!=i&&61!=i&&81!=i?"other":"many"},ky:t,lag:function(e,t){var n=String(e).split(".")[0];return t?"other":0==e?"zero":0!=n&&1!=n||0==e?"other":"one"},lb:t,lg:t,lij:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e;return t?11==e||8==e||i&&e>=80&&e<=89||i&&e>=800&&e<=899?"many":"other":1==e&&r?"one":"other"},lkt:o,ln:n,lo:function(e,t){return t&&1==e?"one":"other"},lt:function(e,t){var n=String(e).split("."),r=n[1]||"",i=Number(n[0])==e,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2);return t?"other":1==o&&(a<11||a>19)?"one":o>=2&&o<=9&&(a<11||a>19)?"few":0!=r?"many":"other"},lv:function(e,t){var n=String(e).split("."),r=n[1]||"",i=r.length,o=Number(n[0])==e,a=o&&n[0].slice(-1),s=o&&n[0].slice(-2),l=r.slice(-2),c=r.slice(-1);return t?"other":o&&0==a||s>=11&&s<=19||2==i&&l>=11&&l<=19?"zero":1==a&&11!=s||2==i&&1==c&&11!=l||2!=i&&1==c?"one":"other"},mas:t,mg:n,mgo:t,mk:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?1==a&&11!=s?"one":2==a&&12!=s?"two":7!=a&&8!=a||17==s||18==s?"other":"many":o&&1==a&&11!=s||1==l&&11!=c?"one":"other"},ml:t,mn:t,mo:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e&&n[0].slice(-2);return t?1==e?"one":"other":1==e&&r?"one":!r||0==e||1!=e&&i>=1&&i<=19?"few":"other"},mr:function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":"other":1==e?"one":"other"},ms:function(e,t){return t&&1==e?"one":"other"},mt:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":1==e?"one":2==e?"two":0==e||r>=3&&r<=10?"few":r>=11&&r<=19?"many":"other"},my:o,nah:t,naq:a,nb:t,nd:t,ne:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?r&&e>=1&&e<=4?"one":"other":1==e?"one":"other"},nl:i,nn:t,nnh:t,no:t,nqo:o,nr:t,nso:n,ny:t,nyn:t,om:t,or:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?1==e||5==e||r&&e>=7&&e<=9?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":1==e?"one":"other"},os:t,osa:o,pa:n,pap:t,pcm:r,pl:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-1),a=r.slice(-2);return t?"other":1==e&&i?"one":i&&o>=2&&o<=4&&(a<12||a>14)?"few":i&&1!=r&&(0==o||1==o)||i&&o>=5&&o<=9||i&&a>=12&&a<=14?"many":"other"},prg:function(e,t){var n=String(e).split("."),r=n[1]||"",i=r.length,o=Number(n[0])==e,a=o&&n[0].slice(-1),s=o&&n[0].slice(-2),l=r.slice(-2),c=r.slice(-1);return t?"other":o&&0==a||s>=11&&s<=19||2==i&&l>=11&&l<=19?"zero":1==a&&11!=s||2==i&&1==c&&11!=l||2!=i&&1==c?"one":"other"},ps:t,pt:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?"other":0==r||1==r?"one":0!=r&&0==o&&i?"many":"other"},pt_PT:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?"other":1==e&&i?"one":0!=r&&0==o&&i?"many":"other"},rm:t,ro:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e&&n[0].slice(-2);return t?1==e?"one":"other":1==e&&r?"one":!r||0==e||1!=e&&i>=1&&i<=19?"few":"other"},rof:t,ru:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-1),a=r.slice(-2);return t?"other":i&&1==o&&11!=a?"one":i&&o>=2&&o<=4&&(a<12||a>14)?"few":i&&0==o||i&&o>=5&&o<=9||i&&a>=11&&a<=14?"many":"other"},rwk:t,sah:o,saq:t,sat:a,sc:function(e,t){var n=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&n?"one":"other"},scn:function(e,t){var n=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&n?"one":"other"},sd:t,sdh:t,se:a,seh:t,ses:o,sg:o,sh:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==l&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},shi:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?"other":e>=0&&e<=1?"one":r&&e>=2&&e<=10?"few":"other"},si:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"";return t?"other":0==e||1==e||0==r&&1==i?"one":"other"},sk:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1];return t?"other":1==e&&i?"one":r>=2&&r<=4&&i?"few":i?"other":"many"},sl:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-2);return t?"other":i&&1==o?"one":i&&2==o?"two":i&&(3==o||4==o)||!i?"few":"other"},sma:a,smi:a,smj:a,smn:a,sms:a,sn:t,so:t,sq:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1),o=r&&n[0].slice(-2);return t?1==e?"one":4==i&&14!=o?"many":"other":1==e?"one":"other"},sr:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==l&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},ss:t,ssy:t,st:t,su:o,sv:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2);return t?1!=o&&2!=o||11==a||12==a?"other":"one":1==e&&r?"one":"other"},sw:i,syr:t,ta:t,te:t,teo:t,th:o,ti:n,tig:t,tk:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-1);return t?6==r||9==r||10==e?"few":"other":1==e?"one":"other"},tl:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=i.slice(-1);return t?1==e?"one":"other":o&&(1==r||2==r||3==r)||o&&4!=a&&6!=a&&9!=a||!o&&4!=s&&6!=s&&9!=s?"one":"other"},tn:t,to:o,tpi:o,tr:t,ts:t,tzm:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?"other":0==e||1==e||r&&e>=11&&e<=99?"one":"other"},ug:t,uk:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=Number(n[0])==e,a=o&&n[0].slice(-1),s=o&&n[0].slice(-2),l=r.slice(-1),c=r.slice(-2);return t?3==a&&13!=s?"few":"other":i&&1==l&&11!=c?"one":i&&l>=2&&l<=4&&(c<12||c>14)?"few":i&&0==l||i&&l>=5&&l<=9||i&&c>=11&&c<=14?"many":"other"},und:o,ur:i,uz:t,ve:t,vec:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&i?"one":0!=r&&0==o&&i?"many":"other"},vi:function(e,t){return t&&1==e?"one":"other"},vo:t,vun:t,wa:n,wae:t,wo:o,xh:t,xog:t,yi:i,yo:o,yue:o,zh:o,zu:r})}(i);var o=r(i.exports),a=t({__proto__:null,default:o},[i.exports]),s={exports:{}};!function(e){var t="zero",n="one",r="two",i="few",o="many",a="other",s={cardinal:[n,a],ordinal:[a]},l={cardinal:[n,a],ordinal:[n,a]},c={cardinal:[a],ordinal:[a]},u={cardinal:[n,r,a],ordinal:[a]};!function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),e.exports=n}(0,{af:s,ak:s,am:s,an:s,ar:{cardinal:[t,n,r,i,o,a],ordinal:[a]},ars:{cardinal:[t,n,r,i,o,a],ordinal:[a]},as:{cardinal:[n,a],ordinal:[n,r,i,o,a]},asa:s,ast:s,az:{cardinal:[n,a],ordinal:[n,i,o,a]},bal:l,be:{cardinal:[n,i,o,a],ordinal:[i,a]},bem:s,bez:s,bg:s,bho:s,bm:c,bn:{cardinal:[n,a],ordinal:[n,r,i,o,a]},bo:c,br:{cardinal:[n,r,i,o,a],ordinal:[a]},brx:s,bs:{cardinal:[n,i,a],ordinal:[a]},ca:{cardinal:[n,o,a],ordinal:[n,r,i,a]},ce:s,ceb:s,cgg:s,chr:s,ckb:s,cs:{cardinal:[n,i,o,a],ordinal:[a]},cy:{cardinal:[t,n,r,i,o,a],ordinal:[t,n,r,i,o,a]},da:s,de:s,doi:s,dsb:{cardinal:[n,r,i,a],ordinal:[a]},dv:s,dz:c,ee:s,el:s,en:{cardinal:[n,a],ordinal:[n,r,i,a]},eo:s,es:{cardinal:[n,o,a],ordinal:[a]},et:s,eu:s,fa:s,ff:s,fi:s,fil:l,fo:s,fr:{cardinal:[n,o,a],ordinal:[n,a]},fur:s,fy:s,ga:{cardinal:[n,r,i,o,a],ordinal:[n,a]},gd:{cardinal:[n,r,i,a],ordinal:[n,r,i,a]},gl:s,gsw:s,gu:{cardinal:[n,a],ordinal:[n,r,i,o,a]},guw:s,gv:{cardinal:[n,r,i,o,a],ordinal:[a]},ha:s,haw:s,he:u,hi:{cardinal:[n,a],ordinal:[n,r,i,o,a]},hnj:c,hr:{cardinal:[n,i,a],ordinal:[a]},hsb:{cardinal:[n,r,i,a],ordinal:[a]},hu:l,hy:l,ia:s,id:c,ig:c,ii:c,io:s,is:s,it:{cardinal:[n,o,a],ordinal:[o,a]},iu:u,ja:c,jbo:c,jgo:s,jmc:s,jv:c,jw:c,ka:{cardinal:[n,a],ordinal:[n,o,a]},kab:s,kaj:s,kcg:s,kde:c,kea:c,kk:{cardinal:[n,a],ordinal:[o,a]},kkj:s,kl:s,km:c,kn:s,ko:c,ks:s,ksb:s,ksh:{cardinal:[t,n,a],ordinal:[a]},ku:s,kw:{cardinal:[t,n,r,i,o,a],ordinal:[n,o,a]},ky:s,lag:{cardinal:[t,n,a],ordinal:[a]},lb:s,lg:s,lij:{cardinal:[n,a],ordinal:[o,a]},lkt:c,ln:s,lo:{cardinal:[a],ordinal:[n,a]},lt:{cardinal:[n,i,o,a],ordinal:[a]},lv:{cardinal:[t,n,a],ordinal:[a]},mas:s,mg:s,mgo:s,mk:{cardinal:[n,a],ordinal:[n,r,o,a]},ml:s,mn:s,mo:{cardinal:[n,i,a],ordinal:[n,a]},mr:{cardinal:[n,a],ordinal:[n,r,i,a]},ms:{cardinal:[a],ordinal:[n,a]},mt:{cardinal:[n,r,i,o,a],ordinal:[a]},my:c,nah:s,naq:u,nb:s,nd:s,ne:l,nl:s,nn:s,nnh:s,no:s,nqo:c,nr:s,nso:s,ny:s,nyn:s,om:s,or:{cardinal:[n,a],ordinal:[n,r,i,o,a]},os:s,osa:c,pa:s,pap:s,pcm:s,pl:{cardinal:[n,i,o,a],ordinal:[a]},prg:{cardinal:[t,n,a],ordinal:[a]},ps:s,pt:{cardinal:[n,o,a],ordinal:[a]},pt_PT:{cardinal:[n,o,a],ordinal:[a]},rm:s,ro:{cardinal:[n,i,a],ordinal:[n,a]},rof:s,ru:{cardinal:[n,i,o,a],ordinal:[a]},rwk:s,sah:c,saq:s,sat:u,sc:{cardinal:[n,a],ordinal:[o,a]},scn:{cardinal:[n,a],ordinal:[o,a]},sd:s,sdh:s,se:u,seh:s,ses:c,sg:c,sh:{cardinal:[n,i,a],ordinal:[a]},shi:{cardinal:[n,i,a],ordinal:[a]},si:s,sk:{cardinal:[n,i,o,a],ordinal:[a]},sl:{cardinal:[n,r,i,a],ordinal:[a]},sma:u,smi:u,smj:u,smn:u,sms:u,sn:s,so:s,sq:{cardinal:[n,a],ordinal:[n,o,a]},sr:{cardinal:[n,i,a],ordinal:[a]},ss:s,ssy:s,st:s,su:c,sv:l,sw:s,syr:s,ta:s,te:s,teo:s,th:c,ti:s,tig:s,tk:{cardinal:[n,a],ordinal:[i,a]},tl:l,tn:s,to:c,tpi:c,tr:s,ts:s,tzm:s,ug:s,uk:{cardinal:[n,i,o,a],ordinal:[i,a]},und:c,ur:s,uz:s,ve:s,vec:{cardinal:[n,o,a],ordinal:[o,a]},vi:{cardinal:[a],ordinal:[n,a]},vo:s,vun:s,wa:s,wae:s,wo:c,xh:s,xog:s,yi:s,yo:c,yue:c,zh:c,zu:s})}(s);var l=r(s.exports),c=t({__proto__:null,default:l},[s.exports]),u={exports:{}};!function(e){var t,n=function(e,t){return"other"},r=function(e,t){return"other"===e&&"one"===t?"one":"other"},i=function(e,t){return t||"other"};t={af:n,ak:r,am:i,an:n,ar:function(e,t){return"few"===t?"few":"many"===t?"many":"zero"===e&&"one"===t||"zero"===e&&"two"===t?"zero":"other"},as:i,az:i,be:i,bg:n,bn:i,bs:i,ca:n,cs:i,cy:i,da:i,de:i,el:i,en:n,es:n,et:n,eu:n,fa:r,fi:n,fil:i,fr:i,ga:i,gl:i,gsw:i,gu:i,he:n,hi:i,hr:i,hu:i,hy:i,ia:n,id:n,io:n,is:i,it:i,ja:n,ka:function(e,t){return e||"other"},kk:i,km:n,kn:i,ko:n,ky:i,lij:i,lo:n,lt:i,lv:function(e,t){return"one"===t?"one":"other"},mk:n,ml:i,mn:i,mr:i,ms:n,my:n,nb:n,ne:i,nl:i,no:n,or:r,pa:i,pcm:n,pl:i,ps:i,pt:i,ro:function(e,t){return"few"===t||"one"===t?"few":"other"},ru:i,sc:i,scn:i,sd:r,si:function(e,t){return"one"===e&&"one"===t?"one":"other"},sk:i,sl:function(e,t){return"few"===t||"one"===t?"few":"two"===t?"two":"other"},sq:i,sr:i,sv:n,sw:i,ta:i,te:i,th:n,tk:i,tr:i,ug:i,uk:i,ur:n,uz:i,vi:n,yue:n,zh:n,zu:i},Object.defineProperty(t,"__esModule",{value:!0}),e.exports=t}(u);var h=r(u.exports),d=o||a,f=l||c,p=h||t({__proto__:null,default:h},[u.exports]),g=function(e){return"pt-PT"===e?"pt_PT":e},m=n.default(Intl.NumberFormat,function(e){return d[g(e)]},function(e,t){return f[g(e)][t?"ordinal":"cardinal"]},function(e){return p[g(e)]});return _r=m}();function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);if("undefined"==typeof Intl)void 0!==nr?nr.Intl={PluralRules:n.default}:"undefined"!=typeof window?window.Intl={PluralRules:n.default}:Ar.Intl={PluralRules:n.default},n.default.polyfill=!0;else if(Intl.PluralRules&&Intl.PluralRules.prototype.selectRange){var r=["en","es","ru","zh"];Intl.PluralRules.supportedLocalesOf(r).length<r.length&&(Intl.PluralRules=n.default,n.default.polyfill=!0)}else Intl.PluralRules=n.default,n.default.polyfill=!0}();const Tr={en:{translation:{"File Manager":"File Manager","Selected files:":"Selected files:",Folder:"Folder",Folders:"Folders",Files:"Files",File:"File","Select the destination folder":"Select the destination folder","Filter by type":"Filter by type","All types":"All types","File name":"File name",Size:"Size",Date:"Date",Actions:"Actions",Delete:"Delete",Move:"Move",Copy:"Copy","Add folder":"Add folder","Add file":"Add file","Add file by URL":"Add file by URL","Please select an image file":"Please select an image file","File deleted":"File deleted","Error when deleting a file":"Error when deleting a file","Folder deleted":"Folder deleted","Error when deleting a folder":"Error when deleting a folder","Delete folder":"Delete folder","Are you sure you want to delete this folder? This action will also delete all files and subfolders.":"Are you sure you want to delete this folder? This action will also delete all files and subfolders.","File moved":"File moved","Error when moving a file":"Error when moving a file","has been successfully uploaded":"has been successfully uploaded","File uploaded successfully":"File uploaded successfully","Error when uploading a file":"Error when uploading a file","successfully uploaded":"successfully uploaded","Error when downloading a file by URL":"Error when downloading a file by URL","Error loading files":"Error loading files","File Manager not configured":"File Manager not configured","Type to search...":"Type to search...","Failed to create folder":"Failed to create folder",Cancel:"Cancel",Submit:"Submit",months:{january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},files:"files",Library:"Library","No available folders":"No available folders","My files":"My files",GIF:"GIF","Stock images":"Stock images",AI:"AI","Search GIFs":"Search GIFs","That`s all we could find.":"That`s all we could find.","Search image":"Search image",All:"All",Landscape:"Landscape",Portrait:"Portrait",Squarish:"Squarish",Black:"Black","Black and White":"Black and White",White:"White",Orange:"Orange",Red:"Red",Purple:"Purple",Magenta:"Magenta",Green:"Green",Teal:"Teal",Blue:"Blue","Photo by":"Photo by",on:"on",selected:"selected",Deselected:"Deselected",Rename:"Rename","Rename file":"Rename file {{currentFileName}}","Selected files":"Selected files: {{count}}",Edit:"Edit","Move to folder":"Move to folder","New folder":"New folder","Image search...":"Image search...","By name":"By name","By size":"By size","By date":"By date",List:"List",Grid:"Grid",Main:"Main","total pages":"Total {{total}} items",Name:"Name",Untitled:"Untitled",Dimensions:"Dimensions",error:"error",created:"created","API-endpoint for file upload is not configured":"API-endpoint for file upload is not configured","The URL must point to an image":"The URL must point to an image","Image upload...":"Image upload...",Unknown:"Unknown","Error downloading file by URL":"Error downloading file by URL","File not found":"File not found","File renamed to":"File renamed to {{newFileName}}","Failed to rename the file":"Failed to rename the file","Folder renamed to":"Folder renamed to","Rename folder":"Rename folder","New folder name":"New folder name","Enter a new folder name":"Enter a new folder name","Please drag and drop image files only":"Please drag and drop image files only","Upload image by URL":"Upload image by URL","Upload image":"Upload image","Creating a new folder":"Creating a new folder",Create:"Create","Folder name":"Folder name","Enter the name of the folder":"Enter the name of the folder","A folder will be created inside:":"A folder will be created inside:","selected folder":"selected folder","The folder will be created in the root directory":"The folder will be created in the root directory",Download:"Download","image URL":"image URL","Enter the URL of the image":"Enter the URL of the image","Supported formats: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP":"Supported formats: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP","New file name":"New file name","Enter a new file name":"Enter a new file name","Copy to folder":"Copy to folder",date_of_add:"Added {{date}}",file_add_complete:"File {{fileName}} uploaded successfully",success_download_one:"Successfully uploaded {{successCount}} of {{count}} file",success_download_other:"Successfully uploaded {{successCount}} of {{count}} files",error_download_one:"Failed to upload {{failCount}} of {{count}} file",error_download_other:"Failed to upload {{failCount}} of {{count}} files","No data to display":"No data to display","Drag files to upload":"Drag files to upload","Drop files here to upload":"Drop files here to upload","Newest first":"Newest first","Oldest first":"Oldest first","Largest first":"Largest first","Smallest first":"Smallest first","A-Z":"A-Z","Z-A":"Z-A","By type":"By type","Evaluating the task":"Evaluating the task","Something went wrong, please try again":"Something went wrong, please try again","Sort by":"Sort by","preview text":"The image preview is trying to load ...","Use this variant":"Use this variant","Confirm deletion":"Confirm deletion","Are you sure you want to delete the selected items?":"Are you sure you want to delete the selected items?",item:"item",items:"items"}},ru:{translation:{Files:"Файлы",selected:"выбрано",Deselected:"Отменить выбор",Rename:"Переименовать","Rename file":"Переименовать файл {{currentFileName}}","Select the destination folder":"Выберите папку назначения","Selected files:":"Выбрано файлов:","Selected files":"Выбрано файлов: {{count}}",Copy:"Копировать",Edit:"Редактировать","Move to folder":"Переместить в папку",Delete:"Удалить","New folder":"Новая папка","Image search...":"Поиск изображений...","By name":"По имени","By size":"По размеру","By date":"По дате",List:"Список",Grid:"Плитки",Main:"Главная",Folders:"Папки","total pages":"Всего {{total}} элементов",Name:"Имя",Untitled:"Без названия",Size:"Объём",Dimensions:"Размер",Date:"Дата",error:"ошибка",Folder:"Папка",created:"создана","Failed to create folder":"Не удалось создать папку","File deleted":"Файл удален","Error when deleting a file":"Ошибка при удалении файла","Folder deleted":"Папка удалена","Error when deleting a folder":"Ошибка при удалении папки","Delete folder":"Удалить папку","Are you sure you want to delete this folder? This action will also delete all files and subfolders.":"Вы уверены, что хотите удалить эту папку? Это действие также удалит все файлы и подпапки.","API-endpoint for file upload is not configured":"API-endpoint для загрузки файлов не настроен","Please select an image file":"Пожалуйста, выберите файл изображения",File:"Файл","has been successfully uploaded":"успешно загружен","The URL must point to an image":"URL должен указывать на изображение","Image upload...":"Загрузка изображения...",Unknown:"Неизвестно","Error downloading file by URL":"Ошибка загрузки файла по URL","successfully uploaded":"успешно загружен","Error when downloading a file by URL":"Ошибка при загрузке файла по URL","File not found":"Файл не найден","File renamed to":"Файл переименован на {{newFileName}}","Failed to rename the file":"Не удалось переименовать файл","Folder renamed to":"Папка переименована на","Rename folder":"Переименовать папку","New folder name":"Новое название папки","Enter a new folder name":"Введите новое название папки","Please drag and drop image files only":"Пожалуйста, перетащите только файлы изображений","Upload image by URL":"Загрузить изображение по URL","Upload image":"Загрузить изображение","Creating a new folder":"Создание новой папки",Create:"Создать",Cancel:"Отмена","Folder name":"Название папки","Enter the name of the folder":"Введите название папки","A folder will be created inside:":"Папка будет создана внутри:","selected folder":"выбранной папки","The folder will be created in the root directory":"Папка будет создана в корневом каталоге",Download:"Загрузить","image URL":"URL изображения","Enter the URL of the image":"Введите URL изображения","Supported formats: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP":"Поддерживаемые форматы: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP","New file name":"Новое имя файла","Enter a new file name":"Введите новое имя файла","Copy to folder":"Копировать в папку",date_of_add:"Добавлено {{date}}",file_add_complete:"Файл {{fileName}} успешно загружен",success_download_one:"Успешно загружено {{successCount}} из {{count}} файла",success_download_other:"Успешно загружено {{successCount}} из {{count}} файлов",error_download_one:"Не удалось загрузить {{failCount}} из {{count}} файла",error_download_other:"Не удалось загрузить {{failCount}} из {{count}} файлов",months:{january:"января",february:"февраля",march:"марта",april:"апреля",may:"мая",june:"июня",july:"июля",august:"августа",september:"сентября",october:"октября",november:"ноября",december:"декабря"},files:"файлов",Library:"Библиотека","No available folders":"Нет доступных папок","My files":"Мои файлы",GIF:"GIF","Stock images":"Стоковые изображения",AI:"AI","Search GIFs":"Поиск GIF","That`s all we could find.":"Это все, что мы смогли найти.","Search image":"Поиск изображений",All:"Все",Landscape:"Горизонтальные",Portrait:"Вертикальные",Squarish:"Квадратные",Black:"Черный","Black and White":"Черно-белый",White:"Белый",Orange:"Оранжевый",Red:"Красный",Purple:"Фиолетовый",Magenta:"Пурпурный",Green:"Зеленый",Teal:"Бирюзовый",Blue:"Синий","Photo by":"Фото",on:"на","File Manager":"Файловый менеджер","File Manager not configured":"Файловый менеджер не настроен","Filter by type":"Фильтр по типу","All types":"Все типы","File name":"Имя файла",Actions:"Действия","Add file":"Добавить файл","Add folder":"Добавить папку","Add file by URL":"Добавить файл по URL","File moved":"Файл перемещён","Error when moving a file":"Ошибка при перемещении файла","File uploaded successfully":"Файл успешно загружен","Type to search...":"Введите для поиска...",Submit:"Отправить","No data to display":"Нет данных для отображения","Drag files to upload":"Перетащите файлы для загрузки","Drop files here to upload":"Отпустите файлы здесь, чтобы загрузить их","Newest first":"Вначале новые","Oldest first":"Вначале старые","Largest first":"Вначале большие","Smallest first":"Вначале маленькие","A-Z":"По алфавиту А-Я","Z-A":"По алфавиту Я-А","By type":"По типу","Evaluating the task":"Оценка задания","Something went wrong, please try again":"Что-то пошло не так, пожалуйста, попробуйте еще раз","Sort by":"Сортировать по","preview text":"Изображение загружается ...","Use this variant":"Использовать этот вариант","Confirm deletion":"Подтвердить удаление","Are you sure you want to delete the selected items?":"Вы уверены, что хотите удалить выбранные элементы?",item:"файл",items:"файлов"}}};tr.use(pr).init({resources:Tr,debug:!0,lng:"en",fallbackLng:"en",interpolation:{escapeValue:!1}});var Ir,Or={exports:{}},Er=Or.exports;
2
2
  /**
3
3
  * @license
4
4
  * Lodash <https://lodash.com/>
@@ -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: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};
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({parentId:t.folderId});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.getFileData){const t=await y.getFileData(e);if(t)return t;throw new Error("Не удалось загрузить файл")}{const t=await fetch(`/api/files/${e.id}/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,t;const{state:n,actions:i,options:o}=Hr(),{t:a}=br(),{message:s}=O.useApp(),{folders:l,selectedFolder:u,form:h,loading:d,isModalVisible:f}=n,{setFolders:p,setLoading:g,setIsModalVisible:m}=i,{dataProviders:v,config:b}=o,y=c(async()=>{console.log("Запрос папок..."),null==g||g(!0);try{let e=[];if(!(null==v?void 0:v.getFolders))return void console.error("DataProvider для папок не определен");{const t=!("lazy"===(null==b?void 0:b.folderTreeLoading));e=await v.getFolders({parentId:null,deep:t})}console.log("Полученные папки:",e);const t=Array.isArray(e)?e:[];null==p||p(t);const n=t.filter(e=>e.id===e.parentId);n.length>0&&console.warn("Обнаружены папки с циклическими зависимостями:",n)}catch(e){console.error("Ошибка при загрузке папок:",e),s.error("Ошибка при загрузке папок")}finally{null==g||g(!1)}},[null==v?void 0:v.getFolders,p,g,s,null==b?void 0:b.folderTreeLoading]),w=c(async e=>{try{if(!(null==v?void 0:v.getFolders))return[];const t=await v.getFolders({parentId:e,deep:!1}),n=Array.isArray(l)?l:[],r=new Map(n.map(e=>[e.id,e]));return t.forEach(e=>r.set(e.id,e)),null==p||p(Array.from(r.values())),t}catch(e){return console.error("Ошибка при загрузке дочерних папок:",e),[]}},[null==v?void 0:v.getFolders,l,p]),x=c(()=>{h.setFieldsValue({folderName:"Новая папка"}),null==m||m(!0)},[h,m]),_=c(e=>{const t=[...(Array.isArray(l)?l:[]).filter(t=>t.id!==e.id),e];if(null==p||p(t),console.log("📂 Обновлен список папок, новая папка:",e),i.setSelectedFolder&&(i.setSelectedFolder(e.id),console.log("🎯 Выбрана созданная папка как активная:",e.id)),i.setPathHistory){const t=[...n.pathHistory||[],{id:e.id,name:e.name}];i.setPathHistory(t),console.log("🧭 Обновлен путь навигации:",t)}},[l,p,i,n.pathHistory]),C=c(async e=>{try{if(null==v?void 0:v.getFolders){const t=await v.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==v?void 0:v.getFolders]),S=c(async()=>{try{const e=(await h.validateFields()).folderName.trim();if(!e)return void s.error("Имя папки не может быть пустым");const t=u&&"folders"!==u?u:null;let n;if(console.log("🆕 Создание новой папки:",{folderName:e,parentId:t,selectedFolder:u}),!(null==v?void 0:v.createFolder))return void s.error("DataProvider для создания папок не настроен");n=await v.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),_(n),await y(),await new Promise(e=>setTimeout(e,200));await C(n.id)||console.warn("⚠️ Не удалось подтвердить создание папки на сервере, но продолжаем..."),s.success(`Папка "${e}" создана и выбрана`),null==m||m(!1)}catch(e){console.error("❌ Ошибка при создании папки:",e),s.error(e instanceof Error?e.message:a("Failed to create folder"))}},[h,u,null==v?void 0:v.createFolder,_,m,a,y,C,s]),A=c(()=>{null==m||m(!1)},[m]),k=c((e,t=new Set)=>{const n=Array.isArray(l)?l:[];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?k(o,i):void 0}})},[l]),T=c(()=>{const e=Array.isArray(l)?l:[],t={key:"folders",label:a("Folders"),children:[]},n=e.filter(e=>null===e.parentId||!e.parentId);return t.children=k(n),[t]},[l,a,k]),I=c(async(e,t)=>{var n,r;try{if(!t||""===t.trim())return void s.error("Имя папки не может быть пустым");if(!(!1!==(null===(n=null==b?void 0:b.features)||void 0===n?void 0:n.enableRenameFolder)))return void s.error("Переименование папок отключено конфигурацией");if(!(null===(r=o.dataProviders)||void 0===r?void 0:r.renameFolder))throw new Error("renameFolder не реализован в dataProviders");const a=await o.dataProviders.renameFolder(e,t.trim());if(!(null==a?void 0:a.id))return void s.error("Некорректный ответ при переименовании папки");await y(),e!==a.id&&i.setSelectedFolder&&i.setSelectedFolder(a.id),s.success(`Папка переименована на "${t.trim()}"`)}catch(e){console.error("Ошибка при переименовании папки:",e),s.error(e instanceof Error?e.message:"Ошибка при переименовании папки")}},[y,s,null===(e=o.dataProviders)||void 0===e?void 0:e.renameFolder,null===(t=null==b?void 0:b.features)||void 0===t?void 0:t.enableRenameFolder]);return{state:{folders:l,isCreatingFolder:f,loading:d},actions:{fetchFolders:y,fetchChildFolders:w,handleCreateFolder:x,handleModalOk:S,handleModalCancel:A,generateMenuItems:T,renameFolder:I}}},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.id),t=e.id,qr.has(t))return console.log("Изображение найдено в кеше:",e.id),(e=>qr.get(e))(e.id);var t;if(!e||!Jr(e))return console.warn("Файл не является изображением:",null==e?void 0:e.name,null==e?void 0:e.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.id,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).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).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,config:S}=r,A=c(e=>{var t,n;const r=null==s?void 0:s.find(t=>t.id===e);if((null==r?void 0:r.isFolder)||e.startsWith("folder_")){if(!1===(null===(t=null==S?void 0:S.features)||void 0===t?void 0:t.enableRenameFolder))return void M.error(i("Folder rename is disabled by config"));if(!(null==C?void 0:C.renameFolder))throw new Error("renameFolder не реализован в dataProviders")}else{if(!1===(null===(n=null==S?void 0:S.features)||void 0===n?void 0:n.enableRenameFile))return void M.error(i("File rename is disabled by config"));if(!(null==C?void 0:C.renameFile))throw new Error("renameFile не реализован в dataProviders")}null==m||m(e),null==v||v(!0),r&&d&&d.setFieldsValue({newFileName:r.name})},[m,v,s,d,null==S?void 0:S.features,C,i]),k=c(()=>{null==v||v(!1),null==m||m(null),null==d||d.resetFields()},[v,m,d]),T=c(async()=>{var t,r;if(h&&d)try{const o=await d.validateFields();if(!(null==o?void 0:o.newFileName))return;const c=null==s?void 0:s.find(e=>e.id===h);if((null==c?void 0:c.isFolder)||h.startsWith("folder_")){if(!1===(null===(t=null==S?void 0:S.features)||void 0===t?void 0:t.enableRenameFolder))return void M.error(i("Folder rename is disabled by config"));if(!(null==C?void 0:C.renameFolder))throw new Error("renameFolder не реализован в dataProviders");{const e=await C.renameFolder(h,o.newFileName.trim());if(!(null==e?void 0:e.id))return void M.error("Некорректный ответ при переименовании папки");M.success(`${i("Folder renamed to")} ${o.newFileName}`),await a(),h!==e.id&&n.setSelectedFolder&&n.setSelectedFolder(e.id)}}else{if(!1===(null===(r=null==S?void 0:S.features)||void 0===r?void 0:r.enableRenameFile))return void M.error(i("File rename is disabled by config"));if(!(null==C?void 0:C.renameFile))throw new Error("renameFile не реализован в dataProviders");await C.renameFile(h,o.newFileName),M.success(`${i("File renamed to")} ${o.newFileName}`)}k(),await e({folderId:l||""})}catch(e){console.error("Ошибка при переименовании:",e),M.error(e instanceof Error?e.message:"Ошибка при переименовании")}},[h,d,s,C,_,k,e,l,i]),I=c(()=>{null==b||b(!0)},[b]),O=c(()=>{null==b||b(!1),null==p||p.resetFields()},[b,p]),E=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} объектов`),O(),null==w||w(new Set),c&&await a(),await e({folderId:l||""})}catch(e){console.error("Ошибка при перемещении:",e),M.error("Ошибка при перемещении")}},[u,p,s,C,_,O,w,e,l]),P=c(()=>{null==y||y(!0)},[y]),F=c(()=>{null==y||y(!1),null==g||g.resetFields()},[y,g]),j=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} объектов`),F(),null==w||w(new Set),c&&await a(),await e({folderId:l||""})}catch(e){console.error("Ошибка при копировании:",e),M.error("Ошибка при копировании")}},[u,g,s,_,F,w,e,l]),R=c(()=>{null==x||x(!0)},[x]),D=c(()=>{null==x||x(!1)},[x]),L=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:A,handleRenameCancel:k,handleRenameOk:T,showMoveModal:I,handleMoveCancel:O,handleMoveOk:E,showCopyModal:P,handleCopyCancel:F,handleCopyOk:j,showDeleteConfirm:R,handleDeleteConfirmCancel:D,handleDeleteConfirmOk:L}}})(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",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,F]=o(null),H=u(0),W=`${l}-${h}`,Y=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]),$=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 Y(e.id)});await Promise.all(n),E(t)},[r,Y]);a(()=>{$()},[$]);const G=c(e=>{e.preventDefault(),e.stopPropagation(),H.current+=1,e.dataTransfer.items&&e.dataTransfer.items.length>0&&I(!0)},[]),X=c(e=>{e.preventDefault(),e.stopPropagation(),H.current-=1,0===H.current&&I(!1)},[]),K=c(e=>{e.preventDefault(),e.stopPropagation()},[]),q=c(e=>{if(e.preventDefault(),e.stopPropagation(),I(!1),H.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]),Z=(e=()=>{})=>{if(P)return;const t=setTimeout(()=>{e(),F(null)},300);F(t)},J=e=>{P&&(clearTimeout(P),F(null)),e()},Q=[{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=x(1===r?"item":"items");return t("div",{className: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?x("Folder"):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:G,onDragLeave:X,onDragOver:K,onDrop:q,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:x("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:W,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:Q,rowKey:"id",pagination:!1,loading:g,onRow:e=>({onClick:t=>{const n=t.target;Z(()=>{t.stopPropagation(),t.preventDefault(),n.closest(".ant-image")||n.closest(".ant-image-preview-wrap")||b(e.id)})},onDoubleClick:t=>{J(()=>{t.stopPropagation(),t.preventDefault();const n=t.target;e.isFolder?m(e):n.closest(".ant-image")||n.closest(".ant-image-preview-wrap")||!C.onEditorOk||(console.log("onEditorOk"),C.onEditorOk(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&&Z(()=>{b(r.id)})},onDoubleClick:e=>{e.stopPropagation(),J(()=>{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(),e.preventDefault(),Z(()=>b(r.id))},onDoubleClick:e=>{e.stopPropagation(),J(()=>{r.isFolder&&m(r)})},children:[t("div",{className:oi.gridCardContent,onDoubleClick:e=>{e.stopPropagation(),e.preventDefault(),J(()=>{C.onEditorOk&&C.onEditorOk(r)})},onClick:()=>Z,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} ${x(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=P.useWatch("folderName",a),Y=!U||0===String(U).trim().length,$=Array.isArray(b)?b:[],G=v?null===(N=$.find(e=>e.id===v))||void 0===N?void 0:N.name:"",X=Array.isArray(l)?l:[],K=I?null===(z=X.find(e=>e.id===I))||void 0===z?void 0:z.name:"",q=v?$.find(e=>e.id===v):null,Z=(null==q?void 0:q.isFolder)||(null==v?void 0:v.startsWith("folder_")),J=()=>{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"),okButtonProps:{disabled:Y},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")},{validator:(e,t)=>"string"==typeof t&&0===t.trim().length?Promise.reject(new Error(V("Enter the name of the folder"))):Promise.resolve()}],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=X.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:Z?`${V("Rename folder")} ${G}`:V("Rename file",{currentFileName:G})}),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(Z?"New folder name":"New file name")}),rules:[{required:!0,message:V(Z?"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:J(),selectable:!0,onSelect:e=>{e.length>0&&_.setFieldsValue({targetFolder:e[0]})}})})]})}),e(H,{title:t("div",{className:"modal-title",children:[V("Rename folder")," ",K]}),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:J(),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=>{var t;const{state:n,actions:r,options:i}=Hr(),{t:o}=br(),{folders:a,folderToRename:s,renameFolderForm:l,isRenameFolderModalVisible:u}=n,{setFolderToRename:h,setIsRenameFolderModalVisible:d}=r,{apiEndpoints:f,dataProviders:p,config:g}=i,m=c(e=>{null==h||h(e),null==d||d(!0);const t=null==a?void 0:a.find(t=>t.id===e);t&&l&&l.setFieldsValue({newFolderName:t.name})},[h,d,a,l]),v=c(()=>{null==d||d(!1),null==h||h(null),null==l||l.resetFields()},[d,h,l]),b=c(async()=>{var t;if(s&&l)try{const n=await l.validateFields();if(!(null==n?void 0:n.newFolderName))return;if(!(!1!==(null===(t=null==g?void 0:g.features)||void 0===t?void 0:t.enableRenameFolder)))return void M.error(o("Folder rename is disabled by config"));if(!(null==p?void 0:p.renameFolder))throw new Error("renameFolder не реализован в dataProviders");const i=await p.renameFolder(s,n.newFolderName.trim());if(!(null==i?void 0:i.id))return void M.error("Некорректный ответ при переименовании папки");M.success(`${o("Folder renamed to")} ${n.newFolderName}`),v(),await e(),s!==i.id&&r.setSelectedFolder&&r.setSelectedFolder(i.id)}catch(e){console.error("Ошибка при переименовании папки:",e),M.error("Ошибка при переименовании папки")}},[s,l,f,v,e,o,null===(t=null==g?void 0:g.features)||void 0===t?void 0:t.enableRenameFolder]);return{state:{isRenamingFolder:u||!1,folderToRename:s},actions:{showRenameFolderModal:m,handleRenameFolderCancel:v,handleRenameFolderOk:b}}},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,fetchChildFolders:u,handleAddFile:d,setIsUrlModalVisible:f,handleCreateFolder:p,activeLibraryItem:m,setActiveLibraryItem:v},b)=>{const y=h(()=>Array.isArray(s)?s:[],[s]),{t:w}=br(),[x,_]=o({}),{options:C}=Hr(),{dataProviders:S,config:A}=C,k=ci(l),{FolderIcon:T,AddFolderIcon:I,UploadByUrlIcon:O,ExpandArrowIcon:E,CollapseArrowIcon:P}=ii(),M=c(e=>{const t=["folders"],n=e=>{e.forEach(e=>{t.push(e.key),e.children&&n(e.children)})};return n(e),t},[]),[F,j]=o(()=>{if(!0===(null==A?void 0:A.expandAllFoldersOnInit)&&"lazy"!==(null==A?void 0:A.folderTreeLoading)){const e=r();return M(e)}return["folders"]});a(()=>{if(!0===(null==A?void 0:A.expandAllFoldersOnInit)&&"lazy"!==(null==A?void 0:A.folderTreeLoading)){const e=r(),t=M(e);j(t)}},[y,r,M,null==A?void 0:A.expandAllFoldersOnInit,null==A?void 0:A.folderTreeLoading]);const R=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]),D=c(async()=>{if(0===y.length)return;const e={};e.folders=await R("folders");const t=y.map(async t=>{const n=await R(t.id);e[t.id]=n});await Promise.all(t),_(e)},[y,R]),L=c(async e=>{const t=await R(e);_(n=>Object.assign(Object.assign({},n),{[e]:t}))},[R]);g(b,()=>({refreshFileCounts:D}),[D]),a(()=>{D()},[D]);const N=c(async()=>{await d(),n?await L(n):await L("folders")},[d,n,L]),z=h(()=>({items:[{key:"upload-url",label:w("Upload image by URL"),icon:e(O,{}),onClick:()=>null==f?void 0:f(!0)}]}),[O,f,w]),B=[{key:jr,label:w("My files"),icon:e(Ti,{})},{key:Rr,label:w("GIF"),icon:e(ki,{})},{key:Dr,label:w("Stock images"),icon:e(Ai,{})},{key:Lr,label:w("AI"),icon:e(Ci,{}),disabled:!(null==A?void 0:A.sseQuery)}],V=c(e=>{const t=e[0];t&&"empty"!==t&&(m!==jr&&v(jr),null==i||i(t))},[i,m,v]),U=c(({key:e})=>{console.warn("key",e),v(e)},[v]),H=c(async(e,t)=>{var n;j(e);if(!("lazy"===(null==A?void 0:A.folderTreeLoading)))return;const r=(null===(n=null==t?void 0:t.node)||void 0===n?void 0:n.key)||void 0;if(r&&"folders"!==r)try{await(null==u?void 0:u(r))}catch(e){console.warn("Не удалось подгрузить дочерние папки для",r,e)}},[null==A?void 0:A.folderTreeLoading,u]),K=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:w("No data to display")})}];const o=n=>{var r,i,a;const s=y.find(e=>e.id===n.key),l=x[n.key]||0,c={items:[{key:"rename",label:w("Rename"),icon:e(ye,{}),onClick:e=>{var t,n;if(s&&e.domEvent){e.domEvent.stopPropagation();if(!(!1!==(null===(n=null===(t=C.config)||void 0===t?void 0:t.features)||void 0===n?void 0:n.enableRenameFolder)))return;k.actions.showRenameFolderModal(s.id)}},disabled:!1===(null===(i=null===(r=C.config)||void 0===r?void 0:r.features)||void 0===i?void 0:i.enableRenameFolder)}]},u=e(Y,{menu:c,trigger:["contextMenu"],children:t("div",{className:"folder-item-container",children:[t("div",{className:Li,children:[e(T,{className:ji}),e("span",{className:Ri,children:n.label})]}),e("div",{className:Pi,title:`${l} ${1===l?"файл":"файлов"}`,children:l})]})});return{key:n.key,title:u,children:null===(a=n.children)||void 0===a?void 0:a.map(o)}},a=e("div",{className:Oi,children:t("div",{className:Di,children:[e(ve,{className:ji}),e("span",{className:Ri,children:w("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,w,y,x,T,k.actions]),q=h(()=>K(),[K]);return t("div",{className:"sidebar-container",children:[e("div",{className:Bi,children:t(Y.Button,{type:"primary",size:"large",icon:e(P,{}),onClick:N,menu:z,className:Mi,children:[e(be,{})," ",e("span",{className:Vi,children:w("Upload image")})]})}),e("div",{className:"sidebar__sections-title",children:w("Library")}),e($,{className:"folder-menu",items:B,defaultSelectedKeys:[jr],onSelect:({key:e})=>U({key:e}),selectedKeys:[m]}),e(G,{className:zi}),t("div",{className:Ni,children:[e(W,{className:`${Fi} folder-tree`,selectedKeys:n?[n]:["folders"],expandedKeys:F,onSelect:V,onExpand:H,treeData:q,switcherIcon:({expanded:t})=>e(t?P:E,{}),showLine:!1}),e("div",{className:Ei,children:e(X,{onClick:e=>{e.stopPropagation(),p()},className:Ii,icon:e(I,{}),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||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})]})};
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),{options:s}=Hr(),{config:l}=s,[c,u]=r.useState(null),[h,d]=r.useState(""),[f,p]=r.useState(!1),[g,m]=r.useState(!1),v=Xr(),b=r.useRef(!1),y=r.useRef(),w=r.useRef(void 0),[x,_]=r.useState(null);r.useEffect(()=>{i&&(async()=>{if(w.current!==i)if("object"!=typeof i)try{if(w.current=i,i.startsWith("data:"))_({thumbnail:i});else{const e=await v.handleAddFileByUrl(i,!0);if(!e)throw new Error("Не удалось загрузить файл");w.current===i&&_(e)}}finally{w.current===i&&(w.current=null)}else _(i)})()},[i,_]),y.current=o;const C=r.useCallback(async e=>{try{if(e.thumbnail&&e.thumbnail.startsWith("data:"))return e.thumbnail;const t=await v.getFileData(e);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}},[v.getFileData]);r.useEffect(()=>{(async()=>{try{const e=x?await C(x):null;u(e);const t=x?x.type:"";d(t||"image/png")}catch(e){console.error("🎨 Ошибка загрузки изображения:",e),M.error("Ошибка загрузки изображения"),null==n||n()}})()},[t,x,C,n]);const S=r.useCallback(async(e,t,r)=>{if(x&&y.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({},x),{thumbnail:o,size:t.size.toString(),date:(new Date).toISOString().split("T")[0],type:i,folderId:x.folderId||"",name:x.name,extension:x.extension||x.name.split(".").pop()||""});await y.current(a),null==n||n()}catch(e){console.error("Ошибка сохранения:",e),M.error("Ошибка при сохранении изображения")}},[x,n]),A=r.useCallback(async()=>{var e;if(!JI.isLoaded()||!x)return void console.error("❌ Pixie instance или file отсутствует");const t=x.name||"edited-image",n=x.extension||h.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 S(r,t,n)}catch(e){console.error("🎨 Альтернативный способ тоже не сработал:",e)}}},[x,h,S]),k=r.useCallback(async()=>{if(c&&t&&f&&!b.current)try{b.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=(null==l?void 0:l.locale)?null==l?void 0:l.locale.replace("_","-"):"ru-RU",r={selector:"#pixie-editor",image:c,activeLanguage:n,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 S(e,t,n)}catch(e){throw console.error("🎨 PIXIE onSave ERROR:",e),e}}};try{m(!1),await JI.show(r,a.current);const e=JI.canvas;e&&e.focus(),m(!0)}catch(e){console.error("init pixie failed:",e)}}catch(e){console.error("Ошибка инициализации Pixie:",e),M.error("Ошибка инициализации редактора"),b.current=!1,null==n||n()}},[c,t,f,n,S]);return r.useEffect(()=>{t&&c&&f&&k()},[t,c,f,null==x?void 0:x.id,k]),r.useEffect(()=>{if(!t){try{JI.close()}catch(e){console.warn("Ошибка при закрытии Pixie:",e)}u(null),d(""),b.current=!1,p(!1),m(!1)}return()=>{try{JI.close()}catch(e){console.warn("Ошибка при закрытии Pixie при размонтировании:",e)}}},[t]),e(H,{title:`Редактирование: ${(null==x?void 0:x.name)||"Изображение"}`,open:t,onCancel:n,afterOpenChange:e=>p(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:A,children:"Сохранить"},"save")],maskClosable:!1,destroyOnHidden:!1,children:e("div",{ref:a,style:{position:"relative",width:"100%",height:"100%"},children:t&&!g?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})=>{var d,f,p,g;const{t:m}=br(),v=i.size,{options:b}=r.useContext(Ur),y=!1!==(null===(f=null===(d=b.config)||void 0===d?void 0:d.features)||void 0===f?void 0:f.enableRenameFile)||!1!==(null===(g=null===(p=b.config)||void 0===p?void 0:p.features)||void 0===g?void 0:g.enableRenameFolder),w=r.useMemo(()=>{var e,t;if(1!==v)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},[v,i,h]);return t(vO,{className:"actions-header",children:[t("div",{className:"header-title-container",children:[e(yO,{level:5,className:"header-title",children:m("Files")}),v>0&&t(bO,{type:"secondary",className:"selected-text",children:[v," ",m("selected")]})]}),e(Q,{children:v>0?t(n,{children:[e(X,{icon:e(xe,{}),onClick:o,children:m("Deselected")}),e(X,{icon:e(ye,{}),onClick:a,disabled:1!==v||!y,children:m("Rename")}),e(X,{icon:e(Ae,{}),onClick:u,disabled:!w,title:w?"Редактировать изображение":"Выберите одно изображение для редактирования",children:m("Edit")}),e(X,{icon:e(ke,{}),onClick:l,children:m("Copy")}),e(X,{icon:e(ve,{}),onClick:c,children:m("Move to folder")}),e(X,{danger:!0,icon:e(Te,{}),onClick:s,children:m("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=>{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};
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=(()=>{var e,t;const{state:n,actions:r,options:i}=Hr(),{selectedFolder:o,pathHistory:a,folders:s}=n,{t:l}=br(),{setSelectedFolder:u,setPathHistory:h}=r,d=c(()=>{var e;return`em_fm:lastFolder:${(null===(e=null==i?void 0:i.config)||void 0===e?void 0:e.projectId)||"default"}`},[null===(e=null==i?void 0:i.config)||void 0===e?void 0:e.projectId]),f=c((e,t=new Set)=>{if(t.has(e))return console.warn(`Обнаружен цикл в пути к папке с id=${e}`),[];const n=(Array.isArray(s)?s:[]).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+" (ошибка)"}]):[...f(n.parentId,r),{id:n.id,name:n.name}]:[{id:n.id,name:n.name}]},[s]),p=c(e=>{var t;if("undefined"==typeof window)return;const n=!1!==(null===(t=null==i?void 0:i.config)||void 0===t?void 0:t.rememberLastFolder),r=d();try{if(!n)return void localStorage.removeItem(r);e?localStorage.setItem(r,e):localStorage.removeItem(r)}catch(e){console.warn("localStorage недоступен для сохранения последней папки")}},[d,null===(t=null==i?void 0:i.config)||void 0===t?void 0:t.rememberLastFolder]),g=c(e=>{if("folders"===e){const e=[{id:"folders",name:l("Folders")}];return null==h||h(e),void(i.onPathChange&&i.onPathChange([]))}if(!(Array.isArray(s)?s:[]).find(t=>t.id===e))return void console.warn("⚠️ Папка не найдена:",e);const t=f(e),n=[{id:"folders",name:l("Folders")},...t];null==h||h(n),i.onPathChange&&i.onPathChange(n.map(e=>e.name))},[s,f,h,i,l]),m=c(e=>{const t="folders"===e?null:e;t!==o&&(null==u||u(t),p(t),g(e))},[p,o,u,g]),v=c(e=>{if(-1===e)null==u||u(null),null==h||h([{id:"folders",name:l("Folders")}]),i.onPathChange&&i.onPathChange([]);else{const t=a.slice(0,e+1),n=t[t.length-1],r="folders"===n.id?void 0:n.id;null==u||u(r||null),null==h||h(t),i.onPathChange&&i.onPathChange(t.map(e=>e.name))}},[i,a,h,u,l]),b=c(e=>{if(!e.isFolder)return;null==u||u(e.id);const t={id:e.id,name:e.name};if(h){const e=[...a,t];h(e)}if(i.onPathChange){const t=[...a.map(e=>e.name),e.name];i.onPathChange(t)}},[i,a,h,u]);return{state:{selectedFolder:o,pathHistory:a},actions:{handleFolderSelect:m,handleBreadcrumbClick:v,handleItemClick:b},selectedFolder:o,pathHistory:a,handleFolderSelect:m,handleBreadcrumbClick:v,handleItemClick:b}})(),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,fetchChildFolders:w,handleCreateFolder:x,handleModalOk:_,handleModalCancel:C,generateMenuItems:S}=s.actions,A=ci(y),{files:k,selectedFiles:T,loading:I,isRenamingFile:O,fileToRename:E}=l.state,{fetchFiles:P,handleDeleteFile:M,handleDeleteFolder:F,handleAddFile:j,handleAddFileByUrl:R,uploadFileWithProvider:D,toggleFileSelection:L,showRenameModal:N,handleRenameCancel:z,handleRenameOk:B,handleDroppedFiles:V,showMoveModal:U,handleMoveCancel:H,handleMoveOk:W,showDeleteConfirm:Y,handleDeleteConfirmCancel:$,handleDeleteConfirmOk:X}=l.actions,{selectedFolder:K,pathHistory:q}=h.state,{handleFolderSelect:Z,handleBreadcrumbClick:J,handleItemClick:Q}=h.actions,{pagination:te}=d.state,ne=Gr(P),{searchTerm:re,sortBy:ie,sortOrder:oe}=ne.state,{handleSearch:ae,handleSort:se,handlePaginationChange:le}=ne.actions,ce=(({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=>{var t,n,r,i;const{dataProviders:o}=a;if(console.log("🔧 saveFileToServer: dataProviders доступны:",{hasUpdateFile:!!(null==o?void 0:o.updateFile),hasUploadFile:!!(null==o?void 0:o.uploadFile),hasThumbnail:!!e.thumbnail,fileId:e.id}),!1!==(null===(n=null===(t=a.config)||void 0===t?void 0:t.features)||void 0===n?void 0:n.enableUpdateFile)&&(null==o?void 0:o.updateFile)&&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 a=new Uint8Array(i),s=new Blob([a],{type:t});return console.log("Using updateFile method with:",{fileId:e.id,mimeType:t,blobType:s.type}),await o.updateFile(e.id,{name:e.name,type:t,data:s,thumbnail:e.thumbnail,extension:e.extension})}catch(e){return console.error("Ошибка при обновлении файла через updateFile:",e),null}else if((null==o?void 0:o.uploadFile)&&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 a=new Uint8Array(i),s=new Blob([a],{type:t});console.log("Using uploadFile method as fallback with:",{mimeType:t,blobType:s.type}),await o.uploadFile(Object.assign(Object.assign({},e),{type:t,data:s}))}catch(e){return console.error("Ошибка при сохранении файла через uploadFile:",e),null}else if(!1!==(null===(i=null===(r=a.config)||void 0===r?void 0:r.features)||void 0===i?void 0:i.enableRenameFile)&&(null==o?void 0:o.renameFile))try{return await o.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:k||[],selectedFiles:T||new Set,fetchFiles:P,selectedFolder:K||null}),ue=i.useCallback(async()=>{var e;await W(),await(null===(e=m.current)||void 0===e?void 0:e.refreshFileCounts())},[W]),he=i.useCallback(async()=>{var e,t,n;await(null===(t=(e=l.actions).handleCopyOk)||void 0===t?void 0:t.call(e)),await(null===(n=m.current)||void 0===n?void 0:n.refreshFileCounts())},[l.actions.handleCopyOk]),de=i.useCallback(async()=>{let e=null;await j({onStart:t=>{const n=p.startUpload([t]);e=n[0],console.warn("🚀 onStart: файл запущен",{fileName:t.name,fileId:e})},onProgress:(t,n)=>{e&&(p.updateProgress(e,n),console.warn("🔍 onProgress:",{fileName:t,fileId:e,progress:n}))},onComplete:async t=>{var n;e?(p.markAsSuccess(e),console.warn("✅ 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.warn("❌ onError: markAsError вызван",{fileName:t,fileId:e,error:n}),e=null)}})},[j,p]),fe=i.useCallback(async()=>{var e;await R(),await(null===(e=m.current)||void 0===e?void 0:e.refreshFileCounts())},[R]),pe=i.useCallback(async e=>{var t;await M(e),await(null===(t=m.current)||void 0===t?void 0:t.refreshFileCounts())},[M]),ge=i.useCallback(async e=>{var t;if(V){const n=p.startUpload(e);console.warn("🚀 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 V(e),n.forEach(e=>{p.updateProgress(e,100),p.markAsSuccess(e)}),await(null===(t=m.current)||void 0===t?void 0:t.refreshFileCounts())}},[V,p]),me=i.useCallback(async e=>{var t;await F(e),await y(),await(null===(t=m.current)||void 0===t?void 0:t.refreshFileCounts())},[F,y]),ve=(({files:e,selectedFiles:t,toggleFileSelection:n,showRenameModal:i,showMoveModal:o,showCopyModal:a,handleDeleteFile:s,handleDeleteFolder:l,showDeleteConfirm:c,onEdit:u})=>{const h=r.useCallback(()=>{t&&t.size>0&&t.forEach(e=>{n(e)})},[t,n]),d=r.useCallback(()=>{if(t&&1===t.size){const e=Array.from(t)[0];i(e)}},[t,i]),f=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]);return{handleClearSelection:h,handleRename:d,handleDeleteSelected:f,handleCopy:r.useCallback(()=>{a()},[a]),handleMove:r.useCallback(()=>{o()},[o]),handleEdit:r.useCallback(()=>{u()},[u])}})({files:k||[],selectedFiles:T||new Set,toggleFileSelection:L,showRenameModal:N,showMoveModal:U,showCopyModal:l.actions.showCopyModal||(()=>{}),handleDeleteFile:M,handleDeleteFolder:me,showDeleteConfirm:Y,onEdit:ce.handleEdit}),be=b||I,{options:ye}=i.useContext(Ur),we=null==ye?void 0:ye.config;a(()=>{hE(),y()},[y]),i.useEffect(()=>{if(!Z||0===v.length)return;const e=!!(null==we?void 0:we.rememberLastFolder),t=`em_fm:lastFolder:${(null==we?void 0:we.projectId)||"default"}`;if(e&&"undefined"!=typeof window)try{const e=localStorage.getItem(t);if(e&&v.some(t=>t.id===e))return void Z(e)}catch(e){}K||Z("folders")},[K,Z,v,null==we?void 0:we.rememberLastFolder,null==we?void 0:we.projectId]);const{state:xe,actions:_e,options:Ce}=i.useContext(Ur),{form:Se,urlForm:Ae,renameForm:ke,moveForm:Te,renameFolderForm:Ie,copyForm:Oe,isModalVisible:Ee,isUrlModalVisible:Pe,isMoveModalVisible:Me,isRenameFolderModalVisible:Fe,isCopyModalVisible:je,isDeleteConfirmVisible:Re,folderToRename:De,activeLibraryItem:Le}=xe,{setIsUrlModalVisible:Ne,setSortField:ze,setActiveLibraryItem:Be}=_e,{config:Ve}=Ce,{handleRenameFolderCancel:Ue,handleRenameFolderOk:He}=A.actions,We=c(e=>{le(e.current||te.current,e.pageSize||te.pageSize)},[le,te]),Ye=i.useCallback(e=>{const{sortBy:t,sortOrder:n}=(e=>{const[t,n]=e.split("-");return{sortBy:t,sortOrder:n}})(e);se(t,n)},[se]),[$e,Ge]=o(vE),[Xe,Ke]=o([]),qe=u(null),[Ze,Je]=o(mE),[Qe,et]=o([]),tt=u(null),[nt,rt]=o(""),[it,ot]=o([]),at=i.useRef(void 0),[st,lt]=o(!1),[ct,ut]=o(!1),ht=i.useRef(null),dt=i.useRef(null),ft=c(async()=>{const e=null==Ve?void 0:Ve.fileForEdit;if(at.current!==e){at.current=e;try{if(!(Le===Nr&&e&&!ce.editingFile))return;if("string"==typeof e){if(e.startsWith("data:"))return void(null==ce||ce.handleEdit({thumbnail:e}));const t=await g.handleAddFileByUrl(e,!0);if(!t)throw new Error("Не удалось загрузить файл");at.current===e&&(null==ce||ce.handleEdit(t))}}finally{at.current===e&&(at.current=null)}}},[null==Ve?void 0:Ve.fileForEdit,Le,ce,g]);return a(()=>{ft()},[ft]),a(()=>{var e,t,n;Le===jr?(console.warn("reset requests"),Ke([]),Ge(vE),et([]),Je(mE),ot([]),rt(""),ut(!1),lt(!1)):Le===Lr?null===(e=dt.current)||void 0===e||e.focus():Le===Rr?null===(t=qe.current)||void 0===t||t.focus():Le===Dr&&(null===(n=tt.current)||void 0===n||n.focus())},[Le]),t(ee,{className:"file-manager__layout",children:[f.showResizeGuide&&e("div",{className:"resize-guide",style:{left:`${f.resizeGuidePosition}px`}}),e(wO,{selectedFiles:T||new Set,onClearSelection:ve.handleClearSelection,onRename:ve.handleRename,onDelete:ve.handleDeleteSelected,onCopy:ve.handleCopy,onMove:ve.handleMove,onEdit:ve.handleEdit,files:k||[]}),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:K||null,generateMenuItems:S,onFolderSelect:e=>null==Z?void 0:Z(e),folders:v||[],fetchFolders:y,fetchChildFolders:w,handleAddFile:de,setIsUrlModalVisible:e=>null==Ne?void 0:Ne(e),handleDeleteFolder:me,handleCreateFolder:x,activeLibraryItem:Le,setActiveLibraryItem:e=>null==Be?void 0:Be(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:ht,children:[Le===jr&&e(si,{searchTerm:re,sortField:xe.sortField||"name",setSortField:e=>null==ze?void 0:ze(e),pathHistory:q||[],handleBreadcrumbClick:e=>null==J?void 0:J(e),handleAddFile:de,setIsUrlModalVisible:e=>null==Ne?void 0:Ne(e),files:k||[],handleSearch:ae,handleSort:se,sortBy:ie,sortOrder:oe,handleSortOptionChange:Ye,pagination:te,setPagination:We,loading:be,handleItemClick:e=>null==Q?void 0:Q(e),handleDeleteFile:pe,selectedFiles:T||new Set,toggleFileSelection:e=>null==L?void 0:L(e),handleDroppedFiles:ge,fileUpload:p}),Le===Rr&&e(EO,{imageGifList:Xe,setImageGifList:Ke,currentReqGif:$e,setCurrentReqGif:Ge,inputRef:qe,customRequest:R}),Le===Dr&&e(QO,{imageStockList:Qe,setImageStockList:et,currentReq:Ze,setCurrentReq:Je,inputRef:tt,customRequest:R}),Le===Lr&&!!(null==Ve?void 0:Ve.sseQuery)&&e(cE,{imageAiList:it,setImageAiList:ot,aiImageRequest:nt,setAiImageRequest:rt,inputAiRef:dt,customRequest:e=>D(e.file),isLoadingAi:st,setIsLoadingAi:lt,isImageUploaded:ct,setIsImageUploaded:ut,aiTabRef:ht}),Le===Nr&&e(n,{})]})})]}),e(li,{isModalVisible:Ee,handleModalOk:_,handleModalCancel:C,form:Se,selectedFolder:K||null,folders:v||[],isUrlModalVisible:Pe,setIsUrlModalVisible:e=>null==Ne?void 0:Ne(e),handleAddFileByUrl:fe,urlForm:Ae,isRenameModalVisible:O,handleRenameOk:()=>null==B?void 0:B(),handleRenameCancel:()=>null==z?void 0:z(),renameForm:ke,fileToRename:E,files:k||[],isMoveModalVisible:Me,handleMoveOk:ue,handleMoveCancel:H,moveForm:Te,selectedFiles:T||new Set,isRenameFolderModalVisible:Fe,handleRenameFolderOk:He,handleRenameFolderCancel:Ue,renameFolderForm:Ie,folderToRename:De,isCopyModalVisible:je,handleCopyOk:he,handleCopyCancel:l.actions.handleCopyCancel||(()=>{}),copyForm:Oe,isDeleteConfirmVisible:Re,handleDeleteConfirmOk:async()=>{var e;await(null==X?void 0:X()),await(null===(e=m.current)||void 0===e?void 0:e.refreshFileCounts())},handleDeleteConfirmCancel:()=>null==$?void 0:$()}),e(eO,{visible:ce.isPixieEditorVisible,onClose:ce.handlePixieEditorClose,file:ce.editingFile,onSave:ce.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})=>{const v=i.useMemo(()=>Object.assign({folderTreeLoading:"lazy",expandAllFoldersOnInit:!1},r),[r]);i.useEffect(()=>{v.theme&&(e=>{document.documentElement.setAttribute("data-theme",e)})(v.theme),fE(v)},[v]),a(()=>{v.locale&&v.locale!==tr.language&&(console.warn("FileManagerApp: меняем локаль с",tr.language,"на",v.locale),tr.changeLanguage(v.locale)),v.customLocale&&v.locale&&tr.addResourceBundle(v.locale,"translation",v.customLocale,!0,!0)},[v.locale,v.customLocale]);const b=u(null);return e(O,{className:"em-filemanager",children:t(n,{children:[e(I,{getPopupContainer:()=>b.current||document.body,children:e(Wr,{options:{apiEndpoints:d,searchQuery:c,sortBySize:h,onPathChange:o,onChangeSelection:s,onEditorOk:l,config:v,customIcons:f,dragDropIcon:p,dataProviders:g,notification:m},children:e(bE,{})})}),e("div",{ref:b,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