@opencloud-eu/web-client 7.2.0 → 7.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,36 +1,39 @@
1
- import { n as e, r as t, t as n } from "./axios-Dwm7CNmg.js";
2
- import { n as r } from "./dist-B2vdwwII.js";
1
+ import { n as e, r as t, t as n } from "./axios-CAceQWl5.js";
2
+ import { n as r } from "./dist-Ciqaw6jy.js";
3
3
  import { t as i } from "./urlJoin-_pUL1TUx.js";
4
- import { E as a, G as o, K as s, M as c, N as l, U as u, _ as d, f } from "./helpers-BMMUdKkY.js";
5
- import { a as p, i as m, n as h, r as g, t as _ } from "./ocs-BwWCZeaA.js";
4
+ import { E as a, K as o, M as s, N as c, U as l, W as u, _ as d, f, q as p } from "./helpers-hr58GB0t.js";
5
+ import { a as m, i as h, n as g, r as _, t as v } from "./ocs-BupRjiCI.js";
6
6
  //#region src/utils/encodePath.ts
7
- var v = (e) => encodeURIComponent(e).split("%2F").join("/"), y = class extends Error {
7
+ var y = (e) => encodeURIComponent(e).split("%2F").join("/"), b = class extends Error {
8
8
  response;
9
9
  statusCode;
10
10
  constructor(e, t, n = null) {
11
11
  super(e), this.response = t, this.statusCode = n;
12
12
  }
13
- }, b = class extends y {
13
+ }, x = class extends b {
14
14
  errorCode;
15
15
  constructor(e, t, n, r = null) {
16
16
  super(e, n, r), this.errorCode = t;
17
17
  }
18
18
  };
19
19
  //#endregion
20
- //#region ../../node_modules/.pnpm/fast-xml-builder@1.3.0/node_modules/fast-xml-builder/src/util.js
21
- function x(e) {
22
- return String(e).replace(/--/g, "- -").replace(/--/g, "- -").replace(/-$/, "- ");
23
- }
20
+ //#region ../../node_modules/.pnpm/fast-xml-builder@1.3.1/node_modules/fast-xml-builder/src/util.js
24
21
  function S(e) {
25
- return String(e).replace(/\]\]>/g, "]]]]><![CDATA[>");
22
+ return typeof e == "number" && Object.is(e, -0) ? "-0" : String(e);
26
23
  }
