@opencloud-eu/web-client 6.0.0 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/axios-Drchb9eh.js +1646 -0
  2. package/dist/dist-tjee3PVd.js +809 -0
  3. package/dist/generated-B6vcMOfs.js +3317 -0
  4. package/dist/graph-DcYhPBws.js +372 -0
  5. package/dist/helpers-B0hzJ78Q.js +1463 -0
  6. package/dist/ocs-2K0ogAXF.js +1658 -0
  7. package/dist/src/graph/activities/activities.d.ts +2 -2
  8. package/dist/src/graph/activities/types.d.ts +2 -2
  9. package/dist/src/graph/applications/applications.d.ts +2 -2
  10. package/dist/src/graph/applications/types.d.ts +2 -2
  11. package/dist/src/graph/driveItems/driveItems.d.ts +2 -2
  12. package/dist/src/graph/driveItems/types.d.ts +3 -1
  13. package/dist/src/graph/drives/drives.d.ts +2 -2
  14. package/dist/src/graph/drives/types.d.ts +4 -3
  15. package/dist/src/graph/generated/api.d.ts +394 -1720
  16. package/dist/src/graph/generated/base.d.ts +11 -24
  17. package/dist/src/graph/generated/common.d.ts +15 -35
  18. package/dist/src/graph/generated/configuration.d.ts +24 -17
  19. package/dist/src/graph/generated/index.d.ts +2 -2
  20. package/dist/src/graph/groups/groups.d.ts +2 -2
  21. package/dist/src/graph/groups/types.d.ts +2 -2
  22. package/dist/src/graph/index.d.ts +2 -2
  23. package/dist/src/graph/permissions/permissions.d.ts +2 -2
  24. package/dist/src/graph/permissions/types.d.ts +2 -2
  25. package/dist/src/graph/photos/photo.d.ts +2 -2
  26. package/dist/src/graph/photos/types.d.ts +1 -1
  27. package/dist/src/graph/tags/tags.d.ts +2 -2
  28. package/dist/src/graph/tags/types.d.ts +2 -2
  29. package/dist/src/graph/types.d.ts +2 -2
  30. package/dist/src/graph/users/types.d.ts +2 -2
  31. package/dist/src/graph/users/users.d.ts +2 -2
  32. package/dist/src/helpers/space/functions.d.ts +1 -1
  33. package/dist/src/webdav/clearTrashBin.d.ts +1 -1
  34. package/dist/src/webdav/copyFiles.d.ts +1 -1
  35. package/dist/src/webdav/deleteFile.d.ts +1 -1
  36. package/dist/src/webdav/listFileVersions.d.ts +1 -1
  37. package/dist/src/webdav/moveFiles.d.ts +1 -1
  38. package/dist/src/webdav/putFileContents.d.ts +1 -1
  39. package/dist/src/webdav/restoreFile.d.ts +1 -1
  40. package/dist/src/webdav/restoreFileVersion.d.ts +1 -1
  41. package/dist/src/webdav/setFavorite.d.ts +1 -1
  42. package/dist/src/webdav/types.d.ts +0 -2
  43. package/dist/toString-tGn_k7yU.js +287 -0
  44. package/dist/web-client/graph/generated.js +2 -5757
  45. package/dist/web-client/graph.js +2 -5
  46. package/dist/web-client/ocs.js +2 -5
  47. package/dist/web-client/sse.js +195 -201
  48. package/dist/web-client/webdav.js +3 -10
  49. package/dist/web-client.js +6 -82
  50. package/dist/webdav-CcBUJk4K.js +4423 -0
  51. package/package.json +8 -14
  52. package/dist/functions-BBKWOL6l.js +0 -1189
  53. package/dist/functions-VxhUeT1u.cjs +0 -1
  54. package/dist/index-BYnmk_Nt.cjs +0 -13
  55. package/dist/index-Bf956okn.js +0 -3874
  56. package/dist/index-Bjx4f50a.js +0 -1999
  57. package/dist/index-C32gBO3b.cjs +0 -6
  58. package/dist/index-D0bnLDAA.cjs +0 -1
  59. package/dist/index-Di51ZQKD.cjs +0 -4
  60. package/dist/index-Dn8UfKx7.js +0 -1520
  61. package/dist/index-Sp7XASDj.js +0 -688
  62. package/dist/index-_S-l3FmE.cjs +0 -1
  63. package/dist/index-cttW6Cve.js +0 -1018
  64. package/dist/src/webdav/listFavoriteFiles.d.ts +0 -12
  65. package/dist/toString-CKeGA2IK.js +0 -255
  66. package/dist/toString-DsGM1XcL.cjs +0 -1
  67. package/dist/vite.config.d.ts +0 -2
  68. package/dist/web-client/graph/generated.cjs +0 -1
  69. package/dist/web-client/graph.cjs +0 -1
  70. package/dist/web-client/ocs.cjs +0 -1
  71. package/dist/web-client/sse.cjs +0 -2
  72. package/dist/web-client/webdav.cjs +0 -1
  73. package/dist/web-client.cjs +0 -1
