@opencloud-eu/web-pkg 5.0.0 → 6.0.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/dist/{TextEditor-CJgYG8Kl.js → TextEditor-D-HQDUkm.js} +3 -5
- package/dist/assets/worker-CVwKToFD.js +21 -0
- package/dist/assets/worker-DJbU-qfq.js +21 -0
- package/dist/assets/worker-DyU7W9CZ.js +21 -0
- package/dist/index-OU30YA6H.js +25032 -0
- package/dist/src/apps/types.d.ts +0 -3
- package/dist/src/components/AppBar/AppBar.vue.d.ts +2 -9
- package/dist/src/components/AppBar/index.d.ts +0 -1
- package/dist/src/components/AppTemplates/AppWrapper.vue.d.ts +1 -1
- package/dist/src/components/AppTopBar.vue.d.ts +1 -1
- package/dist/src/components/ContextActions/ContextMenuQuickAction.vue.d.ts +409 -11
- package/dist/src/components/CreateShortcutModal.vue.d.ts +222 -0
- package/dist/src/components/CustomComponentTarget.vue.d.ts +4 -14
- package/dist/src/components/FilesList/ResourceStatusIndicators.vue.d.ts +1 -1
- package/dist/src/components/FilesList/ResourceTable.vue.d.ts +0 -1
- package/dist/src/components/Filters/DateFilter.vue.d.ts +500 -0
- package/dist/src/components/Navigation/MobileNav.vue.d.ts +2 -0
- package/dist/src/components/Navigation/index.d.ts +1 -0
- package/dist/src/components/NoContentMessage.vue.d.ts +3 -2
- package/dist/src/components/SideBar/FileSideBar.vue.d.ts +4 -13
- package/dist/src/components/SideBar/SideBar.vue.d.ts +3 -9
- package/dist/src/components/SideBar/SideBarPanels.vue.d.ts +38 -0
- package/dist/src/components/SideBar/index.d.ts +1 -0
- package/dist/src/components/index.d.ts +1 -1
- package/dist/src/composables/actions/files/index.d.ts +1 -0
- package/dist/src/composables/actions/files/useFileActionFallbackToDownload.d.ts +4 -0
- package/dist/src/composables/actions/spaces/index.d.ts +1 -0
- package/dist/src/composables/actions/spaces/useSpaceActionsCreate.d.ts +7 -0
- package/dist/src/composables/folderLink/useFolderLink.d.ts +1 -1
- package/dist/src/composables/index.d.ts +1 -2
- package/dist/src/composables/navItems/index.d.ts +1 -0
- package/dist/src/composables/navItems/useNavItems.d.ts +13 -0
- package/dist/src/composables/piniaStores/auth.d.ts +8 -2
- package/dist/src/composables/piniaStores/avatars.d.ts +1 -1
- package/dist/src/composables/piniaStores/extensionRegistry/types.d.ts +14 -1
- package/dist/src/composables/piniaStores/index.d.ts +4 -3
- package/dist/src/composables/piniaStores/sideBar.d.ts +32 -0
- package/dist/src/composables/piniaStores/user.d.ts +1 -1
- package/dist/src/composables/resources/index.d.ts +1 -0
- package/dist/src/composables/resources/useResourceIndicators.d.ts +19 -0
- package/dist/src/composables/resources/useResourceViewContextMenu.d.ts +4 -3
- package/dist/src/composables/resources/useResourceViewHelpers.d.ts +2 -2
- package/dist/src/composables/spaces/useCreateSpace.d.ts +1 -0
- package/dist/src/constants.d.ts +0 -6
- package/dist/src/extensionPoints.d.ts +3 -0
- package/dist/src/helpers/filesize.d.ts +0 -7
- package/dist/src/helpers/index.d.ts +1 -2
- package/dist/src/helpers/versions.d.ts +5 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/web-pkg.js +301 -300
- package/dist/web-pkg.umd.cjs +14 -66
- package/package.json +5 -7
- package/src/index.ts +1 -0
- package/dist/assets/worker-Bc2UmjVr.js +0 -40
- package/dist/assets/worker-BeDmEhWu.js +0 -40
- package/dist/assets/worker-DWoO7i6z.js +0 -40
- package/dist/index-D-EuklHo.js +0 -33782
- package/dist/src/components/AppBar/CreateSpace.vue.d.ts +0 -18
- package/dist/src/components/PortalTarget.vue.d.ts +0 -41
- package/dist/src/components/TextEditor/TextEditor.vue.d.ts +0 -165
- package/dist/src/components/TextEditor/index.d.ts +0 -161
- package/dist/src/composables/portalTarget/eventTopics.d.ts +0 -3
- package/dist/src/composables/portalTarget/index.d.ts +0 -2
- package/dist/src/composables/portalTarget/usePortalTarget.d.ts +0 -4
- package/dist/src/composables/sideBar/eventTopics.d.ts +0 -7
- package/dist/src/composables/sideBar/index.d.ts +0 -2
- package/dist/src/composables/sideBar/useSideBar.d.ts +0 -12
- package/dist/src/helpers/contextMenuDropdown.d.ts +0 -7
- package/dist/src/helpers/statusIndicators.d.ts +0 -23
- package/dist/src/services/passwordPolicy/rules.d.ts +0 -69
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
(function(){"use strict";function zn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ur={exports:{}},qn;function Qo(){return qn||(qn=1,(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(l,c,a){this.fn=l,this.context=c,this.once=a||!1}function s(l,c,a,h,p){if(typeof a!="function")throw new TypeError("The listener must be a function");var y=new i(a,h||l,p),g=r?r+c:c;return l._events[g]?l._events[g].fn?l._events[g]=[l._events[g],y]:l._events[g].push(y):(l._events[g]=y,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new n:delete l._events[c]}function u(){this._events=new n,this._eventsCount=0}u.prototype.eventNames=function(){var c=[],a,h;if(this._eventsCount===0)return c;for(h in a=this._events)e.call(a,h)&&c.push(r?h.slice(1):h);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(a)):c},u.prototype.listeners=function(c){var a=r?r+c:c,h=this._events[a];if(!h)return[];if(h.fn)return[h.fn];for(var p=0,y=h.length,g=new Array(y);p<y;p++)g[p]=h[p].fn;return g},u.prototype.listenerCount=function(c){var a=r?r+c:c,h=this._events[a];return h?h.fn?1:h.length:0},u.prototype.emit=function(c,a,h,p,y,g){var m=r?r+c:c;if(!this._events[m])return!1;var b=this._events[m],v=arguments.length,E,T;if(b.fn){switch(b.once&&this.removeListener(c,b.fn,void 0,!0),v){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,a),!0;case 3:return b.fn.call(b.context,a,h),!0;case 4:return b.fn.call(b.context,a,h,p),!0;case 5:return b.fn.call(b.context,a,h,p,y),!0;case 6:return b.fn.call(b.context,a,h,p,y,g),!0}for(T=1,E=new Array(v-1);T<v;T++)E[T-1]=arguments[T];b.fn.apply(b.context,E)}else{var P=b.length,S;for(T=0;T<P;T++)switch(b[T].once&&this.removeListener(c,b[T].fn,void 0,!0),v){case 1:b[T].fn.call(b[T].context);break;case 2:b[T].fn.call(b[T].context,a);break;case 3:b[T].fn.call(b[T].context,a,h);break;case 4:b[T].fn.call(b[T].context,a,h,p);break;default:if(!E)for(S=1,E=new Array(v-1);S<v;S++)E[S-1]=arguments[S];b[T].fn.apply(b[T].context,E)}}return!0},u.prototype.on=function(c,a,h){return s(this,c,a,h,!1)},u.prototype.once=function(c,a,h){return s(this,c,a,h,!0)},u.prototype.removeListener=function(c,a,h,p){var y=r?r+c:c;if(!this._events[y])return this;if(!a)return o(this,y),this;var g=this._events[y];if(g.fn)g.fn===a&&(!p||g.once)&&(!h||g.context===h)&&o(this,y);else{for(var m=0,b=[],v=g.length;m<v;m++)(g[m].fn!==a||p&&!g[m].once||h&&g[m].context!==h)&&b.push(g[m]);b.length?this._events[y]=b.length===1?b[0]:b:o(this,y)}return this},u.prototype.removeAllListeners=function(c){var a;return c?(a=r?r+c:c,this._events[a]&&o(this,a)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=r,u.EventEmitter=u,t.exports=u})(Ur)),Ur.exports}var ea=Qo(),ta=zn(ea);class Br extends Error{name="TimeoutError";constructor(e,r){super(e,r),Error.captureStackTrace?.(this,Br)}}const Wn=t=>t.reason??new DOMException("This operation was aborted.","AbortError");function ra(t,e){const{milliseconds:r,fallback:n,message:i,customTimers:s={setTimeout,clearTimeout},signal:o}=e;let u,l;const a=new Promise((h,p)=>{if(typeof r!="number"||Math.sign(r)!==1)throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${r}\``);if(o?.aborted){p(Wn(o));return}if(o&&(l=()=>{p(Wn(o))},o.addEventListener("abort",l,{once:!0})),t.then(h,p),r===Number.POSITIVE_INFINITY)return;const y=new Br;u=s.setTimeout.call(void 0,()=>{if(n){try{h(n())}catch(g){p(g)}return}typeof t.cancel=="function"&&t.cancel(),i===!1?h():i instanceof Error?p(i):(y.message=i??`Promise timed out after ${r} milliseconds`,p(y))},r)}).finally(()=>{a.clear(),l&&o&&o.removeEventListener("abort",l)});return a.clear=()=>{s.clearTimeout.call(void 0,u),u=void 0},a}function na(t,e,r){let n=0,i=t.length;for(;i>0;){const s=Math.trunc(i/2);let o=n+s;r(t[o],e)<=0?(n=++o,i-=s+1):i=s}return n}class ia{#e=[];enqueue(e,r){const{priority:n=0,id:i}=r??{},s={priority:n,id:i,run:e};if(this.size===0||this.#e[this.size-1].priority>=n){this.#e.push(s);return}const o=na(this.#e,s,(u,l)=>l.priority-u.priority);this.#e.splice(o,0,s)}setPriority(e,r){const n=this.#e.findIndex(s=>s.id===e);if(n===-1)throw new ReferenceError(`No promise function with the id "${e}" exists in the queue.`);const[i]=this.#e.splice(n,1);this.enqueue(i.run,{priority:r,id:e})}dequeue(){return this.#e.shift()?.run}filter(e){return this.#e.filter(r=>r.priority===e.priority).map(r=>r.run)}get size(){return this.#e.length}}class sa extends ta{#e;#r;#s=0;#t;#n=!1;#d=!1;#l;#g=0;#f=0;#c;#p;#h;#o=[];#a=0;#i;#I;#u=0;#w;#m;#F=1n;#x=new Map;timeout;constructor(e){if(super(),e={carryoverIntervalCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:ia,strict:!1,...e},!(typeof e.intervalCap=="number"&&e.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${e.intervalCap?.toString()??""}\` (${typeof e.intervalCap})`);if(e.interval===void 0||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${e.interval?.toString()??""}\` (${typeof e.interval})`);if(e.strict&&e.interval===0)throw new TypeError("The `strict` option requires a non-zero `interval`");if(e.strict&&e.intervalCap===Number.POSITIVE_INFINITY)throw new TypeError("The `strict` option requires a finite `intervalCap`");if(this.#e=e.carryoverIntervalCount??e.carryoverConcurrencyCount??!1,this.#r=e.intervalCap===Number.POSITIVE_INFINITY||e.interval===0,this.#t=e.intervalCap,this.#l=e.interval,this.#h=e.strict,this.#i=new e.queueClass,this.#I=e.queueClass,this.concurrency=e.concurrency,e.timeout!==void 0&&!(Number.isFinite(e.timeout)&&e.timeout>0))throw new TypeError(`Expected \`timeout\` to be a positive finite number, got \`${e.timeout}\` (${typeof e.timeout})`);this.timeout=e.timeout,this.#m=e.autoStart===!1,this.#M()}#E(e){for(;this.#a<this.#o.length;){const n=this.#o[this.#a];if(n!==void 0&&e-n>=this.#l)this.#a++;else break}(this.#a>100&&this.#a>this.#o.length/2||this.#a===this.#o.length)&&(this.#o=this.#o.slice(this.#a),this.#a=0)}#L(e){this.#h?this.#o.push(e):this.#s++}#_(){this.#h?this.#o.length>this.#a&&this.#o.pop():this.#s>0&&this.#s--}#v(){return this.#o.length-this.#a}get#U(){return this.#r?!0:this.#h?this.#v()<this.#t:this.#s<this.#t}get#B(){return this.#u<this.#w}#$(){this.#u--,this.#u===0&&this.emit("pendingZero"),this.#N(),this.emit("next")}#k(){this.#p=void 0,this.#C(),this.#O()}#j(e){if(this.#h){if(this.#E(e),this.#v()>=this.#t){const n=this.#o[this.#a],i=this.#l-(e-n);return this.#T(i),!0}return!1}if(this.#c===void 0){const r=this.#g-e;if(r<0){if(this.#f>0){const n=e-this.#f;if(n<this.#l)return this.#T(this.#l-n),!0}this.#s=this.#e?this.#u:0}else return this.#T(r),!0}return!1}#T(e){this.#p===void 0&&(this.#p=setTimeout(()=>{this.#k()},e))}#A(){this.#c&&(clearInterval(this.#c),this.#c=void 0)}#S(){this.#p&&(clearTimeout(this.#p),this.#p=void 0)}#N(){if(this.#i.size===0){if(this.#A(),this.emit("empty"),this.#u===0){if(this.#S(),this.#h&&this.#a>0){const r=Date.now();this.#E(r)}this.emit("idle")}return!1}let e=!1;if(!this.#m){const r=Date.now(),n=!this.#j(r);if(this.#U&&this.#B){const i=this.#i.dequeue();this.#r||(this.#L(r),this.#b()),this.emit("active"),i(),n&&this.#O(),e=!0}}return e}#O(){this.#r||this.#c!==void 0||this.#h||(this.#c=setInterval(()=>{this.#C()},this.#l),this.#g=Date.now()+this.#l)}#C(){this.#h||(this.#s===0&&this.#u===0&&this.#c&&this.#A(),this.#s=this.#e?this.#u:0),this.#P(),this.#b()}#P(){for(;this.#N(););}get concurrency(){return this.#w}set concurrency(e){if(!(typeof e=="number"&&e>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this.#w=e,this.#P()}setPriority(e,r){if(typeof r!="number"||!Number.isFinite(r))throw new TypeError(`Expected \`priority\` to be a finite number, got \`${r}\` (${typeof r})`);this.#i.setPriority(e,r)}async add(e,r={}){return r={timeout:this.timeout,...r,id:r.id??(this.#F++).toString()},new Promise((n,i)=>{const s=Symbol(`task-${r.id}`);this.#i.enqueue(async()=>{this.#u++,this.#x.set(s,{id:r.id,priority:r.priority??0,startTime:Date.now(),timeout:r.timeout});let o;try{try{r.signal?.throwIfAborted()}catch(c){throw this.#V(),this.#x.delete(s),c}this.#f=Date.now();let u=e({signal:r.signal});if(r.timeout&&(u=ra(Promise.resolve(u),{milliseconds:r.timeout,message:`Task timed out after ${r.timeout}ms (queue has ${this.#u} running, ${this.#i.size} waiting)`})),r.signal){const{signal:c}=r;u=Promise.race([u,new Promise((a,h)=>{o=()=>{h(c.reason)},c.addEventListener("abort",o,{once:!0})})])}const l=await u;n(l),this.emit("completed",l)}catch(u){i(u),this.emit("error",u)}finally{o&&r.signal?.removeEventListener("abort",o),this.#x.delete(s),queueMicrotask(()=>{this.#$()})}},r),this.emit("add"),this.#N()})}async addAll(e,r){return Promise.all(e.map(async n=>this.add(n,r)))}start(){return this.#m?(this.#m=!1,this.#P(),this):this}pause(){this.#m=!0}clear(){this.#i=new this.#I,this.#A(),this.#R(),this.emit("empty"),this.#u===0&&(this.#S(),this.emit("idle")),this.emit("next")}async onEmpty(){this.#i.size!==0&&await this.#y("empty")}async onSizeLessThan(e){this.#i.size<e||await this.#y("next",()=>this.#i.size<e)}async onIdle(){this.#u===0&&this.#i.size===0||await this.#y("idle")}async onPendingZero(){this.#u!==0&&await this.#y("pendingZero")}async onRateLimit(){this.isRateLimited||await this.#y("rateLimit")}async onRateLimitCleared(){this.isRateLimited&&await this.#y("rateLimitCleared")}onError(){return new Promise((e,r)=>{const n=i=>{this.off("error",n),r(i)};this.on("error",n)})}async#y(e,r){return new Promise(n=>{const i=()=>{r&&!r()||(this.off(e,i),n())};this.on(e,i)})}get size(){return this.#i.size}sizeBy(e){return this.#i.filter(e).length}get pending(){return this.#u}get isPaused(){return this.#m}#M(){this.#r||(this.on("add",()=>{this.#i.size>0&&this.#b()}),this.on("next",()=>{this.#b()}))}#b(){this.#r||this.#d||(this.#d=!0,queueMicrotask(()=>{this.#d=!1,this.#R()}))}#V(){this.#r||(this.#_(),this.#b())}#R(){const e=this.#n;if(this.#r||this.#i.size===0){e&&(this.#n=!1,this.emit("rateLimitCleared"));return}let r;if(this.#h){const i=Date.now();this.#E(i),r=this.#v()}else r=this.#s;const n=r>=this.#t;n!==e&&(this.#n=n,this.emit(n?"rateLimit":"rateLimitCleared"))}get isRateLimited(){return this.#n}get isSaturated(){return this.#u===this.#w&&this.#i.size>0||this.isRateLimited&&this.#i.size>0}get runningTasks(){return[...this.#x.values()].map(e=>({...e}))}}function oa(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Gn={exports:{}},Z=Gn.exports={},_e,Ue;function $r(){throw new Error("setTimeout has not been defined")}function kr(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?_e=setTimeout:_e=$r}catch{_e=$r}try{typeof clearTimeout=="function"?Ue=clearTimeout:Ue=kr}catch{Ue=kr}})();function Kn(t){if(_e===setTimeout)return setTimeout(t,0);if((_e===$r||!_e)&&setTimeout)return _e=setTimeout,setTimeout(t,0);try{return _e(t,0)}catch{try{return _e.call(null,t,0)}catch{return _e.call(this,t,0)}}}function aa(t){if(Ue===clearTimeout)return clearTimeout(t);if((Ue===kr||!Ue)&&clearTimeout)return Ue=clearTimeout,clearTimeout(t);try{return Ue(t)}catch{try{return Ue.call(null,t)}catch{return Ue.call(this,t)}}}var Me=[],dt=!1,tt,Zt=-1;function ua(){!dt||!tt||(dt=!1,tt.length?Me=tt.concat(Me):Zt=-1,Me.length&&Jn())}function Jn(){if(!dt){var t=Kn(ua);dt=!0;for(var e=Me.length;e;){for(tt=Me,Me=[];++Zt<e;)tt&&tt[Zt].run();Zt=-1,e=Me.length}tt=null,dt=!1,aa(t)}}Z.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];Me.push(new Yn(t,e)),Me.length===1&&!dt&&Kn(Jn)};function Yn(t,e){this.fun=t,this.array=e}Yn.prototype.run=function(){this.fun.apply(null,this.array)},Z.title="browser",Z.browser=!0,Z.env={},Z.argv=[],Z.version="",Z.versions={};function Ve(){}Z.on=Ve,Z.addListener=Ve,Z.once=Ve,Z.off=Ve,Z.removeListener=Ve,Z.removeAllListeners=Ve,Z.emit=Ve,Z.prependListener=Ve,Z.prependOnceListener=Ve,Z.listeners=function(t){return[]},Z.binding=function(t){throw new Error("process.binding is not supported")},Z.cwd=function(){return"/"},Z.chdir=function(t){throw new Error("process.chdir is not supported")},Z.umask=function(){return 0};var la=Gn.exports;const Be=oa(la);var jr,Xn;function ca(){if(Xn)return jr;Xn=1;function t(i){if(typeof i!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(i))}function e(i,s){for(var o="",u=0,l=-1,c=0,a,h=0;h<=i.length;++h){if(h<i.length)a=i.charCodeAt(h);else{if(a===47)break;a=47}if(a===47){if(!(l===h-1||c===1))if(l!==h-1&&c===2){if(o.length<2||u!==2||o.charCodeAt(o.length-1)!==46||o.charCodeAt(o.length-2)!==46){if(o.length>2){var p=o.lastIndexOf("/");if(p!==o.length-1){p===-1?(o="",u=0):(o=o.slice(0,p),u=o.length-1-o.lastIndexOf("/")),l=h,c=0;continue}}else if(o.length===2||o.length===1){o="",u=0,l=h,c=0;continue}}s&&(o.length>0?o+="/..":o="..",u=2)}else o.length>0?o+="/"+i.slice(l+1,h):o=i.slice(l+1,h),u=h-l-1;l=h,c=0}else a===46&&c!==-1?++c:c=-1}return o}function r(i,s){var o=s.dir||s.root,u=s.base||(s.name||"")+(s.ext||"");return o?o===s.root?o+u:o+i+u:u}var n={resolve:function(){for(var s="",o=!1,u,l=arguments.length-1;l>=-1&&!o;l--){var c;l>=0?c=arguments[l]:(u===void 0&&(u=Be.cwd()),c=u),t(c),c.length!==0&&(s=c+"/"+s,o=c.charCodeAt(0)===47)}return s=e(s,!o),o?s.length>0?"/"+s:"/":s.length>0?s:"."},normalize:function(s){if(t(s),s.length===0)return".";var o=s.charCodeAt(0)===47,u=s.charCodeAt(s.length-1)===47;return s=e(s,!o),s.length===0&&!o&&(s="."),s.length>0&&u&&(s+="/"),o?"/"+s:s},isAbsolute:function(s){return t(s),s.length>0&&s.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var s,o=0;o<arguments.length;++o){var u=arguments[o];t(u),u.length>0&&(s===void 0?s=u:s+="/"+u)}return s===void 0?".":n.normalize(s)},relative:function(s,o){if(t(s),t(o),s===o||(s=n.resolve(s),o=n.resolve(o),s===o))return"";for(var u=1;u<s.length&&s.charCodeAt(u)===47;++u);for(var l=s.length,c=l-u,a=1;a<o.length&&o.charCodeAt(a)===47;++a);for(var h=o.length,p=h-a,y=c<p?c:p,g=-1,m=0;m<=y;++m){if(m===y){if(p>y){if(o.charCodeAt(a+m)===47)return o.slice(a+m+1);if(m===0)return o.slice(a+m)}else c>y&&(s.charCodeAt(u+m)===47?g=m:m===0&&(g=0));break}var b=s.charCodeAt(u+m),v=o.charCodeAt(a+m);if(b!==v)break;b===47&&(g=m)}var E="";for(m=u+g+1;m<=l;++m)(m===l||s.charCodeAt(m)===47)&&(E.length===0?E+="..":E+="/..");return E.length>0?E+o.slice(a+g):(a+=g,o.charCodeAt(a)===47&&++a,o.slice(a))},_makeLong:function(s){return s},dirname:function(s){if(t(s),s.length===0)return".";for(var o=s.charCodeAt(0),u=o===47,l=-1,c=!0,a=s.length-1;a>=1;--a)if(o=s.charCodeAt(a),o===47){if(!c){l=a;break}}else c=!1;return l===-1?u?"/":".":u&&l===1?"//":s.slice(0,l)},basename:function(s,o){if(o!==void 0&&typeof o!="string")throw new TypeError('"ext" argument must be a string');t(s);var u=0,l=-1,c=!0,a;if(o!==void 0&&o.length>0&&o.length<=s.length){if(o.length===s.length&&o===s)return"";var h=o.length-1,p=-1;for(a=s.length-1;a>=0;--a){var y=s.charCodeAt(a);if(y===47){if(!c){u=a+1;break}}else p===-1&&(c=!1,p=a+1),h>=0&&(y===o.charCodeAt(h)?--h===-1&&(l=a):(h=-1,l=p))}return u===l?l=p:l===-1&&(l=s.length),s.slice(u,l)}else{for(a=s.length-1;a>=0;--a)if(s.charCodeAt(a)===47){if(!c){u=a+1;break}}else l===-1&&(c=!1,l=a+1);return l===-1?"":s.slice(u,l)}},extname:function(s){t(s);for(var o=-1,u=0,l=-1,c=!0,a=0,h=s.length-1;h>=0;--h){var p=s.charCodeAt(h);if(p===47){if(!c){u=h+1;break}continue}l===-1&&(c=!1,l=h+1),p===46?o===-1?o=h:a!==1&&(a=1):o!==-1&&(a=-1)}return o===-1||l===-1||a===0||a===1&&o===l-1&&o===u+1?"":s.slice(o,l)},format:function(s){if(s===null||typeof s!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof s);return r("/",s)},parse:function(s){t(s);var o={root:"",dir:"",base:"",ext:"",name:""};if(s.length===0)return o;var u=s.charCodeAt(0),l=u===47,c;l?(o.root="/",c=1):c=0;for(var a=-1,h=0,p=-1,y=!0,g=s.length-1,m=0;g>=c;--g){if(u=s.charCodeAt(g),u===47){if(!y){h=g+1;break}continue}p===-1&&(y=!1,p=g+1),u===46?a===-1?a=g:m!==1&&(m=1):a!==-1&&(m=-1)}return a===-1||p===-1||m===0||m===1&&a===p-1&&a===h+1?p!==-1&&(h===0&&l?o.base=o.name=s.slice(1,p):o.base=o.name=s.slice(h,p)):(h===0&&l?(o.name=s.slice(1,a),o.base=s.slice(1,p)):(o.name=s.slice(h,a),o.base=s.slice(h,p)),o.ext=s.slice(a,p)),h>0?o.dir=s.slice(0,h-1):l&&(o.dir="/"),o},sep:"/",delimiter:":",win32:null,posix:null};return n.posix=n,jr=n,jr}var Qt=ca(),Zn=zn(Qt);const Re=globalThis||void 0||self;function Qn(t,e){return function(){return t.apply(e,arguments)}}const{toString:fa}=Object.prototype,{getPrototypeOf:Mr}=Object,{iterator:er,toStringTag:ei}=Symbol,tr=(t=>e=>{const r=fa.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Fe=t=>(t=t.toLowerCase(),e=>tr(e)===t),rr=t=>e=>typeof e===t,{isArray:pt}=Array,gt=rr("undefined");function St(t){return t!==null&&!gt(t)&&t.constructor!==null&&!gt(t.constructor)&&xe(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const ti=Fe("ArrayBuffer");function ha(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&ti(t.buffer),e}const da=rr("string"),xe=rr("function"),ri=rr("number"),Ot=t=>t!==null&&typeof t=="object",pa=t=>t===!0||t===!1,nr=t=>{if(tr(t)!=="object")return!1;const e=Mr(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(ei in t)&&!(er in t)},ga=t=>{if(!Ot(t)||St(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},ma=Fe("Date"),ya=Fe("File"),ba=t=>!!(t&&typeof t.uri<"u"),wa=t=>t&&typeof t.getParts<"u",xa=Fe("Blob"),Ea=Fe("FileList"),va=t=>Ot(t)&&xe(t.pipe);function Ta(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof Re<"u"?Re:{}}const ni=Ta(),ii=typeof ni.FormData<"u"?ni.FormData:void 0,Aa=t=>{let e;return t&&(ii&&t instanceof ii||xe(t.append)&&((e=tr(t))==="formdata"||e==="object"&&xe(t.toString)&&t.toString()==="[object FormData]"))},Na=Fe("URLSearchParams"),[Pa,Ia,Sa,Oa]=["ReadableStream","Request","Response","Headers"].map(Fe),Ca=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ct(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,i;if(typeof t!="object"&&(t=[t]),pt(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{if(St(t))return;const s=r?Object.getOwnPropertyNames(t):Object.keys(t),o=s.length;let u;for(n=0;n<o;n++)u=s[n],e.call(null,t[u],u,t)}}function si(t,e){if(St(t))return null;e=e.toLowerCase();const r=Object.keys(t);let n=r.length,i;for(;n-- >0;)if(i=r[n],e===i.toLowerCase())return i;return null}const rt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:Re,oi=t=>!gt(t)&&t!==rt;function Vr(){const{caseless:t,skipUndefined:e}=oi(this)&&this||{},r={},n=(i,s)=>{if(s==="__proto__"||s==="constructor"||s==="prototype")return;const o=t&&si(r,s)||s;nr(r[o])&&nr(i)?r[o]=Vr(r[o],i):nr(i)?r[o]=Vr({},i):pt(i)?r[o]=i.slice():(!e||!gt(i))&&(r[o]=i)};for(let i=0,s=arguments.length;i<s;i++)arguments[i]&&Ct(arguments[i],n);return r}const Ra=(t,e,r,{allOwnKeys:n}={})=>(Ct(e,(i,s)=>{r&&xe(i)?Object.defineProperty(t,s,{value:Qn(i,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,s,{value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),t),Fa=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),La=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},_a=(t,e,r,n)=>{let i,s,o;const u={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),s=i.length;s-- >0;)o=i[s],(!n||n(o,t,e))&&!u[o]&&(e[o]=t[o],u[o]=!0);t=r!==!1&&Mr(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},Ua=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},Ba=t=>{if(!t)return null;if(pt(t))return t;let e=t.length;if(!ri(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},$a=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Mr(Uint8Array)),ka=(t,e)=>{const n=(t&&t[er]).call(t);let i;for(;(i=n.next())&&!i.done;){const s=i.value;e.call(t,s[0],s[1])}},ja=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},Ma=Fe("HTMLFormElement"),Va=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),ai=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),Da=Fe("RegExp"),ui=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};Ct(r,(i,s)=>{let o;(o=e(i,s,t))!==!1&&(n[s]=o||i)}),Object.defineProperties(t,n)},Ha=t=>{ui(t,(e,r)=>{if(xe(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(xe(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},za=(t,e)=>{const r={},n=i=>{i.forEach(s=>{r[s]=!0})};return pt(t)?n(t):n(String(t).split(e)),r},qa=()=>{},Wa=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Ga(t){return!!(t&&xe(t.append)&&t[ei]==="FormData"&&t[er])}const Ka=t=>{const e=new Array(10),r=(n,i)=>{if(Ot(n)){if(e.indexOf(n)>=0)return;if(St(n))return n;if(!("toJSON"in n)){e[i]=n;const s=pt(n)?[]:{};return Ct(n,(o,u)=>{const l=r(o,i+1);!gt(l)&&(s[u]=l)}),e[i]=void 0,s}}return n};return r(t,0)},Ja=Fe("AsyncFunction"),Ya=t=>t&&(Ot(t)||xe(t))&&xe(t.then)&&xe(t.catch),li=((t,e)=>t?setImmediate:e?((r,n)=>(rt.addEventListener("message",({source:i,data:s})=>{i===rt&&s===r&&n.length&&n.shift()()},!1),i=>{n.push(i),rt.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",xe(rt.postMessage)),Xa=typeof queueMicrotask<"u"?queueMicrotask.bind(rt):typeof Be<"u"&&Be.nextTick||li;var N={isArray:pt,isArrayBuffer:ti,isBuffer:St,isFormData:Aa,isArrayBufferView:ha,isString:da,isNumber:ri,isBoolean:pa,isObject:Ot,isPlainObject:nr,isEmptyObject:ga,isReadableStream:Pa,isRequest:Ia,isResponse:Sa,isHeaders:Oa,isUndefined:gt,isDate:ma,isFile:ya,isReactNativeBlob:ba,isReactNative:wa,isBlob:xa,isRegExp:Da,isFunction:xe,isStream:va,isURLSearchParams:Na,isTypedArray:$a,isFileList:Ea,forEach:Ct,merge:Vr,extend:Ra,trim:Ca,stripBOM:Fa,inherits:La,toFlatObject:_a,kindOf:tr,kindOfTest:Fe,endsWith:Ua,toArray:Ba,forEachEntry:ka,matchAll:ja,isHTMLForm:Ma,hasOwnProperty:ai,hasOwnProp:ai,reduceDescriptors:ui,freezeMethods:Ha,toObjectSet:za,toCamelCase:Va,noop:qa,toFiniteNumber:Wa,findKey:si,global:rt,isContextDefined:oi,isSpecCompliantForm:Ga,toJSONObject:Ka,isAsyncFn:Ja,isThenable:Ya,setImmediate:li,asap:Xa,isIterable:t=>t!=null&&xe(t[er])},ci={},ir={};ir.byteLength=eu,ir.toByteArray=ru,ir.fromByteArray=su;for(var $e=[],Ie=[],Za=typeof Uint8Array<"u"?Uint8Array:Array,Dr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",mt=0,Qa=Dr.length;mt<Qa;++mt)$e[mt]=Dr[mt],Ie[Dr.charCodeAt(mt)]=mt;Ie[45]=62,Ie[95]=63;function fi(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function eu(t){var e=fi(t),r=e[0],n=e[1];return(r+n)*3/4-n}function tu(t,e,r){return(e+r)*3/4-r}function ru(t){var e,r=fi(t),n=r[0],i=r[1],s=new Za(tu(t,n,i)),o=0,u=i>0?n-4:n,l;for(l=0;l<u;l+=4)e=Ie[t.charCodeAt(l)]<<18|Ie[t.charCodeAt(l+1)]<<12|Ie[t.charCodeAt(l+2)]<<6|Ie[t.charCodeAt(l+3)],s[o++]=e>>16&255,s[o++]=e>>8&255,s[o++]=e&255;return i===2&&(e=Ie[t.charCodeAt(l)]<<2|Ie[t.charCodeAt(l+1)]>>4,s[o++]=e&255),i===1&&(e=Ie[t.charCodeAt(l)]<<10|Ie[t.charCodeAt(l+1)]<<4|Ie[t.charCodeAt(l+2)]>>2,s[o++]=e>>8&255,s[o++]=e&255),s}function nu(t){return $e[t>>18&63]+$e[t>>12&63]+$e[t>>6&63]+$e[t&63]}function iu(t,e,r){for(var n,i=[],s=e;s<r;s+=3)n=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(t[s+2]&255),i.push(nu(n));return i.join("")}function su(t){for(var e,r=t.length,n=r%3,i=[],s=16383,o=0,u=r-n;o<u;o+=s)i.push(iu(t,o,o+s>u?u:o+s));return n===1?(e=t[r-1],i.push($e[e>>2]+$e[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push($e[e>>10]+$e[e>>4&63]+$e[e<<2&63]+"=")),i.join("")}var Hr={};Hr.read=function(t,e,r,n,i){var s,o,u=i*8-n-1,l=(1<<u)-1,c=l>>1,a=-7,h=r?i-1:0,p=r?-1:1,y=t[e+h];for(h+=p,s=y&(1<<-a)-1,y>>=-a,a+=u;a>0;s=s*256+t[e+h],h+=p,a-=8);for(o=s&(1<<-a)-1,s>>=-a,a+=n;a>0;o=o*256+t[e+h],h+=p,a-=8);if(s===0)s=1-c;else{if(s===l)return o?NaN:(y?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-c}return(y?-1:1)*o*Math.pow(2,s-n)},Hr.write=function(t,e,r,n,i,s){var o,u,l,c=s*8-i-1,a=(1<<c)-1,h=a>>1,p=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=n?0:s-1,g=n?1:-1,m=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,o=a):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+h>=1?e+=p/l:e+=p*Math.pow(2,1-h),e*l>=2&&(o++,l/=2),o+h>=a?(u=0,o=a):o+h>=1?(u=(e*l-1)*Math.pow(2,i),o=o+h):(u=e*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;t[r+y]=u&255,y+=g,u/=256,i-=8);for(o=o<<i|u,c+=i;c>0;t[r+y]=o&255,y+=g,o/=256,c-=8);t[r+y-g]|=m*128};(function(t){const e=ir,r=Hr,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=a,t.SlowBuffer=S,t.INSPECT_MAX_BYTES=50;const i=2147483647;t.kMaxLength=i;const{Uint8Array:s,ArrayBuffer:o,SharedArrayBuffer:u}=globalThis;a.TYPED_ARRAY_SUPPORT=l(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function l(){try{const w=new s(1),f={foo:function(){return 42}};return Object.setPrototypeOf(f,s.prototype),Object.setPrototypeOf(w,f),w.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function c(w){if(w>i)throw new RangeError('The value "'+w+'" is invalid for option "size"');const f=new s(w);return Object.setPrototypeOf(f,a.prototype),f}function a(w,f,d){if(typeof w=="number"){if(typeof f=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return g(w)}return h(w,f,d)}a.poolSize=8192;function h(w,f,d){if(typeof w=="string")return m(w,f);if(o.isView(w))return v(w);if(w==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof w);if(je(w,o)||w&&je(w.buffer,o)||typeof u<"u"&&(je(w,u)||w&&je(w.buffer,u)))return E(w,f,d);if(typeof w=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const x=w.valueOf&&w.valueOf();if(x!=null&&x!==w)return a.from(x,f,d);const A=T(w);if(A)return A;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof w[Symbol.toPrimitive]=="function")return a.from(w[Symbol.toPrimitive]("string"),f,d);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof w)}a.from=function(w,f,d){return h(w,f,d)},Object.setPrototypeOf(a.prototype,s.prototype),Object.setPrototypeOf(a,s);function p(w){if(typeof w!="number")throw new TypeError('"size" argument must be of type number');if(w<0)throw new RangeError('The value "'+w+'" is invalid for option "size"')}function y(w,f,d){return p(w),w<=0?c(w):f!==void 0?typeof d=="string"?c(w).fill(f,d):c(w).fill(f):c(w)}a.alloc=function(w,f,d){return y(w,f,d)};function g(w){return p(w),c(w<0?0:P(w)|0)}a.allocUnsafe=function(w){return g(w)},a.allocUnsafeSlow=function(w){return g(w)};function m(w,f){if((typeof f!="string"||f==="")&&(f="utf8"),!a.isEncoding(f))throw new TypeError("Unknown encoding: "+f);const d=F(w,f)|0;let x=c(d);const A=x.write(w,f);return A!==d&&(x=x.slice(0,A)),x}function b(w){const f=w.length<0?0:P(w.length)|0,d=c(f);for(let x=0;x<f;x+=1)d[x]=w[x]&255;return d}function v(w){if(je(w,s)){const f=new s(w);return E(f.buffer,f.byteOffset,f.byteLength)}return b(w)}function E(w,f,d){if(f<0||w.byteLength<f)throw new RangeError('"offset" is outside of buffer bounds');if(w.byteLength<f+(d||0))throw new RangeError('"length" is outside of buffer bounds');let x;return f===void 0&&d===void 0?x=new s(w):d===void 0?x=new s(w,f):x=new s(w,f,d),Object.setPrototypeOf(x,a.prototype),x}function T(w){if(a.isBuffer(w)){const f=P(w.length)|0,d=c(f);return d.length===0||w.copy(d,0,0,f),d}if(w.length!==void 0)return typeof w.length!="number"||Hn(w.length)?c(0):b(w);if(w.type==="Buffer"&&Array.isArray(w.data))return b(w.data)}function P(w){if(w>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return w|0}function S(w){return+w!=w&&(w=0),a.alloc(+w)}a.isBuffer=function(f){return f!=null&&f._isBuffer===!0&&f!==a.prototype},a.compare=function(f,d){if(je(f,s)&&(f=a.from(f,f.offset,f.byteLength)),je(d,s)&&(d=a.from(d,d.offset,d.byteLength)),!a.isBuffer(f)||!a.isBuffer(d))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(f===d)return 0;let x=f.length,A=d.length;for(let I=0,O=Math.min(x,A);I<O;++I)if(f[I]!==d[I]){x=f[I],A=d[I];break}return x<A?-1:A<x?1:0},a.isEncoding=function(f){switch(String(f).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(f,d){if(!Array.isArray(f))throw new TypeError('"list" argument must be an Array of Buffers');if(f.length===0)return a.alloc(0);let x;if(d===void 0)for(d=0,x=0;x<f.length;++x)d+=f[x].length;const A=a.allocUnsafe(d);let I=0;for(x=0;x<f.length;++x){let O=f[x];if(je(O,s))I+O.length>A.length?(a.isBuffer(O)||(O=a.from(O)),O.copy(A,I)):s.prototype.set.call(A,O,I);else if(a.isBuffer(O))O.copy(A,I);else throw new TypeError('"list" argument must be an Array of Buffers');I+=O.length}return A};function F(w,f){if(a.isBuffer(w))return w.length;if(o.isView(w)||je(w,o))return w.byteLength;if(typeof w!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof w);const d=w.length,x=arguments.length>2&&arguments[2]===!0;if(!x&&d===0)return 0;let A=!1;for(;;)switch(f){case"ascii":case"latin1":case"binary":return d;case"utf8":case"utf-8":return Dn(w).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d*2;case"hex":return d>>>1;case"base64":return Yo(w).length;default:if(A)return x?-1:Dn(w).length;f=(""+f).toLowerCase(),A=!0}}a.byteLength=F;function L(w,f,d){let x=!1;if((f===void 0||f<0)&&(f=0),f>this.length||((d===void 0||d>this.length)&&(d=this.length),d<=0)||(d>>>=0,f>>>=0,d<=f))return"";for(w||(w="utf8");;)switch(w){case"hex":return ce(this,f,d);case"utf8":case"utf-8":return ae(this,f,d);case"ascii":return Ze(this,f,d);case"latin1":case"binary":return re(this,f,d);case"base64":return J(this,f,d);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Qe(this,f,d);default:if(x)throw new TypeError("Unknown encoding: "+w);w=(w+"").toLowerCase(),x=!0}}a.prototype._isBuffer=!0;function U(w,f,d){const x=w[f];w[f]=w[d],w[d]=x}a.prototype.swap16=function(){const f=this.length;if(f%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let d=0;d<f;d+=2)U(this,d,d+1);return this},a.prototype.swap32=function(){const f=this.length;if(f%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let d=0;d<f;d+=4)U(this,d,d+3),U(this,d+1,d+2);return this},a.prototype.swap64=function(){const f=this.length;if(f%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let d=0;d<f;d+=8)U(this,d,d+7),U(this,d+1,d+6),U(this,d+2,d+5),U(this,d+3,d+4);return this},a.prototype.toString=function(){const f=this.length;return f===0?"":arguments.length===0?ae(this,0,f):L.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(f){if(!a.isBuffer(f))throw new TypeError("Argument must be a Buffer");return this===f?!0:a.compare(this,f)===0},a.prototype.inspect=function(){let f="";const d=t.INSPECT_MAX_BYTES;return f=this.toString("hex",0,d).replace(/(.{2})/g,"$1 ").trim(),this.length>d&&(f+=" ... "),"<Buffer "+f+">"},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(f,d,x,A,I){if(je(f,s)&&(f=a.from(f,f.offset,f.byteLength)),!a.isBuffer(f))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof f);if(d===void 0&&(d=0),x===void 0&&(x=f?f.length:0),A===void 0&&(A=0),I===void 0&&(I=this.length),d<0||x>f.length||A<0||I>this.length)throw new RangeError("out of range index");if(A>=I&&d>=x)return 0;if(A>=I)return-1;if(d>=x)return 1;if(d>>>=0,x>>>=0,A>>>=0,I>>>=0,this===f)return 0;let O=I-A,$=x-d;const Y=Math.min(O,$),q=this.slice(A,I),X=f.slice(d,x);for(let V=0;V<Y;++V)if(q[V]!==X[V]){O=q[V],$=X[V];break}return O<$?-1:$<O?1:0};function _(w,f,d,x,A){if(w.length===0)return-1;if(typeof d=="string"?(x=d,d=0):d>2147483647?d=2147483647:d<-2147483648&&(d=-2147483648),d=+d,Hn(d)&&(d=A?0:w.length-1),d<0&&(d=w.length+d),d>=w.length){if(A)return-1;d=w.length-1}else if(d<0)if(A)d=0;else return-1;if(typeof f=="string"&&(f=a.from(f,x)),a.isBuffer(f))return f.length===0?-1:j(w,f,d,x,A);if(typeof f=="number")return f=f&255,typeof s.prototype.indexOf=="function"?A?s.prototype.indexOf.call(w,f,d):s.prototype.lastIndexOf.call(w,f,d):j(w,[f],d,x,A);throw new TypeError("val must be string, number or Buffer")}function j(w,f,d,x,A){let I=1,O=w.length,$=f.length;if(x!==void 0&&(x=String(x).toLowerCase(),x==="ucs2"||x==="ucs-2"||x==="utf16le"||x==="utf-16le")){if(w.length<2||f.length<2)return-1;I=2,O/=2,$/=2,d/=2}function Y(X,V){return I===1?X[V]:X.readUInt16BE(V*I)}let q;if(A){let X=-1;for(q=d;q<O;q++)if(Y(w,q)===Y(f,X===-1?0:q-X)){if(X===-1&&(X=q),q-X+1===$)return X*I}else X!==-1&&(q-=q-X),X=-1}else for(d+$>O&&(d=O-$),q=d;q>=0;q--){let X=!0;for(let V=0;V<$;V++)if(Y(w,q+V)!==Y(f,V)){X=!1;break}if(X)return q}return-1}a.prototype.includes=function(f,d,x){return this.indexOf(f,d,x)!==-1},a.prototype.indexOf=function(f,d,x){return _(this,f,d,x,!0)},a.prototype.lastIndexOf=function(f,d,x){return _(this,f,d,x,!1)};function pe(w,f,d,x){d=Number(d)||0;const A=w.length-d;x?(x=Number(x),x>A&&(x=A)):x=A;const I=f.length;x>I/2&&(x=I/2);let O;for(O=0;O<x;++O){const $=parseInt(f.substr(O*2,2),16);if(Hn($))return O;w[d+O]=$}return O}function oe(w,f,d,x){return _r(Dn(f,w.length-d),w,d,x)}function R(w,f,d,x){return _r(Jg(f),w,d,x)}function le(w,f,d,x){return _r(Yo(f),w,d,x)}function Pe(w,f,d,x){return _r(Yg(f,w.length-d),w,d,x)}a.prototype.write=function(f,d,x,A){if(d===void 0)A="utf8",x=this.length,d=0;else if(x===void 0&&typeof d=="string")A=d,x=this.length,d=0;else if(isFinite(d))d=d>>>0,isFinite(x)?(x=x>>>0,A===void 0&&(A="utf8")):(A=x,x=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const I=this.length-d;if((x===void 0||x>I)&&(x=I),f.length>0&&(x<0||d<0)||d>this.length)throw new RangeError("Attempt to write outside buffer bounds");A||(A="utf8");let O=!1;for(;;)switch(A){case"hex":return pe(this,f,d,x);case"utf8":case"utf-8":return oe(this,f,d,x);case"ascii":case"latin1":case"binary":return R(this,f,d,x);case"base64":return le(this,f,d,x);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Pe(this,f,d,x);default:if(O)throw new TypeError("Unknown encoding: "+A);A=(""+A).toLowerCase(),O=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function J(w,f,d){return f===0&&d===w.length?e.fromByteArray(w):e.fromByteArray(w.slice(f,d))}function ae(w,f,d){d=Math.min(w.length,d);const x=[];let A=f;for(;A<d;){const I=w[A];let O=null,$=I>239?4:I>223?3:I>191?2:1;if(A+$<=d){let Y,q,X,V;switch($){case 1:I<128&&(O=I);break;case 2:Y=w[A+1],(Y&192)===128&&(V=(I&31)<<6|Y&63,V>127&&(O=V));break;case 3:Y=w[A+1],q=w[A+2],(Y&192)===128&&(q&192)===128&&(V=(I&15)<<12|(Y&63)<<6|q&63,V>2047&&(V<55296||V>57343)&&(O=V));break;case 4:Y=w[A+1],q=w[A+2],X=w[A+3],(Y&192)===128&&(q&192)===128&&(X&192)===128&&(V=(I&15)<<18|(Y&63)<<12|(q&63)<<6|X&63,V>65535&&V<1114112&&(O=V))}}O===null?(O=65533,$=1):O>65535&&(O-=65536,x.push(O>>>10&1023|55296),O=56320|O&1023),x.push(O),A+=$}return ke(x)}const K=4096;function ke(w){const f=w.length;if(f<=K)return String.fromCharCode.apply(String,w);let d="",x=0;for(;x<f;)d+=String.fromCharCode.apply(String,w.slice(x,x+=K));return d}function Ze(w,f,d){let x="";d=Math.min(w.length,d);for(let A=f;A<d;++A)x+=String.fromCharCode(w[A]&127);return x}function re(w,f,d){let x="";d=Math.min(w.length,d);for(let A=f;A<d;++A)x+=String.fromCharCode(w[A]);return x}function ce(w,f,d){const x=w.length;(!f||f<0)&&(f=0),(!d||d<0||d>x)&&(d=x);let A="";for(let I=f;I<d;++I)A+=Xg[w[I]];return A}function Qe(w,f,d){const x=w.slice(f,d);let A="";for(let I=0;I<x.length-1;I+=2)A+=String.fromCharCode(x[I]+x[I+1]*256);return A}a.prototype.slice=function(f,d){const x=this.length;f=~~f,d=d===void 0?x:~~d,f<0?(f+=x,f<0&&(f=0)):f>x&&(f=x),d<0?(d+=x,d<0&&(d=0)):d>x&&(d=x),d<f&&(d=f);const A=this.subarray(f,d);return Object.setPrototypeOf(A,a.prototype),A};function D(w,f,d){if(w%1!==0||w<0)throw new RangeError("offset is not uint");if(w+f>d)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(f,d,x){f=f>>>0,d=d>>>0,x||D(f,d,this.length);let A=this[f],I=1,O=0;for(;++O<d&&(I*=256);)A+=this[f+O]*I;return A},a.prototype.readUintBE=a.prototype.readUIntBE=function(f,d,x){f=f>>>0,d=d>>>0,x||D(f,d,this.length);let A=this[f+--d],I=1;for(;d>0&&(I*=256);)A+=this[f+--d]*I;return A},a.prototype.readUint8=a.prototype.readUInt8=function(f,d){return f=f>>>0,d||D(f,1,this.length),this[f]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(f,d){return f=f>>>0,d||D(f,2,this.length),this[f]|this[f+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(f,d){return f=f>>>0,d||D(f,2,this.length),this[f]<<8|this[f+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(f,d){return f=f>>>0,d||D(f,4,this.length),(this[f]|this[f+1]<<8|this[f+2]<<16)+this[f+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(f,d){return f=f>>>0,d||D(f,4,this.length),this[f]*16777216+(this[f+1]<<16|this[f+2]<<8|this[f+3])},a.prototype.readBigUInt64LE=et(function(f){f=f>>>0,It(f,"offset");const d=this[f],x=this[f+7];(d===void 0||x===void 0)&&Xt(f,this.length-8);const A=d+this[++f]*2**8+this[++f]*2**16+this[++f]*2**24,I=this[++f]+this[++f]*2**8+this[++f]*2**16+x*2**24;return BigInt(A)+(BigInt(I)<<BigInt(32))}),a.prototype.readBigUInt64BE=et(function(f){f=f>>>0,It(f,"offset");const d=this[f],x=this[f+7];(d===void 0||x===void 0)&&Xt(f,this.length-8);const A=d*2**24+this[++f]*2**16+this[++f]*2**8+this[++f],I=this[++f]*2**24+this[++f]*2**16+this[++f]*2**8+x;return(BigInt(A)<<BigInt(32))+BigInt(I)}),a.prototype.readIntLE=function(f,d,x){f=f>>>0,d=d>>>0,x||D(f,d,this.length);let A=this[f],I=1,O=0;for(;++O<d&&(I*=256);)A+=this[f+O]*I;return I*=128,A>=I&&(A-=Math.pow(2,8*d)),A},a.prototype.readIntBE=function(f,d,x){f=f>>>0,d=d>>>0,x||D(f,d,this.length);let A=d,I=1,O=this[f+--A];for(;A>0&&(I*=256);)O+=this[f+--A]*I;return I*=128,O>=I&&(O-=Math.pow(2,8*d)),O},a.prototype.readInt8=function(f,d){return f=f>>>0,d||D(f,1,this.length),this[f]&128?(255-this[f]+1)*-1:this[f]},a.prototype.readInt16LE=function(f,d){f=f>>>0,d||D(f,2,this.length);const x=this[f]|this[f+1]<<8;return x&32768?x|4294901760:x},a.prototype.readInt16BE=function(f,d){f=f>>>0,d||D(f,2,this.length);const x=this[f+1]|this[f]<<8;return x&32768?x|4294901760:x},a.prototype.readInt32LE=function(f,d){return f=f>>>0,d||D(f,4,this.length),this[f]|this[f+1]<<8|this[f+2]<<16|this[f+3]<<24},a.prototype.readInt32BE=function(f,d){return f=f>>>0,d||D(f,4,this.length),this[f]<<24|this[f+1]<<16|this[f+2]<<8|this[f+3]},a.prototype.readBigInt64LE=et(function(f){f=f>>>0,It(f,"offset");const d=this[f],x=this[f+7];(d===void 0||x===void 0)&&Xt(f,this.length-8);const A=this[f+4]+this[f+5]*2**8+this[f+6]*2**16+(x<<24);return(BigInt(A)<<BigInt(32))+BigInt(d+this[++f]*2**8+this[++f]*2**16+this[++f]*2**24)}),a.prototype.readBigInt64BE=et(function(f){f=f>>>0,It(f,"offset");const d=this[f],x=this[f+7];(d===void 0||x===void 0)&&Xt(f,this.length-8);const A=(d<<24)+this[++f]*2**16+this[++f]*2**8+this[++f];return(BigInt(A)<<BigInt(32))+BigInt(this[++f]*2**24+this[++f]*2**16+this[++f]*2**8+x)}),a.prototype.readFloatLE=function(f,d){return f=f>>>0,d||D(f,4,this.length),r.read(this,f,!0,23,4)},a.prototype.readFloatBE=function(f,d){return f=f>>>0,d||D(f,4,this.length),r.read(this,f,!1,23,4)},a.prototype.readDoubleLE=function(f,d){return f=f>>>0,d||D(f,8,this.length),r.read(this,f,!0,52,8)},a.prototype.readDoubleBE=function(f,d){return f=f>>>0,d||D(f,8,this.length),r.read(this,f,!1,52,8)};function z(w,f,d,x,A,I){if(!a.isBuffer(w))throw new TypeError('"buffer" argument must be a Buffer instance');if(f>A||f<I)throw new RangeError('"value" argument is out of bounds');if(d+x>w.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(f,d,x,A){if(f=+f,d=d>>>0,x=x>>>0,!A){const $=Math.pow(2,8*x)-1;z(this,f,d,x,$,0)}let I=1,O=0;for(this[d]=f&255;++O<x&&(I*=256);)this[d+O]=f/I&255;return d+x},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(f,d,x,A){if(f=+f,d=d>>>0,x=x>>>0,!A){const $=Math.pow(2,8*x)-1;z(this,f,d,x,$,0)}let I=x-1,O=1;for(this[d+I]=f&255;--I>=0&&(O*=256);)this[d+I]=f/O&255;return d+x},a.prototype.writeUint8=a.prototype.writeUInt8=function(f,d,x){return f=+f,d=d>>>0,x||z(this,f,d,1,255,0),this[d]=f&255,d+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(f,d,x){return f=+f,d=d>>>0,x||z(this,f,d,2,65535,0),this[d]=f&255,this[d+1]=f>>>8,d+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(f,d,x){return f=+f,d=d>>>0,x||z(this,f,d,2,65535,0),this[d]=f>>>8,this[d+1]=f&255,d+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(f,d,x){return f=+f,d=d>>>0,x||z(this,f,d,4,4294967295,0),this[d+3]=f>>>24,this[d+2]=f>>>16,this[d+1]=f>>>8,this[d]=f&255,d+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(f,d,x){return f=+f,d=d>>>0,x||z(this,f,d,4,4294967295,0),this[d]=f>>>24,this[d+1]=f>>>16,this[d+2]=f>>>8,this[d+3]=f&255,d+4};function Lr(w,f,d,x,A){Jo(f,x,A,w,d,7);let I=Number(f&BigInt(4294967295));w[d++]=I,I=I>>8,w[d++]=I,I=I>>8,w[d++]=I,I=I>>8,w[d++]=I;let O=Number(f>>BigInt(32)&BigInt(4294967295));return w[d++]=O,O=O>>8,w[d++]=O,O=O>>8,w[d++]=O,O=O>>8,w[d++]=O,d}function zo(w,f,d,x,A){Jo(f,x,A,w,d,7);let I=Number(f&BigInt(4294967295));w[d+7]=I,I=I>>8,w[d+6]=I,I=I>>8,w[d+5]=I,I=I>>8,w[d+4]=I;let O=Number(f>>BigInt(32)&BigInt(4294967295));return w[d+3]=O,O=O>>8,w[d+2]=O,O=O>>8,w[d+1]=O,O=O>>8,w[d]=O,d+8}a.prototype.writeBigUInt64LE=et(function(f,d=0){return Lr(this,f,d,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=et(function(f,d=0){return zo(this,f,d,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(f,d,x,A){if(f=+f,d=d>>>0,!A){const Y=Math.pow(2,8*x-1);z(this,f,d,x,Y-1,-Y)}let I=0,O=1,$=0;for(this[d]=f&255;++I<x&&(O*=256);)f<0&&$===0&&this[d+I-1]!==0&&($=1),this[d+I]=(f/O>>0)-$&255;return d+x},a.prototype.writeIntBE=function(f,d,x,A){if(f=+f,d=d>>>0,!A){const Y=Math.pow(2,8*x-1);z(this,f,d,x,Y-1,-Y)}let I=x-1,O=1,$=0;for(this[d+I]=f&255;--I>=0&&(O*=256);)f<0&&$===0&&this[d+I+1]!==0&&($=1),this[d+I]=(f/O>>0)-$&255;return d+x},a.prototype.writeInt8=function(f,d,x){return f=+f,d=d>>>0,x||z(this,f,d,1,127,-128),f<0&&(f=255+f+1),this[d]=f&255,d+1},a.prototype.writeInt16LE=function(f,d,x){return f=+f,d=d>>>0,x||z(this,f,d,2,32767,-32768),this[d]=f&255,this[d+1]=f>>>8,d+2},a.prototype.writeInt16BE=function(f,d,x){return f=+f,d=d>>>0,x||z(this,f,d,2,32767,-32768),this[d]=f>>>8,this[d+1]=f&255,d+2},a.prototype.writeInt32LE=function(f,d,x){return f=+f,d=d>>>0,x||z(this,f,d,4,2147483647,-2147483648),this[d]=f&255,this[d+1]=f>>>8,this[d+2]=f>>>16,this[d+3]=f>>>24,d+4},a.prototype.writeInt32BE=function(f,d,x){return f=+f,d=d>>>0,x||z(this,f,d,4,2147483647,-2147483648),f<0&&(f=4294967295+f+1),this[d]=f>>>24,this[d+1]=f>>>16,this[d+2]=f>>>8,this[d+3]=f&255,d+4},a.prototype.writeBigInt64LE=et(function(f,d=0){return Lr(this,f,d,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=et(function(f,d=0){return zo(this,f,d,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function qo(w,f,d,x,A,I){if(d+x>w.length)throw new RangeError("Index out of range");if(d<0)throw new RangeError("Index out of range")}function Wo(w,f,d,x,A){return f=+f,d=d>>>0,A||qo(w,f,d,4),r.write(w,f,d,x,23,4),d+4}a.prototype.writeFloatLE=function(f,d,x){return Wo(this,f,d,!0,x)},a.prototype.writeFloatBE=function(f,d,x){return Wo(this,f,d,!1,x)};function Go(w,f,d,x,A){return f=+f,d=d>>>0,A||qo(w,f,d,8),r.write(w,f,d,x,52,8),d+8}a.prototype.writeDoubleLE=function(f,d,x){return Go(this,f,d,!0,x)},a.prototype.writeDoubleBE=function(f,d,x){return Go(this,f,d,!1,x)},a.prototype.copy=function(f,d,x,A){if(!a.isBuffer(f))throw new TypeError("argument should be a Buffer");if(x||(x=0),!A&&A!==0&&(A=this.length),d>=f.length&&(d=f.length),d||(d=0),A>0&&A<x&&(A=x),A===x||f.length===0||this.length===0)return 0;if(d<0)throw new RangeError("targetStart out of bounds");if(x<0||x>=this.length)throw new RangeError("Index out of range");if(A<0)throw new RangeError("sourceEnd out of bounds");A>this.length&&(A=this.length),f.length-d<A-x&&(A=f.length-d+x);const I=A-x;return this===f&&typeof s.prototype.copyWithin=="function"?this.copyWithin(d,x,A):s.prototype.set.call(f,this.subarray(x,A),d),I},a.prototype.fill=function(f,d,x,A){if(typeof f=="string"){if(typeof d=="string"?(A=d,d=0,x=this.length):typeof x=="string"&&(A=x,x=this.length),A!==void 0&&typeof A!="string")throw new TypeError("encoding must be a string");if(typeof A=="string"&&!a.isEncoding(A))throw new TypeError("Unknown encoding: "+A);if(f.length===1){const O=f.charCodeAt(0);(A==="utf8"&&O<128||A==="latin1")&&(f=O)}}else typeof f=="number"?f=f&255:typeof f=="boolean"&&(f=Number(f));if(d<0||this.length<d||this.length<x)throw new RangeError("Out of range index");if(x<=d)return this;d=d>>>0,x=x===void 0?this.length:x>>>0,f||(f=0);let I;if(typeof f=="number")for(I=d;I<x;++I)this[I]=f;else{const O=a.isBuffer(f)?f:a.from(f,A),$=O.length;if($===0)throw new TypeError('The value "'+f+'" is invalid for argument "value"');for(I=0;I<x-d;++I)this[I+d]=O[I%$]}return this};const Pt={};function Vn(w,f,d){Pt[w]=class extends d{constructor(){super(),Object.defineProperty(this,"message",{value:f.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${w}]`,this.stack,delete this.name}get code(){return w}set code(A){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:A,writable:!0})}toString(){return`${this.name} [${w}]: ${this.message}`}}}Vn("ERR_BUFFER_OUT_OF_BOUNDS",function(w){return w?`${w} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Vn("ERR_INVALID_ARG_TYPE",function(w,f){return`The "${w}" argument must be of type number. Received type ${typeof f}`},TypeError),Vn("ERR_OUT_OF_RANGE",function(w,f,d){let x=`The value of "${w}" is out of range.`,A=d;return Number.isInteger(d)&&Math.abs(d)>2**32?A=Ko(String(d)):typeof d=="bigint"&&(A=String(d),(d>BigInt(2)**BigInt(32)||d<-(BigInt(2)**BigInt(32)))&&(A=Ko(A)),A+="n"),x+=` It must be ${f}. Received ${A}`,x},RangeError);function Ko(w){let f="",d=w.length;const x=w[0]==="-"?1:0;for(;d>=x+4;d-=3)f=`_${w.slice(d-3,d)}${f}`;return`${w.slice(0,d)}${f}`}function Wg(w,f,d){It(f,"offset"),(w[f]===void 0||w[f+d]===void 0)&&Xt(f,w.length-(d+1))}function Jo(w,f,d,x,A,I){if(w>d||w<f){const O=typeof f=="bigint"?"n":"";let $;throw f===0||f===BigInt(0)?$=`>= 0${O} and < 2${O} ** ${(I+1)*8}${O}`:$=`>= -(2${O} ** ${(I+1)*8-1}${O}) and < 2 ** ${(I+1)*8-1}${O}`,new Pt.ERR_OUT_OF_RANGE("value",$,w)}Wg(x,A,I)}function It(w,f){if(typeof w!="number")throw new Pt.ERR_INVALID_ARG_TYPE(f,"number",w)}function Xt(w,f,d){throw Math.floor(w)!==w?(It(w,d),new Pt.ERR_OUT_OF_RANGE("offset","an integer",w)):f<0?new Pt.ERR_BUFFER_OUT_OF_BOUNDS:new Pt.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${f}`,w)}const Gg=/[^+/0-9A-Za-z-_]/g;function Kg(w){if(w=w.split("=")[0],w=w.trim().replace(Gg,""),w.length<2)return"";for(;w.length%4!==0;)w=w+"=";return w}function Dn(w,f){f=f||1/0;let d;const x=w.length;let A=null;const I=[];for(let O=0;O<x;++O){if(d=w.charCodeAt(O),d>55295&&d<57344){if(!A){if(d>56319){(f-=3)>-1&&I.push(239,191,189);continue}else if(O+1===x){(f-=3)>-1&&I.push(239,191,189);continue}A=d;continue}if(d<56320){(f-=3)>-1&&I.push(239,191,189),A=d;continue}d=(A-55296<<10|d-56320)+65536}else A&&(f-=3)>-1&&I.push(239,191,189);if(A=null,d<128){if((f-=1)<0)break;I.push(d)}else if(d<2048){if((f-=2)<0)break;I.push(d>>6|192,d&63|128)}else if(d<65536){if((f-=3)<0)break;I.push(d>>12|224,d>>6&63|128,d&63|128)}else if(d<1114112){if((f-=4)<0)break;I.push(d>>18|240,d>>12&63|128,d>>6&63|128,d&63|128)}else throw new Error("Invalid code point")}return I}function Jg(w){const f=[];for(let d=0;d<w.length;++d)f.push(w.charCodeAt(d)&255);return f}function Yg(w,f){let d,x,A;const I=[];for(let O=0;O<w.length&&!((f-=2)<0);++O)d=w.charCodeAt(O),x=d>>8,A=d%256,I.push(A),I.push(x);return I}function Yo(w){return e.toByteArray(Kg(w))}function _r(w,f,d,x){let A;for(A=0;A<x&&!(A+d>=f.length||A>=w.length);++A)f[A+d]=w[A];return A}function je(w,f){return w instanceof f||w!=null&&w.constructor!=null&&w.constructor.name!=null&&w.constructor.name===f.name}function Hn(w){return w!==w}const Xg=(function(){const w="0123456789abcdef",f=new Array(256);for(let d=0;d<16;++d){const x=d*16;for(let A=0;A<16;++A)f[x+A]=w[d]+w[A]}return f})();function et(w){return typeof BigInt>"u"?Zg:w}function Zg(){throw new Error("BigInt not supported")}})(ci);const hi=ci.Buffer;let B=class Xo extends Error{static from(e,r,n,i,s,o){const u=new Xo(e.message,r||e.code,n,i,s);return u.cause=e,u.name=e.name,e.status!=null&&u.status==null&&(u.status=e.status),o&&Object.assign(u,o),u}constructor(e,r,n,i,s){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),i&&(this.request=i),s&&(this.response=s,this.status=s.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:N.toJSONObject(this.config),code:this.code,status:this.status}}};B.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",B.ERR_BAD_OPTION="ERR_BAD_OPTION",B.ECONNABORTED="ECONNABORTED",B.ETIMEDOUT="ETIMEDOUT",B.ERR_NETWORK="ERR_NETWORK",B.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",B.ERR_DEPRECATED="ERR_DEPRECATED",B.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",B.ERR_BAD_REQUEST="ERR_BAD_REQUEST",B.ERR_CANCELED="ERR_CANCELED",B.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",B.ERR_INVALID_URL="ERR_INVALID_URL";var ou=null;function zr(t){return N.isPlainObject(t)||N.isArray(t)}function di(t){return N.endsWith(t,"[]")?t.slice(0,-2):t}function qr(t,e,r){return t?t.concat(e).map(function(i,s){return i=di(i),!r&&s?"["+i+"]":i}).join(r?".":""):e}function au(t){return N.isArray(t)&&!t.some(zr)}const uu=N.toFlatObject(N,{},null,function(e){return/^is[A-Z]/.test(e)});function sr(t,e,r){if(!N.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=N.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,b){return!N.isUndefined(b[m])});const n=r.metaTokens,i=r.visitor||a,s=r.dots,o=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&N.isSpecCompliantForm(e);if(!N.isFunction(i))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(N.isDate(g))return g.toISOString();if(N.isBoolean(g))return g.toString();if(!l&&N.isBlob(g))throw new B("Blob is not supported. Use a Buffer instead.");return N.isArrayBuffer(g)||N.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):hi.from(g):g}function a(g,m,b){let v=g;if(N.isReactNative(e)&&N.isReactNativeBlob(g))return e.append(qr(b,m,s),c(g)),!1;if(g&&!b&&typeof g=="object"){if(N.endsWith(m,"{}"))m=n?m:m.slice(0,-2),g=JSON.stringify(g);else if(N.isArray(g)&&au(g)||(N.isFileList(g)||N.endsWith(m,"[]"))&&(v=N.toArray(g)))return m=di(m),v.forEach(function(T,P){!(N.isUndefined(T)||T===null)&&e.append(o===!0?qr([m],P,s):o===null?m:m+"[]",c(T))}),!1}return zr(g)?!0:(e.append(qr(b,m,s),c(g)),!1)}const h=[],p=Object.assign(uu,{defaultVisitor:a,convertValue:c,isVisitable:zr});function y(g,m){if(!N.isUndefined(g)){if(h.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(g),N.forEach(g,function(v,E){(!(N.isUndefined(v)||v===null)&&i.call(e,v,N.isString(E)?E.trim():E,m,p))===!0&&y(v,m?m.concat(E):[E])}),h.pop()}}if(!N.isObject(t))throw new TypeError("data must be an object");return y(t),e}function pi(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Wr(t,e){this._pairs=[],t&&sr(t,this,e)}const gi=Wr.prototype;gi.append=function(e,r){this._pairs.push([e,r])},gi.toString=function(e){const r=e?function(n){return e.call(this,n,pi)}:pi;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function lu(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function mi(t,e,r){if(!e)return t;const n=r&&r.encode||lu,i=N.isFunction(r)?{serialize:r}:r,s=i&&i.serialize;let o;if(s?o=s(e,i):o=N.isURLSearchParams(e)?e.toString():new Wr(e,i).toString(n),o){const u=t.indexOf("#");u!==-1&&(t=t.slice(0,u)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class yi{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){N.forEach(this.handlers,function(n){n!==null&&e(n)})}}var Gr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},cu=typeof URLSearchParams<"u"?URLSearchParams:Wr,fu=typeof FormData<"u"?FormData:null,hu=typeof Blob<"u"?Blob:null,du={isBrowser:!0,classes:{URLSearchParams:cu,FormData:fu,Blob:hu},protocols:["http","https","file","blob","url","data"]};const Kr=typeof window<"u"&&typeof document<"u",Jr=typeof navigator=="object"&&navigator||void 0,pu=Kr&&(!Jr||["ReactNative","NativeScript","NS"].indexOf(Jr.product)<0),gu=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",mu=Kr&&window.location.href||"http://localhost";var yu=Object.freeze({__proto__:null,hasBrowserEnv:Kr,hasStandardBrowserEnv:pu,hasStandardBrowserWebWorkerEnv:gu,navigator:Jr,origin:mu}),fe={...yu,...du};function bu(t,e){return sr(t,new fe.classes.URLSearchParams,{visitor:function(r,n,i,s){return fe.isNode&&N.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...e})}function wu(t){return N.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function xu(t){const e={},r=Object.keys(t);let n;const i=r.length;let s;for(n=0;n<i;n++)s=r[n],e[s]=t[s];return e}function bi(t){function e(r,n,i,s){let o=r[s++];if(o==="__proto__")return!0;const u=Number.isFinite(+o),l=s>=r.length;return o=!o&&N.isArray(i)?i.length:o,l?(N.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!u):((!i[o]||!N.isObject(i[o]))&&(i[o]=[]),e(r,n,i[o],s)&&N.isArray(i[o])&&(i[o]=xu(i[o])),!u)}if(N.isFormData(t)&&N.isFunction(t.entries)){const r={};return N.forEachEntry(t,(n,i)=>{e(wu(n),i,r,0)}),r}return null}function Eu(t,e,r){if(N.isString(t))try{return(e||JSON.parse)(t),N.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const Rt={transitional:Gr,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,s=N.isObject(e);if(s&&N.isHTMLForm(e)&&(e=new FormData(e)),N.isFormData(e))return i?JSON.stringify(bi(e)):e;if(N.isArrayBuffer(e)||N.isBuffer(e)||N.isStream(e)||N.isFile(e)||N.isBlob(e)||N.isReadableStream(e))return e;if(N.isArrayBufferView(e))return e.buffer;if(N.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let u;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return bu(e,this.formSerializer).toString();if((u=N.isFileList(e))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return sr(u?{"files[]":e}:e,l&&new l,this.formSerializer)}}return s||i?(r.setContentType("application/json",!1),Eu(e)):e}],transformResponse:[function(e){const r=this.transitional||Rt.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(N.isResponse(e)||N.isReadableStream(e))return e;if(e&&N.isString(e)&&(n&&!this.responseType||i)){const o=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(e,this.parseReviver)}catch(u){if(o)throw u.name==="SyntaxError"?B.from(u,B.ERR_BAD_RESPONSE,this,null,this.response):u}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:fe.classes.FormData,Blob:fe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};N.forEach(["delete","get","head","post","put","patch"],t=>{Rt.headers[t]={}});const vu=N.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var Tu=t=>{const e={};let r,n,i;return t&&t.split(`
|
|
2
|
+
`).forEach(function(o){i=o.indexOf(":"),r=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!r||e[r]&&vu[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e};const wi=Symbol("internals");function Ft(t){return t&&String(t).trim().toLowerCase()}function or(t){return t===!1||t==null?t:N.isArray(t)?t.map(or):String(t)}function Au(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const Nu=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Yr(t,e,r,n,i){if(N.isFunction(n))return n.call(this,e,r);if(i&&(e=r),!!N.isString(e)){if(N.isString(n))return e.indexOf(n)!==-1;if(N.isRegExp(n))return n.test(e)}}function Pu(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function Iu(t,e){const r=N.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(i,s,o){return this[n].call(this,e,i,s,o)},configurable:!0})})}let Ee=class{constructor(e){e&&this.set(e)}set(e,r,n){const i=this;function s(u,l,c){const a=Ft(l);if(!a)throw new Error("header name must be a non-empty string");const h=N.findKey(i,a);(!h||i[h]===void 0||c===!0||c===void 0&&i[h]!==!1)&&(i[h||l]=or(u))}const o=(u,l)=>N.forEach(u,(c,a)=>s(c,a,l));if(N.isPlainObject(e)||e instanceof this.constructor)o(e,r);else if(N.isString(e)&&(e=e.trim())&&!Nu(e))o(Tu(e),r);else if(N.isObject(e)&&N.isIterable(e)){let u={},l,c;for(const a of e){if(!N.isArray(a))throw TypeError("Object iterator must return a key-value pair");u[c=a[0]]=(l=u[c])?N.isArray(l)?[...l,a[1]]:[l,a[1]]:a[1]}o(u,r)}else e!=null&&s(r,e,n);return this}get(e,r){if(e=Ft(e),e){const n=N.findKey(this,e);if(n){const i=this[n];if(!r)return i;if(r===!0)return Au(i);if(N.isFunction(r))return r.call(this,i,n);if(N.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Ft(e),e){const n=N.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||Yr(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let i=!1;function s(o){if(o=Ft(o),o){const u=N.findKey(n,o);u&&(!r||Yr(n,n[u],u,r))&&(delete n[u],i=!0)}}return N.isArray(e)?e.forEach(s):s(e),i}clear(e){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const s=r[n];(!e||Yr(this,this[s],s,e,!0))&&(delete this[s],i=!0)}return i}normalize(e){const r=this,n={};return N.forEach(this,(i,s)=>{const o=N.findKey(n,s);if(o){r[o]=or(i),delete r[s];return}const u=e?Pu(s):String(s).trim();u!==s&&delete r[s],r[u]=or(i),n[u]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return N.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=e&&N.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
|
|
3
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(i=>n.set(i)),n}static accessor(e){const n=(this[wi]=this[wi]={accessors:{}}).accessors,i=this.prototype;function s(o){const u=Ft(o);n[u]||(Iu(i,o),n[u]=!0)}return N.isArray(e)?e.forEach(s):s(e),this}};Ee.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),N.reduceDescriptors(Ee.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}}),N.freezeMethods(Ee);function Xr(t,e){const r=this||Rt,n=e||r,i=Ee.from(n.headers);let s=n.data;return N.forEach(t,function(u){s=u.call(r,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function xi(t){return!!(t&&t.__CANCEL__)}let Lt=class extends B{constructor(e,r,n){super(e??"canceled",B.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}};function Ei(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new B("Request failed with status code "+r.status,[B.ERR_BAD_REQUEST,B.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Su(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Ou(t,e){t=t||10;const r=new Array(t),n=new Array(t);let i=0,s=0,o;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),a=n[s];o||(o=c),r[i]=l,n[i]=c;let h=s,p=0;for(;h!==i;)p+=r[h++],h=h%t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),c-o<e)return;const y=a&&c-a;return y?Math.round(p*1e3/y):void 0}}function Cu(t,e){let r=0,n=1e3/e,i,s;const o=(c,a=Date.now())=>{r=a,i=null,s&&(clearTimeout(s),s=null),t(...c)};return[(...c)=>{const a=Date.now(),h=a-r;h>=n?o(c,a):(i=c,s||(s=setTimeout(()=>{s=null,o(i)},n-h)))},()=>i&&o(i)]}const ar=(t,e,r=3)=>{let n=0;const i=Ou(50,250);return Cu(s=>{const o=s.loaded,u=s.lengthComputable?s.total:void 0,l=o-n,c=i(l),a=o<=u;n=o;const h={loaded:o,total:u,progress:u?o/u:void 0,bytes:l,rate:c||void 0,estimated:c&&u&&a?(u-o)/c:void 0,event:s,lengthComputable:u!=null,[e?"download":"upload"]:!0};t(h)},r)},vi=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},Ti=t=>(...e)=>N.asap(()=>t(...e));var Ru=fe.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,fe.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(fe.origin),fe.navigator&&/(msie|trident)/i.test(fe.navigator.userAgent)):()=>!0,Fu=fe.hasStandardBrowserEnv?{write(t,e,r,n,i,s,o){if(typeof document>"u")return;const u=[`${t}=${encodeURIComponent(e)}`];N.isNumber(r)&&u.push(`expires=${new Date(r).toUTCString()}`),N.isString(n)&&u.push(`path=${n}`),N.isString(i)&&u.push(`domain=${i}`),s===!0&&u.push("secure"),N.isString(o)&&u.push(`SameSite=${o}`),document.cookie=u.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Lu(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function _u(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Ai(t,e,r){let n=!Lu(e);return t&&(n||r==!1)?_u(t,e):e}const Ni=t=>t instanceof Ee?{...t}:t;function nt(t,e){e=e||{};const r={};function n(c,a,h,p){return N.isPlainObject(c)&&N.isPlainObject(a)?N.merge.call({caseless:p},c,a):N.isPlainObject(a)?N.merge({},a):N.isArray(a)?a.slice():a}function i(c,a,h,p){if(N.isUndefined(a)){if(!N.isUndefined(c))return n(void 0,c,h,p)}else return n(c,a,h,p)}function s(c,a){if(!N.isUndefined(a))return n(void 0,a)}function o(c,a){if(N.isUndefined(a)){if(!N.isUndefined(c))return n(void 0,c)}else return n(void 0,a)}function u(c,a,h){if(h in e)return n(c,a);if(h in t)return n(void 0,c)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:u,headers:(c,a,h)=>i(Ni(c),Ni(a),h,!0)};return N.forEach(Object.keys({...t,...e}),function(a){if(a==="__proto__"||a==="constructor"||a==="prototype")return;const h=N.hasOwnProp(l,a)?l[a]:i,p=h(t[a],e[a],a);N.isUndefined(p)&&h!==u||(r[a]=p)}),r}var Pi=t=>{const e=nt({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:u}=e;if(e.headers=o=Ee.from(o),e.url=mi(Ai(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),u&&o.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),N.isFormData(r)){if(fe.hasStandardBrowserEnv||fe.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(N.isFunction(r.getHeaders)){const l=r.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([a,h])=>{c.includes(a.toLowerCase())&&o.set(a,h)})}}if(fe.hasStandardBrowserEnv&&(n&&N.isFunction(n)&&(n=n(e)),n||n!==!1&&Ru(e.url))){const l=i&&s&&Fu.read(s);l&&o.set(i,l)}return e},Uu=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(r,n){const i=Pi(t);let s=i.data;const o=Ee.from(i.headers).normalize();let{responseType:u,onUploadProgress:l,onDownloadProgress:c}=i,a,h,p,y,g;function m(){y&&y(),g&&g(),i.cancelToken&&i.cancelToken.unsubscribe(a),i.signal&&i.signal.removeEventListener("abort",a)}let b=new XMLHttpRequest;b.open(i.method.toUpperCase(),i.url,!0),b.timeout=i.timeout;function v(){if(!b)return;const T=Ee.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),S={data:!u||u==="text"||u==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:T,config:t,request:b};Ei(function(L){r(L),m()},function(L){n(L),m()},S),b=null}"onloadend"in b?b.onloadend=v:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(v)},b.onabort=function(){b&&(n(new B("Request aborted",B.ECONNABORTED,t,b)),b=null)},b.onerror=function(P){const S=P&&P.message?P.message:"Network Error",F=new B(S,B.ERR_NETWORK,t,b);F.event=P||null,n(F),b=null},b.ontimeout=function(){let P=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const S=i.transitional||Gr;i.timeoutErrorMessage&&(P=i.timeoutErrorMessage),n(new B(P,S.clarifyTimeoutError?B.ETIMEDOUT:B.ECONNABORTED,t,b)),b=null},s===void 0&&o.setContentType(null),"setRequestHeader"in b&&N.forEach(o.toJSON(),function(P,S){b.setRequestHeader(S,P)}),N.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),u&&u!=="json"&&(b.responseType=i.responseType),c&&([p,g]=ar(c,!0),b.addEventListener("progress",p)),l&&b.upload&&([h,y]=ar(l),b.upload.addEventListener("progress",h),b.upload.addEventListener("loadend",y)),(i.cancelToken||i.signal)&&(a=T=>{b&&(n(!T||T.type?new Lt(null,t,b):T),b.abort(),b=null)},i.cancelToken&&i.cancelToken.subscribe(a),i.signal&&(i.signal.aborted?a():i.signal.addEventListener("abort",a)));const E=Su(i.url);if(E&&fe.protocols.indexOf(E)===-1){n(new B("Unsupported protocol "+E+":",B.ERR_BAD_REQUEST,t));return}b.send(s||null)})};const Bu=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,i;const s=function(c){if(!i){i=!0,u();const a=c instanceof Error?c:this.reason;n.abort(a instanceof B?a:new Lt(a instanceof Error?a.message:a))}};let o=e&&setTimeout(()=>{o=null,s(new B(`timeout of ${e}ms exceeded`,B.ETIMEDOUT))},e);const u=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),t=null)};t.forEach(c=>c.addEventListener("abort",s));const{signal:l}=n;return l.unsubscribe=()=>N.asap(u),l}},$u=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let n=0,i;for(;n<r;)i=n+e,yield t.slice(n,i),n=i},ku=async function*(t,e){for await(const r of ju(t))yield*$u(r,e)},ju=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},Ii=(t,e,r,n)=>{const i=ku(t,e);let s=0,o,u=l=>{o||(o=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:c,value:a}=await i.next();if(c){u(),l.close();return}let h=a.byteLength;if(r){let p=s+=h;r(p)}l.enqueue(new Uint8Array(a))}catch(c){throw u(c),c}},cancel(l){return u(l),i.return()}},{highWaterMark:2})},Si=64*1024,{isFunction:ur}=N,Mu=(({Request:t,Response:e})=>({Request:t,Response:e}))(N.global),{ReadableStream:Oi,TextEncoder:Ci}=N.global,Ri=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Vu=t=>{t=N.merge.call({skipUndefined:!0},Mu,t);const{fetch:e,Request:r,Response:n}=t,i=e?ur(e):typeof fetch=="function",s=ur(r),o=ur(n);if(!i)return!1;const u=i&&ur(Oi),l=i&&(typeof Ci=="function"?(g=>m=>g.encode(m))(new Ci):async g=>new Uint8Array(await new r(g).arrayBuffer())),c=s&&u&&Ri(()=>{let g=!1;const m=new r(fe.origin,{body:new Oi,method:"POST",get duplex(){return g=!0,"half"}}).headers.has("Content-Type");return g&&!m}),a=o&&u&&Ri(()=>N.isReadableStream(new n("").body)),h={stream:a&&(g=>g.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!h[g]&&(h[g]=(m,b)=>{let v=m&&m[g];if(v)return v.call(m);throw new B(`Response type '${g}' is not supported`,B.ERR_NOT_SUPPORT,b)})});const p=async g=>{if(g==null)return 0;if(N.isBlob(g))return g.size;if(N.isSpecCompliantForm(g))return(await new r(fe.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(N.isArrayBufferView(g)||N.isArrayBuffer(g))return g.byteLength;if(N.isURLSearchParams(g)&&(g=g+""),N.isString(g))return(await l(g)).byteLength},y=async(g,m)=>{const b=N.toFiniteNumber(g.getContentLength());return b??p(m)};return async g=>{let{url:m,method:b,data:v,signal:E,cancelToken:T,timeout:P,onDownloadProgress:S,onUploadProgress:F,responseType:L,headers:U,withCredentials:_="same-origin",fetchOptions:j}=Pi(g),pe=e||fetch;L=L?(L+"").toLowerCase():"text";let oe=Bu([E,T&&T.toAbortSignal()],P),R=null;const le=oe&&oe.unsubscribe&&(()=>{oe.unsubscribe()});let Pe;try{if(F&&c&&b!=="get"&&b!=="head"&&(Pe=await y(U,v))!==0){let re=new r(m,{method:"POST",body:v,duplex:"half"}),ce;if(N.isFormData(v)&&(ce=re.headers.get("content-type"))&&U.setContentType(ce),re.body){const[Qe,D]=vi(Pe,ar(Ti(F)));v=Ii(re.body,Si,Qe,D)}}N.isString(_)||(_=_?"include":"omit");const J=s&&"credentials"in r.prototype,ae={...j,signal:oe,method:b.toUpperCase(),headers:U.normalize().toJSON(),body:v,duplex:"half",credentials:J?_:void 0};R=s&&new r(m,ae);let K=await(s?pe(R,j):pe(m,ae));const ke=a&&(L==="stream"||L==="response");if(a&&(S||ke&&le)){const re={};["status","statusText","headers"].forEach(z=>{re[z]=K[z]});const ce=N.toFiniteNumber(K.headers.get("content-length")),[Qe,D]=S&&vi(ce,ar(Ti(S),!0))||[];K=new n(Ii(K.body,Si,Qe,()=>{D&&D(),le&&le()}),re)}L=L||"text";let Ze=await h[N.findKey(h,L)||"text"](K,g);return!ke&&le&&le(),await new Promise((re,ce)=>{Ei(re,ce,{data:Ze,headers:Ee.from(K.headers),status:K.status,statusText:K.statusText,config:g,request:R})})}catch(J){throw le&&le(),J&&J.name==="TypeError"&&/Load failed|fetch/i.test(J.message)?Object.assign(new B("Network Error",B.ERR_NETWORK,g,R,J&&J.response),{cause:J.cause||J}):B.from(J,J&&J.code,g,R,J&&J.response)}}},Du=new Map,Fi=t=>{let e=t&&t.env||{};const{fetch:r,Request:n,Response:i}=e,s=[n,i,r];let o=s.length,u=o,l,c,a=Du;for(;u--;)l=s[u],c=a.get(l),c===void 0&&a.set(l,c=u?new Map:Vu(e)),a=c;return c};Fi();const Zr={http:ou,xhr:Uu,fetch:{get:Fi}};N.forEach(Zr,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Li=t=>`- ${t}`,Hu=t=>N.isFunction(t)||t===null||t===!1;function zu(t,e){t=N.isArray(t)?t:[t];const{length:r}=t;let n,i;const s={};for(let o=0;o<r;o++){n=t[o];let u;if(i=n,!Hu(n)&&(i=Zr[(u=String(n)).toLowerCase()],i===void 0))throw new B(`Unknown adapter '${u}'`);if(i&&(N.isFunction(i)||(i=i.get(e))))break;s[u||"#"+o]=i}if(!i){const o=Object.entries(s).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let u=r?o.length>1?`since :
|
|
4
|
+
`+o.map(Li).join(`
|
|
5
|
+
`):" "+Li(o[0]):"as no adapter specified";throw new B("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return i}var _i={getAdapter:zu,adapters:Zr};function Qr(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Lt(null,t)}function Ui(t){return Qr(t),t.headers=Ee.from(t.headers),t.data=Xr.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),_i.getAdapter(t.adapter||Rt.adapter,t)(t).then(function(n){return Qr(t),n.data=Xr.call(t,t.transformResponse,n),n.headers=Ee.from(n.headers),n},function(n){return xi(n)||(Qr(t),n&&n.response&&(n.response.data=Xr.call(t,t.transformResponse,n.response),n.response.headers=Ee.from(n.response.headers))),Promise.reject(n)})}const Bi="1.13.6",lr={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{lr[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const $i={};lr.transitional=function(e,r,n){function i(s,o){return"[Axios v"+Bi+"] Transitional option '"+s+"'"+o+(n?". "+n:"")}return(s,o,u)=>{if(e===!1)throw new B(i(o," has been removed"+(r?" in "+r:"")),B.ERR_DEPRECATED);return r&&!$i[o]&&($i[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(s,o,u):!0}},lr.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function qu(t,e,r){if(typeof t!="object")throw new B("options must be an object",B.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let i=n.length;for(;i-- >0;){const s=n[i],o=e[s];if(o){const u=t[s],l=u===void 0||o(u,s,t);if(l!==!0)throw new B("option "+s+" must be "+l,B.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new B("Unknown option "+s,B.ERR_BAD_OPTION)}}var cr={assertOptions:qu,validators:lr};const Se=cr.validators;let it=class{constructor(e){this.defaults=e||{},this.interceptors={request:new yi,response:new yi}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
6
|
+
`+s):n.stack=s}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=nt(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:s}=r;n!==void 0&&cr.assertOptions(n,{silentJSONParsing:Se.transitional(Se.boolean),forcedJSONParsing:Se.transitional(Se.boolean),clarifyTimeoutError:Se.transitional(Se.boolean),legacyInterceptorReqResOrdering:Se.transitional(Se.boolean)},!1),i!=null&&(N.isFunction(i)?r.paramsSerializer={serialize:i}:cr.assertOptions(i,{encode:Se.function,serialize:Se.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),cr.assertOptions(r,{baseUrl:Se.spelling("baseURL"),withXsrfToken:Se.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=s&&N.merge(s.common,s[r.method]);s&&N.forEach(["delete","get","head","post","put","patch","common"],g=>{delete s[g]}),r.headers=Ee.concat(o,s);const u=[];let l=!0;this.interceptors.request.forEach(function(m){if(typeof m.runWhen=="function"&&m.runWhen(r)===!1)return;l=l&&m.synchronous;const b=r.transitional||Gr;b&&b.legacyInterceptorReqResOrdering?u.unshift(m.fulfilled,m.rejected):u.push(m.fulfilled,m.rejected)});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let a,h=0,p;if(!l){const g=[Ui.bind(this),void 0];for(g.unshift(...u),g.push(...c),p=g.length,a=Promise.resolve(r);h<p;)a=a.then(g[h++],g[h++]);return a}p=u.length;let y=r;for(;h<p;){const g=u[h++],m=u[h++];try{y=g(y)}catch(b){m.call(this,b);break}}try{a=Ui.call(this,y)}catch(g){return Promise.reject(g)}for(h=0,p=c.length;h<p;)a=a.then(c[h++],c[h++]);return a}getUri(e){e=nt(this.defaults,e);const r=Ai(e.baseURL,e.url,e.allowAbsoluteUrls);return mi(r,e.params,e.paramsSerializer)}};N.forEach(["delete","get","head","options"],function(e){it.prototype[e]=function(r,n){return this.request(nt(n||{},{method:e,url:r,data:(n||{}).data}))}}),N.forEach(["post","put","patch"],function(e){function r(n){return function(s,o,u){return this.request(nt(u||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}it.prototype[e]=r(),it.prototype[e+"Form"]=r(!0)});let Wu=class Zo{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const n=this;this.promise.then(i=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](i);n._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(u=>{n.subscribe(u),s=u}).then(i);return o.cancel=function(){n.unsubscribe(s)},o},e(function(s,o,u){n.reason||(n.reason=new Lt(s,o,u),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new Zo(function(i){e=i}),cancel:e}}};function Gu(t){return function(r){return t.apply(null,r)}}function Ku(t){return N.isObject(t)&&t.isAxiosError===!0}const en={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(en).forEach(([t,e])=>{en[e]=t});function ki(t){const e=new it(t),r=Qn(it.prototype.request,e);return N.extend(r,it.prototype,e,{allOwnKeys:!0}),N.extend(r,e,null,{allOwnKeys:!0}),r.create=function(i){return ki(nt(t,i))},r}const Q=ki(Rt);Q.Axios=it,Q.CanceledError=Lt,Q.CancelToken=Wu,Q.isCancel=xi,Q.VERSION=Bi,Q.toFormData=sr,Q.AxiosError=B,Q.Cancel=Q.CanceledError,Q.all=function(e){return Promise.all(e)},Q.spread=Gu,Q.isAxiosError=Ku,Q.mergeConfig=nt,Q.AxiosHeaders=Ee,Q.formToJSON=t=>bi(N.isHTMLForm(t)?new FormData(t):t),Q.getAdapter=_i.getAdapter,Q.HttpStatusCode=en,Q.default=Q;const{Axios:t0,AxiosError:r0,CanceledError:n0,isCancel:i0,CancelToken:s0,VERSION:o0,all:a0,Cancel:u0,isAxiosError:l0,spread:c0,toFormData:f0,AxiosHeaders:h0,HttpStatusCode:d0,formToJSON:p0,getAdapter:g0,mergeConfig:m0}=Q,fr=t=>encodeURIComponent(t).split("%2F").join("/"),Ju=/^(\w+:\/\/[^/?]+)?(.*?)$/,Yu=t=>t.filter(e=>typeof e=="string"||typeof e=="number").map(e=>`${e}`).filter(e=>e),Xu=t=>{const e=t.join("/"),[,r="",n=""]=e.match(Ju)||[];return{prefix:r,pathname:{parts:n.split("/").filter(i=>i!==""),hasLeading:/^\/+/.test(n),hasTrailing:/\/+$/.test(n)}}},Zu=(t,e)=>{const{prefix:r,pathname:n}=t,{parts:i,hasLeading:s,hasTrailing:o}=n,{leadingSlash:u,trailingSlash:l}=e,c=u===!0||u==="keep"&&s,a=l===!0||l==="keep"&&o;let h=r;return i.length>0&&((h||c)&&(h+="/"),h+=i.join("/")),a&&(h+="/"),!h&&c&&(h+="/"),h},k=(...t)=>{const e=t[t.length-1];let r;e&&typeof e=="object"&&(r=e,t=t.slice(0,-1)),r={leadingSlash:!0,trailingSlash:!1,...r},t=Yu(t);const n=Xu(t);return Zu(n,r)};class ji extends Error{response;statusCode;constructor(e,r,n=null){super(e),this.response=r,this.statusCode=n}}class Qu extends ji{errorCode;constructor(e,r,n,i=null){super(e,n,i),this.errorCode=r}}function el(t,e=""){return`/public-files/${t}/${e}`.split("/").filter(Boolean).join("/")}function tl(t,e=""){return`/ocm/${t}/${e}`.split("/").filter(Boolean).join("/")}class Le{static Shared="S";static Shareable="R";static Mounted="M";static Deletable="D";static Renameable="N";static Moveable="V";static Updateable="NV";static FileUpdateable="W";static FolderCreateable="CK";static Deny="Z";static SecureView="X"}var De=(t=>(t.copy="COPY",t.delete="DELETE",t.lock="LOCK",t.mkcol="MKCOL",t.move="MOVE",t.propfind="PROPFIND",t.proppatch="PROPPATCH",t.put="PUT",t.report="REPORT",t.unlock="UNLOCK",t))(De||{});const hr=t=>({value:t,type:null}),rl=t=>hr(t),M=t=>hr(t),dr=t=>hr(t),nl=t=>hr(t),il={Permissions:M("permissions"),IsFavorite:dr("favorite"),FileId:M("fileid"),FileParent:M("file-parent"),Name:M("name"),OwnerId:M("owner-id"),OwnerDisplayName:M("owner-display-name"),PrivateLink:M("privatelink"),ContentLength:dr("getcontentlength"),ContentSize:dr("size"),LastModifiedDate:M("getlastmodified"),Tags:rl("tags"),Audio:{value:"audio",type:null},Location:{value:"location",type:null},Image:{value:"image",type:null},Photo:{value:"photo",type:null},ETag:M("getetag"),MimeType:M("getcontenttype"),ResourceType:nl("resourcetype"),LockDiscovery:{value:"lockdiscovery",type:null},LockOwner:M("owner"),LockTime:M("locktime"),ActiveLock:{value:"activelock",type:null},DownloadURL:M("downloadURL"),Highlights:M("highlights"),MetaPathForUser:M("meta-path-for-user"),RemoteItemId:M("remote-item-id"),HasPreview:dr("has-preview"),ShareId:M("shareid"),ShareRoot:M("shareroot"),ShareTypes:{value:"share-types",type:null},SharePermissions:M("share-permissions"),TrashbinOriginalFilename:M("trashbin-original-filename"),TrashbinOriginalLocation:M("trashbin-original-location"),TrashbinDeletedDate:M("trashbin-delete-datetime"),PublicLinkItemType:M("public-link-item-type"),PublicLinkPermission:M("public-link-permission"),PublicLinkExpiration:M("public-link-expiration"),PublicLinkShareDate:M("public-link-share-datetime"),PublicLinkShareOwner:M("public-link-share-owner")},C=Object.fromEntries(Object.entries(il).map(([t,e])=>[t,e.value]));class st{static Default=[C.Permissions,C.IsFavorite,C.FileId,C.FileParent,C.Name,C.LockDiscovery,C.ActiveLock,C.OwnerId,C.OwnerDisplayName,C.RemoteItemId,C.ShareRoot,C.ShareTypes,C.PrivateLink,C.ContentLength,C.ContentSize,C.LastModifiedDate,C.ETag,C.MimeType,C.ResourceType,C.Tags,C.Audio,C.Location,C.Image,C.Photo,C.HasPreview];static PublicLink=st.Default.concat([C.PublicLinkItemType,C.PublicLinkPermission,C.PublicLinkExpiration,C.PublicLinkShareDate,C.PublicLinkShareOwner]);static Trashbin=[C.ContentLength,C.ResourceType,C.TrashbinOriginalLocation,C.TrashbinOriginalFilename,C.TrashbinDeletedDate,C.Permissions,C.FileParent];static DavNamespace=[C.ContentLength,C.LastModifiedDate,C.ETag,C.MimeType,C.ResourceType,C.LockDiscovery,C.ActiveLock]}var sl=typeof Re=="object"&&Re&&Re.Object===Object&&Re,ol=typeof self=="object"&&self&&self.Object===Object&&self,tn=sl||ol||Function("return this")(),yt=tn.Symbol,Mi=Object.prototype,al=Mi.hasOwnProperty,ul=Mi.toString,_t=yt?yt.toStringTag:void 0;function ll(t){var e=al.call(t,_t),r=t[_t];try{t[_t]=void 0;var n=!0}catch{}var i=ul.call(t);return n&&(e?t[_t]=r:delete t[_t]),i}var cl=Object.prototype,fl=cl.toString;function hl(t){return fl.call(t)}var dl="[object Null]",pl="[object Undefined]",Vi=yt?yt.toStringTag:void 0;function Di(t){return t==null?t===void 0?pl:dl:Vi&&Vi in Object(t)?ll(t):hl(t)}function gl(t){return t!=null&&typeof t=="object"}var ml="[object Symbol]";function rn(t){return typeof t=="symbol"||gl(t)&&Di(t)==ml}function yl(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var nn=Array.isArray,Hi=yt?yt.prototype:void 0,zi=Hi?Hi.toString:void 0;function qi(t){if(typeof t=="string")return t;if(nn(t))return yl(t,qi)+"";if(rn(t))return zi?zi.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function Wi(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var bl="[object AsyncFunction]",wl="[object Function]",xl="[object GeneratorFunction]",El="[object Proxy]";function vl(t){if(!Wi(t))return!1;var e=Di(t);return e==wl||e==xl||e==bl||e==El}var sn=tn["__core-js_shared__"],Gi=(function(){var t=/[^.]+$/.exec(sn&&sn.keys&&sn.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function Tl(t){return!!Gi&&Gi in t}var Al=Function.prototype,Nl=Al.toString;function Pl(t){if(t!=null){try{return Nl.call(t)}catch{}try{return t+""}catch{}}return""}var Il=/[\\^$.*+?()[\]{}|]/g,Sl=/^\[object .+?Constructor\]$/,Ol=Function.prototype,Cl=Object.prototype,Rl=Ol.toString,Fl=Cl.hasOwnProperty,Ll=RegExp("^"+Rl.call(Fl).replace(Il,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _l(t){if(!Wi(t)||Tl(t))return!1;var e=vl(t)?Ll:Sl;return e.test(Pl(t))}function Ul(t,e){return t?.[e]}function Ki(t,e){var r=Ul(t,e);return _l(r)?r:void 0}function Bl(t,e){return t===e||t!==t&&e!==e}var $l=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,kl=/^\w*$/;function jl(t,e){if(nn(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||rn(t)?!0:kl.test(t)||!$l.test(t)||e!=null&&t in Object(e)}var Ut=Ki(Object,"create");function Ml(){this.__data__=Ut?Ut(null):{},this.size=0}function Vl(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Dl="__lodash_hash_undefined__",Hl=Object.prototype,zl=Hl.hasOwnProperty;function ql(t){var e=this.__data__;if(Ut){var r=e[t];return r===Dl?void 0:r}return zl.call(e,t)?e[t]:void 0}var Wl=Object.prototype,Gl=Wl.hasOwnProperty;function Kl(t){var e=this.__data__;return Ut?e[t]!==void 0:Gl.call(e,t)}var Jl="__lodash_hash_undefined__";function Yl(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ut&&e===void 0?Jl:e,this}function ot(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ot.prototype.clear=Ml,ot.prototype.delete=Vl,ot.prototype.get=ql,ot.prototype.has=Kl,ot.prototype.set=Yl;function Xl(){this.__data__=[],this.size=0}function pr(t,e){for(var r=t.length;r--;)if(Bl(t[r][0],e))return r;return-1}var Zl=Array.prototype,Ql=Zl.splice;function ec(t){var e=this.__data__,r=pr(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Ql.call(e,r,1),--this.size,!0}function tc(t){var e=this.__data__,r=pr(e,t);return r<0?void 0:e[r][1]}function rc(t){return pr(this.__data__,t)>-1}function nc(t,e){var r=this.__data__,n=pr(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function bt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}bt.prototype.clear=Xl,bt.prototype.delete=ec,bt.prototype.get=tc,bt.prototype.has=rc,bt.prototype.set=nc;var ic=Ki(tn,"Map");function sc(){this.size=0,this.__data__={hash:new ot,map:new(ic||bt),string:new ot}}function oc(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function gr(t,e){var r=t.__data__;return oc(e)?r[typeof e=="string"?"string":"hash"]:r.map}function ac(t){var e=gr(this,t).delete(t);return this.size-=e?1:0,e}function uc(t){return gr(this,t).get(t)}function lc(t){return gr(this,t).has(t)}function cc(t,e){var r=gr(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function at(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}at.prototype.clear=sc,at.prototype.delete=ac,at.prototype.get=uc,at.prototype.has=lc,at.prototype.set=cc;var fc="Expected a function";function on(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(fc);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var o=t.apply(this,n);return r.cache=s.set(i,o)||s,o};return r.cache=new(on.Cache||at),r}on.Cache=at;var hc=500;function dc(t){var e=on(t,function(n){return r.size===hc&&r.clear(),n}),r=e.cache;return e}var pc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,gc=/\\(\\)?/g,mc=dc(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(pc,function(r,n,i,s){e.push(i?s.replace(gc,"$1"):n||r)}),e});function Bt(t){return t==null?"":qi(t)}function yc(t,e){return nn(t)?t:jl(t,e)?[t]:mc(Bt(t))}function bc(t){if(typeof t=="string"||rn(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function wc(t,e){e=yc(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[bc(e[r++])];return r&&r==n?t:void 0}function xc(t,e,r){var n=t==null?void 0:wc(t,e);return n===void 0?r:n}function Ec(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var s=Array(i);++n<i;)s[n]=t[n+e];return s}function vc(t,e,r){var n=t.length;return r=r===void 0?n:r,!e&&r>=n?t:Ec(t,e,r)}var Tc="\\ud800-\\udfff",Ac="\\u0300-\\u036f",Nc="\\ufe20-\\ufe2f",Pc="\\u20d0-\\u20ff",Ic=Ac+Nc+Pc,Sc="\\ufe0e\\ufe0f",Oc="\\u200d",Cc=RegExp("["+Oc+Tc+Ic+Sc+"]");function Ji(t){return Cc.test(t)}function Rc(t){return t.split("")}var Yi="\\ud800-\\udfff",Fc="\\u0300-\\u036f",Lc="\\ufe20-\\ufe2f",_c="\\u20d0-\\u20ff",Uc=Fc+Lc+_c,Bc="\\ufe0e\\ufe0f",$c="["+Yi+"]",an="["+Uc+"]",un="\\ud83c[\\udffb-\\udfff]",kc="(?:"+an+"|"+un+")",Xi="[^"+Yi+"]",Zi="(?:\\ud83c[\\udde6-\\uddff]){2}",Qi="[\\ud800-\\udbff][\\udc00-\\udfff]",jc="\\u200d",es=kc+"?",ts="["+Bc+"]?",Mc="(?:"+jc+"(?:"+[Xi,Zi,Qi].join("|")+")"+ts+es+")*",Vc=ts+es+Mc,Dc="(?:"+[Xi+an+"?",an,Zi,Qi,$c].join("|")+")",Hc=RegExp(un+"(?="+un+")|"+Dc+Vc,"g");function zc(t){return t.match(Hc)||[]}function qc(t){return Ji(t)?zc(t):Rc(t)}function Wc(t){return function(e){e=Bt(e);var r=Ji(e)?qc(e):void 0,n=r?r[0]:e.charAt(0),i=r?vc(r,1).join(""):e.slice(1);return n[t]()+i}}var Gc=Wc("toUpperCase");function Kc(t){return Gc(Bt(t).toLowerCase())}function Jc(t,e,r,n){for(var i=-1,s=t==null?0:t.length;++i<s;)r=e(r,t[i],i,t);return r}function Yc(t){return function(e){return t?.[e]}}var Xc={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Zc=Yc(Xc),Qc=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ef="\\u0300-\\u036f",tf="\\ufe20-\\ufe2f",rf="\\u20d0-\\u20ff",nf=ef+tf+rf,sf="["+nf+"]",of=RegExp(sf,"g");function af(t){return t=Bt(t),t&&t.replace(Qc,Zc).replace(of,"")}var uf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function lf(t){return t.match(uf)||[]}var cf=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function ff(t){return cf.test(t)}var rs="\\ud800-\\udfff",hf="\\u0300-\\u036f",df="\\ufe20-\\ufe2f",pf="\\u20d0-\\u20ff",gf=hf+df+pf,ns="\\u2700-\\u27bf",is="a-z\\xdf-\\xf6\\xf8-\\xff",mf="\\xac\\xb1\\xd7\\xf7",yf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",bf="\\u2000-\\u206f",wf=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ss="A-Z\\xc0-\\xd6\\xd8-\\xde",xf="\\ufe0e\\ufe0f",os=mf+yf+bf+wf,as="['’]",us="["+os+"]",Ef="["+gf+"]",ls="\\d+",vf="["+ns+"]",cs="["+is+"]",fs="[^"+rs+os+ls+ns+is+ss+"]",Tf="\\ud83c[\\udffb-\\udfff]",Af="(?:"+Ef+"|"+Tf+")",Nf="[^"+rs+"]",hs="(?:\\ud83c[\\udde6-\\uddff]){2}",ds="[\\ud800-\\udbff][\\udc00-\\udfff]",wt="["+ss+"]",Pf="\\u200d",ps="(?:"+cs+"|"+fs+")",If="(?:"+wt+"|"+fs+")",gs="(?:"+as+"(?:d|ll|m|re|s|t|ve))?",ms="(?:"+as+"(?:D|LL|M|RE|S|T|VE))?",ys=Af+"?",bs="["+xf+"]?",Sf="(?:"+Pf+"(?:"+[Nf,hs,ds].join("|")+")"+bs+ys+")*",Of="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Cf="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Rf=bs+ys+Sf,Ff="(?:"+[vf,hs,ds].join("|")+")"+Rf,Lf=RegExp([wt+"?"+cs+"+"+gs+"(?="+[us,wt,"$"].join("|")+")",If+"+"+ms+"(?="+[us,wt+ps,"$"].join("|")+")",wt+"?"+ps+"+"+gs,wt+"+"+ms,Cf,Of,ls,Ff].join("|"),"g");function _f(t){return t.match(Lf)||[]}function Uf(t,e,r){return t=Bt(t),e=e,e===void 0?ff(t)?_f(t):lf(t):t.match(e)||[]}var Bf="['’]",$f=RegExp(Bf,"g");function kf(t){return function(e){return Jc(Uf(af(e).replace($f,"")),t,"")}}var jf=kf(function(t,e,r){return e=e.toLowerCase(),t+(r?Kc(e):e)});const Mf={complex:["tar.bz2","tar.gz","tar.xz"]},ln=t=>t.replace(/[^A-Za-z0-9\-_]/g,""),ws=(t,e)=>!t||typeof t!="string"?"":t.indexOf("!")>=0?t.split("!")[e]:"",Vf=t=>ws(t,0),xs=t=>ws(t,1),Es=t=>{const r=t.name.split(".");if(r.length>2)for(let n=0;n<r.length;n++){const i=r.slice(n,r.length).join(".");if(Mf.complex.includes(i))return i}return r.length<2?"":r[r.length-1]},mr=t=>{if(!t)return t;const e={};return Object.keys(t).forEach(r=>{e[jf(r)]=t[r]}),e};function xt(t,e=[]){const r=t.props[C.Name]?.toString()||Qt.basename(t.filename),n=t.props[C.FileId],i=t.type==="directory";let s;t.filename.startsWith("/files")||t.filename.startsWith("/space")?s=t.filename.split("/").slice(3).join("/"):s=t.filename,s.startsWith("/")||(s=`/${s}`);const o=Es({...t,name:r}),u=t.props[C.LockDiscovery];let l,c,a;u&&(l=u[C.ActiveLock],c=l[C.LockOwner],a=l[C.LockTime]);let h=[];t.props[C.ShareTypes]&&(h=t.props[C.ShareTypes]["share-type"],Array.isArray(h)||(h=[h]));const p={};for(const g of e||[]){const m=g.split(":").pop();t.props[m]&&(p[g]=t.props[m])}const y={id:n,fileId:n,storageId:Vf(n),parentFolderId:t.props[C.FileParent],mimeType:t.props[C.MimeType],name:r,extension:o,path:s,webDavPath:t.filename,type:i?"folder":t.type,isFolder:i,locked:!!l,lockOwner:c,lockTime:a,processing:t.processing||!1,mdate:t.props[C.LastModifiedDate],size:i?t.props[C.ContentSize]?.toString()||"0":t.props[C.ContentLength]?.toString()||"0",permissions:t.props[C.Permissions]||"",starred:t.props[C.IsFavorite]!==0,etag:t.props[C.ETag],shareTypes:h,privateLink:t.props[C.PrivateLink],downloadURL:t.props[C.DownloadURL],remoteItemId:t.props[C.RemoteItemId],remoteItemPath:t.props[C.ShareRoot],owner:{id:t.props[C.OwnerId],displayName:t.props[C.OwnerDisplayName]},tags:(t.props[C.Tags]||"").toString().split(",").filter(Boolean),audio:mr(t.props[C.Audio]),location:mr(t.props[C.Location]),image:mr(t.props[C.Image]),photo:mr(t.props[C.Photo]),extraProps:p,hasPreview:()=>t.props[C.HasPreview]===1,canUpload:function(){return this.permissions.indexOf(Le.FolderCreateable)>=0},canDownload:function(){return this.permissions.indexOf(Le.SecureView)===-1},canBeDeleted:function(){return this.permissions.indexOf(Le.Deletable)>=0},canRename:function(){return this.permissions.indexOf(Le.Renameable)>=0},canShare:function({ability:g}){return g.can("create-all","Share")&&this.permissions.indexOf(Le.Shareable)>=0},canCreate:function(){return this.permissions.indexOf(Le.FolderCreateable)>=0},canEditTags:function(){return this.permissions.indexOf(Le.Updateable)>=0||this.permissions.indexOf(Le.FileUpdateable)>=0||this.permissions.indexOf(Le.FolderCreateable)>=0},isMounted:function(){return this.permissions.indexOf(Le.Mounted)>=0},isReceivedShare:function(){return this.permissions.indexOf(Le.Shared)>=0},isShareRoot(){return t.props[C.ShareRoot]?t.filename.split("/").length===3:!1},getDomSelector:()=>ln(n)};return Object.defineProperty(y,"nodeId",{get(){return xs(this.id)}}),y}function Df(t){const e=t.type==="directory",r=t.props[C.TrashbinOriginalFilename]?.toString(),n=Es({name:r,type:t.type}),i=Zn.basename(t.filename);return{type:e?"folder":t.type,isFolder:e,ddate:t.props[C.TrashbinDeletedDate],name:Zn.basename(r),extension:n,path:k(t.props[C.TrashbinOriginalLocation],{leadingSlash:!0}),id:i,parentFolderId:t.props[C.FileParent],webDavPath:"",canUpload:()=>!1,canDownload:()=>!1,canBeDeleted:()=>!0,canBeRestored:function(){return!0},canRename:()=>!1,canShare:()=>!1,canCreate:()=>!1,isMounted:()=>!1,isReceivedShare:()=>!1,hasPreview:()=>!1,isShareRoot:()=>!1,getDomSelector:()=>ln(i)}}var Ne=(t=>(t.createUpload="libre.graph/driveItem/upload/create",t.createPermissions="libre.graph/driveItem/permissions/create",t.createChildren="libre.graph/driveItem/children/create",t.readBasic="libre.graph/driveItem/basic/read",t.readPath="libre.graph/driveItem/path/read",t.readQuota="libre.graph/driveItem/quota/read",t.readContent="libre.graph/driveItem/content/read",t.readChildren="libre.graph/driveItem/children/read",t.readDeleted="libre.graph/driveItem/deleted/read",t.readPermissions="libre.graph/driveItem/permissions/read",t.readVersions="libre.graph/driveItem/versions/read",t.updatePath="libre.graph/driveItem/path/update",t.updateDeleted="libre.graph/driveItem/deleted/update",t.updatePermissions="libre.graph/driveItem/permissions/update",t.updateVersions="libre.graph/driveItem/versions/update",t.deleteStandard="libre.graph/driveItem/standard/delete",t.deleteDeleted="libre.graph/driveItem/deleted/delete",t.deletePermissions="libre.graph/driveItem/permissions/delete",t))(Ne||{});const cn=t=>t?.driveType==="personal",fn=t=>t?.driveType==="public";function Hf(t,e){return k("spaces",t,e,{leadingSlash:!0})}function hn(t,e=""){return k("spaces","trash-bin",t,e,{leadingSlash:!0})}function zf(t){const e=t.publicLinkPassword,r=t.props?.[C.FileId],n=t.props?.[C.PublicLinkItemType],i=t.props?.[C.PublicLinkPermission],s=t.props?.[C.PublicLinkExpiration],o=t.props?.[C.PublicLinkShareDate],u=t.props?.[C.PublicLinkShareOwner],l=t.publicLinkType;let c,a;return l==="ocm"?(c=`ocm/${t.id}`,a=tl(t.id)):(c=`public/${t.id}`,a=el(t.id)),Object.assign(qf({...t,driveType:"public",driveAlias:c,webDavPath:a}),{...r&&{fileId:r},...e&&{publicLinkPassword:e},...n&&{publicLinkItemType:n},...i&&{publicLinkPermission:parseInt(i)},...s&&{publicLinkExpiration:s},...o&&{publicLinkShareDate:o},...u&&{publicLinkShareOwner:u},publicLinkType:l})}function qf(t){let e,r;t.special&&(e=t.special.find(c=>c.specialFolder.name==="image"),r=t.special.find(c=>c.specialFolder.name==="readme"),e&&(e.webDavUrl=decodeURI(e.webDavUrl)),r&&(r.webDavUrl=decodeURI(r.webDavUrl)));const n=t.root?.deleted?.state==="trashed",i=k(t.webDavPath||Hf(t.id),{leadingSlash:!0}),s=k(t.serverUrl,"remote.php/dav",i),o=k(t.webDavTrashPath||hn(t.id),{leadingSlash:!0}),u=k(t.serverUrl,"remote.php/dav",o),l={id:t.id,fileId:t.id,storageId:t.id,mimeType:"",name:t.name,description:t.description,extension:"",path:"/",webDavPath:i,webDavTrashPath:o,driveAlias:t.driveAlias,driveType:t.driveType,type:"space",isFolder:!0,mdate:t.lastModifiedDateTime,size:t.quota?.used||0,tags:[],permissions:"",starred:!1,etag:"",shareTypes:[],privateLink:t.webUrl,downloadURL:"",owner:t.owner?.user,disabled:n,root:t.root,spaceQuota:t.quota,spaceImageData:e,spaceReadmeData:r,hasTrashedItems:t["@libre.graph.hasTrashedItems"]||!1,graphPermissions:void 0,canUpload:function({user:c}={}){return cn(this)&&this.isOwner(c)?!0:this.graphPermissions?.includes(Ne.createUpload)},canDownload:function(){return!0},canBeDeleted:function({ability:c}={}){return this.disabled?c?.can("delete-all","Drive")?!0:this.graphPermissions?.includes(Ne.deletePermissions):!1},canRename:function({ability:c}={}){return c?.can("update-all","Drive")?!0:this.graphPermissions?.includes(Ne.deletePermissions)},canEditDescription:function({ability:c}={}){return c?.can("update-all","Drive")?!0:this.graphPermissions?.includes(Ne.deletePermissions)},canRestore:function({ability:c}={}){return this.disabled?c?.can("update-all","Drive")?!0:this.graphPermissions?.includes(Ne.deletePermissions):!1},canDisable:function({ability:c}={}){return this.disabled?!1:c?.can("delete-all","Drive")?!0:this.graphPermissions?.includes(Ne.deletePermissions)},canShare:function(){return this.graphPermissions?.includes(Ne.createPermissions)},canEditImage:function(){return this.disabled?!1:this.graphPermissions?.includes(Ne.deletePermissions)},canEditReadme:function(){return this.disabled?!1:this.graphPermissions?.includes(Ne.deletePermissions)},canRestoreFromTrashbin:function(){return this.graphPermissions?.includes(Ne.updateDeleted)},canDeleteFromTrashBin:function({user:c}={}){return cn(this)&&this.isOwner(c)?!0:this.graphPermissions?.includes(Ne.deletePermissions)},canListVersions:function({user:c}={}){return cn(this)&&this.isOwner(c)?!0:this.graphPermissions?.includes(Ne.readVersions)},canCreate:function(){return!0},canEditTags:function(){return!1},isMounted:function(){return!0},isReceivedShare:function(){return!1},isShareRoot:function(){return["share","mountpoint","public"].includes(t.driveType)},getDomSelector:()=>ln(t.id),getDriveAliasAndItem({path:c}){return k(this.driveAlias,c,{leadingSlash:!1})},getWebDavUrl({path:c}){return k(s,c)},getWebDavTrashUrl({path:c}){return k(u,c)},isOwner(c){return c?.id===this.owner?.id}};return Object.defineProperty(l,"nodeId",{get(){return xs(this.id)}}),l}const Wf=(t,e)=>{const r=new URL(t);r.pathname=[...r.pathname.split("/"),"cloud","capabilities"].filter(Boolean).join("/"),r.searchParams.append("format","json");const n=r.href;return{async getCapabilities(){const i=await e.get(n);return xc(i,"data.ocs.data",{capabilities:null,version:null})}}};function Gf(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function $t(t,e=""){if(!Number.isSafeInteger(t)||t<0){const r=e&&`"${e}" `;throw new Error(`${r}expected integer >= 0, got ${t}`)}}function kt(t,e,r=""){const n=Gf(t),i=t?.length,s=e!==void 0;if(!n||s&&i!==e){const o=r&&`"${r}" `,u=s?` of length ${e}`:"",l=n?`length=${i}`:`type=${typeof t}`;throw new Error(o+"expected Uint8Array"+u+", got "+l)}return t}function vs(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash must wrapped by utils.createHasher");$t(t.outputLen),$t(t.blockLen)}function yr(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function Kf(t,e){kt(t,void 0,"digestInto() output");const r=e.outputLen;if(t.length<r)throw new Error('"digestInto() output" expected to be of length >='+r)}function jt(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function br(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Jf(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function Ts(t,e=""){return typeof t=="string"?Jf(t):kt(t,void 0,e)}function Yf(t,e){if(e!==void 0&&{}.toString.call(e)!=="[object Object]")throw new Error("options must be object or undefined");return Object.assign(t,e)}function Xf(t,e={}){const r=(i,s)=>t(s).update(i).digest(),n=t(void 0);return r.outputLen=n.outputLen,r.blockLen=n.blockLen,r.create=i=>t(i),Object.assign(r,e),Object.freeze(r)}const Zf=t=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,t])});class As{oHash;iHash;blockLen;outputLen;finished=!1;destroyed=!1;constructor(e,r){if(vs(e),kt(r,void 0,"key"),this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const n=this.blockLen,i=new Uint8Array(n);i.set(r.length>n?e.create().update(r).digest():r);for(let s=0;s<i.length;s++)i[s]^=54;this.iHash.update(i),this.oHash=e.create();for(let s=0;s<i.length;s++)i[s]^=106;this.oHash.update(i),jt(i)}update(e){return yr(this),this.iHash.update(e),this}digestInto(e){yr(this),kt(e,this.outputLen,"output"),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||=Object.create(Object.getPrototypeOf(this),{});const{oHash:r,iHash:n,finished:i,destroyed:s,blockLen:o,outputLen:u}=this;return e=e,e.finished=i,e.destroyed=s,e.blockLen=o,e.outputLen=u,e.oHash=r._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const Ns=(t,e,r)=>new As(t,e).update(r).digest();Ns.create=(t,e)=>new As(t,e);function Qf(t,e,r,n){vs(t);const i=Yf({dkLen:32,asyncTick:10},n),{c:s,dkLen:o,asyncTick:u}=i;if($t(s,"c"),$t(o,"dkLen"),$t(u,"asyncTick"),s<1)throw new Error("iterations (c) must be >= 1");const l=Ts(e,"password"),c=Ts(r,"salt"),a=new Uint8Array(o),h=Ns.create(t,l),p=h._cloneInto().update(c);return{c:s,dkLen:o,asyncTick:u,DK:a,PRF:h,PRFSalt:p}}function eh(t,e,r,n,i){return t.destroy(),e.destroy(),n&&n.destroy(),jt(i),r}function th(t,e,r,n){const{c:i,dkLen:s,DK:o,PRF:u,PRFSalt:l}=Qf(t,e,r,n);let c;const a=new Uint8Array(4),h=br(a),p=new Uint8Array(u.outputLen);for(let y=1,g=0;g<s;y++,g+=u.outputLen){const m=o.subarray(g,g+u.outputLen);h.setInt32(0,y,!1),(c=l._cloneInto(c)).update(a).digestInto(p),m.set(p.subarray(0,m.length));for(let b=1;b<i;b++){u._cloneInto(c).update(p).digestInto(p);for(let v=0;v<m.length;v++)m[v]^=p[v]}}return eh(u,l,o,c,p)}class rh{blockLen;outputLen;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(e,r,n,i){this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.buffer=new Uint8Array(e),this.view=br(this.buffer)}update(e){yr(this),kt(e);const{view:r,buffer:n,blockLen:i}=this,s=e.length;for(let o=0;o<s;){const u=Math.min(i-this.pos,s-o);if(u===i){const l=br(e);for(;i<=s-o;o+=i)this.process(l,o);continue}n.set(e.subarray(o,o+u),this.pos),this.pos+=u,o+=u,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){yr(this),Kf(e,this),this.finished=!0;const{buffer:r,view:n,blockLen:i,isLE:s}=this;let{pos:o}=this;r[o++]=128,jt(this.buffer.subarray(o)),this.padOffset>i-o&&(this.process(n,0),o=0);for(let h=o;h<i;h++)r[h]=0;n.setBigUint64(i-8,BigInt(this.length*8),s),this.process(n,0);const u=br(e),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const c=l/4,a=this.get();if(c>a.length)throw new Error("_sha2: outputLen bigger than state");for(let h=0;h<c;h++)u.setUint32(4*h,a[h],s)}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||=new this.constructor,e.set(...this.get());const{blockLen:r,buffer:n,length:i,finished:s,destroyed:o,pos:u}=this;return e.destroyed=o,e.finished=s,e.length=i,e.pos=u,i%r&&e.buffer.set(n),e}clone(){return this._cloneInto()}}const he=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),wr=BigInt(2**32-1),Ps=BigInt(32);function nh(t,e=!1){return e?{h:Number(t&wr),l:Number(t>>Ps&wr)}:{h:Number(t>>Ps&wr)|0,l:Number(t&wr)|0}}function ih(t,e=!1){const r=t.length;let n=new Uint32Array(r),i=new Uint32Array(r);for(let s=0;s<r;s++){const{h:o,l:u}=nh(t[s],e);[n[s],i[s]]=[o,u]}return[n,i]}const Is=(t,e,r)=>t>>>r,Ss=(t,e,r)=>t<<32-r|e>>>r,Et=(t,e,r)=>t>>>r|e<<32-r,vt=(t,e,r)=>t<<32-r|e>>>r,xr=(t,e,r)=>t<<64-r|e>>>r-32,Er=(t,e,r)=>t>>>r-32|e<<64-r;function He(t,e,r,n){const i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:i|0}}const sh=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),oh=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,ah=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),uh=(t,e,r,n,i)=>e+r+n+i+(t/2**32|0)|0,lh=(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0),ch=(t,e,r,n,i,s)=>e+r+n+i+s+(t/2**32|0)|0,Os=ih(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),fh=Os[0],hh=Os[1],Ge=new Uint32Array(80),Ke=new Uint32Array(80);class dh extends rh{constructor(e){super(128,e,16,!1)}get(){const{Ah:e,Al:r,Bh:n,Bl:i,Ch:s,Cl:o,Dh:u,Dl:l,Eh:c,El:a,Fh:h,Fl:p,Gh:y,Gl:g,Hh:m,Hl:b}=this;return[e,r,n,i,s,o,u,l,c,a,h,p,y,g,m,b]}set(e,r,n,i,s,o,u,l,c,a,h,p,y,g,m,b){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=i|0,this.Ch=s|0,this.Cl=o|0,this.Dh=u|0,this.Dl=l|0,this.Eh=c|0,this.El=a|0,this.Fh=h|0,this.Fl=p|0,this.Gh=y|0,this.Gl=g|0,this.Hh=m|0,this.Hl=b|0}process(e,r){for(let T=0;T<16;T++,r+=4)Ge[T]=e.getUint32(r),Ke[T]=e.getUint32(r+=4);for(let T=16;T<80;T++){const P=Ge[T-15]|0,S=Ke[T-15]|0,F=Et(P,S,1)^Et(P,S,8)^Is(P,S,7),L=vt(P,S,1)^vt(P,S,8)^Ss(P,S,7),U=Ge[T-2]|0,_=Ke[T-2]|0,j=Et(U,_,19)^xr(U,_,61)^Is(U,_,6),pe=vt(U,_,19)^Er(U,_,61)^Ss(U,_,6),oe=ah(L,pe,Ke[T-7],Ke[T-16]),R=uh(oe,F,j,Ge[T-7],Ge[T-16]);Ge[T]=R|0,Ke[T]=oe|0}let{Ah:n,Al:i,Bh:s,Bl:o,Ch:u,Cl:l,Dh:c,Dl:a,Eh:h,El:p,Fh:y,Fl:g,Gh:m,Gl:b,Hh:v,Hl:E}=this;for(let T=0;T<80;T++){const P=Et(h,p,14)^Et(h,p,18)^xr(h,p,41),S=vt(h,p,14)^vt(h,p,18)^Er(h,p,41),F=h&y^~h&m,L=p&g^~p&b,U=lh(E,S,L,hh[T],Ke[T]),_=ch(U,v,P,F,fh[T],Ge[T]),j=U|0,pe=Et(n,i,28)^xr(n,i,34)^xr(n,i,39),oe=vt(n,i,28)^Er(n,i,34)^Er(n,i,39),R=n&s^n&u^s&u,le=i&o^i&l^o&l;v=m|0,E=b|0,m=y|0,b=g|0,y=h|0,g=p|0,{h,l:p}=He(c|0,a|0,_|0,j|0),c=u|0,a=l|0,u=s|0,l=o|0,s=n|0,o=i|0;const Pe=sh(j,oe,le);n=oh(Pe,_,pe,R),i=Pe|0}({h:n,l:i}=He(this.Ah|0,this.Al|0,n|0,i|0)),{h:s,l:o}=He(this.Bh|0,this.Bl|0,s|0,o|0),{h:u,l}=He(this.Ch|0,this.Cl|0,u|0,l|0),{h:c,l:a}=He(this.Dh|0,this.Dl|0,c|0,a|0),{h,l:p}=He(this.Eh|0,this.El|0,h|0,p|0),{h:y,l:g}=He(this.Fh|0,this.Fl|0,y|0,g|0),{h:m,l:b}=He(this.Gh|0,this.Gl|0,m|0,b|0),{h:v,l:E}=He(this.Hh|0,this.Hl|0,v|0,E|0),this.set(n,i,s,o,u,l,c,a,h,p,y,g,m,b,v,E)}roundClean(){jt(Ge,Ke)}destroy(){jt(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class ph extends dh{Ah=he[0]|0;Al=he[1]|0;Bh=he[2]|0;Bl=he[3]|0;Ch=he[4]|0;Cl=he[5]|0;Dh=he[6]|0;Dl=he[7]|0;Eh=he[8]|0;El=he[9]|0;Fh=he[10]|0;Fl=he[11]|0;Gh=he[12]|0;Gl=he[13]|0;Hh=he[14]|0;Hl=he[15]|0;constructor(){super(64)}}const gh=Xf(()=>new ph,Zf(3)),mh=(t,e,r,n)=>hi.from(th(gh,t,e,{c:r,dkLen:n})),Cs=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",yh=Cs+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",bh="["+Cs+"]["+yh+"]*",wh=new RegExp("^"+bh+"$");function Rs(t,e){const r=[];let n=e.exec(t);for(;n;){const i=[];i.startIndex=e.lastIndex-n[0].length;const s=n.length;for(let o=0;o<s;o++)i.push(n[o]);r.push(i),n=e.exec(t)}return r}const vr=function(t){const e=wh.exec(t);return!(e===null||typeof e>"u")};function xh(t){return typeof t<"u"}const Eh={allowBooleanAttributes:!1,unpairedTags:[]};function vh(t,e){e=Object.assign({},Eh,e);const r=[];let n=!1,i=!1;t[0]==="\uFEFF"&&(t=t.substr(1));for(let s=0;s<t.length;s++)if(t[s]==="<"&&t[s+1]==="?"){if(s+=2,s=Ls(t,s),s.err)return s}else if(t[s]==="<"){let o=s;if(s++,t[s]==="!"){s=_s(t,s);continue}else{let u=!1;t[s]==="/"&&(u=!0,s++);let l="";for(;s<t.length&&t[s]!==">"&&t[s]!==" "&&t[s]!==" "&&t[s]!==`
|
|
7
|
+
`&&t[s]!=="\r";s++)l+=t[s];if(l=l.trim(),l[l.length-1]==="/"&&(l=l.substring(0,l.length-1),s--),!Ch(l)){let h;return l.trim().length===0?h="Invalid space after '<'.":h="Tag '"+l+"' is an invalid name.",ee("InvalidTag",h,ge(t,s))}const c=Nh(t,s);if(c===!1)return ee("InvalidAttr","Attributes for '"+l+"' have open quote.",ge(t,s));let a=c.value;if(s=c.index,a[a.length-1]==="/"){const h=s-a.length;a=a.substring(0,a.length-1);const p=Us(a,e);if(p===!0)n=!0;else return ee(p.err.code,p.err.msg,ge(t,h+p.err.line))}else if(u)if(c.tagClosed){if(a.trim().length>0)return ee("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",ge(t,o));if(r.length===0)return ee("InvalidTag","Closing tag '"+l+"' has not been opened.",ge(t,o));{const h=r.pop();if(l!==h.tagName){let p=ge(t,h.tagStartPos);return ee("InvalidTag","Expected closing tag '"+h.tagName+"' (opened in line "+p.line+", col "+p.col+") instead of closing tag '"+l+"'.",ge(t,o))}r.length==0&&(i=!0)}}else return ee("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",ge(t,s));else{const h=Us(a,e);if(h!==!0)return ee(h.err.code,h.err.msg,ge(t,s-a.length+h.err.line));if(i===!0)return ee("InvalidXml","Multiple possible root nodes found.",ge(t,s));e.unpairedTags.indexOf(l)!==-1||r.push({tagName:l,tagStartPos:o}),n=!0}for(s++;s<t.length;s++)if(t[s]==="<")if(t[s+1]==="!"){s++,s=_s(t,s);continue}else if(t[s+1]==="?"){if(s=Ls(t,++s),s.err)return s}else break;else if(t[s]==="&"){const h=Sh(t,s);if(h==-1)return ee("InvalidChar","char '&' is not expected.",ge(t,s));s=h}else if(i===!0&&!Fs(t[s]))return ee("InvalidXml","Extra text at the end",ge(t,s));t[s]==="<"&&s--}}else{if(Fs(t[s]))continue;return ee("InvalidChar","char '"+t[s]+"' is not expected.",ge(t,s))}if(n){if(r.length==1)return ee("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",ge(t,r[0].tagStartPos));if(r.length>0)return ee("InvalidXml","Invalid '"+JSON.stringify(r.map(s=>s.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return ee("InvalidXml","Start tag expected.",1);return!0}function Fs(t){return t===" "||t===" "||t===`
|
|
8
|
+
`||t==="\r"}function Ls(t,e){const r=e;for(;e<t.length;e++)if(t[e]=="?"||t[e]==" "){const n=t.substr(r,e-r);if(e>5&&n==="xml")return ee("InvalidXml","XML declaration allowed only at the start of the document.",ge(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}function _s(t,e){if(t.length>e+5&&t[e+1]==="-"&&t[e+2]==="-"){for(e+=3;e<t.length;e++)if(t[e]==="-"&&t[e+1]==="-"&&t[e+2]===">"){e+=2;break}}else if(t.length>e+8&&t[e+1]==="D"&&t[e+2]==="O"&&t[e+3]==="C"&&t[e+4]==="T"&&t[e+5]==="Y"&&t[e+6]==="P"&&t[e+7]==="E"){let r=1;for(e+=8;e<t.length;e++)if(t[e]==="<")r++;else if(t[e]===">"&&(r--,r===0))break}else if(t.length>e+9&&t[e+1]==="["&&t[e+2]==="C"&&t[e+3]==="D"&&t[e+4]==="A"&&t[e+5]==="T"&&t[e+6]==="A"&&t[e+7]==="["){for(e+=8;e<t.length;e++)if(t[e]==="]"&&t[e+1]==="]"&&t[e+2]===">"){e+=2;break}}return e}const Th='"',Ah="'";function Nh(t,e){let r="",n="",i=!1;for(;e<t.length;e++){if(t[e]===Th||t[e]===Ah)n===""?n=t[e]:n!==t[e]||(n="");else if(t[e]===">"&&n===""){i=!0;break}r+=t[e]}return n!==""?!1:{value:r,index:e,tagClosed:i}}const Ph=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Us(t,e){const r=Rs(t,Ph),n={};for(let i=0;i<r.length;i++){if(r[i][1].length===0)return ee("InvalidAttr","Attribute '"+r[i][2]+"' has no space in starting.",Mt(r[i]));if(r[i][3]!==void 0&&r[i][4]===void 0)return ee("InvalidAttr","Attribute '"+r[i][2]+"' is without value.",Mt(r[i]));if(r[i][3]===void 0&&!e.allowBooleanAttributes)return ee("InvalidAttr","boolean attribute '"+r[i][2]+"' is not allowed.",Mt(r[i]));const s=r[i][2];if(!Oh(s))return ee("InvalidAttr","Attribute '"+s+"' is an invalid name.",Mt(r[i]));if(!Object.prototype.hasOwnProperty.call(n,s))n[s]=1;else return ee("InvalidAttr","Attribute '"+s+"' is repeated.",Mt(r[i]))}return!0}function Ih(t,e){let r=/\d/;for(t[e]==="x"&&(e++,r=/[\da-fA-F]/);e<t.length;e++){if(t[e]===";")return e;if(!t[e].match(r))break}return-1}function Sh(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,Ih(t,e);let r=0;for(;e<t.length;e++,r++)if(!(t[e].match(/\w/)&&r<20)){if(t[e]===";")break;return-1}return e}function ee(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}function Oh(t){return vr(t)}function Ch(t){return vr(t)}function ge(t,e){const r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function Mt(t){return t.startIndex+t[1].length}const Rh={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,r){return t},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0};function Bs(t){return typeof t=="boolean"?{enabled:t,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1e3,maxExpandedLength:1e5,maxEntityCount:100,allowedTags:null,tagFilter:null}:typeof t=="object"&&t!==null?{enabled:t.enabled!==!1,maxEntitySize:t.maxEntitySize??1e4,maxExpansionDepth:t.maxExpansionDepth??10,maxTotalExpansions:t.maxTotalExpansions??1e3,maxExpandedLength:t.maxExpandedLength??1e5,maxEntityCount:t.maxEntityCount??100,allowedTags:t.allowedTags??null,tagFilter:t.tagFilter??null}:Bs(!0)}const Fh=function(t){const e=Object.assign({},Rh,t);return e.processEntities=Bs(e.processEntities),e};let Tr;typeof Symbol!="function"?Tr="@@xmlMetadata":Tr=Symbol("XML Node Metadata");class Je{constructor(e){this.tagname=e,this.child=[],this[":@"]=Object.create(null)}add(e,r){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:r})}addChild(e,r){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child}),r!==void 0&&(this.child[this.child.length-1][Tr]={startIndex:r})}static getMetaDataSymbol(){return Tr}}class Lh{constructor(e){this.suppressValidationErr=!e,this.options=e}readDocType(e,r){const n=Object.create(null);let i=0;if(e[r+3]==="O"&&e[r+4]==="C"&&e[r+5]==="T"&&e[r+6]==="Y"&&e[r+7]==="P"&&e[r+8]==="E"){r=r+9;let s=1,o=!1,u=!1,l="";for(;r<e.length;r++)if(e[r]==="<"&&!u){if(o&&ut(e,"!ENTITY",r)){r+=7;let c,a;if([c,a,r]=this.readEntityExp(e,r+1,this.suppressValidationErr),a.indexOf("&")===-1){if(this.options.enabled!==!1&&this.options.maxEntityCount&&i>=this.options.maxEntityCount)throw new Error(`Entity count (${i+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);const h=c.replace(/[.\-+*:]/g,"\\.");n[c]={regx:RegExp(`&${h};`,"g"),val:a},i++}}else if(o&&ut(e,"!ELEMENT",r)){r+=8;const{index:c}=this.readElementExp(e,r+1);r=c}else if(o&&ut(e,"!ATTLIST",r))r+=8;else if(o&&ut(e,"!NOTATION",r)){r+=9;const{index:c}=this.readNotationExp(e,r+1,this.suppressValidationErr);r=c}else if(ut(e,"!--",r))u=!0;else throw new Error("Invalid DOCTYPE");s++,l=""}else if(e[r]===">"){if(u?e[r-1]==="-"&&e[r-2]==="-"&&(u=!1,s--):s--,s===0)break}else e[r]==="["?o=!0:l+=e[r];if(s!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:n,i:r}}readEntityExp(e,r){r=ve(e,r);let n="";for(;r<e.length&&!/\s/.test(e[r])&&e[r]!=='"'&&e[r]!=="'";)n+=e[r],r++;if(Vt(n),r=ve(e,r),!this.suppressValidationErr){if(e.substring(r,r+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(e[r]==="%")throw new Error("Parameter entities are not supported")}let i="";if([r,i]=this.readIdentifierVal(e,r,"entity"),this.options.enabled!==!1&&this.options.maxEntitySize&&i.length>this.options.maxEntitySize)throw new Error(`Entity "${n}" size (${i.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return r--,[n,i,r]}readNotationExp(e,r){r=ve(e,r);let n="";for(;r<e.length&&!/\s/.test(e[r]);)n+=e[r],r++;!this.suppressValidationErr&&Vt(n),r=ve(e,r);const i=e.substring(r,r+6).toUpperCase();if(!this.suppressValidationErr&&i!=="SYSTEM"&&i!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${i}"`);r+=i.length,r=ve(e,r);let s=null,o=null;if(i==="PUBLIC")[r,s]=this.readIdentifierVal(e,r,"publicIdentifier"),r=ve(e,r),(e[r]==='"'||e[r]==="'")&&([r,o]=this.readIdentifierVal(e,r,"systemIdentifier"));else if(i==="SYSTEM"&&([r,o]=this.readIdentifierVal(e,r,"systemIdentifier"),!this.suppressValidationErr&&!o))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:n,publicIdentifier:s,systemIdentifier:o,index:--r}}readIdentifierVal(e,r,n){let i="";const s=e[r];if(s!=='"'&&s!=="'")throw new Error(`Expected quoted string, found "${s}"`);for(r++;r<e.length&&e[r]!==s;)i+=e[r],r++;if(e[r]!==s)throw new Error(`Unterminated ${n} value`);return r++,[r,i]}readElementExp(e,r){r=ve(e,r);let n="";for(;r<e.length&&!/\s/.test(e[r]);)n+=e[r],r++;if(!this.suppressValidationErr&&!vr(n))throw new Error(`Invalid element name: "${n}"`);r=ve(e,r);let i="";if(e[r]==="E"&&ut(e,"MPTY",r))r+=4;else if(e[r]==="A"&&ut(e,"NY",r))r+=2;else if(e[r]==="("){for(r++;r<e.length&&e[r]!==")";)i+=e[r],r++;if(e[r]!==")")throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${e[r]}"`);return{elementName:n,contentModel:i.trim(),index:r}}readAttlistExp(e,r){r=ve(e,r);let n="";for(;r<e.length&&!/\s/.test(e[r]);)n+=e[r],r++;Vt(n),r=ve(e,r);let i="";for(;r<e.length&&!/\s/.test(e[r]);)i+=e[r],r++;if(!Vt(i))throw new Error(`Invalid attribute name: "${i}"`);r=ve(e,r);let s="";if(e.substring(r,r+8).toUpperCase()==="NOTATION"){if(s="NOTATION",r+=8,r=ve(e,r),e[r]!=="(")throw new Error(`Expected '(', found "${e[r]}"`);r++;let u=[];for(;r<e.length&&e[r]!==")";){let l="";for(;r<e.length&&e[r]!=="|"&&e[r]!==")";)l+=e[r],r++;if(l=l.trim(),!Vt(l))throw new Error(`Invalid notation name: "${l}"`);u.push(l),e[r]==="|"&&(r++,r=ve(e,r))}if(e[r]!==")")throw new Error("Unterminated list of notations");r++,s+=" ("+u.join("|")+")"}else{for(;r<e.length&&!/\s/.test(e[r]);)s+=e[r],r++;const u=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!u.includes(s.toUpperCase()))throw new Error(`Invalid attribute type: "${s}"`)}r=ve(e,r);let o="";return e.substring(r,r+8).toUpperCase()==="#REQUIRED"?(o="#REQUIRED",r+=8):e.substring(r,r+7).toUpperCase()==="#IMPLIED"?(o="#IMPLIED",r+=7):[r,o]=this.readIdentifierVal(e,r,"ATTLIST"),{elementName:n,attributeName:i,attributeType:s,defaultValue:o,index:r}}}const ve=(t,e)=>{for(;e<t.length&&/\s/.test(t[e]);)e++;return e};function ut(t,e,r){for(let n=0;n<e.length;n++)if(e[n]!==t[r+n+1])return!1;return!0}function Vt(t){if(vr(t))return t;throw new Error(`Invalid entity name ${t}`)}const _h=/^[-+]?0x[a-fA-F0-9]+$/,Uh=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,Bh={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0,infinity:"original"};function $h(t,e={}){if(e=Object.assign({},Bh,e),!t||typeof t!="string")return t;let r=t.trim();if(e.skipLike!==void 0&&e.skipLike.test(r))return t;if(t==="0")return 0;if(e.hex&&_h.test(r))return Vh(r,16);if(isFinite(r)){if(r.includes("e")||r.includes("E"))return jh(t,r,e);{const n=Uh.exec(r);if(n){const i=n[1]||"",s=n[2];let o=Mh(n[3]);const u=i?t[s.length+1]===".":t[s.length]===".";if(!e.leadingZeros&&(s.length>1||s.length===1&&!u))return t;{const l=Number(r),c=String(l);if(l===0)return l;if(c.search(/[eE]/)!==-1)return e.eNotation?l:t;if(r.indexOf(".")!==-1)return c==="0"||c===o||c===`${i}${o}`?l:t;let a=s?o:r;return s?a===c||i+a===c?l:t:a===c||a===i+c?l:t}}else return t}}else return Dh(t,Number(r),e)}const kh=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function jh(t,e,r){if(!r.eNotation)return t;const n=e.match(kh);if(n){let i=n[1]||"";const s=n[3].indexOf("e")===-1?"E":"e",o=n[2],u=i?t[o.length+1]===s:t[o.length]===s;return o.length>1&&u?t:o.length===1&&(n[3].startsWith(`.${s}`)||n[3][0]===s)?Number(e):r.leadingZeros&&!u?(e=(n[1]||"")+n[3],Number(e)):t}else return t}function Mh(t){return t&&t.indexOf(".")!==-1&&(t=t.replace(/0+$/,""),t==="."?t="0":t[0]==="."?t="0"+t:t[t.length-1]==="."&&(t=t.substring(0,t.length-1))),t}function Vh(t,e){if(parseInt)return parseInt(t,e);if(Number.parseInt)return Number.parseInt(t,e);if(window&&window.parseInt)return window.parseInt(t,e);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}function Dh(t,e,r){const n=e===1/0;switch(r.infinity.toLowerCase()){case"null":return null;case"infinity":return e;case"string":return n?"Infinity":"-Infinity";default:return t}}function Hh(t){return typeof t=="function"?t:Array.isArray(t)?e=>{for(const r of t)if(typeof r=="string"&&e===r||r instanceof RegExp&&r.test(e))return!0}:()=>!1}class zh{constructor(e){if(this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(r,n)=>$s(n,10,"&#")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(r,n)=>$s(n,16,"&#x")}},this.addExternalEntities=qh,this.parseXml=Yh,this.parseTextData=Wh,this.resolveNameSpace=Gh,this.buildAttributesMap=Jh,this.isItStopNode=ed,this.replaceEntitiesValue=Zh,this.readStopNodeData=rd,this.saveTextToParentTag=Qh,this.addChild=Xh,this.ignoreAttributesFn=Hh(this.options.ignoreAttributes),this.entityExpansionCount=0,this.currentExpandedLength=0,this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodesExact=new Set,this.stopNodesWildcard=new Set;for(let r=0;r<this.options.stopNodes.length;r++){const n=this.options.stopNodes[r];typeof n=="string"&&(n.startsWith("*.")?this.stopNodesWildcard.add(n.substring(2)):this.stopNodesExact.add(n))}}}}function qh(t){const e=Object.keys(t);for(let r=0;r<e.length;r++){const n=e[r],i=n.replace(/[.\-+*:]/g,"\\.");this.lastEntities[n]={regex:new RegExp("&"+i+";","g"),val:t[n]}}}function Wh(t,e,r,n,i,s,o){if(t!==void 0&&(this.options.trimValues&&!n&&(t=t.trim()),t.length>0)){o||(t=this.replaceEntitiesValue(t,e,r));const u=this.options.tagValueProcessor(e,t,r,i,s);return u==null?t:typeof u!=typeof t||u!==t?u:this.options.trimValues?pn(t,this.options.parseTagValue,this.options.numberParseOptions):t.trim()===t?pn(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function Gh(t){if(this.options.removeNSPrefix){const e=t.split(":"),r=t.charAt(0)==="/"?"/":"";if(e[0]==="xmlns")return"";e.length===2&&(t=r+e[1])}return t}const Kh=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Jh(t,e,r){if(this.options.ignoreAttributes!==!0&&typeof t=="string"){const n=Rs(t,Kh),i=n.length,s={};for(let o=0;o<i;o++){const u=this.resolveNameSpace(n[o][1]);if(this.ignoreAttributesFn(u,e))continue;let l=n[o][4],c=this.options.attributeNamePrefix+u;if(u.length)if(this.options.transformAttributeName&&(c=this.options.transformAttributeName(c)),c==="__proto__"&&(c="#__proto__"),l!==void 0){this.options.trimValues&&(l=l.trim()),l=this.replaceEntitiesValue(l,r,e);const a=this.options.attributeValueProcessor(u,l,e);a==null?s[c]=l:typeof a!=typeof l||a!==l?s[c]=a:s[c]=pn(l,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(s[c]=!0)}if(!Object.keys(s).length)return;if(this.options.attributesGroupName){const o={};return o[this.options.attributesGroupName]=s,o}return s}}const Yh=function(t){t=t.replace(/\r\n?/g,`
|
|
9
|
+
`);const e=new Je("!xml");let r=e,n="",i="";this.entityExpansionCount=0,this.currentExpandedLength=0;const s=new Lh(this.options.processEntities);for(let o=0;o<t.length;o++)if(t[o]==="<")if(t[o+1]==="/"){const l=lt(t,">",o,"Closing Tag is not closed.");let c=t.substring(o+2,l).trim();if(this.options.removeNSPrefix){const p=c.indexOf(":");p!==-1&&(c=c.substr(p+1))}this.options.transformTagName&&(c=this.options.transformTagName(c)),r&&(n=this.saveTextToParentTag(n,r,i));const a=i.substring(i.lastIndexOf(".")+1);if(c&&this.options.unpairedTags.indexOf(c)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${c}>`);let h=0;a&&this.options.unpairedTags.indexOf(a)!==-1?(h=i.lastIndexOf(".",i.lastIndexOf(".")-1),this.tagsNodeStack.pop()):h=i.lastIndexOf("."),i=i.substring(0,h),r=this.tagsNodeStack.pop(),n="",o=l}else if(t[o+1]==="?"){let l=dn(t,o,!1,"?>");if(!l)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,i),!(this.options.ignoreDeclaration&&l.tagName==="?xml"||this.options.ignorePiTags)){const c=new Je(l.tagName);c.add(this.options.textNodeName,""),l.tagName!==l.tagExp&&l.attrExpPresent&&(c[":@"]=this.buildAttributesMap(l.tagExp,i,l.tagName)),this.addChild(r,c,i,o)}o=l.closeIndex+1}else if(t.substr(o+1,3)==="!--"){const l=lt(t,"-->",o+4,"Comment is not closed.");if(this.options.commentPropName){const c=t.substring(o+4,l-2);n=this.saveTextToParentTag(n,r,i),r.add(this.options.commentPropName,[{[this.options.textNodeName]:c}])}o=l}else if(t.substr(o+1,2)==="!D"){const l=s.readDocType(t,o);this.docTypeEntities=l.entities,o=l.i}else if(t.substr(o+1,2)==="!["){const l=lt(t,"]]>",o,"CDATA is not closed.")-2,c=t.substring(o+9,l);n=this.saveTextToParentTag(n,r,i);let a=this.parseTextData(c,r.tagname,i,!0,!1,!0,!0);a==null&&(a=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:c}]):r.add(this.options.textNodeName,a),o=l+2}else{let l=dn(t,o,this.options.removeNSPrefix),c=l.tagName;const a=l.rawTagName;let h=l.tagExp,p=l.attrExpPresent,y=l.closeIndex;if(this.options.transformTagName){const b=this.options.transformTagName(c);h===c&&(h=b),c=b}if(this.options.strictReservedNames&&(c===this.options.commentPropName||c===this.options.cdataPropName))throw new Error(`Invalid tag name: ${c}`);r&&n&&r.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,r,i,!1));const g=r;g&&this.options.unpairedTags.indexOf(g.tagname)!==-1&&(r=this.tagsNodeStack.pop(),i=i.substring(0,i.lastIndexOf("."))),c!==e.tagname&&(i+=i?"."+c:c);const m=o;if(this.isItStopNode(this.stopNodesExact,this.stopNodesWildcard,i,c)){let b="";if(h.length>0&&h.lastIndexOf("/")===h.length-1)c[c.length-1]==="/"?(c=c.substr(0,c.length-1),i=i.substr(0,i.length-1),h=c):h=h.substr(0,h.length-1),o=l.closeIndex;else if(this.options.unpairedTags.indexOf(c)!==-1)o=l.closeIndex;else{const E=this.readStopNodeData(t,a,y+1);if(!E)throw new Error(`Unexpected end of ${a}`);o=E.i,b=E.tagContent}const v=new Je(c);c!==h&&p&&(v[":@"]=this.buildAttributesMap(h,i,c)),b&&(b=this.parseTextData(b,c,i,!0,p,!0,!0)),i=i.substr(0,i.lastIndexOf(".")),v.add(this.options.textNodeName,b),this.addChild(r,v,i,m)}else{if(h.length>0&&h.lastIndexOf("/")===h.length-1){if(c[c.length-1]==="/"?(c=c.substr(0,c.length-1),i=i.substr(0,i.length-1),h=c):h=h.substr(0,h.length-1),this.options.transformTagName){const v=this.options.transformTagName(c);h===c&&(h=v),c=v}const b=new Je(c);c!==h&&p&&(b[":@"]=this.buildAttributesMap(h,i,c)),this.addChild(r,b,i,m),i=i.substr(0,i.lastIndexOf("."))}else if(this.options.unpairedTags.indexOf(c)!==-1){const b=new Je(c);c!==h&&p&&(b[":@"]=this.buildAttributesMap(h,i)),this.addChild(r,b,i,m),i=i.substr(0,i.lastIndexOf(".")),o=l.closeIndex;continue}else{const b=new Je(c);if(this.tagsNodeStack.length>this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(r),c!==h&&p&&(b[":@"]=this.buildAttributesMap(h,i,c)),this.addChild(r,b,i,m),r=b}n="",o=y}}else n+=t[o];return e.child};function Xh(t,e,r,n){this.options.captureMetaData||(n=void 0);const i=this.options.updateTag(e.tagname,r,e[":@"]);i===!1||(typeof i=="string"&&(e.tagname=i),t.addChild(e,n))}const Zh=function(t,e,r){if(t.indexOf("&")===-1)return t;const n=this.options.processEntities;if(!n.enabled||n.allowedTags&&!n.allowedTags.includes(e)||n.tagFilter&&!n.tagFilter(e,r))return t;for(let i in this.docTypeEntities){const s=this.docTypeEntities[i],o=t.match(s.regx);if(o){if(this.entityExpansionCount+=o.length,n.maxTotalExpansions&&this.entityExpansionCount>n.maxTotalExpansions)throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${n.maxTotalExpansions}`);const u=t.length;if(t=t.replace(s.regx,s.val),n.maxExpandedLength&&(this.currentExpandedLength+=t.length-u,this.currentExpandedLength>n.maxExpandedLength))throw new Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${n.maxExpandedLength}`)}}if(t.indexOf("&")===-1)return t;for(let i in this.lastEntities){const s=this.lastEntities[i];t=t.replace(s.regex,s.val)}if(t.indexOf("&")===-1)return t;if(this.options.htmlEntities)for(let i in this.htmlEntities){const s=this.htmlEntities[i];t=t.replace(s.regex,s.val)}return t=t.replace(this.ampEntity.regex,this.ampEntity.val),t};function Qh(t,e,r,n){return t&&(n===void 0&&(n=e.child.length===0),t=this.parseTextData(t,e.tagname,r,!1,e[":@"]?Object.keys(e[":@"]).length!==0:!1,n),t!==void 0&&t!==""&&e.add(this.options.textNodeName,t),t=""),t}function ed(t,e,r,n){return!!(e&&e.has(n)||t&&t.has(r))}function td(t,e,r=">"){let n,i="";for(let s=e;s<t.length;s++){let o=t[s];if(n)o===n&&(n="");else if(o==='"'||o==="'")n=o;else if(o===r[0])if(r[1]){if(t[s+1]===r[1])return{data:i,index:s}}else return{data:i,index:s};else o===" "&&(o=" ");i+=o}}function lt(t,e,r,n){const i=t.indexOf(e,r);if(i===-1)throw new Error(n);return i+e.length-1}function dn(t,e,r,n=">"){const i=td(t,e+1,n);if(!i)return;let s=i.data;const o=i.index,u=s.search(/\s/);let l=s,c=!0;u!==-1&&(l=s.substring(0,u),s=s.substring(u+1).trimStart());const a=l;if(r){const h=l.indexOf(":");h!==-1&&(l=l.substr(h+1),c=l!==i.data.substr(h+1))}return{tagName:l,tagExp:s,closeIndex:o,attrExpPresent:c,rawTagName:a}}function rd(t,e,r){const n=r;let i=1;for(;r<t.length;r++)if(t[r]==="<")if(t[r+1]==="/"){const s=lt(t,">",r,`${e} is not closed`);if(t.substring(r+2,s).trim()===e&&(i--,i===0))return{tagContent:t.substring(n,r),i:s};r=s}else if(t[r+1]==="?")r=lt(t,"?>",r+1,"StopNode is not closed.");else if(t.substr(r+1,3)==="!--")r=lt(t,"-->",r+3,"StopNode is not closed.");else if(t.substr(r+1,2)==="![")r=lt(t,"]]>",r,"StopNode is not closed.")-2;else{const s=dn(t,r,">");s&&((s&&s.tagName)===e&&s.tagExp[s.tagExp.length-1]!=="/"&&i++,r=s.closeIndex)}}function pn(t,e,r){if(e&&typeof t=="string"){const n=t.trim();return n==="true"?!0:n==="false"?!1:$h(t,r)}else return xh(t)?t:""}function $s(t,e,r){const n=Number.parseInt(t,e);return n>=0&&n<=1114111?String.fromCodePoint(n):r+t+";"}const gn=Je.getMetaDataSymbol();function nd(t,e){return ks(t,e)}function ks(t,e,r){let n;const i={};for(let s=0;s<t.length;s++){const o=t[s],u=id(o);let l="";if(r===void 0?l=u:l=r+"."+u,u===e.textNodeName)n===void 0?n=o[u]:n+=""+o[u];else{if(u===void 0)continue;if(o[u]){let c=ks(o[u],e,l);const a=od(c,e);o[":@"]?sd(c,o[":@"],l,e):Object.keys(c).length===1&&c[e.textNodeName]!==void 0&&!e.alwaysCreateTextNode?c=c[e.textNodeName]:Object.keys(c).length===0&&(e.alwaysCreateTextNode?c[e.textNodeName]="":c=""),o[gn]!==void 0&&typeof c=="object"&&c!==null&&(c[gn]=o[gn]),i[u]!==void 0&&Object.prototype.hasOwnProperty.call(i,u)?(Array.isArray(i[u])||(i[u]=[i[u]]),i[u].push(c)):e.isArray(u,l,a)?i[u]=[c]:i[u]=c}}}return typeof n=="string"?n.length>0&&(i[e.textNodeName]=n):n!==void 0&&(i[e.textNodeName]=n),i}function id(t){const e=Object.keys(t);for(let r=0;r<e.length;r++){const n=e[r];if(n!==":@")return n}}function sd(t,e,r,n){if(e){const i=Object.keys(e),s=i.length;for(let o=0;o<s;o++){const u=i[o];n.isArray(u,r+"."+u,!0,!0)?t[u]=[e[u]]:t[u]=e[u]}}}function od(t,e){const{textNodeName:r}=e,n=Object.keys(t).length;return!!(n===0||n===1&&(t[r]||typeof t[r]=="boolean"||t[r]===0))}class js{constructor(e){this.externalEntities={},this.options=Fh(e)}parse(e,r){if(typeof e!="string"&&e.toString)e=e.toString();else if(typeof e!="string")throw new Error("XML data is accepted in String or Bytes[] form.");if(r){r===!0&&(r={});const s=vh(e,r);if(s!==!0)throw Error(`${s.err.msg}:${s.err.line}:${s.err.col}`)}const n=new zh(this.options);n.addExternalEntities(this.externalEntities);const i=n.parseXml(e);return this.options.preserveOrder||i===void 0?i:nd(i,this.options)}addEntity(e,r){if(r.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(e.indexOf("&")!==-1||e.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if(r==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=r}static getMetaDataSymbol(){return Je.getMetaDataSymbol()}}const ad=`
|
|
10
|
+
`;function ud(t,e){let r="";return e.format&&e.indentBy.length>0&&(r=ad),Ms(t,e,"",r)}function Ms(t,e,r,n){let i="",s=!1;if(!Array.isArray(t)){if(t!=null){let o=t.toString();return o=mn(o,e),o}return""}for(let o=0;o<t.length;o++){const u=t[o],l=ld(u);if(l===void 0)continue;let c="";if(r.length===0?c=l:c=`${r}.${l}`,l===e.textNodeName){let g=u[l];cd(c,e)||(g=e.tagValueProcessor(l,g),g=mn(g,e)),s&&(i+=n),i+=g,s=!1;continue}else if(l===e.cdataPropName){s&&(i+=n),i+=`<![CDATA[${u[l][0][e.textNodeName]}]]>`,s=!1;continue}else if(l===e.commentPropName){i+=n+`<!--${u[l][0][e.textNodeName]}-->`,s=!0;continue}else if(l[0]==="?"){const g=Vs(u[":@"],e),m=l==="?xml"?"":n;let b=u[l][0][e.textNodeName];b=b.length!==0?" "+b:"",i+=m+`<${l}${b}${g}?>`,s=!0;continue}let a=n;a!==""&&(a+=e.indentBy);const h=Vs(u[":@"],e),p=n+`<${l}${h}`,y=Ms(u[l],e,c,a);e.unpairedTags.indexOf(l)!==-1?e.suppressUnpairedNode?i+=p+">":i+=p+"/>":(!y||y.length===0)&&e.suppressEmptyNode?i+=p+"/>":y&&y.endsWith(">")?i+=p+`>${y}${n}</${l}>`:(i+=p+">",y&&n!==""&&(y.includes("/>")||y.includes("</"))?i+=n+e.indentBy+y+n:i+=y,i+=`</${l}>`),s=!0}return i}function ld(t){const e=Object.keys(t);for(let r=0;r<e.length;r++){const n=e[r];if(Object.prototype.hasOwnProperty.call(t,n)&&n!==":@")return n}}function Vs(t,e){let r="";if(t&&!e.ignoreAttributes)for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let i=e.attributeValueProcessor(n,t[n]);i=mn(i,e),i===!0&&e.suppressBooleanAttributes?r+=` ${n.substr(e.attributeNamePrefix.length)}`:r+=` ${n.substr(e.attributeNamePrefix.length)}="${i}"`}return r}function cd(t,e){t=t.substr(0,t.length-e.textNodeName.length-1);let r=t.substr(t.lastIndexOf(".")+1);for(let n in e.stopNodes)if(e.stopNodes[n]===t||e.stopNodes[n]==="*."+r)return!0;return!1}function mn(t,e){if(t&&t.length>0&&e.processEntities)for(let r=0;r<e.entities.length;r++){const n=e.entities[r];t=t.replace(n.regex,n.val)}return t}function fd(t){return typeof t=="function"?t:Array.isArray(t)?e=>{for(const r of t)if(typeof r=="string"&&e===r||r instanceof RegExp&&r.test(e))return!0}:()=>!1}const hd={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function ze(t){this.options=Object.assign({},hd,t),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=fd(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=gd),this.processTextOrObjNode=dd,this.options.format?(this.indentate=pd,this.tagEndChar=`>
|
|
11
|
+
`,this.newLine=`
|
|
12
|
+
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}ze.prototype.build=function(t){return this.options.preserveOrder?ud(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0,[]).val)},ze.prototype.j2x=function(t,e,r){let n="",i="";const s=r.join(".");for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o))if(typeof t[o]>"u")this.isAttribute(o)&&(i+="");else if(t[o]===null)this.isAttribute(o)||o===this.options.cdataPropName?i+="":o[0]==="?"?i+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(t[o]instanceof Date)i+=this.buildTextValNode(t[o],o,"",e);else if(typeof t[o]!="object"){const u=this.isAttribute(o);if(u&&!this.ignoreAttributesFn(u,s))n+=this.buildAttrPairStr(u,""+t[o]);else if(!u)if(o===this.options.textNodeName){let l=this.options.tagValueProcessor(o,""+t[o]);i+=this.replaceEntitiesValue(l)}else i+=this.buildTextValNode(t[o],o,"",e)}else if(Array.isArray(t[o])){const u=t[o].length;let l="",c="";for(let a=0;a<u;a++){const h=t[o][a];if(!(typeof h>"u"))if(h===null)o[0]==="?"?i+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(typeof h=="object")if(this.options.oneListGroup){const p=this.j2x(h,e+1,r.concat(o));l+=p.val,this.options.attributesGroupName&&h.hasOwnProperty(this.options.attributesGroupName)&&(c+=p.attrStr)}else l+=this.processTextOrObjNode(h,o,e,r);else if(this.options.oneListGroup){let p=this.options.tagValueProcessor(o,h);p=this.replaceEntitiesValue(p),l+=p}else l+=this.buildTextValNode(h,o,"",e)}this.options.oneListGroup&&(l=this.buildObjectNode(l,o,c,e)),i+=l}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){const u=Object.keys(t[o]),l=u.length;for(let c=0;c<l;c++)n+=this.buildAttrPairStr(u[c],""+t[o][u[c]])}else i+=this.processTextOrObjNode(t[o],o,e,r);return{attrStr:n,val:i}},ze.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&e==="true"?" "+t:" "+t+'="'+e+'"'};function dd(t,e,r,n){const i=this.j2x(t,r+1,n.concat(e));return t[this.options.textNodeName]!==void 0&&Object.keys(t).length===1?this.buildTextValNode(t[this.options.textNodeName],e,i.attrStr,r):this.buildObjectNode(i.val,e,i.attrStr,r)}ze.prototype.buildObjectNode=function(t,e,r,n){if(t==="")return e[0]==="?"?this.indentate(n)+"<"+e+r+"?"+this.tagEndChar:this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar;{let i="</"+e+this.tagEndChar,s="";return e[0]==="?"&&(s="?",i=""),(r||r==="")&&t.indexOf("<")===-1?this.indentate(n)+"<"+e+r+s+">"+t+i:this.options.commentPropName!==!1&&e===this.options.commentPropName&&s.length===0?this.indentate(n)+`<!--${t}-->`+this.newLine:this.indentate(n)+"<"+e+r+s+this.tagEndChar+t+this.indentate(n)+i}},ze.prototype.closeTag=function(t){let e="";return this.options.unpairedTags.indexOf(t)!==-1?this.options.suppressUnpairedNode||(e="/"):this.options.suppressEmptyNode?e="/":e=`></${t}`,e},ze.prototype.buildTextValNode=function(t,e,r,n){if(this.options.cdataPropName!==!1&&e===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${t}]]>`+this.newLine;if(this.options.commentPropName!==!1&&e===this.options.commentPropName)return this.indentate(n)+`<!--${t}-->`+this.newLine;if(e[0]==="?")return this.indentate(n)+"<"+e+r+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(e,t);return i=this.replaceEntitiesValue(i),i===""?this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+r+">"+i+"</"+e+this.tagEndChar}},ze.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const r=this.options.entities[e];t=t.replace(r.regex,r.val)}return t};function pd(t){return this.options.indentBy.repeat(t)}function gd(t){return t.startsWith(this.options.attributeNamePrefix)&&t!==this.options.textNodeName?t.substr(this.attrPrefixLen):!1}class md{axiosClient;baseURI;xmlParser;signingKey;ALGORITHM="sha512";TTL=1200;HASH_LENGTH=32;ITERATION_COUNT=1e4;constructor({axiosClient:e,baseURI:r}){this.axiosClient=e,this.baseURI=r,this.xmlParser=new js}async signUrl(e,r){const n=new URL(e);n.searchParams.set("OC-Credential",r),n.searchParams.set("OC-Date",new Date().toISOString()),n.searchParams.set("OC-Expires",this.TTL.toString()),n.searchParams.set("OC-Verb","GET");const i=await this.createHashedKey(n.toString());return n.searchParams.set("OC-Algo",`PBKDF2/${this.ITERATION_COUNT}-SHA512`),n.searchParams.set("OC-Signature",i),n.toString()}async getSignKey(){if(this.signingKey)return this.signingKey;const e=await this.axiosClient.get(k(this.baseURI,"ocs/v1.php/cloud/user/signing-key"),{headers:{"Content-Type":"application/x-www-form-urlencoded"}}),r=this.xmlParser.parse(e.data);return this.signingKey=r.ocs.data["signing-key"],this.signingKey}async createHashedKey(e){const r=await this.getSignKey();return mh(e,r,this.ITERATION_COUNT,this.HASH_LENGTH,this.ALGORITHM).toString("hex")}}const yd=(t,e)=>{const r=new URL(t);r.pathname=[...r.pathname.split("/"),"ocs","v1.php"].filter(Boolean).join("/");const n=r.href,i=Wf(n,e),s=new md({baseURI:t,axiosClient:e});return{getCapabilities:()=>i.getCapabilities(),signUrl:(o,u)=>s.signUrl(o,u)}},qe=(t,{fileId:e,path:r,name:n})=>{if(r!==void 0)return k(t.webDavPath,r);if(e!==void 0){if(fn(t))throw new Error("public spaces need a path provided");return k("spaces",e,n||"")}return t.webDavPath},bd=(t,e)=>({copyFiles(r,{path:n,fileId:i},s,{path:o,parentFolderId:u,name:l},{overwrite:c,...a}={}){const h=qe(r,{fileId:i,path:n}),p=qe(s,{fileId:u,path:o,name:l});return t.copy(h,p,{overwrite:c||!1,...a})}}),wd=(t,e,r)=>({async createFolder(n,{path:i,parentFolderId:s,folderName:o,fetchFolder:u=!0,...l}){const c=qe(n,{fileId:s,path:i,name:o});if(await t.mkcol(c),u)return e.getFileInfo(n,{path:i},l)}}),xd=(t,{axiosClient:e})=>({async getFileContents(r,{fileId:n,path:i},{responseType:s="text",noCache:o=!0,headers:u,...l}={}){try{const c=qe(r,{fileId:n,path:i}),a=await e.get(t.getFileUrl(c),{responseType:s,headers:{...o&&{"Cache-Control":"no-cache"},...u||{}},...l});return{response:a,body:a.data,headers:{ETag:a.headers.etag,"OC-ETag":a.headers["oc-etag"],"OC-FileId":a.headers["oc-fileid"]}}}catch(c){const{message:a,response:h}=c;throw new ji(a,h,h.status)}}}),Ed=(t,e)=>({async getFileInfo(r,n,i){return(await t.listFiles(r,n,{depth:0,...i})).resource}}),vd=(t,e,r,{axiosClient:n,baseUrl:i})=>({async getFileUrl(s,o,{disposition:u="attachment",version:l=null,username:c="",...a}){if(u==="inline"){const p=await e.getFileContents(s,o,{responseType:"blob",...a});return URL.createObjectURL(p.body)}if(l){if(!c)throw new Error("username is required for URL signing");const p=t.getFileUrl(k("meta",o.fileId,"v",l));return await yd(i,n).signUrl(p,c)}if(o.downloadURL)return o.downloadURL;const{downloadURL:h}=await r.getFileInfo(s,o,{davProperties:[C.DownloadURL]});return h},revokeUrl:s=>{s&&s.startsWith("blob:")&&URL.revokeObjectURL(s)}}),Td=(t,e)=>({getPublicFileUrl(r,n){return t.getFileUrl(k("public-files",n))}}),Ad=(t,e,r)=>({async listFiles(n,{path:i,fileId:s}={},{depth:o=1,davProperties:u,isTrash:l=!1,...c}={}){let a;if(fn(n)){a=await t.propfind(k(n.webDavPath,i),{depth:o,properties:u||st.PublicLink,...c}),a.forEach(g=>{g.filename=g.filename.split("/").slice(1).join("/")}),a.length===1&&(a[0].filename=k(n.id,i,{leadingSlash:!0})),a.forEach(g=>{g.filename=g.filename.split("/").slice(2).join("/")});const p=n.driveAlias.startsWith("ocm/")?"ocm":"public-link";if((!i||i==="/")&&o>0&&p==="ocm"&&a[0].props[C.PublicLinkItemType]==="file"&&(a=[{basename:n.fileId,type:"directory",filename:"",props:{}},...a]),!i){const[g,...m]=a;return{resource:zf({...g,id:n.id,driveAlias:n.driveAlias,webDavPath:n.webDavPath,publicLinkType:p}),children:m.map(b=>xt(b,t.extraProps))}}const y=a.map(g=>xt(g,t.extraProps));return{resource:y[0],children:y.slice(1)}}const h=async()=>{const p=await e.getPathForFileId(s);return this.listFiles(n,{path:p},{depth:o,davProperties:u})};try{let p="";if(l?p=hn(n.id):p=qe(n,{fileId:s,path:i}),a=await t.propfind(p,{depth:o,properties:u||st.Default,...c}),l)return{resource:xt(a[0],t.extraProps),children:a.slice(1).map(Df)};const y=a.map(m=>xt(m,t.extraProps)),g=s===n.id;return s&&!g&&y[0].fileId&&s!==y[0].fileId?h():{resource:y[0],children:y.slice(1)}}catch(p){if(p.statusCode===404&&s)return h();throw p}}}),Nd=(t,e)=>({moveFiles(r,{path:n,fileId:i},s,{path:o,parentFolderId:u,name:l},{overwrite:c,...a}={}){const h=qe(r,{fileId:i,path:n}),p=qe(s,{fileId:u,path:o,name:l});return t.move(h,p,{overwrite:c||!1,...a})}}),Pd=(t,e,r)=>({async putFileContents(n,{fileName:i,path:s,parentFolderId:o,content:u="",previousEntityTag:l="",overwrite:c,onUploadProgress:a=null,...h}){const p=qe(n,{fileId:o,name:i,path:s}),{result:y}=await t.put(p,u,{previousEntityTag:l,overwrite:c,onUploadProgress:a,...h});return e.getFileInfo(n,{fileId:y.headers.get("Oc-Fileid"),path:s})}}),Id=(t,e)=>({deleteFile(r,{path:n,...i}){return t.delete(k(r.webDavPath,n),i)}}),Sd=(t,e)=>({restoreFile(r,{id:n},{path:i},{overwrite:s,...o}={}){if(fn(r))return;const u=k(r.webDavPath,i);return t.move(k(r.webDavTrashPath,n),u,{overwrite:s,...o})}}),Od=(t,e)=>({restoreFileVersion(r,{parentFolderId:n,name:i,path:s},o,u={}){const l=qe(r,{path:s,fileId:n,name:i}),c=k("meta",n,"v",o,{leadingSlash:!0}),a=k("files",l,{leadingSlash:!0});return t.copy(c,a,u)}}),Cd=(t,e)=>({clearTrashBin(r,{id:n,...i}={}){let s=hn(r.id);return n&&(s=k(s,n)),t.delete(s,i)}}),Rd=(t,e)=>({async search(r,{davProperties:n=st.Default,searchLimit:i,...s}){const o="/spaces/",{range:u,results:l}=await t.report(o,{pattern:r,limit:i,properties:n,...s});return{resources:l.map(c=>({...xt(c,t.extraProps),highlights:c.props[C.Highlights]||""})),totalResults:u?parseInt(u?.split("/")[1]):null}}}),Fd=(t,e)=>({async getPathForFileId(r,n={}){return(await t.propfind(k("meta",r,{leadingSlash:!0}),{properties:[C.MetaPathForUser],...n}))[0].props[C.MetaPathForUser]}});var Ld={2:t=>{function e(i,s,o){i instanceof RegExp&&(i=r(i,o)),s instanceof RegExp&&(s=r(s,o));var u=n(i,s,o);return u&&{start:u[0],end:u[1],pre:o.slice(0,u[0]),body:o.slice(u[0]+i.length,u[1]),post:o.slice(u[1]+s.length)}}function r(i,s){var o=s.match(i);return o?o[0]:null}function n(i,s,o){var u,l,c,a,h,p=o.indexOf(i),y=o.indexOf(s,p+1),g=p;if(p>=0&&y>0){for(u=[],c=o.length;g>=0&&!h;)g==p?(u.push(g),p=o.indexOf(i,g+1)):u.length==1?h=[u.pop(),y]:((l=u.pop())<c&&(c=l,a=y),y=o.indexOf(s,g+1)),g=p<y&&p>=0?p:y;u.length&&(h=[c,a])}return h}t.exports=e,e.range=n},47:(t,e,r)=>{var n=r(410),i=function(c){return typeof c=="string"};function s(c,a){for(var h=[],p=0;p<c.length;p++){var y=c[p];y&&y!=="."&&(y===".."?h.length&&h[h.length-1]!==".."?h.pop():a&&h.push(".."):h.push(y))}return h}var o=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,u={};function l(c){return o.exec(c).slice(1)}u.resolve=function(){for(var c="",a=!1,h=arguments.length-1;h>=-1&&!a;h--){var p=h>=0?arguments[h]:Be.cwd();if(!i(p))throw new TypeError("Arguments to path.resolve must be strings");p&&(c=p+"/"+c,a=p.charAt(0)==="/")}return(a?"/":"")+(c=s(c.split("/"),!a).join("/"))||"."},u.normalize=function(c){var a=u.isAbsolute(c),h=c.substr(-1)==="/";return(c=s(c.split("/"),!a).join("/"))||a||(c="."),c&&h&&(c+="/"),(a?"/":"")+c},u.isAbsolute=function(c){return c.charAt(0)==="/"},u.join=function(){for(var c="",a=0;a<arguments.length;a++){var h=arguments[a];if(!i(h))throw new TypeError("Arguments to path.join must be strings");h&&(c+=c?"/"+h:h)}return u.normalize(c)},u.relative=function(c,a){function h(E){for(var T=0;T<E.length&&E[T]==="";T++);for(var P=E.length-1;P>=0&&E[P]==="";P--);return T>P?[]:E.slice(T,P+1)}c=u.resolve(c).substr(1),a=u.resolve(a).substr(1);for(var p=h(c.split("/")),y=h(a.split("/")),g=Math.min(p.length,y.length),m=g,b=0;b<g;b++)if(p[b]!==y[b]){m=b;break}var v=[];for(b=m;b<p.length;b++)v.push("..");return(v=v.concat(y.slice(m))).join("/")},u._makeLong=function(c){return c},u.dirname=function(c){var a=l(c),h=a[0],p=a[1];return h||p?(p&&(p=p.substr(0,p.length-1)),h+p):"."},u.basename=function(c,a){var h=l(c)[2];return a&&h.substr(-1*a.length)===a&&(h=h.substr(0,h.length-a.length)),h},u.extname=function(c){return l(c)[3]},u.format=function(c){if(!n.isObject(c))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof c);var a=c.root||"";if(!i(a))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof c.root);return(c.dir?c.dir+u.sep:"")+(c.base||"")},u.parse=function(c){if(!i(c))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof c);var a=l(c);if(!a||a.length!==4)throw new TypeError("Invalid path '"+c+"'");return a[1]=a[1]||"",a[2]=a[2]||"",a[3]=a[3]||"",{root:a[0],dir:a[0]+a[1].slice(0,a[1].length-1),base:a[2],ext:a[3],name:a[2].slice(0,a[2].length-a[3].length)}},u.sep="/",u.delimiter=":",t.exports=u},101:function(t,e,r){var n;t=r.nmd(t),(function(){var i=(t&&t.exports,typeof Re=="object"&&Re);i.global!==i&&i.window;var s=function(a){this.message=a};(s.prototype=new Error).name="InvalidCharacterError";var o=function(a){throw new s(a)},u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=/[\t\n\f\r ]/g,c={encode:function(a){a=String(a),/[^\0-\xFF]/.test(a)&&o("The string to be encoded contains characters outside of the Latin1 range.");for(var h,p,y,g,m=a.length%3,b="",v=-1,E=a.length-m;++v<E;)h=a.charCodeAt(v)<<16,p=a.charCodeAt(++v)<<8,y=a.charCodeAt(++v),b+=u.charAt((g=h+p+y)>>18&63)+u.charAt(g>>12&63)+u.charAt(g>>6&63)+u.charAt(63&g);return m==2?(h=a.charCodeAt(v)<<8,p=a.charCodeAt(++v),b+=u.charAt((g=h+p)>>10)+u.charAt(g>>4&63)+u.charAt(g<<2&63)+"="):m==1&&(g=a.charCodeAt(v),b+=u.charAt(g>>2)+u.charAt(g<<4&63)+"=="),b},decode:function(a){var h=(a=String(a).replace(l,"")).length;h%4==0&&(h=(a=a.replace(/==?$/,"")).length),(h%4==1||/[^+a-zA-Z0-9/]/.test(a))&&o("Invalid character: the string to be decoded is not correctly encoded.");for(var p,y,g=0,m="",b=-1;++b<h;)y=u.indexOf(a.charAt(b)),p=g%4?64*p+y:y,g++%4&&(m+=String.fromCharCode(255&p>>(-2*g&6)));return m},version:"1.0.0"};(n=(function(){return c}).call(e,r,e,t))===void 0||(t.exports=n)})()},135:t=>{function e(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}t.exports=function(r){return r!=null&&(e(r)||(function(n){return typeof n.readFloatLE=="function"&&typeof n.slice=="function"&&e(n.slice(0,0))})(r)||!!r._isBuffer)}},172:(t,e)=>{e.d=function(r){if(!r)return 0;for(var n=(r=r.toString()).length,i=r.length;i--;){var s=r.charCodeAt(i);56320<=s&&s<=57343&&i--,127<s&&s<=2047?n++:2047<s&&s<=65535&&(n+=2)}return n}},285:(t,e,r)=>{var n=r(2);t.exports=function(v){return v?(v.substr(0,2)==="{}"&&(v="\\{\\}"+v.substr(2)),b((function(E){return E.split("\\\\").join(i).split("\\{").join(s).split("\\}").join(o).split("\\,").join(u).split("\\.").join(l)})(v),!0).map(a)):[]};var i="\0SLASH"+Math.random()+"\0",s="\0OPEN"+Math.random()+"\0",o="\0CLOSE"+Math.random()+"\0",u="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function c(v){return parseInt(v,10)==v?parseInt(v,10):v.charCodeAt(0)}function a(v){return v.split(i).join("\\").split(s).join("{").split(o).join("}").split(u).join(",").split(l).join(".")}function h(v){if(!v)return[""];var E=[],T=n("{","}",v);if(!T)return v.split(",");var P=T.pre,S=T.body,F=T.post,L=P.split(",");L[L.length-1]+="{"+S+"}";var U=h(F);return F.length&&(L[L.length-1]+=U.shift(),L.push.apply(L,U)),E.push.apply(E,L),E}function p(v){return"{"+v+"}"}function y(v){return/^-?0\d/.test(v)}function g(v,E){return v<=E}function m(v,E){return v>=E}function b(v,E){var T=[],P=n("{","}",v);if(!P)return[v];var S=P.pre,F=P.post.length?b(P.post,!1):[""];if(/\$$/.test(P.pre))for(var L=0;L<F.length;L++){var U=S+"{"+P.body+"}"+F[L];T.push(U)}else{var _,j,pe=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(P.body),oe=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(P.body),R=pe||oe,le=P.body.indexOf(",")>=0;if(!R&&!le)return P.post.match(/,(?!,).*\}/)?b(v=P.pre+"{"+P.body+o+P.post):[v];if(R)_=P.body.split(/\.\./);else if((_=h(P.body)).length===1&&(_=b(_[0],!1).map(p)).length===1)return F.map((function(Lr){return P.pre+_[0]+Lr}));if(R){var Pe=c(_[0]),J=c(_[1]),ae=Math.max(_[0].length,_[1].length),K=_.length==3?Math.abs(c(_[2])):1,ke=g;J<Pe&&(K*=-1,ke=m);var Ze=_.some(y);j=[];for(var re=Pe;ke(re,J);re+=K){var ce;if(oe)(ce=String.fromCharCode(re))==="\\"&&(ce="");else if(ce=String(re),Ze){var Qe=ae-ce.length;if(Qe>0){var D=new Array(Qe+1).join("0");ce=re<0?"-"+D+ce.slice(1):D+ce}}j.push(ce)}}else{j=[];for(var z=0;z<_.length;z++)j.push.apply(j,b(_[z],!1))}for(z=0;z<j.length;z++)for(L=0;L<F.length;L++)U=S+j[z]+F[L],(!E||R||U)&&T.push(U)}return T}},298:t=>{var e,r;e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(n,i){return n<<i|n>>>32-i},rotr:function(n,i){return n<<32-i|n>>>i},endian:function(n){if(n.constructor==Number)return 16711935&r.rotl(n,8)|4278255360&r.rotl(n,24);for(var i=0;i<n.length;i++)n[i]=r.endian(n[i]);return n},randomBytes:function(n){for(var i=[];n>0;n--)i.push(Math.floor(256*Math.random()));return i},bytesToWords:function(n){for(var i=[],s=0,o=0;s<n.length;s++,o+=8)i[o>>>5]|=n[s]<<24-o%32;return i},wordsToBytes:function(n){for(var i=[],s=0;s<32*n.length;s+=8)i.push(n[s>>>5]>>>24-s%32&255);return i},bytesToHex:function(n){for(var i=[],s=0;s<n.length;s++)i.push((n[s]>>>4).toString(16)),i.push((15&n[s]).toString(16));return i.join("")},hexToBytes:function(n){for(var i=[],s=0;s<n.length;s+=2)i.push(parseInt(n.substr(s,2),16));return i},bytesToBase64:function(n){for(var i=[],s=0;s<n.length;s+=3)for(var o=n[s]<<16|n[s+1]<<8|n[s+2],u=0;u<4;u++)8*s+6*u<=8*n.length?i.push(e.charAt(o>>>6*(3-u)&63)):i.push("=");return i.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/gi,"");for(var i=[],s=0,o=0;s<n.length;o=++s%4)o!=0&&i.push((e.indexOf(n.charAt(s-1))&Math.pow(2,-2*o+8)-1)<<2*o|e.indexOf(n.charAt(s))>>>6-2*o);return i}},t.exports=r},345:()=>{},388:()=>{},410:()=>{},526:t=>{var e={utf8:{stringToBytes:function(r){return e.bin.stringToBytes(unescape(encodeURIComponent(r)))},bytesToString:function(r){return decodeURIComponent(escape(e.bin.bytesToString(r)))}},bin:{stringToBytes:function(r){for(var n=[],i=0;i<r.length;i++)n.push(255&r.charCodeAt(i));return n},bytesToString:function(r){for(var n=[],i=0;i<r.length;i++)n.push(String.fromCharCode(r[i]));return n.join("")}}};t.exports=e},542:(t,e,r)=>{(function(){var n=r(298),i=r(526).utf8,s=r(135),o=r(526).bin,u=function(l,c){l.constructor==String?l=c&&c.encoding==="binary"?o.stringToBytes(l):i.stringToBytes(l):s(l)?l=Array.prototype.slice.call(l,0):Array.isArray(l)||l.constructor===Uint8Array||(l=l.toString());for(var a=n.bytesToWords(l),h=8*l.length,p=1732584193,y=-271733879,g=-1732584194,m=271733878,b=0;b<a.length;b++)a[b]=16711935&(a[b]<<8|a[b]>>>24)|4278255360&(a[b]<<24|a[b]>>>8);a[h>>>5]|=128<<h%32,a[14+(h+64>>>9<<4)]=h;var v=u._ff,E=u._gg,T=u._hh,P=u._ii;for(b=0;b<a.length;b+=16){var S=p,F=y,L=g,U=m;p=v(p,y,g,m,a[b+0],7,-680876936),m=v(m,p,y,g,a[b+1],12,-389564586),g=v(g,m,p,y,a[b+2],17,606105819),y=v(y,g,m,p,a[b+3],22,-1044525330),p=v(p,y,g,m,a[b+4],7,-176418897),m=v(m,p,y,g,a[b+5],12,1200080426),g=v(g,m,p,y,a[b+6],17,-1473231341),y=v(y,g,m,p,a[b+7],22,-45705983),p=v(p,y,g,m,a[b+8],7,1770035416),m=v(m,p,y,g,a[b+9],12,-1958414417),g=v(g,m,p,y,a[b+10],17,-42063),y=v(y,g,m,p,a[b+11],22,-1990404162),p=v(p,y,g,m,a[b+12],7,1804603682),m=v(m,p,y,g,a[b+13],12,-40341101),g=v(g,m,p,y,a[b+14],17,-1502002290),p=E(p,y=v(y,g,m,p,a[b+15],22,1236535329),g,m,a[b+1],5,-165796510),m=E(m,p,y,g,a[b+6],9,-1069501632),g=E(g,m,p,y,a[b+11],14,643717713),y=E(y,g,m,p,a[b+0],20,-373897302),p=E(p,y,g,m,a[b+5],5,-701558691),m=E(m,p,y,g,a[b+10],9,38016083),g=E(g,m,p,y,a[b+15],14,-660478335),y=E(y,g,m,p,a[b+4],20,-405537848),p=E(p,y,g,m,a[b+9],5,568446438),m=E(m,p,y,g,a[b+14],9,-1019803690),g=E(g,m,p,y,a[b+3],14,-187363961),y=E(y,g,m,p,a[b+8],20,1163531501),p=E(p,y,g,m,a[b+13],5,-1444681467),m=E(m,p,y,g,a[b+2],9,-51403784),g=E(g,m,p,y,a[b+7],14,1735328473),p=T(p,y=E(y,g,m,p,a[b+12],20,-1926607734),g,m,a[b+5],4,-378558),m=T(m,p,y,g,a[b+8],11,-2022574463),g=T(g,m,p,y,a[b+11],16,1839030562),y=T(y,g,m,p,a[b+14],23,-35309556),p=T(p,y,g,m,a[b+1],4,-1530992060),m=T(m,p,y,g,a[b+4],11,1272893353),g=T(g,m,p,y,a[b+7],16,-155497632),y=T(y,g,m,p,a[b+10],23,-1094730640),p=T(p,y,g,m,a[b+13],4,681279174),m=T(m,p,y,g,a[b+0],11,-358537222),g=T(g,m,p,y,a[b+3],16,-722521979),y=T(y,g,m,p,a[b+6],23,76029189),p=T(p,y,g,m,a[b+9],4,-640364487),m=T(m,p,y,g,a[b+12],11,-421815835),g=T(g,m,p,y,a[b+15],16,530742520),p=P(p,y=T(y,g,m,p,a[b+2],23,-995338651),g,m,a[b+0],6,-198630844),m=P(m,p,y,g,a[b+7],10,1126891415),g=P(g,m,p,y,a[b+14],15,-1416354905),y=P(y,g,m,p,a[b+5],21,-57434055),p=P(p,y,g,m,a[b+12],6,1700485571),m=P(m,p,y,g,a[b+3],10,-1894986606),g=P(g,m,p,y,a[b+10],15,-1051523),y=P(y,g,m,p,a[b+1],21,-2054922799),p=P(p,y,g,m,a[b+8],6,1873313359),m=P(m,p,y,g,a[b+15],10,-30611744),g=P(g,m,p,y,a[b+6],15,-1560198380),y=P(y,g,m,p,a[b+13],21,1309151649),p=P(p,y,g,m,a[b+4],6,-145523070),m=P(m,p,y,g,a[b+11],10,-1120210379),g=P(g,m,p,y,a[b+2],15,718787259),y=P(y,g,m,p,a[b+9],21,-343485551),p=p+S>>>0,y=y+F>>>0,g=g+L>>>0,m=m+U>>>0}return n.endian([p,y,g,m])};u._ff=function(l,c,a,h,p,y,g){var m=l+(c&a|~c&h)+(p>>>0)+g;return(m<<y|m>>>32-y)+c},u._gg=function(l,c,a,h,p,y,g){var m=l+(c&h|a&~h)+(p>>>0)+g;return(m<<y|m>>>32-y)+c},u._hh=function(l,c,a,h,p,y,g){var m=l+(c^a^h)+(p>>>0)+g;return(m<<y|m>>>32-y)+c},u._ii=function(l,c,a,h,p,y,g){var m=l+(a^(c|~h))+(p>>>0)+g;return(m<<y|m>>>32-y)+c},u._blocksize=16,u._digestsize=16,t.exports=function(l,c){if(l==null)throw new Error("Illegal argument "+l);var a=n.wordsToBytes(u(l,c));return c&&c.asBytes?a:c&&c.asString?o.bytesToString(a):n.bytesToHex(a)}})()},647:(t,e)=>{var r=Object.prototype.hasOwnProperty;function n(s){try{return decodeURIComponent(s.replace(/\+/g," "))}catch{return null}}function i(s){try{return encodeURIComponent(s)}catch{return null}}e.stringify=function(s,o){o=o||"";var u,l,c=[];for(l in typeof o!="string"&&(o="?"),s)if(r.call(s,l)){if((u=s[l])||u!=null&&!isNaN(u)||(u=""),l=i(l),u=i(u),l===null||u===null)continue;c.push(l+"="+u)}return c.length?o+c.join("&"):""},e.parse=function(s){for(var o,u=/([^=?#&]+)=?([^&]*)/g,l={};o=u.exec(s);){var c=n(o[1]),a=n(o[2]);c===null||a===null||c in l||(l[c]=a)}return l}},670:t=>{t.exports=function(e,r){if(r=r.split(":")[0],!(e=+e))return!1;switch(r){case"http":case"ws":return e!==80;case"https":case"wss":return e!==443;case"ftp":return e!==21;case"gopher":return e!==70;case"file":return!1}return e!==0}},737:(t,e,r)=>{var n=r(670),i=r(647),s=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o=/[\n\r\t]/g,u=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,l=/:\d+$/,c=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,a=/^[a-zA-Z]:/;function h(E){return(E||"").toString().replace(s,"")}var p=[["#","hash"],["?","query"],function(E,T){return m(T.protocol)?E.replace(/\\/g,"/"):E},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],y={hash:1,query:1};function g(E){var T,P=(typeof window<"u"?window:typeof Re<"u"?Re:typeof self<"u"?self:{}).location||{},S={},F=typeof(E=E||P);if(E.protocol==="blob:")S=new v(unescape(E.pathname),{});else if(F==="string")for(T in S=new v(E,{}),y)delete S[T];else if(F==="object"){for(T in E)T in y||(S[T]=E[T]);S.slashes===void 0&&(S.slashes=u.test(E.href))}return S}function m(E){return E==="file:"||E==="ftp:"||E==="http:"||E==="https:"||E==="ws:"||E==="wss:"}function b(E,T){E=(E=h(E)).replace(o,""),T=T||{};var P,S=c.exec(E),F=S[1]?S[1].toLowerCase():"",L=!!S[2],U=!!S[3],_=0;return L?U?(P=S[2]+S[3]+S[4],_=S[2].length+S[3].length):(P=S[2]+S[4],_=S[2].length):U?(P=S[3]+S[4],_=S[3].length):P=S[4],F==="file:"?_>=2&&(P=P.slice(2)):m(F)?P=S[4]:F?L&&(P=P.slice(2)):_>=2&&m(T.protocol)&&(P=S[4]),{protocol:F,slashes:L||m(F),slashesCount:_,rest:P}}function v(E,T,P){if(E=(E=h(E)).replace(o,""),!(this instanceof v))return new v(E,T,P);var S,F,L,U,_,j,pe=p.slice(),oe=typeof T,R=this,le=0;for(oe!=="object"&&oe!=="string"&&(P=T,T=null),P&&typeof P!="function"&&(P=i.parse),S=!(F=b(E||"",T=g(T))).protocol&&!F.slashes,R.slashes=F.slashes||S&&T.slashes,R.protocol=F.protocol||T.protocol||"",E=F.rest,(F.protocol==="file:"&&(F.slashesCount!==2||a.test(E))||!F.slashes&&(F.protocol||F.slashesCount<2||!m(R.protocol)))&&(pe[3]=[/(.*)/,"pathname"]);le<pe.length;le++)typeof(U=pe[le])!="function"?(L=U[0],j=U[1],L!=L?R[j]=E:typeof L=="string"?~(_=L==="@"?E.lastIndexOf(L):E.indexOf(L))&&(typeof U[2]=="number"?(R[j]=E.slice(0,_),E=E.slice(_+U[2])):(R[j]=E.slice(_),E=E.slice(0,_))):(_=L.exec(E))&&(R[j]=_[1],E=E.slice(0,_.index)),R[j]=R[j]||S&&U[3]&&T[j]||"",U[4]&&(R[j]=R[j].toLowerCase())):E=U(E,R);P&&(R.query=P(R.query)),S&&T.slashes&&R.pathname.charAt(0)!=="/"&&(R.pathname!==""||T.pathname!=="")&&(R.pathname=(function(Pe,J){if(Pe==="")return J;for(var ae=(J||"/").split("/").slice(0,-1).concat(Pe.split("/")),K=ae.length,ke=ae[K-1],Ze=!1,re=0;K--;)ae[K]==="."?ae.splice(K,1):ae[K]===".."?(ae.splice(K,1),re++):re&&(K===0&&(Ze=!0),ae.splice(K,1),re--);return Ze&&ae.unshift(""),ke!=="."&&ke!==".."||ae.push(""),ae.join("/")})(R.pathname,T.pathname)),R.pathname.charAt(0)!=="/"&&m(R.protocol)&&(R.pathname="/"+R.pathname),n(R.port,R.protocol)||(R.host=R.hostname,R.port=""),R.username=R.password="",R.auth&&(~(_=R.auth.indexOf(":"))?(R.username=R.auth.slice(0,_),R.username=encodeURIComponent(decodeURIComponent(R.username)),R.password=R.auth.slice(_+1),R.password=encodeURIComponent(decodeURIComponent(R.password))):R.username=encodeURIComponent(decodeURIComponent(R.auth)),R.auth=R.password?R.username+":"+R.password:R.username),R.origin=R.protocol!=="file:"&&m(R.protocol)&&R.host?R.protocol+"//"+R.host:"null",R.href=R.toString()}v.prototype={set:function(E,T,P){var S=this;switch(E){case"query":typeof T=="string"&&T.length&&(T=(P||i.parse)(T)),S[E]=T;break;case"port":S[E]=T,n(T,S.protocol)?T&&(S.host=S.hostname+":"+T):(S.host=S.hostname,S[E]="");break;case"hostname":S[E]=T,S.port&&(T+=":"+S.port),S.host=T;break;case"host":S[E]=T,l.test(T)?(T=T.split(":"),S.port=T.pop(),S.hostname=T.join(":")):(S.hostname=T,S.port="");break;case"protocol":S.protocol=T.toLowerCase(),S.slashes=!P;break;case"pathname":case"hash":if(T){var F=E==="pathname"?"/":"#";S[E]=T.charAt(0)!==F?F+T:T}else S[E]=T;break;case"username":case"password":S[E]=encodeURIComponent(T);break;case"auth":var L=T.indexOf(":");~L?(S.username=T.slice(0,L),S.username=encodeURIComponent(decodeURIComponent(S.username)),S.password=T.slice(L+1),S.password=encodeURIComponent(decodeURIComponent(S.password))):S.username=encodeURIComponent(decodeURIComponent(T))}for(var U=0;U<p.length;U++){var _=p[U];_[4]&&(S[_[1]]=S[_[1]].toLowerCase())}return S.auth=S.password?S.username+":"+S.password:S.username,S.origin=S.protocol!=="file:"&&m(S.protocol)&&S.host?S.protocol+"//"+S.host:"null",S.href=S.toString(),S},toString:function(E){E&&typeof E=="function"||(E=i.stringify);var T,P=this,S=P.host,F=P.protocol;F&&F.charAt(F.length-1)!==":"&&(F+=":");var L=F+(P.protocol&&P.slashes||m(P.protocol)?"//":"");return P.username?(L+=P.username,P.password&&(L+=":"+P.password),L+="@"):P.password?(L+=":"+P.password,L+="@"):P.protocol!=="file:"&&m(P.protocol)&&!S&&P.pathname!=="/"&&(L+="@"),(S[S.length-1]===":"||l.test(P.hostname)&&!P.port)&&(S+=":"),L+=S+P.pathname,(T=typeof P.query=="object"?E(P.query):P.query)&&(L+=T.charAt(0)!=="?"?"?"+T:T),P.hash&&(L+=P.hash),L}},v.extractProtocol=b,v.location=g,v.trimLeft=h,v.qs=i,t.exports=v},800:()=>{},805:()=>{},829:t=>{function e(c){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e(c)}function r(c){var a=typeof Map=="function"?new Map:void 0;return r=function(h){if(h===null||(p=h,Function.toString.call(p).indexOf("[native code]")===-1))return h;var p;if(typeof h!="function")throw new TypeError("Super expression must either be null or a function");if(a!==void 0){if(a.has(h))return a.get(h);a.set(h,y)}function y(){return n(h,arguments,s(this).constructor)}return y.prototype=Object.create(h.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),i(y,h)},r(c)}function n(c,a,h){return n=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch{return!1}})()?Reflect.construct:function(p,y,g){var m=[null];m.push.apply(m,y);var b=new(Function.bind.apply(p,m));return g&&i(b,g.prototype),b},n.apply(null,arguments)}function i(c,a){return i=Object.setPrototypeOf||function(h,p){return h.__proto__=p,h},i(c,a)}function s(c){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)},s(c)}var o=(function(c){function a(h){var p;return(function(y,g){if(!(y instanceof g))throw new TypeError("Cannot call a class as a function")})(this,a),(p=(function(y,g){return!g||e(g)!=="object"&&typeof g!="function"?(function(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m})(y):g})(this,s(a).call(this,h))).name="ObjectPrototypeMutationError",p}return(function(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");h.prototype=Object.create(p&&p.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),p&&i(h,p)})(a,c),a})(r(Error));function u(c,a){for(var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},p=a.split("."),y=p.length,g=function(v){var E=p[v];if(!c)return{v:void 0};if(E==="+"){if(Array.isArray(c))return{v:c.map((function(P,S){var F=p.slice(v+1);return F.length>0?u(P,F.join("."),h):h(c,S,p,v)}))};var T=p.slice(0,v).join(".");throw new Error("Object at wildcard (".concat(T,") is not an array"))}c=h(c,E,p,v)},m=0;m<y;m++){var b=g(m);if(e(b)==="object")return b.v}return c}function l(c,a){return c.length===a+1}t.exports={set:function(c,a,h){if(e(c)!="object"||c===null||a===void 0)return c;if(typeof a=="number")return c[a]=h,c[a];try{return u(c,a,(function(p,y,g,m){if(p===Reflect.getPrototypeOf({}))throw new o("Attempting to mutate Object.prototype");if(!p[y]){var b=Number.isInteger(Number(g[m+1])),v=g[m+1]==="+";p[y]=b||v?[]:{}}return l(g,m)&&(p[y]=h),p[y]}))}catch(p){if(p instanceof o)throw p;return c}},get:function(c,a){if(e(c)!="object"||c===null||a===void 0)return c;if(typeof a=="number")return c[a];try{return u(c,a,(function(h,p){return h[p]}))}catch{return c}},has:function(c,a){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(e(c)!="object"||c===null||a===void 0)return!1;if(typeof a=="number")return a in c;try{var p=!1;return u(c,a,(function(y,g,m,b){if(!l(m,b))return y&&y[g];p=h.own?y.hasOwnProperty(g):g in y})),p}catch{return!1}},hasOwn:function(c,a,h){return this.has(c,a,h||{own:!0})},isIn:function(c,a,h){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(e(c)!="object"||c===null||a===void 0)return!1;try{var y=!1,g=!1;return u(c,a,(function(m,b,v,E){return y=y||m===h||!!m&&m[b]===h,g=l(v,E)&&e(m)==="object"&&b in m,m&&m[b]})),p.validPath?y&&g:y}catch{return!1}},ObjectPrototypeMutationError:o}}},Ds={};function H(t){var e=Ds[t];if(e!==void 0)return e.exports;var r=Ds[t]={id:t,loaded:!1,exports:{}};return Ld[t].call(r.exports,r,r.exports,H),r.loaded=!0,r.exports}H.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return H.d(e,{a:e}),e},H.d=(t,e)=>{for(var r in e)H.o(e,r)&&!H.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},H.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),H.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var _d=H(737),Ud=H.n(_d);function yn(t){if(!bn(t))throw new Error("Parameter was not an error")}function bn(t){return!!t&&typeof t=="object"&&(e=t,Object.prototype.toString.call(e)==="[object Error]")||t instanceof Error;var e}class me extends Error{constructor(e,r){const n=[...arguments],{options:i,shortMessage:s}=(function(u){let l,c="";if(u.length===0)l={};else if(bn(u[0]))l={cause:u[0]},c=u.slice(1).join(" ")||"";else if(u[0]&&typeof u[0]=="object")l=Object.assign({},u[0]),c=u.slice(1).join(" ")||"";else{if(typeof u[0]!="string")throw new Error("Invalid arguments passed to Layerr");l={},c=c=u.join(" ")||""}return{options:l,shortMessage:c}})(n);let o=s;if(i.cause&&(o=`${o}: ${i.cause.message}`),super(o),this.message=o,i.name&&typeof i.name=="string"?this.name=i.name:this.name="Layerr",i.cause&&Object.defineProperty(this,"_cause",{value:i.cause}),Object.defineProperty(this,"_info",{value:{}}),i.info&&typeof i.info=="object"&&Object.assign(this._info,i.info),Error.captureStackTrace){const u=i.constructorOpt||this.constructor;Error.captureStackTrace(this,u)}}static cause(e){return yn(e),e._cause&&bn(e._cause)?e._cause:null}static fullStack(e){yn(e);const r=me.cause(e);return r?`${e.stack}
|
|
13
|
+
caused by: ${me.fullStack(r)}`:e.stack??""}static info(e){yn(e);const r={},n=me.cause(e);return n&&Object.assign(r,me.info(n)),e._info&&Object.assign(r,e._info),r}toString(){let e=this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(e=`${e}: ${this.message}`),e}}var Bd=H(47),Ar=H.n(Bd);const Hs="__PATH_SEPARATOR_POSIX__",zs="__PATH_SEPARATOR_WINDOWS__";function W(t){try{const e=t.replace(/\//g,Hs).replace(/\\\\/g,zs);return encodeURIComponent(e).split(zs).join("\\\\").split(Hs).join("/")}catch(e){throw new me(e,"Failed encoding path")}}function qs(t){return t.startsWith("/")?t:"/"+t}function Dt(t){let e=t;return e[0]!=="/"&&(e="/"+e),/^.+\/$/.test(e)&&(e=e.substr(0,e.length-1)),e}function $d(t){let e=new(Ud())(t).pathname;return e.length<=0&&(e="/"),Dt(e)}function G(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return(function(){return(function(n){var i=[];if(n.length===0)return"";if(typeof n[0]!="string")throw new TypeError("Url must be a string. Received "+n[0]);if(n[0].match(/^[^/:]+:\/*$/)&&n.length>1){var s=n.shift();n[0]=s+n[0]}n[0].match(/^file:\/\/\//)?n[0]=n[0].replace(/^([^/:]+):\/*/,"$1:///"):n[0]=n[0].replace(/^([^/:]+):\/*/,"$1://");for(var o=0;o<n.length;o++){var u=n[o];if(typeof u!="string")throw new TypeError("Url must be a string. Received "+u);u!==""&&(o>0&&(u=u.replace(/^[\/]+/,"")),u=o<n.length-1?u.replace(/[\/]+$/,""):u.replace(/[\/]+$/,"/"),i.push(u))}var l=i.join("/"),c=(l=l.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return c.shift()+(c.length>0?"?":"")+c.join("&")})(typeof arguments[0]=="object"?arguments[0]:[].slice.call(arguments))})(e.reduce(((n,i,s)=>((s===0||i!=="/"||i==="/"&&n[n.length-1]!=="/")&&n.push(i),n)),[]))}var kd=H(542),Ht=H.n(kd);function Ws(t,e){const r=t.url.replace("//",""),n=r.indexOf("/")==-1?"/":r.slice(r.indexOf("/")),i=t.method?t.method.toUpperCase():"GET",s=!!/(^|,)\s*auth\s*($|,)/.test(e.qop)&&"auth",o=`00000000${e.nc}`.slice(-8),u=(function(p,y,g,m,b,v,E){const T=E||Ht()(`${y}:${g}:${m}`);return p&&p.toLowerCase()==="md5-sess"?Ht()(`${T}:${b}:${v}`):T})(e.algorithm,e.username,e.realm,e.password,e.nonce,e.cnonce,e.ha1),l=Ht()(`${i}:${n}`),c=s?Ht()(`${u}:${e.nonce}:${o}:${e.cnonce}:${s}:${l}`):Ht()(`${u}:${e.nonce}:${l}`),a={username:e.username,realm:e.realm,nonce:e.nonce,uri:n,qop:s,response:c,nc:o,cnonce:e.cnonce,algorithm:e.algorithm,opaque:e.opaque},h=[];for(const p in a)a[p]&&(p==="qop"||p==="nc"||p==="algorithm"?h.push(`${p}=${a[p]}`):h.push(`${p}="${a[p]}"`));return`Digest ${h.join(", ")}`}function Gs(t){return(t.headers&&t.headers.get("www-authenticate")||"").split(/\s/)[0].toLowerCase()==="digest"}var jd=H(101),Ks=H.n(jd);function Js(t){return Ks().decode(t)}function Ys(t,e){var r;return`Basic ${r=`${t}:${e}`,Ks().encode(r)}`}const Xs=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:typeof window<"u"?window:globalThis,Md=Xs.fetch.bind(Xs);let Te=(function(t){return t.Auto="auto",t.Digest="digest",t.None="none",t.Password="password",t.Token="token",t})({}),Ye=(function(t){return t.DataTypeNoLength="data-type-no-length",t.InvalidAuthType="invalid-auth-type",t.InvalidOutputFormat="invalid-output-format",t.LinkUnsupportedAuthType="link-unsupported-auth",t.InvalidUpdateRange="invalid-update-range",t.NotSupported="not-supported",t})({});function Zs(t,e,r,n,i){switch(t.authType){case Te.Auto:e&&r&&(t.headers.Authorization=Ys(e,r));break;case Te.Digest:t.digest=(function(o,u,l){return{username:o,password:u,ha1:l,nc:0,algorithm:"md5",hasDigestAuth:!1}})(e,r,i);break;case Te.None:break;case Te.Password:t.headers.Authorization=Ys(e,r);break;case Te.Token:t.headers.Authorization=`${(s=n).token_type} ${s.access_token}`;break;default:throw new me({info:{code:Ye.InvalidAuthType}},`Invalid auth type: ${t.authType}`)}var s}H(345),H(800);const Qs="@@HOTPATCHER",Vd=()=>{};function wn(t){return{original:t,methods:[t],final:!1}}class Dd{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=Qs}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(e){this.configuration.getEmptyAction=e}control(e){let r=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!e||e.__type__!==Qs)throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");return Object.keys(e.configuration.registry).forEach((n=>{this.configuration.registry.hasOwnProperty(n)?r&&(this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])):this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])})),e._configuration=this.configuration,this}execute(e){const r=this.get(e)||Vd;for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];return r(...i)}get(e){const r=this.configuration.registry[e];if(!r)switch(this.getEmptyAction){case"null":return null;case"throw":throw new Error(`Failed handling method request: No method provided for override: ${e}`);default:throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`)}return(function(){for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];if(i.length===0)throw new Error("Failed creating sequence: No functions provided");return function(){for(var o=arguments.length,u=new Array(o),l=0;l<o;l++)u[l]=arguments[l];let c=u;const a=this;for(;i.length>0;)c=[i.shift().apply(a,c)];return c[0]}})(...r.methods)}isPatched(e){return!!this.configuration.registry[e]}patch(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{chain:i=!1}=n;if(this.configuration.registry[e]&&this.configuration.registry[e].final)throw new Error(`Failed patching '${e}': Method marked as being final`);if(typeof r!="function")throw new Error(`Failed patching '${e}': Provided method is not a function`);if(i)this.configuration.registry[e]?this.configuration.registry[e].methods.push(r):this.configuration.registry[e]=wn(r);else if(this.isPatched(e)){const{original:s}=this.configuration.registry[e];this.configuration.registry[e]=Object.assign(wn(r),{original:s})}else this.configuration.registry[e]=wn(r);return this}patchInline(e,r){this.isPatched(e)||this.patch(e,r);for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];return this.execute(e,...i)}plugin(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return n.forEach((s=>{this.patch(e,s,{chain:!0})})),this}restore(e){if(!this.isPatched(e))throw new Error(`Failed restoring method: No method present for key: ${e}`);if(typeof this.configuration.registry[e].original!="function")throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${e}`);return this.configuration.registry[e].methods=[this.configuration.registry[e].original],this}setFinal(e){if(!this.configuration.registry.hasOwnProperty(e))throw new Error(`Failed marking '${e}' as final: No method found for key`);return this.configuration.registry[e].final=!0,this}}let xn=null;function Hd(){return xn||(xn=new Dd),xn}function Nr(t){return(function(e){if(typeof e!="object"||e===null||Object.prototype.toString.call(e)!="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;let r=e;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r})(t)?Object.assign({},t):Object.setPrototypeOf(Object.assign({},t),Object.getPrototypeOf(t))}function eo(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];let n=null,i=[...e];for(;i.length>0;){const s=i.shift();n=n?to(n,s):Nr(s)}return n}function to(t,e){const r=Nr(t);return Object.keys(e).forEach((n=>{r.hasOwnProperty(n)?Array.isArray(e[n])?r[n]=Array.isArray(r[n])?[...r[n],...e[n]]:[...e[n]]:typeof e[n]=="object"&&e[n]?r[n]=typeof r[n]=="object"&&r[n]?to(r[n],e[n]):Nr(e[n]):r[n]=e[n]:r[n]=e[n]})),r}function zd(t){const e={};for(const r of t.keys())e[r]=t.get(r);return e}function En(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];if(e.length===0)return{};const n={};return e.reduce(((i,s)=>(Object.keys(s).forEach((o=>{const u=o.toLowerCase();n.hasOwnProperty(u)?i[n[u]]=s[o]:(n[u]=o,i[o]=s[o])})),i)),{})}H(805);const qd=typeof ArrayBuffer=="function",{toString:Wd}=Object.prototype;function ro(t){return qd&&(t instanceof ArrayBuffer||Wd.call(t)==="[object ArrayBuffer]")}function no(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function vn(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}}function Tn(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const io=vn((function(t){const e=t._digest;return delete t._digest,e.hasDigestAuth&&(t=eo(t,{headers:{Authorization:Ws(t,e)}})),Tn(Pr(t),(function(r){let n=!1;return i=function(o){return n?o:r},(s=(function(){if(r.status==401)return e.hasDigestAuth=(function(o,u){if(!Gs(o))return!1;const l=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){const c=o.headers&&o.headers.get("www-authenticate")||"",a=l.exec(c);if(!a)break;u[a[1]]=a[2]||a[3]}return u.nc+=1,u.cnonce=(function(){let c="";for(let a=0;a<32;++a)c=`${c}${"abcdef0123456789"[Math.floor(16*Math.random())]}`;return c})(),!0})(r,e),(function(){if(e.hasDigestAuth)return Tn(Pr(t=eo(t,{headers:{Authorization:Ws(t,e)}})),(function(o){return o.status==401?e.hasDigestAuth=!1:e.nc++,n=!0,o}))})();e.nc++})())&&s.then?s.then(i):i(s);var i,s}))})),Gd=vn((function(t,e){return Tn(Pr(t),(function(r){return r.ok?(e.authType=Te.Password,r):r.status==401&&Gs(r)?(e.authType=Te.Digest,Zs(e,e.username,e.password,void 0,void 0),t._digest=e.digest,io(t)):r}))})),ne=vn((function(t,e){return e.authType===Te.Auto?Gd(t,e):t._digest?io(t):Pr(t)}));function ie(t,e,r){const n=Nr(t);return n.headers=En(e.headers,n.headers||{},r.headers||{}),r.data!==void 0&&(n.data=r.data),r.signal&&(n.signal=r.signal),e.httpAgent&&(n.httpAgent=e.httpAgent),e.httpsAgent&&(n.httpsAgent=e.httpsAgent),e.digest&&(n._digest=e.digest),typeof e.withCredentials=="boolean"&&(n.withCredentials=e.withCredentials),n}function Pr(t){const e=Hd();return e.patchInline("request",(r=>e.patchInline("fetch",Md,r.url,(function(n){let i={};const s={method:n.method};if(n.headers&&(i=En(i,n.headers)),n.data!==void 0){const[o,u]=(function(l){if(typeof l=="string")return[l,{}];if(no(l))return[l,{}];if(ro(l))return[l,{}];if(l&&typeof l=="object")return[JSON.stringify(l),{"content-type":"application/json"}];throw new Error("Unable to convert request body: Unexpected body type: "+typeof l)})(n.data);s.body=o,i=En(i,u)}return n.signal&&(s.signal=n.signal),n.withCredentials&&(s.credentials="include"),s.headers=i,s})(r))),t)}var Kd=H(285);const Ir=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},Jd={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},zt=t=>t.replace(/[[\]\\-]/g,"\\$&"),so=t=>t.join(""),Yd=(t,e)=>{const r=e;if(t.charAt(r)!=="[")throw new Error("not in a brace expression");const n=[],i=[];let s=r+1,o=!1,u=!1,l=!1,c=!1,a=r,h="";e:for(;s<t.length;){const m=t.charAt(s);if(m!=="!"&&m!=="^"||s!==r+1){if(m==="]"&&o&&!l){a=s+1;break}if(o=!0,m!=="\\"||l){if(m==="["&&!l){for(const[b,[v,E,T]]of Object.entries(Jd))if(t.startsWith(b,s)){if(h)return["$.",!1,t.length-r,!0];s+=b.length,T?i.push(v):n.push(v),u=u||E;continue e}}l=!1,h?(m>h?n.push(zt(h)+"-"+zt(m)):m===h&&n.push(zt(m)),h="",s++):t.startsWith("-]",s+1)?(n.push(zt(m+"-")),s+=2):t.startsWith("-",s+1)?(h=m,s+=2):(n.push(zt(m)),s++)}else l=!0,s++}else c=!0,s++}if(a<s)return["",!1,0,!1];if(!n.length&&!i.length)return["$.",!1,t.length-r,!0];if(i.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!c)return[(p=n[0].length===2?n[0].slice(-1):n[0],p.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,a-r,!1];var p;const y="["+(c?"^":"")+so(n)+"]",g="["+(c?"":"^")+so(i)+"]";return[n.length&&i.length?"("+y+"|"+g+")":n.length?y:g,u,a-r,!0]},qt=function(t){let{windowsPathsNoEscape:e=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")},Xd=new Set(["!","?","+","*","@"]),oo=t=>Xd.has(t),An="(?!\\.)",Zd=new Set(["[","."]),Qd=new Set(["..","."]),ep=new Set("().*{}+?[]^$\\!"),Nn="[^/]",ao=Nn+"*?",uo=Nn+"+?";class ye{type;#e;#r;#s=!1;#t=[];#n;#d;#l;#g=!1;#f;#c;#p=!1;constructor(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.type=e,e&&(this.#r=!0),this.#n=r,this.#e=this.#n?this.#n.#e:this,this.#f=this.#e===this?n:this.#e.#f,this.#l=this.#e===this?[]:this.#e.#l,e!=="!"||this.#e.#g||this.#l.push(this),this.#d=this.#n?this.#n.#t.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(const e of this.#t)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#c!==void 0?this.#c:this.type?this.#c=this.type+"("+this.#t.map((e=>String(e))).join("|")+")":this.#c=this.#t.map((e=>String(e))).join("")}#h(){if(this!==this.#e)throw new Error("should only call on root");if(this.#g)return this;let e;for(this.toString(),this.#g=!0;e=this.#l.pop();){if(e.type!=="!")continue;let r=e,n=r.#n;for(;n;){for(let i=r.#d+1;!n.type&&i<n.#t.length;i++)for(const s of e.#t){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(n.#t[i])}r=n,n=r.#n}}return this}push(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];for(const i of r)if(i!==""){if(typeof i!="string"&&!(i instanceof ye&&i.#n===this))throw new Error("invalid part: "+i);this.#t.push(i)}}toJSON(){const e=this.type===null?this.#t.slice().map((r=>typeof r=="string"?r:r.toJSON())):[this.type,...this.#t.map((r=>r.toJSON()))];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#g&&this.#n?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#n?.isStart())return!1;if(this.#d===0)return!0;const e=this.#n;for(let r=0;r<this.#d;r++){const n=e.#t[r];if(!(n instanceof ye&&n.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#n?.type==="!")return!0;if(!this.#n?.isEnd())return!1;if(!this.type)return this.#n?.isEnd();const e=this.#n?this.#n.#t.length:0;return this.#d===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){const r=new ye(this.type,e);for(const n of this.#t)r.copyIn(n);return r}static#o(e,r,n,i){let s=!1,o=!1,u=-1,l=!1;if(r.type===null){let y=n,g="";for(;y<e.length;){const m=e.charAt(y++);if(s||m==="\\")s=!s,g+=m;else if(o)y===u+1?m!=="^"&&m!=="!"||(l=!0):m!=="]"||y===u+2&&l||(o=!1),g+=m;else if(m!=="[")if(i.noext||!oo(m)||e.charAt(y)!=="(")g+=m;else{r.push(g),g="";const b=new ye(m,r);y=ye.#o(e,b,y,i),r.push(b)}else o=!0,u=y,l=!1,g+=m}return r.push(g),y}let c=n+1,a=new ye(null,r);const h=[];let p="";for(;c<e.length;){const y=e.charAt(c++);if(s||y==="\\")s=!s,p+=y;else if(o)c===u+1?y!=="^"&&y!=="!"||(l=!0):y!=="]"||c===u+2&&l||(o=!1),p+=y;else if(y!=="[")if(oo(y)&&e.charAt(c)==="("){a.push(p),p="";const g=new ye(y,a);a.push(g),c=ye.#o(e,g,c,i)}else if(y!=="|"){if(y===")")return p===""&&r.#t.length===0&&(r.#p=!0),a.push(p),p="",r.push(...h,a),c;p+=y}else a.push(p),p="",h.push(a),a=new ye(null,r);else o=!0,u=c,l=!1,p+=y}return r.type=null,r.#r=void 0,r.#t=[e.substring(n-1)],c}static fromGlob(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=new ye(null,void 0,r);return ye.#o(e,n,0,r),n}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();const e=this.toString(),[r,n,i,s]=this.toRegExpSource();if(!(i||this.#r||this.#f.nocase&&!this.#f.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;const o=(this.#f.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${r}$`,o),{_src:r,_glob:e})}get options(){return this.#f}toRegExpSource(e){const r=e??!!this.#f.dot;if(this.#e===this&&this.#h(),!this.type){const l=this.isStart()&&this.isEnd(),c=this.#t.map((p=>{const[y,g,m,b]=typeof p=="string"?ye.#i(p,this.#r,l):p.toRegExpSource(e);return this.#r=this.#r||m,this.#s=this.#s||b,y})).join("");let a="";if(this.isStart()&&typeof this.#t[0]=="string"&&(this.#t.length!==1||!Qd.has(this.#t[0]))){const p=Zd,y=r&&p.has(c.charAt(0))||c.startsWith("\\.")&&p.has(c.charAt(2))||c.startsWith("\\.\\.")&&p.has(c.charAt(4)),g=!r&&!e&&p.has(c.charAt(0));a=y?"(?!(?:^|/)\\.\\.?(?:$|/))":g?An:""}let h="";return this.isEnd()&&this.#e.#g&&this.#n?.type==="!"&&(h="(?:$|\\/)"),[a+c+h,qt(c),this.#r=!!this.#r,this.#s]}const n=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:";let s=this.#a(r);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){const l=this.toString();return this.#t=[l],this.type=null,this.#r=void 0,[l,qt(this.toString()),!1,!1]}let o=!n||e||r?"":this.#a(!0);o===s&&(o=""),o&&(s=`(?:${s})(?:${o})*?`);let u="";return u=this.type==="!"&&this.#p?(this.isStart()&&!r?An:"")+uo:i+s+(this.type==="!"?"))"+(!this.isStart()||r||e?"":An)+ao+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`),[u,qt(s),this.#r=!!this.#r,this.#s]}#a(e){return this.#t.map((r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");const[n,i,s,o]=r.toRegExpSource(e);return this.#s=this.#s||o,n})).filter((r=>!(this.isStart()&&this.isEnd()&&!r))).join("|")}static#i(e,r){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],i=!1,s="",o=!1;for(let u=0;u<e.length;u++){const l=e.charAt(u);if(i)i=!1,s+=(ep.has(l)?"\\":"")+l;else if(l!=="\\"){if(l==="["){const[c,a,h,p]=Yd(e,u);if(h){s+=c,o=o||a,u+=h-1,r=r||p;continue}}l!=="*"?l!=="?"?s+=l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(s+=Nn,r=!0):(s+=n&&e==="*"?uo:ao,r=!0)}else u===e.length-1?s+="\\\\":i=!0}return[s,qt(e),!!r,o]}}const de=function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Ir(e),!(!r.nocomment&&e.charAt(0)==="#")&&new Sr(e,r).match(t)},tp=/^\*+([^+@!?\*\[\(]*)$/,rp=t=>e=>!e.startsWith(".")&&e.endsWith(t),np=t=>e=>e.endsWith(t),ip=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),sp=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),op=/^\*+\.\*+$/,ap=t=>!t.startsWith(".")&&t.includes("."),up=t=>t!=="."&&t!==".."&&t.includes("."),lp=/^\.\*+$/,cp=t=>t!=="."&&t!==".."&&t.startsWith("."),fp=/^\*+$/,hp=t=>t.length!==0&&!t.startsWith("."),dp=t=>t.length!==0&&t!=="."&&t!=="..",pp=/^\?+([^+@!?\*\[\(]*)?$/,gp=t=>{let[e,r=""]=t;const n=lo([e]);return r?(r=r.toLowerCase(),i=>n(i)&&i.toLowerCase().endsWith(r)):n},mp=t=>{let[e,r=""]=t;const n=co([e]);return r?(r=r.toLowerCase(),i=>n(i)&&i.toLowerCase().endsWith(r)):n},yp=t=>{let[e,r=""]=t;const n=co([e]);return r?i=>n(i)&&i.endsWith(r):n},bp=t=>{let[e,r=""]=t;const n=lo([e]);return r?i=>n(i)&&i.endsWith(r):n},lo=t=>{let[e]=t;const r=e.length;return n=>n.length===r&&!n.startsWith(".")},co=t=>{let[e]=t;const r=e.length;return n=>n.length===r&&n!=="."&&n!==".."},fo=typeof Be=="object"&&Be?typeof Be.env=="object"&&Be.env&&Be.env.__MINIMATCH_TESTING_PLATFORM__||Be.platform:"posix";de.sep=fo==="win32"?"\\":"/";const Oe=Symbol("globstar **");de.GLOBSTAR=Oe,de.filter=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return r=>de(r,t,e)};const Ce=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.assign({},t,e)};de.defaults=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return de;const e=de;return Object.assign((function(r,n){return e(r,n,Ce(t,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}),{Minimatch:class extends e.Minimatch{constructor(r){super(r,Ce(t,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}))}static defaults(r){return e.defaults(Ce(t,r)).Minimatch}},AST:class extends e.AST{constructor(r,n){super(r,n,Ce(t,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}static fromGlob(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.AST.fromGlob(r,Ce(t,n))}},unescape:function(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.unescape(r,Ce(t,n))},escape:function(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.escape(r,Ce(t,n))},filter:function(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.filter(r,Ce(t,n))},defaults:r=>e.defaults(Ce(t,r)),makeRe:function(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.makeRe(r,Ce(t,n))},braceExpand:function(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.braceExpand(r,Ce(t,n))},match:function(r,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return e.match(r,n,Ce(t,i))},sep:e.sep,GLOBSTAR:Oe})};const ho=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Ir(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:Kd(t)};de.braceExpand=ho,de.makeRe=function(t){return new Sr(t,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).makeRe()},de.match=function(t,e){const r=new Sr(e,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{});return t=t.filter((n=>r.match(n))),r.options.nonull&&!t.length&&t.push(e),t};const po=/[?*]|[+@!]\(.*?\)|\[|\]/;class Sr{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Ir(e),r=r||{},this.options=r,this.pattern=e,this.platform=r.platform||fo,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const e of this.set)for(const r of e)if(typeof r!="string")return!0;return!1}debug(){}make(){const e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#")return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=function(){return console.error(...arguments)}),this.debug(this.pattern,this.globSet);const n=this.globSet.map((s=>this.slashSplit(s)));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let i=this.globParts.map(((s,o,u)=>{if(this.isWindows&&this.windowsNoMagicRoot){const l=!(s[0]!==""||s[1]!==""||s[2]!=="?"&&po.test(s[2])||po.test(s[3])),c=/^[a-z]:/i.test(s[0]);if(l)return[...s.slice(0,4),...s.slice(4).map((a=>this.parse(a)))];if(c)return[s[0],...s.slice(1).map((a=>this.parse(a)))]}return s.map((l=>this.parse(l)))}));if(this.debug(this.pattern,i),this.set=i.filter((s=>s.indexOf(!1)===-1)),this.isWindows)for(let s=0;s<this.set.length;s++){const o=this.set[s];o[0]===""&&o[1]===""&&this.globParts[s][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let n=0;n<e.length;n++)for(let i=0;i<e[n].length;i++)e[n][i]==="**"&&(e[n][i]="*");const{optimizationLevel:r=1}=this.options;return r>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=r>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map((r=>{let n=-1;for(;(n=r.indexOf("**",n+1))!==-1;){let i=n;for(;r[i+1]==="**";)i++;i!==n&&r.splice(n,i-n)}return r}))}levelOneOptimize(e){return e.map((r=>(r=r.reduce(((n,i)=>{const s=n[n.length-1];return i==="**"&&s==="**"?n:i===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(n.pop(),n):(n.push(i),n)}),[])).length===0?[""]:r))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let i=1;i<e.length-1;i++){const s=e[i];i===1&&s===""&&e[0]===""||s!=="."&&s!==""||(r=!0,e.splice(i,1),i--)}e[0]!=="."||e.length!==2||e[1]!=="."&&e[1]!==""||(r=!0,e.pop())}let n=0;for(;(n=e.indexOf("..",n+1))!==-1;){const i=e[n-1];i&&i!=="."&&i!==".."&&i!=="**"&&(r=!0,e.splice(n-1,2),n-=2)}}while(r);return e.length===0?[""]:e}firstPhasePreProcess(e){let r=!1;do{r=!1;for(let n of e){let i=-1;for(;(i=n.indexOf("**",i+1))!==-1;){let o=i;for(;n[o+1]==="**";)o++;o>i&&n.splice(i+1,o-i);let u=n[i+1];const l=n[i+2],c=n[i+3];if(u!==".."||!l||l==="."||l===".."||!c||c==="."||c==="..")continue;r=!0,n.splice(i,1);const a=n.slice(0);a[i]="**",e.push(a),i--}if(!this.preserveMultipleSlashes){for(let o=1;o<n.length-1;o++){const u=n[o];o===1&&u===""&&n[0]===""||u!=="."&&u!==""||(r=!0,n.splice(o,1),o--)}n[0]!=="."||n.length!==2||n[1]!=="."&&n[1]!==""||(r=!0,n.pop())}let s=0;for(;(s=n.indexOf("..",s+1))!==-1;){const o=n[s-1];if(o&&o!=="."&&o!==".."&&o!=="**"){r=!0;const u=s===1&&n[s+1]==="**"?["."]:[];n.splice(s-1,2,...u),n.length===0&&n.push(""),s-=2}}}}while(r);return e}secondPhasePreProcess(e){for(let r=0;r<e.length-1;r++)for(let n=r+1;n<e.length;n++){const i=this.partsMatch(e[r],e[n],!this.preserveMultipleSlashes);if(i){e[r]=[],e[n]=i;break}}return e.filter((r=>r.length))}partsMatch(e,r){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],i=0,s=0,o=[],u="";for(;i<e.length&&s<r.length;)if(e[i]===r[s])o.push(u==="b"?r[s]:e[i]),i++,s++;else if(n&&e[i]==="**"&&r[s]===e[i+1])o.push(e[i]),i++;else if(n&&r[s]==="**"&&e[i]===r[s+1])o.push(r[s]),s++;else if(e[i]!=="*"||!r[s]||!this.options.dot&&r[s].startsWith(".")||r[s]==="**"){if(r[s]!=="*"||!e[i]||!this.options.dot&&e[i].startsWith(".")||e[i]==="**"||u==="a")return!1;u="b",o.push(r[s]),i++,s++}else{if(u==="b")return!1;u="a",o.push(e[i]),i++,s++}return e.length===r.length&&o}parseNegate(){if(this.nonegate)return;const e=this.pattern;let r=!1,n=0;for(let i=0;i<e.length&&e.charAt(i)==="!";i++)r=!r,n++;n&&(this.pattern=e.slice(n)),this.negate=r}matchOne(e,r){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const i=this.options;if(this.isWindows){const m=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),b=!m&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),v=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),E=b?3:m?0:void 0,T=!v&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3])?3:v?0:void 0;if(typeof E=="number"&&typeof T=="number"){const[P,S]=[e[E],r[T]];P.toLowerCase()===S.toLowerCase()&&(r[T]=P,T>E?r=r.slice(T):E>T&&(e=e.slice(E)))}}const{optimizationLevel:s=1}=this.options;s>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:r}),this.debug("matchOne",e.length,r.length);for(var o=0,u=0,l=e.length,c=r.length;o<l&&u<c;o++,u++){this.debug("matchOne loop");var a=r[u],h=e[o];if(this.debug(r,a,h),a===!1)return!1;if(a===Oe){this.debug("GLOBSTAR",[r,a,h]);var p=o,y=u+1;if(y===c){for(this.debug("** at the end");o<l;o++)if(e[o]==="."||e[o]===".."||!i.dot&&e[o].charAt(0)===".")return!1;return!0}for(;p<l;){var g=e[p];if(this.debug(`
|
|
14
|
+
globstar while`,e,p,r,y,g),this.matchOne(e.slice(p),r.slice(y),n))return this.debug("globstar found match!",p,l,g),!0;if(g==="."||g===".."||!i.dot&&g.charAt(0)==="."){this.debug("dot detected!",e,p,r,y);break}this.debug("globstar swallow a segment, and continue"),p++}return!(!n||(this.debug(`
|
|
15
|
+
>>> no match, partial?`,e,p,r,y),p!==l))}let m;if(typeof a=="string"?(m=h===a,this.debug("string match",a,h,m)):(m=a.test(h),this.debug("pattern match",a,h,m)),!m)return!1}if(o===l&&u===c)return!0;if(o===l)return n;if(u===c)return o===l-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return ho(this.pattern,this.options)}parse(e){Ir(e);const r=this.options;if(e==="**")return Oe;if(e==="")return"";let n,i=null;(n=e.match(fp))?i=r.dot?dp:hp:(n=e.match(tp))?i=(r.nocase?r.dot?sp:ip:r.dot?np:rp)(n[1]):(n=e.match(pp))?i=(r.nocase?r.dot?mp:gp:r.dot?yp:bp)(n):(n=e.match(op))?i=r.dot?up:ap:(n=e.match(lp))&&(i=cp);const s=ye.fromGlob(e,this.options).toMMPattern();return i&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:i}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const r=this.options,n=r.noglobstar?"[^/]*?":r.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",i=new Set(r.nocase?["i"]:[]);let s=e.map((l=>{const c=l.map((a=>{if(a instanceof RegExp)for(const h of a.flags.split(""))i.add(h);return typeof a=="string"?a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):a===Oe?Oe:a._src}));return c.forEach(((a,h)=>{const p=c[h+1],y=c[h-1];a===Oe&&y!==Oe&&(y===void 0?p!==void 0&&p!==Oe?c[h+1]="(?:\\/|"+n+"\\/)?"+p:c[h]=n:p===void 0?c[h-1]=y+"(?:\\/|"+n+")?":p!==Oe&&(c[h-1]=y+"(?:\\/|\\/"+n+"\\/)"+p,c[h+1]=Oe))})),c.filter((a=>a!==Oe)).join("/")})).join("|");const[o,u]=e.length>1?["(?:",")"]:["",""];s="^"+o+s+u+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.partial;if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;const n=this.options;this.isWindows&&(e=e.split("\\").join("/"));const i=this.slashSplit(e);this.debug(this.pattern,"split",i);const s=this.set;this.debug(this.pattern,"set",s);let o=i[i.length-1];if(!o)for(let u=i.length-2;!o&&u>=0;u--)o=i[u];for(let u=0;u<s.length;u++){const l=s[u];let c=i;if(n.matchBase&&l.length===1&&(c=[o]),this.matchOne(c,l,r))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(e){return de.defaults(e).Minimatch}}function Pn(t){const e=new Error(`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:""}Invalid response: ${t.status} ${t.statusText}`);return e.status=t.status,e.response=t,e}function se(t,e){const{status:r}=e;if(r===401&&t.digest)return e;if(r>=400)throw Pn(e);return e}function Tt(t,e){return arguments.length>2&&arguments[2]!==void 0&&arguments[2]?{data:e,headers:t.headers?zd(t.headers):{},status:t.status,statusText:t.statusText}:e}de.AST=ye,de.Minimatch=Sr,de.escape=function(t){let{windowsPathsNoEscape:e=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&")},de.unescape=qt;const wp=(go=function(t,e,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=ie({url:G(t.remoteURL,W(e)),method:"COPY",headers:{Destination:G(t.remoteURL,W(r)),Overwrite:n.overwrite===!1?"F":"T",Depth:n.shallow?"0":"infinity"}},t,n);return o=function(u){se(t,u)},(s=ne(i,t))&&s.then||(s=Promise.resolve(s)),o?s.then(o):s;var s,o},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(go.apply(this,t))}catch(r){return Promise.reject(r)}});var go;const xp={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,r){return t},captureMetaData:!1},mo=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Ep=new RegExp("^["+mo+"]["+mo+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function yo(t,e){const r=[];let n=e.exec(t);for(;n;){const i=[];i.startIndex=e.lastIndex-n[0].length;const s=n.length;for(let o=0;o<s;o++)i.push(n[o]);r.push(i),n=e.exec(t)}return r}const Or=function(t){return Ep.exec(t)!=null};let In;In=typeof Symbol!="function"?"@@xmlMetadata":Symbol("XML Node Metadata");class ct{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,r){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:r})}addChild(e,r){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child}),r!==void 0&&(this.child[this.child.length-1][In]={startIndex:r})}static getMetaDataSymbol(){return In}}class vp{constructor(e){this.suppressValidationErr=!e}readDocType(e,r){const n={};if(e[r+3]!=="O"||e[r+4]!=="C"||e[r+5]!=="T"||e[r+6]!=="Y"||e[r+7]!=="P"||e[r+8]!=="E")throw new Error("Invalid Tag instead of DOCTYPE");{r+=9;let i=1,s=!1,o=!1,u="";for(;r<e.length;r++)if(e[r]!=="<"||o)if(e[r]===">"){if(o?e[r-1]==="-"&&e[r-2]==="-"&&(o=!1,i--):i--,i===0)break}else e[r]==="["?s=!0:u+=e[r];else{if(s&&ft(e,"!ENTITY",r)){let l,c;r+=7,[l,c,r]=this.readEntityExp(e,r+1,this.suppressValidationErr),c.indexOf("&")===-1&&(n[l]={regx:RegExp(`&${l};`,"g"),val:c})}else if(s&&ft(e,"!ELEMENT",r)){r+=8;const{index:l}=this.readElementExp(e,r+1);r=l}else if(s&&ft(e,"!ATTLIST",r))r+=8;else if(s&&ft(e,"!NOTATION",r)){r+=9;const{index:l}=this.readNotationExp(e,r+1,this.suppressValidationErr);r=l}else{if(!ft(e,"!--",r))throw new Error("Invalid DOCTYPE");o=!0}i++,u=""}if(i!==0)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:r}}readEntityExp(e,r){r=Ae(e,r);let n="";for(;r<e.length&&!/\s/.test(e[r])&&e[r]!=='"'&&e[r]!=="'";)n+=e[r],r++;if(Wt(n),r=Ae(e,r),!this.suppressValidationErr){if(e.substring(r,r+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(e[r]==="%")throw new Error("Parameter entities are not supported")}let i="";return[r,i]=this.readIdentifierVal(e,r,"entity"),[n,i,--r]}readNotationExp(e,r){r=Ae(e,r);let n="";for(;r<e.length&&!/\s/.test(e[r]);)n+=e[r],r++;!this.suppressValidationErr&&Wt(n),r=Ae(e,r);const i=e.substring(r,r+6).toUpperCase();if(!this.suppressValidationErr&&i!=="SYSTEM"&&i!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${i}"`);r+=i.length,r=Ae(e,r);let s=null,o=null;if(i==="PUBLIC")[r,s]=this.readIdentifierVal(e,r,"publicIdentifier"),e[r=Ae(e,r)]!=='"'&&e[r]!=="'"||([r,o]=this.readIdentifierVal(e,r,"systemIdentifier"));else if(i==="SYSTEM"&&([r,o]=this.readIdentifierVal(e,r,"systemIdentifier"),!this.suppressValidationErr&&!o))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:n,publicIdentifier:s,systemIdentifier:o,index:--r}}readIdentifierVal(e,r,n){let i="";const s=e[r];if(s!=='"'&&s!=="'")throw new Error(`Expected quoted string, found "${s}"`);for(r++;r<e.length&&e[r]!==s;)i+=e[r],r++;if(e[r]!==s)throw new Error(`Unterminated ${n} value`);return[++r,i]}readElementExp(e,r){r=Ae(e,r);let n="";for(;r<e.length&&!/\s/.test(e[r]);)n+=e[r],r++;if(!this.suppressValidationErr&&!Or(n))throw new Error(`Invalid element name: "${n}"`);let i="";if(e[r=Ae(e,r)]==="E"&&ft(e,"MPTY",r))r+=4;else if(e[r]==="A"&&ft(e,"NY",r))r+=2;else if(e[r]==="("){for(r++;r<e.length&&e[r]!==")";)i+=e[r],r++;if(e[r]!==")")throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${e[r]}"`);return{elementName:n,contentModel:i.trim(),index:r}}readAttlistExp(e,r){r=Ae(e,r);let n="";for(;r<e.length&&!/\s/.test(e[r]);)n+=e[r],r++;Wt(n),r=Ae(e,r);let i="";for(;r<e.length&&!/\s/.test(e[r]);)i+=e[r],r++;if(!Wt(i))throw new Error(`Invalid attribute name: "${i}"`);r=Ae(e,r);let s="";if(e.substring(r,r+8).toUpperCase()==="NOTATION"){if(s="NOTATION",e[r=Ae(e,r+=8)]!=="(")throw new Error(`Expected '(', found "${e[r]}"`);r++;let u=[];for(;r<e.length&&e[r]!==")";){let l="";for(;r<e.length&&e[r]!=="|"&&e[r]!==")";)l+=e[r],r++;if(l=l.trim(),!Wt(l))throw new Error(`Invalid notation name: "${l}"`);u.push(l),e[r]==="|"&&(r++,r=Ae(e,r))}if(e[r]!==")")throw new Error("Unterminated list of notations");r++,s+=" ("+u.join("|")+")"}else{for(;r<e.length&&!/\s/.test(e[r]);)s+=e[r],r++;const u=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!u.includes(s.toUpperCase()))throw new Error(`Invalid attribute type: "${s}"`)}r=Ae(e,r);let o="";return e.substring(r,r+8).toUpperCase()==="#REQUIRED"?(o="#REQUIRED",r+=8):e.substring(r,r+7).toUpperCase()==="#IMPLIED"?(o="#IMPLIED",r+=7):[r,o]=this.readIdentifierVal(e,r,"ATTLIST"),{elementName:n,attributeName:i,attributeType:s,defaultValue:o,index:r}}}const Ae=(t,e)=>{for(;e<t.length&&/\s/.test(t[e]);)e++;return e};function ft(t,e,r){for(let n=0;n<e.length;n++)if(e[n]!==t[r+n+1])return!1;return!0}function Wt(t){if(Or(t))return t;throw new Error(`Invalid entity name ${t}`)}const Tp=/^[-+]?0x[a-fA-F0-9]+$/,Ap=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,Np={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0},Pp=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function bo(t){return typeof t=="function"?t:Array.isArray(t)?e=>{for(const r of t)if(typeof r=="string"&&e===r||r instanceof RegExp&&r.test(e))return!0}:()=>!1}class Ip{constructor(e){if(this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(r,n)=>xo(n,10,"&#")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(r,n)=>xo(n,16,"&#x")}},this.addExternalEntities=Sp,this.parseXml=Lp,this.parseTextData=Op,this.resolveNameSpace=Cp,this.buildAttributesMap=Fp,this.isItStopNode=$p,this.replaceEntitiesValue=Up,this.readStopNodeData=kp,this.saveTextToParentTag=Bp,this.addChild=_p,this.ignoreAttributesFn=bo(this.options.ignoreAttributes),this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodesExact=new Set,this.stopNodesWildcard=new Set;for(let r=0;r<this.options.stopNodes.length;r++){const n=this.options.stopNodes[r];typeof n=="string"&&(n.startsWith("*.")?this.stopNodesWildcard.add(n.substring(2)):this.stopNodesExact.add(n))}}}}function Sp(t){const e=Object.keys(t);for(let r=0;r<e.length;r++){const n=e[r];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:t[n]}}}function Op(t,e,r,n,i,s,o){if(t!==void 0&&(this.options.trimValues&&!n&&(t=t.trim()),t.length>0)){o||(t=this.replaceEntitiesValue(t));const u=this.options.tagValueProcessor(e,t,r,i,s);return u==null?t:typeof u!=typeof t||u!==t?u:this.options.trimValues||t.trim()===t?wo(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function Cp(t){if(this.options.removeNSPrefix){const e=t.split(":"),r=t.charAt(0)==="/"?"/":"";if(e[0]==="xmlns")return"";e.length===2&&(t=r+e[1])}return t}const Rp=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Fp(t,e){if(this.options.ignoreAttributes!==!0&&typeof t=="string"){const r=yo(t,Rp),n=r.length,i={};for(let s=0;s<n;s++){const o=this.resolveNameSpace(r[s][1]);if(this.ignoreAttributesFn(o,e))continue;let u=r[s][4],l=this.options.attributeNamePrefix+o;if(o.length)if(this.options.transformAttributeName&&(l=this.options.transformAttributeName(l)),l==="__proto__"&&(l="#__proto__"),u!==void 0){this.options.trimValues&&(u=u.trim()),u=this.replaceEntitiesValue(u);const c=this.options.attributeValueProcessor(o,u,e);i[l]=c==null?u:typeof c!=typeof u||c!==u?c:wo(u,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(i[l]=!0)}if(!Object.keys(i).length)return;if(this.options.attributesGroupName){const s={};return s[this.options.attributesGroupName]=i,s}return i}}const Lp=function(t){t=t.replace(/\r\n?/g,`
|
|
16
|
+
`);const e=new ct("!xml");let r=e,n="",i="";const s=new vp(this.options.processEntities);for(let o=0;o<t.length;o++)if(t[o]==="<")if(t[o+1]==="/"){const u=ht(t,">",o,"Closing Tag is not closed.");let l=t.substring(o+2,u).trim();if(this.options.removeNSPrefix){const h=l.indexOf(":");h!==-1&&(l=l.substr(h+1))}this.options.transformTagName&&(l=this.options.transformTagName(l)),r&&(n=this.saveTextToParentTag(n,r,i));const c=i.substring(i.lastIndexOf(".")+1);if(l&&this.options.unpairedTags.indexOf(l)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${l}>`);let a=0;c&&this.options.unpairedTags.indexOf(c)!==-1?(a=i.lastIndexOf(".",i.lastIndexOf(".")-1),this.tagsNodeStack.pop()):a=i.lastIndexOf("."),i=i.substring(0,a),r=this.tagsNodeStack.pop(),n="",o=u}else if(t[o+1]==="?"){let u=Sn(t,o,!1,"?>");if(!u)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,i),!(this.options.ignoreDeclaration&&u.tagName==="?xml"||this.options.ignorePiTags)){const l=new ct(u.tagName);l.add(this.options.textNodeName,""),u.tagName!==u.tagExp&&u.attrExpPresent&&(l[":@"]=this.buildAttributesMap(u.tagExp,i)),this.addChild(r,l,i,o)}o=u.closeIndex+1}else if(t.substr(o+1,3)==="!--"){const u=ht(t,"-->",o+4,"Comment is not closed.");if(this.options.commentPropName){const l=t.substring(o+4,u-2);n=this.saveTextToParentTag(n,r,i),r.add(this.options.commentPropName,[{[this.options.textNodeName]:l}])}o=u}else if(t.substr(o+1,2)==="!D"){const u=s.readDocType(t,o);this.docTypeEntities=u.entities,o=u.i}else if(t.substr(o+1,2)==="!["){const u=ht(t,"]]>",o,"CDATA is not closed.")-2,l=t.substring(o+9,u);n=this.saveTextToParentTag(n,r,i);let c=this.parseTextData(l,r.tagname,i,!0,!1,!0,!0);c==null&&(c=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:l}]):r.add(this.options.textNodeName,c),o=u+2}else{let u=Sn(t,o,this.options.removeNSPrefix),l=u.tagName;const c=u.rawTagName;let a=u.tagExp,h=u.attrExpPresent,p=u.closeIndex;if(this.options.transformTagName){const m=this.options.transformTagName(l);a===l&&(a=m),l=m}r&&n&&r.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,r,i,!1));const y=r;y&&this.options.unpairedTags.indexOf(y.tagname)!==-1&&(r=this.tagsNodeStack.pop(),i=i.substring(0,i.lastIndexOf("."))),l!==e.tagname&&(i+=i?"."+l:l);const g=o;if(this.isItStopNode(this.stopNodesExact,this.stopNodesWildcard,i,l)){let m="";if(a.length>0&&a.lastIndexOf("/")===a.length-1)l[l.length-1]==="/"?(l=l.substr(0,l.length-1),i=i.substr(0,i.length-1),a=l):a=a.substr(0,a.length-1),o=u.closeIndex;else if(this.options.unpairedTags.indexOf(l)!==-1)o=u.closeIndex;else{const v=this.readStopNodeData(t,c,p+1);if(!v)throw new Error(`Unexpected end of ${c}`);o=v.i,m=v.tagContent}const b=new ct(l);l!==a&&h&&(b[":@"]=this.buildAttributesMap(a,i)),m&&(m=this.parseTextData(m,l,i,!0,h,!0,!0)),i=i.substr(0,i.lastIndexOf(".")),b.add(this.options.textNodeName,m),this.addChild(r,b,i,g)}else{if(a.length>0&&a.lastIndexOf("/")===a.length-1){if(l[l.length-1]==="/"?(l=l.substr(0,l.length-1),i=i.substr(0,i.length-1),a=l):a=a.substr(0,a.length-1),this.options.transformTagName){const b=this.options.transformTagName(l);a===l&&(a=b),l=b}const m=new ct(l);l!==a&&h&&(m[":@"]=this.buildAttributesMap(a,i)),this.addChild(r,m,i,g),i=i.substr(0,i.lastIndexOf("."))}else{const m=new ct(l);this.tagsNodeStack.push(r),l!==a&&h&&(m[":@"]=this.buildAttributesMap(a,i)),this.addChild(r,m,i,g),r=m}n="",o=p}}else n+=t[o];return e.child};function _p(t,e,r,n){this.options.captureMetaData||(n=void 0);const i=this.options.updateTag(e.tagname,r,e[":@"]);i===!1||(typeof i=="string"&&(e.tagname=i),t.addChild(e,n))}const Up=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const r=this.docTypeEntities[e];t=t.replace(r.regx,r.val)}for(let e in this.lastEntities){const r=this.lastEntities[e];t=t.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const r=this.htmlEntities[e];t=t.replace(r.regex,r.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function Bp(t,e,r,n){return t&&(n===void 0&&(n=e.child.length===0),(t=this.parseTextData(t,e.tagname,r,!1,!!e[":@"]&&Object.keys(e[":@"]).length!==0,n))!==void 0&&t!==""&&e.add(this.options.textNodeName,t),t=""),t}function $p(t,e,r,n){return!(!e||!e.has(n))||!(!t||!t.has(r))}function ht(t,e,r,n){const i=t.indexOf(e,r);if(i===-1)throw new Error(n);return i+e.length-1}function Sn(t,e,r){const n=(function(a,h){let p,y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:">",g="";for(let m=h;m<a.length;m++){let b=a[m];if(p)b===p&&(p="");else if(b==='"'||b==="'")p=b;else if(b===y[0]){if(!y[1])return{data:g,index:m};if(a[m+1]===y[1])return{data:g,index:m}}else b===" "&&(b=" ");g+=b}})(t,e+1,arguments.length>3&&arguments[3]!==void 0?arguments[3]:">");if(!n)return;let i=n.data;const s=n.index,o=i.search(/\s/);let u=i,l=!0;o!==-1&&(u=i.substring(0,o),i=i.substring(o+1).trimStart());const c=u;if(r){const a=u.indexOf(":");a!==-1&&(u=u.substr(a+1),l=u!==n.data.substr(a+1))}return{tagName:u,tagExp:i,closeIndex:s,attrExpPresent:l,rawTagName:c}}function kp(t,e,r){const n=r;let i=1;for(;r<t.length;r++)if(t[r]==="<")if(t[r+1]==="/"){const s=ht(t,">",r,`${e} is not closed`);if(t.substring(r+2,s).trim()===e&&(i--,i===0))return{tagContent:t.substring(n,r),i:s};r=s}else if(t[r+1]==="?")r=ht(t,"?>",r+1,"StopNode is not closed.");else if(t.substr(r+1,3)==="!--")r=ht(t,"-->",r+3,"StopNode is not closed.");else if(t.substr(r+1,2)==="![")r=ht(t,"]]>",r,"StopNode is not closed.")-2;else{const s=Sn(t,r,">");s&&((s&&s.tagName)===e&&s.tagExp[s.tagExp.length-1]!=="/"&&i++,r=s.closeIndex)}}function wo(t,e,r){if(e&&typeof t=="string"){const n=t.trim();return n==="true"||n!=="false"&&(function(i){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(s=Object.assign({},Np,s),!i||typeof i!="string")return i;let o=i.trim();if(s.skipLike!==void 0&&s.skipLike.test(o))return i;if(i==="0")return 0;if(s.hex&&Tp.test(o))return(function(l){if(parseInt)return parseInt(l,16);if(Number.parseInt)return Number.parseInt(l,16);if(window&&window.parseInt)return window.parseInt(l,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")})(o);if(o.includes("e")||o.includes("E"))return(function(l,c,a){if(!a.eNotation)return l;const h=c.match(Pp);if(h){let p=h[1]||"";const y=h[3].indexOf("e")===-1?"E":"e",g=h[2],m=p?l[g.length+1]===y:l[g.length]===y;return g.length>1&&m?l:g.length!==1||!h[3].startsWith(`.${y}`)&&h[3][0]!==y?a.leadingZeros&&!m?(c=(h[1]||"")+h[3],Number(c)):l:Number(c)}return l})(i,o,s);{const l=Ap.exec(o);if(l){const c=l[1]||"",a=l[2];let h=((u=l[3])&&u.indexOf(".")!==-1&&((u=u.replace(/0+$/,""))==="."?u="0":u[0]==="."?u="0"+u:u[u.length-1]==="."&&(u=u.substring(0,u.length-1))),u);const p=c?i[a.length+1]===".":i[a.length]===".";if(!s.leadingZeros&&(a.length>1||a.length===1&&!p))return i;{const y=Number(o),g=String(y);if(y===0)return y;if(g.search(/[eE]/)!==-1)return s.eNotation?y:i;if(o.indexOf(".")!==-1)return g==="0"||g===h||g===`${c}${h}`?y:i;let m=a?h:o;return a?m===g||c+m===g?y:i:m===g||m===c+g?y:i}}return i}var u})(t,r)}return t!==void 0?t:""}function xo(t,e,r){const n=Number.parseInt(t,e);return n>=0&&n<=1114111?String.fromCodePoint(n):r+t+";"}const On=ct.getMetaDataSymbol();function jp(t,e){return Eo(t,e)}function Eo(t,e,r){let n;const i={};for(let s=0;s<t.length;s++){const o=t[s],u=Mp(o);let l="";if(l=r===void 0?u:r+"."+u,u===e.textNodeName)n===void 0?n=o[u]:n+=""+o[u];else{if(u===void 0)continue;if(o[u]){let c=Eo(o[u],e,l);const a=Dp(c,e);o[On]!==void 0&&(c[On]=o[On]),o[":@"]?Vp(c,o[":@"],l,e):Object.keys(c).length!==1||c[e.textNodeName]===void 0||e.alwaysCreateTextNode?Object.keys(c).length===0&&(e.alwaysCreateTextNode?c[e.textNodeName]="":c=""):c=c[e.textNodeName],i[u]!==void 0&&i.hasOwnProperty(u)?(Array.isArray(i[u])||(i[u]=[i[u]]),i[u].push(c)):e.isArray(u,l,a)?i[u]=[c]:i[u]=c}}}return typeof n=="string"?n.length>0&&(i[e.textNodeName]=n):n!==void 0&&(i[e.textNodeName]=n),i}function Mp(t){const e=Object.keys(t);for(let r=0;r<e.length;r++){const n=e[r];if(n!==":@")return n}}function Vp(t,e,r,n){if(e){const i=Object.keys(e),s=i.length;for(let o=0;o<s;o++){const u=i[o];n.isArray(u,r+"."+u,!0,!0)?t[u]=[e[u]]:t[u]=e[u]}}}function Dp(t,e){const{textNodeName:r}=e,n=Object.keys(t).length;return n===0||!(n!==1||!t[r]&&typeof t[r]!="boolean"&&t[r]!==0)}const Hp={allowBooleanAttributes:!1,unpairedTags:[]};function vo(t){return t===" "||t===" "||t===`
|
|
17
|
+
`||t==="\r"}function To(t,e){const r=e;for(;e<t.length;e++)if(!(t[e]!="?"&&t[e]!=" ")){const n=t.substr(r,e-r);if(e>5&&n==="xml")return te("InvalidXml","XML declaration allowed only at the start of the document.",be(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}}return e}function Ao(t,e){if(t.length>e+5&&t[e+1]==="-"&&t[e+2]==="-"){for(e+=3;e<t.length;e++)if(t[e]==="-"&&t[e+1]==="-"&&t[e+2]===">"){e+=2;break}}else if(t.length>e+8&&t[e+1]==="D"&&t[e+2]==="O"&&t[e+3]==="C"&&t[e+4]==="T"&&t[e+5]==="Y"&&t[e+6]==="P"&&t[e+7]==="E"){let r=1;for(e+=8;e<t.length;e++)if(t[e]==="<")r++;else if(t[e]===">"&&(r--,r===0))break}else if(t.length>e+9&&t[e+1]==="["&&t[e+2]==="C"&&t[e+3]==="D"&&t[e+4]==="A"&&t[e+5]==="T"&&t[e+6]==="A"&&t[e+7]==="["){for(e+=8;e<t.length;e++)if(t[e]==="]"&&t[e+1]==="]"&&t[e+2]===">"){e+=2;break}}return e}function zp(t,e){let r="",n="",i=!1;for(;e<t.length;e++){if(t[e]==='"'||t[e]==="'")n===""?n=t[e]:n!==t[e]||(n="");else if(t[e]===">"&&n===""){i=!0;break}r+=t[e]}return n===""&&{value:r,index:e,tagClosed:i}}const qp=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function No(t,e){const r=yo(t,qp),n={};for(let i=0;i<r.length;i++){if(r[i][1].length===0)return te("InvalidAttr","Attribute '"+r[i][2]+"' has no space in starting.",Gt(r[i]));if(r[i][3]!==void 0&&r[i][4]===void 0)return te("InvalidAttr","Attribute '"+r[i][2]+"' is without value.",Gt(r[i]));if(r[i][3]===void 0&&!e.allowBooleanAttributes)return te("InvalidAttr","boolean attribute '"+r[i][2]+"' is not allowed.",Gt(r[i]));const s=r[i][2];if(!Gp(s))return te("InvalidAttr","Attribute '"+s+"' is an invalid name.",Gt(r[i]));if(n.hasOwnProperty(s))return te("InvalidAttr","Attribute '"+s+"' is repeated.",Gt(r[i]));n[s]=1}return!0}function Wp(t,e){if(t[++e]===";")return-1;if(t[e]==="#")return(function(n,i){let s=/\d/;for(n[i]==="x"&&(i++,s=/[\da-fA-F]/);i<n.length;i++){if(n[i]===";")return i;if(!n[i].match(s))break}return-1})(t,++e);let r=0;for(;e<t.length;e++,r++)if(!(t[e].match(/\w/)&&r<20)){if(t[e]===";")break;return-1}return e}function te(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}function Gp(t){return Or(t)}function be(t,e){const r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function Gt(t){return t.startIndex+t[1].length}class Po{constructor(e){this.externalEntities={},this.options=(function(r){return Object.assign({},xp,r)})(e)}parse(e,r){if(typeof e!="string"&&e.toString)e=e.toString();else if(typeof e!="string")throw new Error("XML data is accepted in String or Bytes[] form.");if(r){r===!0&&(r={});const s=(function(o,u){u=Object.assign({},Hp,u);const l=[];let c=!1,a=!1;o[0]==="\uFEFF"&&(o=o.substr(1));for(let h=0;h<o.length;h++)if(o[h]==="<"&&o[h+1]==="?"){if(h+=2,h=To(o,h),h.err)return h}else{if(o[h]!=="<"){if(vo(o[h]))continue;return te("InvalidChar","char '"+o[h]+"' is not expected.",be(o,h))}{let p=h;if(h++,o[h]==="!"){h=Ao(o,h);continue}{let y=!1;o[h]==="/"&&(y=!0,h++);let g="";for(;h<o.length&&o[h]!==">"&&o[h]!==" "&&o[h]!==" "&&o[h]!==`
|
|
18
|
+
`&&o[h]!=="\r";h++)g+=o[h];if(g=g.trim(),g[g.length-1]==="/"&&(g=g.substring(0,g.length-1),h--),!Or(g)){let v;return v=g.trim().length===0?"Invalid space after '<'.":"Tag '"+g+"' is an invalid name.",te("InvalidTag",v,be(o,h))}const m=zp(o,h);if(m===!1)return te("InvalidAttr","Attributes for '"+g+"' have open quote.",be(o,h));let b=m.value;if(h=m.index,b[b.length-1]==="/"){const v=h-b.length;b=b.substring(0,b.length-1);const E=No(b,u);if(E!==!0)return te(E.err.code,E.err.msg,be(o,v+E.err.line));c=!0}else if(y){if(!m.tagClosed)return te("InvalidTag","Closing tag '"+g+"' doesn't have proper closing.",be(o,h));if(b.trim().length>0)return te("InvalidTag","Closing tag '"+g+"' can't have attributes or invalid starting.",be(o,p));if(l.length===0)return te("InvalidTag","Closing tag '"+g+"' has not been opened.",be(o,p));{const v=l.pop();if(g!==v.tagName){let E=be(o,v.tagStartPos);return te("InvalidTag","Expected closing tag '"+v.tagName+"' (opened in line "+E.line+", col "+E.col+") instead of closing tag '"+g+"'.",be(o,p))}l.length==0&&(a=!0)}}else{const v=No(b,u);if(v!==!0)return te(v.err.code,v.err.msg,be(o,h-b.length+v.err.line));if(a===!0)return te("InvalidXml","Multiple possible root nodes found.",be(o,h));u.unpairedTags.indexOf(g)!==-1||l.push({tagName:g,tagStartPos:p}),c=!0}for(h++;h<o.length;h++)if(o[h]==="<"){if(o[h+1]==="!"){h++,h=Ao(o,h);continue}if(o[h+1]!=="?")break;if(h=To(o,++h),h.err)return h}else if(o[h]==="&"){const v=Wp(o,h);if(v==-1)return te("InvalidChar","char '&' is not expected.",be(o,h));h=v}else if(a===!0&&!vo(o[h]))return te("InvalidXml","Extra text at the end",be(o,h));o[h]==="<"&&h--}}}return c?l.length==1?te("InvalidTag","Unclosed tag '"+l[0].tagName+"'.",be(o,l[0].tagStartPos)):!(l.length>0)||te("InvalidXml","Invalid '"+JSON.stringify(l.map((h=>h.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):te("InvalidXml","Start tag expected.",1)})(e,r);if(s!==!0)throw Error(`${s.err.msg}:${s.err.line}:${s.err.col}`)}const n=new Ip(this.options);n.addExternalEntities(this.externalEntities);const i=n.parseXml(e);return this.options.preserveOrder||i===void 0?i:jp(i,this.options)}addEntity(e,r){if(r.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(e.indexOf("&")!==-1||e.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if(r==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=r}static getMetaDataSymbol(){return ct.getMetaDataSymbol()}}var Kp=H(829),We=H.n(Kp),At=(function(t){return t.Array="array",t.Object="object",t.Original="original",t})(At||{});function Io(t,e){if(!t.endsWith("propstat.prop.displayname"))return e}function Cr(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:At.Original;const n=We().get(t,e);return r==="array"&&Array.isArray(n)===!1?[n]:r==="object"&&Array.isArray(n)?n[0]:n}function Kt(t,e){return e=e??{attributeNamePrefix:"@",attributeParsers:[],tagParsers:[Io]},new Promise((r=>{r((function(n){const{multistatus:i}=n;if(i==="")return{multistatus:{response:[]}};if(!i)throw new Error("Invalid response: No root multistatus found");const s={multistatus:Array.isArray(i)?i[0]:i};return We().set(s,"multistatus.response",Cr(s,"multistatus.response",At.Array)),We().set(s,"multistatus.response",We().get(s,"multistatus.response").map((o=>(function(u){const l=Object.assign({},u);return l.status?We().set(l,"status",Cr(l,"status",At.Object)):(We().set(l,"propstat",Cr(l,"propstat",At.Object)),We().set(l,"propstat.prop",Cr(l,"propstat.prop",At.Object))),l})(o)))),s})((function(n){let{attributeNamePrefix:i,attributeParsers:s,tagParsers:o}=n;return new Po({allowBooleanAttributes:!0,attributeNamePrefix:i,textNodeName:"text",ignoreAttributes:!1,removeNSPrefix:!0,numberParseOptions:{hex:!0,leadingZeros:!1},attributeValueProcessor(u,l,c){for(const a of s)try{const h=a(c,l);if(h!==l)return h}catch{}return l},tagValueProcessor(u,l,c){for(const a of o)try{const h=a(c,l);if(h!==l)return h}catch{}return l}})})(e).parse(t)))}))}function Rr(t,e){let r=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const{getlastmodified:n=null,getcontentlength:i="0",resourcetype:s=null,getcontenttype:o=null,getetag:u=null}=t,l=s&&typeof s=="object"&&s.collection!==void 0?"directory":"file",c={filename:e,basename:Ar().basename(e),lastmod:n,size:parseInt(i,10),type:l,etag:typeof u=="string"?u.replace(/"/g,""):null};return l==="file"&&(c.mime=o&&typeof o=="string"?o.split(";")[0]:""),r&&(t.displayname!==void 0&&(t.displayname=String(t.displayname)),c.props=t),c}function Jp(t,e){let r=arguments.length>2&&arguments[2]!==void 0&&arguments[2],n=null;try{t.multistatus.response[0].propstat&&(n=t.multistatus.response[0])}catch{}if(!n)throw new Error("Failed getting item stat: bad response");const{propstat:{prop:i,status:s}}=n,[o,u,l]=s.split(" ",3),c=parseInt(u,10);if(c>=400){const a=new Error(`Invalid response: ${c} ${l}`);throw a.status=c,a}return Rr(i,Dt(e),r)}function Yp(t){switch(String(t)){case"-3":return"unlimited";case"-2":case"-1":return"unknown";default:return parseInt(String(t),10)}}function Cn(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const Rn=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{details:n=!1}=r,i=ie({url:G(t.remoteURL,W(e)),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},t,r);return Cn(ne(i,t),(function(s){return se(t,s),Cn(s.text(),(function(o){return Cn(Kt(o,t.parsing),(function(u){const l=Jp(u,e,n);return Tt(s,l,n)}))}))}))}));function So(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const Xp=Oo((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=(function(s){if(!s||s==="/")return[];let o=s;const u=[];do u.push(o),o=Ar().dirname(o);while(o&&o!=="/");return u})(Dt(e));n.sort(((s,o)=>s.length>o.length?1:o.length>s.length?-1:0));let i=!1;return(function(s,o,u){if(typeof s[Ro]=="function"){let m=function(b){try{for(;!(l=h.next()).done;)if((b=o(l.value))&&b.then){if(!Fo(b))return void b.then(m,a||(a=we.bind(null,c=new Nt,2)));b=b.v}c?we(c,1,b):c=b}catch(v){we(c||(c=new Nt),2,v)}};var l,c,a,h=s[Ro]();if(m(),h.return){var p=function(b){try{l.done||h.return()}catch{}return b};if(c&&c.then)return c.then(p,(function(b){throw p(b)}));p()}return c}if(!("length"in s))throw new TypeError("Object is not iterable");for(var y=[],g=0;g<s.length;g++)y.push(s[g]);return(function(m,b,v){var E,T,P=-1;return(function S(F){try{for(;++P<m.length&&(!v||!v());)if((F=b(P))&&F.then){if(!Fo(F))return void F.then(S,T||(T=we.bind(null,E=new Nt,2)));F=F.v}E?we(E,1,F):E=F}catch(L){we(E||(E=new Nt),2,L)}})(),E})(y,(function(m){return o(y[m])}),u)})(n,(function(s){return o=function(){return(function(l,c){try{var a=So(Rn(t,s),(function(h){if(h.type!=="directory")throw new Error(`Path includes a file: ${e}`)}))}catch(h){return c(h)}return a&&a.then?a.then(void 0,c):a})(0,(function(l){const c=l;return(function(){if(c.status===404)return i=!0,Co(Fn(t,s,{...r,recursive:!1}));throw l})()}))},(u=(function(){if(i)return Co(Fn(t,s,{...r,recursive:!1}))})())&&u.then?u.then(o):o();var o,u}),(function(){return!1}))}));function Oo(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}}function Zp(){}function Co(t,e){return t&&t.then?t.then(Zp):Promise.resolve()}const Ro=typeof Symbol<"u"?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function we(t,e,r){if(!t.s){if(r instanceof Nt){if(!r.s)return void(r.o=we.bind(null,t,e));1&e&&(e=r.s),r=r.v}if(r&&r.then)return void r.then(we.bind(null,t,e),we.bind(null,t,2));t.s=e,t.v=r;const n=t.o;n&&n(t)}}const Nt=(function(){function t(){}return t.prototype.then=function(e,r){const n=new t,i=this.s;if(i){const s=1&i?e:r;if(s){try{we(n,1,s(this.v))}catch(o){we(n,2,o)}return n}return this}return this.o=function(s){try{const o=s.v;1&s.s?we(n,1,e?e(o):o):r?we(n,1,r(o)):we(n,2,o)}catch(o){we(n,2,o)}},n},t})();function Fo(t){return t instanceof Nt&&1&t.s}const Fn=Oo((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(r.recursive===!0)return Xp(t,e,r);const n=ie({url:G(t.remoteURL,(i=W(e),i.endsWith("/")?i:i+"/")),method:"MKCOL"},t,r);var i;return So(ne(n,t),(function(s){se(t,s)}))}));var Qp=H(388),Lo=H.n(Qp);const eg=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n={};if(typeof r.range=="object"&&typeof r.range.start=="number"){let u=`bytes=${r.range.start}-`;typeof r.range.end=="number"&&(u=`${u}${r.range.end}`),n.Range=u}const i=ie({url:G(t.remoteURL,W(e)),method:"GET",headers:n},t,r);return o=function(u){if(se(t,u),n.Range&&u.status!==206){const l=new Error(`Invalid response code for partial request: ${u.status}`);throw l.status=u.status,l}return r.callback&&setTimeout((()=>{r.callback(u)}),0),u.body},(s=ne(i,t))&&s.then||(s=Promise.resolve(s)),o?s.then(o):s;var s,o})),tg=()=>{},rg=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e,r){r.url||(r.url=G(t.remoteURL,W(e)));const n=ie(r,t,{});return s=function(o){return se(t,o),o},(i=ne(n,t))&&i.then||(i=Promise.resolve(i)),s?i.then(s):i;var i,s})),ng=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=ie({url:G(t.remoteURL,W(e)),method:"DELETE"},t,r);return s=function(o){se(t,o)},(i=ne(n,t))&&i.then||(i=Promise.resolve(i)),s?i.then(s):i;var i,s})),ig=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function(n,i){try{var s=(o=Rn(t,e,r),u=function(){return!0},l?u?u(o):o:(o&&o.then||(o=Promise.resolve(o)),u?o.then(u):o))}catch(c){return i(c)}var o,u,l;return s&&s.then?s.then(void 0,i):s})(0,(function(n){if(n.status===404)return!1;throw n}))}));function Ln(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const sg=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=ie({url:G(t.remoteURL,W(e),"/"),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:r.deep?"infinity":"1"}},t,r);return Ln(ne(n,t),(function(i){return se(t,i),Ln(i.text(),(function(s){if(!s)throw new Error("Failed parsing directory contents: Empty response");return Ln(Kt(s,t.parsing),(function(o){const u=qs(e);let l=(function(c,a,h){let p=arguments.length>3&&arguments[3]!==void 0&&arguments[3],y=arguments.length>4&&arguments[4]!==void 0&&arguments[4];const g=Ar().join(a,"/"),{multistatus:{response:m}}=c,b=m.map((v=>{const E=(function(P){try{return P.replace(/^https?:\/\/[^\/]+/,"")}catch(S){throw new me(S,"Failed normalising HREF")}})(v.href),{propstat:{prop:T}}=v;return Rr(T,g==="/"?decodeURIComponent(Dt(E)):Dt(Ar().relative(decodeURIComponent(g),decodeURIComponent(E))),p)}));return y?b:b.filter((v=>v.basename&&(v.type==="file"||v.filename!==h.replace(/\/$/,""))))})(o,qs(t.remoteBasePath||t.remotePath),u,r.details,r.includeSelf);return r.glob&&(l=(function(c,a){return c.filter((h=>de(h.filename,a,{matchBase:!0})))})(l,r.glob)),Tt(i,l,r.details)}))}))}))}));function _n(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}}const og=_n((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=ie({url:G(t.remoteURL,W(e)),method:"GET",headers:{Accept:"text/plain"},transformResponse:[lg]},t,r);return Fr(ne(n,t),(function(i){return se(t,i),Fr(i.text(),(function(s){return Tt(i,s,r.details)}))}))}));function Fr(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const ag=_n((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=ie({url:G(t.remoteURL,W(e)),method:"GET"},t,r);return Fr(ne(n,t),(function(i){let s;return se(t,i),(function(o,u){var l=o();return l&&l.then?l.then(u):u()})((function(){return Fr(i.arrayBuffer(),(function(o){s=o}))}),(function(){return Tt(i,s,r.details)}))}))})),ug=_n((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{format:n="binary"}=r;if(n!=="binary"&&n!=="text")throw new me({info:{code:Ye.InvalidOutputFormat}},`Invalid output format: ${n}`);return n==="text"?og(t,e,r):ag(t,e,r)})),lg=t=>t;function cg(t,e){let r="";return e.format&&e.indentBy.length>0&&(r=`
|
|
19
|
+
`),_o(t,e,"",r)}function _o(t,e,r,n){let i="",s=!1;for(let o=0;o<t.length;o++){const u=t[o],l=fg(u);if(l===void 0)continue;let c="";if(c=r.length===0?l:`${r}.${l}`,l===e.textNodeName){let y=u[l];hg(c,e)||(y=e.tagValueProcessor(l,y),y=Bo(y,e)),s&&(i+=n),i+=y,s=!1;continue}if(l===e.cdataPropName){s&&(i+=n),i+=`<![CDATA[${u[l][0][e.textNodeName]}]]>`,s=!1;continue}if(l===e.commentPropName){i+=n+`<!--${u[l][0][e.textNodeName]}-->`,s=!0;continue}if(l[0]==="?"){const y=Uo(u[":@"],e),g=l==="?xml"?"":n;let m=u[l][0][e.textNodeName];m=m.length!==0?" "+m:"",i+=g+`<${l}${m}${y}?>`,s=!0;continue}let a=n;a!==""&&(a+=e.indentBy);const h=n+`<${l}${Uo(u[":@"],e)}`,p=_o(u[l],e,c,a);e.unpairedTags.indexOf(l)!==-1?e.suppressUnpairedNode?i+=h+">":i+=h+"/>":p&&p.length!==0||!e.suppressEmptyNode?p&&p.endsWith(">")?i+=h+`>${p}${n}</${l}>`:(i+=h+">",p&&n!==""&&(p.includes("/>")||p.includes("</"))?i+=n+e.indentBy+p+n:i+=p,i+=`</${l}>`):i+=h+"/>",s=!0}return i}function fg(t){const e=Object.keys(t);for(let r=0;r<e.length;r++){const n=e[r];if(t.hasOwnProperty(n)&&n!==":@")return n}}function Uo(t,e){let r="";if(t&&!e.ignoreAttributes)for(let n in t){if(!t.hasOwnProperty(n))continue;let i=e.attributeValueProcessor(n,t[n]);i=Bo(i,e),i===!0&&e.suppressBooleanAttributes?r+=` ${n.substr(e.attributeNamePrefix.length)}`:r+=` ${n.substr(e.attributeNamePrefix.length)}="${i}"`}return r}function hg(t,e){let r=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(".")+1);for(let n in e.stopNodes)if(e.stopNodes[n]===t||e.stopNodes[n]==="*."+r)return!0;return!1}function Bo(t,e){if(t&&t.length>0&&e.processEntities)for(let r=0;r<e.entities.length;r++){const n=e.entities[r];t=t.replace(n.regex,n.val)}return t}const dg={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Xe(t){this.options=Object.assign({},dg,t),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=bo(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=mg),this.processTextOrObjNode=pg,this.options.format?(this.indentate=gg,this.tagEndChar=`>
|
|
20
|
+
`,this.newLine=`
|
|
21
|
+
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function pg(t,e,r,n){const i=this.j2x(t,r+1,n.concat(e));return t[this.options.textNodeName]!==void 0&&Object.keys(t).length===1?this.buildTextValNode(t[this.options.textNodeName],e,i.attrStr,r):this.buildObjectNode(i.val,e,i.attrStr,r)}function gg(t){return this.options.indentBy.repeat(t)}function mg(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}function yg(t){return new Xe({attributeNamePrefix:"@_",format:!0,ignoreAttributes:!1,suppressEmptyNode:!0}).build($o({lockinfo:{"@_xmlns:d":"DAV:",lockscope:{exclusive:{}},locktype:{write:{}},owner:{href:t}}},"d"))}function $o(t,e){const r={...t};for(const n in r)r.hasOwnProperty(n)&&(r[n]&&typeof r[n]=="object"&&n.indexOf(":")===-1?(r[`${e}:${n}`]=$o(r[n],e),delete r[n]):/^@_/.test(n)===!1&&(r[`${e}:${n}`]=r[n],delete r[n]));return r}function Un(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function ko(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}}Xe.prototype.build=function(t){return this.options.preserveOrder?cg(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0,[]).val)},Xe.prototype.j2x=function(t,e,r){let n="",i="";const s=r.join(".");for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o))if(t[o]===void 0)this.isAttribute(o)&&(i+="");else if(t[o]===null)this.isAttribute(o)||o===this.options.cdataPropName?i+="":o[0]==="?"?i+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(t[o]instanceof Date)i+=this.buildTextValNode(t[o],o,"",e);else if(typeof t[o]!="object"){const u=this.isAttribute(o);if(u&&!this.ignoreAttributesFn(u,s))n+=this.buildAttrPairStr(u,""+t[o]);else if(!u)if(o===this.options.textNodeName){let l=this.options.tagValueProcessor(o,""+t[o]);i+=this.replaceEntitiesValue(l)}else i+=this.buildTextValNode(t[o],o,"",e)}else if(Array.isArray(t[o])){const u=t[o].length;let l="",c="";for(let a=0;a<u;a++){const h=t[o][a];if(h!==void 0)if(h===null)o[0]==="?"?i+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(typeof h=="object")if(this.options.oneListGroup){const p=this.j2x(h,e+1,r.concat(o));l+=p.val,this.options.attributesGroupName&&h.hasOwnProperty(this.options.attributesGroupName)&&(c+=p.attrStr)}else l+=this.processTextOrObjNode(h,o,e,r);else if(this.options.oneListGroup){let p=this.options.tagValueProcessor(o,h);p=this.replaceEntitiesValue(p),l+=p}else l+=this.buildTextValNode(h,o,"",e)}this.options.oneListGroup&&(l=this.buildObjectNode(l,o,c,e)),i+=l}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){const u=Object.keys(t[o]),l=u.length;for(let c=0;c<l;c++)n+=this.buildAttrPairStr(u[c],""+t[o][u[c]])}else i+=this.processTextOrObjNode(t[o],o,e,r);return{attrStr:n,val:i}},Xe.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&e==="true"?" "+t:" "+t+'="'+e+'"'},Xe.prototype.buildObjectNode=function(t,e,r,n){if(t==="")return e[0]==="?"?this.indentate(n)+"<"+e+r+"?"+this.tagEndChar:this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar;{let i="</"+e+this.tagEndChar,s="";return e[0]==="?"&&(s="?",i=""),!r&&r!==""||t.indexOf("<")!==-1?this.options.commentPropName!==!1&&e===this.options.commentPropName&&s.length===0?this.indentate(n)+`<!--${t}-->`+this.newLine:this.indentate(n)+"<"+e+r+s+this.tagEndChar+t+this.indentate(n)+i:this.indentate(n)+"<"+e+r+s+">"+t+i}},Xe.prototype.closeTag=function(t){let e="";return this.options.unpairedTags.indexOf(t)!==-1?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},Xe.prototype.buildTextValNode=function(t,e,r,n){if(this.options.cdataPropName!==!1&&e===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${t}]]>`+this.newLine;if(this.options.commentPropName!==!1&&e===this.options.commentPropName)return this.indentate(n)+`<!--${t}-->`+this.newLine;if(e[0]==="?")return this.indentate(n)+"<"+e+r+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(e,t);return i=this.replaceEntitiesValue(i),i===""?this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+r+">"+i+"</"+e+this.tagEndChar}},Xe.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const r=this.options.entities[e];t=t.replace(r.regex,r.val)}return t};const bg=ko((function(t,e,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=ie({url:G(t.remoteURL,W(e)),method:"UNLOCK",headers:{"Lock-Token":r}},t,n);return Un(ne(i,t),(function(s){if(se(t,s),s.status!==204&&s.status!==200)throw Pn(s)}))})),wg=ko((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{refreshToken:n,timeout:i=xg}=r,s={Accept:"text/plain,application/xml",Timeout:i};n&&(s.If=n);const o=ie({url:G(t.remoteURL,W(e)),method:"LOCK",headers:s,data:yg(t.contactHref)},t,r);return Un(ne(o,t),(function(u){return se(t,u),Un(u.text(),(function(l){const c=(p=l,new Po({removeNSPrefix:!0,parseAttributeValue:!0,parseTagValue:!0}).parse(p)),a=We().get(c,"prop.lockdiscovery.activelock.locktoken.href"),h=We().get(c,"prop.lockdiscovery.activelock.timeout");var p;if(!a)throw Pn(u,"No lock token received: ");return{token:a,serverTimeout:h}}))}))})),xg="Infinite, Second-4100000000";function Bn(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const Eg=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=e.path||"/",n=ie({url:G(t.remoteURL,r),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},t,e);return Bn(ne(n,t),(function(i){return se(t,i),Bn(i.text(),(function(s){return Bn(Kt(s,t.parsing),(function(o){const u=(function(l){try{const[c]=l.multistatus.response,{propstat:{prop:{"quota-used-bytes":a,"quota-available-bytes":h}}}=c;return a!==void 0&&h!==void 0?{used:parseInt(String(a),10),available:Yp(h)}:null}catch{}return null})(o);return Tt(i,u,e.details)}))}))}))}));function $n(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const vg=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{details:n=!1}=r,i=ie({url:G(t.remoteURL,W(e)),method:"SEARCH",headers:{Accept:"text/plain,application/xml","Content-Type":t.headers["Content-Type"]||"application/xml; charset=utf-8"}},t,r);return $n(ne(i,t),(function(s){return se(t,s),$n(s.text(),(function(o){return $n(Kt(o,t.parsing),(function(u){const l=(function(c,a,h){const p={truncated:!1,results:[]};return p.truncated=c.multistatus.response.some((y=>(y.status||y.propstat?.status).split(" ",3)?.[1]==="507"&&y.href.replace(/\/$/,"").endsWith(W(a).replace(/\/$/,"")))),c.multistatus.response.forEach((y=>{if(y.propstat===void 0)return;const g=y.href.split("/").map(decodeURIComponent).join("/");p.results.push(Rr(y.propstat.prop,g,h))})),p})(u,e,n);return Tt(s,l,n)}))}))}))})),Tg=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=ie({url:G(t.remoteURL,W(e)),method:"MOVE",headers:{Destination:G(t.remoteURL,W(r)),Overwrite:n.overwrite===!1?"F":"T"}},t,n);return o=function(u){se(t,u)},(s=ne(i,t))&&s.then||(s=Promise.resolve(s)),o?s.then(o):s;var s,o}));var Ag=H(172);function Ng(t){if(ro(t))return t.byteLength;if(no(t))return t.length;if(typeof t=="string")return(0,Ag.d)(t);throw new me({info:{code:Ye.DataTypeNoLength}},"Cannot calculate data length: Invalid type")}const Pg=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const{contentLength:i=!0,overwrite:s=!0}=n,o={"Content-Type":"application/octet-stream"};i===!1||(o["Content-Length"]=typeof i=="number"?`${i}`:`${Ng(r)}`),s||(o["If-None-Match"]="*");const u=ie({url:G(t.remoteURL,W(e)),method:"PUT",headers:o,data:r},t,n);return c=function(a){try{se(t,a)}catch(h){const p=h;if(p.status!==412||s)throw p;return!1}return!0},(l=ne(u,t))&&l.then||(l=Promise.resolve(l)),c?l.then(c):l;var l,c})),jo=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=ie({url:G(t.remoteURL,W(e)),method:"OPTIONS"},t,r);return s=function(o){try{se(t,o)}catch(u){throw u}return{compliance:(o.headers.get("DAV")??"").split(",").map((u=>u.trim())),server:o.headers.get("Server")??""}},(i=ne(n,t))&&i.then||(i=Promise.resolve(i)),s?i.then(s):i;var i,s}));function Jt(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const Ig=kn((function(t,e,r,n,i){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(r>n||r<0)throw new me({info:{code:Ye.InvalidUpdateRange}},`Invalid update range ${r} for partial update`);const o={"Content-Type":"application/octet-stream","Content-Length":""+(n-r+1),"Content-Range":`bytes ${r}-${n}/*`},u=ie({url:G(t.remoteURL,W(e)),method:"PUT",headers:o,data:i},t,s);return Jt(ne(u,t),(function(l){se(t,l)}))}));function Mo(t,e){var r=t();return r&&r.then?r.then(e):e(r)}const Sg=kn((function(t,e,r,n,i){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(r>n||r<0)throw new me({info:{code:Ye.InvalidUpdateRange}},`Invalid update range ${r} for partial update`);const o={"Content-Type":"application/x-sabredav-partialupdate","Content-Length":""+(n-r+1),"X-Update-Range":`bytes=${r}-${n}`},u=ie({url:G(t.remoteURL,W(e)),method:"PATCH",headers:o,data:i},t,s);return Jt(ne(u,t),(function(l){se(t,l)}))}));function kn(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}}const Og=kn((function(t,e,r,n,i){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};return Jt(jo(t,e,s),(function(o){let u=!1;return Mo((function(){if(o.compliance.includes("sabredav-partialupdate"))return Jt(Sg(t,e,r,n,i,s),(function(l){return u=!0,l}))}),(function(l){let c=!1;return u?l:Mo((function(){if(o.server.includes("Apache")&&o.compliance.includes("<http://apache.org/dav/propset/fs/1>"))return Jt(Ig(t,e,r,n,i,s),(function(a){return c=!0,a}))}),(function(a){if(c)return a;throw new me({info:{code:Ye.NotSupported}},"Not supported")}))}))}))})),Cg="https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";function Rg(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{authType:r=null,remoteBasePath:n,contactHref:i=Cg,ha1:s,headers:o={},httpAgent:u,httpsAgent:l,password:c,token:a,username:h,withCredentials:p}=e;let y=r;y||(y=h||c?Te.Password:Te.None);const g={authType:y,remoteBasePath:n,contactHref:i,ha1:s,headers:Object.assign({},o),httpAgent:u,httpsAgent:l,password:c,parsing:{attributeNamePrefix:e.attributeNamePrefix??"@",attributeParsers:[],tagParsers:[Io]},remotePath:$d(t),remoteURL:t,token:a,username:h,withCredentials:p};return Zs(g,h,c,a,s),{copyFile:(m,b,v)=>wp(g,m,b,v),createDirectory:(m,b)=>Fn(g,m,b),createReadStream:(m,b)=>(function(v,E){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const P=new(Lo()).PassThrough;return eg(v,E,T).then((S=>{S.pipe(P)})).catch((S=>{P.emit("error",S)})),P})(g,m,b),createWriteStream:(m,b,v)=>(function(E,T){let P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},S=arguments.length>3&&arguments[3]!==void 0?arguments[3]:tg;const F=new(Lo()).PassThrough,L={};P.overwrite===!1&&(L["If-None-Match"]="*");const U=ie({url:G(E.remoteURL,W(T)),method:"PUT",headers:L,data:F,maxRedirects:0},E,P);return ne(U,E).then((_=>se(E,_))).then((_=>{setTimeout((()=>{S(_)}),0)})).catch((_=>{F.emit("error",_)})),F})(g,m,b,v),customRequest:(m,b)=>rg(g,m,b),deleteFile:(m,b)=>ng(g,m,b),exists:(m,b)=>ig(g,m,b),getDirectoryContents:(m,b)=>sg(g,m,b),getFileContents:(m,b)=>ug(g,m,b),getFileDownloadLink:m=>(function(b,v){let E=G(b.remoteURL,W(v));const T=/^https:/i.test(E)?"https":"http";switch(b.authType){case Te.None:break;case Te.Password:{const P=Js(b.headers.Authorization.replace(/^Basic /i,"").trim());E=E.replace(/^https?:\/\//,`${T}://${P}@`);break}default:throw new me({info:{code:Ye.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${b.authType}`)}return E})(g,m),getFileUploadLink:m=>(function(b,v){let E=`${G(b.remoteURL,W(v))}?Content-Type=application/octet-stream`;const T=/^https:/i.test(E)?"https":"http";switch(b.authType){case Te.None:break;case Te.Password:{const P=Js(b.headers.Authorization.replace(/^Basic /i,"").trim());E=E.replace(/^https?:\/\//,`${T}://${P}@`);break}default:throw new me({info:{code:Ye.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${b.authType}`)}return E})(g,m),getHeaders:()=>Object.assign({},g.headers),getQuota:m=>Eg(g,m),lock:(m,b)=>wg(g,m,b),moveFile:(m,b,v)=>Tg(g,m,b,v),putFileContents:(m,b,v)=>Pg(g,m,b,v),partialUpdateFileContents:(m,b,v,E,T)=>Og(g,m,b,v,E,T),getDAVCompliance:m=>jo(g,m),search:(m,b)=>vg(g,m,b),setHeaders:m=>{g.headers=Object.assign({},m)},stat:(m,b)=>Rn(g,m,b),unlock:(m,b,v)=>bg(g,m,b,v),registerAttributeParser:m=>{g.parsing.attributeParsers.push(m)},registerTagParser:m=>{g.parsing.tagParsers.push(m)}}}const ue=[];for(let t=0;t<256;++t)ue.push((t+256).toString(16).slice(1));function Fg(t,e=0){return(ue[t[e+0]]+ue[t[e+1]]+ue[t[e+2]]+ue[t[e+3]]+"-"+ue[t[e+4]]+ue[t[e+5]]+"-"+ue[t[e+6]]+ue[t[e+7]]+"-"+ue[t[e+8]]+ue[t[e+9]]+"-"+ue[t[e+10]]+ue[t[e+11]]+ue[t[e+12]]+ue[t[e+13]]+ue[t[e+14]]+ue[t[e+15]]).toLowerCase()}let jn;const Lg=new Uint8Array(16);function _g(){if(!jn){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");jn=crypto.getRandomValues.bind(crypto)}return jn(Lg)}var Vo={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Ug(t,e,r){t=t||{};const n=t.random??t.rng?.()??_g();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Fg(n)}function Bg(t,e,r){return Vo.randomUUID&&!t?Vo.randomUUID():Ug(t)}const Mn=(t,e)=>Object.fromEntries(Object.entries(t).map(([r,n])=>e.includes(r)?[r,n||""]:[st.DavNamespace.includes(r)?`d:${r}`:`oc:${r}`,n||""])),Do=(t=[],{pattern:e,filterRules:r,limit:n=0,extraProps:i=[]})=>{let s="d:propfind";e&&(s="oc:search-files"),r&&(s="oc:filter-files");const o=t.reduce((a,h)=>Object.assign(a,{[h]:null}),{}),u=Mn(o,i),l={[s]:{"d:prop":u,"@@xmlns:d":"DAV:","@@xmlns:oc":"http://owncloud.org/ns",...e&&{"oc:search":{"oc:pattern":e,"oc:limit":n}},...r&&{"oc:filter-rules":Mn(r,[])}}};return new ze({format:!0,ignoreAttributes:!1,attributeNamePrefix:"@@",suppressEmptyNode:!0}).build(l)},$g=t=>{const e={"d:propertyupdate":{"d:set":{"d:prop":Mn(t,[])},"@@xmlns:d":"DAV:","@@xmlns:oc":"http://owncloud.org/ns"}};return new ze({format:!0,ignoreAttributes:!1,attributeNamePrefix:"@@",suppressEmptyNode:!0}).build(e)},kg=t=>{const e={},r=t.get("tus-version");return r?(e.version=r.split(","),t.get("tus-extension")&&(e.extension=t.get("tus-extension").split(",")),t.get("tus-resumable")&&(e.resumable=t.get("tus-resumable")),t.get("tus-max-size")&&(e.maxSize=parseInt(t.get("tus-max-size"),10)),e):null},jg=async t=>{const e=n=>{const i=decodeURIComponent(n);return n?.startsWith("/remote.php/dav/")?k(i.replace("/remote.php/dav/",""),{leadingSlash:!0,trailingSlash:!1}):i};return(await Kt(t)).multistatus.response.map(({href:n,propstat:i})=>{const s={...Rr(i.prop,e(n),!0),processing:i.status==="HTTP/1.1 425 TOO EARLY"};return s.props.name&&(s.props.name=s.props.name.toString()),s})},Mg=t=>{const e=new js,r={message:"Unknown error",errorCode:void 0};try{const n=e.parse(t);if(!n["d:error"])return r;if(n["d:error"]["s:message"]){const i=n["d:error"]["s:message"];typeof i=="string"&&(r.message=i)}if(n["d:error"]["s:errorcode"]){const i=n["d:error"]["s:errorcode"];typeof i=="string"&&(r.errorCode=i)}}catch{return r}return r};class Vg{client;davPath;headers;extraProps;constructor({baseUrl:e,headers:r}){this.davPath=k(e,"remote.php/dav"),this.client=Rg(this.davPath,{}),this.headers=r,this.extraProps=[]}mkcol(e,r={}){return this.request(e,{method:De.mkcol,...r})}async propfind(e,{depth:r=1,properties:n=[],headers:i={},...s}={}){const o={...i,Depth:r.toString()},{body:u,result:l}=await this.request(e,{method:De.propfind,data:Do(n,{extraProps:this.extraProps}),headers:o,...s});return u?.length&&(u[0].tusSupport=kg(l.headers)),u}async report(e,{pattern:r="",filterRules:n=null,limit:i=30,properties:s,...o}={}){const{body:u,result:l}=await this.request(e,{method:De.report,data:Do(s,{pattern:r,filterRules:n,limit:i,extraProps:this.extraProps}),...o});return{results:u,range:l.headers.get("content-range")}}copy(e,r,{overwrite:n=!1,headers:i={},...s}={}){const o=k(this.davPath,fr(r));return this.request(e,{method:De.copy,headers:{...i,Destination:o,overwrite:n?"T":"F"},...s})}move(e,r,{overwrite:n=!1,headers:i={},...s}={}){const o=k(this.davPath,fr(r));return this.request(e,{method:De.move,headers:{...i,Destination:o,overwrite:n?"T":"F"},...s})}put(e,r,{headers:n={},onUploadProgress:i,previousEntityTag:s,overwrite:o,...u}={}){const l={...n};return s?l["If-Match"]=s:o||(l["If-None-Match"]="*"),this.request(e,{method:De.put,data:r,headers:l,onUploadProgress:i,...u})}delete(e,r={}){return this.request(e,{method:De.delete,...r})}propPatch(e,r,n={}){const i=$g(r);return this.request(e,{method:De.proppatch,data:i,...n})}getFileUrl(e){return k(this.davPath,fr(e))}buildHeaders(e={}){return{"Content-Type":"application/xml; charset=utf-8","X-Requested-With":"XMLHttpRequest","X-Request-ID":Bg(),...this.headers&&{...this.headers()},...e}}async request(e,r){const n=k(this.davPath,fr(e),{leadingSlash:!0}),i={...r,url:n,headers:this.buildHeaders(r.headers||{})};try{const s=await this.client.customRequest("",i);let o;if(s.status===207){const u=await s.text();o=await jg(u)}return{body:o,status:s.status,result:s}}catch(s){const{response:o}=s,u=await o.text(),l=Mg(u);throw new Qu(l.message,l.errorCode,o,o.status)}}}const Dg=(t,e)=>({async listFileVersions(r,n={}){const[i,...s]=await t.propfind(k("meta",r,"v",{leadingSlash:!0}),n);return s.map(o=>xt(o,t.extraProps))}}),Hg=(t,e)=>({setFavorite(r,{path:n},i,s={}){const o={[C.IsFavorite]:i?"true":"false"};return t.propPatch(k(r.webDavPath,n),o,s)}}),zg=(t,e)=>({listFavoriteFiles({davProperties:r=st.Default,username:n="",...i}={}){return t.report(k("files",n),{properties:r,filterRules:{favorite:1},...i})}}),qg=(t,e)=>{const r=Q.create();e&&r.interceptors.request.use(R=>(Object.assign(R.headers,e()),R));const n={axiosClient:r,baseUrl:t},i=new Vg({baseUrl:t,headers:e}),s=R=>{i.extraProps.push(R)},o=Fd(i),{getPathForFileId:u}=o,l=Ad(i,o),{listFiles:c}=l,a=Ed(l),{getFileInfo:h}=a,{createFolder:p}=wd(i,a),y=xd(i,n),{getFileContents:g}=y,{putFileContents:m}=Pd(i,a),{getFileUrl:b,revokeUrl:v}=vd(i,y,a,n),{getPublicFileUrl:E}=Td(i),{copyFiles:T}=bd(i),{moveFiles:P}=Nd(i),{deleteFile:S}=Id(i),{restoreFile:F}=Sd(i),{listFileVersions:L}=Dg(i),{restoreFileVersion:U}=Od(i),{clearTrashBin:_}=Cd(i),{search:j}=Rd(i),{listFavoriteFiles:pe}=zg(i),{setFavorite:oe}=Hg(i);return{copyFiles:T,createFolder:p,deleteFile:S,restoreFile:F,restoreFileVersion:U,getFileContents:g,getFileInfo:h,getFileUrl:b,getPublicFileUrl:E,getPathForFileId:u,listFiles:c,listFileVersions:L,moveFiles:P,putFileContents:m,revokeUrl:v,clearTrashBin:_,search:j,listFavoriteFiles:pe,setFavorite:oe,registerExtraProp:s}};var Ho=(t=>(t[t.COPY=0]="COPY",t[t.MOVE=1]="MOVE",t))(Ho||{});let Yt;self.onmessage=async t=>{const{topic:e,data:r}=JSON.parse(t.data);if(e==="tokenUpdate"&&Yt){Yt.Authorization?.toString().startsWith("Bearer")&&(Yt.Authorization=r.accessToken);return}const{baseUrl:n,headers:i,transferData:s}=r;Yt=i;const o=qg(n,()=>Yt),u=[],l=[],c=new sa({concurrency:4}),a=y=>o.copyFiles(y.sourceSpace,y.resource,y.targetSpace,{path:y.path},{overwrite:y.overwrite}),h=y=>o.moveFiles(y.sourceSpace,y.resource,y.targetSpace,{path:y.path},{overwrite:y.overwrite}),p=s.map(y=>c.add(async()=>{const g=y.resource;try{y.transferType===Ho.COPY?(await a(y),g.id=void 0,g.fileId=void 0):await h(y),g.path=Qt.join(y.targetFolder.path,g.name),g.webDavPath=Qt.join(y.targetFolder.webDavPath,g.name),u.push(g)}catch(m){console.error(m),l.push({resourceName:g.name,message:m.message,statusCode:m.statusCode,xReqId:m.response.headers?.get("x-request-id")})}}));await Promise.allSettled(p),postMessage(JSON.stringify({successful:u,failed:l}))}})();
|