Files
nextcloud-server/dist/index-BDmvh1Np.chunk.mjs
nextcloud-command 78098c8325 chore(assets): Recompile assets
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2026-04-01 13:41:02 +00:00

12 lines
103 KiB
JavaScript

import{v as wt}from"./index-Bp9-GhMo.chunk.mjs";import{ai as vt}from"./preload-helper-DoJVKVMq.chunk.mjs";var jt={},tn={2:n=>{function t(s,o,i){s instanceof RegExp&&(s=e(s,i)),o instanceof RegExp&&(o=e(o,i));var a=r(s,o,i);return a&&{start:a[0],end:a[1],pre:i.slice(0,a[0]),body:i.slice(a[0]+s.length,a[1]),post:i.slice(a[1]+o.length)}}function e(s,o){var i=o.match(s);return i?i[0]:null}function r(s,o,i){var a,l,c,u,f,h=i.indexOf(s),d=i.indexOf(o,h+1),g=h;if(h>=0&&d>0){for(a=[],c=i.length;g>=0&&!f;)g==h?(a.push(g),h=i.indexOf(s,g+1)):a.length==1?f=[a.pop(),d]:((l=a.pop())<c&&(c=l,u=d),d=i.indexOf(o,g+1)),g=h<d&&h>=0?h:d;a.length&&(f=[c,u])}return f}n.exports=t,t.range=r},47:(n,t,e)=>{var r=e(410),s=function(c){return typeof c=="string"};function o(c,u){for(var f=[],h=0;h<c.length;h++){var d=c[h];d&&d!=="."&&(d===".."?f.length&&f[f.length-1]!==".."?f.pop():u&&f.push(".."):f.push(d))}return f}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,a={};function l(c){return i.exec(c).slice(1)}a.resolve=function(){for(var c="",u=!1,f=arguments.length-1;f>=-1&&!u;f--){var h=f>=0?arguments[f]:wt.cwd();if(!s(h))throw new TypeError("Arguments to path.resolve must be strings");h&&(c=h+"/"+c,u=h.charAt(0)==="/")}return(u?"/":"")+(c=o(c.split("/"),!u).join("/"))||"."},a.normalize=function(c){var u=a.isAbsolute(c),f=c.substr(-1)==="/";return(c=o(c.split("/"),!u).join("/"))||u||(c="."),c&&f&&(c+="/"),(u?"/":"")+c},a.isAbsolute=function(c){return c.charAt(0)==="/"},a.join=function(){for(var c="",u=0;u<arguments.length;u++){var f=arguments[u];if(!s(f))throw new TypeError("Arguments to path.join must be strings");f&&(c+=c?"/"+f:f)}return a.normalize(c)},a.relative=function(c,u){function f(y){for(var b=0;b<y.length&&y[b]==="";b++);for(var w=y.length-1;w>=0&&y[w]==="";w--);return b>w?[]:y.slice(b,w+1)}c=a.resolve(c).substr(1),u=a.resolve(u).substr(1);for(var h=f(c.split("/")),d=f(u.split("/")),g=Math.min(h.length,d.length),p=g,m=0;m<g;m++)if(h[m]!==d[m]){p=m;break}var v=[];for(m=p;m<h.length;m++)v.push("..");return(v=v.concat(d.slice(p))).join("/")},a._makeLong=function(c){return c},a.dirname=function(c){var u=l(c),f=u[0],h=u[1];return f||h?(h&&(h=h.substr(0,h.length-1)),f+h):"."},a.basename=function(c,u){var f=l(c)[2];return u&&f.substr(-1*u.length)===u&&(f=f.substr(0,f.length-u.length)),f},a.extname=function(c){return l(c)[3]},a.format=function(c){if(!r.isObject(c))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof c);var u=c.root||"";if(!s(u))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof c.root);return(c.dir?c.dir+a.sep:"")+(c.base||"")},a.parse=function(c){if(!s(c))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof c);var u=l(c);if(!u||u.length!==4)throw new TypeError("Invalid path '"+c+"'");return u[1]=u[1]||"",u[2]=u[2]||"",u[3]=u[3]||"",{root:u[0],dir:u[0]+u[1].slice(0,u[1].length-1),base:u[2],ext:u[3],name:u[2].slice(0,u[2].length-u[3].length)}},a.sep="/",a.delimiter=":",n.exports=a},101:function(n,t,e){var r;n=e.nmd(n),(function(){var s=(n&&n.exports,typeof vt=="object"&&vt);s.global!==s&&s.window;var o=function(u){this.message=u};(o.prototype=new Error).name="InvalidCharacterError";var i=function(u){throw new o(u)},a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=/[\t\n\f\r ]/g,c={encode:function(u){u=String(u),/[^\0-\xFF]/.test(u)&&i("The string to be encoded contains characters outside of the Latin1 range.");for(var f,h,d,g,p=u.length%3,m="",v=-1,y=u.length-p;++v<y;)f=u.charCodeAt(v)<<16,h=u.charCodeAt(++v)<<8,d=u.charCodeAt(++v),m+=a.charAt((g=f+h+d)>>18&63)+a.charAt(g>>12&63)+a.charAt(g>>6&63)+a.charAt(63&g);return p==2?(f=u.charCodeAt(v)<<8,h=u.charCodeAt(++v),m+=a.charAt((g=f+h)>>10)+a.charAt(g>>4&63)+a.charAt(g<<2&63)+"="):p==1&&(g=u.charCodeAt(v),m+=a.charAt(g>>2)+a.charAt(g<<4&63)+"=="),m},decode:function(u){var f=(u=String(u).replace(l,"")).length;f%4==0&&(f=(u=u.replace(/==?$/,"")).length),(f%4==1||/[^+a-zA-Z0-9/]/.test(u))&&i("Invalid character: the string to be decoded is not correctly encoded.");for(var h,d,g=0,p="",m=-1;++m<f;)d=a.indexOf(u.charAt(m)),h=g%4?64*h+d:d,g++%4&&(p+=String.fromCharCode(255&h>>(-2*g&6)));return p},version:"1.0.0"};(r=function(){return c}.call(t,e,t,n))===void 0||(n.exports=r)})()},135:n=>{function t(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}n.exports=function(e){return e!=null&&(t(e)||(function(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&t(r.slice(0,0))})(e)||!!e._isBuffer)}},172:(n,t)=>{t.d=function(e){if(!e)return 0;for(var r=(e=e.toString()).length,s=e.length;s--;){var o=e.charCodeAt(s);56320<=o&&o<=57343&&s--,127<o&&o<=2047?r++:2047<o&&o<=65535&&(r+=2)}return r}},285:(n,t,e)=>{var r=e(2);n.exports=function(v){return v?(v.substr(0,2)==="{}"&&(v="\\{\\}"+v.substr(2)),m((function(y){return y.split("\\\\").join(s).split("\\{").join(o).split("\\}").join(i).split("\\,").join(a).split("\\.").join(l)})(v),!0).map(u)):[]};var s="\0SLASH"+Math.random()+"\0",o="\0OPEN"+Math.random()+"\0",i="\0CLOSE"+Math.random()+"\0",a="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function c(v){return parseInt(v,10)==v?parseInt(v,10):v.charCodeAt(0)}function u(v){return v.split(s).join("\\").split(o).join("{").split(i).join("}").split(a).join(",").split(l).join(".")}function f(v){if(!v)return[""];var y=[],b=r("{","}",v);if(!b)return v.split(",");var w=b.pre,x=b.body,N=b.post,P=w.split(",");P[P.length-1]+="{"+x+"}";var O=f(N);return N.length&&(P[P.length-1]+=O.shift(),P.push.apply(P,O)),y.push.apply(y,P),y}function h(v){return"{"+v+"}"}function d(v){return/^-?0\d/.test(v)}function g(v,y){return v<=y}function p(v,y){return v>=y}function m(v,y){var b=[],w=r("{","}",v);if(!w)return[v];var x=w.pre,N=w.post.length?m(w.post,!1):[""];if(/\$$/.test(w.pre))for(var P=0;P<N.length;P++){var O=x+"{"+w.body+"}"+N[P];b.push(O)}else{var A,R,st=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(w.body),ot=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(w.body),E=st||ot,it=w.body.indexOf(",")>=0;if(!E&&!it)return w.post.match(/,(?!,).*\}/)?m(v=w.pre+"{"+w.body+i+w.post):[v];if(E)A=w.body.split(/\.\./);else if((A=f(w.body)).length===1&&(A=m(A[0],!1).map(h)).length===1)return N.map((function(Ke){return w.pre+A[0]+Ke}));if(E){var at=c(A[0]),ut=c(A[1]),W=Math.max(A[0].length,A[1].length),q=A.length==3?Math.abs(c(A[2])):1,lt=g;ut<at&&(q*=-1,lt=p);var yt=A.some(d);R=[];for(var G=at;lt(G,ut);G+=q){var Y;if(ot)(Y=String.fromCharCode(G))==="\\"&&(Y="");else if(Y=String(G),yt){var Kt=W-Y.length;if(Kt>0){var te=new Array(Kt+1).join("0");Y=G<0?"-"+te+Y.slice(1):te+Y}}R.push(Y)}}else{R=[];for(var J=0;J<A.length;J++)R.push.apply(R,m(A[J],!1))}for(J=0;J<R.length;J++)for(P=0;P<N.length;P++)O=x+R[J]+N[P],(!y||E||O)&&b.push(O)}return b}},298:n=>{var t,e;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e={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&e.rotl(r,8)|4278255360&e.rotl(r,24);for(var s=0;s<r.length;s++)r[s]=e.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=[],o=0,i=0;o<r.length;o++,i+=8)s[i>>>5]|=r[o]<<24-i%32;return s},wordsToBytes:function(r){for(var s=[],o=0;o<32*r.length;o+=8)s.push(r[o>>>5]>>>24-o%32&255);return s},bytesToHex:function(r){for(var s=[],o=0;o<r.length;o++)s.push((r[o]>>>4).toString(16)),s.push((15&r[o]).toString(16));return s.join("")},hexToBytes:function(r){for(var s=[],o=0;o<r.length;o+=2)s.push(parseInt(r.substr(o,2),16));return s},bytesToBase64:function(r){for(var s=[],o=0;o<r.length;o+=3)for(var i=r[o]<<16|r[o+1]<<8|r[o+2],a=0;a<4;a++)8*o+6*a<=8*r.length?s.push(t.charAt(i>>>6*(3-a)&63)):s.push("=");return s.join("")},base64ToBytes:function(r){r=r.replace(/[^A-Z0-9+\/]/gi,"");for(var s=[],o=0,i=0;o<r.length;i=++o%4)i!=0&&s.push((t.indexOf(r.charAt(o-1))&Math.pow(2,-2*i+8)-1)<<2*i|t.indexOf(r.charAt(o))>>>6-2*i);return s}},n.exports=e},345:()=>{},388:()=>{},410:()=>{},526:n=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var r=[],s=0;s<e.length;s++)r.push(255&e.charCodeAt(s));return r},bytesToString:function(e){for(var r=[],s=0;s<e.length;s++)r.push(String.fromCharCode(e[s]));return r.join("")}}};n.exports=t},542:(n,t,e)=>{(function(){var r=e(298),s=e(526).utf8,o=e(135),i=e(526).bin,a=function(l,c){l.constructor==String?l=c&&c.encoding==="binary"?i.stringToBytes(l):s.stringToBytes(l):o(l)?l=Array.prototype.slice.call(l,0):Array.isArray(l)||l.constructor===Uint8Array||(l=l.toString());for(var u=r.bytesToWords(l),f=8*l.length,h=1732584193,d=-271733879,g=-1732584194,p=271733878,m=0;m<u.length;m++)u[m]=16711935&(u[m]<<8|u[m]>>>24)|4278255360&(u[m]<<24|u[m]>>>8);u[f>>>5]|=128<<f%32,u[14+(f+64>>>9<<4)]=f;var v=a._ff,y=a._gg,b=a._hh,w=a._ii;for(m=0;m<u.length;m+=16){var x=h,N=d,P=g,O=p;h=v(h,d,g,p,u[m+0],7,-680876936),p=v(p,h,d,g,u[m+1],12,-389564586),g=v(g,p,h,d,u[m+2],17,606105819),d=v(d,g,p,h,u[m+3],22,-1044525330),h=v(h,d,g,p,u[m+4],7,-176418897),p=v(p,h,d,g,u[m+5],12,1200080426),g=v(g,p,h,d,u[m+6],17,-1473231341),d=v(d,g,p,h,u[m+7],22,-45705983),h=v(h,d,g,p,u[m+8],7,1770035416),p=v(p,h,d,g,u[m+9],12,-1958414417),g=v(g,p,h,d,u[m+10],17,-42063),d=v(d,g,p,h,u[m+11],22,-1990404162),h=v(h,d,g,p,u[m+12],7,1804603682),p=v(p,h,d,g,u[m+13],12,-40341101),g=v(g,p,h,d,u[m+14],17,-1502002290),h=y(h,d=v(d,g,p,h,u[m+15],22,1236535329),g,p,u[m+1],5,-165796510),p=y(p,h,d,g,u[m+6],9,-1069501632),g=y(g,p,h,d,u[m+11],14,643717713),d=y(d,g,p,h,u[m+0],20,-373897302),h=y(h,d,g,p,u[m+5],5,-701558691),p=y(p,h,d,g,u[m+10],9,38016083),g=y(g,p,h,d,u[m+15],14,-660478335),d=y(d,g,p,h,u[m+4],20,-405537848),h=y(h,d,g,p,u[m+9],5,568446438),p=y(p,h,d,g,u[m+14],9,-1019803690),g=y(g,p,h,d,u[m+3],14,-187363961),d=y(d,g,p,h,u[m+8],20,1163531501),h=y(h,d,g,p,u[m+13],5,-1444681467),p=y(p,h,d,g,u[m+2],9,-51403784),g=y(g,p,h,d,u[m+7],14,1735328473),h=b(h,d=y(d,g,p,h,u[m+12],20,-1926607734),g,p,u[m+5],4,-378558),p=b(p,h,d,g,u[m+8],11,-2022574463),g=b(g,p,h,d,u[m+11],16,1839030562),d=b(d,g,p,h,u[m+14],23,-35309556),h=b(h,d,g,p,u[m+1],4,-1530992060),p=b(p,h,d,g,u[m+4],11,1272893353),g=b(g,p,h,d,u[m+7],16,-155497632),d=b(d,g,p,h,u[m+10],23,-1094730640),h=b(h,d,g,p,u[m+13],4,681279174),p=b(p,h,d,g,u[m+0],11,-358537222),g=b(g,p,h,d,u[m+3],16,-722521979),d=b(d,g,p,h,u[m+6],23,76029189),h=b(h,d,g,p,u[m+9],4,-640364487),p=b(p,h,d,g,u[m+12],11,-421815835),g=b(g,p,h,d,u[m+15],16,530742520),h=w(h,d=b(d,g,p,h,u[m+2],23,-995338651),g,p,u[m+0],6,-198630844),p=w(p,h,d,g,u[m+7],10,1126891415),g=w(g,p,h,d,u[m+14],15,-1416354905),d=w(d,g,p,h,u[m+5],21,-57434055),h=w(h,d,g,p,u[m+12],6,1700485571),p=w(p,h,d,g,u[m+3],10,-1894986606),g=w(g,p,h,d,u[m+10],15,-1051523),d=w(d,g,p,h,u[m+1],21,-2054922799),h=w(h,d,g,p,u[m+8],6,1873313359),p=w(p,h,d,g,u[m+15],10,-30611744),g=w(g,p,h,d,u[m+6],15,-1560198380),d=w(d,g,p,h,u[m+13],21,1309151649),h=w(h,d,g,p,u[m+4],6,-145523070),p=w(p,h,d,g,u[m+11],10,-1120210379),g=w(g,p,h,d,u[m+2],15,718787259),d=w(d,g,p,h,u[m+9],21,-343485551),h=h+x>>>0,d=d+N>>>0,g=g+P>>>0,p=p+O>>>0}return r.endian([h,d,g,p])};a._ff=function(l,c,u,f,h,d,g){var p=l+(c&u|~c&f)+(h>>>0)+g;return(p<<d|p>>>32-d)+c},a._gg=function(l,c,u,f,h,d,g){var p=l+(c&f|u&~f)+(h>>>0)+g;return(p<<d|p>>>32-d)+c},a._hh=function(l,c,u,f,h,d,g){var p=l+(c^u^f)+(h>>>0)+g;return(p<<d|p>>>32-d)+c},a._ii=function(l,c,u,f,h,d,g){var p=l+(u^(c|~f))+(h>>>0)+g;return(p<<d|p>>>32-d)+c},a._blocksize=16,a._digestsize=16,n.exports=function(l,c){if(l==null)throw new Error("Illegal argument "+l);var u=r.wordsToBytes(a(l,c));return c&&c.asBytes?u:c&&c.asString?i.bytesToString(u):r.bytesToHex(u)}})()},647:(n,t)=>{var e=Object.prototype.hasOwnProperty;function r(o){try{return decodeURIComponent(o.replace(/\+/g," "))}catch{return null}}function s(o){try{return encodeURIComponent(o)}catch{return null}}t.stringify=function(o,i){i=i||"";var a,l,c=[];for(l in typeof i!="string"&&(i="?"),o)if(e.call(o,l)){if((a=o[l])||a!=null&&!isNaN(a)||(a=""),l=s(l),a=s(a),l===null||a===null)continue;c.push(l+"="+a)}return c.length?i+c.join("&"):""},t.parse=function(o){for(var i,a=/([^=?#&]+)=?([^&]*)/g,l={};i=a.exec(o);){var c=r(i[1]),u=r(i[2]);c===null||u===null||c in l||(l[c]=u)}return l}},670:n=>{n.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){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}},737:(n,t,e)=>{var r=e(670),s=e(647),o=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,i=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,l=/:\d+$/,c=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,u=/^[a-zA-Z]:/;function f(y){return(y||"").toString().replace(o,"")}var h=[["#","hash"],["?","query"],function(y,b){return p(b.protocol)?y.replace(/\\/g,"/"):y},["/","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 g(y){var b,w=(typeof window<"u"?window:typeof vt<"u"?vt:typeof self<"u"?self:{}).location||{},x={},N=typeof(y=y||w);if(y.protocol==="blob:")x=new v(unescape(y.pathname),{});else if(N==="string")for(b in x=new v(y,{}),d)delete x[b];else if(N==="object"){for(b in y)b in d||(x[b]=y[b]);x.slashes===void 0&&(x.slashes=a.test(y.href))}return x}function p(y){return y==="file:"||y==="ftp:"||y==="http:"||y==="https:"||y==="ws:"||y==="wss:"}function m(y,b){y=(y=f(y)).replace(i,""),b=b||{};var w,x=c.exec(y),N=x[1]?x[1].toLowerCase():"",P=!!x[2],O=!!x[3],A=0;return P?O?(w=x[2]+x[3]+x[4],A=x[2].length+x[3].length):(w=x[2]+x[4],A=x[2].length):O?(w=x[3]+x[4],A=x[3].length):w=x[4],N==="file:"?A>=2&&(w=w.slice(2)):p(N)?w=x[4]:N?P&&(w=w.slice(2)):A>=2&&p(b.protocol)&&(w=x[4]),{protocol:N,slashes:P||p(N),slashesCount:A,rest:w}}function v(y,b,w){if(y=(y=f(y)).replace(i,""),!(this instanceof v))return new v(y,b,w);var x,N,P,O,A,R,st=h.slice(),ot=typeof b,E=this,it=0;for(ot!=="object"&&ot!=="string"&&(w=b,b=null),w&&typeof w!="function"&&(w=s.parse),x=!(N=m(y||"",b=g(b))).protocol&&!N.slashes,E.slashes=N.slashes||x&&b.slashes,E.protocol=N.protocol||b.protocol||"",y=N.rest,(N.protocol==="file:"&&(N.slashesCount!==2||u.test(y))||!N.slashes&&(N.protocol||N.slashesCount<2||!p(E.protocol)))&&(st[3]=[/(.*)/,"pathname"]);it<st.length;it++)typeof(O=st[it])!="function"?(P=O[0],R=O[1],P!=P?E[R]=y:typeof P=="string"?~(A=P==="@"?y.lastIndexOf(P):y.indexOf(P))&&(typeof O[2]=="number"?(E[R]=y.slice(0,A),y=y.slice(A+O[2])):(E[R]=y.slice(A),y=y.slice(0,A))):(A=P.exec(y))&&(E[R]=A[1],y=y.slice(0,A.index)),E[R]=E[R]||x&&O[3]&&b[R]||"",O[4]&&(E[R]=E[R].toLowerCase())):y=O(y,E);w&&(E.query=w(E.query)),x&&b.slashes&&E.pathname.charAt(0)!=="/"&&(E.pathname!==""||b.pathname!=="")&&(E.pathname=(function(at,ut){if(at==="")return ut;for(var W=(ut||"/").split("/").slice(0,-1).concat(at.split("/")),q=W.length,lt=W[q-1],yt=!1,G=0;q--;)W[q]==="."?W.splice(q,1):W[q]===".."?(W.splice(q,1),G++):G&&(q===0&&(yt=!0),W.splice(q,1),G--);return yt&&W.unshift(""),lt!=="."&&lt!==".."||W.push(""),W.join("/")})(E.pathname,b.pathname)),E.pathname.charAt(0)!=="/"&&p(E.protocol)&&(E.pathname="/"+E.pathname),r(E.port,E.protocol)||(E.host=E.hostname,E.port=""),E.username=E.password="",E.auth&&(~(A=E.auth.indexOf(":"))?(E.username=E.auth.slice(0,A),E.username=encodeURIComponent(decodeURIComponent(E.username)),E.password=E.auth.slice(A+1),E.password=encodeURIComponent(decodeURIComponent(E.password))):E.username=encodeURIComponent(decodeURIComponent(E.auth)),E.auth=E.password?E.username+":"+E.password:E.username),E.origin=E.protocol!=="file:"&&p(E.protocol)&&E.host?E.protocol+"//"+E.host:"null",E.href=E.toString()}v.prototype={set:function(y,b,w){var x=this;switch(y){case"query":typeof b=="string"&&b.length&&(b=(w||s.parse)(b)),x[y]=b;break;case"port":x[y]=b,r(b,x.protocol)?b&&(x.host=x.hostname+":"+b):(x.host=x.hostname,x[y]="");break;case"hostname":x[y]=b,x.port&&(b+=":"+x.port),x.host=b;break;case"host":x[y]=b,l.test(b)?(b=b.split(":"),x.port=b.pop(),x.hostname=b.join(":")):(x.hostname=b,x.port="");break;case"protocol":x.protocol=b.toLowerCase(),x.slashes=!w;break;case"pathname":case"hash":if(b){var N=y==="pathname"?"/":"#";x[y]=b.charAt(0)!==N?N+b:b}else x[y]=b;break;case"username":case"password":x[y]=encodeURIComponent(b);break;case"auth":var P=b.indexOf(":");~P?(x.username=b.slice(0,P),x.username=encodeURIComponent(decodeURIComponent(x.username)),x.password=b.slice(P+1),x.password=encodeURIComponent(decodeURIComponent(x.password))):x.username=encodeURIComponent(decodeURIComponent(b))}for(var O=0;O<h.length;O++){var A=h[O];A[4]&&(x[A[1]]=x[A[1]].toLowerCase())}return x.auth=x.password?x.username+":"+x.password:x.username,x.origin=x.protocol!=="file:"&&p(x.protocol)&&x.host?x.protocol+"//"+x.host:"null",x.href=x.toString(),x},toString:function(y){y&&typeof y=="function"||(y=s.stringify);var b,w=this,x=w.host,N=w.protocol;N&&N.charAt(N.length-1)!==":"&&(N+=":");var P=N+(w.protocol&&w.slashes||p(w.protocol)?"//":"");return w.username?(P+=w.username,w.password&&(P+=":"+w.password),P+="@"):w.password?(P+=":"+w.password,P+="@"):w.protocol!=="file:"&&p(w.protocol)&&!x&&w.pathname!=="/"&&(P+="@"),(x[x.length-1]===":"||l.test(w.hostname)&&!w.port)&&(x+=":"),P+=x+w.pathname,(b=typeof w.query=="object"?y(w.query):w.query)&&(P+=b.charAt(0)!=="?"?"?"+b:b),w.hash&&(P+=w.hash),P}},v.extractProtocol=m,v.location=g,v.trimLeft=f,v.qs=s,n.exports=v},800:()=>{},805:()=>{},829:n=>{function t(c){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},t(c)}function e(c){var u=typeof Map=="function"?new Map:void 0;return e=function(f){if(f===null||(h=f,Function.toString.call(h).indexOf("[native code]")===-1))return f;var h;if(typeof f!="function")throw new TypeError("Super expression must either be null or a function");if(u!==void 0){if(u.has(f))return u.get(f);u.set(f,d)}function d(){return r(f,arguments,o(this).constructor)}return d.prototype=Object.create(f.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),s(d,f)},e(c)}function r(c,u,f){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(h,d,g){var p=[null];p.push.apply(p,d);var m=new(Function.bind.apply(h,p));return g&&s(m,g.prototype),m},r.apply(null,arguments)}function s(c,u){return s=Object.setPrototypeOf||function(f,h){return f.__proto__=h,f},s(c,u)}function o(c){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},o(c)}var i=(function(c){function u(f){var h;return(function(d,g){if(!(d instanceof g))throw new TypeError("Cannot call a class as a function")})(this,u),(h=(function(d,g){return!g||t(g)!=="object"&&typeof g!="function"?(function(p){if(p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p})(d):g})(this,o(u).call(this,f))).name="ObjectPrototypeMutationError",h}return(function(f,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");f.prototype=Object.create(h&&h.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),h&&s(f,h)})(u,c),u})(e(Error));function a(c,u){for(var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},h=u.split("."),d=h.length,g=function(v){var y=h[v];if(!c)return{v:void 0};if(y==="+"){if(Array.isArray(c))return{v:c.map((function(w,x){var N=h.slice(v+1);return N.length>0?a(w,N.join("."),f):f(c,x,h,v)}))};var b=h.slice(0,v).join(".");throw new Error("Object at wildcard (".concat(b,") is not an array"))}c=f(c,y,h,v)},p=0;p<d;p++){var m=g(p);if(t(m)==="object")return m.v}return c}function l(c,u){return c.length===u+1}n.exports={set:function(c,u,f){if(t(c)!="object"||c===null||u===void 0)return c;if(typeof u=="number")return c[u]=f,c[u];try{return a(c,u,(function(h,d,g,p){if(h===Reflect.getPrototypeOf({}))throw new i("Attempting to mutate Object.prototype");if(!h[d]){var m=Number.isInteger(Number(g[p+1])),v=g[p+1]==="+";h[d]=m||v?[]:{}}return l(g,p)&&(h[d]=f),h[d]}))}catch(h){if(h instanceof i)throw h;return c}},get:function(c,u){if(t(c)!="object"||c===null||u===void 0)return c;if(typeof u=="number")return c[u];try{return a(c,u,(function(f,h){return f[h]}))}catch{return c}},has:function(c,u){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(t(c)!="object"||c===null||u===void 0)return!1;if(typeof u=="number")return u in c;try{var h=!1;return a(c,u,(function(d,g,p,m){if(!l(p,m))return d&&d[g];h=f.own?d.hasOwnProperty(g):g in d})),h}catch{return!1}},hasOwn:function(c,u,f){return this.has(c,u,f||{own:!0})},isIn:function(c,u,f){var h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(t(c)!="object"||c===null||u===void 0)return!1;try{var d=!1,g=!1;return a(c,u,(function(p,m,v,y){return d=d||p===f||!!p&&p[m]===f,g=l(v,y)&&t(p)==="object"&&m in p,p&&p[m]})),h.validPath?d&&g:d}catch{return!1}},ObjectPrototypeMutationError:i}}},ee={};function T(n){var t=ee[n];if(t!==void 0)return t.exports;var e=ee[n]={id:n,loaded:!1,exports:{}};return tn[n].call(e.exports,e,e.exports,T),e.loaded=!0,e.exports}T.n=n=>{var t=n&&n.__esModule?()=>n.default:()=>n;return T.d(t,{a:t}),t},T.d=(n,t)=>{for(var e in t)T.o(t,e)&&!T.o(n,e)&&Object.defineProperty(n,e,{enumerable:!0,get:t[e]})},T.o=(n,t)=>Object.prototype.hasOwnProperty.call(n,t),T.nmd=n=>(n.paths=[],n.children||(n.children=[]),n);var en=T(737),nn=T.n(en);function $t(n){if(!Ft(n))throw new Error("Parameter was not an error")}function Ft(n){return!!n&&typeof n=="object"&&(t=n,Object.prototype.toString.call(t)==="[object Error]")||n instanceof Error;var t}class F extends Error{constructor(t,e){const r=[...arguments],{options:s,shortMessage:o}=(function(a){let l,c="";if(a.length===0)l={};else if(Ft(a[0]))l={cause:a[0]},c=a.slice(1).join(" ")||"";else if(a[0]&&typeof a[0]=="object")l=Object.assign({},a[0]),c=a.slice(1).join(" ")||"";else{if(typeof a[0]!="string")throw new Error("Invalid arguments passed to Layerr");l={},c=c=a.join(" ")||""}return{options:l,shortMessage:c}})(r);let i=o;if(s.cause&&(i=`${i}: ${s.cause.message}`),super(i),this.message=i,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 a=s.constructorOpt||this.constructor;Error.captureStackTrace(this,a)}}static cause(t){return $t(t),t._cause&&Ft(t._cause)?t._cause:null}static fullStack(t){$t(t);const e=F.cause(t);return e?`${t.stack}
caused by: ${F.fullStack(e)}`:t.stack??""}static info(t){$t(t);const e={},r=F.cause(t);return r&&Object.assign(e,F.info(r)),t._info&&Object.assign(e,t._info),e}toString(){let t=this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(t=`${t}: ${this.message}`),t}}var rn=T(47),xt=T.n(rn);const ne="__PATH_SEPARATOR_POSIX__",re="__PATH_SEPARATOR_WINDOWS__";function S(n){try{const t=n.replace(/\//g,ne).replace(/\\\\/g,re);return encodeURIComponent(t).split(re).join("\\\\").split(ne).join("/")}catch(t){throw new F(t,"Failed encoding path")}}function se(n){return n.startsWith("/")?n:"/"+n}function mt(n){let t=n;return t[0]!=="/"&&(t="/"+t),/^.+\/$/.test(t)&&(t=t.substr(0,t.length-1)),t}function sn(n){let t=new(nn())(n).pathname;return t.length<=0&&(t="/"),mt(t)}function j(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];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 o=r.shift();r[0]=o+r[0]}r[0].match(/^file:\/\/\//)?r[0]=r[0].replace(/^([^/:]+):\/*/,"$1:///"):r[0]=r[0].replace(/^([^/:]+):\/*/,"$1://");for(var i=0;i<r.length;i++){var a=r[i];if(typeof a!="string")throw new TypeError("Url must be a string. Received "+a);a!==""&&(i>0&&(a=a.replace(/^[\/]+/,"")),a=i<r.length-1?a.replace(/[\/]+$/,""):a.replace(/[\/]+$/,"/"),s.push(a))}var l=s.join("/"),c=(l=l.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return c.shift()+(c.length>0?"?":"")+c.join("&")})(typeof arguments[0]=="object"?arguments[0]:[].slice.call(arguments))})(t.reduce(((r,s,o)=>((o===0||s!=="/"||s==="/"&&r[r.length-1]!=="/")&&r.push(s),r)),[]))}var on=T(542),ct=T.n(on);function oe(n,t){const e=n.url.replace("//",""),r=e.indexOf("/")==-1?"/":e.slice(e.indexOf("/")),s=n.method?n.method.toUpperCase():"GET",o=!!/(^|,)\s*auth\s*($|,)/.test(t.qop)&&"auth",i=`00000000${t.nc}`.slice(-8),a=(function(h,d,g,p,m,v,y){const b=y||ct()(`${d}:${g}:${p}`);return h&&h.toLowerCase()==="md5-sess"?ct()(`${b}:${m}:${v}`):b})(t.algorithm,t.username,t.realm,t.password,t.nonce,t.cnonce,t.ha1),l=ct()(`${s}:${r}`),c=o?ct()(`${a}:${t.nonce}:${i}:${t.cnonce}:${o}:${l}`):ct()(`${a}:${t.nonce}:${l}`),u={username:t.username,realm:t.realm,nonce:t.nonce,uri:r,qop:o,response:c,nc:i,cnonce:t.cnonce,algorithm:t.algorithm,opaque:t.opaque},f=[];for(const h in u)u[h]&&(h==="qop"||h==="nc"||h==="algorithm"?f.push(`${h}=${u[h]}`):f.push(`${h}="${u[h]}"`));return`Digest ${f.join(", ")}`}function je(n){return(n.headers&&n.headers.get("www-authenticate")||"").split(/\s/)[0].toLowerCase()==="digest"}var an=T(101),$e=T.n(an);function ie(n){return $e().decode(n)}function ae(n,t){var e;return`Basic ${e=`${n}:${t}`,$e().encode(e)}`}const ue=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:typeof window<"u"?window:globalThis,un=ue.fetch.bind(ue);let V=(function(n){return n.Auto="auto",n.Digest="digest",n.None="none",n.Password="password",n.Token="token",n})({}),Z=(function(n){return n.DataTypeNoLength="data-type-no-length",n.InvalidAuthType="invalid-auth-type",n.InvalidOutputFormat="invalid-output-format",n.LinkUnsupportedAuthType="link-unsupported-auth",n.InvalidUpdateRange="invalid-update-range",n.NotSupported="not-supported",n})({});function Ie(n,t,e,r,s){switch(n.authType){case V.Auto:t&&e&&(n.headers.Authorization=ae(t,e));break;case V.Digest:n.digest=(function(i,a,l){return{username:i,password:a,ha1:l,nc:0,algorithm:"md5",hasDigestAuth:!1}})(t,e,s);break;case V.None:break;case V.Password:n.headers.Authorization=ae(t,e);break;case V.Token:n.headers.Authorization=`${(o=r).token_type} ${o.access_token}`;break;default:throw new F({info:{code:Z.InvalidAuthType}},`Invalid auth type: ${n.authType}`)}var o}T(345),T(800);const le="@@HOTPATCHER",ln=()=>{};function It(n){return{original:n,methods:[n],final:!1}}class cn{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=le}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(t){this.configuration.getEmptyAction=t}control(t){let e=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!t||t.__type__!==le)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)?e&&(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 e=this.get(t)||ln;for(var r=arguments.length,s=new Array(r>1?r-1:0),o=1;o<r;o++)s[o-1]=arguments[o];return e(...s)}get(t){const e=this.configuration.registry[t];if(!e)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),o=0;o<r;o++)s[o]=arguments[o];if(s.length===0)throw new Error("Failed creating sequence: No functions provided");return function(){for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];let c=a;const u=this;for(;s.length>0;)c=[s.shift().apply(u,c)];return c[0]}})(...e.methods)}isPatched(t){return!!this.configuration.registry[t]}patch(t,e){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 e!="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(e):this.configuration.registry[t]=It(e);else if(this.isPatched(t)){const{original:o}=this.configuration.registry[t];this.configuration.registry[t]=Object.assign(It(e),{original:o})}else this.configuration.registry[t]=It(e);return this}patchInline(t,e){this.isPatched(t)||this.patch(t,e);for(var r=arguments.length,s=new Array(r>2?r-2:0),o=2;o<r;o++)s[o-2]=arguments[o];return this.execute(t,...s)}plugin(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),s=1;s<e;s++)r[s-1]=arguments[s];return r.forEach((o=>{this.patch(t,o,{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 Ct=null;function hn(){return Ct||(Ct=new cn),Ct}function Et(n){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 e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e})(n)?Object.assign({},n):Object.setPrototypeOf(Object.assign({},n),Object.getPrototypeOf(n))}function ce(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];let r=null,s=[...t];for(;s.length>0;){const o=s.shift();r=r?Ce(r,o):Et(o)}return r}function Ce(n,t){const e=Et(n);return Object.keys(t).forEach((r=>{e.hasOwnProperty(r)?Array.isArray(t[r])?e[r]=Array.isArray(e[r])?[...e[r],...t[r]]:[...t[r]]:typeof t[r]=="object"&&t[r]?e[r]=typeof e[r]=="object"&&e[r]?Ce(e[r],t[r]):Et(t[r]):e[r]=t[r]:e[r]=t[r]})),e}function pn(n){const t={};for(const e of n.keys())t[e]=n.get(e);return t}function Dt(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];if(t.length===0)return{};const r={};return t.reduce(((s,o)=>(Object.keys(o).forEach((i=>{const a=i.toLowerCase();r.hasOwnProperty(a)?s[r[a]]=o[i]:(r[a]=i,s[i]=o[i])})),s)),{})}T(805);const fn=typeof ArrayBuffer=="function",{toString:gn}=Object.prototype;function ke(n){return fn&&(n instanceof ArrayBuffer||gn.call(n)==="[object ArrayBuffer]")}function Re(n){return n!=null&&n.constructor!=null&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}function Gt(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}}function Vt(n,t,e){return e?t?t(n):n:(n&&n.then||(n=Promise.resolve(n)),t?n.then(t):n)}const Le=Gt((function(n){const t=n._digest;return delete n._digest,t.hasDigestAuth&&(n=ce(n,{headers:{Authorization:oe(n,t)}})),Vt(Nt(n),(function(e){let r=!1;return s=function(i){return r?i:e},(o=(function(){if(e.status==401)return t.hasDigestAuth=(function(i,a){if(!je(i))return!1;const l=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){const c=i.headers&&i.headers.get("www-authenticate")||"",u=l.exec(c);if(!u)break;a[u[1]]=u[2]||u[3]}return a.nc+=1,a.cnonce=(function(){let c="";for(let u=0;u<32;++u)c=`${c}${"abcdef0123456789"[Math.floor(16*Math.random())]}`;return c})(),!0})(e,t),(function(){if(t.hasDigestAuth)return Vt(Nt(n=ce(n,{headers:{Authorization:oe(n,t)}})),(function(i){return i.status==401?t.hasDigestAuth=!1:t.nc++,r=!0,i}))})();t.nc++})())&&o.then?o.then(s):s(o);var s,o}))})),dn=Gt((function(n,t){return Vt(Nt(n),(function(e){return e.ok?(t.authType=V.Password,e):e.status==401&&je(e)?(t.authType=V.Digest,Ie(t,t.username,t.password,void 0,void 0),n._digest=t.digest,Le(n)):e}))})),I=Gt((function(n,t){return t.authType===V.Auto?dn(n,t):n._digest?Le(n):Nt(n)}));function C(n,t,e){const r=Et(n);return r.headers=Dt(t.headers,r.headers||{},e.headers||{}),e.data!==void 0&&(r.data=e.data),e.signal&&(r.signal=e.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 Nt(n){const t=hn();return t.patchInline("request",(e=>t.patchInline("fetch",un,e.url,(function(r){let s={};const o={method:r.method};if(r.headers&&(s=Dt(s,r.headers)),r.data!==void 0){const[i,a]=(function(l){if(typeof l=="string")return[l,{}];if(Re(l))return[l,{}];if(ke(l))return[l,{}];if(l&&typeof l=="object")return[JSON.stringify(l),{"content-type":"application/json"}];throw new Error("Unable to convert request body: Unexpected body type: "+typeof l)})(r.data);o.body=i,s=Dt(s,a)}return r.signal&&(o.signal=r.signal),r.withCredentials&&(o.credentials="include"),o.headers=s,o})(e))),n)}var mn=T(285);const Pt=n=>{if(typeof n!="string")throw new TypeError("invalid pattern");if(n.length>65536)throw new TypeError("pattern is too long")},yn={"[: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]},ht=n=>n.replace(/[[\]\\-]/g,"\\$&"),he=n=>n.join(""),vn=(n,t)=>{const e=t;if(n.charAt(e)!=="[")throw new Error("not in a brace expression");const r=[],s=[];let o=e+1,i=!1,a=!1,l=!1,c=!1,u=e,f="";t:for(;o<n.length;){const p=n.charAt(o);if(p!=="!"&&p!=="^"||o!==e+1){if(p==="]"&&i&&!l){u=o+1;break}if(i=!0,p!=="\\"||l){if(p==="["&&!l){for(const[m,[v,y,b]]of Object.entries(yn))if(n.startsWith(m,o)){if(f)return["$.",!1,n.length-e,!0];o+=m.length,b?s.push(v):r.push(v),a=a||y;continue t}}l=!1,f?(p>f?r.push(ht(f)+"-"+ht(p)):p===f&&r.push(ht(p)),f="",o++):n.startsWith("-]",o+1)?(r.push(ht(p+"-")),o+=2):n.startsWith("-",o+1)?(f=p,o+=2):(r.push(ht(p)),o++)}else l=!0,o++}else c=!0,o++}if(u<o)return["",!1,0,!1];if(!r.length&&!s.length)return["$.",!1,n.length-e,!0];if(s.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!c)return[(h=r[0].length===2?r[0].slice(-1):r[0],h.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,u-e,!1];var h;const d="["+(c?"^":"")+he(r)+"]",g="["+(c?"":"^")+he(s)+"]";return[r.length&&s.length?"("+d+"|"+g+")":r.length?d:g,a,u-e,!0]},gt=function(n){let{windowsPathsNoEscape:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t?n.replace(/\[([^\/\\])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")},bn=new Set(["!","?","+","*","@"]),pe=n=>bn.has(n),kt="(?!\\.)",wn=new Set(["[","."]),xn=new Set(["..","."]),En=new Set("().*{}+?[]^$\\!"),Ht="[^/]",fe=Ht+"*?",ge=Ht+"+?";class U{type;#n;#r;#o=!1;#t=[];#e;#i;#u;#a=!1;#s;#l;#h=!1;constructor(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.type=t,t&&(this.#r=!0),this.#e=e,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.#l!==void 0?this.#l:this.type?this.#l=this.type+"("+this.#t.map((t=>String(t))).join("|")+")":this.#l=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 e=t,r=e.#e;for(;r;){for(let s=e.#i+1;!r.type&&s<r.#t.length;s++)for(const o of t.#t){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(r.#t[s])}e=r,r=e.#e}}return this}push(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];for(const s of e)if(s!==""){if(typeof s!="string"&&!(s instanceof U&&s.#e===this))throw new Error("invalid part: "+s);this.#t.push(s)}}toJSON(){const t=this.type===null?this.#t.slice().map((e=>typeof e=="string"?e:e.toJSON())):[this.type,...this.#t.map((e=>e.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 e=0;e<this.#i;e++){const r=t.#t[e];if(!(r instanceof U&&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 e=new U(this.type,t);for(const r of this.#t)e.copyIn(r);return e}static#c(t,e,r,s){let o=!1,i=!1,a=-1,l=!1;if(e.type===null){let d=r,g="";for(;d<t.length;){const p=t.charAt(d++);if(o||p==="\\")o=!o,g+=p;else if(i)d===a+1?p!=="^"&&p!=="!"||(l=!0):p!=="]"||d===a+2&&l||(i=!1),g+=p;else if(p!=="[")if(s.noext||!pe(p)||t.charAt(d)!=="(")g+=p;else{e.push(g),g="";const m=new U(p,e);d=U.#c(t,m,d,s),e.push(m)}else i=!0,a=d,l=!1,g+=p}return e.push(g),d}let c=r+1,u=new U(null,e);const f=[];let h="";for(;c<t.length;){const d=t.charAt(c++);if(o||d==="\\")o=!o,h+=d;else if(i)c===a+1?d!=="^"&&d!=="!"||(l=!0):d!=="]"||c===a+2&&l||(i=!1),h+=d;else if(d!=="[")if(pe(d)&&t.charAt(c)==="("){u.push(h),h="";const g=new U(d,u);u.push(g),c=U.#c(t,g,c,s)}else if(d!=="|"){if(d===")")return h===""&&e.#t.length===0&&(e.#h=!0),u.push(h),h="",e.push(...f,u),c;h+=d}else u.push(h),h="",f.push(u),u=new U(null,e);else i=!0,a=c,l=!1,h+=d}return e.type=null,e.#r=void 0,e.#t=[t.substring(r-1)],c}static fromGlob(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=new U(null,void 0,e);return U.#c(t,r,0,e),r}toMMPattern(){if(this!==this.#n)return this.#n.toMMPattern();const t=this.toString(),[e,r,s,o]=this.toRegExpSource();if(!(s||this.#r||this.#s.nocase&&!this.#s.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return r;const i=(this.#s.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${e}$`,i),{_src:e,_glob:t})}get options(){return this.#s}toRegExpSource(t){const e=t??!!this.#s.dot;if(this.#n===this&&this.#f(),!this.type){const l=this.isStart()&&this.isEnd(),c=this.#t.map((h=>{const[d,g,p,m]=typeof h=="string"?U.#g(h,this.#r,l):h.toRegExpSource(t);return this.#r=this.#r||p,this.#o=this.#o||m,d})).join("");let u="";if(this.isStart()&&typeof this.#t[0]=="string"&&(this.#t.length!==1||!xn.has(this.#t[0]))){const h=wn,d=e&&h.has(c.charAt(0))||c.startsWith("\\.")&&h.has(c.charAt(2))||c.startsWith("\\.\\.")&&h.has(c.charAt(4)),g=!e&&!t&&h.has(c.charAt(0));u=d?"(?!(?:^|/)\\.\\.?(?:$|/))":g?kt:""}let f="";return this.isEnd()&&this.#n.#a&&this.#e?.type==="!"&&(f="(?:$|\\/)"),[u+c+f,gt(c),this.#r=!!this.#r,this.#o]}const r=this.type==="*"||this.type==="+",s=this.type==="!"?"(?:(?!(?:":"(?:";let o=this.#p(e);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){const l=this.toString();return this.#t=[l],this.type=null,this.#r=void 0,[l,gt(this.toString()),!1,!1]}let i=!r||t||e?"":this.#p(!0);i===o&&(i=""),i&&(o=`(?:${o})(?:${i})*?`);let a="";return a=this.type==="!"&&this.#h?(this.isStart()&&!e?kt:"")+ge:s+o+(this.type==="!"?"))"+(!this.isStart()||e||t?"":kt)+fe+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&i?")":this.type==="*"&&i?")?":`)${this.type}`),[a,gt(o),this.#r=!!this.#r,this.#o]}#p(t){return this.#t.map((e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");const[r,s,o,i]=e.toRegExpSource(t);return this.#o=this.#o||i,r})).filter((e=>!(this.isStart()&&this.isEnd()&&!e))).join("|")}static#g(t,e){let r=arguments.length>2&&arguments[2]!==void 0&&arguments[2],s=!1,o="",i=!1;for(let a=0;a<t.length;a++){const l=t.charAt(a);if(s)s=!1,o+=(En.has(l)?"\\":"")+l;else if(l!=="\\"){if(l==="["){const[c,u,f,h]=vn(t,a);if(f){o+=c,i=i||u,a+=f-1,e=e||h;continue}}l!=="*"?l!=="?"?o+=l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(o+=Ht,e=!0):(o+=r&&t==="*"?ge:fe,e=!0)}else a===t.length-1?o+="\\\\":s=!0}return[o,gt(t),!!e,i]}}const L=function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Pt(t),!(!e.nocomment&&t.charAt(0)==="#")&&new At(t,e).match(n)},Nn=/^\*+([^+@!?\*\[\(]*)$/,Pn=n=>t=>!t.startsWith(".")&&t.endsWith(n),An=n=>t=>t.endsWith(n),On=n=>(n=n.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(n)),Tn=n=>(n=n.toLowerCase(),t=>t.toLowerCase().endsWith(n)),Sn=/^\*+\.\*+$/,jn=n=>!n.startsWith(".")&&n.includes("."),$n=n=>n!=="."&&n!==".."&&n.includes("."),In=/^\.\*+$/,Cn=n=>n!=="."&&n!==".."&&n.startsWith("."),kn=/^\*+$/,Rn=n=>n.length!==0&&!n.startsWith("."),Ln=n=>n.length!==0&&n!=="."&&n!=="..",Mn=/^\?+([^+@!?\*\[\(]*)?$/,Un=n=>{let[t,e=""]=n;const r=Me([t]);return e?(e=e.toLowerCase(),s=>r(s)&&s.toLowerCase().endsWith(e)):r},_n=n=>{let[t,e=""]=n;const r=Ue([t]);return e?(e=e.toLowerCase(),s=>r(s)&&s.toLowerCase().endsWith(e)):r},Fn=n=>{let[t,e=""]=n;const r=Ue([t]);return e?s=>r(s)&&s.endsWith(e):r},Dn=n=>{let[t,e=""]=n;const r=Me([t]);return e?s=>r(s)&&s.endsWith(e):r},Me=n=>{let[t]=n;const e=t.length;return r=>r.length===e&&!r.startsWith(".")},Ue=n=>{let[t]=n;const e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},_e=typeof wt=="object"&&wt?typeof jt=="object"&&jt&&jt.__MINIMATCH_TESTING_PLATFORM__||wt.platform:"posix";L.sep=_e==="win32"?"\\":"/";const z=Symbol("globstar **");L.GLOBSTAR=z,L.filter=function(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e=>L(e,n,t)};const B=function(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.assign({},n,t)};L.defaults=n=>{if(!n||typeof n!="object"||!Object.keys(n).length)return L;const t=L;return Object.assign((function(e,r){return t(e,r,B(n,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}),{Minimatch:class extends t.Minimatch{constructor(e){super(e,B(n,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}))}static defaults(e){return t.defaults(B(n,e)).Minimatch}},AST:class extends t.AST{constructor(e,r){super(e,r,B(n,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}static fromGlob(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.AST.fromGlob(e,B(n,r))}},unescape:function(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.unescape(e,B(n,r))},escape:function(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.escape(e,B(n,r))},filter:function(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.filter(e,B(n,r))},defaults:e=>t.defaults(B(n,e)),makeRe:function(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.makeRe(e,B(n,r))},braceExpand:function(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.braceExpand(e,B(n,r))},match:function(e,r){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t.match(e,r,B(n,s))},sep:t.sep,GLOBSTAR:z})};const Fe=function(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Pt(n),t.nobrace||!/\{(?:(?!\{).)*\}/.test(n)?[n]:mn(n)};L.braceExpand=Fe,L.makeRe=function(n){return new At(n,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).makeRe()},L.match=function(n,t){const e=new At(t,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{});return n=n.filter((r=>e.match(r))),e.options.nonull&&!n.length&&n.push(t),n};const de=/[?*]|[+@!]\(.*?\)|\[|\]/;class At{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Pt(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||_e,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.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 e of t)if(typeof e!="string")return!0;return!1}debug(){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#")return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=function(){return console.error(...arguments)}),this.debug(this.pattern,this.globSet);const r=this.globSet.map((o=>this.slashSplit(o)));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let s=this.globParts.map(((o,i,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){const l=!(o[0]!==""||o[1]!==""||o[2]!=="?"&&de.test(o[2])||de.test(o[3])),c=/^[a-z]:/i.test(o[0]);if(l)return[...o.slice(0,4),...o.slice(4).map((u=>this.parse(u)))];if(c)return[o[0],...o.slice(1).map((u=>this.parse(u)))]}return o.map((l=>this.parse(l)))}));if(this.debug(this.pattern,s),this.set=s.filter((o=>o.indexOf(!1)===-1)),this.isWindows)for(let o=0;o<this.set.length;o++){const i=this.set[o];i[0]===""&&i[1]===""&&this.globParts[o][2]==="?"&&typeof i[3]=="string"&&/^[a-z]:$/i.test(i[3])&&(i[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:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map((e=>{let r=-1;for(;(r=e.indexOf("**",r+1))!==-1;){let s=r;for(;e[s+1]==="**";)s++;s!==r&&e.splice(r,s-r)}return e}))}levelOneOptimize(t){return t.map((e=>(e=e.reduce(((r,s)=>{const o=r[r.length-1];return s==="**"&&o==="**"?r:s===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(r.pop(),r):(r.push(s),r)}),[])).length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let s=1;s<t.length-1;s++){const o=t[s];s===1&&o===""&&t[0]===""||o!=="."&&o!==""||(e=!0,t.splice(s,1),s--)}t[0]!=="."||t.length!==2||t[1]!=="."&&t[1]!==""||(e=!0,t.pop())}let r=0;for(;(r=t.indexOf("..",r+1))!==-1;){const s=t[r-1];s&&s!=="."&&s!==".."&&s!=="**"&&(e=!0,t.splice(r-1,2),r-=2)}}while(e);return t.length===0?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let r of t){let s=-1;for(;(s=r.indexOf("**",s+1))!==-1;){let i=s;for(;r[i+1]==="**";)i++;i>s&&r.splice(s+1,i-s);let a=r[s+1];const l=r[s+2],c=r[s+3];if(a!==".."||!l||l==="."||l===".."||!c||c==="."||c==="..")continue;e=!0,r.splice(s,1);const u=r.slice(0);u[s]="**",t.push(u),s--}if(!this.preserveMultipleSlashes){for(let i=1;i<r.length-1;i++){const a=r[i];i===1&&a===""&&r[0]===""||a!=="."&&a!==""||(e=!0,r.splice(i,1),i--)}r[0]!=="."||r.length!==2||r[1]!=="."&&r[1]!==""||(e=!0,r.pop())}let o=0;for(;(o=r.indexOf("..",o+1))!==-1;){const i=r[o-1];if(i&&i!=="."&&i!==".."&&i!=="**"){e=!0;const a=o===1&&r[o+1]==="**"?["."]:[];r.splice(o-1,2,...a),r.length===0&&r.push(""),o-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let r=e+1;r<t.length;r++){const s=this.partsMatch(t[e],t[r],!this.preserveMultipleSlashes);if(s){t[e]=[],t[r]=s;break}}return t.filter((e=>e.length))}partsMatch(t,e){let r=arguments.length>2&&arguments[2]!==void 0&&arguments[2],s=0,o=0,i=[],a="";for(;s<t.length&&o<e.length;)if(t[s]===e[o])i.push(a==="b"?e[o]:t[s]),s++,o++;else if(r&&t[s]==="**"&&e[o]===t[s+1])i.push(t[s]),s++;else if(r&&e[o]==="**"&&t[s]===e[o+1])i.push(e[o]),o++;else if(t[s]!=="*"||!e[o]||!this.options.dot&&e[o].startsWith(".")||e[o]==="**"){if(e[o]!=="*"||!t[s]||!this.options.dot&&t[s].startsWith(".")||t[s]==="**"||a==="a")return!1;a="b",i.push(e[o]),s++,o++}else{if(a==="b")return!1;a="a",i.push(t[s]),s++,o++}return t.length===e.length&&i}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,r=0;for(let s=0;s<t.length&&t.charAt(s)==="!";s++)e=!e,r++;r&&(this.pattern=t.slice(r)),this.negate=e}matchOne(t,e){let r=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const s=this.options;if(this.isWindows){const p=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),m=!p&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),v=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),y=m?3:p?0:void 0,b=!v&&e[0]===""&&e[1]===""&&e[2]==="?"&&typeof e[3]=="string"&&/^[a-z]:$/i.test(e[3])?3:v?0:void 0;if(typeof y=="number"&&typeof b=="number"){const[w,x]=[t[y],e[b]];w.toLowerCase()===x.toLowerCase()&&(e[b]=w,b>y?e=e.slice(b):y>b&&(t=t.slice(y)))}}const{optimizationLevel:o=1}=this.options;o>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var i=0,a=0,l=t.length,c=e.length;i<l&&a<c;i++,a++){this.debug("matchOne loop");var u=e[a],f=t[i];if(this.debug(e,u,f),u===!1)return!1;if(u===z){this.debug("GLOBSTAR",[e,u,f]);var h=i,d=a+1;if(d===c){for(this.debug("** at the end");i<l;i++)if(t[i]==="."||t[i]===".."||!s.dot&&t[i].charAt(0)===".")return!1;return!0}for(;h<l;){var g=t[h];if(this.debug(`
globstar while`,t,h,e,d,g),this.matchOne(t.slice(h),e.slice(d),r))return this.debug("globstar found match!",h,l,g),!0;if(g==="."||g===".."||!s.dot&&g.charAt(0)==="."){this.debug("dot detected!",t,h,e,d);break}this.debug("globstar swallow a segment, and continue"),h++}return!(!r||(this.debug(`
>>> no match, partial?`,t,h,e,d),h!==l))}let p;if(typeof u=="string"?(p=f===u,this.debug("string match",u,f,p)):(p=u.test(f),this.debug("pattern match",u,f,p)),!p)return!1}if(i===l&&a===c)return!0;if(i===l)return r;if(a===c)return i===l-1&&t[i]==="";throw new Error("wtf?")}braceExpand(){return Fe(this.pattern,this.options)}parse(t){Pt(t);const e=this.options;if(t==="**")return z;if(t==="")return"";let r,s=null;(r=t.match(kn))?s=e.dot?Ln:Rn:(r=t.match(Nn))?s=(e.nocase?e.dot?Tn:On:e.dot?An:Pn)(r[1]):(r=t.match(Mn))?s=(e.nocase?e.dot?_n:Un:e.dot?Fn:Dn)(r):(r=t.match(Sn))?s=e.dot?$n:jn:(r=t.match(In))&&(s=Cn);const o=U.fromGlob(t,this.options).toMMPattern();return s&&typeof o=="object"&&Reflect.defineProperty(o,"test",{value:s}),o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,r=e.noglobstar?"[^/]*?":e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",s=new Set(e.nocase?["i"]:[]);let o=t.map((l=>{const c=l.map((u=>{if(u instanceof RegExp)for(const f of u.flags.split(""))s.add(f);return typeof u=="string"?u.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):u===z?z:u._src}));return c.forEach(((u,f)=>{const h=c[f+1],d=c[f-1];u===z&&d!==z&&(d===void 0?h!==void 0&&h!==z?c[f+1]="(?:\\/|"+r+"\\/)?"+h:c[f]=r:h===void 0?c[f-1]=d+"(?:\\/|"+r+")?":h!==z&&(c[f-1]=d+"(?:\\/|\\/"+r+"\\/)"+h,c[f+1]=z))})),c.filter((u=>u!==z)).join("/")})).join("|");const[i,a]=t.length>1?["(?:",")"]:["",""];o="^"+i+o+a+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...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 e=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==="/"&&e)return!0;const r=this.options;this.isWindows&&(t=t.split("\\").join("/"));const s=this.slashSplit(t);this.debug(this.pattern,"split",s);const o=this.set;this.debug(this.pattern,"set",o);let i=s[s.length-1];if(!i)for(let a=s.length-2;!i&&a>=0;a--)i=s[a];for(let a=0;a<o.length;a++){const l=o[a];let c=s;if(r.matchBase&&l.length===1&&(c=[i]),this.matchOne(c,l,e))return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate}static defaults(t){return L.defaults(t).Minimatch}}function Yt(n){const t=new Error(`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:""}Invalid response: ${n.status} ${n.statusText}`);return t.status=n.status,t.response=n,t}function k(n,t){const{status:e}=t;if(e===401&&n.digest)return t;if(e>=400)throw Yt(t);return t}function rt(n,t){return arguments.length>2&&arguments[2]!==void 0&&arguments[2]?{data:t,headers:n.headers?pn(n.headers):{},status:n.status,statusText:n.statusText}:t}L.AST=U,L.Minimatch=At,L.escape=function(n){let{windowsPathsNoEscape:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t?n.replace(/[?*()[\]]/g,"[$&]"):n.replace(/[?*()[\]\\]/g,"\\$&")},L.unescape=gt;const Vn=(me=function(n,t,e){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=C({url:j(n.remoteURL,S(t)),method:"COPY",headers:{Destination:j(n.remoteURL,S(e)),Overwrite:r.overwrite===!1?"F":"T",Depth:r.shallow?"0":"infinity"}},n,r);return i=function(a){k(n,a)},(o=I(s,n))&&o.then||(o=Promise.resolve(o)),i?o.then(i):o;var o,i},function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];try{return Promise.resolve(me.apply(this,n))}catch(e){return Promise.reject(e)}});var me;const Wn={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(n,t){return t},attributeValueProcessor:function(n,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(n,t,e){return n},captureMetaData:!1},ye=":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",Bn=new RegExp("^["+ye+"]["+ye+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function De(n,t){const e=[];let r=t.exec(n);for(;r;){const s=[];s.startIndex=t.lastIndex-r[0].length;const o=r.length;for(let i=0;i<o;i++)s.push(r[i]);e.push(s),r=t.exec(n)}return e}const Tt=function(n){return Bn.exec(n)!=null};let Wt;Wt=typeof Symbol!="function"?"@@xmlMetadata":Symbol("XML Node Metadata");class K{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t,e){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}),e!==void 0&&(this.child[this.child.length-1][Wt]={startIndex:e})}static getMetaDataSymbol(){return Wt}}class zn{constructor(t){this.suppressValidationErr=!t}readDocType(t,e){const r={};if(t[e+3]!=="O"||t[e+4]!=="C"||t[e+5]!=="T"||t[e+6]!=="Y"||t[e+7]!=="P"||t[e+8]!=="E")throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let s=1,o=!1,i=!1,a="";for(;e<t.length;e++)if(t[e]!=="<"||i)if(t[e]===">"){if(i?t[e-1]==="-"&&t[e-2]==="-"&&(i=!1,s--):s--,s===0)break}else t[e]==="["?o=!0:a+=t[e];else{if(o&&Q(t,"!ENTITY",e)){let l,c;e+=7,[l,c,e]=this.readEntityExp(t,e+1,this.suppressValidationErr),c.indexOf("&")===-1&&(r[l]={regx:RegExp(`&${l};`,"g"),val:c})}else if(o&&Q(t,"!ELEMENT",e)){e+=8;const{index:l}=this.readElementExp(t,e+1);e=l}else if(o&&Q(t,"!ATTLIST",e))e+=8;else if(o&&Q(t,"!NOTATION",e)){e+=9;const{index:l}=this.readNotationExp(t,e+1,this.suppressValidationErr);e=l}else{if(!Q(t,"!--",e))throw new Error("Invalid DOCTYPE");i=!0}s++,a=""}if(s!==0)throw new Error("Unclosed DOCTYPE")}return{entities:r,i:e}}readEntityExp(t,e){e=D(t,e);let r="";for(;e<t.length&&!/\s/.test(t[e])&&t[e]!=='"'&&t[e]!=="'";)r+=t[e],e++;if(pt(r),e=D(t,e),!this.suppressValidationErr){if(t.substring(e,e+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(t[e]==="%")throw new Error("Parameter entities are not supported")}let s="";return[e,s]=this.readIdentifierVal(t,e,"entity"),[r,s,--e]}readNotationExp(t,e){e=D(t,e);let r="";for(;e<t.length&&!/\s/.test(t[e]);)r+=t[e],e++;!this.suppressValidationErr&&pt(r),e=D(t,e);const s=t.substring(e,e+6).toUpperCase();if(!this.suppressValidationErr&&s!=="SYSTEM"&&s!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${s}"`);e+=s.length,e=D(t,e);let o=null,i=null;if(s==="PUBLIC")[e,o]=this.readIdentifierVal(t,e,"publicIdentifier"),t[e=D(t,e)]!=='"'&&t[e]!=="'"||([e,i]=this.readIdentifierVal(t,e,"systemIdentifier"));else if(s==="SYSTEM"&&([e,i]=this.readIdentifierVal(t,e,"systemIdentifier"),!this.suppressValidationErr&&!i))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:r,publicIdentifier:o,systemIdentifier:i,index:--e}}readIdentifierVal(t,e,r){let s="";const o=t[e];if(o!=='"'&&o!=="'")throw new Error(`Expected quoted string, found "${o}"`);for(e++;e<t.length&&t[e]!==o;)s+=t[e],e++;if(t[e]!==o)throw new Error(`Unterminated ${r} value`);return[++e,s]}readElementExp(t,e){e=D(t,e);let r="";for(;e<t.length&&!/\s/.test(t[e]);)r+=t[e],e++;if(!this.suppressValidationErr&&!Tt(r))throw new Error(`Invalid element name: "${r}"`);let s="";if(t[e=D(t,e)]==="E"&&Q(t,"MPTY",e))e+=4;else if(t[e]==="A"&&Q(t,"NY",e))e+=2;else if(t[e]==="("){for(e++;e<t.length&&t[e]!==")";)s+=t[e],e++;if(t[e]!==")")throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${t[e]}"`);return{elementName:r,contentModel:s.trim(),index:e}}readAttlistExp(t,e){e=D(t,e);let r="";for(;e<t.length&&!/\s/.test(t[e]);)r+=t[e],e++;pt(r),e=D(t,e);let s="";for(;e<t.length&&!/\s/.test(t[e]);)s+=t[e],e++;if(!pt(s))throw new Error(`Invalid attribute name: "${s}"`);e=D(t,e);let o="";if(t.substring(e,e+8).toUpperCase()==="NOTATION"){if(o="NOTATION",t[e=D(t,e+=8)]!=="(")throw new Error(`Expected '(', found "${t[e]}"`);e++;let a=[];for(;e<t.length&&t[e]!==")";){let l="";for(;e<t.length&&t[e]!=="|"&&t[e]!==")";)l+=t[e],e++;if(l=l.trim(),!pt(l))throw new Error(`Invalid notation name: "${l}"`);a.push(l),t[e]==="|"&&(e++,e=D(t,e))}if(t[e]!==")")throw new Error("Unterminated list of notations");e++,o+=" ("+a.join("|")+")"}else{for(;e<t.length&&!/\s/.test(t[e]);)o+=t[e],e++;const a=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!a.includes(o.toUpperCase()))throw new Error(`Invalid attribute type: "${o}"`)}e=D(t,e);let i="";return t.substring(e,e+8).toUpperCase()==="#REQUIRED"?(i="#REQUIRED",e+=8):t.substring(e,e+7).toUpperCase()==="#IMPLIED"?(i="#IMPLIED",e+=7):[e,i]=this.readIdentifierVal(t,e,"ATTLIST"),{elementName:r,attributeName:s,attributeType:o,defaultValue:i,index:e}}}const D=(n,t)=>{for(;t<n.length&&/\s/.test(n[t]);)t++;return t};function Q(n,t,e){for(let r=0;r<t.length;r++)if(t[r]!==n[e+r+1])return!1;return!0}function pt(n){if(Tt(n))return n;throw new Error(`Invalid entity name ${n}`)}const qn=/^[-+]?0x[a-fA-F0-9]+$/,Gn=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,Hn={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0},Yn=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function Ve(n){return typeof n=="function"?n:Array.isArray(n)?t=>{for(const e of n)if(typeof e=="string"&&t===e||e instanceof RegExp&&e.test(t))return!0}:()=>!1}class Xn{constructor(t){if(this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,r)=>ve(r,10,"&#")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,r)=>ve(r,16,"&#x")}},this.addExternalEntities=Zn,this.parseXml=er,this.parseTextData=Jn,this.resolveNameSpace=Qn,this.buildAttributesMap=tr,this.isItStopNode=or,this.replaceEntitiesValue=rr,this.readStopNodeData=ir,this.saveTextToParentTag=sr,this.addChild=nr,this.ignoreAttributesFn=Ve(this.options.ignoreAttributes),this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodesExact=new Set,this.stopNodesWildcard=new Set;for(let e=0;e<this.options.stopNodes.length;e++){const r=this.options.stopNodes[e];typeof r=="string"&&(r.startsWith("*.")?this.stopNodesWildcard.add(r.substring(2)):this.stopNodesExact.add(r))}}}}function Zn(n){const t=Object.keys(n);for(let e=0;e<t.length;e++){const r=t[e];this.lastEntities[r]={regex:new RegExp("&"+r+";","g"),val:n[r]}}}function Jn(n,t,e,r,s,o,i){if(n!==void 0&&(this.options.trimValues&&!r&&(n=n.trim()),n.length>0)){i||(n=this.replaceEntitiesValue(n));const a=this.options.tagValueProcessor(t,n,e,s,o);return a==null?n:typeof a!=typeof n||a!==n?a:this.options.trimValues||n.trim()===n?We(n,this.options.parseTagValue,this.options.numberParseOptions):n}}function Qn(n){if(this.options.removeNSPrefix){const t=n.split(":"),e=n.charAt(0)==="/"?"/":"";if(t[0]==="xmlns")return"";t.length===2&&(n=e+t[1])}return n}const Kn=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function tr(n,t){if(this.options.ignoreAttributes!==!0&&typeof n=="string"){const e=De(n,Kn),r=e.length,s={};for(let o=0;o<r;o++){const i=this.resolveNameSpace(e[o][1]);if(this.ignoreAttributesFn(i,t))continue;let a=e[o][4],l=this.options.attributeNamePrefix+i;if(i.length)if(this.options.transformAttributeName&&(l=this.options.transformAttributeName(l)),l==="__proto__"&&(l="#__proto__"),a!==void 0){this.options.trimValues&&(a=a.trim()),a=this.replaceEntitiesValue(a);const c=this.options.attributeValueProcessor(i,a,t);s[l]=c==null?a:typeof c!=typeof a||c!==a?c:We(a,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(s[l]=!0)}if(!Object.keys(s).length)return;if(this.options.attributesGroupName){const o={};return o[this.options.attributesGroupName]=s,o}return s}}const er=function(n){n=n.replace(/\r\n?/g,`
`);const t=new K("!xml");let e=t,r="",s="";const o=new zn(this.options.processEntities);for(let i=0;i<n.length;i++)if(n[i]==="<")if(n[i+1]==="/"){const a=tt(n,">",i,"Closing Tag is not closed.");let l=n.substring(i+2,a).trim();if(this.options.removeNSPrefix){const f=l.indexOf(":");f!==-1&&(l=l.substr(f+1))}this.options.transformTagName&&(l=this.options.transformTagName(l)),e&&(r=this.saveTextToParentTag(r,e,s));const c=s.substring(s.lastIndexOf(".")+1);if(l&&this.options.unpairedTags.indexOf(l)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${l}>`);let u=0;c&&this.options.unpairedTags.indexOf(c)!==-1?(u=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):u=s.lastIndexOf("."),s=s.substring(0,u),e=this.tagsNodeStack.pop(),r="",i=a}else if(n[i+1]==="?"){let a=Bt(n,i,!1,"?>");if(!a)throw new Error("Pi Tag is not closed.");if(r=this.saveTextToParentTag(r,e,s),!(this.options.ignoreDeclaration&&a.tagName==="?xml"||this.options.ignorePiTags)){const l=new K(a.tagName);l.add(this.options.textNodeName,""),a.tagName!==a.tagExp&&a.attrExpPresent&&(l[":@"]=this.buildAttributesMap(a.tagExp,s)),this.addChild(e,l,s,i)}i=a.closeIndex+1}else if(n.substr(i+1,3)==="!--"){const a=tt(n,"-->",i+4,"Comment is not closed.");if(this.options.commentPropName){const l=n.substring(i+4,a-2);r=this.saveTextToParentTag(r,e,s),e.add(this.options.commentPropName,[{[this.options.textNodeName]:l}])}i=a}else if(n.substr(i+1,2)==="!D"){const a=o.readDocType(n,i);this.docTypeEntities=a.entities,i=a.i}else if(n.substr(i+1,2)==="!["){const a=tt(n,"]]>",i,"CDATA is not closed.")-2,l=n.substring(i+9,a);r=this.saveTextToParentTag(r,e,s);let c=this.parseTextData(l,e.tagname,s,!0,!1,!0,!0);c==null&&(c=""),this.options.cdataPropName?e.add(this.options.cdataPropName,[{[this.options.textNodeName]:l}]):e.add(this.options.textNodeName,c),i=a+2}else{let a=Bt(n,i,this.options.removeNSPrefix),l=a.tagName;const c=a.rawTagName;let u=a.tagExp,f=a.attrExpPresent,h=a.closeIndex;if(this.options.transformTagName){const p=this.options.transformTagName(l);u===l&&(u=p),l=p}e&&r&&e.tagname!=="!xml"&&(r=this.saveTextToParentTag(r,e,s,!1));const d=e;d&&this.options.unpairedTags.indexOf(d.tagname)!==-1&&(e=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),l!==t.tagname&&(s+=s?"."+l:l);const g=i;if(this.isItStopNode(this.stopNodesExact,this.stopNodesWildcard,s,l)){let p="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)l[l.length-1]==="/"?(l=l.substr(0,l.length-1),s=s.substr(0,s.length-1),u=l):u=u.substr(0,u.length-1),i=a.closeIndex;else if(this.options.unpairedTags.indexOf(l)!==-1)i=a.closeIndex;else{const v=this.readStopNodeData(n,c,h+1);if(!v)throw new Error(`Unexpected end of ${c}`);i=v.i,p=v.tagContent}const m=new K(l);l!==u&&f&&(m[":@"]=this.buildAttributesMap(u,s)),p&&(p=this.parseTextData(p,l,s,!0,f,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),m.add(this.options.textNodeName,p),this.addChild(e,m,s,g)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){if(l[l.length-1]==="/"?(l=l.substr(0,l.length-1),s=s.substr(0,s.length-1),u=l):u=u.substr(0,u.length-1),this.options.transformTagName){const m=this.options.transformTagName(l);u===l&&(u=m),l=m}const p=new K(l);l!==u&&f&&(p[":@"]=this.buildAttributesMap(u,s)),this.addChild(e,p,s,g),s=s.substr(0,s.lastIndexOf("."))}else{const p=new K(l);this.tagsNodeStack.push(e),l!==u&&f&&(p[":@"]=this.buildAttributesMap(u,s)),this.addChild(e,p,s,g),e=p}r="",i=h}}else r+=n[i];return t.child};function nr(n,t,e,r){this.options.captureMetaData||(r=void 0);const s=this.options.updateTag(t.tagname,e,t[":@"]);s===!1||(typeof s=="string"&&(t.tagname=s),n.addChild(t,r))}const rr=function(n){if(this.options.processEntities){for(let t in this.docTypeEntities){const e=this.docTypeEntities[t];n=n.replace(e.regx,e.val)}for(let t in this.lastEntities){const e=this.lastEntities[t];n=n.replace(e.regex,e.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const e=this.htmlEntities[t];n=n.replace(e.regex,e.val)}n=n.replace(this.ampEntity.regex,this.ampEntity.val)}return n};function sr(n,t,e,r){return n&&(r===void 0&&(r=t.child.length===0),(n=this.parseTextData(n,t.tagname,e,!1,!!t[":@"]&&Object.keys(t[":@"]).length!==0,r))!==void 0&&n!==""&&t.add(this.options.textNodeName,n),n=""),n}function or(n,t,e,r){return!(!t||!t.has(r))||!(!n||!n.has(e))}function tt(n,t,e,r){const s=n.indexOf(t,e);if(s===-1)throw new Error(r);return s+t.length-1}function Bt(n,t,e){const r=(function(u,f){let h,d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:">",g="";for(let p=f;p<u.length;p++){let m=u[p];if(h)m===h&&(h="");else if(m==='"'||m==="'")h=m;else if(m===d[0]){if(!d[1])return{data:g,index:p};if(u[p+1]===d[1])return{data:g,index:p}}else m===" "&&(m=" ");g+=m}})(n,t+1,arguments.length>3&&arguments[3]!==void 0?arguments[3]:">");if(!r)return;let s=r.data;const o=r.index,i=s.search(/\s/);let a=s,l=!0;i!==-1&&(a=s.substring(0,i),s=s.substring(i+1).trimStart());const c=a;if(e){const u=a.indexOf(":");u!==-1&&(a=a.substr(u+1),l=a!==r.data.substr(u+1))}return{tagName:a,tagExp:s,closeIndex:o,attrExpPresent:l,rawTagName:c}}function ir(n,t,e){const r=e;let s=1;for(;e<n.length;e++)if(n[e]==="<")if(n[e+1]==="/"){const o=tt(n,">",e,`${t} is not closed`);if(n.substring(e+2,o).trim()===t&&(s--,s===0))return{tagContent:n.substring(r,e),i:o};e=o}else if(n[e+1]==="?")e=tt(n,"?>",e+1,"StopNode is not closed.");else if(n.substr(e+1,3)==="!--")e=tt(n,"-->",e+3,"StopNode is not closed.");else if(n.substr(e+1,2)==="![")e=tt(n,"]]>",e,"StopNode is not closed.")-2;else{const o=Bt(n,e,">");o&&((o&&o.tagName)===t&&o.tagExp[o.tagExp.length-1]!=="/"&&s++,e=o.closeIndex)}}function We(n,t,e){if(t&&typeof n=="string"){const r=n.trim();return r==="true"||r!=="false"&&(function(s){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(o=Object.assign({},Hn,o),!s||typeof s!="string")return s;let i=s.trim();if(o.skipLike!==void 0&&o.skipLike.test(i))return s;if(s==="0")return 0;if(o.hex&&qn.test(i))return(function(l){if(parseInt)return parseInt(l,16);if(Number.parseInt)return Number.parseInt(l,16);if(window&&window.parseInt)return window.parseInt(l,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")})(i);if(i.includes("e")||i.includes("E"))return(function(l,c,u){if(!u.eNotation)return l;const f=c.match(Yn);if(f){let h=f[1]||"";const d=f[3].indexOf("e")===-1?"E":"e",g=f[2],p=h?l[g.length+1]===d:l[g.length]===d;return g.length>1&&p?l:g.length!==1||!f[3].startsWith(`.${d}`)&&f[3][0]!==d?u.leadingZeros&&!p?(c=(f[1]||"")+f[3],Number(c)):l:Number(c)}return l})(s,i,o);{const l=Gn.exec(i);if(l){const c=l[1]||"",u=l[2];let f=((a=l[3])&&a.indexOf(".")!==-1&&((a=a.replace(/0+$/,""))==="."?a="0":a[0]==="."?a="0"+a:a[a.length-1]==="."&&(a=a.substring(0,a.length-1))),a);const h=c?s[u.length+1]===".":s[u.length]===".";if(!o.leadingZeros&&(u.length>1||u.length===1&&!h))return s;{const d=Number(i),g=String(d);if(d===0)return d;if(g.search(/[eE]/)!==-1)return o.eNotation?d:s;if(i.indexOf(".")!==-1)return g==="0"||g===f||g===`${c}${f}`?d:s;let p=u?f:i;return u?p===g||c+p===g?d:s:p===g||p===c+g?d:s}}return s}var a})(n,e)}return n!==void 0?n:""}function ve(n,t,e){const r=Number.parseInt(n,t);return r>=0&&r<=1114111?String.fromCodePoint(r):e+n+";"}const Rt=K.getMetaDataSymbol();function ar(n,t){return Be(n,t)}function Be(n,t,e){let r;const s={};for(let o=0;o<n.length;o++){const i=n[o],a=ur(i);let l="";if(l=e===void 0?a:e+"."+a,a===t.textNodeName)r===void 0?r=i[a]:r+=""+i[a];else{if(a===void 0)continue;if(i[a]){let c=Be(i[a],t,l);const u=cr(c,t);i[Rt]!==void 0&&(c[Rt]=i[Rt]),i[":@"]?lr(c,i[":@"],l,t):Object.keys(c).length!==1||c[t.textNodeName]===void 0||t.alwaysCreateTextNode?Object.keys(c).length===0&&(t.alwaysCreateTextNode?c[t.textNodeName]="":c=""):c=c[t.textNodeName],s[a]!==void 0&&s.hasOwnProperty(a)?(Array.isArray(s[a])||(s[a]=[s[a]]),s[a].push(c)):t.isArray(a,l,u)?s[a]=[c]:s[a]=c}}}return typeof r=="string"?r.length>0&&(s[t.textNodeName]=r):r!==void 0&&(s[t.textNodeName]=r),s}function ur(n){const t=Object.keys(n);for(let e=0;e<t.length;e++){const r=t[e];if(r!==":@")return r}}function lr(n,t,e,r){if(t){const s=Object.keys(t),o=s.length;for(let i=0;i<o;i++){const a=s[i];r.isArray(a,e+"."+a,!0,!0)?n[a]=[t[a]]:n[a]=t[a]}}}function cr(n,t){const{textNodeName:e}=t,r=Object.keys(n).length;return r===0||!(r!==1||!n[e]&&typeof n[e]!="boolean"&&n[e]!==0)}const hr={allowBooleanAttributes:!1,unpairedTags:[]};function be(n){return n===" "||n===" "||n===`
`||n==="\r"}function we(n,t){const e=t;for(;t<n.length;t++)if(!(n[t]!="?"&&n[t]!=" ")){const r=n.substr(e,t-e);if(t>5&&r==="xml")return $("InvalidXml","XML declaration allowed only at the start of the document.",M(n,t));if(n[t]=="?"&&n[t+1]==">"){t++;break}}return t}function xe(n,t){if(n.length>t+5&&n[t+1]==="-"&&n[t+2]==="-"){for(t+=3;t<n.length;t++)if(n[t]==="-"&&n[t+1]==="-"&&n[t+2]===">"){t+=2;break}}else if(n.length>t+8&&n[t+1]==="D"&&n[t+2]==="O"&&n[t+3]==="C"&&n[t+4]==="T"&&n[t+5]==="Y"&&n[t+6]==="P"&&n[t+7]==="E"){let e=1;for(t+=8;t<n.length;t++)if(n[t]==="<")e++;else if(n[t]===">"&&(e--,e===0))break}else if(n.length>t+9&&n[t+1]==="["&&n[t+2]==="C"&&n[t+3]==="D"&&n[t+4]==="A"&&n[t+5]==="T"&&n[t+6]==="A"&&n[t+7]==="["){for(t+=8;t<n.length;t++)if(n[t]==="]"&&n[t+1]==="]"&&n[t+2]===">"){t+=2;break}}return t}function pr(n,t){let e="",r="",s=!1;for(;t<n.length;t++){if(n[t]==='"'||n[t]==="'")r===""?r=n[t]:r!==n[t]||(r="");else if(n[t]===">"&&r===""){s=!0;break}e+=n[t]}return r===""&&{value:e,index:t,tagClosed:s}}const fr=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Ee(n,t){const e=De(n,fr),r={};for(let s=0;s<e.length;s++){if(e[s][1].length===0)return $("InvalidAttr","Attribute '"+e[s][2]+"' has no space in starting.",ft(e[s]));if(e[s][3]!==void 0&&e[s][4]===void 0)return $("InvalidAttr","Attribute '"+e[s][2]+"' is without value.",ft(e[s]));if(e[s][3]===void 0&&!t.allowBooleanAttributes)return $("InvalidAttr","boolean attribute '"+e[s][2]+"' is not allowed.",ft(e[s]));const o=e[s][2];if(!dr(o))return $("InvalidAttr","Attribute '"+o+"' is an invalid name.",ft(e[s]));if(r.hasOwnProperty(o))return $("InvalidAttr","Attribute '"+o+"' is repeated.",ft(e[s]));r[o]=1}return!0}function gr(n,t){if(n[++t]===";")return-1;if(n[t]==="#")return(function(r,s){let o=/\d/;for(r[s]==="x"&&(s++,o=/[\da-fA-F]/);s<r.length;s++){if(r[s]===";")return s;if(!r[s].match(o))break}return-1})(n,++t);let e=0;for(;t<n.length;t++,e++)if(!(n[t].match(/\w/)&&e<20)){if(n[t]===";")break;return-1}return t}function $(n,t,e){return{err:{code:n,msg:t,line:e.line||e,col:e.col}}}function dr(n){return Tt(n)}function M(n,t){const e=n.substring(0,t).split(/\r?\n/);return{line:e.length,col:e[e.length-1].length+1}}function ft(n){return n.startIndex+n[1].length}class ze{constructor(t){this.externalEntities={},this.options=(function(e){return Object.assign({},Wn,e)})(t)}parse(t,e){if(typeof t!="string"&&t.toString)t=t.toString();else if(typeof t!="string")throw new Error("XML data is accepted in String or Bytes[] form.");if(e){e===!0&&(e={});const o=(function(i,a){a=Object.assign({},hr,a);const l=[];let c=!1,u=!1;i[0]==="\uFEFF"&&(i=i.substr(1));for(let f=0;f<i.length;f++)if(i[f]==="<"&&i[f+1]==="?"){if(f+=2,f=we(i,f),f.err)return f}else{if(i[f]!=="<"){if(be(i[f]))continue;return $("InvalidChar","char '"+i[f]+"' is not expected.",M(i,f))}{let h=f;if(f++,i[f]==="!"){f=xe(i,f);continue}{let d=!1;i[f]==="/"&&(d=!0,f++);let g="";for(;f<i.length&&i[f]!==">"&&i[f]!==" "&&i[f]!==" "&&i[f]!==`
`&&i[f]!=="\r";f++)g+=i[f];if(g=g.trim(),g[g.length-1]==="/"&&(g=g.substring(0,g.length-1),f--),!Tt(g)){let v;return v=g.trim().length===0?"Invalid space after '<'.":"Tag '"+g+"' is an invalid name.",$("InvalidTag",v,M(i,f))}const p=pr(i,f);if(p===!1)return $("InvalidAttr","Attributes for '"+g+"' have open quote.",M(i,f));let m=p.value;if(f=p.index,m[m.length-1]==="/"){const v=f-m.length;m=m.substring(0,m.length-1);const y=Ee(m,a);if(y!==!0)return $(y.err.code,y.err.msg,M(i,v+y.err.line));c=!0}else if(d){if(!p.tagClosed)return $("InvalidTag","Closing tag '"+g+"' doesn't have proper closing.",M(i,f));if(m.trim().length>0)return $("InvalidTag","Closing tag '"+g+"' can't have attributes or invalid starting.",M(i,h));if(l.length===0)return $("InvalidTag","Closing tag '"+g+"' has not been opened.",M(i,h));{const v=l.pop();if(g!==v.tagName){let y=M(i,v.tagStartPos);return $("InvalidTag","Expected closing tag '"+v.tagName+"' (opened in line "+y.line+", col "+y.col+") instead of closing tag '"+g+"'.",M(i,h))}l.length==0&&(u=!0)}}else{const v=Ee(m,a);if(v!==!0)return $(v.err.code,v.err.msg,M(i,f-m.length+v.err.line));if(u===!0)return $("InvalidXml","Multiple possible root nodes found.",M(i,f));a.unpairedTags.indexOf(g)!==-1||l.push({tagName:g,tagStartPos:h}),c=!0}for(f++;f<i.length;f++)if(i[f]==="<"){if(i[f+1]==="!"){f++,f=xe(i,f);continue}if(i[f+1]!=="?")break;if(f=we(i,++f),f.err)return f}else if(i[f]==="&"){const v=gr(i,f);if(v==-1)return $("InvalidChar","char '&' is not expected.",M(i,f));f=v}else if(u===!0&&!be(i[f]))return $("InvalidXml","Extra text at the end",M(i,f));i[f]==="<"&&f--}}}return c?l.length==1?$("InvalidTag","Unclosed tag '"+l[0].tagName+"'.",M(i,l[0].tagStartPos)):!(l.length>0)||$("InvalidXml","Invalid '"+JSON.stringify(l.map((f=>f.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):$("InvalidXml","Start tag expected.",1)})(t,e);if(o!==!0)throw Error(`${o.err.msg}:${o.err.line}:${o.err.col}`)}const r=new Xn(this.options);r.addExternalEntities(this.externalEntities);const s=r.parseXml(t);return this.options.preserveOrder||s===void 0?s:ar(s,this.options)}addEntity(t,e){if(e.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(t.indexOf("&")!==-1||t.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if(e==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}static getMetaDataSymbol(){return K.getMetaDataSymbol()}}var mr=T(829),H=T.n(mr),et=(function(n){return n.Array="array",n.Object="object",n.Original="original",n})(et||{});function qe(n,t){if(!n.endsWith("propstat.prop.displayname"))return t}function bt(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:et.Original;const r=H().get(n,t);return e==="array"&&Array.isArray(r)===!1?[r]:e==="object"&&Array.isArray(r)?r[0]:r}function St(n,t){return t=t??{attributeNamePrefix:"@",attributeParsers:[],tagParsers:[qe]},new Promise((e=>{e((function(r){const{multistatus:s}=r;if(s==="")return{multistatus:{response:[]}};if(!s)throw new Error("Invalid response: No root multistatus found");const o={multistatus:Array.isArray(s)?s[0]:s};return H().set(o,"multistatus.response",bt(o,"multistatus.response",et.Array)),H().set(o,"multistatus.response",H().get(o,"multistatus.response").map((i=>(function(a){const l=Object.assign({},a);return l.status?H().set(l,"status",bt(l,"status",et.Object)):(H().set(l,"propstat",bt(l,"propstat",et.Object)),H().set(l,"propstat.prop",bt(l,"propstat.prop",et.Object))),l})(i)))),o})((function(r){let{attributeNamePrefix:s,attributeParsers:o,tagParsers:i}=r;return new ze({allowBooleanAttributes:!0,attributeNamePrefix:s,textNodeName:"text",ignoreAttributes:!1,removeNSPrefix:!0,numberParseOptions:{hex:!0,leadingZeros:!1},attributeValueProcessor(a,l,c){for(const u of o)try{const f=u(c,l);if(f!==l)return f}catch{}return l},tagValueProcessor(a,l,c){for(const u of i)try{const f=u(c,l);if(f!==l)return f}catch{}return l}})})(t).parse(n)))}))}function Xt(n,t){let e=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const{getlastmodified:r=null,getcontentlength:s="0",resourcetype:o=null,getcontenttype:i=null,getetag:a=null}=n,l=o&&typeof o=="object"&&o.collection!==void 0?"directory":"file",c={filename:t,basename:xt().basename(t),lastmod:r,size:parseInt(s,10),type:l,etag:typeof a=="string"?a.replace(/"/g,""):null};return l==="file"&&(c.mime=i&&typeof i=="string"?i.split(";")[0]:""),e&&(n.displayname!==void 0&&(n.displayname=String(n.displayname)),c.props=n),c}function yr(n,t){let e=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=null;try{n.multistatus.response[0].propstat&&(r=n.multistatus.response[0])}catch{}if(!r)throw new Error("Failed getting item stat: bad response");const{propstat:{prop:s,status:o}}=r,[i,a,l]=o.split(" ",3),c=parseInt(a,10);if(c>=400){const u=new Error(`Invalid response: ${c} ${l}`);throw u.status=c,u}return Xt(s,mt(t),e)}function vr(n){switch(String(n)){case"-3":return"unlimited";case"-2":case"-1":return"unknown";default:return parseInt(String(n),10)}}function Lt(n,t,e){return e?t?t(n):n:(n&&n.then||(n=Promise.resolve(n)),t?n.then(t):n)}const Zt=(function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{details:r=!1}=e,s=C({url:j(n.remoteURL,S(t)),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},n,e);return Lt(I(s,n),(function(o){return k(n,o),Lt(o.text(),(function(i){return Lt(St(i,n.parsing),(function(a){const l=yr(a,t,r);return rt(o,l,r)}))}))}))}));function Ge(n,t,e){return e?t?t(n):n:(n&&n.then||(n=Promise.resolve(n)),t?n.then(t):n)}const br=He((function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=(function(o){if(!o||o==="/")return[];let i=o;const a=[];do a.push(i),i=xt().dirname(i);while(i&&i!=="/");return a})(mt(t));r.sort(((o,i)=>o.length>i.length?1:i.length>o.length?-1:0));let s=!1;return(function(o,i,a){if(typeof o[Pe]=="function"){let p=function(m){try{for(;!(l=f.next()).done;)if((m=i(l.value))&&m.then){if(!Ae(m))return void m.then(p,u||(u=_.bind(null,c=new nt,2)));m=m.v}c?_(c,1,m):c=m}catch(v){_(c||(c=new nt),2,v)}};var l,c,u,f=o[Pe]();if(p(),f.return){var h=function(m){try{l.done||f.return()}catch{}return m};if(c&&c.then)return c.then(h,(function(m){throw h(m)}));h()}return c}if(!("length"in o))throw new TypeError("Object is not iterable");for(var d=[],g=0;g<o.length;g++)d.push(o[g]);return(function(p,m,v){var y,b,w=-1;return(function x(N){try{for(;++w<p.length&&(!v||!v());)if((N=m(w))&&N.then){if(!Ae(N))return void N.then(x,b||(b=_.bind(null,y=new nt,2)));N=N.v}y?_(y,1,N):y=N}catch(P){_(y||(y=new nt),2,P)}})(),y})(d,(function(p){return i(d[p])}),a)})(r,(function(o){return i=function(){return(function(l,c){try{var u=Ge(Zt(n,o),(function(f){if(f.type!=="directory")throw new Error(`Path includes a file: ${t}`)}))}catch(f){return c(f)}return u&&u.then?u.then(void 0,c):u})(0,(function(l){const c=l;return(function(){if(c.status===404)return s=!0,Ne(zt(n,o,{...e,recursive:!1}));throw l})()}))},(a=(function(){if(s)return Ne(zt(n,o,{...e,recursive:!1}))})())&&a.then?a.then(i):i();var i,a}),(function(){return!1}))}));function He(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}}function wr(){}function Ne(n,t){return n&&n.then?n.then(wr):Promise.resolve()}const Pe=typeof Symbol<"u"?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function _(n,t,e){if(!n.s){if(e instanceof nt){if(!e.s)return void(e.o=_.bind(null,n,t));1&t&&(t=e.s),e=e.v}if(e&&e.then)return void e.then(_.bind(null,n,t),_.bind(null,n,2));n.s=t,n.v=e;const r=n.o;r&&r(n)}}const nt=(function(){function n(){}return n.prototype.then=function(t,e){const r=new n,s=this.s;if(s){const o=1&s?t:e;if(o){try{_(r,1,o(this.v))}catch(i){_(r,2,i)}return r}return this}return this.o=function(o){try{const i=o.v;1&o.s?_(r,1,t?t(i):i):e?_(r,1,e(i)):_(r,2,i)}catch(i){_(r,2,i)}},r},n})();function Ae(n){return n instanceof nt&&1&n.s}const zt=He((function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(e.recursive===!0)return br(n,t,e);const r=C({url:j(n.remoteURL,(s=S(t),s.endsWith("/")?s:s+"/")),method:"MKCOL"},n,e);var s;return Ge(I(r,n),(function(o){k(n,o)}))}));var xr=T(388),Oe=T.n(xr);const Er=(function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r={};if(typeof e.range=="object"&&typeof e.range.start=="number"){let a=`bytes=${e.range.start}-`;typeof e.range.end=="number"&&(a=`${a}${e.range.end}`),r.Range=a}const s=C({url:j(n.remoteURL,S(t)),method:"GET",headers:r},n,e);return i=function(a){if(k(n,a),r.Range&&a.status!==206){const l=new Error(`Invalid response code for partial request: ${a.status}`);throw l.status=a.status,l}return e.callback&&setTimeout((()=>{e.callback(a)}),0),a.body},(o=I(s,n))&&o.then||(o=Promise.resolve(o)),i?o.then(i):o;var o,i})),Nr=()=>{},Pr=(function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(n,t,e){e.url||(e.url=j(n.remoteURL,S(t)));const r=C(e,n,{});return o=function(i){return k(n,i),i},(s=I(r,n))&&s.then||(s=Promise.resolve(s)),o?s.then(o):s;var s,o})),Ar=(function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=C({url:j(n.remoteURL,S(t)),method:"DELETE"},n,e);return o=function(i){k(n,i)},(s=I(r,n))&&s.then||(s=Promise.resolve(s)),o?s.then(o):s;var s,o})),Or=(function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function(r,s){try{var o=(i=Zt(n,t,e),a=function(){return!0},l?a?a(i):i:(i&&i.then||(i=Promise.resolve(i)),a?i.then(a):i))}catch(c){return s(c)}var i,a,l;return o&&o.then?o.then(void 0,s):o})(0,(function(r){if(r.status===404)return!1;throw r}))}));function Mt(n,t,e){return e?t?t(n):n:(n&&n.then||(n=Promise.resolve(n)),t?n.then(t):n)}const Tr=(function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=C({url:j(n.remoteURL,S(t),"/"),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:e.deep?"infinity":"1"}},n,e);return Mt(I(r,n),(function(s){return k(n,s),Mt(s.text(),(function(o){if(!o)throw new Error("Failed parsing directory contents: Empty response");return Mt(St(o,n.parsing),(function(i){const a=se(t);let l=(function(c,u,f){let h=arguments.length>3&&arguments[3]!==void 0&&arguments[3],d=arguments.length>4&&arguments[4]!==void 0&&arguments[4];const g=xt().join(u,"/"),{multistatus:{response:p}}=c,m=p.map((v=>{const y=(function(w){try{return w.replace(/^https?:\/\/[^\/]+/,"")}catch(x){throw new F(x,"Failed normalising HREF")}})(v.href),{propstat:{prop:b}}=v;return Xt(b,g==="/"?decodeURIComponent(mt(y)):mt(xt().relative(decodeURIComponent(g),decodeURIComponent(y))),h)}));return d?m:m.filter((v=>v.basename&&(v.type==="file"||v.filename!==f.replace(/\/$/,""))))})(i,se(n.remoteBasePath||n.remotePath),a,e.details,e.includeSelf);return e.glob&&(l=(function(c,u){return c.filter((f=>L(f.filename,u,{matchBase:!0})))})(l,e.glob)),rt(s,l,e.details)}))}))}))}));function Jt(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}}const Sr=Jt((function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=C({url:j(n.remoteURL,S(t)),method:"GET",headers:{Accept:"text/plain"},transformResponse:[Ir]},n,e);return Ot(I(r,n),(function(s){return k(n,s),Ot(s.text(),(function(o){return rt(s,o,e.details)}))}))}));function Ot(n,t,e){return e?t?t(n):n:(n&&n.then||(n=Promise.resolve(n)),t?n.then(t):n)}const jr=Jt((function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=C({url:j(n.remoteURL,S(t)),method:"GET"},n,e);return Ot(I(r,n),(function(s){let o;return k(n,s),(function(i,a){var l=i();return l&&l.then?l.then(a):a()})((function(){return Ot(s.arrayBuffer(),(function(i){o=i}))}),(function(){return rt(s,o,e.details)}))}))})),$r=Jt((function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{format:r="binary"}=e;if(r!=="binary"&&r!=="text")throw new F({info:{code:Z.InvalidOutputFormat}},`Invalid output format: ${r}`);return r==="text"?Sr(n,t,e):jr(n,t,e)})),Ir=n=>n;function Cr(n,t){let e="";return t.format&&t.indentBy.length>0&&(e=`
`),Ye(n,t,"",e)}function Ye(n,t,e,r){let s="",o=!1;for(let i=0;i<n.length;i++){const a=n[i],l=kr(a);if(l===void 0)continue;let c="";if(c=e.length===0?l:`${e}.${l}`,l===t.textNodeName){let d=a[l];Rr(c,t)||(d=t.tagValueProcessor(l,d),d=Xe(d,t)),o&&(s+=r),s+=d,o=!1;continue}if(l===t.cdataPropName){o&&(s+=r),s+=`<![CDATA[${a[l][0][t.textNodeName]}]]>`,o=!1;continue}if(l===t.commentPropName){s+=r+`<!--${a[l][0][t.textNodeName]}-->`,o=!0;continue}if(l[0]==="?"){const d=Te(a[":@"],t),g=l==="?xml"?"":r;let p=a[l][0][t.textNodeName];p=p.length!==0?" "+p:"",s+=g+`<${l}${p}${d}?>`,o=!0;continue}let u=r;u!==""&&(u+=t.indentBy);const f=r+`<${l}${Te(a[":@"],t)}`,h=Ye(a[l],t,c,u);t.unpairedTags.indexOf(l)!==-1?t.suppressUnpairedNode?s+=f+">":s+=f+"/>":h&&h.length!==0||!t.suppressEmptyNode?h&&h.endsWith(">")?s+=f+`>${h}${r}</${l}>`:(s+=f+">",h&&r!==""&&(h.includes("/>")||h.includes("</"))?s+=r+t.indentBy+h+r:s+=h,s+=`</${l}>`):s+=f+"/>",o=!0}return s}function kr(n){const t=Object.keys(n);for(let e=0;e<t.length;e++){const r=t[e];if(n.hasOwnProperty(r)&&r!==":@")return r}}function Te(n,t){let e="";if(n&&!t.ignoreAttributes)for(let r in n){if(!n.hasOwnProperty(r))continue;let s=t.attributeValueProcessor(r,n[r]);s=Xe(s,t),s===!0&&t.suppressBooleanAttributes?e+=` ${r.substr(t.attributeNamePrefix.length)}`:e+=` ${r.substr(t.attributeNamePrefix.length)}="${s}"`}return e}function Rr(n,t){let e=(n=n.substr(0,n.length-t.textNodeName.length-1)).substr(n.lastIndexOf(".")+1);for(let r in t.stopNodes)if(t.stopNodes[r]===n||t.stopNodes[r]==="*."+e)return!0;return!1}function Xe(n,t){if(n&&n.length>0&&t.processEntities)for(let e=0;e<t.entities.length;e++){const r=t.entities[e];n=n.replace(r.regex,r.val)}return n}const Lr={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(n,t){return t},attributeValueProcessor:function(n,t){return t},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 X(n){this.options=Object.assign({},Lr,n),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=Ve(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=_r),this.processTextOrObjNode=Mr,this.options.format?(this.indentate=Ur,this.tagEndChar=`>
`,this.newLine=`
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function Mr(n,t,e,r){const s=this.j2x(n,e+1,r.concat(t));return n[this.options.textNodeName]!==void 0&&Object.keys(n).length===1?this.buildTextValNode(n[this.options.textNodeName],t,s.attrStr,e):this.buildObjectNode(s.val,t,s.attrStr,e)}function Ur(n){return this.options.indentBy.repeat(n)}function _r(n){return!(!n.startsWith(this.options.attributeNamePrefix)||n===this.options.textNodeName)&&n.substr(this.attrPrefixLen)}function Fr(n){return new X({attributeNamePrefix:"@_",format:!0,ignoreAttributes:!1,suppressEmptyNode:!0}).build(Ze({lockinfo:{"@_xmlns:d":"DAV:",lockscope:{exclusive:{}},locktype:{write:{}},owner:{href:n}}},"d"))}function Ze(n,t){const e={...n};for(const r in e)e.hasOwnProperty(r)&&(e[r]&&typeof e[r]=="object"&&r.indexOf(":")===-1?(e[`${t}:${r}`]=Ze(e[r],t),delete e[r]):/^@_/.test(r)===!1&&(e[`${t}:${r}`]=e[r],delete e[r]));return e}function qt(n,t,e){return e?t?t(n):n:(n&&n.then||(n=Promise.resolve(n)),t?n.then(t):n)}function Je(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}}X.prototype.build=function(n){return this.options.preserveOrder?Cr(n,this.options):(Array.isArray(n)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(n={[this.options.arrayNodeName]:n}),this.j2x(n,0,[]).val)},X.prototype.j2x=function(n,t,e){let r="",s="";const o=e.join(".");for(let i in n)if(Object.prototype.hasOwnProperty.call(n,i))if(n[i]===void 0)this.isAttribute(i)&&(s+="");else if(n[i]===null)this.isAttribute(i)||i===this.options.cdataPropName?s+="":i[0]==="?"?s+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:s+=this.indentate(t)+"<"+i+"/"+this.tagEndChar;else if(n[i]instanceof Date)s+=this.buildTextValNode(n[i],i,"",t);else if(typeof n[i]!="object"){const a=this.isAttribute(i);if(a&&!this.ignoreAttributesFn(a,o))r+=this.buildAttrPairStr(a,""+n[i]);else if(!a)if(i===this.options.textNodeName){let l=this.options.tagValueProcessor(i,""+n[i]);s+=this.replaceEntitiesValue(l)}else s+=this.buildTextValNode(n[i],i,"",t)}else if(Array.isArray(n[i])){const a=n[i].length;let l="",c="";for(let u=0;u<a;u++){const f=n[i][u];if(f!==void 0)if(f===null)i[0]==="?"?s+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:s+=this.indentate(t)+"<"+i+"/"+this.tagEndChar;else if(typeof f=="object")if(this.options.oneListGroup){const h=this.j2x(f,t+1,e.concat(i));l+=h.val,this.options.attributesGroupName&&f.hasOwnProperty(this.options.attributesGroupName)&&(c+=h.attrStr)}else l+=this.processTextOrObjNode(f,i,t,e);else if(this.options.oneListGroup){let h=this.options.tagValueProcessor(i,f);h=this.replaceEntitiesValue(h),l+=h}else l+=this.buildTextValNode(f,i,"",t)}this.options.oneListGroup&&(l=this.buildObjectNode(l,i,c,t)),s+=l}else if(this.options.attributesGroupName&&i===this.options.attributesGroupName){const a=Object.keys(n[i]),l=a.length;for(let c=0;c<l;c++)r+=this.buildAttrPairStr(a[c],""+n[i][a[c]])}else s+=this.processTextOrObjNode(n[i],i,t,e);return{attrStr:r,val:s}},X.prototype.buildAttrPairStr=function(n,t){return t=this.options.attributeValueProcessor(n,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&t==="true"?" "+n:" "+n+'="'+t+'"'},X.prototype.buildObjectNode=function(n,t,e,r){if(n==="")return t[0]==="?"?this.indentate(r)+"<"+t+e+"?"+this.tagEndChar:this.indentate(r)+"<"+t+e+this.closeTag(t)+this.tagEndChar;{let s="</"+t+this.tagEndChar,o="";return t[0]==="?"&&(o="?",s=""),!e&&e!==""||n.indexOf("<")!==-1?this.options.commentPropName!==!1&&t===this.options.commentPropName&&o.length===0?this.indentate(r)+`<!--${n}-->`+this.newLine:this.indentate(r)+"<"+t+e+o+this.tagEndChar+n+this.indentate(r)+s:this.indentate(r)+"<"+t+e+o+">"+n+s}},X.prototype.closeTag=function(n){let t="";return this.options.unpairedTags.indexOf(n)!==-1?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${n}`,t},X.prototype.buildTextValNode=function(n,t,e,r){if(this.options.cdataPropName!==!1&&t===this.options.cdataPropName)return this.indentate(r)+`<![CDATA[${n}]]>`+this.newLine;if(this.options.commentPropName!==!1&&t===this.options.commentPropName)return this.indentate(r)+`<!--${n}-->`+this.newLine;if(t[0]==="?")return this.indentate(r)+"<"+t+e+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(t,n);return s=this.replaceEntitiesValue(s),s===""?this.indentate(r)+"<"+t+e+this.closeTag(t)+this.tagEndChar:this.indentate(r)+"<"+t+e+">"+s+"</"+t+this.tagEndChar}},X.prototype.replaceEntitiesValue=function(n){if(n&&n.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const e=this.options.entities[t];n=n.replace(e.regex,e.val)}return n};const Dr=Je((function(n,t,e){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=C({url:j(n.remoteURL,S(t)),method:"UNLOCK",headers:{"Lock-Token":e}},n,r);return qt(I(s,n),(function(o){if(k(n,o),o.status!==204&&o.status!==200)throw Yt(o)}))})),Vr=Je((function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{refreshToken:r,timeout:s=Wr}=e,o={Accept:"text/plain,application/xml",Timeout:s};r&&(o.If=r);const i=C({url:j(n.remoteURL,S(t)),method:"LOCK",headers:o,data:Fr(n.contactHref)},n,e);return qt(I(i,n),(function(a){return k(n,a),qt(a.text(),(function(l){const c=(h=l,new ze({removeNSPrefix:!0,parseAttributeValue:!0,parseTagValue:!0}).parse(h)),u=H().get(c,"prop.lockdiscovery.activelock.locktoken.href"),f=H().get(c,"prop.lockdiscovery.activelock.timeout");var h;if(!u)throw Yt(a,"No lock token received: ");return{token:u,serverTimeout:f}}))}))})),Wr="Infinite, Second-4100000000";function Ut(n,t,e){return e?t?t(n):n:(n&&n.then||(n=Promise.resolve(n)),t?n.then(t):n)}const Br=(function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const e=t.path||"/",r=C({url:j(n.remoteURL,e),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},n,t);return Ut(I(r,n),(function(s){return k(n,s),Ut(s.text(),(function(o){return Ut(St(o,n.parsing),(function(i){const a=(function(l){try{const[c]=l.multistatus.response,{propstat:{prop:{"quota-used-bytes":u,"quota-available-bytes":f}}}=c;return u!==void 0&&f!==void 0?{used:parseInt(String(u),10),available:vr(f)}:null}catch{}return null})(i);return rt(s,a,t.details)}))}))}))}));function _t(n,t,e){return e?t?t(n):n:(n&&n.then||(n=Promise.resolve(n)),t?n.then(t):n)}const zr=(function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{details:r=!1}=e,s=C({url:j(n.remoteURL,S(t)),method:"SEARCH",headers:{Accept:"text/plain,application/xml","Content-Type":n.headers["Content-Type"]||"application/xml; charset=utf-8"}},n,e);return _t(I(s,n),(function(o){return k(n,o),_t(o.text(),(function(i){return _t(St(i,n.parsing),(function(a){const l=(function(c,u,f){const h={truncated:!1,results:[]};return h.truncated=c.multistatus.response.some((d=>(d.status||d.propstat?.status).split(" ",3)?.[1]==="507"&&d.href.replace(/\/$/,"").endsWith(S(u).replace(/\/$/,"")))),c.multistatus.response.forEach((d=>{if(d.propstat===void 0)return;const g=d.href.split("/").map(decodeURIComponent).join("/");h.results.push(Xt(d.propstat.prop,g,f))})),h})(a,t,r);return rt(o,l,r)}))}))}))})),qr=(function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(n,t,e){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=C({url:j(n.remoteURL,S(t)),method:"MOVE",headers:{Destination:j(n.remoteURL,S(e)),Overwrite:r.overwrite===!1?"F":"T"}},n,r);return i=function(a){k(n,a)},(o=I(s,n))&&o.then||(o=Promise.resolve(o)),i?o.then(i):o;var o,i}));var Gr=T(172);function Hr(n){if(ke(n))return n.byteLength;if(Re(n))return n.length;if(typeof n=="string")return(0,Gr.d)(n);throw new F({info:{code:Z.DataTypeNoLength}},"Cannot calculate data length: Invalid type")}const Yr=(function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(n,t,e){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const{contentLength:s=!0,overwrite:o=!0}=r,i={"Content-Type":"application/octet-stream"};s===!1||(i["Content-Length"]=typeof s=="number"?`${s}`:`${Hr(e)}`),o||(i["If-None-Match"]="*");const a=C({url:j(n.remoteURL,S(t)),method:"PUT",headers:i,data:e},n,r);return c=function(u){try{k(n,u)}catch(f){const h=f;if(h.status!==412||o)throw h;return!1}return!0},(l=I(a,n))&&l.then||(l=Promise.resolve(l)),c?l.then(c):l;var l,c})),Qe=(function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=C({url:j(n.remoteURL,S(t)),method:"OPTIONS"},n,e);return o=function(i){try{k(n,i)}catch(a){throw a}return{compliance:(i.headers.get("DAV")??"").split(",").map((a=>a.trim())),server:i.headers.get("Server")??""}},(s=I(r,n))&&s.then||(s=Promise.resolve(s)),o?s.then(o):s;var s,o}));function dt(n,t,e){return e?t?t(n):n:(n&&n.then||(n=Promise.resolve(n)),t?n.then(t):n)}const Xr=Qt((function(n,t,e,r,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(e>r||e<0)throw new F({info:{code:Z.InvalidUpdateRange}},`Invalid update range ${e} for partial update`);const i={"Content-Type":"application/octet-stream","Content-Length":""+(r-e+1),"Content-Range":`bytes ${e}-${r}/*`},a=C({url:j(n.remoteURL,S(t)),method:"PUT",headers:i,data:s},n,o);return dt(I(a,n),(function(l){k(n,l)}))}));function Se(n,t){var e=n();return e&&e.then?e.then(t):t(e)}const Zr=Qt((function(n,t,e,r,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(e>r||e<0)throw new F({info:{code:Z.InvalidUpdateRange}},`Invalid update range ${e} for partial update`);const i={"Content-Type":"application/x-sabredav-partialupdate","Content-Length":""+(r-e+1),"X-Update-Range":`bytes=${e}-${r}`},a=C({url:j(n.remoteURL,S(t)),method:"PATCH",headers:i,data:s},n,o);return dt(I(a,n),(function(l){k(n,l)}))}));function Qt(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}}const Jr=Qt((function(n,t,e,r,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};return dt(Qe(n,t,o),(function(i){let a=!1;return Se((function(){if(i.compliance.includes("sabredav-partialupdate"))return dt(Zr(n,t,e,r,s,o),(function(l){return a=!0,l}))}),(function(l){let c=!1;return a?l:Se((function(){if(i.server.includes("Apache")&&i.compliance.includes("<http://apache.org/dav/propset/fs/1>"))return dt(Xr(n,t,e,r,s,o),(function(u){return c=!0,u}))}),(function(u){if(c)return u;throw new F({info:{code:Z.NotSupported}},"Not supported")}))}))}))})),Qr="https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";function es(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{authType:e=null,remoteBasePath:r,contactHref:s=Qr,ha1:o,headers:i={},httpAgent:a,httpsAgent:l,password:c,token:u,username:f,withCredentials:h}=t;let d=e;d||(d=f||c?V.Password:V.None);const g={authType:d,remoteBasePath:r,contactHref:s,ha1:o,headers:Object.assign({},i),httpAgent:a,httpsAgent:l,password:c,parsing:{attributeNamePrefix:t.attributeNamePrefix??"@",attributeParsers:[],tagParsers:[qe]},remotePath:sn(n),remoteURL:n,token:u,username:f,withCredentials:h};return Ie(g,f,c,u,o),{copyFile:(p,m,v)=>Vn(g,p,m,v),createDirectory:(p,m)=>zt(g,p,m),createReadStream:(p,m)=>(function(v,y){let b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const w=new(Oe()).PassThrough;return Er(v,y,b).then((x=>{x.pipe(w)})).catch((x=>{w.emit("error",x)})),w})(g,p,m),createWriteStream:(p,m,v)=>(function(y,b){let w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Nr;const N=new(Oe()).PassThrough,P={};w.overwrite===!1&&(P["If-None-Match"]="*");const O=C({url:j(y.remoteURL,S(b)),method:"PUT",headers:P,data:N,maxRedirects:0},y,w);return I(O,y).then((A=>k(y,A))).then((A=>{setTimeout((()=>{x(A)}),0)})).catch((A=>{N.emit("error",A)})),N})(g,p,m,v),customRequest:(p,m)=>Pr(g,p,m),deleteFile:(p,m)=>Ar(g,p,m),exists:(p,m)=>Or(g,p,m),getDirectoryContents:(p,m)=>Tr(g,p,m),getFileContents:(p,m)=>$r(g,p,m),getFileDownloadLink:p=>(function(m,v){let y=j(m.remoteURL,S(v));const b=/^https:/i.test(y)?"https":"http";switch(m.authType){case V.None:break;case V.Password:{const w=ie(m.headers.Authorization.replace(/^Basic /i,"").trim());y=y.replace(/^https?:\/\//,`${b}://${w}@`);break}default:throw new F({info:{code:Z.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${m.authType}`)}return y})(g,p),getFileUploadLink:p=>(function(m,v){let y=`${j(m.remoteURL,S(v))}?Content-Type=application/octet-stream`;const b=/^https:/i.test(y)?"https":"http";switch(m.authType){case V.None:break;case V.Password:{const w=ie(m.headers.Authorization.replace(/^Basic /i,"").trim());y=y.replace(/^https?:\/\//,`${b}://${w}@`);break}default:throw new F({info:{code:Z.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${m.authType}`)}return y})(g,p),getHeaders:()=>Object.assign({},g.headers),getQuota:p=>Br(g,p),lock:(p,m)=>Vr(g,p,m),moveFile:(p,m,v)=>qr(g,p,m,v),putFileContents:(p,m,v)=>Yr(g,p,m,v),partialUpdateFileContents:(p,m,v,y,b)=>Jr(g,p,m,v,y,b),getDAVCompliance:p=>Qe(g,p),search:(p,m)=>zr(g,p,m),setHeaders:p=>{g.headers=Object.assign({},p)},stat:(p,m)=>Zt(g,p,m),unlock:(p,m,v)=>Dr(g,p,m,v),registerAttributeParser:p=>{g.parsing.attributeParsers.push(p)},registerTagParser:p=>{g.parsing.tagParsers.push(p)}}}export{St as K,hn as _,es as l};
//# sourceMappingURL=index-BDmvh1Np.chunk.mjs.map