f7cloud_client/apps/text/js/dav-Rt1kTtvI-PDCKXEjH.chunk.mjs
root 8b6a0139db f7cloud_client
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-17 22:59:26 +00:00

79 lines
113 KiB
JavaScript

import{p as Et,g as pn,a as Kt,b as fn,o as dn}from"./index-CYtgifWR.chunk.mjs";import{i as Jt,g as gn}from"./NcNoteCard-CwNXZ4vV-dRcgmGN6.chunk.mjs";import{b as mn}from"./index-DxwFe63_.chunk.mjs";import{g as yt}from"./vue.runtime.esm-fahCO3eG.chunk.mjs";function it(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ge(e,t,n){vn(e,t),t.set(e,n)}function vn(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function W(e,t){var n=Me(e,t,"get");return yn(e,n)}function yn(e,t){return t.get?t.get.call(e):t.value}function me(e,t,n){var r=Me(e,t,"set");return wn(e,r,n),n}function Me(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function wn(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}var bn=typeof Symbol<"u"?Symbol.toStringTag:"@@toStringTag",q=new WeakMap,ht=new WeakMap;class It{constructor(t){var{executor:n=()=>{},internals:r=Qt(),promise:s=new Promise((i,c)=>n(i,c,u=>{r.onCancelList.push(u)}))}=t;ge(this,q,{writable:!0,value:void 0}),ge(this,ht,{writable:!0,value:void 0}),it(this,bn,"CancelablePromise"),this.cancel=this.cancel.bind(this),me(this,q,r),me(this,ht,s||new Promise((i,c)=>n(i,c,u=>{r.onCancelList.push(u)})))}then(t,n){return Nt(W(this,ht).then(wt(t,W(this,q)),wt(n,W(this,q))),W(this,q))}catch(t){return Nt(W(this,ht).catch(wt(t,W(this,q))),W(this,q))}finally(t,n){return n&&W(this,q).onCancelList.push(t),Nt(W(this,ht).finally(wt(()=>{if(t)return n&&(W(this,q).onCancelList=W(this,q).onCancelList.filter(r=>r!==t)),t()},W(this,q))),W(this,q))}cancel(){W(this,q).isCanceled=!0;var t=W(this,q).onCancelList;W(this,q).onCancelList=[];for(var n of t)if(typeof n=="function")try{n()}catch(r){console.error(r)}}isCanceled(){return W(this,q).isCanceled===!0}}class nt extends It{constructor(t){super({executor:t})}}it(nt,"all",function(e){return bt(e,Promise.all(e))}),it(nt,"allSettled",function(e){return bt(e,Promise.allSettled(e))}),it(nt,"any",function(e){return bt(e,Promise.any(e))}),it(nt,"race",function(e){return bt(e,Promise.race(e))}),it(nt,"resolve",function(e){return ve(Promise.resolve(e))}),it(nt,"reject",function(e){return ve(Promise.reject(e))}),it(nt,"isCancelable",Zt);function ve(e){return Nt(e,Qt())}function Zt(e){return e instanceof nt||e instanceof It}function wt(e,t){if(e)return n=>{if(!t.isCanceled){var r=e(n);return Zt(r)&&t.onCancelList.push(r.cancel),r}return n}}function Nt(e,t){return new It({internals:t,promise:e})}function bt(e,t){var n=Qt();return n.onCancelList.push(()=>{for(var r of e)Zt(r)&&r.cancel()}),new It({internals:n,promise:t})}function Qt(){return{isCanceled:!1,onCancelList:[]}}var Lt={},xn={2:e=>{function t(s,i,c){s instanceof RegExp&&(s=n(s,c)),i instanceof RegExp&&(i=n(i,c));var u=r(s,i,c);return u&&{start:u[0],end:u[1],pre:c.slice(0,u[0]),body:c.slice(u[0]+s.length,u[1]),post:c.slice(u[1]+i.length)}}function n(s,i){var c=i.match(s);return c?c[0]:null}function r(s,i,c){var u,g,l,o,h,a=c.indexOf(s),d=c.indexOf(i,a+1),f=a;if(a>=0&&d>0){for(u=[],l=c.length;f>=0&&!h;)f==a?(u.push(f),a=c.indexOf(s,f+1)):u.length==1?h=[u.pop(),d]:((g=u.pop())<l&&(l=g,o=d),d=c.indexOf(i,f+1)),f=a<d&&a>=0?a:d;u.length&&(h=[l,o])}return h}e.exports=t,t.range=r},101:function(e,t,n){var r;e=n.nmd(e),(function(s){var i=(e&&e.exports,typeof yt=="object"&&yt);i.global!==i&&i.window;var c=function(h){this.message=h};(c.prototype=new Error).name="InvalidCharacterError";var u=function(h){throw new c(h)},g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=/[\t\n\f\r ]/g,o={encode:function(h){h=String(h),/[^\0-\xFF]/.test(h)&&u("The string to be encoded contains characters outside of the Latin1 range.");for(var a,d,f,m,v=h.length%3,A="",p=-1,y=h.length-v;++p<y;)a=h.charCodeAt(p)<<16,d=h.charCodeAt(++p)<<8,f=h.charCodeAt(++p),A+=g.charAt((m=a+d+f)>>18&63)+g.charAt(m>>12&63)+g.charAt(m>>6&63)+g.charAt(63&m);return v==2?(a=h.charCodeAt(p)<<8,d=h.charCodeAt(++p),A+=g.charAt((m=a+d)>>10)+g.charAt(m>>4&63)+g.charAt(m<<2&63)+"="):v==1&&(m=h.charCodeAt(p),A+=g.charAt(m>>2)+g.charAt(m<<4&63)+"=="),A},decode:function(h){var a=(h=String(h).replace(l,"")).length;a%4==0&&(a=(h=h.replace(/==?$/,"")).length),(a%4==1||/[^+a-zA-Z0-9/]/.test(h))&&u("Invalid character: the string to be decoded is not correctly encoded.");for(var d,f,m=0,v="",A=-1;++A<a;)f=g.indexOf(h.charAt(A)),d=m%4?64*d+f:f,m++%4&&(v+=String.fromCharCode(255&d>>(-2*m&6)));return v},version:"1.0.0"};(r=function(){return o}.call(t,n,t,e))===void 0||(e.exports=r)})()},172:(e,t)=>{t.d=function(n){if(!n)return 0;for(var r=(n=n.toString()).length,s=n.length;s--;){var i=n.charCodeAt(s);56320<=i&&i<=57343&&s--,127<i&&i<=2047?r++:2047<i&&i<=65535&&(r+=2)}return r}},526:e=>{var t={utf8:{stringToBytes:function(n){return t.bin.stringToBytes(unescape(encodeURIComponent(n)))},bytesToString:function(n){return decodeURIComponent(escape(t.bin.bytesToString(n)))}},bin:{stringToBytes:function(n){for(var r=[],s=0;s<n.length;s++)r.push(255&n.charCodeAt(s));return r},bytesToString:function(n){for(var r=[],s=0;s<n.length;s++)r.push(String.fromCharCode(n[s]));return r.join("")}}};e.exports=t},298:e=>{var t,n;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(r,s){return r<<s|r>>>32-s},rotr:function(r,s){return r<<32-s|r>>>s},endian:function(r){if(r.constructor==Number)return 16711935&n.rotl(r,8)|4278255360&n.rotl(r,24);for(var s=0;s<r.length;s++)r[s]=n.endian(r[s]);return r},randomBytes:function(r){for(var s=[];r>0;r--)s.push(Math.floor(256*Math.random()));return s},bytesToWords:function(r){for(var s=[],i=0,c=0;i<r.length;i++,c+=8)s[c>>>5]|=r[i]<<24-c%32;return s},wordsToBytes:function(r){for(var s=[],i=0;i<32*r.length;i+=8)s.push(r[i>>>5]>>>24-i%32&255);return s},bytesToHex:function(r){for(var s=[],i=0;i<r.length;i++)s.push((r[i]>>>4).toString(16)),s.push((15&r[i]).toString(16));return s.join("")},hexToBytes:function(r){for(var s=[],i=0;i<r.length;i+=2)s.push(parseInt(r.substr(i,2),16));return s},bytesToBase64:function(r){for(var s=[],i=0;i<r.length;i+=3)for(var c=r[i]<<16|r[i+1]<<8|r[i+2],u=0;u<4;u++)8*i+6*u<=8*r.length?s.push(t.charAt(c>>>6*(3-u)&63)):s.push("=");return s.join("")},base64ToBytes:function(r){r=r.replace(/[^A-Z0-9+\/]/gi,"");for(var s=[],i=0,c=0;i<r.length;c=++i%4)c!=0&&s.push((t.indexOf(r.charAt(i-1))&Math.pow(2,-2*c+8)-1)<<2*c|t.indexOf(r.charAt(i))>>>6-2*c);return s}},e.exports=n},635:(e,t,n)=>{const r=n(31),s=n(338),i=n(221);e.exports={XMLParser:s,XMLValidator:r,XMLBuilder:i}},118:e=>{e.exports=function(t){return typeof t=="function"?t:Array.isArray(t)?n=>{for(const r of t)if(typeof r=="string"&&n===r||r instanceof RegExp&&r.test(n))return!0}:()=>!1}},705:(e,t)=>{const n=":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",r="["+n+"]["+n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",s=new RegExp("^"+r+"$");t.isExist=function(i){return i!==void 0},t.isEmptyObject=function(i){return Object.keys(i).length===0},t.merge=function(i,c,u){if(c){const g=Object.keys(c),l=g.length;for(let o=0;o<l;o++)i[g[o]]=u==="strict"?[c[g[o]]]:c[g[o]]}},t.getValue=function(i){return t.isExist(i)?i:""},t.isName=function(i){return s.exec(i)!=null},t.getAllMatches=function(i,c){const u=[];let g=c.exec(i);for(;g;){const l=[];l.startIndex=c.lastIndex-g[0].length;const o=g.length;for(let h=0;h<o;h++)l.push(g[h]);u.push(l),g=c.exec(i)}return u},t.nameRegexp=r},31:(e,t,n)=>{const r=n(705),s={allowBooleanAttributes:!1,unpairedTags:[]};function i(p){return p===" "||p===" "||p===`
`||p==="\r"}function c(p,y){const x=y;for(;y<p.length;y++)if(!(p[y]!="?"&&p[y]!=" ")){const E=p.substr(x,y-x);if(y>5&&E==="xml")return f("InvalidXml","XML declaration allowed only at the start of the document.",v(p,y));if(p[y]=="?"&&p[y+1]==">"){y++;break}}return y}function u(p,y){if(p.length>y+5&&p[y+1]==="-"&&p[y+2]==="-"){for(y+=3;y<p.length;y++)if(p[y]==="-"&&p[y+1]==="-"&&p[y+2]===">"){y+=2;break}}else if(p.length>y+8&&p[y+1]==="D"&&p[y+2]==="O"&&p[y+3]==="C"&&p[y+4]==="T"&&p[y+5]==="Y"&&p[y+6]==="P"&&p[y+7]==="E"){let x=1;for(y+=8;y<p.length;y++)if(p[y]==="<")x++;else if(p[y]===">"&&(x--,x===0))break}else if(p.length>y+9&&p[y+1]==="["&&p[y+2]==="C"&&p[y+3]==="D"&&p[y+4]==="A"&&p[y+5]==="T"&&p[y+6]==="A"&&p[y+7]==="["){for(y+=8;y<p.length;y++)if(p[y]==="]"&&p[y+1]==="]"&&p[y+2]===">"){y+=2;break}}return y}t.validate=function(p,y){y=Object.assign({},s,y);const x=[];let E=!1,w=!1;p[0]==="\uFEFF"&&(p=p.substr(1));for(let b=0;b<p.length;b++)if(p[b]==="<"&&p[b+1]==="?"){if(b+=2,b=c(p,b),b.err)return b}else{if(p[b]!=="<"){if(i(p[b]))continue;return f("InvalidChar","char '"+p[b]+"' is not expected.",v(p,b))}{let O=b;if(b++,p[b]==="!"){b=u(p,b);continue}{let T=!1;p[b]==="/"&&(T=!0,b++);let j="";for(;b<p.length&&p[b]!==">"&&p[b]!==" "&&p[b]!==" "&&p[b]!==`
`&&p[b]!=="\r";b++)j+=p[b];if(j=j.trim(),j[j.length-1]==="/"&&(j=j.substring(0,j.length-1),b--),P=j,!r.isName(P)){let _;return _=j.trim().length===0?"Invalid space after '<'.":"Tag '"+j+"' is an invalid name.",f("InvalidTag",_,v(p,b))}const S=o(p,b);if(S===!1)return f("InvalidAttr","Attributes for '"+j+"' have open quote.",v(p,b));let N=S.value;if(b=S.index,N[N.length-1]==="/"){const _=b-N.length;N=N.substring(0,N.length-1);const C=a(N,y);if(C!==!0)return f(C.err.code,C.err.msg,v(p,_+C.err.line));E=!0}else if(T){if(!S.tagClosed)return f("InvalidTag","Closing tag '"+j+"' doesn't have proper closing.",v(p,b));if(N.trim().length>0)return f("InvalidTag","Closing tag '"+j+"' can't have attributes or invalid starting.",v(p,O));if(x.length===0)return f("InvalidTag","Closing tag '"+j+"' has not been opened.",v(p,O));{const _=x.pop();if(j!==_.tagName){let C=v(p,_.tagStartPos);return f("InvalidTag","Expected closing tag '"+_.tagName+"' (opened in line "+C.line+", col "+C.col+") instead of closing tag '"+j+"'.",v(p,O))}x.length==0&&(w=!0)}}else{const _=a(N,y);if(_!==!0)return f(_.err.code,_.err.msg,v(p,b-N.length+_.err.line));if(w===!0)return f("InvalidXml","Multiple possible root nodes found.",v(p,b));y.unpairedTags.indexOf(j)!==-1||x.push({tagName:j,tagStartPos:O}),E=!0}for(b++;b<p.length;b++)if(p[b]==="<"){if(p[b+1]==="!"){b++,b=u(p,b);continue}if(p[b+1]!=="?")break;if(b=c(p,++b),b.err)return b}else if(p[b]==="&"){const _=d(p,b);if(_==-1)return f("InvalidChar","char '&' is not expected.",v(p,b));b=_}else if(w===!0&&!i(p[b]))return f("InvalidXml","Extra text at the end",v(p,b));p[b]==="<"&&b--}}}var P;return E?x.length==1?f("InvalidTag","Unclosed tag '"+x[0].tagName+"'.",v(p,x[0].tagStartPos)):!(x.length>0)||f("InvalidXml","Invalid '"+JSON.stringify(x.map(b=>b.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):f("InvalidXml","Start tag expected.",1)};const g='"',l="'";function o(p,y){let x="",E="",w=!1;for(;y<p.length;y++){if(p[y]===g||p[y]===l)E===""?E=p[y]:E!==p[y]||(E="");else if(p[y]===">"&&E===""){w=!0;break}x+=p[y]}return E===""&&{value:x,index:y,tagClosed:w}}const h=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function a(p,y){const x=r.getAllMatches(p,h),E={};for(let w=0;w<x.length;w++){if(x[w][1].length===0)return f("InvalidAttr","Attribute '"+x[w][2]+"' has no space in starting.",A(x[w]));if(x[w][3]!==void 0&&x[w][4]===void 0)return f("InvalidAttr","Attribute '"+x[w][2]+"' is without value.",A(x[w]));if(x[w][3]===void 0&&!y.allowBooleanAttributes)return f("InvalidAttr","boolean attribute '"+x[w][2]+"' is not allowed.",A(x[w]));const P=x[w][2];if(!m(P))return f("InvalidAttr","Attribute '"+P+"' is an invalid name.",A(x[w]));if(E.hasOwnProperty(P))return f("InvalidAttr","Attribute '"+P+"' is repeated.",A(x[w]));E[P]=1}return!0}function d(p,y){if(p[++y]===";")return-1;if(p[y]==="#")return(function(E,w){let P=/\d/;for(E[w]==="x"&&(w++,P=/[\da-fA-F]/);w<E.length;w++){if(E[w]===";")return w;if(!E[w].match(P))break}return-1})(p,++y);let x=0;for(;y<p.length;y++,x++)if(!(p[y].match(/\w/)&&x<20)){if(p[y]===";")break;return-1}return y}function f(p,y,x){return{err:{code:p,msg:y,line:x.line||x,col:x.col}}}function m(p){return r.isName(p)}function v(p,y){const x=p.substring(0,y).split(/\r?\n/);return{line:x.length,col:x[x.length-1].length+1}}function A(p){return p.startIndex+p[1].length}},221:(e,t,n)=>{const r=n(87),s=n(118),i={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(o,h){return h},attributeValueProcessor:function(o,h){return h},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function c(o){this.options=Object.assign({},i,o),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=s(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=l),this.processTextOrObjNode=u,this.options.format?(this.indentate=g,this.tagEndChar=`>
`,this.newLine=`
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function u(o,h,a,d){const f=this.j2x(o,a+1,d.concat(h));return o[this.options.textNodeName]!==void 0&&Object.keys(o).length===1?this.buildTextValNode(o[this.options.textNodeName],h,f.attrStr,a):this.buildObjectNode(f.val,h,f.attrStr,a)}function g(o){return this.options.indentBy.repeat(o)}function l(o){return!(!o.startsWith(this.options.attributeNamePrefix)||o===this.options.textNodeName)&&o.substr(this.attrPrefixLen)}c.prototype.build=function(o){return this.options.preserveOrder?r(o,this.options):(Array.isArray(o)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(o={[this.options.arrayNodeName]:o}),this.j2x(o,0,[]).val)},c.prototype.j2x=function(o,h,a){let d="",f="";const m=a.join(".");for(let v in o)if(Object.prototype.hasOwnProperty.call(o,v))if(o[v]===void 0)this.isAttribute(v)&&(f+="");else if(o[v]===null)this.isAttribute(v)?f+="":v[0]==="?"?f+=this.indentate(h)+"<"+v+"?"+this.tagEndChar:f+=this.indentate(h)+"<"+v+"/"+this.tagEndChar;else if(o[v]instanceof Date)f+=this.buildTextValNode(o[v],v,"",h);else if(typeof o[v]!="object"){const A=this.isAttribute(v);if(A&&!this.ignoreAttributesFn(A,m))d+=this.buildAttrPairStr(A,""+o[v]);else if(!A)if(v===this.options.textNodeName){let p=this.options.tagValueProcessor(v,""+o[v]);f+=this.replaceEntitiesValue(p)}else f+=this.buildTextValNode(o[v],v,"",h)}else if(Array.isArray(o[v])){const A=o[v].length;let p="",y="";for(let x=0;x<A;x++){const E=o[v][x];if(E!==void 0)if(E===null)v[0]==="?"?f+=this.indentate(h)+"<"+v+"?"+this.tagEndChar:f+=this.indentate(h)+"<"+v+"/"+this.tagEndChar;else if(typeof E=="object")if(this.options.oneListGroup){const w=this.j2x(E,h+1,a.concat(v));p+=w.val,this.options.attributesGroupName&&E.hasOwnProperty(this.options.attributesGroupName)&&(y+=w.attrStr)}else p+=this.processTextOrObjNode(E,v,h,a);else if(this.options.oneListGroup){let w=this.options.tagValueProcessor(v,E);w=this.replaceEntitiesValue(w),p+=w}else p+=this.buildTextValNode(E,v,"",h)}this.options.oneListGroup&&(p=this.buildObjectNode(p,v,y,h)),f+=p}else if(this.options.attributesGroupName&&v===this.options.attributesGroupName){const A=Object.keys(o[v]),p=A.length;for(let y=0;y<p;y++)d+=this.buildAttrPairStr(A[y],""+o[v][A[y]])}else f+=this.processTextOrObjNode(o[v],v,h,a);return{attrStr:d,val:f}},c.prototype.buildAttrPairStr=function(o,h){return h=this.options.attributeValueProcessor(o,""+h),h=this.replaceEntitiesValue(h),this.options.suppressBooleanAttributes&&h==="true"?" "+o:" "+o+'="'+h+'"'},c.prototype.buildObjectNode=function(o,h,a,d){if(o==="")return h[0]==="?"?this.indentate(d)+"<"+h+a+"?"+this.tagEndChar:this.indentate(d)+"<"+h+a+this.closeTag(h)+this.tagEndChar;{let f="</"+h+this.tagEndChar,m="";return h[0]==="?"&&(m="?",f=""),!a&&a!==""||o.indexOf("<")!==-1?this.options.commentPropName!==!1&&h===this.options.commentPropName&&m.length===0?this.indentate(d)+`<!--${o}-->`+this.newLine:this.indentate(d)+"<"+h+a+m+this.tagEndChar+o+this.indentate(d)+f:this.indentate(d)+"<"+h+a+m+">"+o+f}},c.prototype.closeTag=function(o){let h="";return this.options.unpairedTags.indexOf(o)!==-1?this.options.suppressUnpairedNode||(h="/"):h=this.options.suppressEmptyNode?"/":`></${o}`,h},c.prototype.buildTextValNode=function(o,h,a,d){if(this.options.cdataPropName!==!1&&h===this.options.cdataPropName)return this.indentate(d)+`<![CDATA[${o}]]>`+this.newLine;if(this.options.commentPropName!==!1&&h===this.options.commentPropName)return this.indentate(d)+`<!--${o}-->`+this.newLine;if(h[0]==="?")return this.indentate(d)+"<"+h+a+"?"+this.tagEndChar;{let f=this.options.tagValueProcessor(h,o);return f=this.replaceEntitiesValue(f),f===""?this.indentate(d)+"<"+h+a+this.closeTag(h)+this.tagEndChar:this.indentate(d)+"<"+h+a+">"+f+"</"+h+this.tagEndChar}},c.prototype.replaceEntitiesValue=function(o){if(o&&o.length>0&&this.options.processEntities)for(let h=0;h<this.options.entities.length;h++){const a=this.options.entities[h];o=o.replace(a.regex,a.val)}return o},e.exports=c},87:e=>{function t(c,u,g,l){let o="",h=!1;for(let a=0;a<c.length;a++){const d=c[a],f=n(d);if(f===void 0)continue;let m="";if(m=g.length===0?f:`${g}.${f}`,f===u.textNodeName){let y=d[f];s(m,u)||(y=u.tagValueProcessor(f,y),y=i(y,u)),h&&(o+=l),o+=y,h=!1;continue}if(f===u.cdataPropName){h&&(o+=l),o+=`<![CDATA[${d[f][0][u.textNodeName]}]]>`,h=!1;continue}if(f===u.commentPropName){o+=l+`<!--${d[f][0][u.textNodeName]}-->`,h=!0;continue}if(f[0]==="?"){const y=r(d[":@"],u),x=f==="?xml"?"":l;let E=d[f][0][u.textNodeName];E=E.length!==0?" "+E:"",o+=x+`<${f}${E}${y}?>`,h=!0;continue}let v=l;v!==""&&(v+=u.indentBy);const A=l+`<${f}${r(d[":@"],u)}`,p=t(d[f],u,m,v);u.unpairedTags.indexOf(f)!==-1?u.suppressUnpairedNode?o+=A+">":o+=A+"/>":p&&p.length!==0||!u.suppressEmptyNode?p&&p.endsWith(">")?o+=A+`>${p}${l}</${f}>`:(o+=A+">",p&&l!==""&&(p.includes("/>")||p.includes("</"))?o+=l+u.indentBy+p+l:o+=p,o+=`</${f}>`):o+=A+"/>",h=!0}return o}function n(c){const u=Object.keys(c);for(let g=0;g<u.length;g++){const l=u[g];if(c.hasOwnProperty(l)&&l!==":@")return l}}function r(c,u){let g="";if(c&&!u.ignoreAttributes)for(let l in c){if(!c.hasOwnProperty(l))continue;let o=u.attributeValueProcessor(l,c[l]);o=i(o,u),o===!0&&u.suppressBooleanAttributes?g+=` ${l.substr(u.attributeNamePrefix.length)}`:g+=` ${l.substr(u.attributeNamePrefix.length)}="${o}"`}return g}function s(c,u){let g=(c=c.substr(0,c.length-u.textNodeName.length-1)).substr(c.lastIndexOf(".")+1);for(let l in u.stopNodes)if(u.stopNodes[l]===c||u.stopNodes[l]==="*."+g)return!0;return!1}function i(c,u){if(c&&c.length>0&&u.processEntities)for(let g=0;g<u.entities.length;g++){const l=u.entities[g];c=c.replace(l.regex,l.val)}return c}e.exports=function(c,u){let g="";return u.format&&u.indentBy.length>0&&(g=`
`),t(c,u,"",g)}},193:(e,t,n)=>{const r=n(705);function s(h,a){let d="";for(;a<h.length&&h[a]!=="'"&&h[a]!=='"';a++)d+=h[a];if(d=d.trim(),d.indexOf(" ")!==-1)throw new Error("External entites are not supported");const f=h[a++];let m="";for(;a<h.length&&h[a]!==f;a++)m+=h[a];return[d,m,a]}function i(h,a){return h[a+1]==="!"&&h[a+2]==="-"&&h[a+3]==="-"}function c(h,a){return h[a+1]==="!"&&h[a+2]==="E"&&h[a+3]==="N"&&h[a+4]==="T"&&h[a+5]==="I"&&h[a+6]==="T"&&h[a+7]==="Y"}function u(h,a){return h[a+1]==="!"&&h[a+2]==="E"&&h[a+3]==="L"&&h[a+4]==="E"&&h[a+5]==="M"&&h[a+6]==="E"&&h[a+7]==="N"&&h[a+8]==="T"}function g(h,a){return h[a+1]==="!"&&h[a+2]==="A"&&h[a+3]==="T"&&h[a+4]==="T"&&h[a+5]==="L"&&h[a+6]==="I"&&h[a+7]==="S"&&h[a+8]==="T"}function l(h,a){return h[a+1]==="!"&&h[a+2]==="N"&&h[a+3]==="O"&&h[a+4]==="T"&&h[a+5]==="A"&&h[a+6]==="T"&&h[a+7]==="I"&&h[a+8]==="O"&&h[a+9]==="N"}function o(h){if(r.isName(h))return h;throw new Error(`Invalid entity name ${h}`)}e.exports=function(h,a){const d={};if(h[a+3]!=="O"||h[a+4]!=="C"||h[a+5]!=="T"||h[a+6]!=="Y"||h[a+7]!=="P"||h[a+8]!=="E")throw new Error("Invalid Tag instead of DOCTYPE");{a+=9;let f=1,m=!1,v=!1,A="";for(;a<h.length;a++)if(h[a]!=="<"||v)if(h[a]===">"){if(v?h[a-1]==="-"&&h[a-2]==="-"&&(v=!1,f--):f--,f===0)break}else h[a]==="["?m=!0:A+=h[a];else{if(m&&c(h,a)){let p,y;a+=7,[p,y,a]=s(h,a+1),y.indexOf("&")===-1&&(d[o(p)]={regx:RegExp(`&${p};`,"g"),val:y})}else if(m&&u(h,a))a+=8;else if(m&&g(h,a))a+=8;else if(m&&l(h,a))a+=9;else{if(!i)throw new Error("Invalid DOCTYPE");v=!0}f++,A=""}if(f!==0)throw new Error("Unclosed DOCTYPE")}return{entities:d,i:a}}},63:(e,t)=>{const n={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(r,s){return s},attributeValueProcessor:function(r,s){return s},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(r,s,i){return r}};t.buildOptions=function(r){return Object.assign({},n,r)},t.defaultOptions=n},299:(e,t,n)=>{const r=n(705),s=n(365),i=n(193),c=n(494),u=n(118);function g(w){const P=Object.keys(w);for(let b=0;b<P.length;b++){const O=P[b];this.lastEntities[O]={regex:new RegExp("&"+O+";","g"),val:w[O]}}}function l(w,P,b,O,T,j,S){if(w!==void 0&&(this.options.trimValues&&!O&&(w=w.trim()),w.length>0)){S||(w=this.replaceEntitiesValue(w));const N=this.options.tagValueProcessor(P,w,b,T,j);return N==null?w:typeof N!=typeof w||N!==w?N:this.options.trimValues||w.trim()===w?E(w,this.options.parseTagValue,this.options.numberParseOptions):w}}function o(w){if(this.options.removeNSPrefix){const P=w.split(":"),b=w.charAt(0)==="/"?"/":"";if(P[0]==="xmlns")return"";P.length===2&&(w=b+P[1])}return w}const h=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function a(w,P,b){if(this.options.ignoreAttributes!==!0&&typeof w=="string"){const O=r.getAllMatches(w,h),T=O.length,j={};for(let S=0;S<T;S++){const N=this.resolveNameSpace(O[S][1]);if(this.ignoreAttributesFn(N,P))continue;let _=O[S][4],C=this.options.attributeNamePrefix+N;if(N.length)if(this.options.transformAttributeName&&(C=this.options.transformAttributeName(C)),C==="__proto__"&&(C="#__proto__"),_!==void 0){this.options.trimValues&&(_=_.trim()),_=this.replaceEntitiesValue(_);const I=this.options.attributeValueProcessor(N,_,P);j[C]=I==null?_:typeof I!=typeof _||I!==_?I:E(_,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(j[C]=!0)}if(!Object.keys(j).length)return;if(this.options.attributesGroupName){const S={};return S[this.options.attributesGroupName]=j,S}return j}}const d=function(w){w=w.replace(/\r\n?/g,`
`);const P=new s("!xml");let b=P,O="",T="";for(let j=0;j<w.length;j++)if(w[j]==="<")if(w[j+1]==="/"){const S=p(w,">",j,"Closing Tag is not closed.");let N=w.substring(j+2,S).trim();if(this.options.removeNSPrefix){const I=N.indexOf(":");I!==-1&&(N=N.substr(I+1))}this.options.transformTagName&&(N=this.options.transformTagName(N)),b&&(O=this.saveTextToParentTag(O,b,T));const _=T.substring(T.lastIndexOf(".")+1);if(N&&this.options.unpairedTags.indexOf(N)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${N}>`);let C=0;_&&this.options.unpairedTags.indexOf(_)!==-1?(C=T.lastIndexOf(".",T.lastIndexOf(".")-1),this.tagsNodeStack.pop()):C=T.lastIndexOf("."),T=T.substring(0,C),b=this.tagsNodeStack.pop(),O="",j=S}else if(w[j+1]==="?"){let S=y(w,j,!1,"?>");if(!S)throw new Error("Pi Tag is not closed.");if(O=this.saveTextToParentTag(O,b,T),!(this.options.ignoreDeclaration&&S.tagName==="?xml"||this.options.ignorePiTags)){const N=new s(S.tagName);N.add(this.options.textNodeName,""),S.tagName!==S.tagExp&&S.attrExpPresent&&(N[":@"]=this.buildAttributesMap(S.tagExp,T,S.tagName)),this.addChild(b,N,T)}j=S.closeIndex+1}else if(w.substr(j+1,3)==="!--"){const S=p(w,"-->",j+4,"Comment is not closed.");if(this.options.commentPropName){const N=w.substring(j+4,S-2);O=this.saveTextToParentTag(O,b,T),b.add(this.options.commentPropName,[{[this.options.textNodeName]:N}])}j=S}else if(w.substr(j+1,2)==="!D"){const S=i(w,j);this.docTypeEntities=S.entities,j=S.i}else if(w.substr(j+1,2)==="!["){const S=p(w,"]]>",j,"CDATA is not closed.")-2,N=w.substring(j+9,S);O=this.saveTextToParentTag(O,b,T);let _=this.parseTextData(N,b.tagname,T,!0,!1,!0,!0);_==null&&(_=""),this.options.cdataPropName?b.add(this.options.cdataPropName,[{[this.options.textNodeName]:N}]):b.add(this.options.textNodeName,_),j=S+2}else{let S=y(w,j,this.options.removeNSPrefix),N=S.tagName;const _=S.rawTagName;let C=S.tagExp,I=S.attrExpPresent,V=S.closeIndex;this.options.transformTagName&&(N=this.options.transformTagName(N)),b&&O&&b.tagname!=="!xml"&&(O=this.saveTextToParentTag(O,b,T,!1));const M=b;if(M&&this.options.unpairedTags.indexOf(M.tagname)!==-1&&(b=this.tagsNodeStack.pop(),T=T.substring(0,T.lastIndexOf("."))),N!==P.tagname&&(T+=T?"."+N:N),this.isItStopNode(this.options.stopNodes,T,N)){let L="";if(C.length>0&&C.lastIndexOf("/")===C.length-1)N[N.length-1]==="/"?(N=N.substr(0,N.length-1),T=T.substr(0,T.length-1),C=N):C=C.substr(0,C.length-1),j=S.closeIndex;else if(this.options.unpairedTags.indexOf(N)!==-1)j=S.closeIndex;else{const D=this.readStopNodeData(w,_,V+1);if(!D)throw new Error(`Unexpected end of ${_}`);j=D.i,L=D.tagContent}const J=new s(N);N!==C&&I&&(J[":@"]=this.buildAttributesMap(C,T,N)),L&&(L=this.parseTextData(L,N,T,!0,I,!0,!0)),T=T.substr(0,T.lastIndexOf(".")),J.add(this.options.textNodeName,L),this.addChild(b,J,T)}else{if(C.length>0&&C.lastIndexOf("/")===C.length-1){N[N.length-1]==="/"?(N=N.substr(0,N.length-1),T=T.substr(0,T.length-1),C=N):C=C.substr(0,C.length-1),this.options.transformTagName&&(N=this.options.transformTagName(N));const L=new s(N);N!==C&&I&&(L[":@"]=this.buildAttributesMap(C,T,N)),this.addChild(b,L,T),T=T.substr(0,T.lastIndexOf("."))}else{const L=new s(N);this.tagsNodeStack.push(b),N!==C&&I&&(L[":@"]=this.buildAttributesMap(C,T,N)),this.addChild(b,L,T),b=L}O="",j=V}}else O+=w[j];return P.child};function f(w,P,b){const O=this.options.updateTag(P.tagname,b,P[":@"]);O===!1||(typeof O=="string"&&(P.tagname=O),w.addChild(P))}const m=function(w){if(this.options.processEntities){for(let P in this.docTypeEntities){const b=this.docTypeEntities[P];w=w.replace(b.regx,b.val)}for(let P in this.lastEntities){const b=this.lastEntities[P];w=w.replace(b.regex,b.val)}if(this.options.htmlEntities)for(let P in this.htmlEntities){const b=this.htmlEntities[P];w=w.replace(b.regex,b.val)}w=w.replace(this.ampEntity.regex,this.ampEntity.val)}return w};function v(w,P,b,O){return w&&(O===void 0&&(O=Object.keys(P.child).length===0),(w=this.parseTextData(w,P.tagname,b,!1,!!P[":@"]&&Object.keys(P[":@"]).length!==0,O))!==void 0&&w!==""&&P.add(this.options.textNodeName,w),w=""),w}function A(w,P,b){const O="*."+b;for(const T in w){const j=w[T];if(O===j||P===j)return!0}return!1}function p(w,P,b,O){const T=w.indexOf(P,b);if(T===-1)throw new Error(O);return T+P.length-1}function y(w,P,b){const O=(function(I,V){let M,L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:">",J="";for(let D=V;D<I.length;D++){let z=I[D];if(M)z===M&&(M="");else if(z==='"'||z==="'")M=z;else if(z===L[0]){if(!L[1])return{data:J,index:D};if(I[D+1]===L[1])return{data:J,index:D}}else z===" "&&(z=" ");J+=z}})(w,P+1,arguments.length>3&&arguments[3]!==void 0?arguments[3]:">");if(!O)return;let T=O.data;const j=O.index,S=T.search(/\s/);let N=T,_=!0;S!==-1&&(N=T.substring(0,S),T=T.substring(S+1).trimStart());const C=N;if(b){const I=N.indexOf(":");I!==-1&&(N=N.substr(I+1),_=N!==O.data.substr(I+1))}return{tagName:N,tagExp:T,closeIndex:j,attrExpPresent:_,rawTagName:C}}function x(w,P,b){const O=b;let T=1;for(;b<w.length;b++)if(w[b]==="<")if(w[b+1]==="/"){const j=p(w,">",b,`${P} is not closed`);if(w.substring(b+2,j).trim()===P&&(T--,T===0))return{tagContent:w.substring(O,b),i:j};b=j}else if(w[b+1]==="?")b=p(w,"?>",b+1,"StopNode is not closed.");else if(w.substr(b+1,3)==="!--")b=p(w,"-->",b+3,"StopNode is not closed.");else if(w.substr(b+1,2)==="![")b=p(w,"]]>",b,"StopNode is not closed.")-2;else{const j=y(w,b,">");j&&((j&&j.tagName)===P&&j.tagExp[j.tagExp.length-1]!=="/"&&T++,b=j.closeIndex)}}function E(w,P,b){if(P&&typeof w=="string"){const O=w.trim();return O==="true"||O!=="false"&&c(w,b)}return r.isExist(w)?w:""}e.exports=class{constructor(w){this.options=w,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:(P,b)=>String.fromCharCode(Number.parseInt(b,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(P,b)=>String.fromCharCode(Number.parseInt(b,16))}},this.addExternalEntities=g,this.parseXml=d,this.parseTextData=l,this.resolveNameSpace=o,this.buildAttributesMap=a,this.isItStopNode=A,this.replaceEntitiesValue=m,this.readStopNodeData=x,this.saveTextToParentTag=v,this.addChild=f,this.ignoreAttributesFn=u(this.options.ignoreAttributes)}}},338:(e,t,n)=>{const{buildOptions:r}=n(63),s=n(299),{prettify:i}=n(728),c=n(31);e.exports=class{constructor(u){this.externalEntities={},this.options=r(u)}parse(u,g){if(typeof u!="string"){if(!u.toString)throw new Error("XML data is accepted in String or Bytes[] form.");u=u.toString()}if(g){g===!0&&(g={});const h=c.validate(u,g);if(h!==!0)throw Error(`${h.err.msg}:${h.err.line}:${h.err.col}`)}const l=new s(this.options);l.addExternalEntities(this.externalEntities);const o=l.parseXml(u);return this.options.preserveOrder||o===void 0?o:i(o,this.options)}addEntity(u,g){if(g.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(u.indexOf("&")!==-1||u.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if(g==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[u]=g}}},728:(e,t)=>{function n(c,u,g){let l;const o={};for(let h=0;h<c.length;h++){const a=c[h],d=r(a);let f="";if(f=g===void 0?d:g+"."+d,d===u.textNodeName)l===void 0?l=a[d]:l+=""+a[d];else{if(d===void 0)continue;if(a[d]){let m=n(a[d],u,f);const v=i(m,u);a[":@"]?s(m,a[":@"],f,u):Object.keys(m).length!==1||m[u.textNodeName]===void 0||u.alwaysCreateTextNode?Object.keys(m).length===0&&(u.alwaysCreateTextNode?m[u.textNodeName]="":m=""):m=m[u.textNodeName],o[d]!==void 0&&o.hasOwnProperty(d)?(Array.isArray(o[d])||(o[d]=[o[d]]),o[d].push(m)):u.isArray(d,f,v)?o[d]=[m]:o[d]=m}}}return typeof l=="string"?l.length>0&&(o[u.textNodeName]=l):l!==void 0&&(o[u.textNodeName]=l),o}function r(c){const u=Object.keys(c);for(let g=0;g<u.length;g++){const l=u[g];if(l!==":@")return l}}function s(c,u,g,l){if(u){const o=Object.keys(u),h=o.length;for(let a=0;a<h;a++){const d=o[a];l.isArray(d,g+"."+d,!0,!0)?c[d]=[u[d]]:c[d]=u[d]}}}function i(c,u){const{textNodeName:g}=u,l=Object.keys(c).length;return l===0||!(l!==1||!c[g]&&typeof c[g]!="boolean"&&c[g]!==0)}t.prettify=function(c,u){return n(c,u)}},365:e=>{e.exports=class{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,n){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:n})}addChild(t){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}}},135:e=>{function t(n){return!!n.constructor&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}e.exports=function(n){return n!=null&&(t(n)||(function(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&t(r.slice(0,0))})(n)||!!n._isBuffer)}},542:(e,t,n)=>{(function(){var r=n(298),s=n(526).utf8,i=n(135),c=n(526).bin,u=function(g,l){g.constructor==String?g=l&&l.encoding==="binary"?c.stringToBytes(g):s.stringToBytes(g):i(g)?g=Array.prototype.slice.call(g,0):Array.isArray(g)||g.constructor===Uint8Array||(g=g.toString());for(var o=r.bytesToWords(g),h=8*g.length,a=1732584193,d=-271733879,f=-1732584194,m=271733878,v=0;v<o.length;v++)o[v]=16711935&(o[v]<<8|o[v]>>>24)|4278255360&(o[v]<<24|o[v]>>>8);o[h>>>5]|=128<<h%32,o[14+(h+64>>>9<<4)]=h;var A=u._ff,p=u._gg,y=u._hh,x=u._ii;for(v=0;v<o.length;v+=16){var E=a,w=d,P=f,b=m;a=A(a,d,f,m,o[v+0],7,-680876936),m=A(m,a,d,f,o[v+1],12,-389564586),f=A(f,m,a,d,o[v+2],17,606105819),d=A(d,f,m,a,o[v+3],22,-1044525330),a=A(a,d,f,m,o[v+4],7,-176418897),m=A(m,a,d,f,o[v+5],12,1200080426),f=A(f,m,a,d,o[v+6],17,-1473231341),d=A(d,f,m,a,o[v+7],22,-45705983),a=A(a,d,f,m,o[v+8],7,1770035416),m=A(m,a,d,f,o[v+9],12,-1958414417),f=A(f,m,a,d,o[v+10],17,-42063),d=A(d,f,m,a,o[v+11],22,-1990404162),a=A(a,d,f,m,o[v+12],7,1804603682),m=A(m,a,d,f,o[v+13],12,-40341101),f=A(f,m,a,d,o[v+14],17,-1502002290),a=p(a,d=A(d,f,m,a,o[v+15],22,1236535329),f,m,o[v+1],5,-165796510),m=p(m,a,d,f,o[v+6],9,-1069501632),f=p(f,m,a,d,o[v+11],14,643717713),d=p(d,f,m,a,o[v+0],20,-373897302),a=p(a,d,f,m,o[v+5],5,-701558691),m=p(m,a,d,f,o[v+10],9,38016083),f=p(f,m,a,d,o[v+15],14,-660478335),d=p(d,f,m,a,o[v+4],20,-405537848),a=p(a,d,f,m,o[v+9],5,568446438),m=p(m,a,d,f,o[v+14],9,-1019803690),f=p(f,m,a,d,o[v+3],14,-187363961),d=p(d,f,m,a,o[v+8],20,1163531501),a=p(a,d,f,m,o[v+13],5,-1444681467),m=p(m,a,d,f,o[v+2],9,-51403784),f=p(f,m,a,d,o[v+7],14,1735328473),a=y(a,d=p(d,f,m,a,o[v+12],20,-1926607734),f,m,o[v+5],4,-378558),m=y(m,a,d,f,o[v+8],11,-2022574463),f=y(f,m,a,d,o[v+11],16,1839030562),d=y(d,f,m,a,o[v+14],23,-35309556),a=y(a,d,f,m,o[v+1],4,-1530992060),m=y(m,a,d,f,o[v+4],11,1272893353),f=y(f,m,a,d,o[v+7],16,-155497632),d=y(d,f,m,a,o[v+10],23,-1094730640),a=y(a,d,f,m,o[v+13],4,681279174),m=y(m,a,d,f,o[v+0],11,-358537222),f=y(f,m,a,d,o[v+3],16,-722521979),d=y(d,f,m,a,o[v+6],23,76029189),a=y(a,d,f,m,o[v+9],4,-640364487),m=y(m,a,d,f,o[v+12],11,-421815835),f=y(f,m,a,d,o[v+15],16,530742520),a=x(a,d=y(d,f,m,a,o[v+2],23,-995338651),f,m,o[v+0],6,-198630844),m=x(m,a,d,f,o[v+7],10,1126891415),f=x(f,m,a,d,o[v+14],15,-1416354905),d=x(d,f,m,a,o[v+5],21,-57434055),a=x(a,d,f,m,o[v+12],6,1700485571),m=x(m,a,d,f,o[v+3],10,-1894986606),f=x(f,m,a,d,o[v+10],15,-1051523),d=x(d,f,m,a,o[v+1],21,-2054922799),a=x(a,d,f,m,o[v+8],6,1873313359),m=x(m,a,d,f,o[v+15],10,-30611744),f=x(f,m,a,d,o[v+6],15,-1560198380),d=x(d,f,m,a,o[v+13],21,1309151649),a=x(a,d,f,m,o[v+4],6,-145523070),m=x(m,a,d,f,o[v+11],10,-1120210379),f=x(f,m,a,d,o[v+2],15,718787259),d=x(d,f,m,a,o[v+9],21,-343485551),a=a+E>>>0,d=d+w>>>0,f=f+P>>>0,m=m+b>>>0}return r.endian([a,d,f,m])};u._ff=function(g,l,o,h,a,d,f){var m=g+(l&o|~l&h)+(a>>>0)+f;return(m<<d|m>>>32-d)+l},u._gg=function(g,l,o,h,a,d,f){var m=g+(l&h|o&~h)+(a>>>0)+f;return(m<<d|m>>>32-d)+l},u._hh=function(g,l,o,h,a,d,f){var m=g+(l^o^h)+(a>>>0)+f;return(m<<d|m>>>32-d)+l},u._ii=function(g,l,o,h,a,d,f){var m=g+(o^(l|~h))+(a>>>0)+f;return(m<<d|m>>>32-d)+l},u._blocksize=16,u._digestsize=16,e.exports=function(g,l){if(g==null)throw new Error("Illegal argument "+g);var o=r.wordsToBytes(u(g,l));return l&&l.asBytes?o:l&&l.asString?c.bytesToString(o):r.bytesToHex(o)}})()},285:(e,t,n)=>{var r=n(2);e.exports=function(A){return A?(A.substr(0,2)==="{}"&&(A="\\{\\}"+A.substr(2)),v((function(p){return p.split("\\\\").join(s).split("\\{").join(i).split("\\}").join(c).split("\\,").join(u).split("\\.").join(g)})(A),!0).map(o)):[]};var s="\0SLASH"+Math.random()+"\0",i="\0OPEN"+Math.random()+"\0",c="\0CLOSE"+Math.random()+"\0",u="\0COMMA"+Math.random()+"\0",g="\0PERIOD"+Math.random()+"\0";function l(A){return parseInt(A,10)==A?parseInt(A,10):A.charCodeAt(0)}function o(A){return A.split(s).join("\\").split(i).join("{").split(c).join("}").split(u).join(",").split(g).join(".")}function h(A){if(!A)return[""];var p=[],y=r("{","}",A);if(!y)return A.split(",");var x=y.pre,E=y.body,w=y.post,P=x.split(",");P[P.length-1]+="{"+E+"}";var b=h(w);return w.length&&(P[P.length-1]+=b.shift(),P.push.apply(P,b)),p.push.apply(p,P),p}function a(A){return"{"+A+"}"}function d(A){return/^-?0\d/.test(A)}function f(A,p){return A<=p}function m(A,p){return A>=p}function v(A,p){var y=[],x=r("{","}",A);if(!x)return[A];var E=x.pre,w=x.post.length?v(x.post,!1):[""];if(/\$$/.test(x.pre))for(var P=0;P<w.length;P++){var b=E+"{"+x.body+"}"+w[P];y.push(b)}else{var O,T,j=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(x.body),S=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(x.body),N=j||S,_=x.body.indexOf(",")>=0;if(!N&&!_)return x.post.match(/,.*\}/)?v(A=x.pre+"{"+x.body+c+x.post):[A];if(N)O=x.body.split(/\.\./);else if((O=h(x.body)).length===1&&(O=v(O[0],!1).map(a)).length===1)return w.map(function(hn){return x.pre+O[0]+hn});if(N){var C=l(O[0]),I=l(O[1]),V=Math.max(O[0].length,O[1].length),M=O.length==3?Math.abs(l(O[2])):1,L=f;I<C&&(M*=-1,L=m);var J=O.some(d);T=[];for(var D=C;L(D,I);D+=M){var z;if(S)(z=String.fromCharCode(D))==="\\"&&(z="");else if(z=String(D),J){var fe=V-z.length;if(fe>0){var de=new Array(fe+1).join("0");z=D<0?"-"+de+z.slice(1):de+z}}T.push(z)}}else{T=[];for(var at=0;at<O.length;at++)T.push.apply(T,v(O[at],!1))}for(at=0;at<T.length;at++)for(P=0;P<w.length;P++)b=E+T[at]+w[P],(!p||N||b)&&y.push(b)}return y}},829:e=>{function t(l){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},t(l)}function n(l){var o=typeof Map=="function"?new Map:void 0;return n=function(h){if(h===null||(a=h,Function.toString.call(a).indexOf("[native code]")===-1))return h;var a;if(typeof h!="function")throw new TypeError("Super expression must either be null or a function");if(o!==void 0){if(o.has(h))return o.get(h);o.set(h,d)}function d(){return r(h,arguments,i(this).constructor)}return d.prototype=Object.create(h.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),s(d,h)},n(l)}function r(l,o,h){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(a,d,f){var m=[null];m.push.apply(m,d);var v=new(Function.bind.apply(a,m));return f&&s(v,f.prototype),v},r.apply(null,arguments)}function s(l,o){return s=Object.setPrototypeOf||function(h,a){return h.__proto__=a,h},s(l,o)}function i(l){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},i(l)}var c=(function(l){function o(h){var a;return(function(d,f){if(!(d instanceof f))throw new TypeError("Cannot call a class as a function")})(this,o),(a=(function(d,f){return!f||t(f)!=="object"&&typeof f!="function"?(function(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m})(d):f})(this,i(o).call(this,h))).name="ObjectPrototypeMutationError",a}return(function(h,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");h.prototype=Object.create(a&&a.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),a&&s(h,a)})(o,l),o})(n(Error));function u(l,o){for(var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},a=o.split("."),d=a.length,f=function(A){var p=a[A];if(!l)return{v:void 0};if(p==="+"){if(Array.isArray(l))return{v:l.map(function(x,E){var w=a.slice(A+1);return w.length>0?u(x,w.join("."),h):h(l,E,a,A)})};var y=a.slice(0,A).join(".");throw new Error("Object at wildcard (".concat(y,") is not an array"))}l=h(l,p,a,A)},m=0;m<d;m++){var v=f(m);if(t(v)==="object")return v.v}return l}function g(l,o){return l.length===o+1}e.exports={set:function(l,o,h){if(t(l)!="object"||l===null||o===void 0)return l;if(typeof o=="number")return l[o]=h,l[o];try{return u(l,o,function(a,d,f,m){if(a===Reflect.getPrototypeOf({}))throw new c("Attempting to mutate Object.prototype");if(!a[d]){var v=Number.isInteger(Number(f[m+1])),A=f[m+1]==="+";a[d]=v||A?[]:{}}return g(f,m)&&(a[d]=h),a[d]})}catch(a){if(a instanceof c)throw a;return l}},get:function(l,o){if(t(l)!="object"||l===null||o===void 0)return l;if(typeof o=="number")return l[o];try{return u(l,o,function(h,a){return h[a]})}catch{return l}},has:function(l,o){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(t(l)!="object"||l===null||o===void 0)return!1;if(typeof o=="number")return o in l;try{var a=!1;return u(l,o,function(d,f,m,v){if(!g(m,v))return d&&d[f];a=h.own?d.hasOwnProperty(f):f in d}),a}catch{return!1}},hasOwn:function(l,o,h){return this.has(l,o,h||{own:!0})},isIn:function(l,o,h){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(t(l)!="object"||l===null||o===void 0)return!1;try{var d=!1,f=!1;return u(l,o,function(m,v,A,p){return d=d||m===h||!!m&&m[v]===h,f=g(A,p)&&t(m)==="object"&&v in m,m&&m[v]}),a.validPath?d&&f:d}catch{return!1}},ObjectPrototypeMutationError:c}},47:(e,t,n)=>{var r=n(410),s=function(l){return typeof l=="string"};function i(l,o){for(var h=[],a=0;a<l.length;a++){var d=l[a];d&&d!=="."&&(d===".."?h.length&&h[h.length-1]!==".."?h.pop():o&&h.push(".."):h.push(d))}return h}var c=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,u={};function g(l){return c.exec(l).slice(1)}u.resolve=function(){for(var l="",o=!1,h=arguments.length-1;h>=-1&&!o;h--){var a=h>=0?arguments[h]:Et.cwd();if(!s(a))throw new TypeError("Arguments to path.resolve must be strings");a&&(l=a+"/"+l,o=a.charAt(0)==="/")}return(o?"/":"")+(l=i(l.split("/"),!o).join("/"))||"."},u.normalize=function(l){var o=u.isAbsolute(l),h=l.substr(-1)==="/";return(l=i(l.split("/"),!o).join("/"))||o||(l="."),l&&h&&(l+="/"),(o?"/":"")+l},u.isAbsolute=function(l){return l.charAt(0)==="/"},u.join=function(){for(var l="",o=0;o<arguments.length;o++){var h=arguments[o];if(!s(h))throw new TypeError("Arguments to path.join must be strings");h&&(l+=l?"/"+h:h)}return u.normalize(l)},u.relative=function(l,o){function h(p){for(var y=0;y<p.length&&p[y]==="";y++);for(var x=p.length-1;x>=0&&p[x]==="";x--);return y>x?[]:p.slice(y,x+1)}l=u.resolve(l).substr(1),o=u.resolve(o).substr(1);for(var a=h(l.split("/")),d=h(o.split("/")),f=Math.min(a.length,d.length),m=f,v=0;v<f;v++)if(a[v]!==d[v]){m=v;break}var A=[];for(v=m;v<a.length;v++)A.push("..");return(A=A.concat(d.slice(m))).join("/")},u._makeLong=function(l){return l},u.dirname=function(l){var o=g(l),h=o[0],a=o[1];return h||a?(a&&(a=a.substr(0,a.length-1)),h+a):"."},u.basename=function(l,o){var h=g(l)[2];return o&&h.substr(-1*o.length)===o&&(h=h.substr(0,h.length-o.length)),h},u.extname=function(l){return g(l)[3]},u.format=function(l){if(!r.isObject(l))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof l);var o=l.root||"";if(!s(o))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof l.root);return(l.dir?l.dir+u.sep:"")+(l.base||"")},u.parse=function(l){if(!s(l))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof l);var o=g(l);if(!o||o.length!==4)throw new TypeError("Invalid path '"+l+"'");return o[1]=o[1]||"",o[2]=o[2]||"",o[3]=o[3]||"",{root:o[0],dir:o[0]+o[1].slice(0,o[1].length-1),base:o[2],ext:o[3],name:o[2].slice(0,o[2].length-o[3].length)}},u.sep="/",u.delimiter=":",e.exports=u},647:(e,t)=>{var n=Object.prototype.hasOwnProperty;function r(i){try{return decodeURIComponent(i.replace(/\+/g," "))}catch{return null}}function s(i){try{return encodeURIComponent(i)}catch{return null}}t.stringify=function(i,c){c=c||"";var u,g,l=[];for(g in typeof c!="string"&&(c="?"),i)if(n.call(i,g)){if((u=i[g])||u!=null&&!isNaN(u)||(u=""),g=s(g),u=s(u),g===null||u===null)continue;l.push(g+"="+u)}return l.length?c+l.join("&"):""},t.parse=function(i){for(var c,u=/([^=?#&]+)=?([^&]*)/g,g={};c=u.exec(i);){var l=r(c[1]),o=r(c[2]);l===null||o===null||l in g||(g[l]=o)}return g}},670:e=>{e.exports=function(t,n){if(n=n.split(":")[0],!(t=+t))return!1;switch(n){case"http":case"ws":return t!==80;case"https":case"wss":return t!==443;case"ftp":return t!==21;case"gopher":return t!==70;case"file":return!1}return t!==0}},494:e=>{const t=/^[-+]?0x[a-fA-F0-9]+$/,n=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const r={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};e.exports=function(s){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(i=Object.assign({},r,i),!s||typeof s!="string")return s;let c=s.trim();if(i.skipLike!==void 0&&i.skipLike.test(c))return s;if(i.hex&&t.test(c))return Number.parseInt(c,16);{const g=n.exec(c);if(g){const l=g[1],o=g[2];let h=((u=g[3])&&u.indexOf(".")!==-1&&((u=u.replace(/0+$/,""))==="."?u="0":u[0]==="."?u="0"+u:u[u.length-1]==="."&&(u=u.substr(0,u.length-1))),u);const a=g[4]||g[6];if(!i.leadingZeros&&o.length>0&&l&&c[2]!=="."||!i.leadingZeros&&o.length>0&&!l&&c[1]!==".")return s;{const d=Number(c),f=""+d;return f.search(/[eE]/)!==-1||a?i.eNotation?d:s:c.indexOf(".")!==-1?f==="0"&&h===""||f===h||l&&f==="-"+h?d:s:o?h===f||l+h===f?d:s:c===f||c===l+f?d:s}}return s}var u}},737:(e,t,n)=>{var r=n(670),s=n(647),i=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,c=/[\n\r\t]/g,u=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,g=/:\d+$/,l=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,o=/^[a-zA-Z]:/;function h(p){return(p||"").toString().replace(i,"")}var a=[["#","hash"],["?","query"],function(p,y){return m(y.protocol)?p.replace(/\\/g,"/"):p},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],d={hash:1,query:1};function f(p){var y,x=(typeof window<"u"?window:typeof yt<"u"?yt:typeof self<"u"?self:{}).location||{},E={},w=typeof(p=p||x);if(p.protocol==="blob:")E=new A(unescape(p.pathname),{});else if(w==="string")for(y in E=new A(p,{}),d)delete E[y];else if(w==="object"){for(y in p)y in d||(E[y]=p[y]);E.slashes===void 0&&(E.slashes=u.test(p.href))}return E}function m(p){return p==="file:"||p==="ftp:"||p==="http:"||p==="https:"||p==="ws:"||p==="wss:"}function v(p,y){p=(p=h(p)).replace(c,""),y=y||{};var x,E=l.exec(p),w=E[1]?E[1].toLowerCase():"",P=!!E[2],b=!!E[3],O=0;return P?b?(x=E[2]+E[3]+E[4],O=E[2].length+E[3].length):(x=E[2]+E[4],O=E[2].length):b?(x=E[3]+E[4],O=E[3].length):x=E[4],w==="file:"?O>=2&&(x=x.slice(2)):m(w)?x=E[4]:w?P&&(x=x.slice(2)):O>=2&&m(y.protocol)&&(x=E[4]),{protocol:w,slashes:P||m(w),slashesCount:O,rest:x}}function A(p,y,x){if(p=(p=h(p)).replace(c,""),!(this instanceof A))return new A(p,y,x);var E,w,P,b,O,T,j=a.slice(),S=typeof y,N=this,_=0;for(S!=="object"&&S!=="string"&&(x=y,y=null),x&&typeof x!="function"&&(x=s.parse),E=!(w=v(p||"",y=f(y))).protocol&&!w.slashes,N.slashes=w.slashes||E&&y.slashes,N.protocol=w.protocol||y.protocol||"",p=w.rest,(w.protocol==="file:"&&(w.slashesCount!==2||o.test(p))||!w.slashes&&(w.protocol||w.slashesCount<2||!m(N.protocol)))&&(j[3]=[/(.*)/,"pathname"]);_<j.length;_++)typeof(b=j[_])!="function"?(P=b[0],T=b[1],P!=P?N[T]=p:typeof P=="string"?~(O=P==="@"?p.lastIndexOf(P):p.indexOf(P))&&(typeof b[2]=="number"?(N[T]=p.slice(0,O),p=p.slice(O+b[2])):(N[T]=p.slice(O),p=p.slice(0,O))):(O=P.exec(p))&&(N[T]=O[1],p=p.slice(0,O.index)),N[T]=N[T]||E&&b[3]&&y[T]||"",b[4]&&(N[T]=N[T].toLowerCase())):p=b(p,N);x&&(N.query=x(N.query)),E&&y.slashes&&N.pathname.charAt(0)!=="/"&&(N.pathname!==""||y.pathname!=="")&&(N.pathname=(function(C,I){if(C==="")return I;for(var V=(I||"/").split("/").slice(0,-1).concat(C.split("/")),M=V.length,L=V[M-1],J=!1,D=0;M--;)V[M]==="."?V.splice(M,1):V[M]===".."?(V.splice(M,1),D++):D&&(M===0&&(J=!0),V.splice(M,1),D--);return J&&V.unshift(""),L!=="."&&L!==".."||V.push(""),V.join("/")})(N.pathname,y.pathname)),N.pathname.charAt(0)!=="/"&&m(N.protocol)&&(N.pathname="/"+N.pathname),r(N.port,N.protocol)||(N.host=N.hostname,N.port=""),N.username=N.password="",N.auth&&(~(O=N.auth.indexOf(":"))?(N.username=N.auth.slice(0,O),N.username=encodeURIComponent(decodeURIComponent(N.username)),N.password=N.auth.slice(O+1),N.password=encodeURIComponent(decodeURIComponent(N.password))):N.username=encodeURIComponent(decodeURIComponent(N.auth)),N.auth=N.password?N.username+":"+N.password:N.username),N.origin=N.protocol!=="file:"&&m(N.protocol)&&N.host?N.protocol+"//"+N.host:"null",N.href=N.toString()}A.prototype={set:function(p,y,x){var E=this;switch(p){case"query":typeof y=="string"&&y.length&&(y=(x||s.parse)(y)),E[p]=y;break;case"port":E[p]=y,r(y,E.protocol)?y&&(E.host=E.hostname+":"+y):(E.host=E.hostname,E[p]="");break;case"hostname":E[p]=y,E.port&&(y+=":"+E.port),E.host=y;break;case"host":E[p]=y,g.test(y)?(y=y.split(":"),E.port=y.pop(),E.hostname=y.join(":")):(E.hostname=y,E.port="");break;case"protocol":E.protocol=y.toLowerCase(),E.slashes=!x;break;case"pathname":case"hash":if(y){var w=p==="pathname"?"/":"#";E[p]=y.charAt(0)!==w?w+y:y}else E[p]=y;break;case"username":case"password":E[p]=encodeURIComponent(y);break;case"auth":var P=y.indexOf(":");~P?(E.username=y.slice(0,P),E.username=encodeURIComponent(decodeURIComponent(E.username)),E.password=y.slice(P+1),E.password=encodeURIComponent(decodeURIComponent(E.password))):E.username=encodeURIComponent(decodeURIComponent(y))}for(var b=0;b<a.length;b++){var O=a[b];O[4]&&(E[O[1]]=E[O[1]].toLowerCase())}return E.auth=E.password?E.username+":"+E.password:E.username,E.origin=E.protocol!=="file:"&&m(E.protocol)&&E.host?E.protocol+"//"+E.host:"null",E.href=E.toString(),E},toString:function(p){p&&typeof p=="function"||(p=s.stringify);var y,x=this,E=x.host,w=x.protocol;w&&w.charAt(w.length-1)!==":"&&(w+=":");var P=w+(x.protocol&&x.slashes||m(x.protocol)?"//":"");return x.username?(P+=x.username,x.password&&(P+=":"+x.password),P+="@"):x.password?(P+=":"+x.password,P+="@"):x.protocol!=="file:"&&m(x.protocol)&&!E&&x.pathname!=="/"&&(P+="@"),(E[E.length-1]===":"||g.test(x.hostname)&&!x.port)&&(E+=":"),P+=E+x.pathname,(y=typeof x.query=="object"?p(x.query):x.query)&&(P+=y.charAt(0)!=="?"?"?"+y:y),x.hash&&(P+=x.hash),P}},A.extractProtocol=v,A.location=f,A.trimLeft=h,A.qs=s,e.exports=A},410:()=>{},388:()=>{},805:()=>{},345:()=>{},800:()=>{}},ye={};function $(e){var t=ye[e];if(t!==void 0)return t.exports;var n=ye[e]={id:e,loaded:!1,exports:{}};return xn[e].call(n.exports,n,n.exports,$),n.loaded=!0,n.exports}$.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return $.d(t,{a:t}),t},$.d=(e,t)=>{for(var n in t)$.o(t,n)&&!$.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},$.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),$.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var tt={};$.d(tt,{hT:()=>X,O4:()=>st,Kd:()=>Cn,YK:()=>_n,UU:()=>Dr,Gu:()=>Ve,ky:()=>Je,h4:()=>vt,ch:()=>Rt,hq:()=>ut,i5:()=>Ze});var An=$(737),En=$.n(An);function Dt(e){if(!qt(e))throw new Error("Parameter was not an error")}function qt(e){return!!e&&typeof e=="object"&&(t=e,Object.prototype.toString.call(t)==="[object Error]")||e instanceof Error;var t}class K extends Error{constructor(t,n){const r=[...arguments],{options:s,shortMessage:i}=(function(u){let g,l="";if(u.length===0)g={};else if(qt(u[0]))g={cause:u[0]},l=u.slice(1).join(" ")||"";else if(u[0]&&typeof u[0]=="object")g=Object.assign({},u[0]),l=u.slice(1).join(" ")||"";else{if(typeof u[0]!="string")throw new Error("Invalid arguments passed to Layerr");g={},l=l=u.join(" ")||""}return{options:g,shortMessage:l}})(r);let c=i;if(s.cause&&(c=`${c}: ${s.cause.message}`),super(c),this.message=c,s.name&&typeof s.name=="string"?this.name=s.name:this.name="Layerr",s.cause&&Object.defineProperty(this,"_cause",{value:s.cause}),Object.defineProperty(this,"_info",{value:{}}),s.info&&typeof s.info=="object"&&Object.assign(this._info,s.info),Error.captureStackTrace){const u=s.constructorOpt||this.constructor;Error.captureStackTrace(this,u)}}static cause(t){return Dt(t),t._cause&&qt(t._cause)?t._cause:null}static fullStack(t){Dt(t);const n=K.cause(t);return n?`${t.stack}
caused by: ${K.fullStack(n)}`:t.stack??""}static info(t){Dt(t);const n={},r=K.cause(t);return r&&Object.assign(n,K.info(r)),t._info&&Object.assign(n,t._info),n}toString(){let t=this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(t=`${t}: ${this.message}`),t}}var Nn=$(47),Ot=$.n(Nn);const we="__PATH_SEPARATOR_POSIX__",be="__PATH_SEPARATOR_WINDOWS__";function R(e){try{const t=e.replace(/\//g,we).replace(/\\\\/g,be);return encodeURIComponent(t).split(be).join("\\\\").split(we).join("/")}catch(t){throw new K(t,"Failed encoding path")}}function xe(e){return e.startsWith("/")?e:"/"+e}function mt(e){let t=e;return t[0]!=="/"&&(t="/"+t),/^.+\/$/.test(t)&&(t=t.substr(0,t.length-1)),t}function Pn(e){let t=new(En())(e).pathname;return t.length<=0&&(t="/"),mt(t)}function k(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(function(){return(function(r){var s=[];if(r.length===0)return"";if(typeof r[0]!="string")throw new TypeError("Url must be a string. Received "+r[0]);if(r[0].match(/^[^/:]+:\/*$/)&&r.length>1){var i=r.shift();r[0]=i+r[0]}r[0].match(/^file:\/\/\//)?r[0]=r[0].replace(/^([^/:]+):\/*/,"$1:///"):r[0]=r[0].replace(/^([^/:]+):\/*/,"$1://");for(var c=0;c<r.length;c++){var u=r[c];if(typeof u!="string")throw new TypeError("Url must be a string. Received "+u);u!==""&&(c>0&&(u=u.replace(/^[\/]+/,"")),u=c<r.length-1?u.replace(/[\/]+$/,""):u.replace(/[\/]+$/,"/"),s.push(u))}var g=s.join("/"),l=(g=g.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return l.shift()+(l.length>0?"?":"")+l.join("&")})(typeof arguments[0]=="object"?arguments[0]:[].slice.call(arguments))})(t.reduce((r,s,i)=>((i===0||s!=="/"||s==="/"&&r[r.length-1]!=="/")&&r.push(s),r),[]))}var On=$(542),pt=$.n(On);const Tn="abcdef0123456789";function Ae(e,t){const n=e.url.replace("//",""),r=n.indexOf("/")==-1?"/":n.slice(n.indexOf("/")),s=e.method?e.method.toUpperCase():"GET",i=!!/(^|,)\s*auth\s*($|,)/.test(t.qop)&&"auth",c=`00000000${t.nc}`.slice(-8),u=(function(a,d,f,m,v,A,p){const y=p||pt()(`${d}:${f}:${m}`);return a&&a.toLowerCase()==="md5-sess"?pt()(`${y}:${v}:${A}`):y})(t.algorithm,t.username,t.realm,t.password,t.nonce,t.cnonce,t.ha1),g=pt()(`${s}:${r}`),l=i?pt()(`${u}:${t.nonce}:${c}:${t.cnonce}:${i}:${g}`):pt()(`${u}:${t.nonce}:${g}`),o={username:t.username,realm:t.realm,nonce:t.nonce,uri:r,qop:i,response:l,nc:c,cnonce:t.cnonce,algorithm:t.algorithm,opaque:t.opaque},h=[];for(const a in o)o[a]&&(a==="qop"||a==="nc"||a==="algorithm"?h.push(`${a}=${o[a]}`):h.push(`${a}="${o[a]}"`));return`Digest ${h.join(", ")}`}function Fe(e){return(e.headers&&e.headers.get("www-authenticate")||"").split(/\s/)[0].toLowerCase()==="digest"}var jn=$(101),Ue=$.n(jn);function Ee(e){return Ue().decode(e)}function Ne(e,t){var n;return`Basic ${n=`${e}:${t}`,Ue().encode(n)}`}const Tt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:typeof window<"u"?window:globalThis,Sn=Tt.fetch.bind(Tt),Cn=Tt.Request,_n=Tt.Response;let X=(function(e){return e.Auto="auto",e.Digest="digest",e.None="none",e.Password="password",e.Token="token",e})({}),st=(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 Be(e,t,n,r,s){switch(e.authType){case X.Auto:t&&n&&(e.headers.Authorization=Ne(t,n));break;case X.Digest:e.digest=(function(c,u,g){return{username:c,password:u,ha1:g,nc:0,algorithm:"md5",hasDigestAuth:!1}})(t,n,s);break;case X.None:break;case X.Password:e.headers.Authorization=Ne(t,n);break;case X.Token:e.headers.Authorization=`${(i=r).token_type} ${i.access_token}`;break;default:throw new K({info:{code:st.InvalidAuthType}},`Invalid auth type: ${e.authType}`)}var i}$(345),$(800);const Pe="@@HOTPATCHER",$n=()=>{};function Mt(e){return{original:e,methods:[e],final:!1}}class In{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=Pe}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(t){this.configuration.getEmptyAction=t}control(t){let n=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!t||t.__type__!==Pe)throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");return Object.keys(t.configuration.registry).forEach(r=>{this.configuration.registry.hasOwnProperty(r)?n&&(this.configuration.registry[r]=Object.assign({},t.configuration.registry[r])):this.configuration.registry[r]=Object.assign({},t.configuration.registry[r])}),t._configuration=this.configuration,this}execute(t){const n=this.get(t)||$n;for(var r=arguments.length,s=new Array(r>1?r-1:0),i=1;i<r;i++)s[i-1]=arguments[i];return n(...s)}get(t){const n=this.configuration.registry[t];if(!n)switch(this.getEmptyAction){case"null":return null;case"throw":throw new Error(`Failed handling method request: No method provided for override: ${t}`);default:throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`)}return(function(){for(var r=arguments.length,s=new Array(r),i=0;i<r;i++)s[i]=arguments[i];if(s.length===0)throw new Error("Failed creating sequence: No functions provided");return function(){for(var c=arguments.length,u=new Array(c),g=0;g<c;g++)u[g]=arguments[g];let l=u;const o=this;for(;s.length>0;)l=[s.shift().apply(o,l)];return l[0]}})(...n.methods)}isPatched(t){return!!this.configuration.registry[t]}patch(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{chain:s=!1}=r;if(this.configuration.registry[t]&&this.configuration.registry[t].final)throw new Error(`Failed patching '${t}': Method marked as being final`);if(typeof n!="function")throw new Error(`Failed patching '${t}': Provided method is not a function`);if(s)this.configuration.registry[t]?this.configuration.registry[t].methods.push(n):this.configuration.registry[t]=Mt(n);else if(this.isPatched(t)){const{original:i}=this.configuration.registry[t];this.configuration.registry[t]=Object.assign(Mt(n),{original:i})}else this.configuration.registry[t]=Mt(n);return this}patchInline(t,n){this.isPatched(t)||this.patch(t,n);for(var r=arguments.length,s=new Array(r>2?r-2:0),i=2;i<r;i++)s[i-2]=arguments[i];return this.execute(t,...s)}plugin(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return r.forEach(i=>{this.patch(t,i,{chain:!0})}),this}restore(t){if(!this.isPatched(t))throw new Error(`Failed restoring method: No method present for key: ${t}`);if(typeof this.configuration.registry[t].original!="function")throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${t}`);return this.configuration.registry[t].methods=[this.configuration.registry[t].original],this}setFinal(t){if(!this.configuration.registry.hasOwnProperty(t))throw new Error(`Failed marking '${t}' as final: No method found for key`);return this.configuration.registry[t].final=!0,this}}let Ft=null;function Ve(){return Ft||(Ft=new In),Ft}function jt(e){return(function(t){if(typeof t!="object"||t===null||Object.prototype.toString.call(t)!="[object Object]")return!1;if(Object.getPrototypeOf(t)===null)return!0;let n=t;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n})(e)?Object.assign({},e):Object.setPrototypeOf(Object.assign({},e),Object.getPrototypeOf(e))}function Oe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];let r=null,s=[...t];for(;s.length>0;){const i=s.shift();r=r?ze(r,i):jt(i)}return r}function ze(e,t){const n=jt(e);return Object.keys(t).forEach(r=>{n.hasOwnProperty(r)?Array.isArray(t[r])?n[r]=Array.isArray(n[r])?[...n[r],...t[r]]:[...t[r]]:typeof t[r]=="object"&&t[r]?n[r]=typeof n[r]=="object"&&n[r]?ze(n[r],t[r]):jt(t[r]):n[r]=t[r]:n[r]=t[r]}),n}function Rn(e){const t={};for(const n of e.keys())t[n]=e.get(n);return t}function Gt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length===0)return{};const r={};return t.reduce((s,i)=>(Object.keys(i).forEach(c=>{const u=c.toLowerCase();r.hasOwnProperty(u)?s[r[u]]=i[c]:(r[u]=c,s[c]=i[c])}),s),{})}$(805);const kn=typeof ArrayBuffer=="function",{toString:Ln}=Object.prototype;function We(e){return kn&&(e instanceof ArrayBuffer||Ln.call(e)==="[object ArrayBuffer]")}function qe(e){return e!=null&&e.constructor!=null&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function te(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(r){return Promise.reject(r)}}}function Ht(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const Ge=te(function(e){const t=e._digest;return delete e._digest,t.hasDigestAuth&&(e=Oe(e,{headers:{Authorization:Ae(e,t)}})),Ht(St(e),function(n){let r=!1;return s=function(c){return r?c:n},(i=(function(){if(n.status==401)return t.hasDigestAuth=(function(c,u){if(!Fe(c))return!1;const g=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){const l=c.headers&&c.headers.get("www-authenticate")||"",o=g.exec(l);if(!o)break;u[o[1]]=o[2]||o[3]}return u.nc+=1,u.cnonce=(function(){let l="";for(let o=0;o<32;++o)l=`${l}${Tn[Math.floor(16*Math.random())]}`;return l})(),!0})(n,t),(function(){if(t.hasDigestAuth)return Ht(St(e=Oe(e,{headers:{Authorization:Ae(e,t)}})),function(c){return c.status==401?t.hasDigestAuth=!1:t.nc++,r=!0,c})})();t.nc++})())&&i.then?i.then(s):s(i);var s,i})}),Dn=te(function(e,t){return Ht(St(e),function(n){return n.ok?(t.authType=X.Password,n):n.status==401&&Fe(n)?(t.authType=X.Digest,Be(t,t.username,t.password,void 0,void 0),e._digest=t.digest,Ge(e)):n})}),F=te(function(e,t){return t.authType===X.Auto?Dn(e,t):e._digest?Ge(e):St(e)});function U(e,t,n){const r=jt(e);return r.headers=Gt(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 St(e){const t=Ve();return t.patchInline("request",n=>t.patchInline("fetch",Sn,n.url,(function(r){let s={};const i={method:r.method};if(r.headers&&(s=Gt(s,r.headers)),r.data!==void 0){const[c,u]=(function(g){if(typeof g=="string")return[g,{}];if(qe(g))return[g,{}];if(We(g))return[g,{}];if(g&&typeof g=="object")return[JSON.stringify(g),{"content-type":"application/json"}];throw new Error("Unable to convert request body: Unexpected body type: "+typeof g)})(r.data);i.body=c,s=Gt(s,u)}return r.signal&&(i.signal=r.signal),r.withCredentials&&(i.credentials="include"),i.headers=s,i})(n)),e)}var Mn=$(285);const Ct=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},Fn={"[: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]},ft=e=>e.replace(/[[\]\\-]/g,"\\$&"),Te=e=>e.join(""),Un=(e,t)=>{const n=t;if(e.charAt(n)!=="[")throw new Error("not in a brace expression");const r=[],s=[];let i=n+1,c=!1,u=!1,g=!1,l=!1,o=n,h="";t:for(;i<e.length;){const m=e.charAt(i);if(m!=="!"&&m!=="^"||i!==n+1){if(m==="]"&&c&&!g){o=i+1;break}if(c=!0,m!=="\\"||g){if(m==="["&&!g){for(const[v,[A,p,y]]of Object.entries(Fn))if(e.startsWith(v,i)){if(h)return["$.",!1,e.length-n,!0];i+=v.length,y?s.push(A):r.push(A),u=u||p;continue t}}g=!1,h?(m>h?r.push(ft(h)+"-"+ft(m)):m===h&&r.push(ft(m)),h="",i++):e.startsWith("-]",i+1)?(r.push(ft(m+"-")),i+=2):e.startsWith("-",i+1)?(h=m,i+=2):(r.push(ft(m)),i++)}else g=!0,i++}else l=!0,i++}if(o<i)return["",!1,0,!1];if(!r.length&&!s.length)return["$.",!1,e.length-n,!0];if(s.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!l)return[(a=r[0].length===2?r[0].slice(-1):r[0],a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,o-n,!1];var a;const d="["+(l?"^":"")+Te(r)+"]",f="["+(l?"":"^")+Te(s)+"]";return[r.length&&s.length?"("+d+"|"+f+")":r.length?d:f,u,o-n,!0]},dt=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")},Bn=new Set(["!","?","+","*","@"]),je=e=>Bn.has(e),Ut="(?!\\.)",Vn=new Set(["[","."]),zn=new Set(["..","."]),Wn=new Set("().*{}+?[]^$\\!"),ee="[^/]",Se=ee+"*?",Ce=ee+"+?";class H{type;#n;#r;#o=!1;#t=[];#e;#i;#u;#a=!1;#s;#c;#h=!1;constructor(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.type=t,t&&(this.#r=!0),this.#e=n,this.#n=this.#e?this.#e.#n:this,this.#s=this.#n===this?r:this.#n.#s,this.#u=this.#n===this?[]:this.#n.#u,t!=="!"||this.#n.#a||this.#u.push(this),this.#i=this.#e?this.#e.#t.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(const t of this.#t)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#c!==void 0?this.#c:this.type?this.#c=this.type+"("+this.#t.map(t=>String(t)).join("|")+")":this.#c=this.#t.map(t=>String(t)).join("")}#f(){if(this!==this.#n)throw new Error("should only call on root");if(this.#a)return this;let t;for(this.toString(),this.#a=!0;t=this.#u.pop();){if(t.type!=="!")continue;let n=t,r=n.#e;for(;r;){for(let s=n.#i+1;!r.type&&s<r.#t.length;s++)for(const i of t.#t){if(typeof i=="string")throw new Error("string part in extglob AST??");i.copyIn(r.#t[s])}n=r,r=n.#e}}return this}push(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(const s of n)if(s!==""){if(typeof s!="string"&&!(s instanceof H&&s.#e===this))throw new Error("invalid part: "+s);this.#t.push(s)}}toJSON(){const t=this.type===null?this.#t.slice().map(n=>typeof n=="string"?n:n.toJSON()):[this.type,...this.#t.map(n=>n.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#n||this.#n.#a&&this.#e?.type==="!")&&t.push({}),t}isStart(){if(this.#n===this)return!0;if(!this.#e?.isStart())return!1;if(this.#i===0)return!0;const t=this.#e;for(let n=0;n<this.#i;n++){const r=t.#t[n];if(!(r instanceof H&&r.type==="!"))return!1}return!0}isEnd(){if(this.#n===this||this.#e?.type==="!")return!0;if(!this.#e?.isEnd())return!1;if(!this.type)return this.#e?.isEnd();const t=this.#e?this.#e.#t.length:0;return this.#i===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){const n=new H(this.type,t);for(const r of this.#t)n.copyIn(r);return n}static#l(t,n,r,s){let i=!1,c=!1,u=-1,g=!1;if(n.type===null){let d=r,f="";for(;d<t.length;){const m=t.charAt(d++);if(i||m==="\\")i=!i,f+=m;else if(c)d===u+1?m!=="^"&&m!=="!"||(g=!0):m!=="]"||d===u+2&&g||(c=!1),f+=m;else if(m!=="[")if(s.noext||!je(m)||t.charAt(d)!=="(")f+=m;else{n.push(f),f="";const v=new H(m,n);d=H.#l(t,v,d,s),n.push(v)}else c=!0,u=d,g=!1,f+=m}return n.push(f),d}let l=r+1,o=new H(null,n);const h=[];let a="";for(;l<t.length;){const d=t.charAt(l++);if(i||d==="\\")i=!i,a+=d;else if(c)l===u+1?d!=="^"&&d!=="!"||(g=!0):d!=="]"||l===u+2&&g||(c=!1),a+=d;else if(d!=="[")if(je(d)&&t.charAt(l)==="("){o.push(a),a="";const f=new H(d,o);o.push(f),l=H.#l(t,f,l,s)}else if(d!=="|"){if(d===")")return a===""&&n.#t.length===0&&(n.#h=!0),o.push(a),a="",n.push(...h,o),l;a+=d}else o.push(a),a="",h.push(o),o=new H(null,n);else c=!0,u=l,g=!1,a+=d}return n.type=null,n.#r=void 0,n.#t=[t.substring(r-1)],l}static fromGlob(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=new H(null,void 0,n);return H.#l(t,r,0,n),r}toMMPattern(){if(this!==this.#n)return this.#n.toMMPattern();const t=this.toString(),[n,r,s,i]=this.toRegExpSource();if(!(s||this.#r||this.#s.nocase&&!this.#s.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return r;const c=(this.#s.nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${n}$`,c),{_src:n,_glob:t})}get options(){return this.#s}toRegExpSource(t){const n=t??!!this.#s.dot;if(this.#n===this&&this.#f(),!this.type){const g=this.isStart()&&this.isEnd(),l=this.#t.map(a=>{const[d,f,m,v]=typeof a=="string"?H.#d(a,this.#r,g):a.toRegExpSource(t);return this.#r=this.#r||m,this.#o=this.#o||v,d}).join("");let o="";if(this.isStart()&&typeof this.#t[0]=="string"&&(this.#t.length!==1||!zn.has(this.#t[0]))){const a=Vn,d=n&&a.has(l.charAt(0))||l.startsWith("\\.")&&a.has(l.charAt(2))||l.startsWith("\\.\\.")&&a.has(l.charAt(4)),f=!n&&!t&&a.has(l.charAt(0));o=d?"(?!(?:^|/)\\.\\.?(?:$|/))":f?Ut:""}let h="";return this.isEnd()&&this.#n.#a&&this.#e?.type==="!"&&(h="(?:$|\\/)"),[o+l+h,dt(l),this.#r=!!this.#r,this.#o]}const r=this.type==="*"||this.type==="+",s=this.type==="!"?"(?:(?!(?:":"(?:";let i=this.#p(n);if(this.isStart()&&this.isEnd()&&!i&&this.type!=="!"){const g=this.toString();return this.#t=[g],this.type=null,this.#r=void 0,[g,dt(this.toString()),!1,!1]}let c=!r||t||n?"":this.#p(!0);c===i&&(c=""),c&&(i=`(?:${i})(?:${c})*?`);let u="";return u=this.type==="!"&&this.#h?(this.isStart()&&!n?Ut:"")+Ce:s+i+(this.type==="!"?"))"+(!this.isStart()||n||t?"":Ut)+Se+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&c?")":this.type==="*"&&c?")?":`)${this.type}`),[u,dt(i),this.#r=!!this.#r,this.#o]}#p(t){return this.#t.map(n=>{if(typeof n=="string")throw new Error("string type in extglob ast??");const[r,s,i,c]=n.toRegExpSource(t);return this.#o=this.#o||c,r}).filter(n=>!(this.isStart()&&this.isEnd()&&!n)).join("|")}static#d(t,n){let r=arguments.length>2&&arguments[2]!==void 0&&arguments[2],s=!1,i="",c=!1;for(let u=0;u<t.length;u++){const g=t.charAt(u);if(s)s=!1,i+=(Wn.has(g)?"\\":"")+g;else if(g!=="\\"){if(g==="["){const[l,o,h,a]=Un(t,u);if(h){i+=l,c=c||o,u+=h-1,n=n||a;continue}}g!=="*"?g!=="?"?i+=g.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(i+=ee,n=!0):(i+=r&&t==="*"?Ce:Se,n=!0)}else u===t.length-1?i+="\\\\":s=!0}return[i,dt(t),!!n,c]}}const G=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Ct(t),!(!n.nocomment&&t.charAt(0)==="#")&&new _t(t,n).match(e)},qn=/^\*+([^+@!?\*\[\(]*)$/,Gn=e=>t=>!t.startsWith(".")&&t.endsWith(e),Hn=e=>t=>t.endsWith(e),Xn=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),Yn=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),Kn=/^\*+\.\*+$/,Jn=e=>!e.startsWith(".")&&e.includes("."),Zn=e=>e!=="."&&e!==".."&&e.includes("."),Qn=/^\.\*+$/,tr=e=>e!=="."&&e!==".."&&e.startsWith("."),er=/^\*+$/,nr=e=>e.length!==0&&!e.startsWith("."),rr=e=>e.length!==0&&e!=="."&&e!=="..",sr=/^\?+([^+@!?\*\[\(]*)?$/,or=e=>{let[t,n=""]=e;const r=He([t]);return n?(n=n.toLowerCase(),s=>r(s)&&s.toLowerCase().endsWith(n)):r},ir=e=>{let[t,n=""]=e;const r=Xe([t]);return n?(n=n.toLowerCase(),s=>r(s)&&s.toLowerCase().endsWith(n)):r},ar=e=>{let[t,n=""]=e;const r=Xe([t]);return n?s=>r(s)&&s.endsWith(n):r},ur=e=>{let[t,n=""]=e;const r=He([t]);return n?s=>r(s)&&s.endsWith(n):r},He=e=>{let[t]=e;const n=t.length;return r=>r.length===n&&!r.startsWith(".")},Xe=e=>{let[t]=e;const n=t.length;return r=>r.length===n&&r!=="."&&r!==".."},Ye=typeof Et=="object"&&Et?typeof Lt=="object"&&Lt&&Lt.__MINIMATCH_TESTING_PLATFORM__||Et.platform:"posix";G.sep=Ye==="win32"?"\\":"/";const Q=Symbol("globstar **");G.GLOBSTAR=Q,G.filter=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return n=>G(n,e,t)};const Z=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.assign({},e,t)};G.defaults=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return G;const t=G;return Object.assign(function(n,r){return t(n,r,Z(e,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))},{Minimatch:class extends t.Minimatch{constructor(n){super(n,Z(e,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}))}static defaults(n){return t.defaults(Z(e,n)).Minimatch}},AST:class extends t.AST{constructor(n,r){super(n,r,Z(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,Z(e,r))}},unescape:function(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.unescape(n,Z(e,r))},escape:function(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.escape(n,Z(e,r))},filter:function(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.filter(n,Z(e,r))},defaults:n=>t.defaults(Z(e,n)),makeRe:function(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.makeRe(n,Z(e,r))},braceExpand:function(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.braceExpand(n,Z(e,r))},match:function(n,r){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t.match(n,r,Z(e,s))},sep:t.sep,GLOBSTAR:Q})};const Ke=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Ct(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:Mn(e)};G.braceExpand=Ke,G.makeRe=function(e){return new _t(e,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).makeRe()},G.match=function(e,t){const n=new _t(t,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{});return e=e.filter(r=>n.match(r)),n.options.nonull&&!e.length&&e.push(t),e};const _e=/[?*]|[+@!]\(.*?\)|\[|\]/;class _t{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Ct(t),n=n||{},this.options=n,this.pattern=t,this.platform=n.platform||Ye,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const n of t)if(typeof n!="string")return!0;return!1}debug(){}make(){const t=this.pattern,n=this.options;if(!n.nocomment&&t.charAt(0)==="#")return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=function(){return console.error(...arguments)}),this.debug(this.pattern,this.globSet);const r=this.globSet.map(i=>this.slashSplit(i));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let s=this.globParts.map((i,c,u)=>{if(this.isWindows&&this.windowsNoMagicRoot){const g=!(i[0]!==""||i[1]!==""||i[2]!=="?"&&_e.test(i[2])||_e.test(i[3])),l=/^[a-z]:/i.test(i[0]);if(g)return[...i.slice(0,4),...i.slice(4).map(o=>this.parse(o))];if(l)return[i[0],...i.slice(1).map(o=>this.parse(o))]}return i.map(g=>this.parse(g))});if(this.debug(this.pattern,s),this.set=s.filter(i=>i.indexOf(!1)===-1),this.isWindows)for(let i=0;i<this.set.length;i++){const c=this.set[i];c[0]===""&&c[1]===""&&this.globParts[i][2]==="?"&&typeof c[3]=="string"&&/^[a-z]:$/i.test(c[3])&&(c[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let r=0;r<t.length;r++)for(let s=0;s<t[r].length;s++)t[r][s]==="**"&&(t[r][s]="*");const{optimizationLevel:n=1}=this.options;return n>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=n>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(n=>{let r=-1;for(;(r=n.indexOf("**",r+1))!==-1;){let s=r;for(;n[s+1]==="**";)s++;s!==r&&n.splice(r,s-r)}return n})}levelOneOptimize(t){return t.map(n=>(n=n.reduce((r,s)=>{const i=r[r.length-1];return s==="**"&&i==="**"?r:s===".."&&i&&i!==".."&&i!=="."&&i!=="**"?(r.pop(),r):(r.push(s),r)},[])).length===0?[""]:n)}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let s=1;s<t.length-1;s++){const i=t[s];s===1&&i===""&&t[0]===""||i!=="."&&i!==""||(n=!0,t.splice(s,1),s--)}t[0]!=="."||t.length!==2||t[1]!=="."&&t[1]!==""||(n=!0,t.pop())}let r=0;for(;(r=t.indexOf("..",r+1))!==-1;){const s=t[r-1];s&&s!=="."&&s!==".."&&s!=="**"&&(n=!0,t.splice(r-1,2),r-=2)}}while(n);return t.length===0?[""]:t}firstPhasePreProcess(t){let n=!1;do{n=!1;for(let r of t){let s=-1;for(;(s=r.indexOf("**",s+1))!==-1;){let c=s;for(;r[c+1]==="**";)c++;c>s&&r.splice(s+1,c-s);let u=r[s+1];const g=r[s+2],l=r[s+3];if(u!==".."||!g||g==="."||g===".."||!l||l==="."||l==="..")continue;n=!0,r.splice(s,1);const o=r.slice(0);o[s]="**",t.push(o),s--}if(!this.preserveMultipleSlashes){for(let c=1;c<r.length-1;c++){const u=r[c];c===1&&u===""&&r[0]===""||u!=="."&&u!==""||(n=!0,r.splice(c,1),c--)}r[0]!=="."||r.length!==2||r[1]!=="."&&r[1]!==""||(n=!0,r.pop())}let i=0;for(;(i=r.indexOf("..",i+1))!==-1;){const c=r[i-1];if(c&&c!=="."&&c!==".."&&c!=="**"){n=!0;const u=i===1&&r[i+1]==="**"?["."]:[];r.splice(i-1,2,...u),r.length===0&&r.push(""),i-=2}}}}while(n);return t}secondPhasePreProcess(t){for(let n=0;n<t.length-1;n++)for(let r=n+1;r<t.length;r++){const s=this.partsMatch(t[n],t[r],!this.preserveMultipleSlashes);if(s){t[n]=[],t[r]=s;break}}return t.filter(n=>n.length)}partsMatch(t,n){let r=arguments.length>2&&arguments[2]!==void 0&&arguments[2],s=0,i=0,c=[],u="";for(;s<t.length&&i<n.length;)if(t[s]===n[i])c.push(u==="b"?n[i]:t[s]),s++,i++;else if(r&&t[s]==="**"&&n[i]===t[s+1])c.push(t[s]),s++;else if(r&&n[i]==="**"&&t[s]===n[i+1])c.push(n[i]),i++;else if(t[s]!=="*"||!n[i]||!this.options.dot&&n[i].startsWith(".")||n[i]==="**"){if(n[i]!=="*"||!t[s]||!this.options.dot&&t[s].startsWith(".")||t[s]==="**"||u==="a")return!1;u="b",c.push(n[i]),s++,i++}else{if(u==="b")return!1;u="a",c.push(t[s]),s++,i++}return t.length===n.length&&c}parseNegate(){if(this.nonegate)return;const t=this.pattern;let n=!1,r=0;for(let s=0;s<t.length&&t.charAt(s)==="!";s++)n=!n,r++;r&&(this.pattern=t.slice(r)),this.negate=n}matchOne(t,n){let r=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const s=this.options;if(this.isWindows){const m=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),v=!m&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),A=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),p=v?3:m?0:void 0,y=!A&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3])?3:A?0:void 0;if(typeof p=="number"&&typeof y=="number"){const[x,E]=[t[p],n[y]];x.toLowerCase()===E.toLowerCase()&&(n[y]=x,y>p?n=n.slice(y):p>y&&(t=t.slice(p)))}}const{optimizationLevel:i=1}=this.options;i>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:n}),this.debug("matchOne",t.length,n.length);for(var c=0,u=0,g=t.length,l=n.length;c<g&&u<l;c++,u++){this.debug("matchOne loop");var o=n[u],h=t[c];if(this.debug(n,o,h),o===!1)return!1;if(o===Q){this.debug("GLOBSTAR",[n,o,h]);var a=c,d=u+1;if(d===l){for(this.debug("** at the end");c<g;c++)if(t[c]==="."||t[c]===".."||!s.dot&&t[c].charAt(0)===".")return!1;return!0}for(;a<g;){var f=t[a];if(this.debug(`
globstar while`,t,a,n,d,f),this.matchOne(t.slice(a),n.slice(d),r))return this.debug("globstar found match!",a,g,f),!0;if(f==="."||f===".."||!s.dot&&f.charAt(0)==="."){this.debug("dot detected!",t,a,n,d);break}this.debug("globstar swallow a segment, and continue"),a++}return!(!r||(this.debug(`
>>> no match, partial?`,t,a,n,d),a!==g))}let m;if(typeof o=="string"?(m=h===o,this.debug("string match",o,h,m)):(m=o.test(h),this.debug("pattern match",o,h,m)),!m)return!1}if(c===g&&u===l)return!0;if(c===g)return r;if(u===l)return c===g-1&&t[c]==="";throw new Error("wtf?")}braceExpand(){return Ke(this.pattern,this.options)}parse(t){Ct(t);const n=this.options;if(t==="**")return Q;if(t==="")return"";let r,s=null;(r=t.match(er))?s=n.dot?rr:nr:(r=t.match(qn))?s=(n.nocase?n.dot?Yn:Xn:n.dot?Hn:Gn)(r[1]):(r=t.match(sr))?s=(n.nocase?n.dot?ir:or:n.dot?ar:ur)(r):(r=t.match(Kn))?s=n.dot?Zn:Jn:(r=t.match(Qn))&&(s=tr);const i=H.fromGlob(t,this.options).toMMPattern();return s&&typeof i=="object"&&Reflect.defineProperty(i,"test",{value:s}),i}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const n=this.options,r=n.noglobstar?"[^/]*?":n.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",s=new Set(n.nocase?["i"]:[]);let i=t.map(g=>{const l=g.map(o=>{if(o instanceof RegExp)for(const h of o.flags.split(""))s.add(h);return typeof o=="string"?o.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):o===Q?Q:o._src});return l.forEach((o,h)=>{const a=l[h+1],d=l[h-1];o===Q&&d!==Q&&(d===void 0?a!==void 0&&a!==Q?l[h+1]="(?:\\/|"+r+"\\/)?"+a:l[h]=r:a===void 0?l[h-1]=d+"(?:\\/|"+r+")?":a!==Q&&(l[h-1]=d+"(?:\\/|\\/"+r+"\\/)"+a,l[h+1]=Q))}),l.filter(o=>o!==Q).join("/")}).join("|");const[c,u]=t.length>1?["(?:",")"]:["",""];i="^"+c+i+u+"$",this.negate&&(i="^(?!"+i+").+$");try{this.regexp=new RegExp(i,[...s].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.partial;if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&n)return!0;const r=this.options;this.isWindows&&(t=t.split("\\").join("/"));const s=this.slashSplit(t);this.debug(this.pattern,"split",s);const i=this.set;this.debug(this.pattern,"set",i);let c=s[s.length-1];if(!c)for(let u=s.length-2;!c&&u>=0;u--)c=s[u];for(let u=0;u<i.length;u++){const g=i[u];let l=s;if(r.matchBase&&g.length===1&&(l=[c]),this.matchOne(l,g,n))return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate}static defaults(t){return G.defaults(t).Minimatch}}function ne(e){const t=new 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 B(e,t){const{status:n}=t;if(n===401&&e.digest)return t;if(n>=400)throw ne(t);return t}function ut(e,t){return arguments.length>2&&arguments[2]!==void 0&&arguments[2]?{data:t,headers:e.headers?Rn(e.headers):{},status:e.status,statusText:e.statusText}:t}G.AST=H,G.Minimatch=_t,G.escape=function(e){let{windowsPathsNoEscape:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&")},G.unescape=dt;const cr=($e=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=U({url:k(e.remoteURL,R(t)),method:"COPY",headers:{Destination:k(e.remoteURL,R(n)),Overwrite:r.overwrite===!1?"F":"T",Depth:r.shallow?"0":"infinity"}},e,r);return c=function(u){B(e,u)},(i=F(s,e))&&i.then||(i=Promise.resolve(i)),c?i.then(c):i;var i,c},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve($e.apply(this,e))}catch(n){return Promise.reject(n)}});var $e,re=$(635),lr=$(829),rt=$.n(lr),ct=(function(e){return e.Array="array",e.Object="object",e.Original="original",e})(ct||{});function xt(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ct.Original;const r=rt().get(e,t);return n==="array"&&Array.isArray(r)===!1?[r]:n==="object"&&Array.isArray(r)?r[0]:r}function vt(e){return new Promise(t=>{t((function(n){const{multistatus:r}=n;if(r==="")return{multistatus:{response:[]}};if(!r)throw new Error("Invalid response: No root multistatus found");const s={multistatus:Array.isArray(r)?r[0]:r};return rt().set(s,"multistatus.response",xt(s,"multistatus.response",ct.Array)),rt().set(s,"multistatus.response",rt().get(s,"multistatus.response").map(i=>(function(c){const u=Object.assign({},c);return u.status?rt().set(u,"status",xt(u,"status",ct.Object)):(rt().set(u,"propstat",xt(u,"propstat",ct.Object)),rt().set(u,"propstat.prop",xt(u,"propstat.prop",ct.Object))),u})(i))),s})(new re.XMLParser({allowBooleanAttributes:!0,attributeNamePrefix:"",textNodeName:"text",ignoreAttributes:!1,removeNSPrefix:!0,numberParseOptions:{hex:!0,leadingZeros:!1},attributeValueProcessor:(n,r,s)=>r==="true"||r==="false"?r==="true":r,tagValueProcessor(n,r,s){if(!s.endsWith("propstat.prop.displayname"))return r}}).parse(e)))})}function Rt(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const{getlastmodified:r=null,getcontentlength:s="0",resourcetype:i=null,getcontenttype:c=null,getetag:u=null}=e,g=i&&typeof i=="object"&&i.collection!==void 0?"directory":"file",l={filename:t,basename:Ot().basename(t),lastmod:r,size:parseInt(s,10),type:g,etag:typeof u=="string"?u.replace(/"/g,""):null};return g==="file"&&(l.mime=c&&typeof c=="string"?c.split(";")[0]:""),n&&(e.displayname!==void 0&&(e.displayname=String(e.displayname)),l.props=e),l}function Je(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 new Error("Failed getting item stat: bad response");const{propstat:{prop:s,status:i}}=r,[c,u,g]=i.split(" ",3),l=parseInt(u,10);if(l>=400){const o=new Error(`Invalid response: ${l} ${g}`);throw o.status=l,o}return Rt(s,mt(t),n)}function Ze(e){switch(String(e)){case"-3":return"unlimited";case"-2":case"-1":return"unknown";default:return parseInt(String(e),10)}}function Bt(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const se=(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(r){return Promise.reject(r)}}})(function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{details:r=!1}=n,s=U({url:k(e.remoteURL,R(t)),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},e,n);return Bt(F(s,e),function(i){return B(e,i),Bt(i.text(),function(c){return Bt(vt(c),function(u){const g=Je(u,t,r);return ut(i,g,r)})})})});function Qe(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const hr=tn(function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=(function(i){if(!i||i==="/")return[];let c=i;const u=[];do u.push(c),c=Ot().dirname(c);while(c&&c!=="/");return u})(mt(t));r.sort((i,c)=>i.length>c.length?1:c.length>i.length?-1:0);let s=!1;return(function(i,c,u){if(typeof i[Re]=="function"){let m=function(v){try{for(;!(g=h.next()).done;)if((v=c(g.value))&&v.then){if(!ke(v))return void v.then(m,o||(o=Y.bind(null,l=new lt,2)));v=v.v}l?Y(l,1,v):l=v}catch(A){Y(l||(l=new lt),2,A)}};var g,l,o,h=i[Re]();if(m(),h.return){var a=function(v){try{g.done||h.return()}catch{}return v};if(l&&l.then)return l.then(a,function(v){throw a(v)});a()}return l}if(!("length"in i))throw new TypeError("Object is not iterable");for(var d=[],f=0;f<i.length;f++)d.push(i[f]);return(function(m,v,A){var p,y,x=-1;return(function E(w){try{for(;++x<m.length&&(!A||!A());)if((w=v(x))&&w.then){if(!ke(w))return void w.then(E,y||(y=Y.bind(null,p=new lt,2)));w=w.v}p?Y(p,1,w):p=w}catch(P){Y(p||(p=new lt),2,P)}})(),p})(d,function(m){return c(d[m])},u)})(r,function(i){return c=function(){return(function(g,l){try{var o=Qe(se(e,i),function(h){if(h.type!=="directory")throw new Error(`Path includes a file: ${t}`)})}catch(h){return l(h)}return o&&o.then?o.then(void 0,l):o})(0,function(g){const l=g;return(function(){if(l.status===404)return s=!0,Ie(Xt(e,i,{...n,recursive:!1}));throw g})()})},(u=(function(){if(s)return Ie(Xt(e,i,{...n,recursive:!1}))})())&&u.then?u.then(c):c();var c,u},function(){return!1})});function tn(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(r){return Promise.reject(r)}}}function pr(){}function Ie(e,t){return e&&e.then?e.then(pr):Promise.resolve()}const Re=typeof Symbol<"u"?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function Y(e,t,n){if(!e.s){if(n instanceof lt){if(!n.s)return void(n.o=Y.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(Y.bind(null,e,t),Y.bind(null,e,2));e.s=t,e.v=n;const r=e.o;r&&r(e)}}const lt=(function(){function e(){}return e.prototype.then=function(t,n){const r=new e,s=this.s;if(s){const i=1&s?t:n;if(i){try{Y(r,1,i(this.v))}catch(c){Y(r,2,c)}return r}return this}return this.o=function(i){try{const c=i.v;1&i.s?Y(r,1,t?t(c):c):n?Y(r,1,n(c)):Y(r,2,c)}catch(c){Y(r,2,c)}},r},e})();function ke(e){return e instanceof lt&&1&e.s}const Xt=tn(function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(n.recursive===!0)return hr(e,t,n);const r=U({url:k(e.remoteURL,(s=R(t),s.endsWith("/")?s:s+"/")),method:"MKCOL"},e,n);var s;return Qe(F(r,e),function(i){B(e,i)})});var fr=$(388),Le=$.n(fr);const dr=(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(r){return Promise.reject(r)}}})(function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r={};if(typeof n.range=="object"&&typeof n.range.start=="number"){let u=`bytes=${n.range.start}-`;typeof n.range.end=="number"&&(u=`${u}${n.range.end}`),r.Range=u}const s=U({url:k(e.remoteURL,R(t)),method:"GET",headers:r},e,n);return c=function(u){if(B(e,u),r.Range&&u.status!==206){const g=new Error(`Invalid response code for partial request: ${u.status}`);throw g.status=u.status,g}return n.callback&&setTimeout(()=>{n.callback(u)},0),u.body},(i=F(s,e))&&i.then||(i=Promise.resolve(i)),c?i.then(c):i;var i,c}),gr=()=>{},mr=(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(r){return Promise.reject(r)}}})(function(e,t,n){n.url||(n.url=k(e.remoteURL,R(t)));const r=U(n,e,{});return i=function(c){return B(e,c),c},(s=F(r,e))&&s.then||(s=Promise.resolve(s)),i?s.then(i):s;var s,i}),vr=(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(r){return Promise.reject(r)}}})(function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=U({url:k(e.remoteURL,R(t)),method:"DELETE"},e,n);return i=function(c){B(e,c)},(s=F(r,e))&&s.then||(s=Promise.resolve(s)),i?s.then(i):s;var s,i}),yr=(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(r){return Promise.reject(r)}}})(function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function(r,s){try{var i=(c=se(e,t,n),u=function(){return!0},g?u?u(c):c:(c&&c.then||(c=Promise.resolve(c)),u?c.then(u):c))}catch(l){return s(l)}var c,u,g;return i&&i.then?i.then(void 0,s):i})(0,function(r){if(r.status===404)return!1;throw r})});function Vt(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const wr=(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(r){return Promise.reject(r)}}})(function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=U({url:k(e.remoteURL,R(t),"/"),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:n.deep?"infinity":"1"}},e,n);return Vt(F(r,e),function(s){return B(e,s),Vt(s.text(),function(i){if(!i)throw new Error("Failed parsing directory contents: Empty response");return Vt(vt(i),function(c){const u=xe(t);let g=(function(l,o,h){let a=arguments.length>3&&arguments[3]!==void 0&&arguments[3],d=arguments.length>4&&arguments[4]!==void 0&&arguments[4];const f=Ot().join(o,"/"),{multistatus:{response:m}}=l,v=m.map(A=>{const p=(function(x){try{return x.replace(/^https?:\/\/[^\/]+/,"")}catch(E){throw new K(E,"Failed normalising HREF")}})(A.href),{propstat:{prop:y}}=A;return Rt(y,f==="/"?decodeURIComponent(mt(p)):mt(Ot().relative(decodeURIComponent(f),decodeURIComponent(p))),a)});return d?v:v.filter(A=>A.basename&&(A.type==="file"||A.filename!==h.replace(/\/$/,"")))})(c,xe(e.remoteBasePath||e.remotePath),u,n.details,n.includeSelf);return n.glob&&(g=(function(l,o){return l.filter(h=>G(h.filename,o,{matchBase:!0}))})(g,n.glob)),ut(s,g,n.details)})})})});function oe(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(r){return Promise.reject(r)}}}const br=oe(function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=U({url:k(e.remoteURL,R(t)),method:"GET",headers:{Accept:"text/plain"},transformResponse:[Er]},e,n);return $t(F(r,e),function(s){return B(e,s),$t(s.text(),function(i){return ut(s,i,n.details)})})});function $t(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const xr=oe(function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=U({url:k(e.remoteURL,R(t)),method:"GET"},e,n);return $t(F(r,e),function(s){let i;return B(e,s),(function(c,u){var g=c();return g&&g.then?g.then(u):u()})(function(){return $t(s.arrayBuffer(),function(c){i=c})},function(){return ut(s,i,n.details)})})}),Ar=oe(function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{format:r="binary"}=n;if(r!=="binary"&&r!=="text")throw new K({info:{code:st.InvalidOutputFormat}},`Invalid output format: ${r}`);return r==="text"?br(e,t,n):xr(e,t,n)}),Er=e=>e;function Nr(e){return new re.XMLBuilder({attributeNamePrefix:"@_",format:!0,ignoreAttributes:!1,suppressEmptyNode:!0}).build(en({lockinfo:{"@_xmlns:d":"DAV:",lockscope:{exclusive:{}},locktype:{write:{}},owner:{href:e}}},"d"))}function en(e,t){const n={...e};for(const r in n)n.hasOwnProperty(r)&&(n[r]&&typeof n[r]=="object"&&r.indexOf(":")===-1?(n[`${t}:${r}`]=en(n[r],t),delete n[r]):/^@_/.test(r)===!1&&(n[`${t}:${r}`]=n[r],delete n[r]));return n}function Yt(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function nn(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(r){return Promise.reject(r)}}}const Pr=nn(function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=U({url:k(e.remoteURL,R(t)),method:"UNLOCK",headers:{"Lock-Token":n}},e,r);return Yt(F(s,e),function(i){if(B(e,i),i.status!==204&&i.status!==200)throw ne(i)})}),Or=nn(function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{refreshToken:r,timeout:s=Tr}=n,i={Accept:"text/plain,application/xml",Timeout:s};r&&(i.If=r);const c=U({url:k(e.remoteURL,R(t)),method:"LOCK",headers:i,data:Nr(e.contactHref)},e,n);return Yt(F(c,e),function(u){return B(e,u),Yt(u.text(),function(g){const l=(a=g,new re.XMLParser({removeNSPrefix:!0,parseAttributeValue:!0,parseTagValue:!0}).parse(a)),o=rt().get(l,"prop.lockdiscovery.activelock.locktoken.href"),h=rt().get(l,"prop.lockdiscovery.activelock.timeout");var a;if(!o)throw ne(u,"No lock token received: ");return{token:o,serverTimeout:h}})})}),Tr="Infinite, Second-4100000000";function zt(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const jr=(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(r){return Promise.reject(r)}}})(function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=t.path||"/",r=U({url:k(e.remoteURL,n),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},e,t);return zt(F(r,e),function(s){return B(e,s),zt(s.text(),function(i){return zt(vt(i),function(c){const u=(function(g){try{const[l]=g.multistatus.response,{propstat:{prop:{"quota-used-bytes":o,"quota-available-bytes":h}}}=l;return o!==void 0&&h!==void 0?{used:parseInt(String(o),10),available:Ze(h)}:null}catch{}return null})(c);return ut(s,u,t.details)})})})});function Wt(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const Sr=(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(r){return Promise.reject(r)}}})(function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{details:r=!1}=n,s=U({url:k(e.remoteURL,R(t)),method:"SEARCH",headers:{Accept:"text/plain,application/xml","Content-Type":e.headers["Content-Type"]||"application/xml; charset=utf-8"}},e,n);return Wt(F(s,e),function(i){return B(e,i),Wt(i.text(),function(c){return Wt(vt(c),function(u){const g=(function(l,o,h){const a={truncated:!1,results:[]};return a.truncated=l.multistatus.response.some(d=>(d.status||d.propstat?.status).split(" ",3)?.[1]==="507"&&d.href.replace(/\/$/,"").endsWith(R(o).replace(/\/$/,""))),l.multistatus.response.forEach(d=>{if(d.propstat===void 0)return;const f=d.href.split("/").map(decodeURIComponent).join("/");a.results.push(Rt(d.propstat.prop,f,h))}),a})(u,t,r);return ut(i,g,r)})})})}),Cr=(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(r){return Promise.reject(r)}}})(function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=U({url:k(e.remoteURL,R(t)),method:"MOVE",headers:{Destination:k(e.remoteURL,R(n)),Overwrite:r.overwrite===!1?"F":"T"}},e,r);return c=function(u){B(e,u)},(i=F(s,e))&&i.then||(i=Promise.resolve(i)),c?i.then(c):i;var i,c});var _r=$(172);const $r=(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(r){return Promise.reject(r)}}})(function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const{contentLength:s=!0,overwrite:i=!0}=r,c={"Content-Type":"application/octet-stream"};s===!1||(c["Content-Length"]=typeof s=="number"?`${s}`:`${(function(o){if(We(o))return o.byteLength;if(qe(o))return o.length;if(typeof o=="string")return(0,_r.d)(o);throw new K({info:{code:st.DataTypeNoLength}},"Cannot calculate data length: Invalid type")})(n)}`),i||(c["If-None-Match"]="*");const u=U({url:k(e.remoteURL,R(t)),method:"PUT",headers:c,data:n},e,r);return l=function(o){try{B(e,o)}catch(h){const a=h;if(a.status!==412||i)throw a;return!1}return!0},(g=F(u,e))&&g.then||(g=Promise.resolve(g)),l?g.then(l):g;var g,l}),rn=(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(r){return Promise.reject(r)}}})(function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=U({url:k(e.remoteURL,R(t)),method:"OPTIONS"},e,n);return i=function(c){try{B(e,c)}catch(u){throw u}return{compliance:(c.headers.get("DAV")??"").split(",").map(u=>u.trim()),server:c.headers.get("Server")??""}},(s=F(r,e))&&s.then||(s=Promise.resolve(s)),i?s.then(i):s;var s,i});function gt(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const Ir=ie(function(e,t,n,r,s){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(n>r||n<0)throw new K({info:{code:st.InvalidUpdateRange}},`Invalid update range ${n} for partial update`);const c={"Content-Type":"application/octet-stream","Content-Length":""+(r-n+1),"Content-Range":`bytes ${n}-${r}/*`},u=U({url:k(e.remoteURL,R(t)),method:"PUT",headers:c,data:s},e,i);return gt(F(u,e),function(g){B(e,g)})});function De(e,t){var n=e();return n&&n.then?n.then(t):t(n)}const Rr=ie(function(e,t,n,r,s){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(n>r||n<0)throw new K({info:{code:st.InvalidUpdateRange}},`Invalid update range ${n} for partial update`);const c={"Content-Type":"application/x-sabredav-partialupdate","Content-Length":""+(r-n+1),"X-Update-Range":`bytes=${n}-${r}`},u=U({url:k(e.remoteURL,R(t)),method:"PATCH",headers:c,data:s},e,i);return gt(F(u,e),function(g){B(e,g)})});function ie(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(r){return Promise.reject(r)}}}const kr=ie(function(e,t,n,r,s){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};return gt(rn(e,t,i),function(c){let u=!1;return De(function(){if(c.compliance.includes("sabredav-partialupdate"))return gt(Rr(e,t,n,r,s,i),function(g){return u=!0,g})},function(g){let l=!1;return u?g:De(function(){if(c.server.includes("Apache")&&c.compliance.includes("<http://apache.org/dav/propset/fs/1>"))return gt(Ir(e,t,n,r,s,i),function(o){return l=!0,o})},function(o){if(l)return o;throw new K({info:{code:st.NotSupported}},"Not supported")})})})}),Lr="https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";function Dr(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{authType:n=null,remoteBasePath:r,contactHref:s=Lr,ha1:i,headers:c={},httpAgent:u,httpsAgent:g,password:l,token:o,username:h,withCredentials:a}=t;let d=n;d||(d=h||l?X.Password:X.None);const f={authType:d,remoteBasePath:r,contactHref:s,ha1:i,headers:Object.assign({},c),httpAgent:u,httpsAgent:g,password:l,remotePath:Pn(e),remoteURL:e,token:o,username:h,withCredentials:a};return Be(f,h,l,o,i),{copyFile:(m,v,A)=>cr(f,m,v,A),createDirectory:(m,v)=>Xt(f,m,v),createReadStream:(m,v)=>(function(A,p){let y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const x=new(Le()).PassThrough;return dr(A,p,y).then(E=>{E.pipe(x)}).catch(E=>{x.emit("error",E)}),x})(f,m,v),createWriteStream:(m,v,A)=>(function(p,y){let x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},E=arguments.length>3&&arguments[3]!==void 0?arguments[3]:gr;const w=new(Le()).PassThrough,P={};x.overwrite===!1&&(P["If-None-Match"]="*");const b=U({url:k(p.remoteURL,R(y)),method:"PUT",headers:P,data:w,maxRedirects:0},p,x);return F(b,p).then(O=>B(p,O)).then(O=>{setTimeout(()=>{E(O)},0)}).catch(O=>{w.emit("error",O)}),w})(f,m,v,A),customRequest:(m,v)=>mr(f,m,v),deleteFile:(m,v)=>vr(f,m,v),exists:(m,v)=>yr(f,m,v),getDirectoryContents:(m,v)=>wr(f,m,v),getFileContents:(m,v)=>Ar(f,m,v),getFileDownloadLink:m=>(function(v,A){let p=k(v.remoteURL,R(A));const y=/^https:/i.test(p)?"https":"http";switch(v.authType){case X.None:break;case X.Password:{const x=Ee(v.headers.Authorization.replace(/^Basic /i,"").trim());p=p.replace(/^https?:\/\//,`${y}://${x}@`);break}default:throw new K({info:{code:st.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${v.authType}`)}return p})(f,m),getFileUploadLink:m=>(function(v,A){let p=`${k(v.remoteURL,R(A))}?Content-Type=application/octet-stream`;const y=/^https:/i.test(p)?"https":"http";switch(v.authType){case X.None:break;case X.Password:{const x=Ee(v.headers.Authorization.replace(/^Basic /i,"").trim());p=p.replace(/^https?:\/\//,`${y}://${x}@`);break}default:throw new K({info:{code:st.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${v.authType}`)}return p})(f,m),getHeaders:()=>Object.assign({},f.headers),getQuota:m=>jr(f,m),lock:(m,v)=>Or(f,m,v),moveFile:(m,v,A)=>Cr(f,m,v,A),putFileContents:(m,v,A)=>$r(f,m,v,A),partialUpdateFileContents:(m,v,A,p,y)=>kr(f,m,v,A,p,y),getDAVCompliance:m=>rn(f,m),search:(m,v)=>Sr(f,m,v),setHeaders:m=>{f.headers=Object.assign({},m)},stat:(m,v)=>se(f,m,v),unlock:(m,v,A)=>Pr(f,m,v,A)}}tt.hT,tt.O4,tt.Kd,tt.YK;var Mr=tt.UU,Fr=tt.Gu;tt.ky,tt.h4,tt.ch,tt.hq,tt.i5;function Ur(e){return e&&e.split("/").map(encodeURIComponent).join("/")}function sn(e,t){return e=e.replace(/\\/g,"/").replace(/\/+$/g,"").replace(/.*\//,""),e}function At(e){e=e.replaceAll(/\\/g,"/");const t=e.split("/");return t.length<=1?".":(t.pop(),t.length===1&&t[0]===""?"/":t.join("/"))}function Br(e){const t=sn(e),n=t.lastIndexOf(".");return n>0?t.substring(n):""}function Vr(...e){if(arguments.length<1)return"";const t=e.filter(g=>g.length>0);if(t.length<1)return"";const n=t[t.length-1],r=t[0].charAt(0)==="/",s=n.charAt(n.length-1)==="/",i=t.reduce((g,l)=>g.concat(l.split("/")),[]);let c=!r;const u=i.reduce((g,l)=>l===""?g:c?(c=!1,g+l):g+"/"+l,"");return s?u+"/":u}const Pt=pn().setApp("@f7cloud/files").detectUser().build();var ae=(e=>(e.Folder="folder",e.File="file",e))(ae||{}),et=(e=>(e[e.NONE=0]="NONE",e[e.CREATE=4]="CREATE",e[e.READ=1]="READ",e[e.UPDATE=2]="UPDATE",e[e.DELETE=8]="DELETE",e[e.SHARE=16]="SHARE",e[e.ALL=31]="ALL",e))(et||{});const on=function(e,t){return e.match(t)!==null},ot=(e,t)=>{if(e.id&&typeof e.id!="number")throw new Error("Invalid id type of value");if(!e.source)throw new Error("Missing mandatory source");try{new URL(e.source)}catch{throw new Error("Invalid source format, source must be a valid URL")}if(!e.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(e.displayname&&typeof e.displayname!="string")throw new Error("Invalid displayname type");if(e.mtime&&!(e.mtime instanceof Date))throw new Error("Invalid mtime type");if(e.crtime&&!(e.crtime instanceof Date))throw new Error("Invalid crtime type");if(!e.mime||typeof e.mime!="string"||!e.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in e&&typeof e.size!="number"&&e.size!==void 0)throw new Error("Invalid size type");if("permissions"in e&&e.permissions!==void 0&&!(typeof e.permissions=="number"&&e.permissions>=et.NONE&&e.permissions<=et.ALL))throw new Error("Invalid permissions");if(e.owner&&e.owner!==null&&typeof e.owner!="string")throw new Error("Invalid owner type");if(e.attributes&&typeof e.attributes!="object")throw new Error("Invalid attributes type");if(e.root&&typeof e.root!="string")throw new Error("Invalid root type");if(e.root&&!e.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(e.root&&!e.source.includes(e.root))throw new Error("Root must be part of the source");if(e.root&&on(e.source,t)){const n=e.source.match(t)[0];if(!e.source.includes(Vr(n,e.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(e.status&&!Object.values(ue).includes(e.status))throw new Error("Status must be a valid NodeStatus")};var ue=(e=>(e.NEW="new",e.FAILED="failed",e.LOADING="loading",e.LOCKED="locked",e))(ue||{});class kt{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;readonlyAttributes=Object.entries(Object.getOwnPropertyDescriptors(kt.prototype)).filter(t=>typeof t[1].get=="function"&&t[0]!=="__proto__").map(t=>t[0]);handler={set:(t,n,r)=>this.readonlyAttributes.includes(n)?!1:Reflect.set(t,n,r),deleteProperty:(t,n)=>this.readonlyAttributes.includes(n)?!1:Reflect.deleteProperty(t,n),get:(t,n,r)=>this.readonlyAttributes.includes(n)?(Pt.warn(`Accessing "Node.attributes.${n}" is deprecated, access it directly on the Node instance.`),Reflect.get(this,n)):Reflect.get(t,n,r)};constructor(t,n){t.mime||(t.mime="application/octet-stream"),ot(t,n||this._knownDavService),this._data={displayname:t.attributes?.displayname,...t,attributes:{}},this._attributes=new Proxy(this._data.attributes,this.handler),this.update(t.attributes??{}),n&&(this._knownDavService=n)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:t}=new URL(this.source);return t+Ur(this.source.slice(t.length))}get basename(){return sn(this.source)}get displayname(){return this._data.displayname||this.basename}set displayname(t){ot({...this._data,displayname:t},this._knownDavService),this._data.displayname=t}get extension(){return Br(this.source)}get dirname(){if(this.root){let n=this.source;this.isDavResource&&(n=n.split(this._knownDavService).pop());const r=n.indexOf(this.root),s=this.root.replace(/\/$/,"");return At(n.slice(r+s.length)||"/")}const t=new URL(this.source);return At(t.pathname)}get mime(){return this._data.mime||"application/octet-stream"}set mime(t){t??="application/octet-stream",ot({...this._data,mime:t},this._knownDavService),this._data.mime=t}get mtime(){return this._data.mtime}set mtime(t){ot({...this._data,mtime:t},this._knownDavService),this._data.mtime=t}get crtime(){return this._data.crtime}get size(){return this._data.size}set size(t){ot({...this._data,size:t},this._knownDavService),this.updateMtime(),this._data.size=t}get attributes(){return this._attributes}get permissions(){return this.owner===null&&!this.isDavResource?et.READ:this._data.permissions!==void 0?this._data.permissions:et.NONE}set permissions(t){ot({...this._data,permissions:t},this._knownDavService),this.updateMtime(),this._data.permissions=t}get owner(){return this.isDavResource?this._data.owner:null}get isDavResource(){return on(this.source,this._knownDavService)}get isDavRessource(){return this.isDavResource}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavResource&&At(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){let t=this.source;this.isDavResource&&(t=t.split(this._knownDavService).pop());const n=t.indexOf(this.root),r=this.root.replace(/\/$/,"");return t.slice(n+r.length)||"/"}return(this.dirname+"/"+this.basename).replace(/\/\//g,"/")}get fileid(){return this._data?.id}get status(){return this._data?.status}set status(t){ot({...this._data,status:t},this._knownDavService),this._data.status=t}get data(){return structuredClone(this._data)}move(t){ot({...this._data,source:t},this._knownDavService);const n=this.basename;this._data.source=t,this.displayname===n&&this.basename!==n&&(this.displayname=this.basename)}rename(t){if(t.includes("/"))throw new Error("Invalid basename");this.move(At(this.source)+"/"+t)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}update(t){for(const[n,r]of Object.entries(t))try{r===void 0?delete this.attributes[n]:this.attributes[n]=r}catch(s){if(s instanceof TypeError)continue;throw s}}}class ce extends kt{get type(){return ae.File}clone(){return new ce(this.data)}}class le extends kt{constructor(t){super({...t,mime:"httpd/unix-directory"})}get type(){return ae.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}clone(){return new le(this.data)}}const zr=function(e=""){let t=et.NONE;return e&&((e.includes("C")||e.includes("K"))&&(t|=et.CREATE),e.includes("G")&&(t|=et.READ),(e.includes("W")||e.includes("N")||e.includes("V"))&&(t|=et.UPDATE),e.includes("D")&&(t|=et.DELETE),e.includes("R")&&(t|=et.SHARE)),t},an=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:creationdate","d:displayname","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:size"],un={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"},Zr=function(e,t={nc:"http://nextcloud.org/ns"}){typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...an],window._nc_dav_namespaces={...un});const n={...window._nc_dav_namespaces,...t};if(window._nc_dav_properties.find(s=>s===e))return Pt.warn(`${e} already registered`,{prop:e}),!1;if(e.startsWith("<")||e.split(":").length!==2)return Pt.error(`${e} is not valid. See example: 'oc:fileid'`,{prop:e}),!1;const r=e.split(":")[0];return n[r]?(window._nc_dav_properties.push(e),window._nc_dav_namespaces=n,!0):(Pt.error(`${e} namespace unknown`,{prop:e,namespaces:n}),!1)},he=function(){return typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...an]),window._nc_dav_properties.map(e=>`<${e} />`).join(" ")},pe=function(){return typeof window._nc_dav_namespaces>"u"&&(window._nc_dav_namespaces={...un}),Object.keys(window._nc_dav_namespaces).map(e=>`xmlns:${e}="${window._nc_dav_namespaces?.[e]}"`).join(" ")},Qr=function(){return`<?xml version="1.0"?>
<d:propfind ${pe()}>
<d:prop>
${he()}
</d:prop>
</d:propfind>`},Wr=function(){return`<?xml version="1.0"?>
<oc:filter-files ${pe()}>
<d:prop>
${he()}
</d:prop>
<oc:filter-rules>
<oc:favorite>1</oc:favorite>
</oc:filter-rules>
</oc:filter-files>`},ts=function(e){return`<?xml version="1.0" encoding="UTF-8"?>
<d:searchrequest ${pe()}
xmlns:ns="https://github.com/icewind1991/SearchDAV/ns">
<d:basicsearch>
<d:select>
<d:prop>
${he()}
</d:prop>
</d:select>
<d:from>
<d:scope>
<d:href>/files/${Kt()?.uid}/</d:href>
<d:depth>infinity</d:depth>
</d:scope>
</d:from>
<d:where>
<d:and>
<d:or>
<d:not>
<d:eq>
<d:prop>
<d:getcontenttype/>
</d:prop>
<d:literal>httpd/unix-directory</d:literal>
</d:eq>
</d:not>
<d:eq>
<d:prop>
<oc:size/>
</d:prop>
<d:literal>0</d:literal>
</d:eq>
</d:or>
<d:gt>
<d:prop>
<d:getlastmodified/>
</d:prop>
<d:literal>${e}</d:literal>
</d:gt>
</d:and>
</d:where>
<d:orderby>
<d:order>
<d:prop>
<d:getlastmodified/>
</d:prop>
<d:descending/>
</d:order>
</d:orderby>
<d:limit>
<d:nresults>100</d:nresults>
<ns:firstresult>0</ns:firstresult>
</d:limit>
</d:basicsearch>
</d:searchrequest>`};function qr(){return Jt()?`/files/${gn()}`:`/files/${Kt()?.uid}`}const cn=qr();function Gr(){const e=mn("dav");return Jt()?e.replace("remote.php","public.php"):e}const ln=Gr(),es=function(e=ln,t={}){const n=Mr(e,{headers:t});function r(s){n.setHeaders({...t,"X-Requested-With":"XMLHttpRequest",requesttoken:s??""})}return dn(r),r(fn()),Fr().patch("fetch",(s,i)=>{const c=i.headers;return c?.method&&(i.method=c.method,delete c.method),fetch(s,i)}),n},ns=(e,t="/",n=cn)=>{const r=new AbortController;return new nt(async(s,i,c)=>{c(()=>r.abort());try{const u=(await e.getDirectoryContents(`${n}${t}`,{signal:r.signal,details:!0,data:Wr(),headers:{method:"REPORT"},includeSelf:!0})).data.filter(g=>g.filename!==t).map(g=>Hr(g,n));s(u)}catch(u){i(u)}})},Hr=function(e,t=cn,n=ln){let r=Kt()?.uid;if(Jt())r=r??"anonymous";else if(!r)throw new Error("No user id found");const s=e.props,i=zr(s?.permissions),c=String(s?.["owner-id"]||r),u=s.fileid||0,g=new Date(Date.parse(e.lastmod)),l=new Date(Date.parse(s.creationdate)),o={id:u,source:`${n}${e.filename}`,mtime:!isNaN(g.getTime())&&g.getTime()!==0?g:void 0,crtime:!isNaN(l.getTime())&&l.getTime()!==0?l:void 0,mime:e.mime||"application/octet-stream",displayname:s.displayname!==void 0?String(s.displayname):void 0,size:s?.size||Number.parseInt(s.getcontentlength||"0"),status:u<0?ue.FAILED:void 0,permissions:i,owner:c,root:t,attributes:{...e,...s,hasPreview:s?.["has-preview"]}};return delete o.attributes?.props,e.type==="file"?new ce(o):new le(o)};export{nt as C,ce as F,et as P,qr as a,ae as b,ns as c,cn as d,ts as e,Hr as f,es as g,Qr as h,Pt as l,Zr as r};
//# sourceMappingURL=dav-Rt1kTtvI-PDCKXEjH.chunk.mjs.map