@opencloud-eu/web-client 2.2.0 → 2.4.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.
@@ -1,4 +1,4 @@
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-DJR5h-q5.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===`
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-43W1CNwK.cjs"),L=require("./functions-DJR5h-q5.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
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:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function 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=`
@@ -9,7 +9,7 @@ caused by: ${ie.fullStack(t)}`:e.stack??""}static info(e){He(e);const t={},n=ie.
9
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
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
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,`
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;let h=l.trim();if(i.skipLike!==void 0&&i.skipLike.test(h))return l;if(l==="0")return 0;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
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 '&#xD;'");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
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:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function 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=`