@ysolve/ocity-heritage-visualizer 1.1.2 → 1.1.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,11 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var Oe = (e, t, n) =>
|
|
4
|
-
import { jsxs as
|
|
5
|
-
import { useState as
|
|
6
|
-
const
|
|
1
|
+
var Kt = Object.defineProperty;
|
|
2
|
+
var Xt = (e, t, n) => t in e ? Kt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var Oe = (e, t, n) => Xt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { jsxs as H, jsx as E, Fragment as Ke } from "react/jsx-runtime";
|
|
5
|
+
import { useState as N, useRef as F, useEffect as M } from "react";
|
|
6
|
+
const Zt = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_DEBUG_MODE: "false", VITE_DEFAULT_IMAGE_URL: "https://o-city.org/assets/NO_AVAILABLE_IMG-4d02b370.png", VITE_GOOGLE_TRANSLATE_BASE: "https://translate.googleapis.com/translate_a/single", VITE_IMAGE_BASE_URL: "https://eu2.contabostorage.com/7fb97413b6c243adb4347dafa02551a9:ocity/heritage/images/", VITE_QWEN_TTS_API_URL: "https://playground-tts.o-city.org" };
|
|
7
7
|
function ue(e, t = !0) {
|
|
8
|
-
const n =
|
|
8
|
+
const n = Zt[e];
|
|
9
9
|
if (!n && t)
|
|
10
10
|
throw new Error(`❌ Missing required env variable: ${e}`);
|
|
11
11
|
return n ?? "";
|
|
@@ -18,14 +18,14 @@ const we = {
|
|
|
18
18
|
IMAGE_BASE_URL: ue("VITE_IMAGE_BASE_URL"),
|
|
19
19
|
DEFAULT_IMAGE_URL: ue("VITE_DEFAULT_IMAGE_URL")
|
|
20
20
|
};
|
|
21
|
-
async function
|
|
21
|
+
async function Xe(e, t) {
|
|
22
22
|
if (!e.trim()) return e;
|
|
23
23
|
try {
|
|
24
24
|
const n = `${we.GOOGLE_TRANSLATE_BASE}?client=gtx&sl=auto&tl=${t}&dt=t&q=${encodeURIComponent(e)}`, r = await fetch(n);
|
|
25
25
|
if (!r.ok)
|
|
26
26
|
throw new Error(`Error en la traducción: ${r.status}`);
|
|
27
27
|
const s = await r.json();
|
|
28
|
-
return s && Array.isArray(s[0]) ? s[0].map((
|
|
28
|
+
return s && Array.isArray(s[0]) ? s[0].map((o) => o[0]).join("") : e;
|
|
29
29
|
} catch (n) {
|
|
30
30
|
return console.error("Error al traducir:", n), e;
|
|
31
31
|
}
|
|
@@ -35,77 +35,77 @@ function Fe(e) {
|
|
|
35
35
|
e.oncomplete = e.onsuccess = () => t(e.result), e.onabort = e.onerror = () => n(e.error);
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function Yt(e, t) {
|
|
39
39
|
let n;
|
|
40
40
|
const r = () => {
|
|
41
41
|
if (n)
|
|
42
42
|
return n;
|
|
43
43
|
const s = indexedDB.open(e);
|
|
44
|
-
return s.onupgradeneeded = () => s.result.createObjectStore(t), n = Fe(s), n.then((
|
|
45
|
-
|
|
44
|
+
return s.onupgradeneeded = () => s.result.createObjectStore(t), n = Fe(s), n.then((o) => {
|
|
45
|
+
o.onclose = () => n = void 0;
|
|
46
46
|
}, () => {
|
|
47
47
|
}), n;
|
|
48
48
|
};
|
|
49
|
-
return (s,
|
|
49
|
+
return (s, o) => r().then((i) => o(i.transaction(t, s).objectStore(t)));
|
|
50
50
|
}
|
|
51
51
|
let xe;
|
|
52
|
-
function
|
|
53
|
-
return xe || (xe =
|
|
52
|
+
function ft() {
|
|
53
|
+
return xe || (xe = Yt("keyval-store", "keyval")), xe;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function en(e, t = ft()) {
|
|
56
56
|
return t("readonly", (n) => Fe(n.get(e)));
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function tn(e, t, n = ft()) {
|
|
59
59
|
return n("readwrite", (r) => (r.put(t, e), Fe(r.transaction)));
|
|
60
60
|
}
|
|
61
|
-
async function
|
|
62
|
-
return await
|
|
61
|
+
async function nn(e) {
|
|
62
|
+
return await en(e) ?? null;
|
|
63
63
|
}
|
|
64
|
-
async function
|
|
65
|
-
await
|
|
64
|
+
async function rn(e, t) {
|
|
65
|
+
await tn(e, t);
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function pt(e, t) {
|
|
68
68
|
return function() {
|
|
69
69
|
return e.apply(t, arguments);
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
const { toString:
|
|
73
|
-
const n =
|
|
72
|
+
const { toString: sn } = Object.prototype, { getPrototypeOf: De } = Object, { iterator: ge, toStringTag: ht } = Symbol, ye = /* @__PURE__ */ ((e) => (t) => {
|
|
73
|
+
const n = sn.call(t);
|
|
74
74
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
75
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
76
|
-
function
|
|
77
|
-
return e !== null && !
|
|
75
|
+
})(/* @__PURE__ */ Object.create(null)), j = (e) => (e = e.toLowerCase(), (t) => ye(t) === e), Ee = (e) => (t) => typeof t === e, { isArray: ee } = Array, oe = Ee("undefined");
|
|
76
|
+
function on(e) {
|
|
77
|
+
return e !== null && !oe(e) && e.constructor !== null && !oe(e.constructor) && B(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
78
78
|
}
|
|
79
|
-
const
|
|
80
|
-
function
|
|
79
|
+
const mt = j("ArrayBuffer");
|
|
80
|
+
function an(e) {
|
|
81
81
|
let t;
|
|
82
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
82
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && mt(e.buffer), t;
|
|
83
83
|
}
|
|
84
|
-
const
|
|
84
|
+
const cn = Ee("string"), B = Ee("function"), wt = Ee("number"), be = (e) => e !== null && typeof e == "object", ln = (e) => e === !0 || e === !1, de = (e) => {
|
|
85
85
|
if (ye(e) !== "object")
|
|
86
86
|
return !1;
|
|
87
87
|
const t = De(e);
|
|
88
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
89
|
-
},
|
|
88
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(ht in e) && !(ge in e);
|
|
89
|
+
}, un = j("Date"), dn = j("File"), fn = j("Blob"), pn = j("FileList"), hn = (e) => be(e) && B(e.pipe), mn = (e) => {
|
|
90
90
|
let t;
|
|
91
91
|
return e && (typeof FormData == "function" && e instanceof FormData || B(e.append) && ((t = ye(e)) === "formdata" || // detect form-data instance
|
|
92
92
|
t === "object" && B(e.toString) && e.toString() === "[object FormData]"));
|
|
93
|
-
},
|
|
94
|
-
function
|
|
93
|
+
}, wn = j("URLSearchParams"), [gn, yn, En, bn] = ["ReadableStream", "Request", "Response", "Headers"].map(j), Tn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
94
|
+
function ie(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
95
95
|
if (e === null || typeof e > "u")
|
|
96
96
|
return;
|
|
97
97
|
let r, s;
|
|
98
|
-
if (typeof e != "object" && (e = [e]),
|
|
98
|
+
if (typeof e != "object" && (e = [e]), ee(e))
|
|
99
99
|
for (r = 0, s = e.length; r < s; r++)
|
|
100
100
|
t.call(null, e[r], r, e);
|
|
101
101
|
else {
|
|
102
|
-
const
|
|
103
|
-
let
|
|
104
|
-
for (r = 0; r <
|
|
105
|
-
|
|
102
|
+
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
103
|
+
let l;
|
|
104
|
+
for (r = 0; r < i; r++)
|
|
105
|
+
l = o[r], t.call(null, e[l], l, e);
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function gt(e, t) {
|
|
109
109
|
t = t.toLowerCase();
|
|
110
110
|
const n = Object.keys(e);
|
|
111
111
|
let r = n.length, s;
|
|
@@ -114,71 +114,71 @@ function mt(e, t) {
|
|
|
114
114
|
return s;
|
|
115
115
|
return null;
|
|
116
116
|
}
|
|
117
|
-
const
|
|
118
|
-
function
|
|
119
|
-
const { caseless: e } =
|
|
120
|
-
const
|
|
121
|
-
de(t[
|
|
117
|
+
const Q = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, yt = (e) => !oe(e) && e !== Q;
|
|
118
|
+
function ke() {
|
|
119
|
+
const { caseless: e } = yt(this) && this || {}, t = {}, n = (r, s) => {
|
|
120
|
+
const o = e && gt(t, s) || s;
|
|
121
|
+
de(t[o]) && de(r) ? t[o] = ke(t[o], r) : de(r) ? t[o] = ke({}, r) : ee(r) ? t[o] = r.slice() : t[o] = r;
|
|
122
122
|
};
|
|
123
123
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
124
|
-
arguments[r] &&
|
|
124
|
+
arguments[r] && ie(arguments[r], n);
|
|
125
125
|
return t;
|
|
126
126
|
}
|
|
127
|
-
const
|
|
128
|
-
n && B(s) ? e[
|
|
129
|
-
}, { allOwnKeys: r }), e),
|
|
127
|
+
const Sn = (e, t, n, { allOwnKeys: r } = {}) => (ie(t, (s, o) => {
|
|
128
|
+
n && B(s) ? e[o] = pt(s, n) : e[o] = s;
|
|
129
|
+
}, { allOwnKeys: r }), e), _n = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Rn = (e, t, n, r) => {
|
|
130
130
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
131
131
|
value: t.prototype
|
|
132
132
|
}), n && Object.assign(e.prototype, n);
|
|
133
|
-
},
|
|
134
|
-
let s,
|
|
135
|
-
const
|
|
133
|
+
}, An = (e, t, n, r) => {
|
|
134
|
+
let s, o, i;
|
|
135
|
+
const l = {};
|
|
136
136
|
if (t = t || {}, e == null) return t;
|
|
137
137
|
do {
|
|
138
|
-
for (s = Object.getOwnPropertyNames(e),
|
|
139
|
-
|
|
138
|
+
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
139
|
+
i = s[o], (!r || r(i, e, t)) && !l[i] && (t[i] = e[i], l[i] = !0);
|
|
140
140
|
e = n !== !1 && De(e);
|
|
141
141
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
142
142
|
return t;
|
|
143
|
-
},
|
|
143
|
+
}, On = (e, t, n) => {
|
|
144
144
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
145
145
|
const r = e.indexOf(t, n);
|
|
146
146
|
return r !== -1 && r === n;
|
|
147
|
-
},
|
|
147
|
+
}, xn = (e) => {
|
|
148
148
|
if (!e) return null;
|
|
149
|
-
if (
|
|
149
|
+
if (ee(e)) return e;
|
|
150
150
|
let t = e.length;
|
|
151
|
-
if (!
|
|
151
|
+
if (!wt(t)) return null;
|
|
152
152
|
const n = new Array(t);
|
|
153
153
|
for (; t-- > 0; )
|
|
154
154
|
n[t] = e[t];
|
|
155
155
|
return n;
|
|
156
|
-
},
|
|
156
|
+
}, Cn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && De(Uint8Array)), Ln = (e, t) => {
|
|
157
157
|
const r = (e && e[ge]).call(e);
|
|
158
158
|
let s;
|
|
159
159
|
for (; (s = r.next()) && !s.done; ) {
|
|
160
|
-
const
|
|
161
|
-
t.call(e,
|
|
160
|
+
const o = s.value;
|
|
161
|
+
t.call(e, o[0], o[1]);
|
|
162
162
|
}
|
|
163
|
-
},
|
|
163
|
+
}, Nn = (e, t) => {
|
|
164
164
|
let n;
|
|
165
165
|
const r = [];
|
|
166
166
|
for (; (n = e.exec(t)) !== null; )
|
|
167
167
|
r.push(n);
|
|
168
168
|
return r;
|
|
169
|
-
},
|
|
169
|
+
}, kn = j("HTMLFormElement"), vn = (e) => e.toLowerCase().replace(
|
|
170
170
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
171
171
|
function(n, r, s) {
|
|
172
172
|
return r.toUpperCase() + s;
|
|
173
173
|
}
|
|
174
|
-
),
|
|
174
|
+
), Ze = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Bn = j("RegExp"), Et = (e, t) => {
|
|
175
175
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
176
|
-
|
|
177
|
-
let
|
|
178
|
-
(
|
|
176
|
+
ie(n, (s, o) => {
|
|
177
|
+
let i;
|
|
178
|
+
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
179
179
|
}), Object.defineProperties(e, r);
|
|
180
|
-
},
|
|
181
|
-
|
|
180
|
+
}, Pn = (e) => {
|
|
181
|
+
Et(e, (t, n) => {
|
|
182
182
|
if (B(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
183
183
|
return !1;
|
|
184
184
|
const r = e[n];
|
|
@@ -192,105 +192,105 @@ const En = (e, t, n, { allOwnKeys: r } = {}) => (oe(t, (s, i) => {
|
|
|
192
192
|
});
|
|
193
193
|
}
|
|
194
194
|
});
|
|
195
|
-
},
|
|
195
|
+
}, Un = (e, t) => {
|
|
196
196
|
const n = {}, r = (s) => {
|
|
197
|
-
s.forEach((
|
|
198
|
-
n[
|
|
197
|
+
s.forEach((o) => {
|
|
198
|
+
n[o] = !0;
|
|
199
199
|
});
|
|
200
200
|
};
|
|
201
|
-
return
|
|
202
|
-
},
|
|
203
|
-
},
|
|
204
|
-
function
|
|
205
|
-
return !!(e && B(e.append) && e[
|
|
201
|
+
return ee(e) ? r(e) : r(String(e).split(t)), n;
|
|
202
|
+
}, In = () => {
|
|
203
|
+
}, Fn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
204
|
+
function Dn(e) {
|
|
205
|
+
return !!(e && B(e.append) && e[ht] === "FormData" && e[ge]);
|
|
206
206
|
}
|
|
207
|
-
const
|
|
207
|
+
const Mn = (e) => {
|
|
208
208
|
const t = new Array(10), n = (r, s) => {
|
|
209
209
|
if (be(r)) {
|
|
210
210
|
if (t.indexOf(r) >= 0)
|
|
211
211
|
return;
|
|
212
212
|
if (!("toJSON" in r)) {
|
|
213
213
|
t[s] = r;
|
|
214
|
-
const
|
|
215
|
-
return
|
|
216
|
-
const
|
|
217
|
-
!
|
|
218
|
-
}), t[s] = void 0,
|
|
214
|
+
const o = ee(r) ? [] : {};
|
|
215
|
+
return ie(r, (i, l) => {
|
|
216
|
+
const c = n(i, s + 1);
|
|
217
|
+
!oe(c) && (o[l] = c);
|
|
218
|
+
}), t[s] = void 0, o;
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
return r;
|
|
222
222
|
};
|
|
223
223
|
return n(e, 0);
|
|
224
|
-
},
|
|
225
|
-
s ===
|
|
224
|
+
}, jn = j("AsyncFunction"), $n = (e) => e && (be(e) || B(e)) && B(e.then) && B(e.catch), bt = ((e, t) => e ? setImmediate : t ? ((n, r) => (Q.addEventListener("message", ({ source: s, data: o }) => {
|
|
225
|
+
s === Q && o === n && r.length && r.shift()();
|
|
226
226
|
}, !1), (s) => {
|
|
227
|
-
r.push(s),
|
|
227
|
+
r.push(s), Q.postMessage(n, "*");
|
|
228
228
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
229
229
|
typeof setImmediate == "function",
|
|
230
|
-
B(
|
|
231
|
-
),
|
|
232
|
-
isArray:
|
|
233
|
-
isArrayBuffer:
|
|
234
|
-
isBuffer:
|
|
235
|
-
isFormData:
|
|
236
|
-
isArrayBufferView:
|
|
237
|
-
isString:
|
|
238
|
-
isNumber:
|
|
239
|
-
isBoolean:
|
|
230
|
+
B(Q.postMessage)
|
|
231
|
+
), qn = typeof queueMicrotask < "u" ? queueMicrotask.bind(Q) : typeof process < "u" && process.nextTick || bt, zn = (e) => e != null && B(e[ge]), a = {
|
|
232
|
+
isArray: ee,
|
|
233
|
+
isArrayBuffer: mt,
|
|
234
|
+
isBuffer: on,
|
|
235
|
+
isFormData: mn,
|
|
236
|
+
isArrayBufferView: an,
|
|
237
|
+
isString: cn,
|
|
238
|
+
isNumber: wt,
|
|
239
|
+
isBoolean: ln,
|
|
240
240
|
isObject: be,
|
|
241
241
|
isPlainObject: de,
|
|
242
|
-
isReadableStream:
|
|
243
|
-
isRequest:
|
|
244
|
-
isResponse:
|
|
245
|
-
isHeaders:
|
|
246
|
-
isUndefined:
|
|
247
|
-
isDate:
|
|
248
|
-
isFile:
|
|
249
|
-
isBlob:
|
|
250
|
-
isRegExp:
|
|
242
|
+
isReadableStream: gn,
|
|
243
|
+
isRequest: yn,
|
|
244
|
+
isResponse: En,
|
|
245
|
+
isHeaders: bn,
|
|
246
|
+
isUndefined: oe,
|
|
247
|
+
isDate: un,
|
|
248
|
+
isFile: dn,
|
|
249
|
+
isBlob: fn,
|
|
250
|
+
isRegExp: Bn,
|
|
251
251
|
isFunction: B,
|
|
252
|
-
isStream:
|
|
253
|
-
isURLSearchParams:
|
|
254
|
-
isTypedArray:
|
|
255
|
-
isFileList:
|
|
256
|
-
forEach:
|
|
257
|
-
merge:
|
|
258
|
-
extend:
|
|
259
|
-
trim:
|
|
260
|
-
stripBOM:
|
|
261
|
-
inherits:
|
|
262
|
-
toFlatObject:
|
|
252
|
+
isStream: hn,
|
|
253
|
+
isURLSearchParams: wn,
|
|
254
|
+
isTypedArray: Cn,
|
|
255
|
+
isFileList: pn,
|
|
256
|
+
forEach: ie,
|
|
257
|
+
merge: ke,
|
|
258
|
+
extend: Sn,
|
|
259
|
+
trim: Tn,
|
|
260
|
+
stripBOM: _n,
|
|
261
|
+
inherits: Rn,
|
|
262
|
+
toFlatObject: An,
|
|
263
263
|
kindOf: ye,
|
|
264
|
-
kindOfTest:
|
|
265
|
-
endsWith:
|
|
266
|
-
toArray:
|
|
267
|
-
forEachEntry:
|
|
268
|
-
matchAll:
|
|
269
|
-
isHTMLForm:
|
|
270
|
-
hasOwnProperty:
|
|
271
|
-
hasOwnProp:
|
|
264
|
+
kindOfTest: j,
|
|
265
|
+
endsWith: On,
|
|
266
|
+
toArray: xn,
|
|
267
|
+
forEachEntry: Ln,
|
|
268
|
+
matchAll: Nn,
|
|
269
|
+
isHTMLForm: kn,
|
|
270
|
+
hasOwnProperty: Ze,
|
|
271
|
+
hasOwnProp: Ze,
|
|
272
272
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
273
|
-
reduceDescriptors:
|
|
274
|
-
freezeMethods:
|
|
275
|
-
toObjectSet:
|
|
273
|
+
reduceDescriptors: Et,
|
|
274
|
+
freezeMethods: Pn,
|
|
275
|
+
toObjectSet: Un,
|
|
276
276
|
toCamelCase: vn,
|
|
277
|
-
noop:
|
|
278
|
-
toFiniteNumber:
|
|
279
|
-
findKey:
|
|
280
|
-
global:
|
|
281
|
-
isContextDefined:
|
|
282
|
-
isSpecCompliantForm:
|
|
283
|
-
toJSONObject:
|
|
284
|
-
isAsyncFn:
|
|
285
|
-
isThenable:
|
|
286
|
-
setImmediate:
|
|
287
|
-
asap:
|
|
288
|
-
isIterable:
|
|
277
|
+
noop: In,
|
|
278
|
+
toFiniteNumber: Fn,
|
|
279
|
+
findKey: gt,
|
|
280
|
+
global: Q,
|
|
281
|
+
isContextDefined: yt,
|
|
282
|
+
isSpecCompliantForm: Dn,
|
|
283
|
+
toJSONObject: Mn,
|
|
284
|
+
isAsyncFn: jn,
|
|
285
|
+
isThenable: $n,
|
|
286
|
+
setImmediate: bt,
|
|
287
|
+
asap: qn,
|
|
288
|
+
isIterable: zn
|
|
289
289
|
};
|
|
290
|
-
function
|
|
290
|
+
function y(e, t, n, r, s) {
|
|
291
291
|
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, this.status = s.status ? s.status : null);
|
|
292
292
|
}
|
|
293
|
-
a.inherits(
|
|
293
|
+
a.inherits(y, Error, {
|
|
294
294
|
toJSON: function() {
|
|
295
295
|
return {
|
|
296
296
|
// Standard
|
|
@@ -311,7 +311,7 @@ a.inherits(w, Error, {
|
|
|
311
311
|
};
|
|
312
312
|
}
|
|
313
313
|
});
|
|
314
|
-
const
|
|
314
|
+
const Tt = y.prototype, St = {};
|
|
315
315
|
[
|
|
316
316
|
"ERR_BAD_OPTION_VALUE",
|
|
317
317
|
"ERR_BAD_OPTION",
|
|
@@ -327,32 +327,32 @@ const Et = w.prototype, bt = {};
|
|
|
327
327
|
"ERR_INVALID_URL"
|
|
328
328
|
// eslint-disable-next-line func-names
|
|
329
329
|
].forEach((e) => {
|
|
330
|
-
|
|
330
|
+
St[e] = { value: e };
|
|
331
331
|
});
|
|
332
|
-
Object.defineProperties(
|
|
333
|
-
Object.defineProperty(
|
|
334
|
-
|
|
335
|
-
const
|
|
336
|
-
return a.toFlatObject(e,
|
|
337
|
-
return
|
|
338
|
-
}, (
|
|
332
|
+
Object.defineProperties(y, St);
|
|
333
|
+
Object.defineProperty(Tt, "isAxiosError", { value: !0 });
|
|
334
|
+
y.from = (e, t, n, r, s, o) => {
|
|
335
|
+
const i = Object.create(Tt);
|
|
336
|
+
return a.toFlatObject(e, i, function(c) {
|
|
337
|
+
return c !== Error.prototype;
|
|
338
|
+
}, (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;
|
|
339
339
|
};
|
|
340
|
-
const
|
|
341
|
-
function
|
|
340
|
+
const Hn = null;
|
|
341
|
+
function ve(e) {
|
|
342
342
|
return a.isPlainObject(e) || a.isArray(e);
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function _t(e) {
|
|
345
345
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
346
346
|
}
|
|
347
|
-
function
|
|
348
|
-
return e ? e.concat(t).map(function(s,
|
|
349
|
-
return s =
|
|
347
|
+
function Ye(e, t, n) {
|
|
348
|
+
return e ? e.concat(t).map(function(s, o) {
|
|
349
|
+
return s = _t(s), !n && o ? "[" + s + "]" : s;
|
|
350
350
|
}).join(n ? "." : "") : t;
|
|
351
351
|
}
|
|
352
|
-
function
|
|
353
|
-
return a.isArray(e) && !e.some(
|
|
352
|
+
function Vn(e) {
|
|
353
|
+
return a.isArray(e) && !e.some(ve);
|
|
354
354
|
}
|
|
355
|
-
const
|
|
355
|
+
const Wn = a.toFlatObject(a, {}, null, function(t) {
|
|
356
356
|
return /^is[A-Z]/.test(t);
|
|
357
357
|
});
|
|
358
358
|
function Te(e, t, n) {
|
|
@@ -362,10 +362,10 @@ function Te(e, t, n) {
|
|
|
362
362
|
metaTokens: !0,
|
|
363
363
|
dots: !1,
|
|
364
364
|
indexes: !1
|
|
365
|
-
}, !1, function(
|
|
366
|
-
return !a.isUndefined(h[
|
|
365
|
+
}, !1, function(w, h) {
|
|
366
|
+
return !a.isUndefined(h[w]);
|
|
367
367
|
});
|
|
368
|
-
const r = n.metaTokens, s = n.visitor || d,
|
|
368
|
+
const r = n.metaTokens, s = n.visitor || d, o = n.dots, i = n.indexes, c = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
369
369
|
if (!a.isFunction(s))
|
|
370
370
|
throw new TypeError("visitor must be a function");
|
|
371
371
|
function u(p) {
|
|
@@ -374,51 +374,51 @@ function Te(e, t, n) {
|
|
|
374
374
|
return p.toISOString();
|
|
375
375
|
if (a.isBoolean(p))
|
|
376
376
|
return p.toString();
|
|
377
|
-
if (!
|
|
378
|
-
throw new
|
|
379
|
-
return a.isArrayBuffer(p) || a.isTypedArray(p) ?
|
|
377
|
+
if (!c && a.isBlob(p))
|
|
378
|
+
throw new y("Blob is not supported. Use a Buffer instead.");
|
|
379
|
+
return a.isArrayBuffer(p) || a.isTypedArray(p) ? c && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
380
380
|
}
|
|
381
|
-
function d(p,
|
|
382
|
-
let
|
|
381
|
+
function d(p, w, h) {
|
|
382
|
+
let S = p;
|
|
383
383
|
if (p && !h && typeof p == "object") {
|
|
384
|
-
if (a.endsWith(
|
|
385
|
-
|
|
386
|
-
else if (a.isArray(p) &&
|
|
387
|
-
return
|
|
388
|
-
!(a.isUndefined(
|
|
384
|
+
if (a.endsWith(w, "{}"))
|
|
385
|
+
w = r ? w : w.slice(0, -2), p = JSON.stringify(p);
|
|
386
|
+
else if (a.isArray(p) && Vn(p) || (a.isFileList(p) || a.endsWith(w, "[]")) && (S = a.toArray(p)))
|
|
387
|
+
return w = _t(w), S.forEach(function(T, A) {
|
|
388
|
+
!(a.isUndefined(T) || T === null) && t.append(
|
|
389
389
|
// eslint-disable-next-line no-nested-ternary
|
|
390
|
-
|
|
391
|
-
u(
|
|
390
|
+
i === !0 ? Ye([w], A, o) : i === null ? w : w + "[]",
|
|
391
|
+
u(T)
|
|
392
392
|
);
|
|
393
393
|
}), !1;
|
|
394
394
|
}
|
|
395
|
-
return
|
|
395
|
+
return ve(p) ? !0 : (t.append(Ye(h, w, o), u(p)), !1);
|
|
396
396
|
}
|
|
397
|
-
const f = [], g = Object.assign(
|
|
397
|
+
const f = [], g = Object.assign(Wn, {
|
|
398
398
|
defaultVisitor: d,
|
|
399
399
|
convertValue: u,
|
|
400
|
-
isVisitable:
|
|
400
|
+
isVisitable: ve
|
|
401
401
|
});
|
|
402
|
-
function
|
|
402
|
+
function R(p, w) {
|
|
403
403
|
if (!a.isUndefined(p)) {
|
|
404
404
|
if (f.indexOf(p) !== -1)
|
|
405
|
-
throw Error("Circular reference detected in " +
|
|
406
|
-
f.push(p), a.forEach(p, function(
|
|
407
|
-
(!(a.isUndefined(
|
|
405
|
+
throw Error("Circular reference detected in " + w.join("."));
|
|
406
|
+
f.push(p), a.forEach(p, function(S, _) {
|
|
407
|
+
(!(a.isUndefined(S) || S === null) && s.call(
|
|
408
408
|
t,
|
|
409
|
-
|
|
410
|
-
a.isString(
|
|
411
|
-
|
|
409
|
+
S,
|
|
410
|
+
a.isString(_) ? _.trim() : _,
|
|
411
|
+
w,
|
|
412
412
|
g
|
|
413
|
-
)) === !0 &&
|
|
413
|
+
)) === !0 && R(S, w ? w.concat(_) : [_]);
|
|
414
414
|
}), f.pop();
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
417
|
if (!a.isObject(e))
|
|
418
418
|
throw new TypeError("data must be an object");
|
|
419
|
-
return
|
|
419
|
+
return R(e), t;
|
|
420
420
|
}
|
|
421
|
-
function
|
|
421
|
+
function et(e) {
|
|
422
422
|
const t = {
|
|
423
423
|
"!": "%21",
|
|
424
424
|
"'": "%27",
|
|
@@ -435,37 +435,37 @@ function Ze(e) {
|
|
|
435
435
|
function Me(e, t) {
|
|
436
436
|
this._pairs = [], e && Te(e, this, t);
|
|
437
437
|
}
|
|
438
|
-
const
|
|
439
|
-
|
|
438
|
+
const Rt = Me.prototype;
|
|
439
|
+
Rt.append = function(t, n) {
|
|
440
440
|
this._pairs.push([t, n]);
|
|
441
441
|
};
|
|
442
|
-
|
|
442
|
+
Rt.toString = function(t) {
|
|
443
443
|
const n = t ? function(r) {
|
|
444
|
-
return t.call(this, r,
|
|
445
|
-
} :
|
|
444
|
+
return t.call(this, r, et);
|
|
445
|
+
} : et;
|
|
446
446
|
return this._pairs.map(function(s) {
|
|
447
447
|
return n(s[0]) + "=" + n(s[1]);
|
|
448
448
|
}, "").join("&");
|
|
449
449
|
};
|
|
450
|
-
function
|
|
450
|
+
function Gn(e) {
|
|
451
451
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
452
452
|
}
|
|
453
|
-
function
|
|
453
|
+
function At(e, t, n) {
|
|
454
454
|
if (!t)
|
|
455
455
|
return e;
|
|
456
|
-
const r = n && n.encode ||
|
|
456
|
+
const r = n && n.encode || Gn;
|
|
457
457
|
a.isFunction(n) && (n = {
|
|
458
458
|
serialize: n
|
|
459
459
|
});
|
|
460
460
|
const s = n && n.serialize;
|
|
461
|
-
let
|
|
462
|
-
if (s ?
|
|
463
|
-
const
|
|
464
|
-
|
|
461
|
+
let o;
|
|
462
|
+
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new Me(t, n).toString(r), o) {
|
|
463
|
+
const i = e.indexOf("#");
|
|
464
|
+
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
465
465
|
}
|
|
466
466
|
return e;
|
|
467
467
|
}
|
|
468
|
-
class
|
|
468
|
+
class tt {
|
|
469
469
|
constructor() {
|
|
470
470
|
this.handlers = [];
|
|
471
471
|
}
|
|
@@ -519,65 +519,65 @@ class Ye {
|
|
|
519
519
|
});
|
|
520
520
|
}
|
|
521
521
|
}
|
|
522
|
-
const
|
|
522
|
+
const Ot = {
|
|
523
523
|
silentJSONParsing: !0,
|
|
524
524
|
forcedJSONParsing: !0,
|
|
525
525
|
clarifyTimeoutError: !1
|
|
526
|
-
},
|
|
526
|
+
}, Jn = typeof URLSearchParams < "u" ? URLSearchParams : Me, Qn = typeof FormData < "u" ? FormData : null, Kn = typeof Blob < "u" ? Blob : null, Xn = {
|
|
527
527
|
isBrowser: !0,
|
|
528
528
|
classes: {
|
|
529
|
-
URLSearchParams:
|
|
530
|
-
FormData:
|
|
531
|
-
Blob:
|
|
529
|
+
URLSearchParams: Jn,
|
|
530
|
+
FormData: Qn,
|
|
531
|
+
Blob: Kn
|
|
532
532
|
},
|
|
533
533
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
534
|
-
}, je = typeof window < "u" && typeof document < "u", Be = typeof navigator == "object" && navigator || void 0,
|
|
535
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
534
|
+
}, je = typeof window < "u" && typeof document < "u", Be = typeof navigator == "object" && navigator || void 0, Zn = je && (!Be || ["ReactNative", "NativeScript", "NS"].indexOf(Be.product) < 0), Yn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
535
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", er = je && window.location.href || "http://localhost", tr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
536
536
|
__proto__: null,
|
|
537
537
|
hasBrowserEnv: je,
|
|
538
|
-
hasStandardBrowserEnv:
|
|
539
|
-
hasStandardBrowserWebWorkerEnv:
|
|
538
|
+
hasStandardBrowserEnv: Zn,
|
|
539
|
+
hasStandardBrowserWebWorkerEnv: Yn,
|
|
540
540
|
navigator: Be,
|
|
541
|
-
origin:
|
|
542
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
543
|
-
...
|
|
544
|
-
...
|
|
541
|
+
origin: er
|
|
542
|
+
}, Symbol.toStringTag, { value: "Module" })), v = {
|
|
543
|
+
...tr,
|
|
544
|
+
...Xn
|
|
545
545
|
};
|
|
546
|
-
function
|
|
547
|
-
return Te(e, new
|
|
548
|
-
visitor: function(n, r, s,
|
|
549
|
-
return
|
|
546
|
+
function nr(e, t) {
|
|
547
|
+
return Te(e, new v.classes.URLSearchParams(), Object.assign({
|
|
548
|
+
visitor: function(n, r, s, o) {
|
|
549
|
+
return v.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
550
550
|
}
|
|
551
551
|
}, t));
|
|
552
552
|
}
|
|
553
|
-
function
|
|
553
|
+
function rr(e) {
|
|
554
554
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
555
555
|
}
|
|
556
|
-
function
|
|
556
|
+
function sr(e) {
|
|
557
557
|
const t = {}, n = Object.keys(e);
|
|
558
558
|
let r;
|
|
559
559
|
const s = n.length;
|
|
560
|
-
let
|
|
560
|
+
let o;
|
|
561
561
|
for (r = 0; r < s; r++)
|
|
562
|
-
|
|
562
|
+
o = n[r], t[o] = e[o];
|
|
563
563
|
return t;
|
|
564
564
|
}
|
|
565
|
-
function
|
|
566
|
-
function t(n, r, s,
|
|
567
|
-
let
|
|
568
|
-
if (
|
|
569
|
-
const
|
|
570
|
-
return
|
|
565
|
+
function xt(e) {
|
|
566
|
+
function t(n, r, s, o) {
|
|
567
|
+
let i = n[o++];
|
|
568
|
+
if (i === "__proto__") return !0;
|
|
569
|
+
const l = Number.isFinite(+i), c = o >= n.length;
|
|
570
|
+
return i = !i && a.isArray(s) ? s.length : i, c ? (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] = sr(s[i])), !l);
|
|
571
571
|
}
|
|
572
572
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
573
573
|
const n = {};
|
|
574
574
|
return a.forEachEntry(e, (r, s) => {
|
|
575
|
-
t(
|
|
575
|
+
t(rr(r), s, n, 0);
|
|
576
576
|
}), n;
|
|
577
577
|
}
|
|
578
578
|
return null;
|
|
579
579
|
}
|
|
580
|
-
function
|
|
580
|
+
function or(e, t, n) {
|
|
581
581
|
if (a.isString(e))
|
|
582
582
|
try {
|
|
583
583
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -587,45 +587,45 @@ function nr(e, t, n) {
|
|
|
587
587
|
}
|
|
588
588
|
return (n || JSON.stringify)(e);
|
|
589
589
|
}
|
|
590
|
-
const
|
|
591
|
-
transitional:
|
|
590
|
+
const ae = {
|
|
591
|
+
transitional: Ot,
|
|
592
592
|
adapter: ["xhr", "http", "fetch"],
|
|
593
593
|
transformRequest: [function(t, n) {
|
|
594
|
-
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1,
|
|
595
|
-
if (
|
|
596
|
-
return s ? JSON.stringify(
|
|
594
|
+
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
595
|
+
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
596
|
+
return s ? JSON.stringify(xt(t)) : t;
|
|
597
597
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
598
598
|
return t;
|
|
599
599
|
if (a.isArrayBufferView(t))
|
|
600
600
|
return t.buffer;
|
|
601
601
|
if (a.isURLSearchParams(t))
|
|
602
602
|
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
603
|
-
let
|
|
604
|
-
if (
|
|
603
|
+
let l;
|
|
604
|
+
if (o) {
|
|
605
605
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
606
|
-
return
|
|
607
|
-
if ((
|
|
608
|
-
const
|
|
606
|
+
return nr(t, this.formSerializer).toString();
|
|
607
|
+
if ((l = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
608
|
+
const c = this.env && this.env.FormData;
|
|
609
609
|
return Te(
|
|
610
|
-
|
|
611
|
-
|
|
610
|
+
l ? { "files[]": t } : t,
|
|
611
|
+
c && new c(),
|
|
612
612
|
this.formSerializer
|
|
613
613
|
);
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
|
-
return
|
|
616
|
+
return o || s ? (n.setContentType("application/json", !1), or(t)) : t;
|
|
617
617
|
}],
|
|
618
618
|
transformResponse: [function(t) {
|
|
619
|
-
const n = this.transitional ||
|
|
619
|
+
const n = this.transitional || ae.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
620
620
|
if (a.isResponse(t) || a.isReadableStream(t))
|
|
621
621
|
return t;
|
|
622
622
|
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
623
|
-
const
|
|
623
|
+
const i = !(n && n.silentJSONParsing) && s;
|
|
624
624
|
try {
|
|
625
625
|
return JSON.parse(t);
|
|
626
|
-
} catch (
|
|
627
|
-
if (
|
|
628
|
-
throw
|
|
626
|
+
} catch (l) {
|
|
627
|
+
if (i)
|
|
628
|
+
throw l.name === "SyntaxError" ? y.from(l, y.ERR_BAD_RESPONSE, this, null, this.response) : l;
|
|
629
629
|
}
|
|
630
630
|
}
|
|
631
631
|
return t;
|
|
@@ -640,8 +640,8 @@ const ie = {
|
|
|
640
640
|
maxContentLength: -1,
|
|
641
641
|
maxBodyLength: -1,
|
|
642
642
|
env: {
|
|
643
|
-
FormData:
|
|
644
|
-
Blob:
|
|
643
|
+
FormData: v.classes.FormData,
|
|
644
|
+
Blob: v.classes.Blob
|
|
645
645
|
},
|
|
646
646
|
validateStatus: function(t) {
|
|
647
647
|
return t >= 200 && t < 300;
|
|
@@ -654,9 +654,9 @@ const ie = {
|
|
|
654
654
|
}
|
|
655
655
|
};
|
|
656
656
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
657
|
-
|
|
657
|
+
ae.headers[e] = {};
|
|
658
658
|
});
|
|
659
|
-
const
|
|
659
|
+
const ir = a.toObjectSet([
|
|
660
660
|
"age",
|
|
661
661
|
"authorization",
|
|
662
662
|
"content-length",
|
|
@@ -674,28 +674,28 @@ const rr = a.toObjectSet([
|
|
|
674
674
|
"referer",
|
|
675
675
|
"retry-after",
|
|
676
676
|
"user-agent"
|
|
677
|
-
]),
|
|
677
|
+
]), ar = (e) => {
|
|
678
678
|
const t = {};
|
|
679
679
|
let n, r, s;
|
|
680
680
|
return e && e.split(`
|
|
681
|
-
`).forEach(function(
|
|
682
|
-
s =
|
|
681
|
+
`).forEach(function(i) {
|
|
682
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && ir[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
683
683
|
}), t;
|
|
684
|
-
},
|
|
685
|
-
function
|
|
684
|
+
}, nt = Symbol("internals");
|
|
685
|
+
function re(e) {
|
|
686
686
|
return e && String(e).trim().toLowerCase();
|
|
687
687
|
}
|
|
688
688
|
function fe(e) {
|
|
689
689
|
return e === !1 || e == null ? e : a.isArray(e) ? e.map(fe) : String(e);
|
|
690
690
|
}
|
|
691
|
-
function
|
|
691
|
+
function cr(e) {
|
|
692
692
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
693
693
|
let r;
|
|
694
694
|
for (; r = n.exec(e); )
|
|
695
695
|
t[r[1]] = r[2];
|
|
696
696
|
return t;
|
|
697
697
|
}
|
|
698
|
-
const
|
|
698
|
+
const lr = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
699
699
|
function Ce(e, t, n, r, s) {
|
|
700
700
|
if (a.isFunction(r))
|
|
701
701
|
return r.call(this, t, n);
|
|
@@ -706,15 +706,15 @@ function Ce(e, t, n, r, s) {
|
|
|
706
706
|
return r.test(t);
|
|
707
707
|
}
|
|
708
708
|
}
|
|
709
|
-
function
|
|
709
|
+
function ur(e) {
|
|
710
710
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
711
711
|
}
|
|
712
|
-
function
|
|
712
|
+
function dr(e, t) {
|
|
713
713
|
const n = a.toCamelCase(" " + t);
|
|
714
714
|
["get", "set", "has"].forEach((r) => {
|
|
715
715
|
Object.defineProperty(e, r + n, {
|
|
716
|
-
value: function(s,
|
|
717
|
-
return this[r].call(this, t, s,
|
|
716
|
+
value: function(s, o, i) {
|
|
717
|
+
return this[r].call(this, t, s, o, i);
|
|
718
718
|
},
|
|
719
719
|
configurable: !0
|
|
720
720
|
});
|
|
@@ -726,39 +726,39 @@ let P = class {
|
|
|
726
726
|
}
|
|
727
727
|
set(t, n, r) {
|
|
728
728
|
const s = this;
|
|
729
|
-
function
|
|
730
|
-
const d =
|
|
729
|
+
function o(l, c, u) {
|
|
730
|
+
const d = re(c);
|
|
731
731
|
if (!d)
|
|
732
732
|
throw new Error("header name must be a non-empty string");
|
|
733
733
|
const f = a.findKey(s, d);
|
|
734
|
-
(!f || s[f] === void 0 || u === !0 || u === void 0 && s[f] !== !1) && (s[f ||
|
|
734
|
+
(!f || s[f] === void 0 || u === !0 || u === void 0 && s[f] !== !1) && (s[f || c] = fe(l));
|
|
735
735
|
}
|
|
736
|
-
const
|
|
736
|
+
const i = (l, c) => a.forEach(l, (u, d) => o(u, d, c));
|
|
737
737
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
738
|
-
|
|
739
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
740
|
-
|
|
738
|
+
i(t, n);
|
|
739
|
+
else if (a.isString(t) && (t = t.trim()) && !lr(t))
|
|
740
|
+
i(ar(t), n);
|
|
741
741
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
742
|
-
let
|
|
742
|
+
let l = {}, c, u;
|
|
743
743
|
for (const d of t) {
|
|
744
744
|
if (!a.isArray(d))
|
|
745
745
|
throw TypeError("Object iterator must return a key-value pair");
|
|
746
|
-
|
|
746
|
+
l[u = d[0]] = (c = l[u]) ? a.isArray(c) ? [...c, d[1]] : [c, d[1]] : d[1];
|
|
747
747
|
}
|
|
748
|
-
|
|
748
|
+
i(l, n);
|
|
749
749
|
} else
|
|
750
|
-
t != null &&
|
|
750
|
+
t != null && o(n, t, r);
|
|
751
751
|
return this;
|
|
752
752
|
}
|
|
753
753
|
get(t, n) {
|
|
754
|
-
if (t =
|
|
754
|
+
if (t = re(t), t) {
|
|
755
755
|
const r = a.findKey(this, t);
|
|
756
756
|
if (r) {
|
|
757
757
|
const s = this[r];
|
|
758
758
|
if (!n)
|
|
759
759
|
return s;
|
|
760
760
|
if (n === !0)
|
|
761
|
-
return
|
|
761
|
+
return cr(s);
|
|
762
762
|
if (a.isFunction(n))
|
|
763
763
|
return n.call(this, s, r);
|
|
764
764
|
if (a.isRegExp(n))
|
|
@@ -768,7 +768,7 @@ let P = class {
|
|
|
768
768
|
}
|
|
769
769
|
}
|
|
770
770
|
has(t, n) {
|
|
771
|
-
if (t =
|
|
771
|
+
if (t = re(t), t) {
|
|
772
772
|
const r = a.findKey(this, t);
|
|
773
773
|
return !!(r && this[r] !== void 0 && (!n || Ce(this, this[r], r, n)));
|
|
774
774
|
}
|
|
@@ -777,33 +777,33 @@ let P = class {
|
|
|
777
777
|
delete(t, n) {
|
|
778
778
|
const r = this;
|
|
779
779
|
let s = !1;
|
|
780
|
-
function i
|
|
781
|
-
if (
|
|
782
|
-
const
|
|
783
|
-
|
|
780
|
+
function o(i) {
|
|
781
|
+
if (i = re(i), i) {
|
|
782
|
+
const l = a.findKey(r, i);
|
|
783
|
+
l && (!n || Ce(r, r[l], l, n)) && (delete r[l], s = !0);
|
|
784
784
|
}
|
|
785
785
|
}
|
|
786
|
-
return a.isArray(t) ? t.forEach(
|
|
786
|
+
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
|
787
787
|
}
|
|
788
788
|
clear(t) {
|
|
789
789
|
const n = Object.keys(this);
|
|
790
790
|
let r = n.length, s = !1;
|
|
791
791
|
for (; r--; ) {
|
|
792
|
-
const
|
|
793
|
-
(!t || Ce(this, this[
|
|
792
|
+
const o = n[r];
|
|
793
|
+
(!t || Ce(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
794
794
|
}
|
|
795
795
|
return s;
|
|
796
796
|
}
|
|
797
797
|
normalize(t) {
|
|
798
798
|
const n = this, r = {};
|
|
799
|
-
return a.forEach(this, (s,
|
|
800
|
-
const
|
|
801
|
-
if (
|
|
802
|
-
n[
|
|
799
|
+
return a.forEach(this, (s, o) => {
|
|
800
|
+
const i = a.findKey(r, o);
|
|
801
|
+
if (i) {
|
|
802
|
+
n[i] = fe(s), delete n[o];
|
|
803
803
|
return;
|
|
804
804
|
}
|
|
805
|
-
const
|
|
806
|
-
|
|
805
|
+
const l = t ? ur(o) : String(o).trim();
|
|
806
|
+
l !== o && delete n[o], n[l] = fe(s), r[l] = !0;
|
|
807
807
|
}), this;
|
|
808
808
|
}
|
|
809
809
|
concat(...t) {
|
|
@@ -836,14 +836,14 @@ let P = class {
|
|
|
836
836
|
return n.forEach((s) => r.set(s)), r;
|
|
837
837
|
}
|
|
838
838
|
static accessor(t) {
|
|
839
|
-
const r = (this[
|
|
839
|
+
const r = (this[nt] = this[nt] = {
|
|
840
840
|
accessors: {}
|
|
841
841
|
}).accessors, s = this.prototype;
|
|
842
|
-
function i
|
|
843
|
-
const
|
|
844
|
-
r[
|
|
842
|
+
function o(i) {
|
|
843
|
+
const l = re(i);
|
|
844
|
+
r[l] || (dr(s, i), r[l] = !0);
|
|
845
845
|
}
|
|
846
|
-
return a.isArray(t) ? t.forEach(
|
|
846
|
+
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
847
847
|
}
|
|
848
848
|
};
|
|
849
849
|
P.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
@@ -857,99 +857,99 @@ a.reduceDescriptors(P.prototype, ({ value: e }, t) => {
|
|
|
857
857
|
};
|
|
858
858
|
});
|
|
859
859
|
a.freezeMethods(P);
|
|
860
|
-
function
|
|
861
|
-
const n = this ||
|
|
862
|
-
let
|
|
863
|
-
return a.forEach(e, function(
|
|
864
|
-
|
|
865
|
-
}), s.normalize(),
|
|
860
|
+
function Le(e, t) {
|
|
861
|
+
const n = this || ae, r = t || n, s = P.from(r.headers);
|
|
862
|
+
let o = r.data;
|
|
863
|
+
return a.forEach(e, function(l) {
|
|
864
|
+
o = l.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
865
|
+
}), s.normalize(), o;
|
|
866
866
|
}
|
|
867
|
-
function
|
|
867
|
+
function Ct(e) {
|
|
868
868
|
return !!(e && e.__CANCEL__);
|
|
869
869
|
}
|
|
870
|
-
function
|
|
871
|
-
|
|
870
|
+
function te(e, t, n) {
|
|
871
|
+
y.call(this, e ?? "canceled", y.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
872
872
|
}
|
|
873
|
-
a.inherits(
|
|
873
|
+
a.inherits(te, y, {
|
|
874
874
|
__CANCEL__: !0
|
|
875
875
|
});
|
|
876
|
-
function
|
|
876
|
+
function Lt(e, t, n) {
|
|
877
877
|
const r = n.config.validateStatus;
|
|
878
|
-
!n.status || !r || r(n.status) ? e(n) : t(new
|
|
878
|
+
!n.status || !r || r(n.status) ? e(n) : t(new y(
|
|
879
879
|
"Request failed with status code " + n.status,
|
|
880
|
-
[
|
|
880
|
+
[y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
881
881
|
n.config,
|
|
882
882
|
n.request,
|
|
883
883
|
n
|
|
884
884
|
));
|
|
885
885
|
}
|
|
886
|
-
function
|
|
886
|
+
function fr(e) {
|
|
887
887
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
888
888
|
return t && t[1] || "";
|
|
889
889
|
}
|
|
890
|
-
function
|
|
890
|
+
function pr(e, t) {
|
|
891
891
|
e = e || 10;
|
|
892
892
|
const n = new Array(e), r = new Array(e);
|
|
893
|
-
let s = 0,
|
|
894
|
-
return t = t !== void 0 ? t : 1e3, function(
|
|
895
|
-
const u = Date.now(), d = r[
|
|
896
|
-
|
|
897
|
-
let f =
|
|
893
|
+
let s = 0, o = 0, i;
|
|
894
|
+
return t = t !== void 0 ? t : 1e3, function(c) {
|
|
895
|
+
const u = Date.now(), d = r[o];
|
|
896
|
+
i || (i = u), n[s] = c, r[s] = u;
|
|
897
|
+
let f = o, g = 0;
|
|
898
898
|
for (; f !== s; )
|
|
899
899
|
g += n[f++], f = f % e;
|
|
900
|
-
if (s = (s + 1) % e, s ===
|
|
900
|
+
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), u - i < t)
|
|
901
901
|
return;
|
|
902
|
-
const
|
|
903
|
-
return
|
|
902
|
+
const R = d && u - d;
|
|
903
|
+
return R ? Math.round(g * 1e3 / R) : void 0;
|
|
904
904
|
};
|
|
905
905
|
}
|
|
906
|
-
function
|
|
907
|
-
let n = 0, r = 1e3 / t, s,
|
|
908
|
-
const
|
|
909
|
-
n = d, s = null,
|
|
906
|
+
function hr(e, t) {
|
|
907
|
+
let n = 0, r = 1e3 / t, s, o;
|
|
908
|
+
const i = (u, d = Date.now()) => {
|
|
909
|
+
n = d, s = null, o && (clearTimeout(o), o = null), e.apply(null, u);
|
|
910
910
|
};
|
|
911
911
|
return [(...u) => {
|
|
912
912
|
const d = Date.now(), f = d - n;
|
|
913
|
-
f >= r ?
|
|
914
|
-
|
|
913
|
+
f >= r ? i(u, d) : (s = u, o || (o = setTimeout(() => {
|
|
914
|
+
o = null, i(s);
|
|
915
915
|
}, r - f)));
|
|
916
|
-
}, () => s &&
|
|
916
|
+
}, () => s && i(s)];
|
|
917
917
|
}
|
|
918
918
|
const he = (e, t, n = 3) => {
|
|
919
919
|
let r = 0;
|
|
920
|
-
const s =
|
|
921
|
-
return
|
|
922
|
-
const
|
|
923
|
-
r =
|
|
920
|
+
const s = pr(50, 250);
|
|
921
|
+
return hr((o) => {
|
|
922
|
+
const i = o.loaded, l = o.lengthComputable ? o.total : void 0, c = i - r, u = s(c), d = i <= l;
|
|
923
|
+
r = i;
|
|
924
924
|
const f = {
|
|
925
|
-
loaded:
|
|
926
|
-
total:
|
|
927
|
-
progress:
|
|
928
|
-
bytes:
|
|
925
|
+
loaded: i,
|
|
926
|
+
total: l,
|
|
927
|
+
progress: l ? i / l : void 0,
|
|
928
|
+
bytes: c,
|
|
929
929
|
rate: u || void 0,
|
|
930
|
-
estimated: u &&
|
|
931
|
-
event:
|
|
932
|
-
lengthComputable:
|
|
930
|
+
estimated: u && l && d ? (l - i) / u : void 0,
|
|
931
|
+
event: o,
|
|
932
|
+
lengthComputable: l != null,
|
|
933
933
|
[t ? "download" : "upload"]: !0
|
|
934
934
|
};
|
|
935
935
|
e(f);
|
|
936
936
|
}, n);
|
|
937
|
-
},
|
|
937
|
+
}, rt = (e, t) => {
|
|
938
938
|
const n = e != null;
|
|
939
939
|
return [(r) => t[0]({
|
|
940
940
|
lengthComputable: n,
|
|
941
941
|
total: e,
|
|
942
942
|
loaded: r
|
|
943
943
|
}), t[1]];
|
|
944
|
-
},
|
|
945
|
-
new URL(
|
|
946
|
-
|
|
947
|
-
) : () => !0,
|
|
944
|
+
}, st = (e) => (...t) => a.asap(() => e(...t)), mr = v.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, v.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
945
|
+
new URL(v.origin),
|
|
946
|
+
v.navigator && /(msie|trident)/i.test(v.navigator.userAgent)
|
|
947
|
+
) : () => !0, wr = v.hasStandardBrowserEnv ? (
|
|
948
948
|
// Standard browser envs support document.cookie
|
|
949
949
|
{
|
|
950
|
-
write(e, t, n, r, s,
|
|
951
|
-
const
|
|
952
|
-
a.isNumber(n) &&
|
|
950
|
+
write(e, t, n, r, s, o) {
|
|
951
|
+
const i = [e + "=" + encodeURIComponent(t)];
|
|
952
|
+
a.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), a.isString(r) && i.push("path=" + r), a.isString(s) && i.push("domain=" + s), o === !0 && i.push("secure"), document.cookie = i.join("; ");
|
|
953
953
|
},
|
|
954
954
|
read(e) {
|
|
955
955
|
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
@@ -971,18 +971,18 @@ const he = (e, t, n = 3) => {
|
|
|
971
971
|
}
|
|
972
972
|
}
|
|
973
973
|
);
|
|
974
|
-
function
|
|
974
|
+
function gr(e) {
|
|
975
975
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
976
976
|
}
|
|
977
|
-
function
|
|
977
|
+
function yr(e, t) {
|
|
978
978
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
979
979
|
}
|
|
980
|
-
function
|
|
981
|
-
let r = !
|
|
982
|
-
return e && (r || n == !1) ?
|
|
980
|
+
function Nt(e, t, n) {
|
|
981
|
+
let r = !gr(t);
|
|
982
|
+
return e && (r || n == !1) ? yr(e, t) : t;
|
|
983
983
|
}
|
|
984
|
-
const
|
|
985
|
-
function
|
|
984
|
+
const ot = (e) => e instanceof P ? { ...e } : e;
|
|
985
|
+
function X(e, t) {
|
|
986
986
|
t = t || {};
|
|
987
987
|
const n = {};
|
|
988
988
|
function r(u, d, f, g) {
|
|
@@ -994,160 +994,160 @@ function K(e, t) {
|
|
|
994
994
|
return r(void 0, u, f, g);
|
|
995
995
|
} else return r(u, d, f, g);
|
|
996
996
|
}
|
|
997
|
-
function
|
|
997
|
+
function o(u, d) {
|
|
998
998
|
if (!a.isUndefined(d))
|
|
999
999
|
return r(void 0, d);
|
|
1000
1000
|
}
|
|
1001
|
-
function
|
|
1001
|
+
function i(u, d) {
|
|
1002
1002
|
if (a.isUndefined(d)) {
|
|
1003
1003
|
if (!a.isUndefined(u))
|
|
1004
1004
|
return r(void 0, u);
|
|
1005
1005
|
} else return r(void 0, d);
|
|
1006
1006
|
}
|
|
1007
|
-
function
|
|
1007
|
+
function l(u, d, f) {
|
|
1008
1008
|
if (f in t)
|
|
1009
1009
|
return r(u, d);
|
|
1010
1010
|
if (f in e)
|
|
1011
1011
|
return r(void 0, u);
|
|
1012
1012
|
}
|
|
1013
|
-
const
|
|
1014
|
-
url:
|
|
1015
|
-
method:
|
|
1016
|
-
data:
|
|
1017
|
-
baseURL:
|
|
1018
|
-
transformRequest:
|
|
1019
|
-
transformResponse:
|
|
1020
|
-
paramsSerializer:
|
|
1021
|
-
timeout:
|
|
1022
|
-
timeoutMessage:
|
|
1023
|
-
withCredentials:
|
|
1024
|
-
withXSRFToken:
|
|
1025
|
-
adapter:
|
|
1026
|
-
responseType:
|
|
1027
|
-
xsrfCookieName:
|
|
1028
|
-
xsrfHeaderName:
|
|
1029
|
-
onUploadProgress:
|
|
1030
|
-
onDownloadProgress:
|
|
1031
|
-
decompress:
|
|
1032
|
-
maxContentLength:
|
|
1033
|
-
maxBodyLength:
|
|
1034
|
-
beforeRedirect:
|
|
1035
|
-
transport:
|
|
1036
|
-
httpAgent:
|
|
1037
|
-
httpsAgent:
|
|
1038
|
-
cancelToken:
|
|
1039
|
-
socketPath:
|
|
1040
|
-
responseEncoding:
|
|
1041
|
-
validateStatus:
|
|
1042
|
-
headers: (u, d, f) => s(
|
|
1013
|
+
const c = {
|
|
1014
|
+
url: o,
|
|
1015
|
+
method: o,
|
|
1016
|
+
data: o,
|
|
1017
|
+
baseURL: i,
|
|
1018
|
+
transformRequest: i,
|
|
1019
|
+
transformResponse: i,
|
|
1020
|
+
paramsSerializer: i,
|
|
1021
|
+
timeout: i,
|
|
1022
|
+
timeoutMessage: i,
|
|
1023
|
+
withCredentials: i,
|
|
1024
|
+
withXSRFToken: i,
|
|
1025
|
+
adapter: i,
|
|
1026
|
+
responseType: i,
|
|
1027
|
+
xsrfCookieName: i,
|
|
1028
|
+
xsrfHeaderName: i,
|
|
1029
|
+
onUploadProgress: i,
|
|
1030
|
+
onDownloadProgress: i,
|
|
1031
|
+
decompress: i,
|
|
1032
|
+
maxContentLength: i,
|
|
1033
|
+
maxBodyLength: i,
|
|
1034
|
+
beforeRedirect: i,
|
|
1035
|
+
transport: i,
|
|
1036
|
+
httpAgent: i,
|
|
1037
|
+
httpsAgent: i,
|
|
1038
|
+
cancelToken: i,
|
|
1039
|
+
socketPath: i,
|
|
1040
|
+
responseEncoding: i,
|
|
1041
|
+
validateStatus: l,
|
|
1042
|
+
headers: (u, d, f) => s(ot(u), ot(d), f, !0)
|
|
1043
1043
|
};
|
|
1044
1044
|
return a.forEach(Object.keys(Object.assign({}, e, t)), function(d) {
|
|
1045
|
-
const f =
|
|
1046
|
-
a.isUndefined(g) && f !==
|
|
1045
|
+
const f = c[d] || s, g = f(e[d], t[d], d);
|
|
1046
|
+
a.isUndefined(g) && f !== l || (n[d] = g);
|
|
1047
1047
|
}), n;
|
|
1048
1048
|
}
|
|
1049
|
-
const
|
|
1050
|
-
const t =
|
|
1051
|
-
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName:
|
|
1052
|
-
t.headers =
|
|
1049
|
+
const kt = (e) => {
|
|
1050
|
+
const t = X({}, e);
|
|
1051
|
+
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: l } = t;
|
|
1052
|
+
t.headers = i = P.from(i), t.url = At(Nt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), l && i.set(
|
|
1053
1053
|
"Authorization",
|
|
1054
|
-
"Basic " + btoa((
|
|
1054
|
+
"Basic " + btoa((l.username || "") + ":" + (l.password ? unescape(encodeURIComponent(l.password)) : ""))
|
|
1055
1055
|
);
|
|
1056
|
-
let
|
|
1056
|
+
let c;
|
|
1057
1057
|
if (a.isFormData(n)) {
|
|
1058
|
-
if (
|
|
1059
|
-
|
|
1060
|
-
else if ((
|
|
1061
|
-
const [u, ...d] =
|
|
1062
|
-
|
|
1058
|
+
if (v.hasStandardBrowserEnv || v.hasStandardBrowserWebWorkerEnv)
|
|
1059
|
+
i.setContentType(void 0);
|
|
1060
|
+
else if ((c = i.getContentType()) !== !1) {
|
|
1061
|
+
const [u, ...d] = c ? c.split(";").map((f) => f.trim()).filter(Boolean) : [];
|
|
1062
|
+
i.setContentType([u || "multipart/form-data", ...d].join("; "));
|
|
1063
1063
|
}
|
|
1064
1064
|
}
|
|
1065
|
-
if (
|
|
1066
|
-
const u = s &&
|
|
1067
|
-
u &&
|
|
1065
|
+
if (v.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && mr(t.url))) {
|
|
1066
|
+
const u = s && o && wr.read(o);
|
|
1067
|
+
u && i.set(s, u);
|
|
1068
1068
|
}
|
|
1069
1069
|
return t;
|
|
1070
|
-
},
|
|
1070
|
+
}, Er = typeof XMLHttpRequest < "u", br = Er && function(e) {
|
|
1071
1071
|
return new Promise(function(n, r) {
|
|
1072
|
-
const s =
|
|
1073
|
-
let
|
|
1074
|
-
const
|
|
1075
|
-
let { responseType:
|
|
1076
|
-
function
|
|
1077
|
-
|
|
1072
|
+
const s = kt(e);
|
|
1073
|
+
let o = s.data;
|
|
1074
|
+
const i = P.from(s.headers).normalize();
|
|
1075
|
+
let { responseType: l, onUploadProgress: c, onDownloadProgress: u } = s, d, f, g, R, p;
|
|
1076
|
+
function w() {
|
|
1077
|
+
R && R(), p && p(), s.cancelToken && s.cancelToken.unsubscribe(d), s.signal && s.signal.removeEventListener("abort", d);
|
|
1078
1078
|
}
|
|
1079
1079
|
let h = new XMLHttpRequest();
|
|
1080
1080
|
h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
|
|
1081
|
-
function
|
|
1081
|
+
function S() {
|
|
1082
1082
|
if (!h)
|
|
1083
1083
|
return;
|
|
1084
|
-
const
|
|
1084
|
+
const T = P.from(
|
|
1085
1085
|
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1086
|
-
),
|
|
1087
|
-
data: !
|
|
1086
|
+
), L = {
|
|
1087
|
+
data: !l || l === "text" || l === "json" ? h.responseText : h.response,
|
|
1088
1088
|
status: h.status,
|
|
1089
1089
|
statusText: h.statusText,
|
|
1090
|
-
headers:
|
|
1090
|
+
headers: T,
|
|
1091
1091
|
config: e,
|
|
1092
1092
|
request: h
|
|
1093
1093
|
};
|
|
1094
|
-
|
|
1095
|
-
n(
|
|
1096
|
-
}, function(
|
|
1097
|
-
r(
|
|
1098
|
-
},
|
|
1094
|
+
Lt(function(U) {
|
|
1095
|
+
n(U), w();
|
|
1096
|
+
}, function(U) {
|
|
1097
|
+
r(U), w();
|
|
1098
|
+
}, L), h = null;
|
|
1099
1099
|
}
|
|
1100
|
-
"onloadend" in h ? h.onloadend =
|
|
1101
|
-
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
1100
|
+
"onloadend" in h ? h.onloadend = S : h.onreadystatechange = function() {
|
|
1101
|
+
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(S);
|
|
1102
1102
|
}, h.onabort = function() {
|
|
1103
|
-
h && (r(new
|
|
1103
|
+
h && (r(new y("Request aborted", y.ECONNABORTED, e, h)), h = null);
|
|
1104
1104
|
}, h.onerror = function() {
|
|
1105
|
-
r(new
|
|
1105
|
+
r(new y("Network Error", y.ERR_NETWORK, e, h)), h = null;
|
|
1106
1106
|
}, h.ontimeout = function() {
|
|
1107
|
-
let
|
|
1108
|
-
const
|
|
1109
|
-
s.timeoutErrorMessage && (
|
|
1110
|
-
|
|
1111
|
-
|
|
1107
|
+
let A = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1108
|
+
const L = s.transitional || Ot;
|
|
1109
|
+
s.timeoutErrorMessage && (A = s.timeoutErrorMessage), r(new y(
|
|
1110
|
+
A,
|
|
1111
|
+
L.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
1112
1112
|
e,
|
|
1113
1113
|
h
|
|
1114
1114
|
)), h = null;
|
|
1115
|
-
},
|
|
1116
|
-
h.setRequestHeader(
|
|
1117
|
-
}), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials),
|
|
1118
|
-
h && (r(!
|
|
1115
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function(A, L) {
|
|
1116
|
+
h.setRequestHeader(L, A);
|
|
1117
|
+
}), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), l && l !== "json" && (h.responseType = s.responseType), u && ([g, p] = he(u, !0), h.addEventListener("progress", g)), c && h.upload && ([f, R] = he(c), h.upload.addEventListener("progress", f), h.upload.addEventListener("loadend", R)), (s.cancelToken || s.signal) && (d = (T) => {
|
|
1118
|
+
h && (r(!T || T.type ? new te(null, e, h) : T), h.abort(), h = null);
|
|
1119
1119
|
}, s.cancelToken && s.cancelToken.subscribe(d), s.signal && (s.signal.aborted ? d() : s.signal.addEventListener("abort", d)));
|
|
1120
|
-
const
|
|
1121
|
-
if (
|
|
1122
|
-
r(new
|
|
1120
|
+
const _ = fr(s.url);
|
|
1121
|
+
if (_ && v.protocols.indexOf(_) === -1) {
|
|
1122
|
+
r(new y("Unsupported protocol " + _ + ":", y.ERR_BAD_REQUEST, e));
|
|
1123
1123
|
return;
|
|
1124
1124
|
}
|
|
1125
|
-
h.send(
|
|
1125
|
+
h.send(o || null);
|
|
1126
1126
|
});
|
|
1127
|
-
},
|
|
1127
|
+
}, Tr = (e, t) => {
|
|
1128
1128
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1129
1129
|
if (t || n) {
|
|
1130
1130
|
let r = new AbortController(), s;
|
|
1131
|
-
const
|
|
1131
|
+
const o = function(u) {
|
|
1132
1132
|
if (!s) {
|
|
1133
|
-
s = !0,
|
|
1133
|
+
s = !0, l();
|
|
1134
1134
|
const d = u instanceof Error ? u : this.reason;
|
|
1135
|
-
r.abort(d instanceof
|
|
1135
|
+
r.abort(d instanceof y ? d : new te(d instanceof Error ? d.message : d));
|
|
1136
1136
|
}
|
|
1137
1137
|
};
|
|
1138
|
-
let
|
|
1139
|
-
|
|
1138
|
+
let i = t && setTimeout(() => {
|
|
1139
|
+
i = null, o(new y(`timeout ${t} of ms exceeded`, y.ETIMEDOUT));
|
|
1140
1140
|
}, t);
|
|
1141
|
-
const
|
|
1142
|
-
e && (
|
|
1143
|
-
u.unsubscribe ? u.unsubscribe(
|
|
1141
|
+
const l = () => {
|
|
1142
|
+
e && (i && clearTimeout(i), i = null, e.forEach((u) => {
|
|
1143
|
+
u.unsubscribe ? u.unsubscribe(o) : u.removeEventListener("abort", o);
|
|
1144
1144
|
}), e = null);
|
|
1145
1145
|
};
|
|
1146
|
-
e.forEach((u) => u.addEventListener("abort",
|
|
1147
|
-
const { signal:
|
|
1148
|
-
return
|
|
1146
|
+
e.forEach((u) => u.addEventListener("abort", o));
|
|
1147
|
+
const { signal: c } = r;
|
|
1148
|
+
return c.unsubscribe = () => a.asap(l), c;
|
|
1149
1149
|
}
|
|
1150
|
-
},
|
|
1150
|
+
}, Sr = function* (e, t) {
|
|
1151
1151
|
let n = e.byteLength;
|
|
1152
1152
|
if (n < t) {
|
|
1153
1153
|
yield e;
|
|
@@ -1156,10 +1156,10 @@ const vt = (e) => {
|
|
|
1156
1156
|
let r = 0, s;
|
|
1157
1157
|
for (; r < n; )
|
|
1158
1158
|
s = r + t, yield e.slice(r, s), r = s;
|
|
1159
|
-
},
|
|
1160
|
-
for await (const n of
|
|
1161
|
-
yield*
|
|
1162
|
-
},
|
|
1159
|
+
}, _r = async function* (e, t) {
|
|
1160
|
+
for await (const n of Rr(e))
|
|
1161
|
+
yield* Sr(n, t);
|
|
1162
|
+
}, Rr = async function* (e) {
|
|
1163
1163
|
if (e[Symbol.asyncIterator]) {
|
|
1164
1164
|
yield* e;
|
|
1165
1165
|
return;
|
|
@@ -1175,44 +1175,44 @@ const vt = (e) => {
|
|
|
1175
1175
|
} finally {
|
|
1176
1176
|
await t.cancel();
|
|
1177
1177
|
}
|
|
1178
|
-
},
|
|
1179
|
-
const s =
|
|
1180
|
-
let
|
|
1181
|
-
|
|
1178
|
+
}, it = (e, t, n, r) => {
|
|
1179
|
+
const s = _r(e, t);
|
|
1180
|
+
let o = 0, i, l = (c) => {
|
|
1181
|
+
i || (i = !0, r && r(c));
|
|
1182
1182
|
};
|
|
1183
1183
|
return new ReadableStream({
|
|
1184
|
-
async pull(
|
|
1184
|
+
async pull(c) {
|
|
1185
1185
|
try {
|
|
1186
1186
|
const { done: u, value: d } = await s.next();
|
|
1187
1187
|
if (u) {
|
|
1188
|
-
|
|
1188
|
+
l(), c.close();
|
|
1189
1189
|
return;
|
|
1190
1190
|
}
|
|
1191
1191
|
let f = d.byteLength;
|
|
1192
1192
|
if (n) {
|
|
1193
|
-
let g =
|
|
1193
|
+
let g = o += f;
|
|
1194
1194
|
n(g);
|
|
1195
1195
|
}
|
|
1196
|
-
|
|
1196
|
+
c.enqueue(new Uint8Array(d));
|
|
1197
1197
|
} catch (u) {
|
|
1198
|
-
throw
|
|
1198
|
+
throw l(u), u;
|
|
1199
1199
|
}
|
|
1200
1200
|
},
|
|
1201
|
-
cancel(
|
|
1202
|
-
return c
|
|
1201
|
+
cancel(c) {
|
|
1202
|
+
return l(c), s.return();
|
|
1203
1203
|
}
|
|
1204
1204
|
}, {
|
|
1205
1205
|
highWaterMark: 2
|
|
1206
1206
|
});
|
|
1207
|
-
}, Se = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function",
|
|
1207
|
+
}, Se = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", vt = Se && typeof ReadableStream == "function", Ar = Se && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Bt = (e, ...t) => {
|
|
1208
1208
|
try {
|
|
1209
1209
|
return !!e(...t);
|
|
1210
1210
|
} catch {
|
|
1211
1211
|
return !1;
|
|
1212
1212
|
}
|
|
1213
|
-
},
|
|
1213
|
+
}, Or = vt && Bt(() => {
|
|
1214
1214
|
let e = !1;
|
|
1215
|
-
const t = new Request(
|
|
1215
|
+
const t = new Request(v.origin, {
|
|
1216
1216
|
body: new ReadableStream(),
|
|
1217
1217
|
method: "POST",
|
|
1218
1218
|
get duplex() {
|
|
@@ -1220,122 +1220,122 @@ const vt = (e) => {
|
|
|
1220
1220
|
}
|
|
1221
1221
|
}).headers.has("Content-Type");
|
|
1222
1222
|
return e && !t;
|
|
1223
|
-
}),
|
|
1223
|
+
}), at = 64 * 1024, Pe = vt && Bt(() => a.isReadableStream(new Response("").body)), me = {
|
|
1224
1224
|
stream: Pe && ((e) => e.body)
|
|
1225
1225
|
};
|
|
1226
1226
|
Se && ((e) => {
|
|
1227
1227
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1228
1228
|
!me[t] && (me[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1229
|
-
throw new
|
|
1229
|
+
throw new y(`Response type '${t}' is not supported`, y.ERR_NOT_SUPPORT, r);
|
|
1230
1230
|
});
|
|
1231
1231
|
});
|
|
1232
1232
|
})(new Response());
|
|
1233
|
-
const
|
|
1233
|
+
const xr = async (e) => {
|
|
1234
1234
|
if (e == null)
|
|
1235
1235
|
return 0;
|
|
1236
1236
|
if (a.isBlob(e))
|
|
1237
1237
|
return e.size;
|
|
1238
1238
|
if (a.isSpecCompliantForm(e))
|
|
1239
|
-
return (await new Request(
|
|
1239
|
+
return (await new Request(v.origin, {
|
|
1240
1240
|
method: "POST",
|
|
1241
1241
|
body: e
|
|
1242
1242
|
}).arrayBuffer()).byteLength;
|
|
1243
1243
|
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1244
1244
|
return e.byteLength;
|
|
1245
1245
|
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1246
|
-
return (await
|
|
1247
|
-
},
|
|
1246
|
+
return (await Ar(e)).byteLength;
|
|
1247
|
+
}, Cr = async (e, t) => {
|
|
1248
1248
|
const n = a.toFiniteNumber(e.getContentLength());
|
|
1249
|
-
return n ??
|
|
1250
|
-
},
|
|
1249
|
+
return n ?? xr(t);
|
|
1250
|
+
}, Lr = Se && (async (e) => {
|
|
1251
1251
|
let {
|
|
1252
1252
|
url: t,
|
|
1253
1253
|
method: n,
|
|
1254
1254
|
data: r,
|
|
1255
1255
|
signal: s,
|
|
1256
|
-
cancelToken:
|
|
1257
|
-
timeout:
|
|
1258
|
-
onDownloadProgress:
|
|
1259
|
-
onUploadProgress:
|
|
1256
|
+
cancelToken: o,
|
|
1257
|
+
timeout: i,
|
|
1258
|
+
onDownloadProgress: l,
|
|
1259
|
+
onUploadProgress: c,
|
|
1260
1260
|
responseType: u,
|
|
1261
1261
|
headers: d,
|
|
1262
1262
|
withCredentials: f = "same-origin",
|
|
1263
1263
|
fetchOptions: g
|
|
1264
|
-
} =
|
|
1264
|
+
} = kt(e);
|
|
1265
1265
|
u = u ? (u + "").toLowerCase() : "text";
|
|
1266
|
-
let
|
|
1267
|
-
const
|
|
1268
|
-
|
|
1266
|
+
let R = Tr([s, o && o.toAbortSignal()], i), p;
|
|
1267
|
+
const w = R && R.unsubscribe && (() => {
|
|
1268
|
+
R.unsubscribe();
|
|
1269
1269
|
});
|
|
1270
1270
|
let h;
|
|
1271
1271
|
try {
|
|
1272
|
-
if (
|
|
1273
|
-
let
|
|
1272
|
+
if (c && Or && n !== "get" && n !== "head" && (h = await Cr(d, r)) !== 0) {
|
|
1273
|
+
let L = new Request(t, {
|
|
1274
1274
|
method: "POST",
|
|
1275
1275
|
body: r,
|
|
1276
1276
|
duplex: "half"
|
|
1277
|
-
}),
|
|
1278
|
-
if (a.isFormData(r) && (
|
|
1279
|
-
const [
|
|
1277
|
+
}), C;
|
|
1278
|
+
if (a.isFormData(r) && (C = L.headers.get("content-type")) && d.setContentType(C), L.body) {
|
|
1279
|
+
const [U, V] = rt(
|
|
1280
1280
|
h,
|
|
1281
|
-
he(
|
|
1281
|
+
he(st(c))
|
|
1282
1282
|
);
|
|
1283
|
-
r =
|
|
1283
|
+
r = it(L.body, at, U, V);
|
|
1284
1284
|
}
|
|
1285
1285
|
}
|
|
1286
1286
|
a.isString(f) || (f = f ? "include" : "omit");
|
|
1287
|
-
const
|
|
1287
|
+
const S = "credentials" in Request.prototype;
|
|
1288
1288
|
p = new Request(t, {
|
|
1289
1289
|
...g,
|
|
1290
|
-
signal:
|
|
1290
|
+
signal: R,
|
|
1291
1291
|
method: n.toUpperCase(),
|
|
1292
1292
|
headers: d.normalize().toJSON(),
|
|
1293
1293
|
body: r,
|
|
1294
1294
|
duplex: "half",
|
|
1295
|
-
credentials:
|
|
1295
|
+
credentials: S ? f : void 0
|
|
1296
1296
|
});
|
|
1297
|
-
let
|
|
1298
|
-
const
|
|
1299
|
-
if (Pe && (
|
|
1300
|
-
const
|
|
1301
|
-
["status", "statusText", "headers"].forEach((
|
|
1302
|
-
|
|
1297
|
+
let _ = await fetch(p, g);
|
|
1298
|
+
const T = Pe && (u === "stream" || u === "response");
|
|
1299
|
+
if (Pe && (l || T && w)) {
|
|
1300
|
+
const L = {};
|
|
1301
|
+
["status", "statusText", "headers"].forEach((m) => {
|
|
1302
|
+
L[m] = _[m];
|
|
1303
1303
|
});
|
|
1304
|
-
const
|
|
1305
|
-
|
|
1306
|
-
he(
|
|
1304
|
+
const C = a.toFiniteNumber(_.headers.get("content-length")), [U, V] = l && rt(
|
|
1305
|
+
C,
|
|
1306
|
+
he(st(l), !0)
|
|
1307
1307
|
) || [];
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1308
|
+
_ = new Response(
|
|
1309
|
+
it(_.body, at, U, () => {
|
|
1310
|
+
V && V(), w && w();
|
|
1311
1311
|
}),
|
|
1312
|
-
|
|
1312
|
+
L
|
|
1313
1313
|
);
|
|
1314
1314
|
}
|
|
1315
1315
|
u = u || "text";
|
|
1316
|
-
let
|
|
1317
|
-
return !
|
|
1318
|
-
|
|
1319
|
-
data:
|
|
1320
|
-
headers: P.from(
|
|
1321
|
-
status:
|
|
1322
|
-
statusText:
|
|
1316
|
+
let A = await me[a.findKey(me, u) || "text"](_, e);
|
|
1317
|
+
return !T && w && w(), await new Promise((L, C) => {
|
|
1318
|
+
Lt(L, C, {
|
|
1319
|
+
data: A,
|
|
1320
|
+
headers: P.from(_.headers),
|
|
1321
|
+
status: _.status,
|
|
1322
|
+
statusText: _.statusText,
|
|
1323
1323
|
config: e,
|
|
1324
1324
|
request: p
|
|
1325
1325
|
});
|
|
1326
1326
|
});
|
|
1327
|
-
} catch (
|
|
1328
|
-
throw
|
|
1329
|
-
new
|
|
1327
|
+
} catch (S) {
|
|
1328
|
+
throw w && w(), S && S.name === "TypeError" && /Load failed|fetch/i.test(S.message) ? Object.assign(
|
|
1329
|
+
new y("Network Error", y.ERR_NETWORK, e, p),
|
|
1330
1330
|
{
|
|
1331
|
-
cause:
|
|
1331
|
+
cause: S.cause || S
|
|
1332
1332
|
}
|
|
1333
|
-
) :
|
|
1333
|
+
) : y.from(S, S && S.code, e, p);
|
|
1334
1334
|
}
|
|
1335
1335
|
}), Ue = {
|
|
1336
|
-
http:
|
|
1337
|
-
xhr:
|
|
1338
|
-
fetch:
|
|
1336
|
+
http: Hn,
|
|
1337
|
+
xhr: br,
|
|
1338
|
+
fetch: Lr
|
|
1339
1339
|
};
|
|
1340
1340
|
a.forEach(Ue, (e, t) => {
|
|
1341
1341
|
if (e) {
|
|
@@ -1346,30 +1346,30 @@ a.forEach(Ue, (e, t) => {
|
|
|
1346
1346
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1347
1347
|
}
|
|
1348
1348
|
});
|
|
1349
|
-
const
|
|
1349
|
+
const ct = (e) => `- ${e}`, Nr = (e) => a.isFunction(e) || e === null || e === !1, Pt = {
|
|
1350
1350
|
getAdapter: (e) => {
|
|
1351
1351
|
e = a.isArray(e) ? e : [e];
|
|
1352
1352
|
const { length: t } = e;
|
|
1353
1353
|
let n, r;
|
|
1354
1354
|
const s = {};
|
|
1355
|
-
for (let
|
|
1356
|
-
n = e[
|
|
1357
|
-
let
|
|
1358
|
-
if (r = n, !
|
|
1359
|
-
throw new
|
|
1355
|
+
for (let o = 0; o < t; o++) {
|
|
1356
|
+
n = e[o];
|
|
1357
|
+
let i;
|
|
1358
|
+
if (r = n, !Nr(n) && (r = Ue[(i = String(n)).toLowerCase()], r === void 0))
|
|
1359
|
+
throw new y(`Unknown adapter '${i}'`);
|
|
1360
1360
|
if (r)
|
|
1361
1361
|
break;
|
|
1362
|
-
s[
|
|
1362
|
+
s[i || "#" + o] = r;
|
|
1363
1363
|
}
|
|
1364
1364
|
if (!r) {
|
|
1365
|
-
const
|
|
1366
|
-
([
|
|
1365
|
+
const o = Object.entries(s).map(
|
|
1366
|
+
([l, c]) => `adapter ${l} ` + (c === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1367
1367
|
);
|
|
1368
|
-
let
|
|
1369
|
-
` +
|
|
1370
|
-
`) : " " +
|
|
1371
|
-
throw new
|
|
1372
|
-
"There is no suitable adapter to dispatch the request " +
|
|
1368
|
+
let i = t ? o.length > 1 ? `since :
|
|
1369
|
+
` + o.map(ct).join(`
|
|
1370
|
+
`) : " " + ct(o[0]) : "as no adapter specified";
|
|
1371
|
+
throw new y(
|
|
1372
|
+
"There is no suitable adapter to dispatch the request " + i,
|
|
1373
1373
|
"ERR_NOT_SUPPORT"
|
|
1374
1374
|
);
|
|
1375
1375
|
}
|
|
@@ -1377,82 +1377,82 @@ const it = (e) => `- ${e}`, xr = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1377
1377
|
},
|
|
1378
1378
|
adapters: Ue
|
|
1379
1379
|
};
|
|
1380
|
-
function
|
|
1380
|
+
function Ne(e) {
|
|
1381
1381
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1382
|
-
throw new
|
|
1382
|
+
throw new te(null, e);
|
|
1383
1383
|
}
|
|
1384
|
-
function
|
|
1385
|
-
return
|
|
1384
|
+
function lt(e) {
|
|
1385
|
+
return Ne(e), e.headers = P.from(e.headers), e.data = Le.call(
|
|
1386
1386
|
e,
|
|
1387
1387
|
e.transformRequest
|
|
1388
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1389
|
-
return
|
|
1388
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Pt.getAdapter(e.adapter || ae.adapter)(e).then(function(r) {
|
|
1389
|
+
return Ne(e), r.data = Le.call(
|
|
1390
1390
|
e,
|
|
1391
1391
|
e.transformResponse,
|
|
1392
1392
|
r
|
|
1393
1393
|
), r.headers = P.from(r.headers), r;
|
|
1394
1394
|
}, function(r) {
|
|
1395
|
-
return
|
|
1395
|
+
return Ct(r) || (Ne(e), r && r.response && (r.response.data = Le.call(
|
|
1396
1396
|
e,
|
|
1397
1397
|
e.transformResponse,
|
|
1398
1398
|
r.response
|
|
1399
1399
|
), r.response.headers = P.from(r.response.headers))), Promise.reject(r);
|
|
1400
1400
|
});
|
|
1401
1401
|
}
|
|
1402
|
-
const
|
|
1402
|
+
const Ut = "1.10.0", _e = {};
|
|
1403
1403
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1404
1404
|
_e[e] = function(r) {
|
|
1405
1405
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1406
1406
|
};
|
|
1407
1407
|
});
|
|
1408
|
-
const
|
|
1408
|
+
const ut = {};
|
|
1409
1409
|
_e.transitional = function(t, n, r) {
|
|
1410
|
-
function s(
|
|
1411
|
-
return "[Axios v" +
|
|
1410
|
+
function s(o, i) {
|
|
1411
|
+
return "[Axios v" + Ut + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1412
1412
|
}
|
|
1413
|
-
return (
|
|
1413
|
+
return (o, i, l) => {
|
|
1414
1414
|
if (t === !1)
|
|
1415
|
-
throw new
|
|
1416
|
-
s(
|
|
1417
|
-
|
|
1415
|
+
throw new y(
|
|
1416
|
+
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1417
|
+
y.ERR_DEPRECATED
|
|
1418
1418
|
);
|
|
1419
|
-
return n && !
|
|
1419
|
+
return n && !ut[i] && (ut[i] = !0, console.warn(
|
|
1420
1420
|
s(
|
|
1421
|
-
|
|
1421
|
+
i,
|
|
1422
1422
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1423
1423
|
)
|
|
1424
|
-
)), t ? t(
|
|
1424
|
+
)), t ? t(o, i, l) : !0;
|
|
1425
1425
|
};
|
|
1426
1426
|
};
|
|
1427
1427
|
_e.spelling = function(t) {
|
|
1428
1428
|
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1429
1429
|
};
|
|
1430
|
-
function
|
|
1430
|
+
function kr(e, t, n) {
|
|
1431
1431
|
if (typeof e != "object")
|
|
1432
|
-
throw new
|
|
1432
|
+
throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
|
|
1433
1433
|
const r = Object.keys(e);
|
|
1434
1434
|
let s = r.length;
|
|
1435
1435
|
for (; s-- > 0; ) {
|
|
1436
|
-
const
|
|
1437
|
-
if (
|
|
1438
|
-
const
|
|
1439
|
-
if (
|
|
1440
|
-
throw new
|
|
1436
|
+
const o = r[s], i = t[o];
|
|
1437
|
+
if (i) {
|
|
1438
|
+
const l = e[o], c = l === void 0 || i(l, o, e);
|
|
1439
|
+
if (c !== !0)
|
|
1440
|
+
throw new y("option " + o + " must be " + c, y.ERR_BAD_OPTION_VALUE);
|
|
1441
1441
|
continue;
|
|
1442
1442
|
}
|
|
1443
1443
|
if (n !== !0)
|
|
1444
|
-
throw new
|
|
1444
|
+
throw new y("Unknown option " + o, y.ERR_BAD_OPTION);
|
|
1445
1445
|
}
|
|
1446
1446
|
}
|
|
1447
1447
|
const pe = {
|
|
1448
|
-
assertOptions:
|
|
1448
|
+
assertOptions: kr,
|
|
1449
1449
|
validators: _e
|
|
1450
|
-
},
|
|
1451
|
-
let
|
|
1450
|
+
}, $ = pe.validators;
|
|
1451
|
+
let K = class {
|
|
1452
1452
|
constructor(t) {
|
|
1453
1453
|
this.defaults = t || {}, this.interceptors = {
|
|
1454
|
-
request: new
|
|
1455
|
-
response: new
|
|
1454
|
+
request: new tt(),
|
|
1455
|
+
response: new tt()
|
|
1456
1456
|
};
|
|
1457
1457
|
}
|
|
1458
1458
|
/**
|
|
@@ -1470,10 +1470,10 @@ let Q = class {
|
|
|
1470
1470
|
if (r instanceof Error) {
|
|
1471
1471
|
let s = {};
|
|
1472
1472
|
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
1473
|
-
const
|
|
1473
|
+
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1474
1474
|
try {
|
|
1475
|
-
r.stack ?
|
|
1476
|
-
` +
|
|
1475
|
+
r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1476
|
+
` + o) : r.stack = o;
|
|
1477
1477
|
} catch {
|
|
1478
1478
|
}
|
|
1479
1479
|
}
|
|
@@ -1481,60 +1481,60 @@ let Q = class {
|
|
|
1481
1481
|
}
|
|
1482
1482
|
}
|
|
1483
1483
|
_request(t, n) {
|
|
1484
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1485
|
-
const { transitional: r, paramsSerializer: s, headers:
|
|
1484
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = X(this.defaults, n);
|
|
1485
|
+
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1486
1486
|
r !== void 0 && pe.assertOptions(r, {
|
|
1487
|
-
silentJSONParsing:
|
|
1488
|
-
forcedJSONParsing:
|
|
1489
|
-
clarifyTimeoutError:
|
|
1487
|
+
silentJSONParsing: $.transitional($.boolean),
|
|
1488
|
+
forcedJSONParsing: $.transitional($.boolean),
|
|
1489
|
+
clarifyTimeoutError: $.transitional($.boolean)
|
|
1490
1490
|
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1491
1491
|
serialize: s
|
|
1492
1492
|
} : pe.assertOptions(s, {
|
|
1493
|
-
encode:
|
|
1494
|
-
serialize:
|
|
1493
|
+
encode: $.function,
|
|
1494
|
+
serialize: $.function
|
|
1495
1495
|
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), pe.assertOptions(n, {
|
|
1496
|
-
baseUrl:
|
|
1497
|
-
withXsrfToken:
|
|
1496
|
+
baseUrl: $.spelling("baseURL"),
|
|
1497
|
+
withXsrfToken: $.spelling("withXSRFToken")
|
|
1498
1498
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1499
|
-
let
|
|
1500
|
-
|
|
1501
|
-
|
|
1499
|
+
let i = o && a.merge(
|
|
1500
|
+
o.common,
|
|
1501
|
+
o[n.method]
|
|
1502
1502
|
);
|
|
1503
|
-
|
|
1503
|
+
o && a.forEach(
|
|
1504
1504
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1505
1505
|
(p) => {
|
|
1506
|
-
delete
|
|
1506
|
+
delete o[p];
|
|
1507
1507
|
}
|
|
1508
|
-
), n.headers = P.concat(
|
|
1509
|
-
const
|
|
1510
|
-
let
|
|
1511
|
-
this.interceptors.request.forEach(function(
|
|
1512
|
-
typeof
|
|
1508
|
+
), n.headers = P.concat(i, o);
|
|
1509
|
+
const l = [];
|
|
1510
|
+
let c = !0;
|
|
1511
|
+
this.interceptors.request.forEach(function(w) {
|
|
1512
|
+
typeof w.runWhen == "function" && w.runWhen(n) === !1 || (c = c && w.synchronous, l.unshift(w.fulfilled, w.rejected));
|
|
1513
1513
|
});
|
|
1514
1514
|
const u = [];
|
|
1515
|
-
this.interceptors.response.forEach(function(
|
|
1516
|
-
u.push(
|
|
1515
|
+
this.interceptors.response.forEach(function(w) {
|
|
1516
|
+
u.push(w.fulfilled, w.rejected);
|
|
1517
1517
|
});
|
|
1518
1518
|
let d, f = 0, g;
|
|
1519
|
-
if (!
|
|
1520
|
-
const p = [
|
|
1521
|
-
for (p.unshift.apply(p,
|
|
1519
|
+
if (!c) {
|
|
1520
|
+
const p = [lt.bind(this), void 0];
|
|
1521
|
+
for (p.unshift.apply(p, l), p.push.apply(p, u), g = p.length, d = Promise.resolve(n); f < g; )
|
|
1522
1522
|
d = d.then(p[f++], p[f++]);
|
|
1523
1523
|
return d;
|
|
1524
1524
|
}
|
|
1525
|
-
g =
|
|
1526
|
-
let
|
|
1525
|
+
g = l.length;
|
|
1526
|
+
let R = n;
|
|
1527
1527
|
for (f = 0; f < g; ) {
|
|
1528
|
-
const p =
|
|
1528
|
+
const p = l[f++], w = l[f++];
|
|
1529
1529
|
try {
|
|
1530
|
-
|
|
1530
|
+
R = p(R);
|
|
1531
1531
|
} catch (h) {
|
|
1532
|
-
|
|
1532
|
+
w.call(this, h);
|
|
1533
1533
|
break;
|
|
1534
1534
|
}
|
|
1535
1535
|
}
|
|
1536
1536
|
try {
|
|
1537
|
-
d =
|
|
1537
|
+
d = lt.call(this, R);
|
|
1538
1538
|
} catch (p) {
|
|
1539
1539
|
return Promise.reject(p);
|
|
1540
1540
|
}
|
|
@@ -1543,14 +1543,14 @@ let Q = class {
|
|
|
1543
1543
|
return d;
|
|
1544
1544
|
}
|
|
1545
1545
|
getUri(t) {
|
|
1546
|
-
t =
|
|
1547
|
-
const n =
|
|
1548
|
-
return
|
|
1546
|
+
t = X(this.defaults, t);
|
|
1547
|
+
const n = Nt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1548
|
+
return At(n, t.params, t.paramsSerializer);
|
|
1549
1549
|
}
|
|
1550
1550
|
};
|
|
1551
1551
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1552
|
-
|
|
1553
|
-
return this.request(
|
|
1552
|
+
K.prototype[t] = function(n, r) {
|
|
1553
|
+
return this.request(X(r || {}, {
|
|
1554
1554
|
method: t,
|
|
1555
1555
|
url: n,
|
|
1556
1556
|
data: (r || {}).data
|
|
@@ -1559,44 +1559,44 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1559
1559
|
});
|
|
1560
1560
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1561
1561
|
function n(r) {
|
|
1562
|
-
return function(
|
|
1563
|
-
return this.request(
|
|
1562
|
+
return function(o, i, l) {
|
|
1563
|
+
return this.request(X(l || {}, {
|
|
1564
1564
|
method: t,
|
|
1565
1565
|
headers: r ? {
|
|
1566
1566
|
"Content-Type": "multipart/form-data"
|
|
1567
1567
|
} : {},
|
|
1568
|
-
url:
|
|
1569
|
-
data:
|
|
1568
|
+
url: o,
|
|
1569
|
+
data: i
|
|
1570
1570
|
}));
|
|
1571
1571
|
};
|
|
1572
1572
|
}
|
|
1573
|
-
|
|
1573
|
+
K.prototype[t] = n(), K.prototype[t + "Form"] = n(!0);
|
|
1574
1574
|
});
|
|
1575
|
-
let vr = class
|
|
1575
|
+
let vr = class It {
|
|
1576
1576
|
constructor(t) {
|
|
1577
1577
|
if (typeof t != "function")
|
|
1578
1578
|
throw new TypeError("executor must be a function.");
|
|
1579
1579
|
let n;
|
|
1580
|
-
this.promise = new Promise(function(
|
|
1581
|
-
n =
|
|
1580
|
+
this.promise = new Promise(function(o) {
|
|
1581
|
+
n = o;
|
|
1582
1582
|
});
|
|
1583
1583
|
const r = this;
|
|
1584
1584
|
this.promise.then((s) => {
|
|
1585
1585
|
if (!r._listeners) return;
|
|
1586
|
-
let
|
|
1587
|
-
for (;
|
|
1588
|
-
r._listeners[
|
|
1586
|
+
let o = r._listeners.length;
|
|
1587
|
+
for (; o-- > 0; )
|
|
1588
|
+
r._listeners[o](s);
|
|
1589
1589
|
r._listeners = null;
|
|
1590
1590
|
}), this.promise.then = (s) => {
|
|
1591
|
-
let
|
|
1592
|
-
const
|
|
1593
|
-
r.subscribe(
|
|
1591
|
+
let o;
|
|
1592
|
+
const i = new Promise((l) => {
|
|
1593
|
+
r.subscribe(l), o = l;
|
|
1594
1594
|
}).then(s);
|
|
1595
|
-
return
|
|
1596
|
-
r.unsubscribe(
|
|
1597
|
-
},
|
|
1598
|
-
}, t(function(
|
|
1599
|
-
r.reason || (r.reason = new
|
|
1595
|
+
return i.cancel = function() {
|
|
1596
|
+
r.unsubscribe(o);
|
|
1597
|
+
}, i;
|
|
1598
|
+
}, t(function(o, i, l) {
|
|
1599
|
+
r.reason || (r.reason = new te(o, i, l), n(r.reason));
|
|
1600
1600
|
});
|
|
1601
1601
|
}
|
|
1602
1602
|
/**
|
|
@@ -1638,19 +1638,19 @@ let vr = class Pt {
|
|
|
1638
1638
|
static source() {
|
|
1639
1639
|
let t;
|
|
1640
1640
|
return {
|
|
1641
|
-
token: new
|
|
1641
|
+
token: new It(function(s) {
|
|
1642
1642
|
t = s;
|
|
1643
1643
|
}),
|
|
1644
1644
|
cancel: t
|
|
1645
1645
|
};
|
|
1646
1646
|
}
|
|
1647
1647
|
};
|
|
1648
|
-
function
|
|
1648
|
+
function Br(e) {
|
|
1649
1649
|
return function(n) {
|
|
1650
1650
|
return e.apply(null, n);
|
|
1651
1651
|
};
|
|
1652
1652
|
}
|
|
1653
|
-
function
|
|
1653
|
+
function Pr(e) {
|
|
1654
1654
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1655
1655
|
}
|
|
1656
1656
|
const Ie = {
|
|
@@ -1721,51 +1721,51 @@ const Ie = {
|
|
|
1721
1721
|
Object.entries(Ie).forEach(([e, t]) => {
|
|
1722
1722
|
Ie[t] = e;
|
|
1723
1723
|
});
|
|
1724
|
-
function
|
|
1725
|
-
const t = new
|
|
1726
|
-
return a.extend(n,
|
|
1727
|
-
return
|
|
1724
|
+
function Ft(e) {
|
|
1725
|
+
const t = new K(e), n = pt(K.prototype.request, t);
|
|
1726
|
+
return a.extend(n, K.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1727
|
+
return Ft(X(e, s));
|
|
1728
1728
|
}, n;
|
|
1729
1729
|
}
|
|
1730
|
-
const x =
|
|
1731
|
-
x.Axios =
|
|
1732
|
-
x.CanceledError =
|
|
1730
|
+
const x = Ft(ae);
|
|
1731
|
+
x.Axios = K;
|
|
1732
|
+
x.CanceledError = te;
|
|
1733
1733
|
x.CancelToken = vr;
|
|
1734
|
-
x.isCancel =
|
|
1735
|
-
x.VERSION =
|
|
1734
|
+
x.isCancel = Ct;
|
|
1735
|
+
x.VERSION = Ut;
|
|
1736
1736
|
x.toFormData = Te;
|
|
1737
|
-
x.AxiosError =
|
|
1737
|
+
x.AxiosError = y;
|
|
1738
1738
|
x.Cancel = x.CanceledError;
|
|
1739
1739
|
x.all = function(t) {
|
|
1740
1740
|
return Promise.all(t);
|
|
1741
1741
|
};
|
|
1742
|
-
x.spread =
|
|
1743
|
-
x.isAxiosError =
|
|
1744
|
-
x.mergeConfig =
|
|
1742
|
+
x.spread = Br;
|
|
1743
|
+
x.isAxiosError = Pr;
|
|
1744
|
+
x.mergeConfig = X;
|
|
1745
1745
|
x.AxiosHeaders = P;
|
|
1746
|
-
x.formToJSON = (e) =>
|
|
1747
|
-
x.getAdapter =
|
|
1746
|
+
x.formToJSON = (e) => xt(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1747
|
+
x.getAdapter = Pt.getAdapter;
|
|
1748
1748
|
x.HttpStatusCode = Ie;
|
|
1749
1749
|
x.default = x;
|
|
1750
1750
|
const {
|
|
1751
|
-
Axios:
|
|
1752
|
-
AxiosError:
|
|
1753
|
-
CanceledError:
|
|
1751
|
+
Axios: Ls,
|
|
1752
|
+
AxiosError: Ns,
|
|
1753
|
+
CanceledError: ks,
|
|
1754
1754
|
isCancel: vs,
|
|
1755
|
-
CancelToken:
|
|
1756
|
-
VERSION:
|
|
1757
|
-
all:
|
|
1758
|
-
Cancel:
|
|
1759
|
-
isAxiosError:
|
|
1760
|
-
spread:
|
|
1761
|
-
toFormData:
|
|
1762
|
-
AxiosHeaders:
|
|
1763
|
-
HttpStatusCode:
|
|
1764
|
-
formToJSON:
|
|
1765
|
-
getAdapter:
|
|
1766
|
-
mergeConfig:
|
|
1755
|
+
CancelToken: Bs,
|
|
1756
|
+
VERSION: Ps,
|
|
1757
|
+
all: Us,
|
|
1758
|
+
Cancel: Is,
|
|
1759
|
+
isAxiosError: Fs,
|
|
1760
|
+
spread: Ds,
|
|
1761
|
+
toFormData: Ms,
|
|
1762
|
+
AxiosHeaders: js,
|
|
1763
|
+
HttpStatusCode: $s,
|
|
1764
|
+
formToJSON: qs,
|
|
1765
|
+
getAdapter: zs,
|
|
1766
|
+
mergeConfig: Hs
|
|
1767
1767
|
} = x;
|
|
1768
|
-
class
|
|
1768
|
+
class Ur {
|
|
1769
1769
|
// 30 segundos
|
|
1770
1770
|
constructor() {
|
|
1771
1771
|
Oe(this, "apiUrl");
|
|
@@ -1779,16 +1779,17 @@ class kr {
|
|
|
1779
1779
|
* @throws Error si la síntesis falla
|
|
1780
1780
|
*/
|
|
1781
1781
|
async synthesizeSpeech(t) {
|
|
1782
|
-
var n, r, s, i,
|
|
1782
|
+
var n, r, s, o, i, l, c, u, d;
|
|
1783
1783
|
try {
|
|
1784
1784
|
const {
|
|
1785
1785
|
text: f,
|
|
1786
1786
|
voice: g = "Peter",
|
|
1787
|
-
languageType:
|
|
1787
|
+
languageType: R = "English",
|
|
1788
1788
|
emotion: p,
|
|
1789
|
-
speed:
|
|
1789
|
+
speed: w,
|
|
1790
1790
|
pitch: h,
|
|
1791
|
-
purpose:
|
|
1791
|
+
purpose: S,
|
|
1792
|
+
preset: _
|
|
1792
1793
|
} = t;
|
|
1793
1794
|
if (!f || f.trim().length === 0)
|
|
1794
1795
|
throw new Error("[Qwen TTS] Text cannot be empty");
|
|
@@ -1799,19 +1800,19 @@ class kr {
|
|
|
1799
1800
|
console.log(
|
|
1800
1801
|
`[Qwen TTS] Processing request: text="${f.substring(0, 50)}..." voice=${g}`
|
|
1801
1802
|
);
|
|
1802
|
-
const
|
|
1803
|
+
const T = {
|
|
1803
1804
|
text: f,
|
|
1804
1805
|
voice: g,
|
|
1805
|
-
languageType:
|
|
1806
|
+
languageType: R
|
|
1806
1807
|
};
|
|
1807
|
-
p && (
|
|
1808
|
-
const
|
|
1808
|
+
_ && (T.preset = _, console.log(`[Qwen TTS] Preset: ${_}`)), p && (T.emotion = p, console.log(`[Qwen TTS] Emotion: ${p}`)), w !== void 0 && (T.speed = w, console.log(`[Qwen TTS] Speed: ${w}`)), h !== void 0 && (T.pitch = h, console.log(`[Qwen TTS] Pitch: ${h}`)), S && (T.purpose = S, console.log(`[Qwen TTS] Purpose: ${S}`));
|
|
1809
|
+
const A = T;
|
|
1809
1810
|
console.log(
|
|
1810
1811
|
`[Qwen TTS] Sending request to ${this.apiUrl}/api/v1/tts/audio`
|
|
1811
1812
|
);
|
|
1812
|
-
const
|
|
1813
|
+
const C = (await x.post(
|
|
1813
1814
|
`${this.apiUrl}/api/v1/tts/audio`,
|
|
1814
|
-
|
|
1815
|
+
A,
|
|
1815
1816
|
{
|
|
1816
1817
|
headers: {
|
|
1817
1818
|
"Content-Type": "application/json"
|
|
@@ -1820,12 +1821,12 @@ class kr {
|
|
|
1820
1821
|
timeout: this.timeout
|
|
1821
1822
|
}
|
|
1822
1823
|
)).data;
|
|
1823
|
-
if (!
|
|
1824
|
+
if (!C || C.size === 0)
|
|
1824
1825
|
throw new Error("[Qwen TTS] No audio content received from server");
|
|
1825
1826
|
return console.log(
|
|
1826
|
-
`[Qwen TTS] Successfully received audio (${
|
|
1827
|
+
`[Qwen TTS] Successfully received audio (${C.size} bytes)`
|
|
1827
1828
|
), {
|
|
1828
|
-
audio:
|
|
1829
|
+
audio: C,
|
|
1829
1830
|
mimeType: "audio/wav"
|
|
1830
1831
|
};
|
|
1831
1832
|
} catch (f) {
|
|
@@ -1840,140 +1841,145 @@ class kr {
|
|
|
1840
1841
|
"[Qwen TTS] Request timeout: Qwen TTS service not responding"
|
|
1841
1842
|
);
|
|
1842
1843
|
if (((s = f.response) == null ? void 0 : s.status) === 400) {
|
|
1843
|
-
const
|
|
1844
|
-
throw new Error(`[Qwen TTS] Bad Request: ${
|
|
1844
|
+
const R = ((i = (o = f.response) == null ? void 0 : o.data) == null ? void 0 : i.message) || "Bad request parameters";
|
|
1845
|
+
throw new Error(`[Qwen TTS] Bad Request: ${R}`);
|
|
1845
1846
|
}
|
|
1846
|
-
throw ((
|
|
1847
|
+
throw ((l = f.response) == null ? void 0 : l.status) === 429 ? new Error(
|
|
1847
1848
|
"[Qwen TTS] Rate limit exceeded: Too many requests to Qwen API"
|
|
1848
1849
|
) : f.code === "ERR_NETWORK" ? new Error(
|
|
1849
1850
|
`[Qwen TTS] Network error: Cannot reach Qwen TTS service at ${this.apiUrl}`
|
|
1850
1851
|
) : new Error(
|
|
1851
|
-
`[Qwen TTS] API Error (${(
|
|
1852
|
+
`[Qwen TTS] API Error (${(c = f.response) == null ? void 0 : c.status}): ${((d = (u = f.response) == null ? void 0 : u.data) == null ? void 0 : d.message) || g}`
|
|
1852
1853
|
);
|
|
1853
1854
|
}
|
|
1854
1855
|
throw f;
|
|
1855
1856
|
}
|
|
1856
1857
|
}
|
|
1857
1858
|
}
|
|
1858
|
-
const
|
|
1859
|
-
function
|
|
1860
|
-
const [t, n] =
|
|
1859
|
+
const Ir = new Ur();
|
|
1860
|
+
function Fr(e) {
|
|
1861
|
+
const [t, n] = N({
|
|
1861
1862
|
isPlaying: !1,
|
|
1862
1863
|
isPaused: !1,
|
|
1863
1864
|
progress: 0,
|
|
1864
1865
|
currentPNGTuber: 0,
|
|
1865
1866
|
avatars: e.avatars,
|
|
1866
1867
|
error: null
|
|
1867
|
-
}), [r, s] =
|
|
1868
|
-
|
|
1868
|
+
}), [r, s] = N(e.autoAdvance || !1), [o, i] = N(!1), [, l] = N(0), c = F(null), u = F(null), d = F(r), f = F(!1), g = F(null);
|
|
1869
|
+
M(() => {
|
|
1869
1870
|
d.current = r;
|
|
1870
1871
|
}, [r]);
|
|
1871
|
-
const
|
|
1872
|
+
const R = (m) => {
|
|
1872
1873
|
if (e.avatars.length <= 1) return 0;
|
|
1873
|
-
const
|
|
1874
|
-
return Math.min(Math.floor(
|
|
1874
|
+
const b = e.avatars.length, I = 100 / b;
|
|
1875
|
+
return Math.min(Math.floor(m / I), b - 1);
|
|
1875
1876
|
}, p = () => {
|
|
1876
1877
|
u.current && (clearInterval(u.current), u.current = null);
|
|
1877
|
-
},
|
|
1878
|
-
|
|
1879
|
-
if (
|
|
1880
|
-
const
|
|
1881
|
-
n((
|
|
1882
|
-
...
|
|
1883
|
-
progress: Math.min(
|
|
1884
|
-
currentPNGTuber:
|
|
1878
|
+
}, w = () => {
|
|
1879
|
+
c.current && (u.current = setInterval(() => {
|
|
1880
|
+
if (c.current && c.current.duration) {
|
|
1881
|
+
const m = c.current.currentTime, b = c.current.duration, I = m / b * 100;
|
|
1882
|
+
n((q) => ({
|
|
1883
|
+
...q,
|
|
1884
|
+
progress: Math.min(I, 100),
|
|
1885
|
+
currentPNGTuber: R(I)
|
|
1885
1886
|
}));
|
|
1886
1887
|
}
|
|
1887
1888
|
}, 100));
|
|
1888
1889
|
}, h = () => {
|
|
1889
|
-
var
|
|
1890
|
-
|
|
1891
|
-
},
|
|
1892
|
-
if (
|
|
1890
|
+
var m;
|
|
1891
|
+
c.current && !t.isPaused && (c.current.pause(), p(), n((b) => ({ ...b, isPlaying: !1, isPaused: !0 })), (m = e.onPause) == null || m.call(e));
|
|
1892
|
+
}, S = async () => {
|
|
1893
|
+
if (c.current && t.isPaused)
|
|
1893
1894
|
try {
|
|
1894
|
-
await
|
|
1895
|
-
} catch (
|
|
1896
|
-
console.error("Error al reanudar audio:",
|
|
1897
|
-
...
|
|
1895
|
+
await c.current.play(), w(), n((m) => ({ ...m, isPlaying: !0, isPaused: !1 }));
|
|
1896
|
+
} catch (m) {
|
|
1897
|
+
console.error("Error al reanudar audio:", m), n((b) => ({
|
|
1898
|
+
...b,
|
|
1898
1899
|
error: { type: "audio", message: "Error al reanudar la reproducción" }
|
|
1899
1900
|
}));
|
|
1900
1901
|
}
|
|
1901
|
-
},
|
|
1902
|
-
p(),
|
|
1903
|
-
...
|
|
1902
|
+
}, _ = () => A(!0), T = () => s((m) => !m), A = (m = !1) => {
|
|
1903
|
+
p(), c.current && (g.current && (c.current.removeEventListener("ended", g.current), g.current = null), c.current.removeEventListener("error", L), c.current.removeEventListener("pause", C), c.current.pause(), c.current.currentTime = 0, c.current.src = "", c.current.load(), c.current = null), n((b) => ({
|
|
1904
|
+
...b,
|
|
1904
1905
|
isPlaying: !1,
|
|
1905
1906
|
isPaused: !1,
|
|
1906
1907
|
progress: 0,
|
|
1907
1908
|
currentPNGTuber: 0
|
|
1908
|
-
})), d.current && !f.current && (f.current = !0,
|
|
1909
|
-
var
|
|
1910
|
-
return (
|
|
1909
|
+
})), d.current && !f.current && (f.current = !0, l((b) => b + 1)), m || setTimeout(() => {
|
|
1910
|
+
var b;
|
|
1911
|
+
return (b = e.onStop) == null ? void 0 : b.call(e);
|
|
1911
1912
|
}, 50);
|
|
1912
|
-
},
|
|
1913
|
-
n((
|
|
1914
|
-
...
|
|
1913
|
+
}, L = () => {
|
|
1914
|
+
n((m) => ({
|
|
1915
|
+
...m,
|
|
1915
1916
|
error: { type: "audio", message: "Error al reproducir el audio" }
|
|
1916
|
-
})),
|
|
1917
|
-
},
|
|
1918
|
-
|
|
1919
|
-
},
|
|
1917
|
+
})), A();
|
|
1918
|
+
}, C = () => {
|
|
1919
|
+
c.current && c.current.currentTime < c.current.duration && n((m) => ({ ...m, isPlaying: !1, isPaused: !0 }));
|
|
1920
|
+
}, U = async () => {
|
|
1920
1921
|
if (!e.text.trim()) {
|
|
1921
|
-
n((
|
|
1922
|
-
...
|
|
1922
|
+
n((m) => ({
|
|
1923
|
+
...m,
|
|
1923
1924
|
error: { type: "synthesis", message: "No hay contenido para reproducir" }
|
|
1924
1925
|
}));
|
|
1925
1926
|
return;
|
|
1926
1927
|
}
|
|
1927
|
-
f.current = !1,
|
|
1928
|
+
f.current = !1, A(!0);
|
|
1928
1929
|
try {
|
|
1929
|
-
|
|
1930
|
-
...
|
|
1930
|
+
i(!0), n((Z) => ({
|
|
1931
|
+
...Z,
|
|
1931
1932
|
isPlaying: !1,
|
|
1932
1933
|
progress: 0,
|
|
1933
1934
|
currentPNGTuber: 0,
|
|
1934
1935
|
error: null
|
|
1935
1936
|
}));
|
|
1936
|
-
const b = `qwen-${
|
|
1937
|
-
let
|
|
1938
|
-
|
|
1937
|
+
const m = e.voiceConfig, b = (m == null ? void 0 : m.voice) ?? e.voiceId, I = (m == null ? void 0 : m.languageType) ?? e.lang ?? "Spanish", q = `qwen-${b}-${I}-${(m == null ? void 0 : m.preset) ?? ""}-${(m == null ? void 0 : m.emotion) ?? ""}-${(m == null ? void 0 : m.speed) ?? ""}-${(m == null ? void 0 : m.pitch) ?? ""}-${e.text}`;
|
|
1938
|
+
let D = await nn(q);
|
|
1939
|
+
D ? console.log("[TTS] Cache hit") : (D = (await Ir.synthesizeSpeech({
|
|
1939
1940
|
text: e.text,
|
|
1940
|
-
voice:
|
|
1941
|
-
languageType:
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1941
|
+
voice: b,
|
|
1942
|
+
languageType: I,
|
|
1943
|
+
preset: (m == null ? void 0 : m.preset) ?? void 0,
|
|
1944
|
+
emotion: (m == null ? void 0 : m.emotion) ?? void 0,
|
|
1945
|
+
speed: (m == null ? void 0 : m.speed) ?? void 0,
|
|
1946
|
+
pitch: (m == null ? void 0 : m.pitch) ?? void 0,
|
|
1947
|
+
purpose: (m == null ? void 0 : m.purpose) ?? void 0
|
|
1948
|
+
})).audio, await rn(q, D)), V(D);
|
|
1949
|
+
} catch (m) {
|
|
1950
|
+
console.error("Error al reproducir TTS:", m), n((b) => ({
|
|
1951
|
+
...b,
|
|
1946
1952
|
error: {
|
|
1947
1953
|
type: "network",
|
|
1948
|
-
message: `Error en la síntesis: ${
|
|
1954
|
+
message: `Error en la síntesis: ${m.message}`
|
|
1949
1955
|
},
|
|
1950
1956
|
isPlaying: !1
|
|
1951
|
-
})), p(),
|
|
1957
|
+
})), p(), i(!1);
|
|
1952
1958
|
}
|
|
1953
|
-
},
|
|
1954
|
-
const
|
|
1955
|
-
|
|
1956
|
-
const
|
|
1957
|
-
|
|
1959
|
+
}, V = (m) => {
|
|
1960
|
+
const b = URL.createObjectURL(m);
|
|
1961
|
+
c.current = new Audio(b);
|
|
1962
|
+
const I = () => {
|
|
1963
|
+
A(!1), URL.revokeObjectURL(b);
|
|
1958
1964
|
};
|
|
1959
|
-
g.current =
|
|
1960
|
-
var
|
|
1961
|
-
|
|
1965
|
+
g.current = I, c.current.addEventListener("ended", I), c.current.addEventListener("error", L), c.current.addEventListener("pause", C), c.current.addEventListener("canplaythrough", async () => {
|
|
1966
|
+
var q;
|
|
1967
|
+
i(!1), n((D) => ({ ...D, isPlaying: !0 })), w();
|
|
1962
1968
|
try {
|
|
1963
|
-
await ((
|
|
1964
|
-
} catch (
|
|
1965
|
-
console.error("Error al iniciar reproducción:",
|
|
1966
|
-
...
|
|
1969
|
+
await ((q = c.current) == null ? void 0 : q.play());
|
|
1970
|
+
} catch (D) {
|
|
1971
|
+
console.error("Error al iniciar reproducción:", D), n((Z) => ({
|
|
1972
|
+
...Z,
|
|
1967
1973
|
error: { type: "audio", message: "Error al iniciar la reproducción" }
|
|
1968
|
-
})),
|
|
1974
|
+
})), A();
|
|
1969
1975
|
}
|
|
1970
1976
|
});
|
|
1971
1977
|
};
|
|
1972
|
-
return
|
|
1973
|
-
p(),
|
|
1974
|
-
}, []),
|
|
1975
|
-
e.voiceId && (
|
|
1976
|
-
...
|
|
1978
|
+
return M(() => () => {
|
|
1979
|
+
p(), c.current && (c.current.pause(), c.current.src = "", c.current.load(), c.current = null);
|
|
1980
|
+
}, []), M(() => {
|
|
1981
|
+
e.voiceId && (c.current && (c.current.pause(), c.current.src = "", c.current.load(), c.current = null), p(), n((m) => ({
|
|
1982
|
+
...m,
|
|
1977
1983
|
isPlaying: !1,
|
|
1978
1984
|
isPaused: !1,
|
|
1979
1985
|
progress: 0,
|
|
@@ -1981,41 +1987,41 @@ function Pr(e) {
|
|
|
1981
1987
|
})));
|
|
1982
1988
|
}, [e.voiceId]), {
|
|
1983
1989
|
...t,
|
|
1984
|
-
play:
|
|
1990
|
+
play: U,
|
|
1985
1991
|
pause: h,
|
|
1986
|
-
resume:
|
|
1987
|
-
stop:
|
|
1988
|
-
toggleAutoAdvance:
|
|
1992
|
+
resume: S,
|
|
1993
|
+
stop: _,
|
|
1994
|
+
toggleAutoAdvance: T,
|
|
1989
1995
|
isAutoAdvancing: r,
|
|
1990
|
-
isLoadingAudio:
|
|
1996
|
+
isLoadingAudio: o,
|
|
1991
1997
|
avatars: e.avatars
|
|
1992
1998
|
};
|
|
1993
1999
|
}
|
|
1994
|
-
const
|
|
1995
|
-
selectorWrapper:
|
|
1996
|
-
iconButton:
|
|
1997
|
-
dropdown:
|
|
1998
|
-
dropdownItem:
|
|
1999
|
-
active:
|
|
2000
|
-
},
|
|
2000
|
+
const Dr = "_selectorWrapper_1kmif_1", Mr = "_iconButton_1kmif_6", jr = "_dropdown_1kmif_18", $r = "_dropdownItem_1kmif_31", qr = "_active_1kmif_44", se = {
|
|
2001
|
+
selectorWrapper: Dr,
|
|
2002
|
+
iconButton: Mr,
|
|
2003
|
+
dropdown: jr,
|
|
2004
|
+
dropdownItem: $r,
|
|
2005
|
+
active: qr
|
|
2006
|
+
}, zr = ({
|
|
2001
2007
|
languages: e,
|
|
2002
2008
|
current: t,
|
|
2003
2009
|
onChange: n
|
|
2004
2010
|
}) => {
|
|
2005
|
-
const [r, s] =
|
|
2006
|
-
return
|
|
2007
|
-
const
|
|
2008
|
-
|
|
2011
|
+
const [r, s] = N(!1), [o, i] = N(t || e[0].code), l = F(null);
|
|
2012
|
+
return M(() => {
|
|
2013
|
+
const c = (u) => {
|
|
2014
|
+
l.current && !l.current.contains(u.target) && s(!1);
|
|
2009
2015
|
};
|
|
2010
|
-
return document.addEventListener("mousedown",
|
|
2011
|
-
}, []), /* @__PURE__ */
|
|
2012
|
-
/* @__PURE__ */
|
|
2016
|
+
return document.addEventListener("mousedown", c), () => document.removeEventListener("mousedown", c);
|
|
2017
|
+
}, []), /* @__PURE__ */ H("div", { className: se.selectorWrapper, ref: l, children: [
|
|
2018
|
+
/* @__PURE__ */ E(
|
|
2013
2019
|
"button",
|
|
2014
2020
|
{
|
|
2015
|
-
className:
|
|
2021
|
+
className: se.iconButton,
|
|
2016
2022
|
title: "Cambiar idioma",
|
|
2017
2023
|
onClick: () => s(!r),
|
|
2018
|
-
children: /* @__PURE__ */
|
|
2024
|
+
children: /* @__PURE__ */ E(
|
|
2019
2025
|
"svg",
|
|
2020
2026
|
{
|
|
2021
2027
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2023,78 +2029,79 @@ const Ur = "_selectorWrapper_1kmif_1", Ir = "_iconButton_1kmif_6", Fr = "_dropdo
|
|
|
2023
2029
|
width: "30px",
|
|
2024
2030
|
height: "30px",
|
|
2025
2031
|
viewBox: "0 0 24 24",
|
|
2026
|
-
children: /* @__PURE__ */
|
|
2032
|
+
children: /* @__PURE__ */ E("path", { d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z" })
|
|
2027
2033
|
}
|
|
2028
2034
|
)
|
|
2029
2035
|
}
|
|
2030
2036
|
),
|
|
2031
|
-
r && /* @__PURE__ */
|
|
2037
|
+
r && /* @__PURE__ */ E("div", { className: se.dropdown, children: e.map((c) => /* @__PURE__ */ E(
|
|
2032
2038
|
"button",
|
|
2033
2039
|
{
|
|
2034
|
-
className: `${
|
|
2040
|
+
className: `${se.dropdownItem} ${c.code === o ? se.active : ""}`,
|
|
2035
2041
|
onClick: () => {
|
|
2036
|
-
|
|
2042
|
+
i(c.code), n == null || n(c.code), s(!1);
|
|
2037
2043
|
},
|
|
2038
|
-
children:
|
|
2044
|
+
children: c.label
|
|
2039
2045
|
},
|
|
2040
|
-
|
|
2046
|
+
c.code
|
|
2041
2047
|
)) })
|
|
2042
2048
|
] });
|
|
2043
|
-
},
|
|
2044
|
-
controlsRow:
|
|
2045
|
-
select:
|
|
2046
|
-
autoAdvanceButton:
|
|
2047
|
-
section:
|
|
2048
|
-
textarea:
|
|
2049
|
-
input:
|
|
2050
|
-
error:
|
|
2051
|
-
buttonPrimary:
|
|
2052
|
-
buttonSuccess:
|
|
2053
|
-
infoBox:
|
|
2054
|
-
viewer:
|
|
2055
|
-
viewerTopBar:
|
|
2056
|
-
topRightControls:
|
|
2057
|
-
itemCounter:
|
|
2058
|
-
iconButton:
|
|
2059
|
-
navButton:
|
|
2060
|
-
navButtonLeft:
|
|
2061
|
-
navButtonRight:
|
|
2062
|
-
backgroundImage:
|
|
2063
|
-
avatar:
|
|
2064
|
-
caption:
|
|
2065
|
-
captionTitle:
|
|
2066
|
-
captionText:
|
|
2067
|
-
loadingOverlay:
|
|
2068
|
-
loadingSpinner:
|
|
2069
|
-
spin:
|
|
2070
|
-
loadingButton:
|
|
2071
|
-
spinner:
|
|
2072
|
-
progressBar:
|
|
2073
|
-
progressFill:
|
|
2074
|
-
playbackControls:
|
|
2075
|
-
playButton:
|
|
2076
|
-
pauseButton:
|
|
2077
|
-
},
|
|
2049
|
+
}, Hr = "_controlsRow_8wakc_1", Vr = "_select_8wakc_9", Wr = "_autoAdvanceButton_8wakc_15", Gr = "_section_8wakc_26", Jr = "_textarea_8wakc_36", Qr = "_input_8wakc_46", Kr = "_error_8wakc_54", Xr = "_buttonPrimary_8wakc_59", Zr = "_buttonSuccess_8wakc_69", Yr = "_infoBox_8wakc_78", es = "_viewer_8wakc_86", ts = "_viewerTopBar_8wakc_97", ns = "_topRightControls_8wakc_110", rs = "_itemCounter_8wakc_118", ss = "_iconButton_8wakc_126", os = "_navButton_8wakc_146", is = "_navButtonLeft_8wakc_163", as = "_navButtonRight_8wakc_167", cs = "_backgroundImage_8wakc_171", ls = "_avatar_8wakc_178", us = "_caption_8wakc_188", ds = "_captionTitle_8wakc_201", fs = "_captionText_8wakc_211", ps = "_loadingOverlay_8wakc_217", hs = "_loadingSpinner_8wakc_232", ms = "_spin_8wakc_251", ws = "_loadingButton_8wakc_242", gs = "_spinner_8wakc_251", ys = "_progressBar_8wakc_264", Es = "_progressFill_8wakc_273", bs = "_playbackControls_8wakc_279", Ts = "_playButton_8wakc_292", Ss = "_pauseButton_8wakc_293", O = {
|
|
2050
|
+
controlsRow: Hr,
|
|
2051
|
+
select: Vr,
|
|
2052
|
+
autoAdvanceButton: Wr,
|
|
2053
|
+
section: Gr,
|
|
2054
|
+
textarea: Jr,
|
|
2055
|
+
input: Qr,
|
|
2056
|
+
error: Kr,
|
|
2057
|
+
buttonPrimary: Xr,
|
|
2058
|
+
buttonSuccess: Zr,
|
|
2059
|
+
infoBox: Yr,
|
|
2060
|
+
viewer: es,
|
|
2061
|
+
viewerTopBar: ts,
|
|
2062
|
+
topRightControls: ns,
|
|
2063
|
+
itemCounter: rs,
|
|
2064
|
+
iconButton: ss,
|
|
2065
|
+
navButton: os,
|
|
2066
|
+
navButtonLeft: is,
|
|
2067
|
+
navButtonRight: as,
|
|
2068
|
+
backgroundImage: cs,
|
|
2069
|
+
avatar: ls,
|
|
2070
|
+
caption: us,
|
|
2071
|
+
captionTitle: ds,
|
|
2072
|
+
captionText: fs,
|
|
2073
|
+
loadingOverlay: ps,
|
|
2074
|
+
loadingSpinner: hs,
|
|
2075
|
+
spin: ms,
|
|
2076
|
+
loadingButton: ws,
|
|
2077
|
+
spinner: gs,
|
|
2078
|
+
progressBar: ys,
|
|
2079
|
+
progressFill: Es,
|
|
2080
|
+
playbackControls: bs,
|
|
2081
|
+
playButton: Ts,
|
|
2082
|
+
pauseButton: Ss
|
|
2083
|
+
}, Vs = [
|
|
2078
2084
|
{ id: "Ebona", name: "Voz Mujer" },
|
|
2079
2085
|
{ id: "Bodega", name: "Voz Hombre" },
|
|
2080
2086
|
{ id: "Peter", name: "Voz Narrador" }
|
|
2081
|
-
],
|
|
2087
|
+
], dt = we.DEFAULT_IMAGE_URL, Ws = ({
|
|
2082
2088
|
heritageItems: e = [],
|
|
2083
2089
|
targetLanguage: t = "es",
|
|
2084
2090
|
descriptionLength: n = "extended",
|
|
2085
2091
|
autoAdvance: r = !1,
|
|
2086
|
-
|
|
2092
|
+
voiceConfigs: s = [],
|
|
2093
|
+
voiceIds: o = [],
|
|
2087
2094
|
avatars: i = []
|
|
2088
2095
|
}) => {
|
|
2089
|
-
const [
|
|
2096
|
+
const [l] = N(e), [c, u] = N(0), [d, f] = N(n), [g, R] = N(
|
|
2090
2097
|
t
|
|
2091
|
-
), [
|
|
2092
|
-
|
|
2093
|
-
), b =
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
}, [
|
|
2097
|
-
const
|
|
2098
|
+
), [p, w] = N(""), [h, S] = N([]), [_, T] = N(0), [A, L] = N(r), [C, U] = N(!1), [V, m] = N(
|
|
2099
|
+
o.length > 0 ? o[0] : ""
|
|
2100
|
+
), b = s.length > 0 ? s.map((k) => k.voice) : o, I = V || (b.length > 0 ? b[c % b.length] : ""), q = s.length > 0 ? s[c % s.length] : void 0, D = i[c % i.length], [Z, $e] = N(!1), [Dt, qe] = N(!1), [Mt, ce] = N(!0), G = F(null), ze = F(A), He = F(c), Re = F(l), J = F(null), le = F(!1);
|
|
2101
|
+
M(() => {
|
|
2102
|
+
ze.current = A, He.current = c, Re.current = l;
|
|
2103
|
+
}, [A, c, l]);
|
|
2104
|
+
const Y = l[c] || {
|
|
2098
2105
|
id: "default",
|
|
2099
2106
|
name: "Patrimonio Cultural",
|
|
2100
2107
|
description: {
|
|
@@ -2105,111 +2112,112 @@ const Ur = "_selectorWrapper_1kmif_1", Ir = "_iconButton_1kmif_6", Fr = "_dropdo
|
|
|
2105
2112
|
},
|
|
2106
2113
|
imageUrl: ""
|
|
2107
2114
|
}, {
|
|
2108
|
-
isPlaying:
|
|
2109
|
-
isPaused:
|
|
2110
|
-
isLoadingAudio:
|
|
2111
|
-
progress:
|
|
2112
|
-
play:
|
|
2113
|
-
pause:
|
|
2114
|
-
resume:
|
|
2115
|
-
stop:
|
|
2116
|
-
} =
|
|
2117
|
-
text:
|
|
2118
|
-
lang:
|
|
2115
|
+
isPlaying: W,
|
|
2116
|
+
isPaused: Ve,
|
|
2117
|
+
isLoadingAudio: jt,
|
|
2118
|
+
progress: We,
|
|
2119
|
+
play: $t,
|
|
2120
|
+
pause: qt,
|
|
2121
|
+
resume: zt,
|
|
2122
|
+
stop: Ht
|
|
2123
|
+
} = Fr({
|
|
2124
|
+
text: p,
|
|
2125
|
+
lang: g,
|
|
2126
|
+
voiceConfig: q,
|
|
2119
2127
|
onStop: () => {
|
|
2120
|
-
ce(!0),
|
|
2121
|
-
|
|
2122
|
-
const k = (
|
|
2123
|
-
|
|
2128
|
+
ce(!0), ze.current && Re.current.length > 1 && !le.current && setTimeout(() => {
|
|
2129
|
+
U(!0);
|
|
2130
|
+
const k = (He.current + 1) % Re.current.length;
|
|
2131
|
+
u(k);
|
|
2124
2132
|
}, 100), le.current = !1;
|
|
2125
2133
|
},
|
|
2126
|
-
voiceId:
|
|
2127
|
-
avatars: [
|
|
2134
|
+
voiceId: I,
|
|
2135
|
+
avatars: [D]
|
|
2128
2136
|
});
|
|
2129
|
-
|
|
2130
|
-
if (
|
|
2137
|
+
M(() => {
|
|
2138
|
+
if (C && p && !p.includes("JSON válido")) {
|
|
2131
2139
|
const k = setTimeout(() => {
|
|
2132
|
-
|
|
2140
|
+
W || Ge(), U(!1);
|
|
2133
2141
|
}, 500);
|
|
2134
2142
|
return () => clearTimeout(k);
|
|
2135
2143
|
}
|
|
2136
|
-
}, [
|
|
2144
|
+
}, [C, p, W]), M(() => {
|
|
2137
2145
|
(async () => {
|
|
2138
|
-
const
|
|
2139
|
-
if (
|
|
2146
|
+
const z = Y.description.local[d];
|
|
2147
|
+
if (z)
|
|
2140
2148
|
try {
|
|
2141
|
-
const
|
|
2142
|
-
|
|
2143
|
-
} catch (
|
|
2144
|
-
console.error("Error en traducción:",
|
|
2149
|
+
const ne = await Xe(Y.name, g), Qt = await Xe(z, g);
|
|
2150
|
+
w(`${ne}. ${Qt}`);
|
|
2151
|
+
} catch (ne) {
|
|
2152
|
+
console.error("Error en traducción:", ne), w(`${Y.name}. ${z}`);
|
|
2145
2153
|
}
|
|
2146
2154
|
})();
|
|
2147
|
-
}, [
|
|
2155
|
+
}, [Y, d, g]);
|
|
2148
2156
|
const Ae = () => {
|
|
2149
|
-
ce(!0),
|
|
2157
|
+
ce(!0), J.current && clearTimeout(J.current), J.current = setTimeout(() => {
|
|
2150
2158
|
ce(!1);
|
|
2151
2159
|
}, 4e3);
|
|
2152
|
-
},
|
|
2153
|
-
if (!
|
|
2160
|
+
}, Ge = () => {
|
|
2161
|
+
if (!p.trim() || p.includes("JSON válido")) {
|
|
2154
2162
|
alert("No hay contenido para reproducir");
|
|
2155
2163
|
return;
|
|
2156
2164
|
}
|
|
2157
|
-
|
|
2158
|
-
}, qt = () => {
|
|
2159
|
-
Mt();
|
|
2160
|
-
}, zt = () => {
|
|
2161
|
-
jt(), Ae();
|
|
2162
|
-
}, We = () => {
|
|
2163
|
-
$t(), N(!1), W.current && clearTimeout(W.current), G.current && clearTimeout(G.current), ce(!0);
|
|
2164
|
-
}, Ht = () => {
|
|
2165
|
-
le.current = !0, We(), c > 0 && l((k) => k - 1);
|
|
2165
|
+
$t(), Ae();
|
|
2166
2166
|
}, Vt = () => {
|
|
2167
|
-
|
|
2167
|
+
qt();
|
|
2168
|
+
}, Wt = () => {
|
|
2169
|
+
zt(), Ae();
|
|
2170
|
+
}, Je = () => {
|
|
2171
|
+
Ht(), U(!1), G.current && clearTimeout(G.current), J.current && clearTimeout(J.current), ce(!0);
|
|
2172
|
+
}, Gt = () => {
|
|
2173
|
+
le.current = !0, Je(), c > 0 && u((k) => k - 1);
|
|
2174
|
+
}, Jt = () => {
|
|
2175
|
+
le.current = !0, Je(), c < l.length - 1 && u((k) => k + 1);
|
|
2168
2176
|
};
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
}, []),
|
|
2172
|
-
if (
|
|
2173
|
-
const k =
|
|
2174
|
-
|
|
2177
|
+
M(() => () => {
|
|
2178
|
+
G.current && clearTimeout(G.current), J.current && clearTimeout(J.current);
|
|
2179
|
+
}, []), M(() => {
|
|
2180
|
+
if (p) {
|
|
2181
|
+
const k = p.split(new RegExp("(?<=[.!?])\\s+", "g")).map((z) => z.trim()).filter((z) => z.length > 0);
|
|
2182
|
+
S(k), T(0);
|
|
2175
2183
|
}
|
|
2176
|
-
}, [
|
|
2177
|
-
if (!
|
|
2178
|
-
|
|
2179
|
-
const
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
},
|
|
2183
|
-
}, [
|
|
2184
|
-
const [
|
|
2185
|
-
return
|
|
2186
|
-
!
|
|
2187
|
-
}, [c,
|
|
2184
|
+
}, [p]), M(() => {
|
|
2185
|
+
if (!W || h.length === 0) return;
|
|
2186
|
+
G.current && clearTimeout(G.current);
|
|
2187
|
+
const z = 1500 + h[_].length * 50;
|
|
2188
|
+
G.current = setTimeout(() => {
|
|
2189
|
+
T((ne) => (ne + 1) % h.length);
|
|
2190
|
+
}, z);
|
|
2191
|
+
}, [W, h, _]);
|
|
2192
|
+
const [Qe, _s] = N(!1);
|
|
2193
|
+
return M(() => {
|
|
2194
|
+
!Qe && b.length > 0 && m(b[c % b.length]);
|
|
2195
|
+
}, [c, b, Qe]), /* @__PURE__ */ H("div", { children: [
|
|
2188
2196
|
we.DEBUG_MODE,
|
|
2189
|
-
/* @__PURE__ */
|
|
2190
|
-
/* @__PURE__ */
|
|
2191
|
-
/* @__PURE__ */
|
|
2192
|
-
/* @__PURE__ */
|
|
2193
|
-
/* @__PURE__ */
|
|
2197
|
+
/* @__PURE__ */ H("div", { className: O.viewer, onClick: Ae, children: [
|
|
2198
|
+
/* @__PURE__ */ H("div", { className: O.viewerTopBar, children: [
|
|
2199
|
+
/* @__PURE__ */ E("div", { className: O.itemCounter, children: l.length > 0 ? `${c + 1}/${l.length}` : "0/0" }),
|
|
2200
|
+
/* @__PURE__ */ H("div", { className: O.topRightControls, children: [
|
|
2201
|
+
/* @__PURE__ */ E(
|
|
2194
2202
|
"button",
|
|
2195
2203
|
{
|
|
2196
|
-
onClick: () =>
|
|
2204
|
+
onClick: () => L(!A),
|
|
2197
2205
|
className: O.iconButton,
|
|
2198
2206
|
title: "Autoplay",
|
|
2199
2207
|
style: {
|
|
2200
|
-
backgroundColor:
|
|
2208
|
+
backgroundColor: A ? "rgba(255, 255, 255, 0.7)" : "rgba(0, 0, 0, 0.7)"
|
|
2201
2209
|
},
|
|
2202
|
-
children: /* @__PURE__ */
|
|
2210
|
+
children: /* @__PURE__ */ E(
|
|
2203
2211
|
"svg",
|
|
2204
2212
|
{
|
|
2205
2213
|
width: "20px",
|
|
2206
2214
|
height: "20px",
|
|
2207
2215
|
viewBox: "0 0 16 16",
|
|
2208
2216
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2209
|
-
children: /* @__PURE__ */
|
|
2217
|
+
children: /* @__PURE__ */ E(
|
|
2210
2218
|
"path",
|
|
2211
2219
|
{
|
|
2212
|
-
style: { fill:
|
|
2220
|
+
style: { fill: A ? "black" : "white" },
|
|
2213
2221
|
d: "M5.23331,0.493645 C6.8801,-0.113331 8.6808,-0.161915 10.3579,0.355379 C11.4019,0.6773972 12.361984,1.20757325 13.1838415,1.90671757 L13.4526,2.14597 L14.2929,1.30564 C14.8955087,0.703065739 15.9071843,1.0850774 15.994017,1.89911843 L16,2.01275 L16,6.00002 L12.0127,6.00002 C11.1605348,6.00002 10.7153321,5.01450817 11.2294893,4.37749065 L11.3056,4.29291 L12.0372,3.56137 C11.389,2.97184 10.6156,2.52782 9.76845,2.26653 C8.5106,1.87856 7.16008,1.915 5.92498,2.37023 C4.68989,2.82547 3.63877,3.67423 2.93361,4.78573 C2.22844,5.89723 1.90836,7.20978 2.02268,8.52112 C2.13701,9.83246 2.6794,11.0698 3.56627,12.0425 C4.45315,13.0152 5.63528,13.6693 6.93052,13.9039 C8.22576,14.1385 9.56221,13.9407 10.7339,13.3409 C11.9057,12.7412 12.8476,11.7727 13.4147,10.5848 C13.6526,10.0864 14.2495,9.8752 14.748,10.1131 C15.2464,10.351 15.4575,10.948 15.2196,11.4464 C14.4635,13.0302 13.2076,14.3215 11.6453,15.1213 C10.0829,15.921 8.30101,16.1847 6.57402,15.8719 C4.84704,15.559 3.27086,14.687 2.08836,13.39 C0.905861,12.0931 0.182675,10.4433 0.0302394,8.69483 C-0.122195,6.94637 0.304581,5.1963 1.2448,3.7143 C2.18503,2.2323 3.58652,1.10062 5.23331,0.493645 Z M6,5.46077 C6,5.09472714 6.37499031,4.86235811 6.69509872,5.0000726 L6.7678,5.03853 L10.7714,7.57776 C11.0528545,7.75626909 11.0784413,8.14585256 10.8481603,8.36273881 L10.7714,8.42224 L6.7678,10.9615 C6.45867857,11.1575214 6.06160816,10.965274 6.00646097,10.6211914 L6,10.5392 L6,5.46077 Z"
|
|
2214
2222
|
}
|
|
2215
2223
|
)
|
|
@@ -2217,8 +2225,8 @@ const Ur = "_selectorWrapper_1kmif_1", Ir = "_iconButton_1kmif_6", Fr = "_dropdo
|
|
|
2217
2225
|
)
|
|
2218
2226
|
}
|
|
2219
2227
|
),
|
|
2220
|
-
/* @__PURE__ */
|
|
2221
|
-
|
|
2228
|
+
/* @__PURE__ */ E(
|
|
2229
|
+
zr,
|
|
2222
2230
|
{
|
|
2223
2231
|
languages: [
|
|
2224
2232
|
{ code: "es", label: "Español" },
|
|
@@ -2226,21 +2234,21 @@ const Ur = "_selectorWrapper_1kmif_1", Ir = "_iconButton_1kmif_6", Fr = "_dropdo
|
|
|
2226
2234
|
{ code: "fr", label: "Français" }
|
|
2227
2235
|
],
|
|
2228
2236
|
current: "es",
|
|
2229
|
-
onChange: (k) =>
|
|
2237
|
+
onChange: (k) => R(k)
|
|
2230
2238
|
}
|
|
2231
2239
|
)
|
|
2232
2240
|
] })
|
|
2233
2241
|
] }),
|
|
2234
|
-
/* @__PURE__ */
|
|
2242
|
+
/* @__PURE__ */ E(
|
|
2235
2243
|
"button",
|
|
2236
2244
|
{
|
|
2237
|
-
onClick:
|
|
2238
|
-
disabled:
|
|
2245
|
+
onClick: Gt,
|
|
2246
|
+
disabled: l.length === 0,
|
|
2239
2247
|
className: `${O.navButton} ${O.navButtonLeft}`,
|
|
2240
2248
|
title: "Anterior",
|
|
2241
|
-
onMouseOver: () =>
|
|
2242
|
-
onMouseOut: () =>
|
|
2243
|
-
children: /* @__PURE__ */
|
|
2249
|
+
onMouseOver: () => $e(!0),
|
|
2250
|
+
onMouseOut: () => $e(!1),
|
|
2251
|
+
children: /* @__PURE__ */ E(
|
|
2244
2252
|
"svg",
|
|
2245
2253
|
{
|
|
2246
2254
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2256,23 +2264,23 @@ const Ur = "_selectorWrapper_1kmif_1", Ir = "_iconButton_1kmif_6", Fr = "_dropdo
|
|
|
2256
2264
|
width: "24px",
|
|
2257
2265
|
height: "24px",
|
|
2258
2266
|
transition: "transform 0.2s ease-in-out",
|
|
2259
|
-
transform:
|
|
2267
|
+
transform: Z ? "scale(1.5)" : "scale(1)"
|
|
2260
2268
|
},
|
|
2261
|
-
children: /* @__PURE__ */
|
|
2269
|
+
children: /* @__PURE__ */ E("path", { d: "M15 18l-6-6 6-6" })
|
|
2262
2270
|
}
|
|
2263
2271
|
)
|
|
2264
2272
|
}
|
|
2265
2273
|
),
|
|
2266
|
-
/* @__PURE__ */
|
|
2274
|
+
/* @__PURE__ */ E(
|
|
2267
2275
|
"button",
|
|
2268
2276
|
{
|
|
2269
|
-
onClick:
|
|
2270
|
-
disabled:
|
|
2277
|
+
onClick: Jt,
|
|
2278
|
+
disabled: l.length === 0,
|
|
2271
2279
|
className: `${O.navButton} ${O.navButtonRight}`,
|
|
2272
2280
|
title: "Siguiente",
|
|
2273
|
-
onMouseOver: () =>
|
|
2274
|
-
onMouseOut: () =>
|
|
2275
|
-
children: /* @__PURE__ */
|
|
2281
|
+
onMouseOver: () => qe(!0),
|
|
2282
|
+
onMouseOut: () => qe(!1),
|
|
2283
|
+
children: /* @__PURE__ */ E(
|
|
2276
2284
|
"svg",
|
|
2277
2285
|
{
|
|
2278
2286
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2288,43 +2296,43 @@ const Ur = "_selectorWrapper_1kmif_1", Ir = "_iconButton_1kmif_6", Fr = "_dropdo
|
|
|
2288
2296
|
width: "24px",
|
|
2289
2297
|
height: "24px",
|
|
2290
2298
|
transition: "transform 0.2s ease-in-out",
|
|
2291
|
-
transform:
|
|
2299
|
+
transform: Dt ? "scale(1.5)" : "scale(1)"
|
|
2292
2300
|
},
|
|
2293
|
-
children: /* @__PURE__ */
|
|
2301
|
+
children: /* @__PURE__ */ E("path", { d: "M9 6l6 6-6 6" })
|
|
2294
2302
|
}
|
|
2295
2303
|
)
|
|
2296
2304
|
}
|
|
2297
2305
|
),
|
|
2298
|
-
/* @__PURE__ */
|
|
2306
|
+
/* @__PURE__ */ E(
|
|
2299
2307
|
"img",
|
|
2300
2308
|
{
|
|
2301
|
-
src:
|
|
2309
|
+
src: Y.imageUrl || dt,
|
|
2302
2310
|
alt: "Background",
|
|
2303
2311
|
className: O.backgroundImage,
|
|
2304
|
-
style: { opacity:
|
|
2305
|
-
onError: (k) => k.currentTarget.src =
|
|
2312
|
+
style: { opacity: W ? 1 : 0.7 },
|
|
2313
|
+
onError: (k) => k.currentTarget.src = dt
|
|
2306
2314
|
}
|
|
2307
2315
|
),
|
|
2308
|
-
|
|
2316
|
+
W && /* @__PURE__ */ E(Ke, { children: /* @__PURE__ */ E(
|
|
2309
2317
|
"img",
|
|
2310
2318
|
{
|
|
2311
|
-
src:
|
|
2319
|
+
src: D,
|
|
2312
2320
|
alt: "Avatar",
|
|
2313
2321
|
className: O.avatar,
|
|
2314
|
-
style: { transform: `scale(${
|
|
2322
|
+
style: { transform: `scale(${We % 10 < 5 ? 4 : 4.05})` }
|
|
2315
2323
|
}
|
|
2316
2324
|
) }),
|
|
2317
|
-
/* @__PURE__ */
|
|
2318
|
-
/* @__PURE__ */
|
|
2319
|
-
|
|
2325
|
+
/* @__PURE__ */ H("div", { className: O.caption, children: [
|
|
2326
|
+
/* @__PURE__ */ E("h4", { className: O.captionTitle, children: Y.name }),
|
|
2327
|
+
W && /* @__PURE__ */ E(Ke, { children: /* @__PURE__ */ E("p", { className: O.captionText, children: h.length > 0 && h[_] }) })
|
|
2320
2328
|
] }),
|
|
2321
|
-
|
|
2322
|
-
/* @__PURE__ */
|
|
2323
|
-
/* @__PURE__ */
|
|
2329
|
+
C && /* @__PURE__ */ H("div", { className: O.loadingOverlay, children: [
|
|
2330
|
+
/* @__PURE__ */ E("div", { className: O.loadingSpinner }),
|
|
2331
|
+
/* @__PURE__ */ E("p", { children: "Cargando siguiente patrimonio..." })
|
|
2324
2332
|
] }),
|
|
2325
|
-
|
|
2333
|
+
Mt && /* @__PURE__ */ E("div", { className: O.playbackControls, children: jt ? (
|
|
2326
2334
|
// Loading spinner
|
|
2327
|
-
/* @__PURE__ */
|
|
2335
|
+
/* @__PURE__ */ E("button", { disabled: !0, className: O.loadingButton, children: /* @__PURE__ */ H(
|
|
2328
2336
|
"svg",
|
|
2329
2337
|
{
|
|
2330
2338
|
className: O.spinner,
|
|
@@ -2332,7 +2340,7 @@ const Ur = "_selectorWrapper_1kmif_1", Ir = "_iconButton_1kmif_6", Fr = "_dropdo
|
|
|
2332
2340
|
fill: "none",
|
|
2333
2341
|
viewBox: "0 0 24 24",
|
|
2334
2342
|
children: [
|
|
2335
|
-
/* @__PURE__ */
|
|
2343
|
+
/* @__PURE__ */ E(
|
|
2336
2344
|
"circle",
|
|
2337
2345
|
{
|
|
2338
2346
|
className: "opacity-25",
|
|
@@ -2343,7 +2351,7 @@ const Ur = "_selectorWrapper_1kmif_1", Ir = "_iconButton_1kmif_6", Fr = "_dropdo
|
|
|
2343
2351
|
strokeWidth: "4"
|
|
2344
2352
|
}
|
|
2345
2353
|
),
|
|
2346
|
-
/* @__PURE__ */
|
|
2354
|
+
/* @__PURE__ */ E(
|
|
2347
2355
|
"path",
|
|
2348
2356
|
{
|
|
2349
2357
|
className: "opacity-75",
|
|
@@ -2354,15 +2362,15 @@ const Ur = "_selectorWrapper_1kmif_1", Ir = "_iconButton_1kmif_6", Fr = "_dropdo
|
|
|
2354
2362
|
]
|
|
2355
2363
|
}
|
|
2356
2364
|
) })
|
|
2357
|
-
) : !
|
|
2365
|
+
) : !W && !Ve ? (
|
|
2358
2366
|
// Play (desde cero)
|
|
2359
|
-
/* @__PURE__ */
|
|
2367
|
+
/* @__PURE__ */ E(
|
|
2360
2368
|
"button",
|
|
2361
2369
|
{
|
|
2362
|
-
onClick:
|
|
2363
|
-
disabled:
|
|
2370
|
+
onClick: Ge,
|
|
2371
|
+
disabled: l.length === 0 || C,
|
|
2364
2372
|
className: O.playButton,
|
|
2365
|
-
children: /* @__PURE__ */
|
|
2373
|
+
children: /* @__PURE__ */ E(
|
|
2366
2374
|
"svg",
|
|
2367
2375
|
{
|
|
2368
2376
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2374,14 +2382,14 @@ const Ur = "_selectorWrapper_1kmif_1", Ir = "_iconButton_1kmif_6", Fr = "_dropdo
|
|
|
2374
2382
|
strokeWidth: "2",
|
|
2375
2383
|
strokeLinecap: "round",
|
|
2376
2384
|
strokeLinejoin: "round",
|
|
2377
|
-
children: /* @__PURE__ */
|
|
2385
|
+
children: /* @__PURE__ */ E("path", { d: "M9 8.5 L9 15.5 L16 12 Z" })
|
|
2378
2386
|
}
|
|
2379
2387
|
)
|
|
2380
2388
|
}
|
|
2381
2389
|
)
|
|
2382
|
-
) :
|
|
2390
|
+
) : Ve ? (
|
|
2383
2391
|
// Resume
|
|
2384
|
-
/* @__PURE__ */
|
|
2392
|
+
/* @__PURE__ */ E("button", { onClick: Wt, className: O.playButton, children: /* @__PURE__ */ E(
|
|
2385
2393
|
"svg",
|
|
2386
2394
|
{
|
|
2387
2395
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2393,12 +2401,12 @@ const Ur = "_selectorWrapper_1kmif_1", Ir = "_iconButton_1kmif_6", Fr = "_dropdo
|
|
|
2393
2401
|
strokeWidth: "2",
|
|
2394
2402
|
strokeLinecap: "round",
|
|
2395
2403
|
strokeLinejoin: "round",
|
|
2396
|
-
children: /* @__PURE__ */
|
|
2404
|
+
children: /* @__PURE__ */ E("path", { d: "M9 8.5 L9 15.5 L16 12 Z" })
|
|
2397
2405
|
}
|
|
2398
2406
|
) })
|
|
2399
2407
|
) : (
|
|
2400
2408
|
// Pause
|
|
2401
|
-
/* @__PURE__ */
|
|
2409
|
+
/* @__PURE__ */ E("button", { onClick: Vt, className: O.pauseButton, children: /* @__PURE__ */ H(
|
|
2402
2410
|
"svg",
|
|
2403
2411
|
{
|
|
2404
2412
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2411,27 +2419,27 @@ const Ur = "_selectorWrapper_1kmif_1", Ir = "_iconButton_1kmif_6", Fr = "_dropdo
|
|
|
2411
2419
|
strokeLinecap: "round",
|
|
2412
2420
|
strokeLinejoin: "round",
|
|
2413
2421
|
children: [
|
|
2414
|
-
/* @__PURE__ */
|
|
2415
|
-
/* @__PURE__ */
|
|
2422
|
+
/* @__PURE__ */ E("line", { x1: "10", y1: "8", x2: "10", y2: "16" }),
|
|
2423
|
+
/* @__PURE__ */ E("line", { x1: "14", y1: "8", x2: "14", y2: "16" })
|
|
2416
2424
|
]
|
|
2417
2425
|
}
|
|
2418
2426
|
) })
|
|
2419
2427
|
) }),
|
|
2420
|
-
/* @__PURE__ */
|
|
2428
|
+
/* @__PURE__ */ E("div", { className: O.progressBar, children: /* @__PURE__ */ E(
|
|
2421
2429
|
"div",
|
|
2422
2430
|
{
|
|
2423
2431
|
className: O.progressFill,
|
|
2424
|
-
style: { width: `${
|
|
2432
|
+
style: { width: `${We}%` }
|
|
2425
2433
|
}
|
|
2426
2434
|
) })
|
|
2427
2435
|
] })
|
|
2428
2436
|
] });
|
|
2429
2437
|
};
|
|
2430
2438
|
export {
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2439
|
+
zr as LanguageSelector,
|
|
2440
|
+
se as LanguageSelectorStyles,
|
|
2441
|
+
Ws as StoryVisualizer,
|
|
2434
2442
|
O as StoryVisualizerStyles,
|
|
2435
|
-
|
|
2443
|
+
Vs as voices
|
|
2436
2444
|
};
|
|
2437
2445
|
//# sourceMappingURL=ocity-heritage-visualizer.es.js.map
|