@opencloud-eu/web-client 5.0.0 → 5.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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../index-BtxJsB8k.cjs");const r=require("../index--afUD72W.cjs"),e=require("../functions-BqiR_ap_.cjs");exports.webdav=r.webdav;exports.DavMethod=e.DavMethod;exports.DavPermission=e.DavPermission;exports.DavProperties=e.DavProperties;exports.DavProperty=e.DavProperty;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../index-mNoGEl9R.cjs");const r=require("../index-Dn0XwAD_.cjs"),e=require("../functions-K2XX5sqY.cjs");exports.webdav=r.webdav;exports.DavMethod=e.DavMethod;exports.DavPermission=e.DavPermission;exports.DavProperties=e.DavProperties;exports.DavProperty=e.DavProperty;
@@ -1,6 +1,6 @@
1
- import "../index-DD48hLOx.js";
2
- import { w as e } from "../index-ZkBDpWBP.js";
3
- import { K as t, L as p, J as v, I as i } from "../functions-fAVnHNMc.js";
1
+ import "../index-CRMq09Yn.js";
2
+ import { w as e } from "../index-YuBBVVCr.js";
3
+ import { K as t, L as p, J as v, I as i } from "../functions-JSgappH3.js";
4
4
  export {
5
5
  t as DavMethod,
6
6
  p as DavPermission,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-DxKfohmw.cjs"),c=require("./web-client/ocs.cjs"),a=require("./index--afUD72W.cjs"),e=require("./functions-BqiR_ap_.cjs"),u=require("./toString-CEqk2kJI.cjs"),S=function*(t){return yield t},l=({message:t,statusCode:o,xReqId:s})=>{const i=new Response(void 0,{headers:{"x-request-id":s},status:o});return new a.HttpError(t,i,o)};class n{static Read=1;static Update=2;static Create=4;static Delete=8;static Share=16}exports.buildCollaboratorShare=r.buildCollaboratorShare;exports.buildIncomingShareResource=r.buildIncomingShareResource;exports.buildLinkShare=r.buildLinkShare;exports.buildOutgoingShareResource=r.buildOutgoingShareResource;exports.getShareResourcePermissions=r.getShareResourcePermissions;exports.getShareResourceRoles=r.getShareResourceRoles;exports.graph=r.graph;exports.isCollaboratorShare=r.isCollaboratorShare;exports.isIncomingShareResource=r.isIncomingShareResource;exports.isLinkShare=r.isLinkShare;exports.isOutgoingShareResource=r.isOutgoingShareResource;exports.isShareResource=r.isShareResource;exports.ocs=c.ocs;exports.DavHttpError=a.DavHttpError;exports.HttpError=a.HttpError;exports.encodePath=a.encodePath;exports.webdav=a.webdav;exports.GraphSharePermission=e.GraphSharePermission;exports.OCM_PROVIDER_ID=e.OCM_PROVIDER_ID;exports.SHARE_JAIL_ID=e.SHARE_JAIL_ID;exports.ShareType=e.ShareType;exports.ShareTypes=e.ShareTypes;exports.buildDeletedResource=e.buildDeletedResource;exports.buildPublicSpaceResource=e.buildPublicSpaceResource;exports.buildResource=e.buildResource;exports.buildShareSpaceResource=e.buildShareSpaceResource;exports.buildSpace=e.buildSpace;exports.buildSpaceImageResource=e.buildSpaceImageResource;exports.buildWebDavOcmPath=e.buildWebDavOcmPath;exports.buildWebDavPublicPath=e.buildWebDavPublicPath;exports.buildWebDavSpacesPath=e.buildWebDavSpacesPath;exports.buildWebDavSpacesTrashPath=e.buildWebDavSpacesTrashPath;exports.extractDomSelector=e.extractDomSelector;exports.extractExtensionFromFile=e.extractExtensionFromFile;exports.extractNameWithoutExtension=e.extractNameWithoutExtension;exports.extractNodeId=e.extractNodeId;exports.extractParentFolderName=e.extractParentFolderName;exports.extractStorageId=e.extractStorageId;exports.getRelativeSpecialFolderSpacePath=e.getRelativeSpecialFolderSpacePath;exports.getSpaceManagers=e.getSpaceManagers;exports.isManager=e.isManager;exports.isMountPointSpaceResource=e.isMountPointSpaceResource;exports.isPersonalSpaceResource=e.isPersonalSpaceResource;exports.isProjectSpaceResource=e.isProjectSpaceResource;exports.isPublicSpaceResource=e.isPublicSpaceResource;exports.isSearchResource=e.isSearchResource;exports.isShareRoot=e.isShareRoot;exports.isShareSpaceResource=e.isShareSpaceResource;exports.isSpaceResource=e.isSpaceResource;exports.isTrashResource=e.isTrashResource;exports.urlJoin=u.urlJoin;exports.SharePermissionBit=n;exports.call=S;exports.createHttpError=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-CDNcS2Ra.cjs"),c=require("./index-_QOU-c0Z.cjs"),a=require("./index-Dn0XwAD_.cjs"),e=require("./functions-K2XX5sqY.cjs"),u=require("./toString-DsGM1XcL.cjs"),S=function*(t){return yield t},l=({message:t,statusCode:o,xReqId:s})=>{const i=new Response(void 0,{headers:{"x-request-id":s},status:o});return new a.HttpError(t,i,o)};class n{static Read=1;static Update=2;static Create=4;static Delete=8;static Share=16}exports.buildCollaboratorShare=r.buildCollaboratorShare;exports.buildIncomingShareResource=r.buildIncomingShareResource;exports.buildLinkShare=r.buildLinkShare;exports.buildOutgoingShareResource=r.buildOutgoingShareResource;exports.getShareResourcePermissions=r.getShareResourcePermissions;exports.getShareResourceRoles=r.getShareResourceRoles;exports.graph=r.graph;exports.isCollaboratorShare=r.isCollaboratorShare;exports.isIncomingShareResource=r.isIncomingShareResource;exports.isLinkShare=r.isLinkShare;exports.isOutgoingShareResource=r.isOutgoingShareResource;exports.isShareResource=r.isShareResource;exports.ocs=c.ocs;exports.DavHttpError=a.DavHttpError;exports.HttpError=a.HttpError;exports.encodePath=a.encodePath;exports.webdav=a.webdav;exports.GraphSharePermission=e.GraphSharePermission;exports.OCM_PROVIDER_ID=e.OCM_PROVIDER_ID;exports.SHARE_JAIL_ID=e.SHARE_JAIL_ID;exports.ShareType=e.ShareType;exports.ShareTypes=e.ShareTypes;exports.buildDeletedResource=e.buildDeletedResource;exports.buildPublicSpaceResource=e.buildPublicSpaceResource;exports.buildResource=e.buildResource;exports.buildShareSpaceResource=e.buildShareSpaceResource;exports.buildSpace=e.buildSpace;exports.buildSpaceImageResource=e.buildSpaceImageResource;exports.buildWebDavOcmPath=e.buildWebDavOcmPath;exports.buildWebDavPublicPath=e.buildWebDavPublicPath;exports.buildWebDavSpacesPath=e.buildWebDavSpacesPath;exports.buildWebDavSpacesTrashPath=e.buildWebDavSpacesTrashPath;exports.extractDomSelector=e.extractDomSelector;exports.extractExtensionFromFile=e.extractExtensionFromFile;exports.extractNameWithoutExtension=e.extractNameWithoutExtension;exports.extractNodeId=e.extractNodeId;exports.extractParentFolderName=e.extractParentFolderName;exports.extractStorageId=e.extractStorageId;exports.getRelativeSpecialFolderSpacePath=e.getRelativeSpecialFolderSpacePath;exports.getSpaceManagers=e.getSpaceManagers;exports.isManager=e.isManager;exports.isMountPointSpaceResource=e.isMountPointSpaceResource;exports.isPersonalSpaceResource=e.isPersonalSpaceResource;exports.isProjectSpaceResource=e.isProjectSpaceResource;exports.isPublicSpaceResource=e.isPublicSpaceResource;exports.isSearchResource=e.isSearchResource;exports.isShareRoot=e.isShareRoot;exports.isShareSpaceResource=e.isShareSpaceResource;exports.isSpaceResource=e.isSpaceResource;exports.isTrashResource=e.isTrashResource;exports.urlJoin=u.urlJoin;exports.SharePermissionBit=n;exports.call=S;exports.createHttpError=l;
@@ -1,9 +1,9 @@
1
- import { k as n, h, l as p, j as d, f as R, e as b, g as m, c as g, b as P, d as x, a as D, i as f } from "./index-Dis7HZol.js";
2
- import { ocs as I } from "./web-client/ocs.js";
3
- import { H as o } from "./index-ZkBDpWBP.js";
4
- import { D as O, e as w, w as H } from "./index-ZkBDpWBP.js";
5
- import { G as k, O as y, x as C, S as F, n as M, m as T, t as _, l as j, u as A, v as L, w as N, a as q, b as B, o as G, p as J, e as z, h as U, g as V, f as K, j as Q, d as X, q as Y, s as Z, r as $, C as ee, z as ae, A as se, D as re, c as oe, k as te, B as ce, y as ie, i as ue } from "./functions-fAVnHNMc.js";
6
- import { u as le } from "./toString-BMC5nz5v.js";
1
+ import { b as n, a as h, c as p, d, g as R, e as b, f as m, i as g, h as P, j as x, k as D, l as f } from "./index-Brk6gzFd.js";
2
+ import { o as I } from "./index-Bjk4YP4o.js";
3
+ import { H as o } from "./index-YuBBVVCr.js";
4
+ import { D as O, e as w, w as H } from "./index-YuBBVVCr.js";
5
+ import { G as k, O as y, S as C, a as F, b as M, c as T, d as _, e as j, f as A, g as L, h as N, i as q, j as B, k as G, l as J, m as z, n as U, o as V, p as K, q as Q, r as X, s as Y, t as Z, u as $, v as ee, w as ae, x as se, y as re, z as oe, A as te, B as ce, C as ie, D as ue } from "./functions-JSgappH3.js";
6
+ import { u as le } from "./toString-CKeGA2IK.js";
7
7
  const c = function* (e) {
8
8
  return yield e;
9
9
  }, i = ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencloud-eu/web-client",
3
- "version": "5.0.0",
3
+ "version": "5.1.0",
4
4
  "description": "OpenCloud web client",
5
5
  "license": "AGPL-3.0",
6
6
  "private": false,
@@ -55,12 +55,11 @@
55
55
  "@casl/ability": "^6.7.1",
56
56
  "@microsoft/fetch-event-source": "^2.0.1",
57
57
  "axios": "^1.7.7",
58
- "fast-xml-parser": "^4.5.0",
58
+ "fast-xml-parser": "^5.0.0",
59
59
  "lodash-es": "^4.17.21",
60
60
  "luxon": "^3.5.0",
61
61
  "uuid": "^13.0.0",
62
62
  "webdav": "^5.7.1",
63
- "xml-js": "^1.6.11",
64
63
  "zod": "^4.0.0"
65
64
  },
66
65
  "scripts": {}
