mirror of
https://github.com/crowetic/nc-talk-ai.git
synced 2026-09-07 15:42:31 +00:00
Talk AI is a multi-bot AI assistant manager for Nextcloud Talk: per-bot prompts and models, agentic tool calling (MCP + built-in tools), RAG over Nextcloud files, room-document search, vision and speech-to-text attachments, persistent bot wikis, approval workflows, rate limiting, and multi-provider LLM support (any OpenAI-compatible endpoint). Developed within EDUC - the European Digital UniverCity (https://educalliance.eu), where it runs as the 'EDUC AI' assistant on the alliance-wide Nextcloud portal. This public repository is the upstream point of truth; deployment-specific tools plug in via the tool-provider extension point (docs/TOOL_PROVIDERS.md). License: AGPL-3.0-or-later.
1 line
148 KiB
XML
1 line
148 KiB
XML
{"version":3,"mappings":";;AAC4ktB,yBAA4BA,CAAC,CAAC,IAAGC,CAAE,SAAS,CAAC,QAAO,UAAUA,CAAC;AAAi/1B,gBAAmBA,UAAS,CAAE,KAAK;AAAoQ,wBAA2BA,MAAMC,CAAC,KAAEC,CAAIC,UAAU,KAAa,WAAV,OAAoBC,GAAEC,GAAIC,KAAE,KAAK,WAAM,OAAeA,IAAIF,CAAC,OAAME,CAAE,KAAKD,IAAG,KAAK,OAAM,cAAgBC,EAAED,MAAM,CAACD,GAAE,OAAQ,CAAC,QAAOD,EAAGI,KAAIC,CAAE,MAAM,IAAG,KAAGC,CAAIN,QAAE,CAAOO,KAAKH,QAAM,MAAOE,OAAM,CAAQT,MAAG,CAAR,GAAU,SAAM,CAAI,MAAM,SAAQ,YAAa,KAAC,OAAU,IAAK,QAAQ,KAAK,SAAS,QAAQ,CAACW,MAAM,OAAMZ,CAAE,SAAK,UAAkBC,CAAP,OAAS,OAAU,KAAQA,UAAE,CAAM,OAAOU,KAAI,MAAMA,CAAEV,KAAE,OAAQ,CAAGY,KAAI,IAAIC,EAAGC,SAAQ,QAAQ,EAAGF,KAAK,YAAS,CAAIG,SAAQ,QAAOC,EAAIN,KAAI,MAAO,SAAQ,OAAQ,SAAS,OAAOO,IAAGlB,CAAE,MAAImB,CAAGC,MAAK,IA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","Gt","K","ne","We","Ve","Le","Me","Fe","ke","In","Un","Dn","Fn","Bn","Wn","jn","Ln","zt","Gn","Ge","He","qn","Hn","Zn","Ke","tn","Yn","Xn","Je","Kn","G","q","Jn","I","tr","Qn","er","nr","rr","sr","or","ir","ur","d","y","f","j","v","Ye","g","$","fn","mn","yn","gn","bn","N","logger","getLoggerBuilder","FileType","FileType2","Permission","Permission2","isDavResource","source","data","davService","service","NodeStatus","NodeStatus2","prop","value","target","receiver","validateData","getDavNameSpaces","getDavProperties","getFavoritesReport","getCurrentUser"],"ignoreList":[0,1],"sources":["../node_modules/webdav/dist/web/index.js","../node_modules/@nextcloud/files/dist/chunks/dav-Rt1kTtvI.mjs"],"sourcesContent":["/*! For license information please see index.js.LICENSE.txt */\nvar t={2:t=>{function e(t,e,o){t instanceof RegExp&&(t=n(t,o)),e instanceof RegExp&&(e=n(e,o));var i=r(t,e,o);return i&&{start:i[0],end:i[1],pre:o.slice(0,i[0]),body:o.slice(i[0]+t.length,i[1]),post:o.slice(i[1]+e.length)}}function n(t,e){var n=e.match(t);return n?n[0]:null}function r(t,e,n){var r,o,i,s,a,u=n.indexOf(t),l=n.indexOf(e,u+1),c=u;if(u>=0&&l>0){for(r=[],i=n.length;c>=0&&!a;)c==u?(r.push(c),u=n.indexOf(t,c+1)):1==r.length?a=[r.pop(),l]:((o=r.pop())<i&&(i=o,s=l),l=n.indexOf(e,c+1)),c=u<l&&u>=0?u:l;r.length&&(a=[i,s])}return a}t.exports=e,e.range=r},47:(t,e,n)=>{var r=n(410),o=function(t){return\"string\"==typeof t};function i(t,e){for(var n=[],r=0;r<t.length;r++){var o=t[r];o&&\".\"!==o&&(\"..\"===o?n.length&&\"..\"!==n[n.length-1]?n.pop():e&&n.push(\"..\"):n.push(o))}return n}var s=/^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/,a={};function u(t){return s.exec(t).slice(1)}a.resolve=function(){for(var t=\"\",e=!1,n=arguments.length-1;n>=-1&&!e;n--){var r=n>=0?arguments[n]:process.cwd();if(!o(r))throw new TypeError(\"Arguments to path.resolve must be strings\");r&&(t=r+\"/\"+t,e=\"/\"===r.charAt(0))}return(e?\"/\":\"\")+(t=i(t.split(\"/\"),!e).join(\"/\"))||\".\"},a.normalize=function(t){var e=a.isAbsolute(t),n=\"/\"===t.substr(-1);return(t=i(t.split(\"/\"),!e).join(\"/\"))||e||(t=\".\"),t&&n&&(t+=\"/\"),(e?\"/\":\"\")+t},a.isAbsolute=function(t){return\"/\"===t.charAt(0)},a.join=function(){for(var t=\"\",e=0;e<arguments.length;e++){var n=arguments[e];if(!o(n))throw new TypeError(\"Arguments to path.join must be strings\");n&&(t+=t?\"/\"+n:n)}return a.normalize(t)},a.relative=function(t,e){function n(t){for(var e=0;e<t.length&&\"\"===t[e];e++);for(var n=t.length-1;n>=0&&\"\"===t[n];n--);return e>n?[]:t.slice(e,n+1)}t=a.resolve(t).substr(1),e=a.resolve(e).substr(1);for(var r=n(t.split(\"/\")),o=n(e.split(\"/\")),i=Math.min(r.length,o.length),s=i,u=0;u<i;u++)if(r[u]!==o[u]){s=u;break}var l=[];for(u=s;u<r.length;u++)l.push(\"..\");return(l=l.concat(o.slice(s))).join(\"/\")},a._makeLong=function(t){return t},a.dirname=function(t){var e=u(t),n=e[0],r=e[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):\".\"},a.basename=function(t,e){var n=u(t)[2];return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},a.extname=function(t){return u(t)[3]},a.format=function(t){if(!r.isObject(t))throw new TypeError(\"Parameter 'pathObject' must be an object, not \"+typeof t);var e=t.root||\"\";if(!o(e))throw new TypeError(\"'pathObject.root' must be a string or undefined, not \"+typeof t.root);return(t.dir?t.dir+a.sep:\"\")+(t.base||\"\")},a.parse=function(t){if(!o(t))throw new TypeError(\"Parameter 'pathString' must be a string, not \"+typeof t);var e=u(t);if(!e||4!==e.length)throw new TypeError(\"Invalid path '\"+t+\"'\");return e[1]=e[1]||\"\",e[2]=e[2]||\"\",e[3]=e[3]||\"\",{root:e[0],dir:e[0]+e[1].slice(0,e[1].length-1),base:e[2],ext:e[3],name:e[2].slice(0,e[2].length-e[3].length)}},a.sep=\"/\",a.delimiter=\":\",t.exports=a},101:function(t,e,n){var r;t=n.nmd(t),function(){var o=(t&&t.exports,\"object\"==typeof global&&global);o.global!==o&&o.window;var i=function(t){this.message=t};(i.prototype=new Error).name=\"InvalidCharacterError\";var s=function(t){throw new i(t)},a=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",u=/[\\t\\n\\f\\r ]/g,l={encode:function(t){t=String(t),/[^\\0-\\xFF]/.test(t)&&s(\"The string to be encoded contains characters outside of the Latin1 range.\");for(var e,n,r,o,i=t.length%3,u=\"\",l=-1,c=t.length-i;++l<c;)e=t.charCodeAt(l)<<16,n=t.charCodeAt(++l)<<8,r=t.charCodeAt(++l),u+=a.charAt((o=e+n+r)>>18&63)+a.charAt(o>>12&63)+a.charAt(o>>6&63)+a.charAt(63&o);return 2==i?(e=t.charCodeAt(l)<<8,n=t.charCodeAt(++l),u+=a.charAt((o=e+n)>>10)+a.charAt(o>>4&63)+a.charAt(o<<2&63)+\"=\"):1==i&&(o=t.charCodeAt(l),u+=a.charAt(o>>2)+a.charAt(o<<4&63)+\"==\"),u},decode:function(t){var e=(t=String(t).replace(u,\"\")).length;e%4==0&&(e=(t=t.replace(/==?$/,\"\")).length),(e%4==1||/[^+a-zA-Z0-9/]/.test(t))&&s(\"Invalid character: the string to be decoded is not correctly encoded.\");for(var n,r,o=0,i=\"\",l=-1;++l<e;)r=a.indexOf(t.charAt(l)),n=o%4?64*n+r:r,o++%4&&(i+=String.fromCharCode(255&n>>(-2*o&6)));return i},version:\"1.0.0\"};void 0===(r=function(){return l}.call(e,n,e,t))||(t.exports=r)}()},135:t=>{function e(t){return!!t.constructor&&\"function\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}t.exports=function(t){return null!=t&&(e(t)||function(t){return\"function\"==typeof t.readFloatLE&&\"function\"==typeof t.slice&&e(t.slice(0,0))}(t)||!!t._isBuffer)}},172:(t,e)=>{e.d=function(t){if(!t)return 0;for(var e=(t=t.toString()).length,n=t.length;n--;){var r=t.charCodeAt(n);56320<=r&&r<=57343&&n--,127<r&&r<=2047?e++:2047<r&&r<=65535&&(e+=2)}return e}},285:(t,e,n)=>{var r=n(2);t.exports=function(t){return t?(\"{}\"===t.substr(0,2)&&(t=\"\\\\{\\\\}\"+t.substr(2)),m(function(t){return t.split(\"\\\\\\\\\").join(o).split(\"\\\\{\").join(i).split(\"\\\\}\").join(s).split(\"\\\\,\").join(a).split(\"\\\\.\").join(u)}(t),!0).map(c)):[]};var o=\"\\0SLASH\"+Math.random()+\"\\0\",i=\"\\0OPEN\"+Math.random()+\"\\0\",s=\"\\0CLOSE\"+Math.random()+\"\\0\",a=\"\\0COMMA\"+Math.random()+\"\\0\",u=\"\\0PERIOD\"+Math.random()+\"\\0\";function l(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function c(t){return t.split(o).join(\"\\\\\").split(i).join(\"{\").split(s).join(\"}\").split(a).join(\",\").split(u).join(\".\")}function h(t){if(!t)return[\"\"];var e=[],n=r(\"{\",\"}\",t);if(!n)return t.split(\",\");var o=n.pre,i=n.body,s=n.post,a=o.split(\",\");a[a.length-1]+=\"{\"+i+\"}\";var u=h(s);return s.length&&(a[a.length-1]+=u.shift(),a.push.apply(a,u)),e.push.apply(e,a),e}function p(t){return\"{\"+t+\"}\"}function f(t){return/^-?0\\d/.test(t)}function d(t,e){return t<=e}function g(t,e){return t>=e}function m(t,e){var n=[],o=r(\"{\",\"}\",t);if(!o)return[t];var i=o.pre,a=o.post.length?m(o.post,!1):[\"\"];if(/\\$$/.test(o.pre))for(var u=0;u<a.length;u++){var c=i+\"{\"+o.body+\"}\"+a[u];n.push(c)}else{var y,v,b=/^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(o.body),w=/^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(o.body),x=b||w,E=o.body.indexOf(\",\")>=0;if(!x&&!E)return o.post.match(/,(?!,).*\\}/)?m(t=o.pre+\"{\"+o.body+s+o.post):[t];if(x)y=o.body.split(/\\.\\./);else if(1===(y=h(o.body)).length&&1===(y=m(y[0],!1).map(p)).length)return a.map((function(t){return o.pre+y[0]+t}));if(x){var N=l(y[0]),P=l(y[1]),A=Math.max(y[0].length,y[1].length),T=3==y.length?Math.abs(l(y[2])):1,O=d;P<N&&(T*=-1,O=g);var S=y.some(f);v=[];for(var j=N;O(j,P);j+=T){var I;if(w)\"\\\\\"===(I=String.fromCharCode(j))&&(I=\"\");else if(I=String(j),S){var $=A-I.length;if($>0){var C=new Array($+1).join(\"0\");I=j<0?\"-\"+C+I.slice(1):C+I}}v.push(I)}}else{v=[];for(var R=0;R<y.length;R++)v.push.apply(v,m(y[R],!1))}for(R=0;R<v.length;R++)for(u=0;u<a.length;u++)c=i+v[R]+a[u],(!e||x||c)&&n.push(c)}return n}},298:t=>{var e,n;e=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",n={rotl:function(t,e){return t<<e|t>>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&n.rotl(t,8)|4278255360&n.rotl(t,24);for(var e=0;e<t.length;e++)t[e]=n.endian(t[e]);return t},randomBytes:function(t){for(var e=[];t>0;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],n=0,r=0;n<t.length;n++,r+=8)e[r>>>5]|=t[n]<<24-r%32;return e},wordsToBytes:function(t){for(var e=[],n=0;n<32*t.length;n+=8)e.push(t[n>>>5]>>>24-n%32&255);return e},bytesToHex:function(t){for(var e=[],n=0;n<t.length;n++)e.push((t[n]>>>4).toString(16)),e.push((15&t[n]).toString(16));return e.join(\"\")},hexToBytes:function(t){for(var e=[],n=0;n<t.length;n+=2)e.push(parseInt(t.substr(n,2),16));return e},bytesToBase64:function(t){for(var n=[],r=0;r<t.length;r+=3)for(var o=t[r]<<16|t[r+1]<<8|t[r+2],i=0;i<4;i++)8*r+6*i<=8*t.length?n.push(e.charAt(o>>>6*(3-i)&63)):n.push(\"=\");return n.join(\"\")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\\/]/gi,\"\");for(var n=[],r=0,o=0;r<t.length;o=++r%4)0!=o&&n.push((e.indexOf(t.charAt(r-1))&Math.pow(2,-2*o+8)-1)<<2*o|e.indexOf(t.charAt(r))>>>6-2*o);return n}},t.exports=n},345:()=>{},388:()=>{},410:()=>{},526:t=>{var e={utf8:{stringToBytes:function(t){return e.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(e.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],n=0;n<t.length;n++)e.push(255&t.charCodeAt(n));return e},bytesToString:function(t){for(var e=[],n=0;n<t.length;n++)e.push(String.fromCharCode(t[n]));return e.join(\"\")}}};t.exports=e},542:(t,e,n)=>{!function(){var e=n(298),r=n(526).utf8,o=n(135),i=n(526).bin,s=function(t,n){t.constructor==String?t=n&&\"binary\"===n.encoding?i.stringToBytes(t):r.stringToBytes(t):o(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||t.constructor===Uint8Array||(t=t.toString());for(var a=e.bytesToWords(t),u=8*t.length,l=1732584193,c=-271733879,h=-1732584194,p=271733878,f=0;f<a.length;f++)a[f]=16711935&(a[f]<<8|a[f]>>>24)|4278255360&(a[f]<<24|a[f]>>>8);a[u>>>5]|=128<<u%32,a[14+(u+64>>>9<<4)]=u;var d=s._ff,g=s._gg,m=s._hh,y=s._ii;for(f=0;f<a.length;f+=16){var v=l,b=c,w=h,x=p;l=d(l,c,h,p,a[f+0],7,-680876936),p=d(p,l,c,h,a[f+1],12,-389564586),h=d(h,p,l,c,a[f+2],17,606105819),c=d(c,h,p,l,a[f+3],22,-1044525330),l=d(l,c,h,p,a[f+4],7,-176418897),p=d(p,l,c,h,a[f+5],12,1200080426),h=d(h,p,l,c,a[f+6],17,-1473231341),c=d(c,h,p,l,a[f+7],22,-45705983),l=d(l,c,h,p,a[f+8],7,1770035416),p=d(p,l,c,h,a[f+9],12,-1958414417),h=d(h,p,l,c,a[f+10],17,-42063),c=d(c,h,p,l,a[f+11],22,-1990404162),l=d(l,c,h,p,a[f+12],7,1804603682),p=d(p,l,c,h,a[f+13],12,-40341101),h=d(h,p,l,c,a[f+14],17,-1502002290),l=g(l,c=d(c,h,p,l,a[f+15],22,1236535329),h,p,a[f+1],5,-165796510),p=g(p,l,c,h,a[f+6],9,-1069501632),h=g(h,p,l,c,a[f+11],14,643717713),c=g(c,h,p,l,a[f+0],20,-373897302),l=g(l,c,h,p,a[f+5],5,-701558691),p=g(p,l,c,h,a[f+10],9,38016083),h=g(h,p,l,c,a[f+15],14,-660478335),c=g(c,h,p,l,a[f+4],20,-405537848),l=g(l,c,h,p,a[f+9],5,568446438),p=g(p,l,c,h,a[f+14],9,-1019803690),h=g(h,p,l,c,a[f+3],14,-187363961),c=g(c,h,p,l,a[f+8],20,1163531501),l=g(l,c,h,p,a[f+13],5,-1444681467),p=g(p,l,c,h,a[f+2],9,-51403784),h=g(h,p,l,c,a[f+7],14,1735328473),l=m(l,c=g(c,h,p,l,a[f+12],20,-1926607734),h,p,a[f+5],4,-378558),p=m(p,l,c,h,a[f+8],11,-2022574463),h=m(h,p,l,c,a[f+11],16,1839030562),c=m(c,h,p,l,a[f+14],23,-35309556),l=m(l,c,h,p,a[f+1],4,-1530992060),p=m(p,l,c,h,a[f+4],11,1272893353),h=m(h,p,l,c,a[f+7],16,-155497632),c=m(c,h,p,l,a[f+10],23,-1094730640),l=m(l,c,h,p,a[f+13],4,681279174),p=m(p,l,c,h,a[f+0],11,-358537222),h=m(h,p,l,c,a[f+3],16,-722521979),c=m(c,h,p,l,a[f+6],23,76029189),l=m(l,c,h,p,a[f+9],4,-640364487),p=m(p,l,c,h,a[f+12],11,-421815835),h=m(h,p,l,c,a[f+15],16,530742520),l=y(l,c=m(c,h,p,l,a[f+2],23,-995338651),h,p,a[f+0],6,-198630844),p=y(p,l,c,h,a[f+7],10,1126891415),h=y(h,p,l,c,a[f+14],15,-1416354905),c=y(c,h,p,l,a[f+5],21,-57434055),l=y(l,c,h,p,a[f+12],6,1700485571),p=y(p,l,c,h,a[f+3],10,-1894986606),h=y(h,p,l,c,a[f+10],15,-1051523),c=y(c,h,p,l,a[f+1],21,-2054922799),l=y(l,c,h,p,a[f+8],6,1873313359),p=y(p,l,c,h,a[f+15],10,-30611744),h=y(h,p,l,c,a[f+6],15,-1560198380),c=y(c,h,p,l,a[f+13],21,1309151649),l=y(l,c,h,p,a[f+4],6,-145523070),p=y(p,l,c,h,a[f+11],10,-1120210379),h=y(h,p,l,c,a[f+2],15,718787259),c=y(c,h,p,l,a[f+9],21,-343485551),l=l+v>>>0,c=c+b>>>0,h=h+w>>>0,p=p+x>>>0}return e.endian([l,c,h,p])};s._ff=function(t,e,n,r,o,i,s){var a=t+(e&n|~e&r)+(o>>>0)+s;return(a<<i|a>>>32-i)+e},s._gg=function(t,e,n,r,o,i,s){var a=t+(e&r|n&~r)+(o>>>0)+s;return(a<<i|a>>>32-i)+e},s._hh=function(t,e,n,r,o,i,s){var a=t+(e^n^r)+(o>>>0)+s;return(a<<i|a>>>32-i)+e},s._ii=function(t,e,n,r,o,i,s){var a=t+(n^(e|~r))+(o>>>0)+s;return(a<<i|a>>>32-i)+e},s._blocksize=16,s._digestsize=16,t.exports=function(t,n){if(null==t)throw new Error(\"Illegal argument \"+t);var r=e.wordsToBytes(s(t,n));return n&&n.asBytes?r:n&&n.asString?i.bytesToString(r):e.bytesToHex(r)}}()},647:(t,e)=>{var n=Object.prototype.hasOwnProperty;function r(t){try{return decodeURIComponent(t.replace(/\\+/g,\" \"))}catch(t){return null}}function o(t){try{return encodeURIComponent(t)}catch(t){return null}}e.stringify=function(t,e){e=e||\"\";var r,i,s=[];for(i in\"string\"!=typeof e&&(e=\"?\"),t)if(n.call(t,i)){if((r=t[i])||null!=r&&!isNaN(r)||(r=\"\"),i=o(i),r=o(r),null===i||null===r)continue;s.push(i+\"=\"+r)}return s.length?e+s.join(\"&\"):\"\"},e.parse=function(t){for(var e,n=/([^=?#&]+)=?([^&]*)/g,o={};e=n.exec(t);){var i=r(e[1]),s=r(e[2]);null===i||null===s||i in o||(o[i]=s)}return o}},670:t=>{t.exports=function(t,e){if(e=e.split(\":\")[0],!(t=+t))return!1;switch(e){case\"http\":case\"ws\":return 80!==t;case\"https\":case\"wss\":return 443!==t;case\"ftp\":return 21!==t;case\"gopher\":return 70!==t;case\"file\":return!1}return 0!==t}},737:(t,e,n)=>{var r=n(670),o=n(647),i=/^[\\x00-\\x20\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]+/,s=/[\\n\\r\\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\\/\\//,u=/:\\d+$/,l=/^([a-z][a-z0-9.+-]*:)?(\\/\\/)?([\\\\/]+)?([\\S\\s]*)/i,c=/^[a-zA-Z]:/;function h(t){return(t||\"\").toString().replace(i,\"\")}var p=[[\"#\",\"hash\"],[\"?\",\"query\"],function(t,e){return g(e.protocol)?t.replace(/\\\\/g,\"/\"):t},[\"/\",\"pathname\"],[\"@\",\"auth\",1],[NaN,\"host\",void 0,1,1],[/:(\\d*)$/,\"port\",void 0,1],[NaN,\"hostname\",void 0,1,1]],f={hash:1,query:1};function d(t){var e,n=(\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{}).location||{},r={},o=typeof(t=t||n);if(\"blob:\"===t.protocol)r=new y(unescape(t.pathname),{});else if(\"string\"===o)for(e in r=new y(t,{}),f)delete r[e];else if(\"object\"===o){for(e in t)e in f||(r[e]=t[e]);void 0===r.slashes&&(r.slashes=a.test(t.href))}return r}function g(t){return\"file:\"===t||\"ftp:\"===t||\"http:\"===t||\"https:\"===t||\"ws:\"===t||\"wss:\"===t}function m(t,e){t=(t=h(t)).replace(s,\"\"),e=e||{};var n,r=l.exec(t),o=r[1]?r[1].toLowerCase():\"\",i=!!r[2],a=!!r[3],u=0;return i?a?(n=r[2]+r[3]+r[4],u=r[2].length+r[3].length):(n=r[2]+r[4],u=r[2].length):a?(n=r[3]+r[4],u=r[3].length):n=r[4],\"file:\"===o?u>=2&&(n=n.slice(2)):g(o)?n=r[4]:o?i&&(n=n.slice(2)):u>=2&&g(e.protocol)&&(n=r[4]),{protocol:o,slashes:i||g(o),slashesCount:u,rest:n}}function y(t,e,n){if(t=(t=h(t)).replace(s,\"\"),!(this instanceof y))return new y(t,e,n);var i,a,u,l,f,v,b=p.slice(),w=typeof e,x=this,E=0;for(\"object\"!==w&&\"string\"!==w&&(n=e,e=null),n&&\"function\"!=typeof n&&(n=o.parse),i=!(a=m(t||\"\",e=d(e))).protocol&&!a.slashes,x.slashes=a.slashes||i&&e.slashes,x.protocol=a.protocol||e.protocol||\"\",t=a.rest,(\"file:\"===a.protocol&&(2!==a.slashesCount||c.test(t))||!a.slashes&&(a.protocol||a.slashesCount<2||!g(x.protocol)))&&(b[3]=[/(.*)/,\"pathname\"]);E<b.length;E++)\"function\"!=typeof(l=b[E])?(u=l[0],v=l[1],u!=u?x[v]=t:\"string\"==typeof u?~(f=\"@\"===u?t.lastIndexOf(u):t.indexOf(u))&&(\"number\"==typeof l[2]?(x[v]=t.slice(0,f),t=t.slice(f+l[2])):(x[v]=t.slice(f),t=t.slice(0,f))):(f=u.exec(t))&&(x[v]=f[1],t=t.slice(0,f.index)),x[v]=x[v]||i&&l[3]&&e[v]||\"\",l[4]&&(x[v]=x[v].toLowerCase())):t=l(t,x);n&&(x.query=n(x.query)),i&&e.slashes&&\"/\"!==x.pathname.charAt(0)&&(\"\"!==x.pathname||\"\"!==e.pathname)&&(x.pathname=function(t,e){if(\"\"===t)return e;for(var n=(e||\"/\").split(\"/\").slice(0,-1).concat(t.split(\"/\")),r=n.length,o=n[r-1],i=!1,s=0;r--;)\".\"===n[r]?n.splice(r,1):\"..\"===n[r]?(n.splice(r,1),s++):s&&(0===r&&(i=!0),n.splice(r,1),s--);return i&&n.unshift(\"\"),\".\"!==o&&\"..\"!==o||n.push(\"\"),n.join(\"/\")}(x.pathname,e.pathname)),\"/\"!==x.pathname.charAt(0)&&g(x.protocol)&&(x.pathname=\"/\"+x.pathname),r(x.port,x.protocol)||(x.host=x.hostname,x.port=\"\"),x.username=x.password=\"\",x.auth&&(~(f=x.auth.indexOf(\":\"))?(x.username=x.auth.slice(0,f),x.username=encodeURIComponent(decodeURIComponent(x.username)),x.password=x.auth.slice(f+1),x.password=encodeURIComponent(decodeURIComponent(x.password))):x.username=encodeURIComponent(decodeURIComponent(x.auth)),x.auth=x.password?x.username+\":\"+x.password:x.username),x.origin=\"file:\"!==x.protocol&&g(x.protocol)&&x.host?x.protocol+\"//\"+x.host:\"null\",x.href=x.toString()}y.prototype={set:function(t,e,n){var i=this;switch(t){case\"query\":\"string\"==typeof e&&e.length&&(e=(n||o.parse)(e)),i[t]=e;break;case\"port\":i[t]=e,r(e,i.protocol)?e&&(i.host=i.hostname+\":\"+e):(i.host=i.hostname,i[t]=\"\");break;case\"hostname\":i[t]=e,i.port&&(e+=\":\"+i.port),i.host=e;break;case\"host\":i[t]=e,u.test(e)?(e=e.split(\":\"),i.port=e.pop(),i.hostname=e.join(\":\")):(i.hostname=e,i.port=\"\");break;case\"protocol\":i.protocol=e.toLowerCase(),i.slashes=!n;break;case\"pathname\":case\"hash\":if(e){var s=\"pathname\"===t?\"/\":\"#\";i[t]=e.charAt(0)!==s?s+e:e}else i[t]=e;break;case\"username\":case\"password\":i[t]=encodeURIComponent(e);break;case\"auth\":var a=e.indexOf(\":\");~a?(i.username=e.slice(0,a),i.username=encodeURIComponent(decodeURIComponent(i.username)),i.password=e.slice(a+1),i.password=encodeURIComponent(decodeURIComponent(i.password))):i.username=encodeURIComponent(decodeURIComponent(e))}for(var l=0;l<p.length;l++){var c=p[l];c[4]&&(i[c[1]]=i[c[1]].toLowerCase())}return i.auth=i.password?i.username+\":\"+i.password:i.username,i.origin=\"file:\"!==i.protocol&&g(i.protocol)&&i.host?i.protocol+\"//\"+i.host:\"null\",i.href=i.toString(),i},toString:function(t){t&&\"function\"==typeof t||(t=o.stringify);var e,n=this,r=n.host,i=n.protocol;i&&\":\"!==i.charAt(i.length-1)&&(i+=\":\");var s=i+(n.protocol&&n.slashes||g(n.protocol)?\"//\":\"\");return n.username?(s+=n.username,n.password&&(s+=\":\"+n.password),s+=\"@\"):n.password?(s+=\":\"+n.password,s+=\"@\"):\"file:\"!==n.protocol&&g(n.protocol)&&!r&&\"/\"!==n.pathname&&(s+=\"@\"),(\":\"===r[r.length-1]||u.test(n.hostname)&&!n.port)&&(r+=\":\"),s+=r+n.pathname,(e=\"object\"==typeof n.query?t(n.query):n.query)&&(s+=\"?\"!==e.charAt(0)?\"?\"+e:e),n.hash&&(s+=n.hash),s}},y.extractProtocol=m,y.location=d,y.trimLeft=h,y.qs=o,t.exports=y},800:()=>{},805:()=>{},829:t=>{function e(t){return e=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},e(t)}function n(t){var e=\"function\"==typeof Map?new Map:void 0;return n=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf(\"[native code]\")))return t;var n;if(\"function\"!=typeof t)throw new TypeError(\"Super expression must either be null or a function\");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,s)}function s(){return r(t,arguments,i(this).constructor)}return s.prototype=Object.create(t.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),o(s,t)},n(t)}function r(t,e,n){return r=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&o(i,n.prototype),i},r.apply(null,arguments)}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}var s=function(t){function n(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,n),(r=function(t,n){return!n||\"object\"!==e(n)&&\"function\"!=typeof n?function(t){if(void 0===t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t}(t):n}(this,i(n).call(this,t))).name=\"ObjectPrototypeMutationError\",r}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function\");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(n,t),n}(n(Error));function a(t,n){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},o=n.split(\".\"),i=o.length,s=function(e){var n=o[e];if(!t)return{v:void 0};if(\"+\"===n){if(Array.isArray(t))return{v:t.map((function(n,i){var s=o.slice(e+1);return s.length>0?a(n,s.join(\".\"),r):r(t,i,o,e)}))};var i=o.slice(0,e).join(\".\");throw new Error(\"Object at wildcard (\".concat(i,\") is not an array\"))}t=r(t,n,o,e)},u=0;u<i;u++){var l=s(u);if(\"object\"===e(l))return l.v}return t}function u(t,e){return t.length===e+1}t.exports={set:function(t,n,r){if(\"object\"!=e(t)||null===t)return t;if(void 0===n)return t;if(\"number\"==typeof n)return t[n]=r,t[n];try{return a(t,n,(function(t,e,n,o){if(t===Reflect.getPrototypeOf({}))throw new s(\"Attempting to mutate Object.prototype\");if(!t[e]){var i=Number.isInteger(Number(n[o+1])),a=\"+\"===n[o+1];t[e]=i||a?[]:{}}return u(n,o)&&(t[e]=r),t[e]}))}catch(e){if(e instanceof s)throw e;return t}},get:function(t,n){if(\"object\"!=e(t)||null===t)return t;if(void 0===n)return t;if(\"number\"==typeof n)return t[n];try{return a(t,n,(function(t,e){return t[e]}))}catch(e){return t}},has:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(\"object\"!=e(t)||null===t)return!1;if(void 0===n)return!1;if(\"number\"==typeof n)return n in t;try{var o=!1;return a(t,n,(function(t,e,n,i){if(!u(n,i))return t&&t[e];o=r.own?t.hasOwnProperty(e):e in t})),o}catch(t){return!1}},hasOwn:function(t,e,n){return this.has(t,e,n||{own:!0})},isIn:function(t,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(\"object\"!=e(t)||null===t)return!1;if(void 0===n)return!1;try{var i=!1,s=!1;return a(t,n,(function(t,n,o,a){return i=i||t===r||!!t&&t[n]===r,s=u(o,a)&&\"object\"===e(t)&&n in t,t&&t[n]})),o.validPath?i&&s:i}catch(t){return!1}},ObjectPrototypeMutationError:s}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var r=n(737),o=n.n(r);function i(t){if(!s(t))throw new Error(\"Parameter was not an error\")}function s(t){return!!t&&\"object\"==typeof t&&\"[object Error]\"===(e=t,Object.prototype.toString.call(e))||t instanceof Error;var e}class a extends Error{constructor(t,e){const n=[...arguments],{options:r,shortMessage:o}=function(t){let e,n=\"\";if(0===t.length)e={};else if(s(t[0]))e={cause:t[0]},n=t.slice(1).join(\" \")||\"\";else if(t[0]&&\"object\"==typeof t[0])e=Object.assign({},t[0]),n=t.slice(1).join(\" \")||\"\";else{if(\"string\"!=typeof t[0])throw new Error(\"Invalid arguments passed to Layerr\");e={},n=n=t.join(\" \")||\"\"}return{options:e,shortMessage:n}}(n);let i=o;if(r.cause&&(i=`${i}: ${r.cause.message}`),super(i),this.message=i,r.name&&\"string\"==typeof r.name?this.name=r.name:this.name=\"Layerr\",r.cause&&Object.defineProperty(this,\"_cause\",{value:r.cause}),Object.defineProperty(this,\"_info\",{value:{}}),r.info&&\"object\"==typeof r.info&&Object.assign(this._info,r.info),Error.captureStackTrace){const t=r.constructorOpt||this.constructor;Error.captureStackTrace(this,t)}}static cause(t){return i(t),t._cause&&s(t._cause)?t._cause:null}static fullStack(t){i(t);const e=a.cause(t);return e?`${t.stack}\\ncaused by: ${a.fullStack(e)}`:t.stack??\"\"}static info(t){i(t);const e={},n=a.cause(t);return n&&Object.assign(e,a.info(n)),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 u=n(47),l=n.n(u);const c=\"__PATH_SEPARATOR_POSIX__\",h=\"__PATH_SEPARATOR_WINDOWS__\";function p(t){try{const e=t.replace(/\\//g,c).replace(/\\\\\\\\/g,h);return encodeURIComponent(e).split(h).join(\"\\\\\\\\\").split(c).join(\"/\")}catch(t){throw new a(t,\"Failed encoding path\")}}function f(t){return t.startsWith(\"/\")?t:\"/\"+t}function d(t){let e=t;return\"/\"!==e[0]&&(e=\"/\"+e),/^.+\\/$/.test(e)&&(e=e.substr(0,e.length-1)),e}function g(t){let e=new(o())(t).pathname;return e.length<=0&&(e=\"/\"),d(e)}function m(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(){return function(t){var e=[];if(0===t.length)return\"\";if(\"string\"!=typeof t[0])throw new TypeError(\"Url must be a string. Received \"+t[0]);if(t[0].match(/^[^/:]+:\\/*$/)&&t.length>1){var n=t.shift();t[0]=n+t[0]}t[0].match(/^file:\\/\\/\\//)?t[0]=t[0].replace(/^([^/:]+):\\/*/,\"$1:///\"):t[0]=t[0].replace(/^([^/:]+):\\/*/,\"$1://\");for(var r=0;r<t.length;r++){var o=t[r];if(\"string\"!=typeof o)throw new TypeError(\"Url must be a string. Received \"+o);\"\"!==o&&(r>0&&(o=o.replace(/^[\\/]+/,\"\")),o=r<t.length-1?o.replace(/[\\/]+$/,\"\"):o.replace(/[\\/]+$/,\"/\"),e.push(o))}var i=e.join(\"/\"),s=(i=i.replace(/\\/(\\?|&|#[^!])/g,\"$1\")).split(\"?\");return s.shift()+(s.length>0?\"?\":\"\")+s.join(\"&\")}(\"object\"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}(e.reduce(((t,e,n)=>((0===n||\"/\"!==e||\"/\"===e&&\"/\"!==t[t.length-1])&&t.push(e),t)),[]))}var y=n(542),v=n.n(y);function b(t,e){const n=t.url.replace(\"//\",\"\"),r=-1==n.indexOf(\"/\")?\"/\":n.slice(n.indexOf(\"/\")),o=t.method?t.method.toUpperCase():\"GET\",i=!!/(^|,)\\s*auth\\s*($|,)/.test(e.qop)&&\"auth\",s=`00000000${e.nc}`.slice(-8),a=function(t,e,n,r,o,i,s){const a=s||v()(`${e}:${n}:${r}`);return t&&\"md5-sess\"===t.toLowerCase()?v()(`${a}:${o}:${i}`):a}(e.algorithm,e.username,e.realm,e.password,e.nonce,e.cnonce,e.ha1),u=v()(`${o}:${r}`),l=i?v()(`${a}:${e.nonce}:${s}:${e.cnonce}:${i}:${u}`):v()(`${a}:${e.nonce}:${u}`),c={username:e.username,realm:e.realm,nonce:e.nonce,uri:r,qop:i,response:l,nc:s,cnonce:e.cnonce,algorithm:e.algorithm,opaque:e.opaque},h=[];for(const t in c)c[t]&&(\"qop\"===t||\"nc\"===t||\"algorithm\"===t?h.push(`${t}=${c[t]}`):h.push(`${t}=\"${c[t]}\"`));return`Digest ${h.join(\", \")}`}function w(t){return\"digest\"===(t.headers&&t.headers.get(\"www-authenticate\")||\"\").split(/\\s/)[0].toLowerCase()}var x=n(101),E=n.n(x);function N(t){return E().decode(t)}function P(t,e){var n;return`Basic ${n=`${t}:${e}`,E().encode(n)}`}const A=\"undefined\"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:\"undefined\"!=typeof window?window:globalThis,T=A.fetch.bind(A),O=(A.Headers,A.Request),S=A.Response;let j=function(t){return t.Auto=\"auto\",t.Digest=\"digest\",t.None=\"none\",t.Password=\"password\",t.Token=\"token\",t}({}),I=function(t){return t.DataTypeNoLength=\"data-type-no-length\",t.InvalidAuthType=\"invalid-auth-type\",t.InvalidOutputFormat=\"invalid-output-format\",t.LinkUnsupportedAuthType=\"link-unsupported-auth\",t.InvalidUpdateRange=\"invalid-update-range\",t.NotSupported=\"not-supported\",t}({});function $(t,e,n,r,o){switch(t.authType){case j.Auto:e&&n&&(t.headers.Authorization=P(e,n));break;case j.Digest:t.digest=function(t,e,n){return{username:t,password:e,ha1:n,nc:0,algorithm:\"md5\",hasDigestAuth:!1}}(e,n,o);break;case j.None:break;case j.Password:t.headers.Authorization=P(e,n);break;case j.Token:t.headers.Authorization=`${(i=r).token_type} ${i.access_token}`;break;default:throw new a({info:{code:I.InvalidAuthType}},`Invalid auth type: ${t.authType}`)}var i}n(345),n(800);const C=\"@@HOTPATCHER\",R=()=>{};function k(t){return{original:t,methods:[t],final:!1}}class M{constructor(){this._configuration={registry:{},getEmptyAction:\"null\"},this.__type__=C}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&&void 0!==arguments[1]&&arguments[1];if(!t||t.__type__!==C)throw new Error(\"Failed taking control of target HotPatcher instance: Invalid type or object\");return Object.keys(t.configuration.registry).forEach((n=>{this.configuration.registry.hasOwnProperty(n)?e&&(this.configuration.registry[n]=Object.assign({},t.configuration.registry[n])):this.configuration.registry[n]=Object.assign({},t.configuration.registry[n])})),t._configuration=this.configuration,this}execute(t){const e=this.get(t)||R;for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return e(...r)}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 t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(0===e.length)throw new Error(\"Failed creating sequence: No functions provided\");return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];let o=n;const i=this;for(;e.length>0;)o=[e.shift().apply(i,o)];return o[0]}}(...e.methods)}isPatched(t){return!!this.configuration.registry[t]}patch(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{chain:r=!1}=n;if(this.configuration.registry[t]&&this.configuration.registry[t].final)throw new Error(`Failed patching '${t}': Method marked as being final`);if(\"function\"!=typeof e)throw new Error(`Failed patching '${t}': Provided method is not a function`);if(r)this.configuration.registry[t]?this.configuration.registry[t].methods.push(e):this.configuration.registry[t]=k(e);else if(this.isPatched(t)){const{original:n}=this.configuration.registry[t];this.configuration.registry[t]=Object.assign(k(e),{original:n})}else this.configuration.registry[t]=k(e);return this}patchInline(t,e){this.isPatched(t)||this.patch(t,e);for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return this.execute(t,...r)}plugin(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return n.forEach((e=>{this.patch(t,e,{chain:!0})})),this}restore(t){if(!this.isPatched(t))throw new Error(`Failed restoring method: No method present for key: ${t}`);if(\"function\"!=typeof this.configuration.registry[t].original)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 L=null;function _(){return L||(L=new M),L}function U(t){return function(t){if(\"object\"!=typeof t||null===t||\"[object Object]\"!=Object.prototype.toString.call(t))return!1;if(null===Object.getPrototypeOf(t))return!0;let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}(t)?Object.assign({},t):Object.setPrototypeOf(Object.assign({},t),Object.getPrototypeOf(t))}function D(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];let r=null,o=[...e];for(;o.length>0;){const t=o.shift();r=r?F(r,t):U(t)}return r}function F(t,e){const n=U(t);return Object.keys(e).forEach((t=>{n.hasOwnProperty(t)?Array.isArray(e[t])?n[t]=Array.isArray(n[t])?[...n[t],...e[t]]:[...e[t]]:\"object\"==typeof e[t]&&e[t]?n[t]=\"object\"==typeof n[t]&&n[t]?F(n[t],e[t]):U(e[t]):n[t]=e[t]:n[t]=e[t]})),n}function V(t){const e={};for(const n of t.keys())e[n]=t.get(n);return e}function B(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(0===e.length)return{};const r={};return e.reduce(((t,e)=>(Object.keys(e).forEach((n=>{const o=n.toLowerCase();r.hasOwnProperty(o)?t[r[o]]=e[n]:(r[o]=n,t[n]=e[n])})),t)),{})}n(805);const W=\"function\"==typeof ArrayBuffer,{toString:z}=Object.prototype;function G(t){return W&&(t instanceof ArrayBuffer||\"[object ArrayBuffer]\"===z.call(t))}function q(t){return null!=t&&null!=t.constructor&&\"function\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function H(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}function Z(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const Y=H((function(t){const e=t._digest;return delete t._digest,e.hasDigestAuth&&(t=D(t,{headers:{Authorization:b(t,e)}})),Z(Q(t),(function(n){let r=!1;return o=function(t){return r?t:n},(i=function(){if(401==n.status)return e.hasDigestAuth=function(t,e){if(!w(t))return!1;const n=/([a-z0-9_-]+)=(?:\"([^\"]+)\"|([a-z0-9_-]+))/gi;for(;;){const r=t.headers&&t.headers.get(\"www-authenticate\")||\"\",o=n.exec(r);if(!o)break;e[o[1]]=o[2]||o[3]}return e.nc+=1,e.cnonce=function(){let t=\"\";for(let e=0;e<32;++e)t=`${t}${\"abcdef0123456789\"[Math.floor(16*Math.random())]}`;return t}(),!0}(n,e),function(){if(e.hasDigestAuth)return Z(Q(t=D(t,{headers:{Authorization:b(t,e)}})),(function(t){return 401==t.status?e.hasDigestAuth=!1:e.nc++,r=!0,t}))}();e.nc++}())&&i.then?i.then(o):o(i);var o,i}))})),X=H((function(t,e){return Z(Q(t),(function(n){return n.ok?(e.authType=j.Password,n):401==n.status&&w(n)?(e.authType=j.Digest,$(e,e.username,e.password,void 0,void 0),t._digest=e.digest,Y(t)):n}))})),K=H((function(t,e){return e.authType===j.Auto?X(t,e):t._digest?Y(t):Q(t)}));function J(t,e,n){const r=U(t);return r.headers=B(e.headers,r.headers||{},n.headers||{}),void 0!==n.data&&(r.data=n.data),n.signal&&(r.signal=n.signal),e.httpAgent&&(r.httpAgent=e.httpAgent),e.httpsAgent&&(r.httpsAgent=e.httpsAgent),e.digest&&(r._digest=e.digest),\"boolean\"==typeof e.withCredentials&&(r.withCredentials=e.withCredentials),r}function Q(t){const e=_();return e.patchInline(\"request\",(t=>e.patchInline(\"fetch\",T,t.url,function(t){let e={};const n={method:t.method};if(t.headers&&(e=B(e,t.headers)),void 0!==t.data){const[r,o]=function(t){if(\"string\"==typeof t)return[t,{}];if(q(t))return[t,{}];if(G(t))return[t,{}];if(t&&\"object\"==typeof t)return[JSON.stringify(t),{\"content-type\":\"application/json\"}];throw new Error(\"Unable to convert request body: Unexpected body type: \"+typeof t)}(t.data);n.body=r,e=B(e,o)}return t.signal&&(n.signal=t.signal),t.withCredentials&&(n.credentials=\"include\"),n.headers=e,n}(t))),t)}var tt=n(285);const et=t=>{if(\"string\"!=typeof t)throw new TypeError(\"invalid pattern\");if(t.length>65536)throw new TypeError(\"pattern is too long\")},nt={\"[: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]},rt=t=>t.replace(/[[\\]\\\\-]/g,\"\\\\$&\"),ot=t=>t.join(\"\"),it=(t,e)=>{const n=e;if(\"[\"!==t.charAt(n))throw new Error(\"not in a brace expression\");const r=[],o=[];let i=n+1,s=!1,a=!1,u=!1,l=!1,c=n,h=\"\";t:for(;i<t.length;){const e=t.charAt(i);if(\"!\"!==e&&\"^\"!==e||i!==n+1){if(\"]\"===e&&s&&!u){c=i+1;break}if(s=!0,\"\\\\\"!==e||u){if(\"[\"===e&&!u)for(const[e,[s,u,l]]of Object.entries(nt))if(t.startsWith(e,i)){if(h)return[\"$.\",!1,t.length-n,!0];i+=e.length,l?o.push(s):r.push(s),a=a||u;continue t}u=!1,h?(e>h?r.push(rt(h)+\"-\"+rt(e)):e===h&&r.push(rt(e)),h=\"\",i++):t.startsWith(\"-]\",i+1)?(r.push(rt(e+\"-\")),i+=2):t.startsWith(\"-\",i+1)?(h=e,i+=2):(r.push(rt(e)),i++)}else u=!0,i++}else l=!0,i++}if(c<i)return[\"\",!1,0,!1];if(!r.length&&!o.length)return[\"$.\",!1,t.length-n,!0];if(0===o.length&&1===r.length&&/^\\\\?.$/.test(r[0])&&!l){return[(p=2===r[0].length?r[0].slice(-1):r[0],p.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g,\"\\\\$&\")),!1,c-n,!1]}var p;const f=\"[\"+(l?\"^\":\"\")+ot(r)+\"]\",d=\"[\"+(l?\"\":\"^\")+ot(o)+\"]\";return[r.length&&o.length?\"(\"+f+\"|\"+d+\")\":r.length?f:d,a,c-n,!0]},st=function(t){let{windowsPathsNoEscape:e=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?t.replace(/\\[([^\\/\\\\])\\]/g,\"$1\"):t.replace(/((?!\\\\).|^)\\[([^\\/\\\\])\\]/g,\"$1$2\").replace(/\\\\([^\\/])/g,\"$1\")},at=new Set([\"!\",\"?\",\"+\",\"*\",\"@\"]),ut=t=>at.has(t),lt=\"(?!\\\\.)\",ct=new Set([\"[\",\".\"]),ht=new Set([\"..\",\".\"]),pt=new Set(\"().*{}+?[]^$\\\\!\"),ft=\"[^/]\",dt=ft+\"*?\",gt=ft+\"+?\";class mt{type;#t;#e;#n=!1;#r=[];#o;#i;#s;#a=!1;#u;#l;#c=!1;constructor(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.type=t,t&&(this.#e=!0),this.#o=e,this.#t=this.#o?this.#o.#t:this,this.#u=this.#t===this?n:this.#t.#u,this.#s=this.#t===this?[]:this.#t.#s,\"!\"!==t||this.#t.#a||this.#s.push(this),this.#i=this.#o?this.#o.#r.length:0}get hasMagic(){if(void 0!==this.#e)return this.#e;for(const t of this.#r)if(\"string\"!=typeof t&&(t.type||t.hasMagic))return this.#e=!0;return this.#e}toString(){return void 0!==this.#l?this.#l:this.type?this.#l=this.type+\"(\"+this.#r.map((t=>String(t))).join(\"|\")+\")\":this.#l=this.#r.map((t=>String(t))).join(\"\")}#h(){if(this!==this.#t)throw new Error(\"should only call on root\");if(this.#a)return this;let t;for(this.toString(),this.#a=!0;t=this.#s.pop();){if(\"!\"!==t.type)continue;let e=t,n=e.#o;for(;n;){for(let r=e.#i+1;!n.type&&r<n.#r.length;r++)for(const e of t.#r){if(\"string\"==typeof e)throw new Error(\"string part in extglob AST??\");e.copyIn(n.#r[r])}e=n,n=e.#o}}return this}push(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(const t of e)if(\"\"!==t){if(\"string\"!=typeof t&&!(t instanceof mt&&t.#o===this))throw new Error(\"invalid part: \"+t);this.#r.push(t)}}toJSON(){const t=null===this.type?this.#r.slice().map((t=>\"string\"==typeof t?t:t.toJSON())):[this.type,...this.#r.map((t=>t.toJSON()))];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#a&&\"!\"===this.#o?.type)&&t.push({}),t}isStart(){if(this.#t===this)return!0;if(!this.#o?.isStart())return!1;if(0===this.#i)return!0;const t=this.#o;for(let e=0;e<this.#i;e++){const n=t.#r[e];if(!(n instanceof mt&&\"!\"===n.type))return!1}return!0}isEnd(){if(this.#t===this)return!0;if(\"!\"===this.#o?.type)return!0;if(!this.#o?.isEnd())return!1;if(!this.type)return this.#o?.isEnd();const t=this.#o?this.#o.#r.length:0;return this.#i===t-1}copyIn(t){\"string\"==typeof t?this.push(t):this.push(t.clone(this))}clone(t){const e=new mt(this.type,t);for(const t of this.#r)e.copyIn(t);return e}static#p(t,e,n,r){let o=!1,i=!1,s=-1,a=!1;if(null===e.type){let u=n,l=\"\";for(;u<t.length;){const n=t.charAt(u++);if(o||\"\\\\\"===n)o=!o,l+=n;else if(i)u===s+1?\"^\"!==n&&\"!\"!==n||(a=!0):\"]\"!==n||u===s+2&&a||(i=!1),l+=n;else if(\"[\"!==n)if(r.noext||!ut(n)||\"(\"!==t.charAt(u))l+=n;else{e.push(l),l=\"\";const o=new mt(n,e);u=mt.#p(t,o,u,r),e.push(o)}else i=!0,s=u,a=!1,l+=n}return e.push(l),u}let u=n+1,l=new mt(null,e);const c=[];let h=\"\";for(;u<t.length;){const n=t.charAt(u++);if(o||\"\\\\\"===n)o=!o,h+=n;else if(i)u===s+1?\"^\"!==n&&\"!\"!==n||(a=!0):\"]\"!==n||u===s+2&&a||(i=!1),h+=n;else if(\"[\"!==n)if(ut(n)&&\"(\"===t.charAt(u)){l.push(h),h=\"\";const e=new mt(n,l);l.push(e),u=mt.#p(t,e,u,r)}else if(\"|\"!==n){if(\")\"===n)return\"\"===h&&0===e.#r.length&&(e.#c=!0),l.push(h),h=\"\",e.push(...c,l),u;h+=n}else l.push(h),h=\"\",c.push(l),l=new mt(null,e);else i=!0,s=u,a=!1,h+=n}return e.type=null,e.#e=void 0,e.#r=[t.substring(n-1)],u}static fromGlob(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=new mt(null,void 0,e);return mt.#p(t,n,0,e),n}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();const t=this.toString(),[e,n,r,o]=this.toRegExpSource();if(!(r||this.#e||this.#u.nocase&&!this.#u.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return n;const i=(this.#u.nocase?\"i\":\"\")+(o?\"u\":\"\");return Object.assign(new RegExp(`^${e}$`,i),{_src:e,_glob:t})}get options(){return this.#u}toRegExpSource(t){const e=t??!!this.#u.dot;if(this.#t===this&&this.#h(),!this.type){const n=this.isStart()&&this.isEnd(),r=this.#r.map((e=>{const[r,o,i,s]=\"string\"==typeof e?mt.#f(e,this.#e,n):e.toRegExpSource(t);return this.#e=this.#e||i,this.#n=this.#n||s,r})).join(\"\");let o=\"\";if(this.isStart()&&\"string\"==typeof this.#r[0]&&(1!==this.#r.length||!ht.has(this.#r[0]))){const n=ct,i=e&&n.has(r.charAt(0))||r.startsWith(\"\\\\.\")&&n.has(r.charAt(2))||r.startsWith(\"\\\\.\\\\.\")&&n.has(r.charAt(4)),s=!e&&!t&&n.has(r.charAt(0));o=i?\"(?!(?:^|/)\\\\.\\\\.?(?:$|/))\":s?lt:\"\"}let i=\"\";return this.isEnd()&&this.#t.#a&&\"!\"===this.#o?.type&&(i=\"(?:$|\\\\/)\"),[o+r+i,st(r),this.#e=!!this.#e,this.#n]}const n=\"*\"===this.type||\"+\"===this.type,r=\"!\"===this.type?\"(?:(?!(?:\":\"(?:\";let o=this.#d(e);if(this.isStart()&&this.isEnd()&&!o&&\"!\"!==this.type){const t=this.toString();return this.#r=[t],this.type=null,this.#e=void 0,[t,st(this.toString()),!1,!1]}let i=!n||t||e?\"\":this.#d(!0);i===o&&(i=\"\"),i&&(o=`(?:${o})(?:${i})*?`);let s=\"\";return s=\"!\"===this.type&&this.#c?(this.isStart()&&!e?lt:\"\")+gt:r+o+(\"!\"===this.type?\"))\"+(!this.isStart()||e||t?\"\":lt)+dt+\")\":\"@\"===this.type?\")\":\"?\"===this.type?\")?\":\"+\"===this.type&&i?\")\":\"*\"===this.type&&i?\")?\":`)${this.type}`),[s,st(o),this.#e=!!this.#e,this.#n]}#d(t){return this.#r.map((e=>{if(\"string\"==typeof e)throw new Error(\"string type in extglob ast??\");const[n,r,o,i]=e.toRegExpSource(t);return this.#n=this.#n||i,n})).filter((t=>!(this.isStart()&&this.isEnd()&&!t))).join(\"|\")}static#f(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!1,o=\"\",i=!1;for(let s=0;s<t.length;s++){const a=t.charAt(s);if(r)r=!1,o+=(pt.has(a)?\"\\\\\":\"\")+a;else if(\"\\\\\"!==a){if(\"[\"===a){const[n,r,a,u]=it(t,s);if(a){o+=n,i=i||r,s+=a-1,e=e||u;continue}}\"*\"!==a?\"?\"!==a?o+=a.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g,\"\\\\$&\"):(o+=ft,e=!0):(o+=n&&\"*\"===t?gt:dt,e=!0)}else s===t.length-1?o+=\"\\\\\\\\\":r=!0}return[o,st(t),!!e,i]}}const yt=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return et(e),!(!n.nocomment&&\"#\"===e.charAt(0))&&new Wt(e,n).match(t)},vt=/^\\*+([^+@!?\\*\\[\\(]*)$/,bt=t=>e=>!e.startsWith(\".\")&&e.endsWith(t),wt=t=>e=>e.endsWith(t),xt=t=>(t=t.toLowerCase(),e=>!e.startsWith(\".\")&&e.toLowerCase().endsWith(t)),Et=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),Nt=/^\\*+\\.\\*+$/,Pt=t=>!t.startsWith(\".\")&&t.includes(\".\"),At=t=>\".\"!==t&&\"..\"!==t&&t.includes(\".\"),Tt=/^\\.\\*+$/,Ot=t=>\".\"!==t&&\"..\"!==t&&t.startsWith(\".\"),St=/^\\*+$/,jt=t=>0!==t.length&&!t.startsWith(\".\"),It=t=>0!==t.length&&\".\"!==t&&\"..\"!==t,$t=/^\\?+([^+@!?\\*\\[\\(]*)?$/,Ct=t=>{let[e,n=\"\"]=t;const r=Lt([e]);return n?(n=n.toLowerCase(),t=>r(t)&&t.toLowerCase().endsWith(n)):r},Rt=t=>{let[e,n=\"\"]=t;const r=_t([e]);return n?(n=n.toLowerCase(),t=>r(t)&&t.toLowerCase().endsWith(n)):r},kt=t=>{let[e,n=\"\"]=t;const r=_t([e]);return n?t=>r(t)&&t.endsWith(n):r},Mt=t=>{let[e,n=\"\"]=t;const r=Lt([e]);return n?t=>r(t)&&t.endsWith(n):r},Lt=t=>{let[e]=t;const n=e.length;return t=>t.length===n&&!t.startsWith(\".\")},_t=t=>{let[e]=t;const n=e.length;return t=>t.length===n&&\".\"!==t&&\"..\"!==t},Ut=\"object\"==typeof process&&process?\"object\"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:\"posix\";yt.sep=\"win32\"===Ut?\"\\\\\":\"/\";const Dt=Symbol(\"globstar **\");yt.GLOBSTAR=Dt,yt.filter=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>yt(n,t,e)};const Ft=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.assign({},t,e)};yt.defaults=t=>{if(!t||\"object\"!=typeof t||!Object.keys(t).length)return yt;const e=yt;return Object.assign((function(n,r){return e(n,r,Ft(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}))}),{Minimatch:class extends e.Minimatch{constructor(e){super(e,Ft(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}))}static defaults(n){return e.defaults(Ft(t,n)).Minimatch}},AST:class extends e.AST{constructor(e,n){super(e,n,Ft(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}))}static fromGlob(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.AST.fromGlob(n,Ft(t,r))}},unescape:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.unescape(n,Ft(t,r))},escape:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.escape(n,Ft(t,r))},filter:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.filter(n,Ft(t,r))},defaults:n=>e.defaults(Ft(t,n)),makeRe:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.makeRe(n,Ft(t,r))},braceExpand:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.braceExpand(n,Ft(t,r))},match:function(n,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.match(n,r,Ft(t,o))},sep:e.sep,GLOBSTAR:Dt})};const Vt=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return et(t),e.nobrace||!/\\{(?:(?!\\{).)*\\}/.test(t)?[t]:tt(t)};yt.braceExpand=Vt,yt.makeRe=function(t){return new Wt(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).makeRe()},yt.match=function(t,e){const n=new Wt(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{});return t=t.filter((t=>n.match(t))),n.options.nonull&&!t.length&&t.push(e),t};const Bt=/[?*]|[+@!]\\(.*?\\)|\\[|\\]/;class Wt{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};et(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||Ut,this.isWindows=\"win32\"===this.platform,this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,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=void 0!==e.windowsNoMagicRoot?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(\"string\"!=typeof e)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 n=this.globSet.map((t=>this.slashSplit(t)));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map(((t,e,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){const e=!(\"\"!==t[0]||\"\"!==t[1]||\"?\"!==t[2]&&Bt.test(t[2])||Bt.test(t[3])),n=/^[a-z]:/i.test(t[0]);if(e)return[...t.slice(0,4),...t.slice(4).map((t=>this.parse(t)))];if(n)return[t[0],...t.slice(1).map((t=>this.parse(t)))]}return t.map((t=>this.parse(t)))}));if(this.debug(this.pattern,r),this.set=r.filter((t=>-1===t.indexOf(!1))),this.isWindows)for(let t=0;t<this.set.length;t++){const e=this.set[t];\"\"===e[0]&&\"\"===e[1]&&\"?\"===this.globParts[t][2]&&\"string\"==typeof e[3]&&/^[a-z]:$/i.test(e[3])&&(e[2]=\"?\")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let e=0;e<t.length;e++)for(let n=0;n<t[e].length;n++)\"**\"===t[e][n]&&(t[e][n]=\"*\");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((t=>{let e=-1;for(;-1!==(e=t.indexOf(\"**\",e+1));){let n=e;for(;\"**\"===t[n+1];)n++;n!==e&&t.splice(e,n-e)}return t}))}levelOneOptimize(t){return t.map((t=>0===(t=t.reduce(((t,e)=>{const n=t[t.length-1];return\"**\"===e&&\"**\"===n?t:\"..\"===e&&n&&\"..\"!==n&&\".\"!==n&&\"**\"!==n?(t.pop(),t):(t.push(e),t)}),[])).length?[\"\"]:t))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){const r=t[n];1===n&&\"\"===r&&\"\"===t[0]||\".\"!==r&&\"\"!==r||(e=!0,t.splice(n,1),n--)}\".\"!==t[0]||2!==t.length||\".\"!==t[1]&&\"\"!==t[1]||(e=!0,t.pop())}let n=0;for(;-1!==(n=t.indexOf(\"..\",n+1));){const r=t[n-1];r&&\".\"!==r&&\"..\"!==r&&\"**\"!==r&&(e=!0,t.splice(n-1,2),n-=2)}}while(e);return 0===t.length?[\"\"]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let n of t){let r=-1;for(;-1!==(r=n.indexOf(\"**\",r+1));){let o=r;for(;\"**\"===n[o+1];)o++;o>r&&n.splice(r+1,o-r);let i=n[r+1];const s=n[r+2],a=n[r+3];if(\"..\"!==i)continue;if(!s||\".\"===s||\"..\"===s||!a||\".\"===a||\"..\"===a)continue;e=!0,n.splice(r,1);const u=n.slice(0);u[r]=\"**\",t.push(u),r--}if(!this.preserveMultipleSlashes){for(let t=1;t<n.length-1;t++){const r=n[t];1===t&&\"\"===r&&\"\"===n[0]||\".\"!==r&&\"\"!==r||(e=!0,n.splice(t,1),t--)}\".\"!==n[0]||2!==n.length||\".\"!==n[1]&&\"\"!==n[1]||(e=!0,n.pop())}let o=0;for(;-1!==(o=n.indexOf(\"..\",o+1));){const t=n[o-1];if(t&&\".\"!==t&&\"..\"!==t&&\"**\"!==t){e=!0;const t=1===o&&\"**\"===n[o+1]?[\".\"]:[];n.splice(o-1,2,...t),0===n.length&&n.push(\"\"),o-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let n=e+1;n<t.length;n++){const r=this.partsMatch(t[e],t[n],!this.preserveMultipleSlashes);if(r){t[e]=[],t[n]=r;break}}return t.filter((t=>t.length))}partsMatch(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=0,o=0,i=[],s=\"\";for(;r<t.length&&o<e.length;)if(t[r]===e[o])i.push(\"b\"===s?e[o]:t[r]),r++,o++;else if(n&&\"**\"===t[r]&&e[o]===t[r+1])i.push(t[r]),r++;else if(n&&\"**\"===e[o]&&t[r]===e[o+1])i.push(e[o]),o++;else if(\"*\"!==t[r]||!e[o]||!this.options.dot&&e[o].startsWith(\".\")||\"**\"===e[o]){if(\"*\"!==e[o]||!t[r]||!this.options.dot&&t[r].startsWith(\".\")||\"**\"===t[r])return!1;if(\"a\"===s)return!1;s=\"b\",i.push(e[o]),r++,o++}else{if(\"b\"===s)return!1;s=\"a\",i.push(t[r]),r++,o++}return t.length===e.length&&i}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,n=0;for(let r=0;r<t.length&&\"!\"===t.charAt(r);r++)e=!e,n++;n&&(this.pattern=t.slice(n)),this.negate=e}matchOne(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=this.options;if(this.isWindows){const n=\"string\"==typeof t[0]&&/^[a-z]:$/i.test(t[0]),r=!n&&\"\"===t[0]&&\"\"===t[1]&&\"?\"===t[2]&&/^[a-z]:$/i.test(t[3]),o=\"string\"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),i=r?3:n?0:void 0,s=!o&&\"\"===e[0]&&\"\"===e[1]&&\"?\"===e[2]&&\"string\"==typeof e[3]&&/^[a-z]:$/i.test(e[3])?3:o?0:void 0;if(\"number\"==typeof i&&\"number\"==typeof s){const[n,r]=[t[i],e[s]];n.toLowerCase()===r.toLowerCase()&&(e[s]=n,s>i?e=e.slice(s):i>s&&(t=t.slice(i)))}}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,s=0,a=t.length,u=e.length;i<a&&s<u;i++,s++){this.debug(\"matchOne loop\");var l=e[s],c=t[i];if(this.debug(e,l,c),!1===l)return!1;if(l===Dt){this.debug(\"GLOBSTAR\",[e,l,c]);var h=i,p=s+1;if(p===u){for(this.debug(\"** at the end\");i<a;i++)if(\".\"===t[i]||\"..\"===t[i]||!r.dot&&\".\"===t[i].charAt(0))return!1;return!0}for(;h<a;){var f=t[h];if(this.debug(\"\\nglobstar while\",t,h,e,p,f),this.matchOne(t.slice(h),e.slice(p),n))return this.debug(\"globstar found match!\",h,a,f),!0;if(\".\"===f||\"..\"===f||!r.dot&&\".\"===f.charAt(0)){this.debug(\"dot detected!\",t,h,e,p);break}this.debug(\"globstar swallow a segment, and continue\"),h++}return!(!n||(this.debug(\"\\n>>> no match, partial?\",t,h,e,p),h!==a))}let o;if(\"string\"==typeof l?(o=c===l,this.debug(\"string match\",l,c,o)):(o=l.test(c),this.debug(\"pattern match\",l,c,o)),!o)return!1}if(i===a&&s===u)return!0;if(i===a)return n;if(s===u)return i===a-1&&\"\"===t[i];throw new Error(\"wtf?\")}braceExpand(){return Vt(this.pattern,this.options)}parse(t){et(t);const e=this.options;if(\"**\"===t)return Dt;if(\"\"===t)return\"\";let n,r=null;(n=t.match(St))?r=e.dot?It:jt:(n=t.match(vt))?r=(e.nocase?e.dot?Et:xt:e.dot?wt:bt)(n[1]):(n=t.match($t))?r=(e.nocase?e.dot?Rt:Ct:e.dot?kt:Mt)(n):(n=t.match(Nt))?r=e.dot?At:Pt:(n=t.match(Tt))&&(r=Ot);const o=mt.fromGlob(t,this.options).toMMPattern();return r&&\"object\"==typeof o&&Reflect.defineProperty(o,\"test\",{value:r}),o}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,n=e.noglobstar?\"[^/]*?\":e.dot?\"(?:(?!(?:\\\\/|^)(?:\\\\.{1,2})($|\\\\/)).)*?\":\"(?:(?!(?:\\\\/|^)\\\\.).)*?\",r=new Set(e.nocase?[\"i\"]:[]);let o=t.map((t=>{const e=t.map((t=>{if(t instanceof RegExp)for(const e of t.flags.split(\"\"))r.add(e);return\"string\"==typeof t?t.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g,\"\\\\$&\"):t===Dt?Dt:t._src}));return e.forEach(((t,r)=>{const o=e[r+1],i=e[r-1];t===Dt&&i!==Dt&&(void 0===i?void 0!==o&&o!==Dt?e[r+1]=\"(?:\\\\/|\"+n+\"\\\\/)?\"+o:e[r]=n:void 0===o?e[r-1]=i+\"(?:\\\\/|\"+n+\")?\":o!==Dt&&(e[r-1]=i+\"(?:\\\\/|\\\\/\"+n+\"\\\\/)\"+o,e[r+1]=Dt))})),e.filter((t=>t!==Dt)).join(\"/\")})).join(\"|\");const[i,s]=t.length>1?[\"(?:\",\")\"]:[\"\",\"\"];o=\"^\"+i+o+s+\"$\",this.negate&&(o=\"^(?!\"+o+\").+$\");try{this.regexp=new RegExp(o,[...r].join(\"\"))}catch(t){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&&void 0!==arguments[1]?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 n=this.options;this.isWindows&&(t=t.split(\"\\\\\").join(\"/\"));const r=this.slashSplit(t);this.debug(this.pattern,\"split\",r);const o=this.set;this.debug(this.pattern,\"set\",o);let i=r[r.length-1];if(!i)for(let t=r.length-2;!i&&t>=0;t--)i=r[t];for(let t=0;t<o.length;t++){const s=o[t];let a=r;if(n.matchBase&&1===s.length&&(a=[i]),this.matchOne(a,s,e))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(t){return yt.defaults(t).Minimatch}}function zt(t){const e=new Error(`${arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"\"}Invalid response: ${t.status} ${t.statusText}`);return e.status=t.status,e.response=t,e}function Gt(t,e){const{status:n}=e;if(401===n&&t.digest)return e;if(n>=400)throw zt(e);return e}function qt(t,e){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?{data:e,headers:t.headers?V(t.headers):{},status:t.status,statusText:t.statusText}:e}yt.AST=mt,yt.Minimatch=Wt,yt.escape=function(t){let{windowsPathsNoEscape:e=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?t.replace(/[?*()[\\]]/g,\"[$&]\"):t.replace(/[?*()[\\]\\\\]/g,\"\\\\$&\")},yt.unescape=st;const Ht=(Zt=function(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=J({url:m(t.remoteURL,p(e)),method:\"COPY\",headers:{Destination:m(t.remoteURL,p(n)),Overwrite:!1===r.overwrite?\"F\":\"T\",Depth:r.shallow?\"0\":\"infinity\"}},t,r);return s=function(e){Gt(t,e)},(i=K(o,t))&&i.then||(i=Promise.resolve(i)),s?i.then(s):i;var i,s},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(Zt.apply(this,t))}catch(t){return Promise.reject(t)}});var Zt;const Yt={preserveOrder:!1,attributeNamePrefix:\"@_\",attributesGroupName:!1,textNodeName:\"#text\",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,n){return t},captureMetaData:!1},Xt=\":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\",Kt=new RegExp(\"^[\"+Xt+\"][\"+Xt+\"\\\\-.\\\\d\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\");function Jt(t,e){const n=[];let r=e.exec(t);for(;r;){const o=[];o.startIndex=e.lastIndex-r[0].length;const i=r.length;for(let t=0;t<i;t++)o.push(r[t]);n.push(o),r=e.exec(t)}return n}const Qt=function(t){return!(null==Kt.exec(t))};let te;te=\"function\"!=typeof Symbol?\"@@xmlMetadata\":Symbol(\"XML Node Metadata\");class ee{constructor(t){this.tagname=t,this.child=[],this[\":@\"]={}}add(t,e){\"__proto__\"===t&&(t=\"#__proto__\"),this.child.push({[t]:e})}addChild(t,e){\"__proto__\"===t.tagname&&(t.tagname=\"#__proto__\"),t[\":@\"]&&Object.keys(t[\":@\"]).length>0?this.child.push({[t.tagname]:t.child,\":@\":t[\":@\"]}):this.child.push({[t.tagname]:t.child}),void 0!==e&&(this.child[this.child.length-1][te]={startIndex:e})}static getMetaDataSymbol(){return te}}class ne{constructor(t){this.suppressValidationErr=!t}readDocType(t,e){const n={};if(\"O\"!==t[e+3]||\"C\"!==t[e+4]||\"T\"!==t[e+5]||\"Y\"!==t[e+6]||\"P\"!==t[e+7]||\"E\"!==t[e+8])throw new Error(\"Invalid Tag instead of DOCTYPE\");{e+=9;let r=1,o=!1,i=!1,s=\"\";for(;e<t.length;e++)if(\"<\"!==t[e]||i)if(\">\"===t[e]){if(i?\"-\"===t[e-1]&&\"-\"===t[e-2]&&(i=!1,r--):r--,0===r)break}else\"[\"===t[e]?o=!0:s+=t[e];else{if(o&&oe(t,\"!ENTITY\",e)){let r,o;e+=7,[r,o,e]=this.readEntityExp(t,e+1,this.suppressValidationErr),-1===o.indexOf(\"&\")&&(n[r]={regx:RegExp(`&${r};`,\"g\"),val:o})}else if(o&&oe(t,\"!ELEMENT\",e)){e+=8;const{index:n}=this.readElementExp(t,e+1);e=n}else if(o&&oe(t,\"!ATTLIST\",e))e+=8;else if(o&&oe(t,\"!NOTATION\",e)){e+=9;const{index:n}=this.readNotationExp(t,e+1,this.suppressValidationErr);e=n}else{if(!oe(t,\"!--\",e))throw new Error(\"Invalid DOCTYPE\");i=!0}r++,s=\"\"}if(0!==r)throw new Error(\"Unclosed DOCTYPE\")}return{entities:n,i:e}}readEntityExp(t,e){e=re(t,e);let n=\"\";for(;e<t.length&&!/\\s/.test(t[e])&&'\"'!==t[e]&&\"'\"!==t[e];)n+=t[e],e++;if(ie(n),e=re(t,e),!this.suppressValidationErr){if(\"SYSTEM\"===t.substring(e,e+6).toUpperCase())throw new Error(\"External entities are not supported\");if(\"%\"===t[e])throw new Error(\"Parameter entities are not supported\")}let r=\"\";return[e,r]=this.readIdentifierVal(t,e,\"entity\"),[n,r,--e]}readNotationExp(t,e){e=re(t,e);let n=\"\";for(;e<t.length&&!/\\s/.test(t[e]);)n+=t[e],e++;!this.suppressValidationErr&&ie(n),e=re(t,e);const r=t.substring(e,e+6).toUpperCase();if(!this.suppressValidationErr&&\"SYSTEM\"!==r&&\"PUBLIC\"!==r)throw new Error(`Expected SYSTEM or PUBLIC, found \"${r}\"`);e+=r.length,e=re(t,e);let o=null,i=null;if(\"PUBLIC\"===r)[e,o]=this.readIdentifierVal(t,e,\"publicIdentifier\"),'\"'!==t[e=re(t,e)]&&\"'\"!==t[e]||([e,i]=this.readIdentifierVal(t,e,\"systemIdentifier\"));else if(\"SYSTEM\"===r&&([e,i]=this.readIdentifierVal(t,e,\"systemIdentifier\"),!this.suppressValidationErr&&!i))throw new Error(\"Missing mandatory system identifier for SYSTEM notation\");return{notationName:n,publicIdentifier:o,systemIdentifier:i,index:--e}}readIdentifierVal(t,e,n){let r=\"\";const o=t[e];if('\"'!==o&&\"'\"!==o)throw new Error(`Expected quoted string, found \"${o}\"`);for(e++;e<t.length&&t[e]!==o;)r+=t[e],e++;if(t[e]!==o)throw new Error(`Unterminated ${n} value`);return[++e,r]}readElementExp(t,e){e=re(t,e);let n=\"\";for(;e<t.length&&!/\\s/.test(t[e]);)n+=t[e],e++;if(!this.suppressValidationErr&&!Qt(n))throw new Error(`Invalid element name: \"${n}\"`);let r=\"\";if(\"E\"===t[e=re(t,e)]&&oe(t,\"MPTY\",e))e+=4;else if(\"A\"===t[e]&&oe(t,\"NY\",e))e+=2;else if(\"(\"===t[e]){for(e++;e<t.length&&\")\"!==t[e];)r+=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:n,contentModel:r.trim(),index:e}}readAttlistExp(t,e){e=re(t,e);let n=\"\";for(;e<t.length&&!/\\s/.test(t[e]);)n+=t[e],e++;ie(n),e=re(t,e);let r=\"\";for(;e<t.length&&!/\\s/.test(t[e]);)r+=t[e],e++;if(!ie(r))throw new Error(`Invalid attribute name: \"${r}\"`);e=re(t,e);let o=\"\";if(\"NOTATION\"===t.substring(e,e+8).toUpperCase()){if(o=\"NOTATION\",\"(\"!==t[e=re(t,e+=8)])throw new Error(`Expected '(', found \"${t[e]}\"`);e++;let n=[];for(;e<t.length&&\")\"!==t[e];){let r=\"\";for(;e<t.length&&\"|\"!==t[e]&&\")\"!==t[e];)r+=t[e],e++;if(r=r.trim(),!ie(r))throw new Error(`Invalid notation name: \"${r}\"`);n.push(r),\"|\"===t[e]&&(e++,e=re(t,e))}if(\")\"!==t[e])throw new Error(\"Unterminated list of notations\");e++,o+=\" (\"+n.join(\"|\")+\")\"}else{for(;e<t.length&&!/\\s/.test(t[e]);)o+=t[e],e++;const n=[\"CDATA\",\"ID\",\"IDREF\",\"IDREFS\",\"ENTITY\",\"ENTITIES\",\"NMTOKEN\",\"NMTOKENS\"];if(!this.suppressValidationErr&&!n.includes(o.toUpperCase()))throw new Error(`Invalid attribute type: \"${o}\"`)}e=re(t,e);let i=\"\";return\"#REQUIRED\"===t.substring(e,e+8).toUpperCase()?(i=\"#REQUIRED\",e+=8):\"#IMPLIED\"===t.substring(e,e+7).toUpperCase()?(i=\"#IMPLIED\",e+=7):[e,i]=this.readIdentifierVal(t,e,\"ATTLIST\"),{elementName:n,attributeName:r,attributeType:o,defaultValue:i,index:e}}}const re=(t,e)=>{for(;e<t.length&&/\\s/.test(t[e]);)e++;return e};function oe(t,e,n){for(let r=0;r<e.length;r++)if(e[r]!==t[n+r+1])return!1;return!0}function ie(t){if(Qt(t))return t;throw new Error(`Invalid entity name ${t}`)}const se=/^[-+]?0x[a-fA-F0-9]+$/,ae=/^([\\-\\+])?(0*)([0-9]*(\\.[0-9]*)?)$/,ue={hex:!0,leadingZeros:!0,decimalPoint:\".\",eNotation:!0};const le=/^([-+])?(0*)(\\d*(\\.\\d*)?[eE][-\\+]?\\d+)$/;function ce(t){return\"function\"==typeof t?t:Array.isArray(t)?e=>{for(const n of t){if(\"string\"==typeof n&&e===n)return!0;if(n instanceof RegExp&&n.test(e))return!0}}:()=>!1}class he{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:(t,e)=>Te(e,10,\"&#\")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>Te(e,16,\"&#x\")}},this.addExternalEntities=pe,this.parseXml=ye,this.parseTextData=fe,this.resolveNameSpace=de,this.buildAttributesMap=me,this.isItStopNode=xe,this.replaceEntitiesValue=be,this.readStopNodeData=Pe,this.saveTextToParentTag=we,this.addChild=ve,this.ignoreAttributesFn=ce(this.options.ignoreAttributes),this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodesExact=new Set,this.stopNodesWildcard=new Set;for(let t=0;t<this.options.stopNodes.length;t++){const e=this.options.stopNodes[t];\"string\"==typeof e&&(e.startsWith(\"*.\")?this.stopNodesWildcard.add(e.substring(2)):this.stopNodesExact.add(e))}}}}function pe(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const r=e[n];this.lastEntities[r]={regex:new RegExp(\"&\"+r+\";\",\"g\"),val:t[r]}}}function fe(t,e,n,r,o,i,s){if(void 0!==t&&(this.options.trimValues&&!r&&(t=t.trim()),t.length>0)){s||(t=this.replaceEntitiesValue(t));const r=this.options.tagValueProcessor(e,t,n,o,i);return null==r?t:typeof r!=typeof t||r!==t?r:this.options.trimValues||t.trim()===t?Ae(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function de(t){if(this.options.removeNSPrefix){const e=t.split(\":\"),n=\"/\"===t.charAt(0)?\"/\":\"\";if(\"xmlns\"===e[0])return\"\";2===e.length&&(t=n+e[1])}return t}const ge=new RegExp(\"([^\\\\s=]+)\\\\s*(=\\\\s*(['\\\"])([\\\\s\\\\S]*?)\\\\3)?\",\"gm\");function me(t,e){if(!0!==this.options.ignoreAttributes&&\"string\"==typeof t){const n=Jt(t,ge),r=n.length,o={};for(let t=0;t<r;t++){const r=this.resolveNameSpace(n[t][1]);if(this.ignoreAttributesFn(r,e))continue;let i=n[t][4],s=this.options.attributeNamePrefix+r;if(r.length)if(this.options.transformAttributeName&&(s=this.options.transformAttributeName(s)),\"__proto__\"===s&&(s=\"#__proto__\"),void 0!==i){this.options.trimValues&&(i=i.trim()),i=this.replaceEntitiesValue(i);const t=this.options.attributeValueProcessor(r,i,e);o[s]=null==t?i:typeof t!=typeof i||t!==i?t:Ae(i,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(o[s]=!0)}if(!Object.keys(o).length)return;if(this.options.attributesGroupName){const t={};return t[this.options.attributesGroupName]=o,t}return o}}const ye=function(t){t=t.replace(/\\r\\n?/g,\"\\n\");const e=new ee(\"!xml\");let n=e,r=\"\",o=\"\";const i=new ne(this.options.processEntities);for(let s=0;s<t.length;s++)if(\"<\"===t[s])if(\"/\"===t[s+1]){const e=Ee(t,\">\",s,\"Closing Tag is not closed.\");let i=t.substring(s+2,e).trim();if(this.options.removeNSPrefix){const t=i.indexOf(\":\");-1!==t&&(i=i.substr(t+1))}this.options.transformTagName&&(i=this.options.transformTagName(i)),n&&(r=this.saveTextToParentTag(r,n,o));const a=o.substring(o.lastIndexOf(\".\")+1);if(i&&-1!==this.options.unpairedTags.indexOf(i))throw new Error(`Unpaired tag can not be used as closing tag: </${i}>`);let u=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(u=o.lastIndexOf(\".\",o.lastIndexOf(\".\")-1),this.tagsNodeStack.pop()):u=o.lastIndexOf(\".\"),o=o.substring(0,u),n=this.tagsNodeStack.pop(),r=\"\",s=e}else if(\"?\"===t[s+1]){let e=Ne(t,s,!1,\"?>\");if(!e)throw new Error(\"Pi Tag is not closed.\");if(r=this.saveTextToParentTag(r,n,o),this.options.ignoreDeclaration&&\"?xml\"===e.tagName||this.options.ignorePiTags);else{const t=new ee(e.tagName);t.add(this.options.textNodeName,\"\"),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[\":@\"]=this.buildAttributesMap(e.tagExp,o)),this.addChild(n,t,o,s)}s=e.closeIndex+1}else if(\"!--\"===t.substr(s+1,3)){const e=Ee(t,\"--\\x3e\",s+4,\"Comment is not closed.\");if(this.options.commentPropName){const i=t.substring(s+4,e-2);r=this.saveTextToParentTag(r,n,o),n.add(this.options.commentPropName,[{[this.options.textNodeName]:i}])}s=e}else if(\"!D\"===t.substr(s+1,2)){const e=i.readDocType(t,s);this.docTypeEntities=e.entities,s=e.i}else if(\"![\"===t.substr(s+1,2)){const e=Ee(t,\"]]>\",s,\"CDATA is not closed.\")-2,i=t.substring(s+9,e);r=this.saveTextToParentTag(r,n,o);let a=this.parseTextData(i,n.tagname,o,!0,!1,!0,!0);null==a&&(a=\"\"),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:i}]):n.add(this.options.textNodeName,a),s=e+2}else{let i=Ne(t,s,this.options.removeNSPrefix),a=i.tagName;const u=i.rawTagName;let l=i.tagExp,c=i.attrExpPresent,h=i.closeIndex;if(this.options.transformTagName){const t=this.options.transformTagName(a);l===a&&(l=t),a=t}n&&r&&\"!xml\"!==n.tagname&&(r=this.saveTextToParentTag(r,n,o,!1));const p=n;p&&-1!==this.options.unpairedTags.indexOf(p.tagname)&&(n=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf(\".\"))),a!==e.tagname&&(o+=o?\".\"+a:a);const f=s;if(this.isItStopNode(this.stopNodesExact,this.stopNodesWildcard,o,a)){let e=\"\";if(l.length>0&&l.lastIndexOf(\"/\")===l.length-1)\"/\"===a[a.length-1]?(a=a.substr(0,a.length-1),o=o.substr(0,o.length-1),l=a):l=l.substr(0,l.length-1),s=i.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))s=i.closeIndex;else{const n=this.readStopNodeData(t,u,h+1);if(!n)throw new Error(`Unexpected end of ${u}`);s=n.i,e=n.tagContent}const r=new ee(a);a!==l&&c&&(r[\":@\"]=this.buildAttributesMap(l,o)),e&&(e=this.parseTextData(e,a,o,!0,c,!0,!0)),o=o.substr(0,o.lastIndexOf(\".\")),r.add(this.options.textNodeName,e),this.addChild(n,r,o,f)}else{if(l.length>0&&l.lastIndexOf(\"/\")===l.length-1){if(\"/\"===a[a.length-1]?(a=a.substr(0,a.length-1),o=o.substr(0,o.length-1),l=a):l=l.substr(0,l.length-1),this.options.transformTagName){const t=this.options.transformTagName(a);l===a&&(l=t),a=t}const t=new ee(a);a!==l&&c&&(t[\":@\"]=this.buildAttributesMap(l,o)),this.addChild(n,t,o,f),o=o.substr(0,o.lastIndexOf(\".\"))}else{const t=new ee(a);this.tagsNodeStack.push(n),a!==l&&c&&(t[\":@\"]=this.buildAttributesMap(l,o)),this.addChild(n,t,o,f),n=t}r=\"\",s=h}}else r+=t[s];return e.child};function ve(t,e,n,r){this.options.captureMetaData||(r=void 0);const o=this.options.updateTag(e.tagname,n,e[\":@\"]);!1===o||(\"string\"==typeof o?(e.tagname=o,t.addChild(e,r)):t.addChild(e,r))}const be=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const n=this.docTypeEntities[e];t=t.replace(n.regx,n.val)}for(let e in this.lastEntities){const n=this.lastEntities[e];t=t.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const n=this.htmlEntities[e];t=t.replace(n.regex,n.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function we(t,e,n,r){return t&&(void 0===r&&(r=0===e.child.length),void 0!==(t=this.parseTextData(t,e.tagname,n,!1,!!e[\":@\"]&&0!==Object.keys(e[\":@\"]).length,r))&&\"\"!==t&&e.add(this.options.textNodeName,t),t=\"\"),t}function xe(t,e,n,r){return!(!e||!e.has(r))||!(!t||!t.has(n))}function Ee(t,e,n,r){const o=t.indexOf(e,n);if(-1===o)throw new Error(r);return o+e.length-1}function Ne(t,e,n){const r=function(t,e){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:\">\",o=\"\";for(let i=e;i<t.length;i++){let e=t[i];if(n)e===n&&(n=\"\");else if('\"'===e||\"'\"===e)n=e;else if(e===r[0]){if(!r[1])return{data:o,index:i};if(t[i+1]===r[1])return{data:o,index:i}}else\"\\t\"===e&&(e=\" \");o+=e}}(t,e+1,arguments.length>3&&void 0!==arguments[3]?arguments[3]:\">\");if(!r)return;let o=r.data;const i=r.index,s=o.search(/\\s/);let a=o,u=!0;-1!==s&&(a=o.substring(0,s),o=o.substring(s+1).trimStart());const l=a;if(n){const t=a.indexOf(\":\");-1!==t&&(a=a.substr(t+1),u=a!==r.data.substr(t+1))}return{tagName:a,tagExp:o,closeIndex:i,attrExpPresent:u,rawTagName:l}}function Pe(t,e,n){const r=n;let o=1;for(;n<t.length;n++)if(\"<\"===t[n])if(\"/\"===t[n+1]){const i=Ee(t,\">\",n,`${e} is not closed`);if(t.substring(n+2,i).trim()===e&&(o--,0===o))return{tagContent:t.substring(r,n),i};n=i}else if(\"?\"===t[n+1])n=Ee(t,\"?>\",n+1,\"StopNode is not closed.\");else if(\"!--\"===t.substr(n+1,3))n=Ee(t,\"--\\x3e\",n+3,\"StopNode is not closed.\");else if(\"![\"===t.substr(n+1,2))n=Ee(t,\"]]>\",n,\"StopNode is not closed.\")-2;else{const r=Ne(t,n,\">\");r&&((r&&r.tagName)===e&&\"/\"!==r.tagExp[r.tagExp.length-1]&&o++,n=r.closeIndex)}}function Ae(t,e,n){if(e&&\"string\"==typeof t){const e=t.trim();return\"true\"===e||\"false\"!==e&&function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e=Object.assign({},ue,e),!t||\"string\"!=typeof t)return t;let n=t.trim();if(void 0!==e.skipLike&&e.skipLike.test(n))return t;if(\"0\"===t)return 0;if(e.hex&&se.test(n))return function(t){if(parseInt)return parseInt(t,16);if(Number.parseInt)return Number.parseInt(t,16);if(window&&window.parseInt)return window.parseInt(t,16);throw new Error(\"parseInt, Number.parseInt, window.parseInt are not supported\")}(n);if(n.includes(\"e\")||n.includes(\"E\"))return function(t,e,n){if(!n.eNotation)return t;const r=e.match(le);if(r){let o=r[1]||\"\";const i=-1===r[3].indexOf(\"e\")?\"E\":\"e\",s=r[2],a=o?t[s.length+1]===i:t[s.length]===i;return s.length>1&&a?t:1!==s.length||!r[3].startsWith(`.${i}`)&&r[3][0]!==i?n.leadingZeros&&!a?(e=(r[1]||\"\")+r[3],Number(e)):t:Number(e)}return t}(t,n,e);{const o=ae.exec(n);if(o){const i=o[1]||\"\",s=o[2];let a=(r=o[3])&&-1!==r.indexOf(\".\")?(\".\"===(r=r.replace(/0+$/,\"\"))?r=\"0\":\".\"===r[0]?r=\"0\"+r:\".\"===r[r.length-1]&&(r=r.substring(0,r.length-1)),r):r;const u=i?\".\"===t[s.length+1]:\".\"===t[s.length];if(!e.leadingZeros&&(s.length>1||1===s.length&&!u))return t;{const r=Number(n),o=String(r);if(0===r)return r;if(-1!==o.search(/[eE]/))return e.eNotation?r:t;if(-1!==n.indexOf(\".\"))return\"0\"===o||o===a||o===`${i}${a}`?r:t;let u=s?a:n;return s?u===o||i+u===o?r:t:u===o||u===i+o?r:t}}return t}var r}(t,n)}return void 0!==t?t:\"\"}function Te(t,e,n){const r=Number.parseInt(t,e);return r>=0&&r<=1114111?String.fromCodePoint(r):n+t+\";\"}const Oe=ee.getMetaDataSymbol();function Se(t,e){return je(t,e)}function je(t,e,n){let r;const o={};for(let i=0;i<t.length;i++){const s=t[i],a=Ie(s);let u=\"\";if(u=void 0===n?a:n+\".\"+a,a===e.textNodeName)void 0===r?r=s[a]:r+=\"\"+s[a];else{if(void 0===a)continue;if(s[a]){let t=je(s[a],e,u);const n=Ce(t,e);void 0!==s[Oe]&&(t[Oe]=s[Oe]),s[\":@\"]?$e(t,s[\":@\"],u,e):1!==Object.keys(t).length||void 0===t[e.textNodeName]||e.alwaysCreateTextNode?0===Object.keys(t).length&&(e.alwaysCreateTextNode?t[e.textNodeName]=\"\":t=\"\"):t=t[e.textNodeName],void 0!==o[a]&&o.hasOwnProperty(a)?(Array.isArray(o[a])||(o[a]=[o[a]]),o[a].push(t)):e.isArray(a,u,n)?o[a]=[t]:o[a]=t}}}return\"string\"==typeof r?r.length>0&&(o[e.textNodeName]=r):void 0!==r&&(o[e.textNodeName]=r),o}function Ie(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const n=e[t];if(\":@\"!==n)return n}}function $e(t,e,n,r){if(e){const o=Object.keys(e),i=o.length;for(let s=0;s<i;s++){const i=o[s];r.isArray(i,n+\".\"+i,!0,!0)?t[i]=[e[i]]:t[i]=e[i]}}}function Ce(t,e){const{textNodeName:n}=e,r=Object.keys(t).length;return 0===r||!(1!==r||!t[n]&&\"boolean\"!=typeof t[n]&&0!==t[n])}const Re={allowBooleanAttributes:!1,unpairedTags:[]};function ke(t){return\" \"===t||\"\\t\"===t||\"\\n\"===t||\"\\r\"===t}function Me(t,e){const n=e;for(;e<t.length;e++)if(\"?\"!=t[e]&&\" \"!=t[e]);else{const r=t.substr(n,e-n);if(e>5&&\"xml\"===r)return Ve(\"InvalidXml\",\"XML declaration allowed only at the start of the document.\",We(t,e));if(\"?\"==t[e]&&\">\"==t[e+1]){e++;break}}return e}function Le(t,e){if(t.length>e+5&&\"-\"===t[e+1]&&\"-\"===t[e+2]){for(e+=3;e<t.length;e++)if(\"-\"===t[e]&&\"-\"===t[e+1]&&\">\"===t[e+2]){e+=2;break}}else if(t.length>e+8&&\"D\"===t[e+1]&&\"O\"===t[e+2]&&\"C\"===t[e+3]&&\"T\"===t[e+4]&&\"Y\"===t[e+5]&&\"P\"===t[e+6]&&\"E\"===t[e+7]){let n=1;for(e+=8;e<t.length;e++)if(\"<\"===t[e])n++;else if(\">\"===t[e]&&(n--,0===n))break}else if(t.length>e+9&&\"[\"===t[e+1]&&\"C\"===t[e+2]&&\"D\"===t[e+3]&&\"A\"===t[e+4]&&\"T\"===t[e+5]&&\"A\"===t[e+6]&&\"[\"===t[e+7])for(e+=8;e<t.length;e++)if(\"]\"===t[e]&&\"]\"===t[e+1]&&\">\"===t[e+2]){e+=2;break}return e}function _e(t,e){let n=\"\",r=\"\",o=!1;for(;e<t.length;e++){if('\"'===t[e]||\"'\"===t[e])\"\"===r?r=t[e]:r!==t[e]||(r=\"\");else if(\">\"===t[e]&&\"\"===r){o=!0;break}n+=t[e]}return\"\"===r&&{value:n,index:e,tagClosed:o}}const Ue=new RegExp(\"(\\\\s*)([^\\\\s=]+)(\\\\s*=)?(\\\\s*(['\\\"])(([\\\\s\\\\S])*?)\\\\5)?\",\"g\");function De(t,e){const n=Jt(t,Ue),r={};for(let t=0;t<n.length;t++){if(0===n[t][1].length)return Ve(\"InvalidAttr\",\"Attribute '\"+n[t][2]+\"' has no space in starting.\",ze(n[t]));if(void 0!==n[t][3]&&void 0===n[t][4])return Ve(\"InvalidAttr\",\"Attribute '\"+n[t][2]+\"' is without value.\",ze(n[t]));if(void 0===n[t][3]&&!e.allowBooleanAttributes)return Ve(\"InvalidAttr\",\"boolean attribute '\"+n[t][2]+\"' is not allowed.\",ze(n[t]));const o=n[t][2];if(!Be(o))return Ve(\"InvalidAttr\",\"Attribute '\"+o+\"' is an invalid name.\",ze(n[t]));if(r.hasOwnProperty(o))return Ve(\"InvalidAttr\",\"Attribute '\"+o+\"' is repeated.\",ze(n[t]));r[o]=1}return!0}function Fe(t,e){if(\";\"===t[++e])return-1;if(\"#\"===t[e])return function(t,e){let n=/\\d/;for(\"x\"===t[e]&&(e++,n=/[\\da-fA-F]/);e<t.length;e++){if(\";\"===t[e])return e;if(!t[e].match(n))break}return-1}(t,++e);let n=0;for(;e<t.length;e++,n++)if(!(t[e].match(/\\w/)&&n<20)){if(\";\"===t[e])break;return-1}return e}function Ve(t,e,n){return{err:{code:t,msg:e,line:n.line||n,col:n.col}}}function Be(t){return Qt(t)}function We(t,e){const n=t.substring(0,e).split(/\\r?\\n/);return{line:n.length,col:n[n.length-1].length+1}}function ze(t){return t.startIndex+t[1].length}class Ge{constructor(t){this.externalEntities={},this.options=function(t){return Object.assign({},Yt,t)}(t)}parse(t,e){if(\"string\"!=typeof t&&t.toString)t=t.toString();else if(\"string\"!=typeof t)throw new Error(\"XML data is accepted in String or Bytes[] form.\");if(e){!0===e&&(e={});const n=function(t,e){e=Object.assign({},Re,e);const n=[];let r=!1,o=!1;\"\\ufeff\"===t[0]&&(t=t.substr(1));for(let i=0;i<t.length;i++)if(\"<\"===t[i]&&\"?\"===t[i+1]){if(i+=2,i=Me(t,i),i.err)return i}else{if(\"<\"!==t[i]){if(ke(t[i]))continue;return Ve(\"InvalidChar\",\"char '\"+t[i]+\"' is not expected.\",We(t,i))}{let s=i;if(i++,\"!\"===t[i]){i=Le(t,i);continue}{let a=!1;\"/\"===t[i]&&(a=!0,i++);let u=\"\";for(;i<t.length&&\">\"!==t[i]&&\" \"!==t[i]&&\"\\t\"!==t[i]&&\"\\n\"!==t[i]&&\"\\r\"!==t[i];i++)u+=t[i];if(u=u.trim(),\"/\"===u[u.length-1]&&(u=u.substring(0,u.length-1),i--),!Qt(u)){let e;return e=0===u.trim().length?\"Invalid space after '<'.\":\"Tag '\"+u+\"' is an invalid name.\",Ve(\"InvalidTag\",e,We(t,i))}const l=_e(t,i);if(!1===l)return Ve(\"InvalidAttr\",\"Attributes for '\"+u+\"' have open quote.\",We(t,i));let c=l.value;if(i=l.index,\"/\"===c[c.length-1]){const n=i-c.length;c=c.substring(0,c.length-1);const o=De(c,e);if(!0!==o)return Ve(o.err.code,o.err.msg,We(t,n+o.err.line));r=!0}else if(a){if(!l.tagClosed)return Ve(\"InvalidTag\",\"Closing tag '\"+u+\"' doesn't have proper closing.\",We(t,i));if(c.trim().length>0)return Ve(\"InvalidTag\",\"Closing tag '\"+u+\"' can't have attributes or invalid starting.\",We(t,s));if(0===n.length)return Ve(\"InvalidTag\",\"Closing tag '\"+u+\"' has not been opened.\",We(t,s));{const e=n.pop();if(u!==e.tagName){let n=We(t,e.tagStartPos);return Ve(\"InvalidTag\",\"Expected closing tag '\"+e.tagName+\"' (opened in line \"+n.line+\", col \"+n.col+\") instead of closing tag '\"+u+\"'.\",We(t,s))}0==n.length&&(o=!0)}}else{const a=De(c,e);if(!0!==a)return Ve(a.err.code,a.err.msg,We(t,i-c.length+a.err.line));if(!0===o)return Ve(\"InvalidXml\",\"Multiple possible root nodes found.\",We(t,i));-1!==e.unpairedTags.indexOf(u)||n.push({tagName:u,tagStartPos:s}),r=!0}for(i++;i<t.length;i++)if(\"<\"===t[i]){if(\"!\"===t[i+1]){i++,i=Le(t,i);continue}if(\"?\"!==t[i+1])break;if(i=Me(t,++i),i.err)return i}else if(\"&\"===t[i]){const e=Fe(t,i);if(-1==e)return Ve(\"InvalidChar\",\"char '&' is not expected.\",We(t,i));i=e}else if(!0===o&&!ke(t[i]))return Ve(\"InvalidXml\",\"Extra text at the end\",We(t,i));\"<\"===t[i]&&i--}}}return r?1==n.length?Ve(\"InvalidTag\",\"Unclosed tag '\"+n[0].tagName+\"'.\",We(t,n[0].tagStartPos)):!(n.length>0)||Ve(\"InvalidXml\",\"Invalid '\"+JSON.stringify(n.map((t=>t.tagName)),null,4).replace(/\\r?\\n/g,\"\")+\"' found.\",{line:1,col:1}):Ve(\"InvalidXml\",\"Start tag expected.\",1)}(t,e);if(!0!==n)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}const n=new he(this.options);n.addExternalEntities(this.externalEntities);const r=n.parseXml(t);return this.options.preserveOrder||void 0===r?r:Se(r,this.options)}addEntity(t,e){if(-1!==e.indexOf(\"&\"))throw new Error(\"Entity value can't have '&'\");if(-1!==t.indexOf(\"&\")||-1!==t.indexOf(\";\"))throw new Error(\"An entity must be set without '&' and ';'. Eg. use '#xD' for '
'\");if(\"&\"===e)throw new Error(\"An entity with value '&' is not permitted\");this.externalEntities[t]=e}static getMetaDataSymbol(){return ee.getMetaDataSymbol()}}var qe=n(829),He=n.n(qe),Ze=function(t){return t.Array=\"array\",t.Object=\"object\",t.Original=\"original\",t}(Ze||{});function Ye(t,e){if(!t.endsWith(\"propstat.prop.displayname\"))return e}function Xe(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ze.Original;const r=He().get(t,e);return\"array\"===n&&!1===Array.isArray(r)?[r]:\"object\"===n&&Array.isArray(r)?r[0]:r}function Ke(t,e){return e=e??{attributeNamePrefix:\"@\",attributeParsers:[],tagParsers:[Ye]},new Promise((n=>{n(function(t){const{multistatus:e}=t;if(\"\"===e)return{multistatus:{response:[]}};if(!e)throw new Error(\"Invalid response: No root multistatus found\");const n={multistatus:Array.isArray(e)?e[0]:e};return He().set(n,\"multistatus.response\",Xe(n,\"multistatus.response\",Ze.Array)),He().set(n,\"multistatus.response\",He().get(n,\"multistatus.response\").map((t=>function(t){const e=Object.assign({},t);return e.status?He().set(e,\"status\",Xe(e,\"status\",Ze.Object)):(He().set(e,\"propstat\",Xe(e,\"propstat\",Ze.Object)),He().set(e,\"propstat.prop\",Xe(e,\"propstat.prop\",Ze.Object))),e}(t)))),n}(function(t){let{attributeNamePrefix:e,attributeParsers:n,tagParsers:r}=t;return new Ge({allowBooleanAttributes:!0,attributeNamePrefix:e,textNodeName:\"text\",ignoreAttributes:!1,removeNSPrefix:!0,numberParseOptions:{hex:!0,leadingZeros:!1},attributeValueProcessor(t,e,r){for(const t of n)try{const n=t(r,e);if(n!==e)return n}catch(t){}return e},tagValueProcessor(t,e,n){for(const t of r)try{const r=t(n,e);if(r!==e)return r}catch(t){}return e}})}(e).parse(t)))}))}function Je(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const{getlastmodified:r=null,getcontentlength:o=\"0\",resourcetype:i=null,getcontenttype:s=null,getetag:a=null}=t,u=i&&\"object\"==typeof i&&void 0!==i.collection?\"directory\":\"file\",c={filename:e,basename:l().basename(e),lastmod:r,size:parseInt(o,10),type:u,etag:\"string\"==typeof a?a.replace(/\"/g,\"\"):null};return\"file\"===u&&(c.mime=s&&\"string\"==typeof s?s.split(\";\")[0]:\"\"),n&&(void 0!==t.displayname&&(t.displayname=String(t.displayname)),c.props=t),c}function Qe(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=null;try{t.multistatus.response[0].propstat&&(r=t.multistatus.response[0])}catch(t){}if(!r)throw new Error(\"Failed getting item stat: bad response\");const{propstat:{prop:o,status:i}}=r,[s,a,u]=i.split(\" \",3),l=parseInt(a,10);if(l>=400){const t=new Error(`Invalid response: ${l} ${u}`);throw t.status=l,t}return Je(o,d(e),n)}function tn(t){switch(String(t)){case\"-3\":return\"unlimited\";case\"-2\":case\"-1\":return\"unknown\";default:return parseInt(String(t),10)}}function en(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const nn=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{details:r=!1}=n,o=J({url:m(t.remoteURL,p(e)),method:\"PROPFIND\",headers:{Accept:\"text/plain,application/xml\",Depth:\"0\"}},t,n);return en(K(o,t),(function(n){return Gt(t,n),en(n.text(),(function(o){return en(Ke(o,t.parsing),(function(t){const o=Qe(t,e,r);return qt(n,o,r)}))}))}))}));function rn(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const on=sn((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=function(t){if(!t||\"/\"===t)return[];let e=t;const n=[];do{n.push(e),e=l().dirname(e)}while(e&&\"/\"!==e);return n}(d(e));r.sort(((t,e)=>t.length>e.length?1:e.length>t.length?-1:0));let o=!1;return function(t,e,n){if(\"function\"==typeof t[ln]){var r,o,i,s=t[ln]();function c(t){try{for(;!(r=s.next()).done;)if((t=e(r.value))&&t.then){if(!pn(t))return void t.then(c,i||(i=cn.bind(null,o=new hn,2)));t=t.v}o?cn(o,1,t):o=t}catch(t){cn(o||(o=new hn),2,t)}}if(c(),s.return){var a=function(t){try{r.done||s.return()}catch(t){}return t};if(o&&o.then)return o.then(a,(function(t){throw a(t)}));a()}return o}if(!(\"length\"in t))throw new TypeError(\"Object is not iterable\");for(var u=[],l=0;l<t.length;l++)u.push(t[l]);return function(t,e,n){var r,o,i=-1;return function s(a){try{for(;++i<t.length&&(!n||!n());)if((a=e(i))&&a.then){if(!pn(a))return void a.then(s,o||(o=cn.bind(null,r=new hn,2)));a=a.v}r?cn(r,1,a):r=a}catch(t){cn(r||(r=new hn),2,t)}}(),r}(u,(function(t){return e(u[t])}),n)}(r,(function(r){return i=function(){return function(n,o){try{var i=rn(nn(t,r),(function(t){if(\"directory\"!==t.type)throw new Error(`Path includes a file: ${e}`)}))}catch(t){return o(t)}return i&&i.then?i.then(void 0,o):i}(0,(function(e){const i=e;return function(){if(404===i.status)return o=!0,un(fn(t,r,{...n,recursive:!1}));throw e}()}))},(s=function(){if(o)return un(fn(t,r,{...n,recursive:!1}))}())&&s.then?s.then(i):i();var i,s}),(function(){return!1}))}));function sn(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}function an(){}function un(t,e){if(!e)return t&&t.then?t.then(an):Promise.resolve()}const ln=\"undefined\"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol(\"Symbol.iterator\")):\"@@iterator\";function cn(t,e,n){if(!t.s){if(n instanceof hn){if(!n.s)return void(n.o=cn.bind(null,t,e));1&e&&(e=n.s),n=n.v}if(n&&n.then)return void n.then(cn.bind(null,t,e),cn.bind(null,t,2));t.s=e,t.v=n;const r=t.o;r&&r(t)}}const hn=function(){function t(){}return t.prototype.then=function(e,n){const r=new t,o=this.s;if(o){const t=1&o?e:n;if(t){try{cn(r,1,t(this.v))}catch(t){cn(r,2,t)}return r}return this}return this.o=function(t){try{const o=t.v;1&t.s?cn(r,1,e?e(o):o):n?cn(r,1,n(o)):cn(r,2,o)}catch(t){cn(r,2,t)}},r},t}();function pn(t){return t instanceof hn&&1&t.s}const fn=sn((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!0===n.recursive)return on(t,e,n);const r=J({url:m(t.remoteURL,(o=p(e),o.endsWith(\"/\")?o:o+\"/\")),method:\"MKCOL\"},t,n);var o;return rn(K(r,t),(function(e){Gt(t,e)}))}));var dn=n(388),gn=n.n(dn);const mn=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r={};if(\"object\"==typeof n.range&&\"number\"==typeof n.range.start){let t=`bytes=${n.range.start}-`;\"number\"==typeof n.range.end&&(t=`${t}${n.range.end}`),r.Range=t}const o=J({url:m(t.remoteURL,p(e)),method:\"GET\",headers:r},t,n);return s=function(e){if(Gt(t,e),r.Range&&206!==e.status){const t=new Error(`Invalid response code for partial request: ${e.status}`);throw t.status=e.status,t}return n.callback&&setTimeout((()=>{n.callback(e)}),0),e.body},(i=K(o,t))&&i.then||(i=Promise.resolve(i)),s?i.then(s):i;var i,s})),yn=()=>{},vn=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e,n){n.url||(n.url=m(t.remoteURL,p(e)));const r=J(n,t,{});return i=function(e){return Gt(t,e),e},(o=K(r,t))&&o.then||(o=Promise.resolve(o)),i?o.then(i):o;var o,i})),bn=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=J({url:m(t.remoteURL,p(e)),method:\"DELETE\"},t,n);return i=function(e){Gt(t,e)},(o=K(r,t))&&o.then||(o=Promise.resolve(o)),i?o.then(i):o;var o,i})),wn=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r,o){try{var i=(s=nn(t,e,n),a=function(){return!0},u?a?a(s):s:(s&&s.then||(s=Promise.resolve(s)),a?s.then(a):s))}catch(t){return o(t)}var s,a,u;return i&&i.then?i.then(void 0,o):i}(0,(function(t){if(404===t.status)return!1;throw t}))}));function xn(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const En=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=J({url:m(t.remoteURL,p(e),\"/\"),method:\"PROPFIND\",headers:{Accept:\"text/plain,application/xml\",Depth:n.deep?\"infinity\":\"1\"}},t,n);return xn(K(r,t),(function(r){return Gt(t,r),xn(r.text(),(function(o){if(!o)throw new Error(\"Failed parsing directory contents: Empty response\");return xn(Ke(o,t.parsing),(function(o){const i=f(e);let s=function(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const i=l().join(e,\"/\"),{multistatus:{response:s}}=t,u=s.map((t=>{const e=function(t){try{return t.replace(/^https?:\\/\\/[^\\/]+/,\"\")}catch(t){throw new a(t,\"Failed normalising HREF\")}}(t.href),{propstat:{prop:n}}=t;return Je(n,\"/\"===i?decodeURIComponent(d(e)):d(l().relative(decodeURIComponent(i),decodeURIComponent(e))),r)}));return o?u:u.filter((t=>t.basename&&(\"file\"===t.type||t.filename!==n.replace(/\\/$/,\"\"))))}(o,f(t.remoteBasePath||t.remotePath),i,n.details,n.includeSelf);return n.glob&&(s=function(t,e){return t.filter((t=>yt(t.filename,e,{matchBase:!0})))}(s,n.glob)),qt(r,s,n.details)}))}))}))}));function Nn(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}const Pn=Nn((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=J({url:m(t.remoteURL,p(e)),method:\"GET\",headers:{Accept:\"text/plain\"},transformResponse:[Sn]},t,n);return An(K(r,t),(function(e){return Gt(t,e),An(e.text(),(function(t){return qt(e,t,n.details)}))}))}));function An(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const Tn=Nn((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=J({url:m(t.remoteURL,p(e)),method:\"GET\"},t,n);return An(K(r,t),(function(e){let r;return Gt(t,e),function(t,e){var n=t();return n&&n.then?n.then(e):e()}((function(){return An(e.arrayBuffer(),(function(t){r=t}))}),(function(){return qt(e,r,n.details)}))}))})),On=Nn((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{format:r=\"binary\"}=n;if(\"binary\"!==r&&\"text\"!==r)throw new a({info:{code:I.InvalidOutputFormat}},`Invalid output format: ${r}`);return\"text\"===r?Pn(t,e,n):Tn(t,e,n)})),Sn=t=>t;function jn(t,e){let n=\"\";return e.format&&e.indentBy.length>0&&(n=\"\\n\"),In(t,e,\"\",n)}function In(t,e,n,r){let o=\"\",i=!1;for(let s=0;s<t.length;s++){const a=t[s],u=$n(a);if(void 0===u)continue;let l=\"\";if(l=0===n.length?u:`${n}.${u}`,u===e.textNodeName){let t=a[u];Rn(l,e)||(t=e.tagValueProcessor(u,t),t=kn(t,e)),i&&(o+=r),o+=t,i=!1;continue}if(u===e.cdataPropName){i&&(o+=r),o+=`<![CDATA[${a[u][0][e.textNodeName]}]]>`,i=!1;continue}if(u===e.commentPropName){o+=r+`\\x3c!--${a[u][0][e.textNodeName]}--\\x3e`,i=!0;continue}if(\"?\"===u[0]){const t=Cn(a[\":@\"],e),n=\"?xml\"===u?\"\":r;let s=a[u][0][e.textNodeName];s=0!==s.length?\" \"+s:\"\",o+=n+`<${u}${s}${t}?>`,i=!0;continue}let c=r;\"\"!==c&&(c+=e.indentBy);const h=r+`<${u}${Cn(a[\":@\"],e)}`,p=In(a[u],e,l,c);-1!==e.unpairedTags.indexOf(u)?e.suppressUnpairedNode?o+=h+\">\":o+=h+\"/>\":p&&0!==p.length||!e.suppressEmptyNode?p&&p.endsWith(\">\")?o+=h+`>${p}${r}</${u}>`:(o+=h+\">\",p&&\"\"!==r&&(p.includes(\"/>\")||p.includes(\"</\"))?o+=r+e.indentBy+p+r:o+=p,o+=`</${u}>`):o+=h+\"/>\",i=!0}return o}function $n(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const r=e[n];if(t.hasOwnProperty(r)&&\":@\"!==r)return r}}function Cn(t,e){let n=\"\";if(t&&!e.ignoreAttributes)for(let r in t){if(!t.hasOwnProperty(r))continue;let o=e.attributeValueProcessor(r,t[r]);o=kn(o,e),!0===o&&e.suppressBooleanAttributes?n+=` ${r.substr(e.attributeNamePrefix.length)}`:n+=` ${r.substr(e.attributeNamePrefix.length)}=\"${o}\"`}return n}function Rn(t,e){let n=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(\".\")+1);for(let r in e.stopNodes)if(e.stopNodes[r]===t||e.stopNodes[r]===\"*.\"+n)return!0;return!1}function kn(t,e){if(t&&t.length>0&&e.processEntities)for(let n=0;n<e.entities.length;n++){const r=e.entities[n];t=t.replace(r.regex,r.val)}return t}const Mn={attributeNamePrefix:\"@_\",attributesGroupName:!1,textNodeName:\"#text\",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:\" \",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp(\"&\",\"g\"),val:\"&\"},{regex:new RegExp(\">\",\"g\"),val:\">\"},{regex:new RegExp(\"<\",\"g\"),val:\"<\"},{regex:new RegExp(\"'\",\"g\"),val:\"'\"},{regex:new RegExp('\"',\"g\"),val:\""\"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Ln(t){this.options=Object.assign({},Mn,t),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=ce(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Dn),this.processTextOrObjNode=_n,this.options.format?(this.indentate=Un,this.tagEndChar=\">\\n\",this.newLine=\"\\n\"):(this.indentate=function(){return\"\"},this.tagEndChar=\">\",this.newLine=\"\")}function _n(t,e,n,r){const o=this.j2x(t,n+1,r.concat(e));return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,o.attrStr,n):this.buildObjectNode(o.val,e,o.attrStr,n)}function Un(t){return this.options.indentBy.repeat(t)}function Dn(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}function Fn(t){return new Ln({attributeNamePrefix:\"@_\",format:!0,ignoreAttributes:!1,suppressEmptyNode:!0}).build(Vn({lockinfo:{\"@_xmlns:d\":\"DAV:\",lockscope:{exclusive:{}},locktype:{write:{}},owner:{href:t}}},\"d\"))}function Vn(t,e){const n={...t};for(const t in n)n.hasOwnProperty(t)&&(n[t]&&\"object\"==typeof n[t]&&-1===t.indexOf(\":\")?(n[`${e}:${t}`]=Vn(n[t],e),delete n[t]):!1===/^@_/.test(t)&&(n[`${e}:${t}`]=n[t],delete n[t]));return n}function Bn(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function Wn(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}Ln.prototype.build=function(t){return this.options.preserveOrder?jn(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0,[]).val)},Ln.prototype.j2x=function(t,e,n){let r=\"\",o=\"\";const i=n.join(\".\");for(let s in t)if(Object.prototype.hasOwnProperty.call(t,s))if(void 0===t[s])this.isAttribute(s)&&(o+=\"\");else if(null===t[s])this.isAttribute(s)||s===this.options.cdataPropName?o+=\"\":\"?\"===s[0]?o+=this.indentate(e)+\"<\"+s+\"?\"+this.tagEndChar:o+=this.indentate(e)+\"<\"+s+\"/\"+this.tagEndChar;else if(t[s]instanceof Date)o+=this.buildTextValNode(t[s],s,\"\",e);else if(\"object\"!=typeof t[s]){const n=this.isAttribute(s);if(n&&!this.ignoreAttributesFn(n,i))r+=this.buildAttrPairStr(n,\"\"+t[s]);else if(!n)if(s===this.options.textNodeName){let e=this.options.tagValueProcessor(s,\"\"+t[s]);o+=this.replaceEntitiesValue(e)}else o+=this.buildTextValNode(t[s],s,\"\",e)}else if(Array.isArray(t[s])){const r=t[s].length;let i=\"\",a=\"\";for(let u=0;u<r;u++){const r=t[s][u];if(void 0===r);else if(null===r)\"?\"===s[0]?o+=this.indentate(e)+\"<\"+s+\"?\"+this.tagEndChar:o+=this.indentate(e)+\"<\"+s+\"/\"+this.tagEndChar;else if(\"object\"==typeof r)if(this.options.oneListGroup){const t=this.j2x(r,e+1,n.concat(s));i+=t.val,this.options.attributesGroupName&&r.hasOwnProperty(this.options.attributesGroupName)&&(a+=t.attrStr)}else i+=this.processTextOrObjNode(r,s,e,n);else if(this.options.oneListGroup){let t=this.options.tagValueProcessor(s,r);t=this.replaceEntitiesValue(t),i+=t}else i+=this.buildTextValNode(r,s,\"\",e)}this.options.oneListGroup&&(i=this.buildObjectNode(i,s,a,e)),o+=i}else if(this.options.attributesGroupName&&s===this.options.attributesGroupName){const e=Object.keys(t[s]),n=e.length;for(let o=0;o<n;o++)r+=this.buildAttrPairStr(e[o],\"\"+t[s][e[o]])}else o+=this.processTextOrObjNode(t[s],s,e,n);return{attrStr:r,val:o}},Ln.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,\"\"+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&\"true\"===e?\" \"+t:\" \"+t+'=\"'+e+'\"'},Ln.prototype.buildObjectNode=function(t,e,n,r){if(\"\"===t)return\"?\"===e[0]?this.indentate(r)+\"<\"+e+n+\"?\"+this.tagEndChar:this.indentate(r)+\"<\"+e+n+this.closeTag(e)+this.tagEndChar;{let o=\"</\"+e+this.tagEndChar,i=\"\";return\"?\"===e[0]&&(i=\"?\",o=\"\"),!n&&\"\"!==n||-1!==t.indexOf(\"<\")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===i.length?this.indentate(r)+`\\x3c!--${t}--\\x3e`+this.newLine:this.indentate(r)+\"<\"+e+n+i+this.tagEndChar+t+this.indentate(r)+o:this.indentate(r)+\"<\"+e+n+i+\">\"+t+o}},Ln.prototype.closeTag=function(t){let e=\"\";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e=\"/\"):e=this.options.suppressEmptyNode?\"/\":`></${t}`,e},Ln.prototype.buildTextValNode=function(t,e,n,r){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName)return this.indentate(r)+`<![CDATA[${t}]]>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(r)+`\\x3c!--${t}--\\x3e`+this.newLine;if(\"?\"===e[0])return this.indentate(r)+\"<\"+e+n+\"?\"+this.tagEndChar;{let o=this.options.tagValueProcessor(e,t);return o=this.replaceEntitiesValue(o),\"\"===o?this.indentate(r)+\"<\"+e+n+this.closeTag(e)+this.tagEndChar:this.indentate(r)+\"<\"+e+n+\">\"+o+\"</\"+e+this.tagEndChar}},Ln.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const n=this.options.entities[e];t=t.replace(n.regex,n.val)}return t};const zn=Wn((function(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=J({url:m(t.remoteURL,p(e)),method:\"UNLOCK\",headers:{\"Lock-Token\":n}},t,r);return Bn(K(o,t),(function(e){if(Gt(t,e),204!==e.status&&200!==e.status)throw zt(e)}))})),Gn=Wn((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{refreshToken:r,timeout:o=qn}=n,i={Accept:\"text/plain,application/xml\",Timeout:o};r&&(i.If=r);const s=J({url:m(t.remoteURL,p(e)),method:\"LOCK\",headers:i,data:Fn(t.contactHref)},t,n);return Bn(K(s,t),(function(e){return Gt(t,e),Bn(e.text(),(function(t){const n=(i=t,new Ge({removeNSPrefix:!0,parseAttributeValue:!0,parseTagValue:!0}).parse(i)),r=He().get(n,\"prop.lockdiscovery.activelock.locktoken.href\"),o=He().get(n,\"prop.lockdiscovery.activelock.timeout\");var i;if(!r)throw zt(e,\"No lock token received: \");return{token:r,serverTimeout:o}}))}))})),qn=\"Infinite, Second-4100000000\";function Hn(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const Zn=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.path||\"/\",r=J({url:m(t.remoteURL,n),method:\"PROPFIND\",headers:{Accept:\"text/plain,application/xml\",Depth:\"0\"}},t,e);return Hn(K(r,t),(function(n){return Gt(t,n),Hn(n.text(),(function(r){return Hn(Ke(r,t.parsing),(function(t){const r=function(t){try{const[e]=t.multistatus.response,{propstat:{prop:{\"quota-used-bytes\":n,\"quota-available-bytes\":r}}}=e;return void 0!==n&&void 0!==r?{used:parseInt(String(n),10),available:tn(r)}:null}catch(t){}return null}(t);return qt(n,r,e.details)}))}))}))}));function Yn(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const Xn=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{details:r=!1}=n,o=J({url:m(t.remoteURL,p(e)),method:\"SEARCH\",headers:{Accept:\"text/plain,application/xml\",\"Content-Type\":t.headers[\"Content-Type\"]||\"application/xml; charset=utf-8\"}},t,n);return Yn(K(o,t),(function(n){return Gt(t,n),Yn(n.text(),(function(o){return Yn(Ke(o,t.parsing),(function(t){const o=function(t,e,n){const r={truncated:!1,results:[]};return r.truncated=t.multistatus.response.some((t=>\"507\"===(t.status||t.propstat?.status).split(\" \",3)?.[1]&&t.href.replace(/\\/$/,\"\").endsWith(p(e).replace(/\\/$/,\"\")))),t.multistatus.response.forEach((t=>{if(void 0===t.propstat)return;const e=t.href.split(\"/\").map(decodeURIComponent).join(\"/\");r.results.push(Je(t.propstat.prop,e,n))})),r}(t,e,r);return qt(n,o,r)}))}))}))})),Kn=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=J({url:m(t.remoteURL,p(e)),method:\"MOVE\",headers:{Destination:m(t.remoteURL,p(n)),Overwrite:!1===r.overwrite?\"F\":\"T\"}},t,r);return s=function(e){Gt(t,e)},(i=K(o,t))&&i.then||(i=Promise.resolve(i)),s?i.then(s):i;var i,s}));var Jn=n(172);function Qn(t){if(G(t))return t.byteLength;if(q(t))return t.length;if(\"string\"==typeof t)return(0,Jn.d)(t);throw new a({info:{code:I.DataTypeNoLength}},\"Cannot calculate data length: Invalid type\")}const tr=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{contentLength:o=!0,overwrite:i=!0}=r,s={\"Content-Type\":\"application/octet-stream\"};!1===o||(s[\"Content-Length\"]=\"number\"==typeof o?`${o}`:`${Qn(n)}`),i||(s[\"If-None-Match\"]=\"*\");const a=J({url:m(t.remoteURL,p(e)),method:\"PUT\",headers:s,data:n},t,r);return l=function(e){try{Gt(t,e)}catch(t){const e=t;if(412!==e.status||i)throw e;return!1}return!0},(u=K(a,t))&&u.then||(u=Promise.resolve(u)),l?u.then(l):u;var u,l})),er=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=J({url:m(t.remoteURL,p(e)),method:\"OPTIONS\"},t,n);return i=function(e){try{Gt(t,e)}catch(t){throw t}return{compliance:(e.headers.get(\"DAV\")??\"\").split(\",\").map((t=>t.trim())),server:e.headers.get(\"Server\")??\"\"}},(o=K(r,t))&&o.then||(o=Promise.resolve(o)),i?o.then(i):o;var o,i}));function nr(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const rr=sr((function(t,e,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};if(n>r||n<0)throw new a({info:{code:I.InvalidUpdateRange}},`Invalid update range ${n} for partial update`);const s={\"Content-Type\":\"application/octet-stream\",\"Content-Length\":\"\"+(r-n+1),\"Content-Range\":`bytes ${n}-${r}/*`},u=J({url:m(t.remoteURL,p(e)),method:\"PUT\",headers:s,data:o},t,i);return nr(K(u,t),(function(e){Gt(t,e)}))}));function or(t,e){var n=t();return n&&n.then?n.then(e):e(n)}const ir=sr((function(t,e,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};if(n>r||n<0)throw new a({info:{code:I.InvalidUpdateRange}},`Invalid update range ${n} for partial update`);const s={\"Content-Type\":\"application/x-sabredav-partialupdate\",\"Content-Length\":\"\"+(r-n+1),\"X-Update-Range\":`bytes=${n}-${r}`},u=J({url:m(t.remoteURL,p(e)),method:\"PATCH\",headers:s,data:o},t,i);return nr(K(u,t),(function(e){Gt(t,e)}))}));function sr(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}const ar=sr((function(t,e,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return nr(er(t,e,i),(function(s){let u=!1;return or((function(){if(s.compliance.includes(\"sabredav-partialupdate\"))return nr(ir(t,e,n,r,o,i),(function(t){return u=!0,t}))}),(function(l){let c=!1;return u?l:or((function(){if(s.server.includes(\"Apache\")&&s.compliance.includes(\"<http://apache.org/dav/propset/fs/1>\"))return nr(rr(t,e,n,r,o,i),(function(t){return c=!0,t}))}),(function(t){if(c)return t;throw new a({info:{code:I.NotSupported}},\"Not supported\")}))}))}))})),ur=\"https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md\";function lr(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{authType:n=null,remoteBasePath:r,contactHref:o=ur,ha1:i,headers:s={},httpAgent:u,httpsAgent:l,password:c,token:h,username:f,withCredentials:d}=e;let y=n;y||(y=f||c?j.Password:j.None);const v={authType:y,remoteBasePath:r,contactHref:o,ha1:i,headers:Object.assign({},s),httpAgent:u,httpsAgent:l,password:c,parsing:{attributeNamePrefix:e.attributeNamePrefix??\"@\",attributeParsers:[],tagParsers:[Ye]},remotePath:g(t),remoteURL:t,token:h,username:f,withCredentials:d};return $(v,f,c,h,i),{copyFile:(t,e,n)=>Ht(v,t,e,n),createDirectory:(t,e)=>fn(v,t,e),createReadStream:(t,e)=>function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=new(0,gn().PassThrough);return mn(t,e,n).then((t=>{t.pipe(r)})).catch((t=>{r.emit(\"error\",t)})),r}(v,t,e),createWriteStream:(t,e,n)=>function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:yn;const o=new(0,gn().PassThrough),i={};!1===n.overwrite&&(i[\"If-None-Match\"]=\"*\");const s=J({url:m(t.remoteURL,p(e)),method:\"PUT\",headers:i,data:o,maxRedirects:0},t,n);return K(s,t).then((e=>Gt(t,e))).then((t=>{setTimeout((()=>{r(t)}),0)})).catch((t=>{o.emit(\"error\",t)})),o}(v,t,e,n),customRequest:(t,e)=>vn(v,t,e),deleteFile:(t,e)=>bn(v,t,e),exists:(t,e)=>wn(v,t,e),getDirectoryContents:(t,e)=>En(v,t,e),getFileContents:(t,e)=>On(v,t,e),getFileDownloadLink:t=>function(t,e){let n=m(t.remoteURL,p(e));const r=/^https:/i.test(n)?\"https\":\"http\";switch(t.authType){case j.None:break;case j.Password:{const e=N(t.headers.Authorization.replace(/^Basic /i,\"\").trim());n=n.replace(/^https?:\\/\\//,`${r}://${e}@`);break}default:throw new a({info:{code:I.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${t.authType}`)}return n}(v,t),getFileUploadLink:t=>function(t,e){let n=`${m(t.remoteURL,p(e))}?Content-Type=application/octet-stream`;const r=/^https:/i.test(n)?\"https\":\"http\";switch(t.authType){case j.None:break;case j.Password:{const e=N(t.headers.Authorization.replace(/^Basic /i,\"\").trim());n=n.replace(/^https?:\\/\\//,`${r}://${e}@`);break}default:throw new a({info:{code:I.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${t.authType}`)}return n}(v,t),getHeaders:()=>Object.assign({},v.headers),getQuota:t=>Zn(v,t),lock:(t,e)=>Gn(v,t,e),moveFile:(t,e,n)=>Kn(v,t,e,n),putFileContents:(t,e,n)=>tr(v,t,e,n),partialUpdateFileContents:(t,e,n,r,o)=>ar(v,t,e,n,r,o),getDAVCompliance:t=>er(v,t),search:(t,e)=>Xn(v,t,e),setHeaders:t=>{v.headers=Object.assign({},t)},stat:(t,e)=>nn(v,t,e),unlock:(t,e,n)=>zn(v,t,e,n),registerAttributeParser:t=>{v.parsing.attributeParsers.push(t)},registerTagParser:t=>{v.parsing.tagParsers.push(t)}}}export{j as AuthType,I as ErrorCode,O as Request,S as Response,Qn as calculateDataLength,lr as createClient,_ as getPatcher,Qe as parseStat,Ke as parseXML,Je as prepareFileFromProps,qt as processResponsePayload,tn as translateDiskSpace};","import { getCurrentUser, onRequestTokenUpdate, getRequestToken } from \"@nextcloud/auth\";\nimport { isPublicShare, getSharingToken } from \"@nextcloud/sharing/public\";\nimport { generateRemoteUrl } from \"@nextcloud/router\";\nimport { CancelablePromise } from \"cancelable-promise\";\nimport { createClient, getPatcher } from \"webdav\";\nimport { getLoggerBuilder } from \"@nextcloud/logger\";\nimport { join, encodePath, basename, extname, dirname } from \"@nextcloud/paths\";\nconst logger = getLoggerBuilder().setApp(\"@nextcloud/files\").detectUser().build();\nvar FileType = /* @__PURE__ */ ((FileType2) => {\n FileType2[\"Folder\"] = \"folder\";\n FileType2[\"File\"] = \"file\";\n return FileType2;\n})(FileType || {});\nvar Permission = /* @__PURE__ */ ((Permission2) => {\n Permission2[Permission2[\"NONE\"] = 0] = \"NONE\";\n Permission2[Permission2[\"CREATE\"] = 4] = \"CREATE\";\n Permission2[Permission2[\"READ\"] = 1] = \"READ\";\n Permission2[Permission2[\"UPDATE\"] = 2] = \"UPDATE\";\n Permission2[Permission2[\"DELETE\"] = 8] = \"DELETE\";\n Permission2[Permission2[\"SHARE\"] = 16] = \"SHARE\";\n Permission2[Permission2[\"ALL\"] = 31] = \"ALL\";\n return Permission2;\n})(Permission || {});\nconst isDavResource = function(source, davService) {\n return source.match(davService) !== null;\n};\nconst validateData = (data, davService) => {\n if (data.id && typeof data.id !== \"number\") {\n throw new Error(\"Invalid id type of value\");\n }\n if (!data.source) {\n throw new Error(\"Missing mandatory source\");\n }\n try {\n new URL(data.source);\n } catch (e) {\n throw new Error(\"Invalid source format, source must be a valid URL\");\n }\n if (!data.source.startsWith(\"http\")) {\n throw new Error(\"Invalid source format, only http(s) is supported\");\n }\n if (data.displayname && typeof data.displayname !== \"string\") {\n throw new Error(\"Invalid displayname type\");\n }\n if (data.mtime && !(data.mtime instanceof Date)) {\n throw new Error(\"Invalid mtime type\");\n }\n if (data.crtime && !(data.crtime instanceof Date)) {\n throw new Error(\"Invalid crtime type\");\n }\n if (!data.mime || typeof data.mime !== \"string\" || !data.mime.match(/^[-\\w.]+\\/[-+\\w.]+$/gi)) {\n throw new Error(\"Missing or invalid mandatory mime\");\n }\n if (\"size\" in data && typeof data.size !== \"number\" && data.size !== void 0) {\n throw new Error(\"Invalid size type\");\n }\n if (\"permissions\" in data && data.permissions !== void 0 && !(typeof data.permissions === \"number\" && data.permissions >= Permission.NONE && data.permissions <= Permission.ALL)) {\n throw new Error(\"Invalid permissions\");\n }\n if (data.owner && data.owner !== null && typeof data.owner !== \"string\") {\n throw new Error(\"Invalid owner type\");\n }\n if (data.attributes && typeof data.attributes !== \"object\") {\n throw new Error(\"Invalid attributes type\");\n }\n if (data.root && typeof data.root !== \"string\") {\n throw new Error(\"Invalid root type\");\n }\n if (data.root && !data.root.startsWith(\"/\")) {\n throw new Error(\"Root must start with a leading slash\");\n }\n if (data.root && !data.source.includes(data.root)) {\n throw new Error(\"Root must be part of the source\");\n }\n if (data.root && isDavResource(data.source, davService)) {\n const service = data.source.match(davService)[0];\n if (!data.source.includes(join(service, data.root))) {\n throw new Error(\"The root must be relative to the service. e.g /files/emma\");\n }\n }\n if (data.status && !Object.values(NodeStatus).includes(data.status)) {\n throw new Error(\"Status must be a valid NodeStatus\");\n }\n};\nvar NodeStatus = /* @__PURE__ */ ((NodeStatus2) => {\n NodeStatus2[\"NEW\"] = \"new\";\n NodeStatus2[\"FAILED\"] = \"failed\";\n NodeStatus2[\"LOADING\"] = \"loading\";\n NodeStatus2[\"LOCKED\"] = \"locked\";\n return NodeStatus2;\n})(NodeStatus || {});\nclass Node {\n _data;\n _attributes;\n _knownDavService = /(remote|public)\\.php\\/(web)?dav/i;\n readonlyAttributes = Object.entries(Object.getOwnPropertyDescriptors(Node.prototype)).filter((e) => typeof e[1].get === \"function\" && e[0] !== \"__proto__\").map((e) => e[0]);\n handler = {\n set: (target, prop, value) => {\n if (this.readonlyAttributes.includes(prop)) {\n return false;\n }\n return Reflect.set(target, prop, value);\n },\n deleteProperty: (target, prop) => {\n if (this.readonlyAttributes.includes(prop)) {\n return false;\n }\n return Reflect.deleteProperty(target, prop);\n },\n // TODO: This is deprecated and only needed for files v3\n get: (target, prop, receiver) => {\n if (this.readonlyAttributes.includes(prop)) {\n logger.warn(`Accessing \"Node.attributes.${prop}\" is deprecated, access it directly on the Node instance.`);\n return Reflect.get(this, prop);\n }\n return Reflect.get(target, prop, receiver);\n }\n };\n constructor(data, davService) {\n if (!data.mime) {\n data.mime = \"application/octet-stream\";\n }\n validateData(data, davService || this._knownDavService);\n this._data = {\n // TODO: Remove with next major release, this is just for compatibility\n displayname: data.attributes?.displayname,\n ...data,\n attributes: {}\n };\n this._attributes = new Proxy(this._data.attributes, this.handler);\n this.update(data.attributes ?? {});\n if (davService) {\n this._knownDavService = davService;\n }\n }\n /**\n * Get the source url to this object\n * There is no setter as the source is not meant to be changed manually.\n * You can use the rename or move method to change the source.\n */\n get source() {\n return this._data.source.replace(/\\/$/i, \"\");\n }\n /**\n * Get the encoded source url to this object for requests purposes\n */\n get encodedSource() {\n const { origin } = new URL(this.source);\n return origin + encodePath(this.source.slice(origin.length));\n }\n /**\n * Get this object name\n * There is no setter as the source is not meant to be changed manually.\n * You can use the rename or move method to change the source.\n */\n get basename() {\n return basename(this.source);\n }\n /**\n * The nodes displayname\n * By default the display name and the `basename` are identical,\n * but it is possible to have a different name. This happens\n * on the files app for example for shared folders.\n */\n get displayname() {\n return this._data.displayname || this.basename;\n }\n /**\n * Set the displayname\n */\n set displayname(displayname) {\n validateData({ ...this._data, displayname }, this._knownDavService);\n this._data.displayname = displayname;\n }\n /**\n * Get this object's extension\n * There is no setter as the source is not meant to be changed manually.\n * You can use the rename or move method to change the source.\n */\n get extension() {\n return extname(this.source);\n }\n /**\n * Get the directory path leading to this object\n * Will use the relative path to root if available\n *\n * There is no setter as the source is not meant to be changed manually.\n * You can use the rename or move method to change the source.\n */\n get dirname() {\n if (this.root) {\n let source = this.source;\n if (this.isDavResource) {\n source = source.split(this._knownDavService).pop();\n }\n const firstMatch = source.indexOf(this.root);\n const root = this.root.replace(/\\/$/, \"\");\n return dirname(source.slice(firstMatch + root.length) || \"/\");\n }\n const url = new URL(this.source);\n return dirname(url.pathname);\n }\n /**\n * Get the file mime\n */\n get mime() {\n return this._data.mime || \"application/octet-stream\";\n }\n /**\n * Set the file mime\n * Removing the mime type will set it to `application/octet-stream`\n */\n set mime(mime) {\n mime ??= \"application/octet-stream\";\n validateData({ ...this._data, mime }, this._knownDavService);\n this._data.mime = mime;\n }\n /**\n * Get the file modification time\n */\n get mtime() {\n return this._data.mtime;\n }\n /**\n * Set the file modification time\n */\n set mtime(mtime) {\n validateData({ ...this._data, mtime }, this._knownDavService);\n this._data.mtime = mtime;\n }\n /**\n * Get the file creation time\n * There is no setter as the creation time is not meant to be changed\n */\n get crtime() {\n return this._data.crtime;\n }\n /**\n * Get the file size\n */\n get size() {\n return this._data.size;\n }\n /**\n * Set the file size\n */\n set size(size) {\n validateData({ ...this._data, size }, this._knownDavService);\n this.updateMtime();\n this._data.size = size;\n }\n /**\n * Get the file attribute\n * This contains all additional attributes not provided by the Node class\n */\n get attributes() {\n return this._attributes;\n }\n /**\n * Get the file permissions\n */\n get permissions() {\n if (this.owner === null && !this.isDavResource) {\n return Permission.READ;\n }\n return this._data.permissions !== void 0 ? this._data.permissions : Permission.NONE;\n }\n /**\n * Set the file permissions\n */\n set permissions(permissions) {\n validateData({ ...this._data, permissions }, this._knownDavService);\n this.updateMtime();\n this._data.permissions = permissions;\n }\n /**\n * Get the file owner\n * There is no setter as the owner is not meant to be changed\n */\n get owner() {\n if (!this.isDavResource) {\n return null;\n }\n return this._data.owner;\n }\n /**\n * Is this a dav-related resource ?\n */\n get isDavResource() {\n return isDavResource(this.source, this._knownDavService);\n }\n /**\n * @deprecated use `isDavResource` instead - will be removed in next major version.\n */\n get isDavRessource() {\n return this.isDavResource;\n }\n /**\n * Get the dav root of this object\n * There is no setter as the root is not meant to be changed\n */\n get root() {\n if (this._data.root) {\n return this._data.root.replace(/^(.+)\\/$/, \"$1\");\n }\n if (this.isDavResource) {\n const root = dirname(this.source);\n return root.split(this._knownDavService).pop() || null;\n }\n return null;\n }\n /**\n * Get the absolute path of this object relative to the root\n */\n get path() {\n if (this.root) {\n let source = this.source;\n if (this.isDavResource) {\n source = source.split(this._knownDavService).pop();\n }\n const firstMatch = source.indexOf(this.root);\n const root = this.root.replace(/\\/$/, \"\");\n return source.slice(firstMatch + root.length) || \"/\";\n }\n return (this.dirname + \"/\" + this.basename).replace(/\\/\\//g, \"/\");\n }\n /**\n * Get the node id if defined.\n * There is no setter as the fileid is not meant to be changed\n */\n get fileid() {\n return this._data?.id;\n }\n /**\n * Get the node status.\n */\n get status() {\n return this._data?.status;\n }\n /**\n * Set the node status.\n */\n set status(status) {\n validateData({ ...this._data, status }, this._knownDavService);\n this._data.status = status;\n }\n /**\n * Get the node data\n */\n get data() {\n return structuredClone(this._data);\n }\n /**\n * Move the node to a new destination\n *\n * @param {string} destination the new source.\n * e.g. https://cloud.domain.com/remote.php/dav/files/emma/Photos/picture.jpg\n */\n move(destination) {\n validateData({ ...this._data, source: destination }, this._knownDavService);\n const oldBasename = this.basename;\n this._data.source = destination;\n if (this.displayname === oldBasename && this.basename !== oldBasename) {\n this.displayname = this.basename;\n }\n }\n /**\n * Rename the node\n * This aliases the move method for easier usage\n *\n * @param basename The new name of the node\n */\n rename(basename2) {\n if (basename2.includes(\"/\")) {\n throw new Error(\"Invalid basename\");\n }\n this.move(dirname(this.source) + \"/\" + basename2);\n }\n /**\n * Update the mtime if exists\n */\n updateMtime() {\n if (this._data.mtime) {\n this._data.mtime = /* @__PURE__ */ new Date();\n }\n }\n /**\n * Update the attributes of the node\n * Warning, updating attributes will NOT automatically update the mtime.\n *\n * @param attributes The new attributes to update on the Node attributes\n */\n update(attributes) {\n for (const [name, value] of Object.entries(attributes)) {\n try {\n if (value === void 0) {\n delete this.attributes[name];\n } else {\n this.attributes[name] = value;\n }\n } catch (e) {\n if (e instanceof TypeError) {\n continue;\n }\n throw e;\n }\n }\n }\n}\nclass File extends Node {\n get type() {\n return FileType.File;\n }\n /**\n * Returns a clone of the file\n */\n clone() {\n return new File(this.data);\n }\n}\nclass Folder extends Node {\n constructor(data) {\n super({\n ...data,\n mime: \"httpd/unix-directory\"\n });\n }\n get type() {\n return FileType.Folder;\n }\n get extension() {\n return null;\n }\n get mime() {\n return \"httpd/unix-directory\";\n }\n /**\n * Returns a clone of the folder\n */\n clone() {\n return new Folder(this.data);\n }\n}\nconst parsePermissions = function(permString = \"\") {\n let permissions = Permission.NONE;\n if (!permString) {\n return permissions;\n }\n if (permString.includes(\"C\") || permString.includes(\"K\")) {\n permissions |= Permission.CREATE;\n }\n if (permString.includes(\"G\")) {\n permissions |= Permission.READ;\n }\n if (permString.includes(\"W\") || permString.includes(\"N\") || permString.includes(\"V\")) {\n permissions |= Permission.UPDATE;\n }\n if (permString.includes(\"D\")) {\n permissions |= Permission.DELETE;\n }\n if (permString.includes(\"R\")) {\n permissions |= Permission.SHARE;\n }\n return permissions;\n};\nconst defaultDavProperties = [\n \"d:getcontentlength\",\n \"d:getcontenttype\",\n \"d:getetag\",\n \"d:getlastmodified\",\n \"d:creationdate\",\n \"d:displayname\",\n \"d:quota-available-bytes\",\n \"d:resourcetype\",\n \"nc:has-preview\",\n \"nc:is-encrypted\",\n \"nc:mount-type\",\n \"oc:comments-unread\",\n \"oc:favorite\",\n \"oc:fileid\",\n \"oc:owner-display-name\",\n \"oc:owner-id\",\n \"oc:permissions\",\n \"oc:size\"\n];\nconst defaultDavNamespaces = {\n d: \"DAV:\",\n nc: \"http://nextcloud.org/ns\",\n oc: \"http://owncloud.org/ns\",\n ocs: \"http://open-collaboration-services.org/ns\"\n};\nconst registerDavProperty = function(prop, namespace = { nc: \"http://nextcloud.org/ns\" }) {\n if (typeof window._nc_dav_properties === \"undefined\") {\n window._nc_dav_properties = [...defaultDavProperties];\n window._nc_dav_namespaces = { ...defaultDavNamespaces };\n }\n const namespaces = { ...window._nc_dav_namespaces, ...namespace };\n if (window._nc_dav_properties.find((search) => search === prop)) {\n logger.warn(`${prop} already registered`, { prop });\n return false;\n }\n if (prop.startsWith(\"<\") || prop.split(\":\").length !== 2) {\n logger.error(`${prop} is not valid. See example: 'oc:fileid'`, { prop });\n return false;\n }\n const ns = prop.split(\":\")[0];\n if (!namespaces[ns]) {\n logger.error(`${prop} namespace unknown`, { prop, namespaces });\n return false;\n }\n window._nc_dav_properties.push(prop);\n window._nc_dav_namespaces = namespaces;\n return true;\n};\nconst getDavProperties = function() {\n if (typeof window._nc_dav_properties === \"undefined\") {\n window._nc_dav_properties = [...defaultDavProperties];\n }\n return window._nc_dav_properties.map((prop) => `<${prop} />`).join(\" \");\n};\nconst getDavNameSpaces = function() {\n if (typeof window._nc_dav_namespaces === \"undefined\") {\n window._nc_dav_namespaces = { ...defaultDavNamespaces };\n }\n return Object.keys(window._nc_dav_namespaces).map((ns) => `xmlns:${ns}=\"${window._nc_dav_namespaces?.[ns]}\"`).join(\" \");\n};\nconst getDefaultPropfind = function() {\n return `<?xml version=\"1.0\"?>\n\t\t<d:propfind ${getDavNameSpaces()}>\n\t\t\t<d:prop>\n\t\t\t\t${getDavProperties()}\n\t\t\t</d:prop>\n\t\t</d:propfind>`;\n};\nconst getFavoritesReport = function() {\n return `<?xml version=\"1.0\"?>\n\t\t<oc:filter-files ${getDavNameSpaces()}>\n\t\t\t<d:prop>\n\t\t\t\t${getDavProperties()}\n\t\t\t</d:prop>\n\t\t\t<oc:filter-rules>\n\t\t\t\t<oc:favorite>1</oc:favorite>\n\t\t\t</oc:filter-rules>\n\t\t</oc:filter-files>`;\n};\nconst getRecentSearch = function(lastModified) {\n return `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<d:searchrequest ${getDavNameSpaces()}\n\txmlns:ns=\"https://github.com/icewind1991/SearchDAV/ns\">\n\t<d:basicsearch>\n\t\t<d:select>\n\t\t\t<d:prop>\n\t\t\t\t${getDavProperties()}\n\t\t\t</d:prop>\n\t\t</d:select>\n\t\t<d:from>\n\t\t\t<d:scope>\n\t\t\t\t<d:href>/files/${getCurrentUser()?.uid}/</d:href>\n\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t</d:scope>\n\t\t</d:from>\n\t\t<d:where>\n\t\t\t<d:and>\n\t\t\t\t<d:or>\n\t\t\t\t\t<d:not>\n\t\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<d:getcontenttype/>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t<d:literal>httpd/unix-directory</d:literal>\n\t\t\t\t\t\t</d:eq>\n\t\t\t\t\t</d:not>\n\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t<oc:size/>\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t<d:literal>0</d:literal>\n\t\t\t\t\t</d:eq>\n\t\t\t\t</d:or>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${lastModified}</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t</d:and>\n\t\t</d:where>\n\t\t<d:orderby>\n\t\t\t<d:order>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:descending/>\n\t\t\t</d:order>\n\t\t</d:orderby>\n\t\t<d:limit>\n\t\t\t<d:nresults>100</d:nresults>\n\t\t\t<ns:firstresult>0</ns:firstresult>\n\t\t</d:limit>\n\t</d:basicsearch>\n</d:searchrequest>`;\n};\nfunction getRootPath() {\n if (isPublicShare()) {\n return `/files/${getSharingToken()}`;\n }\n return `/files/${getCurrentUser()?.uid}`;\n}\nconst defaultRootPath = getRootPath();\nfunction getRemoteURL() {\n const url = generateRemoteUrl(\"dav\");\n if (isPublicShare()) {\n return url.replace(\"remote.php\", \"public.php\");\n }\n return url;\n}\nconst defaultRemoteURL = getRemoteURL();\nconst getClient = function(remoteURL = defaultRemoteURL, headers = {}) {\n const client = createClient(remoteURL, { headers });\n function setHeaders(token) {\n client.setHeaders({\n ...headers,\n // Add this so the server knows it is an request from the browser\n \"X-Requested-With\": \"XMLHttpRequest\",\n // Inject user auth\n requesttoken: token ?? \"\"\n });\n }\n onRequestTokenUpdate(setHeaders);\n setHeaders(getRequestToken());\n const patcher = getPatcher();\n patcher.patch(\"fetch\", (url, options) => {\n const headers2 = options.headers;\n if (headers2?.method) {\n options.method = headers2.method;\n delete headers2.method;\n }\n return fetch(url, options);\n });\n return client;\n};\nconst getFavoriteNodes = (davClient, path = \"/\", davRoot = defaultRootPath) => {\n const controller = new AbortController();\n return new CancelablePromise(async (resolve, reject, onCancel) => {\n onCancel(() => controller.abort());\n try {\n const contentsResponse = await davClient.getDirectoryContents(`${davRoot}${path}`, {\n signal: controller.signal,\n details: true,\n data: getFavoritesReport(),\n headers: {\n // see getClient for patched webdav client\n method: \"REPORT\"\n },\n includeSelf: true\n });\n const nodes = contentsResponse.data.filter((node) => node.filename !== path).map((result) => resultToNode(result, davRoot));\n resolve(nodes);\n } catch (error) {\n reject(error);\n }\n });\n};\nconst resultToNode = function(node, filesRoot = defaultRootPath, remoteURL = defaultRemoteURL) {\n let userId = getCurrentUser()?.uid;\n if (isPublicShare()) {\n userId = userId ?? \"anonymous\";\n } else if (!userId) {\n throw new Error(\"No user id found\");\n }\n const props = node.props;\n const permissions = parsePermissions(props?.permissions);\n const owner = String(props?.[\"owner-id\"] || userId);\n const id = props.fileid || 0;\n const mtime = new Date(Date.parse(node.lastmod));\n const crtime = new Date(Date.parse(props.creationdate));\n const nodeData = {\n id,\n source: `${remoteURL}${node.filename}`,\n mtime: !isNaN(mtime.getTime()) && mtime.getTime() !== 0 ? mtime : void 0,\n crtime: !isNaN(crtime.getTime()) && crtime.getTime() !== 0 ? crtime : void 0,\n mime: node.mime || \"application/octet-stream\",\n // Manually cast to work around for https://github.com/perry-mitchell/webdav-client/pull/380\n displayname: props.displayname !== void 0 ? String(props.displayname) : void 0,\n size: props?.size || Number.parseInt(props.getcontentlength || \"0\"),\n // The fileid is set to -1 for failed requests\n status: id < 0 ? NodeStatus.FAILED : void 0,\n permissions,\n owner,\n root: filesRoot,\n attributes: {\n ...node,\n ...props,\n hasPreview: props?.[\"has-preview\"]\n }\n };\n delete nodeData.attributes?.props;\n return node.type === \"file\" ? new File(nodeData) : new Folder(nodeData);\n};\nexport {\n FileType as F,\n Node as N,\n Permission as P,\n getRemoteURL as a,\n defaultRemoteURL as b,\n getClient as c,\n defaultRootPath as d,\n getFavoriteNodes as e,\n defaultDavProperties as f,\n getRootPath as g,\n defaultDavNamespaces as h,\n registerDavProperty as i,\n getDavProperties as j,\n getDavNameSpaces as k,\n getDefaultPropfind as l,\n getFavoritesReport as m,\n getRecentSearch as n,\n logger as o,\n parsePermissions as p,\n File as q,\n resultToNode as r,\n Folder as s,\n NodeStatus as t\n};\n//# sourceMappingURL=dav-Rt1kTtvI.mjs.map\n"],"file":"BotForm-S-ACeDfi.chunk.mjs"} |