@opencloud-eu/web-pkg 7.0.0 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/worker-BJYfkZQP.js +25 -0
- package/dist/assets/worker-CXvpBk--.js +25 -0
- package/dist/assets/worker-liEKqzWv.js +25 -0
- package/dist/{components-DGm07xAo.js → components-GUHsaO1-.js} +2900 -2885
- package/dist/src/composables/piniaStores/capabilities.d.ts +1 -13
- package/dist/web-pkg/editor.js +171 -180
- package/dist/web-pkg.css +3 -0
- package/dist/web-pkg.js +240 -226
- package/package.json +15 -5
- package/dist/assets/worker-B8V6K8WY.js +0 -25
- package/dist/assets/worker-BjLAp2qA.js +0 -25
- package/dist/assets/worker-Cz7k4ET0.js +0 -25
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
(function(){var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),u=l(o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i<a;i++)o[i]=n[i].fn;return o},c.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},c.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var c=this._events[s],l=arguments.length,u,d;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,o),!0}for(d=1,u=Array(l-1);d<l;d++)u[d-1]=arguments[d];c.fn.apply(c.context,u)}else{var f=c.length,p;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),l){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,n);break;case 4:c[d].fn.call(c[d].context,t,n,i);break;default:if(!u)for(p=1,u=Array(l-1);p<l;p++)u[p-1]=arguments[p];c[d].fn.apply(c[d].context,u)}}return!0},c.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn===t&&(!i||o.once)&&(!n||o.context===n)&&s(this,a);else{for(var c=0,l=[],u=o.length;c<u;c++)(o[c].fn!==t||i&&!o[c].once||n&&o[c].context!==n)&&l.push(o[c]);l.length?this._events[a]=l.length===1?l[0]:l:s(this,a)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,t!==void 0&&(t.exports=c)}))(),1),d=class e extends Error{name=`TimeoutError`;constructor(t,n){super(t,n),Error.captureStackTrace?.(this,e)}};let f=e=>e.reason??new DOMException(`This operation was aborted.`,`AbortError`);function p(e,t){let{milliseconds:n,fallback:r,message:i,customTimers:a={setTimeout,clearTimeout},signal:o}=t,s,c,l=new Promise((t,l)=>{if(typeof n!=`number`||Math.sign(n)!==1)throw TypeError(`Expected \`milliseconds\` to be a positive number, got \`${n}\``);if(o?.aborted){l(f(o));return}if(o&&(c=()=>{l(f(o))},o.addEventListener(`abort`,c,{once:!0})),e.then(t,l),n===1/0)return;let u=new d;s=a.setTimeout.call(void 0,()=>{if(r){try{t(r())}catch(e){l(e)}return}typeof e.cancel==`function`&&e.cancel(),i===!1?t():i instanceof Error?l(i):(u.message=i??`Promise timed out after ${n} milliseconds`,l(u))},n)}).finally(()=>{l.clear(),c&&o&&o.removeEventListener(`abort`,c)});return l.clear=()=>{a.clearTimeout.call(void 0,s),s=void 0},l}function m(e,t,n){let r=0,i=e.length;for(;i>0;){let a=Math.trunc(i/2),o=r+a;n(e[o],t)<=0?(r=++o,i-=a+1):i=a}return r}var h=class{#e=[];#t=0;enqueue(e,t){let{priority:n=0,id:r}=t??{},{size:i}=this,a={priority:n,id:r,run:e};if(i===0){this.#e.length=0,this.#t=0,this.#e.push(a);return}if(this.#e.at(-1).priority>=n){this.#e.push(a);return}this.#n();let o=m(this.#e,a,(e,t)=>t.priority-e.priority);this.#e.splice(o,0,a)}setPriority(e,t){let n=this.#e.findIndex((t,n)=>n>=this.#t&&t.id===e);if(n===-1)throw ReferenceError(`No promise function with the id "${e}" exists in the queue.`);let[r]=this.#e.splice(n,1);this.enqueue(r.run,{priority:t,id:e})}remove(e){let t=this.#e.findIndex((t,n)=>n<this.#t?!1:typeof e==`string`?t.id===e:t.run===e);t!==-1&&this.#e.splice(t,1)}dequeue(){if(this.#t===this.#e.length)return;let e=this.#e[this.#t];return this.#t++,this.#t===this.#e.length?(this.#e.length=0,this.#t=0):this.#t>100&&this.#t>this.#e.length/2&&this.#n(),e?.run}filter(e){let t=[];for(let n=this.#t;n<this.#e.length;n++){let r=this.#e[n];r.priority===e.priority&&t.push(r.run)}return t}get size(){return this.#e.length-this.#t}#n(){this.#t!==0&&(this.#e.splice(0,this.#t),this.#t=0)}},g=class extends u.default{#e;#t;#n=0;#r;#i=!1;#a=!1;#o;#s=0;#c=0;#l;#u;#d;#f=[];#p=0;#m;#h;#g=0;#_;#v;#y=1n;#b=new Map;#x=new Set;timeout;constructor(e){if(super(),e={carryoverIntervalCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:h,strict:!1,...e},!(typeof e.intervalCap==`number`&&e.intervalCap>=1))throw 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 TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${e.interval?.toString()??``}\` (${typeof e.interval})`);if(e.strict&&e.interval===0)throw TypeError("The `strict` option requires a non-zero `interval`");if(e.strict&&e.intervalCap===1/0)throw TypeError("The `strict` option requires a finite `intervalCap`");if(this.#e=e.carryoverIntervalCount??e.carryoverConcurrencyCount??!1,this.#t=e.intervalCap===1/0||e.interval===0,this.#r=e.intervalCap,this.#o=e.interval,this.#d=e.strict,this.#m=new e.queueClass,this.#h=e.queueClass,this.concurrency=e.concurrency,e.timeout!==void 0&&!(Number.isFinite(e.timeout)&&e.timeout>0))throw TypeError(`Expected \`timeout\` to be a positive finite number, got \`${e.timeout}\` (${typeof e.timeout})`);this.timeout=e.timeout,this.#v=e.autoStart===!1,this.#z()}#S(e){for(;this.#p<this.#f.length;){let t=this.#f[this.#p];if(t!==void 0&&e-t>=this.#o)this.#p++;else break}(this.#p>100&&this.#p>this.#f.length/2||this.#p===this.#f.length)&&(this.#f=this.#f.slice(this.#p),this.#p=0)}#C(e){this.#d?this.#f.push(e):this.#n++}#w(){this.#d?this.#f.length>this.#p&&this.#f.pop():this.#n>0&&this.#n--}#T(){return this.#f.length-this.#p}get#E(){return this.#t?!0:this.#d?this.#T()<this.#r:this.#n<this.#r}get#D(){return this.#g<this.#_}#O(){this.#g--,this.#g===0&&this.emit(`pendingZero`),this.#P(),this.emit(`next`)}#k(){this.#u=void 0,this.#I(),this.#F()}#A(e){if(this.#d){if(this.#S(e),this.#T()>=this.#r){let t=this.#f[this.#p],n=this.#o-(e-t);return this.#j(n),!0}return!1}if(this.#l===void 0){let t=this.#s-e;if(t<0){if(this.#c>0){let t=e-this.#c;if(t<this.#o)return this.#j(this.#o-t),!0}this.#n=this.#e?this.#g:0}else return this.#j(t),!0}return!1}#j(e){this.#u===void 0&&(this.#u=setTimeout(()=>{this.#k()},e))}#M(){this.#l&&=(clearInterval(this.#l),void 0)}#N(){this.#u&&=(clearTimeout(this.#u),void 0)}#P(){if(this.#m.size===0){if(this.#M(),this.emit(`empty`),this.#g===0){if(this.#N(),this.#d&&this.#p>0){let e=Date.now();this.#S(e)}this.emit(`idle`)}return!1}let e=!1;if(!this.#v){let t=Date.now(),n=!this.#A(t);if(this.#E&&this.#D){let r=this.#m.dequeue();this.#t||(this.#C(t),this.#B()),this.emit(`active`),r(),n&&this.#F(),e=!0}}return e}#F(){this.#t||this.#l!==void 0||this.#d||(this.#l=setInterval(()=>{this.#I()},this.#o),this.#s=Date.now()+this.#o)}#I(){this.#d||(this.#n===0&&this.#g===0&&this.#l&&this.#M(),this.#n=this.#e?this.#g:0),this.#L(),this.#B()}#L(){for(;this.#P(););}get concurrency(){return this.#_}set concurrency(e){if(!(typeof e==`number`&&e>=1))throw TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this.#_=e,this.#L()}setPriority(e,t){if(typeof t!=`number`||!Number.isFinite(t))throw TypeError(`Expected \`priority\` to be a finite number, got \`${t}\` (${typeof t})`);this.#m.setPriority(e,t)}async add(e,t={}){return t={timeout:this.timeout,...t,id:t.id??(this.#y++).toString()},new Promise((n,r)=>{let i=Symbol(`task-${t.id}`),a=()=>void 0,o=async()=>{a(),this.#g++,this.#b.set(i,{id:t.id,priority:t.priority??0,startTime:Date.now(),timeout:t.timeout});let o;try{try{t.signal?.throwIfAborted()}catch(e){throw this.#V(),this.#b.delete(i),e}this.#c=Date.now();let r=e({signal:t.signal});if(t.timeout&&(r=p(Promise.resolve(r),{milliseconds:t.timeout,message:`Task timed out after ${t.timeout}ms (queue has ${this.#g} running, ${this.#m.size} waiting)`})),t.signal){let{signal:e}=t;r=Promise.race([r,new Promise((t,n)=>{o=()=>{n(e.reason)},e.addEventListener(`abort`,o,{once:!0})})])}let a=await r;n(a),this.emit(`completed`,a)}catch(e){r(e),this.emit(`error`,e)}finally{o&&t.signal?.removeEventListener(`abort`,o),this.#b.delete(i),queueMicrotask(()=>{this.#O()})}};this.#m.enqueue(o,t);let s=()=>{if(this.#m instanceof h){this.#m.remove(o);return}this.#m.remove?.(t.id)};if(t.signal){let{signal:e}=t,n=()=>{a(),s(),r(e.reason),this.#P(),this.emit(`next`)};if(a=()=>{e.removeEventListener(`abort`,n),this.#x.delete(a)},e.aborted){n();return}e.addEventListener(`abort`,n,{once:!0}),this.#x.add(a)}this.emit(`add`),this.#P()})}async addAll(e,t){return Promise.all(e.map(async e=>this.add(e,t)))}start(){return this.#v?(this.#v=!1,this.#L(),this):this}pause(){this.#v=!0}clear(){for(let e of this.#x)e();this.#m=new this.#h,this.#M(),this.#H(),this.emit(`empty`),this.#g===0&&(this.#N(),this.emit(`idle`)),this.emit(`next`)}async onEmpty(){this.#m.size!==0&&await this.#R(`empty`)}async onSizeLessThan(e){this.#m.size<e||await this.#R(`next`,()=>this.#m.size<e)}async onIdle(){this.#g===0&&this.#m.size===0||await this.#R(`idle`)}async onPendingZero(){this.#g!==0&&await this.#R(`pendingZero`)}async onRateLimit(){this.isRateLimited||await this.#R(`rateLimit`)}async onRateLimitCleared(){this.isRateLimited&&await this.#R(`rateLimitCleared`)}onError(){return new Promise((e,t)=>{let n=e=>{this.off(`error`,n),t(e)};this.on(`error`,n)})}async#R(e,t){return new Promise(n=>{let r=()=>{t&&!t()||(this.off(e,r),n())};this.on(e,r)})}get size(){return this.#m.size}sizeBy(e){return this.#m.filter(e).length}get pending(){return this.#g}get isPaused(){return this.#v}#z(){this.#t||(this.on(`add`,()=>{this.#m.size>0&&this.#B()}),this.on(`next`,()=>{this.#B()}))}#B(){this.#t||this.#a||(this.#a=!0,queueMicrotask(()=>{this.#a=!1,this.#H()}))}#V(){this.#t||(this.#w(),this.#B())}#H(){let e=this.#i;if(this.#t||this.#m.size===0){e&&(this.#i=!1,this.emit(`rateLimitCleared`));return}let t;if(this.#d){let e=Date.now();this.#S(e),t=this.#T()}else t=this.#n;let n=t>=this.#r;n!==e&&(this.#i=n,this.emit(n?`rateLimit`:`rateLimitCleared`))}get isRateLimited(){return this.#i}get isSaturated(){return this.#g===this.#_&&this.#m.size>0||this.isRateLimited&&this.#m.size>0}get runningTasks(){return[...this.#b.values()].map(e=>({...e,timeoutRemaining:e.timeout?Math.max(0,e.startTime+e.timeout-Date.now()):void 0}))}};function _(e,t){return function(){return e.apply(t,arguments)}}let{toString:v}=Object.prototype,{getPrototypeOf:y}=Object,{iterator:b,toStringTag:x}=Symbol,S=(e=>t=>{let n=v.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),C=e=>(e=e.toLowerCase(),t=>S(t)===e),w=e=>t=>typeof t===e,{isArray:ee}=Array,te=w(`undefined`);function T(e){return e!==null&&!te(e)&&e.constructor!==null&&!te(e.constructor)&&D(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}let E=C(`ArrayBuffer`);function ne(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&E(e.buffer),t}let re=w(`string`),D=w(`function`),ie=w(`number`),ae=e=>typeof e==`object`&&!!e,oe=e=>e===!0||e===!1,se=e=>{if(S(e)!==`object`)return!1;let t=y(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(x in e)&&!(b in e)},ce=e=>{if(!ae(e)||T(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},le=C(`Date`),ue=C(`File`),de=e=>!!(e&&e.uri!==void 0),fe=e=>e&&e.getParts!==void 0,pe=C(`Blob`),me=C(`FileList`),he=e=>ae(e)&&D(e.pipe);function ge(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}let _e=ge(),ve=_e.FormData===void 0?void 0:_e.FormData,ye=e=>{if(!e)return!1;if(ve&&e instanceof ve)return!0;let t=y(e);if(!t||t===Object.prototype||!D(e.append))return!1;let n=S(e);return n===`formdata`||n===`object`&&D(e.toString)&&e.toString()===`[object FormData]`},be=C(`URLSearchParams`),[xe,Se,Ce,we]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(C),Te=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function Ee(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),ee(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(T(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function De(e,t){if(T(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}let Oe=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,ke=e=>!te(e)&&e!==Oe;function Ae(...e){let{caseless:t,skipUndefined:n}=ke(this)&&this||{},r={},i=(e,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=t&&De(r,i)||i,o=He(r,a)?r[a]:void 0;se(o)&&se(e)?r[a]=Ae(o,e):se(e)?r[a]=Ae({},e):ee(e)?r[a]=e.slice():(!n||!te(e))&&(r[a]=e)};for(let t=0,n=e.length;t<n;t++)e[t]&&Ee(e[t],i);return r}let je=(e,t,n,{allOwnKeys:r}={})=>(Ee(t,(t,r)=>{n&&D(t)?Object.defineProperty(e,r,{__proto__:null,value:_(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Me=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Ne=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,`constructor`,{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,`super`,{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Pe=(e,t,n,r)=>{let i,a,o,s={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&y(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Fe=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},Ie=e=>{if(!e)return null;if(ee(e))return e;let t=e.length;if(!ie(t))return null;let n=Array(t);for(;t-- >0;)n[t]=e[t];return n},Le=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&y(Uint8Array)),Re=(e,t)=>{let n=(e&&e[b]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},ze=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Be=C(`HTMLFormElement`),Ve=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),He=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ue=C(`RegExp`),We=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};Ee(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},Ge=e=>{We(e,(t,n)=>{if(D(e)&&[`arguments`,`caller`,`callee`].includes(n))return!1;let r=e[n];if(D(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)}}})},Ke=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return ee(e)?r(e):r(String(e).split(t)),n},qe=()=>{},Je=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Ye(e){return!!(e&&D(e.append)&&e[x]===`FormData`&&e[b])}let Xe=e=>{let t=new WeakSet,n=e=>{if(ae(e)){if(t.has(e))return;if(T(e))return e;if(!(`toJSON`in e)){t.add(e);let r=ee(e)?[]:{};return Ee(e,(e,t)=>{let i=n(e);!te(i)&&(r[t]=i)}),t.delete(e),r}}return e};return n(e)},Ze=C(`AsyncFunction`),Qe=e=>e&&(ae(e)||D(e))&&D(e.then)&&D(e.catch),$e=((e,t)=>e?setImmediate:t?((e,t)=>(Oe.addEventListener(`message`,({source:n,data:r})=>{n===Oe&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),Oe.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,D(Oe.postMessage));var O={isArray:ee,isArrayBuffer:E,isBuffer:T,isFormData:ye,isArrayBufferView:ne,isString:re,isNumber:ie,isBoolean:oe,isObject:ae,isPlainObject:se,isEmptyObject:ce,isReadableStream:xe,isRequest:Se,isResponse:Ce,isHeaders:we,isUndefined:te,isDate:le,isFile:ue,isReactNativeBlob:de,isReactNative:fe,isBlob:pe,isRegExp:Ue,isFunction:D,isStream:he,isURLSearchParams:be,isTypedArray:Le,isFileList:me,forEach:Ee,merge:Ae,extend:je,trim:Te,stripBOM:Me,inherits:Ne,toFlatObject:Pe,kindOf:S,kindOfTest:C,endsWith:Fe,toArray:Ie,forEachEntry:Re,matchAll:ze,isHTMLForm:Be,hasOwnProperty:He,hasOwnProp:He,reduceDescriptors:We,freezeMethods:Ge,toObjectSet:Ke,toCamelCase:Ve,noop:qe,toFiniteNumber:Je,findKey:De,global:Oe,isContextDefined:ke,isSpecCompliantForm:Ye,toJSONObject:Xe,isAsyncFn:Ze,isThenable:Qe,setImmediate:$e,asap:typeof queueMicrotask<`u`?queueMicrotask.bind(Oe):typeof process<`u`&&process.nextTick||$e,isIterable:e=>e!=null&&D(e[b])};let et=O.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 tt=e=>{let t={},n,r,i;return e&&e.split(`
|
|
2
|
+
`).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!(!n||t[n]&&et[n])&&(n===`set-cookie`?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+`, `+r:r)}),t};function nt(e){let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}let rt=RegExp(`[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+`,`g`),it=RegExp(`[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+`,`g`);function at(e,t){return O.isArray(e)?e.map(e=>at(e,t)):nt(String(e).replace(t,``))}let ot=e=>at(e,rt),st=e=>at(e,it);function ct(e){let t=Object.create(null);return O.forEach(e.toJSON(),(e,n)=>{t[n]=st(e)}),t}let lt=Symbol(`internals`);function ut(e){return e&&String(e).trim().toLowerCase()}function dt(e){return e===!1||e==null?e:O.isArray(e)?e.map(dt):ot(String(e))}function ft(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}let pt=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function mt(e,t,n,r,i){if(O.isFunction(r))return r.call(this,t,n);if(i&&(t=n),O.isString(t)){if(O.isString(r))return t.indexOf(r)!==-1;if(O.isRegExp(r))return r.test(t)}}function ht(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function gt(e,t){let n=O.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var k=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=ut(t);if(!i)throw Error(`header name must be a non-empty string`);let a=O.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=dt(e))}let a=(e,t)=>O.forEach(e,(e,n)=>i(e,n,t));if(O.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(O.isString(e)&&(e=e.trim())&&!pt(e))a(tt(e),t);else if(O.isObject(e)&&O.isIterable(e)){let n={},r,i;for(let t of e){if(!O.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);n[i=t[0]]=(r=n[i])?O.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=ut(e),e){let n=O.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return ft(e);if(O.isFunction(t))return t.call(this,e,n);if(O.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=ut(e),e){let n=O.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||mt(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=ut(e),e){let i=O.findKey(n,e);i&&(!t||mt(n,n[i],i,t))&&(delete n[i],r=!0)}}return O.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||mt(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return O.forEach(this,(r,i)=>{let a=O.findKey(n,i);if(a){t[a]=dt(r),delete t[i];return}let o=e?ht(i):String(i).trim();o!==i&&delete t[i],t[o]=dt(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return O.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&O.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).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,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[lt]=this[lt]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=ut(e);t[r]||(gt(n,e),t[r]=!0)}return O.isArray(e)?e.forEach(r):r(e),this}};k.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),O.reduceDescriptors(k.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),O.freezeMethods(k);function _t(e){if(O.hasOwnProp(e,`toJSON`))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(O.hasOwnProp(t,`toJSON`))return!0;t=Object.getPrototypeOf(t)}return!1}function vt(e,t){let n=new Set(t.map(e=>String(e).toLowerCase())),r=[],i=e=>{if(typeof e!=`object`||!e||O.isBuffer(e))return e;if(r.indexOf(e)!==-1)return;e instanceof k&&(e=e.toJSON()),r.push(e);let t;if(O.isArray(e))t=[],e.forEach((e,n)=>{let r=i(e);O.isUndefined(r)||(t[n]=r)});else{if(!O.isPlainObject(e)&&_t(e))return r.pop(),e;t=Object.create(null);for(let[r,a]of Object.entries(e)){let e=n.has(r.toLowerCase())?`[REDACTED ****]`:i(a);O.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return i(e)}var A=class e extends Error{static from(t,n,r,i,a,o){let s=new e(t.message,n||t.code,r,i,a);return s.cause=t,s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),o&&Object.assign(s,o),s}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,`message`,{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,t=e&&O.hasOwnProp(e,`redact`)?e.redact:void 0,n=O.isArray(t)&&t.length>0?vt(e,t):O.toJSONObject(e);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,code:this.code,status:this.status}}};A.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,A.ERR_BAD_OPTION=`ERR_BAD_OPTION`,A.ECONNABORTED=`ECONNABORTED`,A.ETIMEDOUT=`ETIMEDOUT`,A.ECONNREFUSED=`ECONNREFUSED`,A.ERR_NETWORK=`ERR_NETWORK`,A.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,A.ERR_DEPRECATED=`ERR_DEPRECATED`,A.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,A.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,A.ERR_CANCELED=`ERR_CANCELED`,A.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,A.ERR_INVALID_URL=`ERR_INVALID_URL`,A.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;function yt(e){return O.isPlainObject(e)||O.isArray(e)}function bt(e){return O.endsWith(e,`[]`)?e.slice(0,-2):e}function xt(e,t,n){return e?e.concat(t).map(function(e,t){return e=bt(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function St(e){return O.isArray(e)&&!e.some(yt)}let Ct=O.toFlatObject(O,{},null,function(e){return/^is[A-Z]/.test(e)});function wt(e,t,n){if(!O.isObject(e))throw TypeError(`target must be an object`);t||=new FormData,n=O.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!O.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||d,a=n.dots,o=n.indexes,s=n.Blob||typeof Blob<`u`&&Blob,c=n.maxDepth===void 0?100:n.maxDepth,l=s&&O.isSpecCompliantForm(t);if(!O.isFunction(i))throw TypeError(`visitor must be a function`);function u(e){if(e===null)return``;if(O.isDate(e))return e.toISOString();if(O.isBoolean(e))return e.toString();if(!l&&O.isBlob(e))throw new A(`Blob is not supported. Use a Buffer instead.`);return O.isArrayBuffer(e)||O.isTypedArray(e)?l&&typeof Blob==`function`?new Blob([e]):Buffer.from(e):e}function d(e,n,i){let s=e;if(O.isReactNative(t)&&O.isReactNativeBlob(e))return t.append(xt(i,n,a),u(e)),!1;if(e&&!i&&typeof e==`object`){if(O.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(O.isArray(e)&&St(e)||(O.isFileList(e)||O.endsWith(n,`[]`))&&(s=O.toArray(e)))return n=bt(n),s.forEach(function(e,r){!(O.isUndefined(e)||e===null)&&t.append(o===!0?xt([n],r,a):o===null?n:n+`[]`,u(e))}),!1}return yt(e)?!0:(t.append(xt(i,n,a),u(e)),!1)}let f=[],p=Object.assign(Ct,{defaultVisitor:d,convertValue:u,isVisitable:yt});function m(e,n,r=0){if(!O.isUndefined(e)){if(r>c)throw new A(`Object is too deeply nested (`+r+` levels). Max depth: `+c,A.ERR_FORM_DATA_DEPTH_EXCEEDED);if(f.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));f.push(e),O.forEach(e,function(e,a){(!(O.isUndefined(e)||e===null)&&i.call(t,e,O.isString(a)?a.trim():a,n,p))===!0&&m(e,n?n.concat(a):[a],r+1)}),f.pop()}}if(!O.isObject(e))throw TypeError(`data must be an object`);return m(e),t}function Tt(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function Et(e,t){this._pairs=[],e&&wt(e,this,t)}let Dt=Et.prototype;Dt.append=function(e,t){this._pairs.push([e,t])},Dt.toString=function(e){let t=e?function(t){return e.call(this,t,Tt)}:Tt;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function Ot(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function kt(e,t,n){if(!t)return e;let r=n&&n.encode||Ot,i=O.isFunction(n)?{serialize:n}:n,a=i&&i.serialize,o;if(o=a?a(t,i):O.isURLSearchParams(t)?t.toString():new Et(t,i).toString(r),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var At=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,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&&=[]}forEach(e){O.forEach(this.handlers,function(t){t!==null&&e(t)})}},jt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Mt={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:Et,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},Nt=s({hasBrowserEnv:()=>Pt,hasStandardBrowserEnv:()=>It,hasStandardBrowserWebWorkerEnv:()=>Lt,navigator:()=>Ft,origin:()=>Rt});let Pt=typeof window<`u`&&typeof document<`u`,Ft=typeof navigator==`object`&&navigator||void 0,It=Pt&&(!Ft||[`ReactNative`,`NativeScript`,`NS`].indexOf(Ft.product)<0),Lt=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,Rt=Pt&&window.location.href||`http://localhost`;var j={...Nt,...Mt};function zt(e,t){return wt(e,new j.classes.URLSearchParams,{visitor:function(e,t,n,r){return j.isNode&&O.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}function Bt(e){return O.matchAll(/\w+|\[(\w*)]/g,e).map(e=>e[0]===`[]`?``:e[1]||e[0])}function Vt(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function Ht(e){function t(e,n,r,i){let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&O.isArray(r)?r.length:a,s?(O.hasOwnProp(r,a)?r[a]=O.isArray(r[a])?r[a].concat(n):[r[a],n]:r[a]=n,!o):((!O.hasOwnProp(r,a)||!O.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&O.isArray(r[a])&&(r[a]=Vt(r[a])),!o)}if(O.isFormData(e)&&O.isFunction(e.entries)){let n={};return O.forEachEntry(e,(e,r)=>{t(Bt(e),r,n,0)}),n}return null}let Ut=(e,t)=>e!=null&&O.hasOwnProp(e,t)?e[t]:void 0;function Wt(e,t,n){if(O.isString(e))try{return(t||JSON.parse)(e),O.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}let Gt={transitional:jt,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=O.isObject(e);if(i&&O.isHTMLForm(e)&&(e=new FormData(e)),O.isFormData(e))return r?JSON.stringify(Ht(e)):e;if(O.isArrayBuffer(e)||O.isBuffer(e)||O.isStream(e)||O.isFile(e)||O.isBlob(e)||O.isReadableStream(e))return e;if(O.isArrayBufferView(e))return e.buffer;if(O.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){let t=Ut(this,`formSerializer`);if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return zt(e,t).toString();if((a=O.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let n=Ut(this,`env`),r=n&&n.FormData;return wt(a?{"files[]":e}:e,r&&new r,t)}}return i||r?(t.setContentType(`application/json`,!1),Wt(e)):e}],transformResponse:[function(e){let t=Ut(this,`transitional`)||Gt.transitional,n=t&&t.forcedJSONParsing,r=Ut(this,`responseType`),i=r===`json`;if(O.isResponse(e)||O.isReadableStream(e))return e;if(e&&O.isString(e)&&(n&&!r||i)){let n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,Ut(this,`parseReviver`))}catch(e){if(n)throw e.name===`SyntaxError`?A.from(e,A.ERR_BAD_RESPONSE,this,null,Ut(this,`response`)):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:j.classes.FormData,Blob:j.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};O.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`],e=>{Gt.headers[e]={}});function Kt(e,t){let n=this||Gt,r=t||n,i=k.from(r.headers),a=r.data;return O.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function qt(e){return!!(e&&e.__CANCEL__)}var Jt=class extends A{constructor(e,t,n){super(e??`canceled`,A.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function Yt(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new A(`Request failed with status code `+n.status,n.status>=400&&n.status<500?A.ERR_BAD_REQUEST:A.ERR_BAD_RESPONSE,n.config,n.request,n))}function Xt(e){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||``}function Zt(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||=c,n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}function Qt(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i)]}let $t=(e,t,n=3)=>{let r=0,i=Zt(50,250);return Qt(n=>{if(!n||typeof n.loaded!=`number`)return;let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=o==null?a:Math.min(a,o),c=Math.max(0,s-r),l=i(c);r=Math.max(r,s),e({loaded:s,total:o,progress:o?s/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-s)/l:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},en=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},tn=e=>(...t)=>O.asap(()=>e(...t));var nn=j.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,j.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(j.origin),j.navigator&&/(msie|trident)/i.test(j.navigator.userAgent)):()=>!0,rn=j.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];O.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),O.isString(r)&&s.push(`path=${r}`),O.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),O.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.split(`;`);for(let n=0;n<t.length;n++){let r=t[n].replace(/^\s+/,``),i=r.indexOf(`=`);if(i!==-1&&r.slice(0,i)===e)return decodeURIComponent(r.slice(i+1))}return null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};function an(e){return typeof e==`string`?/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e):!1}function on(e,t){return t?e.replace(/\/?\/$/,``)+`/`+t.replace(/^\/+/,``):e}function sn(e,t,n){let r=!an(t);return e&&(r||n===!1)?on(e,t):t}let cn=e=>e instanceof k?{...e}:e;function ln(e,t){t||={};let n=Object.create(null);Object.defineProperty(n,`hasOwnProperty`,{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(e,t,n,r){return O.isPlainObject(e)&&O.isPlainObject(t)?O.merge.call({caseless:r},e,t):O.isPlainObject(t)?O.merge({},t):O.isArray(t)?t.slice():t}function i(e,t,n,i){if(!O.isUndefined(t))return r(e,t,n,i);if(!O.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!O.isUndefined(t))return r(void 0,t)}function o(e,t){if(!O.isUndefined(t))return r(void 0,t);if(!O.isUndefined(e))return r(void 0,e)}function s(n,i,a){if(O.hasOwnProp(t,a))return r(n,i);if(O.hasOwnProp(e,a))return r(void 0,n)}let c={url:a,method:a,data:a,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,allowedSocketPaths:o,responseEncoding:o,validateStatus:s,headers:(e,t,n)=>i(cn(e),cn(t),n,!0)};return O.forEach(Object.keys({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=O.hasOwnProp(c,r)?c[r]:i,o=a(O.hasOwnProp(e,r)?e[r]:void 0,O.hasOwnProp(t,r)?t[r]:void 0,r);O.isUndefined(o)&&a!==s||(n[r]=o)}),n}let un=[`content-type`,`content-length`];function dn(e,t,n){if(n!==`content-only`){e.set(t);return}Object.entries(t).forEach(([t,n])=>{un.includes(t.toLowerCase())&&e.set(t,n)})}let fn=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16)));var pn=e=>{let t=ln({},e),n=e=>O.hasOwnProp(t,e)?t[e]:void 0,r=n(`data`),i=n(`withXSRFToken`),a=n(`xsrfHeaderName`),o=n(`xsrfCookieName`),s=n(`headers`),c=n(`auth`),l=n(`baseURL`),u=n(`allowAbsoluteUrls`),d=n(`url`);if(t.headers=s=k.from(s),t.url=kt(sn(l,d,u),e.params,e.paramsSerializer),c&&s.set(`Authorization`,`Basic `+btoa((c.username||``)+`:`+(c.password?fn(c.password):``))),O.isFormData(r)&&(j.hasStandardBrowserEnv||j.hasStandardBrowserWebWorkerEnv?s.setContentType(void 0):O.isFunction(r.getHeaders)&&dn(s,r.getHeaders(),n(`formDataHeaderPolicy`))),j.hasStandardBrowserEnv&&(O.isFunction(i)&&(i=i(t)),i===!0||i==null&&nn(t.url))){let e=a&&o&&rn.read(o);e&&s.set(a,e)}return t},mn=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=pn(e),i=r.data,a=k.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function g(){if(!h)return;let r=k.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders());Yt(function(e){t(e),m()},function(e){n(e),m()},{data:!o||o===`text`||o===`json`?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}`onloadend`in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.startsWith(`file:`))||setTimeout(g)},h.onabort=function(){h&&=(n(new A(`Request aborted`,A.ECONNABORTED,e,h)),m(),null)},h.onerror=function(t){let r=new A(t&&t.message?t.message:`Network Error`,A.ERR_NETWORK,e,h);r.event=t||null,n(r),m(),h=null},h.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||jt;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new A(t,i.clarifyTimeoutError?A.ETIMEDOUT:A.ECONNABORTED,e,h)),m(),h=null},i===void 0&&a.setContentType(null),`setRequestHeader`in h&&O.forEach(ct(a),function(e,t){h.setRequestHeader(t,e)}),O.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!==`json`&&(h.responseType=r.responseType),c&&([d,p]=$t(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=$t(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&=(n(!t||t.type?new Jt(null,e,h):t),h.abort(),m(),null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let _=Xt(r.url);if(_&&!j.protocols.includes(_)){n(new A(`Unsupported protocol `+_+`:`,A.ERR_BAD_REQUEST,e));return}h.send(i||null)})};let hn=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;let n=new AbortController,r=!1,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof A?t:new Jt(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new A(`timeout of ${t}ms exceeded`,A.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>e.addEventListener(`abort`,i));let{signal:s}=n;return s.unsubscribe=()=>O.asap(o),s},gn=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},_n=async function*(e,t){for await(let n of vn(e))yield*gn(n,t)},vn=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},yn=(e,t,n,r)=>{let i=_n(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})};function bn(e){if(!e||typeof e!=`string`||!e.startsWith(`data:`))return 0;let t=e.indexOf(`,`);if(t<0)return 0;let n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let e=r.length,t=r.length;for(let n=0;n<t;n++)if(r.charCodeAt(n)===37&&n+2<t){let t=r.charCodeAt(n+1),i=r.charCodeAt(n+2);(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102)&&(i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102)&&(e-=2,n+=2)}let n=0,i=t-1,a=e=>e>=2&&r.charCodeAt(e-2)===37&&r.charCodeAt(e-1)===51&&(r.charCodeAt(e)===68||r.charCodeAt(e)===100);i>=0&&(r.charCodeAt(i)===61?(n++,i--):a(i)&&(n++,i-=3)),n===1&&i>=0&&(r.charCodeAt(i)===61||a(i))&&n++;let o=Math.floor(e/4)*3-(n||0);return o>0?o:0}if(typeof Buffer<`u`&&typeof Buffer.byteLength==`function`)return Buffer.byteLength(r,`utf8`);let i=0;for(let e=0,t=r.length;e<t;e++){let n=r.charCodeAt(e);if(n<128)i+=1;else if(n<2048)i+=2;else if(n>=55296&&n<=56319&&e+1<t){let t=r.charCodeAt(e+1);t>=56320&&t<=57343?(i+=4,e++):i+=3}else i+=3}return i}let xn=`1.16.1`,Sn=64*1024,{isFunction:Cn}=O,wn=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Tn=e=>{let t=O.global!==void 0&&O.global!==null?O.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=O.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);let{fetch:i,Request:a,Response:o}=e,s=i?Cn(i):typeof fetch==`function`,c=Cn(a),l=Cn(o);if(!s)return!1;let u=s&&Cn(n),d=s&&(typeof r==`function`?(e=>t=>e.encode(t))(new r):async e=>new Uint8Array(await new a(e).arrayBuffer())),f=c&&u&&wn(()=>{let e=!1,t=new a(j.origin,{body:new n,method:`POST`,get duplex(){return e=!0,`half`}}),r=t.headers.has(`Content-Type`);return t.body!=null&&t.body.cancel(),e&&!r}),p=l&&u&&wn(()=>O.isReadableStream(new o(``).body)),m={stream:p&&(e=>e.body)};s&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!m[e]&&(m[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new A(`Response type '${e}' is not supported`,A.ERR_NOT_SUPPORT,n)})});let h=async e=>{if(e==null)return 0;if(O.isBlob(e))return e.size;if(O.isSpecCompliantForm(e))return(await new a(j.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(O.isArrayBufferView(e)||O.isArrayBuffer(e))return e.byteLength;if(O.isURLSearchParams(e)&&(e+=``),O.isString(e))return(await d(e)).byteLength},g=async(e,t)=>O.toFiniteNumber(e.getContentLength())??h(t);return async e=>{let{url:t,method:n,data:s,signal:l,cancelToken:u,timeout:d,onDownloadProgress:h,onUploadProgress:_,responseType:v,headers:y,withCredentials:b=`same-origin`,fetchOptions:x,maxContentLength:S,maxBodyLength:C}=pn(e),w=O.isNumber(S)&&S>-1,ee=O.isNumber(C)&&C>-1,te=i||fetch;v=v?(v+``).toLowerCase():`text`;let T=hn([l,u&&u.toAbortSignal()],d),E=null,ne=T&&T.unsubscribe&&(()=>{T.unsubscribe()}),re;try{if(w&&typeof t==`string`&&t.startsWith(`data:`)&&bn(t)>S)throw new A(`maxContentLength size of `+S+` exceeded`,A.ERR_BAD_RESPONSE,e,E);if(ee&&n!==`get`&&n!==`head`){let t=await g(y,s);if(typeof t==`number`&&isFinite(t)&&t>C)throw new A(`Request body larger than maxBodyLength limit`,A.ERR_BAD_REQUEST,e,E)}if(_&&f&&n!==`get`&&n!==`head`&&(re=await g(y,s))!==0){let e=new a(t,{method:`POST`,body:s,duplex:`half`}),n;if(O.isFormData(s)&&(n=e.headers.get(`content-type`))&&y.setContentType(n),e.body){let[t,n]=en(re,$t(tn(_)));s=yn(e.body,Sn,t,n)}}O.isString(b)||(b=b?`include`:`omit`);let i=c&&`credentials`in a.prototype;if(O.isFormData(s)){let e=y.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&y.delete(`content-type`)}y.set(`User-Agent`,`axios/`+xn,!1);let l={...x,signal:T,method:n.toUpperCase(),headers:ct(y.normalize()),body:s,duplex:`half`,credentials:i?b:void 0};E=c&&new a(t,l);let u=await(c?te(E,x):te(t,l));if(w){let t=O.toFiniteNumber(u.headers.get(`content-length`));if(t!=null&&t>S)throw new A(`maxContentLength size of `+S+` exceeded`,A.ERR_BAD_RESPONSE,e,E)}let d=p&&(v===`stream`||v===`response`);if(p&&u.body&&(h||w||d&&ne)){let t={};[`status`,`statusText`,`headers`].forEach(e=>{t[e]=u[e]});let n=O.toFiniteNumber(u.headers.get(`content-length`)),[r,i]=h&&en(n,$t(tn(h),!0))||[],a=0;u=new o(yn(u.body,Sn,t=>{if(w&&(a=t,a>S))throw new A(`maxContentLength size of `+S+` exceeded`,A.ERR_BAD_RESPONSE,e,E);r&&r(t)},()=>{i&&i(),ne&&ne()}),t)}v||=`text`;let D=await m[O.findKey(m,v)||`text`](u,e);if(w&&!p&&!d){let t;if(D!=null&&(typeof D.byteLength==`number`?t=D.byteLength:typeof D.size==`number`?t=D.size:typeof D==`string`&&(t=typeof r==`function`?new r().encode(D).byteLength:D.length)),typeof t==`number`&&t>S)throw new A(`maxContentLength size of `+S+` exceeded`,A.ERR_BAD_RESPONSE,e,E)}return!d&&ne&&ne(),await new Promise((t,n)=>{Yt(t,n,{data:D,headers:k.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:E})})}catch(t){if(ne&&ne(),T&&T.aborted&&T.reason instanceof A){let n=T.reason;throw n.config=e,E&&(n.request=E),t!==n&&(n.cause=t),n}throw t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)?Object.assign(new A(`Network Error`,A.ERR_NETWORK,e,E,t&&t.response),{cause:t.cause||t}):A.from(t,t&&t.code,e,E,t&&t.response)}}},En=new Map,Dn=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=En;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:Tn(t)),l=c;return c};Dn();let On={http:null,xhr:mn,fetch:{get:Dn}};O.forEach(On,(e,t)=>{if(e){try{Object.defineProperty(e,`name`,{__proto__:null,value:t})}catch{}Object.defineProperty(e,`adapterName`,{__proto__:null,value:t})}});let kn=e=>`- ${e}`,An=e=>O.isFunction(e)||e===null||e===!1;function jn(e,t){e=O.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!An(r)&&(i=On[(n=String(r)).toLowerCase()],i===void 0))throw new A(`Unknown adapter '${n}'`);if(i&&(O.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new A(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since :
|
|
4
|
+
`+e.map(kn).join(`
|
|
5
|
+
`):` `+kn(e[0]):`as no adapter specified`),`ERR_NOT_SUPPORT`)}return i}var Mn={getAdapter:jn,adapters:On};function Nn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Jt(null,e)}function Pn(e){return Nn(e),e.headers=k.from(e.headers),e.data=Kt.call(e,e.transformRequest),[`post`,`put`,`patch`].indexOf(e.method)!==-1&&e.headers.setContentType(`application/x-www-form-urlencoded`,!1),Mn.getAdapter(e.adapter||Gt.adapter,e)(e).then(function(t){Nn(e),e.response=t;try{t.data=Kt.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=k.from(t.headers),t},function(t){if(!qt(t)&&(Nn(e),t&&t.response)){e.response=t.response;try{t.response.data=Kt.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=k.from(t.response.headers)}return Promise.reject(t)})}let Fn={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{Fn[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});let In={};Fn.transitional=function(e,t,n){function r(e,t){return`[Axios v`+xn+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new A(r(i,` has been removed`+(t?` in `+t:``)),A.ERR_DEPRECATED);return t&&!In[i]&&(In[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),e?e(n,i,a):!0}},Fn.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function Ln(e,t,n){if(typeof e!=`object`)throw new A(`options must be an object`,A.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let a=r[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new A(`option `+a+` must be `+n,A.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new A(`Unknown option `+a,A.ERR_BAD_OPTION)}}var Rn={assertOptions:Ln,validators:Fn};let zn=Rn.validators;var Bn=class{constructor(e){this.defaults=e||{},this.interceptors={request:new At,response:new At}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=(()=>{if(!t.stack)return``;let e=t.stack.indexOf(`
|
|
6
|
+
`);return e===-1?``:t.stack.slice(e+1)})();try{if(!e.stack)e.stack=n;else if(n){let t=n.indexOf(`
|
|
7
|
+
`),r=t===-1?-1:n.indexOf(`
|
|
8
|
+
`,t+1),i=r===-1?``:n.slice(r+1);String(e.stack).endsWith(i)||(e.stack+=`
|
|
9
|
+
`+n)}}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=ln(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&Rn.assertOptions(n,{silentJSONParsing:zn.transitional(zn.boolean),forcedJSONParsing:zn.transitional(zn.boolean),clarifyTimeoutError:zn.transitional(zn.boolean),legacyInterceptorReqResOrdering:zn.transitional(zn.boolean)},!1),r!=null&&(O.isFunction(r)?t.paramsSerializer={serialize:r}:Rn.assertOptions(r,{encode:zn.function,serialize:zn.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),Rn.assertOptions(t,{baseUrl:zn.spelling(`baseURL`),withXsrfToken:zn.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&O.merge(i.common,i[t.method]);i&&O.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`,`common`],e=>{delete i[e]}),t.headers=k.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||jt;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[Pn.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=Pn.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=ln(this.defaults,e),kt(sn(e.baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};O.forEach([`delete`,`get`,`head`,`options`],function(e){Bn.prototype[e]=function(t,n){return this.request(ln(n||{},{method:e,url:t,data:(n||{}).data}))}}),O.forEach([`post`,`put`,`patch`,`query`],function(e){function t(t){return function(n,r,i){return this.request(ln(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}Bn.prototype[e]=t(),e!==`query`&&(Bn.prototype[e+`Form`]=t(!0))});var Vn=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new Jt(e,r,i),t(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;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function Hn(e){return function(t){return e.apply(null,t)}}function Un(e){return O.isObject(e)&&e.isAxiosError===!0}let Wn={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(Wn).forEach(([e,t])=>{Wn[t]=e});function Gn(e){let t=new Bn(e),n=_(Bn.prototype.request,t);return O.extend(n,Bn.prototype,t,{allOwnKeys:!0}),O.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return Gn(ln(e,t))},n}let M=Gn(Gt);M.Axios=Bn,M.CanceledError=Jt,M.CancelToken=Vn,M.isCancel=qt,M.VERSION=xn,M.toFormData=wt,M.AxiosError=A,M.Cancel=M.CanceledError,M.all=function(e){return Promise.all(e)},M.spread=Hn,M.isAxiosError=Un,M.mergeConfig=ln,M.AxiosHeaders=k,M.formToJSON=e=>Ht(O.isHTMLForm(e)?new FormData(e):e),M.getAdapter=Mn.getAdapter,M.HttpStatusCode=Wn,M.default=M,`https://localhost:9200/graph`.replace(/\/+$/,``);let Kn=e=>encodeURIComponent(e).split(`%2F`).join(`/`),qn=/^(\w+:\/\/[^/?]+)?(.*?)$/,Jn=e=>e.filter(e=>typeof e==`string`||typeof e==`number`).map(e=>`${e}`).filter(e=>e),Yn=e=>{let[,t=``,n=``]=e.join(`/`).match(qn)||[];return{prefix:t,pathname:{parts:n.split(`/`).filter(e=>e!==``),hasLeading:/^\/+/.test(n),hasTrailing:/\/+$/.test(n)}}},Xn=(e,t)=>{let{prefix:n,pathname:r}=e,{parts:i,hasLeading:a,hasTrailing:o}=r,{leadingSlash:s,trailingSlash:c}=t,l=s===!0||s===`keep`&&a,u=c===!0||c===`keep`&&o,d=n;return i.length>0&&((d||l)&&(d+=`/`),d+=i.join(`/`)),u&&(d+=`/`),!d&&l&&(d+=`/`),d},N=(...e)=>{let t=e[e.length-1],n;return t&&typeof t==`object`&&(n=t,e=e.slice(0,-1)),n={leadingSlash:!0,trailingSlash:!1,...n},e=Jn(e),Xn(Yn(e),n)};var Zn=class extends Error{response;statusCode;constructor(e,t,n=null){super(e),this.response=t,this.statusCode=n}},Qn=class extends Zn{errorCode;constructor(e,t,n,r=null){super(e,n,r),this.errorCode=t}};function $n(e,t=``){return`/public-files/${e}/${t}`.split(`/`).filter(Boolean).join(`/`)}function er(e,t=``){return`/ocm/${e}/${t}`.split(`/`).filter(Boolean).join(`/`)}var tr=l(o(((e,t)=>{function n(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}function r(e,t){for(var n=``,r=0,i=-1,a=0,o,s=0;s<=e.length;++s){if(s<e.length)o=e.charCodeAt(s);else if(o===47)break;else o=47;if(o===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){var c=n.lastIndexOf(`/`);if(c!==n.length-1){c===-1?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}}else if(n.length===2||n.length===1){n=``,r=0,i=s,a=0;continue}}t&&(n.length>0?n+=`/..`:n=`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===46&&a!==-1?++a:a=-1}return n}function i(e,t){var n=t.dir||t.root,r=t.base||(t.name||``)+(t.ext||``);return n?n===t.root?n+r:n+e+r:r}var a={resolve:function(){for(var e=``,t=!1,i,a=arguments.length-1;a>=-1&&!t;a--){var o;a>=0?o=arguments[a]:(i===void 0&&(i=process.cwd()),o=i),n(o),o.length!==0&&(e=o+`/`+e,t=o.charCodeAt(0)===47)}return e=r(e,!t),t?e.length>0?`/`+e:`/`:e.length>0?e:`.`},normalize:function(e){if(n(e),e.length===0)return`.`;var t=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return e=r(e,!t),e.length===0&&!t&&(e=`.`),e.length>0&&i&&(e+=`/`),t?`/`+e:e},isAbsolute:function(e){return n(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return`.`;for(var e,t=0;t<arguments.length;++t){var r=arguments[t];n(r),r.length>0&&(e===void 0?e=r:e+=`/`+r)}return e===void 0?`.`:a.normalize(e)},relative:function(e,t){if(n(e),n(t),e===t||(e=a.resolve(e),t=a.resolve(t),e===t))return``;for(var r=1;r<e.length&&e.charCodeAt(r)===47;++r);for(var i=e.length,o=i-r,s=1;s<t.length&&t.charCodeAt(s)===47;++s);for(var c=t.length-s,l=o<c?o:c,u=-1,d=0;d<=l;++d){if(d===l){if(c>l){if(t.charCodeAt(s+d)===47)return t.slice(s+d+1);if(d===0)return t.slice(s+d)}else o>l&&(e.charCodeAt(r+d)===47?u=d:d===0&&(u=0));break}var f=e.charCodeAt(r+d);if(f!==t.charCodeAt(s+d))break;f===47&&(u=d)}var p=``;for(d=r+u+1;d<=i;++d)(d===i||e.charCodeAt(d)===47)&&(p.length===0?p+=`..`:p+=`/..`);return p.length>0?p+t.slice(s+u):(s+=u,t.charCodeAt(s)===47&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(n(e),e.length===0)return`.`;for(var t=e.charCodeAt(0),r=t===47,i=-1,a=!0,o=e.length-1;o>=1;--o)if(t=e.charCodeAt(o),t===47){if(!a){i=o;break}}else a=!1;return i===-1?r?`/`:`.`:r&&i===1?`//`:e.slice(0,i)},basename:function(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);n(e);var r=0,i=-1,a=!0,o;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return``;var s=t.length-1,c=-1;for(o=e.length-1;o>=0;--o){var l=e.charCodeAt(o);if(l===47){if(!a){r=o+1;break}}else c===-1&&(a=!1,c=o+1),s>=0&&(l===t.charCodeAt(s)?--s===-1&&(i=o):(s=-1,i=c))}return r===i?i=c:i===-1&&(i=e.length),e.slice(r,i)}else{for(o=e.length-1;o>=0;--o)if(e.charCodeAt(o)===47){if(!a){r=o+1;break}}else i===-1&&(a=!1,i=o+1);return i===-1?``:e.slice(r,i)}},extname:function(e){n(e);for(var t=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(c===47){if(!a){r=s+1;break}continue}i===-1&&(a=!1,i=s+1),c===46?t===-1?t=s:o!==1&&(o=1):t!==-1&&(o=-1)}return t===-1||i===-1||o===0||o===1&&t===i-1&&t===r+1?``:e.slice(t,i)},format:function(e){if(typeof e!=`object`||!e)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof e);return i(`/`,e)},parse:function(e){n(e);var t={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return t;var r=e.charCodeAt(0),i=r===47,a;i?(t.root=`/`,a=1):a=0;for(var o=-1,s=0,c=-1,l=!0,u=e.length-1,d=0;u>=a;--u){if(r=e.charCodeAt(u),r===47){if(!l){s=u+1;break}continue}c===-1&&(l=!1,c=u+1),r===46?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1)}return o===-1||c===-1||d===0||d===1&&o===c-1&&o===s+1?c!==-1&&(s===0&&i?t.base=t.name=e.slice(1,c):t.base=t.name=e.slice(s,c)):(s===0&&i?(t.name=e.slice(1,o),t.base=e.slice(1,c)):(t.name=e.slice(s,o),t.base=e.slice(s,c)),t.ext=e.slice(o,c)),s>0?t.dir=e.slice(0,s-1):i&&(t.dir=`/`),t},sep:`/`,delimiter:`:`,win32:null,posix:null};a.posix=a,t.exports=a}))(),1),nr=class{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`};let rr=function(e){return e.copy=`COPY`,e.delete=`DELETE`,e.lock=`LOCK`,e.mkcol=`MKCOL`,e.move=`MOVE`,e.propfind=`PROPFIND`,e.proppatch=`PROPPATCH`,e.put=`PUT`,e.report=`REPORT`,e.unlock=`UNLOCK`,e}({}),ir=e=>({value:e,type:null}),ar=e=>ir(e),P=e=>ir(e),or=e=>ir(e),sr={Permissions:P(`permissions`),IsFavorite:or(`favorite`),FileId:P(`fileid`),FileParent:P(`file-parent`),Name:P(`name`),OwnerId:P(`owner-id`),OwnerDisplayName:P(`owner-display-name`),PrivateLink:P(`privatelink`),ContentLength:or(`getcontentlength`),ContentSize:or(`size`),LastModifiedDate:P(`getlastmodified`),Tags:ar(`tags`),Audio:{value:`audio`,type:null},Location:{value:`location`,type:null},Image:{value:`image`,type:null},Photo:{value:`photo`,type:null},ETag:P(`getetag`),MimeType:P(`getcontenttype`),ResourceType:(e=>ir(e))(`resourcetype`),LockDiscovery:{value:`lockdiscovery`,type:null},LockOwner:P(`owner`),LockTime:P(`locktime`),ActiveLock:{value:`activelock`,type:null},DownloadURL:P(`downloadURL`),Highlights:P(`highlights`),MetaPathForUser:P(`meta-path-for-user`),RemoteItemId:P(`remote-item-id`),HasPreview:or(`has-preview`),ShareId:P(`shareid`),ShareRoot:P(`shareroot`),ShareTypes:{value:`share-types`,type:null},SharePermissions:P(`share-permissions`),TrashbinOriginalFilename:P(`trashbin-original-filename`),TrashbinOriginalLocation:P(`trashbin-original-location`),TrashbinDeletedDate:P(`trashbin-delete-datetime`),PublicLinkItemType:P(`public-link-item-type`),PublicLinkPermission:P(`public-link-permission`),PublicLinkExpiration:P(`public-link-expiration`),PublicLinkShareDate:P(`public-link-share-datetime`),PublicLinkShareOwner:P(`public-link-share-owner`)},F=Object.fromEntries(Object.entries(sr).map(([e,t])=>[e,t.value]));var cr=class e{static Default=[F.Permissions,F.IsFavorite,F.FileId,F.FileParent,F.Name,F.LockDiscovery,F.ActiveLock,F.OwnerId,F.OwnerDisplayName,F.RemoteItemId,F.ShareRoot,F.ShareTypes,F.PrivateLink,F.ContentLength,F.ContentSize,F.LastModifiedDate,F.ETag,F.MimeType,F.ResourceType,F.Tags,F.Audio,F.Location,F.Image,F.Photo,F.HasPreview];static PublicLink=e.Default.concat([F.PublicLinkItemType,F.PublicLinkPermission,F.PublicLinkExpiration,F.PublicLinkShareDate,F.PublicLinkShareOwner]);static Trashbin=[F.ContentLength,F.ResourceType,F.TrashbinOriginalLocation,F.TrashbinOriginalFilename,F.TrashbinDeletedDate,F.Permissions,F.FileParent];static DavNamespace=[F.ContentLength,F.LastModifiedDate,F.ETag,F.MimeType,F.ResourceType,F.LockDiscovery,F.ActiveLock]},lr=typeof global==`object`&&global&&global.Object===Object&&global,ur=typeof self==`object`&&self&&self.Object===Object&&self,dr=lr||ur||Function(`return this`)(),fr=dr.Symbol,pr=Object.prototype,mr=pr.hasOwnProperty,hr=pr.toString,gr=fr?fr.toStringTag:void 0;function _r(e){var t=mr.call(e,gr),n=e[gr];try{e[gr]=void 0;var r=!0}catch{}var i=hr.call(e);return r&&(t?e[gr]=n:delete e[gr]),i}var vr=Object.prototype.toString;function yr(e){return vr.call(e)}var br=`[object Null]`,xr=`[object Undefined]`,Sr=fr?fr.toStringTag:void 0;function Cr(e){return e==null?e===void 0?xr:br:Sr&&Sr in Object(e)?_r(e):yr(e)}function wr(e){return typeof e==`object`&&!!e}var Tr=`[object Symbol]`;function Er(e){return typeof e==`symbol`||wr(e)&&Cr(e)==Tr}function Dr(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var Or=Array.isArray,kr=1/0,Ar=fr?fr.prototype:void 0,jr=Ar?Ar.toString:void 0;function Mr(e){if(typeof e==`string`)return e;if(Or(e))return Dr(e,Mr)+``;if(Er(e))return jr?jr.call(e):``;var t=e+``;return t==`0`&&1/e==-kr?`-0`:t}function Nr(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}function Pr(e){return e}var Fr=`[object AsyncFunction]`,Ir=`[object Function]`,Lr=`[object GeneratorFunction]`,Rr=`[object Proxy]`;function zr(e){if(!Nr(e))return!1;var t=Cr(e);return t==Ir||t==Lr||t==Fr||t==Rr}var Br=dr[`__core-js_shared__`],Vr=function(){var e=/[^.]+$/.exec(Br&&Br.keys&&Br.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function Hr(e){return!!Vr&&Vr in e}var Ur=Function.prototype.toString;function Wr(e){if(e!=null){try{return Ur.call(e)}catch{}try{return e+``}catch{}}return``}var Gr=/[\\^$.*+?()[\]{}|]/g,Kr=/^\[object .+?Constructor\]$/,qr=Function.prototype,Jr=Object.prototype,Yr=qr.toString,Xr=Jr.hasOwnProperty,Zr=RegExp(`^`+Yr.call(Xr).replace(Gr,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function Qr(e){return!Nr(e)||Hr(e)?!1:(zr(e)?Zr:Kr).test(Wr(e))}function $r(e,t){return e?.[t]}function ei(e,t){var n=$r(e,t);return Qr(n)?n:void 0}function ti(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var ni=800,ri=16,ii=Date.now;function ai(e){var t=0,n=0;return function(){var r=ii(),i=ri-(r-n);if(n=r,i>0){if(++t>=ni)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function oi(e){return function(){return e}}var si=function(){try{var e=ei(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),ci=ai(si?function(e,t){return si(e,`toString`,{configurable:!0,enumerable:!1,value:oi(t),writable:!0})}:Pr);function li(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function ui(e){return e!==e}function di(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function fi(e,t,n){return t===t?di(e,t,n):li(e,ui,n)}function pi(e,t){return!!(e!=null&&e.length)&&fi(e,t,0)>-1}function mi(e,t){return e===t||e!==e&&t!==t}var hi=Math.max;function gi(e,t,n){return t=hi(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=hi(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),ti(e,this,s)}}function _i(e,t){return ci(gi(e,t,Pr),e+``)}var vi=9007199254740991;function yi(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=vi}function bi(e){return e!=null&&yi(e.length)&&!zr(e)}function xi(e){return function(t){return e(t)}}var Si=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ci=/^\w*$/;function wi(e,t){if(Or(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||Er(e)?!0:Ci.test(e)||!Si.test(e)||t!=null&&e in Object(t)}var Ti=ei(Object,`create`);function Ei(){this.__data__=Ti?Ti(null):{},this.size=0}function Di(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var Oi=`__lodash_hash_undefined__`,ki=Object.prototype.hasOwnProperty;function Ai(e){var t=this.__data__;if(Ti){var n=t[e];return n===Oi?void 0:n}return ki.call(t,e)?t[e]:void 0}var ji=Object.prototype.hasOwnProperty;function Mi(e){var t=this.__data__;return Ti?t[e]!==void 0:ji.call(t,e)}var Ni=`__lodash_hash_undefined__`;function Pi(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=Ti&&t===void 0?Ni:t,this}function Fi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Fi.prototype.clear=Ei,Fi.prototype.delete=Di,Fi.prototype.get=Ai,Fi.prototype.has=Mi,Fi.prototype.set=Pi;function Ii(){this.__data__=[],this.size=0}function Li(e,t){for(var n=e.length;n--;)if(mi(e[n][0],t))return n;return-1}var Ri=Array.prototype.splice;function zi(e){var t=this.__data__,n=Li(t,e);return n<0?!1:(n==t.length-1?t.pop():Ri.call(t,n,1),--this.size,!0)}function Bi(e){var t=this.__data__,n=Li(t,e);return n<0?void 0:t[n][1]}function Vi(e){return Li(this.__data__,e)>-1}function Hi(e,t){var n=this.__data__,r=Li(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Ui(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ui.prototype.clear=Ii,Ui.prototype.delete=zi,Ui.prototype.get=Bi,Ui.prototype.has=Vi,Ui.prototype.set=Hi;var Wi=ei(dr,`Map`);function Gi(){this.size=0,this.__data__={hash:new Fi,map:new(Wi||Ui),string:new Fi}}function Ki(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function qi(e,t){var n=e.__data__;return Ki(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function Ji(e){var t=qi(this,e).delete(e);return this.size-=+!!t,t}function Yi(e){return qi(this,e).get(e)}function Xi(e){return qi(this,e).has(e)}function Zi(e,t){var n=qi(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Qi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Qi.prototype.clear=Gi,Qi.prototype.delete=Ji,Qi.prototype.get=Yi,Qi.prototype.has=Xi,Qi.prototype.set=Zi;var $i=`Expected a function`;function ea(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError($i);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(ea.Cache||Qi),n}ea.Cache=Qi;var ta=500;function na(e){var t=ea(e,function(e){return n.size===ta&&n.clear(),e}),n=t.cache;return t}var ra=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ia=/\\(\\)?/g,aa=na(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(ra,function(e,n,r,i){t.push(r?i.replace(ia,`$1`):n||e)}),t});function oa(e){return e==null?``:Mr(e)}function sa(e,t){return Or(e)?e:wi(e,t)?[e]:aa(oa(e))}var ca=1/0;function la(e){if(typeof e==`string`||Er(e))return e;var t=e+``;return t==`0`&&1/e==-ca?`-0`:t}function ua(e,t){t=sa(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[la(t[n++])];return n&&n==r?e:void 0}function da(e,t,n){var r=e==null?void 0:ua(e,t);return r===void 0?n:r}function fa(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}function pa(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:fa(e,t,n)}var ma=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`);function ha(e){return ma.test(e)}function ga(e){return e.split(``)}var _a=`\\ud800-\\udfff`,va=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,ya=`\\ufe0e\\ufe0f`,ba=`[`+_a+`]`,xa=`[`+va+`]`,Sa=`\\ud83c[\\udffb-\\udfff]`,Ca=`(?:`+xa+`|`+Sa+`)`,wa=`[^`+_a+`]`,Ta=`(?:\\ud83c[\\udde6-\\uddff]){2}`,Ea=`[\\ud800-\\udbff][\\udc00-\\udfff]`,Da=`\\u200d`,Oa=Ca+`?`,ka=`[`+ya+`]?`,Aa=`(?:`+Da+`(?:`+[wa,Ta,Ea].join(`|`)+`)`+ka+Oa+`)*`,ja=ka+Oa+Aa,Ma=`(?:`+[wa+xa+`?`,xa,Ta,Ea,ba].join(`|`)+`)`,Na=RegExp(Sa+`(?=`+Sa+`)|`+Ma+ja,`g`);function Pa(e){return e.match(Na)||[]}function Fa(e){return ha(e)?Pa(e):ga(e)}function Ia(e){return function(t){t=oa(t);var n=ha(t)?Fa(t):void 0,r=n?n[0]:t.charAt(0),i=n?pa(n,1).join(``):t.slice(1);return r[e]()+i}}var La=Ia(`toUpperCase`);function Ra(e){return La(oa(e).toLowerCase())}function za(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function Ba(e){return function(t){return e?.[t]}}var Va=Ba({À:`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`}),Ha=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ua=RegExp(`[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]`,`g`);function Wa(e){return e=oa(e),e&&e.replace(Ha,Va).replace(Ua,``)}var Ga=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Ka(e){return e.match(Ga)||[]}var qa=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Ja(e){return qa.test(e)}var Ya=`\\ud800-\\udfff`,Xa=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,Za=`\\u2700-\\u27bf`,Qa=`a-z\\xdf-\\xf6\\xf8-\\xff`,$a=`\\xac\\xb1\\xd7\\xf7`,eo=`\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf`,to=`\\u2000-\\u206f`,no=` \\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`,ro=`A-Z\\xc0-\\xd6\\xd8-\\xde`,io=`\\ufe0e\\ufe0f`,ao=$a+eo+to+no,oo=`['’]`,so=`[`+ao+`]`,co=`[`+Xa+`]`,lo=`\\d+`,uo=`[`+Za+`]`,fo=`[`+Qa+`]`,po=`[^`+Ya+ao+lo+Za+Qa+ro+`]`,mo=`(?:`+co+`|\\ud83c[\\udffb-\\udfff])`,ho=`[^`+Ya+`]`,go=`(?:\\ud83c[\\udde6-\\uddff]){2}`,_o=`[\\ud800-\\udbff][\\udc00-\\udfff]`,vo=`[`+ro+`]`,yo=`\\u200d`,bo=`(?:`+fo+`|`+po+`)`,xo=`(?:`+vo+`|`+po+`)`,So=`(?:`+oo+`(?:d|ll|m|re|s|t|ve))?`,Co=`(?:`+oo+`(?:D|LL|M|RE|S|T|VE))?`,wo=mo+`?`,To=`[`+io+`]?`,Eo=`(?:`+yo+`(?:`+[ho,go,_o].join(`|`)+`)`+To+wo+`)*`,Do=`\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])`,Oo=`\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])`,ko=To+wo+Eo,Ao=`(?:`+[uo,go,_o].join(`|`)+`)`+ko,jo=RegExp([vo+`?`+fo+`+`+So+`(?=`+[so,vo,`$`].join(`|`)+`)`,xo+`+`+Co+`(?=`+[so,vo+bo,`$`].join(`|`)+`)`,vo+`?`+bo+`+`+So,vo+`+`+Co,Oo,Do,lo,Ao].join(`|`),`g`);function Mo(e){return e.match(jo)||[]}function No(e,t,n){return e=oa(e),t=n?void 0:t,t===void 0?Ja(e)?Mo(e):Ka(e):e.match(t)||[]}var Po=RegExp(`['’]`,`g`);function Fo(e){return function(t){return za(No(Wa(t).replace(Po,``)),e,``)}}var Io=Fo(function(e,t,n){return t=t.toLowerCase(),e+(n?Ra(t):t)}),Lo=`__lodash_hash_undefined__`;function Ro(e){return this.__data__.set(e,Lo),this}function zo(e){return this.__data__.has(e)}function Bo(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Qi;++t<n;)this.add(e[t])}Bo.prototype.add=Bo.prototype.push=Ro,Bo.prototype.has=zo;function Vo(e,t){return e.has(t)}function Ho(e){return wr(e)&&bi(e)}function Uo(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var Wo=Math.min;function Go(e,t,n){for(var r=n?Uo:pi,i=e[0].length,a=e.length,o=a,s=Array(a),c=1/0,l=[];o--;){var u=e[o];o&&t&&(u=Dr(u,xi(t))),c=Wo(u.length,c),s[o]=!n&&(t||i>=120&&u.length>=120)?new Bo(o&&u):void 0}u=e[0];var d=-1,f=s[0];outer:for(;++d<i&&l.length<c;){var p=u[d],m=t?t(p):p;if(p=n||p!==0?p:0,!(f?Vo(f,m):r(l,m,n))){for(o=a;--o;){var h=s[o];if(!(h?Vo(h,m):r(e[o],m,n)))continue outer}f&&f.push(m),l.push(p)}}return l}function Ko(e){return Ho(e)?e:[]}var qo=_i(function(e){var t=Dr(e,Ko);return t.length&&t[0]===e[0]?Go(t):[]});let Jo={complex:[`tar.bz2`,`tar.gz`,`tar.xz`]},Yo=e=>e.replace(/[^A-Za-z0-9\-_]/g,``),Xo=(e,t)=>!e||typeof e!=`string`?``:e.indexOf(`!`)>=0?e.split(`!`)[t]:``,Zo=e=>Xo(e,0),Qo=e=>Xo(e,1),$o=e=>{let t=e.name.split(`.`);if(t.length>2)for(let e=0;e<t.length;e++){let n=t.slice(e,t.length).join(`.`);if(Jo.complex.includes(n))return n}return t.length<2?``:t[t.length-1]},es=e=>{if(!e)return e;let t={};return Object.keys(e).forEach(n=>{t[Io(n)]=e[n]}),t};function ts(e,t=[]){let n=e.props[F.Name]?.toString()||(0,tr.basename)(e.filename),r=e.props[F.FileId],i=e.type===`directory`,a;a=e.filename.startsWith(`/files`)||e.filename.startsWith(`/space`)?e.filename.split(`/`).slice(3).join(`/`):e.filename,a.startsWith(`/`)||(a=`/${a}`);let o=$o({...e,id:r,name:n,path:a}),s=e.props[F.LockDiscovery],c,l,u;s&&(c=s[F.ActiveLock],l=c[F.LockOwner],u=c[F.LockTime]);let d=[];e.props[F.ShareTypes]&&(d=e.props[F.ShareTypes][`share-type`],Array.isArray(d)||(d=[d]));let f={};for(let n of t||[]){let t=n.split(`:`).pop();e.props[t]&&(f[n]=e.props[t])}let p={id:r,fileId:r,storageId:Zo(r),parentFolderId:e.props[F.FileParent],mimeType:e.props[F.MimeType],name:n,extension:o,path:a,webDavPath:e.filename,type:i?`folder`:e.type,isFolder:i,locked:!!c,lockOwner:l,lockTime:u,processing:e.processing||!1,mdate:e.props[F.LastModifiedDate],size:i?e.props[F.ContentSize]?.toString()||`0`:e.props[F.ContentLength]?.toString()||`0`,permissions:e.props[F.Permissions]||``,starred:e.props[F.IsFavorite]===1,etag:e.props[F.ETag],shareTypes:d,privateLink:e.props[F.PrivateLink],downloadURL:e.props[F.DownloadURL],remoteItemId:e.props[F.RemoteItemId],remoteItemPath:e.props[F.ShareRoot],owner:{id:e.props[F.OwnerId],displayName:e.props[F.OwnerDisplayName]},tags:(e.props[F.Tags]||``).toString().split(`,`).filter(Boolean),audio:es(e.props[F.Audio]),location:es(e.props[F.Location]),image:es(e.props[F.Image]),photo:es(e.props[F.Photo]),extraProps:f,hasPreview:()=>e.props[F.HasPreview]===1,canUpload:function(){return this.permissions.indexOf(nr.FolderCreateable)>=0},canDownload:function(){return this.permissions.indexOf(nr.SecureView)===-1},canBeDeleted:function(){return this.permissions.indexOf(nr.Deletable)>=0},canRename:function(){return this.permissions.indexOf(nr.Renameable)>=0},canShare:function({ability:e}){return e.can(`create-all`,`Share`)&&this.permissions.indexOf(nr.Shareable)>=0},canCreate:function(){return this.permissions.indexOf(nr.FolderCreateable)>=0},canEditTags:function(){return this.permissions.indexOf(nr.Updateable)>=0||this.permissions.indexOf(nr.FileUpdateable)>=0||this.permissions.indexOf(nr.FolderCreateable)>=0},isMounted:function(){return this.permissions.indexOf(nr.Mounted)>=0},isReceivedShare:function(){return this.permissions.indexOf(nr.Shared)>=0},isShareRoot(){return e.props[F.ShareRoot]?e.filename.split(`/`).length===3:!1},getDomSelector:()=>Yo(r)};return Object.defineProperty(p,`nodeId`,{get(){return Qo(this.id)}}),p}function ns(e){let t=e.type===`directory`,n=e.props[F.TrashbinOriginalFilename]?.toString(),r=$o({name:n,type:e.type}),i=tr.default.basename(e.filename);return{type:t?`folder`:e.type,isFolder:t,ddate:e.props[F.TrashbinDeletedDate],name:tr.default.basename(n),extension:r,path:N(e.props[F.TrashbinOriginalLocation],{leadingSlash:!0}),id:i,parentFolderId:e.props[F.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:()=>Yo(i)}}let rs=function(e){return e.createUpload=`libre.graph/driveItem/upload/create`,e.createPermissions=`libre.graph/driveItem/permissions/create`,e.createChildren=`libre.graph/driveItem/children/create`,e.readBasic=`libre.graph/driveItem/basic/read`,e.readPath=`libre.graph/driveItem/path/read`,e.readQuota=`libre.graph/driveItem/quota/read`,e.readContent=`libre.graph/driveItem/content/read`,e.readChildren=`libre.graph/driveItem/children/read`,e.readDeleted=`libre.graph/driveItem/deleted/read`,e.readPermissions=`libre.graph/driveItem/permissions/read`,e.readVersions=`libre.graph/driveItem/versions/read`,e.updatePath=`libre.graph/driveItem/path/update`,e.updateDeleted=`libre.graph/driveItem/deleted/update`,e.updatePermissions=`libre.graph/driveItem/permissions/update`,e.updateVersions=`libre.graph/driveItem/versions/update`,e.deleteStandard=`libre.graph/driveItem/standard/delete`,e.deleteDeleted=`libre.graph/driveItem/deleted/delete`,e.deletePermissions=`libre.graph/driveItem/permissions/delete`,e}({}),is=e=>e;var as=class{_key;_value;_label;_icon;constructor(e,t,n,r){this._key=e,this._value=t,this._label=n,this._icon=r}get key(){return this._key}get value(){return this._value}get label(){return this._label}get icon(){return this._icon}};(class{static user=new as(`user`,0,is(`User`),`user`);static group=new as(`group`,1,is(`Group`),`group`);static link=new as(`link`,3,is(`Link`),`link`);static guest=new as(`guest`,4,is(`Guest`),`global`);static remote=new as(`remote`,6,is(`External`),`earth`);static individuals=[this.user,this.guest,this.remote];static collectives=[this.group];static unauthenticated=[this.link];static authenticated=[this.user,this.group,this.guest,this.remote];static all=[this.user,this.group,this.link,this.guest,this.remote];static isIndividual(e){return this.individuals.includes(e)}static isCollective(e){return this.collectives.includes(e)}static isUnauthenticated(e){return this.unauthenticated.includes(e)}static isAuthenticated(e){return this.authenticated.includes(e)}static getByValue(e){return this.all.find(t=>t.value===e)}static getByValues(e){return e.map(e=>this.getByValue(e))}static getByKeys(e){return e.map(e=>this.all.find(t=>t.key===e))}static getValues(e){return e.map(e=>e.value)}static containsAnyValue(e,t){return qo(this.getValues(e),t).length>0}});let os=e=>e?.driveType===`personal`,ss=e=>e?.driveType===`public`;function cs(e,t){return N(`spaces`,e,t,{leadingSlash:!0})}function ls(e,t=``){return N(`spaces`,`trash-bin`,e,t,{leadingSlash:!0})}function us(e){let t=e.publicLinkPassword,n=e.props?.[F.FileId],r=e.props?.[F.PublicLinkItemType],i=e.props?.[F.PublicLinkPermission],a=e.props?.[F.PublicLinkExpiration],o=e.props?.[F.PublicLinkShareDate],s=e.props?.[F.PublicLinkShareOwner],c=e.publicLinkType,l,u;return c===`ocm`?(l=`ocm/${e.id}`,u=er(e.id)):(l=`public/${e.id}`,u=$n(e.id)),Object.assign(ds({...e,driveType:`public`,driveAlias:l,webDavPath:u}),{...n&&{fileId:n},...t&&{publicLinkPassword:t},...r&&{publicLinkItemType:r},...i&&{publicLinkPermission:parseInt(i)},...a&&{publicLinkExpiration:a},...o&&{publicLinkShareDate:o},...s&&{publicLinkShareOwner:s},publicLinkType:c})}function ds(e){let t,n;e.special&&(t=e.special.find(e=>e.specialFolder.name===`image`),n=e.special.find(e=>e.specialFolder.name===`readme`),t&&(t.webDavUrl=decodeURI(t.webDavUrl)),n&&(n.webDavUrl=decodeURI(n.webDavUrl)));let r=e.root?.deleted?.state===`trashed`,i=N(e.webDavPath||cs(e.id),{leadingSlash:!0}),a=N(e.serverUrl,`remote.php/dav`,i),o=N(e.webDavTrashPath||ls(e.id),{leadingSlash:!0}),s=N(e.serverUrl,`remote.php/dav`,o),c={id:e.id,fileId:e.id,storageId:e.id,mimeType:``,name:e.name,description:e.description,extension:``,path:`/`,webDavPath:i,webDavTrashPath:o,driveAlias:e.driveAlias,driveType:e.driveType,type:`space`,isFolder:!0,mdate:e.lastModifiedDateTime,size:e.quota?.used||0,tags:[],permissions:``,starred:!1,etag:``,shareTypes:[],privateLink:e.webUrl,downloadURL:``,owner:e.owner?.user,disabled:r,root:e.root,spaceQuota:e.quota,spaceImageData:t,spaceReadmeData:n,hasTrashedItems:e[`@libre.graph.hasTrashedItems`]||!1,graphPermissions:void 0,canUpload:function({user:e}={}){return os(this)&&this.isOwner(e)?!0:this.graphPermissions?.includes(rs.createUpload)},canDownload:function(){return!0},canBeDeleted:function({ability:e}={}){return this.disabled?e?.can(`delete-all`,`Drive`)?!0:this.graphPermissions?.includes(rs.deletePermissions):!1},canRename:function({ability:e}={}){return e?.can(`update-all`,`Drive`)?!0:this.graphPermissions?.includes(rs.deletePermissions)},canEditDescription:function({ability:e}={}){return e?.can(`update-all`,`Drive`)?!0:this.graphPermissions?.includes(rs.deletePermissions)},canRestore:function({ability:e}={}){return this.disabled?e?.can(`update-all`,`Drive`)?!0:this.graphPermissions?.includes(rs.deletePermissions):!1},canDisable:function({ability:e}={}){return this.disabled?!1:e?.can(`delete-all`,`Drive`)?!0:this.graphPermissions?.includes(rs.deletePermissions)},canShare:function(){return this.graphPermissions?.includes(rs.createPermissions)},canEditImage:function(){return this.disabled?!1:this.graphPermissions?.includes(rs.deletePermissions)},canEditReadme:function(){return this.disabled?!1:this.graphPermissions?.includes(rs.deletePermissions)},canRestoreFromTrashbin:function(){return this.graphPermissions?.includes(rs.updateDeleted)},canDeleteFromTrashBin:function({user:e}={}){return os(this)&&this.isOwner(e)?!0:this.graphPermissions?.includes(rs.deletePermissions)},canListVersions:function({user:e}={}){return os(this)&&this.isOwner(e)?!0:this.graphPermissions?.includes(rs.readVersions)},canCreate:function(){return!0},canEditTags:function(){return!1},isMounted:function(){return!0},isReceivedShare:function(){return!1},isShareRoot:function(){return[`share`,`mountpoint`,`public`].includes(e.driveType)},getDomSelector:()=>Yo(e.id),getDriveAliasAndItem({path:e}){return N(this.driveAlias,e,{leadingSlash:!1})},getWebDavUrl({path:e}){return N(a,e)},getWebDavTrashUrl({path:e}){return N(s,e)},isOwner(e){return e?.id===this.owner?.id}};return Object.defineProperty(c,`nodeId`,{get(){return Qo(this.id)}}),c}let fs=(e,t)=>{let n=new URL(e);n.pathname=[...n.pathname.split(`/`),`cloud`,`capabilities`].filter(Boolean).join(`/`),n.searchParams.append(`format`,`json`);let r=n.href;return{async getCapabilities(){return da(await t.get(r),`data.ocs.data`,{capabilities:null,version:null})}}};function ps(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`&&`BYTES_PER_ELEMENT`in e&&e.BYTES_PER_ELEMENT===1}function ms(e,t=``){if(typeof e!=`number`){let n=t&&`"${t}" `;throw TypeError(`${n}expected number, got ${typeof e}`)}if(!Number.isSafeInteger(e)||e<0){let n=t&&`"${t}" `;throw RangeError(`${n}expected integer >= 0, got ${e}`)}}function hs(e,t,n=``){let r=ps(e),i=e?.length,a=t!==void 0;if(!r||a&&i!==t){let o=n&&`"${n}" `,s=a?` of length ${t}`:``,c=r?`length=${i}`:`type=${typeof e}`,l=o+`expected Uint8Array`+s+`, got `+c;throw r?RangeError(l):TypeError(l)}return e}function gs(e){if(typeof e!=`function`||typeof e.create!=`function`)throw TypeError(`Hash must wrapped by utils.createHasher`);if(ms(e.outputLen),ms(e.blockLen),e.outputLen<1)throw Error(`"outputLen" must be >= 1`);if(e.blockLen<1)throw Error(`"blockLen" must be >= 1`)}function _s(e,t=!0){if(e.destroyed)throw Error(`Hash instance has been destroyed`);if(t&&e.finished)throw Error(`Hash#digest() has already been called`)}function vs(e,t){hs(e,void 0,`digestInto() output`);let n=t.outputLen;if(e.length<n)throw RangeError(`"digestInto() output" expected to be of length >=`+n)}function ys(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function bs(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}new Uint8Array(new Uint32Array([287454020]).buffer)[0],typeof Uint8Array.from([]).toHex==`function`&&Uint8Array.fromHex;function xs(e){if(typeof e!=`string`)throw TypeError(`string expected`);return new Uint8Array(new TextEncoder().encode(e))}function Ss(e,t=``){return typeof e==`string`?xs(e):hs(e,void 0,t)}function Cs(e,t){if(t!==void 0&&{}.toString.call(t)!==`[object Object]`)throw TypeError(`options must be object or undefined`);return Object.assign(e,t)}function ws(e,t={}){let n=(t,n)=>e(n).update(t).digest(),r=e(void 0);return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.canXOF=r.canXOF,n.create=t=>e(t),Object.assign(n,t),Object.freeze(n)}let Ts=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});var Es=class{oHash;iHash;blockLen;outputLen;canXOF=!1;finished=!1;destroyed=!1;constructor(e,t){if(gs(e),hs(t,void 0,`key`),this.iHash=e.create(),typeof this.iHash.update!=`function`)throw Error(`Expected instance of class which extends utils.Hash`);this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let n=this.blockLen,r=new Uint8Array(n);r.set(t.length>n?e.create().update(t).digest():t);for(let e=0;e<r.length;e++)r[e]^=54;this.iHash.update(r),this.oHash=e.create();for(let e=0;e<r.length;e++)r[e]^=106;this.oHash.update(r),ys(r)}update(e){return _s(this),this.iHash.update(e),this}digestInto(e){_s(this),vs(e,this),this.finished=!0;let t=e.subarray(0,this.outputLen);this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||=Object.create(Object.getPrototypeOf(this),{});let{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:a,outputLen:o}=this;return e=e,e.finished=r,e.destroyed=i,e.blockLen=a,e.outputLen=o,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};let Ds=(()=>{let e=((e,t,n)=>new Es(e,t).update(n).digest());return e.create=(e,t)=>new Es(e,t),e})();function Os(e,t,n,r){gs(e);let{c:i,dkLen:a,asyncTick:o}=Cs({dkLen:32,asyncTick:10},r);if(ms(i,`c`),ms(a,`dkLen`),ms(o,`asyncTick`),i<1)throw Error(`iterations (c) must be >= 1`);if(a<1)throw Error(`"dkLen" must be >= 1`);if(a>(2**32-1)*e.outputLen)throw Error(`derived key too long`);let s=Ss(t,`password`),c=Ss(n,`salt`),l=new Uint8Array(a),u=Ds.create(e,s);return{c:i,dkLen:a,asyncTick:o,DK:l,PRF:u,PRFSalt:u._cloneInto().update(c)}}function ks(e,t,n,r,i){return e.destroy(),t.destroy(),r&&r.destroy(),ys(i),n}function As(e,t,n,r){let{c:i,dkLen:a,DK:o,PRF:s,PRFSalt:c}=Os(e,t,n,r),l,u=new Uint8Array(4),d=bs(u),f=new Uint8Array(s.outputLen);for(let e=1,t=0;t<a;e++,t+=s.outputLen){let n=o.subarray(t,t+s.outputLen);d.setInt32(0,e,!1),(l=c._cloneInto(l)).update(u).digestInto(f),n.set(f.subarray(0,n.length));for(let e=1;e<i;e++){s._cloneInto(l).update(f).digestInto(f);for(let e=0;e<n.length;e++)n[e]^=f[e]}}return ks(s,c,o,l,f)}var js=class{blockLen;outputLen;canXOF=!1;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(e,t,n,r){this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=bs(this.buffer)}update(e){_s(this),hs(e);let{view:t,buffer:n,blockLen:r}=this,i=e.length;for(let a=0;a<i;){let o=Math.min(r-this.pos,i-a);if(o===r){let t=bs(e);for(;r<=i-a;a+=r)this.process(t,a);continue}n.set(e.subarray(a,a+o),this.pos),this.pos+=o,a+=o,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){_s(this),vs(e,this),this.finished=!0;let{buffer:t,view:n,blockLen:r,isLE:i}=this,{pos:a}=this;t[a++]=128,ys(this.buffer.subarray(a)),this.padOffset>r-a&&(this.process(n,0),a=0);for(let e=a;e<r;e++)t[e]=0;n.setBigUint64(r-8,BigInt(this.length*8),i),this.process(n,0);let o=bs(e),s=this.outputLen;if(s%4)throw Error(`_sha2: outputLen must be aligned to 32bit`);let c=s/4,l=this.get();if(c>l.length)throw Error(`_sha2: outputLen bigger than state`);for(let e=0;e<c;e++)o.setUint32(4*e,l[e],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||=new this.constructor,e.set(...this.get());let{blockLen:t,buffer:n,length:r,finished:i,destroyed:a,pos:o}=this;return e.destroyed=a,e.finished=i,e.length=r,e.pos=o,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}};let I=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),Ms=BigInt(2**32-1),Ns=BigInt(32);function Ps(e,t=!1){return t?{h:Number(e&Ms),l:Number(e>>Ns&Ms)}:{h:Number(e>>Ns&Ms)|0,l:Number(e&Ms)|0}}function Fs(e,t=!1){let n=e.length,r=new Uint32Array(n),i=new Uint32Array(n);for(let a=0;a<n;a++){let{h:n,l:o}=Ps(e[a],t);[r[a],i[a]]=[n,o]}return[r,i]}let Is=(e,t,n)=>e>>>n,Ls=(e,t,n)=>e<<32-n|t>>>n,Rs=(e,t,n)=>e>>>n|t<<32-n,zs=(e,t,n)=>e<<32-n|t>>>n,Bs=(e,t,n)=>e<<64-n|t>>>n-32,Vs=(e,t,n)=>e>>>n-32|t<<64-n;function Hs(e,t,n,r){let i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:i|0}}let Us=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),Ws=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,Gs=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),Ks=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0,qs=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0),Js=(e,t,n,r,i,a)=>t+n+r+i+a+(e/2**32|0)|0,Ys=Fs(`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`.split(`.`).map(e=>BigInt(e))),Xs=Ys[0],Zs=Ys[1],Qs=new Uint32Array(80),$s=new Uint32Array(80);var ec=class extends js{constructor(e){super(128,e,16,!1)}get(){let{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:a,Dh:o,Dl:s,Eh:c,El:l,Fh:u,Fl:d,Gh:f,Gl:p,Hh:m,Hl:h}=this;return[e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h]}set(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){this.Ah=e|0,this.Al=t|0,this.Bh=n|0,this.Bl=r|0,this.Ch=i|0,this.Cl=a|0,this.Dh=o|0,this.Dl=s|0,this.Eh=c|0,this.El=l|0,this.Fh=u|0,this.Fl=d|0,this.Gh=f|0,this.Gl=p|0,this.Hh=m|0,this.Hl=h|0}process(e,t){for(let n=0;n<16;n++,t+=4)Qs[n]=e.getUint32(t),$s[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=Qs[e-15]|0,n=$s[e-15]|0,r=Rs(t,n,1)^Rs(t,n,8)^Is(t,n,7),i=zs(t,n,1)^zs(t,n,8)^Ls(t,n,7),a=Qs[e-2]|0,o=$s[e-2]|0,s=Rs(a,o,19)^Bs(a,o,61)^Is(a,o,6),c=Gs(i,zs(a,o,19)^Vs(a,o,61)^Ls(a,o,6),$s[e-7],$s[e-16]);Qs[e]=Ks(c,r,s,Qs[e-7],Qs[e-16])|0,$s[e]=c|0}let{Ah:n,Al:r,Bh:i,Bl:a,Ch:o,Cl:s,Dh:c,Dl:l,Eh:u,El:d,Fh:f,Fl:p,Gh:m,Gl:h,Hh:g,Hl:_}=this;for(let e=0;e<80;e++){let t=Rs(u,d,14)^Rs(u,d,18)^Bs(u,d,41),v=zs(u,d,14)^zs(u,d,18)^Vs(u,d,41),y=u&f^~u&m,b=d&p^~d&h,x=qs(_,v,b,Zs[e],$s[e]),S=Js(x,g,t,y,Xs[e],Qs[e]),C=x|0,w=Rs(n,r,28)^Bs(n,r,34)^Bs(n,r,39),ee=zs(n,r,28)^Vs(n,r,34)^Vs(n,r,39),te=n&i^n&o^i&o,T=r&a^r&s^a&s;g=m|0,_=h|0,m=f|0,h=p|0,f=u|0,p=d|0,{h:u,l:d}=Hs(c|0,l|0,S|0,C|0),c=o|0,l=s|0,o=i|0,s=a|0,i=n|0,a=r|0;let E=Us(C,ee,T);n=Ws(E,S,w,te),r=E|0}({h:n,l:r}=Hs(this.Ah|0,this.Al|0,n|0,r|0)),{h:i,l:a}=Hs(this.Bh|0,this.Bl|0,i|0,a|0),{h:o,l:s}=Hs(this.Ch|0,this.Cl|0,o|0,s|0),{h:c,l}=Hs(this.Dh|0,this.Dl|0,c|0,l|0),{h:u,l:d}=Hs(this.Eh|0,this.El|0,u|0,d|0),{h:f,l:p}=Hs(this.Fh|0,this.Fl|0,f|0,p|0),{h:m,l:h}=Hs(this.Gh|0,this.Gl|0,m|0,h|0),{h:g,l:_}=Hs(this.Hh|0,this.Hl|0,g|0,_|0),this.set(n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_)}roundClean(){ys(Qs,$s)}destroy(){this.destroyed=!0,ys(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}},tc=class extends ec{Ah=I[0]|0;Al=I[1]|0;Bh=I[2]|0;Bl=I[3]|0;Ch=I[4]|0;Cl=I[5]|0;Dh=I[6]|0;Dl=I[7]|0;Eh=I[8]|0;El=I[9]|0;Fh=I[10]|0;Fl=I[11]|0;Gh=I[12]|0;Gl=I[13]|0;Hh=I[14]|0;Hl=I[15]|0;constructor(){super(64)}};let nc=ws(()=>new tc,Ts(3)),rc=(e,t,n,r)=>Buffer.from(As(nc,e,t,{c:n,dkLen:r})),ic=`: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`;ic+``,``+ic;let ac=RegExp(`^[: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][: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\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`);function oc(e,t){let n=[],r=t.exec(e);for(;r;){let i=[];i.startIndex=t.lastIndex-r[0].length;let a=r.length;for(let e=0;e<a;e++)i.push(r[e]);n.push(i),r=t.exec(e)}return n}let sc=function(e){return ac.exec(e)!=null};function cc(e){return e!==void 0}let lc=[`hasOwnProperty`,`toString`,`valueOf`,`__defineGetter__`,`__defineSetter__`,`__lookupGetter__`,`__lookupSetter__`],uc=[`__proto__`,`constructor`,`prototype`],dc={allowBooleanAttributes:!1,unpairedTags:[]};function fc(e,t){t=Object.assign({},dc,t);let n=[],r=!1,i=!1;e[0]===``&&(e=e.substr(1));for(let a=0;a<e.length;a++)if(e[a]===`<`&&e[a+1]===`?`){if(a+=2,a=mc(e,a),a.err)return a}else if(e[a]===`<`){let o=a;if(a++,e[a]===`!`){a=hc(e,a);continue}else{let s=!1;e[a]===`/`&&(s=!0,a++);let c=``;for(;a<e.length&&e[a]!==`>`&&e[a]!==` `&&e[a]!==` `&&e[a]!==`
|
|
10
|
+
`&&e[a]!==`\r`;a++)c+=e[a];if(c=c.trim(),c[c.length-1]===`/`&&(c=c.substring(0,c.length-1),a--),!Sc(c)){let t;return t=c.trim().length===0?`Invalid space after '<'.`:`Tag '`+c+`' is an invalid name.`,L(`InvalidTag`,t,R(e,a))}let l=gc(e,a);if(l===!1)return L(`InvalidAttr`,`Attributes for '`+c+`' have open quote.`,R(e,a));let u=l.value;if(a=l.index,u[u.length-1]===`/`){let n=a-u.length;u=u.substring(0,u.length-1);let i=vc(u,t);if(i===!0)r=!0;else return L(i.err.code,i.err.msg,R(e,n+i.err.line))}else if(s){if(!l.tagClosed)return L(`InvalidTag`,`Closing tag '`+c+`' doesn't have proper closing.`,R(e,a));if(u.trim().length>0)return L(`InvalidTag`,`Closing tag '`+c+`' can't have attributes or invalid starting.`,R(e,o));if(n.length===0)return L(`InvalidTag`,`Closing tag '`+c+`' has not been opened.`,R(e,o));{let t=n.pop();if(c!==t.tagName){let n=R(e,t.tagStartPos);return L(`InvalidTag`,`Expected closing tag '`+t.tagName+`' (opened in line `+n.line+`, col `+n.col+`) instead of closing tag '`+c+`'.`,R(e,o))}n.length==0&&(i=!0)}}else{let s=vc(u,t);if(s!==!0)return L(s.err.code,s.err.msg,R(e,a-u.length+s.err.line));if(i===!0)return L(`InvalidXml`,`Multiple possible root nodes found.`,R(e,a));t.unpairedTags.indexOf(c)!==-1||n.push({tagName:c,tagStartPos:o}),r=!0}for(a++;a<e.length;a++)if(e[a]===`<`)if(e[a+1]===`!`){a++,a=hc(e,a);continue}else if(e[a+1]===`?`){if(a=mc(e,++a),a.err)return a}else break;else if(e[a]===`&`){let t=bc(e,a);if(t==-1)return L(`InvalidChar`,`char '&' is not expected.`,R(e,a));a=t}else if(i===!0&&!pc(e[a]))return L(`InvalidXml`,`Extra text at the end`,R(e,a));e[a]===`<`&&a--}}else{if(pc(e[a]))continue;return L(`InvalidChar`,`char '`+e[a]+`' is not expected.`,R(e,a))}return r?n.length==1?L(`InvalidTag`,`Unclosed tag '`+n[0].tagName+`'.`,R(e,n[0].tagStartPos)):n.length>0?L(`InvalidXml`,`Invalid '`+JSON.stringify(n.map(e=>e.tagName),null,4).replace(/\r?\n/g,``)+`' found.`,{line:1,col:1}):!0:L(`InvalidXml`,`Start tag expected.`,1)}function pc(e){return e===` `||e===` `||e===`
|
|
11
|
+
`||e===`\r`}function mc(e,t){let n=t;for(;t<e.length;t++)if(e[t]==`?`||e[t]==` `){let r=e.substr(n,t-n);if(t>5&&r===`xml`)return L(`InvalidXml`,`XML declaration allowed only at the start of the document.`,R(e,t));if(e[t]==`?`&&e[t+1]==`>`){t++;break}else continue}return t}function hc(e,t){if(e.length>t+5&&e[t+1]===`-`&&e[t+2]===`-`){for(t+=3;t<e.length;t++)if(e[t]===`-`&&e[t+1]===`-`&&e[t+2]===`>`){t+=2;break}}else if(e.length>t+8&&e[t+1]===`D`&&e[t+2]===`O`&&e[t+3]===`C`&&e[t+4]===`T`&&e[t+5]===`Y`&&e[t+6]===`P`&&e[t+7]===`E`){let n=1;for(t+=8;t<e.length;t++)if(e[t]===`<`)n++;else if(e[t]===`>`&&(n--,n===0))break}else if(e.length>t+9&&e[t+1]===`[`&&e[t+2]===`C`&&e[t+3]===`D`&&e[t+4]===`A`&&e[t+5]===`T`&&e[t+6]===`A`&&e[t+7]===`[`){for(t+=8;t<e.length;t++)if(e[t]===`]`&&e[t+1]===`]`&&e[t+2]===`>`){t+=2;break}}return t}function gc(e,t){let n=``,r=``,i=!1;for(;t<e.length;t++){if(e[t]===`"`||e[t]===`'`)r===``?r=e[t]:r!==e[t]||(r=``);else if(e[t]===`>`&&r===``){i=!0;break}n+=e[t]}return r===``?{value:n,index:t,tagClosed:i}:!1}let _c=RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,`g`);function vc(e,t){let n=oc(e,_c),r={};for(let e=0;e<n.length;e++){if(n[e][1].length===0)return L(`InvalidAttr`,`Attribute '`+n[e][2]+`' has no space in starting.`,Cc(n[e]));if(n[e][3]!==void 0&&n[e][4]===void 0)return L(`InvalidAttr`,`Attribute '`+n[e][2]+`' is without value.`,Cc(n[e]));if(n[e][3]===void 0&&!t.allowBooleanAttributes)return L(`InvalidAttr`,`boolean attribute '`+n[e][2]+`' is not allowed.`,Cc(n[e]));let i=n[e][2];if(!xc(i))return L(`InvalidAttr`,`Attribute '`+i+`' is an invalid name.`,Cc(n[e]));if(!Object.prototype.hasOwnProperty.call(r,i))r[i]=1;else return L(`InvalidAttr`,`Attribute '`+i+`' is repeated.`,Cc(n[e]))}return!0}function yc(e,t){let n=/\d/;for(e[t]===`x`&&(t++,n=/[\da-fA-F]/);t<e.length;t++){if(e[t]===`;`)return t;if(!e[t].match(n))break}return-1}function bc(e,t){if(t++,e[t]===`;`)return-1;if(e[t]===`#`)return t++,yc(e,t);let n=0;for(;t<e.length;t++,n++)if(!(e[t].match(/\w/)&&n<20)){if(e[t]===`;`)break;return-1}return t}function L(e,t,n){return{err:{code:e,msg:t,line:n.line||n,col:n.col}}}function xc(e){return sc(e)}function Sc(e){return sc(e)}function R(e,t){let n=e.substring(0,t).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function Cc(e){return e.startIndex+e[1].length}let wc={amp:`&`,AMP:`&`,lt:`<`,LT:`<`,gt:`>`,GT:`>`,quot:`"`,QUOT:`"`,apos:`'`,lsquo:`‘`,rsquo:`’`,ldquo:`“`,rdquo:`”`,lsquor:`‚`,rsquor:`’`,ldquor:`„`,bdquo:`„`,comma:`,`,period:`.`,colon:`:`,semi:`;`,excl:`!`,quest:`?`,num:`#`,dollar:`$`,percent:`%`,amp:`&`,ast:`*`,commat:`@`,lowbar:`_`,verbar:`|`,vert:`|`,sol:`/`,bsol:`\\`,lbrace:`{`,rbrace:`}`,lbrack:`[`,rbrack:`]`,lpar:`(`,rpar:`)`,nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,COPY:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,REG:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,half:`½`,frac34:`¾`,iquest:`¿`,times:`×`,div:`÷`,divide:`÷`},Tc={Agrave:`À`,agrave:`à`,Aacute:`Á`,aacute:`á`,Acirc:`Â`,acirc:`â`,Atilde:`Ã`,atilde:`ã`,Auml:`Ä`,auml:`ä`,Aring:`Å`,aring:`å`,AElig:`Æ`,aelig:`æ`,Ccedil:`Ç`,ccedil:`ç`,Egrave:`È`,egrave:`è`,Eacute:`É`,eacute:`é`,Ecirc:`Ê`,ecirc:`ê`,Euml:`Ë`,euml:`ë`,Igrave:`Ì`,igrave:`ì`,Iacute:`Í`,iacute:`í`,Icirc:`Î`,icirc:`î`,Iuml:`Ï`,iuml:`ï`,ETH:`Ð`,eth:`ð`,Ntilde:`Ñ`,ntilde:`ñ`,Ograve:`Ò`,ograve:`ò`,Oacute:`Ó`,oacute:`ó`,Ocirc:`Ô`,ocirc:`ô`,Otilde:`Õ`,otilde:`õ`,Ouml:`Ö`,ouml:`ö`,Oslash:`Ø`,oslash:`ø`,Ugrave:`Ù`,ugrave:`ù`,Uacute:`Ú`,uacute:`ú`,Ucirc:`Û`,ucirc:`û`,Uuml:`Ü`,uuml:`ü`,Yacute:`Ý`,yacute:`ý`,THORN:`Þ`,thorn:`þ`,szlig:`ß`,yuml:`ÿ`,Yuml:`Ÿ`},Ec={Amacr:`Ā`,amacr:`ā`,Abreve:`Ă`,abreve:`ă`,Aogon:`Ą`,aogon:`ą`,Cacute:`Ć`,cacute:`ć`,Ccirc:`Ĉ`,ccirc:`ĉ`,Cdot:`Ċ`,cdot:`ċ`,Ccaron:`Č`,ccaron:`č`,Dcaron:`Ď`,dcaron:`ď`,Dstrok:`Đ`,dstrok:`đ`,Emacr:`Ē`,emacr:`ē`,Ecaron:`Ě`,ecaron:`ě`,Edot:`Ė`,edot:`ė`,Eogon:`Ę`,eogon:`ę`,Gcirc:`Ĝ`,gcirc:`ĝ`,Gbreve:`Ğ`,gbreve:`ğ`,Gdot:`Ġ`,gdot:`ġ`,Gcedil:`Ģ`,Hcirc:`Ĥ`,hcirc:`ĥ`,Hstrok:`Ħ`,hstrok:`ħ`,Itilde:`Ĩ`,itilde:`ĩ`,Imacr:`Ī`,imacr:`ī`,Iogon:`Į`,iogon:`į`,Idot:`İ`,IJlig:`IJ`,ijlig:`ij`,Jcirc:`Ĵ`,jcirc:`ĵ`,Kcedil:`Ķ`,kcedil:`ķ`,kgreen:`ĸ`,Lacute:`Ĺ`,lacute:`ĺ`,Lcedil:`Ļ`,lcedil:`ļ`,Lcaron:`Ľ`,lcaron:`ľ`,Lmidot:`Ŀ`,lmidot:`ŀ`,Lstrok:`Ł`,lstrok:`ł`,Nacute:`Ń`,nacute:`ń`,Ncaron:`Ň`,ncaron:`ň`,Ncedil:`Ņ`,ncedil:`ņ`,ENG:`Ŋ`,eng:`ŋ`,Omacr:`Ō`,omacr:`ō`,Odblac:`Ő`,odblac:`ő`,OElig:`Œ`,oelig:`œ`,Racute:`Ŕ`,racute:`ŕ`,Rcaron:`Ř`,rcaron:`ř`,Rcedil:`Ŗ`,rcedil:`ŗ`,Sacute:`Ś`,sacute:`ś`,Scirc:`Ŝ`,scirc:`ŝ`,Scedil:`Ş`,scedil:`ş`,Scaron:`Š`,scaron:`š`,Tcedil:`Ţ`,tcedil:`ţ`,Tcaron:`Ť`,tcaron:`ť`,Tstrok:`Ŧ`,tstrok:`ŧ`,Utilde:`Ũ`,utilde:`ũ`,Umacr:`Ū`,umacr:`ū`,Ubreve:`Ŭ`,ubreve:`ŭ`,Uring:`Ů`,uring:`ů`,Udblac:`Ű`,udblac:`ű`,Uogon:`Ų`,uogon:`ų`,Wcirc:`Ŵ`,wcirc:`ŵ`,Ycirc:`Ŷ`,ycirc:`ŷ`,Zacute:`Ź`,zacute:`ź`,Zdot:`Ż`,zdot:`ż`,Zcaron:`Ž`,zcaron:`ž`},Dc={Alpha:`Α`,alpha:`α`,Beta:`Β`,beta:`β`,Gamma:`Γ`,gamma:`γ`,Delta:`Δ`,delta:`δ`,Epsilon:`Ε`,epsilon:`ε`,epsiv:`ϵ`,varepsilon:`ϵ`,Zeta:`Ζ`,zeta:`ζ`,Eta:`Η`,eta:`η`,Theta:`Θ`,theta:`θ`,thetasym:`ϑ`,vartheta:`ϑ`,Iota:`Ι`,iota:`ι`,Kappa:`Κ`,kappa:`κ`,kappav:`ϰ`,varkappa:`ϰ`,Lambda:`Λ`,lambda:`λ`,Mu:`Μ`,mu:`μ`,Nu:`Ν`,nu:`ν`,Xi:`Ξ`,xi:`ξ`,Omicron:`Ο`,omicron:`ο`,Pi:`Π`,pi:`π`,piv:`ϖ`,varpi:`ϖ`,Rho:`Ρ`,rho:`ρ`,rhov:`ϱ`,varrho:`ϱ`,Sigma:`Σ`,sigma:`σ`,sigmaf:`ς`,sigmav:`ς`,varsigma:`ς`,Tau:`Τ`,tau:`τ`,Upsilon:`Υ`,upsilon:`υ`,upsi:`υ`,Upsi:`ϒ`,upsih:`ϒ`,Phi:`Φ`,phi:`φ`,phiv:`ϕ`,varphi:`ϕ`,Chi:`Χ`,chi:`χ`,Psi:`Ψ`,psi:`ψ`,Omega:`Ω`,omega:`ω`,ohm:`Ω`,Gammad:`Ϝ`,gammad:`ϝ`,digamma:`ϝ`},Oc={Afr:`𝔄`,afr:`𝔞`,Acy:`А`,acy:`а`,Bcy:`Б`,bcy:`б`,Vcy:`В`,vcy:`в`,Gcy:`Г`,gcy:`г`,Dcy:`Д`,dcy:`д`,IEcy:`Е`,iecy:`е`,IOcy:`Ё`,iocy:`ё`,ZHcy:`Ж`,zhcy:`ж`,Zcy:`З`,zcy:`з`,Icy:`И`,icy:`и`,Jcy:`Й`,jcy:`й`,Kcy:`К`,kcy:`к`,Lcy:`Л`,lcy:`л`,Mcy:`М`,mcy:`м`,Ncy:`Н`,ncy:`н`,Ocy:`О`,ocy:`о`,Pcy:`П`,pcy:`п`,Rcy:`Р`,rcy:`р`,Scy:`С`,scy:`с`,Tcy:`Т`,tcy:`т`,Ucy:`У`,ucy:`у`,Fcy:`Ф`,fcy:`ф`,KHcy:`Х`,khcy:`х`,TScy:`Ц`,tscy:`ц`,CHcy:`Ч`,chcy:`ч`,SHcy:`Ш`,shcy:`ш`,SHCHcy:`Щ`,shchcy:`щ`,HARDcy:`Ъ`,hardcy:`ъ`,Ycy:`Ы`,ycy:`ы`,SOFTcy:`Ь`,softcy:`ь`,Ecy:`Э`,ecy:`э`,YUcy:`Ю`,yucy:`ю`,YAcy:`Я`,yacy:`я`,DJcy:`Ђ`,djcy:`ђ`,GJcy:`Ѓ`,gjcy:`ѓ`,Jukcy:`Є`,jukcy:`є`,DScy:`Ѕ`,dscy:`ѕ`,Iukcy:`І`,iukcy:`і`,YIcy:`Ї`,yicy:`ї`,Jsercy:`Ј`,jsercy:`ј`,LJcy:`Љ`,ljcy:`љ`,NJcy:`Њ`,njcy:`њ`,TSHcy:`Ћ`,tshcy:`ћ`,KJcy:`Ќ`,kjcy:`ќ`,Ubrcy:`Ў`,ubrcy:`ў`,DZcy:`Џ`,dzcy:`џ`},kc={plus:`+`,minus:`−`,mnplus:`∓`,mp:`∓`,pm:`±`,times:`×`,div:`÷`,divide:`÷`,sdot:`⋅`,star:`☆`,starf:`★`,bigstar:`★`,lowast:`∗`,ast:`*`,midast:`*`,compfn:`∘`,smallcircle:`∘`,bullet:`•`,bull:`•`,nbsp:`\xA0`,hellip:`…`,mldr:`…`,prime:`′`,Prime:`″`,tprime:`‴`,bprime:`‵`,backprime:`‵`,minus:`−`,minusd:`∸`,dotminus:`∸`,plusdo:`∔`,dotplus:`∔`,plusmn:`±`,minusplus:`∓`,mnplus:`∓`,mp:`∓`,setminus:`∖`,smallsetminus:`∖`,Backslash:`∖`,setmn:`∖`,ssetmn:`∖`,lowbar:`_`,verbar:`|`,vert:`|`,VerticalLine:`|`,colon:`:`,Colon:`∷`,Proportion:`∷`,ratio:`∶`,equals:`=`,ne:`≠`,nequiv:`≢`,equiv:`≡`,Congruent:`≡`,sim:`∼`,thicksim:`∼`,thksim:`∼`,sime:`≃`,simeq:`≃`,TildeEqual:`≃`,asymp:`≈`,approx:`≈`,thickapprox:`≈`,thkap:`≈`,TildeTilde:`≈`,ncong:`≇`,cong:`≅`,TildeFullEqual:`≅`,asympeq:`≍`,CupCap:`≍`,bump:`≎`,Bumpeq:`≎`,HumpDownHump:`≎`,bumpe:`≏`,bumpeq:`≏`,HumpEqual:`≏`,dotminus:`∸`,minusd:`∸`,plusdo:`∔`,dotplus:`∔`,le:`≤`,LessEqual:`≤`,ge:`≥`,GreaterEqual:`≥`,lesseqgtr:`⋚`,lesseqqgtr:`⪋`,greater:`>`,less:`<`},Ac={alefsym:`ℵ`,aleph:`ℵ`,beth:`ℶ`,gimel:`ℷ`,daleth:`ℸ`,forall:`∀`,ForAll:`∀`,part:`∂`,PartialD:`∂`,exist:`∃`,Exists:`∃`,nexist:`∄`,nexists:`∄`,empty:`∅`,emptyset:`∅`,emptyv:`∅`,varnothing:`∅`,nabla:`∇`,Del:`∇`,isin:`∈`,isinv:`∈`,in:`∈`,Element:`∈`,notin:`∉`,notinva:`∉`,ni:`∋`,niv:`∋`,SuchThat:`∋`,ReverseElement:`∋`,notni:`∌`,notniva:`∌`,prod:`∏`,Product:`∏`,coprod:`∐`,Coproduct:`∐`,sum:`∑`,Sum:`∑`,minus:`−`,mp:`∓`,plusdo:`∔`,dotplus:`∔`,setminus:`∖`,lowast:`∗`,radic:`√`,Sqrt:`√`,prop:`∝`,propto:`∝`,Proportional:`∝`,varpropto:`∝`,infin:`∞`,infintie:`⧝`,ang:`∠`,angle:`∠`,angmsd:`∡`,measuredangle:`∡`,angsph:`∢`,mid:`∣`,VerticalBar:`∣`,nmid:`∤`,nsmid:`∤`,npar:`∦`,parallel:`∥`,spar:`∥`,nparallel:`∦`,nspar:`∦`,and:`∧`,wedge:`∧`,or:`∨`,vee:`∨`,cap:`∩`,cup:`∪`,int:`∫`,Integral:`∫`,conint:`∮`,ContourIntegral:`∮`,Conint:`∯`,DoubleContourIntegral:`∯`,Cconint:`∰`,there4:`∴`,therefore:`∴`,Therefore:`∴`,becaus:`∵`,because:`∵`,Because:`∵`,ratio:`∶`,Proportion:`∷`,minusd:`∸`,dotminus:`∸`,mDDot:`∺`,homtht:`∻`,sim:`∼`,bsimg:`∽`,backsim:`∽`,ac:`∾`,mstpos:`∾`,acd:`∿`,VerticalTilde:`≀`,wr:`≀`,wreath:`≀`,nsime:`≄`,nsimeq:`≄`,nsimeq:`≄`,ncong:`≇`,simne:`≆`,ncongdot:`⩭̸`,ngsim:`≵`,nsim:`≁`,napprox:`≉`,nap:`≉`,ngeq:`≱`,nge:`≱`,nleq:`≰`,nle:`≰`,ngtr:`≯`,ngt:`≯`,nless:`≮`,nlt:`≮`,nprec:`⊀`,npr:`⊀`,nsucc:`⊁`,nsc:`⊁`},jc={larr:`←`,leftarrow:`←`,LeftArrow:`←`,uarr:`↑`,uparrow:`↑`,UpArrow:`↑`,rarr:`→`,rightarrow:`→`,RightArrow:`→`,darr:`↓`,downarrow:`↓`,DownArrow:`↓`,harr:`↔`,leftrightarrow:`↔`,LeftRightArrow:`↔`,varr:`↕`,updownarrow:`↕`,UpDownArrow:`↕`,nwarr:`↖`,nwarrow:`↖`,UpperLeftArrow:`↖`,nearr:`↗`,nearrow:`↗`,UpperRightArrow:`↗`,searr:`↘`,searrow:`↘`,LowerRightArrow:`↘`,swarr:`↙`,swarrow:`↙`,LowerLeftArrow:`↙`,lArr:`⇐`,Leftarrow:`⇐`,uArr:`⇑`,Uparrow:`⇑`,rArr:`⇒`,Rightarrow:`⇒`,dArr:`⇓`,Downarrow:`⇓`,hArr:`⇔`,Leftrightarrow:`⇔`,iff:`⇔`,vArr:`⇕`,Updownarrow:`⇕`,lAarr:`⇚`,Lleftarrow:`⇚`,rAarr:`⇛`,Rrightarrow:`⇛`,lrarr:`⇆`,leftrightarrows:`⇆`,rlarr:`⇄`,rightleftarrows:`⇄`,lrhar:`⇋`,leftrightharpoons:`⇋`,ReverseEquilibrium:`⇋`,rlhar:`⇌`,rightleftharpoons:`⇌`,Equilibrium:`⇌`,udarr:`⇅`,UpArrowDownArrow:`⇅`,duarr:`⇵`,DownArrowUpArrow:`⇵`,llarr:`⇇`,leftleftarrows:`⇇`,rrarr:`⇉`,rightrightarrows:`⇉`,ddarr:`⇊`,downdownarrows:`⇊`,har:`↽`,lhard:`↽`,leftharpoondown:`↽`,lharu:`↼`,leftharpoonup:`↼`,rhard:`⇁`,rightharpoondown:`⇁`,rharu:`⇀`,rightharpoonup:`⇀`,lsh:`↰`,Lsh:`↰`,rsh:`↱`,Rsh:`↱`,ldsh:`↲`,rdsh:`↳`,hookleftarrow:`↩`,hookrightarrow:`↪`,mapstoleft:`↤`,mapstoup:`↥`,map:`↦`,mapsto:`↦`,mapstodown:`↧`,crarr:`↵`,nwarrow:`↖`,nearrow:`↗`,searrow:`↘`,swarrow:`↙`,nleftarrow:`↚`,nleftrightarrow:`↮`,nrightarrow:`↛`,nrarr:`↛`,larrtl:`↢`,rarrtl:`↣`,leftarrowtail:`↢`,rightarrowtail:`↣`,twoheadleftarrow:`↞`,twoheadrightarrow:`↠`,Larr:`↞`,Rarr:`↠`,larrhk:`↩`,rarrhk:`↪`,larrlp:`↫`,looparrowleft:`↫`,rarrlp:`↬`,looparrowright:`↬`,harrw:`↭`,leftrightsquigarrow:`↭`,nrarrw:`↝̸`,rarrw:`↝`,rightsquigarrow:`↝`,larrbfs:`⤟`,rarrbfs:`⤠`,nvHarr:`⤄`,nvlArr:`⤂`,nvrArr:`⤃`,larrfs:`⤝`,rarrfs:`⤞`,Map:`⤅`,larrsim:`⥳`,rarrsim:`⥴`,harrcir:`⥈`,Uarrocir:`⥉`,lurdshar:`⥊`,ldrdhar:`⥧`,ldrushar:`⥋`,rdldhar:`⥩`,lrhard:`⥭`,rlhar:`⇌`,uharr:`↾`,uharl:`↿`,dharr:`⇂`,dharl:`⇃`,Uarr:`↟`,Darr:`↡`,zigrarr:`⇝`,nwArr:`⇖`,neArr:`⇗`,seArr:`⇘`,swArr:`⇙`,nharr:`↮`,nhArr:`⇎`,nlarr:`↚`,nlArr:`⇍`,nrarr:`↛`,nrArr:`⇏`,larrb:`⇤`,LeftArrowBar:`⇤`,rarrb:`⇥`,RightArrowBar:`⇥`},Mc={square:`□`,Square:`□`,squ:`□`,squf:`▪`,squarf:`▪`,blacksquar:`▪`,blacksquare:`▪`,FilledVerySmallSquare:`▪`,blk34:`▓`,blk12:`▒`,blk14:`░`,block:`█`,srect:`▭`,rect:`▭`,sdot:`⋅`,sdotb:`⊡`,dotsquare:`⊡`,triangle:`▵`,tri:`▵`,trine:`▵`,utri:`▵`,triangledown:`▿`,dtri:`▿`,tridown:`▿`,triangleleft:`◃`,ltri:`◃`,triangleright:`▹`,rtri:`▹`,blacktriangle:`▴`,utrif:`▴`,blacktriangledown:`▾`,dtrif:`▾`,blacktriangleleft:`◂`,ltrif:`◂`,blacktriangleright:`▸`,rtrif:`▸`,loz:`◊`,lozenge:`◊`,blacklozenge:`⧫`,lozf:`⧫`,bigcirc:`◯`,xcirc:`◯`,circ:`ˆ`,Circle:`○`,cir:`○`,o:`○`,bullet:`•`,bull:`•`,hellip:`…`,mldr:`…`,nldr:`‥`,boxh:`─`,HorizontalLine:`─`,boxv:`│`,boxdr:`┌`,boxdl:`┐`,boxur:`└`,boxul:`┘`,boxvr:`├`,boxvl:`┤`,boxhd:`┬`,boxhu:`┴`,boxvh:`┼`,boxH:`═`,boxV:`║`,boxdR:`╒`,boxDr:`╓`,boxDR:`╔`,boxDl:`╕`,boxdL:`╖`,boxDL:`╗`,boxuR:`╘`,boxUr:`╙`,boxUR:`╚`,boxUl:`╜`,boxuL:`╛`,boxUL:`╝`,boxvR:`╞`,boxVr:`╟`,boxVR:`╠`,boxVl:`╢`,boxvL:`╡`,boxVL:`╣`,boxHd:`╤`,boxhD:`╥`,boxHD:`╦`,boxHu:`╧`,boxhU:`╨`,boxHU:`╩`,boxvH:`╪`,boxVh:`╫`,boxVH:`╬`},Nc={excl:`!`,iexcl:`¡`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,nbsp:`\xA0`,comma:`,`,period:`.`,colon:`:`,semi:`;`,vert:`|`,Verbar:`‖`,verbar:`|`,dblac:`˝`,circ:`ˆ`,caron:`ˇ`,breve:`˘`,dot:`˙`,ring:`˚`,ogon:`˛`,tilde:`˜`,DiacriticalGrave:"`",DiacriticalAcute:`´`,DiacriticalTilde:`˜`,DiacriticalDot:`˙`,DiacriticalDoubleAcute:`˝`,grave:"`",acute:`´`},Pc={cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,euro:`€`,dollar:`$`,euro:`€`,fnof:`ƒ`,inr:`₹`,af:`؋`,birr:`ብር`,peso:`₱`,rub:`₽`,won:`₩`,yuan:`¥`,cedil:`¸`},Fc={frac12:`½`,half:`½`,frac13:`⅓`,frac14:`¼`,frac15:`⅕`,frac16:`⅙`,frac18:`⅛`,frac23:`⅔`,frac25:`⅖`,frac34:`¾`,frac35:`⅗`,frac38:`⅜`,frac45:`⅘`,frac56:`⅚`,frac58:`⅝`,frac78:`⅞`,frasl:`⁄`},Ic={trade:`™`,TRADE:`™`,telrec:`⌕`,target:`⌖`,ulcorn:`⌜`,ulcorner:`⌜`,urcorn:`⌝`,urcorner:`⌝`,dlcorn:`⌞`,llcorner:`⌞`,drcorn:`⌟`,lrcorner:`⌟`,intercal:`⊺`,intcal:`⊺`,oplus:`⊕`,CirclePlus:`⊕`,ominus:`⊖`,CircleMinus:`⊖`,otimes:`⊗`,CircleTimes:`⊗`,osol:`⊘`,odot:`⊙`,CircleDot:`⊙`,oast:`⊛`,circledast:`⊛`,odash:`⊝`,circleddash:`⊝`,ocirc:`⊚`,circledcirc:`⊚`,boxplus:`⊞`,plusb:`⊞`,boxminus:`⊟`,minusb:`⊟`,boxtimes:`⊠`,timesb:`⊠`,boxdot:`⊡`,sdotb:`⊡`,veebar:`⊻`,vee:`∨`,barvee:`⊽`,and:`∧`,wedge:`∧`,Cap:`⋒`,Cup:`⋓`,Fork:`⋔`,pitchfork:`⋔`,epar:`⋕`,ltlarr:`⥶`,nvap:`≍⃒`,nvsim:`∼⃒`,nvge:`≥⃒`,nvle:`≤⃒`,nvlt:`<⃒`,nvgt:`>⃒`,nvltrie:`⊴⃒`,nvrtrie:`⊵⃒`,Vdash:`⊩`,dashv:`⊣`,vDash:`⊨`,Vdash:`⊩`,Vvdash:`⊪`,nvdash:`⊬`,nvDash:`⊭`,nVdash:`⊮`,nVDash:`⊯`};({...wc,...Tc,...Ec,...Dc,...Oc,...kc,...Ac,...jc,...Mc,...Nc,...Pc,...Fc,...Ic});let Lc={amp:`&`,apos:`'`,gt:`>`,lt:`<`,quot:`"`},Rc={nbsp:`\xA0`,copy:`©`,reg:`®`,trade:`™`,mdash:`—`,ndash:`–`,hellip:`…`,laquo:`«`,raquo:`»`,lsquo:`‘`,rsquo:`’`,ldquo:`“`,rdquo:`”`,bull:`•`,para:`¶`,sect:`§`,deg:`°`,frac12:`½`,frac14:`¼`,frac34:`¾`},zc=new Set(`!?\\\\/[]$%{}^&*()<>|+`);function Bc(e){if(e[0]===`#`)throw Error(`[EntityReplacer] Invalid character '#' in entity name: "${e}"`);for(let t of e)if(zc.has(t))throw Error(`[EntityReplacer] Invalid character '${t}' in entity name: "${e}"`);return e}function Vc(...e){let t=Object.create(null);for(let n of e)if(n)for(let e of Object.keys(n)){let r=n[e];if(typeof r==`string`)t[e]=r;else if(r&&typeof r==`object`&&r.val!==void 0){let n=r.val;typeof n==`string`&&(t[e]=n)}}return t}let Hc=`external`,Uc=`base`;function Wc(e){return!e||e===Hc?new Set([Hc]):e===`all`?new Set([`all`]):e===Uc?new Set([Uc]):Array.isArray(e)?new Set(e):new Set([Hc])}let z=Object.freeze({allow:0,leave:1,remove:2,throw:3}),Gc=new Set([9,10,13]);function Kc(e){if(!e)return{xmlVersion:1,onLevel:z.allow,nullLevel:z.remove};let t=e.xmlVersion===1.1?1.1:1,n=z[e.onNCR]??z.allow,r=z[e.nullNCR]??z.remove;return{xmlVersion:t,onLevel:n,nullLevel:Math.max(r,z.remove)}}var qc=class{constructor(e={}){this._limit=e.limit||{},this._maxTotalExpansions=this._limit.maxTotalExpansions||0,this._maxExpandedLength=this._limit.maxExpandedLength||0,this._postCheck=typeof e.postCheck==`function`?e.postCheck:e=>e,this._limitTiers=Wc(this._limit.applyLimitsTo??Hc),this._numericAllowed=e.numericAllowed??!0,this._baseMap=Vc(Lc,e.namedEntities||null),this._externalMap=Object.create(null),this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this._removeSet=new Set(e.remove&&Array.isArray(e.remove)?e.remove:[]),this._leaveSet=new Set(e.leave&&Array.isArray(e.leave)?e.leave:[]);let t=Kc(e.ncr);this._ncrXmlVersion=t.xmlVersion,this._ncrOnLevel=t.onLevel,this._ncrNullLevel=t.nullLevel}setExternalEntities(e){if(e)for(let t of Object.keys(e))Bc(t);this._externalMap=Vc(e)}addExternalEntity(e,t){Bc(e),typeof t==`string`&&t.indexOf(`&`)===-1&&(this._externalMap[e]=t)}addInputEntities(e){this._totalExpansions=0,this._expandedLength=0,this._inputMap=Vc(e)}reset(){return this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this}setXmlVersion(e){this._ncrXmlVersion=e===1.1?1.1:1}decode(e){if(typeof e!=`string`||e.length===0)return e;let t=e,n=[],r=e.length,i=0,a=0,o=this._maxTotalExpansions>0,s=this._maxExpandedLength>0,c=o||s;for(;a<r;){if(e.charCodeAt(a)!==38){a++;continue}let t=a+1;for(;t<r&&e.charCodeAt(t)!==59&&t-a<=32;)t++;if(t>=r||e.charCodeAt(t)!==59){a++;continue}let l=e.slice(a+1,t);if(l.length===0){a++;continue}let u,d;if(this._removeSet.has(l))u=``,d===void 0&&(d=Hc);else if(this._leaveSet.has(l)){a++;continue}else if(l.charCodeAt(0)===35){let e=this._resolveNCR(l);if(e===void 0){a++;continue}u=e,d=Uc}else{let e=this._resolveName(l);u=e?.value,d=e?.tier}if(u===void 0){a++;continue}if(a>i&&n.push(e.slice(i,a)),n.push(u),i=t+1,a=i,c&&this._tierCounts(d)){if(o&&(this._totalExpansions++,this._totalExpansions>this._maxTotalExpansions))throw Error(`[EntityReplacer] Entity expansion count limit exceeded: ${this._totalExpansions} > ${this._maxTotalExpansions}`);if(s){let e=u.length-(l.length+2);if(e>0&&(this._expandedLength+=e,this._expandedLength>this._maxExpandedLength))throw Error(`[EntityReplacer] Expanded content length limit exceeded: ${this._expandedLength} > ${this._maxExpandedLength}`)}}}i<r&&n.push(e.slice(i));let l=n.length===0?e:n.join(``);return this._postCheck(l,t)}_tierCounts(e){return this._limitTiers.has(`all`)?!0:this._limitTiers.has(e)}_resolveName(e){if(e in this._inputMap)return{value:this._inputMap[e],tier:Hc};if(e in this._externalMap)return{value:this._externalMap[e],tier:Hc};if(e in this._baseMap)return{value:this._baseMap[e],tier:Uc}}_classifyNCR(e){return e===0?this._ncrNullLevel:e>=55296&&e<=57343||this._ncrXmlVersion===1&&e>=1&&e<=31&&!Gc.has(e)?z.remove:-1}_applyNCRAction(e,t,n){switch(e){case z.allow:return String.fromCodePoint(n);case z.remove:return``;case z.leave:return;case z.throw:throw Error(`[EntityDecoder] Prohibited numeric character reference &${t}; (U+${n.toString(16).toUpperCase().padStart(4,`0`)})`);default:return String.fromCodePoint(n)}}_resolveNCR(e){let t=e.charCodeAt(1),n;if(n=t===120||t===88?parseInt(e.slice(2),16):parseInt(e.slice(1),10),Number.isNaN(n)||n<0||n>1114111)return;let r=this._classifyNCR(n);if(!this._numericAllowed&&r<z.remove)return;let i=r===-1?this._ncrOnLevel:Math.max(this._ncrOnLevel,r);return this._applyNCRAction(i,e,n)}};let Jc=e=>lc.includes(e)?`__`+e:e,Yc={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(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,entityDecoder:null,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:Jc};function Xc(e,t){if(typeof e!=`string`)return;let n=e.toLowerCase();if(lc.some(e=>n===e.toLowerCase())||uc.some(e=>n===e.toLowerCase()))throw Error(`[SECURITY] Invalid ${t}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`)}function Zc(e,t){return typeof e==`boolean`?{enabled:e,maxEntitySize:1e4,maxExpansionDepth:1e4,maxTotalExpansions:1/0,maxExpandedLength:1e5,maxEntityCount:1e3,allowedTags:null,tagFilter:null,appliesTo:`all`}:typeof e==`object`&&e?{enabled:e.enabled!==!1,maxEntitySize:Math.max(1,e.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,e.maxExpansionDepth??1e4),maxTotalExpansions:Math.max(1,e.maxTotalExpansions??1/0),maxExpandedLength:Math.max(1,e.maxExpandedLength??1e5),maxEntityCount:Math.max(1,e.maxEntityCount??1e3),allowedTags:e.allowedTags??null,tagFilter:e.tagFilter??null,appliesTo:e.appliesTo??`all`}:Zc(!0)}let Qc=function(e){let t=Object.assign({},Yc,e),n=[{value:t.attributeNamePrefix,name:`attributeNamePrefix`},{value:t.attributesGroupName,name:`attributesGroupName`},{value:t.textNodeName,name:`textNodeName`},{value:t.cdataPropName,name:`cdataPropName`},{value:t.commentPropName,name:`commentPropName`}];for(let{value:e,name:t}of n)e&&Xc(e,t);return t.onDangerousProperty===null&&(t.onDangerousProperty=Jc),t.processEntities=Zc(t.processEntities,t.htmlEntities),t.unpairedTagsSet=new Set(t.unpairedTags),t.stopNodes&&Array.isArray(t.stopNodes)&&(t.stopNodes=t.stopNodes.map(e=>typeof e==`string`&&e.startsWith(`*.`)?`..`+e.substring(2):e)),t},$c;$c=typeof Symbol==`function`?Symbol(`XML Node Metadata`):`@@xmlMetadata`;var el=class{constructor(e){this.tagname=e,this.child=[],this[`:@`]=Object.create(null)}add(e,t){e===`__proto__`&&(e=`#__proto__`),this.child.push({[e]:t})}addChild(e,t){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}),t!==void 0&&(this.child[this.child.length-1][$c]={startIndex:t})}static getMetaDataSymbol(){return $c}};let tl=`:A-Za-z_À-ÖØ-öø-˿Ͱ-ͽͿ-҆҈--⁰-Ⰰ-、-豈-﷏ﷰ-�`;tl+``;let nl=`:A-Za-z_À-˿Ͱ-ͽͿ-҆҈--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-`;nl+``;let rl=(e,t,n=``)=>{let r=`[${e.replace(`:`,``)}][${t.replace(`:`,``)}]*`;return{name:RegExp(`^[${e}][${t}]*$`,n),ncName:RegExp(`^${r}$`,n),qName:RegExp(`^${r}(?::${r})?$`,n),nmToken:RegExp(`^[${t}]+$`,n),nmTokens:RegExp(`^[${t}]+(?:\\s+[${t}]+)*$`,n)}},il=rl(tl,`:A-Za-z_À-ÖØ-öø-˿Ͱ-ͽͿ-҆҈--⁰-Ⰰ-、-豈-﷏ﷰ-�\\-\\.\\d·̀-ͯ‿-⁀`),al=rl(nl,`:A-Za-z_À-˿Ͱ-ͽͿ-҆҈--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-\\-\\.\\d·̀-ͯ҇‿-⁀`,`u`),ol=(e=`1.0`)=>e===`1.1`?al:il,sl=(e,{xmlVersion:t=`1.0`}={})=>ol(t).qName.test(e);var cl=class{constructor(e,t){this.suppressValidationErr=!e,this.options=e,this.xmlVersion=t||1}setXmlVersion(e=1){this.xmlVersion=e}readDocType(e,t){let n=Object.create(null),r=0;if(e[t+3]===`O`&&e[t+4]===`C`&&e[t+5]===`T`&&e[t+6]===`Y`&&e[t+7]===`P`&&e[t+8]===`E`){t+=9;let i=1,a=!1,o=!1,s=``;for(;t<e.length;t++)if(e[t]===`<`&&!o){if(a&&ll(e,`!ENTITY`,t)){t+=7;let i,a;if([i,a,t]=this.readEntityExp(e,t+1,this.suppressValidationErr),a.indexOf(`&`)===-1){if(this.options.enabled!==!1&&this.options.maxEntityCount!=null&&r>=this.options.maxEntityCount)throw Error(`Entity count (${r+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);n[i]=a,r++}}else if(a&&ll(e,`!ELEMENT`,t)){t+=8;let{index:n}=this.readElementExp(e,t+1);t=n}else if(a&&ll(e,`!ATTLIST`,t))t+=8;else if(a&&ll(e,`!NOTATION`,t)){t+=9;let{index:n}=this.readNotationExp(e,t+1,this.suppressValidationErr);t=n}else if(ll(e,`!--`,t))o=!0;else throw Error(`Invalid DOCTYPE`);i++,s=``}else if(e[t]===`>`){if(o?e[t-1]===`-`&&e[t-2]===`-`&&(o=!1,i--):i--,i===0)break}else e[t]===`[`?a=!0:s+=e[t];if(i!==0)throw Error(`Unclosed DOCTYPE`)}else throw Error(`Invalid Tag instead of DOCTYPE`);return{entities:n,i:t}}readEntityExp(e,t){t=B(e,t);let n=t;for(;t<e.length&&!/\s/.test(e[t])&&e[t]!==`"`&&e[t]!==`'`;)t++;let r=e.substring(n,t);if(ul(r,{xmlVersion:this.xmlVersion}),t=B(e,t),!this.suppressValidationErr){if(e.substring(t,t+6).toUpperCase()===`SYSTEM`)throw Error(`External entities are not supported`);if(e[t]===`%`)throw Error(`Parameter entities are not supported`)}let i=``;if([t,i]=this.readIdentifierVal(e,t,`entity`),this.options.enabled!==!1&&this.options.maxEntitySize!=null&&i.length>this.options.maxEntitySize)throw Error(`Entity "${r}" size (${i.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return t--,[r,i,t]}readNotationExp(e,t){t=B(e,t);let n=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;let r=e.substring(n,t);!this.suppressValidationErr&&ul(r,{xmlVersion:this.xmlVersion}),t=B(e,t);let i=e.substring(t,t+6).toUpperCase();if(!this.suppressValidationErr&&i!==`SYSTEM`&&i!==`PUBLIC`)throw Error(`Expected SYSTEM or PUBLIC, found "${i}"`);t+=i.length,t=B(e,t);let a=null,o=null;if(i===`PUBLIC`)[t,a]=this.readIdentifierVal(e,t,`publicIdentifier`),t=B(e,t),(e[t]===`"`||e[t]===`'`)&&([t,o]=this.readIdentifierVal(e,t,`systemIdentifier`));else if(i===`SYSTEM`&&([t,o]=this.readIdentifierVal(e,t,`systemIdentifier`),!this.suppressValidationErr&&!o))throw Error(`Missing mandatory system identifier for SYSTEM notation`);return{notationName:r,publicIdentifier:a,systemIdentifier:o,index:--t}}readIdentifierVal(e,t,n){let r=``,i=e[t];if(i!==`"`&&i!==`'`)throw Error(`Expected quoted string, found "${i}"`);t++;let a=t;for(;t<e.length&&e[t]!==i;)t++;if(r=e.substring(a,t),e[t]!==i)throw Error(`Unterminated ${n} value`);return t++,[t,r]}readElementExp(e,t){t=B(e,t);let n=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;let r=e.substring(n,t);if(!this.suppressValidationErr&&!sl(r,{xmlVersion:this.xmlVersion}))throw Error(`Invalid element name: "${r}"`);t=B(e,t);let i=``;if(e[t]===`E`&&ll(e,`MPTY`,t))t+=4;else if(e[t]===`A`&&ll(e,`NY`,t))t+=2;else if(e[t]===`(`){t++;let n=t;for(;t<e.length&&e[t]!==`)`;)t++;if(i=e.substring(n,t),e[t]!==`)`)throw Error(`Unterminated content model`)}else if(!this.suppressValidationErr)throw Error(`Invalid Element Expression, found "${e[t]}"`);return{elementName:r,contentModel:i.trim(),index:t}}readAttlistExp(e,t){t=B(e,t);let n=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;let r=e.substring(n,t);for(ul(r,{xmlVersion:this.xmlVersion}),t=B(e,t),n=t;t<e.length&&!/\s/.test(e[t]);)t++;let i=e.substring(n,t);if(!ul(i,{xmlVersion:this.xmlVersion}))throw Error(`Invalid attribute name: "${i}"`);t=B(e,t);let a=``;if(e.substring(t,t+8).toUpperCase()===`NOTATION`){if(a=`NOTATION`,t+=8,t=B(e,t),e[t]!==`(`)throw Error(`Expected '(', found "${e[t]}"`);t++;let n=[];for(;t<e.length&&e[t]!==`)`;){let r=t;for(;t<e.length&&e[t]!==`|`&&e[t]!==`)`;)t++;let i=e.substring(r,t);if(i=i.trim(),!ul(i,{xmlVersion:this.xmlVersion}))throw Error(`Invalid notation name: "${i}"`);n.push(i),e[t]===`|`&&(t++,t=B(e,t))}if(e[t]!==`)`)throw Error(`Unterminated list of notations`);t++,a+=` (`+n.join(`|`)+`)`}else{let n=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;if(a+=e.substring(n,t),!this.suppressValidationErr&&![`CDATA`,`ID`,`IDREF`,`IDREFS`,`ENTITY`,`ENTITIES`,`NMTOKEN`,`NMTOKENS`].includes(a.toUpperCase()))throw Error(`Invalid attribute type: "${a}"`)}t=B(e,t);let o=``;return e.substring(t,t+8).toUpperCase()===`#REQUIRED`?(o=`#REQUIRED`,t+=8):e.substring(t,t+7).toUpperCase()===`#IMPLIED`?(o=`#IMPLIED`,t+=7):[t,o]=this.readIdentifierVal(e,t,`ATTLIST`),{elementName:r,attributeName:i,attributeType:a,defaultValue:o,index:t}}};let B=(e,t)=>{for(;t<e.length&&/\s/.test(e[t]);)t++;return t};function ll(e,t,n){for(let r=0;r<t.length;r++)if(t[r]!==e[n+r+1])return!1;return!0}function ul(e,t){if(sl(e,{xmlVersion:t}))return e;throw Error(`Invalid entity name ${e}`)}let dl=/^[-+]?0x[a-fA-F0-9]+$/,fl=/^0b[01]+$/,pl=/^0o[0-7]+$/,ml=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,hl={hex:!0,binary:!1,octal:!1,leadingZeros:!0,decimalPoint:`.`,eNotation:!0,infinity:`original`};function gl(e,t={}){if(t=Object.assign({},hl,t),!e||typeof e!=`string`)return e;let n=e.trim();if(n.length===0||t.skipLike!==void 0&&t.skipLike.test(n))return e;if(n===`0`)return 0;if(t.hex&&dl.test(n))return bl(n,16);if(t.binary&&fl.test(n))return bl(n,2);if(t.octal&&pl.test(n))return bl(n,8);if(!isFinite(n))return xl(e,Number(n),t);if(n.includes(`e`)||n.includes(`E`))return vl(e,n,t);{let r=ml.exec(n);if(r){let i=r[1]||``,a=r[2],o=yl(r[3]),s=i?e[a.length+1]===`.`:e[a.length]===`.`;if(!t.leadingZeros&&(a.length>1||a.length===1&&!s))return e;{let r=Number(n),s=String(r);if(r===0)return r;if(s.search(/[eE]/)!==-1)return t.eNotation?r:e;if(n.indexOf(`.`)!==-1)return s===`0`||s===o||s===`${i}${o}`?r:e;let c=a?o:n;return a?c===s||i+c===s?r:e:c===s||c===i+s?r:e}}else return e}}let _l=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function vl(e,t,n){if(!n.eNotation)return e;let r=t.match(_l);if(r){let i=r[1]||``,a=r[3].indexOf(`e`)===-1?`E`:`e`,o=r[2],s=i?e[o.length+1]===a:e[o.length]===a;return o.length>1&&s?e:o.length===1&&(r[3].startsWith(`.${a}`)||r[3][0]===a)?Number(t):o.length>0?n.leadingZeros&&!s?(t=(r[1]||``)+r[3],Number(t)):e:Number(t)}else return e}function yl(e){return e&&e.indexOf(`.`)!==-1?(e=e.replace(/0+$/,``),e===`.`?e=`0`:e[0]===`.`?e=`0`+e:e[e.length-1]===`.`&&(e=e.substring(0,e.length-1)),e):e}function bl(e,t){let n=e.trim();if((t===2||t===8)&&(e=n.substring(2)),parseInt)return parseInt(e,t);if(Number.parseInt)return Number.parseInt(e,t);if(window&&window.parseInt)return window.parseInt(e,t);throw Error(`parseInt, Number.parseInt, window.parseInt are not supported`)}function xl(e,t,n){let r=t===1/0;switch(n.infinity.toLowerCase()){case`null`:return null;case`infinity`:return t;case`string`:return r?`Infinity`:`-Infinity`;default:return e}}function Sl(e){return typeof e==`function`?e:Array.isArray(e)?t=>{for(let n of e)if(typeof n==`string`&&t===n||n instanceof RegExp&&n.test(t))return!0}:()=>!1}var Cl=class{constructor(e,t={},n){this.pattern=e,this.separator=t.separator||`.`,this.segments=this._parse(e),this.data=n,this._hasDeepWildcard=this.segments.some(e=>e.type===`deep-wildcard`),this._hasAttributeCondition=this.segments.some(e=>e.attrName!==void 0),this._hasPositionSelector=this.segments.some(e=>e.position!==void 0)}_parse(e){let t=[],n=0,r=``;for(;n<e.length;)e[n]===this.separator?n+1<e.length&&e[n+1]===this.separator?(r.trim()&&(t.push(this._parseSegment(r.trim())),r=``),t.push({type:`deep-wildcard`}),n+=2):(r.trim()&&t.push(this._parseSegment(r.trim())),r=``,n++):(r+=e[n],n++);return r.trim()&&t.push(this._parseSegment(r.trim())),t}_parseSegment(e){let t={type:`tag`},n=null,r=e,i=e.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(i&&(r=i[1]+i[3],i[2])){let e=i[2].slice(1,-1);e&&(n=e)}let a,o=r;if(r.includes(`::`)){let t=r.indexOf(`::`);if(a=r.substring(0,t).trim(),o=r.substring(t+2).trim(),!a)throw Error(`Invalid namespace in pattern: ${e}`)}let s,c=null;if(o.includes(`:`)){let e=o.lastIndexOf(`:`),t=o.substring(0,e).trim(),n=o.substring(e+1).trim();[`first`,`last`,`odd`,`even`].includes(n)||/^nth\(\d+\)$/.test(n)?(s=t,c=n):s=o}else s=o;if(!s)throw Error(`Invalid segment pattern: ${e}`);if(t.tag=s,a&&(t.namespace=a),n)if(n.includes(`=`)){let e=n.indexOf(`=`);t.attrName=n.substring(0,e).trim(),t.attrValue=n.substring(e+1).trim()}else t.attrName=n.trim();if(c){let e=c.match(/^nth\((\d+)\)$/);e?(t.position=`nth`,t.positionValue=parseInt(e[1],10)):t.position=c}return t}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}},wl=class{constructor(){this._byDepthAndTag=new Map,this._wildcardByDepth=new Map,this._deepWildcards=[],this._patterns=new Set,this._sealed=!1}add(e){if(this._sealed)throw TypeError(`ExpressionSet is sealed. Create a new ExpressionSet to add more expressions.`);if(this._patterns.has(e.pattern))return this;if(this._patterns.add(e.pattern),e.hasDeepWildcard())return this._deepWildcards.push(e),this;let t=e.length,n=e.segments[e.segments.length-1]?.tag;if(!n||n===`*`)this._wildcardByDepth.has(t)||this._wildcardByDepth.set(t,[]),this._wildcardByDepth.get(t).push(e);else{let r=`${t}:${n}`;this._byDepthAndTag.has(r)||this._byDepthAndTag.set(r,[]),this._byDepthAndTag.get(r).push(e)}return this}addAll(e){for(let t of e)this.add(t);return this}has(e){return this._patterns.has(e.pattern)}get size(){return this._patterns.size}seal(){return this._sealed=!0,this}get isSealed(){return this._sealed}matchesAny(e){return this.findMatch(e)!==null}findMatch(e){let t=e.getDepth(),n=`${t}:${e.getCurrentTag()}`,r=this._byDepthAndTag.get(n);if(r){for(let t=0;t<r.length;t++)if(e.matches(r[t]))return r[t]}let i=this._wildcardByDepth.get(t);if(i){for(let t=0;t<i.length;t++)if(e.matches(i[t]))return i[t]}for(let t=0;t<this._deepWildcards.length;t++)if(e.matches(this._deepWildcards[t]))return this._deepWildcards[t];return null}},Tl=class{constructor(e){this._matcher=e}get separator(){return this._matcher.separator}getCurrentTag(){let e=this._matcher.path;return e.length>0?e[e.length-1].tag:void 0}getCurrentNamespace(){let e=this._matcher.path;return e.length>0?e[e.length-1].namespace:void 0}getAttrValue(e){let t=this._matcher.path;if(t.length!==0)return t[t.length-1].values?.[e]}hasAttr(e){let t=this._matcher.path;if(t.length===0)return!1;let n=t[t.length-1];return n.values!==void 0&&e in n.values}getPosition(){let e=this._matcher.path;return e.length===0?-1:e[e.length-1].position??0}getCounter(){let e=this._matcher.path;return e.length===0?-1:e[e.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(e,t=!0){return this._matcher.toString(e,t)}toArray(){return this._matcher.path.map(e=>e.tag)}matches(e){return this._matcher.matches(e)}matchesAny(e){return e.matchesAny(this._matcher)}},El=class{constructor(e={}){this.separator=e.separator||`.`,this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new Tl(this)}push(e,t=null,n=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);let r=this.path.length;this.siblingStacks[r]||(this.siblingStacks[r]=new Map);let i=this.siblingStacks[r],a=n?`${n}:${e}`:e,o=i.get(a)||0,s=0;for(let e of i.values())s+=e;i.set(a,o+1);let c={tag:e,position:s,counter:o};n!=null&&(c.namespace=n),t!=null&&(c.values=t),this.path.push(c)}pop(){if(this.path.length===0)return;this._pathStringCache=null;let e=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),e}updateCurrent(e){if(this.path.length>0){let t=this.path[this.path.length-1];e!=null&&(t.values=e)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(e){if(this.path.length!==0)return this.path[this.path.length-1].values?.[e]}hasAttr(e){if(this.path.length===0)return!1;let t=this.path[this.path.length-1];return t.values!==void 0&&e in t.values}getPosition(){return this.path.length===0?-1:this.path[this.path.length-1].position??0}getCounter(){return this.path.length===0?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(e,t=!0){let n=e||this.separator;if(n===this.separator&&t===!0){if(this._pathStringCache!==null)return this._pathStringCache;let e=this.path.map(e=>e.namespace?`${e.namespace}:${e.tag}`:e.tag).join(n);return this._pathStringCache=e,e}return this.path.map(e=>t&&e.namespace?`${e.namespace}:${e.tag}`:e.tag).join(n)}toArray(){return this.path.map(e=>e.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[]}matches(e){let t=e.segments;return t.length===0?!1:e.hasDeepWildcard()?this._matchWithDeepWildcard(t):this._matchSimple(t)}_matchSimple(e){if(this.path.length!==e.length)return!1;for(let t=0;t<e.length;t++)if(!this._matchSegment(e[t],this.path[t],t===this.path.length-1))return!1;return!0}_matchWithDeepWildcard(e){let t=this.path.length-1,n=e.length-1;for(;n>=0&&t>=0;){let r=e[n];if(r.type===`deep-wildcard`){if(n--,n<0)return!0;let r=e[n],i=!1;for(let e=t;e>=0;e--)if(this._matchSegment(r,this.path[e],e===this.path.length-1)){t=e-1,n--,i=!0;break}if(!i)return!1}else{if(!this._matchSegment(r,this.path[t],t===this.path.length-1))return!1;t--,n--}}return n<0}_matchSegment(e,t,n){if(e.tag!==`*`&&e.tag!==t.tag||e.namespace!==void 0&&e.namespace!==`*`&&e.namespace!==t.namespace||e.attrName!==void 0&&(!n||!t.values||!(e.attrName in t.values)||e.attrValue!==void 0&&String(t.values[e.attrName])!==String(e.attrValue)))return!1;if(e.position!==void 0){if(!n)return!1;let r=t.counter??0;if(e.position===`first`&&r!==0||e.position===`odd`&&r%2!=1||e.position===`even`&&r%2!=0||e.position===`nth`&&r!==e.positionValue)return!1}return!0}matchesAny(e){return e.matchesAny(this)}snapshot(){return{path:this.path.map(e=>({...e})),siblingStacks:this.siblingStacks.map(e=>new Map(e))}}restore(e){this._pathStringCache=null,this.path=e.path.map(e=>({...e})),this.siblingStacks=e.siblingStacks.map(e=>new Map(e))}readOnly(){return this._view}};function Dl(e,t){if(!e)return{};let n=t.attributesGroupName?e[t.attributesGroupName]:e;if(!n)return{};let r={};for(let e in n)if(e.startsWith(t.attributeNamePrefix)){let i=e.substring(t.attributeNamePrefix.length);r[i]=n[e]}else r[e]=n[e];return r}function Ol(e){if(!e||typeof e!=`string`)return;let t=e.indexOf(`:`);if(t!==-1&&t>0){let n=e.substring(0,t);if(n!==`xmlns`)return n}}var kl=class{constructor(e,t){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.parseXml=Pl,this.parseTextData=Al,this.resolveNameSpace=jl,this.buildAttributesMap=Nl,this.isItStopNode=Rl,this.replaceEntitiesValue=Il,this.readStopNodeData=Ul,this.saveTextToParentTag=Ll,this.addChild=Fl,this.ignoreAttributesFn=Sl(this.options.ignoreAttributes),this.entityExpansionCount=0,this.currentExpandedLength=0;let n={...Lc};this.options.entityDecoder?this.entityDecoder=this.options.entityDecoder:(typeof this.options.htmlEntities==`object`?n=this.options.htmlEntities:this.options.htmlEntities===!0&&(n={...Rc,...Pc}),this.entityDecoder=new qc({namedEntities:{...n,...t},numericAllowed:this.options.htmlEntities,limit:{maxTotalExpansions:this.options.processEntities.maxTotalExpansions,maxExpandedLength:this.options.processEntities.maxExpandedLength,applyLimitsTo:this.options.processEntities.appliesTo}})),this.matcher=new El,this.readonlyMatcher=this.matcher.readOnly(),this.isCurrentNodeStopNode=!1,this.stopNodeExpressionsSet=new wl;let r=this.options.stopNodes;if(r&&r.length>0){for(let e=0;e<r.length;e++){let t=r[e];typeof t==`string`?this.stopNodeExpressionsSet.add(new Cl(t)):t instanceof Cl&&this.stopNodeExpressionsSet.add(t)}this.stopNodeExpressionsSet.seal()}}};function Al(e,t,n,r,i,a,o){let s=this.options;if(e!==void 0&&(s.trimValues&&!r&&(e=e.trim()),e.length>0)){o||(e=this.replaceEntitiesValue(e,t,n));let r=s.jPath?n.toString():n,c=s.tagValueProcessor(t,e,r,i,a);return c==null?e:typeof c!=typeof e||c!==e?c:s.trimValues||e.trim()===e?Wl(e,s.parseTagValue,s.numberParseOptions):e}}function jl(e){if(this.options.removeNSPrefix){let t=e.split(`:`),n=e.charAt(0)===`/`?`/`:``;if(t[0]===`xmlns`)return``;t.length===2&&(e=n+t[1])}return e}let Ml=RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,`gm`);function Nl(e,t,n,r=!1){let i=this.options;if(r===!0||i.ignoreAttributes!==!0&&typeof e==`string`){let r=oc(e,Ml),a=r.length,o={},s=Array(a),c=!1,l={};for(let e=0;e<a;e++){let t=this.resolveNameSpace(r[e][1]),a=r[e][4];if(t.length&&a!==void 0){let r=a;i.trimValues&&(r=r.trim()),r=this.replaceEntitiesValue(r,n,this.readonlyMatcher),s[e]=r,l[t]=r,c=!0}}c&&typeof t==`object`&&t.updateCurrent&&t.updateCurrent(l);let u=i.jPath?t.toString():this.readonlyMatcher,d=!1;for(let e=0;e<a;e++){let t=this.resolveNameSpace(r[e][1]);if(this.ignoreAttributesFn(t,u))continue;let n=i.attributeNamePrefix+t;if(t.length)if(i.transformAttributeName&&(n=i.transformAttributeName(n)),n=Kl(n,i),r[e][4]!==void 0){let r=s[e],a=i.attributeValueProcessor(t,r,u);a==null?o[n]=r:typeof a!=typeof r||a!==r?o[n]=a:o[n]=Wl(r,i.parseAttributeValue,i.numberParseOptions),d=!0}else i.allowBooleanAttributes&&(o[n]=!0,d=!0)}if(!d)return;if(i.attributesGroupName&&!i.preserveOrder){let e={};return e[i.attributesGroupName]=o,e}return o}}let Pl=function(e){e=e.replace(/\r\n?/g,`
|
|
12
|
+
`);let t=new el(`!xml`),n=t,r=``;this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let i=this.options,a=new cl(i.processEntities),o=e.length;for(let s=0;s<o;s++)if(e[s]===`<`){let c=e.charCodeAt(s+1);if(c===47){let t=Bl(e,`>`,s,`Closing Tag is not closed.`),a=e.substring(s+2,t).trim();if(i.removeNSPrefix){let e=a.indexOf(`:`);e!==-1&&(a=a.substr(e+1))}a=Gl(i.transformTagName,a,``,i).tagName,n&&(r=this.saveTextToParentTag(r,n,this.readonlyMatcher));let o=this.matcher.getCurrentTag();if(a&&i.unpairedTagsSet.has(a))throw Error(`Unpaired tag can not be used as closing tag: </${a}>`);o&&i.unpairedTagsSet.has(o)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,n=this.tagsNodeStack.pop(),r=``,s=t}else if(c===63){let t=Hl(e,s,!1,`?>`);if(!t)throw Error(`Pi Tag is not closed.`);r=this.saveTextToParentTag(r,n,this.readonlyMatcher);let o=this.buildAttributesMap(t.tagExp,this.matcher,t.tagName,!0);if(o){let e=o[this.options.attributeNamePrefix+`version`];this.entityDecoder.setXmlVersion(Number(e)||1),a.setXmlVersion(Number(e)||1)}if(!(i.ignoreDeclaration&&t.tagName===`?xml`||i.ignorePiTags)){let e=new el(t.tagName);e.add(i.textNodeName,``),t.tagName!==t.tagExp&&t.attrExpPresent&&i.ignoreAttributes!==!0&&(e[`:@`]=o),this.addChild(n,e,this.readonlyMatcher,s)}s=t.closeIndex+1}else if(c===33&&e.charCodeAt(s+2)===45&&e.charCodeAt(s+3)===45){let t=Bl(e,`-->`,s+4,`Comment is not closed.`);if(i.commentPropName){let a=e.substring(s+4,t-2);r=this.saveTextToParentTag(r,n,this.readonlyMatcher),n.add(i.commentPropName,[{[i.textNodeName]:a}])}s=t}else if(c===33&&e.charCodeAt(s+2)===68){let t=a.readDocType(e,s);this.entityDecoder.addInputEntities(t.entities),s=t.i}else if(c===33&&e.charCodeAt(s+2)===91){let t=Bl(e,`]]>`,s,`CDATA is not closed.`)-2,a=e.substring(s+9,t);r=this.saveTextToParentTag(r,n,this.readonlyMatcher);let o=this.parseTextData(a,n.tagname,this.readonlyMatcher,!0,!1,!0,!0);o??=``,i.cdataPropName?n.add(i.cdataPropName,[{[i.textNodeName]:a}]):n.add(i.textNodeName,o),s=t+2}else{let a=Hl(e,s,i.removeNSPrefix);if(!a){let t=e.substring(Math.max(0,s-50),Math.min(o,s+50));throw Error(`readTagExp returned undefined at position ${s}. Context: "${t}"`)}let c=a.tagName,l=a.rawTagName,u=a.tagExp,d=a.attrExpPresent,f=a.closeIndex;if({tagName:c,tagExp:u}=Gl(i.transformTagName,c,u,i),i.strictReservedNames&&(c===i.commentPropName||c===i.cdataPropName||c===i.textNodeName||c===i.attributesGroupName))throw Error(`Invalid tag name: ${c}`);n&&r&&n.tagname!==`!xml`&&(r=this.saveTextToParentTag(r,n,this.readonlyMatcher,!1));let p=n;p&&i.unpairedTagsSet.has(p.tagname)&&(n=this.tagsNodeStack.pop(),this.matcher.pop());let m=!1;u.length>0&&u.lastIndexOf(`/`)===u.length-1&&(m=!0,c[c.length-1]===`/`?(c=c.substr(0,c.length-1),u=c):u=u.substr(0,u.length-1),d=c!==u);let h=null,g;g=Ol(l),c!==t.tagname&&this.matcher.push(c,{},g),c!==u&&d&&(h=this.buildAttributesMap(u,this.matcher,c),h&&Dl(h,i)),c!==t.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let _=s;if(this.isCurrentNodeStopNode){let t=``;if(m)s=a.closeIndex;else if(i.unpairedTagsSet.has(c))s=a.closeIndex;else{let n=this.readStopNodeData(e,l,f+1);if(!n)throw Error(`Unexpected end of ${l}`);s=n.i,t=n.tagContent}let r=new el(c);h&&(r[`:@`]=h),r.add(i.textNodeName,t),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(n,r,this.readonlyMatcher,_)}else{if(m){({tagName:c,tagExp:u}=Gl(i.transformTagName,c,u,i));let e=new el(c);h&&(e[`:@`]=h),this.addChild(n,e,this.readonlyMatcher,_),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(i.unpairedTagsSet.has(c)){let e=new el(c);h&&(e[`:@`]=h),this.addChild(n,e,this.readonlyMatcher,_),this.matcher.pop(),this.isCurrentNodeStopNode=!1,s=a.closeIndex;continue}else{let e=new el(c);if(this.tagsNodeStack.length>i.maxNestedTags)throw Error(`Maximum nested tags exceeded`);this.tagsNodeStack.push(n),h&&(e[`:@`]=h),this.addChild(n,e,this.readonlyMatcher,_),n=e}r=``,s=f}}}else r+=e[s];return t.child};function Fl(e,t,n,r){this.options.captureMetaData||(r=void 0);let i=this.options.jPath?n.toString():n,a=this.options.updateTag(t.tagname,i,t[`:@`]);a===!1||(typeof a==`string`&&(t.tagname=a),e.addChild(t,r))}function Il(e,t,n){let r=this.options.processEntities;if(!r||!r.enabled)return e;if(r.allowedTags){let i=this.options.jPath?n.toString():n;if(!(Array.isArray(r.allowedTags)?r.allowedTags.includes(t):r.allowedTags(t,i)))return e}if(r.tagFilter){let i=this.options.jPath?n.toString():n;if(!r.tagFilter(t,i))return e}return this.entityDecoder.decode(e)}function Ll(e,t,n,r){return e&&=(r===void 0&&(r=t.child.length===0),e=this.parseTextData(e,t.tagname,n,!1,t[`:@`]?Object.keys(t[`:@`]).length!==0:!1,r),e!==void 0&&e!==``&&t.add(this.options.textNodeName,e),``),e}function Rl(){return this.stopNodeExpressionsSet.size===0?!1:this.matcher.matchesAny(this.stopNodeExpressionsSet)}function zl(e,t,n=`>`){let r=0,i=e.length,a=n.charCodeAt(0),o=n.length>1?n.charCodeAt(1):-1,s=``,c=t;for(let n=t;n<i;n++){let t=e.charCodeAt(n);if(r)t===r&&(r=0);else if(t===34||t===39)r=t;else if(t===a)if(o!==-1){if(e.charCodeAt(n+1)===o)return s+=e.substring(c,n),{data:s,index:n}}else return s+=e.substring(c,n),{data:s,index:n};else t===9&&!r&&(s+=e.substring(c,n)+` `,c=n+1)}}function Bl(e,t,n,r){let i=e.indexOf(t,n);if(i===-1)throw Error(r);return i+t.length-1}function Vl(e,t,n,r){let i=e.indexOf(t,n);if(i===-1)throw Error(r);return i}function Hl(e,t,n,r=`>`){let i=zl(e,t+1,r);if(!i)return;let a=i.data,o=i.index,s=a.search(/\s/),c=a,l=!0;s!==-1&&(c=a.substring(0,s),a=a.substring(s+1).trimStart());let u=c;if(n){let e=c.indexOf(`:`);e!==-1&&(c=c.substr(e+1),l=c!==i.data.substr(e+1))}return{tagName:c,tagExp:a,closeIndex:o,attrExpPresent:l,rawTagName:u}}function Ul(e,t,n){let r=n,i=1,a=e.length;for(;n<a;n++)if(e[n]===`<`){let a=e.charCodeAt(n+1);if(a===47){let a=Vl(e,`>`,n,`${t} is not closed`);if(e.substring(n+2,a).trim()===t&&(i--,i===0))return{tagContent:e.substring(r,n),i:a};n=a}else if(a===63)n=Bl(e,`?>`,n+1,`StopNode is not closed.`);else if(a===33&&e.charCodeAt(n+2)===45&&e.charCodeAt(n+3)===45)n=Bl(e,`-->`,n+3,`StopNode is not closed.`);else if(a===33&&e.charCodeAt(n+2)===91)n=Bl(e,`]]>`,n,`StopNode is not closed.`)-2;else{let r=Hl(e,n,!1);r&&((r&&r.tagName)===t&&r.tagExp[r.tagExp.length-1]!==`/`&&i++,n=r.closeIndex)}}}function Wl(e,t,n){if(t&&typeof e==`string`){let t=e.trim();return t===`true`?!0:t===`false`?!1:gl(e,n)}else if(cc(e))return e;else return``}function Gl(e,t,n,r){if(e){let r=e(t);n===t&&(n=r),t=r}return t=Kl(t,r),{tagName:t,tagExp:n}}function Kl(e,t){if(uc.includes(e))throw Error(`[SECURITY] Invalid name: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);return lc.includes(e)?t.onDangerousProperty(e):e}let ql=el.getMetaDataSymbol();function Jl(e,t){if(!e||typeof e!=`object`)return{};if(!t)return e;let n={};for(let r in e)if(r.startsWith(t)){let i=r.substring(t.length);n[i]=e[r]}else n[r]=e[r];return n}function Yl(e,t,n,r){return Xl(e,t,n,r)}function Xl(e,t,n,r){let i,a={};for(let o=0;o<e.length;o++){let s=e[o],c=Zl(s);if(c!==void 0&&c!==t.textNodeName){let e=Jl(s[`:@`]||{},t.attributeNamePrefix);n.push(c,e)}if(c===t.textNodeName)i===void 0?i=s[c]:i+=``+s[c];else if(c===void 0)continue;else if(s[c]){let e=Xl(s[c],t,n,r),i=$l(e,t);if(Object.keys(e).length===0&&t.alwaysCreateTextNode&&(e[t.textNodeName]=``),s[`:@`]?Ql(e,s[`:@`],r,t):Object.keys(e).length===1&&e[t.textNodeName]!==void 0&&!t.alwaysCreateTextNode?e=e[t.textNodeName]:Object.keys(e).length===0&&(t.alwaysCreateTextNode?e[t.textNodeName]=``:e=``),s[ql]!==void 0&&typeof e==`object`&&e&&(e[ql]=s[ql]),a[c]!==void 0&&Object.prototype.hasOwnProperty.call(a,c))Array.isArray(a[c])||(a[c]=[a[c]]),a[c].push(e);else{let n=t.jPath?r.toString():r;t.isArray(c,n,i)?a[c]=[e]:a[c]=e}c!==void 0&&c!==t.textNodeName&&n.pop()}}return typeof i==`string`?i.length>0&&(a[t.textNodeName]=i):i!==void 0&&(a[t.textNodeName]=i),a}function Zl(e){let t=Object.keys(e);for(let e=0;e<t.length;e++){let n=t[e];if(n!==`:@`)return n}}function Ql(e,t,n,r){if(t){let i=Object.keys(t),a=i.length;for(let o=0;o<a;o++){let a=i[o],s=a.startsWith(r.attributeNamePrefix)?a.substring(r.attributeNamePrefix.length):a,c=r.jPath?n.toString()+`.`+s:n;r.isArray(a,c,!0,!0)?e[a]=[t[a]]:e[a]=t[a]}}}function $l(e,t){let{textNodeName:n}=t,r=Object.keys(e).length;return!!(r===0||r===1&&(e[n]||typeof e[n]==`boolean`||e[n]===0))}var eu=class{constructor(e){this.externalEntities={},this.options=Qc(e)}parse(e,t){if(typeof e!=`string`&&e.toString)e=e.toString();else if(typeof e!=`string`)throw Error(`XML data is accepted in String or Bytes[] form.`);if(t){t===!0&&(t={});let n=fc(e,t);if(n!==!0)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}let n=new kl(this.options,this.externalEntities),r=n.parseXml(e);return this.options.preserveOrder||r===void 0?r:Yl(r,this.options,n.matcher,n.readonlyMatcher)}addEntity(e,t){if(t.indexOf(`&`)!==-1)throw Error(`Entity value can't have '&'`);if(e.indexOf(`&`)!==-1||e.indexOf(`;`)!==-1)throw Error(`An entity must be set without '&' and ';'. Eg. use '#xD' for '
'`);if(t===`&`)throw Error(`An entity with value '&' is not permitted`);this.externalEntities[e]=t}static getMetaDataSymbol(){return el.getMetaDataSymbol()}};function tu(e){return String(e).replace(/--/g,`- -`).replace(/--/g,`- -`).replace(/-$/,`- `)}function nu(e){return String(e).replace(/\]\]>/g,`]]]]><![CDATA[>`)}function ru(e){return String(e).replace(/"/g,`"`).replace(/'/g,`'`)}function iu(e,t){if(!Array.isArray(e)||e.length===0)return`1.0`;let n=e[0];if(du(n)===`?xml`){let e=n[`:@`];if(e){let n=t.attributeNamePrefix+`version`;if(e[n])return e[n]}}return`1.0`}function au(e,t,n,r,i){return!n.sanitizeName||sl(e,{xmlVersion:i})?e:n.sanitizeName(e,{isAttribute:t,matcher:r.readOnly()})}function ou(e,t){let n=``;t.format&&(n=`
|
|
13
|
+
`);let r=[];if(t.stopNodes&&Array.isArray(t.stopNodes))for(let e=0;e<t.stopNodes.length;e++){let n=t.stopNodes[e];typeof n==`string`?r.push(new Cl(n)):n instanceof Cl&&r.push(n)}let i=iu(e,t),a=new El;return su(e,t,n,a,r,i)}function su(e,t,n,r,i,a){let o=``,s=!1;if(t.maxNestedTags&&r.getDepth()>t.maxNestedTags)throw Error(`Maximum nested tags exceeded`);if(!Array.isArray(e)){if(e!=null){let n=e.toString();return n=mu(n,t),n}return``}for(let c=0;c<e.length;c++){let l=e[c],u=du(l);if(u===void 0)continue;let d=u===t.textNodeName||u===t.cdataPropName||u===t.commentPropName||u[0]===`?`?u:au(u,!1,t,r,a),f=cu(l[`:@`],t);r.push(d,f);let p=pu(r,i);if(d===t.textNodeName){let e=l[u];p||(e=t.tagValueProcessor(d,e),e=mu(e,t)),s&&(o+=n),o+=e,s=!1,r.pop();continue}else if(d===t.cdataPropName){s&&(o+=n);let e=l[u][0][t.textNodeName],i=nu(e);o+=`<![CDATA[${i}]]>`,s=!1,r.pop();continue}else if(d===t.commentPropName){let e=l[u][0][t.textNodeName],i=tu(e);o+=n+`<!--${i}-->`,s=!0,r.pop();continue}else if(d[0]===`?`){let e=fu(l[`:@`],t,p,r,a);o+=(d===`?xml`?``:n)+`<${d}${e}?>`,s=!0,r.pop();continue}let m=n;m!==``&&(m+=t.indentBy);let h=n+`<${d}${fu(l[`:@`],t,p,r,a)}`,g;g=p?lu(l[u],t):su(l[u],t,m,r,i,a),t.unpairedTags.indexOf(d)===-1?(!g||g.length===0)&&t.suppressEmptyNode?o+=h+`/>`:g&&g.endsWith(`>`)?o+=h+`>${g}${n}</${d}>`:(o+=h+`>`,g&&n!==``&&(g.includes(`/>`)||g.includes(`</`))?o+=n+t.indentBy+g+n:o+=g,o+=`</${d}>`):t.suppressUnpairedNode?o+=h+`>`:o+=h+`/>`,s=!0,r.pop()}return o}function cu(e,t){if(!e||t.ignoreAttributes)return null;let n={},r=!1;for(let i in e){if(!Object.prototype.hasOwnProperty.call(e,i))continue;let a=i.startsWith(t.attributeNamePrefix)?i.substr(t.attributeNamePrefix.length):i;n[a]=ru(e[i]),r=!0}return r?n:null}function lu(e,t){if(!Array.isArray(e))return e==null?``:e.toString();let n=``;for(let r=0;r<e.length;r++){let i=e[r],a=du(i);if(a===t.textNodeName)n+=i[a];else if(a===t.cdataPropName)n+=i[a][0][t.textNodeName];else if(a===t.commentPropName)n+=i[a][0][t.textNodeName];else if(a&&a[0]===`?`)continue;else if(a){let e=uu(i[`:@`],t),r=lu(i[a],t);!r||r.length===0?n+=`<${a}${e}/>`:n+=`<${a}${e}>${r}</${a}>`}}return n}function uu(e,t){let n=``;if(e&&!t.ignoreAttributes)for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let i=e[r];i===!0&&t.suppressBooleanAttributes?n+=` ${r.substr(t.attributeNamePrefix.length)}`:n+=` ${r.substr(t.attributeNamePrefix.length)}="${ru(i)}"`}return n}function du(e){let t=Object.keys(e);for(let n=0;n<t.length;n++){let r=t[n];if(Object.prototype.hasOwnProperty.call(e,r)&&r!==`:@`)return r}}function fu(e,t,n,r,i){let a=``;if(e&&!t.ignoreAttributes)for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;let s=o.substr(t.attributeNamePrefix.length),c=n?s:au(s,!0,t,r,i),l;n?l=e[o]:(l=t.attributeValueProcessor(o,e[o]),l=mu(l,t)),l===!0&&t.suppressBooleanAttributes?a+=` ${c}`:a+=` ${c}="${ru(l)}"`}return a}function pu(e,t){if(!t||t.length===0)return!1;for(let n=0;n<t.length;n++)if(e.matches(t[n]))return!0;return!1}function mu(e,t){if(e&&e.length>0&&t.processEntities)for(let n=0;n<t.entities.length;n++){let r=t.entities[n];e=e.replace(r.regex,r.val)}return e}function hu(e){return typeof e==`function`?e:Array.isArray(e)?t=>{for(let n of e)if(typeof n==`string`&&t===n||n instanceof RegExp&&n.test(t))return!0}:()=>!1}let gu={attributeNamePrefix:`@_`,attributesGroupName:!1,textNodeName:`#text`,ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:` `,suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:RegExp(`&`,`g`),val:`&`},{regex:RegExp(`>`,`g`),val:`>`},{regex:RegExp(`<`,`g`),val:`<`},{regex:RegExp(`'`,`g`),val:`'`},{regex:RegExp(`"`,`g`),val:`"`}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0,sanitizeName:!1};function _u(e){if(this.options=Object.assign({},gu,e),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(e=>typeof e==`string`&&e.startsWith(`*.`)?`..`+e.substring(2):e)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(let e=0;e<this.options.stopNodes.length;e++){let t=this.options.stopNodes[e];typeof t==`string`?this.stopNodeExpressions.push(new Cl(t)):t instanceof Cl&&this.stopNodeExpressions.push(t)}this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=hu(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Su),this.processTextOrObjNode=bu,this.options.format?(this.indentate=xu,this.tagEndChar=`>
|
|
14
|
+
`,this.newLine=`
|
|
15
|
+
`):(this.indentate=function(){return``},this.tagEndChar=`>`,this.newLine=``)}function vu(e,t){let n=e[`?xml`];if(n&&typeof n==`object`){if(t.attributesGroupName&&n[t.attributesGroupName]){let e=n[t.attributesGroupName][t.attributeNamePrefix+`version`];if(e)return e}let e=n[t.attributeNamePrefix+`version`];if(e)return e}return`1.0`}function yu(e,t,n,r,i){return!n.sanitizeName||sl(e,{xmlVersion:i})?e:n.sanitizeName(e,{isAttribute:t,matcher:r.readOnly()})}_u.prototype.build=function(e){if(this.options.preserveOrder)return ou(e,this.options);{Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e});let t=new El,n=vu(e,this.options);return this.j2x(e,0,t,n).val}},_u.prototype.j2x=function(e,t,n,r){let i=``,a=``;if(this.options.maxNestedTags&&n.getDepth()>=this.options.maxNestedTags)throw Error(`Maximum nested tags exceeded`);let o=this.options.jPath?n.toString():n,s=this.checkStopNode(n);for(let c in e){if(!Object.prototype.hasOwnProperty.call(e,c))continue;let l=c===this.options.textNodeName||c===this.options.cdataPropName||c===this.options.commentPropName||this.options.attributesGroupName&&c===this.options.attributesGroupName||this.isAttribute(c)||c[0]===`?`?c:yu(c,!1,this.options,n,r);if(e[c]===void 0)this.isAttribute(c)&&(a+=``);else if(e[c]===null)this.isAttribute(c)||l===this.options.cdataPropName||l===this.options.commentPropName?a+=``:l[0]===`?`?a+=this.indentate(t)+`<`+l+`?`+this.tagEndChar:a+=this.indentate(t)+`<`+l+`/`+this.tagEndChar;else if(e[c]instanceof Date)a+=this.buildTextValNode(e[c],l,``,t,n);else if(typeof e[c]!=`object`){let u=this.isAttribute(c);if(u&&!this.ignoreAttributesFn(u,o)){let t=yu(u,!0,this.options,n,r);i+=this.buildAttrPairStr(t,``+e[c],s)}else if(!u)if(c===this.options.textNodeName){let t=this.options.tagValueProcessor(c,``+e[c]);a+=this.replaceEntitiesValue(t)}else{n.push(l);let r=this.checkStopNode(n);if(n.pop(),r){let n=``+e[c];n===``?a+=this.indentate(t)+`<`+l+this.closeTag(l)+this.tagEndChar:a+=this.indentate(t)+`<`+l+`>`+n+`</`+l+this.tagEndChar}else a+=this.buildTextValNode(e[c],l,``,t,n)}}else if(Array.isArray(e[c])){let i=e[c].length,o=``,s=``;for(let u=0;u<i;u++){let i=e[c][u];if(i!==void 0)if(i===null)l[0]===`?`?a+=this.indentate(t)+`<`+l+`?`+this.tagEndChar:a+=this.indentate(t)+`<`+l+`/`+this.tagEndChar;else if(typeof i==`object`)if(this.options.oneListGroup){n.push(l);let e=this.j2x(i,t+1,n,r);n.pop(),o+=e.val,this.options.attributesGroupName&&i.hasOwnProperty(this.options.attributesGroupName)&&(s+=e.attrStr)}else o+=this.processTextOrObjNode(i,l,t,n,r);else if(this.options.oneListGroup){let e=this.options.tagValueProcessor(l,i);e=this.replaceEntitiesValue(e),o+=e}else{n.push(l);let e=this.checkStopNode(n);if(n.pop(),e){let e=``+i;e===``?o+=this.indentate(t)+`<`+l+this.closeTag(l)+this.tagEndChar:o+=this.indentate(t)+`<`+l+`>`+e+`</`+l+this.tagEndChar}else o+=this.buildTextValNode(i,l,``,t,n)}}this.options.oneListGroup&&(o=this.buildObjectNode(o,l,s,t)),a+=o}else if(this.options.attributesGroupName&&c===this.options.attributesGroupName){let t=Object.keys(e[c]),a=t.length;for(let o=0;o<a;o++){let a=yu(t[o],!0,this.options,n,r);i+=this.buildAttrPairStr(a,``+e[c][t[o]],s)}}else a+=this.processTextOrObjNode(e[c],l,t,n,r)}return{attrStr:i,val:a}},_u.prototype.buildAttrPairStr=function(e,t,n){return n||(t=this.options.attributeValueProcessor(e,``+t),t=this.replaceEntitiesValue(t)),this.options.suppressBooleanAttributes&&t===`true`?` `+e:` `+e+`="`+ru(t)+`"`};function bu(e,t,n,r,i){let a=this.extractAttributes(e);if(r.push(t,a),this.checkStopNode(r)){let i=this.buildRawContent(e),a=this.buildAttributesForStopNode(e);return r.pop(),this.buildObjectNode(i,t,a,n)}let o=this.j2x(e,n+1,r,i);return r.pop(),t[0]===`?`?this.buildTextValNode(``,t,o.attrStr,n,r):e[this.options.textNodeName]!==void 0&&Object.keys(e).length===1?this.buildTextValNode(e[this.options.textNodeName],t,o.attrStr,n,r):this.buildObjectNode(o.val,t,o.attrStr,n)}_u.prototype.extractAttributes=function(e){if(!e||typeof e!=`object`)return null;let t={},n=!1;if(this.options.attributesGroupName&&e[this.options.attributesGroupName]){let r=e[this.options.attributesGroupName];for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e))continue;let i=e.startsWith(this.options.attributeNamePrefix)?e.substring(this.options.attributeNamePrefix.length):e;t[i]=ru(r[e]),n=!0}}else for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let i=this.isAttribute(r);i&&(t[i]=ru(e[r]),n=!0)}return n?t:null},_u.prototype.buildRawContent=function(e){if(typeof e==`string`)return e;if(typeof e!=`object`||!e)return String(e);if(e[this.options.textNodeName]!==void 0)return e[this.options.textNodeName];let t=``;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n)||this.isAttribute(n)||this.options.attributesGroupName&&n===this.options.attributesGroupName)continue;let r=e[n];if(n===this.options.textNodeName)t+=r;else if(Array.isArray(r)){for(let e of r)if(typeof e==`string`||typeof e==`number`)t+=`<${n}>${e}</${n}>`;else if(typeof e==`object`&&e){let r=this.buildRawContent(e),i=this.buildAttributesForStopNode(e);r===``?t+=`<${n}${i}/>`:t+=`<${n}${i}>${r}</${n}>`}}else if(typeof r==`object`&&r){let e=this.buildRawContent(r),i=this.buildAttributesForStopNode(r);e===``?t+=`<${n}${i}/>`:t+=`<${n}${i}>${e}</${n}>`}else t+=`<${n}>${r}</${n}>`}return t},_u.prototype.buildAttributesForStopNode=function(e){if(!e||typeof e!=`object`)return``;let t=``;if(this.options.attributesGroupName&&e[this.options.attributesGroupName]){let n=e[this.options.attributesGroupName];for(let e in n){if(!Object.prototype.hasOwnProperty.call(n,e))continue;let r=e.startsWith(this.options.attributeNamePrefix)?e.substring(this.options.attributeNamePrefix.length):e,i=n[e];i===!0&&this.options.suppressBooleanAttributes?t+=` `+r:t+=` `+r+`="`+i+`"`}}else for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=this.isAttribute(n);if(r){let i=e[n];i===!0&&this.options.suppressBooleanAttributes?t+=` `+r:t+=` `+r+`="`+i+`"`}}return t},_u.prototype.buildObjectNode=function(e,t,n,r){if(e===``)return t[0]===`?`?this.indentate(r)+`<`+t+n+`?`+this.tagEndChar:this.indentate(r)+`<`+t+n+this.closeTag(t)+this.tagEndChar;if(t[0]===`?`)return this.indentate(r)+`<`+t+n+`?`+this.tagEndChar;{let i=`</`+t+this.tagEndChar,a=``;return t[0]===`?`&&(a=`?`,i=``),(n||n===``)&&e.indexOf(`<`)===-1?this.indentate(r)+`<`+t+n+a+`>`+e+i:this.options.commentPropName!==!1&&t===this.options.commentPropName&&a.length===0?this.indentate(r)+`<!--${e}-->`+this.newLine:this.indentate(r)+`<`+t+n+a+this.tagEndChar+e+this.indentate(r)+i}},_u.prototype.closeTag=function(e){let t=``;return this.options.unpairedTags.indexOf(e)===-1?t=this.options.suppressEmptyNode?`/`:`></${e}`:this.options.suppressUnpairedNode||(t=`/`),t},_u.prototype.checkStopNode=function(e){if(!this.stopNodeExpressions||this.stopNodeExpressions.length===0)return!1;for(let t=0;t<this.stopNodeExpressions.length;t++)if(e.matches(this.stopNodeExpressions[t]))return!0;return!1},_u.prototype.buildTextValNode=function(e,t,n,r,i){if(this.options.cdataPropName!==!1&&t===this.options.cdataPropName){let t=nu(e);return this.indentate(r)+`<![CDATA[${t}]]>`+this.newLine}else if(this.options.commentPropName!==!1&&t===this.options.commentPropName){let t=tu(e);return this.indentate(r)+`<!--${t}-->`+this.newLine}else if(t[0]===`?`)return this.indentate(r)+`<`+t+n+`?`+this.tagEndChar;else{let i=this.options.tagValueProcessor(t,e);return i=this.replaceEntitiesValue(i),i===``?this.indentate(r)+`<`+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(r)+`<`+t+n+`>`+i+`</`+t+this.tagEndChar}},_u.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){let n=this.options.entities[t];e=e.replace(n.regex,n.val)}return e};function xu(e){return this.options.indentBy.repeat(e)}function Su(e){return e.startsWith(this.options.attributeNamePrefix)&&e!==this.options.textNodeName?e.substr(this.attrPrefixLen):!1}var Cu=_u,wu=class{axiosClient;baseURI;xmlParser;signingKey;ALGORITHM=`sha512`;TTL=1200;HASH_LENGTH=32;ITERATION_COUNT=1e4;constructor({axiosClient:e,baseURI:t}){this.axiosClient=e,this.baseURI=t,this.xmlParser=new eu}async signUrl(e,t){let n=new URL(e);n.searchParams.set(`OC-Credential`,t),n.searchParams.set(`OC-Date`,new Date().toISOString()),n.searchParams.set(`OC-Expires`,this.TTL.toString()),n.searchParams.set(`OC-Verb`,`GET`);let r=await this.createHashedKey(n.toString());return n.searchParams.set(`OC-Algo`,`PBKDF2/${this.ITERATION_COUNT}-SHA512`),n.searchParams.set(`OC-Signature`,r),n.toString()}async getSignKey(){if(this.signingKey)return this.signingKey;let e=await this.axiosClient.get(N(this.baseURI,`ocs/v1.php/cloud/user/signing-key`),{headers:{"Content-Type":`application/x-www-form-urlencoded`}}),t=this.xmlParser.parse(e.data);return this.signingKey=t.ocs.data[`signing-key`],this.signingKey}async createHashedKey(e){return rc(e,await this.getSignKey(),this.ITERATION_COUNT,this.HASH_LENGTH,this.ALGORITHM).toString(`hex`)}};let Tu=(e,t)=>{let n=new URL(e);n.pathname=[...n.pathname.split(`/`),`ocs`,`v1.php`].filter(Boolean).join(`/`);let r=n.href,i=fs(r,t),a=new wu({baseURI:e,axiosClient:t});return{getCapabilities:()=>i.getCapabilities(),signUrl:(e,t)=>a.signUrl(e,t)}},Eu=(e,{fileId:t,path:n,name:r})=>{if(n!==void 0)return N(e.webDavPath,n);if(t!==void 0){if(ss(e))throw Error(`public spaces need a path provided`);return N(`spaces`,t,r||``)}return e.webDavPath},Du=(e,t)=>({copyFiles(t,{path:n,fileId:r},i,{path:a,parentFolderId:o,name:s},{overwrite:c,...l}={}){let u=Eu(t,{fileId:r,path:n}),d=Eu(i,{fileId:o,path:a,name:s});return e.copy(u,d,{overwrite:c||!1,...l})}}),Ou=(e,t,n)=>({async createFolder(n,{path:r,parentFolderId:i,folderName:a,fetchFolder:o=!0,...s}){let c=Eu(n,{fileId:i,path:r,name:a});if(await e.mkcol(c),o)return t.getFileInfo(n,{path:r},s)}}),ku=(e,{axiosClient:t})=>({async getFileContents(n,{fileId:r,path:i},{responseType:a=`text`,noCache:o=!0,headers:s,...c}={}){try{let l=Eu(n,{fileId:r,path:i}),u=await t.get(e.getFileUrl(l),{responseType:a,headers:{...o&&{"Cache-Control":`no-cache`},...s||{}},...c});return{response:u,body:u.data,headers:{ETag:u.headers.etag,"OC-ETag":u.headers[`oc-etag`],"OC-FileId":u.headers[`oc-fileid`]}}}catch(e){let{message:t,response:n}=e;throw new Zn(t,n,n.status)}}}),Au=(e,t)=>({async getFileInfo(t,n,r){return(await e.listFiles(t,n,{depth:0,...r})).resource}}),ju=(e,t,n,{axiosClient:r,baseUrl:i})=>({async getFileUrl(a,o,{disposition:s=`attachment`,version:c=null,username:l=``,...u}){if(s===`inline`){let e=await t.getFileContents(a,o,{responseType:`blob`,...u});return URL.createObjectURL(e.body)}if(c){if(!l)throw Error(`username is required for URL signing`);let t=e.getFileUrl(N(`meta`,o.fileId,`v`,c));return await Tu(i,r).signUrl(t,l)}if(o.downloadURL)return o.downloadURL;let{downloadURL:d}=await n.getFileInfo(a,o,{davProperties:[F.DownloadURL]});return d},revokeUrl:e=>{e&&e.startsWith(`blob:`)&&URL.revokeObjectURL(e)}}),Mu=(e,t)=>({getPublicFileUrl(t,n){return e.getFileUrl(N(`public-files`,n))}}),Nu=(e,t,n)=>({async listFiles(n,{path:r,fileId:i}={},{depth:a=1,davProperties:o,isTrash:s=!1,...c}={}){let l;if(ss(n)){l=await e.propfind(N(n.webDavPath,r),{depth:a,properties:o||cr.PublicLink,...c}),l.forEach(e=>{e.filename=e.filename.split(`/`).slice(1).join(`/`)}),l.length===1&&(l[0].filename=N(n.id,r,{leadingSlash:!0})),l.forEach(e=>{e.filename=e.filename.split(`/`).slice(2).join(`/`)});let t=n.driveAlias.startsWith(`ocm/`)?`ocm`:`public-link`;if((!r||r===`/`)&&a>0&&t===`ocm`&&l[0].props[F.PublicLinkItemType]===`file`&&(l=[{basename:n.fileId,type:`directory`,filename:``,props:{}},...l]),!r){let[r,...i]=l;return{resource:us({...r,id:n.id,driveAlias:n.driveAlias,webDavPath:n.webDavPath,publicLinkType:t}),children:i.map(t=>ts(t,e.extraProps))}}let i=l.map(t=>ts(t,e.extraProps));return{resource:i[0],children:i.slice(1)}}let u=async()=>{let e=await t.getPathForFileId(i);return this.listFiles(n,{path:e},{depth:a,davProperties:o})};try{let t=``;if(t=s?ls(n.id):Eu(n,{fileId:i,path:r}),l=await e.propfind(t,{depth:a,properties:o||cr.Default,...c}),s)return{resource:ts(l[0],e.extraProps),children:l.slice(1).map(ns)};let d=l.map(t=>ts(t,e.extraProps)),f=i===n.id;return i&&!f&&d[0].fileId&&i!==d[0].fileId?u():{resource:d[0],children:d.slice(1)}}catch(e){if(e.statusCode===404&&i)return u();throw e}}}),Pu=(e,t)=>({moveFiles(t,{path:n,fileId:r},i,{path:a,parentFolderId:o,name:s},{overwrite:c,...l}={}){let u=Eu(t,{fileId:r,path:n}),d=Eu(i,{fileId:o,path:a,name:s});return e.move(u,d,{overwrite:c||!1,...l})}}),Fu=(e,t,n)=>({async putFileContents(n,{fileName:r,path:i,parentFolderId:a,content:o=``,previousEntityTag:s=``,overwrite:c,onUploadProgress:l=null,...u}){let d=Eu(n,{fileId:a,name:r,path:i}),{result:f}=await e.put(d,o,{previousEntityTag:s,overwrite:c,onUploadProgress:l,...u});return t.getFileInfo(n,{fileId:f.headers.get(`Oc-Fileid`),path:i})}}),Iu=(e,t)=>({deleteFile(t,{path:n,...r}){return e.delete(N(t.webDavPath,n),r)}}),Lu=(e,t)=>({restoreFile(t,{id:n},{path:r},{overwrite:i,...a}={}){if(ss(t))return;let o=N(t.webDavPath,r);return e.move(N(t.webDavTrashPath,n),o,{overwrite:i,...a})}}),Ru=(e,t)=>({restoreFileVersion(t,{parentFolderId:n,name:r,path:i},a,o={}){let s=Eu(t,{path:i,fileId:n,name:r}),c=N(`meta`,n,`v`,a,{leadingSlash:!0}),l=N(`files`,s,{leadingSlash:!0});return e.copy(c,l,o)}}),zu=(e,t)=>({clearTrashBin(t,{id:n,...r}={}){let i=ls(t.id);return n&&(i=N(i,n)),e.delete(i,r)}}),Bu=(e,t)=>({async search(t,{davProperties:n=cr.Default,searchLimit:r,...i}){let{range:a,results:o}=await e.report(`/spaces/`,{pattern:t,limit:r,properties:n,...i});return{resources:o.map(t=>({...ts(t,e.extraProps),highlights:t.props[F.Highlights]||``})),totalResults:a?parseInt(a?.split(`/`)[1]):null}}}),Vu=(e,t)=>({async getPathForFileId(t,n={}){return(await e.propfind(N(`meta`,t,{leadingSlash:!0}),{properties:[F.MetaPathForUser],...n}))[0].props[F.MetaPathForUser]}});
|
|
16
|
+
/*! For license information please see index.js.LICENSE.txt */
|
|
17
|
+
var Hu={2:e=>{function t(e,t,i){e instanceof RegExp&&(e=n(e,i)),t instanceof RegExp&&(t=n(t,i));var a=r(e,t,i);return a&&{start:a[0],end:a[1],pre:i.slice(0,a[0]),body:i.slice(a[0]+e.length,a[1]),post:i.slice(a[1]+t.length)}}function n(e,t){var n=t.match(e);return n?n[0]:null}function r(e,t,n){var r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){for(r=[],a=n.length;u>=0&&!s;)u==c?(r.push(u),c=n.indexOf(e,u+1)):r.length==1?s=[r.pop(),l]:((i=r.pop())<a&&(a=i,o=l),l=n.indexOf(t,u+1)),u=c<l&&c>=0?c:l;r.length&&(s=[a,o])}return s}e.exports=t,t.range=r},47:(e,t,n)=>{var r=n(410),i=function(e){return typeof e==`string`};function a(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r];i&&i!==`.`&&(i===`..`?n.length&&n[n.length-1]!==`..`?n.pop():t&&n.push(`..`):n.push(i))}return n}var o=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,s={};function c(e){return o.exec(e).slice(1)}s.resolve=function(){for(var e=``,t=!1,n=arguments.length-1;n>=-1&&!t;n--){var r=n>=0?arguments[n]:process.cwd();if(!i(r))throw TypeError(`Arguments to path.resolve must be strings`);r&&(e=r+`/`+e,t=r.charAt(0)===`/`)}return(t?`/`:``)+(e=a(e.split(`/`),!t).join(`/`))||`.`},s.normalize=function(e){var t=s.isAbsolute(e),n=e.substr(-1)===`/`;return(e=a(e.split(`/`),!t).join(`/`))||t||(e=`.`),e&&n&&(e+=`/`),(t?`/`:``)+e},s.isAbsolute=function(e){return e.charAt(0)===`/`},s.join=function(){for(var e=``,t=0;t<arguments.length;t++){var n=arguments[t];if(!i(n))throw TypeError(`Arguments to path.join must be strings`);n&&(e+=e?`/`+n:n)}return s.normalize(e)},s.relative=function(e,t){function n(e){for(var t=0;t<e.length&&e[t]===``;t++);for(var n=e.length-1;n>=0&&e[n]===``;n--);return t>n?[]:e.slice(t,n+1)}e=s.resolve(e).substr(1),t=s.resolve(t).substr(1);for(var r=n(e.split(`/`)),i=n(t.split(`/`)),a=Math.min(r.length,i.length),o=a,c=0;c<a;c++)if(r[c]!==i[c]){o=c;break}var l=[];for(c=o;c<r.length;c++)l.push(`..`);return(l=l.concat(i.slice(o))).join(`/`)},s._makeLong=function(e){return e},s.dirname=function(e){var t=c(e),n=t[0],r=t[1];return n||r?(r&&=r.substr(0,r.length-1),n+r):`.`},s.basename=function(e,t){var n=c(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},s.extname=function(e){return c(e)[3]},s.format=function(e){if(!r.isObject(e))throw TypeError(`Parameter 'pathObject' must be an object, not `+typeof e);if(!i(e.root||``))throw TypeError(`'pathObject.root' must be a string or undefined, not `+typeof e.root);return(e.dir?e.dir+s.sep:``)+(e.base||``)},s.parse=function(e){if(!i(e))throw TypeError(`Parameter 'pathString' must be a string, not `+typeof e);var t=c(e);if(!t||t.length!==4)throw TypeError(`Invalid path '`+e+`'`);return t[1]=t[1]||``,t[2]=t[2]||``,t[3]=t[3]||``,{root:t[0],dir:t[0]+t[1].slice(0,t[1].length-1),base:t[2],ext:t[3],name:t[2].slice(0,t[2].length-t[3].length)}},s.sep=`/`,s.delimiter=`:`,e.exports=s},101:function(e,t,n){var r;e=n.nmd(e),function(){var i=(e&&e.exports,typeof global==`object`&&global);i.global!==i&&i.window;var a=function(e){this.message=e};(a.prototype=Error()).name=`InvalidCharacterError`;var o=function(e){throw new a(e)},s=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,c=/[\t\n\f\r ]/g,l={encode:function(e){e=String(e),/[^\0-\xFF]/.test(e)&&o(`The string to be encoded contains characters outside of the Latin1 range.`);for(var t,n,r,i,a=e.length%3,c=``,l=-1,u=e.length-a;++l<u;)t=e.charCodeAt(l)<<16,n=e.charCodeAt(++l)<<8,r=e.charCodeAt(++l),c+=s.charAt((i=t+n+r)>>18&63)+s.charAt(i>>12&63)+s.charAt(i>>6&63)+s.charAt(63&i);return a==2?(t=e.charCodeAt(l)<<8,n=e.charCodeAt(++l),c+=s.charAt((i=t+n)>>10)+s.charAt(i>>4&63)+s.charAt(i<<2&63)+`=`):a==1&&(i=e.charCodeAt(l),c+=s.charAt(i>>2)+s.charAt(i<<4&63)+`==`),c},decode:function(e){var t=(e=String(e).replace(c,``)).length;t%4==0&&(t=(e=e.replace(/==?$/,``)).length),(t%4==1||/[^+a-zA-Z0-9/]/.test(e))&&o(`Invalid character: the string to be decoded is not correctly encoded.`);for(var n,r,i=0,a=``,l=-1;++l<t;)r=s.indexOf(e.charAt(l)),n=i%4?64*n+r:r,i++%4&&(a+=String.fromCharCode(255&n>>(-2*i&6)));return a},version:`1.0.0`};(r=function(){return l}.call(t,n,t,e))===void 0||(e.exports=r)}()},135:e=>{function t(e){return!!e.constructor&&typeof e.constructor.isBuffer==`function`&&e.constructor.isBuffer(e)}e.exports=function(e){return e!=null&&(t(e)||function(e){return typeof e.readFloatLE==`function`&&typeof e.slice==`function`&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},172:(e,t)=>{t.d=function(e){if(!e)return 0;for(var t=(e=e.toString()).length,n=e.length;n--;){var r=e.charCodeAt(n);56320<=r&&r<=57343&&n--,127<r&&r<=2047?t++:2047<r&&r<=65535&&(t+=2)}return t}},285:(e,t,n)=>{var r=n(2);e.exports=function(e){return e?(e.substr(0,2)===`{}`&&(e=`\\{\\}`+e.substr(2)),g(function(e){return e.split(`\\\\`).join(i).split(`\\{`).join(a).split(`\\}`).join(o).split(`\\,`).join(s).split(`\\.`).join(c)}(e),!0).map(u)):[]};var i=`\0SLASH`+Math.random()+`\0`,a=`\0OPEN`+Math.random()+`\0`,o=`\0CLOSE`+Math.random()+`\0`,s=`\0COMMA`+Math.random()+`\0`,c=`\0PERIOD`+Math.random()+`\0`;function l(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function u(e){return e.split(i).join(`\\`).split(a).join(`{`).split(o).join(`}`).split(s).join(`,`).split(c).join(`.`)}function d(e){if(!e)return[``];var t=[],n=r(`{`,`}`,e);if(!n)return e.split(`,`);var i=n.pre,a=n.body,o=n.post,s=i.split(`,`);s[s.length-1]+=`{`+a+`}`;var c=d(o);return o.length&&(s[s.length-1]+=c.shift(),s.push.apply(s,c)),t.push.apply(t,s),t}function f(e){return`{`+e+`}`}function p(e){return/^-?0\d/.test(e)}function m(e,t){return e<=t}function h(e,t){return e>=t}function g(e,t){var n=[],i=r(`{`,`}`,e);if(!i)return[e];var a=i.pre,s=i.post.length?g(i.post,!1):[``];if(/\$$/.test(i.pre))for(var c=0;c<s.length;c++){var u=a+`{`+i.body+`}`+s[c];n.push(u)}else{var _,v,y=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),b=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),x=y||b,S=i.body.indexOf(`,`)>=0;if(!x&&!S)return i.post.match(/,(?!,).*\}/)?g(e=i.pre+`{`+i.body+o+i.post):[e];if(x)_=i.body.split(/\.\./);else if((_=d(i.body)).length===1&&(_=g(_[0],!1).map(f)).length===1)return s.map((function(e){return i.pre+_[0]+e}));if(x){var C=l(_[0]),w=l(_[1]),ee=Math.max(_[0].length,_[1].length),te=_.length==3?Math.abs(l(_[2])):1,T=m;w<C&&(te*=-1,T=h);var E=_.some(p);v=[];for(var ne=C;T(ne,w);ne+=te){var re;if(b)(re=String.fromCharCode(ne))===`\\`&&(re=``);else if(re=String(ne),E){var D=ee-re.length;if(D>0){var ie=Array(D+1).join(`0`);re=ne<0?`-`+ie+re.slice(1):ie+re}}v.push(re)}}else{v=[];for(var ae=0;ae<_.length;ae++)v.push.apply(v,g(_[ae],!1))}for(ae=0;ae<v.length;ae++)for(c=0;c<s.length;c++)u=a+v[ae]+s[c],(!t||x||u)&&n.push(u)}return n}},298:e=>{var t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,n={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join(``)},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var n=[],r=0;r<e.length;r+=3)for(var i=e[r]<<16|e[r+1]<<8|e[r+2],a=0;a<4;a++)8*r+6*a<=8*e.length?n.push(t.charAt(i>>>6*(3-a)&63)):n.push(`=`);return n.join(``)},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,``);for(var n=[],r=0,i=0;r<e.length;i=++r%4)i!=0&&n.push((t.indexOf(e.charAt(r-1))&2**(-2*i+8)-1)<<2*i|t.indexOf(e.charAt(r))>>>6-2*i);return n}};e.exports=n},345:()=>{},388:()=>{},410:()=>{},526:e=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join(``)}}};e.exports=t},542:(e,t,n)=>{(function(){var t=n(298),r=n(526).utf8,i=n(135),a=n(526).bin,o=function(e,n){e.constructor==String?e=n&&n.encoding===`binary`?a.stringToBytes(e):r.stringToBytes(e):i(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var s=t.bytesToWords(e),c=8*e.length,l=1732584193,u=-271733879,d=-1732584194,f=271733878,p=0;p<s.length;p++)s[p]=16711935&(s[p]<<8|s[p]>>>24)|4278255360&(s[p]<<24|s[p]>>>8);s[c>>>5]|=128<<c%32,s[14+(c+64>>>9<<4)]=c;var m=o._ff,h=o._gg,g=o._hh,_=o._ii;for(p=0;p<s.length;p+=16){var v=l,y=u,b=d,x=f;l=m(l,u,d,f,s[p+0],7,-680876936),f=m(f,l,u,d,s[p+1],12,-389564586),d=m(d,f,l,u,s[p+2],17,606105819),u=m(u,d,f,l,s[p+3],22,-1044525330),l=m(l,u,d,f,s[p+4],7,-176418897),f=m(f,l,u,d,s[p+5],12,1200080426),d=m(d,f,l,u,s[p+6],17,-1473231341),u=m(u,d,f,l,s[p+7],22,-45705983),l=m(l,u,d,f,s[p+8],7,1770035416),f=m(f,l,u,d,s[p+9],12,-1958414417),d=m(d,f,l,u,s[p+10],17,-42063),u=m(u,d,f,l,s[p+11],22,-1990404162),l=m(l,u,d,f,s[p+12],7,1804603682),f=m(f,l,u,d,s[p+13],12,-40341101),d=m(d,f,l,u,s[p+14],17,-1502002290),l=h(l,u=m(u,d,f,l,s[p+15],22,1236535329),d,f,s[p+1],5,-165796510),f=h(f,l,u,d,s[p+6],9,-1069501632),d=h(d,f,l,u,s[p+11],14,643717713),u=h(u,d,f,l,s[p+0],20,-373897302),l=h(l,u,d,f,s[p+5],5,-701558691),f=h(f,l,u,d,s[p+10],9,38016083),d=h(d,f,l,u,s[p+15],14,-660478335),u=h(u,d,f,l,s[p+4],20,-405537848),l=h(l,u,d,f,s[p+9],5,568446438),f=h(f,l,u,d,s[p+14],9,-1019803690),d=h(d,f,l,u,s[p+3],14,-187363961),u=h(u,d,f,l,s[p+8],20,1163531501),l=h(l,u,d,f,s[p+13],5,-1444681467),f=h(f,l,u,d,s[p+2],9,-51403784),d=h(d,f,l,u,s[p+7],14,1735328473),l=g(l,u=h(u,d,f,l,s[p+12],20,-1926607734),d,f,s[p+5],4,-378558),f=g(f,l,u,d,s[p+8],11,-2022574463),d=g(d,f,l,u,s[p+11],16,1839030562),u=g(u,d,f,l,s[p+14],23,-35309556),l=g(l,u,d,f,s[p+1],4,-1530992060),f=g(f,l,u,d,s[p+4],11,1272893353),d=g(d,f,l,u,s[p+7],16,-155497632),u=g(u,d,f,l,s[p+10],23,-1094730640),l=g(l,u,d,f,s[p+13],4,681279174),f=g(f,l,u,d,s[p+0],11,-358537222),d=g(d,f,l,u,s[p+3],16,-722521979),u=g(u,d,f,l,s[p+6],23,76029189),l=g(l,u,d,f,s[p+9],4,-640364487),f=g(f,l,u,d,s[p+12],11,-421815835),d=g(d,f,l,u,s[p+15],16,530742520),l=_(l,u=g(u,d,f,l,s[p+2],23,-995338651),d,f,s[p+0],6,-198630844),f=_(f,l,u,d,s[p+7],10,1126891415),d=_(d,f,l,u,s[p+14],15,-1416354905),u=_(u,d,f,l,s[p+5],21,-57434055),l=_(l,u,d,f,s[p+12],6,1700485571),f=_(f,l,u,d,s[p+3],10,-1894986606),d=_(d,f,l,u,s[p+10],15,-1051523),u=_(u,d,f,l,s[p+1],21,-2054922799),l=_(l,u,d,f,s[p+8],6,1873313359),f=_(f,l,u,d,s[p+15],10,-30611744),d=_(d,f,l,u,s[p+6],15,-1560198380),u=_(u,d,f,l,s[p+13],21,1309151649),l=_(l,u,d,f,s[p+4],6,-145523070),f=_(f,l,u,d,s[p+11],10,-1120210379),d=_(d,f,l,u,s[p+2],15,718787259),u=_(u,d,f,l,s[p+9],21,-343485551),l=l+v>>>0,u=u+y>>>0,d=d+b>>>0,f=f+x>>>0}return t.endian([l,u,d,f])};o._ff=function(e,t,n,r,i,a,o){var s=e+(t&n|~t&r)+(i>>>0)+o;return(s<<a|s>>>32-a)+t},o._gg=function(e,t,n,r,i,a,o){var s=e+(t&r|n&~r)+(i>>>0)+o;return(s<<a|s>>>32-a)+t},o._hh=function(e,t,n,r,i,a,o){var s=e+(t^n^r)+(i>>>0)+o;return(s<<a|s>>>32-a)+t},o._ii=function(e,t,n,r,i,a,o){var s=e+(n^(t|~r))+(i>>>0)+o;return(s<<a|s>>>32-a)+t},o._blocksize=16,o._digestsize=16,e.exports=function(e,n){if(e==null)throw Error(`Illegal argument `+e);var r=t.wordsToBytes(o(e,n));return n&&n.asBytes?r:n&&n.asString?a.bytesToString(r):t.bytesToHex(r)}})()},647:(e,t)=>{var n=Object.prototype.hasOwnProperty;function r(e){try{return decodeURIComponent(e.replace(/\+/g,` `))}catch{return null}}function i(e){try{return encodeURIComponent(e)}catch{return null}}t.stringify=function(e,t){t||=``;var r,a,o=[];for(a in typeof t!=`string`&&(t=`?`),e)if(n.call(e,a)){if((r=e[a])||r!=null&&!isNaN(r)||(r=``),a=i(a),r=i(r),a===null||r===null)continue;o.push(a+`=`+r)}return o.length?t+o.join(`&`):``},t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,i={};t=n.exec(e);){var a=r(t[1]),o=r(t[2]);a===null||o===null||a in i||(i[a]=o)}return i}},670:e=>{e.exports=function(e,t){if(t=t.split(`:`)[0],!(e=+e))return!1;switch(t){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:(e,t,n)=>{var r=n(670),i=n(647),a=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o=/[\n\r\t]/g,s=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=/:\d+$/,l=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,u=/^[a-zA-Z]:/;function d(e){return(e||``).toString().replace(a,``)}var f=[[`#`,`hash`],[`?`,`query`],function(e,t){return h(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]],p={hash:1,query:1};function m(e){var t,n=(typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{}).location||{},r={},i=typeof(e||=n);if(e.protocol===`blob:`)r=new _(unescape(e.pathname),{});else if(i===`string`)for(t in r=new _(e,{}),p)delete r[t];else if(i===`object`){for(t in e)t in p||(r[t]=e[t]);r.slashes===void 0&&(r.slashes=s.test(e.href))}return r}function h(e){return e===`file:`||e===`ftp:`||e===`http:`||e===`https:`||e===`ws:`||e===`wss:`}function g(e,t){e=(e=d(e)).replace(o,``),t||={};var n,r=l.exec(e),i=r[1]?r[1].toLowerCase():``,a=!!r[2],s=!!r[3],c=0;return a?s?(n=r[2]+r[3]+r[4],c=r[2].length+r[3].length):(n=r[2]+r[4],c=r[2].length):s?(n=r[3]+r[4],c=r[3].length):n=r[4],i===`file:`?c>=2&&(n=n.slice(2)):h(i)?n=r[4]:i?a&&(n=n.slice(2)):c>=2&&h(t.protocol)&&(n=r[4]),{protocol:i,slashes:a||h(i),slashesCount:c,rest:n}}function _(e,t,n){if(e=(e=d(e)).replace(o,``),!(this instanceof _))return new _(e,t,n);var a,s,c,l,p,v,y=f.slice(),b=typeof t,x=this,S=0;for(b!==`object`&&b!==`string`&&(n=t,t=null),n&&typeof n!=`function`&&(n=i.parse),a=!(s=g(e||``,t=m(t))).protocol&&!s.slashes,x.slashes=s.slashes||a&&t.slashes,x.protocol=s.protocol||t.protocol||``,e=s.rest,(s.protocol===`file:`&&(s.slashesCount!==2||u.test(e))||!s.slashes&&(s.protocol||s.slashesCount<2||!h(x.protocol)))&&(y[3]=[/(.*)/,`pathname`]);S<y.length;S++)typeof(l=y[S])==`function`?e=l(e,x):(c=l[0],v=l[1],c==c?typeof c==`string`?~(p=c===`@`?e.lastIndexOf(c):e.indexOf(c))&&(typeof l[2]==`number`?(x[v]=e.slice(0,p),e=e.slice(p+l[2])):(x[v]=e.slice(p),e=e.slice(0,p))):(p=c.exec(e))&&(x[v]=p[1],e=e.slice(0,p.index)):x[v]=e,x[v]=x[v]||a&&l[3]&&t[v]||``,l[4]&&(x[v]=x[v].toLowerCase()));n&&(x.query=n(x.query)),a&&t.slashes&&x.pathname.charAt(0)!==`/`&&(x.pathname!==``||t.pathname!==``)&&(x.pathname=function(e,t){if(e===``)return t;for(var n=(t||`/`).split(`/`).slice(0,-1).concat(e.split(`/`)),r=n.length,i=n[r-1],a=!1,o=0;r--;)n[r]===`.`?n.splice(r,1):n[r]===`..`?(n.splice(r,1),o++):o&&(r===0&&(a=!0),n.splice(r,1),o--);return a&&n.unshift(``),i!==`.`&&i!==`..`||n.push(``),n.join(`/`)}(x.pathname,t.pathname)),x.pathname.charAt(0)!==`/`&&h(x.protocol)&&(x.pathname=`/`+x.pathname),r(x.port,x.protocol)||(x.host=x.hostname,x.port=``),x.username=x.password=``,x.auth&&=(~(p=x.auth.indexOf(`:`))?(x.username=x.auth.slice(0,p),x.username=encodeURIComponent(decodeURIComponent(x.username)),x.password=x.auth.slice(p+1),x.password=encodeURIComponent(decodeURIComponent(x.password))):x.username=encodeURIComponent(decodeURIComponent(x.auth)),x.password?x.username+`:`+x.password:x.username),x.origin=x.protocol!==`file:`&&h(x.protocol)&&x.host?x.protocol+`//`+x.host:`null`,x.href=x.toString()}_.prototype={set:function(e,t,n){var a=this;switch(e){case`query`:typeof t==`string`&&t.length&&(t=(n||i.parse)(t)),a[e]=t;break;case`port`:a[e]=t,r(t,a.protocol)?t&&(a.host=a.hostname+`:`+t):(a.host=a.hostname,a[e]=``);break;case`hostname`:a[e]=t,a.port&&(t+=`:`+a.port),a.host=t;break;case`host`:a[e]=t,c.test(t)?(t=t.split(`:`),a.port=t.pop(),a.hostname=t.join(`:`)):(a.hostname=t,a.port=``);break;case`protocol`:a.protocol=t.toLowerCase(),a.slashes=!n;break;case`pathname`:case`hash`:if(t){var o=e===`pathname`?`/`:`#`;a[e]=t.charAt(0)===o?t:o+t}else a[e]=t;break;case`username`:case`password`:a[e]=encodeURIComponent(t);break;case`auth`:var s=t.indexOf(`:`);~s?(a.username=t.slice(0,s),a.username=encodeURIComponent(decodeURIComponent(a.username)),a.password=t.slice(s+1),a.password=encodeURIComponent(decodeURIComponent(a.password))):a.username=encodeURIComponent(decodeURIComponent(t))}for(var l=0;l<f.length;l++){var u=f[l];u[4]&&(a[u[1]]=a[u[1]].toLowerCase())}return a.auth=a.password?a.username+`:`+a.password:a.username,a.origin=a.protocol!==`file:`&&h(a.protocol)&&a.host?a.protocol+`//`+a.host:`null`,a.href=a.toString(),a},toString:function(e){e&&typeof e==`function`||(e=i.stringify);var t,n=this,r=n.host,a=n.protocol;a&&a.charAt(a.length-1)!==`:`&&(a+=`:`);var o=a+(n.protocol&&n.slashes||h(n.protocol)?`//`:``);return n.username?(o+=n.username,n.password&&(o+=`:`+n.password),o+=`@`):n.password?(o+=`:`+n.password,o+=`@`):n.protocol!==`file:`&&h(n.protocol)&&!r&&n.pathname!==`/`&&(o+=`@`),(r[r.length-1]===`:`||c.test(n.hostname)&&!n.port)&&(r+=`:`),o+=r+n.pathname,(t=typeof n.query==`object`?e(n.query):n.query)&&(o+=t.charAt(0)===`?`?t:`?`+t),n.hash&&(o+=n.hash),o}},_.extractProtocol=g,_.location=m,_.trimLeft=d,_.qs=i,e.exports=_},800:()=>{},805:()=>{},829:e=>{function t(e){return t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t(e)}function n(e){var t=typeof Map==`function`?new Map:void 0;return n=function(e){if(e===null||(n=e,Function.toString.call(n).indexOf(`[native code]`)===-1))return e;var n;if(typeof e!=`function`)throw TypeError(`Super expression must either be null or a function`);if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,o)}function o(){return r(e,arguments,a(this).constructor)}return o.prototype=Object.create(e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),i(o,e)},n(e)}function r(e,t,n){return r=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(e,t,n){var r=[null];r.push.apply(r,t);var a=new(Function.bind.apply(e,r));return n&&i(a,n.prototype),a},r.apply(null,arguments)}function i(e,t){return i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},i(e,t)}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}var o=function(e){function n(e){var r;return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),(r=function(e,n){return!n||t(n)!==`object`&&typeof n!=`function`?function(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}(e):n}(this,a(n).call(this,e))).name=`ObjectPrototypeMutationError`,r}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(n,e),n}(n(Error));function s(e,n){for(var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},i=n.split(`.`),a=i.length,o=function(t){var n=i[t];if(!e)return{v:void 0};if(n===`+`){if(Array.isArray(e))return{v:e.map((function(n,a){var o=i.slice(t+1);return o.length>0?s(n,o.join(`.`),r):r(e,a,i,t)}))};var a=i.slice(0,t).join(`.`);throw Error(`Object at wildcard (${a}) is not an array`)}e=r(e,n,i,t)},c=0;c<a;c++){var l=o(c);if(t(l)===`object`)return l.v}return e}function c(e,t){return e.length===t+1}e.exports={set:function(e,n,r){if(t(e)!=`object`||e===null||n===void 0)return e;if(typeof n==`number`)return e[n]=r,e[n];try{return s(e,n,(function(e,t,n,i){if(e===Reflect.getPrototypeOf({}))throw new o(`Attempting to mutate Object.prototype`);if(!e[t]){var a=Number.isInteger(Number(n[i+1])),s=n[i+1]===`+`;e[t]=a||s?[]:{}}return c(n,i)&&(e[t]=r),e[t]}))}catch(t){if(t instanceof o)throw t;return e}},get:function(e,n){if(t(e)!=`object`||e===null||n===void 0)return e;if(typeof n==`number`)return e[n];try{return s(e,n,(function(e,t){return e[t]}))}catch{return e}},has:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(t(e)!=`object`||e===null||n===void 0)return!1;if(typeof n==`number`)return n in e;try{var i=!1;return s(e,n,(function(e,t,n,a){if(!c(n,a))return e&&e[t];i=r.own?e.hasOwnProperty(t):t in e})),i}catch{return!1}},hasOwn:function(e,t,n){return this.has(e,t,n||{own:!0})},isIn:function(e,n,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(t(e)!=`object`||e===null||n===void 0)return!1;try{var a=!1,o=!1;return s(e,n,(function(e,n,i,s){return a=a||e===r||!!e&&e[n]===r,o=c(i,s)&&t(e)===`object`&&n in e,e&&e[n]})),i.validPath?a&&o:a}catch{return!1}},ObjectPrototypeMutationError:o}}},Uu={};function V(e){var t=Uu[e];if(t!==void 0)return t.exports;var n=Uu[e]={id:e,loaded:!1,exports:{}};return Hu[e].call(n.exports,n,n.exports,V),n.loaded=!0,n.exports}V.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return V.d(t,{a:t}),t},V.d=(e,t)=>{for(var n in t)V.o(t,n)&&!V.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},V.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),V.nmd=e=>(e.paths=[],e.children||=[],e);var Wu=V(737),Gu=V.n(Wu);function Ku(e){if(!qu(e))throw Error(`Parameter was not an error`)}function qu(e){return!!e&&typeof e==`object`&&(t=e,Object.prototype.toString.call(t))===`[object Error]`||e instanceof Error;var t}var Ju=class e extends Error{constructor(e,t){let{options:n,shortMessage:r}=function(e){let t,n=``;if(e.length===0)t={};else if(qu(e[0]))t={cause:e[0]},n=e.slice(1).join(` `)||``;else if(e[0]&&typeof e[0]==`object`)t=Object.assign({},e[0]),n=e.slice(1).join(` `)||``;else{if(typeof e[0]!=`string`)throw Error(`Invalid arguments passed to Layerr`);t={},n=n=e.join(` `)||``}return{options:t,shortMessage:n}}([...arguments]),i=r;if(n.cause&&(i=`${i}: ${n.cause.message}`),super(i),this.message=i,n.name&&typeof n.name==`string`?this.name=n.name:this.name=`Layerr`,n.cause&&Object.defineProperty(this,`_cause`,{value:n.cause}),Object.defineProperty(this,`_info`,{value:{}}),n.info&&typeof n.info==`object`&&Object.assign(this._info,n.info),Error.captureStackTrace){let e=n.constructorOpt||this.constructor;Error.captureStackTrace(this,e)}}static cause(e){return Ku(e),e._cause&&qu(e._cause)?e._cause:null}static fullStack(t){Ku(t);let n=e.cause(t);return n?`${t.stack}\ncaused by: ${e.fullStack(n)}`:t.stack??``}static info(t){Ku(t);let n={},r=e.cause(t);return r&&Object.assign(n,e.info(r)),t._info&&Object.assign(n,t._info),n}toString(){let e=this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(e=`${e}: ${this.message}`),e}},Yu=V(47),Xu=V.n(Yu);let Zu=`__PATH_SEPARATOR_POSIX__`,Qu=`__PATH_SEPARATOR_WINDOWS__`;function H(e){try{let t=e.replace(/\//g,Zu).replace(/\\\\/g,Qu);return encodeURIComponent(t).split(Qu).join(`\\\\`).split(Zu).join(`/`)}catch(e){throw new Ju(e,`Failed encoding path`)}}function $u(e){return e.startsWith(`/`)?e:`/`+e}function ed(e){let t=e;return t[0]!==`/`&&(t=`/`+t),/^.+\/$/.test(t)&&(t=t.substr(0,t.length-1)),t}function td(e){let t=new(Gu())(e).pathname;return t.length<=0&&(t=`/`),ed(t)}function U(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){return function(e){var t=[];if(e.length===0)return``;if(typeof e[0]!=`string`)throw TypeError(`Url must be a string. Received `+e[0]);e[0].match(/^[^/:]+:\/*$/)&&e.length>1&&(e[0]=e.shift()+e[0]),e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,`$1:///`):e[0]=e[0].replace(/^([^/:]+):\/*/,`$1://`);for(var n=0;n<e.length;n++){var r=e[n];if(typeof r!=`string`)throw TypeError(`Url must be a string. Received `+r);r!==``&&(n>0&&(r=r.replace(/^[\/]+/,``)),r=n<e.length-1?r.replace(/[\/]+$/,``):r.replace(/[\/]+$/,`/`),t.push(r))}var i=t.join(`/`),a=(i=i.replace(/\/(\?|&|#[^!])/g,`$1`)).split(`?`);return a.shift()+(a.length>0?`?`:``)+a.join(`&`)}(typeof arguments[0]==`object`?arguments[0]:[].slice.call(arguments))}(t.reduce(((e,t,n)=>((n===0||t!==`/`||t===`/`&&e[e.length-1]!==`/`)&&e.push(t),e)),[]))}var nd=V(542),rd=V.n(nd);function id(e,t){let n=e.url.replace(`//`,``),r=n.indexOf(`/`)==-1?`/`:n.slice(n.indexOf(`/`)),i=e.method?e.method.toUpperCase():`GET`,a=!!/(^|,)\s*auth\s*($|,)/.test(t.qop)&&`auth`,o=`00000000${t.nc}`.slice(-8),s=function(e,t,n,r,i,a,o){let s=o||rd()(`${t}:${n}:${r}`);return e&&e.toLowerCase()===`md5-sess`?rd()(`${s}:${i}:${a}`):s}(t.algorithm,t.username,t.realm,t.password,t.nonce,t.cnonce,t.ha1),c=rd()(`${i}:${r}`),l=a?rd()(`${s}:${t.nonce}:${o}:${t.cnonce}:${a}:${c}`):rd()(`${s}:${t.nonce}:${c}`),u={username:t.username,realm:t.realm,nonce:t.nonce,uri:r,qop:a,response:l,nc:o,cnonce:t.cnonce,algorithm:t.algorithm,opaque:t.opaque},d=[];for(let e in u)u[e]&&(e===`qop`||e===`nc`||e===`algorithm`?d.push(`${e}=${u[e]}`):d.push(`${e}="${u[e]}"`));return`Digest ${d.join(`, `)}`}function ad(e){return(e.headers&&e.headers.get(`www-authenticate`)||``).split(/\s/)[0].toLowerCase()===`digest`}var od=V(101),sd=V.n(od);function cd(e){return sd().decode(e)}function ld(e,t){var n;return`Basic ${n=`${e}:${t}`,sd().encode(n)}`}let ud=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope?self:typeof window<`u`?window:globalThis,dd=ud.fetch.bind(ud);ud.Headers,ud.Request,ud.Response;let W=function(e){return e.Auto=`auto`,e.Digest=`digest`,e.None=`none`,e.Password=`password`,e.Token=`token`,e}({}),fd=function(e){return e.DataTypeNoLength=`data-type-no-length`,e.InvalidAuthType=`invalid-auth-type`,e.InvalidOutputFormat=`invalid-output-format`,e.LinkUnsupportedAuthType=`link-unsupported-auth`,e.InvalidUpdateRange=`invalid-update-range`,e.NotSupported=`not-supported`,e}({});function pd(e,t,n,r,i){switch(e.authType){case W.Auto:t&&n&&(e.headers.Authorization=ld(t,n));break;case W.Digest:e.digest=function(e,t,n){return{username:e,password:t,ha1:n,nc:0,algorithm:`md5`,hasDigestAuth:!1}}(t,n,i);break;case W.None:break;case W.Password:e.headers.Authorization=ld(t,n);break;case W.Token:e.headers.Authorization=`${(a=r).token_type} ${a.access_token}`;break;default:throw new Ju({info:{code:fd.InvalidAuthType}},`Invalid auth type: ${e.authType}`)}var a}V(345),V(800);let md=`@@HOTPATCHER`,hd=()=>{};function gd(e){return{original:e,methods:[e],final:!1}}var _d=class{constructor(){this._configuration={registry:{},getEmptyAction:`null`},this.__type__=md}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(e){this.configuration.getEmptyAction=e}control(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!e||e.__type__!==md)throw 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)?t&&(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){return(this.get(e)||hd)(...[...arguments].slice(1))}get(e){let t=this.configuration.registry[e];if(!t)switch(this.getEmptyAction){case`null`:return null;case`throw`:throw Error(`Failed handling method request: No method provided for override: ${e}`);default:throw Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`)}return function(){var e=[...arguments];if(e.length===0)throw Error(`Failed creating sequence: No functions provided`);return function(){let t=[...arguments],n=this;for(;e.length>0;)t=[e.shift().apply(n,t)];return t[0]}}(...t.methods)}isPatched(e){return!!this.configuration.registry[e]}patch(e,t){let{chain:n=!1}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.configuration.registry[e]&&this.configuration.registry[e].final)throw Error(`Failed patching '${e}': Method marked as being final`);if(typeof t!=`function`)throw Error(`Failed patching '${e}': Provided method is not a function`);if(n)this.configuration.registry[e]?this.configuration.registry[e].methods.push(t):this.configuration.registry[e]=gd(t);else if(this.isPatched(e)){let{original:n}=this.configuration.registry[e];this.configuration.registry[e]=Object.assign(gd(t),{original:n})}else this.configuration.registry[e]=gd(t);return this}patchInline(e,t){this.isPatched(e)||this.patch(e,t);var n=[...arguments].slice(2);return this.execute(e,...n)}plugin(e){return[...arguments].slice(1).forEach((t=>{this.patch(e,t,{chain:!0})})),this}restore(e){if(!this.isPatched(e))throw Error(`Failed restoring method: No method present for key: ${e}`);if(typeof this.configuration.registry[e].original!=`function`)throw 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 Error(`Failed marking '${e}' as final: No method found for key`);return this.configuration.registry[e].final=!0,this}};let vd=null;function yd(){return vd||=new _d,vd}function bd(e){return function(e){if(typeof e!=`object`||!e||Object.prototype.toString.call(e)!=`[object Object]`)return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e)?Object.assign({},e):Object.setPrototypeOf(Object.assign({},e),Object.getPrototypeOf(e))}function xd(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let r=null,i=[...t];for(;i.length>0;){let e=i.shift();r=r?Sd(r,e):bd(e)}return r}function Sd(e,t){let n=bd(e);return Object.keys(t).forEach((e=>{n.hasOwnProperty(e)?Array.isArray(t[e])?n[e]=Array.isArray(n[e])?[...n[e],...t[e]]:[...t[e]]:typeof t[e]==`object`&&t[e]?n[e]=typeof n[e]==`object`&&n[e]?Sd(n[e],t[e]):bd(t[e]):n[e]=t[e]:n[e]=t[e]})),n}function Cd(e){let t={};for(let n of e.keys())t[n]=e.get(n);return t}function wd(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length===0)return{};let r={};return t.reduce(((e,t)=>(Object.keys(t).forEach((n=>{let i=n.toLowerCase();r.hasOwnProperty(i)?e[r[i]]=t[n]:(r[i]=n,e[n]=t[n])})),e)),{})}V(805);let Td=typeof ArrayBuffer==`function`,{toString:Ed}=Object.prototype;function Dd(e){return Td&&(e instanceof ArrayBuffer||Ed.call(e)===`[object ArrayBuffer]`)}function Od(e){return e!=null&&e.constructor!=null&&typeof e.constructor.isBuffer==`function`&&e.constructor.isBuffer(e)}function kd(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}function Ad(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}let jd=kd((function(e){let t=e._digest;return delete e._digest,t.hasDigestAuth&&(e=xd(e,{headers:{Authorization:id(e,t)}})),Ad(Nd(e),(function(n){let r=!1;return i=function(e){return r?e:n},(a=function(){if(n.status==401)return t.hasDigestAuth=function(e,t){if(!ad(e))return!1;let n=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){let r=e.headers&&e.headers.get(`www-authenticate`)||``,i=n.exec(r);if(!i)break;t[i[1]]=i[2]||i[3]}return t.nc+=1,t.cnonce=function(){let e=``;for(let t=0;t<32;++t)e=`${e}${`abcdef0123456789`[Math.floor(16*Math.random())]}`;return e}(),!0}(n,t),function(){if(t.hasDigestAuth)return Ad(Nd(e=xd(e,{headers:{Authorization:id(e,t)}})),(function(e){return e.status==401?t.hasDigestAuth=!1:t.nc++,r=!0,e}))}();t.nc++}())&&a.then?a.then(i):i(a);var i,a}))})),Md=kd((function(e,t){return Ad(Nd(e),(function(n){return n.ok?(t.authType=W.Password,n):n.status==401&&ad(n)?(t.authType=W.Digest,pd(t,t.username,t.password,void 0,void 0),e._digest=t.digest,jd(e)):n}))})),G=kd((function(e,t){return t.authType===W.Auto?Md(e,t):e._digest?jd(e):Nd(e)}));function K(e,t,n){let r=bd(e);return r.headers=wd(t.headers,r.headers||{},n.headers||{}),n.data!==void 0&&(r.data=n.data),n.signal&&(r.signal=n.signal),t.httpAgent&&(r.httpAgent=t.httpAgent),t.httpsAgent&&(r.httpsAgent=t.httpsAgent),t.digest&&(r._digest=t.digest),typeof t.withCredentials==`boolean`&&(r.withCredentials=t.withCredentials),r}function Nd(e){let t=yd();return t.patchInline(`request`,(e=>t.patchInline(`fetch`,dd,e.url,function(e){let t={},n={method:e.method};if(e.headers&&(t=wd(t,e.headers)),e.data!==void 0){let[r,i]=function(e){if(typeof e==`string`||Od(e)||Dd(e))return[e,{}];if(e&&typeof e==`object`)return[JSON.stringify(e),{"content-type":`application/json`}];throw Error(`Unable to convert request body: Unexpected body type: `+typeof e)}(e.data);n.body=r,t=wd(t,i)}return e.signal&&(n.signal=e.signal),e.withCredentials&&(n.credentials=`include`),n.headers=t,n}(e))),e)}var Pd=V(285);let Fd=e=>{if(typeof e!=`string`)throw TypeError(`invalid pattern`);if(e.length>65536)throw TypeError(`pattern is too long`)},Id={"[: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]},Ld=e=>e.replace(/[[\]\\-]/g,`\\$&`),Rd=e=>e.join(``),zd=(e,t)=>{let n=t;if(e.charAt(n)!==`[`)throw Error(`not in a brace expression`);let r=[],i=[],a=n+1,o=!1,s=!1,c=!1,l=!1,u=n,d=``;t:for(;a<e.length;){let t=e.charAt(a);if(t!==`!`&&t!==`^`||a!==n+1){if(t===`]`&&o&&!c){u=a+1;break}if(o=!0,t!==`\\`||c){if(t===`[`&&!c){for(let[t,[o,c,l]]of Object.entries(Id))if(e.startsWith(t,a)){if(d)return[`$.`,!1,e.length-n,!0];a+=t.length,l?i.push(o):r.push(o),s||=c;continue t}}c=!1,d?(t>d?r.push(Ld(d)+`-`+Ld(t)):t===d&&r.push(Ld(t)),d=``,a++):e.startsWith(`-]`,a+1)?(r.push(Ld(t+`-`)),a+=2):e.startsWith(`-`,a+1)?(d=t,a+=2):(r.push(Ld(t)),a++)}else c=!0,a++}else l=!0,a++}if(u<a)return[``,!1,0,!1];if(!r.length&&!i.length)return[`$.`,!1,e.length-n,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!l)return[(f=r[0].length===2?r[0].slice(-1):r[0],f.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`)),!1,u-n,!1];var f;let p=`[`+(l?`^`:``)+Rd(r)+`]`,m=`[`+(l?``:`^`)+Rd(i)+`]`;return[r.length&&i.length?`(`+p+`|`+m+`)`:r.length?p:m,s,u-n,!0]},Bd=function(e){let{windowsPathsNoEscape:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t?e.replace(/\[([^\/\\])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,`$1$2`).replace(/\\([^\/])/g,`$1`)},Vd=new Set([`!`,`?`,`+`,`*`,`@`]),Hd=e=>Vd.has(e),Ud=`(?!\\.)`,Wd=new Set([`[`,`.`]),Gd=new Set([`..`,`.`]),Kd=new Set(`().*{}+?[]^$\\!`),qd=`[^/]`,Jd=qd+`*?`,Yd=qd+`+?`;var Xd=class e{type;#e;#t;#n=!1;#r=[];#i;#a;#o;#s=!1;#c;#l;#u=!1;constructor(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.type=e,e&&(this.#t=!0),this.#i=t,this.#e=this.#i?this.#i.#e:this,this.#c=this.#e===this?n:this.#e.#c,this.#o=this.#e===this?[]:this.#e.#o,e!==`!`||this.#e.#s||this.#o.push(this),this.#a=this.#i?this.#i.#r.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#r)if(typeof e!=`string`&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#l===void 0?this.type?this.#l=this.type+`(`+this.#r.map((e=>String(e))).join(`|`)+`)`:this.#l=this.#r.map((e=>String(e))).join(``):this.#l}#d(){if(this!==this.#e)throw Error(`should only call on root`);if(this.#s)return this;let e;for(this.toString(),this.#s=!0;e=this.#o.pop();){if(e.type!==`!`)continue;let t=e,n=t.#i;for(;n;){for(let r=t.#a+1;!n.type&&r<n.#r.length;r++)for(let t of e.#r){if(typeof t==`string`)throw Error(`string part in extglob AST??`);t.copyIn(n.#r[r])}t=n,n=t.#i}}return this}push(){var t=[...arguments];for(let n of t)if(n!==``){if(typeof n!=`string`&&!(n instanceof e&&n.#i===this))throw Error(`invalid part: `+n);this.#r.push(n)}}toJSON(){let e=this.type===null?this.#r.slice().map((e=>typeof e==`string`?e:e.toJSON())):[this.type,...this.#r.map((e=>e.toJSON()))];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#s&&this.#i?.type===`!`)&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#a===0)return!0;let t=this.#i;for(let n=0;n<this.#a;n++){let r=t.#r[n];if(!(r instanceof e&&r.type===`!`))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type===`!`)return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let e=this.#i?this.#i.#r.length:0;return this.#a===e-1}copyIn(e){typeof e==`string`?this.push(e):this.push(e.clone(this))}clone(t){let n=new e(this.type,t);for(let e of this.#r)n.copyIn(e);return n}static#f(t,n,r,i){let a=!1,o=!1,s=-1,c=!1;if(n.type===null){let l=r,u=``;for(;l<t.length;){let r=t.charAt(l++);if(a||r===`\\`)a=!a,u+=r;else if(o)l===s+1?r!==`^`&&r!==`!`||(c=!0):r!==`]`||l===s+2&&c||(o=!1),u+=r;else if(r!==`[`)if(i.noext||!Hd(r)||t.charAt(l)!==`(`)u+=r;else{n.push(u),u=``;let a=new e(r,n);l=e.#f(t,a,l,i),n.push(a)}else o=!0,s=l,c=!1,u+=r}return n.push(u),l}let l=r+1,u=new e(null,n),d=[],f=``;for(;l<t.length;){let r=t.charAt(l++);if(a||r===`\\`)a=!a,f+=r;else if(o)l===s+1?r!==`^`&&r!==`!`||(c=!0):r!==`]`||l===s+2&&c||(o=!1),f+=r;else if(r!==`[`)if(Hd(r)&&t.charAt(l)===`(`){u.push(f),f=``;let n=new e(r,u);u.push(n),l=e.#f(t,n,l,i)}else if(r!==`|`){if(r===`)`)return f===``&&n.#r.length===0&&(n.#u=!0),u.push(f),f=``,n.push(...d,u),l;f+=r}else u.push(f),f=``,d.push(u),u=new e(null,n);else o=!0,s=l,c=!1,f+=r}return n.type=null,n.#t=void 0,n.#r=[t.substring(r-1)],l}static fromGlob(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=new e(null,void 0,n);return e.#f(t,r,0,n),r}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,n,r,i]=this.toRegExpSource();if(!(r||this.#t||this.#c.nocase&&!this.#c.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let a=(this.#c.nocase?`i`:``)+(i?`u`:``);return Object.assign(RegExp(`^${t}$`,a),{_src:t,_glob:e})}get options(){return this.#c}toRegExpSource(t){let n=t??!!this.#c.dot;if(this.#e===this&&this.#d(),!this.type){let r=this.isStart()&&this.isEnd(),i=this.#r.map((n=>{let[i,a,o,s]=typeof n==`string`?e.#m(n,this.#t,r):n.toRegExpSource(t);return this.#t=this.#t||o,this.#n=this.#n||s,i})).join(``),a=``;if(this.isStart()&&typeof this.#r[0]==`string`&&(this.#r.length!==1||!Gd.has(this.#r[0]))){let e=Wd,r=n&&e.has(i.charAt(0))||i.startsWith(`\\.`)&&e.has(i.charAt(2))||i.startsWith(`\\.\\.`)&&e.has(i.charAt(4)),o=!n&&!t&&e.has(i.charAt(0));a=r?`(?!(?:^|/)\\.\\.?(?:$|/))`:o?Ud:``}let o=``;return this.isEnd()&&this.#e.#s&&this.#i?.type===`!`&&(o=`(?:$|\\/)`),[a+i+o,Bd(i),this.#t=!!this.#t,this.#n]}let r=this.type===`*`||this.type===`+`,i=this.type===`!`?`(?:(?!(?:`:`(?:`,a=this.#p(n);if(this.isStart()&&this.isEnd()&&!a&&this.type!==`!`){let e=this.toString();return this.#r=[e],this.type=null,this.#t=void 0,[e,Bd(this.toString()),!1,!1]}let o=!r||t||n?``:this.#p(!0);o===a&&(o=``),o&&(a=`(?:${a})(?:${o})*?`);let s=``;return s=this.type===`!`&&this.#u?(this.isStart()&&!n?Ud:``)+Yd:i+a+(this.type===`!`?`))`+(!this.isStart()||n||t?``:Ud)+Jd+`)`:this.type===`@`?`)`:this.type===`?`?`)?`:this.type===`+`&&o?`)`:this.type===`*`&&o?`)?`:`)${this.type}`),[s,Bd(a),this.#t=!!this.#t,this.#n]}#p(e){return this.#r.map((t=>{if(typeof t==`string`)throw Error(`string type in extglob ast??`);let[n,r,i,a]=t.toRegExpSource(e);return this.#n=this.#n||a,n})).filter((e=>!(this.isStart()&&this.isEnd()&&!e))).join(`|`)}static#m(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=!1,i=``,a=!1;for(let o=0;o<e.length;o++){let s=e.charAt(o);if(r)r=!1,i+=(Kd.has(s)?`\\`:``)+s;else if(s!==`\\`){if(s===`[`){let[n,r,s,c]=zd(e,o);if(s){i+=n,a||=r,o+=s-1,t||=c;continue}}s===`*`?(i+=n&&e===`*`?Yd:Jd,t=!0):s===`?`?(i+=qd,t=!0):i+=s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`)}else o===e.length-1?i+=`\\\\`:r=!0}return[i,Bd(e),!!t,a]}};let q=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Fd(t),!(!n.nocomment&&t.charAt(0)===`#`)&&new Cf(t,n).match(e)},Zd=/^\*+([^+@!?\*\[\(]*)$/,Qd=e=>t=>!t.startsWith(`.`)&&t.endsWith(e),$d=e=>t=>t.endsWith(e),ef=e=>(e=e.toLowerCase(),t=>!t.startsWith(`.`)&&t.toLowerCase().endsWith(e)),tf=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),nf=/^\*+\.\*+$/,rf=e=>!e.startsWith(`.`)&&e.includes(`.`),af=e=>e!==`.`&&e!==`..`&&e.includes(`.`),of=/^\.\*+$/,sf=e=>e!==`.`&&e!==`..`&&e.startsWith(`.`),cf=/^\*+$/,lf=e=>e.length!==0&&!e.startsWith(`.`),uf=e=>e.length!==0&&e!==`.`&&e!==`..`,df=/^\?+([^+@!?\*\[\(]*)?$/,ff=e=>{let[t,n=``]=e,r=gf([t]);return n?(n=n.toLowerCase(),e=>r(e)&&e.toLowerCase().endsWith(n)):r},pf=e=>{let[t,n=``]=e,r=_f([t]);return n?(n=n.toLowerCase(),e=>r(e)&&e.toLowerCase().endsWith(n)):r},mf=e=>{let[t,n=``]=e,r=_f([t]);return n?e=>r(e)&&e.endsWith(n):r},hf=e=>{let[t,n=``]=e,r=gf([t]);return n?e=>r(e)&&e.endsWith(n):r},gf=e=>{let[t]=e,n=t.length;return e=>e.length===n&&!e.startsWith(`.`)},_f=e=>{let[t]=e,n=t.length;return e=>e.length===n&&e!==`.`&&e!==`..`},vf=typeof process==`object`&&process?typeof process.env==`object`&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:`posix`;q.sep=vf===`win32`?`\\`:`/`;let yf=Symbol(`globstar **`);q.GLOBSTAR=yf,q.filter=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return n=>q(n,e,t)};let bf=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.assign({},e,t)};q.defaults=e=>{if(!e||typeof e!=`object`||!Object.keys(e).length)return q;let t=q;return Object.assign((function(n,r){return t(n,r,bf(e,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}),{Minimatch:class extends t.Minimatch{constructor(t){super(t,bf(e,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}))}static defaults(n){return t.defaults(bf(e,n)).Minimatch}},AST:class extends t.AST{constructor(t,n){super(t,n,bf(e,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}static fromGlob(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.AST.fromGlob(n,bf(e,r))}},unescape:function(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.unescape(n,bf(e,r))},escape:function(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.escape(n,bf(e,r))},filter:function(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.filter(n,bf(e,r))},defaults:n=>t.defaults(bf(e,n)),makeRe:function(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.makeRe(n,bf(e,r))},braceExpand:function(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.braceExpand(n,bf(e,r))},match:function(n,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t.match(n,r,bf(e,i))},sep:t.sep,GLOBSTAR:yf})};let xf=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Fd(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:Pd(e)};q.braceExpand=xf,q.makeRe=function(e){return new Cf(e,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).makeRe()},q.match=function(e,t){let n=new Cf(t,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{});return e=e.filter((e=>n.match(e))),n.options.nonull&&!e.length&&e.push(t),e};let Sf=/[?*]|[+@!]\(.*?\)|\[|\]/;var Cf=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Fd(e),t||={},this.options=t,this.pattern=e,this.platform=t.platform||vf,this.isWindows=this.platform===`win32`,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,`/`)),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot===void 0?!(!this.isWindows||!this.nocase):t.windowsNoMagicRoot,this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!=`string`)return!0;return!1}debug(){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`)return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=function(){return console.error(...arguments)}),this.debug(this.pattern,this.globSet);let n=this.globSet.map((e=>this.slashSplit(e)));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map(((e,t,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){let t=!(e[0]!==``||e[1]!==``||e[2]!==`?`&&Sf.test(e[2])||Sf.test(e[3])),n=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map((e=>this.parse(e)))];if(n)return[e[0],...e.slice(1).map((e=>this.parse(e)))]}return e.map((e=>this.parse(e)))}));if(this.debug(this.pattern,r),this.set=r.filter((e=>e.indexOf(!1)===-1)),this.isWindows)for(let e=0;e<this.set.length;e++){let t=this.set[e];t[0]===``&&t[1]===``&&this.globParts[e][2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3])&&(t[2]=`?`)}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let t=0;t<e.length;t++)for(let n=0;n<e[t].length;n++)e[t][n]===`**`&&(e[t][n]=`*`);let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map((e=>{let t=-1;for(;(t=e.indexOf(`**`,t+1))!==-1;){let n=t;for(;e[n+1]===`**`;)n++;n!==t&&e.splice(t,n-t)}return e}))}levelOneOptimize(e){return e.map((e=>(e=e.reduce(((e,t)=>{let n=e[e.length-1];return t===`**`&&n===`**`?e:t===`..`&&n&&n!==`..`&&n!==`.`&&n!==`**`?(e.pop(),e):(e.push(t),e)}),[])).length===0?[``]:e))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){let r=e[n];n===1&&r===``&&e[0]===``||r!==`.`&&r!==``||(t=!0,e.splice(n,1),n--)}e[0]!==`.`||e.length!==2||e[1]!==`.`&&e[1]!==``||(t=!0,e.pop())}let n=0;for(;(n=e.indexOf(`..`,n+1))!==-1;){let r=e[n-1];r&&r!==`.`&&r!==`..`&&r!==`**`&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return e.length===0?[``]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let r=-1;for(;(r=n.indexOf(`**`,r+1))!==-1;){let i=r;for(;n[i+1]===`**`;)i++;i>r&&n.splice(r+1,i-r);let a=n[r+1],o=n[r+2],s=n[r+3];if(a!==`..`||!o||o===`.`||o===`..`||!s||s===`.`||s===`..`)continue;t=!0,n.splice(r,1);let c=n.slice(0);c[r]=`**`,e.push(c),r--}if(!this.preserveMultipleSlashes){for(let e=1;e<n.length-1;e++){let r=n[e];e===1&&r===``&&n[0]===``||r!==`.`&&r!==``||(t=!0,n.splice(e,1),e--)}n[0]!==`.`||n.length!==2||n[1]!==`.`&&n[1]!==``||(t=!0,n.pop())}let i=0;for(;(i=n.indexOf(`..`,i+1))!==-1;){let e=n[i-1];if(e&&e!==`.`&&e!==`..`&&e!==`**`){t=!0;let e=i===1&&n[i+1]===`**`?[`.`]:[];n.splice(i-1,2,...e),n.length===0&&n.push(``),i-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){let r=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(r){e[t]=[],e[n]=r;break}}return e.filter((e=>e.length))}partsMatch(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=0,i=0,a=[],o=``;for(;r<e.length&&i<t.length;)if(e[r]===t[i])a.push(o===`b`?t[i]:e[r]),r++,i++;else if(n&&e[r]===`**`&&t[i]===e[r+1])a.push(e[r]),r++;else if(n&&t[i]===`**`&&e[r]===t[i+1])a.push(t[i]),i++;else if(e[r]!==`*`||!t[i]||!this.options.dot&&t[i].startsWith(`.`)||t[i]===`**`){if(t[i]!==`*`||!e[r]||!this.options.dot&&e[r].startsWith(`.`)||e[r]===`**`||o===`a`)return!1;o=`b`,a.push(t[i]),r++,i++}else{if(o===`b`)return!1;o=`a`,a.push(e[r]),r++,i++}return e.length===t.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,n=0;for(let r=0;r<e.length&&e.charAt(r)===`!`;r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=this.options;if(this.isWindows){let n=typeof e[0]==`string`&&/^[a-z]:$/i.test(e[0]),r=!n&&e[0]===``&&e[1]===``&&e[2]===`?`&&/^[a-z]:$/i.test(e[3]),i=typeof t[0]==`string`&&/^[a-z]:$/i.test(t[0]),a=r?3:n?0:void 0,o=!i&&t[0]===``&&t[1]===``&&t[2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3])?3:i?0:void 0;if(typeof a==`number`&&typeof o==`number`){let[n,r]=[e[a],t[o]];n.toLowerCase()===r.toLowerCase()&&(t[o]=n,o>a?t=t.slice(o):a>o&&(e=e.slice(a)))}}let{optimizationLevel:i=1}=this.options;i>=2&&(e=this.levelTwoFileOptimize(e)),this.debug(`matchOne`,this,{file:e,pattern:t}),this.debug(`matchOne`,e.length,t.length);for(var a=0,o=0,s=e.length,c=t.length;a<s&&o<c;a++,o++){this.debug(`matchOne loop`);var l=t[o],u=e[a];if(this.debug(t,l,u),!1===l)return!1;if(l===yf){this.debug(`GLOBSTAR`,[t,l,u]);var d=a,f=o+1;if(f===c){for(this.debug(`** at the end`);a<s;a++)if(e[a]===`.`||e[a]===`..`||!r.dot&&e[a].charAt(0)===`.`)return!1;return!0}for(;d<s;){var p=e[d];if(this.debug(`
|
|
18
|
+
globstar while`,e,d,t,f,p),this.matchOne(e.slice(d),t.slice(f),n))return this.debug(`globstar found match!`,d,s,p),!0;if(p===`.`||p===`..`||!r.dot&&p.charAt(0)===`.`){this.debug(`dot detected!`,e,d,t,f);break}this.debug(`globstar swallow a segment, and continue`),d++}return!(!n||(this.debug(`
|
|
19
|
+
>>> no match, partial?`,e,d,t,f),d!==s))}let i;if(typeof l==`string`?(i=u===l,this.debug(`string match`,l,u,i)):(i=l.test(u),this.debug(`pattern match`,l,u,i)),!i)return!1}if(a===s&&o===c)return!0;if(a===s)return n;if(o===c)return a===s-1&&e[a]===``;throw Error(`wtf?`)}braceExpand(){return xf(this.pattern,this.options)}parse(e){Fd(e);let t=this.options;if(e===`**`)return yf;if(e===``)return``;let n,r=null;(n=e.match(cf))?r=t.dot?uf:lf:(n=e.match(Zd))?r=(t.nocase?t.dot?tf:ef:t.dot?$d:Qd)(n[1]):(n=e.match(df))?r=(t.nocase?t.dot?pf:ff:t.dot?mf:hf)(n):(n=e.match(nf))?r=t.dot?af:rf:(n=e.match(of))&&(r=sf);let i=Xd.fromGlob(e,this.options).toMMPattern();return r&&typeof i==`object`&&Reflect.defineProperty(i,`test`,{value:r}),i}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,n=t.noglobstar?`[^/]*?`:t.dot?`(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?`:`(?:(?!(?:\\/|^)\\.).)*?`,r=new Set(t.nocase?[`i`]:[]),i=e.map((e=>{let t=e.map((e=>{if(e instanceof RegExp)for(let t of e.flags.split(``))r.add(t);return typeof e==`string`?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`):e===yf?yf:e._src}));return t.forEach(((e,r)=>{let i=t[r+1],a=t[r-1];e===yf&&a!==yf&&(a===void 0?i!==void 0&&i!==yf?t[r+1]=`(?:\\/|`+n+`\\/)?`+i:t[r]=n:i===void 0?t[r-1]=a+`(?:\\/|`+n+`)?`:i!==yf&&(t[r-1]=a+`(?:\\/|\\/`+n+`\\/)`+i,t[r+1]=yf))})),t.filter((e=>e!==yf)).join(`/`)})).join(`|`),[a,o]=e.length>1?[`(?:`,`)`]:[``,``];i=`^`+a+i+o+`$`,this.negate&&(i=`^(?!`+i+`).+$`);try{this.regexp=new RegExp(i,[...r].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 t=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===`/`&&t)return!0;let n=this.options;this.isWindows&&(e=e.split(`\\`).join(`/`));let r=this.slashSplit(e);this.debug(this.pattern,`split`,r);let i=this.set;this.debug(this.pattern,`set`,i);let a=r[r.length-1];if(!a)for(let e=r.length-2;!a&&e>=0;e--)a=r[e];for(let e=0;e<i.length;e++){let o=i[e],s=r;if(n.matchBase&&o.length===1&&(s=[a]),this.matchOne(s,o,t))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(e){return q.defaults(e).Minimatch}};function wf(e){let t=Error(`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:``}Invalid response: ${e.status} ${e.statusText}`);return t.status=e.status,t.response=e,t}function J(e,t){let{status:n}=t;if(n===401&&e.digest)return t;if(n>=400)throw wf(t);return t}function Tf(e,t){return arguments.length>2&&arguments[2]!==void 0&&arguments[2]?{data:t,headers:e.headers?Cd(e.headers):{},status:e.status,statusText:e.statusText}:t}q.AST=Xd,q.Minimatch=Cf,q.escape=function(e){let{windowsPathsNoEscape:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t?e.replace(/[?*()[\]]/g,`[$&]`):e.replace(/[?*()[\]\\]/g,`\\$&`)},q.unescape=Bd;let Ef=(Df=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=K({url:U(e.remoteURL,H(t)),method:`COPY`,headers:{Destination:U(e.remoteURL,H(n)),Overwrite:!1===r.overwrite?`F`:`T`,Depth:r.shallow?`0`:`infinity`}},e,r);return o=function(t){J(e,t)},(a=G(i,e))&&a.then||(a=Promise.resolve(a)),o?a.then(o):a;var a,o},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(Df.apply(this,e))}catch(e){return Promise.reject(e)}});var Df;let Of={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(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e},captureMetaData:!1},kf=RegExp(`^[: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][: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\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`);function Af(e,t){let n=[],r=t.exec(e);for(;r;){let i=[];i.startIndex=t.lastIndex-r[0].length;let a=r.length;for(let e=0;e<a;e++)i.push(r[e]);n.push(i),r=t.exec(e)}return n}let jf=function(e){return kf.exec(e)!=null},Mf;Mf=typeof Symbol==`function`?Symbol(`XML Node Metadata`):`@@xmlMetadata`;var Nf=class{constructor(e){this.tagname=e,this.child=[],this[`:@`]={}}add(e,t){e===`__proto__`&&(e=`#__proto__`),this.child.push({[e]:t})}addChild(e,t){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}),t!==void 0&&(this.child[this.child.length-1][Mf]={startIndex:t})}static getMetaDataSymbol(){return Mf}},Pf=class{constructor(e){this.suppressValidationErr=!e}readDocType(e,t){let n={};if(e[t+3]!==`O`||e[t+4]!==`C`||e[t+5]!==`T`||e[t+6]!==`Y`||e[t+7]!==`P`||e[t+8]!==`E`)throw Error(`Invalid Tag instead of DOCTYPE`);{t+=9;let r=1,i=!1,a=!1,o=``;for(;t<e.length;t++)if(e[t]!==`<`||a)if(e[t]===`>`){if(a?e[t-1]===`-`&&e[t-2]===`-`&&(a=!1,r--):r--,r===0)break}else e[t]===`[`?i=!0:o+=e[t];else{if(i&&Ff(e,`!ENTITY`,t)){let r,i;t+=7,[r,i,t]=this.readEntityExp(e,t+1,this.suppressValidationErr),i.indexOf(`&`)===-1&&(n[r]={regx:RegExp(`&${r};`,`g`),val:i})}else if(i&&Ff(e,`!ELEMENT`,t)){t+=8;let{index:n}=this.readElementExp(e,t+1);t=n}else if(i&&Ff(e,`!ATTLIST`,t))t+=8;else if(i&&Ff(e,`!NOTATION`,t)){t+=9;let{index:n}=this.readNotationExp(e,t+1,this.suppressValidationErr);t=n}else{if(!Ff(e,`!--`,t))throw Error(`Invalid DOCTYPE`);a=!0}r++,o=``}if(r!==0)throw Error(`Unclosed DOCTYPE`)}return{entities:n,i:t}}readEntityExp(e,t){t=Y(e,t);let n=``;for(;t<e.length&&!/\s/.test(e[t])&&e[t]!==`"`&&e[t]!==`'`;)n+=e[t],t++;if(If(n),t=Y(e,t),!this.suppressValidationErr){if(e.substring(t,t+6).toUpperCase()===`SYSTEM`)throw Error(`External entities are not supported`);if(e[t]===`%`)throw Error(`Parameter entities are not supported`)}let r=``;return[t,r]=this.readIdentifierVal(e,t,`entity`),[n,r,--t]}readNotationExp(e,t){t=Y(e,t);let n=``;for(;t<e.length&&!/\s/.test(e[t]);)n+=e[t],t++;!this.suppressValidationErr&&If(n),t=Y(e,t);let r=e.substring(t,t+6).toUpperCase();if(!this.suppressValidationErr&&r!==`SYSTEM`&&r!==`PUBLIC`)throw Error(`Expected SYSTEM or PUBLIC, found "${r}"`);t+=r.length,t=Y(e,t);let i=null,a=null;if(r===`PUBLIC`)[t,i]=this.readIdentifierVal(e,t,`publicIdentifier`),e[t=Y(e,t)]!==`"`&&e[t]!==`'`||([t,a]=this.readIdentifierVal(e,t,`systemIdentifier`));else if(r===`SYSTEM`&&([t,a]=this.readIdentifierVal(e,t,`systemIdentifier`),!this.suppressValidationErr&&!a))throw Error(`Missing mandatory system identifier for SYSTEM notation`);return{notationName:n,publicIdentifier:i,systemIdentifier:a,index:--t}}readIdentifierVal(e,t,n){let r=``,i=e[t];if(i!==`"`&&i!==`'`)throw Error(`Expected quoted string, found "${i}"`);for(t++;t<e.length&&e[t]!==i;)r+=e[t],t++;if(e[t]!==i)throw Error(`Unterminated ${n} value`);return[++t,r]}readElementExp(e,t){t=Y(e,t);let n=``;for(;t<e.length&&!/\s/.test(e[t]);)n+=e[t],t++;if(!this.suppressValidationErr&&!jf(n))throw Error(`Invalid element name: "${n}"`);let r=``;if(e[t=Y(e,t)]===`E`&&Ff(e,`MPTY`,t))t+=4;else if(e[t]===`A`&&Ff(e,`NY`,t))t+=2;else if(e[t]===`(`){for(t++;t<e.length&&e[t]!==`)`;)r+=e[t],t++;if(e[t]!==`)`)throw Error(`Unterminated content model`)}else if(!this.suppressValidationErr)throw Error(`Invalid Element Expression, found "${e[t]}"`);return{elementName:n,contentModel:r.trim(),index:t}}readAttlistExp(e,t){t=Y(e,t);let n=``;for(;t<e.length&&!/\s/.test(e[t]);)n+=e[t],t++;If(n),t=Y(e,t);let r=``;for(;t<e.length&&!/\s/.test(e[t]);)r+=e[t],t++;if(!If(r))throw Error(`Invalid attribute name: "${r}"`);t=Y(e,t);let i=``;if(e.substring(t,t+8).toUpperCase()===`NOTATION`){if(i=`NOTATION`,e[t=Y(e,t+=8)]!==`(`)throw Error(`Expected '(', found "${e[t]}"`);t++;let n=[];for(;t<e.length&&e[t]!==`)`;){let r=``;for(;t<e.length&&e[t]!==`|`&&e[t]!==`)`;)r+=e[t],t++;if(r=r.trim(),!If(r))throw Error(`Invalid notation name: "${r}"`);n.push(r),e[t]===`|`&&(t++,t=Y(e,t))}if(e[t]!==`)`)throw Error(`Unterminated list of notations`);t++,i+=` (`+n.join(`|`)+`)`}else{for(;t<e.length&&!/\s/.test(e[t]);)i+=e[t],t++;if(!this.suppressValidationErr&&![`CDATA`,`ID`,`IDREF`,`IDREFS`,`ENTITY`,`ENTITIES`,`NMTOKEN`,`NMTOKENS`].includes(i.toUpperCase()))throw Error(`Invalid attribute type: "${i}"`)}t=Y(e,t);let a=``;return e.substring(t,t+8).toUpperCase()===`#REQUIRED`?(a=`#REQUIRED`,t+=8):e.substring(t,t+7).toUpperCase()===`#IMPLIED`?(a=`#IMPLIED`,t+=7):[t,a]=this.readIdentifierVal(e,t,`ATTLIST`),{elementName:n,attributeName:r,attributeType:i,defaultValue:a,index:t}}};let Y=(e,t)=>{for(;t<e.length&&/\s/.test(e[t]);)t++;return t};function Ff(e,t,n){for(let r=0;r<t.length;r++)if(t[r]!==e[n+r+1])return!1;return!0}function If(e){if(jf(e))return e;throw Error(`Invalid entity name ${e}`)}let Lf=/^[-+]?0x[a-fA-F0-9]+$/,Rf=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,zf={hex:!0,leadingZeros:!0,decimalPoint:`.`,eNotation:!0},Bf=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function Vf(e){return typeof e==`function`?e:Array.isArray(e)?t=>{for(let n of e)if(typeof n==`string`&&t===n||n instanceof RegExp&&n.test(t))return!0}:()=>!1}var Hf=class{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:(e,t)=>rp(t,10,`&#`)},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>rp(t,16,`&#x`)}},this.addExternalEntities=Uf,this.parseXml=Jf,this.parseTextData=Wf,this.resolveNameSpace=Gf,this.buildAttributesMap=qf,this.isItStopNode=Qf,this.replaceEntitiesValue=Xf,this.readStopNodeData=tp,this.saveTextToParentTag=Zf,this.addChild=Yf,this.ignoreAttributesFn=Vf(this.options.ignoreAttributes),this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodesExact=new Set,this.stopNodesWildcard=new Set;for(let e=0;e<this.options.stopNodes.length;e++){let t=this.options.stopNodes[e];typeof t==`string`&&(t.startsWith(`*.`)?this.stopNodesWildcard.add(t.substring(2)):this.stopNodesExact.add(t))}}}};function Uf(e){let t=Object.keys(e);for(let n=0;n<t.length;n++){let r=t[n];this.lastEntities[r]={regex:RegExp(`&`+r+`;`,`g`),val:e[r]}}}function Wf(e,t,n,r,i,a,o){if(e!==void 0&&(this.options.trimValues&&!r&&(e=e.trim()),e.length>0)){o||(e=this.replaceEntitiesValue(e));let r=this.options.tagValueProcessor(t,e,n,i,a);return r==null?e:typeof r!=typeof e||r!==e?r:this.options.trimValues||e.trim()===e?np(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function Gf(e){if(this.options.removeNSPrefix){let t=e.split(`:`),n=e.charAt(0)===`/`?`/`:``;if(t[0]===`xmlns`)return``;t.length===2&&(e=n+t[1])}return e}let Kf=RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,`gm`);function qf(e,t){if(!0!==this.options.ignoreAttributes&&typeof e==`string`){let n=Af(e,Kf),r=n.length,i={};for(let e=0;e<r;e++){let r=this.resolveNameSpace(n[e][1]);if(this.ignoreAttributesFn(r,t))continue;let a=n[e][4],o=this.options.attributeNamePrefix+r;if(r.length)if(this.options.transformAttributeName&&(o=this.options.transformAttributeName(o)),o===`__proto__`&&(o=`#__proto__`),a!==void 0){this.options.trimValues&&(a=a.trim()),a=this.replaceEntitiesValue(a);let e=this.options.attributeValueProcessor(r,a,t);i[o]=e==null?a:typeof e!=typeof a||e!==a?e:np(a,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(i[o]=!0)}if(!Object.keys(i).length)return;if(this.options.attributesGroupName){let e={};return e[this.options.attributesGroupName]=i,e}return i}}let Jf=function(e){e=e.replace(/\r\n?/g,`
|
|
20
|
+
`);let t=new Nf(`!xml`),n=t,r=``,i=``,a=new Pf(this.options.processEntities);for(let o=0;o<e.length;o++)if(e[o]===`<`)if(e[o+1]===`/`){let t=$f(e,`>`,o,`Closing Tag is not closed.`),a=e.substring(o+2,t).trim();if(this.options.removeNSPrefix){let e=a.indexOf(`:`);e!==-1&&(a=a.substr(e+1))}this.options.transformTagName&&(a=this.options.transformTagName(a)),n&&(r=this.saveTextToParentTag(r,n,i));let s=i.substring(i.lastIndexOf(`.`)+1);if(a&&this.options.unpairedTags.indexOf(a)!==-1)throw Error(`Unpaired tag can not be used as closing tag: </${a}>`);let c=0;s&&this.options.unpairedTags.indexOf(s)!==-1?(c=i.lastIndexOf(`.`,i.lastIndexOf(`.`)-1),this.tagsNodeStack.pop()):c=i.lastIndexOf(`.`),i=i.substring(0,c),n=this.tagsNodeStack.pop(),r=``,o=t}else if(e[o+1]===`?`){let t=ep(e,o,!1,`?>`);if(!t)throw Error(`Pi Tag is not closed.`);if(r=this.saveTextToParentTag(r,n,i),!(this.options.ignoreDeclaration&&t.tagName===`?xml`||this.options.ignorePiTags)){let e=new Nf(t.tagName);e.add(this.options.textNodeName,``),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[`:@`]=this.buildAttributesMap(t.tagExp,i)),this.addChild(n,e,i,o)}o=t.closeIndex+1}else if(e.substr(o+1,3)===`!--`){let t=$f(e,`-->`,o+4,`Comment is not closed.`);if(this.options.commentPropName){let a=e.substring(o+4,t-2);r=this.saveTextToParentTag(r,n,i),n.add(this.options.commentPropName,[{[this.options.textNodeName]:a}])}o=t}else if(e.substr(o+1,2)===`!D`){let t=a.readDocType(e,o);this.docTypeEntities=t.entities,o=t.i}else if(e.substr(o+1,2)===`![`){let t=$f(e,`]]>`,o,`CDATA is not closed.`)-2,a=e.substring(o+9,t);r=this.saveTextToParentTag(r,n,i);let s=this.parseTextData(a,n.tagname,i,!0,!1,!0,!0);s??=``,this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:a}]):n.add(this.options.textNodeName,s),o=t+2}else{let a=ep(e,o,this.options.removeNSPrefix),s=a.tagName,c=a.rawTagName,l=a.tagExp,u=a.attrExpPresent,d=a.closeIndex;if(this.options.transformTagName){let e=this.options.transformTagName(s);l===s&&(l=e),s=e}n&&r&&n.tagname!==`!xml`&&(r=this.saveTextToParentTag(r,n,i,!1));let f=n;f&&this.options.unpairedTags.indexOf(f.tagname)!==-1&&(n=this.tagsNodeStack.pop(),i=i.substring(0,i.lastIndexOf(`.`))),s!==t.tagname&&(i+=i?`.`+s:s);let p=o;if(this.isItStopNode(this.stopNodesExact,this.stopNodesWildcard,i,s)){let t=``;if(l.length>0&&l.lastIndexOf(`/`)===l.length-1)s[s.length-1]===`/`?(s=s.substr(0,s.length-1),i=i.substr(0,i.length-1),l=s):l=l.substr(0,l.length-1),o=a.closeIndex;else if(this.options.unpairedTags.indexOf(s)!==-1)o=a.closeIndex;else{let n=this.readStopNodeData(e,c,d+1);if(!n)throw Error(`Unexpected end of ${c}`);o=n.i,t=n.tagContent}let r=new Nf(s);s!==l&&u&&(r[`:@`]=this.buildAttributesMap(l,i)),t&&=this.parseTextData(t,s,i,!0,u,!0,!0),i=i.substr(0,i.lastIndexOf(`.`)),r.add(this.options.textNodeName,t),this.addChild(n,r,i,p)}else{if(l.length>0&&l.lastIndexOf(`/`)===l.length-1){if(s[s.length-1]===`/`?(s=s.substr(0,s.length-1),i=i.substr(0,i.length-1),l=s):l=l.substr(0,l.length-1),this.options.transformTagName){let e=this.options.transformTagName(s);l===s&&(l=e),s=e}let e=new Nf(s);s!==l&&u&&(e[`:@`]=this.buildAttributesMap(l,i)),this.addChild(n,e,i,p),i=i.substr(0,i.lastIndexOf(`.`))}else{let e=new Nf(s);this.tagsNodeStack.push(n),s!==l&&u&&(e[`:@`]=this.buildAttributesMap(l,i)),this.addChild(n,e,i,p),n=e}r=``,o=d}}else r+=e[o];return t.child};function Yf(e,t,n,r){this.options.captureMetaData||(r=void 0);let i=this.options.updateTag(t.tagname,n,t[`:@`]);!1===i||(typeof i==`string`&&(t.tagname=i),e.addChild(t,r))}let Xf=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){let n=this.docTypeEntities[t];e=e.replace(n.regx,n.val)}for(let t in this.lastEntities){let n=this.lastEntities[t];e=e.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){let n=this.htmlEntities[t];e=e.replace(n.regex,n.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function Zf(e,t,n,r){return e&&=(r===void 0&&(r=t.child.length===0),(e=this.parseTextData(e,t.tagname,n,!1,!!t[`:@`]&&Object.keys(t[`:@`]).length!==0,r))!==void 0&&e!==``&&t.add(this.options.textNodeName,e),``),e}function Qf(e,t,n,r){return!(!t||!t.has(r))||!(!e||!e.has(n))}function $f(e,t,n,r){let i=e.indexOf(t,n);if(i===-1)throw Error(r);return i+t.length-1}function ep(e,t,n){let r=function(e,t){let n,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`>`,i=``;for(let a=t;a<e.length;a++){let t=e[a];if(n)t===n&&(n=``);else if(t===`"`||t===`'`)n=t;else if(t===r[0]){if(!r[1]||e[a+1]===r[1])return{data:i,index:a}}else t===` `&&(t=` `);i+=t}}(e,t+1,arguments.length>3&&arguments[3]!==void 0?arguments[3]:`>`);if(!r)return;let i=r.data,a=r.index,o=i.search(/\s/),s=i,c=!0;o!==-1&&(s=i.substring(0,o),i=i.substring(o+1).trimStart());let l=s;if(n){let e=s.indexOf(`:`);e!==-1&&(s=s.substr(e+1),c=s!==r.data.substr(e+1))}return{tagName:s,tagExp:i,closeIndex:a,attrExpPresent:c,rawTagName:l}}function tp(e,t,n){let r=n,i=1;for(;n<e.length;n++)if(e[n]===`<`)if(e[n+1]===`/`){let a=$f(e,`>`,n,`${t} is not closed`);if(e.substring(n+2,a).trim()===t&&(i--,i===0))return{tagContent:e.substring(r,n),i:a};n=a}else if(e[n+1]===`?`)n=$f(e,`?>`,n+1,`StopNode is not closed.`);else if(e.substr(n+1,3)===`!--`)n=$f(e,`-->`,n+3,`StopNode is not closed.`);else if(e.substr(n+1,2)===`![`)n=$f(e,`]]>`,n,`StopNode is not closed.`)-2;else{let r=ep(e,n,`>`);r&&((r&&r.tagName)===t&&r.tagExp[r.tagExp.length-1]!==`/`&&i++,n=r.closeIndex)}}function np(e,t,n){if(t&&typeof e==`string`){let t=e.trim();return t===`true`||t!==`false`&&function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t=Object.assign({},zf,t),!e||typeof e!=`string`)return e;let n=e.trim();if(t.skipLike!==void 0&&t.skipLike.test(n))return e;if(e===`0`)return 0;if(t.hex&&Lf.test(n))return function(e){if(parseInt)return parseInt(e,16);if(Number.parseInt)return Number.parseInt(e,16);if(window&&window.parseInt)return window.parseInt(e,16);throw Error(`parseInt, Number.parseInt, window.parseInt are not supported`)}(n);if(n.includes(`e`)||n.includes(`E`))return function(e,t,n){if(!n.eNotation)return e;let r=t.match(Bf);if(r){let i=r[1]||``,a=r[3].indexOf(`e`)===-1?`E`:`e`,o=r[2],s=i?e[o.length+1]===a:e[o.length]===a;return o.length>1&&s?e:o.length!==1||!r[3].startsWith(`.${a}`)&&r[3][0]!==a?n.leadingZeros&&!s?(t=(r[1]||``)+r[3],Number(t)):e:Number(t)}return e}(e,n,t);{let i=Rf.exec(n);if(i){let a=i[1]||``,o=i[2],s=((r=i[3])&&r.indexOf(`.`)!==-1&&((r=r.replace(/0+$/,``))===`.`?r=`0`:r[0]===`.`?r=`0`+r:r[r.length-1]===`.`&&(r=r.substring(0,r.length-1))),r),c=a?e[o.length+1]===`.`:e[o.length]===`.`;if(!t.leadingZeros&&(o.length>1||o.length===1&&!c))return e;{let r=Number(n),i=String(r);if(r===0)return r;if(i.search(/[eE]/)!==-1)return t.eNotation?r:e;if(n.indexOf(`.`)!==-1)return i===`0`||i===s||i===`${a}${s}`?r:e;let c=o?s:n;return o?c===i||a+c===i?r:e:c===i||c===a+i?r:e}}return e}var r}(e,n)}return e===void 0?``:e}function rp(e,t,n){let r=Number.parseInt(e,t);return r>=0&&r<=1114111?String.fromCodePoint(r):n+e+`;`}let ip=Nf.getMetaDataSymbol();function ap(e,t){return op(e,t)}function op(e,t,n){let r,i={};for(let a=0;a<e.length;a++){let o=e[a],s=sp(o),c=``;if(c=n===void 0?s:n+`.`+s,s===t.textNodeName)r===void 0?r=o[s]:r+=``+o[s];else{if(s===void 0)continue;if(o[s]){let e=op(o[s],t,c),n=lp(e,t);o[ip]!==void 0&&(e[ip]=o[ip]),o[`:@`]?cp(e,o[`:@`],c,t):Object.keys(e).length!==1||e[t.textNodeName]===void 0||t.alwaysCreateTextNode?Object.keys(e).length===0&&(t.alwaysCreateTextNode?e[t.textNodeName]=``:e=``):e=e[t.textNodeName],i[s]!==void 0&&i.hasOwnProperty(s)?(Array.isArray(i[s])||(i[s]=[i[s]]),i[s].push(e)):t.isArray(s,c,n)?i[s]=[e]:i[s]=e}}}return typeof r==`string`?r.length>0&&(i[t.textNodeName]=r):r!==void 0&&(i[t.textNodeName]=r),i}function sp(e){let t=Object.keys(e);for(let e=0;e<t.length;e++){let n=t[e];if(n!==`:@`)return n}}function cp(e,t,n,r){if(t){let i=Object.keys(t),a=i.length;for(let o=0;o<a;o++){let a=i[o];r.isArray(a,n+`.`+a,!0,!0)?e[a]=[t[a]]:e[a]=t[a]}}}function lp(e,t){let{textNodeName:n}=t,r=Object.keys(e).length;return r===0||!(r!==1||!e[n]&&typeof e[n]!=`boolean`&&e[n]!==0)}let up={allowBooleanAttributes:!1,unpairedTags:[]};function dp(e){return e===` `||e===` `||e===`
|
|
21
|
+
`||e===`\r`}function fp(e,t){let n=t;for(;t<e.length;t++)if(!(e[t]!=`?`&&e[t]!=` `)){let r=e.substr(n,t-n);if(t>5&&r===`xml`)return X(`InvalidXml`,`XML declaration allowed only at the start of the document.`,Z(e,t));if(e[t]==`?`&&e[t+1]==`>`){t++;break}}return t}function pp(e,t){if(e.length>t+5&&e[t+1]===`-`&&e[t+2]===`-`){for(t+=3;t<e.length;t++)if(e[t]===`-`&&e[t+1]===`-`&&e[t+2]===`>`){t+=2;break}}else if(e.length>t+8&&e[t+1]===`D`&&e[t+2]===`O`&&e[t+3]===`C`&&e[t+4]===`T`&&e[t+5]===`Y`&&e[t+6]===`P`&&e[t+7]===`E`){let n=1;for(t+=8;t<e.length;t++)if(e[t]===`<`)n++;else if(e[t]===`>`&&(n--,n===0))break}else if(e.length>t+9&&e[t+1]===`[`&&e[t+2]===`C`&&e[t+3]===`D`&&e[t+4]===`A`&&e[t+5]===`T`&&e[t+6]===`A`&&e[t+7]===`[`){for(t+=8;t<e.length;t++)if(e[t]===`]`&&e[t+1]===`]`&&e[t+2]===`>`){t+=2;break}}return t}function mp(e,t){let n=``,r=``,i=!1;for(;t<e.length;t++){if(e[t]===`"`||e[t]===`'`)r===``?r=e[t]:r!==e[t]||(r=``);else if(e[t]===`>`&&r===``){i=!0;break}n+=e[t]}return r===``&&{value:n,index:t,tagClosed:i}}let hp=RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,`g`);function gp(e,t){let n=Af(e,hp),r={};for(let e=0;e<n.length;e++){if(n[e][1].length===0)return X(`InvalidAttr`,`Attribute '`+n[e][2]+`' has no space in starting.`,yp(n[e]));if(n[e][3]!==void 0&&n[e][4]===void 0)return X(`InvalidAttr`,`Attribute '`+n[e][2]+`' is without value.`,yp(n[e]));if(n[e][3]===void 0&&!t.allowBooleanAttributes)return X(`InvalidAttr`,`boolean attribute '`+n[e][2]+`' is not allowed.`,yp(n[e]));let i=n[e][2];if(!vp(i))return X(`InvalidAttr`,`Attribute '`+i+`' is an invalid name.`,yp(n[e]));if(r.hasOwnProperty(i))return X(`InvalidAttr`,`Attribute '`+i+`' is repeated.`,yp(n[e]));r[i]=1}return!0}function _p(e,t){if(e[++t]===`;`)return-1;if(e[t]===`#`)return function(e,t){let n=/\d/;for(e[t]===`x`&&(t++,n=/[\da-fA-F]/);t<e.length;t++){if(e[t]===`;`)return t;if(!e[t].match(n))break}return-1}(e,++t);let n=0;for(;t<e.length;t++,n++)if(!(e[t].match(/\w/)&&n<20)){if(e[t]===`;`)break;return-1}return t}function X(e,t,n){return{err:{code:e,msg:t,line:n.line||n,col:n.col}}}function vp(e){return jf(e)}function Z(e,t){let n=e.substring(0,t).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function yp(e){return e.startIndex+e[1].length}var bp=class{constructor(e){this.externalEntities={},this.options=function(e){return Object.assign({},Of,e)}(e)}parse(e,t){if(typeof e!=`string`&&e.toString)e=e.toString();else if(typeof e!=`string`)throw Error(`XML data is accepted in String or Bytes[] form.`);if(t){!0===t&&(t={});let n=function(e,t){t=Object.assign({},up,t);let n=[],r=!1,i=!1;e[0]===``&&(e=e.substr(1));for(let a=0;a<e.length;a++)if(e[a]===`<`&&e[a+1]===`?`){if(a+=2,a=fp(e,a),a.err)return a}else{if(e[a]!==`<`){if(dp(e[a]))continue;return X(`InvalidChar`,`char '`+e[a]+`' is not expected.`,Z(e,a))}{let o=a;if(a++,e[a]===`!`){a=pp(e,a);continue}{let s=!1;e[a]===`/`&&(s=!0,a++);let c=``;for(;a<e.length&&e[a]!==`>`&&e[a]!==` `&&e[a]!==` `&&e[a]!==`
|
|
22
|
+
`&&e[a]!==`\r`;a++)c+=e[a];if(c=c.trim(),c[c.length-1]===`/`&&(c=c.substring(0,c.length-1),a--),!jf(c)){let t;return t=c.trim().length===0?`Invalid space after '<'.`:`Tag '`+c+`' is an invalid name.`,X(`InvalidTag`,t,Z(e,a))}let l=mp(e,a);if(!1===l)return X(`InvalidAttr`,`Attributes for '`+c+`' have open quote.`,Z(e,a));let u=l.value;if(a=l.index,u[u.length-1]===`/`){let n=a-u.length;u=u.substring(0,u.length-1);let i=gp(u,t);if(!0!==i)return X(i.err.code,i.err.msg,Z(e,n+i.err.line));r=!0}else if(s){if(!l.tagClosed)return X(`InvalidTag`,`Closing tag '`+c+`' doesn't have proper closing.`,Z(e,a));if(u.trim().length>0)return X(`InvalidTag`,`Closing tag '`+c+`' can't have attributes or invalid starting.`,Z(e,o));if(n.length===0)return X(`InvalidTag`,`Closing tag '`+c+`' has not been opened.`,Z(e,o));{let t=n.pop();if(c!==t.tagName){let n=Z(e,t.tagStartPos);return X(`InvalidTag`,`Expected closing tag '`+t.tagName+`' (opened in line `+n.line+`, col `+n.col+`) instead of closing tag '`+c+`'.`,Z(e,o))}n.length==0&&(i=!0)}}else{let s=gp(u,t);if(!0!==s)return X(s.err.code,s.err.msg,Z(e,a-u.length+s.err.line));if(!0===i)return X(`InvalidXml`,`Multiple possible root nodes found.`,Z(e,a));t.unpairedTags.indexOf(c)!==-1||n.push({tagName:c,tagStartPos:o}),r=!0}for(a++;a<e.length;a++)if(e[a]===`<`){if(e[a+1]===`!`){a++,a=pp(e,a);continue}if(e[a+1]!==`?`)break;if(a=fp(e,++a),a.err)return a}else if(e[a]===`&`){let t=_p(e,a);if(t==-1)return X(`InvalidChar`,`char '&' is not expected.`,Z(e,a));a=t}else if(!0===i&&!dp(e[a]))return X(`InvalidXml`,`Extra text at the end`,Z(e,a));e[a]===`<`&&a--}}}return r?n.length==1?X(`InvalidTag`,`Unclosed tag '`+n[0].tagName+`'.`,Z(e,n[0].tagStartPos)):!(n.length>0)||X(`InvalidXml`,`Invalid '`+JSON.stringify(n.map((e=>e.tagName)),null,4).replace(/\r?\n/g,``)+`' found.`,{line:1,col:1}):X(`InvalidXml`,`Start tag expected.`,1)}(e,t);if(!0!==n)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}let n=new Hf(this.options);n.addExternalEntities(this.externalEntities);let r=n.parseXml(e);return this.options.preserveOrder||r===void 0?r:ap(r,this.options)}addEntity(e,t){if(t.indexOf(`&`)!==-1)throw Error(`Entity value can't have '&'`);if(e.indexOf(`&`)!==-1||e.indexOf(`;`)!==-1)throw Error(`An entity must be set without '&' and ';'. Eg. use '#xD' for '
'`);if(t===`&`)throw Error(`An entity with value '&' is not permitted`);this.externalEntities[e]=t}static getMetaDataSymbol(){return Nf.getMetaDataSymbol()}},xp=V(829),Sp=V.n(xp),Cp=function(e){return e.Array=`array`,e.Object=`object`,e.Original=`original`,e}(Cp||{});function wp(e,t){if(!e.endsWith(`propstat.prop.displayname`))return t}function Tp(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Cp.Original,r=Sp().get(e,t);return n===`array`&&!1===Array.isArray(r)?[r]:n===`object`&&Array.isArray(r)?r[0]:r}function Ep(e,t){return t??={attributeNamePrefix:`@`,attributeParsers:[],tagParsers:[wp]},new Promise((n=>{n(function(e){let{multistatus:t}=e;if(t===``)return{multistatus:{response:[]}};if(!t)throw Error(`Invalid response: No root multistatus found`);let n={multistatus:Array.isArray(t)?t[0]:t};return Sp().set(n,`multistatus.response`,Tp(n,`multistatus.response`,Cp.Array)),Sp().set(n,`multistatus.response`,Sp().get(n,`multistatus.response`).map((e=>function(e){let t=Object.assign({},e);return t.status?Sp().set(t,`status`,Tp(t,`status`,Cp.Object)):(Sp().set(t,`propstat`,Tp(t,`propstat`,Cp.Object)),Sp().set(t,`propstat.prop`,Tp(t,`propstat.prop`,Cp.Object))),t}(e)))),n}(function(e){let{attributeNamePrefix:t,attributeParsers:n,tagParsers:r}=e;return new bp({allowBooleanAttributes:!0,attributeNamePrefix:t,textNodeName:`text`,ignoreAttributes:!1,removeNSPrefix:!0,numberParseOptions:{hex:!0,leadingZeros:!1},attributeValueProcessor(e,t,r){for(let e of n)try{let n=e(r,t);if(n!==t)return n}catch{}return t},tagValueProcessor(e,t,n){for(let e of r)try{let r=e(n,t);if(r!==t)return r}catch{}return t}})}(t).parse(e)))}))}function Dp(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],{getlastmodified:r=null,getcontentlength:i=`0`,resourcetype:a=null,getcontenttype:o=null,getetag:s=null}=e,c=a&&typeof a==`object`&&a.collection!==void 0?`directory`:`file`,l={filename:t,basename:Xu().basename(t),lastmod:r,size:parseInt(i,10),type:c,etag:typeof s==`string`?s.replace(/"/g,``):null};return c===`file`&&(l.mime=o&&typeof o==`string`?o.split(`;`)[0]:``),n&&(e.displayname!==void 0&&(e.displayname=String(e.displayname)),l.props=e),l}function Op(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=null;try{e.multistatus.response[0].propstat&&(r=e.multistatus.response[0])}catch{}if(!r)throw Error(`Failed getting item stat: bad response`);let{propstat:{prop:i,status:a}}=r,[o,s,c]=a.split(` `,3),l=parseInt(s,10);if(l>=400){let e=Error(`Invalid response: ${l} ${c}`);throw e.status=l,e}return Dp(i,ed(t),n)}function kp(e){switch(String(e)){case`-3`:return`unlimited`;case`-2`:case`-1`:return`unknown`;default:return parseInt(String(e),10)}}function Ap(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}let jp=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{details:r=!1}=n;return Ap(G(K({url:U(e.remoteURL,H(t)),method:`PROPFIND`,headers:{Accept:`text/plain,application/xml`,Depth:`0`}},e,n),e),(function(n){return J(e,n),Ap(n.text(),(function(i){return Ap(Ep(i,e.parsing),(function(e){return Tf(n,Op(e,t,r),r)}))}))}))}));function Mp(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}let Np=Pp((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=function(e){if(!e||e===`/`)return[];let t=e,n=[];do n.push(t),t=Xu().dirname(t);while(t&&t!==`/`);return n}(ed(t));r.sort(((e,t)=>e.length>t.length?1:t.length>e.length?-1:0));let i=!1;return function(e,t,n){if(typeof e[Lp]==`function`){var r,i,a,o=e[Lp]();function s(e){try{for(;!(r=o.next()).done;)if((e=t(r.value))&&e.then){if(!zp(e))return void e.then(s,a||=Q.bind(null,i=new Rp,2));e=e.v}i?Q(i,1,e):i=e}catch(e){Q(i||=new Rp,2,e)}}if(s(),o.return){var c=function(e){try{r.done||o.return()}catch{}return e};if(i&&i.then)return i.then(c,(function(e){throw c(e)}));c()}return i}if(!(`length`in e))throw TypeError(`Object is not iterable`);for(var l=[],u=0;u<e.length;u++)l.push(e[u]);return function(e,t,n){var r,i,a=-1;return function o(s){try{for(;++a<e.length&&(!n||!n());)if((s=t(a))&&s.then){if(!zp(s))return void s.then(o,i||=Q.bind(null,r=new Rp,2));s=s.v}r?Q(r,1,s):r=s}catch(e){Q(r||=new Rp,2,e)}}(),r}(l,(function(e){return t(l[e])}),n)}(r,(function(r){return a=function(){return function(n,i){try{var a=Mp(jp(e,r),(function(e){if(e.type!==`directory`)throw Error(`Path includes a file: ${t}`)}))}catch(e){return i(e)}return a&&a.then?a.then(void 0,i):a}(0,(function(t){let a=t;return function(){if(a.status===404)return i=!0,Ip(Bp(e,r,{...n,recursive:!1}));throw t}()}))},(o=function(){if(i)return Ip(Bp(e,r,{...n,recursive:!1}))}())&&o.then?o.then(a):a();var a,o}),(function(){return!1}))}));function Pp(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}function Fp(){}function Ip(e,t){if(!t)return e&&e.then?e.then(Fp):Promise.resolve()}let Lp=typeof Symbol<`u`?Symbol.iterator||(Symbol.iterator=Symbol(`Symbol.iterator`)):`@@iterator`;function Q(e,t,n){if(!e.s){if(n instanceof Rp){if(!n.s)return void(n.o=Q.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(Q.bind(null,e,t),Q.bind(null,e,2));e.s=t,e.v=n;let r=e.o;r&&r(e)}}let Rp=function(){function e(){}return e.prototype.then=function(t,n){let r=new e,i=this.s;if(i){let e=1&i?t:n;if(e){try{Q(r,1,e(this.v))}catch(e){Q(r,2,e)}return r}return this}return this.o=function(e){try{let i=e.v;1&e.s?Q(r,1,t?t(i):i):n?Q(r,1,n(i)):Q(r,2,i)}catch(e){Q(r,2,e)}},r},e}();function zp(e){return e instanceof Rp&&1&e.s}let Bp=Pp((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!0===n.recursive)return Np(e,t,n);let r=K({url:U(e.remoteURL,(i=H(t),i.endsWith(`/`)?i:i+`/`)),method:`MKCOL`},e,n);var i;return Mp(G(r,e),(function(t){J(e,t)}))}));var Vp=V(388),Hp=V.n(Vp);let Up=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r={};if(typeof n.range==`object`&&typeof n.range.start==`number`){let e=`bytes=${n.range.start}-`;typeof n.range.end==`number`&&(e=`${e}${n.range.end}`),r.Range=e}let i=K({url:U(e.remoteURL,H(t)),method:`GET`,headers:r},e,n);return o=function(t){if(J(e,t),r.Range&&t.status!==206){let e=Error(`Invalid response code for partial request: ${t.status}`);throw e.status=t.status,e}return n.callback&&setTimeout((()=>{n.callback(t)}),0),t.body},(a=G(i,e))&&a.then||(a=Promise.resolve(a)),o?a.then(o):a;var a,o})),Wp=()=>{},Gp=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t,n){n.url||=U(e.remoteURL,H(t));let r=K(n,e,{});return a=function(t){return J(e,t),t},(i=G(r,e))&&i.then||(i=Promise.resolve(i)),a?i.then(a):i;var i,a})),Kp=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=K({url:U(e.remoteURL,H(t)),method:`DELETE`},e,n);return a=function(t){J(e,t)},(i=G(r,e))&&i.then||(i=Promise.resolve(i)),a?i.then(a):i;var i,a})),qp=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function(r,i){try{var a=(o=jp(e,t,n),s=function(){return!0},c?s?s(o):o:(o&&o.then||(o=Promise.resolve(o)),s?o.then(s):o))}catch(e){return i(e)}var o,s,c;return a&&a.then?a.then(void 0,i):a}(0,(function(e){if(e.status===404)return!1;throw e}))}));function Jp(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}let Yp=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Jp(G(K({url:U(e.remoteURL,H(t),`/`),method:`PROPFIND`,headers:{Accept:`text/plain,application/xml`,Depth:n.deep?`infinity`:`1`}},e,n),e),(function(r){return J(e,r),Jp(r.text(),(function(i){if(!i)throw Error(`Failed parsing directory contents: Empty response`);return Jp(Ep(i,e.parsing),(function(i){let a=$u(t),o=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0&&arguments[3],i=arguments.length>4&&arguments[4]!==void 0&&arguments[4],a=Xu().join(t,`/`),{multistatus:{response:o}}=e,s=o.map((e=>{let t=function(e){try{return e.replace(/^https?:\/\/[^\/]+/,``)}catch(e){throw new Ju(e,`Failed normalising HREF`)}}(e.href),{propstat:{prop:n}}=e;return Dp(n,a===`/`?decodeURIComponent(ed(t)):ed(Xu().relative(decodeURIComponent(a),decodeURIComponent(t))),r)}));return i?s:s.filter((e=>e.basename&&(e.type===`file`||e.filename!==n.replace(/\/$/,``))))}(i,$u(e.remoteBasePath||e.remotePath),a,n.details,n.includeSelf);return n.glob&&(o=function(e,t){return e.filter((e=>q(e.filename,t,{matchBase:!0})))}(o,n.glob)),Tf(r,o,n.details)}))}))}))}));function Xp(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}let Zp=Xp((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Qp(G(K({url:U(e.remoteURL,H(t)),method:`GET`,headers:{Accept:`text/plain`},transformResponse:[tm]},e,n),e),(function(t){return J(e,t),Qp(t.text(),(function(e){return Tf(t,e,n.details)}))}))}));function Qp(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}let $p=Xp((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Qp(G(K({url:U(e.remoteURL,H(t)),method:`GET`},e,n),e),(function(t){let r;return J(e,t),function(e,t){var n=e();return n&&n.then?n.then(t):t()}((function(){return Qp(t.arrayBuffer(),(function(e){r=e}))}),(function(){return Tf(t,r,n.details)}))}))})),em=Xp((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{format:r=`binary`}=n;if(r!==`binary`&&r!==`text`)throw new Ju({info:{code:fd.InvalidOutputFormat}},`Invalid output format: ${r}`);return r===`text`?Zp(e,t,n):$p(e,t,n)})),tm=e=>e;function nm(e,t){let n=``;return t.format&&t.indentBy.length>0&&(n=`
|
|
23
|
+
`),rm(e,t,``,n)}function rm(e,t,n,r){let i=``,a=!1;for(let o=0;o<e.length;o++){let s=e[o],c=im(s);if(c===void 0)continue;let l=``;if(l=n.length===0?c:`${n}.${c}`,c===t.textNodeName){let e=s[c];om(l,t)||(e=t.tagValueProcessor(c,e),e=sm(e,t)),a&&(i+=r),i+=e,a=!1;continue}if(c===t.cdataPropName){a&&(i+=r),i+=`<![CDATA[${s[c][0][t.textNodeName]}]]>`,a=!1;continue}if(c===t.commentPropName){i+=r+`\x3c!--${s[c][0][t.textNodeName]}--\x3e`,a=!0;continue}if(c[0]===`?`){let e=am(s[`:@`],t),n=c===`?xml`?``:r,o=s[c][0][t.textNodeName];o=o.length===0?``:` `+o,i+=n+`<${c}${o}${e}?>`,a=!0;continue}let u=r;u!==``&&(u+=t.indentBy);let d=r+`<${c}${am(s[`:@`],t)}`,f=rm(s[c],t,l,u);t.unpairedTags.indexOf(c)===-1?f&&f.length!==0||!t.suppressEmptyNode?f&&f.endsWith(`>`)?i+=d+`>${f}${r}</${c}>`:(i+=d+`>`,f&&r!==``&&(f.includes(`/>`)||f.includes(`</`))?i+=r+t.indentBy+f+r:i+=f,i+=`</${c}>`):i+=d+`/>`:t.suppressUnpairedNode?i+=d+`>`:i+=d+`/>`,a=!0}return i}function im(e){let t=Object.keys(e);for(let n=0;n<t.length;n++){let r=t[n];if(e.hasOwnProperty(r)&&r!==`:@`)return r}}function am(e,t){let n=``;if(e&&!t.ignoreAttributes)for(let r in e){if(!e.hasOwnProperty(r))continue;let i=t.attributeValueProcessor(r,e[r]);i=sm(i,t),!0===i&&t.suppressBooleanAttributes?n+=` ${r.substr(t.attributeNamePrefix.length)}`:n+=` ${r.substr(t.attributeNamePrefix.length)}="${i}"`}return n}function om(e,t){let n=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(`.`)+1);for(let r in t.stopNodes)if(t.stopNodes[r]===e||t.stopNodes[r]===`*.`+n)return!0;return!1}function sm(e,t){if(e&&e.length>0&&t.processEntities)for(let n=0;n<t.entities.length;n++){let r=t.entities[n];e=e.replace(r.regex,r.val)}return e}let cm={attributeNamePrefix:`@_`,attributesGroupName:!1,textNodeName:`#text`,ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:` `,suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:RegExp(`&`,`g`),val:`&`},{regex:RegExp(`>`,`g`),val:`>`},{regex:RegExp(`<`,`g`),val:`<`},{regex:RegExp(`'`,`g`),val:`'`},{regex:RegExp(`"`,`g`),val:`"`}],processEntities:!0,stopNodes:[],oneListGroup:!1};function lm(e){this.options=Object.assign({},cm,e),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=Vf(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=fm),this.processTextOrObjNode=um,this.options.format?(this.indentate=dm,this.tagEndChar=`>
|
|
24
|
+
`,this.newLine=`
|
|
25
|
+
`):(this.indentate=function(){return``},this.tagEndChar=`>`,this.newLine=``)}function um(e,t,n,r){let i=this.j2x(e,n+1,r.concat(t));return e[this.options.textNodeName]!==void 0&&Object.keys(e).length===1?this.buildTextValNode(e[this.options.textNodeName],t,i.attrStr,n):this.buildObjectNode(i.val,t,i.attrStr,n)}function dm(e){return this.options.indentBy.repeat(e)}function fm(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}function pm(e){return new lm({attributeNamePrefix:`@_`,format:!0,ignoreAttributes:!1,suppressEmptyNode:!0}).build(mm({lockinfo:{"@_xmlns:d":`DAV:`,lockscope:{exclusive:{}},locktype:{write:{}},owner:{href:e}}},`d`))}function mm(e,t){let n={...e};for(let e in n)n.hasOwnProperty(e)&&(n[e]&&typeof n[e]==`object`&&e.indexOf(`:`)===-1?(n[`${t}:${e}`]=mm(n[e],t),delete n[e]):!1===/^@_/.test(e)&&(n[`${t}:${e}`]=n[e],delete n[e]));return n}function hm(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function gm(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}lm.prototype.build=function(e){return this.options.preserveOrder?nm(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0,[]).val)},lm.prototype.j2x=function(e,t,n){let r=``,i=``,a=n.join(`.`);for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o))if(e[o]===void 0)this.isAttribute(o)&&(i+=``);else if(e[o]===null)this.isAttribute(o)||o===this.options.cdataPropName?i+=``:o[0]===`?`?i+=this.indentate(t)+`<`+o+`?`+this.tagEndChar:i+=this.indentate(t)+`<`+o+`/`+this.tagEndChar;else if(e[o]instanceof Date)i+=this.buildTextValNode(e[o],o,``,t);else if(typeof e[o]!=`object`){let n=this.isAttribute(o);if(n&&!this.ignoreAttributesFn(n,a))r+=this.buildAttrPairStr(n,``+e[o]);else if(!n)if(o===this.options.textNodeName){let t=this.options.tagValueProcessor(o,``+e[o]);i+=this.replaceEntitiesValue(t)}else i+=this.buildTextValNode(e[o],o,``,t)}else if(Array.isArray(e[o])){let r=e[o].length,a=``,s=``;for(let c=0;c<r;c++){let r=e[o][c];if(r!==void 0)if(r===null)o[0]===`?`?i+=this.indentate(t)+`<`+o+`?`+this.tagEndChar:i+=this.indentate(t)+`<`+o+`/`+this.tagEndChar;else if(typeof r==`object`)if(this.options.oneListGroup){let e=this.j2x(r,t+1,n.concat(o));a+=e.val,this.options.attributesGroupName&&r.hasOwnProperty(this.options.attributesGroupName)&&(s+=e.attrStr)}else a+=this.processTextOrObjNode(r,o,t,n);else if(this.options.oneListGroup){let e=this.options.tagValueProcessor(o,r);e=this.replaceEntitiesValue(e),a+=e}else a+=this.buildTextValNode(r,o,``,t)}this.options.oneListGroup&&(a=this.buildObjectNode(a,o,s,t)),i+=a}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){let t=Object.keys(e[o]),n=t.length;for(let i=0;i<n;i++)r+=this.buildAttrPairStr(t[i],``+e[o][t[i]])}else i+=this.processTextOrObjNode(e[o],o,t,n);return{attrStr:r,val:i}},lm.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,``+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&t===`true`?` `+e:` `+e+`="`+t+`"`},lm.prototype.buildObjectNode=function(e,t,n,r){if(e===``)return t[0]===`?`?this.indentate(r)+`<`+t+n+`?`+this.tagEndChar:this.indentate(r)+`<`+t+n+this.closeTag(t)+this.tagEndChar;{let i=`</`+t+this.tagEndChar,a=``;return t[0]===`?`&&(a=`?`,i=``),!n&&n!==``||e.indexOf(`<`)!==-1?!1!==this.options.commentPropName&&t===this.options.commentPropName&&a.length===0?this.indentate(r)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(r)+`<`+t+n+a+this.tagEndChar+e+this.indentate(r)+i:this.indentate(r)+`<`+t+n+a+`>`+e+i}},lm.prototype.closeTag=function(e){let t=``;return this.options.unpairedTags.indexOf(e)===-1?t=this.options.suppressEmptyNode?`/`:`></${e}`:this.options.suppressUnpairedNode||(t=`/`),t},lm.prototype.buildTextValNode=function(e,t,n,r){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(r)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(r)+`\x3c!--${e}--\x3e`+this.newLine;if(t[0]===`?`)return this.indentate(r)+`<`+t+n+`?`+this.tagEndChar;{let i=this.options.tagValueProcessor(t,e);return i=this.replaceEntitiesValue(i),i===``?this.indentate(r)+`<`+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(r)+`<`+t+n+`>`+i+`</`+t+this.tagEndChar}},lm.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){let n=this.options.entities[t];e=e.replace(n.regex,n.val)}return e};let _m=gm((function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return hm(G(K({url:U(e.remoteURL,H(t)),method:`UNLOCK`,headers:{"Lock-Token":n}},e,r),e),(function(t){if(J(e,t),t.status!==204&&t.status!==200)throw wf(t)}))})),vm=gm((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{refreshToken:r,timeout:i=ym}=n,a={Accept:`text/plain,application/xml`,Timeout:i};return r&&(a.If=r),hm(G(K({url:U(e.remoteURL,H(t)),method:`LOCK`,headers:a,data:pm(e.contactHref)},e,n),e),(function(t){return J(e,t),hm(t.text(),(function(e){let n=(a=e,new bp({removeNSPrefix:!0,parseAttributeValue:!0,parseTagValue:!0}).parse(a)),r=Sp().get(n,`prop.lockdiscovery.activelock.locktoken.href`),i=Sp().get(n,`prop.lockdiscovery.activelock.timeout`);var a;if(!r)throw wf(t,`No lock token received: `);return{token:r,serverTimeout:i}}))}))})),ym=`Infinite, Second-4100000000`;function bm(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}let xm=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.path||`/`;return bm(G(K({url:U(e.remoteURL,n),method:`PROPFIND`,headers:{Accept:`text/plain,application/xml`,Depth:`0`}},e,t),e),(function(n){return J(e,n),bm(n.text(),(function(r){return bm(Ep(r,e.parsing),(function(e){return Tf(n,function(e){try{let[t]=e.multistatus.response,{propstat:{prop:{"quota-used-bytes":n,"quota-available-bytes":r}}}=t;return n!==void 0&&r!==void 0?{used:parseInt(String(n),10),available:kp(r)}:null}catch{}return null}(e),t.details)}))}))}))}));function Sm(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}let Cm=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{details:r=!1}=n;return Sm(G(K({url:U(e.remoteURL,H(t)),method:`SEARCH`,headers:{Accept:`text/plain,application/xml`,"Content-Type":e.headers[`Content-Type`]||`application/xml; charset=utf-8`}},e,n),e),(function(n){return J(e,n),Sm(n.text(),(function(i){return Sm(Ep(i,e.parsing),(function(e){return Tf(n,function(e,t,n){let r={truncated:!1,results:[]};return r.truncated=e.multistatus.response.some((e=>(e.status||e.propstat?.status).split(` `,3)?.[1]===`507`&&e.href.replace(/\/$/,``).endsWith(H(t).replace(/\/$/,``)))),e.multistatus.response.forEach((e=>{if(e.propstat===void 0)return;let t=e.href.split(`/`).map(decodeURIComponent).join(`/`);r.results.push(Dp(e.propstat.prop,t,n))})),r}(e,t,r),r)}))}))}))})),wm=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=K({url:U(e.remoteURL,H(t)),method:`MOVE`,headers:{Destination:U(e.remoteURL,H(n)),Overwrite:!1===r.overwrite?`F`:`T`}},e,r);return o=function(t){J(e,t)},(a=G(i,e))&&a.then||(a=Promise.resolve(a)),o?a.then(o):a;var a,o}));var Tm=V(172);function Em(e){if(Dd(e))return e.byteLength;if(Od(e))return e.length;if(typeof e==`string`)return(0,Tm.d)(e);throw new Ju({info:{code:fd.DataTypeNoLength}},`Cannot calculate data length: Invalid type`)}let Dm=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},{contentLength:i=!0,overwrite:a=!0}=r,o={"Content-Type":`application/octet-stream`};!1===i||(o[`Content-Length`]=typeof i==`number`?`${i}`:`${Em(n)}`),a||(o[`If-None-Match`]=`*`);let s=K({url:U(e.remoteURL,H(t)),method:`PUT`,headers:o,data:n},e,r);return l=function(t){try{J(e,t)}catch(e){let t=e;if(t.status!==412||a)throw t;return!1}return!0},(c=G(s,e))&&c.then||(c=Promise.resolve(c)),l?c.then(l):c;var c,l})),Om=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=K({url:U(e.remoteURL,H(t)),method:`OPTIONS`},e,n);return a=function(t){try{J(e,t)}catch(e){throw e}return{compliance:(t.headers.get(`DAV`)??``).split(`,`).map((e=>e.trim())),server:t.headers.get(`Server`)??``}},(i=G(r,e))&&i.then||(i=Promise.resolve(i)),a?i.then(a):i;var i,a}));function km(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}let Am=Nm((function(e,t,n,r,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(n>r||n<0)throw new Ju({info:{code:fd.InvalidUpdateRange}},`Invalid update range ${n} for partial update`);let o={"Content-Type":`application/octet-stream`,"Content-Length":``+(r-n+1),"Content-Range":`bytes ${n}-${r}/*`};return km(G(K({url:U(e.remoteURL,H(t)),method:`PUT`,headers:o,data:i},e,a),e),(function(t){J(e,t)}))}));function jm(e,t){var n=e();return n&&n.then?n.then(t):t(n)}let Mm=Nm((function(e,t,n,r,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(n>r||n<0)throw new Ju({info:{code:fd.InvalidUpdateRange}},`Invalid update range ${n} for partial update`);let o={"Content-Type":`application/x-sabredav-partialupdate`,"Content-Length":``+(r-n+1),"X-Update-Range":`bytes=${n}-${r}`};return km(G(K({url:U(e.remoteURL,H(t)),method:`PATCH`,headers:o,data:i},e,a),e),(function(t){J(e,t)}))}));function Nm(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}let Pm=Nm((function(e,t,n,r,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};return km(Om(e,t,a),(function(o){let s=!1;return jm((function(){if(o.compliance.includes(`sabredav-partialupdate`))return km(Mm(e,t,n,r,i,a),(function(e){return s=!0,e}))}),(function(c){let l=!1;return s?c:jm((function(){if(o.server.includes(`Apache`)&&o.compliance.includes(`<http://apache.org/dav/propset/fs/1>`))return km(Am(e,t,n,r,i,a),(function(e){return l=!0,e}))}),(function(e){if(l)return e;throw new Ju({info:{code:fd.NotSupported}},`Not supported`)}))}))}))}));function Fm(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{authType:n=null,remoteBasePath:r,contactHref:i=`https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md`,ha1:a,headers:o={},httpAgent:s,httpsAgent:c,password:l,token:u,username:d,withCredentials:f}=t,p=n;p||=d||l?W.Password:W.None;let m={authType:p,remoteBasePath:r,contactHref:i,ha1:a,headers:Object.assign({},o),httpAgent:s,httpsAgent:c,password:l,parsing:{attributeNamePrefix:t.attributeNamePrefix??`@`,attributeParsers:[],tagParsers:[wp]},remotePath:td(e),remoteURL:e,token:u,username:d,withCredentials:f};return pd(m,d,l,u,a),{copyFile:(e,t,n)=>Ef(m,e,t,n),createDirectory:(e,t)=>Bp(m,e,t),createReadStream:(e,t)=>function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=new(Hp()).PassThrough;return Up(e,t,n).then((e=>{e.pipe(r)})).catch((e=>{r.emit(`error`,e)})),r}(m,e,t),createWriteStream:(e,t,n)=>function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Wp,i=new(Hp()).PassThrough,a={};return!1===n.overwrite&&(a[`If-None-Match`]=`*`),G(K({url:U(e.remoteURL,H(t)),method:`PUT`,headers:a,data:i,maxRedirects:0},e,n),e).then((t=>J(e,t))).then((e=>{setTimeout((()=>{r(e)}),0)})).catch((e=>{i.emit(`error`,e)})),i}(m,e,t,n),customRequest:(e,t)=>Gp(m,e,t),deleteFile:(e,t)=>Kp(m,e,t),exists:(e,t)=>qp(m,e,t),getDirectoryContents:(e,t)=>Yp(m,e,t),getFileContents:(e,t)=>em(m,e,t),getFileDownloadLink:e=>function(e,t){let n=U(e.remoteURL,H(t)),r=/^https:/i.test(n)?`https`:`http`;switch(e.authType){case W.None:break;case W.Password:{let t=cd(e.headers.Authorization.replace(/^Basic /i,``).trim());n=n.replace(/^https?:\/\//,`${r}://${t}@`);break}default:throw new Ju({info:{code:fd.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${e.authType}`)}return n}(m,e),getFileUploadLink:e=>function(e,t){let n=`${U(e.remoteURL,H(t))}?Content-Type=application/octet-stream`,r=/^https:/i.test(n)?`https`:`http`;switch(e.authType){case W.None:break;case W.Password:{let t=cd(e.headers.Authorization.replace(/^Basic /i,``).trim());n=n.replace(/^https?:\/\//,`${r}://${t}@`);break}default:throw new Ju({info:{code:fd.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${e.authType}`)}return n}(m,e),getHeaders:()=>Object.assign({},m.headers),getQuota:e=>xm(m,e),lock:(e,t)=>vm(m,e,t),moveFile:(e,t,n)=>wm(m,e,t,n),putFileContents:(e,t,n)=>Dm(m,e,t,n),partialUpdateFileContents:(e,t,n,r,i)=>Pm(m,e,t,n,r,i),getDAVCompliance:e=>Om(m,e),search:(e,t)=>Cm(m,e,t),setHeaders:e=>{m.headers=Object.assign({},e)},stat:(e,t)=>jp(m,e,t),unlock:(e,t,n)=>_m(m,e,t,n),registerAttributeParser:e=>{m.parsing.attributeParsers.push(e)},registerTagParser:e=>{m.parsing.tagParsers.push(e)}}}let $=[];for(let e=0;e<256;++e)$.push((e+256).toString(16).slice(1));function Im(e,t=0){return($[e[t+0]]+$[e[t+1]]+$[e[t+2]]+$[e[t+3]]+`-`+$[e[t+4]]+$[e[t+5]]+`-`+$[e[t+6]]+$[e[t+7]]+`-`+$[e[t+8]]+$[e[t+9]]+`-`+$[e[t+10]]+$[e[t+11]]+$[e[t+12]]+$[e[t+13]]+$[e[t+14]]+$[e[t+15]]).toLowerCase()}let Lm=new Uint8Array(16);function Rm(){return crypto.getRandomValues(Lm)}function zm(e,t,n){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():Bm(e,t,n)}function Bm(e,t,n){e||={};let r=e.random??e.rng?.()??Rm();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Im(r)}let Vm=(e,t)=>Object.fromEntries(Object.entries(e).map(([e,n])=>t.includes(e)?[e,n||``]:[cr.DavNamespace.includes(e)?`d:${e}`:`oc:${e}`,n||``])),Hm=(e=[],{pattern:t,filterRules:n,limit:r=0,extraProps:i=[]})=>{let a=`d:propfind`;t&&(a=`oc:search-files`),n&&(a=`oc:filter-files`);let o=Vm(e.reduce((e,t)=>Object.assign(e,{[t]:null}),{}),i),s={[a]:{"d:prop":o,"@@xmlns:d":`DAV:`,"@@xmlns:oc":`http://owncloud.org/ns`,...t&&{"oc:search":{"oc:pattern":t,"oc:limit":r}},...n&&{"oc:filter-rules":Vm(n,[])}}};return new Cu({format:!0,ignoreAttributes:!1,attributeNamePrefix:`@@`,suppressEmptyNode:!0}).build(s)},Um=e=>{let t={"d:propertyupdate":{"d:set":{"d:prop":Vm(e,[])},"@@xmlns:d":`DAV:`,"@@xmlns:oc":`http://owncloud.org/ns`}};return new Cu({format:!0,ignoreAttributes:!1,attributeNamePrefix:`@@`,suppressEmptyNode:!0}).build(t)},Wm=e=>{let t={},n=e.get(`tus-version`);return n?(t.version=n.split(`,`),e.get(`tus-extension`)&&(t.extension=e.get(`tus-extension`).split(`,`)),e.get(`tus-resumable`)&&(t.resumable=e.get(`tus-resumable`)),e.get(`tus-max-size`)&&(t.maxSize=parseInt(e.get(`tus-max-size`),10)),t):null},Gm=async e=>{let t=e=>{let t=decodeURIComponent(e);return e?.startsWith(`/remote.php/dav/`)?N(t.replace(`/remote.php/dav/`,``),{leadingSlash:!0,trailingSlash:!1}):t};return(await Ep(e)).multistatus.response.map(({href:e,propstat:n})=>{let r={...Dp(n.prop,t(e),!0),processing:n.status===`HTTP/1.1 425 TOO EARLY`};return r.props.name&&(r.props.name=r.props.name.toString()),r})},Km=e=>{let t=new eu,n={message:`Unknown error`,errorCode:void 0};try{let r=t.parse(e);if(!r[`d:error`])return n;if(r[`d:error`][`s:message`]){let e=r[`d:error`][`s:message`];typeof e==`string`&&(n.message=e)}if(r[`d:error`][`s:errorcode`]){let e=r[`d:error`][`s:errorcode`];typeof e==`string`&&(n.errorCode=e)}}catch{return n}return n};var qm=class{client;davPath;headers;extraProps;constructor({baseUrl:e,headers:t}){this.davPath=N(e,`remote.php/dav`),this.client=Fm(this.davPath,{}),this.headers=t,this.extraProps=[]}mkcol(e,t={}){return this.request(e,{method:rr.mkcol,...t})}async propfind(e,{depth:t=1,properties:n=[],headers:r={},...i}={}){let a={...r,Depth:t.toString()},{body:o,result:s}=await this.request(e,{method:rr.propfind,data:Hm(n,{extraProps:this.extraProps}),headers:a,...i});return o?.length&&(o[0].tusSupport=Wm(s.headers)),o}async report(e,{pattern:t=``,filterRules:n=null,limit:r=30,properties:i,...a}={}){let{body:o,result:s}=await this.request(e,{method:rr.report,data:Hm(i,{pattern:t,filterRules:n,limit:r,extraProps:this.extraProps}),...a});return{results:o,range:s.headers.get(`content-range`)}}copy(e,t,{overwrite:n=!1,headers:r={},...i}={}){let a=N(this.davPath,Kn(t));return this.request(e,{method:rr.copy,headers:{...r,Destination:a,overwrite:n?`T`:`F`},...i})}move(e,t,{overwrite:n=!1,headers:r={},...i}={}){let a=N(this.davPath,Kn(t));return this.request(e,{method:rr.move,headers:{...r,Destination:a,overwrite:n?`T`:`F`},...i})}put(e,t,{headers:n={},onUploadProgress:r,previousEntityTag:i,overwrite:a,...o}={}){let s={...n};return i?s[`If-Match`]=i:a||(s[`If-None-Match`]=`*`),this.request(e,{method:rr.put,data:t,headers:s,onUploadProgress:r,...o})}delete(e,t={}){return this.request(e,{method:rr.delete,...t})}propPatch(e,t,n={}){let r=Um(t);return this.request(e,{method:rr.proppatch,data:r,...n})}getFileUrl(e){return N(this.davPath,Kn(e))}buildHeaders(e={}){return{"Content-Type":`application/xml; charset=utf-8`,"X-Requested-With":`XMLHttpRequest`,"X-Request-ID":zm(),...this.headers&&{...this.headers()},...e}}async request(e,t){let n=N(this.davPath,Kn(e),{leadingSlash:!0}),r={...t,url:n,headers:this.buildHeaders(t.headers||{})};try{let e=await this.client.customRequest(``,r),t;return e.status===207&&(t=await Gm(await e.text())),{body:t,status:e.status,result:e}}catch(e){let{response:t}=e,n=Km(await t.text());throw new Qn(n.message,n.errorCode,t,t.status)}}};let Jm=(e,t)=>({async listFileVersions(t,n={}){let[r,...i]=await e.propfind(N(`meta`,t,`v`,{leadingSlash:!0}),n);return i.map(t=>ts(t,e.extraProps))}}),Ym=(e,t)=>({setFavorite(t,{path:n},r,i={}){let a={[F.IsFavorite]:r?`true`:`false`};return e.propPatch(N(t.webDavPath,n),a,i)}}),Xm=(e,t)=>{let n=M.create();t&&n.interceptors.request.use(e=>(Object.assign(e.headers,t()),e));let r={axiosClient:n,baseUrl:e,headers:t},i=new qm({baseUrl:e,headers:t}),a=e=>{i.extraProps.push(e)},o=Vu(i,r),{getPathForFileId:s}=o,c=Nu(i,o,r),{listFiles:l}=c,u=Au(c,r),{getFileInfo:d}=u,{createFolder:f}=Ou(i,u,r),p=ku(i,r),{getFileContents:m}=p,{putFileContents:h}=Fu(i,u,r),{getFileUrl:g,revokeUrl:_}=ju(i,p,u,r),{getPublicFileUrl:v}=Mu(i,r),{copyFiles:y}=Du(i,r),{moveFiles:b}=Pu(i,r),{deleteFile:x}=Iu(i,r),{restoreFile:S}=Lu(i,r),{listFileVersions:C}=Jm(i,r),{restoreFileVersion:w}=Ru(i,r),{clearTrashBin:ee}=zu(i,r),{search:te}=Bu(i,r),{setFavorite:T}=Ym(i,r);return{copyFiles:y,createFolder:f,deleteFile:x,restoreFile:S,restoreFileVersion:w,getFileContents:m,getFileInfo:d,getFileUrl:g,getPublicFileUrl:v,getPathForFileId:s,listFiles:l,listFileVersions:C,moveFiles:b,putFileContents:h,revokeUrl:_,clearTrashBin:ee,search:te,setFavorite:T,registerExtraProp:a}},Zm;self.onmessage=async e=>{let{topic:t,data:n}=JSON.parse(e.data);if(t===`tokenUpdate`&&Zm){Zm.Authorization?.toString().startsWith(`Bearer`)&&(Zm.Authorization=n.accessToken);return}let{baseUrl:r,headers:i,space:a,resources:o,concurrentRequests:s}=n;Zm=i;let c=Xm(r,()=>Zm),l=[],u=[],d=new g({concurrency:s}),f=e=>t===`fileListDelete`?c.deleteFile(a,{path:e.path}):c.clearTrashBin(a,{id:e.id}),p=o.map(e=>d.add(async()=>{try{let{status:t}=await f(e);if(t===204){l.push(e);return}if(t===423){let{status:t}=await f(e);if(t===204){l.push(e);return}}}catch(t){console.error(t),u.push({resource:e,message:t.message,statusCode:t.statusCode,xReqId:t.response.headers?.get(`x-request-id`)})}}));await Promise.allSettled(p),postMessage(JSON.stringify({successful:l,failed:u}))}})();
|