@flyfish-group/file-viewer 1.0.0 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,106 +1,153 @@
1
- var Xe = Object.defineProperty;
2
- var Ge = (e, t, n) => t in e ? Xe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var ce = (e, t, n) => (Ge(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- import P, { defineAsyncComponent as U, defineComponent as ge, ref as F, onMounted as Qe, watch as le } from "vue";
5
- const Ze = (() => {
1
+ var Ye = Object.defineProperty;
2
+ var fe = Object.getOwnPropertySymbols;
3
+ var et = Object.prototype.hasOwnProperty, tt = Object.prototype.propertyIsEnumerable;
4
+ var K = (e, t, n) => t in e ? Ye(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, X = (e, t) => {
5
+ for (var n in t || (t = {}))
6
+ et.call(t, n) && K(e, n, t[n]);
7
+ if (fe)
8
+ for (var n of fe(t))
9
+ tt.call(t, n) && K(e, n, t[n]);
10
+ return e;
11
+ };
12
+ var de = (e, t, n) => (K(e, typeof t != "symbol" ? t + "" : t, n), n);
13
+ var b = (e, t, n) => new Promise((r, s) => {
14
+ var o = (u) => {
15
+ try {
16
+ l(n.next(u));
17
+ } catch (f) {
18
+ s(f);
19
+ }
20
+ }, i = (u) => {
21
+ try {
22
+ l(n.throw(u));
23
+ } catch (f) {
24
+ s(f);
25
+ }
26
+ }, l = (u) => u.done ? r(u.value) : Promise.resolve(u.value).then(o, i);
27
+ l((n = n.apply(e, t)).next());
28
+ });
29
+ import N, { defineAsyncComponent as v, defineComponent as Te, ref as L, onMounted as nt, watch as pe } from "vue";
30
+ const rt = (() => {
6
31
  const e = {
7
32
  module: null,
8
- async load() {
9
- return this.module || (this.module = import("./docx-preview.min.js").then((t) => t.d)), this.module;
33
+ load() {
34
+ return b(this, null, function* () {
35
+ return this.module || (this.module = import("./docx-preview.js")), this.module;
36
+ });
10
37
  }
11
38
  };
12
- return async () => await e.load();
39
+ return () => b(void 0, null, function* () {
40
+ return yield e.load();
41
+ });
13
42
  })();
14
- async function Ye(e, t) {
15
- const { defaultOptions: n, renderAsync: r } = await Ze(), s = Object.assign(n, {
16
- debug: !0,
17
- experimental: !0
43
+ function st(e, t) {
44
+ return b(this, null, function* () {
45
+ const { defaultOptions: n, renderAsync: r } = yield rt(), s = Object.assign(n, {
46
+ debug: !0,
47
+ experimental: !0
48
+ });
49
+ yield r(e, t, void 0, s);
18
50
  });
19
- await r(e, t, void 0, s);
20
- }
21
- const et = U(() => import("./PptxRender.js"));
22
- async function tt(e, t) {
23
- return new P({
24
- render: (n) => n(et, {
25
- props: {
26
- data: e
27
- }
28
- })
29
- }).$mount(t);
30
- }
31
- const nt = U(() => import("./XlsxTable.js"));
32
- async function ue(e, t, n) {
33
- return new P({
34
- render: (r) => r(nt, {
35
- props: {
36
- data: e,
37
- type: n
38
- }
39
- })
40
- }).$mount(t);
41
- }
42
- const rt = U(() => import("./PdfView.js"));
43
- async function st(e, t) {
44
- return new P({
45
- render: (n) => n(rt, {
46
- props: {
47
- data: e
48
- }
49
- })
50
- }).$mount(t);
51
- }
52
- async function ot(e) {
53
- return new Promise((t, n) => {
54
- const r = new FileReader();
55
- r.onload = (s) => {
56
- var o;
57
- return t((o = s.target) == null ? void 0 : o.result);
58
- }, r.onerror = (s) => n(s), r.readAsArrayBuffer(e);
51
+ }
52
+ const ot = v(() => import("./PptxRender.js"));
53
+ function it(e, t) {
54
+ return b(this, null, function* () {
55
+ return new N({
56
+ render: (n) => n(ot, {
57
+ props: {
58
+ data: e
59
+ }
60
+ })
61
+ }).$mount(t);
59
62
  });
60
63
  }
61
- async function it(e) {
62
- return new Promise((t, n) => {
63
- const r = new FileReader();
64
- r.onload = (s) => {
65
- var i;
66
- const o = (i = s.target) == null ? void 0 : i.result;
67
- typeof o == "string" && t(o);
68
- }, r.onerror = (s) => n(s), r.readAsDataURL(new Blob([e]));
64
+ const at = v(() => import("./XlsxTable.js"));
65
+ function he(e, t, n) {
66
+ return b(this, null, function* () {
67
+ return new N({
68
+ render: (r) => r(at, {
69
+ props: {
70
+ data: e,
71
+ type: n
72
+ }
73
+ })
74
+ }).$mount(t);
69
75
  });
70
76
  }
71
- async function Oe(e) {
72
- return new Promise((t, n) => {
73
- const r = new FileReader();
74
- r.onload = (s) => {
75
- var i;
76
- const o = (i = s.target) == null ? void 0 : i.result;
77
- typeof o == "string" && t(o);
78
- }, r.onerror = (s) => n(s), r.readAsText(new Blob([e]), "utf-8");
77
+ const ct = v(() => import("./PdfView.js"));
78
+ function lt(e, t) {
79
+ return b(this, null, function* () {
80
+ return new N({
81
+ render: (n) => n(ct, {
82
+ props: {
83
+ data: e
84
+ }
85
+ })
86
+ }).$mount(t);
79
87
  });
80
88
  }
81
- const at = U(() => import("./ImageViewer.js"));
82
- async function ct(e, t) {
83
- const n = await it(e);
84
- return new P({
85
- render: (r) => r(at, {
86
- props: {
87
- image: n
88
- }
89
- })
90
- }).$mount(t);
91
- }
92
- const lt = U(() => import("./MarkdownViewer.js"));
93
- async function ut(e, t) {
94
- const n = await Oe(e);
95
- return new P({
96
- render: (r) => r(lt, {
97
- props: {
98
- data: n
99
- }
100
- })
101
- }).$mount(t);
89
+ function ut(e) {
90
+ return b(this, null, function* () {
91
+ return new Promise((t, n) => {
92
+ const r = new FileReader();
93
+ r.onload = (s) => {
94
+ var o;
95
+ return t((o = s.target) == null ? void 0 : o.result);
96
+ }, r.onerror = (s) => n(s), r.readAsArrayBuffer(e);
97
+ });
98
+ });
99
+ }
100
+ function ft(e) {
101
+ return b(this, null, function* () {
102
+ return new Promise((t, n) => {
103
+ const r = new FileReader();
104
+ r.onload = (s) => {
105
+ var i;
106
+ const o = (i = s.target) == null ? void 0 : i.result;
107
+ typeof o == "string" && t(o);
108
+ }, r.onerror = (s) => n(s), r.readAsDataURL(new Blob([e]));
109
+ });
110
+ });
111
+ }
112
+ function Ce(e) {
113
+ return b(this, null, function* () {
114
+ return new Promise((t, n) => {
115
+ const r = new FileReader();
116
+ r.onload = (s) => {
117
+ var i;
118
+ const o = (i = s.target) == null ? void 0 : i.result;
119
+ typeof o == "string" && t(o);
120
+ }, r.onerror = (s) => n(s), r.readAsText(new Blob([e]), "utf-8");
121
+ });
122
+ });
123
+ }
124
+ const dt = v(() => import("./ImageViewer.js"));
125
+ function pt(e, t) {
126
+ return b(this, null, function* () {
127
+ const n = yield ft(e);
128
+ return new N({
129
+ render: (r) => r(dt, {
130
+ props: {
131
+ image: n
132
+ }
133
+ })
134
+ }).$mount(t);
135
+ });
136
+ }
137
+ const ht = v(() => import("./MarkdownViewer.js"));
138
+ function mt(e, t) {
139
+ return b(this, null, function* () {
140
+ const n = yield Ce(e);
141
+ return new N({
142
+ render: (r) => r(ht, {
143
+ props: {
144
+ data: n
145
+ }
146
+ })
147
+ }).$mount(t);
148
+ });
102
149
  }
103
- const ft = /* @__PURE__ */ ge({
150
+ const yt = /* @__PURE__ */ Te({
104
151
  __name: "CodeViewer",
105
152
  props: {
106
153
  value: null
@@ -109,165 +156,189 @@ const ft = /* @__PURE__ */ ge({
109
156
  return { __sfc: !0 };
110
157
  }
111
158
  });
112
- function Ae(e, t, n, r, s, o, i, l) {
113
- var f = typeof e == "function" ? e.options : e;
114
- t && (f.render = t, f.staticRenderFns = n, f._compiled = !0), r && (f.functional = !0), o && (f._scopeId = "data-v-" + o);
115
- var d;
116
- if (i ? (d = function(m) {
159
+ function Pe(e, t, n, r, s, o, i, l) {
160
+ var u = typeof e == "function" ? e.options : e;
161
+ t && (u.render = t, u.staticRenderFns = n, u._compiled = !0), r && (u.functional = !0), o && (u._scopeId = "data-v-" + o);
162
+ var f;
163
+ if (i ? (f = function(m) {
117
164
  m = m || // cached call
118
165
  this.$vnode && this.$vnode.ssrContext || // stateful
119
- this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !m && typeof __VUE_SSR_CONTEXT__ < "u" && (m = __VUE_SSR_CONTEXT__), s && s.call(this, m), m && m._registeredComponents && m._registeredComponents.add(i);
120
- }, f._ssrRegister = d) : s && (d = l ? function() {
166
+ this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !m && typeof __VUE_SSR_CONTEXT__ != "undefined" && (m = __VUE_SSR_CONTEXT__), s && s.call(this, m), m && m._registeredComponents && m._registeredComponents.add(i);
167
+ }, u._ssrRegister = f) : s && (f = l ? function() {
121
168
  s.call(
122
169
  this,
123
- (f.functional ? this.parent : this).$root.$options.shadowRoot
170
+ (u.functional ? this.parent : this).$root.$options.shadowRoot
124
171
  );
125
- } : s), d)
126
- if (f.functional) {
127
- f._injectStyles = d;
128
- var u = f.render;
129
- f.render = function(E, p) {
130
- return d.call(p), u(E, p);
172
+ } : s), f)
173
+ if (u.functional) {
174
+ u._injectStyles = f;
175
+ var d = u.render;
176
+ u.render = function(w, p) {
177
+ return f.call(p), d(w, p);
131
178
  };
132
179
  } else {
133
- var c = f.beforeCreate;
134
- f.beforeCreate = c ? [].concat(c, d) : [d];
180
+ var c = u.beforeCreate;
181
+ u.beforeCreate = c ? [].concat(c, f) : [f];
135
182
  }
136
183
  return {
137
184
  exports: e,
138
- options: f
185
+ options: u
139
186
  };
140
187
  }
141
- var dt = function() {
188
+ var wt = function() {
142
189
  var t = this, n = t._self._c;
143
190
  return t._self._setupProxy, n("pre", { staticClass: "code-area" }, [t._v(" " + t._s(t.value) + `
144
191
  `)]);
145
- }, pt = [], ht = /* @__PURE__ */ Ae(
146
- ft,
147
- dt,
148
- pt,
192
+ }, bt = [], Et = /* @__PURE__ */ Pe(
193
+ yt,
194
+ wt,
195
+ bt,
149
196
  !1,
150
197
  null,
151
198
  "3be501eb",
152
199
  null,
153
200
  null
154
201
  );
155
- const mt = ht.exports;
156
- async function yt(e, t) {
157
- const n = await Oe(e);
158
- return new P({
159
- render: (r) => r(mt, {
160
- props: {
161
- value: n
162
- }
163
- })
164
- }).$mount(t);
202
+ const _t = Et.exports;
203
+ function Rt(e, t) {
204
+ return b(this, null, function* () {
205
+ const n = yield Ce(e);
206
+ return new N({
207
+ render: (r) => r(_t, {
208
+ props: {
209
+ value: n
210
+ }
211
+ })
212
+ }).$mount(t);
213
+ });
165
214
  }
166
- function wt(e, t) {
215
+ function St(e, t) {
167
216
  const n = document.createElement("video");
168
217
  n.width = 840, n.height = 480, n.controls = !0;
169
218
  const r = document.createElement("source");
170
219
  r.src = URL.createObjectURL(new Blob([e])), n.appendChild(r), t.appendChild(n);
171
220
  }
172
- const j = (e) => ({
221
+ const k = (e) => ({
173
222
  $el: e,
174
223
  $destroy() {
175
224
  }
176
- }), bt = [
225
+ }), gt = [
177
226
  // 使用docxjs支持,目前效果最好的渲染器
178
227
  {
179
228
  accepts: ["docx"],
180
- handler: async (e, t) => (await Ye(e, t), window.dispatchEvent(new Event("resize")), j(t))
229
+ handler: (e, t) => b(void 0, null, function* () {
230
+ return yield st(e, t), window.dispatchEvent(new Event("resize")), k(t);
231
+ })
181
232
  },
182
233
  // 使用pptx2html,已通过默认值更替
183
234
  {
184
235
  accepts: ["pptx"],
185
- handler: async (e, t) => (await tt(e, t), window.dispatchEvent(new Event("resize")), j(t))
236
+ handler: (e, t) => b(void 0, null, function* () {
237
+ return yield it(e, t), window.dispatchEvent(new Event("resize")), k(t);
238
+ })
186
239
  },
187
240
  // 使用exceljs + handsontable,全部样式
188
241
  {
189
242
  accepts: ["xlsx"],
190
- handler: async (e, t) => ue(e, t, "xml")
243
+ handler: (e, t) => b(void 0, null, function* () {
244
+ return he(e, t, "xml");
245
+ })
191
246
  },
192
247
  // 使用js-xlsx + handsontable,无样式
193
248
  {
194
249
  accepts: ["xlsm", "xlsb", "xls", "csv", "ods", "fods", "numbers"],
195
- handler: async (e, t) => ue(e, t, "binary")
250
+ handler: (e, t) => b(void 0, null, function* () {
251
+ return he(e, t, "binary");
252
+ })
196
253
  },
197
254
  // 使用pdfjs,渲染pdf,效果最好
198
255
  {
199
256
  accepts: ["pdf"],
200
- handler: async (e, t) => st(e, t)
257
+ handler: (e, t) => b(void 0, null, function* () {
258
+ return lt(e, t);
259
+ })
201
260
  },
202
261
  // 图片过滤器
203
262
  {
204
263
  accepts: ["gif", "jpg", "jpeg", "bmp", "tiff", "tif", "png", "svg"],
205
- handler: async (e, t) => ct(e, t)
264
+ handler: (e, t) => b(void 0, null, function* () {
265
+ return pt(e, t);
266
+ })
206
267
  },
207
268
  {
208
269
  accepts: ["md", "markdown"],
209
- handler: async (e, t) => ut(e, t)
270
+ handler: (e, t) => b(void 0, null, function* () {
271
+ return mt(e, t);
272
+ })
210
273
  },
211
274
  // 纯文本预览
212
275
  {
213
276
  accepts: ["txt", "json", "js", "css", "java", "py", "html", "jsx", "ts", "tsx", "xml", "log"],
214
- handler: async (e, t) => yt(e, t)
277
+ handler: (e, t) => b(void 0, null, function* () {
278
+ return Rt(e, t);
279
+ })
215
280
  },
216
281
  // 视频预览,仅支持MP4
217
282
  {
218
283
  accepts: ["mp4"],
219
- handler: async (e, t) => (wt(e, t), j(t))
284
+ handler: (e, t) => b(void 0, null, function* () {
285
+ return St(e, t), k(t);
286
+ })
220
287
  },
221
288
  // 错误处理
222
289
  {
223
290
  accepts: ["error"],
224
- handler: async (e, t, n) => (t.innerHTML = `<div style='text-align: center; margin-top: 80px'>不支持.${n}格式的在线预览,请下载后预览或转换为支持的格式</div>
225
- <div style='text-align: center'>支持docx, xlsx, pptx, pdf, 以及纯文本格式和各种图片格式的在线预览</div>`, j(t))
291
+ handler: (e, t, n) => b(void 0, null, function* () {
292
+ return t.innerHTML = `<div style='text-align: center; margin-top: 80px'>不支持.${n}格式的在线预览,请下载后预览或转换为支持的格式</div>
293
+ <div style='text-align: center'>支持docx, xlsx, pptx, pdf, 以及纯文本格式和各种图片格式的在线预览</div>`, k(t);
294
+ })
226
295
  }
227
- ], xe = bt.reduce((e, { accepts: t, handler: n }) => (t.forEach((r) => e.set(r, n)), e), /* @__PURE__ */ new Map()), fe = xe.get("error");
228
- function Et(e) {
296
+ ], Ne = gt.reduce((e, { accepts: t, handler: n }) => (t.forEach((r) => e.set(r, n)), e), /* @__PURE__ */ new Map()), me = Ne.get("error");
297
+ function Ot(e) {
229
298
  const t = e.lastIndexOf(".");
230
299
  return e.substring(t + 1);
231
300
  }
232
- async function Rt(e, t, n) {
233
- const r = xe.get(t.toLowerCase());
234
- if (r)
235
- return r(e, n);
236
- if (fe)
237
- return fe(e, n, t);
301
+ function At(e, t, n) {
302
+ return b(this, null, function* () {
303
+ const r = Ne.get(t.toLowerCase());
304
+ if (r)
305
+ return r(e, n);
306
+ if (me)
307
+ return me(e, n, t);
308
+ });
238
309
  }
239
- function Te(e, t) {
310
+ function Fe(e, t) {
240
311
  return function() {
241
312
  return e.apply(t, arguments);
242
313
  };
243
314
  }
244
- const { toString: _t } = Object.prototype, { getPrototypeOf: ne } = Object, M = ((e) => (t) => {
245
- const n = _t.call(t);
315
+ const { toString: xt } = Object.prototype, { getPrototypeOf: oe } = Object, q = ((e) => (t) => {
316
+ const n = xt.call(t);
246
317
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
247
- })(/* @__PURE__ */ Object.create(null)), O = (e) => (e = e.toLowerCase(), (t) => M(t) === e), q = (e) => (t) => typeof t === e, { isArray: N } = Array, B = q("undefined");
248
- function St(e) {
249
- return e !== null && !B(e) && e.constructor !== null && !B(e.constructor) && _(e.constructor.isBuffer) && e.constructor.isBuffer(e);
318
+ })(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) => q(t) === e), z = (e) => (t) => typeof t === e, { isArray: F } = Array, U = z("undefined");
319
+ function Tt(e) {
320
+ return e !== null && !U(e) && e.constructor !== null && !U(e.constructor) && S(e.constructor.isBuffer) && e.constructor.isBuffer(e);
250
321
  }
251
- const Ce = O("ArrayBuffer");
252
- function gt(e) {
322
+ const Le = x("ArrayBuffer");
323
+ function Ct(e) {
253
324
  let t;
254
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Ce(e.buffer), t;
325
+ return typeof ArrayBuffer != "undefined" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Le(e.buffer), t;
255
326
  }
256
- const Ot = q("string"), _ = q("function"), Pe = q("number"), z = (e) => e !== null && typeof e == "object", At = (e) => e === !0 || e === !1, k = (e) => {
257
- if (M(e) !== "object")
327
+ const Pt = z("string"), S = z("function"), Be = z("number"), V = (e) => e !== null && typeof e == "object", Nt = (e) => e === !0 || e === !1, I = (e) => {
328
+ if (q(e) !== "object")
258
329
  return !1;
259
- const t = ne(e);
330
+ const t = oe(e);
260
331
  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
261
- }, xt = O("Date"), Tt = O("File"), Ct = O("Blob"), Pt = O("FileList"), Nt = (e) => z(e) && _(e.pipe), Ft = (e) => {
332
+ }, Ft = x("Date"), Lt = x("File"), Bt = x("Blob"), Ut = x("FileList"), vt = (e) => V(e) && S(e.pipe), Dt = (e) => {
262
333
  let t;
263
- return e && (typeof FormData == "function" && e instanceof FormData || _(e.append) && ((t = M(e)) === "formdata" || // detect form-data instance
264
- t === "object" && _(e.toString) && e.toString() === "[object FormData]"));
265
- }, Lt = O("URLSearchParams"), Bt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
266
- function v(e, t, { allOwnKeys: n = !1 } = {}) {
267
- if (e === null || typeof e > "u")
334
+ return e && (typeof FormData == "function" && e instanceof FormData || S(e.append) && ((t = q(e)) === "formdata" || // detect form-data instance
335
+ t === "object" && S(e.toString) && e.toString() === "[object FormData]"));
336
+ }, jt = x("URLSearchParams"), kt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
337
+ function D(e, t, { allOwnKeys: n = !1 } = {}) {
338
+ if (e === null || typeof e == "undefined")
268
339
  return;
269
340
  let r, s;
270
- if (typeof e != "object" && (e = [e]), N(e))
341
+ if (typeof e != "object" && (e = [e]), F(e))
271
342
  for (r = 0, s = e.length; r < s; r++)
272
343
  t.call(null, e[r], r, e);
273
344
  else {
@@ -277,7 +348,7 @@ function v(e, t, { allOwnKeys: n = !1 } = {}) {
277
348
  l = o[r], t.call(null, e[l], l, e);
278
349
  }
279
350
  }
280
- function Ne(e, t) {
351
+ function Ue(e, t) {
281
352
  t = t.toLowerCase();
282
353
  const n = Object.keys(e);
283
354
  let r = n.length, s;
@@ -286,23 +357,23 @@ function Ne(e, t) {
286
357
  return s;
287
358
  return null;
288
359
  }
289
- const Fe = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), Le = (e) => !B(e) && e !== Fe;
290
- function Q() {
291
- const { caseless: e } = Le(this) && this || {}, t = {}, n = (r, s) => {
292
- const o = e && Ne(t, s) || s;
293
- k(t[o]) && k(r) ? t[o] = Q(t[o], r) : k(r) ? t[o] = Q({}, r) : N(r) ? t[o] = r.slice() : t[o] = r;
360
+ const ve = (() => typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : global)(), De = (e) => !U(e) && e !== ve;
361
+ function ee() {
362
+ const { caseless: e } = De(this) && this || {}, t = {}, n = (r, s) => {
363
+ const o = e && Ue(t, s) || s;
364
+ I(t[o]) && I(r) ? t[o] = ee(t[o], r) : I(r) ? t[o] = ee({}, r) : F(r) ? t[o] = r.slice() : t[o] = r;
294
365
  };
295
366
  for (let r = 0, s = arguments.length; r < s; r++)
296
- arguments[r] && v(arguments[r], n);
367
+ arguments[r] && D(arguments[r], n);
297
368
  return t;
298
369
  }
299
- const Ut = (e, t, n, { allOwnKeys: r } = {}) => (v(t, (s, o) => {
300
- n && _(s) ? e[o] = Te(s, n) : e[o] = s;
301
- }, { allOwnKeys: r }), e), vt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Dt = (e, t, n, r) => {
370
+ const It = (e, t, n, { allOwnKeys: r } = {}) => (D(t, (s, o) => {
371
+ n && S(s) ? e[o] = Fe(s, n) : e[o] = s;
372
+ }, { allOwnKeys: r }), e), Ht = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), $t = (e, t, n, r) => {
302
373
  e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
303
374
  value: t.prototype
304
375
  }), n && Object.assign(e.prototype, n);
305
- }, jt = (e, t, n, r) => {
376
+ }, Mt = (e, t, n, r) => {
306
377
  let s, o, i;
307
378
  const l = {};
308
379
  if (t = t || {}, e == null)
@@ -310,55 +381,55 @@ const Ut = (e, t, n, { allOwnKeys: r } = {}) => (v(t, (s, o) => {
310
381
  do {
311
382
  for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
312
383
  i = s[o], (!r || r(i, e, t)) && !l[i] && (t[i] = e[i], l[i] = !0);
313
- e = n !== !1 && ne(e);
384
+ e = n !== !1 && oe(e);
314
385
  } while (e && (!n || n(e, t)) && e !== Object.prototype);
315
386
  return t;
316
- }, kt = (e, t, n) => {
387
+ }, qt = (e, t, n) => {
317
388
  e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
318
389
  const r = e.indexOf(t, n);
319
390
  return r !== -1 && r === n;
320
- }, It = (e) => {
391
+ }, zt = (e) => {
321
392
  if (!e)
322
393
  return null;
323
- if (N(e))
394
+ if (F(e))
324
395
  return e;
325
396
  let t = e.length;
326
- if (!Pe(t))
397
+ if (!Be(t))
327
398
  return null;
328
399
  const n = new Array(t);
329
400
  for (; t-- > 0; )
330
401
  n[t] = e[t];
331
402
  return n;
332
- }, Ht = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ne(Uint8Array)), $t = (e, t) => {
403
+ }, Vt = ((e) => (t) => e && t instanceof e)(typeof Uint8Array != "undefined" && oe(Uint8Array)), Jt = (e, t) => {
333
404
  const r = (e && e[Symbol.iterator]).call(e);
334
405
  let s;
335
406
  for (; (s = r.next()) && !s.done; ) {
336
407
  const o = s.value;
337
408
  t.call(e, o[0], o[1]);
338
409
  }
339
- }, Mt = (e, t) => {
410
+ }, Wt = (e, t) => {
340
411
  let n;
341
412
  const r = [];
342
413
  for (; (n = e.exec(t)) !== null; )
343
414
  r.push(n);
344
415
  return r;
345
- }, qt = O("HTMLFormElement"), zt = (e) => e.toLowerCase().replace(
416
+ }, Kt = x("HTMLFormElement"), Xt = (e) => e.toLowerCase().replace(
346
417
  /[-_\s]([a-z\d])(\w*)/g,
347
418
  function(n, r, s) {
348
419
  return r.toUpperCase() + s;
349
420
  }
350
- ), de = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Vt = O("RegExp"), Be = (e, t) => {
421
+ ), ye = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Gt = x("RegExp"), je = (e, t) => {
351
422
  const n = Object.getOwnPropertyDescriptors(e), r = {};
352
- v(n, (s, o) => {
423
+ D(n, (s, o) => {
353
424
  let i;
354
425
  (i = t(s, o, e)) !== !1 && (r[o] = i || s);
355
426
  }), Object.defineProperties(e, r);
356
- }, Jt = (e) => {
357
- Be(e, (t, n) => {
358
- if (_(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
427
+ }, Qt = (e) => {
428
+ je(e, (t, n) => {
429
+ if (S(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
359
430
  return !1;
360
431
  const r = e[n];
361
- if (_(r)) {
432
+ if (S(r)) {
362
433
  if (t.enumerable = !1, "writable" in t) {
363
434
  t.writable = !1;
364
435
  return;
@@ -368,98 +439,98 @@ const Ut = (e, t, n, { allOwnKeys: r } = {}) => (v(t, (s, o) => {
368
439
  });
369
440
  }
370
441
  });
371
- }, Wt = (e, t) => {
442
+ }, Zt = (e, t) => {
372
443
  const n = {}, r = (s) => {
373
444
  s.forEach((o) => {
374
445
  n[o] = !0;
375
446
  });
376
447
  };
377
- return N(e) ? r(e) : r(String(e).split(t)), n;
378
- }, Kt = () => {
379
- }, Xt = (e, t) => (e = +e, Number.isFinite(e) ? e : t), W = "abcdefghijklmnopqrstuvwxyz", pe = "0123456789", Ue = {
380
- DIGIT: pe,
381
- ALPHA: W,
382
- ALPHA_DIGIT: W + W.toUpperCase() + pe
383
- }, Gt = (e = 16, t = Ue.ALPHA_DIGIT) => {
448
+ return F(e) ? r(e) : r(String(e).split(t)), n;
449
+ }, Yt = () => {
450
+ }, en = (e, t) => (e = +e, Number.isFinite(e) ? e : t), G = "abcdefghijklmnopqrstuvwxyz", we = "0123456789", ke = {
451
+ DIGIT: we,
452
+ ALPHA: G,
453
+ ALPHA_DIGIT: G + G.toUpperCase() + we
454
+ }, tn = (e = 16, t = ke.ALPHA_DIGIT) => {
384
455
  let n = "";
385
456
  const { length: r } = t;
386
457
  for (; e--; )
387
458
  n += t[Math.random() * r | 0];
388
459
  return n;
389
460
  };
390
- function Qt(e) {
391
- return !!(e && _(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
461
+ function nn(e) {
462
+ return !!(e && S(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
392
463
  }
393
- const Zt = (e) => {
464
+ const rn = (e) => {
394
465
  const t = new Array(10), n = (r, s) => {
395
- if (z(r)) {
466
+ if (V(r)) {
396
467
  if (t.indexOf(r) >= 0)
397
468
  return;
398
469
  if (!("toJSON" in r)) {
399
470
  t[s] = r;
400
- const o = N(r) ? [] : {};
401
- return v(r, (i, l) => {
402
- const f = n(i, s + 1);
403
- !B(f) && (o[l] = f);
471
+ const o = F(r) ? [] : {};
472
+ return D(r, (i, l) => {
473
+ const u = n(i, s + 1);
474
+ !U(u) && (o[l] = u);
404
475
  }), t[s] = void 0, o;
405
476
  }
406
477
  }
407
478
  return r;
408
479
  };
409
480
  return n(e, 0);
410
- }, Yt = O("AsyncFunction"), en = (e) => e && (z(e) || _(e)) && _(e.then) && _(e.catch), a = {
411
- isArray: N,
412
- isArrayBuffer: Ce,
413
- isBuffer: St,
414
- isFormData: Ft,
415
- isArrayBufferView: gt,
416
- isString: Ot,
417
- isNumber: Pe,
418
- isBoolean: At,
419
- isObject: z,
420
- isPlainObject: k,
421
- isUndefined: B,
422
- isDate: xt,
423
- isFile: Tt,
424
- isBlob: Ct,
425
- isRegExp: Vt,
426
- isFunction: _,
427
- isStream: Nt,
428
- isURLSearchParams: Lt,
429
- isTypedArray: Ht,
430
- isFileList: Pt,
431
- forEach: v,
432
- merge: Q,
433
- extend: Ut,
434
- trim: Bt,
435
- stripBOM: vt,
436
- inherits: Dt,
437
- toFlatObject: jt,
438
- kindOf: M,
439
- kindOfTest: O,
440
- endsWith: kt,
441
- toArray: It,
442
- forEachEntry: $t,
443
- matchAll: Mt,
444
- isHTMLForm: qt,
445
- hasOwnProperty: de,
446
- hasOwnProp: de,
481
+ }, sn = x("AsyncFunction"), on = (e) => e && (V(e) || S(e)) && S(e.then) && S(e.catch), a = {
482
+ isArray: F,
483
+ isArrayBuffer: Le,
484
+ isBuffer: Tt,
485
+ isFormData: Dt,
486
+ isArrayBufferView: Ct,
487
+ isString: Pt,
488
+ isNumber: Be,
489
+ isBoolean: Nt,
490
+ isObject: V,
491
+ isPlainObject: I,
492
+ isUndefined: U,
493
+ isDate: Ft,
494
+ isFile: Lt,
495
+ isBlob: Bt,
496
+ isRegExp: Gt,
497
+ isFunction: S,
498
+ isStream: vt,
499
+ isURLSearchParams: jt,
500
+ isTypedArray: Vt,
501
+ isFileList: Ut,
502
+ forEach: D,
503
+ merge: ee,
504
+ extend: It,
505
+ trim: kt,
506
+ stripBOM: Ht,
507
+ inherits: $t,
508
+ toFlatObject: Mt,
509
+ kindOf: q,
510
+ kindOfTest: x,
511
+ endsWith: qt,
512
+ toArray: zt,
513
+ forEachEntry: Jt,
514
+ matchAll: Wt,
515
+ isHTMLForm: Kt,
516
+ hasOwnProperty: ye,
517
+ hasOwnProp: ye,
447
518
  // an alias to avoid ESLint no-prototype-builtins detection
448
- reduceDescriptors: Be,
449
- freezeMethods: Jt,
450
- toObjectSet: Wt,
451
- toCamelCase: zt,
452
- noop: Kt,
453
- toFiniteNumber: Xt,
454
- findKey: Ne,
455
- global: Fe,
456
- isContextDefined: Le,
457
- ALPHABET: Ue,
458
- generateString: Gt,
459
- isSpecCompliantForm: Qt,
460
- toJSONObject: Zt,
461
- isAsyncFn: Yt,
462
- isThenable: en
519
+ reduceDescriptors: je,
520
+ freezeMethods: Qt,
521
+ toObjectSet: Zt,
522
+ toCamelCase: Xt,
523
+ noop: Yt,
524
+ toFiniteNumber: en,
525
+ findKey: Ue,
526
+ global: ve,
527
+ isContextDefined: De,
528
+ ALPHABET: ke,
529
+ generateString: tn,
530
+ isSpecCompliantForm: nn,
531
+ toJSONObject: rn,
532
+ isAsyncFn: sn,
533
+ isThenable: on
463
534
  };
464
535
  function y(e, t, n, r, s) {
465
536
  Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s);
@@ -485,7 +556,7 @@ a.inherits(y, Error, {
485
556
  };
486
557
  }
487
558
  });
488
- const ve = y.prototype, De = {};
559
+ const Ie = y.prototype, He = {};
489
560
  [
490
561
  "ERR_BAD_OPTION_VALUE",
491
562
  "ERR_BAD_OPTION",
@@ -501,97 +572,97 @@ const ve = y.prototype, De = {};
501
572
  "ERR_INVALID_URL"
502
573
  // eslint-disable-next-line func-names
503
574
  ].forEach((e) => {
504
- De[e] = { value: e };
575
+ He[e] = { value: e };
505
576
  });
506
- Object.defineProperties(y, De);
507
- Object.defineProperty(ve, "isAxiosError", { value: !0 });
577
+ Object.defineProperties(y, He);
578
+ Object.defineProperty(Ie, "isAxiosError", { value: !0 });
508
579
  y.from = (e, t, n, r, s, o) => {
509
- const i = Object.create(ve);
510
- return a.toFlatObject(e, i, function(f) {
511
- return f !== Error.prototype;
580
+ const i = Object.create(Ie);
581
+ return a.toFlatObject(e, i, function(u) {
582
+ return u !== Error.prototype;
512
583
  }, (l) => l !== "isAxiosError"), y.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
513
584
  };
514
- const tn = null;
515
- function Z(e) {
585
+ const an = null;
586
+ function te(e) {
516
587
  return a.isPlainObject(e) || a.isArray(e);
517
588
  }
518
- function je(e) {
589
+ function $e(e) {
519
590
  return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
520
591
  }
521
- function he(e, t, n) {
592
+ function be(e, t, n) {
522
593
  return e ? e.concat(t).map(function(s, o) {
523
- return s = je(s), !n && o ? "[" + s + "]" : s;
594
+ return s = $e(s), !n && o ? "[" + s + "]" : s;
524
595
  }).join(n ? "." : "") : t;
525
596
  }
526
- function nn(e) {
527
- return a.isArray(e) && !e.some(Z);
597
+ function cn(e) {
598
+ return a.isArray(e) && !e.some(te);
528
599
  }
529
- const rn = a.toFlatObject(a, {}, null, function(t) {
600
+ const ln = a.toFlatObject(a, {}, null, function(t) {
530
601
  return /^is[A-Z]/.test(t);
531
602
  });
532
- function V(e, t, n) {
603
+ function J(e, t, n) {
533
604
  if (!a.isObject(e))
534
605
  throw new TypeError("target must be an object");
535
606
  t = t || new FormData(), n = a.toFlatObject(n, {
536
607
  metaTokens: !0,
537
608
  dots: !1,
538
609
  indexes: !1
539
- }, !1, function(h, b) {
540
- return !a.isUndefined(b[h]);
610
+ }, !1, function(h, E) {
611
+ return !a.isUndefined(E[h]);
541
612
  });
542
- const r = n.metaTokens, s = n.visitor || u, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
613
+ const r = n.metaTokens, s = n.visitor || d, o = n.dots, i = n.indexes, u = (n.Blob || typeof Blob != "undefined" && Blob) && a.isSpecCompliantForm(t);
543
614
  if (!a.isFunction(s))
544
615
  throw new TypeError("visitor must be a function");
545
- function d(p) {
616
+ function f(p) {
546
617
  if (p === null)
547
618
  return "";
548
619
  if (a.isDate(p))
549
620
  return p.toISOString();
550
- if (!f && a.isBlob(p))
621
+ if (!u && a.isBlob(p))
551
622
  throw new y("Blob is not supported. Use a Buffer instead.");
552
- return a.isArrayBuffer(p) || a.isTypedArray(p) ? f && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
623
+ return a.isArrayBuffer(p) || a.isTypedArray(p) ? u && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
553
624
  }
554
- function u(p, h, b) {
625
+ function d(p, h, E) {
555
626
  let R = p;
556
- if (p && !b && typeof p == "object") {
627
+ if (p && !E && typeof p == "object") {
557
628
  if (a.endsWith(h, "{}"))
558
629
  h = r ? h : h.slice(0, -2), p = JSON.stringify(p);
559
- else if (a.isArray(p) && nn(p) || (a.isFileList(p) || a.endsWith(h, "[]")) && (R = a.toArray(p)))
560
- return h = je(h), R.forEach(function(x, Ke) {
561
- !(a.isUndefined(x) || x === null) && t.append(
630
+ else if (a.isArray(p) && cn(p) || (a.isFileList(p) || a.endsWith(h, "[]")) && (R = a.toArray(p)))
631
+ return h = $e(h), R.forEach(function(O, Ze) {
632
+ !(a.isUndefined(O) || O === null) && t.append(
562
633
  // eslint-disable-next-line no-nested-ternary
563
- i === !0 ? he([h], Ke, o) : i === null ? h : h + "[]",
564
- d(x)
634
+ i === !0 ? be([h], Ze, o) : i === null ? h : h + "[]",
635
+ f(O)
565
636
  );
566
637
  }), !1;
567
638
  }
568
- return Z(p) ? !0 : (t.append(he(b, h, o), d(p)), !1);
639
+ return te(p) ? !0 : (t.append(be(E, h, o), f(p)), !1);
569
640
  }
570
- const c = [], m = Object.assign(rn, {
571
- defaultVisitor: u,
572
- convertValue: d,
573
- isVisitable: Z
641
+ const c = [], m = Object.assign(ln, {
642
+ defaultVisitor: d,
643
+ convertValue: f,
644
+ isVisitable: te
574
645
  });
575
- function E(p, h) {
646
+ function w(p, h) {
576
647
  if (!a.isUndefined(p)) {
577
648
  if (c.indexOf(p) !== -1)
578
649
  throw Error("Circular reference detected in " + h.join("."));
579
- c.push(p), a.forEach(p, function(R, S) {
650
+ c.push(p), a.forEach(p, function(R, g) {
580
651
  (!(a.isUndefined(R) || R === null) && s.call(
581
652
  t,
582
653
  R,
583
- a.isString(S) ? S.trim() : S,
654
+ a.isString(g) ? g.trim() : g,
584
655
  h,
585
656
  m
586
- )) === !0 && E(R, h ? h.concat(S) : [S]);
657
+ )) === !0 && w(R, h ? h.concat(g) : [g]);
587
658
  }), c.pop();
588
659
  }
589
660
  }
590
661
  if (!a.isObject(e))
591
662
  throw new TypeError("data must be an object");
592
- return E(e), t;
663
+ return w(e), t;
593
664
  }
594
- function me(e) {
665
+ function Ee(e) {
595
666
  const t = {
596
667
  "!": "%21",
597
668
  "'": "%27",
@@ -605,36 +676,36 @@ function me(e) {
605
676
  return t[r];
606
677
  });
607
678
  }
608
- function re(e, t) {
609
- this._pairs = [], e && V(e, this, t);
679
+ function ie(e, t) {
680
+ this._pairs = [], e && J(e, this, t);
610
681
  }
611
- const ke = re.prototype;
612
- ke.append = function(t, n) {
682
+ const Me = ie.prototype;
683
+ Me.append = function(t, n) {
613
684
  this._pairs.push([t, n]);
614
685
  };
615
- ke.toString = function(t) {
686
+ Me.toString = function(t) {
616
687
  const n = t ? function(r) {
617
- return t.call(this, r, me);
618
- } : me;
688
+ return t.call(this, r, Ee);
689
+ } : Ee;
619
690
  return this._pairs.map(function(s) {
620
691
  return n(s[0]) + "=" + n(s[1]);
621
692
  }, "").join("&");
622
693
  };
623
- function sn(e) {
694
+ function un(e) {
624
695
  return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
625
696
  }
626
- function Ie(e, t, n) {
697
+ function qe(e, t, n) {
627
698
  if (!t)
628
699
  return e;
629
- const r = n && n.encode || sn, s = n && n.serialize;
700
+ const r = n && n.encode || un, s = n && n.serialize;
630
701
  let o;
631
- if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new re(t, n).toString(r), o) {
702
+ if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new ie(t, n).toString(r), o) {
632
703
  const i = e.indexOf("#");
633
704
  i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
634
705
  }
635
706
  return e;
636
707
  }
637
- class on {
708
+ class fn {
638
709
  constructor() {
639
710
  this.handlers = [];
640
711
  }
@@ -688,39 +759,36 @@ class on {
688
759
  });
689
760
  }
690
761
  }
691
- const ye = on, He = {
762
+ const _e = fn, ze = {
692
763
  silentJSONParsing: !0,
693
764
  forcedJSONParsing: !0,
694
765
  clarifyTimeoutError: !1
695
- }, an = typeof URLSearchParams < "u" ? URLSearchParams : re, cn = typeof FormData < "u" ? FormData : null, ln = typeof Blob < "u" ? Blob : null, un = {
766
+ }, dn = typeof URLSearchParams != "undefined" ? URLSearchParams : ie, pn = typeof FormData != "undefined" ? FormData : null, hn = typeof Blob != "undefined" ? Blob : null, mn = {
696
767
  isBrowser: !0,
697
768
  classes: {
698
- URLSearchParams: an,
699
- FormData: cn,
700
- Blob: ln
769
+ URLSearchParams: dn,
770
+ FormData: pn,
771
+ Blob: hn
701
772
  },
702
773
  protocols: ["http", "https", "file", "blob", "url", "data"]
703
- }, $e = typeof window < "u" && typeof document < "u", fn = ((e) => $e && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), dn = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
704
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), pn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
774
+ }, Ve = typeof window != "undefined" && typeof document != "undefined", yn = ((e) => Ve && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator != "undefined" && navigator.product), wn = (() => typeof WorkerGlobalScope != "undefined" && // eslint-disable-next-line no-undef
775
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
705
776
  __proto__: null,
706
- hasBrowserEnv: $e,
707
- hasStandardBrowserEnv: fn,
708
- hasStandardBrowserWebWorkerEnv: dn
709
- }, Symbol.toStringTag, { value: "Module" })), g = {
710
- ...pn,
711
- ...un
712
- };
713
- function hn(e, t) {
714
- return V(e, new g.classes.URLSearchParams(), Object.assign({
777
+ hasBrowserEnv: Ve,
778
+ hasStandardBrowserEnv: yn,
779
+ hasStandardBrowserWebWorkerEnv: wn
780
+ }, Symbol.toStringTag, { value: "Module" })), A = X(X({}, bn), mn);
781
+ function En(e, t) {
782
+ return J(e, new A.classes.URLSearchParams(), Object.assign({
715
783
  visitor: function(n, r, s, o) {
716
- return g.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
784
+ return A.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
717
785
  }
718
786
  }, t));
719
787
  }
720
- function mn(e) {
788
+ function _n(e) {
721
789
  return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
722
790
  }
723
- function yn(e) {
791
+ function Rn(e) {
724
792
  const t = {}, n = Object.keys(e);
725
793
  let r;
726
794
  const s = n.length;
@@ -729,21 +797,23 @@ function yn(e) {
729
797
  o = n[r], t[o] = e[o];
730
798
  return t;
731
799
  }
732
- function Me(e) {
800
+ function Je(e) {
733
801
  function t(n, r, s, o) {
734
802
  let i = n[o++];
735
- const l = Number.isFinite(+i), f = o >= n.length;
736
- return i = !i && a.isArray(s) ? s.length : i, f ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !l) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = yn(s[i])), !l);
803
+ if (i === "__proto__")
804
+ return !0;
805
+ const l = Number.isFinite(+i), u = o >= n.length;
806
+ return i = !i && a.isArray(s) ? s.length : i, u ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !l) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = Rn(s[i])), !l);
737
807
  }
738
808
  if (a.isFormData(e) && a.isFunction(e.entries)) {
739
809
  const n = {};
740
810
  return a.forEachEntry(e, (r, s) => {
741
- t(mn(r), s, n, 0);
811
+ t(_n(r), s, n, 0);
742
812
  }), n;
743
813
  }
744
814
  return null;
745
815
  }
746
- function wn(e, t, n) {
816
+ function Sn(e, t, n) {
747
817
  if (a.isString(e))
748
818
  try {
749
819
  return (t || JSON.parse)(e), a.trim(e);
@@ -753,13 +823,13 @@ function wn(e, t, n) {
753
823
  }
754
824
  return (n || JSON.stringify)(e);
755
825
  }
756
- const se = {
757
- transitional: He,
826
+ const ae = {
827
+ transitional: ze,
758
828
  adapter: ["xhr", "http"],
759
829
  transformRequest: [function(t, n) {
760
830
  const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
761
831
  if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
762
- return s && s ? JSON.stringify(Me(t)) : t;
832
+ return s ? JSON.stringify(Je(t)) : t;
763
833
  if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t))
764
834
  return t;
765
835
  if (a.isArrayBufferView(t))
@@ -769,20 +839,20 @@ const se = {
769
839
  let l;
770
840
  if (o) {
771
841
  if (r.indexOf("application/x-www-form-urlencoded") > -1)
772
- return hn(t, this.formSerializer).toString();
842
+ return En(t, this.formSerializer).toString();
773
843
  if ((l = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
774
- const f = this.env && this.env.FormData;
775
- return V(
844
+ const u = this.env && this.env.FormData;
845
+ return J(
776
846
  l ? { "files[]": t } : t,
777
- f && new f(),
847
+ u && new u(),
778
848
  this.formSerializer
779
849
  );
780
850
  }
781
851
  }
782
- return o || s ? (n.setContentType("application/json", !1), wn(t)) : t;
852
+ return o || s ? (n.setContentType("application/json", !1), Sn(t)) : t;
783
853
  }],
784
854
  transformResponse: [function(t) {
785
- const n = this.transitional || se.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
855
+ const n = this.transitional || ae.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
786
856
  if (t && a.isString(t) && (r && !this.responseType || s)) {
787
857
  const i = !(n && n.silentJSONParsing) && s;
788
858
  try {
@@ -804,8 +874,8 @@ const se = {
804
874
  maxContentLength: -1,
805
875
  maxBodyLength: -1,
806
876
  env: {
807
- FormData: g.classes.FormData,
808
- Blob: g.classes.Blob
877
+ FormData: A.classes.FormData,
878
+ Blob: A.classes.Blob
809
879
  },
810
880
  validateStatus: function(t) {
811
881
  return t >= 200 && t < 300;
@@ -818,9 +888,9 @@ const se = {
818
888
  }
819
889
  };
820
890
  a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
821
- se.headers[e] = {};
891
+ ae.headers[e] = {};
822
892
  });
823
- const oe = se, bn = a.toObjectSet([
893
+ const ce = ae, gn = a.toObjectSet([
824
894
  "age",
825
895
  "authorization",
826
896
  "content-length",
@@ -838,29 +908,29 @@ const oe = se, bn = a.toObjectSet([
838
908
  "referer",
839
909
  "retry-after",
840
910
  "user-agent"
841
- ]), En = (e) => {
911
+ ]), On = (e) => {
842
912
  const t = {};
843
913
  let n, r, s;
844
914
  return e && e.split(`
845
915
  `).forEach(function(i) {
846
- s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && bn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
916
+ s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && gn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
847
917
  }), t;
848
- }, we = Symbol("internals");
849
- function L(e) {
918
+ }, Re = Symbol("internals");
919
+ function B(e) {
850
920
  return e && String(e).trim().toLowerCase();
851
921
  }
852
- function I(e) {
853
- return e === !1 || e == null ? e : a.isArray(e) ? e.map(I) : String(e);
922
+ function H(e) {
923
+ return e === !1 || e == null ? e : a.isArray(e) ? e.map(H) : String(e);
854
924
  }
855
- function Rn(e) {
925
+ function An(e) {
856
926
  const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
857
927
  let r;
858
928
  for (; r = n.exec(e); )
859
929
  t[r[1]] = r[2];
860
930
  return t;
861
931
  }
862
- const _n = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
863
- function K(e, t, n, r, s) {
932
+ const xn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
933
+ function Q(e, t, n, r, s) {
864
934
  if (a.isFunction(r))
865
935
  return r.call(this, t, n);
866
936
  if (s && (t = n), !!a.isString(t)) {
@@ -870,10 +940,10 @@ function K(e, t, n, r, s) {
870
940
  return r.test(t);
871
941
  }
872
942
  }
873
- function Sn(e) {
943
+ function Tn(e) {
874
944
  return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
875
945
  }
876
- function gn(e, t) {
946
+ function Cn(e, t) {
877
947
  const n = a.toCamelCase(" " + t);
878
948
  ["get", "set", "has"].forEach((r) => {
879
949
  Object.defineProperty(e, r + n, {
@@ -884,31 +954,31 @@ function gn(e, t) {
884
954
  });
885
955
  });
886
956
  }
887
- class J {
957
+ class W {
888
958
  constructor(t) {
889
959
  t && this.set(t);
890
960
  }
891
961
  set(t, n, r) {
892
962
  const s = this;
893
- function o(l, f, d) {
894
- const u = L(f);
895
- if (!u)
963
+ function o(l, u, f) {
964
+ const d = B(u);
965
+ if (!d)
896
966
  throw new Error("header name must be a non-empty string");
897
- const c = a.findKey(s, u);
898
- (!c || s[c] === void 0 || d === !0 || d === void 0 && s[c] !== !1) && (s[c || f] = I(l));
967
+ const c = a.findKey(s, d);
968
+ (!c || s[c] === void 0 || f === !0 || f === void 0 && s[c] !== !1) && (s[c || u] = H(l));
899
969
  }
900
- const i = (l, f) => a.forEach(l, (d, u) => o(d, u, f));
901
- return a.isPlainObject(t) || t instanceof this.constructor ? i(t, n) : a.isString(t) && (t = t.trim()) && !_n(t) ? i(En(t), n) : t != null && o(n, t, r), this;
970
+ const i = (l, u) => a.forEach(l, (f, d) => o(f, d, u));
971
+ return a.isPlainObject(t) || t instanceof this.constructor ? i(t, n) : a.isString(t) && (t = t.trim()) && !xn(t) ? i(On(t), n) : t != null && o(n, t, r), this;
902
972
  }
903
973
  get(t, n) {
904
- if (t = L(t), t) {
974
+ if (t = B(t), t) {
905
975
  const r = a.findKey(this, t);
906
976
  if (r) {
907
977
  const s = this[r];
908
978
  if (!n)
909
979
  return s;
910
980
  if (n === !0)
911
- return Rn(s);
981
+ return An(s);
912
982
  if (a.isFunction(n))
913
983
  return n.call(this, s, r);
914
984
  if (a.isRegExp(n))
@@ -918,9 +988,9 @@ class J {
918
988
  }
919
989
  }
920
990
  has(t, n) {
921
- if (t = L(t), t) {
991
+ if (t = B(t), t) {
922
992
  const r = a.findKey(this, t);
923
- return !!(r && this[r] !== void 0 && (!n || K(this, this[r], r, n)));
993
+ return !!(r && this[r] !== void 0 && (!n || Q(this, this[r], r, n)));
924
994
  }
925
995
  return !1;
926
996
  }
@@ -928,9 +998,9 @@ class J {
928
998
  const r = this;
929
999
  let s = !1;
930
1000
  function o(i) {
931
- if (i = L(i), i) {
1001
+ if (i = B(i), i) {
932
1002
  const l = a.findKey(r, i);
933
- l && (!n || K(r, r[l], l, n)) && (delete r[l], s = !0);
1003
+ l && (!n || Q(r, r[l], l, n)) && (delete r[l], s = !0);
934
1004
  }
935
1005
  }
936
1006
  return a.isArray(t) ? t.forEach(o) : o(t), s;
@@ -940,7 +1010,7 @@ class J {
940
1010
  let r = n.length, s = !1;
941
1011
  for (; r--; ) {
942
1012
  const o = n[r];
943
- (!t || K(this, this[o], o, t, !0)) && (delete this[o], s = !0);
1013
+ (!t || Q(this, this[o], o, t, !0)) && (delete this[o], s = !0);
944
1014
  }
945
1015
  return s;
946
1016
  }
@@ -949,11 +1019,11 @@ class J {
949
1019
  return a.forEach(this, (s, o) => {
950
1020
  const i = a.findKey(r, o);
951
1021
  if (i) {
952
- n[i] = I(s), delete n[o];
1022
+ n[i] = H(s), delete n[o];
953
1023
  return;
954
1024
  }
955
- const l = t ? Sn(o) : String(o).trim();
956
- l !== o && delete n[o], n[l] = I(s), r[l] = !0;
1025
+ const l = t ? Tn(o) : String(o).trim();
1026
+ l !== o && delete n[o], n[l] = H(s), r[l] = !0;
957
1027
  }), this;
958
1028
  }
959
1029
  concat(...t) {
@@ -983,18 +1053,18 @@ class J {
983
1053
  return n.forEach((s) => r.set(s)), r;
984
1054
  }
985
1055
  static accessor(t) {
986
- const r = (this[we] = this[we] = {
1056
+ const r = (this[Re] = this[Re] = {
987
1057
  accessors: {}
988
1058
  }).accessors, s = this.prototype;
989
1059
  function o(i) {
990
- const l = L(i);
991
- r[l] || (gn(s, i), r[l] = !0);
1060
+ const l = B(i);
1061
+ r[l] || (Cn(s, i), r[l] = !0);
992
1062
  }
993
1063
  return a.isArray(t) ? t.forEach(o) : o(t), this;
994
1064
  }
995
1065
  }
996
- J.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
997
- a.reduceDescriptors(J.prototype, ({ value: e }, t) => {
1066
+ W.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1067
+ a.reduceDescriptors(W.prototype, ({ value: e }, t) => {
998
1068
  let n = t[0].toUpperCase() + t.slice(1);
999
1069
  return {
1000
1070
  get: () => e,
@@ -1003,25 +1073,25 @@ a.reduceDescriptors(J.prototype, ({ value: e }, t) => {
1003
1073
  }
1004
1074
  };
1005
1075
  });
1006
- a.freezeMethods(J);
1007
- const A = J;
1008
- function X(e, t) {
1009
- const n = this || oe, r = t || n, s = A.from(r.headers);
1076
+ a.freezeMethods(W);
1077
+ const T = W;
1078
+ function Z(e, t) {
1079
+ const n = this || ce, r = t || n, s = T.from(r.headers);
1010
1080
  let o = r.data;
1011
1081
  return a.forEach(e, function(l) {
1012
1082
  o = l.call(n, o, s.normalize(), t ? t.status : void 0);
1013
1083
  }), s.normalize(), o;
1014
1084
  }
1015
- function qe(e) {
1085
+ function We(e) {
1016
1086
  return !!(e && e.__CANCEL__);
1017
1087
  }
1018
- function D(e, t, n) {
1019
- y.call(this, e ?? "canceled", y.ERR_CANCELED, t, n), this.name = "CanceledError";
1088
+ function j(e, t, n) {
1089
+ y.call(this, e == null ? "canceled" : e, y.ERR_CANCELED, t, n), this.name = "CanceledError";
1020
1090
  }
1021
- a.inherits(D, y, {
1091
+ a.inherits(j, y, {
1022
1092
  __CANCEL__: !0
1023
1093
  });
1024
- function On(e, t, n) {
1094
+ function Pn(e, t, n) {
1025
1095
  const r = n.config.validateStatus;
1026
1096
  !n.status || !r || r(n.status) ? e(n) : t(new y(
1027
1097
  "Request failed with status code " + n.status,
@@ -1031,7 +1101,7 @@ function On(e, t, n) {
1031
1101
  n
1032
1102
  ));
1033
1103
  }
1034
- const An = g.hasStandardBrowserEnv ? (
1104
+ const Nn = A.hasStandardBrowserEnv ? (
1035
1105
  // Standard browser envs support document.cookie
1036
1106
  {
1037
1107
  write(e, t, n, r, s, o) {
@@ -1058,16 +1128,16 @@ const An = g.hasStandardBrowserEnv ? (
1058
1128
  }
1059
1129
  }
1060
1130
  );
1061
- function xn(e) {
1131
+ function Fn(e) {
1062
1132
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
1063
1133
  }
1064
- function Tn(e, t) {
1065
- return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e;
1134
+ function Ln(e, t) {
1135
+ return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
1066
1136
  }
1067
- function ze(e, t) {
1068
- return e && !xn(t) ? Tn(e, t) : t;
1137
+ function Ke(e, t) {
1138
+ return e && !Fn(t) ? Ln(e, t) : t;
1069
1139
  }
1070
- const Cn = g.hasStandardBrowserEnv ? (
1140
+ const Bn = A.hasStandardBrowserEnv ? (
1071
1141
  // Standard browser envs have full support of the APIs needed to test
1072
1142
  // whether the request URL is of the same origin as current location.
1073
1143
  function() {
@@ -1099,72 +1169,72 @@ const Cn = g.hasStandardBrowserEnv ? (
1099
1169
  };
1100
1170
  }()
1101
1171
  );
1102
- function Pn(e) {
1172
+ function Un(e) {
1103
1173
  const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
1104
1174
  return t && t[1] || "";
1105
1175
  }
1106
- function Nn(e, t) {
1176
+ function vn(e, t) {
1107
1177
  e = e || 10;
1108
1178
  const n = new Array(e), r = new Array(e);
1109
1179
  let s = 0, o = 0, i;
1110
- return t = t !== void 0 ? t : 1e3, function(f) {
1111
- const d = Date.now(), u = r[o];
1112
- i || (i = d), n[s] = f, r[s] = d;
1180
+ return t = t !== void 0 ? t : 1e3, function(u) {
1181
+ const f = Date.now(), d = r[o];
1182
+ i || (i = f), n[s] = u, r[s] = f;
1113
1183
  let c = o, m = 0;
1114
1184
  for (; c !== s; )
1115
1185
  m += n[c++], c = c % e;
1116
- if (s = (s + 1) % e, s === o && (o = (o + 1) % e), d - i < t)
1186
+ if (s = (s + 1) % e, s === o && (o = (o + 1) % e), f - i < t)
1117
1187
  return;
1118
- const E = u && d - u;
1119
- return E ? Math.round(m * 1e3 / E) : void 0;
1188
+ const w = d && f - d;
1189
+ return w ? Math.round(m * 1e3 / w) : void 0;
1120
1190
  };
1121
1191
  }
1122
- function be(e, t) {
1192
+ function Se(e, t) {
1123
1193
  let n = 0;
1124
- const r = Nn(50, 250);
1194
+ const r = vn(50, 250);
1125
1195
  return (s) => {
1126
- const o = s.loaded, i = s.lengthComputable ? s.total : void 0, l = o - n, f = r(l), d = o <= i;
1196
+ const o = s.loaded, i = s.lengthComputable ? s.total : void 0, l = o - n, u = r(l), f = o <= i;
1127
1197
  n = o;
1128
- const u = {
1198
+ const d = {
1129
1199
  loaded: o,
1130
1200
  total: i,
1131
1201
  progress: i ? o / i : void 0,
1132
1202
  bytes: l,
1133
- rate: f || void 0,
1134
- estimated: f && i && d ? (i - o) / f : void 0,
1203
+ rate: u || void 0,
1204
+ estimated: u && i && f ? (i - o) / u : void 0,
1135
1205
  event: s
1136
1206
  };
1137
- u[t ? "download" : "upload"] = !0, e(u);
1207
+ d[t ? "download" : "upload"] = !0, e(d);
1138
1208
  };
1139
1209
  }
1140
- const Fn = typeof XMLHttpRequest < "u", Ln = Fn && function(e) {
1210
+ const Dn = typeof XMLHttpRequest != "undefined", jn = Dn && function(e) {
1141
1211
  return new Promise(function(n, r) {
1142
1212
  let s = e.data;
1143
- const o = A.from(e.headers).normalize();
1144
- let { responseType: i, withXSRFToken: l } = e, f;
1145
- function d() {
1146
- e.cancelToken && e.cancelToken.unsubscribe(f), e.signal && e.signal.removeEventListener("abort", f);
1213
+ const o = T.from(e.headers).normalize();
1214
+ let { responseType: i, withXSRFToken: l } = e, u;
1215
+ function f() {
1216
+ e.cancelToken && e.cancelToken.unsubscribe(u), e.signal && e.signal.removeEventListener("abort", u);
1147
1217
  }
1148
- let u;
1218
+ let d;
1149
1219
  if (a.isFormData(s)) {
1150
- if (g.hasStandardBrowserEnv || g.hasStandardBrowserWebWorkerEnv)
1220
+ if (A.hasStandardBrowserEnv || A.hasStandardBrowserWebWorkerEnv)
1151
1221
  o.setContentType(!1);
1152
- else if ((u = o.getContentType()) !== !1) {
1153
- const [h, ...b] = u ? u.split(";").map((R) => R.trim()).filter(Boolean) : [];
1154
- o.setContentType([h || "multipart/form-data", ...b].join("; "));
1222
+ else if ((d = o.getContentType()) !== !1) {
1223
+ const [h, ...E] = d ? d.split(";").map((R) => R.trim()).filter(Boolean) : [];
1224
+ o.setContentType([h || "multipart/form-data", ...E].join("; "));
1155
1225
  }
1156
1226
  }
1157
1227
  let c = new XMLHttpRequest();
1158
1228
  if (e.auth) {
1159
- const h = e.auth.username || "", b = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
1160
- o.set("Authorization", "Basic " + btoa(h + ":" + b));
1229
+ const h = e.auth.username || "", E = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
1230
+ o.set("Authorization", "Basic " + btoa(h + ":" + E));
1161
1231
  }
1162
- const m = ze(e.baseURL, e.url);
1163
- c.open(e.method.toUpperCase(), Ie(m, e.params, e.paramsSerializer), !0), c.timeout = e.timeout;
1164
- function E() {
1232
+ const m = Ke(e.baseURL, e.url);
1233
+ c.open(e.method.toUpperCase(), qe(m, e.params, e.paramsSerializer), !0), c.timeout = e.timeout;
1234
+ function w() {
1165
1235
  if (!c)
1166
1236
  return;
1167
- const h = A.from(
1237
+ const h = T.from(
1168
1238
  "getAllResponseHeaders" in c && c.getAllResponseHeaders()
1169
1239
  ), R = {
1170
1240
  data: !i || i === "text" || i === "json" ? c.responseText : c.response,
@@ -1174,57 +1244,57 @@ const Fn = typeof XMLHttpRequest < "u", Ln = Fn && function(e) {
1174
1244
  config: e,
1175
1245
  request: c
1176
1246
  };
1177
- On(function(x) {
1178
- n(x), d();
1179
- }, function(x) {
1180
- r(x), d();
1247
+ Pn(function(O) {
1248
+ n(O), f();
1249
+ }, function(O) {
1250
+ r(O), f();
1181
1251
  }, R), c = null;
1182
1252
  }
1183
- if ("onloadend" in c ? c.onloadend = E : c.onreadystatechange = function() {
1184
- !c || c.readyState !== 4 || c.status === 0 && !(c.responseURL && c.responseURL.indexOf("file:") === 0) || setTimeout(E);
1253
+ if ("onloadend" in c ? c.onloadend = w : c.onreadystatechange = function() {
1254
+ !c || c.readyState !== 4 || c.status === 0 && !(c.responseURL && c.responseURL.indexOf("file:") === 0) || setTimeout(w);
1185
1255
  }, c.onabort = function() {
1186
1256
  c && (r(new y("Request aborted", y.ECONNABORTED, e, c)), c = null);
1187
1257
  }, c.onerror = function() {
1188
1258
  r(new y("Network Error", y.ERR_NETWORK, e, c)), c = null;
1189
1259
  }, c.ontimeout = function() {
1190
- let b = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
1191
- const R = e.transitional || He;
1192
- e.timeoutErrorMessage && (b = e.timeoutErrorMessage), r(new y(
1193
- b,
1260
+ let E = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
1261
+ const R = e.transitional || ze;
1262
+ e.timeoutErrorMessage && (E = e.timeoutErrorMessage), r(new y(
1263
+ E,
1194
1264
  R.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
1195
1265
  e,
1196
1266
  c
1197
1267
  )), c = null;
1198
- }, g.hasStandardBrowserEnv && (l && a.isFunction(l) && (l = l(e)), l || l !== !1 && Cn(m))) {
1199
- const h = e.xsrfHeaderName && e.xsrfCookieName && An.read(e.xsrfCookieName);
1268
+ }, A.hasStandardBrowserEnv && (l && a.isFunction(l) && (l = l(e)), l || l !== !1 && Bn(m))) {
1269
+ const h = e.xsrfHeaderName && e.xsrfCookieName && Nn.read(e.xsrfCookieName);
1200
1270
  h && o.set(e.xsrfHeaderName, h);
1201
1271
  }
1202
- s === void 0 && o.setContentType(null), "setRequestHeader" in c && a.forEach(o.toJSON(), function(b, R) {
1203
- c.setRequestHeader(R, b);
1204
- }), a.isUndefined(e.withCredentials) || (c.withCredentials = !!e.withCredentials), i && i !== "json" && (c.responseType = e.responseType), typeof e.onDownloadProgress == "function" && c.addEventListener("progress", be(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && c.upload && c.upload.addEventListener("progress", be(e.onUploadProgress)), (e.cancelToken || e.signal) && (f = (h) => {
1205
- c && (r(!h || h.type ? new D(null, e, c) : h), c.abort(), c = null);
1206
- }, e.cancelToken && e.cancelToken.subscribe(f), e.signal && (e.signal.aborted ? f() : e.signal.addEventListener("abort", f)));
1207
- const p = Pn(m);
1208
- if (p && g.protocols.indexOf(p) === -1) {
1272
+ s === void 0 && o.setContentType(null), "setRequestHeader" in c && a.forEach(o.toJSON(), function(E, R) {
1273
+ c.setRequestHeader(R, E);
1274
+ }), a.isUndefined(e.withCredentials) || (c.withCredentials = !!e.withCredentials), i && i !== "json" && (c.responseType = e.responseType), typeof e.onDownloadProgress == "function" && c.addEventListener("progress", Se(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && c.upload && c.upload.addEventListener("progress", Se(e.onUploadProgress)), (e.cancelToken || e.signal) && (u = (h) => {
1275
+ c && (r(!h || h.type ? new j(null, e, c) : h), c.abort(), c = null);
1276
+ }, e.cancelToken && e.cancelToken.subscribe(u), e.signal && (e.signal.aborted ? u() : e.signal.addEventListener("abort", u)));
1277
+ const p = Un(m);
1278
+ if (p && A.protocols.indexOf(p) === -1) {
1209
1279
  r(new y("Unsupported protocol " + p + ":", y.ERR_BAD_REQUEST, e));
1210
1280
  return;
1211
1281
  }
1212
1282
  c.send(s || null);
1213
1283
  });
1214
- }, Y = {
1215
- http: tn,
1216
- xhr: Ln
1284
+ }, ne = {
1285
+ http: an,
1286
+ xhr: jn
1217
1287
  };
1218
- a.forEach(Y, (e, t) => {
1288
+ a.forEach(ne, (e, t) => {
1219
1289
  if (e) {
1220
1290
  try {
1221
1291
  Object.defineProperty(e, "name", { value: t });
1222
- } catch {
1292
+ } catch (n) {
1223
1293
  }
1224
1294
  Object.defineProperty(e, "adapterName", { value: t });
1225
1295
  }
1226
1296
  });
1227
- const Ee = (e) => `- ${e}`, Bn = (e) => a.isFunction(e) || e === null || e === !1, Ve = {
1297
+ const ge = (e) => `- ${e}`, kn = (e) => a.isFunction(e) || e === null || e === !1, Xe = {
1228
1298
  getAdapter: (e) => {
1229
1299
  e = a.isArray(e) ? e : [e];
1230
1300
  const { length: t } = e;
@@ -1233,7 +1303,7 @@ const Ee = (e) => `- ${e}`, Bn = (e) => a.isFunction(e) || e === null || e === !
1233
1303
  for (let o = 0; o < t; o++) {
1234
1304
  n = e[o];
1235
1305
  let i;
1236
- if (r = n, !Bn(n) && (r = Y[(i = String(n)).toLowerCase()], r === void 0))
1306
+ if (r = n, !kn(n) && (r = ne[(i = String(n)).toLowerCase()], r === void 0))
1237
1307
  throw new y(`Unknown adapter '${i}'`);
1238
1308
  if (r)
1239
1309
  break;
@@ -1241,11 +1311,11 @@ const Ee = (e) => `- ${e}`, Bn = (e) => a.isFunction(e) || e === null || e === !
1241
1311
  }
1242
1312
  if (!r) {
1243
1313
  const o = Object.entries(s).map(
1244
- ([l, f]) => `adapter ${l} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
1314
+ ([l, u]) => `adapter ${l} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
1245
1315
  );
1246
1316
  let i = t ? o.length > 1 ? `since :
1247
- ` + o.map(Ee).join(`
1248
- `) : " " + Ee(o[0]) : "as no adapter specified";
1317
+ ` + o.map(ge).join(`
1318
+ `) : " " + ge(o[0]) : "as no adapter specified";
1249
1319
  throw new y(
1250
1320
  "There is no suitable adapter to dispatch the request " + i,
1251
1321
  "ERR_NOT_SUPPORT"
@@ -1253,62 +1323,62 @@ const Ee = (e) => `- ${e}`, Bn = (e) => a.isFunction(e) || e === null || e === !
1253
1323
  }
1254
1324
  return r;
1255
1325
  },
1256
- adapters: Y
1326
+ adapters: ne
1257
1327
  };
1258
- function G(e) {
1328
+ function Y(e) {
1259
1329
  if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1260
- throw new D(null, e);
1330
+ throw new j(null, e);
1261
1331
  }
1262
- function Re(e) {
1263
- return G(e), e.headers = A.from(e.headers), e.data = X.call(
1332
+ function Oe(e) {
1333
+ return Y(e), e.headers = T.from(e.headers), e.data = Z.call(
1264
1334
  e,
1265
1335
  e.transformRequest
1266
- ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Ve.getAdapter(e.adapter || oe.adapter)(e).then(function(r) {
1267
- return G(e), r.data = X.call(
1336
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Xe.getAdapter(e.adapter || ce.adapter)(e).then(function(r) {
1337
+ return Y(e), r.data = Z.call(
1268
1338
  e,
1269
1339
  e.transformResponse,
1270
1340
  r
1271
- ), r.headers = A.from(r.headers), r;
1341
+ ), r.headers = T.from(r.headers), r;
1272
1342
  }, function(r) {
1273
- return qe(r) || (G(e), r && r.response && (r.response.data = X.call(
1343
+ return We(r) || (Y(e), r && r.response && (r.response.data = Z.call(
1274
1344
  e,
1275
1345
  e.transformResponse,
1276
1346
  r.response
1277
- ), r.response.headers = A.from(r.response.headers))), Promise.reject(r);
1347
+ ), r.response.headers = T.from(r.response.headers))), Promise.reject(r);
1278
1348
  });
1279
1349
  }
1280
- const _e = (e) => e instanceof A ? e.toJSON() : e;
1281
- function C(e, t) {
1350
+ const Ae = (e) => e instanceof T ? e.toJSON() : e;
1351
+ function P(e, t) {
1282
1352
  t = t || {};
1283
1353
  const n = {};
1284
- function r(d, u, c) {
1285
- return a.isPlainObject(d) && a.isPlainObject(u) ? a.merge.call({ caseless: c }, d, u) : a.isPlainObject(u) ? a.merge({}, u) : a.isArray(u) ? u.slice() : u;
1354
+ function r(f, d, c) {
1355
+ return a.isPlainObject(f) && a.isPlainObject(d) ? a.merge.call({ caseless: c }, f, d) : a.isPlainObject(d) ? a.merge({}, d) : a.isArray(d) ? d.slice() : d;
1286
1356
  }
1287
- function s(d, u, c) {
1288
- if (a.isUndefined(u)) {
1289
- if (!a.isUndefined(d))
1290
- return r(void 0, d, c);
1357
+ function s(f, d, c) {
1358
+ if (a.isUndefined(d)) {
1359
+ if (!a.isUndefined(f))
1360
+ return r(void 0, f, c);
1291
1361
  } else
1292
- return r(d, u, c);
1362
+ return r(f, d, c);
1293
1363
  }
1294
- function o(d, u) {
1295
- if (!a.isUndefined(u))
1296
- return r(void 0, u);
1364
+ function o(f, d) {
1365
+ if (!a.isUndefined(d))
1366
+ return r(void 0, d);
1297
1367
  }
1298
- function i(d, u) {
1299
- if (a.isUndefined(u)) {
1300
- if (!a.isUndefined(d))
1301
- return r(void 0, d);
1368
+ function i(f, d) {
1369
+ if (a.isUndefined(d)) {
1370
+ if (!a.isUndefined(f))
1371
+ return r(void 0, f);
1302
1372
  } else
1303
- return r(void 0, u);
1373
+ return r(void 0, d);
1304
1374
  }
1305
- function l(d, u, c) {
1375
+ function l(f, d, c) {
1306
1376
  if (c in t)
1307
- return r(d, u);
1377
+ return r(f, d);
1308
1378
  if (c in e)
1309
- return r(void 0, d);
1379
+ return r(void 0, f);
1310
1380
  }
1311
- const f = {
1381
+ const u = {
1312
1382
  url: o,
1313
1383
  method: o,
1314
1384
  data: o,
@@ -1337,23 +1407,23 @@ function C(e, t) {
1337
1407
  socketPath: i,
1338
1408
  responseEncoding: i,
1339
1409
  validateStatus: l,
1340
- headers: (d, u) => s(_e(d), _e(u), !0)
1410
+ headers: (f, d) => s(Ae(f), Ae(d), !0)
1341
1411
  };
1342
- return a.forEach(Object.keys(Object.assign({}, e, t)), function(u) {
1343
- const c = f[u] || s, m = c(e[u], t[u], u);
1344
- a.isUndefined(m) && c !== l || (n[u] = m);
1412
+ return a.forEach(Object.keys(Object.assign({}, e, t)), function(d) {
1413
+ const c = u[d] || s, m = c(e[d], t[d], d);
1414
+ a.isUndefined(m) && c !== l || (n[d] = m);
1345
1415
  }), n;
1346
1416
  }
1347
- const Je = "1.6.2", ie = {};
1417
+ const Ge = "1.6.7", le = {};
1348
1418
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1349
- ie[e] = function(r) {
1419
+ le[e] = function(r) {
1350
1420
  return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
1351
1421
  };
1352
1422
  });
1353
- const Se = {};
1354
- ie.transitional = function(t, n, r) {
1423
+ const xe = {};
1424
+ le.transitional = function(t, n, r) {
1355
1425
  function s(o, i) {
1356
- return "[Axios v" + Je + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
1426
+ return "[Axios v" + Ge + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
1357
1427
  }
1358
1428
  return (o, i, l) => {
1359
1429
  if (t === !1)
@@ -1361,7 +1431,7 @@ ie.transitional = function(t, n, r) {
1361
1431
  s(i, " has been removed" + (n ? " in " + n : "")),
1362
1432
  y.ERR_DEPRECATED
1363
1433
  );
1364
- return n && !Se[i] && (Se[i] = !0, console.warn(
1434
+ return n && !xe[i] && (xe[i] = !0, console.warn(
1365
1435
  s(
1366
1436
  i,
1367
1437
  " has been deprecated since v" + n + " and will be removed in the near future"
@@ -1369,7 +1439,7 @@ ie.transitional = function(t, n, r) {
1369
1439
  )), t ? t(o, i, l) : !0;
1370
1440
  };
1371
1441
  };
1372
- function Un(e, t, n) {
1442
+ function In(e, t, n) {
1373
1443
  if (typeof e != "object")
1374
1444
  throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
1375
1445
  const r = Object.keys(e);
@@ -1377,24 +1447,24 @@ function Un(e, t, n) {
1377
1447
  for (; s-- > 0; ) {
1378
1448
  const o = r[s], i = t[o];
1379
1449
  if (i) {
1380
- const l = e[o], f = l === void 0 || i(l, o, e);
1381
- if (f !== !0)
1382
- throw new y("option " + o + " must be " + f, y.ERR_BAD_OPTION_VALUE);
1450
+ const l = e[o], u = l === void 0 || i(l, o, e);
1451
+ if (u !== !0)
1452
+ throw new y("option " + o + " must be " + u, y.ERR_BAD_OPTION_VALUE);
1383
1453
  continue;
1384
1454
  }
1385
1455
  if (n !== !0)
1386
1456
  throw new y("Unknown option " + o, y.ERR_BAD_OPTION);
1387
1457
  }
1388
1458
  }
1389
- const ee = {
1390
- assertOptions: Un,
1391
- validators: ie
1392
- }, T = ee.validators;
1393
- class $ {
1459
+ const re = {
1460
+ assertOptions: In,
1461
+ validators: le
1462
+ }, C = re.validators;
1463
+ class M {
1394
1464
  constructor(t) {
1395
1465
  this.defaults = t, this.interceptors = {
1396
- request: new ye(),
1397
- response: new ye()
1466
+ request: new _e(),
1467
+ response: new _e()
1398
1468
  };
1399
1469
  }
1400
1470
  /**
@@ -1406,17 +1476,33 @@ class $ {
1406
1476
  * @returns {Promise} The Promise to be fulfilled
1407
1477
  */
1408
1478
  request(t, n) {
1409
- typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = C(this.defaults, n);
1479
+ return b(this, null, function* () {
1480
+ try {
1481
+ return yield this._request(t, n);
1482
+ } catch (r) {
1483
+ if (r instanceof Error) {
1484
+ let s;
1485
+ Error.captureStackTrace ? Error.captureStackTrace(s = {}) : s = new Error();
1486
+ const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
1487
+ r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
1488
+ ` + o) : r.stack = o;
1489
+ }
1490
+ throw r;
1491
+ }
1492
+ });
1493
+ }
1494
+ _request(t, n) {
1495
+ typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = P(this.defaults, n);
1410
1496
  const { transitional: r, paramsSerializer: s, headers: o } = n;
1411
- r !== void 0 && ee.assertOptions(r, {
1412
- silentJSONParsing: T.transitional(T.boolean),
1413
- forcedJSONParsing: T.transitional(T.boolean),
1414
- clarifyTimeoutError: T.transitional(T.boolean)
1497
+ r !== void 0 && re.assertOptions(r, {
1498
+ silentJSONParsing: C.transitional(C.boolean),
1499
+ forcedJSONParsing: C.transitional(C.boolean),
1500
+ clarifyTimeoutError: C.transitional(C.boolean)
1415
1501
  }, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
1416
1502
  serialize: s
1417
- } : ee.assertOptions(s, {
1418
- encode: T.function,
1419
- serialize: T.function
1503
+ } : re.assertOptions(s, {
1504
+ encode: C.function,
1505
+ serialize: C.function
1420
1506
  }, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1421
1507
  let i = o && a.merge(
1422
1508
  o.common,
@@ -1427,52 +1513,52 @@ class $ {
1427
1513
  (p) => {
1428
1514
  delete o[p];
1429
1515
  }
1430
- ), n.headers = A.concat(i, o);
1516
+ ), n.headers = T.concat(i, o);
1431
1517
  const l = [];
1432
- let f = !0;
1518
+ let u = !0;
1433
1519
  this.interceptors.request.forEach(function(h) {
1434
- typeof h.runWhen == "function" && h.runWhen(n) === !1 || (f = f && h.synchronous, l.unshift(h.fulfilled, h.rejected));
1520
+ typeof h.runWhen == "function" && h.runWhen(n) === !1 || (u = u && h.synchronous, l.unshift(h.fulfilled, h.rejected));
1435
1521
  });
1436
- const d = [];
1522
+ const f = [];
1437
1523
  this.interceptors.response.forEach(function(h) {
1438
- d.push(h.fulfilled, h.rejected);
1524
+ f.push(h.fulfilled, h.rejected);
1439
1525
  });
1440
- let u, c = 0, m;
1441
- if (!f) {
1442
- const p = [Re.bind(this), void 0];
1443
- for (p.unshift.apply(p, l), p.push.apply(p, d), m = p.length, u = Promise.resolve(n); c < m; )
1444
- u = u.then(p[c++], p[c++]);
1445
- return u;
1526
+ let d, c = 0, m;
1527
+ if (!u) {
1528
+ const p = [Oe.bind(this), void 0];
1529
+ for (p.unshift.apply(p, l), p.push.apply(p, f), m = p.length, d = Promise.resolve(n); c < m; )
1530
+ d = d.then(p[c++], p[c++]);
1531
+ return d;
1446
1532
  }
1447
1533
  m = l.length;
1448
- let E = n;
1534
+ let w = n;
1449
1535
  for (c = 0; c < m; ) {
1450
1536
  const p = l[c++], h = l[c++];
1451
1537
  try {
1452
- E = p(E);
1453
- } catch (b) {
1454
- h.call(this, b);
1538
+ w = p(w);
1539
+ } catch (E) {
1540
+ h.call(this, E);
1455
1541
  break;
1456
1542
  }
1457
1543
  }
1458
1544
  try {
1459
- u = Re.call(this, E);
1545
+ d = Oe.call(this, w);
1460
1546
  } catch (p) {
1461
1547
  return Promise.reject(p);
1462
1548
  }
1463
- for (c = 0, m = d.length; c < m; )
1464
- u = u.then(d[c++], d[c++]);
1465
- return u;
1549
+ for (c = 0, m = f.length; c < m; )
1550
+ d = d.then(f[c++], f[c++]);
1551
+ return d;
1466
1552
  }
1467
1553
  getUri(t) {
1468
- t = C(this.defaults, t);
1469
- const n = ze(t.baseURL, t.url);
1470
- return Ie(n, t.params, t.paramsSerializer);
1554
+ t = P(this.defaults, t);
1555
+ const n = Ke(t.baseURL, t.url);
1556
+ return qe(n, t.params, t.paramsSerializer);
1471
1557
  }
1472
1558
  }
1473
1559
  a.forEach(["delete", "get", "head", "options"], function(t) {
1474
- $.prototype[t] = function(n, r) {
1475
- return this.request(C(r || {}, {
1560
+ M.prototype[t] = function(n, r) {
1561
+ return this.request(P(r || {}, {
1476
1562
  method: t,
1477
1563
  url: n,
1478
1564
  data: (r || {}).data
@@ -1482,7 +1568,7 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
1482
1568
  a.forEach(["post", "put", "patch"], function(t) {
1483
1569
  function n(r) {
1484
1570
  return function(o, i, l) {
1485
- return this.request(C(l || {}, {
1571
+ return this.request(P(l || {}, {
1486
1572
  method: t,
1487
1573
  headers: r ? {
1488
1574
  "Content-Type": "multipart/form-data"
@@ -1492,10 +1578,10 @@ a.forEach(["post", "put", "patch"], function(t) {
1492
1578
  }));
1493
1579
  };
1494
1580
  }
1495
- $.prototype[t] = n(), $.prototype[t + "Form"] = n(!0);
1581
+ M.prototype[t] = n(), M.prototype[t + "Form"] = n(!0);
1496
1582
  });
1497
- const H = $;
1498
- class ae {
1583
+ const $ = M;
1584
+ class ue {
1499
1585
  constructor(t) {
1500
1586
  if (typeof t != "function")
1501
1587
  throw new TypeError("executor must be a function.");
@@ -1520,7 +1606,7 @@ class ae {
1520
1606
  r.unsubscribe(o);
1521
1607
  }, i;
1522
1608
  }, t(function(o, i, l) {
1523
- r.reason || (r.reason = new D(o, i, l), n(r.reason));
1609
+ r.reason || (r.reason = new j(o, i, l), n(r.reason));
1524
1610
  });
1525
1611
  }
1526
1612
  /**
@@ -1556,23 +1642,23 @@ class ae {
1556
1642
  static source() {
1557
1643
  let t;
1558
1644
  return {
1559
- token: new ae(function(s) {
1645
+ token: new ue(function(s) {
1560
1646
  t = s;
1561
1647
  }),
1562
1648
  cancel: t
1563
1649
  };
1564
1650
  }
1565
1651
  }
1566
- const vn = ae;
1567
- function Dn(e) {
1652
+ const Hn = ue;
1653
+ function $n(e) {
1568
1654
  return function(n) {
1569
1655
  return e.apply(null, n);
1570
1656
  };
1571
1657
  }
1572
- function jn(e) {
1658
+ function Mn(e) {
1573
1659
  return a.isObject(e) && e.isAxiosError === !0;
1574
1660
  }
1575
- const te = {
1661
+ const se = {
1576
1662
  Continue: 100,
1577
1663
  SwitchingProtocols: 101,
1578
1664
  Processing: 102,
@@ -1637,151 +1723,155 @@ const te = {
1637
1723
  NotExtended: 510,
1638
1724
  NetworkAuthenticationRequired: 511
1639
1725
  };
1640
- Object.entries(te).forEach(([e, t]) => {
1641
- te[t] = e;
1726
+ Object.entries(se).forEach(([e, t]) => {
1727
+ se[t] = e;
1642
1728
  });
1643
- const kn = te;
1644
- function We(e) {
1645
- const t = new H(e), n = Te(H.prototype.request, t);
1646
- return a.extend(n, H.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1647
- return We(C(e, s));
1729
+ const qn = se;
1730
+ function Qe(e) {
1731
+ const t = new $(e), n = Fe($.prototype.request, t);
1732
+ return a.extend(n, $.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1733
+ return Qe(P(e, s));
1648
1734
  }, n;
1649
1735
  }
1650
- const w = We(oe);
1651
- w.Axios = H;
1652
- w.CanceledError = D;
1653
- w.CancelToken = vn;
1654
- w.isCancel = qe;
1655
- w.VERSION = Je;
1656
- w.toFormData = V;
1657
- w.AxiosError = y;
1658
- w.Cancel = w.CanceledError;
1659
- w.all = function(t) {
1736
+ const _ = Qe(ce);
1737
+ _.Axios = $;
1738
+ _.CanceledError = j;
1739
+ _.CancelToken = Hn;
1740
+ _.isCancel = We;
1741
+ _.VERSION = Ge;
1742
+ _.toFormData = J;
1743
+ _.AxiosError = y;
1744
+ _.Cancel = _.CanceledError;
1745
+ _.all = function(t) {
1660
1746
  return Promise.all(t);
1661
1747
  };
1662
- w.spread = Dn;
1663
- w.isAxiosError = jn;
1664
- w.mergeConfig = C;
1665
- w.AxiosHeaders = A;
1666
- w.formToJSON = (e) => Me(a.isHTMLForm(e) ? new FormData(e) : e);
1667
- w.getAdapter = Ve.getAdapter;
1668
- w.HttpStatusCode = kn;
1669
- w.default = w;
1670
- const In = w, Hn = /* @__PURE__ */ ge({
1748
+ _.spread = $n;
1749
+ _.isAxiosError = Mn;
1750
+ _.mergeConfig = P;
1751
+ _.AxiosHeaders = T;
1752
+ _.formToJSON = (e) => Je(a.isHTMLForm(e) ? new FormData(e) : e);
1753
+ _.getAdapter = Xe.getAdapter;
1754
+ _.HttpStatusCode = qn;
1755
+ _.default = _;
1756
+ const zn = _, Vn = /* @__PURE__ */ Te({
1671
1757
  __name: "FileViewer",
1672
1758
  props: {
1673
1759
  file: null,
1674
1760
  url: null
1675
1761
  },
1676
1762
  setup(e) {
1677
- const t = e, n = F(!1), r = F(""), s = F(""), o = F(""), i = F();
1763
+ const t = e, n = L(!1), r = L(""), s = L(""), o = L(""), i = L();
1678
1764
  return (() => {
1679
1765
  const l = {
1680
1766
  loading: "正在加载中,请耐心等待...",
1681
1767
  reading: "正在努力解析文件...",
1682
- errorLoading: (u) => `加载文件异常:${u}`,
1683
- errorReading: (u) => `读取文件异常:${u}`
1768
+ errorLoading: (c) => `加载文件异常:${c}`,
1769
+ errorReading: (c) => `读取文件异常:${c}`
1684
1770
  };
1685
- let f;
1686
- const d = {
1771
+ let u;
1772
+ const f = {
1687
1773
  // 从url加载
1688
- async loadFromUrl() {
1689
- const { url: u } = t;
1690
- if (!u)
1691
- return;
1692
- this.startLoading(l.loading);
1693
- const c = u.substring(u.lastIndexOf("/") + 1);
1694
- try {
1695
- const { data: m } = await In({ url: u, method: "get", responseType: "blob" });
1696
- if (!m)
1697
- return this.showError("文件下载失败");
1698
- const E = this.wrap(m, c);
1699
- return this.resolveFile(E);
1700
- } catch (m) {
1701
- this.showError(l.errorLoading(m));
1702
- } finally {
1703
- this.endLoading();
1704
- }
1774
+ loadFromUrl() {
1775
+ return b(this, null, function* () {
1776
+ const { url: c } = t;
1777
+ if (!c)
1778
+ return;
1779
+ this.startLoading(l.loading);
1780
+ const m = c.substring(c.lastIndexOf("/") + 1);
1781
+ try {
1782
+ const { data: w } = yield zn({ url: c, method: "get", responseType: "blob" });
1783
+ if (!w)
1784
+ return this.showError("文件下载失败");
1785
+ const p = this.wrap(w, m);
1786
+ return this.resolveFile(p);
1787
+ } catch (w) {
1788
+ this.showError(l.errorLoading(w));
1789
+ } finally {
1790
+ this.endLoading();
1791
+ }
1792
+ });
1705
1793
  },
1706
1794
  // 包装file
1707
- wrap(u, c) {
1708
- if (u instanceof File)
1709
- return u;
1710
- if (u instanceof Blob && c)
1711
- return new File([u], c, {});
1712
- if (u instanceof ArrayBuffer)
1713
- return this.wrap(new Blob([u]));
1795
+ wrap(c, m) {
1796
+ if (c instanceof File)
1797
+ return c;
1798
+ if (c instanceof Blob && m)
1799
+ return new File([c], m, {});
1800
+ if (c instanceof ArrayBuffer)
1801
+ return this.wrap(new Blob([c]));
1714
1802
  throw new Error("不支持的文件类型格式!");
1715
1803
  },
1716
1804
  // 处理并解析文件
1717
- async resolveFile(u) {
1718
- n.value && this.endLoading();
1719
- const c = this.wrap(u);
1720
- this.startLoading(l.reading);
1721
- try {
1722
- o.value = c.name && decodeURIComponent(c.name) || "";
1723
- const m = await ot(c);
1724
- m instanceof ArrayBuffer && (f = await this.displayResult(m, c));
1725
- } catch (m) {
1726
- console.error(m), this.showError(l.errorReading(m));
1727
- } finally {
1728
- this.endLoading();
1729
- }
1805
+ resolveFile(c) {
1806
+ return b(this, null, function* () {
1807
+ n.value && this.endLoading();
1808
+ const m = this.wrap(c);
1809
+ this.startLoading(l.reading);
1810
+ try {
1811
+ o.value = m.name && decodeURIComponent(m.name) || "";
1812
+ const w = yield ut(m);
1813
+ w instanceof ArrayBuffer && (u = yield this.displayResult(w, m));
1814
+ } catch (w) {
1815
+ console.error(w), this.showError(l.errorReading(w));
1816
+ } finally {
1817
+ this.endLoading();
1818
+ }
1819
+ });
1730
1820
  },
1731
1821
  // 展示渲染最终效果
1732
- displayResult(u, c) {
1733
- const { name: m } = c, E = Et(m), p = i.value;
1734
- if (!p)
1822
+ displayResult(c, m) {
1823
+ const { name: w } = m, p = Ot(w), h = i.value;
1824
+ if (!h)
1735
1825
  return Promise.resolve();
1736
- f && (p.lastChild && p.removeChild(p.lastChild), f.$destroy());
1737
- const h = document.createElement("div");
1738
- h.className = "file-render";
1739
- const b = p.appendChild(h);
1740
- return new Promise((R, S) => Rt(u, E, b).then(R).catch(S));
1826
+ u && (h.lastChild && h.removeChild(h.lastChild), u.$destroy());
1827
+ const E = document.createElement("div");
1828
+ E.className = "file-render";
1829
+ const R = h.appendChild(E);
1830
+ return new Promise((g, O) => At(c, p, R).then(g).catch(O));
1741
1831
  },
1742
- showError(u) {
1743
- r.value = u;
1832
+ showError(c) {
1833
+ r.value = c;
1744
1834
  },
1745
- startLoading(u) {
1746
- n.value = !0, s.value = u, r.value = "";
1835
+ startLoading(c) {
1836
+ n.value = !0, s.value = c, r.value = "";
1747
1837
  },
1748
1838
  endLoading() {
1749
1839
  n.value = !1, s.value = "";
1750
1840
  }
1751
1841
  };
1752
- Qe(() => {
1753
- t.file && d.resolveFile(t.file), d.loadFromUrl();
1754
- }), le(() => t.url, () => d.loadFromUrl()), le(() => t.file, (u) => u && d.resolveFile(u));
1842
+ nt(() => {
1843
+ t.file && f.resolveFile(t.file), f.loadFromUrl();
1844
+ }), pe(() => t.url, () => f.loadFromUrl()), pe(() => t.file, (c) => c && f.resolveFile(c));
1755
1845
  })(), { __sfc: !0, props: t, loading: n, error: r, message: s, filename: o, output: i };
1756
1846
  }
1757
1847
  });
1758
- var $n = function() {
1848
+ var Jn = function() {
1759
1849
  var t = this, n = t._self._c, r = t._self._setupProxy;
1760
1850
  return n("div", { staticClass: "file-viewer" }, [n("div", { staticClass: "name" }, [t._v(t._s(r.filename))]), r.error ? n("div", { staticClass: "content loading" }, [t._v(t._s(r.error))]) : [n("div", { directives: [{ name: "show", rawName: "v-show", value: r.loading, expression: "loading" }], staticClass: "content loading" }, [t._v(t._s(r.message))]), n("div", { directives: [{ name: "show", rawName: "v-show", value: !r.loading, expression: "!loading" }], ref: "output", staticClass: "content" })]], 2);
1761
- }, Mn = [], qn = /* @__PURE__ */ Ae(
1762
- Hn,
1763
- $n,
1764
- Mn,
1851
+ }, Wn = [], Kn = /* @__PURE__ */ Pe(
1852
+ Vn,
1853
+ Jn,
1854
+ Wn,
1765
1855
  !1,
1766
1856
  null,
1767
1857
  "ab17bda9",
1768
1858
  null,
1769
1859
  null
1770
1860
  );
1771
- const zn = qn.exports, Vn = [
1772
- ["file-viewer", zn]
1861
+ const Xn = Kn.exports, Gn = [
1862
+ ["file-viewer", Xn]
1773
1863
  ];
1774
- class Jn {
1864
+ class Qn {
1775
1865
  constructor() {
1776
- ce(this, "installed", !1);
1866
+ de(this, "installed", !1);
1777
1867
  }
1778
1868
  install(t) {
1779
- this.installed || (Vn.forEach(([n, r]) => t.component(n, r)), this.installed = !0);
1869
+ this.installed || (Gn.forEach(([n, r]) => t.component(n, r)), this.installed = !0);
1780
1870
  }
1781
1871
  }
1782
- const Xn = new Jn();
1872
+ const er = new Qn();
1783
1873
  export {
1784
- zn as F,
1785
- Xn as i,
1786
- Ae as n
1874
+ Xn as F,
1875
+ er as i,
1876
+ Pe as n
1787
1877
  };