@@ -0,0 +1,4423 @@
1
+ import { n as e, r as t, t as n } from "./axios-Drchb9eh.js";
2
+ import { n as r } from "./dist-tjee3PVd.js";
3
+ import { u as i } from "./toString-tGn_k7yU.js";
4
+ import { E as a, K as o, N as s, P as c, Q as l, W as u, Z as d, _ as f, f as p, q as m } from "./helpers-B0hzJ78Q.js";
5
+ import { i as h, n as g, r as _, t as v } from "./ocs-2K0ogAXF.js";
6
+ //#region src/utils/encodePath.ts
7
+ var y = (e) => encodeURIComponent(e).split("%2F").join("/"), b = "\n";
8
+ function x(e, t) {
9
+ let n = "";
10
+ t.format && t.indentBy.length > 0 && (n = b);
11
+ let r = [];
12
+ if (t.stopNodes && Array.isArray(t.stopNodes)) for (let e = 0; e < t.stopNodes.length; e++) {
13
+ let n = t.stopNodes[e];
14
+ typeof n == "string" ? r.push(new h(n)) : n instanceof h && r.push(n);
15
+ }
16
+ let i = new _();
17
+ return S(e, t, n, i, r);
18
+ }
19
+ function S(e, t, n, r, i) {
20
+ let a = "", o = !1;
21
+ if (t.maxNestedTags && r.getDepth() > t.maxNestedTags) throw Error("Maximum nested tags exceeded");
22
+ if (!Array.isArray(e)) {
23
+ if (e != null) {
24
+ let n = e.toString();
25
+ return n = C(n, t), n;
26
+ }
27
+ return "";
28
+ }
29
+ for (let s = 0; s < e.length; s++) {
30
+ let c = e[s], l = re(c);
31
+ if (l === void 0) continue;
32
+ let u = ee(c[":@"], t);
33
+ r.push(l, u);
34
+ let d = ae(r, i);
35
+ if (l === t.textNodeName) {
36
+ let e = c[l];
37
+ d || (e = t.tagValueProcessor(l, e), e = C(e, t)), o && (a += n), a += e, o = !1, r.pop();
38
+ continue;
39
+ } else if (l === t.cdataPropName) {
40
+ o && (a += n), a += `<![CDATA[${c[l][0][t.textNodeName]}]]>`, o = !1, r.pop();
41
+ continue;
42
+ } else if (l === t.commentPropName) {
43
+ a += n + `<!--${c[l][0][t.textNodeName]}-->`, o = !0, r.pop();
44
+ continue;
45
+ } else if (l[0] === "?") {
46
+ let e = ie(c[":@"], t, d), i = l === "?xml" ? "" : n, s = c[l][0][t.textNodeName];
47
+ s = s.length === 0 ? "" : " " + s, a += i + `<${l}${s}${e}?>`, o = !0, r.pop();
48
+ continue;
49
+ }
50
+ let f = n;
51
+ f !== "" && (f += t.indentBy);
52
+ let p = n + `<${l}${ie(c[":@"], t, d)}`, m;
53
+ m = d ? te(c[l], t) : S(c[l], t, f, r, i), t.unpairedTags.indexOf(l) === -1 ? (!m || m.length === 0) && t.suppressEmptyNode ? a += p + "/>" : m && m.endsWith(">") ? a += p + `>${m}${n}</${l}>` : (a += p + ">", m && n !== "" && (m.includes("/>") || m.includes("</")) ? a += n + t.indentBy + m + n : a += m, a += `</${l}>`) : t.suppressUnpairedNode ? a += p + ">" : a += p + "/>", o = !0, r.pop();
54
+ }
55
+ return a;
56
+ }
57
+ function ee(e, t) {
58
+ if (!e || t.ignoreAttributes) return null;
59
+ let n = {}, r = !1;
60
+ for (let i in e) {
61
+ if (!Object.prototype.hasOwnProperty.call(e, i)) continue;
62
+ let a = i.startsWith(t.attributeNamePrefix) ? i.substr(t.attributeNamePrefix.length) : i;
63
+ n[a] = e[i], r = !0;
64
+ }
65
+ return r ? n : null;
66
+ }
67
+ function te(e, t) {
68
+ if (!Array.isArray(e)) return e == null ? "" : e.toString();
69
+ let n = "";
70
+ for (let r = 0; r < e.length; r++) {
71
+ let i = e[r], a = re(i);
72
+ if (a === t.textNodeName) n += i[a];
73
+ else if (a === t.cdataPropName) n += i[a][0][t.textNodeName];
74
+ else if (a === t.commentPropName) n += i[a][0][t.textNodeName];
75
+ else if (a && a[0] === "?") continue;
76
+ else if (a) {
77
+ let e = ne(i[":@"], t), r = te(i[a], t);
78
+ !r || r.length === 0 ? n += `<${a}${e}/>` : n += `<${a}${e}>${r}</${a}>`;
79
+ }
80
+ }
81
+ return n;
82
+ }
83
+ function ne(e, t) {
84
+ let n = "";
85
+ if (e && !t.ignoreAttributes) for (let r in e) {
86
+ if (!Object.prototype.hasOwnProperty.call(e, r)) continue;
87
+ let i = e[r];
88
+ i === !0 && t.suppressBooleanAttributes ? n += ` ${r.substr(t.attributeNamePrefix.length)}` : n += ` ${r.substr(t.attributeNamePrefix.length)}="${i}"`;
89
+ }
90
+ return n;
91
+ }
92
+ function re(e) {
93
+ let t = Object.keys(e);
94
+ for (let n = 0; n < t.length; n++) {
95
+ let r = t[n];
96
+ if (Object.prototype.hasOwnProperty.call(e, r) && r !== ":@") return r;
97
+ }
98
+ }
99
+ function ie(e, t, n) {
100
+ let r = "";
101
+ if (e && !t.ignoreAttributes) for (let i in e) {
102
+ if (!Object.prototype.hasOwnProperty.call(e, i)) continue;
103
+ let a;
104
+ n ? a = e[i] : (a = t.attributeValueProcessor(i, e[i]), a = C(a, t)), a === !0 && t.suppressBooleanAttributes ? r += ` ${i.substr(t.attributeNamePrefix.length)}` : r += ` ${i.substr(t.attributeNamePrefix.length)}="${a}"`;
105
+ }
106
+ return r;
107
+ }
108
+ function ae(e, t) {
109
+ if (!t || t.length === 0) return !1;
110
+ for (let n = 0; n < t.length; n++) if (e.matches(t[n])) return !0;
111
+ return !1;
112
+ }
113
+ function C(e, t) {
114
+ if (e && e.length > 0 && t.processEntities) for (let n = 0; n < t.entities.length; n++) {
115
+ let r = t.entities[n];
116
+ e = e.replace(r.regex, r.val);
117
+ }
118
+ return e;
119
+ }
120
+ //#endregion
121
+ //#region ../../node_modules/.pnpm/fast-xml-builder@1.1.4/node_modules/fast-xml-builder/src/ignoreAttributes.js
122
+ function w(e) {
123
+ return typeof e == "function" ? e : Array.isArray(e) ? (t) => {
124
+ for (let n of e) if (typeof n == "string" && t === n || n instanceof RegExp && n.test(t)) return !0;
125
+ } : () => !1;
126
+ }
127
+ //#endregion
128
+ //#region ../../node_modules/.pnpm/fast-xml-builder@1.1.4/node_modules/fast-xml-builder/src/fxb.js
129
+ var oe = {
130
+ attributeNamePrefix: "@_",
131
+ attributesGroupName: !1,
132
+ textNodeName: "#text",
133
+ ignoreAttributes: !0,
134
+ cdataPropName: !1,
135
+ format: !1,
136
+ indentBy: " ",
137
+ suppressEmptyNode: !1,
138
+ suppressUnpairedNode: !0,
139
+ suppressBooleanAttributes: !0,
140
+ tagValueProcessor: function(e, t) {
141
+ return t;
142
+ },
143
+ attributeValueProcessor: function(e, t) {
144
+ return t;
145
+ },
146
+ preserveOrder: !1,
147
+ commentPropName: !1,
148
+ unpairedTags: [],
149
+ entities: [
150
+ {
151
+ regex: /* @__PURE__ */ RegExp("&", "g"),
152
+ val: "&amp;"
153
+ },
154
+ {
155
+ regex: /* @__PURE__ */ RegExp(">", "g"),
156
+ val: "&gt;"
157
+ },
158
+ {
159
+ regex: /* @__PURE__ */ RegExp("<", "g"),
160
+ val: "&lt;"
161
+ },
162
+ {
163
+ regex: /* @__PURE__ */ RegExp("'", "g"),
164
+ val: "&apos;"
165
+ },
166
+ {
167
+ regex: /* @__PURE__ */ RegExp("\"", "g"),
168
+ val: "&quot;"
169
+ }
170
+ ],
171
+ processEntities: !0,
172
+ stopNodes: [],
173
+ oneListGroup: !1,
174
+ maxNestedTags: 100,
175
+ jPath: !0
176
+ };
177
+ function T(e) {
178
+ if (this.options = Object.assign({}, oe, 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++) {
179
+ let t = this.options.stopNodes[e];
180
+ typeof t == "string" ? this.stopNodeExpressions.push(new h(t)) : t instanceof h && this.stopNodeExpressions.push(t);
181
+ }
182
+ this.options.ignoreAttributes === !0 || this.options.attributesGroupName ? this.isAttribute = function() {
183
+ return !1;
184
+ } : (this.ignoreAttributesFn = w(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = ce), this.processTextOrObjNode = E, this.options.format ? (this.indentate = se, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
185
+ return "";
186
+ }, this.tagEndChar = ">", this.newLine = "");
187
+ }
188
+ T.prototype.build = function(e) {
189
+ if (this.options.preserveOrder) return x(e, this.options);
190
+ {
191
+ Array.isArray(e) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (e = { [this.options.arrayNodeName]: e });
192
+ let t = new _();
193
+ return this.j2x(e, 0, t).val;
194
+ }
195
+ }, T.prototype.j2x = function(e, t, n) {
196
+ let r = "", i = "";
197
+ if (this.options.maxNestedTags && n.getDepth() >= this.options.maxNestedTags) throw Error("Maximum nested tags exceeded");
198
+ let a = this.options.jPath ? n.toString() : n, o = this.checkStopNode(n);
199
+ for (let s in e) if (Object.prototype.hasOwnProperty.call(e, s)) if (e[s] === void 0) this.isAttribute(s) && (i += "");
200
+ else if (e[s] === null) this.isAttribute(s) || s === this.options.cdataPropName ? i += "" : s[0] === "?" ? i += this.indentate(t) + "<" + s + "?" + this.tagEndChar : i += this.indentate(t) + "<" + s + "/" + this.tagEndChar;
201
+ else if (e[s] instanceof Date) i += this.buildTextValNode(e[s], s, "", t, n);
202
+ else if (typeof e[s] != "object") {
203
+ let c = this.isAttribute(s);
204
+ if (c && !this.ignoreAttributesFn(c, a)) r += this.buildAttrPairStr(c, "" + e[s], o);
205
+ else if (!c) if (s === this.options.textNodeName) {
206
+ let t = this.options.tagValueProcessor(s, "" + e[s]);
207
+ i += this.replaceEntitiesValue(t);
208
+ } else {
209
+ n.push(s);
210
+ let r = this.checkStopNode(n);
211
+ if (n.pop(), r) {
212
+ let n = "" + e[s];
213
+ n === "" ? i += this.indentate(t) + "<" + s + this.closeTag(s) + this.tagEndChar : i += this.indentate(t) + "<" + s + ">" + n + "</" + s + this.tagEndChar;
214
+ } else i += this.buildTextValNode(e[s], s, "", t, n);
215
+ }
216
+ } else if (Array.isArray(e[s])) {
217
+ let r = e[s].length, a = "", o = "";
218
+ for (let c = 0; c < r; c++) {
219
+ let r = e[s][c];
220
+ if (r !== void 0) if (r === null) s[0] === "?" ? i += this.indentate(t) + "<" + s + "?" + this.tagEndChar : i += this.indentate(t) + "<" + s + "/" + this.tagEndChar;
221
+ else if (typeof r == "object") if (this.options.oneListGroup) {
222
+ n.push(s);
223
+ let e = this.j2x(r, t + 1, n);
224
+ n.pop(), a += e.val, this.options.attributesGroupName && r.hasOwnProperty(this.options.attributesGroupName) && (o += e.attrStr);
225
+ } else a += this.processTextOrObjNode(r, s, t, n);
226
+ else if (this.options.oneListGroup) {
227
+ let e = this.options.tagValueProcessor(s, r);
228
+ e = this.replaceEntitiesValue(e), a += e;
229
+ } else {
230
+ n.push(s);
231
+ let e = this.checkStopNode(n);
232
+ if (n.pop(), e) {
233
+ let e = "" + r;
234
+ e === "" ? a += this.indentate(t) + "<" + s + this.closeTag(s) + this.tagEndChar : a += this.indentate(t) + "<" + s + ">" + e + "</" + s + this.tagEndChar;
235
+ } else a += this.buildTextValNode(r, s, "", t, n);
236
+ }
237
+ }
238
+ this.options.oneListGroup && (a = this.buildObjectNode(a, s, o, t)), i += a;
239
+ } else if (this.options.attributesGroupName && s === this.options.attributesGroupName) {
240
+ let t = Object.keys(e[s]), n = t.length;
241
+ for (let i = 0; i < n; i++) r += this.buildAttrPairStr(t[i], "" + e[s][t[i]], o);
242
+ } else i += this.processTextOrObjNode(e[s], s, t, n);
243
+ return {
244
+ attrStr: r,
245
+ val: i
246
+ };
247
+ }, T.prototype.buildAttrPairStr = function(e, t, n) {
248
+ return n || (t = this.options.attributeValueProcessor(e, "" + t), t = this.replaceEntitiesValue(t)), this.options.suppressBooleanAttributes && t === "true" ? " " + e : " " + e + "=\"" + t + "\"";
249
+ };
250
+ function E(e, t, n, r) {
251
+ let i = this.extractAttributes(e);
252
+ if (r.push(t, i), this.checkStopNode(r)) {
253
+ let i = this.buildRawContent(e), a = this.buildAttributesForStopNode(e);
254
+ return r.pop(), this.buildObjectNode(i, t, a, n);
255
+ }
256
+ let a = this.j2x(e, n + 1, r);
257
+ return r.pop(), e[this.options.textNodeName] !== void 0 && Object.keys(e).length === 1 ? this.buildTextValNode(e[this.options.textNodeName], t, a.attrStr, n, r) : this.buildObjectNode(a.val, t, a.attrStr, n);
258
+ }
259
+ T.prototype.extractAttributes = function(e) {
260
+ if (!e || typeof e != "object") return null;
261
+ let t = {}, n = !1;
262
+ if (this.options.attributesGroupName && e[this.options.attributesGroupName]) {
263
+ let r = e[this.options.attributesGroupName];
264
+ for (let e in r) {
265
+ if (!Object.prototype.hasOwnProperty.call(r, e)) continue;
266
+ let i = e.startsWith(this.options.attributeNamePrefix) ? e.substring(this.options.attributeNamePrefix.length) : e;
267
+ t[i] = r[e], n = !0;
268
+ }
269
+ } else for (let r in e) {
270
+ if (!Object.prototype.hasOwnProperty.call(e, r)) continue;
271
+ let i = this.isAttribute(r);
272
+ i && (t[i] = e[r], n = !0);
273
+ }
274
+ return n ? t : null;
275
+ }, T.prototype.buildRawContent = function(e) {
276
+ if (typeof e == "string") return e;
277
+ if (typeof e != "object" || !e) return String(e);
278
+ if (e[this.options.textNodeName] !== void 0) return e[this.options.textNodeName];
279
+ let t = "";
280
+ for (let n in e) {
281
+ if (!Object.prototype.hasOwnProperty.call(e, n) || this.isAttribute(n) || this.options.attributesGroupName && n === this.options.attributesGroupName) continue;
282
+ let r = e[n];
283
+ if (n === this.options.textNodeName) t += r;
284
+ else if (Array.isArray(r)) {
285
+ for (let e of r) if (typeof e == "string" || typeof e == "number") t += `<${n}>${e}</${n}>`;
286
+ else if (typeof e == "object" && e) {
287
+ let r = this.buildRawContent(e), i = this.buildAttributesForStopNode(e);
288
+ r === "" ? t += `<${n}${i}/>` : t += `<${n}${i}>${r}</${n}>`;
289
+ }
290
+ } else if (typeof r == "object" && r) {
291
+ let e = this.buildRawContent(r), i = this.buildAttributesForStopNode(r);
292
+ e === "" ? t += `<${n}${i}/>` : t += `<${n}${i}>${e}</${n}>`;
293
+ } else t += `<${n}>${r}</${n}>`;
294
+ }
295
+ return t;
296
+ }, T.prototype.buildAttributesForStopNode = function(e) {
297
+ if (!e || typeof e != "object") return "";
298
+ let t = "";
299
+ if (this.options.attributesGroupName && e[this.options.attributesGroupName]) {
300
+ let n = e[this.options.attributesGroupName];
301
+ for (let e in n) {
302
+ if (!Object.prototype.hasOwnProperty.call(n, e)) continue;
303
+ let r = e.startsWith(this.options.attributeNamePrefix) ? e.substring(this.options.attributeNamePrefix.length) : e, i = n[e];
304
+ i === !0 && this.options.suppressBooleanAttributes ? t += " " + r : t += " " + r + "=\"" + i + "\"";
305
+ }
306
+ } else for (let n in e) {
307
+ if (!Object.prototype.hasOwnProperty.call(e, n)) continue;
308
+ let r = this.isAttribute(n);
309
+ if (r) {
310
+ let i = e[n];
311
+ i === !0 && this.options.suppressBooleanAttributes ? t += " " + r : t += " " + r + "=\"" + i + "\"";
312
+ }
313
+ }
314
+ return t;
315
+ }, T.prototype.buildObjectNode = function(e, t, n, r) {
316
+ if (e === "") return t[0] === "?" ? this.indentate(r) + "<" + t + n + "?" + this.tagEndChar : this.indentate(r) + "<" + t + n + this.closeTag(t) + this.tagEndChar;
317
+ {
318
+ let i = "</" + t + this.tagEndChar, a = "";
319
+ 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) + `<!--${e}-->` + this.newLine : this.indentate(r) + "<" + t + n + a + this.tagEndChar + e + this.indentate(r) + i;
320
+ }
321
+ }, T.prototype.closeTag = function(e) {
322
+ let t = "";
323
+ return this.options.unpairedTags.indexOf(e) === -1 ? t = this.options.suppressEmptyNode ? "/" : `></${e}` : this.options.suppressUnpairedNode || (t = "/"), t;
324
+ }, T.prototype.checkStopNode = function(e) {
325
+ if (!this.stopNodeExpressions || this.stopNodeExpressions.length === 0) return !1;
326
+ for (let t = 0; t < this.stopNodeExpressions.length; t++) if (e.matches(this.stopNodeExpressions[t])) return !0;
327
+ return !1;
328
+ }, T.prototype.buildTextValNode = function(e, t, n, r, i) {
329
+ if (this.options.cdataPropName !== !1 && t === this.options.cdataPropName) return this.indentate(r) + `<![CDATA[${e}]]>` + this.newLine;
330
+ if (this.options.commentPropName !== !1 && t === this.options.commentPropName) return this.indentate(r) + `<!--${e}-->` + this.newLine;
331
+ if (t[0] === "?") return this.indentate(r) + "<" + t + n + "?" + this.tagEndChar;
332
+ {
333
+ let i = this.options.tagValueProcessor(t, e);
334
+ 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;
335
+ }
336
+ }, T.prototype.replaceEntitiesValue = function(e) {
337
+ if (e && e.length > 0 && this.options.processEntities) for (let t = 0; t < this.options.entities.length; t++) {
338
+ let n = this.options.entities[t];
339
+ e = e.replace(n.regex, n.val);
340
+ }
341
+ return e;
342
+ };
343
+ function se(e) {
344
+ return this.options.indentBy.repeat(e);
345
+ }
346
+ function ce(e) {
347
+ return e.startsWith(this.options.attributeNamePrefix) && e !== this.options.textNodeName ? e.substr(this.attrPrefixLen) : !1;
348
+ }
349
+ //#endregion
350
+ //#region ../../node_modules/.pnpm/fast-xml-parser@5.5.9/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js
351
+ var le = T, D = (e, { fileId: t, path: n, name: r }) => {
352
+ if (n !== void 0) return i(e.webDavPath, n);
353
+ if (t !== void 0) {
354
+ if (a(e)) throw Error("public spaces need a path provided");
355
+ return i("spaces", t, r || "");
356
+ }
357
+ return e.webDavPath;
358
+ }, ue = (e, t) => ({ copyFiles(t, { path: n, fileId: r }, i, { path: a, parentFolderId: o, name: s }, { overwrite: c, ...l } = {}) {
359
+ let u = D(t, {
360
+ fileId: r,
361
+ path: n
362
+ }), d = D(i, {
363
+ fileId: o,
364
+ path: a,
365
+ name: s
366
+ });
367
+ return e.copy(u, d, {
368
+ overwrite: c || !1,
369
+ ...l
370
+ });
371
+ } }), de = (e, t, n) => ({ async createFolder(n, { path: r, parentFolderId: i, folderName: a, fetchFolder: o = !0, ...s }) {
372
+ let c = D(n, {
373
+ fileId: i,
374
+ path: r,
375
+ name: a
376
+ });
377
+ if (await e.mkcol(c), o) return t.getFileInfo(n, { path: r }, s);
378
+ } }), fe = (e, { axiosClient: t }) => ({ async getFileContents(n, { fileId: r, path: i }, { responseType: a = "text", noCache: o = !0, headers: s, ...c } = {}) {
379
+ try {
380
+ let l = D(n, {
381
+ fileId: r,
382
+ path: i
383
+ }), u = await t.get(e.getFileUrl(l), {
384
+ responseType: a,
385
+ headers: {
386
+ ...o && { "Cache-Control": "no-cache" },
387
+ ...s || {}
388
+ },
389
+ ...c
390
+ });
391
+ return {
392
+ response: u,
393
+ body: u.data,
394
+ headers: {
395
+ ETag: u.headers.etag,
396
+ "OC-ETag": u.headers["oc-etag"],
397
+ "OC-FileId": u.headers["oc-fileid"]
398
+ }
399
+ };
400
+ } catch (e) {
401
+ let { message: t, response: n } = e;
402
+ throw new l(t, n, n.status);
403
+ }
404
+ } }), pe = (e, t) => ({ async getFileInfo(t, n, r) {
405
+ return (await e.listFiles(t, n, {
406
+ depth: 0,
407
+ ...r
408
+ })).resource;
409
+ } }), me = (e, t, n, { axiosClient: r, baseUrl: a }) => ({
410
+ async getFileUrl(o, s, { disposition: c = "attachment", version: l = null, username: u = "", ...d }) {
411
+ if (c === "inline") {
412
+ let e = await t.getFileContents(o, s, {
413
+ responseType: "blob",
414
+ ...d
415
+ });
416
+ return URL.createObjectURL(e.body);
417
+ }
418
+ if (l) {
419
+ if (!u) throw Error("username is required for URL signing");
420
+ let t = e.getFileUrl(i("meta", s.fileId, "v", l));
421
+ return await v(a, r).signUrl(t, u);
422
+ }
423
+ if (s.downloadURL) return s.downloadURL;
424
+ let { downloadURL: f } = await n.getFileInfo(o, s, { davProperties: [m.DownloadURL] });
425
+ return f;
426
+ },
427
+ revokeUrl: (e) => {
428
+ e && e.startsWith("blob:") && URL.revokeObjectURL(e);
429
+ }
430
+ }), he = (e, t) => ({ getPublicFileUrl(t, n) {
431
+ return e.getFileUrl(i("public-files", n));
432
+ } }), ge = (e, t, n) => ({ async listFiles(n, { path: r, fileId: l } = {}, { depth: u = 1, davProperties: d, isTrash: h = !1, ...g } = {}) {
433
+ let _;
434
+ if (a(n)) {
435
+ _ = await e.propfind(i(n.webDavPath, r), {
436
+ depth: u,
437
+ properties: d || o.PublicLink,
438
+ ...g
439
+ }), _.forEach((e) => {
440
+ e.filename = e.filename.split("/").slice(1).join("/");
441
+ }), _.length === 1 && (_[0].filename = i(n.id, r, { leadingSlash: !0 })), _.forEach((e) => {
442
+ e.filename = e.filename.split("/").slice(2).join("/");
443
+ });
444
+ let t = n.driveAlias.startsWith("ocm/") ? "ocm" : "public-link";
445
+ if ((!r || r === "/") && u > 0 && t === "ocm" && _[0].props[m.PublicLinkItemType] === "file" && (_ = [{
446
+ basename: n.fileId,
447
+ type: "directory",
448
+ filename: "",
449
+ props: {}
450
+ }, ..._]), !r) {
451
+ let [r, ...i] = _;
452
+ return {
453
+ resource: p({
454
+ ...r,
455
+ id: n.id,
456
+ driveAlias: n.driveAlias,
457
+ webDavPath: n.webDavPath,
458
+ publicLinkType: t
459
+ }),
460
+ children: i.map((t) => c(t, e.extraProps))
461
+ };
462
+ }
463
+ let a = _.map((t) => c(t, e.extraProps));
464
+ return {
465
+ resource: a[0],
466
+ children: a.slice(1)
467
+ };
468
+ }
469
+ let v = async () => {
470
+ let e = await t.getPathForFileId(l);
471
+ return this.listFiles(n, { path: e }, {
472
+ depth: u,
473
+ davProperties: d
474
+ });
475
+ };
476
+ try {
477
+ let t = "";
478
+ if (t = h ? f(n.id) : D(n, {
479
+ fileId: l,
480
+ path: r
481
+ }), _ = await e.propfind(t, {
482
+ depth: u,
483
+ properties: d || o.Default,
484
+ ...g
485
+ }), h) return {
486
+ resource: c(_[0], e.extraProps),
487
+ children: _.slice(1).map(s)
488
+ };
489
+ let i = _.map((t) => c(t, e.extraProps)), a = l === n.id;
490
+ return l && !a && i[0].fileId && l !== i[0].fileId ? v() : {
491
+ resource: i[0],
492
+ children: i.slice(1)
493
+ };
494
+ } catch (e) {
495
+ if (e.statusCode === 404 && l) return v();
496
+ throw e;
497
+ }
498
+ } }), _e = (e, t) => ({ moveFiles(t, { path: n, fileId: r }, i, { path: a, parentFolderId: o, name: s }, { overwrite: c, ...l } = {}) {
499
+ let u = D(t, {
500
+ fileId: r,
501
+ path: n
502
+ }), d = D(i, {
503
+ fileId: o,
504
+ path: a,
505
+ name: s
506
+ });
507
+ return e.move(u, d, {
508
+ overwrite: c || !1,
509
+ ...l
510
+ });
511
+ } }), ve = (e, t, n) => ({ async putFileContents(n, { fileName: r, path: i, parentFolderId: a, content: o = "", previousEntityTag: s = "", overwrite: c, onUploadProgress: l = null, ...u }) {
512
+ let d = D(n, {
513
+ fileId: a,
514
+ name: r,
515
+ path: i
516
+ }), { result: f } = await e.put(d, o, {
517
+ previousEntityTag: s,
518
+ overwrite: c,
519
+ onUploadProgress: l,
520
+ ...u
521
+ });
522
+ return t.getFileInfo(n, {
523
+ fileId: f.headers.get("Oc-Fileid"),
524
+ path: i
525
+ });
526
+ } }), ye = (e, t) => ({ deleteFile(t, { path: n, ...r }) {
527
+ return e.delete(i(t.webDavPath, n), r);
528
+ } }), be = (e, t) => ({ restoreFile(t, { id: n }, { path: r }, { overwrite: o, ...s } = {}) {
529
+ if (a(t)) return;
530
+ let c = i(t.webDavPath, r);
531
+ return e.move(i(t.webDavTrashPath, n), c, {
532
+ overwrite: o,
533
+ ...s
534
+ });
535
+ } }), xe = (e, t) => ({ restoreFileVersion(t, { parentFolderId: n, name: r, path: a }, o, s = {}) {
536
+ let c = D(t, {
537
+ path: a,
538
+ fileId: n,
539
+ name: r
540
+ }), l = i("meta", n, "v", o, { leadingSlash: !0 }), u = i("files", c, { leadingSlash: !0 });
541
+ return e.copy(l, u, s);
542
+ } }), Se = (e, t) => ({ clearTrashBin(t, { id: n, ...r } = {}) {
543
+ let a = f(t.id);
544
+ return n && (a = i(a, n)), e.delete(a, r);
545
+ } }), Ce = (e, t) => ({ async search(t, { davProperties: n = o.Default, searchLimit: r, ...i }) {
546
+ let { range: a, results: s } = await e.report("/spaces/", {
547
+ pattern: t,
548
+ limit: r,
549
+ properties: n,
550
+ ...i
551
+ });
552
+ return {
553
+ resources: s.map((t) => ({
554
+ ...c(t, e.extraProps),
555
+ highlights: t.props[m.Highlights] || ""
556
+ })),
557
+ totalResults: a ? parseInt(a?.split("/")[1]) : null
558
+ };
559
+ } }), we = (e, t) => ({ async getPathForFileId(t, n = {}) {
560
+ return (await e.propfind(i("meta", t, { leadingSlash: !0 }), {
561
+ properties: [m.MetaPathForUser],
562
+ ...n
563
+ }))[0].props[m.MetaPathForUser];
564
+ } });
565
+ //#endregion
566
+ //#region ../../node_modules/.pnpm/webdav@5.9.0/node_modules/webdav/dist/web/index.js
567
+ e();
568
+ var Te = {
569
+ 2: (e) => {
570
+ function t(e, t, i) {
571
+ e instanceof RegExp && (e = n(e, i)), t instanceof RegExp && (t = n(t, i));
572
+ var a = r(e, t, i);
573
+ return a && {
574
+ start: a[0],
575
+ end: a[1],
576
+ pre: i.slice(0, a[0]),
577
+ body: i.slice(a[0] + e.length, a[1]),
578
+ post: i.slice(a[1] + t.length)
579
+ };
580
+ }
581
+ function n(e, t) {
582
+ var n = t.match(e);
583
+ return n ? n[0] : null;
584
+ }
585
+ function r(e, t, n) {
586
+ var r, i, a, o, s, c = n.indexOf(e), l = n.indexOf(t, c + 1), u = c;
587
+ if (c >= 0 && l > 0) {
588
+ for (r = [], a = n.length; u >= 0 && !s;) u == c ? (r.push(u), c = n.indexOf(e, u + 1)) : r.length == 1 ? s = [r.pop(), l] : ((i = r.pop()) < a && (a = i, o = l), l = n.indexOf(t, u + 1)), u = c < l && c >= 0 ? c : l;
589
+ r.length && (s = [a, o]);
590
+ }
591
+ return s;
592
+ }
593
+ e.exports = t, t.range = r;
594
+ },
595
+ 47: (e, n, r) => {
596
+ var i = r(410), a = function(e) {
597
+ return typeof e == "string";
598
+ };
599
+ function o(e, t) {
600
+ for (var n = [], r = 0; r < e.length; r++) {
601
+ var i = e[r];
602
+ i && i !== "." && (i === ".." ? n.length && n[n.length - 1] !== ".." ? n.pop() : t && n.push("..") : n.push(i));
603
+ }
604
+ return n;
605
+ }
606
+ var s = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/, c = {};
607
+ function l(e) {
608
+ return s.exec(e).slice(1);
609
+ }
610
+ c.resolve = function() {
611
+ for (var e = "", n = !1, r = arguments.length - 1; r >= -1 && !n; r--) {
612
+ var i = r >= 0 ? arguments[r] : t.cwd();
613
+ if (!a(i)) throw TypeError("Arguments to path.resolve must be strings");
614
+ i && (e = i + "/" + e, n = i.charAt(0) === "/");
615
+ }
616
+ return (n ? "/" : "") + (e = o(e.split("/"), !n).join("/")) || ".";
617
+ }, c.normalize = function(e) {
618
+ var t = c.isAbsolute(e), n = e.substr(-1) === "/";
619
+ return (e = o(e.split("/"), !t).join("/")) || t || (e = "."), e && n && (e += "/"), (t ? "/" : "") + e;
620
+ }, c.isAbsolute = function(e) {
621
+ return e.charAt(0) === "/";
622
+ }, c.join = function() {
623
+ for (var e = "", t = 0; t < arguments.length; t++) {
624
+ var n = arguments[t];
625
+ if (!a(n)) throw TypeError("Arguments to path.join must be strings");
626
+ n && (e += e ? "/" + n : n);
627
+ }
628
+ return c.normalize(e);
629
+ }, c.relative = function(e, t) {
630
+ function n(e) {
631
+ for (var t = 0; t < e.length && e[t] === ""; t++);
632
+ for (var n = e.length - 1; n >= 0 && e[n] === ""; n--);
633
+ return t > n ? [] : e.slice(t, n + 1);
634
+ }
635
+ e = c.resolve(e).substr(1), t = c.resolve(t).substr(1);
636
+ for (var r = n(e.split("/")), i = n(t.split("/")), a = Math.min(r.length, i.length), o = a, s = 0; s < a; s++) if (r[s] !== i[s]) {
637
+ o = s;
638
+ break;
639
+ }
640
+ var l = [];
641
+ for (s = o; s < r.length; s++) l.push("..");
642
+ return (l = l.concat(i.slice(o))).join("/");
643
+ }, c._makeLong = function(e) {
644
+ return e;
645
+ }, c.dirname = function(e) {
646
+ var t = l(e), n = t[0], r = t[1];
647
+ return n || r ? (r &&= r.substr(0, r.length - 1), n + r) : ".";
648
+ }, c.basename = function(e, t) {
649
+ var n = l(e)[2];
650
+ return t && n.substr(-1 * t.length) === t && (n = n.substr(0, n.length - t.length)), n;
651
+ }, c.extname = function(e) {
652
+ return l(e)[3];
653
+ }, c.format = function(e) {
654
+ if (!i.isObject(e)) throw TypeError("Parameter 'pathObject' must be an object, not " + typeof e);
655
+ if (!a(e.root || "")) throw TypeError("'pathObject.root' must be a string or undefined, not " + typeof e.root);
656
+ return (e.dir ? e.dir + c.sep : "") + (e.base || "");
657
+ }, c.parse = function(e) {
658
+ if (!a(e)) throw TypeError("Parameter 'pathString' must be a string, not " + typeof e);
659
+ var t = l(e);
660
+ if (!t || t.length !== 4) throw TypeError("Invalid path '" + e + "'");
661
+ return t[1] = t[1] || "", t[2] = t[2] || "", t[3] = t[3] || "", {
662
+ root: t[0],
663
+ dir: t[0] + t[1].slice(0, t[1].length - 1),
664
+ base: t[2],
665
+ ext: t[3],
666
+ name: t[2].slice(0, t[2].length - t[3].length)
667
+ };
668
+ }, c.sep = "/", c.delimiter = ":", e.exports = c;
669
+ },
670
+ 101: function(e, t, n) {
671
+ var i;
672
+ e = n.nmd(e), function() {
673
+ var a = (e && e.exports, typeof r == "object" && r);
674
+ a.global !== a && a.window;
675
+ var o = function(e) {
676
+ this.message = e;
677
+ };
678
+ (o.prototype = /* @__PURE__ */ Error()).name = "InvalidCharacterError";
679
+ var s = function(e) {
680
+ throw new o(e);
681
+ }, c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", l = /[\t\n\f\r ]/g, u = {
682
+ encode: function(e) {
683
+ e = String(e), /[^\0-\xFF]/.test(e) && s("The string to be encoded contains characters outside of the Latin1 range.");
684
+ for (var t, n, r, i, a = e.length % 3, o = "", l = -1, u = e.length - a; ++l < u;) t = e.charCodeAt(l) << 16, n = e.charCodeAt(++l) << 8, r = e.charCodeAt(++l), o += c.charAt((i = t + n + r) >> 18 & 63) + c.charAt(i >> 12 & 63) + c.charAt(i >> 6 & 63) + c.charAt(63 & i);
685
+ return a == 2 ? (t = e.charCodeAt(l) << 8, n = e.charCodeAt(++l), o += c.charAt((i = t + n) >> 10) + c.charAt(i >> 4 & 63) + c.charAt(i << 2 & 63) + "=") : a == 1 && (i = e.charCodeAt(l), o += c.charAt(i >> 2) + c.charAt(i << 4 & 63) + "=="), o;
686
+ },
687
+ decode: function(e) {
688
+ var t = (e = String(e).replace(l, "")).length;
689
+ t % 4 == 0 && (t = (e = e.replace(/==?$/, "")).length), (t % 4 == 1 || /[^+a-zA-Z0-9/]/.test(e)) && s("Invalid character: the string to be decoded is not correctly encoded.");
690
+ for (var n, r, i = 0, a = "", o = -1; ++o < t;) r = c.indexOf(e.charAt(o)), n = i % 4 ? 64 * n + r : r, i++ % 4 && (a += String.fromCharCode(255 & n >> (-2 * i & 6)));
691
+ return a;
692
+ },
693
+ version: "1.0.0"
694
+ };
695
+ (i = function() {
696
+ return u;
697
+ }.call(t, n, t, e)) === void 0 || (e.exports = i);
698
+ }();
699
+ },
700
+ 135: (e) => {
701
+ function t(e) {
702
+ return !!e.constructor && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e);
703
+ }
704
+ e.exports = function(e) {
705
+ return e != null && (t(e) || function(e) {
706
+ return typeof e.readFloatLE == "function" && typeof e.slice == "function" && t(e.slice(0, 0));
707
+ }(e) || !!e._isBuffer);
708
+ };
709
+ },
710
+ 172: (e, t) => {
711
+ t.d = function(e) {
712
+ if (!e) return 0;
713
+ for (var t = (e = e.toString()).length, n = e.length; n--;) {
714
+ var r = e.charCodeAt(n);
715
+ 56320 <= r && r <= 57343 && n--, 127 < r && r <= 2047 ? t++ : 2047 < r && r <= 65535 && (t += 2);
716
+ }
717
+ return t;
718
+ };
719
+ },
720
+ 285: (e, t, n) => {
721
+ var r = n(2);
722
+ e.exports = function(e) {
723
+ return e ? (e.substr(0, 2) === "{}" && (e = "\\{\\}" + e.substr(2)), g(function(e) {
724
+ return e.split("\\\\").join(i).split("\\{").join(a).split("\\}").join(o).split("\\,").join(s).split("\\.").join(c);
725
+ }(e), !0).map(u)) : [];
726
+ };
727
+ var i = "\0SLASH" + Math.random() + "\0", a = "\0OPEN" + Math.random() + "\0", o = "\0CLOSE" + Math.random() + "\0", s = "\0COMMA" + Math.random() + "\0", c = "\0PERIOD" + Math.random() + "\0";
728
+ function l(e) {
729
+ return parseInt(e, 10) == e ? parseInt(e, 10) : e.charCodeAt(0);
730
+ }
731
+ function u(e) {
732
+ return e.split(i).join("\\").split(a).join("{").split(o).join("}").split(s).join(",").split(c).join(".");
733
+ }
734
+ function d(e) {
735
+ if (!e) return [""];
736
+ var t = [], n = r("{", "}", e);
737
+ if (!n) return e.split(",");
738
+ var i = n.pre, a = n.body, o = n.post, s = i.split(",");
739
+ s[s.length - 1] += "{" + a + "}";
740
+ var c = d(o);
741
+ return o.length && (s[s.length - 1] += c.shift(), s.push.apply(s, c)), t.push.apply(t, s), t;
742
+ }
743
+ function f(e) {
744
+ return "{" + e + "}";
745
+ }
746
+ function p(e) {
747
+ return /^-?0\d/.test(e);
748
+ }
749
+ function m(e, t) {
750
+ return e <= t;
751
+ }
752
+ function h(e, t) {
753
+ return e >= t;
754
+ }
755
+ function g(e, t) {
756
+ var n = [], i = r("{", "}", e);
757
+ if (!i) return [e];
758
+ var a = i.pre, s = i.post.length ? g(i.post, !1) : [""];
759
+ if (/\$$/.test(i.pre)) for (var c = 0; c < s.length; c++) {
760
+ var u = a + "{" + i.body + "}" + s[c];
761
+ n.push(u);
762
+ }
763
+ else {
764
+ var _, v, y = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body), b = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body), x = y || b, S = i.body.indexOf(",") >= 0;
765
+ if (!x && !S) return i.post.match(/,(?!,).*\}/) ? g(e = i.pre + "{" + i.body + o + i.post) : [e];
766
+ if (x) _ = i.body.split(/\.\./);
767
+ else if ((_ = d(i.body)).length === 1 && (_ = g(_[0], !1).map(f)).length === 1) return s.map((function(e) {
768
+ return i.pre + _[0] + e;
769
+ }));
770
+ if (x) {
771
+ var ee = l(_[0]), te = l(_[1]), ne = Math.max(_[0].length, _[1].length), re = _.length == 3 ? Math.abs(l(_[2])) : 1, ie = m;
772
+ te < ee && (re *= -1, ie = h);
773
+ var ae = _.some(p);
774
+ v = [];
775
+ for (var C = ee; ie(C, te); C += re) {
776
+ var w;
777
+ if (b) (w = String.fromCharCode(C)) === "\\" && (w = "");
778
+ else if (w = String(C), ae) {
779
+ var oe = ne - w.length;
780
+ if (oe > 0) {
781
+ var T = Array(oe + 1).join("0");
782
+ w = C < 0 ? "-" + T + w.slice(1) : T + w;
783
+ }
784
+ }
785
+ v.push(w);
786
+ }
787
+ } else {
788
+ v = [];
789
+ for (var E = 0; E < _.length; E++) v.push.apply(v, g(_[E], !1));
790
+ }
791
+ 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);
792
+ }
793
+ return n;
794
+ }
795
+ },
796
+ 298: (e) => {
797
+ var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", n = {
798
+ rotl: function(e, t) {
799
+ return e << t | e >>> 32 - t;
800
+ },
801
+ rotr: function(e, t) {
802
+ return e << 32 - t | e >>> t;
803
+ },
804
+ endian: function(e) {
805
+ if (e.constructor == Number) return 16711935 & n.rotl(e, 8) | 4278255360 & n.rotl(e, 24);
806
+ for (var t = 0; t < e.length; t++) e[t] = n.endian(e[t]);
807
+ return e;
808
+ },
809
+ randomBytes: function(e) {
810
+ for (var t = []; e > 0; e--) t.push(Math.floor(256 * Math.random()));
811
+ return t;
812
+ },
813
+ bytesToWords: function(e) {
814
+ for (var t = [], n = 0, r = 0; n < e.length; n++, r += 8) t[r >>> 5] |= e[n] << 24 - r % 32;
815
+ return t;
816
+ },
817
+ wordsToBytes: function(e) {
818
+ for (var t = [], n = 0; n < 32 * e.length; n += 8) t.push(e[n >>> 5] >>> 24 - n % 32 & 255);
819
+ return t;
820
+ },
821
+ bytesToHex: function(e) {
822
+ for (var t = [], n = 0; n < e.length; n++) t.push((e[n] >>> 4).toString(16)), t.push((15 & e[n]).toString(16));
823
+ return t.join("");
824
+ },
825
+ hexToBytes: function(e) {
826
+ for (var t = [], n = 0; n < e.length; n += 2) t.push(parseInt(e.substr(n, 2), 16));
827
+ return t;
828
+ },
829
+ bytesToBase64: function(e) {
830
+ for (var n = [], r = 0; r < e.length; r += 3) for (var i = e[r] << 16 | e[r + 1] << 8 | e[r + 2], a = 0; a < 4; a++) 8 * r + 6 * a <= 8 * e.length ? n.push(t.charAt(i >>> 6 * (3 - a) & 63)) : n.push("=");
831
+ return n.join("");
832
+ },
833
+ base64ToBytes: function(e) {
834
+ e = e.replace(/[^A-Z0-9+\/]/gi, "");
835
+ for (var n = [], r = 0, i = 0; r < e.length; i = ++r % 4) i != 0 && n.push((t.indexOf(e.charAt(r - 1)) & 2 ** (-2 * i + 8) - 1) << 2 * i | t.indexOf(e.charAt(r)) >>> 6 - 2 * i);
836
+ return n;
837
+ }
838
+ };
839
+ e.exports = n;
840
+ },
841
+ 345: () => {},
842
+ 388: () => {},
843
+ 410: () => {},
844
+ 526: (e) => {
845
+ var t = {
846
+ utf8: {
847
+ stringToBytes: function(e) {
848
+ return t.bin.stringToBytes(unescape(encodeURIComponent(e)));
849
+ },
850
+ bytesToString: function(e) {
851
+ return decodeURIComponent(escape(t.bin.bytesToString(e)));
852
+ }
853
+ },
854
+ bin: {
855
+ stringToBytes: function(e) {
856
+ for (var t = [], n = 0; n < e.length; n++) t.push(255 & e.charCodeAt(n));
857
+ return t;
858
+ },
859
+ bytesToString: function(e) {
860
+ for (var t = [], n = 0; n < e.length; n++) t.push(String.fromCharCode(e[n]));
861
+ return t.join("");
862
+ }
863
+ }
864
+ };
865
+ e.exports = t;
866
+ },
867
+ 542: (e, t, n) => {
868
+ (function() {
869
+ var t = n(298), r = n(526).utf8, i = n(135), a = n(526).bin, o = function(e, n) {
870
+ e.constructor == String ? e = n && n.encoding === "binary" ? a.stringToBytes(e) : r.stringToBytes(e) : i(e) ? e = Array.prototype.slice.call(e, 0) : Array.isArray(e) || e.constructor === Uint8Array || (e = e.toString());
871
+ for (var s = t.bytesToWords(e), c = 8 * e.length, l = 1732584193, u = -271733879, d = -1732584194, f = 271733878, p = 0; p < s.length; p++) s[p] = 16711935 & (s[p] << 8 | s[p] >>> 24) | 4278255360 & (s[p] << 24 | s[p] >>> 8);
872
+ s[c >>> 5] |= 128 << c % 32, s[14 + (c + 64 >>> 9 << 4)] = c;
873
+ var m = o._ff, h = o._gg, g = o._hh, _ = o._ii;
874
+ for (p = 0; p < s.length; p += 16) {
875
+ var v = l, y = u, b = d, x = f;
876
+ l = m(l, u, d, f, s[p + 0], 7, -680876936), f = m(f, l, u, d, s[p + 1], 12, -389564586), d = m(d, f, l, u, s[p + 2], 17, 606105819), u = m(u, d, f, l, s[p + 3], 22, -1044525330), l = m(l, u, d, f, s[p + 4], 7, -176418897), f = m(f, l, u, d, s[p + 5], 12, 1200080426), d = m(d, f, l, u, s[p + 6], 17, -1473231341), u = m(u, d, f, l, s[p + 7], 22, -45705983), l = m(l, u, d, f, s[p + 8], 7, 1770035416), f = m(f, l, u, d, s[p + 9], 12, -1958414417), d = m(d, f, l, u, s[p + 10], 17, -42063), u = m(u, d, f, l, s[p + 11], 22, -1990404162), l = m(l, u, d, f, s[p + 12], 7, 1804603682), f = m(f, l, u, d, s[p + 13], 12, -40341101), d = m(d, f, l, u, s[p + 14], 17, -1502002290), l = h(l, u = m(u, d, f, l, s[p + 15], 22, 1236535329), d, f, s[p + 1], 5, -165796510), f = h(f, l, u, d, s[p + 6], 9, -1069501632), d = h(d, f, l, u, s[p + 11], 14, 643717713), u = h(u, d, f, l, s[p + 0], 20, -373897302), l = h(l, u, d, f, s[p + 5], 5, -701558691), f = h(f, l, u, d, s[p + 10], 9, 38016083), d = h(d, f, l, u, s[p + 15], 14, -660478335), u = h(u, d, f, l, s[p + 4], 20, -405537848), l = h(l, u, d, f, s[p + 9], 5, 568446438), f = h(f, l, u, d, s[p + 14], 9, -1019803690), d = h(d, f, l, u, s[p + 3], 14, -187363961), u = h(u, d, f, l, s[p + 8], 20, 1163531501), l = h(l, u, d, f, s[p + 13], 5, -1444681467), f = h(f, l, u, d, s[p + 2], 9, -51403784), d = h(d, f, l, u, s[p + 7], 14, 1735328473), l = g(l, u = h(u, d, f, l, s[p + 12], 20, -1926607734), d, f, s[p + 5], 4, -378558), f = g(f, l, u, d, s[p + 8], 11, -2022574463), d = g(d, f, l, u, s[p + 11], 16, 1839030562), u = g(u, d, f, l, s[p + 14], 23, -35309556), l = g(l, u, d, f, s[p + 1], 4, -1530992060), f = g(f, l, u, d, s[p + 4], 11, 1272893353), d = g(d, f, l, u, s[p + 7], 16, -155497632), u = g(u, d, f, l, s[p + 10], 23, -1094730640), l = g(l, u, d, f, s[p + 13], 4, 681279174), f = g(f, l, u, d, s[p + 0], 11, -358537222), d = g(d, f, l, u, s[p + 3], 16, -722521979), u = g(u, d, f, l, s[p + 6], 23, 76029189), l = g(l, u, d, f, s[p + 9], 4, -640364487), f = g(f, l, u, d, s[p + 12], 11, -421815835), d = g(d, f, l, u, s[p + 15], 16, 530742520), l = _(l, u = g(u, d, f, l, s[p + 2], 23, -995338651), d, f, s[p + 0], 6, -198630844), f = _(f, l, u, d, s[p + 7], 10, 1126891415), d = _(d, f, l, u, s[p + 14], 15, -1416354905), u = _(u, d, f, l, s[p + 5], 21, -57434055), l = _(l, u, d, f, s[p + 12], 6, 1700485571), f = _(f, l, u, d, s[p + 3], 10, -1894986606), d = _(d, f, l, u, s[p + 10], 15, -1051523), u = _(u, d, f, l, s[p + 1], 21, -2054922799), l = _(l, u, d, f, s[p + 8], 6, 1873313359), f = _(f, l, u, d, s[p + 15], 10, -30611744), d = _(d, f, l, u, s[p + 6], 15, -1560198380), u = _(u, d, f, l, s[p + 13], 21, 1309151649), l = _(l, u, d, f, s[p + 4], 6, -145523070), f = _(f, l, u, d, s[p + 11], 10, -1120210379), d = _(d, f, l, u, s[p + 2], 15, 718787259), u = _(u, d, f, l, s[p + 9], 21, -343485551), l = l + v >>> 0, u = u + y >>> 0, d = d + b >>> 0, f = f + x >>> 0;
877
+ }
878
+ return t.endian([
879
+ l,
880
+ u,
881
+ d,
882
+ f
883
+ ]);
884
+ };
885
+ o._ff = function(e, t, n, r, i, a, o) {
886
+ var s = e + (t & n | ~t & r) + (i >>> 0) + o;
887
+ return (s << a | s >>> 32 - a) + t;
888
+ }, o._gg = function(e, t, n, r, i, a, o) {
889
+ var s = e + (t & r | n & ~r) + (i >>> 0) + o;
890
+ return (s << a | s >>> 32 - a) + t;
891
+ }, o._hh = function(e, t, n, r, i, a, o) {
892
+ var s = e + (t ^ n ^ r) + (i >>> 0) + o;
893
+ return (s << a | s >>> 32 - a) + t;
894
+ }, o._ii = function(e, t, n, r, i, a, o) {
895
+ var s = e + (n ^ (t | ~r)) + (i >>> 0) + o;
896
+ return (s << a | s >>> 32 - a) + t;
897
+ }, o._blocksize = 16, o._digestsize = 16, e.exports = function(e, n) {
898
+ if (e == null) throw Error("Illegal argument " + e);
899
+ var r = t.wordsToBytes(o(e, n));
900
+ return n && n.asBytes ? r : n && n.asString ? a.bytesToString(r) : t.bytesToHex(r);
901
+ };
902
+ })();
903
+ },
904
+ 647: (e, t) => {
905
+ var n = Object.prototype.hasOwnProperty;
906
+ function r(e) {
907
+ try {
908
+ return decodeURIComponent(e.replace(/\+/g, " "));
909
+ } catch {
910
+ return null;
911
+ }
912
+ }
913
+ function i(e) {
914
+ try {
915
+ return encodeURIComponent(e);
916
+ } catch {
917
+ return null;
918
+ }
919
+ }
920
+ t.stringify = function(e, t) {
921
+ t ||= "";
922
+ var r, a, o = [];
923
+ for (a in typeof t != "string" && (t = "?"), e) if (n.call(e, a)) {
924
+ if ((r = e[a]) || r != null && !isNaN(r) || (r = ""), a = i(a), r = i(r), a === null || r === null) continue;
925
+ o.push(a + "=" + r);
926
+ }
927
+ return o.length ? t + o.join("&") : "";
928
+ }, t.parse = function(e) {
929
+ for (var t, n = /([^=?#&]+)=?([^&]*)/g, i = {}; t = n.exec(e);) {
930
+ var a = r(t[1]), o = r(t[2]);
931
+ a === null || o === null || a in i || (i[a] = o);
932
+ }
933
+ return i;
934
+ };
935
+ },
936
+ 670: (e) => {
937
+ e.exports = function(e, t) {
938
+ if (t = t.split(":")[0], !(e = +e)) return !1;
939
+ switch (t) {
940
+ case "http":
941
+ case "ws": return e !== 80;
942
+ case "https":
943
+ case "wss": return e !== 443;
944
+ case "ftp": return e !== 21;
945
+ case "gopher": return e !== 70;
946
+ case "file": return !1;
947
+ }
948
+ return e !== 0;
949
+ };
950
+ },
951
+ 737: (e, t, n) => {
952
+ var i = n(670), a = n(647), o = /^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/, s = /[\n\r\t]/g, c = /^[A-Za-z][A-Za-z0-9+-.]*:\/\//, l = /:\d+$/, u = /^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i, d = /^[a-zA-Z]:/;
953
+ function f(e) {
954
+ return (e || "").toString().replace(o, "");
955
+ }
956
+ var p = [
957
+ ["#", "hash"],
958
+ ["?", "query"],
959
+ function(e, t) {
960
+ return g(t.protocol) ? e.replace(/\\/g, "/") : e;
961
+ },
962
+ ["/", "pathname"],
963
+ [
964
+ "@",
965
+ "auth",
966
+ 1
967
+ ],
968
+ [
969
+ NaN,
970
+ "host",
971
+ void 0,
972
+ 1,
973
+ 1
974
+ ],
975
+ [
976
+ /:(\d*)$/,
977
+ "port",
978
+ void 0,
979
+ 1
980
+ ],
981
+ [
982
+ NaN,
983
+ "hostname",
984
+ void 0,
985
+ 1,
986
+ 1
987
+ ]
988
+ ], m = {
989
+ hash: 1,
990
+ query: 1
991
+ };
992
+ function h(e) {
993
+ var t, n = (typeof window < "u" ? window : r === void 0 ? typeof self < "u" ? self : {} : r).location || {}, i = {}, a = typeof (e ||= n);
994
+ if (e.protocol === "blob:") i = new v(unescape(e.pathname), {});
995
+ else if (a === "string") for (t in i = new v(e, {}), m) delete i[t];
996
+ else if (a === "object") {
997
+ for (t in e) t in m || (i[t] = e[t]);
998
+ i.slashes === void 0 && (i.slashes = c.test(e.href));
999
+ }
1000
+ return i;
1001
+ }
1002
+ function g(e) {
1003
+ return e === "file:" || e === "ftp:" || e === "http:" || e === "https:" || e === "ws:" || e === "wss:";
1004
+ }
1005
+ function _(e, t) {
1006
+ e = (e = f(e)).replace(s, ""), t ||= {};
1007
+ var n, r = u.exec(e), i = r[1] ? r[1].toLowerCase() : "", a = !!r[2], o = !!r[3], c = 0;
1008
+ return a ? o ? (n = r[2] + r[3] + r[4], c = r[2].length + r[3].length) : (n = r[2] + r[4], c = r[2].length) : o ? (n = r[3] + r[4], c = r[3].length) : n = r[4], i === "file:" ? c >= 2 && (n = n.slice(2)) : g(i) ? n = r[4] : i ? a && (n = n.slice(2)) : c >= 2 && g(t.protocol) && (n = r[4]), {
1009
+ protocol: i,
1010
+ slashes: a || g(i),
1011
+ slashesCount: c,
1012
+ rest: n
1013
+ };
1014
+ }
1015
+ function v(e, t, n) {
1016
+ if (e = (e = f(e)).replace(s, ""), !(this instanceof v)) return new v(e, t, n);
1017
+ var r, o, c, l, u, m, y = p.slice(), b = typeof t, x = this, S = 0;
1018
+ for (b !== "object" && b !== "string" && (n = t, t = null), n && typeof n != "function" && (n = a.parse), r = !(o = _(e || "", t = h(t))).protocol && !o.slashes, x.slashes = o.slashes || r && t.slashes, x.protocol = o.protocol || t.protocol || "", e = o.rest, (o.protocol === "file:" && (o.slashesCount !== 2 || d.test(e)) || !o.slashes && (o.protocol || o.slashesCount < 2 || !g(x.protocol))) && (y[3] = [/(.*)/, "pathname"]); S < y.length; S++) typeof (l = y[S]) == "function" ? e = l(e, x) : (c = l[0], m = l[1], c == c ? typeof c == "string" ? ~(u = c === "@" ? e.lastIndexOf(c) : e.indexOf(c)) && (typeof l[2] == "number" ? (x[m] = e.slice(0, u), e = e.slice(u + l[2])) : (x[m] = e.slice(u), e = e.slice(0, u))) : (u = c.exec(e)) && (x[m] = u[1], e = e.slice(0, u.index)) : x[m] = e, x[m] = x[m] || r && l[3] && t[m] || "", l[4] && (x[m] = x[m].toLowerCase()));
1019
+ n && (x.query = n(x.query)), r && t.slashes && x.pathname.charAt(0) !== "/" && (x.pathname !== "" || t.pathname !== "") && (x.pathname = function(e, t) {
1020
+ if (e === "") return t;
1021
+ for (var n = (t || "/").split("/").slice(0, -1).concat(e.split("/")), r = n.length, i = n[r - 1], a = !1, o = 0; r--;) n[r] === "." ? n.splice(r, 1) : n[r] === ".." ? (n.splice(r, 1), o++) : o && (r === 0 && (a = !0), n.splice(r, 1), o--);
1022
+ return a && n.unshift(""), i !== "." && i !== ".." || n.push(""), n.join("/");
1023
+ }(x.pathname, t.pathname)), x.pathname.charAt(0) !== "/" && g(x.protocol) && (x.pathname = "/" + x.pathname), i(x.port, x.protocol) || (x.host = x.hostname, x.port = ""), x.username = x.password = "", x.auth &&= (~(u = x.auth.indexOf(":")) ? (x.username = x.auth.slice(0, u), x.username = encodeURIComponent(decodeURIComponent(x.username)), x.password = x.auth.slice(u + 1), x.password = encodeURIComponent(decodeURIComponent(x.password))) : x.username = encodeURIComponent(decodeURIComponent(x.auth)), x.password ? x.username + ":" + x.password : x.username), x.origin = x.protocol !== "file:" && g(x.protocol) && x.host ? x.protocol + "//" + x.host : "null", x.href = x.toString();
1024
+ }
1025
+ v.prototype = {
1026
+ set: function(e, t, n) {
1027
+ var r = this;
1028
+ switch (e) {
1029
+ case "query":
1030
+ typeof t == "string" && t.length && (t = (n || a.parse)(t)), r[e] = t;
1031
+ break;
1032
+ case "port":
1033
+ r[e] = t, i(t, r.protocol) ? t && (r.host = r.hostname + ":" + t) : (r.host = r.hostname, r[e] = "");
1034
+ break;
1035
+ case "hostname":
1036
+ r[e] = t, r.port && (t += ":" + r.port), r.host = t;
1037
+ break;
1038
+ case "host":
1039
+ r[e] = t, l.test(t) ? (t = t.split(":"), r.port = t.pop(), r.hostname = t.join(":")) : (r.hostname = t, r.port = "");
1040
+ break;
1041
+ case "protocol":
1042
+ r.protocol = t.toLowerCase(), r.slashes = !n;
1043
+ break;
1044
+ case "pathname":
1045
+ case "hash":
1046
+ if (t) {
1047
+ var o = e === "pathname" ? "/" : "#";
1048
+ r[e] = t.charAt(0) === o ? t : o + t;
1049
+ } else r[e] = t;
1050
+ break;
1051
+ case "username":
1052
+ case "password":
1053
+ r[e] = encodeURIComponent(t);
1054
+ break;
1055
+ case "auth":
1056
+ var s = t.indexOf(":");
1057
+ ~s ? (r.username = t.slice(0, s), r.username = encodeURIComponent(decodeURIComponent(r.username)), r.password = t.slice(s + 1), r.password = encodeURIComponent(decodeURIComponent(r.password))) : r.username = encodeURIComponent(decodeURIComponent(t));
1058
+ }
1059
+ for (var c = 0; c < p.length; c++) {
1060
+ var u = p[c];
1061
+ u[4] && (r[u[1]] = r[u[1]].toLowerCase());
1062
+ }
1063
+ return r.auth = r.password ? r.username + ":" + r.password : r.username, r.origin = r.protocol !== "file:" && g(r.protocol) && r.host ? r.protocol + "//" + r.host : "null", r.href = r.toString(), r;
1064
+ },
1065
+ toString: function(e) {
1066
+ e && typeof e == "function" || (e = a.stringify);
1067
+ var t, n = this, r = n.host, i = n.protocol;
1068
+ i && i.charAt(i.length - 1) !== ":" && (i += ":");
1069
+ var o = i + (n.protocol && n.slashes || g(n.protocol) ? "//" : "");
1070
+ return n.username ? (o += n.username, n.password && (o += ":" + n.password), o += "@") : n.password ? (o += ":" + n.password, o += "@") : n.protocol !== "file:" && g(n.protocol) && !r && n.pathname !== "/" && (o += "@"), (r[r.length - 1] === ":" || l.test(n.hostname) && !n.port) && (r += ":"), o += r + n.pathname, (t = typeof n.query == "object" ? e(n.query) : n.query) && (o += t.charAt(0) === "?" ? t : "?" + t), n.hash && (o += n.hash), o;
1071
+ }
1072
+ }, v.extractProtocol = _, v.location = h, v.trimLeft = f, v.qs = a, e.exports = v;
1073
+ },
1074
+ 800: () => {},
1075
+ 805: () => {},
1076
+ 829: (e) => {
1077
+ function t(e) {
1078
+ return t = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
1079
+ return typeof e;
1080
+ } : function(e) {
1081
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
1082
+ }, t(e);
1083
+ }
1084
+ function n(e) {
1085
+ var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
1086
+ return n = function(e) {
1087
+ if (e === null || (n = e, Function.toString.call(n).indexOf("[native code]") === -1)) return e;
1088
+ var n;
1089
+ if (typeof e != "function") throw TypeError("Super expression must either be null or a function");
1090
+ if (t !== void 0) {
1091
+ if (t.has(e)) return t.get(e);
1092
+ t.set(e, o);
1093
+ }
1094
+ function o() {
1095
+ return r(e, arguments, a(this).constructor);
1096
+ }
1097
+ return o.prototype = Object.create(e.prototype, { constructor: {
1098
+ value: o,
1099
+ enumerable: !1,
1100
+ writable: !0,
1101
+ configurable: !0
1102
+ } }), i(o, e);
1103
+ }, n(e);
1104
+ }
1105
+ function r(e, t, n) {
1106
+ return r = function() {
1107
+ if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
1108
+ if (typeof Proxy == "function") return !0;
1109
+ try {
1110
+ return Date.prototype.toString.call(Reflect.construct(Date, [], (function() {}))), !0;
1111
+ } catch {
1112
+ return !1;
1113
+ }
1114
+ }() ? Reflect.construct : function(e, t, n) {
1115
+ var r = [null];
1116
+ r.push.apply(r, t);
1117
+ var a = new (Function.bind.apply(e, r))();
1118
+ return n && i(a, n.prototype), a;
1119
+ }, r.apply(null, arguments);
1120
+ }
1121
+ function i(e, t) {
1122
+ return i = Object.setPrototypeOf || function(e, t) {
1123
+ return e.__proto__ = t, e;
1124
+ }, i(e, t);
1125
+ }
1126
+ function a(e) {
1127
+ return a = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) {
1128
+ return e.__proto__ || Object.getPrototypeOf(e);
1129
+ }, a(e);
1130
+ }
1131
+ var o = function(e) {
1132
+ function n(e) {
1133
+ var r;
1134
+ return function(e, t) {
1135
+ if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
1136
+ }(this, n), (r = function(e, n) {
1137
+ return !n || t(n) !== "object" && typeof n != "function" ? function(e) {
1138
+ if (e === void 0) throw ReferenceError("this hasn't been initialised - super() hasn't been called");
1139
+ return e;
1140
+ }(e) : n;
1141
+ }(this, a(n).call(this, e))).name = "ObjectPrototypeMutationError", r;
1142
+ }
1143
+ return function(e, t) {
1144
+ if (typeof t != "function" && t !== null) throw TypeError("Super expression must either be null or a function");
1145
+ e.prototype = Object.create(t && t.prototype, { constructor: {
1146
+ value: e,
1147
+ writable: !0,
1148
+ configurable: !0
1149
+ } }), t && i(e, t);
1150
+ }(n, e), n;
1151
+ }(n(Error));
1152
+ function s(e, n) {
1153
+ for (var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function() {}, i = n.split("."), a = i.length, o = function(t) {
1154
+ var n = i[t];
1155
+ if (!e) return { v: void 0 };
1156
+ if (n === "+") {
1157
+ if (Array.isArray(e)) return { v: e.map((function(n, a) {
1158
+ var o = i.slice(t + 1);
1159
+ return o.length > 0 ? s(n, o.join("."), r) : r(e, a, i, t);
1160
+ })) };
1161
+ var a = i.slice(0, t).join(".");
1162
+ throw Error(`Object at wildcard (${a}) is not an array`);
1163
+ }
1164
+ e = r(e, n, i, t);
1165
+ }, c = 0; c < a; c++) {
1166
+ var l = o(c);
1167
+ if (t(l) === "object") return l.v;
1168
+ }
1169
+ return e;
1170
+ }
1171
+ function c(e, t) {
1172
+ return e.length === t + 1;
1173
+ }
1174
+ e.exports = {
1175
+ set: function(e, n, r) {
1176
+ if (t(e) != "object" || e === null || n === void 0) return e;
1177
+ if (typeof n == "number") return e[n] = r, e[n];
1178
+ try {
1179
+ return s(e, n, (function(e, t, n, i) {
1180
+ if (e === Reflect.getPrototypeOf({})) throw new o("Attempting to mutate Object.prototype");
1181
+ if (!e[t]) {
1182
+ var a = Number.isInteger(Number(n[i + 1])), s = n[i + 1] === "+";
1183
+ e[t] = a || s ? [] : {};
1184
+ }
1185
+ return c(n, i) && (e[t] = r), e[t];
1186
+ }));
1187
+ } catch (t) {
1188
+ if (t instanceof o) throw t;
1189
+ return e;
1190
+ }
1191
+ },
1192
+ get: function(e, n) {
1193
+ if (t(e) != "object" || e === null || n === void 0) return e;
1194
+ if (typeof n == "number") return e[n];
1195
+ try {
1196
+ return s(e, n, (function(e, t) {
1197
+ return e[t];
1198
+ }));
1199
+ } catch {
1200
+ return e;
1201
+ }
1202
+ },
1203
+ has: function(e, n) {
1204
+ var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
1205
+ if (t(e) != "object" || e === null || n === void 0) return !1;
1206
+ if (typeof n == "number") return n in e;
1207
+ try {
1208
+ var i = !1;
1209
+ return s(e, n, (function(e, t, n, a) {
1210
+ if (!c(n, a)) return e && e[t];
1211
+ i = r.own ? e.hasOwnProperty(t) : t in e;
1212
+ })), i;
1213
+ } catch {
1214
+ return !1;
1215
+ }
1216
+ },
1217
+ hasOwn: function(e, t, n) {
1218
+ return this.has(e, t, n || { own: !0 });
1219
+ },
1220
+ isIn: function(e, n, r) {
1221
+ var i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
1222
+ if (t(e) != "object" || e === null || n === void 0) return !1;
1223
+ try {
1224
+ var a = !1, o = !1;
1225
+ return s(e, n, (function(e, n, i, s) {
1226
+ return a = a || e === r || !!e && e[n] === r, o = c(i, s) && t(e) === "object" && n in e, e && e[n];
1227
+ })), i.validPath ? a && o : a;
1228
+ } catch {
1229
+ return !1;
1230
+ }
1231
+ },
1232
+ ObjectPrototypeMutationError: o
1233
+ };
1234
+ }
1235
+ }, Ee = {};
1236
+ function O(e) {
1237
+ var t = Ee[e];
1238
+ if (t !== void 0) return t.exports;
1239
+ var n = Ee[e] = {
1240
+ id: e,
1241
+ loaded: !1,
1242
+ exports: {}
1243
+ };
1244
+ return Te[e].call(n.exports, n, n.exports, O), n.loaded = !0, n.exports;
1245
+ }
1246
+ O.n = (e) => {
1247
+ var t = e && e.__esModule ? () => e.default : () => e;
1248
+ return O.d(t, { a: t }), t;
1249
+ }, O.d = (e, t) => {
1250
+ for (var n in t) O.o(t, n) && !O.o(e, n) && Object.defineProperty(e, n, {
1251
+ enumerable: !0,
1252
+ get: t[n]
1253
+ });
1254
+ }, O.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t), O.nmd = (e) => (e.paths = [], e.children ||= [], e);
1255
+ var De = O(737), Oe = O.n(De);
1256
+ function ke(e) {
1257
+ if (!Ae(e)) throw Error("Parameter was not an error");
1258
+ }
1259
+ function Ae(e) {
1260
+ return !!e && typeof e == "object" && (t = e, Object.prototype.toString.call(t)) === "[object Error]" || e instanceof Error;
1261
+ var t;
1262
+ }
1263
+ var k = class e extends Error {
1264
+ constructor(e, t) {
1265
+ let { options: n, shortMessage: r } = function(e) {
1266
+ let t, n = "";
1267
+ if (e.length === 0) t = {};
1268
+ else if (Ae(e[0])) t = { cause: e[0] }, n = e.slice(1).join(" ") || "";
1269
+ else if (e[0] && typeof e[0] == "object") t = Object.assign({}, e[0]), n = e.slice(1).join(" ") || "";
1270
+ else {
1271
+ if (typeof e[0] != "string") throw Error("Invalid arguments passed to Layerr");
1272
+ t = {}, n = n = e.join(" ") || "";
1273
+ }
1274
+ return {
1275
+ options: t,
1276
+ shortMessage: n
1277
+ };
1278
+ }([...arguments]), i = r;
1279
+ if (n.cause && (i = `${i}: ${n.cause.message}`), super(i), this.message = i, n.name && typeof n.name == "string" ? this.name = n.name : this.name = "Layerr", n.cause && Object.defineProperty(this, "_cause", { value: n.cause }), Object.defineProperty(this, "_info", { value: {} }), n.info && typeof n.info == "object" && Object.assign(this._info, n.info), Error.captureStackTrace) {
1280
+ let e = n.constructorOpt || this.constructor;
1281
+ Error.captureStackTrace(this, e);
1282
+ }
1283
+ }
1284
+ static cause(e) {
1285
+ return ke(e), e._cause && Ae(e._cause) ? e._cause : null;
1286
+ }
1287
+ static fullStack(t) {
1288
+ ke(t);
1289
+ let n = e.cause(t);
1290
+ return n ? `${t.stack}\ncaused by: ${e.fullStack(n)}` : t.stack ?? "";
1291
+ }
1292
+ static info(t) {
1293
+ ke(t);
1294
+ let n = {}, r = e.cause(t);
1295
+ return r && Object.assign(n, e.info(r)), t._info && Object.assign(n, t._info), n;
1296
+ }
1297
+ toString() {
1298
+ let e = this.name || this.constructor.name || this.constructor.prototype.name;
1299
+ return this.message && (e = `${e}: ${this.message}`), e;
1300
+ }
1301
+ }, je = O(47), Me = O.n(je), Ne = "__PATH_SEPARATOR_POSIX__", Pe = "__PATH_SEPARATOR_WINDOWS__";
1302
+ function A(e) {
1303
+ try {
1304
+ let t = e.replace(/\//g, Ne).replace(/\\\\/g, Pe);
1305
+ return encodeURIComponent(t).split(Pe).join("\\\\").split(Ne).join("/");
1306
+ } catch (e) {
1307
+ throw new k(e, "Failed encoding path");
1308
+ }
1309
+ }
1310
+ function Fe(e) {
1311
+ return e.startsWith("/") ? e : "/" + e;
1312
+ }
1313
+ function j(e) {
1314
+ let t = e;
1315
+ return t[0] !== "/" && (t = "/" + t), /^.+\/$/.test(t) && (t = t.substr(0, t.length - 1)), t;
1316
+ }
1317
+ function Ie(e) {
1318
+ let t = new (Oe())(e).pathname;
1319
+ return t.length <= 0 && (t = "/"), j(t);
1320
+ }
1321
+ function M() {
1322
+ return function() {
1323
+ return function(e) {
1324
+ var t = [];
1325
+ if (e.length === 0) return "";
1326
+ if (typeof e[0] != "string") throw TypeError("Url must be a string. Received " + e[0]);
1327
+ 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://");
1328
+ for (var n = 0; n < e.length; n++) {
1329
+ var r = e[n];
1330
+ if (typeof r != "string") throw TypeError("Url must be a string. Received " + r);
1331
+ r !== "" && (n > 0 && (r = r.replace(/^[\/]+/, "")), r = n < e.length - 1 ? r.replace(/[\/]+$/, "") : r.replace(/[\/]+$/, "/"), t.push(r));
1332
+ }
1333
+ var i = t.join("/"), a = (i = i.replace(/\/(\?|&|#[^!])/g, "$1")).split("?");
1334
+ return a.shift() + (a.length > 0 ? "?" : "") + a.join("&");
1335
+ }(typeof arguments[0] == "object" ? arguments[0] : [].slice.call(arguments));
1336
+ }([...arguments].reduce(((e, t, n) => ((n === 0 || t !== "/" || t === "/" && e[e.length - 1] !== "/") && e.push(t), e)), []));
1337
+ }
1338
+ var Le = O(542), Re = O.n(Le);
1339
+ function ze(e, t) {
1340
+ 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) {
1341
+ let s = o || Re()(`${t}:${n}:${r}`);
1342
+ return e && e.toLowerCase() === "md5-sess" ? Re()(`${s}:${i}:${a}`) : s;
1343
+ }(t.algorithm, t.username, t.realm, t.password, t.nonce, t.cnonce, t.ha1), c = Re()(`${i}:${r}`), l = a ? Re()(`${s}:${t.nonce}:${o}:${t.cnonce}:${a}:${c}`) : Re()(`${s}:${t.nonce}:${c}`), u = {
1344
+ username: t.username,
1345
+ realm: t.realm,
1346
+ nonce: t.nonce,
1347
+ uri: r,
1348
+ qop: a,
1349
+ response: l,
1350
+ nc: o,
1351
+ cnonce: t.cnonce,
1352
+ algorithm: t.algorithm,
1353
+ opaque: t.opaque
1354
+ }, d = [];
1355
+ for (let e in u) u[e] && (e === "qop" || e === "nc" || e === "algorithm" ? d.push(`${e}=${u[e]}`) : d.push(`${e}="${u[e]}"`));
1356
+ return `Digest ${d.join(", ")}`;
1357
+ }
1358
+ function Be(e) {
1359
+ return (e.headers && e.headers.get("www-authenticate") || "").split(/\s/)[0].toLowerCase() === "digest";
1360
+ }
1361
+ var Ve = O(101), He = O.n(Ve);
1362
+ function Ue(e) {
1363
+ return He().decode(e);
1364
+ }
1365
+ function We(e, t) {
1366
+ var n;
1367
+ return `Basic ${n = `${e}:${t}`, He().encode(n)}`;
1368
+ }
1369
+ var Ge = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : typeof window < "u" ? window : globalThis, Ke = Ge.fetch.bind(Ge);
1370
+ Ge.Headers, Ge.Request, Ge.Response;
1371
+ var N = function(e) {
1372
+ return e.Auto = "auto", e.Digest = "digest", e.None = "none", e.Password = "password", e.Token = "token", e;
1373
+ }({}), P = function(e) {
1374
+ 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;
1375
+ }({});
1376
+ function qe(e, t, n, r, i) {
1377
+ switch (e.authType) {
1378
+ case N.Auto:
1379
+ t && n && (e.headers.Authorization = We(t, n));
1380
+ break;
1381
+ case N.Digest:
1382
+ e.digest = function(e, t, n) {
1383
+ return {
1384
+ username: e,
1385
+ password: t,
1386
+ ha1: n,
1387
+ nc: 0,
1388
+ algorithm: "md5",
1389
+ hasDigestAuth: !1
1390
+ };
1391
+ }(t, n, i);
1392
+ break;
1393
+ case N.None: break;
1394
+ case N.Password:
1395
+ e.headers.Authorization = We(t, n);
1396
+ break;
1397
+ case N.Token:
1398
+ e.headers.Authorization = `${(a = r).token_type} ${a.access_token}`;
1399
+ break;
1400
+ default: throw new k({ info: { code: P.InvalidAuthType } }, `Invalid auth type: ${e.authType}`);
1401
+ }
1402
+ var a;
1403
+ }
1404
+ O(345), O(800);
1405
+ var Je = "@@HOTPATCHER", Ye = () => {};
1406
+ function Xe(e) {
1407
+ return {
1408
+ original: e,
1409
+ methods: [e],
1410
+ final: !1
1411
+ };
1412
+ }
1413
+ var Ze = class {
1414
+ constructor() {
1415
+ this._configuration = {
1416
+ registry: {},
1417
+ getEmptyAction: "null"
1418
+ }, this.__type__ = Je;
1419
+ }
1420
+ get configuration() {
1421
+ return this._configuration;
1422
+ }
1423
+ get getEmptyAction() {
1424
+ return this.configuration.getEmptyAction;
1425
+ }
1426
+ set getEmptyAction(e) {
1427
+ this.configuration.getEmptyAction = e;
1428
+ }
1429
+ control(e) {
1430
+ let t = arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
1431
+ if (!e || e.__type__ !== Je) throw Error("Failed taking control of target HotPatcher instance: Invalid type or object");
1432
+ return Object.keys(e.configuration.registry).forEach(((n) => {
1433
+ 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]);
1434
+ })), e._configuration = this.configuration, this;
1435
+ }
1436
+ execute(e) {
1437
+ return (this.get(e) || Ye)(...[...arguments].slice(1));
1438
+ }
1439
+ get(e) {
1440
+ let t = this.configuration.registry[e];
1441
+ if (!t) switch (this.getEmptyAction) {
1442
+ case "null": return null;
1443
+ case "throw": throw Error(`Failed handling method request: No method provided for override: ${e}`);
1444
+ default: throw Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`);
1445
+ }
1446
+ return function() {
1447
+ var e = [...arguments];
1448
+ if (e.length === 0) throw Error("Failed creating sequence: No functions provided");
1449
+ return function() {
1450
+ let t = [...arguments], n = this;
1451
+ for (; e.length > 0;) t = [e.shift().apply(n, t)];
1452
+ return t[0];
1453
+ };
1454
+ }(...t.methods);
1455
+ }
1456
+ isPatched(e) {
1457
+ return !!this.configuration.registry[e];
1458
+ }
1459
+ patch(e, t) {
1460
+ let { chain: n = !1 } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
1461
+ if (this.configuration.registry[e] && this.configuration.registry[e].final) throw Error(`Failed patching '${e}': Method marked as being final`);
1462
+ if (typeof t != "function") throw Error(`Failed patching '${e}': Provided method is not a function`);
1463
+ if (n) this.configuration.registry[e] ? this.configuration.registry[e].methods.push(t) : this.configuration.registry[e] = Xe(t);
1464
+ else if (this.isPatched(e)) {
1465
+ let { original: n } = this.configuration.registry[e];
1466
+ this.configuration.registry[e] = Object.assign(Xe(t), { original: n });
1467
+ } else this.configuration.registry[e] = Xe(t);
1468
+ return this;
1469
+ }
1470
+ patchInline(e, t) {
1471
+ this.isPatched(e) || this.patch(e, t);
1472
+ var n = [...arguments].slice(2);
1473
+ return this.execute(e, ...n);
1474
+ }
1475
+ plugin(e) {
1476
+ return [...arguments].slice(1).forEach(((t) => {
1477
+ this.patch(e, t, { chain: !0 });
1478
+ })), this;
1479
+ }
1480
+ restore(e) {
1481
+ if (!this.isPatched(e)) throw Error(`Failed restoring method: No method present for key: ${e}`);
1482
+ if (typeof this.configuration.registry[e].original != "function") throw Error(`Failed restoring method: Original method not found or of invalid type for key: ${e}`);
1483
+ return this.configuration.registry[e].methods = [this.configuration.registry[e].original], this;
1484
+ }
1485
+ setFinal(e) {
1486
+ if (!this.configuration.registry.hasOwnProperty(e)) throw Error(`Failed marking '${e}' as final: No method found for key`);
1487
+ return this.configuration.registry[e].final = !0, this;
1488
+ }
1489
+ }, Qe = null;
1490
+ function $e() {
1491
+ return Qe ||= new Ze(), Qe;
1492
+ }
1493
+ function et(e) {
1494
+ return function(e) {
1495
+ if (typeof e != "object" || !e || Object.prototype.toString.call(e) != "[object Object]") return !1;
1496
+ if (Object.getPrototypeOf(e) === null) return !0;
1497
+ let t = e;
1498
+ for (; Object.getPrototypeOf(t) !== null;) t = Object.getPrototypeOf(t);
1499
+ return Object.getPrototypeOf(e) === t;
1500
+ }(e) ? Object.assign({}, e) : Object.setPrototypeOf(Object.assign({}, e), Object.getPrototypeOf(e));
1501
+ }
1502
+ function tt() {
1503
+ var e = [...arguments];
1504
+ let t = null, n = [...e];
1505
+ for (; n.length > 0;) {
1506
+ let e = n.shift();
1507
+ t = t ? nt(t, e) : et(e);
1508
+ }
1509
+ return t;
1510
+ }
1511
+ function nt(e, t) {
1512
+ let n = et(e);
1513
+ return Object.keys(t).forEach(((e) => {
1514
+ 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] ? nt(n[e], t[e]) : et(t[e]) : n[e] = t[e] : n[e] = t[e];
1515
+ })), n;
1516
+ }
1517
+ function rt(e) {
1518
+ let t = {};
1519
+ for (let n of e.keys()) t[n] = e.get(n);
1520
+ return t;
1521
+ }
1522
+ function it() {
1523
+ var e = [...arguments];
1524
+ if (e.length === 0) return {};
1525
+ let t = {};
1526
+ return e.reduce(((e, n) => (Object.keys(n).forEach(((r) => {
1527
+ let i = r.toLowerCase();
1528
+ t.hasOwnProperty(i) ? e[t[i]] = n[r] : (t[i] = r, e[r] = n[r]);
1529
+ })), e)), {});
1530
+ }
1531
+ O(805);
1532
+ var at = typeof ArrayBuffer == "function", { toString: ot } = Object.prototype;
1533
+ function st(e) {
1534
+ return at && (e instanceof ArrayBuffer || ot.call(e) === "[object ArrayBuffer]");
1535
+ }
1536
+ function ct(e) {
1537
+ return e != null && e.constructor != null && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e);
1538
+ }
1539
+ function lt(e) {
1540
+ return function() {
1541
+ var t = [...arguments];
1542
+ try {
1543
+ return Promise.resolve(e.apply(this, t));
1544
+ } catch (e) {
1545
+ return Promise.reject(e);
1546
+ }
1547
+ };
1548
+ }
1549
+ function ut(e, t, n) {
1550
+ return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
1551
+ }
1552
+ var dt = lt((function(e) {
1553
+ let t = e._digest;
1554
+ return delete e._digest, t.hasDigestAuth && (e = tt(e, { headers: { Authorization: ze(e, t) } })), ut(pt(e), (function(n) {
1555
+ let r = !1;
1556
+ return i = function(e) {
1557
+ return r ? e : n;
1558
+ }, (a = function() {
1559
+ if (n.status == 401) return t.hasDigestAuth = function(e, t) {
1560
+ if (!Be(e)) return !1;
1561
+ let n = /([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;
1562
+ for (;;) {
1563
+ let r = e.headers && e.headers.get("www-authenticate") || "", i = n.exec(r);
1564
+ if (!i) break;
1565
+ t[i[1]] = i[2] || i[3];
1566
+ }
1567
+ return t.nc += 1, t.cnonce = function() {
1568
+ let e = "";
1569
+ for (let t = 0; t < 32; ++t) e = `${e}${"abcdef0123456789"[Math.floor(16 * Math.random())]}`;
1570
+ return e;
1571
+ }(), !0;
1572
+ }(n, t), function() {
1573
+ if (t.hasDigestAuth) return ut(pt(e = tt(e, { headers: { Authorization: ze(e, t) } })), (function(e) {
1574
+ return e.status == 401 ? t.hasDigestAuth = !1 : t.nc++, r = !0, e;
1575
+ }));
1576
+ }();
1577
+ t.nc++;
1578
+ }()) && a.then ? a.then(i) : i(a);
1579
+ var i, a;
1580
+ }));
1581
+ })), ft = lt((function(e, t) {
1582
+ return ut(pt(e), (function(n) {
1583
+ return n.ok ? (t.authType = N.Password, n) : n.status == 401 && Be(n) ? (t.authType = N.Digest, qe(t, t.username, t.password, void 0, void 0), e._digest = t.digest, dt(e)) : n;
1584
+ }));
1585
+ })), F = lt((function(e, t) {
1586
+ return t.authType === N.Auto ? ft(e, t) : e._digest ? dt(e) : pt(e);
1587
+ }));
1588
+ function I(e, t, n) {
1589
+ let r = et(e);
1590
+ return r.headers = it(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;
1591
+ }
1592
+ function pt(e) {
1593
+ let t = $e();
1594
+ return t.patchInline("request", ((e) => t.patchInline("fetch", Ke, e.url, function(e) {
1595
+ let t = {}, n = { method: e.method };
1596
+ if (e.headers && (t = it(t, e.headers)), e.data !== void 0) {
1597
+ let [r, i] = function(e) {
1598
+ if (typeof e == "string" || ct(e) || st(e)) return [e, {}];
1599
+ if (e && typeof e == "object") return [JSON.stringify(e), { "content-type": "application/json" }];
1600
+ throw Error("Unable to convert request body: Unexpected body type: " + typeof e);
1601
+ }(e.data);
1602
+ n.body = r, t = it(t, i);
1603
+ }
1604
+ return e.signal && (n.signal = e.signal), e.withCredentials && (n.credentials = "include"), n.headers = t, n;
1605
+ }(e))), e);
1606
+ }
1607
+ var mt = O(285), ht = (e) => {
1608
+ if (typeof e != "string") throw TypeError("invalid pattern");
1609
+ if (e.length > 65536) throw TypeError("pattern is too long");
1610
+ }, gt = {
1611
+ "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", !0],
1612
+ "[:alpha:]": ["\\p{L}\\p{Nl}", !0],
1613
+ "[:ascii:]": ["\\x00-\\x7f", !1],
1614
+ "[:blank:]": ["\\p{Zs}\\t", !0],
1615
+ "[:cntrl:]": ["\\p{Cc}", !0],
1616
+ "[:digit:]": ["\\p{Nd}", !0],
1617
+ "[:graph:]": [
1618
+ "\\p{Z}\\p{C}",
1619
+ !0,
1620
+ !0
1621
+ ],
1622
+ "[:lower:]": ["\\p{Ll}", !0],
1623
+ "[:print:]": ["\\p{C}", !0],
1624
+ "[:punct:]": ["\\p{P}", !0],
1625
+ "[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", !0],
1626
+ "[:upper:]": ["\\p{Lu}", !0],
1627
+ "[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", !0],
1628
+ "[:xdigit:]": ["A-Fa-f0-9", !1]
1629
+ }, _t = (e) => e.replace(/[[\]\\-]/g, "\\$&"), vt = (e) => e.join(""), yt = (e, t) => {
1630
+ let n = t;
1631
+ if (e.charAt(n) !== "[") throw Error("not in a brace expression");
1632
+ let r = [], i = [], a = n + 1, o = !1, s = !1, c = !1, l = !1, u = n, d = "";
1633
+ t: for (; a < e.length;) {
1634
+ let t = e.charAt(a);
1635
+ if (t !== "!" && t !== "^" || a !== n + 1) {
1636
+ if (t === "]" && o && !c) {
1637
+ u = a + 1;
1638
+ break;
1639
+ }
1640
+ if (o = !0, t !== "\\" || c) {
1641
+ if (t === "[" && !c) {
1642
+ for (let [t, [o, c, l]] of Object.entries(gt)) if (e.startsWith(t, a)) {
1643
+ if (d) return [
1644
+ "$.",
1645
+ !1,
1646
+ e.length - n,
1647
+ !0
1648
+ ];
1649
+ a += t.length, l ? i.push(o) : r.push(o), s ||= c;
1650
+ continue t;
1651
+ }
1652
+ }
1653
+ c = !1, d ? (t > d ? r.push(_t(d) + "-" + _t(t)) : t === d && r.push(_t(t)), d = "", a++) : e.startsWith("-]", a + 1) ? (r.push(_t(t + "-")), a += 2) : e.startsWith("-", a + 1) ? (d = t, a += 2) : (r.push(_t(t)), a++);
1654
+ } else c = !0, a++;
1655
+ } else l = !0, a++;
1656
+ }
1657
+ if (u < a) return [
1658
+ "",
1659
+ !1,
1660
+ 0,
1661
+ !1
1662
+ ];
1663
+ if (!r.length && !i.length) return [
1664
+ "$.",
1665
+ !1,
1666
+ e.length - n,
1667
+ !0
1668
+ ];
1669
+ if (i.length === 0 && r.length === 1 && /^\\?.$/.test(r[0]) && !l) return [
1670
+ (f = r[0].length === 2 ? r[0].slice(-1) : r[0], f.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")),
1671
+ !1,
1672
+ u - n,
1673
+ !1
1674
+ ];
1675
+ var f;
1676
+ let p = "[" + (l ? "^" : "") + vt(r) + "]", m = "[" + (l ? "" : "^") + vt(i) + "]";
1677
+ return [
1678
+ r.length && i.length ? "(" + p + "|" + m + ")" : r.length ? p : m,
1679
+ s,
1680
+ u - n,
1681
+ !0
1682
+ ];
1683
+ }, bt = function(e) {
1684
+ let { windowsPathsNoEscape: t = !1 } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1685
+ return t ? e.replace(/\[([^\/\\])\]/g, "$1") : e.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
1686
+ }, xt = new Set([
1687
+ "!",
1688
+ "?",
1689
+ "+",
1690
+ "*",
1691
+ "@"
1692
+ ]), St = (e) => xt.has(e), Ct = "(?!\\.)", wt = new Set(["[", "."]), Tt = new Set(["..", "."]), Et = /* @__PURE__ */ new Set("().*{}+?[]^$\\!"), Dt = "[^/]", Ot = Dt + "*?", kt = Dt + "+?", At = class e {
1693
+ type;
1694
+ #e;
1695
+ #t;
1696
+ #n = !1;
1697
+ #r = [];
1698
+ #i;
1699
+ #a;
1700
+ #o;
1701
+ #s = !1;
1702
+ #c;
1703
+ #l;
1704
+ #u = !1;
1705
+ constructor(e, t) {
1706
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
1707
+ this.type = e, e && (this.#t = !0), this.#i = t, this.#e = this.#i ? this.#i.#e : this, this.#c = this.#e === this ? n : this.#e.#c, this.#o = this.#e === this ? [] : this.#e.#o, e !== "!" || this.#e.#s || this.#o.push(this), this.#a = this.#i ? this.#i.#r.length : 0;
1708
+ }
1709
+ get hasMagic() {
1710
+ if (this.#t !== void 0) return this.#t;
1711
+ for (let e of this.#r) if (typeof e != "string" && (e.type || e.hasMagic)) return this.#t = !0;
1712
+ return this.#t;
1713
+ }
1714
+ toString() {
1715
+ 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;
1716
+ }
1717
+ #d() {
1718
+ if (this !== this.#e) throw Error("should only call on root");
1719
+ if (this.#s) return this;
1720
+ let e;
1721
+ for (this.toString(), this.#s = !0; e = this.#o.pop();) {
1722
+ if (e.type !== "!") continue;
1723
+ let t = e, n = t.#i;
1724
+ for (; n;) {
1725
+ for (let r = t.#a + 1; !n.type && r < n.#r.length; r++) for (let t of e.#r) {
1726
+ if (typeof t == "string") throw Error("string part in extglob AST??");
1727
+ t.copyIn(n.#r[r]);
1728
+ }
1729
+ t = n, n = t.#i;
1730
+ }
1731
+ }
1732
+ return this;
1733
+ }
1734
+ push() {
1735
+ var t = [...arguments];
1736
+ for (let n of t) if (n !== "") {
1737
+ if (typeof n != "string" && !(n instanceof e && n.#i === this)) throw Error("invalid part: " + n);
1738
+ this.#r.push(n);
1739
+ }
1740
+ }
1741
+ toJSON() {
1742
+ let e = this.type === null ? this.#r.slice().map(((e) => typeof e == "string" ? e : e.toJSON())) : [this.type, ...this.#r.map(((e) => e.toJSON()))];
1743
+ return this.isStart() && !this.type && e.unshift([]), this.isEnd() && (this === this.#e || this.#e.#s && this.#i?.type === "!") && e.push({}), e;
1744
+ }
1745
+ isStart() {
1746
+ if (this.#e === this) return !0;
1747
+ if (!this.#i?.isStart()) return !1;
1748
+ if (this.#a === 0) return !0;
1749
+ let t = this.#i;
1750
+ for (let n = 0; n < this.#a; n++) {
1751
+ let r = t.#r[n];
1752
+ if (!(r instanceof e && r.type === "!")) return !1;
1753
+ }
1754
+ return !0;
1755
+ }
1756
+ isEnd() {
1757
+ if (this.#e === this || this.#i?.type === "!") return !0;
1758
+ if (!this.#i?.isEnd()) return !1;
1759
+ if (!this.type) return this.#i?.isEnd();
1760
+ let e = this.#i ? this.#i.#r.length : 0;
1761
+ return this.#a === e - 1;
1762
+ }
1763
+ copyIn(e) {
1764
+ typeof e == "string" ? this.push(e) : this.push(e.clone(this));
1765
+ }
1766
+ clone(t) {
1767
+ let n = new e(this.type, t);
1768
+ for (let e of this.#r) n.copyIn(e);
1769
+ return n;
1770
+ }
1771
+ static #f(t, n, r, i) {
1772
+ let a = !1, o = !1, s = -1, c = !1;
1773
+ if (n.type === null) {
1774
+ let l = r, u = "";
1775
+ for (; l < t.length;) {
1776
+ let r = t.charAt(l++);
1777
+ if (a || r === "\\") a = !a, u += r;
1778
+ else if (o) l === s + 1 ? r !== "^" && r !== "!" || (c = !0) : r !== "]" || l === s + 2 && c || (o = !1), u += r;
1779
+ else if (r !== "[") if (i.noext || !St(r) || t.charAt(l) !== "(") u += r;
1780
+ else {
1781
+ n.push(u), u = "";
1782
+ let a = new e(r, n);
1783
+ l = e.#f(t, a, l, i), n.push(a);
1784
+ }
1785
+ else o = !0, s = l, c = !1, u += r;
1786
+ }
1787
+ return n.push(u), l;
1788
+ }
1789
+ let l = r + 1, u = new e(null, n), d = [], f = "";
1790
+ for (; l < t.length;) {
1791
+ let r = t.charAt(l++);
1792
+ if (a || r === "\\") a = !a, f += r;
1793
+ else if (o) l === s + 1 ? r !== "^" && r !== "!" || (c = !0) : r !== "]" || l === s + 2 && c || (o = !1), f += r;
1794
+ else if (r !== "[") if (St(r) && t.charAt(l) === "(") {
1795
+ u.push(f), f = "";
1796
+ let n = new e(r, u);
1797
+ u.push(n), l = e.#f(t, n, l, i);
1798
+ } else if (r !== "|") {
1799
+ if (r === ")") return f === "" && n.#r.length === 0 && (n.#u = !0), u.push(f), f = "", n.push(...d, u), l;
1800
+ f += r;
1801
+ } else u.push(f), f = "", d.push(u), u = new e(null, n);
1802
+ else o = !0, s = l, c = !1, f += r;
1803
+ }
1804
+ return n.type = null, n.#t = void 0, n.#r = [t.substring(r - 1)], l;
1805
+ }
1806
+ static fromGlob(t) {
1807
+ let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = new e(null, void 0, n);
1808
+ return e.#f(t, r, 0, n), r;
1809
+ }
1810
+ toMMPattern() {
1811
+ if (this !== this.#e) return this.#e.toMMPattern();
1812
+ let e = this.toString(), [t, n, r, i] = this.toRegExpSource();
1813
+ if (!(r || this.#t || this.#c.nocase && !this.#c.nocaseMagicOnly && e.toUpperCase() !== e.toLowerCase())) return n;
1814
+ let a = (this.#c.nocase ? "i" : "") + (i ? "u" : "");
1815
+ return Object.assign(RegExp(`^${t}$`, a), {
1816
+ _src: t,
1817
+ _glob: e
1818
+ });
1819
+ }
1820
+ get options() {
1821
+ return this.#c;
1822
+ }
1823
+ toRegExpSource(t) {
1824
+ let n = t ?? !!this.#c.dot;
1825
+ if (this.#e === this && this.#d(), !this.type) {
1826
+ let r = this.isStart() && this.isEnd(), i = this.#r.map(((n) => {
1827
+ let [i, a, o, s] = typeof n == "string" ? e.#m(n, this.#t, r) : n.toRegExpSource(t);
1828
+ return this.#t = this.#t || o, this.#n = this.#n || s, i;
1829
+ })).join(""), a = "";
1830
+ if (this.isStart() && typeof this.#r[0] == "string" && (this.#r.length !== 1 || !Tt.has(this.#r[0]))) {
1831
+ let e = wt, 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));
1832
+ a = r ? "(?!(?:^|/)\\.\\.?(?:$|/))" : o ? Ct : "";
1833
+ }
1834
+ let o = "";
1835
+ return this.isEnd() && this.#e.#s && this.#i?.type === "!" && (o = "(?:$|\\/)"), [
1836
+ a + i + o,
1837
+ bt(i),
1838
+ this.#t = !!this.#t,
1839
+ this.#n
1840
+ ];
1841
+ }
1842
+ let r = this.type === "*" || this.type === "+", i = this.type === "!" ? "(?:(?!(?:" : "(?:", a = this.#p(n);
1843
+ if (this.isStart() && this.isEnd() && !a && this.type !== "!") {
1844
+ let e = this.toString();
1845
+ return this.#r = [e], this.type = null, this.#t = void 0, [
1846
+ e,
1847
+ bt(this.toString()),
1848
+ !1,
1849
+ !1
1850
+ ];
1851
+ }
1852
+ let o = !r || t || n ? "" : this.#p(!0);
1853
+ o === a && (o = ""), o && (a = `(?:${a})(?:${o})*?`);
1854
+ let s = "";
1855
+ return s = this.type === "!" && this.#u ? (this.isStart() && !n ? Ct : "") + kt : i + a + (this.type === "!" ? "))" + (!this.isStart() || n || t ? "" : Ct) + Ot + ")" : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && o ? ")" : this.type === "*" && o ? ")?" : `)${this.type}`), [
1856
+ s,
1857
+ bt(a),
1858
+ this.#t = !!this.#t,
1859
+ this.#n
1860
+ ];
1861
+ }
1862
+ #p(e) {
1863
+ return this.#r.map(((t) => {
1864
+ if (typeof t == "string") throw Error("string type in extglob ast??");
1865
+ let [n, r, i, a] = t.toRegExpSource(e);
1866
+ return this.#n = this.#n || a, n;
1867
+ })).filter(((e) => !(this.isStart() && this.isEnd() && !e))).join("|");
1868
+ }
1869
+ static #m(e, t) {
1870
+ let n = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r = !1, i = "", a = !1;
1871
+ for (let o = 0; o < e.length; o++) {
1872
+ let s = e.charAt(o);
1873
+ if (r) r = !1, i += (Et.has(s) ? "\\" : "") + s;
1874
+ else if (s !== "\\") {
1875
+ if (s === "[") {
1876
+ let [n, r, s, c] = yt(e, o);
1877
+ if (s) {
1878
+ i += n, a ||= r, o += s - 1, t ||= c;
1879
+ continue;
1880
+ }
1881
+ }
1882
+ s === "*" ? (i += n && e === "*" ? kt : Ot, t = !0) : s === "?" ? (i += Dt, t = !0) : i += s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
1883
+ } else o === e.length - 1 ? i += "\\\\" : r = !0;
1884
+ }
1885
+ return [
1886
+ i,
1887
+ bt(e),
1888
+ !!t,
1889
+ a
1890
+ ];
1891
+ }
1892
+ }, L = function(e, t) {
1893
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
1894
+ return ht(t), !(!n.nocomment && t.charAt(0) === "#") && new en(t, n).match(e);
1895
+ }, jt = /^\*+([^+@!?\*\[\(]*)$/, Mt = (e) => (t) => !t.startsWith(".") && t.endsWith(e), Nt = (e) => (t) => t.endsWith(e), Pt = (e) => (e = e.toLowerCase(), (t) => !t.startsWith(".") && t.toLowerCase().endsWith(e)), Ft = (e) => (e = e.toLowerCase(), (t) => t.toLowerCase().endsWith(e)), It = /^\*+\.\*+$/, Lt = (e) => !e.startsWith(".") && e.includes("."), Rt = (e) => e !== "." && e !== ".." && e.includes("."), zt = /^\.\*+$/, Bt = (e) => e !== "." && e !== ".." && e.startsWith("."), Vt = /^\*+$/, Ht = (e) => e.length !== 0 && !e.startsWith("."), Ut = (e) => e.length !== 0 && e !== "." && e !== "..", Wt = /^\?+([^+@!?\*\[\(]*)?$/, Gt = (e) => {
1896
+ let [t, n = ""] = e, r = Yt([t]);
1897
+ return n ? (n = n.toLowerCase(), (e) => r(e) && e.toLowerCase().endsWith(n)) : r;
1898
+ }, Kt = (e) => {
1899
+ let [t, n = ""] = e, r = Xt([t]);
1900
+ return n ? (n = n.toLowerCase(), (e) => r(e) && e.toLowerCase().endsWith(n)) : r;
1901
+ }, qt = (e) => {
1902
+ let [t, n = ""] = e, r = Xt([t]);
1903
+ return n ? (e) => r(e) && e.endsWith(n) : r;
1904
+ }, Jt = (e) => {
1905
+ let [t, n = ""] = e, r = Yt([t]);
1906
+ return n ? (e) => r(e) && e.endsWith(n) : r;
1907
+ }, Yt = (e) => {
1908
+ let [t] = e, n = t.length;
1909
+ return (e) => e.length === n && !e.startsWith(".");
1910
+ }, Xt = (e) => {
1911
+ let [t] = e, n = t.length;
1912
+ return (e) => e.length === n && e !== "." && e !== "..";
1913
+ }, Zt = typeof t == "object" && t ? typeof t.env == "object" && t.env && t.env.__MINIMATCH_TESTING_PLATFORM__ || t.platform : "posix";
1914
+ L.sep = Zt === "win32" ? "\\" : "/";
1915
+ var R = Symbol("globstar **");
1916
+ L.GLOBSTAR = R, L.filter = function(e) {
1917
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1918
+ return (n) => L(n, e, t);
1919
+ };
1920
+ var z = function(e) {
1921
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1922
+ return Object.assign({}, e, t);
1923
+ };
1924
+ L.defaults = (e) => {
1925
+ if (!e || typeof e != "object" || !Object.keys(e).length) return L;
1926
+ let t = L;
1927
+ return Object.assign((function(n, r) {
1928
+ return t(n, r, z(e, arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}));
1929
+ }), {
1930
+ Minimatch: class extends t.Minimatch {
1931
+ constructor(t) {
1932
+ super(t, z(e, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}));
1933
+ }
1934
+ static defaults(n) {
1935
+ return t.defaults(z(e, n)).Minimatch;
1936
+ }
1937
+ },
1938
+ AST: class extends t.AST {
1939
+ constructor(t, n) {
1940
+ super(t, n, z(e, arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}));
1941
+ }
1942
+ static fromGlob(n) {
1943
+ let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1944
+ return t.AST.fromGlob(n, z(e, r));
1945
+ }
1946
+ },
1947
+ unescape: function(n) {
1948
+ let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1949
+ return t.unescape(n, z(e, r));
1950
+ },
1951
+ escape: function(n) {
1952
+ let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1953
+ return t.escape(n, z(e, r));
1954
+ },
1955
+ filter: function(n) {
1956
+ let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1957
+ return t.filter(n, z(e, r));
1958
+ },
1959
+ defaults: (n) => t.defaults(z(e, n)),
1960
+ makeRe: function(n) {
1961
+ let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1962
+ return t.makeRe(n, z(e, r));
1963
+ },
1964
+ braceExpand: function(n) {
1965
+ let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1966
+ return t.braceExpand(n, z(e, r));
1967
+ },
1968
+ match: function(n, r) {
1969
+ let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
1970
+ return t.match(n, r, z(e, i));
1971
+ },
1972
+ sep: t.sep,
1973
+ GLOBSTAR: R
1974
+ });
1975
+ };
1976
+ var Qt = function(e) {
1977
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1978
+ return ht(e), t.nobrace || !/\{(?:(?!\{).)*\}/.test(e) ? [e] : mt(e);
1979
+ };
1980
+ L.braceExpand = Qt, L.makeRe = function(e) {
1981
+ return new en(e, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}).makeRe();
1982
+ }, L.match = function(e, t) {
1983
+ let n = new en(t, arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {});
1984
+ return e = e.filter(((e) => n.match(e))), n.options.nonull && !e.length && e.push(t), e;
1985
+ };
1986
+ var $t = /[?*]|[+@!]\(.*?\)|\[|\]/, en = class {
1987
+ options;
1988
+ set;
1989
+ pattern;
1990
+ windowsPathsNoEscape;
1991
+ nonegate;
1992
+ negate;
1993
+ comment;
1994
+ empty;
1995
+ preserveMultipleSlashes;
1996
+ partial;
1997
+ globSet;
1998
+ globParts;
1999
+ nocase;
2000
+ isWindows;
2001
+ platform;
2002
+ windowsNoMagicRoot;
2003
+ regexp;
2004
+ constructor(e) {
2005
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2006
+ ht(e), t ||= {}, this.options = t, this.pattern = e, this.platform = t.platform || Zt, 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();
2007
+ }
2008
+ hasMagic() {
2009
+ if (this.options.magicalBraces && this.set.length > 1) return !0;
2010
+ for (let e of this.set) for (let t of e) if (typeof t != "string") return !0;
2011
+ return !1;
2012
+ }
2013
+ debug() {}
2014
+ make() {
2015
+ let e = this.pattern, t = this.options;
2016
+ if (!t.nocomment && e.charAt(0) === "#") return void (this.comment = !0);
2017
+ if (!e) return void (this.empty = !0);
2018
+ this.parseNegate(), this.globSet = [...new Set(this.braceExpand())], t.debug && (this.debug = function() {
2019
+ return console.error(...arguments);
2020
+ }), this.debug(this.pattern, this.globSet);
2021
+ let n = this.globSet.map(((e) => this.slashSplit(e)));
2022
+ this.globParts = this.preprocess(n), this.debug(this.pattern, this.globParts);
2023
+ let r = this.globParts.map(((e, t, n) => {
2024
+ if (this.isWindows && this.windowsNoMagicRoot) {
2025
+ let t = !(e[0] !== "" || e[1] !== "" || e[2] !== "?" && $t.test(e[2]) || $t.test(e[3])), n = /^[a-z]:/i.test(e[0]);
2026
+ if (t) return [...e.slice(0, 4), ...e.slice(4).map(((e) => this.parse(e)))];
2027
+ if (n) return [e[0], ...e.slice(1).map(((e) => this.parse(e)))];
2028
+ }
2029
+ return e.map(((e) => this.parse(e)));
2030
+ }));
2031
+ if (this.debug(this.pattern, r), this.set = r.filter(((e) => e.indexOf(!1) === -1)), this.isWindows) for (let e = 0; e < this.set.length; e++) {
2032
+ let t = this.set[e];
2033
+ t[0] === "" && t[1] === "" && this.globParts[e][2] === "?" && typeof t[3] == "string" && /^[a-z]:$/i.test(t[3]) && (t[2] = "?");
2034
+ }
2035
+ this.debug(this.pattern, this.set);
2036
+ }
2037
+ preprocess(e) {
2038
+ if (this.options.noglobstar) for (let t = 0; t < e.length; t++) for (let n = 0; n < e[t].length; n++) e[t][n] === "**" && (e[t][n] = "*");
2039
+ let { optimizationLevel: t = 1 } = this.options;
2040
+ return t >= 2 ? (e = this.firstPhasePreProcess(e), e = this.secondPhasePreProcess(e)) : e = t >= 1 ? this.levelOneOptimize(e) : this.adjascentGlobstarOptimize(e), e;
2041
+ }
2042
+ adjascentGlobstarOptimize(e) {
2043
+ return e.map(((e) => {
2044
+ let t = -1;
2045
+ for (; (t = e.indexOf("**", t + 1)) !== -1;) {
2046
+ let n = t;
2047
+ for (; e[n + 1] === "**";) n++;
2048
+ n !== t && e.splice(t, n - t);
2049
+ }
2050
+ return e;
2051
+ }));
2052
+ }
2053
+ levelOneOptimize(e) {
2054
+ return e.map(((e) => (e = e.reduce(((e, t) => {
2055
+ let n = e[e.length - 1];
2056
+ return t === "**" && n === "**" ? e : t === ".." && n && n !== ".." && n !== "." && n !== "**" ? (e.pop(), e) : (e.push(t), e);
2057
+ }), [])).length === 0 ? [""] : e));
2058
+ }
2059
+ levelTwoFileOptimize(e) {
2060
+ Array.isArray(e) || (e = this.slashSplit(e));
2061
+ let t = !1;
2062
+ do {
2063
+ if (t = !1, !this.preserveMultipleSlashes) {
2064
+ for (let n = 1; n < e.length - 1; n++) {
2065
+ let r = e[n];
2066
+ n === 1 && r === "" && e[0] === "" || r !== "." && r !== "" || (t = !0, e.splice(n, 1), n--);
2067
+ }
2068
+ e[0] !== "." || e.length !== 2 || e[1] !== "." && e[1] !== "" || (t = !0, e.pop());
2069
+ }
2070
+ let n = 0;
2071
+ for (; (n = e.indexOf("..", n + 1)) !== -1;) {
2072
+ let r = e[n - 1];
2073
+ r && r !== "." && r !== ".." && r !== "**" && (t = !0, e.splice(n - 1, 2), n -= 2);
2074
+ }
2075
+ } while (t);
2076
+ return e.length === 0 ? [""] : e;
2077
+ }
2078
+ firstPhasePreProcess(e) {
2079
+ let t = !1;
2080
+ do {
2081
+ t = !1;
2082
+ for (let n of e) {
2083
+ let r = -1;
2084
+ for (; (r = n.indexOf("**", r + 1)) !== -1;) {
2085
+ let i = r;
2086
+ for (; n[i + 1] === "**";) i++;
2087
+ i > r && n.splice(r + 1, i - r);
2088
+ let a = n[r + 1], o = n[r + 2], s = n[r + 3];
2089
+ if (a !== ".." || !o || o === "." || o === ".." || !s || s === "." || s === "..") continue;
2090
+ t = !0, n.splice(r, 1);
2091
+ let c = n.slice(0);
2092
+ c[r] = "**", e.push(c), r--;
2093
+ }
2094
+ if (!this.preserveMultipleSlashes) {
2095
+ for (let e = 1; e < n.length - 1; e++) {
2096
+ let r = n[e];
2097
+ e === 1 && r === "" && n[0] === "" || r !== "." && r !== "" || (t = !0, n.splice(e, 1), e--);
2098
+ }
2099
+ n[0] !== "." || n.length !== 2 || n[1] !== "." && n[1] !== "" || (t = !0, n.pop());
2100
+ }
2101
+ let i = 0;
2102
+ for (; (i = n.indexOf("..", i + 1)) !== -1;) {
2103
+ let e = n[i - 1];
2104
+ if (e && e !== "." && e !== ".." && e !== "**") {
2105
+ t = !0;
2106
+ let e = i === 1 && n[i + 1] === "**" ? ["."] : [];
2107
+ n.splice(i - 1, 2, ...e), n.length === 0 && n.push(""), i -= 2;
2108
+ }
2109
+ }
2110
+ }
2111
+ } while (t);
2112
+ return e;
2113
+ }
2114
+ secondPhasePreProcess(e) {
2115
+ for (let t = 0; t < e.length - 1; t++) for (let n = t + 1; n < e.length; n++) {
2116
+ let r = this.partsMatch(e[t], e[n], !this.preserveMultipleSlashes);
2117
+ if (r) {
2118
+ e[t] = [], e[n] = r;
2119
+ break;
2120
+ }
2121
+ }
2122
+ return e.filter(((e) => e.length));
2123
+ }
2124
+ partsMatch(e, t) {
2125
+ let n = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r = 0, i = 0, a = [], o = "";
2126
+ for (; r < e.length && i < t.length;) if (e[r] === t[i]) a.push(o === "b" ? t[i] : e[r]), r++, i++;
2127
+ else if (n && e[r] === "**" && t[i] === e[r + 1]) a.push(e[r]), r++;
2128
+ else if (n && t[i] === "**" && e[r] === t[i + 1]) a.push(t[i]), i++;
2129
+ else if (e[r] !== "*" || !t[i] || !this.options.dot && t[i].startsWith(".") || t[i] === "**") {
2130
+ if (t[i] !== "*" || !e[r] || !this.options.dot && e[r].startsWith(".") || e[r] === "**" || o === "a") return !1;
2131
+ o = "b", a.push(t[i]), r++, i++;
2132
+ } else {
2133
+ if (o === "b") return !1;
2134
+ o = "a", a.push(e[r]), r++, i++;
2135
+ }
2136
+ return e.length === t.length && a;
2137
+ }
2138
+ parseNegate() {
2139
+ if (this.nonegate) return;
2140
+ let e = this.pattern, t = !1, n = 0;
2141
+ for (let r = 0; r < e.length && e.charAt(r) === "!"; r++) t = !t, n++;
2142
+ n && (this.pattern = e.slice(n)), this.negate = t;
2143
+ }
2144
+ matchOne(e, t) {
2145
+ let n = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r = this.options;
2146
+ if (this.isWindows) {
2147
+ let n = typeof e[0] == "string" && /^[a-z]:$/i.test(e[0]), r = !n && e[0] === "" && e[1] === "" && e[2] === "?" && /^[a-z]:$/i.test(e[3]), i = typeof t[0] == "string" && /^[a-z]:$/i.test(t[0]), a = r ? 3 : n ? 0 : void 0, o = !i && t[0] === "" && t[1] === "" && t[2] === "?" && typeof t[3] == "string" && /^[a-z]:$/i.test(t[3]) ? 3 : i ? 0 : void 0;
2148
+ if (typeof a == "number" && typeof o == "number") {
2149
+ let [n, r] = [e[a], t[o]];
2150
+ n.toLowerCase() === r.toLowerCase() && (t[o] = n, o > a ? t = t.slice(o) : a > o && (e = e.slice(a)));
2151
+ }
2152
+ }
2153
+ let { optimizationLevel: i = 1 } = this.options;
2154
+ i >= 2 && (e = this.levelTwoFileOptimize(e)), this.debug("matchOne", this, {
2155
+ file: e,
2156
+ pattern: t
2157
+ }), this.debug("matchOne", e.length, t.length);
2158
+ for (var a = 0, o = 0, s = e.length, c = t.length; a < s && o < c; a++, o++) {
2159
+ this.debug("matchOne loop");
2160
+ var l = t[o], u = e[a];
2161
+ if (this.debug(t, l, u), !1 === l) return !1;
2162
+ if (l === R) {
2163
+ this.debug("GLOBSTAR", [
2164
+ t,
2165
+ l,
2166
+ u
2167
+ ]);
2168
+ var d = a, f = o + 1;
2169
+ if (f === c) {
2170
+ for (this.debug("** at the end"); a < s; a++) if (e[a] === "." || e[a] === ".." || !r.dot && e[a].charAt(0) === ".") return !1;
2171
+ return !0;
2172
+ }
2173
+ for (; d < s;) {
2174
+ var p = e[d];
2175
+ if (this.debug("\nglobstar while", e, d, t, f, p), this.matchOne(e.slice(d), t.slice(f), n)) return this.debug("globstar found match!", d, s, p), !0;
2176
+ if (p === "." || p === ".." || !r.dot && p.charAt(0) === ".") {
2177
+ this.debug("dot detected!", e, d, t, f);
2178
+ break;
2179
+ }
2180
+ this.debug("globstar swallow a segment, and continue"), d++;
2181
+ }
2182
+ return !(!n || (this.debug("\n>>> no match, partial?", e, d, t, f), d !== s));
2183
+ }
2184
+ let i;
2185
+ if (typeof l == "string" ? (i = u === l, this.debug("string match", l, u, i)) : (i = l.test(u), this.debug("pattern match", l, u, i)), !i) return !1;
2186
+ }
2187
+ if (a === s && o === c) return !0;
2188
+ if (a === s) return n;
2189
+ if (o === c) return a === s - 1 && e[a] === "";
2190
+ throw Error("wtf?");
2191
+ }
2192
+ braceExpand() {
2193
+ return Qt(this.pattern, this.options);
2194
+ }
2195
+ parse(e) {
2196
+ ht(e);
2197
+ let t = this.options;
2198
+ if (e === "**") return R;
2199
+ if (e === "") return "";
2200
+ let n, r = null;
2201
+ (n = e.match(Vt)) ? r = t.dot ? Ut : Ht : (n = e.match(jt)) ? r = (t.nocase ? t.dot ? Ft : Pt : t.dot ? Nt : Mt)(n[1]) : (n = e.match(Wt)) ? r = (t.nocase ? t.dot ? Kt : Gt : t.dot ? qt : Jt)(n) : (n = e.match(It)) ? r = t.dot ? Rt : Lt : (n = e.match(zt)) && (r = Bt);
2202
+ let i = At.fromGlob(e, this.options).toMMPattern();
2203
+ return r && typeof i == "object" && Reflect.defineProperty(i, "test", { value: r }), i;
2204
+ }
2205
+ makeRe() {
2206
+ if (this.regexp || !1 === this.regexp) return this.regexp;
2207
+ let e = this.set;
2208
+ if (!e.length) return this.regexp = !1, this.regexp;
2209
+ let t = this.options, n = t.noglobstar ? "[^/]*?" : t.dot ? "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?" : "(?:(?!(?:\\/|^)\\.).)*?", r = new Set(t.nocase ? ["i"] : []), i = e.map(((e) => {
2210
+ let t = e.map(((e) => {
2211
+ if (e instanceof RegExp) for (let t of e.flags.split("")) r.add(t);
2212
+ return typeof e == "string" ? e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") : e === R ? R : e._src;
2213
+ }));
2214
+ return t.forEach(((e, r) => {
2215
+ let i = t[r + 1], a = t[r - 1];
2216
+ 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));
2217
+ })), t.filter(((e) => e !== R)).join("/");
2218
+ })).join("|"), [a, o] = e.length > 1 ? ["(?:", ")"] : ["", ""];
2219
+ i = "^" + a + i + o + "$", this.negate && (i = "^(?!" + i + ").+$");
2220
+ try {
2221
+ this.regexp = new RegExp(i, [...r].join(""));
2222
+ } catch {
2223
+ this.regexp = !1;
2224
+ }
2225
+ return this.regexp;
2226
+ }
2227
+ slashSplit(e) {
2228
+ return this.preserveMultipleSlashes ? e.split("/") : this.isWindows && /^\/\/[^\/]+/.test(e) ? ["", ...e.split(/\/+/)] : e.split(/\/+/);
2229
+ }
2230
+ match(e) {
2231
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.partial;
2232
+ if (this.debug("match", e, this.pattern), this.comment) return !1;
2233
+ if (this.empty) return e === "";
2234
+ if (e === "/" && t) return !0;
2235
+ let n = this.options;
2236
+ this.isWindows && (e = e.split("\\").join("/"));
2237
+ let r = this.slashSplit(e);
2238
+ this.debug(this.pattern, "split", r);
2239
+ let i = this.set;
2240
+ this.debug(this.pattern, "set", i);
2241
+ let a = r[r.length - 1];
2242
+ if (!a) for (let e = r.length - 2; !a && e >= 0; e--) a = r[e];
2243
+ for (let e = 0; e < i.length; e++) {
2244
+ let o = i[e], s = r;
2245
+ if (n.matchBase && o.length === 1 && (s = [a]), this.matchOne(s, o, t)) return !!n.flipNegate || !this.negate;
2246
+ }
2247
+ return !n.flipNegate && this.negate;
2248
+ }
2249
+ static defaults(e) {
2250
+ return L.defaults(e).Minimatch;
2251
+ }
2252
+ };
2253
+ function tn(e) {
2254
+ let t = /* @__PURE__ */ Error(`${arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ""}Invalid response: ${e.status} ${e.statusText}`);
2255
+ return t.status = e.status, t.response = e, t;
2256
+ }
2257
+ function B(e, t) {
2258
+ let { status: n } = t;
2259
+ if (n === 401 && e.digest) return t;
2260
+ if (n >= 400) throw tn(t);
2261
+ return t;
2262
+ }
2263
+ function V(e, t) {
2264
+ return arguments.length > 2 && arguments[2] !== void 0 && arguments[2] ? {
2265
+ data: t,
2266
+ headers: e.headers ? rt(e.headers) : {},
2267
+ status: e.status,
2268
+ statusText: e.statusText
2269
+ } : t;
2270
+ }
2271
+ L.AST = At, L.Minimatch = en, L.escape = function(e) {
2272
+ let { windowsPathsNoEscape: t = !1 } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2273
+ return t ? e.replace(/[?*()[\]]/g, "[$&]") : e.replace(/[?*()[\]\\]/g, "\\$&");
2274
+ }, L.unescape = bt;
2275
+ var nn = (rn = function(e, t, n) {
2276
+ let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, i = I({
2277
+ url: M(e.remoteURL, A(t)),
2278
+ method: "COPY",
2279
+ headers: {
2280
+ Destination: M(e.remoteURL, A(n)),
2281
+ Overwrite: !1 === r.overwrite ? "F" : "T",
2282
+ Depth: r.shallow ? "0" : "infinity"
2283
+ }
2284
+ }, e, r);
2285
+ return o = function(t) {
2286
+ B(e, t);
2287
+ }, (a = F(i, e)) && a.then || (a = Promise.resolve(a)), o ? a.then(o) : a;
2288
+ var a, o;
2289
+ }, function() {
2290
+ var e = [...arguments];
2291
+ try {
2292
+ return Promise.resolve(rn.apply(this, e));
2293
+ } catch (e) {
2294
+ return Promise.reject(e);
2295
+ }
2296
+ }), rn, an = {
2297
+ preserveOrder: !1,
2298
+ attributeNamePrefix: "@_",
2299
+ attributesGroupName: !1,
2300
+ textNodeName: "#text",
2301
+ ignoreAttributes: !0,
2302
+ removeNSPrefix: !1,
2303
+ allowBooleanAttributes: !1,
2304
+ parseTagValue: !0,
2305
+ parseAttributeValue: !1,
2306
+ trimValues: !0,
2307
+ cdataPropName: !1,
2308
+ numberParseOptions: {
2309
+ hex: !0,
2310
+ leadingZeros: !0,
2311
+ eNotation: !0
2312
+ },
2313
+ tagValueProcessor: function(e, t) {
2314
+ return t;
2315
+ },
2316
+ attributeValueProcessor: function(e, t) {
2317
+ return t;
2318
+ },
2319
+ stopNodes: [],
2320
+ alwaysCreateTextNode: !1,
2321
+ isArray: () => !1,
2322
+ commentPropName: !1,
2323
+ unpairedTags: [],
2324
+ processEntities: !0,
2325
+ htmlEntities: !1,
2326
+ ignoreDeclaration: !1,
2327
+ ignorePiTags: !1,
2328
+ transformTagName: !1,
2329
+ transformAttributeName: !1,
2330
+ updateTag: function(e, t, n) {
2331
+ return e;
2332
+ },
2333
+ captureMetaData: !1
2334
+ }, on = /* @__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]*$");
2335
+ function sn(e, t) {
2336
+ let n = [], r = t.exec(e);
2337
+ for (; r;) {
2338
+ let i = [];
2339
+ i.startIndex = t.lastIndex - r[0].length;
2340
+ let a = r.length;
2341
+ for (let e = 0; e < a; e++) i.push(r[e]);
2342
+ n.push(i), r = t.exec(e);
2343
+ }
2344
+ return n;
2345
+ }
2346
+ var cn = function(e) {
2347
+ return on.exec(e) != null;
2348
+ }, ln = typeof Symbol == "function" ? Symbol("XML Node Metadata") : "@@xmlMetadata", H = class {
2349
+ constructor(e) {
2350
+ this.tagname = e, this.child = [], this[":@"] = {};
2351
+ }
2352
+ add(e, t) {
2353
+ e === "__proto__" && (e = "#__proto__"), this.child.push({ [e]: t });
2354
+ }
2355
+ addChild(e, t) {
2356
+ e.tagname === "__proto__" && (e.tagname = "#__proto__"), e[":@"] && Object.keys(e[":@"]).length > 0 ? this.child.push({
2357
+ [e.tagname]: e.child,
2358
+ ":@": e[":@"]
2359
+ }) : this.child.push({ [e.tagname]: e.child }), t !== void 0 && (this.child[this.child.length - 1][ln] = { startIndex: t });
2360
+ }
2361
+ static getMetaDataSymbol() {
2362
+ return ln;
2363
+ }
2364
+ }, un = class {
2365
+ constructor(e) {
2366
+ this.suppressValidationErr = !e;
2367
+ }
2368
+ readDocType(e, t) {
2369
+ let n = {};
2370
+ if (e[t + 3] !== "O" || e[t + 4] !== "C" || e[t + 5] !== "T" || e[t + 6] !== "Y" || e[t + 7] !== "P" || e[t + 8] !== "E") throw Error("Invalid Tag instead of DOCTYPE");
2371
+ {
2372
+ t += 9;
2373
+ let r = 1, i = !1, a = !1, o = "";
2374
+ for (; t < e.length; t++) if (e[t] !== "<" || a) if (e[t] === ">") {
2375
+ if (a ? e[t - 1] === "-" && e[t - 2] === "-" && (a = !1, r--) : r--, r === 0) break;
2376
+ } else e[t] === "[" ? i = !0 : o += e[t];
2377
+ else {
2378
+ if (i && W(e, "!ENTITY", t)) {
2379
+ let r, i;
2380
+ t += 7, [r, i, t] = this.readEntityExp(e, t + 1, this.suppressValidationErr), i.indexOf("&") === -1 && (n[r] = {
2381
+ regx: RegExp(`&${r};`, "g"),
2382
+ val: i
2383
+ });
2384
+ } else if (i && W(e, "!ELEMENT", t)) {
2385
+ t += 8;
2386
+ let { index: n } = this.readElementExp(e, t + 1);
2387
+ t = n;
2388
+ } else if (i && W(e, "!ATTLIST", t)) t += 8;
2389
+ else if (i && W(e, "!NOTATION", t)) {
2390
+ t += 9;
2391
+ let { index: n } = this.readNotationExp(e, t + 1, this.suppressValidationErr);
2392
+ t = n;
2393
+ } else {
2394
+ if (!W(e, "!--", t)) throw Error("Invalid DOCTYPE");
2395
+ a = !0;
2396
+ }
2397
+ r++, o = "";
2398
+ }
2399
+ if (r !== 0) throw Error("Unclosed DOCTYPE");
2400
+ }
2401
+ return {
2402
+ entities: n,
2403
+ i: t
2404
+ };
2405
+ }
2406
+ readEntityExp(e, t) {
2407
+ t = U(e, t);
2408
+ let n = "";
2409
+ for (; t < e.length && !/\s/.test(e[t]) && e[t] !== "\"" && e[t] !== "'";) n += e[t], t++;
2410
+ if (dn(n), t = U(e, t), !this.suppressValidationErr) {
2411
+ if (e.substring(t, t + 6).toUpperCase() === "SYSTEM") throw Error("External entities are not supported");
2412
+ if (e[t] === "%") throw Error("Parameter entities are not supported");
2413
+ }
2414
+ let r = "";
2415
+ return [t, r] = this.readIdentifierVal(e, t, "entity"), [
2416
+ n,
2417
+ r,
2418
+ --t
2419
+ ];
2420
+ }
2421
+ readNotationExp(e, t) {
2422
+ t = U(e, t);
2423
+ let n = "";
2424
+ for (; t < e.length && !/\s/.test(e[t]);) n += e[t], t++;
2425
+ !this.suppressValidationErr && dn(n), t = U(e, t);
2426
+ let r = e.substring(t, t + 6).toUpperCase();
2427
+ if (!this.suppressValidationErr && r !== "SYSTEM" && r !== "PUBLIC") throw Error(`Expected SYSTEM or PUBLIC, found "${r}"`);
2428
+ t += r.length, t = U(e, t);
2429
+ let i = null, a = null;
2430
+ if (r === "PUBLIC") [t, i] = this.readIdentifierVal(e, t, "publicIdentifier"), e[t = U(e, t)] !== "\"" && e[t] !== "'" || ([t, a] = this.readIdentifierVal(e, t, "systemIdentifier"));
2431
+ else if (r === "SYSTEM" && ([t, a] = this.readIdentifierVal(e, t, "systemIdentifier"), !this.suppressValidationErr && !a)) throw Error("Missing mandatory system identifier for SYSTEM notation");
2432
+ return {
2433
+ notationName: n,
2434
+ publicIdentifier: i,
2435
+ systemIdentifier: a,
2436
+ index: --t
2437
+ };
2438
+ }
2439
+ readIdentifierVal(e, t, n) {
2440
+ let r = "", i = e[t];
2441
+ if (i !== "\"" && i !== "'") throw Error(`Expected quoted string, found "${i}"`);
2442
+ for (t++; t < e.length && e[t] !== i;) r += e[t], t++;
2443
+ if (e[t] !== i) throw Error(`Unterminated ${n} value`);
2444
+ return [++t, r];
2445
+ }
2446
+ readElementExp(e, t) {
2447
+ t = U(e, t);
2448
+ let n = "";
2449
+ for (; t < e.length && !/\s/.test(e[t]);) n += e[t], t++;
2450
+ if (!this.suppressValidationErr && !cn(n)) throw Error(`Invalid element name: "${n}"`);
2451
+ let r = "";
2452
+ if (e[t = U(e, t)] === "E" && W(e, "MPTY", t)) t += 4;
2453
+ else if (e[t] === "A" && W(e, "NY", t)) t += 2;
2454
+ else if (e[t] === "(") {
2455
+ for (t++; t < e.length && e[t] !== ")";) r += e[t], t++;
2456
+ if (e[t] !== ")") throw Error("Unterminated content model");
2457
+ } else if (!this.suppressValidationErr) throw Error(`Invalid Element Expression, found "${e[t]}"`);
2458
+ return {
2459
+ elementName: n,
2460
+ contentModel: r.trim(),
2461
+ index: t
2462
+ };
2463
+ }
2464
+ readAttlistExp(e, t) {
2465
+ t = U(e, t);
2466
+ let n = "";
2467
+ for (; t < e.length && !/\s/.test(e[t]);) n += e[t], t++;
2468
+ dn(n), t = U(e, t);
2469
+ let r = "";
2470
+ for (; t < e.length && !/\s/.test(e[t]);) r += e[t], t++;
2471
+ if (!dn(r)) throw Error(`Invalid attribute name: "${r}"`);
2472
+ t = U(e, t);
2473
+ let i = "";
2474
+ if (e.substring(t, t + 8).toUpperCase() === "NOTATION") {
2475
+ if (i = "NOTATION", e[t = U(e, t += 8)] !== "(") throw Error(`Expected '(', found "${e[t]}"`);
2476
+ t++;
2477
+ let n = [];
2478
+ for (; t < e.length && e[t] !== ")";) {
2479
+ let r = "";
2480
+ for (; t < e.length && e[t] !== "|" && e[t] !== ")";) r += e[t], t++;
2481
+ if (r = r.trim(), !dn(r)) throw Error(`Invalid notation name: "${r}"`);
2482
+ n.push(r), e[t] === "|" && (t++, t = U(e, t));
2483
+ }
2484
+ if (e[t] !== ")") throw Error("Unterminated list of notations");
2485
+ t++, i += " (" + n.join("|") + ")";
2486
+ } else {
2487
+ for (; t < e.length && !/\s/.test(e[t]);) i += e[t], t++;
2488
+ if (!this.suppressValidationErr && ![
2489
+ "CDATA",
2490
+ "ID",
2491
+ "IDREF",
2492
+ "IDREFS",
2493
+ "ENTITY",
2494
+ "ENTITIES",
2495
+ "NMTOKEN",
2496
+ "NMTOKENS"
2497
+ ].includes(i.toUpperCase())) throw Error(`Invalid attribute type: "${i}"`);
2498
+ }
2499
+ t = U(e, t);
2500
+ let a = "";
2501
+ 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"), {
2502
+ elementName: n,
2503
+ attributeName: r,
2504
+ attributeType: i,
2505
+ defaultValue: a,
2506
+ index: t
2507
+ };
2508
+ }
2509
+ }, U = (e, t) => {
2510
+ for (; t < e.length && /\s/.test(e[t]);) t++;
2511
+ return t;
2512
+ };
2513
+ function W(e, t, n) {
2514
+ for (let r = 0; r < t.length; r++) if (t[r] !== e[n + r + 1]) return !1;
2515
+ return !0;
2516
+ }
2517
+ function dn(e) {
2518
+ if (cn(e)) return e;
2519
+ throw Error(`Invalid entity name ${e}`);
2520
+ }
2521
+ var fn = /^[-+]?0x[a-fA-F0-9]+$/, pn = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, mn = {
2522
+ hex: !0,
2523
+ leadingZeros: !0,
2524
+ decimalPoint: ".",
2525
+ eNotation: !0
2526
+ }, hn = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
2527
+ function gn(e) {
2528
+ return typeof e == "function" ? e : Array.isArray(e) ? (t) => {
2529
+ for (let n of e) if (typeof n == "string" && t === n || n instanceof RegExp && n.test(t)) return !0;
2530
+ } : () => !1;
2531
+ }
2532
+ var _n = class {
2533
+ constructor(e) {
2534
+ if (this.options = e, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = {
2535
+ apos: {
2536
+ regex: /&(apos|#39|#x27);/g,
2537
+ val: "'"
2538
+ },
2539
+ gt: {
2540
+ regex: /&(gt|#62|#x3E);/g,
2541
+ val: ">"
2542
+ },
2543
+ lt: {
2544
+ regex: /&(lt|#60|#x3C);/g,
2545
+ val: "<"
2546
+ },
2547
+ quot: {
2548
+ regex: /&(quot|#34|#x22);/g,
2549
+ val: "\""
2550
+ }
2551
+ }, this.ampEntity = {
2552
+ regex: /&(amp|#38|#x26);/g,
2553
+ val: "&"
2554
+ }, this.htmlEntities = {
2555
+ space: {
2556
+ regex: /&(nbsp|#160);/g,
2557
+ val: " "
2558
+ },
2559
+ cent: {
2560
+ regex: /&(cent|#162);/g,
2561
+ val: "¢"
2562
+ },
2563
+ pound: {
2564
+ regex: /&(pound|#163);/g,
2565
+ val: "£"
2566
+ },
2567
+ yen: {
2568
+ regex: /&(yen|#165);/g,
2569
+ val: "¥"
2570
+ },
2571
+ euro: {
2572
+ regex: /&(euro|#8364);/g,
2573
+ val: "€"
2574
+ },
2575
+ copyright: {
2576
+ regex: /&(copy|#169);/g,
2577
+ val: "©"
2578
+ },
2579
+ reg: {
2580
+ regex: /&(reg|#174);/g,
2581
+ val: "®"
2582
+ },
2583
+ inr: {
2584
+ regex: /&(inr|#8377);/g,
2585
+ val: "₹"
2586
+ },
2587
+ num_dec: {
2588
+ regex: /&#([0-9]{1,7});/g,
2589
+ val: (e, t) => jn(t, 10, "&#")
2590
+ },
2591
+ num_hex: {
2592
+ regex: /&#x([0-9a-fA-F]{1,6});/g,
2593
+ val: (e, t) => jn(t, 16, "&#x")
2594
+ }
2595
+ }, this.addExternalEntities = vn, this.parseXml = Cn, this.parseTextData = yn, this.resolveNameSpace = bn, this.buildAttributesMap = Sn, this.isItStopNode = Dn, this.replaceEntitiesValue = Tn, this.readStopNodeData = kn, this.saveTextToParentTag = En, this.addChild = wn, this.ignoreAttributesFn = gn(this.options.ignoreAttributes), this.options.stopNodes && this.options.stopNodes.length > 0) {
2596
+ this.stopNodesExact = /* @__PURE__ */ new Set(), this.stopNodesWildcard = /* @__PURE__ */ new Set();
2597
+ for (let e = 0; e < this.options.stopNodes.length; e++) {
2598
+ let t = this.options.stopNodes[e];
2599
+ typeof t == "string" && (t.startsWith("*.") ? this.stopNodesWildcard.add(t.substring(2)) : this.stopNodesExact.add(t));
2600
+ }
2601
+ }
2602
+ }
2603
+ };
2604
+ function vn(e) {
2605
+ let t = Object.keys(e);
2606
+ for (let n = 0; n < t.length; n++) {
2607
+ let r = t[n];
2608
+ this.lastEntities[r] = {
2609
+ regex: RegExp("&" + r + ";", "g"),
2610
+ val: e[r]
2611
+ };
2612
+ }
2613
+ }
2614
+ function yn(e, t, n, r, i, a, o) {
2615
+ if (e !== void 0 && (this.options.trimValues && !r && (e = e.trim()), e.length > 0)) {
2616
+ o || (e = this.replaceEntitiesValue(e));
2617
+ let r = this.options.tagValueProcessor(t, e, n, i, a);
2618
+ return r == null ? e : typeof r != typeof e || r !== e ? r : this.options.trimValues || e.trim() === e ? An(e, this.options.parseTagValue, this.options.numberParseOptions) : e;
2619
+ }
2620
+ }
2621
+ function bn(e) {
2622
+ if (this.options.removeNSPrefix) {
2623
+ let t = e.split(":"), n = e.charAt(0) === "/" ? "/" : "";
2624
+ if (t[0] === "xmlns") return "";
2625
+ t.length === 2 && (e = n + t[1]);
2626
+ }
2627
+ return e;
2628
+ }
2629
+ var xn = /* @__PURE__ */ RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?", "gm");
2630
+ function Sn(e, t) {
2631
+ if (!0 !== this.options.ignoreAttributes && typeof e == "string") {
2632
+ let n = sn(e, xn), r = n.length, i = {};
2633
+ for (let e = 0; e < r; e++) {
2634
+ let r = this.resolveNameSpace(n[e][1]);
2635
+ if (this.ignoreAttributesFn(r, t)) continue;
2636
+ let a = n[e][4], o = this.options.attributeNamePrefix + r;
2637
+ if (r.length) if (this.options.transformAttributeName && (o = this.options.transformAttributeName(o)), o === "__proto__" && (o = "#__proto__"), a !== void 0) {
2638
+ this.options.trimValues && (a = a.trim()), a = this.replaceEntitiesValue(a);
2639
+ let e = this.options.attributeValueProcessor(r, a, t);
2640
+ i[o] = e == null ? a : typeof e != typeof a || e !== a ? e : An(a, this.options.parseAttributeValue, this.options.numberParseOptions);
2641
+ } else this.options.allowBooleanAttributes && (i[o] = !0);
2642
+ }
2643
+ if (!Object.keys(i).length) return;
2644
+ if (this.options.attributesGroupName) {
2645
+ let e = {};
2646
+ return e[this.options.attributesGroupName] = i, e;
2647
+ }
2648
+ return i;
2649
+ }
2650
+ }
2651
+ var Cn = function(e) {
2652
+ e = e.replace(/\r\n?/g, "\n");
2653
+ let t = new H("!xml"), n = t, r = "", i = "", a = new un(this.options.processEntities);
2654
+ for (let o = 0; o < e.length; o++) if (e[o] === "<") if (e[o + 1] === "/") {
2655
+ let t = G(e, ">", o, "Closing Tag is not closed."), a = e.substring(o + 2, t).trim();
2656
+ if (this.options.removeNSPrefix) {
2657
+ let e = a.indexOf(":");
2658
+ e !== -1 && (a = a.substr(e + 1));
2659
+ }
2660
+ this.options.transformTagName && (a = this.options.transformTagName(a)), n && (r = this.saveTextToParentTag(r, n, i));
2661
+ let s = i.substring(i.lastIndexOf(".") + 1);
2662
+ if (a && this.options.unpairedTags.indexOf(a) !== -1) throw Error(`Unpaired tag can not be used as closing tag: </${a}>`);
2663
+ let c = 0;
2664
+ 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;
2665
+ } else if (e[o + 1] === "?") {
2666
+ let t = On(e, o, !1, "?>");
2667
+ if (!t) throw Error("Pi Tag is not closed.");
2668
+ if (r = this.saveTextToParentTag(r, n, i), !(this.options.ignoreDeclaration && t.tagName === "?xml" || this.options.ignorePiTags)) {
2669
+ let e = new H(t.tagName);
2670
+ e.add(this.options.textNodeName, ""), t.tagName !== t.tagExp && t.attrExpPresent && (e[":@"] = this.buildAttributesMap(t.tagExp, i)), this.addChild(n, e, i, o);
2671
+ }
2672
+ o = t.closeIndex + 1;
2673
+ } else if (e.substr(o + 1, 3) === "!--") {
2674
+ let t = G(e, "-->", o + 4, "Comment is not closed.");
2675
+ if (this.options.commentPropName) {
2676
+ let a = e.substring(o + 4, t - 2);
2677
+ r = this.saveTextToParentTag(r, n, i), n.add(this.options.commentPropName, [{ [this.options.textNodeName]: a }]);
2678
+ }
2679
+ o = t;
2680
+ } else if (e.substr(o + 1, 2) === "!D") {
2681
+ let t = a.readDocType(e, o);
2682
+ this.docTypeEntities = t.entities, o = t.i;
2683
+ } else if (e.substr(o + 1, 2) === "![") {
2684
+ let t = G(e, "]]>", o, "CDATA is not closed.") - 2, a = e.substring(o + 9, t);
2685
+ r = this.saveTextToParentTag(r, n, i);
2686
+ let s = this.parseTextData(a, n.tagname, i, !0, !1, !0, !0);
2687
+ s ??= "", this.options.cdataPropName ? n.add(this.options.cdataPropName, [{ [this.options.textNodeName]: a }]) : n.add(this.options.textNodeName, s), o = t + 2;
2688
+ } else {
2689
+ let a = On(e, o, this.options.removeNSPrefix), s = a.tagName, c = a.rawTagName, l = a.tagExp, u = a.attrExpPresent, d = a.closeIndex;
2690
+ if (this.options.transformTagName) {
2691
+ let e = this.options.transformTagName(s);
2692
+ l === s && (l = e), s = e;
2693
+ }
2694
+ n && r && n.tagname !== "!xml" && (r = this.saveTextToParentTag(r, n, i, !1));
2695
+ let f = n;
2696
+ 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);
2697
+ let p = o;
2698
+ if (this.isItStopNode(this.stopNodesExact, this.stopNodesWildcard, i, s)) {
2699
+ let t = "";
2700
+ 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;
2701
+ else if (this.options.unpairedTags.indexOf(s) !== -1) o = a.closeIndex;
2702
+ else {
2703
+ let n = this.readStopNodeData(e, c, d + 1);
2704
+ if (!n) throw Error(`Unexpected end of ${c}`);
2705
+ o = n.i, t = n.tagContent;
2706
+ }
2707
+ let r = new H(s);
2708
+ 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);
2709
+ } else {
2710
+ if (l.length > 0 && l.lastIndexOf("/") === l.length - 1) {
2711
+ 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) {
2712
+ let e = this.options.transformTagName(s);
2713
+ l === s && (l = e), s = e;
2714
+ }
2715
+ let e = new H(s);
2716
+ s !== l && u && (e[":@"] = this.buildAttributesMap(l, i)), this.addChild(n, e, i, p), i = i.substr(0, i.lastIndexOf("."));
2717
+ } else {
2718
+ let e = new H(s);
2719
+ this.tagsNodeStack.push(n), s !== l && u && (e[":@"] = this.buildAttributesMap(l, i)), this.addChild(n, e, i, p), n = e;
2720
+ }
2721
+ r = "", o = d;
2722
+ }
2723
+ }
2724
+ else r += e[o];
2725
+ return t.child;
2726
+ };
2727
+ function wn(e, t, n, r) {
2728
+ this.options.captureMetaData || (r = void 0);
2729
+ let i = this.options.updateTag(t.tagname, n, t[":@"]);
2730
+ !1 === i || (typeof i == "string" && (t.tagname = i), e.addChild(t, r));
2731
+ }
2732
+ var Tn = function(e) {
2733
+ if (this.options.processEntities) {
2734
+ for (let t in this.docTypeEntities) {
2735
+ let n = this.docTypeEntities[t];
2736
+ e = e.replace(n.regx, n.val);
2737
+ }
2738
+ for (let t in this.lastEntities) {
2739
+ let n = this.lastEntities[t];
2740
+ e = e.replace(n.regex, n.val);
2741
+ }
2742
+ if (this.options.htmlEntities) for (let t in this.htmlEntities) {
2743
+ let n = this.htmlEntities[t];
2744
+ e = e.replace(n.regex, n.val);
2745
+ }
2746
+ e = e.replace(this.ampEntity.regex, this.ampEntity.val);
2747
+ }
2748
+ return e;
2749
+ };
2750
+ function En(e, t, n, r) {
2751
+ 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;
2752
+ }
2753
+ function Dn(e, t, n, r) {
2754
+ return !(!t || !t.has(r)) || !(!e || !e.has(n));
2755
+ }
2756
+ function G(e, t, n, r) {
2757
+ let i = e.indexOf(t, n);
2758
+ if (i === -1) throw Error(r);
2759
+ return i + t.length - 1;
2760
+ }
2761
+ function On(e, t, n) {
2762
+ let r = function(e, t) {
2763
+ let n, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ">", i = "";
2764
+ for (let a = t; a < e.length; a++) {
2765
+ let t = e[a];
2766
+ if (n) t === n && (n = "");
2767
+ else if (t === "\"" || t === "'") n = t;
2768
+ else if (t === r[0]) {
2769
+ if (!r[1] || e[a + 1] === r[1]) return {
2770
+ data: i,
2771
+ index: a
2772
+ };
2773
+ } else t === " " && (t = " ");
2774
+ i += t;
2775
+ }
2776
+ }(e, t + 1, arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ">");
2777
+ if (!r) return;
2778
+ let i = r.data, a = r.index, o = i.search(/\s/), s = i, c = !0;
2779
+ o !== -1 && (s = i.substring(0, o), i = i.substring(o + 1).trimStart());
2780
+ let l = s;
2781
+ if (n) {
2782
+ let e = s.indexOf(":");
2783
+ e !== -1 && (s = s.substr(e + 1), c = s !== r.data.substr(e + 1));
2784
+ }
2785
+ return {
2786
+ tagName: s,
2787
+ tagExp: i,
2788
+ closeIndex: a,
2789
+ attrExpPresent: c,
2790
+ rawTagName: l
2791
+ };
2792
+ }
2793
+ function kn(e, t, n) {
2794
+ let r = n, i = 1;
2795
+ for (; n < e.length; n++) if (e[n] === "<") if (e[n + 1] === "/") {
2796
+ let a = G(e, ">", n, `${t} is not closed`);
2797
+ if (e.substring(n + 2, a).trim() === t && (i--, i === 0)) return {
2798
+ tagContent: e.substring(r, n),
2799
+ i: a
2800
+ };
2801
+ n = a;
2802
+ } else if (e[n + 1] === "?") n = G(e, "?>", n + 1, "StopNode is not closed.");
2803
+ else if (e.substr(n + 1, 3) === "!--") n = G(e, "-->", n + 3, "StopNode is not closed.");
2804
+ else if (e.substr(n + 1, 2) === "![") n = G(e, "]]>", n, "StopNode is not closed.") - 2;
2805
+ else {
2806
+ let r = On(e, n, ">");
2807
+ r && ((r && r.tagName) === t && r.tagExp[r.tagExp.length - 1] !== "/" && i++, n = r.closeIndex);
2808
+ }
2809
+ }
2810
+ function An(e, t, n) {
2811
+ if (t && typeof e == "string") {
2812
+ let t = e.trim();
2813
+ return t === "true" || t !== "false" && function(e) {
2814
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2815
+ if (t = Object.assign({}, mn, t), !e || typeof e != "string") return e;
2816
+ let n = e.trim();
2817
+ if (t.skipLike !== void 0 && t.skipLike.test(n)) return e;
2818
+ if (e === "0") return 0;
2819
+ if (t.hex && fn.test(n)) return function(e) {
2820
+ if (parseInt) return parseInt(e, 16);
2821
+ if (Number.parseInt) return Number.parseInt(e, 16);
2822
+ if (window && window.parseInt) return window.parseInt(e, 16);
2823
+ throw Error("parseInt, Number.parseInt, window.parseInt are not supported");
2824
+ }(n);
2825
+ if (n.includes("e") || n.includes("E")) return function(e, t, n) {
2826
+ if (!n.eNotation) return e;
2827
+ let r = t.match(hn);
2828
+ if (r) {
2829
+ 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;
2830
+ 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);
2831
+ }
2832
+ return e;
2833
+ }(e, n, t);
2834
+ {
2835
+ let i = pn.exec(n);
2836
+ if (i) {
2837
+ 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] === ".";
2838
+ if (!t.leadingZeros && (o.length > 1 || o.length === 1 && !c)) return e;
2839
+ {
2840
+ let r = Number(n), i = String(r);
2841
+ if (r === 0) return r;
2842
+ if (i.search(/[eE]/) !== -1) return t.eNotation ? r : e;
2843
+ if (n.indexOf(".") !== -1) return i === "0" || i === s || i === `${a}${s}` ? r : e;
2844
+ let c = o ? s : n;
2845
+ return o ? c === i || a + c === i ? r : e : c === i || c === a + i ? r : e;
2846
+ }
2847
+ }
2848
+ return e;
2849
+ }
2850
+ var r;
2851
+ }(e, n);
2852
+ }
2853
+ return e === void 0 ? "" : e;
2854
+ }
2855
+ function jn(e, t, n) {
2856
+ let r = Number.parseInt(e, t);
2857
+ return r >= 0 && r <= 1114111 ? String.fromCodePoint(r) : n + e + ";";
2858
+ }
2859
+ var Mn = H.getMetaDataSymbol();
2860
+ function Nn(e, t) {
2861
+ return Pn(e, t);
2862
+ }
2863
+ function Pn(e, t, n) {
2864
+ let r, i = {};
2865
+ for (let a = 0; a < e.length; a++) {
2866
+ let o = e[a], s = Fn(o), c = "";
2867
+ if (c = n === void 0 ? s : n + "." + s, s === t.textNodeName) r === void 0 ? r = o[s] : r += "" + o[s];
2868
+ else {
2869
+ if (s === void 0) continue;
2870
+ if (o[s]) {
2871
+ let e = Pn(o[s], t, c), n = Ln(e, t);
2872
+ o[Mn] !== void 0 && (e[Mn] = o[Mn]), o[":@"] ? In(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;
2873
+ }
2874
+ }
2875
+ }
2876
+ return typeof r == "string" ? r.length > 0 && (i[t.textNodeName] = r) : r !== void 0 && (i[t.textNodeName] = r), i;
2877
+ }
2878
+ function Fn(e) {
2879
+ let t = Object.keys(e);
2880
+ for (let e = 0; e < t.length; e++) {
2881
+ let n = t[e];
2882
+ if (n !== ":@") return n;
2883
+ }
2884
+ }
2885
+ function In(e, t, n, r) {
2886
+ if (t) {
2887
+ let i = Object.keys(t), a = i.length;
2888
+ for (let o = 0; o < a; o++) {
2889
+ let a = i[o];
2890
+ r.isArray(a, n + "." + a, !0, !0) ? e[a] = [t[a]] : e[a] = t[a];
2891
+ }
2892
+ }
2893
+ }
2894
+ function Ln(e, t) {
2895
+ let { textNodeName: n } = t, r = Object.keys(e).length;
2896
+ return r === 0 || !(r !== 1 || !e[n] && typeof e[n] != "boolean" && e[n] !== 0);
2897
+ }
2898
+ var Rn = {
2899
+ allowBooleanAttributes: !1,
2900
+ unpairedTags: []
2901
+ };
2902
+ function zn(e) {
2903
+ return e === " " || e === " " || e === "\n" || e === "\r";
2904
+ }
2905
+ function Bn(e, t) {
2906
+ let n = t;
2907
+ for (; t < e.length; t++) if (!(e[t] != "?" && e[t] != " ")) {
2908
+ let r = e.substr(n, t - n);
2909
+ if (t > 5 && r === "xml") return K("InvalidXml", "XML declaration allowed only at the start of the document.", q(e, t));
2910
+ if (e[t] == "?" && e[t + 1] == ">") {
2911
+ t++;
2912
+ break;
2913
+ }
2914
+ }
2915
+ return t;
2916
+ }
2917
+ function Vn(e, t) {
2918
+ if (e.length > t + 5 && e[t + 1] === "-" && e[t + 2] === "-") {
2919
+ for (t += 3; t < e.length; t++) if (e[t] === "-" && e[t + 1] === "-" && e[t + 2] === ">") {
2920
+ t += 2;
2921
+ break;
2922
+ }
2923
+ } else if (e.length > t + 8 && e[t + 1] === "D" && e[t + 2] === "O" && e[t + 3] === "C" && e[t + 4] === "T" && e[t + 5] === "Y" && e[t + 6] === "P" && e[t + 7] === "E") {
2924
+ let n = 1;
2925
+ for (t += 8; t < e.length; t++) if (e[t] === "<") n++;
2926
+ else if (e[t] === ">" && (n--, n === 0)) break;
2927
+ } else if (e.length > t + 9 && e[t + 1] === "[" && e[t + 2] === "C" && e[t + 3] === "D" && e[t + 4] === "A" && e[t + 5] === "T" && e[t + 6] === "A" && e[t + 7] === "[") {
2928
+ for (t += 8; t < e.length; t++) if (e[t] === "]" && e[t + 1] === "]" && e[t + 2] === ">") {
2929
+ t += 2;
2930
+ break;
2931
+ }
2932
+ }
2933
+ return t;
2934
+ }
2935
+ function Hn(e, t) {
2936
+ let n = "", r = "", i = !1;
2937
+ for (; t < e.length; t++) {
2938
+ if (e[t] === "\"" || e[t] === "'") r === "" ? r = e[t] : r !== e[t] || (r = "");
2939
+ else if (e[t] === ">" && r === "") {
2940
+ i = !0;
2941
+ break;
2942
+ }
2943
+ n += e[t];
2944
+ }
2945
+ return r === "" && {
2946
+ value: n,
2947
+ index: t,
2948
+ tagClosed: i
2949
+ };
2950
+ }
2951
+ var Un = /* @__PURE__ */ RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?", "g");
2952
+ function Wn(e, t) {
2953
+ let n = sn(e, Un), r = {};
2954
+ for (let e = 0; e < n.length; e++) {
2955
+ if (n[e][1].length === 0) return K("InvalidAttr", "Attribute '" + n[e][2] + "' has no space in starting.", qn(n[e]));
2956
+ if (n[e][3] !== void 0 && n[e][4] === void 0) return K("InvalidAttr", "Attribute '" + n[e][2] + "' is without value.", qn(n[e]));
2957
+ if (n[e][3] === void 0 && !t.allowBooleanAttributes) return K("InvalidAttr", "boolean attribute '" + n[e][2] + "' is not allowed.", qn(n[e]));
2958
+ let i = n[e][2];
2959
+ if (!Kn(i)) return K("InvalidAttr", "Attribute '" + i + "' is an invalid name.", qn(n[e]));
2960
+ if (r.hasOwnProperty(i)) return K("InvalidAttr", "Attribute '" + i + "' is repeated.", qn(n[e]));
2961
+ r[i] = 1;
2962
+ }
2963
+ return !0;
2964
+ }
2965
+ function Gn(e, t) {
2966
+ if (e[++t] === ";") return -1;
2967
+ if (e[t] === "#") return function(e, t) {
2968
+ let n = /\d/;
2969
+ for (e[t] === "x" && (t++, n = /[\da-fA-F]/); t < e.length; t++) {
2970
+ if (e[t] === ";") return t;
2971
+ if (!e[t].match(n)) break;
2972
+ }
2973
+ return -1;
2974
+ }(e, ++t);
2975
+ let n = 0;
2976
+ for (; t < e.length; t++, n++) if (!(e[t].match(/\w/) && n < 20)) {
2977
+ if (e[t] === ";") break;
2978
+ return -1;
2979
+ }
2980
+ return t;
2981
+ }
2982
+ function K(e, t, n) {
2983
+ return { err: {
2984
+ code: e,
2985
+ msg: t,
2986
+ line: n.line || n,
2987
+ col: n.col
2988
+ } };
2989
+ }
2990
+ function Kn(e) {
2991
+ return cn(e);
2992
+ }
2993
+ function q(e, t) {
2994
+ let n = e.substring(0, t).split(/\r?\n/);
2995
+ return {
2996
+ line: n.length,
2997
+ col: n[n.length - 1].length + 1
2998
+ };
2999
+ }
3000
+ function qn(e) {
3001
+ return e.startIndex + e[1].length;
3002
+ }
3003
+ var Jn = class {
3004
+ constructor(e) {
3005
+ this.externalEntities = {}, this.options = function(e) {
3006
+ return Object.assign({}, an, e);
3007
+ }(e);
3008
+ }
3009
+ parse(e, t) {
3010
+ if (typeof e != "string" && e.toString) e = e.toString();
3011
+ else if (typeof e != "string") throw Error("XML data is accepted in String or Bytes[] form.");
3012
+ if (t) {
3013
+ !0 === t && (t = {});
3014
+ let n = function(e, t) {
3015
+ t = Object.assign({}, Rn, t);
3016
+ let n = [], r = !1, i = !1;
3017
+ e[0] === "" && (e = e.substr(1));
3018
+ for (let a = 0; a < e.length; a++) if (e[a] === "<" && e[a + 1] === "?") {
3019
+ if (a += 2, a = Bn(e, a), a.err) return a;
3020
+ } else {
3021
+ if (e[a] !== "<") {
3022
+ if (zn(e[a])) continue;
3023
+ return K("InvalidChar", "char '" + e[a] + "' is not expected.", q(e, a));
3024
+ }
3025
+ {
3026
+ let o = a;
3027
+ if (a++, e[a] === "!") {
3028
+ a = Vn(e, a);
3029
+ continue;
3030
+ }
3031
+ {
3032
+ let s = !1;
3033
+ e[a] === "/" && (s = !0, a++);
3034
+ let c = "";
3035
+ for (; a < e.length && e[a] !== ">" && e[a] !== " " && e[a] !== " " && e[a] !== "\n" && e[a] !== "\r"; a++) c += e[a];
3036
+ if (c = c.trim(), c[c.length - 1] === "/" && (c = c.substring(0, c.length - 1), a--), !cn(c)) {
3037
+ let t;
3038
+ return t = c.trim().length === 0 ? "Invalid space after '<'." : "Tag '" + c + "' is an invalid name.", K("InvalidTag", t, q(e, a));
3039
+ }
3040
+ let l = Hn(e, a);
3041
+ if (!1 === l) return K("InvalidAttr", "Attributes for '" + c + "' have open quote.", q(e, a));
3042
+ let u = l.value;
3043
+ if (a = l.index, u[u.length - 1] === "/") {
3044
+ let n = a - u.length;
3045
+ u = u.substring(0, u.length - 1);
3046
+ let i = Wn(u, t);
3047
+ if (!0 !== i) return K(i.err.code, i.err.msg, q(e, n + i.err.line));
3048
+ r = !0;
3049
+ } else if (s) {
3050
+ if (!l.tagClosed) return K("InvalidTag", "Closing tag '" + c + "' doesn't have proper closing.", q(e, a));
3051
+ if (u.trim().length > 0) return K("InvalidTag", "Closing tag '" + c + "' can't have attributes or invalid starting.", q(e, o));
3052
+ if (n.length === 0) return K("InvalidTag", "Closing tag '" + c + "' has not been opened.", q(e, o));
3053
+ {
3054
+ let t = n.pop();
3055
+ if (c !== t.tagName) {
3056
+ let n = q(e, t.tagStartPos);
3057
+ return K("InvalidTag", "Expected closing tag '" + t.tagName + "' (opened in line " + n.line + ", col " + n.col + ") instead of closing tag '" + c + "'.", q(e, o));
3058
+ }
3059
+ n.length == 0 && (i = !0);
3060
+ }
3061
+ } else {
3062
+ let s = Wn(u, t);
3063
+ if (!0 !== s) return K(s.err.code, s.err.msg, q(e, a - u.length + s.err.line));
3064
+ if (!0 === i) return K("InvalidXml", "Multiple possible root nodes found.", q(e, a));
3065
+ t.unpairedTags.indexOf(c) !== -1 || n.push({
3066
+ tagName: c,
3067
+ tagStartPos: o
3068
+ }), r = !0;
3069
+ }
3070
+ for (a++; a < e.length; a++) if (e[a] === "<") {
3071
+ if (e[a + 1] === "!") {
3072
+ a++, a = Vn(e, a);
3073
+ continue;
3074
+ }
3075
+ if (e[a + 1] !== "?") break;
3076
+ if (a = Bn(e, ++a), a.err) return a;
3077
+ } else if (e[a] === "&") {
3078
+ let t = Gn(e, a);
3079
+ if (t == -1) return K("InvalidChar", "char '&' is not expected.", q(e, a));
3080
+ a = t;
3081
+ } else if (!0 === i && !zn(e[a])) return K("InvalidXml", "Extra text at the end", q(e, a));
3082
+ e[a] === "<" && a--;
3083
+ }
3084
+ }
3085
+ }
3086
+ 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.", {
3087
+ line: 1,
3088
+ col: 1
3089
+ }) : K("InvalidXml", "Start tag expected.", 1);
3090
+ }(e, t);
3091
+ if (!0 !== n) throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`);
3092
+ }
3093
+ let n = new _n(this.options);
3094
+ n.addExternalEntities(this.externalEntities);
3095
+ let r = n.parseXml(e);
3096
+ return this.options.preserveOrder || r === void 0 ? r : Nn(r, this.options);
3097
+ }
3098
+ addEntity(e, t) {
3099
+ if (t.indexOf("&") !== -1) throw Error("Entity value can't have '&'");
3100
+ if (e.indexOf("&") !== -1 || e.indexOf(";") !== -1) throw Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");
3101
+ if (t === "&") throw Error("An entity with value '&' is not permitted");
3102
+ this.externalEntities[e] = t;
3103
+ }
3104
+ static getMetaDataSymbol() {
3105
+ return H.getMetaDataSymbol();
3106
+ }
3107
+ }, Yn = O(829), J = O.n(Yn), Y = function(e) {
3108
+ return e.Array = "array", e.Object = "object", e.Original = "original", e;
3109
+ }(Y || {});
3110
+ function Xn(e, t) {
3111
+ if (!e.endsWith("propstat.prop.displayname")) return t;
3112
+ }
3113
+ function Zn(e, t) {
3114
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Y.Original, r = J().get(e, t);
3115
+ return n === "array" && !1 === Array.isArray(r) ? [r] : n === "object" && Array.isArray(r) ? r[0] : r;
3116
+ }
3117
+ function Qn(e, t) {
3118
+ return t ??= {
3119
+ attributeNamePrefix: "@",
3120
+ attributeParsers: [],
3121
+ tagParsers: [Xn]
3122
+ }, new Promise(((n) => {
3123
+ n(function(e) {
3124
+ let { multistatus: t } = e;
3125
+ if (t === "") return { multistatus: { response: [] } };
3126
+ if (!t) throw Error("Invalid response: No root multistatus found");
3127
+ let n = { multistatus: Array.isArray(t) ? t[0] : t };
3128
+ return J().set(n, "multistatus.response", Zn(n, "multistatus.response", Y.Array)), J().set(n, "multistatus.response", J().get(n, "multistatus.response").map(((e) => function(e) {
3129
+ let t = Object.assign({}, e);
3130
+ return t.status ? J().set(t, "status", Zn(t, "status", Y.Object)) : (J().set(t, "propstat", Zn(t, "propstat", Y.Object)), J().set(t, "propstat.prop", Zn(t, "propstat.prop", Y.Object))), t;
3131
+ }(e)))), n;
3132
+ }(function(e) {
3133
+ let { attributeNamePrefix: t, attributeParsers: n, tagParsers: r } = e;
3134
+ return new Jn({
3135
+ allowBooleanAttributes: !0,
3136
+ attributeNamePrefix: t,
3137
+ textNodeName: "text",
3138
+ ignoreAttributes: !1,
3139
+ removeNSPrefix: !0,
3140
+ numberParseOptions: {
3141
+ hex: !0,
3142
+ leadingZeros: !1
3143
+ },
3144
+ attributeValueProcessor(e, t, r) {
3145
+ for (let e of n) try {
3146
+ let n = e(r, t);
3147
+ if (n !== t) return n;
3148
+ } catch {}
3149
+ return t;
3150
+ },
3151
+ tagValueProcessor(e, t, n) {
3152
+ for (let e of r) try {
3153
+ let r = e(n, t);
3154
+ if (r !== t) return r;
3155
+ } catch {}
3156
+ return t;
3157
+ }
3158
+ });
3159
+ }(t).parse(e)));
3160
+ }));
3161
+ }
3162
+ function $n(e, t) {
3163
+ 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 = {
3164
+ filename: t,
3165
+ basename: Me().basename(t),
3166
+ lastmod: r,
3167
+ size: parseInt(i, 10),
3168
+ type: c,
3169
+ etag: typeof s == "string" ? s.replace(/"/g, "") : null
3170
+ };
3171
+ 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;
3172
+ }
3173
+ function er(e, t) {
3174
+ let n = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r = null;
3175
+ try {
3176
+ e.multistatus.response[0].propstat && (r = e.multistatus.response[0]);
3177
+ } catch {}
3178
+ if (!r) throw Error("Failed getting item stat: bad response");
3179
+ let { propstat: { prop: i, status: a } } = r, [o, s, c] = a.split(" ", 3), l = parseInt(s, 10);
3180
+ if (l >= 400) {
3181
+ let e = /* @__PURE__ */ Error(`Invalid response: ${l} ${c}`);
3182
+ throw e.status = l, e;
3183
+ }
3184
+ return $n(i, j(t), n);
3185
+ }
3186
+ function tr(e) {
3187
+ switch (String(e)) {
3188
+ case "-3": return "unlimited";
3189
+ case "-2":
3190
+ case "-1": return "unknown";
3191
+ default: return parseInt(String(e), 10);
3192
+ }
3193
+ }
3194
+ function nr(e, t, n) {
3195
+ return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3196
+ }
3197
+ var rr = function(e) {
3198
+ return function() {
3199
+ var t = [...arguments];
3200
+ try {
3201
+ return Promise.resolve(e.apply(this, t));
3202
+ } catch (e) {
3203
+ return Promise.reject(e);
3204
+ }
3205
+ };
3206
+ }((function(e, t) {
3207
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, { details: r = !1 } = n;
3208
+ return nr(F(I({
3209
+ url: M(e.remoteURL, A(t)),
3210
+ method: "PROPFIND",
3211
+ headers: {
3212
+ Accept: "text/plain,application/xml",
3213
+ Depth: "0"
3214
+ }
3215
+ }, e, n), e), (function(n) {
3216
+ return B(e, n), nr(n.text(), (function(i) {
3217
+ return nr(Qn(i, e.parsing), (function(e) {
3218
+ return V(n, er(e, t, r), r);
3219
+ }));
3220
+ }));
3221
+ }));
3222
+ }));
3223
+ function ir(e, t, n) {
3224
+ return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3225
+ }
3226
+ var ar = or((function(e, t) {
3227
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = function(e) {
3228
+ if (!e || e === "/") return [];
3229
+ let t = e, n = [];
3230
+ do
3231
+ n.push(t), t = Me().dirname(t);
3232
+ while (t && t !== "/");
3233
+ return n;
3234
+ }(j(t));
3235
+ r.sort(((e, t) => e.length > t.length ? 1 : t.length > e.length ? -1 : 0));
3236
+ let i = !1;
3237
+ return function(e, t, n) {
3238
+ if (typeof e[lr] == "function") {
3239
+ var r, i, a, o = e[lr]();
3240
+ function n(e) {
3241
+ try {
3242
+ for (; !(r = o.next()).done;) if ((e = t(r.value)) && e.then) {
3243
+ if (!ur(e)) return void e.then(n, a ||= X.bind(null, i = new Z(), 2));
3244
+ e = e.v;
3245
+ }
3246
+ i ? X(i, 1, e) : i = e;
3247
+ } catch (e) {
3248
+ X(i ||= new Z(), 2, e);
3249
+ }
3250
+ }
3251
+ if (n(), o.return) {
3252
+ var s = function(e) {
3253
+ try {
3254
+ r.done || o.return();
3255
+ } catch {}
3256
+ return e;
3257
+ };
3258
+ if (i && i.then) return i.then(s, (function(e) {
3259
+ throw s(e);
3260
+ }));
3261
+ s();
3262
+ }
3263
+ return i;
3264
+ }
3265
+ if (!("length" in e)) throw TypeError("Object is not iterable");
3266
+ for (var c = [], l = 0; l < e.length; l++) c.push(e[l]);
3267
+ return function(e, t, n) {
3268
+ var r, i, a = -1;
3269
+ return function o(s) {
3270
+ try {
3271
+ for (; ++a < e.length && (!n || !n());) if ((s = t(a)) && s.then) {
3272
+ if (!ur(s)) return void s.then(o, i ||= X.bind(null, r = new Z(), 2));
3273
+ s = s.v;
3274
+ }
3275
+ r ? X(r, 1, s) : r = s;
3276
+ } catch (e) {
3277
+ X(r ||= new Z(), 2, e);
3278
+ }
3279
+ }(), r;
3280
+ }(c, (function(e) {
3281
+ return t(c[e]);
3282
+ }), n);
3283
+ }(r, (function(r) {
3284
+ return a = function() {
3285
+ return function(n, i) {
3286
+ try {
3287
+ var a = ir(rr(e, r), (function(e) {
3288
+ if (e.type !== "directory") throw Error(`Path includes a file: ${t}`);
3289
+ }));
3290
+ } catch (e) {
3291
+ return i(e);
3292
+ }
3293
+ return a && a.then ? a.then(void 0, i) : a;
3294
+ }(0, (function(t) {
3295
+ let a = t;
3296
+ return function() {
3297
+ if (a.status === 404) return i = !0, cr(dr(e, r, {
3298
+ ...n,
3299
+ recursive: !1
3300
+ }));
3301
+ throw t;
3302
+ }();
3303
+ }));
3304
+ }, (o = function() {
3305
+ if (i) return cr(dr(e, r, {
3306
+ ...n,
3307
+ recursive: !1
3308
+ }));
3309
+ }()) && o.then ? o.then(a) : a();
3310
+ var a, o;
3311
+ }), (function() {
3312
+ return !1;
3313
+ }));
3314
+ }));
3315
+ function or(e) {
3316
+ return function() {
3317
+ var t = [...arguments];
3318
+ try {
3319
+ return Promise.resolve(e.apply(this, t));
3320
+ } catch (e) {
3321
+ return Promise.reject(e);
3322
+ }
3323
+ };
3324
+ }
3325
+ function sr() {}
3326
+ function cr(e, t) {
3327
+ if (!t) return e && e.then ? e.then(sr) : Promise.resolve();
3328
+ }
3329
+ var lr = typeof Symbol < "u" ? Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator")) : "@@iterator";
3330
+ function X(e, t, n) {
3331
+ if (!e.s) {
3332
+ if (n instanceof Z) {
3333
+ if (!n.s) return void (n.o = X.bind(null, e, t));
3334
+ 1 & t && (t = n.s), n = n.v;
3335
+ }
3336
+ if (n && n.then) return void n.then(X.bind(null, e, t), X.bind(null, e, 2));
3337
+ e.s = t, e.v = n;
3338
+ let r = e.o;
3339
+ r && r(e);
3340
+ }
3341
+ }
3342
+ var Z = function() {
3343
+ function e() {}
3344
+ return e.prototype.then = function(t, n) {
3345
+ let r = new e(), i = this.s;
3346
+ if (i) {
3347
+ let e = 1 & i ? t : n;
3348
+ if (e) {
3349
+ try {
3350
+ X(r, 1, e(this.v));
3351
+ } catch (e) {
3352
+ X(r, 2, e);
3353
+ }
3354
+ return r;
3355
+ }
3356
+ return this;
3357
+ }
3358
+ return this.o = function(e) {
3359
+ try {
3360
+ let i = e.v;
3361
+ 1 & e.s ? X(r, 1, t ? t(i) : i) : n ? X(r, 1, n(i)) : X(r, 2, i);
3362
+ } catch (e) {
3363
+ X(r, 2, e);
3364
+ }
3365
+ }, r;
3366
+ }, e;
3367
+ }();
3368
+ function ur(e) {
3369
+ return e instanceof Z && 1 & e.s;
3370
+ }
3371
+ var dr = or((function(e, t) {
3372
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3373
+ if (!0 === n.recursive) return ar(e, t, n);
3374
+ let r = I({
3375
+ url: M(e.remoteURL, (i = A(t), i.endsWith("/") ? i : i + "/")),
3376
+ method: "MKCOL"
3377
+ }, e, n);
3378
+ var i;
3379
+ return ir(F(r, e), (function(t) {
3380
+ B(e, t);
3381
+ }));
3382
+ })), fr = O(388), pr = O.n(fr), mr = function(e) {
3383
+ return function() {
3384
+ var t = [...arguments];
3385
+ try {
3386
+ return Promise.resolve(e.apply(this, t));
3387
+ } catch (e) {
3388
+ return Promise.reject(e);
3389
+ }
3390
+ };
3391
+ }((function(e, t) {
3392
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = {};
3393
+ if (typeof n.range == "object" && typeof n.range.start == "number") {
3394
+ let e = `bytes=${n.range.start}-`;
3395
+ typeof n.range.end == "number" && (e = `${e}${n.range.end}`), r.Range = e;
3396
+ }
3397
+ let i = I({
3398
+ url: M(e.remoteURL, A(t)),
3399
+ method: "GET",
3400
+ headers: r
3401
+ }, e, n);
3402
+ return o = function(t) {
3403
+ if (B(e, t), r.Range && t.status !== 206) {
3404
+ let e = /* @__PURE__ */ Error(`Invalid response code for partial request: ${t.status}`);
3405
+ throw e.status = t.status, e;
3406
+ }
3407
+ return n.callback && setTimeout((() => {
3408
+ n.callback(t);
3409
+ }), 0), t.body;
3410
+ }, (a = F(i, e)) && a.then || (a = Promise.resolve(a)), o ? a.then(o) : a;
3411
+ var a, o;
3412
+ })), hr = () => {}, gr = function(e) {
3413
+ return function() {
3414
+ var t = [...arguments];
3415
+ try {
3416
+ return Promise.resolve(e.apply(this, t));
3417
+ } catch (e) {
3418
+ return Promise.reject(e);
3419
+ }
3420
+ };
3421
+ }((function(e, t, n) {
3422
+ n.url ||= M(e.remoteURL, A(t));
3423
+ let r = I(n, e, {});
3424
+ return a = function(t) {
3425
+ return B(e, t), t;
3426
+ }, (i = F(r, e)) && i.then || (i = Promise.resolve(i)), a ? i.then(a) : i;
3427
+ var i, a;
3428
+ })), _r = function(e) {
3429
+ return function() {
3430
+ var t = [...arguments];
3431
+ try {
3432
+ return Promise.resolve(e.apply(this, t));
3433
+ } catch (e) {
3434
+ return Promise.reject(e);
3435
+ }
3436
+ };
3437
+ }((function(e, t) {
3438
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = I({
3439
+ url: M(e.remoteURL, A(t)),
3440
+ method: "DELETE"
3441
+ }, e, n);
3442
+ return a = function(t) {
3443
+ B(e, t);
3444
+ }, (i = F(r, e)) && i.then || (i = Promise.resolve(i)), a ? i.then(a) : i;
3445
+ var i, a;
3446
+ })), vr = function(e) {
3447
+ return function() {
3448
+ var t = [...arguments];
3449
+ try {
3450
+ return Promise.resolve(e.apply(this, t));
3451
+ } catch (e) {
3452
+ return Promise.reject(e);
3453
+ }
3454
+ };
3455
+ }((function(e, t) {
3456
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3457
+ return function(r, i) {
3458
+ try {
3459
+ var a = (o = rr(e, t, n), s = function() {
3460
+ return !0;
3461
+ }, c ? s ? s(o) : o : (o && o.then || (o = Promise.resolve(o)), s ? o.then(s) : o));
3462
+ } catch (e) {
3463
+ return i(e);
3464
+ }
3465
+ var o, s, c;
3466
+ return a && a.then ? a.then(void 0, i) : a;
3467
+ }(0, (function(e) {
3468
+ if (e.status === 404) return !1;
3469
+ throw e;
3470
+ }));
3471
+ }));
3472
+ function yr(e, t, n) {
3473
+ return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3474
+ }
3475
+ var br = function(e) {
3476
+ return function() {
3477
+ var t = [...arguments];
3478
+ try {
3479
+ return Promise.resolve(e.apply(this, t));
3480
+ } catch (e) {
3481
+ return Promise.reject(e);
3482
+ }
3483
+ };
3484
+ }((function(e, t) {
3485
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3486
+ return yr(F(I({
3487
+ url: M(e.remoteURL, A(t), "/"),
3488
+ method: "PROPFIND",
3489
+ headers: {
3490
+ Accept: "text/plain,application/xml",
3491
+ Depth: n.deep ? "infinity" : "1"
3492
+ }
3493
+ }, e, n), e), (function(r) {
3494
+ return B(e, r), yr(r.text(), (function(i) {
3495
+ if (!i) throw Error("Failed parsing directory contents: Empty response");
3496
+ return yr(Qn(i, e.parsing), (function(i) {
3497
+ let a = Fe(t), o = function(e, t, n) {
3498
+ let r = arguments.length > 3 && arguments[3] !== void 0 && arguments[3], i = arguments.length > 4 && arguments[4] !== void 0 && arguments[4], a = Me().join(t, "/"), { multistatus: { response: o } } = e, s = o.map(((e) => {
3499
+ let t = function(e) {
3500
+ try {
3501
+ return e.replace(/^https?:\/\/[^\/]+/, "");
3502
+ } catch (e) {
3503
+ throw new k(e, "Failed normalising HREF");
3504
+ }
3505
+ }(e.href), { propstat: { prop: n } } = e;
3506
+ return $n(n, a === "/" ? decodeURIComponent(j(t)) : j(Me().relative(decodeURIComponent(a), decodeURIComponent(t))), r);
3507
+ }));
3508
+ return i ? s : s.filter(((e) => e.basename && (e.type === "file" || e.filename !== n.replace(/\/$/, ""))));
3509
+ }(i, Fe(e.remoteBasePath || e.remotePath), a, n.details, n.includeSelf);
3510
+ return n.glob && (o = function(e, t) {
3511
+ return e.filter(((e) => L(e.filename, t, { matchBase: !0 })));
3512
+ }(o, n.glob)), V(r, o, n.details);
3513
+ }));
3514
+ }));
3515
+ }));
3516
+ }));
3517
+ function xr(e) {
3518
+ return function() {
3519
+ var t = [...arguments];
3520
+ try {
3521
+ return Promise.resolve(e.apply(this, t));
3522
+ } catch (e) {
3523
+ return Promise.reject(e);
3524
+ }
3525
+ };
3526
+ }
3527
+ var Sr = xr((function(e, t) {
3528
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3529
+ return Cr(F(I({
3530
+ url: M(e.remoteURL, A(t)),
3531
+ method: "GET",
3532
+ headers: { Accept: "text/plain" },
3533
+ transformResponse: [Er]
3534
+ }, e, n), e), (function(t) {
3535
+ return B(e, t), Cr(t.text(), (function(e) {
3536
+ return V(t, e, n.details);
3537
+ }));
3538
+ }));
3539
+ }));
3540
+ function Cr(e, t, n) {
3541
+ return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3542
+ }
3543
+ var wr = xr((function(e, t) {
3544
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3545
+ return Cr(F(I({
3546
+ url: M(e.remoteURL, A(t)),
3547
+ method: "GET"
3548
+ }, e, n), e), (function(t) {
3549
+ let r;
3550
+ return B(e, t), function(e, t) {
3551
+ var n = e();
3552
+ return n && n.then ? n.then(t) : t();
3553
+ }((function() {
3554
+ return Cr(t.arrayBuffer(), (function(e) {
3555
+ r = e;
3556
+ }));
3557
+ }), (function() {
3558
+ return V(t, r, n.details);
3559
+ }));
3560
+ }));
3561
+ })), Tr = xr((function(e, t) {
3562
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, { format: r = "binary" } = n;
3563
+ if (r !== "binary" && r !== "text") throw new k({ info: { code: P.InvalidOutputFormat } }, `Invalid output format: ${r}`);
3564
+ return r === "text" ? Sr(e, t, n) : wr(e, t, n);
3565
+ })), Er = (e) => e;
3566
+ function Dr(e, t) {
3567
+ let n = "";
3568
+ return t.format && t.indentBy.length > 0 && (n = "\n"), Or(e, t, "", n);
3569
+ }
3570
+ function Or(e, t, n, r) {
3571
+ let i = "", a = !1;
3572
+ for (let o = 0; o < e.length; o++) {
3573
+ let s = e[o], c = kr(s);
3574
+ if (c === void 0) continue;
3575
+ let l = "";
3576
+ if (l = n.length === 0 ? c : `${n}.${c}`, c === t.textNodeName) {
3577
+ let e = s[c];
3578
+ jr(l, t) || (e = t.tagValueProcessor(c, e), e = Mr(e, t)), a && (i += r), i += e, a = !1;
3579
+ continue;
3580
+ }
3581
+ if (c === t.cdataPropName) {
3582
+ a && (i += r), i += `<![CDATA[${s[c][0][t.textNodeName]}]]>`, a = !1;
3583
+ continue;
3584
+ }
3585
+ if (c === t.commentPropName) {
3586
+ i += r + `\x3c!--${s[c][0][t.textNodeName]}--\x3e`, a = !0;
3587
+ continue;
3588
+ }
3589
+ if (c[0] === "?") {
3590
+ let e = Ar(s[":@"], t), n = c === "?xml" ? "" : r, o = s[c][0][t.textNodeName];
3591
+ o = o.length === 0 ? "" : " " + o, i += n + `<${c}${o}${e}?>`, a = !0;
3592
+ continue;
3593
+ }
3594
+ let u = r;
3595
+ u !== "" && (u += t.indentBy);
3596
+ let d = r + `<${c}${Ar(s[":@"], t)}`, f = Or(s[c], t, l, u);
3597
+ 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;
3598
+ }
3599
+ return i;
3600
+ }
3601
+ function kr(e) {
3602
+ let t = Object.keys(e);
3603
+ for (let n = 0; n < t.length; n++) {
3604
+ let r = t[n];
3605
+ if (e.hasOwnProperty(r) && r !== ":@") return r;
3606
+ }
3607
+ }
3608
+ function Ar(e, t) {
3609
+ let n = "";
3610
+ if (e && !t.ignoreAttributes) for (let r in e) {
3611
+ if (!e.hasOwnProperty(r)) continue;
3612
+ let i = t.attributeValueProcessor(r, e[r]);
3613
+ i = Mr(i, t), !0 === i && t.suppressBooleanAttributes ? n += ` ${r.substr(t.attributeNamePrefix.length)}` : n += ` ${r.substr(t.attributeNamePrefix.length)}="${i}"`;
3614
+ }
3615
+ return n;
3616
+ }
3617
+ function jr(e, t) {
3618
+ let n = (e = e.substr(0, e.length - t.textNodeName.length - 1)).substr(e.lastIndexOf(".") + 1);
3619
+ for (let r in t.stopNodes) if (t.stopNodes[r] === e || t.stopNodes[r] === "*." + n) return !0;
3620
+ return !1;
3621
+ }
3622
+ function Mr(e, t) {
3623
+ if (e && e.length > 0 && t.processEntities) for (let n = 0; n < t.entities.length; n++) {
3624
+ let r = t.entities[n];
3625
+ e = e.replace(r.regex, r.val);
3626
+ }
3627
+ return e;
3628
+ }
3629
+ var Nr = {
3630
+ attributeNamePrefix: "@_",
3631
+ attributesGroupName: !1,
3632
+ textNodeName: "#text",
3633
+ ignoreAttributes: !0,
3634
+ cdataPropName: !1,
3635
+ format: !1,
3636
+ indentBy: " ",
3637
+ suppressEmptyNode: !1,
3638
+ suppressUnpairedNode: !0,
3639
+ suppressBooleanAttributes: !0,
3640
+ tagValueProcessor: function(e, t) {
3641
+ return t;
3642
+ },
3643
+ attributeValueProcessor: function(e, t) {
3644
+ return t;
3645
+ },
3646
+ preserveOrder: !1,
3647
+ commentPropName: !1,
3648
+ unpairedTags: [],
3649
+ entities: [
3650
+ {
3651
+ regex: /* @__PURE__ */ RegExp("&", "g"),
3652
+ val: "&amp;"
3653
+ },
3654
+ {
3655
+ regex: /* @__PURE__ */ RegExp(">", "g"),
3656
+ val: "&gt;"
3657
+ },
3658
+ {
3659
+ regex: /* @__PURE__ */ RegExp("<", "g"),
3660
+ val: "&lt;"
3661
+ },
3662
+ {
3663
+ regex: /* @__PURE__ */ RegExp("'", "g"),
3664
+ val: "&apos;"
3665
+ },
3666
+ {
3667
+ regex: /* @__PURE__ */ RegExp("\"", "g"),
3668
+ val: "&quot;"
3669
+ }
3670
+ ],
3671
+ processEntities: !0,
3672
+ stopNodes: [],
3673
+ oneListGroup: !1
3674
+ };
3675
+ function Q(e) {
3676
+ this.options = Object.assign({}, Nr, e), !0 === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {
3677
+ return !1;
3678
+ } : (this.ignoreAttributesFn = gn(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = Ir), this.processTextOrObjNode = Pr, this.options.format ? (this.indentate = Fr, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
3679
+ return "";
3680
+ }, this.tagEndChar = ">", this.newLine = "");
3681
+ }
3682
+ function Pr(e, t, n, r) {
3683
+ let i = this.j2x(e, n + 1, r.concat(t));
3684
+ 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);
3685
+ }
3686
+ function Fr(e) {
3687
+ return this.options.indentBy.repeat(e);
3688
+ }
3689
+ function Ir(e) {
3690
+ return !(!e.startsWith(this.options.attributeNamePrefix) || e === this.options.textNodeName) && e.substr(this.attrPrefixLen);
3691
+ }
3692
+ function Lr(e) {
3693
+ return new Q({
3694
+ attributeNamePrefix: "@_",
3695
+ format: !0,
3696
+ ignoreAttributes: !1,
3697
+ suppressEmptyNode: !0
3698
+ }).build(Rr({ lockinfo: {
3699
+ "@_xmlns:d": "DAV:",
3700
+ lockscope: { exclusive: {} },
3701
+ locktype: { write: {} },
3702
+ owner: { href: e }
3703
+ } }, "d"));
3704
+ }
3705
+ function Rr(e, t) {
3706
+ let n = { ...e };
3707
+ for (let e in n) n.hasOwnProperty(e) && (n[e] && typeof n[e] == "object" && e.indexOf(":") === -1 ? (n[`${t}:${e}`] = Rr(n[e], t), delete n[e]) : !1 === /^@_/.test(e) && (n[`${t}:${e}`] = n[e], delete n[e]));
3708
+ return n;
3709
+ }
3710
+ function zr(e, t, n) {
3711
+ return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3712
+ }
3713
+ function Br(e) {
3714
+ return function() {
3715
+ var t = [...arguments];
3716
+ try {
3717
+ return Promise.resolve(e.apply(this, t));
3718
+ } catch (e) {
3719
+ return Promise.reject(e);
3720
+ }
3721
+ };
3722
+ }
3723
+ Q.prototype.build = function(e) {
3724
+ return this.options.preserveOrder ? Dr(e, this.options) : (Array.isArray(e) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (e = { [this.options.arrayNodeName]: e }), this.j2x(e, 0, []).val);
3725
+ }, Q.prototype.j2x = function(e, t, n) {
3726
+ let r = "", i = "", a = n.join(".");
3727
+ for (let o in e) if (Object.prototype.hasOwnProperty.call(e, o)) if (e[o] === void 0) this.isAttribute(o) && (i += "");
3728
+ 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;
3729
+ else if (e[o] instanceof Date) i += this.buildTextValNode(e[o], o, "", t);
3730
+ else if (typeof e[o] != "object") {
3731
+ let n = this.isAttribute(o);
3732
+ if (n && !this.ignoreAttributesFn(n, a)) r += this.buildAttrPairStr(n, "" + e[o]);
3733
+ else if (!n) if (o === this.options.textNodeName) {
3734
+ let t = this.options.tagValueProcessor(o, "" + e[o]);
3735
+ i += this.replaceEntitiesValue(t);
3736
+ } else i += this.buildTextValNode(e[o], o, "", t);
3737
+ } else if (Array.isArray(e[o])) {
3738
+ let r = e[o].length, a = "", s = "";
3739
+ for (let c = 0; c < r; c++) {
3740
+ let r = e[o][c];
3741
+ if (r !== void 0) if (r === null) o[0] === "?" ? i += this.indentate(t) + "<" + o + "?" + this.tagEndChar : i += this.indentate(t) + "<" + o + "/" + this.tagEndChar;
3742
+ else if (typeof r == "object") if (this.options.oneListGroup) {
3743
+ let e = this.j2x(r, t + 1, n.concat(o));
3744
+ a += e.val, this.options.attributesGroupName && r.hasOwnProperty(this.options.attributesGroupName) && (s += e.attrStr);
3745
+ } else a += this.processTextOrObjNode(r, o, t, n);
3746
+ else if (this.options.oneListGroup) {
3747
+ let e = this.options.tagValueProcessor(o, r);
3748
+ e = this.replaceEntitiesValue(e), a += e;
3749
+ } else a += this.buildTextValNode(r, o, "", t);
3750
+ }
3751
+ this.options.oneListGroup && (a = this.buildObjectNode(a, o, s, t)), i += a;
3752
+ } else if (this.options.attributesGroupName && o === this.options.attributesGroupName) {
3753
+ let t = Object.keys(e[o]), n = t.length;
3754
+ for (let i = 0; i < n; i++) r += this.buildAttrPairStr(t[i], "" + e[o][t[i]]);
3755
+ } else i += this.processTextOrObjNode(e[o], o, t, n);
3756
+ return {
3757
+ attrStr: r,
3758
+ val: i
3759
+ };
3760
+ }, Q.prototype.buildAttrPairStr = function(e, t) {
3761
+ return t = this.options.attributeValueProcessor(e, "" + t), t = this.replaceEntitiesValue(t), this.options.suppressBooleanAttributes && t === "true" ? " " + e : " " + e + "=\"" + t + "\"";
3762
+ }, Q.prototype.buildObjectNode = function(e, t, n, r) {
3763
+ if (e === "") return t[0] === "?" ? this.indentate(r) + "<" + t + n + "?" + this.tagEndChar : this.indentate(r) + "<" + t + n + this.closeTag(t) + this.tagEndChar;
3764
+ {
3765
+ let i = "</" + t + this.tagEndChar, a = "";
3766
+ return t[0] === "?" && (a = "?", i = ""), !n && n !== "" || e.indexOf("<") !== -1 ? !1 !== this.options.commentPropName && t === this.options.commentPropName && a.length === 0 ? this.indentate(r) + `\x3c!--${e}--\x3e` + this.newLine : this.indentate(r) + "<" + t + n + a + this.tagEndChar + e + this.indentate(r) + i : this.indentate(r) + "<" + t + n + a + ">" + e + i;
3767
+ }
3768
+ }, Q.prototype.closeTag = function(e) {
3769
+ let t = "";
3770
+ return this.options.unpairedTags.indexOf(e) === -1 ? t = this.options.suppressEmptyNode ? "/" : `></${e}` : this.options.suppressUnpairedNode || (t = "/"), t;
3771
+ }, Q.prototype.buildTextValNode = function(e, t, n, r) {
3772
+ if (!1 !== this.options.cdataPropName && t === this.options.cdataPropName) return this.indentate(r) + `<![CDATA[${e}]]>` + this.newLine;
3773
+ if (!1 !== this.options.commentPropName && t === this.options.commentPropName) return this.indentate(r) + `\x3c!--${e}--\x3e` + this.newLine;
3774
+ if (t[0] === "?") return this.indentate(r) + "<" + t + n + "?" + this.tagEndChar;
3775
+ {
3776
+ let i = this.options.tagValueProcessor(t, e);
3777
+ 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;
3778
+ }
3779
+ }, Q.prototype.replaceEntitiesValue = function(e) {
3780
+ if (e && e.length > 0 && this.options.processEntities) for (let t = 0; t < this.options.entities.length; t++) {
3781
+ let n = this.options.entities[t];
3782
+ e = e.replace(n.regex, n.val);
3783
+ }
3784
+ return e;
3785
+ };
3786
+ var Vr = Br((function(e, t, n) {
3787
+ let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
3788
+ return zr(F(I({
3789
+ url: M(e.remoteURL, A(t)),
3790
+ method: "UNLOCK",
3791
+ headers: { "Lock-Token": n }
3792
+ }, e, r), e), (function(t) {
3793
+ if (B(e, t), t.status !== 204 && t.status !== 200) throw tn(t);
3794
+ }));
3795
+ })), Hr = Br((function(e, t) {
3796
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, { refreshToken: r, timeout: i = Ur } = n, a = {
3797
+ Accept: "text/plain,application/xml",
3798
+ Timeout: i
3799
+ };
3800
+ return r && (a.If = r), zr(F(I({
3801
+ url: M(e.remoteURL, A(t)),
3802
+ method: "LOCK",
3803
+ headers: a,
3804
+ data: Lr(e.contactHref)
3805
+ }, e, n), e), (function(t) {
3806
+ return B(e, t), zr(t.text(), (function(e) {
3807
+ let n = (a = e, new Jn({
3808
+ removeNSPrefix: !0,
3809
+ parseAttributeValue: !0,
3810
+ parseTagValue: !0
3811
+ }).parse(a)), r = J().get(n, "prop.lockdiscovery.activelock.locktoken.href"), i = J().get(n, "prop.lockdiscovery.activelock.timeout");
3812
+ var a;
3813
+ if (!r) throw tn(t, "No lock token received: ");
3814
+ return {
3815
+ token: r,
3816
+ serverTimeout: i
3817
+ };
3818
+ }));
3819
+ }));
3820
+ })), Ur = "Infinite, Second-4100000000";
3821
+ function Wr(e, t, n) {
3822
+ return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3823
+ }
3824
+ var Gr = function(e) {
3825
+ return function() {
3826
+ var t = [...arguments];
3827
+ try {
3828
+ return Promise.resolve(e.apply(this, t));
3829
+ } catch (e) {
3830
+ return Promise.reject(e);
3831
+ }
3832
+ };
3833
+ }((function(e) {
3834
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.path || "/";
3835
+ return Wr(F(I({
3836
+ url: M(e.remoteURL, n),
3837
+ method: "PROPFIND",
3838
+ headers: {
3839
+ Accept: "text/plain,application/xml",
3840
+ Depth: "0"
3841
+ }
3842
+ }, e, t), e), (function(n) {
3843
+ return B(e, n), Wr(n.text(), (function(r) {
3844
+ return Wr(Qn(r, e.parsing), (function(e) {
3845
+ return V(n, function(e) {
3846
+ try {
3847
+ let [t] = e.multistatus.response, { propstat: { prop: { "quota-used-bytes": n, "quota-available-bytes": r } } } = t;
3848
+ return n !== void 0 && r !== void 0 ? {
3849
+ used: parseInt(String(n), 10),
3850
+ available: tr(r)
3851
+ } : null;
3852
+ } catch {}
3853
+ return null;
3854
+ }(e), t.details);
3855
+ }));
3856
+ }));
3857
+ }));
3858
+ }));
3859
+ function Kr(e, t, n) {
3860
+ return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3861
+ }
3862
+ var qr = function(e) {
3863
+ return function() {
3864
+ var t = [...arguments];
3865
+ try {
3866
+ return Promise.resolve(e.apply(this, t));
3867
+ } catch (e) {
3868
+ return Promise.reject(e);
3869
+ }
3870
+ };
3871
+ }((function(e, t) {
3872
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, { details: r = !1 } = n;
3873
+ return Kr(F(I({
3874
+ url: M(e.remoteURL, A(t)),
3875
+ method: "SEARCH",
3876
+ headers: {
3877
+ Accept: "text/plain,application/xml",
3878
+ "Content-Type": e.headers["Content-Type"] || "application/xml; charset=utf-8"
3879
+ }
3880
+ }, e, n), e), (function(n) {
3881
+ return B(e, n), Kr(n.text(), (function(i) {
3882
+ return Kr(Qn(i, e.parsing), (function(e) {
3883
+ return V(n, function(e, t, n) {
3884
+ let r = {
3885
+ truncated: !1,
3886
+ results: []
3887
+ };
3888
+ return r.truncated = e.multistatus.response.some(((e) => (e.status || e.propstat?.status).split(" ", 3)?.[1] === "507" && e.href.replace(/\/$/, "").endsWith(A(t).replace(/\/$/, "")))), e.multistatus.response.forEach(((e) => {
3889
+ if (e.propstat === void 0) return;
3890
+ let t = e.href.split("/").map(decodeURIComponent).join("/");
3891
+ r.results.push($n(e.propstat.prop, t, n));
3892
+ })), r;
3893
+ }(e, t, r), r);
3894
+ }));
3895
+ }));
3896
+ }));
3897
+ })), Jr = function(e) {
3898
+ return function() {
3899
+ var t = [...arguments];
3900
+ try {
3901
+ return Promise.resolve(e.apply(this, t));
3902
+ } catch (e) {
3903
+ return Promise.reject(e);
3904
+ }
3905
+ };
3906
+ }((function(e, t, n) {
3907
+ let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, i = I({
3908
+ url: M(e.remoteURL, A(t)),
3909
+ method: "MOVE",
3910
+ headers: {
3911
+ Destination: M(e.remoteURL, A(n)),
3912
+ Overwrite: !1 === r.overwrite ? "F" : "T"
3913
+ }
3914
+ }, e, r);
3915
+ return o = function(t) {
3916
+ B(e, t);
3917
+ }, (a = F(i, e)) && a.then || (a = Promise.resolve(a)), o ? a.then(o) : a;
3918
+ var a, o;
3919
+ })), Yr = O(172);
3920
+ function Xr(e) {
3921
+ if (st(e)) return e.byteLength;
3922
+ if (ct(e)) return e.length;
3923
+ if (typeof e == "string") return (0, Yr.d)(e);
3924
+ throw new k({ info: { code: P.DataTypeNoLength } }, "Cannot calculate data length: Invalid type");
3925
+ }
3926
+ var Zr = function(e) {
3927
+ return function() {
3928
+ var t = [...arguments];
3929
+ try {
3930
+ return Promise.resolve(e.apply(this, t));
3931
+ } catch (e) {
3932
+ return Promise.reject(e);
3933
+ }
3934
+ };
3935
+ }((function(e, t, n) {
3936
+ let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, { contentLength: i = !0, overwrite: a = !0 } = r, o = { "Content-Type": "application/octet-stream" };
3937
+ !1 === i || (o["Content-Length"] = typeof i == "number" ? `${i}` : `${Xr(n)}`), a || (o["If-None-Match"] = "*");
3938
+ let s = I({
3939
+ url: M(e.remoteURL, A(t)),
3940
+ method: "PUT",
3941
+ headers: o,
3942
+ data: n
3943
+ }, e, r);
3944
+ return l = function(t) {
3945
+ try {
3946
+ B(e, t);
3947
+ } catch (e) {
3948
+ let t = e;
3949
+ if (t.status !== 412 || a) throw t;
3950
+ return !1;
3951
+ }
3952
+ return !0;
3953
+ }, (c = F(s, e)) && c.then || (c = Promise.resolve(c)), l ? c.then(l) : c;
3954
+ var c, l;
3955
+ })), Qr = function(e) {
3956
+ return function() {
3957
+ var t = [...arguments];
3958
+ try {
3959
+ return Promise.resolve(e.apply(this, t));
3960
+ } catch (e) {
3961
+ return Promise.reject(e);
3962
+ }
3963
+ };
3964
+ }((function(e, t) {
3965
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = I({
3966
+ url: M(e.remoteURL, A(t)),
3967
+ method: "OPTIONS"
3968
+ }, e, n);
3969
+ return a = function(t) {
3970
+ try {
3971
+ B(e, t);
3972
+ } catch (e) {
3973
+ throw e;
3974
+ }
3975
+ return {
3976
+ compliance: (t.headers.get("DAV") ?? "").split(",").map(((e) => e.trim())),
3977
+ server: t.headers.get("Server") ?? ""
3978
+ };
3979
+ }, (i = F(r, e)) && i.then || (i = Promise.resolve(i)), a ? i.then(a) : i;
3980
+ var i, a;
3981
+ }));
3982
+ function $r(e, t, n) {
3983
+ return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3984
+ }
3985
+ var ei = ri((function(e, t, n, r, i) {
3986
+ let a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
3987
+ if (n > r || n < 0) throw new k({ info: { code: P.InvalidUpdateRange } }, `Invalid update range ${n} for partial update`);
3988
+ let o = {
3989
+ "Content-Type": "application/octet-stream",
3990
+ "Content-Length": "" + (r - n + 1),
3991
+ "Content-Range": `bytes ${n}-${r}/*`
3992
+ };
3993
+ return $r(F(I({
3994
+ url: M(e.remoteURL, A(t)),
3995
+ method: "PUT",
3996
+ headers: o,
3997
+ data: i
3998
+ }, e, a), e), (function(t) {
3999
+ B(e, t);
4000
+ }));
4001
+ }));
4002
+ function ti(e, t) {
4003
+ var n = e();
4004
+ return n && n.then ? n.then(t) : t(n);
4005
+ }
4006
+ var ni = ri((function(e, t, n, r, i) {
4007
+ let a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
4008
+ if (n > r || n < 0) throw new k({ info: { code: P.InvalidUpdateRange } }, `Invalid update range ${n} for partial update`);
4009
+ let o = {
4010
+ "Content-Type": "application/x-sabredav-partialupdate",
4011
+ "Content-Length": "" + (r - n + 1),
4012
+ "X-Update-Range": `bytes=${n}-${r}`
4013
+ };
4014
+ return $r(F(I({
4015
+ url: M(e.remoteURL, A(t)),
4016
+ method: "PATCH",
4017
+ headers: o,
4018
+ data: i
4019
+ }, e, a), e), (function(t) {
4020
+ B(e, t);
4021
+ }));
4022
+ }));
4023
+ function ri(e) {
4024
+ return function() {
4025
+ var t = [...arguments];
4026
+ try {
4027
+ return Promise.resolve(e.apply(this, t));
4028
+ } catch (e) {
4029
+ return Promise.reject(e);
4030
+ }
4031
+ };
4032
+ }
4033
+ var ii = ri((function(e, t, n, r, i) {
4034
+ let a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
4035
+ return $r(Qr(e, t, a), (function(o) {
4036
+ let s = !1;
4037
+ return ti((function() {
4038
+ if (o.compliance.includes("sabredav-partialupdate")) return $r(ni(e, t, n, r, i, a), (function(e) {
4039
+ return s = !0, e;
4040
+ }));
4041
+ }), (function(c) {
4042
+ let l = !1;
4043
+ return s ? c : ti((function() {
4044
+ if (o.server.includes("Apache") && o.compliance.includes("<http://apache.org/dav/propset/fs/1>")) return $r(ei(e, t, n, r, i, a), (function(e) {
4045
+ return l = !0, e;
4046
+ }));
4047
+ }), (function(e) {
4048
+ if (l) return e;
4049
+ throw new k({ info: { code: P.NotSupported } }, "Not supported");
4050
+ }));
4051
+ }));
4052
+ }));
4053
+ })), ai = "https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";
4054
+ function oi(e) {
4055
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, { authType: n = null, remoteBasePath: r, contactHref: i = ai, ha1: a, headers: o = {}, httpAgent: s, httpsAgent: c, password: l, token: u, username: d, withCredentials: f } = t, p = n;
4056
+ p ||= d || l ? N.Password : N.None;
4057
+ let m = {
4058
+ authType: p,
4059
+ remoteBasePath: r,
4060
+ contactHref: i,
4061
+ ha1: a,
4062
+ headers: Object.assign({}, o),
4063
+ httpAgent: s,
4064
+ httpsAgent: c,
4065
+ password: l,
4066
+ parsing: {
4067
+ attributeNamePrefix: t.attributeNamePrefix ?? "@",
4068
+ attributeParsers: [],
4069
+ tagParsers: [Xn]
4070
+ },
4071
+ remotePath: Ie(e),
4072
+ remoteURL: e,
4073
+ token: u,
4074
+ username: d,
4075
+ withCredentials: f
4076
+ };
4077
+ return qe(m, d, l, u, a), {
4078
+ copyFile: (e, t, n) => nn(m, e, t, n),
4079
+ createDirectory: (e, t) => dr(m, e, t),
4080
+ createReadStream: (e, t) => function(e, t) {
4081
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = new (pr()).PassThrough();
4082
+ return mr(e, t, n).then(((e) => {
4083
+ e.pipe(r);
4084
+ })).catch(((e) => {
4085
+ r.emit("error", e);
4086
+ })), r;
4087
+ }(m, e, t),
4088
+ createWriteStream: (e, t, n) => function(e, t) {
4089
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : hr, i = new (pr()).PassThrough(), a = {};
4090
+ return !1 === n.overwrite && (a["If-None-Match"] = "*"), F(I({
4091
+ url: M(e.remoteURL, A(t)),
4092
+ method: "PUT",
4093
+ headers: a,
4094
+ data: i,
4095
+ maxRedirects: 0
4096
+ }, e, n), e).then(((t) => B(e, t))).then(((e) => {
4097
+ setTimeout((() => {
4098
+ r(e);
4099
+ }), 0);
4100
+ })).catch(((e) => {
4101
+ i.emit("error", e);
4102
+ })), i;
4103
+ }(m, e, t, n),
4104
+ customRequest: (e, t) => gr(m, e, t),
4105
+ deleteFile: (e, t) => _r(m, e, t),
4106
+ exists: (e, t) => vr(m, e, t),
4107
+ getDirectoryContents: (e, t) => br(m, e, t),
4108
+ getFileContents: (e, t) => Tr(m, e, t),
4109
+ getFileDownloadLink: (e) => function(e, t) {
4110
+ let n = M(e.remoteURL, A(t)), r = /^https:/i.test(n) ? "https" : "http";
4111
+ switch (e.authType) {
4112
+ case N.None: break;
4113
+ case N.Password: {
4114
+ let t = Ue(e.headers.Authorization.replace(/^Basic /i, "").trim());
4115
+ n = n.replace(/^https?:\/\//, `${r}://${t}@`);
4116
+ break;
4117
+ }
4118
+ default: throw new k({ info: { code: P.LinkUnsupportedAuthType } }, `Unsupported auth type for file link: ${e.authType}`);
4119
+ }
4120
+ return n;
4121
+ }(m, e),
4122
+ getFileUploadLink: (e) => function(e, t) {
4123
+ let n = `${M(e.remoteURL, A(t))}?Content-Type=application/octet-stream`, r = /^https:/i.test(n) ? "https" : "http";
4124
+ switch (e.authType) {
4125
+ case N.None: break;
4126
+ case N.Password: {
4127
+ let t = Ue(e.headers.Authorization.replace(/^Basic /i, "").trim());
4128
+ n = n.replace(/^https?:\/\//, `${r}://${t}@`);
4129
+ break;
4130
+ }
4131
+ default: throw new k({ info: { code: P.LinkUnsupportedAuthType } }, `Unsupported auth type for file link: ${e.authType}`);
4132
+ }
4133
+ return n;
4134
+ }(m, e),
4135
+ getHeaders: () => Object.assign({}, m.headers),
4136
+ getQuota: (e) => Gr(m, e),
4137
+ lock: (e, t) => Hr(m, e, t),
4138
+ moveFile: (e, t, n) => Jr(m, e, t, n),
4139
+ putFileContents: (e, t, n) => Zr(m, e, t, n),
4140
+ partialUpdateFileContents: (e, t, n, r, i) => ii(m, e, t, n, r, i),
4141
+ getDAVCompliance: (e) => Qr(m, e),
4142
+ search: (e, t) => qr(m, e, t),
4143
+ setHeaders: (e) => {
4144
+ m.headers = Object.assign({}, e);
4145
+ },
4146
+ stat: (e, t) => rr(m, e, t),
4147
+ unlock: (e, t, n) => Vr(m, e, t, n),
4148
+ registerAttributeParser: (e) => {
4149
+ m.parsing.attributeParsers.push(e);
4150
+ },
4151
+ registerTagParser: (e) => {
4152
+ m.parsing.tagParsers.push(e);
4153
+ }
4154
+ };
4155
+ }
4156
+ //#endregion
4157
+ //#region ../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/stringify.js
4158
+ var $ = [];
4159
+ for (let e = 0; e < 256; ++e) $.push((e + 256).toString(16).slice(1));
4160
+ function si(e, t = 0) {
4161
+ 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();
4162
+ }
4163
+ //#endregion
4164
+ //#region ../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/rng.js
4165
+ var ci, li = new Uint8Array(16);
4166
+ function ui() {
4167
+ if (!ci) {
4168
+ if (typeof crypto > "u" || !crypto.getRandomValues) throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
4169
+ ci = crypto.getRandomValues.bind(crypto);
4170
+ }
4171
+ return ci(li);
4172
+ }
4173
+ var di = { randomUUID: typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto) };
4174
+ //#endregion
4175
+ //#region ../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/v4.js
4176
+ function fi(e, t, n) {
4177
+ e ||= {};
4178
+ let r = e.random ?? e.rng?.() ?? ui();
4179
+ if (r.length < 16) throw Error("Random bytes length must be >= 16");
4180
+ if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
4181
+ if (n ||= 0, n < 0 || n + 16 > t.length) throw RangeError(`UUID byte range ${n}:${n + 15} is out of buffer bounds`);
4182
+ for (let e = 0; e < 16; ++e) t[n + e] = r[e];
4183
+ return t;
4184
+ }
4185
+ return si(r);
4186
+ }
4187
+ function pi(e, t, n) {
4188
+ return di.randomUUID && !t && !e ? di.randomUUID() : fi(e, t, n);
4189
+ }
4190
+ //#endregion
4191
+ //#region src/webdav/client/builders.ts
4192
+ var mi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includes(e) ? [e, n || ""] : [o.DavNamespace.includes(e) ? `d:${e}` : `oc:${e}`, n || ""])), hi = (e = [], { pattern: t, filterRules: n, limit: r = 0, extraProps: i = [] }) => {
4193
+ let a = "d:propfind";
4194
+ t && (a = "oc:search-files"), n && (a = "oc:filter-files");
4195
+ let o = mi(e.reduce((e, t) => Object.assign(e, { [t]: null }), {}), i), s = { [a]: {
4196
+ "d:prop": o,
4197
+ "@@xmlns:d": "DAV:",
4198
+ "@@xmlns:oc": "http://owncloud.org/ns",
4199
+ ...t && { "oc:search": {
4200
+ "oc:pattern": t,
4201
+ "oc:limit": r
4202
+ } },
4203
+ ...n && { "oc:filter-rules": mi(n, []) }
4204
+ } };
4205
+ return new le({
4206
+ format: !0,
4207
+ ignoreAttributes: !1,
4208
+ attributeNamePrefix: "@@",
4209
+ suppressEmptyNode: !0
4210
+ }).build(s);
4211
+ }, gi = (e) => {
4212
+ let t = { "d:propertyupdate": {
4213
+ "d:set": { "d:prop": mi(e, []) },
4214
+ "@@xmlns:d": "DAV:",
4215
+ "@@xmlns:oc": "http://owncloud.org/ns"
4216
+ } };
4217
+ return new le({
4218
+ format: !0,
4219
+ ignoreAttributes: !1,
4220
+ attributeNamePrefix: "@@",
4221
+ suppressEmptyNode: !0
4222
+ }).build(t);
4223
+ }, _i = (e) => {
4224
+ let t = {}, n = e.get("tus-version");
4225
+ 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;
4226
+ }, vi = async (e) => {
4227
+ let t = (e) => {
4228
+ let t = decodeURIComponent(e);
4229
+ return e?.startsWith("/remote.php/dav/") ? i(t.replace("/remote.php/dav/", ""), {
4230
+ leadingSlash: !0,
4231
+ trailingSlash: !1
4232
+ }) : t;
4233
+ };
4234
+ return (await Qn(e)).multistatus.response.map(({ href: e, propstat: n }) => {
4235
+ let r = {
4236
+ ...$n(n.prop, t(e), !0),
4237
+ processing: n.status === "HTTP/1.1 425 TOO EARLY"
4238
+ };
4239
+ return r.props.name && (r.props.name = r.props.name.toString()), r;
4240
+ });
4241
+ }, yi = (e) => {
4242
+ let t = new g(), n = {
4243
+ message: "Unknown error",
4244
+ errorCode: void 0
4245
+ };
4246
+ try {
4247
+ let r = t.parse(e);
4248
+ if (!r["d:error"]) return n;
4249
+ if (r["d:error"]["s:message"]) {
4250
+ let e = r["d:error"]["s:message"];
4251
+ typeof e == "string" && (n.message = e);
4252
+ }
4253
+ if (r["d:error"]["s:errorcode"]) {
4254
+ let e = r["d:error"]["s:errorcode"];
4255
+ typeof e == "string" && (n.errorCode = e);
4256
+ }
4257
+ } catch {
4258
+ return n;
4259
+ }
4260
+ return n;
4261
+ }, bi = class {
4262
+ client;
4263
+ davPath;
4264
+ headers;
4265
+ extraProps;
4266
+ constructor({ baseUrl: e, headers: t }) {
4267
+ this.davPath = i(e, "remote.php/dav"), this.client = oi(this.davPath, {}), this.headers = t, this.extraProps = [];
4268
+ }
4269
+ mkcol(e, t = {}) {
4270
+ return this.request(e, {
4271
+ method: u.mkcol,
4272
+ ...t
4273
+ });
4274
+ }
4275
+ async propfind(e, { depth: t = 1, properties: n = [], headers: r = {}, ...i } = {}) {
4276
+ let a = {
4277
+ ...r,
4278
+ Depth: t.toString()
4279
+ }, { body: o, result: s } = await this.request(e, {
4280
+ method: u.propfind,
4281
+ data: hi(n, { extraProps: this.extraProps }),
4282
+ headers: a,
4283
+ ...i
4284
+ });
4285
+ return o?.length && (o[0].tusSupport = _i(s.headers)), o;
4286
+ }
4287
+ async report(e, { pattern: t = "", filterRules: n = null, limit: r = 30, properties: i, ...a } = {}) {
4288
+ let { body: o, result: s } = await this.request(e, {
4289
+ method: u.report,
4290
+ data: hi(i, {
4291
+ pattern: t,
4292
+ filterRules: n,
4293
+ limit: r,
4294
+ extraProps: this.extraProps
4295
+ }),
4296
+ ...a
4297
+ });
4298
+ return {
4299
+ results: o,
4300
+ range: s.headers.get("content-range")
4301
+ };
4302
+ }
4303
+ copy(e, t, { overwrite: n = !1, headers: r = {}, ...a } = {}) {
4304
+ let o = i(this.davPath, y(t));
4305
+ return this.request(e, {
4306
+ method: u.copy,
4307
+ headers: {
4308
+ ...r,
4309
+ Destination: o,
4310
+ overwrite: n ? "T" : "F"
4311
+ },
4312
+ ...a
4313
+ });
4314
+ }
4315
+ move(e, t, { overwrite: n = !1, headers: r = {}, ...a } = {}) {
4316
+ let o = i(this.davPath, y(t));
4317
+ return this.request(e, {
4318
+ method: u.move,
4319
+ headers: {
4320
+ ...r,
4321
+ Destination: o,
4322
+ overwrite: n ? "T" : "F"
4323
+ },
4324
+ ...a
4325
+ });
4326
+ }
4327
+ put(e, t, { headers: n = {}, onUploadProgress: r, previousEntityTag: i, overwrite: a, ...o } = {}) {
4328
+ let s = { ...n };
4329
+ return i ? s["If-Match"] = i : a || (s["If-None-Match"] = "*"), this.request(e, {
4330
+ method: u.put,
4331
+ data: t,
4332
+ headers: s,
4333
+ onUploadProgress: r,
4334
+ ...o
4335
+ });
4336
+ }
4337
+ delete(e, t = {}) {
4338
+ return this.request(e, {
4339
+ method: u.delete,
4340
+ ...t
4341
+ });
4342
+ }
4343
+ propPatch(e, t, n = {}) {
4344
+ let r = gi(t);
4345
+ return this.request(e, {
4346
+ method: u.proppatch,
4347
+ data: r,
4348
+ ...n
4349
+ });
4350
+ }
4351
+ getFileUrl(e) {
4352
+ return i(this.davPath, y(e));
4353
+ }
4354
+ buildHeaders(e = {}) {
4355
+ return {
4356
+ "Content-Type": "application/xml; charset=utf-8",
4357
+ "X-Requested-With": "XMLHttpRequest",
4358
+ "X-Request-ID": pi(),
4359
+ ...this.headers && { ...this.headers() },
4360
+ ...e
4361
+ };
4362
+ }
4363
+ async request(e, t) {
4364
+ let n = i(this.davPath, y(e), { leadingSlash: !0 }), r = {
4365
+ ...t,
4366
+ url: n,
4367
+ headers: this.buildHeaders(t.headers || {})
4368
+ };
4369
+ try {
4370
+ let e = await this.client.customRequest("", r), t;
4371
+ return e.status === 207 && (t = await vi(await e.text())), {
4372
+ body: t,
4373
+ status: e.status,
4374
+ result: e
4375
+ };
4376
+ } catch (e) {
4377
+ let { response: t } = e, n = yi(await t.text());
4378
+ throw new d(n.message, n.errorCode, t, t.status);
4379
+ }
4380
+ }
4381
+ }, xi = (e, t) => ({ async listFileVersions(t, n = {}) {
4382
+ let [r, ...a] = await e.propfind(i("meta", t, "v", { leadingSlash: !0 }), n);
4383
+ return a.map((t) => c(t, e.extraProps));
4384
+ } }), Si = (e, t) => ({ setFavorite(t, { path: n }, r, a = {}) {
4385
+ let o = { [m.IsFavorite]: r ? "true" : "false" };
4386
+ return e.propPatch(i(t.webDavPath, n), o, a);
4387
+ } }), Ci = (e, t) => {
4388
+ let r = n.create();
4389
+ t && r.interceptors.request.use((e) => (Object.assign(e.headers, t()), e));
4390
+ let i = {
4391
+ axiosClient: r,
4392
+ baseUrl: e,
4393
+ headers: t
4394
+ }, a = new bi({
4395
+ baseUrl: e,
4396
+ headers: t
4397
+ }), o = (e) => {
4398
+ a.extraProps.push(e);
4399
+ }, s = we(a, i), { getPathForFileId: c } = s, l = ge(a, s, i), { listFiles: u } = l, d = pe(l, i), { getFileInfo: f } = d, { createFolder: p } = de(a, d, i), m = fe(a, i), { getFileContents: h } = m, { putFileContents: g } = ve(a, d, i), { getFileUrl: _, revokeUrl: v } = me(a, m, d, i), { getPublicFileUrl: y } = he(a, i), { copyFiles: b } = ue(a, i), { moveFiles: x } = _e(a, i), { deleteFile: S } = ye(a, i), { restoreFile: ee } = be(a, i), { listFileVersions: te } = xi(a, i), { restoreFileVersion: ne } = xe(a, i), { clearTrashBin: re } = Se(a, i), { search: ie } = Ce(a, i), { setFavorite: ae } = Si(a, i);
4400
+ return {
4401
+ copyFiles: b,
4402
+ createFolder: p,
4403
+ deleteFile: S,
4404
+ restoreFile: ee,
4405
+ restoreFileVersion: ne,
4406
+ getFileContents: h,
4407
+ getFileInfo: f,
4408
+ getFileUrl: _,
4409
+ getPublicFileUrl: y,
4410
+ getPathForFileId: c,
4411
+ listFiles: u,
4412
+ listFileVersions: te,
4413
+ moveFiles: x,
4414
+ putFileContents: g,
4415
+ revokeUrl: v,
4416
+ clearTrashBin: re,
4417
+ search: ie,
4418
+ setFavorite: ae,
4419
+ registerExtraProp: o
4420
+ };
4421
+ };
4422
+ //#endregion
4423
+ export { y as n, Ci as t };