27
24
  function C(e) {
28
- return String(e).replace(/"/g, "&quot;").replace(/'/g, "&apos;");
25
+ return S(e).replace(/--/g, "- -").replace(/--/g, "- -").replace(/-$/, "- ");
26
+ }
27
+ function ee(e) {
28
+ return S(e).replace(/\]\]>/g, "]]]]><![CDATA[>");
29
+ }
30
+ function w(e) {
31
+ return S(e).replace(/"/g, "&quot;").replace(/'/g, "&apos;");
29
32
  }
30
33
  //#endregion
31
- //#region ../../node_modules/.pnpm/fast-xml-builder@1.3.0/node_modules/fast-xml-builder/src/orderedJs2Xml.js
32
- var ee = "\n";
33
- function te(e, t) {
34
+ //#region ../../node_modules/.pnpm/fast-xml-builder@1.3.1/node_modules/fast-xml-builder/src/orderedJs2Xml.js
35
+ var te = "\n";
36
+ function ne(e, t) {
34
37
  if (!Array.isArray(e) || e.length === 0) return "1.0";
35
38
  let n = e[0];
36
39
  if (oe(n) === "?xml") {
@@ -42,96 +45,99 @@ function te(e, t) {
42
45
  }
43
46
  return "1.0";
44
47
  }
45
- function ne(e, t, n, r, i) {
48
+ function re(e, t, n, r, i) {
46
49
  return !n.sanitizeName || i(e) ? e : n.sanitizeName(e, {
47
50
  isAttribute: t,
48
51
  matcher: r.readOnly()
49
52
  });
50
53
  }
51
- function re(e, t) {
54
+ function T(e, t) {
52
55
  let n = "";
53
- t.format && (n = ee);
56
+ t.format && (n = te);
54
57
  let r = [];
55
58
  if (t.stopNodes && Array.isArray(t.stopNodes)) for (let e = 0; e < t.stopNodes.length; e++) {
56
59
  let n = t.stopNodes[e];
57
- typeof n == "string" ? r.push(new m(n)) : n instanceof m && r.push(n);
60
+ typeof n == "string" ? r.push(new h(n)) : n instanceof h && r.push(n);
58
61
  }
59
- let i = p("qName", { xmlVersion: te(e, t) }), a = new g();
60
- return ie(e, t, n, a, r, i);
62
+ let i = ne(e, t), a = m("qName", { xmlVersion: i }), o = new _();
63
+ return E(e, t, n, o, r, a);
61
64
  }
62
- function ie(e, t, n, r, i, a) {
65
+ function E(e, t, n, r, i, a) {
63
66
  let o = "", s = !1;
64
67
  if (t.maxNestedTags && r.getDepth() > t.maxNestedTags) throw Error("Maximum nested tags exceeded");
65
68
  if (!Array.isArray(e)) {
66
69
  if (e != null) {
67
- let n = e.toString();
68
- return n = ce(n, t), n;
70
+ let n = S(e);
71
+ return n = le(n, t), n;
69
72
  }
70
73
  return "";
71
74
  }
72
75
  for (let c = 0; c < e.length; c++) {
73
76
  let l = e[c], u = oe(l);
74
77
  if (u === void 0) continue;
75
- let d = u === t.textNodeName || u === t.cdataPropName || u === t.commentPropName || u[0] === "?" ? u : ne(u, !1, t, r, a), f = w(l[":@"], t);
78
+ let d = u === t.textNodeName || u === t.cdataPropName || u === t.commentPropName || u[0] === "?" ? u : re(u, !1, t, r, a), f = ie(l[":@"], t);
76
79
  r.push(d, f);
77
- let p = se(r, i);
80
+ let p = ce(r, i);
78
81
  if (d === t.textNodeName) {
79
82
  let e = l[u];
80
- p || (e = t.tagValueProcessor(d, e), e = ce(e, t)), s && (o += n), o += e, s = !1, r.pop();
83
+ p || (e = t.tagValueProcessor(d, e), e = le(e, t)), e = S(e), s && (o += n), o += e, s = !1, r.pop();
81
84
  continue;
82
- } else if (d === t.cdataPropName) {
85
+ }
86
+ if (d === t.cdataPropName) {
83
87
  s && (o += n);
84
- let e = l[u][0][t.textNodeName], i = S(e);
88
+ let e = l[u][0][t.textNodeName], i = ee(e);
85
89
  o += `<![CDATA[${i}]]>`, s = !1, r.pop();
86
90
  continue;
87
- } else if (d === t.commentPropName) {
88
- let e = l[u][0][t.textNodeName], i = x(e);
91
+ }
92
+ if (d === t.commentPropName) {
93
+ let e = l[u][0][t.textNodeName], i = C(e);
89
94
  o += n + `<!--${i}-->`, s = !0, r.pop();
90
95
  continue;
91
- } else if (d[0] === "?") {
92
- let e = E(l[":@"], t, p, r, a);
96
+ }
97
+ if (d[0] === "?") {
98
+ let e = se(l[":@"], t, p, r, a);
93
99
  o += (d === "?xml" ? "" : n) + `<${d}${e}?>`, s = !0, r.pop();
94
100
  continue;
95
101
  }
96
102
  let m = n;
97
103
  m !== "" && (m += t.indentBy);
98
- let h = n + `<${d}${E(l[":@"], t, p, r, a)}`, g;
99
- g = p ? T(l[u], t) : ie(l[u], t, m, r, i, a), t.unpairedTags.indexOf(d) === -1 ? (!g || g.length === 0) && t.suppressEmptyNode ? o += h + "/>" : g && g.endsWith(">") ? o += h + `>${g}${n}</${d}>` : (o += h + ">", g && n !== "" && (g.includes("/>") || g.includes("</")) ? o += n + t.indentBy + g + n : o += g, o += `</${d}>`) : t.suppressUnpairedNode ? o += h + ">" : o += h + "/>", s = !0, r.pop();
104
+ let h = n + `<${d}${se(l[":@"], t, p, r, a)}`, g;
105
+ g = p ? ae(l[u], t) : E(l[u], t, m, r, i, a), t.unpairedTags.indexOf(d) === -1 ? (!g || g.length === 0) && t.suppressEmptyNode ? o += h + "/>" : g && g.endsWith(">") ? o += h + `>${g}${n}</${d}>` : (o += h + ">", g && n !== "" && (g.includes("/>") || g.includes("</")) ? o += n + t.indentBy + g + n : o += g, o += `</${d}>`) : t.suppressUnpairedNode ? o += h + ">" : o += h + "/>", s = !0, r.pop();
100
106
  }
101
107
  return o;
102
108
  }
103
- function w(e, t) {
109
+ function ie(e, t) {
104
110
  if (!e || t.ignoreAttributes) return null;
105
111
  let n = {}, r = !1;
106
112
  for (let i in e) {
107
113
  if (!Object.prototype.hasOwnProperty.call(e, i)) continue;
108
114
  let a = i.startsWith(t.attributeNamePrefix) ? i.substr(t.attributeNamePrefix.length) : i;
109
- n[a] = C(e[i]), r = !0;
115
+ n[a] = w(e[i]), r = !0;
110
116
  }
111
117
  return r ? n : null;
112
118
  }
113
- function T(e, t) {
114
- if (!Array.isArray(e)) return e == null ? "" : e.toString();
119
+ function ae(e, t) {
120
+ if (!Array.isArray(e)) return e == null ? "" : S(e);
115
121
  let n = "";
116
122
  for (let r = 0; r < e.length; r++) {
117
123
  let i = e[r], a = oe(i);
118
- if (a === t.textNodeName) n += i[a];
124
+ if (a === t.textNodeName) n += S(i[a]);
119
125
  else if (a === t.cdataPropName) n += i[a][0][t.textNodeName];
120
126
  else if (a === t.commentPropName) n += i[a][0][t.textNodeName];
121
127
  else if (a && a[0] === "?") continue;
122
128
  else if (a) {
123
- let e = ae(i[":@"], t), r = T(i[a], t);
129
+ let e = D(i[":@"], t), r = ae(i[a], t);
124
130
  !r || r.length === 0 ? n += `<${a}${e}/>` : n += `<${a}${e}>${r}</${a}>`;
125
131
  }
126
132
  }
127
133
  return n;
128
134
  }
129
- function ae(e, t) {
135
+ function D(e, t) {
130
136
  let n = "";
131
137
  if (e && !t.ignoreAttributes) for (let r in e) {
132
138
  if (!Object.prototype.hasOwnProperty.call(e, r)) continue;
133
139
  let i = e[r];
134
- i === !0 && t.suppressBooleanAttributes ? n += ` ${r.substr(t.attributeNamePrefix.length)}` : n += ` ${r.substr(t.attributeNamePrefix.length)}="${C(i)}"`;
140
+ i === !0 && t.suppressBooleanAttributes ? n += ` ${r.substr(t.attributeNamePrefix.length)}` : n += ` ${r.substr(t.attributeNamePrefix.length)}="${w(i)}"`;
135
141
  }
136
142
  return n;
137
143
  }
@@ -142,21 +148,21 @@ function oe(e) {
142
148
  if (Object.prototype.hasOwnProperty.call(e, r) && r !== ":@") return r;
143
149
  }
144
150
  }
145
- function E(e, t, n, r, i) {
151
+ function se(e, t, n, r, i) {
146
152
  let a = "";
147
153
  if (e && !t.ignoreAttributes) for (let o in e) {
148
154
  if (!Object.prototype.hasOwnProperty.call(e, o)) continue;
149
- let s = o.substr(t.attributeNamePrefix.length), c = n ? s : ne(s, !0, t, r, i), l;
150
- n ? l = e[o] : (l = t.attributeValueProcessor(o, e[o]), l = ce(l, t)), l === !0 && t.suppressBooleanAttributes ? a += ` ${c}` : a += ` ${c}="${C(l)}"`;
155
+ let s = o.substr(t.attributeNamePrefix.length), c = n ? s : re(s, !0, t, r, i), l;
156
+ n ? l = e[o] : (l = t.attributeValueProcessor(o, e[o]), l = le(l, t)), l === !0 && t.suppressBooleanAttributes ? a += ` ${c}` : a += ` ${c}="${w(l)}"`;
151
157
  }
152
158
  return a;
153
159
  }
154
- function se(e, t) {
160
+ function ce(e, t) {
155
161
  if (!t || t.length === 0) return !1;
156
162
  for (let n = 0; n < t.length; n++) if (e.matches(t[n])) return !0;
157
163
  return !1;
158
164
  }
159
- function ce(e, t) {
165
+ function le(e, t) {
160
166
  if (e && e.length > 0 && t.processEntities) for (let n = 0; n < t.entities.length; n++) {
161
167
  let r = t.entities[n];
162
168
  e = e.replace(r.regex, r.val);
@@ -164,15 +170,15 @@ function ce(e, t) {
164
170
  return e;
165
171
  }
166
172
  //#endregion
167
- //#region ../../node_modules/.pnpm/fast-xml-builder@1.3.0/node_modules/fast-xml-builder/src/ignoreAttributes.js
168
- function le(e) {
173
+ //#region ../../node_modules/.pnpm/fast-xml-builder@1.3.1/node_modules/fast-xml-builder/src/ignoreAttributes.js
174
+ function ue(e) {
169
175
  return typeof e == "function" ? e : Array.isArray(e) ? (t) => {
170
176
  for (let n of e) if (typeof n == "string" && t === n || n instanceof RegExp && n.test(t)) return !0;
171
177
  } : () => !1;
172
178
  }
173
179
  //#endregion
174
- //#region ../../node_modules/.pnpm/fast-xml-builder@1.3.0/node_modules/fast-xml-builder/src/fxb.js
175
- var ue = {
180
+ //#region ../../node_modules/.pnpm/fast-xml-builder@1.3.1/node_modules/fast-xml-builder/src/fxb.js
181
+ var de = {
176
182
  attributeNamePrefix: "@_",
177
183
  attributesGroupName: !1,
178
184
  textNodeName: "#text",
@@ -221,18 +227,18 @@ var ue = {
221
227
  jPath: !0,
222
228
  sanitizeName: !1
223
229
  };
224
- function D(e) {
225
- if (this.options = Object.assign({}, ue, e), this.options.stopNodes && Array.isArray(this.options.stopNodes) && (this.options.stopNodes = this.options.stopNodes.map((e) => typeof e == "string" && e.startsWith("*.") ? ".." + e.substring(2) : e)), this.stopNodeExpressions = [], this.options.stopNodes && Array.isArray(this.options.stopNodes)) for (let e = 0; e < this.options.stopNodes.length; e++) {
230
+ function O(e) {
231
+ if (this.options = Object.assign({}, de, e), this.options.stopNodes && Array.isArray(this.options.stopNodes) && (this.options.stopNodes = this.options.stopNodes.map((e) => typeof e == "string" && e.startsWith("*.") ? ".." + e.substring(2) : e)), this.stopNodeExpressions = [], this.options.stopNodes && Array.isArray(this.options.stopNodes)) for (let e = 0; e < this.options.stopNodes.length; e++) {
226
232
  let t = this.options.stopNodes[e];
227
- typeof t == "string" ? this.stopNodeExpressions.push(new m(t)) : t instanceof m && this.stopNodeExpressions.push(t);
233
+ typeof t == "string" ? this.stopNodeExpressions.push(new h(t)) : t instanceof h && this.stopNodeExpressions.push(t);
228
234
  }
229
235
  this.options.ignoreAttributes === !0 || this.options.attributesGroupName ? this.isAttribute = function() {
230
236
  return !1;
231
- } : (this.ignoreAttributesFn = le(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = he), this.processTextOrObjNode = pe, this.options.format ? (this.indentate = me, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
237
+ } : (this.ignoreAttributesFn = ue(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = ge), this.processTextOrObjNode = me, this.options.format ? (this.indentate = he, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
232
238
  return "";
233
239
  }, this.tagEndChar = ">", this.newLine = "");
234
240
  }
235
- function de(e, t) {
241
+ function fe(e, t) {
236
242
  let n = e["?xml"];
237
243
  if (n && typeof n == "object") {
238
244
  if (t.attributesGroupName && n[t.attributesGroupName]) {
@@ -244,73 +250,78 @@ function de(e, t) {
244
250
  }
245
251
  return "1.0";
246
252
  }
247
- function fe(e, t, n, r, i) {
253
+ function pe(e, t, n, r, i) {
248
254
  return !n.sanitizeName || i(e) ? e : n.sanitizeName(e, {
249
255
  isAttribute: t,
250
256
  matcher: r.readOnly()
251
257
  });
252
258
  }
253
- D.prototype.build = function(e) {
254
- if (this.options.preserveOrder) return re(e, this.options);
259
+ O.prototype.build = function(e) {
260
+ if (this.options.preserveOrder) return T(e, this.options);
255
261
  {
256
262
  Array.isArray(e) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (e = { [this.options.arrayNodeName]: e });
257
- let t = new g(), n = p("qName", { xmlVersion: de(e, this.options) });
258
- return this.j2x(e, 0, t, n).val;
263
+ let t = new _(), n = fe(e, this.options), r = m("qName", { xmlVersion: n });
264
+ return this.j2x(e, 0, t, r).val;
259
265
  }
260
- }, D.prototype.j2x = function(e, t, n, r) {
266
+ }, O.prototype.j2x = function(e, t, n, r) {
261
267
  let i = "", a = "";
262
268
  if (this.options.maxNestedTags && n.getDepth() >= this.options.maxNestedTags) throw Error("Maximum nested tags exceeded");
263
269
  let o = this.options.jPath ? n.toString() : n, s = this.checkStopNode(n);
264
270
  for (let c in e) {
265
271
  if (!Object.prototype.hasOwnProperty.call(e, c)) continue;
266
- let l = c === this.options.textNodeName || c === this.options.cdataPropName || c === this.options.commentPropName || this.options.attributesGroupName && c === this.options.attributesGroupName || this.isAttribute(c) || c[0] === "?" ? c : fe(c, !1, this.options, n, r);
272
+ let l = c === this.options.textNodeName || c === this.options.cdataPropName || c === this.options.commentPropName || this.options.attributesGroupName && c === this.options.attributesGroupName || this.isAttribute(c) || c[0] === "?" ? c : pe(c, !1, this.options, n, r);
267
273
  if (e[c] === void 0) this.isAttribute(c) && (a += "");
268
274
  else if (e[c] === null) this.isAttribute(c) || l === this.options.cdataPropName || l === this.options.commentPropName ? a += "" : l[0] === "?" ? a += this.indentate(t) + "<" + l + "?" + this.tagEndChar : a += this.indentate(t) + "<" + l + "/" + this.tagEndChar;
269
275
  else if (e[c] instanceof Date) a += this.buildTextValNode(e[c], l, "", t, n);
270
276
  else if (typeof e[c] != "object") {
271
277
  let u = this.isAttribute(c);
272
278
  if (u && !this.ignoreAttributesFn(u, o)) {
273
- let t = fe(u, !0, this.options, n, r);
274
- i += this.buildAttrPairStr(t, "" + e[c], s);
275
- } else if (!u) if (c === this.options.textNodeName) {
276
- let t = this.options.tagValueProcessor(c, "" + e[c]);
277
- a += this.replaceEntitiesValue(t);
278
- } else {
279
- n.push(l);
280
- let r = this.checkStopNode(n);
281
- if (n.pop(), r) {
282
- let n = "" + e[c];
283
- n === "" ? a += this.indentate(t) + "<" + l + this.closeTag(l) + this.tagEndChar : a += this.indentate(t) + "<" + l + ">" + n + "</" + l + this.tagEndChar;
284
- } else a += this.buildTextValNode(e[c], l, "", t, n);
279
+ let t = pe(u, !0, this.options, n, r);
280
+ i += this.buildAttrPairStr(t, S(e[c]), s);
281
+ } else if (!u) {
282
+ if (c === this.options.textNodeName) {
283
+ let t = this.options.tagValueProcessor(c, S(e[c]));
284
+ a += this.replaceEntitiesValue(t);
285
+ } else {
286
+ n.push(l);
287
+ let r = this.checkStopNode(n);
288
+ if (n.pop(), r) {
289
+ let n = S(e[c]);
290
+ a += n === "" ? this.indentate(t) + "<" + l + this.closeTag(l) + this.tagEndChar : this.indentate(t) + "<" + l + ">" + n + "</" + l + this.tagEndChar;
291
+ } else a += this.buildTextValNode(e[c], l, "", t, n);
292
+ }
285
293
  }
286
294
  } else if (Array.isArray(e[c])) {
287
295
  let i = e[c].length, o = "", s = "";
288
296
  for (let u = 0; u < i; u++) {
289
297
  let i = e[c][u];
290
- if (i !== void 0) if (i === null) l[0] === "?" ? a += this.indentate(t) + "<" + l + "?" + this.tagEndChar : a += this.indentate(t) + "<" + l + "/" + this.tagEndChar;
291
- else if (typeof i == "object") if (this.options.oneListGroup) {
292
- n.push(l);
293
- let e = this.j2x(i, t + 1, n, r);
294
- n.pop(), o += e.val, this.options.attributesGroupName && i.hasOwnProperty(this.options.attributesGroupName) && (s += e.attrStr);
295
- } else o += this.processTextOrObjNode(i, l, t, n, r);
296
- else if (this.options.oneListGroup) {
297
- let e = this.options.tagValueProcessor(l, i);
298
- e = this.replaceEntitiesValue(e), o += e;
299
- } else {
300
- n.push(l);
301
- let e = this.checkStopNode(n);
302
- if (n.pop(), e) {
303
- let e = "" + i;
304
- e === "" ? o += this.indentate(t) + "<" + l + this.closeTag(l) + this.tagEndChar : o += this.indentate(t) + "<" + l + ">" + e + "</" + l + this.tagEndChar;
305
- } else o += this.buildTextValNode(i, l, "", t, n);
298
+ if (i !== void 0) {
299
+ if (i === null) l[0] === "?" ? a += this.indentate(t) + "<" + l + "?" + this.tagEndChar : a += this.indentate(t) + "<" + l + "/" + this.tagEndChar;
300
+ else if (typeof i == "object") {
301
+ if (this.options.oneListGroup) {
302
+ n.push(l);
303
+ let e = this.j2x(i, t + 1, n, r);
304
+ n.pop(), o += e.val, this.options.attributesGroupName && i.hasOwnProperty(this.options.attributesGroupName) && (s += e.attrStr);
305
+ } else o += this.processTextOrObjNode(i, l, t, n, r);
306
+ } else if (this.options.oneListGroup) {
307
+ let e = this.options.tagValueProcessor(l, i);
308
+ e = this.replaceEntitiesValue(e), e = S(e), o += e;
309
+ } else {
310
+ n.push(l);
311
+ let e = this.checkStopNode(n);
312
+ if (n.pop(), e) {
313
+ let e = S(i);
314
+ o += e === "" ? this.indentate(t) + "<" + l + this.closeTag(l) + this.tagEndChar : this.indentate(t) + "<" + l + ">" + e + "</" + l + this.tagEndChar;
315
+ } else o += this.buildTextValNode(i, l, "", t, n);
316
+ }
306
317
  }
307
318
  }
308
319
  this.options.oneListGroup && (o = this.buildObjectNode(o, l, s, t)), a += o;
309
320
  } else if (this.options.attributesGroupName && c === this.options.attributesGroupName) {
310
321
  let t = Object.keys(e[c]), a = t.length;
311
322
  for (let o = 0; o < a; o++) {
312
- let a = fe(t[o], !0, this.options, n, r);
313
- i += this.buildAttrPairStr(a, "" + e[c][t[o]], s);
323
+ let a = pe(t[o], !0, this.options, n, r);
324
+ i += this.buildAttrPairStr(a, S(e[c][t[o]]), s);
314
325
  }
315
326
  } else a += this.processTextOrObjNode(e[c], l, t, n, r);
316
327
  }
@@ -318,10 +329,10 @@ D.prototype.build = function(e) {
318
329
  attrStr: i,
319
330
  val: a
320
331
  };
321
- }, D.prototype.buildAttrPairStr = function(e, t, n) {
322
- return n || (t = this.options.attributeValueProcessor(e, "" + t), t = this.replaceEntitiesValue(t)), this.options.suppressBooleanAttributes && t === "true" ? " " + e : " " + e + "=\"" + C(t) + "\"";
332
+ }, O.prototype.buildAttrPairStr = function(e, t, n) {
333
+ return n || (t = this.options.attributeValueProcessor(e, S(t)), t = this.replaceEntitiesValue(t)), this.options.suppressBooleanAttributes && t === "true" ? " " + e : " " + e + "=\"" + w(t) + "\"";
323
334
  };
324
- function pe(e, t, n, r, i) {
335
+ function me(e, t, n, r, i) {
325
336
  let a = this.extractAttributes(e);
326
337
  if (r.push(t, a), this.checkStopNode(r)) {
327
338
  let i = this.buildRawContent(e), a = this.buildAttributesForStopNode(e);
@@ -330,7 +341,7 @@ function pe(e, t, n, r, i) {
330
341
  let o = this.j2x(e, n + 1, r, i);
331
342
  return r.pop(), t[0] === "?" ? this.buildTextValNode("", t, o.attrStr, n, r) : e[this.options.textNodeName] !== void 0 && Object.keys(e).length === 1 ? this.buildTextValNode(e[this.options.textNodeName], t, o.attrStr, n, r) : this.buildObjectNode(o.val, t, o.attrStr, n);
332
343
  }
333
- D.prototype.extractAttributes = function(e) {
344
+ O.prototype.extractAttributes = function(e) {
334
345
  if (!e || typeof e != "object") return null;
335
346
  let t = {}, n = !1;
336
347
  if (this.options.attributesGroupName && e[this.options.attributesGroupName]) {
@@ -338,15 +349,15 @@ D.prototype.extractAttributes = function(e) {
338
349
  for (let e in r) {
339
350
  if (!Object.prototype.hasOwnProperty.call(r, e)) continue;
340
351
  let i = e.startsWith(this.options.attributeNamePrefix) ? e.substring(this.options.attributeNamePrefix.length) : e;
341
- t[i] = C(r[e]), n = !0;
352
+ t[i] = w(r[e]), n = !0;
342
353
  }
343
354
  } else for (let r in e) {
344
355
  if (!Object.prototype.hasOwnProperty.call(e, r)) continue;
345
356
  let i = this.isAttribute(r);
346
- i && (t[i] = C(e[r]), n = !0);
357
+ i && (t[i] = w(e[r]), n = !0);
347
358
  }
348
359
  return n ? t : null;
349
- }, D.prototype.buildRawContent = function(e) {
360
+ }, O.prototype.buildRawContent = function(e) {
350
361
  if (typeof e == "string") return e;
351
362
  if (typeof e != "object" || !e) return String(e);
352
363
  if (e[this.options.textNodeName] !== void 0) return e[this.options.textNodeName];
@@ -359,15 +370,15 @@ D.prototype.extractAttributes = function(e) {
359
370
  for (let e of r) if (typeof e == "string" || typeof e == "number") t += `<${n}>${e}</${n}>`;
360
371
  else if (typeof e == "object" && e) {
361
372
  let r = this.buildRawContent(e), i = this.buildAttributesForStopNode(e);
362
- r === "" ? t += `<${n}${i}/>` : t += `<${n}${i}>${r}</${n}>`;
373
+ t += r === "" ? `<${n}${i}/>` : `<${n}${i}>${r}</${n}>`;
363
374
  }
364
375
  } else if (typeof r == "object" && r) {
365
376
  let e = this.buildRawContent(r), i = this.buildAttributesForStopNode(r);
366
- e === "" ? t += `<${n}${i}/>` : t += `<${n}${i}>${e}</${n}>`;
377
+ t += e === "" ? `<${n}${i}/>` : `<${n}${i}>${e}</${n}>`;
367
378
  } else t += `<${n}>${r}</${n}>`;
368
379
  }
369
380
  return t;
370
- }, D.prototype.buildAttributesForStopNode = function(e) {
381
+ }, O.prototype.buildAttributesForStopNode = function(e) {
371
382
  if (!e || typeof e != "object") return "";
372
383
  let t = "";
373
384
  if (this.options.attributesGroupName && e[this.options.attributesGroupName]) {
@@ -375,70 +386,72 @@ D.prototype.extractAttributes = function(e) {
375
386
  for (let e in n) {
376
387
  if (!Object.prototype.hasOwnProperty.call(n, e)) continue;
377
388
  let r = e.startsWith(this.options.attributeNamePrefix) ? e.substring(this.options.attributeNamePrefix.length) : e, i = n[e];
378
- i === !0 && this.options.suppressBooleanAttributes ? t += " " + r : t += " " + r + "=\"" + C(i) + "\"";
389
+ i === !0 && this.options.suppressBooleanAttributes ? t += " " + r : t += " " + r + "=\"" + w(i) + "\"";
379
390
  }
380
391
  } else for (let n in e) {
381
392
  if (!Object.prototype.hasOwnProperty.call(e, n)) continue;
382
393
  let r = this.isAttribute(n);
383
394
  if (r) {
384
395
  let i = e[n];
385
- i === !0 && this.options.suppressBooleanAttributes ? t += " " + r : t += " " + r + "=\"" + C(i) + "\"";
396
+ i === !0 && this.options.suppressBooleanAttributes ? t += " " + r : t += " " + r + "=\"" + w(i) + "\"";
386
397
  }
387
398
  }
388
399
  return t;
389
- }, D.prototype.buildObjectNode = function(e, t, n, r) {
400
+ }, O.prototype.buildObjectNode = function(e, t, n, r) {
390
401
  if (e === "") return t[0] === "?" ? this.indentate(r) + "<" + t + n + "?" + this.tagEndChar : this.indentate(r) + "<" + t + n + this.closeTag(t) + this.tagEndChar;
391
402
  if (t[0] === "?") return this.indentate(r) + "<" + t + n + "?" + this.tagEndChar;
392
403
  {
393
404
  let i = "</" + t + this.tagEndChar, a = "";
394
- return t[0] === "?" && (a = "?", i = ""), (n || n === "") && e.indexOf("<") === -1 ? this.indentate(r) + "<" + t + n + a + ">" + e + i : this.options.commentPropName !== !1 && t === this.options.commentPropName && a.length === 0 ? this.indentate(r) + `<!--${x(e)}-->` + this.newLine : this.indentate(r) + "<" + t + n + a + this.tagEndChar + e + this.indentate(r) + i;
405
+ return t[0] === "?" && (a = "?", i = ""), (n || n === "") && e.indexOf("<") === -1 ? this.indentate(r) + "<" + t + n + a + ">" + e + i : this.options.commentPropName !== !1 && t === this.options.commentPropName && a.length === 0 ? this.indentate(r) + `<!--${C(e)}-->` + this.newLine : this.indentate(r) + "<" + t + n + a + this.tagEndChar + e + this.indentate(r) + i;
395
406
  }
396
- }, D.prototype.closeTag = function(e) {
407
+ }, O.prototype.closeTag = function(e) {
397
408
  let t = "";
398
409
  return this.options.unpairedTags.indexOf(e) === -1 ? t = this.options.suppressEmptyNode ? "/" : `></${e}` : this.options.suppressUnpairedNode || (t = "/"), t;
399
- }, D.prototype.checkStopNode = function(e) {
410
+ }, O.prototype.checkStopNode = function(e) {
400
411
  if (!this.stopNodeExpressions || this.stopNodeExpressions.length === 0) return !1;
401
412
  for (let t = 0; t < this.stopNodeExpressions.length; t++) if (e.matches(this.stopNodeExpressions[t])) return !0;
402
413
  return !1;
403
- }, D.prototype.buildTextValNode = function(e, t, n, r, i) {
414
+ }, O.prototype.buildTextValNode = function(e, t, n, r, i) {
404
415
  if (this.options.cdataPropName !== !1 && t === this.options.cdataPropName) {
405
- let t = S(e);
416
+ let t = ee(e);
406
417
  return this.indentate(r) + `<![CDATA[${t}]]>` + this.newLine;
407
- } else if (this.options.commentPropName !== !1 && t === this.options.commentPropName) {
408
- let t = x(e);
418
+ }
419
+ if (this.options.commentPropName !== !1 && t === this.options.commentPropName) {
420
+ let t = C(e);
409
421
  return this.indentate(r) + `<!--${t}-->` + this.newLine;
410
- } else if (t[0] === "?") return this.indentate(r) + "<" + t + n + "?" + this.tagEndChar;
411
- else {
422
+ }
423
+ if (t[0] === "?") return this.indentate(r) + "<" + t + n + "?" + this.tagEndChar;
424
+ {
412
425
  let i = this.options.tagValueProcessor(t, e);
413
- return i = this.replaceEntitiesValue(i), i === "" ? this.indentate(r) + "<" + t + n + this.closeTag(t) + this.tagEndChar : this.indentate(r) + "<" + t + n + ">" + i + "</" + t + this.tagEndChar;
426
+ return i = this.replaceEntitiesValue(i), i = S(i), i === "" ? this.indentate(r) + "<" + t + n + this.closeTag(t) + this.tagEndChar : this.indentate(r) + "<" + t + n + ">" + i + "</" + t + this.tagEndChar;
414
427
  }
415
- }, D.prototype.replaceEntitiesValue = function(e) {
428
+ }, O.prototype.replaceEntitiesValue = function(e) {
416
429
  if (e && e.length > 0 && this.options.processEntities) for (let t = 0; t < this.options.entities.length; t++) {
417
430
  let n = this.options.entities[t];
418
431
  e = e.replace(n.regex, n.val);
419
432
  }
420
433
  return e;
421
434
  };
422
- function me(e) {
435
+ function he(e) {
423
436
  return this.options.indentBy.repeat(e);
424
437
  }
425
- function he(e) {
438
+ function ge(e) {
426
439
  return e.startsWith(this.options.attributeNamePrefix) && e !== this.options.textNodeName ? e.substr(this.attrPrefixLen) : !1;
427
440
  }
428
441
  //#endregion
429
- //#region ../../node_modules/.pnpm/fast-xml-parser@5.10.0/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js
430
- var ge = D, O = (e, { fileId: t, path: n, name: r }) => {
442
+ //#region ../../node_modules/.pnpm/fast-xml-parser@5.11.0/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js
443
+ var _e = O, k = (e, { fileId: t, path: n, name: r }) => {
431
444
  if (n !== void 0) return i(e.webDavPath, n);
432
445
  if (t !== void 0) {
433
446
  if (a(e)) throw Error("public spaces need a path provided");
434
447
  return i("spaces", t, r || "");
435
448
  }
436
449
  return e.webDavPath;
437
- }, _e = (e, t) => ({ copyFiles(t, { path: n, fileId: r }, i, { path: a, parentFolderId: o, name: s }, { overwrite: c, ...l } = {}) {
438
- let u = O(t, {
450
+ }, ve = (e, t) => ({ copyFiles(t, { path: n, fileId: r }, i, { path: a, parentFolderId: o, name: s }, { overwrite: c, ...l } = {}) {
451
+ let u = k(t, {
439
452
  fileId: r,
440
453
  path: n
441
- }), d = O(i, {
454
+ }), d = k(i, {
442
455
  fileId: o,
443
456
  path: a,
444
457
  name: s
@@ -447,16 +460,16 @@ var ge = D, O = (e, { fileId: t, path: n, name: r }) => {
447
460
  overwrite: c || !1,
448
461
  ...l
449
462
  });
450
- } }), ve = (e, t, n) => ({ async createFolder(n, { path: r, parentFolderId: i, folderName: a, fetchFolder: o = !0, ...s }) {
451
- let c = O(n, {
463
+ } }), ye = (e, t, n) => ({ async createFolder(n, { path: r, parentFolderId: i, folderName: a, fetchFolder: o = !0, ...s }) {
464
+ let c = k(n, {
452
465
  fileId: i,
453
466
  path: r,
454
467
  name: a
455
468
  });
456
469
  if (await e.mkcol(c), o) return t.getFileInfo(n, { path: r }, s);
457
- } }), ye = (e, { axiosClient: t }) => ({ async getFileContents(n, { fileId: r, path: i }, { responseType: a = "text", noCache: o = !0, headers: s, ...c } = {}) {
470
+ } }), be = (e, { axiosClient: t }) => ({ async getFileContents(n, { fileId: r, path: i }, { responseType: a = "text", noCache: o = !0, headers: s, ...c } = {}) {
458
471
  try {
459
- let l = O(n, {
472
+ let l = k(n, {
460
473
  fileId: r,
461
474
  path: i
462
475
  }), u = await t.get(e.getFileUrl(l), {
@@ -478,107 +491,110 @@ var ge = D, O = (e, { fileId: t, path: n, name: r }) => {
478
491
  };
479
492
  } catch (e) {
480
493
  let { message: t, response: n } = e;
481
- throw new y(t, n, n.status);
494
+ throw new b(t, n, n.status);
482
495
  }
483
- } }), be = (e, t) => ({ async getFileInfo(t, n, r) {
496
+ } }), xe = (e, t) => ({ async getFileInfo(t, n, r) {
484
497
  return (await e.listFiles(t, n, {
485
498
  depth: 0,
486
499
  ...r
487
500
  })).resource;
488
- } }), xe = (e, t, n, { axiosClient: r, baseUrl: a }) => ({
489
- async getFileUrl(o, c, { disposition: l = "attachment", version: u = null, username: d = "", ...f }) {
490
- if (l === "inline") {
491
- let e = await t.getFileContents(o, c, {
501
+ } }), Se = (e, t, n, { axiosClient: r, baseUrl: a }) => ({
502
+ async getFileUrl(o, s, { disposition: c = "attachment", version: l = null, username: u = "", ...d }) {
503
+ if (c === "inline") {
504
+ let e = await t.getFileContents(o, s, {
492
505
  responseType: "blob",
493
- ...f
506
+ ...d
494
507
  });
495
508
  return URL.createObjectURL(e.body);
496
509
  }
497
- if (u) {
498
- if (!d) throw Error("username is required for URL signing");
499
- let t = e.getFileUrl(i("meta", c.fileId, "v", u));
500
- return await _(a, r).signUrl(t, d);
510
+ if (l) {
511
+ if (!u) throw Error("username is required for URL signing");
512
+ let t = e.getFileUrl(i("meta", s.fileId, "v", l));
513
+ return await v(a, r).signUrl(t, u);
501
514
  }
502
- if (c.downloadURL) return c.downloadURL;
503
- let { downloadURL: p } = await n.getFileInfo(o, c, { davProperties: [s.DownloadURL] });
504
- return p;
515
+ if (s.downloadURL) return s.downloadURL;
516
+ let { downloadURL: f } = await n.getFileInfo(o, s, { davProperties: [p.DownloadURL] });
517
+ return f;
505
518
  },
506
519
  revokeUrl: (e) => {
507
520
  e && e.startsWith("blob:") && URL.revokeObjectURL(e);
508
521
  }
509
- }), Se = (e, t) => ({ getPublicFileUrl(t, n) {
522
+ }), Ce = (e, t) => ({ getPublicFileUrl(t, n) {
510
523
  return e.getFileUrl(i("public-files", n));
511
- } }), Ce = (e, t, n) => ({ async listFiles(n, { path: r, fileId: u } = {}, { depth: p = 1, davProperties: m, isTrash: h = !1, ...g } = {}) {
512
- let _;
524
+ } }), we = (e, t, n) => ({ async listFiles(n, { path: r, fileId: l } = {}, { depth: u = 1, davProperties: m, extraProps: h = [], isTrash: g = !1, ..._ } = {}) {
525
+ let v = [...e.extraProps, ...h], y;
513
526
  if (a(n)) {
514
- _ = await e.propfind(i(n.webDavPath, r), {
515
- depth: p,
527
+ y = await e.propfind(i(n.webDavPath, r), {
528
+ depth: u,
516
529
  properties: m || o.PublicLink,
517
- ...g
518
- }), _.forEach((e) => {
530
+ extraProps: h,
531
+ ..._
532
+ }), y.forEach((e) => {
519
533
  e.filename = e.filename.split("/").slice(1).join("/");
520
- }), _.length === 1 && (_[0].filename = i(n.id, r, { leadingSlash: !0 })), _.forEach((e) => {
534
+ }), y.length === 1 && (y[0].filename = i(n.id, r, { leadingSlash: !0 })), y.forEach((e) => {
521
535
  e.filename = e.filename.split("/").slice(2).join("/");
522
536
  });
523
537
  let t = n.driveAlias.startsWith("ocm/") ? "ocm" : "public-link";
524
- if ((!r || r === "/") && p > 0 && t === "ocm" && _[0].props[s.PublicLinkItemType] === "file" && (_ = [{
538
+ if ((!r || r === "/") && u > 0 && t === "ocm" && y[0].props[p.PublicLinkItemType] === "file" && (y = [{
525
539
  basename: n.fileId,
526
540
  type: "directory",
527
541
  filename: "",
528
542
  props: {}
529
- }, ..._]), !r) {
530
- let [r, ...i] = _;
543
+ }, ...y]), !r) {
544
+ let [e, ...r] = y;
531
545
  return {
532
546
  resource: f({
533
- ...r,
547
+ ...e,
534
548
  id: n.id,
535
549
  driveAlias: n.driveAlias,
536
550
  webDavPath: n.webDavPath,
537
551
  publicLinkType: t
538
552
  }),
539
- children: i.map((t) => l(t, e.extraProps))
553
+ children: r.map((e) => c(e, v))
540
554
  };
541
555
  }
542
- let a = _.map((t) => l(t, e.extraProps));
556
+ let a = y.map((e) => c(e, v));
543
557
  return {
544
558
  resource: a[0],
545
559
  children: a.slice(1)
546
560
  };
547
561
  }
548
- let v = async () => {
549
- let e = await t.getPathForFileId(u);
562
+ let b = async () => {
563
+ let e = await t.getPathForFileId(l);
550
564
  return this.listFiles(n, { path: e }, {
551
- depth: p,
552
- davProperties: m
565
+ depth: u,
566
+ davProperties: m,
567
+ extraProps: h
553
568
  });
554
569
  };
555
570
  try {
556
571
  let t = "";
557
- if (t = h ? d(n.id) : O(n, {
558
- fileId: u,
572
+ if (t = g ? d(n.id) : k(n, {
573
+ fileId: l,
559
574
  path: r
560
- }), _ = await e.propfind(t, {
561
- depth: p,
575
+ }), y = await e.propfind(t, {
576
+ depth: u,
562
577
  properties: m || o.Default,
563
- ...g
564
- }), h) return {
565
- resource: l(_[0], e.extraProps),
566
- children: _.slice(1).map(c)
578
+ extraProps: h,
579
+ ..._
580
+ }), g) return {
581
+ resource: c(y[0], v),
582
+ children: y.slice(1).map(s)
567
583
  };
568
- let i = _.map((t) => l(t, e.extraProps)), a = u === n.id;
569
- return u && !a && i[0].fileId && u !== i[0].fileId ? v() : {
584
+ let i = y.map((e) => c(e, v)), a = l === n.id;
585
+ return l && !a && i[0].fileId && l !== i[0].fileId ? b() : {
570
586
  resource: i[0],
571
587
  children: i.slice(1)
572
588
  };
573
589
  } catch (e) {
574
- if (e.statusCode === 404 && u) return v();
590
+ if (e.statusCode === 404 && l) return b();
575
591
  throw e;
576
592
  }
577
- } }), we = (e, t) => ({ moveFiles(t, { path: n, fileId: r }, i, { path: a, parentFolderId: o, name: s }, { overwrite: c, ...l } = {}) {
578
- let u = O(t, {
593
+ } }), Te = (e, t) => ({ moveFiles(t, { path: n, fileId: r }, i, { path: a, parentFolderId: o, name: s }, { overwrite: c, ...l } = {}) {
594
+ let u = k(t, {
579
595
  fileId: r,
580
596
  path: n
581
- }), d = O(i, {
597
+ }), d = k(i, {
582
598
  fileId: o,
583
599
  path: a,
584
600
  name: s
@@ -587,8 +603,8 @@ var ge = D, O = (e, { fileId: t, path: n, name: r }) => {
587
603
  overwrite: c || !1,
588
604
  ...l
589
605
  });
590
- } }), Te = (e, t, n) => ({ async putFileContents(n, { fileName: r, path: i, parentFolderId: a, content: o = "", previousEntityTag: s = "", overwrite: c, onUploadProgress: l = null, ...u }) {
591
- let d = O(n, {
606
+ } }), Ee = (e, t, n) => ({ async putFileContents(n, { fileName: r, path: i, parentFolderId: a, content: o = "", previousEntityTag: s = "", overwrite: c, onUploadProgress: l = null, ...u }) {
607
+ let d = k(n, {
592
608
  fileId: a,
593
609
  name: r,
594
610
  path: i
@@ -602,49 +618,49 @@ var ge = D, O = (e, { fileId: t, path: n, name: r }) => {
602
618
  fileId: f.headers.get("Oc-Fileid"),
603
619
  path: i
604
620
  });
605
- } }), Ee = (e, t) => ({ deleteFile(t, { path: n, ...r }) {
621
+ } }), De = (e, t) => ({ deleteFile(t, { path: n, ...r }) {
606
622
  return e.delete(i(t.webDavPath, n), r);
607
- } }), De = (e, t) => ({ restoreFile(t, { id: n }, { path: r }, { overwrite: o, ...s } = {}) {
623
+ } }), Oe = (e, t) => ({ restoreFile(t, { id: n }, { path: r }, { overwrite: o, ...s } = {}) {
608
624
  if (a(t)) return;
609
625
  let c = i(t.webDavPath, r);
610
626
  return e.move(i(t.webDavTrashPath, n), c, {
611
627
  overwrite: o,
612
628
  ...s
613
629
  });
614
- } }), Oe = (e, t) => ({ restoreFileVersion(t, { parentFolderId: n, name: r, path: a }, o, s = {}) {
615
- let c = O(t, {
616
- path: a,
617
- fileId: n,
618
- name: r
619
- }), l = i("meta", n, "v", o, { leadingSlash: !0 }), u = i("files", c, { leadingSlash: !0 });
620
- return e.copy(l, u, s);
621
- } }), ke = (e, t) => ({ clearTrashBin(t, { id: n, ...r } = {}) {
630
+ } }), ke = (e, t) => ({ restoreFileVersion(t, { id: n, parentFolderId: r, name: a, path: o }, s, c = {}) {
631
+ let l = k(t, {
632
+ path: o,
633
+ fileId: r,
634
+ name: a
635
+ }), u = i("meta", n, "v", s, { leadingSlash: !0 }), d = i("files", l, { leadingSlash: !0 });
636
+ return e.copy(u, d, c);
637
+ } }), Ae = (e, t) => ({ clearTrashBin(t, { id: n, ...r } = {}) {
622
638
  let a = d(t.id);
623
639
  return n && (a = i(a, n)), e.delete(a, r);
624
- } }), Ae = (e, t) => ({ async search(t, { davProperties: n = o.Default, searchLimit: r, ...i }) {
625
- let { range: a, results: c } = await e.report("/spaces/", {
640
+ } }), je = (e, t) => ({ async search(t, { davProperties: n = o.Default, searchLimit: r, ...i }) {
641
+ let { range: a, results: s } = await e.report("/spaces/", {
626
642
  pattern: t,
627
643
  limit: r,
628
644
  properties: n,
629
645
  ...i
630
646
  });
631
647
  return {
632
- resources: c.map((t) => ({
633
- ...l(t, e.extraProps),
634
- highlights: t.props[s.Highlights] || ""
648
+ resources: s.map((t) => ({
649
+ ...c(t, e.extraProps),
650
+ highlights: t.props[p.Highlights] || ""
635
651
  })).filter((e, t, n) => n.findIndex((t) => t.id === e.id) === t),
636
652
  totalResults: a ? parseInt(a?.split("/")[1]) : null
637
653
  };
638
- } }), je = (e, t) => ({ async getPathForFileId(t, n = {}) {
654
+ } }), Me = (e, t) => ({ async getPathForFileId(t, n = {}) {
639
655
  return (await e.propfind(i("meta", t, { leadingSlash: !0 }), {
640
- properties: [s.MetaPathForUser],
656
+ properties: [p.MetaPathForUser],
641
657
  ...n
642
- }))[0].props[s.MetaPathForUser];
658
+ }))[0].props[p.MetaPathForUser];
643
659
  } });
644
660
  //#endregion
645
661
  //#region ../../node_modules/.pnpm/webdav@5.9.0/node_modules/webdav/dist/web/index.js
646
662
  e();
647
- var Me = {
663
+ var Ne = {
648
664
  2: (e) => {
649
665
  function t(e, t, i) {
650
666
  e instanceof RegExp && (e = n(e, i)), t instanceof RegExp && (t = n(t, i));
@@ -847,27 +863,27 @@ var Me = {
847
863
  return i.pre + _[0] + e;
848
864
  }));
849
865
  if (x) {
850
- var C = l(_[0]), ee = l(_[1]), te = Math.max(_[0].length, _[1].length), ne = _.length == 3 ? Math.abs(l(_[2])) : 1, re = m;
851
- ee < C && (ne *= -1, re = h);
852
- var ie = _.some(p);
866
+ var C = l(_[0]), ee = l(_[1]), w = Math.max(_[0].length, _[1].length), te = _.length == 3 ? Math.abs(l(_[2])) : 1, ne = m;
867
+ ee < C && (te *= -1, ne = h);
868
+ var re = _.some(p);
853
869
  v = [];
854
- for (var w = C; re(w, ee); w += ne) {
855
- var T;
856
- if (b) (T = String.fromCharCode(w)) === "\\" && (T = "");
857
- else if (T = String(w), ie) {
858
- var ae = te - T.length;
859
- if (ae > 0) {
860
- var oe = Array(ae + 1).join("0");
861
- T = w < 0 ? "-" + oe + T.slice(1) : oe + T;
870
+ for (var T = C; ne(T, ee); T += te) {
871
+ var E;
872
+ if (b) (E = String.fromCharCode(T)) === "\\" && (E = "");
873
+ else if (E = String(T), re) {
874
+ var ie = w - E.length;
875
+ if (ie > 0) {
876
+ var ae = Array(ie + 1).join("0");
877
+ E = T < 0 ? "-" + ae + E.slice(1) : ae + E;
862
878
  }
863
879
  }
864
- v.push(T);
880
+ v.push(E);
865
881
  }
866
882
  } else {
867
883
  v = [];
868
- for (var E = 0; E < _.length; E++) v.push.apply(v, g(_[E], !1));
884
+ for (var D = 0; D < _.length; D++) v.push.apply(v, g(_[D], !1));
869
885
  }
870
- for (E = 0; E < v.length; E++) for (c = 0; c < s.length; c++) u = a + v[E] + s[c], (!t || x || u) && n.push(u);
886
+ for (D = 0; D < v.length; D++) for (c = 0; c < s.length; c++) u = a + v[D] + s[c], (!t || x || u) && n.push(u);
871
887
  }
872
888
  return n;
873
889
  }
@@ -1311,40 +1327,40 @@ var Me = {
1311
1327
  ObjectPrototypeMutationError: o
1312
1328
  };
1313
1329
  }
1314
- }, Ne = {};
1315
- function k(e) {
1316
- var t = Ne[e];
1330
+ }, Pe = {};
1331
+ function A(e) {
1332
+ var t = Pe[e];
1317
1333
  if (t !== void 0) return t.exports;
1318
- var n = Ne[e] = {
1334
+ var n = Pe[e] = {
1319
1335
  id: e,
1320
1336
  loaded: !1,
1321
1337
  exports: {}
1322
1338
  };
1323
- return Me[e].call(n.exports, n, n.exports, k), n.loaded = !0, n.exports;
1339
+ return Ne[e].call(n.exports, n, n.exports, A), n.loaded = !0, n.exports;
1324
1340
  }
1325
- k.n = (e) => {
1341
+ A.n = (e) => {
1326
1342
  var t = e && e.__esModule ? () => e.default : () => e;
1327
- return k.d(t, { a: t }), t;
1328
- }, k.d = (e, t) => {
1329
- for (var n in t) k.o(t, n) && !k.o(e, n) && Object.defineProperty(e, n, {
1343
+ return A.d(t, { a: t }), t;
1344
+ }, A.d = (e, t) => {
1345
+ for (var n in t) A.o(t, n) && !A.o(e, n) && Object.defineProperty(e, n, {
1330
1346
  enumerable: !0,
1331
1347
  get: t[n]
1332
1348
  });
1333
- }, k.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t), k.nmd = (e) => (e.paths = [], e.children ||= [], e);
1334
- var Pe = k(737), Fe = k.n(Pe);
1335
- function Ie(e) {
1336
- if (!Le(e)) throw Error("Parameter was not an error");
1337
- }
1349
+ }, A.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t), A.nmd = (e) => (e.paths = [], e.children ||= [], e);
1350
+ var Fe = A(737), Ie = A.n(Fe);
1338
1351
  function Le(e) {
1339
- return !!e && typeof e == "object" && (t = e, Object.prototype.toString.call(t)) === "[object Error]" || e instanceof Error;
1352
+ if (!Re(e)) throw Error("Parameter was not an error");
1353
+ }
1354
+ function Re(e) {
1355
+ return !!e && typeof e == "object" && (t = e, Object.prototype.toString.call(t) === "[object Error]") || e instanceof Error;
1340
1356
  var t;
1341
1357
  }
1342
- var A = class e extends Error {
1358
+ var j = class e extends Error {
1343
1359
  constructor(e, t) {
1344
1360
  let { options: n, shortMessage: r } = function(e) {
1345
1361
  let t, n = "";
1346
1362
  if (e.length === 0) t = {};
1347
- else if (Le(e[0])) t = { cause: e[0] }, n = e.slice(1).join(" ") || "";
1363
+ else if (Re(e[0])) t = { cause: e[0] }, n = e.slice(1).join(" ") || "";
1348
1364
  else if (e[0] && typeof e[0] == "object") t = Object.assign({}, e[0]), n = e.slice(1).join(" ") || "";
1349
1365
  else {
1350
1366
  if (typeof e[0] != "string") throw Error("Invalid arguments passed to Layerr");
@@ -1361,15 +1377,15 @@ var A = class e extends Error {
1361
1377
  }
1362
1378
  }
1363
1379
  static cause(e) {
1364
- return Ie(e), e._cause && Le(e._cause) ? e._cause : null;
1380
+ return Le(e), e._cause && Re(e._cause) ? e._cause : null;
1365
1381
  }
1366
1382
  static fullStack(t) {
1367
- Ie(t);
1383
+ Le(t);
1368
1384
  let n = e.cause(t);
1369
1385
  return n ? `${t.stack}\ncaused by: ${e.fullStack(n)}` : t.stack ?? "";
1370
1386
  }
1371
1387
  static info(t) {
1372
- Ie(t);
1388
+ Le(t);
1373
1389
  let n = {}, r = e.cause(t);
1374
1390
  return r && Object.assign(n, e.info(r)), t._info && Object.assign(n, t._info), n;
1375
1391
  }
@@ -1377,33 +1393,33 @@ var A = class e extends Error {
1377
1393
  let e = this.name || this.constructor.name || this.constructor.prototype.name;
1378
1394
  return this.message && (e = `${e}: ${this.message}`), e;
1379
1395
  }
1380
- }, Re = k(47), ze = k.n(Re), Be = "__PATH_SEPARATOR_POSIX__", Ve = "__PATH_SEPARATOR_WINDOWS__";
1381
- function j(e) {
1396
+ }, ze = A(47), Be = A.n(ze), Ve = "__PATH_SEPARATOR_POSIX__", He = "__PATH_SEPARATOR_WINDOWS__";
1397
+ function M(e) {
1382
1398
  try {
1383
- let t = e.replace(/\//g, Be).replace(/\\\\/g, Ve);
1384
- return encodeURIComponent(t).split(Ve).join("\\\\").split(Be).join("/");
1399
+ let t = e.replace(/\//g, Ve).replace(/\\\\/g, He);
1400
+ return encodeURIComponent(t).split(He).join("\\\\").split(Ve).join("/");
1385
1401
  } catch (e) {
1386
- throw new A(e, "Failed encoding path");
1402
+ throw new j(e, "Failed encoding path");
1387
1403
  }
1388
1404
  }
1389
- function He(e) {
1405
+ function Ue(e) {
1390
1406
  return e.startsWith("/") ? e : "/" + e;
1391
1407
  }
1392
- function Ue(e) {
1408
+ function We(e) {
1393
1409
  let t = e;
1394
1410
  return t[0] !== "/" && (t = "/" + t), /^.+\/$/.test(t) && (t = t.substr(0, t.length - 1)), t;
1395
1411
  }
1396
- function We(e) {
1397
- let t = new (Fe())(e).pathname;
1398
- return t.length <= 0 && (t = "/"), Ue(t);
1412
+ function Ge(e) {
1413
+ let t = new (Ie())(e).pathname;
1414
+ return t.length <= 0 && (t = "/"), We(t);
1399
1415
  }
1400
- function M() {
1416
+ function N() {
1401
1417
  return function() {
1402
1418
  return function(e) {
1403
1419
  var t = [];
1404
1420
  if (e.length === 0) return "";
1405
1421
  if (typeof e[0] != "string") throw TypeError("Url must be a string. Received " + e[0]);
1406
- e[0].match(/^[^/:]+:\/*$/) && e.length > 1 && (e[0] = e.shift() + e[0]), e[0].match(/^file:\/\/\//) ? e[0] = e[0].replace(/^([^/:]+):\/*/, "$1:///") : e[0] = e[0].replace(/^([^/:]+):\/*/, "$1://");
1422
+ e[0].match(/^[^/:]+:\/*$/) && e.length > 1 && (e[0] = e.shift() + e[0]), e[0] = e[0].match(/^file:\/\/\//) ? e[0].replace(/^([^/:]+):\/*/, "$1:///") : e[0].replace(/^([^/:]+):\/*/, "$1://");
1407
1423
  for (var n = 0; n < e.length; n++) {
1408
1424
  var r = e[n];
1409
1425
  if (typeof r != "string") throw TypeError("Url must be a string. Received " + r);
@@ -1414,12 +1430,12 @@ function M() {
1414
1430
  }(typeof arguments[0] == "object" ? arguments[0] : [].slice.call(arguments));
1415
1431
  }([...arguments].reduce(((e, t, n) => ((n === 0 || t !== "/" || t === "/" && e[e.length - 1] !== "/") && e.push(t), e)), []));
1416
1432
  }
1417
- var Ge = k(542), Ke = k.n(Ge);
1418
- function qe(e, t) {
1433
+ var Ke = A(542), qe = A.n(Ke);
1434
+ function Je(e, t) {
1419
1435
  let n = e.url.replace("//", ""), r = n.indexOf("/") == -1 ? "/" : n.slice(n.indexOf("/")), i = e.method ? e.method.toUpperCase() : "GET", a = !!/(^|,)\s*auth\s*($|,)/.test(t.qop) && "auth", o = `00000000${t.nc}`.slice(-8), s = function(e, t, n, r, i, a, o) {
1420
- let s = o || Ke()(`${t}:${n}:${r}`);
1421
- return e && e.toLowerCase() === "md5-sess" ? Ke()(`${s}:${i}:${a}`) : s;
1422
- }(t.algorithm, t.username, t.realm, t.password, t.nonce, t.cnonce, t.ha1), c = Ke()(`${i}:${r}`), l = a ? Ke()(`${s}:${t.nonce}:${o}:${t.cnonce}:${a}:${c}`) : Ke()(`${s}:${t.nonce}:${c}`), u = {
1436
+ let s = o || qe()(`${t}:${n}:${r}`);
1437
+ return e && e.toLowerCase() === "md5-sess" ? qe()(`${s}:${i}:${a}`) : s;
1438
+ }(t.algorithm, t.username, t.realm, t.password, t.nonce, t.cnonce, t.ha1), c = qe()(`${i}:${r}`), l = a ? qe()(`${s}:${t.nonce}:${o}:${t.cnonce}:${a}:${c}`) : qe()(`${s}:${t.nonce}:${c}`), u = {
1423
1439
  username: t.username,
1424
1440
  realm: t.realm,
1425
1441
  nonce: t.nonce,
@@ -1434,30 +1450,30 @@ function qe(e, t) {
1434
1450
  for (let e in u) u[e] && (e === "qop" || e === "nc" || e === "algorithm" ? d.push(`${e}=${u[e]}`) : d.push(`${e}="${u[e]}"`));
1435
1451
  return `Digest ${d.join(", ")}`;
1436
1452
  }
1437
- function Je(e) {
1453
+ function Ye(e) {
1438
1454
  return (e.headers && e.headers.get("www-authenticate") || "").split(/\s/)[0].toLowerCase() === "digest";
1439
1455
  }
1440
- var Ye = k(101), Xe = k.n(Ye);
1441
- function Ze(e) {
1442
- return Xe().decode(e);
1456
+ var Xe = A(101), Ze = A.n(Xe);
1457
+ function Qe(e) {
1458
+ return Ze().decode(e);
1443
1459
  }
1444
- function Qe(e, t) {
1460
+ function $e(e, t) {
1445
1461
  var n;
1446
- return `Basic ${n = `${e}:${t}`, Xe().encode(n)}`;
1462
+ return `Basic ${n = `${e}:${t}`, Ze().encode(n)}`;
1447
1463
  }
1448
- var $e = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : typeof window < "u" ? window : globalThis, et = $e.fetch.bind($e);
1449
- $e.Headers, $e.Request, $e.Response;
1450
- var N = function(e) {
1464
+ var et = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : typeof window < "u" ? window : globalThis, tt = et.fetch.bind(et);
1465
+ et.Headers, et.Request, et.Response;
1466
+ var P = function(e) {
1451
1467
  return e.Auto = "auto", e.Digest = "digest", e.None = "none", e.Password = "password", e.Token = "token", e;
1452
- }({}), P = function(e) {
1468
+ }({}), F = function(e) {
1453
1469
  return e.DataTypeNoLength = "data-type-no-length", e.InvalidAuthType = "invalid-auth-type", e.InvalidOutputFormat = "invalid-output-format", e.LinkUnsupportedAuthType = "link-unsupported-auth", e.InvalidUpdateRange = "invalid-update-range", e.NotSupported = "not-supported", e;
1454
1470
  }({});
1455
- function tt(e, t, n, r, i) {
1471
+ function nt(e, t, n, r, i) {
1456
1472
  switch (e.authType) {
1457
- case N.Auto:
1458
- t && n && (e.headers.Authorization = Qe(t, n));
1473
+ case P.Auto:
1474
+ t && n && (e.headers.Authorization = $e(t, n));
1459
1475
  break;
1460
- case N.Digest:
1476
+ case P.Digest:
1461
1477
  e.digest = function(e, t, n) {
1462
1478
  return {
1463
1479
  username: e,
@@ -1469,32 +1485,32 @@ function tt(e, t, n, r, i) {
1469
1485
  };
1470
1486
  }(t, n, i);
1471
1487
  break;
1472
- case N.None: break;
1473
- case N.Password:
1474
- e.headers.Authorization = Qe(t, n);
1488
+ case P.None: break;
1489
+ case P.Password:
1490
+ e.headers.Authorization = $e(t, n);
1475
1491
  break;
1476
- case N.Token:
1492
+ case P.Token:
1477
1493
  e.headers.Authorization = `${(a = r).token_type} ${a.access_token}`;
1478
1494
  break;
1479
- default: throw new A({ info: { code: P.InvalidAuthType } }, `Invalid auth type: ${e.authType}`);
1495
+ default: throw new j({ info: { code: F.InvalidAuthType } }, `Invalid auth type: ${e.authType}`);
1480
1496
  }
1481
1497
  var a;
1482
1498
  }
1483
- k(345), k(800);
1484
- var nt = "@@HOTPATCHER", rt = () => {};
1485
- function it(e) {
1499
+ A(345), A(800);
1500
+ var rt = "@@HOTPATCHER", it = () => {};
1501
+ function at(e) {
1486
1502
  return {
1487
1503
  original: e,
1488
1504
  methods: [e],
1489
1505
  final: !1
1490
1506
  };
1491
1507
  }
1492
- var at = class {
1508
+ var ot = class {
1493
1509
  constructor() {
1494
1510
  this._configuration = {
1495
1511
  registry: {},
1496
1512
  getEmptyAction: "null"
1497
- }, this.__type__ = nt;
1513
+ }, this.__type__ = rt;
1498
1514
  }
1499
1515
  get configuration() {
1500
1516
  return this._configuration;
@@ -1507,13 +1523,13 @@ var at = class {
1507
1523
  }
1508
1524
  control(e) {
1509
1525
  let t = arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
1510
- if (!e || e.__type__ !== nt) throw Error("Failed taking control of target HotPatcher instance: Invalid type or object");
1526
+ if (!e || e.__type__ !== rt) throw Error("Failed taking control of target HotPatcher instance: Invalid type or object");
1511
1527
  return Object.keys(e.configuration.registry).forEach(((n) => {
1512
1528
  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]);
1513
1529
  })), e._configuration = this.configuration, this;
1514
1530
  }
1515
1531
  execute(e) {
1516
- return (this.get(e) || rt)(...[...arguments].slice(1));
1532
+ return (this.get(e) || it)(...[...arguments].slice(1));
1517
1533
  }
1518
1534
  get(e) {
1519
1535
  let t = this.configuration.registry[e];
@@ -1539,11 +1555,11 @@ var at = class {
1539
1555
  let { chain: n = !1 } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
1540
1556
  if (this.configuration.registry[e] && this.configuration.registry[e].final) throw Error(`Failed patching '${e}': Method marked as being final`);
1541
1557
  if (typeof t != "function") throw Error(`Failed patching '${e}': Provided method is not a function`);
1542
- if (n) this.configuration.registry[e] ? this.configuration.registry[e].methods.push(t) : this.configuration.registry[e] = it(t);
1558
+ if (n) this.configuration.registry[e] ? this.configuration.registry[e].methods.push(t) : this.configuration.registry[e] = at(t);
1543
1559
  else if (this.isPatched(e)) {
1544
1560
  let { original: n } = this.configuration.registry[e];
1545
- this.configuration.registry[e] = Object.assign(it(t), { original: n });
1546
- } else this.configuration.registry[e] = it(t);
1561
+ this.configuration.registry[e] = Object.assign(at(t), { original: n });
1562
+ } else this.configuration.registry[e] = at(t);
1547
1563
  return this;
1548
1564
  }
1549
1565
  patchInline(e, t) {
@@ -1565,11 +1581,11 @@ var at = class {
1565
1581
  if (!this.configuration.registry.hasOwnProperty(e)) throw Error(`Failed marking '${e}' as final: No method found for key`);
1566
1582
  return this.configuration.registry[e].final = !0, this;
1567
1583
  }
1568
- }, ot = null;
1569
- function st() {
1570
- return ot ||= new at(), ot;
1584
+ }, st = null;
1585
+ function ct() {
1586
+ return st ||= new ot(), st;
1571
1587
  }
1572
- function ct(e) {
1588
+ function lt(e) {
1573
1589
  return function(e) {
1574
1590
  if (typeof e != "object" || !e || Object.prototype.toString.call(e) != "[object Object]") return !1;
1575
1591
  if (Object.getPrototypeOf(e) === null) return !0;
@@ -1578,27 +1594,27 @@ function ct(e) {
1578
1594
  return Object.getPrototypeOf(e) === t;
1579
1595
  }(e) ? Object.assign({}, e) : Object.setPrototypeOf(Object.assign({}, e), Object.getPrototypeOf(e));
1580
1596
  }
1581
- function lt() {
1597
+ function ut() {
1582
1598
  var e = [...arguments];
1583
1599
  let t = null, n = [...e];
1584
1600
  for (; n.length > 0;) {
1585
1601
  let e = n.shift();
1586
- t = t ? ut(t, e) : ct(e);
1602
+ t = t ? dt(t, e) : lt(e);
1587
1603
  }
1588
1604
  return t;
1589
1605
  }
1590
- function ut(e, t) {
1591
- let n = ct(e);
1606
+ function dt(e, t) {
1607
+ let n = lt(e);
1592
1608
  return Object.keys(t).forEach(((e) => {
1593
- n.hasOwnProperty(e) ? Array.isArray(t[e]) ? n[e] = Array.isArray(n[e]) ? [...n[e], ...t[e]] : [...t[e]] : typeof t[e] == "object" && t[e] ? n[e] = typeof n[e] == "object" && n[e] ? ut(n[e], t[e]) : ct(t[e]) : n[e] = t[e] : n[e] = t[e];
1609
+ n.hasOwnProperty(e) ? Array.isArray(t[e]) ? n[e] = Array.isArray(n[e]) ? [...n[e], ...t[e]] : [...t[e]] : typeof t[e] == "object" && t[e] ? n[e] = typeof n[e] == "object" && n[e] ? dt(n[e], t[e]) : lt(t[e]) : n[e] = t[e] : n[e] = t[e];
1594
1610
  })), n;
1595
1611
  }
1596
- function dt(e) {
1612
+ function ft(e) {
1597
1613
  let t = {};
1598
1614
  for (let n of e.keys()) t[n] = e.get(n);
1599
1615
  return t;
1600
1616
  }
1601
- function ft() {
1617
+ function pt() {
1602
1618
  var e = [...arguments];
1603
1619
  if (e.length === 0) return {};
1604
1620
  let t = {};
@@ -1607,15 +1623,15 @@ function ft() {
1607
1623
  t.hasOwnProperty(i) ? e[t[i]] = n[r] : (t[i] = r, e[r] = n[r]);
1608
1624
  })), e)), {});
1609
1625
  }
1610
- k(805);
1611
- var pt = typeof ArrayBuffer == "function", { toString: mt } = Object.prototype;
1612
- function ht(e) {
1613
- return pt && (e instanceof ArrayBuffer || mt.call(e) === "[object ArrayBuffer]");
1614
- }
1626
+ A(805);
1627
+ var mt = typeof ArrayBuffer == "function", { toString: ht } = Object.prototype;
1615
1628
  function gt(e) {
1616
- return e != null && e.constructor != null && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e);
1629
+ return mt && (e instanceof ArrayBuffer || ht.call(e) === "[object ArrayBuffer]");
1617
1630
  }
1618
1631
  function _t(e) {
1632
+ return e != null && e.constructor != null && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e);
1633
+ }
1634
+ function vt(e) {
1619
1635
  return function() {
1620
1636
  var t = [...arguments];
1621
1637
  try {
@@ -1625,18 +1641,18 @@ function _t(e) {
1625
1641
  }
1626
1642
  };
1627
1643
  }
1628
- function vt(e, t, n) {
1644
+ function yt(e, t, n) {
1629
1645
  return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
1630
1646
  }
1631
- var yt = _t((function(e) {
1647
+ var bt = vt((function(e) {
1632
1648
  let t = e._digest;
1633
- return delete e._digest, t.hasDigestAuth && (e = lt(e, { headers: { Authorization: qe(e, t) } })), vt(xt(e), (function(n) {
1649
+ return delete e._digest, t.hasDigestAuth && (e = ut(e, { headers: { Authorization: Je(e, t) } })), yt(St(e), (function(n) {
1634
1650
  let r = !1;
1635
1651
  return i = function(e) {
1636
1652
  return r ? e : n;
1637
1653
  }, (a = function() {
1638
1654
  if (n.status == 401) return t.hasDigestAuth = function(e, t) {
1639
- if (!Je(e)) return !1;
1655
+ if (!Ye(e)) return !1;
1640
1656
  let n = /([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;
1641
1657
  for (;;) {
1642
1658
  let r = e.headers && e.headers.get("www-authenticate") || "", i = n.exec(r);
@@ -1649,7 +1665,7 @@ var yt = _t((function(e) {
1649
1665
  return e;
1650
1666
  }(), !0;
1651
1667
  }(n, t), function() {
1652
- if (t.hasDigestAuth) return vt(xt(e = lt(e, { headers: { Authorization: qe(e, t) } })), (function(e) {
1668
+ if (t.hasDigestAuth) return yt(St(e = ut(e, { headers: { Authorization: Je(e, t) } })), (function(e) {
1653
1669
  return e.status == 401 ? t.hasDigestAuth = !1 : t.nc++, r = !0, e;
1654
1670
  }));
1655
1671
  }();
@@ -1657,36 +1673,36 @@ var yt = _t((function(e) {
1657
1673
  }()) && a.then ? a.then(i) : i(a);
1658
1674
  var i, a;
1659
1675
  }));
1660
- })), bt = _t((function(e, t) {
1661
- return vt(xt(e), (function(n) {
1662
- return n.ok ? (t.authType = N.Password, n) : n.status == 401 && Je(n) ? (t.authType = N.Digest, tt(t, t.username, t.password, void 0, void 0), e._digest = t.digest, yt(e)) : n;
1676
+ })), xt = vt((function(e, t) {
1677
+ return yt(St(e), (function(n) {
1678
+ return n.ok ? (t.authType = P.Password, n) : n.status == 401 && Ye(n) ? (t.authType = P.Digest, nt(t, t.username, t.password, void 0, void 0), e._digest = t.digest, bt(e)) : n;
1663
1679
  }));
1664
- })), F = _t((function(e, t) {
1665
- return t.authType === N.Auto ? bt(e, t) : e._digest ? yt(e) : xt(e);
1680
+ })), I = vt((function(e, t) {
1681
+ return t.authType === P.Auto ? xt(e, t) : e._digest ? bt(e) : St(e);
1666
1682
  }));
1667
- function I(e, t, n) {
1668
- let r = ct(e);
1669
- return r.headers = ft(t.headers, r.headers || {}, n.headers || {}), n.data !== void 0 && (r.data = n.data), n.signal && (r.signal = n.signal), t.httpAgent && (r.httpAgent = t.httpAgent), t.httpsAgent && (r.httpsAgent = t.httpsAgent), t.digest && (r._digest = t.digest), typeof t.withCredentials == "boolean" && (r.withCredentials = t.withCredentials), r;
1683
+ function L(e, t, n) {
1684
+ let r = lt(e);
1685
+ return r.headers = pt(t.headers, r.headers || {}, n.headers || {}), n.data !== void 0 && (r.data = n.data), n.signal && (r.signal = n.signal), t.httpAgent && (r.httpAgent = t.httpAgent), t.httpsAgent && (r.httpsAgent = t.httpsAgent), t.digest && (r._digest = t.digest), typeof t.withCredentials == "boolean" && (r.withCredentials = t.withCredentials), r;
1670
1686
  }
1671
- function xt(e) {
1672
- let t = st();
1673
- return t.patchInline("request", ((e) => t.patchInline("fetch", et, e.url, function(e) {
1687
+ function St(e) {
1688
+ let t = ct();
1689
+ return t.patchInline("request", ((e) => t.patchInline("fetch", tt, e.url, function(e) {
1674
1690
  let t = {}, n = { method: e.method };
1675
- if (e.headers && (t = ft(t, e.headers)), e.data !== void 0) {
1691
+ if (e.headers && (t = pt(t, e.headers)), e.data !== void 0) {
1676
1692
  let [r, i] = function(e) {
1677
- if (typeof e == "string" || gt(e) || ht(e)) return [e, {}];
1693
+ if (typeof e == "string" || _t(e) || gt(e)) return [e, {}];
1678
1694
  if (e && typeof e == "object") return [JSON.stringify(e), { "content-type": "application/json" }];
1679
1695
  throw Error("Unable to convert request body: Unexpected body type: " + typeof e);
1680
1696
  }(e.data);
1681
- n.body = r, t = ft(t, i);
1697
+ n.body = r, t = pt(t, i);
1682
1698
  }
1683
1699
  return e.signal && (n.signal = e.signal), e.withCredentials && (n.credentials = "include"), n.headers = t, n;
1684
1700
  }(e))), e);
1685
1701
  }
1686
- var St = k(285), Ct = (e) => {
1702
+ var Ct = A(285), wt = (e) => {
1687
1703
  if (typeof e != "string") throw TypeError("invalid pattern");
1688
1704
  if (e.length > 65536) throw TypeError("pattern is too long");
1689
- }, wt = {
1705
+ }, Tt = {
1690
1706
  "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", !0],
1691
1707
  "[:alpha:]": ["\\p{L}\\p{Nl}", !0],
1692
1708
  "[:ascii:]": ["\\x00-\\x7f", !1],
@@ -1705,7 +1721,7 @@ var St = k(285), Ct = (e) => {
1705
1721
  "[:upper:]": ["\\p{Lu}", !0],
1706
1722
  "[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", !0],
1707
1723
  "[:xdigit:]": ["A-Fa-f0-9", !1]
1708
- }, Tt = (e) => e.replace(/[[\]\\-]/g, "\\$&"), Et = (e) => e.join(""), Dt = (e, t) => {
1724
+ }, Et = (e) => e.replace(/[[\]\\-]/g, "\\$&"), Dt = (e) => e.join(""), Ot = (e, t) => {
1709
1725
  let n = t;
1710
1726
  if (e.charAt(n) !== "[") throw Error("not in a brace expression");
1711
1727
  let r = [], i = [], a = n + 1, o = !1, s = !1, c = !1, l = !1, u = n, d = "";
@@ -1718,7 +1734,7 @@ var St = k(285), Ct = (e) => {
1718
1734
  }
1719
1735
  if (o = !0, t !== "\\" || c) {
1720
1736
  if (t === "[" && !c) {
1721
- for (let [t, [o, c, l]] of Object.entries(wt)) if (e.startsWith(t, a)) {
1737
+ for (let [t, [o, c, l]] of Object.entries(Tt)) if (e.startsWith(t, a)) {
1722
1738
  if (d) return [
1723
1739
  "$.",
1724
1740
  !1,
@@ -1729,7 +1745,7 @@ var St = k(285), Ct = (e) => {
1729
1745
  continue t;
1730
1746
  }
1731
1747
  }
1732
- c = !1, d ? (t > d ? r.push(Tt(d) + "-" + Tt(t)) : t === d && r.push(Tt(t)), d = "", a++) : e.startsWith("-]", a + 1) ? (r.push(Tt(t + "-")), a += 2) : e.startsWith("-", a + 1) ? (d = t, a += 2) : (r.push(Tt(t)), a++);
1748
+ c = !1, d ? (t > d ? r.push(Et(d) + "-" + Et(t)) : t === d && r.push(Et(t)), d = "", a++) : e.startsWith("-]", a + 1) ? (r.push(Et(t + "-")), a += 2) : e.startsWith("-", a + 1) ? (d = t, a += 2) : (r.push(Et(t)), a++);
1733
1749
  } else c = !0, a++;
1734
1750
  } else l = !0, a++;
1735
1751
  }
@@ -1752,23 +1768,23 @@ var St = k(285), Ct = (e) => {
1752
1768
  !1
1753
1769
  ];
1754
1770
  var f;
1755
- let p = "[" + (l ? "^" : "") + Et(r) + "]", m = "[" + (l ? "" : "^") + Et(i) + "]";
1771
+ let p = "[" + (l ? "^" : "") + Dt(r) + "]", m = "[" + (l ? "" : "^") + Dt(i) + "]";
1756
1772
  return [
1757
1773
  r.length && i.length ? "(" + p + "|" + m + ")" : r.length ? p : m,
1758
1774
  s,
1759
1775
  u - n,
1760
1776
  !0
1761
1777
  ];
1762
- }, Ot = function(e) {
1778
+ }, kt = function(e) {
1763
1779
  let { windowsPathsNoEscape: t = !1 } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1764
1780
  return t ? e.replace(/\[([^\/\\])\]/g, "$1") : e.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
1765
- }, kt = /* @__PURE__ */ new Set([
1781
+ }, At = /* @__PURE__ */ new Set([
1766
1782
  "!",
1767
1783
  "?",
1768
1784
  "+",
1769
1785
  "*",
1770
1786
  "@"
1771
- ]), At = (e) => kt.has(e), jt = "(?!\\.)", Mt = /* @__PURE__ */ new Set(["[", "."]), Nt = /* @__PURE__ */ new Set(["..", "."]), Pt = /* @__PURE__ */ new Set("().*{}+?[]^$\\!"), Ft = "[^/]", It = "[^/]*?", Lt = "[^/]+?", Rt = class e {
1787
+ ]), jt = (e) => At.has(e), Mt = "(?!\\.)", Nt = /* @__PURE__ */ new Set(["[", "."]), Pt = /* @__PURE__ */ new Set(["..", "."]), Ft = /* @__PURE__ */ new Set("().*{}+?[]^$\\!"), It = "[^/]", Lt = "[^/]*?", Rt = "[^/]+?", zt = class e {
1772
1788
  type;
1773
1789
  #e;
1774
1790
  #t;
@@ -1791,7 +1807,7 @@ var St = k(285), Ct = (e) => {
1791
1807
  return this.#t;
1792
1808
  }
1793
1809
  toString() {
1794
- return this.#l === void 0 ? this.type ? this.#l = this.type + "(" + this.#r.map(((e) => String(e))).join("|") + ")" : this.#l = this.#r.map(((e) => String(e))).join("") : this.#l;
1810
+ return this.#l === void 0 ? this.#l = this.type ? this.type + "(" + this.#r.map(((e) => String(e))).join("|") + ")" : this.#r.map(((e) => String(e))).join("") : this.#l;
1795
1811
  }
1796
1812
  #d() {
1797
1813
  if (this !== this.#e) throw Error("should only call on root");
@@ -1855,13 +1871,14 @@ var St = k(285), Ct = (e) => {
1855
1871
  let r = t.charAt(l++);
1856
1872
  if (a || r === "\\") a = !a, u += r;
1857
1873
  else if (o) l === s + 1 ? r !== "^" && r !== "!" || (c = !0) : r !== "]" || l === s + 2 && c || (o = !1), u += r;
1858
- else if (r !== "[") if (i.noext || !At(r) || t.charAt(l) !== "(") u += r;
1859
- else {
1860
- n.push(u), u = "";
1861
- let a = new e(r, n);
1862
- l = e.#f(t, a, l, i), n.push(a);
1863
- }
1864
- else o = !0, s = l, c = !1, u += r;
1874
+ else if (r !== "[") {
1875
+ if (i.noext || !jt(r) || t.charAt(l) !== "(") u += r;
1876
+ else {
1877
+ n.push(u), u = "";
1878
+ let a = new e(r, n);
1879
+ l = e.#f(t, a, l, i), n.push(a);
1880
+ }
1881
+ } else o = !0, s = l, c = !1, u += r;
1865
1882
  }
1866
1883
  return n.push(u), l;
1867
1884
  }
@@ -1870,15 +1887,16 @@ var St = k(285), Ct = (e) => {
1870
1887
  let r = t.charAt(l++);
1871
1888
  if (a || r === "\\") a = !a, f += r;
1872
1889
  else if (o) l === s + 1 ? r !== "^" && r !== "!" || (c = !0) : r !== "]" || l === s + 2 && c || (o = !1), f += r;
1873
- else if (r !== "[") if (At(r) && t.charAt(l) === "(") {
1874
- u.push(f), f = "";
1875
- let n = new e(r, u);
1876
- u.push(n), l = e.#f(t, n, l, i);
1877
- } else if (r !== "|") {
1878
- if (r === ")") return f === "" && n.#r.length === 0 && (n.#u = !0), u.push(f), f = "", n.push(...d, u), l;
1879
- f += r;
1880
- } else u.push(f), f = "", d.push(u), u = new e(null, n);
1881
- else o = !0, s = l, c = !1, f += r;
1890
+ else if (r !== "[") {
1891
+ if (jt(r) && t.charAt(l) === "(") {
1892
+ u.push(f), f = "";
1893
+ let n = new e(r, u);
1894
+ u.push(n), l = e.#f(t, n, l, i);
1895
+ } else if (r !== "|") {
1896
+ if (r === ")") return f === "" && n.#r.length === 0 && (n.#u = !0), u.push(f), f = "", n.push(...d, u), l;
1897
+ f += r;
1898
+ } else u.push(f), f = "", d.push(u), u = new e(null, n);
1899
+ } else o = !0, s = l, c = !1, f += r;
1882
1900
  }
1883
1901
  return n.type = null, n.#t = void 0, n.#r = [t.substring(r - 1)], l;
1884
1902
  }
@@ -1906,14 +1924,14 @@ var St = k(285), Ct = (e) => {
1906
1924
  let [i, a, o, s] = typeof n == "string" ? e.#m(n, this.#t, r) : n.toRegExpSource(t);
1907
1925
  return this.#t = this.#t || o, this.#n = this.#n || s, i;
1908
1926
  })).join(""), a = "";
1909
- if (this.isStart() && typeof this.#r[0] == "string" && (this.#r.length !== 1 || !Nt.has(this.#r[0]))) {
1910
- let e = Mt, r = n && e.has(i.charAt(0)) || i.startsWith("\\.") && e.has(i.charAt(2)) || i.startsWith("\\.\\.") && e.has(i.charAt(4)), o = !n && !t && e.has(i.charAt(0));
1911
- a = r ? "(?!(?:^|/)\\.\\.?(?:$|/))" : o ? jt : "";
1927
+ if (this.isStart() && typeof this.#r[0] == "string" && (this.#r.length !== 1 || !Pt.has(this.#r[0]))) {
1928
+ let e = Nt, r = n && e.has(i.charAt(0)) || i.startsWith("\\.") && e.has(i.charAt(2)) || i.startsWith("\\.\\.") && e.has(i.charAt(4)), o = !n && !t && e.has(i.charAt(0));
1929
+ a = r ? "(?!(?:^|/)\\.\\.?(?:$|/))" : o ? Mt : "";
1912
1930
  }
1913
1931
  let o = "";
1914
1932
  return this.isEnd() && this.#e.#s && this.#i?.type === "!" && (o = "(?:$|\\/)"), [
1915
1933
  a + i + o,
1916
- Ot(i),
1934
+ kt(i),
1917
1935
  this.#t = !!this.#t,
1918
1936
  this.#n
1919
1937
  ];
@@ -1923,7 +1941,7 @@ var St = k(285), Ct = (e) => {
1923
1941
  let e = this.toString();
1924
1942
  return this.#r = [e], this.type = null, this.#t = void 0, [
1925
1943
  e,
1926
- Ot(this.toString()),
1944
+ kt(this.toString()),
1927
1945
  !1,
1928
1946
  !1
1929
1947
  ];
@@ -1931,9 +1949,9 @@ var St = k(285), Ct = (e) => {
1931
1949
  let o = !r || t || n ? "" : this.#p(!0);
1932
1950
  o === a && (o = ""), o && (a = `(?:${a})(?:${o})*?`);
1933
1951
  let s = "";
1934
- return s = this.type === "!" && this.#u ? (this.isStart() && !n ? jt : "") + Lt : i + a + (this.type === "!" ? "))" + (!this.isStart() || n || t ? "" : jt) + "[^/]*?)" : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && o ? ")" : this.type === "*" && o ? ")?" : `)${this.type}`), [
1952
+ return s = this.type === "!" && this.#u ? (this.isStart() && !n ? Mt : "") + Rt : i + a + (this.type === "!" ? "))" + (!this.isStart() || n || t ? "" : Mt) + "[^/]*?)" : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && o ? ")" : this.type === "*" && o ? ")?" : `)${this.type}`), [
1935
1953
  s,
1936
- Ot(a),
1954
+ kt(a),
1937
1955
  this.#t = !!this.#t,
1938
1956
  this.#n
1939
1957
  ];
@@ -1949,120 +1967,120 @@ var St = k(285), Ct = (e) => {
1949
1967
  let n = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r = !1, i = "", a = !1;
1950
1968
  for (let o = 0; o < e.length; o++) {
1951
1969
  let s = e.charAt(o);
1952
- if (r) r = !1, i += (Pt.has(s) ? "\\" : "") + s;
1970
+ if (r) r = !1, i += (Ft.has(s) ? "\\" : "") + s;
1953
1971
  else if (s !== "\\") {
1954
1972
  if (s === "[") {
1955
- let [n, r, s, c] = Dt(e, o);
1973
+ let [n, r, s, c] = Ot(e, o);
1956
1974
  if (s) {
1957
1975
  i += n, a ||= r, o += s - 1, t ||= c;
1958
1976
  continue;
1959
1977
  }
1960
1978
  }
1961
- s === "*" ? (i += n && e === "*" ? Lt : It, t = !0) : s === "?" ? (i += Ft, t = !0) : i += s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
1979
+ s === "*" ? (i += n && e === "*" ? Rt : Lt, t = !0) : s === "?" ? (i += It, t = !0) : i += s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
1962
1980
  } else o === e.length - 1 ? i += "\\\\" : r = !0;
1963
1981
  }
1964
1982
  return [
1965
1983
  i,
1966
- Ot(e),
1984
+ kt(e),
1967
1985
  !!t,
1968
1986
  a
1969
1987
  ];
1970
1988
  }
1971
- }, L = function(e, t) {
1989
+ }, R = function(e, t) {
1972
1990
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
1973
- return Ct(t), !(!n.nocomment && t.charAt(0) === "#") && new ln(t, n).match(e);
1974
- }, zt = /^\*+([^+@!?\*\[\(]*)$/, Bt = (e) => (t) => !t.startsWith(".") && t.endsWith(e), Vt = (e) => (t) => t.endsWith(e), Ht = (e) => (e = e.toLowerCase(), (t) => !t.startsWith(".") && t.toLowerCase().endsWith(e)), Ut = (e) => (e = e.toLowerCase(), (t) => t.toLowerCase().endsWith(e)), Wt = /^\*+\.\*+$/, Gt = (e) => !e.startsWith(".") && e.includes("."), Kt = (e) => e !== "." && e !== ".." && e.includes("."), qt = /^\.\*+$/, Jt = (e) => e !== "." && e !== ".." && e.startsWith("."), Yt = /^\*+$/, Xt = (e) => e.length !== 0 && !e.startsWith("."), Zt = (e) => e.length !== 0 && e !== "." && e !== "..", Qt = /^\?+([^+@!?\*\[\(]*)?$/, $t = (e) => {
1975
- let [t, n = ""] = e, r = rn([t]);
1976
- return n ? (n = n.toLowerCase(), (e) => r(e) && e.toLowerCase().endsWith(n)) : r;
1977
- }, en = (e) => {
1991
+ return wt(t), !(!n.nocomment && t.charAt(0) === "#") && new un(t, n).match(e);
1992
+ }, Bt = /^\*+([^+@!?\*\[\(]*)$/, Vt = (e) => (t) => !t.startsWith(".") && t.endsWith(e), Ht = (e) => (t) => t.endsWith(e), Ut = (e) => (e = e.toLowerCase(), (t) => !t.startsWith(".") && t.toLowerCase().endsWith(e)), Wt = (e) => (e = e.toLowerCase(), (t) => t.toLowerCase().endsWith(e)), Gt = /^\*+\.\*+$/, Kt = (e) => !e.startsWith(".") && e.includes("."), qt = (e) => e !== "." && e !== ".." && e.includes("."), Jt = /^\.\*+$/, Yt = (e) => e !== "." && e !== ".." && e.startsWith("."), Xt = /^\*+$/, Zt = (e) => e.length !== 0 && !e.startsWith("."), Qt = (e) => e.length !== 0 && e !== "." && e !== "..", $t = /^\?+([^+@!?\*\[\(]*)?$/, en = (e) => {
1978
1993
  let [t, n = ""] = e, r = an([t]);
1979
1994
  return n ? (n = n.toLowerCase(), (e) => r(e) && e.toLowerCase().endsWith(n)) : r;
1980
1995
  }, tn = (e) => {
1981
- let [t, n = ""] = e, r = an([t]);
1982
- return n ? (e) => r(e) && e.endsWith(n) : r;
1996
+ let [t, n = ""] = e, r = on([t]);
1997
+ return n ? (n = n.toLowerCase(), (e) => r(e) && e.toLowerCase().endsWith(n)) : r;
1983
1998
  }, nn = (e) => {
1984
- let [t, n = ""] = e, r = rn([t]);
1999
+ let [t, n = ""] = e, r = on([t]);
1985
2000
  return n ? (e) => r(e) && e.endsWith(n) : r;
1986
2001
  }, rn = (e) => {
2002
+ let [t, n = ""] = e, r = an([t]);
2003
+ return n ? (e) => r(e) && e.endsWith(n) : r;
2004
+ }, an = (e) => {
1987
2005
  let [t] = e, n = t.length;
1988
2006
  return (e) => e.length === n && !e.startsWith(".");
1989
- }, an = (e) => {
2007
+ }, on = (e) => {
1990
2008
  let [t] = e, n = t.length;
1991
2009
  return (e) => e.length === n && e !== "." && e !== "..";
1992
- }, on = typeof t == "object" && t ? typeof t.env == "object" && t.env && t.env.__MINIMATCH_TESTING_PLATFORM__ || t.platform : "posix";
1993
- L.sep = on === "win32" ? "\\" : "/";
1994
- var R = Symbol("globstar **");
1995
- L.GLOBSTAR = R, L.filter = function(e) {
2010
+ }, sn = typeof t == "object" && t ? typeof t.env == "object" && t.env && t.env.__MINIMATCH_TESTING_PLATFORM__ || t.platform : "posix";
2011
+ R.sep = sn === "win32" ? "\\" : "/";
2012
+ var z = Symbol("globstar **");
2013
+ R.GLOBSTAR = z, R.filter = function(e) {
1996
2014
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1997
- return (n) => L(n, e, t);
2015
+ return (n) => R(n, e, t);
1998
2016
  };
1999
- var z = function(e) {
2017
+ var B = function(e) {
2000
2018
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2001
2019
  return Object.assign({}, e, t);
2002
2020
  };
2003
- L.defaults = (e) => {
2004
- if (!e || typeof e != "object" || !Object.keys(e).length) return L;
2005
- let t = L;
2021
+ R.defaults = (e) => {
2022
+ if (!e || typeof e != "object" || !Object.keys(e).length) return R;
2023
+ let t = R;
2006
2024
  return Object.assign((function(n, r) {
2007
- return t(n, r, z(e, arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}));
2025
+ return t(n, r, B(e, arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}));
2008
2026
  }), {
2009
2027
  Minimatch: class extends t.Minimatch {
2010
2028
  constructor(t) {
2011
- super(t, z(e, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}));
2029
+ super(t, B(e, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}));
2012
2030
  }
2013
2031
  static defaults(n) {
2014
- return t.defaults(z(e, n)).Minimatch;
2032
+ return t.defaults(B(e, n)).Minimatch;
2015
2033
  }
2016
2034
  },
2017
2035
  AST: class extends t.AST {
2018
2036
  constructor(t, n) {
2019
- super(t, n, z(e, arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}));
2037
+ super(t, n, B(e, arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}));
2020
2038
  }
2021
2039
  static fromGlob(n) {
2022
2040
  let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2023
- return t.AST.fromGlob(n, z(e, r));
2041
+ return t.AST.fromGlob(n, B(e, r));
2024
2042
  }
2025
2043
  },
2026
2044
  unescape: function(n) {
2027
2045
  let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2028
- return t.unescape(n, z(e, r));
2046
+ return t.unescape(n, B(e, r));
2029
2047
  },
2030
2048
  escape: function(n) {
2031
2049
  let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2032
- return t.escape(n, z(e, r));
2050
+ return t.escape(n, B(e, r));
2033
2051
  },
2034
2052
  filter: function(n) {
2035
2053
  let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2036
- return t.filter(n, z(e, r));
2054
+ return t.filter(n, B(e, r));
2037
2055
  },
2038
- defaults: (n) => t.defaults(z(e, n)),
2056
+ defaults: (n) => t.defaults(B(e, n)),
2039
2057
  makeRe: function(n) {
2040
2058
  let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2041
- return t.makeRe(n, z(e, r));
2059
+ return t.makeRe(n, B(e, r));
2042
2060
  },
2043
2061
  braceExpand: function(n) {
2044
2062
  let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2045
- return t.braceExpand(n, z(e, r));
2063
+ return t.braceExpand(n, B(e, r));
2046
2064
  },
2047
2065
  match: function(n, r) {
2048
2066
  let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
2049
- return t.match(n, r, z(e, i));
2067
+ return t.match(n, r, B(e, i));
2050
2068
  },
2051
2069
  sep: t.sep,
2052
- GLOBSTAR: R
2070
+ GLOBSTAR: z
2053
2071
  });
2054
2072
  };
2055
- var sn = function(e) {
2073
+ var cn = function(e) {
2056
2074
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2057
- return Ct(e), t.nobrace || !/\{(?:(?!\{).)*\}/.test(e) ? [e] : St(e);
2075
+ return wt(e), t.nobrace || !/\{(?:(?!\{).)*\}/.test(e) ? [e] : Ct(e);
2058
2076
  };
2059
- L.braceExpand = sn, L.makeRe = function(e) {
2060
- return new ln(e, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}).makeRe();
2061
- }, L.match = function(e, t) {
2062
- let n = new ln(t, arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {});
2077
+ R.braceExpand = cn, R.makeRe = function(e) {
2078
+ return new un(e, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}).makeRe();
2079
+ }, R.match = function(e, t) {
2080
+ let n = new un(t, arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {});
2063
2081
  return e = e.filter(((e) => n.match(e))), n.options.nonull && !e.length && e.push(t), e;
2064
2082
  };
2065
- var cn = /[?*]|[+@!]\(.*?\)|\[|\]/, ln = class {
2083
+ var ln = /[?*]|[+@!]\(.*?\)|\[|\]/, un = class {
2066
2084
  options;
2067
2085
  set;
2068
2086
  pattern;
@@ -2082,7 +2100,7 @@ var cn = /[?*]|[+@!]\(.*?\)|\[|\]/, ln = class {
2082
2100
  regexp;
2083
2101
  constructor(e) {
2084
2102
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2085
- Ct(e), t ||= {}, this.options = t, this.pattern = e, this.platform = t.platform || on, this.isWindows = this.platform === "win32", this.windowsPathsNoEscape = !!t.windowsPathsNoEscape || !1 === t.allowWindowsEscape, 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 ? !(!this.isWindows || !this.nocase) : t.windowsNoMagicRoot, this.globSet = [], this.globParts = [], this.set = [], this.make();
2103
+ wt(e), t ||= {}, this.options = t, this.pattern = e, this.platform = t.platform || sn, this.isWindows = this.platform === "win32", this.windowsPathsNoEscape = !!t.windowsPathsNoEscape || !1 === t.allowWindowsEscape, 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 ? !(!this.isWindows || !this.nocase) : t.windowsNoMagicRoot, this.globSet = [], this.globParts = [], this.set = [], this.make();
2086
2104
  }
2087
2105
  hasMagic() {
2088
2106
  if (this.options.magicalBraces && this.set.length > 1) return !0;
@@ -2101,7 +2119,7 @@ var cn = /[?*]|[+@!]\(.*?\)|\[|\]/, ln = class {
2101
2119
  this.globParts = this.preprocess(n), this.debug(this.pattern, this.globParts);
2102
2120
  let r = this.globParts.map(((e, t, n) => {
2103
2121
  if (this.isWindows && this.windowsNoMagicRoot) {
2104
- let t = !(e[0] !== "" || e[1] !== "" || e[2] !== "?" && cn.test(e[2]) || cn.test(e[3])), n = /^[a-z]:/i.test(e[0]);
2122
+ let t = !(e[0] !== "" || e[1] !== "" || e[2] !== "?" && ln.test(e[2]) || ln.test(e[3])), n = /^[a-z]:/i.test(e[0]);
2105
2123
  if (t) return [...e.slice(0, 4), ...e.slice(4).map(((e) => this.parse(e)))];
2106
2124
  if (n) return [e[0], ...e.slice(1).map(((e) => this.parse(e)))];
2107
2125
  }
@@ -2238,7 +2256,7 @@ var cn = /[?*]|[+@!]\(.*?\)|\[|\]/, ln = class {
2238
2256
  this.debug("matchOne loop");
2239
2257
  var l = t[o], u = e[a];
2240
2258
  if (this.debug(t, l, u), !1 === l) return !1;
2241
- if (l === R) {
2259
+ if (l === z) {
2242
2260
  this.debug("GLOBSTAR", [
2243
2261
  t,
2244
2262
  l,
@@ -2269,16 +2287,16 @@ var cn = /[?*]|[+@!]\(.*?\)|\[|\]/, ln = class {
2269
2287
  throw Error("wtf?");
2270
2288
  }
2271
2289
  braceExpand() {
2272
- return sn(this.pattern, this.options);
2290
+ return cn(this.pattern, this.options);
2273
2291
  }
2274
2292
  parse(e) {
2275
- Ct(e);
2293
+ wt(e);
2276
2294
  let t = this.options;
2277
- if (e === "**") return R;
2295
+ if (e === "**") return z;
2278
2296
  if (e === "") return "";
2279
2297
  let n, r = null;
2280
- (n = e.match(Yt)) ? r = t.dot ? Zt : Xt : (n = e.match(zt)) ? r = (t.nocase ? t.dot ? Ut : Ht : t.dot ? Vt : Bt)(n[1]) : (n = e.match(Qt)) ? r = (t.nocase ? t.dot ? en : $t : t.dot ? tn : nn)(n) : (n = e.match(Wt)) ? r = t.dot ? Kt : Gt : (n = e.match(qt)) && (r = Jt);
2281
- let i = Rt.fromGlob(e, this.options).toMMPattern();
2298
+ (n = e.match(Xt)) ? r = t.dot ? Qt : Zt : (n = e.match(Bt)) ? r = (t.nocase ? t.dot ? Wt : Ut : t.dot ? Ht : Vt)(n[1]) : (n = e.match($t)) ? r = (t.nocase ? t.dot ? tn : en : t.dot ? nn : rn)(n) : (n = e.match(Gt)) ? r = t.dot ? qt : Kt : (n = e.match(Jt)) && (r = Yt);
2299
+ let i = zt.fromGlob(e, this.options).toMMPattern();
2282
2300
  return r && typeof i == "object" && Reflect.defineProperty(i, "test", { value: r }), i;
2283
2301
  }
2284
2302
  makeRe() {
@@ -2288,12 +2306,12 @@ var cn = /[?*]|[+@!]\(.*?\)|\[|\]/, ln = class {
2288
2306
  let t = this.options, n = t.noglobstar ? "[^/]*?" : t.dot ? "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?" : "(?:(?!(?:\\/|^)\\.).)*?", r = new Set(t.nocase ? ["i"] : []), i = e.map(((e) => {
2289
2307
  let t = e.map(((e) => {
2290
2308
  if (e instanceof RegExp) for (let t of e.flags.split("")) r.add(t);
2291
- return typeof e == "string" ? e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") : e === R ? R : e._src;
2309
+ return typeof e == "string" ? e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") : e === z ? z : e._src;
2292
2310
  }));
2293
2311
  return t.forEach(((e, r) => {
2294
2312
  let i = t[r + 1], a = t[r - 1];
2295
- e === R && a !== R && (a === void 0 ? i !== void 0 && i !== R ? t[r + 1] = "(?:\\/|" + n + "\\/)?" + i : t[r] = n : i === void 0 ? t[r - 1] = a + "(?:\\/|" + n + ")?" : i !== R && (t[r - 1] = a + "(?:\\/|\\/" + n + "\\/)" + i, t[r + 1] = R));
2296
- })), t.filter(((e) => e !== R)).join("/");
2313
+ e === z && a !== z && (a === void 0 ? i !== void 0 && i !== z ? t[r + 1] = "(?:\\/|" + n + "\\/)?" + i : t[r] = n : i === void 0 ? t[r - 1] = a + "(?:\\/|" + n + ")?" : i !== z && (t[r - 1] = a + "(?:\\/|\\/" + n + "\\/)" + i, t[r + 1] = z));
2314
+ })), t.filter(((e) => e !== z)).join("/");
2297
2315
  })).join("|"), [a, o] = e.length > 1 ? ["(?:", ")"] : ["", ""];
2298
2316
  i = "^" + a + i + o + "$", this.negate && (i = "^(?!" + i + ").+$");
2299
2317
  try {
@@ -2326,53 +2344,53 @@ var cn = /[?*]|[+@!]\(.*?\)|\[|\]/, ln = class {
2326
2344
  return !n.flipNegate && this.negate;
2327
2345
  }
2328
2346
  static defaults(e) {
2329
- return L.defaults(e).Minimatch;
2347
+ return R.defaults(e).Minimatch;
2330
2348
  }
2331
2349
  };
2332
- function un(e) {
2350
+ function dn(e) {
2333
2351
  let t = /* @__PURE__ */ Error(`${arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ""}Invalid response: ${e.status} ${e.statusText}`);
2334
2352
  return t.status = e.status, t.response = e, t;
2335
2353
  }
2336
- function B(e, t) {
2354
+ function V(e, t) {
2337
2355
  let { status: n } = t;
2338
2356
  if (n === 401 && e.digest) return t;
2339
- if (n >= 400) throw un(t);
2357
+ if (n >= 400) throw dn(t);
2340
2358
  return t;
2341
2359
  }
2342
- function V(e, t) {
2360
+ function H(e, t) {
2343
2361
  return arguments.length > 2 && arguments[2] !== void 0 && arguments[2] ? {
2344
2362
  data: t,
2345
- headers: e.headers ? dt(e.headers) : {},
2363
+ headers: e.headers ? ft(e.headers) : {},
2346
2364
  status: e.status,
2347
2365
  statusText: e.statusText
2348
2366
  } : t;
2349
2367
  }
2350
- L.AST = Rt, L.Minimatch = ln, L.escape = function(e) {
2368
+ R.AST = zt, R.Minimatch = un, R.escape = function(e) {
2351
2369
  let { windowsPathsNoEscape: t = !1 } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2352
2370
  return t ? e.replace(/[?*()[\]]/g, "[$&]") : e.replace(/[?*()[\]\\]/g, "\\$&");
2353
- }, L.unescape = Ot;
2354
- var dn = (fn = function(e, t, n) {
2355
- let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, i = I({
2356
- url: M(e.remoteURL, j(t)),
2371
+ }, R.unescape = kt;
2372
+ var fn = (pn = function(e, t, n) {
2373
+ let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, i = L({
2374
+ url: N(e.remoteURL, M(t)),
2357
2375
  method: "COPY",
2358
2376
  headers: {
2359
- Destination: M(e.remoteURL, j(n)),
2377
+ Destination: N(e.remoteURL, M(n)),
2360
2378
  Overwrite: !1 === r.overwrite ? "F" : "T",
2361
2379
  Depth: r.shallow ? "0" : "infinity"
2362
2380
  }
2363
2381
  }, e, r);
2364
2382
  return o = function(t) {
2365
- B(e, t);
2366
- }, (a = F(i, e)) && a.then || (a = Promise.resolve(a)), o ? a.then(o) : a;
2383
+ V(e, t);
2384
+ }, (a = I(i, e)) && a.then || (a = Promise.resolve(a)), o ? a.then(o) : a;
2367
2385
  var a, o;
2368
2386
  }, function() {
2369
2387
  var e = [...arguments];
2370
2388
  try {
2371
- return Promise.resolve(fn.apply(this, e));
2389
+ return Promise.resolve(pn.apply(this, e));
2372
2390
  } catch (e) {
2373
2391
  return Promise.reject(e);
2374
2392
  }
2375
- }), fn, pn = {
2393
+ }), pn, mn = {
2376
2394
  preserveOrder: !1,
2377
2395
  attributeNamePrefix: "@_",
2378
2396
  attributesGroupName: !1,
@@ -2410,8 +2428,8 @@ var dn = (fn = function(e, t, n) {
2410
2428
  return e;
2411
2429
  },
2412
2430
  captureMetaData: !1
2413
- }, mn = /* @__PURE__ */ RegExp("^[: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][: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\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");
2414
- function hn(e, t) {
2431
+ }, hn = /* @__PURE__ */ RegExp("^[: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][: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\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");
2432
+ function gn(e, t) {
2415
2433
  let n = [], r = t.exec(e);
2416
2434
  for (; r;) {
2417
2435
  let i = [];
@@ -2422,9 +2440,9 @@ function hn(e, t) {
2422
2440
  }
2423
2441
  return n;
2424
2442
  }
2425
- var gn = function(e) {
2426
- return mn.exec(e) != null;
2427
- }, _n = typeof Symbol == "function" ? Symbol("XML Node Metadata") : "@@xmlMetadata", H = class {
2443
+ var _n = function(e) {
2444
+ return hn.exec(e) != null;
2445
+ }, vn = typeof Symbol == "function" ? Symbol("XML Node Metadata") : "@@xmlMetadata", U = class {
2428
2446
  constructor(e) {
2429
2447
  this.tagname = e, this.child = [], this[":@"] = {};
2430
2448
  }
@@ -2435,12 +2453,12 @@ var gn = function(e) {
2435
2453
  e.tagname === "__proto__" && (e.tagname = "#__proto__"), e[":@"] && Object.keys(e[":@"]).length > 0 ? this.child.push({
2436
2454
  [e.tagname]: e.child,
2437
2455
  ":@": e[":@"]
2438
- }) : this.child.push({ [e.tagname]: e.child }), t !== void 0 && (this.child[this.child.length - 1][_n] = { startIndex: t });
2456
+ }) : this.child.push({ [e.tagname]: e.child }), t !== void 0 && (this.child[this.child.length - 1][vn] = { startIndex: t });
2439
2457
  }
2440
2458
  static getMetaDataSymbol() {
2441
- return _n;
2459
+ return vn;
2442
2460
  }
2443
- }, vn = class {
2461
+ }, yn = class {
2444
2462
  constructor(e) {
2445
2463
  this.suppressValidationErr = !e;
2446
2464
  }
@@ -2450,27 +2468,28 @@ var gn = function(e) {
2450
2468
  {
2451
2469
  t += 9;
2452
2470
  let r = 1, i = !1, a = !1, o = "";
2453
- for (; t < e.length; t++) if (e[t] !== "<" || a) if (e[t] === ">") {
2454
- if (a ? e[t - 1] === "-" && e[t - 2] === "-" && (a = !1, r--) : r--, r === 0) break;
2455
- } else e[t] === "[" ? i = !0 : o += e[t];
2456
- else {
2457
- if (i && W(e, "!ENTITY", t)) {
2471
+ for (; t < e.length; t++) if (e[t] !== "<" || a) {
2472
+ if (e[t] === ">") {
2473
+ if (a ? e[t - 1] === "-" && e[t - 2] === "-" && (a = !1, r--) : r--, r === 0) break;
2474
+ } else e[t] === "[" ? i = !0 : o += e[t];
2475
+ } else {
2476
+ if (i && G(e, "!ENTITY", t)) {
2458
2477
  let r, i;
2459
2478
  t += 7, [r, i, t] = this.readEntityExp(e, t + 1, this.suppressValidationErr), i.indexOf("&") === -1 && (n[r] = {
2460
2479
  regx: RegExp(`&${r};`, "g"),
2461
2480
  val: i
2462
2481
  });
2463
- } else if (i && W(e, "!ELEMENT", t)) {
2482
+ } else if (i && G(e, "!ELEMENT", t)) {
2464
2483
  t += 8;
2465
2484
  let { index: n } = this.readElementExp(e, t + 1);
2466
2485
  t = n;
2467
- } else if (i && W(e, "!ATTLIST", t)) t += 8;
2468
- else if (i && W(e, "!NOTATION", t)) {
2486
+ } else if (i && G(e, "!ATTLIST", t)) t += 8;
2487
+ else if (i && G(e, "!NOTATION", t)) {
2469
2488
  t += 9;
2470
2489
  let { index: n } = this.readNotationExp(e, t + 1, this.suppressValidationErr);
2471
2490
  t = n;
2472
2491
  } else {
2473
- if (!W(e, "!--", t)) throw Error("Invalid DOCTYPE");
2492
+ if (!G(e, "!--", t)) throw Error("Invalid DOCTYPE");
2474
2493
  a = !0;
2475
2494
  }
2476
2495
  r++, o = "";
@@ -2483,10 +2502,10 @@ var gn = function(e) {
2483
2502
  };
2484
2503
  }
2485
2504
  readEntityExp(e, t) {
2486
- t = U(e, t);
2505
+ t = W(e, t);
2487
2506
  let n = "";
2488
2507
  for (; t < e.length && !/\s/.test(e[t]) && e[t] !== "\"" && e[t] !== "'";) n += e[t], t++;
2489
- if (yn(n), t = U(e, t), !this.suppressValidationErr) {
2508
+ if (bn(n), t = W(e, t), !this.suppressValidationErr) {
2490
2509
  if (e.substring(t, t + 6).toUpperCase() === "SYSTEM") throw Error("External entities are not supported");
2491
2510
  if (e[t] === "%") throw Error("Parameter entities are not supported");
2492
2511
  }
@@ -2498,15 +2517,15 @@ var gn = function(e) {
2498
2517
  ];
2499
2518
  }
2500
2519
  readNotationExp(e, t) {
2501
- t = U(e, t);
2520
+ t = W(e, t);
2502
2521
  let n = "";
2503
2522
  for (; t < e.length && !/\s/.test(e[t]);) n += e[t], t++;
2504
- !this.suppressValidationErr && yn(n), t = U(e, t);
2523
+ !this.suppressValidationErr && bn(n), t = W(e, t);
2505
2524
  let r = e.substring(t, t + 6).toUpperCase();
2506
2525
  if (!this.suppressValidationErr && r !== "SYSTEM" && r !== "PUBLIC") throw Error(`Expected SYSTEM or PUBLIC, found "${r}"`);
2507
- t += r.length, t = U(e, t);
2526
+ t += r.length, t = W(e, t);
2508
2527
  let i = null, a = null;
2509
- if (r === "PUBLIC") [t, i] = this.readIdentifierVal(e, t, "publicIdentifier"), e[t = U(e, t)] !== "\"" && e[t] !== "'" || ([t, a] = this.readIdentifierVal(e, t, "systemIdentifier"));
2528
+ if (r === "PUBLIC") [t, i] = this.readIdentifierVal(e, t, "publicIdentifier"), e[t = W(e, t)] !== "\"" && e[t] !== "'" || ([t, a] = this.readIdentifierVal(e, t, "systemIdentifier"));
2510
2529
  else if (r === "SYSTEM" && ([t, a] = this.readIdentifierVal(e, t, "systemIdentifier"), !this.suppressValidationErr && !a)) throw Error("Missing mandatory system identifier for SYSTEM notation");
2511
2530
  return {
2512
2531
  notationName: n,
@@ -2523,13 +2542,13 @@ var gn = function(e) {
2523
2542
  return [++t, r];
2524
2543
  }
2525
2544
  readElementExp(e, t) {
2526
- t = U(e, t);
2545
+ t = W(e, t);
2527
2546
  let n = "";
2528
2547
  for (; t < e.length && !/\s/.test(e[t]);) n += e[t], t++;
2529
- if (!this.suppressValidationErr && !gn(n)) throw Error(`Invalid element name: "${n}"`);
2548
+ if (!this.suppressValidationErr && !_n(n)) throw Error(`Invalid element name: "${n}"`);
2530
2549
  let r = "";
2531
- if (e[t = U(e, t)] === "E" && W(e, "MPTY", t)) t += 4;
2532
- else if (e[t] === "A" && W(e, "NY", t)) t += 2;
2550
+ if (e[t = W(e, t)] === "E" && G(e, "MPTY", t)) t += 4;
2551
+ else if (e[t] === "A" && G(e, "NY", t)) t += 2;
2533
2552
  else if (e[t] === "(") {
2534
2553
  for (t++; t < e.length && e[t] !== ")";) r += e[t], t++;
2535
2554
  if (e[t] !== ")") throw Error("Unterminated content model");
@@ -2541,24 +2560,24 @@ var gn = function(e) {
2541
2560
  };
2542
2561
  }
2543
2562
  readAttlistExp(e, t) {
2544
- t = U(e, t);
2563
+ t = W(e, t);
2545
2564
  let n = "";
2546
2565
  for (; t < e.length && !/\s/.test(e[t]);) n += e[t], t++;
2547
- yn(n), t = U(e, t);
2566
+ bn(n), t = W(e, t);
2548
2567
  let r = "";
2549
2568
  for (; t < e.length && !/\s/.test(e[t]);) r += e[t], t++;
2550
- if (!yn(r)) throw Error(`Invalid attribute name: "${r}"`);
2551
- t = U(e, t);
2569
+ if (!bn(r)) throw Error(`Invalid attribute name: "${r}"`);
2570
+ t = W(e, t);
2552
2571
  let i = "";
2553
2572
  if (e.substring(t, t + 8).toUpperCase() === "NOTATION") {
2554
- if (i = "NOTATION", e[t = U(e, t += 8)] !== "(") throw Error(`Expected '(', found "${e[t]}"`);
2573
+ if (i = "NOTATION", e[t = W(e, t += 8)] !== "(") throw Error(`Expected '(', found "${e[t]}"`);
2555
2574
  t++;
2556
2575
  let n = [];
2557
2576
  for (; t < e.length && e[t] !== ")";) {
2558
2577
  let r = "";
2559
2578
  for (; t < e.length && e[t] !== "|" && e[t] !== ")";) r += e[t], t++;
2560
- if (r = r.trim(), !yn(r)) throw Error(`Invalid notation name: "${r}"`);
2561
- n.push(r), e[t] === "|" && (t++, t = U(e, t));
2579
+ if (r = r.trim(), !bn(r)) throw Error(`Invalid notation name: "${r}"`);
2580
+ n.push(r), e[t] === "|" && (t++, t = W(e, t));
2562
2581
  }
2563
2582
  if (e[t] !== ")") throw Error("Unterminated list of notations");
2564
2583
  t++, i += " (" + n.join("|") + ")";
@@ -2575,7 +2594,7 @@ var gn = function(e) {
2575
2594
  "NMTOKENS"
2576
2595
  ].includes(i.toUpperCase())) throw Error(`Invalid attribute type: "${i}"`);
2577
2596
  }
2578
- t = U(e, t);
2597
+ t = W(e, t);
2579
2598
  let a = "";
2580
2599
  return e.substring(t, t + 8).toUpperCase() === "#REQUIRED" ? (a = "#REQUIRED", t += 8) : e.substring(t, t + 7).toUpperCase() === "#IMPLIED" ? (a = "#IMPLIED", t += 7) : [t, a] = this.readIdentifierVal(e, t, "ATTLIST"), {
2581
2600
  elementName: n,
@@ -2585,30 +2604,30 @@ var gn = function(e) {
2585
2604
  index: t
2586
2605
  };
2587
2606
  }
2588
- }, U = (e, t) => {
2607
+ }, W = (e, t) => {
2589
2608
  for (; t < e.length && /\s/.test(e[t]);) t++;
2590
2609
  return t;
2591
2610
  };
2592
- function W(e, t, n) {
2611
+ function G(e, t, n) {
2593
2612
  for (let r = 0; r < t.length; r++) if (t[r] !== e[n + r + 1]) return !1;
2594
2613
  return !0;
2595
2614
  }
2596
- function yn(e) {
2597
- if (gn(e)) return e;
2615
+ function bn(e) {
2616
+ if (_n(e)) return e;
2598
2617
  throw Error(`Invalid entity name ${e}`);
2599
2618
  }
2600
- var bn = /^[-+]?0x[a-fA-F0-9]+$/, xn = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, Sn = {
2619
+ var xn = /^[-+]?0x[a-fA-F0-9]+$/, Sn = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, Cn = {
2601
2620
  hex: !0,
2602
2621
  leadingZeros: !0,
2603
2622
  decimalPoint: ".",
2604
2623
  eNotation: !0
2605
- }, Cn = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
2606
- function wn(e) {
2624
+ }, wn = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
2625
+ function Tn(e) {
2607
2626
  return typeof e == "function" ? e : Array.isArray(e) ? (t) => {
2608
2627
  for (let n of e) if (typeof n == "string" && t === n || n instanceof RegExp && n.test(t)) return !0;
2609
2628
  } : () => !1;
2610
2629
  }
2611
- var Tn = class {
2630
+ var En = class {
2612
2631
  constructor(e) {
2613
2632
  if (this.options = e, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = {
2614
2633
  apos: {
@@ -2665,13 +2684,13 @@ var Tn = class {
2665
2684
  },
2666
2685
  num_dec: {
2667
2686
  regex: /&#([0-9]{1,7});/g,
2668
- val: (e, t) => zn(t, 10, "&#")
2687
+ val: (e, t) => Bn(t, 10, "&#")
2669
2688
  },
2670
2689
  num_hex: {
2671
2690
  regex: /&#x([0-9a-fA-F]{1,6});/g,
2672
- val: (e, t) => zn(t, 16, "&#x")
2691
+ val: (e, t) => Bn(t, 16, "&#x")
2673
2692
  }
2674
- }, this.addExternalEntities = En, this.parseXml = jn, this.parseTextData = Dn, this.resolveNameSpace = On, this.buildAttributesMap = An, this.isItStopNode = Fn, this.replaceEntitiesValue = Nn, this.readStopNodeData = Ln, this.saveTextToParentTag = Pn, this.addChild = Mn, this.ignoreAttributesFn = wn(this.options.ignoreAttributes), this.options.stopNodes && this.options.stopNodes.length > 0) {
2693
+ }, this.addExternalEntities = Dn, this.parseXml = Mn, this.parseTextData = On, this.resolveNameSpace = kn, this.buildAttributesMap = jn, this.isItStopNode = In, this.replaceEntitiesValue = Pn, this.readStopNodeData = Rn, this.saveTextToParentTag = Fn, this.addChild = Nn, this.ignoreAttributesFn = Tn(this.options.ignoreAttributes), this.options.stopNodes && this.options.stopNodes.length > 0) {
2675
2694
  this.stopNodesExact = /* @__PURE__ */ new Set(), this.stopNodesWildcard = /* @__PURE__ */ new Set();
2676
2695
  for (let e = 0; e < this.options.stopNodes.length; e++) {
2677
2696
  let t = this.options.stopNodes[e];
@@ -2680,7 +2699,7 @@ var Tn = class {
2680
2699
  }
2681
2700
  }
2682
2701
  };
2683
- function En(e) {
2702
+ function Dn(e) {
2684
2703
  let t = Object.keys(e);
2685
2704
  for (let n = 0; n < t.length; n++) {
2686
2705
  let r = t[n];
@@ -2690,14 +2709,14 @@ function En(e) {
2690
2709
  };
2691
2710
  }
2692
2711
  }
2693
- function Dn(e, t, n, r, i, a, o) {
2712
+ function On(e, t, n, r, i, a, o) {
2694
2713
  if (e !== void 0 && (this.options.trimValues && !r && (e = e.trim()), e.length > 0)) {
2695
2714
  o || (e = this.replaceEntitiesValue(e));
2696
2715
  let r = this.options.tagValueProcessor(t, e, n, i, a);
2697
- return r == null ? e : typeof r != typeof e || r !== e ? r : this.options.trimValues || e.trim() === e ? Rn(e, this.options.parseTagValue, this.options.numberParseOptions) : e;
2716
+ return r == null ? e : typeof r != typeof e || r !== e ? r : this.options.trimValues || e.trim() === e ? zn(e, this.options.parseTagValue, this.options.numberParseOptions) : e;
2698
2717
  }
2699
2718
  }
2700
- function On(e) {
2719
+ function kn(e) {
2701
2720
  if (this.options.removeNSPrefix) {
2702
2721
  let t = e.split(":"), n = e.charAt(0) === "/" ? "/" : "";
2703
2722
  if (t[0] === "xmlns") return "";
@@ -2705,19 +2724,21 @@ function On(e) {
2705
2724
  }
2706
2725
  return e;
2707
2726
  }
2708
- var kn = /* @__PURE__ */ RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?", "gm");
2709
- function An(e, t) {
2727
+ var An = /* @__PURE__ */ RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?", "gm");
2728
+ function jn(e, t) {
2710
2729
  if (!0 !== this.options.ignoreAttributes && typeof e == "string") {
2711
- let n = hn(e, kn), r = n.length, i = {};
2730
+ let n = gn(e, An), r = n.length, i = {};
2712
2731
  for (let e = 0; e < r; e++) {
2713
2732
  let r = this.resolveNameSpace(n[e][1]);
2714
2733
  if (this.ignoreAttributesFn(r, t)) continue;
2715
2734
  let a = n[e][4], o = this.options.attributeNamePrefix + r;
2716
- if (r.length) if (this.options.transformAttributeName && (o = this.options.transformAttributeName(o)), o === "__proto__" && (o = "#__proto__"), a !== void 0) {
2717
- this.options.trimValues && (a = a.trim()), a = this.replaceEntitiesValue(a);
2718
- let e = this.options.attributeValueProcessor(r, a, t);
2719
- i[o] = e == null ? a : typeof e != typeof a || e !== a ? e : Rn(a, this.options.parseAttributeValue, this.options.numberParseOptions);
2720
- } else this.options.allowBooleanAttributes && (i[o] = !0);
2735
+ if (r.length) {
2736
+ if (this.options.transformAttributeName && (o = this.options.transformAttributeName(o)), o === "__proto__" && (o = "#__proto__"), a !== void 0) {
2737
+ this.options.trimValues && (a = a.trim()), a = this.replaceEntitiesValue(a);
2738
+ let e = this.options.attributeValueProcessor(r, a, t);
2739
+ i[o] = e == null ? a : typeof e != typeof a || e !== a ? e : zn(a, this.options.parseAttributeValue, this.options.numberParseOptions);
2740
+ } else this.options.allowBooleanAttributes && (i[o] = !0);
2741
+ }
2721
2742
  }
2722
2743
  if (!Object.keys(i).length) return;
2723
2744
  if (this.options.attributesGroupName) {
@@ -2727,88 +2748,89 @@ function An(e, t) {
2727
2748
  return i;
2728
2749
  }
2729
2750
  }
2730
- var jn = function(e) {
2751
+ var Mn = function(e) {
2731
2752
  e = e.replace(/\r\n?/g, "\n");
2732
- let t = new H("!xml"), n = t, r = "", i = "", a = new vn(this.options.processEntities);
2733
- for (let o = 0; o < e.length; o++) if (e[o] === "<") if (e[o + 1] === "/") {
2734
- let t = G(e, ">", o, "Closing Tag is not closed."), a = e.substring(o + 2, t).trim();
2735
- if (this.options.removeNSPrefix) {
2736
- let e = a.indexOf(":");
2737
- e !== -1 && (a = a.substr(e + 1));
2738
- }
2739
- this.options.transformTagName && (a = this.options.transformTagName(a)), n && (r = this.saveTextToParentTag(r, n, i));
2740
- let s = i.substring(i.lastIndexOf(".") + 1);
2741
- if (a && this.options.unpairedTags.indexOf(a) !== -1) throw Error(`Unpaired tag can not be used as closing tag: </${a}>`);
2742
- let c = 0;
2743
- s && this.options.unpairedTags.indexOf(s) !== -1 ? (c = i.lastIndexOf(".", i.lastIndexOf(".") - 1), this.tagsNodeStack.pop()) : c = i.lastIndexOf("."), i = i.substring(0, c), n = this.tagsNodeStack.pop(), r = "", o = t;
2744
- } else if (e[o + 1] === "?") {
2745
- let t = In(e, o, !1, "?>");
2746
- if (!t) throw Error("Pi Tag is not closed.");
2747
- if (r = this.saveTextToParentTag(r, n, i), !(this.options.ignoreDeclaration && t.tagName === "?xml" || this.options.ignorePiTags)) {
2748
- let e = new H(t.tagName);
2749
- e.add(this.options.textNodeName, ""), t.tagName !== t.tagExp && t.attrExpPresent && (e[":@"] = this.buildAttributesMap(t.tagExp, i)), this.addChild(n, e, i, o);
2750
- }
2751
- o = t.closeIndex + 1;
2752
- } else if (e.substr(o + 1, 3) === "!--") {
2753
- let t = G(e, "-->", o + 4, "Comment is not closed.");
2754
- if (this.options.commentPropName) {
2755
- let a = e.substring(o + 4, t - 2);
2756
- r = this.saveTextToParentTag(r, n, i), n.add(this.options.commentPropName, [{ [this.options.textNodeName]: a }]);
2757
- }
2758
- o = t;
2759
- } else if (e.substr(o + 1, 2) === "!D") {
2760
- let t = a.readDocType(e, o);
2761
- this.docTypeEntities = t.entities, o = t.i;
2762
- } else if (e.substr(o + 1, 2) === "![") {
2763
- let t = G(e, "]]>", o, "CDATA is not closed.") - 2, a = e.substring(o + 9, t);
2764
- r = this.saveTextToParentTag(r, n, i);
2765
- let s = this.parseTextData(a, n.tagname, i, !0, !1, !0, !0);
2766
- s ??= "", this.options.cdataPropName ? n.add(this.options.cdataPropName, [{ [this.options.textNodeName]: a }]) : n.add(this.options.textNodeName, s), o = t + 2;
2767
- } else {
2768
- let a = In(e, o, this.options.removeNSPrefix), s = a.tagName, c = a.rawTagName, l = a.tagExp, u = a.attrExpPresent, d = a.closeIndex;
2769
- if (this.options.transformTagName) {
2770
- let e = this.options.transformTagName(s);
2771
- l === s && (l = e), s = e;
2772
- }
2773
- n && r && n.tagname !== "!xml" && (r = this.saveTextToParentTag(r, n, i, !1));
2774
- let f = n;
2775
- f && this.options.unpairedTags.indexOf(f.tagname) !== -1 && (n = this.tagsNodeStack.pop(), i = i.substring(0, i.lastIndexOf("."))), s !== t.tagname && (i += i ? "." + s : s);
2776
- let p = o;
2777
- if (this.isItStopNode(this.stopNodesExact, this.stopNodesWildcard, i, s)) {
2778
- let t = "";
2779
- if (l.length > 0 && l.lastIndexOf("/") === l.length - 1) s[s.length - 1] === "/" ? (s = s.substr(0, s.length - 1), i = i.substr(0, i.length - 1), l = s) : l = l.substr(0, l.length - 1), o = a.closeIndex;
2780
- else if (this.options.unpairedTags.indexOf(s) !== -1) o = a.closeIndex;
2781
- else {
2782
- let n = this.readStopNodeData(e, c, d + 1);
2783
- if (!n) throw Error(`Unexpected end of ${c}`);
2784
- o = n.i, t = n.tagContent;
2753
+ let t = new U("!xml"), n = t, r = "", i = "", a = new yn(this.options.processEntities);
2754
+ for (let o = 0; o < e.length; o++) if (e[o] === "<") {
2755
+ if (e[o + 1] === "/") {
2756
+ let t = K(e, ">", o, "Closing Tag is not closed."), a = e.substring(o + 2, t).trim();
2757
+ if (this.options.removeNSPrefix) {
2758
+ let e = a.indexOf(":");
2759
+ e !== -1 && (a = a.substr(e + 1));
2760
+ }
2761
+ this.options.transformTagName && (a = this.options.transformTagName(a)), n && (r = this.saveTextToParentTag(r, n, i));
2762
+ let s = i.substring(i.lastIndexOf(".") + 1);
2763
+ if (a && this.options.unpairedTags.indexOf(a) !== -1) throw Error(`Unpaired tag can not be used as closing tag: </${a}>`);
2764
+ let c = 0;
2765
+ s && this.options.unpairedTags.indexOf(s) !== -1 ? (c = i.lastIndexOf(".", i.lastIndexOf(".") - 1), this.tagsNodeStack.pop()) : c = i.lastIndexOf("."), i = i.substring(0, c), n = this.tagsNodeStack.pop(), r = "", o = t;
2766
+ } else if (e[o + 1] === "?") {
2767
+ let t = Ln(e, o, !1, "?>");
2768
+ if (!t) throw Error("Pi Tag is not closed.");
2769
+ if (r = this.saveTextToParentTag(r, n, i), !(this.options.ignoreDeclaration && t.tagName === "?xml" || this.options.ignorePiTags)) {
2770
+ let e = new U(t.tagName);
2771
+ e.add(this.options.textNodeName, ""), t.tagName !== t.tagExp && t.attrExpPresent && (e[":@"] = this.buildAttributesMap(t.tagExp, i)), this.addChild(n, e, i, o);
2785
2772
  }
2786
- let r = new H(s);
2787
- s !== l && u && (r[":@"] = this.buildAttributesMap(l, i)), t &&= this.parseTextData(t, s, i, !0, u, !0, !0), i = i.substr(0, i.lastIndexOf(".")), r.add(this.options.textNodeName, t), this.addChild(n, r, i, p);
2773
+ o = t.closeIndex + 1;
2774
+ } else if (e.substr(o + 1, 3) === "!--") {
2775
+ let t = K(e, "-->", o + 4, "Comment is not closed.");
2776
+ if (this.options.commentPropName) {
2777
+ let a = e.substring(o + 4, t - 2);
2778
+ r = this.saveTextToParentTag(r, n, i), n.add(this.options.commentPropName, [{ [this.options.textNodeName]: a }]);
2779
+ }
2780
+ o = t;
2781
+ } else if (e.substr(o + 1, 2) === "!D") {
2782
+ let t = a.readDocType(e, o);
2783
+ this.docTypeEntities = t.entities, o = t.i;
2784
+ } else if (e.substr(o + 1, 2) === "![") {
2785
+ let t = K(e, "]]>", o, "CDATA is not closed.") - 2, a = e.substring(o + 9, t);
2786
+ r = this.saveTextToParentTag(r, n, i);
2787
+ let s = this.parseTextData(a, n.tagname, i, !0, !1, !0, !0);
2788
+ s ??= "", this.options.cdataPropName ? n.add(this.options.cdataPropName, [{ [this.options.textNodeName]: a }]) : n.add(this.options.textNodeName, s), o = t + 2;
2788
2789
  } else {
2789
- if (l.length > 0 && l.lastIndexOf("/") === l.length - 1) {
2790
- if (s[s.length - 1] === "/" ? (s = s.substr(0, s.length - 1), i = i.substr(0, i.length - 1), l = s) : l = l.substr(0, l.length - 1), this.options.transformTagName) {
2791
- let e = this.options.transformTagName(s);
2792
- l === s && (l = e), s = e;
2790
+ let a = Ln(e, o, this.options.removeNSPrefix), s = a.tagName, c = a.rawTagName, l = a.tagExp, u = a.attrExpPresent, d = a.closeIndex;
2791
+ if (this.options.transformTagName) {
2792
+ let e = this.options.transformTagName(s);
2793
+ l === s && (l = e), s = e;
2794
+ }
2795
+ n && r && n.tagname !== "!xml" && (r = this.saveTextToParentTag(r, n, i, !1));
2796
+ let f = n;
2797
+ f && this.options.unpairedTags.indexOf(f.tagname) !== -1 && (n = this.tagsNodeStack.pop(), i = i.substring(0, i.lastIndexOf("."))), s !== t.tagname && (i += i ? "." + s : s);
2798
+ let p = o;
2799
+ if (this.isItStopNode(this.stopNodesExact, this.stopNodesWildcard, i, s)) {
2800
+ let t = "";
2801
+ if (l.length > 0 && l.lastIndexOf("/") === l.length - 1) s[s.length - 1] === "/" ? (s = s.substr(0, s.length - 1), i = i.substr(0, i.length - 1), l = s) : l = l.substr(0, l.length - 1), o = a.closeIndex;
2802
+ else if (this.options.unpairedTags.indexOf(s) !== -1) o = a.closeIndex;
2803
+ else {
2804
+ let n = this.readStopNodeData(e, c, d + 1);
2805
+ if (!n) throw Error(`Unexpected end of ${c}`);
2806
+ o = n.i, t = n.tagContent;
2793
2807
  }
2794
- let e = new H(s);
2795
- s !== l && u && (e[":@"] = this.buildAttributesMap(l, i)), this.addChild(n, e, i, p), i = i.substr(0, i.lastIndexOf("."));
2808
+ let r = new U(s);
2809
+ s !== l && u && (r[":@"] = this.buildAttributesMap(l, i)), t &&= this.parseTextData(t, s, i, !0, u, !0, !0), i = i.substr(0, i.lastIndexOf(".")), r.add(this.options.textNodeName, t), this.addChild(n, r, i, p);
2796
2810
  } else {
2797
- let e = new H(s);
2798
- this.tagsNodeStack.push(n), s !== l && u && (e[":@"] = this.buildAttributesMap(l, i)), this.addChild(n, e, i, p), n = e;
2811
+ if (l.length > 0 && l.lastIndexOf("/") === l.length - 1) {
2812
+ if (s[s.length - 1] === "/" ? (s = s.substr(0, s.length - 1), i = i.substr(0, i.length - 1), l = s) : l = l.substr(0, l.length - 1), this.options.transformTagName) {
2813
+ let e = this.options.transformTagName(s);
2814
+ l === s && (l = e), s = e;
2815
+ }
2816
+ let e = new U(s);
2817
+ s !== l && u && (e[":@"] = this.buildAttributesMap(l, i)), this.addChild(n, e, i, p), i = i.substr(0, i.lastIndexOf("."));
2818
+ } else {
2819
+ let e = new U(s);
2820
+ this.tagsNodeStack.push(n), s !== l && u && (e[":@"] = this.buildAttributesMap(l, i)), this.addChild(n, e, i, p), n = e;
2821
+ }
2822
+ r = "", o = d;
2799
2823
  }
2800
- r = "", o = d;
2801
2824
  }
2802
- }
2803
- else r += e[o];
2825
+ } else r += e[o];
2804
2826
  return t.child;
2805
2827
  };
2806
- function Mn(e, t, n, r) {
2828
+ function Nn(e, t, n, r) {
2807
2829
  this.options.captureMetaData || (r = void 0);
2808
2830
  let i = this.options.updateTag(t.tagname, n, t[":@"]);
2809
2831
  !1 === i || (typeof i == "string" && (t.tagname = i), e.addChild(t, r));
2810
2832
  }
2811
- var Nn = function(e) {
2833
+ var Pn = function(e) {
2812
2834
  if (this.options.processEntities) {
2813
2835
  for (let t in this.docTypeEntities) {
2814
2836
  let n = this.docTypeEntities[t];
@@ -2826,18 +2848,18 @@ var Nn = function(e) {
2826
2848
  }
2827
2849
  return e;
2828
2850
  };
2829
- function Pn(e, t, n, r) {
2851
+ function Fn(e, t, n, r) {
2830
2852
  return e &&= (r === void 0 && (r = t.child.length === 0), (e = this.parseTextData(e, t.tagname, n, !1, !!t[":@"] && Object.keys(t[":@"]).length !== 0, r)) !== void 0 && e !== "" && t.add(this.options.textNodeName, e), ""), e;
2831
2853
  }
2832
- function Fn(e, t, n, r) {
2854
+ function In(e, t, n, r) {
2833
2855
  return !(!t || !t.has(r)) || !(!e || !e.has(n));
2834
2856
  }
2835
- function G(e, t, n, r) {
2857
+ function K(e, t, n, r) {
2836
2858
  let i = e.indexOf(t, n);
2837
2859
  if (i === -1) throw Error(r);
2838
2860
  return i + t.length - 1;
2839
2861
  }
2840
- function In(e, t, n) {
2862
+ function Ln(e, t, n) {
2841
2863
  let r = function(e, t) {
2842
2864
  let n, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ">", i = "";
2843
2865
  for (let a = t; a < e.length; a++) {
@@ -2869,33 +2891,35 @@ function In(e, t, n) {
2869
2891
  rawTagName: l
2870
2892
  };
2871
2893
  }
2872
- function Ln(e, t, n) {
2894
+ function Rn(e, t, n) {
2873
2895
  let r = n, i = 1;
2874
- for (; n < e.length; n++) if (e[n] === "<") if (e[n + 1] === "/") {
2875
- let a = G(e, ">", n, `${t} is not closed`);
2876
- if (e.substring(n + 2, a).trim() === t && (i--, i === 0)) return {
2877
- tagContent: e.substring(r, n),
2878
- i: a
2879
- };
2880
- n = a;
2881
- } else if (e[n + 1] === "?") n = G(e, "?>", n + 1, "StopNode is not closed.");
2882
- else if (e.substr(n + 1, 3) === "!--") n = G(e, "-->", n + 3, "StopNode is not closed.");
2883
- else if (e.substr(n + 1, 2) === "![") n = G(e, "]]>", n, "StopNode is not closed.") - 2;
2884
- else {
2885
- let r = In(e, n, ">");
2886
- r && ((r && r.tagName) === t && r.tagExp[r.tagExp.length - 1] !== "/" && i++, n = r.closeIndex);
2896
+ for (; n < e.length; n++) if (e[n] === "<") {
2897
+ if (e[n + 1] === "/") {
2898
+ let a = K(e, ">", n, `${t} is not closed`);
2899
+ if (e.substring(n + 2, a).trim() === t && (i--, i === 0)) return {
2900
+ tagContent: e.substring(r, n),
2901
+ i: a
2902
+ };
2903
+ n = a;
2904
+ } else if (e[n + 1] === "?") n = K(e, "?>", n + 1, "StopNode is not closed.");
2905
+ else if (e.substr(n + 1, 3) === "!--") n = K(e, "-->", n + 3, "StopNode is not closed.");
2906
+ else if (e.substr(n + 1, 2) === "![") n = K(e, "]]>", n, "StopNode is not closed.") - 2;
2907
+ else {
2908
+ let r = Ln(e, n, ">");
2909
+ r && ((r && r.tagName) === t && r.tagExp[r.tagExp.length - 1] !== "/" && i++, n = r.closeIndex);
2910
+ }
2887
2911
  }
2888
2912
  }
2889
- function Rn(e, t, n) {
2913
+ function zn(e, t, n) {
2890
2914
  if (t && typeof e == "string") {
2891
2915
  let t = e.trim();
2892
2916
  return t === "true" || t !== "false" && function(e) {
2893
2917
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2894
- if (t = Object.assign({}, Sn, t), !e || typeof e != "string") return e;
2918
+ if (t = Object.assign({}, Cn, t), !e || typeof e != "string") return e;
2895
2919
  let n = e.trim();
2896
2920
  if (t.skipLike !== void 0 && t.skipLike.test(n)) return e;
2897
2921
  if (e === "0") return 0;
2898
- if (t.hex && bn.test(n)) return function(e) {
2922
+ if (t.hex && xn.test(n)) return function(e) {
2899
2923
  if (parseInt) return parseInt(e, 16);
2900
2924
  if (Number.parseInt) return Number.parseInt(e, 16);
2901
2925
  if (window && window.parseInt) return window.parseInt(e, 16);
@@ -2903,7 +2927,7 @@ function Rn(e, t, n) {
2903
2927
  }(n);
2904
2928
  if (n.includes("e") || n.includes("E")) return function(e, t, n) {
2905
2929
  if (!n.eNotation) return e;
2906
- let r = t.match(Cn);
2930
+ let r = t.match(wn);
2907
2931
  if (r) {
2908
2932
  let i = r[1] || "", a = r[3].indexOf("e") === -1 ? "E" : "e", o = r[2], s = i ? e[o.length + 1] === a : e[o.length] === a;
2909
2933
  return o.length > 1 && s ? e : o.length !== 1 || !r[3].startsWith(`.${a}`) && r[3][0] !== a ? n.leadingZeros && !s ? (t = (r[1] || "") + r[3], Number(t)) : e : Number(t);
@@ -2911,7 +2935,7 @@ function Rn(e, t, n) {
2911
2935
  return e;
2912
2936
  }(e, n, t);
2913
2937
  {
2914
- let i = xn.exec(n);
2938
+ let i = Sn.exec(n);
2915
2939
  if (i) {
2916
2940
  let a = i[1] || "", o = i[2], s = ((r = i[3]) && r.indexOf(".") !== -1 && ((r = r.replace(/0+$/, "")) === "." ? r = "0" : r[0] === "." ? r = "0" + r : r[r.length - 1] === "." && (r = r.substring(0, r.length - 1))), r), c = a ? e[o.length + 1] === "." : e[o.length] === ".";
2917
2941
  if (!t.leadingZeros && (o.length > 1 || o.length === 1 && !c)) return e;
@@ -2931,61 +2955,61 @@ function Rn(e, t, n) {
2931
2955
  }
2932
2956
  return e === void 0 ? "" : e;
2933
2957
  }
2934
- function zn(e, t, n) {
2958
+ function Bn(e, t, n) {
2935
2959
  let r = Number.parseInt(e, t);
2936
2960
  return r >= 0 && r <= 1114111 ? String.fromCodePoint(r) : n + e + ";";
2937
2961
  }
2938
- var Bn = H.getMetaDataSymbol();
2939
- function Vn(e, t) {
2940
- return Hn(e, t);
2962
+ var Vn = U.getMetaDataSymbol();
2963
+ function Hn(e, t) {
2964
+ return Un(e, t);
2941
2965
  }
2942
- function Hn(e, t, n) {
2966
+ function Un(e, t, n) {
2943
2967
  let r, i = {};
2944
2968
  for (let a = 0; a < e.length; a++) {
2945
- let o = e[a], s = Un(o), c = "";
2969
+ let o = e[a], s = Wn(o), c = "";
2946
2970
  if (c = n === void 0 ? s : n + "." + s, s === t.textNodeName) r === void 0 ? r = o[s] : r += "" + o[s];
2947
2971
  else {
2948
2972
  if (s === void 0) continue;
2949
2973
  if (o[s]) {
2950
- let e = Hn(o[s], t, c), n = Gn(e, t);
2951
- o[Bn] !== void 0 && (e[Bn] = o[Bn]), o[":@"] ? Wn(e, o[":@"], c, t) : Object.keys(e).length !== 1 || e[t.textNodeName] === void 0 || t.alwaysCreateTextNode ? Object.keys(e).length === 0 && (t.alwaysCreateTextNode ? e[t.textNodeName] = "" : e = "") : e = e[t.textNodeName], i[s] !== void 0 && i.hasOwnProperty(s) ? (Array.isArray(i[s]) || (i[s] = [i[s]]), i[s].push(e)) : t.isArray(s, c, n) ? i[s] = [e] : i[s] = e;
2974
+ let e = Un(o[s], t, c), n = Kn(e, t);
2975
+ o[Vn] !== void 0 && (e[Vn] = o[Vn]), o[":@"] ? Gn(e, o[":@"], c, t) : Object.keys(e).length !== 1 || e[t.textNodeName] === void 0 || t.alwaysCreateTextNode ? Object.keys(e).length === 0 && (t.alwaysCreateTextNode ? e[t.textNodeName] = "" : e = "") : e = e[t.textNodeName], i[s] !== void 0 && i.hasOwnProperty(s) ? (Array.isArray(i[s]) || (i[s] = [i[s]]), i[s].push(e)) : i[s] = t.isArray(s, c, n) ? [e] : e;
2952
2976
  }
2953
2977
  }
2954
2978
  }
2955
2979
  return typeof r == "string" ? r.length > 0 && (i[t.textNodeName] = r) : r !== void 0 && (i[t.textNodeName] = r), i;
2956
2980
  }
2957
- function Un(e) {
2981
+ function Wn(e) {
2958
2982
  let t = Object.keys(e);
2959
2983
  for (let e = 0; e < t.length; e++) {
2960
2984
  let n = t[e];
2961
2985
  if (n !== ":@") return n;
2962
2986
  }
2963
2987
  }
2964
- function Wn(e, t, n, r) {
2988
+ function Gn(e, t, n, r) {
2965
2989
  if (t) {
2966
2990
  let i = Object.keys(t), a = i.length;
2967
2991
  for (let o = 0; o < a; o++) {
2968
2992
  let a = i[o];
2969
- r.isArray(a, n + "." + a, !0, !0) ? e[a] = [t[a]] : e[a] = t[a];
2993
+ e[a] = r.isArray(a, n + "." + a, !0, !0) ? [t[a]] : t[a];
2970
2994
  }
2971
2995
  }
2972
2996
  }
2973
- function Gn(e, t) {
2997
+ function Kn(e, t) {
2974
2998
  let { textNodeName: n } = t, r = Object.keys(e).length;
2975
2999
  return r === 0 || !(r !== 1 || !e[n] && typeof e[n] != "boolean" && e[n] !== 0);
2976
3000
  }
2977
- var Kn = {
3001
+ var qn = {
2978
3002
  allowBooleanAttributes: !1,
2979
3003
  unpairedTags: []
2980
3004
  };
2981
- function qn(e) {
3005
+ function Jn(e) {
2982
3006
  return e === " " || e === " " || e === "\n" || e === "\r";
2983
3007
  }
2984
- function Jn(e, t) {
3008
+ function Yn(e, t) {
2985
3009
  let n = t;
2986
- for (; t < e.length; t++) if (!(e[t] != "?" && e[t] != " ")) {
3010
+ for (; t < e.length; t++) if (e[t] == "?" || e[t] == " ") {
2987
3011
  let r = e.substr(n, t - n);
2988
- if (t > 5 && r === "xml") return K("InvalidXml", "XML declaration allowed only at the start of the document.", q(e, t));
3012
+ if (t > 5 && r === "xml") return q("InvalidXml", "XML declaration allowed only at the start of the document.", J(e, t));
2989
3013
  if (e[t] == "?" && e[t + 1] == ">") {
2990
3014
  t++;
2991
3015
  break;
@@ -2993,7 +3017,7 @@ function Jn(e, t) {
2993
3017
  }
2994
3018
  return t;
2995
3019
  }
2996
- function Yn(e, t) {
3020
+ function Xn(e, t) {
2997
3021
  if (e.length > t + 5 && e[t + 1] === "-" && e[t + 2] === "-") {
2998
3022
  for (t += 3; t < e.length; t++) if (e[t] === "-" && e[t + 1] === "-" && e[t + 2] === ">") {
2999
3023
  t += 2;
@@ -3011,7 +3035,7 @@ function Yn(e, t) {
3011
3035
  }
3012
3036
  return t;
3013
3037
  }
3014
- function Xn(e, t) {
3038
+ function Zn(e, t) {
3015
3039
  let n = "", r = "", i = !1;
3016
3040
  for (; t < e.length; t++) {
3017
3041
  if (e[t] === "\"" || e[t] === "'") r === "" ? r = e[t] : r !== e[t] || (r = "");
@@ -3027,21 +3051,21 @@ function Xn(e, t) {
3027
3051
  tagClosed: i
3028
3052
  };
3029
3053
  }
3030
- var Zn = /* @__PURE__ */ RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?", "g");
3031
- function Qn(e, t) {
3032
- let n = hn(e, Zn), r = {};
3054
+ var Qn = /* @__PURE__ */ RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?", "g");
3055
+ function $n(e, t) {
3056
+ let n = gn(e, Qn), r = {};
3033
3057
  for (let e = 0; e < n.length; e++) {
3034
- if (n[e][1].length === 0) return K("InvalidAttr", "Attribute '" + n[e][2] + "' has no space in starting.", tr(n[e]));
3035
- if (n[e][3] !== void 0 && n[e][4] === void 0) return K("InvalidAttr", "Attribute '" + n[e][2] + "' is without value.", tr(n[e]));
3036
- if (n[e][3] === void 0 && !t.allowBooleanAttributes) return K("InvalidAttr", "boolean attribute '" + n[e][2] + "' is not allowed.", tr(n[e]));
3058
+ if (n[e][1].length === 0) return q("InvalidAttr", "Attribute '" + n[e][2] + "' has no space in starting.", nr(n[e]));
3059
+ if (n[e][3] !== void 0 && n[e][4] === void 0) return q("InvalidAttr", "Attribute '" + n[e][2] + "' is without value.", nr(n[e]));
3060
+ if (n[e][3] === void 0 && !t.allowBooleanAttributes) return q("InvalidAttr", "boolean attribute '" + n[e][2] + "' is not allowed.", nr(n[e]));
3037
3061
  let i = n[e][2];
3038
- if (!er(i)) return K("InvalidAttr", "Attribute '" + i + "' is an invalid name.", tr(n[e]));
3039
- if (r.hasOwnProperty(i)) return K("InvalidAttr", "Attribute '" + i + "' is repeated.", tr(n[e]));
3062
+ if (!tr(i)) return q("InvalidAttr", "Attribute '" + i + "' is an invalid name.", nr(n[e]));
3063
+ if (r.hasOwnProperty(i)) return q("InvalidAttr", "Attribute '" + i + "' is repeated.", nr(n[e]));
3040
3064
  r[i] = 1;
3041
3065
  }
3042
3066
  return !0;
3043
3067
  }
3044
- function $n(e, t) {
3068
+ function er(e, t) {
3045
3069
  if (e[++t] === ";") return -1;
3046
3070
  if (e[t] === "#") return function(e, t) {
3047
3071
  let n = /\d/;
@@ -3058,7 +3082,7 @@ function $n(e, t) {
3058
3082
  }
3059
3083
  return t;
3060
3084
  }
3061
- function K(e, t, n) {
3085
+ function q(e, t, n) {
3062
3086
  return { err: {
3063
3087
  code: e,
3064
3088
  msg: t,
@@ -3066,23 +3090,23 @@ function K(e, t, n) {
3066
3090
  col: n.col
3067
3091
  } };
3068
3092
  }
3069
- function er(e) {
3070
- return gn(e);
3093
+ function tr(e) {
3094
+ return _n(e);
3071
3095
  }
3072
- function q(e, t) {
3096
+ function J(e, t) {
3073
3097
  let n = e.substring(0, t).split(/\r?\n/);
3074
3098
  return {
3075
3099
  line: n.length,
3076
3100
  col: n[n.length - 1].length + 1
3077
3101
  };
3078
3102
  }
3079
- function tr(e) {
3103
+ function nr(e) {
3080
3104
  return e.startIndex + e[1].length;
3081
3105
  }
3082
- var nr = class {
3106
+ var rr = class {
3083
3107
  constructor(e) {
3084
3108
  this.externalEntities = {}, this.options = function(e) {
3085
- return Object.assign({}, pn, e);
3109
+ return Object.assign({}, mn, e);
3086
3110
  }(e);
3087
3111
  }
3088
3112
  parse(e, t) {
@@ -3091,20 +3115,20 @@ var nr = class {
3091
3115
  if (t) {
3092
3116
  !0 === t && (t = {});
3093
3117
  let n = function(e, t) {
3094
- t = Object.assign({}, Kn, t);
3118
+ t = Object.assign({}, qn, t);
3095
3119
  let n = [], r = !1, i = !1;
3096
3120
  e[0] === "" && (e = e.substr(1));
3097
3121
  for (let a = 0; a < e.length; a++) if (e[a] === "<" && e[a + 1] === "?") {
3098
- if (a += 2, a = Jn(e, a), a.err) return a;
3122
+ if (a += 2, a = Yn(e, a), a.err) return a;
3099
3123
  } else {
3100
3124
  if (e[a] !== "<") {
3101
- if (qn(e[a])) continue;
3102
- return K("InvalidChar", "char '" + e[a] + "' is not expected.", q(e, a));
3125
+ if (Jn(e[a])) continue;
3126
+ return q("InvalidChar", "char '" + e[a] + "' is not expected.", J(e, a));
3103
3127
  }
3104
3128
  {
3105
3129
  let o = a;
3106
3130
  if (a++, e[a] === "!") {
3107
- a = Yn(e, a);
3131
+ a = Xn(e, a);
3108
3132
  continue;
3109
3133
  }
3110
3134
  {
@@ -3112,35 +3136,35 @@ var nr = class {
3112
3136
  e[a] === "/" && (s = !0, a++);
3113
3137
  let c = "";
3114
3138
  for (; a < e.length && e[a] !== ">" && e[a] !== " " && e[a] !== " " && e[a] !== "\n" && e[a] !== "\r"; a++) c += e[a];
3115
- if (c = c.trim(), c[c.length - 1] === "/" && (c = c.substring(0, c.length - 1), a--), !gn(c)) {
3139
+ if (c = c.trim(), c[c.length - 1] === "/" && (c = c.substring(0, c.length - 1), a--), !_n(c)) {
3116
3140
  let t;
3117
- return t = c.trim().length === 0 ? "Invalid space after '<'." : "Tag '" + c + "' is an invalid name.", K("InvalidTag", t, q(e, a));
3141
+ return t = c.trim().length === 0 ? "Invalid space after '<'." : "Tag '" + c + "' is an invalid name.", q("InvalidTag", t, J(e, a));
3118
3142
  }
3119
- let l = Xn(e, a);
3120
- if (!1 === l) return K("InvalidAttr", "Attributes for '" + c + "' have open quote.", q(e, a));
3143
+ let l = Zn(e, a);
3144
+ if (!1 === l) return q("InvalidAttr", "Attributes for '" + c + "' have open quote.", J(e, a));
3121
3145
  let u = l.value;
3122
3146
  if (a = l.index, u[u.length - 1] === "/") {
3123
3147
  let n = a - u.length;
3124
3148
  u = u.substring(0, u.length - 1);
3125
- let i = Qn(u, t);
3126
- if (!0 !== i) return K(i.err.code, i.err.msg, q(e, n + i.err.line));
3149
+ let i = $n(u, t);
3150
+ if (!0 !== i) return q(i.err.code, i.err.msg, J(e, n + i.err.line));
3127
3151
  r = !0;
3128
3152
  } else if (s) {
3129
- if (!l.tagClosed) return K("InvalidTag", "Closing tag '" + c + "' doesn't have proper closing.", q(e, a));
3130
- if (u.trim().length > 0) return K("InvalidTag", "Closing tag '" + c + "' can't have attributes or invalid starting.", q(e, o));
3131
- if (n.length === 0) return K("InvalidTag", "Closing tag '" + c + "' has not been opened.", q(e, o));
3153
+ if (!l.tagClosed) return q("InvalidTag", "Closing tag '" + c + "' doesn't have proper closing.", J(e, a));
3154
+ if (u.trim().length > 0) return q("InvalidTag", "Closing tag '" + c + "' can't have attributes or invalid starting.", J(e, o));
3155
+ if (n.length === 0) return q("InvalidTag", "Closing tag '" + c + "' has not been opened.", J(e, o));
3132
3156
  {
3133
3157
  let t = n.pop();
3134
3158
  if (c !== t.tagName) {
3135
- let n = q(e, t.tagStartPos);
3136
- return K("InvalidTag", "Expected closing tag '" + t.tagName + "' (opened in line " + n.line + ", col " + n.col + ") instead of closing tag '" + c + "'.", q(e, o));
3159
+ let n = J(e, t.tagStartPos);
3160
+ return q("InvalidTag", "Expected closing tag '" + t.tagName + "' (opened in line " + n.line + ", col " + n.col + ") instead of closing tag '" + c + "'.", J(e, o));
3137
3161
  }
3138
3162
  n.length == 0 && (i = !0);
3139
3163
  }
3140
3164
  } else {
3141
- let s = Qn(u, t);
3142
- if (!0 !== s) return K(s.err.code, s.err.msg, q(e, a - u.length + s.err.line));
3143
- if (!0 === i) return K("InvalidXml", "Multiple possible root nodes found.", q(e, a));
3165
+ let s = $n(u, t);
3166
+ if (!0 !== s) return q(s.err.code, s.err.msg, J(e, a - u.length + s.err.line));
3167
+ if (!0 === i) return q("InvalidXml", "Multiple possible root nodes found.", J(e, a));
3144
3168
  t.unpairedTags.indexOf(c) !== -1 || n.push({
3145
3169
  tagName: c,
3146
3170
  tagStartPos: o
@@ -3148,31 +3172,31 @@ var nr = class {
3148
3172
  }
3149
3173
  for (a++; a < e.length; a++) if (e[a] === "<") {
3150
3174
  if (e[a + 1] === "!") {
3151
- a++, a = Yn(e, a);
3175
+ a++, a = Xn(e, a);
3152
3176
  continue;
3153
3177
  }
3154
3178
  if (e[a + 1] !== "?") break;
3155
- if (a = Jn(e, ++a), a.err) return a;
3179
+ if (a = Yn(e, ++a), a.err) return a;
3156
3180
  } else if (e[a] === "&") {
3157
- let t = $n(e, a);
3158
- if (t == -1) return K("InvalidChar", "char '&' is not expected.", q(e, a));
3181
+ let t = er(e, a);
3182
+ if (t == -1) return q("InvalidChar", "char '&' is not expected.", J(e, a));
3159
3183
  a = t;
3160
- } else if (!0 === i && !qn(e[a])) return K("InvalidXml", "Extra text at the end", q(e, a));
3184
+ } else if (!0 === i && !Jn(e[a])) return q("InvalidXml", "Extra text at the end", J(e, a));
3161
3185
  e[a] === "<" && a--;
3162
3186
  }
3163
3187
  }
3164
3188
  }
3165
- return r ? n.length == 1 ? K("InvalidTag", "Unclosed tag '" + n[0].tagName + "'.", q(e, n[0].tagStartPos)) : !(n.length > 0) || K("InvalidXml", "Invalid '" + JSON.stringify(n.map(((e) => e.tagName)), null, 4).replace(/\r?\n/g, "") + "' found.", {
3189
+ return r ? n.length == 1 ? q("InvalidTag", "Unclosed tag '" + n[0].tagName + "'.", J(e, n[0].tagStartPos)) : !(n.length > 0) || q("InvalidXml", "Invalid '" + JSON.stringify(n.map(((e) => e.tagName)), null, 4).replace(/\r?\n/g, "") + "' found.", {
3166
3190
  line: 1,
3167
3191
  col: 1
3168
- }) : K("InvalidXml", "Start tag expected.", 1);
3192
+ }) : q("InvalidXml", "Start tag expected.", 1);
3169
3193
  }(e, t);
3170
3194
  if (!0 !== n) throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`);
3171
3195
  }
3172
- let n = new Tn(this.options);
3196
+ let n = new En(this.options);
3173
3197
  n.addExternalEntities(this.externalEntities);
3174
3198
  let r = n.parseXml(e);
3175
- return this.options.preserveOrder || r === void 0 ? r : Vn(r, this.options);
3199
+ return this.options.preserveOrder || r === void 0 ? r : Hn(r, this.options);
3176
3200
  }
3177
3201
  addEntity(e, t) {
3178
3202
  if (t.indexOf("&") !== -1) throw Error("Entity value can't have '&'");
@@ -3181,36 +3205,36 @@ var nr = class {
3181
3205
  this.externalEntities[e] = t;
3182
3206
  }
3183
3207
  static getMetaDataSymbol() {
3184
- return H.getMetaDataSymbol();
3208
+ return U.getMetaDataSymbol();
3185
3209
  }
3186
- }, rr = k(829), J = k.n(rr), Y = function(e) {
3210
+ }, ir = A(829), Y = A.n(ir), X = function(e) {
3187
3211
  return e.Array = "array", e.Object = "object", e.Original = "original", e;
3188
- }(Y || {});
3189
- function ir(e, t) {
3212
+ }(X || {});
3213
+ function ar(e, t) {
3190
3214
  if (!e.endsWith("propstat.prop.displayname")) return t;
3191
3215
  }
3192
- function ar(e, t) {
3193
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Y.Original, r = J().get(e, t);
3216
+ function or(e, t) {
3217
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : X.Original, r = Y().get(e, t);
3194
3218
  return n === "array" && !1 === Array.isArray(r) ? [r] : n === "object" && Array.isArray(r) ? r[0] : r;
3195
3219
  }
3196
- function or(e, t) {
3220
+ function sr(e, t) {
3197
3221
  return t ??= {
3198
3222
  attributeNamePrefix: "@",
3199
3223
  attributeParsers: [],
3200
- tagParsers: [ir]
3224
+ tagParsers: [ar]
3201
3225
  }, new Promise(((n) => {
3202
3226
  n(function(e) {
3203
3227
  let { multistatus: t } = e;
3204
3228
  if (t === "") return { multistatus: { response: [] } };
3205
3229
  if (!t) throw Error("Invalid response: No root multistatus found");
3206
3230
  let n = { multistatus: Array.isArray(t) ? t[0] : t };
3207
- return J().set(n, "multistatus.response", ar(n, "multistatus.response", Y.Array)), J().set(n, "multistatus.response", J().get(n, "multistatus.response").map(((e) => function(e) {
3231
+ return Y().set(n, "multistatus.response", or(n, "multistatus.response", X.Array)), Y().set(n, "multistatus.response", Y().get(n, "multistatus.response").map(((e) => function(e) {
3208
3232
  let t = Object.assign({}, e);
3209
- return t.status ? J().set(t, "status", ar(t, "status", Y.Object)) : (J().set(t, "propstat", ar(t, "propstat", Y.Object)), J().set(t, "propstat.prop", ar(t, "propstat.prop", Y.Object))), t;
3233
+ return t.status ? Y().set(t, "status", or(t, "status", X.Object)) : (Y().set(t, "propstat", or(t, "propstat", X.Object)), Y().set(t, "propstat.prop", or(t, "propstat.prop", X.Object))), t;
3210
3234
  }(e)))), n;
3211
3235
  }(function(e) {
3212
3236
  let { attributeNamePrefix: t, attributeParsers: n, tagParsers: r } = e;
3213
- return new nr({
3237
+ return new rr({
3214
3238
  allowBooleanAttributes: !0,
3215
3239
  attributeNamePrefix: t,
3216
3240
  textNodeName: "text",
@@ -3238,10 +3262,10 @@ function or(e, t) {
3238
3262
  }(t).parse(e)));
3239
3263
  }));
3240
3264
  }
3241
- function sr(e, t) {
3265
+ function cr(e, t) {
3242
3266
  let n = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], { getlastmodified: r = null, getcontentlength: i = "0", resourcetype: a = null, getcontenttype: o = null, getetag: s = null } = e, c = a && typeof a == "object" && a.collection !== void 0 ? "directory" : "file", l = {
3243
3267
  filename: t,
3244
- basename: ze().basename(t),
3268
+ basename: Be().basename(t),
3245
3269
  lastmod: r,
3246
3270
  size: parseInt(i, 10),
3247
3271
  type: c,
@@ -3249,7 +3273,7 @@ function sr(e, t) {
3249
3273
  };
3250
3274
  return c === "file" && (l.mime = o && typeof o == "string" ? o.split(";")[0] : ""), n && (e.displayname !== void 0 && (e.displayname = String(e.displayname)), l.props = e), l;
3251
3275
  }
3252
- function cr(e, t) {
3276
+ function lr(e, t) {
3253
3277
  let n = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r = null;
3254
3278
  try {
3255
3279
  e.multistatus.response[0].propstat && (r = e.multistatus.response[0]);
@@ -3260,9 +3284,9 @@ function cr(e, t) {
3260
3284
  let e = /* @__PURE__ */ Error(`Invalid response: ${l} ${c}`);
3261
3285
  throw e.status = l, e;
3262
3286
  }
3263
- return sr(i, Ue(t), n);
3287
+ return cr(i, We(t), n);
3264
3288
  }
3265
- function lr(e) {
3289
+ function ur(e) {
3266
3290
  switch (String(e)) {
3267
3291
  case "-3": return "unlimited";
3268
3292
  case "-2":
@@ -3270,10 +3294,10 @@ function lr(e) {
3270
3294
  default: return parseInt(String(e), 10);
3271
3295
  }
3272
3296
  }
3273
- function ur(e, t, n) {
3297
+ function dr(e, t, n) {
3274
3298
  return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3275
3299
  }
3276
- var dr = function(e) {
3300
+ var fr = function(e) {
3277
3301
  return function() {
3278
3302
  var t = [...arguments];
3279
3303
  try {
@@ -3284,47 +3308,47 @@ var dr = function(e) {
3284
3308
  };
3285
3309
  }((function(e, t) {
3286
3310
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, { details: r = !1 } = n;
3287
- return ur(F(I({
3288
- url: M(e.remoteURL, j(t)),
3311
+ return dr(I(L({
3312
+ url: N(e.remoteURL, M(t)),
3289
3313
  method: "PROPFIND",
3290
3314
  headers: {
3291
3315
  Accept: "text/plain,application/xml",
3292
3316
  Depth: "0"
3293
3317
  }
3294
3318
  }, e, n), e), (function(n) {
3295
- return B(e, n), ur(n.text(), (function(i) {
3296
- return ur(or(i, e.parsing), (function(e) {
3297
- return V(n, cr(e, t, r), r);
3319
+ return V(e, n), dr(n.text(), (function(i) {
3320
+ return dr(sr(i, e.parsing), (function(e) {
3321
+ return H(n, lr(e, t, r), r);
3298
3322
  }));
3299
3323
  }));
3300
3324
  }));
3301
3325
  }));
3302
- function fr(e, t, n) {
3326
+ function pr(e, t, n) {
3303
3327
  return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3304
3328
  }
3305
- var pr = mr((function(e, t) {
3329
+ var mr = hr((function(e, t) {
3306
3330
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = function(e) {
3307
3331
  if (!e || e === "/") return [];
3308
3332
  let t = e, n = [];
3309
3333
  do
3310
- n.push(t), t = ze().dirname(t);
3334
+ n.push(t), t = Be().dirname(t);
3311
3335
  while (t && t !== "/");
3312
3336
  return n;
3313
- }(Ue(t));
3337
+ }(We(t));
3314
3338
  r.sort(((e, t) => e.length > t.length ? 1 : t.length > e.length ? -1 : 0));
3315
3339
  let i = !1;
3316
3340
  return function(e, t, n) {
3317
- if (typeof e[_r] == "function") {
3318
- var r, i, a, o = e[_r]();
3341
+ if (typeof e[vr] == "function") {
3342
+ var r, i, a, o = e[vr]();
3319
3343
  function n(e) {
3320
3344
  try {
3321
3345
  for (; !(r = o.next()).done;) if ((e = t(r.value)) && e.then) {
3322
- if (!vr(e)) return void e.then(n, a ||= X.bind(null, i = new Z(), 2));
3346
+ if (!br(e)) return void e.then(n, a ||= Z.bind(null, i = new yr(), 2));
3323
3347
  e = e.v;
3324
3348
  }
3325
- i ? X(i, 1, e) : i = e;
3349
+ i ? Z(i, 1, e) : i = e;
3326
3350
  } catch (e) {
3327
- X(i ||= new Z(), 2, e);
3351
+ Z(i ||= new yr(), 2, e);
3328
3352
  }
3329
3353
  }
3330
3354
  if (n(), o.return) {
@@ -3348,12 +3372,12 @@ var pr = mr((function(e, t) {
3348
3372
  return function o(s) {
3349
3373
  try {
3350
3374
  for (; ++a < e.length && (!n || !n());) if ((s = t(a)) && s.then) {
3351
- if (!vr(s)) return void s.then(o, i ||= X.bind(null, r = new Z(), 2));
3375
+ if (!br(s)) return void s.then(o, i ||= Z.bind(null, r = new yr(), 2));
3352
3376
  s = s.v;
3353
3377
  }
3354
- r ? X(r, 1, s) : r = s;
3378
+ r ? Z(r, 1, s) : r = s;
3355
3379
  } catch (e) {
3356
- X(r ||= new Z(), 2, e);
3380
+ Z(r ||= new yr(), 2, e);
3357
3381
  }
3358
3382
  }(), r;
3359
3383
  }(c, (function(e) {
@@ -3363,7 +3387,7 @@ var pr = mr((function(e, t) {
3363
3387
  return a = function() {
3364
3388
  return function(n, i) {
3365
3389
  try {
3366
- var a = fr(dr(e, r), (function(e) {
3390
+ var a = pr(fr(e, r), (function(e) {
3367
3391
  if (e.type !== "directory") throw Error(`Path includes a file: ${t}`);
3368
3392
  }));
3369
3393
  } catch (e) {
@@ -3373,7 +3397,7 @@ var pr = mr((function(e, t) {
3373
3397
  }(0, (function(t) {
3374
3398
  let a = t;
3375
3399
  return function() {
3376
- if (a.status === 404) return i = !0, gr(yr(e, r, {
3400
+ if (a.status === 404) return i = !0, _r(xr(e, r, {
3377
3401
  ...n,
3378
3402
  recursive: !1
3379
3403
  }));
@@ -3381,7 +3405,7 @@ var pr = mr((function(e, t) {
3381
3405
  }();
3382
3406
  }));
3383
3407
  }, (o = function() {
3384
- if (i) return gr(yr(e, r, {
3408
+ if (i) return _r(xr(e, r, {
3385
3409
  ...n,
3386
3410
  recursive: !1
3387
3411
  }));
@@ -3391,7 +3415,7 @@ var pr = mr((function(e, t) {
3391
3415
  return !1;
3392
3416
  }));
3393
3417
  }));
3394
- function mr(e) {
3418
+ function hr(e) {
3395
3419
  return function() {
3396
3420
  var t = [...arguments];
3397
3421
  try {
@@ -3401,24 +3425,24 @@ function mr(e) {
3401
3425
  }
3402
3426
  };
3403
3427
  }
3404
- function hr() {}
3405
- function gr(e, t) {
3406
- if (!t) return e && e.then ? e.then(hr) : Promise.resolve();
3428
+ function gr() {}
3429
+ function _r(e, t) {
3430
+ if (!t) return e && e.then ? e.then(gr) : Promise.resolve();
3407
3431
  }
3408
- var _r = typeof Symbol < "u" ? Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator")) : "@@iterator";
3409
- function X(e, t, n) {
3432
+ var vr = typeof Symbol < "u" ? Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator")) : "@@iterator";
3433
+ function Z(e, t, n) {
3410
3434
  if (!e.s) {
3411
- if (n instanceof Z) {
3412
- if (!n.s) return void (n.o = X.bind(null, e, t));
3435
+ if (n instanceof yr) {
3436
+ if (!n.s) return void (n.o = Z.bind(null, e, t));
3413
3437
  1 & t && (t = n.s), n = n.v;
3414
3438
  }
3415
- if (n && n.then) return void n.then(X.bind(null, e, t), X.bind(null, e, 2));
3439
+ if (n && n.then) return void n.then(Z.bind(null, e, t), Z.bind(null, e, 2));
3416
3440
  e.s = t, e.v = n;
3417
3441
  let r = e.o;
3418
3442
  r && r(e);
3419
3443
  }
3420
3444
  }
3421
- var Z = function() {
3445
+ var yr = function() {
3422
3446
  function e() {}
3423
3447
  return e.prototype.then = function(t, n) {
3424
3448
  let r = new e(), i = this.s;
@@ -3426,9 +3450,9 @@ var Z = function() {
3426
3450
  let e = 1 & i ? t : n;
3427
3451
  if (e) {
3428
3452
  try {
3429
- X(r, 1, e(this.v));
3453
+ Z(r, 1, e(this.v));
3430
3454
  } catch (e) {
3431
- X(r, 2, e);
3455
+ Z(r, 2, e);
3432
3456
  }
3433
3457
  return r;
3434
3458
  }
@@ -3437,28 +3461,28 @@ var Z = function() {
3437
3461
  return this.o = function(e) {
3438
3462
  try {
3439
3463
  let i = e.v;
3440
- 1 & e.s ? X(r, 1, t ? t(i) : i) : n ? X(r, 1, n(i)) : X(r, 2, i);
3464
+ 1 & e.s ? Z(r, 1, t ? t(i) : i) : n ? Z(r, 1, n(i)) : Z(r, 2, i);
3441
3465
  } catch (e) {
3442
- X(r, 2, e);
3466
+ Z(r, 2, e);
3443
3467
  }
3444
3468
  }, r;
3445
3469
  }, e;
3446
3470
  }();
3447
- function vr(e) {
3448
- return e instanceof Z && 1 & e.s;
3471
+ function br(e) {
3472
+ return e instanceof yr && 1 & e.s;
3449
3473
  }
3450
- var yr = mr((function(e, t) {
3474
+ var xr = hr((function(e, t) {
3451
3475
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3452
- if (!0 === n.recursive) return pr(e, t, n);
3453
- let r = I({
3454
- url: M(e.remoteURL, (i = j(t), i.endsWith("/") ? i : i + "/")),
3476
+ if (!0 === n.recursive) return mr(e, t, n);
3477
+ let r = L({
3478
+ url: N(e.remoteURL, (i = M(t), i.endsWith("/") ? i : i + "/")),
3455
3479
  method: "MKCOL"
3456
3480
  }, e, n);
3457
3481
  var i;
3458
- return fr(F(r, e), (function(t) {
3459
- B(e, t);
3482
+ return pr(I(r, e), (function(t) {
3483
+ V(e, t);
3460
3484
  }));
3461
- })), br = k(388), xr = k.n(br), Sr = function(e) {
3485
+ })), Sr = A(388), Cr = A.n(Sr), wr = function(e) {
3462
3486
  return function() {
3463
3487
  var t = [...arguments];
3464
3488
  try {
@@ -3473,22 +3497,22 @@ var yr = mr((function(e, t) {
3473
3497
  let e = `bytes=${n.range.start}-`;
3474
3498
  typeof n.range.end == "number" && (e = `${e}${n.range.end}`), r.Range = e;
3475
3499
  }
3476
- let i = I({
3477
- url: M(e.remoteURL, j(t)),
3500
+ let i = L({
3501
+ url: N(e.remoteURL, M(t)),
3478
3502
  method: "GET",
3479
3503
  headers: r
3480
3504
  }, e, n);
3481
3505
  return o = function(t) {
3482
- if (B(e, t), r.Range && t.status !== 206) {
3506
+ if (V(e, t), r.Range && t.status !== 206) {
3483
3507
  let e = /* @__PURE__ */ Error(`Invalid response code for partial request: ${t.status}`);
3484
3508
  throw e.status = t.status, e;
3485
3509
  }
3486
3510
  return n.callback && setTimeout((() => {
3487
3511
  n.callback(t);
3488
3512
  }), 0), t.body;
3489
- }, (a = F(i, e)) && a.then || (a = Promise.resolve(a)), o ? a.then(o) : a;
3513
+ }, (a = I(i, e)) && a.then || (a = Promise.resolve(a)), o ? a.then(o) : a;
3490
3514
  var a, o;
3491
- })), Cr = () => {}, wr = function(e) {
3515
+ })), Tr = () => {}, Er = function(e) {
3492
3516
  return function() {
3493
3517
  var t = [...arguments];
3494
3518
  try {
@@ -3498,13 +3522,13 @@ var yr = mr((function(e, t) {
3498
3522
  }
3499
3523
  };
3500
3524
  }((function(e, t, n) {
3501
- n.url ||= M(e.remoteURL, j(t));
3502
- let r = I(n, e, {});
3525
+ n.url ||= N(e.remoteURL, M(t));
3526
+ let r = L(n, e, {});
3503
3527
  return a = function(t) {
3504
- return B(e, t), t;
3505
- }, (i = F(r, e)) && i.then || (i = Promise.resolve(i)), a ? i.then(a) : i;
3528
+ return V(e, t), t;
3529
+ }, (i = I(r, e)) && i.then || (i = Promise.resolve(i)), a ? i.then(a) : i;
3506
3530
  var i, a;
3507
- })), Tr = function(e) {
3531
+ })), Dr = function(e) {
3508
3532
  return function() {
3509
3533
  var t = [...arguments];
3510
3534
  try {
@@ -3514,15 +3538,15 @@ var yr = mr((function(e, t) {
3514
3538
  }
3515
3539
  };
3516
3540
  }((function(e, t) {
3517
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = I({
3518
- url: M(e.remoteURL, j(t)),
3541
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = L({
3542
+ url: N(e.remoteURL, M(t)),
3519
3543
  method: "DELETE"
3520
3544
  }, e, n);
3521
3545
  return a = function(t) {
3522
- B(e, t);
3523
- }, (i = F(r, e)) && i.then || (i = Promise.resolve(i)), a ? i.then(a) : i;
3546
+ V(e, t);
3547
+ }, (i = I(r, e)) && i.then || (i = Promise.resolve(i)), a ? i.then(a) : i;
3524
3548
  var i, a;
3525
- })), Er = function(e) {
3549
+ })), Or = function(e) {
3526
3550
  return function() {
3527
3551
  var t = [...arguments];
3528
3552
  try {
@@ -3535,7 +3559,7 @@ var yr = mr((function(e, t) {
3535
3559
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3536
3560
  return function(r, i) {
3537
3561
  try {
3538
- var a = (o = dr(e, t, n), s = function() {
3562
+ var a = (o = fr(e, t, n), s = function() {
3539
3563
  return !0;
3540
3564
  }, c ? s ? s(o) : o : (o && o.then || (o = Promise.resolve(o)), s ? o.then(s) : o));
3541
3565
  } catch (e) {
@@ -3548,10 +3572,10 @@ var yr = mr((function(e, t) {
3548
3572
  throw e;
3549
3573
  }));
3550
3574
  }));
3551
- function Dr(e, t, n) {
3575
+ function kr(e, t, n) {
3552
3576
  return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3553
3577
  }
3554
- var Or = function(e) {
3578
+ var Ar = function(e) {
3555
3579
  return function() {
3556
3580
  var t = [...arguments];
3557
3581
  try {
@@ -3562,38 +3586,38 @@ var Or = function(e) {
3562
3586
  };
3563
3587
  }((function(e, t) {
3564
3588
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3565
- return Dr(F(I({
3566
- url: M(e.remoteURL, j(t), "/"),
3589
+ return kr(I(L({
3590
+ url: N(e.remoteURL, M(t), "/"),
3567
3591
  method: "PROPFIND",
3568
3592
  headers: {
3569
3593
  Accept: "text/plain,application/xml",
3570
3594
  Depth: n.deep ? "infinity" : "1"
3571
3595
  }
3572
3596
  }, e, n), e), (function(r) {
3573
- return B(e, r), Dr(r.text(), (function(i) {
3597
+ return V(e, r), kr(r.text(), (function(i) {
3574
3598
  if (!i) throw Error("Failed parsing directory contents: Empty response");
3575
- return Dr(or(i, e.parsing), (function(i) {
3576
- let a = He(t), o = function(e, t, n) {
3577
- let r = arguments.length > 3 && arguments[3] !== void 0 && arguments[3], i = arguments.length > 4 && arguments[4] !== void 0 && arguments[4], a = ze().join(t, "/"), { multistatus: { response: o } } = e, s = o.map(((e) => {
3599
+ return kr(sr(i, e.parsing), (function(i) {
3600
+ let a = Ue(t), o = function(e, t, n) {
3601
+ let r = arguments.length > 3 && arguments[3] !== void 0 && arguments[3], i = arguments.length > 4 && arguments[4] !== void 0 && arguments[4], a = Be().join(t, "/"), { multistatus: { response: o } } = e, s = o.map(((e) => {
3578
3602
  let t = function(e) {
3579
3603
  try {
3580
3604
  return e.replace(/^https?:\/\/[^\/]+/, "");
3581
3605
  } catch (e) {
3582
- throw new A(e, "Failed normalising HREF");
3606
+ throw new j(e, "Failed normalising HREF");
3583
3607
  }
3584
3608
  }(e.href), { propstat: { prop: n } } = e;
3585
- return sr(n, a === "/" ? decodeURIComponent(Ue(t)) : Ue(ze().relative(decodeURIComponent(a), decodeURIComponent(t))), r);
3609
+ return cr(n, a === "/" ? decodeURIComponent(We(t)) : We(Be().relative(decodeURIComponent(a), decodeURIComponent(t))), r);
3586
3610
  }));
3587
3611
  return i ? s : s.filter(((e) => e.basename && (e.type === "file" || e.filename !== n.replace(/\/$/, ""))));
3588
- }(i, He(e.remoteBasePath || e.remotePath), a, n.details, n.includeSelf);
3612
+ }(i, Ue(e.remoteBasePath || e.remotePath), a, n.details, n.includeSelf);
3589
3613
  return n.glob && (o = function(e, t) {
3590
- return e.filter(((e) => L(e.filename, t, { matchBase: !0 })));
3591
- }(o, n.glob)), V(r, o, n.details);
3614
+ return e.filter(((e) => R(e.filename, t, { matchBase: !0 })));
3615
+ }(o, n.glob)), H(r, o, n.details);
3592
3616
  }));
3593
3617
  }));
3594
3618
  }));
3595
3619
  }));
3596
- function kr(e) {
3620
+ function jr(e) {
3597
3621
  return function() {
3598
3622
  var t = [...arguments];
3599
3623
  try {
@@ -3603,58 +3627,58 @@ function kr(e) {
3603
3627
  }
3604
3628
  };
3605
3629
  }
3606
- var Ar = kr((function(e, t) {
3630
+ var Mr = jr((function(e, t) {
3607
3631
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3608
- return jr(F(I({
3609
- url: M(e.remoteURL, j(t)),
3632
+ return Nr(I(L({
3633
+ url: N(e.remoteURL, M(t)),
3610
3634
  method: "GET",
3611
3635
  headers: { Accept: "text/plain" },
3612
- transformResponse: [Pr]
3636
+ transformResponse: [Ir]
3613
3637
  }, e, n), e), (function(t) {
3614
- return B(e, t), jr(t.text(), (function(e) {
3615
- return V(t, e, n.details);
3638
+ return V(e, t), Nr(t.text(), (function(e) {
3639
+ return H(t, e, n.details);
3616
3640
  }));
3617
3641
  }));
3618
3642
  }));
3619
- function jr(e, t, n) {
3643
+ function Nr(e, t, n) {
3620
3644
  return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3621
3645
  }
3622
- var Mr = kr((function(e, t) {
3646
+ var Pr = jr((function(e, t) {
3623
3647
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3624
- return jr(F(I({
3625
- url: M(e.remoteURL, j(t)),
3648
+ return Nr(I(L({
3649
+ url: N(e.remoteURL, M(t)),
3626
3650
  method: "GET"
3627
3651
  }, e, n), e), (function(t) {
3628
3652
  let r;
3629
- return B(e, t), function(e, t) {
3653
+ return V(e, t), function(e, t) {
3630
3654
  var n = e();
3631
3655
  return n && n.then ? n.then(t) : t();
3632
3656
  }((function() {
3633
- return jr(t.arrayBuffer(), (function(e) {
3657
+ return Nr(t.arrayBuffer(), (function(e) {
3634
3658
  r = e;
3635
3659
  }));
3636
3660
  }), (function() {
3637
- return V(t, r, n.details);
3661
+ return H(t, r, n.details);
3638
3662
  }));
3639
3663
  }));
3640
- })), Nr = kr((function(e, t) {
3664
+ })), Fr = jr((function(e, t) {
3641
3665
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, { format: r = "binary" } = n;
3642
- if (r !== "binary" && r !== "text") throw new A({ info: { code: P.InvalidOutputFormat } }, `Invalid output format: ${r}`);
3643
- return r === "text" ? Ar(e, t, n) : Mr(e, t, n);
3644
- })), Pr = (e) => e;
3645
- function Fr(e, t) {
3666
+ if (r !== "binary" && r !== "text") throw new j({ info: { code: F.InvalidOutputFormat } }, `Invalid output format: ${r}`);
3667
+ return r === "text" ? Mr(e, t, n) : Pr(e, t, n);
3668
+ })), Ir = (e) => e;
3669
+ function Lr(e, t) {
3646
3670
  let n = "";
3647
- return t.format && t.indentBy.length > 0 && (n = "\n"), Ir(e, t, "", n);
3671
+ return t.format && t.indentBy.length > 0 && (n = "\n"), Rr(e, t, "", n);
3648
3672
  }
3649
- function Ir(e, t, n, r) {
3673
+ function Rr(e, t, n, r) {
3650
3674
  let i = "", a = !1;
3651
3675
  for (let o = 0; o < e.length; o++) {
3652
- let s = e[o], c = Lr(s);
3676
+ let s = e[o], c = zr(s);
3653
3677
  if (c === void 0) continue;
3654
3678
  let l = "";
3655
3679
  if (l = n.length === 0 ? c : `${n}.${c}`, c === t.textNodeName) {
3656
3680
  let e = s[c];
3657
- zr(l, t) || (e = t.tagValueProcessor(c, e), e = Br(e, t)), a && (i += r), i += e, a = !1;
3681
+ Vr(l, t) || (e = t.tagValueProcessor(c, e), e = Hr(e, t)), a && (i += r), i += e, a = !1;
3658
3682
  continue;
3659
3683
  }
3660
3684
  if (c === t.cdataPropName) {
@@ -3666,46 +3690,46 @@ function Ir(e, t, n, r) {
3666
3690
  continue;
3667
3691
  }
3668
3692
  if (c[0] === "?") {
3669
- let e = Rr(s[":@"], t), n = c === "?xml" ? "" : r, o = s[c][0][t.textNodeName];
3693
+ let e = Br(s[":@"], t), n = c === "?xml" ? "" : r, o = s[c][0][t.textNodeName];
3670
3694
  o = o.length === 0 ? "" : " " + o, i += n + `<${c}${o}${e}?>`, a = !0;
3671
3695
  continue;
3672
3696
  }
3673
3697
  let u = r;
3674
3698
  u !== "" && (u += t.indentBy);
3675
- let d = r + `<${c}${Rr(s[":@"], t)}`, f = Ir(s[c], t, l, u);
3699
+ let d = r + `<${c}${Br(s[":@"], t)}`, f = Rr(s[c], t, l, u);
3676
3700
  t.unpairedTags.indexOf(c) === -1 ? f && f.length !== 0 || !t.suppressEmptyNode ? f && f.endsWith(">") ? i += d + `>${f}${r}</${c}>` : (i += d + ">", f && r !== "" && (f.includes("/>") || f.includes("</")) ? i += r + t.indentBy + f + r : i += f, i += `</${c}>`) : i += d + "/>" : t.suppressUnpairedNode ? i += d + ">" : i += d + "/>", a = !0;
3677
3701
  }
3678
3702
  return i;
3679
3703
  }
3680
- function Lr(e) {
3704
+ function zr(e) {
3681
3705
  let t = Object.keys(e);
3682
3706
  for (let n = 0; n < t.length; n++) {
3683
3707
  let r = t[n];
3684
3708
  if (e.hasOwnProperty(r) && r !== ":@") return r;
3685
3709
  }
3686
3710
  }
3687
- function Rr(e, t) {
3711
+ function Br(e, t) {
3688
3712
  let n = "";
3689
3713
  if (e && !t.ignoreAttributes) for (let r in e) {
3690
3714
  if (!e.hasOwnProperty(r)) continue;
3691
3715
  let i = t.attributeValueProcessor(r, e[r]);
3692
- i = Br(i, t), !0 === i && t.suppressBooleanAttributes ? n += ` ${r.substr(t.attributeNamePrefix.length)}` : n += ` ${r.substr(t.attributeNamePrefix.length)}="${i}"`;
3716
+ i = Hr(i, t), !0 === i && t.suppressBooleanAttributes ? n += ` ${r.substr(t.attributeNamePrefix.length)}` : n += ` ${r.substr(t.attributeNamePrefix.length)}="${i}"`;
3693
3717
  }
3694
3718
  return n;
3695
3719
  }
3696
- function zr(e, t) {
3720
+ function Vr(e, t) {
3697
3721
  let n = (e = e.substr(0, e.length - t.textNodeName.length - 1)).substr(e.lastIndexOf(".") + 1);
3698
3722
  for (let r in t.stopNodes) if (t.stopNodes[r] === e || t.stopNodes[r] === "*." + n) return !0;
3699
3723
  return !1;
3700
3724
  }
3701
- function Br(e, t) {
3725
+ function Hr(e, t) {
3702
3726
  if (e && e.length > 0 && t.processEntities) for (let n = 0; n < t.entities.length; n++) {
3703
3727
  let r = t.entities[n];
3704
3728
  e = e.replace(r.regex, r.val);
3705
3729
  }
3706
3730
  return e;
3707
3731
  }
3708
- var Vr = {
3732
+ var Ur = {
3709
3733
  attributeNamePrefix: "@_",
3710
3734
  attributesGroupName: !1,
3711
3735
  textNodeName: "#text",
@@ -3752,44 +3776,44 @@ var Vr = {
3752
3776
  oneListGroup: !1
3753
3777
  };
3754
3778
  function Q(e) {
3755
- this.options = Object.assign({}, Vr, e), !0 === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {
3779
+ this.options = Object.assign({}, Ur, e), !0 === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {
3756
3780
  return !1;
3757
- } : (this.ignoreAttributesFn = wn(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = Wr), this.processTextOrObjNode = Hr, this.options.format ? (this.indentate = Ur, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
3781
+ } : (this.ignoreAttributesFn = Tn(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = Kr), this.processTextOrObjNode = Wr, this.options.format ? (this.indentate = Gr, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
3758
3782
  return "";
3759
3783
  }, this.tagEndChar = ">", this.newLine = "");
3760
3784
  }
3761
- function Hr(e, t, n, r) {
3785
+ function Wr(e, t, n, r) {
3762
3786
  let i = this.j2x(e, n + 1, r.concat(t));
3763
3787
  return e[this.options.textNodeName] !== void 0 && Object.keys(e).length === 1 ? this.buildTextValNode(e[this.options.textNodeName], t, i.attrStr, n) : this.buildObjectNode(i.val, t, i.attrStr, n);
3764
3788
  }
3765
- function Ur(e) {
3789
+ function Gr(e) {
3766
3790
  return this.options.indentBy.repeat(e);
3767
3791
  }
3768
- function Wr(e) {
3792
+ function Kr(e) {
3769
3793
  return !(!e.startsWith(this.options.attributeNamePrefix) || e === this.options.textNodeName) && e.substr(this.attrPrefixLen);
3770
3794
  }
3771
- function Gr(e) {
3795
+ function qr(e) {
3772
3796
  return new Q({
3773
3797
  attributeNamePrefix: "@_",
3774
3798
  format: !0,
3775
3799
  ignoreAttributes: !1,
3776
3800
  suppressEmptyNode: !0
3777
- }).build(Kr({ lockinfo: {
3801
+ }).build(Jr({ lockinfo: {
3778
3802
  "@_xmlns:d": "DAV:",
3779
3803
  lockscope: { exclusive: {} },
3780
3804
  locktype: { write: {} },
3781
3805
  owner: { href: e }
3782
3806
  } }, "d"));
3783
3807
  }
3784
- function Kr(e, t) {
3808
+ function Jr(e, t) {
3785
3809
  let n = { ...e };
3786
- for (let e in n) n.hasOwnProperty(e) && (n[e] && typeof n[e] == "object" && e.indexOf(":") === -1 ? (n[`${t}:${e}`] = Kr(n[e], t), delete n[e]) : !1 === /^@_/.test(e) && (n[`${t}:${e}`] = n[e], delete n[e]));
3810
+ for (let e in n) n.hasOwnProperty(e) && (n[e] && typeof n[e] == "object" && e.indexOf(":") === -1 ? (n[`${t}:${e}`] = Jr(n[e], t), delete n[e]) : !1 === /^@_/.test(e) && (n[`${t}:${e}`] = n[e], delete n[e]));
3787
3811
  return n;
3788
3812
  }
3789
- function qr(e, t, n) {
3813
+ function Yr(e, t, n) {
3790
3814
  return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3791
3815
  }
3792
- function Jr(e) {
3816
+ function Xr(e) {
3793
3817
  return function() {
3794
3818
  var t = [...arguments];
3795
3819
  try {
@@ -3800,38 +3824,45 @@ function Jr(e) {
3800
3824
  };
3801
3825
  }
3802
3826
  Q.prototype.build = function(e) {
3803
- return this.options.preserveOrder ? Fr(e, this.options) : (Array.isArray(e) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (e = { [this.options.arrayNodeName]: e }), this.j2x(e, 0, []).val);
3827
+ return this.options.preserveOrder ? Lr(e, this.options) : (Array.isArray(e) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (e = { [this.options.arrayNodeName]: e }), this.j2x(e, 0, []).val);
3804
3828
  }, Q.prototype.j2x = function(e, t, n) {
3805
3829
  let r = "", i = "", a = n.join(".");
3806
- for (let o in e) if (Object.prototype.hasOwnProperty.call(e, o)) if (e[o] === void 0) this.isAttribute(o) && (i += "");
3807
- else if (e[o] === null) this.isAttribute(o) || o === this.options.cdataPropName ? i += "" : o[0] === "?" ? i += this.indentate(t) + "<" + o + "?" + this.tagEndChar : i += this.indentate(t) + "<" + o + "/" + this.tagEndChar;
3808
- else if (e[o] instanceof Date) i += this.buildTextValNode(e[o], o, "", t);
3809
- else if (typeof e[o] != "object") {
3810
- let n = this.isAttribute(o);
3811
- if (n && !this.ignoreAttributesFn(n, a)) r += this.buildAttrPairStr(n, "" + e[o]);
3812
- else if (!n) if (o === this.options.textNodeName) {
3813
- let t = this.options.tagValueProcessor(o, "" + e[o]);
3814
- i += this.replaceEntitiesValue(t);
3815
- } else i += this.buildTextValNode(e[o], o, "", t);
3816
- } else if (Array.isArray(e[o])) {
3817
- let r = e[o].length, a = "", s = "";
3818
- for (let c = 0; c < r; c++) {
3819
- let r = e[o][c];
3820
- if (r !== void 0) if (r === null) o[0] === "?" ? i += this.indentate(t) + "<" + o + "?" + this.tagEndChar : i += this.indentate(t) + "<" + o + "/" + this.tagEndChar;
3821
- else if (typeof r == "object") if (this.options.oneListGroup) {
3822
- let e = this.j2x(r, t + 1, n.concat(o));
3823
- a += e.val, this.options.attributesGroupName && r.hasOwnProperty(this.options.attributesGroupName) && (s += e.attrStr);
3824
- } else a += this.processTextOrObjNode(r, o, t, n);
3825
- else if (this.options.oneListGroup) {
3826
- let e = this.options.tagValueProcessor(o, r);
3827
- e = this.replaceEntitiesValue(e), a += e;
3828
- } else a += this.buildTextValNode(r, o, "", t);
3829
- }
3830
- this.options.oneListGroup && (a = this.buildObjectNode(a, o, s, t)), i += a;
3831
- } else if (this.options.attributesGroupName && o === this.options.attributesGroupName) {
3832
- let t = Object.keys(e[o]), n = t.length;
3833
- for (let i = 0; i < n; i++) r += this.buildAttrPairStr(t[i], "" + e[o][t[i]]);
3834
- } else i += this.processTextOrObjNode(e[o], o, t, n);
3830
+ for (let o in e) if (Object.prototype.hasOwnProperty.call(e, o)) {
3831
+ if (e[o] === void 0) this.isAttribute(o) && (i += "");
3832
+ else if (e[o] === null) this.isAttribute(o) || o === this.options.cdataPropName ? i += "" : o[0] === "?" ? i += this.indentate(t) + "<" + o + "?" + this.tagEndChar : i += this.indentate(t) + "<" + o + "/" + this.tagEndChar;
3833
+ else if (e[o] instanceof Date) i += this.buildTextValNode(e[o], o, "", t);
3834
+ else if (typeof e[o] != "object") {
3835
+ let n = this.isAttribute(o);
3836
+ if (n && !this.ignoreAttributesFn(n, a)) r += this.buildAttrPairStr(n, "" + e[o]);
3837
+ else if (!n) {
3838
+ if (o === this.options.textNodeName) {
3839
+ let t = this.options.tagValueProcessor(o, "" + e[o]);
3840
+ i += this.replaceEntitiesValue(t);
3841
+ } else i += this.buildTextValNode(e[o], o, "", t);
3842
+ }
3843
+ } else if (Array.isArray(e[o])) {
3844
+ let r = e[o].length, a = "", s = "";
3845
+ for (let c = 0; c < r; c++) {
3846
+ let r = e[o][c];
3847
+ if (r !== void 0) {
3848
+ if (r === null) o[0] === "?" ? i += this.indentate(t) + "<" + o + "?" + this.tagEndChar : i += this.indentate(t) + "<" + o + "/" + this.tagEndChar;
3849
+ else if (typeof r == "object") {
3850
+ if (this.options.oneListGroup) {
3851
+ let e = this.j2x(r, t + 1, n.concat(o));
3852
+ a += e.val, this.options.attributesGroupName && r.hasOwnProperty(this.options.attributesGroupName) && (s += e.attrStr);
3853
+ } else a += this.processTextOrObjNode(r, o, t, n);
3854
+ } else if (this.options.oneListGroup) {
3855
+ let e = this.options.tagValueProcessor(o, r);
3856
+ e = this.replaceEntitiesValue(e), a += e;
3857
+ } else a += this.buildTextValNode(r, o, "", t);
3858
+ }
3859
+ }
3860
+ this.options.oneListGroup && (a = this.buildObjectNode(a, o, s, t)), i += a;
3861
+ } else if (this.options.attributesGroupName && o === this.options.attributesGroupName) {
3862
+ let t = Object.keys(e[o]), n = t.length;
3863
+ for (let i = 0; i < n; i++) r += this.buildAttrPairStr(t[i], "" + e[o][t[i]]);
3864
+ } else i += this.processTextOrObjNode(e[o], o, t, n);
3865
+ }
3835
3866
  return {
3836
3867
  attrStr: r,
3837
3868
  val: i
@@ -3862,45 +3893,45 @@ Q.prototype.build = function(e) {
3862
3893
  }
3863
3894
  return e;
3864
3895
  };
3865
- var Yr = Jr((function(e, t, n) {
3896
+ var Zr = Xr((function(e, t, n) {
3866
3897
  let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
3867
- return qr(F(I({
3868
- url: M(e.remoteURL, j(t)),
3898
+ return Yr(I(L({
3899
+ url: N(e.remoteURL, M(t)),
3869
3900
  method: "UNLOCK",
3870
3901
  headers: { "Lock-Token": n }
3871
3902
  }, e, r), e), (function(t) {
3872
- if (B(e, t), t.status !== 204 && t.status !== 200) throw un(t);
3903
+ if (V(e, t), t.status !== 204 && t.status !== 200) throw dn(t);
3873
3904
  }));
3874
- })), Xr = Jr((function(e, t) {
3875
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, { refreshToken: r, timeout: i = Zr } = n, a = {
3905
+ })), Qr = Xr((function(e, t) {
3906
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, { refreshToken: r, timeout: i = $r } = n, a = {
3876
3907
  Accept: "text/plain,application/xml",
3877
3908
  Timeout: i
3878
3909
  };
3879
- return r && (a.If = r), qr(F(I({
3880
- url: M(e.remoteURL, j(t)),
3910
+ return r && (a.If = r), Yr(I(L({
3911
+ url: N(e.remoteURL, M(t)),
3881
3912
  method: "LOCK",
3882
3913
  headers: a,
3883
- data: Gr(e.contactHref)
3914
+ data: qr(e.contactHref)
3884
3915
  }, e, n), e), (function(t) {
3885
- return B(e, t), qr(t.text(), (function(e) {
3886
- let n = (a = e, new nr({
3916
+ return V(e, t), Yr(t.text(), (function(e) {
3917
+ let n = (a = e, new rr({
3887
3918
  removeNSPrefix: !0,
3888
3919
  parseAttributeValue: !0,
3889
3920
  parseTagValue: !0
3890
- }).parse(a)), r = J().get(n, "prop.lockdiscovery.activelock.locktoken.href"), i = J().get(n, "prop.lockdiscovery.activelock.timeout");
3921
+ }).parse(a)), r = Y().get(n, "prop.lockdiscovery.activelock.locktoken.href"), i = Y().get(n, "prop.lockdiscovery.activelock.timeout");
3891
3922
  var a;
3892
- if (!r) throw un(t, "No lock token received: ");
3923
+ if (!r) throw dn(t, "No lock token received: ");
3893
3924
  return {
3894
3925
  token: r,
3895
3926
  serverTimeout: i
3896
3927
  };
3897
3928
  }));
3898
3929
  }));
3899
- })), Zr = "Infinite, Second-4100000000";
3900
- function Qr(e, t, n) {
3930
+ })), $r = "Infinite, Second-4100000000";
3931
+ function ei(e, t, n) {
3901
3932
  return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3902
3933
  }
3903
- var $r = function(e) {
3934
+ var ti = function(e) {
3904
3935
  return function() {
3905
3936
  var t = [...arguments];
3906
3937
  try {
@@ -3911,22 +3942,22 @@ var $r = function(e) {
3911
3942
  };
3912
3943
  }((function(e) {
3913
3944
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.path || "/";
3914
- return Qr(F(I({
3915
- url: M(e.remoteURL, n),
3945
+ return ei(I(L({
3946
+ url: N(e.remoteURL, n),
3916
3947
  method: "PROPFIND",
3917
3948
  headers: {
3918
3949
  Accept: "text/plain,application/xml",
3919
3950
  Depth: "0"
3920
3951
  }
3921
3952
  }, e, t), e), (function(n) {
3922
- return B(e, n), Qr(n.text(), (function(r) {
3923
- return Qr(or(r, e.parsing), (function(e) {
3924
- return V(n, function(e) {
3953
+ return V(e, n), ei(n.text(), (function(r) {
3954
+ return ei(sr(r, e.parsing), (function(e) {
3955
+ return H(n, function(e) {
3925
3956
  try {
3926
3957
  let [t] = e.multistatus.response, { propstat: { prop: { "quota-used-bytes": n, "quota-available-bytes": r } } } = t;
3927
3958
  return n !== void 0 && r !== void 0 ? {
3928
3959
  used: parseInt(String(n), 10),
3929
- available: lr(r)
3960
+ available: ur(r)
3930
3961
  } : null;
3931
3962
  } catch {}
3932
3963
  return null;
@@ -3935,10 +3966,10 @@ var $r = function(e) {
3935
3966
  }));
3936
3967
  }));
3937
3968
  }));
3938
- function ei(e, t, n) {
3969
+ function ni(e, t, n) {
3939
3970
  return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3940
3971
  }
3941
- var ti = function(e) {
3972
+ var ri = function(e) {
3942
3973
  return function() {
3943
3974
  var t = [...arguments];
3944
3975
  try {
@@ -3949,31 +3980,31 @@ var ti = function(e) {
3949
3980
  };
3950
3981
  }((function(e, t) {
3951
3982
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, { details: r = !1 } = n;
3952
- return ei(F(I({
3953
- url: M(e.remoteURL, j(t)),
3983
+ return ni(I(L({
3984
+ url: N(e.remoteURL, M(t)),
3954
3985
  method: "SEARCH",
3955
3986
  headers: {
3956
3987
  Accept: "text/plain,application/xml",
3957
3988
  "Content-Type": e.headers["Content-Type"] || "application/xml; charset=utf-8"
3958
3989
  }
3959
3990
  }, e, n), e), (function(n) {
3960
- return B(e, n), ei(n.text(), (function(i) {
3961
- return ei(or(i, e.parsing), (function(e) {
3962
- return V(n, function(e, t, n) {
3991
+ return V(e, n), ni(n.text(), (function(i) {
3992
+ return ni(sr(i, e.parsing), (function(e) {
3993
+ return H(n, function(e, t, n) {
3963
3994
  let r = {
3964
3995
  truncated: !1,
3965
3996
  results: []
3966
3997
  };
3967
- return r.truncated = e.multistatus.response.some(((e) => (e.status || e.propstat?.status).split(" ", 3)?.[1] === "507" && e.href.replace(/\/$/, "").endsWith(j(t).replace(/\/$/, "")))), e.multistatus.response.forEach(((e) => {
3998
+ return r.truncated = e.multistatus.response.some(((e) => (e.status || e.propstat?.status).split(" ", 3)?.[1] === "507" && e.href.replace(/\/$/, "").endsWith(M(t).replace(/\/$/, "")))), e.multistatus.response.forEach(((e) => {
3968
3999
  if (e.propstat === void 0) return;
3969
4000
  let t = e.href.split("/").map(decodeURIComponent).join("/");
3970
- r.results.push(sr(e.propstat.prop, t, n));
4001
+ r.results.push(cr(e.propstat.prop, t, n));
3971
4002
  })), r;
3972
4003
  }(e, t, r), r);
3973
4004
  }));
3974
4005
  }));
3975
4006
  }));
3976
- })), ni = function(e) {
4007
+ })), ii = function(e) {
3977
4008
  return function() {
3978
4009
  var t = [...arguments];
3979
4010
  try {
@@ -3983,26 +4014,26 @@ var ti = function(e) {
3983
4014
  }
3984
4015
  };
3985
4016
  }((function(e, t, n) {
3986
- let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, i = I({
3987
- url: M(e.remoteURL, j(t)),
4017
+ let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, i = L({
4018
+ url: N(e.remoteURL, M(t)),
3988
4019
  method: "MOVE",
3989
4020
  headers: {
3990
- Destination: M(e.remoteURL, j(n)),
4021
+ Destination: N(e.remoteURL, M(n)),
3991
4022
  Overwrite: !1 === r.overwrite ? "F" : "T"
3992
4023
  }
3993
4024
  }, e, r);
3994
4025
  return o = function(t) {
3995
- B(e, t);
3996
- }, (a = F(i, e)) && a.then || (a = Promise.resolve(a)), o ? a.then(o) : a;
4026
+ V(e, t);
4027
+ }, (a = I(i, e)) && a.then || (a = Promise.resolve(a)), o ? a.then(o) : a;
3997
4028
  var a, o;
3998
- })), ri = k(172);
3999
- function ii(e) {
4000
- if (ht(e)) return e.byteLength;
4001
- if (gt(e)) return e.length;
4002
- if (typeof e == "string") return (0, ri.d)(e);
4003
- throw new A({ info: { code: P.DataTypeNoLength } }, "Cannot calculate data length: Invalid type");
4029
+ })), ai = A(172);
4030
+ function oi(e) {
4031
+ if (gt(e)) return e.byteLength;
4032
+ if (_t(e)) return e.length;
4033
+ if (typeof e == "string") return (0, ai.d)(e);
4034
+ throw new j({ info: { code: F.DataTypeNoLength } }, "Cannot calculate data length: Invalid type");
4004
4035
  }
4005
- var ai = function(e) {
4036
+ var si = function(e) {
4006
4037
  return function() {
4007
4038
  var t = [...arguments];
4008
4039
  try {
@@ -4013,25 +4044,25 @@ var ai = function(e) {
4013
4044
  };
4014
4045
  }((function(e, t, n) {
4015
4046
  let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, { contentLength: i = !0, overwrite: a = !0 } = r, o = { "Content-Type": "application/octet-stream" };
4016
- !1 === i || (o["Content-Length"] = typeof i == "number" ? `${i}` : `${ii(n)}`), a || (o["If-None-Match"] = "*");
4017
- let s = I({
4018
- url: M(e.remoteURL, j(t)),
4047
+ !1 === i || (o["Content-Length"] = typeof i == "number" ? `${i}` : `${oi(n)}`), a || (o["If-None-Match"] = "*");
4048
+ let s = L({
4049
+ url: N(e.remoteURL, M(t)),
4019
4050
  method: "PUT",
4020
4051
  headers: o,
4021
4052
  data: n
4022
4053
  }, e, r);
4023
4054
  return l = function(t) {
4024
4055
  try {
4025
- B(e, t);
4056
+ V(e, t);
4026
4057
  } catch (e) {
4027
4058
  let t = e;
4028
4059
  if (t.status !== 412 || a) throw t;
4029
4060
  return !1;
4030
4061
  }
4031
4062
  return !0;
4032
- }, (c = F(s, e)) && c.then || (c = Promise.resolve(c)), l ? c.then(l) : c;
4063
+ }, (c = I(s, e)) && c.then || (c = Promise.resolve(c)), l ? c.then(l) : c;
4033
4064
  var c, l;
4034
- })), oi = function(e) {
4065
+ })), ci = function(e) {
4035
4066
  return function() {
4036
4067
  var t = [...arguments];
4037
4068
  try {
@@ -4041,13 +4072,13 @@ var ai = function(e) {
4041
4072
  }
4042
4073
  };
4043
4074
  }((function(e, t) {
4044
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = I({
4045
- url: M(e.remoteURL, j(t)),
4075
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = L({
4076
+ url: N(e.remoteURL, M(t)),
4046
4077
  method: "OPTIONS"
4047
4078
  }, e, n);
4048
4079
  return a = function(t) {
4049
4080
  try {
4050
- B(e, t);
4081
+ V(e, t);
4051
4082
  } catch (e) {
4052
4083
  throw e;
4053
4084
  }
@@ -4055,51 +4086,51 @@ var ai = function(e) {
4055
4086
  compliance: (t.headers.get("DAV") ?? "").split(",").map(((e) => e.trim())),
4056
4087
  server: t.headers.get("Server") ?? ""
4057
4088
  };
4058
- }, (i = F(r, e)) && i.then || (i = Promise.resolve(i)), a ? i.then(a) : i;
4089
+ }, (i = I(r, e)) && i.then || (i = Promise.resolve(i)), a ? i.then(a) : i;
4059
4090
  var i, a;
4060
4091
  }));
4061
- function si(e, t, n) {
4092
+ function li(e, t, n) {
4062
4093
  return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
4063
4094
  }
4064
- var ci = di((function(e, t, n, r, i) {
4095
+ var ui = pi((function(e, t, n, r, i) {
4065
4096
  let a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
4066
- if (n > r || n < 0) throw new A({ info: { code: P.InvalidUpdateRange } }, `Invalid update range ${n} for partial update`);
4097
+ if (n > r || n < 0) throw new j({ info: { code: F.InvalidUpdateRange } }, `Invalid update range ${n} for partial update`);
4067
4098
  let o = {
4068
4099
  "Content-Type": "application/octet-stream",
4069
4100
  "Content-Length": "" + (r - n + 1),
4070
4101
  "Content-Range": `bytes ${n}-${r}/*`
4071
4102
  };
4072
- return si(F(I({
4073
- url: M(e.remoteURL, j(t)),
4103
+ return li(I(L({
4104
+ url: N(e.remoteURL, M(t)),
4074
4105
  method: "PUT",
4075
4106
  headers: o,
4076
4107
  data: i
4077
4108
  }, e, a), e), (function(t) {
4078
- B(e, t);
4109
+ V(e, t);
4079
4110
  }));
4080
4111
  }));
4081
- function li(e, t) {
4112
+ function di(e, t) {
4082
4113
  var n = e();
4083
4114
  return n && n.then ? n.then(t) : t(n);
4084
4115
  }
4085
- var ui = di((function(e, t, n, r, i) {
4116
+ var fi = pi((function(e, t, n, r, i) {
4086
4117
  let a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
4087
- if (n > r || n < 0) throw new A({ info: { code: P.InvalidUpdateRange } }, `Invalid update range ${n} for partial update`);
4118
+ if (n > r || n < 0) throw new j({ info: { code: F.InvalidUpdateRange } }, `Invalid update range ${n} for partial update`);
4088
4119
  let o = {
4089
4120
  "Content-Type": "application/x-sabredav-partialupdate",
4090
4121
  "Content-Length": "" + (r - n + 1),
4091
4122
  "X-Update-Range": `bytes=${n}-${r}`
4092
4123
  };
4093
- return si(F(I({
4094
- url: M(e.remoteURL, j(t)),
4124
+ return li(I(L({
4125
+ url: N(e.remoteURL, M(t)),
4095
4126
  method: "PATCH",
4096
4127
  headers: o,
4097
4128
  data: i
4098
4129
  }, e, a), e), (function(t) {
4099
- B(e, t);
4130
+ V(e, t);
4100
4131
  }));
4101
4132
  }));
4102
- function di(e) {
4133
+ function pi(e) {
4103
4134
  return function() {
4104
4135
  var t = [...arguments];
4105
4136
  try {
@@ -4109,30 +4140,30 @@ function di(e) {
4109
4140
  }
4110
4141
  };
4111
4142
  }
4112
- var fi = di((function(e, t, n, r, i) {
4143
+ var mi = pi((function(e, t, n, r, i) {
4113
4144
  let a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
4114
- return si(oi(e, t, a), (function(o) {
4145
+ return li(ci(e, t, a), (function(o) {
4115
4146
  let s = !1;
4116
- return li((function() {
4117
- if (o.compliance.includes("sabredav-partialupdate")) return si(ui(e, t, n, r, i, a), (function(e) {
4147
+ return di((function() {
4148
+ if (o.compliance.includes("sabredav-partialupdate")) return li(fi(e, t, n, r, i, a), (function(e) {
4118
4149
  return s = !0, e;
4119
4150
  }));
4120
4151
  }), (function(c) {
4121
4152
  let l = !1;
4122
- return s ? c : li((function() {
4123
- if (o.server.includes("Apache") && o.compliance.includes("<http://apache.org/dav/propset/fs/1>")) return si(ci(e, t, n, r, i, a), (function(e) {
4153
+ return s ? c : di((function() {
4154
+ if (o.server.includes("Apache") && o.compliance.includes("<http://apache.org/dav/propset/fs/1>")) return li(ui(e, t, n, r, i, a), (function(e) {
4124
4155
  return l = !0, e;
4125
4156
  }));
4126
4157
  }), (function(e) {
4127
4158
  if (l) return e;
4128
- throw new A({ info: { code: P.NotSupported } }, "Not supported");
4159
+ throw new j({ info: { code: F.NotSupported } }, "Not supported");
4129
4160
  }));
4130
4161
  }));
4131
4162
  }));
4132
- })), pi = "https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";
4133
- function mi(e) {
4134
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, { authType: n = null, remoteBasePath: r, contactHref: i = pi, ha1: a, headers: o = {}, httpAgent: s, httpsAgent: c, password: l, token: u, username: d, withCredentials: f } = t, p = n;
4135
- p ||= d || l ? N.Password : N.None;
4163
+ })), hi = "https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";
4164
+ function gi(e) {
4165
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, { authType: n = null, remoteBasePath: r, contactHref: i = hi, ha1: a, headers: o = {}, httpAgent: s, httpsAgent: c, password: l, token: u, username: d, withCredentials: f } = t, p = n;
4166
+ p ||= d || l ? P.Password : P.None;
4136
4167
  let m = {
4137
4168
  authType: p,
4138
4169
  remoteBasePath: r,
@@ -4145,34 +4176,34 @@ function mi(e) {
4145
4176
  parsing: {
4146
4177
  attributeNamePrefix: t.attributeNamePrefix ?? "@",
4147
4178
  attributeParsers: [],
4148
- tagParsers: [ir]
4179
+ tagParsers: [ar]
4149
4180
  },
4150
- remotePath: We(e),
4181
+ remotePath: Ge(e),
4151
4182
  remoteURL: e,
4152
4183
  token: u,
4153
4184
  username: d,
4154
4185
  withCredentials: f
4155
4186
  };
4156
- return tt(m, d, l, u, a), {
4157
- copyFile: (e, t, n) => dn(m, e, t, n),
4158
- createDirectory: (e, t) => yr(m, e, t),
4187
+ return nt(m, d, l, u, a), {
4188
+ copyFile: (e, t, n) => fn(m, e, t, n),
4189
+ createDirectory: (e, t) => xr(m, e, t),
4159
4190
  createReadStream: (e, t) => function(e, t) {
4160
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = new (xr()).PassThrough();
4161
- return Sr(e, t, n).then(((e) => {
4191
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = new (Cr()).PassThrough();
4192
+ return wr(e, t, n).then(((e) => {
4162
4193
  e.pipe(r);
4163
4194
  })).catch(((e) => {
4164
4195
  r.emit("error", e);
4165
4196
  })), r;
4166
4197
  }(m, e, t),
4167
4198
  createWriteStream: (e, t, n) => function(e, t) {
4168
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : Cr, i = new (xr()).PassThrough(), a = {};
4169
- return !1 === n.overwrite && (a["If-None-Match"] = "*"), F(I({
4170
- url: M(e.remoteURL, j(t)),
4199
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : Tr, i = new (Cr()).PassThrough(), a = {};
4200
+ return !1 === n.overwrite && (a["If-None-Match"] = "*"), I(L({
4201
+ url: N(e.remoteURL, M(t)),
4171
4202
  method: "PUT",
4172
4203
  headers: a,
4173
4204
  data: i,
4174
4205
  maxRedirects: 0
4175
- }, e, n), e).then(((t) => B(e, t))).then(((e) => {
4206
+ }, e, n), e).then(((t) => V(e, t))).then(((e) => {
4176
4207
  setTimeout((() => {
4177
4208
  r(e);
4178
4209
  }), 0);
@@ -4180,50 +4211,50 @@ function mi(e) {
4180
4211
  i.emit("error", e);
4181
4212
  })), i;
4182
4213
  }(m, e, t, n),
4183
- customRequest: (e, t) => wr(m, e, t),
4184
- deleteFile: (e, t) => Tr(m, e, t),
4185
- exists: (e, t) => Er(m, e, t),
4186
- getDirectoryContents: (e, t) => Or(m, e, t),
4187
- getFileContents: (e, t) => Nr(m, e, t),
4214
+ customRequest: (e, t) => Er(m, e, t),
4215
+ deleteFile: (e, t) => Dr(m, e, t),
4216
+ exists: (e, t) => Or(m, e, t),
4217
+ getDirectoryContents: (e, t) => Ar(m, e, t),
4218
+ getFileContents: (e, t) => Fr(m, e, t),
4188
4219
  getFileDownloadLink: (e) => function(e, t) {
4189
- let n = M(e.remoteURL, j(t)), r = /^https:/i.test(n) ? "https" : "http";
4220
+ let n = N(e.remoteURL, M(t)), r = /^https:/i.test(n) ? "https" : "http";
4190
4221
  switch (e.authType) {
4191
- case N.None: break;
4192
- case N.Password: {
4193
- let t = Ze(e.headers.Authorization.replace(/^Basic /i, "").trim());
4222
+ case P.None: break;
4223
+ case P.Password: {
4224
+ let t = Qe(e.headers.Authorization.replace(/^Basic /i, "").trim());
4194
4225
  n = n.replace(/^https?:\/\//, `${r}://${t}@`);
4195
4226
  break;
4196
4227
  }
4197
- default: throw new A({ info: { code: P.LinkUnsupportedAuthType } }, `Unsupported auth type for file link: ${e.authType}`);
4228
+ default: throw new j({ info: { code: F.LinkUnsupportedAuthType } }, `Unsupported auth type for file link: ${e.authType}`);
4198
4229
  }
4199
4230
  return n;
4200
4231
  }(m, e),
4201
4232
  getFileUploadLink: (e) => function(e, t) {
4202
- let n = `${M(e.remoteURL, j(t))}?Content-Type=application/octet-stream`, r = /^https:/i.test(n) ? "https" : "http";
4233
+ let n = `${N(e.remoteURL, M(t))}?Content-Type=application/octet-stream`, r = /^https:/i.test(n) ? "https" : "http";
4203
4234
  switch (e.authType) {
4204
- case N.None: break;
4205
- case N.Password: {
4206
- let t = Ze(e.headers.Authorization.replace(/^Basic /i, "").trim());
4235
+ case P.None: break;
4236
+ case P.Password: {
4237
+ let t = Qe(e.headers.Authorization.replace(/^Basic /i, "").trim());
4207
4238
  n = n.replace(/^https?:\/\//, `${r}://${t}@`);
4208
4239
  break;
4209
4240
  }
4210
- default: throw new A({ info: { code: P.LinkUnsupportedAuthType } }, `Unsupported auth type for file link: ${e.authType}`);
4241
+ default: throw new j({ info: { code: F.LinkUnsupportedAuthType } }, `Unsupported auth type for file link: ${e.authType}`);
4211
4242
  }
4212
4243
  return n;
4213
4244
  }(m, e),
4214
4245
  getHeaders: () => Object.assign({}, m.headers),
4215
- getQuota: (e) => $r(m, e),
4216
- lock: (e, t) => Xr(m, e, t),
4217
- moveFile: (e, t, n) => ni(m, e, t, n),
4218
- putFileContents: (e, t, n) => ai(m, e, t, n),
4219
- partialUpdateFileContents: (e, t, n, r, i) => fi(m, e, t, n, r, i),
4220
- getDAVCompliance: (e) => oi(m, e),
4221
- search: (e, t) => ti(m, e, t),
4246
+ getQuota: (e) => ti(m, e),
4247
+ lock: (e, t) => Qr(m, e, t),
4248
+ moveFile: (e, t, n) => ii(m, e, t, n),
4249
+ putFileContents: (e, t, n) => si(m, e, t, n),
4250
+ partialUpdateFileContents: (e, t, n, r, i) => mi(m, e, t, n, r, i),
4251
+ getDAVCompliance: (e) => ci(m, e),
4252
+ search: (e, t) => ri(m, e, t),
4222
4253
  setHeaders: (e) => {
4223
4254
  m.headers = Object.assign({}, e);
4224
4255
  },
4225
- stat: (e, t) => dr(m, e, t),
4226
- unlock: (e, t, n) => Yr(m, e, t, n),
4256
+ stat: (e, t) => fr(m, e, t),
4257
+ unlock: (e, t, n) => Zr(m, e, t, n),
4227
4258
  registerAttributeParser: (e) => {
4228
4259
  m.parsing.attributeParsers.push(e);
4229
4260
  },
@@ -4233,73 +4264,78 @@ function mi(e) {
4233
4264
  };
4234
4265
  }
4235
4266
  //#endregion
4236
- //#region ../../node_modules/.pnpm/uuid@14.0.1/node_modules/uuid/dist/stringify.js
4267
+ //#region ../../node_modules/.pnpm/uuid@14.0.2/node_modules/uuid/dist/stringify.js
4237
4268
  var $ = [];
4238
4269
  for (let e = 0; e < 256; ++e) $.push((e + 256).toString(16).slice(1));
4239
- function hi(e, t = 0) {
4270
+ function _i(e, t = 0) {
4240
4271
  return ($[e[t + 0]] + $[e[t + 1]] + $[e[t + 2]] + $[e[t + 3]] + "-" + $[e[t + 4]] + $[e[t + 5]] + "-" + $[e[t + 6]] + $[e[t + 7]] + "-" + $[e[t + 8]] + $[e[t + 9]] + "-" + $[e[t + 10]] + $[e[t + 11]] + $[e[t + 12]] + $[e[t + 13]] + $[e[t + 14]] + $[e[t + 15]]).toLowerCase();
4241
4272
  }
4242
4273
  //#endregion
4243
- //#region ../../node_modules/.pnpm/uuid@14.0.1/node_modules/uuid/dist/rng.js
4244
- var gi = /* @__PURE__ */ new Uint8Array(16);
4245
- function _i() {
4246
- return crypto.getRandomValues(gi);
4274
+ //#region ../../node_modules/.pnpm/uuid@14.0.2/node_modules/uuid/dist/rng.js
4275
+ var vi = /* @__PURE__ */ new Uint8Array(16);
4276
+ function yi() {
4277
+ return crypto.getRandomValues(vi);
4247
4278
  }
4248
4279
  //#endregion
4249
- //#region ../../node_modules/.pnpm/uuid@14.0.1/node_modules/uuid/dist/v4.js
4250
- function vi(e, t, n) {
4251
- return !t && !e && crypto.randomUUID ? crypto.randomUUID() : yi(e, t, n);
4280
+ //#region ../../node_modules/.pnpm/uuid@14.0.2/node_modules/uuid/dist/v4.js
4281
+ function bi(e, t, n) {
4282
+ return !t && !e && crypto.randomUUID ? crypto.randomUUID() : xi(e, t, n);
4252
4283
  }
4253
- function yi(e, t, n) {
4284
+ function xi(e, t, n) {
4254
4285
  e ||= {};
4255
- let r = e.random ?? e.rng?.() ?? _i();
4286
+ let r = e.random ?? e.rng?.() ?? yi();
4256
4287
  if (r.length < 16) throw Error("Random bytes length must be >= 16");
4257
4288
  if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
4258
4289
  if (n ||= 0, n < 0 || n + 16 > t.length) throw RangeError(`UUID byte range ${n}:${n + 15} is out of buffer bounds`);
4259
4290
  for (let e = 0; e < 16; ++e) t[n + e] = r[e];
4260
4291
  return t;
4261
4292
  }
4262
- return hi(r);
4293
+ return _i(r);
4263
4294
  }
4264
4295
  //#endregion
4265
4296
  //#region src/webdav/client/builders.ts
4266
- var bi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includes(e) ? [e, n || ""] : [o.DavNamespace.includes(e) ? `d:${e}` : `oc:${e}`, n || ""])), xi = (e = [], { pattern: t, filterRules: n, limit: r = 0, extraProps: i = [] }) => {
4297
+ var Si = (e) => {
4298
+ let t = Object.fromEntries(Object.entries(u).map(([e, t]) => [`@@xmlns:${e}`, t]));
4299
+ for (let n of e) {
4300
+ let [e] = n.split(":");
4301
+ e && e !== n && !(`@@xmlns:${e}` in t) && (t[`@@xmlns:${e}`] = e);
4302
+ }
4303
+ return t;
4304
+ }, Ci = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includes(e) ? [e, n || ""] : [o.DavNamespace.includes(e) ? `d:${e}` : `oc:${e}`, n || ""])), wi = (e = [], { pattern: t, filterRules: n, limit: r = 0, extraProps: i = [] }) => {
4267
4305
  let a = "d:propfind";
4268
4306
  t && (a = "oc:search-files"), n && (a = "oc:filter-files");
4269
4307
  let o = e.reduce((e, t) => Object.assign(e, { [t]: null }), {});
4270
4308
  for (let e of i) e in o || (o[e] = null);
4271
- let s = bi(o, i), c = { [a]: {
4309
+ let s = Ci(o, i), c = { [a]: {
4272
4310
  "d:prop": s,
4273
- "@@xmlns:d": "DAV:",
4274
- "@@xmlns:oc": "http://owncloud.org/ns",
4311
+ ...Si(i),
4275
4312
  ...t && { "oc:search": {
4276
4313
  "oc:pattern": t,
4277
4314
  "oc:limit": r
4278
4315
  } },
4279
- ...n && { "oc:filter-rules": bi(n, []) }
4316
+ ...n && { "oc:filter-rules": Ci(n, []) }
4280
4317
  } };
4281
- return new ge({
4318
+ return new _e({
4282
4319
  format: !0,
4283
4320
  ignoreAttributes: !1,
4284
4321
  attributeNamePrefix: "@@",
4285
4322
  suppressEmptyNode: !0
4286
4323
  }).build(c);
4287
- }, Si = (e) => {
4288
- let t = { "d:propertyupdate": {
4289
- "d:set": { "d:prop": bi(e, []) },
4290
- "@@xmlns:d": "DAV:",
4291
- "@@xmlns:oc": "http://owncloud.org/ns"
4324
+ }, Ti = (e, t = []) => {
4325
+ let n = { "d:propertyupdate": {
4326
+ "d:set": { "d:prop": Ci(e, t) },
4327
+ ...Si(t)
4292
4328
  } };
4293
- return new ge({
4329
+ return new _e({
4294
4330
  format: !0,
4295
4331
  ignoreAttributes: !1,
4296
4332
  attributeNamePrefix: "@@",
4297
4333
  suppressEmptyNode: !0
4298
- }).build(t);
4299
- }, Ci = (e) => {
4334
+ }).build(n);
4335
+ }, Ei = (e) => {
4300
4336
  let t = {}, n = e.get("tus-version");
4301
4337
  return n ? (t.version = n.split(","), e.get("tus-extension") && (t.extension = e.get("tus-extension").split(",")), e.get("tus-resumable") && (t.resumable = e.get("tus-resumable")), e.get("tus-max-size") && (t.maxSize = parseInt(e.get("tus-max-size"), 10)), t) : null;
4302
- }, wi = async (e) => {
4338
+ }, Di = async (e) => {
4303
4339
  let t = (e) => {
4304
4340
  let t = decodeURIComponent(e);
4305
4341
  return e?.startsWith("/dav/") ? i(t.replace("/dav/", ""), {
@@ -4307,15 +4343,15 @@ var bi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4307
4343
  trailingSlash: !1
4308
4344
  }) : t;
4309
4345
  };
4310
- return (await or(e)).multistatus.response.map(({ href: e, propstat: n }) => {
4346
+ return (await sr(e)).multistatus.response.map(({ href: e, propstat: n }) => {
4311
4347
  let r = {
4312
- ...sr(n.prop, t(e), !0),
4348
+ ...cr(n.prop, t(e), !0),
4313
4349
  processing: n.status === "HTTP/1.1 425 TOO EARLY"
4314
4350
  };
4315
4351
  return r.props.name && (r.props.name = r.props.name.toString()), r;
4316
4352
  });
4317
- }, Ti = (e) => {
4318
- let t = new h(), n = {
4353
+ }, Oi = (e) => {
4354
+ let t = new g(), n = {
4319
4355
  message: "Unknown error",
4320
4356
  errorCode: void 0
4321
4357
  };
@@ -4334,36 +4370,36 @@ var bi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4334
4370
  return n;
4335
4371
  }
4336
4372
  return n;
4337
- }, Ei = class {
4373
+ }, ki = class {
4338
4374
  client;
4339
4375
  davPath;
4340
4376
  headers;
4341
4377
  extraProps;
4342
4378
  constructor({ baseUrl: e, headers: t }) {
4343
- this.davPath = i(e, "dav"), this.client = mi(this.davPath, {}), this.headers = t, this.extraProps = [];
4379
+ this.davPath = i(e, "dav"), this.client = gi(this.davPath, {}), this.headers = t, this.extraProps = [];
4344
4380
  }
4345
4381
  mkcol(e, t = {}) {
4346
4382
  return this.request(e, {
4347
- method: u.mkcol,
4383
+ method: l.mkcol,
4348
4384
  ...t
4349
4385
  });
4350
4386
  }
4351
- async propfind(e, { depth: t = 1, properties: n = [], headers: r = {}, ...i } = {}) {
4352
- let a = {
4353
- ...r,
4387
+ async propfind(e, { depth: t = 1, properties: n = [], extraProps: r = [], headers: i = {}, ...a } = {}) {
4388
+ let o = {
4389
+ ...i,
4354
4390
  Depth: t.toString()
4355
- }, { body: o, result: s } = await this.request(e, {
4356
- method: u.propfind,
4357
- data: xi(n, { extraProps: this.extraProps }),
4358
- headers: a,
4359
- ...i
4391
+ }, { body: s, result: c } = await this.request(e, {
4392
+ method: l.propfind,
4393
+ data: wi(n, { extraProps: [...this.extraProps, ...r] }),
4394
+ headers: o,
4395
+ ...a
4360
4396
  });
4361
- return o?.length && (o[0].tusSupport = Ci(s.headers)), o;
4397
+ return s?.length && (s[0].tusSupport = Ei(c.headers)), s;
4362
4398
  }
4363
4399
  async report(e, { pattern: t = "", filterRules: n = null, limit: r = 30, properties: i, ...a } = {}) {
4364
4400
  let { body: o, result: s } = await this.request(e, {
4365
- method: u.report,
4366
- data: xi(i, {
4401
+ method: l.report,
4402
+ data: wi(i, {
4367
4403
  pattern: t,
4368
4404
  filterRules: n,
4369
4405
  limit: r,
@@ -4377,9 +4413,9 @@ var bi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4377
4413
  };
4378
4414
  }
4379
4415
  copy(e, t, { overwrite: n = !1, headers: r = {}, ...a } = {}) {
4380
- let o = i(this.davPath, v(t));
4416
+ let o = i(this.davPath, y(t));
4381
4417
  return this.request(e, {
4382
- method: u.copy,
4418
+ method: l.copy,
4383
4419
  headers: {
4384
4420
  ...r,
4385
4421
  Destination: o,
@@ -4389,9 +4425,9 @@ var bi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4389
4425
  });
4390
4426
  }
4391
4427
  move(e, t, { overwrite: n = !1, headers: r = {}, ...a } = {}) {
4392
- let o = i(this.davPath, v(t));
4428
+ let o = i(this.davPath, y(t));
4393
4429
  return this.request(e, {
4394
- method: u.move,
4430
+ method: l.move,
4395
4431
  headers: {
4396
4432
  ...r,
4397
4433
  Destination: o,
@@ -4403,7 +4439,7 @@ var bi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4403
4439
  put(e, t, { headers: n = {}, onUploadProgress: r, previousEntityTag: i, overwrite: a, ...o } = {}) {
4404
4440
  let s = { ...n };
4405
4441
  return i ? s["If-Match"] = i : a || (s["If-None-Match"] = "*"), this.request(e, {
4406
- method: u.put,
4442
+ method: l.put,
4407
4443
  data: t,
4408
4444
  headers: s,
4409
4445
  onUploadProgress: r,
@@ -4412,73 +4448,75 @@ var bi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4412
4448
  }
4413
4449
  delete(e, t = {}) {
4414
4450
  return this.request(e, {
4415
- method: u.delete,
4451
+ method: l.delete,
4416
4452
  ...t
4417
4453
  });
4418
4454
  }
4419
- propPatch(e, t, n = {}) {
4420
- let r = Si(t);
4455
+ propPatch(e, t, { extraProps: n = [], ...r } = {}) {
4456
+ let i = Ti(t, [...this.extraProps, ...n]);
4421
4457
  return this.request(e, {
4422
- method: u.proppatch,
4423
- data: r,
4424
- ...n
4458
+ method: l.proppatch,
4459
+ data: i,
4460
+ ...r
4425
4461
  });
4426
4462
  }
4427
4463
  getFileUrl(e) {
4428
- return i(this.davPath, v(e));
4464
+ return i(this.davPath, y(e));
4429
4465
  }
4430
4466
  buildHeaders(e = {}) {
4431
4467
  return {
4432
4468
  "Content-Type": "application/xml; charset=utf-8",
4433
4469
  "X-Requested-With": "XMLHttpRequest",
4434
- "X-Request-ID": vi(),
4470
+ "X-Request-ID": bi(),
4435
4471
  ...this.headers && { ...this.headers() },
4436
4472
  ...e
4437
4473
  };
4438
4474
  }
4439
4475
  async request(e, t) {
4440
- let n = i(this.davPath, v(e), { leadingSlash: !0 }), r = {
4476
+ let n = i(this.davPath, y(e), { leadingSlash: !0 }), r = {
4441
4477
  ...t,
4442
4478
  url: n,
4443
4479
  headers: this.buildHeaders(t.headers || {})
4444
4480
  };
4445
4481
  try {
4446
4482
  let e = await this.client.customRequest("", r), t;
4447
- return e.status === 207 && (t = await wi(await e.text())), {
4483
+ return e.status === 207 && (t = await Di(await e.text())), {
4448
4484
  body: t,
4449
4485
  status: e.status,
4450
4486
  result: e
4451
4487
  };
4452
4488
  } catch (e) {
4453
- let { response: t } = e, n = Ti(await t.text());
4454
- throw new b(n.message, n.errorCode, t, t.status);
4489
+ let { response: t } = e, n = Oi(await t.text());
4490
+ throw new x(n.message, n.errorCode, t, t.status);
4455
4491
  }
4456
4492
  }
4457
- }, Di = (e, t) => ({ async listFileVersions(t, n = {}) {
4493
+ }, Ai = (e, t) => ({ async listFileVersions(t, n = {}) {
4458
4494
  let [r, ...a] = await e.propfind(i("meta", t, "v", { leadingSlash: !0 }), n);
4459
- return a.map((t) => l(t, e.extraProps));
4460
- } }), Oi = (e, t) => ({ setFavorite(t, { path: n }, r, a = {}) {
4461
- let o = { [s.IsFavorite]: r ? "true" : "false" };
4495
+ return a.map((t) => c(t, e.extraProps));
4496
+ } }), ji = (e, t) => ({ setFavorite(t, { path: n }, r, a = {}) {
4497
+ let o = { [p.IsFavorite]: r ? "true" : "false" };
4462
4498
  return e.propPatch(i(t.webDavPath, n), o, a);
4463
- } }), ki = (e, t) => {
4499
+ } }), Mi = (e, t) => ({ setProperties(t, { path: n }, r, a = {}) {
4500
+ return e.propPatch(i(t.webDavPath, n), r, a);
4501
+ } }), Ni = (e, t) => {
4464
4502
  let r = n.create();
4465
4503
  t && r.interceptors.request.use((e) => (Object.assign(e.headers, t()), e));
4466
4504
  let i = {
4467
4505
  axiosClient: r,
4468
4506
  baseUrl: e,
4469
4507
  headers: t
4470
- }, a = new Ei({
4508
+ }, a = new ki({
4471
4509
  baseUrl: e,
4472
4510
  headers: t
4473
4511
  }), o = (e) => {
4474
4512
  a.extraProps.push(e);
4475
- }, s = je(a, i), { getPathForFileId: c } = s, l = Ce(a, s, i), { listFiles: u } = l, d = be(l, i), { getFileInfo: f } = d, { createFolder: p } = ve(a, d, i), m = ye(a, i), { getFileContents: h } = m, { putFileContents: g } = Te(a, d, i), { getFileUrl: _, revokeUrl: v } = xe(a, m, d, i), { getPublicFileUrl: y } = Se(a, i), { copyFiles: b } = _e(a, i), { moveFiles: x } = we(a, i), { deleteFile: S } = Ee(a, i), { restoreFile: C } = De(a, i), { listFileVersions: ee } = Di(a, i), { restoreFileVersion: te } = Oe(a, i), { clearTrashBin: ne } = ke(a, i), { search: re } = Ae(a, i), { setFavorite: ie } = Oi(a, i);
4513
+ }, s = Me(a, i), { getPathForFileId: c } = s, l = we(a, s, i), { listFiles: u } = l, d = xe(l, i), { getFileInfo: f } = d, { createFolder: p } = ye(a, d, i), m = be(a, i), { getFileContents: h } = m, { putFileContents: g } = Ee(a, d, i), { getFileUrl: _, revokeUrl: v } = Se(a, m, d, i), { getPublicFileUrl: y } = Ce(a, i), { copyFiles: b } = ve(a, i), { moveFiles: x } = Te(a, i), { deleteFile: S } = De(a, i), { restoreFile: C } = Oe(a, i), { listFileVersions: ee } = Ai(a, i), { restoreFileVersion: w } = ke(a, i), { clearTrashBin: te } = Ae(a, i), { search: ne } = je(a, i), { setFavorite: re } = ji(a, i), { setProperties: T } = Mi(a, i);
4476
4514
  return {
4477
4515
  copyFiles: b,
4478
4516
  createFolder: p,
4479
4517
  deleteFile: S,
4480
4518
  restoreFile: C,
4481
- restoreFileVersion: te,
4519
+ restoreFileVersion: w,
4482
4520
  getFileContents: h,
4483
4521
  getFileInfo: f,
4484
4522
  getFileUrl: _,
@@ -4489,11 +4527,12 @@ var bi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4489
4527
  moveFiles: x,
4490
4528
  putFileContents: g,
4491
4529
  revokeUrl: v,
4492
- clearTrashBin: ne,
4493
- search: re,
4494
- setFavorite: ie,
4530
+ clearTrashBin: te,
4531
+ search: ne,
4532
+ setFavorite: re,
4533
+ setProperties: T,
4495
4534
  registerExtraProp: o
4496
4535
  };
4497
4536
  };
4498
4537
  //#endregion
4499
- export { v as i, b as n, y as r, ki as t };
4538
+ export { y as i, x as n, b as r, Ni as t };