cloudcmd 19.1.21 → 19.2.0
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/ChangeLog +15 -0
- package/HELP.md +2 -1
- package/README.md +1 -1
- package/dist/cloudcmd.common.js +2 -2
- package/dist/cloudcmd.common.js.map +1 -1
- package/dist/modules/edit-file-vim.js +1 -1
- package/dist/modules/edit-file-vim.js.map +1 -1
- package/dist/modules/edit-file.js +1 -1
- package/dist/modules/edit-file.js.map +1 -1
- package/dist/modules/edit-names-vim.js +1 -1
- package/dist/modules/edit-names-vim.js.map +1 -1
- package/dist/modules/edit-names.js +1 -1
- package/dist/modules/edit-names.js.map +1 -1
- package/dist/modules/help.js +1 -1
- package/dist/modules/help.js.map +1 -1
- package/dist/modules/markdown.js +1 -1
- package/dist/modules/markdown.js.map +1 -1
- package/dist/modules/polyfill.js +1 -1
- package/dist/modules/polyfill.js.map +1 -1
- package/dist/modules/terminal.js +1 -1
- package/dist/modules/terminal.js.map +1 -1
- package/dist/sw.js +1 -1
- package/dist-dev/cloudcmd.common.js +77 -87
- package/dist-dev/modules/edit-file-vim.js +1 -1
- package/dist-dev/modules/edit-file.js +1 -1
- package/dist-dev/modules/edit-names-vim.js +1 -1
- package/dist-dev/modules/edit-names.js +1 -1
- package/dist-dev/modules/help.js +1 -1
- package/dist-dev/modules/markdown.js +1 -1
- package/dist-dev/modules/polyfill.js +1 -1
- package/dist-dev/modules/terminal.js +1 -1
- package/dist-dev/sw.js +1 -1
- package/package.json +3 -2
package/dist/cloudcmd.common.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(globalThis.webpackChunkcloudcmd=globalThis.webpackChunkcloudcmd||[]).push([[267,547],{41(e,t,n){"use strict";var r=n(655),o=n(8068),i=n(9675),a=n(5795);e.exports=function(e,t,n){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],f=!!a&&a(e,t);if(r)r(e,t,{configurable:null===l&&f?f.configurable:!l,enumerable:null===s&&f?f.enumerable:!s,value:n,writable:null===c&&f?f.writable:!c});else{if(!u&&(s||c||l))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},76(e){"use strict";e.exports=Function.prototype.call},112(e,t,n){"use strict";const{tryToCatch:r}=n(980),o=Promise.all.bind(Promise);e.exports=async e=>{const[t,n=[]]=await r(o,e);return[t,...n]}},231(e,t,n){"use strict";const{FS:r}=n(8453),o=n(701),i={top:!0};e.exports.delete=async(e,t)=>await o({method:"DELETE",url:r+e,data:t,imgPosition:{top:Boolean(t)}}),e.exports.patch=async(e,t)=>await o({method:"PATCH",url:r+e,data:t,imgPosition:i}),e.exports.write=async(e,t)=>await o({method:"PUT",url:r+e,data:t,imgPosition:i}),e.exports.createDirectory=async(e,t={})=>{const{sendRequest:n=o}=t;return await n({method:"PUT",url:`${r}${e}?dir`,imgPosition:i})},e.exports.read=async(e,t="text")=>{const n=!e.includes("?");return await o({method:"GET",url:r+e,notLog:n,dataType:t})},e.exports.copy=async(e,t,n)=>await o({method:"PUT",url:"/copy",data:{from:e,to:t,names:n},imgPosition:i}),e.exports.pack=async e=>await o({method:"PUT",url:"/pack",data:e}),e.exports.extract=async e=>await o({method:"PUT",url:"/extract",data:e}),e.exports.move=async(e,t,n)=>await o({method:"PUT",url:"/move",data:{from:e,to:t,names:n},imgPosition:i}),e.exports.rename=async(e,t)=>await o({method:"PUT",url:"/rename",data:{from:e,to:t},imgPosition:i}),e.exports.Config={read:async()=>await o({method:"GET",url:"/config",imgPosition:i,notLog:!0}),write:async e=>await o({method:"PATCH",url:"/config",data:e,imgPosition:i})},e.exports.Markdown={read:async e=>await o({method:"GET",url:`/markdown${e}`,imgPosition:i,notLog:!0}),render:async e=>await o({method:"PUT",url:"/markdown",data:e,imgPosition:i,notLog:!0})}},316(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e=>"object"==typeof e&&null!=e&&1===e.nodeType,r=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,o=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return r(n.overflowY,t)||r(n.overflowX,t)||(e=>{const t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},i=(e,t,n,r,o,i,a,s)=>i<e&&a>t||i>e&&a<t?0:i<=e&&s<=n||a>=t&&s>=n?i-e-r:a>t&&s<n||i<e&&s>n?a-t+o:0,a=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t};t.compute=(e,t)=>{var r,s,c,l;if("undefined"==typeof document)return[];const{scrollMode:u,block:f,inline:d,boundary:p,skipOverflowHiddenElements:m}=t,h="function"==typeof p?p:e=>e!==p;if(!n(e))throw new TypeError("Invalid target");const g=document.scrollingElement||document.documentElement,y=[];let C=e;for(;n(C)&&h(C);){if(C=a(C),C===g){y.push(C);break}null!=C&&C===document.body&&o(C)&&!o(document.documentElement)||null!=C&&o(C,m)&&y.push(C)}const w=null!=(s=null==(r=window.visualViewport)?void 0:r.width)?s:innerWidth,b=null!=(l=null==(c=window.visualViewport)?void 0:c.height)?l:innerHeight,{scrollX:v,scrollY:D}=window,{height:x,width:E,top:O,right:S,bottom:A,left:P}=e.getBoundingClientRect(),{top:M,right:k,bottom:F,left:j}=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);let N="start"===f||"nearest"===f?O-M:"end"===f?A+F:O+x/2-M+F,T="center"===d?P+E/2-j+k:"end"===d?S+k:P-j;const I=[];for(let e=0;e<y.length;e++){const t=y[e],{height:n,width:r,top:a,right:s,bottom:c,left:l}=t.getBoundingClientRect();if("if-needed"===u&&O>=0&&P>=0&&A<=b&&S<=w&&(t===g&&!o(t)||O>=a&&A<=c&&P>=l&&S<=s))return I;const p=getComputedStyle(t),m=parseInt(p.borderLeftWidth,10),h=parseInt(p.borderTopWidth,10),C=parseInt(p.borderRightWidth,10),M=parseInt(p.borderBottomWidth,10);let k=0,F=0;const j="offsetWidth"in t?t.offsetWidth-t.clientWidth-m-C:0,R="offsetHeight"in t?t.offsetHeight-t.clientHeight-h-M:0,$="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,B="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(g===t)k="start"===f?N:"end"===f?N-b:"nearest"===f?i(D,D+b,b,h,M,D+N,D+N+x,x):N-b/2,F="start"===d?T:"center"===d?T-w/2:"end"===d?T-w:i(v,v+w,w,m,C,v+T,v+T+E,E),k=Math.max(0,k+D),F=Math.max(0,F+v);else{k="start"===f?N-a-h:"end"===f?N-c+M+R:"nearest"===f?i(a,c,n,h,M+R,N,N+x,x):N-(a+n/2)+R/2,F="start"===d?T-l-m:"center"===d?T-(l+r/2)+j/2:"end"===d?T-s+C+j:i(l,s,r,m,C+j,T,T+E,E);const{scrollLeft:e,scrollTop:o}=t;k=0===B?0:Math.max(0,Math.min(o+k/B,t.scrollHeight-n/B+R)),F=0===$?0:Math.max(0,Math.min(e+F/$,t.scrollWidth-r/$+j)),N+=o-k,T+=e-F}I.push({el:t,top:k,left:F})}return I}},368(e,t,n){"use strict";n(9074);const r=n(6558);globalThis.DOM=globalThis.DOM||{};globalThis.DOM.scrollIntoViewIfNeeded=(e,t={})=>{const{scroll:n=r}=t;return n(e,{block:"nearest"})}},407(e,t,n){"use strict";const r=n(4299),o=r((e,t,n)=>e.setAttribute(n,t[n])),i=r((e,t,n)=>e[n]=t[n]),a=r((e,t)=>!e(t)),s=e=>e!=e.toLowerCase();function c(e){var t;if(e)return t=e,document.querySelector(`[data-name="${t}"]`)}e.exports=(e,t={})=>{const{dataName:n,notAppend:r,parent:l=document.body,uniq:u=!0,...f}=t,d=c(n);if(u&&d)return d;const p=document.createElement(e);return n&&(p.dataset.name=n),Object.keys(f).filter(s).map(i(p,t)),Object.keys(f).filter(a(s)).map(o(p,t)),r||l.appendChild(p),p},e.exports.isElementPresent=c},414(e){"use strict";e.exports=Math.round},453(e,t,n){"use strict";var r,o=n(9612),i=n(9383),a=n(1237),s=n(9290),c=n(9538),l=n(8068),u=n(9675),f=n(5345),d=n(1514),p=n(8968),m=n(6188),h=n(8002),g=n(5880),y=n(414),C=n(3093),w=Function,b=function(e){try{return w('"use strict"; return ('+e+").constructor;")()}catch(e){}},v=n(5795),D=n(655),x=function(){throw new u},E=v?function(){try{return x}catch(e){try{return v(arguments,"callee").get}catch(e){return x}}}():x,O=n(4039)(),S=n(3628),A=n(1064),P=n(8648),M=n(1002),k=n(76),F={},j="undefined"!=typeof Uint8Array&&S?S(Uint8Array):r,N={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":O&&S?S([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":F,"%AsyncGenerator%":F,"%AsyncGeneratorFunction%":F,"%AsyncIteratorPrototype%":F,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":"undefined"==typeof Float16Array?r:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":w,"%GeneratorFunction%":F,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":O&&S?S(S([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&O&&S?S((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":o,"%Object.getOwnPropertyDescriptor%":v,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":s,"%ReferenceError%":c,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&O&&S?S((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":O&&S?S(""[Symbol.iterator]()):r,"%Symbol%":O?Symbol:r,"%SyntaxError%":l,"%ThrowTypeError%":E,"%TypedArray%":j,"%TypeError%":u,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":f,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet,"%Function.prototype.call%":k,"%Function.prototype.apply%":M,"%Object.defineProperty%":D,"%Object.getPrototypeOf%":A,"%Math.abs%":d,"%Math.floor%":p,"%Math.max%":m,"%Math.min%":h,"%Math.pow%":g,"%Math.round%":y,"%Math.sign%":C,"%Reflect.getPrototypeOf%":P};if(S)try{null.error}catch(e){var T=S(S(e));N["%Error.prototype%"]=T}var I=function e(t){var n;if("%AsyncFunction%"===t)n=b("async function () {}");else if("%GeneratorFunction%"===t)n=b("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=b("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&S&&(n=S(o.prototype))}return N[t]=n,n},R={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},$=n(6743),B=n(9957),L=$.call(k,Array.prototype.concat),_=$.call(M,Array.prototype.splice),U=$.call(k,String.prototype.replace),V=$.call(k,String.prototype.slice),H=$.call(k,RegExp.prototype.exec),z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,W=/\\(\\)?/g,K=function(e,t){var n,r=e;if(B(R,r)&&(r="%"+(n=R[r])[0]+"%"),B(N,r)){var o=N[r];if(o===F&&(o=I(r)),void 0===o&&!t)throw new u("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new l("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new u('"allowMissing" argument must be a boolean');if(null===H(/^%?[^%]*%?$/,e))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=V(e,0,1),n=V(e,-1);if("%"===t&&"%"!==n)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new l("invalid intrinsic syntax, expected opening `%`");var r=[];return U(e,z,function(e,t,n,o){r[r.length]=n?U(o,W,"$1"):t||e}),r}(e),r=n.length>0?n[0]:"",o=K("%"+r+"%",t),i=o.name,a=o.value,s=!1,c=o.alias;c&&(r=c[0],_(n,L([0,1],c)));for(var f=1,d=!0;f<n.length;f+=1){var p=n[f],m=V(p,0,1),h=V(p,-1);if(('"'===m||"'"===m||"`"===m||'"'===h||"'"===h||"`"===h)&&m!==h)throw new l("property names with quotes must have matching quotes");if("constructor"!==p&&d||(s=!0),B(N,i="%"+(r+="."+p)+"%"))a=N[i];else if(null!=a){if(!(p in a)){if(!t)throw new u("base intrinsic for "+e+" exists, but the property is not available.");return}if(v&&f+1>=n.length){var g=v(a,p);a=(d=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:a[p]}else d=B(a,p),a=a[p];d&&!s&&(N[i]=a)}}return a}},459(e,t,n){"use strict";CloudCmd.Contact=t;const r=n(1362),o=n(3543),{Events:i}=DOM,{Key:a}=CloudCmd;function s(){a.unsetBind(),o.hide(),r("api.box.expand")}function c(){a.setBind(),r("api.box.hide")}function l({keyCode:e}){e===a.ESC&&c()}e.exports.show=s,e.exports.hide=c,e.exports.init=()=>{i.addKey(l),r.identify("6216-545-10-4223"),r("api.box.onExpand",s),r("api.box.onShow",s),r("api.box.onShrink",c)}},487(e,t,n){"use strict";var r=n(6897),o=n(655),i=n(3126),a=n(2205);e.exports=function(e){var t=i(arguments),n=e.length-(arguments.length-1);return r(t,1+(n>0?n:0),!0)},o?o(e.exports,"apply",{value:a}):e.exports.apply=a},507(e,t,n){"use strict";n.r(t),n.d(t,{Config:()=>w,Markdown:()=>b,copy:()=>m,createDirectory:()=>d,extract:()=>g,move:()=>y,pack:()=>h,patch:()=>u,read:()=>p,remove:()=>l,rename:()=>C,write:()=>f});var r=n(980),o=n(8553),i=n(3543),a=n(1849),s=n(231);const c=e=>async(...t)=>{const[n,s]=await(0,r.tryToCatch)(e,...t);if(!n)return[n,s];const c=(0,a.l)(n.message);return i.show.error(c),o.alert(c),[n,s]},l=c(s.delete),u=c(s.patch),f=c(s.write),d=c(s.createDirectory),p=c(s.read),m=c(s.copy),h=c(s.pack),g=c(s.extract),y=c(s.move),C=c(s.rename),w={read:c(s.Config.read),write:c(s.Config.write)},b={read:c(s.Markdown.read),render:c(s.Markdown.render)}},537(e,t,n){var r=n(5606),o=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n},i=/%[sdj%]/g;t.format=function(e){if(!w(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(l(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,o=r.length,a=String(e).replace(i,function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n<o;s=r[++n])y(s)||!D(s)?a+=" "+s:a+=" "+l(s);return a},t.deprecate=function(e,n){if(void 0!==r&&!0===r.noDeprecation)return e;if(void 0===r)return function(){return t.deprecate(e,n).apply(this,arguments)};var o=!1;return function(){if(!o){if(r.throwDeprecation)throw new Error(n);r.traceDeprecation?console.trace(n):console.error(n),o=!0}return e.apply(this,arguments)}};var a={},s=/^$/;if(r.env.NODE_DEBUG){var c=r.env.NODE_DEBUG;c=c.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),s=new RegExp("^"+c+"$","i")}function l(e,n){var r={seen:[],stylize:f};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),g(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),d(r,e,r.depth)}function u(e,t){var n=l.styles[t];return n?"["+l.colors[n][0]+"m"+e+"["+l.colors[n][1]+"m":e}function f(e,t){return e}function d(e,n,r){if(e.customInspect&&n&&O(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return w(o)||(o=d(e,o,r)),o}var i=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(w(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return C(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):y(t)?e.stylize("null","null"):void 0}(e,n);if(i)return i;var a=Object.keys(n),s=function(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),E(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return p(n);if(0===a.length){if(O(n)){var c=n.name?": "+n.name:"";return e.stylize("[Function"+c+"]","special")}if(v(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(x(n))return e.stylize(Date.prototype.toString.call(n),"date");if(E(n))return p(n)}var l,u="",f=!1,D=["{","}"];return h(n)&&(f=!0,D=["[","]"]),O(n)&&(u=" [Function"+(n.name?": "+n.name:"")+"]"),v(n)&&(u=" "+RegExp.prototype.toString.call(n)),x(n)&&(u=" "+Date.prototype.toUTCString.call(n)),E(n)&&(u=" "+p(n)),0!==a.length||f&&0!=n.length?r<0?v(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),l=f?function(e,t,n,r,o){for(var i=[],a=0,s=t.length;a<s;++a)M(t,String(a))?i.push(m(e,t,n,r,String(a),!0)):i.push("");return o.forEach(function(o){o.match(/^\d+$/)||i.push(m(e,t,n,r,o,!0))}),i}(e,n,r,s,a):a.map(function(t){return m(e,n,r,s,t,f)}),e.seen.pop(),function(e,t,n){return e.reduce(function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(l,u,D)):D[0]+u+D[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function m(e,t,n,r,o,i){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),M(r,o)||(a="["+o+"]"),s||(e.seen.indexOf(c.value)<0?(s=y(n)?d(e,c.value,null):d(e,c.value,n-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map(function(e){return" "+e}).join("\n").slice(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),b(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function h(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function y(e){return null===e}function C(e){return"number"==typeof e}function w(e){return"string"==typeof e}function b(e){return void 0===e}function v(e){return D(e)&&"[object RegExp]"===S(e)}function D(e){return"object"==typeof e&&null!==e}function x(e){return D(e)&&"[object Date]"===S(e)}function E(e){return D(e)&&("[object Error]"===S(e)||e instanceof Error)}function O(e){return"function"==typeof e}function S(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!a[e])if(s.test(e)){var n=r.pid;a[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else a[e]=function(){};return a[e]},t.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=n(9032),t.isArray=h,t.isBoolean=g,t.isNull=y,t.isNullOrUndefined=function(e){return null==e},t.isNumber=C,t.isString=w,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=v,t.types.isRegExp=v,t.isObject=D,t.isDate=x,t.types.isDate=x,t.isError=E,t.types.isNativeError=E,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(1135);var P=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function M(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(n=[A((e=new Date).getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":"),[e.getDate(),P[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(6698),t._extend=function(e,t){if(!t||!D(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var k="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function F(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(k&&e[k]){var t;if("function"!=typeof(t=e[k]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,k,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise(function(e,r){t=e,n=r}),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push(function(e,r){e?n(e):t(r)});try{e.apply(this,o)}catch(e){n(e)}return r}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),k&&Object.defineProperty(t,k,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,o(e))},t.promisify.custom=k,t.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function t(){for(var t=[],n=0;n<arguments.length;n++)t.push(arguments[n]);var o=t.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,a=function(){return o.apply(i,arguments)};e.apply(this,t).then(function(e){r.nextTick(a.bind(null,null,e))},function(e){r.nextTick(F.bind(null,e,a))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,o(e)),t}},592(e,t,n){"use strict";var r=n(655),o=function(){return!!r};o.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},608(e,t,n){"use strict";n.d(t,{Z:()=>d});var r=n(9168),o=n(9317),i=n(6037),a=n(8553),s=n(8453),c=n(3543),l=n(4559);const u=o(function(e,t,n,r){const{name:o}=n,a=e+o,{prefixURL:l}=CloudCmd,u=l+s.FS;i.put(u+a,n).on("error",p).on("end",r).on("progress",e=>{const n=(e=>100/e)(t),r=0*n+((e,t,n=100)=>Math.round(e*n/t))(e,100,n);c.show.load("top"),c.setProgress(Math.round(r))})}),f=o(function(e){CloudCmd.refresh({currentName:e})}),d=(e,t)=>{t||(t=e,e=(0,l.getCurrentDirPath)());const n=t.length;if(!n)return;const o=Array.from(t),{name:i}=t[0];(0,r.eachSeries)(o,u(e,n),f(i))};function p({message:e}){(0,a.alert)(e)}},655(e){"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},701(e,t,n){"use strict";const{promisify:r}=n(4905),o=n(3543),i=n(6037);function a(e){return e.replace(/#/g,"%23")}e.exports=r((e,t)=>{const n=e,{prefixURL:r}=CloudCmd;n.url=r+n.url,n.url=encodeURI(n.url),n.url=a(n.url),i.ajax({method:n.method,url:n.url,data:n.data,dataType:n.dataType,error:e=>{const n=e.responseText,{statusText:r,status:o}=e;t(Error(404===o?n:r))},success:e=>{o.hide(),n.notLog||CloudCmd.log(e),t(null,e)}})}),e.exports._replaceHash=a},726(e){"use strict";let t=[];e.exports.add=(e,n,r)=>{t.push([e,n,r])},e.exports.clear=()=>{t=[]},e.exports.get=()=>t},740(e,t,n){"use strict";n.r(t),n.d(t,{clear:()=>l,get:()=>s,getJson:()=>c,remove:()=>u,set:()=>i,setJson:()=>a});const{parse:r,stringify:o}=JSON,i=(e,t)=>{localStorage.setItem(e,t)},a=(e,t)=>{localStorage.setItem(e,o(t))},s=e=>localStorage.getItem(e),c=e=>{const t=localStorage.getItem(e);return r(t)},l=()=>{localStorage.clear()},u=e=>{localStorage.removeItem(e)}},806(e,t,n){"use strict";n.r(t),n.d(t,{get:()=>d});var r=n(2515),o=n(5811),i=n(6037),a=n(507);const s={},c="view/media-tmpl|config-tmpl|upload",l="/tmpl/",u=/^(8(|00|58)|531|635|650|795)$/.test(n.j)?`${l}fs/`:null,f=function(){let e;return t=>{e||(e=!0,setTimeout(()=>{e=!1,t()},2e3))}}(),d=/^(8(|00|58)|531|635|650|795)$/.test(n.j)?function e(t){const n=r(t);return function(e){if(!e)throw Error("name could not be empty!")}(t),"string"===n?function(e){const t=RegExp("file|path|link|pathLink|media|"+c),n=RegExp("config|modules"),r=t.test(e),o=n.test(e);if(!r&&!o)return function(e){throw Error(`Wrong file name: ${e}`)}(e);if("config"===e)return m();const i=function(e,t,n){let r;const o=RegExp(c).test(e);return t?(r=o?l+e.replace("-tmpl",""):u+e,r+=".hbs"):n&&(r="/json/"+e+".json"),r}(e,r,o);return p(i)}(t):"array"===n?Promise.all(t.map(e)):void 0}:null,p=(0,o.F)((e,t)=>{const{prefix:n}=CloudCmd;s[e]||(s[e]=new Promise((t,r)=>{const o=n+e;i.ajax({url:o,success:t,error:r})})),s[e].then(e=>{t(null,e)},n=>{s[e]=null,t(n)})}),m=async()=>{let e;s.config||(s.config=()=>(e=!0,a.Config.read()));const[,t]=await s.config();return t&&(e=!1),f(()=>{e||(s.config=null)}),t}},887(e,t,n){const{fullstore:r}=n(8328);e.exports=r,e.exports.fullstore=r},975(e){"use strict";e.exports=(e,t)=>{(function(e,t){const n={}.toString.call(e);if(e&&"[object Date]"!==n)throw Error("date should be Date!");if(t&&"object"!=typeof t)throw Error("options should be object!")})(e=e||new Date,t),t||(t={});const{sep:n=".",order:r="big"}=t;let o=e.getDate(),i=e.getMonth()+1;const a=e.getFullYear();switch(i<=9&&(i="0"+i),o<=9&&(o="0"+o),r){case"big":return[a,i,o].join(n);case"middle":return[i,o,a].join(n);case"little":return[o,i,a].join(n);default:throw Error('order could be "big", "middle" and "little" only!')}}},980(e,t,n){"use strict";n.r(t),n.d(t,{tryToCatch:()=>r});const r=async(e,...t)=>{!function(e){if("function"!=typeof e)throw Error("fn should be a function!")}(e);try{return[null,await e(...t)]}catch(e){return[e]}}},1e3(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isIdentifierChar",{enumerable:!0,get:function(){return r.isIdentifierChar}}),Object.defineProperty(t,"isIdentifierName",{enumerable:!0,get:function(){return r.isIdentifierName}}),Object.defineProperty(t,"isIdentifierStart",{enumerable:!0,get:function(){return r.isIdentifierStart}}),Object.defineProperty(t,"isKeyword",{enumerable:!0,get:function(){return o.isKeyword}}),Object.defineProperty(t,"isReservedWord",{enumerable:!0,get:function(){return o.isReservedWord}}),Object.defineProperty(t,"isStrictBindOnlyReservedWord",{enumerable:!0,get:function(){return o.isStrictBindOnlyReservedWord}}),Object.defineProperty(t,"isStrictBindReservedWord",{enumerable:!0,get:function(){return o.isStrictBindReservedWord}}),Object.defineProperty(t,"isStrictReservedWord",{enumerable:!0,get:function(){return o.isStrictReservedWord}});var r=n(1102),o=n(3115)},1002(e){"use strict";e.exports=Function.prototype.apply},1064(e,t,n){"use strict";var r=n(9612);e.exports=r.getPrototypeOf||null},1102(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIdentifierChar=u,t.isIdentifierName=function(e){let t=!0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(55296==(64512&r)&&n+1<e.length){const t=e.charCodeAt(++n);56320==(64512&t)&&(r=65536+((1023&r)<<10)+(1023&t))}if(t){if(t=!1,!l(r))return!1}else if(!u(r))return!1}return!t},t.isIdentifierStart=l;let n="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",r="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";const o=new RegExp("["+n+"]"),i=new RegExp("["+n+r+"]");n=r=null;const a=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],s=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239];function c(e,t){let n=65536;for(let r=0,o=t.length;r<o;r+=2){if(n+=t[r],n>e)return!1;if(n+=t[r+1],n>=e)return!0}return!1}function l(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&o.test(String.fromCharCode(e)):c(e,a)))}function u(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&i.test(String.fromCharCode(e)):c(e,a)||c(e,s))))}},1113(e,t,n){"use strict";const r=n(2121),o=n(4299)((e,t)=>t.includes(e)),i=r(e=>e&&e.length,[function(e,t){const n=e.split("").join(".*")+".*",r=RegExp(`^${n}$`,"i"),o=r.test.bind(r);return t.filter(o)},function(e,t){return t.filter(o(e))}]);e.exports=(e,t)=>(function(e,t){if("string"!=typeof e)throw Error("pattern should be string!");if(!Array.isArray(t))throw Error("list should be an array!")}(e,t),i(e,t)||[])},1115(e,t,n){"use strict";const r=n(2960),{parse:o,stringify:i}=JSON;e.exports.parse=(...e)=>{const[,t]=r(o,...e);return t},e.exports.stringify=(...e)=>{const[,t]=r(i,...e);return t}},1135(e){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},1237(e){"use strict";e.exports=EvalError},1256(e,t,n){"use strict";const{promisify:r}=n(5450),o=n(407),i=()=>{},a=(e,t,n)=>{e.addEventListener(t,r=>{n(r),e.removeEventListener(t,n)})},s=async e=>{switch(function(e){let t,n="";return"string"==typeof e&&(t=e.lastIndexOf("."),~t&&(n=e.substr(t))),n}(e)){case".js":return await s.js(e);case".css":return await s.css(e);case".json":return await s.json(e);default:return await s.ajax(e)}};function c(e){if("string"!=typeof e)return"";~e.indexOf(":")&&(e+="-join");const t=e.lastIndexOf("/")+1,n=e.substr(e,t);return e.replace(n,"").replace(/\./g,"-")}s.onerror=i,s.onload=i,s.addLoadListener=e=>{s.onload=e},s.addErrorListener=e=>{s.onerror=e},e.exports=s,s.js=r((e,t)=>{const n=c(e);let r=document.getElementById(n);if(r)return t();r=o("script",{id:n,src:e}),a(r,"load",e=>{t(null,e),s.onload()}),a(r,"error",n=>{t(n),document.body.removeChild(r),s.onerror(n,e)})}),s.css=r((e,t)=>{const n=c(e);let r=document.getElementById(n);if(r)return t();r=o("link",{id:c(e),rel:"stylesheet",href:e,parent:document.head}),r.addEventListener("load",e=>{t(null,e),s.onload()}),r.addEventListener("error",n=>{t(n),document.head.removeChild(r),s.onerror(n,e)})}),s.ajax=r((e,t)=>{const n=new XMLHttpRequest;n.open("GET",e,!0),n.addEventListener("load",()=>{if(n.status>=200&&n.status<400){const e=n.responseText;t(null,e),s.onload()}}),n.addEventListener("error",e=>{s.onerror(e),t(e)}),n.send()}),s.json=r((e,t)=>{s.ajax(e,(e,n)=>{let r;e||(r=JSON.parse(n)),t(e,r)})}),s.series=async e=>{const t=e.shift();t&&(await s(t),await s.series(e))},s.parallel=async e=>{const t=e.map(s);return await Promise.all(t)},s.getIdBySrc=c},1333(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(var r in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},1362(e){"use strict";const t="static.olark.com/jsclient/loader.js";if(!window.olark){const e=document.createElement("script"),[n]=document.getElementsByTagName("script");e.async=1,e.src="//"+t,n.parentNode.insertBefore(e,n);const r=window.olark=(...e)=>{o.s.push(e),o.t.push(Number(new Date))};r.extend=(e,t)=>{r("extend",e,t)},r.identify=e=>{r("identify",o.i=e)},r.configure=(e,t)=>{r("configure",e,t),o.c[e]=t};const o=r._={s:[],t:[Number(new Date)],c:{},l:t}}e.exports=window.olark},1514(e){"use strict";e.exports=Math.abs},1597(e){"use strict";function t(e){let t=0;const{length:n}=e;for(;t<n&&" "===e[t];)++t;return t}e.exports=(e,...n)=>{const r=function(e,t){const n=[],r=e.length+t.length;let o=0;for(let i=0;i<r;i++){const r=i%2?t.shift():e[o++];n.push(r)}return n.join("")}(e,n),o=r.split("\n").slice(1,-1);if(!o.length)return"";const[i]=o,a=t(i),s=[];for(const e of o){const n=t(e);n<a?s.push(e.slice(n)):s.push(e.slice(a))}return s.join("\n")}},1730(e,t,n){"use strict";e.exports.addSlashToEnd=e=>{if(!e)throw Error("path could not be empty!");return"/"===e[e.length-1]?e:`${e}/`},e.exports.size=e=>{const t=1024,n=1048576,r=n*t,o=r*t,i=o*t;return"number"==typeof e?e<t?e+"b":e<n?(e/t).toFixed(2)+"kb":e<r?(e/n).toFixed(2)+"mb":e<o?(e/r).toFixed(2)+"gb":e<i?(e/o).toFixed(2)+"tb":(e/i).toFixed(2)+"pb":e},e.exports.permissions=n(2234)},1795(e){"use strict";const t=[()=>()=>{},e=>(...t)=>e(...t),(e,t)=>(...n)=>e(t(...n)),(e,t,n)=>(...r)=>e(t(n(...r))),(e,t,n,r)=>(...o)=>e(t(n(r(...o)))),(e,t,n,r,o)=>(...i)=>e(t(n(r(o(...i))))),(e,t,n,r,o,i)=>(...a)=>e(t(n(r(o(i(...a)))))),(e,t,n,r,o,i,a)=>(...s)=>e(t(n(r(o(i(a(...s)))))))];e.exports=(...e)=>e.length<t.length?t[e.length](...e):function(e){return(...t)=>{let n=e.length-1,r=e[n](...t);for(;--n;)r=e[n](r);return r}}(e)},1825(e,t,n){"use strict";n.r(t)},1849(e,t,n){"use strict";n.d(t,{D:()=>a,l:()=>i});const r={"<":"<",">":">",""":'"'},o=Object.keys(r),i=e=>{for(const t of o){const n=RegExp(r[t],"g");e=e.replace(n,t)}return e},a=e=>{for(const t of o){const n=r[t],o=RegExp(t,"g");e=e.replace(o,n)}return e}},2121(e,t,n){"use strict";const r=n(4299),o=n(1795),i=n(7023),a=r((e,t)=>e(t)),s=e=>e,c=r((e,t)=>t(...e));e.exports=function(e,t){t||(t=e,e=s),function(e,t){if("function"!=typeof e)throw Error("condition should be function!");if(!Array.isArray(t))throw Error("filters should be an array!");!function(e,t){const n=i(e=>{throw Error(`fn should be ${e}!`)},e),r=i((e,t)=>e!==t,e);if(!t.length)return n(e);t.map(e=>typeof e).filter(r).forEach(n)}("function",t)}(e,t);const n=function(e){let t;return n=>{let r;return e(n)?t=r=n:(r=t,t=null),r}}(e),r=i(o,e,n),l=t.map(a(r)).reverse();return(...e)=>(l.some(c(e)),n())}},2205(e,t,n){"use strict";var r=n(6743),o=n(1002),i=n(3144);e.exports=function(){return i(r,o,arguments)}},2234(e,t,n){"use strict";const r=n(4299),o={name:"r",value:4},i={name:"w",value:2},a={name:"x",value:1},s=r((e,t)=>e&t.value?t.name:"-"),c=r((e,t)=>[o,i,a].map(e(t)).join(""));e.exports.symbolic=e=>{if(void 0===e)return"";const t=e.slice(-3);return[Number(t[0]).toString(2),Number(t[1]).toString(2),Number(t[2]).toString(2)].map(c(s)).join(" ")},e.exports.numeric=e=>{if(!e||11!==e.length)throw Error('permissions should be in format "xxx xxx xxx"');return"00"+(("r"===e[0]?4:0)+("w"===e[1]?2:0)+("x"===e[2]?1:0))+(("r"===e[4]?4:0)+("w"===e[5]?2:0)+("x"===e[6]?1:0))+(("r"===e[8]?4:0)+("w"===e[9]?2:0)+("x"===e[10]?1:0))}},2503(e,t,n){"use strict";var r={};n.r(r),n.d(r,{init:()=>oe,initKeysPanel:()=>le,setOnPanel:()=>ue}),n(5606);var o=n(9317),i=n(1256),a=n(6088),s=n(8453),c=n(980);async function l(e){if(!navigator.serviceWorker)return;const t="https:"===location.protocol,n="localhost"===location.hostname;if(!t&&!n)return;const{serviceWorker:r}=navigator,o=r.register.bind(r),[i,a]=await(0,c.tryToCatch)(o,`${e}/sw.mjs`);return i?null:a}var u=n(8328),f=n(5670);const d=(0,u.fullstore)(),{getPanel:p}=f.default,m=(e,t=p())=>{const{sort:n,order:r}=CloudCmd,o=f.default.CurrentInfo,i=t.dataset.name.replace("js-","");e!==d()?r[i]="asc":"asc"===r[i]?r[i]="desc":r[i]="asc",d(e),n[i]=e;const a=i!==o.panelPosition;CloudCmd.refresh({panel:t,noCurrent:a})};var h=n(7411),g=n(6698),y=n(6686),C=n(1730),w=n(3955),b=n(4299),v=n(3543);const D=()=>{const e=DOM.CurrentInfo;return{path:DOM.getCurrentDirPath(),files:(e.files||[]).filter(x).map(E)}},x=e=>".."!==DOM.getCurrentName(e),E=e=>{const t=DOM.getCurrentName(e),n=DOM.getCurrentSize(e),r=DOM.getCurrentOwner(e);return{name:t,size:n,mode:DOM.getCurrentMode(e),owner:r,date:DOM.getCurrentDate(e),type:DOM.getCurrentType(e)}};var O=n(6735),S=n(9227),A=n(4999),P=n(6967);const M=(0,u.fullstore)(""),k=(0,u.fullstore)(!1),F=()=>{k(!1)},j=()=>{M("")},N=()=>{};function T(e){const t="d"===e[0];var n;return t&&(k(!0),e=e.split("").slice(1).join("")),{count:(n=e)?"g"===n?1:parseInt(n):1,isDelete:t,isVisual:k()}}var I=n(1113);const R=(0,u.fullstore)([]),$=(0,u.fullstore)(0);var B=n(3239);const L=(e,t,n={})=>{const r={...{...globalThis.DOM,...globalThis.CloudCmd},...n};((e,t={})=>{const n=M(),r=k(),o=M(n.concat(e)),{escape:i=N,moveNext:a=N,movePrevious:s=N,remove:c=N,copy:l=N,paste:u=N,select:f=N,find:d=N,findNext:p=N,findPrevious:m=N,makeFile:h=N,makeDirectory:g=N,terminal:y=N,edit:C=N}=t;if("Enter"===e)return j();if("Escape"===e)return k(!1),i(),j();if("j"===e||"w"===e){const{count:e,isDelete:t,isVisual:r}=T(n);return!isNaN(e)&&a({count:e,isVisual:r,isDelete:t}),j()}if("k"===e||"b"===e){const{count:e,isDelete:t,isVisual:r}=T(n);return!isNaN(e)&&s({count:e,isVisual:r,isDelete:t}),j()}if("gg"===o||"^"===e){const{isDelete:e,isVisual:t}=T(n);return s({count:1/0,isVisual:t,isDelete:e}),j()}"md"===o?(g(),j()):"tt"===o?(y(),j()):"e"===o?(C(),j()):"mf"===o?(h(),j()):"d"!==e||!k()&&"d"!==n?"G"===e||"$"===e?(a({count:1/0,isVisual:r}),j()):"y"===e?k()?(F(),l(),j()):j():/^p$/i.test(e)?(u(),j()):/^v$/i.test(e)?(k(!k()),f(),j()):"/"===e?(d(),j()):"n"===e?(p(),j()):"N"===e?(m(),j()):" "===e&&j():(F(),c(),j())})(e,_(t,r))},_=(e,t)=>{var n,r;const{Info:o=globalThis.DOM.CurrentInfo,CloudCmd:i=globalThis.CloudCmd,Operation:a,unselectFiles:s,setCurrentFile:c,setCurrentByName:l,getCurrentName:u,prompt:f=globalThis.DOM.Dialog.prompt,preventDefault:d=(null==e||null===(n=e.preventDefault)||void 0===n?void 0:n.bind(e)),stopImmediatePropagation:p=(null==e||null===(r=e.preventDefault)||void 0===r?void 0:r.bind(e)),promptNewFile:m=DOM.promptNewFile,toggleSelectedFile:h,Buffer:g={},createFindNext:y=V,createFindPrevious:C=U,createMakeFile:w=H}=t;return{makeFile:w({promptNewFile:m,preventDefault:d,stopImmediatePropagation:p}),findNext:y({setCurrentByName:l}),findPrevious:C({setCurrentByName:l}),escape:s,remove:()=>{a.show("delete")},makeDirectory:()=>{e.stopImmediatePropagation(),e.preventDefault(),DOM.promptNewDir()},terminal:()=>{i.Terminal.show()},edit:()=>{i.EditFileVim.show()},copy:()=>{g.copy(),s()},select:()=>{const e=o.element;h(e)},paste:g.paste,moveNext:({count:e,isVisual:t,isDelete:n})=>{(0,B.i)("next",{count:e,isVisual:t,isDelete:n},{Info:o,setCurrentFile:c,unselectFiles:s,Operation:a})},movePrevious:({count:e,isVisual:t,isDelete:n})=>{(0,B.i)("previous",{count:e,isVisual:t,isDelete:n},{Info:o,setCurrentFile:c,unselectFiles:s,Operation:a})},find:async()=>{d();const[,e]=await f("Find","");if(!e)return;const t=o.files.map(u),[n]=((e,t)=>{const n=I(e,t);return R(n),$(0),n})(e,t);l(n)}}},U=(e={})=>()=>{const{setCurrentByName:t}=e;t((()=>{const e=R(),t=function(e,t){return e?--e:t-1}($(),e.length);return $(t),e[t]})())},V=(e={})=>()=>{const{setCurrentByName:t}=e;t((()=>{const e=R(),t=function(e,t){return e===t-1?0:++e}($(),e.length);return $(t),e[$()]})())},H=(e={})=>()=>{const{promptNewFile:t,stopImmediatePropagation:n,preventDefault:r}=e;n(),r(),t()},z=(0,u.fullstore)();z([]);const{assign:W}=Object,K=(()=>{let e=!1;return{isBind:()=>e,setBind(){e=!0},unsetBind(){e=!1}}})(),G=W(K,P,{bind:()=>{S.addKey(q,!0),K.setBind()}});async function q(e,t={}){const{config:n=CloudCmd.config,_config:r=CloudCmd._config,switchKey:o=X,vim:i=L}=t,{keyCode:s}=e;if(void 0===e.altKey)return;const c=e.altKey,l=e.ctrlKey,u=e.metaKey,f=s>=P.ZERO&&s<=P.Z,d=/Numpad/.test(e.code),[p,m]=function(e){const{key:t,shift:n,keyCode:r,keyIdentifier:o}=e,i=t||function(e){const t=e.substring(2),n=parseInt(t,16);return String.fromCharCode(n)}(o);return[J(n,r),i]}(e);if(!K.isBind())return;((e,t={})=>{const{_config:n,config:r}=t;e===P.ESC&&n("vim",!r("vim"))})(s,{config:n,_config:r});const h=n("vim");if(!h&&!d&&!c&&!l&&!u&&(f||p))return function(e,t){const n=DOM.CurrentInfo;let r,o=0,i=!1,s=0;const c=(0,a.escapeRegExp)(e),l=new RegExp(`^${c}.*$`,"i"),{files:u}=n,f=t(),d=f.length;for(;s<d&&e===f[s];)s++;s||t([]);const p=o=s;var m;t(t().concat(e)),DOM.getFilenames(u).filter(e=>l.test(e)).filter((m=e=>".."===e,e=>!m(e))).some(e=>{const t=DOM.getCurrentByName(e);if(!o)return i=!0,DOM.setCurrentFile(t),!0;p===o&&(r=t),--o}),i||(DOM.setCurrentFile(r),t([e]))}(m,z);z([]),await o(e),s>=P.F1&&s<=P.F10||h&&i(m,e)}function J(e,t){switch(t){case P.DOT:return".";case P.HYPHEN:return e?"_":"-";case P.EQUAL:return e?"+":"="}return""}async function X(e){const t=DOM.CurrentInfo;let n,r,o,i,a,s=t.element;const{name:c,panel:l,path:u,isDir:f}=t,{Operation:d,changeDir:p,config:m}=CloudCmd,{keyCode:h}=e,g=e.altKey,y=e.shiftKey,C=e.ctrlKey,w=e.metaKey,b=C||w;switch(s&&(o=s.previousSibling,i=s.nextSibling),h){case P.TAB:DOM.changePanel(),e.preventDefault();break;case P.INSERT:case P.INSERT_MAC:DOM.toggleSelectedFile(s).setCurrentFile(i);break;case P.DELETE:y?d.show("delete:silent"):d.show("delete");break;case P.ASTERISK:DOM.toggleAllSelectedFiles(s);break;case P.PLUS:DOM.expandSelection(),e.preventDefault();break;case P.MINUS:DOM.shrinkSelection(),e.preventDefault();break;case P.F1:CloudCmd.Help.show(),e.preventDefault();break;case P.F2:CloudCmd.UserMenu.show();break;case P.F3:e.preventDefault(),t.isDir?await p(u):y?CloudCmd.View.show(null,{raw:!0}):b?CloudCmd.sortPanel("name"):CloudCmd.View.show();break;case P.F4:m("vim")?CloudCmd.EditFileVim.show():CloudCmd.EditFile.show(),e.preventDefault();break;case P.F5:b?CloudCmd.sortPanel("date"):g?d.show("pack"):d.show("copy"),e.preventDefault();break;case P.F6:b?CloudCmd.sortPanel("size"):y?DOM.renameCurrent(s):d.show("move"),e.preventDefault();break;case P.F7:y?DOM.promptNewFile():DOM.promptNewDir(),e.preventDefault();break;case P.F8:d.show("delete"),e.preventDefault();break;case P.F9:g?d.show("extract"):CloudCmd.Menu.show(),e.preventDefault();break;case P.F10:CloudCmd.Config.show(),e.preventDefault();break;case P.TRA:if(e.preventDefault(),y)return CloudCmd.Terminal.show();CloudCmd.Konsole.show();break;case P.BRACKET_CLOSE:CloudCmd.Konsole.show(),e.preventDefault();break;case P.SPACE:e.preventDefault(),r=!f||".."===c||DOM.isSelected(s),r||await DOM.loadCurrentSize(s),DOM.toggleSelectedFile(s);break;case P.U:b&&(DOM.swapPanels(),e.preventDefault());break;case P.UP:y&&DOM.toggleSelectedFile(s),DOM.setCurrentFile(o),e.preventDefault();break;case P.DOWN:y&&DOM.toggleSelectedFile(s),DOM.setCurrentFile(i),e.preventDefault();break;case P.LEFT:if(!g)return;e.preventDefault(),a=t.panel.getAttribute("data-name"),"js-right"===a&&DOM.duplicatePanel();break;case P.RIGHT:if(!g)return;e.preventDefault(),a=t.panel.getAttribute("data-name"),"js-left"===a&&DOM.duplicatePanel();break;case P.HOME:DOM.setCurrentFile(t.first),e.preventDefault();break;case P.END:DOM.setCurrentFile(t.last),e.preventDefault();break;case P.PAGE_DOWN:for(DOM.scrollByPages(l,1),n=0;n<30&&s.nextSibling;n++)s=s.nextSibling;DOM.setCurrentFile(s),e.preventDefault();break;case P.PAGE_UP:for(DOM.scrollByPages(l,-1),n=0;n<30&&s.previousSibling;n++)s=s.previousSibling;DOM.setCurrentFile(s),e.preventDefault();break;case P.ENTER:t.isDir?await p(u):CloudCmd.View.show();break;case P.BACKSPACE:CloudCmd.goToParentDir(),e.preventDefault();break;case P.BACKSLASH:b&&await p("/");break;case P.A:b&&(DOM.selectAllFiles(),e.preventDefault());break;case P.G:g&&(DOM.goToDirectory(),e.preventDefault());break;case P.M:b&&(m("vim")?CloudCmd.EditNamesVim.show():CloudCmd.EditNames.show(),e.preventDefault());break;case P.P:if(!b)return;e.preventDefault(),O.writeText(t.dirPath).catch(CloudCmd.log);break;case P.R:b&&(CloudCmd.log("reloading page...\n"),CloudCmd.refresh(),e.preventDefault());break;case P.C:b&&A.copy();break;case P.X:b&&A.cut();break;case P.V:b&&A.paste();break;case P.Z:b&&A.clear();break;case P.COLON:CloudCmd.CommandLine.show(),e.preventDefault();break;case P.D:b&&(CloudCmd.log("clearing storage..."),await DOM.Storage.clear(),CloudCmd.log("storage cleared"),e.preventDefault());break;case P.DOT:if(w&&y){const e=!CloudCmd.config("showDotFiles");CloudCmd._config("showDotFiles",e),CloudCmd.refresh(),await DOM.RESTful.Config.write({showDotFiles:e})}}}var Y=n(9168);const Z=e=>{if(!e)return;const{path:t}=e,n=t&&(0,w.A)(t).replace(/.js$/,""),r=e.dobefore;CloudCmd[n]||(CloudCmd[n]=async()=>{Y(r);const{DIR_MODULES:e}=CloudCmd,o=`${e}/${t}.js`;await(0,i.js)(o);const a=async e=>e&&e(),s=CloudCmd[n];return Object.assign(a,s),CloudCmd[n]=a,CloudCmd.log("init",n),await s.init(),a},CloudCmd[n].show=async(...e)=>{CloudCmd.log("show",n,e);const t=CloudCmd[n],[r,o]=await(0,c.tryToCatch)(t);if(!r)return await o.show(...e)})};function Q({DOM:e,Listeners:t}){h.call(this);const n=this,r=e.CurrentInfo,{Storage:o,Files:a}=e;this.log=()=>{},this.prefix="",this.prefixSocket="",this.prefixURL="",this.MIN_ONE_PANEL_WIDTH=e.getCSSVar("min-one-panel-width"),this.HOST=location.origin||location.protocol+"//"+location.host,this.sort={left:"name",right:"name"},this.order={left:"asc",right:"asc"},this.changeDir=async(t,i={})=>{const{isRefresh:a,panel:s,history:c=!0,noCurrent:l,currentName:u}=i,f=a;let p,m;!l&&s&&s!==r.panel&&(e.changePanel(),p=!0),(p||f||!c)&&(m="top"),v.show.load(m,s),await async function(t,i={},a){const{RESTful:s}=e;n.log(`reading dir: "${t}";`);const c=n.config("dirStorage")&&await o.getJson(t),l=i.currentName||r.name,{noCurrent:u,refresh:f}=i;if(!f&&c)return await d(c,a,i);const p=e.getPanelPosition(a),m=n.sort[p],h=n.order[p],g=y("?sort={{ sort }}&order={{ order }}",{sort:m,order:h}),[,C]=await s.read(t+g,"json");C&&(i.sort=m,i.order=h,await d(C,a,i),f&&!u&&e.setCurrentByName(l),n.config("dirStorage")&&o.setJson(t,C))}((0,C.addSlashToEnd)(t),{refresh:f,history:c,noCurrent:l,currentName:u,showDotFiles:n.config("showDotFiles")},s)},this.init=async(r,a)=>{n.prefix=r,n.prefixURL=`${r}${s.apiURL}`,n.prefixSocket=a.prefixSocket,n.DIR_DIST=`${r}/dist`,n.DIR_MODULES=`${this.DIR_DIST}/modules`,n.config=e=>a[e],n.config.if=b((e,t,n)=>a[e]&&t(n)),n._config=(e,t)=>{"password"!==e&&(a[e]=t)},a.oneFilePanel&&(n.MIN_ONE_PANEL_WIDTH=1/0),document.body.scrollIntoViewIfNeeded||await i.js(`${n.DIR_MODULES}/polyfill.js`),await u(),await async function(){const r=e.getFiles();n.on("current-file",e.updateCurrentInfo),n.on("current-name",f);const i=await o.get("current-name"),a=i&&e.getCurrentByName(i)||r[0];r&&e.setCurrentFile(a,{history:!location.hash});const s=e.getCurrentDirPath();t.init(),function(){const e=["left"];return n.config("oneFilePanel")?e:[...e,"right"]}().forEach(t.setOnPanel),t.initKeysPanel(),n.config("dirStorage")&&(await o.get(s)||await o.setJson(s,D()))}(),n.route(location.hash)},this.route=t=>{const r=t.split("/");if(!t)return;const[o]=r,i=(0,w.A)(o.slice(1)).replace(/.js$/,""),[,a]=r,c=e.getCurrentByName(a);if(a&&!c){const e=(0,s.formatMsg)("set current file",a,"error");return void n.log(e)}e.setCurrentFile(c),n.execFromModule(i,"show")},this.logOut=async()=>{const t=n.prefix+"/logout",{prefix:r}=n;await e.Storage.clear(),async function(e){const t=await l(e);null==t||t.unregister(e)}(r),e.load.ajax({url:t,error:()=>document.location.reload()})};const u=async()=>{n.Key=G,n.Key.bind();const[,e]=await(0,c.tryToCatch)(a.get,"modules"),t=v.show.load,r={edit:t,menu:t},o=(e,t,n)=>{Z({name:e,path:t,dobefore:n})};if(e)for(const t of e.local)o(null,t,r[t])};async function f(e){await o.set("current-name",e)}async function d(o,i,l){const{history:u,noCurrent:f,showDotFiles:d}=l,[p,[m,h,g,y]]=await(0,c.tryToCatch)(a.get,["file","path","link","pathLink"]);if(p)return e.Dialog.alert(p.responseText);const C=i||e.getPanel(),{prefix:w}=n,{dir:b,name:v}=r,{childNodes:D}=C;let x=D.length;for(;x--;)C.removeChild(C.lastChild);if(C.innerHTML=(0,s.buildFromJSON)({sort:l.sort,order:l.order,data:o,id:C.id,prefix:w,showDotFiles:d,template:{file:m,path:h,pathLink:y,link:g}}),t.setOnPanel(C),!f){let t;".."===v&&"/"!==b&&(t=e.getCurrentByName(b)),t||([t]=e.getFiles(C)),e.setCurrentFile(t,{history:u}),n.emit("active-dir",r.dirPath)}}this.execFromModule=async(e,t,...r)=>{await n[e](),(0,n[e][t])(...r)},this.refresh=async(t={})=>{const{panel:o=r.panel,currentName:i}=t,a=e.getCurrentDirPath(o),s=null==t?void 0:t.noCurrent;await n.changeDir(a,{isRefresh:!0,history:!1,panel:o,noCurrent:s,currentName:i})},this.goToParentDir=async()=>{const{dir:t,dirPath:o,parentDirPath:i,panel:a}=r;if(o===i)return;const s=i;await n.changeDir(s);const c=e.getCurrentByName(t),[l]=e.getFiles(a);e.setCurrentFile(c||l,{history})}}g(Q,h),i.addErrorListener((e,t)=>{const n=`file ${t} could not be loaded`;v.show.error(n)});var ee=n(2515),te=n(608);const ne=b((e,t)=>{const n=e.indexOf(t);return~n?n:0}),re=RegExp(String.fromCharCode(160),"g"),oe=async()=>{!function(){const e=DOM.getFM();S.addOnce("contextmenu",e,e=>{CloudCmd.Menu.show({x:e.clientX,y:e.clientY})}),S.addContextMenu(e,e=>{CloudCmd.Menu.ENABLED||e.preventDefault()})}(),function(){const e=DOM.getByClassAll("panel"),t=({target:e})=>{e.classList.add("selected-panel")},n=({target:e})=>{e.classList.remove("selected-panel")},r=e=>{const{files:t,items:n}=e.dataTransfer,{length:r}=t;if(e.preventDefault(),r&&(!n||!n.length||!n[0].webkitGetAsEntry))return(0,te.Z)(t);const o=Array.from(n).filter(e=>"file"===e.kind);if(o.length)return DOM.uploadDirectory(o);const{Operation:i}=CloudCmd,a=e.shiftKey?"move":"copy";return i.show(a)},o=e=>{const{dataTransfer:t}=e,{effectAllowed:n}=t;/move|linkMove/.test(n)?t.dropEffect="move":t.dropEffect="copy",e.preventDefault()};for(const i of e)S.add("dragover",i,o).add("drop",i,r).add("dragenter",t).add(["dragleave","drop"],n)}(),S.add(["unload","beforeunload"],e=>{const{Key:t}=CloudCmd;if(!(null==t?void 0:t.isBind()))return e.preventDefault(),"Please make sure that you saved all work."}),S.add("popstate",async({state:e})=>{const t=(e||"").replace(s.FS,"");if(!t)return CloudCmd.route(location.hash);await CloudCmd.changeDir(t,{history:!1})}),S.add("resize",()=>{const e=DOM.CurrentInfo;if(!(globalThis.innerWidth<CloudCmd.MIN_ONE_PANEL_WIDTH))return;const{panel:t}=e;t&&("js-left"===t.getAttribute("data-name")||DOM.changePanel())}),function(){const e=DOM.getFM(),t=e=>e.dataset,n=e=>/^js-(left|right)$/.test(e.dataset.name);S.addClick(e,e=>{const r=e.target;if("js-fm-header"!==r.parentElement.dataset.name)return;const o=(r.dataset.name||"").replace("js-","");if(!/^(name|size|date)$/.test(o))return;const i=ce(r).filter(t).filter(n).pop();CloudCmd.sortPanel(o,i)})}(),await async function(){const[,e]=await(0,c.tryToCatch)(DOM.Files.get,"config"),t=null==e?void 0:e.packer;se=DOM.getPackerExt(t)}()},ie=b((e,t)=>{for(const n of e)n(t)}),ae={mousedown:Y.with(de,function(e){const t=DOM.CurrentInfo,n={alt:e.altKey,ctrl:e.ctrlKey,meta:e.metaKey,shift:e.shiftKey},r=pe(e.target),o=t.name;DOM.setCurrentFile(r);const i=t.name;let a=[];n.shift?a=function(e,t){const n=DOM.getAllFiles(),r=DOM.getFilenames(n),o=ne(r);return((e,t,n)=>e<t?n.slice(e,t+1):e>t?n.slice(t,e+1):[n[e]])(o(e),o(t),n)}(o,i):a.push(t.element),0===e.button&&function(e,t){const n=/Mac/.test(globalThis.navigator.platform);if(!e)throw Error("key should not be undefined!");const[r]=t;if(n&&e.meta)return DOM.toggleSelectedFile(r);e.shift&&t.map(DOM.selectFile)}(n,a)}),click:ie([function(e){e.preventDefault(),function(e){const t=DOM.CurrentInfo,{panel:n}=t,r=DOM.getByDataName("js-files",n);(function(e){for(;"UL"!==e.tagName;)e=e.parentElement;return e})(e)!==r&&DOM.changePanel()}(e.target)},Y.with(function(e,t){DOM.getCSSVar("is-mobile")||e(t)},e=>{const t=/Mac/.test(globalThis.navigator.platform),{shiftKey:n,metaKey:r,ctrlKey:o}=e;n||t&&r||o||DOM.unselectFiles()})]),dragstart:Y.with(de,function(e){const t=DOM.CurrentInfo,{prefixURL:n}=CloudCmd,r=pe(e.target),{isDir:o}=t;let i=DOM.getCurrentLink(r),a=DOM.getCurrentName(r);o&&(a+=se,i=document.createElement("a"),i.textContent=a,i.href=n+"/pack"+t.path+se),e.dataTransfer.setData("DownloadURL","application/octet-stream:"+a+":"+i)}),dblclick:Y.with(de,async function(e){e.preventDefault();const t=pe(e.target),n=DOM.isCurrentIsDir(t),r=DOM.getCurrentPath(t);if(!n)return CloudCmd.View.show();await CloudCmd.changeDir(r)}),touchstart:Y.with(de,async function(e){const t=pe(e.target);DOM.isCurrentIsDir(t)&&DOM.isCurrentFile(t)&&await CloudCmd.changeDir(DOM.getCurrentPath(t))})};let se;function ce(e,t=[]){return e?ce(e.parentElement,t.concat(e)):t}const le=()=>{const e=DOM.getById("js-keyspanel");e&&S.addClick(e,e=>{const{target:t}=e,{id:n}=t,r=e=>{const{Operation:t}=CloudCmd;return t.show.bind(null,e)},o={f1:CloudCmd.Help.show,f2:CloudCmd.UserMenu.show,f3:CloudCmd.View.show,f4:CloudCmd.EditFile.show,f5:r("copy"),f6:r("move"),f7:DOM.promptNewDir,f8:r("delete"),f9:()=>{e.stopPropagation(),CloudCmd.Menu.show()},f10:CloudCmd.Config.show,"~":CloudCmd.Konsole.show,"shift~":CloudCmd.Terminal.show,contact:CloudCmd.Contact.show};Y(o[n])})},ue=e=>{const t=(e=>ee.string(e)?DOM.getByDataName(`js-${e}`):e)(e),n=DOM.getByDataName("js-files",t),r=DOM.getByDataName("js-path",t);S.addClick(r,function(e){return fe.bind(null,e)}(t)),S.add(n,ae)};async function fe(e,t){const n=DOM.CurrentInfo;t.preventDefault();const r=t.target,o=r.getAttribute("data-name"),i=function(e){const t=DOM.CurrentInfo.panel;return!t||e.getAttribute("data-name")!==t.getAttribute("data-name")}(e);if("js-copy-path"===o)return a=r,void O.writeText(a.parentElement.title).then(CloudCmd.log).catch(CloudCmd.log);var a;if("js-refresh"===o)return CloudCmd.refresh({panel:e,noCurrent:i});if("js-path-link"!==o)return;const{href:c}=r,l=function(e){const t=CloudCmd.HOST,{prefix:n}=CloudCmd,r=RegExp("^"+n+s.FS);return decodeURI(e).replace(t,"").replace(r,"").replace("%%","%25%").replace(re," ")||"/"}(c);await CloudCmd.changeDir(l,{isRefresh:!1,panel:i?e:n.panel})}function de(e,t){const{target:n}=t,{tagName:r}=n;"UL"!==r&&e(t)}function pe(e){if(!e)return e;for(;"LI"!==e.tagName;)e=e.parentElement;return e}function me(e){return e?e.indexOf("/")?`/${e}`:e:""}globalThis.CloudCmd=async function(e){globalThis.CloudCmd=(({DOM:e,Listeners:t})=>new Q({DOM:e,Listeners:t}))({DOM:f.default,Listeners:r}),globalThis.DOM=f.default,globalThis.Util=a,globalThis.CloudFunc=s,await async function(e){const{prefix:t}=e;((e,...t)=>{null==e||e.addEventListener(...t)})(await l(t),"updatefound",he(e))}(e),(()=>{const{sort:e}=CloudCmd,t=f.default.getPanelPosition();d(e[t])})(),globalThis.CloudCmd.sortPanel=m;const t=me(e.prefix);globalThis.CloudCmd.init(t,e),"aleman"===globalThis.CloudCmd.config("menu")&&setTimeout(()=>{Promise.resolve().then(n.bind(n,1736)),Promise.resolve().then(n.bind(n,3398))},100)};const he=o(async e=>{const{DOM:t}=globalThis,n=me(e.prefix);await i.js(`${n}/dist/cloudcmd.common.js`),await i.js(`${n}/dist/cloudcmd.js`),console.log("cloudcmd: sw: updated"),t.Events.removeAll(),globalThis.CloudCmd(e)})},2515(e){"use strict";e.exports=t;for(const e of["null","arrayBuffer","file","array","object"])t[e]=n.bind(null,e);for(const e of["string","undefined","boolean","number","function"])t[e]=r.bind(null,e);function t(e){return{}.toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function n(e,n){return t(n)===e}function r(e,t){return typeof t===e}},2682(e,t,n){"use strict";var r=n(9600),o=Object.prototype.toString,i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){if(!r(t))throw new TypeError("iterator must be a function");var a,s;arguments.length>=3&&(a=n),s=e,"[object Array]"===o.call(s)?function(e,t,n){for(var r=0,o=e.length;r<o;r++)i.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))}(e,t,a):"string"==typeof e?function(e,t,n){for(var r=0,o=e.length;r<o;r++)null==n?t(e.charAt(r),r,e):t.call(n,e.charAt(r),r,e)}(e,t,a):function(e,t,n){for(var r in e)i.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))}(e,t,a)}},2882(e,t,n){"use strict";var r=n(5606),o=n(8633),i=n(5879),a=n(1e3);const s=(e,t)=>n=>e(t(n));function c(e){return{keyword:e.cyan,capitalized:e.yellow,jsxIdentifier:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.gray,invalid:s(s(e.white,e.bgRed),e.bold),gutter:e.gray,marker:s(e.red,e.bold),message:s(e.red,e.bold),reset:e.reset}}const l=c(o.createColors(!0)),u=c(o.createColors(!1));function f(e){return e?l:u}const d=new Set(["as","async","from","get","of","set"]),p=/\r\n|[\n\r\u2028\u2029]/,m=/^[()[\]{}]$/;let h;const g=/^[a-z][\w-]*$/i,y=function(e,t,n){if("name"===e.type){const r=e.value;if(a.isKeyword(r)||a.isStrictReservedWord(r,!0)||d.has(r))return"keyword";if(g.test(r)&&("<"===n[t-1]||"</"===n.slice(t-2,t)))return"jsxIdentifier";const o=String.fromCodePoint(r.codePointAt(0));if(o!==o.toLowerCase())return"capitalized"}return"punctuator"===e.type&&m.test(e.value)?"bracket":"invalid"!==e.type||"@"!==e.value&&"#"!==e.value?e.type:"punctuator"};h=function*(e){let t;for(;t=i.default.exec(e);){const n=i.matchToToken(t);yield{type:y(n,t.index,e),value:n.value}}};const C=/\r\n|[\n\r\u2028\u2029]/;t.gl=function(e,t,n={}){const i=n.forceColor||("object"!=typeof r||"0"!==r.env.FORCE_COLOR&&"false"!==r.env.FORCE_COLOR)&&o.isColorSupported&&n.highlightCode,a=(n.startLine||1)-1,s=f(i),c=e.split(C),{start:l,end:u,markerLines:d}=function(e,t,n,r){const o=Object.assign({column:0,line:-1},e.start),i=Object.assign({},o,e.end),{linesAbove:a=2,linesBelow:s=3}=n||{},c=o.line-r,l=o.column,u=i.line-r,f=i.column;let d=Math.max(c-(a+1),0),p=Math.min(t.length,u+s);-1===c&&(d=0),-1===u&&(p=t.length);const m=u-c,h={};if(m)for(let e=0;e<=m;e++){const n=e+c;if(l)if(0===e){const e=t[n-1].length;h[n]=[l,e-l+1]}else if(e===m)h[n]=[0,f];else{const r=t[n-e].length;h[n]=[0,r]}else h[n]=!0}else h[c]=l===f?!l||[l,0]:[l,f-l];return{start:d,end:p,markerLines:h}}(t,c,n,a),m=t.start&&"number"==typeof t.start.column,g=String(u+a).length;let y=(i?function(e){if(""===e)return"";const t=f(!0);let n="";for(const{type:r,value:o}of h(e))n+=r in t?o.split(p).map(e=>t[r](e)).join("\n"):o;return n}(e):e).split(C,u).slice(l,u).map((e,t)=>{const r=l+1+t,o=` ${` ${r+a}`.slice(-g)} |`,i=d[r],c=!d[r+1];if(i){let t="";if(Array.isArray(i)){const r=e.slice(0,Math.max(i[0]-1,0)).replace(/[^\t]/g," "),a=i[1]||1;t=["\n ",s.gutter(o.replace(/\d/g," "))," ",r,s.marker("^").repeat(a)].join(""),c&&n.message&&(t+=" "+s.message(n.message))}return[s.marker(">"),s.gutter(o),e.length>0?` ${e}`:"",t].join("")}return` ${s.gutter(o)}${e.length>0?` ${e}`:""}`}).join("\n");return n.message&&!m&&(y=`${" ".repeat(g+1)}${n.message}\n${y}`),i?s.reset(y):y}},2960(e){"use strict";e.exports=(e,...t)=>{try{return[null,e(...t)]}catch(e){return[e]}}},2979(e,t,n){"use strict";var r=n(9168),o=n(4299),i=n(980),a=n(1256),s=n(407),c=n(3543);CloudCmd.Konsole={init:async function(){d("console")&&(c.show.load("top"),await CloudCmd.View(),await D(),await b())},show:function(e){g&&d("console")&&CloudCmd.View.show(h,{afterShow:()=>{f.focus(),r(e)}})},hide:function(){CloudCmd.View.hide()}};const{Dialog:l,CurrentInfo:u}=DOM;let f;const{config:d}=CloudCmd,p=o((e,t)=>{return e(`cd ${n=t,n.replace(/\/$/,"")||"/"}`);var n}),m="Konsole";let h,g;const y=()=>CloudCmd.prefix+"/console";async function C(e){u.dirPath!==e&&await CloudCmd.changeDir(e)}const w=()=>{if(d("syncConsolePath"))return u.dirPath},b=async()=>{const e={cwd:w(),env:{ACTIVE_DIR:DOM.getCurrentDirPath.bind(DOM),PASSIVE_DIR:DOM.getNotCurrentDirPath.bind(DOM),CURRENT_NAME:DOM.getCurrentName.bind(DOM),CURRENT_PATH:()=>u.path},prefix:y(),prefixSocket:CloudCmd.prefixSocket+"/console",socketPath:CloudCmd.prefix};h=s("div",{className:"console"}),f=await Console(h,e),f.on("connect",r.with(v,f)),f.on("path",d.if("syncConsolePath",C)),CloudCmd.on("active-dir",d.if("syncConsolePath",p(f.handler))),f.addShortCuts({P:()=>{const e=f.getPromptText(),t=DOM.getCurrentDirPath();f.setPromptText(e+t)}})};function v(e){e.emit("auth",d("username"),d("password")),e.on("reject",()=>{l.alert("Wrong credentials!")})}const D=async()=>{Util.time(`${m} load`);const e=`${y()}/console.js`,[t]=await(0,i.tryToCatch)(a.js,e);if(g=!0,Util.timeEnd(`${m} load`),t)return l.alert(t.message,{cancel:!1})}},3093(e,t,n){"use strict";var r=n(4459);e.exports=function(e){return r(e)||0===e?e:e<0?-1:1}},3115(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isKeyword=function(e){return n.has(e)},t.isReservedWord=i,t.isStrictBindOnlyReservedWord=s,t.isStrictBindReservedWord=function(e,t){return a(e,t)||s(e)},t.isStrictReservedWord=a;const n=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"]),r=new Set(["implements","interface","let","package","private","protected","public","static","yield"]),o=new Set(["eval","arguments"]);function i(e,t){return t&&"await"===e||"enum"===e}function a(e,t){return i(e,t)||r.has(e)}function s(e){return o.has(e)}},3126(e,t,n){"use strict";var r=n(6743),o=n(9675),i=n(76),a=n(3144);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new o("a function is required");return a(r,i,e)}},3144(e,t,n){"use strict";var r=n(6743),o=n(1002),i=n(76),a=n(7119);e.exports=a||r.call(i,o)},3239(e,t,n){"use strict";function r(e,{getCurrentName:t,selectFile:n}=DOM){".."!==t(e)&&n(e)}n.d(t,{i:()=>o});const o=(e,{count:t,isVisual:n,isDelete:o},{Info:i,setCurrentFile:a,unselectFiles:s,Operation:c})=>{let l=i.element;const u=n?r:s;u(l);const f=`${e}Sibling`;for(let e=0;e<t;e++){const e=l[f];if(!e)break;l=e,u(l)}a(l),o&&c.show("delete")}},3494(e,t,n){"use strict";CloudCmd.EditFile=t;const r=n(1730),{fullstore:o}=n(887),i=n(9168),a=n(3850),s=DOM.CurrentInfo,{Dialog:c,Images:l}=DOM,{config:u}=CloudCmd;let f,d;const p=o(),m={beforeClose:async()=>{i.ifExist(f,"hide"),await y()}};function h(){CloudCmd.Edit.hide()}function g(e){const t={x:e.clientX,y:e.clientY};if(e.preventDefault(),f)return;const n={beforeShow:e=>{e.x-=18,e.y-=27},afterClick:()=>{CloudCmd.Edit.getEditor().focus()}},r=CloudCmd.Edit.getElement();f=a(r,n,function(){const e=CloudCmd.Edit.getEditor();return{"Save Ctrl+S":()=>{e.save()},"Go To Line Ctrl+G":()=>{e.goToLine()},"Cut Ctrl+X":()=>{e.cutToClipboard()},"Copy Ctrl+C":()=>{e.copyToClipboard()},"Paste Ctrl+V":()=>{e.pasteFromClipboard()},"Delete Del":()=>{e.remove("right")},"Select All Ctrl+A":()=>{e.selectAll()},"Close Esc":h}}()),f.addContextMenuListener(),f.show(t.x,t.y)}async function y(){const e=CloudCmd.Edit.getEditor();if(!e.isChanged())return;const[t]=await c.confirm(d);t||e.save()}e.exports.init=async()=>{p(!0),await CloudCmd.Edit();const e=CloudCmd.Edit.getEditor();var t;(t=e).emit("auth",u("username"),u("password")),t.on("reject",()=>{c.alert("Wrong credentials!")}),function(e){const t=CloudCmd.Edit.getElement();DOM.Events.addOnce("contextmenu",t,g),e.on("save",e=>{DOM.setCurrentSize(r.size(e))})}(e),p(!1)},e.exports.show=async e=>{if(p())return;const t={...m,...e};CloudCmd.config("showFileName")&&(t.title=s.name),l.show.load(),CloudCmd.Edit.getEditor().setOption("keyMap","default");const[n,r]=await s.getData();if(n)return l.hide(),CloudCmd.Edit;const{path:o}=s,i=function(){const{name:e,isDir:t}=s;return t?`${e}.json`:e}();return function(e){d=`Do you want to save changes to ${e}?`}(i),CloudCmd.Edit.getEditor().setValueFirst(o,r).setModeForPath(i).enableKey(),CloudCmd.Edit.show(t),CloudCmd.Edit},e.exports.hide=h,e.exports.isChanged=y},3543(e,t,n){"use strict";n.r(t),n.d(t,{clearProgress:()=>h,error:()=>f,get:()=>c,hide:()=>p,loading:()=>u,setProgress:()=>m,show:()=>d});var r=n(407);const o="loading",i="hidden",a="error",s=()=>function(){const e=document.createElementNS;if(!e)return!1;const t=e.bind(document)("http://www.w3.org/2000/svg","animate").toString();return/SVGAnimate/.test(t)}()?"-svg":"-gif",c=l;function l(){return r("span",{id:"js-status-image",className:"icon",dataName:"progress",notAppend:!0})}const u=()=>{const e=l(),{classList:t}=e,n=o+s();return t.add(o,n),t.remove(a,i),e},f=()=>{const e=l(),{classList:t}=e,n=o+s();return t.add(a),t.remove(i,o,n),e};function d(e,t){const n=g.loading(),r=n.parentElement,o=DOM.getRefreshButton(t);let i;return"top"===e?i=o.parentElement:(i=DOM.getCurrentFile(),i=i?DOM.getByDataName("js-name",i):o.parentElement),(!r||r&&r!==i)&&i.appendChild(n),DOM.show(n),n}d.load=d,d.error=e=>{const t=g.error();return DOM.show(t),t.title=e,t};const p=()=>{const e=g.get();return DOM.hide(e),g},m=(e,t)=>{const n=g.get();return n?(n.setAttribute("data-progress",`${e}%`),t&&(n.title=t),g):g},h=()=>{const e=g.get();return e?(e.setAttribute("data-progress",""),e.title="",g):g},g={clearProgress:h,setProgress:m,show:d,hide:p,get:c,error:f,loading:u}},3628(e,t,n){"use strict";var r=n(8648),o=n(1064),i=n(7176);e.exports=r?function(e){return r(e)}:o?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return o(e)}:i?function(e){return i(e)}:null},3850(e,t,n){"use strict";n(4887);const r=n(407),o=n(6727),i=n(8812),a=e=>"number"==typeof e,s=(e,...t)=>(e=>"function"==typeof e)(e)&&e(...t);e.exports=function e(t,n,c){if(!(this instanceof e))return new e(t,n,c);const l=new i;let u,f,d,p,m={};c?(u=p=t,m=n):n?(u=p=t,c=n):(u=document.body,p=window,c=t);const h={},g=function(e){const t=o(e,h,m);return r("ul",{dataName:"js-menu",className:"menu menu-hidden",innerHTML:t,parent:u,uniq:!1})}(c);function y(e,t){let n=l.getItem(e),r=l.isName(n),o=l.isItem(n),i=l.isSubMenu(n);return r&&o||(n=document.elementFromPoint(t.x,t.y),i=l.isSubMenu(n),r=l.isName(n),o=l.isItem(n)),{name:r,item:o,sub:i}}function C(e,t){e.stopPropagation();const{afterClick:n,beforeClick:r,beforeHide:o,afterHide:i,name:a}=m,c=e.target,u=t||y(c,{x:e.clientX,y:e.clientY}),f=s(r,a);if(u.sub)return e.preventDefault();if(s(o),v(),s(i),!f&&(u.name||u.item)){const e=function(e){const t=l.getName(e);if(!t)return null;const n=t.getAttribute("data-menu-path");return h[n]}(c);s(e),s(n)}}function w(e){e.preventDefault();const t=e.target,n=e.clientX,r=e.clientY,o=y(t,{x:n,y:r});if(o.name||o.item||o.sub)return C(e,o);v(),b(n,r)}function b(e,t){const{name:n,beforeShow:r,afterShow:o}=m,i={x:e,y:t,name:n},c=s(r,i);(c||!1!==c)&&(g.classList.remove("menu-hidden"),function(e,t){const n=a(e),r=a(t),o=function(){if(!f){const{height:e}=getComputedStyle(g);f=parseInt(e,10)}return f}(),i=function(){if(!d){const{width:e}=getComputedStyle(g);d=parseInt(e,10)}return d}(),s=window.innerHeight;window.innerWidth<i+e&&(e-=i)<0&&(e=0),s<o+t&&(t-=o)<0&&(t=0),n&&(g.style.left=`${e}px`),r&&(g.style.top=t-14+"px")}(i.x,i.y),s(o,i))}function v(){s(m.beforeClose)||g.classList.add("menu-hidden")}p.addEventListener("click",C),this.show=b,this.hide=v,this.addContextMenuListener=()=>{p.addEventListener("contextmenu",w)},this.removeContextMenuListener=()=>{p.addEventListener("contextmenu",w)},this.remove=function(){p.removeEventListener("click",C),p.removeEventListener("contextmenu",w),u.removeChild(g)}}},3955(e,t,n){"use strict";n.d(t,{A:()=>r});var r=858==n.j?function(e){for(var t=e.split(o),n=t.length,r=new Array(n),i=0;i<n;i++){var a=t[i];""!==a&&(r[i]=a[0].toUpperCase()+a.slice(1))}return r.join("")}:null,o=/[\s\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,\-.\/:;<=>?@\[\]^_`{|}~]+/},4002(e){"use strict";e.exports.MAIN='<ul data-name="js-menu" class="menu menu-hidden">{{ items }}</ul>',e.exports.ITEM='<li data-name="js-menu-item" class="menu-item{{ className }}"{{ attribute }}><label data-menu-path="{{ path }}">{{ name }}</label>{{ subitems }}</li>'},4035(e,t,n){"use strict";var r,o=n(6556),i=n(9092)(),a=n(9957),s=n(5795);if(i){var c=o("RegExp.prototype.exec"),l={},u=function(){throw l},f={toString:u,valueOf:u};"symbol"==typeof Symbol.toPrimitive&&(f[Symbol.toPrimitive]=u),r=function(e){if(!e||"object"!=typeof e)return!1;var t=s(e,"lastIndex");if(!t||!a(t,"value"))return!1;try{c(e,f)}catch(e){return e===l}}}else{var d=o("Object.prototype.toString");r=function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===d(e)}}e.exports=r},4039(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(1333);e.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&o()}},4233(e){"use strict";const t=function*(){}.constructor;e.exports=()=>t},4261(e){"use strict";function t(){if(!(this instanceof t))return new t;this._all={}}function n(e){if("string"!=typeof e)throw Error("event should be string!")}function r(e,t){n(e),function(e){if("function"!=typeof e)throw Error("callback should be function!")}(t)}e.exports=t,t.prototype.on=function(e,t){var n=this._all[e];return r(e,t),n?n.push(t):this._all[e]=[t],this},t.prototype.addListener=t.prototype.on,t.prototype.once=function(e,t){var n=this;return r(e,t),n.on(e,function r(){t.apply(null,arguments),n.off(e,r)}),this},t.prototype.off=function(e,t){var n=this._all[e]||[],o=n.indexOf(t);for(r(e,t);~o;)n.splice(o,1),o=n.indexOf(t);return this},t.prototype.removeListener=t.prototype.off,t.prototype.emit=function(e){var t=[].slice.call(arguments,1),r=this._all[e];if(n(e),!r&&"error"===e)throw t[0];return r?(r.forEach(function(e){e.apply(null,t)}),this):this},t.prototype.removeAllListeners=function(e){return n(e),this._all[e]=[],this}},4299(e){"use strict";const t=(e,...n)=>{if(function(e){if("function"!=typeof e)throw Error("fn should be function!")}(e),n.length>=e.length)return e(...n);const r=(...r)=>t(e,...n,...r),o=e.length-n.length-1,i=(e=>[function(t){return e(...arguments)},function(t,n){return e(...arguments)},function(t,n,r){return e(...arguments)},function(t,n,r,o){return e(...arguments)},function(t,n,r,o,i){return e(...arguments)}])(r)[o];return i||r};e.exports=t},4459(e){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},4559(e,t,n){"use strict";n.r(t),n.d(t,{_CURRENT_FILE:()=>l,_parseHrefAttribute:()=>g,_parseNameAttribute:()=>m,getCurrentByName:()=>x,getCurrentByPosition:()=>S,getCurrentDirName:()=>w,getCurrentDirPath:()=>y,getCurrentFile:()=>D,getCurrentName:()=>f,getCurrentPath:()=>C,getCurrentType:()=>k,getNotCurrentDirPath:()=>v,getParentDirPath:()=>b,isCurrentFile:()=>A,isCurrentIsDir:()=>M,setCurrentByName:()=>O,setCurrentFile:()=>E,setCurrentName:()=>u,setTitle:()=>P});var r=n(407),o=n(8453),i=n(1849);let a;const s="current-file",c=e=>null==e?void 0:e.replace(" "," "),l=/^8(|00|58)$/.test(n.j)?s:null,u=(e,t)=>{const n=DOM.CurrentInfo,{link:r}=n,{prefix:a}=CloudCmd,s=a+o.FS+n.dirPath,c=(0,i.l)(e);return r.title=c,r.href=s+c,r.innerHTML=c,t.setAttribute("data-name",d(e)),CloudCmd.emit("current-file",t),r},f=e=>{const t=e||DOM.getCurrentFile();return t?p(t.getAttribute("data-name")):""},d=e=>`js-file-${btoa(encodeURI(e))}`,p=e=>(e=e.replace("js-file-",""),c(decodeURI(atob(e)))),m=/^8(|00|58)$/.test(n.j)?p:null,h=(e,t)=>(t=t.replace(RegExp("^"+e+o.FS),""),(0,i.D)(c(t))),g=/^8(|00|58)$/.test(n.j)?h:null,y=(e=DOM.getPanel())=>DOM.getByDataName("js-path",e).textContent,C=e=>{const t=e||DOM.getCurrentFile(),[n]=DOM.getByTag("a",t),{prefix:r}=CloudCmd;return h(r,n.getAttribute("href"))},w=()=>{const e=DOM.getCurrentDirPath().replace(/\/$/,""),t=e.substr(e,e.lastIndexOf("/"));return e.replace(`${t}/`,"")||"/"},b=e=>{const t=DOM.getCurrentDirPath(e),n=DOM.getCurrentDirName()+"/",r=t.lastIndexOf(n);return"/"===t?t:t.slice(0,r)},v=()=>{const e=DOM.getPanel({active:!1});return DOM.getCurrentDirPath(e)},D=()=>DOM.getByClass(s),x=(e,t=DOM.CurrentInfo.panel)=>{const n="js-file-"+btoa(encodeURI(null==(r=e)?void 0:r.replace(" "," ")));var r;return DOM.getByDataName(n,t)},E=(e,t)=>{const n=t,r=DOM.getCurrentFile();if(!e)return DOM;let i="";r&&(i=DOM.getCurrentDirPath(),function(e){DOM.isCurrentFile(e)&&e.classList.remove(s)}(r)),e.classList.add(s);const a=DOM.getCurrentDirPath(),c=CloudCmd.config("name");if(a!==i&&(DOM.setTitle((0,o.getTitle)({name:c,path:a})),!n||n.history)){const e="/"===a?a:o.FS+a;DOM.setHistory(e,null,e)}return DOM.scrollIntoViewIfNeeded(e,!0),CloudCmd.emit("current-file",e),CloudCmd.emit("current-path",a),CloudCmd.emit("current-name",DOM.getCurrentName(e)),DOM},O=e=>{const t=DOM.getCurrentByName(e);return DOM.setCurrentFile(t)},S=({x:e,y:t})=>{const n=(e=>{const{tagName:t}=e;return/A|SPAN|LI/.test(t)?"A"===t?e.parentElement.parentElement:"SPAN"===t?e.parentElement:e:null})(document.elementFromPoint(e,t));return n&&"LI"!==n.tagName?null:n},A=e=>!!e&&DOM.isContainClass(e,s),P=e=>(a||(a=DOM.getByTag("title")[0]||r("title",{innerHTML:e,parent:document.head})),a.textContent=e,DOM),M=e=>{const t=e||DOM.getCurrentFile(),n=DOM.getCurrentPath(t),r=DOM.getCurrentType(t),o=n.endsWith(".zip");return/^directory(-link)?/.test(r)||o},k=e=>{const t=e||DOM.getCurrentFile();return DOM.getByDataName("js-type",t).className.split(" ").pop()}},4700(e,t,n){"use strict";var r=n(9168),o=n(9317),i=n(407),a=n(6037),s=n(507),c=n(8453);const{config:l,Key:u}=CloudCmd,{Buffer:f,Events:d,Dialog:p,Images:m}=DOM,h=DOM.CurrentInfo,g=p.alert.noFiles,y=o(async function(e){const[t,n]=await h.getData();if(t)return;const{name:r}=h;CloudCmd.execFromModule(e,"uploadFile",r,n),CloudCmd.log(`Uploading to ${r}...`)});let C,w,b;function v(){w.hide(),b.hide()}function D({type:e}){let t,n;return"context"===e?(t="context",n=u.unsetBind):"file"===e&&(t="contextFile"),{icon:!0,infiniteScroll:!1,beforeClose:u.setBind,beforeHide:u.setBind,beforeShow:r.with(O,n),beforeClick:S,name:t}}function x(e){const t={Paste:f.paste,New:{File:DOM.promptNewFile,Directory:DOM.promptNewDir},Upload:()=>{CloudCmd.Upload.show()},"Upload From Cloud":A,"Toggle File Selection":DOM.toggleSelectedFile,"(Un)Select All":DOM.toggleAllSelectedFiles};return e&&(t["Log Out"]=CloudCmd.logOut),t}function E(e,t){if(".."!==h.name)return e();t()}function O(e,t){u.unsetBind();const{name:n,position:o={x:t.x,y:t.y}}=t,{x:i,y:a}=o;var s;let c="contextFile"!==((s=DOM.getCurrentByPosition({x:i,y:a}))?".."===DOM.getCurrentName(s)?"context":"contextFile":"context");return"contextFile"===t.name&&(c=!c),c&&(C=n),r(e),c&&(c=function(e,t){const{panel:n}=h;if(!n)return!1;const r=document.elementFromPoint(e,t),o=n.querySelectorAll('[data-name="js-path"] *');return!~[].indexOf.call(o,r)}(i,a)),c}CloudCmd.Menu={init:async function(){const{isAuth:e,menuDataFile:t}=function(){const e=CloudCmd.config("auth"),t=x(e),n={View:()=>{CloudCmd.View.show()},Edit:()=>{const e=l("vim")?"EditFileVim":"EditFile";CloudCmd[e].show()},Rename:()=>{setTimeout(DOM.renameCurrent,100)},Delete:()=>{CloudCmd.Operation.show("delete")},Pack:()=>{CloudCmd.Operation.show("pack")},Extract:()=>{CloudCmd.Operation.show("extract")},Download:P,"Upload To Cloud":y("Cloud"),Cut:()=>{E(f.cut,g)},Copy:()=>{E(f.copy,g)}};return{isAuth:e,menuDataFile:{...n,...t}}}(),r=DOM.getFM(),o=x(e),i=D({type:"context"}),a=D({type:"file"}),{createCloudMenu:s}=await n.e(267).then(n.bind(n,7174)),{name:c}=r.dataset;w=await s(c,i,o),b=await s(c,a,t),w.addContextMenuListener(),b.addContextMenuListener(),d.addKey(k)},show:function(e){const{x:t,y:n}=function(e){return e?{x:e.x,y:e.y}:M()}(e);w.show(t,n),b.show(t,n),m.hide()},hide:v};const S=e=>C!==e;function A(){m.show.load("top"),CloudCmd.execFromModule("Cloud","saveFile",async(e,t)=>{const n=DOM.getCurrentDirPath()+e,[r]=await s.write(n,t);r||await CloudCmd.refresh({currentName:e})})}function P(){!function(e){const{prefixURL:t}=CloudCmd,n=Date.now(),r=DOM.getActiveFiles();if(!r.length)return g();for(const o of r){const r=DOM.isSelected(o),s=DOM.isCurrentIsDir(o),l=DOM.getCurrentPath(o);CloudCmd.log(`downloading file ${l}...`);const u=encodeURI(l).replace(/#/g,"#"),f=(0,a.getIdBySrc)(l);let d;d=s?t+"/pack"+u+DOM.getPackerExt(e):t+c.FS+u+"?download";const p=i("iframe",{id:f+"-"+n,async:!1,className:"hidden",src:d}),{body:m}=document,h=m.removeChild.bind(m,p);setTimeout(h,3e4),r&&DOM.toggleSelectedFile(o)}}(l("packer"))}function M(){const e=h.element.getBoundingClientRect();return{x:Math.round(e.left+e.width/3),y:Math.round(e.top)}}function k(e){const{F9:t,ESC:n}=u,r=e.keyCode,o=u.isBind();if(r===n)return u.setBind(),v();if(o&&r===t){const t=M();w.show(t.x,t.y),e.preventDefault()}}},4801(e,t,n){"use strict";n.d(t,{A:()=>r});const r=e=>document.querySelector(`[data-name="modal-${e}"]`)},4887(e,t,n){"use strict";n.r(t)},4905(e,t){"use strict";function n(e){if("function"!=typeof e)throw new TypeError("Argument to promisify must be a function");var t=e["__ES6-PROMISIFY--CUSTOM-ARGUMENTS__"],r=n.Promise||Promise;if("function"!=typeof r)throw new Error("No Promise implementation found; do you need a polyfill?");return function(){for(var n=this,o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return new r(function(r,o){i.push(function(e){if(e)return o(e);for(var n=arguments.length,i=Array(1<n?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];if(1===i.length||!t)return r(i[0]);var s={};i.forEach(function(e,n){var r=t[n];r&&(s[r]=e)}),r(s)}),e.apply(n,i)})}}Object.defineProperty(t,"__esModule",{value:!0}),t.promisify=n,n.argumentNames="__ES6-PROMISIFY--CUSTOM-ARGUMENTS__",n.Promise=void 0},4999(e,t,n){"use strict";n.r(t),n.d(t,{clear:()=>p,copy:()=>f,cut:()=>d,paste:()=>m});var r=n(740),o=n(112);const i="cut-file",a="copy",s="cut";function c(e){globalThis.DOM.Dialog.alert(e)}function l(){const{DOM:e}=globalThis,t=e.getActiveFiles();return e.getFilenames(t)}const u=e=>()=>{if(CloudCmd.config("buffer"))return e();c("Buffer disabled in config!")},f=u(async()=>{const e=globalThis.DOM.CurrentInfo,t=l(),n=e.dirPath;await p(),t.length&&(await r.remove(s),await r.setJson(a,{from:n,names:t}))}),d=u(async()=>{const e=globalThis.DOM.CurrentInfo,t=l(),n=e.dirPath;await p(),t.length&&(function(){const{DOM:e}=globalThis,t=e.getActiveFiles();for(const e of t)e.classList.add(i)}(),await r.setJson(s,{from:n,names:t}))}),p=u(async()=>{await r.remove(a),await r.remove(s),function(){const{DOM:e}=globalThis,t=e.getByClassAll(i);for(const e of t)e.classList.remove(i)}()}),m=u(async()=>{const e=globalThis.DOM.CurrentInfo,[t,n,i]=await async function(){const[e,t,n]=await o([r.getJson(a),r.getJson(s)]);return[e,t,n]}();if(t||!n&&!i)return c(t||"Buffer is empty!");const l=n?"copy":"move",u=n||i,{Operation:f}=CloudCmd,d=e.dirPath;if(u.from===d)return c("Path is same!");f.show(l,{...u,to:d}),await p()})},5e3(e,t,n){"use strict";CloudCmd.Help=t;const r=n(3543);e.exports.init=()=>{r.show.load("top")},e.exports.show=function(){CloudCmd.Markdown.show("/HELP.md",{positionLoad:"top",relative:!0})},e.exports.hide=function(){CloudCmd.View.hide()}},5291(e){"use strict";e.exports=(e,t)=>{Object.keys(t).forEach(((e,t)=>n=>e(n,t[n]))(e,t))}},5306(e,t,n){"use strict";n.r(t),n.d(t,{multiRename:()=>o});var r=n(975);const o=(e,t,n)=>(function(e,t){if(!e)throw Error("pattern could not be empty!");if(!Array.isArray(t))throw Error("names should be an array!")}(e,t),t.map(i(e,n))),i=(e,t={})=>(n,o)=>{const{shortdate:i=r}=t,[a,s]=function(e){const t=e.lastIndexOf(".");return~t?[e.substr(0,t),e.substr(t)]:[e,""]}(n),c=i(new Date,{sep:"-"});return e.replace("[n]",a).replace("[e]",s).replace("[c]",o+1).replace("[ymd]",c)}},5345(e){"use strict";e.exports=URIError},5450(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.promisify=r;var n="__ES6-PROMISIFY--CUSTOM-ARGUMENTS__";function r(e){if("function"!=typeof e)throw new TypeError("Argument to promisify must be a function");var t=e[n],o=r.Promise||Promise;if("function"!=typeof o)throw new Error("No Promise implementation found; do you need a polyfill?");return function(){for(var n=this,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return new o(function(r,o){i.push(function(e){if(e)return o(e);for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];if(1===i.length||!t)return r(i[0]);var s={};i.forEach(function(e,n){var r=t[n];r&&(s[r]=e)}),r(s)}),e.apply(n,i)})}}r.argumentNames=n,r.Promise=void 0},5499(e,t,n){"use strict";CloudCmd.EditFileVim=t;const r=n(9227),{Key:o}=CloudCmd,i={bindKeys:!1,beforeClose:()=>{r.rmKey(s),CloudCmd.EditFile.isChanged()}};function a(){CloudCmd.Edit.hide()}function s(e){const{keyCode:t,shiftKey:n}=e;n&&t===o.ESC&&(e.preventDefault(),a())}e.exports.init=async()=>{await CloudCmd.EditFile()},e.exports.show=async()=>{r.addKey(s),(await CloudCmd.EditFile.show(i)).getEditor().setKeyMap("vim")},e.exports.hide=a},5606(e){var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var s,c=[],l=!1,u=-1;function f(){l&&s&&(l=!1,s.length?c=s.concat(c):u=-1,c.length&&d())}function d(){if(!l){var e=a(f);l=!0;for(var t=c.length;t;){for(s=c,c=[];++u<t;)s&&s[u].run();u=-1,t=c.length}s=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new p(e,t)),1!==c.length||l||a(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},5615(e,t,n){"use strict";var r=n(407),o=n(806),i=n(608),a=n(3543);function s(){CloudCmd.View.hide()}function c(){const e=DOM.getByDataName("js-upload-file-button");a.hide(),DOM.Events.add("change",e,({target:e})=>{const{files:t}=e;s(),(0,i.Z)(t)})}CloudCmd.Upload={init:async function(){a.show.load("top"),await CloudCmd.View()},show:async function(){a.show.load("top");const e=await o.get("upload"),t=r("div",{innerHTML:e});CloudCmd.View.show(t,{autoSize:!0,afterShow:c});const n=['"Droid Sans Mono"','"Ubuntu Mono"','"Consolas"',"monospace"].join(", ");r("style",{dataName:"upload-css",innerText:`[data-name=js-upload-file-button] {\n font-family: ${n};\n font-size: 16px;\n margin: 10px 0 10px 0;\n }`})},hide:s}},5670(e,t,n){"use strict";n.r(t),n.d(t,{CurrentInfo:()=>J,changePanel:()=>$e,checkStorageHash:()=>xe,default:()=>X,deleteCurrent:()=>Ne,deleteSelected:()=>Te,duplicatePanel:()=>_e,expandSelection:()=>Ce,getActiveFiles:()=>se,getAllFiles:()=>ye,getCSSVar:()=>Ae,getCurrentData:()=>he,getCurrentDate:()=>ce,getCurrentDirName:()=>re,getCurrentLink:()=>ve,getCurrentMode:()=>pe,getCurrentOwner:()=>me,getCurrentSize:()=>le,getFM:()=>Oe,getFilenames:()=>De,getFiles:()=>Me,getNotCurrentDirPath:()=>ie,getPackerExt:()=>Be,getPanel:()=>Pe,getPanelPosition:()=>Se,getParentDirPath:()=>oe,getRefreshButton:()=>ge,goToDirectory:()=>Le,hidePanel:()=>Fe,loadCurrentHash:()=>fe,loadCurrentSize:()=>ue,loadRemote:()=>Z,loadSocket:()=>Q,promptNewDir:()=>ee,promptNewFile:()=>te,remove:()=>je,saveDataToStorage:()=>Ee,scrollByPages:()=>Re,scrollIntoViewIfNeeded:()=>Ie,setCurrentSize:()=>de,setHistory:()=>be,showPanel:()=>ke,shrinkSelection:()=>we,swapPanels:()=>Ue,unselectFiles:()=>ae,updateCurrentInfo:()=>Ve});var r={};n.r(r),n.d(r,{getByClass:()=>b,getByClassAll:()=>D,getByDataName:()=>v,getById:()=>w,getByTag:()=>C,hide:()=>x,isContainClass:()=>y,show:()=>E});var o={};n.r(o),n.d(o,{getSelectedFiles:()=>N,isSelected:()=>A,selectAllFiles:()=>j,selectFile:()=>P,toggleAllSelectedFiles:()=>F,toggleSelectedFile:()=>k,unselectFile:()=>M});var i=n(6037),a=n(806),s=n(8553),c=n(9227),l=n(6088),u=n(740),f=n(507),d=n(3543),p=n(8590),m=n(4559),h=n(4299);const g={show:E,hide:x,getByClass:b,getByClassAll:D,getByDataName:v,getById:w,getByTag:C,isContainClass:y};function y(e,t){if(!e)throw Error("element could not be empty!");if(!t)throw Error("className could not be empty!");if(Array.isArray(t))return t.some(h(y,e));const{classList:n}=e;return n.contains(t)}function C(e,t=document){return t.getElementsByTagName(e)}function w(e,t=document){return t.querySelector(`#${e}`)}function b(e,t=document){return g.getByClassAll(e,t)[0]}function v(e,t=document){const n='[data-name="'+e+'"]';return t.querySelector(n)}function D(e,t){return(t||document).getElementsByClassName(e)}function x(e){return e.classList.add("hidden"),g}function E(e){return e.classList.remove("hidden"),g}const O="selected-file",S={getSelectedFiles:N,isSelected:A,unselectFile:M,selectFile:P,selectAllFiles:j,toggleSelectedFile:k,toggleAllSelectedFiles:F};function A(e){return!!e&&DOM.isContainClass(e,O)}function P(e){return(e||DOM.getCurrentFile()).classList.add(O),S}function M(e){return(e||DOM.getCurrentFile()).classList.remove(O),S}function k(e){const t=e||DOM.getCurrentFile();return".."===DOM.getCurrentName(t)||t.classList.toggle(O),S}function F(){return DOM.getAllFiles().map(DOM.toggleSelectedFile),S}function j(){return DOM.getAllFiles().map(DOM.selectFile),S}function N(){const e=DOM.getPanel(),t=DOM.getByClassAll(O,e);return Array.from(t)}var T=n(231),I=n(7252),R=n(8453);const $=(e,t,n=100)=>Math.round(e*n/t);var B=n(4999),L=n(537),_=n(6686),U=n(2515),V=n(1256),H=n(980);const z=(0,L.callbackify)(async(e,t)=>{const{prefix:n,config:r}=CloudCmd,o=t;if(o.name&&window[o.name])return;const i=await a.get("modules"),s=r("online")&&navigator.onLine,c=(0,l.findObjByNameInArr)(i.remote,e),u=U.array(c.local),{version:f}=c;let d,p;u?(d=c.remote,({local:p}=c)):(d=[c.remote],p=[c.local]);const m=p.map(e=>n+e),h=d.map(e=>_(e,{version:f}));if(s){const[e]=await(0,H.tryToCatch)(V.parallel,h);if(!e)return}await V.parallel(m)});let W="*.*";const K=async(e,t)=>{if(!t)return;const n=`Specify file type for ${e} selection`,[r,o]=await(0,s.prompt)(n,W);if(r)return;W=o;const i=(0,l.getRegExp)(o);let a=0;for(const n of t){const t=(0,m.getCurrentName)(n);if(".."===t||!i.test(t))continue;++a;let r=A(n);"expand"===e&&(r=!r),r&&k(n)}a||(0,s.alert)("No matches found!")},{assign:G}=Object,q={getCurrentDirName:re,getNotCurrentDirPath:ie,getParentDirPath:oe,loadRemote:Z,loadSocket:Q,promptNewDir:ee,promptNewFile:te,unselectFiles:ae,getActiveFiles:se,getCurrentDate:ce,getCurrentSize:le,loadCurrentSize:ue,loadCurrentHash:fe,setCurrentSize:de,getCurrentMode:pe,getCurrentOwner:me,getCurrentData:he,getRefreshButton:ge,getAllFiles:ye,expandSelection:Ce,shrinkSelection:we,setHistory:be,getCurrentLink:ve,getFilenames:De,checkStorageHash:xe,saveDataToStorage:Ee,getFM:Oe,getPanelPosition:Se,getCSSVar:Ae,getPanel:Pe,getFiles:Me,showPanel:ke,hidePanel:Fe,remove:je,deleteCurrent:Ne,deleteSelected:Te,renameCurrent:async(e,t={})=>{const{refresh:n=CloudCmd.refresh,Dialog:r=s,currentFile:o=m}=t,{isCurrentFile:i,getCurrentName:a,getCurrentFile:c,getCurrentByName:l,getCurrentType:d,getCurrentDirPath:h,setCurrentName:g}=o;i(e)||(e=c());const y=a(e);if(".."===y)return r.alert.noFiles();const[C,w]=await r.prompt("Rename",y);if(C)return;const b=l(w);if(b){const e=d(b),t=`${(0,p.A)(e)} "${w}" already exists. Proceed?`,[n]=await r.confirm(t);if(n)return}if(y===w)return;const v=h(),D=`${v}${y}`,x=`${v}${w}`,[E]=await f.rename(D,x);E||(g(w,e),u.remove(v),n())},scrollIntoViewIfNeeded:Ie,scrollByPages:Re,changePanel:$e,getPackerExt:Be,goToDirectory:Le,duplicatePanel:_e,swapPanels:Ue,updateCurrentInfo:Ve};G(q,{...r,...m,...o});const J={};q.Images=d,q.load=i,q.Files=a,q.RESTful=f,q.IO=T,q.Storage=u,q.Dialog=s,q.CurrentInfo=J;const X=q;q.uploadDirectory=e=>{e.length&&d.show("top");const t=Array.from(e).map(e=>e.webkitGetAsEntry()),n=DOM.getCurrentDirPath().replace(/\/$/,""),r=s.progress("Uploading...");r.catch(()=>{s.alert("Upload aborted"),o.abort()});const o=I(t,(e,t,o,i,a,s)=>{const{prefixURL:c}=CloudCmd,l=c+R.FS+n+t;let u;switch(e){case"file":u=((e,t)=>DOM.load.put(e,t))(l,o);break;case"directory":f=l,u=DOM.load.put(`${f}?dir`)}var f;u.on("end",s),u.on("progress",e=>{const t=$(i,a),n=$(i+1,a),o=t+$(e,100,n-t);r.setProgress(o)})});o.on("error",e=>{s.alert(e),o.abort()}),o.on("end",CloudCmd.refresh)},q.Buffer=B,q.Events=c;const Y={"js-left":null,"js-right":null};function Z(e,t,n){return z(e,t,n),q}function Q(e){return q.loadRemote("socket",{name:"io"},e),q}async function ee(){await ne("directory")}async function te(){await ne("file")}async function ne(e){const{Dialog:t}=q,n=q.getCurrentDirPath(),r=`New ${e}`||"File",o=(()=>{const e=q.getCurrentName();return".."===e?"":e})(),[i,a]=await t.prompt(r,o);if(i)return;const s=`${n}${a}`;"directory"===e?await f.createDirectory(s):await f.write(s),await CloudCmd.refresh({currentName:a})}function re(){const e=q.getCurrentDirPath().replace(/\/$/,""),t=e.substr(e,e.lastIndexOf("/"));return e.replace(`${t}/`,"")||"/"}function oe(e){const t=q.getCurrentDirPath(e),n=q.getCurrentDirName()+"/",r=t.lastIndexOf(n);return"/"!==t?t.slice(0,r):t}function ie(){const e=q.getPanel({active:!1});return q.getCurrentDirPath(e)}function ae(e){e=e||q.getSelectedFiles(),Array.from(e).forEach(q.toggleSelectedFile)}function se(){const e=q.getCurrentFile(),t=q.getSelectedFiles(),n=q.getCurrentName(e);return t.length||".."===n?t:[e]}function ce(e){const t=e||q.getCurrentFile();return q.getByDataName("js-date",t).textContent}function le(e){const t=e||q.getCurrentFile();return q.getByDataName("js-size",t).textContent.replace(/^<|>$/g,"")}async function ue(e){const t=e||q.getCurrentFile(),n=q.getCurrentPath(t);if(d.show.load(),".."===name)return;const[,r]=await f.read(n+"?size");return q.setCurrentSize(r,t),d.hide(),t}async function fe(e){const t=e||q.getCurrentFile(),n=q.getCurrentPath(t),[,r]=await f.read(n+"?hash");return r}function de(e,t){const n=t||q.getCurrentFile();q.getByDataName("js-size",n).textContent=e}function pe(e){const t=e||q.getCurrentFile();return q.getByDataName("js-mode",t).textContent}function me(e){const t=e||q.getCurrentFile();return q.getByDataName("js-owner",t).textContent}async function he(e){const{Dialog:t}=q,n=q.CurrentInfo,r=e||q.getCurrentFile(),o=q.getCurrentPath(r),i=q.isCurrentIsDir(r);if(".."===n.name)return t.alert.noFiles(),[Error("No Files")];if(i)return await f.read(o);const[a,s]=await q.checkStorageHash(o);if(!a)return[Error("Can't get hash of a file")];if(s===a)return[null,await u.get(`${o}-data`)];const[c,l]=await f.read(o);if(c)return[c,null];const{length:d}=l;return s&&d<1073741824&&await q.saveDataToStorage(o,l,a),[null,l]}function ge(e=q.getPanel()){return q.getByDataName("js-refresh",e)}function ye(){const e=q.getPanel(),t=q.getFiles(e),n=".."===q.getCurrentName(t[0])?1:0;return Array.from(t).slice(n)}async function Ce(){const{files:e}=J;await K("expand",e)}async function we(){const{files:e}=J;await K("shrink",e)}function be(e,t,n){const r=globalThis.history,{prefix:o}=CloudCmd;return n=o+n,r&&history.pushState(e,t,n),r}function ve(e){const t=e||q.getCurrentFile();return q.getByTag("a",t)[0]}function De(e){if(!e)throw Error("AllFiles could not be empty");const t=e[0]||q.getCurrentFile(),n=q.getCurrentName(t),r=Array.from(e);return".."===n&&r.shift(),r.map(e=>q.getCurrentName(e))}async function xe(e){const t=`${e}-hash`;if("string"!=typeof e)throw Error("name should be a string!");const[n,r]=await Promise.all([q.loadCurrentHash(),u.get(t)]);return[n,r]}async function Ee(e,t,n){if(q.isCurrentIsDir())return;n=n||await q.loadCurrentHash();const r=`${e}-hash`,o=`${e}-data`;return await u.set(r,n),await u.set(o,t),n}function Oe(){const{parentElement:e}=q.getPanel();return e}function Se(e){return(e=e||q.getPanel()).dataset.name.replace("js-","")}function Ae(e,{body:t=document.body}={}){return getComputedStyle(t).getPropertyValue(`--${e}`)}function Pe(e){let t,n,r,o="js-";const i=q.getCurrentFile();if(i?(t=i.parentElement,n=t.parentElement,r="js-left"===n.getAttribute("data-name")):n=q.getByDataName("js-left"),e&&!e.active&&(o+=r?"right":"left",n=q.getByDataName(o)),globalThis.innerWidth<CloudCmd.MIN_ONE_PANEL_WIDTH&&(n=q.getByDataName("js-left")),!n)throw Error("can not find Active Panel!");return n}function Me(e){return q.getByDataName("js-files",e).children||[]}function ke(e){const t=q.getPanel({active:e});return!!t&&(q.show(t),!0)}function Fe(e){const t=q.getPanel({active:e});return!!t&&q.hide(t)}function je(e,t){return(t||document.body).removeChild(e),q}function Ne(e){e||q.getCurrentFile();const t=null==e?void 0:e.parentElement,n=q.getCurrentName(e);if(e&&".."!==n){const n=e.nextSibling,r=e.previousSibling;q.setCurrentFile(n||r),t.removeChild(e)}}function Te(e){(e=e||q.getSelectedFiles())&&e.map(q.deleteCurrent)}function Ie(e,t=!1){e&&e.scrollIntoViewIfNeeded&&e.scrollIntoViewIfNeeded(t)}function Re(e,t){const n=(null==e?void 0:e.scrollByPages)&&t;return n&&e.scrollByPages(t),n}function $e(){const e=J;let t=q.getPanel();CloudCmd.emit("passive-dir",e.dirPath);const n=q.getPanel({active:!1});let r=q.getCurrentName();const o=q.getFiles(n);let i,a,s=t.getAttribute("data-name");return Y[s]=r,t=n,s=t.getAttribute("data-name"),r=Y[s],r&&(a=q.getCurrentByName(r,t),a&&(i=a.parentElement)),i&&i.parentElement||(a=q.getCurrentByName(r,t),a||([a]=o)),q.setCurrentFile(a,{history:!0}),CloudCmd.emit("active-dir",e.dirPath),q}function Be(e){return"zip"===e?".zip":".tar.gz"}async function Le(e={}){const{Dialog:t}=q,{prompt:n=t.prompt,changeDir:r=CloudCmd.changeDir}=e,{dirPath:o}=J,[i,a=o]=await n("Go to directory:",o);i||await r(a)}async function _e(){const e=J,{isDir:t}=e,n=e.panelPassive,r=!e.isOnePanel,o=(t=>t?e.path:e.dirPath)(t);await CloudCmd.changeDir(o,{panel:n,noCurrent:r})}async function Ue(){const e=J,{panel:t,files:n,element:r,panelPassive:o}=e,i=q.getCurrentDirPath(),a=q.getNotCurrentDirPath();let s=n.indexOf(r);await CloudCmd.changeDir(i,{panel:o,noCurrent:!0}),await CloudCmd.changeDir(a,{panel:t});const c=e.files.length-1;s>c&&(s=c);const l=e.files[s];q.setCurrentFile(l)}function Ve(e){const t=q.CurrentInfo,n=e||q.getCurrentFile(),r=n.parentElement,o=q.getPanel({active:!1}),i=q.getFiles(o),a=q.getCurrentName(n);t.dir=q.getCurrentDirName(),t.dirPath=q.getCurrentDirPath(),t.parentDirPath=q.getParentDirPath(),t.element=n,t.ext=(0,l.getExt)(a),t.files=Array.from(r.children),t.filesPassive=Array.from(i),t.first=r.firstChild,t.getData=q.getCurrentData,t.last=r.lastChild,t.link=q.getCurrentLink(n),t.mode=q.getCurrentMode(n),t.name=a,t.path=q.getCurrentPath(n),t.panel=r.parentElement||q.getPanel(),t.panelPassive=o,t.size=q.getCurrentSize(n),t.isDir=q.isCurrentIsDir(),t.isSelected=q.isSelected(n),t.panelPosition=q.getPanel().dataset.name.replace("js-",""),t.isOnePanel=t.panel.getAttribute("data-name")===t.panelPassive.getAttribute("data-name")}},5680(e,t,n){"use strict";var r=n(5767);e.exports=function(e){return!!r(e)}},5767(e,t,n){"use strict";var r=n(2682),o=n(9209),i=n(487),a=n(6556),s=n(5795),c=n(3628),l=a("Object.prototype.toString"),u=n(9092)(),f=globalThis,d=o(),p=a("String.prototype.slice"),m=a("Array.prototype.indexOf",!0)||function(e,t){for(var n=0;n<e.length;n+=1)if(e[n]===t)return n;return-1},h={__proto__:null};r(d,u&&s&&c?function(e){var t=new f[e];if(Symbol.toStringTag in t&&c){var n=c(t),r=s(n,Symbol.toStringTag);if(!r&&n){var o=c(n);r=s(o,Symbol.toStringTag)}if(r&&r.get){var a=i(r.get);h["$"+e]=a}}}:function(e){var t=new f[e],n=t.slice||t.set;if(n){var r=i(n);h["$"+e]=r}}),e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!u){var t=p(l(e),8,-1);return m(d,t)>-1?t:"Object"===t&&function(e){var t=!1;return r(h,function(n,r){if(!t)try{n(e),t=p(r,1)}catch(e){}}),t}(e)}return s?function(e){var t=!1;return r(h,function(n,r){if(!t)try{"$"+n(e)===r&&(t=p(r,1))}catch(e){}}),t}(e):null}},5795(e,t,n){"use strict";var r=n(6549);if(r)try{r([],"length")}catch(e){r=null}e.exports=r},5811(e,t,n){"use strict";function r(e){if("function"!=typeof e)throw new TypeError("Argument to promisify must be a function");var t=e["__ES6-PROMISIFY--CUSTOM-ARGUMENTS__"],n=r.Promise||Promise;if("function"!=typeof n)throw new Error("No Promise implementation found; do you need a polyfill?");return function(){for(var r=arguments.length,o=Array(r),i=0;i<r;i++)o[i]=arguments[i];return new n((n,r)=>{o.push(function(e){if(e)return r(e);for(var o=arguments.length,i=Array(1<o?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];if(1===i.length||!t)return n(i[0]);var s={};i.forEach((e,n)=>{var r=t[n];r&&(s[r]=e)}),n(s)}),e.apply(this,o)})}}n.d(t,{F:()=>r}),r.argumentNames="__ES6-PROMISIFY--CUSTOM-ARGUMENTS__",r.Promise=void 0},5879(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g,t.matchToToken=function(e){var t={type:"invalid",value:e[0],closed:void 0};return e[1]?(t.type="string",t.closed=!(!e[3]&&!e[4])):e[5]?t.type="comment":e[6]?(t.type="comment",t.closed=!!e[7]):e[8]?t.type="regex":e[9]?t.type="number":e[10]?t.type="name":e[11]?t.type="punctuator":e[12]&&(t.type="whitespace"),t}},5880(e){"use strict";e.exports=Math.pow},6037(e,t,n){"use strict";n.r(t),n.d(t,{ajax:()=>l,getIdBySrc:()=>c,put:()=>u});var r=n(2515),o=n(1115),i=n(7411),a=n(9168),s=n(3543);function c(e){if(!r.string(e))return;e.includes(":")&&(e+="-join");const t=e.lastIndexOf("/")+1,n=e.substr(e,t);return e.replace(n,"").replace(/\./g,"-")}const l=e=>{const t=e,n=r.object(t.data),i=r.array(t.data),c="arraybuffer"===r(t.data),l=t.type||t.method||"GET",{headers:u={}}=t,f=new XMLHttpRequest;f.open(l,t.url,!0);for(const e of Object.keys(u)){const t=u[e];f.setRequestHeader(e,t)}let d;t.responseType&&(f.responseType=t.responseType),!c&&n||i?d=o.stringify(t.data):({data:d}=t),f.onreadystatechange=e=>{const n=e.target;if(n.readyState!==n.DONE)return;s.clearProgress();const r=n.getResponseHeader("content-type");if(200!==n.status)return a(t.error,n);const i="text"!==t.dataType,c=r.includes("application/json");let l=n.response;r&&c&&i&&(l=o.parse(n.response)||n.response),a(t.success,l,n.statusText,n)},f.send(d)},u=(e,t)=>{const n=i(),r=new XMLHttpRequest;return e=encodeURI(e).replace(/#/g,"#"),r.open("put",e,!0),r.upload.onprogress=e=>{if(!e.lengthComputable)return;const t=e.loaded/e.total*100,r=Math.round(t);n.emit("progress",r)},r.onreadystatechange=()=>{if(r.readyState!==r.DONE)return;if(200===r.status)return n.emit("progress",100),n.emit("end");const e=Error(r.responseText);n.emit("error",e)},r.send(t),n}},6088(e,t,n){"use strict";n.r(t),n.d(t,{escapeRegExp:()=>i,findObjByNameInArr:()=>c,getExt:()=>s,getRegExp:()=>a,time:()=>l,timeEnd:()=>u});var r=n(9168);const o=e=>"string"==typeof e,i=e=>(o(e)&&(e=e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),e),a=e=>{const t=`^${e.replace(/\./g,"\\.").replace(/\*/g,".*").replace("?",".?")}$`;return RegExp(t)},s=e=>{if(!o(e))return"";const t=e.lastIndexOf(".");return~t?e.substr(t):""},c=(e,t)=>{let n;if(!Array.isArray(e))throw Error("array should be array!");if(!o(t))throw Error("name should be string!");return e.some(e=>{const r=e.name===t,o=Array.isArray(e);return r?(n=e,r):o?e.some(e=>{const r=e.name===t;return r&&(n=e.data),r}):r}),n},l=e=>{r.ifExist(console,"time",[e])},u=e=>{r.ifExist(console,"timeEnd",[e])}},6188(e){"use strict";e.exports=Math.max},6439(e,t,n){"use strict";CloudCmd.EditNamesVim=t;const r=n(9227),{Key:o}=CloudCmd,i={bindKeys:!1,beforeClose:()=>{r.rmKey(s),CloudCmd.EditNames.isChanged()}};function a(){CloudCmd.Edit.hide()}function s(e){const{keyCode:t,shiftKey:n}=e;n&&t===o.ESC&&(e.preventDefault(),a())}e.exports.init=async()=>{await CloudCmd.EditNames()},e.exports.show=()=>{r.addKey(s),CloudCmd.EditNames.show(i).getEditor().setKeyMap("vim")},e.exports.hide=a},6536(e,t,n){"use strict";var r=n(1597),o=n(5811),i=n(980),a=n(407),s=n(1256),c=n(8453),l=n(6088);function u(){return h}const f=s.js,d="Edit";CloudCmd[d]={init:async function(){const e=function(){const e=a("div",{style:r`
|
|
1
|
+
(globalThis.webpackChunkcloudcmd=globalThis.webpackChunkcloudcmd||[]).push([[267,547],{41(e,t,n){"use strict";var r=n(655),o=n(8068),i=n(9675),a=n(5795);e.exports=function(e,t,n){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],f=!!a&&a(e,t);if(r)r(e,t,{configurable:null===l&&f?f.configurable:!l,enumerable:null===s&&f?f.enumerable:!s,value:n,writable:null===c&&f?f.writable:!c});else{if(!u&&(s||c||l))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},76(e){"use strict";e.exports=Function.prototype.call},112(e,t,n){"use strict";const{tryToCatch:r}=n(980),o=Promise.all.bind(Promise);e.exports=async e=>{const[t,n=[]]=await r(o,e);return[t,...n]}},381(e,t,n){"use strict";var r=n(3543);const{CloudCmd:o}=globalThis;o.Help={init:function(){r.show.load("top")},show:function(){o.Markdown.show("/HELP.md",{positionLoad:"top",relative:!0})},hide:function(){o.View.hide()}}},407(e,t,n){"use strict";const r=n(4299),o=r((e,t,n)=>e.setAttribute(n,t[n])),i=r((e,t,n)=>e[n]=t[n]),a=r((e,t)=>!e(t)),s=e=>e!=e.toLowerCase();function c(e){var t;if(e)return t=e,document.querySelector(`[data-name="${t}"]`)}e.exports=(e,t={})=>{const{dataName:n,notAppend:r,parent:l=document.body,uniq:u=!0,...f}=t,d=c(n);if(u&&d)return d;const p=document.createElement(e);return n&&(p.dataset.name=n),Object.keys(f).filter(s).map(i(p,t)),Object.keys(f).filter(a(s)).map(o(p,t)),r||l.appendChild(p),p},e.exports.isElementPresent=c},414(e){"use strict";e.exports=Math.round},453(e,t,n){"use strict";var r,o=n(9612),i=n(9383),a=n(1237),s=n(9290),c=n(9538),l=n(8068),u=n(9675),f=n(5345),d=n(1514),p=n(8968),m=n(6188),h=n(8002),g=n(5880),y=n(414),C=n(3093),w=Function,b=function(e){try{return w('"use strict"; return ('+e+").constructor;")()}catch(e){}},v=n(5795),D=n(655),x=function(){throw new u},E=v?function(){try{return x}catch(e){try{return v(arguments,"callee").get}catch(e){return x}}}():x,O=n(4039)(),S=n(3628),A=n(1064),P=n(8648),M=n(1002),F=n(76),k={},j="undefined"!=typeof Uint8Array&&S?S(Uint8Array):r,T={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":O&&S?S([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":k,"%AsyncGenerator%":k,"%AsyncGeneratorFunction%":k,"%AsyncIteratorPrototype%":k,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":"undefined"==typeof Float16Array?r:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":w,"%GeneratorFunction%":k,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":O&&S?S(S([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&O&&S?S((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":o,"%Object.getOwnPropertyDescriptor%":v,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":s,"%ReferenceError%":c,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&O&&S?S((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":O&&S?S(""[Symbol.iterator]()):r,"%Symbol%":O?Symbol:r,"%SyntaxError%":l,"%ThrowTypeError%":E,"%TypedArray%":j,"%TypeError%":u,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":f,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet,"%Function.prototype.call%":F,"%Function.prototype.apply%":M,"%Object.defineProperty%":D,"%Object.getPrototypeOf%":A,"%Math.abs%":d,"%Math.floor%":p,"%Math.max%":m,"%Math.min%":h,"%Math.pow%":g,"%Math.round%":y,"%Math.sign%":C,"%Reflect.getPrototypeOf%":P};if(S)try{null.error}catch(e){var N=S(S(e));T["%Error.prototype%"]=N}var I=function e(t){var n;if("%AsyncFunction%"===t)n=b("async function () {}");else if("%GeneratorFunction%"===t)n=b("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=b("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&S&&(n=S(o.prototype))}return T[t]=n,n},R={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},B=n(6743),$=n(9957),_=B.call(F,Array.prototype.concat),L=B.call(M,Array.prototype.splice),U=B.call(F,String.prototype.replace),V=B.call(F,String.prototype.slice),z=B.call(F,RegExp.prototype.exec),W=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,K=/\\(\\)?/g,H=function(e,t){var n,r=e;if($(R,r)&&(r="%"+(n=R[r])[0]+"%"),$(T,r)){var o=T[r];if(o===k&&(o=I(r)),void 0===o&&!t)throw new u("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new l("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new u('"allowMissing" argument must be a boolean');if(null===z(/^%?[^%]*%?$/,e))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=V(e,0,1),n=V(e,-1);if("%"===t&&"%"!==n)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new l("invalid intrinsic syntax, expected opening `%`");var r=[];return U(e,W,function(e,t,n,o){r[r.length]=n?U(o,K,"$1"):t||e}),r}(e),r=n.length>0?n[0]:"",o=H("%"+r+"%",t),i=o.name,a=o.value,s=!1,c=o.alias;c&&(r=c[0],L(n,_([0,1],c)));for(var f=1,d=!0;f<n.length;f+=1){var p=n[f],m=V(p,0,1),h=V(p,-1);if(('"'===m||"'"===m||"`"===m||'"'===h||"'"===h||"`"===h)&&m!==h)throw new l("property names with quotes must have matching quotes");if("constructor"!==p&&d||(s=!0),$(T,i="%"+(r+="."+p)+"%"))a=T[i];else if(null!=a){if(!(p in a)){if(!t)throw new u("base intrinsic for "+e+" exists, but the property is not available.");return}if(v&&f+1>=n.length){var g=v(a,p);a=(d=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:a[p]}else d=$(a,p),a=a[p];d&&!s&&(T[i]=a)}}return a}},459(e,t,n){"use strict";CloudCmd.Contact=t;const r=n(1362),o=n(3543),{Events:i}=DOM,{Key:a}=CloudCmd;function s(){a.unsetBind(),o.hide(),r("api.box.expand")}function c(){a.setBind(),r("api.box.hide")}function l({keyCode:e}){e===a.ESC&&c()}e.exports.show=s,e.exports.hide=c,e.exports.init=()=>{i.addKey(l),r.identify("6216-545-10-4223"),r("api.box.onExpand",s),r("api.box.onShow",s),r("api.box.onShrink",c)}},487(e,t,n){"use strict";var r=n(6897),o=n(655),i=n(3126),a=n(2205);e.exports=function(e){var t=i(arguments),n=e.length-(arguments.length-1);return r(t,1+(n>0?n:0),!0)},o?o(e.exports,"apply",{value:a}):e.exports.apply=a},507(e,t,n){"use strict";n.r(t),n.d(t,{Config:()=>w,Markdown:()=>b,copy:()=>m,createDirectory:()=>d,extract:()=>g,move:()=>y,pack:()=>h,patch:()=>u,read:()=>p,remove:()=>l,rename:()=>C,write:()=>f});var r=n(980),o=n(8553),i=n(3543),a=n(1849),s=n(3636);const c=e=>async(...t)=>{const[n,s]=await(0,r.tryToCatch)(e,...t);if(!n)return[n,s];const c=(0,a.l)(n.message);return i.show.error(c),o.alert(c),[n,s]},l=c(s.remove),u=c(s.patch),f=c(s.write),d=c(s.createDirectory),p=c(s.read),m=c(s.copy),h=c(s.pack),g=c(s.extract),y=c(s.move),C=c(s.rename),w={read:c(s.Config.read),write:c(s.Config.write)},b={read:c(s.Markdown.read),render:c(s.Markdown.render)}},537(e,t,n){var r=n(5606),o=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n},i=/%[sdj%]/g;t.format=function(e){if(!w(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(l(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,o=r.length,a=String(e).replace(i,function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n<o;s=r[++n])y(s)||!D(s)?a+=" "+s:a+=" "+l(s);return a},t.deprecate=function(e,n){if(void 0!==r&&!0===r.noDeprecation)return e;if(void 0===r)return function(){return t.deprecate(e,n).apply(this,arguments)};var o=!1;return function(){if(!o){if(r.throwDeprecation)throw new Error(n);r.traceDeprecation?console.trace(n):console.error(n),o=!0}return e.apply(this,arguments)}};var a={},s=/^$/;if(r.env.NODE_DEBUG){var c=r.env.NODE_DEBUG;c=c.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),s=new RegExp("^"+c+"$","i")}function l(e,n){var r={seen:[],stylize:f};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),g(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),d(r,e,r.depth)}function u(e,t){var n=l.styles[t];return n?"["+l.colors[n][0]+"m"+e+"["+l.colors[n][1]+"m":e}function f(e,t){return e}function d(e,n,r){if(e.customInspect&&n&&O(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return w(o)||(o=d(e,o,r)),o}var i=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(w(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return C(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):y(t)?e.stylize("null","null"):void 0}(e,n);if(i)return i;var a=Object.keys(n),s=function(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),E(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return p(n);if(0===a.length){if(O(n)){var c=n.name?": "+n.name:"";return e.stylize("[Function"+c+"]","special")}if(v(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(x(n))return e.stylize(Date.prototype.toString.call(n),"date");if(E(n))return p(n)}var l,u="",f=!1,D=["{","}"];return h(n)&&(f=!0,D=["[","]"]),O(n)&&(u=" [Function"+(n.name?": "+n.name:"")+"]"),v(n)&&(u=" "+RegExp.prototype.toString.call(n)),x(n)&&(u=" "+Date.prototype.toUTCString.call(n)),E(n)&&(u=" "+p(n)),0!==a.length||f&&0!=n.length?r<0?v(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),l=f?function(e,t,n,r,o){for(var i=[],a=0,s=t.length;a<s;++a)M(t,String(a))?i.push(m(e,t,n,r,String(a),!0)):i.push("");return o.forEach(function(o){o.match(/^\d+$/)||i.push(m(e,t,n,r,o,!0))}),i}(e,n,r,s,a):a.map(function(t){return m(e,n,r,s,t,f)}),e.seen.pop(),function(e,t,n){return e.reduce(function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(l,u,D)):D[0]+u+D[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function m(e,t,n,r,o,i){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),M(r,o)||(a="["+o+"]"),s||(e.seen.indexOf(c.value)<0?(s=y(n)?d(e,c.value,null):d(e,c.value,n-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map(function(e){return" "+e}).join("\n").slice(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),b(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function h(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function y(e){return null===e}function C(e){return"number"==typeof e}function w(e){return"string"==typeof e}function b(e){return void 0===e}function v(e){return D(e)&&"[object RegExp]"===S(e)}function D(e){return"object"==typeof e&&null!==e}function x(e){return D(e)&&"[object Date]"===S(e)}function E(e){return D(e)&&("[object Error]"===S(e)||e instanceof Error)}function O(e){return"function"==typeof e}function S(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!a[e])if(s.test(e)){var n=r.pid;a[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else a[e]=function(){};return a[e]},t.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=n(9032),t.isArray=h,t.isBoolean=g,t.isNull=y,t.isNullOrUndefined=function(e){return null==e},t.isNumber=C,t.isString=w,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=v,t.types.isRegExp=v,t.isObject=D,t.isDate=x,t.types.isDate=x,t.isError=E,t.types.isNativeError=E,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(1135);var P=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function M(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(n=[A((e=new Date).getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":"),[e.getDate(),P[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(6698),t._extend=function(e,t){if(!t||!D(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var F="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function k(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(F&&e[F]){var t;if("function"!=typeof(t=e[F]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,F,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise(function(e,r){t=e,n=r}),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push(function(e,r){e?n(e):t(r)});try{e.apply(this,o)}catch(e){n(e)}return r}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),F&&Object.defineProperty(t,F,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,o(e))},t.promisify.custom=F,t.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function t(){for(var t=[],n=0;n<arguments.length;n++)t.push(arguments[n]);var o=t.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,a=function(){return o.apply(i,arguments)};e.apply(this,t).then(function(e){r.nextTick(a.bind(null,null,e))},function(e){r.nextTick(k.bind(null,e,a))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,o(e)),t}},592(e,t,n){"use strict";var r=n(655),o=function(){return!!r};o.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},608(e,t,n){"use strict";n.d(t,{Z:()=>d});var r=n(9168),o=n(9317),i=n(6037),a=n(8553),s=n(8453),c=n(3543),l=n(4559);const u=o(function(e,t,n,r){const{name:o}=n,a=e+o,{prefixURL:l}=CloudCmd,u=l+s.FS;i.put(u+a,n).on("error",p).on("end",r).on("progress",e=>{const n=(e=>100/e)(t),r=0*n+((e,t,n=100)=>Math.round(e*n/t))(e,100,n);c.show.load("top"),c.setProgress(Math.round(r))})}),f=o(function(e){CloudCmd.refresh({currentName:e})}),d=(e,t)=>{t||(t=e,e=(0,l.getCurrentDirPath)());const n=t.length;if(!n)return;const o=Array.from(t),{name:i}=t[0];(0,r.eachSeries)(o,u(e,n),f(i))};function p({message:e}){(0,a.alert)(e)}},655(e){"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},726(e){"use strict";let t=[];e.exports.add=(e,n,r)=>{t.push([e,n,r])},e.exports.clear=()=>{t=[]},e.exports.get=()=>t},740(e,t,n){"use strict";n.r(t),n.d(t,{clear:()=>l,get:()=>s,getJson:()=>c,remove:()=>u,set:()=>i,setJson:()=>a});const{parse:r,stringify:o}=JSON,i=(e,t)=>{localStorage.setItem(e,t)},a=(e,t)=>{localStorage.setItem(e,o(t))},s=e=>localStorage.getItem(e),c=e=>{const t=localStorage.getItem(e);return r(t)},l=()=>{localStorage.clear()},u=e=>{localStorage.removeItem(e)}},806(e,t,n){"use strict";n.r(t),n.d(t,{get:()=>d});var r=n(2515),o=n(5811),i=n(6037),a=n(507);const s={},c="view/media-tmpl|config-tmpl|upload",l="/tmpl/",u=/^(8(|00|58)|531|635|650|795)$/.test(n.j)?`${l}fs/`:null,f=function(){let e;return t=>{e||(e=!0,setTimeout(()=>{e=!1,t()},2e3))}}(),d=/^(8(|00|58)|531|635|650|795)$/.test(n.j)?function e(t){const n=r(t);return function(e){if(!e)throw Error("name could not be empty!")}(t),"string"===n?function(e){const t=RegExp("file|path|link|pathLink|media|"+c),n=RegExp("config|modules"),r=t.test(e),o=n.test(e);if(!r&&!o)return function(e){throw Error(`Wrong file name: ${e}`)}(e);if("config"===e)return m();const i=function(e,t,n){let r;const o=RegExp(c).test(e);return t?(r=o?l+e.replace("-tmpl",""):u+e,r+=".hbs"):n&&(r="/json/"+e+".json"),r}(e,r,o);return p(i)}(t):"array"===n?Promise.all(t.map(e)):void 0}:null,p=(0,o.F)((e,t)=>{const{prefix:n}=CloudCmd;s[e]||(s[e]=new Promise((t,r)=>{const o=n+e;i.ajax({url:o,success:t,error:r})})),s[e].then(e=>{t(null,e)},n=>{s[e]=null,t(n)})}),m=async()=>{let e;s.config||(s.config=()=>(e=!0,a.Config.read()));const[,t]=await s.config();return t&&(e=!1),f(()=>{e||(s.config=null)}),t}},887(e,t,n){const{fullstore:r}=n(8328);e.exports=r,e.exports.fullstore=r},975(e){"use strict";e.exports=(e,t)=>{(function(e,t){const n={}.toString.call(e);if(e&&"[object Date]"!==n)throw Error("date should be Date!");if(t&&"object"!=typeof t)throw Error("options should be object!")})(e=e||new Date,t),t||(t={});const{sep:n=".",order:r="big"}=t;let o=e.getDate(),i=e.getMonth()+1;const a=e.getFullYear();switch(i<=9&&(i="0"+i),o<=9&&(o="0"+o),r){case"big":return[a,i,o].join(n);case"middle":return[i,o,a].join(n);case"little":return[o,i,a].join(n);default:throw Error('order could be "big", "middle" and "little" only!')}}},980(e,t,n){"use strict";n.r(t),n.d(t,{tryToCatch:()=>r});const r=async(e,...t)=>{!function(e){if("function"!=typeof e)throw Error("fn should be a function!")}(e);try{return[null,await e(...t)]}catch(e){return[e]}}},1e3(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isIdentifierChar",{enumerable:!0,get:function(){return r.isIdentifierChar}}),Object.defineProperty(t,"isIdentifierName",{enumerable:!0,get:function(){return r.isIdentifierName}}),Object.defineProperty(t,"isIdentifierStart",{enumerable:!0,get:function(){return r.isIdentifierStart}}),Object.defineProperty(t,"isKeyword",{enumerable:!0,get:function(){return o.isKeyword}}),Object.defineProperty(t,"isReservedWord",{enumerable:!0,get:function(){return o.isReservedWord}}),Object.defineProperty(t,"isStrictBindOnlyReservedWord",{enumerable:!0,get:function(){return o.isStrictBindOnlyReservedWord}}),Object.defineProperty(t,"isStrictBindReservedWord",{enumerable:!0,get:function(){return o.isStrictBindReservedWord}}),Object.defineProperty(t,"isStrictReservedWord",{enumerable:!0,get:function(){return o.isStrictReservedWord}});var r=n(1102),o=n(3115)},1002(e){"use strict";e.exports=Function.prototype.apply},1064(e,t,n){"use strict";var r=n(9612);e.exports=r.getPrototypeOf||null},1102(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIdentifierChar=u,t.isIdentifierName=function(e){let t=!0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(55296==(64512&r)&&n+1<e.length){const t=e.charCodeAt(++n);56320==(64512&t)&&(r=65536+((1023&r)<<10)+(1023&t))}if(t){if(t=!1,!l(r))return!1}else if(!u(r))return!1}return!t},t.isIdentifierStart=l;let n="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",r="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";const o=new RegExp("["+n+"]"),i=new RegExp("["+n+r+"]");n=r=null;const a=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],s=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239];function c(e,t){let n=65536;for(let r=0,o=t.length;r<o;r+=2){if(n+=t[r],n>e)return!1;if(n+=t[r+1],n>=e)return!0}return!1}function l(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&o.test(String.fromCharCode(e)):c(e,a)))}function u(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&i.test(String.fromCharCode(e)):c(e,a)||c(e,s))))}},1113(e,t,n){"use strict";const r=n(2121),o=n(4299)((e,t)=>t.includes(e)),i=r(e=>e&&e.length,[function(e,t){const n=e.split("").join(".*")+".*",r=RegExp(`^${n}$`,"i"),o=r.test.bind(r);return t.filter(o)},function(e,t){return t.filter(o(e))}]);e.exports=(e,t)=>(function(e,t){if("string"!=typeof e)throw Error("pattern should be string!");if(!Array.isArray(t))throw Error("list should be an array!")}(e,t),i(e,t)||[])},1115(e,t,n){"use strict";const r=n(2960),{parse:o,stringify:i}=JSON;e.exports.parse=(...e)=>{const[,t]=r(o,...e);return t},e.exports.stringify=(...e)=>{const[,t]=r(i,...e);return t}},1135(e){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},1237(e){"use strict";e.exports=EvalError},1256(e,t,n){"use strict";const{promisify:r}=n(5450),o=n(407),i=()=>{},a=(e,t,n)=>{e.addEventListener(t,r=>{n(r),e.removeEventListener(t,n)})},s=async e=>{switch(function(e){let t,n="";return"string"==typeof e&&(t=e.lastIndexOf("."),~t&&(n=e.substr(t))),n}(e)){case".js":return await s.js(e);case".css":return await s.css(e);case".json":return await s.json(e);default:return await s.ajax(e)}};function c(e){if("string"!=typeof e)return"";~e.indexOf(":")&&(e+="-join");const t=e.lastIndexOf("/")+1,n=e.substr(e,t);return e.replace(n,"").replace(/\./g,"-")}s.onerror=i,s.onload=i,s.addLoadListener=e=>{s.onload=e},s.addErrorListener=e=>{s.onerror=e},e.exports=s,s.js=r((e,t)=>{const n=c(e);let r=document.getElementById(n);if(r)return t();r=o("script",{id:n,src:e}),a(r,"load",e=>{t(null,e),s.onload()}),a(r,"error",n=>{t(n),document.body.removeChild(r),s.onerror(n,e)})}),s.css=r((e,t)=>{const n=c(e);let r=document.getElementById(n);if(r)return t();r=o("link",{id:c(e),rel:"stylesheet",href:e,parent:document.head}),r.addEventListener("load",e=>{t(null,e),s.onload()}),r.addEventListener("error",n=>{t(n),document.head.removeChild(r),s.onerror(n,e)})}),s.ajax=r((e,t)=>{const n=new XMLHttpRequest;n.open("GET",e,!0),n.addEventListener("load",()=>{if(n.status>=200&&n.status<400){const e=n.responseText;t(null,e),s.onload()}}),n.addEventListener("error",e=>{s.onerror(e),t(e)}),n.send()}),s.json=r((e,t)=>{s.ajax(e,(e,n)=>{let r;e||(r=JSON.parse(n)),t(e,r)})}),s.series=async e=>{const t=e.shift();t&&(await s(t),await s.series(e))},s.parallel=async e=>{const t=e.map(s);return await Promise.all(t)},s.getIdBySrc=c},1333(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(var r in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},1362(e){"use strict";const t="static.olark.com/jsclient/loader.js";if(!window.olark){const e=document.createElement("script"),[n]=document.getElementsByTagName("script");e.async=1,e.src="//"+t,n.parentNode.insertBefore(e,n);const r=window.olark=(...e)=>{o.s.push(e),o.t.push(Number(new Date))};r.extend=(e,t)=>{r("extend",e,t)},r.identify=e=>{r("identify",o.i=e)},r.configure=(e,t)=>{r("configure",e,t),o.c[e]=t};const o=r._={s:[],t:[Number(new Date)],c:{},l:t}}e.exports=window.olark},1514(e){"use strict";e.exports=Math.abs},1597(e){"use strict";function t(e){let t=0;const{length:n}=e;for(;t<n&&" "===e[t];)++t;return t}e.exports=(e,...n)=>{const r=function(e,t){const n=[],r=e.length+t.length;let o=0;for(let i=0;i<r;i++){const r=i%2?t.shift():e[o++];n.push(r)}return n.join("")}(e,n),o=r.split("\n").slice(1,-1);if(!o.length)return"";const[i]=o,a=t(i),s=[];for(const e of o){const n=t(e);n<a?s.push(e.slice(n)):s.push(e.slice(a))}return s.join("\n")}},1632(e,t,n){"use strict";var r=n(9227);const{CloudCmd:o}=globalThis;o.EditNamesVim={init:async function(){await o.EditNames()},show:function(){r.addKey(c),o.EditNames.show(a).getEditor().setKeyMap("vim")},hide:s};const{Key:i}=o,a={bindKeys:!1,beforeClose:()=>{r.rmKey(c),o.EditNames.isChanged()}};function s(){o.Edit.hide()}function c(e){const{keyCode:t,shiftKey:n}=e;n&&t===i.ESC&&(e.preventDefault(),s())}},1730(e,t,n){"use strict";e.exports.addSlashToEnd=e=>{if(!e)throw Error("path could not be empty!");return"/"===e[e.length-1]?e:`${e}/`},e.exports.size=e=>{const t=1024,n=1048576,r=n*t,o=r*t,i=o*t;return"number"==typeof e?e<t?e+"b":e<n?(e/t).toFixed(2)+"kb":e<r?(e/n).toFixed(2)+"mb":e<o?(e/r).toFixed(2)+"gb":e<i?(e/o).toFixed(2)+"tb":(e/i).toFixed(2)+"pb":e},e.exports.permissions=n(2234)},1795(e){"use strict";const t=[()=>()=>{},e=>(...t)=>e(...t),(e,t)=>(...n)=>e(t(...n)),(e,t,n)=>(...r)=>e(t(n(...r))),(e,t,n,r)=>(...o)=>e(t(n(r(...o)))),(e,t,n,r,o)=>(...i)=>e(t(n(r(o(...i))))),(e,t,n,r,o,i)=>(...a)=>e(t(n(r(o(i(...a)))))),(e,t,n,r,o,i,a)=>(...s)=>e(t(n(r(o(i(a(...s)))))))];e.exports=(...e)=>e.length<t.length?t[e.length](...e):function(e){return(...t)=>{let n=e.length-1,r=e[n](...t);for(;--n;)r=e[n](r);return r}}(e)},1825(e,t,n){"use strict";n.r(t)},1849(e,t,n){"use strict";n.d(t,{D:()=>a,l:()=>i});const r={"<":"<",">":">",""":'"'},o=Object.keys(r),i=e=>{for(const t of o){const n=RegExp(r[t],"g");e=e.replace(n,t)}return e},a=e=>{for(const t of o){const n=r[t],o=RegExp(t,"g");e=e.replace(o,n)}return e}},2121(e,t,n){"use strict";const r=n(4299),o=n(1795),i=n(7023),a=r((e,t)=>e(t)),s=e=>e,c=r((e,t)=>t(...e));e.exports=function(e,t){t||(t=e,e=s),function(e,t){if("function"!=typeof e)throw Error("condition should be function!");if(!Array.isArray(t))throw Error("filters should be an array!");!function(e,t){const n=i(e=>{throw Error(`fn should be ${e}!`)},e),r=i((e,t)=>e!==t,e);if(!t.length)return n(e);t.map(e=>typeof e).filter(r).forEach(n)}("function",t)}(e,t);const n=function(e){let t;return n=>{let r;return e(n)?t=r=n:(r=t,t=null),r}}(e),r=i(o,e,n),l=t.map(a(r)).reverse();return(...e)=>(l.some(c(e)),n())}},2205(e,t,n){"use strict";var r=n(6743),o=n(1002),i=n(3144);e.exports=function(){return i(r,o,arguments)}},2234(e,t,n){"use strict";const r=n(4299),o={name:"r",value:4},i={name:"w",value:2},a={name:"x",value:1},s=r((e,t)=>e&t.value?t.name:"-"),c=r((e,t)=>[o,i,a].map(e(t)).join(""));e.exports.symbolic=e=>{if(void 0===e)return"";const t=e.slice(-3);return[Number(t[0]).toString(2),Number(t[1]).toString(2),Number(t[2]).toString(2)].map(c(s)).join(" ")},e.exports.numeric=e=>{if(!e||11!==e.length)throw Error('permissions should be in format "xxx xxx xxx"');return"00"+(("r"===e[0]?4:0)+("w"===e[1]?2:0)+("x"===e[2]?1:0))+(("r"===e[4]?4:0)+("w"===e[5]?2:0)+("x"===e[6]?1:0))+(("r"===e[8]?4:0)+("w"===e[9]?2:0)+("x"===e[10]?1:0))}},2503(e,t,n){"use strict";var r={};n.r(r),n.d(r,{init:()=>oe,initKeysPanel:()=>le,setOnPanel:()=>ue}),n(5606);var o=n(9317),i=n(1256),a=n(6088),s=n(8453),c=n(5670),l=n(980);async function u(e){if(!navigator.serviceWorker)return;const t="https:"===location.protocol,n="localhost"===location.hostname;if(!t&&!n)return;const{serviceWorker:r}=navigator,o=r.register.bind(r),[i,a]=await(0,l.tryToCatch)(o,`${e}/sw.mjs`);return i?null:a}var f=n(8328);const d=(0,f.fullstore)(),{getPanel:p}=c.default,m=(e,t=p())=>{const{sort:n,order:r}=CloudCmd,o=c.default.CurrentInfo,i=t.dataset.name.replace("js-","");e!==d()?r[i]="asc":"asc"===r[i]?r[i]="desc":r[i]="asc",d(e),n[i]=e;const a=i!==o.panelPosition;CloudCmd.refresh({panel:t,noCurrent:a})};var h=n(7411),g=n(6698),y=n(6686),C=n(1730),w=n(3955),b=n(4299),v=n(3543);const D=()=>{const e=DOM.CurrentInfo;return{path:DOM.getCurrentDirPath(),files:(e.files||[]).filter(x).map(E)}},x=e=>".."!==DOM.getCurrentName(e),E=e=>{const t=DOM.getCurrentName(e),n=DOM.getCurrentSize(e),r=DOM.getCurrentOwner(e);return{name:t,size:n,mode:DOM.getCurrentMode(e),owner:r,date:DOM.getCurrentDate(e),type:DOM.getCurrentType(e)}};var O=n(6735),S=n(9227),A=n(4999),P=n(6967);const M=(0,f.fullstore)(""),F=(0,f.fullstore)(!1),k=()=>{F(!1)},j=()=>{M("")},T=()=>{};function N(e){const t="d"===e[0];var n;return t&&(F(!0),e=e.split("").slice(1).join("")),{count:(n=e)?"g"===n?1:parseInt(n):1,isDelete:t,isVisual:F()}}var I=n(1113);const R=(0,f.fullstore)([]),B=(0,f.fullstore)(0);var $=n(3239);const _=(e,t,n={})=>{const r={...{...globalThis.DOM,...globalThis.CloudCmd},...n};((e,t={})=>{const n=M(),r=F(),o=M(n.concat(e)),{escape:i=T,moveNext:a=T,movePrevious:s=T,remove:c=T,copy:l=T,paste:u=T,select:f=T,find:d=T,findNext:p=T,findPrevious:m=T,makeFile:h=T,makeDirectory:g=T,terminal:y=T,edit:C=T}=t;if("Enter"===e)return j();if("Escape"===e)return F(!1),i(),j();if("j"===e||"w"===e){const{count:e,isDelete:t,isVisual:r}=N(n);return!isNaN(e)&&a({count:e,isVisual:r,isDelete:t}),j()}if("k"===e||"b"===e){const{count:e,isDelete:t,isVisual:r}=N(n);return!isNaN(e)&&s({count:e,isVisual:r,isDelete:t}),j()}if("gg"===o||"^"===e){const{isDelete:e,isVisual:t}=N(n);return s({count:1/0,isVisual:t,isDelete:e}),j()}"md"===o?(g(),j()):"tt"===o?(y(),j()):"e"===o?(C(),j()):"mf"===o?(h(),j()):"d"!==e||!F()&&"d"!==n?"G"===e||"$"===e?(a({count:1/0,isVisual:r}),j()):"y"===e?F()?(k(),l(),j()):j():/^p$/i.test(e)?(u(),j()):/^v$/i.test(e)?(F(!F()),f(),j()):"/"===e?(d(),j()):"n"===e?(p(),j()):"N"===e?(m(),j()):" "===e&&j():(k(),c(),j())})(e,L(t,r))},L=(e,t)=>{var n,r;const{Info:o=globalThis.DOM.CurrentInfo,CloudCmd:i=globalThis.CloudCmd,Operation:a,unselectFiles:s,setCurrentFile:c,setCurrentByName:l,getCurrentName:u,prompt:f=globalThis.DOM.Dialog.prompt,preventDefault:d=(null==e||null===(n=e.preventDefault)||void 0===n?void 0:n.bind(e)),stopImmediatePropagation:p=(null==e||null===(r=e.preventDefault)||void 0===r?void 0:r.bind(e)),promptNewFile:m=DOM.promptNewFile,toggleSelectedFile:h,Buffer:g={},createFindNext:y=V,createFindPrevious:C=U,createMakeFile:w=z}=t;return{makeFile:w({promptNewFile:m,preventDefault:d,stopImmediatePropagation:p}),findNext:y({setCurrentByName:l}),findPrevious:C({setCurrentByName:l}),escape:s,remove:()=>{a.show("delete")},makeDirectory:()=>{e.stopImmediatePropagation(),e.preventDefault(),DOM.promptNewDir()},terminal:()=>{i.Terminal.show()},edit:()=>{i.EditFileVim.show()},copy:()=>{g.copy(),s()},select:()=>{const e=o.element;h(e)},paste:g.paste,moveNext:({count:e,isVisual:t,isDelete:n})=>{(0,$.i)("next",{count:e,isVisual:t,isDelete:n},{Info:o,setCurrentFile:c,unselectFiles:s,Operation:a})},movePrevious:({count:e,isVisual:t,isDelete:n})=>{(0,$.i)("previous",{count:e,isVisual:t,isDelete:n},{Info:o,setCurrentFile:c,unselectFiles:s,Operation:a})},find:async()=>{d();const[,e]=await f("Find","");if(!e)return;const t=o.files.map(u),[n]=((e,t)=>{const n=I(e,t);return R(n),B(0),n})(e,t);l(n)}}},U=(e={})=>()=>{const{setCurrentByName:t}=e;t((()=>{const e=R(),t=function(e,t){return e?--e:t-1}(B(),e.length);return B(t),e[t]})())},V=(e={})=>()=>{const{setCurrentByName:t}=e;t((()=>{const e=R(),t=function(e,t){return e===t-1?0:++e}(B(),e.length);return B(t),e[B()]})())},z=(e={})=>()=>{const{promptNewFile:t,stopImmediatePropagation:n,preventDefault:r}=e;n(),r(),t()},W=(0,f.fullstore)();W([]);const{assign:K}=Object,H=(()=>{let e=!1;return{isBind:()=>e,setBind(){e=!0},unsetBind(){e=!1}}})(),G=K(H,P,{bind:()=>{S.addKey(q,!0),H.setBind()}});async function q(e,t={}){const{config:n=CloudCmd.config,_config:r=CloudCmd._config,switchKey:o=X,vim:i=_}=t,{keyCode:s}=e;if(void 0===e.altKey)return;const c=e.altKey,l=e.ctrlKey,u=e.metaKey,f=s>=P.ZERO&&s<=P.Z,d=/Numpad/.test(e.code),[p,m]=function(e){const{key:t,shift:n,keyCode:r,keyIdentifier:o}=e,i=t||function(e){const t=e.substring(2),n=parseInt(t,16);return String.fromCharCode(n)}(o);return[J(n,r),i]}(e);if(!H.isBind())return;((e,t={})=>{const{_config:n,config:r}=t;e===P.ESC&&n("vim",!r("vim"))})(s,{config:n,_config:r});const h=n("vim");if(!h&&!d&&!c&&!l&&!u&&(f||p))return function(e,t){const n=DOM.CurrentInfo;let r,o=0,i=!1,s=0;const c=(0,a.escapeRegExp)(e),l=new RegExp(`^${c}.*$`,"i"),{files:u}=n,f=t(),d=f.length;for(;s<d&&e===f[s];)s++;s||t([]);const p=o=s;var m;t(t().concat(e)),DOM.getFilenames(u).filter(e=>l.test(e)).filter((m=e=>".."===e,e=>!m(e))).some(e=>{const t=DOM.getCurrentByName(e);if(!o)return i=!0,DOM.setCurrentFile(t),!0;p===o&&(r=t),--o}),i||(DOM.setCurrentFile(r),t([e]))}(m,W);W([]),await o(e),s>=P.F1&&s<=P.F10||h&&i(m,e)}function J(e,t){switch(t){case P.DOT:return".";case P.HYPHEN:return e?"_":"-";case P.EQUAL:return e?"+":"="}return""}async function X(e){const t=DOM.CurrentInfo;let n,r,o,i,a,s=t.element;const{name:c,panel:l,path:u,isDir:f}=t,{Operation:d,changeDir:p,config:m}=CloudCmd,{keyCode:h}=e,g=e.altKey,y=e.shiftKey,C=e.ctrlKey,w=e.metaKey,b=C||w;switch(s&&(o=s.previousSibling,i=s.nextSibling),h){case P.TAB:DOM.changePanel(),e.preventDefault();break;case P.INSERT:case P.INSERT_MAC:DOM.toggleSelectedFile(s).setCurrentFile(i);break;case P.DELETE:y?d.show("delete:silent"):d.show("delete");break;case P.ASTERISK:DOM.toggleAllSelectedFiles(s);break;case P.PLUS:DOM.expandSelection(),e.preventDefault();break;case P.MINUS:DOM.shrinkSelection(),e.preventDefault();break;case P.F1:CloudCmd.Help.show(),e.preventDefault();break;case P.F2:CloudCmd.UserMenu.show();break;case P.F3:e.preventDefault(),t.isDir?await p(u):y?CloudCmd.View.show(null,{raw:!0}):b?CloudCmd.sortPanel("name"):CloudCmd.View.show();break;case P.F4:m("vim")?CloudCmd.EditFileVim.show():CloudCmd.EditFile.show(),e.preventDefault();break;case P.F5:b?CloudCmd.sortPanel("date"):g?d.show("pack"):d.show("copy"),e.preventDefault();break;case P.F6:b?CloudCmd.sortPanel("size"):y?DOM.renameCurrent(s):d.show("move"),e.preventDefault();break;case P.F7:y?DOM.promptNewFile():DOM.promptNewDir(),e.preventDefault();break;case P.F8:d.show("delete"),e.preventDefault();break;case P.F9:g?d.show("extract"):CloudCmd.Menu.show(),e.preventDefault();break;case P.F10:CloudCmd.Config.show(),e.preventDefault();break;case P.TRA:if(e.preventDefault(),y)return CloudCmd.Terminal.show();CloudCmd.Konsole.show();break;case P.BRACKET_CLOSE:CloudCmd.Konsole.show(),e.preventDefault();break;case P.SPACE:e.preventDefault(),r=!f||".."===c||DOM.isSelected(s),r||await DOM.loadCurrentSize(s),DOM.toggleSelectedFile(s);break;case P.U:b&&(DOM.swapPanels(),e.preventDefault());break;case P.UP:y&&DOM.toggleSelectedFile(s),DOM.setCurrentFile(o),e.preventDefault();break;case P.DOWN:y&&DOM.toggleSelectedFile(s),DOM.setCurrentFile(i),e.preventDefault();break;case P.LEFT:if(!g)return;e.preventDefault(),a=t.panel.getAttribute("data-name"),"js-right"===a&&DOM.duplicatePanel();break;case P.RIGHT:if(!g)return;e.preventDefault(),a=t.panel.getAttribute("data-name"),"js-left"===a&&DOM.duplicatePanel();break;case P.HOME:DOM.setCurrentFile(t.first),e.preventDefault();break;case P.END:DOM.setCurrentFile(t.last),e.preventDefault();break;case P.PAGE_DOWN:for(DOM.scrollByPages(l,1),n=0;n<30&&s.nextSibling;n++)s=s.nextSibling;DOM.setCurrentFile(s),e.preventDefault();break;case P.PAGE_UP:for(DOM.scrollByPages(l,-1),n=0;n<30&&s.previousSibling;n++)s=s.previousSibling;DOM.setCurrentFile(s),e.preventDefault();break;case P.ENTER:t.isDir?await p(u):CloudCmd.View.show();break;case P.BACKSPACE:CloudCmd.goToParentDir(),e.preventDefault();break;case P.BACKSLASH:b&&await p("/");break;case P.A:b&&(DOM.selectAllFiles(),e.preventDefault());break;case P.G:g&&(DOM.goToDirectory(),e.preventDefault());break;case P.M:b&&(m("vim")?CloudCmd.EditNamesVim.show():CloudCmd.EditNames.show(),e.preventDefault());break;case P.P:if(!b)return;e.preventDefault(),O.writeText(t.dirPath).catch(CloudCmd.log);break;case P.R:b&&(CloudCmd.log("reloading page...\n"),CloudCmd.refresh(),e.preventDefault());break;case P.C:b&&A.copy();break;case P.X:b&&A.cut();break;case P.V:b&&A.paste();break;case P.Z:b&&A.clear();break;case P.COLON:CloudCmd.CommandLine.show(),e.preventDefault();break;case P.D:b&&(CloudCmd.log("clearing storage..."),await DOM.Storage.clear(),CloudCmd.log("storage cleared"),e.preventDefault());break;case P.DOT:if(w&&y){const e=!CloudCmd.config("showDotFiles");CloudCmd._config("showDotFiles",e),CloudCmd.refresh(),await DOM.RESTful.Config.write({showDotFiles:e})}}}var Y=n(9168);const Z=e=>{if(!e)return;const{path:t}=e,n=t&&(0,w.A)(t).replace(/.js$/,""),r=e.dobefore;CloudCmd[n]||(CloudCmd[n]=async()=>{Y(r);const{DIR_MODULES:e}=CloudCmd,o=`${e}/${t}.js`;await(0,i.js)(o);const a=async e=>e&&e(),s=CloudCmd[n];return Object.assign(a,s),CloudCmd[n]=a,CloudCmd.log("init",n),await s.init(),a},CloudCmd[n].show=async(...e)=>{CloudCmd.log("show",n,e);const t=CloudCmd[n],[r,o]=await(0,l.tryToCatch)(t);if(!r)return await o.show(...e)})};function Q({DOM:e,Listeners:t}){h.call(this);const n=this,r=e.CurrentInfo,{Storage:o,Files:a}=e;this.log=()=>{},this.prefix="",this.prefixSocket="",this.prefixURL="",this.MIN_ONE_PANEL_WIDTH=e.getCSSVar("min-one-panel-width"),this.HOST=location.origin||location.protocol+"//"+location.host,this.sort={left:"name",right:"name"},this.order={left:"asc",right:"asc"},this.changeDir=async(t,i={})=>{const{isRefresh:a,panel:s,history:c=!0,noCurrent:l,currentName:u}=i,f=a;let p,m;!l&&s&&s!==r.panel&&(e.changePanel(),p=!0),(p||f||!c)&&(m="top"),v.show.load(m,s),await async function(t,i={},a){const{RESTful:s}=e;n.log(`reading dir: "${t}";`);const c=n.config("dirStorage")&&await o.getJson(t),l=i.currentName||r.name,{noCurrent:u,refresh:f}=i;if(!f&&c)return await d(c,a,i);const p=e.getPanelPosition(a),m=n.sort[p],h=n.order[p],g=y("?sort={{ sort }}&order={{ order }}",{sort:m,order:h}),[,C]=await s.read(t+g,"json");C&&(i.sort=m,i.order=h,await d(C,a,i),f&&!u&&e.setCurrentByName(l),n.config("dirStorage")&&o.setJson(t,C))}((0,C.addSlashToEnd)(t),{refresh:f,history:c,noCurrent:l,currentName:u,showDotFiles:n.config("showDotFiles")},s)},this.init=async(r,a)=>{n.prefix=r,n.prefixURL=`${r}${s.apiURL}`,n.prefixSocket=a.prefixSocket,n.DIR_DIST=`${r}/dist`,n.DIR_MODULES=`${this.DIR_DIST}/modules`,n.config=e=>a[e],n.config.if=b((e,t,n)=>a[e]&&t(n)),n._config=(e,t)=>{"password"!==e&&(a[e]=t)},a.oneFilePanel&&(n.MIN_ONE_PANEL_WIDTH=1/0),document.body.scrollIntoViewIfNeeded||await i.js(`${n.DIR_MODULES}/polyfill.js`),await c(),await async function(){const r=e.getFiles();n.on("current-file",e.updateCurrentInfo),n.on("current-name",f);const i=await o.get("current-name"),a=i&&e.getCurrentByName(i)||r[0];r&&e.setCurrentFile(a,{history:!location.hash});const s=e.getCurrentDirPath();t.init(),function(){const e=["left"];return n.config("oneFilePanel")?e:[...e,"right"]}().forEach(t.setOnPanel),t.initKeysPanel(),n.config("dirStorage")&&(await o.get(s)||await o.setJson(s,D()))}(),n.route(location.hash)},this.route=t=>{const r=t.split("/");if(!t)return;const[o]=r,i=(0,w.A)(o.slice(1)).replace(/.js$/,""),[,a]=r,c=e.getCurrentByName(a);if(a&&!c){const e=(0,s.formatMsg)("set current file",a,"error");return void n.log(e)}e.setCurrentFile(c),n.execFromModule(i,"show")},this.logOut=async()=>{const t=n.prefix+"/logout",{prefix:r}=n;await e.Storage.clear(),async function(e){const t=await u(e);null==t||t.unregister(e)}(r),e.load.ajax({url:t,error:()=>document.location.reload()})};const c=async()=>{n.Key=G,n.Key.bind();const[,e]=await(0,l.tryToCatch)(a.get,"modules"),t=v.show.load,r={edit:t,menu:t},o=(e,t,n)=>{Z({name:e,path:t,dobefore:n})};if(e)for(const t of e.local)o(null,t,r[t])};async function f(e){await o.set("current-name",e)}async function d(o,i,c){const{history:u,noCurrent:f,showDotFiles:d}=c,[p,[m,h,g,y]]=await(0,l.tryToCatch)(a.get,["file","path","link","pathLink"]);if(p)return e.Dialog.alert(p.responseText);const C=i||e.getPanel(),{prefix:w}=n,{dir:b,name:v}=r,{childNodes:D}=C;let x=D.length;for(;x--;)C.removeChild(C.lastChild);if(C.innerHTML=(0,s.buildFromJSON)({sort:c.sort,order:c.order,data:o,id:C.id,prefix:w,showDotFiles:d,template:{file:m,path:h,pathLink:y,link:g}}),t.setOnPanel(C),!f){let t;".."===v&&"/"!==b&&(t=e.getCurrentByName(b)),t||([t]=e.getFiles(C)),e.setCurrentFile(t,{history:u}),n.emit("active-dir",r.dirPath)}}this.execFromModule=async(e,t,...r)=>{await n[e](),(0,n[e][t])(...r)},this.refresh=async(t={})=>{const{panel:o=r.panel,currentName:i}=t,a=e.getCurrentDirPath(o),s=null==t?void 0:t.noCurrent;await n.changeDir(a,{isRefresh:!0,history:!1,panel:o,noCurrent:s,currentName:i})},this.goToParentDir=async()=>{const{dir:t,dirPath:o,parentDirPath:i,panel:a}=r;if(o===i)return;const s=i;await n.changeDir(s);const c=e.getCurrentByName(t),[l]=e.getFiles(a);e.setCurrentFile(c||l,{history})}}g(Q,h),i.addErrorListener((e,t)=>{const n=`file ${t} could not be loaded`;v.show.error(n)});var ee=n(2515),te=n(608);const ne=b((e,t)=>{const n=e.indexOf(t);return~n?n:0}),re=RegExp(String.fromCharCode(160),"g"),oe=async()=>{!function(){const e=DOM.getFM();S.addOnce("contextmenu",e,e=>{CloudCmd.Menu.show({x:e.clientX,y:e.clientY})}),S.addContextMenu(e,e=>{CloudCmd.Menu.ENABLED||e.preventDefault()})}(),function(){const e=DOM.getByClassAll("panel"),t=({target:e})=>{e.classList.add("selected-panel")},n=({target:e})=>{e.classList.remove("selected-panel")},r=e=>{const{files:t,items:n}=e.dataTransfer,{length:r}=t;if(e.preventDefault(),r&&(!n||!n.length||!n[0].webkitGetAsEntry))return(0,te.Z)(t);const o=Array.from(n).filter(e=>"file"===e.kind);if(o.length)return DOM.uploadDirectory(o);const{Operation:i}=CloudCmd,a=e.shiftKey?"move":"copy";return i.show(a)},o=e=>{const{dataTransfer:t}=e,{effectAllowed:n}=t;/move|linkMove/.test(n)?t.dropEffect="move":t.dropEffect="copy",e.preventDefault()};for(const i of e)S.add("dragover",i,o).add("drop",i,r).add("dragenter",t).add(["dragleave","drop"],n)}(),S.add(["unload","beforeunload"],e=>{const{Key:t}=CloudCmd;if(!(null==t?void 0:t.isBind()))return e.preventDefault(),"Please make sure that you saved all work."}),S.add("popstate",async({state:e})=>{const t=(e||"").replace(s.FS,"");if(!t)return CloudCmd.route(location.hash);await CloudCmd.changeDir(t,{history:!1})}),S.add("resize",()=>{const e=DOM.CurrentInfo;if(!(globalThis.innerWidth<CloudCmd.MIN_ONE_PANEL_WIDTH))return;const{panel:t}=e;t&&("js-left"===t.getAttribute("data-name")||DOM.changePanel())}),function(){const e=DOM.getFM(),t=e=>e.dataset,n=e=>/^js-(left|right)$/.test(e.dataset.name);S.addClick(e,e=>{const r=e.target;if("js-fm-header"!==r.parentElement.dataset.name)return;const o=(r.dataset.name||"").replace("js-","");if(!/^(name|size|date)$/.test(o))return;const i=ce(r).filter(t).filter(n).pop();CloudCmd.sortPanel(o,i)})}(),await async function(){const[,e]=await(0,l.tryToCatch)(DOM.Files.get,"config"),t=null==e?void 0:e.packer;se=DOM.getPackerExt(t)}()},ie=b((e,t)=>{for(const n of e)n(t)}),ae={mousedown:Y.with(de,function(e){const t=DOM.CurrentInfo,n={alt:e.altKey,ctrl:e.ctrlKey,meta:e.metaKey,shift:e.shiftKey},r=pe(e.target),o=t.name;DOM.setCurrentFile(r);const i=t.name;let a=[];n.shift?a=function(e,t){const n=DOM.getAllFiles(),r=DOM.getFilenames(n),o=ne(r);return((e,t,n)=>e<t?n.slice(e,t+1):e>t?n.slice(t,e+1):[n[e]])(o(e),o(t),n)}(o,i):a.push(t.element),0===e.button&&function(e,t){const n=/Mac/.test(globalThis.navigator.platform);if(!e)throw Error("key should not be undefined!");const[r]=t;if(n&&e.meta)return DOM.toggleSelectedFile(r);e.shift&&t.map(DOM.selectFile)}(n,a)}),click:ie([function(e){e.preventDefault(),function(e){const t=DOM.CurrentInfo,{panel:n}=t,r=DOM.getByDataName("js-files",n);(function(e){for(;"UL"!==e.tagName;)e=e.parentElement;return e})(e)!==r&&DOM.changePanel()}(e.target)},Y.with(function(e,t){DOM.getCSSVar("is-mobile")||e(t)},e=>{const t=/Mac/.test(globalThis.navigator.platform),{shiftKey:n,metaKey:r,ctrlKey:o}=e;n||t&&r||o||DOM.unselectFiles()})]),dragstart:Y.with(de,function(e){const t=DOM.CurrentInfo,{prefixURL:n}=CloudCmd,r=pe(e.target),{isDir:o}=t;let i=DOM.getCurrentLink(r),a=DOM.getCurrentName(r);o&&(a+=se,i=document.createElement("a"),i.textContent=a,i.href=n+"/pack"+t.path+se),e.dataTransfer.setData("DownloadURL","application/octet-stream:"+a+":"+i)}),dblclick:Y.with(de,async function(e){e.preventDefault();const t=pe(e.target),n=DOM.isCurrentIsDir(t),r=DOM.getCurrentPath(t);if(!n)return CloudCmd.View.show();await CloudCmd.changeDir(r)}),touchstart:Y.with(de,async function(e){const t=pe(e.target);DOM.isCurrentIsDir(t)&&DOM.isCurrentFile(t)&&await CloudCmd.changeDir(DOM.getCurrentPath(t))})};let se;function ce(e,t=[]){return e?ce(e.parentElement,t.concat(e)):t}const le=()=>{const e=DOM.getById("js-keyspanel");e&&S.addClick(e,e=>{const{target:t}=e,{id:n}=t,r=e=>{const{Operation:t}=CloudCmd;return t.show.bind(null,e)},o={f1:CloudCmd.Help.show,f2:CloudCmd.UserMenu.show,f3:CloudCmd.View.show,f4:CloudCmd.EditFile.show,f5:r("copy"),f6:r("move"),f7:DOM.promptNewDir,f8:r("delete"),f9:()=>{e.stopPropagation(),CloudCmd.Menu.show()},f10:CloudCmd.Config.show,"~":CloudCmd.Konsole.show,"shift~":CloudCmd.Terminal.show,contact:CloudCmd.Contact.show};Y(o[n])})},ue=e=>{const t=(e=>ee.string(e)?DOM.getByDataName(`js-${e}`):e)(e),n=DOM.getByDataName("js-files",t),r=DOM.getByDataName("js-path",t);S.addClick(r,function(e){return fe.bind(null,e)}(t)),S.add(n,ae)};async function fe(e,t){const n=DOM.CurrentInfo;t.preventDefault();const r=t.target,o=r.getAttribute("data-name"),i=function(e){const t=DOM.CurrentInfo.panel;return!t||e.getAttribute("data-name")!==t.getAttribute("data-name")}(e);if("js-copy-path"===o)return a=r,void O.writeText(a.parentElement.title).then(CloudCmd.log).catch(CloudCmd.log);var a;if("js-refresh"===o)return CloudCmd.refresh({panel:e,noCurrent:i});if("js-path-link"!==o)return;const{href:c}=r,l=function(e){const t=CloudCmd.HOST,{prefix:n}=CloudCmd,r=RegExp("^"+n+s.FS);return decodeURI(e).replace(t,"").replace(r,"").replace("%%","%25%").replace(re," ")||"/"}(c);await CloudCmd.changeDir(l,{isRefresh:!1,panel:i?e:n.panel})}function de(e,t){const{target:n}=t,{tagName:r}=n;"UL"!==r&&e(t)}function pe(e){if(!e)return e;for(;"LI"!==e.tagName;)e=e.parentElement;return e}function me(e){return e?e.indexOf("/")?`/${e}`:e:""}globalThis.CloudCmd=async function(e){globalThis.CloudCmd=(({DOM:e,Listeners:t})=>new Q({DOM:e,Listeners:t}))({DOM:c.default,Listeners:r}),globalThis.DOM=c.default,globalThis.Util=a,globalThis.CloudFunc=s,await async function(e){const{prefix:t}=e;((e,...t)=>{null==e||e.addEventListener(...t)})(await u(t),"updatefound",he(e))}(e),(()=>{const{sort:e}=CloudCmd,t=c.default.getPanelPosition();d(e[t])})(),globalThis.CloudCmd.sortPanel=m;const t=me(e.prefix);globalThis.CloudCmd.init(t,e),"aleman"===globalThis.CloudCmd.config("menu")&&setTimeout(()=>{Promise.resolve().then(n.bind(n,1736)),Promise.resolve().then(n.bind(n,3398))},100)};const he=o(async e=>{const{DOM:t}=globalThis,n=me(e.prefix);await i.js(`${n}/dist/cloudcmd.common.js`),await i.js(`${n}/dist/cloudcmd.js`),console.log("cloudcmd: sw: updated"),t.Events.removeAll(),globalThis.CloudCmd(e)})},2515(e){"use strict";e.exports=t;for(const e of["null","arrayBuffer","file","array","object"])t[e]=n.bind(null,e);for(const e of["string","undefined","boolean","number","function"])t[e]=r.bind(null,e);function t(e){return{}.toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function n(e,n){return t(n)===e}function r(e,t){return typeof t===e}},2682(e,t,n){"use strict";var r=n(9600),o=Object.prototype.toString,i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){if(!r(t))throw new TypeError("iterator must be a function");var a,s;arguments.length>=3&&(a=n),s=e,"[object Array]"===o.call(s)?function(e,t,n){for(var r=0,o=e.length;r<o;r++)i.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))}(e,t,a):"string"==typeof e?function(e,t,n){for(var r=0,o=e.length;r<o;r++)null==n?t(e.charAt(r),r,e):t.call(n,e.charAt(r),r,e)}(e,t,a):function(e,t,n){for(var r in e)i.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))}(e,t,a)}},2860(e,t,n){"use strict";var r=n(980),o=n(9168),i=n(1256),a=n(3543),s=n(5670);const c=i.parallel,{CloudCmd:l}=globalThis,{Dialog:u}=s.default,{Key:f,config:d}=globalThis.CloudCmd;let p,m,h;function g(){l.View.hide()}l.Terminal={init:async function(){d("terminal")&&(a.show.load("top"),await l.View(),await(async()=>{const{prefix:e}=l,t=`${y()}/gritty.js`,n=`${e}/dist/terminal.css`,[o]=await(0,r.tryToCatch)(c,[t,n]);if(o){const e=o.target.src.replace(globalThis.location.href,"");return u.alert(`file ${e} could not be loaded`)}p=!0})(),function(){const e={env:C(),prefix:l.prefixSocket+"/gritty",socketPath:l.prefix,fontFamily:"Droid Sans Mono"},{socket:t,terminal:n}=globalThis.gritty(document.body,e);h=t,m=n,m.onKey(({domEvent:e})=>{const{keyCode:t,shiftKey:n}=e;n&&t===f.ESC&&g()}),h.on("connect",o.with(w,t))}())},show:function(){p&&d("terminal")&&l.View.show(m.element,{afterShow:()=>{m.focus()}})},hide:g};const y=()=>l.prefix+"/gritty";const C=()=>({ACTIVE_DIR:s.default.getCurrentDirPath,PASSIVE_DIR:s.default.getNotCurrentDirPath,CURRENT_NAME:s.default.getCurrentName,CURRENT_PATH:s.default.getCurrentPath});function w(e){e.emit("auth",d("username"),d("password")),e.on("reject",()=>{u.alert("Wrong credentials!")})}},2882(e,t,n){"use strict";var r=n(5606),o=n(8633),i=n(5879),a=n(1e3);const s=(e,t)=>n=>e(t(n));function c(e){return{keyword:e.cyan,capitalized:e.yellow,jsxIdentifier:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.gray,invalid:s(s(e.white,e.bgRed),e.bold),gutter:e.gray,marker:s(e.red,e.bold),message:s(e.red,e.bold),reset:e.reset}}const l=c(o.createColors(!0)),u=c(o.createColors(!1));function f(e){return e?l:u}const d=new Set(["as","async","from","get","of","set"]),p=/\r\n|[\n\r\u2028\u2029]/,m=/^[()[\]{}]$/;let h;const g=/^[a-z][\w-]*$/i,y=function(e,t,n){if("name"===e.type){const r=e.value;if(a.isKeyword(r)||a.isStrictReservedWord(r,!0)||d.has(r))return"keyword";if(g.test(r)&&("<"===n[t-1]||"</"===n.slice(t-2,t)))return"jsxIdentifier";const o=String.fromCodePoint(r.codePointAt(0));if(o!==o.toLowerCase())return"capitalized"}return"punctuator"===e.type&&m.test(e.value)?"bracket":"invalid"!==e.type||"@"!==e.value&&"#"!==e.value?e.type:"punctuator"};h=function*(e){let t;for(;t=i.default.exec(e);){const n=i.matchToToken(t);yield{type:y(n,t.index,e),value:n.value}}};const C=/\r\n|[\n\r\u2028\u2029]/;t.gl=function(e,t,n={}){const i=n.forceColor||("object"!=typeof r||"0"!==r.env.FORCE_COLOR&&"false"!==r.env.FORCE_COLOR)&&o.isColorSupported&&n.highlightCode,a=(n.startLine||1)-1,s=f(i),c=e.split(C),{start:l,end:u,markerLines:d}=function(e,t,n,r){const o=Object.assign({column:0,line:-1},e.start),i=Object.assign({},o,e.end),{linesAbove:a=2,linesBelow:s=3}=n||{},c=o.line-r,l=o.column,u=i.line-r,f=i.column;let d=Math.max(c-(a+1),0),p=Math.min(t.length,u+s);-1===c&&(d=0),-1===u&&(p=t.length);const m=u-c,h={};if(m)for(let e=0;e<=m;e++){const n=e+c;if(l)if(0===e){const e=t[n-1].length;h[n]=[l,e-l+1]}else if(e===m)h[n]=[0,f];else{const r=t[n-e].length;h[n]=[0,r]}else h[n]=!0}else h[c]=l===f?!l||[l,0]:[l,f-l];return{start:d,end:p,markerLines:h}}(t,c,n,a),m=t.start&&"number"==typeof t.start.column,g=String(u+a).length;let y=(i?function(e){if(""===e)return"";const t=f(!0);let n="";for(const{type:r,value:o}of h(e))n+=r in t?o.split(p).map(e=>t[r](e)).join("\n"):o;return n}(e):e).split(C,u).slice(l,u).map((e,t)=>{const r=l+1+t,o=` ${` ${r+a}`.slice(-g)} |`,i=d[r],c=!d[r+1];if(i){let t="";if(Array.isArray(i)){const r=e.slice(0,Math.max(i[0]-1,0)).replace(/[^\t]/g," "),a=i[1]||1;t=["\n ",s.gutter(o.replace(/\d/g," "))," ",r,s.marker("^").repeat(a)].join(""),c&&n.message&&(t+=" "+s.message(n.message))}return[s.marker(">"),s.gutter(o),e.length>0?` ${e}`:"",t].join("")}return` ${s.gutter(o)}${e.length>0?` ${e}`:""}`}).join("\n");return n.message&&!m&&(y=`${" ".repeat(g+1)}${n.message}\n${y}`),i?s.reset(y):y}},2960(e){"use strict";e.exports=(e,...t)=>{try{return[null,e(...t)]}catch(e){return[e]}}},2979(e,t,n){"use strict";var r=n(9168),o=n(4299),i=n(980),a=n(1256),s=n(407),c=n(3543);CloudCmd.Konsole={init:async function(){d("console")&&(c.show.load("top"),await CloudCmd.View(),await D(),await b())},show:function(e){g&&d("console")&&CloudCmd.View.show(h,{afterShow:()=>{f.focus(),r(e)}})},hide:function(){CloudCmd.View.hide()}};const{Dialog:l,CurrentInfo:u}=DOM;let f;const{config:d}=CloudCmd,p=o((e,t)=>{return e(`cd ${n=t,n.replace(/\/$/,"")||"/"}`);var n}),m="Konsole";let h,g;const y=()=>CloudCmd.prefix+"/console";async function C(e){u.dirPath!==e&&await CloudCmd.changeDir(e)}const w=()=>{if(d("syncConsolePath"))return u.dirPath},b=async()=>{const e={cwd:w(),env:{ACTIVE_DIR:DOM.getCurrentDirPath.bind(DOM),PASSIVE_DIR:DOM.getNotCurrentDirPath.bind(DOM),CURRENT_NAME:DOM.getCurrentName.bind(DOM),CURRENT_PATH:()=>u.path},prefix:y(),prefixSocket:CloudCmd.prefixSocket+"/console",socketPath:CloudCmd.prefix};h=s("div",{className:"console"}),f=await Console(h,e),f.on("connect",r.with(v,f)),f.on("path",d.if("syncConsolePath",C)),CloudCmd.on("active-dir",d.if("syncConsolePath",p(f.handler))),f.addShortCuts({P:()=>{const e=f.getPromptText(),t=DOM.getCurrentDirPath();f.setPromptText(e+t)}})};function v(e){e.emit("auth",d("username"),d("password")),e.on("reject",()=>{l.alert("Wrong credentials!")})}const D=async()=>{Util.time(`${m} load`);const e=`${y()}/console.js`,[t]=await(0,i.tryToCatch)(a.js,e);if(g=!0,Util.timeEnd(`${m} load`),t)return l.alert(t.message,{cancel:!1})}},3093(e,t,n){"use strict";var r=n(4459);e.exports=function(e){return r(e)||0===e?e:e<0?-1:1}},3115(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isKeyword=function(e){return n.has(e)},t.isReservedWord=i,t.isStrictBindOnlyReservedWord=s,t.isStrictBindReservedWord=function(e,t){return a(e,t)||s(e)},t.isStrictReservedWord=a;const n=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"]),r=new Set(["implements","interface","let","package","private","protected","public","static","yield"]),o=new Set(["eval","arguments"]);function i(e,t){return t&&"await"===e||"enum"===e}function a(e,t){return i(e,t)||r.has(e)}function s(e){return o.has(e)}},3126(e,t,n){"use strict";var r=n(6743),o=n(9675),i=n(76),a=n(3144);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new o("a function is required");return a(r,i,e)}},3144(e,t,n){"use strict";var r=n(6743),o=n(1002),i=n(76),a=n(7119);e.exports=a||r.call(i,o)},3239(e,t,n){"use strict";function r(e,{getCurrentName:t,selectFile:n}=DOM){".."!==t(e)&&n(e)}n.d(t,{i:()=>o});const o=(e,{count:t,isVisual:n,isDelete:o},{Info:i,setCurrentFile:a,unselectFiles:s,Operation:c})=>{let l=i.element;const u=n?r:s;u(l);const f=`${e}Sibling`;for(let e=0;e<t;e++){const e=l[f];if(!e)break;l=e,u(l)}a(l),o&&c.show("delete")}},3543(e,t,n){"use strict";n.r(t),n.d(t,{clearProgress:()=>h,error:()=>f,get:()=>c,hide:()=>p,loading:()=>u,setProgress:()=>m,show:()=>d});var r=n(407);const o="loading",i="hidden",a="error",s=()=>function(){const e=document.createElementNS;if(!e)return!1;const t=e.bind(document)("http://www.w3.org/2000/svg","animate").toString();return/SVGAnimate/.test(t)}()?"-svg":"-gif",c=l;function l(){return r("span",{id:"js-status-image",className:"icon",dataName:"progress",notAppend:!0})}const u=()=>{const e=l(),{classList:t}=e,n=o+s();return t.add(o,n),t.remove(a,i),e},f=()=>{const e=l(),{classList:t}=e,n=o+s();return t.add(a),t.remove(i,o,n),e};function d(e,t){const n=g.loading(),r=n.parentElement,o=DOM.getRefreshButton(t);let i;return"top"===e?i=o.parentElement:(i=DOM.getCurrentFile(),i=i?DOM.getByDataName("js-name",i):o.parentElement),(!r||r&&r!==i)&&i.appendChild(n),DOM.show(n),n}d.load=d,d.error=e=>{const t=g.error();return DOM.show(t),t.title=e,t};const p=()=>{const e=g.get();return DOM.hide(e),g},m=(e,t)=>{const n=g.get();return n?(n.setAttribute("data-progress",`${e}%`),t&&(n.title=t),g):g},h=()=>{const e=g.get();return e?(e.setAttribute("data-progress",""),e.title="",g):g},g={clearProgress:h,setProgress:m,show:d,hide:p,get:c,error:f,loading:u}},3628(e,t,n){"use strict";var r=n(8648),o=n(1064),i=n(7176);e.exports=r?function(e){return r(e)}:o?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return o(e)}:i?function(e){return i(e)}:null},3636(e,t,n){"use strict";n.r(t),n.d(t,{Config:()=>b,Markdown:()=>v,copy:()=>h,createDirectory:()=>p,extract:()=>y,move:()=>C,pack:()=>g,patch:()=>f,read:()=>m,remove:()=>u,rename:()=>w,write:()=>d});var r=n(8453),o=n(5811),i=n(3543),a=n(6037);const s=(0,o.F)((e,t)=>{const n=e,{prefixURL:r}=CloudCmd;n.url=r+n.url,n.url=encodeURI(n.url),n.url=n.url.replace(/#/g,"%23"),a.ajax({method:n.method,url:n.url,data:n.data,dataType:n.dataType,error:e=>{const n=e.responseText,{statusText:r,status:o}=e;t(Error(404===o?n:r))},success:e=>{i.hide(),n.notLog||CloudCmd.log(e),t(null,e)}})});const{assign:c}=Object,l={top:!0},u=async(e,t,n={})=>{const{sendRequest:o=s}=n,i={method:"DELETE",url:r.FS+e,imgPosition:{top:Boolean(t)}};return t&&c(i,{data:t,url:`${i.url}?files`}),await o(i)},f=async(e,t)=>await s({method:"PATCH",url:r.FS+e,data:t,imgPosition:l}),d=async(e,t)=>await s({method:"PUT",url:r.FS+e,data:t,imgPosition:l}),p=async(e,t={})=>{const{sendRequest:n=s}=t;return await n({method:"PUT",url:`${r.FS}${e}?dir`,imgPosition:l})},m=async(e,t="text")=>{const n=!e.includes("?");return await s({method:"GET",url:r.FS+e,notLog:n,dataType:t})},h=async(e,t,n)=>await s({method:"PUT",url:"/copy",data:{from:e,to:t,names:n},imgPosition:l}),g=async e=>await s({method:"PUT",url:"/pack",data:e}),y=async e=>await s({method:"PUT",url:"/extract",data:e}),C=async(e,t,n)=>await s({method:"PUT",url:"/move",data:{from:e,to:t,names:n},imgPosition:l}),w=async(e,t)=>await s({method:"PUT",url:"/rename",data:{from:e,to:t},imgPosition:l}),b={read:async()=>await s({method:"GET",url:"/config",imgPosition:l,notLog:!0}),write:async e=>await s({method:"PATCH",url:"/config",data:e,imgPosition:l})},v={read:async e=>await s({method:"GET",url:`/markdown${e}`,imgPosition:l,notLog:!0}),render:async e=>await s({method:"PUT",url:"/markdown",data:e,imgPosition:l,notLog:!0})}},3850(e,t,n){"use strict";n(4887);const r=n(407),o=n(6727),i=n(8812),a=e=>"number"==typeof e,s=(e,...t)=>(e=>"function"==typeof e)(e)&&e(...t);e.exports=function e(t,n,c){if(!(this instanceof e))return new e(t,n,c);const l=new i;let u,f,d,p,m={};c?(u=p=t,m=n):n?(u=p=t,c=n):(u=document.body,p=window,c=t);const h={},g=function(e){const t=o(e,h,m);return r("ul",{dataName:"js-menu",className:"menu menu-hidden",innerHTML:t,parent:u,uniq:!1})}(c);function y(e,t){let n=l.getItem(e),r=l.isName(n),o=l.isItem(n),i=l.isSubMenu(n);return r&&o||(n=document.elementFromPoint(t.x,t.y),i=l.isSubMenu(n),r=l.isName(n),o=l.isItem(n)),{name:r,item:o,sub:i}}function C(e,t){e.stopPropagation();const{afterClick:n,beforeClick:r,beforeHide:o,afterHide:i,name:a}=m,c=e.target,u=t||y(c,{x:e.clientX,y:e.clientY}),f=s(r,a);if(u.sub)return e.preventDefault();if(s(o),v(),s(i),!f&&(u.name||u.item)){const e=function(e){const t=l.getName(e);if(!t)return null;const n=t.getAttribute("data-menu-path");return h[n]}(c);s(e),s(n)}}function w(e){e.preventDefault();const t=e.target,n=e.clientX,r=e.clientY,o=y(t,{x:n,y:r});if(o.name||o.item||o.sub)return C(e,o);v(),b(n,r)}function b(e,t){const{name:n,beforeShow:r,afterShow:o}=m,i={x:e,y:t,name:n},c=s(r,i);(c||!1!==c)&&(g.classList.remove("menu-hidden"),function(e,t){const n=a(e),r=a(t),o=function(){if(!f){const{height:e}=getComputedStyle(g);f=parseInt(e,10)}return f}(),i=function(){if(!d){const{width:e}=getComputedStyle(g);d=parseInt(e,10)}return d}(),s=window.innerHeight;window.innerWidth<i+e&&(e-=i)<0&&(e=0),s<o+t&&(t-=o)<0&&(t=0),n&&(g.style.left=`${e}px`),r&&(g.style.top=t-14+"px")}(i.x,i.y),s(o,i))}function v(){s(m.beforeClose)||g.classList.add("menu-hidden")}p.addEventListener("click",C),this.show=b,this.hide=v,this.addContextMenuListener=()=>{p.addEventListener("contextmenu",w)},this.removeContextMenuListener=()=>{p.addEventListener("contextmenu",w)},this.remove=function(){p.removeEventListener("click",C),p.removeEventListener("contextmenu",w),u.removeChild(g)}}},3955(e,t,n){"use strict";n.d(t,{A:()=>r});var r=858==n.j?function(e){for(var t=e.split(o),n=t.length,r=new Array(n),i=0;i<n;i++){var a=t[i];""!==a&&(r[i]=a[0].toUpperCase()+a.slice(1))}return r.join("")}:null,o=/[\s\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,\-.\/:;<=>?@\[\]^_`{|}~]+/},4002(e){"use strict";e.exports.MAIN='<ul data-name="js-menu" class="menu menu-hidden">{{ items }}</ul>',e.exports.ITEM='<li data-name="js-menu-item" class="menu-item{{ className }}"{{ attribute }}><label data-menu-path="{{ path }}">{{ name }}</label>{{ subitems }}</li>'},4035(e,t,n){"use strict";var r,o=n(6556),i=n(9092)(),a=n(9957),s=n(5795);if(i){var c=o("RegExp.prototype.exec"),l={},u=function(){throw l},f={toString:u,valueOf:u};"symbol"==typeof Symbol.toPrimitive&&(f[Symbol.toPrimitive]=u),r=function(e){if(!e||"object"!=typeof e)return!1;var t=s(e,"lastIndex");if(!t||!a(t,"value"))return!1;try{c(e,f)}catch(e){return e===l}}}else{var d=o("Object.prototype.toString");r=function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===d(e)}}e.exports=r},4039(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(1333);e.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&o()}},4233(e){"use strict";const t=function*(){}.constructor;e.exports=()=>t},4261(e){"use strict";function t(){if(!(this instanceof t))return new t;this._all={}}function n(e){if("string"!=typeof e)throw Error("event should be string!")}function r(e,t){n(e),function(e){if("function"!=typeof e)throw Error("callback should be function!")}(t)}e.exports=t,t.prototype.on=function(e,t){var n=this._all[e];return r(e,t),n?n.push(t):this._all[e]=[t],this},t.prototype.addListener=t.prototype.on,t.prototype.once=function(e,t){var n=this;return r(e,t),n.on(e,function r(){t.apply(null,arguments),n.off(e,r)}),this},t.prototype.off=function(e,t){var n=this._all[e]||[],o=n.indexOf(t);for(r(e,t);~o;)n.splice(o,1),o=n.indexOf(t);return this},t.prototype.removeListener=t.prototype.off,t.prototype.emit=function(e){var t=[].slice.call(arguments,1),r=this._all[e];if(n(e),!r&&"error"===e)throw t[0];return r?(r.forEach(function(e){e.apply(null,t)}),this):this},t.prototype.removeAllListeners=function(e){return n(e),this._all[e]=[],this}},4299(e){"use strict";const t=(e,...n)=>{if(function(e){if("function"!=typeof e)throw Error("fn should be function!")}(e),n.length>=e.length)return e(...n);const r=(...r)=>t(e,...n,...r),o=e.length-n.length-1,i=(e=>[function(t){return e(...arguments)},function(t,n){return e(...arguments)},function(t,n,r){return e(...arguments)},function(t,n,r,o){return e(...arguments)},function(t,n,r,o,i){return e(...arguments)}])(r)[o];return i||r};e.exports=t},4459(e){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},4559(e,t,n){"use strict";n.r(t),n.d(t,{_CURRENT_FILE:()=>l,_parseHrefAttribute:()=>g,_parseNameAttribute:()=>m,getCurrentByName:()=>x,getCurrentByPosition:()=>S,getCurrentDirName:()=>w,getCurrentDirPath:()=>y,getCurrentFile:()=>D,getCurrentName:()=>f,getCurrentPath:()=>C,getCurrentType:()=>F,getNotCurrentDirPath:()=>v,getParentDirPath:()=>b,isCurrentFile:()=>A,isCurrentIsDir:()=>M,setCurrentByName:()=>O,setCurrentFile:()=>E,setCurrentName:()=>u,setTitle:()=>P});var r=n(407),o=n(8453),i=n(1849);let a;const s="current-file",c=e=>null==e?void 0:e.replace(" "," "),l=/^8(|00|58)$/.test(n.j)?s:null,u=(e,t)=>{const n=DOM.CurrentInfo,{link:r}=n,{prefix:a}=CloudCmd,s=a+o.FS+n.dirPath,c=(0,i.l)(e);return r.title=c,r.href=s+c,r.innerHTML=c,t.setAttribute("data-name",d(e)),CloudCmd.emit("current-file",t),r},f=e=>{const t=e||DOM.getCurrentFile();return t?p(t.getAttribute("data-name")):""},d=e=>`js-file-${btoa(encodeURI(e))}`,p=e=>(e=e.replace("js-file-",""),c(decodeURI(atob(e)))),m=/^8(|00|58)$/.test(n.j)?p:null,h=(e,t)=>(t=t.replace(RegExp("^"+e+o.FS),""),(0,i.D)(c(t))),g=/^8(|00|58)$/.test(n.j)?h:null,y=(e=DOM.getPanel())=>DOM.getByDataName("js-path",e).textContent,C=e=>{const t=e||DOM.getCurrentFile(),[n]=DOM.getByTag("a",t),{prefix:r}=CloudCmd;return h(r,n.getAttribute("href"))},w=()=>{const e=DOM.getCurrentDirPath().replace(/\/$/,""),t=e.substr(e,e.lastIndexOf("/"));return e.replace(`${t}/`,"")||"/"},b=e=>{const t=DOM.getCurrentDirPath(e),n=DOM.getCurrentDirName()+"/",r=t.lastIndexOf(n);return"/"===t?t:t.slice(0,r)},v=()=>{const e=DOM.getPanel({active:!1});return DOM.getCurrentDirPath(e)},D=()=>DOM.getByClass(s),x=(e,t=DOM.CurrentInfo.panel)=>{const n="js-file-"+btoa(encodeURI(null==(r=e)?void 0:r.replace(" "," ")));var r;return DOM.getByDataName(n,t)},E=(e,t)=>{const n=t,r=DOM.getCurrentFile();if(!e)return DOM;let i="";r&&(i=DOM.getCurrentDirPath(),function(e){DOM.isCurrentFile(e)&&e.classList.remove(s)}(r)),e.classList.add(s);const a=DOM.getCurrentDirPath(),c=CloudCmd.config("name");if(a!==i&&(DOM.setTitle((0,o.getTitle)({name:c,path:a})),!n||n.history)){const e="/"===a?a:o.FS+a;DOM.setHistory(e,null,e)}return DOM.scrollIntoViewIfNeeded(e,!0),CloudCmd.emit("current-file",e),CloudCmd.emit("current-path",a),CloudCmd.emit("current-name",DOM.getCurrentName(e)),DOM},O=e=>{const t=DOM.getCurrentByName(e);return DOM.setCurrentFile(t)},S=({x:e,y:t})=>{const n=(e=>{const{tagName:t}=e;return/A|SPAN|LI/.test(t)?"A"===t?e.parentElement.parentElement:"SPAN"===t?e.parentElement:e:null})(document.elementFromPoint(e,t));return n&&"LI"!==n.tagName?null:n},A=e=>!!e&&DOM.isContainClass(e,s),P=e=>(a||(a=DOM.getByTag("title")[0]||r("title",{innerHTML:e,parent:document.head})),a.textContent=e,DOM),M=e=>{const t=e||DOM.getCurrentFile(),n=DOM.getCurrentPath(t),r=DOM.getCurrentType(t),o=n.endsWith(".zip");return/^directory(-link)?/.test(r)||o},F=e=>{const t=e||DOM.getCurrentFile();return DOM.getByDataName("js-type",t).className.split(" ").pop()}},4700(e,t,n){"use strict";var r=n(9168),o=n(9317),i=n(407),a=n(6037),s=n(507),c=n(8453);const{config:l,Key:u}=CloudCmd,{Buffer:f,Events:d,Dialog:p,Images:m}=DOM,h=DOM.CurrentInfo,g=p.alert.noFiles,y=o(async function(e){const[t,n]=await h.getData();if(t)return;const{name:r}=h;CloudCmd.execFromModule(e,"uploadFile",r,n),CloudCmd.log(`Uploading to ${r}...`)});let C,w,b;function v(){w.hide(),b.hide()}function D({type:e}){let t,n;return"context"===e?(t="context",n=u.unsetBind):"file"===e&&(t="contextFile"),{icon:!0,infiniteScroll:!1,beforeClose:u.setBind,beforeHide:u.setBind,beforeShow:r.with(O,n),beforeClick:S,name:t}}function x(e){const t={Paste:f.paste,New:{File:DOM.promptNewFile,Directory:DOM.promptNewDir},Upload:()=>{CloudCmd.Upload.show()},"Upload From Cloud":A,"Toggle File Selection":DOM.toggleSelectedFile,"(Un)Select All":DOM.toggleAllSelectedFiles};return e&&(t["Log Out"]=CloudCmd.logOut),t}function E(e,t){if(".."!==h.name)return e();t()}function O(e,t){u.unsetBind();const{name:n,position:o={x:t.x,y:t.y}}=t,{x:i,y:a}=o;var s;let c="contextFile"!==((s=DOM.getCurrentByPosition({x:i,y:a}))?".."===DOM.getCurrentName(s)?"context":"contextFile":"context");return"contextFile"===t.name&&(c=!c),c&&(C=n),r(e),c&&(c=function(e,t){const{panel:n}=h;if(!n)return!1;const r=document.elementFromPoint(e,t),o=n.querySelectorAll('[data-name="js-path"] *');return!~[].indexOf.call(o,r)}(i,a)),c}CloudCmd.Menu={init:async function(){const{isAuth:e,menuDataFile:t}=function(){const e=CloudCmd.config("auth"),t=x(e),n={View:()=>{CloudCmd.View.show()},Edit:()=>{const e=l("vim")?"EditFileVim":"EditFile";CloudCmd[e].show()},Rename:()=>{setTimeout(DOM.renameCurrent,100)},Delete:()=>{CloudCmd.Operation.show("delete")},Pack:()=>{CloudCmd.Operation.show("pack")},Extract:()=>{CloudCmd.Operation.show("extract")},Download:P,"Upload To Cloud":y("Cloud"),Cut:()=>{E(f.cut,g)},Copy:()=>{E(f.copy,g)}};return{isAuth:e,menuDataFile:{...n,...t}}}(),r=DOM.getFM(),o=x(e),i=D({type:"context"}),a=D({type:"file"}),{createCloudMenu:s}=await n.e(267).then(n.bind(n,7174)),{name:c}=r.dataset;w=await s(c,i,o),b=await s(c,a,t),w.addContextMenuListener(),b.addContextMenuListener(),d.addKey(F)},show:function(e){const{x:t,y:n}=function(e){return e?{x:e.x,y:e.y}:M()}(e);w.show(t,n),b.show(t,n),m.hide()},hide:v};const S=e=>C!==e;function A(){m.show.load("top"),CloudCmd.execFromModule("Cloud","saveFile",async(e,t)=>{const n=DOM.getCurrentDirPath()+e,[r]=await s.write(n,t);r||await CloudCmd.refresh({currentName:e})})}function P(){!function(e){const{prefixURL:t}=CloudCmd,n=Date.now(),r=DOM.getActiveFiles();if(!r.length)return g();for(const o of r){const r=DOM.isSelected(o),s=DOM.isCurrentIsDir(o),l=DOM.getCurrentPath(o);CloudCmd.log(`downloading file ${l}...`);const u=encodeURI(l).replace(/#/g,"#"),f=(0,a.getIdBySrc)(l);let d;d=s?t+"/pack"+u+DOM.getPackerExt(e):t+c.FS+u+"?download";const p=i("iframe",{id:f+"-"+n,async:!1,className:"hidden",src:d}),{body:m}=document,h=m.removeChild.bind(m,p);setTimeout(h,3e4),r&&DOM.toggleSelectedFile(o)}}(l("packer"))}function M(){const e=h.element.getBoundingClientRect();return{x:Math.round(e.left+e.width/3),y:Math.round(e.top)}}function F(e){const{F9:t,ESC:n}=u,r=e.keyCode,o=u.isBind();if(r===n)return u.setBind(),v();if(o&&r===t){const t=M();w.show(t.x,t.y),e.preventDefault()}}},4801(e,t,n){"use strict";n.d(t,{A:()=>r});const r=e=>document.querySelector(`[data-name="modal-${e}"]`)},4887(e,t,n){"use strict";n.r(t)},4905(e,t){"use strict";function n(e){if("function"!=typeof e)throw new TypeError("Argument to promisify must be a function");var t=e["__ES6-PROMISIFY--CUSTOM-ARGUMENTS__"],r=n.Promise||Promise;if("function"!=typeof r)throw new Error("No Promise implementation found; do you need a polyfill?");return function(){for(var n=this,o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return new r(function(r,o){i.push(function(e){if(e)return o(e);for(var n=arguments.length,i=Array(1<n?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];if(1===i.length||!t)return r(i[0]);var s={};i.forEach(function(e,n){var r=t[n];r&&(s[r]=e)}),r(s)}),e.apply(n,i)})}}Object.defineProperty(t,"__esModule",{value:!0}),t.promisify=n,n.argumentNames="__ES6-PROMISIFY--CUSTOM-ARGUMENTS__",n.Promise=void 0},4999(e,t,n){"use strict";n.r(t),n.d(t,{clear:()=>p,copy:()=>f,cut:()=>d,paste:()=>m});var r=n(740),o=n(112);const i="cut-file",a="copy",s="cut";function c(e){globalThis.DOM.Dialog.alert(e)}function l(){const{DOM:e}=globalThis,t=e.getActiveFiles();return e.getFilenames(t)}const u=e=>()=>{if(CloudCmd.config("buffer"))return e();c("Buffer disabled in config!")},f=u(async()=>{const e=globalThis.DOM.CurrentInfo,t=l(),n=e.dirPath;await p(),t.length&&(await r.remove(s),await r.setJson(a,{from:n,names:t}))}),d=u(async()=>{const e=globalThis.DOM.CurrentInfo,t=l(),n=e.dirPath;await p(),t.length&&(function(){const{DOM:e}=globalThis,t=e.getActiveFiles();for(const e of t)e.classList.add(i)}(),await r.setJson(s,{from:n,names:t}))}),p=u(async()=>{await r.remove(a),await r.remove(s),function(){const{DOM:e}=globalThis,t=e.getByClassAll(i);for(const e of t)e.classList.remove(i)}()}),m=u(async()=>{const e=globalThis.DOM.CurrentInfo,[t,n,i]=await async function(){const[e,t,n]=await o([r.getJson(a),r.getJson(s)]);return[e,t,n]}();if(t||!n&&!i)return c(t||"Buffer is empty!");const l=n?"copy":"move",u=n||i,{Operation:f}=CloudCmd,d=e.dirPath;if(u.from===d)return c("Path is same!");f.show(l,{...u,to:d}),await p()})},5111(e,t,n){"use strict";var r=n(1730),o=n(8328),i=n(9168),a=n(3850);CloudCmd.EditFile={init:async function(){p(!0),await CloudCmd.Edit();const e=CloudCmd.Edit.getEditor();var t;(t=e).emit("auth",u("username"),u("password")),t.on("reject",()=>{c.alert("Wrong credentials!")}),function(e){const t=CloudCmd.Edit.getElement();DOM.Events.addOnce("contextmenu",t,g),e.on("save",e=>{DOM.setCurrentSize(r.size(e))})}(e),p(!1)},show:async function(e){if(p())return;const t={...m,...e};CloudCmd.config("showFileName")&&(t.title=s.name),l.show.load(),CloudCmd.Edit.getEditor().setOption("keyMap","default");const[n,r]=await s.getData();if(n)return l.hide(),CloudCmd.Edit;const{path:o}=s,i=function(){const{name:e,isDir:t}=s;return t?`${e}.json`:e}();return function(e){d=`Do you want to save changes to ${e}?`}(i),CloudCmd.Edit.getEditor().setValueFirst(o,r).setModeForPath(i).enableKey(),CloudCmd.Edit.show(t),CloudCmd.Edit},hide:h,isChanged:y};const s=DOM.CurrentInfo,{Dialog:c,Images:l}=DOM,{config:u}=CloudCmd;let f,d;const p=(0,o.fullstore)(),m={beforeClose:async()=>{i.ifExist(f,"hide"),await y()}};function h(){CloudCmd.Edit.hide()}function g(e){const t={x:e.clientX,y:e.clientY};if(e.preventDefault(),f)return;const n={beforeShow:e=>{e.x-=18,e.y-=27},afterClick:()=>{CloudCmd.Edit.getEditor().focus()}},r=CloudCmd.Edit.getElement();f=a(r,n,function(){const e=CloudCmd.Edit.getEditor();return{"Save Ctrl+S":()=>{e.save()},"Go To Line Ctrl+G":()=>{e.goToLine()},"Cut Ctrl+X":()=>{e.cutToClipboard()},"Copy Ctrl+C":()=>{e.copyToClipboard()},"Paste Ctrl+V":()=>{e.pasteFromClipboard()},"Delete Del":()=>{e.remove("right")},"Select All Ctrl+A":()=>{e.selectAll()},"Close Esc":h}}()),f.addContextMenuListener(),f.show(t.x,t.y)}async function y(){const e=CloudCmd.Edit.getEditor();if(!e.isChanged())return;const[t]=await c.confirm(d);t||e.save()}},5291(e){"use strict";e.exports=(e,t)=>{Object.keys(t).forEach(((e,t)=>n=>e(n,t[n]))(e,t))}},5345(e){"use strict";e.exports=URIError},5367(e,t,n){"use strict";var r=n(407),o=n(3543),i=n(507),a=n(8553);const{CloudCmd:s}=globalThis;s.Markdown={init:async function(){o.show.load("top"),await s.View()},show:async function(e,t={}){const{positionLoad:n,relative:c}=t;o.show.load(n),c&&(e+="?relative");const[l,u]=await i.Markdown.read(e);if(o.hide(),l)return(0,a.alert)(l.message,{cancel:!1});const f=r("div",{className:"help",innerHTML:u});s.View.show(f)},hide:function(){s.View.hide()}}},5450(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.promisify=r;var n="__ES6-PROMISIFY--CUSTOM-ARGUMENTS__";function r(e){if("function"!=typeof e)throw new TypeError("Argument to promisify must be a function");var t=e[n],o=r.Promise||Promise;if("function"!=typeof o)throw new Error("No Promise implementation found; do you need a polyfill?");return function(){for(var n=this,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return new o(function(r,o){i.push(function(e){if(e)return o(e);for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];if(1===i.length||!t)return r(i[0]);var s={};i.forEach(function(e,n){var r=t[n];r&&(s[r]=e)}),r(s)}),e.apply(n,i)})}}r.argumentNames=n,r.Promise=void 0},5606(e){var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var s,c=[],l=!1,u=-1;function f(){l&&s&&(l=!1,s.length?c=s.concat(c):u=-1,c.length&&d())}function d(){if(!l){var e=a(f);l=!0;for(var t=c.length;t;){for(s=c,c=[];++u<t;)s&&s[u].run();u=-1,t=c.length}s=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new p(e,t)),1!==c.length||l||a(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},5615(e,t,n){"use strict";var r=n(407),o=n(806),i=n(608),a=n(3543);function s(){CloudCmd.View.hide()}function c(){const e=DOM.getByDataName("js-upload-file-button");a.hide(),DOM.Events.add("change",e,({target:e})=>{const{files:t}=e;s(),(0,i.Z)(t)})}CloudCmd.Upload={init:async function(){a.show.load("top"),await CloudCmd.View()},show:async function(){a.show.load("top");const e=await o.get("upload"),t=r("div",{innerHTML:e});CloudCmd.View.show(t,{autoSize:!0,afterShow:c});const n=['"Droid Sans Mono"','"Ubuntu Mono"','"Consolas"',"monospace"].join(", ");r("style",{dataName:"upload-css",innerText:`[data-name=js-upload-file-button] {\n font-family: ${n};\n font-size: 16px;\n margin: 10px 0 10px 0;\n }`})},hide:s}},5670(e,t,n){"use strict";n.r(t),n.d(t,{CurrentInfo:()=>J,changePanel:()=>Be,checkStorageHash:()=>xe,default:()=>X,deleteCurrent:()=>Te,deleteSelected:()=>Ne,duplicatePanel:()=>Le,expandSelection:()=>Ce,getActiveFiles:()=>se,getAllFiles:()=>ye,getCSSVar:()=>Ae,getCurrentData:()=>he,getCurrentDate:()=>ce,getCurrentDirName:()=>re,getCurrentLink:()=>ve,getCurrentMode:()=>pe,getCurrentOwner:()=>me,getCurrentSize:()=>le,getFM:()=>Oe,getFilenames:()=>De,getFiles:()=>Me,getNotCurrentDirPath:()=>ie,getPackerExt:()=>$e,getPanel:()=>Pe,getPanelPosition:()=>Se,getParentDirPath:()=>oe,getRefreshButton:()=>ge,goToDirectory:()=>_e,hidePanel:()=>ke,loadCurrentHash:()=>fe,loadCurrentSize:()=>ue,loadRemote:()=>Z,loadSocket:()=>Q,promptNewDir:()=>ee,promptNewFile:()=>te,remove:()=>je,saveDataToStorage:()=>Ee,scrollByPages:()=>Re,scrollIntoViewIfNeeded:()=>Ie,setCurrentSize:()=>de,setHistory:()=>be,showPanel:()=>Fe,shrinkSelection:()=>we,swapPanels:()=>Ue,unselectFiles:()=>ae,updateCurrentInfo:()=>Ve});var r={};n.r(r),n.d(r,{getByClass:()=>b,getByClassAll:()=>D,getByDataName:()=>v,getById:()=>w,getByTag:()=>C,hide:()=>x,isContainClass:()=>y,show:()=>E});var o={};n.r(o),n.d(o,{getSelectedFiles:()=>T,isSelected:()=>A,selectAllFiles:()=>j,selectFile:()=>P,toggleAllSelectedFiles:()=>k,toggleSelectedFile:()=>F,unselectFile:()=>M});var i=n(6037),a=n(806),s=n(8553),c=n(9227),l=n(6088),u=n(740),f=n(507),d=n(3543),p=n(8590),m=n(4559),h=n(4299);const g={show:E,hide:x,getByClass:b,getByClassAll:D,getByDataName:v,getById:w,getByTag:C,isContainClass:y};function y(e,t){if(!e)throw Error("element could not be empty!");if(!t)throw Error("className could not be empty!");if(Array.isArray(t))return t.some(h(y,e));const{classList:n}=e;return n.contains(t)}function C(e,t=document){return t.getElementsByTagName(e)}function w(e,t=document){return t.querySelector(`#${e}`)}function b(e,t=document){return g.getByClassAll(e,t)[0]}function v(e,t=document){const n='[data-name="'+e+'"]';return t.querySelector(n)}function D(e,t){return(t||document).getElementsByClassName(e)}function x(e){return e.classList.add("hidden"),g}function E(e){return e.classList.remove("hidden"),g}const O="selected-file",S={getSelectedFiles:T,isSelected:A,unselectFile:M,selectFile:P,selectAllFiles:j,toggleSelectedFile:F,toggleAllSelectedFiles:k};function A(e){return!!e&&DOM.isContainClass(e,O)}function P(e){return(e||DOM.getCurrentFile()).classList.add(O),S}function M(e){return(e||DOM.getCurrentFile()).classList.remove(O),S}function F(e){const t=e||DOM.getCurrentFile();return".."===DOM.getCurrentName(t)||t.classList.toggle(O),S}function k(){return DOM.getAllFiles().map(DOM.toggleSelectedFile),S}function j(){return DOM.getAllFiles().map(DOM.selectFile),S}function T(){const e=DOM.getPanel(),t=DOM.getByClassAll(O,e);return Array.from(t)}var N=n(3636),I=n(7252),R=n(8453);const B=(e,t,n=100)=>Math.round(e*n/t);var $=n(4999),_=n(537),L=n(6686),U=n(2515),V=n(1256),z=n(980);const W=(0,_.callbackify)(async(e,t)=>{const{prefix:n,config:r}=CloudCmd,o=t;if(o.name&&window[o.name])return;const i=await a.get("modules"),s=r("online")&&navigator.onLine,c=(0,l.findObjByNameInArr)(i.remote,e),u=U.array(c.local),{version:f}=c;let d,p;u?(d=c.remote,({local:p}=c)):(d=[c.remote],p=[c.local]);const m=p.map(e=>n+e),h=d.map(e=>L(e,{version:f}));if(s){const[e]=await(0,z.tryToCatch)(V.parallel,h);if(!e)return}await V.parallel(m)});let K="*.*";const H=async(e,t)=>{if(!t)return;const n=`Specify file type for ${e} selection`,[r,o]=await(0,s.prompt)(n,K);if(r)return;K=o;const i=(0,l.getRegExp)(o);let a=0;for(const n of t){const t=(0,m.getCurrentName)(n);if(".."===t||!i.test(t))continue;++a;let r=A(n);"expand"===e&&(r=!r),r&&F(n)}a||(0,s.alert)("No matches found!")},{assign:G}=Object,q={getCurrentDirName:re,getNotCurrentDirPath:ie,getParentDirPath:oe,loadRemote:Z,loadSocket:Q,promptNewDir:ee,promptNewFile:te,unselectFiles:ae,getActiveFiles:se,getCurrentDate:ce,getCurrentSize:le,loadCurrentSize:ue,loadCurrentHash:fe,setCurrentSize:de,getCurrentMode:pe,getCurrentOwner:me,getCurrentData:he,getRefreshButton:ge,getAllFiles:ye,expandSelection:Ce,shrinkSelection:we,setHistory:be,getCurrentLink:ve,getFilenames:De,checkStorageHash:xe,saveDataToStorage:Ee,getFM:Oe,getPanelPosition:Se,getCSSVar:Ae,getPanel:Pe,getFiles:Me,showPanel:Fe,hidePanel:ke,remove:je,deleteCurrent:Te,deleteSelected:Ne,renameCurrent:async(e,t={})=>{const{refresh:n=CloudCmd.refresh,Dialog:r=s,currentFile:o=m}=t,{isCurrentFile:i,getCurrentName:a,getCurrentFile:c,getCurrentByName:l,getCurrentType:d,getCurrentDirPath:h,setCurrentName:g}=o;i(e)||(e=c());const y=a(e);if(".."===y)return r.alert.noFiles();const[C,w]=await r.prompt("Rename",y);if(C)return;const b=l(w);if(b){const e=d(b),t=`${(0,p.A)(e)} "${w}" already exists. Proceed?`,[n]=await r.confirm(t);if(n)return}if(y===w)return;const v=h(),D=`${v}${y}`,x=`${v}${w}`,[E]=await f.rename(D,x);E||(g(w,e),u.remove(v),n())},scrollIntoViewIfNeeded:Ie,scrollByPages:Re,changePanel:Be,getPackerExt:$e,goToDirectory:_e,duplicatePanel:Le,swapPanels:Ue,updateCurrentInfo:Ve};G(q,{...r,...m,...o});const J={};q.Images=d,q.load=i,q.Files=a,q.RESTful=f,q.IO=N,q.Storage=u,q.Dialog=s,q.CurrentInfo=J;const X=q;q.uploadDirectory=e=>{e.length&&d.show("top");const t=Array.from(e).map(e=>e.webkitGetAsEntry()),n=DOM.getCurrentDirPath().replace(/\/$/,""),r=s.progress("Uploading...");r.catch(()=>{s.alert("Upload aborted"),o.abort()});const o=I(t,(e,t,o,i,a,s)=>{const{prefixURL:c}=CloudCmd,l=c+R.FS+n+t;let u;switch(e){case"file":u=((e,t)=>DOM.load.put(e,t))(l,o);break;case"directory":f=l,u=DOM.load.put(`${f}?dir`)}var f;u.on("end",s),u.on("progress",e=>{const t=B(i,a),n=B(i+1,a),o=t+B(e,100,n-t);r.setProgress(o)})});o.on("error",e=>{s.alert(e),o.abort()}),o.on("end",CloudCmd.refresh)},q.Buffer=$,q.Events=c;const Y={"js-left":null,"js-right":null};function Z(e,t,n){return W(e,t,n),q}function Q(e){return q.loadRemote("socket",{name:"io"},e),q}async function ee(){await ne("directory")}async function te(){await ne("file")}async function ne(e){const{Dialog:t}=q,n=q.getCurrentDirPath(),r=`New ${e}`||"File",o=(()=>{const e=q.getCurrentName();return".."===e?"":e})(),[i,a]=await t.prompt(r,o);if(i)return;const s=`${n}${a}`;"directory"===e?await f.createDirectory(s):await f.write(s),await CloudCmd.refresh({currentName:a})}function re(){const e=q.getCurrentDirPath().replace(/\/$/,""),t=e.substr(e,e.lastIndexOf("/"));return e.replace(`${t}/`,"")||"/"}function oe(e){const t=q.getCurrentDirPath(e),n=q.getCurrentDirName()+"/",r=t.lastIndexOf(n);return"/"!==t?t.slice(0,r):t}function ie(){const e=q.getPanel({active:!1});return q.getCurrentDirPath(e)}function ae(e){e=e||q.getSelectedFiles(),Array.from(e).forEach(q.toggleSelectedFile)}function se(){const e=q.getCurrentFile(),t=q.getSelectedFiles(),n=q.getCurrentName(e);return t.length||".."===n?t:[e]}function ce(e){const t=e||q.getCurrentFile();return q.getByDataName("js-date",t).textContent}function le(e){const t=e||q.getCurrentFile();return q.getByDataName("js-size",t).textContent.replace(/^<|>$/g,"")}async function ue(e){const t=e||q.getCurrentFile(),n=q.getCurrentPath(t);if(d.show.load(),".."===name)return;const[,r]=await f.read(n+"?size");return q.setCurrentSize(r,t),d.hide(),t}async function fe(e){const t=e||q.getCurrentFile(),n=q.getCurrentPath(t),[,r]=await f.read(n+"?hash");return r}function de(e,t){const n=t||q.getCurrentFile();q.getByDataName("js-size",n).textContent=e}function pe(e){const t=e||q.getCurrentFile();return q.getByDataName("js-mode",t).textContent}function me(e){const t=e||q.getCurrentFile();return q.getByDataName("js-owner",t).textContent}async function he(e){const{Dialog:t}=q,n=q.CurrentInfo,r=e||q.getCurrentFile(),o=q.getCurrentPath(r),i=q.isCurrentIsDir(r);if(".."===n.name)return t.alert.noFiles(),[Error("No Files")];if(i)return await f.read(o);const[a,s]=await q.checkStorageHash(o);if(!a)return[Error("Can't get hash of a file")];if(s===a)return[null,await u.get(`${o}-data`)];const[c,l]=await f.read(o);if(c)return[c,null];const{length:d}=l;return s&&d<1073741824&&await q.saveDataToStorage(o,l,a),[null,l]}function ge(e=q.getPanel()){return q.getByDataName("js-refresh",e)}function ye(){const e=q.getPanel(),t=q.getFiles(e),n=".."===q.getCurrentName(t[0])?1:0;return Array.from(t).slice(n)}async function Ce(){const{files:e}=J;await H("expand",e)}async function we(){const{files:e}=J;await H("shrink",e)}function be(e,t,n){const r=globalThis.history,{prefix:o}=CloudCmd;return n=o+n,r&&history.pushState(e,t,n),r}function ve(e){const t=e||q.getCurrentFile();return q.getByTag("a",t)[0]}function De(e){if(!e)throw Error("AllFiles could not be empty");const t=e[0]||q.getCurrentFile(),n=q.getCurrentName(t),r=Array.from(e);return".."===n&&r.shift(),r.map(e=>q.getCurrentName(e))}async function xe(e){const t=`${e}-hash`;if("string"!=typeof e)throw Error("name should be a string!");const[n,r]=await Promise.all([q.loadCurrentHash(),u.get(t)]);return[n,r]}async function Ee(e,t,n){if(q.isCurrentIsDir())return;n=n||await q.loadCurrentHash();const r=`${e}-hash`,o=`${e}-data`;return await u.set(r,n),await u.set(o,t),n}function Oe(){const{parentElement:e}=q.getPanel();return e}function Se(e){return(e=e||q.getPanel()).dataset.name.replace("js-","")}function Ae(e,{body:t=document.body}={}){return getComputedStyle(t).getPropertyValue(`--${e}`)}function Pe(e){let t,n,r,o="js-";const i=q.getCurrentFile();if(i?(t=i.parentElement,n=t.parentElement,r="js-left"===n.getAttribute("data-name")):n=q.getByDataName("js-left"),e&&!e.active&&(o+=r?"right":"left",n=q.getByDataName(o)),globalThis.innerWidth<CloudCmd.MIN_ONE_PANEL_WIDTH&&(n=q.getByDataName("js-left")),!n)throw Error("can not find Active Panel!");return n}function Me(e){return q.getByDataName("js-files",e).children||[]}function Fe(e){const t=q.getPanel({active:e});return!!t&&(q.show(t),!0)}function ke(e){const t=q.getPanel({active:e});return!!t&&q.hide(t)}function je(e,t){return(t||document.body).removeChild(e),q}function Te(e){e||q.getCurrentFile();const t=null==e?void 0:e.parentElement,n=q.getCurrentName(e);if(e&&".."!==n){const n=e.nextSibling,r=e.previousSibling;q.setCurrentFile(n||r),t.removeChild(e)}}function Ne(e){(e=e||q.getSelectedFiles())&&e.map(q.deleteCurrent)}function Ie(e,t=!1){e&&e.scrollIntoViewIfNeeded&&e.scrollIntoViewIfNeeded(t)}function Re(e,t){const n=(null==e?void 0:e.scrollByPages)&&t;return n&&e.scrollByPages(t),n}function Be(){const e=J;let t=q.getPanel();CloudCmd.emit("passive-dir",e.dirPath);const n=q.getPanel({active:!1});let r=q.getCurrentName();const o=q.getFiles(n);let i,a,s=t.getAttribute("data-name");return Y[s]=r,t=n,s=t.getAttribute("data-name"),r=Y[s],r&&(a=q.getCurrentByName(r,t),a&&(i=a.parentElement)),i&&i.parentElement||(a=q.getCurrentByName(r,t),a||([a]=o)),q.setCurrentFile(a,{history:!0}),CloudCmd.emit("active-dir",e.dirPath),q}function $e(e){return"zip"===e?".zip":".tar.gz"}async function _e(e={}){const{Dialog:t}=q,{prompt:n=t.prompt,changeDir:r=CloudCmd.changeDir}=e,{dirPath:o}=J,[i,a=o]=await n("Go to directory:",o);i||await r(a)}async function Le(){const e=J,{isDir:t}=e,n=e.panelPassive,r=!e.isOnePanel,o=(t=>t?e.path:e.dirPath)(t);await CloudCmd.changeDir(o,{panel:n,noCurrent:r})}async function Ue(){const e=J,{panel:t,files:n,element:r,panelPassive:o}=e,i=q.getCurrentDirPath(),a=q.getNotCurrentDirPath();let s=n.indexOf(r);await CloudCmd.changeDir(i,{panel:o,noCurrent:!0}),await CloudCmd.changeDir(a,{panel:t});const c=e.files.length-1;s>c&&(s=c);const l=e.files[s];q.setCurrentFile(l)}function Ve(e){const t=q.CurrentInfo,n=e||q.getCurrentFile(),r=n.parentElement,o=q.getPanel({active:!1}),i=q.getFiles(o),a=q.getCurrentName(n);t.dir=q.getCurrentDirName(),t.dirPath=q.getCurrentDirPath(),t.parentDirPath=q.getParentDirPath(),t.element=n,t.ext=(0,l.getExt)(a),t.files=Array.from(r.children),t.filesPassive=Array.from(i),t.first=r.firstChild,t.getData=q.getCurrentData,t.last=r.lastChild,t.link=q.getCurrentLink(n),t.mode=q.getCurrentMode(n),t.name=a,t.path=q.getCurrentPath(n),t.panel=r.parentElement||q.getPanel(),t.panelPassive=o,t.size=q.getCurrentSize(n),t.isDir=q.isCurrentIsDir(),t.isSelected=q.isSelected(n),t.panelPosition=q.getPanel().dataset.name.replace("js-",""),t.isOnePanel=t.panel.getAttribute("data-name")===t.panelPassive.getAttribute("data-name")}},5680(e,t,n){"use strict";var r=n(5767);e.exports=function(e){return!!r(e)}},5767(e,t,n){"use strict";var r=n(2682),o=n(9209),i=n(487),a=n(6556),s=n(5795),c=n(3628),l=a("Object.prototype.toString"),u=n(9092)(),f=globalThis,d=o(),p=a("String.prototype.slice"),m=a("Array.prototype.indexOf",!0)||function(e,t){for(var n=0;n<e.length;n+=1)if(e[n]===t)return n;return-1},h={__proto__:null};r(d,u&&s&&c?function(e){var t=new f[e];if(Symbol.toStringTag in t&&c){var n=c(t),r=s(n,Symbol.toStringTag);if(!r&&n){var o=c(n);r=s(o,Symbol.toStringTag)}if(r&&r.get){var a=i(r.get);h["$"+e]=a}}}:function(e){var t=new f[e],n=t.slice||t.set;if(n){var r=i(n);h["$"+e]=r}}),e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!u){var t=p(l(e),8,-1);return m(d,t)>-1?t:"Object"===t&&function(e){var t=!1;return r(h,function(n,r){if(!t)try{n(e),t=p(r,1)}catch(e){}}),t}(e)}return s?function(e){var t=!1;return r(h,function(n,r){if(!t)try{"$"+n(e)===r&&(t=p(r,1))}catch(e){}}),t}(e):null}},5795(e,t,n){"use strict";var r=n(6549);if(r)try{r([],"length")}catch(e){r=null}e.exports=r},5811(e,t,n){"use strict";function r(e){if("function"!=typeof e)throw new TypeError("Argument to promisify must be a function");var t=e["__ES6-PROMISIFY--CUSTOM-ARGUMENTS__"],n=r.Promise||Promise;if("function"!=typeof n)throw new Error("No Promise implementation found; do you need a polyfill?");return function(){for(var r=arguments.length,o=Array(r),i=0;i<r;i++)o[i]=arguments[i];return new n((n,r)=>{o.push(function(e){if(e)return r(e);for(var o=arguments.length,i=Array(1<o?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];if(1===i.length||!t)return n(i[0]);var s={};i.forEach((e,n)=>{var r=t[n];r&&(s[r]=e)}),n(s)}),e.apply(this,o)})}}n.d(t,{F:()=>r}),r.argumentNames="__ES6-PROMISIFY--CUSTOM-ARGUMENTS__",r.Promise=void 0},5879(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g,t.matchToToken=function(e){var t={type:"invalid",value:e[0],closed:void 0};return e[1]?(t.type="string",t.closed=!(!e[3]&&!e[4])):e[5]?t.type="comment":e[6]?(t.type="comment",t.closed=!!e[7]):e[8]?t.type="regex":e[9]?t.type="number":e[10]?t.type="name":e[11]?t.type="punctuator":e[12]&&(t.type="whitespace"),t}},5880(e){"use strict";e.exports=Math.pow},6037(e,t,n){"use strict";n.r(t),n.d(t,{ajax:()=>l,getIdBySrc:()=>c,put:()=>u});var r=n(2515),o=n(1115),i=n(7411),a=n(9168),s=n(3543);function c(e){if(!r.string(e))return;e.includes(":")&&(e+="-join");const t=e.lastIndexOf("/")+1,n=e.substr(e,t);return e.replace(n,"").replace(/\./g,"-")}const l=e=>{const t=e,n=r.object(t.data),i=r.array(t.data),c="arraybuffer"===r(t.data),l=t.type||t.method||"GET",{headers:u={}}=t,f=new XMLHttpRequest;f.open(l,t.url,!0);for(const e of Object.keys(u)){const t=u[e];f.setRequestHeader(e,t)}let d;t.responseType&&(f.responseType=t.responseType),!c&&n||i?d=o.stringify(t.data):({data:d}=t),f.onreadystatechange=e=>{const n=e.target;if(n.readyState!==n.DONE)return;s.clearProgress();const r=n.getResponseHeader("content-type");if(200!==n.status)return a(t.error,n);const i="text"!==t.dataType,c=r.includes("application/json");let l=n.response;r&&c&&i&&(l=o.parse(n.response)||n.response),a(t.success,l,n.statusText,n)},f.send(d)},u=(e,t)=>{const n=i(),r=new XMLHttpRequest;return e=encodeURI(e).replace(/#/g,"#"),r.open("put",e,!0),r.upload.onprogress=e=>{if(!e.lengthComputable)return;const t=e.loaded/e.total*100,r=Math.round(t);n.emit("progress",r)},r.onreadystatechange=()=>{if(r.readyState!==r.DONE)return;if(200===r.status)return n.emit("progress",100),n.emit("end");const e=Error(r.responseText);n.emit("error",e)},r.send(t),n}},6088(e,t,n){"use strict";n.r(t),n.d(t,{escapeRegExp:()=>i,findObjByNameInArr:()=>c,getExt:()=>s,getRegExp:()=>a,time:()=>l,timeEnd:()=>u});var r=n(9168);const o=e=>"string"==typeof e,i=e=>(o(e)&&(e=e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),e),a=e=>{const t=`^${e.replace(/\./g,"\\.").replace(/\*/g,".*").replace("?",".?")}$`;return RegExp(t)},s=e=>{if(!o(e))return"";const t=e.lastIndexOf(".");return~t?e.substr(t):""},c=(e,t)=>{let n;if(!Array.isArray(e))throw Error("array should be array!");if(!o(t))throw Error("name should be string!");return e.some(e=>{const r=e.name===t,o=Array.isArray(e);return r?(n=e,r):o?e.some(e=>{const r=e.name===t;return r&&(n=e.data),r}):r}),n},l=e=>{r.ifExist(console,"time",[e])},u=e=>{r.ifExist(console,"timeEnd",[e])}},6188(e){"use strict";e.exports=Math.max},6536(e,t,n){"use strict";var r=n(1597),o=n(5811),i=n(980),a=n(407),s=n(1256),c=n(8453),l=n(6088);function u(){return h}const f=s.js,d="Edit";CloudCmd[d]={init:async function(){const e=function(){const e=a("div",{style:r`
|
|
2
2
|
width: 100%;
|
|
3
3
|
height: 100%;
|
|
4
4
|
font-family: "Droid Sans Mono";
|
|
5
|
-
`,notAppend:!0});return m=e,e}();await CloudCmd.View(),await C(e)},show:function(e){g||(CloudCmd.View.show(m,function(e={}){const t={...e,...y};return e.afterShow?(function(e,t){if("function"!=typeof t)throw Error("options.afterShow should be a function!")}(0,e.afterShow),t.afterShow=()=>{y.afterShow(),e.afterShow()},t):t}(e)),u().setOptions({fontSize:16}))},hide:function(){CloudCmd.View.hide()},getEditor:u,getElement:function(){return m}};const p=CloudCmd.config("editor");let m,h,g=!0;const y={afterShow:()=>{h.moveCursorTo(0,0).focus()}},C=async e=>{const t=`${CloudCmd.prefix}/${p}`,n=CloudCmd.prefix,r=`${CloudCmd.prefixSocket}/${p}`,a=`${t}/${p}.js`;(0,l.time)(`${d} load`),await f(a);const s=(0,o.F)(window[p]),[u]=await(0,i.tryToCatch)(s,e,{maxSize:c.MAX_FILE_SIZE,prefix:t,prefixSocket:r,socketPath:n});(0,l.timeEnd)(`${d} load`),h=u,g=!1}},6549(e){"use strict";e.exports=Object.getOwnPropertyDescriptor},6556(e,t,n){"use strict";var r=n(453),o=n(3126),i=o([r("%String.prototype.indexOf%")]);e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o([n]):n}},6558(e,t,n){"use strict";var r=n(316);e.exports=function(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;const n=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if((e=>"object"==typeof e&&"function"==typeof e.behavior)(t))return t.behavior(r.compute(e,t));const o="boolean"==typeof t||null==t?void 0:t.behavior;for(const{el:i,top:a,left:s}of r.compute(e,(e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"})(t))){const e=a-n.top+n.bottom,t=s-n.left+n.right;i.scroll({top:e,left:t,behavior:o})}}},6578(e){"use strict";e.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},6686(e){"use strict";const t=e=>()=>e,{keys:n}=Object;function r(e,t,n){if(!n)return[`{{ ${e} }}`,t[e]];const r=e.replaceAll("{{","").replaceAll("}}","").replaceAll(" ",""),o=t[r]||"";if(!r.includes("|"))return[e,o];const[i,a]=r.split("|"),s=n[a],c=t[i];return s?[e,s(c)]:[e,c]}e.exports=(e,o,i)=>{!function(e,t){if("string"!=typeof e)throw Error("template should be a string!");if("object"!=typeof t)throw Error("values should be an object!")}(e,o);let a=e;const s=i?e.match(/{{(.*?)}}/g):n(o);for(const e of s){const[n,s]=r(e,o,i),c=t(s);for(;a.includes(n);)a=a.replace(n,c)}return a.includes("{{")&&(a=a.replace(/{{.*?}}/g,"")),a}},6698(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},6714(e,t,n){"use strict";var r={};n.r(r),n.d(r,{_onMainClick:()=>M,_optionsStore:()=>P,close:()=>A,open:()=>O});var o=n(6686),i=n(4299),a=n(9317),s=n(980),c=n(1256),l=n(8328),u=n(407),f=n(4801);const d=(e,t,n={})=>{const{query:r=f.A,createElement:o=u}=n;if(r("title"))return void(r("title-text").textContent=e);const i=o("div",{className:"modal-title",dataName:"modal-title",parent:t});o("span",{parent:i,textContent:e,className:"modal-title-text",dataName:"modal-title-text"})},p=(0,l.default)(),m=(0,l.default)(),h=a((e,t)=>C(p()+1,e,t)),g=a((e,t)=>C(p()-1,e,t)),y=a((e,t)=>{e.hidden=!1,t()});function C(e,t,n,{query:r,showTitle:o}){const i=n.length-1;if(e<0||e>i)return;p(e),r("nav-left").hidden=!e,r("nav-right").hidden=e===i;const{href:a,title:s}=n[e];t.src=a,t.title=s,t.href=s,t.alt=s,m().title&&o(s,r("child"))}const w=function(e,t,n={}){const{afterShow:r,helpers:o,index:i,query:a=f.A,createElement:s=u,showTitle:c=d}=n;p(i),m(o);const l=function(){const e=document.createElement("img");return e.className="modal-image",e}();e.appendChild(l),e.hidden=!0,e.appendChild(s("div",{className:"modal-nav modal-nav-left",dataName:"modal-nav-left",innerHTML:"<span></span>"})),e.appendChild(s("div",{className:"modal-nav modal-nav-right",dataName:"modal-nav-right",innerHTML:'<span data-name="modal-next"></span>'})),C(i,l,t,{query:a,showTitle:c}),function(e,t,n){e.addEventListener(t,function(e,t,n){return function r(o){n(o),e.removeEventListener(t,r)}}(e,t,n))}(l,"load",y(e,r)),a("nav-left").addEventListener("click",g(l,t,a)),a("nav-right").addEventListener("click",h(l,t,a)),document.body.addEventListener("keydown",((e,t,n)=>function r(o){let i=p();const{keyCode:a}=o;if(37===a)--i;else{if(39!==a)return 27===a?document.body.removeEventListener("keydown",r):void 0;++i}C(i,e,t,{query:n})})(l,t,a))};var b=n(8530);const v=()=>{},D=(0,l.default)({}),x=i((e,t,n,r)=>n(e).addEventListener(r,t)),{isArray:E}=Array,O=(e,t={})=>{!function(e){if(!e)throw Error("inner should be DOM-element!")}(e);const{beforeShow:n=v,beforeClose:r=v,afterShow:o=v,afterClose:i=v,onOverlayClick:a=v,autoSize:s=!1,index:c=0,helpers:l={},title:p="",query:m=f.A,showTitle:h=d,parseImages:g=w}=t;if(m("main"))return;D({beforeClose:r,afterClose:i}),n();const y=E(e),C=l.title&&p||y,O=(0,b.A)({autoSize:s,isTitle:C}),P=u("div",{innerHTML:'\n <div class="modal-child" data-name="modal-child">\n <div class="modal-close" data-name="modal-close"></div>\n </div>\n',className:O,dataName:"modal-main"});((e,t,n)=>{["click","contextmenu"].map(x("main",t,n))})(0,S(a),m),m("close").addEventListener("click",A);const M=m("child");return y?g(M,e,{index:c,afterShow:o,helpers:l}):(M.appendChild(e),C&&h(p,M),o(),P)},S=(e,t={})=>n=>{const{query:r=f.A}=t;n.target===r("main")&&(A(n),e(n))},A=(e,t={})=>{const{query:n=f.A}=t;e&&e.stopPropagation();const r=n("main"),{beforeClose:o=v,afterClose:i=v}=D();r&&(o(),document.body.removeChild(r),i())},P=D,M=S;var k=n(6088),F=n(806),j=n(9227),N=n(8453),T=n(3543),I=n(1849),R=n(7975);const $=e=>/\.(mp3|ogg|m4a)$/i.test(e),B=i((e,t)=>t.test(e)),L=e=>RegExp(`\\.${e}$`,"i"),_=async e=>((0,R.extname)(e)||(e=await async function(e){const{headers:t}=await fetch(e,{method:"HEAD"});for(const[e,n]of t)if("content-type"===e)return`.${n.split("/").pop()}`;return""}(e)),/\.pdf$/i.test(e)?"pdf":U(e)?"image":function(e){return $(e)||function(e){return/\.(mp4|avi|webm)$/i.test(e)}(e)}(e)?"media":e.endsWith(".html")?"html":(e=>/.\.md$/.test(e))(e)?"markdown":void 0);function U(e){return["jp(e|g|eg)","gif","png","bmp","webp","svg","ico"].map(L).some(B(e))}const V=globalThis.CloudCmd||{},H=globalThis.DOM||{},{assign:z}=Object,{isArray:W}=Array,K=i((e,t,n,r)=>e(r,t,n)),G=a((...e)=>{for(const t of e)t()}),q=e=>"function"==typeof e,J=K(j.add),X=c.css;let Y=!1;const Z="View";V[Z]={init:async function(){await async function(){const{DIR_DIST:e}=V;(0,k.time)(`${Z} load`),Y=!0,await X(`${e}/view.css`),Y=!1}(),["click","contextmenu"].forEach(J(void 0,se))},show:async function(e,t={}){const n=V.prefixURL+N.FS;if(Y)return;if(t&&!1===t.bindKeys||j.addKey(ce),ne=u("div",{className:"view",notAppend:!0}),ne.tabIndex=0,e)return W(e)?ne.append(...e):ne.append(e),void O(ne,function(e){const t=z({},oe);if(!e)return t;const n=Object.keys(e);for(const r of n){const n=Boolean(t[r]),o=e[r];if(!q(o)||!n){t[r]=e[r];continue}const i=t[r];t[r]=G(i,o)}return t}(t));T.show.load();const i=n+Q.path;switch(t.raw?"":await _(i)){default:return await async function(){const[e,t]=await Q.getData();if(e)return T.hide();const n=document.createTextNode(t),r=oe;V.config("showFileName")&&(r.title=Q.name),ne.append(n),O(ne,r)}();case"markdown":return await V.Markdown.show(Q.path);case"html":return function(e,t={}){const{modal:n=r}=t;n.open(ie(e),oe)}(i);case"image":return function(e,t){const n=Q.files.map(H.getCurrentPath).filter(t=>U(t)||t===e),r=n.map(e=>({href:`${t}${e}`,title:(0,I.l)(te(e))})),o={index:n.indexOf(Q.path),autoSize:!0,arrows:!0,keys:!0,helpers:{title:{}}},i={...oe,...o};O(r,i)}(Q.path,n);case"media":return await async function(e){const[t,n]=await async function(e){!function(e){if("string"!=typeof e)throw Error("src should be a string!")}(e);const[t,n]=await(0,s.tryToCatch)(F.get,"view/media-tmpl");if(t)return[t];const{name:r}=Q;re||(re=n);const i=$(r)?"audio":"video",a=o(re,{src:e,type:i,name:r});return[null,u("div",{innerHTML:a})]}(e);if(t)return alert(t);const r={...oe,autoSize:!0,afterShow:()=>{n.querySelector("audio, video").focus()}};O(n,r)}(i);case"pdf":return function(e){const t=ie(e),n=z({},oe);V.config("showFileName")&&(n.title=Q.name),O(t,n)}(i)}},hide:ae};const Q=H.CurrentInfo,{Key:ee}=V,te=e=>e.split("/").pop();let ne,re;const oe={beforeShow:()=>{T.hide(),ee.unsetBind()},beforeClose:()=>{j.rmKey(ce),ee.setBind()},afterShow:()=>{ne.focus()},onOverlayClick:se,afterClose:()=>{},autoSize:!1,helpers:{title:{}}};function ie(e,t={}){const{createElement:n=u}=t,r=n("iframe",{src:e,width:"100%",height:"100%"});return r.addEventListener("load",()=>{r.contentWindow.addEventListener("keydown",ce)}),r}function ae(){A()}function se(e){!function(e){const t=H.getCurrentByPosition(e);if(!t)return;const{files:n,filesPassive:r}=Q,o=n.includes(t),i=r.includes(t);(o||i)&&(H.isCurrentFile(t)||H.setCurrentFile(t))}({x:e.clientX,y:e.clientY})}function ce({keyCode:e}){e===ee.ESC&&ae()}},6727(e,t,n){"use strict";const r=n(6686),o=n(4002),i=e=>"object"==typeof e,{entries:a}=Object;e.exports=function e(t,n,s,c=""){let l="";c&&(c+=".");for(const[u,f]of a(t)){let t,a="",d="",p="";const m=c+u;i(f)?(a=r(o.MAIN,{items:e(f,n,s,m)}),d=" menu-submenu",p=' data-menu="js-submenu"'):n[m]=f,s.icon&&(t=u.replace(/\(|\)/g,"").replace(/\s/g,"-").toLowerCase(),d+=` icon icon-${t}`),l+=r(o.ITEM,{name:u,subitems:a,className:d,attribute:p,path:m})}return l}},6735(e){"use strict";e.exports=navigator.clipboard||{readText:function(){return Promise.reject()},writeText:async function(e){const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select();const n=document.execCommand("copy");if(document.body.removeChild(t),!n)return Promise.reject()}}},6743(e,t,n){"use strict";var r=n(9353);e.exports=Function.prototype.bind||r},6897(e,t,n){"use strict";var r=n(453),o=n(41),i=n(592)(),a=n(5795),s=n(9675),c=r("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||c(t)!==t)throw new s("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,l=!0;if("length"in e&&a){var u=a(e,"length");u&&!u.configurable&&(r=!1),u&&!u.writable&&(l=!1)}return(r||l||!n)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},6927(e,t,n){"use strict";const{tryToCatch:r}=n(980);n(1825);const o=n(9168),i=n(1256),a=n(5670),s=n(3543),c=i.parallel,{Dialog:l}=a,{Key:u,config:f}=CloudCmd;let d,p,m;function h(){CloudCmd.View.hide()}CloudCmd.Terminal=t,e.exports.init=async()=>{f("terminal")&&(s.show.load("top"),await CloudCmd.View(),await(async()=>{const{prefix:e}=CloudCmd,t=`${g()}/gritty.js`,n=`${e}/dist/terminal.css`,[o]=await r(c,[t,n]);if(o){const e=o.target.src.replace(globalThis.location.href,"");return l.alert(`file ${e} could not be loaded`)}d=!0})(),function(){const e={env:y(),prefix:CloudCmd.prefixSocket+"/gritty",socketPath:CloudCmd.prefix,fontFamily:"Droid Sans Mono"},{socket:t,terminal:n}=gritty(document.body,e);m=t,p=n,p.onKey(({domEvent:e})=>{const{keyCode:t,shiftKey:n}=e;n&&t===u.ESC&&h()}),m.on("connect",o.with(C,t))}())},e.exports.show=function(){d&&f("terminal")&&CloudCmd.View.show(p.element,{afterShow:()=>{p.focus()}})},e.exports.hide=h;const g=()=>CloudCmd.prefix+"/gritty";const y=()=>({ACTIVE_DIR:a.getCurrentDirPath,PASSIVE_DIR:a.getNotCurrentDirPath,CURRENT_NAME:a.getCurrentName,CURRENT_PATH:a.getCurrentPath});function C(e){e.emit("auth",f("username"),f("password")),e.on("reject",()=>{l.alert("Wrong credentials!")})}},6967(e,t,n){"use strict";n.r(t),n.d(t,{A:()=>v,ASTERISK:()=>L,BACKSLASH:()=>oe,BACKSPACE:()=>r,BRACKET_CLOSE:()=>ie,C:()=>D,CAPSLOCK:()=>a,COLON:()=>Z,D:()=>x,DELETE:()=>C,DOT:()=>te,DOWN:()=>g,END:()=>f,ENTER:()=>i,EQUAL:()=>Q,ESC:()=>s,F1:()=>V,F10:()=>Y,F2:()=>H,F3:()=>z,F4:()=>W,F5:()=>K,F6:()=>G,F7:()=>q,F8:()=>J,F9:()=>X,G:()=>E,HOME:()=>d,HYPHEN:()=>ee,INSERT:()=>y,INSERT_MAC:()=>B,J:()=>O,K:()=>S,LEFT:()=>p,M:()=>A,MINUS:()=>U,O:()=>P,P:()=>M,PAGE_DOWN:()=>u,PAGE_UP:()=>l,PLUS:()=>_,Q:()=>k,R:()=>F,RIGHT:()=>h,S:()=>j,SEMICOLON:()=>b,SLASH:()=>ne,SPACE:()=>c,T:()=>N,TAB:()=>o,TRA:()=>re,U:()=>T,UP:()=>m,V:()=>I,X:()=>R,Z:()=>$,ZERO:()=>w});const r=8,o=9,i=13,a=20,s=27,c=32,l=33,u=34,f=35,d=36,p=37,m=38,h=39,g=40,y=45,C=46,w=48,b=52,v=65,D=67,x=68,E=71,O=74,S=75,A=77,P=79,M=80,k=81,F=82,j=83,N=84,T=85,I=86,R=88,$=90,B=96,L=106,_=107,U=109,V=112,H=113,z=114,W=115,K=116,G=117,q=118,J=119,X=120,Y=121,Z=186,Q=187,ee=189,te=190,ne=191,re=192,oe=220,ie=221},6978(e,t,n){"use strict";var r=n(4299),o=n(9317),i=n(5811),a=n(9168),s=n(1256),c=n(980),l=n(1849),u=n(6088);var f=n(5291),d=n(8555);const{Dialog:p,Images:m}=DOM,h=e=>t=>{const{operation:n,callback:r,noContinue:i,from:a,to:s}=e;let c,l;const u=o(({emitter:e,operation:t})=>{e.abort();const n=`${t} aborted`;l=!0,p.alert(n,{cancel:!1})}),h=t.removeListener.bind(t),g=t.on.bind(t),y=(0,d.G)(n,a,s),C=p.progress(y);C.catch(u({emitter:t,operation:n}));let w=!0;const b={progress:e=>{c=100===e,C.setProgress(e),w=!1},end:()=>{m.hide(),f(h,b),C.remove(),(l||c||w)&&r()},error:async e=>{if(l=e,i)return b.end(e),p.alert(e),void C.remove();const[n]=await p.confirm(`${e}\n Continue?`);if(!c&&!n)return t.continue();t.abort(),C.remove()}};f(g,b)},g=r((e,t)=>!e.includes(t)),y=r((e,t)=>e.filter(g(t))),{DOM:C,CloudCmd:w}=globalThis,{config:b}=w,{Dialog:v,Images:D}=C,x=o(function(e,t){const n=o(t),r=o(v.alert);e.on("accept",n(e)),e.on("reject",r("Wrong credentials!")),e.emit("auth",b("username"),b("password"))}),E={};let O,S,A,P,M,k,F;const j=C.CurrentInfo,N=D.show.load.bind(null,"top"),T=r(async function(e,t){let n,r,o,i,a,s="",c="",u=[];t?(({from:s,to:c,names:u}=t),({panel:o}=j)):(s=j.dirPath,c=C.getNotCurrentDirPath(),n=C.getSelectedFiles(),u=C.getFilenames(n),t={},i=!0,o=j.panelPassive),u.length||u.push(C.getCurrentName());const[f]=u,d=C.getCurrentByName(f,o);if(!t&&I())return;const{type:p}=e,m="copy"===p,h=m?"Copy":"Rename/Move",g=m?S:A;if(i&&b(m?"confirmCopy":"confirmMove")){const[e,t]=await async function(e,t,n){const r=n.length,[o]=n;return e+=" ",n.length>1?e+=`${r} file(s)`:e+=`"${o}"`,e+=" to",await v.prompt(e,t)}(h,c,u.map(l.l));return void(e||y(t))}function y(e){if(a=s!==e&&e,a&&!i||!d)return n();const t=`"${f}" already exist. Overwrite?`;function n(){N(),r={from:s,to:e,names:u},g(r,async()=>{await C.Storage.remove(s);const{panel:e,panelPassive:t}=j;j.isOnePanel||w.refresh({panel:t,noCurrent:!0}),w.refresh({panel:e})})}v.confirm(t,{cancel:!1}).then(n)}y(c)}),I=()=>{const{length:e}=C.getActiveFiles(),t=Boolean(!e);return t?v.alert.noFiles():t},R=(0,i.F)(e=>{N(),a.series([C.loadSocket,async e=>{if(b("dropbox"))return e();const{prefix:t,prefixSocket:n}=w;await async function(){const{prefix:e}=globalThis.CloudCmd,t=`${e}/fileop/fileop.js`,[n]=await(0,c.tryToCatch)(s.js,t);n&&v.alert(n.message),O=!0}(),await async function(e,t,n){t=`${t}/fileop`;const r=await globalThis.fileop({prefix:e,socketPrefix:t});r.on("connect",x(r,$(n)))}(t,n,e)},e=>{O=!0,D.hide(),e()}],e)}),$=r((e,t)=>{!function(e){F=({from:t,to:n,names:r},o)=>{const i=h({operation:"Tar",callback:o,noContinue:!0,from:t,to:n});e.tar(t,n,r).then(i)},k=({from:t,to:n,names:r},o)=>{const i=h({operation:"Zip",callback:o,noContinue:!0,from:t,to:n});e.zip(t,n,r).then(i)},P=(t,n,r)=>{t=t.replace(/\?.*/,"");const o=h({operation:"Delete",callback:r,from:t});e.remove(t,n).then(o)},S=({from:t,to:n,names:r},o)=>{const i=h({operation:"Copy",callback:o,from:t,to:n,names:r});e.copy(t,n,r).then(i)},A=({from:t,to:n,names:r},o)=>{const i=h({operation:"Move",callback:o,from:t,to:n});e.move(t,n,r).then(i)},M=({from:t,to:n},r)=>{const o=h({operation:"Extract",callback:r,noContinue:!0,from:t,to:n});e.extract(t,n).then(o)}}(t),e()});function B(e=C.getActiveFiles()){const t=j.dirPath;if(I())return;N();const n=C.getFilenames(e),r=C.CurrentInfo.files.map(C.getCurrentName),o=C.getCurrentName(),i=((e,t,n)=>{const r=t.indexOf(e),o=y(t,n),{length:i}=o;return o[r]?o[r]:o[i-1]})(o,r,n);P(t+"?files",n,async()=>{await w.refresh();const e=j.files.map(C.getCurrentName).includes(o)?o:i;C.setCurrentByName(e)})}function L(e,t){let n,r,o=j.name;const{path:i,dirPath:a}=j,s=C.getActiveFiles(),c=C.getFilenames(s);if(function(e,t){if(!t)throw Error("operation could not be empty!")}(0,e),!c.length)return v.alert.noFiles();switch(e){case"extract":n=M,r={from:i,to:a},o=(e=>{const t=function(e){return e.endsWith(".tar.gz")?".tar.gz":e.endsWith(".tar.bz2")?".tar.bz2":(0,u.getExt)(e)}(e);return e.replace(t,"")})(o);break;case"pack":n=function(e){return"zip"===e?k:F}(t),c.length>1&&(o=j.dir),o+=C.getPackerExt(t),r={from:a,to:a+o,names:c}}N(),n(r,e=>{!e&&w.refresh({currentName:o})})}E.copy=T({type:"copy"}),E.move=T({type:"move"}),E.delete=async function(){if(I())return;const e="Do you really want to delete the ",t="selected ",n=C.getActiveFiles(),r=C.getFilenames(n),o=r.length;let i;if(o){let n="";for(let e=0;e<5&&e<o;e++)n+="\n"+r[e];o>=5&&(n+="\n..."),i=e+t+o+" files/directories?\n"+(0,l.l)(n)}else{const n=C.getCurrentFile();i=e+t+((e=>e?"directory":"file")(C.isCurrentIsDir(n))+" ")+C.getCurrentName(n)+"?"}const[a]=await v.confirm(i);a||B(n)},E.deleteSilent=B,E.pack=()=>{L("pack","zip"===b("packer")?"zip":"tar")},E.extract=()=>{L("extract")},globalThis.CloudCmd.Operation={init:R,hide:()=>{w.View.hide()},show:(e,t)=>{if(O)return"copy"===e?E.copy(t):"move"===e?E.move(t):"delete"===e?E.delete():"delete:silent"===e?E.deleteSilent():"pack"===e?E.pack():"extract"===e?E.extract():void 0}}},7023(e){"use strict";e.exports=(e,...t)=>(function(e){if("function"!=typeof e)throw Error("fn should be function!")}(e),(...n)=>{const r=[...t,...n];return e(...r)})},7119(e){"use strict";e.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},7174(e,t,n){"use strict";n.d(t,{createCloudMenu:()=>a});var r=n(3850);const o=()=>{},{CloudCmd:i}=globalThis,a=async(e,t,n)=>{const r=await async function(){if("aleman"===i.config("menu")){const{host:e,protocol:t}=globalThis.location,n=`${t}//${e}/node_modules/aleman/menu/menu.js`,{createMenu:r}=await import(n);return r}return s}(),a=await r(e,t,n);return a.addContextMenuListener=a.addContextMenuListener||o,a};function s(e,t,n){const o=document.querySelector('[data-name="js-fm"]');return r(o,t,n)}},7175(e,t,n){"use strict";var r=n(9168),o=n(4299),i=n(1256),a=n(6037),s=n(806),c=n(3543);const{log:l}=CloudCmd,u=o(function(e,t){const{url:n,filename:o}=t,i=r.with(e,o);(0,a.ajax)({url:n,responseType:"arraybuffer",success:i})});CloudCmd.Cloud={init:async function(){const[e]=await Promise.all([s.get("modules"),i.js("//api.filepicker.io/v2/filepicker.js")]),{key:t}=e.data.FilePicker;filepicker.setKey(t),c.hide()},uploadFile:function(e,t){filepicker.store(t,{mimetype:"",filename:e},e=>{filepicker.exportFile(e,l,l)})},saveFile:function(e){filepicker.pick(u(e))}}},7176(e,t,n){"use strict";var r,o=n(3126),i=n(5795);try{r=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var a=!!r&&i&&i(Object.prototype,"__proto__"),s=Object,c=s.getPrototypeOf;e.exports=a&&"function"==typeof a.get?o([a.get]):"function"==typeof c&&function(e){return c(null==e?e:s(e))}},7244(e,t,n){"use strict";var r=n(9092)(),o=n(6556)("Object.prototype.toString"),i=function(e){return!(r&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===o(e)},a=function(e){return!!i(e)||null!==e&&"object"==typeof e&&"length"in e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==o(e)&&"callee"in e&&"[object Function]"===o(e.callee)},s=function(){return i(arguments)}();i.isLegacyArguments=a,e.exports=s?i:a},7252(e,t,n){"use strict";const r=n(9915),o=n(7411),i=n(9775),a=n(6698),{isArray:s}=Array;function c(e,t){if(!(this instanceof c))return new c(e,t);if("function"!=typeof t)throw Error("processingFn should be function!");o.call(this);const n=s(r=e)?r:[r];var r;this._i=0,this._n=0,this._processingFn=t,this._pause=!1,this._prev=0,this._find(n,(e,t)=>{this._files=e,this._dirs=t,this._n=e.length+t.length,this._data={},this._getFiles(e,this._data,()=>{this._process()})})}e.exports=c,a(c,o),c.prototype._process=function(){const e=this._processingFn.length,t=e=>{++this._i,e&&(this.emit("error",e),this.pause()),this._process(),this._progress()};let n,r,o=this._dirs.shift(),i="directory";if(!o){i="file";const e=this._files.shift();e&&(o=e.fullPath,n=this._data[o])}if(!o)return this.emit("end");this._pause||(r=6===e?[i,o,n,this._i,this._n]:[i,o,n],r.push(t),this._processingFn(...r))},c.prototype.pause=function(){this._pause=!0},c.prototype.continue=function(){this._pause&&(this._pause=!1,this._process())},c.prototype.abort=function(){this._files=[],this._dirs=[],this._process()},c.prototype._progress=function(){const e=Math.round(100*this._i/this._n);e!==this._prev&&(this._prev=e,this.emit("progress",e))},c.prototype._getFiles=function(e,t,n){const r=e.slice(),o=r.shift();if(!o)return n(null,t);o.file(e=>{const i=o.fullPath;t[i]=e,this._getFiles(r,t,n)})},c.prototype._find=function(e,t){const n=[],o=[];i(e,(e,t)=>{const i=r(e);i.on("directory",e=>{o.push(e)}),i.on("file",(e,t)=>{n.push(t)}),i.on("end",()=>{t()})},()=>{t(n,o)})}},7411(e){"use strict";function t(){if(!(this instanceof t))return new t;this._all={}}function n(e){if("string"!=typeof e)throw Error("event should be string!")}function r(e,t){n(e),function(e){if("function"!=typeof e)throw Error("callback should be function!")}(t)}e.exports=t,t.prototype.on=function(e,t){const n=this._all[e];return r(e,t),n?n.push(t):this._all[e]=[t],this},t.prototype.addListener=t.prototype.on,t.prototype.once=function(e,t){const n=this;return r(e,t),this.on(e,function r(...o){t(...o),n.off(e,r)}),this},t.prototype.off=function(e,t){const n=this._all[e]||[];let o=n.indexOf(t);for(r(e,t);~o;)n.splice(o,1),o=n.indexOf(t);return this},t.prototype.removeListener=t.prototype.off,t.prototype.emit=function(e,...t){const r=this._all[e];if(n(e),!r&&"error"===e)throw t[0];if(!r)return this;for(const e of r)e(...t);return this},t.prototype.removeAllListeners=function(e){return n(e),this._all[e]=[],this}},7714(e,t,n){"use strict";var r=n(6686),o=n(4299),i=n(9317),a=n(1795),s=n(5811),c=n(980),l=n(1256),u=n(407),f=n(9227),d=n(806),p=n(8453),m=n(3543);const h=o((e,t,n)=>e===typeof t[n])("boolean");function g(e,t){const n=`[data-name="js-${e}"]`;return t.querySelector(n)}function y(e){return e?" checked":""}const C=(e,t,n)=>{const r=g(e,n),{type:o}=r;"checkbox"===o?r.checked=t:r.value=t},{Dialog:w,setTitle:b}=DOM,v=(0,s.F)(DOM.loadSocket),D=o((e,t)=>(f.addKey(t,e),t)),x=o((e,t)=>(f.add("change",t,e),t)),E={};let O;const S=l.css,{config:A,Key:P}=CloudCmd;let M;function k(){CloudCmd.View.hide()}async function F(e){const t={},n=e.getAttribute("data-name").replace(/^js-/,""),r=((e,t)=>{const n=g(e,t),{type:r}=n;switch(r){case"checkbox":return n.checked;case"number":return Number(n.value);default:return n.value}})(n,M);"name"===n?function(e){b((0,p.getTitle)({name:e}))}(r):"auth"===n&&T(r),t[n]=r,await E.save(t)}function j(e){for(const t of Object.keys(e)){const n=e[t];CloudCmd._config(t,n),C(t,n,M)}}async function N(e){const{RESTful:t}=DOM,[n]=await t.Config.write(e);n||j(e)}function T(e){const t=g("username",M),n=g("password",M);t.disabled=!e,n.disabled=!e}async function I({keyCode:e,target:t}){switch(e){case P.ESC:return k();case P.ENTER:return await F(t)}}E.save=N,CloudCmd.Config={init:async()=>{if(!CloudCmd.config("configDialog"))return;m.show.load("top");const{DIR_DIST:e}=CloudCmd;[O]=await Promise.all([d.get("config-tmpl"),v(),S(`${e}/config.css`),CloudCmd.View()]),function(){const e=function(){const{host:e,origin:t,protocol:n}=location;return t||`${n}//${e}`}(),{prefixSocket:t,prefix:n}=CloudCmd,r=io.connect(e+t+"/config",{reconnectionAttempts:1/0,reconnectionDelay:6e4,path:`${n}/socket.io`}),o=e=>{j(e),r.send(e)};(function(e){e.emit("auth",A("username"),A("password")),e.on("reject",i(w.alert,"Wrong credentials!"))})(r),r.on("connect",()=>{E.save=o}),r.on("message",j),r.on("log",CloudCmd.log),r.on("disconnect",()=>{E.save=N}),r.on("err",w.alert)}()},show:async function(){CloudCmd.config("configDialog")&&await async function(){const[e,t]=await(0,c.tryToCatch)(d.get,"config");if(e)return w.alert("Could not load config!");const{editor:n,menu:o,packer:i,columns:s,theme:l,configAuth:f,...p}=(e=>{const t=e,n=Object.keys(e).filter(h(e));for(const r of n){const n=e[r];t[r]=y(n)}return t})(t);p[`${o}-selected`]="selected",p[`${n}-selected`]="selected",p[`${i}-selected`]="selected",p[`${s}-selected`]="selected",p[`${l}-selected`]="selected",p.configAuth=f?"":"hidden";const m=r(O,p);M=u("form",{className:"config",innerHTML:m});const g=document.querySelectorAll("input, select",M),[C]=g;let b;C&&(T(C.checked),b=C.focus.bind(C));const v=a(F,({target:e})=>e);Array.from(g).map(D(I)).map(x(v));CloudCmd.View.show(M,{autoSize:!0,afterShow:b})}()},hide:k}},7975(e,t,n){"use strict";var r=n(5606);function o(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function i(e,t){for(var n,r="",o=0,i=-1,a=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(47===n)break;n=47}if(47===n){if(i===s-1||1===a);else if(i!==s-1&&2===a){if(r.length<2||2!==o||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",o=0):o=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),i=s,a=0;continue}}else if(2===r.length||1===r.length){r="",o=0,i=s,a=0;continue}t&&(r.length>0?r+="/..":r="..",o=2)}else r.length>0?r+="/"+e.slice(i+1,s):r=e.slice(i+1,s),o=s-i-1;i=s,a=0}else 46===n&&-1!==a?++a:a=-1}return r}var a={resolve:function(){for(var e,t="",n=!1,a=arguments.length-1;a>=-1&&!n;a--){var s;a>=0?s=arguments[a]:(void 0===e&&(e=r.cwd()),s=e),o(s),0!==s.length&&(t=s+"/"+t,n=47===s.charCodeAt(0))}return t=i(t,!n),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(o(e),0===e.length)return".";var t=47===e.charCodeAt(0),n=47===e.charCodeAt(e.length-1);return 0!==(e=i(e,!t)).length||t||(e="."),e.length>0&&n&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return o(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var n=arguments[t];o(n),n.length>0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":a.normalize(e)},relative:function(e,t){if(o(e),o(t),e===t)return"";if((e=a.resolve(e))===(t=a.resolve(t)))return"";for(var n=1;n<e.length&&47===e.charCodeAt(n);++n);for(var r=e.length,i=r-n,s=1;s<t.length&&47===t.charCodeAt(s);++s);for(var c=t.length-s,l=i<c?i:c,u=-1,f=0;f<=l;++f){if(f===l){if(c>l){if(47===t.charCodeAt(s+f))return t.slice(s+f+1);if(0===f)return t.slice(s+f)}else i>l&&(47===e.charCodeAt(n+f)?u=f:0===f&&(u=0));break}var d=e.charCodeAt(n+f);if(d!==t.charCodeAt(s+f))break;47===d&&(u=f)}var p="";for(f=n+u+1;f<=r;++f)f!==r&&47!==e.charCodeAt(f)||(0===p.length?p+="..":p+="/..");return p.length>0?p+t.slice(s+u):(s+=u,47===t.charCodeAt(s)&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(o(e),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,i=!0,a=e.length-1;a>=1;--a)if(47===(t=e.charCodeAt(a))){if(!i){r=a;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"//":e.slice(0,r)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');o(e);var n,r=0,i=-1,a=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,c=-1;for(n=e.length-1;n>=0;--n){var l=e.charCodeAt(n);if(47===l){if(!a){r=n+1;break}}else-1===c&&(a=!1,c=n+1),s>=0&&(l===t.charCodeAt(s)?-1===--s&&(i=n):(s=-1,i=c))}return r===i?i=c:-1===i&&(i=e.length),e.slice(r,i)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!a){r=n+1;break}}else-1===i&&(a=!1,i=n+1);return-1===i?"":e.slice(r,i)},extname:function(e){o(e);for(var t=-1,n=0,r=-1,i=!0,a=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(47!==c)-1===r&&(i=!1,r=s+1),46===c?-1===t?t=s:1!==a&&(a=1):-1!==t&&(a=-1);else if(!i){n=s+1;break}}return-1===t||-1===r||0===a||1===a&&t===r-1&&t===n+1?"":e.slice(t,r)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){o(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n,r=e.charCodeAt(0),i=47===r;i?(t.root="/",n=1):n=0;for(var a=-1,s=0,c=-1,l=!0,u=e.length-1,f=0;u>=n;--u)if(47!==(r=e.charCodeAt(u)))-1===c&&(l=!1,c=u+1),46===r?-1===a?a=u:1!==f&&(f=1):-1!==a&&(f=-1);else if(!l){s=u+1;break}return-1===a||-1===c||0===f||1===f&&a===c-1&&a===s+1?-1!==c&&(t.base=t.name=0===s&&i?e.slice(1,c):e.slice(s,c)):(0===s&&i?(t.name=e.slice(1,a),t.base=e.slice(1,c)):(t.name=e.slice(s,a),t.base=e.slice(s,c)),t.ext=e.slice(a,c)),s>0?t.dir=e.slice(0,s-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,e.exports=a},8002(e){"use strict";e.exports=Math.min},8068(e){"use strict";e.exports=SyntaxError},8167(e,t,n){"use strict";const{promisify:r}=n(4905),{tryToCatch:o}=n(980),{fullstore:i}=n(887);n(1825);const a=n(9168),s=n(1256),c=n(5670),l=n(3543),{Dialog:u}=c,{Key:f,config:d}=CloudCmd;let p,m,h;CloudCmd.TerminalRun=t;const g=i();function y(){CloudCmd.View.hide()}e.exports.init=async()=>{d("terminal")&&(l.show.load("top"),await CloudCmd.View(),await(async()=>{const{prefix:e}=CloudCmd,t=`${C()}/gritty.js`,n=`${e}/dist/terminal.css`,[r]=await o(s.parallel,[t,n]);if(r){const e=r.target.src.replace(globalThis.location.href,"");return u.alert(`file ${e} could not be loaded`)}p=!0})())},e.exports.show=r((e={},t)=>{if(!p)return t(null,-1);d("terminal")&&(function(e){const{cwd:t=c.getCurrentDirPath(),command:n,autoClose:r,closeMessage:o="Press any key to close Terminal..."}=e,i={cwd:t,env:w(),prefix:CloudCmd.prefixSocket+"/gritty",socketPath:CloudCmd.prefix,fontFamily:"Droid Sans Mono",command:n,autoRestart:!1};let s=!1;const{socket:l,terminal:u}=gritty(document.body,i);h=l,m=u,m.onKey(({domEvent:e})=>{const{keyCode:t,shiftKey:n}=e;s&&y(),n&&t===f.ESC&&y()}),h.on("exit",e=>{if(g(e),r)return y();u.write(`\n${o}`),s=!0}),h.on("connect",a.with(b,l))}(e),CloudCmd.View.show(m.element,{afterShow:()=>{m.focus()},afterClose:()=>{t(null,g())}}))}),e.exports.hide=y;const C=()=>CloudCmd.prefix+"/gritty";const w=()=>({ACTIVE_DIR:c.getCurrentDirPath,PASSIVE_DIR:c.getNotCurrentDirPath,CURRENT_NAME:c.getCurrentName,CURRENT_PATH:c.getCurrentPath});function b(e){e.emit("auth",d("username"),d("password")),e.on("reject",()=>{u.alert("Wrong credentials!")})}},8184(e,t,n){"use strict";var r=n(6556),o=n(9721)(/^\s*(?:function)?\*/),i=n(9092)(),a=n(3628),s=r("Object.prototype.toString"),c=r("Function.prototype.toString"),l=n(4233);e.exports=function(e){if("function"!=typeof e)return!1;if(o(c(e)))return!0;if(!i)return"[object GeneratorFunction]"===s(e);if(!a)return!1;var t=l();return t&&a(e)===t.prototype}},8278(e,t,n){e.exports=n(4261)},8298(e,t,n){"use strict";var r=n(8553);CloudCmd.CommandLine={init:()=>{},show:async function(){const[,e]=await r.prompt("Command Line",""),t="^(t|terminal)";if(RegExp(`${t}$`).test(e))return await CloudCmd.Terminal.show();if(RegExp(t).test(e)){const n=e.replace(RegExp(`${t} `),"");return void(-1===await CloudCmd.TerminalRun.show({command:`bash -c '${n}'`})&&await r.alert("☝️ Looks like Terminal is disabled, start Cloud Coammnder with '--terminal' flag."))}},hide:function(){}}},8328(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>r,fullstore:()=>o});const r=/^(6(11|36|5|8)|104|433|939|955)$/.test(n.j)?null:o;function o(e){const t={value:e};return(...e)=>{const[n]=e;return e.length?(t.value=n,n):t.value}}},8453(e,t,n){"use strict";n.r(t),n.d(t,{FS:()=>c,MAX_FILE_SIZE:()=>f,_getDataName:()=>h,_getSize:()=>w,apiURL:()=>u,buildFromJSON:()=>g,formatMsg:()=>d,getDotDot:()=>v,getHeaderField:()=>s,getPathLink:()=>m,getTitle:()=>p});var r=n(6686),o=n(4299),i=n(8328),a=n(1849);const s=o(function(e,t,n){return e!==n||"name"===e&&"asc"===t?n:`${n}${"asc"===t?"↑":"↓"}`}),c="/fs",l=(0,i.default)();l("/");const u="/api/v1",f=/^(8(|00|58)|443|531|589|635|650|795|900)$/.test(n.j)?512e3:null,d=(e,t,n)=>((t=t||"")&&(t=`("${t}")`),`${e}: ${n=n||"ok"}${t}`),p=e=>{e=e||{};const{path:t=l(),name:n}=e;return[n||"Cloud Commander",t].filter(Boolean).join(" - ")};function m(e,t,n){if(!e)throw Error("url could not be empty!");if(!n)throw Error("template could not be empty!");const o=["/",...e.split("/").slice(1,-1)],i=[],a=o.length;let s="/";for(let e=0;e<a;e++){const c=o[e];if(e&&(s+=`${c}/`),e&&e===a-1){i.push(`${c}/`);continue}const l=e?"/":"";i.push(r(n,{path:s,name:c,slash:l,prefix:t}))}return i.join("")}function h(e){return`data-name="js-file-${btoa(encodeURI(e))}" `}const g=e=>{const{prefix:t,template:n,sort:o="name",order:i="asc",showDotFiles:u}=e,f=n.file,d=n.link,p=e.data,g=(0,a.l)(p.path),{files:w}=p,b=m(g,t,n.pathLink);let D=r(n.path,{link:t+c+g,fullPath:g,path:b});const x=s(o,i),E=x("name"),O=x("size"),S=x("date"),A=r(f,{tag:"div",attribute:'data-name="js-fm-header" ',className:"fm-header",type:"",name:E,size:O,date:S,owner:"owner",mode:"mode"});if(l(g),D+=`${A}<ul data-name="js-files" class="files">`,"/"!==g){const e=v(g),o=t+c+e,i=r(n.link,{link:o,title:"..",name:".."}),a=`draggable="true" ${h("..")}`;D+=r(n.file,{tag:"li",attribute:a,className:"",type:"directory",name:i,size:"<dir>",date:"--.--.----",owner:".",mode:"--- --- ---"})}return D+=w.filter((({showDotFiles:e})=>({name:t})=>!!e||!t.startsWith("."))({showDotFiles:u})).map(y).map(e=>{const n=(0,a.l)(e.name),o=t+c+g+n,{type:i,mode:s,date:l,owner:u,size:p}=e,m=r(d,{link:o,title:n,name:n,attribute:C(e.type)}),y=h(e.name);return r(f,{tag:"li",attribute:`draggable="true" ${y}`,className:"",type:i,name:m,size:p,date:l,owner:u,mode:s})}).join(""),D+="</ul>",D},y=e=>({...e,date:e.date||"--.--.----",owner:e.owner||"root",size:b(e)});function C(e){return"directory"===e?"":'target="_blank" '}const w=/^(8(|00|58)|443|531|589|635|650|795)$/.test(n.j)?b:null;function b({size:e,type:t}){return"directory"===t?"<dir>":/link/.test(t)?"<link>":e}function v(e){const t=e.substr(e,e.lastIndexOf("/"));return t.substr(t,t.lastIndexOf("/"))||"/"}},8530(e,t,n){"use strict";n.d(t,{A:()=>r});const r=({autoSize:e,isTitle:t})=>{const n=["modal-main"];return e&&n.push("modal-autosize"),t&&n.push("modal-is-title"),n.join(" ")}},8553(e,t,n){"use strict";if(n.r(t),n.d(t,{alert:()=>x,confirm:()=>O,progress:()=>S,prompt:()=>E}),/^(8(|00|58)|443|762)$/.test(n.j))var r=n(980);var o=n(4299),i=n(8328),a=n(407);const s=o(function(e,t,n,r){const o={ENTER:13,ESC:27,TAB:9,LEFT:37,UP:38,RIGHT:39,DOWN:40},{keyCode:i}=r,a=r.target,s=b(e,["ok","cancel","input"]).map(g);switch(i){case o.ENTER:C(a,e,t,n),r.preventDefault();break;case o.ESC:v(e),n();break;case o.TAB:r.shiftKey&&y(e,s),y(e,s),r.preventDefault();break;default:["left","right","up","down"].filter(e=>i===o[e.toUpperCase()]).forEach(()=>{!function(e,t){const n=g(document.activeElement),r=/ok|cancel/.test(n),o=t.length-1;if("input"===n||!o||!r)return;const i=(e=>"cancel"===e?"ok":"cancel")(n);for(const t of b(e,[i]))t.focus()}(e,s)})}r.stopPropagation()}),c={ok:"OK"},l={ok:"OK",cancel:"Cancel"},u=(0,i.default)(100),f=(e,t,n)=>h(e,t,"",m(n)||c,n),d=(e,t,n="",r)=>{const o=function(e={}){const{type:t}=e;return"password"===t?"password":"text"}(r);return h(e,t,`<input type="${o}" value="${String(n).replace(/"/g,""")}" data-name="js-input">`,m(r)||l,r)},p=(e,t,n)=>h(e,t,"",m(n)||l,n);function m(e={}){const{buttons:t}=e;return t||null}function h(e,t,n,r,c){const l=(0,i.default)(),f=(0,i.default)(),d=new Promise((e,t)=>{const n=c&&"boolean"==typeof c.cancel&&!c.cancel;l(e),f(n?()=>{}:()=>t(Error()))}),p=function(e,t,n,r){return`<div class="page">\n <div data-name="js-close" class="close-button"></div>\n <header>${e}</header>\n <div class="content-area">${t.replace(/\n/g,"<br>")}${n}</div>\n <div class="action-area">\n <div class="button-strip">\n ${function(e){const t=Object.keys(e),n=o((e,t,n)=>`<button\n tabindex=${n}\n data-name="js-${t.toLowerCase()}">\n ${e[t]}\n </button>`);return t.map(n(e)).join("")}(r)}\n </div>\n </div>\n </div>`}(e,t,n,r),m=a("div",{innerHTML:p,className:"smalltalk",style:`z-index: ${u(u()+1)}`});for(const e of b(m,["ok","input"]))e.focus();for(const e of b(m,["input"]))e.setSelectionRange(0,n.length);!function(e,t,n,r){for(const e of b(t,["cancel","close","ok"]))e.addEventListener("click",r)}(0,m,0,e=>{C(e.target,m,l(),f())});for(const e of["click","contextmenu"])m.addEventListener(e,e=>{e.stopPropagation();for(const e of b(m,["ok","input"]))e.focus()});return m.addEventListener("keydown",s(m,l(),f())),Object.assign(d,{dialog:m,ok:l})}function g(e){return e.getAttribute("data-name").replace("js-","")}function y(e,t){const n=g(document.activeElement),r=((e,t)=>t===e?0:t+1)(t.length-1,t.indexOf(n)),o=t[r];for(const t of b(e,[o]))t.focus()}function C(e,t,n,r){const o=e.getAttribute("data-name").replace("js-","");if(/close|cancel/.test(o))return r(),void v(t);let i=null;for(const e of b(t,["input"]))({value:i}=e);n(i),v(t)}const w=o((e,t)=>e.querySelector(`[data-name="js-${t}"]`));function b(e,t){return t.map(w(e)).filter(Boolean)}function v(e){const{parentElement:t}=e;t&&t.removeChild(e)}const D="Cloud Commander",x=(...e)=>f(D,...e,{cancel:!1}),E=(...e)=>(0,r.tryToCatch)(d,D,...e),O=(...e)=>(0,r.tryToCatch)(p,D,...e),S=(...e)=>((e,t,n)=>{const r=h(e,t,'\n <progress value="0" data-name="js-progress" class="progress" max="100"></progress>\n <span data-name="js-counter">0%</span>\n ',{cancel:"Abort"},n),{ok:o,dialog:i}=r,a=o();for(const e of b(i,["cancel"]))e.focus();return Object.assign(r,{setProgress(e){const[t]=b(i,["progress"]),[n]=b(i,["counter"]);t.value=e,n.textContent=`${e}%`,100===e&&(v(i),a())},remove(){v(i)}}),r})(D,...e);x.noFiles=()=>f(D,"No files selected!",{cancel:!1})},8555(e,t,n){"use strict";n.d(t,{G:()=>r});const r=(e,t,n)=>n?`${e} ${t} -> ${n}`:`${e} ${t}`},8590(e,t,n){"use strict";n.d(t,{A:()=>r});var r=/^8(|00|58)$/.test(n.j)?function(e){if("string"!=typeof e)throw Error("just-capitalize expects a string argument");return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}:null},8633(e){var t=String,n=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};e.exports=n(),e.exports.createColors=n},8648(e){"use strict";e.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},8721(e,t,n){"use strict";var r=n(4299),o=n(9317),i=n(8328),a=n(1256),s=n(407),c=n(980),l=n(2882),u=n(8553),f=n(3543);const d=e=>{const t={};return Function("module",e)(t),t.exports};var p=n(6967);const m=(0,i.fullstore)(1),h=e=>"number"==typeof e,{entries:g,assign:y}=Object,C=a.css,w=(0,i.fullstore)();CloudCmd.UserMenu={init:async function(){await Promise.all([C(`${CloudCmd.prefix}/dist/user-menu.css`),CloudCmd.View()])},show:async function(){f.show.load("top");const{dirPath:e}=v,t=await fetch(`${CloudCmd.prefix}/api/v1/user-menu?dir=${e}`),n=await t.text(),[r,o]=((e,...t)=>{try{return[null,e(...t)]}catch(e){return[e]}})(d,n);if(f.hide(),r)return u.alert(P({error:r,source:n}));w(n);const{names:i,keys:a,items:c,settings:l}=(e=>{const t=[],n={},r={},o={};for(const[i,a]of g(e)){if("__settings"===i){y(o,e[i]);continue}if(i.startsWith("_"))continue;t.push(i);const[s,c]=i.split(" - ");n[s]=a,r[c]=a}return{names:t,keys:n,items:r,settings:o}})(o);if(l.run)return(async(e,t,n)=>{for(const r of e)await n(t[r])})(l.select,c,A);const p=s("button",{className:"cloudcmd-user-menu-button",innerText:"User Menu",notAppend:!0}),m=s("select",{className:"cloudcmd-user-menu",innerHTML:D(i),notAppend:!0,size:10});p.addEventListener("click",O(o,m)),m.addEventListener("dblclick",E(o)),m.addEventListener("keydown",S({keys:a,userMenu:o})),CloudCmd.View.show([p,m],{autoSize:!0,afterShow:()=>m.focus()})},hide:x};const{Key:b}=CloudCmd,{CurrentInfo:v}=DOM;function D(e){const t=[];for(const n of e)t.push(`<option>${n}</option>`);return t.join("")}function x(){CloudCmd.View.hide()}const E=r(async(e,t)=>{const{value:n}=t.target;await A(e[n])}),O=o(async(e,{value:t})=>{await A(e[t])}),S=r(async({keys:e,userMenu:t},n)=>{const{keyCode:r,target:o}=n,i=n.key.toUpperCase();let a;if(n.preventDefault(),n.stopPropagation(),r===b.ESC)return x();if(r===b.ENTER)a=t[o.value];else{if(!e[i])return((e,{key:t,keyCode:n})=>{if(/^\d+$/.test(t)&&m(Number(t)),n===p.DOWN||n===p.J){const t=m();return m(1),function(e,t){const{length:n}=e;e.selectedIndex===n-1?e.selectedIndex=0:e.selectedIndex+=t,e.selectedIndex<0&&(e.selectedIndex=n-1)}(e,t)}if(n===p.UP||n===p.K){const t=m();return m(1),function(e,t){const{length:n}=e;e.selectedIndex?e.selectedIndex-=t:e.selectedIndex=n-1,e.selectedIndex<0&&(e.selectedIndex=0)}(e,t)}})(o,n);a=e[i]}await A(a)}),A=async e=>{x();const[t]=await(0,c.tryToCatch)(e,{DOM,CloudCmd,tryToCatch:c.tryToCatch});if(!t)return;const n=w();return u.alert(P({error:t,source:n}))};function P({error:e,source:t}){const{code:n}=e;if(!n||"frame"===n)return e.message;const[r,o]=(e=>{const{lineNumber:t,columnNumber:n}=e;if(h(t)&&h(n))return[t,n];const r=e.stack.indexOf(">"),o=e.stack.slice(r+1),i=o.indexOf(")"),a=o.slice(1,i),[s,c]=a.split(":");return[Number(s),Number(c)]})(e),i={start:{line:r,column:o}};return`<pre>${(0,l.gl)(t,i,{message:e.message,highlightCode:!1})}</pre>`}},8812(e){"use strict";e.exports=class{getItem(e){return this.isName(e)?e.parentElement:e}getName(e){return e?this.isName(e)?e:e.querySelector("[data-menu-path]"):null}isName(e){return!!e&&e.hasAttribute("data-menu-path")}isItem(e){return this.checkElementsName(e,"js-menu-item")}isMenu(e){return this.checkElementsName(e,"js-menu")}checkElementsName(e,t,n){return n||(n="data-name"),!(!e||e.getAttribute(n)!==t)}isSubMenu(e){const t=this.getItem(e);return this.checkElementsName(t,"js-submenu","data-menu")}}},8968(e){"use strict";e.exports=Math.floor},9032(e,t,n){"use strict";var r=n(7244),o=n(8184),i=n(5767),a=n(5680);function s(e){return e.call.bind(e)}var c="undefined"!=typeof BigInt,l="undefined"!=typeof Symbol,u=s(Object.prototype.toString),f=s(Number.prototype.valueOf),d=s(String.prototype.valueOf),p=s(Boolean.prototype.valueOf);if(c)var m=s(BigInt.prototype.valueOf);if(l)var h=s(Symbol.prototype.valueOf);function g(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function y(e){return"[object Map]"===u(e)}function C(e){return"[object Set]"===u(e)}function w(e){return"[object WeakMap]"===u(e)}function b(e){return"[object WeakSet]"===u(e)}function v(e){return"[object ArrayBuffer]"===u(e)}function D(e){return"undefined"!=typeof ArrayBuffer&&(v.working?v(e):e instanceof ArrayBuffer)}function x(e){return"[object DataView]"===u(e)}function E(e){return"undefined"!=typeof DataView&&(x.working?x(e):e instanceof DataView)}t.isArgumentsObject=r,t.isGeneratorFunction=o,t.isTypedArray=a,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):a(e)||E(e)},t.isUint8Array=function(e){return"Uint8Array"===i(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===i(e)},t.isUint16Array=function(e){return"Uint16Array"===i(e)},t.isUint32Array=function(e){return"Uint32Array"===i(e)},t.isInt8Array=function(e){return"Int8Array"===i(e)},t.isInt16Array=function(e){return"Int16Array"===i(e)},t.isInt32Array=function(e){return"Int32Array"===i(e)},t.isFloat32Array=function(e){return"Float32Array"===i(e)},t.isFloat64Array=function(e){return"Float64Array"===i(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===i(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===i(e)},y.working="undefined"!=typeof Map&&y(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(y.working?y(e):e instanceof Map)},C.working="undefined"!=typeof Set&&C(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(C.working?C(e):e instanceof Set)},w.working="undefined"!=typeof WeakMap&&w(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(w.working?w(e):e instanceof WeakMap)},b.working="undefined"!=typeof WeakSet&&b(new WeakSet),t.isWeakSet=function(e){return b(e)},v.working="undefined"!=typeof ArrayBuffer&&v(new ArrayBuffer),t.isArrayBuffer=D,x.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&x(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=E;var O="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function S(e){return"[object SharedArrayBuffer]"===u(e)}function A(e){return void 0!==O&&(void 0===S.working&&(S.working=S(new O)),S.working?S(e):e instanceof O)}function P(e){return g(e,f)}function M(e){return g(e,d)}function k(e){return g(e,p)}function F(e){return c&&g(e,m)}function j(e){return l&&g(e,h)}t.isSharedArrayBuffer=A,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===u(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===u(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===u(e)},t.isGeneratorObject=function(e){return"[object Generator]"===u(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===u(e)},t.isNumberObject=P,t.isStringObject=M,t.isBooleanObject=k,t.isBigIntObject=F,t.isSymbolObject=j,t.isBoxedPrimitive=function(e){return P(e)||M(e)||k(e)||F(e)||j(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(D(e)||A(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})},9074(){"undefined"!=typeof window&&function(e){"use strict";if(e.DOMTokenList){var t=document.createElement("a").classList,n=DOMTokenList.prototype,r=n.add,o=n.remove,i=n.toggle;t.add("c1","c2");var a=function(e){return function(){var t,n=arguments;for(t=0;t<n.length;t+=1)e.call(this,n[t])}};t.contains("c2")||(n.add=a(r),n.remove=a(o)),t.toggle("c1",!0)||(n.toggle=function(e,t){return void 0===t?i.call(this,e):((t?r:o).call(this,e),!!t)})}}(window),"undefined"!=typeof window&&function(e){"use strict";var t=[],n=function(e,n){var r;if(t.indexOf)return t.indexOf.call(e,n);for(r=0;r<e.length;r++)if(e[r]===n)return r;return-1},r=function(e){if(""===e||/[\u0009\u000A\u000C\u000D\u0020]/.test(e))throw new Error("Token must not be empty or contain whitespace.")},o=function(e,t){var n,r=this,o=[];if(e&&t&&(r.element=e,r.prop=t,e[t]))for(o=e[t].replace(/^\s+|\s+$/g,"").split(/\s+/),n=0;n<o.length;n++)r[n]=o[n];r.length=o.length};o.prototype={add:function(){var e,n=this,o=arguments;for(e=0;e<o.length;e++)r(o[e]),n.contains(o[e])||t.push.call(n,o[e]);n.element&&(n.element[n.prop]=n)},contains:function(e){return r(e),-1!==n(this,e)},item:function(e){return this[e]||null},remove:function(){var e,o,i=arguments,a=this;for(o=0;o<i.length;o++)r(i[o]),-1!==(e=n(a,i[o]))&&t.splice.call(a,e,1);a.element&&(a.element[a.prop]=a)},toggle:function(e,t){var n=this;return n.contains(e)?!!t||(n.remove(e),!1):!1!==t&&(n.add(e),!0)},toString:function(){return t.join.call(this," ")}},e.DOMTokenList=o}(window),"undefined"!=typeof window&&function(){"use strict";"classList"in document.createElement("a")||Object.defineProperty(Element.prototype,"classList",{get:function(){return new DOMTokenList(this,"className")}})}(),"undefined"!=typeof window&&function(){"use strict";if(!("relList"in document.createElement("a"))){var e,t=[HTMLAnchorElement,HTMLAreaElement,HTMLLinkElement],n=function(){return new DOMTokenList(this,"rel")};for(e=0;e<t.length;e++)Object.defineProperty(t[e].prototype,"relList",{get:n})}}(),"undefined"!=typeof window&&function(){"use strict";"undefined"!=typeof SVGElement&&("classList"in document.createElementNS("http://www.w3.org/2000/svg","svg")&&!window.QUnit||Object.defineProperty(SVGElement.prototype,"classList",{get:function(){return"string"==typeof this.className?new DOMTokenList(this,"className"):"string"==typeof this.className.baseVal?new DOMTokenList(this.className,"baseVal"):void 0}}))}()},9092(e,t,n){"use strict";var r=n(1333);e.exports=function(){return r()&&!!Symbol.toStringTag}},9168(e){!function(t){"use strict";function n(){var e=Array.prototype.slice,t=function(t){var n,r="function"==typeof t,o=e.call(arguments,1);return r&&(n=t.apply(null,o)),n};return t.with=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);return function(){var r=t.call(arguments),o=n.concat(r);return e.apply(null,o)}},t.ret=function(){var n=e.call(arguments);return n.unshift(t),t.with.apply(null,n)},t.if=function(e,n,r){e?t(n):t(r,n)},t.ifExist=function(e,t,n){var r=e&&e[t];r&&(r=r.apply(e,n))},t.parallel=function(n,r){var o,i,a="could not be empty!",s=[],c=!1,l=[],u=0,f=0,d=(o=n,i=new RegExp("\\s([a-zA-Z]+)"),{}.toString.call(o).match(i)[1].toLowerCase());if(!n)throw Error("funcs "+a);if(!r)throw Error("callback "+a);switch(d){case"array":f=n.length,n.forEach(function(e,n){t(e,function(){p(n,arguments)})});break;case"object":s=Object.keys(n),f=s.length,s.forEach(function(e){var r=n[e];t(r,function(){p(e,arguments)})})}function p(t,n){var o,i=e.call(n,1),a=n[0],s=i.length;o=++u===f,a||(l[t]=s>=2?i:i[0]),c||!a&&!o||(c=!0,"array"===d?r.apply(null,[a].concat(l)):r(a,l))}},t.series=function(e,n){var r,o=e.length;if(!Array.isArray(e))throw Error("funcs should be array!");r=e.shift(),t(r,function(r){(function(e){var r;return--o&&!e||(r=!0,t(n,e)),r})(r)||t.series(e,n)})},t.each=function(e,n,r){var o=e.map(function(e){return n.bind(null,e)});o.length?t.parallel(o,r):r()},t.eachSeries=function(e,n,r){var o=e.map(function(e){return n.bind(null,e)});if("function"!=typeof r)throw Error("callback should be function");o.length?t.series(o,r):r()},t.try=function(e){var t;try{t=e()}catch(e){t=e}return t},t}e.exports?e.exports=new n:t.exec=new n}(this)},9209(e,t,n){"use strict";var r=n(6578),o=globalThis;e.exports=function(){for(var e=[],t=0;t<r.length;t++)"function"==typeof o[r[t]]&&(e[e.length]=r[t]);return e}},9227(e,t,n){"use strict";n.r(t),n.d(t,{add:()=>i,addClick:()=>f,addContextMenu:()=>p,addKey:()=>l,addLoad:()=>m,addOnce:()=>a,remove:()=>s,removeAll:()=>c,rmClick:()=>d,rmKey:()=>u});var r=n(2515),o=n(726);const i=(e,t,n)=>(h(e),y(e,t,n,(e,t)=>{const[n,r,i]=t;e.addEventListener(n,r,i),o.add(e,n,r)}),C),a=(e,t,n)=>{const r=o=>{C.remove(e,t,r),n(o)};return n||(n=t,t=null),i(e,t,r),C},s=(e,t,n)=>(h(e),y(e,t,n,(e,t)=>{e.removeEventListener(...t)}),C),c=()=>{const e=o.get();for(const[t,n,r]of e)t.removeEventListener(n,r);o.clear()},l=function(...e){return i("keydown",...e)},u=function(...e){return C.remove("keydown",...e)},f=function(...e){return C.add("click",...e)},d=function(...e){return s("click",...e)},p=function(...e){return i("contextmenu",...e)},m=function(...e){return i("load",...e)};function h(e){if(!e)throw Error("type could not be empty!")}const g=e=>"touchstart"===e&&{passive:!0};function y(e,t,n,o){let i;const a=[e,t,n,o],s=r(e);switch(s){default:if(!s.endsWith("element"))throw Error(`unknown eventName: ${s}`);y(a[1],a[0],n,o);break;case"string":i=r.function(t),i&&(n=t,t=null),t||(t=window),o(t,[e,n,g(e)]);break;case"array":for(const r of e)y(r,t,n,o);break;case"object":for(const n of Object.keys(e))y(n,t,e[n],o)}}const C={add:i,addClick:f,addContextMenu:p,addKey:l,addLoad:m,addOnce:a,remove:s,removeAll:c,rmClick:d,rmKey:u}},9290(e){"use strict";e.exports=RangeError},9317(e){"use strict";const t=e=>(...t)=>(...n)=>e(...t,...n);e.exports=(e,...n)=>(function(e){if("function"!=typeof e)throw Error("fn should be a function!")}(e),n.length?t(e)(...n):t(e))},9353(e){"use strict";var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n};e.exports=function(e){var o=this;if("function"!=typeof o||"[object Function]"!==t.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,a=function(e){for(var t=[],n=1,r=0;n<e.length;n+=1,r+=1)t[r]=e[n];return t}(arguments),s=n(0,o.length-a.length),c=[],l=0;l<s;l++)c[l]="$"+l;if(i=Function("binder","return function ("+function(e){for(var t="",n=0;n<e.length;n+=1)t+=e[n],n+1<e.length&&(t+=",");return t}(c)+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof i){var t=o.apply(this,r(a,arguments));return Object(t)===t?t:this}return o.apply(e,r(a,arguments))}),o.prototype){var u=function(){};u.prototype=o.prototype,i.prototype=new u,u.prototype=null}return i}},9383(e){"use strict";e.exports=Error},9466(e,t,n){"use strict";const{tryToCatch:r}=n(980);CloudCmd.EditNames=t;const o=n(9168),i=n(3850),{multiRename:a}=n(5306),s=DOM.CurrentInfo,{Dialog:c}=DOM;let l;const u={beforeClose:async()=>{o.ifExist(l,"hide"),DOM.Events.remove("keydown",f),await y()}};async function f(e){const t=e.ctrlKey,n=e.metaKey,r=t||n,{Key:o}=CloudCmd;if(r&&e.keyCode===o.S)p();else if(r&&e.keyCode===o.P){const[,e]=await c.prompt("Apply pattern:","[n][e]");e&&function(e){const t=a(e,d());CloudCmd.Edit.getEditor().setValue(t.join("\n"))}(e)}}function d(){return DOM.getFilenames(DOM.getActiveFiles())}function p(){CloudCmd.Edit.hide()}async function m(){const e=s.dirPath,t=d(),n=t.indexOf(s.name),o=CloudCmd.Edit.getEditor().getValue().split("\n"),i=function(e,t,n){const r=function(e,t){return"/"===e?t:e+t}(CloudCmd.config("root"),e),{prefix:o}=CloudCmd;return fetch(`${o}/rename`,{method:"put",credentials:"include",body:JSON.stringify({from:t,to:n,dir:r})})}(e,t,o),[a]=await r(h,o,n,i);a&&alert(a)}function h(e,t,n){if(404===n.status)throw n.text();const r=e[t];CloudCmd.refresh({currentName:r})}function g(e){const t={x:e.clientX,y:e.clientY};if(e.preventDefault(),l)return;const n=CloudCmd.Edit.getEditor(),r={beforeShow:e=>{e.x-=18,e.y-=27},afterClick:()=>{n.focus()}},o={"Save Ctrl+S":async()=>{await m(),p()},"Go To Line Ctrl+G":()=>{n.goToLine()},"Cut Ctrl+X":()=>{n.cutToClipboard()},"Copy Ctrl+C":()=>{n.copyToClipboard()},"Paste Ctrl+V":()=>{n.pasteFromClipboard()},"Delete Del":()=>{n.remove("right")},"Select All Ctrl+A":()=>{n.selectAll()},"Close Esc":p},a=CloudCmd.Edit.getElement();l=i(a,r,o),l.addContextMenuListener(),l.show(t.x,t.y)}async function y(){if(!CloudCmd.Edit.getEditor().isChanged())return;const[e]=await c.confirm("Apply new names?");!e&&await m()}e.exports.init=async()=>{await CloudCmd.Edit(),function(){const e=CloudCmd.Edit.getElement();DOM.Events.addOnce("contextmenu",e,g)}()},e.exports.show=e=>{const t=d().join("\n"),n={...u,...e};return".."===s.name&&1===t.length?c.alert.noFiles():(DOM.Events.addKey(f),CloudCmd.Edit.getEditor().setValueFirst("edit-names",t).setMode().setOption("keyMap","default").disableKey(),CloudCmd.Edit.show(n),CloudCmd.Edit)},e.exports.hide=p,e.exports.isChanged=y},9538(e){"use strict";e.exports=ReferenceError},9600(e){"use strict";var t,n,r=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},o(function(){throw 42},null,t)}catch(e){e!==n&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(e){try{var t=r.call(e);return i.test(t)}catch(e){return!1}},s=function(e){try{return!a(e)&&(r.call(e),!0)}catch(e){return!1}},c=Object.prototype.toString,l="function"==typeof Symbol&&!!Symbol.toStringTag,u=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var d=document.all;c.call(d)===c.call(document.all)&&(f=function(e){if((u||!e)&&(void 0===e||"object"==typeof e))try{var t=c.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=o?function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{o(e,null,t)}catch(e){if(e!==n)return!1}return!a(e)&&s(e)}:function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(l)return s(e);if(a(e))return!1;var t=c.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&s(e)}},9612(e){"use strict";e.exports=Object},9675(e){"use strict";e.exports=TypeError},9698(e,t,n){"use strict";CloudCmd.Markdown=t;const r=n(407),o=n(3543),{Markdown:i}=n(507),{alert:a}=n(8553);e.exports.init=async()=>{o.show.load("top"),await CloudCmd.View()},e.exports.show=async function(e,t={}){const{positionLoad:n,relative:s}=t;o.show.load(n),s&&(e+="?relative");const[c,l]=await i.read(e);if(o.hide(),c)return a(c.message,{cancel:!1});const u=r("div",{className:"help",innerHTML:l});CloudCmd.View.show(u)},e.exports.hide=()=>{CloudCmd.View.hide()}},9721(e,t,n){"use strict";var r=n(6556),o=n(4035),i=r("RegExp.prototype.exec"),a=n(9675);e.exports=function(e){if(!o(e))throw new a("`regex` must be a RegExp");return function(t){return null!==i(e,t)}}},9775(e){"use strict";const t=e=>"function"==typeof e;e.exports=(e,n,r)=>{!function(e,n,r){if(!Array.isArray(e))throw Error("array should be an array!");if(!t(n))throw Error("iterator should be a function!");if(!t(r))throw Error("done should be a function!")}(e,n,r);let o=-1;const i=e.length,a=t=>{if(++o,t||o===i)return r(t);n(e[o],a)};a()}},9915(e,t,n){"use strict";var r=n(8278);function o(e,t){if(!(this instanceof o))return new o(e,t);this._dirs=0,this._first=!0,this._find(e,t)}e.exports=function(e){var t=r();return setTimeout(function(){o(t,e)},0),t},o.prototype._find=function(e,t){var n=this;if(t.isFile)return e.emit("file",t.fullPath,t),void(this._first&&e.emit("end"));this._first&&(this._first=!1),e.emit("directory",t.fullPath,t),++this._dirs,t.createReader().readEntries(function(t){[].forEach.call(t,function(t){n._find(e,t)}),--n._dirs,n._dirs||e.emit("end")})}},9957(e,t,n){"use strict";var r=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=n(6743);e.exports=i.call(r,o)}}]);
|
|
5
|
+
`,notAppend:!0});return m=e,e}();await CloudCmd.View(),await C(e)},show:function(e){g||(CloudCmd.View.show(m,function(e={}){const t={...e,...y};return e.afterShow?(function(e,t){if("function"!=typeof t)throw Error("options.afterShow should be a function!")}(0,e.afterShow),t.afterShow=()=>{y.afterShow(),e.afterShow()},t):t}(e)),u().setOptions({fontSize:16}))},hide:function(){CloudCmd.View.hide()},getEditor:u,getElement:function(){return m}};const p=CloudCmd.config("editor");let m,h,g=!0;const y={afterShow:()=>{h.moveCursorTo(0,0).focus()}},C=async e=>{const t=`${CloudCmd.prefix}/${p}`,n=CloudCmd.prefix,r=`${CloudCmd.prefixSocket}/${p}`,a=`${t}/${p}.js`;(0,l.time)(`${d} load`),await f(a);const s=(0,o.F)(window[p]),[u]=await(0,i.tryToCatch)(s,e,{maxSize:c.MAX_FILE_SIZE,prefix:t,prefixSocket:r,socketPath:n});(0,l.timeEnd)(`${d} load`),h=u,g=!1}},6549(e){"use strict";e.exports=Object.getOwnPropertyDescriptor},6556(e,t,n){"use strict";var r=n(453),o=n(3126),i=o([r("%String.prototype.indexOf%")]);e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o([n]):n}},6564(e,t,n){"use strict";var r=n(9227);const{CloudCmd:o}=globalThis;o.EditFileVim={init:async function(){await o.EditFile()},show:async function(){r.addKey(c),(await o.EditFile.show(a)).getEditor().setKeyMap("vim")},hide:s};const{Key:i}=o,a={bindKeys:!1,beforeClose:()=>{r.rmKey(c),o.EditFile.isChanged()}};function s(){o.Edit.hide()}function c(e){const{keyCode:t,shiftKey:n}=e;n&&t===i.ESC&&(e.preventDefault(),s())}},6578(e){"use strict";e.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},6686(e){"use strict";const t=e=>()=>e,{keys:n}=Object;function r(e,t,n){if(!n)return[`{{ ${e} }}`,t[e]];const r=e.replaceAll("{{","").replaceAll("}}","").replaceAll(" ",""),o=t[r]||"";if(!r.includes("|"))return[e,o];const[i,a]=r.split("|"),s=n[a],c=t[i];return s?[e,s(c)]:[e,c]}e.exports=(e,o,i)=>{!function(e,t){if("string"!=typeof e)throw Error("template should be a string!");if("object"!=typeof t)throw Error("values should be an object!")}(e,o);let a=e;const s=i?e.match(/{{(.*?)}}/g):n(o);for(const e of s){const[n,s]=r(e,o,i),c=t(s);for(;a.includes(n);)a=a.replace(n,c)}return a.includes("{{")&&(a=a.replace(/{{.*?}}/g,"")),a}},6698(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},6714(e,t,n){"use strict";var r={};n.r(r),n.d(r,{_onMainClick:()=>M,_optionsStore:()=>P,close:()=>A,open:()=>O});var o=n(6686),i=n(4299),a=n(9317),s=n(980),c=n(1256),l=n(8328),u=n(407),f=n(4801);const d=(e,t,n={})=>{const{query:r=f.A,createElement:o=u}=n;if(r("title"))return void(r("title-text").textContent=e);const i=o("div",{className:"modal-title",dataName:"modal-title",parent:t});o("span",{parent:i,textContent:e,className:"modal-title-text",dataName:"modal-title-text"})},p=(0,l.default)(),m=(0,l.default)(),h=a((e,t)=>C(p()+1,e,t)),g=a((e,t)=>C(p()-1,e,t)),y=a((e,t)=>{e.hidden=!1,t()});function C(e,t,n,{query:r,showTitle:o}){const i=n.length-1;if(e<0||e>i)return;p(e),r("nav-left").hidden=!e,r("nav-right").hidden=e===i;const{href:a,title:s}=n[e];t.src=a,t.title=s,t.href=s,t.alt=s,m().title&&o(s,r("child"))}const w=function(e,t,n={}){const{afterShow:r,helpers:o,index:i,query:a=f.A,createElement:s=u,showTitle:c=d}=n;p(i),m(o);const l=function(){const e=document.createElement("img");return e.className="modal-image",e}();e.appendChild(l),e.hidden=!0,e.appendChild(s("div",{className:"modal-nav modal-nav-left",dataName:"modal-nav-left",innerHTML:"<span></span>"})),e.appendChild(s("div",{className:"modal-nav modal-nav-right",dataName:"modal-nav-right",innerHTML:'<span data-name="modal-next"></span>'})),C(i,l,t,{query:a,showTitle:c}),function(e,t,n){e.addEventListener(t,function(e,t,n){return function r(o){n(o),e.removeEventListener(t,r)}}(e,t,n))}(l,"load",y(e,r)),a("nav-left").addEventListener("click",g(l,t,a)),a("nav-right").addEventListener("click",h(l,t,a)),document.body.addEventListener("keydown",((e,t,n)=>function r(o){let i=p();const{keyCode:a}=o;if(37===a)--i;else{if(39!==a)return 27===a?document.body.removeEventListener("keydown",r):void 0;++i}C(i,e,t,{query:n})})(l,t,a))};var b=n(8530);const v=()=>{},D=(0,l.default)({}),x=i((e,t,n,r)=>n(e).addEventListener(r,t)),{isArray:E}=Array,O=(e,t={})=>{!function(e){if(!e)throw Error("inner should be DOM-element!")}(e);const{beforeShow:n=v,beforeClose:r=v,afterShow:o=v,afterClose:i=v,onOverlayClick:a=v,autoSize:s=!1,index:c=0,helpers:l={},title:p="",query:m=f.A,showTitle:h=d,parseImages:g=w}=t;if(m("main"))return;D({beforeClose:r,afterClose:i}),n();const y=E(e),C=l.title&&p||y,O=(0,b.A)({autoSize:s,isTitle:C}),P=u("div",{innerHTML:'\n <div class="modal-child" data-name="modal-child">\n <div class="modal-close" data-name="modal-close"></div>\n </div>\n',className:O,dataName:"modal-main"});((e,t,n)=>{["click","contextmenu"].map(x("main",t,n))})(0,S(a),m),m("close").addEventListener("click",A);const M=m("child");return y?g(M,e,{index:c,afterShow:o,helpers:l}):(M.appendChild(e),C&&h(p,M),o(),P)},S=(e,t={})=>n=>{const{query:r=f.A}=t;n.target===r("main")&&(A(n),e(n))},A=(e,t={})=>{const{query:n=f.A}=t;e&&e.stopPropagation();const r=n("main"),{beforeClose:o=v,afterClose:i=v}=D();r&&(o(),document.body.removeChild(r),i())},P=D,M=S;var F=n(6088),k=n(806),j=n(9227),T=n(8453),N=n(3543),I=n(1849),R=n(7975);const B=e=>/\.(mp3|ogg|m4a)$/i.test(e),$=i((e,t)=>t.test(e)),_=e=>RegExp(`\\.${e}$`,"i"),L=async e=>((0,R.extname)(e)||(e=await async function(e){const{headers:t}=await fetch(e,{method:"HEAD"});for(const[e,n]of t)if("content-type"===e)return`.${n.split("/").pop()}`;return""}(e)),/\.pdf$/i.test(e)?"pdf":U(e)?"image":function(e){return B(e)||function(e){return/\.(mp4|avi|webm)$/i.test(e)}(e)}(e)?"media":e.endsWith(".html")?"html":(e=>/.\.md$/.test(e))(e)?"markdown":void 0);function U(e){return["jp(e|g|eg)","gif","png","bmp","webp","svg","ico"].map(_).some($(e))}const V=globalThis.CloudCmd||{},z=globalThis.DOM||{},{assign:W}=Object,{isArray:K}=Array,H=i((e,t,n,r)=>e(r,t,n)),G=a((...e)=>{for(const t of e)t()}),q=e=>"function"==typeof e,J=H(j.add),X=c.css;let Y=!1;const Z="View";V[Z]={init:async function(){await async function(){const{DIR_DIST:e}=V;(0,F.time)(`${Z} load`),Y=!0,await X(`${e}/view.css`),Y=!1}(),["click","contextmenu"].forEach(J(void 0,se))},show:async function(e,t={}){const n=V.prefixURL+T.FS;if(Y)return;if(t&&!1===t.bindKeys||j.addKey(ce),ne=u("div",{className:"view",notAppend:!0}),ne.tabIndex=0,e)return K(e)?ne.append(...e):ne.append(e),void O(ne,function(e){const t=W({},oe);if(!e)return t;const n=Object.keys(e);for(const r of n){const n=Boolean(t[r]),o=e[r];if(!q(o)||!n){t[r]=e[r];continue}const i=t[r];t[r]=G(i,o)}return t}(t));N.show.load();const i=n+Q.path;switch(t.raw?"":await L(i)){default:return await async function(){const[e,t]=await Q.getData();if(e)return N.hide();const n=document.createTextNode(t),r=oe;V.config("showFileName")&&(r.title=Q.name),ne.append(n),O(ne,r)}();case"markdown":return await V.Markdown.show(Q.path);case"html":return function(e,t={}){const{modal:n=r}=t;n.open(ie(e),oe)}(i);case"image":return function(e,t){const n=Q.files.map(z.getCurrentPath).filter(t=>U(t)||t===e),r=n.map(e=>({href:`${t}${e}`,title:(0,I.l)(te(e))})),o={index:n.indexOf(Q.path),autoSize:!0,arrows:!0,keys:!0,helpers:{title:{}}},i={...oe,...o};O(r,i)}(Q.path,n);case"media":return await async function(e){const[t,n]=await async function(e){!function(e){if("string"!=typeof e)throw Error("src should be a string!")}(e);const[t,n]=await(0,s.tryToCatch)(k.get,"view/media-tmpl");if(t)return[t];const{name:r}=Q;re||(re=n);const i=B(r)?"audio":"video",a=o(re,{src:e,type:i,name:r});return[null,u("div",{innerHTML:a})]}(e);if(t)return alert(t);const r={...oe,autoSize:!0,afterShow:()=>{n.querySelector("audio, video").focus()}};O(n,r)}(i);case"pdf":return function(e){const t=ie(e),n=W({},oe);V.config("showFileName")&&(n.title=Q.name),O(t,n)}(i)}},hide:ae};const Q=z.CurrentInfo,{Key:ee}=V,te=e=>e.split("/").pop();let ne,re;const oe={beforeShow:()=>{N.hide(),ee.unsetBind()},beforeClose:()=>{j.rmKey(ce),ee.setBind()},afterShow:()=>{ne.focus()},onOverlayClick:se,afterClose:()=>{},autoSize:!1,helpers:{title:{}}};function ie(e,t={}){const{createElement:n=u}=t,r=n("iframe",{src:e,width:"100%",height:"100%"});return r.addEventListener("load",()=>{r.contentWindow.addEventListener("keydown",ce)}),r}function ae(){A()}function se(e){!function(e){const t=z.getCurrentByPosition(e);if(!t)return;const{files:n,filesPassive:r}=Q,o=n.includes(t),i=r.includes(t);(o||i)&&(z.isCurrentFile(t)||z.setCurrentFile(t))}({x:e.clientX,y:e.clientY})}function ce({keyCode:e}){e===ee.ESC&&ae()}},6727(e,t,n){"use strict";const r=n(6686),o=n(4002),i=e=>"object"==typeof e,{entries:a}=Object;e.exports=function e(t,n,s,c=""){let l="";c&&(c+=".");for(const[u,f]of a(t)){let t,a="",d="",p="";const m=c+u;i(f)?(a=r(o.MAIN,{items:e(f,n,s,m)}),d=" menu-submenu",p=' data-menu="js-submenu"'):n[m]=f,s.icon&&(t=u.replace(/\(|\)/g,"").replace(/\s/g,"-").toLowerCase(),d+=` icon icon-${t}`),l+=r(o.ITEM,{name:u,subitems:a,className:d,attribute:p,path:m})}return l}},6735(e){"use strict";e.exports=navigator.clipboard||{readText:function(){return Promise.reject()},writeText:async function(e){const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select();const n=document.execCommand("copy");if(document.body.removeChild(t),!n)return Promise.reject()}}},6743(e,t,n){"use strict";var r=n(9353);e.exports=Function.prototype.bind||r},6897(e,t,n){"use strict";var r=n(453),o=n(41),i=n(592)(),a=n(5795),s=n(9675),c=r("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||c(t)!==t)throw new s("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,l=!0;if("length"in e&&a){var u=a(e,"length");u&&!u.configurable&&(r=!1),u&&!u.writable&&(l=!1)}return(r||l||!n)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},6967(e,t,n){"use strict";n.r(t),n.d(t,{A:()=>v,ASTERISK:()=>_,BACKSLASH:()=>oe,BACKSPACE:()=>r,BRACKET_CLOSE:()=>ie,C:()=>D,CAPSLOCK:()=>a,COLON:()=>Z,D:()=>x,DELETE:()=>C,DOT:()=>te,DOWN:()=>g,END:()=>f,ENTER:()=>i,EQUAL:()=>Q,ESC:()=>s,F1:()=>V,F10:()=>Y,F2:()=>z,F3:()=>W,F4:()=>K,F5:()=>H,F6:()=>G,F7:()=>q,F8:()=>J,F9:()=>X,G:()=>E,HOME:()=>d,HYPHEN:()=>ee,INSERT:()=>y,INSERT_MAC:()=>$,J:()=>O,K:()=>S,LEFT:()=>p,M:()=>A,MINUS:()=>U,O:()=>P,P:()=>M,PAGE_DOWN:()=>u,PAGE_UP:()=>l,PLUS:()=>L,Q:()=>F,R:()=>k,RIGHT:()=>h,S:()=>j,SEMICOLON:()=>b,SLASH:()=>ne,SPACE:()=>c,T:()=>T,TAB:()=>o,TRA:()=>re,U:()=>N,UP:()=>m,V:()=>I,X:()=>R,Z:()=>B,ZERO:()=>w});const r=8,o=9,i=13,a=20,s=27,c=32,l=33,u=34,f=35,d=36,p=37,m=38,h=39,g=40,y=45,C=46,w=48,b=52,v=65,D=67,x=68,E=71,O=74,S=75,A=77,P=79,M=80,F=81,k=82,j=83,T=84,N=85,I=86,R=88,B=90,$=96,_=106,L=107,U=109,V=112,z=113,W=114,K=115,H=116,G=117,q=118,J=119,X=120,Y=121,Z=186,Q=187,ee=189,te=190,ne=191,re=192,oe=220,ie=221},6978(e,t,n){"use strict";var r=n(4299),o=n(9317),i=n(5811),a=n(9168),s=n(1256),c=n(980),l=n(1849),u=n(6088);var f=n(5291),d=n(8555);const{Dialog:p,Images:m}=DOM,h=e=>t=>{const{operation:n,callback:r,noContinue:i,from:a,to:s}=e;let c,l;const u=o(({emitter:e,operation:t})=>{e.abort();const n=`${t} aborted`;l=!0,p.alert(n,{cancel:!1})}),h=t.removeListener.bind(t),g=t.on.bind(t),y=(0,d.G)(n,a,s),C=p.progress(y);C.catch(u({emitter:t,operation:n}));let w=!0;const b={progress:e=>{c=100===e,C.setProgress(e),w=!1},end:()=>{m.hide(),f(h,b),C.remove(),(l||c||w)&&r()},error:async e=>{if(l=e,i)return b.end(e),p.alert(e),void C.remove();const[n]=await p.confirm(`${e}\n Continue?`);if(!c&&!n)return t.continue();t.abort(),C.remove()}};f(g,b)},g=r((e,t)=>!e.includes(t)),y=r((e,t)=>e.filter(g(t))),{DOM:C,CloudCmd:w}=globalThis,{config:b}=w,{Dialog:v,Images:D}=C,x=o(function(e,t){const n=o(t),r=o(v.alert);e.on("accept",n(e)),e.on("reject",r("Wrong credentials!")),e.emit("auth",b("username"),b("password"))}),E={};let O,S,A,P,M,F,k;const j=C.CurrentInfo,T=D.show.load.bind(null,"top"),N=r(async function(e,t){let n,r,o,i,a,s="",c="",u=[];t?(({from:s,to:c,names:u}=t),({panel:o}=j)):(s=j.dirPath,c=C.getNotCurrentDirPath(),n=C.getSelectedFiles(),u=C.getFilenames(n),t={},i=!0,o=j.panelPassive),u.length||u.push(C.getCurrentName());const[f]=u,d=C.getCurrentByName(f,o);if(!t&&I())return;const{type:p}=e,m="copy"===p,h=m?"Copy":"Rename/Move",g=m?S:A;if(i&&b(m?"confirmCopy":"confirmMove")){const[e,t]=await async function(e,t,n){const r=n.length,[o]=n;return e+=" ",n.length>1?e+=`${r} file(s)`:e+=`"${o}"`,e+=" to",await v.prompt(e,t)}(h,c,u.map(l.l));return void(e||y(t))}function y(e){if(a=s!==e&&e,a&&!i||!d)return n();const t=`"${f}" already exist. Overwrite?`;function n(){T(),r={from:s,to:e,names:u},g(r,async()=>{await C.Storage.remove(s);const{panel:e,panelPassive:t}=j;j.isOnePanel||w.refresh({panel:t,noCurrent:!0}),w.refresh({panel:e})})}v.confirm(t,{cancel:!1}).then(n)}y(c)}),I=()=>{const{length:e}=C.getActiveFiles(),t=Boolean(!e);return t?v.alert.noFiles():t},R=(0,i.F)(e=>{T(),a.series([C.loadSocket,async e=>{if(b("dropbox"))return e();const{prefix:t,prefixSocket:n}=w;await async function(){const{prefix:e}=globalThis.CloudCmd,t=`${e}/fileop/fileop.js`,[n]=await(0,c.tryToCatch)(s.js,t);n&&v.alert(n.message),O=!0}(),await async function(e,t,n){t=`${t}/fileop`;const r=await globalThis.fileop({prefix:e,socketPrefix:t});r.on("connect",x(r,B(n)))}(t,n,e)},e=>{O=!0,D.hide(),e()}],e)}),B=r((e,t)=>{!function(e){k=({from:t,to:n,names:r},o)=>{const i=h({operation:"Tar",callback:o,noContinue:!0,from:t,to:n});e.tar(t,n,r).then(i)},F=({from:t,to:n,names:r},o)=>{const i=h({operation:"Zip",callback:o,noContinue:!0,from:t,to:n});e.zip(t,n,r).then(i)},P=(t,n,r)=>{t=t.replace(/\?.*/,"");const o=h({operation:"Delete",callback:r,from:t});e.remove(t,n).then(o)},S=({from:t,to:n,names:r},o)=>{const i=h({operation:"Copy",callback:o,from:t,to:n,names:r});e.copy(t,n,r).then(i)},A=({from:t,to:n,names:r},o)=>{const i=h({operation:"Move",callback:o,from:t,to:n});e.move(t,n,r).then(i)},M=({from:t,to:n},r)=>{const o=h({operation:"Extract",callback:r,noContinue:!0,from:t,to:n});e.extract(t,n).then(o)}}(t),e()});function $(e=C.getActiveFiles()){const t=j.dirPath;if(I())return;T();const n=C.getFilenames(e),r=C.CurrentInfo.files.map(C.getCurrentName),o=C.getCurrentName(),i=((e,t,n)=>{const r=t.indexOf(e),o=y(t,n),{length:i}=o;return o[r]?o[r]:o[i-1]})(o,r,n);P(t+"?files",n,async()=>{await w.refresh();const e=j.files.map(C.getCurrentName).includes(o)?o:i;C.setCurrentByName(e)})}function _(e,t){let n,r,o=j.name;const{path:i,dirPath:a}=j,s=C.getActiveFiles(),c=C.getFilenames(s);if(function(e,t){if(!t)throw Error("operation could not be empty!")}(0,e),!c.length)return v.alert.noFiles();switch(e){case"extract":n=M,r={from:i,to:a},o=(e=>{const t=function(e){return e.endsWith(".tar.gz")?".tar.gz":e.endsWith(".tar.bz2")?".tar.bz2":(0,u.getExt)(e)}(e);return e.replace(t,"")})(o);break;case"pack":n=function(e){return"zip"===e?F:k}(t),c.length>1&&(o=j.dir),o+=C.getPackerExt(t),r={from:a,to:a+o,names:c}}T(),n(r,e=>{!e&&w.refresh({currentName:o})})}E.copy=N({type:"copy"}),E.move=N({type:"move"}),E.delete=async function(){if(I())return;const e="Do you really want to delete the ",t="selected ",n=C.getActiveFiles(),r=C.getFilenames(n),o=r.length;let i;if(o){let n="";for(let e=0;e<5&&e<o;e++)n+="\n"+r[e];o>=5&&(n+="\n..."),i=e+t+o+" files/directories?\n"+(0,l.l)(n)}else{const n=C.getCurrentFile();i=e+t+((e=>e?"directory":"file")(C.isCurrentIsDir(n))+" ")+C.getCurrentName(n)+"?"}const[a]=await v.confirm(i);a||$(n)},E.deleteSilent=$,E.pack=()=>{_("pack","zip"===b("packer")?"zip":"tar")},E.extract=()=>{_("extract")},globalThis.CloudCmd.Operation={init:R,hide:()=>{w.View.hide()},show:(e,t)=>{if(O)return"copy"===e?E.copy(t):"move"===e?E.move(t):"delete"===e?E.delete():"delete:silent"===e?E.deleteSilent():"pack"===e?E.pack():"extract"===e?E.extract():void 0}}},7023(e){"use strict";e.exports=(e,...t)=>(function(e){if("function"!=typeof e)throw Error("fn should be function!")}(e),(...n)=>{const r=[...t,...n];return e(...r)})},7119(e){"use strict";e.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},7174(e,t,n){"use strict";n.d(t,{createCloudMenu:()=>a});var r=n(3850);const o=()=>{},{CloudCmd:i}=globalThis,a=async(e,t,n)=>{const r=await async function(){if("aleman"===i.config("menu")){const{host:e,protocol:t}=globalThis.location,n=`${t}//${e}/node_modules/aleman/menu/menu.js`,{createMenu:r}=await import(n);return r}return s}(),a=await r(e,t,n);return a.addContextMenuListener=a.addContextMenuListener||o,a};function s(e,t,n){const o=document.querySelector('[data-name="js-fm"]');return r(o,t,n)}},7175(e,t,n){"use strict";var r=n(9168),o=n(4299),i=n(1256),a=n(6037),s=n(806),c=n(3543);const{log:l}=CloudCmd,u=o(function(e,t){const{url:n,filename:o}=t,i=r.with(e,o);(0,a.ajax)({url:n,responseType:"arraybuffer",success:i})});CloudCmd.Cloud={init:async function(){const[e]=await Promise.all([s.get("modules"),i.js("//api.filepicker.io/v2/filepicker.js")]),{key:t}=e.data.FilePicker;filepicker.setKey(t),c.hide()},uploadFile:function(e,t){filepicker.store(t,{mimetype:"",filename:e},e=>{filepicker.exportFile(e,l,l)})},saveFile:function(e){filepicker.pick(u(e))}}},7176(e,t,n){"use strict";var r,o=n(3126),i=n(5795);try{r=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var a=!!r&&i&&i(Object.prototype,"__proto__"),s=Object,c=s.getPrototypeOf;e.exports=a&&"function"==typeof a.get?o([a.get]):"function"==typeof c&&function(e){return c(null==e?e:s(e))}},7244(e,t,n){"use strict";var r=n(9092)(),o=n(6556)("Object.prototype.toString"),i=function(e){return!(r&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===o(e)},a=function(e){return!!i(e)||null!==e&&"object"==typeof e&&"length"in e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==o(e)&&"callee"in e&&"[object Function]"===o(e.callee)},s=function(){return i(arguments)}();i.isLegacyArguments=a,e.exports=s?i:a},7252(e,t,n){"use strict";const r=n(9915),o=n(7411),i=n(9775),a=n(6698),{isArray:s}=Array;function c(e,t){if(!(this instanceof c))return new c(e,t);if("function"!=typeof t)throw Error("processingFn should be function!");o.call(this);const n=s(r=e)?r:[r];var r;this._i=0,this._n=0,this._processingFn=t,this._pause=!1,this._prev=0,this._find(n,(e,t)=>{this._files=e,this._dirs=t,this._n=e.length+t.length,this._data={},this._getFiles(e,this._data,()=>{this._process()})})}e.exports=c,a(c,o),c.prototype._process=function(){const e=this._processingFn.length,t=e=>{++this._i,e&&(this.emit("error",e),this.pause()),this._process(),this._progress()};let n,r,o=this._dirs.shift(),i="directory";if(!o){i="file";const e=this._files.shift();e&&(o=e.fullPath,n=this._data[o])}if(!o)return this.emit("end");this._pause||(r=6===e?[i,o,n,this._i,this._n]:[i,o,n],r.push(t),this._processingFn(...r))},c.prototype.pause=function(){this._pause=!0},c.prototype.continue=function(){this._pause&&(this._pause=!1,this._process())},c.prototype.abort=function(){this._files=[],this._dirs=[],this._process()},c.prototype._progress=function(){const e=Math.round(100*this._i/this._n);e!==this._prev&&(this._prev=e,this.emit("progress",e))},c.prototype._getFiles=function(e,t,n){const r=e.slice(),o=r.shift();if(!o)return n(null,t);o.file(e=>{const i=o.fullPath;t[i]=e,this._getFiles(r,t,n)})},c.prototype._find=function(e,t){const n=[],o=[];i(e,(e,t)=>{const i=r(e);i.on("directory",e=>{o.push(e)}),i.on("file",(e,t)=>{n.push(t)}),i.on("end",()=>{t()})},()=>{t(n,o)})}},7411(e){"use strict";function t(){if(!(this instanceof t))return new t;this._all={}}function n(e){if("string"!=typeof e)throw Error("event should be string!")}function r(e,t){n(e),function(e){if("function"!=typeof e)throw Error("callback should be function!")}(t)}e.exports=t,t.prototype.on=function(e,t){const n=this._all[e];return r(e,t),n?n.push(t):this._all[e]=[t],this},t.prototype.addListener=t.prototype.on,t.prototype.once=function(e,t){const n=this;return r(e,t),this.on(e,function r(...o){t(...o),n.off(e,r)}),this},t.prototype.off=function(e,t){const n=this._all[e]||[];let o=n.indexOf(t);for(r(e,t);~o;)n.splice(o,1),o=n.indexOf(t);return this},t.prototype.removeListener=t.prototype.off,t.prototype.emit=function(e,...t){const r=this._all[e];if(n(e),!r&&"error"===e)throw t[0];if(!r)return this;for(const e of r)e(...t);return this},t.prototype.removeAllListeners=function(e){return n(e),this._all[e]=[],this}},7603(e,t,n){"use strict";var r=n(980),o=n(9168),i=n(3850),a=n(975);const s=(e,t={})=>(n,r)=>{const{shortdate:o=a}=t,[i,s]=function(e){const t=e.lastIndexOf(".");return~t?[e.substr(0,t),e.substr(t)]:[e,""]}(n),c=o(new Date,{sep:"-"});return e.replace("[n]",i).replace("[e]",s).replace("[c]",r+1).replace("[ymd]",c)},{CloudCmd:c,DOM:l}=globalThis;c.EditNames={init:async function(){await c.Edit(),function(){const e=c.Edit.getElement();l.Events.addOnce("contextmenu",e,w)}()},show:function(e){const t=h().join("\n"),n={...p,...e};return".."===u.name&&1===t.length?f.alert.noFiles():(l.Events.addKey(m),c.Edit.getEditor().setValueFirst("edit-names",t).setMode().setOption("keyMap","default").disableKey(),c.Edit.show(n),c.Edit)},hide:g,isChanged:b};const u=l.CurrentInfo,{Dialog:f}=l;let d;const p={beforeClose:async()=>{o.ifExist(d,"hide"),l.Events.remove("keydown",m),await b()}};async function m(e){const t=e.ctrlKey,n=e.metaKey,r=t||n,{Key:o}=c;if(r&&e.keyCode===o.S)g();else if(r&&e.keyCode===o.P){const[,e]=await f.prompt("Apply pattern:","[n][e]");e&&function(e){const t=((e,t,n)=>(function(e,t){if(!e)throw Error("pattern could not be empty!");if(!Array.isArray(t))throw Error("names should be an array!")}(e,t),t.map(s(e,n))))(e,h());c.Edit.getEditor().setValue(t.join("\n"))}(e)}}function h(){return l.getFilenames(l.getActiveFiles())}function g(){c.Edit.hide()}async function y(){const e=u.dirPath,t=h(),n=t.indexOf(u.name),o=c.Edit.getEditor().getValue().split("\n"),i=function(e,t,n,r){const o=function(e,t){return"/"===e?t:e+t}(r,e),{prefix:i}=c;return fetch(`${i}/rename`,{method:"put",credentials:"include",body:JSON.stringify({from:t,to:n,dir:o})})}(e,t,o,c.config("root")),[a]=await(0,r.tryToCatch)(C,o,n,i);a&&alert(a)}function C(e,t,n){if(404===n.status)throw n.text();const r=e[t];c.refresh({currentName:r})}function w(e){const t={x:e.clientX,y:e.clientY};if(e.preventDefault(),d)return;const n=c.Edit.getEditor(),r={beforeShow:e=>{e.x-=18,e.y-=27},afterClick:()=>{n.focus()}},o={"Save Ctrl+S":async()=>{await y(),g()},"Go To Line Ctrl+G":()=>{n.goToLine()},"Cut Ctrl+X":()=>{n.cutToClipboard()},"Copy Ctrl+C":()=>{n.copyToClipboard()},"Paste Ctrl+V":()=>{n.pasteFromClipboard()},"Delete Del":()=>{n.remove("right")},"Select All Ctrl+A":()=>{n.selectAll()},"Close Esc":g},a=c.Edit.getElement();d=i(a,r,o),d.addContextMenuListener(),d.show(t.x,t.y)}async function b(){if(!c.Edit.getEditor().isChanged())return;const[e]=await f.confirm("Apply new names?");!e&&await y()}},7714(e,t,n){"use strict";var r=n(6686),o=n(4299),i=n(9317),a=n(1795),s=n(5811),c=n(980),l=n(1256),u=n(407),f=n(9227),d=n(806),p=n(8453),m=n(3543);const h=o((e,t,n)=>e===typeof t[n])("boolean");function g(e,t){const n=`[data-name="js-${e}"]`;return t.querySelector(n)}function y(e){return e?" checked":""}const C=(e,t,n)=>{const r=g(e,n),{type:o}=r;"checkbox"===o?r.checked=t:r.value=t},{Dialog:w,setTitle:b}=DOM,v=(0,s.F)(DOM.loadSocket),D=o((e,t)=>(f.addKey(t,e),t)),x=o((e,t)=>(f.add("change",t,e),t)),E={};let O;const S=l.css,{config:A,Key:P}=CloudCmd;let M;function F(){CloudCmd.View.hide()}async function k(e){const t={},n=e.getAttribute("data-name").replace(/^js-/,""),r=((e,t)=>{const n=g(e,t),{type:r}=n;switch(r){case"checkbox":return n.checked;case"number":return Number(n.value);default:return n.value}})(n,M);"name"===n?function(e){b((0,p.getTitle)({name:e}))}(r):"auth"===n&&N(r),t[n]=r,await E.save(t)}function j(e){for(const t of Object.keys(e)){const n=e[t];CloudCmd._config(t,n),C(t,n,M)}}async function T(e){const{RESTful:t}=DOM,[n]=await t.Config.write(e);n||j(e)}function N(e){const t=g("username",M),n=g("password",M);t.disabled=!e,n.disabled=!e}async function I({keyCode:e,target:t}){switch(e){case P.ESC:return F();case P.ENTER:return await k(t)}}E.save=T,CloudCmd.Config={init:async()=>{if(!CloudCmd.config("configDialog"))return;m.show.load("top");const{DIR_DIST:e}=CloudCmd;[O]=await Promise.all([d.get("config-tmpl"),v(),S(`${e}/config.css`),CloudCmd.View()]),function(){const e=function(){const{host:e,origin:t,protocol:n}=location;return t||`${n}//${e}`}(),{prefixSocket:t,prefix:n}=CloudCmd,r=io.connect(e+t+"/config",{reconnectionAttempts:1/0,reconnectionDelay:6e4,path:`${n}/socket.io`}),o=e=>{j(e),r.send(e)};(function(e){e.emit("auth",A("username"),A("password")),e.on("reject",i(w.alert,"Wrong credentials!"))})(r),r.on("connect",()=>{E.save=o}),r.on("message",j),r.on("log",CloudCmd.log),r.on("disconnect",()=>{E.save=T}),r.on("err",w.alert)}()},show:async function(){CloudCmd.config("configDialog")&&await async function(){const[e,t]=await(0,c.tryToCatch)(d.get,"config");if(e)return w.alert("Could not load config!");const{editor:n,menu:o,packer:i,columns:s,theme:l,configAuth:f,...p}=(e=>{const t=e,n=Object.keys(e).filter(h(e));for(const r of n){const n=e[r];t[r]=y(n)}return t})(t);p[`${o}-selected`]="selected",p[`${n}-selected`]="selected",p[`${i}-selected`]="selected",p[`${s}-selected`]="selected",p[`${l}-selected`]="selected",p.configAuth=f?"":"hidden";const m=r(O,p);M=u("form",{className:"config",innerHTML:m});const g=document.querySelectorAll("input, select",M),[C]=g;let b;C&&(N(C.checked),b=C.focus.bind(C));const v=a(k,({target:e})=>e);Array.from(g).map(D(I)).map(x(v));CloudCmd.View.show(M,{autoSize:!0,afterShow:b})}()},hide:F}},7975(e,t,n){"use strict";var r=n(5606);function o(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function i(e,t){for(var n,r="",o=0,i=-1,a=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(47===n)break;n=47}if(47===n){if(i===s-1||1===a);else if(i!==s-1&&2===a){if(r.length<2||2!==o||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",o=0):o=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),i=s,a=0;continue}}else if(2===r.length||1===r.length){r="",o=0,i=s,a=0;continue}t&&(r.length>0?r+="/..":r="..",o=2)}else r.length>0?r+="/"+e.slice(i+1,s):r=e.slice(i+1,s),o=s-i-1;i=s,a=0}else 46===n&&-1!==a?++a:a=-1}return r}var a={resolve:function(){for(var e,t="",n=!1,a=arguments.length-1;a>=-1&&!n;a--){var s;a>=0?s=arguments[a]:(void 0===e&&(e=r.cwd()),s=e),o(s),0!==s.length&&(t=s+"/"+t,n=47===s.charCodeAt(0))}return t=i(t,!n),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(o(e),0===e.length)return".";var t=47===e.charCodeAt(0),n=47===e.charCodeAt(e.length-1);return 0!==(e=i(e,!t)).length||t||(e="."),e.length>0&&n&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return o(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var n=arguments[t];o(n),n.length>0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":a.normalize(e)},relative:function(e,t){if(o(e),o(t),e===t)return"";if((e=a.resolve(e))===(t=a.resolve(t)))return"";for(var n=1;n<e.length&&47===e.charCodeAt(n);++n);for(var r=e.length,i=r-n,s=1;s<t.length&&47===t.charCodeAt(s);++s);for(var c=t.length-s,l=i<c?i:c,u=-1,f=0;f<=l;++f){if(f===l){if(c>l){if(47===t.charCodeAt(s+f))return t.slice(s+f+1);if(0===f)return t.slice(s+f)}else i>l&&(47===e.charCodeAt(n+f)?u=f:0===f&&(u=0));break}var d=e.charCodeAt(n+f);if(d!==t.charCodeAt(s+f))break;47===d&&(u=f)}var p="";for(f=n+u+1;f<=r;++f)f!==r&&47!==e.charCodeAt(f)||(0===p.length?p+="..":p+="/..");return p.length>0?p+t.slice(s+u):(s+=u,47===t.charCodeAt(s)&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(o(e),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,i=!0,a=e.length-1;a>=1;--a)if(47===(t=e.charCodeAt(a))){if(!i){r=a;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"//":e.slice(0,r)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');o(e);var n,r=0,i=-1,a=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,c=-1;for(n=e.length-1;n>=0;--n){var l=e.charCodeAt(n);if(47===l){if(!a){r=n+1;break}}else-1===c&&(a=!1,c=n+1),s>=0&&(l===t.charCodeAt(s)?-1===--s&&(i=n):(s=-1,i=c))}return r===i?i=c:-1===i&&(i=e.length),e.slice(r,i)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!a){r=n+1;break}}else-1===i&&(a=!1,i=n+1);return-1===i?"":e.slice(r,i)},extname:function(e){o(e);for(var t=-1,n=0,r=-1,i=!0,a=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(47!==c)-1===r&&(i=!1,r=s+1),46===c?-1===t?t=s:1!==a&&(a=1):-1!==t&&(a=-1);else if(!i){n=s+1;break}}return-1===t||-1===r||0===a||1===a&&t===r-1&&t===n+1?"":e.slice(t,r)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){o(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n,r=e.charCodeAt(0),i=47===r;i?(t.root="/",n=1):n=0;for(var a=-1,s=0,c=-1,l=!0,u=e.length-1,f=0;u>=n;--u)if(47!==(r=e.charCodeAt(u)))-1===c&&(l=!1,c=u+1),46===r?-1===a?a=u:1!==f&&(f=1):-1!==a&&(f=-1);else if(!l){s=u+1;break}return-1===a||-1===c||0===f||1===f&&a===c-1&&a===s+1?-1!==c&&(t.base=t.name=0===s&&i?e.slice(1,c):e.slice(s,c)):(0===s&&i?(t.name=e.slice(1,a),t.base=e.slice(1,c)):(t.name=e.slice(s,a),t.base=e.slice(s,c)),t.ext=e.slice(a,c)),s>0?t.dir=e.slice(0,s-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,e.exports=a},8002(e){"use strict";e.exports=Math.min},8068(e){"use strict";e.exports=SyntaxError},8167(e,t,n){"use strict";const{promisify:r}=n(4905),{tryToCatch:o}=n(980),{fullstore:i}=n(887);n(1825);const a=n(9168),s=n(1256),c=n(5670),l=n(3543),{Dialog:u}=c,{Key:f,config:d}=CloudCmd;let p,m,h;CloudCmd.TerminalRun=t;const g=i();function y(){CloudCmd.View.hide()}e.exports.init=async()=>{d("terminal")&&(l.show.load("top"),await CloudCmd.View(),await(async()=>{const{prefix:e}=CloudCmd,t=`${C()}/gritty.js`,n=`${e}/dist/terminal.css`,[r]=await o(s.parallel,[t,n]);if(r){const e=r.target.src.replace(globalThis.location.href,"");return u.alert(`file ${e} could not be loaded`)}p=!0})())},e.exports.show=r((e={},t)=>{if(!p)return t(null,-1);d("terminal")&&(function(e){const{cwd:t=c.getCurrentDirPath(),command:n,autoClose:r,closeMessage:o="Press any key to close Terminal..."}=e,i={cwd:t,env:w(),prefix:CloudCmd.prefixSocket+"/gritty",socketPath:CloudCmd.prefix,fontFamily:"Droid Sans Mono",command:n,autoRestart:!1};let s=!1;const{socket:l,terminal:u}=gritty(document.body,i);h=l,m=u,m.onKey(({domEvent:e})=>{const{keyCode:t,shiftKey:n}=e;s&&y(),n&&t===f.ESC&&y()}),h.on("exit",e=>{if(g(e),r)return y();u.write(`\n${o}`),s=!0}),h.on("connect",a.with(b,l))}(e),CloudCmd.View.show(m.element,{afterShow:()=>{m.focus()},afterClose:()=>{t(null,g())}}))}),e.exports.hide=y;const C=()=>CloudCmd.prefix+"/gritty";const w=()=>({ACTIVE_DIR:c.getCurrentDirPath,PASSIVE_DIR:c.getNotCurrentDirPath,CURRENT_NAME:c.getCurrentName,CURRENT_PATH:c.getCurrentPath});function b(e){e.emit("auth",d("username"),d("password")),e.on("reject",()=>{u.alert("Wrong credentials!")})}},8184(e,t,n){"use strict";var r=n(6556),o=n(9721)(/^\s*(?:function)?\*/),i=n(9092)(),a=n(3628),s=r("Object.prototype.toString"),c=r("Function.prototype.toString"),l=n(4233);e.exports=function(e){if("function"!=typeof e)return!1;if(o(c(e)))return!0;if(!i)return"[object GeneratorFunction]"===s(e);if(!a)return!1;var t=l();return t&&a(e)===t.prototype}},8278(e,t,n){e.exports=n(4261)},8298(e,t,n){"use strict";var r=n(8553);CloudCmd.CommandLine={init:()=>{},show:async function(){const[,e]=await r.prompt("Command Line",""),t="^(t|terminal)";if(RegExp(`${t}$`).test(e))return await CloudCmd.Terminal.show();if(RegExp(t).test(e)){const n=e.replace(RegExp(`${t} `),"");return void(-1===await CloudCmd.TerminalRun.show({command:`bash -c '${n}'`})&&await r.alert("☝️ Looks like Terminal is disabled, start Cloud Coammnder with '--terminal' flag."))}},hide:function(){}}},8328(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>r,fullstore:()=>o});const r=/^(6(11|36|5|8)|104|415|433|939|955)$/.test(n.j)?null:o;function o(e){const t={value:e};return(...e)=>{const[n]=e;return e.length?(t.value=n,n):t.value}}},8453(e,t,n){"use strict";n.r(t),n.d(t,{FS:()=>c,MAX_FILE_SIZE:()=>f,_getDataName:()=>h,_getSize:()=>w,apiURL:()=>u,buildFromJSON:()=>g,formatMsg:()=>d,getDotDot:()=>v,getHeaderField:()=>s,getPathLink:()=>m,getTitle:()=>p});var r=n(6686),o=n(4299),i=n(8328),a=n(1849);const s=o(function(e,t,n){return e!==n||"name"===e&&"asc"===t?n:`${n}${"asc"===t?"↑":"↓"}`}),c="/fs",l=(0,i.default)();l("/");const u="/api/v1",f=/^(858|900)$/.test(n.j)?512e3:null,d=(e,t,n)=>((t=t||"")&&(t=`("${t}")`),`${e}: ${n=n||"ok"}${t}`),p=e=>{e=e||{};const{path:t=l(),name:n}=e;return[n||"Cloud Commander",t].filter(Boolean).join(" - ")};function m(e,t,n){if(!e)throw Error("url could not be empty!");if(!n)throw Error("template could not be empty!");const o=["/",...e.split("/").slice(1,-1)],i=[],a=o.length;let s="/";for(let e=0;e<a;e++){const c=o[e];if(e&&(s+=`${c}/`),e&&e===a-1){i.push(`${c}/`);continue}const l=e?"/":"";i.push(r(n,{path:s,name:c,slash:l,prefix:t}))}return i.join("")}function h(e){return`data-name="js-file-${btoa(encodeURI(e))}" `}const g=e=>{const{prefix:t,template:n,sort:o="name",order:i="asc",showDotFiles:u}=e,f=n.file,d=n.link,p=e.data,g=(0,a.l)(p.path),{files:w}=p,b=m(g,t,n.pathLink);let D=r(n.path,{link:t+c+g,fullPath:g,path:b});const x=s(o,i),E=x("name"),O=x("size"),S=x("date"),A=r(f,{tag:"div",attribute:'data-name="js-fm-header" ',className:"fm-header",type:"",name:E,size:O,date:S,owner:"owner",mode:"mode"});if(l(g),D+=`${A}<ul data-name="js-files" class="files">`,"/"!==g){const e=v(g),o=t+c+e,i=r(n.link,{link:o,title:"..",name:".."}),a=`draggable="true" ${h("..")}`;D+=r(n.file,{tag:"li",attribute:a,className:"",type:"directory",name:i,size:"<dir>",date:"--.--.----",owner:".",mode:"--- --- ---"})}return D+=w.filter((({showDotFiles:e})=>({name:t})=>!!e||!t.startsWith("."))({showDotFiles:u})).map(y).map(e=>{const n=(0,a.l)(e.name),o=t+c+g+n,{type:i,mode:s,date:l,owner:u,size:p}=e,m=r(d,{link:o,title:n,name:n,attribute:C(e.type)}),y=h(e.name);return r(f,{tag:"li",attribute:`draggable="true" ${y}`,className:"",type:i,name:m,size:p,date:l,owner:u,mode:s})}).join(""),D+="</ul>",D},y=e=>({...e,date:e.date||"--.--.----",owner:e.owner||"root",size:b(e)});function C(e){return"directory"===e?"":'target="_blank" '}const w=858==n.j?b:null;function b({size:e,type:t}){return"directory"===t?"<dir>":/link/.test(t)?"<link>":e}function v(e){const t=e.substr(e,e.lastIndexOf("/"));return t.substr(t,t.lastIndexOf("/"))||"/"}},8530(e,t,n){"use strict";n.d(t,{A:()=>r});const r=({autoSize:e,isTitle:t})=>{const n=["modal-main"];return e&&n.push("modal-autosize"),t&&n.push("modal-is-title"),n.join(" ")}},8553(e,t,n){"use strict";if(n.r(t),n.d(t,{alert:()=>x,confirm:()=>O,progress:()=>S,prompt:()=>E}),/^(8(|00|58)|762)$/.test(n.j))var r=n(980);var o=n(4299),i=n(8328),a=n(407);const s=o(function(e,t,n,r){const o={ENTER:13,ESC:27,TAB:9,LEFT:37,UP:38,RIGHT:39,DOWN:40},{keyCode:i}=r,a=r.target,s=b(e,["ok","cancel","input"]).map(g);switch(i){case o.ENTER:C(a,e,t,n),r.preventDefault();break;case o.ESC:v(e),n();break;case o.TAB:r.shiftKey&&y(e,s),y(e,s),r.preventDefault();break;default:["left","right","up","down"].filter(e=>i===o[e.toUpperCase()]).forEach(()=>{!function(e,t){const n=g(document.activeElement),r=/ok|cancel/.test(n),o=t.length-1;if("input"===n||!o||!r)return;const i=(e=>"cancel"===e?"ok":"cancel")(n);for(const t of b(e,[i]))t.focus()}(e,s)})}r.stopPropagation()}),c={ok:"OK"},l={ok:"OK",cancel:"Cancel"},u=(0,i.default)(100),f=(e,t,n)=>h(e,t,"",m(n)||c,n),d=(e,t,n="",r)=>{const o=function(e={}){const{type:t}=e;return"password"===t?"password":"text"}(r);return h(e,t,`<input type="${o}" value="${String(n).replace(/"/g,""")}" data-name="js-input">`,m(r)||l,r)},p=(e,t,n)=>h(e,t,"",m(n)||l,n);function m(e={}){const{buttons:t}=e;return t||null}function h(e,t,n,r,c){const l=(0,i.default)(),f=(0,i.default)(),d=new Promise((e,t)=>{const n=c&&"boolean"==typeof c.cancel&&!c.cancel;l(e),f(n?()=>{}:()=>t(Error()))}),p=function(e,t,n,r){return`<div class="page">\n <div data-name="js-close" class="close-button"></div>\n <header>${e}</header>\n <div class="content-area">${t.replace(/\n/g,"<br>")}${n}</div>\n <div class="action-area">\n <div class="button-strip">\n ${function(e){const t=Object.keys(e),n=o((e,t,n)=>`<button\n tabindex=${n}\n data-name="js-${t.toLowerCase()}">\n ${e[t]}\n </button>`);return t.map(n(e)).join("")}(r)}\n </div>\n </div>\n </div>`}(e,t,n,r),m=a("div",{innerHTML:p,className:"smalltalk",style:`z-index: ${u(u()+1)}`});for(const e of b(m,["ok","input"]))e.focus();for(const e of b(m,["input"]))e.setSelectionRange(0,n.length);!function(e,t,n,r){for(const e of b(t,["cancel","close","ok"]))e.addEventListener("click",r)}(0,m,0,e=>{C(e.target,m,l(),f())});for(const e of["click","contextmenu"])m.addEventListener(e,e=>{e.stopPropagation();for(const e of b(m,["ok","input"]))e.focus()});return m.addEventListener("keydown",s(m,l(),f())),Object.assign(d,{dialog:m,ok:l})}function g(e){return e.getAttribute("data-name").replace("js-","")}function y(e,t){const n=g(document.activeElement),r=((e,t)=>t===e?0:t+1)(t.length-1,t.indexOf(n)),o=t[r];for(const t of b(e,[o]))t.focus()}function C(e,t,n,r){const o=e.getAttribute("data-name").replace("js-","");if(/close|cancel/.test(o))return r(),void v(t);let i=null;for(const e of b(t,["input"]))({value:i}=e);n(i),v(t)}const w=o((e,t)=>e.querySelector(`[data-name="js-${t}"]`));function b(e,t){return t.map(w(e)).filter(Boolean)}function v(e){const{parentElement:t}=e;t&&t.removeChild(e)}const D="Cloud Commander",x=(...e)=>f(D,...e,{cancel:!1}),E=(...e)=>(0,r.tryToCatch)(d,D,...e),O=(...e)=>(0,r.tryToCatch)(p,D,...e),S=(...e)=>((e,t,n)=>{const r=h(e,t,'\n <progress value="0" data-name="js-progress" class="progress" max="100"></progress>\n <span data-name="js-counter">0%</span>\n ',{cancel:"Abort"},n),{ok:o,dialog:i}=r,a=o();for(const e of b(i,["cancel"]))e.focus();return Object.assign(r,{setProgress(e){const[t]=b(i,["progress"]),[n]=b(i,["counter"]);t.value=e,n.textContent=`${e}%`,100===e&&(v(i),a())},remove(){v(i)}}),r})(D,...e);x.noFiles=()=>f(D,"No files selected!",{cancel:!1})},8555(e,t,n){"use strict";n.d(t,{G:()=>r});const r=(e,t,n)=>n?`${e} ${t} -> ${n}`:`${e} ${t}`},8590(e,t,n){"use strict";n.d(t,{A:()=>r});var r=/^8(|00|58)$/.test(n.j)?function(e){if("string"!=typeof e)throw Error("just-capitalize expects a string argument");return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}:null},8633(e){var t=String,n=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};e.exports=n(),e.exports.createColors=n},8648(e){"use strict";e.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},8721(e,t,n){"use strict";var r=n(4299),o=n(9317),i=n(8328),a=n(1256),s=n(407),c=n(980),l=n(2882),u=n(8553),f=n(3543);const d=e=>{const t={};return Function("module",e)(t),t.exports};var p=n(6967);const m=(0,i.fullstore)(1),h=e=>"number"==typeof e,{entries:g,assign:y}=Object,C=a.css,w=(0,i.fullstore)();CloudCmd.UserMenu={init:async function(){await Promise.all([C(`${CloudCmd.prefix}/dist/user-menu.css`),CloudCmd.View()])},show:async function(){f.show.load("top");const{dirPath:e}=v,t=await fetch(`${CloudCmd.prefix}/api/v1/user-menu?dir=${e}`),n=await t.text(),[r,o]=((e,...t)=>{try{return[null,e(...t)]}catch(e){return[e]}})(d,n);if(f.hide(),r)return u.alert(P({error:r,source:n}));w(n);const{names:i,keys:a,items:c,settings:l}=(e=>{const t=[],n={},r={},o={};for(const[i,a]of g(e)){if("__settings"===i){y(o,e[i]);continue}if(i.startsWith("_"))continue;t.push(i);const[s,c]=i.split(" - ");n[s]=a,r[c]=a}return{names:t,keys:n,items:r,settings:o}})(o);if(l.run)return(async(e,t,n)=>{for(const r of e)await n(t[r])})(l.select,c,A);const p=s("button",{className:"cloudcmd-user-menu-button",innerText:"User Menu",notAppend:!0}),m=s("select",{className:"cloudcmd-user-menu",innerHTML:D(i),notAppend:!0,size:10});p.addEventListener("click",O(o,m)),m.addEventListener("dblclick",E(o)),m.addEventListener("keydown",S({keys:a,userMenu:o})),CloudCmd.View.show([p,m],{autoSize:!0,afterShow:()=>m.focus()})},hide:x};const{Key:b}=CloudCmd,{CurrentInfo:v}=DOM;function D(e){const t=[];for(const n of e)t.push(`<option>${n}</option>`);return t.join("")}function x(){CloudCmd.View.hide()}const E=r(async(e,t)=>{const{value:n}=t.target;await A(e[n])}),O=o(async(e,{value:t})=>{await A(e[t])}),S=r(async({keys:e,userMenu:t},n)=>{const{keyCode:r,target:o}=n,i=n.key.toUpperCase();let a;if(n.preventDefault(),n.stopPropagation(),r===b.ESC)return x();if(r===b.ENTER)a=t[o.value];else{if(!e[i])return((e,{key:t,keyCode:n})=>{if(/^\d+$/.test(t)&&m(Number(t)),n===p.DOWN||n===p.J){const t=m();return m(1),function(e,t){const{length:n}=e;e.selectedIndex===n-1?e.selectedIndex=0:e.selectedIndex+=t,e.selectedIndex<0&&(e.selectedIndex=n-1)}(e,t)}if(n===p.UP||n===p.K){const t=m();return m(1),function(e,t){const{length:n}=e;e.selectedIndex?e.selectedIndex-=t:e.selectedIndex=n-1,e.selectedIndex<0&&(e.selectedIndex=0)}(e,t)}})(o,n);a=e[i]}await A(a)}),A=async e=>{x();const[t]=await(0,c.tryToCatch)(e,{DOM,CloudCmd,tryToCatch:c.tryToCatch});if(!t)return;const n=w();return u.alert(P({error:t,source:n}))};function P({error:e,source:t}){const{code:n}=e;if(!n||"frame"===n)return e.message;const[r,o]=(e=>{const{lineNumber:t,columnNumber:n}=e;if(h(t)&&h(n))return[t,n];const r=e.stack.indexOf(">"),o=e.stack.slice(r+1),i=o.indexOf(")"),a=o.slice(1,i),[s,c]=a.split(":");return[Number(s),Number(c)]})(e),i={start:{line:r,column:o}};return`<pre>${(0,l.gl)(t,i,{message:e.message,highlightCode:!1})}</pre>`}},8812(e){"use strict";e.exports=class{getItem(e){return this.isName(e)?e.parentElement:e}getName(e){return e?this.isName(e)?e:e.querySelector("[data-menu-path]"):null}isName(e){return!!e&&e.hasAttribute("data-menu-path")}isItem(e){return this.checkElementsName(e,"js-menu-item")}isMenu(e){return this.checkElementsName(e,"js-menu")}checkElementsName(e,t,n){return n||(n="data-name"),!(!e||e.getAttribute(n)!==t)}isSubMenu(e){const t=this.getItem(e);return this.checkElementsName(t,"js-submenu","data-menu")}}},8968(e){"use strict";e.exports=Math.floor},9032(e,t,n){"use strict";var r=n(7244),o=n(8184),i=n(5767),a=n(5680);function s(e){return e.call.bind(e)}var c="undefined"!=typeof BigInt,l="undefined"!=typeof Symbol,u=s(Object.prototype.toString),f=s(Number.prototype.valueOf),d=s(String.prototype.valueOf),p=s(Boolean.prototype.valueOf);if(c)var m=s(BigInt.prototype.valueOf);if(l)var h=s(Symbol.prototype.valueOf);function g(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function y(e){return"[object Map]"===u(e)}function C(e){return"[object Set]"===u(e)}function w(e){return"[object WeakMap]"===u(e)}function b(e){return"[object WeakSet]"===u(e)}function v(e){return"[object ArrayBuffer]"===u(e)}function D(e){return"undefined"!=typeof ArrayBuffer&&(v.working?v(e):e instanceof ArrayBuffer)}function x(e){return"[object DataView]"===u(e)}function E(e){return"undefined"!=typeof DataView&&(x.working?x(e):e instanceof DataView)}t.isArgumentsObject=r,t.isGeneratorFunction=o,t.isTypedArray=a,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):a(e)||E(e)},t.isUint8Array=function(e){return"Uint8Array"===i(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===i(e)},t.isUint16Array=function(e){return"Uint16Array"===i(e)},t.isUint32Array=function(e){return"Uint32Array"===i(e)},t.isInt8Array=function(e){return"Int8Array"===i(e)},t.isInt16Array=function(e){return"Int16Array"===i(e)},t.isInt32Array=function(e){return"Int32Array"===i(e)},t.isFloat32Array=function(e){return"Float32Array"===i(e)},t.isFloat64Array=function(e){return"Float64Array"===i(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===i(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===i(e)},y.working="undefined"!=typeof Map&&y(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(y.working?y(e):e instanceof Map)},C.working="undefined"!=typeof Set&&C(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(C.working?C(e):e instanceof Set)},w.working="undefined"!=typeof WeakMap&&w(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(w.working?w(e):e instanceof WeakMap)},b.working="undefined"!=typeof WeakSet&&b(new WeakSet),t.isWeakSet=function(e){return b(e)},v.working="undefined"!=typeof ArrayBuffer&&v(new ArrayBuffer),t.isArrayBuffer=D,x.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&x(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=E;var O="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function S(e){return"[object SharedArrayBuffer]"===u(e)}function A(e){return void 0!==O&&(void 0===S.working&&(S.working=S(new O)),S.working?S(e):e instanceof O)}function P(e){return g(e,f)}function M(e){return g(e,d)}function F(e){return g(e,p)}function k(e){return c&&g(e,m)}function j(e){return l&&g(e,h)}t.isSharedArrayBuffer=A,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===u(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===u(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===u(e)},t.isGeneratorObject=function(e){return"[object Generator]"===u(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===u(e)},t.isNumberObject=P,t.isStringObject=M,t.isBooleanObject=F,t.isBigIntObject=k,t.isSymbolObject=j,t.isBoxedPrimitive=function(e){return P(e)||M(e)||F(e)||k(e)||j(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(D(e)||A(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})},9081(e,t,n){"use strict";n.d(t,{O:()=>c});const r=e=>"object"==typeof e&&null!=e&&1===e.nodeType,o=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,i=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return o(n.overflowY,t)||o(n.overflowX,t)||(e=>{const t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},a=(e,t,n,r,o,i,a,s)=>i<e&&a>t||i>e&&a<t?0:i<=e&&s<=n||a>=t&&s>=n?i-e-r:a>t&&s<n||i<e&&s>n?a-t+o:0,s=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t},c=(e,t)=>{var n,o,c,l;if("undefined"==typeof document)return[];const{scrollMode:u,block:f,inline:d,boundary:p,skipOverflowHiddenElements:m}=t,h="function"==typeof p?p:e=>e!==p;if(!r(e))throw new TypeError("Invalid target");const g=document.scrollingElement||document.documentElement,y=[];let C=e;for(;r(C)&&h(C);){if(C=s(C),C===g){y.push(C);break}null!=C&&C===document.body&&i(C)&&!i(document.documentElement)||null!=C&&i(C,m)&&y.push(C)}const w=null!=(o=null==(n=window.visualViewport)?void 0:n.width)?o:innerWidth,b=null!=(l=null==(c=window.visualViewport)?void 0:c.height)?l:innerHeight,{scrollX:v,scrollY:D}=window,{height:x,width:E,top:O,right:S,bottom:A,left:P}=e.getBoundingClientRect(),{top:M,right:F,bottom:k,left:j}=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);let T="start"===f||"nearest"===f?O-M:"end"===f?A+k:O+x/2-M+k,N="center"===d?P+E/2-j+F:"end"===d?S+F:P-j;const I=[];for(let e=0;e<y.length;e++){const t=y[e],{height:n,width:r,top:o,right:s,bottom:c,left:l}=t.getBoundingClientRect();if("if-needed"===u&&O>=0&&P>=0&&A<=b&&S<=w&&(t===g&&!i(t)||O>=o&&A<=c&&P>=l&&S<=s))return I;const p=getComputedStyle(t),m=parseInt(p.borderLeftWidth,10),h=parseInt(p.borderTopWidth,10),C=parseInt(p.borderRightWidth,10),M=parseInt(p.borderBottomWidth,10);let F=0,k=0;const j="offsetWidth"in t?t.offsetWidth-t.clientWidth-m-C:0,R="offsetHeight"in t?t.offsetHeight-t.clientHeight-h-M:0,B="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,$="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(g===t)F="start"===f?T:"end"===f?T-b:"nearest"===f?a(D,D+b,b,h,M,D+T,D+T+x,x):T-b/2,k="start"===d?N:"center"===d?N-w/2:"end"===d?N-w:a(v,v+w,w,m,C,v+N,v+N+E,E),F=Math.max(0,F+D),k=Math.max(0,k+v);else{F="start"===f?T-o-h:"end"===f?T-c+M+R:"nearest"===f?a(o,c,n,h,M+R,T,T+x,x):T-(o+n/2)+R/2,k="start"===d?N-l-m:"center"===d?N-(l+r/2)+j/2:"end"===d?N-s+C+j:a(l,s,r,m,C+j,N,N+E,E);const{scrollLeft:e,scrollTop:i}=t;F=0===$?0:Math.max(0,Math.min(i+F/$,t.scrollHeight-n/$+R)),k=0===B?0:Math.max(0,Math.min(e+k/B,t.scrollWidth-r/B+j)),T+=i-F,N+=e-k}I.push({el:t,top:F,left:k})}return I}},9092(e,t,n){"use strict";var r=n(1333);e.exports=function(){return r()&&!!Symbol.toStringTag}},9168(e){!function(t){"use strict";function n(){var e=Array.prototype.slice,t=function(t){var n,r="function"==typeof t,o=e.call(arguments,1);return r&&(n=t.apply(null,o)),n};return t.with=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);return function(){var r=t.call(arguments),o=n.concat(r);return e.apply(null,o)}},t.ret=function(){var n=e.call(arguments);return n.unshift(t),t.with.apply(null,n)},t.if=function(e,n,r){e?t(n):t(r,n)},t.ifExist=function(e,t,n){var r=e&&e[t];r&&(r=r.apply(e,n))},t.parallel=function(n,r){var o,i,a="could not be empty!",s=[],c=!1,l=[],u=0,f=0,d=(o=n,i=new RegExp("\\s([a-zA-Z]+)"),{}.toString.call(o).match(i)[1].toLowerCase());if(!n)throw Error("funcs "+a);if(!r)throw Error("callback "+a);switch(d){case"array":f=n.length,n.forEach(function(e,n){t(e,function(){p(n,arguments)})});break;case"object":s=Object.keys(n),f=s.length,s.forEach(function(e){var r=n[e];t(r,function(){p(e,arguments)})})}function p(t,n){var o,i=e.call(n,1),a=n[0],s=i.length;o=++u===f,a||(l[t]=s>=2?i:i[0]),c||!a&&!o||(c=!0,"array"===d?r.apply(null,[a].concat(l)):r(a,l))}},t.series=function(e,n){var r,o=e.length;if(!Array.isArray(e))throw Error("funcs should be array!");r=e.shift(),t(r,function(r){(function(e){var r;return--o&&!e||(r=!0,t(n,e)),r})(r)||t.series(e,n)})},t.each=function(e,n,r){var o=e.map(function(e){return n.bind(null,e)});o.length?t.parallel(o,r):r()},t.eachSeries=function(e,n,r){var o=e.map(function(e){return n.bind(null,e)});if("function"!=typeof r)throw Error("callback should be function");o.length?t.series(o,r):r()},t.try=function(e){var t;try{t=e()}catch(e){t=e}return t},t}e.exports?e.exports=new n:t.exec=new n}(this)},9209(e,t,n){"use strict";var r=n(6578),o=globalThis;e.exports=function(){for(var e=[],t=0;t<r.length;t++)"function"==typeof o[r[t]]&&(e[e.length]=r[t]);return e}},9227(e,t,n){"use strict";n.r(t),n.d(t,{add:()=>i,addClick:()=>f,addContextMenu:()=>p,addKey:()=>l,addLoad:()=>m,addOnce:()=>a,remove:()=>s,removeAll:()=>c,rmClick:()=>d,rmKey:()=>u});var r=n(2515),o=n(726);const i=(e,t,n)=>(h(e),y(e,t,n,(e,t)=>{const[n,r,i]=t;e.addEventListener(n,r,i),o.add(e,n,r)}),C),a=(e,t,n)=>{const r=o=>{C.remove(e,t,r),n(o)};return n||(n=t,t=null),i(e,t,r),C},s=(e,t,n)=>(h(e),y(e,t,n,(e,t)=>{e.removeEventListener(...t)}),C),c=()=>{const e=o.get();for(const[t,n,r]of e)t.removeEventListener(n,r);o.clear()},l=function(...e){return i("keydown",...e)},u=function(...e){return C.remove("keydown",...e)},f=function(...e){return C.add("click",...e)},d=function(...e){return s("click",...e)},p=function(...e){return i("contextmenu",...e)},m=function(...e){return i("load",...e)};function h(e){if(!e)throw Error("type could not be empty!")}const g=e=>"touchstart"===e&&{passive:!0};function y(e,t,n,o){let i;const a=[e,t,n,o],s=r(e);switch(s){default:if(!s.endsWith("element"))throw Error(`unknown eventName: ${s}`);y(a[1],a[0],n,o);break;case"string":i=r.function(t),i&&(n=t,t=null),t||(t=window),o(t,[e,n,g(e)]);break;case"array":for(const r of e)y(r,t,n,o);break;case"object":for(const n of Object.keys(e))y(n,t,e[n],o)}}const C={add:i,addClick:f,addContextMenu:p,addKey:l,addLoad:m,addOnce:a,remove:s,removeAll:c,rmClick:d,rmKey:u}},9290(e){"use strict";e.exports=RangeError},9317(e){"use strict";const t=e=>(...t)=>(...n)=>e(...t,...n);e.exports=(e,...n)=>(function(e){if("function"!=typeof e)throw Error("fn should be a function!")}(e),n.length?t(e)(...n):t(e))},9353(e){"use strict";var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n};e.exports=function(e){var o=this;if("function"!=typeof o||"[object Function]"!==t.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,a=function(e){for(var t=[],n=1,r=0;n<e.length;n+=1,r+=1)t[r]=e[n];return t}(arguments),s=n(0,o.length-a.length),c=[],l=0;l<s;l++)c[l]="$"+l;if(i=Function("binder","return function ("+function(e){for(var t="",n=0;n<e.length;n+=1)t+=e[n],n+1<e.length&&(t+=",");return t}(c)+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof i){var t=o.apply(this,r(a,arguments));return Object(t)===t?t:this}return o.apply(e,r(a,arguments))}),o.prototype){var u=function(){};u.prototype=o.prototype,i.prototype=new u,u.prototype=null}return i}},9383(e){"use strict";e.exports=Error},9538(e){"use strict";e.exports=ReferenceError},9600(e){"use strict";var t,n,r=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},o(function(){throw 42},null,t)}catch(e){e!==n&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(e){try{var t=r.call(e);return i.test(t)}catch(e){return!1}},s=function(e){try{return!a(e)&&(r.call(e),!0)}catch(e){return!1}},c=Object.prototype.toString,l="function"==typeof Symbol&&!!Symbol.toStringTag,u=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var d=document.all;c.call(d)===c.call(document.all)&&(f=function(e){if((u||!e)&&(void 0===e||"object"==typeof e))try{var t=c.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=o?function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{o(e,null,t)}catch(e){if(e!==n)return!1}return!a(e)&&s(e)}:function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(l)return s(e);if(a(e))return!1;var t=c.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&s(e)}},9612(e){"use strict";e.exports=Object},9675(e){"use strict";e.exports=TypeError},9721(e,t,n){"use strict";var r=n(6556),o=n(4035),i=r("RegExp.prototype.exec"),a=n(9675);e.exports=function(e){if(!o(e))throw new a("`regex` must be a RegExp");return function(t){return null!==i(e,t)}}},9775(e){"use strict";const t=e=>"function"==typeof e;e.exports=(e,n,r)=>{!function(e,n,r){if(!Array.isArray(e))throw Error("array should be an array!");if(!t(n))throw Error("iterator should be a function!");if(!t(r))throw Error("done should be a function!")}(e,n,r);let o=-1;const i=e.length,a=t=>{if(++o,t||o===i)return r(t);n(e[o],a)};a()}},9804(e,t,n){"use strict";var r=n(9081);function o(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;const n=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if("object"==typeof(o=t)&&"function"==typeof o.behavior)return t.behavior((0,r.O)(e,t));var o;const i="boolean"==typeof t||null==t?void 0:t.behavior;for(const{el:o,top:a,left:s}of(0,r.O)(e,(e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"})(t))){const e=a-n.top+n.bottom,t=s-n.left+n.right;o.scroll({top:e,left:t,behavior:i})}}globalThis.DOM=globalThis.DOM||{},globalThis.DOM.scrollIntoViewIfNeeded=(e,t={})=>{const{scroll:n=o}=t;return n(e,{block:"nearest"})}},9915(e,t,n){"use strict";var r=n(8278);function o(e,t){if(!(this instanceof o))return new o(e,t);this._dirs=0,this._first=!0,this._find(e,t)}e.exports=function(e){var t=r();return setTimeout(function(){o(t,e)},0),t},o.prototype._find=function(e,t){var n=this;if(t.isFile)return e.emit("file",t.fullPath,t),void(this._first&&e.emit("end"));this._first&&(this._first=!1),e.emit("directory",t.fullPath,t),++this._dirs,t.createReader().readEntries(function(t){[].forEach.call(t,function(t){n._find(e,t)}),--n._dirs,n._dirs||e.emit("end")})}},9957(e,t,n){"use strict";var r=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=n(6743);e.exports=i.call(r,o)}}]);
|
|
6
6
|
//# sourceMappingURL=cloudcmd.common.js.map
|