@@ -1 +0,0 @@
1
- "use strict";const b=require("./toString-CEqk2kJI.cjs"),Ie=require("./index-sTep8AuK.cjs");function K(e,r=""){return`/public-files/${e}/${r}`.split("/").filter(Boolean).join("/")}function Y(e,r=""){return`/ocm/${e}/${r}`.split("/").filter(Boolean).join("/")}var U,z;function we(){if(z)return U;z=1;function e(a){if(typeof a!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(a))}function r(a,t){for(var i="",c=0,d=-1,o=0,u,f=0;f<=a.length;++f){if(f<a.length)u=a.charCodeAt(f);else{if(u===47)break;u=47}if(u===47){if(!(d===f-1||o===1))if(d!==f-1&&o===2){if(i.length<2||c!==2||i.charCodeAt(i.length-1)!==46||i.charCodeAt(i.length-2)!==46){if(i.length>2){var p=i.lastIndexOf("/");if(p!==i.length-1){p===-1?(i="",c=0):(i=i.slice(0,p),c=i.length-1-i.lastIndexOf("/")),d=f,o=0;continue}}else if(i.length===2||i.length===1){i="",c=0,d=f,o=0;continue}}t&&(i.length>0?i+="/..":i="..",c=2)}else i.length>0?i+="/"+a.slice(d+1,f):i=a.slice(d+1,f),c=f-d-1;d=f,o=0}else u===46&&o!==-1?++o:o=-1}return i}function n(a,t){var i=t.dir||t.root,c=t.base||(t.name||"")+(t.ext||"");return i?i===t.root?i+c:i+a+c:c}var l={resolve:function(){for(var t="",i=!1,c,d=arguments.length-1;d>=-1&&!i;d--){var o;d>=0?o=arguments[d]:(c===void 0&&(c=Ie.process$1.cwd()),o=c),e(o),o.length!==0&&(t=o+"/"+t,i=o.charCodeAt(0)===47)}return t=r(t,!i),i?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(t){if(e(t),t.length===0)return".";var i=t.charCodeAt(0)===47,c=t.charCodeAt(t.length-1)===47;return t=r(t,!i),t.length===0&&!i&&(t="."),t.length>0&&c&&(t+="/"),i?"/"+t:t},isAbsolute:function(t){return e(t),t.length>0&&t.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var t,i=0;i<arguments.length;++i){var c=arguments[i];e(c),c.length>0&&(t===void 0?t=c:t+="/"+c)}return t===void 0?".":l.normalize(t)},relative:function(t,i){if(e(t),e(i),t===i||(t=l.resolve(t),i=l.resolve(i),t===i))return"";for(var c=1;c<t.length&&t.charCodeAt(c)===47;++c);for(var d=t.length,o=d-c,u=1;u<i.length&&i.charCodeAt(u)===47;++u);for(var f=i.length,p=f-u,v=o<p?o:p,g=-1,h=0;h<=v;++h){if(h===v){if(p>v){if(i.charCodeAt(u+h)===47)return i.slice(u+h+1);if(h===0)return i.slice(u+h)}else o>v&&(t.charCodeAt(c+h)===47?g=h:h===0&&(g=0));break}var j=t.charCodeAt(c+h),De=i.charCodeAt(u+h);if(j!==De)break;j===47&&(g=h)}var y="";for(h=c+g+1;h<=d;++h)(h===d||t.charCodeAt(h)===47)&&(y.length===0?y+="..":y+="/..");return y.length>0?y+i.slice(u+g):(u+=g,i.charCodeAt(u)===47&&++u,i.slice(u))},_makeLong:function(t){return t},dirname:function(t){if(e(t),t.length===0)return".";for(var i=t.charCodeAt(0),c=i===47,d=-1,o=!0,u=t.length-1;u>=1;--u)if(i=t.charCodeAt(u),i===47){if(!o){d=u;break}}else o=!1;return d===-1?c?"/":".":c&&d===1?"//":t.slice(0,d)},basename:function(t,i){if(i!==void 0&&typeof i!="string")throw new TypeError('"ext" argument must be a string');e(t);var c=0,d=-1,o=!0,u;if(i!==void 0&&i.length>0&&i.length<=t.length){if(i.length===t.length&&i===t)return"";var f=i.length-1,p=-1;for(u=t.length-1;u>=0;--u){var v=t.charCodeAt(u);if(v===47){if(!o){c=u+1;break}}else p===-1&&(o=!1,p=u+1),f>=0&&(v===i.charCodeAt(f)?--f===-1&&(d=u):(f=-1,d=p))}return c===d?d=p:d===-1&&(d=t.length),t.slice(c,d)}else{for(u=t.length-1;u>=0;--u)if(t.charCodeAt(u)===47){if(!o){c=u+1;break}}else d===-1&&(o=!1,d=u+1);return d===-1?"":t.slice(c,d)}},extname:function(t){e(t);for(var i=-1,c=0,d=-1,o=!0,u=0,f=t.length-1;f>=0;--f){var p=t.charCodeAt(f);if(p===47){if(!o){c=f+1;break}continue}d===-1&&(o=!1,d=f+1),p===46?i===-1?i=f:u!==1&&(u=1):i!==-1&&(u=-1)}return i===-1||d===-1||u===0||u===1&&i===d-1&&i===c+1?"":t.slice(i,d)},format:function(t){if(t===null||typeof t!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return n("/",t)},parse:function(t){e(t);var i={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return i;var c=t.charCodeAt(0),d=c===47,o;d?(i.root="/",o=1):o=0;for(var u=-1,f=0,p=-1,v=!0,g=t.length-1,h=0;g>=o;--g){if(c=t.charCodeAt(g),c===47){if(!v){f=g+1;break}continue}p===-1&&(v=!1,p=g+1),c===46?u===-1?u=g:h!==1&&(h=1):u!==-1&&(h=-1)}return u===-1||p===-1||h===0||h===1&&u===p-1&&u===f+1?p!==-1&&(f===0&&d?i.base=i.name=t.slice(1,p):i.base=i.name=t.slice(f,p)):(f===0&&d?(i.name=t.slice(1,u),i.base=t.slice(1,p)):(i.name=t.slice(f,u),i.base=t.slice(f,p)),i.ext=t.slice(u,p)),f>0?i.dir=t.slice(0,f-1):d&&(i.dir="/"),i},sep:"/",delimiter:":",win32:null,posix:null};return l.posix=l,U=l,U}var T=we();const W=b.getDefaultExportFromCjs(T);class R{static Shared="S";static Shareable="R";static Mounted="M";static Deletable="D";static Renameable="N";static Moveable="V";static Updateable="NV";static FileUpdateable="W";static FolderCreateable="CK";static Deny="Z";static SecureView="X"}var Q=(e=>(e.copy="COPY",e.delete="DELETE",e.lock="LOCK",e.mkcol="MKCOL",e.move="MOVE",e.propfind="PROPFIND",e.proppatch="PROPPATCH",e.put="PUT",e.report="REPORT",e.unlock="UNLOCK",e))(Q||{});const A=e=>({value:e,type:null}),Le=e=>A(e),m=e=>A(e),w=e=>A(e),ke=e=>A(e),Te={Permissions:m("permissions"),IsFavorite:w("favorite"),FileId:m("fileid"),FileParent:m("file-parent"),Name:m("name"),OwnerId:m("owner-id"),OwnerDisplayName:m("owner-display-name"),PrivateLink:m("privatelink"),ContentLength:w("getcontentlength"),ContentSize:w("size"),LastModifiedDate:m("getlastmodified"),Tags:Le("tags"),Audio:{value:"audio",type:null},Location:{value:"location",type:null},Image:{value:"image",type:null},Photo:{value:"photo",type:null},ETag:m("getetag"),MimeType:m("getcontenttype"),ResourceType:ke("resourcetype"),LockDiscovery:{value:"lockdiscovery",type:null},LockOwner:m("owner"),LockTime:m("locktime"),ActiveLock:{value:"activelock",type:null},DownloadURL:m("downloadURL"),Highlights:m("highlights"),MetaPathForUser:m("meta-path-for-user"),RemoteItemId:m("remote-item-id"),HasPreview:w("has-preview"),ShareId:m("shareid"),ShareRoot:m("shareroot"),ShareTypes:{value:"share-types",type:null},SharePermissions:m("share-permissions"),TrashbinOriginalFilename:m("trashbin-original-filename"),TrashbinOriginalLocation:m("trashbin-original-location"),TrashbinDeletedDate:m("trashbin-delete-datetime"),PublicLinkItemType:m("public-link-item-type"),PublicLinkPermission:m("public-link-permission"),PublicLinkExpiration:m("public-link-expiration"),PublicLinkShareDate:m("public-link-share-datetime"),PublicLinkShareOwner:m("public-link-share-owner")},s=Object.fromEntries(Object.entries(Te).map(([e,r])=>[e,r.value]));class M{static Default=[s.Permissions,s.IsFavorite,s.FileId,s.FileParent,s.Name,s.LockDiscovery,s.ActiveLock,s.OwnerId,s.OwnerDisplayName,s.RemoteItemId,s.ShareRoot,s.ShareTypes,s.PrivateLink,s.ContentLength,s.ContentSize,s.LastModifiedDate,s.ETag,s.MimeType,s.ResourceType,s.Tags,s.Audio,s.Location,s.Image,s.Photo,s.HasPreview];static PublicLink=M.Default.concat([s.PublicLinkItemType,s.PublicLinkPermission,s.PublicLinkExpiration,s.PublicLinkShareDate,s.PublicLinkShareOwner]);static Trashbin=[s.ContentLength,s.ResourceType,s.TrashbinOriginalLocation,s.TrashbinOriginalFilename,s.TrashbinDeletedDate,s.Permissions,s.FileParent];static DavNamespace=[s.ContentLength,s.LastModifiedDate,s.ETag,s.MimeType,s.ResourceType,s.LockDiscovery,s.ActiveLock]}function X(e){return e}function Ae(e,r,n){switch(n.length){case 0:return e.call(r);case 1:return e.call(r,n[0]);case 2:return e.call(r,n[0],n[1]);case 3:return e.call(r,n[0],n[1],n[2])}return e.apply(r,n)}var Ce=800,Oe=16,Ue=Date.now;function Ee(e){var r=0,n=0;return function(){var l=Ue(),a=Oe-(l-n);if(n=l,a>0){if(++r>=Ce)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}function Fe(e){return function(){return e}}var H=(function(){try{var e=b.getNative(Object,"defineProperty");return e({},"",{}),e}catch{}})(),_e=H?function(e,r){return H(e,"toString",{configurable:!0,enumerable:!1,value:Fe(r),writable:!0})}:X,Me=Ee(_e);function $e(e,r,n,l){for(var a=e.length,t=n+-1;++t<a;)if(r(e[t],t,e))return t;return-1}function Ne(e){return e!==e}function je(e,r,n){for(var l=n-1,a=e.length;++l<a;)if(e[l]===r)return l;return-1}function ze(e,r,n){return r===r?je(e,r,n):$e(e,Ne,n)}function G(e,r){var n=e==null?0:e.length;return!!n&&ze(e,r,0)>-1}var V=Math.max;function We(e,r,n){return r=V(r===void 0?e.length-1:r,0),function(){for(var l=arguments,a=-1,t=V(l.length-r,0),i=Array(t);++a<t;)i[a]=l[r+a];a=-1;for(var c=Array(r+1);++a<r;)c[a]=l[a];return c[r]=n(i),Ae(e,this,c)}}function He(e,r){return Me(We(e,r,X),e+"")}var Ve=9007199254740991;function Je(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ve}function Be(e){return e!=null&&Je(e.length)&&!b.isFunction(e)}function Ze(e,r,n){var l=-1,a=e.length;r<0&&(r=-r>a?0:a+r),n=n>a?a:n,n<0&&(n+=a),a=r>n?0:n-r>>>0,r>>>=0;for(var t=Array(a);++l<a;)t[l]=e[l+r];return t}function qe(e,r,n){var l=e.length;return n=n===void 0?l:n,!r&&n>=l?e:Ze(e,r,n)}var Ke="\\ud800-\\udfff",Ye="\\u0300-\\u036f",Qe="\\ufe20-\\ufe2f",Xe="\\u20d0-\\u20ff",Ge=Ye+Qe+Xe,er="\\ufe0e\\ufe0f",rr="\\u200d",tr=RegExp("["+rr+Ke+Ge+er+"]");function ee(e){return tr.test(e)}function ir(e){return e.split("")}var re="\\ud800-\\udfff",nr="\\u0300-\\u036f",sr="\\ufe20-\\ufe2f",ar="\\u20d0-\\u20ff",or=nr+sr+ar,ur="\\ufe0e\\ufe0f",lr="["+re+"]",E="["+or+"]",F="\\ud83c[\\udffb-\\udfff]",cr="(?:"+E+"|"+F+")",te="[^"+re+"]",ie="(?:\\ud83c[\\udde6-\\uddff]){2}",ne="[\\ud800-\\udbff][\\udc00-\\udfff]",dr="\\u200d",se=cr+"?",ae="["+ur+"]?",fr="(?:"+dr+"(?:"+[te,ie,ne].join("|")+")"+ae+se+")*",pr=ae+se+fr,hr="(?:"+[te+E+"?",E,ie,ne,lr].join("|")+")",mr=RegExp(F+"(?="+F+")|"+hr+pr,"g");function gr(e){return e.match(mr)||[]}function br(e){return ee(e)?gr(e):ir(e)}function vr(e){return function(r){r=b.toString(r);var n=ee(r)?br(r):void 0,l=n?n[0]:r.charAt(0),a=n?qe(n,1).join(""):r.slice(1);return l[e]()+a}}var xr=vr("toUpperCase");function Rr(e){return xr(b.toString(e).toLowerCase())}function Sr(e,r,n,l){for(var a=-1,t=e==null?0:e.length;++a<t;)n=r(n,e[a],a,e);return n}function Pr(e){return function(r){return e?.[r]}}var yr={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Dr=Pr(yr),Ir=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,wr="\\u0300-\\u036f",Lr="\\ufe20-\\ufe2f",kr="\\u20d0-\\u20ff",Tr=wr+Lr+kr,Ar="["+Tr+"]",Cr=RegExp(Ar,"g");function Or(e){return e=b.toString(e),e&&e.replace(Ir,Dr).replace(Cr,"")}var Ur=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Er(e){return e.match(Ur)||[]}var Fr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function _r(e){return Fr.test(e)}var oe="\\ud800-\\udfff",Mr="\\u0300-\\u036f",$r="\\ufe20-\\ufe2f",Nr="\\u20d0-\\u20ff",jr=Mr+$r+Nr,ue="\\u2700-\\u27bf",le="a-z\\xdf-\\xf6\\xf8-\\xff",zr="\\xac\\xb1\\xd7\\xf7",Wr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Hr="\\u2000-\\u206f",Vr=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Jr="\\ufe0e\\ufe0f",de=zr+Wr+Hr+Vr,fe="['’]",J="["+de+"]",Br="["+jr+"]",pe="\\d+",Zr="["+ue+"]",he="["+le+"]",me="[^"+oe+de+pe+ue+le+ce+"]",qr="\\ud83c[\\udffb-\\udfff]",Kr="(?:"+Br+"|"+qr+")",Yr="[^"+oe+"]",ge="(?:\\ud83c[\\udde6-\\uddff]){2}",be="[\\ud800-\\udbff][\\udc00-\\udfff]",S="["+ce+"]",Qr="\\u200d",B="(?:"+he+"|"+me+")",Xr="(?:"+S+"|"+me+")",Z="(?:"+fe+"(?:d|ll|m|re|s|t|ve))?",q="(?:"+fe+"(?:D|LL|M|RE|S|T|VE))?",ve=Kr+"?",xe="["+Jr+"]?",Gr="(?:"+Qr+"(?:"+[Yr,ge,be].join("|")+")"+xe+ve+")*",et="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rt="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",tt=xe+ve+Gr,it="(?:"+[Zr,ge,be].join("|")+")"+tt,nt=RegExp([S+"?"+he+"+"+Z+"(?="+[J,S,"$"].join("|")+")",Xr+"+"+q+"(?="+[J,S+B,"$"].join("|")+")",S+"?"+B+"+"+Z,S+"+"+q,rt,et,pe,it].join("|"),"g");function st(e){return e.match(nt)||[]}function at(e,r,n){return e=b.toString(e),r=r,r===void 0?_r(e)?st(e):Er(e):e.match(r)||[]}var ot="['’]",ut=RegExp(ot,"g");function lt(e){return function(r){return Sr(at(Or(r).replace(ut,"")),e,"")}}var ct=lt(function(e,r,n){return r=r.toLowerCase(),e+(n?Rr(r):r)}),dt="__lodash_hash_undefined__";function ft(e){return this.__data__.set(e,dt),this}function pt(e){return this.__data__.has(e)}function I(e){var r=-1,n=e==null?0:e.length;for(this.__data__=new b.MapCache;++r<n;)this.add(e[r])}I.prototype.add=I.prototype.push=ft;I.prototype.has=pt;function _(e,r){return e.has(r)}function ht(e){return b.isObjectLike(e)&&Be(e)}var mt=Math.min;function gt(e,r,n){for(var l=G,a=e[0].length,t=e.length,i=t,c=Array(t),d=1/0,o=[];i--;){var u=e[i];d=mt(u.length,d),c[i]=a>=120&&u.length>=120?new I(i&&u):void 0}u=e[0];var f=-1,p=c[0];e:for(;++f<a&&o.length<d;){var v=u[f],g=v;if(v=v!==0?v:0,!(p?_(p,g):l(o,g))){for(i=t;--i;){var h=c[i];if(!(h?_(h,g):l(e[i],g)))continue e}p&&p.push(g),o.push(v)}}return o}function bt(e){return ht(e)?e:[]}var vt=He(function(e){var r=b.arrayMap(e,bt);return r.length&&r[0]===e[0]?gt(r):[]});const xt={complex:["tar.bz2","tar.gz","tar.xz"]},Rt=e=>Object.hasOwn(e,"ddate"),St=e=>Object.hasOwn(e,"highlights"),C=e=>e.replace(/[^A-Za-z0-9\-_]/g,""),Re=(e,r)=>!e||typeof e!="string"?"":e.indexOf("!")>=0?e.split("!")[r]:"",Se=e=>Re(e,0),$=e=>Re(e,1),Pt=e=>{const r=e.extension||"",n=e.name||"";if(!r.length)return n;const l=n.lastIndexOf(`.${r}`);return n.substring(0,l)},O=e=>{const n=e.name.split(".");if(n.length>2)for(let l=0;l<n.length;l++){const a=n.slice(l,n.length).join(".");if(xt.complex.includes(a))return a}return n.length<2?"":n[n.length-1]},yt=e=>T.basename(T.dirname(e.path))||null,Dt=e=>typeof e.isShareRoot=="function"&&e.isShareRoot(),L=e=>{if(!e)return e;const r={};return Object.keys(e).forEach(n=>{r[ct(n)]=e[n]}),r};function It(e,r=[]){const n=e.props[s.Name]?.toString()||T.basename(e.filename),l=e.props[s.FileId],a=e.type==="directory";let t;e.filename.startsWith("/files")||e.filename.startsWith("/space")?t=e.filename.split("/").slice(3).join("/"):t=e.filename,t.startsWith("/")||(t=`/${t}`);const i=O({...e,name:n}),c=e.props[s.LockDiscovery];let d,o,u;c&&(d=c[s.ActiveLock],o=d[s.LockOwner],u=d[s.LockTime]);let f=[];e.props[s.ShareTypes]&&(f=e.props[s.ShareTypes]["share-type"],Array.isArray(f)||(f=[f]));const p={};for(const g of r||[]){const h=g.split(":").pop();e.props[h]&&(p[g]=e.props[h])}const v={id:l,fileId:l,storageId:Se(l),parentFolderId:e.props[s.FileParent],mimeType:e.props[s.MimeType],name:n,extension:i,path:t,webDavPath:e.filename,type:a?"folder":e.type,isFolder:a,locked:!!d,lockOwner:o,lockTime:u,processing:e.processing||!1,mdate:e.props[s.LastModifiedDate],size:a?e.props[s.ContentSize]?.toString()||"0":e.props[s.ContentLength]?.toString()||"0",permissions:e.props[s.Permissions]||"",starred:e.props[s.IsFavorite]!==0,etag:e.props[s.ETag],shareTypes:f,privateLink:e.props[s.PrivateLink],downloadURL:e.props[s.DownloadURL],remoteItemId:e.props[s.RemoteItemId],remoteItemPath:e.props[s.ShareRoot],owner:{id:e.props[s.OwnerId],displayName:e.props[s.OwnerDisplayName]},tags:(e.props[s.Tags]||"").toString().split(",").filter(Boolean),audio:L(e.props[s.Audio]),location:L(e.props[s.Location]),image:L(e.props[s.Image]),photo:L(e.props[s.Photo]),extraProps:p,hasPreview:()=>e.props[s.HasPreview]===1,canUpload:function(){return this.permissions.indexOf(R.FolderCreateable)>=0},canDownload:function(){return this.permissions.indexOf(R.SecureView)===-1},canBeDeleted:function(){return this.permissions.indexOf(R.Deletable)>=0},canRename:function(){return this.permissions.indexOf(R.Renameable)>=0},canShare:function({ability:g}){return g.can("create-all","Share")&&this.permissions.indexOf(R.Shareable)>=0},canCreate:function(){return this.permissions.indexOf(R.FolderCreateable)>=0},canEditTags:function(){return this.permissions.indexOf(R.Updateable)>=0||this.permissions.indexOf(R.FileUpdateable)>=0||this.permissions.indexOf(R.FolderCreateable)>=0},isMounted:function(){return this.permissions.indexOf(R.Mounted)>=0},isReceivedShare:function(){return this.permissions.indexOf(R.Shared)>=0},isShareRoot(){return e.props[s.ShareRoot]?e.filename.split("/").length===3:!1},getDomSelector:()=>C(l)};return Object.defineProperty(v,"nodeId",{get(){return $(this.id)}}),v}function wt(e){const r=e.type==="directory",n=e.props[s.TrashbinOriginalFilename]?.toString(),l=O({name:n,type:e.type}),a=W.basename(e.filename);return{type:r?"folder":e.type,isFolder:r,ddate:e.props[s.TrashbinDeletedDate],name:W.basename(n),extension:l,path:b.urlJoin(e.props[s.TrashbinOriginalLocation],{leadingSlash:!0}),id:a,parentFolderId:e.props[s.FileParent],webDavPath:"",canUpload:()=>!1,canDownload:()=>!1,canBeDeleted:()=>!0,canBeRestored:function(){return!0},canRename:()=>!1,canShare:()=>!1,canCreate:()=>!1,isMounted:()=>!1,isReceivedShare:()=>!1,hasPreview:()=>!1,isShareRoot:()=>!1,getDomSelector:()=>C(a)}}var x=(e=>(e.createUpload="libre.graph/driveItem/upload/create",e.createPermissions="libre.graph/driveItem/permissions/create",e.createChildren="libre.graph/driveItem/children/create",e.readBasic="libre.graph/driveItem/basic/read",e.readPath="libre.graph/driveItem/path/read",e.readQuota="libre.graph/driveItem/quota/read",e.readContent="libre.graph/driveItem/content/read",e.readChildren="libre.graph/driveItem/children/read",e.readDeleted="libre.graph/driveItem/deleted/read",e.readPermissions="libre.graph/driveItem/permissions/read",e.readVersions="libre.graph/driveItem/versions/read",e.updatePath="libre.graph/driveItem/path/update",e.updateDeleted="libre.graph/driveItem/deleted/update",e.updatePermissions="libre.graph/driveItem/permissions/update",e.updateVersions="libre.graph/driveItem/versions/update",e.deleteStandard="libre.graph/driveItem/standard/delete",e.deleteDeleted="libre.graph/driveItem/deleted/delete",e.deletePermissions="libre.graph/driveItem/permissions/delete",e))(x||{});const D=e=>e;class P{_key;_value;_label;_icon;constructor(r,n,l,a){this._key=r,this._value=n,this._label=l,this._icon=a}get key(){return this._key}get value(){return this._value}get label(){return this._label}get icon(){return this._icon}}class Lt{static user=new P("user",0,D("User"),"user");static group=new P("group",1,D("Group"),"group");static link=new P("link",3,D("Link"),"link");static guest=new P("guest",4,D("Guest"),"global");static remote=new P("remote",6,D("External"),"earth");static individuals=[this.user,this.guest,this.remote];static collectives=[this.group];static unauthenticated=[this.link];static authenticated=[this.user,this.group,this.guest,this.remote];static all=[this.user,this.group,this.link,this.guest,this.remote];static isIndividual(r){return this.individuals.includes(r)}static isCollective(r){return this.collectives.includes(r)}static isUnauthenticated(r){return this.unauthenticated.includes(r)}static isAuthenticated(r){return this.authenticated.includes(r)}static getByValue(r){return this.all.find(n=>n.value===r)}static getByValues(r){return r.map(n=>this.getByValue(n))}static getByKeys(r){return r.map(n=>this.all.find(l=>l.key===n))}static getValues(r){return r.map(n=>n.value)}static containsAnyValue(r,n){return vt(this.getValues(r),n).length>0}}const kt="a0ca6a90-a365-4782-871e-d44447bbc668",Tt="89f37a33-858b-45fa-8890-a1f2b27d90e1",At=e=>e?.type==="space",k=e=>e?.driveType==="personal",Ct=e=>e?.driveType==="project",Ot=e=>e?.driveType==="share",Ut=e=>e?.driveType==="mountpoint",Et=e=>e?.driveType==="public";function Pe(e,r){return b.urlJoin("spaces",e,r,{leadingSlash:!0})}function ye(e,r=""){return b.urlJoin("spaces","trash-bin",e,r,{leadingSlash:!0})}function Ft(e,r){const l=e[{image:"spaceImageData",readme:"spaceReadmeData"}[r]];if(!l)return"";const a=decodeURI(l.webDavUrl).split("/"),t=a.find(i=>i.startsWith(e.id));return t?a.slice(a.indexOf(t)+1).join("/"):""}function _t(e){return e.permissions.includes(x.deletePermissions)}const Mt=(e,r)=>e.root.permissions?.filter(n=>{let l=[];n["@libre.graph.permissions.actions"]&&(l=n["@libre.graph.permissions.actions"]);const a=r[n.roles?.[0]];return a&&!l.length&&(l=a.rolePermissions.find(({condition:i})=>i==="exists @Resource.Root")?.allowedResourceActions||[]),l.includes(x.deletePermissions)});function $t(e){const r=e.publicLinkPassword,n=e.props?.[s.FileId],l=e.props?.[s.PublicLinkItemType],a=e.props?.[s.PublicLinkPermission],t=e.props?.[s.PublicLinkExpiration],i=e.props?.[s.PublicLinkShareDate],c=e.props?.[s.PublicLinkShareOwner],d=e.publicLinkType;let o,u;return d==="ocm"?(o=`ocm/${e.id}`,u=Y(e.id)):(o=`public/${e.id}`,u=K(e.id)),Object.assign(N({...e,driveType:"public",driveAlias:o,webDavPath:u}),{...n&&{fileId:n},...r&&{publicLinkPassword:r},...l&&{publicLinkItemType:l},...a&&{publicLinkPermission:parseInt(a)},...t&&{publicLinkExpiration:t},...i&&{publicLinkShareDate:i},...c&&{publicLinkShareOwner:c},publicLinkType:d})}function Nt({driveAliasPrefix:e,id:r,shareName:n,serverUrl:l}){const a=N({id:r,driveAlias:`${e}/${n}`,driveType:"share",name:n,serverUrl:l});return a.rename=t=>{a.driveAlias=`${e}/${t}`,a.name=t},a}function N(e){let r,n;e.special&&(r=e.special.find(o=>o.specialFolder.name==="image"),n=e.special.find(o=>o.specialFolder.name==="readme"),r&&(r.webDavUrl=decodeURI(r.webDavUrl)),n&&(n.webDavUrl=decodeURI(n.webDavUrl)));const l=e.root?.deleted?.state==="trashed",a=b.urlJoin(e.webDavPath||Pe(e.id),{leadingSlash:!0}),t=b.urlJoin(e.serverUrl,"remote.php/dav",a),i=b.urlJoin(e.webDavTrashPath||ye(e.id),{leadingSlash:!0}),c=b.urlJoin(e.serverUrl,"remote.php/dav",i),d={id:e.id,fileId:e.id,storageId:e.id,mimeType:"",name:e.name,description:e.description,extension:"",path:"/",webDavPath:a,webDavTrashPath:i,driveAlias:e.driveAlias,driveType:e.driveType,type:"space",isFolder:!0,mdate:e.lastModifiedDateTime,size:e.quota?.used||0,tags:[],permissions:"",starred:!1,etag:"",shareTypes:[],privateLink:e.webUrl,downloadURL:"",owner:e.owner?.user,disabled:l,root:e.root,spaceQuota:e.quota,spaceImageData:r,spaceReadmeData:n,hasTrashedItems:e["@libre.graph.hasTrashedItems"]||!1,graphPermissions:void 0,canUpload:function({user:o}={}){return k(this)&&this.isOwner(o)?!0:this.graphPermissions?.includes(x.createUpload)},canDownload:function(){return!0},canBeDeleted:function({ability:o}={}){return this.disabled?o?.can("delete-all","Drive")?!0:this.graphPermissions?.includes(x.deletePermissions):!1},canRename:function({ability:o}={}){return o?.can("update-all","Drive")?!0:this.graphPermissions?.includes(x.deletePermissions)},canEditDescription:function({ability:o}={}){return o?.can("update-all","Drive")?!0:this.graphPermissions?.includes(x.deletePermissions)},canRestore:function({ability:o}={}){return this.disabled?o?.can("update-all","Drive")?!0:this.graphPermissions?.includes(x.deletePermissions):!1},canDisable:function({ability:o}={}){return this.disabled?!1:o?.can("delete-all","Drive")?!0:this.graphPermissions?.includes(x.deletePermissions)},canShare:function(){return this.graphPermissions?.includes(x.createPermissions)},canEditImage:function(){return this.disabled?!1:this.graphPermissions?.includes(x.deletePermissions)},canEditReadme:function(){return this.disabled?!1:this.graphPermissions?.includes(x.deletePermissions)},canRestoreFromTrashbin:function(){return this.graphPermissions?.includes(x.updateDeleted)},canDeleteFromTrashBin:function({user:o}={}){return k(this)&&this.isOwner(o)?!0:this.graphPermissions?.includes(x.deletePermissions)},canListVersions:function({user:o}={}){return k(this)&&this.isOwner(o)?!0:this.graphPermissions?.includes(x.readVersions)},canCreate:function(){return!0},canEditTags:function(){return!1},isMounted:function(){return!0},isReceivedShare:function(){return!1},isShareRoot:function(){return["share","mountpoint","public"].includes(e.driveType)},getDomSelector:()=>C(e.id),getDriveAliasAndItem({path:o}){return b.urlJoin(this.driveAlias,o,{leadingSlash:!1})},getWebDavUrl({path:o}){return b.urlJoin(t,o)},getWebDavTrashUrl({path:o}){return b.urlJoin(c,o)},isOwner(o){return o?.id===this.owner?.id}};return Object.defineProperty(d,"nodeId",{get(){return $(this.id)}}),d}function jt(e){return{id:e.spaceImageData.id,name:e.spaceImageData.name,etag:e.spaceImageData.eTag,extension:O({name:e.spaceImageData.name}),mimeType:e.spaceImageData.file.mimeType,type:"file",webDavPath:b.urlJoin(e.webDavPath,".space",e.spaceImageData.name),hasPreview:()=>!0,canDownload:()=>!0}}exports.DavMethod=Q;exports.DavPermission=R;exports.DavProperties=M;exports.DavProperty=s;exports.GraphSharePermission=x;exports.OCM_PROVIDER_ID=Tt;exports.SHARE_JAIL_ID=kt;exports.SetCache=I;exports.ShareType=P;exports.ShareTypes=Lt;exports.arrayIncludes=G;exports.buildDeletedResource=wt;exports.buildPublicSpaceResource=$t;exports.buildResource=It;exports.buildShareSpaceResource=Nt;exports.buildSpace=N;exports.buildSpaceImageResource=jt;exports.buildWebDavOcmPath=Y;exports.buildWebDavPublicPath=K;exports.buildWebDavSpacesPath=Pe;exports.buildWebDavSpacesTrashPath=ye;exports.cacheHas=_;exports.extractDomSelector=C;exports.extractExtensionFromFile=O;exports.extractNameWithoutExtension=Pt;exports.extractNodeId=$;exports.extractParentFolderName=yt;exports.extractStorageId=Se;exports.getRelativeSpecialFolderSpacePath=Ft;exports.getSpaceManagers=Mt;exports.isManager=_t;exports.isMountPointSpaceResource=Ut;exports.isPersonalSpaceResource=k;exports.isProjectSpaceResource=Ct;exports.isPublicSpaceResource=Et;exports.isSearchResource=St;exports.isShareRoot=Dt;exports.isShareSpaceResource=Ot;exports.isSpaceResource=At;exports.isTrashResource=Rt;
@@ -1,16 +0,0 @@
1
- "use strict";const mr=require("./index-BtxJsB8k.cjs"),R=require("./functions-BqiR_ap_.cjs"),V=require("./toString-CEqk2kJI.cjs"),br=require("./web-client/ocs.cjs"),re=require("./index-sTep8AuK.cjs"),fe=r=>encodeURIComponent(r).split("%2F").join("/");class et extends Error{response;statusCode;constructor(e,t,n=null){super(e),this.response=t,this.statusCode=n}}class Jt extends et{errorCode;constructor(e,t,n,a=null){super(e,n,a),this.errorCode=t}}const se=(r,{fileId:e,path:t,name:n})=>{if(t!==void 0)return V.urlJoin(r.webDavPath,t);if(e!==void 0){if(R.isPublicSpaceResource(r))throw new Error("public spaces need a path provided");return V.urlJoin("spaces",e,n||"")}return r.webDavPath},yr=(r,e)=>({copyFiles(t,{path:n,fileId:a},u,{path:c,parentFolderId:i,name:h},{overwrite:o,...s}={}){const f=se(t,{fileId:a,path:n}),l=se(u,{fileId:i,path:c,name:h});return r.copy(f,l,{overwrite:o||!1,...s})}}),vr=(r,e,t)=>({async createFolder(n,{path:a,parentFolderId:u,folderName:c,fetchFolder:i=!0,...h}){const o=se(n,{fileId:u,path:a,name:c});if(await r.mkcol(o),i)return e.getFileInfo(n,{path:a},h)}}),wr=(r,{axiosClient:e})=>({async getFileContents(t,{fileId:n,path:a},{responseType:u="text",noCache:c=!0,headers:i,...h}={}){try{const o=se(t,{fileId:n,path:a}),s=await e.get(r.getFileUrl(o),{responseType:u,headers:{...c&&{"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(o){const{message:s,response:f}=o;throw new et(s,f,f.status)}}}),Nr=(r,e)=>({async getFileInfo(t,n,a){return(await r.listFiles(t,n,{depth:0,...a})).resource}}),xr=(r,e,t,{axiosClient:n,baseUrl:a})=>({async getFileUrl(u,c,{disposition:i="attachment",version:h=null,username:o="",...s}){if(i==="inline"){const l=await e.getFileContents(u,c,{responseType:"blob",...s});return URL.createObjectURL(l.body)}if(h){if(!o)throw new Error("username is required for URL signing");const l=r.getFileUrl(V.urlJoin("meta",c.fileId,"v",h));return await br.ocs(a,n).signUrl(l,o)}if(c.downloadURL)return c.downloadURL;const{downloadURL:f}=await t.getFileInfo(u,c,{davProperties:[R.DavProperty.DownloadURL]});return f},revokeUrl:u=>{u&&u.startsWith("blob:")&&URL.revokeObjectURL(u)}}),Pr=(r,e)=>({getPublicFileUrl(t,n){return r.getFileUrl(V.urlJoin("public-files",n))}}),Er=(r,e,t)=>({async listFiles(n,{path:a,fileId:u}={},{depth:c=1,davProperties:i,isTrash:h=!1,...o}={}){let s;if(R.isPublicSpaceResource(n)){s=await r.propfind(V.urlJoin(n.webDavPath,a),{depth:c,properties:i||R.DavProperties.PublicLink,...o}),s.forEach(d=>{d.filename=d.filename.split("/").slice(1).join("/")}),s.length===1&&(s[0].filename=V.urlJoin(n.id,a,{leadingSlash:!0})),s.forEach(d=>{d.filename=d.filename.split("/").slice(2).join("/")});const l=n.driveAlias.startsWith("ocm/")?"ocm":"public-link";if((!a||a==="/")&&c>0&&l==="ocm"&&s[0].props[R.DavProperty.PublicLinkItemType]==="file"&&(s=[{basename:n.fileId,type:"directory",filename:"",props:{}},...s]),!a){const[d,...m]=s;return{resource:R.buildPublicSpaceResource({...d,id:n.id,driveAlias:n.driveAlias,webDavPath:n.webDavPath,publicLinkType:l}),children:m.map(w=>R.buildResource(w,r.extraProps))}}const g=s.map(d=>R.buildResource(d,r.extraProps));return{resource:g[0],children:g.slice(1)}}const f=async()=>{const l=await e.getPathForFileId(u);return this.listFiles(n,{path:l},{depth:c,davProperties:i})};try{let l="";if(h?l=R.buildWebDavSpacesTrashPath(n.id):l=se(n,{fileId:u,path:a}),s=await r.propfind(l,{depth:c,properties:i||R.DavProperties.Default,...o}),h)return{resource:R.buildResource(s[0],r.extraProps),children:s.slice(1).map(R.buildDeletedResource)};const g=s.map(m=>R.buildResource(m,r.extraProps)),d=u===n.id;return u&&!d&&g[0].fileId&&u!==g[0].fileId?f():{resource:g[0],children:g.slice(1)}}catch(l){if(l.statusCode===404&&u)return f();throw l}}}),Ar=(r,e)=>({moveFiles(t,{path:n,fileId:a},u,{path:c,parentFolderId:i,name:h},{overwrite:o,...s}={}){const f=se(t,{fileId:a,path:n}),l=se(u,{fileId:i,path:c,name:h});return r.move(f,l,{overwrite:o||!1,...s})}}),Tr=(r,e,t)=>({async putFileContents(n,{fileName:a,path:u,parentFolderId:c,content:i="",previousEntityTag:h="",overwrite:o,onUploadProgress:s=null,...f}){const l=se(n,{fileId:c,name:a,path:u}),{result:g}=await r.put(l,i,{previousEntityTag:h,overwrite:o,onUploadProgress:s,...f});return e.getFileInfo(n,{fileId:g.headers.get("Oc-Fileid"),path:u})}}),Or=(r,e)=>({deleteFile(t,{path:n,...a}){return r.delete(V.urlJoin(t.webDavPath,n),a)}}),Cr=(r,e)=>({restoreFile(t,{id:n},{path:a},{overwrite:u,...c}={}){if(R.isPublicSpaceResource(t))return;const i=V.urlJoin(t.webDavPath,a);return r.move(V.urlJoin(t.webDavTrashPath,n),i,{overwrite:u,...c})}}),Ir=(r,e)=>({restoreFileVersion(t,{parentFolderId:n,name:a,path:u},c,i={}){const h=se(t,{path:u,fileId:n,name:a}),o=V.urlJoin("meta",n,"v",c,{leadingSlash:!0}),s=V.urlJoin("files",h,{leadingSlash:!0});return r.copy(o,s,i)}}),Sr=(r,e)=>({clearTrashBin(t,{id:n,...a}={}){let u=R.buildWebDavSpacesTrashPath(t.id);return n&&(u=V.urlJoin(u,n)),r.delete(u,a)}}),Fr=(r,e)=>({async search(t,{davProperties:n=R.DavProperties.Default,searchLimit:a,...u}){const c="/spaces/",{range:i,results:h}=await r.report(c,{pattern:t,limit:a,properties:n,...u});return{resources:h.map(o=>({...R.buildResource(o,r.extraProps),highlights:o.props[R.DavProperty.Highlights]||""})),totalResults:i?parseInt(i?.split("/")[1]):null}}}),jr=(r,e)=>({async getPathForFileId(t,n={}){return(await r.propfind(V.urlJoin("meta",t,{leadingSlash:!0}),{properties:[R.DavProperty.MetaPathForUser],...n}))[0].props[R.DavProperty.MetaPathForUser]}});var $r={2:r=>{function e(a,u,c){a instanceof RegExp&&(a=t(a,c)),u instanceof RegExp&&(u=t(u,c));var i=n(a,u,c);return i&&{start:i[0],end:i[1],pre:c.slice(0,i[0]),body:c.slice(i[0]+a.length,i[1]),post:c.slice(i[1]+u.length)}}function t(a,u){var c=u.match(a);return c?c[0]:null}function n(a,u,c){var i,h,o,s,f,l=c.indexOf(a),g=c.indexOf(u,l+1),d=l;if(l>=0&&g>0){for(i=[],o=c.length;d>=0&&!f;)d==l?(i.push(d),l=c.indexOf(a,d+1)):i.length==1?f=[i.pop(),g]:((h=i.pop())<o&&(o=h,s=g),g=c.indexOf(u,d+1)),d=l<g&&l>=0?l:g;i.length&&(f=[o,s])}return f}r.exports=e,e.range=n},101:function(r,e,t){var n;r=t.nmd(r),(function(a){var u=(r&&r.exports,typeof re.global=="object"&&re.global);u.global!==u&&u.window;var c=function(f){this.message=f};(c.prototype=new Error).name="InvalidCharacterError";var i=function(f){throw new c(f)},h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=/[\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 l,g,d,m,w=f.length%3,v="",p=-1,y=f.length-w;++p<y;)l=f.charCodeAt(p)<<16,g=f.charCodeAt(++p)<<8,d=f.charCodeAt(++p),v+=h.charAt((m=l+g+d)>>18&63)+h.charAt(m>>12&63)+h.charAt(m>>6&63)+h.charAt(63&m);return w==2?(l=f.charCodeAt(p)<<8,g=f.charCodeAt(++p),v+=h.charAt((m=l+g)>>10)+h.charAt(m>>4&63)+h.charAt(m<<2&63)+"="):w==1&&(m=f.charCodeAt(p),v+=h.charAt(m>>2)+h.charAt(m<<4&63)+"=="),v},decode:function(f){var l=(f=String(f).replace(o,"")).length;l%4==0&&(l=(f=f.replace(/==?$/,"")).length),(l%4==1||/[^+a-zA-Z0-9/]/.test(f))&&i("Invalid character: the string to be decoded is not correctly encoded.");for(var g,d,m=0,w="",v=-1;++v<l;)d=h.indexOf(f.charAt(v)),g=m%4?64*g+d:d,m++%4&&(w+=String.fromCharCode(255&g>>(-2*m&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,a=t.length;a--;){var u=t.charCodeAt(a);56320<=u&&u<=57343&&a--,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=[],a=0;a<t.length;a++)n.push(255&t.charCodeAt(a));return n},bytesToString:function(t){for(var n=[],a=0;a<t.length;a++)n.push(String.fromCharCode(t[a]));return n.join("")}}};r.exports=e},298:r=>{var e,t;e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(n,a){return n<<a|n>>>32-a},rotr:function(n,a){return n<<32-a|n>>>a},endian:function(n){if(n.constructor==Number)return 16711935&t.rotl(n,8)|4278255360&t.rotl(n,24);for(var a=0;a<n.length;a++)n[a]=t.endian(n[a]);return n},randomBytes:function(n){for(var a=[];n>0;n--)a.push(Math.floor(256*Math.random()));return a},bytesToWords:function(n){for(var a=[],u=0,c=0;u<n.length;u++,c+=8)a[c>>>5]|=n[u]<<24-c%32;return a},wordsToBytes:function(n){for(var a=[],u=0;u<32*n.length;u+=8)a.push(n[u>>>5]>>>24-u%32&255);return a},bytesToHex:function(n){for(var a=[],u=0;u<n.length;u++)a.push((n[u]>>>4).toString(16)),a.push((15&n[u]).toString(16));return a.join("")},hexToBytes:function(n){for(var a=[],u=0;u<n.length;u+=2)a.push(parseInt(n.substr(u,2),16));return a},bytesToBase64:function(n){for(var a=[],u=0;u<n.length;u+=3)for(var c=n[u]<<16|n[u+1]<<8|n[u+2],i=0;i<4;i++)8*u+6*i<=8*n.length?a.push(e.charAt(c>>>6*(3-i)&63)):a.push("=");return a.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/gi,"");for(var a=[],u=0,c=0;u<n.length;c=++u%4)c!=0&&a.push((e.indexOf(n.charAt(u-1))&Math.pow(2,-2*c+8)-1)<<2*c|e.indexOf(n.charAt(u))>>>6-2*c);return a}},r.exports=t},635:(r,e,t)=>{const n=t(31),a=t(338),u=t(221);r.exports={XMLParser:a,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]*",a=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,c,i){if(c){const h=Object.keys(c),o=h.length;for(let s=0;s<o;s++)u[h[s]]=i==="strict"?[c[h[s]]]:c[h[s]]}},e.getValue=function(u){return e.isExist(u)?u:""},e.isName=function(u){return a.exec(u)!=null},e.getAllMatches=function(u,c){const i=[];let h=c.exec(u);for(;h;){const o=[];o.startIndex=c.lastIndex-h[0].length;const s=h.length;for(let f=0;f<s;f++)o.push(h[f]);i.push(o),h=c.exec(u)}return i},e.nameRegexp=n},31:(r,e,t)=>{const n=t(705),a={allowBooleanAttributes:!1,unpairedTags:[]};function u(p){return p===" "||p===" "||p===`
2
- `||p==="\r"}function c(p,y){const A=y;for(;y<p.length;y++)if(!(p[y]!="?"&&p[y]!=" ")){const N=p.substr(A,y-A);if(y>5&&N==="xml")return d("InvalidXml","XML declaration allowed only at the start of the document.",w(p,y));if(p[y]=="?"&&p[y+1]==">"){y++;break}}return y}function i(p,y){if(p.length>y+5&&p[y+1]==="-"&&p[y+2]==="-"){for(y+=3;y<p.length;y++)if(p[y]==="-"&&p[y+1]==="-"&&p[y+2]===">"){y+=2;break}}else if(p.length>y+8&&p[y+1]==="D"&&p[y+2]==="O"&&p[y+3]==="C"&&p[y+4]==="T"&&p[y+5]==="Y"&&p[y+6]==="P"&&p[y+7]==="E"){let A=1;for(y+=8;y<p.length;y++)if(p[y]==="<")A++;else if(p[y]===">"&&(A--,A===0))break}else if(p.length>y+9&&p[y+1]==="["&&p[y+2]==="C"&&p[y+3]==="D"&&p[y+4]==="A"&&p[y+5]==="T"&&p[y+6]==="A"&&p[y+7]==="["){for(y+=8;y<p.length;y++)if(p[y]==="]"&&p[y+1]==="]"&&p[y+2]===">"){y+=2;break}}return y}e.validate=function(p,y){y=Object.assign({},a,y);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=c(p,x),x.err)return x}else{if(p[x]!=="<"){if(u(p[x]))continue;return d("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 F;return F=I.trim().length===0?"Invalid space after '<'.":"Tag '"+I+"' is an invalid name.",d("InvalidTag",F,w(p,x))}const C=s(p,x);if(C===!1)return d("InvalidAttr","Attributes for '"+I+"' have open quote.",w(p,x));let P=C.value;if(x=C.index,P[P.length-1]==="/"){const F=x-P.length;P=P.substring(0,P.length-1);const S=l(P,y);if(S!==!0)return d(S.err.code,S.err.msg,w(p,F+S.err.line));N=!0}else if(O){if(!C.tagClosed)return d("InvalidTag","Closing tag '"+I+"' doesn't have proper closing.",w(p,x));if(P.trim().length>0)return d("InvalidTag","Closing tag '"+I+"' can't have attributes or invalid starting.",w(p,T));if(A.length===0)return d("InvalidTag","Closing tag '"+I+"' has not been opened.",w(p,T));{const F=A.pop();if(I!==F.tagName){let S=w(p,F.tagStartPos);return d("InvalidTag","Expected closing tag '"+F.tagName+"' (opened in line "+S.line+", col "+S.col+") instead of closing tag '"+I+"'.",w(p,T))}A.length==0&&(b=!0)}}else{const F=l(P,y);if(F!==!0)return d(F.err.code,F.err.msg,w(p,x-P.length+F.err.line));if(b===!0)return d("InvalidXml","Multiple possible root nodes found.",w(p,x));y.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=c(p,++x),x.err)return x}else if(p[x]==="&"){const F=g(p,x);if(F==-1)return d("InvalidChar","char '&' is not expected.",w(p,x));x=F}else if(b===!0&&!u(p[x]))return d("InvalidXml","Extra text at the end",w(p,x));p[x]==="<"&&x--}}}var E;return N?A.length==1?d("InvalidTag","Unclosed tag '"+A[0].tagName+"'.",w(p,A[0].tagStartPos)):!(A.length>0)||d("InvalidXml","Invalid '"+JSON.stringify(A.map((x=>x.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):d("InvalidXml","Start tag expected.",1)};const h='"',o="'";function s(p,y){let A="",N="",b=!1;for(;y<p.length;y++){if(p[y]===h||p[y]===o)N===""?N=p[y]:N!==p[y]||(N="");else if(p[y]===">"&&N===""){b=!0;break}A+=p[y]}return N===""&&{value:A,index:y,tagClosed:b}}const f=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function l(p,y){const A=n.getAllMatches(p,f),N={};for(let b=0;b<A.length;b++){if(A[b][1].length===0)return d("InvalidAttr","Attribute '"+A[b][2]+"' has no space in starting.",v(A[b]));if(A[b][3]!==void 0&&A[b][4]===void 0)return d("InvalidAttr","Attribute '"+A[b][2]+"' is without value.",v(A[b]));if(A[b][3]===void 0&&!y.allowBooleanAttributes)return d("InvalidAttr","boolean attribute '"+A[b][2]+"' is not allowed.",v(A[b]));const E=A[b][2];if(!m(E))return d("InvalidAttr","Attribute '"+E+"' is an invalid name.",v(A[b]));if(N.hasOwnProperty(E))return d("InvalidAttr","Attribute '"+E+"' is repeated.",v(A[b]));N[E]=1}return!0}function g(p,y){if(p[++y]===";")return-1;if(p[y]==="#")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,++y);let A=0;for(;y<p.length;y++,A++)if(!(p[y].match(/\w/)&&A<20)){if(p[y]===";")break;return-1}return y}function d(p,y,A){return{err:{code:p,msg:y,line:A.line||A,col:A.col}}}function m(p){return n.isName(p)}function w(p,y){const A=p.substring(0,y).split(/\r?\n/);return{line:A.length,col:A[A.length-1].length+1}}function v(p){return p.startIndex+p[1].length}},221:(r,e,t)=>{const n=t(87),a=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 c(s){this.options=Object.assign({},u,s),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=a(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=o),this.processTextOrObjNode=i,this.options.format?(this.indentate=h,this.tagEndChar=`>
4
- `,this.newLine=`
5
- `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function i(s,f,l,g){const d=this.j2x(s,l+1,g.concat(f));return s[this.options.textNodeName]!==void 0&&Object.keys(s).length===1?this.buildTextValNode(s[this.options.textNodeName],f,d.attrStr,l):this.buildObjectNode(d.val,f,d.attrStr,l)}function h(s){return this.options.indentBy.repeat(s)}function o(s){return!(!s.startsWith(this.options.attributeNamePrefix)||s===this.options.textNodeName)&&s.substr(this.attrPrefixLen)}c.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)},c.prototype.j2x=function(s,f,l){let g="",d="";const m=l.join(".");for(let w in s)if(Object.prototype.hasOwnProperty.call(s,w))if(s[w]===void 0)this.isAttribute(w)&&(d+="");else if(s[w]===null)this.isAttribute(w)?d+="":w[0]==="?"?d+=this.indentate(f)+"<"+w+"?"+this.tagEndChar:d+=this.indentate(f)+"<"+w+"/"+this.tagEndChar;else if(s[w]instanceof Date)d+=this.buildTextValNode(s[w],w,"",f);else if(typeof s[w]!="object"){const v=this.isAttribute(w);if(v&&!this.ignoreAttributesFn(v,m))g+=this.buildAttrPairStr(v,""+s[w]);else if(!v)if(w===this.options.textNodeName){let p=this.options.tagValueProcessor(w,""+s[w]);d+=this.replaceEntitiesValue(p)}else d+=this.buildTextValNode(s[w],w,"",f)}else if(Array.isArray(s[w])){const v=s[w].length;let p="",y="";for(let A=0;A<v;A++){const N=s[w][A];if(N!==void 0)if(N===null)w[0]==="?"?d+=this.indentate(f)+"<"+w+"?"+this.tagEndChar:d+=this.indentate(f)+"<"+w+"/"+this.tagEndChar;else if(typeof N=="object")if(this.options.oneListGroup){const b=this.j2x(N,f+1,l.concat(w));p+=b.val,this.options.attributesGroupName&&N.hasOwnProperty(this.options.attributesGroupName)&&(y+=b.attrStr)}else p+=this.processTextOrObjNode(N,w,f,l);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,y,f)),d+=p}else if(this.options.attributesGroupName&&w===this.options.attributesGroupName){const v=Object.keys(s[w]),p=v.length;for(let y=0;y<p;y++)g+=this.buildAttrPairStr(v[y],""+s[w][v[y]])}else d+=this.processTextOrObjNode(s[w],w,f,l);return{attrStr:g,val:d}},c.prototype.buildAttrPairStr=function(s,f){return f=this.options.attributeValueProcessor(s,""+f),f=this.replaceEntitiesValue(f),this.options.suppressBooleanAttributes&&f==="true"?" "+s:" "+s+'="'+f+'"'},c.prototype.buildObjectNode=function(s,f,l,g){if(s==="")return f[0]==="?"?this.indentate(g)+"<"+f+l+"?"+this.tagEndChar:this.indentate(g)+"<"+f+l+this.closeTag(f)+this.tagEndChar;{let d="</"+f+this.tagEndChar,m="";return f[0]==="?"&&(m="?",d=""),!l&&l!==""||s.indexOf("<")!==-1?this.options.commentPropName!==!1&&f===this.options.commentPropName&&m.length===0?this.indentate(g)+`<!--${s}-->`+this.newLine:this.indentate(g)+"<"+f+l+m+this.tagEndChar+s+this.indentate(g)+d:this.indentate(g)+"<"+f+l+m+">"+s+d}},c.prototype.closeTag=function(s){let f="";return this.options.unpairedTags.indexOf(s)!==-1?this.options.suppressUnpairedNode||(f="/"):f=this.options.suppressEmptyNode?"/":`></${s}`,f},c.prototype.buildTextValNode=function(s,f,l,g){if(this.options.cdataPropName!==!1&&f===this.options.cdataPropName)return this.indentate(g)+`<![CDATA[${s}]]>`+this.newLine;if(this.options.commentPropName!==!1&&f===this.options.commentPropName)return this.indentate(g)+`<!--${s}-->`+this.newLine;if(f[0]==="?")return this.indentate(g)+"<"+f+l+"?"+this.tagEndChar;{let d=this.options.tagValueProcessor(f,s);return d=this.replaceEntitiesValue(d),d===""?this.indentate(g)+"<"+f+l+this.closeTag(f)+this.tagEndChar:this.indentate(g)+"<"+f+l+">"+d+"</"+f+this.tagEndChar}},c.prototype.replaceEntitiesValue=function(s){if(s&&s.length>0&&this.options.processEntities)for(let f=0;f<this.options.entities.length;f++){const l=this.options.entities[f];s=s.replace(l.regex,l.val)}return s},r.exports=c},87:r=>{function e(c,i,h,o){let s="",f=!1;for(let l=0;l<c.length;l++){const g=c[l],d=t(g);if(d===void 0)continue;let m="";if(m=h.length===0?d:`${h}.${d}`,d===i.textNodeName){let y=g[d];a(m,i)||(y=i.tagValueProcessor(d,y),y=u(y,i)),f&&(s+=o),s+=y,f=!1;continue}if(d===i.cdataPropName){f&&(s+=o),s+=`<![CDATA[${g[d][0][i.textNodeName]}]]>`,f=!1;continue}if(d===i.commentPropName){s+=o+`<!--${g[d][0][i.textNodeName]}-->`,f=!0;continue}if(d[0]==="?"){const y=n(g[":@"],i),A=d==="?xml"?"":o;let N=g[d][0][i.textNodeName];N=N.length!==0?" "+N:"",s+=A+`<${d}${N}${y}?>`,f=!0;continue}let w=o;w!==""&&(w+=i.indentBy);const v=o+`<${d}${n(g[":@"],i)}`,p=e(g[d],i,m,w);i.unpairedTags.indexOf(d)!==-1?i.suppressUnpairedNode?s+=v+">":s+=v+"/>":p&&p.length!==0||!i.suppressEmptyNode?p&&p.endsWith(">")?s+=v+`>${p}${o}</${d}>`:(s+=v+">",p&&o!==""&&(p.includes("/>")||p.includes("</"))?s+=o+i.indentBy+p+o:s+=p,s+=`</${d}>`):s+=v+"/>",f=!0}return s}function t(c){const i=Object.keys(c);for(let h=0;h<i.length;h++){const o=i[h];if(c.hasOwnProperty(o)&&o!==":@")return o}}function n(c,i){let h="";if(c&&!i.ignoreAttributes)for(let o in c){if(!c.hasOwnProperty(o))continue;let s=i.attributeValueProcessor(o,c[o]);s=u(s,i),s===!0&&i.suppressBooleanAttributes?h+=` ${o.substr(i.attributeNamePrefix.length)}`:h+=` ${o.substr(i.attributeNamePrefix.length)}="${s}"`}return h}function a(c,i){let h=(c=c.substr(0,c.length-i.textNodeName.length-1)).substr(c.lastIndexOf(".")+1);for(let o in i.stopNodes)if(i.stopNodes[o]===c||i.stopNodes[o]==="*."+h)return!0;return!1}function u(c,i){if(c&&c.length>0&&i.processEntities)for(let h=0;h<i.entities.length;h++){const o=i.entities[h];c=c.replace(o.regex,o.val)}return c}r.exports=function(c,i){let h="";return i.format&&i.indentBy.length>0&&(h=`
6
- `),e(c,i,"",h)}},193:(r,e,t)=>{const n=t(705);function a(f,l){let g="";for(;l<f.length&&f[l]!=="'"&&f[l]!=='"';l++)g+=f[l];if(g=g.trim(),g.indexOf(" ")!==-1)throw new Error("External entites are not supported");const d=f[l++];let m="";for(;l<f.length&&f[l]!==d;l++)m+=f[l];return[g,m,l]}function u(f,l){return f[l+1]==="!"&&f[l+2]==="-"&&f[l+3]==="-"}function c(f,l){return f[l+1]==="!"&&f[l+2]==="E"&&f[l+3]==="N"&&f[l+4]==="T"&&f[l+5]==="I"&&f[l+6]==="T"&&f[l+7]==="Y"}function i(f,l){return f[l+1]==="!"&&f[l+2]==="E"&&f[l+3]==="L"&&f[l+4]==="E"&&f[l+5]==="M"&&f[l+6]==="E"&&f[l+7]==="N"&&f[l+8]==="T"}function h(f,l){return f[l+1]==="!"&&f[l+2]==="A"&&f[l+3]==="T"&&f[l+4]==="T"&&f[l+5]==="L"&&f[l+6]==="I"&&f[l+7]==="S"&&f[l+8]==="T"}function o(f,l){return f[l+1]==="!"&&f[l+2]==="N"&&f[l+3]==="O"&&f[l+4]==="T"&&f[l+5]==="A"&&f[l+6]==="T"&&f[l+7]==="I"&&f[l+8]==="O"&&f[l+9]==="N"}function s(f){if(n.isName(f))return f;throw new Error(`Invalid entity name ${f}`)}r.exports=function(f,l){const g={};if(f[l+3]!=="O"||f[l+4]!=="C"||f[l+5]!=="T"||f[l+6]!=="Y"||f[l+7]!=="P"||f[l+8]!=="E")throw new Error("Invalid Tag instead of DOCTYPE");{l+=9;let d=1,m=!1,w=!1,v="";for(;l<f.length;l++)if(f[l]!=="<"||w)if(f[l]===">"){if(w?f[l-1]==="-"&&f[l-2]==="-"&&(w=!1,d--):d--,d===0)break}else f[l]==="["?m=!0:v+=f[l];else{if(m&&c(f,l)){let p,y;l+=7,[p,y,l]=a(f,l+1),y.indexOf("&")===-1&&(g[s(p)]={regx:RegExp(`&${p};`,"g"),val:y})}else if(m&&i(f,l))l+=8;else if(m&&h(f,l))l+=8;else if(m&&o(f,l))l+=9;else{if(!u)throw new Error("Invalid DOCTYPE");w=!0}d++,v=""}if(d!==0)throw new Error("Unclosed DOCTYPE")}return{entities:g,i:l}}},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,a){return a},attributeValueProcessor:function(n,a){return a},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(n,a,u){return n}};e.buildOptions=function(n){return Object.assign({},t,n)},e.defaultOptions=t},299:(r,e,t)=>{const n=t(705),a=t(365),u=t(193),c=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 o(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 l(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 F=T[C][4],S=this.options.attributeNamePrefix+P;if(P.length)if(this.options.transformAttributeName&&(S=this.options.transformAttributeName(S)),S==="__proto__"&&(S="#__proto__"),F!==void 0){this.options.trimValues&&(F=F.trim()),F=this.replaceEntitiesValue(F);const j=this.options.attributeValueProcessor(P,F,E);I[S]=j==null?F:typeof j!=typeof F||j!==F?j:N(F,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(I[S]=!0)}if(!Object.keys(I).length)return;if(this.options.attributesGroupName){const C={};return C[this.options.attributesGroupName]=I,C}return I}}const g=function(b){b=b.replace(/\r\n?/g,`
7
- `);const E=new a("!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 F=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 S=0;F&&this.options.unpairedTags.indexOf(F)!==-1?(S=O.lastIndexOf(".",O.lastIndexOf(".")-1),this.tagsNodeStack.pop()):S=O.lastIndexOf("."),O=O.substring(0,S),x=this.tagsNodeStack.pop(),T="",I=C}else if(b[I+1]==="?"){let C=y(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 a(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 F=this.parseTextData(P,x.tagname,O,!0,!1,!0,!0);F==null&&(F=""),this.options.cdataPropName?x.add(this.options.cdataPropName,[{[this.options.textNodeName]:P}]):x.add(this.options.textNodeName,F),I=C+2}else{let C=y(b,I,this.options.removeNSPrefix),P=C.tagName;const F=C.rawTagName;let S=C.tagExp,j=C.attrExpPresent,B=C.closeIndex;this.options.transformTagName&&(P=this.options.transformTagName(P)),x&&T&&x.tagname!=="!xml"&&(T=this.saveTextToParentTag(T,x,O,!1));const M=x;if(M&&this.options.unpairedTags.indexOf(M.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 $="";if(S.length>0&&S.lastIndexOf("/")===S.length-1)P[P.length-1]==="/"?(P=P.substr(0,P.length-1),O=O.substr(0,O.length-1),S=P):S=S.substr(0,S.length-1),I=C.closeIndex;else if(this.options.unpairedTags.indexOf(P)!==-1)I=C.closeIndex;else{const k=this.readStopNodeData(b,F,B+1);if(!k)throw new Error(`Unexpected end of ${F}`);I=k.i,$=k.tagContent}const J=new a(P);P!==S&&j&&(J[":@"]=this.buildAttributesMap(S,O,P)),$&&($=this.parseTextData($,P,O,!0,j,!0,!0)),O=O.substr(0,O.lastIndexOf(".")),J.add(this.options.textNodeName,$),this.addChild(x,J,O)}else{if(S.length>0&&S.lastIndexOf("/")===S.length-1){P[P.length-1]==="/"?(P=P.substr(0,P.length-1),O=O.substr(0,O.length-1),S=P):S=S.substr(0,S.length-1),this.options.transformTagName&&(P=this.options.transformTagName(P));const $=new a(P);P!==S&&j&&($[":@"]=this.buildAttributesMap(S,O,P)),this.addChild(x,$,O),O=O.substr(0,O.lastIndexOf("."))}else{const $=new a(P);this.tagsNodeStack.push(x),P!==S&&j&&($[":@"]=this.buildAttributesMap(S,O,P)),this.addChild(x,$,O),x=$}T="",I=B}}else T+=b[I];return E.child};function d(b,E,x){const T=this.options.updateTag(E.tagname,x,E[":@"]);T===!1||(typeof T=="string"&&(E.tagname=T),b.addChild(E))}const m=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 v(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 y(b,E,x){const T=(function(j,B){let M,$=arguments.length>2&&arguments[2]!==void 0?arguments[2]:">",J="";for(let k=B;k<j.length;k++){let G=j[k];if(M)G===M&&(M="");else if(G==='"'||G==="'")M=G;else if(G===$[0]){if(!$[1])return{data:J,index:k};if(j[k+1]===$[1])return{data:J,index:k}}else G===" "&&(G=" ");J+=G}})(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,F=!0;C!==-1&&(P=O.substring(0,C),O=O.substring(C+1).trimStart());const S=P;if(x){const j=P.indexOf(":");j!==-1&&(P=P.substr(j+1),F=P!==T.data.substr(j+1))}return{tagName:P,tagExp:O,closeIndex:I,attrExpPresent:F,rawTagName:S}}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=y(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"&&c(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=o,this.resolveNameSpace=s,this.buildAttributesMap=l,this.isItStopNode=v,this.replaceEntitiesValue=m,this.readStopNodeData=A,this.saveTextToParentTag=w,this.addChild=d,this.ignoreAttributesFn=i(this.options.ignoreAttributes)}}},338:(r,e,t)=>{const{buildOptions:n}=t(63),a=t(299),{prettify:u}=t(728),c=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=c.validate(i,h);if(f!==!0)throw Error(`${f.err.msg}:${f.err.line}:${f.err.col}`)}const o=new a(this.options);o.addExternalEntities(this.externalEntities);const s=o.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 '&#xD;'");if(h==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[i]=h}}},728:(r,e)=>{function t(c,i,h){let o;const s={};for(let f=0;f<c.length;f++){const l=c[f],g=n(l);let d="";if(d=h===void 0?g:h+"."+g,g===i.textNodeName)o===void 0?o=l[g]:o+=""+l[g];else{if(g===void 0)continue;if(l[g]){let m=t(l[g],i,d);const w=u(m,i);l[":@"]?a(m,l[":@"],d,i):Object.keys(m).length!==1||m[i.textNodeName]===void 0||i.alwaysCreateTextNode?Object.keys(m).length===0&&(i.alwaysCreateTextNode?m[i.textNodeName]="":m=""):m=m[i.textNodeName],s[g]!==void 0&&s.hasOwnProperty(g)?(Array.isArray(s[g])||(s[g]=[s[g]]),s[g].push(m)):i.isArray(g,d,w)?s[g]=[m]:s[g]=m}}}return typeof o=="string"?o.length>0&&(s[i.textNodeName]=o):o!==void 0&&(s[i.textNodeName]=o),s}function n(c){const i=Object.keys(c);for(let h=0;h<i.length;h++){const o=i[h];if(o!==":@")return o}}function a(c,i,h,o){if(i){const s=Object.keys(i),f=s.length;for(let l=0;l<f;l++){const g=s[l];o.isArray(g,h+"."+g,!0,!0)?c[g]=[i[g]]:c[g]=i[g]}}}function u(c,i){const{textNodeName:h}=i,o=Object.keys(c).length;return o===0||!(o!==1||!c[h]&&typeof c[h]!="boolean"&&c[h]!==0)}e.prettify=function(c,i){return t(c,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),a=t(526).utf8,u=t(135),c=t(526).bin,i=function(h,o){h.constructor==String?h=o&&o.encoding==="binary"?c.stringToBytes(h):a.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,l=1732584193,g=-271733879,d=-1732584194,m=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 v=i._ff,p=i._gg,y=i._hh,A=i._ii;for(w=0;w<s.length;w+=16){var N=l,b=g,E=d,x=m;l=v(l,g,d,m,s[w+0],7,-680876936),m=v(m,l,g,d,s[w+1],12,-389564586),d=v(d,m,l,g,s[w+2],17,606105819),g=v(g,d,m,l,s[w+3],22,-1044525330),l=v(l,g,d,m,s[w+4],7,-176418897),m=v(m,l,g,d,s[w+5],12,1200080426),d=v(d,m,l,g,s[w+6],17,-1473231341),g=v(g,d,m,l,s[w+7],22,-45705983),l=v(l,g,d,m,s[w+8],7,1770035416),m=v(m,l,g,d,s[w+9],12,-1958414417),d=v(d,m,l,g,s[w+10],17,-42063),g=v(g,d,m,l,s[w+11],22,-1990404162),l=v(l,g,d,m,s[w+12],7,1804603682),m=v(m,l,g,d,s[w+13],12,-40341101),d=v(d,m,l,g,s[w+14],17,-1502002290),l=p(l,g=v(g,d,m,l,s[w+15],22,1236535329),d,m,s[w+1],5,-165796510),m=p(m,l,g,d,s[w+6],9,-1069501632),d=p(d,m,l,g,s[w+11],14,643717713),g=p(g,d,m,l,s[w+0],20,-373897302),l=p(l,g,d,m,s[w+5],5,-701558691),m=p(m,l,g,d,s[w+10],9,38016083),d=p(d,m,l,g,s[w+15],14,-660478335),g=p(g,d,m,l,s[w+4],20,-405537848),l=p(l,g,d,m,s[w+9],5,568446438),m=p(m,l,g,d,s[w+14],9,-1019803690),d=p(d,m,l,g,s[w+3],14,-187363961),g=p(g,d,m,l,s[w+8],20,1163531501),l=p(l,g,d,m,s[w+13],5,-1444681467),m=p(m,l,g,d,s[w+2],9,-51403784),d=p(d,m,l,g,s[w+7],14,1735328473),l=y(l,g=p(g,d,m,l,s[w+12],20,-1926607734),d,m,s[w+5],4,-378558),m=y(m,l,g,d,s[w+8],11,-2022574463),d=y(d,m,l,g,s[w+11],16,1839030562),g=y(g,d,m,l,s[w+14],23,-35309556),l=y(l,g,d,m,s[w+1],4,-1530992060),m=y(m,l,g,d,s[w+4],11,1272893353),d=y(d,m,l,g,s[w+7],16,-155497632),g=y(g,d,m,l,s[w+10],23,-1094730640),l=y(l,g,d,m,s[w+13],4,681279174),m=y(m,l,g,d,s[w+0],11,-358537222),d=y(d,m,l,g,s[w+3],16,-722521979),g=y(g,d,m,l,s[w+6],23,76029189),l=y(l,g,d,m,s[w+9],4,-640364487),m=y(m,l,g,d,s[w+12],11,-421815835),d=y(d,m,l,g,s[w+15],16,530742520),l=A(l,g=y(g,d,m,l,s[w+2],23,-995338651),d,m,s[w+0],6,-198630844),m=A(m,l,g,d,s[w+7],10,1126891415),d=A(d,m,l,g,s[w+14],15,-1416354905),g=A(g,d,m,l,s[w+5],21,-57434055),l=A(l,g,d,m,s[w+12],6,1700485571),m=A(m,l,g,d,s[w+3],10,-1894986606),d=A(d,m,l,g,s[w+10],15,-1051523),g=A(g,d,m,l,s[w+1],21,-2054922799),l=A(l,g,d,m,s[w+8],6,1873313359),m=A(m,l,g,d,s[w+15],10,-30611744),d=A(d,m,l,g,s[w+6],15,-1560198380),g=A(g,d,m,l,s[w+13],21,1309151649),l=A(l,g,d,m,s[w+4],6,-145523070),m=A(m,l,g,d,s[w+11],10,-1120210379),d=A(d,m,l,g,s[w+2],15,718787259),g=A(g,d,m,l,s[w+9],21,-343485551),l=l+N>>>0,g=g+b>>>0,d=d+E>>>0,m=m+x>>>0}return n.endian([l,g,d,m])};i._ff=function(h,o,s,f,l,g,d){var m=h+(o&s|~o&f)+(l>>>0)+d;return(m<<g|m>>>32-g)+o},i._gg=function(h,o,s,f,l,g,d){var m=h+(o&f|s&~f)+(l>>>0)+d;return(m<<g|m>>>32-g)+o},i._hh=function(h,o,s,f,l,g,d){var m=h+(o^s^f)+(l>>>0)+d;return(m<<g|m>>>32-g)+o},i._ii=function(h,o,s,f,l,g,d){var m=h+(s^(o|~f))+(l>>>0)+d;return(m<<g|m>>>32-g)+o},i._blocksize=16,i._digestsize=16,r.exports=function(h,o){if(h==null)throw new Error("Illegal argument "+h);var s=n.wordsToBytes(i(h,o));return o&&o.asBytes?s:o&&o.asString?c.bytesToString(s):n.bytesToHex(s)}})()},285:(r,e,t)=>{var n=t(2);r.exports=function(v){return v?(v.substr(0,2)==="{}"&&(v="\\{\\}"+v.substr(2)),w((function(p){return p.split("\\\\").join(a).split("\\{").join(u).split("\\}").join(c).split("\\,").join(i).split("\\.").join(h)})(v),!0).map(s)):[]};var a="\0SLASH"+Math.random()+"\0",u="\0OPEN"+Math.random()+"\0",c="\0CLOSE"+Math.random()+"\0",i="\0COMMA"+Math.random()+"\0",h="\0PERIOD"+Math.random()+"\0";function o(v){return parseInt(v,10)==v?parseInt(v,10):v.charCodeAt(0)}function s(v){return v.split(a).join("\\").split(u).join("{").split(c).join("}").split(i).join(",").split(h).join(".")}function f(v){if(!v)return[""];var p=[],y=n("{","}",v);if(!y)return v.split(",");var A=y.pre,N=y.body,b=y.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 l(v){return"{"+v+"}"}function g(v){return/^-?0\d/.test(v)}function d(v,p){return v<=p}function m(v,p){return v>=p}function w(v,p){var y=[],A=n("{","}",v);if(!A)return[v];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];y.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,F=A.body.indexOf(",")>=0;if(!P&&!F)return A.post.match(/,.*\}/)?w(v=A.pre+"{"+A.body+c+A.post):[v];if(P)T=A.body.split(/\.\./);else if((T=f(A.body)).length===1&&(T=w(T[0],!1).map(l)).length===1)return b.map((function(dr){return A.pre+T[0]+dr}));if(P){var S=o(T[0]),j=o(T[1]),B=Math.max(T[0].length,T[1].length),M=T.length==3?Math.abs(o(T[2])):1,$=d;j<S&&(M*=-1,$=m);var J=T.some(g);O=[];for(var k=S;$(k,j);k+=M){var G;if(C)(G=String.fromCharCode(k))==="\\"&&(G="");else if(G=String(k),J){var ct=B-G.length;if(ct>0){var ht=new Array(ct+1).join("0");G=k<0?"-"+ht+G.slice(1):ht+G}}O.push(G)}}else{O=[];for(var oe=0;oe<T.length;oe++)O.push.apply(O,w(T[oe],!1))}for(oe=0;oe<O.length;oe++)for(E=0;E<b.length;E++)x=N+O[oe]+b[E],(!p||P||x)&&y.push(x)}return y}},829:r=>{function e(o){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(o)}function t(o){var s=typeof Map=="function"?new Map:void 0;return t=function(f){if(f===null||(l=f,Function.toString.call(l).indexOf("[native code]")===-1))return f;var l;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}}),a(g,f)},t(o)}function n(o,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(l,g,d){var m=[null];m.push.apply(m,g);var w=new(Function.bind.apply(l,m));return d&&a(w,d.prototype),w},n.apply(null,arguments)}function a(o,s){return a=Object.setPrototypeOf||function(f,l){return f.__proto__=l,f},a(o,s)}function u(o){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},u(o)}var c=(function(o){function s(f){var l;return(function(g,d){if(!(g instanceof d))throw new TypeError("Cannot call a class as a function")})(this,s),(l=(function(g,d){return!d||e(d)!=="object"&&typeof d!="function"?(function(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m})(g):d})(this,u(s).call(this,f))).name="ObjectPrototypeMutationError",l}return(function(f,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");f.prototype=Object.create(l&&l.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),l&&a(f,l)})(s,o),s})(t(Error));function i(o,s){for(var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},l=s.split("."),g=l.length,d=function(v){var p=l[v];if(!o)return{v:void 0};if(p==="+"){if(Array.isArray(o))return{v:o.map((function(A,N){var b=l.slice(v+1);return b.length>0?i(A,b.join("."),f):f(o,N,l,v)}))};var y=l.slice(0,v).join(".");throw new Error("Object at wildcard (".concat(y,") is not an array"))}o=f(o,p,l,v)},m=0;m<g;m++){var w=d(m);if(e(w)==="object")return w.v}return o}function h(o,s){return o.length===s+1}r.exports={set:function(o,s,f){if(e(o)!="object"||o===null||s===void 0)return o;if(typeof s=="number")return o[s]=f,o[s];try{return i(o,s,(function(l,g,d,m){if(l===Reflect.getPrototypeOf({}))throw new c("Attempting to mutate Object.prototype");if(!l[g]){var w=Number.isInteger(Number(d[m+1])),v=d[m+1]==="+";l[g]=w||v?[]:{}}return h(d,m)&&(l[g]=f),l[g]}))}catch(l){if(l instanceof c)throw l;return o}},get:function(o,s){if(e(o)!="object"||o===null||s===void 0)return o;if(typeof s=="number")return o[s];try{return i(o,s,(function(f,l){return f[l]}))}catch{return o}},has:function(o,s){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(e(o)!="object"||o===null||s===void 0)return!1;if(typeof s=="number")return s in o;try{var l=!1;return i(o,s,(function(g,d,m,w){if(!h(m,w))return g&&g[d];l=f.own?g.hasOwnProperty(d):d in g})),l}catch{return!1}},hasOwn:function(o,s,f){return this.has(o,s,f||{own:!0})},isIn:function(o,s,f){var l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(e(o)!="object"||o===null||s===void 0)return!1;try{var g=!1,d=!1;return i(o,s,(function(m,w,v,p){return g=g||m===f||!!m&&m[w]===f,d=h(v,p)&&e(m)==="object"&&w in m,m&&m[w]})),l.validPath?g&&d:g}catch{return!1}},ObjectPrototypeMutationError:c}},47:(r,e,t)=>{var n=t(410),a=function(o){return typeof o=="string"};function u(o,s){for(var f=[],l=0;l<o.length;l++){var g=o[l];g&&g!=="."&&(g===".."?f.length&&f[f.length-1]!==".."?f.pop():s&&f.push(".."):f.push(g))}return f}var c=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i={};function h(o){return c.exec(o).slice(1)}i.resolve=function(){for(var o="",s=!1,f=arguments.length-1;f>=-1&&!s;f--){var l=f>=0?arguments[f]:re.process$1.cwd();if(!a(l))throw new TypeError("Arguments to path.resolve must be strings");l&&(o=l+"/"+o,s=l.charAt(0)==="/")}return(s?"/":"")+(o=u(o.split("/"),!s).join("/"))||"."},i.normalize=function(o){var s=i.isAbsolute(o),f=o.substr(-1)==="/";return(o=u(o.split("/"),!s).join("/"))||s||(o="."),o&&f&&(o+="/"),(s?"/":"")+o},i.isAbsolute=function(o){return o.charAt(0)==="/"},i.join=function(){for(var o="",s=0;s<arguments.length;s++){var f=arguments[s];if(!a(f))throw new TypeError("Arguments to path.join must be strings");f&&(o+=o?"/"+f:f)}return i.normalize(o)},i.relative=function(o,s){function f(p){for(var y=0;y<p.length&&p[y]==="";y++);for(var A=p.length-1;A>=0&&p[A]==="";A--);return y>A?[]:p.slice(y,A+1)}o=i.resolve(o).substr(1),s=i.resolve(s).substr(1);for(var l=f(o.split("/")),g=f(s.split("/")),d=Math.min(l.length,g.length),m=d,w=0;w<d;w++)if(l[w]!==g[w]){m=w;break}var v=[];for(w=m;w<l.length;w++)v.push("..");return(v=v.concat(g.slice(m))).join("/")},i._makeLong=function(o){return o},i.dirname=function(o){var s=h(o),f=s[0],l=s[1];return f||l?(l&&(l=l.substr(0,l.length-1)),f+l):"."},i.basename=function(o,s){var f=h(o)[2];return s&&f.substr(-1*s.length)===s&&(f=f.substr(0,f.length-s.length)),f},i.extname=function(o){return h(o)[3]},i.format=function(o){if(!n.isObject(o))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof o);var s=o.root||"";if(!a(s))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof o.root);return(o.dir?o.dir+i.sep:"")+(o.base||"")},i.parse=function(o){if(!a(o))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof o);var s=h(o);if(!s||s.length!==4)throw new TypeError("Invalid path '"+o+"'");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 a(u){try{return encodeURIComponent(u)}catch{return null}}e.stringify=function(u,c){c=c||"";var i,h,o=[];for(h in typeof c!="string"&&(c="?"),u)if(t.call(u,h)){if((i=u[h])||i!=null&&!isNaN(i)||(i=""),h=a(h),i=a(i),h===null||i===null)continue;o.push(h+"="+i)}return o.length?c+o.join("&"):""},e.parse=function(u){for(var c,i=/([^=?#&]+)=?([^&]*)/g,h={};c=i.exec(u);){var o=n(c[1]),s=n(c[2]);o===null||s===null||o in h||(h[o]=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(a){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(u=Object.assign({},n,u),!a||typeof a!="string")return a;let c=a.trim();if(u.skipLike!==void 0&&u.skipLike.test(c))return a;if(u.hex&&e.test(c))return Number.parseInt(c,16);{const h=t.exec(c);if(h){const o=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 l=h[4]||h[6];if(!u.leadingZeros&&s.length>0&&o&&c[2]!=="."||!u.leadingZeros&&s.length>0&&!o&&c[1]!==".")return a;{const g=Number(c),d=""+g;return d.search(/[eE]/)!==-1||l?u.eNotation?g:a:c.indexOf(".")!==-1?d==="0"&&f===""||d===f||o&&d==="-"+f?g:a:s?f===d||o+f===d?g:a:c===d||c===o+d?g:a}}return a}var i}},737:(r,e,t)=>{var n=t(670),a=t(647),u=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,c=/[\n\r\t]/g,i=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,h=/:\d+$/,o=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,s=/^[a-zA-Z]:/;function f(p){return(p||"").toString().replace(u,"")}var l=[["#","hash"],["?","query"],function(p,y){return m(y.protocol)?p.replace(/\\/g,"/"):p},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],g={hash:1,query:1};function d(p){var y,A=(typeof window<"u"?window:typeof re.global<"u"?re.global:typeof self<"u"?self:{}).location||{},N={},b=typeof(p=p||A);if(p.protocol==="blob:")N=new v(unescape(p.pathname),{});else if(b==="string")for(y in N=new v(p,{}),g)delete N[y];else if(b==="object"){for(y in p)y in g||(N[y]=p[y]);N.slashes===void 0&&(N.slashes=i.test(p.href))}return N}function m(p){return p==="file:"||p==="ftp:"||p==="http:"||p==="https:"||p==="ws:"||p==="wss:"}function w(p,y){p=(p=f(p)).replace(c,""),y=y||{};var A,N=o.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)):m(b)?A=N[4]:b?E&&(A=A.slice(2)):T>=2&&m(y.protocol)&&(A=N[4]),{protocol:b,slashes:E||m(b),slashesCount:T,rest:A}}function v(p,y,A){if(p=(p=f(p)).replace(c,""),!(this instanceof v))return new v(p,y,A);var N,b,E,x,T,O,I=l.slice(),C=typeof y,P=this,F=0;for(C!=="object"&&C!=="string"&&(A=y,y=null),A&&typeof A!="function"&&(A=a.parse),N=!(b=w(p||"",y=d(y))).protocol&&!b.slashes,P.slashes=b.slashes||N&&y.slashes,P.protocol=b.protocol||y.protocol||"",p=b.rest,(b.protocol==="file:"&&(b.slashesCount!==2||s.test(p))||!b.slashes&&(b.protocol||b.slashesCount<2||!m(P.protocol)))&&(I[3]=[/(.*)/,"pathname"]);F<I.length;F++)typeof(x=I[F])!="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]&&y[O]||"",x[4]&&(P[O]=P[O].toLowerCase())):p=x(p,P);A&&(P.query=A(P.query)),N&&y.slashes&&P.pathname.charAt(0)!=="/"&&(P.pathname!==""||y.pathname!=="")&&(P.pathname=(function(S,j){if(S==="")return j;for(var B=(j||"/").split("/").slice(0,-1).concat(S.split("/")),M=B.length,$=B[M-1],J=!1,k=0;M--;)B[M]==="."?B.splice(M,1):B[M]===".."?(B.splice(M,1),k++):k&&(M===0&&(J=!0),B.splice(M,1),k--);return J&&B.unshift(""),$!=="."&&$!==".."||B.push(""),B.join("/")})(P.pathname,y.pathname)),P.pathname.charAt(0)!=="/"&&m(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:"&&m(P.protocol)&&P.host?P.protocol+"//"+P.host:"null",P.href=P.toString()}v.prototype={set:function(p,y,A){var N=this;switch(p){case"query":typeof y=="string"&&y.length&&(y=(A||a.parse)(y)),N[p]=y;break;case"port":N[p]=y,n(y,N.protocol)?y&&(N.host=N.hostname+":"+y):(N.host=N.hostname,N[p]="");break;case"hostname":N[p]=y,N.port&&(y+=":"+N.port),N.host=y;break;case"host":N[p]=y,h.test(y)?(y=y.split(":"),N.port=y.pop(),N.hostname=y.join(":")):(N.hostname=y,N.port="");break;case"protocol":N.protocol=y.toLowerCase(),N.slashes=!A;break;case"pathname":case"hash":if(y){var b=p==="pathname"?"/":"#";N[p]=y.charAt(0)!==b?b+y:y}else N[p]=y;break;case"username":case"password":N[p]=encodeURIComponent(y);break;case"auth":var E=y.indexOf(":");~E?(N.username=y.slice(0,E),N.username=encodeURIComponent(decodeURIComponent(N.username)),N.password=y.slice(E+1),N.password=encodeURIComponent(decodeURIComponent(N.password))):N.username=encodeURIComponent(decodeURIComponent(y))}for(var x=0;x<l.length;x++){var T=l[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:"&&m(N.protocol)&&N.host?N.protocol+"//"+N.host:"null",N.href=N.toString(),N},toString:function(p){p&&typeof p=="function"||(p=a.stringify);var y,A=this,N=A.host,b=A.protocol;b&&b.charAt(b.length-1)!==":"&&(b+=":");var E=b+(A.protocol&&A.slashes||m(A.protocol)?"//":"");return A.username?(E+=A.username,A.password&&(E+=":"+A.password),E+="@"):A.password?(E+=":"+A.password,E+="@"):A.protocol!=="file:"&&m(A.protocol)&&!N&&A.pathname!=="/"&&(E+="@"),(N[N.length-1]===":"||h.test(A.hostname)&&!A.port)&&(N+=":"),E+=N+A.pathname,(y=typeof A.query=="object"?p(A.query):A.query)&&(E+=y.charAt(0)!=="?"?"?"+y:y),A.hash&&(E+=A.hash),E}},v.extractProtocol=w,v.location=d,v.trimLeft=f,v.qs=a,r.exports=v},410:()=>{},388:()=>{},805:()=>{},345:()=>{},800:()=>{}},ft={};function L(r){var e=ft[r];if(e!==void 0)return e.exports;var t=ft[r]={id:r,loaded:!1,exports:{}};return $r[r].call(t.exports,t,t.exports,L),t.loaded=!0,t.exports}L.n=r=>{var e=r&&r.__esModule?()=>r.default:()=>r;return L.d(e,{a:e}),e},L.d=(r,e)=>{for(var t in e)L.o(e,t)&&!L.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:e[t]})},L.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),L.nmd=r=>(r.paths=[],r.children||(r.children=[]),r);var te={};L.d(te,{hT:()=>Y,O4:()=>ie,Kd:()=>qr,YK:()=>Wr,UU:()=>Yn,Gu:()=>Kt,ky:()=>or,h4:()=>me,ch:()=>Te,hq:()=>ae,i5:()=>ar});var Rr=L(737),Lr=L.n(Rr);function Oe(r){if(!He(r))throw new Error("Parameter was not an error")}function He(r){return!!r&&typeof r=="object"&&(e=r,Object.prototype.toString.call(e)==="[object Error]")||r instanceof Error;var e}class Q extends Error{constructor(e,t){const n=[...arguments],{options:a,shortMessage:u}=(function(i){let h,o="";if(i.length===0)h={};else if(He(i[0]))h={cause:i[0]},o=i.slice(1).join(" ")||"";else if(i[0]&&typeof i[0]=="object")h=Object.assign({},i[0]),o=i.slice(1).join(" ")||"";else{if(typeof i[0]!="string")throw new Error("Invalid arguments passed to Layerr");h={},o=o=i.join(" ")||""}return{options:h,shortMessage:o}})(n);let c=u;if(a.cause&&(c=`${c}: ${a.cause.message}`),super(c),this.message=c,a.name&&typeof a.name=="string"?this.name=a.name:this.name="Layerr",a.cause&&Object.defineProperty(this,"_cause",{value:a.cause}),Object.defineProperty(this,"_info",{value:{}}),a.info&&typeof a.info=="object"&&Object.assign(this._info,a.info),Error.captureStackTrace){const i=a.constructorOpt||this.constructor;Error.captureStackTrace(this,i)}}static cause(e){return Oe(e),e._cause&&He(e._cause)?e._cause:null}static fullStack(e){Oe(e);const t=Q.cause(e);return t?`${e.stack}
8
- caused by: ${Q.fullStack(t)}`:e.stack??""}static info(e){Oe(e);const t={},n=Q.cause(e);return n&&Object.assign(t,Q.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 kr=L(47),ve=L.n(kr);const pt="__PATH_SEPARATOR_POSIX__",gt="__PATH_SEPARATOR_WINDOWS__";function U(r){try{const e=r.replace(/\//g,pt).replace(/\\\\/g,gt);return encodeURIComponent(e).split(gt).join("\\\\").split(pt).join("/")}catch(e){throw new Q(e,"Failed encoding path")}}function dt(r){return r.startsWith("/")?r:"/"+r}function de(r){let e=r;return e[0]!=="/"&&(e="/"+e),/^.+\/$/.test(e)&&(e=e.substr(0,e.length-1)),e}function Ur(r){let e=new(Lr())(r).pathname;return e.length<=0&&(e="/"),de(e)}function _(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];return(function(){return(function(n){var a=[];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 c=0;c<n.length;c++){var i=n[c];if(typeof i!="string")throw new TypeError("Url must be a string. Received "+i);i!==""&&(c>0&&(i=i.replace(/^[\/]+/,"")),i=c<n.length-1?i.replace(/[\/]+$/,""):i.replace(/[\/]+$/,"/"),a.push(i))}var h=a.join("/"),o=(h=h.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return o.shift()+(o.length>0?"?":"")+o.join("&")})(typeof arguments[0]=="object"?arguments[0]:[].slice.call(arguments))})(e.reduce(((n,a,u)=>((u===0||a!=="/"||a==="/"&&n[n.length-1]!=="/")&&n.push(a),n)),[]))}var _r=L(542),ce=L.n(_r);const Mr="abcdef0123456789";function mt(r,e){const t=r.url.replace("//",""),n=t.indexOf("/")==-1?"/":t.slice(t.indexOf("/")),a=r.method?r.method.toUpperCase():"GET",u=!!/(^|,)\s*auth\s*($|,)/.test(e.qop)&&"auth",c=`00000000${e.nc}`.slice(-8),i=(function(l,g,d,m,w,v,p){const y=p||ce()(`${g}:${d}:${m}`);return l&&l.toLowerCase()==="md5-sess"?ce()(`${y}:${w}:${v}`):y})(e.algorithm,e.username,e.realm,e.password,e.nonce,e.cnonce,e.ha1),h=ce()(`${a}:${n}`),o=u?ce()(`${i}:${e.nonce}:${c}:${e.cnonce}:${u}:${h}`):ce()(`${i}:${e.nonce}:${h}`),s={username:e.username,realm:e.realm,nonce:e.nonce,uri:n,qop:u,response:o,nc:c,cnonce:e.cnonce,algorithm:e.algorithm,opaque:e.opaque},f=[];for(const l in s)s[l]&&(l==="qop"||l==="nc"||l==="algorithm"?f.push(`${l}=${s[l]}`):f.push(`${l}="${s[l]}"`));return`Digest ${f.join(", ")}`}function Ht(r){return(r.headers&&r.headers.get("www-authenticate")||"").split(/\s/)[0].toLowerCase()==="digest"}var Vr=L(101),Zt=L.n(Vr);function bt(r){return Zt().decode(r)}function yt(r,e){var t;return`Basic ${t=`${r}:${e}`,Zt().encode(t)}`}const we=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:typeof window<"u"?window:globalThis,Br=we.fetch.bind(we),qr=we.Request,Wr=we.Response;let Y=(function(r){return r.Auto="auto",r.Digest="digest",r.None="none",r.Password="password",r.Token="token",r})({}),ie=(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 Yt(r,e,t,n,a){switch(r.authType){case Y.Auto:e&&t&&(r.headers.Authorization=yt(e,t));break;case Y.Digest:r.digest=(function(c,i,h){return{username:c,password:i,ha1:h,nc:0,algorithm:"md5",hasDigestAuth:!1}})(e,t,a);break;case Y.None:break;case Y.Password:r.headers.Authorization=yt(e,t);break;case Y.Token:r.headers.Authorization=`${(u=n).token_type} ${u.access_token}`;break;default:throw new Q({info:{code:ie.InvalidAuthType}},`Invalid auth type: ${r.authType}`)}var u}L(345),L(800);const vt="@@HOTPATCHER",Xr=()=>{};function Ce(r){return{original:r,methods:[r],final:!1}}class Gr{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=vt}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__!==vt)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)||Xr;for(var n=arguments.length,a=new Array(n>1?n-1:0),u=1;u<n;u++)a[u-1]=arguments[u];return t(...a)}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,a=new Array(n),u=0;u<n;u++)a[u]=arguments[u];if(a.length===0)throw new Error("Failed creating sequence: No functions provided");return function(){for(var c=arguments.length,i=new Array(c),h=0;h<c;h++)i[h]=arguments[h];let o=i;const s=this;for(;a.length>0;)o=[a.shift().apply(s,o)];return o[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:a=!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(a)this.configuration.registry[e]?this.configuration.registry[e].methods.push(t):this.configuration.registry[e]=Ce(t);else if(this.isPatched(e)){const{original:u}=this.configuration.registry[e];this.configuration.registry[e]=Object.assign(Ce(t),{original:u})}else this.configuration.registry[e]=Ce(t);return this}patchInline(e,t){this.isPatched(e)||this.patch(e,t);for(var n=arguments.length,a=new Array(n>2?n-2:0),u=2;u<n;u++)a[u-2]=arguments[u];return this.execute(e,...a)}plugin(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];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 Ie=null;function Kt(){return Ie||(Ie=new Gr),Ie}function Ne(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,a=[...e];for(;a.length>0;){const u=a.shift();n=n?Qt(n,u):Ne(u)}return n}function Qt(r,e){const t=Ne(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]?Qt(t[n],e[n]):Ne(e[n]):t[n]=e[n]:t[n]=e[n]})),t}function zr(r){const e={};for(const t of r.keys())e[t]=r.get(t);return e}function Ze(){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(((a,u)=>(Object.keys(u).forEach((c=>{const i=c.toLowerCase();n.hasOwnProperty(i)?a[n[i]]=u[c]:(n[i]=c,a[c]=u[c])})),a)),{})}L(805);const Jr=typeof ArrayBuffer=="function",{toString:Hr}=Object.prototype;function Dt(r){return Jr&&(r instanceof ArrayBuffer||Hr.call(r)==="[object ArrayBuffer]")}function er(r){return r!=null&&r.constructor!=null&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function tt(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 Ye(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const tr=tt((function(r){const e=r._digest;return delete r._digest,e.hasDigestAuth&&(r=wt(r,{headers:{Authorization:mt(r,e)}})),Ye(xe(r),(function(t){let n=!1;return a=function(c){return n?c:t},(u=(function(){if(t.status==401)return e.hasDigestAuth=(function(c,i){if(!Ht(c))return!1;const h=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){const o=c.headers&&c.headers.get("www-authenticate")||"",s=h.exec(o);if(!s)break;i[s[1]]=s[2]||s[3]}return i.nc+=1,i.cnonce=(function(){let o="";for(let s=0;s<32;++s)o=`${o}${Mr[Math.floor(16*Math.random())]}`;return o})(),!0})(t,e),(function(){if(e.hasDigestAuth)return Ye(xe(r=wt(r,{headers:{Authorization:mt(r,e)}})),(function(c){return c.status==401?e.hasDigestAuth=!1:e.nc++,n=!0,c}))})();e.nc++})())&&u.then?u.then(a):a(u);var a,u}))})),Zr=tt((function(r,e){return Ye(xe(r),(function(t){return t.ok?(e.authType=Y.Password,t):t.status==401&&Ht(t)?(e.authType=Y.Digest,Yt(e,e.username,e.password,void 0,void 0),r._digest=e.digest,tr(r)):t}))})),q=tt((function(r,e){return e.authType===Y.Auto?Zr(r,e):r._digest?tr(r):xe(r)}));function W(r,e,t){const n=Ne(r);return n.headers=Ze(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 xe(r){const e=Kt();return e.patchInline("request",(t=>e.patchInline("fetch",Br,t.url,(function(n){let a={};const u={method:n.method};if(n.headers&&(a=Ze(a,n.headers)),n.data!==void 0){const[c,i]=(function(h){if(typeof h=="string")return[h,{}];if(er(h))return[h,{}];if(Dt(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=c,a=Ze(a,i)}return n.signal&&(u.signal=n.signal),n.withCredentials&&(u.credentials="include"),u.headers=a,u})(t))),r)}var Yr=L(285);const Pe=r=>{if(typeof r!="string")throw new TypeError("invalid pattern");if(r.length>65536)throw new TypeError("pattern is too long")},Kr={"[: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]},he=r=>r.replace(/[[\]\\-]/g,"\\$&"),Nt=r=>r.join(""),Qr=(r,e)=>{const t=e;if(r.charAt(t)!=="[")throw new Error("not in a brace expression");const n=[],a=[];let u=t+1,c=!1,i=!1,h=!1,o=!1,s=t,f="";e:for(;u<r.length;){const m=r.charAt(u);if(m!=="!"&&m!=="^"||u!==t+1){if(m==="]"&&c&&!h){s=u+1;break}if(c=!0,m!=="\\"||h){if(m==="["&&!h){for(const[w,[v,p,y]]of Object.entries(Kr))if(r.startsWith(w,u)){if(f)return["$.",!1,r.length-t,!0];u+=w.length,y?a.push(v):n.push(v),i=i||p;continue e}}h=!1,f?(m>f?n.push(he(f)+"-"+he(m)):m===f&&n.push(he(m)),f="",u++):r.startsWith("-]",u+1)?(n.push(he(m+"-")),u+=2):r.startsWith("-",u+1)?(f=m,u+=2):(n.push(he(m)),u++)}else h=!0,u++}else o=!0,u++}if(s<u)return["",!1,0,!1];if(!n.length&&!a.length)return["$.",!1,r.length-t,!0];if(a.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!o)return[(l=n[0].length===2?n[0].slice(-1):n[0],l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,s-t,!1];var l;const g="["+(o?"^":"")+Nt(n)+"]",d="["+(o?"":"^")+Nt(a)+"]";return[n.length&&a.length?"("+g+"|"+d+")":n.length?g:d,i,s-t,!0]},pe=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")},Dr=new Set(["!","?","+","*","@"]),xt=r=>Dr.has(r),Se="(?!\\.)",en=new Set(["[","."]),tn=new Set(["..","."]),rn=new Set("().*{}+?[]^$\\!"),rt="[^/]",Pt=rt+"*?",Et=rt+"+?";class Z{type;#r;#n;#i=!1;#e=[];#t;#o;#u;#a=!1;#s;#l;#h=!1;constructor(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.type=e,e&&(this.#n=!0),this.#t=t,this.#r=this.#t?this.#t.#r:this,this.#s=this.#r===this?n:this.#r.#s,this.#u=this.#r===this?[]:this.#r.#u,e!=="!"||this.#r.#a||this.#u.push(this),this.#o=this.#t?this.#t.#e.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(const e of this.#e)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#l!==void 0?this.#l:this.type?this.#l=this.type+"("+this.#e.map((e=>String(e))).join("|")+")":this.#l=this.#e.map((e=>String(e))).join("")}#p(){if(this!==this.#r)throw new Error("should only call on root");if(this.#a)return this;let e;for(this.toString(),this.#a=!0;e=this.#u.pop();){if(e.type!=="!")continue;let t=e,n=t.#t;for(;n;){for(let a=t.#o+1;!n.type&&a<n.#e.length;a++)for(const u of e.#e){if(typeof u=="string")throw new Error("string part in extglob AST??");u.copyIn(n.#e[a])}t=n,n=t.#t}}return this}push(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(const a of t)if(a!==""){if(typeof a!="string"&&!(a instanceof Z&&a.#t===this))throw new Error("invalid part: "+a);this.#e.push(a)}}toJSON(){const e=this.type===null?this.#e.slice().map((t=>typeof t=="string"?t:t.toJSON())):[this.type,...this.#e.map((t=>t.toJSON()))];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#r||this.#r.#a&&this.#t?.type==="!")&&e.push({}),e}isStart(){if(this.#r===this)return!0;if(!this.#t?.isStart())return!1;if(this.#o===0)return!0;const e=this.#t;for(let t=0;t<this.#o;t++){const n=e.#e[t];if(!(n instanceof Z&&n.type==="!"))return!1}return!0}isEnd(){if(this.#r===this||this.#t?.type==="!")return!0;if(!this.#t?.isEnd())return!1;if(!this.type)return this.#t?.isEnd();const e=this.#t?this.#t.#e.length:0;return this.#o===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){const t=new Z(this.type,e);for(const n of this.#e)t.copyIn(n);return t}static#c(e,t,n,a){let u=!1,c=!1,i=-1,h=!1;if(t.type===null){let g=n,d="";for(;g<e.length;){const m=e.charAt(g++);if(u||m==="\\")u=!u,d+=m;else if(c)g===i+1?m!=="^"&&m!=="!"||(h=!0):m!=="]"||g===i+2&&h||(c=!1),d+=m;else if(m!=="[")if(a.noext||!xt(m)||e.charAt(g)!=="(")d+=m;else{t.push(d),d="";const w=new Z(m,t);g=Z.#c(e,w,g,a),t.push(w)}else c=!0,i=g,h=!1,d+=m}return t.push(d),g}let o=n+1,s=new Z(null,t);const f=[];let l="";for(;o<e.length;){const g=e.charAt(o++);if(u||g==="\\")u=!u,l+=g;else if(c)o===i+1?g!=="^"&&g!=="!"||(h=!0):g!=="]"||o===i+2&&h||(c=!1),l+=g;else if(g!=="[")if(xt(g)&&e.charAt(o)==="("){s.push(l),l="";const d=new Z(g,s);s.push(d),o=Z.#c(e,d,o,a)}else if(g!=="|"){if(g===")")return l===""&&t.#e.length===0&&(t.#h=!0),s.push(l),l="",t.push(...f,s),o;l+=g}else s.push(l),l="",f.push(s),s=new Z(null,t);else c=!0,i=o,h=!1,l+=g}return t.type=null,t.#n=void 0,t.#e=[e.substring(n-1)],o}static fromGlob(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=new Z(null,void 0,t);return Z.#c(e,n,0,t),n}toMMPattern(){if(this!==this.#r)return this.#r.toMMPattern();const e=this.toString(),[t,n,a,u]=this.toRegExpSource();if(!(a||this.#n||this.#s.nocase&&!this.#s.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;const c=(this.#s.nocase?"i":"")+(u?"u":"");return Object.assign(new RegExp(`^${t}$`,c),{_src:t,_glob:e})}get options(){return this.#s}toRegExpSource(e){const t=e??!!this.#s.dot;if(this.#r===this&&this.#p(),!this.type){const h=this.isStart()&&this.isEnd(),o=this.#e.map((l=>{const[g,d,m,w]=typeof l=="string"?Z.#g(l,this.#n,h):l.toRegExpSource(e);return this.#n=this.#n||m,this.#i=this.#i||w,g})).join("");let s="";if(this.isStart()&&typeof this.#e[0]=="string"&&(this.#e.length!==1||!tn.has(this.#e[0]))){const l=en,g=t&&l.has(o.charAt(0))||o.startsWith("\\.")&&l.has(o.charAt(2))||o.startsWith("\\.\\.")&&l.has(o.charAt(4)),d=!t&&!e&&l.has(o.charAt(0));s=g?"(?!(?:^|/)\\.\\.?(?:$|/))":d?Se:""}let f="";return this.isEnd()&&this.#r.#a&&this.#t?.type==="!"&&(f="(?:$|\\/)"),[s+o+f,pe(o),this.#n=!!this.#n,this.#i]}const n=this.type==="*"||this.type==="+",a=this.type==="!"?"(?:(?!(?:":"(?:";let u=this.#f(t);if(this.isStart()&&this.isEnd()&&!u&&this.type!=="!"){const h=this.toString();return this.#e=[h],this.type=null,this.#n=void 0,[h,pe(this.toString()),!1,!1]}let c=!n||e||t?"":this.#f(!0);c===u&&(c=""),c&&(u=`(?:${u})(?:${c})*?`);let i="";return i=this.type==="!"&&this.#h?(this.isStart()&&!t?Se:"")+Et:a+u+(this.type==="!"?"))"+(!this.isStart()||t||e?"":Se)+Pt+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&c?")":this.type==="*"&&c?")?":`)${this.type}`),[i,pe(u),this.#n=!!this.#n,this.#i]}#f(e){return this.#e.map((t=>{if(typeof t=="string")throw new Error("string type in extglob ast??");const[n,a,u,c]=t.toRegExpSource(e);return this.#i=this.#i||c,n})).filter((t=>!(this.isStart()&&this.isEnd()&&!t))).join("|")}static#g(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],a=!1,u="",c=!1;for(let i=0;i<e.length;i++){const h=e.charAt(i);if(a)a=!1,u+=(rn.has(h)?"\\":"")+h;else if(h!=="\\"){if(h==="["){const[o,s,f,l]=Qr(e,i);if(f){u+=o,c=c||s,i+=f-1,t=t||l;continue}}h!=="*"?h!=="?"?u+=h.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(u+=rt,t=!0):(u+=n&&e==="*"?Et:Pt,t=!0)}else i===e.length-1?u+="\\\\":a=!0}return[u,pe(e),!!t,c]}}const H=function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Pe(e),!(!t.nocomment&&e.charAt(0)==="#")&&new Ee(e,t).match(r)},nn=/^\*+([^+@!?\*\[\(]*)$/,sn=r=>e=>!e.startsWith(".")&&e.endsWith(r),on=r=>e=>e.endsWith(r),an=r=>(r=r.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(r)),un=r=>(r=r.toLowerCase(),e=>e.toLowerCase().endsWith(r)),ln=/^\*+\.\*+$/,cn=r=>!r.startsWith(".")&&r.includes("."),hn=r=>r!=="."&&r!==".."&&r.includes("."),fn=/^\.\*+$/,pn=r=>r!=="."&&r!==".."&&r.startsWith("."),gn=/^\*+$/,dn=r=>r.length!==0&&!r.startsWith("."),mn=r=>r.length!==0&&r!=="."&&r!=="..",bn=/^\?+([^+@!?\*\[\(]*)?$/,yn=r=>{let[e,t=""]=r;const n=rr([e]);return t?(t=t.toLowerCase(),a=>n(a)&&a.toLowerCase().endsWith(t)):n},vn=r=>{let[e,t=""]=r;const n=nr([e]);return t?(t=t.toLowerCase(),a=>n(a)&&a.toLowerCase().endsWith(t)):n},wn=r=>{let[e,t=""]=r;const n=nr([e]);return t?a=>n(a)&&a.endsWith(t):n},Nn=r=>{let[e,t=""]=r;const n=rr([e]);return t?a=>n(a)&&a.endsWith(t):n},rr=r=>{let[e]=r;const t=e.length;return n=>n.length===t&&!n.startsWith(".")},nr=r=>{let[e]=r;const t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},sr=typeof re.process$1=="object"&&re.process$1?typeof re.process$1.env=="object"&&re.process$1.env&&re.process$1.env.__MINIMATCH_TESTING_PLATFORM__||re.process$1.platform:"posix";H.sep=sr==="win32"?"\\":"/";const ee=Symbol("globstar **");H.GLOBSTAR=ee,H.filter=function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t=>H(t,r,e)};const D=function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.assign({},r,e)};H.defaults=r=>{if(!r||typeof r!="object"||!Object.keys(r).length)return H;const e=H;return Object.assign((function(t,n){return e(t,n,D(r,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}),{Minimatch:class extends e.Minimatch{constructor(t){super(t,D(r,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}))}static defaults(t){return e.defaults(D(r,t)).Minimatch}},AST:class extends e.AST{constructor(t,n){super(t,n,D(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,D(r,n))}},unescape:function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.unescape(t,D(r,n))},escape:function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.escape(t,D(r,n))},filter:function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.filter(t,D(r,n))},defaults:t=>e.defaults(D(r,t)),makeRe:function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.makeRe(t,D(r,n))},braceExpand:function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.braceExpand(t,D(r,n))},match:function(t,n){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return e.match(t,n,D(r,a))},sep:e.sep,GLOBSTAR:ee})};const ir=function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Pe(r),e.nobrace||!/\{(?:(?!\{).)*\}/.test(r)?[r]:Yr(r)};H.braceExpand=ir,H.makeRe=function(r){return new Ee(r,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).makeRe()},H.match=function(r,e){const t=new Ee(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 At=/[?*]|[+@!]\(.*?\)|\[|\]/;class Ee{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Pe(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||sr,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 a=this.globParts.map(((u,c,i)=>{if(this.isWindows&&this.windowsNoMagicRoot){const h=!(u[0]!==""||u[1]!==""||u[2]!=="?"&&At.test(u[2])||At.test(u[3])),o=/^[a-z]:/i.test(u[0]);if(h)return[...u.slice(0,4),...u.slice(4).map((s=>this.parse(s)))];if(o)return[u[0],...u.slice(1).map((s=>this.parse(s)))]}return u.map((h=>this.parse(h)))}));if(this.debug(this.pattern,a),this.set=a.filter((u=>u.indexOf(!1)===-1)),this.isWindows)for(let u=0;u<this.set.length;u++){const c=this.set[u];c[0]===""&&c[1]===""&&this.globParts[u][2]==="?"&&typeof c[3]=="string"&&/^[a-z]:$/i.test(c[3])&&(c[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let n=0;n<e.length;n++)for(let a=0;a<e[n].length;a++)e[n][a]==="**"&&(e[n][a]="*");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 a=n;for(;t[a+1]==="**";)a++;a!==n&&t.splice(n,a-n)}return t}))}levelOneOptimize(e){return e.map((t=>(t=t.reduce(((n,a)=>{const u=n[n.length-1];return a==="**"&&u==="**"?n:a===".."&&u&&u!==".."&&u!=="."&&u!=="**"?(n.pop(),n):(n.push(a),n)}),[])).length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let a=1;a<e.length-1;a++){const u=e[a];a===1&&u===""&&e[0]===""||u!=="."&&u!==""||(t=!0,e.splice(a,1),a--)}e[0]!=="."||e.length!==2||e[1]!=="."&&e[1]!==""||(t=!0,e.pop())}let n=0;for(;(n=e.indexOf("..",n+1))!==-1;){const a=e[n-1];a&&a!=="."&&a!==".."&&a!=="**"&&(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 a=-1;for(;(a=n.indexOf("**",a+1))!==-1;){let c=a;for(;n[c+1]==="**";)c++;c>a&&n.splice(a+1,c-a);let i=n[a+1];const h=n[a+2],o=n[a+3];if(i!==".."||!h||h==="."||h===".."||!o||o==="."||o==="..")continue;t=!0,n.splice(a,1);const s=n.slice(0);s[a]="**",e.push(s),a--}if(!this.preserveMultipleSlashes){for(let c=1;c<n.length-1;c++){const i=n[c];c===1&&i===""&&n[0]===""||i!=="."&&i!==""||(t=!0,n.splice(c,1),c--)}n[0]!=="."||n.length!==2||n[1]!=="."&&n[1]!==""||(t=!0,n.pop())}let u=0;for(;(u=n.indexOf("..",u+1))!==-1;){const c=n[u-1];if(c&&c!=="."&&c!==".."&&c!=="**"){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 a=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(a){e[t]=[],e[n]=a;break}}return e.filter((t=>t.length))}partsMatch(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],a=0,u=0,c=[],i="";for(;a<e.length&&u<t.length;)if(e[a]===t[u])c.push(i==="b"?t[u]:e[a]),a++,u++;else if(n&&e[a]==="**"&&t[u]===e[a+1])c.push(e[a]),a++;else if(n&&t[u]==="**"&&e[a]===t[u+1])c.push(t[u]),u++;else if(e[a]!=="*"||!t[u]||!this.options.dot&&t[u].startsWith(".")||t[u]==="**"){if(t[u]!=="*"||!e[a]||!this.options.dot&&e[a].startsWith(".")||e[a]==="**"||i==="a")return!1;i="b",c.push(t[u]),a++,u++}else{if(i==="b")return!1;i="a",c.push(e[a]),a++,u++}return e.length===t.length&&c}parseNegate(){if(this.nonegate)return;const e=this.pattern;let t=!1,n=0;for(let a=0;a<e.length&&e.charAt(a)==="!";a++)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 a=this.options;if(this.isWindows){const m=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),w=!m&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),v=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),p=w?3:m?0:void 0,y=!v&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3])?3:v?0:void 0;if(typeof p=="number"&&typeof y=="number"){const[A,N]=[e[p],t[y]];A.toLowerCase()===N.toLowerCase()&&(t[y]=A,y>p?t=t.slice(y):p>y&&(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 c=0,i=0,h=e.length,o=t.length;c<h&&i<o;c++,i++){this.debug("matchOne loop");var s=t[i],f=e[c];if(this.debug(t,s,f),s===!1)return!1;if(s===ee){this.debug("GLOBSTAR",[t,s,f]);var l=c,g=i+1;if(g===o){for(this.debug("** at the end");c<h;c++)if(e[c]==="."||e[c]===".."||!a.dot&&e[c].charAt(0)===".")return!1;return!0}for(;l<h;){var d=e[l];if(this.debug(`
9
- globstar while`,e,l,t,g,d),this.matchOne(e.slice(l),t.slice(g),n))return this.debug("globstar found match!",l,h,d),!0;if(d==="."||d===".."||!a.dot&&d.charAt(0)==="."){this.debug("dot detected!",e,l,t,g);break}this.debug("globstar swallow a segment, and continue"),l++}return!(!n||(this.debug(`
10
- >>> no match, partial?`,e,l,t,g),l!==h))}let m;if(typeof s=="string"?(m=f===s,this.debug("string match",s,f,m)):(m=s.test(f),this.debug("pattern match",s,f,m)),!m)return!1}if(c===h&&i===o)return!0;if(c===h)return n;if(i===o)return c===h-1&&e[c]==="";throw new Error("wtf?")}braceExpand(){return ir(this.pattern,this.options)}parse(e){Pe(e);const t=this.options;if(e==="**")return ee;if(e==="")return"";let n,a=null;(n=e.match(gn))?a=t.dot?mn:dn:(n=e.match(nn))?a=(t.nocase?t.dot?un:an:t.dot?on:sn)(n[1]):(n=e.match(bn))?a=(t.nocase?t.dot?vn:yn:t.dot?wn:Nn)(n):(n=e.match(ln))?a=t.dot?hn:cn:(n=e.match(fn))&&(a=pn);const u=Z.fromGlob(e,this.options).toMMPattern();return a&&typeof u=="object"&&Reflect.defineProperty(u,"test",{value:a}),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})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",a=new Set(t.nocase?["i"]:[]);let u=e.map((h=>{const o=h.map((s=>{if(s instanceof RegExp)for(const f of s.flags.split(""))a.add(f);return typeof s=="string"?s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):s===ee?ee:s._src}));return o.forEach(((s,f)=>{const l=o[f+1],g=o[f-1];s===ee&&g!==ee&&(g===void 0?l!==void 0&&l!==ee?o[f+1]="(?:\\/|"+n+"\\/)?"+l:o[f]=n:l===void 0?o[f-1]=g+"(?:\\/|"+n+")?":l!==ee&&(o[f-1]=g+"(?:\\/|\\/"+n+"\\/)"+l,o[f+1]=ee))})),o.filter((s=>s!==ee)).join("/")})).join("|");const[c,i]=e.length>1?["(?:",")"]:["",""];u="^"+c+u+i+"$",this.negate&&(u="^(?!"+u+").+$");try{this.regexp=new RegExp(u,[...a].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 a=this.slashSplit(e);this.debug(this.pattern,"split",a);const u=this.set;this.debug(this.pattern,"set",u);let c=a[a.length-1];if(!c)for(let i=a.length-2;!c&&i>=0;i--)c=a[i];for(let i=0;i<u.length;i++){const h=u[i];let o=a;if(n.matchBase&&h.length===1&&(o=[c]),this.matchOne(o,h,t))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(e){return H.defaults(e).Minimatch}}function nt(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 X(r,e){const{status:t}=e;if(t===401&&r.digest)return e;if(t>=400)throw nt(e);return e}function ae(r,e){return arguments.length>2&&arguments[2]!==void 0&&arguments[2]?{data:e,headers:r.headers?zr(r.headers):{},status:r.status,statusText:r.statusText}:e}H.AST=Z,H.Minimatch=Ee,H.escape=function(r){let{windowsPathsNoEscape:e=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e?r.replace(/[?*()[\]]/g,"[$&]"):r.replace(/[?*()[\]\\]/g,"\\$&")},H.unescape=pe;const xn=(Tt=function(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=W({url:_(r.remoteURL,U(e)),method:"COPY",headers:{Destination:_(r.remoteURL,U(t)),Overwrite:n.overwrite===!1?"F":"T",Depth:n.shallow?"0":"infinity"}},r,n);return c=function(i){X(r,i)},(u=q(a,r))&&u.then||(u=Promise.resolve(u)),c?u.then(c):u;var u,c},function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];try{return Promise.resolve(Tt.apply(this,r))}catch(t){return Promise.reject(t)}});var Tt,st=L(635),Pn=L(829),ne=L.n(Pn),ue=(function(r){return r.Array="array",r.Object="object",r.Original="original",r})(ue||{});function be(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ue.Original;const n=ne().get(r,e);return t==="array"&&Array.isArray(n)===!1?[n]:t==="object"&&Array.isArray(n)?n[0]:n}function me(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 a={multistatus:Array.isArray(n)?n[0]:n};return ne().set(a,"multistatus.response",be(a,"multistatus.response",ue.Array)),ne().set(a,"multistatus.response",ne().get(a,"multistatus.response").map((u=>(function(c){const i=Object.assign({},c);return i.status?ne().set(i,"status",be(i,"status",ue.Object)):(ne().set(i,"propstat",be(i,"propstat",ue.Object)),ne().set(i,"propstat.prop",be(i,"propstat.prop",ue.Object))),i})(u)))),a})(new st.XMLParser({allowBooleanAttributes:!0,attributeNamePrefix:"",textNodeName:"text",ignoreAttributes:!1,removeNSPrefix:!0,numberParseOptions:{hex:!0,leadingZeros:!1},attributeValueProcessor:(t,n,a)=>n==="true"||n==="false"?n==="true":n,tagValueProcessor(t,n,a){if(!a.endsWith("propstat.prop.displayname"))return n}}).parse(r)))}))}function Te(r,e){let t=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const{getlastmodified:n=null,getcontentlength:a="0",resourcetype:u=null,getcontenttype:c=null,getetag:i=null}=r,h=u&&typeof u=="object"&&u.collection!==void 0?"directory":"file",o={filename:e,basename:ve().basename(e),lastmod:n,size:parseInt(a,10),type:h,etag:typeof i=="string"?i.replace(/"/g,""):null};return h==="file"&&(o.mime=c&&typeof c=="string"?c.split(";")[0]:""),t&&(r.displayname!==void 0&&(r.displayname=String(r.displayname)),o.props=r),o}function or(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:a,status:u}}=n,[c,i,h]=u.split(" ",3),o=parseInt(i,10);if(o>=400){const s=new Error(`Invalid response: ${o} ${h}`);throw s.status=o,s}return Te(a,de(e),t)}function ar(r){switch(String(r)){case"-3":return"unlimited";case"-2":case"-1":return"unknown";default:return parseInt(String(r),10)}}function Fe(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const it=(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,a=W({url:_(r.remoteURL,U(e)),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},r,t);return Fe(q(a,r),(function(u){return X(r,u),Fe(u.text(),(function(c){return Fe(me(c),(function(i){const h=or(i,e,n);return ae(u,h,n)}))}))}))}));function ur(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const En=lr((function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=(function(u){if(!u||u==="/")return[];let c=u;const i=[];do i.push(c),c=ve().dirname(c);while(c&&c!=="/");return i})(de(e));n.sort(((u,c)=>u.length>c.length?1:c.length>u.length?-1:0));let a=!1;return(function(u,c,i){if(typeof u[Ct]=="function"){let m=function(w){try{for(;!(h=f.next()).done;)if((w=c(h.value))&&w.then){if(!It(w))return void w.then(m,s||(s=K.bind(null,o=new le,2)));w=w.v}o?K(o,1,w):o=w}catch(v){K(o||(o=new le),2,v)}};var h,o,s,f=u[Ct]();if(m(),f.return){var l=function(w){try{h.done||f.return()}catch{}return w};if(o&&o.then)return o.then(l,(function(w){throw l(w)}));l()}return o}if(!("length"in u))throw new TypeError("Object is not iterable");for(var g=[],d=0;d<u.length;d++)g.push(u[d]);return(function(m,w,v){var p,y,A=-1;return(function N(b){try{for(;++A<m.length&&(!v||!v());)if((b=w(A))&&b.then){if(!It(b))return void b.then(N,y||(y=K.bind(null,p=new le,2)));b=b.v}p?K(p,1,b):p=b}catch(E){K(p||(p=new le),2,E)}})(),p})(g,(function(m){return c(g[m])}),i)})(n,(function(u){return c=function(){return(function(h,o){try{var s=ur(it(r,u),(function(f){if(f.type!=="directory")throw new Error(`Path includes a file: ${e}`)}))}catch(f){return o(f)}return s&&s.then?s.then(void 0,o):s})(0,(function(h){const o=h;return(function(){if(o.status===404)return a=!0,Ot(Ke(r,u,{...t,recursive:!1}));throw h})()}))},(i=(function(){if(a)return Ot(Ke(r,u,{...t,recursive:!1}))})())&&i.then?i.then(c):c();var c,i}),(function(){return!1}))}));function lr(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 An(){}function Ot(r,e){return r&&r.then?r.then(An):Promise.resolve()}const Ct=typeof Symbol<"u"?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function K(r,e,t){if(!r.s){if(t instanceof le){if(!t.s)return void(t.o=K.bind(null,r,e));1&e&&(e=t.s),t=t.v}if(t&&t.then)return void t.then(K.bind(null,r,e),K.bind(null,r,2));r.s=e,r.v=t;const n=r.o;n&&n(r)}}const le=(function(){function r(){}return r.prototype.then=function(e,t){const n=new r,a=this.s;if(a){const u=1&a?e:t;if(u){try{K(n,1,u(this.v))}catch(c){K(n,2,c)}return n}return this}return this.o=function(u){try{const c=u.v;1&u.s?K(n,1,e?e(c):c):t?K(n,1,t(c)):K(n,2,c)}catch(c){K(n,2,c)}},n},r})();function It(r){return r instanceof le&&1&r.s}const Ke=lr((function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(t.recursive===!0)return En(r,e,t);const n=W({url:_(r.remoteURL,(a=U(e),a.endsWith("/")?a:a+"/")),method:"MKCOL"},r,t);var a;return ur(q(n,r),(function(u){X(r,u)}))}));var Tn=L(388),St=L.n(Tn);const On=(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 a=W({url:_(r.remoteURL,U(e)),method:"GET",headers:n},r,t);return c=function(i){if(X(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=q(a,r))&&u.then||(u=Promise.resolve(u)),c?u.then(c):u;var u,c})),Cn=()=>{},In=(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=_(r.remoteURL,U(e)));const n=W(t,r,{});return u=function(c){return X(r,c),c},(a=q(n,r))&&a.then||(a=Promise.resolve(a)),u?a.then(u):a;var a,u})),Sn=(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=W({url:_(r.remoteURL,U(e)),method:"DELETE"},r,t);return u=function(c){X(r,c)},(a=q(n,r))&&a.then||(a=Promise.resolve(a)),u?a.then(u):a;var a,u})),Fn=(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,a){try{var u=(c=it(r,e,t),i=function(){return!0},h?i?i(c):c:(c&&c.then||(c=Promise.resolve(c)),i?c.then(i):c))}catch(o){return a(o)}var c,i,h;return u&&u.then?u.then(void 0,a):u})(0,(function(n){if(n.status===404)return!1;throw n}))}));function je(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const jn=(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=W({url:_(r.remoteURL,U(e),"/"),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:t.deep?"infinity":"1"}},r,t);return je(q(n,r),(function(a){return X(r,a),je(a.text(),(function(u){if(!u)throw new Error("Failed parsing directory contents: Empty response");return je(me(u),(function(c){const i=dt(e);let h=(function(o,s,f){let l=arguments.length>3&&arguments[3]!==void 0&&arguments[3],g=arguments.length>4&&arguments[4]!==void 0&&arguments[4];const d=ve().join(s,"/"),{multistatus:{response:m}}=o,w=m.map((v=>{const p=(function(A){try{return A.replace(/^https?:\/\/[^\/]+/,"")}catch(N){throw new Q(N,"Failed normalising HREF")}})(v.href),{propstat:{prop:y}}=v;return Te(y,d==="/"?decodeURIComponent(de(p)):de(ve().relative(decodeURIComponent(d),decodeURIComponent(p))),l)}));return g?w:w.filter((v=>v.basename&&(v.type==="file"||v.filename!==f.replace(/\/$/,""))))})(c,dt(r.remoteBasePath||r.remotePath),i,t.details,t.includeSelf);return t.glob&&(h=(function(o,s){return o.filter((f=>H(f.filename,s,{matchBase:!0})))})(h,t.glob)),ae(a,h,t.details)}))}))}))}));function ot(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 $n=ot((function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=W({url:_(r.remoteURL,U(e)),method:"GET",headers:{Accept:"text/plain"},transformResponse:[kn]},r,t);return Ae(q(n,r),(function(a){return X(r,a),Ae(a.text(),(function(u){return ae(a,u,t.details)}))}))}));function Ae(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const Rn=ot((function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=W({url:_(r.remoteURL,U(e)),method:"GET"},r,t);return Ae(q(n,r),(function(a){let u;return X(r,a),(function(c,i){var h=c();return h&&h.then?h.then(i):i()})((function(){return Ae(a.arrayBuffer(),(function(c){u=c}))}),(function(){return ae(a,u,t.details)}))}))})),Ln=ot((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 Q({info:{code:ie.InvalidOutputFormat}},`Invalid output format: ${n}`);return n==="text"?$n(r,e,t):Rn(r,e,t)})),kn=r=>r;function Un(r){return new st.XMLBuilder({attributeNamePrefix:"@_",format:!0,ignoreAttributes:!1,suppressEmptyNode:!0}).build(cr({lockinfo:{"@_xmlns:d":"DAV:",lockscope:{exclusive:{}},locktype:{write:{}},owner:{href:r}}},"d"))}function cr(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}`]=cr(t[n],e),delete t[n]):/^@_/.test(n)===!1&&(t[`${e}:${n}`]=t[n],delete t[n]));return t}function Qe(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}function hr(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 _n=hr((function(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=W({url:_(r.remoteURL,U(e)),method:"UNLOCK",headers:{"Lock-Token":t}},r,n);return Qe(q(a,r),(function(u){if(X(r,u),u.status!==204&&u.status!==200)throw nt(u)}))})),Mn=hr((function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{refreshToken:n,timeout:a=Vn}=t,u={Accept:"text/plain,application/xml",Timeout:a};n&&(u.If=n);const c=W({url:_(r.remoteURL,U(e)),method:"LOCK",headers:u,data:Un(r.contactHref)},r,t);return Qe(q(c,r),(function(i){return X(r,i),Qe(i.text(),(function(h){const o=(l=h,new st.XMLParser({removeNSPrefix:!0,parseAttributeValue:!0,parseTagValue:!0}).parse(l)),s=ne().get(o,"prop.lockdiscovery.activelock.locktoken.href"),f=ne().get(o,"prop.lockdiscovery.activelock.timeout");var l;if(!s)throw nt(i,"No lock token received: ");return{token:s,serverTimeout:f}}))}))})),Vn="Infinite, Second-4100000000";function $e(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const Bn=(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=W({url:_(r.remoteURL,t),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},r,e);return $e(q(n,r),(function(a){return X(r,a),$e(a.text(),(function(u){return $e(me(u),(function(c){const i=(function(h){try{const[o]=h.multistatus.response,{propstat:{prop:{"quota-used-bytes":s,"quota-available-bytes":f}}}=o;return s!==void 0&&f!==void 0?{used:parseInt(String(s),10),available:ar(f)}:null}catch{}return null})(c);return ae(a,i,e.details)}))}))}))}));function Re(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const qn=(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,a=W({url:_(r.remoteURL,U(e)),method:"SEARCH",headers:{Accept:"text/plain,application/xml","Content-Type":r.headers["Content-Type"]||"application/xml; charset=utf-8"}},r,t);return Re(q(a,r),(function(u){return X(r,u),Re(u.text(),(function(c){return Re(me(c),(function(i){const h=(function(o,s,f){const l={truncated:!1,results:[]};return l.truncated=o.multistatus.response.some((g=>(g.status||g.propstat?.status).split(" ",3)?.[1]==="507"&&g.href.replace(/\/$/,"").endsWith(U(s).replace(/\/$/,"")))),o.multistatus.response.forEach((g=>{if(g.propstat===void 0)return;const d=g.href.split("/").map(decodeURIComponent).join("/");l.results.push(Te(g.propstat.prop,d,f))})),l})(i,e,n);return ae(u,h,n)}))}))}))})),Wn=(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 a=W({url:_(r.remoteURL,U(e)),method:"MOVE",headers:{Destination:_(r.remoteURL,U(t)),Overwrite:n.overwrite===!1?"F":"T"}},r,n);return c=function(i){X(r,i)},(u=q(a,r))&&u.then||(u=Promise.resolve(u)),c?u.then(c):u;var u,c}));var Xn=L(172);const Gn=(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:a=!0,overwrite:u=!0}=n,c={"Content-Type":"application/octet-stream"};a===!1||(c["Content-Length"]=typeof a=="number"?`${a}`:`${(function(s){if(Dt(s))return s.byteLength;if(er(s))return s.length;if(typeof s=="string")return(0,Xn.d)(s);throw new Q({info:{code:ie.DataTypeNoLength}},"Cannot calculate data length: Invalid type")})(t)}`),u||(c["If-None-Match"]="*");const i=W({url:_(r.remoteURL,U(e)),method:"PUT",headers:c,data:t},r,n);return o=function(s){try{X(r,s)}catch(f){const l=f;if(l.status!==412||u)throw l;return!1}return!0},(h=q(i,r))&&h.then||(h=Promise.resolve(h)),o?h.then(o):h;var h,o})),fr=(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=W({url:_(r.remoteURL,U(e)),method:"OPTIONS"},r,t);return u=function(c){try{X(r,c)}catch(i){throw i}return{compliance:(c.headers.get("DAV")??"").split(",").map((i=>i.trim())),server:c.headers.get("Server")??""}},(a=q(n,r))&&a.then||(a=Promise.resolve(a)),u?a.then(u):a;var a,u}));function ge(r,e,t){return t?e?e(r):r:(r&&r.then||(r=Promise.resolve(r)),e?r.then(e):r)}const zn=at((function(r,e,t,n,a){let u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(t>n||t<0)throw new Q({info:{code:ie.InvalidUpdateRange}},`Invalid update range ${t} for partial update`);const c={"Content-Type":"application/octet-stream","Content-Length":""+(n-t+1),"Content-Range":`bytes ${t}-${n}/*`},i=W({url:_(r.remoteURL,U(e)),method:"PUT",headers:c,data:a},r,u);return ge(q(i,r),(function(h){X(r,h)}))}));function Ft(r,e){var t=r();return t&&t.then?t.then(e):e(t)}const Jn=at((function(r,e,t,n,a){let u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(t>n||t<0)throw new Q({info:{code:ie.InvalidUpdateRange}},`Invalid update range ${t} for partial update`);const c={"Content-Type":"application/x-sabredav-partialupdate","Content-Length":""+(n-t+1),"X-Update-Range":`bytes=${t}-${n}`},i=W({url:_(r.remoteURL,U(e)),method:"PATCH",headers:c,data:a},r,u);return ge(q(i,r),(function(h){X(r,h)}))}));function at(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 Hn=at((function(r,e,t,n,a){let u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};return ge(fr(r,e,u),(function(c){let i=!1;return Ft((function(){if(c.compliance.includes("sabredav-partialupdate"))return ge(Jn(r,e,t,n,a,u),(function(h){return i=!0,h}))}),(function(h){let o=!1;return i?h:Ft((function(){if(c.server.includes("Apache")&&c.compliance.includes("<http://apache.org/dav/propset/fs/1>"))return ge(zn(r,e,t,n,a,u),(function(s){return o=!0,s}))}),(function(s){if(o)return s;throw new Q({info:{code:ie.NotSupported}},"Not supported")}))}))}))})),Zn="https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";function Yn(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{authType:t=null,remoteBasePath:n,contactHref:a=Zn,ha1:u,headers:c={},httpAgent:i,httpsAgent:h,password:o,token:s,username:f,withCredentials:l}=e;let g=t;g||(g=f||o?Y.Password:Y.None);const d={authType:g,remoteBasePath:n,contactHref:a,ha1:u,headers:Object.assign({},c),httpAgent:i,httpsAgent:h,password:o,remotePath:Ur(r),remoteURL:r,token:s,username:f,withCredentials:l};return Yt(d,f,o,s,u),{copyFile:(m,w,v)=>xn(d,m,w,v),createDirectory:(m,w)=>Ke(d,m,w),createReadStream:(m,w)=>(function(v,p){let y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const A=new(St()).PassThrough;return On(v,p,y).then((N=>{N.pipe(A)})).catch((N=>{A.emit("error",N)})),A})(d,m,w),createWriteStream:(m,w,v)=>(function(p,y){let A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},N=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Cn;const b=new(St()).PassThrough,E={};A.overwrite===!1&&(E["If-None-Match"]="*");const x=W({url:_(p.remoteURL,U(y)),method:"PUT",headers:E,data:b,maxRedirects:0},p,A);return q(x,p).then((T=>X(p,T))).then((T=>{setTimeout((()=>{N(T)}),0)})).catch((T=>{b.emit("error",T)})),b})(d,m,w,v),customRequest:(m,w)=>In(d,m,w),deleteFile:(m,w)=>Sn(d,m,w),exists:(m,w)=>Fn(d,m,w),getDirectoryContents:(m,w)=>jn(d,m,w),getFileContents:(m,w)=>Ln(d,m,w),getFileDownloadLink:m=>(function(w,v){let p=_(w.remoteURL,U(v));const y=/^https:/i.test(p)?"https":"http";switch(w.authType){case Y.None:break;case Y.Password:{const A=bt(w.headers.Authorization.replace(/^Basic /i,"").trim());p=p.replace(/^https?:\/\//,`${y}://${A}@`);break}default:throw new Q({info:{code:ie.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${w.authType}`)}return p})(d,m),getFileUploadLink:m=>(function(w,v){let p=`${_(w.remoteURL,U(v))}?Content-Type=application/octet-stream`;const y=/^https:/i.test(p)?"https":"http";switch(w.authType){case Y.None:break;case Y.Password:{const A=bt(w.headers.Authorization.replace(/^Basic /i,"").trim());p=p.replace(/^https?:\/\//,`${y}://${A}@`);break}default:throw new Q({info:{code:ie.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${w.authType}`)}return p})(d,m),getHeaders:()=>Object.assign({},d.headers),getQuota:m=>Bn(d,m),lock:(m,w)=>Mn(d,m,w),moveFile:(m,w,v)=>Wn(d,m,w,v),putFileContents:(m,w,v)=>Gn(d,m,w,v),partialUpdateFileContents:(m,w,v,p,y)=>Hn(d,m,w,v,p,y),getDAVCompliance:m=>fr(d,m),search:(m,w)=>qn(d,m,w),setHeaders:m=>{d.headers=Object.assign({},m)},stat:(m,w)=>it(d,m,w),unlock:(m,w,v)=>_n(d,m,w,v)}}te.hT;te.O4;te.Kd;te.YK;var Kn=te.UU;te.Gu;te.ky;var Qn=te.h4,Dn=te.ch;te.hq;te.i5;const z=[];for(let r=0;r<256;++r)z.push((r+256).toString(16).slice(1));function es(r,e=0){return(z[r[e+0]]+z[r[e+1]]+z[r[e+2]]+z[r[e+3]]+"-"+z[r[e+4]]+z[r[e+5]]+"-"+z[r[e+6]]+z[r[e+7]]+"-"+z[r[e+8]]+z[r[e+9]]+"-"+z[r[e+10]]+z[r[e+11]]+z[r[e+12]]+z[r[e+13]]+z[r[e+14]]+z[r[e+15]]).toLowerCase()}let Le;const ts=new Uint8Array(16);function rs(){if(!Le){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Le=crypto.getRandomValues.bind(crypto)}return Le(ts)}const ns=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),jt={randomUUID:ns};function ss(r,e,t){r=r||{};const n=r.random??r.rng?.()??rs();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,es(n)}function is(r,e,t){return jt.randomUUID&&!r?jt.randomUUID():ss(r)}var ke={},Ue={},$t;function ut(){return $t||($t=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+"]*",a=new RegExp("^"+n+"$"),u=function(i,h){const o=[];let s=h.exec(i);for(;s;){const f=[];f.startIndex=h.lastIndex-s[0].length;const l=s.length;for(let g=0;g<l;g++)f.push(s[g]);o.push(f),s=h.exec(i)}return o},c=function(i){const h=a.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,o){if(h){const s=Object.keys(h),f=s.length;for(let l=0;l<f;l++)o==="strict"?i[s[l]]=[h[s[l]]]:i[s[l]]=h[s[l]]}},r.getValue=function(i){return r.isExist(i)?i:""},r.isName=c,r.getAllMatches=u,r.nameRegexp=n})(Ue)),Ue}var Rt;function pr(){if(Rt)return ke;Rt=1;const r=ut(),e={allowBooleanAttributes:!1,unpairedTags:[]};ke.validate=function(v,p){p=Object.assign({},e,p);const y=[];let A=!1,N=!1;v[0]==="\uFEFF"&&(v=v.substr(1));for(let b=0;b<v.length;b++)if(v[b]==="<"&&v[b+1]==="?"){if(b+=2,b=n(v,b),b.err)return b}else if(v[b]==="<"){let E=b;if(b++,v[b]==="!"){b=a(v,b);continue}else{let x=!1;v[b]==="/"&&(x=!0,b++);let T="";for(;b<v.length&&v[b]!==">"&&v[b]!==" "&&v[b]!==" "&&v[b]!==`
11
- `&&v[b]!=="\r";b++)T+=v[b];if(T=T.trim(),T[T.length-1]==="/"&&(T=T.substring(0,T.length-1),b--),!d(T)){let C;return T.trim().length===0?C="Invalid space after '<'.":C="Tag '"+T+"' is an invalid name.",l("InvalidTag",C,m(v,b))}const O=i(v,b);if(O===!1)return l("InvalidAttr","Attributes for '"+T+"' have open quote.",m(v,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=o(I,p);if(P===!0)A=!0;else return l(P.err.code,P.err.msg,m(v,C+P.err.line))}else if(x)if(O.tagClosed){if(I.trim().length>0)return l("InvalidTag","Closing tag '"+T+"' can't have attributes or invalid starting.",m(v,E));if(y.length===0)return l("InvalidTag","Closing tag '"+T+"' has not been opened.",m(v,E));{const C=y.pop();if(T!==C.tagName){let P=m(v,C.tagStartPos);return l("InvalidTag","Expected closing tag '"+C.tagName+"' (opened in line "+P.line+", col "+P.col+") instead of closing tag '"+T+"'.",m(v,E))}y.length==0&&(N=!0)}}else return l("InvalidTag","Closing tag '"+T+"' doesn't have proper closing.",m(v,b));else{const C=o(I,p);if(C!==!0)return l(C.err.code,C.err.msg,m(v,b-I.length+C.err.line));if(N===!0)return l("InvalidXml","Multiple possible root nodes found.",m(v,b));p.unpairedTags.indexOf(T)!==-1||y.push({tagName:T,tagStartPos:E}),A=!0}for(b++;b<v.length;b++)if(v[b]==="<")if(v[b+1]==="!"){b++,b=a(v,b);continue}else if(v[b+1]==="?"){if(b=n(v,++b),b.err)return b}else break;else if(v[b]==="&"){const C=f(v,b);if(C==-1)return l("InvalidChar","char '&' is not expected.",m(v,b));b=C}else if(N===!0&&!t(v[b]))return l("InvalidXml","Extra text at the end",m(v,b));v[b]==="<"&&b--}}else{if(t(v[b]))continue;return l("InvalidChar","char '"+v[b]+"' is not expected.",m(v,b))}if(A){if(y.length==1)return l("InvalidTag","Unclosed tag '"+y[0].tagName+"'.",m(v,y[0].tagStartPos));if(y.length>0)return l("InvalidXml","Invalid '"+JSON.stringify(y.map(b=>b.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return l("InvalidXml","Start tag expected.",1);return!0};function t(v){return v===" "||v===" "||v===`
12
- `||v==="\r"}function n(v,p){const y=p;for(;p<v.length;p++)if(v[p]=="?"||v[p]==" "){const A=v.substr(y,p-y);if(p>5&&A==="xml")return l("InvalidXml","XML declaration allowed only at the start of the document.",m(v,p));if(v[p]=="?"&&v[p+1]==">"){p++;break}else continue}return p}function a(v,p){if(v.length>p+5&&v[p+1]==="-"&&v[p+2]==="-"){for(p+=3;p<v.length;p++)if(v[p]==="-"&&v[p+1]==="-"&&v[p+2]===">"){p+=2;break}}else if(v.length>p+8&&v[p+1]==="D"&&v[p+2]==="O"&&v[p+3]==="C"&&v[p+4]==="T"&&v[p+5]==="Y"&&v[p+6]==="P"&&v[p+7]==="E"){let y=1;for(p+=8;p<v.length;p++)if(v[p]==="<")y++;else if(v[p]===">"&&(y--,y===0))break}else if(v.length>p+9&&v[p+1]==="["&&v[p+2]==="C"&&v[p+3]==="D"&&v[p+4]==="A"&&v[p+5]==="T"&&v[p+6]==="A"&&v[p+7]==="["){for(p+=8;p<v.length;p++)if(v[p]==="]"&&v[p+1]==="]"&&v[p+2]===">"){p+=2;break}}return p}const u='"',c="'";function i(v,p){let y="",A="",N=!1;for(;p<v.length;p++){if(v[p]===u||v[p]===c)A===""?A=v[p]:A!==v[p]||(A="");else if(v[p]===">"&&A===""){N=!0;break}y+=v[p]}return A!==""?!1:{value:y,index:p,tagClosed:N}}const h=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function o(v,p){const y=r.getAllMatches(v,h),A={};for(let N=0;N<y.length;N++){if(y[N][1].length===0)return l("InvalidAttr","Attribute '"+y[N][2]+"' has no space in starting.",w(y[N]));if(y[N][3]!==void 0&&y[N][4]===void 0)return l("InvalidAttr","Attribute '"+y[N][2]+"' is without value.",w(y[N]));if(y[N][3]===void 0&&!p.allowBooleanAttributes)return l("InvalidAttr","boolean attribute '"+y[N][2]+"' is not allowed.",w(y[N]));const b=y[N][2];if(!g(b))return l("InvalidAttr","Attribute '"+b+"' is an invalid name.",w(y[N]));if(!A.hasOwnProperty(b))A[b]=1;else return l("InvalidAttr","Attribute '"+b+"' is repeated.",w(y[N]))}return!0}function s(v,p){let y=/\d/;for(v[p]==="x"&&(p++,y=/[\da-fA-F]/);p<v.length;p++){if(v[p]===";")return p;if(!v[p].match(y))break}return-1}function f(v,p){if(p++,v[p]===";")return-1;if(v[p]==="#")return p++,s(v,p);let y=0;for(;p<v.length;p++,y++)if(!(v[p].match(/\w/)&&y<20)){if(v[p]===";")break;return-1}return p}function l(v,p,y){return{err:{code:v,msg:p,line:y.line||y,col:y.col}}}function g(v){return r.isName(v)}function d(v){return r.isName(v)}function m(v,p){const y=v.substring(0,p).split(/\r?\n/);return{line:y.length,col:y[y.length-1].length+1}}function w(v){return v.startIndex+v[1].length}return ke}var ye={},Lt;function os(){if(Lt)return ye;Lt=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,a){return t}},e=function(t){return Object.assign({},r,t)};return ye.buildOptions=e,ye.defaultOptions=r,ye}var _e,kt;function as(){if(kt)return _e;kt=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 _e=r,_e}var Me,Ut;function us(){if(Ut)return Me;Ut=1;const r=ut();function e(o,s){const f={};if(o[s+3]==="O"&&o[s+4]==="C"&&o[s+5]==="T"&&o[s+6]==="Y"&&o[s+7]==="P"&&o[s+8]==="E"){s=s+9;let l=1,g=!1,d=!1,m="";for(;s<o.length;s++)if(o[s]==="<"&&!d){if(g&&a(o,s)){s+=7;let w,v;[w,v,s]=t(o,s+1),v.indexOf("&")===-1&&(f[h(w)]={regx:RegExp(`&${w};`,"g"),val:v})}else if(g&&u(o,s))s+=8;else if(g&&c(o,s))s+=8;else if(g&&i(o,s))s+=9;else if(n)d=!0;else throw new Error("Invalid DOCTYPE");l++,m=""}else if(o[s]===">"){if(d?o[s-1]==="-"&&o[s-2]==="-"&&(d=!1,l--):l--,l===0)break}else o[s]==="["?g=!0:m+=o[s];if(l!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:f,i:s}}function t(o,s){let f="";for(;s<o.length&&o[s]!=="'"&&o[s]!=='"';s++)f+=o[s];if(f=f.trim(),f.indexOf(" ")!==-1)throw new Error("External entites are not supported");const l=o[s++];let g="";for(;s<o.length&&o[s]!==l;s++)g+=o[s];return[f,g,s]}function n(o,s){return o[s+1]==="!"&&o[s+2]==="-"&&o[s+3]==="-"}function a(o,s){return o[s+1]==="!"&&o[s+2]==="E"&&o[s+3]==="N"&&o[s+4]==="T"&&o[s+5]==="I"&&o[s+6]==="T"&&o[s+7]==="Y"}function u(o,s){return o[s+1]==="!"&&o[s+2]==="E"&&o[s+3]==="L"&&o[s+4]==="E"&&o[s+5]==="M"&&o[s+6]==="E"&&o[s+7]==="N"&&o[s+8]==="T"}function c(o,s){return o[s+1]==="!"&&o[s+2]==="A"&&o[s+3]==="T"&&o[s+4]==="T"&&o[s+5]==="L"&&o[s+6]==="I"&&o[s+7]==="S"&&o[s+8]==="T"}function i(o,s){return o[s+1]==="!"&&o[s+2]==="N"&&o[s+3]==="O"&&o[s+4]==="T"&&o[s+5]==="A"&&o[s+6]==="T"&&o[s+7]==="I"&&o[s+8]==="O"&&o[s+9]==="N"}function h(o){if(r.isName(o))return o;throw new Error(`Invalid entity name ${o}`)}return Me=e,Me}var Ve,_t;function ls(){if(_t)return Ve;_t=1;const r=/^[-+]?0x[a-fA-F0-9]+$/,e=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,t={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function n(c,i={}){if(i=Object.assign({},t,i),!c||typeof c!="string")return c;let h=c.trim();if(i.skipLike!==void 0&&i.skipLike.test(h))return c;if(c==="0")return 0;if(i.hex&&r.test(h))return u(h,16);if(h.search(/[eE]/)!==-1){const o=h.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/);if(o){if(i.leadingZeros)h=(o[1]||"")+o[3];else if(!(o[2]==="0"&&o[3][0]==="."))return c;return i.eNotation?Number(h):c}else return c}else{const o=e.exec(h);if(o){const s=o[1],f=o[2];let l=a(o[3]);if(!i.leadingZeros&&f.length>0&&s&&h[2]!==".")return c;if(!i.leadingZeros&&f.length>0&&!s&&h[1]!==".")return c;if(i.leadingZeros&&f===c)return 0;{const g=Number(h),d=""+g;return d.search(/[eE]/)!==-1?i.eNotation?g:c:h.indexOf(".")!==-1?d==="0"&&l===""||d===l||s&&d==="-"+l?g:c:f?l===d||s+l===d?g:c:h===d||h===s+d?g:c}}else return c}}function a(c){return c&&c.indexOf(".")!==-1&&(c=c.replace(/0+$/,""),c==="."?c="0":c[0]==="."?c="0"+c:c[c.length-1]==="."&&(c=c.substr(0,c.length-1))),c}function u(c,i){if(parseInt)return parseInt(c,i);if(Number.parseInt)return Number.parseInt(c,i);if(window&&window.parseInt)return window.parseInt(c,i);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}return Ve=n,Ve}var Be,Mt;function gr(){if(Mt)return Be;Mt=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 Be=r,Be}var qe,Vt;function cs(){if(Vt)return qe;Vt=1;const r=ut(),e=as(),t=us(),n=ls(),a=gr();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=c,this.parseXml=f,this.parseTextData=i,this.resolveNameSpace=h,this.buildAttributesMap=s,this.isItStopNode=m,this.replaceEntitiesValue=g,this.readStopNodeData=y,this.saveTextToParentTag=d,this.addChild=l,this.ignoreAttributesFn=a(this.options.ignoreAttributes)}}function c(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 o=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,o),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],F=this.options.attributeNamePrefix+C;if(C.length)if(this.options.transformAttributeName&&(F=this.options.transformAttributeName(F)),F==="__proto__"&&(F="#__proto__"),P!==void 0){this.options.trimValues&&(P=P.trim()),P=this.replaceEntitiesValue(P);const S=this.options.attributeValueProcessor(C,P,b);S==null?O[F]=P:typeof S!=typeof P||S!==P?O[F]=S:O[F]=A(P,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(O[F]=!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=v(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 F=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 S=0;F&&this.options.unpairedTags.indexOf(F)!==-1?(S=T.lastIndexOf(".",T.lastIndexOf(".")-1),this.tagsNodeStack.pop()):S=T.lastIndexOf("."),T=T.substring(0,S),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=v(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=v(N,"]]>",O,"CDATA is not closed.")-2,P=N.substring(O+9,C);x=this.saveTextToParentTag(x,E,T);let F=this.parseTextData(P,E.tagname,T,!0,!1,!0,!0);F==null&&(F=""),this.options.cdataPropName?E.add(this.options.cdataPropName,[{[this.options.textNodeName]:P}]):E.add(this.options.textNodeName,F),O=C+2}else{let C=p(N,O,this.options.removeNSPrefix),P=C.tagName;const F=C.rawTagName;let S=C.tagExp,j=C.attrExpPresent,B=C.closeIndex;this.options.transformTagName&&(P=this.options.transformTagName(P)),E&&x&&E.tagname!=="!xml"&&(x=this.saveTextToParentTag(x,E,T,!1));const M=E;if(M&&this.options.unpairedTags.indexOf(M.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 $="";if(S.length>0&&S.lastIndexOf("/")===S.length-1)P[P.length-1]==="/"?(P=P.substr(0,P.length-1),T=T.substr(0,T.length-1),S=P):S=S.substr(0,S.length-1),O=C.closeIndex;else if(this.options.unpairedTags.indexOf(P)!==-1)O=C.closeIndex;else{const k=this.readStopNodeData(N,F,B+1);if(!k)throw new Error(`Unexpected end of ${F}`);O=k.i,$=k.tagContent}const J=new e(P);P!==S&&j&&(J[":@"]=this.buildAttributesMap(S,T,P)),$&&($=this.parseTextData($,P,T,!0,j,!0,!0)),T=T.substr(0,T.lastIndexOf(".")),J.add(this.options.textNodeName,$),this.addChild(E,J,T)}else{if(S.length>0&&S.lastIndexOf("/")===S.length-1){P[P.length-1]==="/"?(P=P.substr(0,P.length-1),T=T.substr(0,T.length-1),S=P):S=S.substr(0,S.length-1),this.options.transformTagName&&(P=this.options.transformTagName(P));const $=new e(P);P!==S&&j&&($[":@"]=this.buildAttributesMap(S,T,P)),this.addChild(E,$,T),T=T.substr(0,T.lastIndexOf("."))}else{const $=new e(P);this.tagsNodeStack.push(E),P!==S&&j&&($[":@"]=this.buildAttributesMap(S,T,P)),this.addChild(E,$,T),E=$}x="",O=B}}else x+=N[O];return b.child};function l(N,b,E){const x=this.options.updateTag(b.tagname,E,b[":@"]);x===!1||(typeof x=="string"&&(b.tagname=x),N.addChild(b))}const g=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 d(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 m(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 v(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,F=!0;C!==-1&&(P=O.substring(0,C),O=O.substring(C+1).trimStart());const S=P;if(E){const j=P.indexOf(":");j!==-1&&(P=P.substr(j+1),F=P!==T.data.substr(j+1))}return{tagName:P,tagExp:O,closeIndex:I,attrExpPresent:F,rawTagName:S}}function y(N,b,E){const x=E;let T=1;for(;E<N.length;E++)if(N[E]==="<")if(N[E+1]==="/"){const O=v(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=v(N,"?>",E+1,"StopNode is not closed.");else if(N.substr(E+1,3)==="!--")E=v(N,"-->",E+3,"StopNode is not closed.");else if(N.substr(E+1,2)==="![")E=v(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 qe=u,qe}var We={},Bt;function hs(){if(Bt)return We;Bt=1;function r(u,c){return e(u,c)}function e(u,c,i){let h;const o={};for(let s=0;s<u.length;s++){const f=u[s],l=t(f);let g="";if(i===void 0?g=l:g=i+"."+l,l===c.textNodeName)h===void 0?h=f[l]:h+=""+f[l];else{if(l===void 0)continue;if(f[l]){let d=e(f[l],c,g);const m=a(d,c);f[":@"]?n(d,f[":@"],g,c):Object.keys(d).length===1&&d[c.textNodeName]!==void 0&&!c.alwaysCreateTextNode?d=d[c.textNodeName]:Object.keys(d).length===0&&(c.alwaysCreateTextNode?d[c.textNodeName]="":d=""),o[l]!==void 0&&o.hasOwnProperty(l)?(Array.isArray(o[l])||(o[l]=[o[l]]),o[l].push(d)):c.isArray(l,g,m)?o[l]=[d]:o[l]=d}}}return typeof h=="string"?h.length>0&&(o[c.textNodeName]=h):h!==void 0&&(o[c.textNodeName]=h),o}function t(u){const c=Object.keys(u);for(let i=0;i<c.length;i++){const h=c[i];if(h!==":@")return h}}function n(u,c,i,h){if(c){const o=Object.keys(c),s=o.length;for(let f=0;f<s;f++){const l=o[f];h.isArray(l,i+"."+l,!0,!0)?u[l]=[c[l]]:u[l]=c[l]}}}function a(u,c){const{textNodeName:i}=c,h=Object.keys(u).length;return!!(h===0||h===1&&(u[i]||typeof u[i]=="boolean"||u[i]===0))}return We.prettify=r,We}var Xe,qt;function fs(){if(qt)return Xe;qt=1;const{buildOptions:r}=os(),e=cs(),{prettify:t}=hs(),n=pr();class a{constructor(c){this.externalEntities={},this.options=r(c)}parse(c,i){if(typeof c!="string")if(c.toString)c=c.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(i){i===!0&&(i={});const s=n.validate(c,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 o=h.parseXml(c);return this.options.preserveOrder||o===void 0?o:t(o,this.options)}addEntity(c,i){if(i.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(c.indexOf("&")!==-1||c.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[c]=i}}return Xe=a,Xe}var Ge,Wt;function ps(){if(Wt)return Ge;Wt=1;const r=`
14
- `;function e(i,h){let o="";return h.format&&h.indentBy.length>0&&(o=r),t(i,h,"",o)}function t(i,h,o,s){let f="",l=!1;for(let g=0;g<i.length;g++){const d=i[g],m=n(d);if(m===void 0)continue;let w="";if(o.length===0?w=m:w=`${o}.${m}`,m===h.textNodeName){let N=d[m];u(w,h)||(N=h.tagValueProcessor(m,N),N=c(N,h)),l&&(f+=s),f+=N,l=!1;continue}else if(m===h.cdataPropName){l&&(f+=s),f+=`<![CDATA[${d[m][0][h.textNodeName]}]]>`,l=!1;continue}else if(m===h.commentPropName){f+=s+`<!--${d[m][0][h.textNodeName]}-->`,l=!0;continue}else if(m[0]==="?"){const N=a(d[":@"],h),b=m==="?xml"?"":s;let E=d[m][0][h.textNodeName];E=E.length!==0?" "+E:"",f+=b+`<${m}${E}${N}?>`,l=!0;continue}let v=s;v!==""&&(v+=h.indentBy);const p=a(d[":@"],h),y=s+`<${m}${p}`,A=t(d[m],h,w,v);h.unpairedTags.indexOf(m)!==-1?h.suppressUnpairedNode?f+=y+">":f+=y+"/>":(!A||A.length===0)&&h.suppressEmptyNode?f+=y+"/>":A&&A.endsWith(">")?f+=y+`>${A}${s}</${m}>`:(f+=y+">",A&&s!==""&&(A.includes("/>")||A.includes("</"))?f+=s+h.indentBy+A+s:f+=A,f+=`</${m}>`),l=!0}return f}function n(i){const h=Object.keys(i);for(let o=0;o<h.length;o++){const s=h[o];if(i.hasOwnProperty(s)&&s!==":@")return s}}function a(i,h){let o="";if(i&&!h.ignoreAttributes)for(let s in i){if(!i.hasOwnProperty(s))continue;let f=h.attributeValueProcessor(s,i[s]);f=c(f,h),f===!0&&h.suppressBooleanAttributes?o+=` ${s.substr(h.attributeNamePrefix.length)}`:o+=` ${s.substr(h.attributeNamePrefix.length)}="${f}"`}return o}function u(i,h){i=i.substr(0,i.length-h.textNodeName.length-1);let o=i.substr(i.lastIndexOf(".")+1);for(let s in h.stopNodes)if(h.stopNodes[s]===i||h.stopNodes[s]==="*."+o)return!0;return!1}function c(i,h){if(i&&i.length>0&&h.processEntities)for(let o=0;o<h.entities.length;o++){const s=h.entities[o];i=i.replace(s.regex,s.val)}return i}return Ge=e,Ge}var ze,Xt;function gs(){if(Xt)return ze;Xt=1;const r=ps(),e=gr(),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=c),this.processTextOrObjNode=a,this.options.format?(this.indentate=u,this.tagEndChar=`>
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,o){let s="",f="";const l=o.join(".");for(let g in i)if(Object.prototype.hasOwnProperty.call(i,g))if(typeof i[g]>"u")this.isAttribute(g)&&(f+="");else if(i[g]===null)this.isAttribute(g)||g===this.options.cdataPropName?f+="":g[0]==="?"?f+=this.indentate(h)+"<"+g+"?"+this.tagEndChar:f+=this.indentate(h)+"<"+g+"/"+this.tagEndChar;else if(i[g]instanceof Date)f+=this.buildTextValNode(i[g],g,"",h);else if(typeof i[g]!="object"){const d=this.isAttribute(g);if(d&&!this.ignoreAttributesFn(d,l))s+=this.buildAttrPairStr(d,""+i[g]);else if(!d)if(g===this.options.textNodeName){let m=this.options.tagValueProcessor(g,""+i[g]);f+=this.replaceEntitiesValue(m)}else f+=this.buildTextValNode(i[g],g,"",h)}else if(Array.isArray(i[g])){const d=i[g].length;let m="",w="";for(let v=0;v<d;v++){const p=i[g][v];if(!(typeof p>"u"))if(p===null)g[0]==="?"?f+=this.indentate(h)+"<"+g+"?"+this.tagEndChar:f+=this.indentate(h)+"<"+g+"/"+this.tagEndChar;else if(typeof p=="object")if(this.options.oneListGroup){const y=this.j2x(p,h+1,o.concat(g));m+=y.val,this.options.attributesGroupName&&p.hasOwnProperty(this.options.attributesGroupName)&&(w+=y.attrStr)}else m+=this.processTextOrObjNode(p,g,h,o);else if(this.options.oneListGroup){let y=this.options.tagValueProcessor(g,p);y=this.replaceEntitiesValue(y),m+=y}else m+=this.buildTextValNode(p,g,"",h)}this.options.oneListGroup&&(m=this.buildObjectNode(m,g,w,h)),f+=m}else if(this.options.attributesGroupName&&g===this.options.attributesGroupName){const d=Object.keys(i[g]),m=d.length;for(let w=0;w<m;w++)s+=this.buildAttrPairStr(d[w],""+i[g][d[w]])}else f+=this.processTextOrObjNode(i[g],g,h,o);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 a(i,h,o,s){const f=this.j2x(i,o+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,o):this.buildObjectNode(f.val,h,f.attrStr,o)}n.prototype.buildObjectNode=function(i,h,o,s){if(i==="")return h[0]==="?"?this.indentate(s)+"<"+h+o+"?"+this.tagEndChar:this.indentate(s)+"<"+h+o+this.closeTag(h)+this.tagEndChar;{let f="</"+h+this.tagEndChar,l="";return h[0]==="?"&&(l="?",f=""),(o||o==="")&&i.indexOf("<")===-1?this.indentate(s)+"<"+h+o+l+">"+i+f:this.options.commentPropName!==!1&&h===this.options.commentPropName&&l.length===0?this.indentate(s)+`<!--${i}-->`+this.newLine:this.indentate(s)+"<"+h+o+l+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,o,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+o+"?"+this.tagEndChar;{let f=this.options.tagValueProcessor(h,i);return f=this.replaceEntitiesValue(f),f===""?this.indentate(s)+"<"+h+o+this.closeTag(h)+this.tagEndChar:this.indentate(s)+"<"+h+o+">"+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 o=this.options.entities[h];i=i.replace(o.regex,o.val)}return i};function u(i){return this.options.indentBy.repeat(i)}function c(i){return i.startsWith(this.options.attributeNamePrefix)&&i!==this.options.textNodeName?i.substr(this.attrPrefixLen):!1}return ze=n,ze}var Je,Gt;function ds(){if(Gt)return Je;Gt=1;const r=pr(),e=fs(),t=gs();return Je={XMLParser:e,XMLValidator:r,XMLBuilder:t},Je}var lt=ds();const De=(r,e)=>Object.fromEntries(Object.entries(r).map(([t,n])=>e.includes(t)?[t,n||""]:[R.DavProperties.DavNamespace.includes(t)?`d:${t}`:`oc:${t}`,n||""])),zt=(r=[],{pattern:e,filterRules:t,limit:n=0,extraProps:a=[]})=>{let u="d:propfind";e&&(u="oc:search-files"),t&&(u="oc:filter-files");const c=r.reduce((s,f)=>Object.assign(s,{[f]:null}),{}),i=De(c,a),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":De(t,[])}}};return new lt.XMLBuilder({format:!0,ignoreAttributes:!1,attributeNamePrefix:"@@",suppressEmptyNode:!0}).build(h)},ms=r=>{const e={"d:propertyupdate":{"d:set":{"d:prop":De(r,[])},"@@xmlns:d":"DAV:","@@xmlns:oc":"http://owncloud.org/ns"}};return new lt.XMLBuilder({format:!0,ignoreAttributes:!1,attributeNamePrefix:"@@",suppressEmptyNode:!0}).build(e)},bs=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},ys=async r=>{const e=n=>{const a=decodeURIComponent(n);return n?.startsWith("/remote.php/dav/")?V.urlJoin(a.replace("/remote.php/dav/",""),{leadingSlash:!0,trailingSlash:!1}):a};return(await Qn(r)).multistatus.response.map(({href:n,propstat:a})=>{const u={...Dn(a.prop,e(n),!0),processing:a.status==="HTTP/1.1 425 TOO EARLY"};return u.props.name&&(u.props.name=u.props.name.toString()),u})},vs=r=>{const e=new lt.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 a=n["d:error"]["s:message"];typeof a=="string"&&(t.message=a)}if(n["d:error"]["s:errorcode"]){const a=n["d:error"]["s:errorcode"];typeof a=="string"&&(t.errorCode=a)}}catch{return t}return t};class ws{client;davPath;headers;extraProps;constructor({baseUrl:e,headers:t}){this.davPath=V.urlJoin(e,"remote.php/dav"),this.client=Kn(this.davPath,{}),this.headers=t,this.extraProps=[]}mkcol(e,t={}){return this.request(e,{method:R.DavMethod.mkcol,...t})}async propfind(e,{depth:t=1,properties:n=[],headers:a={},...u}={}){const c={...a,Depth:t.toString()},{body:i,result:h}=await this.request(e,{method:R.DavMethod.propfind,data:zt(n,{extraProps:this.extraProps}),headers:c,...u});return i?.length&&(i[0].tusSupport=bs(h.headers)),i}async report(e,{pattern:t="",filterRules:n=null,limit:a=30,properties:u,...c}={}){const{body:i,result:h}=await this.request(e,{method:R.DavMethod.report,data:zt(u,{pattern:t,filterRules:n,limit:a,extraProps:this.extraProps}),...c});return{results:i,range:h.headers.get("content-range")}}copy(e,t,{overwrite:n=!1,headers:a={},...u}={}){const c=V.urlJoin(this.davPath,fe(t));return this.request(e,{method:R.DavMethod.copy,headers:{...a,Destination:c,overwrite:n?"T":"F"},...u})}move(e,t,{overwrite:n=!1,headers:a={},...u}={}){const c=V.urlJoin(this.davPath,fe(t));return this.request(e,{method:R.DavMethod.move,headers:{...a,Destination:c,overwrite:n?"T":"F"},...u})}put(e,t,{headers:n={},onUploadProgress:a,previousEntityTag:u,overwrite:c,...i}={}){const h={...n};return u?h["If-Match"]=u:c||(h["If-None-Match"]="*"),this.request(e,{method:R.DavMethod.put,data:t,headers:h,onUploadProgress:a,...i})}delete(e,t={}){return this.request(e,{method:R.DavMethod.delete,...t})}propPatch(e,t,n={}){const a=ms(t);return this.request(e,{method:R.DavMethod.proppatch,data:a,...n})}getFileUrl(e){return V.urlJoin(this.davPath,fe(e))}buildHeaders(e={}){return{"Content-Type":"application/xml; charset=utf-8","X-Requested-With":"XMLHttpRequest","X-Request-ID":is(),...this.headers&&{...this.headers()},...e}}async request(e,t){const n=V.urlJoin(this.davPath,fe(e),{leadingSlash:!0}),a={...t,url:n,headers:this.buildHeaders(t.headers||{})};try{const u=await this.client.customRequest("",a);let c;if(u.status===207){const i=await u.text();c=await ys(i)}return{body:c,status:u.status,result:u}}catch(u){const{response:c}=u,i=await c.text(),h=vs(i);throw new Jt(h.message,h.errorCode,c,c.status)}}}const Ns=(r,e)=>({async listFileVersions(t,n={}){const[a,...u]=await r.propfind(V.urlJoin("meta",t,"v",{leadingSlash:!0}),n);return u.map(c=>R.buildResource(c,r.extraProps))}}),xs=(r,e)=>({setFavorite(t,{path:n},a,u={}){const c={[R.DavProperty.IsFavorite]:a?"true":"false"};return r.propPatch(V.urlJoin(t.webDavPath,n),c,u)}}),Ps=(r,e)=>({listFavoriteFiles({davProperties:t=R.DavProperties.Default,username:n="",...a}={}){return r.report(V.urlJoin("files",n),{properties:t,filterRules:{favorite:1},...a})}}),Es=(r,e)=>{const t=mr.axios.create();e&&t.interceptors.request.use(P=>(Object.assign(P.headers,e()),P));const n={axiosClient:t,baseUrl:r},a=new ws({baseUrl:r,headers:e}),u=P=>{a.extraProps.push(P)},c=jr(a),{getPathForFileId:i}=c,h=Er(a,c),{listFiles:o}=h,s=Nr(h),{getFileInfo:f}=s,{createFolder:l}=vr(a,s),g=wr(a,n),{getFileContents:d}=g,{putFileContents:m}=Tr(a,s),{getFileUrl:w,revokeUrl:v}=xr(a,g,s,n),{getPublicFileUrl:p}=Pr(a),{copyFiles:y}=yr(a),{moveFiles:A}=Ar(a),{deleteFile:N}=Or(a),{restoreFile:b}=Cr(a),{listFileVersions:E}=Ns(a),{restoreFileVersion:x}=Ir(a),{clearTrashBin:T}=Sr(a),{search:O}=Fr(a),{listFavoriteFiles:I}=Ps(a),{setFavorite:C}=xs(a);return{copyFiles:y,createFolder:l,deleteFile:N,restoreFile:b,restoreFileVersion:x,getFileContents:d,getFileInfo:f,getFileUrl:w,getPublicFileUrl:p,getPathForFileId:i,listFiles:o,listFileVersions:E,moveFiles:A,putFileContents:m,revokeUrl:v,clearTrashBin:T,search:O,listFavoriteFiles:I,setFavorite:C,registerExtraProp:u}};exports.DavHttpError=Jt;exports.HttpError=et;exports.encodePath=fe;exports.webdav=Es;