@opencloud-eu/web-client 1.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{functions-ikwhAVhP.cjs → functions-CLNcqXgl.cjs} +1 -1
- package/dist/{functions-CsnDdpYv.js → functions-Dm62BUjy.js} +82 -81
- package/dist/{index-eFi29SPG.cjs → index-D3oTmvJr.cjs} +13 -13
- package/dist/{index-DqVarwg_.js → index-DQ96P-uk.js} +406 -417
- package/dist/{index-oQ7995oB.js → index-DkgTVi3s.js} +1 -1
- package/dist/{index-DbVGtwLH.cjs → index-Do5mZY6J.cjs} +1 -1
- package/dist/index-re-e8Ljt.cjs +6 -0
- package/dist/{index-VvbQMSOr.js → index-tqlH9TZJ.js} +315 -312
- package/dist/src/graph/generated/common.d.ts +1 -1
- package/dist/src/helpers/space/types.d.ts +2 -0
- package/dist/web-client/graph/generated.cjs +1 -1
- package/dist/web-client/graph/generated.js +1 -1
- package/dist/web-client/graph.cjs +1 -1
- package/dist/web-client/graph.js +1 -1
- package/dist/web-client/ocs.cjs +1 -1
- package/dist/web-client/ocs.js +1 -0
- package/dist/web-client/webdav.cjs +1 -1
- package/dist/web-client/webdav.js +3 -3
- package/dist/web-client.cjs +1 -1
- package/dist/web-client.js +5 -5
- package/package.json +1 -1
- package/dist/index-C1H-OgNf.cjs +0 -6
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
"use strict";var Br=Object.defineProperty;var Rt=r=>{throw TypeError(r)};var qr=(r,e,t)=>e in r?Br(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var U=(r,e,t)=>qr(r,typeof e!="symbol"?e+"":e,t),Je=(r,e,t)=>e.has(r)||Rt("Cannot "+t);var S=(r,e,t)=>(Je(r,e,"read from private field"),t?t.call(r):e.get(r)),oe=(r,e,t)=>e.has(r)?Rt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),X=(r,e,t,n)=>(Je(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t),me=(r,e,t)=>(Je(r,e,"access private method"),t);const Wr=require("./index-C1H-OgNf.cjs"),L=require("./functions-ikwhAVhP.cjs"),W=require("./toString-hHr716Th.cjs"),Xr=require("./web-client/ocs.cjs"),ce=require("./index-C6VnMvgz.cjs"),Ie=r=>encodeURIComponent(r).split("%2F").join("/");class xt extends Error{constructor(t,n,o=null){super(t);U(this,"response");U(this,"statusCode");this.response=n,this.statusCode=o}}class mr extends xt{constructor(t,n,o,u=null){super(t,o,u);U(this,"errorCode");this.errorCode=n}}const ge=(r,{fileId:e,path:t,name:n})=>{if(t!==void 0)return W.urlJoin(r.webDavPath,t);if(e!==void 0){if(L.isPublicSpaceResource(r))throw new Error("public spaces need a path provided");return W.urlJoin("spaces",e,n||"")}return r.webDavPath},Gr=(r,e)=>({copyFiles(t,{path:n,fileId:o},u,{path:l,parentFolderId:i,name:h},{overwrite:a,...s}={}){const f=ge(t,{fileId:o,path:n}),c=ge(u,{fileId:i,path:l,name:h});return r.copy(f,c,{overwrite:a||!1,...s})}}),zr=(r,e,t)=>({async createFolder(n,{path:o,parentFolderId:u,folderName:l,fetchFolder:i=!0,...h}){const a=ge(n,{fileId:u,path:o,name:l});if(await r.mkcol(a),i)return e.getFileInfo(n,{path:o},h)}}),Jr=(r,{axiosClient:e})=>({async getFileContents(t,{fileId:n,path:o},{responseType:u="text",noCache:l=!0,headers:i,...h}={}){try{const a=ge(t,{fileId:n,path:o}),s=await e.get(r.getFileUrl(a),{responseType:u,headers:{...l&&{"Cache-Control":"no-cache"},...i||{}},...h});return{response:s,body:s.data,headers:{ETag:s.headers.etag,"OC-ETag":s.headers["oc-etag"],"OC-FileId":s.headers["oc-fileid"]}}}catch(a){const{message:s,response:f}=a;throw new xt(s,f,f.status)}}}),Hr=(r,e)=>({async getFileInfo(t,n,o){return(await r.listFiles(t,n,{depth:0,...o})).resource}}),Zr=(r,e,{axiosClient:t,baseUrl:n})=>({async getFileUrl(o,u,{disposition:l="attachment",isUrlSigningEnabled:i=!1,signUrlTimeout:h=86400,version:a=null,doHeadRequest:s=!1,username:f="",...c}){const g=l==="inline";let{downloadURL:m}=u,d=!0;if(!m&&!g&&(m=a?r.getFileUrl(W.urlJoin("meta",u.fileId,"v",a)):r.getFileUrl(u.webDavPath),f&&s&&await t.head(m),i&&f?m=await Xr.ocs(n,t).signUrl(m,f):d=!1),!d||g){const w=await e.getFileContents(o,u,{responseType:"blob",...c});m=URL.createObjectURL(w.body)}return m},revokeUrl:o=>{o&&o.startsWith("blob:")&&URL.revokeObjectURL(o)}}),Yr=(r,e)=>({getPublicFileUrl(t,n){return r.getFileUrl(W.urlJoin("public-files",n))}}),Kr=(r,e,t)=>({async listFiles(n,{path:o,fileId:u}={},{depth:l=1,davProperties:i,isTrash:h=!1,...a}={}){let s;if(L.isPublicSpaceResource(n)){if(s=await r.propfind(W.urlJoin(n.webDavPath,o),{depth:l,properties:i||L.DavProperties.PublicLink,...a}),s.forEach(g=>{g.filename=g.filename.split("/").slice(1).join("/")}),s.length===1&&(s[0].filename=W.urlJoin(n.id,o,{leadingSlash:!0})),s.forEach(g=>{g.filename=g.filename.split("/").slice(2).join("/")}),(!o||o==="/")&&l>0&&n.driveAlias.startsWith("ocm/")&&s[0].props[L.DavProperty.PublicLinkItemType]==="file"&&(s=[{basename:n.fileId,type:"directory",filename:"",props:{}},...s]),!o){const[g,...m]=s;return{resource:L.buildPublicSpaceResource({...g,id:n.id,driveAlias:n.driveAlias,webDavPath:n.webDavPath}),children:m.map(d=>L.buildResource(d,r.extraProps))}}const c=s.map(g=>L.buildResource(g,r.extraProps));return{resource:c[0],children:c.slice(1)}}const f=async()=>{const c=await e.getPathForFileId(u);return this.listFiles(n,{path:c},{depth:l,davProperties:i})};try{let c="";if(h?c=L.buildWebDavSpacesTrashPath(n.id):c=ge(n,{fileId:u,path:o}),s=await r.propfind(c,{depth:l,properties:i||L.DavProperties.Default,...a}),h)return{resource:L.buildResource(s[0],r.extraProps),children:s.slice(1).map(L.buildDeletedResource)};const g=s.map(d=>L.buildResource(d,r.extraProps)),m=u===n.id;return u&&!m&&u!==g[0].fileId?f():{resource:g[0],children:g.slice(1)}}catch(c){if(c.statusCode===404&&u)return f();throw c}}}),Qr=(r,e)=>({moveFiles(t,{path:n,fileId:o},u,{path:l,parentFolderId:i,name:h},{overwrite:a,...s}={}){const f=ge(t,{fileId:o,path:n}),c=ge(u,{fileId:i,path:l,name:h});return r.move(f,c,{overwrite:a||!1,...s})}}),Dr=(r,e,t)=>({async putFileContents(n,{fileName:o,path:u,parentFolderId:l,content:i="",previousEntityTag:h="",overwrite:a,onUploadProgress:s=null,...f}){const c=ge(n,{fileId:l,name:o,path:u}),{result:g}=await r.put(c,i,{previousEntityTag:h,overwrite:a,onUploadProgress:s,...f});return e.getFileInfo(n,{fileId:g.headers.get("Oc-Fileid"),path:u})}}),en=(r,e)=>({deleteFile(t,{path:n,...o}){return r.delete(W.urlJoin(t.webDavPath,n),o)}}),tn=(r,e)=>({restoreFile(t,{id:n},{path:o},{overwrite:u,...l}={}){if(L.isPublicSpaceResource(t))return;const i=W.urlJoin(t.webDavPath,o);return r.move(W.urlJoin(t.webDavTrashPath,n),i,{overwrite:u,...l})}}),rn=(r,e)=>({restoreFileVersion(t,{parentFolderId:n,name:o,path:u},l,i={}){const h=ge(t,{path:u,fileId:n,name:o}),a=W.urlJoin("meta",n,"v",l,{leadingSlash:!0}),s=W.urlJoin("files",h,{leadingSlash:!0});return r.copy(a,s,i)}}),nn=(r,e)=>({clearTrashBin(t,{id:n,...o}={}){let u=L.buildWebDavSpacesTrashPath(t.id);return n&&(u=W.urlJoin(u,n)),r.delete(u,o)}}),sn=(r,e)=>({async search(t,{davProperties:n=L.DavProperties.Default,searchLimit:o,...u}){const l="/spaces/",{range:i,results:h}=await r.report(l,{pattern:t,limit:o,properties:n,...u});return{resources:h.map(a=>({...L.buildResource(a,r.extraProps),highlights:a.props[L.DavProperty.Highlights]||""})),totalResults:i?parseInt(i==null?void 0:i.split("/")[1]):null}}}),on=(r,e)=>({async getPathForFileId(t,n={}){return(await r.propfind(W.urlJoin("meta",t,{leadingSlash:!0}),{properties:[L.DavProperty.MetaPathForUser],...n}))[0].props[L.DavProperty.MetaPathForUser]}});/*! For license information please see index.js.LICENSE.txt */var an={2:r=>{function e(o,u,l){o instanceof RegExp&&(o=t(o,l)),u instanceof RegExp&&(u=t(u,l));var i=n(o,u,l);return i&&{start:i[0],end:i[1],pre:l.slice(0,i[0]),body:l.slice(i[0]+o.length,i[1]),post:l.slice(i[1]+u.length)}}function t(o,u){var l=u.match(o);return l?l[0]:null}function n(o,u,l){var i,h,a,s,f,c=l.indexOf(o),g=l.indexOf(u,c+1),m=c;if(c>=0&&g>0){for(i=[],a=l.length;m>=0&&!f;)m==c?(i.push(m),c=l.indexOf(o,m+1)):i.length==1?f=[i.pop(),g]:((h=i.pop())<a&&(a=h,s=g),g=l.indexOf(u,m+1)),m=c<g&&c>=0?c:g;i.length&&(f=[a,s])}return f}r.exports=e,e.range=n},101:function(r,e,t){var n;r=t.nmd(r),function(o){var u=(r&&r.exports,typeof ce.global=="object"&&ce.global);u.global!==u&&u.window;var l=function(f){this.message=f};(l.prototype=new Error).name="InvalidCharacterError";var i=function(f){throw new l(f)},h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=/[\t\n\f\r ]/g,s={encode:function(f){f=String(f),/[^\0-\xFF]/.test(f)&&i("The string to be encoded contains characters outside of the Latin1 range.");for(var c,g,m,d,w=f.length%3,y="",p=-1,v=f.length-w;++p<v;)c=f.charCodeAt(p)<<16,g=f.charCodeAt(++p)<<8,m=f.charCodeAt(++p),y+=h.charAt((d=c+g+m)>>18&63)+h.charAt(d>>12&63)+h.charAt(d>>6&63)+h.charAt(63&d);return w==2?(c=f.charCodeAt(p)<<8,g=f.charCodeAt(++p),y+=h.charAt((d=c+g)>>10)+h.charAt(d>>4&63)+h.charAt(d<<2&63)+"="):w==1&&(d=f.charCodeAt(p),y+=h.charAt(d>>2)+h.charAt(d<<4&63)+"=="),y},decode:function(f){var c=(f=String(f).replace(a,"")).length;c%4==0&&(c=(f=f.replace(/==?$/,"")).length),(c%4==1||/[^+a-zA-Z0-9/]/.test(f))&&i("Invalid character: the string to be decoded is not correctly encoded.");for(var g,m,d=0,w="",y=-1;++y<c;)m=h.indexOf(f.charAt(y)),g=d%4?64*g+m:m,d++%4&&(w+=String.fromCharCode(255&g>>(-2*d&6)));return w},version:"1.0.0"};(n=(function(){return s}).call(e,t,e,r))===void 0||(r.exports=n)}()},172:(r,e)=>{e.d=function(t){if(!t)return 0;for(var n=(t=t.toString()).length,o=t.length;o--;){var u=t.charCodeAt(o);56320<=u&&u<=57343&&o--,127<u&&u<=2047?n++:2047<u&&u<=65535&&(n+=2)}return n}},526:r=>{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 n=[],o=0;o<t.length;o++)n.push(255&t.charCodeAt(o));return n},bytesToString:function(t){for(var n=[],o=0;o<t.length;o++)n.push(String.fromCharCode(t[o]));return n.join("")}}};r.exports=e},298:r=>{var e,t;e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(n,o){return n<<o|n>>>32-o},rotr:function(n,o){return n<<32-o|n>>>o},endian:function(n){if(n.constructor==Number)return 16711935&t.rotl(n,8)|4278255360&t.rotl(n,24);for(var o=0;o<n.length;o++)n[o]=t.endian(n[o]);return n},randomBytes:function(n){for(var o=[];n>0;n--)o.push(Math.floor(256*Math.random()));return o},bytesToWords:function(n){for(var o=[],u=0,l=0;u<n.length;u++,l+=8)o[l>>>5]|=n[u]<<24-l%32;return o},wordsToBytes:function(n){for(var o=[],u=0;u<32*n.length;u+=8)o.push(n[u>>>5]>>>24-u%32&255);return o},bytesToHex:function(n){for(var o=[],u=0;u<n.length;u++)o.push((n[u]>>>4).toString(16)),o.push((15&n[u]).toString(16));return o.join("")},hexToBytes:function(n){for(var o=[],u=0;u<n.length;u+=2)o.push(parseInt(n.substr(u,2),16));return o},bytesToBase64:function(n){for(var o=[],u=0;u<n.length;u+=3)for(var l=n[u]<<16|n[u+1]<<8|n[u+2],i=0;i<4;i++)8*u+6*i<=8*n.length?o.push(e.charAt(l>>>6*(3-i)&63)):o.push("=");return o.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/gi,"");for(var o=[],u=0,l=0;u<n.length;l=++u%4)l!=0&&o.push((e.indexOf(n.charAt(u-1))&Math.pow(2,-2*l+8)-1)<<2*l|e.indexOf(n.charAt(u))>>>6-2*l);return o}},r.exports=t},635:(r,e,t)=>{const n=t(31),o=t(338),u=t(221);r.exports={XMLParser:o,XMLValidator:n,XMLBuilder:u}},118:r=>{r.exports=function(e){return typeof e=="function"?e:Array.isArray(e)?t=>{for(const n of e)if(typeof n=="string"&&t===n||n instanceof RegExp&&n.test(t))return!0}:()=>!1}},705:(r,e)=>{const t=":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",n="["+t+"]["+t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",o=new RegExp("^"+n+"$");e.isExist=function(u){return u!==void 0},e.isEmptyObject=function(u){return Object.keys(u).length===0},e.merge=function(u,l,i){if(l){const h=Object.keys(l),a=h.length;for(let s=0;s<a;s++)u[h[s]]=i==="strict"?[l[h[s]]]:l[h[s]]}},e.getValue=function(u){return e.isExist(u)?u:""},e.isName=function(u){return o.exec(u)!=null},e.getAllMatches=function(u,l){const i=[];let h=l.exec(u);for(;h;){const a=[];a.startIndex=l.lastIndex-h[0].length;const s=h.length;for(let f=0;f<s;f++)a.push(h[f]);i.push(a),h=l.exec(u)}return i},e.nameRegexp=n},31:(r,e,t)=>{const n=t(705),o={allowBooleanAttributes:!1,unpairedTags:[]};function u(p){return p===" "||p===" "||p===`
|
|
1
|
+
"use strict";var Br=Object.defineProperty;var Rt=r=>{throw TypeError(r)};var qr=(r,e,t)=>e in r?Br(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var U=(r,e,t)=>qr(r,typeof e!="symbol"?e+"":e,t),Je=(r,e,t)=>e.has(r)||Rt("Cannot "+t);var S=(r,e,t)=>(Je(r,e,"read from private field"),t?t.call(r):e.get(r)),oe=(r,e,t)=>e.has(r)?Rt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),X=(r,e,t,n)=>(Je(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t),me=(r,e,t)=>(Je(r,e,"access private method"),t);const Wr=require("./index-re-e8Ljt.cjs"),L=require("./functions-CLNcqXgl.cjs"),W=require("./toString-hHr716Th.cjs"),Xr=require("./web-client/ocs.cjs"),ce=require("./index-C6VnMvgz.cjs"),Ie=r=>encodeURIComponent(r).split("%2F").join("/");class xt extends Error{constructor(t,n,o=null){super(t);U(this,"response");U(this,"statusCode");this.response=n,this.statusCode=o}}class mr extends xt{constructor(t,n,o,u=null){super(t,o,u);U(this,"errorCode");this.errorCode=n}}const ge=(r,{fileId:e,path:t,name:n})=>{if(t!==void 0)return W.urlJoin(r.webDavPath,t);if(e!==void 0){if(L.isPublicSpaceResource(r))throw new Error("public spaces need a path provided");return W.urlJoin("spaces",e,n||"")}return r.webDavPath},Gr=(r,e)=>({copyFiles(t,{path:n,fileId:o},u,{path:l,parentFolderId:i,name:h},{overwrite:a,...s}={}){const f=ge(t,{fileId:o,path:n}),c=ge(u,{fileId:i,path:l,name:h});return r.copy(f,c,{overwrite:a||!1,...s})}}),zr=(r,e,t)=>({async createFolder(n,{path:o,parentFolderId:u,folderName:l,fetchFolder:i=!0,...h}){const a=ge(n,{fileId:u,path:o,name:l});if(await r.mkcol(a),i)return e.getFileInfo(n,{path:o},h)}}),Jr=(r,{axiosClient:e})=>({async getFileContents(t,{fileId:n,path:o},{responseType:u="text",noCache:l=!0,headers:i,...h}={}){try{const a=ge(t,{fileId:n,path:o}),s=await e.get(r.getFileUrl(a),{responseType:u,headers:{...l&&{"Cache-Control":"no-cache"},...i||{}},...h});return{response:s,body:s.data,headers:{ETag:s.headers.etag,"OC-ETag":s.headers["oc-etag"],"OC-FileId":s.headers["oc-fileid"]}}}catch(a){const{message:s,response:f}=a;throw new xt(s,f,f.status)}}}),Hr=(r,e)=>({async getFileInfo(t,n,o){return(await r.listFiles(t,n,{depth:0,...o})).resource}}),Zr=(r,e,{axiosClient:t,baseUrl:n})=>({async getFileUrl(o,u,{disposition:l="attachment",isUrlSigningEnabled:i=!1,signUrlTimeout:h=86400,version:a=null,doHeadRequest:s=!1,username:f="",...c}){const d=l==="inline";let{downloadURL:m}=u,g=!0;if(!m&&!d&&(m=a?r.getFileUrl(W.urlJoin("meta",u.fileId,"v",a)):r.getFileUrl(u.webDavPath),f&&s&&await t.head(m),i&&f?m=await Xr.ocs(n,t).signUrl(m,f):g=!1),!g||d){const w=await e.getFileContents(o,u,{responseType:"blob",...c});m=URL.createObjectURL(w.body)}return m},revokeUrl:o=>{o&&o.startsWith("blob:")&&URL.revokeObjectURL(o)}}),Yr=(r,e)=>({getPublicFileUrl(t,n){return r.getFileUrl(W.urlJoin("public-files",n))}}),Kr=(r,e,t)=>({async listFiles(n,{path:o,fileId:u}={},{depth:l=1,davProperties:i,isTrash:h=!1,...a}={}){let s;if(L.isPublicSpaceResource(n)){s=await r.propfind(W.urlJoin(n.webDavPath,o),{depth:l,properties:i||L.DavProperties.PublicLink,...a}),s.forEach(m=>{m.filename=m.filename.split("/").slice(1).join("/")}),s.length===1&&(s[0].filename=W.urlJoin(n.id,o,{leadingSlash:!0})),s.forEach(m=>{m.filename=m.filename.split("/").slice(2).join("/")});const c=n.driveAlias.startsWith("ocm/")?"ocm":"public-link";if((!o||o==="/")&&l>0&&c==="ocm"&&s[0].props[L.DavProperty.PublicLinkItemType]==="file"&&(s=[{basename:n.fileId,type:"directory",filename:"",props:{}},...s]),!o){const[m,...g]=s;return{resource:L.buildPublicSpaceResource({...m,id:n.id,driveAlias:n.driveAlias,webDavPath:n.webDavPath,publicLinkType:c}),children:g.map(w=>L.buildResource(w,r.extraProps))}}const d=s.map(m=>L.buildResource(m,r.extraProps));return{resource:d[0],children:d.slice(1)}}const f=async()=>{const c=await e.getPathForFileId(u);return this.listFiles(n,{path:c},{depth:l,davProperties:i})};try{let c="";if(h?c=L.buildWebDavSpacesTrashPath(n.id):c=ge(n,{fileId:u,path:o}),s=await r.propfind(c,{depth:l,properties:i||L.DavProperties.Default,...a}),h)return{resource:L.buildResource(s[0],r.extraProps),children:s.slice(1).map(L.buildDeletedResource)};const d=s.map(g=>L.buildResource(g,r.extraProps)),m=u===n.id;return u&&!m&&u!==d[0].fileId?f():{resource:d[0],children:d.slice(1)}}catch(c){if(c.statusCode===404&&u)return f();throw c}}}),Qr=(r,e)=>({moveFiles(t,{path:n,fileId:o},u,{path:l,parentFolderId:i,name:h},{overwrite:a,...s}={}){const f=ge(t,{fileId:o,path:n}),c=ge(u,{fileId:i,path:l,name:h});return r.move(f,c,{overwrite:a||!1,...s})}}),Dr=(r,e,t)=>({async putFileContents(n,{fileName:o,path:u,parentFolderId:l,content:i="",previousEntityTag:h="",overwrite:a,onUploadProgress:s=null,...f}){const c=ge(n,{fileId:l,name:o,path:u}),{result:d}=await r.put(c,i,{previousEntityTag:h,overwrite:a,onUploadProgress:s,...f});return e.getFileInfo(n,{fileId:d.headers.get("Oc-Fileid"),path:u})}}),en=(r,e)=>({deleteFile(t,{path:n,...o}){return r.delete(W.urlJoin(t.webDavPath,n),o)}}),tn=(r,e)=>({restoreFile(t,{id:n},{path:o},{overwrite:u,...l}={}){if(L.isPublicSpaceResource(t))return;const i=W.urlJoin(t.webDavPath,o);return r.move(W.urlJoin(t.webDavTrashPath,n),i,{overwrite:u,...l})}}),rn=(r,e)=>({restoreFileVersion(t,{parentFolderId:n,name:o,path:u},l,i={}){const h=ge(t,{path:u,fileId:n,name:o}),a=W.urlJoin("meta",n,"v",l,{leadingSlash:!0}),s=W.urlJoin("files",h,{leadingSlash:!0});return r.copy(a,s,i)}}),nn=(r,e)=>({clearTrashBin(t,{id:n,...o}={}){let u=L.buildWebDavSpacesTrashPath(t.id);return n&&(u=W.urlJoin(u,n)),r.delete(u,o)}}),sn=(r,e)=>({async search(t,{davProperties:n=L.DavProperties.Default,searchLimit:o,...u}){const l="/spaces/",{range:i,results:h}=await r.report(l,{pattern:t,limit:o,properties:n,...u});return{resources:h.map(a=>({...L.buildResource(a,r.extraProps),highlights:a.props[L.DavProperty.Highlights]||""})),totalResults:i?parseInt(i==null?void 0:i.split("/")[1]):null}}}),on=(r,e)=>({async getPathForFileId(t,n={}){return(await r.propfind(W.urlJoin("meta",t,{leadingSlash:!0}),{properties:[L.DavProperty.MetaPathForUser],...n}))[0].props[L.DavProperty.MetaPathForUser]}});/*! For license information please see index.js.LICENSE.txt */var an={2:r=>{function e(o,u,l){o instanceof RegExp&&(o=t(o,l)),u instanceof RegExp&&(u=t(u,l));var i=n(o,u,l);return i&&{start:i[0],end:i[1],pre:l.slice(0,i[0]),body:l.slice(i[0]+o.length,i[1]),post:l.slice(i[1]+u.length)}}function t(o,u){var l=u.match(o);return l?l[0]:null}function n(o,u,l){var i,h,a,s,f,c=l.indexOf(o),d=l.indexOf(u,c+1),m=c;if(c>=0&&d>0){for(i=[],a=l.length;m>=0&&!f;)m==c?(i.push(m),c=l.indexOf(o,m+1)):i.length==1?f=[i.pop(),d]:((h=i.pop())<a&&(a=h,s=d),d=l.indexOf(u,m+1)),m=c<d&&c>=0?c:d;i.length&&(f=[a,s])}return f}r.exports=e,e.range=n},101:function(r,e,t){var n;r=t.nmd(r),function(o){var u=(r&&r.exports,typeof ce.global=="object"&&ce.global);u.global!==u&&u.window;var l=function(f){this.message=f};(l.prototype=new Error).name="InvalidCharacterError";var i=function(f){throw new l(f)},h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=/[\t\n\f\r ]/g,s={encode:function(f){f=String(f),/[^\0-\xFF]/.test(f)&&i("The string to be encoded contains characters outside of the Latin1 range.");for(var c,d,m,g,w=f.length%3,y="",p=-1,v=f.length-w;++p<v;)c=f.charCodeAt(p)<<16,d=f.charCodeAt(++p)<<8,m=f.charCodeAt(++p),y+=h.charAt((g=c+d+m)>>18&63)+h.charAt(g>>12&63)+h.charAt(g>>6&63)+h.charAt(63&g);return w==2?(c=f.charCodeAt(p)<<8,d=f.charCodeAt(++p),y+=h.charAt((g=c+d)>>10)+h.charAt(g>>4&63)+h.charAt(g<<2&63)+"="):w==1&&(g=f.charCodeAt(p),y+=h.charAt(g>>2)+h.charAt(g<<4&63)+"=="),y},decode:function(f){var c=(f=String(f).replace(a,"")).length;c%4==0&&(c=(f=f.replace(/==?$/,"")).length),(c%4==1||/[^+a-zA-Z0-9/]/.test(f))&&i("Invalid character: the string to be decoded is not correctly encoded.");for(var d,m,g=0,w="",y=-1;++y<c;)m=h.indexOf(f.charAt(y)),d=g%4?64*d+m:m,g++%4&&(w+=String.fromCharCode(255&d>>(-2*g&6)));return w},version:"1.0.0"};(n=(function(){return s}).call(e,t,e,r))===void 0||(r.exports=n)}()},172:(r,e)=>{e.d=function(t){if(!t)return 0;for(var n=(t=t.toString()).length,o=t.length;o--;){var u=t.charCodeAt(o);56320<=u&&u<=57343&&o--,127<u&&u<=2047?n++:2047<u&&u<=65535&&(n+=2)}return n}},526:r=>{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 n=[],o=0;o<t.length;o++)n.push(255&t.charCodeAt(o));return n},bytesToString:function(t){for(var n=[],o=0;o<t.length;o++)n.push(String.fromCharCode(t[o]));return n.join("")}}};r.exports=e},298:r=>{var e,t;e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(n,o){return n<<o|n>>>32-o},rotr:function(n,o){return n<<32-o|n>>>o},endian:function(n){if(n.constructor==Number)return 16711935&t.rotl(n,8)|4278255360&t.rotl(n,24);for(var o=0;o<n.length;o++)n[o]=t.endian(n[o]);return n},randomBytes:function(n){for(var o=[];n>0;n--)o.push(Math.floor(256*Math.random()));return o},bytesToWords:function(n){for(var o=[],u=0,l=0;u<n.length;u++,l+=8)o[l>>>5]|=n[u]<<24-l%32;return o},wordsToBytes:function(n){for(var o=[],u=0;u<32*n.length;u+=8)o.push(n[u>>>5]>>>24-u%32&255);return o},bytesToHex:function(n){for(var o=[],u=0;u<n.length;u++)o.push((n[u]>>>4).toString(16)),o.push((15&n[u]).toString(16));return o.join("")},hexToBytes:function(n){for(var o=[],u=0;u<n.length;u+=2)o.push(parseInt(n.substr(u,2),16));return o},bytesToBase64:function(n){for(var o=[],u=0;u<n.length;u+=3)for(var l=n[u]<<16|n[u+1]<<8|n[u+2],i=0;i<4;i++)8*u+6*i<=8*n.length?o.push(e.charAt(l>>>6*(3-i)&63)):o.push("=");return o.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/gi,"");for(var o=[],u=0,l=0;u<n.length;l=++u%4)l!=0&&o.push((e.indexOf(n.charAt(u-1))&Math.pow(2,-2*l+8)-1)<<2*l|e.indexOf(n.charAt(u))>>>6-2*l);return o}},r.exports=t},635:(r,e,t)=>{const n=t(31),o=t(338),u=t(221);r.exports={XMLParser:o,XMLValidator:n,XMLBuilder:u}},118:r=>{r.exports=function(e){return typeof e=="function"?e:Array.isArray(e)?t=>{for(const n of e)if(typeof n=="string"&&t===n||n instanceof RegExp&&n.test(t))return!0}:()=>!1}},705:(r,e)=>{const t=":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",n="["+t+"]["+t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",o=new RegExp("^"+n+"$");e.isExist=function(u){return u!==void 0},e.isEmptyObject=function(u){return Object.keys(u).length===0},e.merge=function(u,l,i){if(l){const h=Object.keys(l),a=h.length;for(let s=0;s<a;s++)u[h[s]]=i==="strict"?[l[h[s]]]:l[h[s]]}},e.getValue=function(u){return e.isExist(u)?u:""},e.isName=function(u){return o.exec(u)!=null},e.getAllMatches=function(u,l){const i=[];let h=l.exec(u);for(;h;){const a=[];a.startIndex=l.lastIndex-h[0].length;const s=h.length;for(let f=0;f<s;f++)a.push(h[f]);i.push(a),h=l.exec(u)}return i},e.nameRegexp=n},31:(r,e,t)=>{const n=t(705),o={allowBooleanAttributes:!1,unpairedTags:[]};function u(p){return p===" "||p===" "||p===`
|
|
2
2
|
`||p==="\r"}function l(p,v){const A=v;for(;v<p.length;v++)if(!(p[v]!="?"&&p[v]!=" ")){const N=p.substr(A,v-A);if(v>5&&N==="xml")return m("InvalidXml","XML declaration allowed only at the start of the document.",w(p,v));if(p[v]=="?"&&p[v+1]==">"){v++;break}}return v}function i(p,v){if(p.length>v+5&&p[v+1]==="-"&&p[v+2]==="-"){for(v+=3;v<p.length;v++)if(p[v]==="-"&&p[v+1]==="-"&&p[v+2]===">"){v+=2;break}}else if(p.length>v+8&&p[v+1]==="D"&&p[v+2]==="O"&&p[v+3]==="C"&&p[v+4]==="T"&&p[v+5]==="Y"&&p[v+6]==="P"&&p[v+7]==="E"){let A=1;for(v+=8;v<p.length;v++)if(p[v]==="<")A++;else if(p[v]===">"&&(A--,A===0))break}else if(p.length>v+9&&p[v+1]==="["&&p[v+2]==="C"&&p[v+3]==="D"&&p[v+4]==="A"&&p[v+5]==="T"&&p[v+6]==="A"&&p[v+7]==="["){for(v+=8;v<p.length;v++)if(p[v]==="]"&&p[v+1]==="]"&&p[v+2]===">"){v+=2;break}}return v}e.validate=function(p,v){v=Object.assign({},o,v);const A=[];let N=!1,b=!1;p[0]==="\uFEFF"&&(p=p.substr(1));for(let x=0;x<p.length;x++)if(p[x]==="<"&&p[x+1]==="?"){if(x+=2,x=l(p,x),x.err)return x}else{if(p[x]!=="<"){if(u(p[x]))continue;return m("InvalidChar","char '"+p[x]+"' is not expected.",w(p,x))}{let T=x;if(x++,p[x]==="!"){x=i(p,x);continue}{let O=!1;p[x]==="/"&&(O=!0,x++);let I="";for(;x<p.length&&p[x]!==">"&&p[x]!==" "&&p[x]!==" "&&p[x]!==`
|
|
3
|
-
`&&p[x]!=="\r";x++)I+=p[x];if(I=I.trim(),I[I.length-1]==="/"&&(I=I.substring(0,I.length-1),x--),E=I,!n.isName(E)){let $;return $=I.trim().length===0?"Invalid space after '<'.":"Tag '"+I+"' is an invalid name.",m("InvalidTag",$,w(p,x))}const C=s(p,x);if(C===!1)return m("InvalidAttr","Attributes for '"+I+"' have open quote.",w(p,x));let P=C.value;if(x=C.index,P[P.length-1]==="/"){const $=x-P.length;P=P.substring(0,P.length-1);const F=c(P,v);if(F!==!0)return m(F.err.code,F.err.msg,w(p,$+F.err.line));N=!0}else if(O){if(!C.tagClosed)return m("InvalidTag","Closing tag '"+I+"' doesn't have proper closing.",w(p,x));if(P.trim().length>0)return m("InvalidTag","Closing tag '"+I+"' can't have attributes or invalid starting.",w(p,T));if(A.length===0)return m("InvalidTag","Closing tag '"+I+"' has not been opened.",w(p,T));{const $=A.pop();if(I!==$.tagName){let F=w(p,$.tagStartPos);return m("InvalidTag","Expected closing tag '"+$.tagName+"' (opened in line "+F.line+", col "+F.col+") instead of closing tag '"+I+"'.",w(p,T))}A.length==0&&(b=!0)}}else{const $=c(P,v);if($!==!0)return m($.err.code,$.err.msg,w(p,x-P.length+$.err.line));if(b===!0)return m("InvalidXml","Multiple possible root nodes found.",w(p,x));v.unpairedTags.indexOf(I)!==-1||A.push({tagName:I,tagStartPos:T}),N=!0}for(x++;x<p.length;x++)if(p[x]==="<"){if(p[x+1]==="!"){x++,x=i(p,x);continue}if(p[x+1]!=="?")break;if(x=l(p,++x),x.err)return x}else if(p[x]==="&"){const $=
|
|
3
|
+
`&&p[x]!=="\r";x++)I+=p[x];if(I=I.trim(),I[I.length-1]==="/"&&(I=I.substring(0,I.length-1),x--),E=I,!n.isName(E)){let $;return $=I.trim().length===0?"Invalid space after '<'.":"Tag '"+I+"' is an invalid name.",m("InvalidTag",$,w(p,x))}const C=s(p,x);if(C===!1)return m("InvalidAttr","Attributes for '"+I+"' have open quote.",w(p,x));let P=C.value;if(x=C.index,P[P.length-1]==="/"){const $=x-P.length;P=P.substring(0,P.length-1);const F=c(P,v);if(F!==!0)return m(F.err.code,F.err.msg,w(p,$+F.err.line));N=!0}else if(O){if(!C.tagClosed)return m("InvalidTag","Closing tag '"+I+"' doesn't have proper closing.",w(p,x));if(P.trim().length>0)return m("InvalidTag","Closing tag '"+I+"' can't have attributes or invalid starting.",w(p,T));if(A.length===0)return m("InvalidTag","Closing tag '"+I+"' has not been opened.",w(p,T));{const $=A.pop();if(I!==$.tagName){let F=w(p,$.tagStartPos);return m("InvalidTag","Expected closing tag '"+$.tagName+"' (opened in line "+F.line+", col "+F.col+") instead of closing tag '"+I+"'.",w(p,T))}A.length==0&&(b=!0)}}else{const $=c(P,v);if($!==!0)return m($.err.code,$.err.msg,w(p,x-P.length+$.err.line));if(b===!0)return m("InvalidXml","Multiple possible root nodes found.",w(p,x));v.unpairedTags.indexOf(I)!==-1||A.push({tagName:I,tagStartPos:T}),N=!0}for(x++;x<p.length;x++)if(p[x]==="<"){if(p[x+1]==="!"){x++,x=i(p,x);continue}if(p[x+1]!=="?")break;if(x=l(p,++x),x.err)return x}else if(p[x]==="&"){const $=d(p,x);if($==-1)return m("InvalidChar","char '&' is not expected.",w(p,x));x=$}else if(b===!0&&!u(p[x]))return m("InvalidXml","Extra text at the end",w(p,x));p[x]==="<"&&x--}}}var E;return N?A.length==1?m("InvalidTag","Unclosed tag '"+A[0].tagName+"'.",w(p,A[0].tagStartPos)):!(A.length>0)||m("InvalidXml","Invalid '"+JSON.stringify(A.map(x=>x.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):m("InvalidXml","Start tag expected.",1)};const h='"',a="'";function s(p,v){let A="",N="",b=!1;for(;v<p.length;v++){if(p[v]===h||p[v]===a)N===""?N=p[v]:N!==p[v]||(N="");else if(p[v]===">"&&N===""){b=!0;break}A+=p[v]}return N===""&&{value:A,index:v,tagClosed:b}}const f=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function c(p,v){const A=n.getAllMatches(p,f),N={};for(let b=0;b<A.length;b++){if(A[b][1].length===0)return m("InvalidAttr","Attribute '"+A[b][2]+"' has no space in starting.",y(A[b]));if(A[b][3]!==void 0&&A[b][4]===void 0)return m("InvalidAttr","Attribute '"+A[b][2]+"' is without value.",y(A[b]));if(A[b][3]===void 0&&!v.allowBooleanAttributes)return m("InvalidAttr","boolean attribute '"+A[b][2]+"' is not allowed.",y(A[b]));const E=A[b][2];if(!g(E))return m("InvalidAttr","Attribute '"+E+"' is an invalid name.",y(A[b]));if(N.hasOwnProperty(E))return m("InvalidAttr","Attribute '"+E+"' is repeated.",y(A[b]));N[E]=1}return!0}function d(p,v){if(p[++v]===";")return-1;if(p[v]==="#")return function(N,b){let E=/\d/;for(N[b]==="x"&&(b++,E=/[\da-fA-F]/);b<N.length;b++){if(N[b]===";")return b;if(!N[b].match(E))break}return-1}(p,++v);let A=0;for(;v<p.length;v++,A++)if(!(p[v].match(/\w/)&&A<20)){if(p[v]===";")break;return-1}return v}function m(p,v,A){return{err:{code:p,msg:v,line:A.line||A,col:A.col}}}function g(p){return n.isName(p)}function w(p,v){const A=p.substring(0,v).split(/\r?\n/);return{line:A.length,col:A[A.length-1].length+1}}function y(p){return p.startIndex+p[1].length}},221:(r,e,t)=>{const n=t(87),o=t(118),u={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(s,f){return f},attributeValueProcessor:function(s,f){return f},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 l(s){this.options=Object.assign({},u,s),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=o(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=a),this.processTextOrObjNode=i,this.options.format?(this.indentate=h,this.tagEndChar=`>
|
|
4
4
|
`,this.newLine=`
|
|
5
|
-
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function i(s,f,c,
|
|
6
|
-
`),e(l,i,"",h)}},193:(r,e,t)=>{const n=t(705);function o(f,c){let
|
|
7
|
-
`);const E=new o("!xml");let x=E,T="",O="";for(let I=0;I<b.length;I++)if(b[I]==="<")if(b[I+1]==="/"){const C=p(b,">",I,"Closing Tag is not closed.");let P=b.substring(I+2,C).trim();if(this.options.removeNSPrefix){const j=P.indexOf(":");j!==-1&&(P=P.substr(j+1))}this.options.transformTagName&&(P=this.options.transformTagName(P)),x&&(T=this.saveTextToParentTag(T,x,O));const $=O.substring(O.lastIndexOf(".")+1);if(P&&this.options.unpairedTags.indexOf(P)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${P}>`);let F=0;$&&this.options.unpairedTags.indexOf($)!==-1?(F=O.lastIndexOf(".",O.lastIndexOf(".")-1),this.tagsNodeStack.pop()):F=O.lastIndexOf("."),O=O.substring(0,F),x=this.tagsNodeStack.pop(),T="",I=C}else if(b[I+1]==="?"){let C=v(b,I,!1,"?>");if(!C)throw new Error("Pi Tag is not closed.");if(T=this.saveTextToParentTag(T,x,O),!(this.options.ignoreDeclaration&&C.tagName==="?xml"||this.options.ignorePiTags)){const P=new o(C.tagName);P.add(this.options.textNodeName,""),C.tagName!==C.tagExp&&C.attrExpPresent&&(P[":@"]=this.buildAttributesMap(C.tagExp,O,C.tagName)),this.addChild(x,P,O)}I=C.closeIndex+1}else if(b.substr(I+1,3)==="!--"){const C=p(b,"-->",I+4,"Comment is not closed.");if(this.options.commentPropName){const P=b.substring(I+4,C-2);T=this.saveTextToParentTag(T,x,O),x.add(this.options.commentPropName,[{[this.options.textNodeName]:P}])}I=C}else if(b.substr(I+1,2)==="!D"){const C=u(b,I);this.docTypeEntities=C.entities,I=C.i}else if(b.substr(I+1,2)==="!["){const C=p(b,"]]>",I,"CDATA is not closed.")-2,P=b.substring(I+9,C);T=this.saveTextToParentTag(T,x,O);let $=this.parseTextData(P,x.tagname,O,!0,!1,!0,!0);$==null&&($=""),this.options.cdataPropName?x.add(this.options.cdataPropName,[{[this.options.textNodeName]:P}]):x.add(this.options.textNodeName,$),I=C+2}else{let C=v(b,I,this.options.removeNSPrefix),P=C.tagName;const $=C.rawTagName;let F=C.tagExp,j=C.attrExpPresent,G=C.closeIndex;this.options.transformTagName&&(P=this.options.transformTagName(P)),x&&T&&x.tagname!=="!xml"&&(T=this.saveTextToParentTag(T,x,O,!1));const q=x;if(q&&this.options.unpairedTags.indexOf(q.tagname)!==-1&&(x=this.tagsNodeStack.pop(),O=O.substring(0,O.lastIndexOf("."))),P!==E.tagname&&(O+=O?"."+P:P),this.isItStopNode(this.options.stopNodes,O,P)){let R="";if(F.length>0&&F.lastIndexOf("/")===F.length-1)P[P.length-1]==="/"?(P=P.substr(0,P.length-1),O=O.substr(0,O.length-1),F=P):F=F.substr(0,F.length-1),I=C.closeIndex;else if(this.options.unpairedTags.indexOf(P)!==-1)I=C.closeIndex;else{const _=this.readStopNodeData(b,$,G+1);if(!_)throw new Error(`Unexpected end of ${$}`);I=_.i,R=_.tagContent}const ee=new o(P);P!==F&&j&&(ee[":@"]=this.buildAttributesMap(F,O,P)),R&&(R=this.parseTextData(R,P,O,!0,j,!0,!0)),O=O.substr(0,O.lastIndexOf(".")),ee.add(this.options.textNodeName,R),this.addChild(x,ee,O)}else{if(F.length>0&&F.lastIndexOf("/")===F.length-1){P[P.length-1]==="/"?(P=P.substr(0,P.length-1),O=O.substr(0,O.length-1),F=P):F=F.substr(0,F.length-1),this.options.transformTagName&&(P=this.options.transformTagName(P));const R=new o(P);P!==F&&j&&(R[":@"]=this.buildAttributesMap(F,O,P)),this.addChild(x,R,O),O=O.substr(0,O.lastIndexOf("."))}else{const R=new o(P);this.tagsNodeStack.push(x),P!==F&&j&&(R[":@"]=this.buildAttributesMap(F,O,P)),this.addChild(x,R,O),x=R}T="",I=G}}else T+=b[I];return E.child};function m(b,E,x){const T=this.options.updateTag(E.tagname,x,E[":@"]);T===!1||(typeof T=="string"&&(E.tagname=T),b.addChild(E))}const d=function(b){if(this.options.processEntities){for(let E in this.docTypeEntities){const x=this.docTypeEntities[E];b=b.replace(x.regx,x.val)}for(let E in this.lastEntities){const x=this.lastEntities[E];b=b.replace(x.regex,x.val)}if(this.options.htmlEntities)for(let E in this.htmlEntities){const x=this.htmlEntities[E];b=b.replace(x.regex,x.val)}b=b.replace(this.ampEntity.regex,this.ampEntity.val)}return b};function w(b,E,x,T){return b&&(T===void 0&&(T=Object.keys(E.child).length===0),(b=this.parseTextData(b,E.tagname,x,!1,!!E[":@"]&&Object.keys(E[":@"]).length!==0,T))!==void 0&&b!==""&&E.add(this.options.textNodeName,b),b=""),b}function y(b,E,x){const T="*."+x;for(const O in b){const I=b[O];if(T===I||E===I)return!0}return!1}function p(b,E,x,T){const O=b.indexOf(E,x);if(O===-1)throw new Error(T);return O+E.length-1}function v(b,E,x){const T=function(j,G){let q,R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:">",ee="";for(let _=G;_<j.length;_++){let Q=j[_];if(q)Q===q&&(q="");else if(Q==='"'||Q==="'")q=Q;else if(Q===R[0]){if(!R[1])return{data:ee,index:_};if(j[_+1]===R[1])return{data:ee,index:_}}else Q===" "&&(Q=" ");ee+=Q}}(b,E+1,arguments.length>3&&arguments[3]!==void 0?arguments[3]:">");if(!T)return;let O=T.data;const I=T.index,C=O.search(/\s/);let P=O,$=!0;C!==-1&&(P=O.substring(0,C),O=O.substring(C+1).trimStart());const F=P;if(x){const j=P.indexOf(":");j!==-1&&(P=P.substr(j+1),$=P!==T.data.substr(j+1))}return{tagName:P,tagExp:O,closeIndex:I,attrExpPresent:$,rawTagName:F}}function A(b,E,x){const T=x;let O=1;for(;x<b.length;x++)if(b[x]==="<")if(b[x+1]==="/"){const I=p(b,">",x,`${E} is not closed`);if(b.substring(x+2,I).trim()===E&&(O--,O===0))return{tagContent:b.substring(T,x),i:I};x=I}else if(b[x+1]==="?")x=p(b,"?>",x+1,"StopNode is not closed.");else if(b.substr(x+1,3)==="!--")x=p(b,"-->",x+3,"StopNode is not closed.");else if(b.substr(x+1,2)==="![")x=p(b,"]]>",x,"StopNode is not closed.")-2;else{const I=v(b,x,">");I&&((I&&I.tagName)===E&&I.tagExp[I.tagExp.length-1]!=="/"&&O++,x=I.closeIndex)}}function N(b,E,x){if(E&&typeof b=="string"){const T=b.trim();return T==="true"||T!=="false"&&l(b,x)}return n.isExist(b)?b:""}r.exports=class{constructor(b){this.options=b,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(E,x)=>String.fromCharCode(Number.parseInt(x,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(E,x)=>String.fromCharCode(Number.parseInt(x,16))}},this.addExternalEntities=h,this.parseXml=g,this.parseTextData=a,this.resolveNameSpace=s,this.buildAttributesMap=c,this.isItStopNode=y,this.replaceEntitiesValue=d,this.readStopNodeData=A,this.saveTextToParentTag=w,this.addChild=m,this.ignoreAttributesFn=i(this.options.ignoreAttributes)}}},338:(r,e,t)=>{const{buildOptions:n}=t(63),o=t(299),{prettify:u}=t(728),l=t(31);r.exports=class{constructor(i){this.externalEntities={},this.options=n(i)}parse(i,h){if(typeof i!="string"){if(!i.toString)throw new Error("XML data is accepted in String or Bytes[] form.");i=i.toString()}if(h){h===!0&&(h={});const f=l.validate(i,h);if(f!==!0)throw Error(`${f.err.msg}:${f.err.line}:${f.err.col}`)}const a=new o(this.options);a.addExternalEntities(this.externalEntities);const s=a.parseXml(i);return this.options.preserveOrder||s===void 0?s:u(s,this.options)}addEntity(i,h){if(h.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(i.indexOf("&")!==-1||i.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if(h==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[i]=h}}},728:(r,e)=>{function t(l,i,h){let a;const s={};for(let f=0;f<l.length;f++){const c=l[f],g=n(c);let m="";if(m=h===void 0?g:h+"."+g,g===i.textNodeName)a===void 0?a=c[g]:a+=""+c[g];else{if(g===void 0)continue;if(c[g]){let d=t(c[g],i,m);const w=u(d,i);c[":@"]?o(d,c[":@"],m,i):Object.keys(d).length!==1||d[i.textNodeName]===void 0||i.alwaysCreateTextNode?Object.keys(d).length===0&&(i.alwaysCreateTextNode?d[i.textNodeName]="":d=""):d=d[i.textNodeName],s[g]!==void 0&&s.hasOwnProperty(g)?(Array.isArray(s[g])||(s[g]=[s[g]]),s[g].push(d)):i.isArray(g,m,w)?s[g]=[d]:s[g]=d}}}return typeof a=="string"?a.length>0&&(s[i.textNodeName]=a):a!==void 0&&(s[i.textNodeName]=a),s}function n(l){const i=Object.keys(l);for(let h=0;h<i.length;h++){const a=i[h];if(a!==":@")return a}}function o(l,i,h,a){if(i){const s=Object.keys(i),f=s.length;for(let c=0;c<f;c++){const g=s[c];a.isArray(g,h+"."+g,!0,!0)?l[g]=[i[g]]:l[g]=i[g]}}}function u(l,i){const{textNodeName:h}=i,a=Object.keys(l).length;return a===0||!(a!==1||!l[h]&&typeof l[h]!="boolean"&&l[h]!==0)}e.prettify=function(l,i){return t(l,i)}},365:r=>{r.exports=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}},135:r=>{function e(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}r.exports=function(t){return t!=null&&(e(t)||function(n){return typeof n.readFloatLE=="function"&&typeof n.slice=="function"&&e(n.slice(0,0))}(t)||!!t._isBuffer)}},542:(r,e,t)=>{(function(){var n=t(298),o=t(526).utf8,u=t(135),l=t(526).bin,i=function(h,a){h.constructor==String?h=a&&a.encoding==="binary"?l.stringToBytes(h):o.stringToBytes(h):u(h)?h=Array.prototype.slice.call(h,0):Array.isArray(h)||h.constructor===Uint8Array||(h=h.toString());for(var s=n.bytesToWords(h),f=8*h.length,c=1732584193,g=-271733879,m=-1732584194,d=271733878,w=0;w<s.length;w++)s[w]=16711935&(s[w]<<8|s[w]>>>24)|4278255360&(s[w]<<24|s[w]>>>8);s[f>>>5]|=128<<f%32,s[14+(f+64>>>9<<4)]=f;var y=i._ff,p=i._gg,v=i._hh,A=i._ii;for(w=0;w<s.length;w+=16){var N=c,b=g,E=m,x=d;c=y(c,g,m,d,s[w+0],7,-680876936),d=y(d,c,g,m,s[w+1],12,-389564586),m=y(m,d,c,g,s[w+2],17,606105819),g=y(g,m,d,c,s[w+3],22,-1044525330),c=y(c,g,m,d,s[w+4],7,-176418897),d=y(d,c,g,m,s[w+5],12,1200080426),m=y(m,d,c,g,s[w+6],17,-1473231341),g=y(g,m,d,c,s[w+7],22,-45705983),c=y(c,g,m,d,s[w+8],7,1770035416),d=y(d,c,g,m,s[w+9],12,-1958414417),m=y(m,d,c,g,s[w+10],17,-42063),g=y(g,m,d,c,s[w+11],22,-1990404162),c=y(c,g,m,d,s[w+12],7,1804603682),d=y(d,c,g,m,s[w+13],12,-40341101),m=y(m,d,c,g,s[w+14],17,-1502002290),c=p(c,g=y(g,m,d,c,s[w+15],22,1236535329),m,d,s[w+1],5,-165796510),d=p(d,c,g,m,s[w+6],9,-1069501632),m=p(m,d,c,g,s[w+11],14,643717713),g=p(g,m,d,c,s[w+0],20,-373897302),c=p(c,g,m,d,s[w+5],5,-701558691),d=p(d,c,g,m,s[w+10],9,38016083),m=p(m,d,c,g,s[w+15],14,-660478335),g=p(g,m,d,c,s[w+4],20,-405537848),c=p(c,g,m,d,s[w+9],5,568446438),d=p(d,c,g,m,s[w+14],9,-1019803690),m=p(m,d,c,g,s[w+3],14,-187363961),g=p(g,m,d,c,s[w+8],20,1163531501),c=p(c,g,m,d,s[w+13],5,-1444681467),d=p(d,c,g,m,s[w+2],9,-51403784),m=p(m,d,c,g,s[w+7],14,1735328473),c=v(c,g=p(g,m,d,c,s[w+12],20,-1926607734),m,d,s[w+5],4,-378558),d=v(d,c,g,m,s[w+8],11,-2022574463),m=v(m,d,c,g,s[w+11],16,1839030562),g=v(g,m,d,c,s[w+14],23,-35309556),c=v(c,g,m,d,s[w+1],4,-1530992060),d=v(d,c,g,m,s[w+4],11,1272893353),m=v(m,d,c,g,s[w+7],16,-155497632),g=v(g,m,d,c,s[w+10],23,-1094730640),c=v(c,g,m,d,s[w+13],4,681279174),d=v(d,c,g,m,s[w+0],11,-358537222),m=v(m,d,c,g,s[w+3],16,-722521979),g=v(g,m,d,c,s[w+6],23,76029189),c=v(c,g,m,d,s[w+9],4,-640364487),d=v(d,c,g,m,s[w+12],11,-421815835),m=v(m,d,c,g,s[w+15],16,530742520),c=A(c,g=v(g,m,d,c,s[w+2],23,-995338651),m,d,s[w+0],6,-198630844),d=A(d,c,g,m,s[w+7],10,1126891415),m=A(m,d,c,g,s[w+14],15,-1416354905),g=A(g,m,d,c,s[w+5],21,-57434055),c=A(c,g,m,d,s[w+12],6,1700485571),d=A(d,c,g,m,s[w+3],10,-1894986606),m=A(m,d,c,g,s[w+10],15,-1051523),g=A(g,m,d,c,s[w+1],21,-2054922799),c=A(c,g,m,d,s[w+8],6,1873313359),d=A(d,c,g,m,s[w+15],10,-30611744),m=A(m,d,c,g,s[w+6],15,-1560198380),g=A(g,m,d,c,s[w+13],21,1309151649),c=A(c,g,m,d,s[w+4],6,-145523070),d=A(d,c,g,m,s[w+11],10,-1120210379),m=A(m,d,c,g,s[w+2],15,718787259),g=A(g,m,d,c,s[w+9],21,-343485551),c=c+N>>>0,g=g+b>>>0,m=m+E>>>0,d=d+x>>>0}return n.endian([c,g,m,d])};i._ff=function(h,a,s,f,c,g,m){var d=h+(a&s|~a&f)+(c>>>0)+m;return(d<<g|d>>>32-g)+a},i._gg=function(h,a,s,f,c,g,m){var d=h+(a&f|s&~f)+(c>>>0)+m;return(d<<g|d>>>32-g)+a},i._hh=function(h,a,s,f,c,g,m){var d=h+(a^s^f)+(c>>>0)+m;return(d<<g|d>>>32-g)+a},i._ii=function(h,a,s,f,c,g,m){var d=h+(s^(a|~f))+(c>>>0)+m;return(d<<g|d>>>32-g)+a},i._blocksize=16,i._digestsize=16,r.exports=function(h,a){if(h==null)throw new Error("Illegal argument "+h);var s=n.wordsToBytes(i(h,a));return a&&a.asBytes?s:a&&a.asString?l.bytesToString(s):n.bytesToHex(s)}})()},285:(r,e,t)=>{var n=t(2);r.exports=function(y){return y?(y.substr(0,2)==="{}"&&(y="\\{\\}"+y.substr(2)),w(function(p){return p.split("\\\\").join(o).split("\\{").join(u).split("\\}").join(l).split("\\,").join(i).split("\\.").join(h)}(y),!0).map(s)):[]};var o="\0SLASH"+Math.random()+"\0",u="\0OPEN"+Math.random()+"\0",l="\0CLOSE"+Math.random()+"\0",i="\0COMMA"+Math.random()+"\0",h="\0PERIOD"+Math.random()+"\0";function a(y){return parseInt(y,10)==y?parseInt(y,10):y.charCodeAt(0)}function s(y){return y.split(o).join("\\").split(u).join("{").split(l).join("}").split(i).join(",").split(h).join(".")}function f(y){if(!y)return[""];var p=[],v=n("{","}",y);if(!v)return y.split(",");var A=v.pre,N=v.body,b=v.post,E=A.split(",");E[E.length-1]+="{"+N+"}";var x=f(b);return b.length&&(E[E.length-1]+=x.shift(),E.push.apply(E,x)),p.push.apply(p,E),p}function c(y){return"{"+y+"}"}function g(y){return/^-?0\d/.test(y)}function m(y,p){return y<=p}function d(y,p){return y>=p}function w(y,p){var v=[],A=n("{","}",y);if(!A)return[y];var N=A.pre,b=A.post.length?w(A.post,!1):[""];if(/\$$/.test(A.pre))for(var E=0;E<b.length;E++){var x=N+"{"+A.body+"}"+b[E];v.push(x)}else{var T,O,I=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(A.body),C=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(A.body),P=I||C,$=A.body.indexOf(",")>=0;if(!P&&!$)return A.post.match(/,.*\}/)?w(y=A.pre+"{"+A.body+l+A.post):[y];if(P)T=A.body.split(/\.\./);else if((T=f(A.body)).length===1&&(T=w(T[0],!1).map(c)).length===1)return b.map(function(Vr){return A.pre+T[0]+Vr});if(P){var F=a(T[0]),j=a(T[1]),G=Math.max(T[0].length,T[1].length),q=T.length==3?Math.abs(a(T[2])):1,R=m;j<F&&(q*=-1,R=d);var ee=T.some(g);O=[];for(var _=F;R(_,j);_+=q){var Q;if(C)(Q=String.fromCharCode(_))==="\\"&&(Q="");else if(Q=String(_),ee){var $t=G-Q.length;if($t>0){var jt=new Array($t+1).join("0");Q=_<0?"-"+jt+Q.slice(1):jt+Q}}O.push(Q)}}else{O=[];for(var we=0;we<T.length;we++)O.push.apply(O,w(T[we],!1))}for(we=0;we<O.length;we++)for(E=0;E<b.length;E++)x=N+O[we]+b[E],(!p||P||x)&&v.push(x)}return v}},829:r=>{function e(a){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},e(a)}function t(a){var s=typeof Map=="function"?new Map:void 0;return t=function(f){if(f===null||(c=f,Function.toString.call(c).indexOf("[native code]")===-1))return f;var c;if(typeof f!="function")throw new TypeError("Super expression must either be null or a function");if(s!==void 0){if(s.has(f))return s.get(f);s.set(f,g)}function g(){return n(f,arguments,u(this).constructor)}return g.prototype=Object.create(f.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),o(g,f)},t(a)}function n(a,s,f){return n=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}()?Reflect.construct:function(c,g,m){var d=[null];d.push.apply(d,g);var w=new(Function.bind.apply(c,d));return m&&o(w,m.prototype),w},n.apply(null,arguments)}function o(a,s){return o=Object.setPrototypeOf||function(f,c){return f.__proto__=c,f},o(a,s)}function u(a){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},u(a)}var l=function(a){function s(f){var c;return function(g,m){if(!(g instanceof m))throw new TypeError("Cannot call a class as a function")}(this,s),(c=function(g,m){return!m||e(m)!=="object"&&typeof m!="function"?function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(g):m}(this,u(s).call(this,f))).name="ObjectPrototypeMutationError",c}return function(f,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function");f.prototype=Object.create(c&&c.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),c&&o(f,c)}(s,a),s}(t(Error));function i(a,s){for(var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},c=s.split("."),g=c.length,m=function(y){var p=c[y];if(!a)return{v:void 0};if(p==="+"){if(Array.isArray(a))return{v:a.map(function(A,N){var b=c.slice(y+1);return b.length>0?i(A,b.join("."),f):f(a,N,c,y)})};var v=c.slice(0,y).join(".");throw new Error("Object at wildcard (".concat(v,") is not an array"))}a=f(a,p,c,y)},d=0;d<g;d++){var w=m(d);if(e(w)==="object")return w.v}return a}function h(a,s){return a.length===s+1}r.exports={set:function(a,s,f){if(e(a)!="object"||a===null||s===void 0)return a;if(typeof s=="number")return a[s]=f,a[s];try{return i(a,s,function(c,g,m,d){if(c===Reflect.getPrototypeOf({}))throw new l("Attempting to mutate Object.prototype");if(!c[g]){var w=Number.isInteger(Number(m[d+1])),y=m[d+1]==="+";c[g]=w||y?[]:{}}return h(m,d)&&(c[g]=f),c[g]})}catch(c){if(c instanceof l)throw c;return a}},get:function(a,s){if(e(a)!="object"||a===null||s===void 0)return a;if(typeof s=="number")return a[s];try{return i(a,s,function(f,c){return f[c]})}catch{return a}},has:function(a,s){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(e(a)!="object"||a===null||s===void 0)return!1;if(typeof s=="number")return s in a;try{var c=!1;return i(a,s,function(g,m,d,w){if(!h(d,w))return g&&g[m];c=f.own?g.hasOwnProperty(m):m in g}),c}catch{return!1}},hasOwn:function(a,s,f){return this.has(a,s,f||{own:!0})},isIn:function(a,s,f){var c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(e(a)!="object"||a===null||s===void 0)return!1;try{var g=!1,m=!1;return i(a,s,function(d,w,y,p){return g=g||d===f||!!d&&d[w]===f,m=h(y,p)&&e(d)==="object"&&w in d,d&&d[w]}),c.validPath?g&&m:g}catch{return!1}},ObjectPrototypeMutationError:l}},47:(r,e,t)=>{var n=t(410),o=function(a){return typeof a=="string"};function u(a,s){for(var f=[],c=0;c<a.length;c++){var g=a[c];g&&g!=="."&&(g===".."?f.length&&f[f.length-1]!==".."?f.pop():s&&f.push(".."):f.push(g))}return f}var l=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i={};function h(a){return l.exec(a).slice(1)}i.resolve=function(){for(var a="",s=!1,f=arguments.length-1;f>=-1&&!s;f--){var c=f>=0?arguments[f]:ce.process$1.cwd();if(!o(c))throw new TypeError("Arguments to path.resolve must be strings");c&&(a=c+"/"+a,s=c.charAt(0)==="/")}return(s?"/":"")+(a=u(a.split("/"),!s).join("/"))||"."},i.normalize=function(a){var s=i.isAbsolute(a),f=a.substr(-1)==="/";return(a=u(a.split("/"),!s).join("/"))||s||(a="."),a&&f&&(a+="/"),(s?"/":"")+a},i.isAbsolute=function(a){return a.charAt(0)==="/"},i.join=function(){for(var a="",s=0;s<arguments.length;s++){var f=arguments[s];if(!o(f))throw new TypeError("Arguments to path.join must be strings");f&&(a+=a?"/"+f:f)}return i.normalize(a)},i.relative=function(a,s){function f(p){for(var v=0;v<p.length&&p[v]==="";v++);for(var A=p.length-1;A>=0&&p[A]==="";A--);return v>A?[]:p.slice(v,A+1)}a=i.resolve(a).substr(1),s=i.resolve(s).substr(1);for(var c=f(a.split("/")),g=f(s.split("/")),m=Math.min(c.length,g.length),d=m,w=0;w<m;w++)if(c[w]!==g[w]){d=w;break}var y=[];for(w=d;w<c.length;w++)y.push("..");return(y=y.concat(g.slice(d))).join("/")},i._makeLong=function(a){return a},i.dirname=function(a){var s=h(a),f=s[0],c=s[1];return f||c?(c&&(c=c.substr(0,c.length-1)),f+c):"."},i.basename=function(a,s){var f=h(a)[2];return s&&f.substr(-1*s.length)===s&&(f=f.substr(0,f.length-s.length)),f},i.extname=function(a){return h(a)[3]},i.format=function(a){if(!n.isObject(a))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof a);var s=a.root||"";if(!o(s))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof a.root);return(a.dir?a.dir+i.sep:"")+(a.base||"")},i.parse=function(a){if(!o(a))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof a);var s=h(a);if(!s||s.length!==4)throw new TypeError("Invalid path '"+a+"'");return s[1]=s[1]||"",s[2]=s[2]||"",s[3]=s[3]||"",{root:s[0],dir:s[0]+s[1].slice(0,s[1].length-1),base:s[2],ext:s[3],name:s[2].slice(0,s[2].length-s[3].length)}},i.sep="/",i.delimiter=":",r.exports=i},647:(r,e)=>{var t=Object.prototype.hasOwnProperty;function n(u){try{return decodeURIComponent(u.replace(/\+/g," "))}catch{return null}}function o(u){try{return encodeURIComponent(u)}catch{return null}}e.stringify=function(u,l){l=l||"";var i,h,a=[];for(h in typeof l!="string"&&(l="?"),u)if(t.call(u,h)){if((i=u[h])||i!=null&&!isNaN(i)||(i=""),h=o(h),i=o(i),h===null||i===null)continue;a.push(h+"="+i)}return a.length?l+a.join("&"):""},e.parse=function(u){for(var l,i=/([^=?#&]+)=?([^&]*)/g,h={};l=i.exec(u);){var a=n(l[1]),s=n(l[2]);a===null||s===null||a in h||(h[a]=s)}return h}},670:r=>{r.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return e!==80;case"https":case"wss":return e!==443;case"ftp":return e!==21;case"gopher":return e!==70;case"file":return!1}return e!==0}},494:r=>{const e=/^[-+]?0x[a-fA-F0-9]+$/,t=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const n={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};r.exports=function(o){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(u=Object.assign({},n,u),!o||typeof o!="string")return o;let l=o.trim();if(u.skipLike!==void 0&&u.skipLike.test(l))return o;if(u.hex&&e.test(l))return Number.parseInt(l,16);{const h=t.exec(l);if(h){const a=h[1],s=h[2];let f=((i=h[3])&&i.indexOf(".")!==-1&&((i=i.replace(/0+$/,""))==="."?i="0":i[0]==="."?i="0"+i:i[i.length-1]==="."&&(i=i.substr(0,i.length-1))),i);const c=h[4]||h[6];if(!u.leadingZeros&&s.length>0&&a&&l[2]!=="."||!u.leadingZeros&&s.length>0&&!a&&l[1]!==".")return o;{const g=Number(l),m=""+g;return m.search(/[eE]/)!==-1||c?u.eNotation?g:o:l.indexOf(".")!==-1?m==="0"&&f===""||m===f||a&&m==="-"+f?g:o:s?f===m||a+f===m?g:o:l===m||l===a+m?g:o}}return o}var i}},737:(r,e,t)=>{var n=t(670),o=t(647),u=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,l=/[\n\r\t]/g,i=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,h=/:\d+$/,a=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,s=/^[a-zA-Z]:/;function f(p){return(p||"").toString().replace(u,"")}var c=[["#","hash"],["?","query"],function(p,v){return d(v.protocol)?p.replace(/\\/g,"/"):p},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],g={hash:1,query:1};function m(p){var v,A=(typeof window<"u"?window:typeof ce.global<"u"?ce.global:typeof self<"u"?self:{}).location||{},N={},b=typeof(p=p||A);if(p.protocol==="blob:")N=new y(unescape(p.pathname),{});else if(b==="string")for(v in N=new y(p,{}),g)delete N[v];else if(b==="object"){for(v in p)v in g||(N[v]=p[v]);N.slashes===void 0&&(N.slashes=i.test(p.href))}return N}function d(p){return p==="file:"||p==="ftp:"||p==="http:"||p==="https:"||p==="ws:"||p==="wss:"}function w(p,v){p=(p=f(p)).replace(l,""),v=v||{};var A,N=a.exec(p),b=N[1]?N[1].toLowerCase():"",E=!!N[2],x=!!N[3],T=0;return E?x?(A=N[2]+N[3]+N[4],T=N[2].length+N[3].length):(A=N[2]+N[4],T=N[2].length):x?(A=N[3]+N[4],T=N[3].length):A=N[4],b==="file:"?T>=2&&(A=A.slice(2)):d(b)?A=N[4]:b?E&&(A=A.slice(2)):T>=2&&d(v.protocol)&&(A=N[4]),{protocol:b,slashes:E||d(b),slashesCount:T,rest:A}}function y(p,v,A){if(p=(p=f(p)).replace(l,""),!(this instanceof y))return new y(p,v,A);var N,b,E,x,T,O,I=c.slice(),C=typeof v,P=this,$=0;for(C!=="object"&&C!=="string"&&(A=v,v=null),A&&typeof A!="function"&&(A=o.parse),N=!(b=w(p||"",v=m(v))).protocol&&!b.slashes,P.slashes=b.slashes||N&&v.slashes,P.protocol=b.protocol||v.protocol||"",p=b.rest,(b.protocol==="file:"&&(b.slashesCount!==2||s.test(p))||!b.slashes&&(b.protocol||b.slashesCount<2||!d(P.protocol)))&&(I[3]=[/(.*)/,"pathname"]);$<I.length;$++)typeof(x=I[$])!="function"?(E=x[0],O=x[1],E!=E?P[O]=p:typeof E=="string"?~(T=E==="@"?p.lastIndexOf(E):p.indexOf(E))&&(typeof x[2]=="number"?(P[O]=p.slice(0,T),p=p.slice(T+x[2])):(P[O]=p.slice(T),p=p.slice(0,T))):(T=E.exec(p))&&(P[O]=T[1],p=p.slice(0,T.index)),P[O]=P[O]||N&&x[3]&&v[O]||"",x[4]&&(P[O]=P[O].toLowerCase())):p=x(p,P);A&&(P.query=A(P.query)),N&&v.slashes&&P.pathname.charAt(0)!=="/"&&(P.pathname!==""||v.pathname!=="")&&(P.pathname=function(F,j){if(F==="")return j;for(var G=(j||"/").split("/").slice(0,-1).concat(F.split("/")),q=G.length,R=G[q-1],ee=!1,_=0;q--;)G[q]==="."?G.splice(q,1):G[q]===".."?(G.splice(q,1),_++):_&&(q===0&&(ee=!0),G.splice(q,1),_--);return ee&&G.unshift(""),R!=="."&&R!==".."||G.push(""),G.join("/")}(P.pathname,v.pathname)),P.pathname.charAt(0)!=="/"&&d(P.protocol)&&(P.pathname="/"+P.pathname),n(P.port,P.protocol)||(P.host=P.hostname,P.port=""),P.username=P.password="",P.auth&&(~(T=P.auth.indexOf(":"))?(P.username=P.auth.slice(0,T),P.username=encodeURIComponent(decodeURIComponent(P.username)),P.password=P.auth.slice(T+1),P.password=encodeURIComponent(decodeURIComponent(P.password))):P.username=encodeURIComponent(decodeURIComponent(P.auth)),P.auth=P.password?P.username+":"+P.password:P.username),P.origin=P.protocol!=="file:"&&d(P.protocol)&&P.host?P.protocol+"//"+P.host:"null",P.href=P.toString()}y.prototype={set:function(p,v,A){var N=this;switch(p){case"query":typeof v=="string"&&v.length&&(v=(A||o.parse)(v)),N[p]=v;break;case"port":N[p]=v,n(v,N.protocol)?v&&(N.host=N.hostname+":"+v):(N.host=N.hostname,N[p]="");break;case"hostname":N[p]=v,N.port&&(v+=":"+N.port),N.host=v;break;case"host":N[p]=v,h.test(v)?(v=v.split(":"),N.port=v.pop(),N.hostname=v.join(":")):(N.hostname=v,N.port="");break;case"protocol":N.protocol=v.toLowerCase(),N.slashes=!A;break;case"pathname":case"hash":if(v){var b=p==="pathname"?"/":"#";N[p]=v.charAt(0)!==b?b+v:v}else N[p]=v;break;case"username":case"password":N[p]=encodeURIComponent(v);break;case"auth":var E=v.indexOf(":");~E?(N.username=v.slice(0,E),N.username=encodeURIComponent(decodeURIComponent(N.username)),N.password=v.slice(E+1),N.password=encodeURIComponent(decodeURIComponent(N.password))):N.username=encodeURIComponent(decodeURIComponent(v))}for(var x=0;x<c.length;x++){var T=c[x];T[4]&&(N[T[1]]=N[T[1]].toLowerCase())}return N.auth=N.password?N.username+":"+N.password:N.username,N.origin=N.protocol!=="file:"&&d(N.protocol)&&N.host?N.protocol+"//"+N.host:"null",N.href=N.toString(),N},toString:function(p){p&&typeof p=="function"||(p=o.stringify);var v,A=this,N=A.host,b=A.protocol;b&&b.charAt(b.length-1)!==":"&&(b+=":");var E=b+(A.protocol&&A.slashes||d(A.protocol)?"//":"");return A.username?(E+=A.username,A.password&&(E+=":"+A.password),E+="@"):A.password?(E+=":"+A.password,E+="@"):A.protocol!=="file:"&&d(A.protocol)&&!N&&A.pathname!=="/"&&(E+="@"),(N[N.length-1]===":"||h.test(A.hostname)&&!A.port)&&(N+=":"),E+=N+A.pathname,(v=typeof A.query=="object"?p(A.query):A.query)&&(E+=v.charAt(0)!=="?"?"?"+v:v),A.hash&&(E+=A.hash),E}},y.extractProtocol=w,y.location=m,y.trimLeft=f,y.qs=o,r.exports=y},410:()=>{},388:()=>{},805:()=>{},345:()=>{},800:()=>{}},Lt={};function k(r){var e=Lt[r];if(e!==void 0)return e.exports;var t=Lt[r]={id:r,loaded:!1,exports:{}};return an[r].call(t.exports,t,t.exports,k),t.loaded=!0,t.exports}k.n=r=>{var e=r&&r.__esModule?()=>r.default:()=>r;return k.d(e,{a:e}),e},k.d=(r,e)=>{for(var t in e)k.o(e,t)&&!k.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:e[t]})},k.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),k.nmd=r=>(r.paths=[],r.children||(r.children=[]),r);var le={};k.d(le,{hT:()=>ne,O4:()=>de,Kd:()=>mn,YK:()=>bn,UU:()=>Ps,Gu:()=>wr,ky:()=>Fr,h4:()=>Re,ch:()=>ze,hq:()=>Ee,i5:()=>$r});var un=k(737),ln=k.n(un);function He(r){if(!dt(r))throw new Error("Parameter was not an error")}function dt(r){return!!r&&typeof r=="object"&&(e=r,Object.prototype.toString.call(e)==="[object Error]")||r instanceof Error;var e}class ie extends Error{constructor(e,t){const n=[...arguments],{options:o,shortMessage:u}=function(i){let h,a="";if(i.length===0)h={};else if(dt(i[0]))h={cause:i[0]},a=i.slice(1).join(" ")||"";else if(i[0]&&typeof i[0]=="object")h=Object.assign({},i[0]),a=i.slice(1).join(" ")||"";else{if(typeof i[0]!="string")throw new Error("Invalid arguments passed to Layerr");h={},a=a=i.join(" ")||""}return{options:h,shortMessage:a}}(n);let l=u;if(o.cause&&(l=`${l}: ${o.cause.message}`),super(l),this.message=l,o.name&&typeof o.name=="string"?this.name=o.name:this.name="Layerr",o.cause&&Object.defineProperty(this,"_cause",{value:o.cause}),Object.defineProperty(this,"_info",{value:{}}),o.info&&typeof o.info=="object"&&Object.assign(this._info,o.info),Error.captureStackTrace){const i=o.constructorOpt||this.constructor;Error.captureStackTrace(this,i)}}static cause(e){return He(e),e._cause&&dt(e._cause)?e._cause:null}static fullStack(e){He(e);const t=ie.cause(e);return t?`${e.stack}
|
|
8
|
-
caused by: ${ie.fullStack(t)}`:e.stack??""}static info(e){He(e);const t={},n=ie.cause(e);return n&&Object.assign(t,ie.info(n)),e._info&&Object.assign(t,e._info),t}toString(){let e=this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(e=`${e}: ${this.message}`),e}}var cn=k(47),_e=k.n(cn);const kt="__PATH_SEPARATOR_POSIX__",Ut="__PATH_SEPARATOR_WINDOWS__";function V(r){try{const e=r.replace(/\//g,kt).replace(/\\\\/g,Ut);return encodeURIComponent(e).split(Ut).join("\\\\").split(kt).join("/")}catch(e){throw new ie(e,"Failed encoding path")}}function _t(r){return r.startsWith("/")?r:"/"+r}function $e(r){let e=r;return e[0]!=="/"&&(e="/"+e),/^.+\/$/.test(e)&&(e=e.substr(0,e.length-1)),e}function hn(r){let e=new(ln())(r).pathname;return e.length<=0&&(e="/"),$e(e)}function B(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];return function(){return function(n){var o=[];if(n.length===0)return"";if(typeof n[0]!="string")throw new TypeError("Url must be a string. Received "+n[0]);if(n[0].match(/^[^/:]+:\/*$/)&&n.length>1){var u=n.shift();n[0]=u+n[0]}n[0].match(/^file:\/\/\//)?n[0]=n[0].replace(/^([^/:]+):\/*/,"$1:///"):n[0]=n[0].replace(/^([^/:]+):\/*/,"$1://");for(var l=0;l<n.length;l++){var i=n[l];if(typeof i!="string")throw new TypeError("Url must be a string. Received "+i);i!==""&&(l>0&&(i=i.replace(/^[\/]+/,"")),i=l<n.length-1?i.replace(/[\/]+$/,""):i.replace(/[\/]+$/,"/"),o.push(i))}var h=o.join("/"),a=(h=h.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return a.shift()+(a.length>0?"?":"")+a.join("&")}(typeof arguments[0]=="object"?arguments[0]:[].slice.call(arguments))}(e.reduce((n,o,u)=>((u===0||o!=="/"||o==="/"&&n[n.length-1]!=="/")&&n.push(o),n),[]))}var fn=k(542),Oe=k.n(fn);const pn="abcdef0123456789";function Mt(r,e){const t=r.url.replace("//",""),n=t.indexOf("/")==-1?"/":t.slice(t.indexOf("/")),o=r.method?r.method.toUpperCase():"GET",u=!!/(^|,)\s*auth\s*($|,)/.test(e.qop)&&"auth",l=`00000000${e.nc}`.slice(-8),i=function(c,g,m,d,w,y,p){const v=p||Oe()(`${g}:${m}:${d}`);return c&&c.toLowerCase()==="md5-sess"?Oe()(`${v}:${w}:${y}`):v}(e.algorithm,e.username,e.realm,e.password,e.nonce,e.cnonce,e.ha1),h=Oe()(`${o}:${n}`),a=u?Oe()(`${i}:${e.nonce}:${l}:${e.cnonce}:${u}:${h}`):Oe()(`${i}:${e.nonce}:${h}`),s={username:e.username,realm:e.realm,nonce:e.nonce,uri:n,qop:u,response:a,nc:l,cnonce:e.cnonce,algorithm:e.algorithm,opaque:e.opaque},f=[];for(const c in s)s[c]&&(c==="qop"||c==="nc"||c==="algorithm"?f.push(`${c}=${s[c]}`):f.push(`${c}="${s[c]}"`));return`Digest ${f.join(", ")}`}function br(r){return(r.headers&&r.headers.get("www-authenticate")||"").split(/\s/)[0].toLowerCase()==="digest"}var gn=k(101),yr=k.n(gn);function Vt(r){return yr().decode(r)}function Bt(r,e){var t;return`Basic ${t=`${r}:${e}`,yr().encode(t)}`}const Me=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:typeof window<"u"?window:globalThis,dn=Me.fetch.bind(Me),mn=Me.Request,bn=Me.Response;let ne=function(r){return r.Auto="auto",r.Digest="digest",r.None="none",r.Password="password",r.Token="token",r}({}),de=function(r){return r.DataTypeNoLength="data-type-no-length",r.InvalidAuthType="invalid-auth-type",r.InvalidOutputFormat="invalid-output-format",r.LinkUnsupportedAuthType="link-unsupported-auth",r.InvalidUpdateRange="invalid-update-range",r.NotSupported="not-supported",r}({});function vr(r,e,t,n,o){switch(r.authType){case ne.Auto:e&&t&&(r.headers.Authorization=Bt(e,t));break;case ne.Digest:r.digest=function(l,i,h){return{username:l,password:i,ha1:h,nc:0,algorithm:"md5",hasDigestAuth:!1}}(e,t,o);break;case ne.None:break;case ne.Password:r.headers.Authorization=Bt(e,t);break;case ne.Token:r.headers.Authorization=`${(u=n).token_type} ${u.access_token}`;break;default:throw new ie({info:{code:de.InvalidAuthType}},`Invalid auth type: ${r.authType}`)}var u}k(345),k(800);const qt="@@HOTPATCHER",yn=()=>{};function Ze(r){return{original:r,methods:[r],final:!1}}class vn{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=qt}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(e){this.configuration.getEmptyAction=e}control(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!e||e.__type__!==qt)throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");return Object.keys(e.configuration.registry).forEach(n=>{this.configuration.registry.hasOwnProperty(n)?t&&(this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])):this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])}),e._configuration=this.configuration,this}execute(e){const t=this.get(e)||yn;for(var n=arguments.length,o=new Array(n>1?n-1:0),u=1;u<n;u++)o[u-1]=arguments[u];return t(...o)}get(e){const t=this.configuration.registry[e];if(!t)switch(this.getEmptyAction){case"null":return null;case"throw":throw new Error(`Failed handling method request: No method provided for override: ${e}`);default:throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`)}return function(){for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];if(o.length===0)throw new Error("Failed creating sequence: No functions provided");return function(){for(var l=arguments.length,i=new Array(l),h=0;h<l;h++)i[h]=arguments[h];let a=i;const s=this;for(;o.length>0;)a=[o.shift().apply(s,a)];return a[0]}}(...t.methods)}isPatched(e){return!!this.configuration.registry[e]}patch(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{chain:o=!1}=n;if(this.configuration.registry[e]&&this.configuration.registry[e].final)throw new Error(`Failed patching '${e}': Method marked as being final`);if(typeof t!="function")throw new Error(`Failed patching '${e}': Provided method is not a function`);if(o)this.configuration.registry[e]?this.configuration.registry[e].methods.push(t):this.configuration.registry[e]=Ze(t);else if(this.isPatched(e)){const{original:u}=this.configuration.registry[e];this.configuration.registry[e]=Object.assign(Ze(t),{original:u})}else this.configuration.registry[e]=Ze(t);return this}patchInline(e,t){this.isPatched(e)||this.patch(e,t);for(var n=arguments.length,o=new Array(n>2?n-2:0),u=2;u<n;u++)o[u-2]=arguments[u];return this.execute(e,...o)}plugin(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return n.forEach(u=>{this.patch(e,u,{chain:!0})}),this}restore(e){if(!this.isPatched(e))throw new Error(`Failed restoring method: No method present for key: ${e}`);if(typeof this.configuration.registry[e].original!="function")throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${e}`);return this.configuration.registry[e].methods=[this.configuration.registry[e].original],this}setFinal(e){if(!this.configuration.registry.hasOwnProperty(e))throw new Error(`Failed marking '${e}' as final: No method found for key`);return this.configuration.registry[e].final=!0,this}}let Ye=null;function wr(){return Ye||(Ye=new vn),Ye}function Ve(r){return function(e){if(typeof e!="object"||e===null||Object.prototype.toString.call(e)!="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(r)?Object.assign({},r):Object.setPrototypeOf(Object.assign({},r),Object.getPrototypeOf(r))}function Wt(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];let n=null,o=[...e];for(;o.length>0;){const u=o.shift();n=n?Nr(n,u):Ve(u)}return n}function Nr(r,e){const t=Ve(r);return Object.keys(e).forEach(n=>{t.hasOwnProperty(n)?Array.isArray(e[n])?t[n]=Array.isArray(t[n])?[...t[n],...e[n]]:[...e[n]]:typeof e[n]=="object"&&e[n]?t[n]=typeof t[n]=="object"&&t[n]?Nr(t[n],e[n]):Ve(e[n]):t[n]=e[n]:t[n]=e[n]}),t}function wn(r){const e={};for(const t of r.keys())e[t]=r.get(t);return e}function mt(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(e.length===0)return{};const n={};return e.reduce((o,u)=>(Object.keys(u).forEach(l=>{const i=l.toLowerCase();n.hasOwnProperty(i)?o[n[i]]=u[l]:(n[i]=l,o[l]=u[l])}),o),{})}k(805);const Nn=typeof ArrayBuffer=="function",{toString:xn}=Object.prototype;function xr(r){return Nn&&(r instanceof ArrayBuffer||xn.call(r)==="[object ArrayBuffer]")}function Pr(r){return r!=null&&r.constructor!=null&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function Pt(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}function bt(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const Er=Pt(function(r){const e=r._digest;return delete r._digest,e.hasDigestAuth&&(r=Wt(r,{headers:{Authorization:Mt(r,e)}})),bt(Be(r),function(t){let n=!1;return o=function(l){return n?l:t},(u=function(){if(t.status==401)return e.hasDigestAuth=function(l,i){if(!br(l))return!1;const h=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){const a=l.headers&&l.headers.get("www-authenticate")||"",s=h.exec(a);if(!s)break;i[s[1]]=s[2]||s[3]}return i.nc+=1,i.cnonce=function(){let a="";for(let s=0;s<32;++s)a=`${a}${pn[Math.floor(16*Math.random())]}`;return a}(),!0}(t,e),function(){if(e.hasDigestAuth)return bt(Be(r=Wt(r,{headers:{Authorization:Mt(r,e)}})),function(l){return l.status==401?e.hasDigestAuth=!1:e.nc++,n=!0,l})}();e.nc++}())&&u.then?u.then(o):o(u);var o,u})}),Pn=Pt(function(r,e){return bt(Be(r),function(t){return t.ok?(e.authType=ne.Password,t):t.status==401&&br(t)?(e.authType=ne.Digest,vr(e,e.username,e.password,void 0,void 0),r._digest=e.digest,Er(r)):t})}),H=Pt(function(r,e){return e.authType===ne.Auto?Pn(r,e):r._digest?Er(r):Be(r)});function Z(r,e,t){const n=Ve(r);return n.headers=mt(e.headers,n.headers||{},t.headers||{}),t.data!==void 0&&(n.data=t.data),t.signal&&(n.signal=t.signal),e.httpAgent&&(n.httpAgent=e.httpAgent),e.httpsAgent&&(n.httpsAgent=e.httpsAgent),e.digest&&(n._digest=e.digest),typeof e.withCredentials=="boolean"&&(n.withCredentials=e.withCredentials),n}function Be(r){const e=wr();return e.patchInline("request",t=>e.patchInline("fetch",dn,t.url,function(n){let o={};const u={method:n.method};if(n.headers&&(o=mt(o,n.headers)),n.data!==void 0){const[l,i]=function(h){if(typeof h=="string")return[h,{}];if(Pr(h))return[h,{}];if(xr(h))return[h,{}];if(h&&typeof h=="object")return[JSON.stringify(h),{"content-type":"application/json"}];throw new Error("Unable to convert request body: Unexpected body type: "+typeof h)}(n.data);u.body=l,o=mt(o,i)}return n.signal&&(u.signal=n.signal),n.withCredentials&&(u.credentials="include"),u.headers=o,u}(t)),r)}var En=k(285);const qe=r=>{if(typeof r!="string")throw new TypeError("invalid pattern");if(r.length>65536)throw new TypeError("pattern is too long")},An={"[: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]},Ce=r=>r.replace(/[[\]\\-]/g,"\\$&"),Xt=r=>r.join(""),Tn=(r,e)=>{const t=e;if(r.charAt(t)!=="[")throw new Error("not in a brace expression");const n=[],o=[];let u=t+1,l=!1,i=!1,h=!1,a=!1,s=t,f="";e:for(;u<r.length;){const d=r.charAt(u);if(d!=="!"&&d!=="^"||u!==t+1){if(d==="]"&&l&&!h){s=u+1;break}if(l=!0,d!=="\\"||h){if(d==="["&&!h){for(const[w,[y,p,v]]of Object.entries(An))if(r.startsWith(w,u)){if(f)return["$.",!1,r.length-t,!0];u+=w.length,v?o.push(y):n.push(y),i=i||p;continue e}}h=!1,f?(d>f?n.push(Ce(f)+"-"+Ce(d)):d===f&&n.push(Ce(d)),f="",u++):r.startsWith("-]",u+1)?(n.push(Ce(d+"-")),u+=2):r.startsWith("-",u+1)?(f=d,u+=2):(n.push(Ce(d)),u++)}else h=!0,u++}else a=!0,u++}if(s<u)return["",!1,0,!1];if(!n.length&&!o.length)return["$.",!1,r.length-t,!0];if(o.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!a)return[(c=n[0].length===2?n[0].slice(-1):n[0],c.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,s-t,!1];var c;const g="["+(a?"^":"")+Xt(n)+"]",m="["+(a?"":"^")+Xt(o)+"]";return[n.length&&o.length?"("+g+"|"+m+")":n.length?g:m,i,s-t,!0]},Se=function(r){let{windowsPathsNoEscape:e=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e?r.replace(/\[([^\/\\])\]/g,"$1"):r.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")},On=new Set(["!","?","+","*","@"]),Gt=r=>On.has(r),Ke="(?!\\.)",Cn=new Set(["[","."]),In=new Set(["..","."]),Sn=new Set("().*{}+?[]^$\\!"),Et="[^/]",zt=Et+"*?",Jt=Et+"+?";var J,K,pe,M,z,be,Ne,ye,he,xe,je,Pe,Ar,ve,Ue,yt,Tr;const re=class re{constructor(e,t){oe(this,Pe);U(this,"type");oe(this,J);oe(this,K);oe(this,pe,!1);oe(this,M,[]);oe(this,z);oe(this,be);oe(this,Ne);oe(this,ye,!1);oe(this,he);oe(this,xe);oe(this,je,!1);let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.type=e,e&&X(this,K,!0),X(this,z,t),X(this,J,S(this,z)?S(S(this,z),J):this),X(this,he,S(this,J)===this?n:S(S(this,J),he)),X(this,Ne,S(this,J)===this?[]:S(S(this,J),Ne)),e!=="!"||S(S(this,J),ye)||S(this,Ne).push(this),X(this,be,S(this,z)?S(S(this,z),M).length:0)}get hasMagic(){if(S(this,K)!==void 0)return S(this,K);for(const e of S(this,M))if(typeof e!="string"&&(e.type||e.hasMagic))return X(this,K,!0);return S(this,K)}toString(){return S(this,xe)!==void 0?S(this,xe):this.type?X(this,xe,this.type+"("+S(this,M).map(e=>String(e)).join("|")+")"):X(this,xe,S(this,M).map(e=>String(e)).join(""))}push(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(const o of t)if(o!==""){if(typeof o!="string"&&!(o instanceof re&&S(o,z)===this))throw new Error("invalid part: "+o);S(this,M).push(o)}}toJSON(){var t;const e=this.type===null?S(this,M).slice().map(n=>typeof n=="string"?n:n.toJSON()):[this.type,...S(this,M).map(n=>n.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===S(this,J)||S(S(this,J),ye)&&((t=S(this,z))==null?void 0:t.type)==="!")&&e.push({}),e}isStart(){var t;if(S(this,J)===this)return!0;if(!((t=S(this,z))!=null&&t.isStart()))return!1;if(S(this,be)===0)return!0;const e=S(this,z);for(let n=0;n<S(this,be);n++){const o=S(e,M)[n];if(!(o instanceof re&&o.type==="!"))return!1}return!0}isEnd(){var t,n,o;if(S(this,J)===this||((t=S(this,z))==null?void 0:t.type)==="!")return!0;if(!((n=S(this,z))!=null&&n.isEnd()))return!1;if(!this.type)return(o=S(this,z))==null?void 0:o.isEnd();const e=S(this,z)?S(S(this,z),M).length:0;return S(this,be)===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){const t=new re(this.type,e);for(const n of S(this,M))t.copyIn(n);return t}static fromGlob(e){var o;let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=new re(null,void 0,t);return me(o=re,ve,Ue).call(o,e,n,0,t),n}toMMPattern(){if(this!==S(this,J))return S(this,J).toMMPattern();const e=this.toString(),[t,n,o,u]=this.toRegExpSource();if(!(o||S(this,K)||S(this,he).nocase&&!S(this,he).nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;const l=(S(this,he).nocase?"i":"")+(u?"u":"");return Object.assign(new RegExp(`^${t}$`,l),{_src:t,_glob:e})}get options(){return S(this,he)}toRegExpSource(e){var h;const t=e??!!S(this,he).dot;if(S(this,J)===this&&me(this,Pe,Ar).call(this),!this.type){const a=this.isStart()&&this.isEnd(),s=S(this,M).map(g=>{var p;const[m,d,w,y]=typeof g=="string"?me(p=re,ve,Tr).call(p,g,S(this,K),a):g.toRegExpSource(e);return X(this,K,S(this,K)||w),X(this,pe,S(this,pe)||y),m}).join("");let f="";if(this.isStart()&&typeof S(this,M)[0]=="string"&&(S(this,M).length!==1||!In.has(S(this,M)[0]))){const g=Cn,m=t&&g.has(s.charAt(0))||s.startsWith("\\.")&&g.has(s.charAt(2))||s.startsWith("\\.\\.")&&g.has(s.charAt(4)),d=!t&&!e&&g.has(s.charAt(0));f=m?"(?!(?:^|/)\\.\\.?(?:$|/))":d?Ke:""}let c="";return this.isEnd()&&S(S(this,J),ye)&&((h=S(this,z))==null?void 0:h.type)==="!"&&(c="(?:$|\\/)"),[f+s+c,Se(s),X(this,K,!!S(this,K)),S(this,pe)]}const n=this.type==="*"||this.type==="+",o=this.type==="!"?"(?:(?!(?:":"(?:";let u=me(this,Pe,yt).call(this,t);if(this.isStart()&&this.isEnd()&&!u&&this.type!=="!"){const a=this.toString();return X(this,M,[a]),this.type=null,X(this,K,void 0),[a,Se(this.toString()),!1,!1]}let l=!n||e||t?"":me(this,Pe,yt).call(this,!0);l===u&&(l=""),l&&(u=`(?:${u})(?:${l})*?`);let i="";return i=this.type==="!"&&S(this,je)?(this.isStart()&&!t?Ke:"")+Jt:o+u+(this.type==="!"?"))"+(!this.isStart()||t||e?"":Ke)+zt+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&l?")":this.type==="*"&&l?")?":`)${this.type}`),[i,Se(u),X(this,K,!!S(this,K)),S(this,pe)]}};J=new WeakMap,K=new WeakMap,pe=new WeakMap,M=new WeakMap,z=new WeakMap,be=new WeakMap,Ne=new WeakMap,ye=new WeakMap,he=new WeakMap,xe=new WeakMap,je=new WeakMap,Pe=new WeakSet,Ar=function(){if(this!==S(this,J))throw new Error("should only call on root");if(S(this,ye))return this;let e;for(this.toString(),X(this,ye,!0);e=S(this,Ne).pop();){if(e.type!=="!")continue;let t=e,n=S(t,z);for(;n;){for(let o=S(t,be)+1;!n.type&&o<S(n,M).length;o++)for(const u of S(e,M)){if(typeof u=="string")throw new Error("string part in extglob AST??");u.copyIn(S(n,M)[o])}t=n,n=S(t,z)}}return this},ve=new WeakSet,Ue=function(e,t,n,o){var g,m;let u=!1,l=!1,i=-1,h=!1;if(t.type===null){let d=n,w="";for(;d<e.length;){const y=e.charAt(d++);if(u||y==="\\")u=!u,w+=y;else if(l)d===i+1?y!=="^"&&y!=="!"||(h=!0):y!=="]"||d===i+2&&h||(l=!1),w+=y;else if(y!=="[")if(o.noext||!Gt(y)||e.charAt(d)!=="(")w+=y;else{t.push(w),w="";const p=new re(y,t);d=me(g=re,ve,Ue).call(g,e,p,d,o),t.push(p)}else l=!0,i=d,h=!1,w+=y}return t.push(w),d}let a=n+1,s=new re(null,t);const f=[];let c="";for(;a<e.length;){const d=e.charAt(a++);if(u||d==="\\")u=!u,c+=d;else if(l)a===i+1?d!=="^"&&d!=="!"||(h=!0):d!=="]"||a===i+2&&h||(l=!1),c+=d;else if(d!=="[")if(Gt(d)&&e.charAt(a)==="("){s.push(c),c="";const w=new re(d,s);s.push(w),a=me(m=re,ve,Ue).call(m,e,w,a,o)}else if(d!=="|"){if(d===")")return c===""&&S(t,M).length===0&&X(t,je,!0),s.push(c),c="",t.push(...f,s),a;c+=d}else s.push(c),c="",f.push(s),s=new re(null,t);else l=!0,i=a,h=!1,c+=d}return t.type=null,X(t,K,void 0),X(t,M,[e.substring(n-1)]),a},yt=function(e){return S(this,M).map(t=>{if(typeof t=="string")throw new Error("string type in extglob ast??");const[n,o,u,l]=t.toRegExpSource(e);return X(this,pe,S(this,pe)||l),n}).filter(t=>!(this.isStart()&&this.isEnd()&&!t)).join("|")},Tr=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],o=!1,u="",l=!1;for(let i=0;i<e.length;i++){const h=e.charAt(i);if(o)o=!1,u+=(Sn.has(h)?"\\":"")+h;else if(h!=="\\"){if(h==="["){const[a,s,f,c]=Tn(e,i);if(f){u+=a,l=l||s,i+=f-1,t=t||c;continue}}h!=="*"?h!=="?"?u+=h.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(u+=Et,t=!0):(u+=n&&e==="*"?Jt:zt,t=!0)}else i===e.length-1?u+="\\\\":o=!0}return[u,Se(e),!!t,l]},oe(re,ve);let We=re;const te=function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return qe(e),!(!t.nocomment&&e.charAt(0)==="#")&&new Xe(e,t).match(r)},Fn=/^\*+([^+@!?\*\[\(]*)$/,$n=r=>e=>!e.startsWith(".")&&e.endsWith(r),jn=r=>e=>e.endsWith(r),Rn=r=>(r=r.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(r)),Ln=r=>(r=r.toLowerCase(),e=>e.toLowerCase().endsWith(r)),kn=/^\*+\.\*+$/,Un=r=>!r.startsWith(".")&&r.includes("."),_n=r=>r!=="."&&r!==".."&&r.includes("."),Mn=/^\.\*+$/,Vn=r=>r!=="."&&r!==".."&&r.startsWith("."),Bn=/^\*+$/,qn=r=>r.length!==0&&!r.startsWith("."),Wn=r=>r.length!==0&&r!=="."&&r!=="..",Xn=/^\?+([^+@!?\*\[\(]*)?$/,Gn=r=>{let[e,t=""]=r;const n=Or([e]);return t?(t=t.toLowerCase(),o=>n(o)&&o.toLowerCase().endsWith(t)):n},zn=r=>{let[e,t=""]=r;const n=Cr([e]);return t?(t=t.toLowerCase(),o=>n(o)&&o.toLowerCase().endsWith(t)):n},Jn=r=>{let[e,t=""]=r;const n=Cr([e]);return t?o=>n(o)&&o.endsWith(t):n},Hn=r=>{let[e,t=""]=r;const n=Or([e]);return t?o=>n(o)&&o.endsWith(t):n},Or=r=>{let[e]=r;const t=e.length;return n=>n.length===t&&!n.startsWith(".")},Cr=r=>{let[e]=r;const t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},Ir=typeof ce.process$1=="object"&&ce.process$1?typeof ce.process$1.env=="object"&&ce.process$1.env&&ce.process$1.env.__MINIMATCH_TESTING_PLATFORM__||ce.process$1.platform:"posix";te.sep=Ir==="win32"?"\\":"/";const ue=Symbol("globstar **");te.GLOBSTAR=ue,te.filter=function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t=>te(t,r,e)};const ae=function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.assign({},r,e)};te.defaults=r=>{if(!r||typeof r!="object"||!Object.keys(r).length)return te;const e=te;return Object.assign(function(t,n){return e(t,n,ae(r,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))},{Minimatch:class extends e.Minimatch{constructor(t){super(t,ae(r,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}))}static defaults(t){return e.defaults(ae(r,t)).Minimatch}},AST:class extends e.AST{constructor(t,n){super(t,n,ae(r,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}static fromGlob(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.AST.fromGlob(t,ae(r,n))}},unescape:function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.unescape(t,ae(r,n))},escape:function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.escape(t,ae(r,n))},filter:function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.filter(t,ae(r,n))},defaults:t=>e.defaults(ae(r,t)),makeRe:function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.makeRe(t,ae(r,n))},braceExpand:function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.braceExpand(t,ae(r,n))},match:function(t,n){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return e.match(t,n,ae(r,o))},sep:e.sep,GLOBSTAR:ue})};const Sr=function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return qe(r),e.nobrace||!/\{(?:(?!\{).)*\}/.test(r)?[r]:En(r)};te.braceExpand=Sr,te.makeRe=function(r){return new Xe(r,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).makeRe()},te.match=function(r,e){const t=new Xe(e,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{});return r=r.filter(n=>t.match(n)),t.options.nonull&&!r.length&&r.push(e),r};const Ht=/[?*]|[+@!]\(.*?\)|\[|\]/;class Xe{constructor(e){U(this,"options");U(this,"set");U(this,"pattern");U(this,"windowsPathsNoEscape");U(this,"nonegate");U(this,"negate");U(this,"comment");U(this,"empty");U(this,"preserveMultipleSlashes");U(this,"partial");U(this,"globSet");U(this,"globParts");U(this,"nocase");U(this,"isWindows");U(this,"platform");U(this,"windowsNoMagicRoot");U(this,"regexp");let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};qe(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||Ir,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const e of this.set)for(const t of e)if(typeof t!="string")return!0;return!1}debug(){}make(){const e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#")return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=function(){return console.error(...arguments)}),this.debug(this.pattern,this.globSet);const n=this.globSet.map(u=>this.slashSplit(u));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let o=this.globParts.map((u,l,i)=>{if(this.isWindows&&this.windowsNoMagicRoot){const h=!(u[0]!==""||u[1]!==""||u[2]!=="?"&&Ht.test(u[2])||Ht.test(u[3])),a=/^[a-z]:/i.test(u[0]);if(h)return[...u.slice(0,4),...u.slice(4).map(s=>this.parse(s))];if(a)return[u[0],...u.slice(1).map(s=>this.parse(s))]}return u.map(h=>this.parse(h))});if(this.debug(this.pattern,o),this.set=o.filter(u=>u.indexOf(!1)===-1),this.isWindows)for(let u=0;u<this.set.length;u++){const l=this.set[u];l[0]===""&&l[1]===""&&this.globParts[u][2]==="?"&&typeof l[3]=="string"&&/^[a-z]:$/i.test(l[3])&&(l[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let n=0;n<e.length;n++)for(let o=0;o<e[n].length;o++)e[n][o]==="**"&&(e[n][o]="*");const{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let n=-1;for(;(n=t.indexOf("**",n+1))!==-1;){let o=n;for(;t[o+1]==="**";)o++;o!==n&&t.splice(n,o-n)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((n,o)=>{const u=n[n.length-1];return o==="**"&&u==="**"?n:o===".."&&u&&u!==".."&&u!=="."&&u!=="**"?(n.pop(),n):(n.push(o),n)},[])).length===0?[""]:t)}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let o=1;o<e.length-1;o++){const u=e[o];o===1&&u===""&&e[0]===""||u!=="."&&u!==""||(t=!0,e.splice(o,1),o--)}e[0]!=="."||e.length!==2||e[1]!=="."&&e[1]!==""||(t=!0,e.pop())}let n=0;for(;(n=e.indexOf("..",n+1))!==-1;){const o=e[n-1];o&&o!=="."&&o!==".."&&o!=="**"&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return e.length===0?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let o=-1;for(;(o=n.indexOf("**",o+1))!==-1;){let l=o;for(;n[l+1]==="**";)l++;l>o&&n.splice(o+1,l-o);let i=n[o+1];const h=n[o+2],a=n[o+3];if(i!==".."||!h||h==="."||h===".."||!a||a==="."||a==="..")continue;t=!0,n.splice(o,1);const s=n.slice(0);s[o]="**",e.push(s),o--}if(!this.preserveMultipleSlashes){for(let l=1;l<n.length-1;l++){const i=n[l];l===1&&i===""&&n[0]===""||i!=="."&&i!==""||(t=!0,n.splice(l,1),l--)}n[0]!=="."||n.length!==2||n[1]!=="."&&n[1]!==""||(t=!0,n.pop())}let u=0;for(;(u=n.indexOf("..",u+1))!==-1;){const l=n[u-1];if(l&&l!=="."&&l!==".."&&l!=="**"){t=!0;const i=u===1&&n[u+1]==="**"?["."]:[];n.splice(u-1,2,...i),n.length===0&&n.push(""),u-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){const o=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(o){e[t]=[],e[n]=o;break}}return e.filter(t=>t.length)}partsMatch(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],o=0,u=0,l=[],i="";for(;o<e.length&&u<t.length;)if(e[o]===t[u])l.push(i==="b"?t[u]:e[o]),o++,u++;else if(n&&e[o]==="**"&&t[u]===e[o+1])l.push(e[o]),o++;else if(n&&t[u]==="**"&&e[o]===t[u+1])l.push(t[u]),u++;else if(e[o]!=="*"||!t[u]||!this.options.dot&&t[u].startsWith(".")||t[u]==="**"){if(t[u]!=="*"||!e[o]||!this.options.dot&&e[o].startsWith(".")||e[o]==="**"||i==="a")return!1;i="b",l.push(t[u]),o++,u++}else{if(i==="b")return!1;i="a",l.push(e[o]),o++,u++}return e.length===t.length&&l}parseNegate(){if(this.nonegate)return;const e=this.pattern;let t=!1,n=0;for(let o=0;o<e.length&&e.charAt(o)==="!";o++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const o=this.options;if(this.isWindows){const d=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),w=!d&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),y=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),p=w?3:d?0:void 0,v=!y&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3])?3:y?0:void 0;if(typeof p=="number"&&typeof v=="number"){const[A,N]=[e[p],t[v]];A.toLowerCase()===N.toLowerCase()&&(t[v]=A,v>p?t=t.slice(v):p>v&&(e=e.slice(p)))}}const{optimizationLevel:u=1}=this.options;u>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var l=0,i=0,h=e.length,a=t.length;l<h&&i<a;l++,i++){this.debug("matchOne loop");var s=t[i],f=e[l];if(this.debug(t,s,f),s===!1)return!1;if(s===ue){this.debug("GLOBSTAR",[t,s,f]);var c=l,g=i+1;if(g===a){for(this.debug("** at the end");l<h;l++)if(e[l]==="."||e[l]===".."||!o.dot&&e[l].charAt(0)===".")return!1;return!0}for(;c<h;){var m=e[c];if(this.debug(`
|
|
9
|
-
globstar while`,e,c,t,
|
|
10
|
-
>>> no match, partial?`,e,c,t,g),c!==h))}let d;if(typeof s=="string"?(d=f===s,this.debug("string match",s,f,d)):(d=s.test(f),this.debug("pattern match",s,f,d)),!d)return!1}if(l===h&&i===a)return!0;if(l===h)return n;if(i===a)return l===h-1&&e[l]==="";throw new Error("wtf?")}braceExpand(){return Sr(this.pattern,this.options)}parse(e){qe(e);const t=this.options;if(e==="**")return ue;if(e==="")return"";let n,o=null;(n=e.match(Bn))?o=t.dot?Wn:qn:(n=e.match(Fn))?o=(t.nocase?t.dot?Ln:Rn:t.dot?jn:$n)(n[1]):(n=e.match(Xn))?o=(t.nocase?t.dot?zn:Gn:t.dot?Jn:Hn)(n):(n=e.match(kn))?o=t.dot?_n:Un:(n=e.match(Mn))&&(o=Vn);const u=We.fromGlob(e,this.options).toMMPattern();return o&&typeof u=="object"&&Reflect.defineProperty(u,"test",{value:o}),u}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const t=this.options,n=t.noglobstar?"[^/]*?":t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",o=new Set(t.nocase?["i"]:[]);let u=e.map(h=>{const a=h.map(s=>{if(s instanceof RegExp)for(const f of s.flags.split(""))o.add(f);return typeof s=="string"?s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):s===ue?ue:s._src});return a.forEach((s,f)=>{const c=a[f+1],g=a[f-1];s===ue&&g!==ue&&(g===void 0?c!==void 0&&c!==ue?a[f+1]="(?:\\/|"+n+"\\/)?"+c:a[f]=n:c===void 0?a[f-1]=g+"(?:\\/|"+n+")?":c!==ue&&(a[f-1]=g+"(?:\\/|\\/"+n+"\\/)"+c,a[f+1]=ue))}),a.filter(s=>s!==ue).join("/")}).join("|");const[l,i]=e.length>1?["(?:",")"]:["",""];u="^"+l+u+i+"$",this.negate&&(u="^(?!"+u+").+$");try{this.regexp=new RegExp(u,[...o].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.partial;if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;const n=this.options;this.isWindows&&(e=e.split("\\").join("/"));const o=this.slashSplit(e);this.debug(this.pattern,"split",o);const u=this.set;this.debug(this.pattern,"set",u);let l=o[o.length-1];if(!l)for(let i=o.length-2;!l&&i>=0;i--)l=o[i];for(let i=0;i<u.length;i++){const h=u[i];let a=o;if(n.matchBase&&h.length===1&&(a=[l]),this.matchOne(a,h,t))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(e){return te.defaults(e).Minimatch}}function At(r){const e=new Error(`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:""}Invalid response: ${r.status} ${r.statusText}`);return e.status=r.status,e.response=r,e}function Y(r,e){const{status:t}=e;if(t===401&&r.digest)return e;if(t>=400)throw At(e);return e}function Ee(r,e){return arguments.length>2&&arguments[2]!==void 0&&arguments[2]?{data:e,headers:r.headers?wn(r.headers):{},status:r.status,statusText:r.statusText}:e}te.AST=We,te.Minimatch=Xe,te.escape=function(r){let{windowsPathsNoEscape:e=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e?r.replace(/[?*()[\]]/g,"[$&]"):r.replace(/[?*()[\]\\]/g,"\\$&")},te.unescape=Se;const Zn=(Zt=function(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=Z({url:B(r.remoteURL,V(e)),method:"COPY",headers:{Destination:B(r.remoteURL,V(t)),Overwrite:n.overwrite===!1?"F":"T",Depth:n.shallow?"0":"infinity"}},r,n);return l=function(i){Y(r,i)},(u=H(o,r))&&u.then||(u=Promise.resolve(u)),l?u.then(l):u;var u,l},function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];try{return Promise.resolve(Zt.apply(this,r))}catch(t){return Promise.reject(t)}});var Zt,Tt=k(635),Yn=k(829),fe=k.n(Yn),Ae=function(r){return r.Array="array",r.Object="object",r.Original="original",r}(Ae||{});function Le(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ae.Original;const n=fe().get(r,e);return t==="array"&&Array.isArray(n)===!1?[n]:t==="object"&&Array.isArray(n)?n[0]:n}function Re(r){return new Promise(e=>{e(function(t){const{multistatus:n}=t;if(n==="")return{multistatus:{response:[]}};if(!n)throw new Error("Invalid response: No root multistatus found");const o={multistatus:Array.isArray(n)?n[0]:n};return fe().set(o,"multistatus.response",Le(o,"multistatus.response",Ae.Array)),fe().set(o,"multistatus.response",fe().get(o,"multistatus.response").map(u=>function(l){const i=Object.assign({},l);return i.status?fe().set(i,"status",Le(i,"status",Ae.Object)):(fe().set(i,"propstat",Le(i,"propstat",Ae.Object)),fe().set(i,"propstat.prop",Le(i,"propstat.prop",Ae.Object))),i}(u))),o}(new Tt.XMLParser({allowBooleanAttributes:!0,attributeNamePrefix:"",textNodeName:"text",ignoreAttributes:!1,removeNSPrefix:!0,numberParseOptions:{hex:!0,leadingZeros:!1},attributeValueProcessor:(t,n,o)=>n==="true"||n==="false"?n==="true":n,tagValueProcessor(t,n,o){if(!o.endsWith("propstat.prop.displayname"))return n}}).parse(r)))})}function ze(r,e){let t=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const{getlastmodified:n=null,getcontentlength:o="0",resourcetype:u=null,getcontenttype:l=null,getetag:i=null}=r,h=u&&typeof u=="object"&&u.collection!==void 0?"directory":"file",a={filename:e,basename:_e().basename(e),lastmod:n,size:parseInt(o,10),type:h,etag:typeof i=="string"?i.replace(/"/g,""):null};return h==="file"&&(a.mime=l&&typeof l=="string"?l.split(";")[0]:""),t&&(r.displayname!==void 0&&(r.displayname=String(r.displayname)),a.props=r),a}function Fr(r,e){let t=arguments.length>2&&arguments[2]!==void 0&&arguments[2],n=null;try{r.multistatus.response[0].propstat&&(n=r.multistatus.response[0])}catch{}if(!n)throw new Error("Failed getting item stat: bad response");const{propstat:{prop:o,status:u}}=n,[l,i,h]=u.split(" ",3),a=parseInt(i,10);if(a>=400){const s=new Error(`Invalid response: ${a} ${h}`);throw s.status=a,s}return ze(o,$e(e),t)}function $r(r){switch(String(r)){case"-3":return"unlimited";case"-2":case"-1":return"unknown";default:return parseInt(String(r),10)}}function Qe(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const Ot=function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}(function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{details:n=!1}=t,o=Z({url:B(r.remoteURL,V(e)),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},r,t);return Qe(H(o,r),function(u){return Y(r,u),Qe(u.text(),function(l){return Qe(Re(l),function(i){const h=Fr(i,e,n);return Ee(u,h,n)})})})});function jr(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const Kn=Rr(function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=function(u){if(!u||u==="/")return[];let l=u;const i=[];do i.push(l),l=_e().dirname(l);while(l&&l!=="/");return i}($e(e));n.sort((u,l)=>u.length>l.length?1:l.length>u.length?-1:0);let o=!1;return function(u,l,i){if(typeof u[Kt]=="function"){let d=function(w){try{for(;!(h=f.next()).done;)if((w=l(h.value))&&w.then){if(!Qt(w))return void w.then(d,s||(s=se.bind(null,a=new Te,2)));w=w.v}a?se(a,1,w):a=w}catch(y){se(a||(a=new Te),2,y)}};var h,a,s,f=u[Kt]();if(d(),f.return){var c=function(w){try{h.done||f.return()}catch{}return w};if(a&&a.then)return a.then(c,function(w){throw c(w)});c()}return a}if(!("length"in u))throw new TypeError("Object is not iterable");for(var g=[],m=0;m<u.length;m++)g.push(u[m]);return function(d,w,y){var p,v,A=-1;return function N(b){try{for(;++A<d.length&&(!y||!y());)if((b=w(A))&&b.then){if(!Qt(b))return void b.then(N,v||(v=se.bind(null,p=new Te,2)));b=b.v}p?se(p,1,b):p=b}catch(E){se(p||(p=new Te),2,E)}}(),p}(g,function(d){return l(g[d])},i)}(n,function(u){return l=function(){return function(h,a){try{var s=jr(Ot(r,u),function(f){if(f.type!=="directory")throw new Error(`Path includes a file: ${e}`)})}catch(f){return a(f)}return s&&s.then?s.then(void 0,a):s}(0,function(h){const a=h;return function(){if(a.status===404)return o=!0,Yt(vt(r,u,{...t,recursive:!1}));throw h}()})},(i=function(){if(o)return Yt(vt(r,u,{...t,recursive:!1}))}())&&i.then?i.then(l):l();var l,i},function(){return!1})});function Rr(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}function Qn(){}function Yt(r,e){return r&&r.then?r.then(Qn):Promise.resolve()}const Kt=typeof Symbol<"u"?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function se(r,e,t){if(!r.s){if(t instanceof Te){if(!t.s)return void(t.o=se.bind(null,r,e));1&e&&(e=t.s),t=t.v}if(t&&t.then)return void t.then(se.bind(null,r,e),se.bind(null,r,2));r.s=e,r.v=t;const n=r.o;n&&n(r)}}const Te=function(){function r(){}return r.prototype.then=function(e,t){const n=new r,o=this.s;if(o){const u=1&o?e:t;if(u){try{se(n,1,u(this.v))}catch(l){se(n,2,l)}return n}return this}return this.o=function(u){try{const l=u.v;1&u.s?se(n,1,e?e(l):l):t?se(n,1,t(l)):se(n,2,l)}catch(l){se(n,2,l)}},n},r}();function Qt(r){return r instanceof Te&&1&r.s}const vt=Rr(function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(t.recursive===!0)return Kn(r,e,t);const n=Z({url:B(r.remoteURL,(o=V(e),o.endsWith("/")?o:o+"/")),method:"MKCOL"},r,t);var o;return jr(H(n,r),function(u){Y(r,u)})});var Dn=k(388),Dt=k.n(Dn);const es=function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}(function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n={};if(typeof t.range=="object"&&typeof t.range.start=="number"){let i=`bytes=${t.range.start}-`;typeof t.range.end=="number"&&(i=`${i}${t.range.end}`),n.Range=i}const o=Z({url:B(r.remoteURL,V(e)),method:"GET",headers:n},r,t);return l=function(i){if(Y(r,i),n.Range&&i.status!==206){const h=new Error(`Invalid response code for partial request: ${i.status}`);throw h.status=i.status,h}return t.callback&&setTimeout(()=>{t.callback(i)},0),i.body},(u=H(o,r))&&u.then||(u=Promise.resolve(u)),l?u.then(l):u;var u,l}),ts=()=>{},rs=function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}(function(r,e,t){t.url||(t.url=B(r.remoteURL,V(e)));const n=Z(t,r,{});return u=function(l){return Y(r,l),l},(o=H(n,r))&&o.then||(o=Promise.resolve(o)),u?o.then(u):o;var o,u}),ns=function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}(function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=Z({url:B(r.remoteURL,V(e)),method:"DELETE"},r,t);return u=function(l){Y(r,l)},(o=H(n,r))&&o.then||(o=Promise.resolve(o)),u?o.then(u):o;var o,u}),ss=function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}(function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function(n,o){try{var u=(l=Ot(r,e,t),i=function(){return!0},h?i?i(l):l:(l&&l.then||(l=Promise.resolve(l)),i?l.then(i):l))}catch(a){return o(a)}var l,i,h;return u&&u.then?u.then(void 0,o):u}(0,function(n){if(n.status===404)return!1;throw n})});function De(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const is=function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}(function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=Z({url:B(r.remoteURL,V(e),"/"),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:t.deep?"infinity":"1"}},r,t);return De(H(n,r),function(o){return Y(r,o),De(o.text(),function(u){if(!u)throw new Error("Failed parsing directory contents: Empty response");return De(Re(u),function(l){const i=_t(e);let h=function(a,s,f){let c=arguments.length>3&&arguments[3]!==void 0&&arguments[3],g=arguments.length>4&&arguments[4]!==void 0&&arguments[4];const m=_e().join(s,"/"),{multistatus:{response:d}}=a,w=d.map(y=>{const p=function(A){try{return A.replace(/^https?:\/\/[^\/]+/,"")}catch(N){throw new ie(N,"Failed normalising HREF")}}(y.href),{propstat:{prop:v}}=y;return ze(v,m==="/"?decodeURIComponent($e(p)):$e(_e().relative(decodeURIComponent(m),decodeURIComponent(p))),c)});return g?w:w.filter(y=>y.basename&&(y.type==="file"||y.filename!==f.replace(/\/$/,"")))}(l,_t(r.remoteBasePath||r.remotePath),i,t.details,t.includeSelf);return t.glob&&(h=function(a,s){return a.filter(f=>te(f.filename,s,{matchBase:!0}))}(h,t.glob)),Ee(o,h,t.details)})})})});function Ct(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}const os=Ct(function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=Z({url:B(r.remoteURL,V(e)),method:"GET",headers:{Accept:"text/plain"},transformResponse:[ls]},r,t);return Ge(H(n,r),function(o){return Y(r,o),Ge(o.text(),function(u){return Ee(o,u,t.details)})})});function Ge(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const as=Ct(function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=Z({url:B(r.remoteURL,V(e)),method:"GET"},r,t);return Ge(H(n,r),function(o){let u;return Y(r,o),function(l,i){var h=l();return h&&h.then?h.then(i):i()}(function(){return Ge(o.arrayBuffer(),function(l){u=l})},function(){return Ee(o,u,t.details)})})}),us=Ct(function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{format:n="binary"}=t;if(n!=="binary"&&n!=="text")throw new ie({info:{code:de.InvalidOutputFormat}},`Invalid output format: ${n}`);return n==="text"?os(r,e,t):as(r,e,t)}),ls=r=>r;function cs(r){return new Tt.XMLBuilder({attributeNamePrefix:"@_",format:!0,ignoreAttributes:!1,suppressEmptyNode:!0}).build(Lr({lockinfo:{"@_xmlns:d":"DAV:",lockscope:{exclusive:{}},locktype:{write:{}},owner:{href:r}}},"d"))}function Lr(r,e){const t={...r};for(const n in t)t.hasOwnProperty(n)&&(t[n]&&typeof t[n]=="object"&&n.indexOf(":")===-1?(t[`${e}:${n}`]=Lr(t[n],e),delete t[n]):/^@_/.test(n)===!1&&(t[`${e}:${n}`]=t[n],delete t[n]));return t}function wt(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}function kr(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}const hs=kr(function(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=Z({url:B(r.remoteURL,V(e)),method:"UNLOCK",headers:{"Lock-Token":t}},r,n);return wt(H(o,r),function(u){if(Y(r,u),u.status!==204&&u.status!==200)throw At(u)})}),fs=kr(function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{refreshToken:n,timeout:o=ps}=t,u={Accept:"text/plain,application/xml",Timeout:o};n&&(u.If=n);const l=Z({url:B(r.remoteURL,V(e)),method:"LOCK",headers:u,data:cs(r.contactHref)},r,t);return wt(H(l,r),function(i){return Y(r,i),wt(i.text(),function(h){const a=(c=h,new Tt.XMLParser({removeNSPrefix:!0,parseAttributeValue:!0,parseTagValue:!0}).parse(c)),s=fe().get(a,"prop.lockdiscovery.activelock.locktoken.href"),f=fe().get(a,"prop.lockdiscovery.activelock.timeout");var c;if(!s)throw At(i,"No lock token received: ");return{token:s,serverTimeout:f}})})}),ps="Infinite, Second-4100000000";function et(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const gs=function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}(function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const t=e.path||"/",n=Z({url:B(r.remoteURL,t),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},r,e);return et(H(n,r),function(o){return Y(r,o),et(o.text(),function(u){return et(Re(u),function(l){const i=function(h){try{const[a]=h.multistatus.response,{propstat:{prop:{"quota-used-bytes":s,"quota-available-bytes":f}}}=a;return s!==void 0&&f!==void 0?{used:parseInt(String(s),10),available:$r(f)}:null}catch{}return null}(l);return Ee(o,i,e.details)})})})});function tt(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const ds=function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}(function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{details:n=!1}=t,o=Z({url:B(r.remoteURL,V(e)),method:"SEARCH",headers:{Accept:"text/plain,application/xml","Content-Type":r.headers["Content-Type"]||"application/xml; charset=utf-8"}},r,t);return tt(H(o,r),function(u){return Y(r,u),tt(u.text(),function(l){return tt(Re(l),function(i){const h=function(a,s,f){const c={truncated:!1,results:[]};return c.truncated=a.multistatus.response.some(g=>{var m,d;return((d=(g.status||((m=g.propstat)==null?void 0:m.status)).split(" ",3))==null?void 0:d[1])==="507"&&g.href.replace(/\/$/,"").endsWith(V(s).replace(/\/$/,""))}),a.multistatus.response.forEach(g=>{if(g.propstat===void 0)return;const m=g.href.split("/").map(decodeURIComponent).join("/");c.results.push(ze(g.propstat.prop,m,f))}),c}(i,e,n);return Ee(u,h,n)})})})}),ms=function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}(function(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=Z({url:B(r.remoteURL,V(e)),method:"MOVE",headers:{Destination:B(r.remoteURL,V(t)),Overwrite:n.overwrite===!1?"F":"T"}},r,n);return l=function(i){Y(r,i)},(u=H(o,r))&&u.then||(u=Promise.resolve(u)),l?u.then(l):u;var u,l});var bs=k(172);const ys=function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}(function(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const{contentLength:o=!0,overwrite:u=!0}=n,l={"Content-Type":"application/octet-stream"};o===!1||(l["Content-Length"]=typeof o=="number"?`${o}`:`${function(s){if(xr(s))return s.byteLength;if(Pr(s))return s.length;if(typeof s=="string")return(0,bs.d)(s);throw new ie({info:{code:de.DataTypeNoLength}},"Cannot calculate data length: Invalid type")}(t)}`),u||(l["If-None-Match"]="*");const i=Z({url:B(r.remoteURL,V(e)),method:"PUT",headers:l,data:t},r,n);return a=function(s){try{Y(r,s)}catch(f){const c=f;if(c.status!==412||u)throw c;return!1}return!0},(h=H(i,r))&&h.then||(h=Promise.resolve(h)),a?h.then(a):h;var h,a}),Ur=function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}(function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=Z({url:B(r.remoteURL,V(e)),method:"OPTIONS"},r,t);return u=function(l){try{Y(r,l)}catch(i){throw i}return{compliance:(l.headers.get("DAV")??"").split(",").map(i=>i.trim()),server:l.headers.get("Server")??""}},(o=H(n,r))&&o.then||(o=Promise.resolve(o)),u?o.then(u):o;var o,u});function Fe(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const vs=It(function(r,e,t,n,o){let u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(t>n||t<0)throw new ie({info:{code:de.InvalidUpdateRange}},`Invalid update range ${t} for partial update`);const l={"Content-Type":"application/octet-stream","Content-Length":""+(n-t+1),"Content-Range":`bytes ${t}-${n}/*`},i=Z({url:B(r.remoteURL,V(e)),method:"PUT",headers:l,data:o},r,u);return Fe(H(i,r),function(h){Y(r,h)})});function er(r,e){var t=r();return t&&t.then?t.then(e):e(t)}const ws=It(function(r,e,t,n,o){let u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(t>n||t<0)throw new ie({info:{code:de.InvalidUpdateRange}},`Invalid update range ${t} for partial update`);const l={"Content-Type":"application/x-sabredav-partialupdate","Content-Length":""+(n-t+1),"X-Update-Range":`bytes=${t}-${n}`},i=Z({url:B(r.remoteURL,V(e)),method:"PATCH",headers:l,data:o},r,u);return Fe(H(i,r),function(h){Y(r,h)})});function It(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}const Ns=It(function(r,e,t,n,o){let u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};return Fe(Ur(r,e,u),function(l){let i=!1;return er(function(){if(l.compliance.includes("sabredav-partialupdate"))return Fe(ws(r,e,t,n,o,u),function(h){return i=!0,h})},function(h){let a=!1;return i?h:er(function(){if(l.server.includes("Apache")&&l.compliance.includes("<http://apache.org/dav/propset/fs/1>"))return Fe(vs(r,e,t,n,o,u),function(s){return a=!0,s})},function(s){if(a)return s;throw new ie({info:{code:de.NotSupported}},"Not supported")})})})}),xs="https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";function Ps(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{authType:t=null,remoteBasePath:n,contactHref:o=xs,ha1:u,headers:l={},httpAgent:i,httpsAgent:h,password:a,token:s,username:f,withCredentials:c}=e;let g=t;g||(g=f||a?ne.Password:ne.None);const m={authType:g,remoteBasePath:n,contactHref:o,ha1:u,headers:Object.assign({},l),httpAgent:i,httpsAgent:h,password:a,remotePath:hn(r),remoteURL:r,token:s,username:f,withCredentials:c};return vr(m,f,a,s,u),{copyFile:(d,w,y)=>Zn(m,d,w,y),createDirectory:(d,w)=>vt(m,d,w),createReadStream:(d,w)=>function(y,p){let v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const A=new(Dt()).PassThrough;return es(y,p,v).then(N=>{N.pipe(A)}).catch(N=>{A.emit("error",N)}),A}(m,d,w),createWriteStream:(d,w,y)=>function(p,v){let A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},N=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ts;const b=new(Dt()).PassThrough,E={};A.overwrite===!1&&(E["If-None-Match"]="*");const x=Z({url:B(p.remoteURL,V(v)),method:"PUT",headers:E,data:b,maxRedirects:0},p,A);return H(x,p).then(T=>Y(p,T)).then(T=>{setTimeout(()=>{N(T)},0)}).catch(T=>{b.emit("error",T)}),b}(m,d,w,y),customRequest:(d,w)=>rs(m,d,w),deleteFile:(d,w)=>ns(m,d,w),exists:(d,w)=>ss(m,d,w),getDirectoryContents:(d,w)=>is(m,d,w),getFileContents:(d,w)=>us(m,d,w),getFileDownloadLink:d=>function(w,y){let p=B(w.remoteURL,V(y));const v=/^https:/i.test(p)?"https":"http";switch(w.authType){case ne.None:break;case ne.Password:{const A=Vt(w.headers.Authorization.replace(/^Basic /i,"").trim());p=p.replace(/^https?:\/\//,`${v}://${A}@`);break}default:throw new ie({info:{code:de.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${w.authType}`)}return p}(m,d),getFileUploadLink:d=>function(w,y){let p=`${B(w.remoteURL,V(y))}?Content-Type=application/octet-stream`;const v=/^https:/i.test(p)?"https":"http";switch(w.authType){case ne.None:break;case ne.Password:{const A=Vt(w.headers.Authorization.replace(/^Basic /i,"").trim());p=p.replace(/^https?:\/\//,`${v}://${A}@`);break}default:throw new ie({info:{code:de.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${w.authType}`)}return p}(m,d),getHeaders:()=>Object.assign({},m.headers),getQuota:d=>gs(m,d),lock:(d,w)=>fs(m,d,w),moveFile:(d,w,y)=>ms(m,d,w,y),putFileContents:(d,w,y)=>ys(m,d,w,y),partialUpdateFileContents:(d,w,y,p,v)=>Ns(m,d,w,y,p,v),getDAVCompliance:d=>Ur(m,d),search:(d,w)=>ds(m,d,w),setHeaders:d=>{m.headers=Object.assign({},d)},stat:(d,w)=>Ot(m,d,w),unlock:(d,w,y)=>hs(m,d,w,y)}}le.hT;le.O4;le.Kd;le.YK;var Es=le.UU;le.Gu;le.ky;var As=le.h4,Ts=le.ch;le.hq;le.i5;const D=[];for(let r=0;r<256;++r)D.push((r+256).toString(16).slice(1));function Os(r,e=0){return(D[r[e+0]]+D[r[e+1]]+D[r[e+2]]+D[r[e+3]]+"-"+D[r[e+4]]+D[r[e+5]]+"-"+D[r[e+6]]+D[r[e+7]]+"-"+D[r[e+8]]+D[r[e+9]]+"-"+D[r[e+10]]+D[r[e+11]]+D[r[e+12]]+D[r[e+13]]+D[r[e+14]]+D[r[e+15]]).toLowerCase()}let rt;const Cs=new Uint8Array(16);function Is(){if(!rt){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");rt=crypto.getRandomValues.bind(crypto)}return rt(Cs)}const Ss=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),tr={randomUUID:Ss};function Fs(r,e,t){var o;if(tr.randomUUID&&!r)return tr.randomUUID();r=r||{};const n=r.random??((o=r.rng)==null?void 0:o.call(r))??Is();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Os(n)}var nt={},st={},rr;function St(){return rr||(rr=1,function(r){const e=":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",t=e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",n="["+e+"]["+t+"]*",o=new RegExp("^"+n+"$"),u=function(i,h){const a=[];let s=h.exec(i);for(;s;){const f=[];f.startIndex=h.lastIndex-s[0].length;const c=s.length;for(let g=0;g<c;g++)f.push(s[g]);a.push(f),s=h.exec(i)}return a},l=function(i){const h=o.exec(i);return!(h===null||typeof h>"u")};r.isExist=function(i){return typeof i<"u"},r.isEmptyObject=function(i){return Object.keys(i).length===0},r.merge=function(i,h,a){if(h){const s=Object.keys(h),f=s.length;for(let c=0;c<f;c++)a==="strict"?i[s[c]]=[h[s[c]]]:i[s[c]]=h[s[c]]}},r.getValue=function(i){return r.isExist(i)?i:""},r.isName=l,r.getAllMatches=u,r.nameRegexp=n}(st)),st}var nr;function _r(){if(nr)return nt;nr=1;const r=St(),e={allowBooleanAttributes:!1,unpairedTags:[]};nt.validate=function(y,p){p=Object.assign({},e,p);const v=[];let A=!1,N=!1;y[0]==="\uFEFF"&&(y=y.substr(1));for(let b=0;b<y.length;b++)if(y[b]==="<"&&y[b+1]==="?"){if(b+=2,b=n(y,b),b.err)return b}else if(y[b]==="<"){let E=b;if(b++,y[b]==="!"){b=o(y,b);continue}else{let x=!1;y[b]==="/"&&(x=!0,b++);let T="";for(;b<y.length&&y[b]!==">"&&y[b]!==" "&&y[b]!==" "&&y[b]!==`
|
|
11
|
-
`&&y[b]!=="\r";b++)T+=y[b];if(T=T.trim(),T[T.length-1]==="/"&&(T=T.substring(0,T.length-1),b--),!m(T)){let C;return T.trim().length===0?C="Invalid space after '<'.":C="Tag '"+T+"' is an invalid name.",c("InvalidTag",C,
|
|
12
|
-
`||y==="\r"}function n(y,p){const v=p;for(;p<y.length;p++)if(y[p]=="?"||y[p]==" "){const A=y.substr(v,p-v);if(p>5&&A==="xml")return c("InvalidXml","XML declaration allowed only at the start of the document.",
|
|
13
|
-
`);const b=new e("!xml");let E=b,x="",T="";for(let O=0;O<N.length;O++)if(N[O]==="<")if(N[O+1]==="/"){const C=y(N,">",O,"Closing Tag is not closed.");let P=N.substring(O+2,C).trim();if(this.options.removeNSPrefix){const j=P.indexOf(":");j!==-1&&(P=P.substr(j+1))}this.options.transformTagName&&(P=this.options.transformTagName(P)),E&&(x=this.saveTextToParentTag(x,E,T));const $=T.substring(T.lastIndexOf(".")+1);if(P&&this.options.unpairedTags.indexOf(P)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${P}>`);let F=0;$&&this.options.unpairedTags.indexOf($)!==-1?(F=T.lastIndexOf(".",T.lastIndexOf(".")-1),this.tagsNodeStack.pop()):F=T.lastIndexOf("."),T=T.substring(0,F),E=this.tagsNodeStack.pop(),x="",O=C}else if(N[O+1]==="?"){let C=p(N,O,!1,"?>");if(!C)throw new Error("Pi Tag is not closed.");if(x=this.saveTextToParentTag(x,E,T),!(this.options.ignoreDeclaration&&C.tagName==="?xml"||this.options.ignorePiTags)){const P=new e(C.tagName);P.add(this.options.textNodeName,""),C.tagName!==C.tagExp&&C.attrExpPresent&&(P[":@"]=this.buildAttributesMap(C.tagExp,T,C.tagName)),this.addChild(E,P,T)}O=C.closeIndex+1}else if(N.substr(O+1,3)==="!--"){const C=y(N,"-->",O+4,"Comment is not closed.");if(this.options.commentPropName){const P=N.substring(O+4,C-2);x=this.saveTextToParentTag(x,E,T),E.add(this.options.commentPropName,[{[this.options.textNodeName]:P}])}O=C}else if(N.substr(O+1,2)==="!D"){const C=t(N,O);this.docTypeEntities=C.entities,O=C.i}else if(N.substr(O+1,2)==="!["){const C=y(N,"]]>",O,"CDATA is not closed.")-2,P=N.substring(O+9,C);x=this.saveTextToParentTag(x,E,T);let $=this.parseTextData(P,E.tagname,T,!0,!1,!0,!0);$==null&&($=""),this.options.cdataPropName?E.add(this.options.cdataPropName,[{[this.options.textNodeName]:P}]):E.add(this.options.textNodeName,$),O=C+2}else{let C=p(N,O,this.options.removeNSPrefix),P=C.tagName;const $=C.rawTagName;let F=C.tagExp,j=C.attrExpPresent,G=C.closeIndex;this.options.transformTagName&&(P=this.options.transformTagName(P)),E&&x&&E.tagname!=="!xml"&&(x=this.saveTextToParentTag(x,E,T,!1));const q=E;if(q&&this.options.unpairedTags.indexOf(q.tagname)!==-1&&(E=this.tagsNodeStack.pop(),T=T.substring(0,T.lastIndexOf("."))),P!==b.tagname&&(T+=T?"."+P:P),this.isItStopNode(this.options.stopNodes,T,P)){let R="";if(F.length>0&&F.lastIndexOf("/")===F.length-1)P[P.length-1]==="/"?(P=P.substr(0,P.length-1),T=T.substr(0,T.length-1),F=P):F=F.substr(0,F.length-1),O=C.closeIndex;else if(this.options.unpairedTags.indexOf(P)!==-1)O=C.closeIndex;else{const _=this.readStopNodeData(N,$,G+1);if(!_)throw new Error(`Unexpected end of ${$}`);O=_.i,R=_.tagContent}const ee=new e(P);P!==F&&j&&(ee[":@"]=this.buildAttributesMap(F,T,P)),R&&(R=this.parseTextData(R,P,T,!0,j,!0,!0)),T=T.substr(0,T.lastIndexOf(".")),ee.add(this.options.textNodeName,R),this.addChild(E,ee,T)}else{if(F.length>0&&F.lastIndexOf("/")===F.length-1){P[P.length-1]==="/"?(P=P.substr(0,P.length-1),T=T.substr(0,T.length-1),F=P):F=F.substr(0,F.length-1),this.options.transformTagName&&(P=this.options.transformTagName(P));const R=new e(P);P!==F&&j&&(R[":@"]=this.buildAttributesMap(F,T,P)),this.addChild(E,R,T),T=T.substr(0,T.lastIndexOf("."))}else{const R=new e(P);this.tagsNodeStack.push(E),P!==F&&j&&(R[":@"]=this.buildAttributesMap(F,T,P)),this.addChild(E,R,T),E=R}x="",O=G}}else x+=N[O];return b.child};function c(N,b,E){const x=this.options.updateTag(b.tagname,E,b[":@"]);x===!1||(typeof x=="string"&&(b.tagname=x),N.addChild(b))}const
|
|
14
|
-
`;function e(i,h){let a="";return h.format&&h.indentBy.length>0&&(a=r),t(i,h,"",a)}function t(i,h,a,s){let f="",c=!1;for(let
|
|
5
|
+
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function i(s,f,c,d){const m=this.j2x(s,c+1,d.concat(f));return s[this.options.textNodeName]!==void 0&&Object.keys(s).length===1?this.buildTextValNode(s[this.options.textNodeName],f,m.attrStr,c):this.buildObjectNode(m.val,f,m.attrStr,c)}function h(s){return this.options.indentBy.repeat(s)}function a(s){return!(!s.startsWith(this.options.attributeNamePrefix)||s===this.options.textNodeName)&&s.substr(this.attrPrefixLen)}l.prototype.build=function(s){return this.options.preserveOrder?n(s,this.options):(Array.isArray(s)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(s={[this.options.arrayNodeName]:s}),this.j2x(s,0,[]).val)},l.prototype.j2x=function(s,f,c){let d="",m="";const g=c.join(".");for(let w in s)if(Object.prototype.hasOwnProperty.call(s,w))if(s[w]===void 0)this.isAttribute(w)&&(m+="");else if(s[w]===null)this.isAttribute(w)?m+="":w[0]==="?"?m+=this.indentate(f)+"<"+w+"?"+this.tagEndChar:m+=this.indentate(f)+"<"+w+"/"+this.tagEndChar;else if(s[w]instanceof Date)m+=this.buildTextValNode(s[w],w,"",f);else if(typeof s[w]!="object"){const y=this.isAttribute(w);if(y&&!this.ignoreAttributesFn(y,g))d+=this.buildAttrPairStr(y,""+s[w]);else if(!y)if(w===this.options.textNodeName){let p=this.options.tagValueProcessor(w,""+s[w]);m+=this.replaceEntitiesValue(p)}else m+=this.buildTextValNode(s[w],w,"",f)}else if(Array.isArray(s[w])){const y=s[w].length;let p="",v="";for(let A=0;A<y;A++){const N=s[w][A];if(N!==void 0)if(N===null)w[0]==="?"?m+=this.indentate(f)+"<"+w+"?"+this.tagEndChar:m+=this.indentate(f)+"<"+w+"/"+this.tagEndChar;else if(typeof N=="object")if(this.options.oneListGroup){const b=this.j2x(N,f+1,c.concat(w));p+=b.val,this.options.attributesGroupName&&N.hasOwnProperty(this.options.attributesGroupName)&&(v+=b.attrStr)}else p+=this.processTextOrObjNode(N,w,f,c);else if(this.options.oneListGroup){let b=this.options.tagValueProcessor(w,N);b=this.replaceEntitiesValue(b),p+=b}else p+=this.buildTextValNode(N,w,"",f)}this.options.oneListGroup&&(p=this.buildObjectNode(p,w,v,f)),m+=p}else if(this.options.attributesGroupName&&w===this.options.attributesGroupName){const y=Object.keys(s[w]),p=y.length;for(let v=0;v<p;v++)d+=this.buildAttrPairStr(y[v],""+s[w][y[v]])}else m+=this.processTextOrObjNode(s[w],w,f,c);return{attrStr:d,val:m}},l.prototype.buildAttrPairStr=function(s,f){return f=this.options.attributeValueProcessor(s,""+f),f=this.replaceEntitiesValue(f),this.options.suppressBooleanAttributes&&f==="true"?" "+s:" "+s+'="'+f+'"'},l.prototype.buildObjectNode=function(s,f,c,d){if(s==="")return f[0]==="?"?this.indentate(d)+"<"+f+c+"?"+this.tagEndChar:this.indentate(d)+"<"+f+c+this.closeTag(f)+this.tagEndChar;{let m="</"+f+this.tagEndChar,g="";return f[0]==="?"&&(g="?",m=""),!c&&c!==""||s.indexOf("<")!==-1?this.options.commentPropName!==!1&&f===this.options.commentPropName&&g.length===0?this.indentate(d)+`<!--${s}-->`+this.newLine:this.indentate(d)+"<"+f+c+g+this.tagEndChar+s+this.indentate(d)+m:this.indentate(d)+"<"+f+c+g+">"+s+m}},l.prototype.closeTag=function(s){let f="";return this.options.unpairedTags.indexOf(s)!==-1?this.options.suppressUnpairedNode||(f="/"):f=this.options.suppressEmptyNode?"/":`></${s}`,f},l.prototype.buildTextValNode=function(s,f,c,d){if(this.options.cdataPropName!==!1&&f===this.options.cdataPropName)return this.indentate(d)+`<![CDATA[${s}]]>`+this.newLine;if(this.options.commentPropName!==!1&&f===this.options.commentPropName)return this.indentate(d)+`<!--${s}-->`+this.newLine;if(f[0]==="?")return this.indentate(d)+"<"+f+c+"?"+this.tagEndChar;{let m=this.options.tagValueProcessor(f,s);return m=this.replaceEntitiesValue(m),m===""?this.indentate(d)+"<"+f+c+this.closeTag(f)+this.tagEndChar:this.indentate(d)+"<"+f+c+">"+m+"</"+f+this.tagEndChar}},l.prototype.replaceEntitiesValue=function(s){if(s&&s.length>0&&this.options.processEntities)for(let f=0;f<this.options.entities.length;f++){const c=this.options.entities[f];s=s.replace(c.regex,c.val)}return s},r.exports=l},87:r=>{function e(l,i,h,a){let s="",f=!1;for(let c=0;c<l.length;c++){const d=l[c],m=t(d);if(m===void 0)continue;let g="";if(g=h.length===0?m:`${h}.${m}`,m===i.textNodeName){let v=d[m];o(g,i)||(v=i.tagValueProcessor(m,v),v=u(v,i)),f&&(s+=a),s+=v,f=!1;continue}if(m===i.cdataPropName){f&&(s+=a),s+=`<![CDATA[${d[m][0][i.textNodeName]}]]>`,f=!1;continue}if(m===i.commentPropName){s+=a+`<!--${d[m][0][i.textNodeName]}-->`,f=!0;continue}if(m[0]==="?"){const v=n(d[":@"],i),A=m==="?xml"?"":a;let N=d[m][0][i.textNodeName];N=N.length!==0?" "+N:"",s+=A+`<${m}${N}${v}?>`,f=!0;continue}let w=a;w!==""&&(w+=i.indentBy);const y=a+`<${m}${n(d[":@"],i)}`,p=e(d[m],i,g,w);i.unpairedTags.indexOf(m)!==-1?i.suppressUnpairedNode?s+=y+">":s+=y+"/>":p&&p.length!==0||!i.suppressEmptyNode?p&&p.endsWith(">")?s+=y+`>${p}${a}</${m}>`:(s+=y+">",p&&a!==""&&(p.includes("/>")||p.includes("</"))?s+=a+i.indentBy+p+a:s+=p,s+=`</${m}>`):s+=y+"/>",f=!0}return s}function t(l){const i=Object.keys(l);for(let h=0;h<i.length;h++){const a=i[h];if(l.hasOwnProperty(a)&&a!==":@")return a}}function n(l,i){let h="";if(l&&!i.ignoreAttributes)for(let a in l){if(!l.hasOwnProperty(a))continue;let s=i.attributeValueProcessor(a,l[a]);s=u(s,i),s===!0&&i.suppressBooleanAttributes?h+=` ${a.substr(i.attributeNamePrefix.length)}`:h+=` ${a.substr(i.attributeNamePrefix.length)}="${s}"`}return h}function o(l,i){let h=(l=l.substr(0,l.length-i.textNodeName.length-1)).substr(l.lastIndexOf(".")+1);for(let a in i.stopNodes)if(i.stopNodes[a]===l||i.stopNodes[a]==="*."+h)return!0;return!1}function u(l,i){if(l&&l.length>0&&i.processEntities)for(let h=0;h<i.entities.length;h++){const a=i.entities[h];l=l.replace(a.regex,a.val)}return l}r.exports=function(l,i){let h="";return i.format&&i.indentBy.length>0&&(h=`
|
|
6
|
+
`),e(l,i,"",h)}},193:(r,e,t)=>{const n=t(705);function o(f,c){let d="";for(;c<f.length&&f[c]!=="'"&&f[c]!=='"';c++)d+=f[c];if(d=d.trim(),d.indexOf(" ")!==-1)throw new Error("External entites are not supported");const m=f[c++];let g="";for(;c<f.length&&f[c]!==m;c++)g+=f[c];return[d,g,c]}function u(f,c){return f[c+1]==="!"&&f[c+2]==="-"&&f[c+3]==="-"}function l(f,c){return f[c+1]==="!"&&f[c+2]==="E"&&f[c+3]==="N"&&f[c+4]==="T"&&f[c+5]==="I"&&f[c+6]==="T"&&f[c+7]==="Y"}function i(f,c){return f[c+1]==="!"&&f[c+2]==="E"&&f[c+3]==="L"&&f[c+4]==="E"&&f[c+5]==="M"&&f[c+6]==="E"&&f[c+7]==="N"&&f[c+8]==="T"}function h(f,c){return f[c+1]==="!"&&f[c+2]==="A"&&f[c+3]==="T"&&f[c+4]==="T"&&f[c+5]==="L"&&f[c+6]==="I"&&f[c+7]==="S"&&f[c+8]==="T"}function a(f,c){return f[c+1]==="!"&&f[c+2]==="N"&&f[c+3]==="O"&&f[c+4]==="T"&&f[c+5]==="A"&&f[c+6]==="T"&&f[c+7]==="I"&&f[c+8]==="O"&&f[c+9]==="N"}function s(f){if(n.isName(f))return f;throw new Error(`Invalid entity name ${f}`)}r.exports=function(f,c){const d={};if(f[c+3]!=="O"||f[c+4]!=="C"||f[c+5]!=="T"||f[c+6]!=="Y"||f[c+7]!=="P"||f[c+8]!=="E")throw new Error("Invalid Tag instead of DOCTYPE");{c+=9;let m=1,g=!1,w=!1,y="";for(;c<f.length;c++)if(f[c]!=="<"||w)if(f[c]===">"){if(w?f[c-1]==="-"&&f[c-2]==="-"&&(w=!1,m--):m--,m===0)break}else f[c]==="["?g=!0:y+=f[c];else{if(g&&l(f,c)){let p,v;c+=7,[p,v,c]=o(f,c+1),v.indexOf("&")===-1&&(d[s(p)]={regx:RegExp(`&${p};`,"g"),val:v})}else if(g&&i(f,c))c+=8;else if(g&&h(f,c))c+=8;else if(g&&a(f,c))c+=9;else{if(!u)throw new Error("Invalid DOCTYPE");w=!0}m++,y=""}if(m!==0)throw new Error("Unclosed DOCTYPE")}return{entities:d,i:c}}},63:(r,e)=>{const t={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(n,o){return o},attributeValueProcessor:function(n,o){return o},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(n,o,u){return n}};e.buildOptions=function(n){return Object.assign({},t,n)},e.defaultOptions=t},299:(r,e,t)=>{const n=t(705),o=t(365),u=t(193),l=t(494),i=t(118);function h(b){const E=Object.keys(b);for(let x=0;x<E.length;x++){const T=E[x];this.lastEntities[T]={regex:new RegExp("&"+T+";","g"),val:b[T]}}}function a(b,E,x,T,O,I,C){if(b!==void 0&&(this.options.trimValues&&!T&&(b=b.trim()),b.length>0)){C||(b=this.replaceEntitiesValue(b));const P=this.options.tagValueProcessor(E,b,x,O,I);return P==null?b:typeof P!=typeof b||P!==b?P:this.options.trimValues||b.trim()===b?N(b,this.options.parseTagValue,this.options.numberParseOptions):b}}function s(b){if(this.options.removeNSPrefix){const E=b.split(":"),x=b.charAt(0)==="/"?"/":"";if(E[0]==="xmlns")return"";E.length===2&&(b=x+E[1])}return b}const f=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function c(b,E,x){if(this.options.ignoreAttributes!==!0&&typeof b=="string"){const T=n.getAllMatches(b,f),O=T.length,I={};for(let C=0;C<O;C++){const P=this.resolveNameSpace(T[C][1]);if(this.ignoreAttributesFn(P,E))continue;let $=T[C][4],F=this.options.attributeNamePrefix+P;if(P.length)if(this.options.transformAttributeName&&(F=this.options.transformAttributeName(F)),F==="__proto__"&&(F="#__proto__"),$!==void 0){this.options.trimValues&&($=$.trim()),$=this.replaceEntitiesValue($);const j=this.options.attributeValueProcessor(P,$,E);I[F]=j==null?$:typeof j!=typeof $||j!==$?j:N($,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(I[F]=!0)}if(!Object.keys(I).length)return;if(this.options.attributesGroupName){const C={};return C[this.options.attributesGroupName]=I,C}return I}}const d=function(b){b=b.replace(/\r\n?/g,`
|
|
7
|
+
`);const E=new o("!xml");let x=E,T="",O="";for(let I=0;I<b.length;I++)if(b[I]==="<")if(b[I+1]==="/"){const C=p(b,">",I,"Closing Tag is not closed.");let P=b.substring(I+2,C).trim();if(this.options.removeNSPrefix){const j=P.indexOf(":");j!==-1&&(P=P.substr(j+1))}this.options.transformTagName&&(P=this.options.transformTagName(P)),x&&(T=this.saveTextToParentTag(T,x,O));const $=O.substring(O.lastIndexOf(".")+1);if(P&&this.options.unpairedTags.indexOf(P)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${P}>`);let F=0;$&&this.options.unpairedTags.indexOf($)!==-1?(F=O.lastIndexOf(".",O.lastIndexOf(".")-1),this.tagsNodeStack.pop()):F=O.lastIndexOf("."),O=O.substring(0,F),x=this.tagsNodeStack.pop(),T="",I=C}else if(b[I+1]==="?"){let C=v(b,I,!1,"?>");if(!C)throw new Error("Pi Tag is not closed.");if(T=this.saveTextToParentTag(T,x,O),!(this.options.ignoreDeclaration&&C.tagName==="?xml"||this.options.ignorePiTags)){const P=new o(C.tagName);P.add(this.options.textNodeName,""),C.tagName!==C.tagExp&&C.attrExpPresent&&(P[":@"]=this.buildAttributesMap(C.tagExp,O,C.tagName)),this.addChild(x,P,O)}I=C.closeIndex+1}else if(b.substr(I+1,3)==="!--"){const C=p(b,"-->",I+4,"Comment is not closed.");if(this.options.commentPropName){const P=b.substring(I+4,C-2);T=this.saveTextToParentTag(T,x,O),x.add(this.options.commentPropName,[{[this.options.textNodeName]:P}])}I=C}else if(b.substr(I+1,2)==="!D"){const C=u(b,I);this.docTypeEntities=C.entities,I=C.i}else if(b.substr(I+1,2)==="!["){const C=p(b,"]]>",I,"CDATA is not closed.")-2,P=b.substring(I+9,C);T=this.saveTextToParentTag(T,x,O);let $=this.parseTextData(P,x.tagname,O,!0,!1,!0,!0);$==null&&($=""),this.options.cdataPropName?x.add(this.options.cdataPropName,[{[this.options.textNodeName]:P}]):x.add(this.options.textNodeName,$),I=C+2}else{let C=v(b,I,this.options.removeNSPrefix),P=C.tagName;const $=C.rawTagName;let F=C.tagExp,j=C.attrExpPresent,G=C.closeIndex;this.options.transformTagName&&(P=this.options.transformTagName(P)),x&&T&&x.tagname!=="!xml"&&(T=this.saveTextToParentTag(T,x,O,!1));const q=x;if(q&&this.options.unpairedTags.indexOf(q.tagname)!==-1&&(x=this.tagsNodeStack.pop(),O=O.substring(0,O.lastIndexOf("."))),P!==E.tagname&&(O+=O?"."+P:P),this.isItStopNode(this.options.stopNodes,O,P)){let R="";if(F.length>0&&F.lastIndexOf("/")===F.length-1)P[P.length-1]==="/"?(P=P.substr(0,P.length-1),O=O.substr(0,O.length-1),F=P):F=F.substr(0,F.length-1),I=C.closeIndex;else if(this.options.unpairedTags.indexOf(P)!==-1)I=C.closeIndex;else{const _=this.readStopNodeData(b,$,G+1);if(!_)throw new Error(`Unexpected end of ${$}`);I=_.i,R=_.tagContent}const ee=new o(P);P!==F&&j&&(ee[":@"]=this.buildAttributesMap(F,O,P)),R&&(R=this.parseTextData(R,P,O,!0,j,!0,!0)),O=O.substr(0,O.lastIndexOf(".")),ee.add(this.options.textNodeName,R),this.addChild(x,ee,O)}else{if(F.length>0&&F.lastIndexOf("/")===F.length-1){P[P.length-1]==="/"?(P=P.substr(0,P.length-1),O=O.substr(0,O.length-1),F=P):F=F.substr(0,F.length-1),this.options.transformTagName&&(P=this.options.transformTagName(P));const R=new o(P);P!==F&&j&&(R[":@"]=this.buildAttributesMap(F,O,P)),this.addChild(x,R,O),O=O.substr(0,O.lastIndexOf("."))}else{const R=new o(P);this.tagsNodeStack.push(x),P!==F&&j&&(R[":@"]=this.buildAttributesMap(F,O,P)),this.addChild(x,R,O),x=R}T="",I=G}}else T+=b[I];return E.child};function m(b,E,x){const T=this.options.updateTag(E.tagname,x,E[":@"]);T===!1||(typeof T=="string"&&(E.tagname=T),b.addChild(E))}const g=function(b){if(this.options.processEntities){for(let E in this.docTypeEntities){const x=this.docTypeEntities[E];b=b.replace(x.regx,x.val)}for(let E in this.lastEntities){const x=this.lastEntities[E];b=b.replace(x.regex,x.val)}if(this.options.htmlEntities)for(let E in this.htmlEntities){const x=this.htmlEntities[E];b=b.replace(x.regex,x.val)}b=b.replace(this.ampEntity.regex,this.ampEntity.val)}return b};function w(b,E,x,T){return b&&(T===void 0&&(T=Object.keys(E.child).length===0),(b=this.parseTextData(b,E.tagname,x,!1,!!E[":@"]&&Object.keys(E[":@"]).length!==0,T))!==void 0&&b!==""&&E.add(this.options.textNodeName,b),b=""),b}function y(b,E,x){const T="*."+x;for(const O in b){const I=b[O];if(T===I||E===I)return!0}return!1}function p(b,E,x,T){const O=b.indexOf(E,x);if(O===-1)throw new Error(T);return O+E.length-1}function v(b,E,x){const T=function(j,G){let q,R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:">",ee="";for(let _=G;_<j.length;_++){let Q=j[_];if(q)Q===q&&(q="");else if(Q==='"'||Q==="'")q=Q;else if(Q===R[0]){if(!R[1])return{data:ee,index:_};if(j[_+1]===R[1])return{data:ee,index:_}}else Q===" "&&(Q=" ");ee+=Q}}(b,E+1,arguments.length>3&&arguments[3]!==void 0?arguments[3]:">");if(!T)return;let O=T.data;const I=T.index,C=O.search(/\s/);let P=O,$=!0;C!==-1&&(P=O.substring(0,C),O=O.substring(C+1).trimStart());const F=P;if(x){const j=P.indexOf(":");j!==-1&&(P=P.substr(j+1),$=P!==T.data.substr(j+1))}return{tagName:P,tagExp:O,closeIndex:I,attrExpPresent:$,rawTagName:F}}function A(b,E,x){const T=x;let O=1;for(;x<b.length;x++)if(b[x]==="<")if(b[x+1]==="/"){const I=p(b,">",x,`${E} is not closed`);if(b.substring(x+2,I).trim()===E&&(O--,O===0))return{tagContent:b.substring(T,x),i:I};x=I}else if(b[x+1]==="?")x=p(b,"?>",x+1,"StopNode is not closed.");else if(b.substr(x+1,3)==="!--")x=p(b,"-->",x+3,"StopNode is not closed.");else if(b.substr(x+1,2)==="![")x=p(b,"]]>",x,"StopNode is not closed.")-2;else{const I=v(b,x,">");I&&((I&&I.tagName)===E&&I.tagExp[I.tagExp.length-1]!=="/"&&O++,x=I.closeIndex)}}function N(b,E,x){if(E&&typeof b=="string"){const T=b.trim();return T==="true"||T!=="false"&&l(b,x)}return n.isExist(b)?b:""}r.exports=class{constructor(b){this.options=b,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(E,x)=>String.fromCharCode(Number.parseInt(x,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(E,x)=>String.fromCharCode(Number.parseInt(x,16))}},this.addExternalEntities=h,this.parseXml=d,this.parseTextData=a,this.resolveNameSpace=s,this.buildAttributesMap=c,this.isItStopNode=y,this.replaceEntitiesValue=g,this.readStopNodeData=A,this.saveTextToParentTag=w,this.addChild=m,this.ignoreAttributesFn=i(this.options.ignoreAttributes)}}},338:(r,e,t)=>{const{buildOptions:n}=t(63),o=t(299),{prettify:u}=t(728),l=t(31);r.exports=class{constructor(i){this.externalEntities={},this.options=n(i)}parse(i,h){if(typeof i!="string"){if(!i.toString)throw new Error("XML data is accepted in String or Bytes[] form.");i=i.toString()}if(h){h===!0&&(h={});const f=l.validate(i,h);if(f!==!0)throw Error(`${f.err.msg}:${f.err.line}:${f.err.col}`)}const a=new o(this.options);a.addExternalEntities(this.externalEntities);const s=a.parseXml(i);return this.options.preserveOrder||s===void 0?s:u(s,this.options)}addEntity(i,h){if(h.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(i.indexOf("&")!==-1||i.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if(h==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[i]=h}}},728:(r,e)=>{function t(l,i,h){let a;const s={};for(let f=0;f<l.length;f++){const c=l[f],d=n(c);let m="";if(m=h===void 0?d:h+"."+d,d===i.textNodeName)a===void 0?a=c[d]:a+=""+c[d];else{if(d===void 0)continue;if(c[d]){let g=t(c[d],i,m);const w=u(g,i);c[":@"]?o(g,c[":@"],m,i):Object.keys(g).length!==1||g[i.textNodeName]===void 0||i.alwaysCreateTextNode?Object.keys(g).length===0&&(i.alwaysCreateTextNode?g[i.textNodeName]="":g=""):g=g[i.textNodeName],s[d]!==void 0&&s.hasOwnProperty(d)?(Array.isArray(s[d])||(s[d]=[s[d]]),s[d].push(g)):i.isArray(d,m,w)?s[d]=[g]:s[d]=g}}}return typeof a=="string"?a.length>0&&(s[i.textNodeName]=a):a!==void 0&&(s[i.textNodeName]=a),s}function n(l){const i=Object.keys(l);for(let h=0;h<i.length;h++){const a=i[h];if(a!==":@")return a}}function o(l,i,h,a){if(i){const s=Object.keys(i),f=s.length;for(let c=0;c<f;c++){const d=s[c];a.isArray(d,h+"."+d,!0,!0)?l[d]=[i[d]]:l[d]=i[d]}}}function u(l,i){const{textNodeName:h}=i,a=Object.keys(l).length;return a===0||!(a!==1||!l[h]&&typeof l[h]!="boolean"&&l[h]!==0)}e.prettify=function(l,i){return t(l,i)}},365:r=>{r.exports=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}},135:r=>{function e(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}r.exports=function(t){return t!=null&&(e(t)||function(n){return typeof n.readFloatLE=="function"&&typeof n.slice=="function"&&e(n.slice(0,0))}(t)||!!t._isBuffer)}},542:(r,e,t)=>{(function(){var n=t(298),o=t(526).utf8,u=t(135),l=t(526).bin,i=function(h,a){h.constructor==String?h=a&&a.encoding==="binary"?l.stringToBytes(h):o.stringToBytes(h):u(h)?h=Array.prototype.slice.call(h,0):Array.isArray(h)||h.constructor===Uint8Array||(h=h.toString());for(var s=n.bytesToWords(h),f=8*h.length,c=1732584193,d=-271733879,m=-1732584194,g=271733878,w=0;w<s.length;w++)s[w]=16711935&(s[w]<<8|s[w]>>>24)|4278255360&(s[w]<<24|s[w]>>>8);s[f>>>5]|=128<<f%32,s[14+(f+64>>>9<<4)]=f;var y=i._ff,p=i._gg,v=i._hh,A=i._ii;for(w=0;w<s.length;w+=16){var N=c,b=d,E=m,x=g;c=y(c,d,m,g,s[w+0],7,-680876936),g=y(g,c,d,m,s[w+1],12,-389564586),m=y(m,g,c,d,s[w+2],17,606105819),d=y(d,m,g,c,s[w+3],22,-1044525330),c=y(c,d,m,g,s[w+4],7,-176418897),g=y(g,c,d,m,s[w+5],12,1200080426),m=y(m,g,c,d,s[w+6],17,-1473231341),d=y(d,m,g,c,s[w+7],22,-45705983),c=y(c,d,m,g,s[w+8],7,1770035416),g=y(g,c,d,m,s[w+9],12,-1958414417),m=y(m,g,c,d,s[w+10],17,-42063),d=y(d,m,g,c,s[w+11],22,-1990404162),c=y(c,d,m,g,s[w+12],7,1804603682),g=y(g,c,d,m,s[w+13],12,-40341101),m=y(m,g,c,d,s[w+14],17,-1502002290),c=p(c,d=y(d,m,g,c,s[w+15],22,1236535329),m,g,s[w+1],5,-165796510),g=p(g,c,d,m,s[w+6],9,-1069501632),m=p(m,g,c,d,s[w+11],14,643717713),d=p(d,m,g,c,s[w+0],20,-373897302),c=p(c,d,m,g,s[w+5],5,-701558691),g=p(g,c,d,m,s[w+10],9,38016083),m=p(m,g,c,d,s[w+15],14,-660478335),d=p(d,m,g,c,s[w+4],20,-405537848),c=p(c,d,m,g,s[w+9],5,568446438),g=p(g,c,d,m,s[w+14],9,-1019803690),m=p(m,g,c,d,s[w+3],14,-187363961),d=p(d,m,g,c,s[w+8],20,1163531501),c=p(c,d,m,g,s[w+13],5,-1444681467),g=p(g,c,d,m,s[w+2],9,-51403784),m=p(m,g,c,d,s[w+7],14,1735328473),c=v(c,d=p(d,m,g,c,s[w+12],20,-1926607734),m,g,s[w+5],4,-378558),g=v(g,c,d,m,s[w+8],11,-2022574463),m=v(m,g,c,d,s[w+11],16,1839030562),d=v(d,m,g,c,s[w+14],23,-35309556),c=v(c,d,m,g,s[w+1],4,-1530992060),g=v(g,c,d,m,s[w+4],11,1272893353),m=v(m,g,c,d,s[w+7],16,-155497632),d=v(d,m,g,c,s[w+10],23,-1094730640),c=v(c,d,m,g,s[w+13],4,681279174),g=v(g,c,d,m,s[w+0],11,-358537222),m=v(m,g,c,d,s[w+3],16,-722521979),d=v(d,m,g,c,s[w+6],23,76029189),c=v(c,d,m,g,s[w+9],4,-640364487),g=v(g,c,d,m,s[w+12],11,-421815835),m=v(m,g,c,d,s[w+15],16,530742520),c=A(c,d=v(d,m,g,c,s[w+2],23,-995338651),m,g,s[w+0],6,-198630844),g=A(g,c,d,m,s[w+7],10,1126891415),m=A(m,g,c,d,s[w+14],15,-1416354905),d=A(d,m,g,c,s[w+5],21,-57434055),c=A(c,d,m,g,s[w+12],6,1700485571),g=A(g,c,d,m,s[w+3],10,-1894986606),m=A(m,g,c,d,s[w+10],15,-1051523),d=A(d,m,g,c,s[w+1],21,-2054922799),c=A(c,d,m,g,s[w+8],6,1873313359),g=A(g,c,d,m,s[w+15],10,-30611744),m=A(m,g,c,d,s[w+6],15,-1560198380),d=A(d,m,g,c,s[w+13],21,1309151649),c=A(c,d,m,g,s[w+4],6,-145523070),g=A(g,c,d,m,s[w+11],10,-1120210379),m=A(m,g,c,d,s[w+2],15,718787259),d=A(d,m,g,c,s[w+9],21,-343485551),c=c+N>>>0,d=d+b>>>0,m=m+E>>>0,g=g+x>>>0}return n.endian([c,d,m,g])};i._ff=function(h,a,s,f,c,d,m){var g=h+(a&s|~a&f)+(c>>>0)+m;return(g<<d|g>>>32-d)+a},i._gg=function(h,a,s,f,c,d,m){var g=h+(a&f|s&~f)+(c>>>0)+m;return(g<<d|g>>>32-d)+a},i._hh=function(h,a,s,f,c,d,m){var g=h+(a^s^f)+(c>>>0)+m;return(g<<d|g>>>32-d)+a},i._ii=function(h,a,s,f,c,d,m){var g=h+(s^(a|~f))+(c>>>0)+m;return(g<<d|g>>>32-d)+a},i._blocksize=16,i._digestsize=16,r.exports=function(h,a){if(h==null)throw new Error("Illegal argument "+h);var s=n.wordsToBytes(i(h,a));return a&&a.asBytes?s:a&&a.asString?l.bytesToString(s):n.bytesToHex(s)}})()},285:(r,e,t)=>{var n=t(2);r.exports=function(y){return y?(y.substr(0,2)==="{}"&&(y="\\{\\}"+y.substr(2)),w(function(p){return p.split("\\\\").join(o).split("\\{").join(u).split("\\}").join(l).split("\\,").join(i).split("\\.").join(h)}(y),!0).map(s)):[]};var o="\0SLASH"+Math.random()+"\0",u="\0OPEN"+Math.random()+"\0",l="\0CLOSE"+Math.random()+"\0",i="\0COMMA"+Math.random()+"\0",h="\0PERIOD"+Math.random()+"\0";function a(y){return parseInt(y,10)==y?parseInt(y,10):y.charCodeAt(0)}function s(y){return y.split(o).join("\\").split(u).join("{").split(l).join("}").split(i).join(",").split(h).join(".")}function f(y){if(!y)return[""];var p=[],v=n("{","}",y);if(!v)return y.split(",");var A=v.pre,N=v.body,b=v.post,E=A.split(",");E[E.length-1]+="{"+N+"}";var x=f(b);return b.length&&(E[E.length-1]+=x.shift(),E.push.apply(E,x)),p.push.apply(p,E),p}function c(y){return"{"+y+"}"}function d(y){return/^-?0\d/.test(y)}function m(y,p){return y<=p}function g(y,p){return y>=p}function w(y,p){var v=[],A=n("{","}",y);if(!A)return[y];var N=A.pre,b=A.post.length?w(A.post,!1):[""];if(/\$$/.test(A.pre))for(var E=0;E<b.length;E++){var x=N+"{"+A.body+"}"+b[E];v.push(x)}else{var T,O,I=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(A.body),C=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(A.body),P=I||C,$=A.body.indexOf(",")>=0;if(!P&&!$)return A.post.match(/,.*\}/)?w(y=A.pre+"{"+A.body+l+A.post):[y];if(P)T=A.body.split(/\.\./);else if((T=f(A.body)).length===1&&(T=w(T[0],!1).map(c)).length===1)return b.map(function(Vr){return A.pre+T[0]+Vr});if(P){var F=a(T[0]),j=a(T[1]),G=Math.max(T[0].length,T[1].length),q=T.length==3?Math.abs(a(T[2])):1,R=m;j<F&&(q*=-1,R=g);var ee=T.some(d);O=[];for(var _=F;R(_,j);_+=q){var Q;if(C)(Q=String.fromCharCode(_))==="\\"&&(Q="");else if(Q=String(_),ee){var $t=G-Q.length;if($t>0){var jt=new Array($t+1).join("0");Q=_<0?"-"+jt+Q.slice(1):jt+Q}}O.push(Q)}}else{O=[];for(var we=0;we<T.length;we++)O.push.apply(O,w(T[we],!1))}for(we=0;we<O.length;we++)for(E=0;E<b.length;E++)x=N+O[we]+b[E],(!p||P||x)&&v.push(x)}return v}},829:r=>{function e(a){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},e(a)}function t(a){var s=typeof Map=="function"?new Map:void 0;return t=function(f){if(f===null||(c=f,Function.toString.call(c).indexOf("[native code]")===-1))return f;var c;if(typeof f!="function")throw new TypeError("Super expression must either be null or a function");if(s!==void 0){if(s.has(f))return s.get(f);s.set(f,d)}function d(){return n(f,arguments,u(this).constructor)}return d.prototype=Object.create(f.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),o(d,f)},t(a)}function n(a,s,f){return n=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}()?Reflect.construct:function(c,d,m){var g=[null];g.push.apply(g,d);var w=new(Function.bind.apply(c,g));return m&&o(w,m.prototype),w},n.apply(null,arguments)}function o(a,s){return o=Object.setPrototypeOf||function(f,c){return f.__proto__=c,f},o(a,s)}function u(a){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},u(a)}var l=function(a){function s(f){var c;return function(d,m){if(!(d instanceof m))throw new TypeError("Cannot call a class as a function")}(this,s),(c=function(d,m){return!m||e(m)!=="object"&&typeof m!="function"?function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}(d):m}(this,u(s).call(this,f))).name="ObjectPrototypeMutationError",c}return function(f,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function");f.prototype=Object.create(c&&c.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),c&&o(f,c)}(s,a),s}(t(Error));function i(a,s){for(var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},c=s.split("."),d=c.length,m=function(y){var p=c[y];if(!a)return{v:void 0};if(p==="+"){if(Array.isArray(a))return{v:a.map(function(A,N){var b=c.slice(y+1);return b.length>0?i(A,b.join("."),f):f(a,N,c,y)})};var v=c.slice(0,y).join(".");throw new Error("Object at wildcard (".concat(v,") is not an array"))}a=f(a,p,c,y)},g=0;g<d;g++){var w=m(g);if(e(w)==="object")return w.v}return a}function h(a,s){return a.length===s+1}r.exports={set:function(a,s,f){if(e(a)!="object"||a===null||s===void 0)return a;if(typeof s=="number")return a[s]=f,a[s];try{return i(a,s,function(c,d,m,g){if(c===Reflect.getPrototypeOf({}))throw new l("Attempting to mutate Object.prototype");if(!c[d]){var w=Number.isInteger(Number(m[g+1])),y=m[g+1]==="+";c[d]=w||y?[]:{}}return h(m,g)&&(c[d]=f),c[d]})}catch(c){if(c instanceof l)throw c;return a}},get:function(a,s){if(e(a)!="object"||a===null||s===void 0)return a;if(typeof s=="number")return a[s];try{return i(a,s,function(f,c){return f[c]})}catch{return a}},has:function(a,s){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(e(a)!="object"||a===null||s===void 0)return!1;if(typeof s=="number")return s in a;try{var c=!1;return i(a,s,function(d,m,g,w){if(!h(g,w))return d&&d[m];c=f.own?d.hasOwnProperty(m):m in d}),c}catch{return!1}},hasOwn:function(a,s,f){return this.has(a,s,f||{own:!0})},isIn:function(a,s,f){var c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(e(a)!="object"||a===null||s===void 0)return!1;try{var d=!1,m=!1;return i(a,s,function(g,w,y,p){return d=d||g===f||!!g&&g[w]===f,m=h(y,p)&&e(g)==="object"&&w in g,g&&g[w]}),c.validPath?d&&m:d}catch{return!1}},ObjectPrototypeMutationError:l}},47:(r,e,t)=>{var n=t(410),o=function(a){return typeof a=="string"};function u(a,s){for(var f=[],c=0;c<a.length;c++){var d=a[c];d&&d!=="."&&(d===".."?f.length&&f[f.length-1]!==".."?f.pop():s&&f.push(".."):f.push(d))}return f}var l=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i={};function h(a){return l.exec(a).slice(1)}i.resolve=function(){for(var a="",s=!1,f=arguments.length-1;f>=-1&&!s;f--){var c=f>=0?arguments[f]:ce.process$1.cwd();if(!o(c))throw new TypeError("Arguments to path.resolve must be strings");c&&(a=c+"/"+a,s=c.charAt(0)==="/")}return(s?"/":"")+(a=u(a.split("/"),!s).join("/"))||"."},i.normalize=function(a){var s=i.isAbsolute(a),f=a.substr(-1)==="/";return(a=u(a.split("/"),!s).join("/"))||s||(a="."),a&&f&&(a+="/"),(s?"/":"")+a},i.isAbsolute=function(a){return a.charAt(0)==="/"},i.join=function(){for(var a="",s=0;s<arguments.length;s++){var f=arguments[s];if(!o(f))throw new TypeError("Arguments to path.join must be strings");f&&(a+=a?"/"+f:f)}return i.normalize(a)},i.relative=function(a,s){function f(p){for(var v=0;v<p.length&&p[v]==="";v++);for(var A=p.length-1;A>=0&&p[A]==="";A--);return v>A?[]:p.slice(v,A+1)}a=i.resolve(a).substr(1),s=i.resolve(s).substr(1);for(var c=f(a.split("/")),d=f(s.split("/")),m=Math.min(c.length,d.length),g=m,w=0;w<m;w++)if(c[w]!==d[w]){g=w;break}var y=[];for(w=g;w<c.length;w++)y.push("..");return(y=y.concat(d.slice(g))).join("/")},i._makeLong=function(a){return a},i.dirname=function(a){var s=h(a),f=s[0],c=s[1];return f||c?(c&&(c=c.substr(0,c.length-1)),f+c):"."},i.basename=function(a,s){var f=h(a)[2];return s&&f.substr(-1*s.length)===s&&(f=f.substr(0,f.length-s.length)),f},i.extname=function(a){return h(a)[3]},i.format=function(a){if(!n.isObject(a))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof a);var s=a.root||"";if(!o(s))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof a.root);return(a.dir?a.dir+i.sep:"")+(a.base||"")},i.parse=function(a){if(!o(a))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof a);var s=h(a);if(!s||s.length!==4)throw new TypeError("Invalid path '"+a+"'");return s[1]=s[1]||"",s[2]=s[2]||"",s[3]=s[3]||"",{root:s[0],dir:s[0]+s[1].slice(0,s[1].length-1),base:s[2],ext:s[3],name:s[2].slice(0,s[2].length-s[3].length)}},i.sep="/",i.delimiter=":",r.exports=i},647:(r,e)=>{var t=Object.prototype.hasOwnProperty;function n(u){try{return decodeURIComponent(u.replace(/\+/g," "))}catch{return null}}function o(u){try{return encodeURIComponent(u)}catch{return null}}e.stringify=function(u,l){l=l||"";var i,h,a=[];for(h in typeof l!="string"&&(l="?"),u)if(t.call(u,h)){if((i=u[h])||i!=null&&!isNaN(i)||(i=""),h=o(h),i=o(i),h===null||i===null)continue;a.push(h+"="+i)}return a.length?l+a.join("&"):""},e.parse=function(u){for(var l,i=/([^=?#&]+)=?([^&]*)/g,h={};l=i.exec(u);){var a=n(l[1]),s=n(l[2]);a===null||s===null||a in h||(h[a]=s)}return h}},670:r=>{r.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return e!==80;case"https":case"wss":return e!==443;case"ftp":return e!==21;case"gopher":return e!==70;case"file":return!1}return e!==0}},494:r=>{const e=/^[-+]?0x[a-fA-F0-9]+$/,t=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const n={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};r.exports=function(o){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(u=Object.assign({},n,u),!o||typeof o!="string")return o;let l=o.trim();if(u.skipLike!==void 0&&u.skipLike.test(l))return o;if(u.hex&&e.test(l))return Number.parseInt(l,16);{const h=t.exec(l);if(h){const a=h[1],s=h[2];let f=((i=h[3])&&i.indexOf(".")!==-1&&((i=i.replace(/0+$/,""))==="."?i="0":i[0]==="."?i="0"+i:i[i.length-1]==="."&&(i=i.substr(0,i.length-1))),i);const c=h[4]||h[6];if(!u.leadingZeros&&s.length>0&&a&&l[2]!=="."||!u.leadingZeros&&s.length>0&&!a&&l[1]!==".")return o;{const d=Number(l),m=""+d;return m.search(/[eE]/)!==-1||c?u.eNotation?d:o:l.indexOf(".")!==-1?m==="0"&&f===""||m===f||a&&m==="-"+f?d:o:s?f===m||a+f===m?d:o:l===m||l===a+m?d:o}}return o}var i}},737:(r,e,t)=>{var n=t(670),o=t(647),u=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,l=/[\n\r\t]/g,i=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,h=/:\d+$/,a=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,s=/^[a-zA-Z]:/;function f(p){return(p||"").toString().replace(u,"")}var c=[["#","hash"],["?","query"],function(p,v){return g(v.protocol)?p.replace(/\\/g,"/"):p},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],d={hash:1,query:1};function m(p){var v,A=(typeof window<"u"?window:typeof ce.global<"u"?ce.global:typeof self<"u"?self:{}).location||{},N={},b=typeof(p=p||A);if(p.protocol==="blob:")N=new y(unescape(p.pathname),{});else if(b==="string")for(v in N=new y(p,{}),d)delete N[v];else if(b==="object"){for(v in p)v in d||(N[v]=p[v]);N.slashes===void 0&&(N.slashes=i.test(p.href))}return N}function g(p){return p==="file:"||p==="ftp:"||p==="http:"||p==="https:"||p==="ws:"||p==="wss:"}function w(p,v){p=(p=f(p)).replace(l,""),v=v||{};var A,N=a.exec(p),b=N[1]?N[1].toLowerCase():"",E=!!N[2],x=!!N[3],T=0;return E?x?(A=N[2]+N[3]+N[4],T=N[2].length+N[3].length):(A=N[2]+N[4],T=N[2].length):x?(A=N[3]+N[4],T=N[3].length):A=N[4],b==="file:"?T>=2&&(A=A.slice(2)):g(b)?A=N[4]:b?E&&(A=A.slice(2)):T>=2&&g(v.protocol)&&(A=N[4]),{protocol:b,slashes:E||g(b),slashesCount:T,rest:A}}function y(p,v,A){if(p=(p=f(p)).replace(l,""),!(this instanceof y))return new y(p,v,A);var N,b,E,x,T,O,I=c.slice(),C=typeof v,P=this,$=0;for(C!=="object"&&C!=="string"&&(A=v,v=null),A&&typeof A!="function"&&(A=o.parse),N=!(b=w(p||"",v=m(v))).protocol&&!b.slashes,P.slashes=b.slashes||N&&v.slashes,P.protocol=b.protocol||v.protocol||"",p=b.rest,(b.protocol==="file:"&&(b.slashesCount!==2||s.test(p))||!b.slashes&&(b.protocol||b.slashesCount<2||!g(P.protocol)))&&(I[3]=[/(.*)/,"pathname"]);$<I.length;$++)typeof(x=I[$])!="function"?(E=x[0],O=x[1],E!=E?P[O]=p:typeof E=="string"?~(T=E==="@"?p.lastIndexOf(E):p.indexOf(E))&&(typeof x[2]=="number"?(P[O]=p.slice(0,T),p=p.slice(T+x[2])):(P[O]=p.slice(T),p=p.slice(0,T))):(T=E.exec(p))&&(P[O]=T[1],p=p.slice(0,T.index)),P[O]=P[O]||N&&x[3]&&v[O]||"",x[4]&&(P[O]=P[O].toLowerCase())):p=x(p,P);A&&(P.query=A(P.query)),N&&v.slashes&&P.pathname.charAt(0)!=="/"&&(P.pathname!==""||v.pathname!=="")&&(P.pathname=function(F,j){if(F==="")return j;for(var G=(j||"/").split("/").slice(0,-1).concat(F.split("/")),q=G.length,R=G[q-1],ee=!1,_=0;q--;)G[q]==="."?G.splice(q,1):G[q]===".."?(G.splice(q,1),_++):_&&(q===0&&(ee=!0),G.splice(q,1),_--);return ee&&G.unshift(""),R!=="."&&R!==".."||G.push(""),G.join("/")}(P.pathname,v.pathname)),P.pathname.charAt(0)!=="/"&&g(P.protocol)&&(P.pathname="/"+P.pathname),n(P.port,P.protocol)||(P.host=P.hostname,P.port=""),P.username=P.password="",P.auth&&(~(T=P.auth.indexOf(":"))?(P.username=P.auth.slice(0,T),P.username=encodeURIComponent(decodeURIComponent(P.username)),P.password=P.auth.slice(T+1),P.password=encodeURIComponent(decodeURIComponent(P.password))):P.username=encodeURIComponent(decodeURIComponent(P.auth)),P.auth=P.password?P.username+":"+P.password:P.username),P.origin=P.protocol!=="file:"&&g(P.protocol)&&P.host?P.protocol+"//"+P.host:"null",P.href=P.toString()}y.prototype={set:function(p,v,A){var N=this;switch(p){case"query":typeof v=="string"&&v.length&&(v=(A||o.parse)(v)),N[p]=v;break;case"port":N[p]=v,n(v,N.protocol)?v&&(N.host=N.hostname+":"+v):(N.host=N.hostname,N[p]="");break;case"hostname":N[p]=v,N.port&&(v+=":"+N.port),N.host=v;break;case"host":N[p]=v,h.test(v)?(v=v.split(":"),N.port=v.pop(),N.hostname=v.join(":")):(N.hostname=v,N.port="");break;case"protocol":N.protocol=v.toLowerCase(),N.slashes=!A;break;case"pathname":case"hash":if(v){var b=p==="pathname"?"/":"#";N[p]=v.charAt(0)!==b?b+v:v}else N[p]=v;break;case"username":case"password":N[p]=encodeURIComponent(v);break;case"auth":var E=v.indexOf(":");~E?(N.username=v.slice(0,E),N.username=encodeURIComponent(decodeURIComponent(N.username)),N.password=v.slice(E+1),N.password=encodeURIComponent(decodeURIComponent(N.password))):N.username=encodeURIComponent(decodeURIComponent(v))}for(var x=0;x<c.length;x++){var T=c[x];T[4]&&(N[T[1]]=N[T[1]].toLowerCase())}return N.auth=N.password?N.username+":"+N.password:N.username,N.origin=N.protocol!=="file:"&&g(N.protocol)&&N.host?N.protocol+"//"+N.host:"null",N.href=N.toString(),N},toString:function(p){p&&typeof p=="function"||(p=o.stringify);var v,A=this,N=A.host,b=A.protocol;b&&b.charAt(b.length-1)!==":"&&(b+=":");var E=b+(A.protocol&&A.slashes||g(A.protocol)?"//":"");return A.username?(E+=A.username,A.password&&(E+=":"+A.password),E+="@"):A.password?(E+=":"+A.password,E+="@"):A.protocol!=="file:"&&g(A.protocol)&&!N&&A.pathname!=="/"&&(E+="@"),(N[N.length-1]===":"||h.test(A.hostname)&&!A.port)&&(N+=":"),E+=N+A.pathname,(v=typeof A.query=="object"?p(A.query):A.query)&&(E+=v.charAt(0)!=="?"?"?"+v:v),A.hash&&(E+=A.hash),E}},y.extractProtocol=w,y.location=m,y.trimLeft=f,y.qs=o,r.exports=y},410:()=>{},388:()=>{},805:()=>{},345:()=>{},800:()=>{}},Lt={};function k(r){var e=Lt[r];if(e!==void 0)return e.exports;var t=Lt[r]={id:r,loaded:!1,exports:{}};return an[r].call(t.exports,t,t.exports,k),t.loaded=!0,t.exports}k.n=r=>{var e=r&&r.__esModule?()=>r.default:()=>r;return k.d(e,{a:e}),e},k.d=(r,e)=>{for(var t in e)k.o(e,t)&&!k.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:e[t]})},k.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),k.nmd=r=>(r.paths=[],r.children||(r.children=[]),r);var le={};k.d(le,{hT:()=>ne,O4:()=>de,Kd:()=>mn,YK:()=>bn,UU:()=>Ps,Gu:()=>wr,ky:()=>Fr,h4:()=>Re,ch:()=>ze,hq:()=>Ee,i5:()=>$r});var un=k(737),ln=k.n(un);function He(r){if(!dt(r))throw new Error("Parameter was not an error")}function dt(r){return!!r&&typeof r=="object"&&(e=r,Object.prototype.toString.call(e)==="[object Error]")||r instanceof Error;var e}class ie extends Error{constructor(e,t){const n=[...arguments],{options:o,shortMessage:u}=function(i){let h,a="";if(i.length===0)h={};else if(dt(i[0]))h={cause:i[0]},a=i.slice(1).join(" ")||"";else if(i[0]&&typeof i[0]=="object")h=Object.assign({},i[0]),a=i.slice(1).join(" ")||"";else{if(typeof i[0]!="string")throw new Error("Invalid arguments passed to Layerr");h={},a=a=i.join(" ")||""}return{options:h,shortMessage:a}}(n);let l=u;if(o.cause&&(l=`${l}: ${o.cause.message}`),super(l),this.message=l,o.name&&typeof o.name=="string"?this.name=o.name:this.name="Layerr",o.cause&&Object.defineProperty(this,"_cause",{value:o.cause}),Object.defineProperty(this,"_info",{value:{}}),o.info&&typeof o.info=="object"&&Object.assign(this._info,o.info),Error.captureStackTrace){const i=o.constructorOpt||this.constructor;Error.captureStackTrace(this,i)}}static cause(e){return He(e),e._cause&&dt(e._cause)?e._cause:null}static fullStack(e){He(e);const t=ie.cause(e);return t?`${e.stack}
|
|
8
|
+
caused by: ${ie.fullStack(t)}`:e.stack??""}static info(e){He(e);const t={},n=ie.cause(e);return n&&Object.assign(t,ie.info(n)),e._info&&Object.assign(t,e._info),t}toString(){let e=this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(e=`${e}: ${this.message}`),e}}var cn=k(47),_e=k.n(cn);const kt="__PATH_SEPARATOR_POSIX__",Ut="__PATH_SEPARATOR_WINDOWS__";function V(r){try{const e=r.replace(/\//g,kt).replace(/\\\\/g,Ut);return encodeURIComponent(e).split(Ut).join("\\\\").split(kt).join("/")}catch(e){throw new ie(e,"Failed encoding path")}}function _t(r){return r.startsWith("/")?r:"/"+r}function $e(r){let e=r;return e[0]!=="/"&&(e="/"+e),/^.+\/$/.test(e)&&(e=e.substr(0,e.length-1)),e}function hn(r){let e=new(ln())(r).pathname;return e.length<=0&&(e="/"),$e(e)}function B(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];return function(){return function(n){var o=[];if(n.length===0)return"";if(typeof n[0]!="string")throw new TypeError("Url must be a string. Received "+n[0]);if(n[0].match(/^[^/:]+:\/*$/)&&n.length>1){var u=n.shift();n[0]=u+n[0]}n[0].match(/^file:\/\/\//)?n[0]=n[0].replace(/^([^/:]+):\/*/,"$1:///"):n[0]=n[0].replace(/^([^/:]+):\/*/,"$1://");for(var l=0;l<n.length;l++){var i=n[l];if(typeof i!="string")throw new TypeError("Url must be a string. Received "+i);i!==""&&(l>0&&(i=i.replace(/^[\/]+/,"")),i=l<n.length-1?i.replace(/[\/]+$/,""):i.replace(/[\/]+$/,"/"),o.push(i))}var h=o.join("/"),a=(h=h.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return a.shift()+(a.length>0?"?":"")+a.join("&")}(typeof arguments[0]=="object"?arguments[0]:[].slice.call(arguments))}(e.reduce((n,o,u)=>((u===0||o!=="/"||o==="/"&&n[n.length-1]!=="/")&&n.push(o),n),[]))}var fn=k(542),Oe=k.n(fn);const pn="abcdef0123456789";function Mt(r,e){const t=r.url.replace("//",""),n=t.indexOf("/")==-1?"/":t.slice(t.indexOf("/")),o=r.method?r.method.toUpperCase():"GET",u=!!/(^|,)\s*auth\s*($|,)/.test(e.qop)&&"auth",l=`00000000${e.nc}`.slice(-8),i=function(c,d,m,g,w,y,p){const v=p||Oe()(`${d}:${m}:${g}`);return c&&c.toLowerCase()==="md5-sess"?Oe()(`${v}:${w}:${y}`):v}(e.algorithm,e.username,e.realm,e.password,e.nonce,e.cnonce,e.ha1),h=Oe()(`${o}:${n}`),a=u?Oe()(`${i}:${e.nonce}:${l}:${e.cnonce}:${u}:${h}`):Oe()(`${i}:${e.nonce}:${h}`),s={username:e.username,realm:e.realm,nonce:e.nonce,uri:n,qop:u,response:a,nc:l,cnonce:e.cnonce,algorithm:e.algorithm,opaque:e.opaque},f=[];for(const c in s)s[c]&&(c==="qop"||c==="nc"||c==="algorithm"?f.push(`${c}=${s[c]}`):f.push(`${c}="${s[c]}"`));return`Digest ${f.join(", ")}`}function br(r){return(r.headers&&r.headers.get("www-authenticate")||"").split(/\s/)[0].toLowerCase()==="digest"}var gn=k(101),yr=k.n(gn);function Vt(r){return yr().decode(r)}function Bt(r,e){var t;return`Basic ${t=`${r}:${e}`,yr().encode(t)}`}const Me=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:typeof window<"u"?window:globalThis,dn=Me.fetch.bind(Me),mn=Me.Request,bn=Me.Response;let ne=function(r){return r.Auto="auto",r.Digest="digest",r.None="none",r.Password="password",r.Token="token",r}({}),de=function(r){return r.DataTypeNoLength="data-type-no-length",r.InvalidAuthType="invalid-auth-type",r.InvalidOutputFormat="invalid-output-format",r.LinkUnsupportedAuthType="link-unsupported-auth",r.InvalidUpdateRange="invalid-update-range",r.NotSupported="not-supported",r}({});function vr(r,e,t,n,o){switch(r.authType){case ne.Auto:e&&t&&(r.headers.Authorization=Bt(e,t));break;case ne.Digest:r.digest=function(l,i,h){return{username:l,password:i,ha1:h,nc:0,algorithm:"md5",hasDigestAuth:!1}}(e,t,o);break;case ne.None:break;case ne.Password:r.headers.Authorization=Bt(e,t);break;case ne.Token:r.headers.Authorization=`${(u=n).token_type} ${u.access_token}`;break;default:throw new ie({info:{code:de.InvalidAuthType}},`Invalid auth type: ${r.authType}`)}var u}k(345),k(800);const qt="@@HOTPATCHER",yn=()=>{};function Ze(r){return{original:r,methods:[r],final:!1}}class vn{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=qt}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(e){this.configuration.getEmptyAction=e}control(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!e||e.__type__!==qt)throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");return Object.keys(e.configuration.registry).forEach(n=>{this.configuration.registry.hasOwnProperty(n)?t&&(this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])):this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])}),e._configuration=this.configuration,this}execute(e){const t=this.get(e)||yn;for(var n=arguments.length,o=new Array(n>1?n-1:0),u=1;u<n;u++)o[u-1]=arguments[u];return t(...o)}get(e){const t=this.configuration.registry[e];if(!t)switch(this.getEmptyAction){case"null":return null;case"throw":throw new Error(`Failed handling method request: No method provided for override: ${e}`);default:throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`)}return function(){for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];if(o.length===0)throw new Error("Failed creating sequence: No functions provided");return function(){for(var l=arguments.length,i=new Array(l),h=0;h<l;h++)i[h]=arguments[h];let a=i;const s=this;for(;o.length>0;)a=[o.shift().apply(s,a)];return a[0]}}(...t.methods)}isPatched(e){return!!this.configuration.registry[e]}patch(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{chain:o=!1}=n;if(this.configuration.registry[e]&&this.configuration.registry[e].final)throw new Error(`Failed patching '${e}': Method marked as being final`);if(typeof t!="function")throw new Error(`Failed patching '${e}': Provided method is not a function`);if(o)this.configuration.registry[e]?this.configuration.registry[e].methods.push(t):this.configuration.registry[e]=Ze(t);else if(this.isPatched(e)){const{original:u}=this.configuration.registry[e];this.configuration.registry[e]=Object.assign(Ze(t),{original:u})}else this.configuration.registry[e]=Ze(t);return this}patchInline(e,t){this.isPatched(e)||this.patch(e,t);for(var n=arguments.length,o=new Array(n>2?n-2:0),u=2;u<n;u++)o[u-2]=arguments[u];return this.execute(e,...o)}plugin(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return n.forEach(u=>{this.patch(e,u,{chain:!0})}),this}restore(e){if(!this.isPatched(e))throw new Error(`Failed restoring method: No method present for key: ${e}`);if(typeof this.configuration.registry[e].original!="function")throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${e}`);return this.configuration.registry[e].methods=[this.configuration.registry[e].original],this}setFinal(e){if(!this.configuration.registry.hasOwnProperty(e))throw new Error(`Failed marking '${e}' as final: No method found for key`);return this.configuration.registry[e].final=!0,this}}let Ye=null;function wr(){return Ye||(Ye=new vn),Ye}function Ve(r){return function(e){if(typeof e!="object"||e===null||Object.prototype.toString.call(e)!="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(r)?Object.assign({},r):Object.setPrototypeOf(Object.assign({},r),Object.getPrototypeOf(r))}function Wt(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];let n=null,o=[...e];for(;o.length>0;){const u=o.shift();n=n?Nr(n,u):Ve(u)}return n}function Nr(r,e){const t=Ve(r);return Object.keys(e).forEach(n=>{t.hasOwnProperty(n)?Array.isArray(e[n])?t[n]=Array.isArray(t[n])?[...t[n],...e[n]]:[...e[n]]:typeof e[n]=="object"&&e[n]?t[n]=typeof t[n]=="object"&&t[n]?Nr(t[n],e[n]):Ve(e[n]):t[n]=e[n]:t[n]=e[n]}),t}function wn(r){const e={};for(const t of r.keys())e[t]=r.get(t);return e}function mt(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(e.length===0)return{};const n={};return e.reduce((o,u)=>(Object.keys(u).forEach(l=>{const i=l.toLowerCase();n.hasOwnProperty(i)?o[n[i]]=u[l]:(n[i]=l,o[l]=u[l])}),o),{})}k(805);const Nn=typeof ArrayBuffer=="function",{toString:xn}=Object.prototype;function xr(r){return Nn&&(r instanceof ArrayBuffer||xn.call(r)==="[object ArrayBuffer]")}function Pr(r){return r!=null&&r.constructor!=null&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function Pt(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}function bt(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const Er=Pt(function(r){const e=r._digest;return delete r._digest,e.hasDigestAuth&&(r=Wt(r,{headers:{Authorization:Mt(r,e)}})),bt(Be(r),function(t){let n=!1;return o=function(l){return n?l:t},(u=function(){if(t.status==401)return e.hasDigestAuth=function(l,i){if(!br(l))return!1;const h=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){const a=l.headers&&l.headers.get("www-authenticate")||"",s=h.exec(a);if(!s)break;i[s[1]]=s[2]||s[3]}return i.nc+=1,i.cnonce=function(){let a="";for(let s=0;s<32;++s)a=`${a}${pn[Math.floor(16*Math.random())]}`;return a}(),!0}(t,e),function(){if(e.hasDigestAuth)return bt(Be(r=Wt(r,{headers:{Authorization:Mt(r,e)}})),function(l){return l.status==401?e.hasDigestAuth=!1:e.nc++,n=!0,l})}();e.nc++}())&&u.then?u.then(o):o(u);var o,u})}),Pn=Pt(function(r,e){return bt(Be(r),function(t){return t.ok?(e.authType=ne.Password,t):t.status==401&&br(t)?(e.authType=ne.Digest,vr(e,e.username,e.password,void 0,void 0),r._digest=e.digest,Er(r)):t})}),H=Pt(function(r,e){return e.authType===ne.Auto?Pn(r,e):r._digest?Er(r):Be(r)});function Z(r,e,t){const n=Ve(r);return n.headers=mt(e.headers,n.headers||{},t.headers||{}),t.data!==void 0&&(n.data=t.data),t.signal&&(n.signal=t.signal),e.httpAgent&&(n.httpAgent=e.httpAgent),e.httpsAgent&&(n.httpsAgent=e.httpsAgent),e.digest&&(n._digest=e.digest),typeof e.withCredentials=="boolean"&&(n.withCredentials=e.withCredentials),n}function Be(r){const e=wr();return e.patchInline("request",t=>e.patchInline("fetch",dn,t.url,function(n){let o={};const u={method:n.method};if(n.headers&&(o=mt(o,n.headers)),n.data!==void 0){const[l,i]=function(h){if(typeof h=="string")return[h,{}];if(Pr(h))return[h,{}];if(xr(h))return[h,{}];if(h&&typeof h=="object")return[JSON.stringify(h),{"content-type":"application/json"}];throw new Error("Unable to convert request body: Unexpected body type: "+typeof h)}(n.data);u.body=l,o=mt(o,i)}return n.signal&&(u.signal=n.signal),n.withCredentials&&(u.credentials="include"),u.headers=o,u}(t)),r)}var En=k(285);const qe=r=>{if(typeof r!="string")throw new TypeError("invalid pattern");if(r.length>65536)throw new TypeError("pattern is too long")},An={"[: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]},Ce=r=>r.replace(/[[\]\\-]/g,"\\$&"),Xt=r=>r.join(""),Tn=(r,e)=>{const t=e;if(r.charAt(t)!=="[")throw new Error("not in a brace expression");const n=[],o=[];let u=t+1,l=!1,i=!1,h=!1,a=!1,s=t,f="";e:for(;u<r.length;){const g=r.charAt(u);if(g!=="!"&&g!=="^"||u!==t+1){if(g==="]"&&l&&!h){s=u+1;break}if(l=!0,g!=="\\"||h){if(g==="["&&!h){for(const[w,[y,p,v]]of Object.entries(An))if(r.startsWith(w,u)){if(f)return["$.",!1,r.length-t,!0];u+=w.length,v?o.push(y):n.push(y),i=i||p;continue e}}h=!1,f?(g>f?n.push(Ce(f)+"-"+Ce(g)):g===f&&n.push(Ce(g)),f="",u++):r.startsWith("-]",u+1)?(n.push(Ce(g+"-")),u+=2):r.startsWith("-",u+1)?(f=g,u+=2):(n.push(Ce(g)),u++)}else h=!0,u++}else a=!0,u++}if(s<u)return["",!1,0,!1];if(!n.length&&!o.length)return["$.",!1,r.length-t,!0];if(o.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!a)return[(c=n[0].length===2?n[0].slice(-1):n[0],c.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,s-t,!1];var c;const d="["+(a?"^":"")+Xt(n)+"]",m="["+(a?"":"^")+Xt(o)+"]";return[n.length&&o.length?"("+d+"|"+m+")":n.length?d:m,i,s-t,!0]},Se=function(r){let{windowsPathsNoEscape:e=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e?r.replace(/\[([^\/\\])\]/g,"$1"):r.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")},On=new Set(["!","?","+","*","@"]),Gt=r=>On.has(r),Ke="(?!\\.)",Cn=new Set(["[","."]),In=new Set(["..","."]),Sn=new Set("().*{}+?[]^$\\!"),Et="[^/]",zt=Et+"*?",Jt=Et+"+?";var J,K,pe,M,z,be,Ne,ye,he,xe,je,Pe,Ar,ve,Ue,yt,Tr;const re=class re{constructor(e,t){oe(this,Pe);U(this,"type");oe(this,J);oe(this,K);oe(this,pe,!1);oe(this,M,[]);oe(this,z);oe(this,be);oe(this,Ne);oe(this,ye,!1);oe(this,he);oe(this,xe);oe(this,je,!1);let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.type=e,e&&X(this,K,!0),X(this,z,t),X(this,J,S(this,z)?S(S(this,z),J):this),X(this,he,S(this,J)===this?n:S(S(this,J),he)),X(this,Ne,S(this,J)===this?[]:S(S(this,J),Ne)),e!=="!"||S(S(this,J),ye)||S(this,Ne).push(this),X(this,be,S(this,z)?S(S(this,z),M).length:0)}get hasMagic(){if(S(this,K)!==void 0)return S(this,K);for(const e of S(this,M))if(typeof e!="string"&&(e.type||e.hasMagic))return X(this,K,!0);return S(this,K)}toString(){return S(this,xe)!==void 0?S(this,xe):this.type?X(this,xe,this.type+"("+S(this,M).map(e=>String(e)).join("|")+")"):X(this,xe,S(this,M).map(e=>String(e)).join(""))}push(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(const o of t)if(o!==""){if(typeof o!="string"&&!(o instanceof re&&S(o,z)===this))throw new Error("invalid part: "+o);S(this,M).push(o)}}toJSON(){var t;const e=this.type===null?S(this,M).slice().map(n=>typeof n=="string"?n:n.toJSON()):[this.type,...S(this,M).map(n=>n.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===S(this,J)||S(S(this,J),ye)&&((t=S(this,z))==null?void 0:t.type)==="!")&&e.push({}),e}isStart(){var t;if(S(this,J)===this)return!0;if(!((t=S(this,z))!=null&&t.isStart()))return!1;if(S(this,be)===0)return!0;const e=S(this,z);for(let n=0;n<S(this,be);n++){const o=S(e,M)[n];if(!(o instanceof re&&o.type==="!"))return!1}return!0}isEnd(){var t,n,o;if(S(this,J)===this||((t=S(this,z))==null?void 0:t.type)==="!")return!0;if(!((n=S(this,z))!=null&&n.isEnd()))return!1;if(!this.type)return(o=S(this,z))==null?void 0:o.isEnd();const e=S(this,z)?S(S(this,z),M).length:0;return S(this,be)===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){const t=new re(this.type,e);for(const n of S(this,M))t.copyIn(n);return t}static fromGlob(e){var o;let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=new re(null,void 0,t);return me(o=re,ve,Ue).call(o,e,n,0,t),n}toMMPattern(){if(this!==S(this,J))return S(this,J).toMMPattern();const e=this.toString(),[t,n,o,u]=this.toRegExpSource();if(!(o||S(this,K)||S(this,he).nocase&&!S(this,he).nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;const l=(S(this,he).nocase?"i":"")+(u?"u":"");return Object.assign(new RegExp(`^${t}$`,l),{_src:t,_glob:e})}get options(){return S(this,he)}toRegExpSource(e){var h;const t=e??!!S(this,he).dot;if(S(this,J)===this&&me(this,Pe,Ar).call(this),!this.type){const a=this.isStart()&&this.isEnd(),s=S(this,M).map(d=>{var p;const[m,g,w,y]=typeof d=="string"?me(p=re,ve,Tr).call(p,d,S(this,K),a):d.toRegExpSource(e);return X(this,K,S(this,K)||w),X(this,pe,S(this,pe)||y),m}).join("");let f="";if(this.isStart()&&typeof S(this,M)[0]=="string"&&(S(this,M).length!==1||!In.has(S(this,M)[0]))){const d=Cn,m=t&&d.has(s.charAt(0))||s.startsWith("\\.")&&d.has(s.charAt(2))||s.startsWith("\\.\\.")&&d.has(s.charAt(4)),g=!t&&!e&&d.has(s.charAt(0));f=m?"(?!(?:^|/)\\.\\.?(?:$|/))":g?Ke:""}let c="";return this.isEnd()&&S(S(this,J),ye)&&((h=S(this,z))==null?void 0:h.type)==="!"&&(c="(?:$|\\/)"),[f+s+c,Se(s),X(this,K,!!S(this,K)),S(this,pe)]}const n=this.type==="*"||this.type==="+",o=this.type==="!"?"(?:(?!(?:":"(?:";let u=me(this,Pe,yt).call(this,t);if(this.isStart()&&this.isEnd()&&!u&&this.type!=="!"){const a=this.toString();return X(this,M,[a]),this.type=null,X(this,K,void 0),[a,Se(this.toString()),!1,!1]}let l=!n||e||t?"":me(this,Pe,yt).call(this,!0);l===u&&(l=""),l&&(u=`(?:${u})(?:${l})*?`);let i="";return i=this.type==="!"&&S(this,je)?(this.isStart()&&!t?Ke:"")+Jt:o+u+(this.type==="!"?"))"+(!this.isStart()||t||e?"":Ke)+zt+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&l?")":this.type==="*"&&l?")?":`)${this.type}`),[i,Se(u),X(this,K,!!S(this,K)),S(this,pe)]}};J=new WeakMap,K=new WeakMap,pe=new WeakMap,M=new WeakMap,z=new WeakMap,be=new WeakMap,Ne=new WeakMap,ye=new WeakMap,he=new WeakMap,xe=new WeakMap,je=new WeakMap,Pe=new WeakSet,Ar=function(){if(this!==S(this,J))throw new Error("should only call on root");if(S(this,ye))return this;let e;for(this.toString(),X(this,ye,!0);e=S(this,Ne).pop();){if(e.type!=="!")continue;let t=e,n=S(t,z);for(;n;){for(let o=S(t,be)+1;!n.type&&o<S(n,M).length;o++)for(const u of S(e,M)){if(typeof u=="string")throw new Error("string part in extglob AST??");u.copyIn(S(n,M)[o])}t=n,n=S(t,z)}}return this},ve=new WeakSet,Ue=function(e,t,n,o){var d,m;let u=!1,l=!1,i=-1,h=!1;if(t.type===null){let g=n,w="";for(;g<e.length;){const y=e.charAt(g++);if(u||y==="\\")u=!u,w+=y;else if(l)g===i+1?y!=="^"&&y!=="!"||(h=!0):y!=="]"||g===i+2&&h||(l=!1),w+=y;else if(y!=="[")if(o.noext||!Gt(y)||e.charAt(g)!=="(")w+=y;else{t.push(w),w="";const p=new re(y,t);g=me(d=re,ve,Ue).call(d,e,p,g,o),t.push(p)}else l=!0,i=g,h=!1,w+=y}return t.push(w),g}let a=n+1,s=new re(null,t);const f=[];let c="";for(;a<e.length;){const g=e.charAt(a++);if(u||g==="\\")u=!u,c+=g;else if(l)a===i+1?g!=="^"&&g!=="!"||(h=!0):g!=="]"||a===i+2&&h||(l=!1),c+=g;else if(g!=="[")if(Gt(g)&&e.charAt(a)==="("){s.push(c),c="";const w=new re(g,s);s.push(w),a=me(m=re,ve,Ue).call(m,e,w,a,o)}else if(g!=="|"){if(g===")")return c===""&&S(t,M).length===0&&X(t,je,!0),s.push(c),c="",t.push(...f,s),a;c+=g}else s.push(c),c="",f.push(s),s=new re(null,t);else l=!0,i=a,h=!1,c+=g}return t.type=null,X(t,K,void 0),X(t,M,[e.substring(n-1)]),a},yt=function(e){return S(this,M).map(t=>{if(typeof t=="string")throw new Error("string type in extglob ast??");const[n,o,u,l]=t.toRegExpSource(e);return X(this,pe,S(this,pe)||l),n}).filter(t=>!(this.isStart()&&this.isEnd()&&!t)).join("|")},Tr=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],o=!1,u="",l=!1;for(let i=0;i<e.length;i++){const h=e.charAt(i);if(o)o=!1,u+=(Sn.has(h)?"\\":"")+h;else if(h!=="\\"){if(h==="["){const[a,s,f,c]=Tn(e,i);if(f){u+=a,l=l||s,i+=f-1,t=t||c;continue}}h!=="*"?h!=="?"?u+=h.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(u+=Et,t=!0):(u+=n&&e==="*"?Jt:zt,t=!0)}else i===e.length-1?u+="\\\\":o=!0}return[u,Se(e),!!t,l]},oe(re,ve);let We=re;const te=function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return qe(e),!(!t.nocomment&&e.charAt(0)==="#")&&new Xe(e,t).match(r)},Fn=/^\*+([^+@!?\*\[\(]*)$/,$n=r=>e=>!e.startsWith(".")&&e.endsWith(r),jn=r=>e=>e.endsWith(r),Rn=r=>(r=r.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(r)),Ln=r=>(r=r.toLowerCase(),e=>e.toLowerCase().endsWith(r)),kn=/^\*+\.\*+$/,Un=r=>!r.startsWith(".")&&r.includes("."),_n=r=>r!=="."&&r!==".."&&r.includes("."),Mn=/^\.\*+$/,Vn=r=>r!=="."&&r!==".."&&r.startsWith("."),Bn=/^\*+$/,qn=r=>r.length!==0&&!r.startsWith("."),Wn=r=>r.length!==0&&r!=="."&&r!=="..",Xn=/^\?+([^+@!?\*\[\(]*)?$/,Gn=r=>{let[e,t=""]=r;const n=Or([e]);return t?(t=t.toLowerCase(),o=>n(o)&&o.toLowerCase().endsWith(t)):n},zn=r=>{let[e,t=""]=r;const n=Cr([e]);return t?(t=t.toLowerCase(),o=>n(o)&&o.toLowerCase().endsWith(t)):n},Jn=r=>{let[e,t=""]=r;const n=Cr([e]);return t?o=>n(o)&&o.endsWith(t):n},Hn=r=>{let[e,t=""]=r;const n=Or([e]);return t?o=>n(o)&&o.endsWith(t):n},Or=r=>{let[e]=r;const t=e.length;return n=>n.length===t&&!n.startsWith(".")},Cr=r=>{let[e]=r;const t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},Ir=typeof ce.process$1=="object"&&ce.process$1?typeof ce.process$1.env=="object"&&ce.process$1.env&&ce.process$1.env.__MINIMATCH_TESTING_PLATFORM__||ce.process$1.platform:"posix";te.sep=Ir==="win32"?"\\":"/";const ue=Symbol("globstar **");te.GLOBSTAR=ue,te.filter=function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t=>te(t,r,e)};const ae=function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.assign({},r,e)};te.defaults=r=>{if(!r||typeof r!="object"||!Object.keys(r).length)return te;const e=te;return Object.assign(function(t,n){return e(t,n,ae(r,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))},{Minimatch:class extends e.Minimatch{constructor(t){super(t,ae(r,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}))}static defaults(t){return e.defaults(ae(r,t)).Minimatch}},AST:class extends e.AST{constructor(t,n){super(t,n,ae(r,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}static fromGlob(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.AST.fromGlob(t,ae(r,n))}},unescape:function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.unescape(t,ae(r,n))},escape:function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.escape(t,ae(r,n))},filter:function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.filter(t,ae(r,n))},defaults:t=>e.defaults(ae(r,t)),makeRe:function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.makeRe(t,ae(r,n))},braceExpand:function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.braceExpand(t,ae(r,n))},match:function(t,n){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return e.match(t,n,ae(r,o))},sep:e.sep,GLOBSTAR:ue})};const Sr=function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return qe(r),e.nobrace||!/\{(?:(?!\{).)*\}/.test(r)?[r]:En(r)};te.braceExpand=Sr,te.makeRe=function(r){return new Xe(r,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).makeRe()},te.match=function(r,e){const t=new Xe(e,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{});return r=r.filter(n=>t.match(n)),t.options.nonull&&!r.length&&r.push(e),r};const Ht=/[?*]|[+@!]\(.*?\)|\[|\]/;class Xe{constructor(e){U(this,"options");U(this,"set");U(this,"pattern");U(this,"windowsPathsNoEscape");U(this,"nonegate");U(this,"negate");U(this,"comment");U(this,"empty");U(this,"preserveMultipleSlashes");U(this,"partial");U(this,"globSet");U(this,"globParts");U(this,"nocase");U(this,"isWindows");U(this,"platform");U(this,"windowsNoMagicRoot");U(this,"regexp");let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};qe(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||Ir,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const e of this.set)for(const t of e)if(typeof t!="string")return!0;return!1}debug(){}make(){const e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#")return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=function(){return console.error(...arguments)}),this.debug(this.pattern,this.globSet);const n=this.globSet.map(u=>this.slashSplit(u));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let o=this.globParts.map((u,l,i)=>{if(this.isWindows&&this.windowsNoMagicRoot){const h=!(u[0]!==""||u[1]!==""||u[2]!=="?"&&Ht.test(u[2])||Ht.test(u[3])),a=/^[a-z]:/i.test(u[0]);if(h)return[...u.slice(0,4),...u.slice(4).map(s=>this.parse(s))];if(a)return[u[0],...u.slice(1).map(s=>this.parse(s))]}return u.map(h=>this.parse(h))});if(this.debug(this.pattern,o),this.set=o.filter(u=>u.indexOf(!1)===-1),this.isWindows)for(let u=0;u<this.set.length;u++){const l=this.set[u];l[0]===""&&l[1]===""&&this.globParts[u][2]==="?"&&typeof l[3]=="string"&&/^[a-z]:$/i.test(l[3])&&(l[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let n=0;n<e.length;n++)for(let o=0;o<e[n].length;o++)e[n][o]==="**"&&(e[n][o]="*");const{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let n=-1;for(;(n=t.indexOf("**",n+1))!==-1;){let o=n;for(;t[o+1]==="**";)o++;o!==n&&t.splice(n,o-n)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((n,o)=>{const u=n[n.length-1];return o==="**"&&u==="**"?n:o===".."&&u&&u!==".."&&u!=="."&&u!=="**"?(n.pop(),n):(n.push(o),n)},[])).length===0?[""]:t)}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let o=1;o<e.length-1;o++){const u=e[o];o===1&&u===""&&e[0]===""||u!=="."&&u!==""||(t=!0,e.splice(o,1),o--)}e[0]!=="."||e.length!==2||e[1]!=="."&&e[1]!==""||(t=!0,e.pop())}let n=0;for(;(n=e.indexOf("..",n+1))!==-1;){const o=e[n-1];o&&o!=="."&&o!==".."&&o!=="**"&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return e.length===0?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let o=-1;for(;(o=n.indexOf("**",o+1))!==-1;){let l=o;for(;n[l+1]==="**";)l++;l>o&&n.splice(o+1,l-o);let i=n[o+1];const h=n[o+2],a=n[o+3];if(i!==".."||!h||h==="."||h===".."||!a||a==="."||a==="..")continue;t=!0,n.splice(o,1);const s=n.slice(0);s[o]="**",e.push(s),o--}if(!this.preserveMultipleSlashes){for(let l=1;l<n.length-1;l++){const i=n[l];l===1&&i===""&&n[0]===""||i!=="."&&i!==""||(t=!0,n.splice(l,1),l--)}n[0]!=="."||n.length!==2||n[1]!=="."&&n[1]!==""||(t=!0,n.pop())}let u=0;for(;(u=n.indexOf("..",u+1))!==-1;){const l=n[u-1];if(l&&l!=="."&&l!==".."&&l!=="**"){t=!0;const i=u===1&&n[u+1]==="**"?["."]:[];n.splice(u-1,2,...i),n.length===0&&n.push(""),u-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){const o=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(o){e[t]=[],e[n]=o;break}}return e.filter(t=>t.length)}partsMatch(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],o=0,u=0,l=[],i="";for(;o<e.length&&u<t.length;)if(e[o]===t[u])l.push(i==="b"?t[u]:e[o]),o++,u++;else if(n&&e[o]==="**"&&t[u]===e[o+1])l.push(e[o]),o++;else if(n&&t[u]==="**"&&e[o]===t[u+1])l.push(t[u]),u++;else if(e[o]!=="*"||!t[u]||!this.options.dot&&t[u].startsWith(".")||t[u]==="**"){if(t[u]!=="*"||!e[o]||!this.options.dot&&e[o].startsWith(".")||e[o]==="**"||i==="a")return!1;i="b",l.push(t[u]),o++,u++}else{if(i==="b")return!1;i="a",l.push(e[o]),o++,u++}return e.length===t.length&&l}parseNegate(){if(this.nonegate)return;const e=this.pattern;let t=!1,n=0;for(let o=0;o<e.length&&e.charAt(o)==="!";o++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const o=this.options;if(this.isWindows){const g=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),w=!g&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),y=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),p=w?3:g?0:void 0,v=!y&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3])?3:y?0:void 0;if(typeof p=="number"&&typeof v=="number"){const[A,N]=[e[p],t[v]];A.toLowerCase()===N.toLowerCase()&&(t[v]=A,v>p?t=t.slice(v):p>v&&(e=e.slice(p)))}}const{optimizationLevel:u=1}=this.options;u>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var l=0,i=0,h=e.length,a=t.length;l<h&&i<a;l++,i++){this.debug("matchOne loop");var s=t[i],f=e[l];if(this.debug(t,s,f),s===!1)return!1;if(s===ue){this.debug("GLOBSTAR",[t,s,f]);var c=l,d=i+1;if(d===a){for(this.debug("** at the end");l<h;l++)if(e[l]==="."||e[l]===".."||!o.dot&&e[l].charAt(0)===".")return!1;return!0}for(;c<h;){var m=e[c];if(this.debug(`
|
|
9
|
+
globstar while`,e,c,t,d,m),this.matchOne(e.slice(c),t.slice(d),n))return this.debug("globstar found match!",c,h,m),!0;if(m==="."||m===".."||!o.dot&&m.charAt(0)==="."){this.debug("dot detected!",e,c,t,d);break}this.debug("globstar swallow a segment, and continue"),c++}return!(!n||(this.debug(`
|
|
10
|
+
>>> no match, partial?`,e,c,t,d),c!==h))}let g;if(typeof s=="string"?(g=f===s,this.debug("string match",s,f,g)):(g=s.test(f),this.debug("pattern match",s,f,g)),!g)return!1}if(l===h&&i===a)return!0;if(l===h)return n;if(i===a)return l===h-1&&e[l]==="";throw new Error("wtf?")}braceExpand(){return Sr(this.pattern,this.options)}parse(e){qe(e);const t=this.options;if(e==="**")return ue;if(e==="")return"";let n,o=null;(n=e.match(Bn))?o=t.dot?Wn:qn:(n=e.match(Fn))?o=(t.nocase?t.dot?Ln:Rn:t.dot?jn:$n)(n[1]):(n=e.match(Xn))?o=(t.nocase?t.dot?zn:Gn:t.dot?Jn:Hn)(n):(n=e.match(kn))?o=t.dot?_n:Un:(n=e.match(Mn))&&(o=Vn);const u=We.fromGlob(e,this.options).toMMPattern();return o&&typeof u=="object"&&Reflect.defineProperty(u,"test",{value:o}),u}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const t=this.options,n=t.noglobstar?"[^/]*?":t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",o=new Set(t.nocase?["i"]:[]);let u=e.map(h=>{const a=h.map(s=>{if(s instanceof RegExp)for(const f of s.flags.split(""))o.add(f);return typeof s=="string"?s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):s===ue?ue:s._src});return a.forEach((s,f)=>{const c=a[f+1],d=a[f-1];s===ue&&d!==ue&&(d===void 0?c!==void 0&&c!==ue?a[f+1]="(?:\\/|"+n+"\\/)?"+c:a[f]=n:c===void 0?a[f-1]=d+"(?:\\/|"+n+")?":c!==ue&&(a[f-1]=d+"(?:\\/|\\/"+n+"\\/)"+c,a[f+1]=ue))}),a.filter(s=>s!==ue).join("/")}).join("|");const[l,i]=e.length>1?["(?:",")"]:["",""];u="^"+l+u+i+"$",this.negate&&(u="^(?!"+u+").+$");try{this.regexp=new RegExp(u,[...o].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.partial;if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;const n=this.options;this.isWindows&&(e=e.split("\\").join("/"));const o=this.slashSplit(e);this.debug(this.pattern,"split",o);const u=this.set;this.debug(this.pattern,"set",u);let l=o[o.length-1];if(!l)for(let i=o.length-2;!l&&i>=0;i--)l=o[i];for(let i=0;i<u.length;i++){const h=u[i];let a=o;if(n.matchBase&&h.length===1&&(a=[l]),this.matchOne(a,h,t))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(e){return te.defaults(e).Minimatch}}function At(r){const e=new Error(`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:""}Invalid response: ${r.status} ${r.statusText}`);return e.status=r.status,e.response=r,e}function Y(r,e){const{status:t}=e;if(t===401&&r.digest)return e;if(t>=400)throw At(e);return e}function Ee(r,e){return arguments.length>2&&arguments[2]!==void 0&&arguments[2]?{data:e,headers:r.headers?wn(r.headers):{},status:r.status,statusText:r.statusText}:e}te.AST=We,te.Minimatch=Xe,te.escape=function(r){let{windowsPathsNoEscape:e=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e?r.replace(/[?*()[\]]/g,"[$&]"):r.replace(/[?*()[\]\\]/g,"\\$&")},te.unescape=Se;const Zn=(Zt=function(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=Z({url:B(r.remoteURL,V(e)),method:"COPY",headers:{Destination:B(r.remoteURL,V(t)),Overwrite:n.overwrite===!1?"F":"T",Depth:n.shallow?"0":"infinity"}},r,n);return l=function(i){Y(r,i)},(u=H(o,r))&&u.then||(u=Promise.resolve(u)),l?u.then(l):u;var u,l},function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];try{return Promise.resolve(Zt.apply(this,r))}catch(t){return Promise.reject(t)}});var Zt,Tt=k(635),Yn=k(829),fe=k.n(Yn),Ae=function(r){return r.Array="array",r.Object="object",r.Original="original",r}(Ae||{});function Le(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ae.Original;const n=fe().get(r,e);return t==="array"&&Array.isArray(n)===!1?[n]:t==="object"&&Array.isArray(n)?n[0]:n}function Re(r){return new Promise(e=>{e(function(t){const{multistatus:n}=t;if(n==="")return{multistatus:{response:[]}};if(!n)throw new Error("Invalid response: No root multistatus found");const o={multistatus:Array.isArray(n)?n[0]:n};return fe().set(o,"multistatus.response",Le(o,"multistatus.response",Ae.Array)),fe().set(o,"multistatus.response",fe().get(o,"multistatus.response").map(u=>function(l){const i=Object.assign({},l);return i.status?fe().set(i,"status",Le(i,"status",Ae.Object)):(fe().set(i,"propstat",Le(i,"propstat",Ae.Object)),fe().set(i,"propstat.prop",Le(i,"propstat.prop",Ae.Object))),i}(u))),o}(new Tt.XMLParser({allowBooleanAttributes:!0,attributeNamePrefix:"",textNodeName:"text",ignoreAttributes:!1,removeNSPrefix:!0,numberParseOptions:{hex:!0,leadingZeros:!1},attributeValueProcessor:(t,n,o)=>n==="true"||n==="false"?n==="true":n,tagValueProcessor(t,n,o){if(!o.endsWith("propstat.prop.displayname"))return n}}).parse(r)))})}function ze(r,e){let t=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const{getlastmodified:n=null,getcontentlength:o="0",resourcetype:u=null,getcontenttype:l=null,getetag:i=null}=r,h=u&&typeof u=="object"&&u.collection!==void 0?"directory":"file",a={filename:e,basename:_e().basename(e),lastmod:n,size:parseInt(o,10),type:h,etag:typeof i=="string"?i.replace(/"/g,""):null};return h==="file"&&(a.mime=l&&typeof l=="string"?l.split(";")[0]:""),t&&(r.displayname!==void 0&&(r.displayname=String(r.displayname)),a.props=r),a}function Fr(r,e){let t=arguments.length>2&&arguments[2]!==void 0&&arguments[2],n=null;try{r.multistatus.response[0].propstat&&(n=r.multistatus.response[0])}catch{}if(!n)throw new Error("Failed getting item stat: bad response");const{propstat:{prop:o,status:u}}=n,[l,i,h]=u.split(" ",3),a=parseInt(i,10);if(a>=400){const s=new Error(`Invalid response: ${a} ${h}`);throw s.status=a,s}return ze(o,$e(e),t)}function $r(r){switch(String(r)){case"-3":return"unlimited";case"-2":case"-1":return"unknown";default:return parseInt(String(r),10)}}function Qe(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const Ot=function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}(function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{details:n=!1}=t,o=Z({url:B(r.remoteURL,V(e)),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},r,t);return Qe(H(o,r),function(u){return Y(r,u),Qe(u.text(),function(l){return Qe(Re(l),function(i){const h=Fr(i,e,n);return Ee(u,h,n)})})})});function jr(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const Kn=Rr(function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=function(u){if(!u||u==="/")return[];let l=u;const i=[];do i.push(l),l=_e().dirname(l);while(l&&l!=="/");return i}($e(e));n.sort((u,l)=>u.length>l.length?1:l.length>u.length?-1:0);let o=!1;return function(u,l,i){if(typeof u[Kt]=="function"){let g=function(w){try{for(;!(h=f.next()).done;)if((w=l(h.value))&&w.then){if(!Qt(w))return void w.then(g,s||(s=se.bind(null,a=new Te,2)));w=w.v}a?se(a,1,w):a=w}catch(y){se(a||(a=new Te),2,y)}};var h,a,s,f=u[Kt]();if(g(),f.return){var c=function(w){try{h.done||f.return()}catch{}return w};if(a&&a.then)return a.then(c,function(w){throw c(w)});c()}return a}if(!("length"in u))throw new TypeError("Object is not iterable");for(var d=[],m=0;m<u.length;m++)d.push(u[m]);return function(g,w,y){var p,v,A=-1;return function N(b){try{for(;++A<g.length&&(!y||!y());)if((b=w(A))&&b.then){if(!Qt(b))return void b.then(N,v||(v=se.bind(null,p=new Te,2)));b=b.v}p?se(p,1,b):p=b}catch(E){se(p||(p=new Te),2,E)}}(),p}(d,function(g){return l(d[g])},i)}(n,function(u){return l=function(){return function(h,a){try{var s=jr(Ot(r,u),function(f){if(f.type!=="directory")throw new Error(`Path includes a file: ${e}`)})}catch(f){return a(f)}return s&&s.then?s.then(void 0,a):s}(0,function(h){const a=h;return function(){if(a.status===404)return o=!0,Yt(vt(r,u,{...t,recursive:!1}));throw h}()})},(i=function(){if(o)return Yt(vt(r,u,{...t,recursive:!1}))}())&&i.then?i.then(l):l();var l,i},function(){return!1})});function Rr(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}function Qn(){}function Yt(r,e){return r&&r.then?r.then(Qn):Promise.resolve()}const Kt=typeof Symbol<"u"?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function se(r,e,t){if(!r.s){if(t instanceof Te){if(!t.s)return void(t.o=se.bind(null,r,e));1&e&&(e=t.s),t=t.v}if(t&&t.then)return void t.then(se.bind(null,r,e),se.bind(null,r,2));r.s=e,r.v=t;const n=r.o;n&&n(r)}}const Te=function(){function r(){}return r.prototype.then=function(e,t){const n=new r,o=this.s;if(o){const u=1&o?e:t;if(u){try{se(n,1,u(this.v))}catch(l){se(n,2,l)}return n}return this}return this.o=function(u){try{const l=u.v;1&u.s?se(n,1,e?e(l):l):t?se(n,1,t(l)):se(n,2,l)}catch(l){se(n,2,l)}},n},r}();function Qt(r){return r instanceof Te&&1&r.s}const vt=Rr(function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(t.recursive===!0)return Kn(r,e,t);const n=Z({url:B(r.remoteURL,(o=V(e),o.endsWith("/")?o:o+"/")),method:"MKCOL"},r,t);var o;return jr(H(n,r),function(u){Y(r,u)})});var Dn=k(388),Dt=k.n(Dn);const es=function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}(function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n={};if(typeof t.range=="object"&&typeof t.range.start=="number"){let i=`bytes=${t.range.start}-`;typeof t.range.end=="number"&&(i=`${i}${t.range.end}`),n.Range=i}const o=Z({url:B(r.remoteURL,V(e)),method:"GET",headers:n},r,t);return l=function(i){if(Y(r,i),n.Range&&i.status!==206){const h=new Error(`Invalid response code for partial request: ${i.status}`);throw h.status=i.status,h}return t.callback&&setTimeout(()=>{t.callback(i)},0),i.body},(u=H(o,r))&&u.then||(u=Promise.resolve(u)),l?u.then(l):u;var u,l}),ts=()=>{},rs=function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}(function(r,e,t){t.url||(t.url=B(r.remoteURL,V(e)));const n=Z(t,r,{});return u=function(l){return Y(r,l),l},(o=H(n,r))&&o.then||(o=Promise.resolve(o)),u?o.then(u):o;var o,u}),ns=function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}(function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=Z({url:B(r.remoteURL,V(e)),method:"DELETE"},r,t);return u=function(l){Y(r,l)},(o=H(n,r))&&o.then||(o=Promise.resolve(o)),u?o.then(u):o;var o,u}),ss=function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}(function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function(n,o){try{var u=(l=Ot(r,e,t),i=function(){return!0},h?i?i(l):l:(l&&l.then||(l=Promise.resolve(l)),i?l.then(i):l))}catch(a){return o(a)}var l,i,h;return u&&u.then?u.then(void 0,o):u}(0,function(n){if(n.status===404)return!1;throw n})});function De(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const is=function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}(function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=Z({url:B(r.remoteURL,V(e),"/"),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:t.deep?"infinity":"1"}},r,t);return De(H(n,r),function(o){return Y(r,o),De(o.text(),function(u){if(!u)throw new Error("Failed parsing directory contents: Empty response");return De(Re(u),function(l){const i=_t(e);let h=function(a,s,f){let c=arguments.length>3&&arguments[3]!==void 0&&arguments[3],d=arguments.length>4&&arguments[4]!==void 0&&arguments[4];const m=_e().join(s,"/"),{multistatus:{response:g}}=a,w=g.map(y=>{const p=function(A){try{return A.replace(/^https?:\/\/[^\/]+/,"")}catch(N){throw new ie(N,"Failed normalising HREF")}}(y.href),{propstat:{prop:v}}=y;return ze(v,m==="/"?decodeURIComponent($e(p)):$e(_e().relative(decodeURIComponent(m),decodeURIComponent(p))),c)});return d?w:w.filter(y=>y.basename&&(y.type==="file"||y.filename!==f.replace(/\/$/,"")))}(l,_t(r.remoteBasePath||r.remotePath),i,t.details,t.includeSelf);return t.glob&&(h=function(a,s){return a.filter(f=>te(f.filename,s,{matchBase:!0}))}(h,t.glob)),Ee(o,h,t.details)})})})});function Ct(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}const os=Ct(function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=Z({url:B(r.remoteURL,V(e)),method:"GET",headers:{Accept:"text/plain"},transformResponse:[ls]},r,t);return Ge(H(n,r),function(o){return Y(r,o),Ge(o.text(),function(u){return Ee(o,u,t.details)})})});function Ge(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const as=Ct(function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=Z({url:B(r.remoteURL,V(e)),method:"GET"},r,t);return Ge(H(n,r),function(o){let u;return Y(r,o),function(l,i){var h=l();return h&&h.then?h.then(i):i()}(function(){return Ge(o.arrayBuffer(),function(l){u=l})},function(){return Ee(o,u,t.details)})})}),us=Ct(function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{format:n="binary"}=t;if(n!=="binary"&&n!=="text")throw new ie({info:{code:de.InvalidOutputFormat}},`Invalid output format: ${n}`);return n==="text"?os(r,e,t):as(r,e,t)}),ls=r=>r;function cs(r){return new Tt.XMLBuilder({attributeNamePrefix:"@_",format:!0,ignoreAttributes:!1,suppressEmptyNode:!0}).build(Lr({lockinfo:{"@_xmlns:d":"DAV:",lockscope:{exclusive:{}},locktype:{write:{}},owner:{href:r}}},"d"))}function Lr(r,e){const t={...r};for(const n in t)t.hasOwnProperty(n)&&(t[n]&&typeof t[n]=="object"&&n.indexOf(":")===-1?(t[`${e}:${n}`]=Lr(t[n],e),delete t[n]):/^@_/.test(n)===!1&&(t[`${e}:${n}`]=t[n],delete t[n]));return t}function wt(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}function kr(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}const hs=kr(function(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=Z({url:B(r.remoteURL,V(e)),method:"UNLOCK",headers:{"Lock-Token":t}},r,n);return wt(H(o,r),function(u){if(Y(r,u),u.status!==204&&u.status!==200)throw At(u)})}),fs=kr(function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{refreshToken:n,timeout:o=ps}=t,u={Accept:"text/plain,application/xml",Timeout:o};n&&(u.If=n);const l=Z({url:B(r.remoteURL,V(e)),method:"LOCK",headers:u,data:cs(r.contactHref)},r,t);return wt(H(l,r),function(i){return Y(r,i),wt(i.text(),function(h){const a=(c=h,new Tt.XMLParser({removeNSPrefix:!0,parseAttributeValue:!0,parseTagValue:!0}).parse(c)),s=fe().get(a,"prop.lockdiscovery.activelock.locktoken.href"),f=fe().get(a,"prop.lockdiscovery.activelock.timeout");var c;if(!s)throw At(i,"No lock token received: ");return{token:s,serverTimeout:f}})})}),ps="Infinite, Second-4100000000";function et(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const gs=function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}(function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const t=e.path||"/",n=Z({url:B(r.remoteURL,t),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},r,e);return et(H(n,r),function(o){return Y(r,o),et(o.text(),function(u){return et(Re(u),function(l){const i=function(h){try{const[a]=h.multistatus.response,{propstat:{prop:{"quota-used-bytes":s,"quota-available-bytes":f}}}=a;return s!==void 0&&f!==void 0?{used:parseInt(String(s),10),available:$r(f)}:null}catch{}return null}(l);return Ee(o,i,e.details)})})})});function tt(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const ds=function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}(function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{details:n=!1}=t,o=Z({url:B(r.remoteURL,V(e)),method:"SEARCH",headers:{Accept:"text/plain,application/xml","Content-Type":r.headers["Content-Type"]||"application/xml; charset=utf-8"}},r,t);return tt(H(o,r),function(u){return Y(r,u),tt(u.text(),function(l){return tt(Re(l),function(i){const h=function(a,s,f){const c={truncated:!1,results:[]};return c.truncated=a.multistatus.response.some(d=>{var m,g;return((g=(d.status||((m=d.propstat)==null?void 0:m.status)).split(" ",3))==null?void 0:g[1])==="507"&&d.href.replace(/\/$/,"").endsWith(V(s).replace(/\/$/,""))}),a.multistatus.response.forEach(d=>{if(d.propstat===void 0)return;const m=d.href.split("/").map(decodeURIComponent).join("/");c.results.push(ze(d.propstat.prop,m,f))}),c}(i,e,n);return Ee(u,h,n)})})})}),ms=function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}(function(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=Z({url:B(r.remoteURL,V(e)),method:"MOVE",headers:{Destination:B(r.remoteURL,V(t)),Overwrite:n.overwrite===!1?"F":"T"}},r,n);return l=function(i){Y(r,i)},(u=H(o,r))&&u.then||(u=Promise.resolve(u)),l?u.then(l):u;var u,l});var bs=k(172);const ys=function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}(function(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const{contentLength:o=!0,overwrite:u=!0}=n,l={"Content-Type":"application/octet-stream"};o===!1||(l["Content-Length"]=typeof o=="number"?`${o}`:`${function(s){if(xr(s))return s.byteLength;if(Pr(s))return s.length;if(typeof s=="string")return(0,bs.d)(s);throw new ie({info:{code:de.DataTypeNoLength}},"Cannot calculate data length: Invalid type")}(t)}`),u||(l["If-None-Match"]="*");const i=Z({url:B(r.remoteURL,V(e)),method:"PUT",headers:l,data:t},r,n);return a=function(s){try{Y(r,s)}catch(f){const c=f;if(c.status!==412||u)throw c;return!1}return!0},(h=H(i,r))&&h.then||(h=Promise.resolve(h)),a?h.then(a):h;var h,a}),Ur=function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}(function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=Z({url:B(r.remoteURL,V(e)),method:"OPTIONS"},r,t);return u=function(l){try{Y(r,l)}catch(i){throw i}return{compliance:(l.headers.get("DAV")??"").split(",").map(i=>i.trim()),server:l.headers.get("Server")??""}},(o=H(n,r))&&o.then||(o=Promise.resolve(o)),u?o.then(u):o;var o,u});function Fe(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const vs=It(function(r,e,t,n,o){let u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(t>n||t<0)throw new ie({info:{code:de.InvalidUpdateRange}},`Invalid update range ${t} for partial update`);const l={"Content-Type":"application/octet-stream","Content-Length":""+(n-t+1),"Content-Range":`bytes ${t}-${n}/*`},i=Z({url:B(r.remoteURL,V(e)),method:"PUT",headers:l,data:o},r,u);return Fe(H(i,r),function(h){Y(r,h)})});function er(r,e){var t=r();return t&&t.then?t.then(e):e(t)}const ws=It(function(r,e,t,n,o){let u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(t>n||t<0)throw new ie({info:{code:de.InvalidUpdateRange}},`Invalid update range ${t} for partial update`);const l={"Content-Type":"application/x-sabredav-partialupdate","Content-Length":""+(n-t+1),"X-Update-Range":`bytes=${t}-${n}`},i=Z({url:B(r.remoteURL,V(e)),method:"PATCH",headers:l,data:o},r,u);return Fe(H(i,r),function(h){Y(r,h)})});function It(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(n){return Promise.reject(n)}}}const Ns=It(function(r,e,t,n,o){let u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};return Fe(Ur(r,e,u),function(l){let i=!1;return er(function(){if(l.compliance.includes("sabredav-partialupdate"))return Fe(ws(r,e,t,n,o,u),function(h){return i=!0,h})},function(h){let a=!1;return i?h:er(function(){if(l.server.includes("Apache")&&l.compliance.includes("<http://apache.org/dav/propset/fs/1>"))return Fe(vs(r,e,t,n,o,u),function(s){return a=!0,s})},function(s){if(a)return s;throw new ie({info:{code:de.NotSupported}},"Not supported")})})})}),xs="https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";function Ps(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{authType:t=null,remoteBasePath:n,contactHref:o=xs,ha1:u,headers:l={},httpAgent:i,httpsAgent:h,password:a,token:s,username:f,withCredentials:c}=e;let d=t;d||(d=f||a?ne.Password:ne.None);const m={authType:d,remoteBasePath:n,contactHref:o,ha1:u,headers:Object.assign({},l),httpAgent:i,httpsAgent:h,password:a,remotePath:hn(r),remoteURL:r,token:s,username:f,withCredentials:c};return vr(m,f,a,s,u),{copyFile:(g,w,y)=>Zn(m,g,w,y),createDirectory:(g,w)=>vt(m,g,w),createReadStream:(g,w)=>function(y,p){let v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const A=new(Dt()).PassThrough;return es(y,p,v).then(N=>{N.pipe(A)}).catch(N=>{A.emit("error",N)}),A}(m,g,w),createWriteStream:(g,w,y)=>function(p,v){let A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},N=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ts;const b=new(Dt()).PassThrough,E={};A.overwrite===!1&&(E["If-None-Match"]="*");const x=Z({url:B(p.remoteURL,V(v)),method:"PUT",headers:E,data:b,maxRedirects:0},p,A);return H(x,p).then(T=>Y(p,T)).then(T=>{setTimeout(()=>{N(T)},0)}).catch(T=>{b.emit("error",T)}),b}(m,g,w,y),customRequest:(g,w)=>rs(m,g,w),deleteFile:(g,w)=>ns(m,g,w),exists:(g,w)=>ss(m,g,w),getDirectoryContents:(g,w)=>is(m,g,w),getFileContents:(g,w)=>us(m,g,w),getFileDownloadLink:g=>function(w,y){let p=B(w.remoteURL,V(y));const v=/^https:/i.test(p)?"https":"http";switch(w.authType){case ne.None:break;case ne.Password:{const A=Vt(w.headers.Authorization.replace(/^Basic /i,"").trim());p=p.replace(/^https?:\/\//,`${v}://${A}@`);break}default:throw new ie({info:{code:de.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${w.authType}`)}return p}(m,g),getFileUploadLink:g=>function(w,y){let p=`${B(w.remoteURL,V(y))}?Content-Type=application/octet-stream`;const v=/^https:/i.test(p)?"https":"http";switch(w.authType){case ne.None:break;case ne.Password:{const A=Vt(w.headers.Authorization.replace(/^Basic /i,"").trim());p=p.replace(/^https?:\/\//,`${v}://${A}@`);break}default:throw new ie({info:{code:de.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${w.authType}`)}return p}(m,g),getHeaders:()=>Object.assign({},m.headers),getQuota:g=>gs(m,g),lock:(g,w)=>fs(m,g,w),moveFile:(g,w,y)=>ms(m,g,w,y),putFileContents:(g,w,y)=>ys(m,g,w,y),partialUpdateFileContents:(g,w,y,p,v)=>Ns(m,g,w,y,p,v),getDAVCompliance:g=>Ur(m,g),search:(g,w)=>ds(m,g,w),setHeaders:g=>{m.headers=Object.assign({},g)},stat:(g,w)=>Ot(m,g,w),unlock:(g,w,y)=>hs(m,g,w,y)}}le.hT;le.O4;le.Kd;le.YK;var Es=le.UU;le.Gu;le.ky;var As=le.h4,Ts=le.ch;le.hq;le.i5;const D=[];for(let r=0;r<256;++r)D.push((r+256).toString(16).slice(1));function Os(r,e=0){return(D[r[e+0]]+D[r[e+1]]+D[r[e+2]]+D[r[e+3]]+"-"+D[r[e+4]]+D[r[e+5]]+"-"+D[r[e+6]]+D[r[e+7]]+"-"+D[r[e+8]]+D[r[e+9]]+"-"+D[r[e+10]]+D[r[e+11]]+D[r[e+12]]+D[r[e+13]]+D[r[e+14]]+D[r[e+15]]).toLowerCase()}let rt;const Cs=new Uint8Array(16);function Is(){if(!rt){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");rt=crypto.getRandomValues.bind(crypto)}return rt(Cs)}const Ss=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),tr={randomUUID:Ss};function Fs(r,e,t){var o;if(tr.randomUUID&&!r)return tr.randomUUID();r=r||{};const n=r.random??((o=r.rng)==null?void 0:o.call(r))??Is();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Os(n)}var nt={},st={},rr;function St(){return rr||(rr=1,function(r){const e=":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",t=e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",n="["+e+"]["+t+"]*",o=new RegExp("^"+n+"$"),u=function(i,h){const a=[];let s=h.exec(i);for(;s;){const f=[];f.startIndex=h.lastIndex-s[0].length;const c=s.length;for(let d=0;d<c;d++)f.push(s[d]);a.push(f),s=h.exec(i)}return a},l=function(i){const h=o.exec(i);return!(h===null||typeof h>"u")};r.isExist=function(i){return typeof i<"u"},r.isEmptyObject=function(i){return Object.keys(i).length===0},r.merge=function(i,h,a){if(h){const s=Object.keys(h),f=s.length;for(let c=0;c<f;c++)a==="strict"?i[s[c]]=[h[s[c]]]:i[s[c]]=h[s[c]]}},r.getValue=function(i){return r.isExist(i)?i:""},r.isName=l,r.getAllMatches=u,r.nameRegexp=n}(st)),st}var nr;function _r(){if(nr)return nt;nr=1;const r=St(),e={allowBooleanAttributes:!1,unpairedTags:[]};nt.validate=function(y,p){p=Object.assign({},e,p);const v=[];let A=!1,N=!1;y[0]==="\uFEFF"&&(y=y.substr(1));for(let b=0;b<y.length;b++)if(y[b]==="<"&&y[b+1]==="?"){if(b+=2,b=n(y,b),b.err)return b}else if(y[b]==="<"){let E=b;if(b++,y[b]==="!"){b=o(y,b);continue}else{let x=!1;y[b]==="/"&&(x=!0,b++);let T="";for(;b<y.length&&y[b]!==">"&&y[b]!==" "&&y[b]!==" "&&y[b]!==`
|
|
11
|
+
`&&y[b]!=="\r";b++)T+=y[b];if(T=T.trim(),T[T.length-1]==="/"&&(T=T.substring(0,T.length-1),b--),!m(T)){let C;return T.trim().length===0?C="Invalid space after '<'.":C="Tag '"+T+"' is an invalid name.",c("InvalidTag",C,g(y,b))}const O=i(y,b);if(O===!1)return c("InvalidAttr","Attributes for '"+T+"' have open quote.",g(y,b));let I=O.value;if(b=O.index,I[I.length-1]==="/"){const C=b-I.length;I=I.substring(0,I.length-1);const P=a(I,p);if(P===!0)A=!0;else return c(P.err.code,P.err.msg,g(y,C+P.err.line))}else if(x)if(O.tagClosed){if(I.trim().length>0)return c("InvalidTag","Closing tag '"+T+"' can't have attributes or invalid starting.",g(y,E));if(v.length===0)return c("InvalidTag","Closing tag '"+T+"' has not been opened.",g(y,E));{const C=v.pop();if(T!==C.tagName){let P=g(y,C.tagStartPos);return c("InvalidTag","Expected closing tag '"+C.tagName+"' (opened in line "+P.line+", col "+P.col+") instead of closing tag '"+T+"'.",g(y,E))}v.length==0&&(N=!0)}}else return c("InvalidTag","Closing tag '"+T+"' doesn't have proper closing.",g(y,b));else{const C=a(I,p);if(C!==!0)return c(C.err.code,C.err.msg,g(y,b-I.length+C.err.line));if(N===!0)return c("InvalidXml","Multiple possible root nodes found.",g(y,b));p.unpairedTags.indexOf(T)!==-1||v.push({tagName:T,tagStartPos:E}),A=!0}for(b++;b<y.length;b++)if(y[b]==="<")if(y[b+1]==="!"){b++,b=o(y,b);continue}else if(y[b+1]==="?"){if(b=n(y,++b),b.err)return b}else break;else if(y[b]==="&"){const C=f(y,b);if(C==-1)return c("InvalidChar","char '&' is not expected.",g(y,b));b=C}else if(N===!0&&!t(y[b]))return c("InvalidXml","Extra text at the end",g(y,b));y[b]==="<"&&b--}}else{if(t(y[b]))continue;return c("InvalidChar","char '"+y[b]+"' is not expected.",g(y,b))}if(A){if(v.length==1)return c("InvalidTag","Unclosed tag '"+v[0].tagName+"'.",g(y,v[0].tagStartPos));if(v.length>0)return c("InvalidXml","Invalid '"+JSON.stringify(v.map(b=>b.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return c("InvalidXml","Start tag expected.",1);return!0};function t(y){return y===" "||y===" "||y===`
|
|
12
|
+
`||y==="\r"}function n(y,p){const v=p;for(;p<y.length;p++)if(y[p]=="?"||y[p]==" "){const A=y.substr(v,p-v);if(p>5&&A==="xml")return c("InvalidXml","XML declaration allowed only at the start of the document.",g(y,p));if(y[p]=="?"&&y[p+1]==">"){p++;break}else continue}return p}function o(y,p){if(y.length>p+5&&y[p+1]==="-"&&y[p+2]==="-"){for(p+=3;p<y.length;p++)if(y[p]==="-"&&y[p+1]==="-"&&y[p+2]===">"){p+=2;break}}else if(y.length>p+8&&y[p+1]==="D"&&y[p+2]==="O"&&y[p+3]==="C"&&y[p+4]==="T"&&y[p+5]==="Y"&&y[p+6]==="P"&&y[p+7]==="E"){let v=1;for(p+=8;p<y.length;p++)if(y[p]==="<")v++;else if(y[p]===">"&&(v--,v===0))break}else if(y.length>p+9&&y[p+1]==="["&&y[p+2]==="C"&&y[p+3]==="D"&&y[p+4]==="A"&&y[p+5]==="T"&&y[p+6]==="A"&&y[p+7]==="["){for(p+=8;p<y.length;p++)if(y[p]==="]"&&y[p+1]==="]"&&y[p+2]===">"){p+=2;break}}return p}const u='"',l="'";function i(y,p){let v="",A="",N=!1;for(;p<y.length;p++){if(y[p]===u||y[p]===l)A===""?A=y[p]:A!==y[p]||(A="");else if(y[p]===">"&&A===""){N=!0;break}v+=y[p]}return A!==""?!1:{value:v,index:p,tagClosed:N}}const h=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function a(y,p){const v=r.getAllMatches(y,h),A={};for(let N=0;N<v.length;N++){if(v[N][1].length===0)return c("InvalidAttr","Attribute '"+v[N][2]+"' has no space in starting.",w(v[N]));if(v[N][3]!==void 0&&v[N][4]===void 0)return c("InvalidAttr","Attribute '"+v[N][2]+"' is without value.",w(v[N]));if(v[N][3]===void 0&&!p.allowBooleanAttributes)return c("InvalidAttr","boolean attribute '"+v[N][2]+"' is not allowed.",w(v[N]));const b=v[N][2];if(!d(b))return c("InvalidAttr","Attribute '"+b+"' is an invalid name.",w(v[N]));if(!A.hasOwnProperty(b))A[b]=1;else return c("InvalidAttr","Attribute '"+b+"' is repeated.",w(v[N]))}return!0}function s(y,p){let v=/\d/;for(y[p]==="x"&&(p++,v=/[\da-fA-F]/);p<y.length;p++){if(y[p]===";")return p;if(!y[p].match(v))break}return-1}function f(y,p){if(p++,y[p]===";")return-1;if(y[p]==="#")return p++,s(y,p);let v=0;for(;p<y.length;p++,v++)if(!(y[p].match(/\w/)&&v<20)){if(y[p]===";")break;return-1}return p}function c(y,p,v){return{err:{code:y,msg:p,line:v.line||v,col:v.col}}}function d(y){return r.isName(y)}function m(y){return r.isName(y)}function g(y,p){const v=y.substring(0,p).split(/\r?\n/);return{line:v.length,col:v[v.length-1].length+1}}function w(y){return y.startIndex+y[1].length}return nt}var ke={},sr;function $s(){if(sr)return ke;sr=1;const r={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,n){return n},attributeValueProcessor:function(t,n){return n},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,n,o){return t}},e=function(t){return Object.assign({},r,t)};return ke.buildOptions=e,ke.defaultOptions=r,ke}var it,ir;function js(){if(ir)return it;ir=1;class r{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,n){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:n})}addChild(t){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}}return it=r,it}var ot,or;function Rs(){if(or)return ot;or=1;const r=St();function e(a,s){const f={};if(a[s+3]==="O"&&a[s+4]==="C"&&a[s+5]==="T"&&a[s+6]==="Y"&&a[s+7]==="P"&&a[s+8]==="E"){s=s+9;let c=1,d=!1,m=!1,g="";for(;s<a.length;s++)if(a[s]==="<"&&!m){if(d&&o(a,s)){s+=7;let w,y;[w,y,s]=t(a,s+1),y.indexOf("&")===-1&&(f[h(w)]={regx:RegExp(`&${w};`,"g"),val:y})}else if(d&&u(a,s))s+=8;else if(d&&l(a,s))s+=8;else if(d&&i(a,s))s+=9;else if(n)m=!0;else throw new Error("Invalid DOCTYPE");c++,g=""}else if(a[s]===">"){if(m?a[s-1]==="-"&&a[s-2]==="-"&&(m=!1,c--):c--,c===0)break}else a[s]==="["?d=!0:g+=a[s];if(c!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:f,i:s}}function t(a,s){let f="";for(;s<a.length&&a[s]!=="'"&&a[s]!=='"';s++)f+=a[s];if(f=f.trim(),f.indexOf(" ")!==-1)throw new Error("External entites are not supported");const c=a[s++];let d="";for(;s<a.length&&a[s]!==c;s++)d+=a[s];return[f,d,s]}function n(a,s){return a[s+1]==="!"&&a[s+2]==="-"&&a[s+3]==="-"}function o(a,s){return a[s+1]==="!"&&a[s+2]==="E"&&a[s+3]==="N"&&a[s+4]==="T"&&a[s+5]==="I"&&a[s+6]==="T"&&a[s+7]==="Y"}function u(a,s){return a[s+1]==="!"&&a[s+2]==="E"&&a[s+3]==="L"&&a[s+4]==="E"&&a[s+5]==="M"&&a[s+6]==="E"&&a[s+7]==="N"&&a[s+8]==="T"}function l(a,s){return a[s+1]==="!"&&a[s+2]==="A"&&a[s+3]==="T"&&a[s+4]==="T"&&a[s+5]==="L"&&a[s+6]==="I"&&a[s+7]==="S"&&a[s+8]==="T"}function i(a,s){return a[s+1]==="!"&&a[s+2]==="N"&&a[s+3]==="O"&&a[s+4]==="T"&&a[s+5]==="A"&&a[s+6]==="T"&&a[s+7]==="I"&&a[s+8]==="O"&&a[s+9]==="N"}function h(a){if(r.isName(a))return a;throw new Error(`Invalid entity name ${a}`)}return ot=e,ot}var at,ar;function Ls(){if(ar)return at;ar=1;const r=/^[-+]?0x[a-fA-F0-9]+$/,e=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,t={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function n(l,i={}){if(i=Object.assign({},t,i),!l||typeof l!="string")return l;if(l==="0")return 0;let h=l.trim();if(i.skipLike!==void 0&&i.skipLike.test(h))return l;if(i.hex&&r.test(h))return u(h,16);if(h.search(/[eE]/)!==-1){const a=h.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/);if(a){if(i.leadingZeros)h=(a[1]||"")+a[3];else if(!(a[2]==="0"&&a[3][0]==="."))return l;return i.eNotation?Number(h):l}else return l}else{const a=e.exec(h);if(a){const s=a[1],f=a[2];let c=o(a[3]);if(!i.leadingZeros&&f.length>0&&s&&h[2]!==".")return l;if(!i.leadingZeros&&f.length>0&&!s&&h[1]!==".")return l;if(i.leadingZeros&&f===l)return 0;{const d=Number(h),m=""+d;return m.search(/[eE]/)!==-1?i.eNotation?d:l:h.indexOf(".")!==-1?m==="0"&&c===""||m===c||s&&m==="-"+c?d:l:f?c===m||s+c===m?d:l:h===m||h===s+m?d:l}}else return l}}function o(l){return l&&l.indexOf(".")!==-1&&(l=l.replace(/0+$/,""),l==="."?l="0":l[0]==="."?l="0"+l:l[l.length-1]==="."&&(l=l.substr(0,l.length-1))),l}function u(l,i){if(parseInt)return parseInt(l,i);if(Number.parseInt)return Number.parseInt(l,i);if(window&&window.parseInt)return window.parseInt(l,i);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}return at=n,at}var ut,ur;function Mr(){if(ur)return ut;ur=1;function r(e){return typeof e=="function"?e:Array.isArray(e)?t=>{for(const n of e)if(typeof n=="string"&&t===n||n instanceof RegExp&&n.test(t))return!0}:()=>!1}return ut=r,ut}var lt,lr;function ks(){if(lr)return lt;lr=1;const r=St(),e=js(),t=Rs(),n=Ls(),o=Mr();class u{constructor(b){this.options=b,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(E,x)=>String.fromCharCode(Number.parseInt(x,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(E,x)=>String.fromCharCode(Number.parseInt(x,16))}},this.addExternalEntities=l,this.parseXml=f,this.parseTextData=i,this.resolveNameSpace=h,this.buildAttributesMap=s,this.isItStopNode=g,this.replaceEntitiesValue=d,this.readStopNodeData=v,this.saveTextToParentTag=m,this.addChild=c,this.ignoreAttributesFn=o(this.options.ignoreAttributes)}}function l(N){const b=Object.keys(N);for(let E=0;E<b.length;E++){const x=b[E];this.lastEntities[x]={regex:new RegExp("&"+x+";","g"),val:N[x]}}}function i(N,b,E,x,T,O,I){if(N!==void 0&&(this.options.trimValues&&!x&&(N=N.trim()),N.length>0)){I||(N=this.replaceEntitiesValue(N));const C=this.options.tagValueProcessor(b,N,E,T,O);return C==null?N:typeof C!=typeof N||C!==N?C:this.options.trimValues?A(N,this.options.parseTagValue,this.options.numberParseOptions):N.trim()===N?A(N,this.options.parseTagValue,this.options.numberParseOptions):N}}function h(N){if(this.options.removeNSPrefix){const b=N.split(":"),E=N.charAt(0)==="/"?"/":"";if(b[0]==="xmlns")return"";b.length===2&&(N=E+b[1])}return N}const a=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function s(N,b,E){if(this.options.ignoreAttributes!==!0&&typeof N=="string"){const x=r.getAllMatches(N,a),T=x.length,O={};for(let I=0;I<T;I++){const C=this.resolveNameSpace(x[I][1]);if(this.ignoreAttributesFn(C,b))continue;let P=x[I][4],$=this.options.attributeNamePrefix+C;if(C.length)if(this.options.transformAttributeName&&($=this.options.transformAttributeName($)),$==="__proto__"&&($="#__proto__"),P!==void 0){this.options.trimValues&&(P=P.trim()),P=this.replaceEntitiesValue(P);const F=this.options.attributeValueProcessor(C,P,b);F==null?O[$]=P:typeof F!=typeof P||F!==P?O[$]=F:O[$]=A(P,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(O[$]=!0)}if(!Object.keys(O).length)return;if(this.options.attributesGroupName){const I={};return I[this.options.attributesGroupName]=O,I}return O}}const f=function(N){N=N.replace(/\r\n?/g,`
|
|
13
|
+
`);const b=new e("!xml");let E=b,x="",T="";for(let O=0;O<N.length;O++)if(N[O]==="<")if(N[O+1]==="/"){const C=y(N,">",O,"Closing Tag is not closed.");let P=N.substring(O+2,C).trim();if(this.options.removeNSPrefix){const j=P.indexOf(":");j!==-1&&(P=P.substr(j+1))}this.options.transformTagName&&(P=this.options.transformTagName(P)),E&&(x=this.saveTextToParentTag(x,E,T));const $=T.substring(T.lastIndexOf(".")+1);if(P&&this.options.unpairedTags.indexOf(P)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${P}>`);let F=0;$&&this.options.unpairedTags.indexOf($)!==-1?(F=T.lastIndexOf(".",T.lastIndexOf(".")-1),this.tagsNodeStack.pop()):F=T.lastIndexOf("."),T=T.substring(0,F),E=this.tagsNodeStack.pop(),x="",O=C}else if(N[O+1]==="?"){let C=p(N,O,!1,"?>");if(!C)throw new Error("Pi Tag is not closed.");if(x=this.saveTextToParentTag(x,E,T),!(this.options.ignoreDeclaration&&C.tagName==="?xml"||this.options.ignorePiTags)){const P=new e(C.tagName);P.add(this.options.textNodeName,""),C.tagName!==C.tagExp&&C.attrExpPresent&&(P[":@"]=this.buildAttributesMap(C.tagExp,T,C.tagName)),this.addChild(E,P,T)}O=C.closeIndex+1}else if(N.substr(O+1,3)==="!--"){const C=y(N,"-->",O+4,"Comment is not closed.");if(this.options.commentPropName){const P=N.substring(O+4,C-2);x=this.saveTextToParentTag(x,E,T),E.add(this.options.commentPropName,[{[this.options.textNodeName]:P}])}O=C}else if(N.substr(O+1,2)==="!D"){const C=t(N,O);this.docTypeEntities=C.entities,O=C.i}else if(N.substr(O+1,2)==="!["){const C=y(N,"]]>",O,"CDATA is not closed.")-2,P=N.substring(O+9,C);x=this.saveTextToParentTag(x,E,T);let $=this.parseTextData(P,E.tagname,T,!0,!1,!0,!0);$==null&&($=""),this.options.cdataPropName?E.add(this.options.cdataPropName,[{[this.options.textNodeName]:P}]):E.add(this.options.textNodeName,$),O=C+2}else{let C=p(N,O,this.options.removeNSPrefix),P=C.tagName;const $=C.rawTagName;let F=C.tagExp,j=C.attrExpPresent,G=C.closeIndex;this.options.transformTagName&&(P=this.options.transformTagName(P)),E&&x&&E.tagname!=="!xml"&&(x=this.saveTextToParentTag(x,E,T,!1));const q=E;if(q&&this.options.unpairedTags.indexOf(q.tagname)!==-1&&(E=this.tagsNodeStack.pop(),T=T.substring(0,T.lastIndexOf("."))),P!==b.tagname&&(T+=T?"."+P:P),this.isItStopNode(this.options.stopNodes,T,P)){let R="";if(F.length>0&&F.lastIndexOf("/")===F.length-1)P[P.length-1]==="/"?(P=P.substr(0,P.length-1),T=T.substr(0,T.length-1),F=P):F=F.substr(0,F.length-1),O=C.closeIndex;else if(this.options.unpairedTags.indexOf(P)!==-1)O=C.closeIndex;else{const _=this.readStopNodeData(N,$,G+1);if(!_)throw new Error(`Unexpected end of ${$}`);O=_.i,R=_.tagContent}const ee=new e(P);P!==F&&j&&(ee[":@"]=this.buildAttributesMap(F,T,P)),R&&(R=this.parseTextData(R,P,T,!0,j,!0,!0)),T=T.substr(0,T.lastIndexOf(".")),ee.add(this.options.textNodeName,R),this.addChild(E,ee,T)}else{if(F.length>0&&F.lastIndexOf("/")===F.length-1){P[P.length-1]==="/"?(P=P.substr(0,P.length-1),T=T.substr(0,T.length-1),F=P):F=F.substr(0,F.length-1),this.options.transformTagName&&(P=this.options.transformTagName(P));const R=new e(P);P!==F&&j&&(R[":@"]=this.buildAttributesMap(F,T,P)),this.addChild(E,R,T),T=T.substr(0,T.lastIndexOf("."))}else{const R=new e(P);this.tagsNodeStack.push(E),P!==F&&j&&(R[":@"]=this.buildAttributesMap(F,T,P)),this.addChild(E,R,T),E=R}x="",O=G}}else x+=N[O];return b.child};function c(N,b,E){const x=this.options.updateTag(b.tagname,E,b[":@"]);x===!1||(typeof x=="string"&&(b.tagname=x),N.addChild(b))}const d=function(N){if(this.options.processEntities){for(let b in this.docTypeEntities){const E=this.docTypeEntities[b];N=N.replace(E.regx,E.val)}for(let b in this.lastEntities){const E=this.lastEntities[b];N=N.replace(E.regex,E.val)}if(this.options.htmlEntities)for(let b in this.htmlEntities){const E=this.htmlEntities[b];N=N.replace(E.regex,E.val)}N=N.replace(this.ampEntity.regex,this.ampEntity.val)}return N};function m(N,b,E,x){return N&&(x===void 0&&(x=b.child.length===0),N=this.parseTextData(N,b.tagname,E,!1,b[":@"]?Object.keys(b[":@"]).length!==0:!1,x),N!==void 0&&N!==""&&b.add(this.options.textNodeName,N),N=""),N}function g(N,b,E){const x="*."+E;for(const T in N){const O=N[T];if(x===O||b===O)return!0}return!1}function w(N,b,E=">"){let x,T="";for(let O=b;O<N.length;O++){let I=N[O];if(x)I===x&&(x="");else if(I==='"'||I==="'")x=I;else if(I===E[0])if(E[1]){if(N[O+1]===E[1])return{data:T,index:O}}else return{data:T,index:O};else I===" "&&(I=" ");T+=I}}function y(N,b,E,x){const T=N.indexOf(b,E);if(T===-1)throw new Error(x);return T+b.length-1}function p(N,b,E,x=">"){const T=w(N,b+1,x);if(!T)return;let O=T.data;const I=T.index,C=O.search(/\s/);let P=O,$=!0;C!==-1&&(P=O.substring(0,C),O=O.substring(C+1).trimStart());const F=P;if(E){const j=P.indexOf(":");j!==-1&&(P=P.substr(j+1),$=P!==T.data.substr(j+1))}return{tagName:P,tagExp:O,closeIndex:I,attrExpPresent:$,rawTagName:F}}function v(N,b,E){const x=E;let T=1;for(;E<N.length;E++)if(N[E]==="<")if(N[E+1]==="/"){const O=y(N,">",E,`${b} is not closed`);if(N.substring(E+2,O).trim()===b&&(T--,T===0))return{tagContent:N.substring(x,E),i:O};E=O}else if(N[E+1]==="?")E=y(N,"?>",E+1,"StopNode is not closed.");else if(N.substr(E+1,3)==="!--")E=y(N,"-->",E+3,"StopNode is not closed.");else if(N.substr(E+1,2)==="![")E=y(N,"]]>",E,"StopNode is not closed.")-2;else{const O=p(N,E,">");O&&((O&&O.tagName)===b&&O.tagExp[O.tagExp.length-1]!=="/"&&T++,E=O.closeIndex)}}function A(N,b,E){if(b&&typeof N=="string"){const x=N.trim();return x==="true"?!0:x==="false"?!1:n(N,E)}else return r.isExist(N)?N:""}return lt=u,lt}var ct={},cr;function Us(){if(cr)return ct;cr=1;function r(u,l){return e(u,l)}function e(u,l,i){let h;const a={};for(let s=0;s<u.length;s++){const f=u[s],c=t(f);let d="";if(i===void 0?d=c:d=i+"."+c,c===l.textNodeName)h===void 0?h=f[c]:h+=""+f[c];else{if(c===void 0)continue;if(f[c]){let m=e(f[c],l,d);const g=o(m,l);f[":@"]?n(m,f[":@"],d,l):Object.keys(m).length===1&&m[l.textNodeName]!==void 0&&!l.alwaysCreateTextNode?m=m[l.textNodeName]:Object.keys(m).length===0&&(l.alwaysCreateTextNode?m[l.textNodeName]="":m=""),a[c]!==void 0&&a.hasOwnProperty(c)?(Array.isArray(a[c])||(a[c]=[a[c]]),a[c].push(m)):l.isArray(c,d,g)?a[c]=[m]:a[c]=m}}}return typeof h=="string"?h.length>0&&(a[l.textNodeName]=h):h!==void 0&&(a[l.textNodeName]=h),a}function t(u){const l=Object.keys(u);for(let i=0;i<l.length;i++){const h=l[i];if(h!==":@")return h}}function n(u,l,i,h){if(l){const a=Object.keys(l),s=a.length;for(let f=0;f<s;f++){const c=a[f];h.isArray(c,i+"."+c,!0,!0)?u[c]=[l[c]]:u[c]=l[c]}}}function o(u,l){const{textNodeName:i}=l,h=Object.keys(u).length;return!!(h===0||h===1&&(u[i]||typeof u[i]=="boolean"||u[i]===0))}return ct.prettify=r,ct}var ht,hr;function _s(){if(hr)return ht;hr=1;const{buildOptions:r}=$s(),e=ks(),{prettify:t}=Us(),n=_r();class o{constructor(l){this.externalEntities={},this.options=r(l)}parse(l,i){if(typeof l!="string")if(l.toString)l=l.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(i){i===!0&&(i={});const s=n.validate(l,i);if(s!==!0)throw Error(`${s.err.msg}:${s.err.line}:${s.err.col}`)}const h=new e(this.options);h.addExternalEntities(this.externalEntities);const a=h.parseXml(l);return this.options.preserveOrder||a===void 0?a:t(a,this.options)}addEntity(l,i){if(i.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(l.indexOf("&")!==-1||l.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if(i==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[l]=i}}return ht=o,ht}var ft,fr;function Ms(){if(fr)return ft;fr=1;const r=`
|
|
14
|
+
`;function e(i,h){let a="";return h.format&&h.indentBy.length>0&&(a=r),t(i,h,"",a)}function t(i,h,a,s){let f="",c=!1;for(let d=0;d<i.length;d++){const m=i[d],g=n(m);if(g===void 0)continue;let w="";if(a.length===0?w=g:w=`${a}.${g}`,g===h.textNodeName){let N=m[g];u(w,h)||(N=h.tagValueProcessor(g,N),N=l(N,h)),c&&(f+=s),f+=N,c=!1;continue}else if(g===h.cdataPropName){c&&(f+=s),f+=`<![CDATA[${m[g][0][h.textNodeName]}]]>`,c=!1;continue}else if(g===h.commentPropName){f+=s+`<!--${m[g][0][h.textNodeName]}-->`,c=!0;continue}else if(g[0]==="?"){const N=o(m[":@"],h),b=g==="?xml"?"":s;let E=m[g][0][h.textNodeName];E=E.length!==0?" "+E:"",f+=b+`<${g}${E}${N}?>`,c=!0;continue}let y=s;y!==""&&(y+=h.indentBy);const p=o(m[":@"],h),v=s+`<${g}${p}`,A=t(m[g],h,w,y);h.unpairedTags.indexOf(g)!==-1?h.suppressUnpairedNode?f+=v+">":f+=v+"/>":(!A||A.length===0)&&h.suppressEmptyNode?f+=v+"/>":A&&A.endsWith(">")?f+=v+`>${A}${s}</${g}>`:(f+=v+">",A&&s!==""&&(A.includes("/>")||A.includes("</"))?f+=s+h.indentBy+A+s:f+=A,f+=`</${g}>`),c=!0}return f}function n(i){const h=Object.keys(i);for(let a=0;a<h.length;a++){const s=h[a];if(i.hasOwnProperty(s)&&s!==":@")return s}}function o(i,h){let a="";if(i&&!h.ignoreAttributes)for(let s in i){if(!i.hasOwnProperty(s))continue;let f=h.attributeValueProcessor(s,i[s]);f=l(f,h),f===!0&&h.suppressBooleanAttributes?a+=` ${s.substr(h.attributeNamePrefix.length)}`:a+=` ${s.substr(h.attributeNamePrefix.length)}="${f}"`}return a}function u(i,h){i=i.substr(0,i.length-h.textNodeName.length-1);let a=i.substr(i.lastIndexOf(".")+1);for(let s in h.stopNodes)if(h.stopNodes[s]===i||h.stopNodes[s]==="*."+a)return!0;return!1}function l(i,h){if(i&&i.length>0&&h.processEntities)for(let a=0;a<h.entities.length;a++){const s=h.entities[a];i=i.replace(s.regex,s.val)}return i}return ft=e,ft}var pt,pr;function Vs(){if(pr)return pt;pr=1;const r=Ms(),e=Mr(),t={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(i,h){return h},attributeValueProcessor:function(i,h){return h},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 n(i){this.options=Object.assign({},t,i),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=e(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=l),this.processTextOrObjNode=o,this.options.format?(this.indentate=u,this.tagEndChar=`>
|
|
15
15
|
`,this.newLine=`
|
|
16
|
-
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}n.prototype.build=function(i){return this.options.preserveOrder?r(i,this.options):(Array.isArray(i)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(i={[this.options.arrayNodeName]:i}),this.j2x(i,0,[]).val)},n.prototype.j2x=function(i,h,a){let s="",f="";const c=a.join(".");for(let
|
|
16
|
+
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}n.prototype.build=function(i){return this.options.preserveOrder?r(i,this.options):(Array.isArray(i)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(i={[this.options.arrayNodeName]:i}),this.j2x(i,0,[]).val)},n.prototype.j2x=function(i,h,a){let s="",f="";const c=a.join(".");for(let d in i)if(Object.prototype.hasOwnProperty.call(i,d))if(typeof i[d]>"u")this.isAttribute(d)&&(f+="");else if(i[d]===null)this.isAttribute(d)||d===this.options.cdataPropName?f+="":d[0]==="?"?f+=this.indentate(h)+"<"+d+"?"+this.tagEndChar:f+=this.indentate(h)+"<"+d+"/"+this.tagEndChar;else if(i[d]instanceof Date)f+=this.buildTextValNode(i[d],d,"",h);else if(typeof i[d]!="object"){const m=this.isAttribute(d);if(m&&!this.ignoreAttributesFn(m,c))s+=this.buildAttrPairStr(m,""+i[d]);else if(!m)if(d===this.options.textNodeName){let g=this.options.tagValueProcessor(d,""+i[d]);f+=this.replaceEntitiesValue(g)}else f+=this.buildTextValNode(i[d],d,"",h)}else if(Array.isArray(i[d])){const m=i[d].length;let g="",w="";for(let y=0;y<m;y++){const p=i[d][y];if(!(typeof p>"u"))if(p===null)d[0]==="?"?f+=this.indentate(h)+"<"+d+"?"+this.tagEndChar:f+=this.indentate(h)+"<"+d+"/"+this.tagEndChar;else if(typeof p=="object")if(this.options.oneListGroup){const v=this.j2x(p,h+1,a.concat(d));g+=v.val,this.options.attributesGroupName&&p.hasOwnProperty(this.options.attributesGroupName)&&(w+=v.attrStr)}else g+=this.processTextOrObjNode(p,d,h,a);else if(this.options.oneListGroup){let v=this.options.tagValueProcessor(d,p);v=this.replaceEntitiesValue(v),g+=v}else g+=this.buildTextValNode(p,d,"",h)}this.options.oneListGroup&&(g=this.buildObjectNode(g,d,w,h)),f+=g}else if(this.options.attributesGroupName&&d===this.options.attributesGroupName){const m=Object.keys(i[d]),g=m.length;for(let w=0;w<g;w++)s+=this.buildAttrPairStr(m[w],""+i[d][m[w]])}else f+=this.processTextOrObjNode(i[d],d,h,a);return{attrStr:s,val:f}},n.prototype.buildAttrPairStr=function(i,h){return h=this.options.attributeValueProcessor(i,""+h),h=this.replaceEntitiesValue(h),this.options.suppressBooleanAttributes&&h==="true"?" "+i:" "+i+'="'+h+'"'};function o(i,h,a,s){const f=this.j2x(i,a+1,s.concat(h));return i[this.options.textNodeName]!==void 0&&Object.keys(i).length===1?this.buildTextValNode(i[this.options.textNodeName],h,f.attrStr,a):this.buildObjectNode(f.val,h,f.attrStr,a)}n.prototype.buildObjectNode=function(i,h,a,s){if(i==="")return h[0]==="?"?this.indentate(s)+"<"+h+a+"?"+this.tagEndChar:this.indentate(s)+"<"+h+a+this.closeTag(h)+this.tagEndChar;{let f="</"+h+this.tagEndChar,c="";return h[0]==="?"&&(c="?",f=""),(a||a==="")&&i.indexOf("<")===-1?this.indentate(s)+"<"+h+a+c+">"+i+f:this.options.commentPropName!==!1&&h===this.options.commentPropName&&c.length===0?this.indentate(s)+`<!--${i}-->`+this.newLine:this.indentate(s)+"<"+h+a+c+this.tagEndChar+i+this.indentate(s)+f}},n.prototype.closeTag=function(i){let h="";return this.options.unpairedTags.indexOf(i)!==-1?this.options.suppressUnpairedNode||(h="/"):this.options.suppressEmptyNode?h="/":h=`></${i}`,h},n.prototype.buildTextValNode=function(i,h,a,s){if(this.options.cdataPropName!==!1&&h===this.options.cdataPropName)return this.indentate(s)+`<![CDATA[${i}]]>`+this.newLine;if(this.options.commentPropName!==!1&&h===this.options.commentPropName)return this.indentate(s)+`<!--${i}-->`+this.newLine;if(h[0]==="?")return this.indentate(s)+"<"+h+a+"?"+this.tagEndChar;{let f=this.options.tagValueProcessor(h,i);return f=this.replaceEntitiesValue(f),f===""?this.indentate(s)+"<"+h+a+this.closeTag(h)+this.tagEndChar:this.indentate(s)+"<"+h+a+">"+f+"</"+h+this.tagEndChar}},n.prototype.replaceEntitiesValue=function(i){if(i&&i.length>0&&this.options.processEntities)for(let h=0;h<this.options.entities.length;h++){const a=this.options.entities[h];i=i.replace(a.regex,a.val)}return i};function u(i){return this.options.indentBy.repeat(i)}function l(i){return i.startsWith(this.options.attributeNamePrefix)&&i!==this.options.textNodeName?i.substr(this.attrPrefixLen):!1}return pt=n,pt}var gt,gr;function Bs(){if(gr)return gt;gr=1;const r=_r(),e=_s(),t=Vs();return gt={XMLParser:e,XMLValidator:r,XMLBuilder:t},gt}var Ft=Bs();const Nt=(r,e)=>Object.fromEntries(Object.entries(r).map(([t,n])=>e.includes(t)?[t,n||""]:[L.DavProperties.DavNamespace.includes(t)?`d:${t}`:`oc:${t}`,n||""])),dr=(r=[],{pattern:e,filterRules:t,limit:n=0,extraProps:o=[]})=>{let u="d:propfind";e&&(u="oc:search-files"),t&&(u="oc:filter-files");const l=r.reduce((s,f)=>Object.assign(s,{[f]:null}),{}),i=Nt(l,o),h={[u]:{"d:prop":i,"@@xmlns:d":"DAV:","@@xmlns:oc":"http://owncloud.org/ns",...e&&{"oc:search":{"oc:pattern":e,"oc:limit":n}},...t&&{"oc:filter-rules":Nt(t,[])}}};return new Ft.XMLBuilder({format:!0,ignoreAttributes:!1,attributeNamePrefix:"@@",suppressEmptyNode:!0}).build(h)},qs=r=>{const e={"d:propertyupdate":{"d:set":{"d:prop":Nt(r,[])},"@@xmlns:d":"DAV:","@@xmlns:oc":"http://owncloud.org/ns"}};return new Ft.XMLBuilder({format:!0,ignoreAttributes:!1,attributeNamePrefix:"@@",suppressEmptyNode:!0}).build(e)},Ws=r=>{const e={},t=r.get("tus-version");return t?(e.version=t.split(","),r.get("tus-extension")&&(e.extension=r.get("tus-extension").split(",")),r.get("tus-resumable")&&(e.resumable=r.get("tus-resumable")),r.get("tus-max-size")&&(e.maxSize=parseInt(r.get("tus-max-size"),10)),e):null},Xs=async r=>{const e=n=>{const o=decodeURIComponent(n);return n!=null&&n.startsWith("/remote.php/dav/")?W.urlJoin(o.replace("/remote.php/dav/",""),{leadingSlash:!0,trailingSlash:!1}):o};return(await As(r)).multistatus.response.map(({href:n,propstat:o})=>{const u={...Ts(o.prop,e(n),!0),processing:o.status==="HTTP/1.1 425 TOO EARLY"};return u.props.name&&(u.props.name=u.props.name.toString()),u})},Gs=r=>{const e=new Ft.XMLParser,t={message:"Unknown error",errorCode:void 0};try{const n=e.parse(r);if(!n["d:error"])return t;if(n["d:error"]["s:message"]){const o=n["d:error"]["s:message"];typeof o=="string"&&(t.message=o)}if(n["d:error"]["s:errorcode"]){const o=n["d:error"]["s:errorcode"];typeof o=="string"&&(t.errorCode=o)}}catch{return t}return t};class zs{constructor({baseUrl:e,headers:t}){U(this,"client");U(this,"davPath");U(this,"headers");U(this,"extraProps");this.davPath=W.urlJoin(e,"remote.php/dav"),this.client=Es(this.davPath,{}),this.headers=t,this.extraProps=[]}mkcol(e,t={}){return this.request(e,{method:L.DavMethod.mkcol,...t})}async propfind(e,{depth:t=1,properties:n=[],headers:o={},...u}={}){const l={...o,Depth:t.toString()},{body:i,result:h}=await this.request(e,{method:L.DavMethod.propfind,data:dr(n,{extraProps:this.extraProps}),headers:l,...u});return i!=null&&i.length&&(i[0].tusSupport=Ws(h.headers)),i}async report(e,{pattern:t="",filterRules:n=null,limit:o=30,properties:u,...l}={}){const{body:i,result:h}=await this.request(e,{method:L.DavMethod.report,data:dr(u,{pattern:t,filterRules:n,limit:o,extraProps:this.extraProps}),...l});return{results:i,range:h.headers.get("content-range")}}copy(e,t,{overwrite:n=!1,headers:o={},...u}={}){const l=W.urlJoin(this.davPath,Ie(t));return this.request(e,{method:L.DavMethod.copy,headers:{...o,Destination:l,overwrite:n?"T":"F"},...u})}move(e,t,{overwrite:n=!1,headers:o={},...u}={}){const l=W.urlJoin(this.davPath,Ie(t));return this.request(e,{method:L.DavMethod.move,headers:{...o,Destination:l,overwrite:n?"T":"F"},...u})}put(e,t,{headers:n={},onUploadProgress:o,previousEntityTag:u,overwrite:l,...i}={}){const h={...n};return u?h["If-Match"]=u:l||(h["If-None-Match"]="*"),this.request(e,{method:L.DavMethod.put,data:t,headers:h,onUploadProgress:o,...i})}delete(e,t={}){return this.request(e,{method:L.DavMethod.delete,...t})}propPatch(e,t,n={}){const o=qs(t);return this.request(e,{method:L.DavMethod.proppatch,data:o,...n})}getFileUrl(e){return W.urlJoin(this.davPath,Ie(e))}buildHeaders(e={}){return{"Content-Type":"application/xml; charset=utf-8","X-Requested-With":"XMLHttpRequest","X-Request-ID":Fs(),...this.headers&&{...this.headers()},...e}}async request(e,t){const n=W.urlJoin(this.davPath,Ie(e),{leadingSlash:!0}),o={...t,url:n,headers:this.buildHeaders(t.headers||{})};try{const u=await this.client.customRequest("",o);let l;if(u.status===207){const i=await u.text();l=await Xs(i)}return{body:l,status:u.status,result:u}}catch(u){const{response:l}=u,i=await l.text(),h=Gs(i);throw new mr(h.message,h.errorCode,l,l.status)}}}const Js=(r,e)=>({async listFileVersions(t,n={}){const[o,...u]=await r.propfind(W.urlJoin("meta",t,"v",{leadingSlash:!0}),n);return u.map(l=>L.buildResource(l,r.extraProps))}}),Hs=(r,e)=>({setFavorite(t,{path:n},o,u={}){const l={[L.DavProperty.IsFavorite]:o?"true":"false"};return r.propPatch(W.urlJoin(t.webDavPath,n),l,u)}}),Zs=(r,e)=>({listFavoriteFiles({davProperties:t=L.DavProperties.Default,username:n="",...o}={}){return r.report(W.urlJoin("files",n),{properties:t,filterRules:{favorite:1},...o})}}),Ys=(r,e)=>{const t=Wr.axios.create();e&&t.interceptors.request.use(P=>(Object.assign(P.headers,e()),P));const n={axiosClient:t,baseUrl:r},o=new zs({baseUrl:r,headers:e}),u=P=>{o.extraProps.push(P)},l=on(o),{getPathForFileId:i}=l,h=Kr(o,l),{listFiles:a}=h,s=Hr(h),{getFileInfo:f}=s,{createFolder:c}=zr(o,s),d=Jr(o,n),{getFileContents:m}=d,{putFileContents:g}=Dr(o,s),{getFileUrl:w,revokeUrl:y}=Zr(o,d,n),{getPublicFileUrl:p}=Yr(o),{copyFiles:v}=Gr(o),{moveFiles:A}=Qr(o),{deleteFile:N}=en(o),{restoreFile:b}=tn(o),{listFileVersions:E}=Js(o),{restoreFileVersion:x}=rn(o),{clearTrashBin:T}=nn(o),{search:O}=sn(o),{listFavoriteFiles:I}=Zs(o),{setFavorite:C}=Hs(o);return{copyFiles:v,createFolder:c,deleteFile:N,restoreFile:b,restoreFileVersion:x,getFileContents:m,getFileInfo:f,getFileUrl:w,getPublicFileUrl:p,getPathForFileId:i,listFiles:a,listFileVersions:E,moveFiles:A,putFileContents:g,revokeUrl:y,clearTrashBin:T,search:O,listFavoriteFiles:I,setFavorite:C,registerExtraProp:u}};exports.DavHttpError=mr;exports.HttpError=xt;exports.encodePath=Ie;exports.webdav=Ys;
|