@cubone/react-file-manager 1.1.1 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -26
- package/dist/react-file-manager-logo.png +0 -0
- package/dist/react-file-manager.es.js +3092 -2233
- package/dist/react-file-manager.umd.js +46 -27
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/vite.svg +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_e,Y){typeof exports=="object"&&typeof module<"u"?Y(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],Y):(_e=typeof globalThis<"u"?globalThis:_e||self,Y(_e.ReactFileManager={},_e.React))})(this,function(_e,Y){"use strict";var Vt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function lt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ut={exports:{}},Ie={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var Ht;function jn(){if(Ht)return Ie;Ht=1;var e=Y,p=Symbol.for("react.element"),s=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,d=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function f(v,y,l){var h,O={},j=null,A=null;l!==void 0&&(j=""+l),y.key!==void 0&&(j=""+y.key),y.ref!==void 0&&(A=y.ref);for(h in y)i.call(y,h)&&!c.hasOwnProperty(h)&&(O[h]=y[h]);if(v&&v.defaultProps)for(h in y=v.defaultProps,y)O[h]===void 0&&(O[h]=y[h]);return{$$typeof:p,type:v,key:j,ref:A,props:O,_owner:d.current}}return Ie.Fragment=s,Ie.jsx=f,Ie.jsxs=f,Ie}var $e={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,47 +14,47 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+
|
|
19
|
-
`),
|
|
20
|
-
`),
|
|
21
|
-
`+
|
|
17
|
+
*/var Ft;function wn(){return Ft||(Ft=1,process.env.NODE_ENV!=="production"&&function(){var e=Y,p=Symbol.for("react.element"),s=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),v=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),I=Symbol.iterator,g="@@iterator";function F(r){if(r===null||typeof r!="object")return null;var V=I&&r[I]||r[g];return typeof V=="function"?V:null}var H=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function B(r){{for(var V=arguments.length,K=new Array(V>1?V-1:0),G=1;G<V;G++)K[G-1]=arguments[G];R("error",r,K)}}function R(r,V,K){{var G=H.ReactDebugCurrentFrame,ie=G.getStackAddendum();ie!==""&&(V+="%s",K=K.concat([ie]));var pe=K.map(function(t){return String(t)});pe.unshift("Warning: "+V),Function.prototype.apply.call(console[r],console,pe)}}var w=!1,o=!1,E=!1,T=!1,U=!1,X;X=Symbol.for("react.module.reference");function J(r){return!!(typeof r=="string"||typeof r=="function"||r===i||r===c||U||r===d||r===l||r===h||T||r===A||w||o||E||typeof r=="object"&&r!==null&&(r.$$typeof===j||r.$$typeof===O||r.$$typeof===f||r.$$typeof===v||r.$$typeof===y||r.$$typeof===X||r.getModuleId!==void 0))}function D(r,V,K){var G=r.displayName;if(G)return G;var ie=V.displayName||V.name||"";return ie!==""?K+"("+ie+")":K}function Z(r){return r.displayName||"Context"}function se(r){if(r==null)return null;if(typeof r.tag=="number"&&B("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case i:return"Fragment";case s:return"Portal";case c:return"Profiler";case d:return"StrictMode";case l:return"Suspense";case h:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case v:var V=r;return Z(V)+".Consumer";case f:var K=r;return Z(K._context)+".Provider";case y:return D(r,r.render,"ForwardRef");case O:var G=r.displayName||null;return G!==null?G:se(r.type)||"Memo";case j:{var ie=r,pe=ie._payload,t=ie._init;try{return se(t(pe))}catch{return null}}}return null}var fe=Object.assign,he=0,Q,ye,de,ce,_,q,b;function M(){}M.__reactDisabledLog=!0;function $(){{if(he===0){Q=console.log,ye=console.info,de=console.warn,ce=console.error,_=console.group,q=console.groupCollapsed,b=console.groupEnd;var r={configurable:!0,enumerable:!0,value:M,writable:!0};Object.defineProperties(console,{info:r,log:r,warn:r,error:r,group:r,groupCollapsed:r,groupEnd:r})}he++}}function k(){{if(he--,he===0){var r={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:fe({},r,{value:Q}),info:fe({},r,{value:ye}),warn:fe({},r,{value:de}),error:fe({},r,{value:ce}),group:fe({},r,{value:_}),groupCollapsed:fe({},r,{value:q}),groupEnd:fe({},r,{value:b})})}he<0&&B("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var z=H.ReactCurrentDispatcher,a;function m(r,V,K){{if(a===void 0)try{throw Error()}catch(ie){var G=ie.stack.trim().match(/\n( *(at )?)/);a=G&&G[1]||""}return`
|
|
18
|
+
`+a+r}}var P=!1,x;{var L=typeof WeakMap=="function"?WeakMap:Map;x=new L}function C(r,V){if(!r||P)return"";{var K=x.get(r);if(K!==void 0)return K}var G;P=!0;var ie=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var pe;pe=z.current,z.current=null,$();try{if(V){var t=function(){throw Error()};if(Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(ve){G=ve}Reflect.construct(r,[],t)}else{try{t.call()}catch(ve){G=ve}r.call(t.prototype)}}else{try{throw Error()}catch(ve){G=ve}r()}}catch(ve){if(ve&&G&&typeof ve.stack=="string"){for(var u=ve.stack.split(`
|
|
19
|
+
`),S=G.stack.split(`
|
|
20
|
+
`),N=u.length-1,W=S.length-1;N>=1&&W>=0&&u[N]!==S[W];)W--;for(;N>=1&&W>=0;N--,W--)if(u[N]!==S[W]){if(N!==1||W!==1)do if(N--,W--,W<0||u[N]!==S[W]){var te=`
|
|
21
|
+
`+u[N].replace(" at new "," at ");return r.displayName&&te.includes("<anonymous>")&&(te=te.replace("<anonymous>",r.displayName)),typeof r=="function"&&x.set(r,te),te}while(N>=1&&W>=0);break}}}finally{P=!1,z.current=pe,k(),Error.prepareStackTrace=ie}var ne=r?r.displayName||r.name:"",ee=ne?m(ne):"";return typeof r=="function"&&x.set(r,ee),ee}function re(r,V,K){return C(r,!1)}function ae(r){var V=r.prototype;return!!(V&&V.isReactComponent)}function me(r,V,K){if(r==null)return"";if(typeof r=="function")return C(r,ae(r));if(typeof r=="string")return m(r);switch(r){case l:return m("Suspense");case h:return m("SuspenseList")}if(typeof r=="object")switch(r.$$typeof){case y:return re(r.render);case O:return me(r.type,V,K);case j:{var G=r,ie=G._payload,pe=G._init;try{return me(pe(ie),V,K)}catch{}}}return""}var be=Object.prototype.hasOwnProperty,Te={},Ee=H.ReactDebugCurrentFrame;function Me(r){if(r){var V=r._owner,K=me(r.type,r._source,V?V.type:null);Ee.setExtraStackFrame(K)}else Ee.setExtraStackFrame(null)}function Et(r,V,K,G,ie){{var pe=Function.call.bind(be);for(var t in r)if(pe(r,t)){var u=void 0;try{if(typeof r[t]!="function"){var S=Error((G||"React class")+": "+K+" type `"+t+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[t]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw S.name="Invariant Violation",S}u=r[t](V,t,G,K,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(N){u=N}u&&!(u instanceof Error)&&(Me(ie),B("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",G||"React class",K,t,typeof u),Me(null)),u instanceof Error&&!(u.message in Te)&&(Te[u.message]=!0,Me(ie),B("Failed %s type: %s",K,u.message),Me(null))}}}var Ot=Array.isArray;function Ve(r){return Ot(r)}function Tt(r){{var V=typeof Symbol=="function"&&Symbol.toStringTag,K=V&&r[Symbol.toStringTag]||r.constructor.name||"Object";return K}}function Qe(r){try{return et(r),!1}catch{return!0}}function et(r){return""+r}function ke(r){if(Qe(r))return B("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Tt(r)),et(r)}var Pe=H.ReactCurrentOwner,tt={key:!0,ref:!0,__self:!0,__source:!0},He,Fe,Ne;Ne={};function St(r){if(be.call(r,"ref")){var V=Object.getOwnPropertyDescriptor(r,"ref").get;if(V&&V.isReactWarning)return!1}return r.ref!==void 0}function Pt(r){if(be.call(r,"key")){var V=Object.getOwnPropertyDescriptor(r,"key").get;if(V&&V.isReactWarning)return!1}return r.key!==void 0}function Rt(r,V){if(typeof r.ref=="string"&&Pe.current&&V&&Pe.current.stateNode!==V){var K=se(Pe.current.type);Ne[K]||(B('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',se(Pe.current.type),r.ref),Ne[K]=!0)}}function We(r,V){{var K=function(){He||(He=!0,B("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",V))};K.isReactWarning=!0,Object.defineProperty(r,"key",{get:K,configurable:!0})}}function _t(r,V){{var K=function(){Fe||(Fe=!0,B("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",V))};K.isReactWarning=!0,Object.defineProperty(r,"ref",{get:K,configurable:!0})}}var Mt=function(r,V,K,G,ie,pe,t){var u={$$typeof:p,type:r,key:V,ref:K,props:t,_owner:pe};return u._store={},Object.defineProperty(u._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(u,"_self",{configurable:!1,enumerable:!1,writable:!1,value:G}),Object.defineProperty(u,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ie}),Object.freeze&&(Object.freeze(u.props),Object.freeze(u)),u};function kt(r,V,K,G,ie){{var pe,t={},u=null,S=null;K!==void 0&&(ke(K),u=""+K),Pt(V)&&(ke(V.key),u=""+V.key),St(V)&&(S=V.ref,Rt(V,ie));for(pe in V)be.call(V,pe)&&!tt.hasOwnProperty(pe)&&(t[pe]=V[pe]);if(r&&r.defaultProps){var N=r.defaultProps;for(pe in N)t[pe]===void 0&&(t[pe]=N[pe])}if(u||S){var W=typeof r=="function"?r.displayName||r.name||"Unknown":r;u&&We(t,W),S&&_t(t,W)}return Mt(r,u,S,ie,G,Pe.current,t)}}var Be=H.ReactCurrentOwner,nt=H.ReactDebugCurrentFrame;function Re(r){if(r){var V=r._owner,K=me(r.type,r._source,V?V.type:null);nt.setExtraStackFrame(K)}else nt.setExtraStackFrame(null)}var Ue;Ue=!1;function Ye(r){return typeof r=="object"&&r!==null&&r.$$typeof===p}function ze(){{if(Be.current){var r=se(Be.current.type);if(r)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+
|
|
23
|
+
Check the render method of \``+r+"`."}return""}}function we(r){return""}var De={};function rt(r){{var V=ze();if(!V){var K=typeof r=="string"?r:r.displayName||r.name;K&&(V=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+
|
|
25
|
+
Check the top-level render call using <`+K+">.")}return V}}function Se(r,V){{if(!r._store||r._store.validated||r.key!=null)return;r._store.validated=!0;var K=rt(V);if(De[K])return;De[K]=!0;var G="";r&&r._owner&&r._owner!==Be.current&&(G=" It was passed a child from "+se(r._owner.type)+"."),Re(r),B('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',K,G),Re(null)}}function qe(r,V){{if(typeof r!="object")return;if(Ve(r))for(var K=0;K<r.length;K++){var G=r[K];Ye(G)&&Se(G,V)}else if(Ye(r))r._store&&(r._store.validated=!0);else if(r){var ie=F(r);if(typeof ie=="function"&&ie!==r.entries)for(var pe=ie.call(r),t;!(t=pe.next()).done;)Ye(t.value)&&Se(t.value,V)}}}function Nt(r){{var V=r.type;if(V==null||typeof V=="string")return;var K;if(typeof V=="function")K=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===y||V.$$typeof===O))K=V.propTypes;else return;if(K){var G=se(V);Et(K,r.props,"prop",G,r)}else if(V.PropTypes!==void 0&&!Ue){Ue=!0;var ie=se(V);B("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ie||"Unknown")}typeof V.getDefaultProps=="function"&&!V.getDefaultProps.isReactClassApproved&&B("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function at(r){{for(var V=Object.keys(r.props),K=0;K<V.length;K++){var G=V[K];if(G!=="children"&&G!=="key"){Re(r),B("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",G),Re(null);break}}r.ref!==null&&(Re(r),B("Invalid attribute `ref` supplied to `React.Fragment`."),Re(null))}}var ot={};function Ke(r,V,K,G,ie,pe){{var t=J(r);if(!t){var u="";(r===void 0||typeof r=="object"&&r!==null&&Object.keys(r).length===0)&&(u+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var S=we();S?u+=S:u+=ze();var N;r===null?N="null":Ve(r)?N="array":r!==void 0&&r.$$typeof===p?(N="<"+(se(r.type)||"Unknown")+" />",u=" Did you accidentally export a JSX literal instead of a component?"):N=typeof r,B("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",N,u)}var W=kt(r,V,K,ie,pe);if(W==null)return W;if(t){var te=V.children;if(te!==void 0)if(G)if(Ve(te)){for(var ne=0;ne<te.length;ne++)qe(te[ne],r);Object.freeze&&Object.freeze(te)}else B("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else qe(te,r)}if(be.call(V,"key")){var ee=se(r),ve=Object.keys(V).filter(function(xe){return xe!=="key"}),Ce=ve.length>0?"{key: someKey, "+ve.join(": ..., ")+": ...}":"{key: someKey}";if(!ot[ee+Ce]){var je=ve.length>0?"{"+ve.join(": ..., ")+": ...}":"{}";B(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,ye,J,be,J),et[J+ye]=!0}}return t===c?Qe(S):yt(S),S}}function tt(t,x,A){return Be(t,x,A,!0)}function nt(t,x,A){return Be(t,x,A,!1)}var bt=nt,rt=tt;Fe.Fragment=c,Fe.jsx=bt,Fe.jsxs=rt}()),Fe}process.env.NODE_ENV==="production"?at.exports=$t():at.exports=Wt();var r=at.exports,Ot={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Et=D.createContext&&D.createContext(Ot),Ut=["attr","size","title"];function Bt(n,p){if(n==null)return{};var o=Yt(n,p),c,d;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(n);for(d=0;d<u.length;d++)c=u[d],!(p.indexOf(c)>=0)&&Object.prototype.propertyIsEnumerable.call(n,c)&&(o[c]=n[c])}return o}function Yt(n,p){if(n==null)return{};var o={};for(var c in n)if(Object.prototype.hasOwnProperty.call(n,c)){if(p.indexOf(c)>=0)continue;o[c]=n[c]}return o}function Ye(){return Ye=Object.assign?Object.assign.bind():function(n){for(var p=1;p<arguments.length;p++){var o=arguments[p];for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(n[c]=o[c])}return n},Ye.apply(this,arguments)}function Tt(n,p){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(n);p&&(c=c.filter(function(d){return Object.getOwnPropertyDescriptor(n,d).enumerable})),o.push.apply(o,c)}return o}function Ke(n){for(var p=1;p<arguments.length;p++){var o=arguments[p]!=null?arguments[p]:{};p%2?Tt(Object(o),!0).forEach(function(c){Kt(n,c,o[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Tt(Object(o)).forEach(function(c){Object.defineProperty(n,c,Object.getOwnPropertyDescriptor(o,c))})}return n}function Kt(n,p,o){return p=qt(p),p in n?Object.defineProperty(n,p,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[p]=o,n}function qt(n){var p=Gt(n,"string");return typeof p=="symbol"?p:p+""}function Gt(n,p){if(typeof n!="object"||!n)return n;var o=n[Symbol.toPrimitive];if(o!==void 0){var c=o.call(n,p||"default");if(typeof c!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(p==="string"?String:Number)(n)}function St(n){return n&&n.map((p,o)=>D.createElement(p.tag,Ke({key:o},p.attr),St(p.child)))}function oe(n){return p=>D.createElement(Jt,Ye({attr:Ke({},n.attr)},p),St(n.child))}function Jt(n){var p=o=>{var{attr:c,size:d,title:u}=n,l=Bt(n,Ut),v=d||o.size||"1em",f;return o.className&&(f=o.className),n.className&&(f=(f?f+" ":"")+n.className),D.createElement("svg",Ye({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},o.attr,c,l,{className:f,style:Ke(Ke({color:n.color||o.color},o.style),n.style),height:v,width:v,xmlns:"http://www.w3.org/2000/svg"}),u&&D.createElement("title",null,u),n.children)};return Et!==void 0?D.createElement(Et.Consumer,null,o=>p(o)):p(Ot)}function Pt(n){return oe({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1z"},child:[]}]})(n)}function Xt(n){return oe({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"m.5 3 .04.87a2 2 0 0 0-.342 1.311l.637 7A2 2 0 0 0 2.826 14H9v-1H2.826a1 1 0 0 1-.995-.91l-.637-7A1 1 0 0 1 2.19 4h11.62a1 1 0 0 1 .996 1.09L14.54 8h1.005l.256-2.819A2 2 0 0 0 13.81 3H9.828a2 2 0 0 1-1.414-.586l-.828-.828A2 2 0 0 0 6.172 1H2.5a2 2 0 0 0-2 2m5.672-1a1 1 0 0 1 .707.293L7.586 3H2.19q-.362.002-.683.12L1.5 2.98a1 1 0 0 1 1-.98z"},child:[]},{tag:"path",attr:{d:"M13.5 9a.5.5 0 0 1 .5.5V11h1.5a.5.5 0 1 1 0 1H14v1.5a.5.5 0 1 1-1 0V12h-1.5a.5.5 0 0 1 0-1H13V9.5a.5.5 0 0 1 .5-.5"},child:[]}]})(n)}function Rt(n){return oe({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M3.5 3.5c-.614-.884-.074-1.962.858-2.5L8 7.226 11.642 1c.932.538 1.472 1.616.858 2.5L8.81 8.61l1.556 2.661a2.5 2.5 0 1 1-.794.637L8 9.73l-1.572 2.177a2.5 2.5 0 1 1-.794-.637L7.19 8.61zm2.5 10a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0m7 0a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0"},child:[]}]})(n)}function Zt(n){return oe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"23 4 23 10 17 10"},child:[]},{tag:"polyline",attr:{points:"1 20 1 14 7 14"},child:[]},{tag:"path",attr:{d:"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"},child:[]}]})(n)}function Qt(n){return oe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"},child:[]}]})(n)}function en(n){return oe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"},child:[]}]})(n)}function tn(n){return oe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"},child:[]}]})(n)}function nn(n){return oe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"},child:[]}]})(n)}function kt(n){return oe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"},child:[]}]})(n)}function rn(n){return oe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5-5 5z"},child:[]}]})(n)}function an(n){return oe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M10.02 6 8.61 7.41 13.19 12l-4.58 4.59L10.02 18l6-6-6-6z"},child:[]}]})(n)}function Nt(n){return oe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M20.005 5.995h-1v2h1v8h-1v2h1c1.103 0 2-.897 2-2v-8c0-1.102-.898-2-2-2zm-14 4H15v4H6.005z"},child:[]},{tag:"path",attr:{d:"M17.005 17.995V4H20V2h-8v2h3.005v1.995h-11c-1.103 0-2 .897-2 2v8c0 1.103.897 2 2 2h11V20H12v2h8v-2h-2.995v-2.005zm-13-2v-8h11v8h-11z"},child:[]}]})(n)}function it(n){return oe({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M64 464c-8.8 0-16-7.2-16-16V64c0-8.8 7.2-16 16-16H224v80c0 17.7 14.3 32 32 32h80V448c0 8.8-7.2 16-16 16H64zM64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V154.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0H64zm96 256a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm69.2 46.9c-3-4.3-7.9-6.9-13.2-6.9s-10.2 2.6-13.2 6.9l-41.3 59.7-11.9-19.1c-2.9-4.7-8.1-7.5-13.6-7.5s-10.6 2.8-13.6 7.5l-40 64c-3.1 4.9-3.2 11.1-.4 16.2s8.2 8.2 14 8.2h48 32 40 72c6 0 11.4-3.3 14.2-8.6s2.4-11.6-1-16.5l-72-104z"},child:[]}]})(n)}function on(n){return oe({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M64 464c-8.8 0-16-7.2-16-16V64c0-8.8 7.2-16 16-16H224v80c0 17.7 14.3 32 32 32h80V448c0 8.8-7.2 16-16 16H64zM64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V154.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0H64zm56 256c-13.3 0-24 10.7-24 24s10.7 24 24 24H264c13.3 0 24-10.7 24-24s-10.7-24-24-24H120zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24H264c13.3 0 24-10.7 24-24s-10.7-24-24-24H120z"},child:[]}]})(n)}function sn(n){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 464l48 0 0 48-48 0c-35.3 0-64-28.7-64-64L0 64C0 28.7 28.7 0 64 0L229.5 0c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3L384 304l-48 0 0-144-80 0c-17.7 0-32-14.3-32-32l0-80L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16zM176 352l32 0c30.9 0 56 25.1 56 56s-25.1 56-56 56l-16 0 0 32c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48 0-80c0-8.8 7.2-16 16-16zm32 80c13.3 0 24-10.7 24-24s-10.7-24-24-24l-16 0 0 48 16 0zm96-80l32 0c26.5 0 48 21.5 48 48l0 64c0 26.5-21.5 48-48 48l-32 0c-8.8 0-16-7.2-16-16l0-128c0-8.8 7.2-16 16-16zm32 128c8.8 0 16-7.2 16-16l0-64c0-8.8-7.2-16-16-16l-16 0 0 96 16 0zm80-112c0-8.8 7.2-16 16-16l48 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0 0 32 32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0 0 48c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-64 0-64z"},child:[]}]})(n)}function Mt(n){return oe({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M48 448V64c0-8.8 7.2-16 16-16H224v80c0 17.7 14.3 32 32 32h80V448c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16zM64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V154.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0H64zm55 241.1c-3.8-12.7-17.2-19.9-29.9-16.1s-19.9 17.2-16.1 29.9l48 160c3 10.2 12.4 17.1 23 17.1s19.9-7 23-17.1l25-83.4 25 83.4c3 10.2 12.4 17.1 23 17.1s19.9-7 23-17.1l48-160c3.8-12.7-3.4-26.1-16.1-29.9s-26.1 3.4-29.9 16.1l-25 83.4-25-83.4c-3-10.2-12.4-17.1-23-17.1s-19.9 7-23 17.1l-25 83.4-25-83.4z"},child:[]}]})(n)}function ot(n){return oe({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M320 464c8.8 0 16-7.2 16-16V160H256c-17.7 0-32-14.3-32-32V48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16H320zM0 64C0 28.7 28.7 0 64 0H229.5c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64z"},child:[]}]})(n)}function ln(n){return oe({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M384 480h48c11.4 0 21.9-6 27.6-15.9l112-192c5.8-9.9 5.8-22.1 .1-32.1S555.5 224 544 224H144c-11.4 0-21.9 6-27.6 15.9L48 357.1V96c0-8.8 7.2-16 16-16H181.5c4.2 0 8.3 1.7 11.3 4.7l26.5 26.5c21 21 49.5 32.8 79.2 32.8H416c8.8 0 16 7.2 16 16v32h48V160c0-35.3-28.7-64-64-64H298.5c-17 0-33.3-6.7-45.3-18.7L226.7 50.7c-12-12-28.3-18.7-45.3-18.7H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H87.7 384z"},child:[]}]})(n)}function st(n){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M104.6 48H64C28.7 48 0 76.7 0 112V384c0 35.3 28.7 64 64 64h96V400H64c-8.8 0-16-7.2-16-16V112c0-8.8 7.2-16 16-16H80c0 17.7 14.3 32 32 32h72.4C202 108.4 227.6 96 256 96h62c-7.1-27.6-32.2-48-62-48H215.4C211.6 20.9 188.2 0 160 0s-51.6 20.9-55.4 48zM144 56a16 16 0 1 1 32 0 16 16 0 1 1 -32 0zM448 464H256c-8.8 0-16-7.2-16-16V192c0-8.8 7.2-16 16-16l140.1 0L464 243.9V448c0 8.8-7.2 16-16 16zM256 512H448c35.3 0 64-28.7 64-64V243.9c0-12.7-5.1-24.9-14.1-33.9l-67.9-67.9c-9-9-21.2-14.1-33.9-14.1H256c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64z"},child:[]}]})(n)}const lt=(n,p)=>{const o=p.filter(c=>c.path===n.path+"/"+n.name);return{...n,children:o.map(c=>lt(c,p))}},cn=({allowCreateFolder:n=!0,allowUploadFile:p=!0,handleRefresh:o,isItemSelection:c,setIsItemSelection:d,currentPath:u,selectedFile:l,setSelectedFile:v,files:f,clipBoard:s,setClipBoard:h,handlePaste:N,triggerAction:j})=>{const[_,V]=D.useState([{icon:r.jsx(Xt,{size:17,strokeWidth:.3}),text:"New Folder",permission:n,onClick:()=>j.show("createFolder")},{icon:r.jsx(rn,{size:18}),text:"Upload File",permission:p,onClick:()=>j.show("uploadFile")},{icon:r.jsx(st,{size:18}),text:"Paste",permission:!1,onClick:()=>{}}]),C=[{icon:r.jsx(Zt,{size:16}),title:"Refresh",onClick:o}],E=(z,I,P)=>{const b=P.files[0];z.filter($=>{const ee=$.path===b.path&&$.name===b.name,W=$.path.startsWith(b.path+"/"+b.name);return ee||W});const k=z.find($=>$.path===I),T=P.isMoving?"move":"copy";N(b,k,T),P.isMoving&&h(null),d(!1),v(null)};D.useEffect(()=>{V(z=>z.map(I=>I.text==="Paste"?{...I,permission:!!s,onClick:()=>E(f,u,s)}:I))},[s,u,f]);const M=z=>{h({files:[{...lt(l,f)}],isMoving:z})};if(c){const z=l.path;return r.jsx("div",{className:"toolbar file-selected",children:r.jsxs("div",{className:"file-action-container",children:[r.jsxs("div",{children:[r.jsxs("button",{className:"item-action file-action",onClick:()=>M(!0),children:[r.jsx(Rt,{size:18}),r.jsx("span",{children:"Cut"})]}),r.jsxs("button",{className:"item-action file-action",onClick:()=>M(!1),children:[r.jsx(Pt,{strokeWidth:.1,size:17}),r.jsx("span",{children:"Copy"})]}),l.isDirectory?r.jsxs("button",{className:"item-action file-action",onClick:()=>E(f,z,s),disabled:!s,children:[r.jsx(st,{size:18}),r.jsx("span",{children:"Paste"})]}):r.jsx(r.Fragment,{}),r.jsxs("button",{className:"item-action file-action",onClick:()=>j.show("rename"),children:[r.jsx(Nt,{size:19}),r.jsx("span",{children:"Rename"})]}),r.jsxs("button",{className:"item-action file-action",onClick:()=>j.show("delete"),children:[r.jsx(kt,{size:19}),r.jsx("span",{children:"Delete"})]})]}),r.jsxs("button",{className:"item-action file-action",onClick:()=>d(!1),children:[r.jsx(en,{size:18}),r.jsx("span",{children:"Clear Selection"})]})]})})}return r.jsx("div",{className:"toolbar",children:r.jsxs("div",{className:"fm-toolbar",children:[r.jsx("div",{children:_.filter(z=>z.permission).map((z,I)=>r.jsxs("button",{className:"item-action",onClick:z.onClick,children:[z.icon,r.jsx("span",{children:z.text})]},I))}),r.jsx("div",{children:C.map((z,I)=>r.jsxs("div",{className:"toolbar-left-items",children:[r.jsx("div",{className:"item-action icon-only",title:z.title,role:"button",onClick:z.onClick,children:z.icon}),I!==C.length-1&&r.jsx("div",{className:"item-separator"})]},I))})]})})};var _t={exports:{}};(function(n,p){(function(o,c){n.exports=c(D)})(xt,function(o){return function(c){var d={};function u(l){if(d[l])return d[l].exports;var v=d[l]={i:l,l:!1,exports:{}};return c[l].call(v.exports,v,v.exports,u),v.l=!0,v.exports}return u.m=c,u.c=d,u.d=function(l,v,f){u.o(l,v)||Object.defineProperty(l,v,{enumerable:!0,get:f})},u.r=function(l){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})},u.t=function(l,v){if(1&v&&(l=u(l)),8&v||4&v&&typeof l=="object"&&l&&l.__esModule)return l;var f=Object.create(null);if(u.r(f),Object.defineProperty(f,"default",{enumerable:!0,value:l}),2&v&&typeof l!="string")for(var s in l)u.d(f,s,(function(h){return l[h]}).bind(null,s));return f},u.n=function(l){var v=l&&l.__esModule?function(){return l.default}:function(){return l};return u.d(v,"a",v),v},u.o=function(l,v){return Object.prototype.hasOwnProperty.call(l,v)},u.p="",u(u.s=4)}([function(c,d,u){c.exports=u(2)()},function(c,d){c.exports=o},function(c,d,u){var l=u(3);function v(){}function f(){}f.resetWarningCache=v,c.exports=function(){function s(j,_,V,C,E,M){if(M!==l){var z=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw z.name="Invariant Violation",z}}function h(){return s}s.isRequired=s;var N={array:s,bigint:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:h,element:s,elementType:s,instanceOf:h,node:s,objectOf:h,oneOf:h,oneOfType:h,shape:h,exact:h,checkPropTypes:f,resetWarningCache:v};return N.PropTypes=N,N}},function(c,d,u){c.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(c,d,u){u.r(d);var l=u(1),v=u.n(l),f=u(0),s=u.n(f),h=function(b){return b!==0};function N(){return(N=Object.assign?Object.assign.bind():function(b){for(var k=1;k<arguments.length;k++){var T=arguments[k];for(var $ in T)Object.prototype.hasOwnProperty.call(T,$)&&(b[$]=T[$])}return b}).apply(this,arguments)}function j(b){return(j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(k){return typeof k}:function(k){return k&&typeof Symbol=="function"&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k})(b)}function _(b,k){for(var T=0;T<k.length;T++){var $=k[T];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(b,$.key,$)}}function V(b,k){return(V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(T,$){return T.__proto__=$,T})(b,k)}function C(b){var k=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var T,$=z(b);if(k){var ee=z(this).constructor;T=Reflect.construct($,arguments,ee)}else T=$.apply(this,arguments);return E(this,T)}}function E(b,k){if(k&&(j(k)==="object"||typeof k=="function"))return k;if(k!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return M(b)}function M(b){if(b===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b}function z(b){return(z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(k){return k.__proto__||Object.getPrototypeOf(k)})(b)}function I(b,k,T){return k in b?Object.defineProperty(b,k,{value:T,enumerable:!0,configurable:!0,writable:!0}):b[k]=T,b}var P=function(b){(function(W,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function");W.prototype=Object.create(O&&O.prototype,{constructor:{value:W,writable:!0,configurable:!0}}),Object.defineProperty(W,"prototype",{writable:!1}),O&&V(W,O)})(ee,b);var k,T,$=C(ee);function ee(W){var O;return function(X,re){if(!(X instanceof re))throw new TypeError("Cannot call a class as a function")}(this,ee),I(M(O=$.call(this,W)),"continueOpenCollapsible",function(){var X=M(O).innerRef;O.setState({height:X.scrollHeight,transition:"height ".concat(O.props.transitionTime,"ms ").concat(O.props.easing),isClosed:!1,hasBeenOpened:!0,inTransition:h(X.scrollHeight),shouldOpenOnNextCycle:!1})}),I(M(O),"handleTriggerClick",function(X){O.props.triggerDisabled||O.state.inTransition||(X.preventDefault(),O.props.handleTriggerClick?O.props.handleTriggerClick(O.props.accordionPosition):O.state.isClosed===!0?(O.openCollapsible(),O.props.onOpening(),O.props.onTriggerOpening()):(O.closeCollapsible(),O.props.onClosing(),O.props.onTriggerClosing()))}),I(M(O),"handleTransitionEnd",function(X){X.target===O.innerRef&&(O.state.isClosed?(O.setState({inTransition:!1}),O.props.onClose()):(O.setState({height:"auto",overflow:O.props.overflowWhenOpen,inTransition:!1}),O.props.onOpen()))}),I(M(O),"setInnerRef",function(X){return O.innerRef=X}),O.timeout=void 0,O.contentId=W.contentElementId||"collapsible-content-".concat(Date.now()),O.triggerId=W.triggerElementProps.id||"collapsible-trigger-".concat(Date.now()),W.open?O.state={isClosed:!1,shouldSwitchAutoOnNextCycle:!1,height:"auto",transition:"none",hasBeenOpened:!0,overflow:W.overflowWhenOpen,inTransition:!1}:O.state={isClosed:!0,shouldSwitchAutoOnNextCycle:!1,height:0,transition:"height ".concat(W.transitionTime,"ms ").concat(W.easing),hasBeenOpened:!1,overflow:"hidden",inTransition:!1},O}return k=ee,(T=[{key:"componentDidUpdate",value:function(W,O){var X=this;this.state.shouldOpenOnNextCycle&&this.continueOpenCollapsible(),O.height!=="auto"&&O.height!==0||this.state.shouldSwitchAutoOnNextCycle!==!0||(window.clearTimeout(this.timeout),this.timeout=window.setTimeout(function(){X.setState({height:0,overflow:"hidden",isClosed:!0,shouldSwitchAutoOnNextCycle:!1})},50)),W.open!==this.props.open&&(this.props.open===!0?(this.openCollapsible(),this.props.onOpening()):(this.closeCollapsible(),this.props.onClosing()))}},{key:"componentWillUnmount",value:function(){window.clearTimeout(this.timeout)}},{key:"closeCollapsible",value:function(){var W=this.innerRef;this.setState({shouldSwitchAutoOnNextCycle:!0,height:W.scrollHeight,transition:"height ".concat(this.props.transitionCloseTime?this.props.transitionCloseTime:this.props.transitionTime,"ms ").concat(this.props.easing),inTransition:h(W.scrollHeight)})}},{key:"openCollapsible",value:function(){this.setState({inTransition:h(this.innerRef.scrollHeight),shouldOpenOnNextCycle:!0})}},{key:"renderNonClickableTriggerElement",value:function(){var W=this.props,O=W.triggerSibling,X=W.classParentString;if(!O)return null;switch(j(O)){case"string":return v.a.createElement("span",{className:"".concat(X,"__trigger-sibling")},O);case"function":return O();case"object":return O;default:return null}}},{key:"render",value:function(){var W=this,O={height:this.state.height,WebkitTransition:this.state.transition,msTransition:this.state.transition,transition:this.state.transition,overflow:this.state.overflow},X=this.state.isClosed?"is-closed":"is-open",re=this.props.triggerDisabled?"is-disabled":"",ue=this.state.isClosed===!1&&this.props.triggerWhenOpen!==void 0?this.props.triggerWhenOpen:this.props.trigger,fe=this.props.contentContainerTagName,ne=this.props.triggerTagName,he=this.props.lazyRender&&!this.state.hasBeenOpened&&this.state.isClosed&&!this.state.inTransition?null:this.props.children,ce=this.props,q=ce.classParentString,de=ce.contentOuterClassName,pe=ce.contentInnerClassName,w="".concat(q,"__trigger ").concat(X," ").concat(re," ").concat(this.state.isClosed?this.props.triggerClassName:this.props.triggerOpenedClassName),L="".concat(q," ").concat(this.state.isClosed?this.props.className:this.props.openedClassName),U="".concat(q,"__contentOuter ").concat(de),G="".concat(q,"__contentInner ").concat(pe);return v.a.createElement(fe,N({className:L.trim()},this.props.containerElementProps),v.a.createElement(ne,N({id:this.triggerId,className:w.trim(),onClick:this.handleTriggerClick,style:this.props.triggerStyle&&this.props.triggerStyle,onKeyPress:function(Y){var i=Y.key;(i===" "&&W.props.triggerTagName.toLowerCase()!=="button"||i==="Enter")&&W.handleTriggerClick(Y)},tabIndex:this.props.tabIndex&&this.props.tabIndex,"aria-expanded":!this.state.isClosed,"aria-disabled":this.props.triggerDisabled,"aria-controls":this.contentId,role:"button"},this.props.triggerElementProps),ue),this.renderNonClickableTriggerElement(),v.a.createElement("div",{id:this.contentId,className:U.trim(),style:O,onTransitionEnd:this.handleTransitionEnd,ref:this.setInnerRef,hidden:this.props.contentHiddenWhenClosed&&this.state.isClosed&&!this.state.inTransition,role:"region","aria-labelledby":this.triggerId},v.a.createElement("div",{className:G.trim()},he)))}}])&&_(k.prototype,T),Object.defineProperty(k,"prototype",{writable:!1}),ee}(l.Component);P.propTypes={transitionTime:s.a.number,transitionCloseTime:s.a.number,triggerTagName:s.a.string,easing:s.a.string,open:s.a.bool,containerElementProps:s.a.object,triggerElementProps:s.a.object,contentElementId:s.a.string,classParentString:s.a.string,className:s.a.string,openedClassName:s.a.string,triggerStyle:s.a.object,triggerClassName:s.a.string,triggerOpenedClassName:s.a.string,contentOuterClassName:s.a.string,contentInnerClassName:s.a.string,accordionPosition:s.a.oneOfType([s.a.string,s.a.number]),handleTriggerClick:s.a.func,onOpen:s.a.func,onClose:s.a.func,onOpening:s.a.func,onClosing:s.a.func,onTriggerOpening:s.a.func,onTriggerClosing:s.a.func,trigger:s.a.oneOfType([s.a.string,s.a.element]),triggerWhenOpen:s.a.oneOfType([s.a.string,s.a.element]),triggerDisabled:s.a.bool,lazyRender:s.a.bool,overflowWhenOpen:s.a.oneOf(["hidden","visible","auto","scroll","inherit","initial","unset"]),contentHiddenWhenClosed:s.a.bool,triggerSibling:s.a.oneOfType([s.a.string,s.a.element,s.a.func]),tabIndex:s.a.number,contentContainerTagName:s.a.string,children:s.a.oneOfType([s.a.string,s.a.element])},P.defaultProps={transitionTime:400,transitionCloseTime:null,triggerTagName:"span",easing:"linear",open:!1,classParentString:"Collapsible",triggerDisabled:!1,lazyRender:!1,overflowWhenOpen:"hidden",contentHiddenWhenClosed:!1,openedClassName:"",triggerStyle:null,triggerClassName:"",triggerOpenedClassName:"",contentOuterClassName:"",contentInnerClassName:"",className:"",triggerSibling:null,onOpen:function(){},onClose:function(){},onOpening:function(){},onClosing:function(){},onTriggerOpening:function(){},onTriggerClosing:function(){},tabIndex:null,contentContainerTagName:"div",triggerElementProps:{}},d.default=P}])})})(_t);var un=_t.exports;const fn=jt(un);function dn(n){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 48c110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200-110.532 0-200-89.451-200-200 0-110.532 89.451-200 200-200m140.204 130.267l-22.536-22.718c-4.667-4.705-12.265-4.736-16.97-.068L215.346 303.697l-59.792-60.277c-4.667-4.705-12.265-4.736-16.97-.069l-22.719 22.536c-4.705 4.667-4.736 12.265-.068 16.971l90.781 91.516c4.667 4.705 12.265 4.736 16.97.068l172.589-171.204c4.704-4.668 4.734-12.266.067-16.971z"},child:[]}]})(n)}function At(n){return oe({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M527.9 224H480v-48c0-26.5-21.5-48-48-48H272l-64-64H48C21.5 64 0 85.5 0 112v288c0 26.5 21.5 48 48 48h400c16.5 0 31.9-8.5 40.7-22.6l79.9-128c20-31.9-3-73.4-40.7-73.4zM48 118c0-3.3 2.7-6 6-6h134.1l64 64H426c3.3 0 6 2.7 6 6v42H152c-16.8 0-32.4 8.8-41.1 23.2L48 351.4zm400 282H72l77.2-128H528z"},child:[]}]})(n)}function Vt(n){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 128H272l-54.63-54.63c-6-6-14.14-9.37-22.63-9.37H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48zm0 272H48V112h140.12l54.63 54.63c6 6 14.14 9.37 22.63 9.37H464v224z"},child:[]}]})(n)}const zt=({folder:n,setCurrentPath:p,currentPath:o})=>{const[c,d]=D.useState(!1),[u,l]=D.useState(!1),v=`${n.path}/${n.name}`,f=()=>{l(!0),p(v)},s=h=>{h.stopPropagation(),d(N=>!N)};return D.useEffect(()=>{l(o===v);const h=o.split("/");h.pop(),h.join("/")===v&&d(!0)},[o]),n.subDirectories?r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`sb-folders-list-item ${u?"active-list-item":""}`,onClick:f,children:[r.jsx("span",{onClick:s,children:r.jsx(tn,{size:20,className:`${c?"folder-rotate-down":"folder-rotate-right"}`})}),r.jsxs("div",{className:"sb-folder-details",children:[c||u?r.jsx(At,{size:20,className:"folder-open-icon"}):r.jsx(Vt,{size:17,className:"folder-close-icon"}),r.jsx("span",{className:"sb-folder-name",title:n.name,children:n.name})]})]}),r.jsx(fn,{open:c,children:r.jsx("div",{className:"folder-collapsible",children:n.subDirectories.map((h,N)=>r.jsx(zt,{folder:h,setCurrentPath:p,currentPath:o},N))})})]}):r.jsxs("div",{className:`sb-folders-list-item ${u?"active-list-item":""}`,onClick:f,children:[r.jsx("span",{className:"non-expanable"}),r.jsxs("div",{className:"sb-folder-details",children:[u?r.jsx(At,{size:20,className:"folder-open-icon"}):r.jsx(Vt,{size:17,className:"folder-close-icon"}),r.jsx("span",{className:"sb-folder-name",title:n.name,children:n.name})]})]})},pn=({files:n,currentPath:p,setCurrentPath:o})=>{const[c,d]=D.useState([]),u=(l,v)=>{var s;var f=l.path+"/"+l.name;return v[f]?(s=v[f])==null?void 0:s.map(h=>({...h,subDirectories:u(h,v)})):null};return D.useEffect(()=>{const l=n.filter(f=>f.isDirectory).map(f=>({...f,path:f.path.split("/").slice(0,-1).join("/")})),v=Object.groupBy(l,({path:f})=>f);d(()=>{var f;return l.length>0?(f=v[""])==null?void 0:f.map(s=>({...s,subDirectories:u(s,v)})):[]})},[n]),r.jsx("div",{className:"sb-folders-list",children:(c==null?void 0:c.length)>0?r.jsx(r.Fragment,{children:c==null?void 0:c.map((l,v)=>r.jsx(zt,{folder:l,setCurrentPath:o,currentPath:p},v))}):r.jsx("div",{className:"empty-nav-pane",children:"Nothing here yet"})})},hn=({currentPath:n,setCurrentPath:p})=>{const[o,c]=D.useState([]);D.useEffect(()=>{c(n==null?void 0:n.split("/"))},[n]);const d=u=>{u<o.length-1&&p(()=>{const l=o.length-(u+1);return o.slice(0,-l).join("/")})};return r.jsx("div",{className:"breadcrumb",children:o.map((u,l)=>r.jsx("span",{className:"folder-name",onClick:()=>d(l),children:l===0?r.jsxs(r.Fragment,{children:[r.jsx(Qt,{})," Home"]}):r.jsxs(r.Fragment,{children:[r.jsx(an,{})," ",u]})},l))})};function vn(n){return oe({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208h0a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Zm112,136H43.1l26.67-80H232Z"},child:[]}]})(n)}const mn=({children:n,contextMenuRef:p,content:o,visible:c,setVisible:d})=>{const[u,l]=D.useState(0),[v,f]=D.useState(0),s=h=>{h.preventDefault(),d(!0);const N=h.clientX,j=h.clientY,_=window.innerWidth,V=window.innerHeight,C=112,E=82,M=_-N>C,z=!M,I=V-j>E,P=!I;M?l(`${N+5}px`):z&&l(`${N-C-5}px`),I?f(`${j+5}px`):P&&f(`${j-E-5}px`)};return r.jsxs("div",{onContextMenu:s,onClick:h=>d(!1),children:[n,c&&r.jsx("div",{ref:p,className:"fm-context-menu",style:{top:v,left:u},children:o})]})},gn=n=>{const p=D.useRef(null),o=c=>{var d;(d=p.current)!=null&&d.contains(c.target)||n()};return D.useEffect(()=>(document.addEventListener("mousedown",o,!0),()=>{document.removeEventListener("mousedown",o,!0)}),[]),p},Ht=n=>({pdf:r.jsx(sn,{size:n}),jpg:r.jsx(it,{size:n}),jpeg:r.jsx(it,{size:n}),png:r.jsx(it,{size:n}),txt:r.jsx(on,{size:n}),doc:r.jsx(Mt,{size:n}),docx:r.jsx(Mt,{size:n})}),yn=({file:n,index:p,selectedFileIndex:o,setSelectedFileIndex:c,setCurrentPath:d,isItemSelection:u,setIsItemSelection:l,setSelectedFile:v,currentPath:f,clipBoard:s,setClipBoard:h,handlePaste:N,files:j,triggerAction:_})=>{var he,ce;const V=Ht(48),[C,E]=D.useState(!1),[M,z]=D.useState(!1),[I,P]=D.useState(0),[b,k]=D.useState(!1),T=(s==null?void 0:s.isMoving)&&s.files.find(q=>q.name===n.name&&q.path===n.path),$=gn(()=>{E(!1)}),ee=(q,de)=>{q.stopPropagation(),h({files:[{...lt(n,j)}],isMoving:de}),E(!1)},W=q=>{if(q.stopPropagation(),s){const de=n.path,pe=s.files[0];j.filter(U=>{const G=U.path===pe.path&&U.name===pe.name,Y=U.path.startsWith(pe.path+"/"+pe.name);return G||Y});const w=j.find(U=>U.path===de),L=s.isMoving?"move":"copy";N(pe,w,L),s.isMoving&&h(null),l(!1),v(null),E(!1)}},O=q=>{q.stopPropagation(),E(!1),_.show("rename")},X=q=>{q.stopPropagation(),E(!1),_.show("delete")},re=()=>{E(!1),n.isDirectory?(d(q=>q+"/"+n.name),c(null)):k(!0)},ue=q=>{q.stopPropagation(),l(!0),v(n),c(p);const de=new Date().getTime();de-I<300&&(l(!1),re()),P(de)},fe=q=>{q.key==="Enter"&&re()};D.useEffect(()=>{z(o===p)},[o]),D.useEffect(()=>{o===p&&z(u)},[u]);const ne=r.jsx("div",{className:"file-context-menu-list",children:r.jsxs("ul",{children:[r.jsxs("li",{onClick:re,children:[n.isDirectory?r.jsx(vn,{size:20}):r.jsx(ot,{size:16}),r.jsx("span",{children:"Open"})]}),r.jsxs("li",{onClick:q=>ee(q,!0),children:[r.jsx(Rt,{size:19}),r.jsx("span",{children:"Cut"})]}),r.jsxs("li",{onClick:q=>ee(q,!1),children:[r.jsx(Pt,{strokeWidth:.1,size:17}),r.jsx("span",{children:"Copy"})]}),n.isDirectory?r.jsxs("li",{onClick:W,className:`${s?"":"disable-paste"}`,children:[r.jsx(st,{size:18}),r.jsx("span",{children:"Paste"})]}):r.jsx(r.Fragment,{}),r.jsxs("li",{onClick:O,children:[r.jsx(Nt,{size:19}),r.jsx("span",{children:"Rename"})]}),r.jsxs("li",{onClick:X,children:[r.jsx(kt,{size:19}),r.jsx("span",{children:"Delete"})]})]})});return r.jsx(r.Fragment,{children:r.jsx(mn,{contextMenuRef:$,visible:C,setVisible:E,content:ne,children:r.jsxs("div",{className:`file-item ${M?"background-secondary text-white":""} ${T?"file-moving":""}`,title:n.name,onClick:ue,onKeyUp:fe,onContextMenu:()=>{l(!0),v(n),c(p)},tabIndex:0,children:[n.isDirectory?r.jsx(ln,{size:48}):r.jsx(r.Fragment,{children:V[(ce=(he=n.name)==null?void 0:he.split(".").pop())==null?void 0:ce.toLowerCase()]??r.jsx(ot,{size:48})}),r.jsx("span",{className:"text-truncate file-name",children:n.name})]})})})},bn=({currentPathFiles:n,setCurrentPath:p,isItemSelection:o,setIsItemSelection:c,setSelectedFile:d,currentPath:u,clipBoard:l,setClipBoard:v,handlePaste:f,files:s,triggerAction:h})=>{const[N,j]=D.useState(null);return D.useEffect(()=>{j(null),c(!1),d(null)},[u]),r.jsx("div",{className:"files",onClick:_=>{j(null),c(!1),d(null)},children:(n==null?void 0:n.length)>0?r.jsx(r.Fragment,{children:n.map((_,V)=>r.jsx(yn,{file:_,index:V,selectedFileIndex:N,setSelectedFileIndex:j,setCurrentPath:p,isItemSelection:o,setIsItemSelection:c,setSelectedFile:d,currentPath:u,clipBoard:l,setClipBoard:v,handlePaste:f,files:s,triggerAction:h},V))}):r.jsx("div",{className:"empty-folder",children:"This folder is empty."})})},xn=()=>{const[n,p]=D.useState(!1),[o,c]=D.useState(null);return{isActive:n,actionType:o,show:l=>{p(!0),c(l)},close:()=>{p(!1),c(null)}}},jn=({children:n,show:p,setShow:o,heading:c,dialogWidth:d="25%",contentClassName:u=""})=>{const l=D.useRef(null);return D.useEffect(()=>{p?l.current.showModal():l.current.close()},[p]),r.jsxs("dialog",{ref:l,className:"fm-modal dialog",style:{width:d},children:[r.jsxs("div",{className:"fm-modal-header",children:[r.jsx("span",{className:"fm-modal-heading",children:c}),r.jsx(nn,{size:18,onClick:()=>o(!1),className:"close-icon",title:"Close"})]}),n]})},Pe=({onClick:n,type:p="primary",padding:o="0.4rem 0.8rem",children:c})=>r.jsx("button",{onClick:n,className:`fm-button fm-button-${p}`,style:{padding:o},children:c}),wn=({files:n,currentPath:p,currentPathFiles:o,handleCreateFolder:c,currentFolder:d,triggerAction:u})=>{const[l,v]=D.useState("New Folder"),[f,s]=D.useState(!1),[h,N]=D.useState(""),j=E=>{v(E.target.value),s(!1)},_=E=>{/[\\/:*?"<>|]/.test(E.key)?(E.preventDefault(),N(`A file name can't contain any of the following characters: \\ / : * ? " < > |`),s(!0)):s(!1)},V=()=>{const E=l.trim();E===""?(N("Folder name cannot be empty."),s(!0)):o.find(z=>z.name.toLowerCase()===E.toLowerCase())?(N(`A folder with the name "${E}" already exits.`),s(!0)):(c(E,d),u.close())},C=D.useRef(null);return D.useEffect(()=>{C.current.focus(),C.current.select()},[]),r.jsxs("div",{className:"fm-create-folder-container",children:[r.jsxs("div",{className:"fm-create-folder-input",children:[r.jsx("input",{ref:C,type:"text",value:l,onChange:j,onKeyDown:_,className:"action-input"}),f&&r.jsx("div",{className:"folder-error",children:h})]}),r.jsx("div",{className:"fm-create-folder-action",children:r.jsx(Pe,{onClick:V,type:"primary",children:"Create"})})]})};function Cn(n){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M85.57 446.25h340.86a32 32 0 0 0 28.17-47.17L284.18 82.58c-12.09-22.44-44.27-22.44-56.36 0L57.4 399.08a32 32 0 0 0 28.17 47.17z"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"m250.26 195.39 5.74 122 5.73-121.95a5.74 5.74 0 0 0-5.79-6h0a5.74 5.74 0 0 0-5.68 5.95z"},child:[]},{tag:"path",attr:{d:"M256 397.25a20 20 0 1 1 20-20 20 20 0 0 1-20 20z"},child:[]}]})(n)}const On=({files:n,selectedFile:p,currentPathFiles:o,handleRename:c,triggerAction:d,setSelectedFile:u})=>{const[l,v]=D.useState(p==null?void 0:p.name),f=D.useRef(null),[s,h]=D.useState(!1),[N,j]=D.useState(!1),[_,V]=D.useState("");D.useEffect(()=>{var M,z,I;if(p)if((M=f==null?void 0:f.current)==null||M.focus(),p.isDirectory)(z=f==null?void 0:f.current)==null||z.select();else{const P=p.name.split(".").pop(),b=p.name.length-P.length-1;(I=f==null?void 0:f.current)==null||I.setSelectionRange(0,b)}else h(!1)},[]);const C=M=>{/[\\/:*?"<>|]/.test(M.key)?(M.preventDefault(),V(`A file name can't contain any of the following characters: \\ / : * ? " < > |`),j(!0)):j(!1)},E=(M,z)=>{if(l===""){j(!0),V(`${p.isDirectory?"Folder":"File"} name is required!`);return}else if(l===p.name){d.close();return}else if(o.some(I=>I.name===l)){j(!0),V("A file or folder with the same name already exists!");return}else if(!p.isDirectory&&!z){const I=p.name.split(".").pop(),P=l.split(".").pop();if(I!==P){h(!0);return}}c(p,l),u(I=>({...I,name:l})),d.close()};return r.jsx(r.Fragment,{children:s?r.jsxs("div",{className:"fm-rename-folder-container",children:[r.jsx("div",{className:"fm-rename-folder-input",children:r.jsxs("div",{className:"fm-rename-warning",children:[r.jsx(Cn,{size:70,color:"orange"}),r.jsx("div",{children:"If you change a file name extension, the file might become unusable. Are you sure you want to change it?"})]})}),r.jsxs("div",{className:"fm-rename-folder-action",children:[r.jsx(Pe,{type:"secondary",onClick:()=>h(!1),children:"No"}),r.jsx(Pe,{type:"danger",onClick:M=>E(M,!0),children:"Yes"})]})]}):r.jsxs("div",{className:"fm-rename-folder-container",children:[r.jsxs("div",{className:"fm-rename-folder-input",children:[r.jsx("input",{ref:f,type:"text",value:l,onChange:M=>{v(M.target.value),j(!1)},onKeyDown:C,className:"action-input"}),N&&r.jsx("div",{className:"folder-error",children:_})]}),r.jsx("div",{className:"fm-rename-folder-action",children:r.jsx(Pe,{onClick:E,type:"primary",children:"Save"})})]})})},En=({files:n,selectedFile:p,triggerAction:o,handleDelete:c,setIsItemSelection:d,setSelectedFile:u})=>{const l=v=>{c(v),d(!1),u(null),o.close()};return r.jsxs("div",{className:"file-delete-confirm",children:[r.jsxs("p",{className:"file-delete-confirm-text",children:['Are you sure you want to delete "',p==null?void 0:p.name,'"?']}),r.jsxs("div",{className:"file-delete-confirm-actions",children:[r.jsx(Pe,{type:"secondary",onClick:()=>o.close(),children:"Cancel"}),r.jsx(Pe,{type:"danger",onClick:()=>l(p),children:"Delete"})]})]})};function Tn(n){return oe({tag:"svg",attr:{viewBox:"0 0 1024 1024",fill:"currentColor",fillRule:"evenodd"},child:[{tag:"path",attr:{d:"M799.855 166.312c.023.007.043.018.084.059l57.69 57.69c.041.041.052.06.059.084a.118.118 0 0 1 0 .069c-.007.023-.018.042-.059.083L569.926 512l287.703 287.703c.041.04.052.06.059.083a.118.118 0 0 1 0 .07c-.007.022-.018.042-.059.083l-57.69 57.69c-.041.041-.06.052-.084.059a.118.118 0 0 1-.069 0c-.023-.007-.042-.018-.083-.059L512 569.926 224.297 857.629c-.04.041-.06.052-.083.059a.118.118 0 0 1-.07 0c-.022-.007-.042-.018-.083-.059l-57.69-57.69c-.041-.041-.052-.06-.059-.084a.118.118 0 0 1 0-.069c.007-.023.018-.042.059-.083L454.073 512 166.371 224.297c-.041-.04-.052-.06-.059-.083a.118.118 0 0 1 0-.07c.007-.022.018-.042.059-.083l57.69-57.69c.041-.041.06-.052.084-.059a.118.118 0 0 1 .069 0c.023.007.042.018.083.059L512 454.073l287.703-287.702c.04-.041.06-.052.083-.059a.118.118 0 0 1 .07 0Z"},child:[]}]})(n)}function Sn(n){return oe({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M518.3 459a8 8 0 0 0-12.6 0l-112 141.7a7.98 7.98 0 0 0 6.3 12.9h73.9V856c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V613.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 459z"},child:[]},{tag:"path",attr:{d:"M811.4 366.7C765.6 245.9 648.9 160 512.2 160S258.8 245.8 213 366.6C127.3 389.1 64 467.2 64 560c0 110.5 89.5 200 199.9 200H304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8h-40.1c-33.7 0-65.4-13.4-89-37.7-23.5-24.2-36-56.8-34.9-90.6.9-26.4 9.9-51.2 26.2-72.1 16.7-21.3 40.1-36.8 66.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0 1 52.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10C846.1 454.5 884 503.8 884 560c0 33.1-12.9 64.3-36.3 87.7a123.07 123.07 0 0 1-87.6 36.3H720c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h40.1C870.5 760 960 670.5 960 560c0-92.7-63.1-170.7-148.6-193.3z"},child:[]}]})(n)}const Pn=({percent:n=0,isCanceled:p=!1,isCompleted:o=!1})=>r.jsxs("div",{role:"progressbar",className:"fm-progress",children:[r.jsx("div",{className:"fm-progress-bar",children:r.jsx("div",{className:"fm-progress-bar-fill",style:{width:`${n}%`}})}),p?r.jsx("span",{className:"fm-upload-canceled",children:"Canceled"}):r.jsx("div",{className:"fm-progress-status",children:r.jsx("span",{children:o?"Completed":n+"% done"})})]}),Rn=n=>n.split(".").pop(),kn=n=>{const p=n/1024,o=p/1024,c=o/1024;if(p<1024)return`${p.toFixed(2)} KB`;if(o<1024)return`${o.toFixed(2)} MB`;if(o>=1024)return`${c.toFixed(2)} GB`};function Nn(n){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 388c-72.597 0-132-59.405-132-132 0-72.601 59.403-132 132-132 36.3 0 69.299 15.4 92.406 39.601L278 234h154V80l-51.698 51.702C348.406 99.798 304.406 80 256 80c-96.797 0-176 79.203-176 176s78.094 176 176 176c81.045 0 148.287-54.134 169.401-128H378.85c-18.745 49.561-67.138 84-122.85 84z"},child:[]}]})(n)}const Mn=({index:n,fileData:p,setIsUploading:o,fileUploadConfig:c,handleFileUploaded:d})=>{var E,M,z,I;const[u,l]=D.useState(0),[v,f]=D.useState(!1),[s,h]=D.useState(!1),N=Ht(33),j=D.useRef(),_=P=>new Promise((b,k)=>{const T=new XMLHttpRequest;j.current=T,o(O=>({...O,[n]:!0})),T.upload.onprogress=O=>{if(O.lengthComputable){const X=Math.round(O.loaded/O.total*100);l(X)}},T.onload=()=>{o(O=>({...O,[n]:!1})),T.status===200||T.status===201?(f(!0),d(T.response),b(T.response)):k(T.statusText)},T.onerror=()=>k(T.statusText),T.open("POST",c==null?void 0:c.url,!0);const $=c==null?void 0:c.headers;for(let O in $)T.setRequestHeader(O,$[O]);const ee=new FormData,W=P==null?void 0:P.appendData;for(let O in W)W[O]&&ee.append(O,W[O]);ee.append("file",P.file),T.send(ee)});D.useEffect(()=>{j.current||_(p)},[]);const V=()=>{j.current&&(j.current.abort(),o(P=>({...P,[n]:!1})),h(!0),l(0))},C=()=>{p!=null&&p.file&&(_(p),h(!1))};return r.jsxs("li",{children:[r.jsx("div",{className:"file-icon",children:N[Rn((E=p.file)==null?void 0:E.name)]??r.jsx(ot,{size:33})}),r.jsxs("div",{className:"file",children:[r.jsxs("div",{className:"file-details",children:[r.jsxs("div",{className:"file-info",children:[r.jsx("span",{className:"file-name text-truncate",title:(M=p.file)==null?void 0:M.name,children:(z=p.file)==null?void 0:z.name}),r.jsx("span",{className:"file-size",children:kn((I=p.file)==null?void 0:I.size)})]}),v?r.jsx(dn,{color:"#5c5bb1",title:"Uploaded"}):s?r.jsx(Nn,{className:"retry-upload",title:"Retry",onClick:C}):r.jsx("div",{className:"rm-file",title:"Abort",onClick:V,children:r.jsx(Tn,{})})]}),r.jsx(Pn,{percent:u,isCanceled:s,isCompleted:v})]})]})};var Dt={exports:{}};(function(n,p){(function(c,d){n.exports=d()})(typeof self<"u"?self:xt,function(){return function(o){var c={};function d(u){if(c[u])return c[u].exports;var l=c[u]={i:u,l:!1,exports:{}};return o[u].call(l.exports,l,l.exports,d),l.l=!0,l.exports}return d.m=o,d.c=c,d.d=function(u,l,v){d.o(u,l)||Object.defineProperty(u,l,{configurable:!1,enumerable:!0,get:v})},d.n=function(u){var l=u&&u.__esModule?function(){return u.default}:function(){return u};return d.d(l,"a",l),l},d.o=function(u,l){return Object.prototype.hasOwnProperty.call(u,l)},d.p="/",d(d.s=7)}([function(o,c,d){var u=function(f){};process.env.NODE_ENV!=="production"&&(u=function(f){if(f===void 0)throw new Error("invariant requires an error message argument")});function l(v,f,s,h,N,j,_,V){if(u(f),!v){var C;if(f===void 0)C=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var E=[s,h,N,j,_,V],M=0;C=new Error(f.replace(/%s/g,function(){return E[M++]})),C.name="Invariant Violation"}throw C.framesToPop=1,C}}o.exports=l},function(o,c,d){function u(v){return function(){return v}}var l=function(){};l.thatReturns=u,l.thatReturnsFalse=u(!1),l.thatReturnsTrue=u(!0),l.thatReturnsNull=u(null),l.thatReturnsThis=function(){return this},l.thatReturnsArgument=function(v){return v},o.exports=l},function(o,c,d){/*
|
|
30
|
+
<%s key={someKey} {...props} />`,Ce,ee,je,ee),ot[ee+Ce]=!0}}return r===i?at(W):Nt(W),W}}function it(r,V,K){return Ke(r,V,K,!0)}function st(r,V,K){return Ke(r,V,K,!1)}var At=st,ct=it;$e.Fragment=i,$e.jsx=At,$e.jsxs=ct}()),$e}process.env.NODE_ENV==="production"?ut.exports=jn():ut.exports=wn();var n=ut.exports,zt={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Dt=Y.createContext&&Y.createContext(zt),En=["attr","size","title"];function On(e,p){if(e==null)return{};var s=Tn(e,p),i,d;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(d=0;d<c.length;d++)i=c[d],!(p.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(s[i]=e[i])}return s}function Tn(e,p){if(e==null)return{};var s={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(p.indexOf(i)>=0)continue;s[i]=e[i]}return s}function Je(){return Je=Object.assign?Object.assign.bind():function(e){for(var p=1;p<arguments.length;p++){var s=arguments[p];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},Je.apply(this,arguments)}function It(e,p){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);p&&(i=i.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),s.push.apply(s,i)}return s}function Ge(e){for(var p=1;p<arguments.length;p++){var s=arguments[p]!=null?arguments[p]:{};p%2?It(Object(s),!0).forEach(function(i){Sn(e,i,s[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):It(Object(s)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(s,i))})}return e}function Sn(e,p,s){return p=Pn(p),p in e?Object.defineProperty(e,p,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[p]=s,e}function Pn(e){var p=Rn(e,"string");return typeof p=="symbol"?p:p+""}function Rn(e,p){if(typeof e!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var i=s.call(e,p||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(p==="string"?String:Number)(e)}function $t(e){return e&&e.map((p,s)=>Y.createElement(p.tag,Ge({key:s},p.attr),$t(p.child)))}function oe(e){return p=>Y.createElement(_n,Je({attr:Ge({},e.attr)},p),$t(e.child))}function _n(e){var p=s=>{var{attr:i,size:d,title:c}=e,f=On(e,En),v=d||s.size||"1em",y;return s.className&&(y=s.className),e.className&&(y=(y?y+" ":"")+e.className),Y.createElement("svg",Je({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},s.attr,i,f,{className:y,style:Ge(Ge({color:e.color||s.color},s.style),e.style),height:v,width:v,xmlns:"http://www.w3.org/2000/svg"}),c&&Y.createElement("title",null,c),e.children)};return Dt!==void 0?Y.createElement(Dt.Consumer,null,s=>p(s)):p(zt)}function Lt(e){return oe({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1z"},child:[]}]})(e)}function Mn(e){return oe({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"m.5 3 .04.87a2 2 0 0 0-.342 1.311l.637 7A2 2 0 0 0 2.826 14H9v-1H2.826a1 1 0 0 1-.995-.91l-.637-7A1 1 0 0 1 2.19 4h11.62a1 1 0 0 1 .996 1.09L14.54 8h1.005l.256-2.819A2 2 0 0 0 13.81 3H9.828a2 2 0 0 1-1.414-.586l-.828-.828A2 2 0 0 0 6.172 1H2.5a2 2 0 0 0-2 2m5.672-1a1 1 0 0 1 .707.293L7.586 3H2.19q-.362.002-.683.12L1.5 2.98a1 1 0 0 1 1-.98z"},child:[]},{tag:"path",attr:{d:"M13.5 9a.5.5 0 0 1 .5.5V11h1.5a.5.5 0 1 1 0 1H14v1.5a.5.5 0 1 1-1 0V12h-1.5a.5.5 0 0 1 0-1H13V9.5a.5.5 0 0 1 .5-.5"},child:[]}]})(e)}function Wt(e){return oe({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M3.5 3.5c-.614-.884-.074-1.962.858-2.5L8 7.226 11.642 1c.932.538 1.472 1.616.858 2.5L8.81 8.61l1.556 2.661a2.5 2.5 0 1 1-.794.637L8 9.73l-1.572 2.177a2.5 2.5 0 1 1-.794-.637L7.19 8.61zm2.5 10a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0m7 0a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0"},child:[]}]})(e)}function kn(e){return oe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"23 4 23 10 17 10"},child:[]},{tag:"polyline",attr:{points:"1 20 1 14 7 14"},child:[]},{tag:"path",attr:{d:"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"},child:[]}]})(e)}function Nn(e){return oe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"},child:[]}]})(e)}function An(e){return oe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"},child:[]}]})(e)}function Vn(e){return oe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"},child:[]}]})(e)}function Hn(e){return oe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"},child:[]}]})(e)}function Bt(e){return oe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"},child:[]}]})(e)}function Fn(e){return oe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5-5 5z"},child:[]}]})(e)}function zn(e){return oe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M10.02 6 8.61 7.41 13.19 12l-4.58 4.59L10.02 18l6-6-6-6z"},child:[]}]})(e)}function Ut(e){return oe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M20.005 5.995h-1v2h1v8h-1v2h1c1.103 0 2-.897 2-2v-8c0-1.102-.898-2-2-2zm-14 4H15v4H6.005z"},child:[]},{tag:"path",attr:{d:"M17.005 17.995V4H20V2h-8v2h3.005v1.995h-11c-1.103 0-2 .897-2 2v8c0 1.103.897 2 2 2h11V20H12v2h8v-2h-2.995v-2.005zm-13-2v-8h11v8h-11z"},child:[]}]})(e)}function Dn(e){return oe({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M128 0C92.7 0 64 28.7 64 64V288H19.2C8.6 288 0 296.6 0 307.2C0 349.6 34.4 384 76.8 384H320V288H128V64H448V96h64V64c0-35.3-28.7-64-64-64H128zM512 128H400c-26.5 0-48 21.5-48 48V464c0 26.5 21.5 48 48 48H592c26.5 0 48-21.5 48-48V256H544c-17.7 0-32-14.3-32-32V128zm32 0v96h96l-96-96z"},child:[]}]})(e)}function Yt(e){return oe({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M64 464H320c8.8 0 16-7.2 16-16V160H256c-17.7 0-32-14.3-32-32V48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16zM0 64C0 28.7 28.7 0 64 0H229.5c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64zM192 272V400c0 6.5-3.9 12.3-9.9 14.8s-12.9 1.1-17.4-3.5L129.4 376H112c-8.8 0-16-7.2-16-16V312c0-8.8 7.2-16 16-16h17.4l35.3-35.3c4.6-4.6 11.5-5.9 17.4-3.5s9.9 8.3 9.9 14.8zm85.8-4c11.6 20 18.2 43.3 18.2 68s-6.6 48-18.2 68c-6.6 11.5-21.3 15.4-32.8 8.8s-15.4-21.3-8.8-32.8c7.5-12.9 11.8-27.9 11.8-44s-4.3-31.1-11.8-44c-6.6-11.5-2.7-26.2 8.8-32.8s26.2-2.7 32.8 8.8z"},child:[]}]})(e)}function ge(e){return oe({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M64 464c-8.8 0-16-7.2-16-16V64c0-8.8 7.2-16 16-16H224v80c0 17.7 14.3 32 32 32h80V448c0 8.8-7.2 16-16 16H64zM64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V154.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0H64zm97 289c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L79 303c-9.4 9.4-9.4 24.6 0 33.9l48 48c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-31-31 31-31zM257 255c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l31 31-31 31c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l48-48c9.4-9.4 9.4-24.6 0-33.9l-48-48z"},child:[]}]})(e)}function qt(e){return oe({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M48 448V64c0-8.8 7.2-16 16-16H224v80c0 17.7 14.3 32 32 32h80V448c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16zM64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V154.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0H64zm90.9 233.3c-8.1-10.5-23.2-12.3-33.7-4.2s-12.3 23.2-4.2 33.7L161.6 320l-44.5 57.3c-8.1 10.5-6.3 25.5 4.2 33.7s25.5 6.3 33.7-4.2L192 359.1l37.1 47.6c8.1 10.5 23.2 12.3 33.7 4.2s12.3-23.2 4.2-33.7L222.4 320l44.5-57.3c8.1-10.5 6.3-25.5-4.2-33.7s-25.5-6.3-33.7 4.2L192 280.9l-37.1-47.6z"},child:[]}]})(e)}function ft(e){return oe({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M64 464c-8.8 0-16-7.2-16-16V64c0-8.8 7.2-16 16-16H224v80c0 17.7 14.3 32 32 32h80V448c0 8.8-7.2 16-16 16H64zM64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V154.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0H64zm96 256a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm69.2 46.9c-3-4.3-7.9-6.9-13.2-6.9s-10.2 2.6-13.2 6.9l-41.3 59.7-11.9-19.1c-2.9-4.7-8.1-7.5-13.6-7.5s-10.6 2.8-13.6 7.5l-40 64c-3.1 4.9-3.2 11.1-.4 16.2s8.2 8.2 14 8.2h48 32 40 72c6 0 11.4-3.3 14.2-8.6s2.4-11.6-1-16.5l-72-104z"},child:[]}]})(e)}function In(e){return oe({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M64 464c-8.8 0-16-7.2-16-16V64c0-8.8 7.2-16 16-16H224v80c0 17.7 14.3 32 32 32h80V448c0 8.8-7.2 16-16 16H64zM64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V154.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0H64zm56 256c-13.3 0-24 10.7-24 24s10.7 24 24 24H264c13.3 0 24-10.7 24-24s-10.7-24-24-24H120zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24H264c13.3 0 24-10.7 24-24s-10.7-24-24-24H120z"},child:[]}]})(e)}function $n(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 464l48 0 0 48-48 0c-35.3 0-64-28.7-64-64L0 64C0 28.7 28.7 0 64 0L229.5 0c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3L384 304l-48 0 0-144-80 0c-17.7 0-32-14.3-32-32l0-80L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16zM176 352l32 0c30.9 0 56 25.1 56 56s-25.1 56-56 56l-16 0 0 32c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48 0-80c0-8.8 7.2-16 16-16zm32 80c13.3 0 24-10.7 24-24s-10.7-24-24-24l-16 0 0 48 16 0zm96-80l32 0c26.5 0 48 21.5 48 48l0 64c0 26.5-21.5 48-48 48l-32 0c-8.8 0-16-7.2-16-16l0-128c0-8.8 7.2-16 16-16zm32 128c8.8 0 16-7.2 16-16l0-64c0-8.8-7.2-16-16-16l-16 0 0 96 16 0zm80-112c0-8.8 7.2-16 16-16l48 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0 0 32 32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0 0 48c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-64 0-64z"},child:[]}]})(e)}function Kt(e){return oe({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M64 464c-8.8 0-16-7.2-16-16V64c0-8.8 7.2-16 16-16H224v80c0 17.7 14.3 32 32 32h80V448c0 8.8-7.2 16-16 16H64zM64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V154.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0H64zm72 208c-13.3 0-24 10.7-24 24V336v56c0 13.3 10.7 24 24 24s24-10.7 24-24V360h44c42 0 76-34 76-76s-34-76-76-76H136zm68 104H160V256h44c15.5 0 28 12.5 28 28s-12.5 28-28 28z"},child:[]}]})(e)}function Jt(e){return oe({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M320 464c8.8 0 16-7.2 16-16V160H256c-17.7 0-32-14.3-32-32V48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16H320zM0 64C0 28.7 28.7 0 64 0H229.5c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64zM80 288c0-17.7 14.3-32 32-32h96c17.7 0 32 14.3 32 32v16l44.9-29.9c2-1.3 4.4-2.1 6.8-2.1c6.8 0 12.3 5.5 12.3 12.3V387.7c0 6.8-5.5 12.3-12.3 12.3c-2.4 0-4.8-.7-6.8-2.1L240 368v16c0 17.7-14.3 32-32 32H112c-17.7 0-32-14.3-32-32V288z"},child:[]}]})(e)}function Gt(e){return oe({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M48 448V64c0-8.8 7.2-16 16-16H224v80c0 17.7 14.3 32 32 32h80V448c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16zM64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V154.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0H64zm55 241.1c-3.8-12.7-17.2-19.9-29.9-16.1s-19.9 17.2-16.1 29.9l48 160c3 10.2 12.4 17.1 23 17.1s19.9-7 23-17.1l25-83.4 25 83.4c3 10.2 12.4 17.1 23 17.1s19.9-7 23-17.1l48-160c3.8-12.7-3.4-26.1-16.1-29.9s-26.1 3.4-29.9 16.1l-25 83.4-25-83.4c-3-10.2-12.4-17.1-23-17.1s-19.9 7-23 17.1l-25 83.4-25-83.4z"},child:[]}]})(e)}function dt(e){return oe({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M320 464c8.8 0 16-7.2 16-16V160H256c-17.7 0-32-14.3-32-32V48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16H320zM0 64C0 28.7 28.7 0 64 0H229.5c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64z"},child:[]}]})(e)}function Ln(e){return oe({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M384 480h48c11.4 0 21.9-6 27.6-15.9l112-192c5.8-9.9 5.8-22.1 .1-32.1S555.5 224 544 224H144c-11.4 0-21.9 6-27.6 15.9L48 357.1V96c0-8.8 7.2-16 16-16H181.5c4.2 0 8.3 1.7 11.3 4.7l26.5 26.5c21 21 49.5 32.8 79.2 32.8H416c8.8 0 16 7.2 16 16v32h48V160c0-35.3-28.7-64-64-64H298.5c-17 0-33.3-6.7-45.3-18.7L226.7 50.7c-12-12-28.3-18.7-45.3-18.7H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H87.7 384z"},child:[]}]})(e)}function pt(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M104.6 48H64C28.7 48 0 76.7 0 112V384c0 35.3 28.7 64 64 64h96V400H64c-8.8 0-16-7.2-16-16V112c0-8.8 7.2-16 16-16H80c0 17.7 14.3 32 32 32h72.4C202 108.4 227.6 96 256 96h62c-7.1-27.6-32.2-48-62-48H215.4C211.6 20.9 188.2 0 160 0s-51.6 20.9-55.4 48zM144 56a16 16 0 1 1 32 0 16 16 0 1 1 -32 0zM448 464H256c-8.8 0-16-7.2-16-16V192c0-8.8 7.2-16 16-16l140.1 0L464 243.9V448c0 8.8-7.2 16-16 16zM256 512H448c35.3 0 64-28.7 64-64V243.9c0-12.7-5.1-24.9-14.1-33.9l-67.9-67.9c-9-9-21.2-14.1-33.9-14.1H256c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64z"},child:[]}]})(e)}const vt=(e,p)=>{const s=p.filter(i=>i.path===e.path+"/"+e.name);return{...e,children:s.map(i=>vt(i,p))}},Wn=({allowCreateFolder:e=!0,allowUploadFile:p=!0,handleRefresh:s,isItemSelection:i,setIsItemSelection:d,currentPath:c,selectedFile:f,setSelectedFile:v,files:y,clipBoard:l,setClipBoard:h,handlePaste:O,triggerAction:j})=>{const[A,I]=Y.useState([{icon:n.jsx(Mn,{size:17,strokeWidth:.3}),text:"New Folder",permission:e,onClick:()=>j.show("createFolder")},{icon:n.jsx(Fn,{size:18}),text:"Upload Files",permission:p,onClick:()=>j.show("uploadFile")},{icon:n.jsx(pt,{size:18}),text:"Paste",permission:!1,onClick:()=>{}}]),g=[{icon:n.jsx(kn,{size:16}),title:"Refresh",onClick:s}],F=(B,R,w)=>{const o=w.files[0];B.filter(U=>{const X=U.path===o.path&&U.name===o.name,J=U.path.startsWith(o.path+"/"+o.name);return X||J});const E=B.find(U=>U.path===R),T=w.isMoving?"move":"copy";O(o,E,T),w.isMoving&&h(null),d(!1),v(null)};Y.useEffect(()=>{I(B=>B.map(R=>R.text==="Paste"?{...R,permission:!!l,onClick:()=>F(y,c,l)}:R))},[l,c,y]);const H=B=>{h({files:[{...vt(f,y)}],isMoving:B})};if(i){const B=f.path;return n.jsx("div",{className:"toolbar file-selected",children:n.jsxs("div",{className:"file-action-container",children:[n.jsxs("div",{children:[n.jsxs("button",{className:"item-action file-action",onClick:()=>H(!0),children:[n.jsx(Wt,{size:18}),n.jsx("span",{children:"Cut"})]}),n.jsxs("button",{className:"item-action file-action",onClick:()=>H(!1),children:[n.jsx(Lt,{strokeWidth:.1,size:17}),n.jsx("span",{children:"Copy"})]}),f.isDirectory?n.jsxs("button",{className:"item-action file-action",onClick:()=>F(y,B,l),disabled:!l,children:[n.jsx(pt,{size:18}),n.jsx("span",{children:"Paste"})]}):n.jsx(n.Fragment,{}),n.jsxs("button",{className:"item-action file-action",onClick:()=>j.show("rename"),children:[n.jsx(Ut,{size:19}),n.jsx("span",{children:"Rename"})]}),n.jsxs("button",{className:"item-action file-action",onClick:()=>j.show("delete"),children:[n.jsx(Bt,{size:19}),n.jsx("span",{children:"Delete"})]})]}),n.jsxs("button",{className:"item-action file-action",onClick:()=>d(!1),children:[n.jsx(An,{size:18}),n.jsx("span",{children:"Clear Selection"})]})]})})}return n.jsx("div",{className:"toolbar",children:n.jsxs("div",{className:"fm-toolbar",children:[n.jsx("div",{children:A.filter(B=>B.permission).map((B,R)=>n.jsxs("button",{className:"item-action",onClick:B.onClick,children:[B.icon,n.jsx("span",{children:B.text})]},R))}),n.jsx("div",{children:g.map((B,R)=>n.jsxs("div",{className:"toolbar-left-items",children:[n.jsx("div",{className:"item-action icon-only",title:B.title,role:"button",onClick:B.onClick,children:B.icon}),R!==g.length-1&&n.jsx("div",{className:"item-separator"})]},R))})]})})};var Xt={exports:{}};(function(e,p){(function(s,i){e.exports=i(Y)})(Vt,function(s){return function(i){var d={};function c(f){if(d[f])return d[f].exports;var v=d[f]={i:f,l:!1,exports:{}};return i[f].call(v.exports,v,v.exports,c),v.l=!0,v.exports}return c.m=i,c.c=d,c.d=function(f,v,y){c.o(f,v)||Object.defineProperty(f,v,{enumerable:!0,get:y})},c.r=function(f){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(f,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(f,"__esModule",{value:!0})},c.t=function(f,v){if(1&v&&(f=c(f)),8&v||4&v&&typeof f=="object"&&f&&f.__esModule)return f;var y=Object.create(null);if(c.r(y),Object.defineProperty(y,"default",{enumerable:!0,value:f}),2&v&&typeof f!="string")for(var l in f)c.d(y,l,(function(h){return f[h]}).bind(null,l));return y},c.n=function(f){var v=f&&f.__esModule?function(){return f.default}:function(){return f};return c.d(v,"a",v),v},c.o=function(f,v){return Object.prototype.hasOwnProperty.call(f,v)},c.p="",c(c.s=4)}([function(i,d,c){i.exports=c(2)()},function(i,d){i.exports=s},function(i,d,c){var f=c(3);function v(){}function y(){}y.resetWarningCache=v,i.exports=function(){function l(j,A,I,g,F,H){if(H!==f){var B=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw B.name="Invariant Violation",B}}function h(){return l}l.isRequired=l;var O={array:l,bigint:l,bool:l,func:l,number:l,object:l,string:l,symbol:l,any:l,arrayOf:h,element:l,elementType:l,instanceOf:h,node:l,objectOf:h,oneOf:h,oneOfType:h,shape:h,exact:h,checkPropTypes:y,resetWarningCache:v};return O.PropTypes=O,O}},function(i,d,c){i.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(i,d,c){c.r(d);var f=c(1),v=c.n(f),y=c(0),l=c.n(y),h=function(o){return o!==0};function O(){return(O=Object.assign?Object.assign.bind():function(o){for(var E=1;E<arguments.length;E++){var T=arguments[E];for(var U in T)Object.prototype.hasOwnProperty.call(T,U)&&(o[U]=T[U])}return o}).apply(this,arguments)}function j(o){return(j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E})(o)}function A(o,E){for(var T=0;T<E.length;T++){var U=E[T];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(o,U.key,U)}}function I(o,E){return(I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(T,U){return T.__proto__=U,T})(o,E)}function g(o){var E=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var T,U=B(o);if(E){var X=B(this).constructor;T=Reflect.construct(U,arguments,X)}else T=U.apply(this,arguments);return F(this,T)}}function F(o,E){if(E&&(j(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return H(o)}function H(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function B(o){return(B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)})(o)}function R(o,E,T){return E in o?Object.defineProperty(o,E,{value:T,enumerable:!0,configurable:!0,writable:!0}):o[E]=T,o}var w=function(o){(function(J,D){if(typeof D!="function"&&D!==null)throw new TypeError("Super expression must either be null or a function");J.prototype=Object.create(D&&D.prototype,{constructor:{value:J,writable:!0,configurable:!0}}),Object.defineProperty(J,"prototype",{writable:!1}),D&&I(J,D)})(X,o);var E,T,U=g(X);function X(J){var D;return function(Z,se){if(!(Z instanceof se))throw new TypeError("Cannot call a class as a function")}(this,X),R(H(D=U.call(this,J)),"continueOpenCollapsible",function(){var Z=H(D).innerRef;D.setState({height:Z.scrollHeight,transition:"height ".concat(D.props.transitionTime,"ms ").concat(D.props.easing),isClosed:!1,hasBeenOpened:!0,inTransition:h(Z.scrollHeight),shouldOpenOnNextCycle:!1})}),R(H(D),"handleTriggerClick",function(Z){D.props.triggerDisabled||D.state.inTransition||(Z.preventDefault(),D.props.handleTriggerClick?D.props.handleTriggerClick(D.props.accordionPosition):D.state.isClosed===!0?(D.openCollapsible(),D.props.onOpening(),D.props.onTriggerOpening()):(D.closeCollapsible(),D.props.onClosing(),D.props.onTriggerClosing()))}),R(H(D),"handleTransitionEnd",function(Z){Z.target===D.innerRef&&(D.state.isClosed?(D.setState({inTransition:!1}),D.props.onClose()):(D.setState({height:"auto",overflow:D.props.overflowWhenOpen,inTransition:!1}),D.props.onOpen()))}),R(H(D),"setInnerRef",function(Z){return D.innerRef=Z}),D.timeout=void 0,D.contentId=J.contentElementId||"collapsible-content-".concat(Date.now()),D.triggerId=J.triggerElementProps.id||"collapsible-trigger-".concat(Date.now()),J.open?D.state={isClosed:!1,shouldSwitchAutoOnNextCycle:!1,height:"auto",transition:"none",hasBeenOpened:!0,overflow:J.overflowWhenOpen,inTransition:!1}:D.state={isClosed:!0,shouldSwitchAutoOnNextCycle:!1,height:0,transition:"height ".concat(J.transitionTime,"ms ").concat(J.easing),hasBeenOpened:!1,overflow:"hidden",inTransition:!1},D}return E=X,(T=[{key:"componentDidUpdate",value:function(J,D){var Z=this;this.state.shouldOpenOnNextCycle&&this.continueOpenCollapsible(),D.height!=="auto"&&D.height!==0||this.state.shouldSwitchAutoOnNextCycle!==!0||(window.clearTimeout(this.timeout),this.timeout=window.setTimeout(function(){Z.setState({height:0,overflow:"hidden",isClosed:!0,shouldSwitchAutoOnNextCycle:!1})},50)),J.open!==this.props.open&&(this.props.open===!0?(this.openCollapsible(),this.props.onOpening()):(this.closeCollapsible(),this.props.onClosing()))}},{key:"componentWillUnmount",value:function(){window.clearTimeout(this.timeout)}},{key:"closeCollapsible",value:function(){var J=this.innerRef;this.setState({shouldSwitchAutoOnNextCycle:!0,height:J.scrollHeight,transition:"height ".concat(this.props.transitionCloseTime?this.props.transitionCloseTime:this.props.transitionTime,"ms ").concat(this.props.easing),inTransition:h(J.scrollHeight)})}},{key:"openCollapsible",value:function(){this.setState({inTransition:h(this.innerRef.scrollHeight),shouldOpenOnNextCycle:!0})}},{key:"renderNonClickableTriggerElement",value:function(){var J=this.props,D=J.triggerSibling,Z=J.classParentString;if(!D)return null;switch(j(D)){case"string":return v.a.createElement("span",{className:"".concat(Z,"__trigger-sibling")},D);case"function":return D();case"object":return D;default:return null}}},{key:"render",value:function(){var J=this,D={height:this.state.height,WebkitTransition:this.state.transition,msTransition:this.state.transition,transition:this.state.transition,overflow:this.state.overflow},Z=this.state.isClosed?"is-closed":"is-open",se=this.props.triggerDisabled?"is-disabled":"",fe=this.state.isClosed===!1&&this.props.triggerWhenOpen!==void 0?this.props.triggerWhenOpen:this.props.trigger,he=this.props.contentContainerTagName,Q=this.props.triggerTagName,ye=this.props.lazyRender&&!this.state.hasBeenOpened&&this.state.isClosed&&!this.state.inTransition?null:this.props.children,de=this.props,ce=de.classParentString,_=de.contentOuterClassName,q=de.contentInnerClassName,b="".concat(ce,"__trigger ").concat(Z," ").concat(se," ").concat(this.state.isClosed?this.props.triggerClassName:this.props.triggerOpenedClassName),M="".concat(ce," ").concat(this.state.isClosed?this.props.className:this.props.openedClassName),$="".concat(ce,"__contentOuter ").concat(_),k="".concat(ce,"__contentInner ").concat(q);return v.a.createElement(he,O({className:M.trim()},this.props.containerElementProps),v.a.createElement(Q,O({id:this.triggerId,className:b.trim(),onClick:this.handleTriggerClick,style:this.props.triggerStyle&&this.props.triggerStyle,onKeyPress:function(z){var a=z.key;(a===" "&&J.props.triggerTagName.toLowerCase()!=="button"||a==="Enter")&&J.handleTriggerClick(z)},tabIndex:this.props.tabIndex&&this.props.tabIndex,"aria-expanded":!this.state.isClosed,"aria-disabled":this.props.triggerDisabled,"aria-controls":this.contentId,role:"button"},this.props.triggerElementProps),fe),this.renderNonClickableTriggerElement(),v.a.createElement("div",{id:this.contentId,className:$.trim(),style:D,onTransitionEnd:this.handleTransitionEnd,ref:this.setInnerRef,hidden:this.props.contentHiddenWhenClosed&&this.state.isClosed&&!this.state.inTransition,role:"region","aria-labelledby":this.triggerId},v.a.createElement("div",{className:k.trim()},ye)))}}])&&A(E.prototype,T),Object.defineProperty(E,"prototype",{writable:!1}),X}(f.Component);w.propTypes={transitionTime:l.a.number,transitionCloseTime:l.a.number,triggerTagName:l.a.string,easing:l.a.string,open:l.a.bool,containerElementProps:l.a.object,triggerElementProps:l.a.object,contentElementId:l.a.string,classParentString:l.a.string,className:l.a.string,openedClassName:l.a.string,triggerStyle:l.a.object,triggerClassName:l.a.string,triggerOpenedClassName:l.a.string,contentOuterClassName:l.a.string,contentInnerClassName:l.a.string,accordionPosition:l.a.oneOfType([l.a.string,l.a.number]),handleTriggerClick:l.a.func,onOpen:l.a.func,onClose:l.a.func,onOpening:l.a.func,onClosing:l.a.func,onTriggerOpening:l.a.func,onTriggerClosing:l.a.func,trigger:l.a.oneOfType([l.a.string,l.a.element]),triggerWhenOpen:l.a.oneOfType([l.a.string,l.a.element]),triggerDisabled:l.a.bool,lazyRender:l.a.bool,overflowWhenOpen:l.a.oneOf(["hidden","visible","auto","scroll","inherit","initial","unset"]),contentHiddenWhenClosed:l.a.bool,triggerSibling:l.a.oneOfType([l.a.string,l.a.element,l.a.func]),tabIndex:l.a.number,contentContainerTagName:l.a.string,children:l.a.oneOfType([l.a.string,l.a.element])},w.defaultProps={transitionTime:400,transitionCloseTime:null,triggerTagName:"span",easing:"linear",open:!1,classParentString:"Collapsible",triggerDisabled:!1,lazyRender:!1,overflowWhenOpen:"hidden",contentHiddenWhenClosed:!1,openedClassName:"",triggerStyle:null,triggerClassName:"",triggerOpenedClassName:"",contentOuterClassName:"",contentInnerClassName:"",className:"",triggerSibling:null,onOpen:function(){},onClose:function(){},onOpening:function(){},onClosing:function(){},onTriggerOpening:function(){},onTriggerClosing:function(){},tabIndex:null,contentContainerTagName:"div",triggerElementProps:{}},d.default=w}])})})(Xt);var Bn=Xt.exports;const Un=lt(Bn);function Yn(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 48c110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200-110.532 0-200-89.451-200-200 0-110.532 89.451-200 200-200m140.204 130.267l-22.536-22.718c-4.667-4.705-12.265-4.736-16.97-.068L215.346 303.697l-59.792-60.277c-4.667-4.705-12.265-4.736-16.97-.069l-22.719 22.536c-4.705 4.667-4.736 12.265-.068 16.971l90.781 91.516c4.667 4.705 12.265 4.736 16.97.068l172.589-171.204c4.704-4.668 4.734-12.266.067-16.971z"},child:[]}]})(e)}function qn(e){return oe({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M128.3 160v32h32v-32zm64-96h-32v32h32zm-64 32v32h32V96zm64 32h-32v32h32zm177.6-30.1L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM256 51.9l76.1 76.1H256zM336 464H48V48h79.7v16h32V48H208v104c0 13.3 10.7 24 24 24h104zM194.2 265.7c-1.1-5.6-6-9.7-11.8-9.7h-22.1v-32h-32v32l-19.7 97.1C102 385.6 126.8 416 160 416c33.1 0 57.9-30.2 51.5-62.6zm-33.9 124.4c-17.9 0-32.4-12.1-32.4-27s14.5-27 32.4-27 32.4 12.1 32.4 27-14.5 27-32.4 27zm32-198.1h-32v32h32z"},child:[]}]})(e)}function Zt(e){return oe({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M527.9 224H480v-48c0-26.5-21.5-48-48-48H272l-64-64H48C21.5 64 0 85.5 0 112v288c0 26.5 21.5 48 48 48h400c16.5 0 31.9-8.5 40.7-22.6l79.9-128c20-31.9-3-73.4-40.7-73.4zM48 118c0-3.3 2.7-6 6-6h134.1l64 64H426c3.3 0 6 2.7 6 6v42H152c-16.8 0-32.4 8.8-41.1 23.2L48 351.4zm400 282H72l77.2-128H528z"},child:[]}]})(e)}function Qt(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 128H272l-54.63-54.63c-6-6-14.14-9.37-22.63-9.37H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48zm0 272H48V112h140.12l54.63 54.63c6 6 14.14 9.37 22.63 9.37H464v224z"},child:[]}]})(e)}const en=({folder:e,setCurrentPath:p,currentPath:s})=>{const[i,d]=Y.useState(!1),[c,f]=Y.useState(!1),v=()=>{f(!0),p(e.path)},y=l=>{l.stopPropagation(),d(h=>!h)};return Y.useEffect(()=>{f(s===e.path);const l=s.split("/");l.pop(),l.join("/")===e.path&&d(!0)},[s]),e.subDirectories.length>0?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:`sb-folders-list-item ${c?"active-list-item":""}`,onClick:v,children:[n.jsx("span",{onClick:y,children:n.jsx(Vn,{size:20,className:`${i?"folder-rotate-down":"folder-rotate-right"}`})}),n.jsxs("div",{className:"sb-folder-details",children:[i||c?n.jsx(Zt,{size:20,className:"folder-open-icon"}):n.jsx(Qt,{size:17,className:"folder-close-icon"}),n.jsx("span",{className:"sb-folder-name",title:e.name,children:e.name})]})]}),n.jsx(Un,{open:i,children:n.jsx("div",{className:"folder-collapsible",children:e.subDirectories.map((l,h)=>n.jsx(en,{folder:l,setCurrentPath:p,currentPath:s},h))})})]}):n.jsxs("div",{className:`sb-folders-list-item ${c?"active-list-item":""}`,onClick:v,children:[n.jsx("span",{className:"non-expanable"}),n.jsxs("div",{className:"sb-folder-details",children:[c?n.jsx(Zt,{size:20,className:"folder-open-icon"}):n.jsx(Qt,{size:17,className:"folder-close-icon"}),n.jsx("span",{className:"sb-folder-name",title:e.name,children:e.name})]})]})},Kn=e=>e==null?void 0:e.split("/").slice(0,-1).join("/"),Jn=({files:e,currentPath:p,setCurrentPath:s})=>{const[i,d]=Y.useState([]),c=(f,v)=>{var y;return v[f]?(y=v[f])==null?void 0:y.map(l=>({...l,subDirectories:c(l.path,v)})):[]};return Y.useEffect(()=>{if(Array.isArray(e)){const f=e.filter(y=>y.isDirectory),v=Object.groupBy(f,({path:y})=>Kn(y));d(()=>c("",v))}},[e]),n.jsx("div",{className:"sb-folders-list",children:(i==null?void 0:i.length)>0?n.jsx(n.Fragment,{children:i==null?void 0:i.map((f,v)=>n.jsx(en,{folder:f,setCurrentPath:s,currentPath:p},v))}):n.jsx("div",{className:"empty-nav-pane",children:"Nothing here yet"})})},Gn=({currentPath:e,setCurrentPath:p})=>{const[s,i]=Y.useState([]);Y.useEffect(()=>{i(e==null?void 0:e.split("/"))},[e]);const d=c=>{c<s.length-1&&p(()=>{const f=s.length-(c+1);return s.slice(0,-f).join("/")})};return n.jsx("div",{className:"breadcrumb",children:s.map((c,f)=>n.jsx("span",{className:"folder-name",onClick:()=>d(f),children:f===0?n.jsxs(n.Fragment,{children:[n.jsx(Nn,{})," Home"]}):n.jsxs(n.Fragment,{children:[n.jsx(zn,{})," ",c]})},f))})};function Xn(e){return oe({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208h0a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Zm112,136H43.1l26.67-80H232Z"},child:[]}]})(e)}const Zn=({children:e,filesViewRef:p,contextMenuRef:s,content:i,visible:d,setVisible:c})=>{const[f,v]=Y.useState(0),[y,l]=Y.useState(0),h=O=>{O.preventDefault(),c(!0);const j=O.clientX,A=O.clientY,g=p.current.getBoundingClientRect();g.width,g.height;const F=135,H=242,B=j-g.left,R=g.width-B>F,w=!R,o=A-g.top,E=g.height-o>H,T=!E;R?v(`${j-g.left+10}px`):w&&v(`${j-g.left-F}px`),E?l(`${A-g.top+10}px`):T&&l(`${A-g.top-H+20}px`)};return n.jsxs("div",{onContextMenu:h,onClick:O=>c(!1),children:[e,d&&n.jsx("div",{ref:s,className:"fm-context-menu",style:{top:y,left:f},children:i})]})},ht=(e=()=>{})=>{const[p,s]=Y.useState(!1),i=Y.useRef(null),d=c=>{var f;(f=i.current)!=null&&f.contains(c.target)?s(!1):(s(!0),e(c,i))};return Y.useEffect(()=>(document.addEventListener("click",d,!0),document.addEventListener("mousedown",d,!0),()=>{document.removeEventListener("click",d,!0),document.removeEventListener("mousedown",d,!0)}),[]),{ref:i,isClicked:p,setIsClicked:s}},tn=e=>({pdf:n.jsx($n,{size:e}),jpg:n.jsx(ft,{size:e}),jpeg:n.jsx(ft,{size:e}),png:n.jsx(ft,{size:e}),txt:n.jsx(In,{size:e}),doc:n.jsx(Gt,{size:e}),docx:n.jsx(Gt,{size:e}),mp4:n.jsx(Jt,{size:e}),webm:n.jsx(Jt,{size:e}),mp3:n.jsx(Yt,{size:e}),m4a:n.jsx(Yt,{size:e}),zip:n.jsx(qn,{size:e}),ppt:n.jsx(Kt,{size:e}),pptx:n.jsx(Kt,{size:e}),xls:n.jsx(qt,{size:e}),xlsx:n.jsx(qt,{size:e}),exe:n.jsx(Dn,{size:e}),html:n.jsx(ge,{size:e}),css:n.jsx(ge,{size:e}),js:n.jsx(ge,{size:e}),php:n.jsx(ge,{size:e}),py:n.jsx(ge,{size:e}),java:n.jsx(ge,{size:e}),cpp:n.jsx(ge,{size:e}),c:n.jsx(ge,{size:e}),ts:n.jsx(ge,{size:e}),jsx:n.jsx(ge,{size:e}),tsx:n.jsx(ge,{size:e}),json:n.jsx(ge,{size:e}),xml:n.jsx(ge,{size:e}),sql:n.jsx(ge,{size:e}),csv:n.jsx(ge,{size:e}),md:n.jsx(ge,{size:e}),svg:n.jsx(ge,{size:e})}),nn=(e,p,s)=>{if(s.find(i=>i.name===e)){const i="",d=e;let c=0;const f=new RegExp(`${d} \\(\\d+\\)`);s.forEach(l=>{const h=l.isDirectory?l.name:l.name.split(".").slice(0,-1).join(".");if(f.test(h)){const O=h.split(`${d} (`).pop().slice(0,-1),j=parseInt(O);!isNaN(j)&&j>c&&(c=j)}});const v=` (${++c})`;return d+v+i}else return e},Qn=220,er=({filesViewRef:e,file:p,currentPathFiles:s,setCurrentPathFiles:i,handleCreateFolder:d,currentFolder:c,triggerAction:f})=>{const[v,y]=Y.useState(p.name),[l,h]=Y.useState(!1),[O,j]=Y.useState(""),[A,I]=Y.useState("right"),g=ht(R=>{R.preventDefault(),R.stopPropagation()}),F=R=>{y(R.target.value),h(!1)},H=R=>{if(R.key==="Enter"){R.preventDefault(),R.stopPropagation(),B();return}/[\\/:*?"<>|]/.test(R.key)?(R.preventDefault(),j(`A file name can't contain any of the following characters: \\ / : * ? " < > |`),h(!0)):(h(!1),j(""))};Y.useEffect(()=>{if(l){const R=setTimeout(()=>{h(!1),j("")},7e3);return()=>clearTimeout(R)}},[l]);function B(){var E,T;let R=v.trim();const w=s.filter(U=>!(U.key&&U.key===p.key));if(w.find(U=>U.name.toLowerCase()===R.toLowerCase())){j(`This destination already contains a folder named '${R}'.`),h(!0),(E=g.ref.current)==null||E.focus(),(T=g.ref.current)==null||T.select(),g.setIsClicked(!1);return}R===""&&(R=nn("New Folder",!0,w)),d(R,c),i(U=>U.filter(X=>X.key!==p.key)),f.close()}return Y.useEffect(()=>{var R,w,o;if((R=g.ref.current)==null||R.focus(),(w=g.ref.current)==null||w.select(),(o=g.ref)!=null&&o.current){const T=e.current.getBoundingClientRect(),U=g.ref.current.getBoundingClientRect();T.right-U.left>313?I("right"):I("left")}},[]),Y.useEffect(()=>{g.isClicked&&B()},[g.isClicked]),n.jsxs("div",{className:"rename-file-container",children:[n.jsx("textarea",{ref:g.ref,className:"rename-file",maxLength:Qn,value:v,onChange:F,onKeyDown:H,onClick:R=>R.stopPropagation()}),l&&n.jsx("p",{className:`folder-name-error ${A}`,children:O})]})},Le=({onClick:e,type:p="primary",padding:s="0.4rem 0.8rem",children:i})=>n.jsx("button",{onClick:e,className:`fm-button fm-button-${p}`,style:{padding:s},children:i});function tr(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M85.57 446.25h340.86a32 32 0 0 0 28.17-47.17L284.18 82.58c-12.09-22.44-44.27-22.44-56.36 0L57.4 399.08a32 32 0 0 0 28.17 47.17z"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"m250.26 195.39 5.74 122 5.73-121.95a5.74 5.74 0 0 0-5.79-6h0a5.74 5.74 0 0 0-5.68 5.95z"},child:[]},{tag:"path",attr:{d:"M256 397.25a20 20 0 1 1 20-20 20 20 0 0 1-20 20z"},child:[]}]})(e)}const rn=({children:e,show:p,setShow:s,heading:i,dialogWidth:d="25%",contentClassName:c=""})=>{const f=Y.useRef(null);return Y.useEffect(()=>{p?f.current.showModal():f.current.close()},[p]),n.jsxs("dialog",{ref:f,className:"fm-modal dialog",style:{width:d},children:[n.jsxs("div",{className:"fm-modal-header",children:[n.jsx("span",{className:"fm-modal-heading",children:i}),n.jsx(Hn,{size:18,onClick:()=>s(!1),className:"close-icon",title:"Close"})]}),e]})},Xe=e=>e.split(".").pop(),nr=220,rr=({filesViewRef:e,file:p,currentPathFiles:s,setCurrentPathFiles:i,handleRename:d,triggerAction:c})=>{const[f,v]=Y.useState(p==null?void 0:p.name),[y,l]=Y.useState(!1),[h,O]=Y.useState(!1),[j,A]=Y.useState(""),[I,g]=Y.useState("right"),F=Y.useRef(null),H=ht(o=>{var E;(E=F.current)!=null&&E.contains(o.target)||(o.preventDefault(),o.stopPropagation())}),B=o=>{if(o.key==="Enter"){o.preventDefault(),o.stopPropagation(),H.setIsClicked(!0);return}/[\\/:*?"<>|]/.test(o.key)?(o.preventDefault(),A(`A file name can't contain any of the following characters: \\ / : * ? " < > |`),O(!0)):O(!1)};Y.useEffect(()=>{if(h){const o=setTimeout(()=>{O(!1),A("")},7e3);return()=>clearTimeout(o)}},[h]);function R(o){if(f===""||f===p.name){i(E=>E.map(T=>(T.key===p.key&&(T.isEditing=!1),T))),c.close();return}else if(s.some(E=>E.name===f)){O(!0),A(`This destination already contains a folder named '${f}'.`),H.setIsClicked(!1);return}else if(!p.isDirectory&&!o){const E=Xe(p.name),T=Xe(f);if(E!==T){l(!0);return}}O(!1),d(p,f),i(E=>E.filter(T=>T.key!==p.key)),c.close()}const w=()=>{var o,E,T,U,X,J;if((E=(o=H.ref)==null?void 0:o.current)==null||E.focus(),p.isDirectory)(U=(T=H.ref)==null?void 0:T.current)==null||U.select();else{const D=Xe(p.name),Z=p.name.length-D.length-1;(J=(X=H.ref)==null?void 0:X.current)==null||J.setSelectionRange(0,Z)}};return Y.useEffect(()=>{var o;if(w(),(o=H.ref)!=null&&o.current){const T=e.current.getBoundingClientRect(),U=H.ref.current.getBoundingClientRect();T.right-U.left>313?g("right"):g("left")}},[]),Y.useEffect(()=>{H.isClicked&&R(!1),w()},[H.isClicked]),n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"rename-file-container",children:[n.jsx("textarea",{ref:H.ref,className:"rename-file",maxLength:nr,value:f,onChange:o=>{v(o.target.value),O(!1)},onKeyDown:B,onClick:o=>o.stopPropagation()}),h&&n.jsx("p",{className:`folder-name-error ${I}`,children:j})]}),n.jsx(rn,{heading:"Rename",show:y,setShow:l,dialogWidth:"25vw",children:n.jsxs("div",{className:"fm-rename-folder-container",ref:F,children:[n.jsx("div",{className:"fm-rename-folder-input",children:n.jsxs("div",{className:"fm-rename-warning",children:[n.jsx(tr,{size:70,color:"orange"}),n.jsx("div",{children:"If you change a file name extension, the file might become unusable. Are you sure you want to change it?"})]})}),n.jsxs("div",{className:"fm-rename-folder-action",children:[n.jsx(Le,{type:"secondary",onClick:()=>{l(!1),H.setIsClicked(!1)},children:"No"}),n.jsx(Le,{type:"danger",onClick:()=>{l(!1),R(!0)},children:"Yes"})]})]})})]})},ar=({filesViewRef:e,file:p,index:s,selectedFileIndex:i,setSelectedFileIndex:d,setCurrentPath:c,isItemSelection:f,setIsItemSelection:v,setSelectedFile:y,currentPath:l,clipBoard:h,setClipBoard:O,handlePaste:j,files:A,triggerAction:I,currentFolder:g,handleCreateFolder:F,currentPathFiles:H,setCurrentPathFiles:B,handleRename:R})=>{var M,$;const w=tn(48),[o,E]=Y.useState(!1),[T,U]=Y.useState(!1),[X,J]=Y.useState(0),[D,Z]=Y.useState(!1),se=(h==null?void 0:h.isMoving)&&h.files.find(k=>k.name===p.name&&k.path===p.path),fe=ht(()=>{E(!1)}),he=(k,z)=>{k.stopPropagation(),O({files:[{...vt(p,A)}],isMoving:z}),E(!1)},Q=k=>{if(k.stopPropagation(),h){const z=p.path,a=h.files[0];A.filter(x=>{const L=x.path===a.path&&x.name===a.name,C=x.path.startsWith(a.path+"/"+a.name);return L||C});const m=A.find(x=>x.path===z),P=h.isMoving?"move":"copy";j(a,m,P),h.isMoving&&O(null),v(!1),y(null),E(!1)}},ye=k=>{k.stopPropagation(),E(!1),I.show("rename")},de=k=>{k.stopPropagation(),E(!1),I.show("delete")},ce=()=>{E(!1),p.isDirectory?(c(k=>k+"/"+p.name),d(null)):Z(!0)},_=k=>{if(k.stopPropagation(),p.isEditing)return;v(!0),y(p),d(s);const z=new Date().getTime();z-X<300&&(v(!1),ce()),J(z)},q=k=>{k.stopPropagation(),k.key==="Enter"&&ce()};Y.useEffect(()=>{U(i===s)},[i]),Y.useEffect(()=>{i===s&&U(f)},[f]);const b=n.jsx("div",{className:"file-context-menu-list",children:n.jsxs("ul",{children:[n.jsxs("li",{onClick:ce,children:[p.isDirectory?n.jsx(Xn,{size:20}):n.jsx(dt,{size:16}),n.jsx("span",{children:"Open"})]}),n.jsxs("li",{onClick:k=>he(k,!0),children:[n.jsx(Wt,{size:19}),n.jsx("span",{children:"Cut"})]}),n.jsxs("li",{onClick:k=>he(k,!1),children:[n.jsx(Lt,{strokeWidth:.1,size:17}),n.jsx("span",{children:"Copy"})]}),p.isDirectory?n.jsxs("li",{onClick:Q,className:`${h?"":"disable-paste"}`,children:[n.jsx(pt,{size:18}),n.jsx("span",{children:"Paste"})]}):n.jsx(n.Fragment,{}),n.jsxs("li",{onClick:ye,children:[n.jsx(Ut,{size:19}),n.jsx("span",{children:"Rename"})]}),n.jsxs("li",{onClick:de,children:[n.jsx(Bt,{size:19}),n.jsx("span",{children:"Delete"})]})]})});return n.jsx(n.Fragment,{children:n.jsx(Zn,{filesViewRef:e,contextMenuRef:fe.ref,visible:o,setVisible:E,content:b,children:n.jsxs("div",{className:`file-item ${T||p.isEditing?"background-secondary text-white":""} ${se?"file-moving":""}`,title:p.name,onClick:_,onKeyDown:q,onContextMenu:k=>{if(H.some(z=>z.isEditing)){k.preventDefault(),k.stopPropagation();return}v(!0),y(p),d(s)},tabIndex:0,children:[p.isDirectory?n.jsx(Ln,{size:48}):n.jsx(n.Fragment,{children:w[($=(M=p.name)==null?void 0:M.split(".").pop())==null?void 0:$.toLowerCase()]??n.jsx(dt,{size:48})}),p.isEditing?n.jsx(n.Fragment,{children:I.actionType==="createFolder"?n.jsx(er,{filesViewRef:e,file:p,currentFolder:g,currentPathFiles:H,setCurrentPathFiles:B,handleCreateFolder:F,triggerAction:I}):n.jsx(rr,{filesViewRef:e,file:p,currentPathFiles:H,setCurrentPathFiles:B,handleRename:R,triggerAction:I})}):n.jsx("span",{className:"text-truncate file-name",children:p.name})]})})})},or=({currentPathFiles:e,setCurrentPathFiles:p,setCurrentPath:s,isItemSelection:i,setIsItemSelection:d,setSelectedFile:c,currentPath:f,clipBoard:v,setClipBoard:y,handlePaste:l,files:h,triggerAction:O,currentFolder:j,handleCreateFolder:A,handleRename:I})=>{const[g,F]=Y.useState(null),H=Y.useRef(null);Y.useEffect(()=>{F(null),d(!1),c(null)},[f]);const B=()=>{p(w=>[...w,{name:nn("New Folder",!0,w),isDirectory:!0,path:f,isEditing:!0,key:new Date().valueOf()}])},R=()=>{p(w=>(w[g]&&(w[g].isEditing=!0),w)),d(!1),F(null),c(null)};return Y.useEffect(()=>{if(O.isActive)switch(O.actionType){case"createFolder":B();break;case"rename":R();break}},[O.isActive]),n.jsx("div",{ref:H,className:"files",onClick:w=>{F(null),d(!1),c(null)},children:(e==null?void 0:e.length)>0?n.jsx(n.Fragment,{children:e.map((w,o)=>n.jsx(ar,{filesViewRef:H,file:w,index:o,selectedFileIndex:g,setSelectedFileIndex:F,setCurrentPath:s,isItemSelection:i,setIsItemSelection:d,setSelectedFile:c,currentPath:f,clipBoard:v,setClipBoard:y,handlePaste:l,files:h,triggerAction:O,currentPathFiles:e,setCurrentPathFiles:p,currentFolder:j,handleCreateFolder:A,handleRename:I},o))}):n.jsx("div",{className:"empty-folder",children:"This folder is empty."})})},ir=()=>{const[e,p]=Y.useState(!1),[s,i]=Y.useState(null);return{isActive:e,actionType:s,show:f=>{p(!0),i(f)},close:()=>{p(!1),i(null)}}},sr=({files:e,selectedFile:p,triggerAction:s,handleDelete:i,setIsItemSelection:d,setSelectedFile:c})=>{const f=v=>{i(v),d(!1),c(null),s.close()};return n.jsxs("div",{className:"file-delete-confirm",children:[n.jsxs("p",{className:"file-delete-confirm-text",children:['Are you sure you want to delete "',p==null?void 0:p.name,'"?']}),n.jsxs("div",{className:"file-delete-confirm-actions",children:[n.jsx(Le,{type:"secondary",onClick:()=>s.close(),children:"Cancel"}),n.jsx(Le,{type:"danger",onClick:()=>f(p),children:"Delete"})]})]})};function cr(e){return oe({tag:"svg",attr:{viewBox:"0 0 1024 1024",fill:"currentColor",fillRule:"evenodd"},child:[{tag:"path",attr:{d:"M799.855 166.312c.023.007.043.018.084.059l57.69 57.69c.041.041.052.06.059.084a.118.118 0 0 1 0 .069c-.007.023-.018.042-.059.083L569.926 512l287.703 287.703c.041.04.052.06.059.083a.118.118 0 0 1 0 .07c-.007.022-.018.042-.059.083l-57.69 57.69c-.041.041-.06.052-.084.059a.118.118 0 0 1-.069 0c-.023-.007-.042-.018-.083-.059L512 569.926 224.297 857.629c-.04.041-.06.052-.083.059a.118.118 0 0 1-.07 0c-.022-.007-.042-.018-.083-.059l-57.69-57.69c-.041-.041-.052-.06-.059-.084a.118.118 0 0 1 0-.069c.007-.023.018-.042.059-.083L454.073 512 166.371 224.297c-.041-.04-.052-.06-.059-.083a.118.118 0 0 1 0-.07c.007-.022.018-.042.059-.083l57.69-57.69c.041-.041.06-.052.084-.059a.118.118 0 0 1 .069 0c.023.007.042.018.083.059L512 454.073l287.703-287.702c.04-.041.06-.052.083-.059a.118.118 0 0 1 .07 0Z"},child:[]}]})(e)}function lr(e){return oe({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M518.3 459a8 8 0 0 0-12.6 0l-112 141.7a7.98 7.98 0 0 0 6.3 12.9h73.9V856c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V613.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 459z"},child:[]},{tag:"path",attr:{d:"M811.4 366.7C765.6 245.9 648.9 160 512.2 160S258.8 245.8 213 366.6C127.3 389.1 64 467.2 64 560c0 110.5 89.5 200 199.9 200H304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8h-40.1c-33.7 0-65.4-13.4-89-37.7-23.5-24.2-36-56.8-34.9-90.6.9-26.4 9.9-51.2 26.2-72.1 16.7-21.3 40.1-36.8 66.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0 1 52.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10C846.1 454.5 884 503.8 884 560c0 33.1-12.9 64.3-36.3 87.7a123.07 123.07 0 0 1-87.6 36.3H720c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h40.1C870.5 760 960 670.5 960 560c0-92.7-63.1-170.7-148.6-193.3z"},child:[]}]})(e)}const ur=({percent:e=0,isCanceled:p=!1,isCompleted:s=!1})=>n.jsxs("div",{role:"progressbar",className:"fm-progress",children:[n.jsx("div",{className:"fm-progress-bar",children:n.jsx("div",{className:"fm-progress-bar-fill",style:{width:`${e}%`}})}),p?n.jsx("span",{className:"fm-upload-canceled",children:"Canceled"}):n.jsx("div",{className:"fm-progress-status",children:n.jsx("span",{children:s?"Completed":e+"% done"})})]}),fr=e=>{const p=e/1024,s=p/1024,i=s/1024;if(p<1024)return`${p.toFixed(2)} KB`;if(s<1024)return`${s.toFixed(2)} MB`;if(s>=1024)return`${i.toFixed(2)} GB`};function dr(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 388c-72.597 0-132-59.405-132-132 0-72.601 59.403-132 132-132 36.3 0 69.299 15.4 92.406 39.601L278 234h154V80l-51.698 51.702C348.406 99.798 304.406 80 256 80c-96.797 0-176 79.203-176 176s78.094 176 176 176c81.045 0 148.287-54.134 169.401-128H378.85c-18.745 49.561-67.138 84-122.85 84z"},child:[]}]})(e)}const pr=({index:e,fileData:p,setIsUploading:s,fileUploadConfig:i,handleFileUploaded:d})=>{var F,H,B,R;const[c,f]=Y.useState(0),[v,y]=Y.useState(!1),[l,h]=Y.useState(!1),O=tn(33),j=Y.useRef(),A=w=>new Promise((o,E)=>{const T=new XMLHttpRequest;j.current=T,s(D=>({...D,[e]:!0})),T.upload.onprogress=D=>{if(D.lengthComputable){const Z=Math.round(D.loaded/D.total*100);f(Z)}},T.onload=()=>{s(D=>({...D,[e]:!1})),T.status===200||T.status===201?(y(!0),d(T.response),o(T.response)):E(T.statusText)},T.onerror=()=>E(T.statusText),T.open("POST",i==null?void 0:i.url,!0);const U=i==null?void 0:i.headers;for(let D in U)T.setRequestHeader(D,U[D]);const X=new FormData,J=w==null?void 0:w.appendData;for(let D in J)J[D]&&X.append(D,J[D]);X.append("file",w.file),T.send(X)});Y.useEffect(()=>{j.current||A(p)},[]);const I=()=>{j.current&&(j.current.abort(),s(w=>({...w,[e]:!1})),h(!0),f(0))},g=()=>{p!=null&&p.file&&(A(p),h(!1))};return n.jsxs("li",{children:[n.jsx("div",{className:"file-icon",children:O[Xe((F=p.file)==null?void 0:F.name)]??n.jsx(dt,{size:33})}),n.jsxs("div",{className:"file",children:[n.jsxs("div",{className:"file-details",children:[n.jsxs("div",{className:"file-info",children:[n.jsx("span",{className:"file-name text-truncate",title:(H=p.file)==null?void 0:H.name,children:(B=p.file)==null?void 0:B.name}),n.jsx("span",{className:"file-size",children:fr((R=p.file)==null?void 0:R.size)})]}),v?n.jsx(Yn,{color:"#5c5bb1",title:"Uploaded"}):l?n.jsx(dr,{className:"retry-upload",title:"Retry",onClick:g}):n.jsx("div",{className:"rm-file",title:"Abort",onClick:I,children:n.jsx(cr,{})})]}),n.jsx(ur,{percent:c,isCanceled:l,isCompleted:v})]})]})};var an={exports:{}};(function(e,p){(function(i,d){e.exports=d()})(typeof self<"u"?self:Vt,function(){return function(s){var i={};function d(c){if(i[c])return i[c].exports;var f=i[c]={i:c,l:!1,exports:{}};return s[c].call(f.exports,f,f.exports,d),f.l=!0,f.exports}return d.m=s,d.c=i,d.d=function(c,f,v){d.o(c,f)||Object.defineProperty(c,f,{configurable:!1,enumerable:!0,get:v})},d.n=function(c){var f=c&&c.__esModule?function(){return c.default}:function(){return c};return d.d(f,"a",f),f},d.o=function(c,f){return Object.prototype.hasOwnProperty.call(c,f)},d.p="/",d(d.s=7)}([function(s,i,d){var c=function(y){};process.env.NODE_ENV!=="production"&&(c=function(y){if(y===void 0)throw new Error("invariant requires an error message argument")});function f(v,y,l,h,O,j,A,I){if(c(y),!v){var g;if(y===void 0)g=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var F=[l,h,O,j,A,I],H=0;g=new Error(y.replace(/%s/g,function(){return F[H++]})),g.name="Invariant Violation"}throw g.framesToPop=1,g}}s.exports=f},function(s,i,d){function c(v){return function(){return v}}var f=function(){};f.thatReturns=c,f.thatReturnsFalse=c(!1),f.thatReturnsTrue=c(!0),f.thatReturnsNull=c(null),f.thatReturnsThis=function(){return this},f.thatReturnsArgument=function(v){return v},s.exports=f},function(s,i,d){/*
|
|
31
31
|
object-assign
|
|
32
32
|
(c) Sindre Sorhus
|
|
33
33
|
@license MIT
|
|
34
|
-
*/var
|
|
34
|
+
*/var c=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;function y(h){if(h==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(h)}function l(){try{if(!Object.assign)return!1;var h=new String("abc");if(h[5]="de",Object.getOwnPropertyNames(h)[0]==="5")return!1;for(var O={},j=0;j<10;j++)O["_"+String.fromCharCode(j)]=j;var A=Object.getOwnPropertyNames(O).map(function(g){return O[g]});if(A.join("")!=="0123456789")return!1;var I={};return"abcdefghijklmnopqrst".split("").forEach(function(g){I[g]=g}),Object.keys(Object.assign({},I)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}s.exports=l()?Object.assign:function(h,O){for(var j,A=y(h),I,g=1;g<arguments.length;g++){j=Object(arguments[g]);for(var F in j)f.call(j,F)&&(A[F]=j[F]);if(c){I=c(j);for(var H=0;H<I.length;H++)v.call(j,I[H])&&(A[I[H]]=j[I[H]])}}return A}},function(s,i,d){var c=d(1),f=c;if(process.env.NODE_ENV!=="production"){var v=function(l){for(var h=arguments.length,O=Array(h>1?h-1:0),j=1;j<h;j++)O[j-1]=arguments[j];var A=0,I="Warning: "+l.replace(/%s/g,function(){return O[A++]});typeof console<"u"&&console.error(I);try{throw new Error(I)}catch{}};f=function(l,h){if(h===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(h.indexOf("Failed Composite propType: ")!==0&&!l){for(var O=arguments.length,j=Array(O>2?O-2:0),A=2;A<O;A++)j[A-2]=arguments[A];v.apply(void 0,[h].concat(j))}}}s.exports=f},function(s,i,d){var c="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";s.exports=c},function(s,i,d){var c={};process.env.NODE_ENV!=="production"&&Object.freeze(c),s.exports=c},function(s,i,d){if(process.env.NODE_ENV!=="production")var c=d(0),f=d(3),v=d(4),y={};function l(h,O,j,A,I){if(process.env.NODE_ENV!=="production"){for(var g in h)if(h.hasOwnProperty(g)){var F;try{c(typeof h[g]=="function","%s: %s type `%s` is invalid; it must be a function, usually from the `prop-types` package, but received `%s`.",A||"React class",j,g,typeof h[g]),F=h[g](O,g,A,j,null,v)}catch(B){F=B}if(f(!F||F instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",A||"React class",j,g,typeof F),F instanceof Error&&!(F.message in y)){y[F.message]=!0;var H=I?I():"";f(!1,"Failed %s type: %s%s",j,F.message,H??"")}}}}s.exports=l},function(s,i,d){Object.defineProperty(i,"__esModule",{value:!0});var c=Object.assign||function(w){for(var o=1;o<arguments.length;o++){var E=arguments[o];for(var T in E)Object.prototype.hasOwnProperty.call(E,T)&&(w[T]=E[T])}return w},f=function(){function w(o,E){for(var T=0;T<E.length;T++){var U=E[T];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(o,U.key,U)}}return function(o,E,T){return E&&w(o.prototype,E),T&&w(o,T),o}}(),v=d(8),y=I(v),l=d(11),h=I(l),O=d(14),j=A(O);function A(w){if(w&&w.__esModule)return w;var o={};if(w!=null)for(var E in w)Object.prototype.hasOwnProperty.call(w,E)&&(o[E]=w[E]);return o.default=w,o}function I(w){return w&&w.__esModule?w:{default:w}}function g(w,o){var E={};for(var T in w)o.indexOf(T)>=0||Object.prototype.hasOwnProperty.call(w,T)&&(E[T]=w[T]);return E}function F(w,o){if(!(w instanceof o))throw new TypeError("Cannot call a class as a function")}function H(w,o){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o&&(typeof o=="object"||typeof o=="function")?o:w}function B(w,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof o);w.prototype=Object.create(o&&o.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(w,o):w.__proto__=o)}var R=function(w){B(o,w);function o(){var E,T,U,X;F(this,o);for(var J=arguments.length,D=Array(J),Z=0;Z<J;Z++)D[Z]=arguments[Z];return X=(T=(U=H(this,(E=o.__proto__||Object.getPrototypeOf(o)).call.apply(E,[this].concat(D))),U),U.state={delayed:U.props.delay>0},T),H(U,X)}return f(o,[{key:"componentDidMount",value:function(){var T=this,U=this.props.delay,X=this.state.delayed;X&&(this.timeout=setTimeout(function(){T.setState({delayed:!1})},U))}},{key:"componentWillUnmount",value:function(){var T=this.timeout;T&&clearTimeout(T)}},{key:"render",value:function(){var T=this.props,U=T.color;T.delay;var X=T.type,J=T.height,D=T.width,Z=g(T,["color","delay","type","height","width"]),se=this.state.delayed?"blank":X,fe=j[se],he={fill:U,height:J,width:D};return y.default.createElement("div",c({style:he,dangerouslySetInnerHTML:{__html:fe}},Z))}}]),o}(v.Component);R.propTypes={color:h.default.string,delay:h.default.number,type:h.default.string,height:h.default.oneOfType([h.default.string,h.default.number]),width:h.default.oneOfType([h.default.string,h.default.number])},R.defaultProps={color:"#fff",delay:0,type:"balls",height:64,width:64},i.default=R},function(s,i,d){process.env.NODE_ENV==="production"?s.exports=d(9):s.exports=d(10)},function(s,i,d){/** @license React v16.3.2
|
|
35
35
|
* react.production.min.js
|
|
36
36
|
*
|
|
37
37
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the MIT license found in the
|
|
40
40
|
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var
|
|
41
|
+
*/var c=d(2),f=d(0),v=d(5),y=d(1),l=typeof Symbol=="function"&&Symbol.for,h=l?Symbol.for("react.element"):60103,O=l?Symbol.for("react.portal"):60106,j=l?Symbol.for("react.fragment"):60107,A=l?Symbol.for("react.strict_mode"):60108,I=l?Symbol.for("react.provider"):60109,g=l?Symbol.for("react.context"):60110,F=l?Symbol.for("react.async_mode"):60111,H=l?Symbol.for("react.forward_ref"):60112,B=typeof Symbol=="function"&&Symbol.iterator;function R(a){for(var m=arguments.length-1,P="http://reactjs.org/docs/error-decoder.html?invariant="+a,x=0;x<m;x++)P+="&args[]="+encodeURIComponent(arguments[x+1]);f(!1,"Minified React error #"+a+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",P)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};function o(a,m,P){this.props=a,this.context=m,this.refs=v,this.updater=P||w}o.prototype.isReactComponent={},o.prototype.setState=function(a,m){typeof a!="object"&&typeof a!="function"&&a!=null&&R("85"),this.updater.enqueueSetState(this,a,m,"setState")},o.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};function E(){}E.prototype=o.prototype;function T(a,m,P){this.props=a,this.context=m,this.refs=v,this.updater=P||w}var U=T.prototype=new E;U.constructor=T,c(U,o.prototype),U.isPureReactComponent=!0;var X={current:null},J=Object.prototype.hasOwnProperty,D={key:!0,ref:!0,__self:!0,__source:!0};function Z(a,m,P){var x=void 0,L={},C=null,re=null;if(m!=null)for(x in m.ref!==void 0&&(re=m.ref),m.key!==void 0&&(C=""+m.key),m)J.call(m,x)&&!D.hasOwnProperty(x)&&(L[x]=m[x]);var ae=arguments.length-2;if(ae===1)L.children=P;else if(1<ae){for(var me=Array(ae),be=0;be<ae;be++)me[be]=arguments[be+2];L.children=me}if(a&&a.defaultProps)for(x in ae=a.defaultProps,ae)L[x]===void 0&&(L[x]=ae[x]);return{$$typeof:h,type:a,key:C,ref:re,props:L,_owner:X.current}}function se(a){return typeof a=="object"&&a!==null&&a.$$typeof===h}function fe(a){var m={"=":"=0",":":"=2"};return"$"+(""+a).replace(/[=:]/g,function(P){return m[P]})}var he=/\/+/g,Q=[];function ye(a,m,P,x){if(Q.length){var L=Q.pop();return L.result=a,L.keyPrefix=m,L.func=P,L.context=x,L.count=0,L}return{result:a,keyPrefix:m,func:P,context:x,count:0}}function de(a){a.result=null,a.keyPrefix=null,a.func=null,a.context=null,a.count=0,10>Q.length&&Q.push(a)}function ce(a,m,P,x){var L=typeof a;(L==="undefined"||L==="boolean")&&(a=null);var C=!1;if(a===null)C=!0;else switch(L){case"string":case"number":C=!0;break;case"object":switch(a.$$typeof){case h:case O:C=!0}}if(C)return P(x,a,m===""?"."+_(a,0):m),1;if(C=0,m=m===""?".":m+":",Array.isArray(a))for(var re=0;re<a.length;re++){L=a[re];var ae=m+_(L,re);C+=ce(L,ae,P,x)}else if(a===null||typeof a>"u"?ae=null:(ae=B&&a[B]||a["@@iterator"],ae=typeof ae=="function"?ae:null),typeof ae=="function")for(a=ae.call(a),re=0;!(L=a.next()).done;)L=L.value,ae=m+_(L,re++),C+=ce(L,ae,P,x);else L==="object"&&(P=""+a,R("31",P==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":P,""));return C}function _(a,m){return typeof a=="object"&&a!==null&&a.key!=null?fe(a.key):m.toString(36)}function q(a,m){a.func.call(a.context,m,a.count++)}function b(a,m,P){var x=a.result,L=a.keyPrefix;a=a.func.call(a.context,m,a.count++),Array.isArray(a)?M(a,x,P,y.thatReturnsArgument):a!=null&&(se(a)&&(m=L+(!a.key||m&&m.key===a.key?"":(""+a.key).replace(he,"$&/")+"/")+P,a={$$typeof:h,type:a.type,key:m,ref:a.ref,props:a.props,_owner:a._owner}),x.push(a))}function M(a,m,P,x,L){var C="";P!=null&&(C=(""+P).replace(he,"$&/")+"/"),m=ye(m,C,x,L),a==null||ce(a,"",b,m),de(m)}var $={Children:{map:function(a,m,P){if(a==null)return a;var x=[];return M(a,x,null,m,P),x},forEach:function(a,m,P){if(a==null)return a;m=ye(null,null,m,P),a==null||ce(a,"",q,m),de(m)},count:function(a){return a==null?0:ce(a,"",y.thatReturnsNull,null)},toArray:function(a){var m=[];return M(a,m,null,y.thatReturnsArgument),m},only:function(a){return se(a)||R("143"),a}},createRef:function(){return{current:null}},Component:o,PureComponent:T,createContext:function(a,m){return m===void 0&&(m=null),a={$$typeof:g,_calculateChangedBits:m,_defaultValue:a,_currentValue:a,_changedBits:0,Provider:null,Consumer:null},a.Provider={$$typeof:I,_context:a},a.Consumer=a},forwardRef:function(a){return{$$typeof:H,render:a}},Fragment:j,StrictMode:A,unstable_AsyncMode:F,createElement:Z,cloneElement:function(a,m,P){a==null&&R("267",a);var x=void 0,L=c({},a.props),C=a.key,re=a.ref,ae=a._owner;if(m!=null){m.ref!==void 0&&(re=m.ref,ae=X.current),m.key!==void 0&&(C=""+m.key);var me=void 0;a.type&&a.type.defaultProps&&(me=a.type.defaultProps);for(x in m)J.call(m,x)&&!D.hasOwnProperty(x)&&(L[x]=m[x]===void 0&&me!==void 0?me[x]:m[x])}if(x=arguments.length-2,x===1)L.children=P;else if(1<x){me=Array(x);for(var be=0;be<x;be++)me[be]=arguments[be+2];L.children=me}return{$$typeof:h,type:a.type,key:C,ref:re,props:L,_owner:ae}},createFactory:function(a){var m=Z.bind(null,a);return m.type=a,m},isValidElement:se,version:"16.3.2",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:X,assign:c}},k=Object.freeze({default:$}),z=k&&$||k;s.exports=z.default?z.default:z},function(s,i,d){/** @license React v16.3.2
|
|
42
42
|
* react.development.js
|
|
43
43
|
*
|
|
44
44
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
45
45
|
*
|
|
46
46
|
* This source code is licensed under the MIT license found in the
|
|
47
47
|
* LICENSE file in the root directory of this source tree.
|
|
48
|
-
*/process.env.NODE_ENV!=="production"&&function(){var
|
|
49
|
-
in `+(
|
|
48
|
+
*/process.env.NODE_ENV!=="production"&&function(){var c=d(2),f=d(0),v=d(5),y=d(3),l=d(1),h=d(6),O="16.3.2",j=typeof Symbol=="function"&&Symbol.for,A=j?Symbol.for("react.element"):60103,I=j?Symbol.for("react.call"):60104,g=j?Symbol.for("react.return"):60105,F=j?Symbol.for("react.portal"):60106,H=j?Symbol.for("react.fragment"):60107,B=j?Symbol.for("react.strict_mode"):60108,R=j?Symbol.for("react.provider"):60109,w=j?Symbol.for("react.context"):60110,o=j?Symbol.for("react.async_mode"):60111,E=j?Symbol.for("react.forward_ref"):60112,T=typeof Symbol=="function"&&Symbol.iterator,U="@@iterator";function X(t){if(t===null||typeof t>"u")return null;var u=T&&t[T]||t[U];return typeof u=="function"?u:null}var J=function(){};{var D=function(t){for(var u=arguments.length,S=Array(u>1?u-1:0),N=1;N<u;N++)S[N-1]=arguments[N];var W=0,te="Warning: "+t.replace(/%s/g,function(){return S[W++]});typeof console<"u"&&console.warn(te);try{throw new Error(te)}catch{}};J=function(t,u){if(u===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(!t){for(var S=arguments.length,N=Array(S>2?S-2:0),W=2;W<S;W++)N[W-2]=arguments[W];D.apply(void 0,[u].concat(N))}}}var Z=J,se={};function fe(t,u){{var S=t.constructor,N=S&&(S.displayName||S.name)||"ReactClass",W=N+"."+u;if(se[W])return;y(!1,"Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",u,N),se[W]=!0}}var he={isMounted:function(t){return!1},enqueueForceUpdate:function(t,u,S){fe(t,"forceUpdate")},enqueueReplaceState:function(t,u,S,N){fe(t,"replaceState")},enqueueSetState:function(t,u,S,N){fe(t,"setState")}};function Q(t,u,S){this.props=t,this.context=u,this.refs=v,this.updater=S||he}Q.prototype.isReactComponent={},Q.prototype.setState=function(t,u){typeof t=="object"||typeof t=="function"||t==null||f(!1,"setState(...): takes an object of state variables to update or a function which returns an object of state variables."),this.updater.enqueueSetState(this,t,u,"setState")},Q.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};{var ye={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},de=function(t,u){Object.defineProperty(Q.prototype,t,{get:function(){Z(!1,"%s(...) is deprecated in plain JavaScript React classes. %s",u[0],u[1])}})};for(var ce in ye)ye.hasOwnProperty(ce)&&de(ce,ye[ce])}function _(){}_.prototype=Q.prototype;function q(t,u,S){this.props=t,this.context=u,this.refs=v,this.updater=S||he}var b=q.prototype=new _;b.constructor=q,c(b,Q.prototype),b.isPureReactComponent=!0;function M(){var t={current:null};return Object.seal(t),t}var $={current:null},k=Object.prototype.hasOwnProperty,z={key:!0,ref:!0,__self:!0,__source:!0},a=void 0,m=void 0;function P(t){if(k.call(t,"ref")){var u=Object.getOwnPropertyDescriptor(t,"ref").get;if(u&&u.isReactWarning)return!1}return t.ref!==void 0}function x(t){if(k.call(t,"key")){var u=Object.getOwnPropertyDescriptor(t,"key").get;if(u&&u.isReactWarning)return!1}return t.key!==void 0}function L(t,u){var S=function(){a||(a=!0,y(!1,"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",u))};S.isReactWarning=!0,Object.defineProperty(t,"key",{get:S,configurable:!0})}function C(t,u){var S=function(){m||(m=!0,y(!1,"%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",u))};S.isReactWarning=!0,Object.defineProperty(t,"ref",{get:S,configurable:!0})}var re=function(t,u,S,N,W,te,ne){var ee={$$typeof:A,type:t,key:u,ref:S,props:ne,_owner:te};return ee._store={},Object.defineProperty(ee._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ee,"_self",{configurable:!1,enumerable:!1,writable:!1,value:N}),Object.defineProperty(ee,"_source",{configurable:!1,enumerable:!1,writable:!1,value:W}),Object.freeze&&(Object.freeze(ee.props),Object.freeze(ee)),ee};function ae(t,u,S){var N=void 0,W={},te=null,ne=null,ee=null,ve=null;if(u!=null){P(u)&&(ne=u.ref),x(u)&&(te=""+u.key),ee=u.__self===void 0?null:u.__self,ve=u.__source===void 0?null:u.__source;for(N in u)k.call(u,N)&&!z.hasOwnProperty(N)&&(W[N]=u[N])}var Ce=arguments.length-2;if(Ce===1)W.children=S;else if(Ce>1){for(var je=Array(Ce),xe=0;xe<Ce;xe++)je[xe]=arguments[xe+2];Object.freeze&&Object.freeze(je),W.children=je}if(t&&t.defaultProps){var Ae=t.defaultProps;for(N in Ae)W[N]===void 0&&(W[N]=Ae[N])}if((te||ne)&&(typeof W.$$typeof>"u"||W.$$typeof!==A)){var Oe=typeof t=="function"?t.displayName||t.name||"Unknown":t;te&&L(W,Oe),ne&&C(W,Oe)}return re(t,te,ne,ee,ve,$.current,W)}function me(t,u){var S=re(t.type,u,t.ref,t._self,t._source,t._owner,t.props);return S}function be(t,u,S){t==null&&f(!1,"React.cloneElement(...): The argument must be a React element, but you passed %s.",t);var N=void 0,W=c({},t.props),te=t.key,ne=t.ref,ee=t._self,ve=t._source,Ce=t._owner;if(u!=null){P(u)&&(ne=u.ref,Ce=$.current),x(u)&&(te=""+u.key);var je=void 0;t.type&&t.type.defaultProps&&(je=t.type.defaultProps);for(N in u)k.call(u,N)&&!z.hasOwnProperty(N)&&(u[N]===void 0&&je!==void 0?W[N]=je[N]:W[N]=u[N])}var xe=arguments.length-2;if(xe===1)W.children=S;else if(xe>1){for(var Ae=Array(xe),Oe=0;Oe<xe;Oe++)Ae[Oe]=arguments[Oe+2];W.children=Ae}return re(t.type,te,ne,ee,ve,Ce,W)}function Te(t){return typeof t=="object"&&t!==null&&t.$$typeof===A}var Ee={};Ee.getCurrentStack=null,Ee.getStackAddendum=function(){var t=Ee.getCurrentStack;return t?t():null};var Me=".",Et=":";function Ot(t){var u=/[=:]/g,S={"=":"=0",":":"=2"},N=(""+t).replace(u,function(W){return S[W]});return"$"+N}var Ve=!1,Tt=/\/+/g;function Qe(t){return(""+t).replace(Tt,"$&/")}var et=10,ke=[];function Pe(t,u,S,N){if(ke.length){var W=ke.pop();return W.result=t,W.keyPrefix=u,W.func=S,W.context=N,W.count=0,W}else return{result:t,keyPrefix:u,func:S,context:N,count:0}}function tt(t){t.result=null,t.keyPrefix=null,t.func=null,t.context=null,t.count=0,ke.length<et&&ke.push(t)}function He(t,u,S,N){var W=typeof t;(W==="undefined"||W==="boolean")&&(t=null);var te=!1;if(t===null)te=!0;else switch(W){case"string":case"number":te=!0;break;case"object":switch(t.$$typeof){case A:case F:te=!0}}if(te)return S(N,t,u===""?Me+Ne(t,0):u),1;var ne=void 0,ee=void 0,ve=0,Ce=u===""?Me:u+Et;if(Array.isArray(t))for(var je=0;je<t.length;je++)ne=t[je],ee=Ce+Ne(ne,je),ve+=He(ne,ee,S,N);else{var xe=X(t);if(typeof xe=="function"){xe===t.entries&&(Ve||y(!1,"Using Maps as children is unsupported and will likely yield unexpected results. Convert it to a sequence/iterable of keyed ReactElements instead.%s",Ee.getStackAddendum()),Ve=!0);for(var Ae=xe.call(t),Oe=void 0,Sr=0;!(Oe=Ae.next()).done;)ne=Oe.value,ee=Ce+Ne(ne,Sr++),ve+=He(ne,ee,S,N)}else if(W==="object"){var xn="";xn=" If you meant to render a collection of children, use an array instead."+Ee.getStackAddendum();var Cn=""+t;f(!1,"Objects are not valid as a React child (found: %s).%s",Cn==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":Cn,xn)}}return ve}function Fe(t,u,S){return t==null?0:He(t,"",u,S)}function Ne(t,u){return typeof t=="object"&&t!==null&&t.key!=null?Ot(t.key):u.toString(36)}function St(t,u,S){var N=t.func,W=t.context;N.call(W,u,t.count++)}function Pt(t,u,S){if(t==null)return t;var N=Pe(null,null,u,S);Fe(t,St,N),tt(N)}function Rt(t,u,S){var N=t.result,W=t.keyPrefix,te=t.func,ne=t.context,ee=te.call(ne,u,t.count++);Array.isArray(ee)?We(ee,N,S,l.thatReturnsArgument):ee!=null&&(Te(ee)&&(ee=me(ee,W+(ee.key&&(!u||u.key!==ee.key)?Qe(ee.key)+"/":"")+S)),N.push(ee))}function We(t,u,S,N,W){var te="";S!=null&&(te=Qe(S)+"/");var ne=Pe(u,te,N,W);Fe(t,Rt,ne),tt(ne)}function _t(t,u,S){if(t==null)return t;var N=[];return We(t,N,null,u,S),N}function Mt(t,u){return Fe(t,l.thatReturnsNull,null)}function kt(t){var u=[];return We(t,u,null,l.thatReturnsArgument),u}function Be(t){return Te(t)||f(!1,"React.Children.only expected to receive a single React element child."),t}function nt(t,u){u===void 0?u=null:u===null||typeof u=="function"||y(!1,"createContext: Expected the optional second argument to be a function. Instead received: %s",u);var S={$$typeof:w,_calculateChangedBits:u,_defaultValue:t,_currentValue:t,_changedBits:0,Provider:null,Consumer:null};return S.Provider={$$typeof:R,_context:S},S.Consumer=S,S._currentRenderer=null,S}function Re(t){return typeof t!="function"&&y(!1,"forwardRef requires a render function but was given %s.",t===null?"null":typeof t),{$$typeof:E,render:t}}var Ue=function(t,u,S){return`
|
|
49
|
+
in `+(t||"Unknown")+(u?" (at "+u.fileName.replace(/^.*[\\\/]/,"")+":"+u.lineNumber+")":S?" (created by "+S+")":"")};function Ye(t){return typeof t=="string"||typeof t=="function"||t===H||t===o||t===B||typeof t=="object"&&t!==null&&(t.$$typeof===R||t.$$typeof===w||t.$$typeof===E)}function ze(t){var u=t.type;if(typeof u=="function")return u.displayName||u.name;if(typeof u=="string")return u;switch(u){case H:return"ReactFragment";case F:return"ReactPortal";case I:return"ReactCall";case g:return"ReactReturn"}if(typeof u=="object"&&u!==null)switch(u.$$typeof){case E:var S=u.render.displayName||u.render.name||"";return S!==""?"ForwardRef("+S+")":"ForwardRef"}return null}var we=void 0,De=void 0,rt=function(){},Se=function(){};we=null,De=!1,rt=function(t){return t==null?"#empty":typeof t=="string"||typeof t=="number"?"#text":typeof t.type=="string"?t.type:t.type===H?"React.Fragment":t.type.displayName||t.type.name||"Unknown"},Se=function(){var t="";if(we){var u=rt(we),S=we._owner;t+=Ue(u,we._source,S&&ze(S))}return t+=Ee.getStackAddendum()||"",t};function qe(){if($.current){var t=ze($.current);if(t)return`
|
|
50
50
|
|
|
51
|
-
Check the render method of \``+
|
|
51
|
+
Check the render method of \``+t+"`."}return""}function Nt(t){if(t!=null&&t.__source!==void 0){var u=t.__source,S=u.fileName.replace(/^.*[\\\/]/,""),N=u.lineNumber;return`
|
|
52
52
|
|
|
53
|
-
Check your code at `+
|
|
53
|
+
Check your code at `+S+":"+N+"."}return""}var at={};function ot(t){var u=qe();if(!u){var S=typeof t=="string"?t:t.displayName||t.name;S&&(u=`
|
|
54
54
|
|
|
55
|
-
Check the top-level render call using <`+
|
|
56
|
-
Valid keys: `+JSON.stringify(Object.keys(
|
|
57
|
-
`},function(
|
|
55
|
+
Check the top-level render call using <`+S+">.")}return u}function Ke(t,u){if(!(!t._store||t._store.validated||t.key!=null)){t._store.validated=!0;var S=ot(u);if(!at[S]){at[S]=!0;var N="";t&&t._owner&&t._owner!==$.current&&(N=" It was passed a child from "+ze(t._owner)+"."),we=t,y(!1,'Each child in an array or iterator should have a unique "key" prop.%s%s See https://fb.me/react-warning-keys for more information.%s',S,N,Se()),we=null}}}function it(t,u){if(typeof t=="object"){if(Array.isArray(t))for(var S=0;S<t.length;S++){var N=t[S];Te(N)&&Ke(N,u)}else if(Te(t))t._store&&(t._store.validated=!0);else if(t){var W=X(t);if(typeof W=="function"&&W!==t.entries)for(var te=W.call(t),ne=void 0;!(ne=te.next()).done;)Te(ne.value)&&Ke(ne.value,u)}}}function st(t){var u=t.type;if(typeof u=="function"){var S=u.displayName||u.name,N=u.propTypes;N?(we=t,h(N,t.props,"prop",S,Se),we=null):u.PropTypes!==void 0&&!De&&(De=!0,y(!1,"Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",S||"Unknown")),typeof u.getDefaultProps=="function"&&(u.getDefaultProps.isReactClassApproved||y(!1,"getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."))}}function At(t){we=t;for(var u=Object.keys(t.props),S=0;S<u.length;S++){var N=u[S];if(N!=="children"&&N!=="key"){y(!1,"Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.%s",N,Se());break}}t.ref!==null&&y(!1,"Invalid attribute `ref` supplied to `React.Fragment`.%s",Se()),we=null}function ct(t,u,S){var N=Ye(t);if(!N){var W="";(t===void 0||typeof t=="object"&&t!==null&&Object.keys(t).length===0)&&(W+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var te=Nt(u);te?W+=te:W+=qe(),W+=Se()||"";var ne=void 0;t===null?ne="null":Array.isArray(t)?ne="array":ne=typeof t,y(!1,"React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ne,W)}var ee=ae.apply(this,arguments);if(ee==null)return ee;if(N)for(var ve=2;ve<arguments.length;ve++)it(arguments[ve],t);return t===H?At(ee):st(ee),ee}function r(t){var u=ct.bind(null,t);return u.type=t,Object.defineProperty(u,"type",{enumerable:!1,get:function(){return Z(!1,"Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:t}),t}}),u}function V(t,u,S){for(var N=be.apply(this,arguments),W=2;W<arguments.length;W++)it(arguments[W],N.type);return st(N),N}var K={Children:{map:_t,forEach:Pt,count:Mt,toArray:kt,only:Be},createRef:M,Component:Q,PureComponent:q,createContext:nt,forwardRef:Re,Fragment:H,StrictMode:B,unstable_AsyncMode:o,createElement:ct,cloneElement:V,createFactory:r,isValidElement:Te,version:O,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:$,assign:c}};c(K.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,{ReactDebugCurrentFrame:Ee,ReactComponentTreeHook:{}});var G=Object.freeze({default:K}),ie=G&&K||G,pe=ie.default?ie.default:ie;s.exports=pe}()},function(s,i,d){if(process.env.NODE_ENV!=="production"){var c=typeof Symbol=="function"&&Symbol.for&&Symbol.for("react.element")||60103,f=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===c},v=!0;s.exports=d(12)(f,v)}else s.exports=d(13)()},function(s,i,d){var c=d(1),f=d(0),v=d(3),y=d(2),l=d(4),h=d(6);s.exports=function(O,j){var A=typeof Symbol=="function"&&Symbol.iterator,I="@@iterator";function g(b){var M=b&&(A&&b[A]||b[I]);if(typeof M=="function")return M}var F="<<anonymous>>",H={array:o("array"),bool:o("boolean"),func:o("function"),number:o("number"),object:o("object"),string:o("string"),symbol:o("symbol"),any:E(),arrayOf:T,element:U(),instanceOf:X,node:se(),objectOf:D,oneOf:J,oneOfType:Z,shape:fe,exact:he};function B(b,M){return b===M?b!==0||1/b===1/M:b!==b&&M!==M}function R(b){this.message=b,this.stack=""}R.prototype=Error.prototype;function w(b){if(process.env.NODE_ENV!=="production")var M={},$=0;function k(a,m,P,x,L,C,re){if(x=x||F,C=C||P,re!==l){if(j)f(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ae=x+":"+P;!M[ae]&&$<3&&(v(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",C,x),M[ae]=!0,$++)}}return m[P]==null?a?m[P]===null?new R("The "+L+" `"+C+"` is marked as required "+("in `"+x+"`, but its value is `null`.")):new R("The "+L+" `"+C+"` is marked as required in "+("`"+x+"`, but its value is `undefined`.")):null:b(m,P,x,L,C)}var z=k.bind(null,!1);return z.isRequired=k.bind(null,!0),z}function o(b){function M($,k,z,a,m,P){var x=$[k],L=de(x);if(L!==b){var C=ce(x);return new R("Invalid "+a+" `"+m+"` of type "+("`"+C+"` supplied to `"+z+"`, expected ")+("`"+b+"`."))}return null}return w(M)}function E(){return w(c.thatReturnsNull)}function T(b){function M($,k,z,a,m){if(typeof b!="function")return new R("Property `"+m+"` of component `"+z+"` has invalid PropType notation inside arrayOf.");var P=$[k];if(!Array.isArray(P)){var x=de(P);return new R("Invalid "+a+" `"+m+"` of type "+("`"+x+"` supplied to `"+z+"`, expected an array."))}for(var L=0;L<P.length;L++){var C=b(P,L,z,a,m+"["+L+"]",l);if(C instanceof Error)return C}return null}return w(M)}function U(){function b(M,$,k,z,a){var m=M[$];if(!O(m)){var P=de(m);return new R("Invalid "+z+" `"+a+"` of type "+("`"+P+"` supplied to `"+k+"`, expected a single ReactElement."))}return null}return w(b)}function X(b){function M($,k,z,a,m){if(!($[k]instanceof b)){var P=b.name||F,x=q($[k]);return new R("Invalid "+a+" `"+m+"` of type "+("`"+x+"` supplied to `"+z+"`, expected ")+("instance of `"+P+"`."))}return null}return w(M)}function J(b){if(!Array.isArray(b))return process.env.NODE_ENV!=="production"&&v(!1,"Invalid argument supplied to oneOf, expected an instance of array."),c.thatReturnsNull;function M($,k,z,a,m){for(var P=$[k],x=0;x<b.length;x++)if(B(P,b[x]))return null;var L=JSON.stringify(b);return new R("Invalid "+a+" `"+m+"` of value `"+P+"` "+("supplied to `"+z+"`, expected one of "+L+"."))}return w(M)}function D(b){function M($,k,z,a,m){if(typeof b!="function")return new R("Property `"+m+"` of component `"+z+"` has invalid PropType notation inside objectOf.");var P=$[k],x=de(P);if(x!=="object")return new R("Invalid "+a+" `"+m+"` of type "+("`"+x+"` supplied to `"+z+"`, expected an object."));for(var L in P)if(P.hasOwnProperty(L)){var C=b(P,L,z,a,m+"."+L,l);if(C instanceof Error)return C}return null}return w(M)}function Z(b){if(!Array.isArray(b))return process.env.NODE_ENV!=="production"&&v(!1,"Invalid argument supplied to oneOfType, expected an instance of array."),c.thatReturnsNull;for(var M=0;M<b.length;M++){var $=b[M];if(typeof $!="function")return v(!1,"Invalid argument supplied to oneOfType. Expected an array of check functions, but received %s at index %s.",_($),M),c.thatReturnsNull}function k(z,a,m,P,x){for(var L=0;L<b.length;L++){var C=b[L];if(C(z,a,m,P,x,l)==null)return null}return new R("Invalid "+P+" `"+x+"` supplied to "+("`"+m+"`."))}return w(k)}function se(){function b(M,$,k,z,a){return Q(M[$])?null:new R("Invalid "+z+" `"+a+"` supplied to "+("`"+k+"`, expected a ReactNode."))}return w(b)}function fe(b){function M($,k,z,a,m){var P=$[k],x=de(P);if(x!=="object")return new R("Invalid "+a+" `"+m+"` of type `"+x+"` "+("supplied to `"+z+"`, expected `object`."));for(var L in b){var C=b[L];if(C){var re=C(P,L,z,a,m+"."+L,l);if(re)return re}}return null}return w(M)}function he(b){function M($,k,z,a,m){var P=$[k],x=de(P);if(x!=="object")return new R("Invalid "+a+" `"+m+"` of type `"+x+"` "+("supplied to `"+z+"`, expected `object`."));var L=y({},$[k],b);for(var C in L){var re=b[C];if(!re)return new R("Invalid "+a+" `"+m+"` key `"+C+"` supplied to `"+z+"`.\nBad object: "+JSON.stringify($[k],null," ")+`
|
|
56
|
+
Valid keys: `+JSON.stringify(Object.keys(b),null," "));var ae=re(P,C,z,a,m+"."+C,l);if(ae)return ae}return null}return w(M)}function Q(b){switch(typeof b){case"number":case"string":case"undefined":return!0;case"boolean":return!b;case"object":if(Array.isArray(b))return b.every(Q);if(b===null||O(b))return!0;var M=g(b);if(M){var $=M.call(b),k;if(M!==b.entries){for(;!(k=$.next()).done;)if(!Q(k.value))return!1}else for(;!(k=$.next()).done;){var z=k.value;if(z&&!Q(z[1]))return!1}}else return!1;return!0;default:return!1}}function ye(b,M){return b==="symbol"||M["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&M instanceof Symbol}function de(b){var M=typeof b;return Array.isArray(b)?"array":b instanceof RegExp?"object":ye(M,b)?"symbol":M}function ce(b){if(typeof b>"u"||b===null)return""+b;var M=de(b);if(M==="object"){if(b instanceof Date)return"date";if(b instanceof RegExp)return"regexp"}return M}function _(b){var M=ce(b);switch(M){case"array":case"object":return"an "+M;case"boolean":case"date":case"regexp":return"a "+M;default:return M}}function q(b){return!b.constructor||!b.constructor.name?F:b.constructor.name}return H.checkPropTypes=h,H.PropTypes=H,H}},function(s,i,d){var c=d(1),f=d(0),v=d(4);s.exports=function(){function y(O,j,A,I,g,F){F!==v&&f(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}y.isRequired=y;function l(){return y}var h={array:y,bool:y,func:y,number:y,object:y,string:y,symbol:y,any:y,arrayOf:l,element:y,instanceOf:l,node:y,objectOf:l,oneOf:l,oneOfType:l,shape:l,exact:l};return h.checkPropTypes=c,h.PropTypes=h,h}},function(s,i,d){Object.defineProperty(i,"__esModule",{value:!0});var c=d(15);Object.defineProperty(i,"blank",{enumerable:!0,get:function(){return I(c).default}});var f=d(16);Object.defineProperty(i,"balls",{enumerable:!0,get:function(){return I(f).default}});var v=d(17);Object.defineProperty(i,"bars",{enumerable:!0,get:function(){return I(v).default}});var y=d(18);Object.defineProperty(i,"bubbles",{enumerable:!0,get:function(){return I(y).default}});var l=d(19);Object.defineProperty(i,"cubes",{enumerable:!0,get:function(){return I(l).default}});var h=d(20);Object.defineProperty(i,"cylon",{enumerable:!0,get:function(){return I(h).default}});var O=d(21);Object.defineProperty(i,"spin",{enumerable:!0,get:function(){return I(O).default}});var j=d(22);Object.defineProperty(i,"spinningBubbles",{enumerable:!0,get:function(){return I(j).default}});var A=d(23);Object.defineProperty(i,"spokes",{enumerable:!0,get:function(){return I(A).default}});function I(g){return g&&g.__esModule?g:{default:g}}},function(s,i){s.exports=`<svg class="icon-blank" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>
|
|
57
|
+
`},function(s,i){s.exports=`<svg class="icon-loading" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
|
58
58
|
<path transform="translate(-8 0)" d="M4 12 A4 4 0 0 0 4 20 A4 4 0 0 0 4 12">
|
|
59
59
|
<animateTransform attributeName="transform" type="translate" values="-8 0; 2 0; 2 0;" dur="0.8s" repeatCount="indefinite" begin="0" keytimes="0;.25;1" keySplines="0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8" calcMode="spline" />
|
|
60
60
|
</path>
|
|
@@ -68,7 +68,7 @@ Valid keys: `+JSON.stringify(Object.keys(w),null," "));var ae=le(H,K,Y,i,m+"."+
|
|
|
68
68
|
<animateTransform attributeName="transform" type="translate" values="22 0; 32 0; 32 0;" dur="0.8s" repeatCount="indefinite" begin="0" keytimes="0;.55;1" keySplines="0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8" calcMode="spline" />
|
|
69
69
|
</path>
|
|
70
70
|
</svg>
|
|
71
|
-
`},function(
|
|
71
|
+
`},function(s,i){s.exports=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
|
72
72
|
<path transform="translate(2)" d="M0 12 V20 H4 V12z">
|
|
73
73
|
<animate attributeName="d" values="M0 12 V20 H4 V12z; M0 4 V28 H4 V4z; M0 12 V20 H4 V12z; M0 12 V20 H4 V12z" dur="1.2s" repeatCount="indefinite" begin="0" keytimes="0;.2;.5;1" keySplines="0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8;0.2 0.8 0.4 0.8" calcMode="spline" />
|
|
74
74
|
</path>
|
|
@@ -85,7 +85,7 @@ Valid keys: `+JSON.stringify(Object.keys(w),null," "));var ae=le(H,K,Y,i,m+"."+
|
|
|
85
85
|
<animate attributeName="d" values="M0 12 V20 H4 V12z; M0 4 V28 H4 V4z; M0 12 V20 H4 V12z; M0 12 V20 H4 V12z" dur="1.2s" repeatCount="indefinite" begin="0.8" keytimes="0;.2;.5;1" keySplines="0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8;0.2 0.8 0.4 0.8" calcMode="spline" />
|
|
86
86
|
</path>
|
|
87
87
|
</svg>
|
|
88
|
-
`},function(
|
|
88
|
+
`},function(s,i){s.exports=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
|
89
89
|
<circle transform="translate(8 0)" cx="0" cy="16" r="0">
|
|
90
90
|
<animate attributeName="r" values="0; 4; 0; 0" dur="1.2s" repeatCount="indefinite" begin="0"
|
|
91
91
|
keytimes="0;0.2;0.7;1" keySplines="0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8;0.2 0.6 0.4 0.8" calcMode="spline" />
|
|
@@ -99,7 +99,7 @@ Valid keys: `+JSON.stringify(Object.keys(w),null," "));var ae=le(H,K,Y,i,m+"."+
|
|
|
99
99
|
keytimes="0;0.2;0.7;1" keySplines="0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8;0.2 0.6 0.4 0.8" calcMode="spline" />
|
|
100
100
|
</circle>
|
|
101
101
|
</svg>
|
|
102
|
-
`},function(
|
|
102
|
+
`},function(s,i){s.exports=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
|
103
103
|
<path transform="translate(-8 0)" d="M0 12 V20 H8 V12z">
|
|
104
104
|
<animateTransform attributeName="transform" type="translate" values="-8 0; 2 0; 2 0;" dur="0.8s" repeatCount="indefinite" begin="0" keytimes="0;.25;1" keySplines="0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8" calcMode="spline" />
|
|
105
105
|
</path>
|
|
@@ -113,7 +113,7 @@ Valid keys: `+JSON.stringify(Object.keys(w),null," "));var ae=le(H,K,Y,i,m+"."+
|
|
|
113
113
|
<animateTransform attributeName="transform" type="translate" values="22 0; 32 0; 32 0;" dur="0.8s" repeatCount="indefinite" begin="0" keytimes="0;.55;1" keySplines="0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8" calcMode="spline" />
|
|
114
114
|
</path>
|
|
115
115
|
</svg>
|
|
116
|
-
`},function(
|
|
116
|
+
`},function(s,i){s.exports=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
|
117
117
|
<path transform="translate(0 0)" d="M0 12 V20 H4 V12z">
|
|
118
118
|
<animateTransform attributeName="transform" type="translate" values="0 0; 28 0; 0 0; 0 0" dur="1.5s" begin="0" repeatCount="indefinite" keytimes="0;0.3;0.6;1" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" />
|
|
119
119
|
</path>
|
|
@@ -124,13 +124,13 @@ Valid keys: `+JSON.stringify(Object.keys(w),null," "));var ae=le(H,K,Y,i,m+"."+
|
|
|
124
124
|
<animateTransform attributeName="transform" type="translate" values="0 0; 28 0; 0 0; 0 0" dur="1.5s" begin="0.2s" repeatCount="indefinite" keytimes="0;0.3;0.6;1" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" />
|
|
125
125
|
</path>
|
|
126
126
|
</svg>
|
|
127
|
-
`},function(
|
|
127
|
+
`},function(s,i){s.exports=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
|
128
128
|
<path opacity=".25" d="M16 0 A16 16 0 0 0 16 32 A16 16 0 0 0 16 0 M16 4 A12 12 0 0 1 16 28 A12 12 0 0 1 16 4"/>
|
|
129
129
|
<path d="M16 0 A16 16 0 0 1 32 16 L28 16 A12 12 0 0 0 16 4z">
|
|
130
130
|
<animateTransform attributeName="transform" type="rotate" from="0 16 16" to="360 16 16" dur="0.8s" repeatCount="indefinite" />
|
|
131
131
|
</path>
|
|
132
132
|
</svg>
|
|
133
|
-
`},function(
|
|
133
|
+
`},function(s,i){s.exports=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
|
134
134
|
<circle cx="16" cy="3" r="0">
|
|
135
135
|
<animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" />
|
|
136
136
|
</circle>
|
|
@@ -159,7 +159,7 @@ Valid keys: `+JSON.stringify(Object.keys(w),null," "));var ae=le(H,K,Y,i,m+"."+
|
|
|
159
159
|
<animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" />
|
|
160
160
|
</circle>
|
|
161
161
|
</svg>
|
|
162
|
-
`},function(
|
|
162
|
+
`},function(s,i){s.exports=`<svg id="loading" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
|
163
163
|
<path opacity=".1" d="M14 0 H18 V8 H14 z" transform="rotate(0 16 16)">
|
|
164
164
|
<animate attributeName="opacity" from="1" to=".1" dur="1s" repeatCount="indefinite" begin="0"/>
|
|
165
165
|
</path>
|
|
@@ -185,4 +185,23 @@ Valid keys: `+JSON.stringify(Object.keys(w),null," "));var ae=le(H,K,Y,i,m+"."+
|
|
|
185
185
|
<animate attributeName="opacity" from="1" to=".1" dur="1s" repeatCount="indefinite" begin="0.875s"/>
|
|
186
186
|
</path>
|
|
187
187
|
</svg>
|
|
188
|
-
`}])})})(
|
|
188
|
+
`}])})})(an);var vr=an.exports;const on=lt(vr),hr=({fileUploadConfig:e,allowedFileExtensions:p,handleFileUploading:s,handleFileUploaded:i,currentFolder:d})=>{const[c,f]=Y.useState([]),[v,y]=Y.useState(!1),[l,h]=Y.useState({}),O=A=>{A.preventDefault(),y(!1);const I=Array.from(A.dataTransfer.files);if(I.length>0){const g=I.map(F=>{const H=s(F,d);return{file:F,appendData:H}});f(F=>[...F,...g])}},j=A=>{const I=Array.from(A.target.files);if(I.length>0){const g=I.map(F=>{const H=s(F,d);return{file:F,appendData:H}});f(F=>[...F,...g])}};return n.jsxs("div",{className:`fm-upload-file ${c.length>0?"file-selcted":""}`,children:[n.jsxs("div",{className:"select-files",children:[n.jsx("div",{className:`draggable-file-input ${v?"dragging":""}`,onDrop:O,onDragOver:A=>A.preventDefault(),onDragEnter:()=>y(!0),onDragLeave:()=>y(!1),children:n.jsxs("div",{className:"input-text",children:[n.jsx(lr,{size:30}),n.jsx("span",{children:"Drag files to upload"})]})}),n.jsx("div",{className:"btn-choose-file",children:n.jsxs(Le,{padding:"0",children:[n.jsx("label",{htmlFor:"chooseFile",children:"Choose File"}),n.jsx("input",{type:"file",id:"chooseFile",className:"choose-file-input",onChange:j,multiple:!0,accept:p})]})})]}),c.length>0&&n.jsxs("div",{className:"files-progress",children:[n.jsx("div",{className:"heading",children:Object.values(l).some(A=>A)?n.jsxs(n.Fragment,{children:[n.jsx("h2",{children:"Uploading"}),n.jsx(on,{type:"cylon",color:"black",height:18,width:20})]}):n.jsx("h2",{children:"Completed"})}),n.jsx("ul",{children:c.map((A,I)=>n.jsx(pr,{index:I,fileData:A,fileUploadConfig:e,setIsUploading:h,handleFileUploaded:i},I))})]})]})},yr=({files:e,fileUploadConfig:p,triggerAction:s,currentPath:i,currentPathFiles:d,selectedFile:c,setSelectedFile:f,handleCreateFolder:v,handleFileUploading:y,handleFileUploaded:l,currentFolder:h,handleRename:O,setIsItemSelection:j,handleDelete:A,allowedFileExtensions:I})=>{const[g,F]=Y.useState(null),H={uploadFile:{title:"Upload Files",component:n.jsx(hr,{fileUploadConfig:p,allowedFileExtensions:I,handleFileUploading:y,handleFileUploaded:l,currentFolder:h}),width:"35%"},delete:{title:"Delete",component:n.jsx(sr,{files:e,selectedFile:c,triggerAction:s,handleDelete:A,setIsItemSelection:j,setSelectedFile:f}),width:"25%"},preview:{title:"Preview"}};if(Y.useEffect(()=>{if(s.isActive){const B=s.actionType;F(H[B])}else F(null)},[s.isActive]),g)return n.jsx(rn,{heading:g.title,show:s.isActive,setShow:s.close,dialogWidth:g.width,children:g==null?void 0:g.component})},mr=({isLoading:e})=>{if(e)return n.jsx("div",{className:"fm-loader",children:n.jsx(on,{color:"black",type:"spokes",height:50,width:50})})};var yt={exports:{}},Ze={exports:{}},le={};/** @license React v16.13.1
|
|
189
|
+
* react-is.production.min.js
|
|
190
|
+
*
|
|
191
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
192
|
+
*
|
|
193
|
+
* This source code is licensed under the MIT license found in the
|
|
194
|
+
* LICENSE file in the root directory of this source tree.
|
|
195
|
+
*/var sn;function gr(){if(sn)return le;sn=1;var e=typeof Symbol=="function"&&Symbol.for,p=e?Symbol.for("react.element"):60103,s=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,d=e?Symbol.for("react.strict_mode"):60108,c=e?Symbol.for("react.profiler"):60114,f=e?Symbol.for("react.provider"):60109,v=e?Symbol.for("react.context"):60110,y=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,O=e?Symbol.for("react.suspense"):60113,j=e?Symbol.for("react.suspense_list"):60120,A=e?Symbol.for("react.memo"):60115,I=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,F=e?Symbol.for("react.fundamental"):60117,H=e?Symbol.for("react.responder"):60118,B=e?Symbol.for("react.scope"):60119;function R(o){if(typeof o=="object"&&o!==null){var E=o.$$typeof;switch(E){case p:switch(o=o.type,o){case y:case l:case i:case c:case d:case O:return o;default:switch(o=o&&o.$$typeof,o){case v:case h:case I:case A:case f:return o;default:return E}}case s:return E}}}function w(o){return R(o)===l}return le.AsyncMode=y,le.ConcurrentMode=l,le.ContextConsumer=v,le.ContextProvider=f,le.Element=p,le.ForwardRef=h,le.Fragment=i,le.Lazy=I,le.Memo=A,le.Portal=s,le.Profiler=c,le.StrictMode=d,le.Suspense=O,le.isAsyncMode=function(o){return w(o)||R(o)===y},le.isConcurrentMode=w,le.isContextConsumer=function(o){return R(o)===v},le.isContextProvider=function(o){return R(o)===f},le.isElement=function(o){return typeof o=="object"&&o!==null&&o.$$typeof===p},le.isForwardRef=function(o){return R(o)===h},le.isFragment=function(o){return R(o)===i},le.isLazy=function(o){return R(o)===I},le.isMemo=function(o){return R(o)===A},le.isPortal=function(o){return R(o)===s},le.isProfiler=function(o){return R(o)===c},le.isStrictMode=function(o){return R(o)===d},le.isSuspense=function(o){return R(o)===O},le.isValidElementType=function(o){return typeof o=="string"||typeof o=="function"||o===i||o===l||o===c||o===d||o===O||o===j||typeof o=="object"&&o!==null&&(o.$$typeof===I||o.$$typeof===A||o.$$typeof===f||o.$$typeof===v||o.$$typeof===h||o.$$typeof===F||o.$$typeof===H||o.$$typeof===B||o.$$typeof===g)},le.typeOf=R,le}var ue={};/** @license React v16.13.1
|
|
196
|
+
* react-is.development.js
|
|
197
|
+
*
|
|
198
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
199
|
+
*
|
|
200
|
+
* This source code is licensed under the MIT license found in the
|
|
201
|
+
* LICENSE file in the root directory of this source tree.
|
|
202
|
+
*/var cn;function br(){return cn||(cn=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,p=e?Symbol.for("react.element"):60103,s=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,d=e?Symbol.for("react.strict_mode"):60108,c=e?Symbol.for("react.profiler"):60114,f=e?Symbol.for("react.provider"):60109,v=e?Symbol.for("react.context"):60110,y=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,O=e?Symbol.for("react.suspense"):60113,j=e?Symbol.for("react.suspense_list"):60120,A=e?Symbol.for("react.memo"):60115,I=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,F=e?Symbol.for("react.fundamental"):60117,H=e?Symbol.for("react.responder"):60118,B=e?Symbol.for("react.scope"):60119;function R(C){return typeof C=="string"||typeof C=="function"||C===i||C===l||C===c||C===d||C===O||C===j||typeof C=="object"&&C!==null&&(C.$$typeof===I||C.$$typeof===A||C.$$typeof===f||C.$$typeof===v||C.$$typeof===h||C.$$typeof===F||C.$$typeof===H||C.$$typeof===B||C.$$typeof===g)}function w(C){if(typeof C=="object"&&C!==null){var re=C.$$typeof;switch(re){case p:var ae=C.type;switch(ae){case y:case l:case i:case c:case d:case O:return ae;default:var me=ae&&ae.$$typeof;switch(me){case v:case h:case I:case A:case f:return me;default:return re}}case s:return re}}}var o=y,E=l,T=v,U=f,X=p,J=h,D=i,Z=I,se=A,fe=s,he=c,Q=d,ye=O,de=!1;function ce(C){return de||(de=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),_(C)||w(C)===y}function _(C){return w(C)===l}function q(C){return w(C)===v}function b(C){return w(C)===f}function M(C){return typeof C=="object"&&C!==null&&C.$$typeof===p}function $(C){return w(C)===h}function k(C){return w(C)===i}function z(C){return w(C)===I}function a(C){return w(C)===A}function m(C){return w(C)===s}function P(C){return w(C)===c}function x(C){return w(C)===d}function L(C){return w(C)===O}ue.AsyncMode=o,ue.ConcurrentMode=E,ue.ContextConsumer=T,ue.ContextProvider=U,ue.Element=X,ue.ForwardRef=J,ue.Fragment=D,ue.Lazy=Z,ue.Memo=se,ue.Portal=fe,ue.Profiler=he,ue.StrictMode=Q,ue.Suspense=ye,ue.isAsyncMode=ce,ue.isConcurrentMode=_,ue.isContextConsumer=q,ue.isContextProvider=b,ue.isElement=M,ue.isForwardRef=$,ue.isFragment=k,ue.isLazy=z,ue.isMemo=a,ue.isPortal=m,ue.isProfiler=P,ue.isStrictMode=x,ue.isSuspense=L,ue.isValidElementType=R,ue.typeOf=w}()),ue}var ln;function un(){return ln||(ln=1,process.env.NODE_ENV==="production"?Ze.exports=gr():Ze.exports=br()),Ze.exports}/*
|
|
203
|
+
object-assign
|
|
204
|
+
(c) Sindre Sorhus
|
|
205
|
+
@license MIT
|
|
206
|
+
*/var mt,fn;function xr(){if(fn)return mt;fn=1;var e=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;function i(c){if(c==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(c)}function d(){try{if(!Object.assign)return!1;var c=new String("abc");if(c[5]="de",Object.getOwnPropertyNames(c)[0]==="5")return!1;for(var f={},v=0;v<10;v++)f["_"+String.fromCharCode(v)]=v;var y=Object.getOwnPropertyNames(f).map(function(h){return f[h]});if(y.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(h){l[h]=h}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return mt=d()?Object.assign:function(c,f){for(var v,y=i(c),l,h=1;h<arguments.length;h++){v=Object(arguments[h]);for(var O in v)p.call(v,O)&&(y[O]=v[O]);if(e){l=e(v);for(var j=0;j<l.length;j++)s.call(v,l[j])&&(y[l[j]]=v[l[j]])}}return y},mt}var gt,dn;function bt(){if(dn)return gt;dn=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return gt=e,gt}var xt,pn;function vn(){return pn||(pn=1,xt=Function.call.bind(Object.prototype.hasOwnProperty)),xt}var Ct,hn;function Cr(){if(hn)return Ct;hn=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var p=bt(),s={},i=vn();e=function(c){var f="Warning: "+c;typeof console<"u"&&console.error(f);try{throw new Error(f)}catch{}}}function d(c,f,v,y,l){if(process.env.NODE_ENV!=="production"){for(var h in c)if(i(c,h)){var O;try{if(typeof c[h]!="function"){var j=Error((y||"React class")+": "+v+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof c[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw j.name="Invariant Violation",j}O=c[h](f,h,y,v,null,p)}catch(I){O=I}if(O&&!(O instanceof Error)&&e((y||"React class")+": type specification of "+v+" `"+h+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof O+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),O instanceof Error&&!(O.message in s)){s[O.message]=!0;var A=l?l():"";e("Failed "+v+" type: "+O.message+(A??""))}}}}return d.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(s={})},Ct=d,Ct}var jt,yn;function jr(){if(yn)return jt;yn=1;var e=un(),p=xr(),s=bt(),i=vn(),d=Cr(),c=function(){};process.env.NODE_ENV!=="production"&&(c=function(v){var y="Warning: "+v;typeof console<"u"&&console.error(y);try{throw new Error(y)}catch{}});function f(){return null}return jt=function(v,y){var l=typeof Symbol=="function"&&Symbol.iterator,h="@@iterator";function O(_){var q=_&&(l&&_[l]||_[h]);if(typeof q=="function")return q}var j="<<anonymous>>",A={array:H("array"),bigint:H("bigint"),bool:H("boolean"),func:H("function"),number:H("number"),object:H("object"),string:H("string"),symbol:H("symbol"),any:B(),arrayOf:R,element:w(),elementType:o(),instanceOf:E,node:J(),objectOf:U,oneOf:T,oneOfType:X,shape:Z,exact:se};function I(_,q){return _===q?_!==0||1/_===1/q:_!==_&&q!==q}function g(_,q){this.message=_,this.data=q&&typeof q=="object"?q:{},this.stack=""}g.prototype=Error.prototype;function F(_){if(process.env.NODE_ENV!=="production")var q={},b=0;function M(k,z,a,m,P,x,L){if(m=m||j,x=x||a,L!==s){if(y){var C=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw C.name="Invariant Violation",C}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var re=m+":"+a;!q[re]&&b<3&&(c("You are manually calling a React.PropTypes validation function for the `"+x+"` prop on `"+m+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),q[re]=!0,b++)}}return z[a]==null?k?z[a]===null?new g("The "+P+" `"+x+"` is marked as required "+("in `"+m+"`, but its value is `null`.")):new g("The "+P+" `"+x+"` is marked as required in "+("`"+m+"`, but its value is `undefined`.")):null:_(z,a,m,P,x)}var $=M.bind(null,!1);return $.isRequired=M.bind(null,!0),$}function H(_){function q(b,M,$,k,z,a){var m=b[M],P=Q(m);if(P!==_){var x=ye(m);return new g("Invalid "+k+" `"+z+"` of type "+("`"+x+"` supplied to `"+$+"`, expected ")+("`"+_+"`."),{expectedType:_})}return null}return F(q)}function B(){return F(f)}function R(_){function q(b,M,$,k,z){if(typeof _!="function")return new g("Property `"+z+"` of component `"+$+"` has invalid PropType notation inside arrayOf.");var a=b[M];if(!Array.isArray(a)){var m=Q(a);return new g("Invalid "+k+" `"+z+"` of type "+("`"+m+"` supplied to `"+$+"`, expected an array."))}for(var P=0;P<a.length;P++){var x=_(a,P,$,k,z+"["+P+"]",s);if(x instanceof Error)return x}return null}return F(q)}function w(){function _(q,b,M,$,k){var z=q[b];if(!v(z)){var a=Q(z);return new g("Invalid "+$+" `"+k+"` of type "+("`"+a+"` supplied to `"+M+"`, expected a single ReactElement."))}return null}return F(_)}function o(){function _(q,b,M,$,k){var z=q[b];if(!e.isValidElementType(z)){var a=Q(z);return new g("Invalid "+$+" `"+k+"` of type "+("`"+a+"` supplied to `"+M+"`, expected a single ReactElement type."))}return null}return F(_)}function E(_){function q(b,M,$,k,z){if(!(b[M]instanceof _)){var a=_.name||j,m=ce(b[M]);return new g("Invalid "+k+" `"+z+"` of type "+("`"+m+"` supplied to `"+$+"`, expected ")+("instance of `"+a+"`."))}return null}return F(q)}function T(_){if(!Array.isArray(_))return process.env.NODE_ENV!=="production"&&(arguments.length>1?c("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):c("Invalid argument supplied to oneOf, expected an array.")),f;function q(b,M,$,k,z){for(var a=b[M],m=0;m<_.length;m++)if(I(a,_[m]))return null;var P=JSON.stringify(_,function(L,C){var re=ye(C);return re==="symbol"?String(C):C});return new g("Invalid "+k+" `"+z+"` of value `"+String(a)+"` "+("supplied to `"+$+"`, expected one of "+P+"."))}return F(q)}function U(_){function q(b,M,$,k,z){if(typeof _!="function")return new g("Property `"+z+"` of component `"+$+"` has invalid PropType notation inside objectOf.");var a=b[M],m=Q(a);if(m!=="object")return new g("Invalid "+k+" `"+z+"` of type "+("`"+m+"` supplied to `"+$+"`, expected an object."));for(var P in a)if(i(a,P)){var x=_(a,P,$,k,z+"."+P,s);if(x instanceof Error)return x}return null}return F(q)}function X(_){if(!Array.isArray(_))return process.env.NODE_ENV!=="production"&&c("Invalid argument supplied to oneOfType, expected an instance of array."),f;for(var q=0;q<_.length;q++){var b=_[q];if(typeof b!="function")return c("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+de(b)+" at index "+q+"."),f}function M($,k,z,a,m){for(var P=[],x=0;x<_.length;x++){var L=_[x],C=L($,k,z,a,m,s);if(C==null)return null;C.data&&i(C.data,"expectedType")&&P.push(C.data.expectedType)}var re=P.length>0?", expected one of type ["+P.join(", ")+"]":"";return new g("Invalid "+a+" `"+m+"` supplied to "+("`"+z+"`"+re+"."))}return F(M)}function J(){function _(q,b,M,$,k){return fe(q[b])?null:new g("Invalid "+$+" `"+k+"` supplied to "+("`"+M+"`, expected a ReactNode."))}return F(_)}function D(_,q,b,M,$){return new g((_||"React class")+": "+q+" type `"+b+"."+M+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+$+"`.")}function Z(_){function q(b,M,$,k,z){var a=b[M],m=Q(a);if(m!=="object")return new g("Invalid "+k+" `"+z+"` of type `"+m+"` "+("supplied to `"+$+"`, expected `object`."));for(var P in _){var x=_[P];if(typeof x!="function")return D($,k,z,P,ye(x));var L=x(a,P,$,k,z+"."+P,s);if(L)return L}return null}return F(q)}function se(_){function q(b,M,$,k,z){var a=b[M],m=Q(a);if(m!=="object")return new g("Invalid "+k+" `"+z+"` of type `"+m+"` "+("supplied to `"+$+"`, expected `object`."));var P=p({},b[M],_);for(var x in P){var L=_[x];if(i(_,x)&&typeof L!="function")return D($,k,z,x,ye(L));if(!L)return new g("Invalid "+k+" `"+z+"` key `"+x+"` supplied to `"+$+"`.\nBad object: "+JSON.stringify(b[M],null," ")+`
|
|
207
|
+
Valid keys: `+JSON.stringify(Object.keys(_),null," "));var C=L(a,x,$,k,z+"."+x,s);if(C)return C}return null}return F(q)}function fe(_){switch(typeof _){case"number":case"string":case"undefined":return!0;case"boolean":return!_;case"object":if(Array.isArray(_))return _.every(fe);if(_===null||v(_))return!0;var q=O(_);if(q){var b=q.call(_),M;if(q!==_.entries){for(;!(M=b.next()).done;)if(!fe(M.value))return!1}else for(;!(M=b.next()).done;){var $=M.value;if($&&!fe($[1]))return!1}}else return!1;return!0;default:return!1}}function he(_,q){return _==="symbol"?!0:q?q["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&q instanceof Symbol:!1}function Q(_){var q=typeof _;return Array.isArray(_)?"array":_ instanceof RegExp?"object":he(q,_)?"symbol":q}function ye(_){if(typeof _>"u"||_===null)return""+_;var q=Q(_);if(q==="object"){if(_ instanceof Date)return"date";if(_ instanceof RegExp)return"regexp"}return q}function de(_){var q=ye(_);switch(q){case"array":case"object":return"an "+q;case"boolean":case"date":case"regexp":return"a "+q;default:return q}}function ce(_){return!_.constructor||!_.constructor.name?j:_.constructor.name}return A.checkPropTypes=d,A.resetWarningCache=d.resetWarningCache,A.PropTypes=A,A},jt}var wt,mn;function wr(){if(mn)return wt;mn=1;var e=bt();function p(){}function s(){}return s.resetWarningCache=p,wt=function(){function i(f,v,y,l,h,O){if(O!==e){var j=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw j.name="Invariant Violation",j}}i.isRequired=i;function d(){return i}var c={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:d,element:i,elementType:i,instanceOf:d,node:i,objectOf:d,oneOf:d,oneOfType:d,shape:d,exact:d,checkPropTypes:s,resetWarningCache:p};return c.PropTypes=c,c},wt}if(process.env.NODE_ENV!=="production"){var Er=un(),Or=!0;yt.exports=jr()(Er.isElement,Or)}else yt.exports=wr()();var Tr=yt.exports;const gn=lt(Tr),bn=({files:e=[],fileUploadConfig:p,isLoading:s,onCreateFolder:i,onFileUploading:d,onFileUploaded:c,onRename:f,onDelete:v,onPaste:y,onRefresh:l,allowedFileExtensions:h})=>{const O=ir(),[j,A]=Y.useState(!1),[I,g]=Y.useState(null),[F,H]=Y.useState(""),[B,R]=Y.useState(null),[w,o]=Y.useState([]),[E,T]=Y.useState(null);Y.useEffect(()=>{Array.isArray(e)&&(o(()=>e.filter(Q=>Q.path===`${F}/${Q.name}`)),R(()=>e==null?void 0:e.find(Q=>Q.path===F)))},[e,F]);const[U,X]=Y.useState({col1:"20",col2:"80"}),[J,D]=Y.useState(!1),Z=Y.useRef(null),se=()=>{D(!0)},fe=()=>{D(!1)},he=Q=>{if(!J)return;Q.preventDefault();const de=Z.current.getBoundingClientRect(),ce=(Q.clientX-de.left)/de.width*100;ce>=15&&ce<=60&&X({col1:ce,col2:100-ce})};return n.jsxs("main",{className:"file-explorer",onContextMenu:Q=>Q.preventDefault(),children:[n.jsx(mr,{isLoading:s}),n.jsx(Wn,{allowCreateFolder:!0,allowUploadFile:!0,handleRefresh:l,isItemSelection:j,setIsItemSelection:A,currentPath:F,selectedFile:I,setSelectedFile:g,files:e,clipBoard:E,setClipBoard:T,handlePaste:y,triggerAction:O}),n.jsxs("section",{ref:Z,onMouseMove:he,onMouseUp:fe,className:"files-container",children:[n.jsxs("div",{className:"navigation-pane",style:{width:U.col1+"%"},children:[n.jsx(Jn,{files:e,currentPath:F,setCurrentPath:H}),n.jsx("div",{className:`sidebar-resize ${J?"sidebar-dragging":""}`,onMouseDown:se})]}),n.jsxs("div",{className:"folders-preview",style:{width:U.col2+"%"},children:[n.jsx(Gn,{currentPath:F,setCurrentPath:H}),n.jsx(or,{currentPathFiles:w,setCurrentPathFiles:o,setCurrentPath:H,isItemSelection:j,setIsItemSelection:A,setSelectedFile:g,currentPath:F,clipBoard:E,setClipBoard:T,handlePaste:y,files:e,triggerAction:O,currentFolder:B,handleCreateFolder:i,handleRename:f})]})]}),n.jsx(yr,{files:e,fileUploadConfig:p,currentPath:F,currentPathFiles:w,selectedFile:I,triggerAction:O,handleCreateFolder:i,handleFileUploading:d,handleFileUploaded:c,currentFolder:B,handleRename:f,handleDelete:v,setIsItemSelection:A,setSelectedFile:g,allowedFileExtensions:h})]})};bn.propTypes={files:gn.arrayOf(gn.object)},_e.FileManager=bn,Object.defineProperty(_e,Symbol.toStringTag,{value:"Module"})});
|